@swell/cli
Version:
Swell's command line interface/utility
24 lines (23 loc) • 717 B
TypeScript
export interface CreateModelFileBody {
$schema: string;
collection?: string;
description?: string;
events?: ModelEventObject;
fields?: ModelFieldResponse;
label?: string;
}
interface ModelEventObject {
types?: ModelEvent[];
}
interface ModelEvent {
id: ModelEventID;
}
type ModelEventID = 'created' | 'deleted' | 'updated';
type ModelFieldResponse = Record<string, ModelFieldTypeObject>;
type FieldType = 'collection' | 'currency' | 'image' | 'int' | 'link' | 'string';
interface ModelFieldTypeObject {
type: FieldType;
}
export declare function parseFields(fields: string[]): ModelFieldResponse;
export declare function parseEvents(events: string[]): ModelEventObject;
export {};