@grouparoo/core
Version:
The Grouparoo Core
38 lines (37 loc) • 1.49 kB
TypeScript
import { ModelConfigurationObject } from "../classes/codeConfig";
import { CommonModel } from "../classes/commonModel";
export declare const ModelTypes: readonly ["profile", "account", "event", "custom"];
export declare type ModelType = typeof ModelTypes[number];
declare const STATES: readonly ["ready", "deleted"];
export declare class GrouparooModel extends CommonModel<GrouparooModel> {
idPrefix(): string;
id: string;
createdAt: Date;
updatedAt: Date;
name: string;
type: ModelType;
locked: string;
state: typeof STATES[number];
getIcon(): "user" | "building" | "location-arrow" | "database";
run(destinationId?: string): Promise<import("./Run").Run>;
stopPreviousRuns(): Promise<void>;
apiData(): Promise<{
id: string;
name: string;
type: "custom" | "event" | "profile" | "account";
state: "ready" | "deleted";
locked: string;
icon: string;
createdAt: number;
updatedAt: number;
}>;
getConfigId(): string;
getConfigObject(): Promise<ModelConfigurationObject>;
static ensureValidType(instance: GrouparooModel): Promise<void>;
static noUpdateIfLocked(instance: GrouparooModel): Promise<void>;
static updateState(instance: GrouparooModel): Promise<void>;
static noDestroyIfLocked(instance: GrouparooModel): Promise<void>;
static ensureNotInUse(instance: GrouparooModel): Promise<void>;
static invalidateCache(): Promise<void>;
}
export {};