import { GetQBOQueryableEntityType, QBOQueryableEntityType, SnakeToCamelCase } from "./lib/types"; import { Config } from "./lib/config"; import { QBOError } from "./lib/errors/error-classes"; export type QueryResponseJustEntity = { [K in T as SnakeToCamelCase extends SnakeToCamelCase ? SnakeToCamelCase : never]: GetQBOQueryableEntityType; }; export type QueryResponse = { time: number; intuitTid: string | null; } & QueryResponseJustEntity; interface UpsertInit { initFetchFn: typeof fetch; config: Config; } export interface UpsertArgs { entity: T; record: GetQBOQueryableEntityType; /** @desc A custom fetch function to use for this upsert request. This will override any fetchFn passed to the client. */ fetchFn?: typeof fetch; } export type UpsertResponse = { entity: GetQBOQueryableEntityType; time: number; intuitTid: string | null; }; export declare const upsert: ({ initFetchFn, config }: UpsertInit) => ({ entity, record, fetchFn: _fetchFn }: UpsertArgs) => Promise, QBOError>>; export {};