import { UISchema } from '../types'; /** * Custom example data structure * Matches the interface defined in CustomExampleForm */ export interface CustomExample { /** Unique identifier */ id: string; /** Example title */ title: string; /** Example description */ description: string; /** JSON Schema for the example */ schema: UISchema; /** Component name this example belongs to */ componentName: string; /** Creation timestamp (ISO string) */ createdAt: string; /** Last update timestamp (ISO string) */ updatedAt: string; } /** * Input data for creating a new custom example */ export interface CreateExampleInput { /** Example title */ title: string; /** Example description */ description: string; /** JSON Schema for the example */ schema: UISchema; /** Component name this example belongs to */ componentName: string; } /** * Input data for updating an existing custom example */ export interface UpdateExampleInput { /** Example title (optional) */ title?: string; /** Example description (optional) */ description?: string; /** JSON Schema for the example (optional) */ schema?: UISchema; } /** * Result of storage operations */ export interface StorageResult { /** Whether the operation succeeded */ success: boolean; /** Result data (if successful) */ data?: T; /** Error message (if failed) */ error?: string; } /** * Generate a unique ID for a new example * @returns Unique identifier string */ export declare function generateExampleId(): string; /** * Get all custom examples * @returns Array of all custom examples */ export declare function getAllExamples(): CustomExample[]; /** * Get custom examples for a specific component * @param componentName - Name of the component to filter by * @returns Array of examples for the specified component */ export declare function getExamplesByComponent(componentName: string): CustomExample[]; /** * Get a single custom example by ID * @param id - Example ID to find * @returns The example if found, undefined otherwise */ export declare function getExampleById(id: string): CustomExample | undefined; /** * Create a new custom example * @param input - Example data to create * @returns Result with the created example or error */ export declare function createExample(input: CreateExampleInput): StorageResult; /** * Update an existing custom example * @param id - ID of the example to update * @param input - Fields to update * @returns Result with the updated example or error */ export declare function updateExample(id: string, input: UpdateExampleInput): StorageResult; /** * Delete a custom example by ID * @param id - ID of the example to delete * @returns Result indicating success or failure */ export declare function deleteExample(id: string): StorageResult; /** * Delete all custom examples for a specific component * @param componentName - Name of the component * @returns Result with count of deleted examples */ export declare function deleteExamplesByComponent(componentName: string): StorageResult; /** * Clear all custom examples from storage * @returns Result indicating success or failure */ export declare function clearAllExamples(): StorageResult; /** * Get count of custom examples * @param componentName - Optional component name to filter by * @returns Number of examples */ export declare function getExampleCount(componentName?: string): number; /** * Check if an example exists * @param id - Example ID to check * @returns Whether the example exists */ export declare function exampleExists(id: string): boolean; /** * Search custom examples by title or description * @param query - Search query string * @param componentName - Optional component name to filter by * @returns Array of matching examples */ export declare function searchExamples(query: string, componentName?: string): CustomExample[]; //# sourceMappingURL=custom-examples-storage.d.ts.map