Skip to main content
Home

Système de gestion des ressources de cohabit.

This package works with Deno
This package works with Deno
JSR Score
52%
Published
a year ago (0.2.1)
class Resource

Constructors

new
Resource(unnamed 0: Pick<Resource,
"name"
| "avatar"
| "uuid"
| "createdAt"
| "updatedAt"
>
)

Properties

readonly
avatar: UrlString
readonly
createdAt: DateString
readonly
name: string
readonly
type:
"user"
| "machine"
| "service"
| "group"
| "credential"
readonly
updatedAt: DateString
readonly
uuid: UUID

Methods

toJSON(): ResourceJson<Resource,
"type"
| "uuid"
| "name"
| "avatar"
| "createdAt"
| "updatedAt"
>
update(props: Partial<Omit<Resource,
"type"
| "uuid"
| "createdAt"
>>
): Resource

Static Methods

create(unnamed 0: Pick<Resource, "name" | "avatar">): Resource
fromJSON(json: ToJson<Resource>): Resource
load(_options: never): Resource

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@cohabit/resources-manager

Import symbol

import { Resource } from "@cohabit/resources-manager/models";
or

Import directly with a jsr specifier

import { Resource } from "jsr:@cohabit/resources-manager/models";