import { AppsDbDeleteEntryPayload, AppsDbEntriesResult, AppsDbEntry, AppsDbGetEntriesPayload, AppsDbPsqlPayload, AppsDbUpsertEntryPayload } from '../../payload.types'; /** * Lists AppsDB entries of a type, adapting to the platform: * - Web: GET to the next-core AppsDB REST API. * - iOS: reads the local offline mirror via the `appsdb_get_entries` bridge * request. Types not allowlisted in the `offline_appsdb_types` setting fail * with `code = type_not_synced` and automatically fall back to the network. * * @example * const { entries } = await api.appsDbGetEntries({ type: 'favorite' }) */ export declare function appsDbGetEntries(payload: AppsDbGetEntriesPayload): Promise; /** * Creates or updates (deep-merges) an AppsDB entry, adapting to the platform: * - Web: POST (create) or PUT (update, when `id` is set) to the next-core AppsDB REST API. * - iOS: the `appsdb_upsert_entry` bridge request writes on the server and * mirrors the authoritative result locally. Offline it rejects with * `code = offline_write_not_supported` — AppsDB writes are online-only. * * The `data` blob is sent verbatim (no key-casing transformation), and all * `appsDb*` responses are likewise returned verbatim — even for * `casing: 'camel'` consumers — so bridge and REST results are identical. * * @example * const entry = await api.appsDbUpsertEntry({ type: 'favorite', user_id: 1, data: { file_id: 'abc' } }) */ export declare function appsDbUpsertEntry(payload: AppsDbUpsertEntryPayload): Promise; /** * Deletes an AppsDB entry (soft delete server-side), adapting to the platform: * - Web: DELETE to the next-core AppsDB REST API. * - iOS: the `appsdb_delete_entry` bridge request deletes on the server and * removes the entry from the local offline mirror. Offline it rejects with * `code = offline_write_not_supported`. * * @example * await api.appsDbDeleteEntry({ id: '01H5ZXE7YP2JR6Q1Z2G3K4H5J6' }) */ export declare function appsDbDeleteEntry(payload: AppsDbDeleteEntryPayload): Promise; /** * Runs a PSQL (SQL-like) query against AppsDB: POST to the next-core * `/appsdb/psql` endpoint whenever the network is available. * * On iOS the local offline mirror (`appsdb_get_entries` + client-side * evaluation of simple `field = literal` AND-chains) serves the query ONLY * while the device is offline, or when an online fetch fails at the * connection level. Online queries are always answered by the server: Hub * flows use psql results to decide between creating and updating an entry, * and the mirror can lag the server by a sync cycle (multi-device) — a stale * empty read would turn an update into a duplicate create. Offline that same * stale read is harmless because AppsDB writes are rejected offline anyway. * * @example * const { entries } = await api.appsDbPsql({ * query: "SELECT * FROM personalfolders WHERE user_id = 1 AND data.custom_domain = 'acme.my.pitcher.com'", * }) */ export declare function appsDbPsql(payload: AppsDbPsqlPayload): Promise;