{"version":3,"sources":["../src/iac/index.ts","../src/iac/graph.ts","../src/iac/compiler.ts","../src/iac/change-set.ts","../src/core/errors.ts","../src/core/logger.ts","../src/core/config.ts","../src/core/version.ts","../src/core/graphql-client.ts","../src/iac/client.ts","../src/iac/diff.ts","../src/iac/sdk.ts","../src/iac/evaluator.ts","../src/iac/project.ts","../src/iac/typegen.ts","../src/iac/runner.ts","../src/generated/graphql.ts","../src/sandbox/errors.ts","../src/core/exec-ws-client.ts","../src/sandbox/exec.ts","../src/sandbox/engine.ts","../src/sandbox/template.ts","../src/sandbox/sandbox.ts"],"names":["database","service","path","databaseRegion","image","print","Kind","bucket","volume","parse","createHash","pruneEmpty","url","pathToFileURL","fs","names","template","build","engine","info"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAA,WAAA,GAAA;AAAA,QAAA,CAAA,WAAA,EAAA;AAAA,EAAA,uBAAA,EAAA,MAAA,uBAAA;AAAA,EAAA,SAAA,EAAA,MAAA,SAAA;AAAA,EAAA,0BAAA,EAAA,MAAA,0BAAA;AAAA,EAAA,qBAAA,EAAA,MAAA,qBAAA;AAAA,EAAA,MAAA,EAAA,MAAA,MAAA;AAAA,EAAA,2BAAA,EAAA,MAAA,2BAAA;AAAA,EAAA,gBAAA,EAAA,MAAA,gBAAA;AAAA,EAAA,YAAA,EAAA,MAAA,YAAA;AAAA,EAAA,oBAAA,EAAA,MAAA,oBAAA;AAAA,EAAA,QAAA,EAAA,MAAA,QAAA;AAAA,EAAA,MAAA,EAAA,MAAA,MAAA;AAAA,EAAA,aAAA,EAAA,MAAA,aAAA;AAAA,EAAA,UAAA,EAAA,MAAA,UAAA;AAAA,EAAA,KAAA,EAAA,MAAA,KAAA;AAAA,EAAA,wBAAA,EAAA,MAAA,wBAAA;AAAA,EAAA,mBAAA,EAAA,MAAA,mBAAA;AAAA,EAAA,sBAAA,EAAA,MAAA,sBAAA;AAAA,EAAA,eAAA,EAAA,MAAA,eAAA;AAAA,EAAA,EAAA,EAAA,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AAC3C,IAAA,MAAM,KAAK,OAAA,EAAQ;AAAA,EACrB;AAAA,EAEA,MAAA,GAAsB;AACpB,IAAA,OAAO,EAAE,GAAG,IAAA,CAAK,KAAA,EAAM;AAAA,EACzB;AACF","file":"index.cjs","sourcesContent":["export * from \"./change-set.js\";\nexport * from \"./client.js\";\nexport * from \"./compiler.js\";\nexport * from \"./diff.js\";\nexport * from \"./evaluator.js\";\nexport * from \"./graph.js\";\nexport * from \"./project.js\";\nexport * from \"./runner.js\";\nexport * from \"./schema.js\";\nexport * from \"./sdk.js\";\nexport * from \"./typegen.js\";\n","import type {\n  BucketConfig,\n  BuildConfig,\n  DeployConfig,\n  EnvironmentConfig,\n  ServiceConfig,\n  ServiceNetworking,\n  ServiceSource,\n  VariableConfig,\n  VolumeConfig,\n  VolumeMount,\n} from \"./schema.js\";\n\nexport const RAILWAY_GRAPH_VERSION = 1 as const;\n\nexport type GraphVersion = typeof RAILWAY_GRAPH_VERSION;\nexport type ResourceType = \"service\" | \"database\" | \"volume\" | \"bucket\" | \"group\";\nexport type ResourceAddress = `${ResourceType}.${string}`;\n\nexport interface RailwayGraph {\n  version: GraphVersion;\n  project: ProjectNode;\n  environments: EnvironmentNode[];\n  resources: ResourceNode[];\n  edges: Edge[];\n}\n\nexport interface ProjectNode {\n  name: string;\n}\n\nexport interface EnvironmentNode {\n  name: string;\n}\n\nexport interface GraphResourceBase {\n  /** Deterministic graph handle. Remote Railway IDs live in bindings/lock state. */\n  address: ResourceAddress;\n  type: ResourceType;\n  name: string;\n  groupId?: string;\n}\n\nexport type ResourceNode = ServiceNode | DatabaseNode | VolumeNode | BucketNode | GroupNode;\n\nexport type ServiceKind = \"empty\" | \"github\" | \"docker-image\" | \"database\" | \"function\" | \"template\";\n\nexport interface SourceConfig extends ServiceSource {\n  type: \"github\" | \"image\" | \"empty\" | \"template\";\n  repo?: string | null;\n  image?: string | null;\n  template?: string | null;\n}\n\nexport interface ServiceNode extends GraphResourceBase {\n  address: `service.${string}`;\n  type: \"service\";\n  kind: ServiceKind;\n  source?: SourceConfig;\n  build?: BuildConfig;\n  deploy?: DeployConfig;\n  networking?: ServiceNetworking;\n  variables?: Record<string, VariableValue>;\n  volumeMounts?: Record<string, VolumeMount | null>;\n  configFile?: string;\n  parentServiceId?: string;\n  groupId?: string;\n  clusterRole?: ServiceConfig[\"clusterRole\"];\n  replicaConfig?: ServiceConfig[\"replicaConfig\"];\n  clusterDisplay?: ServiceConfig[\"clusterDisplay\"];\n}\n\nexport interface DatabaseNode extends Omit<ServiceNode, \"address\" | \"id\" | \"type\" | \"kind\"> {\n  address: `database.${string}`;\n  type: \"database\";\n  kind: \"database\";\n  engine: \"postgres\" | \"mysql\" | \"redis\" | \"mongo\" | \"private\";\n  image: string;\n  output: string;\n  defaultMountPath?: string;\n}\n\nexport interface VolumeNode extends GraphResourceBase {\n  address: `volume.${string}`;\n  type: \"volume\";\n  config?: VolumeConfig;\n}\n\nexport interface BucketNode extends GraphResourceBase {\n  address: `bucket.${string}`;\n  type: \"bucket\";\n  config?: BucketConfig;\n}\n\nexport interface GroupNode extends GraphResourceBase {\n  address: `group.${string}`;\n  type: \"group\";\n  color?: string;\n  icon?: string;\n  isCollapsed?: boolean;\n}\n\nexport type VariableValue =\n  | ({ type: \"literal\" } & VariableConfig)\n  | { type: \"reference\"; resource: ResourceAddress; output: string }\n  | { type: \"preserve\" }\n  | { type: \"raw\"; value: VariableConfig };\n\nexport interface Edge {\n  from: ResourceAddress;\n  to: ResourceAddress;\n  type: \"variable\" | \"mount\" | \"group\";\n  key?: string;\n}\n\nexport type ProjectResourceInput = ResourceNode | ResourceNode[];\n\nexport interface ProjectDefinition {\n  name: string;\n  environments?: string[];\n  resources?: ProjectResourceInput[];\n  /** @deprecated Use resources instead. */\n  services?: ProjectResourceInput[];\n}\n\nexport interface GraphCompileOptions {\n  serviceIdsByName?: Record<string, string>;\n  existingServiceIds?: string[];\n  volumeIdsByServiceName?: Record<string, string>;\n  bucketIdsByName?: Record<string, string>;\n}\n\nexport interface CompileResult {\n  graph: RailwayGraph;\n  desiredConfig: EnvironmentConfig;\n}\n\nexport interface GraphIndex {\n  byAddress: Map<ResourceAddress, ResourceNode>;\n  byTypeAndName: Map<`${ResourceType}:${string}`, ResourceNode>;\n}\n\nexport function resourceAddress(type: ResourceType, name: string): ResourceAddress {\n  return `${type}.${name}` as ResourceAddress;\n}\n\nexport function indexGraph(graph: RailwayGraph): GraphIndex {\n  const byAddress = new Map<ResourceAddress, ResourceNode>();\n  const byTypeAndName = new Map<`${ResourceType}:${string}`, ResourceNode>();\n\n  for (const resource of graph.resources) {\n    byAddress.set(resource.address, resource);\n    byTypeAndName.set(`${resource.type}:${resource.name}`, resource);\n  }\n\n  return { byAddress, byTypeAndName };\n}\n\nexport function validateGraph(graph: RailwayGraph): string[] {\n  const errors: string[] = [];\n  if (graph.version !== RAILWAY_GRAPH_VERSION) errors.push(`Unsupported graph version: ${graph.version}`);\n\n  const addresses = new Set<ResourceAddress>();\n  for (const resource of graph.resources) {\n    if (addresses.has(resource.address)) errors.push(`Duplicate resource address: ${resource.address}`);\n    addresses.add(resource.address);\n  }\n\n  for (const edge of graph.edges) {\n    if (!addresses.has(edge.from)) errors.push(`Edge references missing source: ${edge.from}`);\n    if (!addresses.has(edge.to)) errors.push(`Edge references missing target: ${edge.to}`);\n  }\n\n  return errors;\n}\n","import { RAILWAY_GRAPH_VERSION, resourceAddress } from \"./graph.js\";\nimport type {\n  DatabaseNode,\n  Edge,\n  GraphCompileOptions,\n  ProjectDefinition,\n  RailwayGraph,\n  ResourceNode,\n  ServiceNode,\n  VariableValue,\n} from \"./graph.js\";\nimport type { DeployConfig, EnvironmentConfig, ServiceConfig, ServiceNetworking, VariableConfig, VariableValues } from \"./schema.js\";\n\nexport function projectDefinitionToGraph(definition: ProjectDefinition): RailwayGraph {\n  const resources = (definition.resources ?? definition.services ?? []).flat();\n  const edges: Edge[] = [];\n  for (const resource of resources) {\n    if (resource.type !== \"service\" && resource.type !== \"database\") continue;\n    for (const [key, value] of Object.entries(resource.variables ?? {})) {\n      if (value.type !== \"reference\") continue;\n      edges.push({ from: resource.address, to: value.resource as Edge[\"to\"], type: \"variable\", key });\n    }\n  }\n  return {\n    version: RAILWAY_GRAPH_VERSION,\n    project: { name: definition.name },\n    environments: (definition.environments ?? []).map(name => ({ name })),\n    resources: resources.map(stripRuntimeHelpers),\n    edges,\n  };\n}\n\nfunction stripRuntimeHelpers<T>(value: T): T {\n  if (Array.isArray(value)) return value.map(stripRuntimeHelpers) as T;\n  if (value == null || typeof value !== \"object\") return value;\n  return Object.fromEntries(\n    Object.entries(value as Record<string, unknown>)\n      .filter(([, child]) => typeof child !== \"function\")\n      .map(([key, child]) => [key, stripRuntimeHelpers(child)]),\n  ) as T;\n}\n\nexport function graphToEnvironmentConfig(graph: RailwayGraph, options: GraphCompileOptions = {}): EnvironmentConfig {\n  const config: EnvironmentConfig = { services: {} };\n  const resourceNamesById = Object.fromEntries(graph.resources.map(resource => [resource.address, resource.name]));\n  const existingServiceIds = new Set(options.existingServiceIds ?? []);\n\n  for (const resource of graph.resources) {\n    if (resource.type === \"service\" || resource.type === \"database\") {\n      const serviceKey = options.serviceIdsByName?.[resource.name] ?? resource.name;\n      config.services![serviceKey] =\n        resource.type === \"database\"\n          ? databaseToEnvironmentConfig(resource, {\n              isNew: !existingServiceIds.has(serviceKey),\n              ...(options.volumeIdsByServiceName?.[resource.name]\n                ? { volumeId: options.volumeIdsByServiceName[resource.name] }\n                : {}),\n            })\n          : serviceToEnvironmentConfig(resource, resourceNamesById, {\n              isNew: !existingServiceIds.has(serviceKey),\n            });\n\n      const volumeId = options.volumeIdsByServiceName?.[resource.name];\n      if (resource.type === \"database\" && volumeId != null) {\n        const region = databaseRegion(resource);\n        config.volumes = config.volumes ?? {};\n        config.volumes[volumeId] = { isCreated: true, ...(region ? { region } : {}) };\n      }\n      continue;\n    }\n\n    if (resource.type === \"volume\") {\n      config.volumes = config.volumes ?? {};\n      config.volumes[resource.name] = { isCreated: true, ...resource.config };\n      continue;\n    }\n\n    if (resource.type === \"bucket\") {\n      const existingBucketId = options.bucketIdsByName?.[resource.name];\n      const bucketKey = existingBucketId ?? resource.name;\n      config.buckets = config.buckets ?? {};\n      config.buckets[bucketKey] = { ...(existingBucketId ? {} : { isCreated: true }), ...resource.config, ...(resource.groupId ? { groupId: resource.groupId } : {}) };\n      continue;\n    }\n\n    if (resource.type === \"group\") {\n      config.groups = config.groups ?? {};\n      config.groups[resource.name] = pruneEmpty({\n        isCreated: true,\n        name: resource.name,\n        color: resource.color,\n        icon: resource.icon,\n        isCollapsed: resource.isCollapsed,\n      }) as NonNullable<EnvironmentConfig[\"groups\"]>[string];\n    }\n  }\n\n  return pruneEmpty(config);\n}\n\nexport function environmentConfigToGraph(\n  config: EnvironmentConfig,\n  options: { projectName?: string; serviceNamesById?: Record<string, string>; bucketNamesById?: Record<string, string>; customDomainsByServiceId?: Record<string, Record<string, { port?: number }>> } = {},\n): RailwayGraph {\n  const resources: ResourceNode[] = [];\n  const groupNamesById = Object.fromEntries(\n    Object.entries(config.groups ?? {}).map(([groupId, groupConfig]) => [groupId, groupConfig?.name ?? groupId]),\n  );\n\n  for (const [groupId, groupConfig] of Object.entries(config.groups ?? {})) {\n    if (groupConfig == null || groupConfig.isDeleted) continue;\n    const name = groupConfig.name ?? groupId;\n    const parentGroupId = (groupConfig as { groupId?: string | null }).groupId;\n    resources.push(pruneEmpty({\n      address: resourceAddress(\"group\", name) as `group.${string}`,\n      type: \"group\",\n      name,\n      color: groupConfig.color,\n      icon: groupConfig.icon,\n      isCollapsed: groupConfig.isCollapsed,\n      ...(parentGroupId ? { groupId: groupNamesById[parentGroupId] ?? parentGroupId } : {}),\n    }) as ResourceNode);\n  }\n\n  for (const [serviceId, serviceConfig] of Object.entries(config.services ?? {})) {\n    if (serviceConfig == null || serviceConfig.isDeleted) continue;\n    const name = options.serviceNamesById?.[serviceId] ?? serviceId;\n    const imageName = serviceConfig.source?.image;\n    const looksLikeDatabase = imageName?.includes(\"postgres\") || imageName?.includes(\"mysql\") || imageName?.includes(\"redis\") || imageName?.includes(\"mongo\");\n    if (looksLikeDatabase) {\n      const engine = imageName?.includes(\"mysql\") ? \"mysql\" : imageName?.includes(\"redis\") ? \"redis\" : imageName?.includes(\"mongo\") ? \"mongo\" : \"postgres\";\n      resources.push(pruneEmpty({\n        address: resourceAddress(\"database\", name) as `database.${string}`,\n        type: \"database\",\n        kind: \"database\",\n        engine,\n        name,\n        image: imageName ?? \"postgres:16\",\n        output: engine === \"redis\" ? \"REDIS_URL\" : engine === \"mysql\" ? \"MYSQL_URL\" : engine === \"mongo\" ? \"MONGO_URL\" : \"DATABASE_URL\",\n        defaultMountPath: Object.keys(serviceConfig.volumeMounts ?? {}).length > 0 ? serviceConfig.deploy?.requiredMountPath : undefined,\n        ...(serviceConfig.deploy ? { deploy: serviceConfig.deploy } : {}),\n        ...(serviceConfig.volumeMounts ? { volumeMounts: serviceConfig.volumeMounts } : {}),\n        ...(serviceConfig.groupId ? { groupId: groupNamesById[serviceConfig.groupId] ?? serviceConfig.groupId } : {}),\n      }) as ResourceNode);\n      continue;\n    }\n    resources.push({\n      address: resourceAddress(\"service\", name) as `service.${string}`,\n      type: \"service\",\n      kind: serviceConfig.source?.repo ? \"github\" : serviceConfig.source?.image ? \"docker-image\" : serviceConfig.deploy?.cronSchedule ? \"function\" : \"empty\",\n      name,\n      ...(serviceConfig.source ? { source: { type: serviceConfig.source.image ? \"image\" : \"github\", ...serviceConfig.source } } : {}),\n      ...(serviceConfig.build ? { build: serviceConfig.build } : {}),\n      ...(serviceConfig.deploy ? { deploy: serviceConfig.deploy } : {}),\n      ...(serviceConfig.variables ? { variables: variablesFromEnvironmentConfig(serviceConfig.variables) } : {}),\n      ...(serviceConfig.networking || options.customDomainsByServiceId?.[serviceId] ? { networking: pruneEmpty({ ...serviceConfig.networking, customDomains: options.customDomainsByServiceId?.[serviceId] ?? serviceConfig.networking?.customDomains }) as ServiceNetworking } : {}),\n      ...(serviceConfig.volumeMounts ? { volumeMounts: serviceConfig.volumeMounts } : {}),\n      ...(serviceConfig.configFile ? { configFile: serviceConfig.configFile } : {}),\n      ...(serviceConfig.groupId ? { groupId: groupNamesById[serviceConfig.groupId] ?? serviceConfig.groupId } : {}),\n    });\n  }\n\n  for (const [bucketId, bucketConfig] of Object.entries(config.buckets ?? {})) {\n    if (bucketConfig == null || bucketConfig.isDeleted) continue;\n    const name = options.bucketNamesById?.[bucketId] ?? bucketId;\n    const groupId = (bucketConfig as { groupId?: string | null }).groupId;\n    resources.push({\n      address: resourceAddress(\"bucket\", name) as `bucket.${string}`,\n      type: \"bucket\",\n      name,\n      config: bucketConfig,\n      ...(groupId ? { groupId: groupNamesById[groupId] ?? groupId } : {}),\n    });\n  }\n\n  return projectDefinitionToGraph({\n    name: options.projectName ?? \"imported-project\",\n    resources,\n  });\n}\n\nexport function composePatch({ currentConfig, desiredConfig }: { currentConfig: EnvironmentConfig; desiredConfig: EnvironmentConfig }): EnvironmentConfig {\n  return pruneEmpty(addDeletionMarkers({ currentConfig, desiredConfig }));\n}\n\nfunction addDeletionMarkers({ currentConfig, desiredConfig }: { currentConfig: EnvironmentConfig; desiredConfig: EnvironmentConfig }): EnvironmentConfig {\n  const next: EnvironmentConfig = structuredClone(desiredConfig);\n  for (const [serviceId, currentService] of Object.entries(currentConfig.services ?? {})) {\n    if (currentService == null || currentService.isDeleted) continue;\n    const desiredService = desiredConfig.services?.[serviceId];\n    if (desiredService == null) {\n      next.services = next.services ?? {};\n      next.services[serviceId] = { isDeleted: true };\n      continue;\n    }\n    for (const [variableName, currentVariable] of Object.entries(currentService.variables ?? {})) {\n      if (currentVariable == null) continue;\n      if (desiredService.variables?.[variableName] != null) continue;\n      next.services = next.services ?? {};\n      next.services[serviceId] = next.services[serviceId] ?? {};\n      next.services[serviceId]!.variables = next.services[serviceId]!.variables ?? {};\n      next.services[serviceId]!.variables![variableName] = null;\n    }\n  }\n  return next;\n}\n\nfunction databaseRegion(database: DatabaseNode): string | undefined {\n  const regions = Object.entries(database.deploy?.multiRegionConfig ?? {}).filter(([, config]) => config != null);\n  if (regions.length !== 1) return undefined;\n  return regions[0]?.[0];\n}\n\nfunction databaseDeploy(database: DatabaseNode, requiredMountPath: string): DeployConfig {\n  return {\n    requiredMountPath,\n    ...(database.deploy?.multiRegionConfig ? { multiRegionConfig: database.deploy.multiRegionConfig } : {}),\n  };\n}\n\nfunction databaseToEnvironmentConfig(database: DatabaseNode, options: { isNew: boolean; volumeId?: string }): ServiceConfig {\n  if (database.engine !== \"postgres\") {\n    return pruneEmpty({\n      ...(options.isNew ? { isCreated: true } : {}),\n      source: { image: database.image },\n      ...(database.defaultMountPath ? { deploy: databaseDeploy(database, database.defaultMountPath) } : {}),\n      ...(options.volumeId && database.defaultMountPath ? { volumeMounts: { [options.volumeId]: { mountPath: database.defaultMountPath } } } : {}),\n    });\n  }\n  return pruneEmpty({\n    ...(options.isNew ? { isCreated: true } : {}),\n    source: { image: database.image },\n    deploy: databaseDeploy(database, \"/var/lib/postgresql/data\"),\n    variables: {\n      PGDATA: { value: \"/var/lib/postgresql/data/pgdata\" },\n      PGHOST: { value: \"${{RAILWAY_PRIVATE_DOMAIN}}\" },\n      PGPORT: { value: \"5432\" },\n      PGUSER: { value: \"${{POSTGRES_USER}}\" },\n      PGDATABASE: { value: \"${{POSTGRES_DB}}\" },\n      PGPASSWORD: { value: \"${{POSTGRES_PASSWORD}}\" },\n      POSTGRES_DB: { value: \"railway\" },\n      DATABASE_URL: { value: \"postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:5432/${{PGDATABASE}}\" },\n      POSTGRES_USER: { value: \"postgres\" },\n      SSL_CERT_DAYS: { value: \"820\" },\n      POSTGRES_PASSWORD: { generator: 'secret(32, \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\")' },\n      DATABASE_PUBLIC_URL: { value: \"postgresql://${{PGUSER}}:${{POSTGRES_PASSWORD}}@${{RAILWAY_TCP_PROXY_DOMAIN}}:${{RAILWAY_TCP_PROXY_PORT}}/${{PGDATABASE}}\" },\n      RAILWAY_DEPLOYMENT_DRAINING_SECONDS: { value: \"60\" },\n    },\n    networking: { tcpProxies: { \"5432\": {} } },\n    ...(options.volumeId ? { volumeMounts: { [options.volumeId]: { mountPath: \"/var/lib/postgresql/data\" } } } : {}),\n  });\n}\n\nfunction serviceToEnvironmentConfig(service: ServiceNode, resourceNamesById: Record<string, string>, options: { isNew: boolean }): ServiceConfig {\n  const config: ServiceConfig = { ...(options.isNew ? { isCreated: true } : {}) };\n  if (service.source) {\n    const source = pruneEmpty({\n      repo: service.source.type === \"github\" ? service.source.repo : undefined,\n      branch: service.source.type === \"github\" ? service.source.branch : undefined,\n      image: service.source.type === \"image\" ? service.source.image : undefined,\n      rootDirectory: service.source.rootDirectory,\n      commitSha: service.source.commitSha,\n      upstreamUrl: service.source.upstreamUrl,\n      checkSuites: service.source.checkSuites,\n      autoUpdates: service.source.autoUpdates,\n    }) as ServiceConfig[\"source\"];\n    if (source) config.source = source;\n  }\n  if (service.build) config.build = service.build;\n  if (service.deploy) config.deploy = service.deploy;\n  if (service.variables) config.variables = variablesToEnvironmentConfig(service.variables, resourceNamesById);\n  if (service.networking) config.networking = service.networking;\n  if (service.volumeMounts) config.volumeMounts = service.volumeMounts;\n  if (service.configFile) config.configFile = service.configFile;\n  if (service.parentServiceId) config.parentServiceId = service.parentServiceId;\n  if (service.groupId) config.groupId = service.groupId;\n  if (service.clusterRole) config.clusterRole = service.clusterRole;\n  if (service.replicaConfig) config.replicaConfig = service.replicaConfig;\n  if (service.clusterDisplay) config.clusterDisplay = service.clusterDisplay;\n  return pruneEmpty(config);\n}\n\nfunction variablesToEnvironmentConfig(variables: Record<string, VariableValue>, resourceNamesById: Record<string, string>): VariableValues {\n  return Object.fromEntries(\n    Object.entries(variables)\n      .filter((entry): entry is [string, Exclude<VariableValue, { type: \"preserve\" }>] => entry[1].type !== \"preserve\")\n      .map(([key, value]) => [\n        key,\n        value.type === \"literal\" ? literalVariable(value) : value.type === \"raw\" ? value.value : referenceVariable(value, resourceNamesById),\n      ]),\n  );\n}\n\nfunction referenceVariable(value: Extract<VariableValue, { type: \"reference\" }>, resourceNamesById: Record<string, string>): VariableConfig {\n  return { value: `\\${{${resourceNamesById[value.resource] ?? value.resource}.${value.output}}}` };\n}\n\nfunction literalVariable(value: Extract<VariableValue, { type: \"literal\" }>): VariableConfig {\n  const { type: _type, ...variable } = value;\n  return variable;\n}\n\nfunction variablesFromEnvironmentConfig(variables: VariableValues): Record<string, VariableValue> {\n  return Object.fromEntries(Object.entries(variables).filter(([, value]) => value != null).map(([key, value]) => [key, value?.value == null || value.value === \"\" ? { type: \"preserve\" } : { type: \"literal\", value: value.value }]));\n}\n\nfunction pruneEmpty<T>(value: T, path: string[] = []): T {\n  if (Array.isArray(value)) return value.map(child => pruneEmpty(child, path)) as T;\n  if (value == null || typeof value !== \"object\") return value;\n  return Object.fromEntries(\n    Object.entries(value)\n      .map(([key, child]) => [key, pruneEmpty(child, [...path, key])])\n      .filter(([, child]) => {\n        if (child == null) return false;\n        if (typeof child === \"object\" && !Array.isArray(child)) {\n          if ([\"customDomains\", \"serviceDomains\", \"tcpProxies\"].includes(path[path.length - 1] ?? \"\")) return true;\n          return Object.keys(child).length > 0;\n        }\n        return true;\n      }),\n  ) as T;\n}\n","import { composePatch, graphToEnvironmentConfig } from \"./compiler.js\";\nimport type { GraphCompileOptions, RailwayGraph, ResourceAddress, ResourceNode, VariableValue } from \"./graph.js\";\nimport type { EnvironmentConfig } from \"./schema.js\";\n\nexport const RAILWAY_CHANGE_SET_VERSION = 0 as const;\n\nexport type RailwayChangeSetVersion = typeof RAILWAY_CHANGE_SET_VERSION;\nexport type ChangeSeverity = \"safe\" | \"destructive\";\nexport type ChangeDeployEffect = \"none\" | \"deploy\" | \"unknown\";\n\nexport interface RailwayChangeSet {\n  version: RailwayChangeSetVersion;\n  changes: RailwayChange[];\n  diagnostics: ChangeDiagnostic[];\n}\n\nexport type RailwayChange =\n  | CreateResourceChange\n  | DeleteResourceChange\n  | UpdateResourceChange\n  | SetVariableChange\n  | DeleteVariableChange\n  | CreateDomainChange;\n\nexport interface ChangeBase {\n  kind: string;\n  path: string;\n  summary: string;\n  severity: ChangeSeverity;\n  deployEffect: ChangeDeployEffect;\n}\n\nexport interface CreateResourceChange extends ChangeBase {\n  kind: \"resource.create\";\n  address: ResourceAddress;\n  resource: ResourceNode;\n}\n\nexport interface DeleteResourceChange extends ChangeBase {\n  kind: \"resource.delete\";\n  address: ResourceAddress;\n  previous: ResourceNode;\n}\n\nexport interface UpdateResourceChange extends ChangeBase {\n  kind: \"resource.update\";\n  address: ResourceAddress;\n  field: string;\n  before: unknown;\n  after: unknown;\n  details?: string[];\n}\n\nexport interface SetVariableChange extends ChangeBase {\n  kind: \"variable.set\";\n  address: ResourceAddress;\n  variable: string;\n  before?: VariableValue | undefined;\n  after: VariableValue;\n  details?: string[];\n}\n\nexport interface DeleteVariableChange extends ChangeBase {\n  kind: \"variable.delete\";\n  address: ResourceAddress;\n  variable: string;\n  previous: VariableValue;\n}\n\nexport interface CreateDomainChange extends ChangeBase {\n  kind: \"domain.create\";\n  address: ResourceAddress;\n  domain: string;\n  targetPort?: number;\n}\n\nexport interface ChangeDiagnostic {\n  severity: \"warning\" | \"error\";\n  path: string;\n  message: string;\n}\n\nexport function diffGraphs({ current, desired }: { current: RailwayGraph; desired: RailwayGraph }): RailwayChangeSet {\n  const changes: RailwayChange[] = [];\n  const diagnostics: ChangeDiagnostic[] = [];\n  const currentByAddress = new Map(current.resources.map(resource => [resource.address, resource]));\n  const desiredByAddress = new Map(desired.resources.map(resource => [resource.address, resource]));\n\n  for (const resource of desired.resources) {\n    const previous = currentByAddress.get(resource.address);\n    if (previous && isManagedByRepoConfig(previous)) {\n      diagnostics.push({\n        severity: \"error\",\n        path: `resources.${resource.address}.configFile`,\n        message: `${previous.name} is already managed by ${String((previous as { configFile?: string }).configFile)}. Remove or migrate the repo config before managing this service from .railway/railway.ts.`,\n      });\n      continue;\n    }\n    if (!previous) {\n      changes.push({\n        kind: \"resource.create\",\n        address: resource.address,\n        resource,\n        path: `resources.${resource.address}`,\n        summary: `Create ${resource.type} ${resource.name}`,\n        severity: \"safe\",\n        deployEffect: resource.type === \"service\" || resource.type === \"database\" ? \"deploy\" : \"none\",\n      });\n      continue;\n    }\n\n    if (previous.name !== resource.name) {\n      changes.push(update(resource.address, \"name\", previous.name, resource.name, `Rename ${resource.type} ${previous.name} to ${resource.name}`));\n    }\n\n    diffVariables({ previous, resource, changes, resourcesByAddress: desiredByAddress });\n    diffTopLevelField({ previous, resource, field: \"source\", changes });\n    diffTopLevelField({ previous, resource, field: \"build\", changes });\n    if (previous.type === \"database\" && resource.type === \"database\" && databaseRegion(previous) !== databaseRegion(resource)) {\n      changes.push(update(\n        resource.address,\n        \"deploy\",\n        previous.deploy,\n        resource.deploy,\n        `Move database ${resource.name} to ${databaseRegion(resource) ?? \"default region\"}`,\n        changedLeafPaths(normalizeForDiff(\"deploy\", previous.deploy), normalizeForDiff(\"deploy\", resource.deploy), \"deploy\"),\n        \"destructive\",\n      ));\n    } else {\n      diffTopLevelField({ previous, resource, field: \"deploy\", changes });\n    }\n    diffTopLevelField({ previous, resource, field: \"groupId\", changes });\n    diffNetworking({ previous, resource, changes });\n    // Volume lifecycle is not part of v0 authoring. Never plan an accidental unmount just\n    // because imported config omitted a Railway-owned volume id.\n    if (previous.type === \"bucket\" && resource.type === \"bucket\" && bucketRegion(previous) !== bucketRegion(resource)) {\n      diagnostics.push({\n        severity: \"error\",\n        path: `resources.${resource.address}.config.region`,\n        message: `Bucket region cannot be changed after creation. Create a new bucket in ${bucketRegion(resource) ?? \"the desired region\"} and migrate data instead.`,\n      });\n    } else {\n      diffTopLevelField({ previous, resource, field: \"config\", changes });\n    }\n    // Database mount paths are product/template defaults in v0. Do not churn or attempt\n    // mount-path updates after creation; Backboard owns the database realization details.\n  }\n\n  for (const resource of current.resources) {\n    if (desiredByAddress.has(resource.address)) continue;\n    changes.push({\n      kind: \"resource.delete\",\n      address: resource.address,\n      previous: resource,\n      path: `resources.${resource.address}`,\n      summary: `Delete ${resource.type} ${resource.name}`,\n      severity: \"destructive\",\n      deployEffect: resource.type === \"service\" || resource.type === \"database\" ? \"deploy\" : \"none\",\n    });\n  }\n\n  return { version: RAILWAY_CHANGE_SET_VERSION, changes, diagnostics };\n}\n\nexport function changeSetToGraph({ current, changeSet }: { current: RailwayGraph; changeSet: RailwayChangeSet }): RailwayGraph {\n  const next = structuredClone(current) as RailwayGraph;\n  const resources = new Map<ResourceAddress, ResourceNode>(next.resources.map(resource => [resource.address, resource]));\n\n  for (const change of changeSet.changes) {\n    if (change.kind === \"resource.create\") {\n      resources.set(change.address, structuredClone(change.resource) as ResourceNode);\n      continue;\n    }\n\n    if (change.kind === \"resource.delete\") {\n      resources.delete(change.address);\n      continue;\n    }\n\n    const resource = resources.get(change.address);\n    if (!resource) continue;\n\n    if (change.kind === \"domain.create\") {\n      continue;\n    }\n\n    if (change.kind === \"resource.update\") {\n      (resource as unknown as Record<string, unknown>)[change.field] = structuredClone(change.after);\n      continue;\n    }\n\n    if (change.kind === \"variable.set\") {\n      const serviceLike = resource as ResourceNode & { variables?: Record<string, VariableValue> };\n      serviceLike.variables = serviceLike.variables ?? {};\n      serviceLike.variables[change.variable] = structuredClone(change.after) as VariableValue;\n      continue;\n    }\n\n    if (change.kind === \"variable.delete\" && \"variables\" in resource) {\n      delete resource.variables?.[change.variable];\n    }\n  }\n\n  next.resources = [...resources.values()];\n  next.edges = next.edges.filter(edge => resources.has(edge.from) && resources.has(edge.to));\n  return next;\n}\n\nexport function changeSetToEnvironmentPatch({\n  currentGraph,\n  currentConfig,\n  changeSet,\n  compileOptions = {},\n}: {\n  currentGraph: RailwayGraph;\n  currentConfig: EnvironmentConfig;\n  changeSet: RailwayChangeSet;\n  compileOptions?: GraphCompileOptions;\n}): EnvironmentConfig {\n  const desiredGraph = changeSetToGraph({ current: currentGraph, changeSet });\n  const desiredConfig = graphToEnvironmentConfig(desiredGraph, compileOptions);\n  return composePatch({ currentConfig, desiredConfig });\n}\n\nexport function validateChangeSet(changeSet: RailwayChangeSet): ChangeDiagnostic[] {\n  const diagnostics: ChangeDiagnostic[] = [];\n  if (changeSet.version !== RAILWAY_CHANGE_SET_VERSION) {\n    diagnostics.push({ severity: \"error\", path: \"version\", message: `Unsupported change set version: ${changeSet.version}` });\n  }\n\n  for (const [index, change] of changeSet.changes.entries()) {\n    if (!change.path) diagnostics.push({ severity: \"error\", path: `changes.${index}.path`, message: \"Change path is required\" });\n    if (!change.summary) diagnostics.push({ severity: \"error\", path: `changes.${index}.summary`, message: \"Change summary is required\" });\n    if (change.kind === \"resource.delete\" && change.severity !== \"destructive\") {\n      diagnostics.push({ severity: \"warning\", path: `changes.${index}.severity`, message: \"Resource deletion should be marked destructive\" });\n    }\n  }\n\n  return diagnostics;\n}\n\nexport function renderChangeSet(changeSet: RailwayChangeSet): string {\n  if (changeSet.changes.length === 0) return \"No changes.\";\n  return changeSet.changes.map(change => `${marker(change)} ${change.summary}`).join(\"\\n\");\n}\n\nfunction diffVariables({ previous, resource, changes, resourcesByAddress }: { previous: ResourceNode; resource: ResourceNode; changes: RailwayChange[]; resourcesByAddress: Map<ResourceAddress, ResourceNode> }) {\n  if (!(\"variables\" in previous) && !(\"variables\" in resource)) return;\n  const before = \"variables\" in previous ? previous.variables ?? {} : {};\n  const after = \"variables\" in resource ? resource.variables ?? {} : {};\n  for (const [key, value] of Object.entries(after)) {\n    if (isPreservedVariable(value) || isPreservedVariable(before[key]) || isUnknownImportedVariable(before[key])) continue;\n    if (stableStringify(normalizeVariableForDiff(before[key], resourcesByAddress)) === stableStringify(normalizeVariableForDiff(value, resourcesByAddress))) continue;\n    changes.push({\n      kind: \"variable.set\",\n      address: resource.address,\n      variable: key,\n      before: before[key],\n      after: value,\n      path: `resources.${resource.address}.variables.${key}`,\n      summary: `${before[key] ? \"Update\" : \"Set\"} variable ${resource.name}.${key}`,\n      details: [`${resource.name}.${key} (${formatVariableDiffValue(before[key], resourcesByAddress)} → ${formatVariableDiffValue(value, resourcesByAddress)})`],\n      severity: \"safe\",\n      deployEffect: \"deploy\",\n    });\n  }\n  for (const [key, value] of Object.entries(before)) {\n    if (key in after) continue;\n    changes.push({\n      kind: \"variable.delete\",\n      address: resource.address,\n      variable: key,\n      previous: value,\n      path: `resources.${resource.address}.variables.${key}`,\n      summary: `Delete variable ${resource.name}.${key}`,\n      severity: \"destructive\",\n      deployEffect: \"deploy\",\n    });\n  }\n}\n\nfunction diffNetworking({ previous, resource, changes }: { previous: ResourceNode; resource: ResourceNode; changes: RailwayChange[] }) {\n  const before = \"networking\" in previous ? previous.networking : undefined;\n  const after = \"networking\" in resource ? resource.networking : undefined;\n  const beforeDomains = before?.customDomains ?? {};\n  const afterDomains = after?.customDomains ?? {};\n\n  for (const [domain, config] of Object.entries(afterDomains)) {\n    if (beforeDomains[domain]) continue;\n    changes.push({\n      kind: \"domain.create\",\n      address: resource.address,\n      domain,\n      ...(config?.port !== undefined && config.port !== null ? { targetPort: config.port } : {}),\n      path: `resources.${resource.address}.domains.${domain}`,\n      summary: `Create custom domain ${resource.name}.${domain}`,\n      severity: \"safe\",\n      deployEffect: \"none\",\n    });\n  }\n\n  const normalizedBefore = normalizeForDiff(\"networking\", { ...before, customDomains: undefined, serviceDomains: undefined });\n  const normalizedAfter = normalizeForDiff(\"networking\", { ...after, customDomains: undefined, serviceDomains: undefined });\n  if (stableStringify(normalizedBefore) !== stableStringify(normalizedAfter)) {\n    changes.push(update(resource.address, \"networking\", before, after, `Update ${resource.name} networking`));\n  }\n}\n\nfunction diffTopLevelField({ previous, resource, field, changes }: { previous: ResourceNode; resource: ResourceNode; field: string; changes: RailwayChange[] }) {\n  const before = (previous as unknown as Record<string, unknown>)[field];\n  const after = (resource as unknown as Record<string, unknown>)[field];\n  if (field === \"source\" && previous.type === \"database\" && isEquivalentDatabaseSource(previous, after)) return;\n  const normalizedBefore = normalizeForDiff(field, before);\n  const normalizedAfter = normalizeForDiff(field, after);\n  if (stableStringify(normalizedBefore) === stableStringify(normalizedAfter)) return;\n  changes.push(update(resource.address, field, before, after, summaryForField(resource, field, normalizedBefore, normalizedAfter), changedLeafPaths(normalizedBefore, normalizedAfter, field)));\n}\n\nfunction summaryForField(resource: ResourceNode, field: string, before: unknown, after: unknown): string {\n  const details = changedLeafPaths(before, after, field);\n  if (details.length > 0) {\n    const shown = details.slice(0, 3).map(detailPathForSummary).join(\", \");\n    const remaining = details.length - 3;\n    return `Update ${resource.name} ${shown}${remaining > 0 ? ` and ${remaining} more` : \"\"}`;\n  }\n\n  if (field === \"networking\") {\n    const beforeDomains = Object.keys(((before as { customDomains?: Record<string, unknown> } | undefined)?.customDomains) ?? {});\n    const afterDomains = Object.keys(((after as { customDomains?: Record<string, unknown> } | undefined)?.customDomains) ?? {});\n    const created = afterDomains.filter(domain => !beforeDomains.includes(domain));\n    if (created.length === 1) return `Create custom domain ${resource.name}.${created[0]}`;\n    if (created.length > 1) return `Create ${created.length} custom domains for ${resource.name}`;\n  }\n  return `Update ${resource.name} ${field}`;\n}\n\nfunction detailPathForSummary(detail: string): string {\n  return detail.replace(/ \\(.+\\)$/, \"\");\n}\n\nfunction changedLeafPaths(before: unknown, after: unknown, prefix: string): string[] {\n  const beforeFlat = flattenForDiff(before);\n  const afterFlat = flattenForDiff(after);\n  const changed = [...new Set([...Object.keys(beforeFlat), ...Object.keys(afterFlat)])]\n    .filter(key => stableStringify(beforeFlat[key]) !== stableStringify(afterFlat[key]))\n    .sort();\n  return changed\n    .filter(key => key !== \"\" || changed.length === 1)\n    .filter(key => key === \"\" || !changed.some(other => other !== key && other.startsWith(`${key}.`)))\n    .map(key => {\n      const path = key ? `${prefix}.${key}` : prefix;\n      const beforeValue = beforeFlat[key];\n      const afterValue = afterFlat[key];\n      return `${friendlyPath(path)} (${formatDiffValue(beforeValue)} → ${formatDiffValue(afterValue)})`;\n    });\n}\n\nfunction friendlyPath(path: string): string {\n  const region = /^deploy\\.multiRegionConfig\\.([^.]+)\\.numReplicas$/.exec(path);\n  if (region) return `regions.${region[1]}`;\n  return path;\n}\n\nfunction formatDiffValue(value: unknown): string {\n  if (value === undefined) return \"unset\";\n  if (value === null) return \"null\";\n  if (typeof value === \"string\") return JSON.stringify(value);\n  return JSON.stringify(value);\n}\n\nfunction flattenForDiff(value: unknown, prefix = \"\"): Record<string, unknown> {\n  if (value == null || typeof value !== \"object\" || Array.isArray(value)) return { [prefix]: value };\n  const entries = Object.entries(value as Record<string, unknown>);\n  if (entries.length === 0) return { [prefix]: value };\n  return Object.fromEntries(entries.flatMap(([key, child]) => Object.entries(flattenForDiff(child, prefix ? `${prefix}.${key}` : key))));\n}\n\nfunction update(address: ResourceAddress, field: string, before: unknown, after: unknown, summary: string, details?: string[], severity: ChangeSeverity = \"safe\"): UpdateResourceChange {\n  return {\n    kind: \"resource.update\",\n    address,\n    field,\n    before,\n    after,\n    ...(details && details.length > 0 ? { details } : {}),\n    path: `resources.${address}.${field}`,\n    summary,\n    severity,\n    deployEffect: field === \"config\" || field === \"groupId\" ? \"none\" : \"deploy\",\n  };\n}\n\nfunction marker(change: RailwayChange): string {\n  if (change.kind === \"resource.create\" || change.kind === \"domain.create\") return \"+\";\n  if (change.kind === \"resource.delete\") return \"-\";\n  return \"~\";\n}\n\nfunction formatVariableDiffValue(value: VariableValue | undefined, resourcesByAddress: Map<ResourceAddress, ResourceNode>): string {\n  if (value === undefined) return \"unset\";\n  if (value.type === \"preserve\") return \"preserve()\";\n  if (value.type === \"literal\") return formatDiffValue(value.value);\n  if (value.type === \"reference\") {\n    const name = resourcesByAddress.get(value.resource)?.name ?? value.resource.split(\".\").slice(1).join(\".\") ?? value.resource;\n    return `${name}.${value.output}`;\n  }\n  return formatDiffValue(normalizeVariableForDiff(value, resourcesByAddress));\n}\n\nfunction normalizeVariableForDiff(value: VariableValue | undefined, resourcesByAddress: Map<ResourceAddress, ResourceNode>): unknown {\n  if (value?.type !== \"reference\") return value;\n  const name = resourcesByAddress.get(value.resource)?.name ?? value.resource.split(\".\").slice(1).join(\".\") ?? value.resource;\n  return { type: \"literal\", value: `\\${{${name}.${value.output}}}` };\n}\n\nfunction isManagedByRepoConfig(resource: ResourceNode): boolean {\n  if (resource.type !== \"service\" && resource.type !== \"database\") return false;\n  const configFile = (resource as { configFile?: string | null }).configFile;\n  return typeof configFile === \"string\" && /railway\\.(json|toml)$/i.test(configFile);\n}\n\nfunction bucketRegion(resource: ResourceNode): string | undefined {\n  if (resource.type !== \"bucket\") return undefined;\n  const config = (resource as ResourceNode & { config?: { region?: string | null } }).config;\n  return config?.region ?? undefined;\n}\n\nfunction databaseRegion(resource: ResourceNode): string | undefined {\n  if (resource.type !== \"database\") return undefined;\n  const regions = Object.entries(resource.deploy?.multiRegionConfig ?? {}).filter(([, config]) => config != null);\n  if (regions.length !== 1) return undefined;\n  return regions[0]?.[0];\n}\n\nfunction isEquivalentDatabaseSource(previous: ResourceNode, after: unknown): boolean {\n  if (previous.type !== \"database\" || after == null || typeof after !== \"object\") return false;\n  const source = after as Record<string, unknown>;\n  return source.type === \"image\" && normalizeImageTag(String(source.image)) === normalizeImageTag(previous.image);\n}\n\nfunction isPreservedVariable(value: VariableValue | undefined): boolean {\n  return value?.type === \"preserve\";\n}\n\nfunction isUnknownImportedVariable(value: VariableValue | undefined): boolean {\n  return value?.type === \"literal\" && value.value === \"\";\n}\n\nfunction normalizeForDiff(field: string, value: unknown): unknown {\n  if (value == null || typeof value !== \"object\") return value;\n  const copy = structuredClone(value) as Record<string, unknown>;\n\n  if (field === \"source\") {\n    if (copy.checkSuites === false) delete copy.checkSuites;\n    if (copy.branch === \"main\") delete copy.branch;\n    delete copy.commitSha;\n    delete copy.upstreamUrl;\n    if (copy.rootDirectory === \"\") delete copy.rootDirectory;\n    if (typeof copy.image === \"string\") copy.image = normalizeImageTag(copy.image);\n  }\n\n  if (field === \"build\") {\n    if (copy.builder === \"RAILPACK\") delete copy.builder;\n    if (copy.buildEnvironment === \"V3\") delete copy.buildEnvironment;\n  }\n\n  if (field === \"deploy\") {\n    if (copy.useLegacyStacker === false) delete copy.useLegacyStacker;\n    if (copy.ipv6EgressEnabled === false) delete copy.ipv6EgressEnabled;\n    if (copy.runtime === \"V2\") delete copy.runtime;\n    copy.multiRegionConfig = normalizeMultiRegionConfig(copy.multiRegionConfig);\n    if (isDefaultMultiRegionConfig(copy.multiRegionConfig)) delete copy.multiRegionConfig;\n    if (copy.multiRegionConfig != null && typeof copy.multiRegionConfig === \"object\" && !Array.isArray(copy.multiRegionConfig) && Object.keys(copy.multiRegionConfig).length === 0) delete copy.multiRegionConfig;\n  }\n\n  return Object.keys(copy).length === 0 ? undefined : copy;\n}\n\nfunction normalizeMultiRegionConfig(value: unknown): unknown {\n  if (value == null || typeof value !== \"object\" || Array.isArray(value)) return value;\n  const entries = Object.entries(value as Record<string, unknown>)\n    .filter(([, config]) => {\n      if (config == null || typeof config !== \"object\" || Array.isArray(config)) return true;\n      const replicas = (config as Record<string, unknown>).numReplicas;\n      return replicas !== null && replicas !== undefined;\n    });\n  return Object.fromEntries(entries);\n}\n\nfunction isDefaultMultiRegionConfig(value: unknown): boolean {\n  if (value == null || typeof value !== \"object\" || Array.isArray(value)) return false;\n  const entries = Object.entries(value as Record<string, unknown>);\n  if (entries.length !== 1) return false;\n  const config = entries[0]?.[1];\n  if (config == null || typeof config !== \"object\" || Array.isArray(config)) return false;\n  const regionConfig = config as Record<string, unknown>;\n  return Object.entries(regionConfig).every(([key, child]) =>\n    (key === \"numReplicas\" && child === 1) ||\n    (key === \"stackerAssignment\" && child == null)\n  );\n}\n\nfunction normalizeImageTag(image: string): string {\n  const match = /^(?:railwayapp\\/|ghcr\\.io\\/railwayapp-templates\\/)?(redis|mysql|mongo|postgres)(?:-ssl)?:(\\d+)(?:\\.\\d+)*$/.exec(image);\n  if (!match) return image;\n  return `${match[1]}:${match[2]}`;\n}\n\nfunction stableStringify(value: unknown): string {\n  return JSON.stringify(sortForJson(value));\n}\n\nfunction sortForJson(value: unknown): unknown {\n  if (Array.isArray(value)) return value.map(sortForJson);\n  if (value == null || typeof value !== \"object\") return value;\n  return Object.fromEntries(\n    Object.entries(value as Record<string, unknown>)\n      .sort(([left], [right]) => left.localeCompare(right))\n      .map(([key, child]) => [key, sortForJson(child)]),\n  );\n}\n","export interface RailwayGraphQLErrorItem {\n  message: string;\n  path?: readonly (string | number)[];\n  extensions?: Record<string, unknown>;\n  [key: string]: unknown;\n}\n\nexport class RailwayError extends Error {\n  constructor(message: string, options?: ErrorOptions) {\n    super(message, options);\n    this.name = new.target.name;\n  }\n}\n\nexport class RailwayAuthError extends RailwayError {\n  readonly variable: string;\n\n  constructor(variable: string) {\n    super(\n      `Missing Railway credential. Set ${variable} or pass it explicitly.`,\n    );\n    this.variable = variable;\n  }\n}\n\n/** A WebSocket or network transport failure. */\nexport class RailwayConnectionError extends RailwayError {\n  readonly closeCode: number | undefined;\n\n  constructor(args: { message: string; closeCode?: number; cause?: unknown }) {\n    super(\n      args.message,\n      args.cause === undefined ? undefined : { cause: args.cause },\n    );\n    this.closeCode = args.closeCode;\n  }\n}\n\nexport class RailwayGraphQLError extends RailwayError {\n  readonly status: number;\n  readonly errors: readonly RailwayGraphQLErrorItem[];\n  readonly responseBody: unknown;\n\n  constructor(args: {\n    message: string;\n    status: number;\n    errors?: readonly RailwayGraphQLErrorItem[];\n    responseBody?: unknown;\n  }) {\n    super(args.message);\n    this.status = args.status;\n    this.errors = args.errors ?? [];\n    this.responseBody = args.responseBody;\n  }\n}\n","/**\n * Opt-in verbose logging. A no-op unless enabled, so call sites stay\n * branch-free: `config.log(...)` does nothing when verbose is off.\n */\nexport type Logger = (message: string) => void;\n\nconst NOOP: Logger = () => {};\n\n/**\n * Returns a logger that writes `[railway] <message>` lines to stderr, or a\n * no-op when `verbose` is false. `console.error` exists in Node, browsers, and\n * edge runtimes, so this is safe to call anywhere.\n */\nexport function createLogger(verbose: boolean): Logger {\n  if (!verbose) return NOOP;\n  return message => console.error(`[railway] ${message}`);\n}\n","import { RailwayAuthError, RailwayConnectionError } from \"./errors.js\";\nimport { createLogger, type Logger } from \"./logger.js\";\n\nexport const DEFAULT_RAILWAY_GRAPHQL_ENDPOINT =\n  \"https://backboard.railway.com/graphql/v2\";\n\nconst RAILWAY_TOKEN_ENV = \"RAILWAY_API_TOKEN\";\nconst RAILWAY_ENVIRONMENT_ENV = \"RAILWAY_ENVIRONMENT_ID\";\nconst RAILWAY_ENDPOINT_ENV = \"RAILWAY_GRAPHQL_ENDPOINT\";\nconst RAILWAY_TCP_PROXY_WS_ENV = \"RAILWAY_TCP_PROXY_WS_ENDPOINT\";\nconst RAILWAY_VERBOSE_ENV = \"RAILWAY_VERBOSE\";\n\nconst TCP_PROXY_WS_PORT = \"2226\";\nconst TCP_PROXY_WS_PATH = \"/ws/exec\";\n\nexport type RailwayAuthType = \"bearer\" | \"project-token\";\n\nexport interface RailwayClientConfig {\n  token?: string;\n  authType?: RailwayAuthType;\n  endpoint?: string;\n  /** Alias used by IaC flows. Prefer endpoint for the stable SDK surface. */\n  graphqlEndpoint?: string;\n  fetch?: typeof fetch;\n  /**\n   * WebSocket constructor used to stream exec output. Defaults to the global\n   * `WebSocket` (available in Node >= 22, browsers, Deno, and edge runtimes);\n   * pass an implementation (e.g. the `ws` package) where no global exists.\n   */\n  webSocketImpl?: WebSocketConstructor;\n  /**\n   * tcp-proxy exec WebSocket endpoint. Defaults to the value derived from\n   * `endpoint` (`backboard.<host>` → `wss://ssh.<host>:2226/ws/exec`);\n   * override for non-standard deployments.\n   */\n  tcpProxyWsEndpoint?: string;\n  /**\n   * Print human-readable progress to stderr (requests, polling, lifecycle).\n   * Also enabled by `RAILWAY_VERBOSE`. Tokens and env values are never logged.\n   */\n  verbose?: boolean;\n}\n\n/** Structural constructor type satisfied by native WebSocket and the `ws` package. */\nexport type WebSocketConstructor = new (\n  url: string,\n  protocols?: string | string[],\n) => unknown;\n\nexport interface NormalizedRailwayClientConfig {\n  token: string;\n  authType: RailwayAuthType;\n  endpoint: string;\n  fetch: typeof fetch;\n  webSocketImpl?: WebSocketConstructor | undefined;\n  tcpProxyWsEndpoint: string;\n  log: Logger;\n}\n\n/**\n * Resolves credentials and transport with explicit values winning over\n * environment variables. Reading from env keeps the happy path config-free;\n * passing an explicit value lets callers source it from any variable they like.\n */\nexport function normalizeRailwayClientConfig(\n  config: RailwayClientConfig = {},\n): NormalizedRailwayClientConfig {\n  const token = firstNonEmpty(config.token, readEnv(RAILWAY_TOKEN_ENV));\n  if (!token) throw new RailwayAuthError(RAILWAY_TOKEN_ENV);\n\n  const fetchImpl = config.fetch ?? globalThis.fetch;\n  if (!fetchImpl) {\n    throw new Error(\"No fetch implementation found. Pass `fetch` in the config.\");\n  }\n\n  const endpoint =\n    firstNonEmpty(\n      config.endpoint,\n      config.graphqlEndpoint,\n      readEnv(RAILWAY_ENDPOINT_ENV),\n    ) ?? DEFAULT_RAILWAY_GRAPHQL_ENDPOINT;\n\n  const tcpProxyWsEndpoint =\n    firstNonEmpty(config.tcpProxyWsEndpoint, readEnv(RAILWAY_TCP_PROXY_WS_ENV)) ??\n    deriveTcpProxyWsEndpoint(endpoint);\n\n  const verbose = config.verbose ?? isTruthyEnv(readEnv(RAILWAY_VERBOSE_ENV));\n  const normalized: NormalizedRailwayClientConfig = {\n    token,\n    authType: config.authType ?? \"bearer\",\n    endpoint,\n    fetch: fetchImpl,\n    webSocketImpl: config.webSocketImpl,\n    tcpProxyWsEndpoint,\n    log: createLogger(verbose),\n  };\n  normalized.log(\n    `config resolved: endpoint=${endpoint} authType=${normalized.authType}`,\n  );\n  return normalized;\n}\n\n/**\n * Derives the tcp-proxy exec WebSocket endpoint from the GraphQL endpoint:\n * the host's leading `backboard.` label becomes `ssh.` (or `ssh.` is\n * prepended), scheme `wss`, port 2226, path `/ws/exec`. e.g.\n * `https://backboard.railway.com/graphql/v2` → `wss://ssh.railway.com:2226/ws/exec`.\n */\nexport function deriveTcpProxyWsEndpoint(endpoint: string): string {\n  const url = new URL(endpoint);\n  const host = url.hostname.startsWith(\"backboard.\")\n    ? `ssh.${url.hostname.slice(\"backboard.\".length)}`\n    : `ssh.${url.hostname}`;\n  return `wss://${host}:${TCP_PROXY_WS_PORT}${TCP_PROXY_WS_PATH}`;\n}\n\nexport function resolveWebSocketImpl(\n  config: NormalizedRailwayClientConfig,\n): WebSocketConstructor {\n  const impl =\n    config.webSocketImpl ??\n    (globalThis as { WebSocket?: WebSocketConstructor }).WebSocket;\n  if (!impl) {\n    throw new RailwayConnectionError({\n      message:\n        \"No WebSocket implementation found. Pass `webSocketImpl` in the config \" +\n        \"(e.g. the `ws` package) to stream exec output.\",\n    });\n  }\n  return impl;\n}\n\nexport function resolveEnvironmentId(explicit?: string): string {\n  const environmentId = firstNonEmpty(\n    explicit,\n    readEnv(RAILWAY_ENVIRONMENT_ENV),\n  );\n  if (!environmentId) throw new RailwayAuthError(RAILWAY_ENVIRONMENT_ENV);\n  return environmentId;\n}\n\n/**\n * Reads an environment variable without assuming a Node runtime, so the SDK is\n * safe to import in browsers, Deno, and edge runtimes where `process` is absent.\n */\nfunction readEnv(name: string): string | undefined {\n  if (typeof process === \"undefined\") return undefined;\n  return process.env?.[name];\n}\n\n/** Treats `1`/`true`/`yes` as on so `RAILWAY_VERBOSE=0` doesn't accidentally enable. */\nfunction isTruthyEnv(value: string | undefined): boolean {\n  if (value === undefined) return false;\n  const normalized = value.trim().toLowerCase();\n  return normalized === \"1\" || normalized === \"true\" || normalized === \"yes\";\n}\n\nfunction firstNonEmpty(...values: (string | undefined)[]): string | undefined {\n  for (const value of values) {\n    if (value !== undefined && value.trim().length > 0) return value;\n  }\n  return undefined;\n}\n","// Injected by tsup at build time from package.json; falls back when running\n// unbundled (vitest/tsx).\ndeclare const __RAILWAY_SDK_VERSION__: string | undefined;\n\nconst SDK_VERSION =\n  typeof __RAILWAY_SDK_VERSION__ !== \"undefined\"\n    ? __RAILWAY_SDK_VERSION__\n    : \"0.0.0-dev\";\n\nexport const USER_AGENT = `railway-ts-sdk/${SDK_VERSION}`;\n","import type { TypedDocumentNode } from \"@graphql-typed-document-node/core\";\nimport { Kind, print, type DocumentNode } from \"graphql\";\n\nimport type { NormalizedRailwayClientConfig } from \"./config.js\";\nimport {\n  RailwayGraphQLError,\n  type RailwayGraphQLErrorItem,\n} from \"./errors.js\";\nimport { USER_AGENT } from \"./version.js\";\n\ninterface GraphQLResponse<TResult> {\n  data?: TResult;\n  errors?: RailwayGraphQLErrorItem[];\n}\n\nexport async function requestGraphQL<TResult, TVariables>(\n  config: NormalizedRailwayClientConfig,\n  document: TypedDocumentNode<TResult, TVariables>,\n  variables: TVariables,\n): Promise<TResult> {\n  const operation = operationName(document as DocumentNode);\n  const start = Date.now();\n  config.log(`→ ${operation} POST ${config.endpoint}`);\n\n  const response = await config.fetch(config.endpoint, {\n    method: \"POST\",\n    headers: {\n      Accept: \"application/json\",\n      ...authHeader(config),\n      \"Content-Type\": \"application/json\",\n      \"User-Agent\": USER_AGENT,\n    },\n    body: JSON.stringify({\n      query: print(document as DocumentNode),\n      variables,\n    }),\n  });\n\n  const body = await parseGraphQLResponse<TResult>(response);\n  const errors = body?.errors ?? [];\n  const elapsed = Date.now() - start;\n\n  if (!response.ok || errors.length > 0) {\n    config.log(\n      `← ${operation} failed http=${response.status} errors=${errors.length} in ${elapsed}ms`,\n    );\n    throw new RailwayGraphQLError({\n      message:\n        errors[0]?.message ??\n        `Railway GraphQL request failed with HTTP ${response.status}.`,\n      status: response.status,\n      errors,\n      responseBody: body,\n    });\n  }\n\n  if (!body?.data) {\n    config.log(`← ${operation} returned no data`);\n    throw new RailwayGraphQLError({\n      message: \"Railway GraphQL response did not include data.\",\n      status: response.status,\n      responseBody: body,\n    });\n  }\n\n  config.log(`← ${operation} ok in ${elapsed}ms`);\n  return body.data;\n}\n\nfunction operationName(document: DocumentNode): string {\n  for (const definition of document.definitions) {\n    if (definition.kind === Kind.OPERATION_DEFINITION) {\n      return definition.name?.value ?? \"anonymous\";\n    }\n  }\n  return \"operation\";\n}\n\nfunction authHeader(config: NormalizedRailwayClientConfig): Record<string, string> {\n  if (config.authType === \"project-token\") return { \"project-access-token\": config.token };\n  return { Authorization: `Bearer ${config.token}` };\n}\n\nasync function parseGraphQLResponse<TResult>(\n  response: Response,\n): Promise<GraphQLResponse<TResult> | undefined> {\n  try {\n    return (await response.json()) as GraphQLResponse<TResult>;\n  } catch {\n    return undefined;\n  }\n}\n","import { parse } from \"graphql\";\nimport type { TypedDocumentNode } from \"@graphql-typed-document-node/core\";\nimport { normalizeRailwayClientConfig, type RailwayClientConfig, type NormalizedRailwayClientConfig } from \"../core/config.js\";\nimport { requestGraphQL } from \"../core/graphql-client.js\";\nimport type {\n  BucketCreateInput,\n  ServiceCreateInput,\n  VolumeCreateInput,\n} from \"../generated/graphql.js\";\nimport type { RailwayChangeSet } from \"./change-set.js\";\nimport type { RailwayGraph, ResourceNode } from \"./graph.js\";\nimport type { EnvironmentConfig } from \"./schema.js\";\n\nexport interface CurrentEnvironmentResult {\n  projectId?: string | undefined;\n  projectName?: string | undefined;\n  environmentId: string;\n  environmentName?: string | undefined;\n  config: EnvironmentConfig;\n  serviceNamesById: Record<string, string>;\n  bucketNamesById: Record<string, string>;\n  customDomainsByServiceId: Record<string, Record<string, { port?: number }>>;\n}\n\nexport interface StagedPatchResult {\n  id: string;\n  status: string;\n  patch: EnvironmentConfig;\n  meta?: unknown;\n}\n\nexport interface ChangeOperationResult {\n  kind: string;\n  path?: string | null;\n  summary?: string | null;\n  status: string;\n  outputs?: unknown;\n}\n\nexport interface ChangeSetPreviewResult {\n  changeSet: RailwayChangeSet;\n  diagnostics: unknown[];\n  effects: unknown[];\n}\n\nexport interface ChangeSetApplyResult {\n  id: string;\n  status: string;\n  changes: ChangeOperationResult[];\n  diagnostics: unknown[];\n  deploymentId?: string | null;\n  stagedPatchId?: string | null;\n}\n\nexport interface ProjectService { id: string; name: string }\nexport interface ProjectVolume { id: string; name?: string | null; serviceId?: string | null }\nexport interface ProjectBucket { id: string; name: string }\n\nexport interface EnsuredGraphResources {\n  serviceIdsByName: Record<string, string>;\n  volumeIdsByServiceName: Record<string, string>;\n  bucketIdsByName: Record<string, string>;\n}\n\nexport class IacClient {\n  readonly #config: NormalizedRailwayClientConfig;\n\n  constructor(config: RailwayClientConfig) {\n    this.#config = normalizeRailwayClientConfig(config);\n  }\n\n  async getCurrentEnvironment(environmentId: string, options: { decryptVariables?: boolean } = {}): Promise<CurrentEnvironmentResult> {\n    const data = await gql<{\n      environment: { id: string; name?: string; projectId?: string; config: EnvironmentConfig };\n    }, { environmentId: string; decryptVariables: boolean }>(this.#config, `query IacEnvironmentConfig($environmentId: String!, $decryptVariables: Boolean) {\n      environment(id: $environmentId) { id name projectId config(decryptVariables: $decryptVariables) }\n    }`, { environmentId, decryptVariables: options.decryptVariables ?? false });\n\n    const projectName = data.environment.projectId ? await this.getProjectName(data.environment.projectId) : undefined;\n    const services = data.environment.projectId ? await this.getProjectServices(data.environment.projectId) : [];\n    const buckets = data.environment.projectId ? await this.getProjectBuckets(data.environment.projectId) : [];\n    const customDomainsByServiceId = data.environment.projectId ? await this.getEnvironmentCustomDomains(data.environment.projectId, environmentId, services) : {};\n    return {\n      projectId: data.environment.projectId,\n      projectName,\n      environmentId: data.environment.id,\n      environmentName: data.environment.name,\n      config: data.environment.config ?? {},\n      serviceNamesById: Object.fromEntries(services.map(service => [service.id, service.name])),\n      bucketNamesById: Object.fromEntries(buckets.map(bucket => [bucket.id, bucket.name])),\n      customDomainsByServiceId,\n    };\n  }\n\n  async getStagedPatch(environmentId: string, options: { decryptVariables?: boolean } = {}): Promise<StagedPatchResult> {\n    const data = await gql<{ environmentStagedChanges: StagedPatchResult }, { environmentId: string; decryptVariables: boolean }>(this.#config, `query IacStagedPatch($environmentId: String!, $decryptVariables: Boolean) {\n      environmentStagedChanges(environmentId: $environmentId) { id status patch(decryptVariables: $decryptVariables) meta }\n    }`, { environmentId, decryptVariables: options.decryptVariables ?? false });\n    return data.environmentStagedChanges;\n  }\n\n  async getProjectName(projectId: string): Promise<string | undefined> {\n    const data = await gql<{ project: { name?: string | null } }, { projectId: string }>(this.#config, `query IacProjectName($projectId: String!) {\n      project(id: $projectId) { name }\n    }`, { projectId });\n    return data.project.name ?? undefined;\n  }\n\n  async getProjectServices(projectId: string): Promise<ProjectService[]> {\n    const data = await gql<{ project: { services: { edges: Array<{ node: ProjectService }> } } }, { projectId: string }>(this.#config, `query IacProjectServices($projectId: String!) {\n      project(id: $projectId) { services(first: 1000) { edges { node { id name } } } }\n    }`, { projectId });\n    return data.project.services.edges.map(edge => edge.node);\n  }\n\n  async getProjectBuckets(projectId: string): Promise<ProjectBucket[]> {\n    const data = await gql<{ project: { buckets: { edges: Array<{ node: ProjectBucket }> } } }, { projectId: string }>(this.#config, `query IacProjectBuckets($projectId: String!) {\n      project(id: $projectId) { buckets(first: 1000) { edges { node { id name } } } }\n    }`, { projectId });\n    return data.project.buckets.edges.map(edge => edge.node);\n  }\n\n  async getEnvironmentCustomDomains(projectId: string, environmentId: string, services: ProjectService[]): Promise<Record<string, Record<string, { port?: number }>>> {\n    const entries = await Promise.all(services.map(async service => {\n      const data = await gql<{ domains: { customDomains: Array<{ domain: string; targetPort?: number | null }> } }, { projectId: string; environmentId: string; serviceId: string }>(this.#config, `query IacServiceDomains($projectId: String!, $environmentId: String!, $serviceId: String!) {\n        domains(projectId: $projectId, environmentId: $environmentId, serviceId: $serviceId) { customDomains { domain targetPort } }\n      }`, { projectId, environmentId, serviceId: service.id }).catch(() => ({ domains: { customDomains: [] } }));\n      return [service.id, Object.fromEntries(data.domains.customDomains.map(domain => [domain.domain, domain.targetPort == null ? {} : { port: domain.targetPort }]))] as const;\n    }));\n    return Object.fromEntries(entries.filter(([, domains]) => Object.keys(domains).length > 0));\n  }\n\n  async ensureGraphResources({ projectId, environmentId, graph, currentConfig }: {\n    projectId: string;\n    environmentId: string;\n    graph: RailwayGraph;\n    currentConfig?: EnvironmentConfig;\n  }): Promise<EnsuredGraphResources> {\n    const existing = await this.getProjectServices(projectId);\n    const serviceIdsByName = Object.fromEntries(existing.map(service => [service.name, service.id]));\n    const volumeIdsByServiceName = extractVolumeIdsByServiceName({ ...(currentConfig ? { currentConfig } : {}), serviceIdsByName });\n\n    for (const resource of graph.resources) {\n      if (resource.type !== \"service\" && resource.type !== \"database\") continue;\n      if (!serviceIdsByName[resource.name]) {\n        const service = await this.createServiceForResource({ projectId, environmentId, resource });\n        serviceIdsByName[resource.name] = service.id;\n      }\n      if (resource.type === \"database\" && resource.defaultMountPath && !volumeIdsByServiceName[resource.name]) {\n        const volume = await this.createVolumeForService({ projectId, environmentId, serviceId: serviceIdsByName[resource.name]! });\n        volumeIdsByServiceName[resource.name] = volume.id;\n      }\n    }\n\n    const bucketIdsByName = await this.ensureGraphBuckets({ projectId, graph });\n    return { serviceIdsByName, volumeIdsByServiceName, bucketIdsByName };\n  }\n\n  async stageEnvironmentChanges({ environmentId, patch, merge = true }: { environmentId: string; patch: EnvironmentConfig; merge?: boolean }): Promise<{ id: string }> {\n    const data = await gql<{ environmentStageChanges: { id: string } }, { environmentId: string; payload: EnvironmentConfig; merge: boolean }>(this.#config, `mutation IacStageEnvironmentChanges($environmentId: String!, $payload: EnvironmentConfig!, $merge: Boolean) {\n      environmentStageChanges(environmentId: $environmentId, input: $payload, merge: $merge) { id }\n    }`, { environmentId, payload: patch, merge });\n    return data.environmentStageChanges;\n  }\n\n  async previewChangeSet({ environmentId, changeSet }: { environmentId: string; changeSet: RailwayChangeSet }): Promise<ChangeSetPreviewResult> {\n    const data = await gql<{ environmentPreviewChangeSet: ChangeSetPreviewResult }, { environmentId: string; input: RailwayChangeSet }>(this.#config, `mutation IacPreviewChangeSet($environmentId: String!, $input: JSON!) {\n      environmentPreviewChangeSet(environmentId: $environmentId, input: $input) { changeSet diagnostics effects }\n    }`, { environmentId, input: changeSet });\n    return data.environmentPreviewChangeSet;\n  }\n\n  async applyChangeSet({ environmentId, changeSet, commitMessage }: { environmentId: string; changeSet: RailwayChangeSet; commitMessage?: string }): Promise<ChangeSetApplyResult> {\n    const variables: { environmentId: string; input: RailwayChangeSet; commitMessage?: string } = { environmentId, input: changeSet };\n    if (commitMessage !== undefined) variables.commitMessage = commitMessage;\n    const data = await gql<{ environmentApplyChangeSet: ChangeSetApplyResult }, typeof variables>(this.#config, `mutation IacApplyChangeSet($environmentId: String!, $input: JSON!, $commitMessage: String) {\n      environmentApplyChangeSet(environmentId: $environmentId, input: $input, commitMessage: $commitMessage) { id status deploymentId stagedPatchId diagnostics changes { kind path summary status outputs } }\n    }`, variables);\n    return data.environmentApplyChangeSet;\n  }\n\n  async commitStagedPatch({ environmentId, message, skipDeploys }: { environmentId: string; message?: string; skipDeploys?: boolean }): Promise<string> {\n    const variables: { environmentId: string; message?: string; skipDeploys?: boolean } = { environmentId };\n    if (message !== undefined) variables.message = message;\n    if (skipDeploys !== undefined) variables.skipDeploys = skipDeploys;\n    const data = await gql<{ environmentPatchCommitStaged: string }, { environmentId: string; message?: string; skipDeploys?: boolean }>(this.#config, `mutation IacCommitStagedPatch($environmentId: String!, $message: String, $skipDeploys: Boolean) {\n      environmentPatchCommitStaged(environmentId: $environmentId, commitMessage: $message, skipDeploys: $skipDeploys)\n    }`, variables);\n    return data.environmentPatchCommitStaged;\n  }\n\n  private async ensureGraphBuckets({ projectId, graph }: { projectId: string; graph: RailwayGraph }): Promise<Record<string, string>> {\n    const existing = await this.getProjectBuckets(projectId);\n    const idsByName = Object.fromEntries(existing.map(bucket => [bucket.name, bucket.id]));\n    for (const resource of graph.resources) {\n      if (resource.type !== \"bucket\" || idsByName[resource.name]) continue;\n      const bucket = await this.createBucketForResource({ projectId, name: resource.name });\n      idsByName[resource.name] = bucket.id;\n    }\n    return idsByName;\n  }\n\n  private async createBucketForResource({ projectId, name }: { projectId: string; name?: string }): Promise<ProjectBucket> {\n    const input: BucketCreateInput = { projectId, environmentId: null };\n    if (name !== undefined) input.name = name;\n    const data = await gql<{ bucketCreate: ProjectBucket }, { input: BucketCreateInput }>(this.#config, `mutation IacBucketCreate($input: BucketCreateInput!) {\n      bucketCreate(input: $input) { id name }\n    }`, { input });\n    return data.bucketCreate;\n  }\n\n  private async createVolumeForService({ projectId, serviceId }: { projectId: string; environmentId: string; serviceId: string }): Promise<ProjectVolume> {\n    const input: VolumeCreateInput = { projectId, environmentId: null, serviceId, mountPath: \"/var/lib/postgresql/data\" };\n    const data = await gql<{ volumeCreate: ProjectVolume }, { input: VolumeCreateInput }>(this.#config, `mutation IacVolumeCreate($input: VolumeCreateInput!) {\n      volumeCreate(input: $input) { id name }\n    }`, { input });\n    return data.volumeCreate;\n  }\n\n  private async createServiceForResource({ projectId, resource }: { projectId: string; environmentId: string; resource: Extract<ResourceNode, { type: \"service\" | \"database\" }> }): Promise<ProjectService> {\n    const source = resource.type === \"database\"\n      ? { image: resource.image }\n      : resource.source?.type === \"image\" && resource.source.image\n        ? { image: resource.source.image }\n        : resource.source?.type === \"github\" && resource.source.repo\n          ? { repo: resource.source.repo }\n          : undefined;\n    const input: ServiceCreateInput = {\n      name: resource.name,\n      projectId,\n      environmentId: null,\n    };\n    if (source) (input as { source?: ServiceCreateInput[\"source\"] }).source = source as ServiceCreateInput[\"source\"];\n    if (resource.type === \"service\" && resource.source?.type === \"github\" && resource.source.branch) {\n      input.branch = resource.source.branch;\n    }\n    const data = await gql<{ serviceCreate: ProjectService }, { input: ServiceCreateInput }>(this.#config, `mutation IacServiceCreate($input: ServiceCreateInput!) {\n      serviceCreate(input: $input) { id name }\n    }`, { input });\n    return data.serviceCreate;\n  }\n}\n\nasync function gql<TResult, TVariables>(config: NormalizedRailwayClientConfig, source: string, variables: TVariables): Promise<TResult> {\n  return requestGraphQL(config, parse(source) as TypedDocumentNode<TResult, TVariables>, variables);\n}\n\nfunction extractVolumeIdsByServiceName({ currentConfig, serviceIdsByName }: { currentConfig?: EnvironmentConfig; serviceIdsByName: Record<string, string> }): Record<string, string> {\n  const volumeIdsByServiceName: Record<string, string> = {};\n  for (const [serviceName, serviceId] of Object.entries(serviceIdsByName)) {\n    const volumeId = Object.keys(currentConfig?.services?.[serviceId]?.volumeMounts ?? {})[0];\n    if (volumeId) volumeIdsByServiceName[serviceName] = volumeId;\n  }\n  return volumeIdsByServiceName;\n}\n","import type { EnvironmentConfig } from \"./schema.js\";\n\nexport function renderPatchDiff({\n  currentConfig,\n  patch,\n  title = \"Railway patch\",\n}: {\n  currentConfig: EnvironmentConfig;\n  patch: EnvironmentConfig;\n  title?: string;\n}): string {\n  const lines: string[] = [];\n  const changes = flattenChanges(currentConfig, patch);\n  lines.push(title);\n  lines.push(\"\".padEnd(title.length, \"─\"));\n  lines.push(\"\");\n  if (changes.length === 0) {\n    lines.push(\"No changes.\");\n    return lines.join(\"\\n\");\n  }\n  for (const change of changes) lines.push(formatChange(change));\n  lines.push(\"\");\n  lines.push(`${changes.length} raw change${changes.length === 1 ? \"\" : \"s\"}.`);\n  return lines.join(\"\\n\").trimEnd();\n}\n\nexport function numChangesInEnvironmentConfig(config: EnvironmentConfig): number {\n  return Object.keys(flatten(config)).length;\n}\n\ntype FlatChange = { type: \"added\" | \"removed\" | \"changed\"; path: string; previous?: unknown; next?: unknown };\n\nfunction flattenChanges(currentConfig: EnvironmentConfig, patch: EnvironmentConfig): FlatChange[] {\n  const current = flatten(currentConfig);\n  const next = flatten(patch);\n  return Object.entries(next).map(([path, value]) => {\n    if (value === null || path.endsWith(\".isDeleted\")) return { type: \"removed\", path, previous: current[path] };\n    if (current[path] == null) return { type: \"added\", path, next: value };\n    return { type: \"changed\", path, previous: current[path], next: value };\n  });\n}\n\nfunction flatten(value: unknown, prefix = \"\"): Record<string, unknown> {\n  if (value == null || typeof value !== \"object\" || Array.isArray(value)) return prefix ? { [prefix]: value } : {};\n  const entries = Object.entries(value as Record<string, unknown>);\n  if (entries.length === 0) return prefix ? { [prefix]: {} } : {};\n  return Object.fromEntries(entries.flatMap(([key, child]) => Object.entries(flatten(child, prefix ? `${prefix}.${key}` : key))));\n}\n\nfunction formatChange(change: FlatChange): string {\n  const prefix = change.type === \"added\" ? green(\"+\") : change.type === \"removed\" ? red(\"-\") : amber(\"~\");\n  if (change.type === \"added\") return `  ${prefix} ${change.path}: ${format(change.next)}`;\n  if (change.type === \"removed\") return `  ${prefix} ${change.path}: ${format(change.previous)}`;\n  return `  ${prefix} ${change.path}: ${format(change.previous)} -> ${format(change.next)}`;\n}\n\nfunction format(value: unknown) {\n  return typeof value === \"string\" ? value : JSON.stringify(value);\n}\n\nfunction green(text: string) { return color(text, \"32\"); }\nfunction red(text: string) { return color(text, \"31\"); }\nfunction amber(text: string) { return color(text, \"33\"); }\nfunction color(text: string, code: string) {\n  if (process.env.NO_COLOR) return text;\n  return `\\u001b[${code}m${text}\\u001b[0m`;\n}\n","import { createHash } from \"node:crypto\";\nimport { resourceAddress } from \"./graph.js\";\nimport type {\n  BucketNode,\n  DatabaseNode,\n  GroupNode,\n  ProjectDefinition,\n  ProjectResourceInput,\n  ResourceNode,\n  ServiceNode,\n  SourceConfig,\n  VariableValue,\n  VolumeNode,\n} from \"./graph.js\";\nimport type {\n  BucketConfig,\n  BuildConfig,\n  DeployConfig,\n  ServiceConfig,\n  ServiceNetworking,\n  VariableConfig,\n  VolumeConfig,\n  VolumeMount,\n} from \"./schema.js\";\n\nexport interface RailwayContextInput {\n  command?: string;\n  projectId?: string;\n  projectName?: string;\n  environmentId?: string;\n  environment?: string;\n  environmentName?: string;\n}\n\nexport interface RailwayContext extends RailwayContextInput {\n  randomString: (label?: string, bytes?: number) => string;\n  isEnvironment: (name: string) => boolean;\n}\n\nexport type RailwayProgram = (\n  ctx: RailwayContext,\n  project: (name: string, definition: Omit<ProjectDefinition, \"name\">) => ProjectDefinition,\n) => ProjectDefinition | Promise<ProjectDefinition>;\n\nexport function defineRailway(program: RailwayProgram): RailwayProgram {\n  return program;\n}\n\nexport const define = defineRailway;\n\nexport function project(name: string, definition: Omit<ProjectDefinition, \"name\">): ProjectDefinition {\n  const resources = (definition.resources ?? definition.services ?? []).flat();\n  return { name, ...definition, resources };\n}\n\nexport function createRailwayContext(input: RailwayContextInput = {}): RailwayContext {\n  const environment = input.environment ?? input.environmentName;\n  return {\n    ...input,\n    ...(environment ? { environment, environmentName: environment } : {}),\n    randomString: (label = \"random\", bytes = 12) =>\n      createHash(\"sha256\").update(`railway-iac:${environment ?? \"default\"}:${label}`).digest(\"hex\").slice(0, bytes * 2),\n    isEnvironment: (name: string) => environment === name,\n  };\n}\n\nexport type RegionConfig = number | { count?: number; replicas?: number; stacker?: string | null };\n\nexport interface IntentServiceConfig {\n  source?: SourceConfig | Omit<SourceConfig, \"type\">;\n  root?: string;\n  rootDirectory?: string;\n  build?: string | BuildConfig;\n  deploy?: DeployConfig;\n  run?: { command?: string; preDeploy?: string | string[]; healthcheck?: string; healthcheckTimeout?: number };\n  start?: string;\n  startCommand?: string;\n  preDeploy?: string | string[];\n  preDeployCommand?: string | string[];\n  healthcheck?: string;\n  healthcheckPath?: string;\n  healthcheckTimeout?: number;\n  replicas?: number | Record<string, RegionConfig>;\n  regions?: Record<string, RegionConfig>;\n  networking?: ServiceNetworking;\n  domains?: Array<string | { domain: string; port?: number }>;\n  tcp?: Array<string | number>;\n  tcpProxies?: string[];\n  env?: Record<string, string | VariableConfig | VariableValue>;\n  variables?: Record<string, string | VariableConfig | VariableValue>;\n  volumeMounts?: Record<string, VolumeMount | null>;\n  configFile?: string;\n  parentServiceId?: string;\n  groupId?: string;\n  clusterRole?: ServiceConfig[\"clusterRole\"];\n  replicaConfig?: ServiceConfig[\"replicaConfig\"];\n  clusterDisplay?: ServiceConfig[\"clusterDisplay\"];\n}\n\nexport type ServiceConfigInput = IntentServiceConfig;\n\nexport type RailwayProvidedVariable =\n  | \"RAILWAY_PUBLIC_DOMAIN\"\n  | \"RAILWAY_PRIVATE_DOMAIN\"\n  | \"RAILWAY_TCP_PROXY_DOMAIN\"\n  | \"RAILWAY_TCP_PROXY_PORT\"\n  | \"RAILWAY_DEPLOYMENT_ID\"\n  | \"RAILWAY_DEPLOYMENT_DRAINING_SECONDS\"\n  | \"RAILWAY_ENVIRONMENT\"\n  | \"RAILWAY_ENVIRONMENT_ID\"\n  | \"RAILWAY_PROJECT_ID\"\n  | \"RAILWAY_PROJECT_NAME\"\n  | \"RAILWAY_SERVICE_ID\"\n  | \"RAILWAY_SERVICE_NAME\"\n  | \"RAILWAY_REPLICA_ID\"\n  | \"PORT\";\n\nexport type PostgresVariable = RailwayProvidedVariable | \"DATABASE_PUBLIC_URL\" | \"DATABASE_URL\" | \"PGDATA\" | \"PGDATABASE\" | \"PGHOST\" | \"PGPASSWORD\" | \"PGPORT\" | \"PGUSER\" | \"POSTGRES_DB\" | \"POSTGRES_PASSWORD\" | \"POSTGRES_USER\" | \"SSL_CERT_DAYS\";\nexport type RedisVariable = RailwayProvidedVariable | \"REDIS_PASSWORD\" | \"REDIS_PUBLIC_URL\" | \"REDIS_URL\" | \"REDISHOST\" | \"REDISPASSWORD\" | \"REDISPORT\" | \"REDISUSER\";\nexport type MongoVariable = RailwayProvidedVariable | \"MONGO_INITDB_ROOT_PASSWORD\" | \"MONGO_INITDB_ROOT_USERNAME\" | \"MONGO_PUBLIC_URL\" | \"MONGO_URL\" | \"MONGOHOST\" | \"MONGOPASSWORD\" | \"MONGOPORT\" | \"MONGOUSER\";\nexport type MySqlVariable = RailwayProvidedVariable | \"MYSQL_DATABASE\" | \"MYSQL_PUBLIC_URL\" | \"MYSQL_ROOT_PASSWORD\" | \"MYSQL_URL\" | \"MYSQLDATABASE\" | \"MYSQLHOST\" | \"MYSQLPASSWORD\" | \"MYSQLPORT\" | \"MYSQLUSER\";\nexport type DatabaseVariable<E extends DatabaseNode[\"engine\"]> = E extends \"postgres\" ? PostgresVariable : E extends \"redis\" ? RedisVariable : E extends \"mongo\" ? MongoVariable : E extends \"mysql\" ? MySqlVariable : RailwayProvidedVariable | string;\nexport type ServiceVariableRef<K extends string = RailwayProvidedVariable | string> = { readonly [P in K]: VariableValue };\nexport type ReferencableServiceNode<K extends string = RailwayProvidedVariable | string> = ServiceNode & { readonly env: ServiceVariableRef<K> };\nexport type ReferencableDatabaseNode<E extends DatabaseNode[\"engine\"]> = DatabaseNode & { readonly env: ServiceVariableRef<DatabaseVariable<E>> };\n\nexport function github(repo: string, options: Omit<SourceConfig, \"type\" | \"repo\" | \"image\"> = {}): SourceConfig {\n  return { type: \"github\", repo, branch: options.branch ?? \"main\", ...options };\n}\n\nexport function image(imageName: string, options: Pick<SourceConfig, \"rootDirectory\" | \"autoUpdates\"> = {}): SourceConfig {\n  return { type: \"image\", image: imageName, ...options };\n}\n\nexport function template(templateName: string, options: Omit<SourceConfig, \"type\" | \"template\"> = {}): SourceConfig {\n  return { type: \"template\", template: templateName, ...options };\n}\n\nexport function empty(): SourceConfig {\n  return { type: \"empty\" };\n}\n\nexport function service<const Env extends Record<string, string | VariableConfig | VariableValue> = {}>(name: string, config: Omit<ServiceConfigInput, \"env\" | \"variables\"> & { env?: Env; variables?: Env } = {}): ReferencableServiceNode<RailwayProvidedVariable | Extract<keyof Env, string>> {\n  const source = normalizeSource(config.source, config.root ?? config.rootDirectory);\n  const node = pruneEmpty({\n    address: resourceAddress(\"service\", name) as `service.${string}`,\n    type: \"service\",\n    kind: source?.type === \"github\" ? \"github\" : source?.type === \"image\" ? \"docker-image\" : source?.type === \"template\" ? \"template\" : \"empty\",\n    name,\n    ...(source ? { source } : {}),\n    build: normalizeBuild(config),\n    deploy: normalizeDeploy(config),\n    networking: normalizeNetworking(config),\n    ...(config.env || config.variables ? { variables: normalizeVariables({ ...(config.variables ?? {}), ...(config.env ?? {}) }) } : {}),\n    ...(config.volumeMounts ? { volumeMounts: config.volumeMounts } : {}),\n    ...(config.configFile ? { configFile: config.configFile } : {}),\n    ...(config.parentServiceId ? { parentServiceId: config.parentServiceId } : {}),\n    ...(config.groupId ? { groupId: config.groupId } : {}),\n    ...(config.clusterRole ? { clusterRole: config.clusterRole } : {}),\n    ...(config.replicaConfig ? { replicaConfig: config.replicaConfig } : {}),\n    ...(config.clusterDisplay ? { clusterDisplay: config.clusterDisplay } : {}),\n  }) as ServiceNode;\n  return withVariableRefs(node) as ReferencableServiceNode<RailwayProvidedVariable | Extract<keyof Env, string>>;\n}\n\nexport function fn<const Env extends Record<string, string | VariableConfig | VariableValue> = {}>(name: string, config: Omit<ServiceConfigInput, \"env\" | \"variables\"> & { env?: Env; variables?: Env } = {}): ReferencableServiceNode<RailwayProvidedVariable | Extract<keyof Env, string>> {\n  return withVariableRefs({ ...service(name, config), kind: \"function\" } as ServiceNode) as ReferencableServiceNode<RailwayProvidedVariable | Extract<keyof Env, string>>;\n}\n\nexport interface DatabaseConfig {\n  region?: string;\n}\n\nexport function postgres(name: string, config: DatabaseConfig = {}): ReferencableDatabaseNode<\"postgres\"> {\n  return database(name, \"postgres\", {\n    image: \"ghcr.io/railwayapp-templates/postgres-ssl:18\",\n    output: \"DATABASE_URL\",\n    defaultMountPath: \"/var/lib/postgresql/data\",\n    ...config,\n  });\n}\n\nexport function mysql(name: string, config: DatabaseConfig = {}): ReferencableDatabaseNode<\"mysql\"> {\n  return database(name, \"mysql\", { image: \"mysql:9\", output: \"MYSQL_URL\", defaultMountPath: \"/var/lib/mysql\", ...config });\n}\n\nexport function redis(name: string, config: DatabaseConfig = {}): ReferencableDatabaseNode<\"redis\"> {\n  return database(name, \"redis\", { image: \"railwayapp/redis:8.2\", output: \"REDIS_URL\", defaultMountPath: \"/bitnami\", ...config });\n}\n\nexport function mongo(name: string, config: DatabaseConfig = {}): ReferencableDatabaseNode<\"mongo\"> {\n  return database(name, \"mongo\", { image: \"mongo:8\", output: \"MONGO_URL\", defaultMountPath: \"/data/db\", ...config });\n}\n\nexport function database<E extends DatabaseNode[\"engine\"]>(\n  name: string,\n  engine: E,\n  options: { image: string; output?: string; defaultMountPath?: string; region?: string },\n): ReferencableDatabaseNode<E> {\n  const output = options.output ?? \"DATABASE_URL\";\n  const node = {\n    address: resourceAddress(\"database\", name) as `database.${string}`,\n    type: \"database\",\n    kind: \"database\",\n    engine,\n    name,\n    image: options.image,\n    output,\n    defaultMountPath: options.defaultMountPath,\n    source: image(options.image),\n    ...(options.region ? { deploy: { multiRegionConfig: { [options.region]: { numReplicas: 1 } } } } : {}),\n  } as DatabaseNode;\n  return withVariableRefs(node) as ReferencableDatabaseNode<E>;\n}\n\nexport function volume(name: string, config: VolumeConfig = {}): VolumeNode {\n  return { address: resourceAddress(\"volume\", name) as `volume.${string}`, type: \"volume\", name, config };\n}\n\nexport function bucket(name: string, config: BucketConfig = {}): BucketNode {\n  return { address: resourceAddress(\"bucket\", name) as `bucket.${string}`, type: \"bucket\", name, config };\n}\n\nexport function group(name: string, resources: ProjectResourceInput[], options?: Omit<GroupNode, \"address\" | \"type\" | \"name\">): ResourceNode[];\nexport function group(name: string, options?: Omit<GroupNode, \"address\" | \"type\" | \"name\">): GroupNode;\nexport function group(\n  name: string,\n  resourcesOrOptions: ProjectResourceInput[] | Omit<GroupNode, \"address\" | \"type\" | \"name\"> = {},\n  maybeOptions: Omit<GroupNode, \"address\" | \"type\" | \"name\"> = {},\n): GroupNode | ResourceNode[] {\n  const resources = Array.isArray(resourcesOrOptions) ? resourcesOrOptions.flat() : undefined;\n  const options = Array.isArray(resourcesOrOptions) ? maybeOptions : resourcesOrOptions;\n  const node: GroupNode = { address: resourceAddress(\"group\", name) as `group.${string}`, type: \"group\", name, ...options };\n  if (!resources) return node;\n  return [node, ...resources.map(resource => ({ ...resource, groupId: name }))];\n}\n\nexport function ref(resource: ResourceNode, output: string): VariableValue {\n  return variableReference(resource, output);\n}\n\nexport function preserve(): VariableValue {\n  return { type: \"preserve\" };\n}\n\nfunction variableReference(resource: ResourceNode, output: string): VariableValue {\n  return { type: \"reference\", resource: resource.address, output };\n}\n\nfunction createVariableRefAccessor(resource: ResourceNode): ServiceVariableRef<string> {\n  return new Proxy({} as ServiceVariableRef<string>, {\n    get(_target, property) {\n      if (typeof property !== \"string\") return undefined;\n      return variableReference(resource, property);\n    },\n  });\n}\n\nfunction withVariableRefs<T extends ServiceNode | DatabaseNode>(node: T): T {\n  Object.defineProperty(node, \"env\", { enumerable: false, value: createVariableRefAccessor(node) });\n  return node;\n}\n\nfunction normalizeSource(source: ServiceConfigInput[\"source\"], rootDirectory?: string): SourceConfig | undefined {\n  if (source == null) return rootDirectory ? { type: \"empty\", rootDirectory } : undefined;\n  if (\"type\" in source && source.type) return pruneEmpty({ ...source, rootDirectory: source.rootDirectory ?? rootDirectory }) as SourceConfig;\n  if (\"repo\" in source && source.repo) return pruneEmpty({ type: \"github\", repo: source.repo, branch: source.branch ?? \"main\", rootDirectory }) as SourceConfig;\n  if (\"image\" in source && source.image) return pruneEmpty({ type: \"image\", image: source.image, rootDirectory }) as SourceConfig;\n  return rootDirectory ? { type: \"empty\", rootDirectory } : undefined;\n}\n\nfunction normalizeBuild(config: ServiceConfigInput): BuildConfig | undefined {\n  if (typeof config.build === \"string\") return { buildCommand: config.build };\n  return pruneEmpty({ ...config.build });\n}\n\nfunction normalizeDeploy(config: ServiceConfigInput): DeployConfig | undefined {\n  const preDeployCommand = config.preDeploy ?? config.preDeployCommand ?? config.run?.preDeploy;\n  return pruneEmpty({\n    ...config.deploy,\n    startCommand: config.start ?? config.startCommand ?? config.run?.command ?? config.deploy?.startCommand,\n    preDeployCommand: Array.isArray(preDeployCommand) ? preDeployCommand : preDeployCommand ? [preDeployCommand] : config.deploy?.preDeployCommand,\n    healthcheckPath: config.healthcheck ?? config.healthcheckPath ?? config.run?.healthcheck ?? config.deploy?.healthcheckPath,\n    healthcheckTimeout: config.healthcheckTimeout ?? config.run?.healthcheckTimeout ?? config.deploy?.healthcheckTimeout,\n    multiRegionConfig: normalizeReplicas(config.replicas, config.regions) ?? config.deploy?.multiRegionConfig,\n  }) as DeployConfig | undefined;\n}\n\nfunction normalizeReplicas(replicas: ServiceConfigInput[\"replicas\"], regions: ServiceConfigInput[\"regions\"]): DeployConfig[\"multiRegionConfig\"] | undefined {\n  if (typeof replicas === \"number\") return normalizeRegions({ \"us-west2\": replicas });\n  if (replicas) return normalizeRegions(replicas);\n  if (regions) return normalizeRegions(regions);\n  return undefined;\n}\n\nfunction normalizeRegions(regions: Record<string, RegionConfig>): DeployConfig[\"multiRegionConfig\"] {\n  return Object.fromEntries(\n    Object.entries(regions).map(([region, value]) => [\n      region,\n      typeof value === \"number\"\n        ? { numReplicas: value }\n        : (pruneEmpty({ numReplicas: value.count ?? value.replicas, stackerAssignment: value.stacker }) ?? {}),\n    ]),\n  ) as DeployConfig[\"multiRegionConfig\"];\n}\n\nfunction normalizeNetworking(config: ServiceConfigInput): ServiceNetworking | undefined {\n  const customDomains = config.domains\n    ? Object.fromEntries(config.domains.map(domain => (typeof domain === \"string\" ? [domain, { port: 8080 }] : [domain.domain, { port: domain.port ?? 8080 }])))\n    : undefined;\n  const tcpProxies = config.tcp\n    ? Object.fromEntries(config.tcp.map(port => [String(port), {}]))\n    : config.tcpProxies\n      ? Object.fromEntries(config.tcpProxies.map(port => [port, {}]))\n      : undefined;\n  return pruneEmpty({ ...config.networking, customDomains, tcpProxies }) as ServiceNetworking | undefined;\n}\n\nfunction normalizeVariables(variables: Record<string, string | VariableConfig | VariableValue>): Record<string, VariableValue> {\n  return Object.fromEntries(\n    Object.entries(variables).map(([key, value]) => {\n      if (typeof value === \"string\") return [key, { type: \"literal\", value }];\n      if (\"type\" in value) return [key, value];\n      return [key, { type: \"raw\", value }];\n    }),\n  );\n}\n\nfunction pruneEmpty<T>(value: T): T | undefined {\n  if (value == null || typeof value !== \"object\") return value;\n  const entries = Object.entries(value).filter(([, child]) => child != null);\n  if (entries.length === 0) return undefined;\n  return Object.fromEntries(entries) as T;\n}\n","import path from \"node:path\";\nimport { pathToFileURL } from \"node:url\";\nimport { graphToEnvironmentConfig, projectDefinitionToGraph } from \"./compiler.js\";\nimport type { CompileResult, GraphCompileOptions, ProjectDefinition } from \"./graph.js\";\nimport { createRailwayContext, project as projectFactory, type RailwayContextInput, type RailwayProgram } from \"./sdk.js\";\n\nexport async function evaluateRailwayFile(filePath: string, options: GraphCompileOptions & { context?: RailwayContextInput } = {}): Promise<CompileResult> {\n  const absolutePath = path.resolve(filePath);\n  const mod = await importRailwayFile(absolutePath) as {\n    default?: RailwayProgram | ProjectDefinition;\n  };\n  const exported = (mod.default ?? mod) as RailwayProgram | ProjectDefinition;\n  const definition = await resolveDefinition(exported, options.context);\n  const graph = projectDefinitionToGraph(definition);\n  const desiredConfig = graphToEnvironmentConfig(graph, options);\n  return { graph, desiredConfig };\n}\n\nasync function importRailwayFile(absolutePath: string): Promise<unknown> {\n  const url = `${pathToFileURL(absolutePath).toString()}?t=${Date.now()}`;\n  if (/\\.[cm]?tsx?$/.test(absolutePath)) {\n    const { tsImport } = await import(\"tsx/esm/api\");\n    return tsImport(url, import.meta.url);\n  }\n  return import(url);\n}\n\nasync function resolveDefinition(exported: RailwayProgram | ProjectDefinition, context: RailwayContextInput = {}): Promise<ProjectDefinition> {\n  if (typeof exported === \"function\") return exported(createRailwayContext(context), projectFactory);\n  return exported;\n}\n","import fs from \"node:fs\";\nimport path from \"node:path\";\nimport { graphToEnvironmentConfig } from \"./compiler.js\";\nimport { evaluateRailwayFile } from \"./evaluator.js\";\nimport type {\n  BucketNode,\n  DatabaseNode,\n  GraphCompileOptions,\n  RailwayGraph,\n  ResourceNode,\n  ServiceNode,\n  VolumeNode,\n} from \"./graph.js\";\nimport type { EnvironmentConfig } from \"./schema.js\";\nimport type { RailwayContextInput } from \"./sdk.js\";\n\nexport interface RailwayIacServiceMap {}\nexport interface RailwayIacDatabaseMap {}\nexport interface RailwayIacBucketMap {}\nexport interface RailwayIacVolumeMap {}\nexport interface RailwayIacResourceMap {}\n\ntype KnownName<T> = [keyof T] extends [never] ? string : Extract<keyof T, string>;\n\nexport type RailwayServiceName = KnownName<RailwayIacServiceMap>;\nexport type RailwayDatabaseName = KnownName<RailwayIacDatabaseMap>;\nexport type RailwayBucketName = KnownName<RailwayIacBucketMap>;\nexport type RailwayVolumeName = KnownName<RailwayIacVolumeMap>;\nexport type RailwayResourceName = KnownName<RailwayIacResourceMap>;\n\nexport interface EvaluatedRailwayProjectOptions extends GraphCompileOptions {\n  file?: string;\n  cwd?: string;\n  context?: RailwayContextInput;\n}\n\nexport interface EvaluatedRailwayProjectSnapshot {\n  file: string;\n  graph: RailwayGraph;\n  desiredConfig: EnvironmentConfig;\n}\n\nexport async function evaluateRailwayProject(\n  options: EvaluatedRailwayProjectOptions = {},\n): Promise<EvaluatedRailwayProject> {\n  const file = options.file ? path.resolve(options.file) : findRailwayFile(options.cwd);\n  const { graph, desiredConfig } = await evaluateRailwayFile(file, options);\n  return new EvaluatedRailwayProject({ file, graph, desiredConfig });\n}\n\nexport function findRailwayFile(cwd = process.cwd()): string {\n  let current = path.resolve(cwd);\n  while (true) {\n    const candidate = path.join(current, \".railway\", \"railway.ts\");\n    if (fs.existsSync(candidate)) return candidate;\n\n    const parent = path.dirname(current);\n    if (parent === current) {\n      throw new Error(\n        `Could not find .railway/railway.ts from ${path.resolve(cwd)}. Pass { file } explicitly.`,\n      );\n    }\n    current = parent;\n  }\n}\n\nexport class EvaluatedRailwayProject {\n  readonly file: string;\n  readonly graph: RailwayGraph;\n  readonly desiredConfig: EnvironmentConfig;\n\n  constructor(snapshot: EvaluatedRailwayProjectSnapshot) {\n    this.file = snapshot.file;\n    this.graph = snapshot.graph;\n    this.desiredConfig = snapshot.desiredConfig;\n  }\n\n  get name(): string {\n    return this.graph.project.name;\n  }\n\n  get resources(): ResourceNode[] {\n    return this.graph.resources;\n  }\n\n  get services(): Array<ServiceNode | DatabaseNode> {\n    return this.graph.resources.filter(\n      (resource): resource is ServiceNode | DatabaseNode =>\n        resource.type === \"service\" || resource.type === \"database\",\n    );\n  }\n\n  resource(name: RailwayResourceName): ResourceNode {\n    const resource = this.graph.resources.find(candidate => candidate.name === name);\n    if (!resource) throw new Error(`Railway resource not found: ${name}`);\n    return resource;\n  }\n\n  service(name: RailwayServiceName): ServiceNode | DatabaseNode {\n    const resource = this.graph.resources.find(\n      (candidate): candidate is ServiceNode | DatabaseNode =>\n        candidate.name === name &&\n        (candidate.type === \"service\" || candidate.type === \"database\"),\n    );\n    if (!resource) throw new Error(`Railway service not found: ${name}`);\n    return resource;\n  }\n\n  database(name: RailwayDatabaseName): DatabaseNode {\n    const resource = this.graph.resources.find(\n      (candidate): candidate is DatabaseNode =>\n        candidate.name === name && candidate.type === \"database\",\n    );\n    if (!resource) throw new Error(`Railway database not found: ${name}`);\n    return resource;\n  }\n\n  bucket(name: RailwayBucketName): BucketNode {\n    const resource = this.graph.resources.find(\n      (candidate): candidate is BucketNode =>\n        candidate.name === name && candidate.type === \"bucket\",\n    );\n    if (!resource) throw new Error(`Railway bucket not found: ${name}`);\n    return resource;\n  }\n\n  volume(name: RailwayVolumeName): VolumeNode {\n    const resource = this.graph.resources.find(\n      (candidate): candidate is VolumeNode =>\n        candidate.name === name && candidate.type === \"volume\",\n    );\n    if (!resource) throw new Error(`Railway volume not found: ${name}`);\n    return resource;\n  }\n\n  config(options: GraphCompileOptions = {}): EnvironmentConfig {\n    return graphToEnvironmentConfig(this.graph, options);\n  }\n\n  toJSON(): EvaluatedRailwayProjectSnapshot {\n    return {\n      file: this.file,\n      graph: this.graph,\n      desiredConfig: this.desiredConfig,\n    };\n  }\n}\n","import type { RailwayGraph, ResourceNode } from \"./graph.js\";\n\nexport function renderRailwayGraphTypes(graph: RailwayGraph): string {\n  const services = names(\n    graph.resources.filter(\n      resource => resource.type === \"service\" || resource.type === \"database\",\n    ),\n  );\n  const databases = names(graph.resources.filter(resource => resource.type === \"database\"));\n  const buckets = names(graph.resources.filter(resource => resource.type === \"bucket\"));\n  const volumes = names(graph.resources.filter(resource => resource.type === \"volume\"));\n  const resources = names(graph.resources);\n\n  return `// Generated by Railway IaC. Do not edit by hand.\n// Provides autocomplete for evaluated graph resource lookups.\n\nimport \"railway/iac\";\n\ndeclare module \"railway/iac\" {\n  interface RailwayIacServiceMap ${mapBody(services)}\n  interface RailwayIacDatabaseMap ${mapBody(databases)}\n  interface RailwayIacBucketMap ${mapBody(buckets)}\n  interface RailwayIacVolumeMap ${mapBody(volumes)}\n  interface RailwayIacResourceMap ${mapBody(resources)}\n}\n`;\n}\n\nfunction names(resources: ResourceNode[]): string[] {\n  return [...new Set(resources.map(resource => resource.name))].sort();\n}\n\nfunction mapBody(names: string[]): string {\n  if (names.length === 0) return \"{}\";\n  return `{\n${names.map(name => `    ${JSON.stringify(name)}: true;`).join(\"\\n\")}\n  }`;\n}\n","import { diffGraphs, renderChangeSet, type RailwayChangeSet } from \"./change-set.js\";\nimport { environmentConfigToGraph } from \"./compiler.js\";\nimport { IacClient, type ChangeSetApplyResult, type ChangeSetPreviewResult, type CurrentEnvironmentResult } from \"./client.js\";\nimport { validateGraph, type RailwayGraph } from \"./graph.js\";\nimport { evaluateRailwayProject, findRailwayFile } from \"./project.js\";\nimport { renderRailwayGraphTypes } from \"./typegen.js\";\nimport type { EnvironmentConfig } from \"./schema.js\";\nimport type { RailwayAuthType } from \"../core/config.js\";\nimport type { RailwayContextInput } from \"./sdk.js\";\n\nexport interface RailwayIacRunnerRequest {\n  command?: \"evaluate\" | \"typegen\" | \"current\" | \"plan\" | \"stage\" | \"apply\";\n  cwd?: string;\n  file?: string;\n  includeTypes?: boolean;\n  pretty?: boolean;\n  context?: RailwayContextInput;\n  backboard?: RailwayIacBackboardContext;\n}\n\nexport interface RailwayIacBackboardContext {\n  endpoint?: string;\n  token?: string;\n  authType?: RailwayAuthType;\n  projectId?: string;\n  environmentId?: string;\n  decryptVariables?: boolean;\n  merge?: boolean;\n}\n\nexport interface RailwayIacRunnerDiagnostic {\n  severity: \"warning\" | \"error\";\n  path: string;\n  message: string;\n}\n\nexport interface RailwayIacEvaluateResponse {\n  ok: boolean;\n  command: \"evaluate\";\n  file: string;\n  graph?: RailwayGraph;\n  graphTypes?: string;\n  diagnostics: RailwayIacRunnerDiagnostic[];\n}\n\nexport interface RailwayIacTypegenResponse {\n  ok: boolean;\n  command: \"typegen\";\n  file: string;\n  graphTypes?: string;\n  diagnostics: RailwayIacRunnerDiagnostic[];\n}\n\nexport interface RailwayIacCurrentResponse {\n  ok: boolean;\n  command: \"current\";\n  file: string;\n  mode: \"real\";\n  currentGraph?: RailwayGraph;\n  currentConfig?: EnvironmentConfig;\n  currentEnvironment?: Omit<CurrentEnvironmentResult, \"config\">;\n  graphTypes?: string;\n  diagnostics: RailwayIacRunnerDiagnostic[];\n}\n\nexport interface RailwayIacPlanResponse {\n  ok: boolean;\n  command: \"plan\";\n  file: string;\n  mode: \"real\";\n  currentGraph?: RailwayGraph;\n  desiredGraph?: RailwayGraph;\n  currentConfig?: EnvironmentConfig;\n  currentEnvironment?: Omit<CurrentEnvironmentResult, \"config\">;\n  changeSet?: RailwayChangeSet;\n  preview?: ChangeSetPreviewResult;\n  diff?: string;\n  graphTypes?: string;\n  diagnostics: RailwayIacRunnerDiagnostic[];\n}\n\nexport interface RailwayIacStageResponse extends Omit<RailwayIacPlanResponse, \"command\"> {\n  command: \"stage\";\n}\n\nexport interface RailwayIacApplyResponse extends Omit<RailwayIacStageResponse, \"command\"> {\n  command: \"apply\";\n  applyResult?: ChangeSetApplyResult;\n  deploymentId?: string;\n  stagedPatchId?: string;\n}\n\nexport type RailwayIacRunnerResponse = RailwayIacEvaluateResponse | RailwayIacTypegenResponse | RailwayIacCurrentResponse | RailwayIacPlanResponse | RailwayIacStageResponse | RailwayIacApplyResponse;\n\ntype RunnerCommand = NonNullable<RailwayIacRunnerRequest[\"command\"]>;\n\ninterface EvaluatedCommandInput {\n  request: RailwayIacRunnerRequest;\n  file: string;\n  graph: RailwayGraph;\n  diagnostics: RailwayIacRunnerDiagnostic[];\n}\n\nexport async function runRailwayIac(request: RailwayIacRunnerRequest = {}): Promise<RailwayIacRunnerResponse> {\n  const command = request.command ?? \"evaluate\";\n  const cwd = request.cwd ?? process.cwd();\n  const file = request.file ?? await findRailwayFile(cwd);\n\n  try {\n    const evaluated = await evaluateRailwayProject({ file, context: runnerContext(request, command) });\n    const input = {\n      request,\n      file: evaluated.file,\n      graph: evaluated.graph,\n      diagnostics: graphDiagnostics(evaluated.graph),\n    };\n    return await runEvaluatedCommand(command, input);\n  } catch (error) {\n    return errorResponse(command, file, error);\n  }\n}\n\nasync function runEvaluatedCommand(command: RunnerCommand, input: EvaluatedCommandInput): Promise<RailwayIacRunnerResponse> {\n  switch (command) {\n    case \"typegen\":\n      return typegenRailwayIac(input);\n    case \"evaluate\":\n      return evaluateRailwayIac(input);\n    case \"current\":\n      return currentRailwayIac(input);\n    case \"plan\":\n      return planRailwayIac(input);\n    case \"stage\":\n      return stageRailwayIac(input);\n    case \"apply\":\n      return applyRailwayIac(input);\n  }\n}\n\nfunction typegenRailwayIac({ file, graph, diagnostics }: EvaluatedCommandInput): RailwayIacTypegenResponse {\n  return {\n    ok: hasNoErrors(diagnostics),\n    command: \"typegen\",\n    file,\n    graphTypes: renderRailwayGraphTypes(graph),\n    diagnostics,\n  };\n}\n\nfunction evaluateRailwayIac({ request, file, graph, diagnostics }: EvaluatedCommandInput): RailwayIacEvaluateResponse {\n  return {\n    ok: hasNoErrors(diagnostics),\n    command: \"evaluate\",\n    file,\n    graph,\n    ...(request.includeTypes ? { graphTypes: renderRailwayGraphTypes(graph) } : {}),\n    diagnostics,\n  };\n}\n\nasync function currentRailwayIac({ file, graph: desiredGraph, request, diagnostics }: EvaluatedCommandInput): Promise<RailwayIacCurrentResponse> {\n  const context = requireBackboardContext(request.backboard, \"plan\");\n  const client = new IacClient(clientConfig(context));\n  const current = await readCurrentEnvironment(client, context);\n  const currentGraph = graphFromCurrentEnvironment(current, desiredGraph);\n  const { config: _config, ...currentEnvironment } = current;\n\n  return {\n    ok: hasNoErrors(diagnostics),\n    command: \"current\",\n    file,\n    mode: \"real\",\n    currentGraph,\n    currentConfig: current.config,\n    currentEnvironment,\n    ...(request.includeTypes ? { graphTypes: renderRailwayGraphTypes(currentGraph) } : {}),\n    diagnostics,\n  };\n}\n\nasync function planRailwayIac({ file, graph: desiredGraph, request, diagnostics }: EvaluatedCommandInput): Promise<RailwayIacPlanResponse> {\n  const context = requireBackboardContext(request.backboard, \"plan\");\n  const client = new IacClient(clientConfig(context));\n  const current = await readCurrentEnvironment(client, context);\n  const currentGraph = graphFromCurrentEnvironment(current, desiredGraph);\n  const changeSet = diffGraphs({ current: currentGraph, desired: desiredGraph });\n  const allDiagnostics = [...diagnostics, ...changeSetDiagnostics(changeSet)];\n  const { config: _config, ...currentEnvironment } = current;\n  const hasErrors = !hasNoErrors(allDiagnostics);\n  const preview = !hasErrors && changeSet.changes.length > 0\n    ? await client.previewChangeSet({ environmentId: context.environmentId, changeSet })\n    : undefined;\n\n  return {\n    ok: !hasErrors,\n    command: \"plan\",\n    file,\n    mode: \"real\",\n    currentGraph,\n    desiredGraph,\n    currentConfig: current.config,\n    currentEnvironment,\n    changeSet,\n    ...(preview ? { preview } : {}),\n    diff: renderChangeSet(changeSet),\n    ...(request.includeTypes ? { graphTypes: renderRailwayGraphTypes(desiredGraph) } : {}),\n    diagnostics: allDiagnostics,\n  };\n}\n\nasync function stageRailwayIac(input: EvaluatedCommandInput): Promise<RailwayIacStageResponse> {\n  const planned = await planRailwayIac(input);\n  if (!planned.ok || !planned.changeSet || planned.changeSet.changes.length === 0) {\n    return { ...planned, command: \"stage\" };\n  }\n  requireBackboardContext(input.request.backboard, \"stage\");\n  return { ...planned, command: \"stage\" };\n}\n\nasync function applyRailwayIac(input: EvaluatedCommandInput): Promise<RailwayIacApplyResponse> {\n  const planned = await planRailwayIac(input);\n  if (!planned.ok || !planned.changeSet || planned.changeSet.changes.length === 0) {\n    return { ...planned, command: \"apply\" };\n  }\n\n  const context = requireBackboardContext(input.request.backboard, \"apply\");\n  const client = new IacClient(clientConfig(context));\n  const applyResult = await client.applyChangeSet({\n    environmentId: context.environmentId,\n    changeSet: planned.changeSet,\n    commitMessage: \"Apply Railway configuration\",\n  });\n\n  return {\n    ...planned,\n    command: \"apply\",\n    applyResult,\n    ...(applyResult.deploymentId ? { deploymentId: applyResult.deploymentId } : {}),\n    ...(applyResult.stagedPatchId ? { stagedPatchId: applyResult.stagedPatchId } : {}),\n  };\n}\n\nasync function readCurrentEnvironment(\n  client: IacClient,\n  context: Required<Pick<RailwayIacBackboardContext, \"token\" | \"environmentId\">> & RailwayIacBackboardContext,\n): Promise<CurrentEnvironmentResult> {\n  return client.getCurrentEnvironment(\n    context.environmentId,\n    context.decryptVariables === undefined ? {} : { decryptVariables: context.decryptVariables },\n  );\n}\n\nfunction graphFromCurrentEnvironment(current: CurrentEnvironmentResult, desiredGraph: RailwayGraph): RailwayGraph {\n  return environmentConfigToGraph(current.config, {\n    projectName: current.projectName ?? desiredGraph.project.name,\n    serviceNamesById: current.serviceNamesById,\n    bucketNamesById: current.bucketNamesById,\n    customDomainsByServiceId: current.customDomainsByServiceId,\n  });\n}\n\nfunction changeSetDiagnostics(changeSet: RailwayChangeSet): RailwayIacRunnerDiagnostic[] {\n  return changeSet.diagnostics.map(diagnostic => ({\n    severity: diagnostic.severity,\n    path: diagnostic.path,\n    message: diagnostic.message,\n  } satisfies RailwayIacRunnerDiagnostic));\n}\n\nfunction runnerContext(request: RailwayIacRunnerRequest, command: string): RailwayContextInput {\n  const environment = request.context?.environment ?? request.context?.environmentName;\n  const projectId = request.context?.projectId ?? request.backboard?.projectId;\n  const environmentId = request.context?.environmentId ?? request.backboard?.environmentId;\n  return {\n    ...request.context,\n    command,\n    ...(projectId ? { projectId } : {}),\n    ...(environmentId ? { environmentId } : {}),\n    ...(environment ? { environment, environmentName: environment } : {}),\n  };\n}\n\nfunction requireBackboardContext(context: RailwayIacBackboardContext | undefined, command: \"plan\" | \"stage\" | \"apply\"): Required<Pick<RailwayIacBackboardContext, \"token\" | \"environmentId\">> & RailwayIacBackboardContext {\n  if (!context?.token) throw new Error(`Backboard token is required for ${command}.`);\n  if (!context.environmentId) throw new Error(`Backboard environmentId is required for ${command}.`);\n  return context as Required<Pick<RailwayIacBackboardContext, \"token\" | \"environmentId\">> & RailwayIacBackboardContext;\n}\n\nfunction clientConfig(context: RailwayIacBackboardContext & { token: string }) {\n  return { token: context.token, ...(context.authType ? { authType: context.authType } : {}), ...(context.endpoint ? { graphqlEndpoint: context.endpoint } : {}) };\n}\n\nfunction graphDiagnostics(graph: RailwayGraph): RailwayIacRunnerDiagnostic[] {\n  return validateGraph(graph).map(message => ({ severity: \"error\", path: \"graph\", message }));\n}\n\nfunction hasNoErrors(diagnostics: RailwayIacRunnerDiagnostic[]): boolean {\n  return diagnostics.every(diagnostic => diagnostic.severity !== \"error\");\n}\n\nfunction errorResponse(command: RunnerCommand, file: string, error: unknown): RailwayIacRunnerResponse {\n  return {\n    ok: false,\n    command,\n    file,\n    ...(command === \"plan\" || command === \"stage\" || command === \"apply\" || command === \"current\" ? { mode: \"real\" as const } : {}),\n    diagnostics: [{ severity: \"error\", path: \"\", message: error instanceof Error ? error.message : String(error) }],\n  } as RailwayIacRunnerResponse;\n}\n","import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';\nexport type Maybe<T> = T | null;\nexport type InputMaybe<T> = Maybe<T>;\nexport type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };\nexport type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> };\nexport type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]> };\nexport type MakeEmpty<T extends { [key: string]: unknown }, K extends keyof T> = { [_ in K]?: never };\nexport type Incremental<T> = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never };\n/** All built-in and custom scalars, mapped to their actual values */\nexport type Scalars = {\n  ID: { input: string; output: string; }\n  String: { input: string; output: string; }\n  Boolean: { input: boolean; output: boolean; }\n  Int: { input: number; output: number; }\n  Float: { input: number; output: number; }\n  BigInt: { input: string; output: string; }\n  CanvasConfig: { input: any; output: any; }\n  DateTime: { input: string; output: string; }\n  DeploymentDiagnosis: { input: any; output: any; }\n  DeploymentMeta: { input: any; output: any; }\n  DisplayConfig: { input: any; output: any; }\n  EnvironmentConfig: { input: any; output: any; }\n  EnvironmentVariables: { input: any; output: any; }\n  JSON: { input: unknown; output: unknown; }\n  NotificationChannelConfig: { input: any; output: any; }\n  NotificationPayload: { input: any; output: any; }\n  RailpackInfo: { input: any; output: any; }\n  SerializedTemplateConfig: { input: any; output: any; }\n  ServiceInstanceLimit: { input: any; output: any; }\n  SkippedResourceIds: { input: any; output: any; }\n  SpendCommitmentFeatureId: { input: any; output: any; }\n  SubscriptionPlanLimit: { input: any; output: any; }\n  SupportHealthMetrics: { input: any; output: any; }\n  TemplateConfig: { input: any; output: any; }\n  TemplateMetadata: { input: any; output: any; }\n  TemplateServiceConfig: { input: any; output: any; }\n  TemplateVolume: { input: any; output: any; }\n  Upload: { input: any; output: any; }\n};\n\nexport type AccessRule = {\n  __typename?: 'AccessRule';\n  disallowed?: Maybe<Scalars['String']['output']>;\n};\n\nexport type ActiveFeatureFlag =\n  | 'CHAT_SANDBOX'\n  | 'DEBUG_SMART_DIAGNOSIS'\n  | 'IN_DASHBOARD_SUPPORT'\n  | 'MAGIC_CONFIG'\n  | 'POSTGRES_PGBOUNCER'\n  | 'PRIORITY_BOARDING'\n  | 'PROJECT_SANDBOXES';\n\nexport type ActivePlatformFlag =\n  | 'ALERT_SUS_USERS_CRON_KILLSWITCH'\n  | 'BAN_APPEAL_FORM'\n  | 'CHAT_SANDBOX'\n  | 'CTRD_IMAGE_STORE_ROLLOUT'\n  | 'DEMO_PERCENTAGE_ROLLOUT'\n  | 'HA_STATIC_EGRESS_SELF_SERVICE'\n  | 'INLINE_NOTIFICATION_PROCESSING'\n  | 'IN_DASHBOARD_SUPPORT'\n  | 'KAFKA_DEPLOYMENT_STATUS_CHANGES'\n  | 'NEW_STRIPE_WEBHOOK_VERSION_ROLLOUT'\n  | 'OAUTH_DCR_KILLSWITCH'\n  | 'RADAR_AUTO_EVALUATE'\n  | 'SERVICEINSTANCE_DATALOADER_FOR_STATIC_URL'\n  | 'SPLIT_USAGE_QUERIES'\n  | 'STRIPE_METERS_NEW_ACCOUNTS'\n  | 'STRIPE_METERS_SHADOW_ENABLED'\n  | 'UPDATED_VM_QUERIES';\n\nexport type ActiveProjectFeatureFlag =\n  | 'PLACEHOLDER';\n\nexport type ActiveServiceFeatureFlag =\n  | 'COPY_VOLUME_TO_ENVIRONMENT'\n  | 'ENABLE_DOCKER_EXTENSION'\n  | 'PLACEHOLDER'\n  | 'SKIPPED_BUILDS'\n  | 'USE_EXPRESS_DEPLOY'\n  | 'USE_HA_STATIC_EGRESS'\n  | 'USE_VM_RUNTIME';\n\nexport type AdoptionInfo = Node & {\n  __typename?: 'AdoptionInfo';\n  adoptionLevel?: Maybe<Scalars['Float']['output']>;\n  createdAt: Scalars['DateTime']['output'];\n  deltaLevel?: Maybe<Scalars['Float']['output']>;\n  id: Scalars['ID']['output'];\n  matchedIcpEmail?: Maybe<Scalars['String']['output']>;\n  monthlyEstimatedUsage?: Maybe<Scalars['Float']['output']>;\n  numConfigFile: Scalars['Int']['output'];\n  numCronSchedule: Scalars['Int']['output'];\n  numDeploys: Scalars['Int']['output'];\n  numEnvs: Scalars['Int']['output'];\n  numFailedDeploys: Scalars['Int']['output'];\n  numHealthcheck: Scalars['Int']['output'];\n  numIconConfig: Scalars['Int']['output'];\n  numRegion: Scalars['Int']['output'];\n  numReplicas: Scalars['Int']['output'];\n  numRootDirectory: Scalars['Int']['output'];\n  numSeats: Scalars['Int']['output'];\n  numServices: Scalars['Int']['output'];\n  numVariables: Scalars['Int']['output'];\n  numWatchPatterns: Scalars['Int']['output'];\n  totalCores?: Maybe<Scalars['Float']['output']>;\n  totalDisk?: Maybe<Scalars['Float']['output']>;\n  totalNetwork?: Maybe<Scalars['Float']['output']>;\n  updatedAt: Scalars['DateTime']['output'];\n  workspace: Workspace;\n};\n\n/** The aggregated usage of a single measurement. */\nexport type AggregatedUsage = {\n  __typename?: 'AggregatedUsage';\n  /** The measurement that was aggregated. */\n  measurement: MetricMeasurement;\n  /** The tags that were used to group the metric. Only the tags that were used in the `groupBy` will be present. */\n  tags: MetricTags;\n  /** The aggregated value. */\n  value: Scalars['Float']['output'];\n};\n\nexport type AllDomains = {\n  __typename?: 'AllDomains';\n  customDomains: Array<CustomDomain>;\n  serviceDomains: Array<ServiceDomain>;\n};\n\nexport type ApiToken = Node & {\n  __typename?: 'ApiToken';\n  displayToken: Scalars['String']['output'];\n  id: Scalars['ID']['output'];\n  name: Scalars['String']['output'];\n  workspaceId?: Maybe<Scalars['String']['output']>;\n};\n\n/** Information about the current API token and its accessible workspaces. */\nexport type ApiTokenContext = {\n  __typename?: 'ApiTokenContext';\n  /** Workspaces this subject can operate on via this token or session. */\n  workspaces: Array<ApiTokenWorkspace>;\n};\n\nexport type ApiTokenCreateInput = {\n  name: Scalars['String']['input'];\n  workspaceId?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type ApiTokenRateLimit = {\n  __typename?: 'ApiTokenRateLimit';\n  remainingPoints: Scalars['Int']['output'];\n  resetsAt: Scalars['String']['output'];\n};\n\nexport type ApiTokenWorkspace = {\n  __typename?: 'ApiTokenWorkspace';\n  id: Scalars['String']['output'];\n  name: Scalars['String']['output'];\n};\n\nexport type AppliedByMember = {\n  __typename?: 'AppliedByMember';\n  avatar?: Maybe<Scalars['String']['output']>;\n  email: Scalars['String']['output'];\n  id: Scalars['String']['output'];\n  name?: Maybe<Scalars['String']['output']>;\n  username?: Maybe<Scalars['String']['output']>;\n};\n\nexport type AuditLog = Node & {\n  __typename?: 'AuditLog';\n  context?: Maybe<Scalars['JSON']['output']>;\n  createdAt: Scalars['DateTime']['output'];\n  environment?: Maybe<Environment>;\n  environmentId?: Maybe<Scalars['String']['output']>;\n  eventType: Scalars['String']['output'];\n  id: Scalars['ID']['output'];\n  payload?: Maybe<Scalars['JSON']['output']>;\n  project?: Maybe<Project>;\n  projectId?: Maybe<Scalars['String']['output']>;\n  workspaceId?: Maybe<Scalars['String']['output']>;\n};\n\nexport type AuditLogEventTypeInfo = {\n  __typename?: 'AuditLogEventTypeInfo';\n  description: Scalars['String']['output'];\n  eventType: Scalars['String']['output'];\n};\n\nexport type AuditLogFilterInput = {\n  /** Filter events created on or before this date */\n  endDate?: InputMaybe<Scalars['DateTime']['input']>;\n  /** Filter events for a single environment */\n  environmentId?: InputMaybe<Scalars['String']['input']>;\n  /** List of event types to filter by */\n  eventTypes?: InputMaybe<Array<Scalars['String']['input']>>;\n  /** Filter events for a single project */\n  projectId?: InputMaybe<Scalars['String']['input']>;\n  /** Filter events created on or after this date */\n  startDate?: InputMaybe<Scalars['DateTime']['input']>;\n};\n\nexport type BaseEnvironmentOverrideInput = {\n  baseEnvironmentOverrideId?: InputMaybe<Scalars['String']['input']>;\n};\n\n/** The billing period for a customers subscription. */\nexport type BillingPeriod = {\n  __typename?: 'BillingPeriod';\n  end: Scalars['DateTime']['output'];\n  start: Scalars['DateTime']['output'];\n};\n\nexport type Bucket = Node & {\n  __typename?: 'Bucket';\n  createdAt: Scalars['DateTime']['output'];\n  id: Scalars['ID']['output'];\n  name: Scalars['String']['output'];\n  project: Project;\n  projectId: Scalars['String']['output'];\n  updatedAt: Scalars['DateTime']['output'];\n};\n\nexport type BucketCreateInput = {\n  /** [unimplemented] The environment to deploy the bucket instances into. If `null`, the bucket will not be deployed to any environment. `undefined` will deploy to all environments. */\n  environmentId?: InputMaybe<Scalars['String']['input']>;\n  /** The name of the bucket */\n  name?: InputMaybe<Scalars['String']['input']>;\n  /** The project to create the bucket in */\n  projectId: Scalars['String']['input'];\n};\n\nexport type BucketInstanceDetails = {\n  __typename?: 'BucketInstanceDetails';\n  objectCount: Scalars['BigInt']['output'];\n  sizeBytes: Scalars['BigInt']['output'];\n};\n\nexport type BucketS3CompatibleCredentials = {\n  __typename?: 'BucketS3CompatibleCredentials';\n  accessKeyId: Scalars['String']['output'];\n  bucketName: Scalars['String']['output'];\n  createdAt: Scalars['DateTime']['output'];\n  endpoint: Scalars['String']['output'];\n  region: Scalars['String']['output'];\n  secretAccessKey: Scalars['String']['output'];\n  urlStyle: Scalars['String']['output'];\n};\n\nexport type BucketUpdateInput = {\n  name: Scalars['String']['input'];\n};\n\nexport type Builder =\n  | 'HEROKU'\n  | 'NIXPACKS'\n  | 'PAKETO'\n  | 'RAILPACK';\n\nexport type CdnProvider =\n  | 'DETECTED_CDN_PROVIDER_CLOUDFLARE'\n  | 'DETECTED_CDN_PROVIDER_UNSPECIFIED'\n  | 'UNRECOGNIZED';\n\nexport type CanvasViewMergePreview = {\n  __typename?: 'CanvasViewMergePreview';\n  mutations: Array<Scalars['JSON']['output']>;\n  state: Scalars['JSON']['output'];\n};\n\n/** The type of error that occurred during certificate issuance */\nexport type CertificateErrorType =\n  | 'CERTIFICATE_ERROR_TYPE_AUTHORIZATION_FAILED'\n  | 'CERTIFICATE_ERROR_TYPE_DNS_VALIDATION'\n  | 'CERTIFICATE_ERROR_TYPE_INTERNAL'\n  | 'CERTIFICATE_ERROR_TYPE_KEY_GENERATION'\n  | 'CERTIFICATE_ERROR_TYPE_ORDER_CREATION'\n  | 'CERTIFICATE_ERROR_TYPE_RATE_LIMIT'\n  | 'CERTIFICATE_ERROR_TYPE_UNSPECIFIED'\n  | 'UNRECOGNIZED';\n\nexport type CertificatePublicData = {\n  __typename?: 'CertificatePublicData';\n  domainNames: Array<Scalars['String']['output']>;\n  expiresAt?: Maybe<Scalars['DateTime']['output']>;\n  fingerprintSha256: Scalars['String']['output'];\n  issuedAt?: Maybe<Scalars['DateTime']['output']>;\n  keyType: KeyType;\n};\n\nexport type CertificateStatus =\n  | 'CERTIFICATE_STATUS_TYPE_ISSUE_FAILED'\n  | 'CERTIFICATE_STATUS_TYPE_ISSUING'\n  | 'CERTIFICATE_STATUS_TYPE_UNSPECIFIED'\n  | 'CERTIFICATE_STATUS_TYPE_VALID'\n  | 'CERTIFICATE_STATUS_TYPE_VALIDATING_OWNERSHIP'\n  | 'UNRECOGNIZED';\n\nexport type CertificateStatusDetailed =\n  | 'CERTIFICATE_STATUS_TYPE_DETAILED_CLEANING_UP'\n  | 'CERTIFICATE_STATUS_TYPE_DETAILED_COMPLETE'\n  | 'CERTIFICATE_STATUS_TYPE_DETAILED_CREATING_ORDER'\n  | 'CERTIFICATE_STATUS_TYPE_DETAILED_DOWNLOADING_CERTIFICATE'\n  | 'CERTIFICATE_STATUS_TYPE_DETAILED_FAILED'\n  | 'CERTIFICATE_STATUS_TYPE_DETAILED_FETCHING_AUTHORIZATIONS'\n  | 'CERTIFICATE_STATUS_TYPE_DETAILED_FINALIZING_ORDER'\n  | 'CERTIFICATE_STATUS_TYPE_DETAILED_GENERATING_KEYS'\n  | 'CERTIFICATE_STATUS_TYPE_DETAILED_INITIATING_CHALLENGES'\n  | 'CERTIFICATE_STATUS_TYPE_DETAILED_POLLING_AUTHORIZATIONS'\n  | 'CERTIFICATE_STATUS_TYPE_DETAILED_PRESENTING_CHALLENGES'\n  | 'CERTIFICATE_STATUS_TYPE_DETAILED_UNSPECIFIED'\n  | 'UNRECOGNIZED';\n\nexport type ChangeOperationResult = {\n  __typename?: 'ChangeOperationResult';\n  kind: Scalars['String']['output'];\n  outputs?: Maybe<Scalars['JSON']['output']>;\n  path?: Maybe<Scalars['String']['output']>;\n  status: Scalars['String']['output'];\n  summary?: Maybe<Scalars['String']['output']>;\n};\n\nexport type ChangeSetApplyResult = {\n  __typename?: 'ChangeSetApplyResult';\n  changes: Array<ChangeOperationResult>;\n  deploymentId?: Maybe<Scalars['String']['output']>;\n  diagnostics: Scalars['JSON']['output'];\n  id: Scalars['String']['output'];\n  stagedPatchId?: Maybe<Scalars['String']['output']>;\n  status: Scalars['String']['output'];\n};\n\nexport type ChangeSetPreview = {\n  __typename?: 'ChangeSetPreview';\n  changeSet: Scalars['JSON']['output'];\n  diagnostics: Scalars['JSON']['output'];\n  effects: Scalars['JSON']['output'];\n};\n\nexport type CliAuthEventTrackInput = {\n  agentSessionId?: InputMaybe<Scalars['String']['input']>;\n  arch?: InputMaybe<Scalars['String']['input']>;\n  caller?: InputMaybe<Scalars['String']['input']>;\n  cliVersion?: InputMaybe<Scalars['String']['input']>;\n  errorMessage?: InputMaybe<Scalars['String']['input']>;\n  installRequestId?: InputMaybe<Scalars['String']['input']>;\n  isCi?: InputMaybe<Scalars['Boolean']['input']>;\n  os?: InputMaybe<Scalars['String']['input']>;\n  outcome: Scalars['String']['input'];\n  sessionId?: InputMaybe<Scalars['String']['input']>;\n  success: Scalars['Boolean']['input'];\n  transport: Scalars['String']['input'];\n  transportReason?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type CliEventTrackInput = {\n  agentSessionId?: InputMaybe<Scalars['String']['input']>;\n  arch: Scalars['String']['input'];\n  caller?: InputMaybe<Scalars['String']['input']>;\n  cliVersion: Scalars['String']['input'];\n  command: Scalars['String']['input'];\n  durationMs: Scalars['Int']['input'];\n  environmentId?: InputMaybe<Scalars['String']['input']>;\n  errorClass?: InputMaybe<Scalars['String']['input']>;\n  errorMessage?: InputMaybe<Scalars['String']['input']>;\n  installRequestId?: InputMaybe<Scalars['String']['input']>;\n  isCi: Scalars['Boolean']['input'];\n  os: Scalars['String']['input'];\n  projectId?: InputMaybe<Scalars['String']['input']>;\n  serviceId?: InputMaybe<Scalars['String']['input']>;\n  sessionId?: InputMaybe<Scalars['String']['input']>;\n  subCommand?: InputMaybe<Scalars['String']['input']>;\n  success: Scalars['Boolean']['input'];\n  workspaceId?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type CnameCheck = {\n  __typename?: 'CnameCheck';\n  link?: Maybe<Scalars['String']['output']>;\n  message: Scalars['String']['output'];\n  status: CnameCheckStatus;\n};\n\nexport type CnameCheckStatus =\n  | 'ERROR'\n  | 'INFO'\n  | 'INVALID'\n  | 'VALID'\n  | 'WAITING';\n\nexport type ComplianceAgreementsInfo = {\n  __typename?: 'ComplianceAgreementsInfo';\n  /** Whether the workspace has a signed Business Associate Agreement (HIPAA) */\n  hasBAA: Scalars['Boolean']['output'];\n  /** Whether the workspace has a Data Processing Agreement (GDPR) */\n  hasDPA: Scalars['Boolean']['output'];\n};\n\nexport type Container = Node & {\n  __typename?: 'Container';\n  createdAt: Scalars['DateTime']['output'];\n  deletedAt?: Maybe<Scalars['DateTime']['output']>;\n  environment: Environment;\n  environmentId: Scalars['String']['output'];\n  id: Scalars['ID']['output'];\n  migratedAt?: Maybe<Scalars['DateTime']['output']>;\n  plugin: Plugin;\n  pluginId: Scalars['String']['output'];\n};\n\nexport type CreateNotificationRuleInput = {\n  channelConfigs: Array<Scalars['NotificationChannelConfig']['input']>;\n  ephemeralEnvironments?: InputMaybe<Scalars['Boolean']['input']>;\n  eventTypes: Array<Scalars['String']['input']>;\n  projectId?: InputMaybe<Scalars['String']['input']>;\n  severities?: InputMaybe<Array<NotificationSeverity>>;\n  workspaceId: Scalars['String']['input'];\n};\n\nexport type Credit = Node & {\n  __typename?: 'Credit';\n  amount: Scalars['Float']['output'];\n  createdAt: Scalars['DateTime']['output'];\n  customerId: Scalars['String']['output'];\n  id: Scalars['ID']['output'];\n  memo?: Maybe<Scalars['String']['output']>;\n  type: CreditType;\n  updatedAt: Scalars['DateTime']['output'];\n};\n\nexport type CreditType =\n  | 'APPLIED'\n  | 'CREDIT'\n  | 'DEBIT'\n  | 'STRIPE'\n  | 'TRANSFER'\n  | 'WAIVED';\n\nexport type CustomDomain = Domain & {\n  __typename?: 'CustomDomain';\n  /** @deprecated Removed; always null. */\n  cdnMode?: Maybe<Scalars['String']['output']>;\n  /** @deprecated Use the `status` field instead. */\n  cnameCheck: CnameCheck;\n  createdAt?: Maybe<Scalars['DateTime']['output']>;\n  deletedAt?: Maybe<Scalars['DateTime']['output']>;\n  domain: Scalars['String']['output'];\n  edgeId?: Maybe<Scalars['String']['output']>;\n  environmentId: Scalars['String']['output'];\n  id: Scalars['ID']['output'];\n  projectId?: Maybe<Scalars['String']['output']>;\n  serviceId: Scalars['String']['output'];\n  status: CustomDomainStatus;\n  syncStatus: CustomDomainSyncStatus;\n  targetPort?: Maybe<Scalars['Int']['output']>;\n  updatedAt?: Maybe<Scalars['DateTime']['output']>;\n};\n\nexport type CustomDomainCreateInput = {\n  domain: Scalars['String']['input'];\n  environmentId: Scalars['String']['input'];\n  projectId: Scalars['String']['input'];\n  serviceId: Scalars['String']['input'];\n  targetPort?: InputMaybe<Scalars['Int']['input']>;\n};\n\nexport type CustomDomainStatus = {\n  __typename?: 'CustomDomainStatus';\n  cdnProvider?: Maybe<CdnProvider>;\n  /** Human-readable error message when certificate issuance fails */\n  certificateErrorMessage?: Maybe<Scalars['String']['output']>;\n  /** Structured error type for programmatic handling */\n  certificateErrorType?: Maybe<CertificateErrorType>;\n  /** Whether the certificate issuance can be retried */\n  certificateRetryable?: Maybe<Scalars['Boolean']['output']>;\n  certificateStatus: CertificateStatus;\n  certificateStatusDetailed?: Maybe<CertificateStatusDetailed>;\n  certificates?: Maybe<Array<CertificatePublicData>>;\n  dnsRecords: Array<DnsRecords>;\n  verificationDnsHost?: Maybe<Scalars['String']['output']>;\n  verificationToken?: Maybe<Scalars['String']['output']>;\n  verified: Scalars['Boolean']['output'];\n};\n\nexport type CustomDomainSyncStatus =\n  | 'ACTIVE'\n  | 'CREATING'\n  | 'DELETED'\n  | 'DELETING'\n  | 'UNSPECIFIED'\n  | 'UPDATING';\n\nexport type Customer = Node & {\n  __typename?: 'Customer';\n  /** The total amount of credits that have been applied during the current billing period. */\n  appliedCredits: Scalars['Float']['output'];\n  billingAddress?: Maybe<CustomerAddress>;\n  billingEmail?: Maybe<Scalars['String']['output']>;\n  billingPeriod: BillingPeriod;\n  /** The total amount of unused credits for the customer. */\n  creditBalance: Scalars['Float']['output'];\n  credits: CustomerCreditsConnection;\n  /** The current usage for the customer. This value is cached and may not be up to date. */\n  currentUsage: Scalars['Float']['output'];\n  defaultPaymentMethod?: Maybe<PaymentMethod>;\n  defaultPaymentMethodId?: Maybe<Scalars['String']['output']>;\n  hasExhaustedFreePlan: Scalars['Boolean']['output'];\n  id: Scalars['ID']['output'];\n  invoices: Array<CustomerInvoice>;\n  isPrepaying: Scalars['Boolean']['output'];\n  isTrialing: Scalars['Boolean']['output'];\n  isUsageSubscriber: Scalars['Boolean']['output'];\n  isWithdrawingToCredits: Scalars['Boolean']['output'];\n  planLimitOverride?: Maybe<PlanLimitOverride>;\n  remainingUsageCreditBalance: Scalars['Float']['output'];\n  spendCommitment?: Maybe<SpendCommitment>;\n  state: SubscriptionState;\n  stripeCustomerId: Scalars['String']['output'];\n  subscriptions: Array<CustomerSubscription>;\n  supportedWithdrawalPlatforms: Array<WithdrawalPlatformTypes>;\n  taxIds: Array<CustomerTaxId>;\n  trialDaysRemaining: Scalars['Int']['output'];\n  usageLimit?: Maybe<UsageLimit>;\n  workspace: Workspace;\n};\n\n\nexport type CustomerCreditsArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n};\n\nexport type CustomerAddress = {\n  __typename?: 'CustomerAddress';\n  city?: Maybe<Scalars['String']['output']>;\n  country?: Maybe<Scalars['String']['output']>;\n  line1?: Maybe<Scalars['String']['output']>;\n  line2?: Maybe<Scalars['String']['output']>;\n  name?: Maybe<Scalars['String']['output']>;\n  postalCode?: Maybe<Scalars['String']['output']>;\n  state?: Maybe<Scalars['String']['output']>;\n};\n\nexport type CustomerCreditsConnection = {\n  __typename?: 'CustomerCreditsConnection';\n  edges: Array<CustomerCreditsConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type CustomerCreditsConnectionEdge = {\n  __typename?: 'CustomerCreditsConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: Credit;\n};\n\nexport type CustomerInvoice = {\n  __typename?: 'CustomerInvoice';\n  amountDue: Scalars['Float']['output'];\n  amountPaid: Scalars['Float']['output'];\n  hostedURL?: Maybe<Scalars['String']['output']>;\n  invoiceId: Scalars['String']['output'];\n  items: Array<SubscriptionItem>;\n  lastPaymentError?: Maybe<Scalars['String']['output']>;\n  paymentIntentStatus?: Maybe<Scalars['String']['output']>;\n  pdfURL?: Maybe<Scalars['String']['output']>;\n  periodEnd: Scalars['String']['output'];\n  periodStart: Scalars['String']['output'];\n  reissuedInvoiceFrom?: Maybe<Scalars['String']['output']>;\n  reissuedInvoiceOf?: Maybe<Scalars['String']['output']>;\n  spendCommitmentPrepayment?: Maybe<Scalars['Boolean']['output']>;\n  status?: Maybe<Scalars['String']['output']>;\n  subscriptionId?: Maybe<Scalars['String']['output']>;\n  subscriptionStatus?: Maybe<Scalars['String']['output']>;\n  total: Scalars['Int']['output'];\n};\n\nexport type CustomerSubscription = {\n  __typename?: 'CustomerSubscription';\n  billingCycleAnchor: Scalars['DateTime']['output'];\n  cancelAt?: Maybe<Scalars['String']['output']>;\n  cancelAtPeriodEnd: Scalars['Boolean']['output'];\n  couponId?: Maybe<Scalars['String']['output']>;\n  discounts: Array<SubscriptionDiscount>;\n  id: Scalars['String']['output'];\n  items: Array<SubscriptionItem>;\n  latestInvoiceId: Scalars['String']['output'];\n  nextInvoiceCurrentTotal: Scalars['Int']['output'];\n  nextInvoiceDate: Scalars['String']['output'];\n  status: Scalars['String']['output'];\n};\n\nexport type CustomerTaxId = {\n  __typename?: 'CustomerTaxId';\n  id: Scalars['String']['output'];\n  type: Scalars['String']['output'];\n  value: Scalars['String']['output'];\n};\n\nexport type DnsRecordPurpose =\n  | 'DNS_RECORD_PURPOSE_ACME_DNS01_CHALLENGE'\n  | 'DNS_RECORD_PURPOSE_TRAFFIC_ROUTE'\n  | 'DNS_RECORD_PURPOSE_UNSPECIFIED'\n  | 'UNRECOGNIZED';\n\nexport type DnsRecordStatus =\n  | 'DNS_RECORD_STATUS_PROPAGATED'\n  | 'DNS_RECORD_STATUS_REQUIRES_UPDATE'\n  | 'DNS_RECORD_STATUS_UNSPECIFIED'\n  | 'UNRECOGNIZED';\n\nexport type DnsRecordType =\n  | 'DNS_RECORD_TYPE_A'\n  | 'DNS_RECORD_TYPE_CNAME'\n  | 'DNS_RECORD_TYPE_NS'\n  | 'DNS_RECORD_TYPE_TXT'\n  | 'DNS_RECORD_TYPE_UNSPECIFIED'\n  | 'UNRECOGNIZED';\n\nexport type DnsRecords = {\n  __typename?: 'DNSRecords';\n  currentValue: Scalars['String']['output'];\n  fqdn: Scalars['String']['output'];\n  hostlabel: Scalars['String']['output'];\n  purpose: DnsRecordPurpose;\n  recordType: DnsRecordType;\n  requiredValue: Scalars['String']['output'];\n  status: DnsRecordStatus;\n  zone: Scalars['String']['output'];\n};\n\nexport type Deployment = Node & {\n  __typename?: 'Deployment';\n  canRedeploy: Scalars['Boolean']['output'];\n  canRollback: Scalars['Boolean']['output'];\n  createdAt: Scalars['DateTime']['output'];\n  creator?: Maybe<DeploymentCreator>;\n  /** Check if a deployment's instances have all stopped */\n  deploymentStopped: Scalars['Boolean']['output'];\n  diagnosis?: Maybe<Scalars['DeploymentDiagnosis']['output']>;\n  environment: Environment;\n  environmentId: Scalars['String']['output'];\n  id: Scalars['ID']['output'];\n  instances: Array<DeploymentDeploymentInstance>;\n  meta?: Maybe<Scalars['DeploymentMeta']['output']>;\n  projectId: Scalars['String']['output'];\n  service: Service;\n  serviceId?: Maybe<Scalars['String']['output']>;\n  snapshotId?: Maybe<Scalars['String']['output']>;\n  sockets: Array<DeploymentSocket>;\n  staticUrl?: Maybe<Scalars['String']['output']>;\n  status: DeploymentStatus;\n  statusUpdatedAt?: Maybe<Scalars['DateTime']['output']>;\n  suggestAddServiceDomain: Scalars['Boolean']['output'];\n  updatedAt: Scalars['DateTime']['output'];\n  url?: Maybe<Scalars['String']['output']>;\n};\n\nexport type DeploymentCreator = {\n  __typename?: 'DeploymentCreator';\n  avatar?: Maybe<Scalars['String']['output']>;\n  email: Scalars['String']['output'];\n  id: Scalars['String']['output'];\n  name?: Maybe<Scalars['String']['output']>;\n};\n\nexport type DeploymentDeploymentInstance = {\n  __typename?: 'DeploymentDeploymentInstance';\n  id: Scalars['String']['output'];\n  status: DeploymentInstanceStatus;\n};\n\nexport type DeploymentEvent = Node & {\n  __typename?: 'DeploymentEvent';\n  completedAt?: Maybe<Scalars['DateTime']['output']>;\n  createdAt: Scalars['DateTime']['output'];\n  id: Scalars['ID']['output'];\n  payload?: Maybe<DeploymentEventPayload>;\n  step: DeploymentEventStep;\n};\n\nexport type DeploymentEventPayload = {\n  __typename?: 'DeploymentEventPayload';\n  error?: Maybe<Scalars['String']['output']>;\n};\n\nexport type DeploymentEventStep =\n  | 'BUILD_IMAGE'\n  | 'CONFIGURE_NETWORK'\n  | 'CREATE_CONTAINER'\n  | 'DRAIN_INSTANCES'\n  | 'HEALTHCHECK'\n  | 'MIGRATE_VOLUMES'\n  | 'PRE_DEPLOY_COMMAND'\n  | 'PUBLISH_IMAGE'\n  | 'SNAPSHOT_CODE'\n  | 'WAIT_FOR_DEPENDENCIES';\n\nexport type DeploymentInstanceExecution = Node & {\n  __typename?: 'DeploymentInstanceExecution';\n  completedAt?: Maybe<Scalars['DateTime']['output']>;\n  createdAt: Scalars['DateTime']['output'];\n  deploymentId: Scalars['String']['output'];\n  deploymentMeta: Scalars['DeploymentMeta']['output'];\n  id: Scalars['ID']['output'];\n  status: DeploymentInstanceStatus;\n  updatedAt: Scalars['DateTime']['output'];\n};\n\nexport type DeploymentInstanceExecutionCreateInput = {\n  serviceInstanceId: Scalars['String']['input'];\n};\n\nexport type DeploymentInstanceExecutionInput = {\n  deploymentId: Scalars['String']['input'];\n};\n\nexport type DeploymentInstanceExecutionListInput = {\n  environmentId: Scalars['String']['input'];\n  serviceId: Scalars['String']['input'];\n};\n\nexport type DeploymentInstanceStatus =\n  | 'CRASHED'\n  | 'CREATED'\n  | 'EXITED'\n  | 'INITIALIZING'\n  | 'REMOVED'\n  | 'REMOVING'\n  | 'RESTARTING'\n  | 'RUNNING'\n  | 'SKIPPED'\n  | 'STOPPED';\n\nexport type DeploymentListInput = {\n  environmentId?: InputMaybe<Scalars['String']['input']>;\n  includeDeleted?: InputMaybe<Scalars['Boolean']['input']>;\n  projectId?: InputMaybe<Scalars['String']['input']>;\n  serviceId?: InputMaybe<Scalars['String']['input']>;\n  status?: InputMaybe<DeploymentStatusInput>;\n};\n\nexport type DeploymentSnapshot = Node & {\n  __typename?: 'DeploymentSnapshot';\n  createdAt: Scalars['DateTime']['output'];\n  id: Scalars['ID']['output'];\n  updatedAt: Scalars['DateTime']['output'];\n  variables: Scalars['EnvironmentVariables']['output'];\n};\n\nexport type DeploymentSocket = {\n  __typename?: 'DeploymentSocket';\n  ipv6: Scalars['Boolean']['output'];\n  port: Scalars['Int']['output'];\n  processName: Scalars['String']['output'];\n  updatedAt: Scalars['Int']['output'];\n};\n\nexport type DeploymentStatus =\n  | 'BUILDING'\n  | 'CRASHED'\n  | 'DEPLOYING'\n  | 'FAILED'\n  | 'INITIALIZING'\n  | 'NEEDS_APPROVAL'\n  | 'QUEUED'\n  | 'REMOVED'\n  | 'REMOVING'\n  | 'SKIPPED'\n  | 'SLEEPING'\n  | 'SUCCESS'\n  | 'WAITING';\n\nexport type DeploymentStatusInput = {\n  in?: InputMaybe<Array<DeploymentStatus>>;\n  notIn?: InputMaybe<Array<DeploymentStatus>>;\n};\n\nexport type DeploymentTrigger = Node & {\n  __typename?: 'DeploymentTrigger';\n  baseEnvironmentOverrideId?: Maybe<Scalars['String']['output']>;\n  branch: Scalars['String']['output'];\n  checkSuites: Scalars['Boolean']['output'];\n  environmentId: Scalars['String']['output'];\n  id: Scalars['ID']['output'];\n  projectId: Scalars['String']['output'];\n  provider: Scalars['String']['output'];\n  repository: Scalars['String']['output'];\n  serviceId?: Maybe<Scalars['String']['output']>;\n  validCheckSuites: Scalars['Int']['output'];\n};\n\nexport type DeploymentTriggerCreateInput = {\n  branch: Scalars['String']['input'];\n  checkSuites?: InputMaybe<Scalars['Boolean']['input']>;\n  environmentId: Scalars['String']['input'];\n  projectId: Scalars['String']['input'];\n  provider: Scalars['String']['input'];\n  repository: Scalars['String']['input'];\n  rootDirectory?: InputMaybe<Scalars['String']['input']>;\n  serviceId: Scalars['String']['input'];\n};\n\nexport type DeploymentTriggerUpdateInput = {\n  branch?: InputMaybe<Scalars['String']['input']>;\n  checkSuites?: InputMaybe<Scalars['Boolean']['input']>;\n  repository?: InputMaybe<Scalars['String']['input']>;\n  rootDirectory?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type DisableServiceCdnInput = {\n  environmentId: Scalars['String']['input'];\n  serviceId: Scalars['String']['input'];\n};\n\nexport type DockerComposeImport = {\n  __typename?: 'DockerComposeImport';\n  errors: Array<Scalars['String']['output']>;\n  patch?: Maybe<Scalars['EnvironmentConfig']['output']>;\n};\n\nexport type Domain = {\n  /** @deprecated Removed; always null. */\n  cdnMode?: Maybe<Scalars['String']['output']>;\n  createdAt?: Maybe<Scalars['DateTime']['output']>;\n  deletedAt?: Maybe<Scalars['DateTime']['output']>;\n  domain: Scalars['String']['output'];\n  edgeId?: Maybe<Scalars['String']['output']>;\n  environmentId: Scalars['String']['output'];\n  id: Scalars['ID']['output'];\n  projectId?: Maybe<Scalars['String']['output']>;\n  serviceId: Scalars['String']['output'];\n  targetPort?: Maybe<Scalars['Int']['output']>;\n  updatedAt?: Maybe<Scalars['DateTime']['output']>;\n};\n\nexport type DomainAvailable = {\n  __typename?: 'DomainAvailable';\n  available: Scalars['Boolean']['output'];\n  message: Scalars['String']['output'];\n};\n\nexport type DomainWithStatus = {\n  __typename?: 'DomainWithStatus';\n  cdnProvider?: Maybe<CdnProvider>;\n  /** Human-readable error message when certificate issuance fails */\n  certificateErrorMessage?: Maybe<Scalars['String']['output']>;\n  /** Structured error type for programmatic handling */\n  certificateErrorType?: Maybe<CertificateErrorType>;\n  /** Whether the certificate issuance can be retried */\n  certificateRetryable?: Maybe<Scalars['Boolean']['output']>;\n  certificateStatus: CertificateStatus;\n  certificateStatusDetailed?: Maybe<CertificateStatusDetailed>;\n  certificates?: Maybe<Array<CertificatePublicData>>;\n  dnsRecords: Array<DnsRecords>;\n  domain?: Maybe<Domain>;\n};\n\nexport type EdgeCachingConfig = {\n  __typename?: 'EdgeCachingConfig';\n  defaultTtlSeconds: Scalars['Int']['output'];\n  htmlCaching: Scalars['String']['output'];\n  mode: Scalars['String']['output'];\n  purgeOnDeploy: PurgeOnDeploy;\n  staleWhileRevalidate: StaleWhileRevalidateConfig;\n};\n\nexport type EdgeCachingConfigInput = {\n  defaultTtlSeconds?: InputMaybe<Scalars['Int']['input']>;\n  htmlCaching?: InputMaybe<Scalars['String']['input']>;\n  mode?: InputMaybe<Scalars['String']['input']>;\n  purgeOnDeploy?: InputMaybe<PurgeOnDeploy>;\n  staleWhileRevalidate?: InputMaybe<StaleWhileRevalidateInput>;\n};\n\nexport type EdgeConfig = {\n  __typename?: 'EdgeConfig';\n  caching?: Maybe<EdgeCachingConfig>;\n  enabled: Scalars['Boolean']['output'];\n  id: Scalars['String']['output'];\n  purgeEpoch: Scalars['Int']['output'];\n  purgeEpochByKind: Scalars['JSON']['output'];\n  underAttackModeUntil?: Maybe<Scalars['Int']['output']>;\n};\n\nexport type EdgeConfigInput = {\n  caching?: InputMaybe<EdgeCachingConfigInput>;\n};\n\nexport type EgressGateway = {\n  __typename?: 'EgressGateway';\n  ipv4: Scalars['String']['output'];\n  region: Scalars['String']['output'];\n  zone?: Maybe<Scalars['String']['output']>;\n};\n\nexport type EgressGatewayCreateInput = {\n  environmentId: Scalars['String']['input'];\n  region?: InputMaybe<Scalars['String']['input']>;\n  serviceId: Scalars['String']['input'];\n};\n\nexport type EgressGatewayServiceTargetInput = {\n  allEnvironments?: InputMaybe<Scalars['Boolean']['input']>;\n  environmentId: Scalars['String']['input'];\n  serviceId: Scalars['String']['input'];\n};\n\nexport type EgressMigrationEnvironmentResult = {\n  __typename?: 'EgressMigrationEnvironmentResult';\n  environmentId: Scalars['String']['output'];\n  environmentName: Scalars['String']['output'];\n  error?: Maybe<Scalars['String']['output']>;\n  gateways: Array<EgressGateway>;\n  success: Scalars['Boolean']['output'];\n};\n\nexport type EgressMigrationResult = {\n  __typename?: 'EgressMigrationResult';\n  environments: Array<EgressMigrationEnvironmentResult>;\n  ips: Array<EgressGateway>;\n};\n\nexport type EnableServiceCdnInput = {\n  config?: InputMaybe<EdgeConfigInput>;\n  environmentId: Scalars['String']['input'];\n  serviceId: Scalars['String']['input'];\n};\n\nexport type Environment = Node & {\n  __typename?: 'Environment';\n  canAccess: Scalars['Boolean']['output'];\n  config: Scalars['EnvironmentConfig']['output'];\n  createdAt: Scalars['DateTime']['output'];\n  deletedAt?: Maybe<Scalars['DateTime']['output']>;\n  deploymentTriggers: EnvironmentDeploymentTriggersConnection;\n  deployments: EnvironmentDeploymentsConnection;\n  id: Scalars['ID']['output'];\n  isEphemeral: Scalars['Boolean']['output'];\n  meta?: Maybe<EnvironmentMeta>;\n  name: Scalars['String']['output'];\n  projectId: Scalars['String']['output'];\n  serviceInstances: EnvironmentServiceInstancesConnection;\n  sourceEnvironment?: Maybe<Environment>;\n  unmergedChangesCount?: Maybe<Scalars['Int']['output']>;\n  updatedAt: Scalars['DateTime']['output'];\n  variables: EnvironmentVariablesConnection;\n  volumeInstances: EnvironmentVolumeInstancesConnection;\n};\n\n\nexport type EnvironmentConfigArgs = {\n  decryptVariables?: InputMaybe<Scalars['Boolean']['input']>;\n};\n\n\nexport type EnvironmentDeploymentTriggersArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\nexport type EnvironmentDeploymentsArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\nexport type EnvironmentServiceInstancesArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\nexport type EnvironmentVariablesArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\nexport type EnvironmentVolumeInstancesArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n};\n\nexport type EnvironmentCreateInput = {\n  /** If true, the changes will be applied in the background and the mutation will return immediately. If false, the mutation will wait for the changes to be applied before returning. */\n  applyChangesInBackground?: InputMaybe<Scalars['Boolean']['input']>;\n  ephemeral?: InputMaybe<Scalars['Boolean']['input']>;\n  name: Scalars['String']['input'];\n  projectId: Scalars['String']['input'];\n  /** When committing the changes immediately, skip any initial deployments. */\n  skipInitialDeploys?: InputMaybe<Scalars['Boolean']['input']>;\n  /** Create the environment with all of the services, volumes, configuration, and variables from this source environment. */\n  sourceEnvironmentId?: InputMaybe<Scalars['String']['input']>;\n  /** Stage the initial changes for the environment. If false (default), the changes will be committed immediately. */\n  stageInitialChanges?: InputMaybe<Scalars['Boolean']['input']>;\n};\n\nexport type EnvironmentDeploymentTriggersConnection = {\n  __typename?: 'EnvironmentDeploymentTriggersConnection';\n  edges: Array<EnvironmentDeploymentTriggersConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type EnvironmentDeploymentTriggersConnectionEdge = {\n  __typename?: 'EnvironmentDeploymentTriggersConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: DeploymentTrigger;\n};\n\nexport type EnvironmentDeploymentsConnection = {\n  __typename?: 'EnvironmentDeploymentsConnection';\n  edges: Array<EnvironmentDeploymentsConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type EnvironmentDeploymentsConnectionEdge = {\n  __typename?: 'EnvironmentDeploymentsConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: Deployment;\n};\n\nexport type EnvironmentMeta = {\n  __typename?: 'EnvironmentMeta';\n  baseBranch?: Maybe<Scalars['String']['output']>;\n  branch?: Maybe<Scalars['String']['output']>;\n  latestSuccessfulGitHubDeploymentId?: Maybe<Scalars['Int']['output']>;\n  prCommentId?: Maybe<Scalars['Int']['output']>;\n  prNumber?: Maybe<Scalars['Int']['output']>;\n  prRepo?: Maybe<Scalars['String']['output']>;\n  prTitle?: Maybe<Scalars['String']['output']>;\n  skippedResourceIds?: Maybe<Scalars['SkippedResourceIds']['output']>;\n};\n\nexport type EnvironmentPatch = Node & {\n  __typename?: 'EnvironmentPatch';\n  appliedAt?: Maybe<Scalars['DateTime']['output']>;\n  appliedBy?: Maybe<AppliedByMember>;\n  createdAt: Scalars['DateTime']['output'];\n  environment: Environment;\n  environmentId: Scalars['String']['output'];\n  id: Scalars['ID']['output'];\n  lastAppliedError?: Maybe<Scalars['String']['output']>;\n  message?: Maybe<Scalars['String']['output']>;\n  patch: Scalars['EnvironmentConfig']['output'];\n  status: EnvironmentPatchStatus;\n  updatedAt: Scalars['DateTime']['output'];\n};\n\n\nexport type EnvironmentPatchPatchArgs = {\n  decryptVariables?: InputMaybe<Scalars['Boolean']['input']>;\n};\n\nexport type EnvironmentPatchStatus =\n  | 'APPLYING'\n  | 'COMMITTED'\n  | 'STAGED';\n\nexport type EnvironmentRenameInput = {\n  name: Scalars['String']['input'];\n};\n\nexport type EnvironmentServiceInstancesConnection = {\n  __typename?: 'EnvironmentServiceInstancesConnection';\n  edges: Array<EnvironmentServiceInstancesConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type EnvironmentServiceInstancesConnectionEdge = {\n  __typename?: 'EnvironmentServiceInstancesConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: ServiceInstance;\n};\n\nexport type EnvironmentTriggersDeployInput = {\n  environmentId: Scalars['String']['input'];\n  projectId: Scalars['String']['input'];\n  serviceId: Scalars['String']['input'];\n};\n\nexport type EnvironmentVariablesConnection = {\n  __typename?: 'EnvironmentVariablesConnection';\n  edges: Array<EnvironmentVariablesConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type EnvironmentVariablesConnectionEdge = {\n  __typename?: 'EnvironmentVariablesConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: Variable;\n};\n\nexport type EnvironmentVolumeInstancesConnection = {\n  __typename?: 'EnvironmentVolumeInstancesConnection';\n  edges: Array<EnvironmentVolumeInstancesConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type EnvironmentVolumeInstancesConnectionEdge = {\n  __typename?: 'EnvironmentVolumeInstancesConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: VolumeInstance;\n};\n\n/** The estimated usage of a single measurement. */\nexport type EstimatedUsage = {\n  __typename?: 'EstimatedUsage';\n  /** The estimated value. */\n  estimatedValue: Scalars['Float']['output'];\n  /** The measurement that was estimated. */\n  measurement: MetricMeasurement;\n  projectId: Scalars['String']['output'];\n};\n\nexport type Event = Node & {\n  __typename?: 'Event';\n  action: Scalars['String']['output'];\n  /** Minimal event payload for activity feed list rendering. Avoids returning large deployment payload fields like commit messages. */\n  activityPayload?: Maybe<Scalars['JSON']['output']>;\n  createdAt: Scalars['DateTime']['output'];\n  environment?: Maybe<Environment>;\n  environmentId?: Maybe<Scalars['String']['output']>;\n  id: Scalars['ID']['output'];\n  object: Scalars['String']['output'];\n  payload?: Maybe<Scalars['JSON']['output']>;\n  project: Project;\n  projectId?: Maybe<Scalars['String']['output']>;\n  severity: EventSeverity;\n};\n\nexport type EventFilterInput = {\n  action?: InputMaybe<EventStringListFilter>;\n  object?: InputMaybe<EventStringListFilter>;\n  serviceId?: InputMaybe<EventStringListFilter>;\n};\n\nexport type EventSeverity =\n  | 'CRITICAL'\n  | 'INFO'\n  | 'NOTICE'\n  | 'WARNING';\n\nexport type EventStringListFilter = {\n  in?: InputMaybe<Array<Scalars['String']['input']>>;\n  notIn?: InputMaybe<Array<Scalars['String']['input']>>;\n};\n\nexport type ExplicitOwnerInput = {\n  /** The ID of the owner */\n  id: Scalars['String']['input'];\n  /** The type of owner */\n  type?: InputMaybe<ResourceOwnerType>;\n};\n\nexport type ExternalWorkspace = {\n  __typename?: 'ExternalWorkspace';\n  /** @deprecated Deprecated regions are no longer supported. */\n  allowDeprecatedRegions?: Maybe<Scalars['Boolean']['output']>;\n  avatar?: Maybe<Scalars['String']['output']>;\n  banReason?: Maybe<Scalars['String']['output']>;\n  createdAt: Scalars['DateTime']['output'];\n  currentSessionHasAccess?: Maybe<Scalars['Boolean']['output']>;\n  customerId?: Maybe<Scalars['String']['output']>;\n  customerState: SubscriptionState;\n  discordRole?: Maybe<Scalars['String']['output']>;\n  has2FAEnforcement: Scalars['Boolean']['output'];\n  hasAutomaticDiagnosis: Scalars['Boolean']['output'];\n  /** @deprecated Deprecated in favour of the SpendCommitment schema. */\n  hasBAA: Scalars['Boolean']['output'];\n  hasGuardrailsAccess: Scalars['Boolean']['output'];\n  /** @deprecated Deprecated in favour of the SpendCommitment schema. */\n  hasRBAC: Scalars['Boolean']['output'];\n  hasSAML: Scalars['Boolean']['output'];\n  id: Scalars['String']['output'];\n  isTrialing?: Maybe<Scalars['Boolean']['output']>;\n  name: Scalars['String']['output'];\n  plan: Plan;\n  preferredRegion?: Maybe<Scalars['String']['output']>;\n  projects: Array<Project>;\n  redactedDueTo2FAPending: Scalars['Boolean']['output'];\n  subscriptionPlanLimit?: Maybe<Scalars['SubscriptionPlanLimit']['output']>;\n  supportTierOverride?: Maybe<Scalars['String']['output']>;\n  teamId?: Maybe<Scalars['String']['output']>;\n};\n\nexport type FeatureFlagToggleInput = {\n  flag: ActiveFeatureFlag;\n};\n\nexport type FunctionRuntime = {\n  __typename?: 'FunctionRuntime';\n  /** The image of the function runtime */\n  image: Scalars['String']['output'];\n  /** The latest version of the function runtime */\n  latestVersion: FunctionRuntimeVersion;\n  /** The name of the function runtime */\n  name: FunctionRuntimeName;\n  /** The versions of the function runtime */\n  versions: Array<FunctionRuntimeVersion>;\n};\n\n/** Supported function runtime environments */\nexport type FunctionRuntimeName =\n  | 'bun';\n\nexport type FunctionRuntimeVersion = {\n  __typename?: 'FunctionRuntimeVersion';\n  image: Scalars['String']['output'];\n  tag: Scalars['String']['output'];\n};\n\nexport type GitHubAccess = {\n  __typename?: 'GitHubAccess';\n  hasAccess: Scalars['Boolean']['output'];\n  isPublic: Scalars['Boolean']['output'];\n};\n\nexport type GitHubBranch = {\n  __typename?: 'GitHubBranch';\n  name: Scalars['String']['output'];\n};\n\nexport type GitHubCheck = {\n  __typename?: 'GitHubCheck';\n  name: Scalars['String']['output'];\n  status: Scalars['String']['output'];\n};\n\nexport type GitHubPrInfo = {\n  __typename?: 'GitHubPRInfo';\n  additions: Scalars['Int']['output'];\n  author: Scalars['String']['output'];\n  body: Scalars['String']['output'];\n  changedFiles: Scalars['Int']['output'];\n  checks: Array<GitHubCheck>;\n  deletions: Scalars['Int']['output'];\n  mergeable?: Maybe<Scalars['Boolean']['output']>;\n  state: Scalars['String']['output'];\n  title: Scalars['String']['output'];\n};\n\nexport type GitHubPrInfoResult = {\n  __typename?: 'GitHubPRInfoResult';\n  error?: Maybe<Scalars['String']['output']>;\n  prInfo?: Maybe<GitHubPrInfo>;\n};\n\nexport type GitHubRepo = {\n  __typename?: 'GitHubRepo';\n  defaultBranch: Scalars['String']['output'];\n  description?: Maybe<Scalars['String']['output']>;\n  fullName: Scalars['String']['output'];\n  id: Scalars['Int']['output'];\n  installationId: Scalars['String']['output'];\n  isPrivate: Scalars['Boolean']['output'];\n  name: Scalars['String']['output'];\n  ownerAvatarUrl?: Maybe<Scalars['String']['output']>;\n};\n\nexport type GitHubRepoDeployInput = {\n  branch?: InputMaybe<Scalars['String']['input']>;\n  environmentId?: InputMaybe<Scalars['String']['input']>;\n  projectId: Scalars['String']['input'];\n  repo: Scalars['String']['input'];\n};\n\nexport type GitHubRepoUpdateInput = {\n  environmentId: Scalars['String']['input'];\n  projectId: Scalars['String']['input'];\n  serviceId: Scalars['String']['input'];\n};\n\nexport type GitHubRepoWithoutInstallation = {\n  __typename?: 'GitHubRepoWithoutInstallation';\n  defaultBranch: Scalars['String']['output'];\n  description?: Maybe<Scalars['String']['output']>;\n  fullName: Scalars['String']['output'];\n  id: Scalars['Int']['output'];\n  isPrivate: Scalars['Boolean']['output'];\n  name: Scalars['String']['output'];\n};\n\n/** An SSH public key from GitHub. */\nexport type GitHubSshKey = {\n  __typename?: 'GitHubSshKey';\n  id: Scalars['Int']['output'];\n  key: Scalars['String']['output'];\n  title: Scalars['String']['output'];\n};\n\nexport type HerokuApp = {\n  __typename?: 'HerokuApp';\n  id: Scalars['String']['output'];\n  name: Scalars['String']['output'];\n};\n\nexport type HerokuImportVariablesInput = {\n  environmentId: Scalars['String']['input'];\n  herokuAppId: Scalars['String']['input'];\n  projectId: Scalars['String']['input'];\n  serviceId: Scalars['String']['input'];\n};\n\n/** The result of an HTTP duration metrics query. */\nexport type HttpDurationMetricsResult = {\n  __typename?: 'HttpDurationMetricsResult';\n  /** The samples of HTTP duration metrics. */\n  samples: Array<HttpDurationMetricsSample>;\n};\n\n/** A single sample of HTTP duration metrics. */\nexport type HttpDurationMetricsSample = {\n  __typename?: 'HttpDurationMetricsSample';\n  /** 50th percentile (median) request duration in milliseconds. */\n  p50: Scalars['Float']['output'];\n  /** 90th percentile request duration in milliseconds. */\n  p90: Scalars['Float']['output'];\n  /** 95th percentile request duration in milliseconds. */\n  p95: Scalars['Float']['output'];\n  /** 99th percentile request duration in milliseconds. */\n  p99: Scalars['Float']['output'];\n  /** The timestamp of the sample. Represented as number of seconds since the Unix epoch. */\n  ts: Scalars['Int']['output'];\n};\n\n/** The result of a http logs query. */\nexport type HttpLog = {\n  __typename?: 'HttpLog';\n  /** The client user agent */\n  clientUa: Scalars['String']['output'];\n  /** The deployment ID that was requested */\n  deploymentId: Scalars['String']['output'];\n  /** The deployment instance ID that was requested */\n  deploymentInstanceId: Scalars['String']['output'];\n  /** The downstream HTTP protocol version */\n  downstreamProto: Scalars['String']['output'];\n  /** The edge region the client connected to */\n  edgeRegion: Scalars['String']['output'];\n  /** The requested host */\n  host: Scalars['String']['output'];\n  /** The http status of the log */\n  httpStatus: Scalars['Int']['output'];\n  /** The request HTTP method */\n  method: Scalars['String']['output'];\n  /** The requested path */\n  path: Scalars['String']['output'];\n  /** The unique request ID */\n  requestId: Scalars['String']['output'];\n  /** Details about the upstream response */\n  responseDetails: Scalars['String']['output'];\n  /** Received bytes */\n  rxBytes: Scalars['Int']['output'];\n  /** The source IP of the request */\n  srcIp: Scalars['String']['output'];\n  /** The timestamp the log was created */\n  timestamp: Scalars['String']['output'];\n  /** The total duration the request took */\n  totalDuration: Scalars['Int']['output'];\n  /** Outgoing bytes */\n  txBytes: Scalars['Int']['output'];\n  /** The upstream address */\n  upstreamAddress: Scalars['String']['output'];\n  /** Any upstream errors that occurred */\n  upstreamErrors: Scalars['String']['output'];\n  /** The upstream HTTP protocol version */\n  upstreamProto: Scalars['String']['output'];\n  /** How long the upstream request took to respond */\n  upstreamRqDuration: Scalars['Int']['output'];\n};\n\n/** HTTP metrics grouped by status code. */\nexport type HttpMetricsByStatusResult = {\n  __typename?: 'HttpMetricsByStatusResult';\n  /** The samples of HTTP metrics for this status code. */\n  samples: Array<HttpMetricsSample>;\n  /** The HTTP status code. */\n  statusCode: Scalars['Int']['output'];\n};\n\n/** The result of an HTTP metrics query. */\nexport type HttpMetricsResult = {\n  __typename?: 'HttpMetricsResult';\n  /** The samples of HTTP metrics. */\n  samples: Array<HttpMetricsSample>;\n};\n\n/** A single sample of an HTTP metric. */\nexport type HttpMetricsSample = {\n  __typename?: 'HttpMetricsSample';\n  /** The timestamp of the sample. Represented as number of seconds since the Unix epoch. */\n  ts: Scalars['Int']['output'];\n  /** The value of the sample (count of requests). */\n  value: Scalars['Float']['output'];\n};\n\nexport type Incident = {\n  __typename?: 'Incident';\n  createdAt?: Maybe<Scalars['DateTime']['output']>;\n  id: Scalars['String']['output'];\n  message: Scalars['String']['output'];\n  status: IncidentStatus;\n  url: Scalars['String']['output'];\n};\n\nexport type IncidentStatus =\n  | 'IDENTIFIED'\n  | 'INVESTIGATING'\n  | 'MONITORING'\n  | 'RESOLVED';\n\nexport type Integration = Node & {\n  __typename?: 'Integration';\n  config: Scalars['JSON']['output'];\n  id: Scalars['ID']['output'];\n  name: Scalars['String']['output'];\n  projectId: Scalars['String']['output'];\n};\n\nexport type IntegrationAuth = Node & {\n  __typename?: 'IntegrationAuth';\n  id: Scalars['ID']['output'];\n  integrations: IntegrationAuthIntegrationsConnection;\n  provider: Scalars['String']['output'];\n  providerId: Scalars['String']['output'];\n};\n\n\nexport type IntegrationAuthIntegrationsArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n};\n\nexport type IntegrationAuthIntegrationsConnection = {\n  __typename?: 'IntegrationAuthIntegrationsConnection';\n  edges: Array<IntegrationAuthIntegrationsConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type IntegrationAuthIntegrationsConnectionEdge = {\n  __typename?: 'IntegrationAuthIntegrationsConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: Integration;\n};\n\nexport type IntegrationCreateInput = {\n  config: Scalars['JSON']['input'];\n  integrationAuthId?: InputMaybe<Scalars['String']['input']>;\n  name: Scalars['String']['input'];\n  projectId: Scalars['String']['input'];\n};\n\nexport type IntegrationUpdateInput = {\n  config: Scalars['JSON']['input'];\n  integrationAuthId?: InputMaybe<Scalars['String']['input']>;\n  name: Scalars['String']['input'];\n  projectId: Scalars['String']['input'];\n};\n\nexport type InviteCode = Node & {\n  __typename?: 'InviteCode';\n  code: Scalars['String']['output'];\n  createdAt: Scalars['DateTime']['output'];\n  id: Scalars['ID']['output'];\n  project: Project;\n  projectId: Scalars['String']['output'];\n  role: ProjectRole;\n};\n\nexport type JobApplicationCreateInput = {\n  email: Scalars['String']['input'];\n  jobId: Scalars['String']['input'];\n  name: Scalars['String']['input'];\n  why: Scalars['String']['input'];\n};\n\nexport type KeyType =\n  | 'KEY_TYPE_ECDSA'\n  | 'KEY_TYPE_RSA_2048'\n  | 'KEY_TYPE_RSA_4096'\n  | 'KEY_TYPE_UNSPECIFIED'\n  | 'UNRECOGNIZED';\n\n/** The result of a logs query. */\nexport type Log = {\n  __typename?: 'Log';\n  /** The attributes that were parsed from a structured log */\n  attributes: Array<LogAttribute>;\n  /** The contents of the log message */\n  message: Scalars['String']['output'];\n  /** The severity of the log message (eg. err) */\n  severity?: Maybe<Scalars['String']['output']>;\n  /** The tags that were associated with the log */\n  tags?: Maybe<LogTags>;\n  /** The timestamp of the log message in format RFC3339 (nano) */\n  timestamp: Scalars['String']['output'];\n};\n\n/** The attributes associated with a structured log */\nexport type LogAttribute = {\n  __typename?: 'LogAttribute';\n  key: Scalars['String']['output'];\n  value: Scalars['String']['output'];\n};\n\n/** The tags associated with a specific log */\nexport type LogTags = {\n  __typename?: 'LogTags';\n  deploymentId?: Maybe<Scalars['String']['output']>;\n  deploymentInstanceId?: Maybe<Scalars['String']['output']>;\n  environmentId?: Maybe<Scalars['String']['output']>;\n  /** @deprecated Plugins have been removed */\n  pluginId?: Maybe<Scalars['String']['output']>;\n  projectId?: Maybe<Scalars['String']['output']>;\n  serviceId?: Maybe<Scalars['String']['output']>;\n  snapshotId?: Maybe<Scalars['String']['output']>;\n};\n\nexport type LoginSessionAuthInput = {\n  code: Scalars['String']['input'];\n  hostname?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type MaintainerWorkspace = {\n  __typename?: 'MaintainerWorkspace';\n  avatar?: Maybe<Scalars['String']['output']>;\n  id: Scalars['String']['output'];\n  name: Scalars['String']['output'];\n  partnerProfile?: Maybe<PartnerProfile>;\n};\n\nexport type Maintenance = {\n  __typename?: 'Maintenance';\n  id: Scalars['String']['output'];\n  message: Scalars['String']['output'];\n  start: Scalars['DateTime']['output'];\n  status: MaintenanceStatus;\n  url: Scalars['String']['output'];\n};\n\nexport type MaintenanceStatus =\n  | 'COMPLETED'\n  | 'INPROGRESS'\n  | 'NOTSTARTEDYET';\n\n/** A single sample of a metric. */\nexport type Metric = {\n  __typename?: 'Metric';\n  /** The timestamp of the sample. Represented has number of seconds since the Unix epoch. */\n  ts: Scalars['Int']['output'];\n  /** The value of the sample. */\n  value: Scalars['Float']['output'];\n};\n\n/** A thing that can be measured on Railway. */\nexport type MetricMeasurement =\n  | 'BACKUP_USAGE_GB'\n  | 'CPU_LIMIT'\n  | 'CPU_USAGE'\n  | 'CPU_USAGE_2'\n  | 'DISK_USAGE_GB'\n  | 'EPHEMERAL_DISK_USAGE_GB'\n  | 'MEASUREMENT_UNSPECIFIED'\n  | 'MEMORY_LIMIT_GB'\n  | 'MEMORY_USAGE_GB'\n  | 'NETWORK_RX_GB'\n  | 'NETWORK_TX_GB'\n  | 'UNRECOGNIZED';\n\n/** A property that can be used to group metrics. */\nexport type MetricTag =\n  | 'DEPLOYMENT_ID'\n  | 'DEPLOYMENT_INSTANCE_ID'\n  | 'ENVIRONMENT_ID'\n  | 'HOST_TYPE'\n  | 'KEY_UNSPECIFIED'\n  | 'PLUGIN_ID'\n  | 'PROJECT_ID'\n  | 'REGION'\n  | 'SERVICE_ID'\n  | 'UNRECOGNIZED'\n  | 'VOLUME_ID'\n  | 'VOLUME_INSTANCE_ID';\n\n/** The tags that were used to group the metric. */\nexport type MetricTags = {\n  __typename?: 'MetricTags';\n  deploymentId?: Maybe<Scalars['String']['output']>;\n  deploymentInstanceId?: Maybe<Scalars['String']['output']>;\n  environmentId?: Maybe<Scalars['String']['output']>;\n  /** @deprecated Plugins have been removed */\n  pluginId?: Maybe<Scalars['String']['output']>;\n  projectId?: Maybe<Scalars['String']['output']>;\n  region?: Maybe<Scalars['String']['output']>;\n  serviceId?: Maybe<Scalars['String']['output']>;\n  volumeId?: Maybe<Scalars['String']['output']>;\n  volumeInstanceId?: Maybe<Scalars['String']['output']>;\n};\n\n/** The result of a metrics query. */\nexport type MetricsResult = {\n  __typename?: 'MetricsResult';\n  /** The measurement of the metric. */\n  measurement: MetricMeasurement;\n  /** The tags that were used to group the metric. Only the tags that were used to by will be present. */\n  tags: MetricTags;\n  /** The samples of the metric. */\n  values: Array<Metric>;\n};\n\nexport type MonitorAlertResourceType =\n  | 'SERVICE'\n  | 'VOLUME';\n\nexport type MonitorStatus =\n  | 'ALERT'\n  | 'OK';\n\nexport type MonitorThresholdCondition =\n  | 'above'\n  | 'below';\n\nexport type MonitorThresholdConfig = {\n  __typename?: 'MonitorThresholdConfig';\n  condition: MonitorThresholdCondition;\n  measurement?: Maybe<MetricMeasurement>;\n  threshold: Scalars['Float']['output'];\n  type: Scalars['String']['output'];\n};\n\nexport type Mutation = {\n  __typename?: 'Mutation';\n  /** Creates a new API token. */\n  apiTokenCreate: Scalars['String']['output'];\n  /** Deletes an API token. */\n  apiTokenDelete: Scalars['Boolean']['output'];\n  /** Sets the base environment override for a deployment trigger. */\n  baseEnvironmentOverride: Scalars['Boolean']['output'];\n  /** Create a bucket in a project */\n  bucketCreate: Bucket;\n  /** Reset the credentials for a bucket in an environment */\n  bucketCredentialsReset: BucketS3CompatibleCredentials;\n  /** Updates a bucket. */\n  bucketUpdate: Bucket;\n  /** Merge a canvas layout from one environment into another. Re-computes the merge from current state and applies mutations. */\n  canvasViewMerge: Scalars['Boolean']['output'];\n  /** Track CLI authentication-attempt outcomes (signup / sign-in funnel) */\n  cliAuthEventTrack: Scalars['Boolean']['output'];\n  /** Track events from the Railway CLI */\n  cliEventTrack: Scalars['Boolean']['output'];\n  /** Creates a new custom domain. */\n  customDomainCreate: CustomDomain;\n  /** Deletes a custom domain. */\n  customDomainDelete: Scalars['Boolean']['output'];\n  /** Updates a custom domain. */\n  customDomainUpdate: Scalars['Boolean']['output'];\n  /** Create a free plan subscription for a customer */\n  customerCreateFreePlanSubscription: Scalars['Boolean']['output'];\n  /** Toggle whether a customer is automatically withdrawing to credits */\n  customerTogglePayoutsToCredits: Scalars['Boolean']['output'];\n  /** Approves a deployment. */\n  deploymentApprove: Scalars['Boolean']['output'];\n  /** Cancels a deployment. */\n  deploymentCancel: Scalars['Boolean']['output'];\n  /** Invoke a deployment instance execution. */\n  deploymentInstanceExecutionCreate: Scalars['Boolean']['output'];\n  /** Redeploys a deployment. */\n  deploymentRedeploy: Deployment;\n  /** Removes a deployment. */\n  deploymentRemove: Scalars['Boolean']['output'];\n  /** Restarts a deployment. */\n  deploymentRestart: Scalars['Boolean']['output'];\n  /** Rolls back to a deployment. */\n  deploymentRollback: Scalars['Boolean']['output'];\n  /** Stops a deployment. */\n  deploymentStop: Scalars['Boolean']['output'];\n  /** Creates a deployment trigger. */\n  deploymentTriggerCreate: DeploymentTrigger;\n  /** Deletes a deployment trigger. */\n  deploymentTriggerDelete: Scalars['Boolean']['output'];\n  /** Updates a deployment trigger. */\n  deploymentTriggerUpdate: DeploymentTrigger;\n  /** Disables CDN for a service, soft-deleting the edge config. */\n  disableServiceCdn: Scalars['Boolean']['output'];\n  /** Create services and volumes from docker compose */\n  dockerComposeImport: DockerComposeImport;\n  /** Create a new egress gateway association for a service instance */\n  egressGatewayAssociationCreate: Array<EgressGateway>;\n  /** Clear all egress gateway associations for a service instance */\n  egressGatewayAssociationsClear: Scalars['Boolean']['output'];\n  /** Preview the HA static egress IPs that would be assigned, without applying them. Set allEnvironments to cover all of the service's environments. */\n  egressGatewayHAMigrationPreview: EgressMigrationResult;\n  /** Switch a service from HA static egress IPs back to a standard static IP. Set allEnvironments to apply to all of the service's environments. */\n  egressGatewayRollbackFromHA: Array<EgressGateway>;\n  /** Enable HA static egress IPs for a service. Set allEnvironments to apply to all of the service's environments. */\n  egressGatewayUpgradeToHA: Array<EgressGateway>;\n  /** Change the User's account email if there is a valid change email request. */\n  emailChangeConfirm: Scalars['Boolean']['output'];\n  /** Initiate an email change request for a user */\n  emailChangeInitiate: Scalars['Boolean']['output'];\n  /** Enables CDN for a service, creating an edge config and attaching all live domains. */\n  enableServiceCdn: EdgeConfig;\n  /** Experimental: applies an intent-level RailwayChangeSet and returns operation results. */\n  environmentApplyChangeSet: ChangeSetApplyResult;\n  /** Creates a new environment. */\n  environmentCreate: Environment;\n  /** Deletes an environment. */\n  environmentDelete: Scalars['Boolean']['output'];\n  /** Commit the provided patch to the environment. */\n  environmentPatchCommit: Scalars['String']['output'];\n  /** Commits the staged changes for a single environment. */\n  environmentPatchCommitStaged: Scalars['String']['output'];\n  /** Experimental: previews an intent-level RailwayChangeSet without side effects. */\n  environmentPreviewChangeSet: ChangeSetPreview;\n  /** Renames an environment. */\n  environmentRename: Environment;\n  /** Sets the staged patch for a single environment. */\n  environmentStageChanges: EnvironmentPatch;\n  /** Deploys all connected triggers for an environment. */\n  environmentTriggersDeploy: Scalars['Boolean']['output'];\n  /** Unskip a service in a PR environment, deploying it and its transitive dependencies. */\n  environmentUnskipService: Scalars['Boolean']['output'];\n  /** Agree to the fair use policy for the currently authenticated user */\n  fairUseAgree: Scalars['Boolean']['output'];\n  /** Add a feature flag for a user */\n  featureFlagAdd: Scalars['Boolean']['output'];\n  /** Remove a feature flag for a user */\n  featureFlagRemove: Scalars['Boolean']['output'];\n  /** Mints a 5-minute JWT for opening a browser WS session against tcp-proxy. */\n  generateShellToken: Scalars['String']['output'];\n  /** Deploys a GitHub repo */\n  githubRepoDeploy: Scalars['String']['output'];\n  /** Updates a GitHub repo through the linked template */\n  githubRepoUpdate: Scalars['Boolean']['output'];\n  /** Import variables from a Heroku app into a Railway service. Returns the number of variables imports */\n  herokuImportVariables: Scalars['Int']['output'];\n  /** Create an integration for a project */\n  integrationCreate: Integration;\n  /** Delete an integration for a project */\n  integrationDelete: Scalars['Boolean']['output'];\n  /** Update an integration for a project */\n  integrationUpdate: Integration;\n  /** Join a project using an invite code */\n  inviteCodeUse: Project;\n  /** Creates a new job application. */\n  jobApplicationCreate: Scalars['Boolean']['output'];\n  /** Auth a login session for a user */\n  loginSessionAuth: Scalars['Boolean']['output'];\n  /** Cancel a login session */\n  loginSessionCancel: Scalars['Boolean']['output'];\n  /** Get a token for a login session if it exists */\n  loginSessionConsume?: Maybe<Scalars['String']['output']>;\n  /** Start a CLI login session */\n  loginSessionCreate: Scalars['String']['output'];\n  /** Verify if a login session is valid */\n  loginSessionVerify: Scalars['Boolean']['output'];\n  /** Marks notification deliveries as read */\n  notificationDeliveriesMarkAsRead: Scalars['Boolean']['output'];\n  /** Create a new notification rule */\n  notificationRuleCreate: NotificationRule;\n  /** Delete a notification rule */\n  notificationRuleDelete: Scalars['Boolean']['output'];\n  /** Update a notification rule */\n  notificationRuleUpdate: NotificationRule;\n  /** Create an observability dashboard */\n  observabilityDashboardCreate: Scalars['Boolean']['output'];\n  /** Reset an observability dashboard to default dashboard items */\n  observabilityDashboardReset: Scalars['Boolean']['output'];\n  /** Update an observability dashboard */\n  observabilityDashboardUpdate: Scalars['Boolean']['output'];\n  /** Deletes a Passkey */\n  passkeyDelete: Scalars['Boolean']['output'];\n  /**\n   * Creates a new plugin.\n   * @deprecated Plugins are deprecated on Railway. Use database templates instead.\n   */\n  pluginCreate: Plugin;\n  /**\n   * Deletes a plugin.\n   * @deprecated Plugins are deprecated\n   */\n  pluginDelete: Scalars['Boolean']['output'];\n  /**\n   * Reset envs and container for a plugin in an environment\n   * @deprecated Plugins are deprecated\n   */\n  pluginReset: Scalars['Boolean']['output'];\n  /**\n   * Resets the credentials for a plugin in an environment\n   * @deprecated Plugins are deprecated\n   */\n  pluginResetCredentials: Scalars['String']['output'];\n  /**\n   * Restarts a plugin.\n   * @deprecated Plugins are deprecated\n   */\n  pluginRestart: Plugin;\n  /**\n   * Force start a plugin\n   * @deprecated Plugins are deprecated\n   */\n  pluginStart: Scalars['Boolean']['output'];\n  /**\n   * Updates an existing plugin.\n   * @deprecated Plugins are deprecated\n   */\n  pluginUpdate: Plugin;\n  /** Update the email preferences for a user */\n  preferencesUpdate: Preferences;\n  /** Create or get a private network. */\n  privateNetworkCreateOrGet: PrivateNetwork;\n  /** Create or get a private network endpoint. */\n  privateNetworkEndpointCreateOrGet: PrivateNetworkEndpoint;\n  /** Delete a private network endpoint. */\n  privateNetworkEndpointDelete: Scalars['Boolean']['output'];\n  /** Rename a private network endpoint. */\n  privateNetworkEndpointRename: Scalars['Boolean']['output'];\n  /** Delete all private networks for an environment. */\n  privateNetworksForEnvironmentDelete: Scalars['Boolean']['output'];\n  /** Claims a project. */\n  projectClaim: Project;\n  /** Creates a new project. */\n  projectCreate: Project;\n  /** Deletes a project. */\n  projectDelete: Scalars['Boolean']['output'];\n  /** Add a feature flag for a project */\n  projectFeatureFlagAdd: Scalars['Boolean']['output'];\n  /** Remove a feature flag for a project */\n  projectFeatureFlagRemove: Scalars['Boolean']['output'];\n  /** Accept a project invitation using the invite code */\n  projectInvitationAccept: ProjectPermission;\n  /** Create an invitation for a project */\n  projectInvitationCreate: ProjectInvitation;\n  /** Delete an invitation for a project */\n  projectInvitationDelete: Scalars['Boolean']['output'];\n  /** Resend an invitation for a project */\n  projectInvitationResend: ProjectInvitation;\n  /** Invite a user by email to a project */\n  projectInviteUser: Scalars['Boolean']['output'];\n  /** Leave project as currently authenticated user */\n  projectLeave: Scalars['Boolean']['output'];\n  /** Add a workspace member to a project with a specific role. The user must already be a member of the project's workspace. */\n  projectMemberAdd: ProjectMember;\n  /** Remove user from a project */\n  projectMemberRemove: Array<ProjectMember>;\n  /** Change the role for a user within a project */\n  projectMemberUpdate: ProjectMember;\n  /** Deletes a project with a 48 hour grace period. */\n  projectScheduleDelete: Scalars['Boolean']['output'];\n  /** Cancel scheduled deletion of a project */\n  projectScheduleDeleteCancel: Scalars['Boolean']['output'];\n  /** Force delete a scheduled deletion of a project (skips the grace period) */\n  projectScheduleDeleteForce: Scalars['Boolean']['output'];\n  /** Create a token for a project that has access to a specific environment */\n  projectTokenCreate: Scalars['String']['output'];\n  /** Delete a project token */\n  projectTokenDelete: Scalars['Boolean']['output'];\n  /** Transfer a project to a workspace */\n  projectTransfer: Scalars['Boolean']['output'];\n  /** Confirm the transfer of project ownership */\n  projectTransferConfirm: Scalars['Boolean']['output'];\n  /** Initiate the transfer of project ownership */\n  projectTransferInitiate: Scalars['Boolean']['output'];\n  /**\n   * Transfer a project to a team\n   * @deprecated Use projectTransfer instead\n   */\n  projectTransferToTeam: Scalars['Boolean']['output'];\n  /** Updates a project. */\n  projectUpdate: Project;\n  /** Deletes a ProviderAuth. */\n  providerAuthRemove: Scalars['Boolean']['output'];\n  /** Purges the CDN cache for a service. Bumps the edge config's purge epoch so every edge node treats prior cached entries as stale on next request. Idempotent; returns true even if CDN is disabled for the service. */\n  purgeServiceCache: Scalars['Boolean']['output'];\n  /** Generates a new set of recovery codes for the authenticated user. */\n  recoveryCodeGenerate: RecoveryCodes;\n  /** Validates a recovery code. */\n  recoveryCodeValidate: Scalars['Boolean']['output'];\n  /** Updates the ReferralInfo for the authenticated user. */\n  referralInfoUpdate: ReferralInfo;\n  /** Capture a running sandbox's current disk into a reusable, named checkpoint. Synchronous: the checkpoint is ready when this returns. */\n  sandboxCheckpointCreate: SandboxCheckpoint;\n  /** Delete a sandbox checkpoint. */\n  sandboxCheckpointDelete: Scalars['Boolean']['output'];\n  /** Rename a sandbox checkpoint. */\n  sandboxCheckpointRename: SandboxCheckpoint;\n  /** Create a sandbox in an environment. */\n  sandboxCreate: Sandbox;\n  /** Destroy a sandbox. */\n  sandboxDestroy?: Maybe<Sandbox>;\n  /** Execute a command inside a running sandbox. */\n  sandboxExec: SandboxExecResult;\n  /** Extend a sandbox's lifetime. */\n  sandboxHeartbeat?: Maybe<Sandbox>;\n  /** Build a sandbox template into a bootable checkpoint. */\n  sandboxTemplateBuild: SandboxTemplateBuild;\n  /** Connect a service to a source */\n  serviceConnect: Service;\n  /** Creates a new service. */\n  serviceCreate: Service;\n  /** Deletes a service. */\n  serviceDelete: Scalars['Boolean']['output'];\n  /** Disconnect a service from a repo */\n  serviceDisconnect: Service;\n  /** Creates a new service domain. */\n  serviceDomainCreate: ServiceDomain;\n  /** Deletes a service domain. */\n  serviceDomainDelete: Scalars['Boolean']['output'];\n  /** Updates a service domain. */\n  serviceDomainUpdate: Scalars['Boolean']['output'];\n  /**\n   * Duplicate a service, including its configuration, variables, and volumes.\n   * @deprecated This API route is used only by the CLI. We plan to remove it in a future version. Please use the UI to duplicate services.\n   */\n  serviceDuplicate: Service;\n  /** Add a feature flag for a service */\n  serviceFeatureFlagAdd: Scalars['Boolean']['output'];\n  /** Remove a feature flag for a service */\n  serviceFeatureFlagRemove: Scalars['Boolean']['output'];\n  /** Enables or disables auto-deploy for a service instance. */\n  serviceInstanceAutoDeployUpdate: ServiceInstanceAutoDeployUpdateResult;\n  /** Deploy a service instance */\n  serviceInstanceDeploy: Scalars['Boolean']['output'];\n  /** Deploy a service instance. Returns a deployment ID */\n  serviceInstanceDeployV2: Scalars['String']['output'];\n  /** Update the resource limits for a service instance */\n  serviceInstanceLimitsUpdate: Scalars['Boolean']['output'];\n  /** Redeploy a service instance */\n  serviceInstanceRedeploy: Scalars['Boolean']['output'];\n  /** Update a service instance */\n  serviceInstanceUpdate: Scalars['Boolean']['output'];\n  /** Remove the upstream URL from all service instances for this service */\n  serviceRemoveUpstreamUrl: Service;\n  /** Updates a service. */\n  serviceUpdate: Service;\n  /** Deletes a session. */\n  sessionDelete: Scalars['Boolean']['output'];\n  /** Enables or disables Under Attack Mode for a service. While enabled, the edge serves a browser challenge to unverified visitors of the service's edge-routed domains; non-browser clients (APIs, webhooks) without a clearance cookie are rejected with a 429. Optionally time-boxed via durationSeconds, after which the mode disarms automatically. */\n  setServiceUnderAttackMode: EdgeConfig;\n  /** Track setup agent lifecycle events from the Railway CLI */\n  setupAgentEventTrack: Scalars['Boolean']['output'];\n  /** Configure a shared variable. */\n  sharedVariableConfigure: Variable;\n  /** Creates a new SSH public key. When workspaceId is provided (or omitted under a workspace-scoped API token, in which case it defaults to the token's workspace), the key is owned by the workspace and can be used by anyone authenticating as that workspace via native SSH; requires workspace ADMIN access. Otherwise the key is owned by the authenticated user. */\n  sshPublicKeyCreate: SshPublicKey;\n  /** Deletes an SSH public key. */\n  sshPublicKeyDelete: Scalars['Boolean']['output'];\n  /**\n   * Creates a new TCP proxy for a service instance.\n   * @deprecated Use staged changes and apply them. Creating a TCP proxy with this endpoint requires you to redeploy the service for it to be active.\n   */\n  tcpProxyCreate: TcpProxy;\n  /** Deletes a TCP proxy by id */\n  tcpProxyDelete: Scalars['Boolean']['output'];\n  /** Duplicates an existing template */\n  templateClone: Template;\n  /** Deletes a template. */\n  templateDelete: Scalars['Boolean']['output'];\n  /**\n   * Deploys a template.\n   * @deprecated Deprecated in favor of templateDeployV2\n   */\n  templateDeploy: TemplateDeployPayload;\n  /** Deploys a template using the serialized template config */\n  templateDeployV2: TemplateDeployPayload;\n  /** Generate a template for a project */\n  templateGenerate: Template;\n  /** Publishes a template. */\n  templatePublish: Template;\n  /** Ejects a service from the template and creates a new repo in the provided org. */\n  templateServiceSourceEject: Scalars['Boolean']['output'];\n  /** Unpublishes a template. */\n  templateUnpublish: Scalars['Boolean']['output'];\n  /** Create a new trusted domain for this workspace */\n  trustedDomainCreate: TrustedDomain;\n  /** Delete a trusted domain */\n  trustedDomainDelete: Scalars['Boolean']['output'];\n  /** Retrigger verification for a failed trusted domain */\n  trustedDomainRetriggerVerification?: Maybe<TrustedDomain>;\n  /** Update the role of a trusted domain */\n  trustedDomainUpdate: TrustedDomain;\n  /** Setup 2FA authorization for authenticated user. */\n  twoFactorInfoCreate: RecoveryCodes;\n  /** Deletes the TwoFactorInfo for the authenticated user. */\n  twoFactorInfoDelete: Scalars['Boolean']['output'];\n  /** Generates the 2FA app secret for the authenticated user. */\n  twoFactorInfoSecret: TwoFactorInfoSecret;\n  /** Validates the token for a 2FA action or for a login request. */\n  twoFactorInfoValidate: Scalars['Boolean']['output'];\n  /** Updates the edge config (caching settings) for a service. */\n  updateServiceEdgeConfig: EdgeConfig;\n  /** Generate a Slack channel for a workspace */\n  upsertSlackChannel: Scalars['Boolean']['output'];\n  /** Remove the usage limit for a customer */\n  usageLimitRemove: Scalars['Boolean']['output'];\n  /** Set the usage limit for a customer */\n  usageLimitSet: Scalars['Boolean']['output'];\n  /** Unsubscribe from the Beta program. */\n  userBetaLeave: Scalars['Boolean']['output'];\n  /** Delete the currently authenticated user */\n  userDelete: Scalars['Boolean']['output'];\n  /** Disconnect your Railway account from Discord. */\n  userDiscordDisconnect: Scalars['Boolean']['output'];\n  /** Remove a flag on the user. */\n  userFlagsRemove: Scalars['Boolean']['output'];\n  /** Set flags on the authenticated user. */\n  userFlagsSet: Scalars['Boolean']['output'];\n  /** Updates the profile for the authenticated user */\n  userProfileUpdate: Scalars['Boolean']['output'];\n  /** Update date of TermsAgreedOn */\n  userTermsUpdate?: Maybe<User>;\n  /** Upserts a collection of variables. */\n  variableCollectionUpsert: Scalars['Boolean']['output'];\n  /** Deletes a variable. */\n  variableDelete: Scalars['Boolean']['output'];\n  /** Upserts a variable. */\n  variableUpsert: Scalars['Boolean']['output'];\n  /** Create a persistent volume in a project */\n  volumeCreate: Volume;\n  /** Delete a persistent volume in a project */\n  volumeDelete: Scalars['Boolean']['output'];\n  /** Create backup of a volume instance */\n  volumeInstanceBackupCreate: WorkflowId;\n  /** Deletes volume instance backup */\n  volumeInstanceBackupDelete: WorkflowId;\n  /** Removes backup expiration date */\n  volumeInstanceBackupLock: Scalars['Boolean']['output'];\n  /** Restore a volume instance from a backup */\n  volumeInstanceBackupRestore: WorkflowId;\n  /** Manage schedule for backups of a volume instance */\n  volumeInstanceBackupScheduleUpdate: Scalars['Boolean']['output'];\n  /** Point-in-time restore. Creates a brand-new Postgres service in the project. The image populates the new service's volume from the source bucket via `pgbackrest restore --type=time --target=<T>` on first boot, replays WAL forward, and promotes. Source service stays online and untouched. */\n  volumeInstancePITRRestore: WorkflowId;\n  /** Update a volume instance. If no environmentId is provided, all volume instances for the volume will be updated. */\n  volumeInstanceUpdate: Scalars['Boolean']['output'];\n  /** Update a persistent volume in a project */\n  volumeUpdate: Volume;\n  /** Test a webhook URL by sending a sample payload. Returns the HTTP status code. */\n  webhookTest: Scalars['Int']['output'];\n  /** Delete a workspace and all data associated with it */\n  workspaceDelete: Scalars['Boolean']['output'];\n  /** Get an invite code for a workspace and role */\n  workspaceInviteCodeCreate: Scalars['String']['output'];\n  /** Use an invite code to join a workspace */\n  workspaceInviteCodeUse: Workspace;\n  /** Leave a workspace */\n  workspaceLeave: Scalars['Boolean']['output'];\n  /** Changes a user workspace permissions. */\n  workspacePermissionChange: Scalars['Boolean']['output'];\n  /** Add a deploy source to a workspace policy allowlist. */\n  workspacePolicyDeploySourceAllowlistAdd: WorkspacePolicyDeploySourceAllowlist;\n  /** Remove a deploy source from a workspace policy allowlist. */\n  workspacePolicyDeploySourceAllowlistRemove: Scalars['Boolean']['output'];\n  /** Enable or disable a workspace policy. Enterprise workspaces only. */\n  workspacePolicyItemUpdate: Scalars['Boolean']['output'];\n  /** Enable or disable 2FA enforcement for a workspace */\n  workspaceTwoFactorEnforcementUpdate: Scalars['Boolean']['output'];\n  /** Update a workspace by id */\n  workspaceUpdate: Scalars['Boolean']['output'];\n  /** Generate a Slack channel for a workspace */\n  workspaceUpsertSlackChannel: Scalars['Boolean']['output'];\n  /** Invite a user by email to a workspace */\n  workspaceUserInvite: Scalars['Boolean']['output'];\n  /** Remove a user from a workspace */\n  workspaceUserRemove: Scalars['Boolean']['output'];\n};\n\n\nexport type MutationApiTokenCreateArgs = {\n  input: ApiTokenCreateInput;\n};\n\n\nexport type MutationApiTokenDeleteArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type MutationBaseEnvironmentOverrideArgs = {\n  id: Scalars['String']['input'];\n  input: BaseEnvironmentOverrideInput;\n};\n\n\nexport type MutationBucketCreateArgs = {\n  input: BucketCreateInput;\n};\n\n\nexport type MutationBucketCredentialsResetArgs = {\n  bucketId: Scalars['String']['input'];\n  environmentId: Scalars['String']['input'];\n  projectId: Scalars['String']['input'];\n};\n\n\nexport type MutationBucketUpdateArgs = {\n  id: Scalars['String']['input'];\n  input: BucketUpdateInput;\n};\n\n\nexport type MutationCanvasViewMergeArgs = {\n  sourceEnvironmentId: Scalars['String']['input'];\n  targetEnvironmentId: Scalars['String']['input'];\n};\n\n\nexport type MutationCliAuthEventTrackArgs = {\n  input: CliAuthEventTrackInput;\n};\n\n\nexport type MutationCliEventTrackArgs = {\n  input: CliEventTrackInput;\n};\n\n\nexport type MutationCustomDomainCreateArgs = {\n  input: CustomDomainCreateInput;\n};\n\n\nexport type MutationCustomDomainDeleteArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type MutationCustomDomainUpdateArgs = {\n  environmentId: Scalars['String']['input'];\n  id: Scalars['String']['input'];\n  targetPort?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\nexport type MutationCustomerCreateFreePlanSubscriptionArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type MutationCustomerTogglePayoutsToCreditsArgs = {\n  customerId: Scalars['String']['input'];\n  input: CustomerTogglePayoutsToCreditsInput;\n};\n\n\nexport type MutationDeploymentApproveArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type MutationDeploymentCancelArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type MutationDeploymentInstanceExecutionCreateArgs = {\n  input: DeploymentInstanceExecutionCreateInput;\n};\n\n\nexport type MutationDeploymentRedeployArgs = {\n  id: Scalars['String']['input'];\n  usePreviousImageTag?: InputMaybe<Scalars['Boolean']['input']>;\n};\n\n\nexport type MutationDeploymentRemoveArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type MutationDeploymentRestartArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type MutationDeploymentRollbackArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type MutationDeploymentStopArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type MutationDeploymentTriggerCreateArgs = {\n  input: DeploymentTriggerCreateInput;\n};\n\n\nexport type MutationDeploymentTriggerDeleteArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type MutationDeploymentTriggerUpdateArgs = {\n  id: Scalars['String']['input'];\n  input: DeploymentTriggerUpdateInput;\n};\n\n\nexport type MutationDisableServiceCdnArgs = {\n  input: DisableServiceCdnInput;\n};\n\n\nexport type MutationDockerComposeImportArgs = {\n  environmentId: Scalars['String']['input'];\n  projectId: Scalars['String']['input'];\n  skipStagingPatch?: InputMaybe<Scalars['Boolean']['input']>;\n  yaml: Scalars['String']['input'];\n};\n\n\nexport type MutationEgressGatewayAssociationCreateArgs = {\n  input: EgressGatewayCreateInput;\n};\n\n\nexport type MutationEgressGatewayAssociationsClearArgs = {\n  input: EgressGatewayServiceTargetInput;\n};\n\n\nexport type MutationEgressGatewayHaMigrationPreviewArgs = {\n  input: EgressGatewayServiceTargetInput;\n};\n\n\nexport type MutationEgressGatewayRollbackFromHaArgs = {\n  input: EgressGatewayServiceTargetInput;\n};\n\n\nexport type MutationEgressGatewayUpgradeToHaArgs = {\n  input: EgressGatewayServiceTargetInput;\n};\n\n\nexport type MutationEmailChangeConfirmArgs = {\n  nonce: Scalars['String']['input'];\n};\n\n\nexport type MutationEmailChangeInitiateArgs = {\n  newEmail: Scalars['String']['input'];\n};\n\n\nexport type MutationEnableServiceCdnArgs = {\n  input: EnableServiceCdnInput;\n};\n\n\nexport type MutationEnvironmentApplyChangeSetArgs = {\n  commitMessage?: InputMaybe<Scalars['String']['input']>;\n  environmentId: Scalars['String']['input'];\n  input: Scalars['JSON']['input'];\n};\n\n\nexport type MutationEnvironmentCreateArgs = {\n  input: EnvironmentCreateInput;\n};\n\n\nexport type MutationEnvironmentDeleteArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type MutationEnvironmentPatchCommitArgs = {\n  commitMessage?: InputMaybe<Scalars['String']['input']>;\n  environmentId: Scalars['String']['input'];\n  patch?: InputMaybe<Scalars['EnvironmentConfig']['input']>;\n};\n\n\nexport type MutationEnvironmentPatchCommitStagedArgs = {\n  commitMessage?: InputMaybe<Scalars['String']['input']>;\n  environmentId: Scalars['String']['input'];\n  skipDeploys?: InputMaybe<Scalars['Boolean']['input']>;\n};\n\n\nexport type MutationEnvironmentPreviewChangeSetArgs = {\n  environmentId: Scalars['String']['input'];\n  input: Scalars['JSON']['input'];\n};\n\n\nexport type MutationEnvironmentRenameArgs = {\n  id: Scalars['String']['input'];\n  input: EnvironmentRenameInput;\n};\n\n\nexport type MutationEnvironmentStageChangesArgs = {\n  environmentId: Scalars['String']['input'];\n  input: Scalars['EnvironmentConfig']['input'];\n  merge?: InputMaybe<Scalars['Boolean']['input']>;\n};\n\n\nexport type MutationEnvironmentTriggersDeployArgs = {\n  input: EnvironmentTriggersDeployInput;\n};\n\n\nexport type MutationEnvironmentUnskipServiceArgs = {\n  environmentId: Scalars['String']['input'];\n  serviceId: Scalars['String']['input'];\n};\n\n\nexport type MutationFairUseAgreeArgs = {\n  agree: Scalars['Boolean']['input'];\n};\n\n\nexport type MutationFeatureFlagAddArgs = {\n  input: FeatureFlagToggleInput;\n};\n\n\nexport type MutationFeatureFlagRemoveArgs = {\n  input: FeatureFlagToggleInput;\n};\n\n\nexport type MutationGenerateShellTokenArgs = {\n  input: ShellTokenInput;\n};\n\n\nexport type MutationGithubRepoDeployArgs = {\n  input: GitHubRepoDeployInput;\n};\n\n\nexport type MutationGithubRepoUpdateArgs = {\n  input: GitHubRepoUpdateInput;\n};\n\n\nexport type MutationHerokuImportVariablesArgs = {\n  input: HerokuImportVariablesInput;\n};\n\n\nexport type MutationIntegrationCreateArgs = {\n  input: IntegrationCreateInput;\n};\n\n\nexport type MutationIntegrationDeleteArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type MutationIntegrationUpdateArgs = {\n  id: Scalars['String']['input'];\n  input: IntegrationUpdateInput;\n};\n\n\nexport type MutationInviteCodeUseArgs = {\n  code: Scalars['String']['input'];\n};\n\n\nexport type MutationJobApplicationCreateArgs = {\n  input: JobApplicationCreateInput;\n  resume: Scalars['Upload']['input'];\n};\n\n\nexport type MutationLoginSessionAuthArgs = {\n  input: LoginSessionAuthInput;\n};\n\n\nexport type MutationLoginSessionCancelArgs = {\n  code: Scalars['String']['input'];\n};\n\n\nexport type MutationLoginSessionConsumeArgs = {\n  code: Scalars['String']['input'];\n};\n\n\nexport type MutationLoginSessionVerifyArgs = {\n  code: Scalars['String']['input'];\n};\n\n\nexport type MutationNotificationDeliveriesMarkAsReadArgs = {\n  deliveryIds: Array<Scalars['String']['input']>;\n};\n\n\nexport type MutationNotificationRuleCreateArgs = {\n  input: CreateNotificationRuleInput;\n};\n\n\nexport type MutationNotificationRuleDeleteArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type MutationNotificationRuleUpdateArgs = {\n  id: Scalars['String']['input'];\n  input: UpdateNotificationRuleInput;\n};\n\n\nexport type MutationObservabilityDashboardCreateArgs = {\n  input: ObservabilityDashboardCreateInput;\n};\n\n\nexport type MutationObservabilityDashboardResetArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type MutationObservabilityDashboardUpdateArgs = {\n  id: Scalars['String']['input'];\n  input: Array<ObservabilityDashboardUpdateInput>;\n};\n\n\nexport type MutationPasskeyDeleteArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type MutationPluginCreateArgs = {\n  input: PluginCreateInput;\n};\n\n\nexport type MutationPluginDeleteArgs = {\n  environmentId?: InputMaybe<Scalars['String']['input']>;\n  id: Scalars['String']['input'];\n};\n\n\nexport type MutationPluginResetArgs = {\n  id: Scalars['String']['input'];\n  input: ResetPluginInput;\n};\n\n\nexport type MutationPluginResetCredentialsArgs = {\n  id: Scalars['String']['input'];\n  input: ResetPluginCredentialsInput;\n};\n\n\nexport type MutationPluginRestartArgs = {\n  id: Scalars['String']['input'];\n  input: PluginRestartInput;\n};\n\n\nexport type MutationPluginStartArgs = {\n  id: Scalars['String']['input'];\n  input: PluginRestartInput;\n};\n\n\nexport type MutationPluginUpdateArgs = {\n  id: Scalars['String']['input'];\n  input: PluginUpdateInput;\n};\n\n\nexport type MutationPreferencesUpdateArgs = {\n  input: PreferencesUpdateData;\n};\n\n\nexport type MutationPrivateNetworkCreateOrGetArgs = {\n  input: PrivateNetworkCreateOrGetInput;\n};\n\n\nexport type MutationPrivateNetworkEndpointCreateOrGetArgs = {\n  input: PrivateNetworkEndpointCreateOrGetInput;\n};\n\n\nexport type MutationPrivateNetworkEndpointDeleteArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type MutationPrivateNetworkEndpointRenameArgs = {\n  dnsName: Scalars['String']['input'];\n  id: Scalars['String']['input'];\n  privateNetworkId: Scalars['String']['input'];\n};\n\n\nexport type MutationPrivateNetworksForEnvironmentDeleteArgs = {\n  environmentId: Scalars['String']['input'];\n};\n\n\nexport type MutationProjectClaimArgs = {\n  id: Scalars['String']['input'];\n  workspaceId: Scalars['String']['input'];\n};\n\n\nexport type MutationProjectCreateArgs = {\n  input: ProjectCreateInput;\n};\n\n\nexport type MutationProjectDeleteArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type MutationProjectFeatureFlagAddArgs = {\n  input: ProjectFeatureFlagToggleInput;\n};\n\n\nexport type MutationProjectFeatureFlagRemoveArgs = {\n  input: ProjectFeatureFlagToggleInput;\n};\n\n\nexport type MutationProjectInvitationAcceptArgs = {\n  code: Scalars['String']['input'];\n};\n\n\nexport type MutationProjectInvitationCreateArgs = {\n  id: Scalars['String']['input'];\n  input: ProjectInvitee;\n};\n\n\nexport type MutationProjectInvitationDeleteArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type MutationProjectInvitationResendArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type MutationProjectInviteUserArgs = {\n  id: Scalars['String']['input'];\n  input: ProjectInviteUserInput;\n};\n\n\nexport type MutationProjectLeaveArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type MutationProjectMemberAddArgs = {\n  input: ProjectMemberAddInput;\n};\n\n\nexport type MutationProjectMemberRemoveArgs = {\n  input: ProjectMemberRemoveInput;\n};\n\n\nexport type MutationProjectMemberUpdateArgs = {\n  input: ProjectMemberUpdateInput;\n};\n\n\nexport type MutationProjectScheduleDeleteArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type MutationProjectScheduleDeleteCancelArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type MutationProjectScheduleDeleteForceArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type MutationProjectTokenCreateArgs = {\n  input: ProjectTokenCreateInput;\n};\n\n\nexport type MutationProjectTokenDeleteArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type MutationProjectTransferArgs = {\n  input: ProjectTransferInput;\n  projectId: Scalars['String']['input'];\n};\n\n\nexport type MutationProjectTransferConfirmArgs = {\n  input: ProjectTransferConfirmInput;\n};\n\n\nexport type MutationProjectTransferInitiateArgs = {\n  input: ProjectTransferInitiateInput;\n};\n\n\nexport type MutationProjectTransferToTeamArgs = {\n  id: Scalars['String']['input'];\n  input: ProjectTransferToTeamInput;\n};\n\n\nexport type MutationProjectUpdateArgs = {\n  id: Scalars['String']['input'];\n  input: ProjectUpdateInput;\n};\n\n\nexport type MutationProviderAuthRemoveArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type MutationPurgeServiceCacheArgs = {\n  input: PurgeServiceCacheInput;\n};\n\n\nexport type MutationRecoveryCodeValidateArgs = {\n  input: RecoveryCodeValidateInput;\n};\n\n\nexport type MutationReferralInfoUpdateArgs = {\n  input: ReferralInfoUpdateInput;\n};\n\n\nexport type MutationSandboxCheckpointCreateArgs = {\n  environmentId: Scalars['String']['input'];\n  name: Scalars['String']['input'];\n  sandboxId: Scalars['String']['input'];\n};\n\n\nexport type MutationSandboxCheckpointDeleteArgs = {\n  environmentId: Scalars['String']['input'];\n  id: Scalars['ID']['input'];\n};\n\n\nexport type MutationSandboxCheckpointRenameArgs = {\n  environmentId: Scalars['String']['input'];\n  id: Scalars['ID']['input'];\n  name: Scalars['String']['input'];\n};\n\n\nexport type MutationSandboxCreateArgs = {\n  input: SandboxCreateInput;\n};\n\n\nexport type MutationSandboxDestroyArgs = {\n  environmentId: Scalars['String']['input'];\n  id: Scalars['String']['input'];\n};\n\n\nexport type MutationSandboxExecArgs = {\n  command: Scalars['String']['input'];\n  environmentId: Scalars['String']['input'];\n  id: Scalars['String']['input'];\n  timeoutSec?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\nexport type MutationSandboxHeartbeatArgs = {\n  environmentId: Scalars['String']['input'];\n  id: Scalars['String']['input'];\n};\n\n\nexport type MutationSandboxTemplateBuildArgs = {\n  environmentId: Scalars['String']['input'];\n  input: SandboxTemplateInput;\n};\n\n\nexport type MutationServiceConnectArgs = {\n  id: Scalars['String']['input'];\n  input: ServiceConnectInput;\n};\n\n\nexport type MutationServiceCreateArgs = {\n  input: ServiceCreateInput;\n};\n\n\nexport type MutationServiceDeleteArgs = {\n  environmentId?: InputMaybe<Scalars['String']['input']>;\n  id: Scalars['String']['input'];\n};\n\n\nexport type MutationServiceDisconnectArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type MutationServiceDomainCreateArgs = {\n  input: ServiceDomainCreateInput;\n};\n\n\nexport type MutationServiceDomainDeleteArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type MutationServiceDomainUpdateArgs = {\n  input: ServiceDomainUpdateInput;\n};\n\n\nexport type MutationServiceDuplicateArgs = {\n  environmentId: Scalars['String']['input'];\n  serviceId: Scalars['String']['input'];\n};\n\n\nexport type MutationServiceFeatureFlagAddArgs = {\n  input: ServiceFeatureFlagToggleInput;\n};\n\n\nexport type MutationServiceFeatureFlagRemoveArgs = {\n  input: ServiceFeatureFlagToggleInput;\n};\n\n\nexport type MutationServiceInstanceAutoDeployUpdateArgs = {\n  input: ServiceInstanceAutoDeployUpdateInput;\n};\n\n\nexport type MutationServiceInstanceDeployArgs = {\n  commitSha?: InputMaybe<Scalars['String']['input']>;\n  environmentId: Scalars['String']['input'];\n  latestCommit?: InputMaybe<Scalars['Boolean']['input']>;\n  serviceId: Scalars['String']['input'];\n};\n\n\nexport type MutationServiceInstanceDeployV2Args = {\n  commitSha?: InputMaybe<Scalars['String']['input']>;\n  environmentId: Scalars['String']['input'];\n  serviceId: Scalars['String']['input'];\n};\n\n\nexport type MutationServiceInstanceLimitsUpdateArgs = {\n  input: ServiceInstanceLimitsUpdateInput;\n};\n\n\nexport type MutationServiceInstanceRedeployArgs = {\n  environmentId: Scalars['String']['input'];\n  serviceId: Scalars['String']['input'];\n};\n\n\nexport type MutationServiceInstanceUpdateArgs = {\n  environmentId?: InputMaybe<Scalars['String']['input']>;\n  input: ServiceInstanceUpdateInput;\n  serviceId: Scalars['String']['input'];\n};\n\n\nexport type MutationServiceRemoveUpstreamUrlArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type MutationServiceUpdateArgs = {\n  id: Scalars['String']['input'];\n  input: ServiceUpdateInput;\n};\n\n\nexport type MutationSessionDeleteArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type MutationSetServiceUnderAttackModeArgs = {\n  input: SetServiceUnderAttackModeInput;\n};\n\n\nexport type MutationSetupAgentEventTrackArgs = {\n  input: SetupAgentEventTrackInput;\n};\n\n\nexport type MutationSharedVariableConfigureArgs = {\n  input: SharedVariableConfigureInput;\n};\n\n\nexport type MutationSshPublicKeyCreateArgs = {\n  input: SshPublicKeyCreateInput;\n};\n\n\nexport type MutationSshPublicKeyDeleteArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type MutationTcpProxyCreateArgs = {\n  input: TcpProxyCreateInput;\n};\n\n\nexport type MutationTcpProxyDeleteArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type MutationTemplateCloneArgs = {\n  input: TemplateCloneInput;\n};\n\n\nexport type MutationTemplateDeleteArgs = {\n  id: Scalars['String']['input'];\n  input: TemplateDeleteInput;\n};\n\n\nexport type MutationTemplateDeployArgs = {\n  input: TemplateDeployInput;\n};\n\n\nexport type MutationTemplateDeployV2Args = {\n  input: TemplateDeployV2Input;\n};\n\n\nexport type MutationTemplateGenerateArgs = {\n  input: TemplateGenerateInput;\n};\n\n\nexport type MutationTemplatePublishArgs = {\n  id: Scalars['String']['input'];\n  input: TemplatePublishInput;\n};\n\n\nexport type MutationTemplateServiceSourceEjectArgs = {\n  input: TemplateServiceSourceEjectInput;\n};\n\n\nexport type MutationTemplateUnpublishArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type MutationTrustedDomainCreateArgs = {\n  input: WorkspaceTrustedDomainCreateInput;\n};\n\n\nexport type MutationTrustedDomainDeleteArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type MutationTrustedDomainRetriggerVerificationArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type MutationTrustedDomainUpdateArgs = {\n  input: WorkspaceTrustedDomainUpdateInput;\n};\n\n\nexport type MutationTwoFactorInfoCreateArgs = {\n  input: TwoFactorInfoCreateInput;\n};\n\n\nexport type MutationTwoFactorInfoValidateArgs = {\n  input: TwoFactorInfoValidateInput;\n};\n\n\nexport type MutationUpdateServiceEdgeConfigArgs = {\n  input: UpdateServiceEdgeConfigInput;\n};\n\n\nexport type MutationUpsertSlackChannelArgs = {\n  workspaceId: Scalars['String']['input'];\n};\n\n\nexport type MutationUsageLimitRemoveArgs = {\n  input: UsageLimitRemoveInput;\n};\n\n\nexport type MutationUsageLimitSetArgs = {\n  input: UsageLimitSetInput;\n};\n\n\nexport type MutationUserFlagsRemoveArgs = {\n  input: UserFlagsRemoveInput;\n};\n\n\nexport type MutationUserFlagsSetArgs = {\n  input: UserFlagsSetInput;\n};\n\n\nexport type MutationUserProfileUpdateArgs = {\n  input: UserProfileUpdateInput;\n};\n\n\nexport type MutationVariableCollectionUpsertArgs = {\n  input: VariableCollectionUpsertInput;\n};\n\n\nexport type MutationVariableDeleteArgs = {\n  input: VariableDeleteInput;\n};\n\n\nexport type MutationVariableUpsertArgs = {\n  input: VariableUpsertInput;\n};\n\n\nexport type MutationVolumeCreateArgs = {\n  input: VolumeCreateInput;\n};\n\n\nexport type MutationVolumeDeleteArgs = {\n  volumeId: Scalars['String']['input'];\n};\n\n\nexport type MutationVolumeInstanceBackupCreateArgs = {\n  name?: InputMaybe<Scalars['String']['input']>;\n  volumeInstanceId: Scalars['String']['input'];\n};\n\n\nexport type MutationVolumeInstanceBackupDeleteArgs = {\n  volumeInstanceBackupId: Scalars['String']['input'];\n  volumeInstanceId: Scalars['String']['input'];\n};\n\n\nexport type MutationVolumeInstanceBackupLockArgs = {\n  volumeInstanceBackupId: Scalars['String']['input'];\n  volumeInstanceId: Scalars['String']['input'];\n};\n\n\nexport type MutationVolumeInstanceBackupRestoreArgs = {\n  volumeInstanceBackupId: Scalars['String']['input'];\n  volumeInstanceId: Scalars['String']['input'];\n};\n\n\nexport type MutationVolumeInstanceBackupScheduleUpdateArgs = {\n  kinds: Array<VolumeInstanceBackupScheduleKind>;\n  volumeInstanceId: Scalars['String']['input'];\n};\n\n\nexport type MutationVolumeInstancePitrRestoreArgs = {\n  newServiceName?: InputMaybe<Scalars['String']['input']>;\n  sourceRepoPath?: InputMaybe<Scalars['String']['input']>;\n  targetTimestamp: Scalars['DateTime']['input'];\n  volumeInstanceId: Scalars['String']['input'];\n};\n\n\nexport type MutationVolumeInstanceUpdateArgs = {\n  environmentId?: InputMaybe<Scalars['String']['input']>;\n  input: VolumeInstanceUpdateInput;\n  volumeId: Scalars['String']['input'];\n};\n\n\nexport type MutationVolumeUpdateArgs = {\n  input: VolumeUpdateInput;\n  volumeId: Scalars['String']['input'];\n};\n\n\nexport type MutationWebhookTestArgs = {\n  payload: Scalars['String']['input'];\n  url: Scalars['String']['input'];\n};\n\n\nexport type MutationWorkspaceDeleteArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type MutationWorkspaceInviteCodeCreateArgs = {\n  input: WorkspaceInviteCodeCreateInput;\n  workspaceId: Scalars['String']['input'];\n};\n\n\nexport type MutationWorkspaceInviteCodeUseArgs = {\n  code: Scalars['String']['input'];\n};\n\n\nexport type MutationWorkspaceLeaveArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type MutationWorkspacePermissionChangeArgs = {\n  input: WorkspacePermissionChangeInput;\n};\n\n\nexport type MutationWorkspacePolicyDeploySourceAllowlistAddArgs = {\n  sourceId: Scalars['String']['input'];\n  sourceType: WorkspacePolicyDeploySourceType;\n  workspaceId: Scalars['String']['input'];\n};\n\n\nexport type MutationWorkspacePolicyDeploySourceAllowlistRemoveArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type MutationWorkspacePolicyItemUpdateArgs = {\n  enabled?: InputMaybe<Scalars['Boolean']['input']>;\n  input?: InputMaybe<WorkspacePolicyItemUpdateInput>;\n  policy?: InputMaybe<WorkspacePolicyName>;\n  workspaceId: Scalars['String']['input'];\n};\n\n\nexport type MutationWorkspaceTwoFactorEnforcementUpdateArgs = {\n  enabled: Scalars['Boolean']['input'];\n  workspaceId: Scalars['String']['input'];\n};\n\n\nexport type MutationWorkspaceUpdateArgs = {\n  id: Scalars['String']['input'];\n  input: WorkspaceUpdateInput;\n};\n\n\nexport type MutationWorkspaceUpsertSlackChannelArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type MutationWorkspaceUserInviteArgs = {\n  input: WorkspaceUserInviteInput;\n  workspaceId: Scalars['String']['input'];\n};\n\n\nexport type MutationWorkspaceUserRemoveArgs = {\n  input: WorkspaceUserRemoveInput;\n  workspaceId: Scalars['String']['input'];\n};\n\nexport type Node = {\n  id: Scalars['ID']['output'];\n};\n\nexport type NotificationChannel = Node & {\n  __typename?: 'NotificationChannel';\n  config: Scalars['NotificationChannelConfig']['output'];\n  createdAt: Scalars['DateTime']['output'];\n  id: Scalars['ID']['output'];\n  updatedAt: Scalars['DateTime']['output'];\n  workspaceId: Scalars['String']['output'];\n};\n\nexport type NotificationDelivery = Node & {\n  __typename?: 'NotificationDelivery';\n  createdAt: Scalars['DateTime']['output'];\n  id: Scalars['ID']['output'];\n  notificationInstance: NotificationInstance;\n  readAt?: Maybe<Scalars['DateTime']['output']>;\n  status: NotificationDeliveryStatus;\n  type: NotificationDeliveryType;\n  updatedAt: Scalars['DateTime']['output'];\n  userId?: Maybe<Scalars['String']['output']>;\n};\n\nexport type NotificationDeliveryCreated = {\n  __typename?: 'NotificationDeliveryCreated';\n  delivery: NotificationDelivery;\n  type: Scalars['String']['output'];\n};\n\nexport type NotificationDeliveryFilterInput = {\n  environmentId?: InputMaybe<Scalars['String']['input']>;\n  onlyUnread?: InputMaybe<Scalars['Boolean']['input']>;\n  projectId?: InputMaybe<Scalars['String']['input']>;\n  status?: InputMaybe<NotificationStatus>;\n  type?: InputMaybe<NotificationDeliveryType>;\n  workspaceId?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type NotificationDeliveryResolved = {\n  __typename?: 'NotificationDeliveryResolved';\n  deliveryIds: Array<Scalars['String']['output']>;\n  type: Scalars['String']['output'];\n};\n\nexport type NotificationDeliveryStatus =\n  | 'FAILED'\n  | 'PENDING'\n  | 'SENT';\n\nexport type NotificationDeliveryType =\n  | 'EMAIL'\n  | 'INAPP'\n  | 'WEBHOOK';\n\nexport type NotificationDeliveryUpdate = NotificationDeliveryCreated | NotificationDeliveryResolved;\n\nexport type NotificationInstance = Node & {\n  __typename?: 'NotificationInstance';\n  createdAt: Scalars['DateTime']['output'];\n  environmentId?: Maybe<Scalars['String']['output']>;\n  event: Event;\n  eventId: Scalars['String']['output'];\n  eventType?: Maybe<Scalars['String']['output']>;\n  id: Scalars['ID']['output'];\n  payload: Scalars['NotificationPayload']['output'];\n  projectId?: Maybe<Scalars['String']['output']>;\n  resolvedAt?: Maybe<Scalars['DateTime']['output']>;\n  resourceId?: Maybe<Scalars['String']['output']>;\n  resourceType?: Maybe<Scalars['String']['output']>;\n  serviceId?: Maybe<Scalars['String']['output']>;\n  severity: NotificationSeverity;\n  status: NotificationStatus;\n  updatedAt: Scalars['DateTime']['output'];\n  volumeId?: Maybe<Scalars['String']['output']>;\n  workspaceId: Scalars['String']['output'];\n};\n\nexport type NotificationRule = Node & {\n  __typename?: 'NotificationRule';\n  channels: Array<NotificationChannel>;\n  createdAt: Scalars['DateTime']['output'];\n  environmentId?: Maybe<Scalars['String']['output']>;\n  ephemeralEnvironments?: Maybe<Scalars['Boolean']['output']>;\n  eventTypes: Array<Scalars['String']['output']>;\n  id: Scalars['ID']['output'];\n  projectId?: Maybe<Scalars['String']['output']>;\n  serviceId?: Maybe<Scalars['String']['output']>;\n  severities: Array<NotificationSeverity>;\n  updatedAt: Scalars['DateTime']['output'];\n  workspaceId: Scalars['String']['output'];\n};\n\nexport type NotificationSeverity =\n  | 'CRITICAL'\n  | 'INFO'\n  | 'NOTICE'\n  | 'WARNING';\n\nexport type NotificationStatus =\n  | 'ACTIVE'\n  | 'RESOLVED';\n\nexport type ObservabilityDashboard = Node & {\n  __typename?: 'ObservabilityDashboard';\n  id: Scalars['ID']['output'];\n  items: Array<ObservabilityDashboardItemInstance>;\n};\n\nexport type ObservabilityDashboardAlert = Node & {\n  __typename?: 'ObservabilityDashboardAlert';\n  createdAt: Scalars['DateTime']['output'];\n  id: Scalars['ID']['output'];\n  resolvedAt?: Maybe<Scalars['DateTime']['output']>;\n  resourceId?: Maybe<Scalars['String']['output']>;\n  resourceType: MonitorAlertResourceType;\n  status: MonitorStatus;\n};\n\nexport type ObservabilityDashboardCreateInput = {\n  environmentId: Scalars['String']['input'];\n  /** If no items are provided, a default dashboard will be created. */\n  items?: InputMaybe<Array<ObservabilityDashboardUpdateInput>>;\n};\n\nexport type ObservabilityDashboardItem = Node & {\n  __typename?: 'ObservabilityDashboardItem';\n  config: ObservabilityDashboardItemConfig;\n  description?: Maybe<Scalars['String']['output']>;\n  id: Scalars['ID']['output'];\n  monitors: Array<ObservabilityDashboardMonitor>;\n  name: Scalars['String']['output'];\n  type: ObservabilityDashboardItemType;\n};\n\nexport type ObservabilityDashboardItemConfig = {\n  __typename?: 'ObservabilityDashboardItemConfig';\n  logsFilter?: Maybe<Scalars['String']['output']>;\n  measurements?: Maybe<Array<MetricMeasurement>>;\n  projectUsageProperties?: Maybe<Array<ProjectUsageProperty>>;\n  resourceIds?: Maybe<Array<Scalars['String']['output']>>;\n};\n\nexport type ObservabilityDashboardItemConfigInput = {\n  logsFilter?: InputMaybe<Scalars['String']['input']>;\n  measurements?: InputMaybe<Array<MetricMeasurement>>;\n  projectUsageProperties?: InputMaybe<Array<ProjectUsageProperty>>;\n  resourceIds?: InputMaybe<Array<Scalars['String']['input']>>;\n};\n\nexport type ObservabilityDashboardItemCreateInput = {\n  config: ObservabilityDashboardItemConfigInput;\n  description?: InputMaybe<Scalars['String']['input']>;\n  id: Scalars['String']['input'];\n  name: Scalars['String']['input'];\n  type: ObservabilityDashboardItemType;\n};\n\nexport type ObservabilityDashboardItemInstance = Node & {\n  __typename?: 'ObservabilityDashboardItemInstance';\n  dashboardItem: ObservabilityDashboardItem;\n  displayConfig: Scalars['DisplayConfig']['output'];\n  id: Scalars['ID']['output'];\n};\n\nexport type ObservabilityDashboardItemType =\n  | 'PROJECT_USAGE_ITEM'\n  | 'SERVICE_LOGS_ITEM'\n  | 'SERVICE_METRICS_ITEM'\n  | 'VOLUME_METRICS_ITEM';\n\nexport type ObservabilityDashboardMonitor = Node & {\n  __typename?: 'ObservabilityDashboardMonitor';\n  alerts: Array<ObservabilityDashboardAlert>;\n  config: ObservabilityDashboardMonitorConfig;\n  createdAt: Scalars['DateTime']['output'];\n  id: Scalars['ID']['output'];\n  updatedAt: Scalars['DateTime']['output'];\n};\n\n\nexport type ObservabilityDashboardMonitorAlertsArgs = {\n  endDate?: InputMaybe<Scalars['DateTime']['input']>;\n  startDate?: InputMaybe<Scalars['DateTime']['input']>;\n};\n\nexport type ObservabilityDashboardMonitorConfig = MonitorThresholdConfig;\n\nexport type ObservabilityDashboardUpdateInput = {\n  dashboardItem: ObservabilityDashboardItemCreateInput;\n  displayConfig: Scalars['DisplayConfig']['input'];\n  id: Scalars['String']['input'];\n};\n\nexport type PageInfo = {\n  __typename?: 'PageInfo';\n  endCursor?: Maybe<Scalars['String']['output']>;\n  hasNextPage: Scalars['Boolean']['output'];\n  hasPreviousPage: Scalars['Boolean']['output'];\n  startCursor?: Maybe<Scalars['String']['output']>;\n};\n\nexport type PartnerProfile = {\n  __typename?: 'PartnerProfile';\n  category: Scalars['String']['output'];\n  description: Scalars['String']['output'];\n  slug: Scalars['String']['output'];\n  type: PartnerProfileType;\n  website: Scalars['String']['output'];\n};\n\nexport type PartnerProfileType =\n  | 'BASIC_PARTNER'\n  | 'LIMITED_PARTNER'\n  | 'TEMPLATE_MAINTAINER';\n\nexport type Passkey = Node & {\n  __typename?: 'Passkey';\n  aaguid?: Maybe<Scalars['String']['output']>;\n  backedUp: Scalars['Boolean']['output'];\n  createdAt: Scalars['DateTime']['output'];\n  credentialId: Scalars['String']['output'];\n  deviceName: Scalars['String']['output'];\n  deviceType: Scalars['String']['output'];\n  displayName?: Maybe<Scalars['String']['output']>;\n  id: Scalars['ID']['output'];\n  lastUsedAt?: Maybe<Scalars['DateTime']['output']>;\n  lastUsedDevice?: Maybe<Scalars['String']['output']>;\n  transports: Array<Scalars['String']['output']>;\n  updatedAt: Scalars['DateTime']['output'];\n};\n\nexport type PaymentMethod = {\n  __typename?: 'PaymentMethod';\n  card?: Maybe<PaymentMethodCard>;\n  id: Scalars['String']['output'];\n};\n\nexport type PaymentMethodCard = {\n  __typename?: 'PaymentMethodCard';\n  brand: Scalars['String']['output'];\n  country?: Maybe<Scalars['String']['output']>;\n  last4: Scalars['String']['output'];\n};\n\nexport type Plan =\n  | 'FREE'\n  | 'HOBBY'\n  | 'PRO';\n\nexport type PlanLimitOverride = Node & {\n  __typename?: 'PlanLimitOverride';\n  config: Scalars['SubscriptionPlanLimit']['output'];\n  id: Scalars['ID']['output'];\n};\n\nexport type PlatformFeatureFlag =\n  | 'ALERT_SUS_USERS_CRON_KILLSWITCH'\n  | 'BAN_APPEAL_FORM'\n  | 'CHAT_SANDBOX'\n  | 'CTRD_IMAGE_STORE_ROLLOUT'\n  | 'DEMO_PERCENTAGE_ROLLOUT'\n  | 'HA_STATIC_EGRESS_SELF_SERVICE'\n  | 'INLINE_NOTIFICATION_PROCESSING'\n  | 'IN_DASHBOARD_SUPPORT'\n  | 'KAFKA_DEPLOYMENT_STATUS_CHANGES'\n  | 'NEW_STRIPE_WEBHOOK_VERSION_ROLLOUT'\n  | 'OAUTH_DCR_KILLSWITCH'\n  | 'RADAR_AUTO_EVALUATE'\n  | 'SERVICEINSTANCE_DATALOADER_FOR_STATIC_URL'\n  | 'SPLIT_USAGE_QUERIES'\n  | 'STRIPE_METERS_NEW_ACCOUNTS'\n  | 'STRIPE_METERS_SHADOW_ENABLED'\n  | 'UPDATED_VM_QUERIES';\n\nexport type PlatformFeatureFlagStatus = {\n  __typename?: 'PlatformFeatureFlagStatus';\n  flag: PlatformFeatureFlag;\n  rolloutPercentage: Scalars['Int']['output'];\n  status: Scalars['Boolean']['output'];\n  type: PlatformFeatureFlagType;\n};\n\nexport type PlatformFeatureFlagType =\n  | 'BOOLEAN'\n  | 'PERCENTAGE';\n\nexport type PlatformStatus = {\n  __typename?: 'PlatformStatus';\n  incident?: Maybe<Incident>;\n  isStable: Scalars['Boolean']['output'];\n  maintenance?: Maybe<Maintenance>;\n};\n\nexport type Plugin = Node & {\n  __typename?: 'Plugin';\n  containers: PluginContainersConnection;\n  createdAt: Scalars['DateTime']['output'];\n  deletedAt?: Maybe<Scalars['DateTime']['output']>;\n  deprecatedAt?: Maybe<Scalars['DateTime']['output']>;\n  friendlyName: Scalars['String']['output'];\n  id: Scalars['ID']['output'];\n  logsEnabled: Scalars['Boolean']['output'];\n  migrationDatabaseServiceId?: Maybe<Scalars['String']['output']>;\n  name: PluginType;\n  project: Project;\n  status: PluginStatus;\n  variables: PluginVariablesConnection;\n};\n\n\nexport type PluginContainersArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\nexport type PluginVariablesArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n};\n\nexport type PluginContainersConnection = {\n  __typename?: 'PluginContainersConnection';\n  edges: Array<PluginContainersConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type PluginContainersConnectionEdge = {\n  __typename?: 'PluginContainersConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: Container;\n};\n\nexport type PluginCreateInput = {\n  environmentId?: InputMaybe<Scalars['String']['input']>;\n  friendlyName?: InputMaybe<Scalars['String']['input']>;\n  name: Scalars['String']['input'];\n  projectId: Scalars['String']['input'];\n};\n\nexport type PluginRestartInput = {\n  environmentId?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type PluginStatus =\n  | 'DEPRECATED'\n  | 'LOCKED'\n  | 'REMOVED'\n  | 'RUNNING'\n  | 'STOPPED';\n\nexport type PluginType =\n  | 'mongodb'\n  | 'mysql'\n  | 'postgresql'\n  | 'redis';\n\nexport type PluginUpdateInput = {\n  friendlyName: Scalars['String']['input'];\n};\n\nexport type PluginVariablesConnection = {\n  __typename?: 'PluginVariablesConnection';\n  edges: Array<PluginVariablesConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type PluginVariablesConnectionEdge = {\n  __typename?: 'PluginVariablesConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: Variable;\n};\n\nexport type Preferences = Node & {\n  __typename?: 'Preferences';\n  buildFailedEmail: Scalars['Boolean']['output'];\n  changelogEmail: Scalars['Boolean']['output'];\n  communityEmail: Scalars['Boolean']['output'];\n  deployCrashedEmail: Scalars['Boolean']['output'];\n  ephemeralEnvironmentEmail: Scalars['Boolean']['output'];\n  id: Scalars['ID']['output'];\n  marketingEmail: Scalars['Boolean']['output'];\n  subprocessorUpdatesEmail: Scalars['Boolean']['output'];\n  templateQueueEmail: Scalars['Boolean']['output'];\n  usageEmail: Scalars['Boolean']['output'];\n};\n\nexport type PreferencesUpdateData = {\n  buildFailedEmail?: InputMaybe<Scalars['Boolean']['input']>;\n  changelogEmail?: InputMaybe<Scalars['Boolean']['input']>;\n  communityEmail?: InputMaybe<Scalars['Boolean']['input']>;\n  deployCrashedEmail?: InputMaybe<Scalars['Boolean']['input']>;\n  ephemeralEnvironmentEmail?: InputMaybe<Scalars['Boolean']['input']>;\n  marketingEmail?: InputMaybe<Scalars['Boolean']['input']>;\n  subprocessorUpdatesEmail?: InputMaybe<Scalars['Boolean']['input']>;\n  templateQueueEmail?: InputMaybe<Scalars['Boolean']['input']>;\n  token?: InputMaybe<Scalars['String']['input']>;\n  usageEmail?: InputMaybe<Scalars['Boolean']['input']>;\n};\n\nexport type PrivateNetwork = {\n  __typename?: 'PrivateNetwork';\n  createdAt?: Maybe<Scalars['DateTime']['output']>;\n  deletedAt?: Maybe<Scalars['DateTime']['output']>;\n  dnsName: Scalars['String']['output'];\n  environmentId: Scalars['String']['output'];\n  name: Scalars['String']['output'];\n  networkId: Scalars['BigInt']['output'];\n  projectId: Scalars['String']['output'];\n  publicId: Scalars['String']['output'];\n  tags: Array<Scalars['String']['output']>;\n};\n\nexport type PrivateNetworkCreateOrGetInput = {\n  environmentId: Scalars['String']['input'];\n  name: Scalars['String']['input'];\n  projectId: Scalars['String']['input'];\n  tags: Array<Scalars['String']['input']>;\n};\n\nexport type PrivateNetworkEndpoint = {\n  __typename?: 'PrivateNetworkEndpoint';\n  createdAt?: Maybe<Scalars['DateTime']['output']>;\n  deletedAt?: Maybe<Scalars['DateTime']['output']>;\n  dnsName: Scalars['String']['output'];\n  newDnsName?: Maybe<Scalars['String']['output']>;\n  privateIps: Array<Scalars['String']['output']>;\n  publicId: Scalars['String']['output'];\n  serviceInstanceId: Scalars['String']['output'];\n  syncStatus: PrivateNetworkEndpointSyncStatus;\n  tags: Array<Scalars['String']['output']>;\n};\n\nexport type PrivateNetworkEndpointCreateOrGetInput = {\n  environmentId: Scalars['String']['input'];\n  privateNetworkId: Scalars['String']['input'];\n  serviceId: Scalars['String']['input'];\n  serviceName: Scalars['String']['input'];\n  tags: Array<Scalars['String']['input']>;\n};\n\nexport type PrivateNetworkEndpointSyncStatus =\n  | 'ACTIVE'\n  | 'CREATING'\n  | 'DELETED'\n  | 'DELETING'\n  | 'UNSPECIFIED'\n  | 'UPDATING';\n\nexport type Project = Node & {\n  __typename?: 'Project';\n  baseEnvironment?: Maybe<Environment>;\n  baseEnvironmentId?: Maybe<Scalars['String']['output']>;\n  botPrEnvironments: Scalars['Boolean']['output'];\n  buckets: ProjectBucketsConnection;\n  createdAt: Scalars['DateTime']['output'];\n  deletedAt?: Maybe<Scalars['DateTime']['output']>;\n  /** @deprecated Use environment.deploymentTriggers for properly scoped access control */\n  deploymentTriggers: ProjectDeploymentTriggersConnection;\n  /** @deprecated Use environment.deployments for properly scoped access control */\n  deployments: ProjectDeploymentsConnection;\n  description?: Maybe<Scalars['String']['output']>;\n  environments: ProjectEnvironmentsConnection;\n  expiredAt?: Maybe<Scalars['DateTime']['output']>;\n  featureFlags: Array<ActiveProjectFeatureFlag>;\n  focusedPrEnvironments: Scalars['Boolean']['output'];\n  groups: ProjectGroupsConnection;\n  id: Scalars['ID']['output'];\n  isPublic: Scalars['Boolean']['output'];\n  isTempProject: Scalars['Boolean']['output'];\n  members: Array<ProjectMember>;\n  name: Scalars['String']['output'];\n  /** @deprecated Plugins have been removed */\n  plugins: ProjectPluginsConnection;\n  prDeploys: Scalars['Boolean']['output'];\n  /** The id of the oldest non-ephemeral environment for this project (typically production). Used by the dashboard to render project cards without fetching the full environments connection. */\n  primaryEnvironmentId?: Maybe<Scalars['String']['output']>;\n  projectPermissions: ProjectProjectPermissionsConnection;\n  services: ProjectServicesConnection;\n  subscriptionPlanLimit: Scalars['SubscriptionPlanLimit']['output'];\n  subscriptionType: SubscriptionPlanType;\n  /** @deprecated Use workspace */\n  team?: Maybe<Team>;\n  /** @deprecated Use workspaceId */\n  teamId?: Maybe<Scalars['String']['output']>;\n  updatedAt: Scalars['DateTime']['output'];\n  volumes: ProjectVolumesConnection;\n  workspace?: Maybe<Workspace>;\n  workspaceId?: Maybe<Scalars['String']['output']>;\n};\n\n\nexport type ProjectBucketsArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\nexport type ProjectDeploymentTriggersArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\nexport type ProjectDeploymentsArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\nexport type ProjectEnvironmentsArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  isEphemeral?: InputMaybe<Scalars['Boolean']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n  sort?: InputMaybe<SortOrder>;\n};\n\n\nexport type ProjectGroupsArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\nexport type ProjectPluginsArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\nexport type ProjectProjectPermissionsArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\nexport type ProjectServicesArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\nexport type ProjectVolumesArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n};\n\nexport type ProjectBucketsConnection = {\n  __typename?: 'ProjectBucketsConnection';\n  edges: Array<ProjectBucketsConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type ProjectBucketsConnectionEdge = {\n  __typename?: 'ProjectBucketsConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: Bucket;\n};\n\nexport type ProjectComplianceInfo = {\n  __typename?: 'ProjectComplianceInfo';\n  /** Permissions for each project member */\n  memberPermissions: Array<ProjectMemberPermissionsInfo>;\n  projectId: Scalars['String']['output'];\n  projectName: Scalars['String']['output'];\n  /** Backup schedules for database services */\n  serviceBackups: Array<ServiceBackupInfo>;\n  /** 2FA status for each project member */\n  twoFactorMembers: Array<ProjectMemberTwoFactorInfo>;\n  workspaceId: Scalars['String']['output'];\n};\n\nexport type ProjectCreateInput = {\n  defaultEnvironmentName?: InputMaybe<Scalars['String']['input']>;\n  description?: InputMaybe<Scalars['String']['input']>;\n  isMonorepo?: InputMaybe<Scalars['Boolean']['input']>;\n  isPublic?: InputMaybe<Scalars['Boolean']['input']>;\n  name?: InputMaybe<Scalars['String']['input']>;\n  prDeploys?: InputMaybe<Scalars['Boolean']['input']>;\n  repo?: InputMaybe<ProjectCreateRepo>;\n  runtime?: InputMaybe<PublicRuntime>;\n  workspaceId?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type ProjectCreateRepo = {\n  branch: Scalars['String']['input'];\n  fullRepoName: Scalars['String']['input'];\n};\n\nexport type ProjectDeploymentTriggersConnection = {\n  __typename?: 'ProjectDeploymentTriggersConnection';\n  edges: Array<ProjectDeploymentTriggersConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type ProjectDeploymentTriggersConnectionEdge = {\n  __typename?: 'ProjectDeploymentTriggersConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: DeploymentTrigger;\n};\n\nexport type ProjectDeploymentsConnection = {\n  __typename?: 'ProjectDeploymentsConnection';\n  edges: Array<ProjectDeploymentsConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type ProjectDeploymentsConnectionEdge = {\n  __typename?: 'ProjectDeploymentsConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: Deployment;\n};\n\nexport type ProjectEnvironmentsConnection = {\n  __typename?: 'ProjectEnvironmentsConnection';\n  edges: Array<ProjectEnvironmentsConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type ProjectEnvironmentsConnectionEdge = {\n  __typename?: 'ProjectEnvironmentsConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: Environment;\n};\n\nexport type ProjectFeatureFlagToggleInput = {\n  flag: ActiveProjectFeatureFlag;\n  projectId: Scalars['String']['input'];\n};\n\nexport type ProjectGroupsConnection = {\n  __typename?: 'ProjectGroupsConnection';\n  edges: Array<ProjectGroupsConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type ProjectGroupsConnectionEdge = {\n  __typename?: 'ProjectGroupsConnectionEdge';\n  cursor: Scalars['String']['output'];\n};\n\nexport type ProjectInvitation = {\n  __typename?: 'ProjectInvitation';\n  email: Scalars['String']['output'];\n  expiresAt: Scalars['DateTime']['output'];\n  id: Scalars['ID']['output'];\n  inviter?: Maybe<ProjectInvitationInviter>;\n  isExpired: Scalars['Boolean']['output'];\n  project: PublicProjectInformation;\n};\n\nexport type ProjectInvitationInviter = {\n  __typename?: 'ProjectInvitationInviter';\n  email: Scalars['String']['output'];\n  name?: Maybe<Scalars['String']['output']>;\n};\n\nexport type ProjectInviteUserInput = {\n  email: Scalars['String']['input'];\n  link: Scalars['String']['input'];\n};\n\nexport type ProjectInvitee = {\n  email: Scalars['String']['input'];\n  role: ProjectRole;\n};\n\nexport type ProjectMember = {\n  __typename?: 'ProjectMember';\n  avatar?: Maybe<Scalars['String']['output']>;\n  email: Scalars['String']['output'];\n  id: Scalars['String']['output'];\n  name?: Maybe<Scalars['String']['output']>;\n  role: ProjectRole;\n};\n\nexport type ProjectMemberAddInput = {\n  projectId: Scalars['String']['input'];\n  role: ProjectRole;\n  userId: Scalars['String']['input'];\n};\n\nexport type ProjectMemberPermissionsInfo = {\n  __typename?: 'ProjectMemberPermissionsInfo';\n  email: Scalars['String']['output'];\n  name?: Maybe<Scalars['String']['output']>;\n  role: ProjectRole;\n};\n\nexport type ProjectMemberRemoveInput = {\n  projectId: Scalars['String']['input'];\n  userId: Scalars['String']['input'];\n};\n\nexport type ProjectMemberTwoFactorInfo = {\n  __typename?: 'ProjectMemberTwoFactorInfo';\n  email: Scalars['String']['output'];\n  /** List of enabled 2FA methods (AUTHENTICATOR, PASSKEY) */\n  enabledMethods: Array<TwoFactorMethodCompliance>;\n  name?: Maybe<Scalars['String']['output']>;\n  twoFactorAuthEnabled: Scalars['Boolean']['output'];\n};\n\nexport type ProjectMemberUpdateInput = {\n  projectId: Scalars['String']['input'];\n  role: ProjectRole;\n  userId: Scalars['String']['input'];\n};\n\nexport type ProjectPermission = Node & {\n  __typename?: 'ProjectPermission';\n  id: Scalars['ID']['output'];\n  projectId: Scalars['String']['output'];\n  role: ProjectRole;\n  userId: Scalars['String']['output'];\n};\n\nexport type ProjectPluginsConnection = {\n  __typename?: 'ProjectPluginsConnection';\n  edges: Array<ProjectPluginsConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type ProjectPluginsConnectionEdge = {\n  __typename?: 'ProjectPluginsConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: Plugin;\n};\n\nexport type ProjectProjectPermissionsConnection = {\n  __typename?: 'ProjectProjectPermissionsConnection';\n  edges: Array<ProjectProjectPermissionsConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type ProjectProjectPermissionsConnectionEdge = {\n  __typename?: 'ProjectProjectPermissionsConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: ProjectPermission;\n};\n\nexport type ProjectResourceAccess = {\n  __typename?: 'ProjectResourceAccess';\n  customDomain: AccessRule;\n  databaseDeployment: AccessRule;\n  deployment: AccessRule;\n  environment: AccessRule;\n  /** @deprecated Plugins have been removed */\n  plugin: AccessRule;\n  sandbox: AccessRule;\n};\n\nexport type ProjectRole =\n  | 'ADMIN'\n  | 'MEMBER'\n  | 'VIEWER';\n\nexport type ProjectServiceUsagePage = {\n  __typename?: 'ProjectServiceUsagePage';\n  pageInfo: ProjectServiceUsagePageInfo;\n  usage: Array<AggregatedUsage>;\n};\n\nexport type ProjectServiceUsagePageInfo = {\n  __typename?: 'ProjectServiceUsagePageInfo';\n  endCursor?: Maybe<Scalars['String']['output']>;\n  hasNextPage: Scalars['Boolean']['output'];\n};\n\nexport type ProjectServicesConnection = {\n  __typename?: 'ProjectServicesConnection';\n  edges: Array<ProjectServicesConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type ProjectServicesConnectionEdge = {\n  __typename?: 'ProjectServicesConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: Service;\n};\n\nexport type ProjectToken = Node & {\n  __typename?: 'ProjectToken';\n  createdAt: Scalars['DateTime']['output'];\n  displayToken: Scalars['String']['output'];\n  environment: Environment;\n  environmentId: Scalars['String']['output'];\n  id: Scalars['ID']['output'];\n  name: Scalars['String']['output'];\n  project: Project;\n  projectId: Scalars['String']['output'];\n};\n\nexport type ProjectTokenCreateInput = {\n  environmentId: Scalars['String']['input'];\n  name: Scalars['String']['input'];\n  projectId: Scalars['String']['input'];\n};\n\nexport type ProjectTransferConfirmInput = {\n  destinationWorkspaceId?: InputMaybe<Scalars['String']['input']>;\n  ownershipTransferId: Scalars['String']['input'];\n  projectId: Scalars['String']['input'];\n};\n\nexport type ProjectTransferInitiateInput = {\n  memberId: Scalars['String']['input'];\n  projectId: Scalars['String']['input'];\n};\n\nexport type ProjectTransferInput = {\n  workspaceId: Scalars['String']['input'];\n};\n\nexport type ProjectTransferToTeamInput = {\n  teamId: Scalars['String']['input'];\n};\n\nexport type ProjectUpdateInput = {\n  baseEnvironmentId?: InputMaybe<Scalars['String']['input']>;\n  /** Enable/disable pull request environments for PRs created by bots */\n  botPrEnvironments?: InputMaybe<Scalars['Boolean']['input']>;\n  description?: InputMaybe<Scalars['String']['input']>;\n  /** Enable focused PR environments that only deploy services affected by changed files */\n  focusedPrEnvironments?: InputMaybe<Scalars['Boolean']['input']>;\n  isPublic?: InputMaybe<Scalars['Boolean']['input']>;\n  name?: InputMaybe<Scalars['String']['input']>;\n  prDeploys?: InputMaybe<Scalars['Boolean']['input']>;\n};\n\nexport type ProjectUsageProperty =\n  | 'BACKUP_USAGE'\n  | 'CPU_USAGE'\n  | 'CURRENT_USAGE'\n  | 'DISK_USAGE'\n  | 'ESTIMATED_USAGE'\n  | 'MEMORY_USAGE'\n  | 'NETWORK_USAGE';\n\nexport type ProjectVolumesConnection = {\n  __typename?: 'ProjectVolumesConnection';\n  edges: Array<ProjectVolumesConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type ProjectVolumesConnectionEdge = {\n  __typename?: 'ProjectVolumesConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: Volume;\n};\n\nexport type ProjectWorkspaceMember = {\n  __typename?: 'ProjectWorkspaceMember';\n  email: Scalars['String']['output'];\n  /** List of enabled 2FA methods (AUTHENTICATOR, PASSKEY) */\n  enabledMethods: Array<TwoFactorMethodProjectWorkspace>;\n  name?: Maybe<Scalars['String']['output']>;\n  twoFactorAuthEnabled: Scalars['Boolean']['output'];\n};\n\nexport type ProjectWorkspaceMembersResponse = {\n  __typename?: 'ProjectWorkspaceMembersResponse';\n  members: Array<ProjectWorkspaceMember>;\n  projectId: Scalars['String']['output'];\n  projectName: Scalars['String']['output'];\n  workspaceId: Scalars['String']['output'];\n};\n\nexport type ProjectsOrderBy =\n  | 'CREATED_AT_DESC'\n  | 'NAME_ASC'\n  | 'UPDATED_AT_DESC';\n\nexport type ProviderAuth = Node & {\n  __typename?: 'ProviderAuth';\n  email: Scalars['String']['output'];\n  id: Scalars['ID']['output'];\n  isAuthEnabled: Scalars['Boolean']['output'];\n  metadata: Scalars['JSON']['output'];\n  provider: Scalars['String']['output'];\n  userId: Scalars['String']['output'];\n};\n\nexport type PublicProjectInformation = {\n  __typename?: 'PublicProjectInformation';\n  id: Scalars['ID']['output'];\n  name: Scalars['String']['output'];\n};\n\nexport type PublicProjectInvitation = InviteCode | ProjectInvitation;\n\nexport type PublicRuntime =\n  | 'LEGACY'\n  | 'UNSPECIFIED'\n  | 'V2';\n\nexport type PublicStats = {\n  __typename?: 'PublicStats';\n  totalDeploymentsLastMonth: Scalars['Int']['output'];\n  totalLogsLastMonth: Scalars['BigInt']['output'];\n  totalProjects: Scalars['Int']['output'];\n  totalRequestsLastMonth: Scalars['BigInt']['output'];\n  totalServices: Scalars['Int']['output'];\n  totalUsers: Scalars['Int']['output'];\n};\n\nexport type PurgeCacheScope =\n  | 'ALL'\n  | 'HTML';\n\nexport type PurgeOnDeploy =\n  | 'ALL'\n  | 'HTML'\n  | 'OFF';\n\nexport type PurgeServiceCacheInput = {\n  environmentId: Scalars['String']['input'];\n  scope: PurgeCacheScope;\n  serviceId: Scalars['String']['input'];\n};\n\nexport type Query = {\n  __typename?: 'Query';\n  /** Get all volume instances for a given volume */\n  adminVolumeInstancesForVolume: Array<VolumeInstance>;\n  /** Returns the platform feature flags enabled for the current user */\n  allPlatformFeatureFlags: Array<PlatformFeatureFlagStatus>;\n  /** Introspect the current API token and its accessible workspaces. */\n  apiToken: ApiTokenContext;\n  /** Gets all API tokens for the authenticated user. */\n  apiTokens: QueryApiTokensConnection;\n  /** Get an audit log by ID */\n  auditLog: AuditLog;\n  /** Get a list of all audit log event types and their description */\n  auditLogEventTypeInfo: Array<AuditLogEventTypeInfo>;\n  /** Gets audit logs for a workspace. */\n  auditLogs: QueryAuditLogsConnection;\n  /** Get the S3-compatible credentials for a bucket */\n  bucketInstanceDetails?: Maybe<BucketInstanceDetails>;\n  /** Get the S3-compatible credentials for a bucket */\n  bucketS3Credentials: Array<BucketS3CompatibleCredentials>;\n  /** Fetch logs for a build */\n  buildLogs: Array<Log>;\n  /** Preview a canvas layout merge from one environment to another. Returns the merged state and the mutations needed to reach it. */\n  canvasViewMergePreview: CanvasViewMergePreview;\n  /** Gets the image URL for a Notion image block */\n  changelogBlockImage: Scalars['String']['output'];\n  /** Get compliance agreements for a workspace including HIPAA BAA and GDPR DPA status. */\n  complianceAgreements: ComplianceAgreementsInfo;\n  /** Fetch details for a custom domain */\n  customDomain: CustomDomain;\n  /** Checks if a custom domain is available. */\n  customDomainAvailable: DomainAvailable;\n  /** Find a single deployment */\n  deployment: Deployment;\n  /** Get the deployment events for a deployment */\n  deploymentEvents: QueryDeploymentEventsConnection;\n  /** Get the deployment instance executions for a deployment. */\n  deploymentInstanceExecutions: QueryDeploymentInstanceExecutionsConnection;\n  /** Fetch logs for a deployment */\n  deploymentLogs: Array<Log>;\n  /** Find a single DeploymentSnapshot */\n  deploymentSnapshot?: Maybe<DeploymentSnapshot>;\n  /** All deployment triggers. */\n  deploymentTriggers: QueryDeploymentTriggersConnection;\n  /** Get all deployments */\n  deployments: QueryDeploymentsConnection;\n  /**\n   * Domain with status\n   * @deprecated Use the `status` field within the `domain` query instead\n   */\n  domainStatus: DomainWithStatus;\n  /** All domains for a service instance */\n  domains: AllDomains;\n  /** Preview HA static egress IPs that would be assigned without persisting */\n  egressGatewayHAPreview: Array<EgressGateway>;\n  /** Preview legacy static egress IP that would be assigned without persisting */\n  egressGatewayLegacyPreview: Array<EgressGateway>;\n  /** All egress gateways assigned to a service instance */\n  egressGateways: Array<EgressGateway>;\n  /** Find a single environment */\n  environment: Environment;\n  /** Fetch logs for a project environment. Build logs are excluded unless a snapshot ID is explicitly provided in the filter */\n  environmentLogs: Array<Log>;\n  /** Get a single environment patch by ID */\n  environmentPatch: EnvironmentPatch;\n  /** Get the patches for an environment */\n  environmentPatches: QueryEnvironmentPatchesConnection;\n  /** Get the latest staged commit for a single environment. */\n  environmentStagedChanges: EnvironmentPatch;\n  /** Gets all environments for a project. */\n  environments: QueryEnvironmentsConnection;\n  /** Get the estimated total cost of the project at the end of the current billing cycle. If no `startDate` is provided, the usage for the current billing period of the project owner is returned. */\n  estimatedUsage: Array<EstimatedUsage>;\n  /** Gets the events for a project. */\n  events: QueryEventsConnection;\n  /** Get the workspaces the user doesn't belong to, but needs access (like when invited to a project) */\n  externalWorkspaces: Array<ExternalWorkspace>;\n  /** Get information about a specific function runtime */\n  functionRuntime: FunctionRuntime;\n  /** List available function runtimes */\n  functionRuntimes: Array<FunctionRuntime>;\n  /** Checks if user has access to GitHub repository */\n  gitHubRepoAccessAvailable: GitHubAccess;\n  /** Gets SSH public keys from the authenticated user's GitHub account. */\n  gitHubSshKeys: Array<GitHubSshKey>;\n  /** Check if a repo name is available */\n  githubIsRepoNameAvailable: Scalars['Boolean']['output'];\n  /** Get info for a GitHub pull request */\n  githubPRInfo?: Maybe<GitHubPrInfo>;\n  /** Get info for a GitHub pull request, including fetch errors */\n  githubPRInfoResult: GitHubPrInfoResult;\n  /** Checks if user has access to GitHub repository */\n  githubRepo: GitHubRepoWithoutInstallation;\n  /** Get branches for a GitHub repo that the authenticated user has access to */\n  githubRepoBranches: Array<GitHubBranch>;\n  /** Get a list of repos for a user that Railway has access to */\n  githubRepos: Array<GitHubRepo>;\n  /** Get a list of scopes the user has installed the installation to */\n  githubWritableScopes: Array<Scalars['String']['output']>;\n  /** Get the Herokus apps for the current user */\n  herokuApps: Array<HerokuApp>;\n  /** Get HTTP request duration metrics for a service (avg, p50, p90, p95, p99) */\n  httpDurationMetrics: HttpDurationMetricsResult;\n  /** Fetch HTTP logs for a deployment */\n  httpLogs: Array<HttpLog>;\n  /** Get HTTP request metrics for a service */\n  httpMetrics: HttpMetricsResult;\n  /** Get HTTP request metrics for a service, grouped by status code */\n  httpMetricsGroupedByStatus: Array<HttpMetricsByStatusResult>;\n  /** Get an integration auth by provider providerId */\n  integrationAuth: IntegrationAuth;\n  /** Get all integration auths for a user */\n  integrationAuths: QueryIntegrationAuthsConnection;\n  /** Get all integrations for a project */\n  integrations: QueryIntegrationsConnection;\n  /** Get an invite code by the code */\n  inviteCode: InviteCode;\n  /** Gets the authenticated user. */\n  me: User;\n  /** Get metrics for a project, environment, and service */\n  metrics: Array<MetricsResult>;\n  /** Gets notification deliveries for the authenticated user */\n  notificationDeliveries: QueryNotificationDeliveriesConnection;\n  /** Gets a notification delivery by ID for the authenticated user */\n  notificationDelivery?: Maybe<NotificationDelivery>;\n  /** Get all notification rules for a workspace and project */\n  notificationRules: Array<NotificationRule>;\n  /** Get all observability dashboards for an environment */\n  observabilityDashboards: QueryObservabilityDashboardsConnection;\n  /** Gets all passkeys for the authenticated user */\n  passkeys: QueryPasskeysConnection;\n  /** Get the current status of the platform */\n  platformStatus: PlatformStatus;\n  /**\n   * Get a plugin by ID.\n   * @deprecated Plugins are deprecated\n   */\n  plugin: Plugin;\n  /**\n   * Fetch logs for a plugin\n   * @deprecated Plugins are deprecated\n   */\n  pluginLogs: Array<Log>;\n  /** Get the email preferences for a user */\n  preferences: Preferences;\n  /** Get a private network endpoint for a service instance. */\n  privateNetworkEndpoint?: Maybe<PrivateNetworkEndpoint>;\n  /** Check if an endpoint name is available. */\n  privateNetworkEndpointNameAvailable: Scalars['Boolean']['output'];\n  /** List private networks for an environment. */\n  privateNetworks: Array<PrivateNetwork>;\n  /** Get a project by ID */\n  project: Project;\n  /** Get comprehensive compliance information for a project including 2FA status, member permissions, backup schedules, and compliance agreements. Requires workspace API token with admin access. */\n  projectCompliance: ProjectComplianceInfo;\n  /** Get a project invitation by code */\n  projectInvitation: PublicProjectInvitation;\n  /** Get invitations for a project */\n  projectInvitations: Array<ProjectInvitation>;\n  /** Get an invite code for a project for a specifc role */\n  projectInviteCode: InviteCode;\n  /** Gets users who belong to a project along with their role */\n  projectMembers: Array<ProjectMember>;\n  /** Get resource access rules for project-specific actions */\n  projectResourceAccess: ProjectResourceAccess;\n  /** Get paginated usage grouped by project and service for a workspace. */\n  projectServiceUsage: ProjectServiceUsagePage;\n  /** Get a single project token by the value in the header */\n  projectToken: ProjectToken;\n  /** Get all project tokens for a project */\n  projectTokens: QueryProjectTokensConnection;\n  /** Get workspace members for a project with 2FA details */\n  projectWorkspaceMembers: ProjectWorkspaceMembersResponse;\n  /** Gets all projects for a user or workspace. */\n  projects: QueryProjectsConnection;\n  /** Fetch multiple projects by id. Skips ids the caller cannot access (does not throw on partial denial). Intended for batched dashboard hydration of a small viewport-sized set of cards. */\n  projectsByIds: Array<Project>;\n  /** Get public Railway stats. */\n  publicStats: PublicStats;\n  /** Gets the ReferralInfo for the authenticated user. */\n  referralInfo: ReferralInfo;\n  /** List available regions */\n  regions: Array<Region>;\n  /** Get resource access for the current user or workspace */\n  resourceAccess: ResourceAccess;\n  /** Get a sandbox by id. */\n  sandbox?: Maybe<Sandbox>;\n  /** List named sandbox checkpoints in an environment. */\n  sandboxCheckpoints: Array<SandboxCheckpoint>;\n  /** Resumable sessions inside a sandbox — interactive shells and one-off exec commands, live or recently exited. Null when the sandbox can't report them (e.g. its vm-init predates session listing). */\n  sandboxSessions?: Maybe<QuerySandboxSessionsConnection>;\n  /** Get a template's build state by id (the recipe content hash). READY once its checkpoint exists; BUILDING/FAILED reflect the build workflow. */\n  sandboxTemplateBuild: SandboxTemplateBuild;\n  /** List sandboxes in an environment. */\n  sandboxes: QuerySandboxesConnection;\n  /** Get a service by ID */\n  service: Service;\n  /** Checks if a service domain is available */\n  serviceDomainAvailable: DomainAvailable;\n  /** Get a service instance belonging to a service and environment */\n  serviceInstance: ServiceInstance;\n  /** Returns the auto-deploy status for a service instance, including whether it can be enabled. */\n  serviceInstanceAutoDeployStatus: ServiceInstanceAutoDeployStatus;\n  /** Check if the upstream repo for a service has an update available */\n  serviceInstanceIsUpdatable: Scalars['Boolean']['output'];\n  /** Get the service instance resource limit overrides (null if no overrides set) */\n  serviceInstanceLimitOverride?: Maybe<Scalars['ServiceInstanceLimit']['output']>;\n  /** Get the merged resource limits for a service instance (includes plan defaults) */\n  serviceInstanceLimits: Scalars['ServiceInstanceLimit']['output'];\n  /** Gets all sessions for authenticated user. */\n  sessions: QuerySessionsConnection;\n  /** Gets SSH public keys. If workspaceId is provided, returns the keys owned by that workspace (requires workspace MEMBER access). Under a workspace-scoped API token, workspaceId defaults to the token's workspace when omitted; otherwise returns the authenticated user's personal keys. */\n  sshPublicKeys: QuerySshPublicKeysConnection;\n  /** All TCP proxies for a service instance */\n  tcpProxies: Array<TcpProxy>;\n  /**\n   * Find a team by ID\n   * @deprecated Teams are now workspaces. Use the workspace query instead.\n   */\n  team: Team;\n  /**\n   * Get all templates for a team.\n   * @deprecated Use templates instead - teams are now workspaces\n   */\n  teamTemplates: QueryTeamTemplatesConnection;\n  /** Get a template by code or ID or GitHub owner and repo. */\n  template: Template;\n  /** Get the metrics for a template. */\n  templateMetrics: TemplateMetrics;\n  /** Search published templates using the backend-ranked template search index. */\n  templateSearch: QueryTemplateSearchConnection;\n  /** Get the source template for a project. */\n  templateSourceForProject?: Maybe<Template>;\n  /** Get all published templates. */\n  templates: QueryTemplatesConnection;\n  /** Count all published templates. */\n  templatesCount: Scalars['Int']['output'];\n  /** Get all trusted domains for a workspace */\n  trustedDomains: QueryTrustedDomainsConnection;\n  /** Gets the TwoFactorInfo for the authenticated user. */\n  twoFactorInfo: TwoFactorInfo;\n  /** Get the usage for a single project or all projects for a user/workspace. If no `projectId` or `workspaceId` is provided, the usage for the current user is returned. If no `startDate` is provided, the usage for the current billing period of the project owner is returned. */\n  usage: Array<AggregatedUsage>;\n  /**\n   * Get the total kickback earnings for a user.\n   * @deprecated This field is deprecated and will be removed in future versions.\n   */\n  userKickbackEarnings: UserKickbackEarnings;\n  /** Get the public profile for a user */\n  userProfile: UserProfileResponse;\n  /**\n   * Get all templates for the current user.\n   * @deprecated Users don't have personal templates anymore, they belong to their team now\n   */\n  userTemplates: QueryUserTemplatesConnection;\n  /** All variables by pluginId or serviceId. If neither are provided, all shared variables are returned. */\n  variables: Scalars['EnvironmentVariables']['output'];\n  /** All rendered variables that are required for a service deployment. */\n  variablesForServiceDeployment: Scalars['EnvironmentVariables']['output'];\n  /** Get information about the user's Vercel accounts */\n  vercelInfo: VercelInfo;\n  /** Get a single volume instance by id */\n  volumeInstance: VolumeInstance;\n  /** List backups of a volume instance */\n  volumeInstanceBackupList: Array<VolumeInstanceBackup>;\n  /** List backups schedules of a volume instance */\n  volumeInstanceBackupScheduleList: Array<VolumeInstanceBackupSchedule>;\n  /** Gets the status of a workflow */\n  workflowStatus: WorkflowResult;\n  /** Get the workspace */\n  workspace: Workspace;\n  /** Find a workspace by invite code */\n  workspaceByCode: Workspace;\n  /** Gets all identity providers of a workspace */\n  workspaceIdentityProviders: QueryWorkspaceIdentityProvidersConnection;\n  /** Get the policies for a workspace */\n  workspacePolicy?: Maybe<WorkspacePolicy>;\n  /** List deploy sources that can be added to a workspace policy. */\n  workspacePolicySelectableDeploySources: Array<WorkspacePolicySelectableDeploySource>;\n  /** Get all templates for a workspace. */\n  workspaceTemplates: QueryWorkspaceTemplatesConnection;\n};\n\n\nexport type QueryAdminVolumeInstancesForVolumeArgs = {\n  volumeId: Scalars['String']['input'];\n};\n\n\nexport type QueryApiTokensArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\nexport type QueryAuditLogArgs = {\n  id: Scalars['String']['input'];\n  workspaceId: Scalars['String']['input'];\n};\n\n\nexport type QueryAuditLogsArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  filter?: InputMaybe<AuditLogFilterInput>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n  sort?: InputMaybe<SortOrder>;\n  workspaceId: Scalars['String']['input'];\n};\n\n\nexport type QueryBucketInstanceDetailsArgs = {\n  bucketId: Scalars['String']['input'];\n  environmentId: Scalars['String']['input'];\n};\n\n\nexport type QueryBucketS3CredentialsArgs = {\n  bucketId: Scalars['String']['input'];\n  environmentId: Scalars['String']['input'];\n  projectId: Scalars['String']['input'];\n};\n\n\nexport type QueryBuildLogsArgs = {\n  deploymentId: Scalars['String']['input'];\n  endDate?: InputMaybe<Scalars['DateTime']['input']>;\n  filter?: InputMaybe<Scalars['String']['input']>;\n  limit?: InputMaybe<Scalars['Int']['input']>;\n  startDate?: InputMaybe<Scalars['DateTime']['input']>;\n};\n\n\nexport type QueryCanvasViewMergePreviewArgs = {\n  sourceEnvironmentId: Scalars['String']['input'];\n  targetEnvironmentId: Scalars['String']['input'];\n};\n\n\nexport type QueryChangelogBlockImageArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type QueryComplianceAgreementsArgs = {\n  workspaceId: Scalars['String']['input'];\n};\n\n\nexport type QueryCustomDomainArgs = {\n  id: Scalars['String']['input'];\n  projectId: Scalars['String']['input'];\n};\n\n\nexport type QueryCustomDomainAvailableArgs = {\n  domain: Scalars['String']['input'];\n};\n\n\nexport type QueryDeploymentArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type QueryDeploymentEventsArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  id: Scalars['String']['input'];\n  last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\nexport type QueryDeploymentInstanceExecutionsArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  input: DeploymentInstanceExecutionListInput;\n  last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\nexport type QueryDeploymentLogsArgs = {\n  deploymentId: Scalars['String']['input'];\n  endDate?: InputMaybe<Scalars['DateTime']['input']>;\n  filter?: InputMaybe<Scalars['String']['input']>;\n  limit?: InputMaybe<Scalars['Int']['input']>;\n  startDate?: InputMaybe<Scalars['DateTime']['input']>;\n};\n\n\nexport type QueryDeploymentSnapshotArgs = {\n  deploymentId: Scalars['String']['input'];\n};\n\n\nexport type QueryDeploymentTriggersArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  environmentId: Scalars['String']['input'];\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n  projectId: Scalars['String']['input'];\n  serviceId: Scalars['String']['input'];\n};\n\n\nexport type QueryDeploymentsArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  input: DeploymentListInput;\n  last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\nexport type QueryDomainStatusArgs = {\n  id: Scalars['String']['input'];\n  projectId: Scalars['String']['input'];\n};\n\n\nexport type QueryDomainsArgs = {\n  environmentId: Scalars['String']['input'];\n  projectId: Scalars['String']['input'];\n  serviceId: Scalars['String']['input'];\n};\n\n\nexport type QueryEgressGatewayHaPreviewArgs = {\n  environmentId: Scalars['String']['input'];\n  serviceId: Scalars['String']['input'];\n};\n\n\nexport type QueryEgressGatewayLegacyPreviewArgs = {\n  environmentId: Scalars['String']['input'];\n  serviceId: Scalars['String']['input'];\n};\n\n\nexport type QueryEgressGatewaysArgs = {\n  environmentId: Scalars['String']['input'];\n  serviceId: Scalars['String']['input'];\n};\n\n\nexport type QueryEnvironmentArgs = {\n  id: Scalars['String']['input'];\n  projectId?: InputMaybe<Scalars['String']['input']>;\n};\n\n\nexport type QueryEnvironmentLogsArgs = {\n  afterDate?: InputMaybe<Scalars['String']['input']>;\n  afterLimit?: InputMaybe<Scalars['Int']['input']>;\n  anchorDate?: InputMaybe<Scalars['String']['input']>;\n  beforeDate?: InputMaybe<Scalars['String']['input']>;\n  beforeLimit?: InputMaybe<Scalars['Int']['input']>;\n  environmentId: Scalars['String']['input'];\n  filter?: InputMaybe<Scalars['String']['input']>;\n};\n\n\nexport type QueryEnvironmentPatchArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type QueryEnvironmentPatchesArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  environmentId: Scalars['String']['input'];\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\nexport type QueryEnvironmentStagedChangesArgs = {\n  environmentId: Scalars['String']['input'];\n};\n\n\nexport type QueryEnvironmentsArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  isEphemeral?: InputMaybe<Scalars['Boolean']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n  projectId: Scalars['String']['input'];\n};\n\n\nexport type QueryEstimatedUsageArgs = {\n  includeDeleted?: InputMaybe<Scalars['Boolean']['input']>;\n  measurements: Array<MetricMeasurement>;\n  projectId?: InputMaybe<Scalars['String']['input']>;\n  workspaceId?: InputMaybe<Scalars['String']['input']>;\n};\n\n\nexport type QueryEventsArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  environmentId?: InputMaybe<Scalars['String']['input']>;\n  filter?: InputMaybe<EventFilterInput>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n  projectId: Scalars['String']['input'];\n};\n\n\nexport type QueryExternalWorkspacesArgs = {\n  projectId?: InputMaybe<Scalars['String']['input']>;\n};\n\n\nexport type QueryFunctionRuntimeArgs = {\n  name: FunctionRuntimeName;\n};\n\n\nexport type QueryGitHubRepoAccessAvailableArgs = {\n  fullRepoName: Scalars['String']['input'];\n};\n\n\nexport type QueryGithubIsRepoNameAvailableArgs = {\n  fullRepoName: Scalars['String']['input'];\n};\n\n\nexport type QueryGithubPrInfoArgs = {\n  prNumber: Scalars['Int']['input'];\n  serviceId: Scalars['String']['input'];\n};\n\n\nexport type QueryGithubPrInfoResultArgs = {\n  prNumber: Scalars['Int']['input'];\n  serviceId: Scalars['String']['input'];\n};\n\n\nexport type QueryGithubRepoArgs = {\n  fullRepoName: Scalars['String']['input'];\n};\n\n\nexport type QueryGithubRepoBranchesArgs = {\n  owner: Scalars['String']['input'];\n  repo: Scalars['String']['input'];\n};\n\n\nexport type QueryHttpDurationMetricsArgs = {\n  endDate: Scalars['DateTime']['input'];\n  environmentId: Scalars['String']['input'];\n  method?: InputMaybe<Scalars['String']['input']>;\n  path?: InputMaybe<Scalars['String']['input']>;\n  serviceId: Scalars['String']['input'];\n  startDate: Scalars['DateTime']['input'];\n  statusCode?: InputMaybe<Scalars['Int']['input']>;\n  stepSeconds?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\nexport type QueryHttpLogsArgs = {\n  afterDate?: InputMaybe<Scalars['String']['input']>;\n  afterLimit?: InputMaybe<Scalars['Int']['input']>;\n  anchorDate?: InputMaybe<Scalars['String']['input']>;\n  beforeDate?: InputMaybe<Scalars['String']['input']>;\n  beforeLimit?: InputMaybe<Scalars['Int']['input']>;\n  deploymentId: Scalars['String']['input'];\n  endDate?: InputMaybe<Scalars['String']['input']>;\n  filter?: InputMaybe<Scalars['String']['input']>;\n  limit?: InputMaybe<Scalars['Int']['input']>;\n  startDate?: InputMaybe<Scalars['String']['input']>;\n};\n\n\nexport type QueryHttpMetricsArgs = {\n  endDate: Scalars['DateTime']['input'];\n  environmentId: Scalars['String']['input'];\n  method?: InputMaybe<Scalars['String']['input']>;\n  path?: InputMaybe<Scalars['String']['input']>;\n  serviceId: Scalars['String']['input'];\n  startDate: Scalars['DateTime']['input'];\n  statusCode?: InputMaybe<Scalars['Int']['input']>;\n  stepSeconds?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\nexport type QueryHttpMetricsGroupedByStatusArgs = {\n  endDate: Scalars['DateTime']['input'];\n  environmentId: Scalars['String']['input'];\n  method?: InputMaybe<Scalars['String']['input']>;\n  path?: InputMaybe<Scalars['String']['input']>;\n  serviceId: Scalars['String']['input'];\n  startDate: Scalars['DateTime']['input'];\n  stepSeconds?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\nexport type QueryIntegrationAuthArgs = {\n  provider: Scalars['String']['input'];\n  providerId: Scalars['String']['input'];\n};\n\n\nexport type QueryIntegrationAuthsArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\nexport type QueryIntegrationsArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n  projectId: Scalars['String']['input'];\n};\n\n\nexport type QueryInviteCodeArgs = {\n  code: Scalars['String']['input'];\n};\n\n\nexport type QueryMetricsArgs = {\n  averagingWindowSeconds?: InputMaybe<Scalars['Int']['input']>;\n  endDate?: InputMaybe<Scalars['DateTime']['input']>;\n  environmentId?: InputMaybe<Scalars['String']['input']>;\n  groupBy?: InputMaybe<Array<MetricTag>>;\n  includeDeleted?: InputMaybe<Scalars['Boolean']['input']>;\n  measurements: Array<MetricMeasurement>;\n  projectId?: InputMaybe<Scalars['String']['input']>;\n  sampleRateSeconds?: InputMaybe<Scalars['Int']['input']>;\n  serviceId?: InputMaybe<Scalars['String']['input']>;\n  startDate: Scalars['DateTime']['input'];\n  volumeId?: InputMaybe<Scalars['String']['input']>;\n  volumeInstanceExternalId?: InputMaybe<Scalars['String']['input']>;\n  workspaceId?: InputMaybe<Scalars['String']['input']>;\n};\n\n\nexport type QueryNotificationDeliveriesArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  filter?: InputMaybe<NotificationDeliveryFilterInput>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\nexport type QueryNotificationDeliveryArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type QueryNotificationRulesArgs = {\n  projectId?: InputMaybe<Scalars['String']['input']>;\n  workspaceId: Scalars['String']['input'];\n};\n\n\nexport type QueryObservabilityDashboardsArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  environmentId: Scalars['String']['input'];\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\nexport type QueryPasskeysArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\nexport type QueryPluginArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type QueryPluginLogsArgs = {\n  endDate?: InputMaybe<Scalars['DateTime']['input']>;\n  environmentId: Scalars['String']['input'];\n  filter?: InputMaybe<Scalars['String']['input']>;\n  limit?: InputMaybe<Scalars['Int']['input']>;\n  pluginId: Scalars['String']['input'];\n  startDate?: InputMaybe<Scalars['DateTime']['input']>;\n};\n\n\nexport type QueryPreferencesArgs = {\n  token?: InputMaybe<Scalars['String']['input']>;\n};\n\n\nexport type QueryPrivateNetworkEndpointArgs = {\n  environmentId: Scalars['String']['input'];\n  privateNetworkId: Scalars['String']['input'];\n  serviceId: Scalars['String']['input'];\n};\n\n\nexport type QueryPrivateNetworkEndpointNameAvailableArgs = {\n  environmentId: Scalars['String']['input'];\n  prefix: Scalars['String']['input'];\n  privateNetworkId: Scalars['String']['input'];\n};\n\n\nexport type QueryPrivateNetworksArgs = {\n  environmentId: Scalars['String']['input'];\n};\n\n\nexport type QueryProjectArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type QueryProjectComplianceArgs = {\n  projectId: Scalars['String']['input'];\n};\n\n\nexport type QueryProjectInvitationArgs = {\n  code: Scalars['String']['input'];\n};\n\n\nexport type QueryProjectInvitationsArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type QueryProjectInviteCodeArgs = {\n  projectId: Scalars['String']['input'];\n  role: ProjectRole;\n};\n\n\nexport type QueryProjectMembersArgs = {\n  projectId: Scalars['String']['input'];\n};\n\n\nexport type QueryProjectResourceAccessArgs = {\n  projectId: Scalars['String']['input'];\n};\n\n\nexport type QueryProjectServiceUsageArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  endDate: Scalars['DateTime']['input'];\n  first?: InputMaybe<Scalars['Int']['input']>;\n  includeDeleted?: InputMaybe<Scalars['Boolean']['input']>;\n  measurements: Array<MetricMeasurement>;\n  startDate: Scalars['DateTime']['input'];\n  workspaceId: Scalars['String']['input'];\n};\n\n\nexport type QueryProjectTokensArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n  projectId: Scalars['String']['input'];\n};\n\n\nexport type QueryProjectWorkspaceMembersArgs = {\n  projectId: Scalars['String']['input'];\n};\n\n\nexport type QueryProjectsArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  includeDeleted?: InputMaybe<Scalars['Boolean']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n  orderBy?: InputMaybe<ProjectsOrderBy>;\n  userId?: InputMaybe<Scalars['String']['input']>;\n  workspaceId?: InputMaybe<Scalars['String']['input']>;\n};\n\n\nexport type QueryProjectsByIdsArgs = {\n  ids: Array<Scalars['String']['input']>;\n};\n\n\nexport type QueryReferralInfoArgs = {\n  workspaceId: Scalars['String']['input'];\n};\n\n\nexport type QueryRegionsArgs = {\n  projectId?: InputMaybe<Scalars['String']['input']>;\n};\n\n\nexport type QueryResourceAccessArgs = {\n  explicitResourceOwner: ExplicitOwnerInput;\n};\n\n\nexport type QuerySandboxArgs = {\n  environmentId: Scalars['String']['input'];\n  id: Scalars['String']['input'];\n};\n\n\nexport type QuerySandboxCheckpointsArgs = {\n  environmentId: Scalars['String']['input'];\n};\n\n\nexport type QuerySandboxSessionsArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  environmentId: Scalars['String']['input'];\n  first?: InputMaybe<Scalars['Int']['input']>;\n  id: Scalars['String']['input'];\n  last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\nexport type QuerySandboxTemplateBuildArgs = {\n  environmentId: Scalars['String']['input'];\n  id: Scalars['ID']['input'];\n};\n\n\nexport type QuerySandboxesArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  environmentId: Scalars['String']['input'];\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\nexport type QueryServiceArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type QueryServiceDomainAvailableArgs = {\n  domain: Scalars['String']['input'];\n};\n\n\nexport type QueryServiceInstanceArgs = {\n  environmentId: Scalars['String']['input'];\n  serviceId: Scalars['String']['input'];\n};\n\n\nexport type QueryServiceInstanceAutoDeployStatusArgs = {\n  environmentId: Scalars['String']['input'];\n  projectId: Scalars['String']['input'];\n  serviceId: Scalars['String']['input'];\n};\n\n\nexport type QueryServiceInstanceIsUpdatableArgs = {\n  environmentId: Scalars['String']['input'];\n  serviceId: Scalars['String']['input'];\n};\n\n\nexport type QueryServiceInstanceLimitOverrideArgs = {\n  environmentId: Scalars['String']['input'];\n  serviceId: Scalars['String']['input'];\n};\n\n\nexport type QueryServiceInstanceLimitsArgs = {\n  environmentId: Scalars['String']['input'];\n  serviceId: Scalars['String']['input'];\n};\n\n\nexport type QuerySessionsArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\nexport type QuerySshPublicKeysArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n  workspaceId?: InputMaybe<Scalars['String']['input']>;\n};\n\n\nexport type QueryTcpProxiesArgs = {\n  environmentId: Scalars['String']['input'];\n  serviceId: Scalars['String']['input'];\n};\n\n\nexport type QueryTeamArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type QueryTeamTemplatesArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n  teamId: Scalars['String']['input'];\n};\n\n\nexport type QueryTemplateArgs = {\n  code?: InputMaybe<Scalars['String']['input']>;\n  id?: InputMaybe<Scalars['String']['input']>;\n  owner?: InputMaybe<Scalars['String']['input']>;\n  repo?: InputMaybe<Scalars['String']['input']>;\n};\n\n\nexport type QueryTemplateMetricsArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type QueryTemplateSearchArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  category?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n  query: Scalars['String']['input'];\n  verified?: InputMaybe<Scalars['Boolean']['input']>;\n};\n\n\nexport type QueryTemplateSourceForProjectArgs = {\n  projectId: Scalars['String']['input'];\n};\n\n\nexport type QueryTemplatesArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n  recommended?: InputMaybe<Scalars['Boolean']['input']>;\n  verified?: InputMaybe<Scalars['Boolean']['input']>;\n};\n\n\nexport type QueryTrustedDomainsArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n  workspaceId: Scalars['String']['input'];\n};\n\n\nexport type QueryUsageArgs = {\n  endDate?: InputMaybe<Scalars['DateTime']['input']>;\n  groupBy?: InputMaybe<Array<MetricTag>>;\n  includeDeleted?: InputMaybe<Scalars['Boolean']['input']>;\n  measurements: Array<MetricMeasurement>;\n  projectId?: InputMaybe<Scalars['String']['input']>;\n  startDate?: InputMaybe<Scalars['DateTime']['input']>;\n  workspaceId?: InputMaybe<Scalars['String']['input']>;\n};\n\n\nexport type QueryUserKickbackEarningsArgs = {\n  userId: Scalars['String']['input'];\n};\n\n\nexport type QueryUserProfileArgs = {\n  username: Scalars['String']['input'];\n};\n\n\nexport type QueryUserTemplatesArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\nexport type QueryVariablesArgs = {\n  environmentId: Scalars['String']['input'];\n  projectId: Scalars['String']['input'];\n  serviceId?: InputMaybe<Scalars['String']['input']>;\n  unrendered?: InputMaybe<Scalars['Boolean']['input']>;\n};\n\n\nexport type QueryVariablesForServiceDeploymentArgs = {\n  environmentId: Scalars['String']['input'];\n  projectId: Scalars['String']['input'];\n  serviceId: Scalars['String']['input'];\n};\n\n\nexport type QueryVolumeInstanceArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type QueryVolumeInstanceBackupListArgs = {\n  volumeInstanceId: Scalars['String']['input'];\n};\n\n\nexport type QueryVolumeInstanceBackupScheduleListArgs = {\n  volumeInstanceId: Scalars['String']['input'];\n};\n\n\nexport type QueryWorkflowStatusArgs = {\n  workflowId: Scalars['String']['input'];\n};\n\n\nexport type QueryWorkspaceArgs = {\n  workspaceId: Scalars['String']['input'];\n};\n\n\nexport type QueryWorkspaceByCodeArgs = {\n  code: Scalars['String']['input'];\n};\n\n\nexport type QueryWorkspaceIdentityProvidersArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n  workspaceId: Scalars['String']['input'];\n};\n\n\nexport type QueryWorkspacePolicyArgs = {\n  workspaceId: Scalars['String']['input'];\n};\n\n\nexport type QueryWorkspacePolicySelectableDeploySourcesArgs = {\n  sourceType: WorkspacePolicyDeploySourceType;\n  workspaceId: Scalars['String']['input'];\n};\n\n\nexport type QueryWorkspaceTemplatesArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n  workspaceId: Scalars['String']['input'];\n};\n\nexport type QueryApiTokensConnection = {\n  __typename?: 'QueryApiTokensConnection';\n  edges: Array<QueryApiTokensConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type QueryApiTokensConnectionEdge = {\n  __typename?: 'QueryApiTokensConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: ApiToken;\n};\n\nexport type QueryAuditLogsConnection = {\n  __typename?: 'QueryAuditLogsConnection';\n  edges: Array<QueryAuditLogsConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type QueryAuditLogsConnectionEdge = {\n  __typename?: 'QueryAuditLogsConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: AuditLog;\n};\n\nexport type QueryDeploymentEventsConnection = {\n  __typename?: 'QueryDeploymentEventsConnection';\n  edges: Array<QueryDeploymentEventsConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type QueryDeploymentEventsConnectionEdge = {\n  __typename?: 'QueryDeploymentEventsConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: DeploymentEvent;\n};\n\nexport type QueryDeploymentInstanceExecutionsConnection = {\n  __typename?: 'QueryDeploymentInstanceExecutionsConnection';\n  edges: Array<QueryDeploymentInstanceExecutionsConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type QueryDeploymentInstanceExecutionsConnectionEdge = {\n  __typename?: 'QueryDeploymentInstanceExecutionsConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: DeploymentInstanceExecution;\n};\n\nexport type QueryDeploymentTriggersConnection = {\n  __typename?: 'QueryDeploymentTriggersConnection';\n  edges: Array<QueryDeploymentTriggersConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type QueryDeploymentTriggersConnectionEdge = {\n  __typename?: 'QueryDeploymentTriggersConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: DeploymentTrigger;\n};\n\nexport type QueryDeploymentsConnection = {\n  __typename?: 'QueryDeploymentsConnection';\n  edges: Array<QueryDeploymentsConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type QueryDeploymentsConnectionEdge = {\n  __typename?: 'QueryDeploymentsConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: Deployment;\n};\n\nexport type QueryEnvironmentPatchesConnection = {\n  __typename?: 'QueryEnvironmentPatchesConnection';\n  edges: Array<QueryEnvironmentPatchesConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type QueryEnvironmentPatchesConnectionEdge = {\n  __typename?: 'QueryEnvironmentPatchesConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: EnvironmentPatch;\n};\n\nexport type QueryEnvironmentsConnection = {\n  __typename?: 'QueryEnvironmentsConnection';\n  edges: Array<QueryEnvironmentsConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type QueryEnvironmentsConnectionEdge = {\n  __typename?: 'QueryEnvironmentsConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: Environment;\n};\n\nexport type QueryEventsConnection = {\n  __typename?: 'QueryEventsConnection';\n  edges: Array<QueryEventsConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type QueryEventsConnectionEdge = {\n  __typename?: 'QueryEventsConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: Event;\n};\n\nexport type QueryIntegrationAuthsConnection = {\n  __typename?: 'QueryIntegrationAuthsConnection';\n  edges: Array<QueryIntegrationAuthsConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type QueryIntegrationAuthsConnectionEdge = {\n  __typename?: 'QueryIntegrationAuthsConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: IntegrationAuth;\n};\n\nexport type QueryIntegrationsConnection = {\n  __typename?: 'QueryIntegrationsConnection';\n  edges: Array<QueryIntegrationsConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type QueryIntegrationsConnectionEdge = {\n  __typename?: 'QueryIntegrationsConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: Integration;\n};\n\nexport type QueryNotificationDeliveriesConnection = {\n  __typename?: 'QueryNotificationDeliveriesConnection';\n  edges: Array<QueryNotificationDeliveriesConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type QueryNotificationDeliveriesConnectionEdge = {\n  __typename?: 'QueryNotificationDeliveriesConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: NotificationDelivery;\n};\n\nexport type QueryObservabilityDashboardsConnection = {\n  __typename?: 'QueryObservabilityDashboardsConnection';\n  edges: Array<QueryObservabilityDashboardsConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type QueryObservabilityDashboardsConnectionEdge = {\n  __typename?: 'QueryObservabilityDashboardsConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: ObservabilityDashboard;\n};\n\nexport type QueryPasskeysConnection = {\n  __typename?: 'QueryPasskeysConnection';\n  edges: Array<QueryPasskeysConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type QueryPasskeysConnectionEdge = {\n  __typename?: 'QueryPasskeysConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: Passkey;\n};\n\nexport type QueryProjectTokensConnection = {\n  __typename?: 'QueryProjectTokensConnection';\n  edges: Array<QueryProjectTokensConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type QueryProjectTokensConnectionEdge = {\n  __typename?: 'QueryProjectTokensConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: ProjectToken;\n};\n\nexport type QueryProjectsConnection = {\n  __typename?: 'QueryProjectsConnection';\n  edges: Array<QueryProjectsConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type QueryProjectsConnectionEdge = {\n  __typename?: 'QueryProjectsConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: Project;\n};\n\nexport type QuerySandboxSessionsConnection = {\n  __typename?: 'QuerySandboxSessionsConnection';\n  edges: Array<QuerySandboxSessionsConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type QuerySandboxSessionsConnectionEdge = {\n  __typename?: 'QuerySandboxSessionsConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: SandboxSession;\n};\n\nexport type QuerySandboxesConnection = {\n  __typename?: 'QuerySandboxesConnection';\n  edges: Array<QuerySandboxesConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type QuerySandboxesConnectionEdge = {\n  __typename?: 'QuerySandboxesConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: Sandbox;\n};\n\nexport type QuerySessionsConnection = {\n  __typename?: 'QuerySessionsConnection';\n  edges: Array<QuerySessionsConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type QuerySessionsConnectionEdge = {\n  __typename?: 'QuerySessionsConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: Session;\n};\n\nexport type QuerySshPublicKeysConnection = {\n  __typename?: 'QuerySshPublicKeysConnection';\n  edges: Array<QuerySshPublicKeysConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type QuerySshPublicKeysConnectionEdge = {\n  __typename?: 'QuerySshPublicKeysConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: SshPublicKey;\n};\n\nexport type QueryTeamTemplatesConnection = {\n  __typename?: 'QueryTeamTemplatesConnection';\n  edges: Array<QueryTeamTemplatesConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type QueryTeamTemplatesConnectionEdge = {\n  __typename?: 'QueryTeamTemplatesConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: Template;\n};\n\nexport type QueryTemplateSearchConnection = {\n  __typename?: 'QueryTemplateSearchConnection';\n  edges: Array<QueryTemplateSearchConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type QueryTemplateSearchConnectionEdge = {\n  __typename?: 'QueryTemplateSearchConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: TemplateSearchResult;\n};\n\nexport type QueryTemplatesConnection = {\n  __typename?: 'QueryTemplatesConnection';\n  edges: Array<QueryTemplatesConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type QueryTemplatesConnectionEdge = {\n  __typename?: 'QueryTemplatesConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: Template;\n};\n\nexport type QueryTrustedDomainsConnection = {\n  __typename?: 'QueryTrustedDomainsConnection';\n  edges: Array<QueryTrustedDomainsConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type QueryTrustedDomainsConnectionEdge = {\n  __typename?: 'QueryTrustedDomainsConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: TrustedDomain;\n};\n\nexport type QueryUserTemplatesConnection = {\n  __typename?: 'QueryUserTemplatesConnection';\n  edges: Array<QueryUserTemplatesConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type QueryUserTemplatesConnectionEdge = {\n  __typename?: 'QueryUserTemplatesConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: Template;\n};\n\nexport type QueryWorkspaceIdentityProvidersConnection = {\n  __typename?: 'QueryWorkspaceIdentityProvidersConnection';\n  edges: Array<QueryWorkspaceIdentityProvidersConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type QueryWorkspaceIdentityProvidersConnectionEdge = {\n  __typename?: 'QueryWorkspaceIdentityProvidersConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: WorkspaceIdentityProvider;\n};\n\nexport type QueryWorkspaceTemplatesConnection = {\n  __typename?: 'QueryWorkspaceTemplatesConnection';\n  edges: Array<QueryWorkspaceTemplatesConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type QueryWorkspaceTemplatesConnectionEdge = {\n  __typename?: 'QueryWorkspaceTemplatesConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: Template;\n};\n\nexport type RecoveryCodeValidateInput = {\n  code: Scalars['String']['input'];\n  twoFactorLinkingKey?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type RecoveryCodes = {\n  __typename?: 'RecoveryCodes';\n  recoveryCodes: Array<Scalars['String']['output']>;\n};\n\nexport type ReferralInfo = Node & {\n  __typename?: 'ReferralInfo';\n  code: Scalars['String']['output'];\n  id: Scalars['ID']['output'];\n  referralStats: ReferralStats;\n  status: Scalars['String']['output'];\n};\n\nexport type ReferralInfoUpdateInput = {\n  code: Scalars['String']['input'];\n  workspaceId: Scalars['String']['input'];\n};\n\nexport type ReferralStats = {\n  __typename?: 'ReferralStats';\n  credited: Scalars['Int']['output'];\n  pending: Scalars['Int']['output'];\n};\n\nexport type ReferralStatus =\n  | 'REFEREE_CREDITED'\n  | 'REFERRER_CREDITED'\n  | 'REGISTERED';\n\nexport type ReferralUser = {\n  __typename?: 'ReferralUser';\n  code: Scalars['String']['output'];\n  id: Scalars['String']['output'];\n  status: ReferralStatus;\n};\n\nexport type Region = {\n  __typename?: 'Region';\n  /** Region country */\n  country: Scalars['String']['output'];\n  deploymentConstraints?: Maybe<RegionDeploymentConstraints>;\n  /** Region ID (airport code) */\n  id?: Maybe<Scalars['String']['output']>;\n  location: Scalars['String']['output'];\n  name: Scalars['String']['output'];\n  region?: Maybe<Scalars['String']['output']>;\n  workspaceId?: Maybe<Scalars['String']['output']>;\n};\n\nexport type RegionDeploymentConstraints = {\n  __typename?: 'RegionDeploymentConstraints';\n  /** Deprecation information for the region */\n  deprecationInfo?: Maybe<RegionDeprecationInfo>;\n};\n\nexport type RegionDeprecationInfo = {\n  __typename?: 'RegionDeprecationInfo';\n  /** Specifies if the region is deprecated */\n  isDeprecated: Scalars['Boolean']['output'];\n  /** Replacement region for the deprecated region */\n  replacementRegion: Scalars['String']['output'];\n};\n\nexport type RegistrationStatus =\n  | 'ONBOARDED'\n  | 'REGISTERED'\n  | 'WAITLISTED';\n\n/** Private Docker registry credentials. Only available for Pro plan deployments. */\nexport type RegistryCredentialsInput = {\n  password: Scalars['String']['input'];\n  username: Scalars['String']['input'];\n};\n\nexport type ReplicateVolumeInstanceSnapshotStatus =\n  | 'COMPLETED'\n  | 'FAILED'\n  | 'INITIATED'\n  | 'TRANSFERRING'\n  | 'UNRECOGNIZED';\n\n/** The status of a volume instance replication */\nexport type ReplicateVolumeInstanceStatus =\n  | 'COMPLETED'\n  | 'ERROR'\n  | 'QUEUED'\n  | 'TRANSFERRING_OFFLINE'\n  | 'TRANSFERRING_ONLINE';\n\nexport type ResetPluginCredentialsInput = {\n  environmentId: Scalars['String']['input'];\n};\n\nexport type ResetPluginInput = {\n  environmentId: Scalars['String']['input'];\n};\n\nexport type ResourceAccess = {\n  __typename?: 'ResourceAccess';\n  deployment: AccessRule;\n  project: AccessRule;\n};\n\nexport type ResourceOwnerType =\n  | 'WORKSPACE';\n\nexport type RestartPolicyType =\n  | 'ALWAYS'\n  | 'NEVER'\n  | 'ON_FAILURE';\n\nexport type Sandbox = {\n  __typename?: 'Sandbox';\n  createdAt: Scalars['DateTime']['output'];\n  environmentId: Scalars['String']['output'];\n  id: Scalars['ID']['output'];\n  idleTimeoutMinutes?: Maybe<Scalars['Int']['output']>;\n  networkIsolation: SandboxNetworkIsolation;\n  region: Scalars['String']['output'];\n  status: SandboxStatus;\n};\n\n/** A bootable snapshot of a sandbox's disk, scoped to an environment. Built from a template recipe or captured from a running sandbox. */\nexport type SandboxCheckpoint = {\n  __typename?: 'SandboxCheckpoint';\n  createdAt: Scalars['DateTime']['output'];\n  environmentId: Scalars['String']['output'];\n  id: Scalars['ID']['output'];\n  /** The checkpoint's identity within the environment (same as id): a recipe content hash for a built template, or the user-given name for one captured from a sandbox. */\n  key: Scalars['String']['output'];\n};\n\nexport type SandboxCreateInput = {\n  environmentId: Scalars['String']['input'];\n  idleTimeoutMinutes?: InputMaybe<Scalars['Int']['input']>;\n  /** Network access for the sandbox. Defaults to ISOLATED (no private network access). */\n  networkIsolation?: InputMaybe<SandboxNetworkIsolation>;\n  /** Fork an existing running sandbox in this environment. Mutually exclusive with template. */\n  sourceSandboxId?: InputMaybe<Scalars['String']['input']>;\n  template?: InputMaybe<SandboxTemplateInput>;\n  /** Environment variables baked into the sandbox, available to every command. Values may contain Railway variable references (e.g. ${{shared.FOO}}, ${{ServiceName.BAR}}), resolved at create time. */\n  variables?: InputMaybe<Scalars['EnvironmentVariables']['input']>;\n};\n\nexport type SandboxExecResult = {\n  __typename?: 'SandboxExecResult';\n  exitCode: Scalars['Int']['output'];\n  stderr: Scalars['String']['output'];\n  stdout: Scalars['String']['output'];\n  timedOut: Scalars['Boolean']['output'];\n  truncated: Scalars['Boolean']['output'];\n};\n\n/** Controls a sandbox's access to the environment's private network. */\nexport type SandboxNetworkIsolation =\n  /** Peer-isolated with public NAT egress only; no access to the environment's private network. Default. */\n  | 'ISOLATED'\n  /** Joins the environment's private network. */\n  | 'PRIVATE';\n\n/** A resumable session inside a sandbox: an interactive shell or a one-off exec command. */\nexport type SandboxSession = {\n  __typename?: 'SandboxSession';\n  /** Whether a client is currently connected. */\n  attached: Scalars['Boolean']['output'];\n  /** The exec command; empty for an interactive shell. */\n  command: Scalars['String']['output'];\n  createdAt?: Maybe<Scalars['DateTime']['output']>;\n  kind: SandboxSessionKind;\n  /** Stable session name; reconnect/attach by this. */\n  name: Scalars['String']['output'];\n  runState: SandboxSessionRunState;\n};\n\n/** Whether a session is an interactive shell or a one-off exec command. */\nexport type SandboxSessionKind =\n  | 'EXEC'\n  | 'SHELL';\n\n/** A session's process lifecycle. */\nexport type SandboxSessionRunState = {\n  __typename?: 'SandboxSessionRunState';\n  /** Process exit code; only meaningful once running is false. */\n  exitCode: Scalars['Int']['output'];\n  /** When the process exited; null while running. */\n  exitedAt?: Maybe<Scalars['DateTime']['output']>;\n  /** Whether the process is still alive. */\n  running: Scalars['Boolean']['output'];\n};\n\nexport type SandboxStatus =\n  | 'CREATING'\n  | 'DESTROYED'\n  | 'DESTROYING'\n  | 'FAILED'\n  | 'RUNNING';\n\n/** The state of a template build, derived from its workflow and the existence of its checkpoint. READY means the checkpoint exists and can be booted. */\nexport type SandboxTemplateBuild = {\n  __typename?: 'SandboxTemplateBuild';\n  environmentId: Scalars['String']['output'];\n  /** The template's resolved-content hash. */\n  id: Scalars['ID']['output'];\n  status: SandboxTemplateBuildStatus;\n};\n\nexport type SandboxTemplateBuildStatus =\n  | 'BUILDING'\n  | 'FAILED'\n  | 'PENDING'\n  | 'READY';\n\nexport type SandboxTemplateInput = {\n  baseImageDigest?: InputMaybe<Scalars['String']['input']>;\n  /** Build a template by running these shell instructions on the base image. Mutually exclusive with name. */\n  instructions?: InputMaybe<Array<Scalars['String']['input']>>;\n  /** Boot from a saved checkpoint with this name (one captured from a sandbox). Mutually exclusive with instructions. */\n  name?: InputMaybe<Scalars['String']['input']>;\n  /** Environment variables available to the template's build instructions. Values may contain Railway variable references (e.g. ${{shared.FOO}}, ${{ServiceName.BAR}}), resolved at build time. */\n  variables?: InputMaybe<Scalars['EnvironmentVariables']['input']>;\n};\n\nexport type Service = Node & {\n  __typename?: 'Service';\n  createdAt: Scalars['DateTime']['output'];\n  deletedAt?: Maybe<Scalars['DateTime']['output']>;\n  /** @deprecated Use environment.deployments for properly scoped access control */\n  deployments: ServiceDeploymentsConnection;\n  featureFlags: Array<ActiveServiceFeatureFlag>;\n  /** Whether this service has hidden registry credentials from a template. When true, the credentials are stored in the template and used during deployment. */\n  hasHiddenRegistryCredentialsFromTemplate: Scalars['Boolean']['output'];\n  icon?: Maybe<Scalars['String']['output']>;\n  id: Scalars['ID']['output'];\n  name: Scalars['String']['output'];\n  project: Project;\n  projectId: Scalars['String']['output'];\n  repoTriggers: ServiceRepoTriggersConnection;\n  /** @deprecated Use environment.serviceInstances for properly scoped access control */\n  serviceInstances: ServiceServiceInstancesConnection;\n  templateId?: Maybe<Scalars['String']['output']>;\n  templateServiceId?: Maybe<Scalars['String']['output']>;\n  templateThreadSlug?: Maybe<Scalars['String']['output']>;\n  updatedAt: Scalars['DateTime']['output'];\n};\n\n\nexport type ServiceDeploymentsArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\nexport type ServiceRepoTriggersArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\nexport type ServiceServiceInstancesArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n};\n\nexport type ServiceBackupInfo = {\n  __typename?: 'ServiceBackupInfo';\n  /** List of enabled backup schedule kinds (DAILY, WEEKLY, MONTHLY) */\n  schedules: Array<VolumeInstanceBackupScheduleKind>;\n  serviceId: Scalars['String']['output'];\n  serviceName: Scalars['String']['output'];\n};\n\nexport type ServiceConnectInput = {\n  /** The branch to connect to. e.g. 'main' */\n  branch?: InputMaybe<Scalars['String']['input']>;\n  /** Name of the Dockerhub or GHCR image to connect this service to. */\n  image?: InputMaybe<Scalars['String']['input']>;\n  /** The full name of the repo to connect to. e.g. 'railwayapp/starters' */\n  repo?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type ServiceCreateInput = {\n  branch?: InputMaybe<Scalars['String']['input']>;\n  /** Environment ID. If the specified environment is a fork, the service will only be created in it. Otherwise it will created in all environments that are not forks of other environments */\n  environmentId?: InputMaybe<Scalars['String']['input']>;\n  icon?: InputMaybe<Scalars['String']['input']>;\n  name?: InputMaybe<Scalars['String']['input']>;\n  projectId: Scalars['String']['input'];\n  registryCredentials?: InputMaybe<RegistryCredentialsInput>;\n  source?: InputMaybe<ServiceSourceInput>;\n  /** Template ID. Required when templateServiceId is provided. */\n  templateId?: InputMaybe<Scalars['String']['input']>;\n  /** Template service ID within the template's serializedConfig. Required when templateId is provided. */\n  templateServiceId?: InputMaybe<Scalars['String']['input']>;\n  variables?: InputMaybe<Scalars['EnvironmentVariables']['input']>;\n};\n\nexport type ServiceDeploymentsConnection = {\n  __typename?: 'ServiceDeploymentsConnection';\n  edges: Array<ServiceDeploymentsConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type ServiceDeploymentsConnectionEdge = {\n  __typename?: 'ServiceDeploymentsConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: Deployment;\n};\n\nexport type ServiceDomain = Domain & {\n  __typename?: 'ServiceDomain';\n  /** @deprecated Removed; always null. */\n  cdnMode?: Maybe<Scalars['String']['output']>;\n  createdAt?: Maybe<Scalars['DateTime']['output']>;\n  deletedAt?: Maybe<Scalars['DateTime']['output']>;\n  domain: Scalars['String']['output'];\n  edgeId?: Maybe<Scalars['String']['output']>;\n  environmentId: Scalars['String']['output'];\n  id: Scalars['ID']['output'];\n  newDomainName?: Maybe<Scalars['String']['output']>;\n  newHostLabel?: Maybe<Scalars['String']['output']>;\n  projectId?: Maybe<Scalars['String']['output']>;\n  serviceId: Scalars['String']['output'];\n  suffix?: Maybe<Scalars['String']['output']>;\n  syncStatus: ServiceDomainSyncStatus;\n  targetPort?: Maybe<Scalars['Int']['output']>;\n  updatedAt?: Maybe<Scalars['DateTime']['output']>;\n};\n\nexport type ServiceDomainCreateInput = {\n  environmentId: Scalars['String']['input'];\n  serviceId: Scalars['String']['input'];\n  targetPort?: InputMaybe<Scalars['Int']['input']>;\n};\n\nexport type ServiceDomainSyncStatus =\n  | 'ACTIVE'\n  | 'CREATING'\n  | 'DELETED'\n  | 'DELETING'\n  | 'UNSPECIFIED'\n  | 'UPDATING';\n\nexport type ServiceDomainUpdateInput = {\n  domain: Scalars['String']['input'];\n  environmentId: Scalars['String']['input'];\n  serviceDomainId: Scalars['String']['input'];\n  serviceId: Scalars['String']['input'];\n  targetPort?: InputMaybe<Scalars['Int']['input']>;\n};\n\nexport type ServiceFeatureFlagToggleInput = {\n  flag: ActiveServiceFeatureFlag;\n  serviceId: Scalars['String']['input'];\n};\n\nexport type ServiceInstance = Node & {\n  __typename?: 'ServiceInstance';\n  /** All currently active (deployed and running) deployments for this service instance */\n  activeDeployments: Array<Deployment>;\n  buildCommand?: Maybe<Scalars['String']['output']>;\n  builder: Builder;\n  createdAt: Scalars['DateTime']['output'];\n  cronSchedule?: Maybe<Scalars['String']['output']>;\n  deletedAt?: Maybe<Scalars['DateTime']['output']>;\n  dockerfilePath?: Maybe<Scalars['String']['output']>;\n  domains: AllDomains;\n  drainingSeconds?: Maybe<Scalars['Int']['output']>;\n  edgeConfig?: Maybe<EdgeConfig>;\n  environmentId: Scalars['String']['output'];\n  healthcheckPath?: Maybe<Scalars['String']['output']>;\n  healthcheckTimeout?: Maybe<Scalars['Int']['output']>;\n  id: Scalars['ID']['output'];\n  ipv6EgressEnabled?: Maybe<Scalars['Boolean']['output']>;\n  isUpdatable: Scalars['Boolean']['output'];\n  /** The most recent deployment for this service instance */\n  latestDeployment?: Maybe<Deployment>;\n  nextCronRunAt?: Maybe<Scalars['DateTime']['output']>;\n  nixpacksPlan?: Maybe<Scalars['JSON']['output']>;\n  numReplicas?: Maybe<Scalars['Int']['output']>;\n  overlapSeconds?: Maybe<Scalars['Int']['output']>;\n  preDeployCommand?: Maybe<Scalars['JSON']['output']>;\n  railpackInfo?: Maybe<Scalars['RailpackInfo']['output']>;\n  railwayConfigFile?: Maybe<Scalars['String']['output']>;\n  region?: Maybe<Scalars['String']['output']>;\n  restartPolicyMaxRetries: Scalars['Int']['output'];\n  restartPolicyType: RestartPolicyType;\n  rootDirectory?: Maybe<Scalars['String']['output']>;\n  service: Service;\n  serviceId: Scalars['String']['output'];\n  serviceName: Scalars['String']['output'];\n  sleepApplication?: Maybe<Scalars['Boolean']['output']>;\n  source?: Maybe<ServiceSource>;\n  startCommand?: Maybe<Scalars['String']['output']>;\n  updatedAt: Scalars['DateTime']['output'];\n  upstreamUrl?: Maybe<Scalars['String']['output']>;\n  watchPatterns: Array<Scalars['String']['output']>;\n};\n\nexport type ServiceInstanceAutoDeployStatus = {\n  __typename?: 'ServiceInstanceAutoDeployStatus';\n  canEnable: Scalars['Boolean']['output'];\n  enabled: Scalars['Boolean']['output'];\n  reason?: Maybe<Scalars['String']['output']>;\n};\n\nexport type ServiceInstanceAutoDeployUpdateInput = {\n  enabled: Scalars['Boolean']['input'];\n  environmentId: Scalars['String']['input'];\n  projectId: Scalars['String']['input'];\n  serviceId: Scalars['String']['input'];\n};\n\nexport type ServiceInstanceAutoDeployUpdateResult = {\n  __typename?: 'ServiceInstanceAutoDeployUpdateResult';\n  enabled: Scalars['Boolean']['output'];\n};\n\nexport type ServiceInstanceLimitsUpdateInput = {\n  environmentId: Scalars['String']['input'];\n  /** Amount of memory in GB to allocate to the service instance */\n  memoryGB?: InputMaybe<Scalars['Float']['input']>;\n  serviceId: Scalars['String']['input'];\n  /** Number of vCPUs to allocate to the service instance */\n  vCPUs?: InputMaybe<Scalars['Float']['input']>;\n};\n\nexport type ServiceInstanceUpdateInput = {\n  buildCommand?: InputMaybe<Scalars['String']['input']>;\n  builder?: InputMaybe<Builder>;\n  cronSchedule?: InputMaybe<Scalars['String']['input']>;\n  dockerfilePath?: InputMaybe<Scalars['String']['input']>;\n  drainingSeconds?: InputMaybe<Scalars['Int']['input']>;\n  healthcheckPath?: InputMaybe<Scalars['String']['input']>;\n  healthcheckTimeout?: InputMaybe<Scalars['Int']['input']>;\n  ipv6EgressEnabled?: InputMaybe<Scalars['Boolean']['input']>;\n  multiRegionConfig?: InputMaybe<Scalars['JSON']['input']>;\n  nixpacksPlan?: InputMaybe<Scalars['JSON']['input']>;\n  numReplicas?: InputMaybe<Scalars['Int']['input']>;\n  overlapSeconds?: InputMaybe<Scalars['Int']['input']>;\n  preDeployCommand?: InputMaybe<Array<Scalars['String']['input']>>;\n  railwayConfigFile?: InputMaybe<Scalars['String']['input']>;\n  region?: InputMaybe<Scalars['String']['input']>;\n  registryCredentials?: InputMaybe<RegistryCredentialsInput>;\n  restartPolicyMaxRetries?: InputMaybe<Scalars['Int']['input']>;\n  restartPolicyType?: InputMaybe<RestartPolicyType>;\n  rootDirectory?: InputMaybe<Scalars['String']['input']>;\n  sleepApplication?: InputMaybe<Scalars['Boolean']['input']>;\n  source?: InputMaybe<ServiceSourceInput>;\n  startCommand?: InputMaybe<Scalars['String']['input']>;\n  watchPatterns?: InputMaybe<Array<Scalars['String']['input']>>;\n};\n\nexport type ServiceRepoTriggersConnection = {\n  __typename?: 'ServiceRepoTriggersConnection';\n  edges: Array<ServiceRepoTriggersConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type ServiceRepoTriggersConnectionEdge = {\n  __typename?: 'ServiceRepoTriggersConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: DeploymentTrigger;\n};\n\nexport type ServiceServiceInstancesConnection = {\n  __typename?: 'ServiceServiceInstancesConnection';\n  edges: Array<ServiceServiceInstancesConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type ServiceServiceInstancesConnectionEdge = {\n  __typename?: 'ServiceServiceInstancesConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: ServiceInstance;\n};\n\nexport type ServiceSource = {\n  __typename?: 'ServiceSource';\n  image?: Maybe<Scalars['String']['output']>;\n  repo?: Maybe<Scalars['String']['output']>;\n};\n\nexport type ServiceSourceInput = {\n  image?: InputMaybe<Scalars['String']['input']>;\n  repo?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type ServiceUpdateInput = {\n  icon?: InputMaybe<Scalars['String']['input']>;\n  name?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type Session = Node & {\n  __typename?: 'Session';\n  createdAt: Scalars['DateTime']['output'];\n  expiredAt: Scalars['DateTime']['output'];\n  id: Scalars['ID']['output'];\n  isCurrent: Scalars['Boolean']['output'];\n  name: Scalars['String']['output'];\n  type: SessionType;\n  updatedAt: Scalars['DateTime']['output'];\n};\n\nexport type SessionType =\n  | 'BROWSER'\n  | 'CLI'\n  | 'FORUMS';\n\nexport type SetServiceUnderAttackModeInput = {\n  durationSeconds?: InputMaybe<Scalars['Int']['input']>;\n  enabled: Scalars['Boolean']['input'];\n  environmentId: Scalars['String']['input'];\n  serviceId: Scalars['String']['input'];\n};\n\nexport type SetupAgentEventTrackInput = {\n  agentSessionId?: InputMaybe<Scalars['String']['input']>;\n  arch?: InputMaybe<Scalars['String']['input']>;\n  caller?: InputMaybe<Scalars['String']['input']>;\n  cliVersion?: InputMaybe<Scalars['String']['input']>;\n  configuredClients?: InputMaybe<Array<Scalars['String']['input']>>;\n  errorMessage?: InputMaybe<Scalars['String']['input']>;\n  installRequestId?: InputMaybe<Scalars['String']['input']>;\n  isCi?: InputMaybe<Scalars['Boolean']['input']>;\n  os?: InputMaybe<Scalars['String']['input']>;\n  phase: Scalars['String']['input'];\n  sessionId?: InputMaybe<Scalars['String']['input']>;\n  success?: InputMaybe<Scalars['Boolean']['input']>;\n};\n\nexport type SharedVariableConfigureInput = {\n  disabledServiceIds: Array<Scalars['String']['input']>;\n  enabledServiceIds: Array<Scalars['String']['input']>;\n  environmentId: Scalars['String']['input'];\n  name: Scalars['String']['input'];\n  projectId: Scalars['String']['input'];\n};\n\nexport type ShellTokenInput = {\n  environmentId: Scalars['String']['input'];\n  instanceId: Scalars['String']['input'];\n  kind?: InputMaybe<Scalars['String']['input']>;\n  port?: InputMaybe<Scalars['Int']['input']>;\n  scope: Scalars['String']['input'];\n  serviceId?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type SimilarTemplate = {\n  __typename?: 'SimilarTemplate';\n  code: Scalars['String']['output'];\n  createdAt: Scalars['DateTime']['output'];\n  creator?: Maybe<TemplateCreator>;\n  deploys: Scalars['Int']['output'];\n  description?: Maybe<Scalars['String']['output']>;\n  health?: Maybe<Scalars['Float']['output']>;\n  image?: Maybe<Scalars['String']['output']>;\n  name: Scalars['String']['output'];\n  /** @deprecated Use workspaceId */\n  teamId?: Maybe<Scalars['String']['output']>;\n  userId?: Maybe<Scalars['String']['output']>;\n  workspaceId?: Maybe<Scalars['String']['output']>;\n};\n\nexport type SortOrder =\n  | 'asc'\n  | 'desc';\n\nexport type SpendCommitment = Node & {\n  __typename?: 'SpendCommitment';\n  features: Array<Scalars['SpendCommitmentFeatureId']['output']>;\n  id: Scalars['ID']['output'];\n  minSpendAmountCents: Scalars['Int']['output'];\n};\n\nexport type SshPublicKey = Node & {\n  __typename?: 'SshPublicKey';\n  createdAt: Scalars['DateTime']['output'];\n  fingerprint: Scalars['String']['output'];\n  id: Scalars['ID']['output'];\n  name: Scalars['String']['output'];\n  publicKey: Scalars['String']['output'];\n  updatedAt: Scalars['DateTime']['output'];\n  userId?: Maybe<Scalars['String']['output']>;\n  workspaceId?: Maybe<Scalars['String']['output']>;\n};\n\nexport type SshPublicKeyCreateInput = {\n  name: Scalars['String']['input'];\n  publicKey: Scalars['String']['input'];\n  workspaceId?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type StaleWhileRevalidateConfig = {\n  __typename?: 'StaleWhileRevalidateConfig';\n  enabled: Scalars['Boolean']['output'];\n};\n\nexport type StaleWhileRevalidateInput = {\n  enabled: Scalars['Boolean']['input'];\n};\n\nexport type Subscription = {\n  __typename?: 'Subscription';\n  /** Stream logs for a build */\n  buildLogs: Array<Log>;\n  /** Subscribe to updates for a specific deployment */\n  deployment: Deployment;\n  /** Subscribe to deployment events for a specific deployment */\n  deploymentEvents: DeploymentEvent;\n  /** Subscribe to deployment instance executions for a specific deployment */\n  deploymentInstanceExecutions: DeploymentInstanceExecution;\n  /** Stream logs for a deployment */\n  deploymentLogs: Array<Log>;\n  /** Stream logs for a project environment */\n  environmentLogs: Array<Log>;\n  /** Subscribe to updates for the staged patch for a single environment. */\n  environmentStagedPatch: EnvironmentPatch;\n  /** Stream HTTP logs for a deployment */\n  httpLogs: Array<HttpLog>;\n  /** Subscribe to notification delivery updates (created and resolved) for the authenticated user */\n  notificationDeliveryUpdated: NotificationDeliveryUpdate;\n  /**\n   * Stream logs for a plugin\n   * @deprecated Plugins are deprecated\n   */\n  pluginLogs: Array<Log>;\n  /** Subscribe to migration progress updates for a volume */\n  replicationProgress: VolumeReplicationProgressUpdate;\n};\n\n\nexport type SubscriptionBuildLogsArgs = {\n  deploymentId: Scalars['String']['input'];\n  filter?: InputMaybe<Scalars['String']['input']>;\n  limit?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\nexport type SubscriptionDeploymentArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type SubscriptionDeploymentEventsArgs = {\n  id: Scalars['String']['input'];\n};\n\n\nexport type SubscriptionDeploymentInstanceExecutionsArgs = {\n  input: DeploymentInstanceExecutionInput;\n};\n\n\nexport type SubscriptionDeploymentLogsArgs = {\n  deploymentId: Scalars['String']['input'];\n  filter?: InputMaybe<Scalars['String']['input']>;\n  limit?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\nexport type SubscriptionEnvironmentLogsArgs = {\n  afterDate?: InputMaybe<Scalars['String']['input']>;\n  afterLimit?: InputMaybe<Scalars['Int']['input']>;\n  anchorDate?: InputMaybe<Scalars['String']['input']>;\n  beforeDate?: InputMaybe<Scalars['String']['input']>;\n  beforeLimit?: InputMaybe<Scalars['Int']['input']>;\n  environmentId: Scalars['String']['input'];\n  filter?: InputMaybe<Scalars['String']['input']>;\n};\n\n\nexport type SubscriptionEnvironmentStagedPatchArgs = {\n  environmentId: Scalars['String']['input'];\n};\n\n\nexport type SubscriptionHttpLogsArgs = {\n  afterDate?: InputMaybe<Scalars['String']['input']>;\n  afterLimit?: InputMaybe<Scalars['Int']['input']>;\n  anchorDate?: InputMaybe<Scalars['String']['input']>;\n  beforeDate?: InputMaybe<Scalars['String']['input']>;\n  beforeLimit?: InputMaybe<Scalars['Int']['input']>;\n  deploymentId: Scalars['String']['input'];\n  filter?: InputMaybe<Scalars['String']['input']>;\n};\n\n\nexport type SubscriptionPluginLogsArgs = {\n  environmentId: Scalars['String']['input'];\n  filter?: InputMaybe<Scalars['String']['input']>;\n  limit?: InputMaybe<Scalars['Int']['input']>;\n  pluginId: Scalars['String']['input'];\n};\n\n\nexport type SubscriptionReplicationProgressArgs = {\n  volumeInstanceId: Scalars['String']['input'];\n};\n\nexport type SubscriptionDiscount = {\n  __typename?: 'SubscriptionDiscount';\n  couponId: Scalars['String']['output'];\n  couponName: Scalars['String']['output'];\n};\n\nexport type SubscriptionItem = {\n  __typename?: 'SubscriptionItem';\n  itemId: Scalars['String']['output'];\n  priceDollars?: Maybe<Scalars['Float']['output']>;\n  priceId: Scalars['String']['output'];\n  productId: Scalars['String']['output'];\n  quantity?: Maybe<Scalars['BigInt']['output']>;\n};\n\nexport type SubscriptionModel =\n  | 'FREE'\n  | 'TEAM'\n  | 'USER';\n\nexport type SubscriptionPlanType =\n  | 'free'\n  | 'hobby'\n  | 'pro'\n  | 'trial';\n\nexport type SubscriptionState =\n  | 'ACTIVE'\n  | 'CANCELLED'\n  | 'INACTIVE'\n  | 'PAST_DUE'\n  | 'UNPAID';\n\nexport type SupportTierOverride =\n  | 'BUSINESS_CLASS'\n  | 'BUSINESS_CLASS_TRIAL';\n\nexport type TcpProxy = {\n  __typename?: 'TCPProxy';\n  applicationPort: Scalars['Int']['output'];\n  createdAt?: Maybe<Scalars['DateTime']['output']>;\n  deletedAt?: Maybe<Scalars['DateTime']['output']>;\n  domain: Scalars['String']['output'];\n  environmentId: Scalars['String']['output'];\n  id: Scalars['ID']['output'];\n  proxyPort: Scalars['Int']['output'];\n  serviceId: Scalars['String']['output'];\n  syncStatus: TcpProxySyncStatus;\n  updatedAt?: Maybe<Scalars['DateTime']['output']>;\n};\n\nexport type TcpProxyCreateInput = {\n  applicationPort: Scalars['Int']['input'];\n  environmentId: Scalars['String']['input'];\n  serviceId: Scalars['String']['input'];\n};\n\nexport type TcpProxySyncStatus =\n  | 'ACTIVE'\n  | 'CREATING'\n  | 'DELETED'\n  | 'DELETING'\n  | 'UNSPECIFIED'\n  | 'UPDATING';\n\nexport type Team = Node & {\n  __typename?: 'Team';\n  /** @deprecated Use workspace object instead */\n  adoptionHistory: Array<AdoptionInfo>;\n  /** @deprecated Use workspace object instead */\n  adoptionLevel: Scalars['Float']['output'];\n  /** @deprecated Use workspace object instead */\n  apiTokenRateLimit?: Maybe<ApiTokenRateLimit>;\n  /** @deprecated Use workspace object instead */\n  avatar?: Maybe<Scalars['String']['output']>;\n  /** @deprecated Use workspace object instead */\n  createdAt: Scalars['DateTime']['output'];\n  /** @deprecated Use workspace object instead */\n  customer: Customer;\n  /** @deprecated Use workspace object instead */\n  id: Scalars['ID']['output'];\n  /** @deprecated Use workspace object instead */\n  members: Array<TeamMember>;\n  /** @deprecated Use workspace object instead */\n  name: Scalars['String']['output'];\n  /** @deprecated Use workspace object instead */\n  preferredRegion?: Maybe<Scalars['String']['output']>;\n  /** @deprecated Use workspace object instead */\n  projects: TeamProjectsConnection;\n  /** @deprecated Use workspace object instead */\n  slackChannelId?: Maybe<Scalars['String']['output']>;\n  /** @deprecated Use workspace object instead */\n  supportTierOverride?: Maybe<SupportTierOverride>;\n  /** @deprecated Use workspace object instead */\n  teamPermissions: Array<TeamPermission>;\n  /** @deprecated Use workspace object instead */\n  updatedAt: Scalars['DateTime']['output'];\n  /** @deprecated Use workspace object instead */\n  workspace: Workspace;\n};\n\n\nexport type TeamProjectsArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n};\n\nexport type TeamMember = {\n  __typename?: 'TeamMember';\n  avatar?: Maybe<Scalars['String']['output']>;\n  email: Scalars['String']['output'];\n  /** Only retrieved if requested by an admin */\n  featureFlags?: Maybe<Array<ActiveFeatureFlag>>;\n  id: Scalars['String']['output'];\n  name?: Maybe<Scalars['String']['output']>;\n  role: TeamRole;\n};\n\nexport type TeamPermission = Node & {\n  __typename?: 'TeamPermission';\n  createdAt: Scalars['DateTime']['output'];\n  id: Scalars['ID']['output'];\n  role: TeamRole;\n  updatedAt: Scalars['DateTime']['output'];\n  userId: Scalars['String']['output'];\n  workspaceId: Scalars['String']['output'];\n};\n\nexport type TeamProjectsConnection = {\n  __typename?: 'TeamProjectsConnection';\n  edges: Array<TeamProjectsConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type TeamProjectsConnectionEdge = {\n  __typename?: 'TeamProjectsConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: Project;\n};\n\nexport type TeamRole =\n  | 'ADMIN'\n  | 'MEMBER'\n  | 'VIEWER';\n\nexport type Template = Node & {\n  __typename?: 'Template';\n  activeProjects: Scalars['Int']['output'];\n  canvasConfig?: Maybe<Scalars['CanvasConfig']['output']>;\n  category?: Maybe<Scalars['String']['output']>;\n  code: Scalars['String']['output'];\n  communityThreadSlug?: Maybe<Scalars['String']['output']>;\n  /** @deprecated Use serializedConfig instead */\n  config: Scalars['TemplateConfig']['output'];\n  createdAt: Scalars['DateTime']['output'];\n  creator?: Maybe<TemplateCreator>;\n  demoProjectId?: Maybe<Scalars['String']['output']>;\n  description?: Maybe<Scalars['String']['output']>;\n  guides?: Maybe<TemplateGuide>;\n  health?: Maybe<Scalars['Float']['output']>;\n  id: Scalars['ID']['output'];\n  image?: Maybe<Scalars['String']['output']>;\n  isApproved: Scalars['Boolean']['output'];\n  isV2Template: Scalars['Boolean']['output'];\n  isVerified: Scalars['Boolean']['output'];\n  languages?: Maybe<Array<Scalars['String']['output']>>;\n  maintainer?: Maybe<MaintainerWorkspace>;\n  /** @deprecated Deprecated in favor of listing the fields individually. */\n  metadata: Scalars['TemplateMetadata']['output'];\n  name: Scalars['String']['output'];\n  projects: Scalars['Int']['output'];\n  readme?: Maybe<Scalars['String']['output']>;\n  recentProjects: Scalars['Int']['output'];\n  serializedConfig?: Maybe<Scalars['SerializedTemplateConfig']['output']>;\n  services: TemplateServicesConnection;\n  similarTemplates: Array<SimilarTemplate>;\n  status: TemplateStatus;\n  supportHealthMetrics?: Maybe<Scalars['SupportHealthMetrics']['output']>;\n  tags?: Maybe<Array<Scalars['String']['output']>>;\n  /** @deprecated Use workspaceId */\n  teamId?: Maybe<Scalars['String']['output']>;\n  totalPayout: Scalars['Float']['output'];\n  updatedAt: Scalars['DateTime']['output'];\n  workspaceId?: Maybe<Scalars['String']['output']>;\n};\n\n\nexport type TemplateServicesArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n};\n\nexport type TemplateCloneInput = {\n  code: Scalars['String']['input'];\n  workspaceId?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type TemplateCreator = {\n  __typename?: 'TemplateCreator';\n  avatar?: Maybe<Scalars['String']['output']>;\n  hasPublicProfile: Scalars['Boolean']['output'];\n  name?: Maybe<Scalars['String']['output']>;\n  username?: Maybe<Scalars['String']['output']>;\n};\n\nexport type TemplateDeleteInput = {\n  workspaceId?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type TemplateDeployInput = {\n  environmentId?: InputMaybe<Scalars['String']['input']>;\n  projectId?: InputMaybe<Scalars['String']['input']>;\n  services: Array<TemplateDeployService>;\n  templateCode?: InputMaybe<Scalars['String']['input']>;\n  workspaceId?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type TemplateDeployPayload = {\n  __typename?: 'TemplateDeployPayload';\n  projectId: Scalars['String']['output'];\n  workflowId?: Maybe<Scalars['String']['output']>;\n};\n\nexport type TemplateDeployService = {\n  commit?: InputMaybe<Scalars['String']['input']>;\n  hasDomain?: InputMaybe<Scalars['Boolean']['input']>;\n  healthcheckPath?: InputMaybe<Scalars['String']['input']>;\n  id: Scalars['String']['input'];\n  isPrivate?: InputMaybe<Scalars['Boolean']['input']>;\n  name?: InputMaybe<Scalars['String']['input']>;\n  owner?: InputMaybe<Scalars['String']['input']>;\n  preDeployCommand?: InputMaybe<Array<Scalars['String']['input']>>;\n  rootDirectory?: InputMaybe<Scalars['String']['input']>;\n  serviceIcon?: InputMaybe<Scalars['String']['input']>;\n  serviceName: Scalars['String']['input'];\n  startCommand?: InputMaybe<Scalars['String']['input']>;\n  tcpProxyApplicationPort?: InputMaybe<Scalars['Int']['input']>;\n  template: Scalars['String']['input'];\n  variables?: InputMaybe<Scalars['EnvironmentVariables']['input']>;\n  volumes?: InputMaybe<Array<Scalars['TemplateVolume']['input']>>;\n};\n\nexport type TemplateDeployV2Input = {\n  environmentId?: InputMaybe<Scalars['String']['input']>;\n  projectId?: InputMaybe<Scalars['String']['input']>;\n  serializedConfig: Scalars['SerializedTemplateConfig']['input'];\n  templateId: Scalars['String']['input'];\n  workspaceId?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type TemplateGenerateInput = {\n  environmentId?: InputMaybe<Scalars['String']['input']>;\n  projectId: Scalars['String']['input'];\n};\n\nexport type TemplateGuide = {\n  __typename?: 'TemplateGuide';\n  post?: Maybe<Scalars['String']['output']>;\n  video?: Maybe<Scalars['String']['output']>;\n};\n\nexport type TemplateMetrics = {\n  __typename?: 'TemplateMetrics';\n  activeDeployments: Scalars['Int']['output'];\n  deploymentsLast90Days: Scalars['Int']['output'];\n  earningsLast30Days: Scalars['Float']['output'];\n  earningsLast90Days: Scalars['Float']['output'];\n  eligibleForSupportBonus: Scalars['Boolean']['output'];\n  supportHealth: Scalars['Float']['output'];\n  templateHealth: Scalars['Float']['output'];\n  totalDeployments: Scalars['Int']['output'];\n  totalEarnings: Scalars['Float']['output'];\n};\n\nexport type TemplatePublishInput = {\n  category: Scalars['String']['input'];\n  demoProjectId?: InputMaybe<Scalars['String']['input']>;\n  description: Scalars['String']['input'];\n  image?: InputMaybe<Scalars['String']['input']>;\n  readme: Scalars['String']['input'];\n  workspaceId?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type TemplateSearchResult = {\n  __typename?: 'TemplateSearchResult';\n  code: Scalars['String']['output'];\n  creatorName?: Maybe<Scalars['String']['output']>;\n  deploymentCount: Scalars['Int']['output'];\n  description?: Maybe<Scalars['String']['output']>;\n  healthScore?: Maybe<Scalars['Float']['output']>;\n  id: Scalars['String']['output'];\n  image?: Maybe<Scalars['String']['output']>;\n  isVerified: Scalars['Boolean']['output'];\n  name: Scalars['String']['output'];\n};\n\nexport type TemplateService = Node & {\n  __typename?: 'TemplateService';\n  config: Scalars['TemplateServiceConfig']['output'];\n  createdAt: Scalars['DateTime']['output'];\n  id: Scalars['ID']['output'];\n  templateId: Scalars['String']['output'];\n  updatedAt: Scalars['DateTime']['output'];\n};\n\nexport type TemplateServiceSourceEjectInput = {\n  projectId: Scalars['String']['input'];\n  repoName: Scalars['String']['input'];\n  repoOwner: Scalars['String']['input'];\n  /** Provide multiple serviceIds when ejecting services from a monorepo. */\n  serviceIds: Array<Scalars['String']['input']>;\n  upstreamUrl: Scalars['String']['input'];\n};\n\nexport type TemplateServicesConnection = {\n  __typename?: 'TemplateServicesConnection';\n  edges: Array<TemplateServicesConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type TemplateServicesConnectionEdge = {\n  __typename?: 'TemplateServicesConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: TemplateService;\n};\n\nexport type TemplateStatus =\n  | 'HIDDEN'\n  | 'PUBLISHED'\n  | 'UNPUBLISHED';\n\nexport type TrustedDomain = {\n  __typename?: 'TrustedDomain';\n  domainName: Scalars['String']['output'];\n  id: Scalars['ID']['output'];\n  role: Scalars['String']['output'];\n  status: TrustedDomainStatus;\n  verificationData: TrustedDomainVerificationData;\n  verificationType: Scalars['String']['output'];\n  workspaceId: Scalars['String']['output'];\n};\n\nexport type TrustedDomainStatus =\n  | 'FAILED'\n  | 'PENDING'\n  | 'VERIFIED';\n\nexport type TrustedDomainVerificationData = {\n  __typename?: 'TrustedDomainVerificationData';\n  dnsHost?: Maybe<Scalars['String']['output']>;\n  domainMatch?: Maybe<Domain>;\n  domainStatus?: Maybe<CustomDomainStatus>;\n  token?: Maybe<Scalars['String']['output']>;\n};\n\nexport type TwoFactorInfo = {\n  __typename?: 'TwoFactorInfo';\n  hasRecoveryCodes: Scalars['Boolean']['output'];\n  isVerified: Scalars['Boolean']['output'];\n};\n\nexport type TwoFactorInfoCreateInput = {\n  token: Scalars['String']['input'];\n};\n\nexport type TwoFactorInfoSecret = {\n  __typename?: 'TwoFactorInfoSecret';\n  secret: Scalars['String']['output'];\n  uri: Scalars['String']['output'];\n};\n\nexport type TwoFactorInfoValidateInput = {\n  token: Scalars['String']['input'];\n  twoFactorLinkingKey?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type TwoFactorMethodCompliance =\n  | 'AUTHENTICATOR'\n  | 'PASSKEY';\n\nexport type TwoFactorMethodProjectWorkspace =\n  | 'AUTHENTICATOR'\n  | 'PASSKEY';\n\nexport type UpdateNotificationRuleInput = {\n  channelConfigs?: InputMaybe<Array<Scalars['NotificationChannelConfig']['input']>>;\n  ephemeralEnvironments?: InputMaybe<Scalars['Boolean']['input']>;\n  eventTypes?: InputMaybe<Array<Scalars['String']['input']>>;\n  severities?: InputMaybe<Array<NotificationSeverity>>;\n};\n\nexport type UpdateServiceEdgeConfigInput = {\n  config: EdgeConfigInput;\n  environmentId: Scalars['String']['input'];\n  serviceId: Scalars['String']['input'];\n};\n\nexport type UsageLimit = Node & {\n  __typename?: 'UsageLimit';\n  agentHardLimitCents?: Maybe<Scalars['Int']['output']>;\n  agentSoftLimitCents?: Maybe<Scalars['Int']['output']>;\n  customerId: Scalars['String']['output'];\n  hardLimit?: Maybe<Scalars['Int']['output']>;\n  id: Scalars['ID']['output'];\n  isOverLimit: Scalars['Boolean']['output'];\n  softLimit: Scalars['Int']['output'];\n};\n\nexport type UsageLimitRemoveInput = {\n  customerId: Scalars['String']['input'];\n};\n\nexport type UsageLimitSetInput = {\n  customerId: Scalars['String']['input'];\n  hardLimitDollars?: InputMaybe<Scalars['Int']['input']>;\n  softLimitDollars: Scalars['Int']['input'];\n};\n\nexport type User = Node & {\n  __typename?: 'User';\n  agreedFairUse: Scalars['Boolean']['output'];\n  apiTokenRateLimit?: Maybe<ApiTokenRateLimit>;\n  avatar?: Maybe<Scalars['String']['output']>;\n  /** @deprecated Resolve via the user's workspaces and check for an active BAN restriction. This field will be removed after the WorkspaceRestriction migration completes. */\n  banReason?: Maybe<Scalars['String']['output']>;\n  createdAt: Scalars['DateTime']['output'];\n  email: Scalars['String']['output'];\n  featureFlags: Array<ActiveFeatureFlag>;\n  flags: Array<UserFlag>;\n  githubProviderId?: Maybe<Scalars['String']['output']>;\n  githubUsername?: Maybe<Scalars['String']['output']>;\n  has2FA: Scalars['Boolean']['output'];\n  hasPasskeys: Scalars['Boolean']['output'];\n  id: Scalars['ID']['output'];\n  isAdmin: Scalars['Boolean']['output'];\n  isConductor: Scalars['Boolean']['output'];\n  isVerified: Scalars['Boolean']['output'];\n  lastLogin: Scalars['DateTime']['output'];\n  name?: Maybe<Scalars['String']['output']>;\n  platformFeatureFlags: Array<ActivePlatformFlag>;\n  profile?: Maybe<UserProfile>;\n  /** @deprecated This field will not return anything anymore, go through the workspace's projects */\n  projects: UserProjectsConnection;\n  providerAuths: UserProviderAuthsConnection;\n  registrationStatus: RegistrationStatus;\n  riskLevel?: Maybe<Scalars['Float']['output']>;\n  termsAgreedOn?: Maybe<Scalars['DateTime']['output']>;\n  username?: Maybe<Scalars['String']['output']>;\n  /** @deprecated Use user.workspaces instead, no user are associated to a workspace */\n  workspace?: Maybe<Workspace>;\n  /** Workspaces user is member of */\n  workspaces: Array<Workspace>;\n};\n\n\nexport type UserProjectsArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\nexport type UserProviderAuthsArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n};\n\nexport type UserFlag =\n  | 'BETA';\n\nexport type UserFlagsRemoveInput = {\n  flags: Array<UserFlag>;\n  userId?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type UserFlagsSetInput = {\n  flags: Array<UserFlag>;\n  userId?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type UserKickbackEarnings = {\n  __typename?: 'UserKickbackEarnings';\n  total_amount: Scalars['Float']['output'];\n};\n\nexport type UserProfile = {\n  __typename?: 'UserProfile';\n  bio?: Maybe<Scalars['String']['output']>;\n  isPublic: Scalars['Boolean']['output'];\n  website?: Maybe<Scalars['String']['output']>;\n};\n\nexport type UserProfileResponse = {\n  __typename?: 'UserProfileResponse';\n  avatar?: Maybe<Scalars['String']['output']>;\n  createdAt: Scalars['DateTime']['output'];\n  customerId?: Maybe<Scalars['String']['output']>;\n  id: Scalars['String']['output'];\n  isTrialing?: Maybe<Scalars['Boolean']['output']>;\n  name?: Maybe<Scalars['String']['output']>;\n  profile: UserProfile;\n  /** Gets all public projects for a user. */\n  publicProjects: UserProfileResponsePublicProjectsConnection;\n  /** @deprecated There are no personal templates anymore, they all belong to a workspace */\n  publishedTemplates: Array<SimilarTemplate>;\n  state?: Maybe<Scalars['String']['output']>;\n  totalDeploys: Scalars['Int']['output'];\n  username?: Maybe<Scalars['String']['output']>;\n};\n\n\nexport type UserProfileResponsePublicProjectsArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n};\n\nexport type UserProfileResponsePublicProjectsConnection = {\n  __typename?: 'UserProfileResponsePublicProjectsConnection';\n  edges: Array<UserProfileResponsePublicProjectsConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type UserProfileResponsePublicProjectsConnectionEdge = {\n  __typename?: 'UserProfileResponsePublicProjectsConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: Project;\n};\n\nexport type UserProfileUpdateInput = {\n  bio?: InputMaybe<Scalars['String']['input']>;\n  isPublic: Scalars['Boolean']['input'];\n  website?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type UserProjectsConnection = {\n  __typename?: 'UserProjectsConnection';\n  edges: Array<UserProjectsConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type UserProjectsConnectionEdge = {\n  __typename?: 'UserProjectsConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: Project;\n};\n\nexport type UserProviderAuthsConnection = {\n  __typename?: 'UserProviderAuthsConnection';\n  edges: Array<UserProviderAuthsConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type UserProviderAuthsConnectionEdge = {\n  __typename?: 'UserProviderAuthsConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: ProviderAuth;\n};\n\nexport type Variable = Node & {\n  __typename?: 'Variable';\n  createdAt: Scalars['DateTime']['output'];\n  environment: Environment;\n  environmentId?: Maybe<Scalars['String']['output']>;\n  id: Scalars['ID']['output'];\n  isSealed: Scalars['Boolean']['output'];\n  name: Scalars['String']['output'];\n  plugin: Plugin;\n  /** @deprecated Plugins have been removed */\n  pluginId?: Maybe<Scalars['String']['output']>;\n  references: Array<Scalars['String']['output']>;\n  service: Service;\n  serviceId?: Maybe<Scalars['String']['output']>;\n  updatedAt: Scalars['DateTime']['output'];\n};\n\nexport type VariableCollectionUpsertInput = {\n  environmentId: Scalars['String']['input'];\n  projectId: Scalars['String']['input'];\n  /** When set to true, removes all existing variables before upserting the new collection. */\n  replace?: InputMaybe<Scalars['Boolean']['input']>;\n  serviceId?: InputMaybe<Scalars['String']['input']>;\n  /** Skip deploys for affected services */\n  skipDeploys?: InputMaybe<Scalars['Boolean']['input']>;\n  variables: Scalars['EnvironmentVariables']['input'];\n};\n\nexport type VariableDeleteInput = {\n  environmentId: Scalars['String']['input'];\n  name: Scalars['String']['input'];\n  projectId: Scalars['String']['input'];\n  serviceId?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type VariableUpsertInput = {\n  environmentId: Scalars['String']['input'];\n  name: Scalars['String']['input'];\n  projectId: Scalars['String']['input'];\n  serviceId?: InputMaybe<Scalars['String']['input']>;\n  /** Skip deploys for affected services */\n  skipDeploys?: InputMaybe<Scalars['Boolean']['input']>;\n  value: Scalars['String']['input'];\n};\n\nexport type VercelAccount = {\n  __typename?: 'VercelAccount';\n  id: Scalars['String']['output'];\n  integrationAuthId: Scalars['String']['output'];\n  isUser: Scalars['Boolean']['output'];\n  name?: Maybe<Scalars['String']['output']>;\n  projects: Array<VercelProject>;\n  slug?: Maybe<Scalars['String']['output']>;\n};\n\nexport type VercelInfo = {\n  __typename?: 'VercelInfo';\n  accounts: Array<VercelAccount>;\n};\n\nexport type VercelProject = {\n  __typename?: 'VercelProject';\n  accountId: Scalars['String']['output'];\n  id: Scalars['String']['output'];\n  name: Scalars['String']['output'];\n};\n\nexport type Volume = Node & {\n  __typename?: 'Volume';\n  createdAt: Scalars['DateTime']['output'];\n  id: Scalars['ID']['output'];\n  name: Scalars['String']['output'];\n  project: Project;\n  projectId: Scalars['String']['output'];\n  /** @deprecated Use environment.volumeInstances for properly scoped access control */\n  volumeInstances: VolumeVolumeInstancesConnection;\n};\n\n\nexport type VolumeVolumeInstancesArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n};\n\nexport type VolumeCreateInput = {\n  /** The environment to deploy the volume instances into. If `null`, the volume will not be deployed to any environment. `undefined` will deploy to all environments. */\n  environmentId?: InputMaybe<Scalars['String']['input']>;\n  /** The path in the container to mount the volume to */\n  mountPath: Scalars['String']['input'];\n  /** The project to create the volume in */\n  projectId: Scalars['String']['input'];\n  /** The region to create the volume instances in. If not provided, the default region will be used. */\n  region?: InputMaybe<Scalars['String']['input']>;\n  /** The service to attach the volume to. If not provided, the volume will be disconnected. */\n  serviceId?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type VolumeInstance = Node & {\n  __typename?: 'VolumeInstance';\n  createdAt: Scalars['DateTime']['output'];\n  currentSizeMB: Scalars['Float']['output'];\n  deletedAt?: Maybe<Scalars['DateTime']['output']>;\n  environment: Environment;\n  environmentId: Scalars['String']['output'];\n  externalId?: Maybe<Scalars['String']['output']>;\n  id: Scalars['ID']['output'];\n  isPendingDeletion: Scalars['Boolean']['output'];\n  mountPath: Scalars['String']['output'];\n  region?: Maybe<Scalars['String']['output']>;\n  service: Service;\n  serviceId?: Maybe<Scalars['String']['output']>;\n  sizeMB: Scalars['Int']['output'];\n  state?: Maybe<VolumeState>;\n  volume: Volume;\n  volumeId: Scalars['String']['output'];\n};\n\nexport type VolumeInstanceBackup = {\n  __typename?: 'VolumeInstanceBackup';\n  createdAt: Scalars['DateTime']['output'];\n  creatorId?: Maybe<Scalars['String']['output']>;\n  expiresAt?: Maybe<Scalars['DateTime']['output']>;\n  externalId: Scalars['String']['output'];\n  id: Scalars['String']['output'];\n  name?: Maybe<Scalars['String']['output']>;\n  referencedMB?: Maybe<Scalars['Int']['output']>;\n  scheduleId?: Maybe<Scalars['String']['output']>;\n  usedMB?: Maybe<Scalars['Int']['output']>;\n  volumeInstanceSizeMB?: Maybe<Scalars['Int']['output']>;\n};\n\nexport type VolumeInstanceBackupSchedule = Node & {\n  __typename?: 'VolumeInstanceBackupSchedule';\n  createdAt: Scalars['DateTime']['output'];\n  cron: Scalars['String']['output'];\n  id: Scalars['ID']['output'];\n  kind: VolumeInstanceBackupScheduleKind;\n  name: Scalars['String']['output'];\n  retentionSeconds?: Maybe<Scalars['Int']['output']>;\n};\n\nexport type VolumeInstanceBackupScheduleKind =\n  | 'DAILY'\n  | 'MONTHLY'\n  | 'WEEKLY';\n\nexport type VolumeInstanceReplicationProgress = {\n  __typename?: 'VolumeInstanceReplicationProgress';\n  bytesTransferred: Scalars['BigInt']['output'];\n  percentComplete: Scalars['Float']['output'];\n  timestamp: Scalars['DateTime']['output'];\n  transferRateMbps?: Maybe<Scalars['Float']['output']>;\n};\n\nexport type VolumeInstanceUpdateInput = {\n  /** The mount path of the volume instance. If not provided, the mount path will not be updated. */\n  mountPath?: InputMaybe<Scalars['String']['input']>;\n  /** The service to attach the volume to. If not provided, the volume will be disconnected. */\n  serviceId?: InputMaybe<Scalars['String']['input']>;\n  /** The state of the volume instance. If not provided, the state will not be updated. */\n  state?: InputMaybe<VolumeState>;\n};\n\nexport type VolumeReplicationProgressUpdate = {\n  __typename?: 'VolumeReplicationProgressUpdate';\n  currentSnapshot: VolumeSnapshotReplicationProgressUpdate;\n  destExternalId: Scalars['String']['output'];\n  destRegion?: Maybe<Scalars['String']['output']>;\n  destStackerId?: Maybe<Scalars['String']['output']>;\n  error?: Maybe<Scalars['String']['output']>;\n  estimatedTimeRemainingMs?: Maybe<Scalars['BigInt']['output']>;\n  history: Array<VolumeInstanceReplicationProgress>;\n  nbSnapshots: Scalars['Int']['output'];\n  offlineBytesTransferred: Scalars['BigInt']['output'];\n  offlineTotalBytes: Scalars['BigInt']['output'];\n  onlineBytesTransferred: Scalars['BigInt']['output'];\n  onlineTotalBytes: Scalars['BigInt']['output'];\n  percentComplete: Scalars['Float']['output'];\n  snapshotsSizes: Array<Scalars['BigInt']['output']>;\n  srcExternalId: Scalars['String']['output'];\n  srcRegion?: Maybe<Scalars['String']['output']>;\n  srcStackerId?: Maybe<Scalars['String']['output']>;\n  status: ReplicateVolumeInstanceStatus;\n  transferRateMbps?: Maybe<Scalars['Float']['output']>;\n};\n\nexport type VolumeSnapshotReplicationProgressUpdate = {\n  __typename?: 'VolumeSnapshotReplicationProgressUpdate';\n  bytesTransferred: Scalars['BigInt']['output'];\n  compressedBytesTransferred: Scalars['BigInt']['output'];\n  compressedTransferRateMbps?: Maybe<Scalars['Float']['output']>;\n  elapsedMs: Scalars['Int']['output'];\n  error?: Maybe<Scalars['String']['output']>;\n  estimatedTimeRemainingMs?: Maybe<Scalars['BigInt']['output']>;\n  index: Scalars['Int']['output'];\n  percentComplete: Scalars['Float']['output'];\n  startedAt?: Maybe<Scalars['DateTime']['output']>;\n  status: ReplicateVolumeInstanceSnapshotStatus;\n  totalBytes: Scalars['BigInt']['output'];\n  transferRateMbps?: Maybe<Scalars['Float']['output']>;\n};\n\nexport type VolumeState =\n  | 'DELETED'\n  | 'DELETING'\n  | 'ERROR'\n  | 'MIGRATING'\n  | 'MIGRATION_PENDING'\n  | 'READY'\n  | 'RESTORING'\n  | 'UPDATING';\n\nexport type VolumeUpdateInput = {\n  /** The name of the volume */\n  name?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type VolumeVolumeInstancesConnection = {\n  __typename?: 'VolumeVolumeInstancesConnection';\n  edges: Array<VolumeVolumeInstancesConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type VolumeVolumeInstancesConnectionEdge = {\n  __typename?: 'VolumeVolumeInstancesConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: VolumeInstance;\n};\n\nexport type WithdrawalPlatformTypes =\n  | 'BMAC'\n  | 'GITHUB'\n  | 'PAYPAL'\n  | 'STRIPE_CONNECT';\n\nexport type WorkflowId = {\n  __typename?: 'WorkflowId';\n  workflowId?: Maybe<Scalars['String']['output']>;\n};\n\nexport type WorkflowResult = {\n  __typename?: 'WorkflowResult';\n  error?: Maybe<Scalars['String']['output']>;\n  status: WorkflowStatus;\n};\n\nexport type WorkflowStatus =\n  | 'Complete'\n  | 'Error'\n  | 'NotFound'\n  | 'Running';\n\nexport type Workspace = Node & {\n  __typename?: 'Workspace';\n  adoptionHistory: Array<AdoptionInfo>;\n  adoptionLevel: Scalars['Float']['output'];\n  /** @deprecated Deprecated regions are no longer supported. */\n  allowDeprecatedRegions?: Maybe<Scalars['Boolean']['output']>;\n  apiTokenRateLimit?: Maybe<ApiTokenRateLimit>;\n  avatar?: Maybe<Scalars['String']['output']>;\n  /** @deprecated Use `workspace.restriction` and check for an active BAN restriction. This field will be removed after the WorkspaceRestriction migration completes. */\n  banReason?: Maybe<Scalars['String']['output']>;\n  createdAt: Scalars['DateTime']['output'];\n  customer: Customer;\n  discordRole?: Maybe<Scalars['String']['output']>;\n  /** Whether 2FA enforcement is enabled for this workspace. */\n  has2FAEnforcement: Scalars['Boolean']['output'];\n  /** Whether automatic deployment diagnosis is enabled for this workspace. */\n  hasAutomaticDiagnosis: Scalars['Boolean']['output'];\n  /** Whether this workspace has access to guardrails policies. */\n  hasGuardrailsAccess: Scalars['Boolean']['output'];\n  hasSAML: Scalars['Boolean']['output'];\n  id: Scalars['ID']['output'];\n  identityProviders: WorkspaceIdentityProvidersConnection;\n  members: Array<WorkspaceMember>;\n  name: Scalars['String']['output'];\n  partnerProfile?: Maybe<PartnerProfile>;\n  plan: Plan;\n  preferredRegion?: Maybe<Scalars['String']['output']>;\n  /** Total number of projects in this workspace. Used by the dashboard to show an exact count without paginating through every project. */\n  projectCount: Scalars['Int']['output'];\n  projects: WorkspaceProjectsConnection;\n  /** Whether the current user's access is redacted due to pending 2FA requirement. Returns true if the user is a workspace member, workspace has 2FA enforcement enabled, and the current user needs to enable 2FA. */\n  redactedDueTo2FAPending: Scalars['Boolean']['output'];\n  referredUsers: Array<ReferralUser>;\n  slackChannelId?: Maybe<Scalars['String']['output']>;\n  /** @deprecated Use plan field instead */\n  subscriptionModel: SubscriptionModel;\n  subscriptionPlanLimit?: Maybe<Scalars['SubscriptionPlanLimit']['output']>;\n  supportTierOverride?: Maybe<SupportTierOverride>;\n  /** @deprecated Teams are being removed from the system, don't use it */\n  team?: Maybe<Team>;\n  updatedAt: Scalars['DateTime']['output'];\n  /** Get a list of user emails in the workspace who do not have verified 2FA enabled. Returns an empty array if all users have 2FA enabled. */\n  usersWithout2FA: Array<Scalars['String']['output']>;\n};\n\n\nexport type WorkspaceIdentityProvidersArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n};\n\n\nexport type WorkspaceProjectCountArgs = {\n  includeDeleted?: InputMaybe<Scalars['Boolean']['input']>;\n};\n\n\nexport type WorkspaceProjectsArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n};\n\nexport type WorkspaceIdPConnection = {\n  __typename?: 'WorkspaceIdPConnection';\n  createdAt?: Maybe<Scalars['DateTime']['output']>;\n  provider?: Maybe<Scalars['String']['output']>;\n  status: WorkspaceIdPConnectionStatus;\n  updatedAt?: Maybe<Scalars['DateTime']['output']>;\n};\n\nexport type WorkspaceIdPConnectionStatus =\n  | 'ACTIVE'\n  | 'DRAFT'\n  | 'INACTIVE'\n  | 'PENDING'\n  | 'VALIDATING';\n\nexport type WorkspaceIdentityProvider = Node & {\n  __typename?: 'WorkspaceIdentityProvider';\n  connection: WorkspaceIdPConnection;\n  createdAt: Scalars['DateTime']['output'];\n  enforcementEnabledAt?: Maybe<Scalars['DateTime']['output']>;\n  id: Scalars['ID']['output'];\n  updatedAt: Scalars['DateTime']['output'];\n  workspace: Workspace;\n  workspaceId: Scalars['String']['output'];\n};\n\nexport type WorkspaceIdentityProvidersConnection = {\n  __typename?: 'WorkspaceIdentityProvidersConnection';\n  edges: Array<WorkspaceIdentityProvidersConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type WorkspaceIdentityProvidersConnectionEdge = {\n  __typename?: 'WorkspaceIdentityProvidersConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: WorkspaceIdentityProvider;\n};\n\nexport type WorkspaceInviteCodeCreateInput = {\n  role: Scalars['String']['input'];\n};\n\nexport type WorkspaceMember = {\n  __typename?: 'WorkspaceMember';\n  avatar?: Maybe<Scalars['String']['output']>;\n  email: Scalars['String']['output'];\n  /** Only retrieved if requested by an admin */\n  featureFlags?: Maybe<Array<ActiveFeatureFlag>>;\n  id: Scalars['String']['output'];\n  name?: Maybe<Scalars['String']['output']>;\n  role: TeamRole;\n  /** Only retrieved if requested by an admin */\n  twoFactorAuthEnabled?: Maybe<Scalars['Boolean']['output']>;\n};\n\nexport type WorkspacePermissionChangeInput = {\n  role: TeamRole;\n  userId: Scalars['String']['input'];\n  workspaceId: Scalars['String']['input'];\n};\n\nexport type WorkspacePolicy = Node & {\n  __typename?: 'WorkspacePolicy';\n  deploySourceAllowlist: WorkspacePolicyDeploySourceAllowlistConnection;\n  id: Scalars['ID']['output'];\n  restrictDeploysToAllowedSources: Scalars['Boolean']['output'];\n  restrictPublicTcpProxies: Scalars['Boolean']['output'];\n  restrictRailwayDomainGeneration: Scalars['Boolean']['output'];\n};\n\n\nexport type WorkspacePolicyDeploySourceAllowlistArgs = {\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  first?: InputMaybe<Scalars['Int']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n};\n\nexport type WorkspacePolicyDeploySourceAllowlist = Node & {\n  __typename?: 'WorkspacePolicyDeploySourceAllowlist';\n  addedBy?: Maybe<User>;\n  createdAt: Scalars['DateTime']['output'];\n  id: Scalars['ID']['output'];\n  sourceIcon?: Maybe<Scalars['String']['output']>;\n  sourceId: Scalars['String']['output'];\n  sourceName: Scalars['String']['output'];\n  sourceType: WorkspacePolicyDeploySourceType;\n};\n\nexport type WorkspacePolicyDeploySourceAllowlistConnection = {\n  __typename?: 'WorkspacePolicyDeploySourceAllowlistConnection';\n  edges: Array<WorkspacePolicyDeploySourceAllowlistConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type WorkspacePolicyDeploySourceAllowlistConnectionEdge = {\n  __typename?: 'WorkspacePolicyDeploySourceAllowlistConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: WorkspacePolicyDeploySourceAllowlist;\n};\n\nexport type WorkspacePolicyDeploySourceType =\n  | 'GITHUB_ORG';\n\nexport type WorkspacePolicyItemUpdateInput = {\n  enabled: Scalars['Boolean']['input'];\n  policy: WorkspacePolicyName;\n};\n\nexport type WorkspacePolicyName =\n  | 'RESTRICT_DEPLOYS_TO_ALLOWED_SOURCES'\n  | 'RESTRICT_PUBLIC_TCP_PROXIES'\n  | 'RESTRICT_RAILWAY_DOMAIN_GENERATION';\n\nexport type WorkspacePolicySelectableDeploySource = {\n  __typename?: 'WorkspacePolicySelectableDeploySource';\n  sourceIcon?: Maybe<Scalars['String']['output']>;\n  sourceId: Scalars['String']['output'];\n  sourceName: Scalars['String']['output'];\n  sourceType: WorkspacePolicyDeploySourceType;\n};\n\nexport type WorkspaceProjectsConnection = {\n  __typename?: 'WorkspaceProjectsConnection';\n  edges: Array<WorkspaceProjectsConnectionEdge>;\n  pageInfo: PageInfo;\n};\n\nexport type WorkspaceProjectsConnectionEdge = {\n  __typename?: 'WorkspaceProjectsConnectionEdge';\n  cursor: Scalars['String']['output'];\n  node: Project;\n};\n\nexport type WorkspaceTrustedDomainCreateInput = {\n  domainName: Scalars['String']['input'];\n  role: Scalars['String']['input'];\n  workspaceId: Scalars['String']['input'];\n};\n\nexport type WorkspaceTrustedDomainUpdateInput = {\n  id: Scalars['String']['input'];\n  role: Scalars['String']['input'];\n};\n\nexport type WorkspaceUpdateInput = {\n  avatar?: InputMaybe<Scalars['String']['input']>;\n  name?: InputMaybe<Scalars['String']['input']>;\n  preferredRegion?: InputMaybe<Scalars['String']['input']>;\n};\n\nexport type WorkspaceUserInviteInput = {\n  code: Scalars['String']['input'];\n  email: Scalars['String']['input'];\n};\n\nexport type WorkspaceUserRemoveInput = {\n  userId: Scalars['String']['input'];\n};\n\nexport type CustomerTogglePayoutsToCreditsInput = {\n  isWithdrawingToCredits: Scalars['Boolean']['input'];\n};\n\nexport type RailwaySandboxFieldsFragment = { __typename?: 'Sandbox', id: string, status: SandboxStatus, networkIsolation: SandboxNetworkIsolation, environmentId: string, region: string, idleTimeoutMinutes?: number | null, createdAt: string };\n\nexport type RailwaySandboxQueryVariables = Exact<{\n  environmentId: Scalars['String']['input'];\n  id: Scalars['String']['input'];\n}>;\n\n\nexport type RailwaySandboxQuery = { __typename?: 'Query', sandbox?: { __typename?: 'Sandbox', id: string, status: SandboxStatus, networkIsolation: SandboxNetworkIsolation, environmentId: string, region: string, idleTimeoutMinutes?: number | null, createdAt: string } | null };\n\nexport type RailwaySandboxesQueryVariables = Exact<{\n  environmentId: Scalars['String']['input'];\n  first?: InputMaybe<Scalars['Int']['input']>;\n  after?: InputMaybe<Scalars['String']['input']>;\n  before?: InputMaybe<Scalars['String']['input']>;\n  last?: InputMaybe<Scalars['Int']['input']>;\n}>;\n\n\nexport type RailwaySandboxesQuery = { __typename?: 'Query', sandboxes: { __typename?: 'QuerySandboxesConnection', edges: Array<{ __typename?: 'QuerySandboxesConnectionEdge', node: { __typename?: 'Sandbox', id: string, status: SandboxStatus, networkIsolation: SandboxNetworkIsolation, environmentId: string, region: string, idleTimeoutMinutes?: number | null, createdAt: string } }>, pageInfo: { __typename?: 'PageInfo', hasNextPage: boolean, endCursor?: string | null } } };\n\nexport type RailwaySandboxCreateMutationVariables = Exact<{\n  input: SandboxCreateInput;\n}>;\n\n\nexport type RailwaySandboxCreateMutation = { __typename?: 'Mutation', sandboxCreate: { __typename?: 'Sandbox', id: string, status: SandboxStatus, networkIsolation: SandboxNetworkIsolation, environmentId: string, region: string, idleTimeoutMinutes?: number | null, createdAt: string } };\n\nexport type RailwaySandboxDestroyMutationVariables = Exact<{\n  id: Scalars['String']['input'];\n  environmentId: Scalars['String']['input'];\n}>;\n\n\nexport type RailwaySandboxDestroyMutation = { __typename?: 'Mutation', sandboxDestroy?: { __typename?: 'Sandbox', id: string, status: SandboxStatus, networkIsolation: SandboxNetworkIsolation, environmentId: string, region: string, idleTimeoutMinutes?: number | null, createdAt: string } | null };\n\nexport type RailwaySandboxTemplateBuildFieldsFragment = { __typename?: 'SandboxTemplateBuild', id: string, status: SandboxTemplateBuildStatus, environmentId: string };\n\nexport type RailwaySandboxTemplateBuildMutationVariables = Exact<{\n  environmentId: Scalars['String']['input'];\n  input: SandboxTemplateInput;\n}>;\n\n\nexport type RailwaySandboxTemplateBuildMutation = { __typename?: 'Mutation', sandboxTemplateBuild: { __typename?: 'SandboxTemplateBuild', id: string, status: SandboxTemplateBuildStatus, environmentId: string } };\n\nexport type RailwaySandboxTemplateBuildStatusQueryVariables = Exact<{\n  environmentId: Scalars['String']['input'];\n  id: Scalars['ID']['input'];\n}>;\n\n\nexport type RailwaySandboxTemplateBuildStatusQuery = { __typename?: 'Query', sandboxTemplateBuild: { __typename?: 'SandboxTemplateBuild', id: string, status: SandboxTemplateBuildStatus, environmentId: string } };\n\nexport type RailwaySandboxCheckpointFieldsFragment = { __typename?: 'SandboxCheckpoint', id: string, key: string, environmentId: string, createdAt: string };\n\nexport type RailwaySandboxCheckpointsQueryVariables = Exact<{\n  environmentId: Scalars['String']['input'];\n}>;\n\n\nexport type RailwaySandboxCheckpointsQuery = { __typename?: 'Query', sandboxCheckpoints: Array<{ __typename?: 'SandboxCheckpoint', id: string, key: string, environmentId: string, createdAt: string }> };\n\nexport type RailwaySandboxCheckpointCreateMutationVariables = Exact<{\n  environmentId: Scalars['String']['input'];\n  name: Scalars['String']['input'];\n  sandboxId: Scalars['String']['input'];\n}>;\n\n\nexport type RailwaySandboxCheckpointCreateMutation = { __typename?: 'Mutation', sandboxCheckpointCreate: { __typename?: 'SandboxCheckpoint', id: string, key: string, environmentId: string, createdAt: string } };\n\nexport type RailwaySandboxCheckpointRenameMutationVariables = Exact<{\n  environmentId: Scalars['String']['input'];\n  id: Scalars['ID']['input'];\n  name: Scalars['String']['input'];\n}>;\n\n\nexport type RailwaySandboxCheckpointRenameMutation = { __typename?: 'Mutation', sandboxCheckpointRename: { __typename?: 'SandboxCheckpoint', id: string, key: string, environmentId: string, createdAt: string } };\n\nexport type RailwaySandboxCheckpointDeleteMutationVariables = Exact<{\n  environmentId: Scalars['String']['input'];\n  id: Scalars['ID']['input'];\n}>;\n\n\nexport type RailwaySandboxCheckpointDeleteMutation = { __typename?: 'Mutation', sandboxCheckpointDelete: boolean };\n\nexport type RailwayGenerateShellTokenMutationVariables = Exact<{\n  input: ShellTokenInput;\n}>;\n\n\nexport type RailwayGenerateShellTokenMutation = { __typename?: 'Mutation', generateShellToken: string };\n\nexport const RailwaySandboxFieldsFragmentDoc = {\"kind\":\"Document\",\"definitions\":[{\"kind\":\"FragmentDefinition\",\"name\":{\"kind\":\"Name\",\"value\":\"RailwaySandboxFields\"},\"typeCondition\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"Sandbox\"}},\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"id\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"status\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"networkIsolation\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"environmentId\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"region\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"idleTimeoutMinutes\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"createdAt\"}}]}}]} as unknown as DocumentNode<RailwaySandboxFieldsFragment, unknown>;\nexport const RailwaySandboxTemplateBuildFieldsFragmentDoc = {\"kind\":\"Document\",\"definitions\":[{\"kind\":\"FragmentDefinition\",\"name\":{\"kind\":\"Name\",\"value\":\"RailwaySandboxTemplateBuildFields\"},\"typeCondition\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"SandboxTemplateBuild\"}},\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"id\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"status\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"environmentId\"}}]}}]} as unknown as DocumentNode<RailwaySandboxTemplateBuildFieldsFragment, unknown>;\nexport const RailwaySandboxCheckpointFieldsFragmentDoc = {\"kind\":\"Document\",\"definitions\":[{\"kind\":\"FragmentDefinition\",\"name\":{\"kind\":\"Name\",\"value\":\"RailwaySandboxCheckpointFields\"},\"typeCondition\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"SandboxCheckpoint\"}},\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"id\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"key\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"environmentId\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"createdAt\"}}]}}]} as unknown as DocumentNode<RailwaySandboxCheckpointFieldsFragment, unknown>;\nexport const RailwaySandboxDocument = {\"kind\":\"Document\",\"definitions\":[{\"kind\":\"OperationDefinition\",\"operation\":\"query\",\"name\":{\"kind\":\"Name\",\"value\":\"RailwaySandbox\"},\"variableDefinitions\":[{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"environmentId\"}},\"type\":{\"kind\":\"NonNullType\",\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"String\"}}}},{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"id\"}},\"type\":{\"kind\":\"NonNullType\",\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"String\"}}}}],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"sandbox\"},\"arguments\":[{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"environmentId\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"environmentId\"}}},{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"id\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"id\"}}}],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"FragmentSpread\",\"name\":{\"kind\":\"Name\",\"value\":\"RailwaySandboxFields\"}}]}}]}},{\"kind\":\"FragmentDefinition\",\"name\":{\"kind\":\"Name\",\"value\":\"RailwaySandboxFields\"},\"typeCondition\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"Sandbox\"}},\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"id\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"status\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"networkIsolation\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"environmentId\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"region\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"idleTimeoutMinutes\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"createdAt\"}}]}}]} as unknown as DocumentNode<RailwaySandboxQuery, RailwaySandboxQueryVariables>;\nexport const RailwaySandboxesDocument = {\"kind\":\"Document\",\"definitions\":[{\"kind\":\"OperationDefinition\",\"operation\":\"query\",\"name\":{\"kind\":\"Name\",\"value\":\"RailwaySandboxes\"},\"variableDefinitions\":[{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"environmentId\"}},\"type\":{\"kind\":\"NonNullType\",\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"String\"}}}},{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"first\"}},\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"Int\"}}},{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"after\"}},\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"String\"}}},{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"before\"}},\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"String\"}}},{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"last\"}},\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"Int\"}}}],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"sandboxes\"},\"arguments\":[{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"environmentId\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"environmentId\"}}},{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"first\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"first\"}}},{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"after\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"after\"}}},{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"before\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"before\"}}},{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"last\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"last\"}}}],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"edges\"},\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"node\"},\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"FragmentSpread\",\"name\":{\"kind\":\"Name\",\"value\":\"RailwaySandboxFields\"}}]}}]}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"pageInfo\"},\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"hasNextPage\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"endCursor\"}}]}}]}}]}},{\"kind\":\"FragmentDefinition\",\"name\":{\"kind\":\"Name\",\"value\":\"RailwaySandboxFields\"},\"typeCondition\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"Sandbox\"}},\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"id\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"status\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"networkIsolation\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"environmentId\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"region\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"idleTimeoutMinutes\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"createdAt\"}}]}}]} as unknown as DocumentNode<RailwaySandboxesQuery, RailwaySandboxesQueryVariables>;\nexport const RailwaySandboxCreateDocument = {\"kind\":\"Document\",\"definitions\":[{\"kind\":\"OperationDefinition\",\"operation\":\"mutation\",\"name\":{\"kind\":\"Name\",\"value\":\"RailwaySandboxCreate\"},\"variableDefinitions\":[{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"input\"}},\"type\":{\"kind\":\"NonNullType\",\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"SandboxCreateInput\"}}}}],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"sandboxCreate\"},\"arguments\":[{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"input\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"input\"}}}],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"FragmentSpread\",\"name\":{\"kind\":\"Name\",\"value\":\"RailwaySandboxFields\"}}]}}]}},{\"kind\":\"FragmentDefinition\",\"name\":{\"kind\":\"Name\",\"value\":\"RailwaySandboxFields\"},\"typeCondition\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"Sandbox\"}},\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"id\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"status\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"networkIsolation\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"environmentId\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"region\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"idleTimeoutMinutes\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"createdAt\"}}]}}]} as unknown as DocumentNode<RailwaySandboxCreateMutation, RailwaySandboxCreateMutationVariables>;\nexport const RailwaySandboxDestroyDocument = {\"kind\":\"Document\",\"definitions\":[{\"kind\":\"OperationDefinition\",\"operation\":\"mutation\",\"name\":{\"kind\":\"Name\",\"value\":\"RailwaySandboxDestroy\"},\"variableDefinitions\":[{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"id\"}},\"type\":{\"kind\":\"NonNullType\",\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"String\"}}}},{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"environmentId\"}},\"type\":{\"kind\":\"NonNullType\",\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"String\"}}}}],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"sandboxDestroy\"},\"arguments\":[{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"id\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"id\"}}},{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"environmentId\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"environmentId\"}}}],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"FragmentSpread\",\"name\":{\"kind\":\"Name\",\"value\":\"RailwaySandboxFields\"}}]}}]}},{\"kind\":\"FragmentDefinition\",\"name\":{\"kind\":\"Name\",\"value\":\"RailwaySandboxFields\"},\"typeCondition\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"Sandbox\"}},\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"id\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"status\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"networkIsolation\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"environmentId\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"region\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"idleTimeoutMinutes\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"createdAt\"}}]}}]} as unknown as DocumentNode<RailwaySandboxDestroyMutation, RailwaySandboxDestroyMutationVariables>;\nexport const RailwaySandboxTemplateBuildDocument = {\"kind\":\"Document\",\"definitions\":[{\"kind\":\"OperationDefinition\",\"operation\":\"mutation\",\"name\":{\"kind\":\"Name\",\"value\":\"RailwaySandboxTemplateBuild\"},\"variableDefinitions\":[{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"environmentId\"}},\"type\":{\"kind\":\"NonNullType\",\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"String\"}}}},{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"input\"}},\"type\":{\"kind\":\"NonNullType\",\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"SandboxTemplateInput\"}}}}],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"sandboxTemplateBuild\"},\"arguments\":[{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"environmentId\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"environmentId\"}}},{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"input\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"input\"}}}],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"FragmentSpread\",\"name\":{\"kind\":\"Name\",\"value\":\"RailwaySandboxTemplateBuildFields\"}}]}}]}},{\"kind\":\"FragmentDefinition\",\"name\":{\"kind\":\"Name\",\"value\":\"RailwaySandboxTemplateBuildFields\"},\"typeCondition\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"SandboxTemplateBuild\"}},\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"id\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"status\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"environmentId\"}}]}}]} as unknown as DocumentNode<RailwaySandboxTemplateBuildMutation, RailwaySandboxTemplateBuildMutationVariables>;\nexport const RailwaySandboxTemplateBuildStatusDocument = {\"kind\":\"Document\",\"definitions\":[{\"kind\":\"OperationDefinition\",\"operation\":\"query\",\"name\":{\"kind\":\"Name\",\"value\":\"RailwaySandboxTemplateBuildStatus\"},\"variableDefinitions\":[{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"environmentId\"}},\"type\":{\"kind\":\"NonNullType\",\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"String\"}}}},{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"id\"}},\"type\":{\"kind\":\"NonNullType\",\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"ID\"}}}}],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"sandboxTemplateBuild\"},\"arguments\":[{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"environmentId\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"environmentId\"}}},{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"id\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"id\"}}}],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"FragmentSpread\",\"name\":{\"kind\":\"Name\",\"value\":\"RailwaySandboxTemplateBuildFields\"}}]}}]}},{\"kind\":\"FragmentDefinition\",\"name\":{\"kind\":\"Name\",\"value\":\"RailwaySandboxTemplateBuildFields\"},\"typeCondition\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"SandboxTemplateBuild\"}},\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"id\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"status\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"environmentId\"}}]}}]} as unknown as DocumentNode<RailwaySandboxTemplateBuildStatusQuery, RailwaySandboxTemplateBuildStatusQueryVariables>;\nexport const RailwaySandboxCheckpointsDocument = {\"kind\":\"Document\",\"definitions\":[{\"kind\":\"OperationDefinition\",\"operation\":\"query\",\"name\":{\"kind\":\"Name\",\"value\":\"RailwaySandboxCheckpoints\"},\"variableDefinitions\":[{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"environmentId\"}},\"type\":{\"kind\":\"NonNullType\",\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"String\"}}}}],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"sandboxCheckpoints\"},\"arguments\":[{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"environmentId\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"environmentId\"}}}],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"FragmentSpread\",\"name\":{\"kind\":\"Name\",\"value\":\"RailwaySandboxCheckpointFields\"}}]}}]}},{\"kind\":\"FragmentDefinition\",\"name\":{\"kind\":\"Name\",\"value\":\"RailwaySandboxCheckpointFields\"},\"typeCondition\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"SandboxCheckpoint\"}},\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"id\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"key\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"environmentId\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"createdAt\"}}]}}]} as unknown as DocumentNode<RailwaySandboxCheckpointsQuery, RailwaySandboxCheckpointsQueryVariables>;\nexport const RailwaySandboxCheckpointCreateDocument = {\"kind\":\"Document\",\"definitions\":[{\"kind\":\"OperationDefinition\",\"operation\":\"mutation\",\"name\":{\"kind\":\"Name\",\"value\":\"RailwaySandboxCheckpointCreate\"},\"variableDefinitions\":[{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"environmentId\"}},\"type\":{\"kind\":\"NonNullType\",\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"String\"}}}},{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"name\"}},\"type\":{\"kind\":\"NonNullType\",\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"String\"}}}},{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"sandboxId\"}},\"type\":{\"kind\":\"NonNullType\",\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"String\"}}}}],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"sandboxCheckpointCreate\"},\"arguments\":[{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"environmentId\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"environmentId\"}}},{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"name\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"name\"}}},{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"sandboxId\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"sandboxId\"}}}],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"FragmentSpread\",\"name\":{\"kind\":\"Name\",\"value\":\"RailwaySandboxCheckpointFields\"}}]}}]}},{\"kind\":\"FragmentDefinition\",\"name\":{\"kind\":\"Name\",\"value\":\"RailwaySandboxCheckpointFields\"},\"typeCondition\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"SandboxCheckpoint\"}},\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"id\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"key\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"environmentId\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"createdAt\"}}]}}]} as unknown as DocumentNode<RailwaySandboxCheckpointCreateMutation, RailwaySandboxCheckpointCreateMutationVariables>;\nexport const RailwaySandboxCheckpointRenameDocument = {\"kind\":\"Document\",\"definitions\":[{\"kind\":\"OperationDefinition\",\"operation\":\"mutation\",\"name\":{\"kind\":\"Name\",\"value\":\"RailwaySandboxCheckpointRename\"},\"variableDefinitions\":[{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"environmentId\"}},\"type\":{\"kind\":\"NonNullType\",\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"String\"}}}},{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"id\"}},\"type\":{\"kind\":\"NonNullType\",\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"ID\"}}}},{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"name\"}},\"type\":{\"kind\":\"NonNullType\",\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"String\"}}}}],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"sandboxCheckpointRename\"},\"arguments\":[{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"environmentId\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"environmentId\"}}},{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"id\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"id\"}}},{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"name\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"name\"}}}],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"FragmentSpread\",\"name\":{\"kind\":\"Name\",\"value\":\"RailwaySandboxCheckpointFields\"}}]}}]}},{\"kind\":\"FragmentDefinition\",\"name\":{\"kind\":\"Name\",\"value\":\"RailwaySandboxCheckpointFields\"},\"typeCondition\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"SandboxCheckpoint\"}},\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"id\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"key\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"environmentId\"}},{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"createdAt\"}}]}}]} as unknown as DocumentNode<RailwaySandboxCheckpointRenameMutation, RailwaySandboxCheckpointRenameMutationVariables>;\nexport const RailwaySandboxCheckpointDeleteDocument = {\"kind\":\"Document\",\"definitions\":[{\"kind\":\"OperationDefinition\",\"operation\":\"mutation\",\"name\":{\"kind\":\"Name\",\"value\":\"RailwaySandboxCheckpointDelete\"},\"variableDefinitions\":[{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"environmentId\"}},\"type\":{\"kind\":\"NonNullType\",\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"String\"}}}},{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"id\"}},\"type\":{\"kind\":\"NonNullType\",\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"ID\"}}}}],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"sandboxCheckpointDelete\"},\"arguments\":[{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"environmentId\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"environmentId\"}}},{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"id\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"id\"}}}]}]}}]} as unknown as DocumentNode<RailwaySandboxCheckpointDeleteMutation, RailwaySandboxCheckpointDeleteMutationVariables>;\nexport const RailwayGenerateShellTokenDocument = {\"kind\":\"Document\",\"definitions\":[{\"kind\":\"OperationDefinition\",\"operation\":\"mutation\",\"name\":{\"kind\":\"Name\",\"value\":\"RailwayGenerateShellToken\"},\"variableDefinitions\":[{\"kind\":\"VariableDefinition\",\"variable\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"input\"}},\"type\":{\"kind\":\"NonNullType\",\"type\":{\"kind\":\"NamedType\",\"name\":{\"kind\":\"Name\",\"value\":\"ShellTokenInput\"}}}}],\"selectionSet\":{\"kind\":\"SelectionSet\",\"selections\":[{\"kind\":\"Field\",\"name\":{\"kind\":\"Name\",\"value\":\"generateShellToken\"},\"arguments\":[{\"kind\":\"Argument\",\"name\":{\"kind\":\"Name\",\"value\":\"input\"},\"value\":{\"kind\":\"Variable\",\"name\":{\"kind\":\"Name\",\"value\":\"input\"}}}]}]}}]} as unknown as DocumentNode<RailwayGenerateShellTokenMutation, RailwayGenerateShellTokenMutationVariables>;","import { RailwayError } from \"../core/errors.js\";\nimport type { SandboxStatus } from \"./types.js\";\n\nexport class SandboxNotFoundError extends RailwayError {\n  readonly id: string;\n  readonly environmentId: string;\n\n  constructor(args: { id: string; environmentId: string }) {\n    super(\n      `Sandbox \"${args.id}\" was not found in environment \"${args.environmentId}\".`,\n    );\n    this.id = args.id;\n    this.environmentId = args.environmentId;\n  }\n}\n\n/** A sandbox reached FAILED/DESTROYING/DESTROYED before becoming RUNNING. */\nexport class SandboxFailedError extends RailwayError {\n  readonly id: string;\n  readonly status: SandboxStatus;\n\n  constructor(args: { id: string; status: SandboxStatus }) {\n    super(\n      `Sandbox \"${args.id}\" entered terminal state \"${args.status}\" before becoming ready.`,\n    );\n    this.id = args.id;\n    this.status = args.status;\n  }\n}\n\n/** A server-side template build finished in the FAILED state. */\nexport class SandboxTemplateBuildError extends RailwayError {\n  readonly templateId: string;\n  readonly environmentId: string;\n\n  constructor(args: { templateId: string; environmentId: string }) {\n    super(\n      `Sandbox template \"${args.templateId}\" failed to build in environment \"${args.environmentId}\".`,\n    );\n    this.templateId = args.templateId;\n    this.environmentId = args.environmentId;\n  }\n}\n\n/** A readiness wait timed out. */\nexport class SandboxTimeoutError extends RailwayError {\n  readonly resource: \"sandbox\" | \"template\";\n  readonly id: string;\n  readonly lastStatus: string;\n  readonly timeoutMs: number;\n\n  constructor(args: {\n    resource: \"sandbox\" | \"template\";\n    id: string;\n    lastStatus: string;\n    timeoutMs: number;\n  }) {\n    super(\n      `Timed out after ${args.timeoutMs}ms waiting for ${args.resource} \"${args.id}\" ` +\n        `to become ready (last status: ${args.lastStatus}).`,\n    );\n    this.resource = args.resource;\n    this.id = args.id;\n    this.lastStatus = args.lastStatus;\n    this.timeoutMs = args.timeoutMs;\n  }\n}\n","import {\n  resolveWebSocketImpl,\n  type NormalizedRailwayClientConfig,\n  type WebSocketConstructor,\n} from \"./config.js\";\nimport { RailwayConnectionError } from \"./errors.js\";\n\n/**\n * tcp-proxy `/ws/exec` wire protocol: stdout/stderr ride binary frames tagged\n * by a leading byte; init, stdin-EOF, and exit are JSON text frames.\n */\nconst STDOUT_FRAME = 0x01;\nconst STDERR_FRAME = 0x03;\n\n/** Subprotocol the tcp-proxy bridges expect alongside the JWT. */\nconst SHELL_SUBPROTOCOL = \"railway-shell\";\n\n/** Minimal surface shared by native `WebSocket` and the `ws` package. */\ninterface ExecSocket {\n  binaryType: string;\n  onopen: (() => void) | null;\n  onmessage: ((event: { data: unknown }) => void) | null;\n  onclose: ((event: { code: number; reason: string }) => void) | null;\n  onerror: ((event: unknown) => void) | null;\n  send(data: string | ArrayBufferView): void;\n  close(code?: number, reason?: string): void;\n}\n\nexport interface ExecWsHandlers {\n  onStdout(bytes: Uint8Array): void;\n  onStderr(bytes: Uint8Array): void;\n  /** The command exited with this code. */\n  onExit(code: number, reason: string): void;\n  /** The socket closed without an exit frame having settled the command. */\n  onClose(info: { code: number; reason: string }): void;\n  /**\n   * The VM assigned (or confirmed) a durable session id for this exec — only\n   * emitted when durable sessions are enabled server-side. Use it as the resume\n   * handle. No-op by default.\n   */\n  onDurableSession?(id: string): void;\n}\n\nexport interface ExecWsConnection {\n  /** Half-close stdin (EOF) so commands that read stdin can finish. */\n  closeStdin(): void;\n  /** Deliver a signal to the command's process group (e.g. \"TERM\", \"KILL\"). */\n  signal(name: string): void;\n  close(): void;\n}\n\n/**\n * Opens a tcp-proxy `/ws/exec` session for `command` and resolves once it is\n * live (socket open and the init frame sent). The JWT travels as the last\n * `Sec-WebSocket-Protocol` value, per the bridge's token-extraction contract;\n * a `shell`-scoped token authorizes `/ws/exec`.\n */\nexport function connectExecWs(args: {\n  config: NormalizedRailwayClientConfig;\n  jwt: string;\n  command: string;\n  /** Resume an existing durable session by name; omit/empty to start fresh. */\n  sessionName?: string;\n  /** Resume from the server's last-read cursor. Note some loss if previous clients read didn't keep up */\n  resumeFromLastRead?: boolean;\n  handlers: ExecWsHandlers;\n}): Promise<ExecWsConnection> {\n  const { config, jwt, command, sessionName, resumeFromLastRead, handlers } = args;\n  const WS: WebSocketConstructor = resolveWebSocketImpl(config);\n\n  return new Promise<ExecWsConnection>((resolve, reject) => {\n    let opened = false;\n    const socket = new WS(config.tcpProxyWsEndpoint, [\n      SHELL_SUBPROTOCOL,\n      jwt,\n    ]) as unknown as ExecSocket;\n    socket.binaryType = \"arraybuffer\";\n\n    socket.onopen = () => {\n      opened = true;\n      const data: {\n        command: string;\n        durable_session_name?: string;\n        resume_from_last_read?: boolean;\n      } = { command };\n      if (sessionName) data.durable_session_name = sessionName;\n      if (resumeFromLastRead) data.resume_from_last_read = true;\n      socket.send(JSON.stringify({ type: \"init_exec\", data }));\n      resolve({\n        closeStdin: () => socket.send(JSON.stringify({ type: \"stdin_close\" })),\n        signal: name =>\n          socket.send(JSON.stringify({ type: \"signal\", data: { signal: name } })),\n        close: () => socket.close(1000, \"\"),\n      });\n    };\n\n    socket.onmessage = event => {\n      const { data } = event;\n      if (data instanceof ArrayBuffer) handleBinaryFrame(data, handlers);\n      else if (typeof data === \"string\") handleTextFrame(data, handlers);\n    };\n\n    socket.onclose = event => {\n      if (!opened) {\n        reject(\n          new RailwayConnectionError({\n            message: `tcp-proxy exec WebSocket closed before opening (code ${event.code}${\n              event.reason ? `: ${event.reason}` : \"\"\n            }).`,\n            closeCode: event.code,\n          }),\n        );\n        return;\n      }\n      handlers.onClose({ code: event.code, reason: event.reason });\n    };\n\n    socket.onerror = event => {\n      if (opened) return;\n      reject(\n        new RailwayConnectionError({\n          message: \"tcp-proxy exec WebSocket connection failed.\",\n          cause: event,\n        }),\n      );\n    };\n  });\n}\n\n/** Binary frame: a leading tag byte selects the stream, the rest is payload. */\nfunction handleBinaryFrame(buffer: ArrayBuffer, handlers: ExecWsHandlers): void {\n  const view = new Uint8Array(buffer);\n  if (view.length <= 1) return;\n  if (view[0] === STDOUT_FRAME) handlers.onStdout(view.subarray(1));\n  else if (view[0] === STDERR_FRAME) handlers.onStderr(view.subarray(1));\n}\n\ninterface ControlFrameData {\n  exit_code?: number;\n  reason?: string;\n  durable_session_name?: string;\n}\n\n/** Text frame: JSON control message — exit, or a durable session assignment. */\nfunction handleTextFrame(text: string, handlers: ExecWsHandlers): void {\n  let frame: { type?: string; data?: ControlFrameData };\n  try {\n    frame = JSON.parse(text);\n  } catch {\n    return;\n  }\n  if (frame.type === \"exit\") emitExit(frame.data, handlers);\n  else if (frame.type === \"durable_session\") {\n    emitDurableSession(frame.data, handlers);\n  }\n}\n\nfunction emitExit(\n  data: ControlFrameData | undefined,\n  handlers: ExecWsHandlers,\n): void {\n  handlers.onExit(data?.exit_code ?? 0, data?.reason ?? \"\");\n}\n\nfunction emitDurableSession(\n  data: ControlFrameData | undefined,\n  handlers: ExecWsHandlers,\n): void {\n  if (data?.durable_session_name) {\n    handlers.onDurableSession?.(data.durable_session_name);\n  }\n}\n","import type { NormalizedRailwayClientConfig } from \"../core/config.js\";\nimport { RailwayError } from \"../core/errors.js\";\nimport {\n  connectExecWs,\n  type ExecWsConnection,\n} from \"../core/exec-ws-client.js\";\nimport { requestGraphQL } from \"../core/graphql-client.js\";\nimport {\n  RailwayGenerateShellTokenDocument,\n  type RailwayGenerateShellTokenMutation,\n  type RailwayGenerateShellTokenMutationVariables,\n} from \"../generated/graphql.js\";\nimport type { ExecOptions, ExecResult, ExecSignal, ExecTarget } from \"./types.js\";\n\nconst decoder = () => new TextDecoder();\n\n/**\n * Reattach carries a durable session id, not a command, but the `/ws/exec`\n * bridge requires a non-empty command. The VM ignores it when the id resolves\n * to a live session; this no-op is what runs only if the id has already expired\n * (a fresh session the caller can't tell apart — see the reattach caveat).\n */\nconst REATTACH_PLACEHOLDER_COMMAND = \":\";\n\n/** Module-internal access to ExecHandle's private constructor. */\nlet constructHandle: (args: {\n  sessionName: Promise<string>;\n  result: Promise<ExecResult>;\n  kill: (signal: ExecSignal) => Promise<boolean>;\n  detach: () => Promise<string>;\n}) => ExecHandle;\n\n/**\n * An in-flight exec. Awaiting it (or any Promise method) yields the final\n * `ExecResult`; `sessionName` and `kill()` manage the command while it runs.\n */\nexport class ExecHandle implements Promise<ExecResult> {\n  /** Durable session name for this exec; reattach via `exec({ sessionName })`. */\n  readonly sessionName: Promise<string>;\n  readonly [Symbol.toStringTag] = \"ExecHandle\";\n  readonly #result: Promise<ExecResult>;\n  readonly #kill: (signal: ExecSignal) => Promise<boolean>;\n  readonly #detach: () => Promise<string>;\n\n  /** Constructed by `Sandbox.exec`; not constructible from outside the SDK. */\n  private constructor(args: {\n    sessionName: Promise<string>;\n    result: Promise<ExecResult>;\n    kill: (signal: ExecSignal) => Promise<boolean>;\n    detach: () => Promise<string>;\n  }) {\n    this.sessionName = args.sessionName;\n    this.#result = args.result;\n    this.#kill = args.kill;\n    this.#detach = args.detach;\n    // Side taps: a handle held only for kill()/callbacks must not surface\n    // unhandled rejections. Awaiting the handle still rejects normally.\n    this.sessionName.catch(() => {});\n    this.#result.catch(() => {});\n  }\n\n  // Public SDK API; consumed by library users, not in-repo code.\n  // fallow-ignore-next-line unused-class-member\n  then<TResult1 = ExecResult, TResult2 = never>(\n    onfulfilled?: ((value: ExecResult) => TResult1 | PromiseLike<TResult1>) | null,\n    onrejected?: ((reason: unknown) => TResult2 | PromiseLike<TResult2>) | null,\n  ): Promise<TResult1 | TResult2> {\n    return this.#result.then(onfulfilled, onrejected);\n  }\n\n  // Public SDK API; consumed by library users, not in-repo code.\n  // fallow-ignore-next-line unused-class-member\n  catch<TResult = never>(\n    onrejected?: ((reason: unknown) => TResult | PromiseLike<TResult>) | null,\n  ): Promise<ExecResult | TResult> {\n    return this.#result.catch(onrejected);\n  }\n\n  // Public SDK API; consumed by library users, not in-repo code.\n  // fallow-ignore-next-line unused-class-member\n  finally(onfinally?: (() => void) | null): Promise<ExecResult> {\n    return this.#result.finally(onfinally);\n  }\n\n  /** The final result as a plain promise; identical to awaiting the handle. */\n  // Public SDK API; consumed by library users, not in-repo code.\n  // fallow-ignore-next-line unused-class-member\n  result(): Promise<ExecResult> {\n    return this.#result;\n  }\n\n  /**\n   * Terminate the running command with a signal (default `TERM`) delivered to\n   * its process group — a real kill, regardless of durable sessions. The handle\n   * then settles with the command's exit (a signalled process reports exit code\n   * `-1`). To stop streaming WITHOUT ending the command, use `detach()`.\n   */\n  // Public SDK API; consumed by library users, not in-repo code.\n  // fallow-ignore-next-line unused-class-member\n  kill(signal: ExecSignal = \"TERM\"): Promise<boolean> {\n    return this.#kill(signal);\n  }\n\n  /**\n   * Stop streaming and close the WebSocket without ending the command — the\n   * durable session keeps running server-side. Resolves with its `sessionName`\n   * so you can reattach later via `exec({ sessionName })`; rejects if the server\n   * assigned no durable session (reattach is impossible). The handle itself\n   * settles with the output captured up to the detach.\n   */\n  // Public SDK API; consumed by library users, not in-repo code.\n  // fallow-ignore-next-line unused-class-member\n  detach(): Promise<string> {\n    return this.#detach();\n  }\n\n  static {\n    constructHandle = args => new ExecHandle(args);\n  }\n}\n\nexport interface ExecContext {\n  config: NormalizedRailwayClientConfig;\n  environmentId: string;\n  sandboxId: string;\n}\n\ninterface ExecControl {\n  connection?: ExecWsConnection;\n  pendingSignal?: ExecSignal;\n  detached: boolean;\n}\n\n/**\n * Runs an exec over the tcp-proxy `/ws/exec` bridge: a non-PTY session with\n * separated stdout/stderr and a real exit code. A `shell`-scoped JWT (minted by\n * `generateShellToken`) authorizes the path.\n *\n * When durable sessions are enabled server-side, the VM-assigned id is surfaced\n * as `sessionName` and `exec({ sessionName })` reattaches to it (replaying the\n * retained output tail, then following live). `kill()`/`timeoutSec` close the\n * socket —\n * with durable on that only detaches (the process keeps running, reattachable);\n * with it off the session is torn down.\n */\nexport function startExec(\n  context: ExecContext,\n  target: ExecTarget,\n  options: ExecOptions,\n): ExecHandle {\n  let resolveSessionName!: (value: string) => void;\n  let rejectSessionName!: (reason?: unknown) => void;\n  const sessionName = new Promise<string>((resolve, reject) => {\n    resolveSessionName = resolve;\n    rejectSessionName = reject;\n  });\n\n  const control: ExecControl = { detached: false };\n\n  const kill = async (signal: ExecSignal): Promise<boolean> => {\n    if (!control.connection) {\n      control.pendingSignal = signal; // delivered once the socket exists\n      return true;\n    }\n    try {\n      control.connection.signal(signal);\n      return true;\n    } catch {\n      return false;\n    }\n  };\n\n  const detach = async (): Promise<string> => {\n    control.detached = true;\n    control.connection?.close();\n    return sessionName;\n  };\n\n  const result = runExec(\n    context,\n    target,\n    options,\n    resolveSessionName,\n    rejectSessionName,\n    control,\n  ).catch(error => {\n    rejectSessionName(error);\n    throw error;\n  });\n\n  return constructHandle({ sessionName, result, kill, detach });\n}\n\nasync function runExec(\n  context: ExecContext,\n  target: ExecTarget,\n  options: ExecOptions,\n  onSessionName: (name: string) => void,\n  onNoSessionName: (reason: unknown) => void,\n  control: ExecControl,\n): Promise<ExecResult> {\n  const reattach = typeof target !== \"string\";\n  const command = reattach ? REATTACH_PLACEHOLDER_COMMAND : target;\n  const sessionName = reattach ? target.sessionName : undefined;\n\n  // Resolve the session name once: to the resume name immediately on reattach,\n  // otherwise to the VM-assigned durable name when it arrives, falling back to a\n  // client id if durable sessions are off (no assigned name is ever sent).\n  let sessionNameResolved = false;\n  const resolveSessionNameOnce = (name: string) => {\n    if (sessionNameResolved) return;\n    sessionNameResolved = true;\n    onSessionName(name);\n  };\n  if (reattach) resolveSessionNameOnce(sessionName!);\n\n  const input: RailwayGenerateShellTokenMutationVariables[\"input\"] = {\n    environmentId: context.environmentId,\n    instanceId: context.sandboxId,\n    kind: \"sandbox\",\n    scope: \"shell\",\n  };\n  const tokenData = await requestGraphQL<\n    RailwayGenerateShellTokenMutation,\n    RailwayGenerateShellTokenMutationVariables\n  >(context.config, RailwayGenerateShellTokenDocument, { input });\n  const jwt = tokenData.generateShellToken;\n\n  let stdout = \"\";\n  let stderr = \"\";\n  let exitCode: number | null = null;\n  let timedOut = false;\n  let settled = false;\n  let timer: ReturnType<typeof setTimeout> | undefined;\n  const stdoutDecoder = decoder();\n  const stderrDecoder = decoder();\n\n  let resolveResult!: (value: ExecResult) => void;\n  let rejectResult!: (reason: unknown) => void;\n  const done = new Promise<ExecResult>((resolve, reject) => {\n    resolveResult = resolve;\n    rejectResult = reject;\n  });\n\n  const settle = (outcome: ExecResult | { error: unknown }) => {\n    if (settled) return;\n    settled = true;\n    // Durable sessions assign a name up front; if none arrived by the time the\n    // exec settles, the server can't do durable — fail `sessionName` rather than\n    // hand back a fabricated id that can never reattach.\n    if (!sessionNameResolved) {\n      sessionNameResolved = true;\n      onNoSessionName(\n        new RailwayError(\n          \"Server did not return a durable session for this exec.\",\n        ),\n      );\n    }\n    if (timer) clearTimeout(timer);\n    try {\n      control.connection?.close();\n    } catch {\n      // ignore\n    }\n    if (\"error\" in outcome) rejectResult(outcome.error);\n    else resolveResult(outcome);\n  };\n\n  const connection = await connectExecWs({\n    config: context.config,\n    jwt,\n    command,\n    ...(sessionName\n      ? {\n          sessionName,\n          resumeFromLastRead: options.resumeFromLastRead ?? false,\n        }\n      : {}),\n    handlers: {\n      onDurableSession: name => resolveSessionNameOnce(name),\n      onStdout: bytes => {\n        if (settled) return;\n        try {\n          const chunk = stdoutDecoder.decode(bytes, { stream: true });\n          stdout += chunk;\n          options.onStdout?.(chunk);\n        } catch (error) {\n          settle({ error });\n        }\n      },\n      onStderr: bytes => {\n        if (settled) return;\n        try {\n          const chunk = stderrDecoder.decode(bytes, { stream: true });\n          stderr += chunk;\n          options.onStderr?.(chunk);\n        } catch (error) {\n          settle({ error });\n        }\n      },\n      onExit: code => {\n        exitCode = code;\n        settle({ exitCode, stdout, stderr, truncated: false, timedOut });\n      },\n      onClose: () =>\n        settle({ exitCode, stdout, stderr, truncated: false, timedOut }),\n    },\n  });\n  control.connection = connection;\n\n  // A detach()/kill() that landed during token mint / connect has no socket\n  // yet; honor it now that one exists.\n  if (control.detached) {\n    connection.close();\n    return done;\n  }\n  if (control.pendingSignal) connection.signal(control.pendingSignal);\n\n  // The SDK provides no stdin; EOF it so commands reading stdin can finish.\n  connection.closeStdin();\n\n  if (options.timeoutSec !== undefined) {\n    timer = setTimeout(() => {\n      timedOut = true;\n      connection.close();\n    }, options.timeoutSec * 1000);\n  }\n\n  return done;\n}\n","import {\n  normalizeRailwayClientConfig,\n  resolveEnvironmentId,\n  type NormalizedRailwayClientConfig,\n  type RailwayClientConfig,\n} from \"../core/config.js\";\nimport { requestGraphQL } from \"../core/graphql-client.js\";\nimport {\n  RailwaySandboxCreateDocument,\n  RailwaySandboxDestroyDocument,\n  RailwaySandboxDocument,\n  RailwaySandboxesDocument,\n  RailwaySandboxCheckpointCreateDocument,\n  RailwaySandboxCheckpointDeleteDocument,\n  RailwaySandboxCheckpointRenameDocument,\n  RailwaySandboxCheckpointsDocument,\n  RailwaySandboxTemplateBuildDocument,\n  RailwaySandboxTemplateBuildStatusDocument,\n  type RailwaySandboxCheckpointCreateMutation,\n  type RailwaySandboxCheckpointCreateMutationVariables,\n  type RailwaySandboxCheckpointDeleteMutation,\n  type RailwaySandboxCheckpointDeleteMutationVariables,\n  type RailwaySandboxCheckpointRenameMutation,\n  type RailwaySandboxCheckpointRenameMutationVariables,\n  type RailwaySandboxCheckpointsQuery,\n  type RailwaySandboxCheckpointsQueryVariables,\n  type RailwaySandboxCreateMutation,\n  type RailwaySandboxCreateMutationVariables,\n  type RailwaySandboxDestroyMutation,\n  type RailwaySandboxDestroyMutationVariables,\n  type RailwaySandboxesQuery,\n  type RailwaySandboxesQueryVariables,\n  type RailwaySandboxQuery,\n  type RailwaySandboxQueryVariables,\n  type RailwaySandboxTemplateBuildMutation,\n  type RailwaySandboxTemplateBuildMutationVariables,\n  type RailwaySandboxTemplateBuildStatusQuery,\n  type RailwaySandboxTemplateBuildStatusQueryVariables,\n  type SandboxTemplateInput,\n} from \"../generated/graphql.js\";\nimport {\n  SandboxFailedError,\n  SandboxNotFoundError,\n  SandboxTemplateBuildError,\n  SandboxTimeoutError,\n} from \"./errors.js\";\nimport { startExec, type ExecContext, type ExecHandle } from \"./exec.js\";\nimport type {\n  CompiledTemplate,\n  CreateOptions,\n  ExecOptions,\n  ExecTarget,\n  ForkOptions,\n  ListOptions,\n  SandboxCheckpointInfo,\n  SandboxCreationOptions,\n  SandboxInfo,\n  SandboxTemplateBuildInfo,\n  TemplateSource,\n} from \"./types.js\";\n\nconst READINESS_TIMEOUT_MS = 5 * 60_000;\nconst POLL_INITIAL_DELAY_MS = 500;\nconst POLL_MAX_DELAY_MS = 5_000;\n\nconst sleep = (ms: number): Promise<void> =>\n  new Promise(resolve => setTimeout(resolve, ms));\n\ninterface SandboxEngineConfig extends NormalizedRailwayClientConfig {\n  environmentId: string;\n}\n\nexport interface SandboxOptions extends RailwayClientConfig {\n  environmentId?: string;\n}\n\n/**\n * Binds resolved credentials and environment to sandbox GraphQL operations.\n */\nexport class SandboxEngine {\n  readonly #config: SandboxEngineConfig;\n\n  constructor(config: SandboxEngineConfig) {\n    this.#config = config;\n  }\n\n  get environmentId(): string {\n    return this.#config.environmentId;\n  }\n\n  async create(\n    options: CreateOptions = {},\n    template?: TemplateSource,\n  ): Promise<SandboxInfo> {\n    const input: RailwaySandboxCreateMutationVariables[\"input\"] = {\n      environmentId: this.#config.environmentId,\n    };\n    if (template !== undefined) {\n      // For a compiled recipe, echo its build-time variables so the backend\n      // hash matches the built snapshot and forks from it.\n      input.template = toTemplateInput(template);\n    }\n\n    return this.#createAndWait(input, options);\n  }\n\n  async fork(\n    sourceSandboxId: string,\n    options: ForkOptions = {},\n  ): Promise<SandboxInfo> {\n    return this.#createAndWait(\n      { environmentId: this.#config.environmentId, sourceSandboxId },\n      options,\n    );\n  }\n\n  /** Applies the shared creation knobs, runs the create mutation, and waits for RUNNING. */\n  async #createAndWait(\n    input: RailwaySandboxCreateMutationVariables[\"input\"],\n    options: SandboxCreationOptions,\n  ): Promise<SandboxInfo> {\n    if (options.idleTimeoutMinutes !== undefined) {\n      input.idleTimeoutMinutes = options.idleTimeoutMinutes;\n    }\n    if (options.networkIsolation !== undefined) {\n      input.networkIsolation = options.networkIsolation;\n    }\n    if (options.env !== undefined) {\n      input.variables = options.env;\n    }\n\n    this.#config.log(creationLine(input));\n\n    const data = await requestGraphQL<\n      RailwaySandboxCreateMutation,\n      RailwaySandboxCreateMutationVariables\n    >(this.#config, RailwaySandboxCreateDocument, { input });\n\n    this.#config.log(\n      `created sandbox ${data.sandboxCreate.id} status=${data.sandboxCreate.status}`,\n    );\n\n    return this.#waitForRunning(data.sandboxCreate);\n  }\n\n  async buildTemplate(\n    template: CompiledTemplate,\n  ): Promise<SandboxTemplateBuildInfo> {\n    const variables: RailwaySandboxTemplateBuildMutationVariables = {\n      environmentId: this.#config.environmentId,\n      input: toTemplateInput(template),\n    };\n    const data = await requestGraphQL<\n      RailwaySandboxTemplateBuildMutation,\n      RailwaySandboxTemplateBuildMutationVariables\n    >(this.#config, RailwaySandboxTemplateBuildDocument, variables);\n\n    return data.sandboxTemplateBuild;\n  }\n\n  async getTemplateBuild(id: string): Promise<SandboxTemplateBuildInfo> {\n    const variables: RailwaySandboxTemplateBuildStatusQueryVariables = {\n      id,\n      environmentId: this.#config.environmentId,\n    };\n    const data = await requestGraphQL<\n      RailwaySandboxTemplateBuildStatusQuery,\n      RailwaySandboxTemplateBuildStatusQueryVariables\n    >(this.#config, RailwaySandboxTemplateBuildStatusDocument, variables);\n\n    return data.sandboxTemplateBuild;\n  }\n\n  async buildTemplateUntilReady(\n    template: CompiledTemplate,\n  ): Promise<SandboxTemplateBuildInfo> {\n    const varCount = template.variables\n      ? Object.keys(template.variables).length\n      : 0;\n    this.#config.log(\n      `build template (${template.instructions.length} steps, vars=${varCount})`,\n    );\n    return this.#waitForBuildReady(await this.buildTemplate(template));\n  }\n\n  /**\n   * Capture a running sandbox's disk into a named checkpoint. Synchronous on\n   * the backend: the checkpoint is bootable when this resolves.\n   */\n  async checkpoint(\n    sandboxId: string,\n    name: string,\n  ): Promise<SandboxCheckpointInfo> {\n    this.#config.log(`checkpoint sandbox ${sandboxId} -> \"${name}\"`);\n    const variables: RailwaySandboxCheckpointCreateMutationVariables = {\n      environmentId: this.#config.environmentId,\n      name,\n      sandboxId,\n    };\n    const data = await requestGraphQL<\n      RailwaySandboxCheckpointCreateMutation,\n      RailwaySandboxCheckpointCreateMutationVariables\n    >(this.#config, RailwaySandboxCheckpointCreateDocument, variables);\n\n    this.#config.log(`checkpoint ${data.sandboxCheckpointCreate.id} ready`);\n    return data.sandboxCheckpointCreate;\n  }\n\n  async listCheckpoints(): Promise<SandboxCheckpointInfo[]> {\n    const data = await requestGraphQL<\n      RailwaySandboxCheckpointsQuery,\n      RailwaySandboxCheckpointsQueryVariables\n    >(this.#config, RailwaySandboxCheckpointsDocument, {\n      environmentId: this.#config.environmentId,\n    });\n\n    return data.sandboxCheckpoints;\n  }\n\n  async renameCheckpoint(\n    id: string,\n    name: string,\n  ): Promise<SandboxCheckpointInfo> {\n    this.#config.log(`rename checkpoint ${id} -> \"${name}\"`);\n    const data = await requestGraphQL<\n      RailwaySandboxCheckpointRenameMutation,\n      RailwaySandboxCheckpointRenameMutationVariables\n    >(this.#config, RailwaySandboxCheckpointRenameDocument, {\n      environmentId: this.#config.environmentId,\n      id,\n      name,\n    });\n\n    return data.sandboxCheckpointRename;\n  }\n\n  async deleteCheckpoint(id: string): Promise<void> {\n    this.#config.log(`delete checkpoint ${id}`);\n    await requestGraphQL<\n      RailwaySandboxCheckpointDeleteMutation,\n      RailwaySandboxCheckpointDeleteMutationVariables\n    >(this.#config, RailwaySandboxCheckpointDeleteDocument, {\n      environmentId: this.#config.environmentId,\n      id,\n    });\n  }\n\n  /**\n   * Resolves once the build is READY (its checkpoint exists). PENDING (no\n   * workflow yet) and BUILDING keep polling; only FAILED is terminal.\n   */\n  async #waitForBuildReady(\n    build: SandboxTemplateBuildInfo,\n  ): Promise<SandboxTemplateBuildInfo> {\n    if (build.status === \"READY\") {\n      this.#config.log(`template build ${build.id} ready (cached)`);\n      return build;\n    }\n    if (build.status === \"FAILED\") {\n      throw new SandboxTemplateBuildError({\n        templateId: build.id,\n        environmentId: this.environmentId,\n      });\n    }\n\n    return this.#pollUntilReady({\n      poll: () => this.getTemplateBuild(build.id),\n      isReady: build => build.status === \"READY\",\n      isTerminal: build => build.status === \"FAILED\",\n      describe: build => `template build ${build.id} status=${build.status}`,\n      onTerminal: build => {\n        throw new SandboxTemplateBuildError({\n          templateId: build.id,\n          environmentId: this.environmentId,\n        });\n      },\n      onTimeout: build => {\n        throw new SandboxTimeoutError({\n          resource: \"template\",\n          id: build.id,\n          lastStatus: build.status,\n          timeoutMs: READINESS_TIMEOUT_MS,\n        });\n      },\n    });\n  }\n\n  async #waitForRunning(created: SandboxInfo): Promise<SandboxInfo> {\n    if (created.status === \"RUNNING\") return created;\n    if (isSandboxTerminal(created.status)) {\n      throw new SandboxFailedError({ id: created.id, status: created.status });\n    }\n\n    return this.#pollUntilReady({\n      poll: () => this.#getOrThrow(created.id),\n      isReady: info => info.status === \"RUNNING\",\n      isTerminal: info => isSandboxTerminal(info.status),\n      describe: info => `sandbox ${info.id} status=${info.status}`,\n      onTerminal: info => {\n        throw new SandboxFailedError({ id: info.id, status: info.status });\n      },\n      onTimeout: info => {\n        throw new SandboxTimeoutError({\n          resource: \"sandbox\",\n          id: info.id,\n          lastStatus: info.status,\n          timeoutMs: READINESS_TIMEOUT_MS,\n        });\n      },\n    });\n  }\n\n  async #getOrThrow(id: string): Promise<SandboxInfo> {\n    const info = await this.get(id);\n    if (!info) {\n      throw new SandboxNotFoundError({ id, environmentId: this.environmentId });\n    }\n    return info;\n  }\n\n  async #pollUntilReady<T>(args: {\n    poll: () => Promise<T>;\n    isReady: (value: T) => boolean;\n    isTerminal: (value: T) => boolean;\n    onTerminal: (value: T) => never;\n    onTimeout: (value: T) => never;\n    describe?: (value: T) => string;\n  }): Promise<T> {\n    const start = Date.now();\n    const describe = args.describe;\n    let delay = POLL_INITIAL_DELAY_MS;\n    let last: T;\n    do {\n      await sleep(delay);\n      last = await args.poll();\n      const elapsedSec = ((Date.now() - start) / 1000).toFixed(1);\n      if (args.isReady(last)) {\n        if (describe) this.#config.log(`${describe(last)} ready after ${elapsedSec}s`);\n        return last;\n      }\n      if (args.isTerminal(last)) {\n        if (describe) this.#config.log(`${describe(last)} hit terminal state`);\n        return args.onTerminal(last);\n      }\n      delay = Math.min(delay * 2, POLL_MAX_DELAY_MS);\n      if (describe) {\n        this.#config.log(\n          `waiting on ${describe(last)}, retry in ${delay}ms (elapsed ${elapsedSec}s)`,\n        );\n      }\n    } while (Date.now() - start < READINESS_TIMEOUT_MS);\n    if (describe) {\n      const elapsedSec = ((Date.now() - start) / 1000).toFixed(1);\n      this.#config.log(`${describe(last)} timed out after ${elapsedSec}s`);\n    }\n    return args.onTimeout(last);\n  }\n\n  exec(id: string, target: ExecTarget, options: ExecOptions = {}): ExecHandle {\n    const context: ExecContext = {\n      config: this.#config,\n      environmentId: this.#config.environmentId,\n      sandboxId: id,\n    };\n    return startExec(context, target, options);\n  }\n\n  async destroy(id: string): Promise<void> {\n    const variables: RailwaySandboxDestroyMutationVariables = {\n      id,\n      environmentId: this.#config.environmentId,\n    };\n    this.#config.log(`destroy sandbox ${id}`);\n    await requestGraphQL<\n      RailwaySandboxDestroyMutation,\n      RailwaySandboxDestroyMutationVariables\n    >(this.#config, RailwaySandboxDestroyDocument, variables);\n  }\n\n  async get(id: string): Promise<SandboxInfo | null> {\n    const variables: RailwaySandboxQueryVariables = {\n      id,\n      environmentId: this.#config.environmentId,\n    };\n    const data = await requestGraphQL<\n      RailwaySandboxQuery,\n      RailwaySandboxQueryVariables\n    >(this.#config, RailwaySandboxDocument, variables);\n\n    const info = data.sandbox ?? null;\n    if (!info) {\n      this.#config.log(`sandbox ${id} not found (env=${this.environmentId})`);\n    }\n    return info;\n  }\n\n  async list(options: ListOptions = {}): Promise<SandboxInfo[]> {\n    const variables: RailwaySandboxesQueryVariables = {\n      environmentId: this.#config.environmentId,\n    };\n    if (options.first !== undefined) variables.first = options.first;\n    if (options.after !== undefined) variables.after = options.after;\n\n    const data = await requestGraphQL<\n      RailwaySandboxesQuery,\n      RailwaySandboxesQueryVariables\n    >(this.#config, RailwaySandboxesDocument, variables);\n\n    return data.sandboxes.edges.map(edge => edge.node);\n  }\n}\n\nfunction isSandboxTerminal(status: SandboxInfo[\"status\"]): boolean {\n  return status === \"FAILED\" || status === \"DESTROYED\" || status === \"DESTROYING\";\n}\n\nfunction toTemplateInput(template: TemplateSource): SandboxTemplateInput {\n  if (\"name\" in template) {\n    return { name: template.name };\n  }\n  return {\n    instructions: [...template.instructions],\n    ...(template.variables && { variables: template.variables }),\n  };\n}\n\nfunction creationKind(\n  input: RailwaySandboxCreateMutationVariables[\"input\"],\n): string {\n  if (input.sourceSandboxId) return \"fork\";\n  if (input.template?.name) return \"create-from-checkpoint\";\n  if (input.template) return \"create-from-template\";\n  return \"create\";\n}\n\n/** Verbose line for a create/fork/template create. Logs env key names, never values. */\nfunction creationLine(\n  input: RailwaySandboxCreateMutationVariables[\"input\"],\n): string {\n  const kind = creationKind(input);\n  const envKeys = input.variables ? Object.keys(input.variables) : [];\n  const parts = [\n    kind,\n    `env=${input.environmentId}`,\n    `idleTimeout=${input.idleTimeoutMinutes ?? \"none\"}`,\n    `network=${input.networkIsolation ?? \"default\"}`,\n    `envKeys=[${envKeys.join(\",\")}]`,\n  ];\n  if (input.sourceSandboxId) parts.push(`source=${input.sourceSandboxId}`);\n  if (input.template?.name) parts.push(`checkpoint=\"${input.template.name}\"`);\n  return parts.join(\" \");\n}\n\nexport function engineFromOptions(options: SandboxOptions = {}): SandboxEngine {\n  const base = normalizeRailwayClientConfig(options);\n  const environmentId = resolveEnvironmentId(options.environmentId);\n  return new SandboxEngine({ ...base, environmentId });\n}\n","import { engineFromOptions } from \"./engine.js\";\nimport type { CompiledTemplate, TemplateBuildOptions } from \"./types.js\";\n\ninterface TemplateState {\n  readonly instructions: readonly string[];\n  readonly env: ReadonlyArray<readonly [string, string]>;\n  readonly workdir?: string;\n}\n\nconst EMPTY_STATE: TemplateState = { instructions: [], env: [] };\n\n/** Immutable sandbox base recipe returned by `Sandbox.template()`. */\nexport interface SandboxTemplate {\n  /** Add a shell command build step. */\n  run(command: string): SandboxTemplate;\n  /** Install Debian packages with apt. */\n  withPackages(...packages: string[]): SandboxTemplate;\n  /**\n   * Set build-time environment variables available to the build instructions.\n   * Values may use Railway references (e.g. `${{shared.FOO}}`), resolved at\n   * build time. Build-time only — runtime env comes from `create({ env })`.\n   */\n  withEnv(vars: Record<string, string>): SandboxTemplate;\n  /** Set the working directory for later build steps. */\n  workdir(dir: string): SandboxTemplate;\n  /** Build the template before creating sandboxes from it. */\n  build(options?: TemplateBuildOptions): Promise<SandboxTemplate>;\n}\n\nexport function createSandboxTemplate(): SandboxTemplate {\n  return new SandboxTemplateRecipe(EMPTY_STATE);\n}\n\nexport function isSandboxTemplate(value: unknown): value is SandboxTemplate {\n  return value instanceof SandboxTemplateRecipe;\n}\n\nexport function compileSandboxTemplate(\n  template: SandboxTemplate,\n): CompiledTemplate {\n  if (!(template instanceof SandboxTemplateRecipe)) {\n    throw new TypeError(\"Expected a SandboxTemplate returned by Sandbox.template().\");\n  }\n  return template.compile();\n}\n\nclass SandboxTemplateRecipe implements SandboxTemplate {\n  readonly #state: TemplateState;\n\n  constructor(state: TemplateState) {\n    this.#state = state;\n  }\n\n  run(command: string): SandboxTemplate {\n    return this.#append(command);\n  }\n\n  withPackages(...packages: string[]): SandboxTemplate {\n    if (packages.length === 0) return this;\n    return this.#append(\n      `apt-get update && apt-get install -y --no-install-recommends ${packages.join(\" \")}`,\n    );\n  }\n\n  withEnv(vars: Record<string, string>): SandboxTemplate {\n    let env = this.#state.env;\n    for (const [key, value] of Object.entries(vars)) {\n      env = upsertEnv(env, key, value);\n    }\n    return new SandboxTemplateRecipe({ ...this.#state, env });\n  }\n\n  workdir(dir: string): SandboxTemplate {\n    return new SandboxTemplateRecipe({ ...this.#state, workdir: dir });\n  }\n\n  async build(options: TemplateBuildOptions = {}): Promise<SandboxTemplate> {\n    const compiled = this.compile();\n    // Nothing to build without instructions; build-time env alone has no effect.\n    if (compiled.instructions.length > 0) {\n      await engineFromOptions(options).buildTemplateUntilReady(compiled);\n    }\n    return this;\n  }\n\n  compile(): CompiledTemplate {\n    const instructions = [...this.#state.instructions];\n    if (this.#state.env.length === 0) return { instructions };\n    return { instructions, variables: Object.fromEntries(this.#state.env) };\n  }\n\n  #append(command: string): SandboxTemplate {\n    const instruction = compileInstruction(command, this.#state.workdir);\n    return new SandboxTemplateRecipe({\n      ...this.#state,\n      instructions: [...this.#state.instructions, instruction],\n    });\n  }\n}\n\nfunction compileInstruction(command: string, workdir: string | undefined): string {\n  if (workdir === undefined) return command;\n  const quoted = shellQuote(workdir);\n  return `mkdir -p ${quoted} && cd ${quoted} && ${command}`;\n}\n\nfunction upsertEnv(\n  env: ReadonlyArray<readonly [string, string]>,\n  key: string,\n  value: string,\n): ReadonlyArray<readonly [string, string]> {\n  const index = env.findIndex(([k]) => k === key);\n  if (index === -1) return [...env, [key, value]];\n  const next = env.slice();\n  next[index] = [key, value];\n  return next;\n}\n\nfunction shellQuote(value: string): string {\n  return `'${value.replaceAll(\"'\", \"'\\\\''\")}'`;\n}\n","import {\n  engineFromOptions,\n  type SandboxEngine,\n} from \"./engine.js\";\nimport { SandboxNotFoundError } from \"./errors.js\";\nimport {\n  compileSandboxTemplate,\n  createSandboxTemplate,\n  isSandboxTemplate,\n  type SandboxTemplate,\n} from \"./template.js\";\nimport type { ExecHandle } from \"./exec.js\";\nimport type {\n  CheckpointOptions,\n  ConnectOptions,\n  CreateOptions,\n  ExecOptions,\n  ExecReattachTarget,\n  ExecTarget,\n  ForkOptions,\n  ListOptions,\n  SandboxCheckpointInfo,\n  SandboxInfo,\n  SandboxNetworkIsolation,\n  SandboxStatus,\n} from \"./types.js\";\n\n/**\n * A live Railway sandbox. There is no separate client: a sandbox always comes\n * from somewhere — nothing (`Sandbox.create`), an id (`Sandbox.connect`), a\n * reusable base (`Sandbox.template()`), or a saved checkpoint\n * (`Sandbox.create(name)`). The constructor is private; use the\n * static factories.\n */\nexport class Sandbox implements AsyncDisposable {\n  readonly #engine: SandboxEngine;\n  #info: SandboxInfo;\n\n  private constructor(engine: SandboxEngine, info: SandboxInfo) {\n    this.#engine = engine;\n    this.#info = info;\n  }\n\n  get id(): string {\n    return this.#info.id;\n  }\n\n  get status(): SandboxStatus {\n    return this.#info.status;\n  }\n\n  /** Network access mode: `ISOLATED` (NAT egress only) or `PRIVATE` (joins the environment private network). */\n  get networkIsolation(): SandboxNetworkIsolation {\n    return this.#info.networkIsolation;\n  }\n\n  get environmentId(): string {\n    return this.#info.environmentId;\n  }\n\n  get region(): string {\n    return this.#info.region;\n  }\n\n  get idleTimeoutMinutes(): number | null {\n    return this.#info.idleTimeoutMinutes ?? null;\n  }\n\n  get createdAt(): string {\n    return this.#info.createdAt;\n  }\n\n  /** Return a new immutable sandbox template. */\n  static template(): SandboxTemplate {\n    return createSandboxTemplate();\n  }\n\n  /** Boot from a saved checkpoint (one captured with `checkpoint`). */\n  static create(checkpointName: string, options?: CreateOptions): Promise<Sandbox>;\n  static create(\n    template: SandboxTemplate,\n    options?: CreateOptions,\n  ): Promise<Sandbox>;\n  static create(source: Sandbox, options?: ForkOptions): Promise<Sandbox>;\n  static create(options?: CreateOptions): Promise<Sandbox>;\n  static async create(\n    sourceOrOptions: string | SandboxTemplate | Sandbox | CreateOptions = {},\n    maybeOptions: CreateOptions = {},\n  ): Promise<Sandbox> {\n    if (typeof sourceOrOptions === \"string\") {\n      const name = sourceOrOptions.trim();\n      if (name === \"\") {\n        throw new TypeError(\"Checkpoint name must be a non-empty string.\");\n      }\n      const engine = engineFromOptions(maybeOptions);\n      const info = await engine.create(maybeOptions, { name });\n      return new Sandbox(engine, info);\n    }\n\n    if (sourceOrOptions instanceof Sandbox) {\n      return sourceOrOptions.fork(maybeOptions);\n    }\n\n    if (isSandboxTemplate(sourceOrOptions)) {\n      const engine = engineFromOptions(maybeOptions);\n      const compiled = compileSandboxTemplate(sourceOrOptions);\n      if (compiled.instructions.length === 0) {\n        // No build steps → nothing to build. Build-time variables have no\n        // effect; runtime env still comes from `create({ env })`.\n        return new Sandbox(engine, await engine.create(maybeOptions));\n      }\n      await engine.buildTemplateUntilReady(compiled);\n      const info = await engine.create(maybeOptions, compiled);\n      return new Sandbox(engine, info);\n    }\n\n    const engine = engineFromOptions(sourceOrOptions);\n    const info = await engine.create(sourceOrOptions);\n    return new Sandbox(engine, info);\n  }\n\n  static async connect(\n    id: string,\n    options: ConnectOptions = {},\n  ): Promise<Sandbox> {\n    const engine = engineFromOptions(options);\n    const info = await engine.get(id);\n    if (!info) {\n      throw new SandboxNotFoundError({ id, environmentId: engine.environmentId });\n    }\n    return new Sandbox(engine, info);\n  }\n\n  static async list(options: ListOptions = {}): Promise<SandboxInfo[]> {\n    const engine = engineFromOptions(options);\n    return engine.list(options);\n  }\n\n  /** List the environment's named checkpoints (newest first). */\n  static async checkpoints(\n    options: CheckpointOptions = {},\n  ): Promise<SandboxCheckpointInfo[]> {\n    return engineFromOptions(options).listCheckpoints();\n  }\n\n  /** Rename a checkpoint by id; new sandboxes boot from it via the new name. */\n  static async renameCheckpoint(\n    id: string,\n    name: string,\n    options: CheckpointOptions = {},\n  ): Promise<SandboxCheckpointInfo> {\n    const trimmed = name.trim();\n    if (trimmed === \"\") {\n      throw new TypeError(\"Checkpoint name must be a non-empty string.\");\n    }\n    return engineFromOptions(options).renameCheckpoint(id, trimmed);\n  }\n\n  /** Delete a checkpoint by id (find it by `key` via `Sandbox.checkpoints`). */\n  static async deleteCheckpoint(\n    id: string,\n    options: CheckpointOptions = {},\n  ): Promise<void> {\n    await engineFromOptions(options).deleteCheckpoint(id);\n  }\n\n  /**\n   * Run a command. Awaiting the handle resolves the final `ExecResult` —\n   * short commands return directly, long-running ones transparently stream\n   * output (see `ExecOptions.onStdout`/`onStderr`) until the command exits.\n   * The handle also exposes `sessionName` and `kill()`. A `timeoutSec` deadline\n   * kills the command and resolves with `timedOut: true` rather than\n   * rejecting.\n   */\n  exec(command: string, options?: ExecOptions): ExecHandle;\n  /** Reattach to a running exec by session name; resumes the retained output. */\n  exec(target: ExecReattachTarget, options?: ExecOptions): ExecHandle;\n  exec(target: ExecTarget, options: ExecOptions = {}): ExecHandle {\n    return this.#engine.exec(this.id, target, options);\n  }\n\n  /**\n   * Fork this running sandbox into a new, independent one. Clones the\n   * filesystem (a fresh boot, not live processes) into the same environment.\n   */\n  async fork(options?: ForkOptions): Promise<Sandbox> {\n    const info = await this.#engine.fork(this.id, options);\n    return new Sandbox(this.#engine, info);\n  }\n\n  /**\n   * Capture this sandbox's current disk into a reusable named checkpoint,\n   * bootable as soon as this resolves. The sandbox must be running and the\n   * name unused. Boot new sandboxes from it with `Sandbox.create(name)`.\n   */\n  async checkpoint(name: string): Promise<SandboxCheckpointInfo> {\n    const trimmed = name.trim();\n    if (trimmed === \"\") {\n      throw new TypeError(\"Checkpoint name must be a non-empty string.\");\n    }\n    return this.#engine.checkpoint(this.id, trimmed);\n  }\n\n  async destroy(): Promise<void> {\n    await this.#engine.destroy(this.id);\n  }\n\n  /** Re-reads the sandbox to refresh `status` and other fields in place. */\n  async refresh(): Promise<this> {\n    const info = await this.#engine.get(this.id);\n    if (!info) {\n      throw new SandboxNotFoundError({\n        id: this.id,\n        environmentId: this.environmentId,\n      });\n    }\n    this.#info = info;\n    return this;\n  }\n\n  async [Symbol.asyncDispose](): Promise<void> {\n    await this.destroy();\n  }\n\n  toJSON(): SandboxInfo {\n    return { ...this.#info };\n  }\n}\n"]}