resolvo-cms
Version:
Headless CMS for Resolvo websites with real-time content management
54 lines • 2.12 kB
TypeScript
import { CMSConfig, CMSSchema, CMSContent, CreateSchemaRequest, UpdateSchemaRequest, CreateContentRequest, UpdateContentRequest, WebSocketConfig } from '../types';
export declare class ResolvoCMSClient {
private config;
private httpClient;
private socket;
private cache;
private subscriptions;
private reconnectAttempts;
private maxReconnectAttempts;
private reconnectTimeout;
private isConnecting;
private requestQueue;
private isProcessingQueue;
constructor(config: CMSConfig);
private setupInterceptors;
private handleAuthError;
private retryRequest;
private queueRequest;
private processQueue;
createSchema(schema: CreateSchemaRequest): Promise<CMSSchema>;
getSchema(schemaId: string): Promise<CMSSchema>;
updateSchema(schemaId: string, updates: UpdateSchemaRequest): Promise<CMSSchema>;
deleteSchema(schemaId: string): Promise<void>;
listSchemas(query?: {
projectId?: number;
isActive?: boolean;
}): Promise<CMSSchema[]>;
createContent(content: CreateContentRequest): Promise<CMSContent>;
getContent(contentId: string): Promise<CMSContent>;
getContentBySchema(schemaId: string, options?: {
isPublished?: boolean;
}): Promise<CMSContent[]>;
updateContent(contentId: string, updates: UpdateContentRequest): Promise<CMSContent>;
deleteContent(contentId: string): Promise<void>;
publishContent(contentId: string): Promise<CMSContent>;
getPublicContent(schemaId: string): Promise<CMSContent[]>;
connect(wsConfig?: WebSocketConfig): void;
disconnect(): void;
subscribe(schemaId: string, callback: Function): void;
unsubscribe(schemaId: string, callback?: Function): void;
private handleRealtimeEvent;
private emitRealtimeEvent;
private resubscribeAll;
private eventListeners;
on(event: string, callback: Function): void;
off(event: string, callback: Function): void;
private emit;
clearCache(): void;
getCacheStats(): {
size: number;
};
isConnected(): boolean;
}
//# sourceMappingURL=ResolvoCMSClient.d.ts.map