import { QueryBuilder, buildCustomDocument } from '../query-builder';
import { connectionFieldsMap } from '../input-types';
export function createMutationOperations(client) {
    return {
        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'),
        }),
        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'),
        }),
        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'),
        }),
        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'),
        }),
    };
}
