@clipwhisperer/common
Version:
ClipWhisperer Common - Shared library providing core utilities, database schemas, authentication, bucket management, and common functionality across all ClipWhisperer microservices
25 lines (24 loc) • 822 B
TypeScript
/**
* Metadata Utilities
* Centralized metadata handling and sanitization functions
*/
/**
* Sanitize metadata value for safe storage
*/
export declare function sanitizeMetadataValue(value: string | undefined | null): string;
/**
* Create standardized metadata object
*/
export declare function createMetadata(data: Record<string, any>): Record<string, string>;
/**
* Merge metadata objects safely
*/
export declare function mergeMetadata(...metadataObjects: (Record<string, string> | undefined)[]): Record<string, string>;
/**
* Extract common metadata fields
*/
export declare function extractCommonMetadata(source: any): Record<string, string>;
/**
* Create request metadata
*/
export declare function createRequestMetadata(requestId: string, additionalData?: Record<string, any>): Record<string, string>;