UNPKG

buildx-connect

Version:

Official JavaScript/TypeScript SDK for Buildx low-code platform

171 lines (170 loc) 3.46 kB
export interface ApiHeaders { "Content-Type": string; "Authorization"?: string; "X-API-Key": string; [key: string]: string | undefined; } export interface ErrorResponse { error: string; message: string; statusCode: number; success: false; } export interface SuccessResponse<T = any> { success: true; data?: T; message?: string; } export interface Project { _id: string; name: string; description?: string; created_at: string; updated_at: string; [key: string]: any; } export interface Collection { _id: string; collection_id: string; name: string; description?: string; schema?: any; lifecycle?: any; created_at: string; updated_at: string; [key: string]: any; } export interface Document { _id: string; [key: string]: any; } export interface QueryOptions { filter?: any; jsonFilter?: any; select?: string | string[]; projection?: string; options?: any; sort?: any; limit?: number; populate?: string[]; } export interface AuthUser { _id: string; username: string; email?: string; role?: string; created_at: string; updated_at: string; access_token?: string; refresh_token?: string; [key: string]: any; } export interface AuthResponse { user: AuthUser; access_token: string; refresh_token?: string; } export interface LoginCredentials { username: string; password: string; } export interface GoogleCredentials { credential: string; } export interface EotpRequest { email: string; } export interface EotpVerify { email: string; otp: string; } export interface ApiKey { _id: string; name: string; key: string; permissions?: string[]; created_at: string; updated_at: string; [key: string]: any; } export interface StorageFile { name: string; size: number; type: string; url?: string; path: string; created_at: string; [key: string]: any; } export interface Flow { _id: string; name: string; type: string; config: any; created_at: string; updated_at: string; [key: string]: any; } export interface FlowRunOptions { session_id?: string; state?: string; args?: any; } export interface Template { _id: string; name: string; content: string; type: string; created_at: string; updated_at: string; [key: string]: any; } export interface BuildxObject { _id: string; _display?: string; [key: string]: any; } export interface BuildxConfig { apiEndpoint: string; apiKey: string; projectId?: string; organizationId?: string; } export interface Function { _id: string; name: string; code: string; runtime: string; created_at: string; updated_at: string; [key: string]: any; } export interface FunctionLog { _id: string; function_name: string; level: string; message: string; timestamp: string; [key: string]: any; } export interface Lifecycle { states: string[]; transitions: LifecycleTransition[]; [key: string]: any; } export interface LifecycleTransition { from: string; to: string; conditions?: any; actions?: any; } export interface ImportMapping { [field: string]: string; } export interface BackupData { project: Project; collections: Collection[]; data: { [collectionId: string]: Document[]; }; }