UNPKG

pulse-ai-utils

Version:

Utility functions and helpers for AI-powered applications

141 lines (140 loc) 4.99 kB
import { z } from 'zod'; declare const ContentTypeConfig: z.ZodObject<{ enabled: z.ZodBoolean; schemaName: z.ZodString; isUsedForSerp: z.ZodBoolean; supabaseType: z.ZodOptional<z.ZodString>; detectionFields: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; comment: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { enabled?: boolean; schemaName?: string; isUsedForSerp?: boolean; supabaseType?: string; detectionFields?: string[]; comment?: string; }, { enabled?: boolean; schemaName?: string; isUsedForSerp?: boolean; supabaseType?: string; detectionFields?: string[]; comment?: string; }>; declare const ContentTypesConfig: z.ZodObject<{ contentTypes: z.ZodRecord<z.ZodString, z.ZodObject<{ enabled: z.ZodBoolean; schemaName: z.ZodString; isUsedForSerp: z.ZodBoolean; supabaseType: z.ZodOptional<z.ZodString>; detectionFields: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; comment: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { enabled?: boolean; schemaName?: string; isUsedForSerp?: boolean; supabaseType?: string; detectionFields?: string[]; comment?: string; }, { enabled?: boolean; schemaName?: string; isUsedForSerp?: boolean; supabaseType?: string; detectionFields?: string[]; comment?: string; }>>; defaultContentTypes: z.ZodArray<z.ZodString, "many">; futureTypes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{ enabled: z.ZodBoolean; schemaName: z.ZodString; isUsedForSerp: z.ZodBoolean; supabaseType: z.ZodOptional<z.ZodString>; detectionFields: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; comment: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { enabled?: boolean; schemaName?: string; isUsedForSerp?: boolean; supabaseType?: string; detectionFields?: string[]; comment?: string; }, { enabled?: boolean; schemaName?: string; isUsedForSerp?: boolean; supabaseType?: string; detectionFields?: string[]; comment?: string; }>>>; }, "strip", z.ZodTypeAny, { contentTypes?: Record<string, { enabled?: boolean; schemaName?: string; isUsedForSerp?: boolean; supabaseType?: string; detectionFields?: string[]; comment?: string; }>; defaultContentTypes?: string[]; futureTypes?: Record<string, { enabled?: boolean; schemaName?: string; isUsedForSerp?: boolean; supabaseType?: string; detectionFields?: string[]; comment?: string; }>; }, { contentTypes?: Record<string, { enabled?: boolean; schemaName?: string; isUsedForSerp?: boolean; supabaseType?: string; detectionFields?: string[]; comment?: string; }>; defaultContentTypes?: string[]; futureTypes?: Record<string, { enabled?: boolean; schemaName?: string; isUsedForSerp?: boolean; supabaseType?: string; detectionFields?: string[]; comment?: string; }>; }>; export type ContentTypesConfiguration = z.infer<typeof ContentTypesConfig>; export type ContentTypeConfiguration = z.infer<typeof ContentTypeConfig>; declare class ContentTypesConfigLoader { private static instance; private config; private configPath; private constructor(); static getInstance(): ContentTypesConfigLoader; getConfig(): ContentTypesConfiguration; private loadConfig; private getDefaultConfig; getEnabledContentTypes(): string[]; getDefaultContentType(): string; getPreferredContentType(hint?: string): string; getSupabaseTypeForContentType(contentType: string): string; detectContentTypeFromData(data: any): string | null; getContentTypeConfig(typeName: string): ContentTypeConfiguration | null; isUsedForSerp(typeName: string): boolean; getSchemaNameForType(typeName: string): string | null; isTypeEnabled(typeName: string): boolean; getDefaultContentTypes(): string[]; reloadConfig(): void; } export declare const contentTypesConfig: ContentTypesConfigLoader; export declare function getEnabledContentTypes(): string[]; export declare function getContentTypeConfig(typeName: string): ContentTypeConfiguration | null; export declare function isContentTypeEnabled(typeName: string): boolean; export declare function getDefaultContentTypes(): string[]; export declare function isUsedForSerp(typeName: string): boolean; export declare function getDefaultContentType(): string; export declare function getPreferredContentType(hint?: string): string; export declare function getSupabaseTypeForContentType(contentType: string): string; export declare function detectContentTypeFromData(data: any): string | null; export {};