import { Mutation } from './types'; type MutationFieldValue = string | number | boolean | any[] | { category: string; detail?: string | null; } | { [field: string]: string | number | boolean; } | Ref | undefined | null; interface MutationFields { [field: string]: MutationFieldValue; } interface Conflict { constraint: string; update_columns: string[]; } export interface FarosModel { [modelName: string]: MutationFields; } export declare class Ref { readonly model?: FarosModel | undefined; constructor(model?: FarosModel | undefined); } export declare class QueryBuilder { private readonly origin; constructor(origin: string); /** * Creates an upsert mutation for the provided Faros model. * @param model The Faros model * @param conflict Override the default conflict clause * @returns The upsert mutation */ upsert(model: FarosModel, conflict?: Conflict): Mutation; delete(model: FarosModel): Mutation; /** * Creates a Ref that can be used in another Faros Model. */ ref(model?: FarosModel): Ref; /** * Creates a mutation object that will update every field of the Faros Model. * If the model contains fields that reference another * model, those fields will be recursively turned into MutationReferences. * @param model The Faros model * @param ref If the mutationObj should be a reference * @returns The mutation object */ private upsertMutationObj; /** * Creates a delete mutation object that will create _eq keys for every field * for the Faros Model. * * @param model The Faros model * @param ref If the DeleteMutationObject is a reference * @returns The mutation object */ private deleteMutationObj; private createConflictClause; } /** * Convert string arrays into postgres literal array. * Leave non-string arrays untouched. */ export declare function arrayLiteral(arr: any[]): string | object; export declare function mask(object: any): string[]; /** @see GraphQLClient.batchMutation */ export declare function batchMutation(mutations: Mutation[]): string | undefined; export {};