import { QueryBuilder, buildFindManyDocument, buildFindFirstDocument, buildCreateDocument, } from '../query-builder';
import { connectionFieldsMap } from '../input-types';
export class GetAllRecordModel {
    client;
    constructor(client) {
        this.client = client;
    }
    findMany(args) {
        const { document, variables } = buildFindManyDocument('GetAllRecord', 'getAll', args.select, {
            where: args?.where,
            orderBy: args?.orderBy,
            first: args?.first,
            last: args?.last,
            after: args?.after,
            before: args?.before,
            offset: args?.offset,
        }, 'GetAllRecordFilter', 'GetAllRecordsOrderBy', connectionFieldsMap);
        return new QueryBuilder({
            client: this.client,
            operation: 'query',
            operationName: 'GetAllRecord',
            fieldName: 'getAll',
            document,
            variables,
        });
    }
    findFirst(args) {
        const { document, variables } = buildFindFirstDocument('GetAllRecord', 'getAll', args.select, {
            where: args?.where,
        }, 'GetAllRecordFilter', connectionFieldsMap);
        return new QueryBuilder({
            client: this.client,
            operation: 'query',
            operationName: 'GetAllRecord',
            fieldName: 'getAll',
            document,
            variables,
        });
    }
    create(args) {
        const { document, variables } = buildCreateDocument('GetAllRecord', 'createGetAllRecord', 'getAllRecord', args.select, args.data, 'CreateGetAllRecordInput', connectionFieldsMap);
        return new QueryBuilder({
            client: this.client,
            operation: 'mutation',
            operationName: 'GetAllRecord',
            fieldName: 'createGetAllRecord',
            document,
            variables,
        });
    }
}
