import type { Client, PreparedStatementParams, QueryMetadata, ResultRow, RunResult, SqlQueryNoArgs, SqlTypedQueryNoArgs, SyncClient } from './types.js'; export type InlineConfigQueryType = { parameters?: PreparedStatementParams; result?: ResultRow; }; export type InlineConfigMigration = { name: string; content: SqlQueryNoArgs; }; export type InlineConfigQuery = SqlTypedQueryNoArgs | SqlQueryNoArgs; export type InlineConfigDefinition> = { definitions: SqlQueryNoArgs; migrations?: InlineConfigMigration[]; queries: TQueries; }; type InlineQueryTypePayload = TQuery extends { __sqlfuType?: infer TType; } ? TType : {}; type InlineQueryParameters = InlineQueryTypePayload extends { parameters: infer TParameters; } ? [parameters: TParameters] : unknown extends InlineQueryTypePayload ? [parameters?: Record] : []; type InlineQueryResult = InlineQueryTypePayload extends { result: infer TResult; } ? TResult : QueryMetadata; type InlineQueryMode = TQuery extends { mode: infer TMode; } ? TMode : 'metadata'; type InlineQueryReturn = TClient extends SyncClient ? InlineSyncQueryReturn : Promise>; type InlineSyncQueryReturn = InlineQueryMode extends 'many' ? InlineQueryResult[] : InlineQueryMode extends 'nullableOne' ? InlineQueryResult | null : InlineQueryMode extends 'one' ? InlineQueryResult : RunResult; type InlineConfigBound, TClient extends Client> = { [TName in keyof TQueries]: (...args: InlineQueryParameters) => InlineQueryReturn; } & { migrate(): TClient extends SyncClient ? void : Promise; }; export type InlineConfigFactory> = { (client: TClient): InlineConfigBound; $type: InlineConfigBound; config: InlineConfigDefinition; }; export declare function defineInlineConfig>(definition: InlineConfigDefinition): InlineConfigFactory; export {};