unfazed 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +92 -6
- package/dist/client.d.ts +1 -1
- package/dist/client.js +1 -1
- package/dist/client.js.map +1 -1
- package/dist/errors.d.ts +23 -0
- package/dist/errors.js +40 -0
- package/dist/errors.js.map +1 -1
- package/dist/generated/gql.d.ts +1 -1
- package/dist/generated/gql.js +1 -1
- package/dist/generated/gql.js.map +1 -1
- package/dist/generated/graphql.d.ts +1 -0
- package/dist/generated/graphql.js +4 -2
- package/dist/generated/graphql.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/operations.d.ts +10 -0
- package/dist/operations.js +11 -2
- package/dist/operations.js.map +1 -1
- package/dist/unfazed.d.ts +219 -11
- package/dist/unfazed.js +246 -18
- package/dist/unfazed.js.map +1 -1
- package/package.json +1 -1
|
@@ -91,8 +91,10 @@ export const SdkListWorkspacesDocument = new TypedDocumentString(`
|
|
|
91
91
|
}
|
|
92
92
|
`);
|
|
93
93
|
export const SdkDeleteWorkspaceDocument = new TypedDocumentString(`
|
|
94
|
-
mutation SdkDeleteWorkspace($workspaceID: ID
|
|
95
|
-
deleteWorkspace(
|
|
94
|
+
mutation SdkDeleteWorkspace($workspaceID: ID!, $withDeployments: Boolean) {
|
|
95
|
+
deleteWorkspace(
|
|
96
|
+
input: {workspaceID: $workspaceID, withDeployments: $withDeployments}
|
|
97
|
+
) {
|
|
96
98
|
ok
|
|
97
99
|
}
|
|
98
100
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graphql.js","sourceRoot":"","sources":["../../src/generated/graphql.ts"],"names":[],"mappings":"AAyYA,MAAM,OAAO,mBACX,SAAQ,MAAM;IAGd,SAAS,CAAyE;IAC1E,KAAK,CAAS;IACf,QAAQ,CAAmC;IAElD,YAAY,KAAa,EAAE,QAA0C;QAC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B,CAAC;;;;;;;;;;;KAW5D,CAAkG,CAAC;AACxG,MAAM,CAAC,MAAM,sBAAsB,GAAG,IAAI,mBAAmB,CAAC;;;;;;;;;;;KAWzD,CAA4F,CAAC;AAClG,MAAM,CAAC,MAAM,2BAA2B,GAAG,IAAI,mBAAmB,CAAC;;;;;;KAM9D,CAAsG,CAAC;AAC5G,MAAM,CAAC,MAAM,0BAA0B,GAAG,IAAI,mBAAmB,CAAC;;;;;;;;;;;;;;KAc7D,CAAoG,CAAC;AAC1G,MAAM,CAAC,MAAM,6BAA6B,GAAG,IAAI,mBAAmB,CAAC;;;;;;;;;;;;;;;;KAgBhE,CAA0G,CAAC;AAChH,MAAM,CAAC,MAAM,6BAA6B,GAAG,IAAI,mBAAmB,CAAC;;;;;;KAMhE,CAA0G,CAAC;AAChH,MAAM,CAAC,MAAM,2BAA2B,GAAG,IAAI,mBAAmB,CAAC;;;;;;;;;;;;KAY9D,CAAgG,CAAC;AACtG,MAAM,CAAC,MAAM,oBAAoB,GAAG,IAAI,mBAAmB,CAAC;;;;;;;;;;;;;;;;KAgBvD,CAAwF,CAAC;AAC9F,MAAM,CAAC,MAAM,uBAAuB,GAAG,IAAI,mBAAmB,CAAC;;;;;;;;;;;;;;;;KAgB1D,CAA8F,CAAC;AACpG,MAAM,CAAC,MAAM,uBAAuB,GAAG,IAAI,mBAAmB,CAAC;;;;;;KAM1D,CAA8F,CAAC;AACpG,MAAM,CAAC,MAAM,wBAAwB,GAAG,IAAI,mBAAmB,CAAC;;;;;;KAM3D,CAAgG,CAAC;AACtG,MAAM,CAAC,MAAM,qBAAqB,GAAG,IAAI,mBAAmB,CAAC;;;;;;;;;;;;KAYxD,CAAoF,CAAC","sourcesContent":["/* eslint-disable */\n/** Internal type. DO NOT USE DIRECTLY. */\ntype Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };\n/** Internal type. DO NOT USE DIRECTLY. */\nexport type Incremental<T> = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never };\n/**\n * Inlined from @graphql-typed-document-node/core by scripts/postcodegen.ts so\n * this package ships with zero dependencies, type-only ones included.\n * Structurally identical to the upstream interface.\n */\ninterface DocumentTypeDecoration<TResult, TVariables> {\n __apiType?: (variables: TVariables) => TResult;\n}\n/** A box's requested VM size. Omitted fields use the platform default. */\nexport type BoxResourcesInput = {\n /** Persistent disk in GiB (default 8, max 64). Applies only when the disk is first created; an existing disk keeps its size. */\n diskGiB?: number | null | undefined;\n /** RAM in MiB (default 2048, min 512, max 16384). */\n memMiB?: number | null | undefined;\n /** vCPU count (default 2, max 8). */\n vcpus?: number | null | undefined;\n};\n\n/**\n * Creates a deployment from the workspace's current files. The build is driven by\n * an optional root unfazed.json: STATIC serves the files as-is unless unfazed.json\n * sets build (a command run in the build VM) + output (publish dir, default \"dist\"\n * when build is set; output with no build republishes a committed dir like dist/ as\n * is); SERVICE bundles server.ts by default, or the entry set in unfazed.json.\n * install defaults to \"bun install\" (--frozen-lockfile when a bun lockfile exists).\n */\nexport type CreateDeploymentInput = {\n alias?: string | null | undefined;\n /** BOX only: optional VM size. Omit for the platform defaults. */\n boxResources?: BoxResourcesInput | null | undefined;\n /** Absolute HTTP path the cron tick POSTs to; defaults to /cron when cronSchedule is set. */\n cronPath?: string | null | undefined;\n /**\n * Standard 5-field cron spec (minute hour day-of-month month day-of-week). When\n * set, the platform wakes the SERVICE on each tick with a POST to cronPath\n * (default /cron) carrying header X-Unfz-Trigger: cron and a signed\n * X-Unfz-Cron-Token equal to the service's UNFZ_STATE_TOKEN.\n */\n cronSchedule?: string | null | undefined;\n healthPath?: string | null | undefined;\n /** STATIC (serve files) or SERVICE (run an HTTP server). Classify it yourself: SERVICE if the workspace has server.ts, a go.mod+main.go, or an unfazed.json entry, else STATIC. */\n kind: DeploymentKind;\n /** SERVICE runtime. Omit to auto-detect (a go.mod+main.go is GO, otherwise BUN). Ignored for STATIC. */\n runtime?: ServiceRuntime | null | undefined;\n /** SERVICE only. Omit for ON_DEMAND (the default — sleeps and cold-starts on first request, right for most services). Set ALWAYS_ON only to keep the VM warm. */\n serviceMode?: ServiceMode | null | undefined;\n /** STATIC only: when true, missing paths serve index.html (single-page apps). Ignored for SERVICE. */\n spaMode?: boolean | null | undefined;\n workspaceID: string | number;\n};\n\nexport type CurrentActorKind =\n /** An automated caller using a self-registered bearer token. Subject to free-tier usage/resource limits; a user can claim it to link it to their account. */\n | 'AGENT'\n /** The operator of this Unfazed instance, authenticated with the owner token. Full access, no free-tier limits. */\n | 'OWNER'\n /** A human signed in via GitHub OAuth, who manages their linked agents and apps. */\n | 'USER';\n\nexport type DeployWorkspaceInput = {\n /** Optional public alias; defaults to the workspace's git deploy alias when it was imported. */\n alias?: string | null | undefined;\n /** SERVICE only; defaults to the git source's mode, otherwise ON_DEMAND. */\n serviceMode?: ServiceMode | null | undefined;\n /** STATIC only; overrides the detected SPA fallback. */\n spaMode?: boolean | null | undefined;\n workspaceID: string | number;\n};\n\nexport type DeploymentEventSeverity =\n | 'ERROR'\n | 'INFO'\n | 'WARN';\n\nexport type DeploymentEventType =\n | 'DEPLOYMENT_CREATED'\n | 'DEPLOYMENT_PROMOTION_REJECTED'\n | 'DEPLOYMENT_ROLLED_BACK'\n | 'SERVICE_BOOT_FAILED'\n | 'SERVICE_BUILD_FAILED'\n | 'SERVICE_BUILD_SUCCEEDED'\n | 'SERVICE_CRON_TRIGGERED'\n | 'SERVICE_HEALTH_PROBE_FAILED'\n | 'SERVICE_PROXY_ERROR'\n | 'SERVICE_RESTART_REQUESTED'\n | 'SERVICE_STOP_REQUESTED'\n | 'SERVICE_SUPERVISOR_STARTED'\n | 'SERVICE_SUPERVISOR_STOPPED'\n | 'SERVICE_VM_STARTED'\n | 'SERVICE_VM_START_FAILED'\n | 'SERVICE_VM_STOPPED'\n | 'SERVICE_WATCHDOG_PROBE_FAILED'\n | 'SERVICE_WATCHDOG_RESTART'\n | 'UNKNOWN';\n\nexport type DeploymentKind =\n /** A persistent always-on Linux VM with a per-workspace data disk (docs/agent-box.md). */\n | 'BOX'\n | 'SERVICE'\n | 'STATIC';\n\nexport type DeploymentStatus =\n | 'BUILDING'\n | 'FAILED'\n | 'READY';\n\nexport type ListDeploymentsInput = {\n alias?: string | null | undefined;\n kind?: DeploymentKind | null | undefined;\n limit?: number | null | undefined;\n offset?: number | null | undefined;\n order?: string | null | undefined;\n workspaceID?: string | number | null | undefined;\n};\n\nexport type ListWorkspaceFilesInput = {\n limit?: number | null | undefined;\n offset?: number | null | undefined;\n order?: string | null | undefined;\n workspaceID: string | number;\n};\n\nexport type ReadWorkspaceFileInput = {\n limit?: number | null | undefined;\n offset?: number | null | undefined;\n path: string;\n workspaceID: string | number;\n};\n\nexport type ServiceMode =\n /** Keeps a supervised VM running 24/7 (resource-expensive). Reserve for services that must stay warm (low first-request latency), do background work between requests, or run a frequent cron. */\n | 'ALWAYS_ON'\n /** Default. Sleeps and cold-starts a VM on the first request, then parks it after a short idle period — cheap and right for most services. Use on_demand + cronSchedule for periodic work. */\n | 'ON_DEMAND';\n\nexport type ServiceRuntime =\n /** Default. Bundles a TypeScript/JavaScript entry (server.ts) into a Bun HTTP server. */\n | 'BUN'\n /** Compiles a Go module (go.mod) into a static binary that starts its own HTTP server on $PORT. */\n | 'GO';\n\nexport type DeploymentFieldsFragment = { id: string, workspaceID: string, kind: DeploymentKind, runtime: ServiceRuntime | null, alias: string | null, serviceMode: ServiceMode, healthPath: string | null, cronSchedule: string | null, cronPath: string | null, url: string, previewUrl: string, sshCommand: string | null, aliasHeld: boolean, aliasRevision: string, status: DeploymentStatus, error: string | null, filesCount: number, sizeBytes: number, size: string, spaMode: boolean, gitRepo: string | null, gitCommit: string | null, createdAt: string };\n\nexport type SdkWhoamiQueryVariables = Exact<{ [key: string]: never; }>;\n\n\nexport type SdkWhoamiQuery = { whoami: { kind: CurrentActorKind, userID: string, name: string, agentID: string | null, agentName: string | null, claimed: boolean, claimedBy: string | null, scopes: Array<string>, expiresAt: string | null, usage: { month: string, requests: number, limit: number } | null, resources: { workspaces: number, workspaceLimit: number, services: number, serviceLimit: number } | null } };\n\nexport type SdkCreateWorkspaceMutationVariables = Exact<{\n name: string;\n}>;\n\n\nexport type SdkCreateWorkspaceMutation = { createWorkspace: { workspace: { id: string, name: string, ownerId: string, projectId: string | null, createdAt: string, updatedAt: string } } };\n\nexport type SdkListWorkspacesQueryVariables = Exact<{ [key: string]: never; }>;\n\n\nexport type SdkListWorkspacesQuery = { workspaces: Array<{ id: string, name: string, ownerId: string, projectId: string | null, createdAt: string, updatedAt: string }> };\n\nexport type SdkDeleteWorkspaceMutationVariables = Exact<{\n workspaceID: string | number;\n}>;\n\n\nexport type SdkDeleteWorkspaceMutation = { deleteWorkspace: { ok: boolean } };\n\nexport type SdkWriteTextFileMutationVariables = Exact<{\n workspaceID: string | number;\n path: string;\n text: string;\n}>;\n\n\nexport type SdkWriteTextFileMutation = { writeWorkspaceTextFile: { file: { path: string, sizeBytes: number, size: string, sha256: string, updatedAt: string } } };\n\nexport type SdkWriteBase64FileMutationVariables = Exact<{\n workspaceID: string | number;\n path: string;\n contentBase64: string;\n}>;\n\n\nexport type SdkWriteBase64FileMutation = { writeWorkspaceBase64File: { file: { path: string, sizeBytes: number, size: string, sha256: string, updatedAt: string } } };\n\nexport type SdkListFilesQueryVariables = Exact<{\n input: ListWorkspaceFilesInput;\n}>;\n\n\nexport type SdkListFilesQuery = { workspaceFilesPage: { total: number, limit: number, offset: number, hasMore: boolean, nextOffset: number | null, items: Array<{ path: string, sizeBytes: number, size: string, sha256: string, updatedAt: string }> } };\n\nexport type SdkReadFileQueryVariables = Exact<{\n input: ReadWorkspaceFileInput;\n}>;\n\n\nexport type SdkReadFileQuery = { readWorkspaceFile: { text: string, offset: number, limit: number, totalBytes: number, truncated: boolean, nextOffset: number | null, file: { path: string, sizeBytes: number, size: string, sha256: string, updatedAt: string } } | null };\n\nexport type SdkDeleteFileMutationVariables = Exact<{\n workspaceID: string | number;\n path: string;\n}>;\n\n\nexport type SdkDeleteFileMutation = { deleteWorkspaceFile: { ok: boolean } };\n\nexport type SdkCreateDeploymentMutationVariables = Exact<{\n input: CreateDeploymentInput;\n}>;\n\n\nexport type SdkCreateDeploymentMutation = { createDeployment: { deployment: { id: string, workspaceID: string, kind: DeploymentKind, runtime: ServiceRuntime | null, alias: string | null, serviceMode: ServiceMode, healthPath: string | null, cronSchedule: string | null, cronPath: string | null, url: string, previewUrl: string, sshCommand: string | null, aliasHeld: boolean, aliasRevision: string, status: DeploymentStatus, error: string | null, filesCount: number, sizeBytes: number, size: string, spaMode: boolean, gitRepo: string | null, gitCommit: string | null, createdAt: string } } };\n\nexport type SdkDeployWorkspaceMutationVariables = Exact<{\n input: DeployWorkspaceInput;\n}>;\n\n\nexport type SdkDeployWorkspaceMutation = { deployWorkspace: { deployment: { id: string, workspaceID: string, kind: DeploymentKind, runtime: ServiceRuntime | null, alias: string | null, serviceMode: ServiceMode, healthPath: string | null, cronSchedule: string | null, cronPath: string | null, url: string, previewUrl: string, sshCommand: string | null, aliasHeld: boolean, aliasRevision: string, status: DeploymentStatus, error: string | null, filesCount: number, sizeBytes: number, size: string, spaMode: boolean, gitRepo: string | null, gitCommit: string | null, createdAt: string } } };\n\nexport type SdkGetDeploymentQueryVariables = Exact<{\n id: string | number;\n}>;\n\n\nexport type SdkGetDeploymentQuery = { deployment: { id: string, workspaceID: string, kind: DeploymentKind, runtime: ServiceRuntime | null, alias: string | null, serviceMode: ServiceMode, healthPath: string | null, cronSchedule: string | null, cronPath: string | null, url: string, previewUrl: string, sshCommand: string | null, aliasHeld: boolean, aliasRevision: string, status: DeploymentStatus, error: string | null, filesCount: number, sizeBytes: number, size: string, spaMode: boolean, gitRepo: string | null, gitCommit: string | null, createdAt: string } | null };\n\nexport type SdkPollDeploymentQueryVariables = Exact<{\n id: string | number;\n}>;\n\n\nexport type SdkPollDeploymentQuery = { deployment: { id: string, status: DeploymentStatus, error: string | null, aliasHeld: boolean, url: string, previewUrl: string } | null };\n\nexport type SdkGetDeploymentByAliasQueryVariables = Exact<{\n alias: string;\n}>;\n\n\nexport type SdkGetDeploymentByAliasQuery = { deploymentByAlias: { id: string, workspaceID: string, kind: DeploymentKind, runtime: ServiceRuntime | null, alias: string | null, serviceMode: ServiceMode, healthPath: string | null, cronSchedule: string | null, cronPath: string | null, url: string, previewUrl: string, sshCommand: string | null, aliasHeld: boolean, aliasRevision: string, status: DeploymentStatus, error: string | null, filesCount: number, sizeBytes: number, size: string, spaMode: boolean, gitRepo: string | null, gitCommit: string | null, createdAt: string } | null };\n\nexport type SdkListDeploymentsQueryVariables = Exact<{\n input?: ListDeploymentsInput | null | undefined;\n}>;\n\n\nexport type SdkListDeploymentsQuery = { deploymentsPage: { total: number, limit: number, offset: number, hasMore: boolean, nextOffset: number | null, items: Array<{ id: string, workspaceID: string, kind: DeploymentKind, runtime: ServiceRuntime | null, alias: string | null, serviceMode: ServiceMode, healthPath: string | null, cronSchedule: string | null, cronPath: string | null, url: string, previewUrl: string, sshCommand: string | null, aliasHeld: boolean, aliasRevision: string, status: DeploymentStatus, error: string | null, filesCount: number, sizeBytes: number, size: string, spaMode: boolean, gitRepo: string | null, gitCommit: string | null, createdAt: string }> } };\n\nexport type SdkListReleasesQueryVariables = Exact<{\n alias: string;\n}>;\n\n\nexport type SdkListReleasesQuery = { deploymentReleases: Array<{ id: string, workspaceID: string, kind: DeploymentKind, runtime: ServiceRuntime | null, alias: string | null, serviceMode: ServiceMode, healthPath: string | null, cronSchedule: string | null, cronPath: string | null, url: string, previewUrl: string, sshCommand: string | null, aliasHeld: boolean, aliasRevision: string, status: DeploymentStatus, error: string | null, filesCount: number, sizeBytes: number, size: string, spaMode: boolean, gitRepo: string | null, gitCommit: string | null, createdAt: string }> };\n\nexport type SdkRollbackMutationVariables = Exact<{\n deploymentID: string | number;\n expectedCurrentDeploymentID: string | number;\n expectedCurrentAliasRevision: string;\n}>;\n\n\nexport type SdkRollbackMutation = { rollbackDeployment: { id: string, workspaceID: string, kind: DeploymentKind, runtime: ServiceRuntime | null, alias: string | null, serviceMode: ServiceMode, healthPath: string | null, cronSchedule: string | null, cronPath: string | null, url: string, previewUrl: string, sshCommand: string | null, aliasHeld: boolean, aliasRevision: string, status: DeploymentStatus, error: string | null, filesCount: number, sizeBytes: number, size: string, spaMode: boolean, gitRepo: string | null, gitCommit: string | null, createdAt: string } };\n\nexport type SdkServiceStatusQueryVariables = Exact<{\n deploymentID: string | number;\n}>;\n\n\nexport type SdkServiceStatusQuery = { serviceStatus: { deploymentID: string, alias: string | null, serviceMode: ServiceMode, running: boolean, health: string, vmID: string | null, inFlight: number, alwaysOn: boolean, memSizeMiB: number, startedAt: string | null, lastUsedAt: string | null, lastStoppedAt: string | null, restartCount: number, lastError: string | null } };\n\nexport type SdkServiceLogsQueryVariables = Exact<{\n deploymentID: string | number;\n tailBytes?: number | null | undefined;\n}>;\n\n\nexport type SdkServiceLogsQuery = { serviceLogs: { deploymentID: string, stdout: string, stderr: string, truncated: boolean, stdoutBytes: number, stderrBytes: number, tailBytes: number } };\n\nexport type SdkDeploymentEventsQueryVariables = Exact<{\n deploymentID: string | number;\n limit?: number | null | undefined;\n}>;\n\n\nexport type SdkDeploymentEventsQuery = { deploymentEvents: Array<{ id: string, deploymentID: string, type: DeploymentEventType, rawType: string, severity: DeploymentEventSeverity, message: string, vmID: string | null, createdAt: string }> };\n\nexport type SdkRestartServiceMutationVariables = Exact<{\n deploymentID: string | number;\n}>;\n\n\nexport type SdkRestartServiceMutation = { restartService: { deploymentID: string, running: boolean, health: string, vmID: string | null, restartCount: number, lastError: string | null } };\n\nexport type SdkStopServiceMutationVariables = Exact<{\n deploymentID: string | number;\n}>;\n\n\nexport type SdkStopServiceMutation = { stopService: { deploymentID: string, running: boolean, health: string, vmID: string | null, restartCount: number, lastError: string | null } };\n\nexport type SdkDeleteDeploymentMutationVariables = Exact<{\n deploymentID: string | number;\n}>;\n\n\nexport type SdkDeleteDeploymentMutation = { deleteDeployment: { ok: boolean } };\n\nexport type SdkSetWorkspaceEnvMutationVariables = Exact<{\n workspaceID: string | number;\n name: string;\n value: string;\n}>;\n\n\nexport type SdkSetWorkspaceEnvMutation = { setWorkspaceEnv: { env: { name: string, value: string | null, secret: boolean, alias: string | null, inherited: boolean, masked: boolean, updatedAt: string } } };\n\nexport type SdkSetWorkspaceSecretMutationVariables = Exact<{\n workspaceID: string | number;\n name: string;\n value: string;\n}>;\n\n\nexport type SdkSetWorkspaceSecretMutation = { setWorkspaceSecret: { env: { name: string, value: string | null, secret: boolean, alias: string | null, inherited: boolean, masked: boolean, updatedAt: string } } };\n\nexport type SdkDeleteWorkspaceEnvMutationVariables = Exact<{\n workspaceID: string | number;\n name: string;\n}>;\n\n\nexport type SdkDeleteWorkspaceEnvMutation = { deleteWorkspaceEnv: { ok: boolean } };\n\nexport type SdkListWorkspaceEnvQueryVariables = Exact<{\n workspaceID: string | number;\n}>;\n\n\nexport type SdkListWorkspaceEnvQuery = { workspaceEnv: Array<{ name: string, value: string | null, secret: boolean, alias: string | null, inherited: boolean, masked: boolean, updatedAt: string }> };\n\nexport type SdkSetAppEnvMutationVariables = Exact<{\n workspaceID: string | number;\n alias: string;\n name: string;\n value: string;\n}>;\n\n\nexport type SdkSetAppEnvMutation = { setAppEnv: { env: { name: string, value: string | null, secret: boolean, alias: string | null, inherited: boolean, masked: boolean, updatedAt: string } } };\n\nexport type SdkSetAppSecretMutationVariables = Exact<{\n workspaceID: string | number;\n alias: string;\n name: string;\n value: string;\n}>;\n\n\nexport type SdkSetAppSecretMutation = { setAppSecret: { env: { name: string, value: string | null, secret: boolean, alias: string | null, inherited: boolean, masked: boolean, updatedAt: string } } };\n\nexport type SdkRemoveAppEnvMutationVariables = Exact<{\n workspaceID: string | number;\n alias: string;\n name: string;\n}>;\n\n\nexport type SdkRemoveAppEnvMutation = { removeAppEnv: { ok: boolean } };\n\nexport type SdkInheritAppEnvMutationVariables = Exact<{\n workspaceID: string | number;\n alias: string;\n name: string;\n}>;\n\n\nexport type SdkInheritAppEnvMutation = { inheritAppEnv: { ok: boolean } };\n\nexport type SdkListAppEnvQueryVariables = Exact<{\n workspaceID: string | number;\n alias: string;\n}>;\n\n\nexport type SdkListAppEnvQuery = { appEnv: Array<{ name: string, value: string | null, secret: boolean, alias: string | null, inherited: boolean, masked: boolean, updatedAt: string }> };\n\nexport class TypedDocumentString<TResult, TVariables>\n extends String\n implements DocumentTypeDecoration<TResult, TVariables>\n{\n __apiType?: NonNullable<DocumentTypeDecoration<TResult, TVariables>['__apiType']>;\n private value: string;\n public __meta__?: Record<string, any> | undefined;\n\n constructor(value: string, __meta__?: Record<string, any> | undefined) {\n super(value);\n this.value = value;\n this.__meta__ = __meta__;\n }\n\n override toString(): string & DocumentTypeDecoration<TResult, TVariables> {\n return this.value;\n }\n}\nexport const DeploymentFieldsFragmentDoc = new TypedDocumentString(`\n fragment DeploymentFields on Deployment {\n id\n workspaceID\n kind\n runtime\n alias\n serviceMode\n healthPath\n cronSchedule\n cronPath\n url\n previewUrl\n sshCommand\n aliasHeld\n aliasRevision\n status\n error\n filesCount\n sizeBytes\n size\n spaMode\n gitRepo\n gitCommit\n createdAt\n}\n `, {\"fragmentName\":\"DeploymentFields\"}) as unknown as TypedDocumentString<DeploymentFieldsFragment, unknown>;\nexport const SdkWhoamiDocument = new TypedDocumentString(`\n query SdkWhoami {\n whoami {\n kind\n userID\n name\n agentID\n agentName\n claimed\n claimedBy\n scopes\n expiresAt\n usage {\n month\n requests\n limit\n }\n resources {\n workspaces\n workspaceLimit\n services\n serviceLimit\n }\n }\n}\n `) as unknown as TypedDocumentString<SdkWhoamiQuery, SdkWhoamiQueryVariables>;\nexport const SdkCreateWorkspaceDocument = new TypedDocumentString(`\n mutation SdkCreateWorkspace($name: String!) {\n createWorkspace(input: {name: $name}) {\n workspace {\n id\n name\n ownerId\n projectId\n createdAt\n updatedAt\n }\n }\n}\n `) as unknown as TypedDocumentString<SdkCreateWorkspaceMutation, SdkCreateWorkspaceMutationVariables>;\nexport const SdkListWorkspacesDocument = new TypedDocumentString(`\n query SdkListWorkspaces {\n workspaces {\n id\n name\n ownerId\n projectId\n createdAt\n updatedAt\n }\n}\n `) as unknown as TypedDocumentString<SdkListWorkspacesQuery, SdkListWorkspacesQueryVariables>;\nexport const SdkDeleteWorkspaceDocument = new TypedDocumentString(`\n mutation SdkDeleteWorkspace($workspaceID: ID!) {\n deleteWorkspace(input: {workspaceID: $workspaceID}) {\n ok\n }\n}\n `) as unknown as TypedDocumentString<SdkDeleteWorkspaceMutation, SdkDeleteWorkspaceMutationVariables>;\nexport const SdkWriteTextFileDocument = new TypedDocumentString(`\n mutation SdkWriteTextFile($workspaceID: ID!, $path: String!, $text: String!) {\n writeWorkspaceTextFile(\n input: {workspaceID: $workspaceID, path: $path, text: $text}\n ) {\n file {\n path\n sizeBytes\n size\n sha256\n updatedAt\n }\n }\n}\n `) as unknown as TypedDocumentString<SdkWriteTextFileMutation, SdkWriteTextFileMutationVariables>;\nexport const SdkWriteBase64FileDocument = new TypedDocumentString(`\n mutation SdkWriteBase64File($workspaceID: ID!, $path: String!, $contentBase64: String!) {\n writeWorkspaceBase64File(\n input: {workspaceID: $workspaceID, path: $path, contentBase64: $contentBase64}\n ) {\n file {\n path\n sizeBytes\n size\n sha256\n updatedAt\n }\n }\n}\n `) as unknown as TypedDocumentString<SdkWriteBase64FileMutation, SdkWriteBase64FileMutationVariables>;\nexport const SdkListFilesDocument = new TypedDocumentString(`\n query SdkListFiles($input: ListWorkspaceFilesInput!) {\n workspaceFilesPage(input: $input) {\n items {\n path\n sizeBytes\n size\n sha256\n updatedAt\n }\n total\n limit\n offset\n hasMore\n nextOffset\n }\n}\n `) as unknown as TypedDocumentString<SdkListFilesQuery, SdkListFilesQueryVariables>;\nexport const SdkReadFileDocument = new TypedDocumentString(`\n query SdkReadFile($input: ReadWorkspaceFileInput!) {\n readWorkspaceFile(input: $input) {\n text\n offset\n limit\n totalBytes\n truncated\n nextOffset\n file {\n path\n sizeBytes\n size\n sha256\n updatedAt\n }\n }\n}\n `) as unknown as TypedDocumentString<SdkReadFileQuery, SdkReadFileQueryVariables>;\nexport const SdkDeleteFileDocument = new TypedDocumentString(`\n mutation SdkDeleteFile($workspaceID: ID!, $path: String!) {\n deleteWorkspaceFile(input: {workspaceID: $workspaceID, path: $path}) {\n ok\n }\n}\n `) as unknown as TypedDocumentString<SdkDeleteFileMutation, SdkDeleteFileMutationVariables>;\nexport const SdkCreateDeploymentDocument = new TypedDocumentString(`\n mutation SdkCreateDeployment($input: CreateDeploymentInput!) {\n createDeployment(input: $input) {\n deployment {\n ...DeploymentFields\n }\n }\n}\n fragment DeploymentFields on Deployment {\n id\n workspaceID\n kind\n runtime\n alias\n serviceMode\n healthPath\n cronSchedule\n cronPath\n url\n previewUrl\n sshCommand\n aliasHeld\n aliasRevision\n status\n error\n filesCount\n sizeBytes\n size\n spaMode\n gitRepo\n gitCommit\n createdAt\n}`) as unknown as TypedDocumentString<SdkCreateDeploymentMutation, SdkCreateDeploymentMutationVariables>;\nexport const SdkDeployWorkspaceDocument = new TypedDocumentString(`\n mutation SdkDeployWorkspace($input: DeployWorkspaceInput!) {\n deployWorkspace(input: $input) {\n deployment {\n ...DeploymentFields\n }\n }\n}\n fragment DeploymentFields on Deployment {\n id\n workspaceID\n kind\n runtime\n alias\n serviceMode\n healthPath\n cronSchedule\n cronPath\n url\n previewUrl\n sshCommand\n aliasHeld\n aliasRevision\n status\n error\n filesCount\n sizeBytes\n size\n spaMode\n gitRepo\n gitCommit\n createdAt\n}`) as unknown as TypedDocumentString<SdkDeployWorkspaceMutation, SdkDeployWorkspaceMutationVariables>;\nexport const SdkGetDeploymentDocument = new TypedDocumentString(`\n query SdkGetDeployment($id: ID!) {\n deployment(id: $id) {\n ...DeploymentFields\n }\n}\n fragment DeploymentFields on Deployment {\n id\n workspaceID\n kind\n runtime\n alias\n serviceMode\n healthPath\n cronSchedule\n cronPath\n url\n previewUrl\n sshCommand\n aliasHeld\n aliasRevision\n status\n error\n filesCount\n sizeBytes\n size\n spaMode\n gitRepo\n gitCommit\n createdAt\n}`) as unknown as TypedDocumentString<SdkGetDeploymentQuery, SdkGetDeploymentQueryVariables>;\nexport const SdkPollDeploymentDocument = new TypedDocumentString(`\n query SdkPollDeployment($id: ID!) {\n deployment(id: $id) {\n id\n status\n error\n aliasHeld\n url\n previewUrl\n }\n}\n `) as unknown as TypedDocumentString<SdkPollDeploymentQuery, SdkPollDeploymentQueryVariables>;\nexport const SdkGetDeploymentByAliasDocument = new TypedDocumentString(`\n query SdkGetDeploymentByAlias($alias: String!) {\n deploymentByAlias(alias: $alias) {\n ...DeploymentFields\n }\n}\n fragment DeploymentFields on Deployment {\n id\n workspaceID\n kind\n runtime\n alias\n serviceMode\n healthPath\n cronSchedule\n cronPath\n url\n previewUrl\n sshCommand\n aliasHeld\n aliasRevision\n status\n error\n filesCount\n sizeBytes\n size\n spaMode\n gitRepo\n gitCommit\n createdAt\n}`) as unknown as TypedDocumentString<SdkGetDeploymentByAliasQuery, SdkGetDeploymentByAliasQueryVariables>;\nexport const SdkListDeploymentsDocument = new TypedDocumentString(`\n query SdkListDeployments($input: ListDeploymentsInput) {\n deploymentsPage(input: $input) {\n items {\n ...DeploymentFields\n }\n total\n limit\n offset\n hasMore\n nextOffset\n }\n}\n fragment DeploymentFields on Deployment {\n id\n workspaceID\n kind\n runtime\n alias\n serviceMode\n healthPath\n cronSchedule\n cronPath\n url\n previewUrl\n sshCommand\n aliasHeld\n aliasRevision\n status\n error\n filesCount\n sizeBytes\n size\n spaMode\n gitRepo\n gitCommit\n createdAt\n}`) as unknown as TypedDocumentString<SdkListDeploymentsQuery, SdkListDeploymentsQueryVariables>;\nexport const SdkListReleasesDocument = new TypedDocumentString(`\n query SdkListReleases($alias: String!) {\n deploymentReleases(alias: $alias) {\n ...DeploymentFields\n }\n}\n fragment DeploymentFields on Deployment {\n id\n workspaceID\n kind\n runtime\n alias\n serviceMode\n healthPath\n cronSchedule\n cronPath\n url\n previewUrl\n sshCommand\n aliasHeld\n aliasRevision\n status\n error\n filesCount\n sizeBytes\n size\n spaMode\n gitRepo\n gitCommit\n createdAt\n}`) as unknown as TypedDocumentString<SdkListReleasesQuery, SdkListReleasesQueryVariables>;\nexport const SdkRollbackDocument = new TypedDocumentString(`\n mutation SdkRollback($deploymentID: ID!, $expectedCurrentDeploymentID: ID!, $expectedCurrentAliasRevision: String!) {\n rollbackDeployment(\n input: {deploymentID: $deploymentID, expectedCurrentDeploymentID: $expectedCurrentDeploymentID, expectedCurrentAliasRevision: $expectedCurrentAliasRevision}\n ) {\n ...DeploymentFields\n }\n}\n fragment DeploymentFields on Deployment {\n id\n workspaceID\n kind\n runtime\n alias\n serviceMode\n healthPath\n cronSchedule\n cronPath\n url\n previewUrl\n sshCommand\n aliasHeld\n aliasRevision\n status\n error\n filesCount\n sizeBytes\n size\n spaMode\n gitRepo\n gitCommit\n createdAt\n}`) as unknown as TypedDocumentString<SdkRollbackMutation, SdkRollbackMutationVariables>;\nexport const SdkServiceStatusDocument = new TypedDocumentString(`\n query SdkServiceStatus($deploymentID: ID!) {\n serviceStatus(deploymentID: $deploymentID) {\n deploymentID\n alias\n serviceMode\n running\n health\n vmID\n inFlight\n alwaysOn\n memSizeMiB\n startedAt\n lastUsedAt\n lastStoppedAt\n restartCount\n lastError\n }\n}\n `) as unknown as TypedDocumentString<SdkServiceStatusQuery, SdkServiceStatusQueryVariables>;\nexport const SdkServiceLogsDocument = new TypedDocumentString(`\n query SdkServiceLogs($deploymentID: ID!, $tailBytes: Int) {\n serviceLogs(deploymentID: $deploymentID, tailBytes: $tailBytes) {\n deploymentID\n stdout\n stderr\n truncated\n stdoutBytes\n stderrBytes\n tailBytes\n }\n}\n `) as unknown as TypedDocumentString<SdkServiceLogsQuery, SdkServiceLogsQueryVariables>;\nexport const SdkDeploymentEventsDocument = new TypedDocumentString(`\n query SdkDeploymentEvents($deploymentID: ID!, $limit: Int) {\n deploymentEvents(deploymentID: $deploymentID, limit: $limit) {\n id\n deploymentID\n type\n rawType\n severity\n message\n vmID\n createdAt\n }\n}\n `) as unknown as TypedDocumentString<SdkDeploymentEventsQuery, SdkDeploymentEventsQueryVariables>;\nexport const SdkRestartServiceDocument = new TypedDocumentString(`\n mutation SdkRestartService($deploymentID: ID!) {\n restartService(input: {deploymentID: $deploymentID}) {\n deploymentID\n running\n health\n vmID\n restartCount\n lastError\n }\n}\n `) as unknown as TypedDocumentString<SdkRestartServiceMutation, SdkRestartServiceMutationVariables>;\nexport const SdkStopServiceDocument = new TypedDocumentString(`\n mutation SdkStopService($deploymentID: ID!) {\n stopService(input: {deploymentID: $deploymentID}) {\n deploymentID\n running\n health\n vmID\n restartCount\n lastError\n }\n}\n `) as unknown as TypedDocumentString<SdkStopServiceMutation, SdkStopServiceMutationVariables>;\nexport const SdkDeleteDeploymentDocument = new TypedDocumentString(`\n mutation SdkDeleteDeployment($deploymentID: ID!) {\n deleteDeployment(input: {deploymentID: $deploymentID}) {\n ok\n }\n}\n `) as unknown as TypedDocumentString<SdkDeleteDeploymentMutation, SdkDeleteDeploymentMutationVariables>;\nexport const SdkSetWorkspaceEnvDocument = new TypedDocumentString(`\n mutation SdkSetWorkspaceEnv($workspaceID: ID!, $name: String!, $value: String!) {\n setWorkspaceEnv(input: {workspaceID: $workspaceID, name: $name, value: $value}) {\n env {\n name\n value\n secret\n alias\n inherited\n masked\n updatedAt\n }\n }\n}\n `) as unknown as TypedDocumentString<SdkSetWorkspaceEnvMutation, SdkSetWorkspaceEnvMutationVariables>;\nexport const SdkSetWorkspaceSecretDocument = new TypedDocumentString(`\n mutation SdkSetWorkspaceSecret($workspaceID: ID!, $name: String!, $value: String!) {\n setWorkspaceSecret(\n input: {workspaceID: $workspaceID, name: $name, value: $value}\n ) {\n env {\n name\n value\n secret\n alias\n inherited\n masked\n updatedAt\n }\n }\n}\n `) as unknown as TypedDocumentString<SdkSetWorkspaceSecretMutation, SdkSetWorkspaceSecretMutationVariables>;\nexport const SdkDeleteWorkspaceEnvDocument = new TypedDocumentString(`\n mutation SdkDeleteWorkspaceEnv($workspaceID: ID!, $name: String!) {\n deleteWorkspaceEnv(input: {workspaceID: $workspaceID, name: $name}) {\n ok\n }\n}\n `) as unknown as TypedDocumentString<SdkDeleteWorkspaceEnvMutation, SdkDeleteWorkspaceEnvMutationVariables>;\nexport const SdkListWorkspaceEnvDocument = new TypedDocumentString(`\n query SdkListWorkspaceEnv($workspaceID: ID!) {\n workspaceEnv(workspaceID: $workspaceID) {\n name\n value\n secret\n alias\n inherited\n masked\n updatedAt\n }\n}\n `) as unknown as TypedDocumentString<SdkListWorkspaceEnvQuery, SdkListWorkspaceEnvQueryVariables>;\nexport const SdkSetAppEnvDocument = new TypedDocumentString(`\n mutation SdkSetAppEnv($workspaceID: ID!, $alias: String!, $name: String!, $value: String!) {\n setAppEnv(\n input: {workspaceID: $workspaceID, alias: $alias, name: $name, value: $value}\n ) {\n env {\n name\n value\n secret\n alias\n inherited\n masked\n updatedAt\n }\n }\n}\n `) as unknown as TypedDocumentString<SdkSetAppEnvMutation, SdkSetAppEnvMutationVariables>;\nexport const SdkSetAppSecretDocument = new TypedDocumentString(`\n mutation SdkSetAppSecret($workspaceID: ID!, $alias: String!, $name: String!, $value: String!) {\n setAppSecret(\n input: {workspaceID: $workspaceID, alias: $alias, name: $name, value: $value}\n ) {\n env {\n name\n value\n secret\n alias\n inherited\n masked\n updatedAt\n }\n }\n}\n `) as unknown as TypedDocumentString<SdkSetAppSecretMutation, SdkSetAppSecretMutationVariables>;\nexport const SdkRemoveAppEnvDocument = new TypedDocumentString(`\n mutation SdkRemoveAppEnv($workspaceID: ID!, $alias: String!, $name: String!) {\n removeAppEnv(input: {workspaceID: $workspaceID, alias: $alias, name: $name}) {\n ok\n }\n}\n `) as unknown as TypedDocumentString<SdkRemoveAppEnvMutation, SdkRemoveAppEnvMutationVariables>;\nexport const SdkInheritAppEnvDocument = new TypedDocumentString(`\n mutation SdkInheritAppEnv($workspaceID: ID!, $alias: String!, $name: String!) {\n inheritAppEnv(input: {workspaceID: $workspaceID, alias: $alias, name: $name}) {\n ok\n }\n}\n `) as unknown as TypedDocumentString<SdkInheritAppEnvMutation, SdkInheritAppEnvMutationVariables>;\nexport const SdkListAppEnvDocument = new TypedDocumentString(`\n query SdkListAppEnv($workspaceID: ID!, $alias: String!) {\n appEnv(workspaceID: $workspaceID, alias: $alias) {\n name\n value\n secret\n alias\n inherited\n masked\n updatedAt\n }\n}\n `) as unknown as TypedDocumentString<SdkListAppEnvQuery, SdkListAppEnvQueryVariables>;"]}
|
|
1
|
+
{"version":3,"file":"graphql.js","sourceRoot":"","sources":["../../src/generated/graphql.ts"],"names":[],"mappings":"AA0YA,MAAM,OAAO,mBACX,SAAQ,MAAM;IAGd,SAAS,CAAyE;IAC1E,KAAK,CAAS;IACf,QAAQ,CAAmC;IAElD,YAAY,KAAa,EAAE,QAA0C;QACnE,KAAK,CAAC,KAAK,CAAC,CAAC;QACb,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;IAEQ,QAAQ;QACf,OAAO,IAAI,CAAC,KAAK,CAAC;IACpB,CAAC;CACF;AACD,MAAM,CAAC,MAAM,2BAA2B,GAAG,IAAI,mBAAmB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;KA0B9D,EAAE,EAAC,cAAc,EAAC,kBAAkB,EAAC,CAAsE,CAAC;AACjH,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,mBAAmB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;KAyBpD,CAA4E,CAAC;AAClF,MAAM,CAAC,MAAM,0BAA0B,GAAG,IAAI,mBAAmB,CAAC;;;;;;;;;;;;;KAa7D,CAAoG,CAAC;AAC1G,MAAM,CAAC,MAAM,yBAAyB,GAAG,IAAI,mBAAmB,CAAC;;;;;;;;;;;KAW5D,CAA4F,CAAC;AAClG,MAAM,CAAC,MAAM,0BAA0B,GAAG,IAAI,mBAAmB,CAAC;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MAAM,CAAC,MAAM,uBAAuB,GAAG,IAAI,mBAAmB,CAAC;;;;;;;;;;;;;;;;KAgB1D,CAA8F,CAAC;AACpG,MAAM,CAAC,MAAM,uBAAuB,GAAG,IAAI,mBAAmB,CAAC;;;;;;KAM1D,CAA8F,CAAC;AACpG,MAAM,CAAC,MAAM,wBAAwB,GAAG,IAAI,mBAAmB,CAAC;;;;;;KAM3D,CAAgG,CAAC;AACtG,MAAM,CAAC,MAAM,qBAAqB,GAAG,IAAI,mBAAmB,CAAC;;;;;;;;;;;;KAYxD,CAAoF,CAAC","sourcesContent":["/* eslint-disable */\n/** Internal type. DO NOT USE DIRECTLY. */\ntype Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };\n/** Internal type. DO NOT USE DIRECTLY. */\nexport type Incremental<T> = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never };\n/**\n * Inlined from @graphql-typed-document-node/core by scripts/postcodegen.ts so\n * this package ships with zero dependencies, type-only ones included.\n * Structurally identical to the upstream interface.\n */\ninterface DocumentTypeDecoration<TResult, TVariables> {\n __apiType?: (variables: TVariables) => TResult;\n}\n/** A box's requested VM size. Omitted fields use the platform default. */\nexport type BoxResourcesInput = {\n /** Persistent disk in GiB (default 8, max 64). Applies only when the disk is first created; an existing disk keeps its size. */\n diskGiB?: number | null | undefined;\n /** RAM in MiB (default 2048, min 512, max 16384). */\n memMiB?: number | null | undefined;\n /** vCPU count (default 2, max 8). */\n vcpus?: number | null | undefined;\n};\n\n/**\n * Creates a deployment from the workspace's current files. The build is driven by\n * an optional root unfazed.json: STATIC serves the files as-is unless unfazed.json\n * sets build (a command run in the build VM) + output (publish dir, default \"dist\"\n * when build is set; output with no build republishes a committed dir like dist/ as\n * is); SERVICE bundles server.ts by default, or the entry set in unfazed.json.\n * install defaults to \"bun install\" (--frozen-lockfile when a bun lockfile exists).\n */\nexport type CreateDeploymentInput = {\n alias?: string | null | undefined;\n /** BOX only: optional VM size. Omit for the platform defaults. */\n boxResources?: BoxResourcesInput | null | undefined;\n /** Absolute HTTP path the cron tick POSTs to; defaults to /cron when cronSchedule is set. */\n cronPath?: string | null | undefined;\n /**\n * Standard 5-field cron spec (minute hour day-of-month month day-of-week). When\n * set, the platform wakes the SERVICE on each tick with a POST to cronPath\n * (default /cron) carrying header X-Unfz-Trigger: cron and a signed\n * X-Unfz-Cron-Token equal to the service's UNFZ_STATE_TOKEN.\n */\n cronSchedule?: string | null | undefined;\n healthPath?: string | null | undefined;\n /** STATIC (serve files) or SERVICE (run an HTTP server). Classify it yourself: SERVICE if the workspace has server.ts, a go.mod+main.go, or an unfazed.json entry, else STATIC. */\n kind: DeploymentKind;\n /** SERVICE runtime. Omit to auto-detect (a go.mod+main.go is GO, otherwise BUN). Ignored for STATIC. */\n runtime?: ServiceRuntime | null | undefined;\n /** SERVICE only. Omit for ON_DEMAND (the default — sleeps and cold-starts on first request, right for most services). Set ALWAYS_ON only to keep the VM warm. */\n serviceMode?: ServiceMode | null | undefined;\n /** STATIC only: when true, missing paths serve index.html (single-page apps). Ignored for SERVICE. */\n spaMode?: boolean | null | undefined;\n workspaceID: string | number;\n};\n\nexport type CurrentActorKind =\n /** An automated caller using a self-registered bearer token. Subject to free-tier usage/resource limits; a user can claim it to link it to their account. */\n | 'AGENT'\n /** The operator of this Unfazed instance, authenticated with the owner token. Full access, no free-tier limits. */\n | 'OWNER'\n /** A human signed in via GitHub OAuth, who manages their linked agents and apps. */\n | 'USER';\n\nexport type DeployWorkspaceInput = {\n /** Optional public alias; defaults to the workspace's git deploy alias when it was imported. */\n alias?: string | null | undefined;\n /** SERVICE only; defaults to the git source's mode, otherwise ON_DEMAND. */\n serviceMode?: ServiceMode | null | undefined;\n /** STATIC only; overrides the detected SPA fallback. */\n spaMode?: boolean | null | undefined;\n workspaceID: string | number;\n};\n\nexport type DeploymentEventSeverity =\n | 'ERROR'\n | 'INFO'\n | 'WARN';\n\nexport type DeploymentEventType =\n | 'DEPLOYMENT_CREATED'\n | 'DEPLOYMENT_PROMOTION_REJECTED'\n | 'DEPLOYMENT_ROLLED_BACK'\n | 'SERVICE_BOOT_FAILED'\n | 'SERVICE_BUILD_FAILED'\n | 'SERVICE_BUILD_SUCCEEDED'\n | 'SERVICE_CRON_TRIGGERED'\n | 'SERVICE_HEALTH_PROBE_FAILED'\n | 'SERVICE_PROXY_ERROR'\n | 'SERVICE_RESTART_REQUESTED'\n | 'SERVICE_STOP_REQUESTED'\n | 'SERVICE_SUPERVISOR_STARTED'\n | 'SERVICE_SUPERVISOR_STOPPED'\n | 'SERVICE_VM_STARTED'\n | 'SERVICE_VM_START_FAILED'\n | 'SERVICE_VM_STOPPED'\n | 'SERVICE_WATCHDOG_PROBE_FAILED'\n | 'SERVICE_WATCHDOG_RESTART'\n | 'UNKNOWN';\n\nexport type DeploymentKind =\n /** A persistent always-on Linux VM with a per-workspace data disk (docs/agent-box.md). */\n | 'BOX'\n | 'SERVICE'\n | 'STATIC';\n\nexport type DeploymentStatus =\n | 'BUILDING'\n | 'FAILED'\n | 'READY';\n\nexport type ListDeploymentsInput = {\n alias?: string | null | undefined;\n kind?: DeploymentKind | null | undefined;\n limit?: number | null | undefined;\n offset?: number | null | undefined;\n order?: string | null | undefined;\n workspaceID?: string | number | null | undefined;\n};\n\nexport type ListWorkspaceFilesInput = {\n limit?: number | null | undefined;\n offset?: number | null | undefined;\n order?: string | null | undefined;\n workspaceID: string | number;\n};\n\nexport type ReadWorkspaceFileInput = {\n limit?: number | null | undefined;\n offset?: number | null | undefined;\n path: string;\n workspaceID: string | number;\n};\n\nexport type ServiceMode =\n /** Keeps a supervised VM running 24/7 (resource-expensive). Reserve for services that must stay warm (low first-request latency), do background work between requests, or run a frequent cron. */\n | 'ALWAYS_ON'\n /** Default. Sleeps and cold-starts a VM on the first request, then parks it after a short idle period — cheap and right for most services. Use on_demand + cronSchedule for periodic work. */\n | 'ON_DEMAND';\n\nexport type ServiceRuntime =\n /** Default. Bundles a TypeScript/JavaScript entry (server.ts) into a Bun HTTP server. */\n | 'BUN'\n /** Compiles a Go module (go.mod) into a static binary that starts its own HTTP server on $PORT. */\n | 'GO';\n\nexport type DeploymentFieldsFragment = { id: string, workspaceID: string, kind: DeploymentKind, runtime: ServiceRuntime | null, alias: string | null, serviceMode: ServiceMode, healthPath: string | null, cronSchedule: string | null, cronPath: string | null, url: string, previewUrl: string, sshCommand: string | null, aliasHeld: boolean, aliasRevision: string, status: DeploymentStatus, error: string | null, filesCount: number, sizeBytes: number, size: string, spaMode: boolean, gitRepo: string | null, gitCommit: string | null, createdAt: string };\n\nexport type SdkWhoamiQueryVariables = Exact<{ [key: string]: never; }>;\n\n\nexport type SdkWhoamiQuery = { whoami: { kind: CurrentActorKind, userID: string, name: string, agentID: string | null, agentName: string | null, claimed: boolean, claimedBy: string | null, scopes: Array<string>, expiresAt: string | null, usage: { month: string, requests: number, limit: number } | null, resources: { workspaces: number, workspaceLimit: number, services: number, serviceLimit: number } | null } };\n\nexport type SdkCreateWorkspaceMutationVariables = Exact<{\n name: string;\n}>;\n\n\nexport type SdkCreateWorkspaceMutation = { createWorkspace: { workspace: { id: string, name: string, ownerId: string, projectId: string | null, createdAt: string, updatedAt: string } } };\n\nexport type SdkListWorkspacesQueryVariables = Exact<{ [key: string]: never; }>;\n\n\nexport type SdkListWorkspacesQuery = { workspaces: Array<{ id: string, name: string, ownerId: string, projectId: string | null, createdAt: string, updatedAt: string }> };\n\nexport type SdkDeleteWorkspaceMutationVariables = Exact<{\n workspaceID: string | number;\n withDeployments?: boolean | null | undefined;\n}>;\n\n\nexport type SdkDeleteWorkspaceMutation = { deleteWorkspace: { ok: boolean } };\n\nexport type SdkWriteTextFileMutationVariables = Exact<{\n workspaceID: string | number;\n path: string;\n text: string;\n}>;\n\n\nexport type SdkWriteTextFileMutation = { writeWorkspaceTextFile: { file: { path: string, sizeBytes: number, size: string, sha256: string, updatedAt: string } } };\n\nexport type SdkWriteBase64FileMutationVariables = Exact<{\n workspaceID: string | number;\n path: string;\n contentBase64: string;\n}>;\n\n\nexport type SdkWriteBase64FileMutation = { writeWorkspaceBase64File: { file: { path: string, sizeBytes: number, size: string, sha256: string, updatedAt: string } } };\n\nexport type SdkListFilesQueryVariables = Exact<{\n input: ListWorkspaceFilesInput;\n}>;\n\n\nexport type SdkListFilesQuery = { workspaceFilesPage: { total: number, limit: number, offset: number, hasMore: boolean, nextOffset: number | null, items: Array<{ path: string, sizeBytes: number, size: string, sha256: string, updatedAt: string }> } };\n\nexport type SdkReadFileQueryVariables = Exact<{\n input: ReadWorkspaceFileInput;\n}>;\n\n\nexport type SdkReadFileQuery = { readWorkspaceFile: { text: string, offset: number, limit: number, totalBytes: number, truncated: boolean, nextOffset: number | null, file: { path: string, sizeBytes: number, size: string, sha256: string, updatedAt: string } } | null };\n\nexport type SdkDeleteFileMutationVariables = Exact<{\n workspaceID: string | number;\n path: string;\n}>;\n\n\nexport type SdkDeleteFileMutation = { deleteWorkspaceFile: { ok: boolean } };\n\nexport type SdkCreateDeploymentMutationVariables = Exact<{\n input: CreateDeploymentInput;\n}>;\n\n\nexport type SdkCreateDeploymentMutation = { createDeployment: { deployment: { id: string, workspaceID: string, kind: DeploymentKind, runtime: ServiceRuntime | null, alias: string | null, serviceMode: ServiceMode, healthPath: string | null, cronSchedule: string | null, cronPath: string | null, url: string, previewUrl: string, sshCommand: string | null, aliasHeld: boolean, aliasRevision: string, status: DeploymentStatus, error: string | null, filesCount: number, sizeBytes: number, size: string, spaMode: boolean, gitRepo: string | null, gitCommit: string | null, createdAt: string } } };\n\nexport type SdkDeployWorkspaceMutationVariables = Exact<{\n input: DeployWorkspaceInput;\n}>;\n\n\nexport type SdkDeployWorkspaceMutation = { deployWorkspace: { deployment: { id: string, workspaceID: string, kind: DeploymentKind, runtime: ServiceRuntime | null, alias: string | null, serviceMode: ServiceMode, healthPath: string | null, cronSchedule: string | null, cronPath: string | null, url: string, previewUrl: string, sshCommand: string | null, aliasHeld: boolean, aliasRevision: string, status: DeploymentStatus, error: string | null, filesCount: number, sizeBytes: number, size: string, spaMode: boolean, gitRepo: string | null, gitCommit: string | null, createdAt: string } } };\n\nexport type SdkGetDeploymentQueryVariables = Exact<{\n id: string | number;\n}>;\n\n\nexport type SdkGetDeploymentQuery = { deployment: { id: string, workspaceID: string, kind: DeploymentKind, runtime: ServiceRuntime | null, alias: string | null, serviceMode: ServiceMode, healthPath: string | null, cronSchedule: string | null, cronPath: string | null, url: string, previewUrl: string, sshCommand: string | null, aliasHeld: boolean, aliasRevision: string, status: DeploymentStatus, error: string | null, filesCount: number, sizeBytes: number, size: string, spaMode: boolean, gitRepo: string | null, gitCommit: string | null, createdAt: string } | null };\n\nexport type SdkPollDeploymentQueryVariables = Exact<{\n id: string | number;\n}>;\n\n\nexport type SdkPollDeploymentQuery = { deployment: { id: string, status: DeploymentStatus, error: string | null, aliasHeld: boolean, url: string, previewUrl: string } | null };\n\nexport type SdkGetDeploymentByAliasQueryVariables = Exact<{\n alias: string;\n}>;\n\n\nexport type SdkGetDeploymentByAliasQuery = { deploymentByAlias: { id: string, workspaceID: string, kind: DeploymentKind, runtime: ServiceRuntime | null, alias: string | null, serviceMode: ServiceMode, healthPath: string | null, cronSchedule: string | null, cronPath: string | null, url: string, previewUrl: string, sshCommand: string | null, aliasHeld: boolean, aliasRevision: string, status: DeploymentStatus, error: string | null, filesCount: number, sizeBytes: number, size: string, spaMode: boolean, gitRepo: string | null, gitCommit: string | null, createdAt: string } | null };\n\nexport type SdkListDeploymentsQueryVariables = Exact<{\n input?: ListDeploymentsInput | null | undefined;\n}>;\n\n\nexport type SdkListDeploymentsQuery = { deploymentsPage: { total: number, limit: number, offset: number, hasMore: boolean, nextOffset: number | null, items: Array<{ id: string, workspaceID: string, kind: DeploymentKind, runtime: ServiceRuntime | null, alias: string | null, serviceMode: ServiceMode, healthPath: string | null, cronSchedule: string | null, cronPath: string | null, url: string, previewUrl: string, sshCommand: string | null, aliasHeld: boolean, aliasRevision: string, status: DeploymentStatus, error: string | null, filesCount: number, sizeBytes: number, size: string, spaMode: boolean, gitRepo: string | null, gitCommit: string | null, createdAt: string }> } };\n\nexport type SdkListReleasesQueryVariables = Exact<{\n alias: string;\n}>;\n\n\nexport type SdkListReleasesQuery = { deploymentReleases: Array<{ id: string, workspaceID: string, kind: DeploymentKind, runtime: ServiceRuntime | null, alias: string | null, serviceMode: ServiceMode, healthPath: string | null, cronSchedule: string | null, cronPath: string | null, url: string, previewUrl: string, sshCommand: string | null, aliasHeld: boolean, aliasRevision: string, status: DeploymentStatus, error: string | null, filesCount: number, sizeBytes: number, size: string, spaMode: boolean, gitRepo: string | null, gitCommit: string | null, createdAt: string }> };\n\nexport type SdkRollbackMutationVariables = Exact<{\n deploymentID: string | number;\n expectedCurrentDeploymentID: string | number;\n expectedCurrentAliasRevision: string;\n}>;\n\n\nexport type SdkRollbackMutation = { rollbackDeployment: { id: string, workspaceID: string, kind: DeploymentKind, runtime: ServiceRuntime | null, alias: string | null, serviceMode: ServiceMode, healthPath: string | null, cronSchedule: string | null, cronPath: string | null, url: string, previewUrl: string, sshCommand: string | null, aliasHeld: boolean, aliasRevision: string, status: DeploymentStatus, error: string | null, filesCount: number, sizeBytes: number, size: string, spaMode: boolean, gitRepo: string | null, gitCommit: string | null, createdAt: string } };\n\nexport type SdkServiceStatusQueryVariables = Exact<{\n deploymentID: string | number;\n}>;\n\n\nexport type SdkServiceStatusQuery = { serviceStatus: { deploymentID: string, alias: string | null, serviceMode: ServiceMode, running: boolean, health: string, vmID: string | null, inFlight: number, alwaysOn: boolean, memSizeMiB: number, startedAt: string | null, lastUsedAt: string | null, lastStoppedAt: string | null, restartCount: number, lastError: string | null } };\n\nexport type SdkServiceLogsQueryVariables = Exact<{\n deploymentID: string | number;\n tailBytes?: number | null | undefined;\n}>;\n\n\nexport type SdkServiceLogsQuery = { serviceLogs: { deploymentID: string, stdout: string, stderr: string, truncated: boolean, stdoutBytes: number, stderrBytes: number, tailBytes: number } };\n\nexport type SdkDeploymentEventsQueryVariables = Exact<{\n deploymentID: string | number;\n limit?: number | null | undefined;\n}>;\n\n\nexport type SdkDeploymentEventsQuery = { deploymentEvents: Array<{ id: string, deploymentID: string, type: DeploymentEventType, rawType: string, severity: DeploymentEventSeverity, message: string, vmID: string | null, createdAt: string }> };\n\nexport type SdkRestartServiceMutationVariables = Exact<{\n deploymentID: string | number;\n}>;\n\n\nexport type SdkRestartServiceMutation = { restartService: { deploymentID: string, running: boolean, health: string, vmID: string | null, restartCount: number, lastError: string | null } };\n\nexport type SdkStopServiceMutationVariables = Exact<{\n deploymentID: string | number;\n}>;\n\n\nexport type SdkStopServiceMutation = { stopService: { deploymentID: string, running: boolean, health: string, vmID: string | null, restartCount: number, lastError: string | null } };\n\nexport type SdkDeleteDeploymentMutationVariables = Exact<{\n deploymentID: string | number;\n}>;\n\n\nexport type SdkDeleteDeploymentMutation = { deleteDeployment: { ok: boolean } };\n\nexport type SdkSetWorkspaceEnvMutationVariables = Exact<{\n workspaceID: string | number;\n name: string;\n value: string;\n}>;\n\n\nexport type SdkSetWorkspaceEnvMutation = { setWorkspaceEnv: { env: { name: string, value: string | null, secret: boolean, alias: string | null, inherited: boolean, masked: boolean, updatedAt: string } } };\n\nexport type SdkSetWorkspaceSecretMutationVariables = Exact<{\n workspaceID: string | number;\n name: string;\n value: string;\n}>;\n\n\nexport type SdkSetWorkspaceSecretMutation = { setWorkspaceSecret: { env: { name: string, value: string | null, secret: boolean, alias: string | null, inherited: boolean, masked: boolean, updatedAt: string } } };\n\nexport type SdkDeleteWorkspaceEnvMutationVariables = Exact<{\n workspaceID: string | number;\n name: string;\n}>;\n\n\nexport type SdkDeleteWorkspaceEnvMutation = { deleteWorkspaceEnv: { ok: boolean } };\n\nexport type SdkListWorkspaceEnvQueryVariables = Exact<{\n workspaceID: string | number;\n}>;\n\n\nexport type SdkListWorkspaceEnvQuery = { workspaceEnv: Array<{ name: string, value: string | null, secret: boolean, alias: string | null, inherited: boolean, masked: boolean, updatedAt: string }> };\n\nexport type SdkSetAppEnvMutationVariables = Exact<{\n workspaceID: string | number;\n alias: string;\n name: string;\n value: string;\n}>;\n\n\nexport type SdkSetAppEnvMutation = { setAppEnv: { env: { name: string, value: string | null, secret: boolean, alias: string | null, inherited: boolean, masked: boolean, updatedAt: string } } };\n\nexport type SdkSetAppSecretMutationVariables = Exact<{\n workspaceID: string | number;\n alias: string;\n name: string;\n value: string;\n}>;\n\n\nexport type SdkSetAppSecretMutation = { setAppSecret: { env: { name: string, value: string | null, secret: boolean, alias: string | null, inherited: boolean, masked: boolean, updatedAt: string } } };\n\nexport type SdkRemoveAppEnvMutationVariables = Exact<{\n workspaceID: string | number;\n alias: string;\n name: string;\n}>;\n\n\nexport type SdkRemoveAppEnvMutation = { removeAppEnv: { ok: boolean } };\n\nexport type SdkInheritAppEnvMutationVariables = Exact<{\n workspaceID: string | number;\n alias: string;\n name: string;\n}>;\n\n\nexport type SdkInheritAppEnvMutation = { inheritAppEnv: { ok: boolean } };\n\nexport type SdkListAppEnvQueryVariables = Exact<{\n workspaceID: string | number;\n alias: string;\n}>;\n\n\nexport type SdkListAppEnvQuery = { appEnv: Array<{ name: string, value: string | null, secret: boolean, alias: string | null, inherited: boolean, masked: boolean, updatedAt: string }> };\n\nexport class TypedDocumentString<TResult, TVariables>\n extends String\n implements DocumentTypeDecoration<TResult, TVariables>\n{\n __apiType?: NonNullable<DocumentTypeDecoration<TResult, TVariables>['__apiType']>;\n private value: string;\n public __meta__?: Record<string, any> | undefined;\n\n constructor(value: string, __meta__?: Record<string, any> | undefined) {\n super(value);\n this.value = value;\n this.__meta__ = __meta__;\n }\n\n override toString(): string & DocumentTypeDecoration<TResult, TVariables> {\n return this.value;\n }\n}\nexport const DeploymentFieldsFragmentDoc = new TypedDocumentString(`\n fragment DeploymentFields on Deployment {\n id\n workspaceID\n kind\n runtime\n alias\n serviceMode\n healthPath\n cronSchedule\n cronPath\n url\n previewUrl\n sshCommand\n aliasHeld\n aliasRevision\n status\n error\n filesCount\n sizeBytes\n size\n spaMode\n gitRepo\n gitCommit\n createdAt\n}\n `, {\"fragmentName\":\"DeploymentFields\"}) as unknown as TypedDocumentString<DeploymentFieldsFragment, unknown>;\nexport const SdkWhoamiDocument = new TypedDocumentString(`\n query SdkWhoami {\n whoami {\n kind\n userID\n name\n agentID\n agentName\n claimed\n claimedBy\n scopes\n expiresAt\n usage {\n month\n requests\n limit\n }\n resources {\n workspaces\n workspaceLimit\n services\n serviceLimit\n }\n }\n}\n `) as unknown as TypedDocumentString<SdkWhoamiQuery, SdkWhoamiQueryVariables>;\nexport const SdkCreateWorkspaceDocument = new TypedDocumentString(`\n mutation SdkCreateWorkspace($name: String!) {\n createWorkspace(input: {name: $name}) {\n workspace {\n id\n name\n ownerId\n projectId\n createdAt\n updatedAt\n }\n }\n}\n `) as unknown as TypedDocumentString<SdkCreateWorkspaceMutation, SdkCreateWorkspaceMutationVariables>;\nexport const SdkListWorkspacesDocument = new TypedDocumentString(`\n query SdkListWorkspaces {\n workspaces {\n id\n name\n ownerId\n projectId\n createdAt\n updatedAt\n }\n}\n `) as unknown as TypedDocumentString<SdkListWorkspacesQuery, SdkListWorkspacesQueryVariables>;\nexport const SdkDeleteWorkspaceDocument = new TypedDocumentString(`\n mutation SdkDeleteWorkspace($workspaceID: ID!, $withDeployments: Boolean) {\n deleteWorkspace(\n input: {workspaceID: $workspaceID, withDeployments: $withDeployments}\n ) {\n ok\n }\n}\n `) as unknown as TypedDocumentString<SdkDeleteWorkspaceMutation, SdkDeleteWorkspaceMutationVariables>;\nexport const SdkWriteTextFileDocument = new TypedDocumentString(`\n mutation SdkWriteTextFile($workspaceID: ID!, $path: String!, $text: String!) {\n writeWorkspaceTextFile(\n input: {workspaceID: $workspaceID, path: $path, text: $text}\n ) {\n file {\n path\n sizeBytes\n size\n sha256\n updatedAt\n }\n }\n}\n `) as unknown as TypedDocumentString<SdkWriteTextFileMutation, SdkWriteTextFileMutationVariables>;\nexport const SdkWriteBase64FileDocument = new TypedDocumentString(`\n mutation SdkWriteBase64File($workspaceID: ID!, $path: String!, $contentBase64: String!) {\n writeWorkspaceBase64File(\n input: {workspaceID: $workspaceID, path: $path, contentBase64: $contentBase64}\n ) {\n file {\n path\n sizeBytes\n size\n sha256\n updatedAt\n }\n }\n}\n `) as unknown as TypedDocumentString<SdkWriteBase64FileMutation, SdkWriteBase64FileMutationVariables>;\nexport const SdkListFilesDocument = new TypedDocumentString(`\n query SdkListFiles($input: ListWorkspaceFilesInput!) {\n workspaceFilesPage(input: $input) {\n items {\n path\n sizeBytes\n size\n sha256\n updatedAt\n }\n total\n limit\n offset\n hasMore\n nextOffset\n }\n}\n `) as unknown as TypedDocumentString<SdkListFilesQuery, SdkListFilesQueryVariables>;\nexport const SdkReadFileDocument = new TypedDocumentString(`\n query SdkReadFile($input: ReadWorkspaceFileInput!) {\n readWorkspaceFile(input: $input) {\n text\n offset\n limit\n totalBytes\n truncated\n nextOffset\n file {\n path\n sizeBytes\n size\n sha256\n updatedAt\n }\n }\n}\n `) as unknown as TypedDocumentString<SdkReadFileQuery, SdkReadFileQueryVariables>;\nexport const SdkDeleteFileDocument = new TypedDocumentString(`\n mutation SdkDeleteFile($workspaceID: ID!, $path: String!) {\n deleteWorkspaceFile(input: {workspaceID: $workspaceID, path: $path}) {\n ok\n }\n}\n `) as unknown as TypedDocumentString<SdkDeleteFileMutation, SdkDeleteFileMutationVariables>;\nexport const SdkCreateDeploymentDocument = new TypedDocumentString(`\n mutation SdkCreateDeployment($input: CreateDeploymentInput!) {\n createDeployment(input: $input) {\n deployment {\n ...DeploymentFields\n }\n }\n}\n fragment DeploymentFields on Deployment {\n id\n workspaceID\n kind\n runtime\n alias\n serviceMode\n healthPath\n cronSchedule\n cronPath\n url\n previewUrl\n sshCommand\n aliasHeld\n aliasRevision\n status\n error\n filesCount\n sizeBytes\n size\n spaMode\n gitRepo\n gitCommit\n createdAt\n}`) as unknown as TypedDocumentString<SdkCreateDeploymentMutation, SdkCreateDeploymentMutationVariables>;\nexport const SdkDeployWorkspaceDocument = new TypedDocumentString(`\n mutation SdkDeployWorkspace($input: DeployWorkspaceInput!) {\n deployWorkspace(input: $input) {\n deployment {\n ...DeploymentFields\n }\n }\n}\n fragment DeploymentFields on Deployment {\n id\n workspaceID\n kind\n runtime\n alias\n serviceMode\n healthPath\n cronSchedule\n cronPath\n url\n previewUrl\n sshCommand\n aliasHeld\n aliasRevision\n status\n error\n filesCount\n sizeBytes\n size\n spaMode\n gitRepo\n gitCommit\n createdAt\n}`) as unknown as TypedDocumentString<SdkDeployWorkspaceMutation, SdkDeployWorkspaceMutationVariables>;\nexport const SdkGetDeploymentDocument = new TypedDocumentString(`\n query SdkGetDeployment($id: ID!) {\n deployment(id: $id) {\n ...DeploymentFields\n }\n}\n fragment DeploymentFields on Deployment {\n id\n workspaceID\n kind\n runtime\n alias\n serviceMode\n healthPath\n cronSchedule\n cronPath\n url\n previewUrl\n sshCommand\n aliasHeld\n aliasRevision\n status\n error\n filesCount\n sizeBytes\n size\n spaMode\n gitRepo\n gitCommit\n createdAt\n}`) as unknown as TypedDocumentString<SdkGetDeploymentQuery, SdkGetDeploymentQueryVariables>;\nexport const SdkPollDeploymentDocument = new TypedDocumentString(`\n query SdkPollDeployment($id: ID!) {\n deployment(id: $id) {\n id\n status\n error\n aliasHeld\n url\n previewUrl\n }\n}\n `) as unknown as TypedDocumentString<SdkPollDeploymentQuery, SdkPollDeploymentQueryVariables>;\nexport const SdkGetDeploymentByAliasDocument = new TypedDocumentString(`\n query SdkGetDeploymentByAlias($alias: String!) {\n deploymentByAlias(alias: $alias) {\n ...DeploymentFields\n }\n}\n fragment DeploymentFields on Deployment {\n id\n workspaceID\n kind\n runtime\n alias\n serviceMode\n healthPath\n cronSchedule\n cronPath\n url\n previewUrl\n sshCommand\n aliasHeld\n aliasRevision\n status\n error\n filesCount\n sizeBytes\n size\n spaMode\n gitRepo\n gitCommit\n createdAt\n}`) as unknown as TypedDocumentString<SdkGetDeploymentByAliasQuery, SdkGetDeploymentByAliasQueryVariables>;\nexport const SdkListDeploymentsDocument = new TypedDocumentString(`\n query SdkListDeployments($input: ListDeploymentsInput) {\n deploymentsPage(input: $input) {\n items {\n ...DeploymentFields\n }\n total\n limit\n offset\n hasMore\n nextOffset\n }\n}\n fragment DeploymentFields on Deployment {\n id\n workspaceID\n kind\n runtime\n alias\n serviceMode\n healthPath\n cronSchedule\n cronPath\n url\n previewUrl\n sshCommand\n aliasHeld\n aliasRevision\n status\n error\n filesCount\n sizeBytes\n size\n spaMode\n gitRepo\n gitCommit\n createdAt\n}`) as unknown as TypedDocumentString<SdkListDeploymentsQuery, SdkListDeploymentsQueryVariables>;\nexport const SdkListReleasesDocument = new TypedDocumentString(`\n query SdkListReleases($alias: String!) {\n deploymentReleases(alias: $alias) {\n ...DeploymentFields\n }\n}\n fragment DeploymentFields on Deployment {\n id\n workspaceID\n kind\n runtime\n alias\n serviceMode\n healthPath\n cronSchedule\n cronPath\n url\n previewUrl\n sshCommand\n aliasHeld\n aliasRevision\n status\n error\n filesCount\n sizeBytes\n size\n spaMode\n gitRepo\n gitCommit\n createdAt\n}`) as unknown as TypedDocumentString<SdkListReleasesQuery, SdkListReleasesQueryVariables>;\nexport const SdkRollbackDocument = new TypedDocumentString(`\n mutation SdkRollback($deploymentID: ID!, $expectedCurrentDeploymentID: ID!, $expectedCurrentAliasRevision: String!) {\n rollbackDeployment(\n input: {deploymentID: $deploymentID, expectedCurrentDeploymentID: $expectedCurrentDeploymentID, expectedCurrentAliasRevision: $expectedCurrentAliasRevision}\n ) {\n ...DeploymentFields\n }\n}\n fragment DeploymentFields on Deployment {\n id\n workspaceID\n kind\n runtime\n alias\n serviceMode\n healthPath\n cronSchedule\n cronPath\n url\n previewUrl\n sshCommand\n aliasHeld\n aliasRevision\n status\n error\n filesCount\n sizeBytes\n size\n spaMode\n gitRepo\n gitCommit\n createdAt\n}`) as unknown as TypedDocumentString<SdkRollbackMutation, SdkRollbackMutationVariables>;\nexport const SdkServiceStatusDocument = new TypedDocumentString(`\n query SdkServiceStatus($deploymentID: ID!) {\n serviceStatus(deploymentID: $deploymentID) {\n deploymentID\n alias\n serviceMode\n running\n health\n vmID\n inFlight\n alwaysOn\n memSizeMiB\n startedAt\n lastUsedAt\n lastStoppedAt\n restartCount\n lastError\n }\n}\n `) as unknown as TypedDocumentString<SdkServiceStatusQuery, SdkServiceStatusQueryVariables>;\nexport const SdkServiceLogsDocument = new TypedDocumentString(`\n query SdkServiceLogs($deploymentID: ID!, $tailBytes: Int) {\n serviceLogs(deploymentID: $deploymentID, tailBytes: $tailBytes) {\n deploymentID\n stdout\n stderr\n truncated\n stdoutBytes\n stderrBytes\n tailBytes\n }\n}\n `) as unknown as TypedDocumentString<SdkServiceLogsQuery, SdkServiceLogsQueryVariables>;\nexport const SdkDeploymentEventsDocument = new TypedDocumentString(`\n query SdkDeploymentEvents($deploymentID: ID!, $limit: Int) {\n deploymentEvents(deploymentID: $deploymentID, limit: $limit) {\n id\n deploymentID\n type\n rawType\n severity\n message\n vmID\n createdAt\n }\n}\n `) as unknown as TypedDocumentString<SdkDeploymentEventsQuery, SdkDeploymentEventsQueryVariables>;\nexport const SdkRestartServiceDocument = new TypedDocumentString(`\n mutation SdkRestartService($deploymentID: ID!) {\n restartService(input: {deploymentID: $deploymentID}) {\n deploymentID\n running\n health\n vmID\n restartCount\n lastError\n }\n}\n `) as unknown as TypedDocumentString<SdkRestartServiceMutation, SdkRestartServiceMutationVariables>;\nexport const SdkStopServiceDocument = new TypedDocumentString(`\n mutation SdkStopService($deploymentID: ID!) {\n stopService(input: {deploymentID: $deploymentID}) {\n deploymentID\n running\n health\n vmID\n restartCount\n lastError\n }\n}\n `) as unknown as TypedDocumentString<SdkStopServiceMutation, SdkStopServiceMutationVariables>;\nexport const SdkDeleteDeploymentDocument = new TypedDocumentString(`\n mutation SdkDeleteDeployment($deploymentID: ID!) {\n deleteDeployment(input: {deploymentID: $deploymentID}) {\n ok\n }\n}\n `) as unknown as TypedDocumentString<SdkDeleteDeploymentMutation, SdkDeleteDeploymentMutationVariables>;\nexport const SdkSetWorkspaceEnvDocument = new TypedDocumentString(`\n mutation SdkSetWorkspaceEnv($workspaceID: ID!, $name: String!, $value: String!) {\n setWorkspaceEnv(input: {workspaceID: $workspaceID, name: $name, value: $value}) {\n env {\n name\n value\n secret\n alias\n inherited\n masked\n updatedAt\n }\n }\n}\n `) as unknown as TypedDocumentString<SdkSetWorkspaceEnvMutation, SdkSetWorkspaceEnvMutationVariables>;\nexport const SdkSetWorkspaceSecretDocument = new TypedDocumentString(`\n mutation SdkSetWorkspaceSecret($workspaceID: ID!, $name: String!, $value: String!) {\n setWorkspaceSecret(\n input: {workspaceID: $workspaceID, name: $name, value: $value}\n ) {\n env {\n name\n value\n secret\n alias\n inherited\n masked\n updatedAt\n }\n }\n}\n `) as unknown as TypedDocumentString<SdkSetWorkspaceSecretMutation, SdkSetWorkspaceSecretMutationVariables>;\nexport const SdkDeleteWorkspaceEnvDocument = new TypedDocumentString(`\n mutation SdkDeleteWorkspaceEnv($workspaceID: ID!, $name: String!) {\n deleteWorkspaceEnv(input: {workspaceID: $workspaceID, name: $name}) {\n ok\n }\n}\n `) as unknown as TypedDocumentString<SdkDeleteWorkspaceEnvMutation, SdkDeleteWorkspaceEnvMutationVariables>;\nexport const SdkListWorkspaceEnvDocument = new TypedDocumentString(`\n query SdkListWorkspaceEnv($workspaceID: ID!) {\n workspaceEnv(workspaceID: $workspaceID) {\n name\n value\n secret\n alias\n inherited\n masked\n updatedAt\n }\n}\n `) as unknown as TypedDocumentString<SdkListWorkspaceEnvQuery, SdkListWorkspaceEnvQueryVariables>;\nexport const SdkSetAppEnvDocument = new TypedDocumentString(`\n mutation SdkSetAppEnv($workspaceID: ID!, $alias: String!, $name: String!, $value: String!) {\n setAppEnv(\n input: {workspaceID: $workspaceID, alias: $alias, name: $name, value: $value}\n ) {\n env {\n name\n value\n secret\n alias\n inherited\n masked\n updatedAt\n }\n }\n}\n `) as unknown as TypedDocumentString<SdkSetAppEnvMutation, SdkSetAppEnvMutationVariables>;\nexport const SdkSetAppSecretDocument = new TypedDocumentString(`\n mutation SdkSetAppSecret($workspaceID: ID!, $alias: String!, $name: String!, $value: String!) {\n setAppSecret(\n input: {workspaceID: $workspaceID, alias: $alias, name: $name, value: $value}\n ) {\n env {\n name\n value\n secret\n alias\n inherited\n masked\n updatedAt\n }\n }\n}\n `) as unknown as TypedDocumentString<SdkSetAppSecretMutation, SdkSetAppSecretMutationVariables>;\nexport const SdkRemoveAppEnvDocument = new TypedDocumentString(`\n mutation SdkRemoveAppEnv($workspaceID: ID!, $alias: String!, $name: String!) {\n removeAppEnv(input: {workspaceID: $workspaceID, alias: $alias, name: $name}) {\n ok\n }\n}\n `) as unknown as TypedDocumentString<SdkRemoveAppEnvMutation, SdkRemoveAppEnvMutationVariables>;\nexport const SdkInheritAppEnvDocument = new TypedDocumentString(`\n mutation SdkInheritAppEnv($workspaceID: ID!, $alias: String!, $name: String!) {\n inheritAppEnv(input: {workspaceID: $workspaceID, alias: $alias, name: $name}) {\n ok\n }\n}\n `) as unknown as TypedDocumentString<SdkInheritAppEnvMutation, SdkInheritAppEnvMutationVariables>;\nexport const SdkListAppEnvDocument = new TypedDocumentString(`\n query SdkListAppEnv($workspaceID: ID!, $alias: String!) {\n appEnv(workspaceID: $workspaceID, alias: $alias) {\n name\n value\n secret\n alias\n inherited\n masked\n updatedAt\n }\n}\n `) as unknown as TypedDocumentString<SdkListAppEnvQuery, SdkListAppEnvQueryVariables>;"]}
|
package/dist/index.d.ts
CHANGED
|
@@ -22,10 +22,10 @@
|
|
|
22
22
|
* - {@link UnfazedClient} — the typed GraphQL transport, for anything not wrapped.
|
|
23
23
|
*/
|
|
24
24
|
export { Unfazed } from "./unfazed.js";
|
|
25
|
-
export type { Deployment, DeployBoxOptions, DeployOptions, DeployServiceOptions, DeployStaticOptions, EnvVar, FileContent, FilesMap, RollbackOptions, UnfazedOptions, WorkspaceFile, WriteFilesOptions, } from "./unfazed.js";
|
|
25
|
+
export type { DeleteDeploymentOptions, DeleteWorkspaceOptions, Deployment, DeployBoxOptions, DeployOptions, DeployServiceOptions, DeployStaticOptions, EnvVar, FileContent, FilesMap, RollbackOptions, UnfazedOptions, Workspace, WorkspaceFile, WriteFilesOptions, } from "./unfazed.js";
|
|
26
26
|
export { UnfazedClient, DEFAULT_BASE_URL, DEFAULT_ENDPOINT, ENDPOINT_ENV_VAR, GRAPHQL_PATH, TOKEN_ENV_VAR, VERSION, } from "./client.js";
|
|
27
27
|
export type { ClientOptions, FetchLike, GraphQLDocument, RequestOptions, ResultOf, VariablesOf, } from "./client.js";
|
|
28
|
-
export { UnfazedAuthError, UnfazedConfigError, UnfazedConflictError, UnfazedDeployError, UnfazedError, UnfazedGraphQLError, UnfazedHTTPError, UnfazedNotFoundError, UnfazedTimeoutError, } from "./errors.js";
|
|
28
|
+
export { DEPLOYMENT_NOT_FOUND, UnfazedAuthError, UnfazedConfigError, UnfazedConflictError, UnfazedDeployError, UnfazedError, UnfazedGraphQLError, UnfazedHTTPError, UnfazedNotFoundError, UnfazedTimeoutError, WORKSPACE_NOT_FOUND, isDuplicateWorkspaceName, isNotFoundSentinel, } from "./errors.js";
|
|
29
29
|
export type { GraphQLResponseError } from "./errors.js";
|
|
30
30
|
export type { WaitOptions } from "./wait.js";
|
|
31
31
|
/**
|
package/dist/index.js
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
*/
|
|
24
24
|
export { Unfazed } from "./unfazed.js";
|
|
25
25
|
export { UnfazedClient, DEFAULT_BASE_URL, DEFAULT_ENDPOINT, ENDPOINT_ENV_VAR, GRAPHQL_PATH, TOKEN_ENV_VAR, VERSION, } from "./client.js";
|
|
26
|
-
export { UnfazedAuthError, UnfazedConfigError, UnfazedConflictError, UnfazedDeployError, UnfazedError, UnfazedGraphQLError, UnfazedHTTPError, UnfazedNotFoundError, UnfazedTimeoutError, } from "./errors.js";
|
|
26
|
+
export { DEPLOYMENT_NOT_FOUND, UnfazedAuthError, UnfazedConfigError, UnfazedConflictError, UnfazedDeployError, UnfazedError, UnfazedGraphQLError, UnfazedHTTPError, UnfazedNotFoundError, UnfazedTimeoutError, WORKSPACE_NOT_FOUND, isDuplicateWorkspaceName, isNotFoundSentinel, } from "./errors.js";
|
|
27
27
|
/**
|
|
28
28
|
* Every operation document the workflow layer uses, for callers that want the
|
|
29
29
|
* typed documents but not the wrapper methods.
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAmBvC,OAAO,EACL,aAAa,EACb,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,EACZ,aAAa,EACb,OAAO,GACR,MAAM,aAAa,CAAC;AAUrB,OAAO,EACL,oBAAoB,EACpB,gBAAgB,EAChB,kBAAkB,EAClB,oBAAoB,EACpB,kBAAkB,EAClB,YAAY,EACZ,mBAAmB,EACnB,gBAAgB,EAChB,oBAAoB,EACpB,mBAAmB,EACnB,mBAAmB,EACnB,wBAAwB,EACxB,kBAAkB,GACnB,MAAM,aAAa,CAAC;AAKrB;;;GAGG;AACH,OAAO,KAAK,UAAU,MAAM,iBAAiB,CAAC","sourcesContent":["/**\n * unfazed — official TypeScript SDK.\n *\n * The code-mode companion to the unfazed MCP server: write one script that\n * deploys, waits, reads logs and filters them locally, instead of chaining a\n * dozen tool calls through a model's context.\n *\n * ```ts\n * import { Unfazed } from \"unfazed\";\n *\n * const unfazed = new Unfazed(); // reads UNFZ_API_TOKEN\n * const ws = await unfazed.createWorkspace(\"hello\");\n * await unfazed.writeFiles(ws.id, {\n * \"server.ts\": `export default { fetch: () => new Response(\"hi\") }`,\n * });\n * const app = await unfazed.deployService({ workspaceId: ws.id, alias: \"hello\", wait: true });\n * console.log(app.url);\n * ```\n *\n * Two layers, both public:\n * - {@link Unfazed} — the workflow layer (deploy + wait, batch writes, one-call rollback).\n * - {@link UnfazedClient} — the typed GraphQL transport, for anything not wrapped.\n */\n\nexport { Unfazed } from \"./unfazed.js\";\nexport type {\n DeleteDeploymentOptions,\n DeleteWorkspaceOptions,\n Deployment,\n DeployBoxOptions,\n DeployOptions,\n DeployServiceOptions,\n DeployStaticOptions,\n EnvVar,\n FileContent,\n FilesMap,\n RollbackOptions,\n UnfazedOptions,\n Workspace,\n WorkspaceFile,\n WriteFilesOptions,\n} from \"./unfazed.js\";\n\nexport {\n UnfazedClient,\n DEFAULT_BASE_URL,\n DEFAULT_ENDPOINT,\n ENDPOINT_ENV_VAR,\n GRAPHQL_PATH,\n TOKEN_ENV_VAR,\n VERSION,\n} from \"./client.js\";\nexport type {\n ClientOptions,\n FetchLike,\n GraphQLDocument,\n RequestOptions,\n ResultOf,\n VariablesOf,\n} from \"./client.js\";\n\nexport {\n DEPLOYMENT_NOT_FOUND,\n UnfazedAuthError,\n UnfazedConfigError,\n UnfazedConflictError,\n UnfazedDeployError,\n UnfazedError,\n UnfazedGraphQLError,\n UnfazedHTTPError,\n UnfazedNotFoundError,\n UnfazedTimeoutError,\n WORKSPACE_NOT_FOUND,\n isDuplicateWorkspaceName,\n isNotFoundSentinel,\n} from \"./errors.js\";\nexport type { GraphQLResponseError } from \"./errors.js\";\n\nexport type { WaitOptions } from \"./wait.js\";\n\n/**\n * Every operation document the workflow layer uses, for callers that want the\n * typed documents but not the wrapper methods.\n */\nexport * as operations from \"./operations.js\";\n\n/**\n * Schema types generated from the platform's `graph/schema.graphqls`: enums\n * (`DeploymentStatus`, `ServiceMode`, ...), input objects\n * (`CreateDeploymentInput`, ...) and every operation's result type.\n */\nexport type * from \"./generated/graphql.js\";\n"]}
|
package/dist/operations.d.ts
CHANGED
|
@@ -15,8 +15,18 @@ export declare const CreateWorkspaceDocument: import("./index.js").TypedDocument
|
|
|
15
15
|
export declare const ListWorkspacesDocument: import("./index.js").TypedDocumentString<import("./index.js").SdkListWorkspacesQuery, {
|
|
16
16
|
[x: string]: never;
|
|
17
17
|
}>;
|
|
18
|
+
/**
|
|
19
|
+
* Deleting a workspace, with the deployment cascade made explicit.
|
|
20
|
+
*
|
|
21
|
+
* `withDeployments` is not decoration: without it the server REFUSES while the
|
|
22
|
+
* workspace has any deployment history at all — including FAILED records —
|
|
23
|
+
* with `workspace %q still has deployments; delete them first`. A workspace
|
|
24
|
+
* that was ever deployed is therefore undeletable through the bare mutation,
|
|
25
|
+
* so the SDK always sends the flag and lets the caller choose the value.
|
|
26
|
+
*/
|
|
18
27
|
export declare const DeleteWorkspaceDocument: import("./index.js").TypedDocumentString<import("./index.js").SdkDeleteWorkspaceMutation, {
|
|
19
28
|
workspaceID: string | number;
|
|
29
|
+
withDeployments?: boolean | null | undefined | undefined;
|
|
20
30
|
}>;
|
|
21
31
|
export declare const WriteTextFileDocument: import("./index.js").TypedDocumentString<import("./index.js").SdkWriteTextFileMutation, {
|
|
22
32
|
workspaceID: string | number;
|
package/dist/operations.js
CHANGED
|
@@ -97,9 +97,18 @@ export const ListWorkspacesDocument = graphql(`
|
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
99
|
`);
|
|
100
|
+
/**
|
|
101
|
+
* Deleting a workspace, with the deployment cascade made explicit.
|
|
102
|
+
*
|
|
103
|
+
* `withDeployments` is not decoration: without it the server REFUSES while the
|
|
104
|
+
* workspace has any deployment history at all — including FAILED records —
|
|
105
|
+
* with `workspace %q still has deployments; delete them first`. A workspace
|
|
106
|
+
* that was ever deployed is therefore undeletable through the bare mutation,
|
|
107
|
+
* so the SDK always sends the flag and lets the caller choose the value.
|
|
108
|
+
*/
|
|
100
109
|
export const DeleteWorkspaceDocument = graphql(`
|
|
101
|
-
mutation SdkDeleteWorkspace($workspaceID: ID
|
|
102
|
-
deleteWorkspace(input: { workspaceID: $workspaceID }) {
|
|
110
|
+
mutation SdkDeleteWorkspace($workspaceID: ID!, $withDeployments: Boolean) {
|
|
111
|
+
deleteWorkspace(input: { workspaceID: $workspaceID, withDeployments: $withDeployments }) {
|
|
103
112
|
ok
|
|
104
113
|
}
|
|
105
114
|
}
|
package/dist/operations.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operations.js","sourceRoot":"","sources":["../src/operations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAE7C;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;CA0B/C,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,cAAc,GAAG,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;CAyBrC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,uBAAuB,GAAG,OAAO,CAAC;;;;;;;;;;;;;CAa9C,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,sBAAsB,GAAG,OAAO,CAAC;;;;;;;;;;;CAW7C,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,uBAAuB,GAAG,OAAO,CAAC;;;;;;CAM9C,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,qBAAqB,GAAG,OAAO,CAAC;;;;;;;;;;;;CAY5C,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,uBAAuB,GAAG,OAAO,CAAC;;;;;;;;;;;;;;CAc9C,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,iBAAiB,GAAG,OAAO,CAAC;;;;;;;;;;;;;;;;;CAiBxC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,gBAAgB,GAAG,OAAO,CAAC;;;;;;;;;;;;;;;;;;CAkBvC,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,CAAC,CAAC;AAEH;;;;;;;4EAO4E;AAE5E,MAAM,CAAC,MAAM,uBAAuB,GAAG,OAAO,CAAC;;;;;;;;;;;;;;CAc9C,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,0BAA0B,GAAG,OAAO,CAAC;;;;;;;;;;;;;;CAcjD,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,0BAA0B,GAAG,OAAO,CAAC;;;;;;CAMjD,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,wBAAwB,GAAG,OAAO,CAAC;;;;;;;;;;;;CAY/C,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,iBAAiB,GAAG,OAAO,CAAC;;;;;;;;;;;;;;CAcxC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,oBAAoB,GAAG,OAAO,CAAC;;;;;;;;;;;;;;CAc3C,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,oBAAoB,GAAG,OAAO,CAAC;;;;;;CAM3C,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,qBAAqB,GAAG,OAAO,CAAC;;;;;;CAM5C,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,kBAAkB,GAAG,OAAO,CAAC;;;;;;;;;;;;CAYzC,CAAC,CAAC","sourcesContent":["/**\n * Every GraphQL document the workflow layer sends.\n *\n * These are wrapped in `graphql(...)` so graphql-codegen validates them\n * against the vendored schema at codegen time and emits exact result/variable\n * types. A field that stops existing server-side turns into a compile error\n * here rather than a runtime surprise in an agent's script.\n *\n * The one document NOT defined here is the batched file write: it has a\n * variable number of aliased root fields, so it is assembled at runtime in\n * `unfazed.ts`. See the comment there.\n */\nimport { graphql } from \"./generated/gql.js\";\n\n/**\n * Deployment fields the SDK returns everywhere.\n *\n * `id` + `aliasRevision` + `aliasHeld` are the rollback compare-and-swap\n * triple; `previewUrl` is the immutable by-id URL you can verify BEFORE the\n * alias moves; `error` carries the build failure text when status is FAILED.\n */\nexport const DeploymentFieldsFragment = graphql(`\n fragment DeploymentFields on Deployment {\n id\n workspaceID\n kind\n runtime\n alias\n serviceMode\n healthPath\n cronSchedule\n cronPath\n url\n previewUrl\n sshCommand\n aliasHeld\n aliasRevision\n status\n error\n filesCount\n sizeBytes\n size\n spaMode\n gitRepo\n gitCommit\n createdAt\n }\n`);\n\nexport const WhoamiDocument = graphql(`\n query SdkWhoami {\n whoami {\n kind\n userID\n name\n agentID\n agentName\n claimed\n claimedBy\n scopes\n expiresAt\n usage {\n month\n requests\n limit\n }\n resources {\n workspaces\n workspaceLimit\n services\n serviceLimit\n }\n }\n }\n`);\n\nexport const CreateWorkspaceDocument = graphql(`\n mutation SdkCreateWorkspace($name: String!) {\n createWorkspace(input: { name: $name }) {\n workspace {\n id\n name\n ownerId\n projectId\n createdAt\n updatedAt\n }\n }\n }\n`);\n\nexport const ListWorkspacesDocument = graphql(`\n query SdkListWorkspaces {\n workspaces {\n id\n name\n ownerId\n projectId\n createdAt\n updatedAt\n }\n }\n`);\n\nexport const DeleteWorkspaceDocument = graphql(`\n mutation SdkDeleteWorkspace($workspaceID: ID!) {\n deleteWorkspace(input: { workspaceID: $workspaceID }) {\n ok\n }\n }\n`);\n\nexport const WriteTextFileDocument = graphql(`\n mutation SdkWriteTextFile($workspaceID: ID!, $path: String!, $text: String!) {\n writeWorkspaceTextFile(input: { workspaceID: $workspaceID, path: $path, text: $text }) {\n file {\n path\n sizeBytes\n size\n sha256\n updatedAt\n }\n }\n }\n`);\n\nexport const WriteBase64FileDocument = graphql(`\n mutation SdkWriteBase64File($workspaceID: ID!, $path: String!, $contentBase64: String!) {\n writeWorkspaceBase64File(\n input: { workspaceID: $workspaceID, path: $path, contentBase64: $contentBase64 }\n ) {\n file {\n path\n sizeBytes\n size\n sha256\n updatedAt\n }\n }\n }\n`);\n\nexport const ListFilesDocument = graphql(`\n query SdkListFiles($input: ListWorkspaceFilesInput!) {\n workspaceFilesPage(input: $input) {\n items {\n path\n sizeBytes\n size\n sha256\n updatedAt\n }\n total\n limit\n offset\n hasMore\n nextOffset\n }\n }\n`);\n\nexport const ReadFileDocument = graphql(`\n query SdkReadFile($input: ReadWorkspaceFileInput!) {\n readWorkspaceFile(input: $input) {\n text\n offset\n limit\n totalBytes\n truncated\n nextOffset\n file {\n path\n sizeBytes\n size\n sha256\n updatedAt\n }\n }\n }\n`);\n\nexport const DeleteFileDocument = graphql(`\n mutation SdkDeleteFile($workspaceID: ID!, $path: String!) {\n deleteWorkspaceFile(input: { workspaceID: $workspaceID, path: $path }) {\n ok\n }\n }\n`);\n\nexport const CreateDeploymentDocument = graphql(`\n mutation SdkCreateDeployment($input: CreateDeploymentInput!) {\n createDeployment(input: $input) {\n deployment {\n ...DeploymentFields\n }\n }\n }\n`);\n\nexport const DeployWorkspaceDocument = graphql(`\n mutation SdkDeployWorkspace($input: DeployWorkspaceInput!) {\n deployWorkspace(input: $input) {\n deployment {\n ...DeploymentFields\n }\n }\n }\n`);\n\nexport const GetDeploymentDocument = graphql(`\n query SdkGetDeployment($id: ID!) {\n deployment(id: $id) {\n ...DeploymentFields\n }\n }\n`);\n\n/**\n * The poll document, deliberately narrow.\n *\n * Waiting can run for minutes at a few seconds per tick; selecting the full\n * fragment every time would cost the server (and an agent's rate limit) far\n * more than the four fields the state machine actually reads.\n */\nexport const PollDeploymentDocument = graphql(`\n query SdkPollDeployment($id: ID!) {\n deployment(id: $id) {\n id\n status\n error\n aliasHeld\n url\n previewUrl\n }\n }\n`);\n\nexport const GetDeploymentByAliasDocument = graphql(`\n query SdkGetDeploymentByAlias($alias: String!) {\n deploymentByAlias(alias: $alias) {\n ...DeploymentFields\n }\n }\n`);\n\nexport const ListDeploymentsDocument = graphql(`\n query SdkListDeployments($input: ListDeploymentsInput) {\n deploymentsPage(input: $input) {\n items {\n ...DeploymentFields\n }\n total\n limit\n offset\n hasMore\n nextOffset\n }\n }\n`);\n\nexport const ListReleasesDocument = graphql(`\n query SdkListReleases($alias: String!) {\n deploymentReleases(alias: $alias) {\n ...DeploymentFields\n }\n }\n`);\n\nexport const RollbackDocument = graphql(`\n mutation SdkRollback(\n $deploymentID: ID!\n $expectedCurrentDeploymentID: ID!\n $expectedCurrentAliasRevision: String!\n ) {\n rollbackDeployment(\n input: {\n deploymentID: $deploymentID\n expectedCurrentDeploymentID: $expectedCurrentDeploymentID\n expectedCurrentAliasRevision: $expectedCurrentAliasRevision\n }\n ) {\n ...DeploymentFields\n }\n }\n`);\n\nexport const ServiceStatusDocument = graphql(`\n query SdkServiceStatus($deploymentID: ID!) {\n serviceStatus(deploymentID: $deploymentID) {\n deploymentID\n alias\n serviceMode\n running\n health\n vmID\n inFlight\n alwaysOn\n memSizeMiB\n startedAt\n lastUsedAt\n lastStoppedAt\n restartCount\n lastError\n }\n }\n`);\n\nexport const ServiceLogsDocument = graphql(`\n query SdkServiceLogs($deploymentID: ID!, $tailBytes: Int) {\n serviceLogs(deploymentID: $deploymentID, tailBytes: $tailBytes) {\n deploymentID\n stdout\n stderr\n truncated\n stdoutBytes\n stderrBytes\n tailBytes\n }\n }\n`);\n\nexport const DeploymentEventsDocument = graphql(`\n query SdkDeploymentEvents($deploymentID: ID!, $limit: Int) {\n deploymentEvents(deploymentID: $deploymentID, limit: $limit) {\n id\n deploymentID\n type\n rawType\n severity\n message\n vmID\n createdAt\n }\n }\n`);\n\nexport const RestartServiceDocument = graphql(`\n mutation SdkRestartService($deploymentID: ID!) {\n restartService(input: { deploymentID: $deploymentID }) {\n deploymentID\n running\n health\n vmID\n restartCount\n lastError\n }\n }\n`);\n\nexport const StopServiceDocument = graphql(`\n mutation SdkStopService($deploymentID: ID!) {\n stopService(input: { deploymentID: $deploymentID }) {\n deploymentID\n running\n health\n vmID\n restartCount\n lastError\n }\n }\n`);\n\nexport const DeleteDeploymentDocument = graphql(`\n mutation SdkDeleteDeployment($deploymentID: ID!) {\n deleteDeployment(input: { deploymentID: $deploymentID }) {\n ok\n }\n }\n`);\n\n/* -------------------------------------------------------------------------\n * Env & secrets\n *\n * Workspace-scoped values are SERVICE defaults for every app in the source;\n * app-scoped values override them for one alias. Both are snapshotted into a\n * release at deploy time, so a change only reaches a running app after a\n * redeploy — the workflow layer's doc comments repeat this where it matters.\n * ---------------------------------------------------------------------- */\n\nexport const SetWorkspaceEnvDocument = graphql(`\n mutation SdkSetWorkspaceEnv($workspaceID: ID!, $name: String!, $value: String!) {\n setWorkspaceEnv(input: { workspaceID: $workspaceID, name: $name, value: $value }) {\n env {\n name\n value\n secret\n alias\n inherited\n masked\n updatedAt\n }\n }\n }\n`);\n\nexport const SetWorkspaceSecretDocument = graphql(`\n mutation SdkSetWorkspaceSecret($workspaceID: ID!, $name: String!, $value: String!) {\n setWorkspaceSecret(input: { workspaceID: $workspaceID, name: $name, value: $value }) {\n env {\n name\n value\n secret\n alias\n inherited\n masked\n updatedAt\n }\n }\n }\n`);\n\nexport const DeleteWorkspaceEnvDocument = graphql(`\n mutation SdkDeleteWorkspaceEnv($workspaceID: ID!, $name: String!) {\n deleteWorkspaceEnv(input: { workspaceID: $workspaceID, name: $name }) {\n ok\n }\n }\n`);\n\nexport const ListWorkspaceEnvDocument = graphql(`\n query SdkListWorkspaceEnv($workspaceID: ID!) {\n workspaceEnv(workspaceID: $workspaceID) {\n name\n value\n secret\n alias\n inherited\n masked\n updatedAt\n }\n }\n`);\n\nexport const SetAppEnvDocument = graphql(`\n mutation SdkSetAppEnv($workspaceID: ID!, $alias: String!, $name: String!, $value: String!) {\n setAppEnv(input: { workspaceID: $workspaceID, alias: $alias, name: $name, value: $value }) {\n env {\n name\n value\n secret\n alias\n inherited\n masked\n updatedAt\n }\n }\n }\n`);\n\nexport const SetAppSecretDocument = graphql(`\n mutation SdkSetAppSecret($workspaceID: ID!, $alias: String!, $name: String!, $value: String!) {\n setAppSecret(input: { workspaceID: $workspaceID, alias: $alias, name: $name, value: $value }) {\n env {\n name\n value\n secret\n alias\n inherited\n masked\n updatedAt\n }\n }\n }\n`);\n\nexport const RemoveAppEnvDocument = graphql(`\n mutation SdkRemoveAppEnv($workspaceID: ID!, $alias: String!, $name: String!) {\n removeAppEnv(input: { workspaceID: $workspaceID, alias: $alias, name: $name }) {\n ok\n }\n }\n`);\n\nexport const InheritAppEnvDocument = graphql(`\n mutation SdkInheritAppEnv($workspaceID: ID!, $alias: String!, $name: String!) {\n inheritAppEnv(input: { workspaceID: $workspaceID, alias: $alias, name: $name }) {\n ok\n }\n }\n`);\n\nexport const ListAppEnvDocument = graphql(`\n query SdkListAppEnv($workspaceID: ID!, $alias: String!) {\n appEnv(workspaceID: $workspaceID, alias: $alias) {\n name\n value\n secret\n alias\n inherited\n masked\n updatedAt\n }\n }\n`);\n"]}
|
|
1
|
+
{"version":3,"file":"operations.js","sourceRoot":"","sources":["../src/operations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAE7C;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;CA0B/C,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,cAAc,GAAG,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;CAyBrC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,uBAAuB,GAAG,OAAO,CAAC;;;;;;;;;;;;;CAa9C,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,sBAAsB,GAAG,OAAO,CAAC;;;;;;;;;;;CAW7C,CAAC,CAAC;AAEH;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,OAAO,CAAC;;;;;;CAM9C,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,qBAAqB,GAAG,OAAO,CAAC;;;;;;;;;;;;CAY5C,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,uBAAuB,GAAG,OAAO,CAAC;;;;;;;;;;;;;;CAc9C,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,iBAAiB,GAAG,OAAO,CAAC;;;;;;;;;;;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,OAAO,CAAC;;;;;;;;;;;CAW1C,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,wBAAwB,GAAG,OAAO,CAAC;;;;;;CAM/C,CAAC,CAAC;AAEH;;;;;;;4EAO4E;AAE5E,MAAM,CAAC,MAAM,uBAAuB,GAAG,OAAO,CAAC;;;;;;;;;;;;;;CAc9C,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,0BAA0B,GAAG,OAAO,CAAC;;;;;;;;;;;;;;CAcjD,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,0BAA0B,GAAG,OAAO,CAAC;;;;;;CAMjD,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,wBAAwB,GAAG,OAAO,CAAC;;;;;;;;;;;;CAY/C,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,iBAAiB,GAAG,OAAO,CAAC;;;;;;;;;;;;;;CAcxC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,oBAAoB,GAAG,OAAO,CAAC;;;;;;;;;;;;;;CAc3C,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,oBAAoB,GAAG,OAAO,CAAC;;;;;;CAM3C,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,qBAAqB,GAAG,OAAO,CAAC;;;;;;CAM5C,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,kBAAkB,GAAG,OAAO,CAAC;;;;;;;;;;;;CAYzC,CAAC,CAAC","sourcesContent":["/**\n * Every GraphQL document the workflow layer sends.\n *\n * These are wrapped in `graphql(...)` so graphql-codegen validates them\n * against the vendored schema at codegen time and emits exact result/variable\n * types. A field that stops existing server-side turns into a compile error\n * here rather than a runtime surprise in an agent's script.\n *\n * The one document NOT defined here is the batched file write: it has a\n * variable number of aliased root fields, so it is assembled at runtime in\n * `unfazed.ts`. See the comment there.\n */\nimport { graphql } from \"./generated/gql.js\";\n\n/**\n * Deployment fields the SDK returns everywhere.\n *\n * `id` + `aliasRevision` + `aliasHeld` are the rollback compare-and-swap\n * triple; `previewUrl` is the immutable by-id URL you can verify BEFORE the\n * alias moves; `error` carries the build failure text when status is FAILED.\n */\nexport const DeploymentFieldsFragment = graphql(`\n fragment DeploymentFields on Deployment {\n id\n workspaceID\n kind\n runtime\n alias\n serviceMode\n healthPath\n cronSchedule\n cronPath\n url\n previewUrl\n sshCommand\n aliasHeld\n aliasRevision\n status\n error\n filesCount\n sizeBytes\n size\n spaMode\n gitRepo\n gitCommit\n createdAt\n }\n`);\n\nexport const WhoamiDocument = graphql(`\n query SdkWhoami {\n whoami {\n kind\n userID\n name\n agentID\n agentName\n claimed\n claimedBy\n scopes\n expiresAt\n usage {\n month\n requests\n limit\n }\n resources {\n workspaces\n workspaceLimit\n services\n serviceLimit\n }\n }\n }\n`);\n\nexport const CreateWorkspaceDocument = graphql(`\n mutation SdkCreateWorkspace($name: String!) {\n createWorkspace(input: { name: $name }) {\n workspace {\n id\n name\n ownerId\n projectId\n createdAt\n updatedAt\n }\n }\n }\n`);\n\nexport const ListWorkspacesDocument = graphql(`\n query SdkListWorkspaces {\n workspaces {\n id\n name\n ownerId\n projectId\n createdAt\n updatedAt\n }\n }\n`);\n\n/**\n * Deleting a workspace, with the deployment cascade made explicit.\n *\n * `withDeployments` is not decoration: without it the server REFUSES while the\n * workspace has any deployment history at all — including FAILED records —\n * with `workspace %q still has deployments; delete them first`. A workspace\n * that was ever deployed is therefore undeletable through the bare mutation,\n * so the SDK always sends the flag and lets the caller choose the value.\n */\nexport const DeleteWorkspaceDocument = graphql(`\n mutation SdkDeleteWorkspace($workspaceID: ID!, $withDeployments: Boolean) {\n deleteWorkspace(input: { workspaceID: $workspaceID, withDeployments: $withDeployments }) {\n ok\n }\n }\n`);\n\nexport const WriteTextFileDocument = graphql(`\n mutation SdkWriteTextFile($workspaceID: ID!, $path: String!, $text: String!) {\n writeWorkspaceTextFile(input: { workspaceID: $workspaceID, path: $path, text: $text }) {\n file {\n path\n sizeBytes\n size\n sha256\n updatedAt\n }\n }\n }\n`);\n\nexport const WriteBase64FileDocument = graphql(`\n mutation SdkWriteBase64File($workspaceID: ID!, $path: String!, $contentBase64: String!) {\n writeWorkspaceBase64File(\n input: { workspaceID: $workspaceID, path: $path, contentBase64: $contentBase64 }\n ) {\n file {\n path\n sizeBytes\n size\n sha256\n updatedAt\n }\n }\n }\n`);\n\nexport const ListFilesDocument = graphql(`\n query SdkListFiles($input: ListWorkspaceFilesInput!) {\n workspaceFilesPage(input: $input) {\n items {\n path\n sizeBytes\n size\n sha256\n updatedAt\n }\n total\n limit\n offset\n hasMore\n nextOffset\n }\n }\n`);\n\nexport const ReadFileDocument = graphql(`\n query SdkReadFile($input: ReadWorkspaceFileInput!) {\n readWorkspaceFile(input: $input) {\n text\n offset\n limit\n totalBytes\n truncated\n nextOffset\n file {\n path\n sizeBytes\n size\n sha256\n updatedAt\n }\n }\n }\n`);\n\nexport const DeleteFileDocument = graphql(`\n mutation SdkDeleteFile($workspaceID: ID!, $path: String!) {\n deleteWorkspaceFile(input: { workspaceID: $workspaceID, path: $path }) {\n ok\n }\n }\n`);\n\nexport const CreateDeploymentDocument = graphql(`\n mutation SdkCreateDeployment($input: CreateDeploymentInput!) {\n createDeployment(input: $input) {\n deployment {\n ...DeploymentFields\n }\n }\n }\n`);\n\nexport const DeployWorkspaceDocument = graphql(`\n mutation SdkDeployWorkspace($input: DeployWorkspaceInput!) {\n deployWorkspace(input: $input) {\n deployment {\n ...DeploymentFields\n }\n }\n }\n`);\n\nexport const GetDeploymentDocument = graphql(`\n query SdkGetDeployment($id: ID!) {\n deployment(id: $id) {\n ...DeploymentFields\n }\n }\n`);\n\n/**\n * The poll document, deliberately narrow.\n *\n * Waiting can run for minutes at a few seconds per tick; selecting the full\n * fragment every time would cost the server (and an agent's rate limit) far\n * more than the four fields the state machine actually reads.\n */\nexport const PollDeploymentDocument = graphql(`\n query SdkPollDeployment($id: ID!) {\n deployment(id: $id) {\n id\n status\n error\n aliasHeld\n url\n previewUrl\n }\n }\n`);\n\nexport const GetDeploymentByAliasDocument = graphql(`\n query SdkGetDeploymentByAlias($alias: String!) {\n deploymentByAlias(alias: $alias) {\n ...DeploymentFields\n }\n }\n`);\n\nexport const ListDeploymentsDocument = graphql(`\n query SdkListDeployments($input: ListDeploymentsInput) {\n deploymentsPage(input: $input) {\n items {\n ...DeploymentFields\n }\n total\n limit\n offset\n hasMore\n nextOffset\n }\n }\n`);\n\nexport const ListReleasesDocument = graphql(`\n query SdkListReleases($alias: String!) {\n deploymentReleases(alias: $alias) {\n ...DeploymentFields\n }\n }\n`);\n\nexport const RollbackDocument = graphql(`\n mutation SdkRollback(\n $deploymentID: ID!\n $expectedCurrentDeploymentID: ID!\n $expectedCurrentAliasRevision: String!\n ) {\n rollbackDeployment(\n input: {\n deploymentID: $deploymentID\n expectedCurrentDeploymentID: $expectedCurrentDeploymentID\n expectedCurrentAliasRevision: $expectedCurrentAliasRevision\n }\n ) {\n ...DeploymentFields\n }\n }\n`);\n\nexport const ServiceStatusDocument = graphql(`\n query SdkServiceStatus($deploymentID: ID!) {\n serviceStatus(deploymentID: $deploymentID) {\n deploymentID\n alias\n serviceMode\n running\n health\n vmID\n inFlight\n alwaysOn\n memSizeMiB\n startedAt\n lastUsedAt\n lastStoppedAt\n restartCount\n lastError\n }\n }\n`);\n\nexport const ServiceLogsDocument = graphql(`\n query SdkServiceLogs($deploymentID: ID!, $tailBytes: Int) {\n serviceLogs(deploymentID: $deploymentID, tailBytes: $tailBytes) {\n deploymentID\n stdout\n stderr\n truncated\n stdoutBytes\n stderrBytes\n tailBytes\n }\n }\n`);\n\nexport const DeploymentEventsDocument = graphql(`\n query SdkDeploymentEvents($deploymentID: ID!, $limit: Int) {\n deploymentEvents(deploymentID: $deploymentID, limit: $limit) {\n id\n deploymentID\n type\n rawType\n severity\n message\n vmID\n createdAt\n }\n }\n`);\n\nexport const RestartServiceDocument = graphql(`\n mutation SdkRestartService($deploymentID: ID!) {\n restartService(input: { deploymentID: $deploymentID }) {\n deploymentID\n running\n health\n vmID\n restartCount\n lastError\n }\n }\n`);\n\nexport const StopServiceDocument = graphql(`\n mutation SdkStopService($deploymentID: ID!) {\n stopService(input: { deploymentID: $deploymentID }) {\n deploymentID\n running\n health\n vmID\n restartCount\n lastError\n }\n }\n`);\n\nexport const DeleteDeploymentDocument = graphql(`\n mutation SdkDeleteDeployment($deploymentID: ID!) {\n deleteDeployment(input: { deploymentID: $deploymentID }) {\n ok\n }\n }\n`);\n\n/* -------------------------------------------------------------------------\n * Env & secrets\n *\n * Workspace-scoped values are SERVICE defaults for every app in the source;\n * app-scoped values override them for one alias. Both are snapshotted into a\n * release at deploy time, so a change only reaches a running app after a\n * redeploy — the workflow layer's doc comments repeat this where it matters.\n * ---------------------------------------------------------------------- */\n\nexport const SetWorkspaceEnvDocument = graphql(`\n mutation SdkSetWorkspaceEnv($workspaceID: ID!, $name: String!, $value: String!) {\n setWorkspaceEnv(input: { workspaceID: $workspaceID, name: $name, value: $value }) {\n env {\n name\n value\n secret\n alias\n inherited\n masked\n updatedAt\n }\n }\n }\n`);\n\nexport const SetWorkspaceSecretDocument = graphql(`\n mutation SdkSetWorkspaceSecret($workspaceID: ID!, $name: String!, $value: String!) {\n setWorkspaceSecret(input: { workspaceID: $workspaceID, name: $name, value: $value }) {\n env {\n name\n value\n secret\n alias\n inherited\n masked\n updatedAt\n }\n }\n }\n`);\n\nexport const DeleteWorkspaceEnvDocument = graphql(`\n mutation SdkDeleteWorkspaceEnv($workspaceID: ID!, $name: String!) {\n deleteWorkspaceEnv(input: { workspaceID: $workspaceID, name: $name }) {\n ok\n }\n }\n`);\n\nexport const ListWorkspaceEnvDocument = graphql(`\n query SdkListWorkspaceEnv($workspaceID: ID!) {\n workspaceEnv(workspaceID: $workspaceID) {\n name\n value\n secret\n alias\n inherited\n masked\n updatedAt\n }\n }\n`);\n\nexport const SetAppEnvDocument = graphql(`\n mutation SdkSetAppEnv($workspaceID: ID!, $alias: String!, $name: String!, $value: String!) {\n setAppEnv(input: { workspaceID: $workspaceID, alias: $alias, name: $name, value: $value }) {\n env {\n name\n value\n secret\n alias\n inherited\n masked\n updatedAt\n }\n }\n }\n`);\n\nexport const SetAppSecretDocument = graphql(`\n mutation SdkSetAppSecret($workspaceID: ID!, $alias: String!, $name: String!, $value: String!) {\n setAppSecret(input: { workspaceID: $workspaceID, alias: $alias, name: $name, value: $value }) {\n env {\n name\n value\n secret\n alias\n inherited\n masked\n updatedAt\n }\n }\n }\n`);\n\nexport const RemoveAppEnvDocument = graphql(`\n mutation SdkRemoveAppEnv($workspaceID: ID!, $alias: String!, $name: String!) {\n removeAppEnv(input: { workspaceID: $workspaceID, alias: $alias, name: $name }) {\n ok\n }\n }\n`);\n\nexport const InheritAppEnvDocument = graphql(`\n mutation SdkInheritAppEnv($workspaceID: ID!, $alias: String!, $name: String!) {\n inheritAppEnv(input: { workspaceID: $workspaceID, alias: $alias, name: $name }) {\n ok\n }\n }\n`);\n\nexport const ListAppEnvDocument = graphql(`\n query SdkListAppEnv($workspaceID: ID!, $alias: String!) {\n appEnv(workspaceID: $workspaceID, alias: $alias) {\n name\n value\n secret\n alias\n inherited\n masked\n updatedAt\n }\n }\n`);\n"]}
|