import type { DbAdapter, DbAdapterError, DbInsertInput, DbRecord, DbResult } from '@ankhorage/contracts'; import type { RuntimeActionHandler, RuntimeActionHandlerArgs } from './RuntimeRendererConfig'; export interface RuntimeDbPersistResult { readonly input: DbInsertInput; readonly result: DbResult; } export interface RuntimeDbPersistError { readonly code: string; readonly message: string; } export type RuntimeDbPersistExecutionResult = { readonly ok: true; readonly data: RuntimeDbPersistResult; } | { readonly ok: false; readonly error: RuntimeDbPersistError; }; export declare function createDbPersistActionHandler(args: { readonly dbAdapter: DbAdapter; readonly onResult?: (result: RuntimeDbPersistExecutionResult) => void; }): RuntimeActionHandler; export declare function executeDbPersistAction(args: { readonly dbAdapter: DbAdapter; readonly handlerArgs: RuntimeActionHandlerArgs; }): Promise; export declare function resolveDbPersistInput(payload: object | undefined): { readonly ok: true; readonly data: DbInsertInput; } | { readonly ok: false; readonly error: RuntimeDbPersistError; }; export declare function createDbPersistAdapterError(error: RuntimeDbPersistError): DbAdapterError; //# sourceMappingURL=runtimeDbPersist.d.ts.map