/** * Custom mutation operations * @generated by @constructive-io/graphql-codegen * DO NOT EDIT - changes will be overwritten */ import { OrmClient } from '../client'; import { QueryBuilder, buildCustomDocument } from '../query-builder'; import type { InferSelectResult, StrictSelect } from '../select-types'; import type { ConstructBlueprintInput, CopyTemplateToBlueprintInput, ProvisionBucketInput, ConstructBlueprintPayload, CopyTemplateToBlueprintPayload, ProvisionBucketPayload, ConstructBlueprintPayloadSelect, CopyTemplateToBlueprintPayloadSelect, ProvisionBucketPayloadSelect, } from '../input-types'; import { connectionFieldsMap } from '../input-types'; /** * Variables for constructBlueprint * Requests a build of a blueprint: snapshots its definition into a pending blueprint_construction row, enqueues the blueprint:construct job that runs metaschema_private.construct_blueprint_run on it, and returns the construction id immediately. Poll the row: pending -> constructing -> constructed (table_map populated) or failed (error holds the coded error). schema_id is the default schema for tables without an explicit schema_name. */ export interface ConstructBlueprintVariables { input: ConstructBlueprintInput; } /** * Variables for copyTemplateToBlueprint * Creates a new blueprint by copying a template definition. Checks visibility: owners can always copy their own templates, others require public visibility. Increments the template copy_count. Returns the new blueprint ID. */ export interface CopyTemplateToBlueprintVariables { input: CopyTemplateToBlueprintInput; } /** * Variables for provisionBucket * Reconcile an S3 bucket for a logical bucket in the database. Records the request on the bucket row via RLS; the bucket's job trigger then enqueues the same storage:provision_bucket job used on INSERT, and repeated requests collapse into one pending job. This is idempotent for an already-reconciled bucket; failures become GraphQL errors. */ export interface ProvisionBucketVariables { input: ProvisionBucketInput; } export function createMutationOperations(client: OrmClient) { return { constructBlueprint: ( args: ConstructBlueprintVariables, options: { select: S; } & StrictSelect ) => new QueryBuilder<{ constructBlueprint: InferSelectResult | null; }>({ client, operation: 'mutation', operationName: 'ConstructBlueprint', fieldName: 'constructBlueprint', ...buildCustomDocument( 'mutation', 'ConstructBlueprint', 'constructBlueprint', options.select, args, [ { name: 'input', type: 'ConstructBlueprintInput!', }, ], connectionFieldsMap, 'ConstructBlueprintPayload' ), }), copyTemplateToBlueprint: ( args: CopyTemplateToBlueprintVariables, options: { select: S; } & StrictSelect ) => new QueryBuilder<{ copyTemplateToBlueprint: InferSelectResult | null; }>({ client, operation: 'mutation', operationName: 'CopyTemplateToBlueprint', fieldName: 'copyTemplateToBlueprint', ...buildCustomDocument( 'mutation', 'CopyTemplateToBlueprint', 'copyTemplateToBlueprint', options.select, args, [ { name: 'input', type: 'CopyTemplateToBlueprintInput!', }, ], connectionFieldsMap, 'CopyTemplateToBlueprintPayload' ), }), provisionBucket: ( args: ProvisionBucketVariables, options: { select: S; } & StrictSelect ) => new QueryBuilder<{ provisionBucket: InferSelectResult | null; }>({ client, operation: 'mutation', operationName: 'ProvisionBucket', fieldName: 'provisionBucket', ...buildCustomDocument( 'mutation', 'ProvisionBucket', 'provisionBucket', options.select, args, [ { name: 'input', type: 'ProvisionBucketInput!', }, ], connectionFieldsMap, 'ProvisionBucketPayload' ), }), }; }