@grouparoo/core
Version:
The Grouparoo Core
45 lines (44 loc) • 1.38 kB
TypeScript
import { GrouparooRecord } from "./GrouparooRecord";
import { Property } from "./Property";
import { CommonModel } from "../classes/commonModel";
declare const STATES: readonly ["draft", "pending", "ready"];
export declare enum InvalidReasons {
Duplicate = "Duplicate Value"
}
export declare class RecordProperty extends CommonModel<RecordProperty> {
idPrefix(): string;
recordId: string;
propertyId: string;
state: typeof STATES[number];
rawValue: string;
invalidValue: string;
invalidReason: string;
position: number;
unique: boolean;
valueChangedAt: Date;
stateChangedAt: Date;
confirmedAt: Date;
startedAt: Date;
record: GrouparooRecord;
property: Property;
apiData(): Promise<{
recordId: string;
property: Property;
state: "pending" | "ready" | "draft";
valueChangedAt: number;
stateChangedAt: number;
confirmedAt: number;
startedAt: number;
position: number;
unique: boolean;
key: string;
value: string | number | boolean | Date;
invalidValue: string;
invalidReason: string;
}>;
getValue(): Promise<string | number | boolean | Date>;
setValue(value: any): Promise<void>;
ensureProperty(): Promise<Property>;
static updateState(instance: RecordProperty): Promise<void>;
}
export {};