import { QueryBuilder, buildCustomDocument } from '../query-builder';
import { connectionFieldsMap } from '../input-types';
export function createQueryOperations(client) {
    return {
        revParse: (args, options) => new QueryBuilder({
            client,
            operation: 'query',
            operationName: 'RevParse',
            fieldName: 'revParse',
            ...buildCustomDocument('query', 'RevParse', 'revParse', options?.select, args, [
                {
                    name: 'dbId',
                    type: 'UUID',
                },
                {
                    name: 'storeId',
                    type: 'UUID',
                },
                {
                    name: 'refname',
                    type: 'String',
                },
            ], connectionFieldsMap, undefined),
        }),
        getAllObjectsFromRoot: (args, options) => new QueryBuilder({
            client,
            operation: 'query',
            operationName: 'GetAllObjectsFromRoot',
            fieldName: 'getAllObjectsFromRoot',
            ...buildCustomDocument('query', 'GetAllObjectsFromRoot', 'getAllObjectsFromRoot', options?.select, args, [
                {
                    name: 'databaseId',
                    type: 'UUID',
                },
                {
                    name: 'id',
                    type: 'UUID',
                },
                {
                    name: 'first',
                    type: 'Int',
                },
                {
                    name: 'offset',
                    type: 'Int',
                },
                {
                    name: 'after',
                    type: 'Cursor',
                },
            ], connectionFieldsMap, undefined),
        }),
        getPathObjectsFromRoot: (args, options) => new QueryBuilder({
            client,
            operation: 'query',
            operationName: 'GetPathObjectsFromRoot',
            fieldName: 'getPathObjectsFromRoot',
            ...buildCustomDocument('query', 'GetPathObjectsFromRoot', 'getPathObjectsFromRoot', options?.select, args, [
                {
                    name: 'databaseId',
                    type: 'UUID',
                },
                {
                    name: 'id',
                    type: 'UUID',
                },
                {
                    name: 'path',
                    type: '[String]',
                },
                {
                    name: 'first',
                    type: 'Int',
                },
                {
                    name: 'offset',
                    type: 'Int',
                },
                {
                    name: 'after',
                    type: 'Cursor',
                },
            ], connectionFieldsMap, undefined),
        }),
        getObjectAtPath: (args, options) => new QueryBuilder({
            client,
            operation: 'query',
            operationName: 'GetObjectAtPath',
            fieldName: 'getObjectAtPath',
            ...buildCustomDocument('query', 'GetObjectAtPath', 'getObjectAtPath', options.select, args, [
                {
                    name: 'dbId',
                    type: 'UUID',
                },
                {
                    name: 'storeId',
                    type: 'UUID',
                },
                {
                    name: 'path',
                    type: '[String]',
                },
                {
                    name: 'refname',
                    type: 'String',
                },
            ], connectionFieldsMap, 'Object'),
        }),
    };
}
