import BaseSDK from '../base-sdk'; import { QelosSDKOptions } from '../types'; export interface IComponent { _id?: string; tenant?: string; identifier: string; componentName: string; description?: string; content: string; requiredProps: { prop: string; type: string; }[]; compiledContent?: { js: string; css: string; }; created: Date; updated: Date; } type IComponentCreateParams = Pick & { description?: string; }; interface IBulkComponentResult { identifier: string; success: boolean; component?: IComponent; error?: string; } interface IBulkComponentResponse { total: number; succeeded: number; failed: number; results: IBulkComponentResult[]; } type IComponentUpdateParams = Partial>; export default class QlComponents extends BaseSDK { private relativePath; constructor(options: QelosSDKOptions); getComponent(componentId: string): Promise; getList(): Promise; remove(componentId: string): Promise; update(componentId: string, changes: IComponentUpdateParams): Promise; create(component: IComponentCreateParams): Promise; bulkCreateOrUpdate(components: IComponentCreateParams[]): Promise; } export {};