UNPKG

@swell/cli

Version:

Swell's command line interface/utility

24 lines (23 loc) 745 B
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; } declare const parseFields: (fields: string[]) => ModelFieldResponse; declare const parseEvents: (events: string[]) => ModelEventObject; export { CreateModelFileBody, parseEvents, parseFields };