import { UIDLDataSourceItemNode, UIDLDataSourceListNode, ChunkDefinition, GeneratorOptions, UIDLDataSource, UIDLEcommerceCategory } from '@teleporthq/teleport-types'; export declare const sanitizeFileName: (input: string) => string; export declare const isNonEmptyString: (value: unknown) => value is string; export declare const hoistLoadingFromRepeater: (dataSourceNode: any) => void; export declare const validateResourceDefinition: (resourceDefinition: any) => { isValid: boolean; error?: string; }; export declare const validateNodeContent: (content: any) => { isValid: boolean; error?: string; }; export declare const validateDataSourceConfig: (dataSource: UIDLDataSource) => { isValid: boolean; error?: string; }; export declare const generateSafeFileName: (dataSourceType: string, tableName: string, dataSourceId: string) => string; export declare const extractDataSourceIntoNextAPIFolder: (node: UIDLDataSourceItemNode | UIDLDataSourceListNode, dataSources: Record, componentChunk: ChunkDefinition, extractedResources: GeneratorOptions['extractedResources'], categories?: UIDLEcommerceCategory[]) => void; export declare const isEmbeddedDataSource: (dataSourceType: string) => boolean; export declare const replaceSecretReference: (value: unknown, options?: { templateLiteral?: boolean; }) => string; /** * Emit runtime helpers that every SQL-based fetcher needs to safely * apply the `{ query, queryColumns }` search contract: * * - `SEARCH_LIKE_ESCAPE_CHAR` — the char we register via `ESCAPE '|'` * in LIKE / ILIKE expressions. `|` is not special in any SQL * dialect's string-literal grammar, so the emitted SQL parses * unambiguously across Postgres, MySQL (regardless of * `NO_BACKSLASH_ESCAPES`), and SQLite. * * - `escapeLikePattern(term)` — prefixes `|` to `|`, `%`, `_` so a * user typing `50%` matches a literal `%` rather than any-chars. * * - `sanitizeSearchIdentifier(name)` — validates column identifiers * against `[A-Za-z_][A-Za-z0-9_]*` and throws on anything else. The * caller is responsible for wrapping in the dialect's quote chars. * * Kept as a single snippet so every fetcher imports the exact same * contract and the canvas preview (data-fetcher-worker / * database-provider-worker) and the generated Next.js app emit * byte-identical search SQL. */ export declare const generateSearchEscapeHelpersCode: () => string; export declare const generateSafeJSONParseCode: () => string; export declare const generateDateFormatterCode: () => string; export declare const generateSortFilterHelperCode: () => string; export declare const sanitizeNumericParam: (value: unknown, defaultValue?: number) => number; export declare const sanitizePort: (port: unknown, defaultPort: number) => number; export declare const isValidUrl: (url: unknown) => boolean; export declare const sanitizeIdentifier: (identifier: unknown) => string; /** * Determines if any resource params have dynamic values that cannot be resolved * server-side. Params whose dynamic references match the page's dynamicRouteAttribute * can be resolved from context.params and are NOT considered unresolvable. */ export declare const hasUnresolvableDynamicParams: (params: Record, dynamicRouteAttr?: string) => boolean; export declare const extractDataSourceIntoGetStaticProps: (node: UIDLDataSourceItemNode | UIDLDataSourceListNode, dataSources: Record, componentChunk: ChunkDefinition, getStaticPropsChunk: any, chunks: any[], extractedResources: GeneratorOptions['extractedResources'], dependencies: Record, dynamicRouteAttr?: string, folderPath?: string[], categories?: UIDLEcommerceCategory[]) => { success: boolean; chunk?: any; }; //# sourceMappingURL=utils.d.ts.map