SubjectClasstypeno test imports ittype SubjectClass = "machine" | "device" | "workstation" | "cloud-account";What an order can be for: a machine, a device, a workstation or a cloud account.
The kinds of resource a requirement can be about, as data: each with a sentence, the classes of subject it applies to and whether it can destroy. A dialect says which of them it can carry out, and a fleet that needs a kind that is not here adds it to its own catalogue.
import { kindOf } from "./kinds.ts";
kindOf("package")?.subjects; // ["machine", "workstation"]SubjectClasstypeno test imports ittype SubjectClass = "machine" | "device" | "workstation" | "cloud-account";What an order can be for: a machine, a device, a workstation or a cloud account.
SUBJECT_CLASSESconstconst SUBJECT_CLASSES: readonly SubjectClass[]Every class of subject.
KindSpectypeno test imports ittype KindSpec = {
readonly id: ResourceKindId;
readonly summary: string;
readonly subjects: readonly SubjectClass[];
readonly canDestroy: boolean;
};A kind of resource.
KINDSconstconst KINDS: readonly KindSpec[]The catalogue.
kindOffunctionfunction kindOf(id: string, catalogue?: readonly KindSpec[]): KindSpec | undefinedThe kind of the catalogue with this id, if there is one.