import { QueryBuilder, buildCustomDocument } from '../query-builder';
import { connectionFieldsMap } from '../input-types';
export function createMutationOperations(client) {
    return {
        freezeObjects: (args, options) => new QueryBuilder({
            client,
            operation: 'mutation',
            operationName: 'FreezeObjects',
            fieldName: 'freezeObjects',
            ...buildCustomDocument('mutation', 'FreezeObjects', 'freezeObjects', options.select, args, [
                {
                    name: 'input',
                    type: 'FreezeObjectsInput!',
                },
            ], connectionFieldsMap, 'FreezeObjectsPayload'),
        }),
        initEmptyRepo: (args, options) => new QueryBuilder({
            client,
            operation: 'mutation',
            operationName: 'InitEmptyRepo',
            fieldName: 'initEmptyRepo',
            ...buildCustomDocument('mutation', 'InitEmptyRepo', 'initEmptyRepo', options.select, args, [
                {
                    name: 'input',
                    type: 'InitEmptyRepoInput!',
                },
            ], connectionFieldsMap, 'InitEmptyRepoPayload'),
        }),
        removeNodeAtPath: (args, options) => new QueryBuilder({
            client,
            operation: 'mutation',
            operationName: 'RemoveNodeAtPath',
            fieldName: 'removeNodeAtPath',
            ...buildCustomDocument('mutation', 'RemoveNodeAtPath', 'removeNodeAtPath', options.select, args, [
                {
                    name: 'input',
                    type: 'RemoveNodeAtPathInput!',
                },
            ], connectionFieldsMap, 'RemoveNodeAtPathPayload'),
        }),
        setDataAtPath: (args, options) => new QueryBuilder({
            client,
            operation: 'mutation',
            operationName: 'SetDataAtPath',
            fieldName: 'setDataAtPath',
            ...buildCustomDocument('mutation', 'SetDataAtPath', 'setDataAtPath', options.select, args, [
                {
                    name: 'input',
                    type: 'SetDataAtPathInput!',
                },
            ], connectionFieldsMap, 'SetDataAtPathPayload'),
        }),
        setPropsAndCommit: (args, options) => new QueryBuilder({
            client,
            operation: 'mutation',
            operationName: 'SetPropsAndCommit',
            fieldName: 'setPropsAndCommit',
            ...buildCustomDocument('mutation', 'SetPropsAndCommit', 'setPropsAndCommit', options.select, args, [
                {
                    name: 'input',
                    type: 'SetPropsAndCommitInput!',
                },
            ], connectionFieldsMap, 'SetPropsAndCommitPayload'),
        }),
        insertNodeAtPath: (args, options) => new QueryBuilder({
            client,
            operation: 'mutation',
            operationName: 'InsertNodeAtPath',
            fieldName: 'insertNodeAtPath',
            ...buildCustomDocument('mutation', 'InsertNodeAtPath', 'insertNodeAtPath', options.select, args, [
                {
                    name: 'input',
                    type: 'InsertNodeAtPathInput!',
                },
            ], connectionFieldsMap, 'InsertNodeAtPathPayload'),
        }),
        updateNodeAtPath: (args, options) => new QueryBuilder({
            client,
            operation: 'mutation',
            operationName: 'UpdateNodeAtPath',
            fieldName: 'updateNodeAtPath',
            ...buildCustomDocument('mutation', 'UpdateNodeAtPath', 'updateNodeAtPath', options.select, args, [
                {
                    name: 'input',
                    type: 'UpdateNodeAtPathInput!',
                },
            ], connectionFieldsMap, 'UpdateNodeAtPathPayload'),
        }),
        setAndCommit: (args, options) => new QueryBuilder({
            client,
            operation: 'mutation',
            operationName: 'SetAndCommit',
            fieldName: 'setAndCommit',
            ...buildCustomDocument('mutation', 'SetAndCommit', 'setAndCommit', options.select, args, [
                {
                    name: 'input',
                    type: 'SetAndCommitInput!',
                },
            ], connectionFieldsMap, 'SetAndCommitPayload'),
        }),
        provisionBucket: (args, options) => new QueryBuilder({
            client,
            operation: 'mutation',
            operationName: 'ProvisionBucket',
            fieldName: 'provisionBucket',
            ...buildCustomDocument('mutation', 'ProvisionBucket', 'provisionBucket', options.select, args, [
                {
                    name: 'input',
                    type: 'ProvisionBucketInput!',
                },
            ], connectionFieldsMap, 'ProvisionBucketPayload'),
        }),
    };
}
