From 96ec748691f0ccc3b8a3a6bd586f974c3939cfbf Mon Sep 17 00:00:00 2001 From: ryank90 Date: Wed, 19 Aug 2026 17:43:44 +0100 Subject: [PATCH 1/2] refactor(cli): move to apps implementation instead of deployments --- api/serverless/openapi.yaml | 711 ++--- docs/runware_serverless_deploy.md | 4 +- internal/api/serverless/client.go | 196 +- internal/api/serverless/client_test.go | 239 +- internal/api/serverless/env.go | 34 +- internal/api/serverless/env_test.go | 48 +- internal/api/serverless/gen/client.gen.go | 2881 ++++++++++---------- internal/api/serverless/log_test.go | 6 +- internal/api/serverless/secrets.go | 34 +- internal/api/serverless/secrets_test.go | 48 +- internal/cmd/serverless/apps.go | 28 +- internal/cmd/serverless/apps_env.go | 14 +- internal/cmd/serverless/apps_lifecycle.go | 12 +- internal/cmd/serverless/apps_scale.go | 4 +- internal/cmd/serverless/apps_scale_test.go | 2 +- internal/cmd/serverless/deploy.go | 23 +- internal/cmd/serverless/display.go | 48 +- internal/cmd/serverless/display_test.go | 46 +- internal/cmd/serverless/open.go | 10 +- internal/cmd/serverless/pack.go | 2 +- internal/cmd/serverless/secrets.go | 20 +- 21 files changed, 2217 insertions(+), 2193 deletions(-) diff --git a/api/serverless/openapi.yaml b/api/serverless/openapi.yaml index 3a25fd0..a002e5e 100644 --- a/api/serverless/openapi.yaml +++ b/api/serverless/openapi.yaml @@ -4,17 +4,17 @@ servers: info: title: Serverless API - version: 0.3.0 + version: 0.4.0 license: name: Proprietary description: > Control plane and task-ingestion API for the Runware Serverless platform. - A Runware organisation is the tenant boundary. Deployments are addressed as - `/v1/deployments/{deploymentId}` and endpoints are invoked as - `/v1/deployments/{deploymentId}/invoke-async/{endpointPath}` (async invocation) or - `/v1/deployments/{deploymentId}/invoke-sync/{endpointPath}` (sync invocation). + A Runware organisation is the tenant boundary. Apps are addressed as + `/v1/apps/{appId}` and endpoints are invoked as + `/v1/apps/{appId}/invoke-async/{endpointPath}` (async invocation) or + `/v1/apps/{appId}/invoke-sync/{endpointPath}` (sync invocation). Two authentication schemes are accepted, both as bearer tokens. A Runware API key @@ -31,15 +31,15 @@ security: tags: - name: Tasks - description: Submit work to deployment endpoints and inspect task status - - name: Deployments - description: Manage deployments and their lifecycle + description: Submit work to app endpoints and inspect task status + - name: Apps + description: Manage apps and their lifecycle - name: Builds description: Immutable builds - name: Versions - description: Deployment versions produced by successful builds + description: App versions produced by successful builds - name: Endpoints - description: Named endpoints exposed by a deployment + description: Named endpoints exposed by an app - name: Compute description: Compute hardware catalogues (GPU types) and pricing - name: Workers @@ -47,7 +47,7 @@ tags: - name: Secrets description: Organisation-scoped encrypted secrets - name: EnvironmentVariables - description: Plain-text environment variables scoped to a deployment + description: Plain-text environment variables scoped to an app - name: Observability description: Usage, events and errors @@ -64,8 +64,9 @@ paths: Returns the global GPU type catalogue and pricing. The request requires authentication. Customer principals receive only GPU types with capacity currently offered to customers; a type whose hardware is not yet cleared for customer workloads is omitted. The Runware - principal receives the full catalogue, including types not yet offered. Each entry's - `pricing` is the price currently in effect; the Runware principal can read the full price + principal receives the full catalogue, including retired types and types not yet offered. + Retired entries carry `deletedAt`. Each entry's `pricing` is the price currently in effect; + the Runware principal can read the full price history, including scheduled future changes, from `GET /v1/gpu-types/{gpuTypeId}/prices`. operationId: listGpuTypes @@ -88,7 +89,7 @@ paths: summary: Add a GPU type to the catalogue description: > Creates a new entry in the global GPU type catalogue. Restricted to the Runware platform - organization. The `id` (catalogue code) is immutable after create. + organization. The `id` (catalogue code) is immutable and remains reserved after retirement. operationId: createGpuType requestBody: required: true @@ -122,8 +123,8 @@ paths: - Compute summary: Get a GPU type from the catalogue description: > - Returns a single entry from the global GPU type catalogue. The result is not - organisation-specific, but the request still requires authentication. + Returns an active entry from the global GPU type catalogue. Retired entries return `404`. + The result is not organisation-specific, but the request still requires authentication. operationId: getGpuType parameters: - $ref: '#/components/parameters/GpuTypeId' @@ -149,8 +150,8 @@ paths: - Compute summary: Update a GPU type in the catalogue description: > - Updates mutable fields of an existing GPU type. Restricted to the Runware platform organization. - The catalogue code (`gpuTypeId`) cannot be changed. + Updates mutable fields of an active GPU type. Restricted to the Runware platform organization. + The catalogue code (`gpuTypeId`) cannot be changed; retired entries return `404`. operationId: updateGpuType parameters: - $ref: '#/components/parameters/GpuTypeId' @@ -182,16 +183,17 @@ paths: delete: tags: - Compute - summary: Remove a GPU type from the catalogue + summary: Retire a GPU type from the catalogue description: > - Deletes a GPU type from the global catalogue. Restricted to the Runware platform organization. - Returns `409` if any live worker configuration still references the code. + Soft-deletes a GPU type while preserving its code and price history. Restricted to the + Runware platform organization. Returns `409` if a worker configuration or GPU pool still + references the code. Retiring an already retired code returns `404`. operationId: deleteGpuType parameters: - $ref: '#/components/parameters/GpuTypeId' responses: '204': - description: GPU type deleted + description: GPU type retired '401': $ref: '#/components/responses/Unauthorized' '503': @@ -212,7 +214,7 @@ paths: summary: List historical and future prices of a GPU type description: > Returns a page of a GPU type's prices, ordered by effectiveFrom. Restricted to the Runware - platform organization: the page includes prices that are scheduled but not yet in effect. + platform organization: the page includes retired types and prices that are scheduled but not yet in effect. Customers read the price currently in effect from `GET /v1/gpu-types`. operationId: listGpuTypePrices parameters: @@ -249,8 +251,10 @@ paths: summary: Schedule a new price for a GPU type description: > Schedules a new price to take effect at `effectiveFrom`. Restricted to the Runware platform - organization. `effectiveFrom` must be more than 7 days in the future, so downstream systems - and customers get advance notice of the change; a value inside that window returns `422`. + organization. `effectiveFrom` must normally be more than 7 days in the future. Before a GPU + type is admitted or used, a later price can be added inside that window to correct its initial + price. This preserves the original row and records the correction as a superseding price. + Retired types return `404`; other values inside the notice window return `422`. Returns `409` if the GPU type already has a price scheduled at that exact instant. operationId: createGpuTypePrice parameters: @@ -291,8 +295,8 @@ paths: Only a price whose current `effectiveFrom` is still more than 7 days in the future can be edited — once inside that window the price is locked in and this returns `409`. A supplied `effectiveFrom` must itself be more than 7 days in the future, returning `422` - otherwise. Returns `409` if it collides with another price already scheduled at that - exact instant. + otherwise. Retired GPU types return `404`. Returns `409` if the update collides with + another price already scheduled at that exact instant. operationId: updateGpuTypePrice parameters: - $ref: '#/components/parameters/GpuTypeId' @@ -335,7 +339,7 @@ paths: Deletes a scheduled price. Restricted to the Runware platform organization. Only a price whose effectiveFrom is still more than 7 days in the future can be deleted — once inside that window the price is locked in (about to take effect, or already has) and this returns - `409`. + `409`. Retired GPU types return `404`. operationId: deleteGpuTypePrice parameters: - $ref: '#/components/parameters/GpuTypeId' @@ -364,22 +368,22 @@ paths: # --------------------------------------------------------------------------- # Tasks # --------------------------------------------------------------------------- - /v1/deployments/{deploymentId}/invoke-async/{endpointPath}: + /v1/apps/{appId}/invoke-async/{endpointPath}: post: tags: - Tasks summary: Start a new async task description: > - Starts a new async task on `deploymentId`, routing the request body payload to an available + Starts a new async task on `appId`, routing the request body payload to an available worker. The task runs asynchronously and the response is `202`; poll - `GET /v1/deployments/{deploymentId}/tasks/{taskId}` for completion. Deployments in + `GET /v1/apps/{appId}/tasks/{taskId}` for completion. Apps in `initializing`, `active`, or `stopping` accept invocation. `stopped`, `deleting`, and - `failed` return `409 Conflict`; unknown or deleted deployments return `404 Not Found`. + `failed` return `409 Conflict`; unknown or deleted apps return `404 Not Found`. operationId: startAsyncTask security: - ApiKeyAuth: [] parameters: - - $ref: '#/components/parameters/DeploymentId' + - $ref: '#/components/parameters/AppId' - $ref: '#/components/parameters/EndpointPath' requestBody: $ref: '#/components/requestBodies/TaskPayload' @@ -401,23 +405,23 @@ paths: '422': $ref: '#/components/responses/ValidationError' - /v1/deployments/{deploymentId}/invoke-sync/{endpointPath}: + /v1/apps/{appId}/invoke-sync/{endpointPath}: post: tags: - Tasks summary: Start a new sync task description: > - Starts a new sync task on `deploymentId`, routing the request body payload to an available + Starts a new sync task on `appId`, routing the request body payload to an available worker. The request blocks until the task is terminal and returns the result inline (`200`), or `504` if it does not complete within the wait window. When the accepted task ID is - available, the response includes `taskId` for polling. Deployments in `initializing`, + available, the response includes `taskId` for polling. Apps in `initializing`, `active`, or `stopping` accept invocation. `stopped`, `deleting`, and `failed` return - `409 Conflict`; unknown or deleted deployments return `404 Not Found`. + `409 Conflict`; unknown or deleted apps return `404 Not Found`. operationId: startSyncTask security: - ApiKeyAuth: [] parameters: - - $ref: '#/components/parameters/DeploymentId' + - $ref: '#/components/parameters/AppId' - $ref: '#/components/parameters/EndpointPath' requestBody: $ref: '#/components/requestBodies/TaskPayload' @@ -441,7 +445,7 @@ paths: '504': $ref: '#/components/responses/Timeout' - /v1/deployments/{deploymentId}/tasks/{taskId}: + /v1/apps/{appId}/tasks/{taskId}: get: tags: - Tasks @@ -449,17 +453,17 @@ paths: description: > Returns the task's current status, read through the inference transport layer from the shared result store. When `completed`, includes the result `output` and `completedAt`; - when `failed`, includes `error`; when `pending`, neither is set. If the deployment is + when `failed`, includes `error`; when `pending`, neither is set. If the app is `stopped`, `deleting`, or `failed`, accepted task results stay readable. A `404 Not Found` - means the task cannot currently be verified for this deployment. Because enqueue-time + means the task cannot currently be verified for this app. Because enqueue-time ownership tracking is best effort, a recently returned task ID can temporarily return - `404`; retry it within the normal polling window. Unknown or deleted deployments also + `404`; retry it within the normal polling window. Unknown or deleted apps also return `404 Not Found`. operationId: getTask security: - ApiKeyAuth: [] parameters: - - $ref: '#/components/parameters/DeploymentId' + - $ref: '#/components/parameters/AppId' - name: taskId in: path required: true @@ -478,26 +482,26 @@ paths: '404': $ref: '#/components/responses/NotFound' - /v1/deployments/{deploymentId}/tasks: + /v1/apps/{appId}/tasks: get: tags: - Tasks - summary: List tasks for a deployment + summary: List tasks for an app description: > - Lists TTL-bounded asynchronous task metadata for this deployment so a client + Lists TTL-bounded asynchronous task metadata for this app so a client can recover task ids after an interrupted long-poll or CLI session. Pending includes queued, running and retrying work. Tasks appear only within the configured recovery window. A page can be empty and still have `nextCursor`; continue until it is null. Pending entries are best effort and may disappear if the recovery store restarts; tracked tasks reappear on completion. This is not persisted task history. Each submission has a new task id, so client retries - can appear as separate tasks. If the deployment is `stopped`, `deleting`, or `failed`, - recovery stays available. Unknown or deleted deployments return `404 Not Found`. + can appear as separate tasks. If the app is `stopped`, `deleting`, or `failed`, + recovery stays available. Unknown or deleted apps return `404 Not Found`. operationId: listTasks security: - ApiKeyAuth: [] parameters: - - $ref: '#/components/parameters/DeploymentId' + - $ref: '#/components/parameters/AppId' - $ref: '#/components/parameters/Limit' - $ref: '#/components/parameters/Cursor' - name: status @@ -533,36 +537,36 @@ paths: $ref: '#/components/responses/ValidationError' # --------------------------------------------------------------------------- - # Deployments + # Apps # --------------------------------------------------------------------------- - /v1/deployments: + /v1/apps: get: tags: - - Deployments - summary: List deployments + - Apps + summary: List apps description: > - Returns a page of the organisation's deployments. Filters combine with AND; soft-deleted - deployments are excluded unless `status=deleted` is requested explicitly. + Returns a page of the organisation's apps. Filters combine with AND; soft-deleted + apps are excluded unless `status=deleted` is requested explicitly. A `cursor` is only valid for the `sort` and filters it was issued under — reusing one across a different ordering or filter set returns `400`. - operationId: listDeployments + operationId: listApps parameters: - $ref: '#/components/parameters/Limit' - $ref: '#/components/parameters/Cursor' - name: status in: query required: false - description: Return only deployments in this status. + description: Return only apps in this status. schema: - $ref: '#/components/schemas/DeploymentStatus' + $ref: '#/components/schemas/AppStatus' - name: q in: query required: false description: > - Case-insensitive substring match against `deploymentName` and `deploymentId`. - A deployment matching either is returned. + Case-insensitive substring match against `appName` and `appId`. + An app matching either is returned. schema: type: string minLength: 1 @@ -571,7 +575,7 @@ paths: in: query required: false description: > - Return only deployments whose worker configuration requests this GPU type. + Return only apps whose worker configuration requests this GPU type. Matched against `configuration.gpuType` only, not `fallbackGpuType`. Must be a code from `GET /v1/gpu-types`; an unknown code returns `422`. schema: @@ -580,10 +584,10 @@ paths: in: query required: false schema: - $ref: '#/components/schemas/DeploymentSort' + $ref: '#/components/schemas/AppSort' responses: '200': - description: A page of deployments + description: A page of apps content: application/json: schema: @@ -594,7 +598,7 @@ paths: data: type: array items: - $ref: '#/components/schemas/Deployment' + $ref: '#/components/schemas/App' '400': $ref: '#/components/responses/BadRequest' '401': @@ -607,22 +611,22 @@ paths: $ref: '#/components/responses/ValidationError' post: tags: - - Deployments - summary: Create a deployment + - Apps + summary: Create an app description: > - Creates a deployment together with its worker configuration, environment variables and + Creates an app together with its worker configuration, environment variables and endpoints, and records version `1` — the immutable description of what to deploy. The - deployment starts in `initializing`, and what happens next depends on the deployment + app starts in `initializing`, and what happens next depends on the app source type: - `code` source: the codebase is submitted to the build pipeline; once the image is built - and workers become healthy the deployment transitions to `active` and `activeVersionId` - points at that version. If the build, validation, or rollout fails the deployment is + and workers become healthy the app transitions to `active` and `activeVersionId` + points at that version. If the build, validation, or rollout fails the app is marked `failed`. - `container` source: no build step, so the version carries no `buildId`. No worker runs - from a container source yet, so the deployment stays `initializing` and does not serve + from a container source yet, so the app stays `initializing` and does not serve inference — poll `active` only for a `code` source. @@ -632,20 +636,20 @@ paths: `secrets` is accepted by the schema but not yet applied, so supplying it returns `422` rather than silently dropping it. - operationId: createDeployment + operationId: createApp requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/DeploymentCreate' + $ref: '#/components/schemas/AppCreate' responses: '201': - description: Deployment created + description: App created content: application/json: schema: - $ref: '#/components/schemas/Deployment' + $ref: '#/components/schemas/App' '401': $ref: '#/components/responses/Unauthorized' '503': @@ -659,21 +663,21 @@ paths: '422': $ref: '#/components/responses/ValidationError' - /v1/deployments/{deploymentId}: + /v1/apps/{appId}: get: tags: - - Deployments - summary: Get a deployment - operationId: getDeployment + - Apps + summary: Get an app + operationId: getApp parameters: - - $ref: '#/components/parameters/DeploymentId' + - $ref: '#/components/parameters/AppId' responses: '200': - description: The deployment + description: The app content: application/json: schema: - $ref: '#/components/schemas/Deployment' + $ref: '#/components/schemas/App' '401': $ref: '#/components/responses/Unauthorized' '503': @@ -684,17 +688,17 @@ paths: $ref: '#/components/responses/NotFound' patch: tags: - - Deployments - summary: Update a deployment + - Apps + summary: Update an app description: > - Patches one or more aspects of a deployment in place. All fields are optional; omitted + Patches one or more aspects of an app in place. All fields are optional; omitted fields are left unchanged. Valid in any non-`deleted` status, including `stopped` (changes apply on `resume`). Lifecycle transitions use the dedicated `deploy`, `stop`, `resume`, and `delete` operations. - **Currently persisted:** `deploymentName` and `configuration` only. Supplying - `deploymentSource`, `secrets`, `environmentVariables`, or `endpoints` returns `422` + **Currently persisted:** `appName` and `configuration` only. Supplying + `appSource`, `secrets`, `environmentVariables`, or `endpoints` returns `422` (bulk env-var replace is not wired — use the dedicated `/environment-variables` endpoints for individual keys). @@ -702,33 +706,33 @@ paths: Target behaviour (once fully wired): - `configuration`: applied on the next Scaler cycle; triggers a rollout so workers - restart with the new configuration. If the rollout fails, the deployment remains on + restart with the new configuration. If the rollout fails, the app remains on the previous configuration. - - `deploymentSource`: triggers a build (for `code` sources) or image validation (for `container` + - `appSource`: triggers a build (for `code` sources) or image validation (for `container` sources); on success the new version is deployed automatically. If the build or - validation fails, the deployment remains on the previous version. + validation fails, the app remains on the previous version. - `secrets` / `environmentVariables` / `endpoints`: the supplied array **replaces** the current set — any item absent from the request is deleted. Endpoints take effect immediately. Changes to secrets or environment variables trigger a rollout so workers restart and pick up the new values. - operationId: updateDeployment + operationId: updateApp parameters: - - $ref: '#/components/parameters/DeploymentId' + - $ref: '#/components/parameters/AppId' requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/DeploymentUpdate' + $ref: '#/components/schemas/AppUpdate' responses: '200': - description: Updated deployment + description: Updated app content: application/json: schema: - $ref: '#/components/schemas/Deployment' + $ref: '#/components/schemas/App' '401': $ref: '#/components/responses/Unauthorized' '503': @@ -745,25 +749,25 @@ paths: $ref: '#/components/responses/ValidationError' delete: tags: - - Deployments - summary: Delete a deployment + - Apps + summary: Delete an app description: > Soft delete. Sets `status = deleting` and returns `202` once that intent is persisted. Router removal, cancelling in-progress builds, and worker drain (`draining → stopping → stopped`) are performed asynchronously by the deployer/Scaler; `status` becomes `deleted` once all workers stop. All rows are retained for billing - finalisation, audit, and usage history. Idempotent if the deployment is already + finalisation, audit, and usage history. Idempotent if the app is already `deleting`. - operationId: deleteDeployment + operationId: deleteApp parameters: - - $ref: '#/components/parameters/DeploymentId' + - $ref: '#/components/parameters/AppId' responses: '202': description: Delete accepted; status is deleting content: application/json: schema: - $ref: '#/components/schemas/Deployment' + $ref: '#/components/schemas/App' '401': $ref: '#/components/responses/Unauthorized' '503': @@ -773,10 +777,10 @@ paths: '404': $ref: '#/components/responses/NotFound' - /v1/deployments/{deploymentId}/deploy: + /v1/apps/{appId}/deploy: post: tags: - - Deployments + - Apps summary: Deploy a version description: > Activates a `ready` version by number, setting `activeVersionId` and returning `202` @@ -789,28 +793,28 @@ paths: deploy. No new version is created and no rebuild happens: the version's existing image is re-applied. Re-deploying the currently active version is permitted and re-applies it. - A deploy to a `stopped` or `stopping` deployment records the version and rolls no + A deploy to a `stopped` or `stopping` app records the version and rolls no workload, because no workers are running: the `202` does not imply a rollout there. - The recorded version is the one applied when the deployment resumes. + The recorded version is the one applied when the app resumes. - If the roll of a live deployment fails, `activeVersionId` is restored to the version + If the roll of a live app fails, `activeVersionId` is restored to the version that kept serving, so the field keeps naming the running image. **Rollout** (deployer/Scaler): the platform starts workers on the target version, waits for at least one to become healthy, switches task routing to the new version, then drains old-version workers gracefully. Old workers are given a fixed, platform-managed grace period to finish in-flight tasks before being force-terminated. If new workers - fail to become healthy, old workers are not drained and the deployment continues on the + fail to become healthy, old workers are not drained and the app continues on the previous version. Errors: - - Deploy to a `deleting` deployment returns `409 Conflict` + - Deploy to a `deleting` app returns `409 Conflict` - `versionNumber` not found or not `ready` returns `409 Conflict` - - A `container`-source version returns `409 Conflict` until container deployments are supported - - Deploy to a non-existent or `deleted` deployment returns `404 Not Found` + - A `container`-source version returns `409 Conflict` until container apps are supported + - Deploy to a non-existent or `deleted` app returns `404 Not Found` operationId: deployVersion parameters: - - $ref: '#/components/parameters/DeploymentId' + - $ref: '#/components/parameters/AppId' requestBody: required: true content: @@ -823,7 +827,7 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Deployment' + $ref: '#/components/schemas/App' '400': $ref: '#/components/responses/BadRequest' '401': @@ -839,29 +843,29 @@ paths: '422': $ref: '#/components/responses/ValidationError' - /v1/deployments/{deploymentId}/stop: + /v1/apps/{appId}/stop: post: tags: - - Deployments - summary: Stop a deployment + - Apps + summary: Stop an app description: > - Moves the deployment to `stopping` and returns `202` once that intent is persisted. + Moves the app to `stopping` and returns `202` once that intent is persisted. Scale-to-zero and worker drain are performed asynchronously by the Scaler; `status` becomes `stopped` once all workers drain. In-flight tasks have a fixed, platform-managed grace period to complete; workers that exceed it are force-terminated and their tasks return to the queue per delivery guarantees. New task submissions remain - accepted while `stopping`; after the deployment reaches `stopped`, submissions return + accepted while `stopping`; after the app reaches `stopped`, submissions return `409 Conflict`. Precondition: `status = active`. - operationId: stopDeployment + operationId: stopApp parameters: - - $ref: '#/components/parameters/DeploymentId' + - $ref: '#/components/parameters/AppId' responses: '202': description: Stop accepted; status is stopping content: application/json: schema: - $ref: '#/components/schemas/Deployment' + $ref: '#/components/schemas/App' '401': $ref: '#/components/responses/Unauthorized' '503': @@ -873,26 +877,26 @@ paths: '409': $ref: '#/components/responses/Conflict' - /v1/deployments/{deploymentId}/resume: + /v1/apps/{appId}/resume: post: tags: - - Deployments - summary: Resume a deployment + - Apps + summary: Resume an app description: > - Moves the deployment to `initializing` and returns `202` once that intent is persisted. - The Scaler then starts workers and sets the deployment to `active`; tasks that remained - queued when the deployment stopped are consumed as workers come online. Precondition: + Moves the app to `initializing` and returns `202` once that intent is persisted. + The Scaler then starts workers and sets the app to `active`; tasks that remained + queued when the app stopped are consumed as workers come online. Precondition: `status = stopped`. - operationId: resumeDeployment + operationId: resumeApp parameters: - - $ref: '#/components/parameters/DeploymentId' + - $ref: '#/components/parameters/AppId' responses: '202': - description: Resume accepted; deployment is initializing + description: Resume accepted; app is initializing content: application/json: schema: - $ref: '#/components/schemas/Deployment' + $ref: '#/components/schemas/App' '401': $ref: '#/components/responses/Unauthorized' '503': @@ -904,27 +908,27 @@ paths: '409': $ref: '#/components/responses/Conflict' - /v1/deployments/{deploymentId}/favourite: + /v1/apps/{appId}/favourite: put: tags: - - Deployments - summary: Favourite a deployment + - Apps + summary: Favourite an app description: > - Pins the deployment as a favourite for the authenticated organisation so the console + Pins the app as a favourite for the authenticated organisation so the console can surface it in a Favourites section. Idempotent: favouriting an already-favourited - deployment succeeds and returns the deployment with `isFavourite: true`. Deployments + app succeeds and returns the app with `isFavourite: true`. Apps in `deleting` or `deleted` status cannot be favourited (`404`). Soft-delete clears any existing pin when status becomes `deleting`. - operationId: favouriteDeployment + operationId: favouriteApp parameters: - - $ref: '#/components/parameters/DeploymentId' + - $ref: '#/components/parameters/AppId' responses: '200': - description: Deployment is favourited + description: App is favourited content: application/json: schema: - $ref: '#/components/schemas/Deployment' + $ref: '#/components/schemas/App' '401': $ref: '#/components/responses/Unauthorized' '503': @@ -935,23 +939,23 @@ paths: $ref: '#/components/responses/NotFound' delete: tags: - - Deployments - summary: Unfavourite a deployment + - Apps + summary: Unfavourite an app description: > - Removes the organisation favourite pin from the deployment. Idempotent: unfavouriting - a deployment that is not favourited succeeds and returns the deployment with + Removes the organisation favourite pin from the app. Idempotent: unfavouriting + an app that is not favourited succeeds and returns the app with `isFavourite: false`. Valid in any status including `deleting` and `deleted` — unpinning - is not a deployment lifecycle mutation. Missing deployments return `404`. - operationId: unfavouriteDeployment + is not an app lifecycle mutation. Missing apps return `404`. + operationId: unfavouriteApp parameters: - - $ref: '#/components/parameters/DeploymentId' + - $ref: '#/components/parameters/AppId' responses: '200': - description: Deployment is not favourited + description: App is not favourited content: application/json: schema: - $ref: '#/components/schemas/Deployment' + $ref: '#/components/schemas/App' '401': $ref: '#/components/responses/Unauthorized' '503': @@ -961,23 +965,23 @@ paths: '404': $ref: '#/components/responses/NotFound' - /v1/deployment-summary: + /v1/app-summary: get: tags: - - Deployments - summary: Deployment summary metrics for the authenticated organisation + - Apps + summary: App summary metrics for the authenticated organisation description: > - Aggregate dashboard metrics across all deployments owned by the authenticated organisation. + Aggregate dashboard metrics across all apps owned by the authenticated organisation. Metrics whose backing system is not yet available are omitted from the response rather than reported as zero. - operationId: getDeploymentSummary + operationId: getAppSummary responses: '200': - description: Deployment summary + description: App summary content: application/json: schema: - $ref: '#/components/schemas/DeploymentSummary' + $ref: '#/components/schemas/AppSummary' '401': $ref: '#/components/responses/Unauthorized' '503': @@ -988,14 +992,14 @@ paths: # --------------------------------------------------------------------------- # Builds # --------------------------------------------------------------------------- - /v1/deployments/{deploymentId}/builds: + /v1/apps/{appId}/builds: get: tags: - Builds summary: List builds operationId: listBuilds parameters: - - $ref: '#/components/parameters/DeploymentId' + - $ref: '#/components/parameters/AppId' - $ref: '#/components/parameters/Limit' - $ref: '#/components/parameters/Cursor' responses: @@ -1021,14 +1025,14 @@ paths: '404': $ref: '#/components/responses/NotFound' - /v1/deployments/{deploymentId}/builds/{buildId}: + /v1/apps/{appId}/builds/{buildId}: get: tags: - Builds summary: Get a build operationId: getBuild parameters: - - $ref: '#/components/parameters/DeploymentId' + - $ref: '#/components/parameters/AppId' - name: buildId in: path required: true @@ -1054,14 +1058,14 @@ paths: # --------------------------------------------------------------------------- # Versions # --------------------------------------------------------------------------- - /v1/deployments/{deploymentId}/versions: + /v1/apps/{appId}/versions: get: tags: - Versions summary: List versions operationId: listVersions parameters: - - $ref: '#/components/parameters/DeploymentId' + - $ref: '#/components/parameters/AppId' - $ref: '#/components/parameters/Limit' - $ref: '#/components/parameters/Cursor' responses: @@ -1087,14 +1091,14 @@ paths: '404': $ref: '#/components/responses/NotFound' - /v1/deployments/{deploymentId}/versions/{versionNumber}: + /v1/apps/{appId}/versions/{versionNumber}: get: tags: - Versions summary: Get a version operationId: getVersion parameters: - - $ref: '#/components/parameters/DeploymentId' + - $ref: '#/components/parameters/AppId' - name: versionNumber in: path required: true @@ -1120,19 +1124,19 @@ paths: # --------------------------------------------------------------------------- # Endpoints # --------------------------------------------------------------------------- - /v1/deployments/{deploymentId}/endpoints: + /v1/apps/{appId}/endpoints: get: tags: - Endpoints summary: List endpoints operationId: listEndpoints parameters: - - $ref: '#/components/parameters/DeploymentId' + - $ref: '#/components/parameters/AppId' - $ref: '#/components/parameters/Limit' - $ref: '#/components/parameters/Cursor' responses: '200': - description: A page of deployment's endpoints + description: A page of the app's endpoints content: application/json: schema: @@ -1157,14 +1161,14 @@ paths: '422': $ref: '#/components/responses/ValidationError' - /v1/deployments/{deploymentId}/endpoints/{endpointId}: + /v1/apps/{appId}/endpoints/{endpointId}: get: tags: - Endpoints summary: Get an endpoint operationId: getEndpoint parameters: - - $ref: '#/components/parameters/DeploymentId' + - $ref: '#/components/parameters/AppId' - name: endpointId in: path required: true @@ -1194,18 +1198,18 @@ paths: # --------------------------------------------------------------------------- # Workers (read-only runtime state) # --------------------------------------------------------------------------- - /v1/deployments/{deploymentId}/workers: + /v1/apps/{appId}/workers: get: tags: - Workers summary: List workers description: > - Returns a newest-first page of workers observed for the deployment (including + Returns a newest-first page of workers observed for the app (including terminal `stopped` rows until purged). Optional `status` narrows the page; a cursor must be replayed under the same status filter it was issued with. operationId: listWorkers parameters: - - $ref: '#/components/parameters/DeploymentId' + - $ref: '#/components/parameters/AppId' - $ref: '#/components/parameters/Limit' - $ref: '#/components/parameters/Cursor' - name: status @@ -1240,18 +1244,18 @@ paths: '422': $ref: '#/components/responses/ValidationError' - /v1/deployments/{deploymentId}/workers/{workerId}: + /v1/apps/{appId}/workers/{workerId}: get: tags: - Workers summary: Get a worker description: > - Returns one worker by id within the deployment. The id is the Kubernetes + Returns one worker by id within the app. The id is the Kubernetes pod UID recorded by the reconciler. A worker that belongs to another - deployment (or tenant) is not found. + app (or tenant) is not found. operationId: getWorker parameters: - - $ref: '#/components/parameters/DeploymentId' + - $ref: '#/components/parameters/AppId' - $ref: '#/components/parameters/WorkerId' responses: '200': @@ -1391,9 +1395,9 @@ paths: revision. This API does not hard-delete the row; a future GC path is expected to remove unattached `pending_destroy` secrets and release the name, but that sweep is not implemented yet. Returns `409` while any - deployment still attaches it — cascade-detach is not performed here; + app still attaches it — cascade-detach is not performed here; detach each holder with - `DELETE .../deployments/{id}/secrets/{name}` first. Attach/detach are + `DELETE .../apps/{id}/secrets/{name}` first. Attach/detach are control-plane records only in this release (they do not roll workers). While the row remains `pending_destroy` the name stays reserved, so create may return `409` even though list no longer shows the secret. @@ -1421,16 +1425,16 @@ paths: $ref: '#/components/responses/ValidationError' # --------------------------------------------------------------------------- - # Deployment <-> secret attachments + # App <-> secret attachments # --------------------------------------------------------------------------- - /v1/deployments/{deploymentId}/secrets: + /v1/apps/{appId}/secrets: get: tags: - Secrets - summary: List secrets attached to a deployment - operationId: listDeploymentSecrets + summary: List secrets attached to an app + operationId: listAppSecrets parameters: - - $ref: '#/components/parameters/DeploymentId' + - $ref: '#/components/parameters/AppId' - $ref: '#/components/parameters/Limit' - $ref: '#/components/parameters/Cursor' responses: @@ -1462,28 +1466,28 @@ paths: post: tags: - Secrets - summary: Attach a secret to a deployment + summary: Attach a secret to an app description: > - Records that an organisation secret is attached to a deployment under a + Records that an organisation secret is attached to an app under a resolved env-var name. This is a control-plane association only in this release — it does not roll workers or inject values into pods yet (ADR-019 in-pod unseal is separate). Returns `409` if the secret is already attached, or if another attach would use the same env-var name. The resolved name (`envVarName`, or `secretName` when omitted) must not - already exist as a plain environment variable on this deployment + already exist as a plain environment variable on this app (`deployment_configs.key`). Both sources are reserved for the same future pod env namespace, so the server rejects the collision with `422` instead of allowing a last-wins override later. The reverse check applies when setting a plain environment variable. - A deployment holds at most 100 environment bindings in total — plain + An app holds at most 100 environment bindings in total — plain environment variables plus attached secrets — the same combined ceiling as create and the single-key env-var route. Attaching when the - deployment is already at that limit returns `422`. - operationId: attachDeploymentSecret + app is already at that limit returns `422`. + operationId: attachAppSecret parameters: - - $ref: '#/components/parameters/DeploymentId' + - $ref: '#/components/parameters/AppId' requestBody: required: true content: @@ -1508,17 +1512,17 @@ paths: '422': $ref: '#/components/responses/ValidationError' - /v1/deployments/{deploymentId}/secrets/{secretName}: + /v1/apps/{appId}/secrets/{secretName}: delete: tags: - Secrets - summary: Detach a secret from a deployment + summary: Detach a secret from an app description: > Removes the control-plane attachment. Does not roll workers in this release. - operationId: detachDeploymentSecret + operationId: detachAppSecret parameters: - - $ref: '#/components/parameters/DeploymentId' + - $ref: '#/components/parameters/AppId' - $ref: '#/components/parameters/SecretName' responses: '204': @@ -1537,14 +1541,14 @@ paths: # --------------------------------------------------------------------------- # Environment Variables (plain-text env vars) # --------------------------------------------------------------------------- - /v1/deployments/{deploymentId}/environment-variables: + /v1/apps/{appId}/environment-variables: get: tags: - EnvironmentVariables - summary: List deployment environment variables - operationId: listDeploymentEnvironmentVariables + summary: List app environment variables + operationId: listAppEnvironmentVariables parameters: - - $ref: '#/components/parameters/DeploymentId' + - $ref: '#/components/parameters/AppId' - $ref: '#/components/parameters/Limit' - $ref: '#/components/parameters/Cursor' responses: @@ -1570,31 +1574,31 @@ paths: '404': $ref: '#/components/responses/NotFound' - /v1/deployments/{deploymentId}/environment-variables/{variableName}: + /v1/apps/{appId}/environment-variables/{variableName}: put: tags: - EnvironmentVariables - summary: Update a deployment environment variable + summary: Update an app environment variable description: >- Sets one environment variable, creating it if absent. Names the platform sets on the serving container itself are rejected with `422`, as they are on create. - A deployment holds at most 100 environment bindings in total — plain + An app holds at most 100 environment bindings in total — plain variables plus attached secrets — the same combined ceiling - `DeploymentCreate.environmentVariables` declares (create rejects secrets + `AppCreate.environmentVariables` declares (create rejects secrets in-request; attach grows the set later). Overwriting an existing variable is always allowed; adding one past the ceiling returns `422`. - The name must not collide with a secret already attached to this deployment + The name must not collide with a secret already attached to this app (the secret's injected env var name). Secrets and plain env vars share the pod environment; a duplicate would be resolved last-wins by kubelet with no error, so the server rejects it with `422`. The reverse check applies on attach. - operationId: updateDeploymentEnvironmentVariable + operationId: updateAppEnvironmentVariable parameters: - - $ref: '#/components/parameters/DeploymentId' + - $ref: '#/components/parameters/AppId' - name: variableName in: path required: true @@ -1628,10 +1632,10 @@ paths: delete: tags: - EnvironmentVariables - summary: Delete a deployment environment variable - operationId: deleteDeploymentEnvironmentVariable + summary: Delete an app environment variable + operationId: deleteAppEnvironmentVariable parameters: - - $ref: '#/components/parameters/DeploymentId' + - $ref: '#/components/parameters/AppId' - name: variableName in: path required: true @@ -1652,21 +1656,21 @@ paths: # --------------------------------------------------------------------------- # Observability # --------------------------------------------------------------------------- - /v1/deployments/{deploymentId}/events: + /v1/apps/{appId}/events: get: tags: - Observability - summary: List deployment events - operationId: listDeploymentEvents + summary: List app events + operationId: listAppEvents parameters: - - $ref: '#/components/parameters/DeploymentId' + - $ref: '#/components/parameters/AppId' - $ref: '#/components/parameters/Limit' - $ref: '#/components/parameters/Cursor' - name: type in: query required: false schema: - $ref: '#/components/schemas/DeploymentEventType' + $ref: '#/components/schemas/AppEventType' responses: '200': description: A page of events @@ -1680,7 +1684,7 @@ paths: data: type: array items: - $ref: '#/components/schemas/DeploymentEvent' + $ref: '#/components/schemas/AppEvent' '401': $ref: '#/components/responses/Unauthorized' '503': @@ -1700,11 +1704,11 @@ paths: parameters: - $ref: '#/components/parameters/Limit' - $ref: '#/components/parameters/Cursor' - - name: deploymentId + - name: appId in: query required: false schema: - $ref: '#/components/schemas/DeploymentId' + $ref: '#/components/schemas/AppId' - name: from in: query required: false @@ -1760,13 +1764,13 @@ components: published JWKS. Serves the web app; the CLI and SDK use ApiKeyAuth. parameters: - DeploymentId: - name: deploymentId + AppId: + name: appId in: path required: true - description: Immutable deployment identifier, unique within the authenticated organisation. + description: Immutable app identifier, unique within the authenticated organisation. schema: - $ref: '#/components/schemas/DeploymentId' + $ref: '#/components/schemas/AppId' GpuTypeId: name: gpuTypeId in: path @@ -1899,19 +1903,19 @@ components: $ref: '#/components/schemas/ProblemDetails' schemas: - DeploymentId: + AppId: type: string - description: Immutable deployment identifier, unique within the authenticated organisation. + description: Immutable app identifier, unique within the authenticated organisation. minLength: 6 maxLength: 30 pattern: '^[a-z][a-z0-9-]{4,28}[a-z0-9]$' - DeploymentName: + AppName: type: string description: > Mutable display name. Must contain at least one non-whitespace character: it is what the console renders and what `sort=name` orders on, and it is - not required to be unique. Unlike `deploymentId` the pattern is + not required to be unique. Unlike `appId` the pattern is unanchored, so interior spaces are allowed — only an entirely blank name is rejected. minLength: 1 @@ -1949,7 +1953,7 @@ components: pattern: '^[A-Za-z_][A-Za-z0-9_]{0,127}$' # ---- Enums ------------------------------------------------------------- - DeploymentStatus: + AppStatus: type: string enum: - initializing @@ -1959,23 +1963,23 @@ components: - deleting - deleted - failed - DeploymentSort: + AppSort: type: string description: > - Ordering for `listDeployments`. Every ordering is total (ties broken by - `deploymentId`), so a page is reproducible and its cursor stable. + Ordering for `listApps`. Every ordering is total (ties broken by + `appId`), so a page is reproducible and its cursor stable. - `createdAt`: newest first. The default. - - `name`: `deploymentName` A–Z, case-insensitive. + - `name`: `appName` A–Z, case-insensitive. - `activity`: most recently active first. - `errorRate`: highest error rate first. - `activity` and `errorRate` rank on per-deployment traffic metrics, which are not + `activity` and `errorRate` rank on per-app traffic metrics, which are not collected yet; requesting either returns `422` until they are. default: createdAt enum: @@ -1994,9 +1998,11 @@ components: - superseded ComputeType: type: string + description: > + Worker compute class. GPU is the only supported value. CPU workloads + are not supported. enum: - gpu - - cpu WorkerStatus: type: string description: > @@ -2029,7 +2035,7 @@ components: unseal path (ADR-019) and await their own decision. enum: - generic - DeploymentEventType: + AppEventType: type: string enum: - deploy @@ -2189,6 +2195,11 @@ components: example: 80 GB HBM availability: $ref: '#/components/schemas/GpuAvailability' + deletedAt: + type: string + format: date-time + nullable: true + description: Retirement time, returned only in the Runware catalogue view. pricing: allOf: - $ref: '#/components/schemas/GpuPricing' @@ -2304,35 +2315,35 @@ components: $ref: '#/components/schemas/Currency' # ---- Core resources ---------------------------------------------------- - DeploymentSummary: + AppSummary: type: object description: > - Aggregate dashboard metrics for every deployment in the authenticated - organisation. Deployment and worker tallies are always present (zero when + Aggregate dashboard metrics for every app in the authenticated + organisation. App and worker tallies are always present (zero when empty). Traffic and spend metrics whose backing system is not yet available are omitted (rendered as "no data" by the frontend) rather than reported as zero. required: - - totalDeployments - - activeDeployments + - totalApps + - activeApps - activeWorkers - provisionedGpuCount - calculatedAt properties: - activeDeployments: + activeApps: type: integer format: int64 - description: Deployments currently in the `active` status. - totalDeployments: + description: Apps currently in the `active` status. + totalApps: type: integer format: int64 - description: All deployments in the organisation excluding soft-deleted ones. + description: All apps in the organisation excluding soft-deleted ones. activeWorkers: type: integer format: int64 description: > Non-terminal workers (`status` other than `stopped`) across every - deployment in the organisation. + app in the organisation. provisionedGpuCount: type: integer format: int64 @@ -2357,11 +2368,11 @@ components: format: date-time description: When these metrics were computed. - Deployment: + App: type: object required: - - deploymentId - - deploymentName + - appId + - appName - configuration - secrets - environmentVariables @@ -2370,41 +2381,41 @@ components: - createdAt - updatedAt properties: - deploymentId: - $ref: '#/components/schemas/DeploymentId' - deploymentName: - $ref: '#/components/schemas/DeploymentName' + appId: + $ref: '#/components/schemas/AppId' + appName: + $ref: '#/components/schemas/AppName' configuration: allOf: - $ref: '#/components/schemas/WorkerConfig' - description: Live worker configuration. Updated via `PATCH /deployments/{deploymentId}`. + description: Live worker configuration. Updated via `PATCH /apps/{appId}`. secrets: type: array description: > - Secrets attached to this deployment, including any env-var name - override. Populated on single-deployment responses; list of - deployments returns an empty array to avoid an N+1 — use - `/deployments/{deploymentId}/secrets` to page the set. + Secrets attached to this app, including any env-var name + override. Populated on single-app responses; list of + apps returns an empty array to avoid an N+1 — use + `/apps/{appId}/secrets` to page the set. items: $ref: '#/components/schemas/SecretAttachment' environmentVariables: type: array description: > - Plain-text environment variables for this deployment. Populated on - single-deployment responses (get, update, stop, resume, delete, - deploy, favourite). List of deployments returns an empty array to + Plain-text environment variables for this app. Populated on + single-app responses (get, update, stop, resume, delete, + deploy, favourite). List of apps returns an empty array to avoid an N+1 per page row — use the `/environment-variables` endpoints to page the set. items: $ref: '#/components/schemas/EnvironmentVariable' status: - $ref: '#/components/schemas/DeploymentStatus' + $ref: '#/components/schemas/AppStatus' isFavourite: type: boolean description: > - Whether the authenticated organisation has favourited this deployment. Drives the + Whether the authenticated organisation has favourited this app. Drives the console Favourites section; toggled via `PUT`/`DELETE` - `/v1/deployments/{deploymentId}/favourite`. + `/v1/apps/{appId}/favourite`. activeVersionId: type: string format: uuid @@ -2430,51 +2441,51 @@ components: pattern: '^/[A-Za-z0-9._/+@-]+$' description: > Absolute path exposed inside the sandboxed application. The path is the - volume's stable identity and is mirrored below the deployment's node-local + volume's stable identity and is mirrored below the app's node-local data directory. Root, duplicate, and overlapping paths are rejected. - DeploymentCreate: + AppCreate: type: object # Unknown fields are rejected rather than ignored: a stale client sending a # field that has moved (e.g. the top-level `computeType`, now inside # `configuration`) must fail loudly instead of silently getting the default. additionalProperties: false required: - - deploymentId - - deploymentName + - appId + - appName - configuration - - deploymentSource + - appSource properties: - deploymentId: - $ref: '#/components/schemas/DeploymentId' - deploymentName: - $ref: '#/components/schemas/DeploymentName' + appId: + $ref: '#/components/schemas/AppId' + appName: + $ref: '#/components/schemas/AppName' configuration: $ref: '#/components/schemas/WorkerConfigCreate' - deploymentSource: + appSource: allOf: - - $ref: '#/components/schemas/DeploymentSourceUpsert' + - $ref: '#/components/schemas/AppSourceUpsert' description: > - Write-only. Source for the initial deployment; not returned in the Deployment response. + Write-only. Source for the app's first version; not returned in the App response. Use the `/builds` endpoints to inspect build status. - `code`: the codebase is submitted to the build pipeline; a new image is built and deployed once ready. - `container`: no build step — the version names the image reference supplied here. - No worker runs from a container source yet, so the deployment stays `initializing`. + No worker runs from a container source yet, so the app stays `initializing`. - Either way the version is recorded with the deployment. A code deployment transitions + Either way the version is recorded with the app. A code-source app transitions to `active` once its first version is ready, or to `failed` if the build, validation, or rollout fails. secrets: type: array description: > - Existing organisation secrets to attach to this deployment, with an + Existing organisation secrets to attach to this app, with an optional env-var name override per entry. Not persisted yet — supplying this field returns `422`, rather than accepting a set nothing attaches to the workload. Shape matches - `POST /deployments/{deploymentId}/secrets` so create and attach + `POST /apps/{appId}/secrets` so create and attach share one contract. When wired, each injected name must not collide with a key in `environmentVariables` (or an existing `deployment_configs` row) — see `SecretAttach`. @@ -2485,13 +2496,13 @@ components: description: > Map with environment variables. Keys are the environment variable names, values are the environment variable values. Use the dedicated - `/environment-variables` endpoints to change them after the deployment exists. + `/environment-variables` endpoints to change them after the app exists. Each key must satisfy `EnvironmentVariableName` — POSIX-style, at most 128 characters. OpenAPI 3.0 cannot constrain map keys, so a bad one is rejected by the server rather than by the schema. Keys must also not collide with - a secret's injected env var name on the same deployment (see - `attachDeploymentSecret`). + a secret's injected env var name on the same app (see + `attachAppSecret`). maxProperties: 100 additionalProperties: type: string @@ -2505,22 +2516,22 @@ components: Persistent node-local directories bind-mounted through the checkpointer into the sandboxed application. Use these for downloaded weights and caches that must stay outside the checkpointed root filesystem. Paths must be unique and - non-overlapping. The set is frozen into each immutable deployment version. + non-overlapping. The set is frozen into each immutable app version. endpoints: type: array description: > - Invocable routes to expose on the deployment. Paths are unique within a - deployment: repeating one in this array is rejected rather than collapsed, + Invocable routes to expose on the app. Paths are unique within an + app: repeating one in this array is rejected rather than collapsed, since there would be no answer to which entry a request meant. uniqueItems: true maxItems: 20 items: $ref: '#/components/schemas/EndpointCreate' - DeploymentUpdate: + AppUpdate: type: object description: > - Updates one or more aspects of a deployment in place. All fields are optional; + Updates one or more aspects of an app in place. All fields are optional; omitted fields are left unchanged. Lifecycle transitions (stop/resume/delete/deploy) use their dedicated operations. @@ -2529,40 +2540,40 @@ components: mutable row. `activeVersionId` does not move: the running workload is unchanged until that version is deployed. - **Currently applied:** `deploymentName` and `configuration`. Supplying - `deploymentSource`, `secrets`, `environmentVariables`, or `endpoints` returns `422` + **Currently applied:** `appName` and `configuration`. Supplying + `appSource`, `secrets`, `environmentVariables`, or `endpoints` returns `422` (bulk env-var replace is not wired — use the dedicated `/environment-variables` endpoints for individual keys). When wired, configuration/secret/endpoint changes - take effect on the next Scaler cycle; `deploymentSource` triggers a new build and + take effect on the next Scaler cycle; `appSource` triggers a new build and rollout. additionalProperties: false properties: - deploymentName: + appName: allOf: - - $ref: '#/components/schemas/DeploymentName' + - $ref: '#/components/schemas/AppName' description: > - Mutable display name; does not affect deployment identity or routing. + Mutable display name; does not affect app identity or routing. Omit to leave unchanged — an explicit blank value is rejected, not treated as a clear. configuration: $ref: '#/components/schemas/WorkerConfigPatch' - deploymentSource: + appSource: allOf: - - $ref: '#/components/schemas/DeploymentSourceUpsert' + - $ref: '#/components/schemas/AppSourceUpsert' description: > - Write-only. New source to build and deploy; not returned in the Deployment response. + Write-only. New source to build and deploy; not returned in the App response. Use the `/builds` endpoints to inspect build status. Triggers a build (for `code` sources) or image validation (for `container` sources); on success the resulting - version is deployed automatically. On failure the deployment remains on the previous + version is deployed automatically. On failure the app remains on the previous version. Not persisted yet — supplying this field returns `422`. secrets: type: array description: > - Replaces the deployment's secret attachments. Same `SecretAttach` + Replaces the app's secret attachments. Same `SecretAttach` shape as create and - `POST /deployments/{deploymentId}/secrets`. Not persisted yet — + `POST /apps/{appId}/secrets`. Not persisted yet — supplying this field returns `422`. When wired, injected names must - not collide with plain environment variables on the deployment. + not collide with plain environment variables on the app. items: $ref: '#/components/schemas/SecretAttach' environmentVariables: @@ -2570,7 +2581,7 @@ components: description: > Map with environment variables. Keys are the environment variable names, values are the environment variable values. Setting the value of an environment variable - to null deletes the environment variable from the deployment. Not persisted yet — + to null deletes the environment variable from the app. Not persisted yet — supplying this field returns `422`. additionalProperties: type: string @@ -2578,7 +2589,7 @@ components: endpoints: type: array description: > - Replaces the deployment's endpoints. Not persisted yet — supplying this field + Replaces the app's endpoints. Not persisted yet — supplying this field returns `422`. items: $ref: '#/components/schemas/EndpointCreate' @@ -2587,7 +2598,7 @@ components: type: object required: - id - - deploymentId + - appId - computeType - gpusPerWorker - minWorkers @@ -2599,8 +2610,8 @@ components: id: type: string format: uuid - deploymentId: - $ref: '#/components/schemas/DeploymentId' + appId: + $ref: '#/components/schemas/AppId' computeType: $ref: '#/components/schemas/ComputeType' gpuType: @@ -2608,7 +2619,9 @@ components: allOf: - $ref: '#/components/schemas/GpuTypeId' nullable: true - description: Preferred GPU type; null when computeType is `cpu`. + description: > + Preferred GPU type. Absent (or null) only on historical + apps created before a GPU type was required. fallbackGpuType: type: string allOf: @@ -2664,6 +2677,7 @@ components: type: object additionalProperties: false required: + - gpuType - maxWorkers - idleTtlSecs - scalingDelaySecs @@ -2672,15 +2686,20 @@ components: allOf: - $ref: '#/components/schemas/ComputeType' default: 'gpu' + description: > + GPU is the only supported compute type. Omitting the field selects + GPU. CPU workloads are not supported; a request that names `cpu` is + rejected with 422 before a build or deploy starts. gpuType: type: string allOf: - $ref: '#/components/schemas/GpuTypeId' - nullable: true description: > - Preferred GPU type. Rejected with a 422 when no capacity is - currently offered for the type (it does not appear in - `GET /v1/gpu-types`). + GPU type the workers run on. Required: omitting it (or sending + null) is a 422 before a build or deploy starts, because a GPU + app with no type is unpinned and the deployer would render + NVIDIA defaults. Must match an `id` returned by `GET /v1/gpu-types` + that currently has admitted capacity. fallbackGpuType: type: string allOf: @@ -2786,24 +2805,24 @@ components: Version: type: object description: > - An immutable record of what to deploy. One is created with the deployment and one on + An immutable record of what to deploy. One is created with the app and one on every update, so a rollout always names a version rather than reading configuration that may since have changed. required: - id - - deploymentId + - appId - versionNumber - createdAt properties: id: type: string format: uuid - deploymentId: - $ref: '#/components/schemas/DeploymentId' + appId: + $ref: '#/components/schemas/AppId' versionNumber: type: integer format: int32 - description: Monotonically increasing per deployment. + description: Monotonically increasing per app. buildId: type: string format: uuid @@ -2888,7 +2907,7 @@ components: type: string description: Path within the zip to the MLflow model entry point (e.g. `model.py`). - DeploymentSourceUpsert: + AppSourceUpsert: type: object required: - type @@ -2931,27 +2950,27 @@ components: type: integer format: int32 description: > - Version number to deploy. Must reference a `ready` version on this deployment. + Version number to deploy. Must reference a `ready` version on this app. Any in-progress or queued builds are cancelled. Use an older version number to roll back. Endpoint: type: object required: - id - - deploymentId + - appId - path properties: id: type: string format: uuid - deploymentId: - $ref: '#/components/schemas/DeploymentId' + appId: + $ref: '#/components/schemas/AppId' path: type: string description: > - The endpoint's identity within the deployment: a bare lowercase URL + The endpoint's identity within the app: a bare lowercase URL segment, e.g. `generate`, with no leading slash. Unique within the - deployment, so it identifies the endpoint on its own. + app, so it identifies the endpoint on its own. createdAt: type: string format: date-time @@ -2970,12 +2989,12 @@ components: maxLength: 64 pattern: '^[a-z]([a-z0-9-]{0,62}[a-z0-9])?$' description: > - The endpoint's identity within the deployment: a bare lowercase URL + The endpoint's identity within the app: a bare lowercase URL segment, e.g. `generate` — a letter first, then letters, digits and hyphens, ending with a letter or digit, max 64 characters. No leading slash: documentation may display `/generate`, but the stored and addressed form is `generate`, so it drops into the invocation URL with - no encoding. Unique within the deployment. All invocations are POST; + no encoding. Unique within the app. All invocations are POST; the HTTP method is not part of endpoint identity. Worker: @@ -2985,7 +3004,7 @@ components: by the reconciler; `id` is the pod UID. required: - id - - deploymentId + - appId - versionId - podName - status @@ -2995,8 +3014,8 @@ components: id: type: string format: uuid - deploymentId: - $ref: '#/components/schemas/DeploymentId' + appId: + $ref: '#/components/schemas/AppId' versionId: type: string format: uuid @@ -3073,7 +3092,7 @@ components: SecretAttachment: description: > - A secret attached to a deployment. The encrypted value is never returned. + A secret attached to an app. The encrypted value is never returned. The database always stores the injected env var name; this response omits `envVarName` when it equals the secret `name` (no override). allOf: @@ -3093,11 +3112,11 @@ components: SecretAttach: type: object description: > - Attach an organisation secret to a deployment (control-plane record + Attach an organisation secret to an app (control-plane record only in this release). The resolved name (`envVarName`, or `secretName` when omitted) is stored as one NOT NULL column. It must be unique among - this deployment's secret attaches and must not collide with a plain - environment variable key on the same deployment — both names are + this app's secret attaches and must not collide with a plain + environment variable key on the same app — both names are reserved for the same future pod env namespace. Reserved platform names are rejected as on `SecretName`. required: @@ -3115,7 +3134,7 @@ components: injected. Omit or null to use `secretName`; the server resolves and stores the final name. Same reserved-name rules as `SecretName` (`422` if reserved). The resolved name must also not collide with - `deployment_configs.key` on this deployment (`422`). + `deployment_configs.key` on this app (`422`). SecretCreate: type: object @@ -3174,8 +3193,8 @@ components: id: type: string format: uuid - deploymentId: - $ref: '#/components/schemas/DeploymentId' + appId: + $ref: '#/components/schemas/AppId' key: $ref: '#/components/schemas/EnvironmentVariableName' value: @@ -3206,7 +3225,7 @@ components: required: - id - status - - deploymentId + - appId - createdAt properties: id: @@ -3214,8 +3233,8 @@ components: description: Opaque task identifier returned by the execution backend. status: $ref: '#/components/schemas/TaskStatus' - deploymentId: - $ref: '#/components/schemas/DeploymentId' + appId: + $ref: '#/components/schemas/AppId' output: type: object additionalProperties: true @@ -3237,7 +3256,7 @@ components: type: object required: - id - - deploymentId + - appId - workerId - eventType - gpuCount @@ -3246,8 +3265,8 @@ components: id: type: string format: uuid - deploymentId: - $ref: '#/components/schemas/DeploymentId' + appId: + $ref: '#/components/schemas/AppId' workerId: type: string format: uuid @@ -3273,19 +3292,19 @@ components: format: date-time description: When the event was recorded. Audit only — may lag `occurredAt`. - DeploymentEvent: + AppEvent: type: object required: - id - - deploymentId + - appId - type - message properties: id: type: string format: uuid - deploymentId: - $ref: '#/components/schemas/DeploymentId' + appId: + $ref: '#/components/schemas/AppId' workerId: type: string format: uuid @@ -3295,7 +3314,7 @@ components: format: uuid nullable: true type: - $ref: '#/components/schemas/DeploymentEventType' + $ref: '#/components/schemas/AppEventType' message: type: string pattern: '\S' @@ -3341,12 +3360,12 @@ components: detail: type: string description: Human-readable explanation specific to this occurrence. - example: No deployment 'img-gen' exists for the authenticated organisation. + example: No app 'img-gen' exists for the authenticated organisation. instance: type: string format: uri-reference description: URI reference identifying the specific occurrence (the request path). - example: /v1/deployments/img-gen + example: /v1/apps/img-gen requestId: type: string description: > @@ -3361,9 +3380,9 @@ components: type: string description: > Extension member. Present on a `404` from task invocation when the - deployment exists but does not declare the requested endpoint path; + app exists but does not declare the requested endpoint path; its presence distinguishes an unknown endpoint from an unknown - deployment. Carries the rejected path. + app. Carries the rejected path. example: generate errors: type: array @@ -3388,4 +3407,4 @@ components: description: > JSON Pointer (RFC 6901) to the offending field in the request body, e.g. `/configuration/maxWorkers`. Absent for non-body parameters. - example: /configuration/maxWorkers + example: /configuration/maxWorkers \ No newline at end of file diff --git a/docs/runware_serverless_deploy.md b/docs/runware_serverless_deploy.md index f9928b3..42c7efe 100644 --- a/docs/runware_serverless_deploy.md +++ b/docs/runware_serverless_deploy.md @@ -18,7 +18,7 @@ runware serverless deploy [flags] ``` # deploy a Python entry file - runware serverless deploy ./app.py --id my-app + runware serverless deploy ./app.py --id my-app --gpu-type h100 # override worker settings and base image runware serverless deploy ./app.py --id my-app --name "My App" \ @@ -30,7 +30,7 @@ runware serverless deploy [flags] ``` --base-image string Builder base image (default "python:3.11-slim") - --gpu-type string Preferred GPU type ID (see 'serverless gpus') + --gpu-type string GPU type ID (see 'serverless gpus') --gpus-per-worker int32 GPUs allocated per worker (default 1) -h, --help help for deploy --id string Application ID (immutable, lowercase slug) diff --git a/internal/api/serverless/client.go b/internal/api/serverless/client.go index 11f9aef..4638269 100644 --- a/internal/api/serverless/client.go +++ b/internal/api/serverless/client.go @@ -24,42 +24,42 @@ import ( // defaultTimeout bounds a single REST request. const defaultTimeout = 30 * time.Second -// createDeploymentTimeout bounds createDeployment, which uploads a base64 zip -// and can exceed the default request timeout on slow links or larger codebases. -const createDeploymentTimeout = 5 * time.Minute +// createAppTimeout bounds createApp, which uploads a base64 zip and can +// exceed the default request timeout on slow links or larger codebases. +const createAppTimeout = 5 * time.Minute // GpuType is the public catalogue entry for a supported GPU type. type GpuType = gen.GpuType -// Deployment is a serverless application (API: deployment). -type Deployment = gen.Deployment +// App is a serverless application. +type App = gen.App -// DeploymentCreate is the request body for createDeployment. -type DeploymentCreate = gen.DeploymentCreate +// AppCreate is the request body for createApp. +type AppCreate = gen.AppCreate -// DeploymentSourceUpsert selects the initial version creation path. -type DeploymentSourceUpsert = gen.DeploymentSourceUpsert +// AppSourceUpsert selects the initial version creation path. +type AppSourceUpsert = gen.AppSourceUpsert -// CodeSourceUpsert is a code-based deployment source. +// CodeSourceUpsert is a code-based app source. type CodeSourceUpsert = gen.CodeSourceUpsert // CodebaseSource is the zipped customer code payload. type CodebaseSource = gen.CodebaseSource -// WorkerConfig is the live worker configuration on a deployment. +// WorkerConfig is the live worker configuration on an app. type WorkerConfig = gen.WorkerConfig // WorkerConfigCreate is the worker configuration supplied at create time. type WorkerConfigCreate = gen.WorkerConfigCreate -// DeploymentUpdate is the request body for updateDeployment. -type DeploymentUpdate = gen.DeploymentUpdate +// AppUpdate is the request body for updateApp. +type AppUpdate = gen.AppUpdate -// WorkerConfigPatch is a partial worker configuration for updateDeployment. +// WorkerConfigPatch is a partial worker configuration for updateApp. type WorkerConfigPatch = gen.WorkerConfigPatch -// ListDeploymentsParams are optional filters for ListDeployments. -type ListDeploymentsParams = gen.ListDeploymentsParams +// ListAppsParams are optional filters for ListApps. +type ListAppsParams = gen.ListAppsParams // ListEndpointsParams are optional filters for ListEndpoints. type ListEndpointsParams = gen.ListEndpointsParams @@ -70,7 +70,7 @@ type ListVersionsParams = gen.ListVersionsParams // ListBuildsParams are optional filters for ListBuilds. type ListBuildsParams = gen.ListBuildsParams -// Build is a code build or container validation for a deployment. +// Build is a code build or container validation for an app. type Build = gen.Build // BuildStatus is a build lifecycle status. @@ -79,7 +79,7 @@ type BuildStatus = gen.BuildStatus // ListWorkersParams are optional filters for ListWorkers. type ListWorkersParams = gen.ListWorkersParams -// Endpoint is a deployment HTTP endpoint. +// Endpoint is an app HTTP endpoint. type Endpoint = gen.Endpoint // Version is a deployed application version. @@ -88,11 +88,11 @@ type Version = gen.Version // Worker is a runtime worker instance. type Worker = gen.Worker -// DeploymentStatus is a deployment lifecycle status. -type DeploymentStatus = gen.DeploymentStatus +// AppStatus is an app lifecycle status. +type AppStatus = gen.AppStatus -// DeploymentSort is a listDeployments ordering. -type DeploymentSort = gen.DeploymentSort +// AppSort is a listApps ordering. +type AppSort = gen.AppSort // WorkerStatus is a worker lifecycle status. type WorkerStatus = gen.WorkerStatus @@ -109,8 +109,8 @@ type Page[T any] struct { NextCursor *string `json:"nextCursor,omitempty"` } -// DeploymentSourceTypeCode is deploymentSource.type = "code". -const DeploymentSourceTypeCode = gen.Code +// AppSourceTypeCode is appSource.type = "code". +const AppSourceTypeCode = gen.Code func pageOf[T any](data *[]T, nextCursor *string) Page[T] { if data == nil || *data == nil { @@ -174,20 +174,20 @@ func newGeneratedClient(apiKey, baseURL string, httpClient gen.HttpRequestDoer) return inner } -// createInner returns a generated client suitable for createDeployment. +// createInner returns a generated client suitable for createApp. // When the underlying doer is an *http.Client with a positive Timeout shorter -// than createDeploymentTimeout, a clone with the longer timeout is used so +// than createAppTimeout, a clone with the longer timeout is used so // large uploads are not cut off. A zero Timeout (no deadline) is left unchanged. func (c *Client) createInner() *gen.ClientWithResponses { hc, ok := c.doer.(*http.Client) if !ok { return c.inner } - if hc.Timeout == 0 || hc.Timeout >= createDeploymentTimeout { + if hc.Timeout == 0 || hc.Timeout >= createAppTimeout { return c.inner } cloned := *hc - cloned.Timeout = createDeploymentTimeout + cloned.Timeout = createAppTimeout return newGeneratedClient(c.apiKey, c.baseURL, &cloned) } @@ -219,15 +219,15 @@ func (c *Client) ListGpuTypes(ctx context.Context) ([]GpuType, error) { } } -// CreateDeployment creates a new deployment and starts its initial rollout. -func (c *Client) CreateDeployment(ctx context.Context, body DeploymentCreate) (*Deployment, error) { +// CreateApp creates a new app and starts its initial rollout. +func (c *Client) CreateApp(ctx context.Context, body AppCreate) (*App, error) { if c.apiKey == "" { return nil, transport.ErrNoAPIKey } - resp, err := c.createInner().CreateDeploymentWithResponse(ctx, body) + resp, err := c.createInner().CreateAppWithResponse(ctx, body) if err != nil { - return nil, fmt.Errorf("create deployment: %w", err) + return nil, fmt.Errorf("create app: %w", err) } c.logResponse(ctx, resp.HTTPResponse, resp.Body) @@ -235,7 +235,7 @@ func (c *Client) CreateDeployment(ctx context.Context, body DeploymentCreate) (* switch resp.StatusCode() { case http.StatusCreated: if resp.JSON201 == nil { - return nil, fmt.Errorf("create deployment: empty 201 response") + return nil, fmt.Errorf("create app: empty 201 response") } return resp.JSON201, nil case http.StatusBadRequest: @@ -253,15 +253,15 @@ func (c *Client) CreateDeployment(ctx context.Context, body DeploymentCreate) (* } } -// ListDeployments returns a page of deployments for the authenticated organisation. -func (c *Client) ListDeployments(ctx context.Context, params *ListDeploymentsParams) (Page[Deployment], error) { +// ListApps returns a page of apps for the authenticated organisation. +func (c *Client) ListApps(ctx context.Context, params *ListAppsParams) (Page[App], error) { if c.apiKey == "" { - return Page[Deployment]{}, transport.ErrNoAPIKey + return Page[App]{}, transport.ErrNoAPIKey } - resp, err := c.inner.ListDeploymentsWithResponse(ctx, params) + resp, err := c.inner.ListAppsWithResponse(ctx, params) if err != nil { - return Page[Deployment]{}, fmt.Errorf("list deployments: %w", err) + return Page[App]{}, fmt.Errorf("list apps: %w", err) } c.logResponse(ctx, resp.HTTPResponse, resp.Body) @@ -269,31 +269,31 @@ func (c *Client) ListDeployments(ctx context.Context, params *ListDeploymentsPar switch resp.StatusCode() { case http.StatusOK: if resp.JSON200 == nil { - return pageOf[Deployment](nil, nil), nil + return pageOf[App](nil, nil), nil } return pageOf(resp.JSON200.Data, resp.JSON200.NextCursor), nil case http.StatusBadRequest: - return Page[Deployment]{}, problemToError(resp.ApplicationproblemJSON400, http.StatusBadRequest) + return Page[App]{}, problemToError(resp.ApplicationproblemJSON400, http.StatusBadRequest) case http.StatusUnauthorized: - return Page[Deployment]{}, problemToError(resp.ApplicationproblemJSON401, http.StatusUnauthorized) + return Page[App]{}, problemToError(resp.ApplicationproblemJSON401, http.StatusUnauthorized) case http.StatusForbidden: - return Page[Deployment]{}, problemToError(resp.ApplicationproblemJSON403, http.StatusForbidden) + return Page[App]{}, problemToError(resp.ApplicationproblemJSON403, http.StatusForbidden) case http.StatusUnprocessableEntity: - return Page[Deployment]{}, problemToError(resp.ApplicationproblemJSON422, http.StatusUnprocessableEntity) + return Page[App]{}, problemToError(resp.ApplicationproblemJSON422, http.StatusUnprocessableEntity) default: - return Page[Deployment]{}, problemFromBody(resp.Body, resp.StatusCode()) + return Page[App]{}, problemFromBody(resp.Body, resp.StatusCode()) } } -// GetDeployment returns a single deployment by ID. -func (c *Client) GetDeployment(ctx context.Context, deploymentID string) (*Deployment, error) { +// GetApp returns a single app by ID. +func (c *Client) GetApp(ctx context.Context, appID string) (*App, error) { if c.apiKey == "" { return nil, transport.ErrNoAPIKey } - resp, err := c.inner.GetDeploymentWithResponse(ctx, deploymentID) + resp, err := c.inner.GetAppWithResponse(ctx, appID) if err != nil { - return nil, fmt.Errorf("get deployment: %w", err) + return nil, fmt.Errorf("get app: %w", err) } c.logResponse(ctx, resp.HTTPResponse, resp.Body) @@ -301,7 +301,7 @@ func (c *Client) GetDeployment(ctx context.Context, deploymentID string) (*Deplo switch resp.StatusCode() { case http.StatusOK: if resp.JSON200 == nil { - return nil, fmt.Errorf("get deployment: empty 200 response") + return nil, fmt.Errorf("get app: empty 200 response") } return resp.JSON200, nil case http.StatusUnauthorized: @@ -315,16 +315,16 @@ func (c *Client) GetDeployment(ctx context.Context, deploymentID string) (*Deplo } } -// UpdateDeployment patches a deployment in place. Omitted fields are left -// unchanged. Currently persisted: deploymentName and configuration. -func (c *Client) UpdateDeployment(ctx context.Context, deploymentID string, body DeploymentUpdate) (*Deployment, error) { +// UpdateApp patches an app in place. Omitted fields are left unchanged. +// Currently persisted: appName and configuration. +func (c *Client) UpdateApp(ctx context.Context, appID string, body AppUpdate) (*App, error) { if c.apiKey == "" { return nil, transport.ErrNoAPIKey } - resp, err := c.inner.UpdateDeploymentWithResponse(ctx, deploymentID, body) + resp, err := c.inner.UpdateAppWithResponse(ctx, appID, body) if err != nil { - return nil, fmt.Errorf("update deployment: %w", err) + return nil, fmt.Errorf("update app: %w", err) } c.logResponse(ctx, resp.HTTPResponse, resp.Body) @@ -332,7 +332,7 @@ func (c *Client) UpdateDeployment(ctx context.Context, deploymentID string, body switch resp.StatusCode() { case http.StatusOK: if resp.JSON200 == nil { - return nil, fmt.Errorf("update deployment: empty 200 response") + return nil, fmt.Errorf("update app: empty 200 response") } return resp.JSON200, nil case http.StatusBadRequest: @@ -352,21 +352,21 @@ func (c *Client) UpdateDeployment(ctx context.Context, deploymentID string, body } } -// StopDeployment accepts a stop and returns the deployment with status -// stopping. Worker drain is asynchronous. -func (c *Client) StopDeployment(ctx context.Context, deploymentID string) (*Deployment, error) { +// StopApp accepts a stop and returns the app with status stopping. Worker +// drain is asynchronous. +func (c *Client) StopApp(ctx context.Context, appID string) (*App, error) { if c.apiKey == "" { return nil, transport.ErrNoAPIKey } - resp, err := c.inner.StopDeploymentWithResponse(ctx, deploymentID) + resp, err := c.inner.StopAppWithResponse(ctx, appID) if err != nil { - return nil, fmt.Errorf("stop deployment: %w", err) + return nil, fmt.Errorf("stop app: %w", err) } c.logResponse(ctx, resp.HTTPResponse, resp.Body) - return acceptedDeployment("stop deployment", resp.StatusCode(), resp.JSON202, resp.Body, lifecycleProblems{ + return acceptedApp("stop app", resp.StatusCode(), resp.JSON202, resp.Body, lifecycleProblems{ Unauthorized: resp.ApplicationproblemJSON401, Forbidden: resp.ApplicationproblemJSON403, NotFound: resp.ApplicationproblemJSON404, @@ -374,21 +374,21 @@ func (c *Client) StopDeployment(ctx context.Context, deploymentID string) (*Depl }) } -// ResumeDeployment accepts a resume and returns the deployment with status -// initializing. Worker start is asynchronous. -func (c *Client) ResumeDeployment(ctx context.Context, deploymentID string) (*Deployment, error) { +// ResumeApp accepts a resume and returns the app with status initializing. +// Worker start is asynchronous. +func (c *Client) ResumeApp(ctx context.Context, appID string) (*App, error) { if c.apiKey == "" { return nil, transport.ErrNoAPIKey } - resp, err := c.inner.ResumeDeploymentWithResponse(ctx, deploymentID) + resp, err := c.inner.ResumeAppWithResponse(ctx, appID) if err != nil { - return nil, fmt.Errorf("resume deployment: %w", err) + return nil, fmt.Errorf("resume app: %w", err) } c.logResponse(ctx, resp.HTTPResponse, resp.Body) - return acceptedDeployment("resume deployment", resp.StatusCode(), resp.JSON202, resp.Body, lifecycleProblems{ + return acceptedApp("resume app", resp.StatusCode(), resp.JSON202, resp.Body, lifecycleProblems{ Unauthorized: resp.ApplicationproblemJSON401, Forbidden: resp.ApplicationproblemJSON403, NotFound: resp.ApplicationproblemJSON404, @@ -396,21 +396,21 @@ func (c *Client) ResumeDeployment(ctx context.Context, deploymentID string) (*De }) } -// DeleteDeployment accepts a soft delete and returns the deployment with -// status deleting. Router removal and worker drain are asynchronous. -func (c *Client) DeleteDeployment(ctx context.Context, deploymentID string) (*Deployment, error) { +// DeleteApp accepts a soft delete and returns the app with status deleting. +// Router removal and worker drain are asynchronous. +func (c *Client) DeleteApp(ctx context.Context, appID string) (*App, error) { if c.apiKey == "" { return nil, transport.ErrNoAPIKey } - resp, err := c.inner.DeleteDeploymentWithResponse(ctx, deploymentID) + resp, err := c.inner.DeleteAppWithResponse(ctx, appID) if err != nil { - return nil, fmt.Errorf("delete deployment: %w", err) + return nil, fmt.Errorf("delete app: %w", err) } c.logResponse(ctx, resp.HTTPResponse, resp.Body) - return acceptedDeployment("delete deployment", resp.StatusCode(), resp.JSON202, resp.Body, lifecycleProblems{ + return acceptedApp("delete app", resp.StatusCode(), resp.JSON202, resp.Body, lifecycleProblems{ Unauthorized: resp.ApplicationproblemJSON401, Forbidden: resp.ApplicationproblemJSON403, NotFound: resp.ApplicationproblemJSON404, @@ -425,13 +425,13 @@ type lifecycleProblems struct { Conflict *gen.ProblemDetails } -func acceptedDeployment(op string, status int, dep *Deployment, body []byte, problems lifecycleProblems) (*Deployment, error) { +func acceptedApp(op string, status int, app *App, body []byte, problems lifecycleProblems) (*App, error) { switch status { case http.StatusAccepted: - if dep == nil { + if app == nil { return nil, fmt.Errorf("%s: empty 202 response", op) } - return dep, nil + return app, nil case http.StatusUnauthorized: return nil, problemToError(problems.Unauthorized, http.StatusUnauthorized) case http.StatusForbidden: @@ -448,13 +448,13 @@ func acceptedDeployment(op string, status int, dep *Deployment, body []byte, pro } } -// ListEndpoints returns a page of endpoints for a deployment. -func (c *Client) ListEndpoints(ctx context.Context, deploymentID string, params *ListEndpointsParams) (Page[Endpoint], error) { +// ListEndpoints returns a page of endpoints for an app. +func (c *Client) ListEndpoints(ctx context.Context, appID string, params *ListEndpointsParams) (Page[Endpoint], error) { if c.apiKey == "" { return Page[Endpoint]{}, transport.ErrNoAPIKey } - resp, err := c.inner.ListEndpointsWithResponse(ctx, deploymentID, params) + resp, err := c.inner.ListEndpointsWithResponse(ctx, appID, params) if err != nil { return Page[Endpoint]{}, fmt.Errorf("list endpoints: %w", err) } @@ -478,13 +478,13 @@ func (c *Client) ListEndpoints(ctx context.Context, deploymentID string, params } } -// ListVersions returns a page of versions for a deployment. -func (c *Client) ListVersions(ctx context.Context, deploymentID string, params *ListVersionsParams) (Page[Version], error) { +// ListVersions returns a page of versions for an app. +func (c *Client) ListVersions(ctx context.Context, appID string, params *ListVersionsParams) (Page[Version], error) { if c.apiKey == "" { return Page[Version]{}, transport.ErrNoAPIKey } - resp, err := c.inner.ListVersionsWithResponse(ctx, deploymentID, params) + resp, err := c.inner.ListVersionsWithResponse(ctx, appID, params) if err != nil { return Page[Version]{}, fmt.Errorf("list versions: %w", err) } @@ -509,12 +509,12 @@ func (c *Client) ListVersions(ctx context.Context, deploymentID string, params * } // GetVersion returns a single version by number. -func (c *Client) GetVersion(ctx context.Context, deploymentID string, versionNumber int32) (*Version, error) { +func (c *Client) GetVersion(ctx context.Context, appID string, versionNumber int32) (*Version, error) { if c.apiKey == "" { return nil, transport.ErrNoAPIKey } - resp, err := c.inner.GetVersionWithResponse(ctx, deploymentID, versionNumber) + resp, err := c.inner.GetVersionWithResponse(ctx, appID, versionNumber) if err != nil { return nil, fmt.Errorf("get version: %w", err) } @@ -538,13 +538,13 @@ func (c *Client) GetVersion(ctx context.Context, deploymentID string, versionNum } } -// ListBuilds returns a page of builds for a deployment. -func (c *Client) ListBuilds(ctx context.Context, deploymentID string, params *ListBuildsParams) (Page[Build], error) { +// ListBuilds returns a page of builds for an app. +func (c *Client) ListBuilds(ctx context.Context, appID string, params *ListBuildsParams) (Page[Build], error) { if c.apiKey == "" { return Page[Build]{}, transport.ErrNoAPIKey } - resp, err := c.inner.ListBuildsWithResponse(ctx, deploymentID, params) + resp, err := c.inner.ListBuildsWithResponse(ctx, appID, params) if err != nil { return Page[Build]{}, fmt.Errorf("list builds: %w", err) } @@ -569,12 +569,12 @@ func (c *Client) ListBuilds(ctx context.Context, deploymentID string, params *Li } // GetBuild returns a single build by ID. -func (c *Client) GetBuild(ctx context.Context, deploymentID string, buildID uuid.UUID) (*Build, error) { +func (c *Client) GetBuild(ctx context.Context, appID string, buildID uuid.UUID) (*Build, error) { if c.apiKey == "" { return nil, transport.ErrNoAPIKey } - resp, err := c.inner.GetBuildWithResponse(ctx, deploymentID, buildID) + resp, err := c.inner.GetBuildWithResponse(ctx, appID, buildID) if err != nil { return nil, fmt.Errorf("get build: %w", err) } @@ -598,13 +598,13 @@ func (c *Client) GetBuild(ctx context.Context, deploymentID string, buildID uuid } } -// ListWorkers returns a page of workers for a deployment. -func (c *Client) ListWorkers(ctx context.Context, deploymentID string, params *ListWorkersParams) (Page[Worker], error) { +// ListWorkers returns a page of workers for an app. +func (c *Client) ListWorkers(ctx context.Context, appID string, params *ListWorkersParams) (Page[Worker], error) { if c.apiKey == "" { return Page[Worker]{}, transport.ErrNoAPIKey } - resp, err := c.inner.ListWorkersWithResponse(ctx, deploymentID, params) + resp, err := c.inner.ListWorkersWithResponse(ctx, appID, params) if err != nil { return Page[Worker]{}, fmt.Errorf("list workers: %w", err) } @@ -628,14 +628,14 @@ func (c *Client) ListWorkers(ctx context.Context, deploymentID string, params *L } } -// NewCodeDeploymentSource builds a deploymentSource for a code-based create. -func NewCodeDeploymentSource(src CodeSourceUpsert) (DeploymentSourceUpsert, error) { - var source gen.DeploymentSourceUpsert_Source +// NewCodeAppSource builds an appSource for a code-based create. +func NewCodeAppSource(src CodeSourceUpsert) (AppSourceUpsert, error) { + var source gen.AppSourceUpsert_Source if err := source.FromCodeSourceUpsert(src); err != nil { - return DeploymentSourceUpsert{}, err + return AppSourceUpsert{}, err } - return DeploymentSourceUpsert{ - Type: DeploymentSourceTypeCode, + return AppSourceUpsert{ + Type: AppSourceTypeCode, Source: source, }, nil } diff --git a/internal/api/serverless/client_test.go b/internal/api/serverless/client_test.go index 79e1fa0..e47f60a 100644 --- a/internal/api/serverless/client_test.go +++ b/internal/api/serverless/client_test.go @@ -17,7 +17,8 @@ import ( ) const ( - testDeploymentID = "my-app" + testAppID = "my-app" + testGPUType = "h100" testBuildID = "33333333-3333-3333-3333-333333333333" testVersionID = "22222222-2222-2222-2222-222222222222" testVersionNumber = int32(1) @@ -46,7 +47,7 @@ func TestListGpuTypes(t *testing.T) { if len(gpus) != 1 { t.Fatalf("expected 1 gpu, got %d", len(gpus)) } - if gpus[0].Id != "h100" || gpus[0].Pricing.PerSecond != "0.000767" { + if gpus[0].Id != testGPUType || gpus[0].Pricing.PerSecond != "0.000767" { t.Errorf("unexpected gpu: %+v", gpus[0]) } if gpus[0].Memory != "80 GB HBM" { @@ -127,16 +128,16 @@ func TestListGpuTypes_UnhandledStatusKeepsProblemDetails(t *testing.T) { } } -func TestCreateDeployment(t *testing.T) { +func TestCreateApp(t *testing.T) { srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - if r.Method != http.MethodPost || r.URL.Path != "/v1/deployments" { + if r.Method != http.MethodPost || r.URL.Path != "/v1/apps" { t.Errorf("unexpected %s %s", r.Method, r.URL.Path) } w.Header().Set("Content-Type", "application/json") w.WriteHeader(http.StatusCreated) _, _ = w.Write([]byte(`{ - "deploymentId":"my-app", - "deploymentName":"My App", + "appId":"my-app", + "appName":"My App", "status":"initializing", "configuration":{"maxWorkers":1,"idleTtlSecs":60,"scalingDelaySecs":10}, "environmentVariables":[], @@ -147,7 +148,7 @@ func TestCreateDeployment(t *testing.T) { })) defer srv.Close() - source, err := NewCodeDeploymentSource(CodeSourceUpsert{ + source, err := NewCodeAppSource(CodeSourceUpsert{ BaseImage: "python:3.11-slim", Codebase: CodebaseSource{ ModelFile: "app.py", @@ -155,41 +156,43 @@ func TestCreateDeployment(t *testing.T) { }, }) if err != nil { - t.Fatalf("NewCodeDeploymentSource: %v", err) + t.Fatalf("NewCodeAppSource: %v", err) } c := newClient("test-key", srv.URL, slog.Default(), srv.Client()) - dep, err := c.CreateDeployment(context.Background(), DeploymentCreate{ - DeploymentId: testDeploymentID, - DeploymentName: "My App", - DeploymentSource: source, + dep, err := c.CreateApp(context.Background(), AppCreate{ + AppId: testAppID, + AppName: "My App", + AppSource: source, Configuration: WorkerConfigCreate{ + GpuType: testGPUType, MaxWorkers: 1, IdleTtlSecs: 60, ScalingDelaySecs: 10, }, }) if err != nil { - t.Fatalf("CreateDeployment: %v", err) + t.Fatalf("CreateApp: %v", err) } - if dep.DeploymentId != testDeploymentID || string(dep.Status) != "initializing" { - t.Errorf("unexpected deployment: %+v", dep) + if dep.AppId != testAppID || string(dep.Status) != "initializing" { + t.Errorf("unexpected app: %+v", dep) } } -func TestCreateDeployment_Conflict(t *testing.T) { +func TestCreateApp_Conflict(t *testing.T) { srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", "application/problem+json") w.WriteHeader(http.StatusConflict) - _, _ = w.Write([]byte(`{"type":"about:blank","title":"Conflict","status":409,"detail":"Deployment already exists"}`)) + _, _ = w.Write([]byte(`{"type":"about:blank","title":"Conflict","status":409,"detail":"App already exists"}`)) })) defer srv.Close() c := newClient("test-key", srv.URL, slog.Default(), srv.Client()) - _, err := c.CreateDeployment(context.Background(), DeploymentCreate{ - DeploymentId: testDeploymentID, - DeploymentName: "My App", + _, err := c.CreateApp(context.Background(), AppCreate{ + AppId: testAppID, + AppName: "My App", Configuration: WorkerConfigCreate{ + GpuType: testGPUType, MaxWorkers: 1, IdleTtlSecs: 60, ScalingDelaySecs: 10, @@ -202,21 +205,21 @@ func TestCreateDeployment_Conflict(t *testing.T) { if re.Code != transport.CodeValidation { t.Errorf("expected CodeValidation, got %v", re.Code) } - if re.Message != "Deployment already exists" { + if re.Message != "App already exists" { t.Errorf("unexpected message: %q", re.Message) } } -func TestCreateDeployment_NoAPIKey(t *testing.T) { +func TestCreateApp_NoAPIKey(t *testing.T) { c := NewClient("", "https://example.invalid", slog.Default()) - if _, err := c.CreateDeployment(context.Background(), DeploymentCreate{}); !errors.Is(err, transport.ErrNoAPIKey) { + if _, err := c.CreateApp(context.Background(), AppCreate{}); !errors.Is(err, transport.ErrNoAPIKey) { t.Fatalf("expected ErrNoAPIKey, got %v", err) } } func TestPageOf_PreservesNextCursorWhenDataNil(t *testing.T) { next := testCursorPage2 - page := pageOf[Deployment](nil, &next) + page := pageOf[App](nil, &next) if len(page.Data) != 0 { t.Fatalf("expected empty data, got %+v", page.Data) } @@ -224,7 +227,7 @@ func TestPageOf_PreservesNextCursorWhenDataNil(t *testing.T) { t.Fatalf("unexpected nextCursor: %+v", page.NextCursor) } - var nilSlice []Deployment + var nilSlice []App page = pageOf(&nilSlice, &next) if page.Data == nil { t.Fatal("expected non-nil empty data slice") @@ -234,7 +237,7 @@ func TestPageOf_PreservesNextCursorWhenDataNil(t *testing.T) { } } -func TestListDeployments_EmptyDataKeepsNextCursor(t *testing.T) { +func TestListApps_EmptyDataKeepsNextCursor(t *testing.T) { srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", "application/json") _, _ = w.Write([]byte(`{"nextCursor":"` + testCursorPage2 + `"}`)) @@ -242,9 +245,9 @@ func TestListDeployments_EmptyDataKeepsNextCursor(t *testing.T) { defer srv.Close() c := newClient("test-key", srv.URL, slog.Default(), srv.Client()) - page, err := c.ListDeployments(context.Background(), nil) + page, err := c.ListApps(context.Background(), nil) if err != nil { - t.Fatalf("ListDeployments: %v", err) + t.Fatalf("ListApps: %v", err) } if len(page.Data) != 0 { t.Fatalf("expected empty data, got %+v", page.Data) @@ -254,9 +257,9 @@ func TestListDeployments_EmptyDataKeepsNextCursor(t *testing.T) { } } -func TestListDeployments(t *testing.T) { +func TestListApps(t *testing.T) { srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - if r.Method != http.MethodGet || r.URL.Path != "/v1/deployments" { + if r.Method != http.MethodGet || r.URL.Path != "/v1/apps" { t.Errorf("unexpected %s %s", r.Method, r.URL.Path) } if got := r.URL.Query().Get("status"); got != "active" { @@ -271,16 +274,16 @@ func TestListDeployments(t *testing.T) { if got := r.URL.Query().Get("q"); got != "demo" { t.Errorf("q query = %q, want demo", got) } - if got := r.URL.Query().Get("gpuType"); got != "h100" { - t.Errorf("gpuType query = %q, want h100", got) + if got := r.URL.Query().Get("gpuType"); got != testGPUType { + t.Errorf("gpuType query = %q, want %s", got, testGPUType) } if got := r.URL.Query().Get("sort"); got != "name" { t.Errorf("sort query = %q, want name", got) } w.Header().Set("Content-Type", "application/json") _, _ = w.Write([]byte(`{"data":[{ - "deploymentId":"my-app", - "deploymentName":"My App", + "appId":"my-app", + "appName":"My App", "status":"active", "configuration":{"maxWorkers":1,"idleTtlSecs":60,"scalingDelaySecs":10,"minWorkers":0,"gpusPerWorker":1,"concurrency":1,"gracefulStopTtlSecs":120,"computeType":"gpu"}, "environmentVariables":[], @@ -293,12 +296,12 @@ func TestListDeployments(t *testing.T) { limit := Limit(10) cursor := Cursor(testCursorPage2) - status := DeploymentStatus("active") + status := AppStatus("active") q := "demo" - gpuType := "h100" - sort := DeploymentSort("name") + gpuType := testGPUType + sort := AppSort("name") c := newClient("test-key", srv.URL, slog.Default(), srv.Client()) - page, err := c.ListDeployments(context.Background(), &ListDeploymentsParams{ + page, err := c.ListApps(context.Background(), &ListAppsParams{ Limit: &limit, Cursor: &cursor, Status: &status, @@ -307,17 +310,17 @@ func TestListDeployments(t *testing.T) { Sort: &sort, }) if err != nil { - t.Fatalf("ListDeployments: %v", err) + t.Fatalf("ListApps: %v", err) } - if len(page.Data) != 1 || page.Data[0].DeploymentId != testDeploymentID { - t.Fatalf("unexpected deployments: %+v", page.Data) + if len(page.Data) != 1 || page.Data[0].AppId != testAppID { + t.Fatalf("unexpected apps: %+v", page.Data) } if page.NextCursor == nil || *page.NextCursor != testCursorPage3 { t.Fatalf("unexpected nextCursor: %+v", page.NextCursor) } } -func TestListDeployments_BadCursor(t *testing.T) { +func TestListApps_BadCursor(t *testing.T) { srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", "application/problem+json") w.WriteHeader(http.StatusBadRequest) @@ -326,7 +329,7 @@ func TestListDeployments_BadCursor(t *testing.T) { defer srv.Close() c := newClient("test-key", srv.URL, slog.Default(), srv.Client()) - _, err := c.ListDeployments(context.Background(), nil) + _, err := c.ListApps(context.Background(), nil) var re *transport.RunwareError if !errors.As(err, &re) { t.Fatalf("expected *transport.RunwareError, got %T: %v", err, err) @@ -339,7 +342,7 @@ func TestListDeployments_BadCursor(t *testing.T) { } } -func TestListDeployments_UnimplementedSort(t *testing.T) { +func TestListApps_UnimplementedSort(t *testing.T) { srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", "application/problem+json") w.WriteHeader(http.StatusUnprocessableEntity) @@ -354,7 +357,7 @@ func TestListDeployments_UnimplementedSort(t *testing.T) { defer srv.Close() c := newClient("test-key", srv.URL, slog.Default(), srv.Client()) - _, err := c.ListDeployments(context.Background(), nil) + _, err := c.ListApps(context.Background(), nil) var re *transport.RunwareError if !errors.As(err, &re) { t.Fatalf("expected *transport.RunwareError, got %T: %v", err, err) @@ -370,15 +373,15 @@ func TestListDeployments_UnimplementedSort(t *testing.T) { } } -func TestGetDeployment(t *testing.T) { +func TestGetApp(t *testing.T) { srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - if r.Method != http.MethodGet || r.URL.Path != "/v1/deployments/"+testDeploymentID { + if r.Method != http.MethodGet || r.URL.Path != "/v1/apps/"+testAppID { t.Errorf("unexpected %s %s", r.Method, r.URL.Path) } w.Header().Set("Content-Type", "application/json") _, _ = w.Write([]byte(`{ - "deploymentId":"my-app", - "deploymentName":"My App", + "appId":"my-app", + "appName":"My App", "status":"initializing", "configuration":{"maxWorkers":1,"idleTtlSecs":60,"scalingDelaySecs":10,"minWorkers":0,"gpusPerWorker":1,"concurrency":1,"gracefulStopTtlSecs":120,"computeType":"gpu"}, "environmentVariables":[], @@ -390,25 +393,25 @@ func TestGetDeployment(t *testing.T) { defer srv.Close() c := newClient("test-key", srv.URL, slog.Default(), srv.Client()) - dep, err := c.GetDeployment(context.Background(), testDeploymentID) + dep, err := c.GetApp(context.Background(), testAppID) if err != nil { - t.Fatalf("GetDeployment: %v", err) + t.Fatalf("GetApp: %v", err) } - if dep.DeploymentId != testDeploymentID || string(dep.Status) != "initializing" { - t.Errorf("unexpected deployment: %+v", dep) + if dep.AppId != testAppID || string(dep.Status) != "initializing" { + t.Errorf("unexpected app: %+v", dep) } } -func TestGetDeployment_NotFound(t *testing.T) { +func TestGetApp_NotFound(t *testing.T) { srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", "application/problem+json") w.WriteHeader(http.StatusNotFound) - _, _ = w.Write([]byte(`{"type":"about:blank","title":"Not Found","status":404,"detail":"No deployment 'missing' exists"}`)) + _, _ = w.Write([]byte(`{"type":"about:blank","title":"Not Found","status":404,"detail":"No app 'missing' exists"}`)) })) defer srv.Close() c := newClient("test-key", srv.URL, slog.Default(), srv.Client()) - _, err := c.GetDeployment(context.Background(), "missing") + _, err := c.GetApp(context.Background(), "missing") var re *transport.RunwareError if !errors.As(err, &re) { t.Fatalf("expected *transport.RunwareError, got %T: %v", err, err) @@ -418,24 +421,24 @@ func TestGetDeployment_NotFound(t *testing.T) { } } -func TestUpdateDeployment(t *testing.T) { +func TestUpdateApp(t *testing.T) { maxWorkers := int32(2) srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - if r.Method != http.MethodPatch || r.URL.Path != "/v1/deployments/"+testDeploymentID { + if r.Method != http.MethodPatch || r.URL.Path != "/v1/apps/"+testAppID { t.Errorf("unexpected %s %s", r.Method, r.URL.Path) } raw, err := io.ReadAll(r.Body) if err != nil { t.Fatalf("read body: %v", err) } - var body DeploymentUpdate + var body AppUpdate if err := json.Unmarshal(raw, &body); err != nil { t.Fatalf("decode body: %v", err) } if body.Configuration == nil || body.Configuration.MaxWorkers == nil || *body.Configuration.MaxWorkers != maxWorkers { t.Errorf("unexpected body: %s", raw) } - if body.DeploymentName != nil || body.DeploymentSource != nil || body.Secrets != nil || body.EnvironmentVariables != nil || body.Endpoints != nil { + if body.AppName != nil || body.AppSource != nil || body.Secrets != nil || body.EnvironmentVariables != nil || body.Endpoints != nil { t.Errorf("patch included out-of-scope fields: %s", raw) } var rawMap map[string]json.RawMessage @@ -454,8 +457,8 @@ func TestUpdateDeployment(t *testing.T) { } w.Header().Set("Content-Type", "application/json") _, _ = w.Write([]byte(`{ - "deploymentId":"my-app", - "deploymentName":"My App", + "appId":"my-app", + "appName":"My App", "status":"active", "configuration":{"maxWorkers":2,"idleTtlSecs":60,"scalingDelaySecs":10,"minWorkers":0,"gpusPerWorker":1,"concurrency":1,"computeType":"gpu"}, "environmentVariables":[], @@ -467,20 +470,20 @@ func TestUpdateDeployment(t *testing.T) { defer srv.Close() c := newClient("test-key", srv.URL, slog.Default(), srv.Client()) - dep, err := c.UpdateDeployment(context.Background(), testDeploymentID, DeploymentUpdate{ + dep, err := c.UpdateApp(context.Background(), testAppID, AppUpdate{ Configuration: &WorkerConfigPatch{ MaxWorkers: &maxWorkers, }, }) if err != nil { - t.Fatalf("UpdateDeployment: %v", err) + t.Fatalf("UpdateApp: %v", err) } - if dep.DeploymentId != testDeploymentID || dep.Configuration.MaxWorkers != maxWorkers { - t.Errorf("unexpected deployment: %+v", dep) + if dep.AppId != testAppID || dep.Configuration.MaxWorkers != maxWorkers { + t.Errorf("unexpected app: %+v", dep) } } -func TestUpdateDeployment_Unprocessable(t *testing.T) { +func TestUpdateApp_Unprocessable(t *testing.T) { srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", "application/problem+json") w.WriteHeader(http.StatusUnprocessableEntity) @@ -496,7 +499,7 @@ func TestUpdateDeployment_Unprocessable(t *testing.T) { c := newClient("test-key", srv.URL, slog.Default(), srv.Client()) zero := int32(0) - _, err := c.UpdateDeployment(context.Background(), testDeploymentID, DeploymentUpdate{ + _, err := c.UpdateApp(context.Background(), testAppID, AppUpdate{ Configuration: &WorkerConfigPatch{ MaxWorkers: &zero, }, @@ -519,9 +522,9 @@ func TestUpdateDeployment_Unprocessable(t *testing.T) { } } -func TestUpdateDeployment_NoAPIKey(t *testing.T) { +func TestUpdateApp_NoAPIKey(t *testing.T) { c := NewClient("", "https://example.invalid", slog.Default()) - if _, err := c.UpdateDeployment(context.Background(), testDeploymentID, DeploymentUpdate{}); !errors.Is(err, transport.ErrNoAPIKey) { + if _, err := c.UpdateApp(context.Background(), testAppID, AppUpdate{}); !errors.Is(err, transport.ErrNoAPIKey) { t.Fatalf("expected ErrNoAPIKey, got %v", err) } } @@ -531,39 +534,39 @@ type lifecycleOp struct { method string path string status string - call func(*Client, context.Context, string) (*Deployment, error) + call func(*Client, context.Context, string) (*App, error) has409 bool } func lifecycleOps() []lifecycleOp { return []lifecycleOp{ { - name: "StopDeployment", + name: "StopApp", method: http.MethodPost, - path: "/v1/deployments/" + testDeploymentID + "/stop", + path: "/v1/apps/" + testAppID + "/stop", status: "stopping", - call: (*Client).StopDeployment, + call: (*Client).StopApp, has409: true, }, { - name: "ResumeDeployment", + name: "ResumeApp", method: http.MethodPost, - path: "/v1/deployments/" + testDeploymentID + "/resume", + path: "/v1/apps/" + testAppID + "/resume", status: "initializing", - call: (*Client).ResumeDeployment, + call: (*Client).ResumeApp, has409: true, }, { - name: "DeleteDeployment", + name: "DeleteApp", method: http.MethodDelete, - path: "/v1/deployments/" + testDeploymentID, + path: "/v1/apps/" + testAppID, status: "deleting", - call: (*Client).DeleteDeployment, + call: (*Client).DeleteApp, }, } } -func TestLifecycleDeployments(t *testing.T) { +func TestLifecycleApps(t *testing.T) { for _, op := range lifecycleOps() { t.Run(op.name, func(t *testing.T) { srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { @@ -572,27 +575,27 @@ func TestLifecycleDeployments(t *testing.T) { } w.Header().Set("Content-Type", "application/json") w.WriteHeader(http.StatusAccepted) - _, _ = w.Write([]byte(lifecycleDeploymentJSON(op.status))) + _, _ = w.Write([]byte(lifecycleAppJSON(op.status))) })) defer srv.Close() c := newClient("test-key", srv.URL, slog.Default(), srv.Client()) - dep, err := op.call(c, context.Background(), testDeploymentID) + dep, err := op.call(c, context.Background(), testAppID) if err != nil { t.Fatalf("%s: %v", op.name, err) } - if dep.DeploymentId != testDeploymentID || string(dep.Status) != op.status { - t.Errorf("unexpected deployment: %+v", dep) + if dep.AppId != testAppID || string(dep.Status) != op.status { + t.Errorf("unexpected app: %+v", dep) } }) } } -func TestLifecycleDeployments_NotFound(t *testing.T) { +func TestLifecycleApps_NotFound(t *testing.T) { srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", "application/problem+json") w.WriteHeader(http.StatusNotFound) - _, _ = w.Write([]byte(`{"type":"about:blank","title":"Not Found","status":404,"detail":"No deployment 'missing' exists"}`)) + _, _ = w.Write([]byte(`{"type":"about:blank","title":"Not Found","status":404,"detail":"No app 'missing' exists"}`)) })) defer srv.Close() @@ -610,18 +613,18 @@ func TestLifecycleDeployments_NotFound(t *testing.T) { if re.StatusCode != http.StatusNotFound { t.Errorf("expected status 404, got %d", re.StatusCode) } - if re.Message != "No deployment 'missing' exists" { + if re.Message != "No app 'missing' exists" { t.Errorf("unexpected message: %q", re.Message) } }) } } -func TestLifecycleDeployments_Conflict(t *testing.T) { +func TestLifecycleApps_Conflict(t *testing.T) { srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", "application/problem+json") w.WriteHeader(http.StatusConflict) - _, _ = w.Write([]byte(`{"type":"about:blank","title":"Conflict","status":409,"detail":"Deployment is not in the required status"}`)) + _, _ = w.Write([]byte(`{"type":"about:blank","title":"Conflict","status":409,"detail":"App is not in the required status"}`)) })) defer srv.Close() @@ -631,7 +634,7 @@ func TestLifecycleDeployments_Conflict(t *testing.T) { continue } t.Run(op.name, func(t *testing.T) { - _, err := op.call(c, context.Background(), testDeploymentID) + _, err := op.call(c, context.Background(), testAppID) var re *transport.RunwareError if !errors.As(err, &re) { t.Fatalf("expected *transport.RunwareError, got %T: %v", err, err) @@ -642,28 +645,28 @@ func TestLifecycleDeployments_Conflict(t *testing.T) { if re.StatusCode != http.StatusConflict { t.Errorf("expected status 409, got %d", re.StatusCode) } - if re.Message != "Deployment is not in the required status" { + if re.Message != "App is not in the required status" { t.Errorf("unexpected message: %q", re.Message) } }) } } -func TestLifecycleDeployments_NoAPIKey(t *testing.T) { +func TestLifecycleApps_NoAPIKey(t *testing.T) { c := NewClient("", "https://example.invalid", slog.Default()) for _, op := range lifecycleOps() { t.Run(op.name, func(t *testing.T) { - if _, err := op.call(c, context.Background(), testDeploymentID); !errors.Is(err, transport.ErrNoAPIKey) { + if _, err := op.call(c, context.Background(), testAppID); !errors.Is(err, transport.ErrNoAPIKey) { t.Fatalf("expected ErrNoAPIKey, got %v", err) } }) } } -func lifecycleDeploymentJSON(status string) string { +func lifecycleAppJSON(status string) string { return `{ - "deploymentId":"my-app", - "deploymentName":"My App", + "appId":"my-app", + "appName":"My App", "status":"` + status + `", "configuration":{"maxWorkers":1,"idleTtlSecs":60,"scalingDelaySecs":10,"minWorkers":0,"gpusPerWorker":1,"concurrency":1,"computeType":"gpu"}, "environmentVariables":[], @@ -675,14 +678,14 @@ func lifecycleDeploymentJSON(status string) string { func TestListEndpoints(t *testing.T) { srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - want := "/v1/deployments/" + testDeploymentID + "/endpoints" + want := "/v1/apps/" + testAppID + "/endpoints" if r.Method != http.MethodGet || r.URL.Path != want { t.Errorf("unexpected %s %s", r.Method, r.URL.Path) } w.Header().Set("Content-Type", "application/json") _, _ = w.Write([]byte(`{"data":[{ "id":"11111111-1111-1111-1111-111111111111", - "deploymentId":"my-app", + "appId":"my-app", "path":"/infer", "createdAt":"2026-07-30T12:00:00Z" }]}`)) @@ -690,7 +693,7 @@ func TestListEndpoints(t *testing.T) { defer srv.Close() c := newClient("test-key", srv.URL, slog.Default(), srv.Client()) - page, err := c.ListEndpoints(context.Background(), testDeploymentID, nil) + page, err := c.ListEndpoints(context.Background(), testAppID, nil) if err != nil { t.Fatalf("ListEndpoints: %v", err) } @@ -704,7 +707,7 @@ func TestListEndpoints(t *testing.T) { func TestListBuilds(t *testing.T) { srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - want := "/v1/deployments/" + testDeploymentID + "/builds" + want := "/v1/apps/" + testAppID + "/builds" if r.Method != http.MethodGet || r.URL.Path != want { t.Errorf("unexpected %s %s", r.Method, r.URL.Path) } @@ -729,7 +732,7 @@ func TestListBuilds(t *testing.T) { limit := Limit(10) cursor := Cursor(testCursorPage2) c := newClient("test-key", srv.URL, slog.Default(), srv.Client()) - page, err := c.ListBuilds(context.Background(), testDeploymentID, &ListBuildsParams{ + page, err := c.ListBuilds(context.Background(), testAppID, &ListBuildsParams{ Limit: &limit, Cursor: &cursor, }) @@ -752,14 +755,14 @@ func TestListBuilds(t *testing.T) { func TestListBuilds_NoAPIKey(t *testing.T) { c := NewClient("", "https://example.invalid", slog.Default()) - if _, err := c.ListBuilds(context.Background(), testDeploymentID, nil); !errors.Is(err, transport.ErrNoAPIKey) { + if _, err := c.ListBuilds(context.Background(), testAppID, nil); !errors.Is(err, transport.ErrNoAPIKey) { t.Fatalf("expected ErrNoAPIKey, got %v", err) } } func TestGetBuild(t *testing.T) { srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - want := "/v1/deployments/" + testDeploymentID + "/builds/" + testBuildID + want := "/v1/apps/" + testAppID + "/builds/" + testBuildID if r.Method != http.MethodGet || r.URL.Path != want { t.Errorf("unexpected %s %s", r.Method, r.URL.Path) } @@ -773,7 +776,7 @@ func TestGetBuild(t *testing.T) { defer srv.Close() c := newClient("test-key", srv.URL, slog.Default(), srv.Client()) - b, err := c.GetBuild(context.Background(), testDeploymentID, uuid.MustParse(testBuildID)) + b, err := c.GetBuild(context.Background(), testAppID, uuid.MustParse(testBuildID)) if err != nil { t.Fatalf("GetBuild: %v", err) } @@ -791,7 +794,7 @@ func TestGetBuild_NotFound(t *testing.T) { defer srv.Close() c := newClient("test-key", srv.URL, slog.Default(), srv.Client()) - _, err := c.GetBuild(context.Background(), testDeploymentID, uuid.MustParse(testBuildID)) + _, err := c.GetBuild(context.Background(), testAppID, uuid.MustParse(testBuildID)) var re *transport.RunwareError if !errors.As(err, &re) { t.Fatalf("expected *transport.RunwareError, got %T: %v", err, err) @@ -803,21 +806,21 @@ func TestGetBuild_NotFound(t *testing.T) { func TestGetBuild_NoAPIKey(t *testing.T) { c := NewClient("", "https://example.invalid", slog.Default()) - if _, err := c.GetBuild(context.Background(), testDeploymentID, uuid.MustParse(testBuildID)); !errors.Is(err, transport.ErrNoAPIKey) { + if _, err := c.GetBuild(context.Background(), testAppID, uuid.MustParse(testBuildID)); !errors.Is(err, transport.ErrNoAPIKey) { t.Fatalf("expected ErrNoAPIKey, got %v", err) } } func TestListVersions(t *testing.T) { srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - want := "/v1/deployments/" + testDeploymentID + "/versions" + want := "/v1/apps/" + testAppID + "/versions" if r.Method != http.MethodGet || r.URL.Path != want { t.Errorf("unexpected %s %s", r.Method, r.URL.Path) } w.Header().Set("Content-Type", "application/json") _, _ = w.Write([]byte(`{"data":[{ "id":"` + testVersionID + `", - "deploymentId":"my-app", + "appId":"my-app", "buildId":"` + testBuildID + `", "versionNumber":1, "createdAt":"2026-07-30T12:00:00Z" @@ -826,7 +829,7 @@ func TestListVersions(t *testing.T) { defer srv.Close() c := newClient("test-key", srv.URL, slog.Default(), srv.Client()) - page, err := c.ListVersions(context.Background(), testDeploymentID, nil) + page, err := c.ListVersions(context.Background(), testAppID, nil) if err != nil { t.Fatalf("ListVersions: %v", err) } @@ -837,14 +840,14 @@ func TestListVersions(t *testing.T) { func TestGetVersion(t *testing.T) { srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - want := fmt.Sprintf("/v1/deployments/%s/versions/%d", testDeploymentID, testVersionNumber) + want := fmt.Sprintf("/v1/apps/%s/versions/%d", testAppID, testVersionNumber) if r.Method != http.MethodGet || r.URL.Path != want { t.Errorf("unexpected %s %s", r.Method, r.URL.Path) } w.Header().Set("Content-Type", "application/json") _, _ = w.Write([]byte(`{ "id":"` + testVersionID + `", - "deploymentId":"` + testDeploymentID + `", + "appId":"` + testAppID + `", "buildId":"` + testBuildID + `", "versionNumber":1, "createdAt":"2026-07-30T12:00:00Z" @@ -853,7 +856,7 @@ func TestGetVersion(t *testing.T) { defer srv.Close() c := newClient("test-key", srv.URL, slog.Default(), srv.Client()) - v, err := c.GetVersion(context.Background(), testDeploymentID, testVersionNumber) + v, err := c.GetVersion(context.Background(), testAppID, testVersionNumber) if err != nil { t.Fatalf("GetVersion: %v", err) } @@ -874,7 +877,7 @@ func TestGetVersion_NotFound(t *testing.T) { defer srv.Close() c := newClient("test-key", srv.URL, slog.Default(), srv.Client()) - _, err := c.GetVersion(context.Background(), testDeploymentID, 99999) + _, err := c.GetVersion(context.Background(), testAppID, 99999) var re *transport.RunwareError if !errors.As(err, &re) { t.Fatalf("expected *transport.RunwareError, got %T: %v", err, err) @@ -886,14 +889,14 @@ func TestGetVersion_NotFound(t *testing.T) { func TestGetVersion_NoAPIKey(t *testing.T) { c := NewClient("", "https://example.invalid", slog.Default()) - if _, err := c.GetVersion(context.Background(), testDeploymentID, testVersionNumber); !errors.Is(err, transport.ErrNoAPIKey) { + if _, err := c.GetVersion(context.Background(), testAppID, testVersionNumber); !errors.Is(err, transport.ErrNoAPIKey) { t.Fatalf("expected ErrNoAPIKey, got %v", err) } } func TestListWorkers(t *testing.T) { srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - want := "/v1/deployments/" + testDeploymentID + "/workers" + want := "/v1/apps/" + testAppID + "/workers" if r.Method != http.MethodGet || r.URL.Path != want { t.Errorf("unexpected %s %s", r.Method, r.URL.Path) } @@ -903,7 +906,7 @@ func TestListWorkers(t *testing.T) { w.Header().Set("Content-Type", "application/json") _, _ = w.Write([]byte(`{"data":[{ "id":"44444444-4444-4444-4444-444444444444", - "deploymentId":"my-app", + "appId":"my-app", "versionId":"22222222-2222-2222-2222-222222222222", "status":"ready", "podName":"worker-0", @@ -915,7 +918,7 @@ func TestListWorkers(t *testing.T) { status := WorkerStatus("ready") c := newClient("test-key", srv.URL, slog.Default(), srv.Client()) - page, err := c.ListWorkers(context.Background(), testDeploymentID, &ListWorkersParams{Status: &status}) + page, err := c.ListWorkers(context.Background(), testAppID, &ListWorkersParams{Status: &status}) if err != nil { t.Fatalf("ListWorkers: %v", err) } diff --git a/internal/api/serverless/env.go b/internal/api/serverless/env.go index f4ace35..df10c9c 100644 --- a/internal/api/serverless/env.go +++ b/internal/api/serverless/env.go @@ -9,24 +9,24 @@ import ( "github.com/runware/runware-cli/internal/api/transport" ) -// EnvironmentVariable is a plain-text deployment environment variable. +// EnvironmentVariable is a plain-text app environment variable. type EnvironmentVariable = gen.EnvironmentVariable -// EnvironmentVariableUpdate is the request body for updateDeploymentEnvironmentVariable. +// EnvironmentVariableUpdate is the request body for updateAppEnvironmentVariable. type EnvironmentVariableUpdate = gen.EnvironmentVariableUpdate -// ListDeploymentEnvironmentVariablesParams are optional filters for -// ListDeploymentEnvironmentVariables. -type ListDeploymentEnvironmentVariablesParams = gen.ListDeploymentEnvironmentVariablesParams +// ListAppEnvironmentVariablesParams are optional filters for +// ListAppEnvironmentVariables. +type ListAppEnvironmentVariablesParams = gen.ListAppEnvironmentVariablesParams -// ListDeploymentEnvironmentVariables returns a page of plain-text environment -// variables for a deployment. Values are included in the response. -func (c *Client) ListDeploymentEnvironmentVariables(ctx context.Context, deploymentID string, params *ListDeploymentEnvironmentVariablesParams) (Page[EnvironmentVariable], error) { +// ListAppEnvironmentVariables returns a page of plain-text environment +// variables for an app. Values are included in the response. +func (c *Client) ListAppEnvironmentVariables(ctx context.Context, appID string, params *ListAppEnvironmentVariablesParams) (Page[EnvironmentVariable], error) { if c.apiKey == "" { return Page[EnvironmentVariable]{}, transport.ErrNoAPIKey } - resp, err := c.inner.ListDeploymentEnvironmentVariablesWithResponse(ctx, deploymentID, params) + resp, err := c.inner.ListAppEnvironmentVariablesWithResponse(ctx, appID, params) if err != nil { return Page[EnvironmentVariable]{}, fmt.Errorf("list environment variables: %w", err) } @@ -50,14 +50,14 @@ func (c *Client) ListDeploymentEnvironmentVariables(ctx context.Context, deploym } } -// UpdateDeploymentEnvironmentVariable creates or replaces one plain-text -// environment variable on a deployment. -func (c *Client) UpdateDeploymentEnvironmentVariable(ctx context.Context, deploymentID, key string, body EnvironmentVariableUpdate) (*EnvironmentVariable, error) { +// UpdateAppEnvironmentVariable creates or replaces one plain-text environment +// variable on an app. +func (c *Client) UpdateAppEnvironmentVariable(ctx context.Context, appID, key string, body EnvironmentVariableUpdate) (*EnvironmentVariable, error) { if c.apiKey == "" { return nil, transport.ErrNoAPIKey } - resp, err := c.inner.UpdateDeploymentEnvironmentVariableWithResponse(ctx, deploymentID, key, body) + resp, err := c.inner.UpdateAppEnvironmentVariableWithResponse(ctx, appID, key, body) if err != nil { return nil, fmt.Errorf("update environment variable: %w", err) } @@ -85,14 +85,14 @@ func (c *Client) UpdateDeploymentEnvironmentVariable(ctx context.Context, deploy } } -// DeleteDeploymentEnvironmentVariable removes one plain-text environment -// variable from a deployment. -func (c *Client) DeleteDeploymentEnvironmentVariable(ctx context.Context, deploymentID, key string) error { +// DeleteAppEnvironmentVariable removes one plain-text environment variable +// from an app. +func (c *Client) DeleteAppEnvironmentVariable(ctx context.Context, appID, key string) error { if c.apiKey == "" { return transport.ErrNoAPIKey } - resp, err := c.inner.DeleteDeploymentEnvironmentVariableWithResponse(ctx, deploymentID, key) + resp, err := c.inner.DeleteAppEnvironmentVariableWithResponse(ctx, appID, key) if err != nil { return fmt.Errorf("delete environment variable: %w", err) } diff --git a/internal/api/serverless/env_test.go b/internal/api/serverless/env_test.go index b7899aa..22cfa68 100644 --- a/internal/api/serverless/env_test.go +++ b/internal/api/serverless/env_test.go @@ -19,9 +19,9 @@ const ( testEnvVarValue = "hello" ) -func TestListDeploymentEnvironmentVariables(t *testing.T) { +func TestListAppEnvironmentVariables(t *testing.T) { srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - want := "/v1/deployments/" + testDeploymentID + "/environment-variables" + want := "/v1/apps/" + testAppID + "/environment-variables" if r.Method != http.MethodGet || r.URL.Path != want { t.Errorf("unexpected %s %s", r.Method, r.URL.Path) } @@ -34,7 +34,7 @@ func TestListDeploymentEnvironmentVariables(t *testing.T) { w.Header().Set("Content-Type", "application/json") _, _ = w.Write([]byte(`{"data":[{ "id":"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa", - "deploymentId":"my-app", + "appId":"my-app", "key":"` + testEnvVarName + `", "value":"` + testEnvVarValue + `", "createdAt":"2026-07-30T12:00:00Z", @@ -46,12 +46,12 @@ func TestListDeploymentEnvironmentVariables(t *testing.T) { limit := Limit(10) cursor := Cursor(testCursorPage2) c := newClient("test-key", srv.URL, slog.Default(), srv.Client()) - page, err := c.ListDeploymentEnvironmentVariables(context.Background(), testDeploymentID, &ListDeploymentEnvironmentVariablesParams{ + page, err := c.ListAppEnvironmentVariables(context.Background(), testAppID, &ListAppEnvironmentVariablesParams{ Limit: &limit, Cursor: &cursor, }) if err != nil { - t.Fatalf("ListDeploymentEnvironmentVariables: %v", err) + t.Fatalf("ListAppEnvironmentVariables: %v", err) } if len(page.Data) != 1 || page.Data[0].Key != testEnvVarName { t.Fatalf("unexpected env vars: %+v", page.Data) @@ -64,16 +64,16 @@ func TestListDeploymentEnvironmentVariables(t *testing.T) { } } -func TestListDeploymentEnvironmentVariables_NoAPIKey(t *testing.T) { +func TestListAppEnvironmentVariables_NoAPIKey(t *testing.T) { c := NewClient("", "https://example.invalid", slog.Default()) - if _, err := c.ListDeploymentEnvironmentVariables(context.Background(), testDeploymentID, nil); !errors.Is(err, transport.ErrNoAPIKey) { + if _, err := c.ListAppEnvironmentVariables(context.Background(), testAppID, nil); !errors.Is(err, transport.ErrNoAPIKey) { t.Fatalf("expected ErrNoAPIKey, got %v", err) } } -func TestUpdateDeploymentEnvironmentVariable(t *testing.T) { +func TestUpdateAppEnvironmentVariable(t *testing.T) { srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - want := "/v1/deployments/" + testDeploymentID + "/environment-variables/" + testEnvVarName + want := "/v1/apps/" + testAppID + "/environment-variables/" + testEnvVarName if r.Method != http.MethodPut || r.URL.Path != want { t.Errorf("unexpected %s %s", r.Method, r.URL.Path) } @@ -91,7 +91,7 @@ func TestUpdateDeploymentEnvironmentVariable(t *testing.T) { w.Header().Set("Content-Type", "application/json") _, _ = w.Write([]byte(`{ "id":"aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa", - "deploymentId":"my-app", + "appId":"my-app", "key":"` + testEnvVarName + `", "value":"` + testEnvVarValue + `", "createdAt":"2026-07-30T12:00:00Z", @@ -101,18 +101,18 @@ func TestUpdateDeploymentEnvironmentVariable(t *testing.T) { defer srv.Close() c := newClient("test-key", srv.URL, slog.Default(), srv.Client()) - ev, err := c.UpdateDeploymentEnvironmentVariable(context.Background(), testDeploymentID, testEnvVarName, EnvironmentVariableUpdate{ + ev, err := c.UpdateAppEnvironmentVariable(context.Background(), testAppID, testEnvVarName, EnvironmentVariableUpdate{ Value: testEnvVarValue, }) if err != nil { - t.Fatalf("UpdateDeploymentEnvironmentVariable: %v", err) + t.Fatalf("UpdateAppEnvironmentVariable: %v", err) } if ev.Key != testEnvVarName || ev.Value != testEnvVarValue { t.Errorf("unexpected env var: %+v", ev) } } -func TestUpdateDeploymentEnvironmentVariable_Unprocessable(t *testing.T) { +func TestUpdateAppEnvironmentVariable_Unprocessable(t *testing.T) { srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", "application/problem+json") w.WriteHeader(http.StatusUnprocessableEntity) @@ -127,7 +127,7 @@ func TestUpdateDeploymentEnvironmentVariable_Unprocessable(t *testing.T) { defer srv.Close() c := newClient("test-key", srv.URL, slog.Default(), srv.Client()) - _, err := c.UpdateDeploymentEnvironmentVariable(context.Background(), testDeploymentID, "RUNTIME", EnvironmentVariableUpdate{ + _, err := c.UpdateAppEnvironmentVariable(context.Background(), testAppID, "RUNTIME", EnvironmentVariableUpdate{ Value: "x", }) var re *transport.RunwareError @@ -148,16 +148,16 @@ func TestUpdateDeploymentEnvironmentVariable_Unprocessable(t *testing.T) { } } -func TestUpdateDeploymentEnvironmentVariable_NoAPIKey(t *testing.T) { +func TestUpdateAppEnvironmentVariable_NoAPIKey(t *testing.T) { c := NewClient("", "https://example.invalid", slog.Default()) - if _, err := c.UpdateDeploymentEnvironmentVariable(context.Background(), testDeploymentID, testEnvVarName, EnvironmentVariableUpdate{}); !errors.Is(err, transport.ErrNoAPIKey) { + if _, err := c.UpdateAppEnvironmentVariable(context.Background(), testAppID, testEnvVarName, EnvironmentVariableUpdate{}); !errors.Is(err, transport.ErrNoAPIKey) { t.Fatalf("expected ErrNoAPIKey, got %v", err) } } -func TestDeleteDeploymentEnvironmentVariable(t *testing.T) { +func TestDeleteAppEnvironmentVariable(t *testing.T) { srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - want := "/v1/deployments/" + testDeploymentID + "/environment-variables/" + testEnvVarName + want := "/v1/apps/" + testAppID + "/environment-variables/" + testEnvVarName if r.Method != http.MethodDelete || r.URL.Path != want { t.Errorf("unexpected %s %s", r.Method, r.URL.Path) } @@ -166,12 +166,12 @@ func TestDeleteDeploymentEnvironmentVariable(t *testing.T) { defer srv.Close() c := newClient("test-key", srv.URL, slog.Default(), srv.Client()) - if err := c.DeleteDeploymentEnvironmentVariable(context.Background(), testDeploymentID, testEnvVarName); err != nil { - t.Fatalf("DeleteDeploymentEnvironmentVariable: %v", err) + if err := c.DeleteAppEnvironmentVariable(context.Background(), testAppID, testEnvVarName); err != nil { + t.Fatalf("DeleteAppEnvironmentVariable: %v", err) } } -func TestDeleteDeploymentEnvironmentVariable_NotFound(t *testing.T) { +func TestDeleteAppEnvironmentVariable_NotFound(t *testing.T) { srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", "application/problem+json") w.WriteHeader(http.StatusNotFound) @@ -180,7 +180,7 @@ func TestDeleteDeploymentEnvironmentVariable_NotFound(t *testing.T) { defer srv.Close() c := newClient("test-key", srv.URL, slog.Default(), srv.Client()) - err := c.DeleteDeploymentEnvironmentVariable(context.Background(), testDeploymentID, testEnvVarName) + err := c.DeleteAppEnvironmentVariable(context.Background(), testAppID, testEnvVarName) var re *transport.RunwareError if !errors.As(err, &re) { t.Fatalf("expected *transport.RunwareError, got %T: %v", err, err) @@ -193,9 +193,9 @@ func TestDeleteDeploymentEnvironmentVariable_NotFound(t *testing.T) { } } -func TestDeleteDeploymentEnvironmentVariable_NoAPIKey(t *testing.T) { +func TestDeleteAppEnvironmentVariable_NoAPIKey(t *testing.T) { c := NewClient("", "https://example.invalid", slog.Default()) - if err := c.DeleteDeploymentEnvironmentVariable(context.Background(), testDeploymentID, testEnvVarName); !errors.Is(err, transport.ErrNoAPIKey) { + if err := c.DeleteAppEnvironmentVariable(context.Background(), testAppID, testEnvVarName); !errors.Is(err, transport.ErrNoAPIKey) { t.Fatalf("expected ErrNoAPIKey, got %v", err) } } diff --git a/internal/api/serverless/gen/client.gen.go b/internal/api/serverless/gen/client.gen.go index 1f35ad7..44fca2e 100644 --- a/internal/api/serverless/gen/client.gen.go +++ b/internal/api/serverless/gen/client.gen.go @@ -18,159 +18,156 @@ import ( openapi_types "github.com/oapi-codegen/runtime/types" ) -// Defines values for BuildStatus. +// Defines values for AppEventType. const ( - BuildStatusBuilding BuildStatus = "building" - BuildStatusFailed BuildStatus = "failed" - BuildStatusQueued BuildStatus = "queued" - BuildStatusReady BuildStatus = "ready" - BuildStatusSuperseded BuildStatus = "superseded" + Audit AppEventType = "audit" + Deploy AppEventType = "deploy" + Error AppEventType = "error" + Scaling AppEventType = "scaling" ) -// Valid indicates whether the value is a known member of the BuildStatus enum. -func (e BuildStatus) Valid() bool { +// Valid indicates whether the value is a known member of the AppEventType enum. +func (e AppEventType) Valid() bool { switch e { - case BuildStatusBuilding: - return true - case BuildStatusFailed: + case Audit: return true - case BuildStatusQueued: + case Deploy: return true - case BuildStatusReady: + case Error: return true - case BuildStatusSuperseded: + case Scaling: return true default: return false } } -// Defines values for ComputeType. +// Defines values for AppSort. const ( - Cpu ComputeType = "cpu" - Gpu ComputeType = "gpu" + Activity AppSort = "activity" + CreatedAt AppSort = "createdAt" + ErrorRate AppSort = "errorRate" + Name AppSort = "name" ) -// Valid indicates whether the value is a known member of the ComputeType enum. -func (e ComputeType) Valid() bool { +// Valid indicates whether the value is a known member of the AppSort enum. +func (e AppSort) Valid() bool { switch e { - case Cpu: + case Activity: return true - case Gpu: + case CreatedAt: + return true + case ErrorRate: + return true + case Name: return true default: return false } } -// Defines values for Currency. +// Defines values for AppSourceUpsertType. const ( - USD Currency = "USD" + Code AppSourceUpsertType = "code" + Container AppSourceUpsertType = "container" ) -// Valid indicates whether the value is a known member of the Currency enum. -func (e Currency) Valid() bool { +// Valid indicates whether the value is a known member of the AppSourceUpsertType enum. +func (e AppSourceUpsertType) Valid() bool { switch e { - case USD: + case Code: + return true + case Container: return true default: return false } } -// Defines values for DeploymentEventType. +// Defines values for AppStatus. const ( - Audit DeploymentEventType = "audit" - Deploy DeploymentEventType = "deploy" - Error DeploymentEventType = "error" - Scaling DeploymentEventType = "scaling" + AppStatusActive AppStatus = "active" + AppStatusDeleted AppStatus = "deleted" + AppStatusDeleting AppStatus = "deleting" + AppStatusFailed AppStatus = "failed" + AppStatusInitializing AppStatus = "initializing" + AppStatusStopped AppStatus = "stopped" + AppStatusStopping AppStatus = "stopping" ) -// Valid indicates whether the value is a known member of the DeploymentEventType enum. -func (e DeploymentEventType) Valid() bool { +// Valid indicates whether the value is a known member of the AppStatus enum. +func (e AppStatus) Valid() bool { switch e { - case Audit: + case AppStatusActive: return true - case Deploy: + case AppStatusDeleted: return true - case Error: + case AppStatusDeleting: return true - case Scaling: + case AppStatusFailed: + return true + case AppStatusInitializing: + return true + case AppStatusStopped: + return true + case AppStatusStopping: return true default: return false } } -// Defines values for DeploymentSort. +// Defines values for BuildStatus. const ( - Activity DeploymentSort = "activity" - CreatedAt DeploymentSort = "createdAt" - ErrorRate DeploymentSort = "errorRate" - Name DeploymentSort = "name" + BuildStatusBuilding BuildStatus = "building" + BuildStatusFailed BuildStatus = "failed" + BuildStatusQueued BuildStatus = "queued" + BuildStatusReady BuildStatus = "ready" + BuildStatusSuperseded BuildStatus = "superseded" ) -// Valid indicates whether the value is a known member of the DeploymentSort enum. -func (e DeploymentSort) Valid() bool { +// Valid indicates whether the value is a known member of the BuildStatus enum. +func (e BuildStatus) Valid() bool { switch e { - case Activity: + case BuildStatusBuilding: return true - case CreatedAt: + case BuildStatusFailed: return true - case ErrorRate: + case BuildStatusQueued: return true - case Name: + case BuildStatusReady: + return true + case BuildStatusSuperseded: return true default: return false } } -// Defines values for DeploymentSourceUpsertType. +// Defines values for ComputeType. const ( - Code DeploymentSourceUpsertType = "code" - Container DeploymentSourceUpsertType = "container" + Gpu ComputeType = "gpu" ) -// Valid indicates whether the value is a known member of the DeploymentSourceUpsertType enum. -func (e DeploymentSourceUpsertType) Valid() bool { +// Valid indicates whether the value is a known member of the ComputeType enum. +func (e ComputeType) Valid() bool { switch e { - case Code: - return true - case Container: + case Gpu: return true default: return false } } -// Defines values for DeploymentStatus. +// Defines values for Currency. const ( - DeploymentStatusActive DeploymentStatus = "active" - DeploymentStatusDeleted DeploymentStatus = "deleted" - DeploymentStatusDeleting DeploymentStatus = "deleting" - DeploymentStatusFailed DeploymentStatus = "failed" - DeploymentStatusInitializing DeploymentStatus = "initializing" - DeploymentStatusStopped DeploymentStatus = "stopped" - DeploymentStatusStopping DeploymentStatus = "stopping" + USD Currency = "USD" ) -// Valid indicates whether the value is a known member of the DeploymentStatus enum. -func (e DeploymentStatus) Valid() bool { +// Valid indicates whether the value is a known member of the Currency enum. +func (e Currency) Valid() bool { switch e { - case DeploymentStatusActive: - return true - case DeploymentStatusDeleted: - return true - case DeploymentStatusDeleting: - return true - case DeploymentStatusFailed: - return true - case DeploymentStatusInitializing: - return true - case DeploymentStatusStopped: - return true - case DeploymentStatusStopping: + case USD: return true default: return false @@ -273,192 +270,124 @@ func (e WorkerStatus) Valid() bool { } } -// AppVolume defines model for AppVolume. -type AppVolume struct { - // MountPath Absolute path exposed inside the sandboxed application. The path is the volume's stable identity and is mirrored below the deployment's node-local data directory. Root, duplicate, and overlapping paths are rejected. - MountPath string `json:"mountPath"` -} - -// Build Details of a code build or container validation. -type Build struct { - CreatedAt *time.Time `json:"createdAt,omitempty"` - - // Error Error message or failure reason; null when the build is still running or succeeded. - Error *string `json:"error,omitempty"` - ExitCode *int32 `json:"exitCode,omitempty"` - Id openapi_types.UUID `json:"id"` - - // LogTail Trailing build log output. - LogTail *string `json:"logTail,omitempty"` - - // Status Build/validation lifecycle status. - Status BuildStatus `json:"status"` -} - -// BuildStatus Build/validation lifecycle status. -type BuildStatus string - -// CodeSourceUpsert defines model for CodeSourceUpsert. -type CodeSourceUpsert struct { - // BaseImage Base image for the builder, e.g. `python:3.11-slim`. - BaseImage string `json:"baseImage"` - Codebase CodebaseSource `json:"codebase"` - - // Requirements Additional pip packages to install alongside the codebase. - Requirements *[]string `json:"requirements,omitempty"` -} - -// CodebaseSource defines model for CodebaseSource. -type CodebaseSource struct { - // ModelFile Path within the zip to the MLflow model entry point (e.g. `model.py`). - ModelFile string `json:"modelFile"` - - // ZipBase64 Base64-encoded zip archive of the customer's code. Note: move to presigned URL upload for production — base64 bloats the request body for large codebases. - ZipBase64 string `json:"zipBase64"` -} - -// ComputeType defines model for ComputeType. -type ComputeType string - -// ContainerSource defines model for ContainerSource. -type ContainerSource struct { - // ImageRef Registry URI of a pre-built image, e.g. `ghcr.io/acme/model:v2`. - ImageRef string `json:"imageRef"` - - // RegistrySecretName Pull-credential name for a private image registry. Omit for a public registry. Parked on the version until image-pull custody has its own ADR — it is not a `secrets` row (ADR-019 covers only env-var secrets unsealed in-pod; the kubelet needs the credential before any container starts). - // When wired, the name becomes a Kubernetes Secret name, so it must be a DNS-1123 subdomain: lower-case alphanumerics, `-` and `.`, starting and ending alphanumeric, at most 253 characters. That is a hard requirement of what the name is used for, not a Runware naming policy. - RegistrySecretName *string `json:"registrySecretName,omitempty"` -} - -// Currency ISO 4217 alphabetic code. The platform bills in USD only. -type Currency string - -// DeployRequest defines model for DeployRequest. -type DeployRequest struct { - // VersionNumber Version number to deploy. Must reference a `ready` version on this deployment. Any in-progress or queued builds are cancelled. Use an older version number to roll back. - VersionNumber int32 `json:"versionNumber"` -} - -// Deployment defines model for Deployment. -type Deployment struct { +// App defines model for App. +type App struct { // ActiveVersionId Current deployed version; null until the first version is successfully deployed. ActiveVersionId *openapi_types.UUID `json:"activeVersionId,omitempty"` - // Configuration Live worker configuration. Updated via `PATCH /deployments/{deploymentId}`. - Configuration WorkerConfig `json:"configuration"` - CreatedAt time.Time `json:"createdAt"` + // AppId Immutable app identifier, unique within the authenticated organisation. + AppId AppId `json:"appId"` - // DeploymentId Immutable deployment identifier, unique within the authenticated organisation. - DeploymentId DeploymentId `json:"deploymentId"` + // AppName Mutable display name. Must contain at least one non-whitespace character: it is what the console renders and what `sort=name` orders on, and it is not required to be unique. Unlike `appId` the pattern is unanchored, so interior spaces are allowed — only an entirely blank name is rejected. + AppName AppName `json:"appName"` - // DeploymentName Mutable display name. Must contain at least one non-whitespace character: it is what the console renders and what `sort=name` orders on, and it is not required to be unique. Unlike `deploymentId` the pattern is unanchored, so interior spaces are allowed — only an entirely blank name is rejected. - DeploymentName DeploymentName `json:"deploymentName"` + // Configuration Live worker configuration. Updated via `PATCH /apps/{appId}`. + Configuration WorkerConfig `json:"configuration"` + CreatedAt time.Time `json:"createdAt"` - // EnvironmentVariables Plain-text environment variables for this deployment. Populated on single-deployment responses (get, update, stop, resume, delete, deploy, favourite). List of deployments returns an empty array to avoid an N+1 per page row — use the `/environment-variables` endpoints to page the set. + // EnvironmentVariables Plain-text environment variables for this app. Populated on single-app responses (get, update, stop, resume, delete, deploy, favourite). List of apps returns an empty array to avoid an N+1 per page row — use the `/environment-variables` endpoints to page the set. EnvironmentVariables []EnvironmentVariable `json:"environmentVariables"` - // IsFavourite Whether the authenticated organisation has favourited this deployment. Drives the console Favourites section; toggled via `PUT`/`DELETE` `/v1/deployments/{deploymentId}/favourite`. + // IsFavourite Whether the authenticated organisation has favourited this app. Drives the console Favourites section; toggled via `PUT`/`DELETE` `/v1/apps/{appId}/favourite`. IsFavourite bool `json:"isFavourite"` - // Secrets Secrets attached to this deployment, including any env-var name override. Populated on single-deployment responses; list of deployments returns an empty array to avoid an N+1 — use `/deployments/{deploymentId}/secrets` to page the set. + // Secrets Secrets attached to this app, including any env-var name override. Populated on single-app responses; list of apps returns an empty array to avoid an N+1 — use `/apps/{appId}/secrets` to page the set. Secrets []SecretAttachment `json:"secrets"` - Status DeploymentStatus `json:"status"` + Status AppStatus `json:"status"` UpdatedAt time.Time `json:"updatedAt"` } -// DeploymentCreate defines model for DeploymentCreate. -type DeploymentCreate struct { - Configuration WorkerConfigCreate `json:"configuration"` +// AppCreate defines model for AppCreate. +type AppCreate struct { + // AppId Immutable app identifier, unique within the authenticated organisation. + AppId AppId `json:"appId"` - // DeploymentId Immutable deployment identifier, unique within the authenticated organisation. - DeploymentId DeploymentId `json:"deploymentId"` + // AppName Mutable display name. Must contain at least one non-whitespace character: it is what the console renders and what `sort=name` orders on, and it is not required to be unique. Unlike `appId` the pattern is unanchored, so interior spaces are allowed — only an entirely blank name is rejected. + AppName AppName `json:"appName"` - // DeploymentName Mutable display name. Must contain at least one non-whitespace character: it is what the console renders and what `sort=name` orders on, and it is not required to be unique. Unlike `deploymentId` the pattern is unanchored, so interior spaces are allowed — only an entirely blank name is rejected. - DeploymentName DeploymentName `json:"deploymentName"` - - // DeploymentSource Write-only. Source for the initial deployment; not returned in the Deployment response. Use the `/builds` endpoints to inspect build status. + // AppSource Write-only. Source for the app's first version; not returned in the App response. Use the `/builds` endpoints to inspect build status. // - `code`: the codebase is submitted to the build pipeline; a new image is built and // deployed once ready. // // - `container`: no build step — the version names the image reference supplied here. - // No worker runs from a container source yet, so the deployment stays `initializing`. + // No worker runs from a container source yet, so the app stays `initializing`. // - // Either way the version is recorded with the deployment. A code deployment transitions to `active` once its first version is ready, or to `failed` if the build, validation, or rollout fails. - DeploymentSource DeploymentSourceUpsert `json:"deploymentSource"` + // Either way the version is recorded with the app. A code-source app transitions to `active` once its first version is ready, or to `failed` if the build, validation, or rollout fails. + AppSource AppSourceUpsert `json:"appSource"` + Configuration WorkerConfigCreate `json:"configuration"` - // Endpoints Invocable routes to expose on the deployment. Paths are unique within a deployment: repeating one in this array is rejected rather than collapsed, since there would be no answer to which entry a request meant. + // Endpoints Invocable routes to expose on the app. Paths are unique within an app: repeating one in this array is rejected rather than collapsed, since there would be no answer to which entry a request meant. Endpoints *[]EndpointCreate `json:"endpoints,omitempty"` - // EnvironmentVariables Map with environment variables. Keys are the environment variable names, values are the environment variable values. Use the dedicated `/environment-variables` endpoints to change them after the deployment exists. - // Each key must satisfy `EnvironmentVariableName` — POSIX-style, at most 128 characters. OpenAPI 3.0 cannot constrain map keys, so a bad one is rejected by the server rather than by the schema. Keys must also not collide with a secret's injected env var name on the same deployment (see `attachDeploymentSecret`). + // EnvironmentVariables Map with environment variables. Keys are the environment variable names, values are the environment variable values. Use the dedicated `/environment-variables` endpoints to change them after the app exists. + // Each key must satisfy `EnvironmentVariableName` — POSIX-style, at most 128 characters. OpenAPI 3.0 cannot constrain map keys, so a bad one is rejected by the server rather than by the schema. Keys must also not collide with a secret's injected env var name on the same app (see `attachAppSecret`). EnvironmentVariables *map[string]string `json:"environmentVariables,omitempty"` - // Secrets Existing organisation secrets to attach to this deployment, with an optional env-var name override per entry. Not persisted yet — supplying this field returns `422`, rather than accepting a set nothing attaches to the workload. Shape matches `POST /deployments/{deploymentId}/secrets` so create and attach share one contract. When wired, each injected name must not collide with a key in `environmentVariables` (or an existing `deployment_configs` row) — see `SecretAttach`. + // Secrets Existing organisation secrets to attach to this app, with an optional env-var name override per entry. Not persisted yet — supplying this field returns `422`, rather than accepting a set nothing attaches to the workload. Shape matches `POST /apps/{appId}/secrets` so create and attach share one contract. When wired, each injected name must not collide with a key in `environmentVariables` (or an existing `deployment_configs` row) — see `SecretAttach`. Secrets *[]SecretAttach `json:"secrets,omitempty"` - // Volumes Persistent node-local directories bind-mounted through the checkpointer into the sandboxed application. Use these for downloaded weights and caches that must stay outside the checkpointed root filesystem. Paths must be unique and non-overlapping. The set is frozen into each immutable deployment version. + // Volumes Persistent node-local directories bind-mounted through the checkpointer into the sandboxed application. Use these for downloaded weights and caches that must stay outside the checkpointed root filesystem. Paths must be unique and non-overlapping. The set is frozen into each immutable app version. Volumes *[]AppVolume `json:"volumes,omitempty"` } -// DeploymentEvent defines model for DeploymentEvent. -type DeploymentEvent struct { - CreatedAt *time.Time `json:"createdAt,omitempty"` - - // DeploymentId Immutable deployment identifier, unique within the authenticated organisation. - DeploymentId DeploymentId `json:"deploymentId"` - EndpointId *openapi_types.UUID `json:"endpointId,omitempty"` - Id openapi_types.UUID `json:"id"` +// AppEvent defines model for AppEvent. +type AppEvent struct { + // AppId Immutable app identifier, unique within the authenticated organisation. + AppId AppId `json:"appId"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + EndpointId *openapi_types.UUID `json:"endpointId,omitempty"` + Id openapi_types.UUID `json:"id"` // Message Human-readable description of what happened. Never blank. Message string `json:"message"` - Type DeploymentEventType `json:"type"` + Type AppEventType `json:"type"` WorkerId *openapi_types.UUID `json:"workerId,omitempty"` } -// DeploymentEventType defines model for DeploymentEventType. -type DeploymentEventType string +// AppEventType defines model for AppEventType. +type AppEventType string -// DeploymentId Immutable deployment identifier, unique within the authenticated organisation. -type DeploymentId = string +// AppId Immutable app identifier, unique within the authenticated organisation. +type AppId = string -// DeploymentName Mutable display name. Must contain at least one non-whitespace character: it is what the console renders and what `sort=name` orders on, and it is not required to be unique. Unlike `deploymentId` the pattern is unanchored, so interior spaces are allowed — only an entirely blank name is rejected. -type DeploymentName = string +// AppName Mutable display name. Must contain at least one non-whitespace character: it is what the console renders and what `sort=name` orders on, and it is not required to be unique. Unlike `appId` the pattern is unanchored, so interior spaces are allowed — only an entirely blank name is rejected. +type AppName = string -// DeploymentSort Ordering for `listDeployments`. Every ordering is total (ties broken by `deploymentId`), so a page is reproducible and its cursor stable. +// AppSort Ordering for `listApps`. Every ordering is total (ties broken by `appId`), so a page is reproducible and its cursor stable. // // - `createdAt`: newest first. The default. -// - `name`: `deploymentName` A–Z, case-insensitive. +// - `name`: `appName` A–Z, case-insensitive. // - `activity`: most recently active first. // - `errorRate`: highest error rate first. // -// `activity` and `errorRate` rank on per-deployment traffic metrics, which are not collected yet; requesting either returns `422` until they are. -type DeploymentSort string +// `activity` and `errorRate` rank on per-app traffic metrics, which are not collected yet; requesting either returns `422` until they are. +type AppSort string -// DeploymentSourceUpsert defines model for DeploymentSourceUpsert. -type DeploymentSourceUpsert struct { - Source DeploymentSourceUpsert_Source `json:"source"` +// AppSourceUpsert defines model for AppSourceUpsert. +type AppSourceUpsert struct { + Source AppSourceUpsert_Source `json:"source"` // Type Selects the version creation path. `code` submits customer source code to the Image Build Service; `container` references a pre-built OCI image. - Type DeploymentSourceUpsertType `json:"type"` + Type AppSourceUpsertType `json:"type"` } -// DeploymentSourceUpsert_Source defines model for DeploymentSourceUpsert.Source. -type DeploymentSourceUpsert_Source struct { +// AppSourceUpsert_Source defines model for AppSourceUpsert.Source. +type AppSourceUpsert_Source struct { union json.RawMessage } -// DeploymentSourceUpsertType Selects the version creation path. `code` submits customer source code to the Image Build Service; `container` references a pre-built OCI image. -type DeploymentSourceUpsertType string +// AppSourceUpsertType Selects the version creation path. `code` submits customer source code to the Image Build Service; `container` references a pre-built OCI image. +type AppSourceUpsertType string -// DeploymentStatus defines model for DeploymentStatus. -type DeploymentStatus string +// AppStatus defines model for AppStatus. +type AppStatus string -// DeploymentSummary Aggregate dashboard metrics for every deployment in the authenticated organisation. Deployment and worker tallies are always present (zero when empty). Traffic and spend metrics whose backing system is not yet available are omitted (rendered as "no data" by the frontend) rather than reported as zero. -type DeploymentSummary struct { - // ActiveDeployments Deployments currently in the `active` status. - ActiveDeployments int64 `json:"activeDeployments"` +// AppSummary Aggregate dashboard metrics for every app in the authenticated organisation. App and worker tallies are always present (zero when empty). Traffic and spend metrics whose backing system is not yet available are omitted (rendered as "no data" by the frontend) rather than reported as zero. +type AppSummary struct { + // ActiveApps Apps currently in the `active` status. + ActiveApps int64 `json:"activeApps"` - // ActiveWorkers Non-terminal workers (`status` other than `stopped`) across every deployment in the organisation. + // ActiveWorkers Non-terminal workers (`status` other than `stopped`) across every app in the organisation. ActiveWorkers int64 `json:"activeWorkers"` // CalculatedAt When these metrics were computed. @@ -476,59 +405,123 @@ type DeploymentSummary struct { // SpendToday Estimated spend since 00:00 UTC. Omitted until billing rollups are available. SpendToday *MoneyAmount `json:"spendToday,omitempty"` - // TotalDeployments All deployments in the organisation excluding soft-deleted ones. - TotalDeployments int64 `json:"totalDeployments"` + // TotalApps All apps in the organisation excluding soft-deleted ones. + TotalApps int64 `json:"totalApps"` } -// DeploymentUpdate Updates one or more aspects of a deployment in place. All fields are optional; omitted fields are left unchanged. Lifecycle transitions (stop/resume/delete/deploy) use their dedicated operations. +// AppUpdate Updates one or more aspects of an app in place. All fields are optional; omitted fields are left unchanged. Lifecycle transitions (stop/resume/delete/deploy) use their dedicated operations. // A successful update records a new version carrying the updated configuration and the same image, so what to deploy is always a version rather than the current state of a mutable row. `activeVersionId` does not move: the running workload is unchanged until that version is deployed. -// **Currently applied:** `deploymentName` and `configuration`. Supplying `deploymentSource`, `secrets`, `environmentVariables`, or `endpoints` returns `422` (bulk env-var replace is not wired — use the dedicated `/environment-variables` endpoints for individual keys). When wired, configuration/secret/endpoint changes take effect on the next Scaler cycle; `deploymentSource` triggers a new build and rollout. -type DeploymentUpdate struct { - // Configuration Partial worker configuration. Any field present overwrites the live value; omitted fields are left unchanged. Clearing a nullable live field (setting it to null) is not supported — omit the field to leave it unchanged. `computeType` is create-time only and cannot be patched. Changing `gpuType` or `gpusPerWorker` affects only newly created workers. - Configuration *WorkerConfigPatch `json:"configuration,omitempty"` +// **Currently applied:** `appName` and `configuration`. Supplying `appSource`, `secrets`, `environmentVariables`, or `endpoints` returns `422` (bulk env-var replace is not wired — use the dedicated `/environment-variables` endpoints for individual keys). When wired, configuration/secret/endpoint changes take effect on the next Scaler cycle; `appSource` triggers a new build and rollout. +type AppUpdate struct { + // AppName Mutable display name; does not affect app identity or routing. Omit to leave unchanged — an explicit blank value is rejected, not treated as a clear. + AppName *AppName `json:"appName,omitempty"` - // DeploymentName Mutable display name; does not affect deployment identity or routing. Omit to leave unchanged — an explicit blank value is rejected, not treated as a clear. - DeploymentName *DeploymentName `json:"deploymentName,omitempty"` + // AppSource Write-only. New source to build and deploy; not returned in the App response. Use the `/builds` endpoints to inspect build status. Triggers a build (for `code` sources) or image validation (for `container` sources); on success the resulting version is deployed automatically. On failure the app remains on the previous version. Not persisted yet — supplying this field returns `422`. + AppSource *AppSourceUpsert `json:"appSource,omitempty"` - // DeploymentSource Write-only. New source to build and deploy; not returned in the Deployment response. Use the `/builds` endpoints to inspect build status. Triggers a build (for `code` sources) or image validation (for `container` sources); on success the resulting version is deployed automatically. On failure the deployment remains on the previous version. Not persisted yet — supplying this field returns `422`. - DeploymentSource *DeploymentSourceUpsert `json:"deploymentSource,omitempty"` + // Configuration Partial worker configuration. Any field present overwrites the live value; omitted fields are left unchanged. Clearing a nullable live field (setting it to null) is not supported — omit the field to leave it unchanged. `computeType` is create-time only and cannot be patched. Changing `gpuType` or `gpusPerWorker` affects only newly created workers. + Configuration *WorkerConfigPatch `json:"configuration,omitempty"` - // Endpoints Replaces the deployment's endpoints. Not persisted yet — supplying this field returns `422`. + // Endpoints Replaces the app's endpoints. Not persisted yet — supplying this field returns `422`. Endpoints *[]EndpointCreate `json:"endpoints,omitempty"` - // EnvironmentVariables Map with environment variables. Keys are the environment variable names, values are the environment variable values. Setting the value of an environment variable to null deletes the environment variable from the deployment. Not persisted yet — supplying this field returns `422`. + // EnvironmentVariables Map with environment variables. Keys are the environment variable names, values are the environment variable values. Setting the value of an environment variable to null deletes the environment variable from the app. Not persisted yet — supplying this field returns `422`. EnvironmentVariables *map[string]*string `json:"environmentVariables,omitempty"` - // Secrets Replaces the deployment's secret attachments. Same `SecretAttach` shape as create and `POST /deployments/{deploymentId}/secrets`. Not persisted yet — supplying this field returns `422`. When wired, injected names must not collide with plain environment variables on the deployment. + // Secrets Replaces the app's secret attachments. Same `SecretAttach` shape as create and `POST /apps/{appId}/secrets`. Not persisted yet — supplying this field returns `422`. When wired, injected names must not collide with plain environment variables on the app. Secrets *[]SecretAttach `json:"secrets,omitempty"` } -// Endpoint defines model for Endpoint. -type Endpoint struct { +// AppVolume defines model for AppVolume. +type AppVolume struct { + // MountPath Absolute path exposed inside the sandboxed application. The path is the volume's stable identity and is mirrored below the app's node-local data directory. Root, duplicate, and overlapping paths are rejected. + MountPath string `json:"mountPath"` +} + +// Build Details of a code build or container validation. +type Build struct { CreatedAt *time.Time `json:"createdAt,omitempty"` - // DeploymentId Immutable deployment identifier, unique within the authenticated organisation. - DeploymentId DeploymentId `json:"deploymentId"` - Id openapi_types.UUID `json:"id"` + // Error Error message or failure reason; null when the build is still running or succeeded. + Error *string `json:"error,omitempty"` + ExitCode *int32 `json:"exitCode,omitempty"` + Id openapi_types.UUID `json:"id"` + + // LogTail Trailing build log output. + LogTail *string `json:"logTail,omitempty"` - // Path The endpoint's identity within the deployment: a bare lowercase URL segment, e.g. `generate`, with no leading slash. Unique within the deployment, so it identifies the endpoint on its own. + // Status Build/validation lifecycle status. + Status BuildStatus `json:"status"` +} + +// BuildStatus Build/validation lifecycle status. +type BuildStatus string + +// CodeSourceUpsert defines model for CodeSourceUpsert. +type CodeSourceUpsert struct { + // BaseImage Base image for the builder, e.g. `python:3.11-slim`. + BaseImage string `json:"baseImage"` + Codebase CodebaseSource `json:"codebase"` + + // Requirements Additional pip packages to install alongside the codebase. + Requirements *[]string `json:"requirements,omitempty"` +} + +// CodebaseSource defines model for CodebaseSource. +type CodebaseSource struct { + // ModelFile Path within the zip to the MLflow model entry point (e.g. `model.py`). + ModelFile string `json:"modelFile"` + + // ZipBase64 Base64-encoded zip archive of the customer's code. Note: move to presigned URL upload for production — base64 bloats the request body for large codebases. + ZipBase64 string `json:"zipBase64"` +} + +// ComputeType Worker compute class. GPU is the only supported value. CPU workloads are not supported. +type ComputeType string + +// ContainerSource defines model for ContainerSource. +type ContainerSource struct { + // ImageRef Registry URI of a pre-built image, e.g. `ghcr.io/acme/model:v2`. + ImageRef string `json:"imageRef"` + + // RegistrySecretName Pull-credential name for a private image registry. Omit for a public registry. Parked on the version until image-pull custody has its own ADR — it is not a `secrets` row (ADR-019 covers only env-var secrets unsealed in-pod; the kubelet needs the credential before any container starts). + // When wired, the name becomes a Kubernetes Secret name, so it must be a DNS-1123 subdomain: lower-case alphanumerics, `-` and `.`, starting and ending alphanumeric, at most 253 characters. That is a hard requirement of what the name is used for, not a Runware naming policy. + RegistrySecretName *string `json:"registrySecretName,omitempty"` +} + +// Currency ISO 4217 alphabetic code. The platform bills in USD only. +type Currency string + +// DeployRequest defines model for DeployRequest. +type DeployRequest struct { + // VersionNumber Version number to deploy. Must reference a `ready` version on this app. Any in-progress or queued builds are cancelled. Use an older version number to roll back. + VersionNumber int32 `json:"versionNumber"` +} + +// Endpoint defines model for Endpoint. +type Endpoint struct { + // AppId Immutable app identifier, unique within the authenticated organisation. + AppId AppId `json:"appId"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + Id openapi_types.UUID `json:"id"` + + // Path The endpoint's identity within the app: a bare lowercase URL segment, e.g. `generate`, with no leading slash. Unique within the app, so it identifies the endpoint on its own. Path string `json:"path"` UpdatedAt *time.Time `json:"updatedAt,omitempty"` } // EndpointCreate defines model for EndpointCreate. type EndpointCreate struct { - // Path The endpoint's identity within the deployment: a bare lowercase URL segment, e.g. `generate` — a letter first, then letters, digits and hyphens, ending with a letter or digit, max 64 characters. No leading slash: documentation may display `/generate`, but the stored and addressed form is `generate`, so it drops into the invocation URL with no encoding. Unique within the deployment. All invocations are POST; the HTTP method is not part of endpoint identity. + // Path The endpoint's identity within the app: a bare lowercase URL segment, e.g. `generate` — a letter first, then letters, digits and hyphens, ending with a letter or digit, max 64 characters. No leading slash: documentation may display `/generate`, but the stored and addressed form is `generate`, so it drops into the invocation URL with no encoding. Unique within the app. All invocations are POST; the HTTP method is not part of endpoint identity. Path string `json:"path"` } // EnvironmentVariable defines model for EnvironmentVariable. type EnvironmentVariable struct { - CreatedAt *time.Time `json:"createdAt,omitempty"` - - // DeploymentId Immutable deployment identifier, unique within the authenticated organisation. - DeploymentId *DeploymentId `json:"deploymentId,omitempty"` - Id *openapi_types.UUID `json:"id,omitempty"` + // AppId Immutable app identifier, unique within the authenticated organisation. + AppId *AppId `json:"appId,omitempty"` + CreatedAt *time.Time `json:"createdAt,omitempty"` + Id *openapi_types.UUID `json:"id,omitempty"` // Key POSIX-style environment variable name. Letters, digits, and underscore; must start with a letter or underscore. Matched by the `deployment_configs` column CHECK so a valid-by-contract request cannot 500 at INSERT. Key EnvironmentVariableName `json:"key"` @@ -597,6 +590,9 @@ type GpuType struct { // Availability Scheduler provisioning availability for this GPU type. Availability GpuAvailability `json:"availability"` + // DeletedAt Retirement time, returned only in the Runware catalogue view. + DeletedAt *time.Time `json:"deletedAt,omitempty"` + // Id Public catalogue code referenced by `gpuType` in worker configuration (not the internal database row UUID). Id GpuTypeId `json:"id"` @@ -680,10 +676,10 @@ type Page struct { type ProblemDetails struct { // Detail Human-readable explanation specific to this occurrence. // - // Example: No deployment 'img-gen' exists for the authenticated organisation. + // Example: No app 'img-gen' exists for the authenticated organisation. Detail *string `json:"detail,omitempty"` - // EndpointPath Extension member. Present on a `404` from task invocation when the deployment exists but does not declare the requested endpoint path; its presence distinguishes an unknown endpoint from an unknown deployment. Carries the rejected path. + // EndpointPath Extension member. Present on a `404` from task invocation when the app exists but does not declare the requested endpoint path; its presence distinguishes an unknown endpoint from an unknown app. Carries the rejected path. // // // Example: generate @@ -694,7 +690,7 @@ type ProblemDetails struct { // Instance URI reference identifying the specific occurrence (the request path). // - // Example: /v1/deployments/img-gen + // Example: /v1/apps/img-gen Instance *string `json:"instance,omitempty"` // RequestId Extension member. Correlation id for this request, echoed in the `X-Request-Id` response header; quote it when reporting problems. @@ -752,9 +748,9 @@ type Secret struct { UpdatedAt *time.Time `json:"updatedAt,omitempty"` } -// SecretAttach Attach an organisation secret to a deployment (control-plane record only in this release). The resolved name (`envVarName`, or `secretName` when omitted) is stored as one NOT NULL column. It must be unique among this deployment's secret attaches and must not collide with a plain environment variable key on the same deployment — both names are reserved for the same future pod env namespace. Reserved platform names are rejected as on `SecretName`. +// SecretAttach Attach an organisation secret to an app (control-plane record only in this release). The resolved name (`envVarName`, or `secretName` when omitted) is stored as one NOT NULL column. It must be unique among this app's secret attaches and must not collide with a plain environment variable key on the same app — both names are reserved for the same future pod env namespace. Reserved platform names are rejected as on `SecretName`. type SecretAttach struct { - // EnvVarName Environment variable name to use when the secret is eventually injected. Omit or null to use `secretName`; the server resolves and stores the final name. Same reserved-name rules as `SecretName` (`422` if reserved). The resolved name must also not collide with `deployment_configs.key` on this deployment (`422`). + // EnvVarName Environment variable name to use when the secret is eventually injected. Omit or null to use `secretName`; the server resolves and stores the final name. Same reserved-name rules as `SecretName` (`422` if reserved). The resolved name must also not collide with `deployment_configs.key` on this app (`422`). EnvVarName *EnvironmentVariableName `json:"envVarName,omitempty"` // SecretName Organisation-scoped secret name. The shape matches `EnvironmentVariableName` and the `secrets.name` / `deployment_secrets.env_var_name` column CHECKs — one rule for the contract and the schema — because attached secrets are intended to be injected as environment variables once ADR-019 in-pod unseal lands. @@ -762,7 +758,7 @@ type SecretAttach struct { SecretName SecretName `json:"secretName"` } -// SecretAttachment A secret attached to a deployment. The encrypted value is never returned. The database always stores the injected env var name; this response omits `envVarName` when it equals the secret `name` (no override). +// SecretAttachment A secret attached to an app. The encrypted value is never returned. The database always stores the injected env var name; this response omits `envVarName` when it equals the secret `name` (no override). type SecretAttachment struct { CreatedAt *time.Time `json:"createdAt,omitempty"` @@ -816,12 +812,11 @@ type SecretUpdate struct { // Task defines model for Task. type Task struct { + // AppId Immutable app identifier, unique within the authenticated organisation. + AppId AppId `json:"appId"` CompletedAt *time.Time `json:"completedAt,omitempty"` CreatedAt time.Time `json:"createdAt"` - // DeploymentId Immutable deployment identifier, unique within the authenticated organisation. - DeploymentId DeploymentId `json:"deploymentId"` - // Error Failure detail when status is `failed`; null otherwise. Error *string `json:"error,omitempty"` @@ -838,12 +833,12 @@ type TaskStatus string // UsageEvent defines model for UsageEvent. type UsageEvent struct { + // AppId Immutable app identifier, unique within the authenticated organisation. + AppId AppId `json:"appId"` + // CreatedAt When the event was recorded. Audit only — may lag `occurredAt`. CreatedAt *time.Time `json:"createdAt,omitempty"` - // DeploymentId Immutable deployment identifier, unique within the authenticated organisation. - DeploymentId DeploymentId `json:"deploymentId"` - // EventType Status the worker transitioned into. The ledger emits a subset of `WorkerStatus` — `busy` never appears (queue occupancy, not a pod lifecycle transition). EventType WorkerStatus `json:"eventType"` GpuCount int32 `json:"gpuCount"` @@ -854,28 +849,28 @@ type UsageEvent struct { WorkerId openapi_types.UUID `json:"workerId"` } -// Version An immutable record of what to deploy. One is created with the deployment and one on every update, so a rollout always names a version rather than reading configuration that may since have changed. +// Version An immutable record of what to deploy. One is created with the app and one on every update, so a rollout always names a version rather than reading configuration that may since have changed. type Version struct { + // AppId Immutable app identifier, unique within the authenticated organisation. + AppId AppId `json:"appId"` + // BuildId The build that produced this version's image. Null for a `container` source, which names an image the customer already built and so has no build. A version created by an update carries the image, and therefore this build, forward. BuildId *openapi_types.UUID `json:"buildId,omitempty"` CreatedAt time.Time `json:"createdAt"` + Id openapi_types.UUID `json:"id"` - // DeploymentId Immutable deployment identifier, unique within the authenticated organisation. - DeploymentId DeploymentId `json:"deploymentId"` - Id openapi_types.UUID `json:"id"` - - // VersionNumber Monotonically increasing per deployment. + // VersionNumber Monotonically increasing per app. VersionNumber int32 `json:"versionNumber"` } // Worker A worker instance observed from Kubernetes. Read-only runtime state written by the reconciler; `id` is the pod UID. type Worker struct { + // AppId Immutable app identifier, unique within the authenticated organisation. + AppId AppId `json:"appId"` + // CreatedAt Pod creation time (`metadata.creationTimestamp`), not insert time. CreatedAt *time.Time `json:"createdAt,omitempty"` - // DeploymentId Immutable deployment identifier, unique within the authenticated organisation. - DeploymentId DeploymentId `json:"deploymentId"` - // GpuCount GPUs attached to this worker at observation time. GpuCount int32 `json:"gpuCount"` @@ -904,21 +899,23 @@ type Worker struct { // WorkerConfig defines model for WorkerConfig. type WorkerConfig struct { + // AppId Immutable app identifier, unique within the authenticated organisation. + AppId AppId `json:"appId"` + // AvailableWorkersPct Scaling buffer as a percentage of incoming task load. - AvailableWorkersPct *int32 `json:"availableWorkersPct,omitempty"` - ComputeType ComputeType `json:"computeType"` + AvailableWorkersPct *int32 `json:"availableWorkersPct,omitempty"` + + // ComputeType Worker compute class. GPU is the only supported value. CPU workloads are not supported. + ComputeType ComputeType `json:"computeType"` // Concurrency Max tasks a single worker handles simultaneously. Concurrency int32 `json:"concurrency"` CreatedAt *time.Time `json:"createdAt,omitempty"` - // DeploymentId Immutable deployment identifier, unique within the authenticated organisation. - DeploymentId DeploymentId `json:"deploymentId"` - // FallbackGpuType Secondary GPU type used if the preferred type is unavailable. FallbackGpuType *GpuTypeId `json:"fallbackGpuType,omitempty"` - // GpuType Preferred GPU type; null when computeType is `cpu`. + // GpuType Preferred GPU type. Absent (or null) only on historical apps created before a GPU type was required. GpuType *GpuTypeId `json:"gpuType,omitempty"` GpusPerWorker int32 `json:"gpusPerWorker"` Id openapi_types.UUID `json:"id"` @@ -940,19 +937,21 @@ type WorkerConfig struct { // WorkerConfigCreate defines model for WorkerConfigCreate. type WorkerConfigCreate struct { - AvailableWorkersPct *int32 `json:"availableWorkersPct,omitempty"` - ComputeType *ComputeType `json:"computeType,omitempty"` - Concurrency *int32 `json:"concurrency,omitempty"` - FallbackGpuType *GpuTypeId `json:"fallbackGpuType,omitempty"` + AvailableWorkersPct *int32 `json:"availableWorkersPct,omitempty"` - // GpuType Preferred GPU type. Rejected with a 422 when no capacity is currently offered for the type (it does not appear in `GET /v1/gpu-types`). - GpuType *GpuTypeId `json:"gpuType,omitempty"` - GpusPerWorker *int32 `json:"gpusPerWorker,omitempty"` - IdleTtlSecs int32 `json:"idleTtlSecs"` - MaxWorkers int32 `json:"maxWorkers"` - MinAvailableWorkers *int32 `json:"minAvailableWorkers,omitempty"` - MinWorkers *int32 `json:"minWorkers,omitempty"` - ScalingDelaySecs int32 `json:"scalingDelaySecs"` + // ComputeType GPU is the only supported compute type. Omitting the field selects GPU. CPU workloads are not supported; a request that names `cpu` is rejected with 422 before a build or deploy starts. + ComputeType *ComputeType `json:"computeType,omitempty"` + Concurrency *int32 `json:"concurrency,omitempty"` + FallbackGpuType *GpuTypeId `json:"fallbackGpuType,omitempty"` + + // GpuType GPU type the workers run on. Required: omitting it (or sending null) is a 422 before a build or deploy starts, because a GPU app with no type is unpinned and the deployer would render NVIDIA defaults. Must match an `id` returned by `GET /v1/gpu-types` that currently has admitted capacity. + GpuType GpuTypeId `json:"gpuType"` + GpusPerWorker *int32 `json:"gpusPerWorker,omitempty"` + IdleTtlSecs int32 `json:"idleTtlSecs"` + MaxWorkers int32 `json:"maxWorkers"` + MinAvailableWorkers *int32 `json:"minAvailableWorkers,omitempty"` + MinWorkers *int32 `json:"minWorkers,omitempty"` + ScalingDelaySecs int32 `json:"scalingDelaySecs"` } // WorkerConfigPatch Partial worker configuration. Any field present overwrites the live value; omitted fields are left unchanged. Clearing a nullable live field (setting it to null) is not supported — omit the field to leave it unchanged. `computeType` is create-time only and cannot be patched. Changing `gpuType` or `gpusPerWorker` affects only newly created workers. @@ -1021,23 +1020,23 @@ type ValidationError = ProblemDetails // TaskPayload defines model for TaskPayload. type TaskPayload map[string]interface{} -// ListDeploymentsParams defines parameters for ListDeployments. -type ListDeploymentsParams struct { +// ListAppsParams defines parameters for ListApps. +type ListAppsParams struct { // Limit Maximum number of items to return. Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` // Cursor Opaque pagination cursor returned as `nextCursor` by a previous call. Cursor *Cursor `form:"cursor,omitempty" json:"cursor,omitempty"` - // Status Return only deployments in this status. - Status *DeploymentStatus `form:"status,omitempty" json:"status,omitempty"` + // Status Return only apps in this status. + Status *AppStatus `form:"status,omitempty" json:"status,omitempty"` - // Q Case-insensitive substring match against `deploymentName` and `deploymentId`. A deployment matching either is returned. + // Q Case-insensitive substring match against `appName` and `appId`. An app matching either is returned. Q *string `form:"q,omitempty" json:"q,omitempty"` - // GpuType Return only deployments whose worker configuration requests this GPU type. Matched against `configuration.gpuType` only, not `fallbackGpuType`. Must be a code from `GET /v1/gpu-types`; an unknown code returns `422`. - GpuType *GpuTypeId `form:"gpuType,omitempty" json:"gpuType,omitempty"` - Sort *DeploymentSort `form:"sort,omitempty" json:"sort,omitempty"` + // GpuType Return only apps whose worker configuration requests this GPU type. Matched against `configuration.gpuType` only, not `fallbackGpuType`. Must be a code from `GET /v1/gpu-types`; an unknown code returns `422`. + GpuType *GpuTypeId `form:"gpuType,omitempty" json:"gpuType,omitempty"` + Sort *AppSort `form:"sort,omitempty" json:"sort,omitempty"` } // ListBuildsParams defines parameters for ListBuilds. @@ -1058,8 +1057,8 @@ type ListEndpointsParams struct { Cursor *Cursor `form:"cursor,omitempty" json:"cursor,omitempty"` } -// ListDeploymentEnvironmentVariablesParams defines parameters for ListDeploymentEnvironmentVariables. -type ListDeploymentEnvironmentVariablesParams struct { +// ListAppEnvironmentVariablesParams defines parameters for ListAppEnvironmentVariables. +type ListAppEnvironmentVariablesParams struct { // Limit Maximum number of items to return. Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` @@ -1067,14 +1066,14 @@ type ListDeploymentEnvironmentVariablesParams struct { Cursor *Cursor `form:"cursor,omitempty" json:"cursor,omitempty"` } -// ListDeploymentEventsParams defines parameters for ListDeploymentEvents. -type ListDeploymentEventsParams struct { +// ListAppEventsParams defines parameters for ListAppEvents. +type ListAppEventsParams struct { // Limit Maximum number of items to return. Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` // Cursor Opaque pagination cursor returned as `nextCursor` by a previous call. - Cursor *Cursor `form:"cursor,omitempty" json:"cursor,omitempty"` - Type *DeploymentEventType `form:"type,omitempty" json:"type,omitempty"` + Cursor *Cursor `form:"cursor,omitempty" json:"cursor,omitempty"` + Type *AppEventType `form:"type,omitempty" json:"type,omitempty"` } // StartAsyncTaskJSONBody defines parameters for StartAsyncTask. @@ -1083,8 +1082,8 @@ type StartAsyncTaskJSONBody map[string]interface{} // StartSyncTaskJSONBody defines parameters for StartSyncTask. type StartSyncTaskJSONBody map[string]interface{} -// ListDeploymentSecretsParams defines parameters for ListDeploymentSecrets. -type ListDeploymentSecretsParams struct { +// ListAppSecretsParams defines parameters for ListAppSecrets. +type ListAppSecretsParams struct { // Limit Maximum number of items to return. Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` @@ -1145,8 +1144,8 @@ type ListUsageEventsParams struct { Limit *Limit `form:"limit,omitempty" json:"limit,omitempty"` // Cursor Opaque pagination cursor returned as `nextCursor` by a previous call. - Cursor *Cursor `form:"cursor,omitempty" json:"cursor,omitempty"` - DeploymentId *DeploymentId `form:"deploymentId,omitempty" json:"deploymentId,omitempty"` + Cursor *Cursor `form:"cursor,omitempty" json:"cursor,omitempty"` + AppId *AppId `form:"appId,omitempty" json:"appId,omitempty"` // From Inclusive lower bound on event time (RFC 3339). From *time.Time `form:"from,omitempty" json:"from,omitempty"` @@ -1155,17 +1154,17 @@ type ListUsageEventsParams struct { To *time.Time `form:"to,omitempty" json:"to,omitempty"` } -// CreateDeploymentJSONRequestBody defines body for CreateDeployment for application/json ContentType. -type CreateDeploymentJSONRequestBody = DeploymentCreate +// CreateAppJSONRequestBody defines body for CreateApp for application/json ContentType. +type CreateAppJSONRequestBody = AppCreate -// UpdateDeploymentJSONRequestBody defines body for UpdateDeployment for application/json ContentType. -type UpdateDeploymentJSONRequestBody = DeploymentUpdate +// UpdateAppJSONRequestBody defines body for UpdateApp for application/json ContentType. +type UpdateAppJSONRequestBody = AppUpdate // DeployVersionJSONRequestBody defines body for DeployVersion for application/json ContentType. type DeployVersionJSONRequestBody = DeployRequest -// UpdateDeploymentEnvironmentVariableJSONRequestBody defines body for UpdateDeploymentEnvironmentVariable for application/json ContentType. -type UpdateDeploymentEnvironmentVariableJSONRequestBody = EnvironmentVariableUpdate +// UpdateAppEnvironmentVariableJSONRequestBody defines body for UpdateAppEnvironmentVariable for application/json ContentType. +type UpdateAppEnvironmentVariableJSONRequestBody = EnvironmentVariableUpdate // StartAsyncTaskJSONRequestBody defines body for StartAsyncTask for application/json ContentType. type StartAsyncTaskJSONRequestBody StartAsyncTaskJSONBody @@ -1173,8 +1172,8 @@ type StartAsyncTaskJSONRequestBody StartAsyncTaskJSONBody // StartSyncTaskJSONRequestBody defines body for StartSyncTask for application/json ContentType. type StartSyncTaskJSONRequestBody StartSyncTaskJSONBody -// AttachDeploymentSecretJSONRequestBody defines body for AttachDeploymentSecret for application/json ContentType. -type AttachDeploymentSecretJSONRequestBody = SecretAttach +// AttachAppSecretJSONRequestBody defines body for AttachAppSecret for application/json ContentType. +type AttachAppSecretJSONRequestBody = SecretAttach // CreateGpuTypeJSONRequestBody defines body for CreateGpuType for application/json ContentType. type CreateGpuTypeJSONRequestBody = GpuTypeCreate @@ -1194,22 +1193,22 @@ type CreateSecretJSONRequestBody = SecretCreate // UpdateSecretJSONRequestBody defines body for UpdateSecret for application/json ContentType. type UpdateSecretJSONRequestBody = SecretUpdate -// AsCodeSourceUpsert returns the union data inside the DeploymentSourceUpsert_Source as a CodeSourceUpsert -func (t DeploymentSourceUpsert_Source) AsCodeSourceUpsert() (CodeSourceUpsert, error) { +// AsCodeSourceUpsert returns the union data inside the AppSourceUpsert_Source as a CodeSourceUpsert +func (t AppSourceUpsert_Source) AsCodeSourceUpsert() (CodeSourceUpsert, error) { var body CodeSourceUpsert err := json.Unmarshal(t.union, &body) return body, err } -// FromCodeSourceUpsert overwrites any union data inside the DeploymentSourceUpsert_Source as the provided CodeSourceUpsert -func (t *DeploymentSourceUpsert_Source) FromCodeSourceUpsert(v CodeSourceUpsert) error { +// FromCodeSourceUpsert overwrites any union data inside the AppSourceUpsert_Source as the provided CodeSourceUpsert +func (t *AppSourceUpsert_Source) FromCodeSourceUpsert(v CodeSourceUpsert) error { b, err := json.Marshal(v) t.union = b return err } -// MergeCodeSourceUpsert performs a merge with any union data inside the DeploymentSourceUpsert_Source, using the provided CodeSourceUpsert -func (t *DeploymentSourceUpsert_Source) MergeCodeSourceUpsert(v CodeSourceUpsert) error { +// MergeCodeSourceUpsert performs a merge with any union data inside the AppSourceUpsert_Source, using the provided CodeSourceUpsert +func (t *AppSourceUpsert_Source) MergeCodeSourceUpsert(v CodeSourceUpsert) error { b, err := json.Marshal(v) if err != nil { return err @@ -1220,22 +1219,22 @@ func (t *DeploymentSourceUpsert_Source) MergeCodeSourceUpsert(v CodeSourceUpsert return err } -// AsContainerSource returns the union data inside the DeploymentSourceUpsert_Source as a ContainerSource -func (t DeploymentSourceUpsert_Source) AsContainerSource() (ContainerSource, error) { +// AsContainerSource returns the union data inside the AppSourceUpsert_Source as a ContainerSource +func (t AppSourceUpsert_Source) AsContainerSource() (ContainerSource, error) { var body ContainerSource err := json.Unmarshal(t.union, &body) return body, err } -// FromContainerSource overwrites any union data inside the DeploymentSourceUpsert_Source as the provided ContainerSource -func (t *DeploymentSourceUpsert_Source) FromContainerSource(v ContainerSource) error { +// FromContainerSource overwrites any union data inside the AppSourceUpsert_Source as the provided ContainerSource +func (t *AppSourceUpsert_Source) FromContainerSource(v ContainerSource) error { b, err := json.Marshal(v) t.union = b return err } -// MergeContainerSource performs a merge with any union data inside the DeploymentSourceUpsert_Source, using the provided ContainerSource -func (t *DeploymentSourceUpsert_Source) MergeContainerSource(v ContainerSource) error { +// MergeContainerSource performs a merge with any union data inside the AppSourceUpsert_Source, using the provided ContainerSource +func (t *AppSourceUpsert_Source) MergeContainerSource(v ContainerSource) error { b, err := json.Marshal(v) if err != nil { return err @@ -1246,12 +1245,12 @@ func (t *DeploymentSourceUpsert_Source) MergeContainerSource(v ContainerSource) return err } -func (t DeploymentSourceUpsert_Source) MarshalJSON() ([]byte, error) { +func (t AppSourceUpsert_Source) MarshalJSON() ([]byte, error) { b, err := t.union.MarshalJSON() return b, err } -func (t *DeploymentSourceUpsert_Source) UnmarshalJSON(b []byte) error { +func (t *AppSourceUpsert_Source) UnmarshalJSON(b []byte) error { err := t.union.UnmarshalJSON(b) return err } @@ -1330,33 +1329,33 @@ func WithRequestEditorFn(fn RequestEditorFn) ClientOption { // The interface specification for the client above. type ClientInterface interface { - // GetDeploymentSummary Deployment summary metrics for the authenticated organisation + // GetAppSummary App summary metrics for the authenticated organisation // - // Aggregate dashboard metrics across all deployments owned by the authenticated organisation. Metrics whose backing system is not yet available are omitted from the response rather than reported as zero. + // Aggregate dashboard metrics across all apps owned by the authenticated organisation. Metrics whose backing system is not yet available are omitted from the response rather than reported as zero. // - // Corresponds with GET /v1/deployment-summary (the `GetDeploymentSummary` operationId). - GetDeploymentSummary(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) + // Corresponds with GET /v1/app-summary (the `GetAppSummary` operationId). + GetAppSummary(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) - // ListDeployments List deployments + // ListApps List apps // - // Returns a page of the organisation's deployments. Filters combine with AND; soft-deleted deployments are excluded unless `status=deleted` is requested explicitly. + // Returns a page of the organisation's apps. Filters combine with AND; soft-deleted apps are excluded unless `status=deleted` is requested explicitly. // // A `cursor` is only valid for the `sort` and filters it was issued under — reusing one across a different ordering or filter set returns `400`. // - // Corresponds with GET /v1/deployments (the `ListDeployments` operationId). - ListDeployments(ctx context.Context, params *ListDeploymentsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + // Corresponds with GET /v1/apps (the `ListApps` operationId). + ListApps(ctx context.Context, params *ListAppsParams, reqEditors ...RequestEditorFn) (*http.Response, error) - // CreateDeploymentWithBody Create a deployment + // CreateAppWithBody Create an app // - // Creates a deployment together with its worker configuration, environment variables and endpoints, and records version `1` — the immutable description of what to deploy. The deployment starts in `initializing`, and what happens next depends on the deployment source type: + // Creates an app together with its worker configuration, environment variables and endpoints, and records version `1` — the immutable description of what to deploy. The app starts in `initializing`, and what happens next depends on the app source type: // // - `code` source: the codebase is submitted to the build pipeline; once the image is built - // and workers become healthy the deployment transitions to `active` and `activeVersionId` - // points at that version. If the build, validation, or rollout fails the deployment is + // and workers become healthy the app transitions to `active` and `activeVersionId` + // points at that version. If the build, validation, or rollout fails the app is // marked `failed`. // // - `container` source: no build step, so the version carries no `buildId`. No worker runs - // from a container source yet, so the deployment stays `initializing` and does not serve + // from a container source yet, so the app stays `initializing` and does not serve // inference — poll `active` only for a `code` source. // // @@ -1366,20 +1365,20 @@ type ClientInterface interface { // // Takes any type of body and a specified content type. // - // Corresponds with POST /v1/deployments (the `CreateDeployment` operationId). - CreateDeploymentWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + // Corresponds with POST /v1/apps (the `CreateApp` operationId). + CreateAppWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - // CreateDeployment Create a deployment + // CreateApp Create an app // - // Creates a deployment together with its worker configuration, environment variables and endpoints, and records version `1` — the immutable description of what to deploy. The deployment starts in `initializing`, and what happens next depends on the deployment source type: + // Creates an app together with its worker configuration, environment variables and endpoints, and records version `1` — the immutable description of what to deploy. The app starts in `initializing`, and what happens next depends on the app source type: // // - `code` source: the codebase is submitted to the build pipeline; once the image is built - // and workers become healthy the deployment transitions to `active` and `activeVersionId` - // points at that version. If the build, validation, or rollout fails the deployment is + // and workers become healthy the app transitions to `active` and `activeVersionId` + // points at that version. If the build, validation, or rollout fails the app is // marked `failed`. // // - `container` source: no build step, so the version carries no `buildId`. No worker runs - // from a container source yet, so the deployment stays `initializing` and does not serve + // from a container source yet, so the app stays `initializing` and does not serve // inference — poll `active` only for a `code` source. // // @@ -1389,35 +1388,35 @@ type ClientInterface interface { // // Takes a body of the `application/json` content type. // - // Corresponds with POST /v1/deployments (the `CreateDeployment` operationId). - CreateDeployment(ctx context.Context, body CreateDeploymentJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // Corresponds with POST /v1/apps (the `CreateApp` operationId). + CreateApp(ctx context.Context, body CreateAppJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // DeleteDeployment Delete a deployment + // DeleteApp Delete an app // - // Soft delete. Sets `status = deleting` and returns `202` once that intent is persisted. Router removal, cancelling in-progress builds, and worker drain (`draining → stopping → stopped`) are performed asynchronously by the deployer/Scaler; `status` becomes `deleted` once all workers stop. All rows are retained for billing finalisation, audit, and usage history. Idempotent if the deployment is already `deleting`. + // Soft delete. Sets `status = deleting` and returns `202` once that intent is persisted. Router removal, cancelling in-progress builds, and worker drain (`draining → stopping → stopped`) are performed asynchronously by the deployer/Scaler; `status` becomes `deleted` once all workers stop. All rows are retained for billing finalisation, audit, and usage history. Idempotent if the app is already `deleting`. // - // Corresponds with DELETE /v1/deployments/{deploymentId} (the `DeleteDeployment` operationId). - DeleteDeployment(ctx context.Context, deploymentId DeploymentId, reqEditors ...RequestEditorFn) (*http.Response, error) + // Corresponds with DELETE /v1/apps/{appId} (the `DeleteApp` operationId). + DeleteApp(ctx context.Context, appId AppId, reqEditors ...RequestEditorFn) (*http.Response, error) - // GetDeployment Get a deployment + // GetApp Get an app // - // Corresponds with GET /v1/deployments/{deploymentId} (the `GetDeployment` operationId). - GetDeployment(ctx context.Context, deploymentId DeploymentId, reqEditors ...RequestEditorFn) (*http.Response, error) + // Corresponds with GET /v1/apps/{appId} (the `GetApp` operationId). + GetApp(ctx context.Context, appId AppId, reqEditors ...RequestEditorFn) (*http.Response, error) - // UpdateDeploymentWithBody Update a deployment + // UpdateAppWithBody Update an app // - // Patches one or more aspects of a deployment in place. All fields are optional; omitted fields are left unchanged. Valid in any non-`deleted` status, including `stopped` (changes apply on `resume`). Lifecycle transitions use the dedicated `deploy`, `stop`, `resume`, and `delete` operations. + // Patches one or more aspects of an app in place. All fields are optional; omitted fields are left unchanged. Valid in any non-`deleted` status, including `stopped` (changes apply on `resume`). Lifecycle transitions use the dedicated `deploy`, `stop`, `resume`, and `delete` operations. // - // **Currently persisted:** `deploymentName` and `configuration` only. Supplying `deploymentSource`, `secrets`, `environmentVariables`, or `endpoints` returns `422` (bulk env-var replace is not wired — use the dedicated `/environment-variables` endpoints for individual keys). + // **Currently persisted:** `appName` and `configuration` only. Supplying `appSource`, `secrets`, `environmentVariables`, or `endpoints` returns `422` (bulk env-var replace is not wired — use the dedicated `/environment-variables` endpoints for individual keys). // // Target behaviour (once fully wired): // - `configuration`: applied on the next Scaler cycle; triggers a rollout so workers - // restart with the new configuration. If the rollout fails, the deployment remains on + // restart with the new configuration. If the rollout fails, the app remains on // the previous configuration. // - // - `deploymentSource`: triggers a build (for `code` sources) or image validation (for `container` + // - `appSource`: triggers a build (for `code` sources) or image validation (for `container` // sources); on success the new version is deployed automatically. If the build or - // validation fails, the deployment remains on the previous version. + // validation fails, the app remains on the previous version. // // - `secrets` / `environmentVariables` / `endpoints`: the supplied array **replaces** the // current set — any item absent from the request is deleted. Endpoints take effect @@ -1426,23 +1425,23 @@ type ClientInterface interface { // // Takes any type of body and a specified content type. // - // Corresponds with PATCH /v1/deployments/{deploymentId} (the `UpdateDeployment` operationId). - UpdateDeploymentWithBody(ctx context.Context, deploymentId DeploymentId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + // Corresponds with PATCH /v1/apps/{appId} (the `UpdateApp` operationId). + UpdateAppWithBody(ctx context.Context, appId AppId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - // UpdateDeployment Update a deployment + // UpdateApp Update an app // - // Patches one or more aspects of a deployment in place. All fields are optional; omitted fields are left unchanged. Valid in any non-`deleted` status, including `stopped` (changes apply on `resume`). Lifecycle transitions use the dedicated `deploy`, `stop`, `resume`, and `delete` operations. + // Patches one or more aspects of an app in place. All fields are optional; omitted fields are left unchanged. Valid in any non-`deleted` status, including `stopped` (changes apply on `resume`). Lifecycle transitions use the dedicated `deploy`, `stop`, `resume`, and `delete` operations. // - // **Currently persisted:** `deploymentName` and `configuration` only. Supplying `deploymentSource`, `secrets`, `environmentVariables`, or `endpoints` returns `422` (bulk env-var replace is not wired — use the dedicated `/environment-variables` endpoints for individual keys). + // **Currently persisted:** `appName` and `configuration` only. Supplying `appSource`, `secrets`, `environmentVariables`, or `endpoints` returns `422` (bulk env-var replace is not wired — use the dedicated `/environment-variables` endpoints for individual keys). // // Target behaviour (once fully wired): // - `configuration`: applied on the next Scaler cycle; triggers a rollout so workers - // restart with the new configuration. If the rollout fails, the deployment remains on + // restart with the new configuration. If the rollout fails, the app remains on // the previous configuration. // - // - `deploymentSource`: triggers a build (for `code` sources) or image validation (for `container` + // - `appSource`: triggers a build (for `code` sources) or image validation (for `container` // sources); on success the new version is deployed automatically. If the build or - // validation fails, the deployment remains on the previous version. + // validation fails, the app remains on the previous version. // // - `secrets` / `environmentVariables` / `endpoints`: the supplied array **replaces** the // current set — any item absent from the request is deleted. Endpoints take effect @@ -1451,244 +1450,244 @@ type ClientInterface interface { // // Takes a body of the `application/json` content type. // - // Corresponds with PATCH /v1/deployments/{deploymentId} (the `UpdateDeployment` operationId). - UpdateDeployment(ctx context.Context, deploymentId DeploymentId, body UpdateDeploymentJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // Corresponds with PATCH /v1/apps/{appId} (the `UpdateApp` operationId). + UpdateApp(ctx context.Context, appId AppId, body UpdateAppJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // ListBuilds List builds // - // Corresponds with GET /v1/deployments/{deploymentId}/builds (the `ListBuilds` operationId). - ListBuilds(ctx context.Context, deploymentId DeploymentId, params *ListBuildsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + // Corresponds with GET /v1/apps/{appId}/builds (the `ListBuilds` operationId). + ListBuilds(ctx context.Context, appId AppId, params *ListBuildsParams, reqEditors ...RequestEditorFn) (*http.Response, error) // GetBuild Get a build // - // Corresponds with GET /v1/deployments/{deploymentId}/builds/{buildId} (the `GetBuild` operationId). - GetBuild(ctx context.Context, deploymentId DeploymentId, buildId openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error) + // Corresponds with GET /v1/apps/{appId}/builds/{buildId} (the `GetBuild` operationId). + GetBuild(ctx context.Context, appId AppId, buildId openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error) // DeployVersionWithBody Deploy a version // // Activates a `ready` version by number, setting `activeVersionId` and returning `202` once that intent is persisted. Worker rollout, routing switch, and cancelling in-progress builds (`failed` with `error: "superseded"`) are performed asynchronously by the deployer/Scaler. Permitted in any addressable status, including `initializing` and `failed`. // To roll back, supply an older `versionNumber` — the operation is identical to a forward deploy. No new version is created and no rebuild happens: the version's existing image is re-applied. Re-deploying the currently active version is permitted and re-applies it. - // A deploy to a `stopped` or `stopping` deployment records the version and rolls no workload, because no workers are running: the `202` does not imply a rollout there. The recorded version is the one applied when the deployment resumes. - // If the roll of a live deployment fails, `activeVersionId` is restored to the version that kept serving, so the field keeps naming the running image. - // **Rollout** (deployer/Scaler): the platform starts workers on the target version, waits for at least one to become healthy, switches task routing to the new version, then drains old-version workers gracefully. Old workers are given a fixed, platform-managed grace period to finish in-flight tasks before being force-terminated. If new workers fail to become healthy, old workers are not drained and the deployment continues on the previous version. - // Errors: - Deploy to a `deleting` deployment returns `409 Conflict` - `versionNumber` not found or not `ready` returns `409 Conflict` - A `container`-source version returns `409 Conflict` until container deployments are supported - Deploy to a non-existent or `deleted` deployment returns `404 Not Found` + // A deploy to a `stopped` or `stopping` app records the version and rolls no workload, because no workers are running: the `202` does not imply a rollout there. The recorded version is the one applied when the app resumes. + // If the roll of a live app fails, `activeVersionId` is restored to the version that kept serving, so the field keeps naming the running image. + // **Rollout** (deployer/Scaler): the platform starts workers on the target version, waits for at least one to become healthy, switches task routing to the new version, then drains old-version workers gracefully. Old workers are given a fixed, platform-managed grace period to finish in-flight tasks before being force-terminated. If new workers fail to become healthy, old workers are not drained and the app continues on the previous version. + // Errors: - Deploy to a `deleting` app returns `409 Conflict` - `versionNumber` not found or not `ready` returns `409 Conflict` - A `container`-source version returns `409 Conflict` until container apps are supported - Deploy to a non-existent or `deleted` app returns `404 Not Found` // // Takes any type of body and a specified content type. // - // Corresponds with POST /v1/deployments/{deploymentId}/deploy (the `DeployVersion` operationId). - DeployVersionWithBody(ctx context.Context, deploymentId DeploymentId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + // Corresponds with POST /v1/apps/{appId}/deploy (the `DeployVersion` operationId). + DeployVersionWithBody(ctx context.Context, appId AppId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) // DeployVersion Deploy a version // // Activates a `ready` version by number, setting `activeVersionId` and returning `202` once that intent is persisted. Worker rollout, routing switch, and cancelling in-progress builds (`failed` with `error: "superseded"`) are performed asynchronously by the deployer/Scaler. Permitted in any addressable status, including `initializing` and `failed`. // To roll back, supply an older `versionNumber` — the operation is identical to a forward deploy. No new version is created and no rebuild happens: the version's existing image is re-applied. Re-deploying the currently active version is permitted and re-applies it. - // A deploy to a `stopped` or `stopping` deployment records the version and rolls no workload, because no workers are running: the `202` does not imply a rollout there. The recorded version is the one applied when the deployment resumes. - // If the roll of a live deployment fails, `activeVersionId` is restored to the version that kept serving, so the field keeps naming the running image. - // **Rollout** (deployer/Scaler): the platform starts workers on the target version, waits for at least one to become healthy, switches task routing to the new version, then drains old-version workers gracefully. Old workers are given a fixed, platform-managed grace period to finish in-flight tasks before being force-terminated. If new workers fail to become healthy, old workers are not drained and the deployment continues on the previous version. - // Errors: - Deploy to a `deleting` deployment returns `409 Conflict` - `versionNumber` not found or not `ready` returns `409 Conflict` - A `container`-source version returns `409 Conflict` until container deployments are supported - Deploy to a non-existent or `deleted` deployment returns `404 Not Found` + // A deploy to a `stopped` or `stopping` app records the version and rolls no workload, because no workers are running: the `202` does not imply a rollout there. The recorded version is the one applied when the app resumes. + // If the roll of a live app fails, `activeVersionId` is restored to the version that kept serving, so the field keeps naming the running image. + // **Rollout** (deployer/Scaler): the platform starts workers on the target version, waits for at least one to become healthy, switches task routing to the new version, then drains old-version workers gracefully. Old workers are given a fixed, platform-managed grace period to finish in-flight tasks before being force-terminated. If new workers fail to become healthy, old workers are not drained and the app continues on the previous version. + // Errors: - Deploy to a `deleting` app returns `409 Conflict` - `versionNumber` not found or not `ready` returns `409 Conflict` - A `container`-source version returns `409 Conflict` until container apps are supported - Deploy to a non-existent or `deleted` app returns `404 Not Found` // // Takes a body of the `application/json` content type. // - // Corresponds with POST /v1/deployments/{deploymentId}/deploy (the `DeployVersion` operationId). - DeployVersion(ctx context.Context, deploymentId DeploymentId, body DeployVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // Corresponds with POST /v1/apps/{appId}/deploy (the `DeployVersion` operationId). + DeployVersion(ctx context.Context, appId AppId, body DeployVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // ListEndpoints List endpoints // - // Corresponds with GET /v1/deployments/{deploymentId}/endpoints (the `ListEndpoints` operationId). - ListEndpoints(ctx context.Context, deploymentId DeploymentId, params *ListEndpointsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + // Corresponds with GET /v1/apps/{appId}/endpoints (the `ListEndpoints` operationId). + ListEndpoints(ctx context.Context, appId AppId, params *ListEndpointsParams, reqEditors ...RequestEditorFn) (*http.Response, error) // GetEndpoint Get an endpoint // - // Corresponds with GET /v1/deployments/{deploymentId}/endpoints/{endpointId} (the `GetEndpoint` operationId). - GetEndpoint(ctx context.Context, deploymentId DeploymentId, endpointId openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error) + // Corresponds with GET /v1/apps/{appId}/endpoints/{endpointId} (the `GetEndpoint` operationId). + GetEndpoint(ctx context.Context, appId AppId, endpointId openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error) - // ListDeploymentEnvironmentVariables List deployment environment variables + // ListAppEnvironmentVariables List app environment variables // - // Corresponds with GET /v1/deployments/{deploymentId}/environment-variables (the `ListDeploymentEnvironmentVariables` operationId). - ListDeploymentEnvironmentVariables(ctx context.Context, deploymentId DeploymentId, params *ListDeploymentEnvironmentVariablesParams, reqEditors ...RequestEditorFn) (*http.Response, error) + // Corresponds with GET /v1/apps/{appId}/environment-variables (the `ListAppEnvironmentVariables` operationId). + ListAppEnvironmentVariables(ctx context.Context, appId AppId, params *ListAppEnvironmentVariablesParams, reqEditors ...RequestEditorFn) (*http.Response, error) - // DeleteDeploymentEnvironmentVariable Delete a deployment environment variable + // DeleteAppEnvironmentVariable Delete an app environment variable // - // Corresponds with DELETE /v1/deployments/{deploymentId}/environment-variables/{variableName} (the `DeleteDeploymentEnvironmentVariable` operationId). - DeleteDeploymentEnvironmentVariable(ctx context.Context, deploymentId DeploymentId, variableName EnvironmentVariableName, reqEditors ...RequestEditorFn) (*http.Response, error) + // Corresponds with DELETE /v1/apps/{appId}/environment-variables/{variableName} (the `DeleteAppEnvironmentVariable` operationId). + DeleteAppEnvironmentVariable(ctx context.Context, appId AppId, variableName EnvironmentVariableName, reqEditors ...RequestEditorFn) (*http.Response, error) - // UpdateDeploymentEnvironmentVariableWithBody Update a deployment environment variable + // UpdateAppEnvironmentVariableWithBody Update an app environment variable // // Sets one environment variable, creating it if absent. Names the platform sets on the serving container itself are rejected with `422`, as they are on create. // - // A deployment holds at most 100 environment bindings in total — plain variables plus attached secrets — the same combined ceiling `DeploymentCreate.environmentVariables` declares (create rejects secrets in-request; attach grows the set later). Overwriting an existing variable is always allowed; adding one past the ceiling returns `422`. + // An app holds at most 100 environment bindings in total — plain variables plus attached secrets — the same combined ceiling `AppCreate.environmentVariables` declares (create rejects secrets in-request; attach grows the set later). Overwriting an existing variable is always allowed; adding one past the ceiling returns `422`. // - // The name must not collide with a secret already attached to this deployment (the secret's injected env var name). Secrets and plain env vars share the pod environment; a duplicate would be resolved last-wins by kubelet with no error, so the server rejects it with `422`. The reverse check applies on attach. + // The name must not collide with a secret already attached to this app (the secret's injected env var name). Secrets and plain env vars share the pod environment; a duplicate would be resolved last-wins by kubelet with no error, so the server rejects it with `422`. The reverse check applies on attach. // // Takes any type of body and a specified content type. // - // Corresponds with PUT /v1/deployments/{deploymentId}/environment-variables/{variableName} (the `UpdateDeploymentEnvironmentVariable` operationId). - UpdateDeploymentEnvironmentVariableWithBody(ctx context.Context, deploymentId DeploymentId, variableName EnvironmentVariableName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + // Corresponds with PUT /v1/apps/{appId}/environment-variables/{variableName} (the `UpdateAppEnvironmentVariable` operationId). + UpdateAppEnvironmentVariableWithBody(ctx context.Context, appId AppId, variableName EnvironmentVariableName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - // UpdateDeploymentEnvironmentVariable Update a deployment environment variable + // UpdateAppEnvironmentVariable Update an app environment variable // // Sets one environment variable, creating it if absent. Names the platform sets on the serving container itself are rejected with `422`, as they are on create. // - // A deployment holds at most 100 environment bindings in total — plain variables plus attached secrets — the same combined ceiling `DeploymentCreate.environmentVariables` declares (create rejects secrets in-request; attach grows the set later). Overwriting an existing variable is always allowed; adding one past the ceiling returns `422`. + // An app holds at most 100 environment bindings in total — plain variables plus attached secrets — the same combined ceiling `AppCreate.environmentVariables` declares (create rejects secrets in-request; attach grows the set later). Overwriting an existing variable is always allowed; adding one past the ceiling returns `422`. // - // The name must not collide with a secret already attached to this deployment (the secret's injected env var name). Secrets and plain env vars share the pod environment; a duplicate would be resolved last-wins by kubelet with no error, so the server rejects it with `422`. The reverse check applies on attach. + // The name must not collide with a secret already attached to this app (the secret's injected env var name). Secrets and plain env vars share the pod environment; a duplicate would be resolved last-wins by kubelet with no error, so the server rejects it with `422`. The reverse check applies on attach. // // Takes a body of the `application/json` content type. // - // Corresponds with PUT /v1/deployments/{deploymentId}/environment-variables/{variableName} (the `UpdateDeploymentEnvironmentVariable` operationId). - UpdateDeploymentEnvironmentVariable(ctx context.Context, deploymentId DeploymentId, variableName EnvironmentVariableName, body UpdateDeploymentEnvironmentVariableJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // Corresponds with PUT /v1/apps/{appId}/environment-variables/{variableName} (the `UpdateAppEnvironmentVariable` operationId). + UpdateAppEnvironmentVariable(ctx context.Context, appId AppId, variableName EnvironmentVariableName, body UpdateAppEnvironmentVariableJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // ListDeploymentEvents List deployment events + // ListAppEvents List app events // - // Corresponds with GET /v1/deployments/{deploymentId}/events (the `ListDeploymentEvents` operationId). - ListDeploymentEvents(ctx context.Context, deploymentId DeploymentId, params *ListDeploymentEventsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + // Corresponds with GET /v1/apps/{appId}/events (the `ListAppEvents` operationId). + ListAppEvents(ctx context.Context, appId AppId, params *ListAppEventsParams, reqEditors ...RequestEditorFn) (*http.Response, error) - // UnfavouriteDeployment Unfavourite a deployment + // UnfavouriteApp Unfavourite an app // - // Removes the organisation favourite pin from the deployment. Idempotent: unfavouriting a deployment that is not favourited succeeds and returns the deployment with `isFavourite: false`. Valid in any status including `deleting` and `deleted` — unpinning is not a deployment lifecycle mutation. Missing deployments return `404`. + // Removes the organisation favourite pin from the app. Idempotent: unfavouriting an app that is not favourited succeeds and returns the app with `isFavourite: false`. Valid in any status including `deleting` and `deleted` — unpinning is not an app lifecycle mutation. Missing apps return `404`. // - // Corresponds with DELETE /v1/deployments/{deploymentId}/favourite (the `UnfavouriteDeployment` operationId). - UnfavouriteDeployment(ctx context.Context, deploymentId DeploymentId, reqEditors ...RequestEditorFn) (*http.Response, error) + // Corresponds with DELETE /v1/apps/{appId}/favourite (the `UnfavouriteApp` operationId). + UnfavouriteApp(ctx context.Context, appId AppId, reqEditors ...RequestEditorFn) (*http.Response, error) - // FavouriteDeployment Favourite a deployment + // FavouriteApp Favourite an app // - // Pins the deployment as a favourite for the authenticated organisation so the console can surface it in a Favourites section. Idempotent: favouriting an already-favourited deployment succeeds and returns the deployment with `isFavourite: true`. Deployments in `deleting` or `deleted` status cannot be favourited (`404`). Soft-delete clears any existing pin when status becomes `deleting`. + // Pins the app as a favourite for the authenticated organisation so the console can surface it in a Favourites section. Idempotent: favouriting an already-favourited app succeeds and returns the app with `isFavourite: true`. Apps in `deleting` or `deleted` status cannot be favourited (`404`). Soft-delete clears any existing pin when status becomes `deleting`. // - // Corresponds with PUT /v1/deployments/{deploymentId}/favourite (the `FavouriteDeployment` operationId). - FavouriteDeployment(ctx context.Context, deploymentId DeploymentId, reqEditors ...RequestEditorFn) (*http.Response, error) + // Corresponds with PUT /v1/apps/{appId}/favourite (the `FavouriteApp` operationId). + FavouriteApp(ctx context.Context, appId AppId, reqEditors ...RequestEditorFn) (*http.Response, error) // StartAsyncTaskWithBody Start a new async task // - // Starts a new async task on `deploymentId`, routing the request body payload to an available worker. The task runs asynchronously and the response is `202`; poll `GET /v1/deployments/{deploymentId}/tasks/{taskId}` for completion. Deployments in `initializing`, `active`, or `stopping` accept invocation. `stopped`, `deleting`, and `failed` return `409 Conflict`; unknown or deleted deployments return `404 Not Found`. + // Starts a new async task on `appId`, routing the request body payload to an available worker. The task runs asynchronously and the response is `202`; poll `GET /v1/apps/{appId}/tasks/{taskId}` for completion. Apps in `initializing`, `active`, or `stopping` accept invocation. `stopped`, `deleting`, and `failed` return `409 Conflict`; unknown or deleted apps return `404 Not Found`. // // Takes any type of body and a specified content type. // - // Corresponds with POST /v1/deployments/{deploymentId}/invoke-async/{endpointPath} (the `StartAsyncTask` operationId). - StartAsyncTaskWithBody(ctx context.Context, deploymentId DeploymentId, endpointPath EndpointPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + // Corresponds with POST /v1/apps/{appId}/invoke-async/{endpointPath} (the `StartAsyncTask` operationId). + StartAsyncTaskWithBody(ctx context.Context, appId AppId, endpointPath EndpointPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) // StartAsyncTask Start a new async task // - // Starts a new async task on `deploymentId`, routing the request body payload to an available worker. The task runs asynchronously and the response is `202`; poll `GET /v1/deployments/{deploymentId}/tasks/{taskId}` for completion. Deployments in `initializing`, `active`, or `stopping` accept invocation. `stopped`, `deleting`, and `failed` return `409 Conflict`; unknown or deleted deployments return `404 Not Found`. + // Starts a new async task on `appId`, routing the request body payload to an available worker. The task runs asynchronously and the response is `202`; poll `GET /v1/apps/{appId}/tasks/{taskId}` for completion. Apps in `initializing`, `active`, or `stopping` accept invocation. `stopped`, `deleting`, and `failed` return `409 Conflict`; unknown or deleted apps return `404 Not Found`. // // Takes a body of the `application/json` content type. // - // Corresponds with POST /v1/deployments/{deploymentId}/invoke-async/{endpointPath} (the `StartAsyncTask` operationId). - StartAsyncTask(ctx context.Context, deploymentId DeploymentId, endpointPath EndpointPath, body StartAsyncTaskJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // Corresponds with POST /v1/apps/{appId}/invoke-async/{endpointPath} (the `StartAsyncTask` operationId). + StartAsyncTask(ctx context.Context, appId AppId, endpointPath EndpointPath, body StartAsyncTaskJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) // StartSyncTaskWithBody Start a new sync task // - // Starts a new sync task on `deploymentId`, routing the request body payload to an available worker. The request blocks until the task is terminal and returns the result inline (`200`), or `504` if it does not complete within the wait window. When the accepted task ID is available, the response includes `taskId` for polling. Deployments in `initializing`, `active`, or `stopping` accept invocation. `stopped`, `deleting`, and `failed` return `409 Conflict`; unknown or deleted deployments return `404 Not Found`. + // Starts a new sync task on `appId`, routing the request body payload to an available worker. The request blocks until the task is terminal and returns the result inline (`200`), or `504` if it does not complete within the wait window. When the accepted task ID is available, the response includes `taskId` for polling. Apps in `initializing`, `active`, or `stopping` accept invocation. `stopped`, `deleting`, and `failed` return `409 Conflict`; unknown or deleted apps return `404 Not Found`. // // Takes any type of body and a specified content type. // - // Corresponds with POST /v1/deployments/{deploymentId}/invoke-sync/{endpointPath} (the `StartSyncTask` operationId). - StartSyncTaskWithBody(ctx context.Context, deploymentId DeploymentId, endpointPath EndpointPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + // Corresponds with POST /v1/apps/{appId}/invoke-sync/{endpointPath} (the `StartSyncTask` operationId). + StartSyncTaskWithBody(ctx context.Context, appId AppId, endpointPath EndpointPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) // StartSyncTask Start a new sync task // - // Starts a new sync task on `deploymentId`, routing the request body payload to an available worker. The request blocks until the task is terminal and returns the result inline (`200`), or `504` if it does not complete within the wait window. When the accepted task ID is available, the response includes `taskId` for polling. Deployments in `initializing`, `active`, or `stopping` accept invocation. `stopped`, `deleting`, and `failed` return `409 Conflict`; unknown or deleted deployments return `404 Not Found`. + // Starts a new sync task on `appId`, routing the request body payload to an available worker. The request blocks until the task is terminal and returns the result inline (`200`), or `504` if it does not complete within the wait window. When the accepted task ID is available, the response includes `taskId` for polling. Apps in `initializing`, `active`, or `stopping` accept invocation. `stopped`, `deleting`, and `failed` return `409 Conflict`; unknown or deleted apps return `404 Not Found`. // // Takes a body of the `application/json` content type. // - // Corresponds with POST /v1/deployments/{deploymentId}/invoke-sync/{endpointPath} (the `StartSyncTask` operationId). - StartSyncTask(ctx context.Context, deploymentId DeploymentId, endpointPath EndpointPath, body StartSyncTaskJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // Corresponds with POST /v1/apps/{appId}/invoke-sync/{endpointPath} (the `StartSyncTask` operationId). + StartSyncTask(ctx context.Context, appId AppId, endpointPath EndpointPath, body StartSyncTaskJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // ResumeDeployment Resume a deployment + // ResumeApp Resume an app // - // Moves the deployment to `initializing` and returns `202` once that intent is persisted. The Scaler then starts workers and sets the deployment to `active`; tasks that remained queued when the deployment stopped are consumed as workers come online. Precondition: `status = stopped`. + // Moves the app to `initializing` and returns `202` once that intent is persisted. The Scaler then starts workers and sets the app to `active`; tasks that remained queued when the app stopped are consumed as workers come online. Precondition: `status = stopped`. // - // Corresponds with POST /v1/deployments/{deploymentId}/resume (the `ResumeDeployment` operationId). - ResumeDeployment(ctx context.Context, deploymentId DeploymentId, reqEditors ...RequestEditorFn) (*http.Response, error) + // Corresponds with POST /v1/apps/{appId}/resume (the `ResumeApp` operationId). + ResumeApp(ctx context.Context, appId AppId, reqEditors ...RequestEditorFn) (*http.Response, error) - // ListDeploymentSecrets List secrets attached to a deployment + // ListAppSecrets List secrets attached to an app // - // Corresponds with GET /v1/deployments/{deploymentId}/secrets (the `ListDeploymentSecrets` operationId). - ListDeploymentSecrets(ctx context.Context, deploymentId DeploymentId, params *ListDeploymentSecretsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + // Corresponds with GET /v1/apps/{appId}/secrets (the `ListAppSecrets` operationId). + ListAppSecrets(ctx context.Context, appId AppId, params *ListAppSecretsParams, reqEditors ...RequestEditorFn) (*http.Response, error) - // AttachDeploymentSecretWithBody Attach a secret to a deployment + // AttachAppSecretWithBody Attach a secret to an app // - // Records that an organisation secret is attached to a deployment under a resolved env-var name. This is a control-plane association only in this release — it does not roll workers or inject values into pods yet (ADR-019 in-pod unseal is separate). Returns `409` if the secret is already attached, or if another attach would use the same env-var name. - // The resolved name (`envVarName`, or `secretName` when omitted) must not already exist as a plain environment variable on this deployment (`deployment_configs.key`). Both sources are reserved for the same future pod env namespace, so the server rejects the collision with `422` instead of allowing a last-wins override later. The reverse check applies when setting a plain environment variable. - // A deployment holds at most 100 environment bindings in total — plain environment variables plus attached secrets — the same combined ceiling as create and the single-key env-var route. Attaching when the deployment is already at that limit returns `422`. + // Records that an organisation secret is attached to an app under a resolved env-var name. This is a control-plane association only in this release — it does not roll workers or inject values into pods yet (ADR-019 in-pod unseal is separate). Returns `409` if the secret is already attached, or if another attach would use the same env-var name. + // The resolved name (`envVarName`, or `secretName` when omitted) must not already exist as a plain environment variable on this app (`deployment_configs.key`). Both sources are reserved for the same future pod env namespace, so the server rejects the collision with `422` instead of allowing a last-wins override later. The reverse check applies when setting a plain environment variable. + // An app holds at most 100 environment bindings in total — plain environment variables plus attached secrets — the same combined ceiling as create and the single-key env-var route. Attaching when the app is already at that limit returns `422`. // // Takes any type of body and a specified content type. // - // Corresponds with POST /v1/deployments/{deploymentId}/secrets (the `AttachDeploymentSecret` operationId). - AttachDeploymentSecretWithBody(ctx context.Context, deploymentId DeploymentId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) + // Corresponds with POST /v1/apps/{appId}/secrets (the `AttachAppSecret` operationId). + AttachAppSecretWithBody(ctx context.Context, appId AppId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) - // AttachDeploymentSecret Attach a secret to a deployment + // AttachAppSecret Attach a secret to an app // - // Records that an organisation secret is attached to a deployment under a resolved env-var name. This is a control-plane association only in this release — it does not roll workers or inject values into pods yet (ADR-019 in-pod unseal is separate). Returns `409` if the secret is already attached, or if another attach would use the same env-var name. - // The resolved name (`envVarName`, or `secretName` when omitted) must not already exist as a plain environment variable on this deployment (`deployment_configs.key`). Both sources are reserved for the same future pod env namespace, so the server rejects the collision with `422` instead of allowing a last-wins override later. The reverse check applies when setting a plain environment variable. - // A deployment holds at most 100 environment bindings in total — plain environment variables plus attached secrets — the same combined ceiling as create and the single-key env-var route. Attaching when the deployment is already at that limit returns `422`. + // Records that an organisation secret is attached to an app under a resolved env-var name. This is a control-plane association only in this release — it does not roll workers or inject values into pods yet (ADR-019 in-pod unseal is separate). Returns `409` if the secret is already attached, or if another attach would use the same env-var name. + // The resolved name (`envVarName`, or `secretName` when omitted) must not already exist as a plain environment variable on this app (`deployment_configs.key`). Both sources are reserved for the same future pod env namespace, so the server rejects the collision with `422` instead of allowing a last-wins override later. The reverse check applies when setting a plain environment variable. + // An app holds at most 100 environment bindings in total — plain environment variables plus attached secrets — the same combined ceiling as create and the single-key env-var route. Attaching when the app is already at that limit returns `422`. // // Takes a body of the `application/json` content type. // - // Corresponds with POST /v1/deployments/{deploymentId}/secrets (the `AttachDeploymentSecret` operationId). - AttachDeploymentSecret(ctx context.Context, deploymentId DeploymentId, body AttachDeploymentSecretJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) + // Corresponds with POST /v1/apps/{appId}/secrets (the `AttachAppSecret` operationId). + AttachAppSecret(ctx context.Context, appId AppId, body AttachAppSecretJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // DetachDeploymentSecret Detach a secret from a deployment + // DetachAppSecret Detach a secret from an app // // Removes the control-plane attachment. Does not roll workers in this release. // - // Corresponds with DELETE /v1/deployments/{deploymentId}/secrets/{secretName} (the `DetachDeploymentSecret` operationId). - DetachDeploymentSecret(ctx context.Context, deploymentId DeploymentId, secretName SecretName, reqEditors ...RequestEditorFn) (*http.Response, error) + // Corresponds with DELETE /v1/apps/{appId}/secrets/{secretName} (the `DetachAppSecret` operationId). + DetachAppSecret(ctx context.Context, appId AppId, secretName SecretName, reqEditors ...RequestEditorFn) (*http.Response, error) - // StopDeployment Stop a deployment + // StopApp Stop an app // - // Moves the deployment to `stopping` and returns `202` once that intent is persisted. Scale-to-zero and worker drain are performed asynchronously by the Scaler; `status` becomes `stopped` once all workers drain. In-flight tasks have a fixed, platform-managed grace period to complete; workers that exceed it are force-terminated and their tasks return to the queue per delivery guarantees. New task submissions remain accepted while `stopping`; after the deployment reaches `stopped`, submissions return `409 Conflict`. Precondition: `status = active`. + // Moves the app to `stopping` and returns `202` once that intent is persisted. Scale-to-zero and worker drain are performed asynchronously by the Scaler; `status` becomes `stopped` once all workers drain. In-flight tasks have a fixed, platform-managed grace period to complete; workers that exceed it are force-terminated and their tasks return to the queue per delivery guarantees. New task submissions remain accepted while `stopping`; after the app reaches `stopped`, submissions return `409 Conflict`. Precondition: `status = active`. // - // Corresponds with POST /v1/deployments/{deploymentId}/stop (the `StopDeployment` operationId). - StopDeployment(ctx context.Context, deploymentId DeploymentId, reqEditors ...RequestEditorFn) (*http.Response, error) + // Corresponds with POST /v1/apps/{appId}/stop (the `StopApp` operationId). + StopApp(ctx context.Context, appId AppId, reqEditors ...RequestEditorFn) (*http.Response, error) - // ListTasks List tasks for a deployment + // ListTasks List tasks for an app // - // Lists TTL-bounded asynchronous task metadata for this deployment so a client can recover task ids after an interrupted long-poll or CLI session. Pending includes queued, running and retrying work. Tasks appear only within the configured recovery window. A page can be empty and still have `nextCursor`; continue until it is null. Pending entries are best effort and may disappear if the recovery store restarts; tracked tasks reappear on completion. This is not persisted task history. Each submission has a new task id, so client retries can appear as separate tasks. If the deployment is `stopped`, `deleting`, or `failed`, recovery stays available. Unknown or deleted deployments return `404 Not Found`. + // Lists TTL-bounded asynchronous task metadata for this app so a client can recover task ids after an interrupted long-poll or CLI session. Pending includes queued, running and retrying work. Tasks appear only within the configured recovery window. A page can be empty and still have `nextCursor`; continue until it is null. Pending entries are best effort and may disappear if the recovery store restarts; tracked tasks reappear on completion. This is not persisted task history. Each submission has a new task id, so client retries can appear as separate tasks. If the app is `stopped`, `deleting`, or `failed`, recovery stays available. Unknown or deleted apps return `404 Not Found`. // - // Corresponds with GET /v1/deployments/{deploymentId}/tasks (the `ListTasks` operationId). - ListTasks(ctx context.Context, deploymentId DeploymentId, params *ListTasksParams, reqEditors ...RequestEditorFn) (*http.Response, error) + // Corresponds with GET /v1/apps/{appId}/tasks (the `ListTasks` operationId). + ListTasks(ctx context.Context, appId AppId, params *ListTasksParams, reqEditors ...RequestEditorFn) (*http.Response, error) // GetTask Get a task // - // Returns the task's current status, read through the inference transport layer from the shared result store. When `completed`, includes the result `output` and `completedAt`; when `failed`, includes `error`; when `pending`, neither is set. If the deployment is `stopped`, `deleting`, or `failed`, accepted task results stay readable. A `404 Not Found` means the task cannot currently be verified for this deployment. Because enqueue-time ownership tracking is best effort, a recently returned task ID can temporarily return `404`; retry it within the normal polling window. Unknown or deleted deployments also return `404 Not Found`. + // Returns the task's current status, read through the inference transport layer from the shared result store. When `completed`, includes the result `output` and `completedAt`; when `failed`, includes `error`; when `pending`, neither is set. If the app is `stopped`, `deleting`, or `failed`, accepted task results stay readable. A `404 Not Found` means the task cannot currently be verified for this app. Because enqueue-time ownership tracking is best effort, a recently returned task ID can temporarily return `404`; retry it within the normal polling window. Unknown or deleted apps also return `404 Not Found`. // - // Corresponds with GET /v1/deployments/{deploymentId}/tasks/{taskId} (the `GetTask` operationId). - GetTask(ctx context.Context, deploymentId DeploymentId, taskId string, reqEditors ...RequestEditorFn) (*http.Response, error) + // Corresponds with GET /v1/apps/{appId}/tasks/{taskId} (the `GetTask` operationId). + GetTask(ctx context.Context, appId AppId, taskId string, reqEditors ...RequestEditorFn) (*http.Response, error) // ListVersions List versions // - // Corresponds with GET /v1/deployments/{deploymentId}/versions (the `ListVersions` operationId). - ListVersions(ctx context.Context, deploymentId DeploymentId, params *ListVersionsParams, reqEditors ...RequestEditorFn) (*http.Response, error) + // Corresponds with GET /v1/apps/{appId}/versions (the `ListVersions` operationId). + ListVersions(ctx context.Context, appId AppId, params *ListVersionsParams, reqEditors ...RequestEditorFn) (*http.Response, error) // GetVersion Get a version // - // Corresponds with GET /v1/deployments/{deploymentId}/versions/{versionNumber} (the `GetVersion` operationId). - GetVersion(ctx context.Context, deploymentId DeploymentId, versionNumber int32, reqEditors ...RequestEditorFn) (*http.Response, error) + // Corresponds with GET /v1/apps/{appId}/versions/{versionNumber} (the `GetVersion` operationId). + GetVersion(ctx context.Context, appId AppId, versionNumber int32, reqEditors ...RequestEditorFn) (*http.Response, error) // ListWorkers List workers // - // Returns a newest-first page of workers observed for the deployment (including terminal `stopped` rows until purged). Optional `status` narrows the page; a cursor must be replayed under the same status filter it was issued with. + // Returns a newest-first page of workers observed for the app (including terminal `stopped` rows until purged). Optional `status` narrows the page; a cursor must be replayed under the same status filter it was issued with. // - // Corresponds with GET /v1/deployments/{deploymentId}/workers (the `ListWorkers` operationId). - ListWorkers(ctx context.Context, deploymentId DeploymentId, params *ListWorkersParams, reqEditors ...RequestEditorFn) (*http.Response, error) + // Corresponds with GET /v1/apps/{appId}/workers (the `ListWorkers` operationId). + ListWorkers(ctx context.Context, appId AppId, params *ListWorkersParams, reqEditors ...RequestEditorFn) (*http.Response, error) // GetWorker Get a worker // - // Returns one worker by id within the deployment. The id is the Kubernetes pod UID recorded by the reconciler. A worker that belongs to another deployment (or tenant) is not found. + // Returns one worker by id within the app. The id is the Kubernetes pod UID recorded by the reconciler. A worker that belongs to another app (or tenant) is not found. // - // Corresponds with GET /v1/deployments/{deploymentId}/workers/{workerId} (the `GetWorker` operationId). - GetWorker(ctx context.Context, deploymentId DeploymentId, workerId WorkerId, reqEditors ...RequestEditorFn) (*http.Response, error) + // Corresponds with GET /v1/apps/{appId}/workers/{workerId} (the `GetWorker` operationId). + GetWorker(ctx context.Context, appId AppId, workerId WorkerId, reqEditors ...RequestEditorFn) (*http.Response, error) // ListGpuTypes List supported GPU types and their pricing // - // Returns the global GPU type catalogue and pricing. The request requires authentication. Customer principals receive only GPU types with capacity currently offered to customers; a type whose hardware is not yet cleared for customer workloads is omitted. The Runware principal receives the full catalogue, including types not yet offered. Each entry's `pricing` is the price currently in effect; the Runware principal can read the full price history, including scheduled future changes, from `GET /v1/gpu-types/{gpuTypeId}/prices`. + // Returns the global GPU type catalogue and pricing. The request requires authentication. Customer principals receive only GPU types with capacity currently offered to customers; a type whose hardware is not yet cleared for customer workloads is omitted. The Runware principal receives the full catalogue, including retired types and types not yet offered. Retired entries carry `deletedAt`. Each entry's `pricing` is the price currently in effect; the Runware principal can read the full price history, including scheduled future changes, from `GET /v1/gpu-types/{gpuTypeId}/prices`. // // Corresponds with GET /v1/gpu-types (the `ListGpuTypes` operationId). ListGpuTypes(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) // CreateGpuTypeWithBody Add a GPU type to the catalogue // - // Creates a new entry in the global GPU type catalogue. Restricted to the Runware platform organization. The `id` (catalogue code) is immutable after create. + // Creates a new entry in the global GPU type catalogue. Restricted to the Runware platform organization. The `id` (catalogue code) is immutable and remains reserved after retirement. // // Takes any type of body and a specified content type. // @@ -1697,30 +1696,30 @@ type ClientInterface interface { // CreateGpuType Add a GPU type to the catalogue // - // Creates a new entry in the global GPU type catalogue. Restricted to the Runware platform organization. The `id` (catalogue code) is immutable after create. + // Creates a new entry in the global GPU type catalogue. Restricted to the Runware platform organization. The `id` (catalogue code) is immutable and remains reserved after retirement. // // Takes a body of the `application/json` content type. // // Corresponds with POST /v1/gpu-types (the `CreateGpuType` operationId). CreateGpuType(ctx context.Context, body CreateGpuTypeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) - // DeleteGpuType Remove a GPU type from the catalogue + // DeleteGpuType Retire a GPU type from the catalogue // - // Deletes a GPU type from the global catalogue. Restricted to the Runware platform organization. Returns `409` if any live worker configuration still references the code. + // Soft-deletes a GPU type while preserving its code and price history. Restricted to the Runware platform organization. Returns `409` if a worker configuration or GPU pool still references the code. Retiring an already retired code returns `404`. // // Corresponds with DELETE /v1/gpu-types/{gpuTypeId} (the `DeleteGpuType` operationId). DeleteGpuType(ctx context.Context, gpuTypeId GpuTypeId, reqEditors ...RequestEditorFn) (*http.Response, error) // GetGpuType Get a GPU type from the catalogue // - // Returns a single entry from the global GPU type catalogue. The result is not organisation-specific, but the request still requires authentication. + // Returns an active entry from the global GPU type catalogue. Retired entries return `404`. The result is not organisation-specific, but the request still requires authentication. // // Corresponds with GET /v1/gpu-types/{gpuTypeId} (the `GetGpuType` operationId). GetGpuType(ctx context.Context, gpuTypeId GpuTypeId, reqEditors ...RequestEditorFn) (*http.Response, error) // UpdateGpuTypeWithBody Update a GPU type in the catalogue // - // Updates mutable fields of an existing GPU type. Restricted to the Runware platform organization. The catalogue code (`gpuTypeId`) cannot be changed. + // Updates mutable fields of an active GPU type. Restricted to the Runware platform organization. The catalogue code (`gpuTypeId`) cannot be changed; retired entries return `404`. // // Takes any type of body and a specified content type. // @@ -1729,7 +1728,7 @@ type ClientInterface interface { // UpdateGpuType Update a GPU type in the catalogue // - // Updates mutable fields of an existing GPU type. Restricted to the Runware platform organization. The catalogue code (`gpuTypeId`) cannot be changed. + // Updates mutable fields of an active GPU type. Restricted to the Runware platform organization. The catalogue code (`gpuTypeId`) cannot be changed; retired entries return `404`. // // Takes a body of the `application/json` content type. // @@ -1738,14 +1737,14 @@ type ClientInterface interface { // ListGpuTypePrices List historical and future prices of a GPU type // - // Returns a page of a GPU type's prices, ordered by effectiveFrom. Restricted to the Runware platform organization: the page includes prices that are scheduled but not yet in effect. Customers read the price currently in effect from `GET /v1/gpu-types`. + // Returns a page of a GPU type's prices, ordered by effectiveFrom. Restricted to the Runware platform organization: the page includes retired types and prices that are scheduled but not yet in effect. Customers read the price currently in effect from `GET /v1/gpu-types`. // // Corresponds with GET /v1/gpu-types/{gpuTypeId}/prices (the `ListGpuTypePrices` operationId). ListGpuTypePrices(ctx context.Context, gpuTypeId GpuTypeId, params *ListGpuTypePricesParams, reqEditors ...RequestEditorFn) (*http.Response, error) // CreateGpuTypePriceWithBody Schedule a new price for a GPU type // - // Schedules a new price to take effect at `effectiveFrom`. Restricted to the Runware platform organization. `effectiveFrom` must be more than 7 days in the future, so downstream systems and customers get advance notice of the change; a value inside that window returns `422`. Returns `409` if the GPU type already has a price scheduled at that exact instant. + // Schedules a new price to take effect at `effectiveFrom`. Restricted to the Runware platform organization. `effectiveFrom` must normally be more than 7 days in the future. Before a GPU type is admitted or used, a later price can be added inside that window to correct its initial price. This preserves the original row and records the correction as a superseding price. Retired types return `404`; other values inside the notice window return `422`. Returns `409` if the GPU type already has a price scheduled at that exact instant. // // Takes any type of body and a specified content type. // @@ -1754,7 +1753,7 @@ type ClientInterface interface { // CreateGpuTypePrice Schedule a new price for a GPU type // - // Schedules a new price to take effect at `effectiveFrom`. Restricted to the Runware platform organization. `effectiveFrom` must be more than 7 days in the future, so downstream systems and customers get advance notice of the change; a value inside that window returns `422`. Returns `409` if the GPU type already has a price scheduled at that exact instant. + // Schedules a new price to take effect at `effectiveFrom`. Restricted to the Runware platform organization. `effectiveFrom` must normally be more than 7 days in the future. Before a GPU type is admitted or used, a later price can be added inside that window to correct its initial price. This preserves the original row and records the correction as a superseding price. Retired types return `404`; other values inside the notice window return `422`. Returns `409` if the GPU type already has a price scheduled at that exact instant. // // Takes a body of the `application/json` content type. // @@ -1763,14 +1762,14 @@ type ClientInterface interface { // DeleteGpuTypePrice Remove a scheduled price for a GPU type // - // Deletes a scheduled price. Restricted to the Runware platform organization. Only a price whose effectiveFrom is still more than 7 days in the future can be deleted — once inside that window the price is locked in (about to take effect, or already has) and this returns `409`. + // Deletes a scheduled price. Restricted to the Runware platform organization. Only a price whose effectiveFrom is still more than 7 days in the future can be deleted — once inside that window the price is locked in (about to take effect, or already has) and this returns `409`. Retired GPU types return `404`. // // Corresponds with DELETE /v1/gpu-types/{gpuTypeId}/prices/{priceId} (the `DeleteGpuTypePrice` operationId). DeleteGpuTypePrice(ctx context.Context, gpuTypeId GpuTypeId, priceId openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error) // UpdateGpuTypePriceWithBody Update a scheduled price for a GPU type // - // Partially updates a scheduled price. Restricted to the Runware platform organization. Only a price whose current `effectiveFrom` is still more than 7 days in the future can be edited — once inside that window the price is locked in and this returns `409`. A supplied `effectiveFrom` must itself be more than 7 days in the future, returning `422` otherwise. Returns `409` if it collides with another price already scheduled at that exact instant. + // Partially updates a scheduled price. Restricted to the Runware platform organization. Only a price whose current `effectiveFrom` is still more than 7 days in the future can be edited — once inside that window the price is locked in and this returns `409`. A supplied `effectiveFrom` must itself be more than 7 days in the future, returning `422` otherwise. Retired GPU types return `404`. Returns `409` if the update collides with another price already scheduled at that exact instant. // // Takes any type of body and a specified content type. // @@ -1779,7 +1778,7 @@ type ClientInterface interface { // UpdateGpuTypePrice Update a scheduled price for a GPU type // - // Partially updates a scheduled price. Restricted to the Runware platform organization. Only a price whose current `effectiveFrom` is still more than 7 days in the future can be edited — once inside that window the price is locked in and this returns `409`. A supplied `effectiveFrom` must itself be more than 7 days in the future, returning `422` otherwise. Returns `409` if it collides with another price already scheduled at that exact instant. + // Partially updates a scheduled price. Restricted to the Runware platform organization. Only a price whose current `effectiveFrom` is still more than 7 days in the future can be edited — once inside that window the price is locked in and this returns `409`. A supplied `effectiveFrom` must itself be more than 7 days in the future, returning `422` otherwise. Retired GPU types return `404`. Returns `409` if the update collides with another price already scheduled at that exact instant. // // Takes a body of the `application/json` content type. // @@ -1813,7 +1812,7 @@ type ClientInterface interface { // DeleteSecret Delete a secret // - // Soft-deletes a secret: marks the row `pending_destroy` and bumps revision. This API does not hard-delete the row; a future GC path is expected to remove unattached `pending_destroy` secrets and release the name, but that sweep is not implemented yet. Returns `409` while any deployment still attaches it — cascade-detach is not performed here; detach each holder with `DELETE .../deployments/{id}/secrets/{name}` first. Attach/detach are control-plane records only in this release (they do not roll workers). While the row remains `pending_destroy` the name stays reserved, so create may return `409` even though list no longer shows the secret. Retries on an already-pending name are safe when no attachments remain (`204`); they still return `409` while attached. + // Soft-deletes a secret: marks the row `pending_destroy` and bumps revision. This API does not hard-delete the row; a future GC path is expected to remove unattached `pending_destroy` secrets and release the name, but that sweep is not implemented yet. Returns `409` while any app still attaches it — cascade-detach is not performed here; detach each holder with `DELETE .../apps/{id}/secrets/{name}` first. Attach/detach are control-plane records only in this release (they do not roll workers). While the row remains `pending_destroy` the name stays reserved, so create may return `409` even though list no longer shows the secret. Retries on an already-pending name are safe when no attachments remain (`204`); they still return `409` while attached. // // Corresponds with DELETE /v1/secrets/{secretName} (the `DeleteSecret` operationId). DeleteSecret(ctx context.Context, secretName SecretName, reqEditors ...RequestEditorFn) (*http.Response, error) @@ -1840,13 +1839,13 @@ type ClientInterface interface { ListUsageEvents(ctx context.Context, params *ListUsageEventsParams, reqEditors ...RequestEditorFn) (*http.Response, error) } -// GetDeploymentSummary Deployment summary metrics for the authenticated organisation +// GetAppSummary App summary metrics for the authenticated organisation // -// Aggregate dashboard metrics across all deployments owned by the authenticated organisation. Metrics whose backing system is not yet available are omitted from the response rather than reported as zero. +// Aggregate dashboard metrics across all apps owned by the authenticated organisation. Metrics whose backing system is not yet available are omitted from the response rather than reported as zero. // -// Corresponds with GET /v1/deployment-summary (the `GetDeploymentSummary` operationId). -func (c *Client) GetDeploymentSummary(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetDeploymentSummaryRequest(c.Server) +// Corresponds with GET /v1/app-summary (the `GetAppSummary` operationId). +func (c *Client) GetAppSummary(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetAppSummaryRequest(c.Server) if err != nil { return nil, err } @@ -1857,15 +1856,15 @@ func (c *Client) GetDeploymentSummary(ctx context.Context, reqEditors ...Request return c.Client.Do(req) } -// ListDeployments List deployments +// ListApps List apps // -// Returns a page of the organisation's deployments. Filters combine with AND; soft-deleted deployments are excluded unless `status=deleted` is requested explicitly. +// Returns a page of the organisation's apps. Filters combine with AND; soft-deleted apps are excluded unless `status=deleted` is requested explicitly. // // A `cursor` is only valid for the `sort` and filters it was issued under — reusing one across a different ordering or filter set returns `400`. // -// Corresponds with GET /v1/deployments (the `ListDeployments` operationId). -func (c *Client) ListDeployments(ctx context.Context, params *ListDeploymentsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewListDeploymentsRequest(c.Server, params) +// Corresponds with GET /v1/apps (the `ListApps` operationId). +func (c *Client) ListApps(ctx context.Context, params *ListAppsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListAppsRequest(c.Server, params) if err != nil { return nil, err } @@ -1876,17 +1875,17 @@ func (c *Client) ListDeployments(ctx context.Context, params *ListDeploymentsPar return c.Client.Do(req) } -// CreateDeploymentWithBody Create a deployment +// CreateAppWithBody Create an app // -// Creates a deployment together with its worker configuration, environment variables and endpoints, and records version `1` — the immutable description of what to deploy. The deployment starts in `initializing`, and what happens next depends on the deployment source type: +// Creates an app together with its worker configuration, environment variables and endpoints, and records version `1` — the immutable description of what to deploy. The app starts in `initializing`, and what happens next depends on the app source type: // // - `code` source: the codebase is submitted to the build pipeline; once the image is built -// and workers become healthy the deployment transitions to `active` and `activeVersionId` -// points at that version. If the build, validation, or rollout fails the deployment is +// and workers become healthy the app transitions to `active` and `activeVersionId` +// points at that version. If the build, validation, or rollout fails the app is // marked `failed`. // // - `container` source: no build step, so the version carries no `buildId`. No worker runs -// from a container source yet, so the deployment stays `initializing` and does not serve +// from a container source yet, so the app stays `initializing` and does not serve // inference — poll `active` only for a `code` source. // // `activeVersionId` is null until a rollout completes: a version records what should run, and only a finished deploy says what does. @@ -1895,9 +1894,9 @@ func (c *Client) ListDeployments(ctx context.Context, params *ListDeploymentsPar // // Takes any type of body and a specified content type. // -// Corresponds with POST /v1/deployments (the `CreateDeployment` operationId). -func (c *Client) CreateDeploymentWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateDeploymentRequestWithBody(c.Server, contentType, body) +// Corresponds with POST /v1/apps (the `CreateApp` operationId). +func (c *Client) CreateAppWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateAppRequestWithBody(c.Server, contentType, body) if err != nil { return nil, err } @@ -1908,17 +1907,17 @@ func (c *Client) CreateDeploymentWithBody(ctx context.Context, contentType strin return c.Client.Do(req) } -// CreateDeployment Create a deployment +// CreateApp Create an app // -// Creates a deployment together with its worker configuration, environment variables and endpoints, and records version `1` — the immutable description of what to deploy. The deployment starts in `initializing`, and what happens next depends on the deployment source type: +// Creates an app together with its worker configuration, environment variables and endpoints, and records version `1` — the immutable description of what to deploy. The app starts in `initializing`, and what happens next depends on the app source type: // // - `code` source: the codebase is submitted to the build pipeline; once the image is built -// and workers become healthy the deployment transitions to `active` and `activeVersionId` -// points at that version. If the build, validation, or rollout fails the deployment is +// and workers become healthy the app transitions to `active` and `activeVersionId` +// points at that version. If the build, validation, or rollout fails the app is // marked `failed`. // // - `container` source: no build step, so the version carries no `buildId`. No worker runs -// from a container source yet, so the deployment stays `initializing` and does not serve +// from a container source yet, so the app stays `initializing` and does not serve // inference — poll `active` only for a `code` source. // // `activeVersionId` is null until a rollout completes: a version records what should run, and only a finished deploy says what does. @@ -1927,9 +1926,9 @@ func (c *Client) CreateDeploymentWithBody(ctx context.Context, contentType strin // // Takes a body of the `application/json` content type. // -// Corresponds with POST /v1/deployments (the `CreateDeployment` operationId). -func (c *Client) CreateDeployment(ctx context.Context, body CreateDeploymentJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewCreateDeploymentRequest(c.Server, body) +// Corresponds with POST /v1/apps (the `CreateApp` operationId). +func (c *Client) CreateApp(ctx context.Context, body CreateAppJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewCreateAppRequest(c.Server, body) if err != nil { return nil, err } @@ -1940,13 +1939,13 @@ func (c *Client) CreateDeployment(ctx context.Context, body CreateDeploymentJSON return c.Client.Do(req) } -// DeleteDeployment Delete a deployment +// DeleteApp Delete an app // -// Soft delete. Sets `status = deleting` and returns `202` once that intent is persisted. Router removal, cancelling in-progress builds, and worker drain (`draining → stopping → stopped`) are performed asynchronously by the deployer/Scaler; `status` becomes `deleted` once all workers stop. All rows are retained for billing finalisation, audit, and usage history. Idempotent if the deployment is already `deleting`. +// Soft delete. Sets `status = deleting` and returns `202` once that intent is persisted. Router removal, cancelling in-progress builds, and worker drain (`draining → stopping → stopped`) are performed asynchronously by the deployer/Scaler; `status` becomes `deleted` once all workers stop. All rows are retained for billing finalisation, audit, and usage history. Idempotent if the app is already `deleting`. // -// Corresponds with DELETE /v1/deployments/{deploymentId} (the `DeleteDeployment` operationId). -func (c *Client) DeleteDeployment(ctx context.Context, deploymentId DeploymentId, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteDeploymentRequest(c.Server, deploymentId) +// Corresponds with DELETE /v1/apps/{appId} (the `DeleteApp` operationId). +func (c *Client) DeleteApp(ctx context.Context, appId AppId, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteAppRequest(c.Server, appId) if err != nil { return nil, err } @@ -1957,11 +1956,11 @@ func (c *Client) DeleteDeployment(ctx context.Context, deploymentId DeploymentId return c.Client.Do(req) } -// GetDeployment Get a deployment +// GetApp Get an app // -// Corresponds with GET /v1/deployments/{deploymentId} (the `GetDeployment` operationId). -func (c *Client) GetDeployment(ctx context.Context, deploymentId DeploymentId, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetDeploymentRequest(c.Server, deploymentId) +// Corresponds with GET /v1/apps/{appId} (the `GetApp` operationId). +func (c *Client) GetApp(ctx context.Context, appId AppId, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetAppRequest(c.Server, appId) if err != nil { return nil, err } @@ -1972,20 +1971,20 @@ func (c *Client) GetDeployment(ctx context.Context, deploymentId DeploymentId, r return c.Client.Do(req) } -// UpdateDeploymentWithBody Update a deployment +// UpdateAppWithBody Update an app // -// Patches one or more aspects of a deployment in place. All fields are optional; omitted fields are left unchanged. Valid in any non-`deleted` status, including `stopped` (changes apply on `resume`). Lifecycle transitions use the dedicated `deploy`, `stop`, `resume`, and `delete` operations. +// Patches one or more aspects of an app in place. All fields are optional; omitted fields are left unchanged. Valid in any non-`deleted` status, including `stopped` (changes apply on `resume`). Lifecycle transitions use the dedicated `deploy`, `stop`, `resume`, and `delete` operations. // -// **Currently persisted:** `deploymentName` and `configuration` only. Supplying `deploymentSource`, `secrets`, `environmentVariables`, or `endpoints` returns `422` (bulk env-var replace is not wired — use the dedicated `/environment-variables` endpoints for individual keys). +// **Currently persisted:** `appName` and `configuration` only. Supplying `appSource`, `secrets`, `environmentVariables`, or `endpoints` returns `422` (bulk env-var replace is not wired — use the dedicated `/environment-variables` endpoints for individual keys). // // Target behaviour (once fully wired): // - `configuration`: applied on the next Scaler cycle; triggers a rollout so workers -// restart with the new configuration. If the rollout fails, the deployment remains on +// restart with the new configuration. If the rollout fails, the app remains on // the previous configuration. // -// - `deploymentSource`: triggers a build (for `code` sources) or image validation (for `container` +// - `appSource`: triggers a build (for `code` sources) or image validation (for `container` // sources); on success the new version is deployed automatically. If the build or -// validation fails, the deployment remains on the previous version. +// validation fails, the app remains on the previous version. // // - `secrets` / `environmentVariables` / `endpoints`: the supplied array **replaces** the // current set — any item absent from the request is deleted. Endpoints take effect @@ -1994,9 +1993,9 @@ func (c *Client) GetDeployment(ctx context.Context, deploymentId DeploymentId, r // // Takes any type of body and a specified content type. // -// Corresponds with PATCH /v1/deployments/{deploymentId} (the `UpdateDeployment` operationId). -func (c *Client) UpdateDeploymentWithBody(ctx context.Context, deploymentId DeploymentId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdateDeploymentRequestWithBody(c.Server, deploymentId, contentType, body) +// Corresponds with PATCH /v1/apps/{appId} (the `UpdateApp` operationId). +func (c *Client) UpdateAppWithBody(ctx context.Context, appId AppId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateAppRequestWithBody(c.Server, appId, contentType, body) if err != nil { return nil, err } @@ -2007,21 +2006,21 @@ func (c *Client) UpdateDeploymentWithBody(ctx context.Context, deploymentId Depl return c.Client.Do(req) } -// UpdateDeployment Update a deployment +// UpdateApp Update an app // -// Patches one or more aspects of a deployment in place. All fields are optional; omitted fields are left unchanged. Valid in any non-`deleted` status, including `stopped` (changes apply on `resume`). Lifecycle transitions use the dedicated `deploy`, `stop`, `resume`, and `delete` operations. +// Patches one or more aspects of an app in place. All fields are optional; omitted fields are left unchanged. Valid in any non-`deleted` status, including `stopped` (changes apply on `resume`). Lifecycle transitions use the dedicated `deploy`, `stop`, `resume`, and `delete` operations. // -// **Currently persisted:** `deploymentName` and `configuration` only. Supplying `deploymentSource`, `secrets`, `environmentVariables`, or `endpoints` returns `422` (bulk env-var replace is not wired — use the dedicated `/environment-variables` endpoints for individual keys). +// **Currently persisted:** `appName` and `configuration` only. Supplying `appSource`, `secrets`, `environmentVariables`, or `endpoints` returns `422` (bulk env-var replace is not wired — use the dedicated `/environment-variables` endpoints for individual keys). // // Target behaviour (once fully wired): // // - `configuration`: applied on the next Scaler cycle; triggers a rollout so workers -// restart with the new configuration. If the rollout fails, the deployment remains on +// restart with the new configuration. If the rollout fails, the app remains on // the previous configuration. // -// - `deploymentSource`: triggers a build (for `code` sources) or image validation (for `container` +// - `appSource`: triggers a build (for `code` sources) or image validation (for `container` // sources); on success the new version is deployed automatically. If the build or -// validation fails, the deployment remains on the previous version. +// validation fails, the app remains on the previous version. // // - `secrets` / `environmentVariables` / `endpoints`: the supplied array **replaces** the // current set — any item absent from the request is deleted. Endpoints take effect @@ -2030,9 +2029,9 @@ func (c *Client) UpdateDeploymentWithBody(ctx context.Context, deploymentId Depl // // Takes a body of the `application/json` content type. // -// Corresponds with PATCH /v1/deployments/{deploymentId} (the `UpdateDeployment` operationId). -func (c *Client) UpdateDeployment(ctx context.Context, deploymentId DeploymentId, body UpdateDeploymentJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdateDeploymentRequest(c.Server, deploymentId, body) +// Corresponds with PATCH /v1/apps/{appId} (the `UpdateApp` operationId). +func (c *Client) UpdateApp(ctx context.Context, appId AppId, body UpdateAppJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateAppRequest(c.Server, appId, body) if err != nil { return nil, err } @@ -2045,9 +2044,9 @@ func (c *Client) UpdateDeployment(ctx context.Context, deploymentId DeploymentId // ListBuilds List builds // -// Corresponds with GET /v1/deployments/{deploymentId}/builds (the `ListBuilds` operationId). -func (c *Client) ListBuilds(ctx context.Context, deploymentId DeploymentId, params *ListBuildsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewListBuildsRequest(c.Server, deploymentId, params) +// Corresponds with GET /v1/apps/{appId}/builds (the `ListBuilds` operationId). +func (c *Client) ListBuilds(ctx context.Context, appId AppId, params *ListBuildsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListBuildsRequest(c.Server, appId, params) if err != nil { return nil, err } @@ -2060,9 +2059,9 @@ func (c *Client) ListBuilds(ctx context.Context, deploymentId DeploymentId, para // GetBuild Get a build // -// Corresponds with GET /v1/deployments/{deploymentId}/builds/{buildId} (the `GetBuild` operationId). -func (c *Client) GetBuild(ctx context.Context, deploymentId DeploymentId, buildId openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetBuildRequest(c.Server, deploymentId, buildId) +// Corresponds with GET /v1/apps/{appId}/builds/{buildId} (the `GetBuild` operationId). +func (c *Client) GetBuild(ctx context.Context, appId AppId, buildId openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetBuildRequest(c.Server, appId, buildId) if err != nil { return nil, err } @@ -2077,16 +2076,16 @@ func (c *Client) GetBuild(ctx context.Context, deploymentId DeploymentId, buildI // // Activates a `ready` version by number, setting `activeVersionId` and returning `202` once that intent is persisted. Worker rollout, routing switch, and cancelling in-progress builds (`failed` with `error: "superseded"`) are performed asynchronously by the deployer/Scaler. Permitted in any addressable status, including `initializing` and `failed`. // To roll back, supply an older `versionNumber` — the operation is identical to a forward deploy. No new version is created and no rebuild happens: the version's existing image is re-applied. Re-deploying the currently active version is permitted and re-applies it. -// A deploy to a `stopped` or `stopping` deployment records the version and rolls no workload, because no workers are running: the `202` does not imply a rollout there. The recorded version is the one applied when the deployment resumes. -// If the roll of a live deployment fails, `activeVersionId` is restored to the version that kept serving, so the field keeps naming the running image. -// **Rollout** (deployer/Scaler): the platform starts workers on the target version, waits for at least one to become healthy, switches task routing to the new version, then drains old-version workers gracefully. Old workers are given a fixed, platform-managed grace period to finish in-flight tasks before being force-terminated. If new workers fail to become healthy, old workers are not drained and the deployment continues on the previous version. -// Errors: - Deploy to a `deleting` deployment returns `409 Conflict` - `versionNumber` not found or not `ready` returns `409 Conflict` - A `container`-source version returns `409 Conflict` until container deployments are supported - Deploy to a non-existent or `deleted` deployment returns `404 Not Found` +// A deploy to a `stopped` or `stopping` app records the version and rolls no workload, because no workers are running: the `202` does not imply a rollout there. The recorded version is the one applied when the app resumes. +// If the roll of a live app fails, `activeVersionId` is restored to the version that kept serving, so the field keeps naming the running image. +// **Rollout** (deployer/Scaler): the platform starts workers on the target version, waits for at least one to become healthy, switches task routing to the new version, then drains old-version workers gracefully. Old workers are given a fixed, platform-managed grace period to finish in-flight tasks before being force-terminated. If new workers fail to become healthy, old workers are not drained and the app continues on the previous version. +// Errors: - Deploy to a `deleting` app returns `409 Conflict` - `versionNumber` not found or not `ready` returns `409 Conflict` - A `container`-source version returns `409 Conflict` until container apps are supported - Deploy to a non-existent or `deleted` app returns `404 Not Found` // // Takes any type of body and a specified content type. // -// Corresponds with POST /v1/deployments/{deploymentId}/deploy (the `DeployVersion` operationId). -func (c *Client) DeployVersionWithBody(ctx context.Context, deploymentId DeploymentId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeployVersionRequestWithBody(c.Server, deploymentId, contentType, body) +// Corresponds with POST /v1/apps/{appId}/deploy (the `DeployVersion` operationId). +func (c *Client) DeployVersionWithBody(ctx context.Context, appId AppId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeployVersionRequestWithBody(c.Server, appId, contentType, body) if err != nil { return nil, err } @@ -2101,16 +2100,16 @@ func (c *Client) DeployVersionWithBody(ctx context.Context, deploymentId Deploym // // Activates a `ready` version by number, setting `activeVersionId` and returning `202` once that intent is persisted. Worker rollout, routing switch, and cancelling in-progress builds (`failed` with `error: "superseded"`) are performed asynchronously by the deployer/Scaler. Permitted in any addressable status, including `initializing` and `failed`. // To roll back, supply an older `versionNumber` — the operation is identical to a forward deploy. No new version is created and no rebuild happens: the version's existing image is re-applied. Re-deploying the currently active version is permitted and re-applies it. -// A deploy to a `stopped` or `stopping` deployment records the version and rolls no workload, because no workers are running: the `202` does not imply a rollout there. The recorded version is the one applied when the deployment resumes. -// If the roll of a live deployment fails, `activeVersionId` is restored to the version that kept serving, so the field keeps naming the running image. -// **Rollout** (deployer/Scaler): the platform starts workers on the target version, waits for at least one to become healthy, switches task routing to the new version, then drains old-version workers gracefully. Old workers are given a fixed, platform-managed grace period to finish in-flight tasks before being force-terminated. If new workers fail to become healthy, old workers are not drained and the deployment continues on the previous version. -// Errors: - Deploy to a `deleting` deployment returns `409 Conflict` - `versionNumber` not found or not `ready` returns `409 Conflict` - A `container`-source version returns `409 Conflict` until container deployments are supported - Deploy to a non-existent or `deleted` deployment returns `404 Not Found` +// A deploy to a `stopped` or `stopping` app records the version and rolls no workload, because no workers are running: the `202` does not imply a rollout there. The recorded version is the one applied when the app resumes. +// If the roll of a live app fails, `activeVersionId` is restored to the version that kept serving, so the field keeps naming the running image. +// **Rollout** (deployer/Scaler): the platform starts workers on the target version, waits for at least one to become healthy, switches task routing to the new version, then drains old-version workers gracefully. Old workers are given a fixed, platform-managed grace period to finish in-flight tasks before being force-terminated. If new workers fail to become healthy, old workers are not drained and the app continues on the previous version. +// Errors: - Deploy to a `deleting` app returns `409 Conflict` - `versionNumber` not found or not `ready` returns `409 Conflict` - A `container`-source version returns `409 Conflict` until container apps are supported - Deploy to a non-existent or `deleted` app returns `404 Not Found` // // Takes a body of the `application/json` content type. // -// Corresponds with POST /v1/deployments/{deploymentId}/deploy (the `DeployVersion` operationId). -func (c *Client) DeployVersion(ctx context.Context, deploymentId DeploymentId, body DeployVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeployVersionRequest(c.Server, deploymentId, body) +// Corresponds with POST /v1/apps/{appId}/deploy (the `DeployVersion` operationId). +func (c *Client) DeployVersion(ctx context.Context, appId AppId, body DeployVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeployVersionRequest(c.Server, appId, body) if err != nil { return nil, err } @@ -2123,9 +2122,9 @@ func (c *Client) DeployVersion(ctx context.Context, deploymentId DeploymentId, b // ListEndpoints List endpoints // -// Corresponds with GET /v1/deployments/{deploymentId}/endpoints (the `ListEndpoints` operationId). -func (c *Client) ListEndpoints(ctx context.Context, deploymentId DeploymentId, params *ListEndpointsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewListEndpointsRequest(c.Server, deploymentId, params) +// Corresponds with GET /v1/apps/{appId}/endpoints (the `ListEndpoints` operationId). +func (c *Client) ListEndpoints(ctx context.Context, appId AppId, params *ListEndpointsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListEndpointsRequest(c.Server, appId, params) if err != nil { return nil, err } @@ -2138,9 +2137,9 @@ func (c *Client) ListEndpoints(ctx context.Context, deploymentId DeploymentId, p // GetEndpoint Get an endpoint // -// Corresponds with GET /v1/deployments/{deploymentId}/endpoints/{endpointId} (the `GetEndpoint` operationId). -func (c *Client) GetEndpoint(ctx context.Context, deploymentId DeploymentId, endpointId openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetEndpointRequest(c.Server, deploymentId, endpointId) +// Corresponds with GET /v1/apps/{appId}/endpoints/{endpointId} (the `GetEndpoint` operationId). +func (c *Client) GetEndpoint(ctx context.Context, appId AppId, endpointId openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetEndpointRequest(c.Server, appId, endpointId) if err != nil { return nil, err } @@ -2151,11 +2150,11 @@ func (c *Client) GetEndpoint(ctx context.Context, deploymentId DeploymentId, end return c.Client.Do(req) } -// ListDeploymentEnvironmentVariables List deployment environment variables +// ListAppEnvironmentVariables List app environment variables // -// Corresponds with GET /v1/deployments/{deploymentId}/environment-variables (the `ListDeploymentEnvironmentVariables` operationId). -func (c *Client) ListDeploymentEnvironmentVariables(ctx context.Context, deploymentId DeploymentId, params *ListDeploymentEnvironmentVariablesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewListDeploymentEnvironmentVariablesRequest(c.Server, deploymentId, params) +// Corresponds with GET /v1/apps/{appId}/environment-variables (the `ListAppEnvironmentVariables` operationId). +func (c *Client) ListAppEnvironmentVariables(ctx context.Context, appId AppId, params *ListAppEnvironmentVariablesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListAppEnvironmentVariablesRequest(c.Server, appId, params) if err != nil { return nil, err } @@ -2166,11 +2165,11 @@ func (c *Client) ListDeploymentEnvironmentVariables(ctx context.Context, deploym return c.Client.Do(req) } -// DeleteDeploymentEnvironmentVariable Delete a deployment environment variable +// DeleteAppEnvironmentVariable Delete an app environment variable // -// Corresponds with DELETE /v1/deployments/{deploymentId}/environment-variables/{variableName} (the `DeleteDeploymentEnvironmentVariable` operationId). -func (c *Client) DeleteDeploymentEnvironmentVariable(ctx context.Context, deploymentId DeploymentId, variableName EnvironmentVariableName, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDeleteDeploymentEnvironmentVariableRequest(c.Server, deploymentId, variableName) +// Corresponds with DELETE /v1/apps/{appId}/environment-variables/{variableName} (the `DeleteAppEnvironmentVariable` operationId). +func (c *Client) DeleteAppEnvironmentVariable(ctx context.Context, appId AppId, variableName EnvironmentVariableName, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDeleteAppEnvironmentVariableRequest(c.Server, appId, variableName) if err != nil { return nil, err } @@ -2181,19 +2180,19 @@ func (c *Client) DeleteDeploymentEnvironmentVariable(ctx context.Context, deploy return c.Client.Do(req) } -// UpdateDeploymentEnvironmentVariableWithBody Update a deployment environment variable +// UpdateAppEnvironmentVariableWithBody Update an app environment variable // // Sets one environment variable, creating it if absent. Names the platform sets on the serving container itself are rejected with `422`, as they are on create. // -// A deployment holds at most 100 environment bindings in total — plain variables plus attached secrets — the same combined ceiling `DeploymentCreate.environmentVariables` declares (create rejects secrets in-request; attach grows the set later). Overwriting an existing variable is always allowed; adding one past the ceiling returns `422`. +// An app holds at most 100 environment bindings in total — plain variables plus attached secrets — the same combined ceiling `AppCreate.environmentVariables` declares (create rejects secrets in-request; attach grows the set later). Overwriting an existing variable is always allowed; adding one past the ceiling returns `422`. // -// The name must not collide with a secret already attached to this deployment (the secret's injected env var name). Secrets and plain env vars share the pod environment; a duplicate would be resolved last-wins by kubelet with no error, so the server rejects it with `422`. The reverse check applies on attach. +// The name must not collide with a secret already attached to this app (the secret's injected env var name). Secrets and plain env vars share the pod environment; a duplicate would be resolved last-wins by kubelet with no error, so the server rejects it with `422`. The reverse check applies on attach. // // Takes any type of body and a specified content type. // -// Corresponds with PUT /v1/deployments/{deploymentId}/environment-variables/{variableName} (the `UpdateDeploymentEnvironmentVariable` operationId). -func (c *Client) UpdateDeploymentEnvironmentVariableWithBody(ctx context.Context, deploymentId DeploymentId, variableName EnvironmentVariableName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdateDeploymentEnvironmentVariableRequestWithBody(c.Server, deploymentId, variableName, contentType, body) +// Corresponds with PUT /v1/apps/{appId}/environment-variables/{variableName} (the `UpdateAppEnvironmentVariable` operationId). +func (c *Client) UpdateAppEnvironmentVariableWithBody(ctx context.Context, appId AppId, variableName EnvironmentVariableName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateAppEnvironmentVariableRequestWithBody(c.Server, appId, variableName, contentType, body) if err != nil { return nil, err } @@ -2204,19 +2203,19 @@ func (c *Client) UpdateDeploymentEnvironmentVariableWithBody(ctx context.Context return c.Client.Do(req) } -// UpdateDeploymentEnvironmentVariable Update a deployment environment variable +// UpdateAppEnvironmentVariable Update an app environment variable // // Sets one environment variable, creating it if absent. Names the platform sets on the serving container itself are rejected with `422`, as they are on create. // -// A deployment holds at most 100 environment bindings in total — plain variables plus attached secrets — the same combined ceiling `DeploymentCreate.environmentVariables` declares (create rejects secrets in-request; attach grows the set later). Overwriting an existing variable is always allowed; adding one past the ceiling returns `422`. +// An app holds at most 100 environment bindings in total — plain variables plus attached secrets — the same combined ceiling `AppCreate.environmentVariables` declares (create rejects secrets in-request; attach grows the set later). Overwriting an existing variable is always allowed; adding one past the ceiling returns `422`. // -// The name must not collide with a secret already attached to this deployment (the secret's injected env var name). Secrets and plain env vars share the pod environment; a duplicate would be resolved last-wins by kubelet with no error, so the server rejects it with `422`. The reverse check applies on attach. +// The name must not collide with a secret already attached to this app (the secret's injected env var name). Secrets and plain env vars share the pod environment; a duplicate would be resolved last-wins by kubelet with no error, so the server rejects it with `422`. The reverse check applies on attach. // // Takes a body of the `application/json` content type. // -// Corresponds with PUT /v1/deployments/{deploymentId}/environment-variables/{variableName} (the `UpdateDeploymentEnvironmentVariable` operationId). -func (c *Client) UpdateDeploymentEnvironmentVariable(ctx context.Context, deploymentId DeploymentId, variableName EnvironmentVariableName, body UpdateDeploymentEnvironmentVariableJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUpdateDeploymentEnvironmentVariableRequest(c.Server, deploymentId, variableName, body) +// Corresponds with PUT /v1/apps/{appId}/environment-variables/{variableName} (the `UpdateAppEnvironmentVariable` operationId). +func (c *Client) UpdateAppEnvironmentVariable(ctx context.Context, appId AppId, variableName EnvironmentVariableName, body UpdateAppEnvironmentVariableJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUpdateAppEnvironmentVariableRequest(c.Server, appId, variableName, body) if err != nil { return nil, err } @@ -2227,11 +2226,11 @@ func (c *Client) UpdateDeploymentEnvironmentVariable(ctx context.Context, deploy return c.Client.Do(req) } -// ListDeploymentEvents List deployment events +// ListAppEvents List app events // -// Corresponds with GET /v1/deployments/{deploymentId}/events (the `ListDeploymentEvents` operationId). -func (c *Client) ListDeploymentEvents(ctx context.Context, deploymentId DeploymentId, params *ListDeploymentEventsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewListDeploymentEventsRequest(c.Server, deploymentId, params) +// Corresponds with GET /v1/apps/{appId}/events (the `ListAppEvents` operationId). +func (c *Client) ListAppEvents(ctx context.Context, appId AppId, params *ListAppEventsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListAppEventsRequest(c.Server, appId, params) if err != nil { return nil, err } @@ -2242,13 +2241,13 @@ func (c *Client) ListDeploymentEvents(ctx context.Context, deploymentId Deployme return c.Client.Do(req) } -// UnfavouriteDeployment Unfavourite a deployment +// UnfavouriteApp Unfavourite an app // -// Removes the organisation favourite pin from the deployment. Idempotent: unfavouriting a deployment that is not favourited succeeds and returns the deployment with `isFavourite: false`. Valid in any status including `deleting` and `deleted` — unpinning is not a deployment lifecycle mutation. Missing deployments return `404`. +// Removes the organisation favourite pin from the app. Idempotent: unfavouriting an app that is not favourited succeeds and returns the app with `isFavourite: false`. Valid in any status including `deleting` and `deleted` — unpinning is not an app lifecycle mutation. Missing apps return `404`. // -// Corresponds with DELETE /v1/deployments/{deploymentId}/favourite (the `UnfavouriteDeployment` operationId). -func (c *Client) UnfavouriteDeployment(ctx context.Context, deploymentId DeploymentId, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewUnfavouriteDeploymentRequest(c.Server, deploymentId) +// Corresponds with DELETE /v1/apps/{appId}/favourite (the `UnfavouriteApp` operationId). +func (c *Client) UnfavouriteApp(ctx context.Context, appId AppId, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewUnfavouriteAppRequest(c.Server, appId) if err != nil { return nil, err } @@ -2259,13 +2258,13 @@ func (c *Client) UnfavouriteDeployment(ctx context.Context, deploymentId Deploym return c.Client.Do(req) } -// FavouriteDeployment Favourite a deployment +// FavouriteApp Favourite an app // -// Pins the deployment as a favourite for the authenticated organisation so the console can surface it in a Favourites section. Idempotent: favouriting an already-favourited deployment succeeds and returns the deployment with `isFavourite: true`. Deployments in `deleting` or `deleted` status cannot be favourited (`404`). Soft-delete clears any existing pin when status becomes `deleting`. +// Pins the app as a favourite for the authenticated organisation so the console can surface it in a Favourites section. Idempotent: favouriting an already-favourited app succeeds and returns the app with `isFavourite: true`. Apps in `deleting` or `deleted` status cannot be favourited (`404`). Soft-delete clears any existing pin when status becomes `deleting`. // -// Corresponds with PUT /v1/deployments/{deploymentId}/favourite (the `FavouriteDeployment` operationId). -func (c *Client) FavouriteDeployment(ctx context.Context, deploymentId DeploymentId, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewFavouriteDeploymentRequest(c.Server, deploymentId) +// Corresponds with PUT /v1/apps/{appId}/favourite (the `FavouriteApp` operationId). +func (c *Client) FavouriteApp(ctx context.Context, appId AppId, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewFavouriteAppRequest(c.Server, appId) if err != nil { return nil, err } @@ -2278,13 +2277,13 @@ func (c *Client) FavouriteDeployment(ctx context.Context, deploymentId Deploymen // StartAsyncTaskWithBody Start a new async task // -// Starts a new async task on `deploymentId`, routing the request body payload to an available worker. The task runs asynchronously and the response is `202`; poll `GET /v1/deployments/{deploymentId}/tasks/{taskId}` for completion. Deployments in `initializing`, `active`, or `stopping` accept invocation. `stopped`, `deleting`, and `failed` return `409 Conflict`; unknown or deleted deployments return `404 Not Found`. +// Starts a new async task on `appId`, routing the request body payload to an available worker. The task runs asynchronously and the response is `202`; poll `GET /v1/apps/{appId}/tasks/{taskId}` for completion. Apps in `initializing`, `active`, or `stopping` accept invocation. `stopped`, `deleting`, and `failed` return `409 Conflict`; unknown or deleted apps return `404 Not Found`. // // Takes any type of body and a specified content type. // -// Corresponds with POST /v1/deployments/{deploymentId}/invoke-async/{endpointPath} (the `StartAsyncTask` operationId). -func (c *Client) StartAsyncTaskWithBody(ctx context.Context, deploymentId DeploymentId, endpointPath EndpointPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewStartAsyncTaskRequestWithBody(c.Server, deploymentId, endpointPath, contentType, body) +// Corresponds with POST /v1/apps/{appId}/invoke-async/{endpointPath} (the `StartAsyncTask` operationId). +func (c *Client) StartAsyncTaskWithBody(ctx context.Context, appId AppId, endpointPath EndpointPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewStartAsyncTaskRequestWithBody(c.Server, appId, endpointPath, contentType, body) if err != nil { return nil, err } @@ -2297,13 +2296,13 @@ func (c *Client) StartAsyncTaskWithBody(ctx context.Context, deploymentId Deploy // StartAsyncTask Start a new async task // -// Starts a new async task on `deploymentId`, routing the request body payload to an available worker. The task runs asynchronously and the response is `202`; poll `GET /v1/deployments/{deploymentId}/tasks/{taskId}` for completion. Deployments in `initializing`, `active`, or `stopping` accept invocation. `stopped`, `deleting`, and `failed` return `409 Conflict`; unknown or deleted deployments return `404 Not Found`. +// Starts a new async task on `appId`, routing the request body payload to an available worker. The task runs asynchronously and the response is `202`; poll `GET /v1/apps/{appId}/tasks/{taskId}` for completion. Apps in `initializing`, `active`, or `stopping` accept invocation. `stopped`, `deleting`, and `failed` return `409 Conflict`; unknown or deleted apps return `404 Not Found`. // // Takes a body of the `application/json` content type. // -// Corresponds with POST /v1/deployments/{deploymentId}/invoke-async/{endpointPath} (the `StartAsyncTask` operationId). -func (c *Client) StartAsyncTask(ctx context.Context, deploymentId DeploymentId, endpointPath EndpointPath, body StartAsyncTaskJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewStartAsyncTaskRequest(c.Server, deploymentId, endpointPath, body) +// Corresponds with POST /v1/apps/{appId}/invoke-async/{endpointPath} (the `StartAsyncTask` operationId). +func (c *Client) StartAsyncTask(ctx context.Context, appId AppId, endpointPath EndpointPath, body StartAsyncTaskJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewStartAsyncTaskRequest(c.Server, appId, endpointPath, body) if err != nil { return nil, err } @@ -2316,13 +2315,13 @@ func (c *Client) StartAsyncTask(ctx context.Context, deploymentId DeploymentId, // StartSyncTaskWithBody Start a new sync task // -// Starts a new sync task on `deploymentId`, routing the request body payload to an available worker. The request blocks until the task is terminal and returns the result inline (`200`), or `504` if it does not complete within the wait window. When the accepted task ID is available, the response includes `taskId` for polling. Deployments in `initializing`, `active`, or `stopping` accept invocation. `stopped`, `deleting`, and `failed` return `409 Conflict`; unknown or deleted deployments return `404 Not Found`. +// Starts a new sync task on `appId`, routing the request body payload to an available worker. The request blocks until the task is terminal and returns the result inline (`200`), or `504` if it does not complete within the wait window. When the accepted task ID is available, the response includes `taskId` for polling. Apps in `initializing`, `active`, or `stopping` accept invocation. `stopped`, `deleting`, and `failed` return `409 Conflict`; unknown or deleted apps return `404 Not Found`. // // Takes any type of body and a specified content type. // -// Corresponds with POST /v1/deployments/{deploymentId}/invoke-sync/{endpointPath} (the `StartSyncTask` operationId). -func (c *Client) StartSyncTaskWithBody(ctx context.Context, deploymentId DeploymentId, endpointPath EndpointPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewStartSyncTaskRequestWithBody(c.Server, deploymentId, endpointPath, contentType, body) +// Corresponds with POST /v1/apps/{appId}/invoke-sync/{endpointPath} (the `StartSyncTask` operationId). +func (c *Client) StartSyncTaskWithBody(ctx context.Context, appId AppId, endpointPath EndpointPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewStartSyncTaskRequestWithBody(c.Server, appId, endpointPath, contentType, body) if err != nil { return nil, err } @@ -2335,13 +2334,13 @@ func (c *Client) StartSyncTaskWithBody(ctx context.Context, deploymentId Deploym // StartSyncTask Start a new sync task // -// Starts a new sync task on `deploymentId`, routing the request body payload to an available worker. The request blocks until the task is terminal and returns the result inline (`200`), or `504` if it does not complete within the wait window. When the accepted task ID is available, the response includes `taskId` for polling. Deployments in `initializing`, `active`, or `stopping` accept invocation. `stopped`, `deleting`, and `failed` return `409 Conflict`; unknown or deleted deployments return `404 Not Found`. +// Starts a new sync task on `appId`, routing the request body payload to an available worker. The request blocks until the task is terminal and returns the result inline (`200`), or `504` if it does not complete within the wait window. When the accepted task ID is available, the response includes `taskId` for polling. Apps in `initializing`, `active`, or `stopping` accept invocation. `stopped`, `deleting`, and `failed` return `409 Conflict`; unknown or deleted apps return `404 Not Found`. // // Takes a body of the `application/json` content type. // -// Corresponds with POST /v1/deployments/{deploymentId}/invoke-sync/{endpointPath} (the `StartSyncTask` operationId). -func (c *Client) StartSyncTask(ctx context.Context, deploymentId DeploymentId, endpointPath EndpointPath, body StartSyncTaskJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewStartSyncTaskRequest(c.Server, deploymentId, endpointPath, body) +// Corresponds with POST /v1/apps/{appId}/invoke-sync/{endpointPath} (the `StartSyncTask` operationId). +func (c *Client) StartSyncTask(ctx context.Context, appId AppId, endpointPath EndpointPath, body StartSyncTaskJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewStartSyncTaskRequest(c.Server, appId, endpointPath, body) if err != nil { return nil, err } @@ -2352,13 +2351,13 @@ func (c *Client) StartSyncTask(ctx context.Context, deploymentId DeploymentId, e return c.Client.Do(req) } -// ResumeDeployment Resume a deployment +// ResumeApp Resume an app // -// Moves the deployment to `initializing` and returns `202` once that intent is persisted. The Scaler then starts workers and sets the deployment to `active`; tasks that remained queued when the deployment stopped are consumed as workers come online. Precondition: `status = stopped`. +// Moves the app to `initializing` and returns `202` once that intent is persisted. The Scaler then starts workers and sets the app to `active`; tasks that remained queued when the app stopped are consumed as workers come online. Precondition: `status = stopped`. // -// Corresponds with POST /v1/deployments/{deploymentId}/resume (the `ResumeDeployment` operationId). -func (c *Client) ResumeDeployment(ctx context.Context, deploymentId DeploymentId, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewResumeDeploymentRequest(c.Server, deploymentId) +// Corresponds with POST /v1/apps/{appId}/resume (the `ResumeApp` operationId). +func (c *Client) ResumeApp(ctx context.Context, appId AppId, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewResumeAppRequest(c.Server, appId) if err != nil { return nil, err } @@ -2369,11 +2368,11 @@ func (c *Client) ResumeDeployment(ctx context.Context, deploymentId DeploymentId return c.Client.Do(req) } -// ListDeploymentSecrets List secrets attached to a deployment +// ListAppSecrets List secrets attached to an app // -// Corresponds with GET /v1/deployments/{deploymentId}/secrets (the `ListDeploymentSecrets` operationId). -func (c *Client) ListDeploymentSecrets(ctx context.Context, deploymentId DeploymentId, params *ListDeploymentSecretsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewListDeploymentSecretsRequest(c.Server, deploymentId, params) +// Corresponds with GET /v1/apps/{appId}/secrets (the `ListAppSecrets` operationId). +func (c *Client) ListAppSecrets(ctx context.Context, appId AppId, params *ListAppSecretsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListAppSecretsRequest(c.Server, appId, params) if err != nil { return nil, err } @@ -2384,17 +2383,17 @@ func (c *Client) ListDeploymentSecrets(ctx context.Context, deploymentId Deploym return c.Client.Do(req) } -// AttachDeploymentSecretWithBody Attach a secret to a deployment +// AttachAppSecretWithBody Attach a secret to an app // -// Records that an organisation secret is attached to a deployment under a resolved env-var name. This is a control-plane association only in this release — it does not roll workers or inject values into pods yet (ADR-019 in-pod unseal is separate). Returns `409` if the secret is already attached, or if another attach would use the same env-var name. -// The resolved name (`envVarName`, or `secretName` when omitted) must not already exist as a plain environment variable on this deployment (`deployment_configs.key`). Both sources are reserved for the same future pod env namespace, so the server rejects the collision with `422` instead of allowing a last-wins override later. The reverse check applies when setting a plain environment variable. -// A deployment holds at most 100 environment bindings in total — plain environment variables plus attached secrets — the same combined ceiling as create and the single-key env-var route. Attaching when the deployment is already at that limit returns `422`. +// Records that an organisation secret is attached to an app under a resolved env-var name. This is a control-plane association only in this release — it does not roll workers or inject values into pods yet (ADR-019 in-pod unseal is separate). Returns `409` if the secret is already attached, or if another attach would use the same env-var name. +// The resolved name (`envVarName`, or `secretName` when omitted) must not already exist as a plain environment variable on this app (`deployment_configs.key`). Both sources are reserved for the same future pod env namespace, so the server rejects the collision with `422` instead of allowing a last-wins override later. The reverse check applies when setting a plain environment variable. +// An app holds at most 100 environment bindings in total — plain environment variables plus attached secrets — the same combined ceiling as create and the single-key env-var route. Attaching when the app is already at that limit returns `422`. // // Takes any type of body and a specified content type. // -// Corresponds with POST /v1/deployments/{deploymentId}/secrets (the `AttachDeploymentSecret` operationId). -func (c *Client) AttachDeploymentSecretWithBody(ctx context.Context, deploymentId DeploymentId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewAttachDeploymentSecretRequestWithBody(c.Server, deploymentId, contentType, body) +// Corresponds with POST /v1/apps/{appId}/secrets (the `AttachAppSecret` operationId). +func (c *Client) AttachAppSecretWithBody(ctx context.Context, appId AppId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewAttachAppSecretRequestWithBody(c.Server, appId, contentType, body) if err != nil { return nil, err } @@ -2405,17 +2404,17 @@ func (c *Client) AttachDeploymentSecretWithBody(ctx context.Context, deploymentI return c.Client.Do(req) } -// AttachDeploymentSecret Attach a secret to a deployment +// AttachAppSecret Attach a secret to an app // -// Records that an organisation secret is attached to a deployment under a resolved env-var name. This is a control-plane association only in this release — it does not roll workers or inject values into pods yet (ADR-019 in-pod unseal is separate). Returns `409` if the secret is already attached, or if another attach would use the same env-var name. -// The resolved name (`envVarName`, or `secretName` when omitted) must not already exist as a plain environment variable on this deployment (`deployment_configs.key`). Both sources are reserved for the same future pod env namespace, so the server rejects the collision with `422` instead of allowing a last-wins override later. The reverse check applies when setting a plain environment variable. -// A deployment holds at most 100 environment bindings in total — plain environment variables plus attached secrets — the same combined ceiling as create and the single-key env-var route. Attaching when the deployment is already at that limit returns `422`. +// Records that an organisation secret is attached to an app under a resolved env-var name. This is a control-plane association only in this release — it does not roll workers or inject values into pods yet (ADR-019 in-pod unseal is separate). Returns `409` if the secret is already attached, or if another attach would use the same env-var name. +// The resolved name (`envVarName`, or `secretName` when omitted) must not already exist as a plain environment variable on this app (`deployment_configs.key`). Both sources are reserved for the same future pod env namespace, so the server rejects the collision with `422` instead of allowing a last-wins override later. The reverse check applies when setting a plain environment variable. +// An app holds at most 100 environment bindings in total — plain environment variables plus attached secrets — the same combined ceiling as create and the single-key env-var route. Attaching when the app is already at that limit returns `422`. // // Takes a body of the `application/json` content type. // -// Corresponds with POST /v1/deployments/{deploymentId}/secrets (the `AttachDeploymentSecret` operationId). -func (c *Client) AttachDeploymentSecret(ctx context.Context, deploymentId DeploymentId, body AttachDeploymentSecretJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewAttachDeploymentSecretRequest(c.Server, deploymentId, body) +// Corresponds with POST /v1/apps/{appId}/secrets (the `AttachAppSecret` operationId). +func (c *Client) AttachAppSecret(ctx context.Context, appId AppId, body AttachAppSecretJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewAttachAppSecretRequest(c.Server, appId, body) if err != nil { return nil, err } @@ -2426,13 +2425,13 @@ func (c *Client) AttachDeploymentSecret(ctx context.Context, deploymentId Deploy return c.Client.Do(req) } -// DetachDeploymentSecret Detach a secret from a deployment +// DetachAppSecret Detach a secret from an app // // Removes the control-plane attachment. Does not roll workers in this release. // -// Corresponds with DELETE /v1/deployments/{deploymentId}/secrets/{secretName} (the `DetachDeploymentSecret` operationId). -func (c *Client) DetachDeploymentSecret(ctx context.Context, deploymentId DeploymentId, secretName SecretName, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewDetachDeploymentSecretRequest(c.Server, deploymentId, secretName) +// Corresponds with DELETE /v1/apps/{appId}/secrets/{secretName} (the `DetachAppSecret` operationId). +func (c *Client) DetachAppSecret(ctx context.Context, appId AppId, secretName SecretName, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewDetachAppSecretRequest(c.Server, appId, secretName) if err != nil { return nil, err } @@ -2443,13 +2442,13 @@ func (c *Client) DetachDeploymentSecret(ctx context.Context, deploymentId Deploy return c.Client.Do(req) } -// StopDeployment Stop a deployment +// StopApp Stop an app // -// Moves the deployment to `stopping` and returns `202` once that intent is persisted. Scale-to-zero and worker drain are performed asynchronously by the Scaler; `status` becomes `stopped` once all workers drain. In-flight tasks have a fixed, platform-managed grace period to complete; workers that exceed it are force-terminated and their tasks return to the queue per delivery guarantees. New task submissions remain accepted while `stopping`; after the deployment reaches `stopped`, submissions return `409 Conflict`. Precondition: `status = active`. +// Moves the app to `stopping` and returns `202` once that intent is persisted. Scale-to-zero and worker drain are performed asynchronously by the Scaler; `status` becomes `stopped` once all workers drain. In-flight tasks have a fixed, platform-managed grace period to complete; workers that exceed it are force-terminated and their tasks return to the queue per delivery guarantees. New task submissions remain accepted while `stopping`; after the app reaches `stopped`, submissions return `409 Conflict`. Precondition: `status = active`. // -// Corresponds with POST /v1/deployments/{deploymentId}/stop (the `StopDeployment` operationId). -func (c *Client) StopDeployment(ctx context.Context, deploymentId DeploymentId, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewStopDeploymentRequest(c.Server, deploymentId) +// Corresponds with POST /v1/apps/{appId}/stop (the `StopApp` operationId). +func (c *Client) StopApp(ctx context.Context, appId AppId, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewStopAppRequest(c.Server, appId) if err != nil { return nil, err } @@ -2460,13 +2459,13 @@ func (c *Client) StopDeployment(ctx context.Context, deploymentId DeploymentId, return c.Client.Do(req) } -// ListTasks List tasks for a deployment +// ListTasks List tasks for an app // -// Lists TTL-bounded asynchronous task metadata for this deployment so a client can recover task ids after an interrupted long-poll or CLI session. Pending includes queued, running and retrying work. Tasks appear only within the configured recovery window. A page can be empty and still have `nextCursor`; continue until it is null. Pending entries are best effort and may disappear if the recovery store restarts; tracked tasks reappear on completion. This is not persisted task history. Each submission has a new task id, so client retries can appear as separate tasks. If the deployment is `stopped`, `deleting`, or `failed`, recovery stays available. Unknown or deleted deployments return `404 Not Found`. +// Lists TTL-bounded asynchronous task metadata for this app so a client can recover task ids after an interrupted long-poll or CLI session. Pending includes queued, running and retrying work. Tasks appear only within the configured recovery window. A page can be empty and still have `nextCursor`; continue until it is null. Pending entries are best effort and may disappear if the recovery store restarts; tracked tasks reappear on completion. This is not persisted task history. Each submission has a new task id, so client retries can appear as separate tasks. If the app is `stopped`, `deleting`, or `failed`, recovery stays available. Unknown or deleted apps return `404 Not Found`. // -// Corresponds with GET /v1/deployments/{deploymentId}/tasks (the `ListTasks` operationId). -func (c *Client) ListTasks(ctx context.Context, deploymentId DeploymentId, params *ListTasksParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewListTasksRequest(c.Server, deploymentId, params) +// Corresponds with GET /v1/apps/{appId}/tasks (the `ListTasks` operationId). +func (c *Client) ListTasks(ctx context.Context, appId AppId, params *ListTasksParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListTasksRequest(c.Server, appId, params) if err != nil { return nil, err } @@ -2479,11 +2478,11 @@ func (c *Client) ListTasks(ctx context.Context, deploymentId DeploymentId, param // GetTask Get a task // -// Returns the task's current status, read through the inference transport layer from the shared result store. When `completed`, includes the result `output` and `completedAt`; when `failed`, includes `error`; when `pending`, neither is set. If the deployment is `stopped`, `deleting`, or `failed`, accepted task results stay readable. A `404 Not Found` means the task cannot currently be verified for this deployment. Because enqueue-time ownership tracking is best effort, a recently returned task ID can temporarily return `404`; retry it within the normal polling window. Unknown or deleted deployments also return `404 Not Found`. +// Returns the task's current status, read through the inference transport layer from the shared result store. When `completed`, includes the result `output` and `completedAt`; when `failed`, includes `error`; when `pending`, neither is set. If the app is `stopped`, `deleting`, or `failed`, accepted task results stay readable. A `404 Not Found` means the task cannot currently be verified for this app. Because enqueue-time ownership tracking is best effort, a recently returned task ID can temporarily return `404`; retry it within the normal polling window. Unknown or deleted apps also return `404 Not Found`. // -// Corresponds with GET /v1/deployments/{deploymentId}/tasks/{taskId} (the `GetTask` operationId). -func (c *Client) GetTask(ctx context.Context, deploymentId DeploymentId, taskId string, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetTaskRequest(c.Server, deploymentId, taskId) +// Corresponds with GET /v1/apps/{appId}/tasks/{taskId} (the `GetTask` operationId). +func (c *Client) GetTask(ctx context.Context, appId AppId, taskId string, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetTaskRequest(c.Server, appId, taskId) if err != nil { return nil, err } @@ -2496,9 +2495,9 @@ func (c *Client) GetTask(ctx context.Context, deploymentId DeploymentId, taskId // ListVersions List versions // -// Corresponds with GET /v1/deployments/{deploymentId}/versions (the `ListVersions` operationId). -func (c *Client) ListVersions(ctx context.Context, deploymentId DeploymentId, params *ListVersionsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewListVersionsRequest(c.Server, deploymentId, params) +// Corresponds with GET /v1/apps/{appId}/versions (the `ListVersions` operationId). +func (c *Client) ListVersions(ctx context.Context, appId AppId, params *ListVersionsParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListVersionsRequest(c.Server, appId, params) if err != nil { return nil, err } @@ -2511,9 +2510,9 @@ func (c *Client) ListVersions(ctx context.Context, deploymentId DeploymentId, pa // GetVersion Get a version // -// Corresponds with GET /v1/deployments/{deploymentId}/versions/{versionNumber} (the `GetVersion` operationId). -func (c *Client) GetVersion(ctx context.Context, deploymentId DeploymentId, versionNumber int32, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetVersionRequest(c.Server, deploymentId, versionNumber) +// Corresponds with GET /v1/apps/{appId}/versions/{versionNumber} (the `GetVersion` operationId). +func (c *Client) GetVersion(ctx context.Context, appId AppId, versionNumber int32, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetVersionRequest(c.Server, appId, versionNumber) if err != nil { return nil, err } @@ -2526,11 +2525,11 @@ func (c *Client) GetVersion(ctx context.Context, deploymentId DeploymentId, vers // ListWorkers List workers // -// Returns a newest-first page of workers observed for the deployment (including terminal `stopped` rows until purged). Optional `status` narrows the page; a cursor must be replayed under the same status filter it was issued with. +// Returns a newest-first page of workers observed for the app (including terminal `stopped` rows until purged). Optional `status` narrows the page; a cursor must be replayed under the same status filter it was issued with. // -// Corresponds with GET /v1/deployments/{deploymentId}/workers (the `ListWorkers` operationId). -func (c *Client) ListWorkers(ctx context.Context, deploymentId DeploymentId, params *ListWorkersParams, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewListWorkersRequest(c.Server, deploymentId, params) +// Corresponds with GET /v1/apps/{appId}/workers (the `ListWorkers` operationId). +func (c *Client) ListWorkers(ctx context.Context, appId AppId, params *ListWorkersParams, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewListWorkersRequest(c.Server, appId, params) if err != nil { return nil, err } @@ -2543,11 +2542,11 @@ func (c *Client) ListWorkers(ctx context.Context, deploymentId DeploymentId, par // GetWorker Get a worker // -// Returns one worker by id within the deployment. The id is the Kubernetes pod UID recorded by the reconciler. A worker that belongs to another deployment (or tenant) is not found. +// Returns one worker by id within the app. The id is the Kubernetes pod UID recorded by the reconciler. A worker that belongs to another app (or tenant) is not found. // -// Corresponds with GET /v1/deployments/{deploymentId}/workers/{workerId} (the `GetWorker` operationId). -func (c *Client) GetWorker(ctx context.Context, deploymentId DeploymentId, workerId WorkerId, reqEditors ...RequestEditorFn) (*http.Response, error) { - req, err := NewGetWorkerRequest(c.Server, deploymentId, workerId) +// Corresponds with GET /v1/apps/{appId}/workers/{workerId} (the `GetWorker` operationId). +func (c *Client) GetWorker(ctx context.Context, appId AppId, workerId WorkerId, reqEditors ...RequestEditorFn) (*http.Response, error) { + req, err := NewGetWorkerRequest(c.Server, appId, workerId) if err != nil { return nil, err } @@ -2560,7 +2559,7 @@ func (c *Client) GetWorker(ctx context.Context, deploymentId DeploymentId, worke // ListGpuTypes List supported GPU types and their pricing // -// Returns the global GPU type catalogue and pricing. The request requires authentication. Customer principals receive only GPU types with capacity currently offered to customers; a type whose hardware is not yet cleared for customer workloads is omitted. The Runware principal receives the full catalogue, including types not yet offered. Each entry's `pricing` is the price currently in effect; the Runware principal can read the full price history, including scheduled future changes, from `GET /v1/gpu-types/{gpuTypeId}/prices`. +// Returns the global GPU type catalogue and pricing. The request requires authentication. Customer principals receive only GPU types with capacity currently offered to customers; a type whose hardware is not yet cleared for customer workloads is omitted. The Runware principal receives the full catalogue, including retired types and types not yet offered. Retired entries carry `deletedAt`. Each entry's `pricing` is the price currently in effect; the Runware principal can read the full price history, including scheduled future changes, from `GET /v1/gpu-types/{gpuTypeId}/prices`. // // Corresponds with GET /v1/gpu-types (the `ListGpuTypes` operationId). func (c *Client) ListGpuTypes(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error) { @@ -2577,7 +2576,7 @@ func (c *Client) ListGpuTypes(ctx context.Context, reqEditors ...RequestEditorFn // CreateGpuTypeWithBody Add a GPU type to the catalogue // -// Creates a new entry in the global GPU type catalogue. Restricted to the Runware platform organization. The `id` (catalogue code) is immutable after create. +// Creates a new entry in the global GPU type catalogue. Restricted to the Runware platform organization. The `id` (catalogue code) is immutable and remains reserved after retirement. // // Takes any type of body and a specified content type. // @@ -2596,7 +2595,7 @@ func (c *Client) CreateGpuTypeWithBody(ctx context.Context, contentType string, // CreateGpuType Add a GPU type to the catalogue // -// Creates a new entry in the global GPU type catalogue. Restricted to the Runware platform organization. The `id` (catalogue code) is immutable after create. +// Creates a new entry in the global GPU type catalogue. Restricted to the Runware platform organization. The `id` (catalogue code) is immutable and remains reserved after retirement. // // Takes a body of the `application/json` content type. // @@ -2613,9 +2612,9 @@ func (c *Client) CreateGpuType(ctx context.Context, body CreateGpuTypeJSONReques return c.Client.Do(req) } -// DeleteGpuType Remove a GPU type from the catalogue +// DeleteGpuType Retire a GPU type from the catalogue // -// Deletes a GPU type from the global catalogue. Restricted to the Runware platform organization. Returns `409` if any live worker configuration still references the code. +// Soft-deletes a GPU type while preserving its code and price history. Restricted to the Runware platform organization. Returns `409` if a worker configuration or GPU pool still references the code. Retiring an already retired code returns `404`. // // Corresponds with DELETE /v1/gpu-types/{gpuTypeId} (the `DeleteGpuType` operationId). func (c *Client) DeleteGpuType(ctx context.Context, gpuTypeId GpuTypeId, reqEditors ...RequestEditorFn) (*http.Response, error) { @@ -2632,7 +2631,7 @@ func (c *Client) DeleteGpuType(ctx context.Context, gpuTypeId GpuTypeId, reqEdit // GetGpuType Get a GPU type from the catalogue // -// Returns a single entry from the global GPU type catalogue. The result is not organisation-specific, but the request still requires authentication. +// Returns an active entry from the global GPU type catalogue. Retired entries return `404`. The result is not organisation-specific, but the request still requires authentication. // // Corresponds with GET /v1/gpu-types/{gpuTypeId} (the `GetGpuType` operationId). func (c *Client) GetGpuType(ctx context.Context, gpuTypeId GpuTypeId, reqEditors ...RequestEditorFn) (*http.Response, error) { @@ -2649,7 +2648,7 @@ func (c *Client) GetGpuType(ctx context.Context, gpuTypeId GpuTypeId, reqEditors // UpdateGpuTypeWithBody Update a GPU type in the catalogue // -// Updates mutable fields of an existing GPU type. Restricted to the Runware platform organization. The catalogue code (`gpuTypeId`) cannot be changed. +// Updates mutable fields of an active GPU type. Restricted to the Runware platform organization. The catalogue code (`gpuTypeId`) cannot be changed; retired entries return `404`. // // Takes any type of body and a specified content type. // @@ -2668,7 +2667,7 @@ func (c *Client) UpdateGpuTypeWithBody(ctx context.Context, gpuTypeId GpuTypeId, // UpdateGpuType Update a GPU type in the catalogue // -// Updates mutable fields of an existing GPU type. Restricted to the Runware platform organization. The catalogue code (`gpuTypeId`) cannot be changed. +// Updates mutable fields of an active GPU type. Restricted to the Runware platform organization. The catalogue code (`gpuTypeId`) cannot be changed; retired entries return `404`. // // Takes a body of the `application/json` content type. // @@ -2687,7 +2686,7 @@ func (c *Client) UpdateGpuType(ctx context.Context, gpuTypeId GpuTypeId, body Up // ListGpuTypePrices List historical and future prices of a GPU type // -// Returns a page of a GPU type's prices, ordered by effectiveFrom. Restricted to the Runware platform organization: the page includes prices that are scheduled but not yet in effect. Customers read the price currently in effect from `GET /v1/gpu-types`. +// Returns a page of a GPU type's prices, ordered by effectiveFrom. Restricted to the Runware platform organization: the page includes retired types and prices that are scheduled but not yet in effect. Customers read the price currently in effect from `GET /v1/gpu-types`. // // Corresponds with GET /v1/gpu-types/{gpuTypeId}/prices (the `ListGpuTypePrices` operationId). func (c *Client) ListGpuTypePrices(ctx context.Context, gpuTypeId GpuTypeId, params *ListGpuTypePricesParams, reqEditors ...RequestEditorFn) (*http.Response, error) { @@ -2704,7 +2703,7 @@ func (c *Client) ListGpuTypePrices(ctx context.Context, gpuTypeId GpuTypeId, par // CreateGpuTypePriceWithBody Schedule a new price for a GPU type // -// Schedules a new price to take effect at `effectiveFrom`. Restricted to the Runware platform organization. `effectiveFrom` must be more than 7 days in the future, so downstream systems and customers get advance notice of the change; a value inside that window returns `422`. Returns `409` if the GPU type already has a price scheduled at that exact instant. +// Schedules a new price to take effect at `effectiveFrom`. Restricted to the Runware platform organization. `effectiveFrom` must normally be more than 7 days in the future. Before a GPU type is admitted or used, a later price can be added inside that window to correct its initial price. This preserves the original row and records the correction as a superseding price. Retired types return `404`; other values inside the notice window return `422`. Returns `409` if the GPU type already has a price scheduled at that exact instant. // // Takes any type of body and a specified content type. // @@ -2723,7 +2722,7 @@ func (c *Client) CreateGpuTypePriceWithBody(ctx context.Context, gpuTypeId GpuTy // CreateGpuTypePrice Schedule a new price for a GPU type // -// Schedules a new price to take effect at `effectiveFrom`. Restricted to the Runware platform organization. `effectiveFrom` must be more than 7 days in the future, so downstream systems and customers get advance notice of the change; a value inside that window returns `422`. Returns `409` if the GPU type already has a price scheduled at that exact instant. +// Schedules a new price to take effect at `effectiveFrom`. Restricted to the Runware platform organization. `effectiveFrom` must normally be more than 7 days in the future. Before a GPU type is admitted or used, a later price can be added inside that window to correct its initial price. This preserves the original row and records the correction as a superseding price. Retired types return `404`; other values inside the notice window return `422`. Returns `409` if the GPU type already has a price scheduled at that exact instant. // // Takes a body of the `application/json` content type. // @@ -2742,7 +2741,7 @@ func (c *Client) CreateGpuTypePrice(ctx context.Context, gpuTypeId GpuTypeId, bo // DeleteGpuTypePrice Remove a scheduled price for a GPU type // -// Deletes a scheduled price. Restricted to the Runware platform organization. Only a price whose effectiveFrom is still more than 7 days in the future can be deleted — once inside that window the price is locked in (about to take effect, or already has) and this returns `409`. +// Deletes a scheduled price. Restricted to the Runware platform organization. Only a price whose effectiveFrom is still more than 7 days in the future can be deleted — once inside that window the price is locked in (about to take effect, or already has) and this returns `409`. Retired GPU types return `404`. // // Corresponds with DELETE /v1/gpu-types/{gpuTypeId}/prices/{priceId} (the `DeleteGpuTypePrice` operationId). func (c *Client) DeleteGpuTypePrice(ctx context.Context, gpuTypeId GpuTypeId, priceId openapi_types.UUID, reqEditors ...RequestEditorFn) (*http.Response, error) { @@ -2759,7 +2758,7 @@ func (c *Client) DeleteGpuTypePrice(ctx context.Context, gpuTypeId GpuTypeId, pr // UpdateGpuTypePriceWithBody Update a scheduled price for a GPU type // -// Partially updates a scheduled price. Restricted to the Runware platform organization. Only a price whose current `effectiveFrom` is still more than 7 days in the future can be edited — once inside that window the price is locked in and this returns `409`. A supplied `effectiveFrom` must itself be more than 7 days in the future, returning `422` otherwise. Returns `409` if it collides with another price already scheduled at that exact instant. +// Partially updates a scheduled price. Restricted to the Runware platform organization. Only a price whose current `effectiveFrom` is still more than 7 days in the future can be edited — once inside that window the price is locked in and this returns `409`. A supplied `effectiveFrom` must itself be more than 7 days in the future, returning `422` otherwise. Retired GPU types return `404`. Returns `409` if the update collides with another price already scheduled at that exact instant. // // Takes any type of body and a specified content type. // @@ -2778,7 +2777,7 @@ func (c *Client) UpdateGpuTypePriceWithBody(ctx context.Context, gpuTypeId GpuTy // UpdateGpuTypePrice Update a scheduled price for a GPU type // -// Partially updates a scheduled price. Restricted to the Runware platform organization. Only a price whose current `effectiveFrom` is still more than 7 days in the future can be edited — once inside that window the price is locked in and this returns `409`. A supplied `effectiveFrom` must itself be more than 7 days in the future, returning `422` otherwise. Returns `409` if it collides with another price already scheduled at that exact instant. +// Partially updates a scheduled price. Restricted to the Runware platform organization. Only a price whose current `effectiveFrom` is still more than 7 days in the future can be edited — once inside that window the price is locked in and this returns `409`. A supplied `effectiveFrom` must itself be more than 7 days in the future, returning `422` otherwise. Retired GPU types return `404`. Returns `409` if the update collides with another price already scheduled at that exact instant. // // Takes a body of the `application/json` content type. // @@ -2852,7 +2851,7 @@ func (c *Client) CreateSecret(ctx context.Context, body CreateSecretJSONRequestB // DeleteSecret Delete a secret // -// Soft-deletes a secret: marks the row `pending_destroy` and bumps revision. This API does not hard-delete the row; a future GC path is expected to remove unattached `pending_destroy` secrets and release the name, but that sweep is not implemented yet. Returns `409` while any deployment still attaches it — cascade-detach is not performed here; detach each holder with `DELETE .../deployments/{id}/secrets/{name}` first. Attach/detach are control-plane records only in this release (they do not roll workers). While the row remains `pending_destroy` the name stays reserved, so create may return `409` even though list no longer shows the secret. Retries on an already-pending name are safe when no attachments remain (`204`); they still return `409` while attached. +// Soft-deletes a secret: marks the row `pending_destroy` and bumps revision. This API does not hard-delete the row; a future GC path is expected to remove unattached `pending_destroy` secrets and release the name, but that sweep is not implemented yet. Returns `409` while any app still attaches it — cascade-detach is not performed here; detach each holder with `DELETE .../apps/{id}/secrets/{name}` first. Attach/detach are control-plane records only in this release (they do not roll workers). While the row remains `pending_destroy` the name stays reserved, so create may return `409` even though list no longer shows the secret. Retries on an already-pending name are safe when no attachments remain (`204`); they still return `409` while attached. // // Corresponds with DELETE /v1/secrets/{secretName} (the `DeleteSecret` operationId). func (c *Client) DeleteSecret(ctx context.Context, secretName SecretName, reqEditors ...RequestEditorFn) (*http.Response, error) { @@ -2918,8 +2917,8 @@ func (c *Client) ListUsageEvents(ctx context.Context, params *ListUsageEventsPar return c.Client.Do(req) } -// NewGetDeploymentSummaryRequest constructs an http.Request for the GetDeploymentSummary method -func NewGetDeploymentSummaryRequest(server string) (*http.Request, error) { +// NewGetAppSummaryRequest constructs an http.Request for the GetAppSummary method +func NewGetAppSummaryRequest(server string) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -2927,7 +2926,7 @@ func NewGetDeploymentSummaryRequest(server string) (*http.Request, error) { return nil, err } - operationPath := fmt.Sprintf("/v1/deployment-summary") + operationPath := fmt.Sprintf("/v1/app-summary") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -2945,8 +2944,8 @@ func NewGetDeploymentSummaryRequest(server string) (*http.Request, error) { return req, nil } -// NewListDeploymentsRequest constructs an http.Request for the ListDeployments method -func NewListDeploymentsRequest(server string, params *ListDeploymentsParams) (*http.Request, error) { +// NewListAppsRequest constructs an http.Request for the ListApps method +func NewListAppsRequest(server string, params *ListAppsParams) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -2954,7 +2953,7 @@ func NewListDeploymentsRequest(server string, params *ListDeploymentsParams) (*h return nil, err } - operationPath := fmt.Sprintf("/v1/deployments") + operationPath := fmt.Sprintf("/v1/apps") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -3059,19 +3058,19 @@ func NewListDeploymentsRequest(server string, params *ListDeploymentsParams) (*h return req, nil } -// NewCreateDeploymentRequest calls the generic CreateDeployment builder with application/json body -func NewCreateDeploymentRequest(server string, body CreateDeploymentJSONRequestBody) (*http.Request, error) { +// NewCreateAppRequest calls the generic CreateApp builder with application/json body +func NewCreateAppRequest(server string, body CreateAppJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewCreateDeploymentRequestWithBody(server, "application/json", bodyReader) + return NewCreateAppRequestWithBody(server, "application/json", bodyReader) } -// NewCreateDeploymentRequestWithBody constructs an http.Request for the CreateDeployment method, with any body, and a specified content type -func NewCreateDeploymentRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { +// NewCreateAppRequestWithBody constructs an http.Request for the CreateApp method, with any body, and a specified content type +func NewCreateAppRequestWithBody(server string, contentType string, body io.Reader) (*http.Request, error) { var err error serverURL, err := url.Parse(server) @@ -3079,7 +3078,7 @@ func NewCreateDeploymentRequestWithBody(server string, contentType string, body return nil, err } - operationPath := fmt.Sprintf("/v1/deployments") + operationPath := fmt.Sprintf("/v1/apps") if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -3099,13 +3098,13 @@ func NewCreateDeploymentRequestWithBody(server string, contentType string, body return req, nil } -// NewDeleteDeploymentRequest constructs an http.Request for the DeleteDeployment method -func NewDeleteDeploymentRequest(server string, deploymentId DeploymentId) (*http.Request, error) { +// NewDeleteAppRequest constructs an http.Request for the DeleteApp method +func NewDeleteAppRequest(server string, appId AppId) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithOptions("simple", false, "deploymentId", deploymentId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "appId", appId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) if err != nil { return nil, err } @@ -3115,7 +3114,7 @@ func NewDeleteDeploymentRequest(server string, deploymentId DeploymentId) (*http return nil, err } - operationPath := fmt.Sprintf("/v1/deployments/%s", pathParam0) + operationPath := fmt.Sprintf("/v1/apps/%s", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -3133,13 +3132,13 @@ func NewDeleteDeploymentRequest(server string, deploymentId DeploymentId) (*http return req, nil } -// NewGetDeploymentRequest constructs an http.Request for the GetDeployment method -func NewGetDeploymentRequest(server string, deploymentId DeploymentId) (*http.Request, error) { +// NewGetAppRequest constructs an http.Request for the GetApp method +func NewGetAppRequest(server string, appId AppId) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithOptions("simple", false, "deploymentId", deploymentId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "appId", appId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) if err != nil { return nil, err } @@ -3149,7 +3148,7 @@ func NewGetDeploymentRequest(server string, deploymentId DeploymentId) (*http.Re return nil, err } - operationPath := fmt.Sprintf("/v1/deployments/%s", pathParam0) + operationPath := fmt.Sprintf("/v1/apps/%s", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -3167,24 +3166,24 @@ func NewGetDeploymentRequest(server string, deploymentId DeploymentId) (*http.Re return req, nil } -// NewUpdateDeploymentRequest calls the generic UpdateDeployment builder with application/json body -func NewUpdateDeploymentRequest(server string, deploymentId DeploymentId, body UpdateDeploymentJSONRequestBody) (*http.Request, error) { +// NewUpdateAppRequest calls the generic UpdateApp builder with application/json body +func NewUpdateAppRequest(server string, appId AppId, body UpdateAppJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewUpdateDeploymentRequestWithBody(server, deploymentId, "application/json", bodyReader) + return NewUpdateAppRequestWithBody(server, appId, "application/json", bodyReader) } -// NewUpdateDeploymentRequestWithBody constructs an http.Request for the UpdateDeployment method, with any body, and a specified content type -func NewUpdateDeploymentRequestWithBody(server string, deploymentId DeploymentId, contentType string, body io.Reader) (*http.Request, error) { +// NewUpdateAppRequestWithBody constructs an http.Request for the UpdateApp method, with any body, and a specified content type +func NewUpdateAppRequestWithBody(server string, appId AppId, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithOptions("simple", false, "deploymentId", deploymentId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "appId", appId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) if err != nil { return nil, err } @@ -3194,7 +3193,7 @@ func NewUpdateDeploymentRequestWithBody(server string, deploymentId DeploymentId return nil, err } - operationPath := fmt.Sprintf("/v1/deployments/%s", pathParam0) + operationPath := fmt.Sprintf("/v1/apps/%s", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -3215,12 +3214,12 @@ func NewUpdateDeploymentRequestWithBody(server string, deploymentId DeploymentId } // NewListBuildsRequest constructs an http.Request for the ListBuilds method -func NewListBuildsRequest(server string, deploymentId DeploymentId, params *ListBuildsParams) (*http.Request, error) { +func NewListBuildsRequest(server string, appId AppId, params *ListBuildsParams) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithOptions("simple", false, "deploymentId", deploymentId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "appId", appId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) if err != nil { return nil, err } @@ -3230,7 +3229,7 @@ func NewListBuildsRequest(server string, deploymentId DeploymentId, params *List return nil, err } - operationPath := fmt.Sprintf("/v1/deployments/%s/builds", pathParam0) + operationPath := fmt.Sprintf("/v1/apps/%s/builds", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -3288,12 +3287,12 @@ func NewListBuildsRequest(server string, deploymentId DeploymentId, params *List } // NewGetBuildRequest constructs an http.Request for the GetBuild method -func NewGetBuildRequest(server string, deploymentId DeploymentId, buildId openapi_types.UUID) (*http.Request, error) { +func NewGetBuildRequest(server string, appId AppId, buildId openapi_types.UUID) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithOptions("simple", false, "deploymentId", deploymentId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "appId", appId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) if err != nil { return nil, err } @@ -3310,7 +3309,7 @@ func NewGetBuildRequest(server string, deploymentId DeploymentId, buildId openap return nil, err } - operationPath := fmt.Sprintf("/v1/deployments/%s/builds/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/v1/apps/%s/builds/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -3329,23 +3328,23 @@ func NewGetBuildRequest(server string, deploymentId DeploymentId, buildId openap } // NewDeployVersionRequest calls the generic DeployVersion builder with application/json body -func NewDeployVersionRequest(server string, deploymentId DeploymentId, body DeployVersionJSONRequestBody) (*http.Request, error) { +func NewDeployVersionRequest(server string, appId AppId, body DeployVersionJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewDeployVersionRequestWithBody(server, deploymentId, "application/json", bodyReader) + return NewDeployVersionRequestWithBody(server, appId, "application/json", bodyReader) } // NewDeployVersionRequestWithBody constructs an http.Request for the DeployVersion method, with any body, and a specified content type -func NewDeployVersionRequestWithBody(server string, deploymentId DeploymentId, contentType string, body io.Reader) (*http.Request, error) { +func NewDeployVersionRequestWithBody(server string, appId AppId, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithOptions("simple", false, "deploymentId", deploymentId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "appId", appId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) if err != nil { return nil, err } @@ -3355,7 +3354,7 @@ func NewDeployVersionRequestWithBody(server string, deploymentId DeploymentId, c return nil, err } - operationPath := fmt.Sprintf("/v1/deployments/%s/deploy", pathParam0) + operationPath := fmt.Sprintf("/v1/apps/%s/deploy", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -3376,12 +3375,12 @@ func NewDeployVersionRequestWithBody(server string, deploymentId DeploymentId, c } // NewListEndpointsRequest constructs an http.Request for the ListEndpoints method -func NewListEndpointsRequest(server string, deploymentId DeploymentId, params *ListEndpointsParams) (*http.Request, error) { +func NewListEndpointsRequest(server string, appId AppId, params *ListEndpointsParams) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithOptions("simple", false, "deploymentId", deploymentId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "appId", appId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) if err != nil { return nil, err } @@ -3391,7 +3390,7 @@ func NewListEndpointsRequest(server string, deploymentId DeploymentId, params *L return nil, err } - operationPath := fmt.Sprintf("/v1/deployments/%s/endpoints", pathParam0) + operationPath := fmt.Sprintf("/v1/apps/%s/endpoints", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -3449,12 +3448,12 @@ func NewListEndpointsRequest(server string, deploymentId DeploymentId, params *L } // NewGetEndpointRequest constructs an http.Request for the GetEndpoint method -func NewGetEndpointRequest(server string, deploymentId DeploymentId, endpointId openapi_types.UUID) (*http.Request, error) { +func NewGetEndpointRequest(server string, appId AppId, endpointId openapi_types.UUID) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithOptions("simple", false, "deploymentId", deploymentId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "appId", appId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) if err != nil { return nil, err } @@ -3471,7 +3470,7 @@ func NewGetEndpointRequest(server string, deploymentId DeploymentId, endpointId return nil, err } - operationPath := fmt.Sprintf("/v1/deployments/%s/endpoints/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/v1/apps/%s/endpoints/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -3489,13 +3488,13 @@ func NewGetEndpointRequest(server string, deploymentId DeploymentId, endpointId return req, nil } -// NewListDeploymentEnvironmentVariablesRequest constructs an http.Request for the ListDeploymentEnvironmentVariables method -func NewListDeploymentEnvironmentVariablesRequest(server string, deploymentId DeploymentId, params *ListDeploymentEnvironmentVariablesParams) (*http.Request, error) { +// NewListAppEnvironmentVariablesRequest constructs an http.Request for the ListAppEnvironmentVariables method +func NewListAppEnvironmentVariablesRequest(server string, appId AppId, params *ListAppEnvironmentVariablesParams) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithOptions("simple", false, "deploymentId", deploymentId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "appId", appId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) if err != nil { return nil, err } @@ -3505,7 +3504,7 @@ func NewListDeploymentEnvironmentVariablesRequest(server string, deploymentId De return nil, err } - operationPath := fmt.Sprintf("/v1/deployments/%s/environment-variables", pathParam0) + operationPath := fmt.Sprintf("/v1/apps/%s/environment-variables", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -3562,13 +3561,13 @@ func NewListDeploymentEnvironmentVariablesRequest(server string, deploymentId De return req, nil } -// NewDeleteDeploymentEnvironmentVariableRequest constructs an http.Request for the DeleteDeploymentEnvironmentVariable method -func NewDeleteDeploymentEnvironmentVariableRequest(server string, deploymentId DeploymentId, variableName EnvironmentVariableName) (*http.Request, error) { +// NewDeleteAppEnvironmentVariableRequest constructs an http.Request for the DeleteAppEnvironmentVariable method +func NewDeleteAppEnvironmentVariableRequest(server string, appId AppId, variableName EnvironmentVariableName) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithOptions("simple", false, "deploymentId", deploymentId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "appId", appId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) if err != nil { return nil, err } @@ -3585,7 +3584,7 @@ func NewDeleteDeploymentEnvironmentVariableRequest(server string, deploymentId D return nil, err } - operationPath := fmt.Sprintf("/v1/deployments/%s/environment-variables/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/v1/apps/%s/environment-variables/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -3603,24 +3602,24 @@ func NewDeleteDeploymentEnvironmentVariableRequest(server string, deploymentId D return req, nil } -// NewUpdateDeploymentEnvironmentVariableRequest calls the generic UpdateDeploymentEnvironmentVariable builder with application/json body -func NewUpdateDeploymentEnvironmentVariableRequest(server string, deploymentId DeploymentId, variableName EnvironmentVariableName, body UpdateDeploymentEnvironmentVariableJSONRequestBody) (*http.Request, error) { +// NewUpdateAppEnvironmentVariableRequest calls the generic UpdateAppEnvironmentVariable builder with application/json body +func NewUpdateAppEnvironmentVariableRequest(server string, appId AppId, variableName EnvironmentVariableName, body UpdateAppEnvironmentVariableJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewUpdateDeploymentEnvironmentVariableRequestWithBody(server, deploymentId, variableName, "application/json", bodyReader) + return NewUpdateAppEnvironmentVariableRequestWithBody(server, appId, variableName, "application/json", bodyReader) } -// NewUpdateDeploymentEnvironmentVariableRequestWithBody constructs an http.Request for the UpdateDeploymentEnvironmentVariable method, with any body, and a specified content type -func NewUpdateDeploymentEnvironmentVariableRequestWithBody(server string, deploymentId DeploymentId, variableName EnvironmentVariableName, contentType string, body io.Reader) (*http.Request, error) { +// NewUpdateAppEnvironmentVariableRequestWithBody constructs an http.Request for the UpdateAppEnvironmentVariable method, with any body, and a specified content type +func NewUpdateAppEnvironmentVariableRequestWithBody(server string, appId AppId, variableName EnvironmentVariableName, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithOptions("simple", false, "deploymentId", deploymentId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "appId", appId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) if err != nil { return nil, err } @@ -3637,7 +3636,7 @@ func NewUpdateDeploymentEnvironmentVariableRequestWithBody(server string, deploy return nil, err } - operationPath := fmt.Sprintf("/v1/deployments/%s/environment-variables/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/v1/apps/%s/environment-variables/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -3657,13 +3656,13 @@ func NewUpdateDeploymentEnvironmentVariableRequestWithBody(server string, deploy return req, nil } -// NewListDeploymentEventsRequest constructs an http.Request for the ListDeploymentEvents method -func NewListDeploymentEventsRequest(server string, deploymentId DeploymentId, params *ListDeploymentEventsParams) (*http.Request, error) { +// NewListAppEventsRequest constructs an http.Request for the ListAppEvents method +func NewListAppEventsRequest(server string, appId AppId, params *ListAppEventsParams) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithOptions("simple", false, "deploymentId", deploymentId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "appId", appId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) if err != nil { return nil, err } @@ -3673,7 +3672,7 @@ func NewListDeploymentEventsRequest(server string, deploymentId DeploymentId, pa return nil, err } - operationPath := fmt.Sprintf("/v1/deployments/%s/events", pathParam0) + operationPath := fmt.Sprintf("/v1/apps/%s/events", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -3742,13 +3741,13 @@ func NewListDeploymentEventsRequest(server string, deploymentId DeploymentId, pa return req, nil } -// NewUnfavouriteDeploymentRequest constructs an http.Request for the UnfavouriteDeployment method -func NewUnfavouriteDeploymentRequest(server string, deploymentId DeploymentId) (*http.Request, error) { +// NewUnfavouriteAppRequest constructs an http.Request for the UnfavouriteApp method +func NewUnfavouriteAppRequest(server string, appId AppId) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithOptions("simple", false, "deploymentId", deploymentId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "appId", appId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) if err != nil { return nil, err } @@ -3758,7 +3757,7 @@ func NewUnfavouriteDeploymentRequest(server string, deploymentId DeploymentId) ( return nil, err } - operationPath := fmt.Sprintf("/v1/deployments/%s/favourite", pathParam0) + operationPath := fmt.Sprintf("/v1/apps/%s/favourite", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -3776,13 +3775,13 @@ func NewUnfavouriteDeploymentRequest(server string, deploymentId DeploymentId) ( return req, nil } -// NewFavouriteDeploymentRequest constructs an http.Request for the FavouriteDeployment method -func NewFavouriteDeploymentRequest(server string, deploymentId DeploymentId) (*http.Request, error) { +// NewFavouriteAppRequest constructs an http.Request for the FavouriteApp method +func NewFavouriteAppRequest(server string, appId AppId) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithOptions("simple", false, "deploymentId", deploymentId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "appId", appId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) if err != nil { return nil, err } @@ -3792,7 +3791,7 @@ func NewFavouriteDeploymentRequest(server string, deploymentId DeploymentId) (*h return nil, err } - operationPath := fmt.Sprintf("/v1/deployments/%s/favourite", pathParam0) + operationPath := fmt.Sprintf("/v1/apps/%s/favourite", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -3811,23 +3810,23 @@ func NewFavouriteDeploymentRequest(server string, deploymentId DeploymentId) (*h } // NewStartAsyncTaskRequest calls the generic StartAsyncTask builder with application/json body -func NewStartAsyncTaskRequest(server string, deploymentId DeploymentId, endpointPath EndpointPath, body StartAsyncTaskJSONRequestBody) (*http.Request, error) { +func NewStartAsyncTaskRequest(server string, appId AppId, endpointPath EndpointPath, body StartAsyncTaskJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewStartAsyncTaskRequestWithBody(server, deploymentId, endpointPath, "application/json", bodyReader) + return NewStartAsyncTaskRequestWithBody(server, appId, endpointPath, "application/json", bodyReader) } // NewStartAsyncTaskRequestWithBody constructs an http.Request for the StartAsyncTask method, with any body, and a specified content type -func NewStartAsyncTaskRequestWithBody(server string, deploymentId DeploymentId, endpointPath EndpointPath, contentType string, body io.Reader) (*http.Request, error) { +func NewStartAsyncTaskRequestWithBody(server string, appId AppId, endpointPath EndpointPath, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithOptions("simple", false, "deploymentId", deploymentId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "appId", appId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) if err != nil { return nil, err } @@ -3844,7 +3843,7 @@ func NewStartAsyncTaskRequestWithBody(server string, deploymentId DeploymentId, return nil, err } - operationPath := fmt.Sprintf("/v1/deployments/%s/invoke-async/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/v1/apps/%s/invoke-async/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -3865,23 +3864,23 @@ func NewStartAsyncTaskRequestWithBody(server string, deploymentId DeploymentId, } // NewStartSyncTaskRequest calls the generic StartSyncTask builder with application/json body -func NewStartSyncTaskRequest(server string, deploymentId DeploymentId, endpointPath EndpointPath, body StartSyncTaskJSONRequestBody) (*http.Request, error) { +func NewStartSyncTaskRequest(server string, appId AppId, endpointPath EndpointPath, body StartSyncTaskJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewStartSyncTaskRequestWithBody(server, deploymentId, endpointPath, "application/json", bodyReader) + return NewStartSyncTaskRequestWithBody(server, appId, endpointPath, "application/json", bodyReader) } // NewStartSyncTaskRequestWithBody constructs an http.Request for the StartSyncTask method, with any body, and a specified content type -func NewStartSyncTaskRequestWithBody(server string, deploymentId DeploymentId, endpointPath EndpointPath, contentType string, body io.Reader) (*http.Request, error) { +func NewStartSyncTaskRequestWithBody(server string, appId AppId, endpointPath EndpointPath, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithOptions("simple", false, "deploymentId", deploymentId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "appId", appId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) if err != nil { return nil, err } @@ -3898,7 +3897,7 @@ func NewStartSyncTaskRequestWithBody(server string, deploymentId DeploymentId, e return nil, err } - operationPath := fmt.Sprintf("/v1/deployments/%s/invoke-sync/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/v1/apps/%s/invoke-sync/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -3918,13 +3917,13 @@ func NewStartSyncTaskRequestWithBody(server string, deploymentId DeploymentId, e return req, nil } -// NewResumeDeploymentRequest constructs an http.Request for the ResumeDeployment method -func NewResumeDeploymentRequest(server string, deploymentId DeploymentId) (*http.Request, error) { +// NewResumeAppRequest constructs an http.Request for the ResumeApp method +func NewResumeAppRequest(server string, appId AppId) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithOptions("simple", false, "deploymentId", deploymentId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "appId", appId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) if err != nil { return nil, err } @@ -3934,7 +3933,7 @@ func NewResumeDeploymentRequest(server string, deploymentId DeploymentId) (*http return nil, err } - operationPath := fmt.Sprintf("/v1/deployments/%s/resume", pathParam0) + operationPath := fmt.Sprintf("/v1/apps/%s/resume", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -3952,13 +3951,13 @@ func NewResumeDeploymentRequest(server string, deploymentId DeploymentId) (*http return req, nil } -// NewListDeploymentSecretsRequest constructs an http.Request for the ListDeploymentSecrets method -func NewListDeploymentSecretsRequest(server string, deploymentId DeploymentId, params *ListDeploymentSecretsParams) (*http.Request, error) { +// NewListAppSecretsRequest constructs an http.Request for the ListAppSecrets method +func NewListAppSecretsRequest(server string, appId AppId, params *ListAppSecretsParams) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithOptions("simple", false, "deploymentId", deploymentId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "appId", appId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) if err != nil { return nil, err } @@ -3968,7 +3967,7 @@ func NewListDeploymentSecretsRequest(server string, deploymentId DeploymentId, p return nil, err } - operationPath := fmt.Sprintf("/v1/deployments/%s/secrets", pathParam0) + operationPath := fmt.Sprintf("/v1/apps/%s/secrets", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -4025,24 +4024,24 @@ func NewListDeploymentSecretsRequest(server string, deploymentId DeploymentId, p return req, nil } -// NewAttachDeploymentSecretRequest calls the generic AttachDeploymentSecret builder with application/json body -func NewAttachDeploymentSecretRequest(server string, deploymentId DeploymentId, body AttachDeploymentSecretJSONRequestBody) (*http.Request, error) { +// NewAttachAppSecretRequest calls the generic AttachAppSecret builder with application/json body +func NewAttachAppSecretRequest(server string, appId AppId, body AttachAppSecretJSONRequestBody) (*http.Request, error) { var bodyReader io.Reader buf, err := json.Marshal(body) if err != nil { return nil, err } bodyReader = bytes.NewReader(buf) - return NewAttachDeploymentSecretRequestWithBody(server, deploymentId, "application/json", bodyReader) + return NewAttachAppSecretRequestWithBody(server, appId, "application/json", bodyReader) } -// NewAttachDeploymentSecretRequestWithBody constructs an http.Request for the AttachDeploymentSecret method, with any body, and a specified content type -func NewAttachDeploymentSecretRequestWithBody(server string, deploymentId DeploymentId, contentType string, body io.Reader) (*http.Request, error) { +// NewAttachAppSecretRequestWithBody constructs an http.Request for the AttachAppSecret method, with any body, and a specified content type +func NewAttachAppSecretRequestWithBody(server string, appId AppId, contentType string, body io.Reader) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithOptions("simple", false, "deploymentId", deploymentId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "appId", appId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) if err != nil { return nil, err } @@ -4052,7 +4051,7 @@ func NewAttachDeploymentSecretRequestWithBody(server string, deploymentId Deploy return nil, err } - operationPath := fmt.Sprintf("/v1/deployments/%s/secrets", pathParam0) + operationPath := fmt.Sprintf("/v1/apps/%s/secrets", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -4072,13 +4071,13 @@ func NewAttachDeploymentSecretRequestWithBody(server string, deploymentId Deploy return req, nil } -// NewDetachDeploymentSecretRequest constructs an http.Request for the DetachDeploymentSecret method -func NewDetachDeploymentSecretRequest(server string, deploymentId DeploymentId, secretName SecretName) (*http.Request, error) { +// NewDetachAppSecretRequest constructs an http.Request for the DetachAppSecret method +func NewDetachAppSecretRequest(server string, appId AppId, secretName SecretName) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithOptions("simple", false, "deploymentId", deploymentId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "appId", appId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) if err != nil { return nil, err } @@ -4095,7 +4094,7 @@ func NewDetachDeploymentSecretRequest(server string, deploymentId DeploymentId, return nil, err } - operationPath := fmt.Sprintf("/v1/deployments/%s/secrets/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/v1/apps/%s/secrets/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -4113,13 +4112,13 @@ func NewDetachDeploymentSecretRequest(server string, deploymentId DeploymentId, return req, nil } -// NewStopDeploymentRequest constructs an http.Request for the StopDeployment method -func NewStopDeploymentRequest(server string, deploymentId DeploymentId) (*http.Request, error) { +// NewStopAppRequest constructs an http.Request for the StopApp method +func NewStopAppRequest(server string, appId AppId) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithOptions("simple", false, "deploymentId", deploymentId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "appId", appId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) if err != nil { return nil, err } @@ -4129,7 +4128,7 @@ func NewStopDeploymentRequest(server string, deploymentId DeploymentId) (*http.R return nil, err } - operationPath := fmt.Sprintf("/v1/deployments/%s/stop", pathParam0) + operationPath := fmt.Sprintf("/v1/apps/%s/stop", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -4148,12 +4147,12 @@ func NewStopDeploymentRequest(server string, deploymentId DeploymentId) (*http.R } // NewListTasksRequest constructs an http.Request for the ListTasks method -func NewListTasksRequest(server string, deploymentId DeploymentId, params *ListTasksParams) (*http.Request, error) { +func NewListTasksRequest(server string, appId AppId, params *ListTasksParams) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithOptions("simple", false, "deploymentId", deploymentId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "appId", appId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) if err != nil { return nil, err } @@ -4163,7 +4162,7 @@ func NewListTasksRequest(server string, deploymentId DeploymentId, params *ListT return nil, err } - operationPath := fmt.Sprintf("/v1/deployments/%s/tasks", pathParam0) + operationPath := fmt.Sprintf("/v1/apps/%s/tasks", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -4233,12 +4232,12 @@ func NewListTasksRequest(server string, deploymentId DeploymentId, params *ListT } // NewGetTaskRequest constructs an http.Request for the GetTask method -func NewGetTaskRequest(server string, deploymentId DeploymentId, taskId string) (*http.Request, error) { +func NewGetTaskRequest(server string, appId AppId, taskId string) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithOptions("simple", false, "deploymentId", deploymentId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "appId", appId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) if err != nil { return nil, err } @@ -4255,7 +4254,7 @@ func NewGetTaskRequest(server string, deploymentId DeploymentId, taskId string) return nil, err } - operationPath := fmt.Sprintf("/v1/deployments/%s/tasks/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/v1/apps/%s/tasks/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -4274,12 +4273,12 @@ func NewGetTaskRequest(server string, deploymentId DeploymentId, taskId string) } // NewListVersionsRequest constructs an http.Request for the ListVersions method -func NewListVersionsRequest(server string, deploymentId DeploymentId, params *ListVersionsParams) (*http.Request, error) { +func NewListVersionsRequest(server string, appId AppId, params *ListVersionsParams) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithOptions("simple", false, "deploymentId", deploymentId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "appId", appId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) if err != nil { return nil, err } @@ -4289,7 +4288,7 @@ func NewListVersionsRequest(server string, deploymentId DeploymentId, params *Li return nil, err } - operationPath := fmt.Sprintf("/v1/deployments/%s/versions", pathParam0) + operationPath := fmt.Sprintf("/v1/apps/%s/versions", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -4347,12 +4346,12 @@ func NewListVersionsRequest(server string, deploymentId DeploymentId, params *Li } // NewGetVersionRequest constructs an http.Request for the GetVersion method -func NewGetVersionRequest(server string, deploymentId DeploymentId, versionNumber int32) (*http.Request, error) { +func NewGetVersionRequest(server string, appId AppId, versionNumber int32) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithOptions("simple", false, "deploymentId", deploymentId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "appId", appId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) if err != nil { return nil, err } @@ -4369,7 +4368,7 @@ func NewGetVersionRequest(server string, deploymentId DeploymentId, versionNumbe return nil, err } - operationPath := fmt.Sprintf("/v1/deployments/%s/versions/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/v1/apps/%s/versions/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -4388,12 +4387,12 @@ func NewGetVersionRequest(server string, deploymentId DeploymentId, versionNumbe } // NewListWorkersRequest constructs an http.Request for the ListWorkers method -func NewListWorkersRequest(server string, deploymentId DeploymentId, params *ListWorkersParams) (*http.Request, error) { +func NewListWorkersRequest(server string, appId AppId, params *ListWorkersParams) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithOptions("simple", false, "deploymentId", deploymentId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "appId", appId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) if err != nil { return nil, err } @@ -4403,7 +4402,7 @@ func NewListWorkersRequest(server string, deploymentId DeploymentId, params *Lis return nil, err } - operationPath := fmt.Sprintf("/v1/deployments/%s/workers", pathParam0) + operationPath := fmt.Sprintf("/v1/apps/%s/workers", pathParam0) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -4473,12 +4472,12 @@ func NewListWorkersRequest(server string, deploymentId DeploymentId, params *Lis } // NewGetWorkerRequest constructs an http.Request for the GetWorker method -func NewGetWorkerRequest(server string, deploymentId DeploymentId, workerId WorkerId) (*http.Request, error) { +func NewGetWorkerRequest(server string, appId AppId, workerId WorkerId) (*http.Request, error) { var err error var pathParam0 string - pathParam0, err = runtime.StyleParamWithOptions("simple", false, "deploymentId", deploymentId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) + pathParam0, err = runtime.StyleParamWithOptions("simple", false, "appId", appId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationPath, Type: "string", Format: ""}) if err != nil { return nil, err } @@ -4495,7 +4494,7 @@ func NewGetWorkerRequest(server string, deploymentId DeploymentId, workerId Work return nil, err } - operationPath := fmt.Sprintf("/v1/deployments/%s/workers/%s", pathParam0, pathParam1) + operationPath := fmt.Sprintf("/v1/apps/%s/workers/%s", pathParam0, pathParam1) if operationPath[0] == '/' { operationPath = "." + operationPath } @@ -5149,9 +5148,9 @@ func NewListUsageEventsRequest(server string, params *ListUsageEventsParams) (*h } - if params.DeploymentId != nil { + if params.AppId != nil { - if queryFrag, err := runtime.StyleParamWithOptions("form", true, "deploymentId", *params.DeploymentId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { + if queryFrag, err := runtime.StyleParamWithOptions("form", true, "appId", *params.AppId, runtime.StyleParamOptions{ParamLocation: runtime.ParamLocationQuery, Type: "string", Format: ""}); err != nil { return nil, err } else { for _, qp := range strings.Split(queryFrag, "&") { @@ -5243,37 +5242,37 @@ func WithBaseURL(baseURL string) ClientOption { // ClientWithResponsesInterface is the interface specification for the client with responses above. type ClientWithResponsesInterface interface { - // GetDeploymentSummaryWithResponse Deployment summary metrics for the authenticated organisation + // GetAppSummaryWithResponse App summary metrics for the authenticated organisation // - // Aggregate dashboard metrics across all deployments owned by the authenticated organisation. Metrics whose backing system is not yet available are omitted from the response rather than reported as zero. + // Aggregate dashboard metrics across all apps owned by the authenticated organisation. Metrics whose backing system is not yet available are omitted from the response rather than reported as zero. // // Returns a wrapper object for the known response body format(s). // - // Corresponds with GET /v1/deployment-summary (the `GetDeploymentSummary` operationId). - GetDeploymentSummaryWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetDeploymentSummaryResponse, error) + // Corresponds with GET /v1/app-summary (the `GetAppSummary` operationId). + GetAppSummaryWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetAppSummaryResponse, error) - // ListDeploymentsWithResponse List deployments + // ListAppsWithResponse List apps // - // Returns a page of the organisation's deployments. Filters combine with AND; soft-deleted deployments are excluded unless `status=deleted` is requested explicitly. + // Returns a page of the organisation's apps. Filters combine with AND; soft-deleted apps are excluded unless `status=deleted` is requested explicitly. // // A `cursor` is only valid for the `sort` and filters it was issued under — reusing one across a different ordering or filter set returns `400`. // // Returns a wrapper object for the known response body format(s). // - // Corresponds with GET /v1/deployments (the `ListDeployments` operationId). - ListDeploymentsWithResponse(ctx context.Context, params *ListDeploymentsParams, reqEditors ...RequestEditorFn) (*ListDeploymentsResponse, error) + // Corresponds with GET /v1/apps (the `ListApps` operationId). + ListAppsWithResponse(ctx context.Context, params *ListAppsParams, reqEditors ...RequestEditorFn) (*ListAppsResponse, error) - // CreateDeploymentWithBodyWithResponse Create a deployment + // CreateAppWithBodyWithResponse Create an app // - // Creates a deployment together with its worker configuration, environment variables and endpoints, and records version `1` — the immutable description of what to deploy. The deployment starts in `initializing`, and what happens next depends on the deployment source type: + // Creates an app together with its worker configuration, environment variables and endpoints, and records version `1` — the immutable description of what to deploy. The app starts in `initializing`, and what happens next depends on the app source type: // // - `code` source: the codebase is submitted to the build pipeline; once the image is built - // and workers become healthy the deployment transitions to `active` and `activeVersionId` - // points at that version. If the build, validation, or rollout fails the deployment is + // and workers become healthy the app transitions to `active` and `activeVersionId` + // points at that version. If the build, validation, or rollout fails the app is // marked `failed`. // // - `container` source: no build step, so the version carries no `buildId`. No worker runs - // from a container source yet, so the deployment stays `initializing` and does not serve + // from a container source yet, so the app stays `initializing` and does not serve // inference — poll `active` only for a `code` source. // // @@ -5283,20 +5282,20 @@ type ClientWithResponsesInterface interface { // // Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s). // - // Corresponds with POST /v1/deployments (the `CreateDeployment` operationId). - CreateDeploymentWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateDeploymentResponse, error) + // Corresponds with POST /v1/apps (the `CreateApp` operationId). + CreateAppWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAppResponse, error) - // CreateDeploymentWithResponse Create a deployment + // CreateAppWithResponse Create an app // - // Creates a deployment together with its worker configuration, environment variables and endpoints, and records version `1` — the immutable description of what to deploy. The deployment starts in `initializing`, and what happens next depends on the deployment source type: + // Creates an app together with its worker configuration, environment variables and endpoints, and records version `1` — the immutable description of what to deploy. The app starts in `initializing`, and what happens next depends on the app source type: // // - `code` source: the codebase is submitted to the build pipeline; once the image is built - // and workers become healthy the deployment transitions to `active` and `activeVersionId` - // points at that version. If the build, validation, or rollout fails the deployment is + // and workers become healthy the app transitions to `active` and `activeVersionId` + // points at that version. If the build, validation, or rollout fails the app is // marked `failed`. // // - `container` source: no build step, so the version carries no `buildId`. No worker runs - // from a container source yet, so the deployment stays `initializing` and does not serve + // from a container source yet, so the app stays `initializing` and does not serve // inference — poll `active` only for a `code` source. // // @@ -5306,39 +5305,39 @@ type ClientWithResponsesInterface interface { // // Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s). // - // Corresponds with POST /v1/deployments (the `CreateDeployment` operationId). - CreateDeploymentWithResponse(ctx context.Context, body CreateDeploymentJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateDeploymentResponse, error) + // Corresponds with POST /v1/apps (the `CreateApp` operationId). + CreateAppWithResponse(ctx context.Context, body CreateAppJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAppResponse, error) - // DeleteDeploymentWithResponse Delete a deployment + // DeleteAppWithResponse Delete an app // - // Soft delete. Sets `status = deleting` and returns `202` once that intent is persisted. Router removal, cancelling in-progress builds, and worker drain (`draining → stopping → stopped`) are performed asynchronously by the deployer/Scaler; `status` becomes `deleted` once all workers stop. All rows are retained for billing finalisation, audit, and usage history. Idempotent if the deployment is already `deleting`. + // Soft delete. Sets `status = deleting` and returns `202` once that intent is persisted. Router removal, cancelling in-progress builds, and worker drain (`draining → stopping → stopped`) are performed asynchronously by the deployer/Scaler; `status` becomes `deleted` once all workers stop. All rows are retained for billing finalisation, audit, and usage history. Idempotent if the app is already `deleting`. // // Returns a wrapper object for the known response body format(s). // - // Corresponds with DELETE /v1/deployments/{deploymentId} (the `DeleteDeployment` operationId). - DeleteDeploymentWithResponse(ctx context.Context, deploymentId DeploymentId, reqEditors ...RequestEditorFn) (*DeleteDeploymentResponse, error) + // Corresponds with DELETE /v1/apps/{appId} (the `DeleteApp` operationId). + DeleteAppWithResponse(ctx context.Context, appId AppId, reqEditors ...RequestEditorFn) (*DeleteAppResponse, error) - // GetDeploymentWithResponse Get a deployment + // GetAppWithResponse Get an app // // Returns a wrapper object for the known response body format(s). // - // Corresponds with GET /v1/deployments/{deploymentId} (the `GetDeployment` operationId). - GetDeploymentWithResponse(ctx context.Context, deploymentId DeploymentId, reqEditors ...RequestEditorFn) (*GetDeploymentResponse, error) + // Corresponds with GET /v1/apps/{appId} (the `GetApp` operationId). + GetAppWithResponse(ctx context.Context, appId AppId, reqEditors ...RequestEditorFn) (*GetAppResponse, error) - // UpdateDeploymentWithBodyWithResponse Update a deployment + // UpdateAppWithBodyWithResponse Update an app // - // Patches one or more aspects of a deployment in place. All fields are optional; omitted fields are left unchanged. Valid in any non-`deleted` status, including `stopped` (changes apply on `resume`). Lifecycle transitions use the dedicated `deploy`, `stop`, `resume`, and `delete` operations. + // Patches one or more aspects of an app in place. All fields are optional; omitted fields are left unchanged. Valid in any non-`deleted` status, including `stopped` (changes apply on `resume`). Lifecycle transitions use the dedicated `deploy`, `stop`, `resume`, and `delete` operations. // - // **Currently persisted:** `deploymentName` and `configuration` only. Supplying `deploymentSource`, `secrets`, `environmentVariables`, or `endpoints` returns `422` (bulk env-var replace is not wired — use the dedicated `/environment-variables` endpoints for individual keys). + // **Currently persisted:** `appName` and `configuration` only. Supplying `appSource`, `secrets`, `environmentVariables`, or `endpoints` returns `422` (bulk env-var replace is not wired — use the dedicated `/environment-variables` endpoints for individual keys). // // Target behaviour (once fully wired): // - `configuration`: applied on the next Scaler cycle; triggers a rollout so workers - // restart with the new configuration. If the rollout fails, the deployment remains on + // restart with the new configuration. If the rollout fails, the app remains on // the previous configuration. // - // - `deploymentSource`: triggers a build (for `code` sources) or image validation (for `container` + // - `appSource`: triggers a build (for `code` sources) or image validation (for `container` // sources); on success the new version is deployed automatically. If the build or - // validation fails, the deployment remains on the previous version. + // validation fails, the app remains on the previous version. // // - `secrets` / `environmentVariables` / `endpoints`: the supplied array **replaces** the // current set — any item absent from the request is deleted. Endpoints take effect @@ -5347,23 +5346,23 @@ type ClientWithResponsesInterface interface { // // Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s). // - // Corresponds with PATCH /v1/deployments/{deploymentId} (the `UpdateDeployment` operationId). - UpdateDeploymentWithBodyWithResponse(ctx context.Context, deploymentId DeploymentId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateDeploymentResponse, error) + // Corresponds with PATCH /v1/apps/{appId} (the `UpdateApp` operationId). + UpdateAppWithBodyWithResponse(ctx context.Context, appId AppId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateAppResponse, error) - // UpdateDeploymentWithResponse Update a deployment + // UpdateAppWithResponse Update an app // - // Patches one or more aspects of a deployment in place. All fields are optional; omitted fields are left unchanged. Valid in any non-`deleted` status, including `stopped` (changes apply on `resume`). Lifecycle transitions use the dedicated `deploy`, `stop`, `resume`, and `delete` operations. + // Patches one or more aspects of an app in place. All fields are optional; omitted fields are left unchanged. Valid in any non-`deleted` status, including `stopped` (changes apply on `resume`). Lifecycle transitions use the dedicated `deploy`, `stop`, `resume`, and `delete` operations. // - // **Currently persisted:** `deploymentName` and `configuration` only. Supplying `deploymentSource`, `secrets`, `environmentVariables`, or `endpoints` returns `422` (bulk env-var replace is not wired — use the dedicated `/environment-variables` endpoints for individual keys). + // **Currently persisted:** `appName` and `configuration` only. Supplying `appSource`, `secrets`, `environmentVariables`, or `endpoints` returns `422` (bulk env-var replace is not wired — use the dedicated `/environment-variables` endpoints for individual keys). // // Target behaviour (once fully wired): // - `configuration`: applied on the next Scaler cycle; triggers a rollout so workers - // restart with the new configuration. If the rollout fails, the deployment remains on + // restart with the new configuration. If the rollout fails, the app remains on // the previous configuration. // - // - `deploymentSource`: triggers a build (for `code` sources) or image validation (for `container` + // - `appSource`: triggers a build (for `code` sources) or image validation (for `container` // sources); on success the new version is deployed automatically. If the build or - // validation fails, the deployment remains on the previous version. + // validation fails, the app remains on the previous version. // // - `secrets` / `environmentVariables` / `endpoints`: the supplied array **replaces** the // current set — any item absent from the request is deleted. Endpoints take effect @@ -5372,275 +5371,275 @@ type ClientWithResponsesInterface interface { // // Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s). // - // Corresponds with PATCH /v1/deployments/{deploymentId} (the `UpdateDeployment` operationId). - UpdateDeploymentWithResponse(ctx context.Context, deploymentId DeploymentId, body UpdateDeploymentJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateDeploymentResponse, error) + // Corresponds with PATCH /v1/apps/{appId} (the `UpdateApp` operationId). + UpdateAppWithResponse(ctx context.Context, appId AppId, body UpdateAppJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateAppResponse, error) // ListBuildsWithResponse List builds // // Returns a wrapper object for the known response body format(s). // - // Corresponds with GET /v1/deployments/{deploymentId}/builds (the `ListBuilds` operationId). - ListBuildsWithResponse(ctx context.Context, deploymentId DeploymentId, params *ListBuildsParams, reqEditors ...RequestEditorFn) (*ListBuildsResponse, error) + // Corresponds with GET /v1/apps/{appId}/builds (the `ListBuilds` operationId). + ListBuildsWithResponse(ctx context.Context, appId AppId, params *ListBuildsParams, reqEditors ...RequestEditorFn) (*ListBuildsResponse, error) // GetBuildWithResponse Get a build // // Returns a wrapper object for the known response body format(s). // - // Corresponds with GET /v1/deployments/{deploymentId}/builds/{buildId} (the `GetBuild` operationId). - GetBuildWithResponse(ctx context.Context, deploymentId DeploymentId, buildId openapi_types.UUID, reqEditors ...RequestEditorFn) (*GetBuildResponse, error) + // Corresponds with GET /v1/apps/{appId}/builds/{buildId} (the `GetBuild` operationId). + GetBuildWithResponse(ctx context.Context, appId AppId, buildId openapi_types.UUID, reqEditors ...RequestEditorFn) (*GetBuildResponse, error) // DeployVersionWithBodyWithResponse Deploy a version // // Activates a `ready` version by number, setting `activeVersionId` and returning `202` once that intent is persisted. Worker rollout, routing switch, and cancelling in-progress builds (`failed` with `error: "superseded"`) are performed asynchronously by the deployer/Scaler. Permitted in any addressable status, including `initializing` and `failed`. // To roll back, supply an older `versionNumber` — the operation is identical to a forward deploy. No new version is created and no rebuild happens: the version's existing image is re-applied. Re-deploying the currently active version is permitted and re-applies it. - // A deploy to a `stopped` or `stopping` deployment records the version and rolls no workload, because no workers are running: the `202` does not imply a rollout there. The recorded version is the one applied when the deployment resumes. - // If the roll of a live deployment fails, `activeVersionId` is restored to the version that kept serving, so the field keeps naming the running image. - // **Rollout** (deployer/Scaler): the platform starts workers on the target version, waits for at least one to become healthy, switches task routing to the new version, then drains old-version workers gracefully. Old workers are given a fixed, platform-managed grace period to finish in-flight tasks before being force-terminated. If new workers fail to become healthy, old workers are not drained and the deployment continues on the previous version. - // Errors: - Deploy to a `deleting` deployment returns `409 Conflict` - `versionNumber` not found or not `ready` returns `409 Conflict` - A `container`-source version returns `409 Conflict` until container deployments are supported - Deploy to a non-existent or `deleted` deployment returns `404 Not Found` + // A deploy to a `stopped` or `stopping` app records the version and rolls no workload, because no workers are running: the `202` does not imply a rollout there. The recorded version is the one applied when the app resumes. + // If the roll of a live app fails, `activeVersionId` is restored to the version that kept serving, so the field keeps naming the running image. + // **Rollout** (deployer/Scaler): the platform starts workers on the target version, waits for at least one to become healthy, switches task routing to the new version, then drains old-version workers gracefully. Old workers are given a fixed, platform-managed grace period to finish in-flight tasks before being force-terminated. If new workers fail to become healthy, old workers are not drained and the app continues on the previous version. + // Errors: - Deploy to a `deleting` app returns `409 Conflict` - `versionNumber` not found or not `ready` returns `409 Conflict` - A `container`-source version returns `409 Conflict` until container apps are supported - Deploy to a non-existent or `deleted` app returns `404 Not Found` // // Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s). // - // Corresponds with POST /v1/deployments/{deploymentId}/deploy (the `DeployVersion` operationId). - DeployVersionWithBodyWithResponse(ctx context.Context, deploymentId DeploymentId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeployVersionResponse, error) + // Corresponds with POST /v1/apps/{appId}/deploy (the `DeployVersion` operationId). + DeployVersionWithBodyWithResponse(ctx context.Context, appId AppId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeployVersionResponse, error) // DeployVersionWithResponse Deploy a version // // Activates a `ready` version by number, setting `activeVersionId` and returning `202` once that intent is persisted. Worker rollout, routing switch, and cancelling in-progress builds (`failed` with `error: "superseded"`) are performed asynchronously by the deployer/Scaler. Permitted in any addressable status, including `initializing` and `failed`. // To roll back, supply an older `versionNumber` — the operation is identical to a forward deploy. No new version is created and no rebuild happens: the version's existing image is re-applied. Re-deploying the currently active version is permitted and re-applies it. - // A deploy to a `stopped` or `stopping` deployment records the version and rolls no workload, because no workers are running: the `202` does not imply a rollout there. The recorded version is the one applied when the deployment resumes. - // If the roll of a live deployment fails, `activeVersionId` is restored to the version that kept serving, so the field keeps naming the running image. - // **Rollout** (deployer/Scaler): the platform starts workers on the target version, waits for at least one to become healthy, switches task routing to the new version, then drains old-version workers gracefully. Old workers are given a fixed, platform-managed grace period to finish in-flight tasks before being force-terminated. If new workers fail to become healthy, old workers are not drained and the deployment continues on the previous version. - // Errors: - Deploy to a `deleting` deployment returns `409 Conflict` - `versionNumber` not found or not `ready` returns `409 Conflict` - A `container`-source version returns `409 Conflict` until container deployments are supported - Deploy to a non-existent or `deleted` deployment returns `404 Not Found` + // A deploy to a `stopped` or `stopping` app records the version and rolls no workload, because no workers are running: the `202` does not imply a rollout there. The recorded version is the one applied when the app resumes. + // If the roll of a live app fails, `activeVersionId` is restored to the version that kept serving, so the field keeps naming the running image. + // **Rollout** (deployer/Scaler): the platform starts workers on the target version, waits for at least one to become healthy, switches task routing to the new version, then drains old-version workers gracefully. Old workers are given a fixed, platform-managed grace period to finish in-flight tasks before being force-terminated. If new workers fail to become healthy, old workers are not drained and the app continues on the previous version. + // Errors: - Deploy to a `deleting` app returns `409 Conflict` - `versionNumber` not found or not `ready` returns `409 Conflict` - A `container`-source version returns `409 Conflict` until container apps are supported - Deploy to a non-existent or `deleted` app returns `404 Not Found` // // Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s). // - // Corresponds with POST /v1/deployments/{deploymentId}/deploy (the `DeployVersion` operationId). - DeployVersionWithResponse(ctx context.Context, deploymentId DeploymentId, body DeployVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*DeployVersionResponse, error) + // Corresponds with POST /v1/apps/{appId}/deploy (the `DeployVersion` operationId). + DeployVersionWithResponse(ctx context.Context, appId AppId, body DeployVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*DeployVersionResponse, error) // ListEndpointsWithResponse List endpoints // // Returns a wrapper object for the known response body format(s). // - // Corresponds with GET /v1/deployments/{deploymentId}/endpoints (the `ListEndpoints` operationId). - ListEndpointsWithResponse(ctx context.Context, deploymentId DeploymentId, params *ListEndpointsParams, reqEditors ...RequestEditorFn) (*ListEndpointsResponse, error) + // Corresponds with GET /v1/apps/{appId}/endpoints (the `ListEndpoints` operationId). + ListEndpointsWithResponse(ctx context.Context, appId AppId, params *ListEndpointsParams, reqEditors ...RequestEditorFn) (*ListEndpointsResponse, error) // GetEndpointWithResponse Get an endpoint // // Returns a wrapper object for the known response body format(s). // - // Corresponds with GET /v1/deployments/{deploymentId}/endpoints/{endpointId} (the `GetEndpoint` operationId). - GetEndpointWithResponse(ctx context.Context, deploymentId DeploymentId, endpointId openapi_types.UUID, reqEditors ...RequestEditorFn) (*GetEndpointResponse, error) + // Corresponds with GET /v1/apps/{appId}/endpoints/{endpointId} (the `GetEndpoint` operationId). + GetEndpointWithResponse(ctx context.Context, appId AppId, endpointId openapi_types.UUID, reqEditors ...RequestEditorFn) (*GetEndpointResponse, error) - // ListDeploymentEnvironmentVariablesWithResponse List deployment environment variables + // ListAppEnvironmentVariablesWithResponse List app environment variables // // Returns a wrapper object for the known response body format(s). // - // Corresponds with GET /v1/deployments/{deploymentId}/environment-variables (the `ListDeploymentEnvironmentVariables` operationId). - ListDeploymentEnvironmentVariablesWithResponse(ctx context.Context, deploymentId DeploymentId, params *ListDeploymentEnvironmentVariablesParams, reqEditors ...RequestEditorFn) (*ListDeploymentEnvironmentVariablesResponse, error) + // Corresponds with GET /v1/apps/{appId}/environment-variables (the `ListAppEnvironmentVariables` operationId). + ListAppEnvironmentVariablesWithResponse(ctx context.Context, appId AppId, params *ListAppEnvironmentVariablesParams, reqEditors ...RequestEditorFn) (*ListAppEnvironmentVariablesResponse, error) - // DeleteDeploymentEnvironmentVariableWithResponse Delete a deployment environment variable + // DeleteAppEnvironmentVariableWithResponse Delete an app environment variable // // Returns a wrapper object for the known response body format(s). // - // Corresponds with DELETE /v1/deployments/{deploymentId}/environment-variables/{variableName} (the `DeleteDeploymentEnvironmentVariable` operationId). - DeleteDeploymentEnvironmentVariableWithResponse(ctx context.Context, deploymentId DeploymentId, variableName EnvironmentVariableName, reqEditors ...RequestEditorFn) (*DeleteDeploymentEnvironmentVariableResponse, error) + // Corresponds with DELETE /v1/apps/{appId}/environment-variables/{variableName} (the `DeleteAppEnvironmentVariable` operationId). + DeleteAppEnvironmentVariableWithResponse(ctx context.Context, appId AppId, variableName EnvironmentVariableName, reqEditors ...RequestEditorFn) (*DeleteAppEnvironmentVariableResponse, error) - // UpdateDeploymentEnvironmentVariableWithBodyWithResponse Update a deployment environment variable + // UpdateAppEnvironmentVariableWithBodyWithResponse Update an app environment variable // // Sets one environment variable, creating it if absent. Names the platform sets on the serving container itself are rejected with `422`, as they are on create. // - // A deployment holds at most 100 environment bindings in total — plain variables plus attached secrets — the same combined ceiling `DeploymentCreate.environmentVariables` declares (create rejects secrets in-request; attach grows the set later). Overwriting an existing variable is always allowed; adding one past the ceiling returns `422`. + // An app holds at most 100 environment bindings in total — plain variables plus attached secrets — the same combined ceiling `AppCreate.environmentVariables` declares (create rejects secrets in-request; attach grows the set later). Overwriting an existing variable is always allowed; adding one past the ceiling returns `422`. // - // The name must not collide with a secret already attached to this deployment (the secret's injected env var name). Secrets and plain env vars share the pod environment; a duplicate would be resolved last-wins by kubelet with no error, so the server rejects it with `422`. The reverse check applies on attach. + // The name must not collide with a secret already attached to this app (the secret's injected env var name). Secrets and plain env vars share the pod environment; a duplicate would be resolved last-wins by kubelet with no error, so the server rejects it with `422`. The reverse check applies on attach. // // Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s). // - // Corresponds with PUT /v1/deployments/{deploymentId}/environment-variables/{variableName} (the `UpdateDeploymentEnvironmentVariable` operationId). - UpdateDeploymentEnvironmentVariableWithBodyWithResponse(ctx context.Context, deploymentId DeploymentId, variableName EnvironmentVariableName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateDeploymentEnvironmentVariableResponse, error) + // Corresponds with PUT /v1/apps/{appId}/environment-variables/{variableName} (the `UpdateAppEnvironmentVariable` operationId). + UpdateAppEnvironmentVariableWithBodyWithResponse(ctx context.Context, appId AppId, variableName EnvironmentVariableName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateAppEnvironmentVariableResponse, error) - // UpdateDeploymentEnvironmentVariableWithResponse Update a deployment environment variable + // UpdateAppEnvironmentVariableWithResponse Update an app environment variable // // Sets one environment variable, creating it if absent. Names the platform sets on the serving container itself are rejected with `422`, as they are on create. // - // A deployment holds at most 100 environment bindings in total — plain variables plus attached secrets — the same combined ceiling `DeploymentCreate.environmentVariables` declares (create rejects secrets in-request; attach grows the set later). Overwriting an existing variable is always allowed; adding one past the ceiling returns `422`. + // An app holds at most 100 environment bindings in total — plain variables plus attached secrets — the same combined ceiling `AppCreate.environmentVariables` declares (create rejects secrets in-request; attach grows the set later). Overwriting an existing variable is always allowed; adding one past the ceiling returns `422`. // - // The name must not collide with a secret already attached to this deployment (the secret's injected env var name). Secrets and plain env vars share the pod environment; a duplicate would be resolved last-wins by kubelet with no error, so the server rejects it with `422`. The reverse check applies on attach. + // The name must not collide with a secret already attached to this app (the secret's injected env var name). Secrets and plain env vars share the pod environment; a duplicate would be resolved last-wins by kubelet with no error, so the server rejects it with `422`. The reverse check applies on attach. // // Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s). // - // Corresponds with PUT /v1/deployments/{deploymentId}/environment-variables/{variableName} (the `UpdateDeploymentEnvironmentVariable` operationId). - UpdateDeploymentEnvironmentVariableWithResponse(ctx context.Context, deploymentId DeploymentId, variableName EnvironmentVariableName, body UpdateDeploymentEnvironmentVariableJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateDeploymentEnvironmentVariableResponse, error) + // Corresponds with PUT /v1/apps/{appId}/environment-variables/{variableName} (the `UpdateAppEnvironmentVariable` operationId). + UpdateAppEnvironmentVariableWithResponse(ctx context.Context, appId AppId, variableName EnvironmentVariableName, body UpdateAppEnvironmentVariableJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateAppEnvironmentVariableResponse, error) - // ListDeploymentEventsWithResponse List deployment events + // ListAppEventsWithResponse List app events // // Returns a wrapper object for the known response body format(s). // - // Corresponds with GET /v1/deployments/{deploymentId}/events (the `ListDeploymentEvents` operationId). - ListDeploymentEventsWithResponse(ctx context.Context, deploymentId DeploymentId, params *ListDeploymentEventsParams, reqEditors ...RequestEditorFn) (*ListDeploymentEventsResponse, error) + // Corresponds with GET /v1/apps/{appId}/events (the `ListAppEvents` operationId). + ListAppEventsWithResponse(ctx context.Context, appId AppId, params *ListAppEventsParams, reqEditors ...RequestEditorFn) (*ListAppEventsResponse, error) - // UnfavouriteDeploymentWithResponse Unfavourite a deployment + // UnfavouriteAppWithResponse Unfavourite an app // - // Removes the organisation favourite pin from the deployment. Idempotent: unfavouriting a deployment that is not favourited succeeds and returns the deployment with `isFavourite: false`. Valid in any status including `deleting` and `deleted` — unpinning is not a deployment lifecycle mutation. Missing deployments return `404`. + // Removes the organisation favourite pin from the app. Idempotent: unfavouriting an app that is not favourited succeeds and returns the app with `isFavourite: false`. Valid in any status including `deleting` and `deleted` — unpinning is not an app lifecycle mutation. Missing apps return `404`. // // Returns a wrapper object for the known response body format(s). // - // Corresponds with DELETE /v1/deployments/{deploymentId}/favourite (the `UnfavouriteDeployment` operationId). - UnfavouriteDeploymentWithResponse(ctx context.Context, deploymentId DeploymentId, reqEditors ...RequestEditorFn) (*UnfavouriteDeploymentResponse, error) + // Corresponds with DELETE /v1/apps/{appId}/favourite (the `UnfavouriteApp` operationId). + UnfavouriteAppWithResponse(ctx context.Context, appId AppId, reqEditors ...RequestEditorFn) (*UnfavouriteAppResponse, error) - // FavouriteDeploymentWithResponse Favourite a deployment + // FavouriteAppWithResponse Favourite an app // - // Pins the deployment as a favourite for the authenticated organisation so the console can surface it in a Favourites section. Idempotent: favouriting an already-favourited deployment succeeds and returns the deployment with `isFavourite: true`. Deployments in `deleting` or `deleted` status cannot be favourited (`404`). Soft-delete clears any existing pin when status becomes `deleting`. + // Pins the app as a favourite for the authenticated organisation so the console can surface it in a Favourites section. Idempotent: favouriting an already-favourited app succeeds and returns the app with `isFavourite: true`. Apps in `deleting` or `deleted` status cannot be favourited (`404`). Soft-delete clears any existing pin when status becomes `deleting`. // // Returns a wrapper object for the known response body format(s). // - // Corresponds with PUT /v1/deployments/{deploymentId}/favourite (the `FavouriteDeployment` operationId). - FavouriteDeploymentWithResponse(ctx context.Context, deploymentId DeploymentId, reqEditors ...RequestEditorFn) (*FavouriteDeploymentResponse, error) + // Corresponds with PUT /v1/apps/{appId}/favourite (the `FavouriteApp` operationId). + FavouriteAppWithResponse(ctx context.Context, appId AppId, reqEditors ...RequestEditorFn) (*FavouriteAppResponse, error) // StartAsyncTaskWithBodyWithResponse Start a new async task // - // Starts a new async task on `deploymentId`, routing the request body payload to an available worker. The task runs asynchronously and the response is `202`; poll `GET /v1/deployments/{deploymentId}/tasks/{taskId}` for completion. Deployments in `initializing`, `active`, or `stopping` accept invocation. `stopped`, `deleting`, and `failed` return `409 Conflict`; unknown or deleted deployments return `404 Not Found`. + // Starts a new async task on `appId`, routing the request body payload to an available worker. The task runs asynchronously and the response is `202`; poll `GET /v1/apps/{appId}/tasks/{taskId}` for completion. Apps in `initializing`, `active`, or `stopping` accept invocation. `stopped`, `deleting`, and `failed` return `409 Conflict`; unknown or deleted apps return `404 Not Found`. // // Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s). // - // Corresponds with POST /v1/deployments/{deploymentId}/invoke-async/{endpointPath} (the `StartAsyncTask` operationId). - StartAsyncTaskWithBodyWithResponse(ctx context.Context, deploymentId DeploymentId, endpointPath EndpointPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*StartAsyncTaskResponse, error) + // Corresponds with POST /v1/apps/{appId}/invoke-async/{endpointPath} (the `StartAsyncTask` operationId). + StartAsyncTaskWithBodyWithResponse(ctx context.Context, appId AppId, endpointPath EndpointPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*StartAsyncTaskResponse, error) // StartAsyncTaskWithResponse Start a new async task // - // Starts a new async task on `deploymentId`, routing the request body payload to an available worker. The task runs asynchronously and the response is `202`; poll `GET /v1/deployments/{deploymentId}/tasks/{taskId}` for completion. Deployments in `initializing`, `active`, or `stopping` accept invocation. `stopped`, `deleting`, and `failed` return `409 Conflict`; unknown or deleted deployments return `404 Not Found`. + // Starts a new async task on `appId`, routing the request body payload to an available worker. The task runs asynchronously and the response is `202`; poll `GET /v1/apps/{appId}/tasks/{taskId}` for completion. Apps in `initializing`, `active`, or `stopping` accept invocation. `stopped`, `deleting`, and `failed` return `409 Conflict`; unknown or deleted apps return `404 Not Found`. // // Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s). // - // Corresponds with POST /v1/deployments/{deploymentId}/invoke-async/{endpointPath} (the `StartAsyncTask` operationId). - StartAsyncTaskWithResponse(ctx context.Context, deploymentId DeploymentId, endpointPath EndpointPath, body StartAsyncTaskJSONRequestBody, reqEditors ...RequestEditorFn) (*StartAsyncTaskResponse, error) + // Corresponds with POST /v1/apps/{appId}/invoke-async/{endpointPath} (the `StartAsyncTask` operationId). + StartAsyncTaskWithResponse(ctx context.Context, appId AppId, endpointPath EndpointPath, body StartAsyncTaskJSONRequestBody, reqEditors ...RequestEditorFn) (*StartAsyncTaskResponse, error) // StartSyncTaskWithBodyWithResponse Start a new sync task // - // Starts a new sync task on `deploymentId`, routing the request body payload to an available worker. The request blocks until the task is terminal and returns the result inline (`200`), or `504` if it does not complete within the wait window. When the accepted task ID is available, the response includes `taskId` for polling. Deployments in `initializing`, `active`, or `stopping` accept invocation. `stopped`, `deleting`, and `failed` return `409 Conflict`; unknown or deleted deployments return `404 Not Found`. + // Starts a new sync task on `appId`, routing the request body payload to an available worker. The request blocks until the task is terminal and returns the result inline (`200`), or `504` if it does not complete within the wait window. When the accepted task ID is available, the response includes `taskId` for polling. Apps in `initializing`, `active`, or `stopping` accept invocation. `stopped`, `deleting`, and `failed` return `409 Conflict`; unknown or deleted apps return `404 Not Found`. // // Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s). // - // Corresponds with POST /v1/deployments/{deploymentId}/invoke-sync/{endpointPath} (the `StartSyncTask` operationId). - StartSyncTaskWithBodyWithResponse(ctx context.Context, deploymentId DeploymentId, endpointPath EndpointPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*StartSyncTaskResponse, error) + // Corresponds with POST /v1/apps/{appId}/invoke-sync/{endpointPath} (the `StartSyncTask` operationId). + StartSyncTaskWithBodyWithResponse(ctx context.Context, appId AppId, endpointPath EndpointPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*StartSyncTaskResponse, error) // StartSyncTaskWithResponse Start a new sync task // - // Starts a new sync task on `deploymentId`, routing the request body payload to an available worker. The request blocks until the task is terminal and returns the result inline (`200`), or `504` if it does not complete within the wait window. When the accepted task ID is available, the response includes `taskId` for polling. Deployments in `initializing`, `active`, or `stopping` accept invocation. `stopped`, `deleting`, and `failed` return `409 Conflict`; unknown or deleted deployments return `404 Not Found`. + // Starts a new sync task on `appId`, routing the request body payload to an available worker. The request blocks until the task is terminal and returns the result inline (`200`), or `504` if it does not complete within the wait window. When the accepted task ID is available, the response includes `taskId` for polling. Apps in `initializing`, `active`, or `stopping` accept invocation. `stopped`, `deleting`, and `failed` return `409 Conflict`; unknown or deleted apps return `404 Not Found`. // // Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s). // - // Corresponds with POST /v1/deployments/{deploymentId}/invoke-sync/{endpointPath} (the `StartSyncTask` operationId). - StartSyncTaskWithResponse(ctx context.Context, deploymentId DeploymentId, endpointPath EndpointPath, body StartSyncTaskJSONRequestBody, reqEditors ...RequestEditorFn) (*StartSyncTaskResponse, error) + // Corresponds with POST /v1/apps/{appId}/invoke-sync/{endpointPath} (the `StartSyncTask` operationId). + StartSyncTaskWithResponse(ctx context.Context, appId AppId, endpointPath EndpointPath, body StartSyncTaskJSONRequestBody, reqEditors ...RequestEditorFn) (*StartSyncTaskResponse, error) - // ResumeDeploymentWithResponse Resume a deployment + // ResumeAppWithResponse Resume an app // - // Moves the deployment to `initializing` and returns `202` once that intent is persisted. The Scaler then starts workers and sets the deployment to `active`; tasks that remained queued when the deployment stopped are consumed as workers come online. Precondition: `status = stopped`. + // Moves the app to `initializing` and returns `202` once that intent is persisted. The Scaler then starts workers and sets the app to `active`; tasks that remained queued when the app stopped are consumed as workers come online. Precondition: `status = stopped`. // // Returns a wrapper object for the known response body format(s). // - // Corresponds with POST /v1/deployments/{deploymentId}/resume (the `ResumeDeployment` operationId). - ResumeDeploymentWithResponse(ctx context.Context, deploymentId DeploymentId, reqEditors ...RequestEditorFn) (*ResumeDeploymentResponse, error) + // Corresponds with POST /v1/apps/{appId}/resume (the `ResumeApp` operationId). + ResumeAppWithResponse(ctx context.Context, appId AppId, reqEditors ...RequestEditorFn) (*ResumeAppResponse, error) - // ListDeploymentSecretsWithResponse List secrets attached to a deployment + // ListAppSecretsWithResponse List secrets attached to an app // // Returns a wrapper object for the known response body format(s). // - // Corresponds with GET /v1/deployments/{deploymentId}/secrets (the `ListDeploymentSecrets` operationId). - ListDeploymentSecretsWithResponse(ctx context.Context, deploymentId DeploymentId, params *ListDeploymentSecretsParams, reqEditors ...RequestEditorFn) (*ListDeploymentSecretsResponse, error) + // Corresponds with GET /v1/apps/{appId}/secrets (the `ListAppSecrets` operationId). + ListAppSecretsWithResponse(ctx context.Context, appId AppId, params *ListAppSecretsParams, reqEditors ...RequestEditorFn) (*ListAppSecretsResponse, error) - // AttachDeploymentSecretWithBodyWithResponse Attach a secret to a deployment + // AttachAppSecretWithBodyWithResponse Attach a secret to an app // - // Records that an organisation secret is attached to a deployment under a resolved env-var name. This is a control-plane association only in this release — it does not roll workers or inject values into pods yet (ADR-019 in-pod unseal is separate). Returns `409` if the secret is already attached, or if another attach would use the same env-var name. - // The resolved name (`envVarName`, or `secretName` when omitted) must not already exist as a plain environment variable on this deployment (`deployment_configs.key`). Both sources are reserved for the same future pod env namespace, so the server rejects the collision with `422` instead of allowing a last-wins override later. The reverse check applies when setting a plain environment variable. - // A deployment holds at most 100 environment bindings in total — plain environment variables plus attached secrets — the same combined ceiling as create and the single-key env-var route. Attaching when the deployment is already at that limit returns `422`. + // Records that an organisation secret is attached to an app under a resolved env-var name. This is a control-plane association only in this release — it does not roll workers or inject values into pods yet (ADR-019 in-pod unseal is separate). Returns `409` if the secret is already attached, or if another attach would use the same env-var name. + // The resolved name (`envVarName`, or `secretName` when omitted) must not already exist as a plain environment variable on this app (`deployment_configs.key`). Both sources are reserved for the same future pod env namespace, so the server rejects the collision with `422` instead of allowing a last-wins override later. The reverse check applies when setting a plain environment variable. + // An app holds at most 100 environment bindings in total — plain environment variables plus attached secrets — the same combined ceiling as create and the single-key env-var route. Attaching when the app is already at that limit returns `422`. // // Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s). // - // Corresponds with POST /v1/deployments/{deploymentId}/secrets (the `AttachDeploymentSecret` operationId). - AttachDeploymentSecretWithBodyWithResponse(ctx context.Context, deploymentId DeploymentId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AttachDeploymentSecretResponse, error) + // Corresponds with POST /v1/apps/{appId}/secrets (the `AttachAppSecret` operationId). + AttachAppSecretWithBodyWithResponse(ctx context.Context, appId AppId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AttachAppSecretResponse, error) - // AttachDeploymentSecretWithResponse Attach a secret to a deployment + // AttachAppSecretWithResponse Attach a secret to an app // - // Records that an organisation secret is attached to a deployment under a resolved env-var name. This is a control-plane association only in this release — it does not roll workers or inject values into pods yet (ADR-019 in-pod unseal is separate). Returns `409` if the secret is already attached, or if another attach would use the same env-var name. - // The resolved name (`envVarName`, or `secretName` when omitted) must not already exist as a plain environment variable on this deployment (`deployment_configs.key`). Both sources are reserved for the same future pod env namespace, so the server rejects the collision with `422` instead of allowing a last-wins override later. The reverse check applies when setting a plain environment variable. - // A deployment holds at most 100 environment bindings in total — plain environment variables plus attached secrets — the same combined ceiling as create and the single-key env-var route. Attaching when the deployment is already at that limit returns `422`. + // Records that an organisation secret is attached to an app under a resolved env-var name. This is a control-plane association only in this release — it does not roll workers or inject values into pods yet (ADR-019 in-pod unseal is separate). Returns `409` if the secret is already attached, or if another attach would use the same env-var name. + // The resolved name (`envVarName`, or `secretName` when omitted) must not already exist as a plain environment variable on this app (`deployment_configs.key`). Both sources are reserved for the same future pod env namespace, so the server rejects the collision with `422` instead of allowing a last-wins override later. The reverse check applies when setting a plain environment variable. + // An app holds at most 100 environment bindings in total — plain environment variables plus attached secrets — the same combined ceiling as create and the single-key env-var route. Attaching when the app is already at that limit returns `422`. // // Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s). // - // Corresponds with POST /v1/deployments/{deploymentId}/secrets (the `AttachDeploymentSecret` operationId). - AttachDeploymentSecretWithResponse(ctx context.Context, deploymentId DeploymentId, body AttachDeploymentSecretJSONRequestBody, reqEditors ...RequestEditorFn) (*AttachDeploymentSecretResponse, error) + // Corresponds with POST /v1/apps/{appId}/secrets (the `AttachAppSecret` operationId). + AttachAppSecretWithResponse(ctx context.Context, appId AppId, body AttachAppSecretJSONRequestBody, reqEditors ...RequestEditorFn) (*AttachAppSecretResponse, error) - // DetachDeploymentSecretWithResponse Detach a secret from a deployment + // DetachAppSecretWithResponse Detach a secret from an app // // Removes the control-plane attachment. Does not roll workers in this release. // // Returns a wrapper object for the known response body format(s). // - // Corresponds with DELETE /v1/deployments/{deploymentId}/secrets/{secretName} (the `DetachDeploymentSecret` operationId). - DetachDeploymentSecretWithResponse(ctx context.Context, deploymentId DeploymentId, secretName SecretName, reqEditors ...RequestEditorFn) (*DetachDeploymentSecretResponse, error) + // Corresponds with DELETE /v1/apps/{appId}/secrets/{secretName} (the `DetachAppSecret` operationId). + DetachAppSecretWithResponse(ctx context.Context, appId AppId, secretName SecretName, reqEditors ...RequestEditorFn) (*DetachAppSecretResponse, error) - // StopDeploymentWithResponse Stop a deployment + // StopAppWithResponse Stop an app // - // Moves the deployment to `stopping` and returns `202` once that intent is persisted. Scale-to-zero and worker drain are performed asynchronously by the Scaler; `status` becomes `stopped` once all workers drain. In-flight tasks have a fixed, platform-managed grace period to complete; workers that exceed it are force-terminated and their tasks return to the queue per delivery guarantees. New task submissions remain accepted while `stopping`; after the deployment reaches `stopped`, submissions return `409 Conflict`. Precondition: `status = active`. + // Moves the app to `stopping` and returns `202` once that intent is persisted. Scale-to-zero and worker drain are performed asynchronously by the Scaler; `status` becomes `stopped` once all workers drain. In-flight tasks have a fixed, platform-managed grace period to complete; workers that exceed it are force-terminated and their tasks return to the queue per delivery guarantees. New task submissions remain accepted while `stopping`; after the app reaches `stopped`, submissions return `409 Conflict`. Precondition: `status = active`. // // Returns a wrapper object for the known response body format(s). // - // Corresponds with POST /v1/deployments/{deploymentId}/stop (the `StopDeployment` operationId). - StopDeploymentWithResponse(ctx context.Context, deploymentId DeploymentId, reqEditors ...RequestEditorFn) (*StopDeploymentResponse, error) + // Corresponds with POST /v1/apps/{appId}/stop (the `StopApp` operationId). + StopAppWithResponse(ctx context.Context, appId AppId, reqEditors ...RequestEditorFn) (*StopAppResponse, error) - // ListTasksWithResponse List tasks for a deployment + // ListTasksWithResponse List tasks for an app // - // Lists TTL-bounded asynchronous task metadata for this deployment so a client can recover task ids after an interrupted long-poll or CLI session. Pending includes queued, running and retrying work. Tasks appear only within the configured recovery window. A page can be empty and still have `nextCursor`; continue until it is null. Pending entries are best effort and may disappear if the recovery store restarts; tracked tasks reappear on completion. This is not persisted task history. Each submission has a new task id, so client retries can appear as separate tasks. If the deployment is `stopped`, `deleting`, or `failed`, recovery stays available. Unknown or deleted deployments return `404 Not Found`. + // Lists TTL-bounded asynchronous task metadata for this app so a client can recover task ids after an interrupted long-poll or CLI session. Pending includes queued, running and retrying work. Tasks appear only within the configured recovery window. A page can be empty and still have `nextCursor`; continue until it is null. Pending entries are best effort and may disappear if the recovery store restarts; tracked tasks reappear on completion. This is not persisted task history. Each submission has a new task id, so client retries can appear as separate tasks. If the app is `stopped`, `deleting`, or `failed`, recovery stays available. Unknown or deleted apps return `404 Not Found`. // // Returns a wrapper object for the known response body format(s). // - // Corresponds with GET /v1/deployments/{deploymentId}/tasks (the `ListTasks` operationId). - ListTasksWithResponse(ctx context.Context, deploymentId DeploymentId, params *ListTasksParams, reqEditors ...RequestEditorFn) (*ListTasksResponse, error) + // Corresponds with GET /v1/apps/{appId}/tasks (the `ListTasks` operationId). + ListTasksWithResponse(ctx context.Context, appId AppId, params *ListTasksParams, reqEditors ...RequestEditorFn) (*ListTasksResponse, error) // GetTaskWithResponse Get a task // - // Returns the task's current status, read through the inference transport layer from the shared result store. When `completed`, includes the result `output` and `completedAt`; when `failed`, includes `error`; when `pending`, neither is set. If the deployment is `stopped`, `deleting`, or `failed`, accepted task results stay readable. A `404 Not Found` means the task cannot currently be verified for this deployment. Because enqueue-time ownership tracking is best effort, a recently returned task ID can temporarily return `404`; retry it within the normal polling window. Unknown or deleted deployments also return `404 Not Found`. + // Returns the task's current status, read through the inference transport layer from the shared result store. When `completed`, includes the result `output` and `completedAt`; when `failed`, includes `error`; when `pending`, neither is set. If the app is `stopped`, `deleting`, or `failed`, accepted task results stay readable. A `404 Not Found` means the task cannot currently be verified for this app. Because enqueue-time ownership tracking is best effort, a recently returned task ID can temporarily return `404`; retry it within the normal polling window. Unknown or deleted apps also return `404 Not Found`. // // Returns a wrapper object for the known response body format(s). // - // Corresponds with GET /v1/deployments/{deploymentId}/tasks/{taskId} (the `GetTask` operationId). - GetTaskWithResponse(ctx context.Context, deploymentId DeploymentId, taskId string, reqEditors ...RequestEditorFn) (*GetTaskResponse, error) + // Corresponds with GET /v1/apps/{appId}/tasks/{taskId} (the `GetTask` operationId). + GetTaskWithResponse(ctx context.Context, appId AppId, taskId string, reqEditors ...RequestEditorFn) (*GetTaskResponse, error) // ListVersionsWithResponse List versions // // Returns a wrapper object for the known response body format(s). // - // Corresponds with GET /v1/deployments/{deploymentId}/versions (the `ListVersions` operationId). - ListVersionsWithResponse(ctx context.Context, deploymentId DeploymentId, params *ListVersionsParams, reqEditors ...RequestEditorFn) (*ListVersionsResponse, error) + // Corresponds with GET /v1/apps/{appId}/versions (the `ListVersions` operationId). + ListVersionsWithResponse(ctx context.Context, appId AppId, params *ListVersionsParams, reqEditors ...RequestEditorFn) (*ListVersionsResponse, error) // GetVersionWithResponse Get a version // // Returns a wrapper object for the known response body format(s). // - // Corresponds with GET /v1/deployments/{deploymentId}/versions/{versionNumber} (the `GetVersion` operationId). - GetVersionWithResponse(ctx context.Context, deploymentId DeploymentId, versionNumber int32, reqEditors ...RequestEditorFn) (*GetVersionResponse, error) + // Corresponds with GET /v1/apps/{appId}/versions/{versionNumber} (the `GetVersion` operationId). + GetVersionWithResponse(ctx context.Context, appId AppId, versionNumber int32, reqEditors ...RequestEditorFn) (*GetVersionResponse, error) // ListWorkersWithResponse List workers // - // Returns a newest-first page of workers observed for the deployment (including terminal `stopped` rows until purged). Optional `status` narrows the page; a cursor must be replayed under the same status filter it was issued with. + // Returns a newest-first page of workers observed for the app (including terminal `stopped` rows until purged). Optional `status` narrows the page; a cursor must be replayed under the same status filter it was issued with. // // Returns a wrapper object for the known response body format(s). // - // Corresponds with GET /v1/deployments/{deploymentId}/workers (the `ListWorkers` operationId). - ListWorkersWithResponse(ctx context.Context, deploymentId DeploymentId, params *ListWorkersParams, reqEditors ...RequestEditorFn) (*ListWorkersResponse, error) + // Corresponds with GET /v1/apps/{appId}/workers (the `ListWorkers` operationId). + ListWorkersWithResponse(ctx context.Context, appId AppId, params *ListWorkersParams, reqEditors ...RequestEditorFn) (*ListWorkersResponse, error) // GetWorkerWithResponse Get a worker // - // Returns one worker by id within the deployment. The id is the Kubernetes pod UID recorded by the reconciler. A worker that belongs to another deployment (or tenant) is not found. + // Returns one worker by id within the app. The id is the Kubernetes pod UID recorded by the reconciler. A worker that belongs to another app (or tenant) is not found. // // Returns a wrapper object for the known response body format(s). // - // Corresponds with GET /v1/deployments/{deploymentId}/workers/{workerId} (the `GetWorker` operationId). - GetWorkerWithResponse(ctx context.Context, deploymentId DeploymentId, workerId WorkerId, reqEditors ...RequestEditorFn) (*GetWorkerResponse, error) + // Corresponds with GET /v1/apps/{appId}/workers/{workerId} (the `GetWorker` operationId). + GetWorkerWithResponse(ctx context.Context, appId AppId, workerId WorkerId, reqEditors ...RequestEditorFn) (*GetWorkerResponse, error) // ListGpuTypesWithResponse List supported GPU types and their pricing // - // Returns the global GPU type catalogue and pricing. The request requires authentication. Customer principals receive only GPU types with capacity currently offered to customers; a type whose hardware is not yet cleared for customer workloads is omitted. The Runware principal receives the full catalogue, including types not yet offered. Each entry's `pricing` is the price currently in effect; the Runware principal can read the full price history, including scheduled future changes, from `GET /v1/gpu-types/{gpuTypeId}/prices`. + // Returns the global GPU type catalogue and pricing. The request requires authentication. Customer principals receive only GPU types with capacity currently offered to customers; a type whose hardware is not yet cleared for customer workloads is omitted. The Runware principal receives the full catalogue, including retired types and types not yet offered. Retired entries carry `deletedAt`. Each entry's `pricing` is the price currently in effect; the Runware principal can read the full price history, including scheduled future changes, from `GET /v1/gpu-types/{gpuTypeId}/prices`. // // Returns a wrapper object for the known response body format(s). // @@ -5649,7 +5648,7 @@ type ClientWithResponsesInterface interface { // CreateGpuTypeWithBodyWithResponse Add a GPU type to the catalogue // - // Creates a new entry in the global GPU type catalogue. Restricted to the Runware platform organization. The `id` (catalogue code) is immutable after create. + // Creates a new entry in the global GPU type catalogue. Restricted to the Runware platform organization. The `id` (catalogue code) is immutable and remains reserved after retirement. // // Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s). // @@ -5658,16 +5657,16 @@ type ClientWithResponsesInterface interface { // CreateGpuTypeWithResponse Add a GPU type to the catalogue // - // Creates a new entry in the global GPU type catalogue. Restricted to the Runware platform organization. The `id` (catalogue code) is immutable after create. + // Creates a new entry in the global GPU type catalogue. Restricted to the Runware platform organization. The `id` (catalogue code) is immutable and remains reserved after retirement. // // Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s). // // Corresponds with POST /v1/gpu-types (the `CreateGpuType` operationId). CreateGpuTypeWithResponse(ctx context.Context, body CreateGpuTypeJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateGpuTypeResponse, error) - // DeleteGpuTypeWithResponse Remove a GPU type from the catalogue + // DeleteGpuTypeWithResponse Retire a GPU type from the catalogue // - // Deletes a GPU type from the global catalogue. Restricted to the Runware platform organization. Returns `409` if any live worker configuration still references the code. + // Soft-deletes a GPU type while preserving its code and price history. Restricted to the Runware platform organization. Returns `409` if a worker configuration or GPU pool still references the code. Retiring an already retired code returns `404`. // // Returns a wrapper object for the known response body format(s). // @@ -5676,7 +5675,7 @@ type ClientWithResponsesInterface interface { // GetGpuTypeWithResponse Get a GPU type from the catalogue // - // Returns a single entry from the global GPU type catalogue. The result is not organisation-specific, but the request still requires authentication. + // Returns an active entry from the global GPU type catalogue. Retired entries return `404`. The result is not organisation-specific, but the request still requires authentication. // // Returns a wrapper object for the known response body format(s). // @@ -5685,7 +5684,7 @@ type ClientWithResponsesInterface interface { // UpdateGpuTypeWithBodyWithResponse Update a GPU type in the catalogue // - // Updates mutable fields of an existing GPU type. Restricted to the Runware platform organization. The catalogue code (`gpuTypeId`) cannot be changed. + // Updates mutable fields of an active GPU type. Restricted to the Runware platform organization. The catalogue code (`gpuTypeId`) cannot be changed; retired entries return `404`. // // Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s). // @@ -5694,7 +5693,7 @@ type ClientWithResponsesInterface interface { // UpdateGpuTypeWithResponse Update a GPU type in the catalogue // - // Updates mutable fields of an existing GPU type. Restricted to the Runware platform organization. The catalogue code (`gpuTypeId`) cannot be changed. + // Updates mutable fields of an active GPU type. Restricted to the Runware platform organization. The catalogue code (`gpuTypeId`) cannot be changed; retired entries return `404`. // // Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s). // @@ -5703,7 +5702,7 @@ type ClientWithResponsesInterface interface { // ListGpuTypePricesWithResponse List historical and future prices of a GPU type // - // Returns a page of a GPU type's prices, ordered by effectiveFrom. Restricted to the Runware platform organization: the page includes prices that are scheduled but not yet in effect. Customers read the price currently in effect from `GET /v1/gpu-types`. + // Returns a page of a GPU type's prices, ordered by effectiveFrom. Restricted to the Runware platform organization: the page includes retired types and prices that are scheduled but not yet in effect. Customers read the price currently in effect from `GET /v1/gpu-types`. // // Returns a wrapper object for the known response body format(s). // @@ -5712,7 +5711,7 @@ type ClientWithResponsesInterface interface { // CreateGpuTypePriceWithBodyWithResponse Schedule a new price for a GPU type // - // Schedules a new price to take effect at `effectiveFrom`. Restricted to the Runware platform organization. `effectiveFrom` must be more than 7 days in the future, so downstream systems and customers get advance notice of the change; a value inside that window returns `422`. Returns `409` if the GPU type already has a price scheduled at that exact instant. + // Schedules a new price to take effect at `effectiveFrom`. Restricted to the Runware platform organization. `effectiveFrom` must normally be more than 7 days in the future. Before a GPU type is admitted or used, a later price can be added inside that window to correct its initial price. This preserves the original row and records the correction as a superseding price. Retired types return `404`; other values inside the notice window return `422`. Returns `409` if the GPU type already has a price scheduled at that exact instant. // // Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s). // @@ -5721,7 +5720,7 @@ type ClientWithResponsesInterface interface { // CreateGpuTypePriceWithResponse Schedule a new price for a GPU type // - // Schedules a new price to take effect at `effectiveFrom`. Restricted to the Runware platform organization. `effectiveFrom` must be more than 7 days in the future, so downstream systems and customers get advance notice of the change; a value inside that window returns `422`. Returns `409` if the GPU type already has a price scheduled at that exact instant. + // Schedules a new price to take effect at `effectiveFrom`. Restricted to the Runware platform organization. `effectiveFrom` must normally be more than 7 days in the future. Before a GPU type is admitted or used, a later price can be added inside that window to correct its initial price. This preserves the original row and records the correction as a superseding price. Retired types return `404`; other values inside the notice window return `422`. Returns `409` if the GPU type already has a price scheduled at that exact instant. // // Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s). // @@ -5730,7 +5729,7 @@ type ClientWithResponsesInterface interface { // DeleteGpuTypePriceWithResponse Remove a scheduled price for a GPU type // - // Deletes a scheduled price. Restricted to the Runware platform organization. Only a price whose effectiveFrom is still more than 7 days in the future can be deleted — once inside that window the price is locked in (about to take effect, or already has) and this returns `409`. + // Deletes a scheduled price. Restricted to the Runware platform organization. Only a price whose effectiveFrom is still more than 7 days in the future can be deleted — once inside that window the price is locked in (about to take effect, or already has) and this returns `409`. Retired GPU types return `404`. // // Returns a wrapper object for the known response body format(s). // @@ -5739,7 +5738,7 @@ type ClientWithResponsesInterface interface { // UpdateGpuTypePriceWithBodyWithResponse Update a scheduled price for a GPU type // - // Partially updates a scheduled price. Restricted to the Runware platform organization. Only a price whose current `effectiveFrom` is still more than 7 days in the future can be edited — once inside that window the price is locked in and this returns `409`. A supplied `effectiveFrom` must itself be more than 7 days in the future, returning `422` otherwise. Returns `409` if it collides with another price already scheduled at that exact instant. + // Partially updates a scheduled price. Restricted to the Runware platform organization. Only a price whose current `effectiveFrom` is still more than 7 days in the future can be edited — once inside that window the price is locked in and this returns `409`. A supplied `effectiveFrom` must itself be more than 7 days in the future, returning `422` otherwise. Retired GPU types return `404`. Returns `409` if the update collides with another price already scheduled at that exact instant. // // Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s). // @@ -5748,7 +5747,7 @@ type ClientWithResponsesInterface interface { // UpdateGpuTypePriceWithResponse Update a scheduled price for a GPU type // - // Partially updates a scheduled price. Restricted to the Runware platform organization. Only a price whose current `effectiveFrom` is still more than 7 days in the future can be edited — once inside that window the price is locked in and this returns `409`. A supplied `effectiveFrom` must itself be more than 7 days in the future, returning `422` otherwise. Returns `409` if it collides with another price already scheduled at that exact instant. + // Partially updates a scheduled price. Restricted to the Runware platform organization. Only a price whose current `effectiveFrom` is still more than 7 days in the future can be edited — once inside that window the price is locked in and this returns `409`. A supplied `effectiveFrom` must itself be more than 7 days in the future, returning `422` otherwise. Retired GPU types return `404`. Returns `409` if the update collides with another price already scheduled at that exact instant. // // Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s). // @@ -5784,7 +5783,7 @@ type ClientWithResponsesInterface interface { // DeleteSecretWithResponse Delete a secret // - // Soft-deletes a secret: marks the row `pending_destroy` and bumps revision. This API does not hard-delete the row; a future GC path is expected to remove unattached `pending_destroy` secrets and release the name, but that sweep is not implemented yet. Returns `409` while any deployment still attaches it — cascade-detach is not performed here; detach each holder with `DELETE .../deployments/{id}/secrets/{name}` first. Attach/detach are control-plane records only in this release (they do not roll workers). While the row remains `pending_destroy` the name stays reserved, so create may return `409` even though list no longer shows the secret. Retries on an already-pending name are safe when no attachments remain (`204`); they still return `409` while attached. + // Soft-deletes a secret: marks the row `pending_destroy` and bumps revision. This API does not hard-delete the row; a future GC path is expected to remove unattached `pending_destroy` secrets and release the name, but that sweep is not implemented yet. Returns `409` while any app still attaches it — cascade-detach is not performed here; detach each holder with `DELETE .../apps/{id}/secrets/{name}` first. Attach/detach are control-plane records only in this release (they do not roll workers). While the row remains `pending_destroy` the name stays reserved, so create may return `409` even though list no longer shows the secret. Retries on an already-pending name are safe when no attachments remain (`204`); they still return `409` while attached. // // Returns a wrapper object for the known response body format(s). // @@ -5815,11 +5814,11 @@ type ClientWithResponsesInterface interface { ListUsageEventsWithResponse(ctx context.Context, params *ListUsageEventsParams, reqEditors ...RequestEditorFn) (*ListUsageEventsResponse, error) } -type GetDeploymentSummaryResponse struct { +type GetAppSummaryResponse struct { Body []byte HTTPResponse *http.Response // JSON200 the response for an HTTP 200 `application/json` response - JSON200 *DeploymentSummary + JSON200 *AppSummary // ApplicationproblemJSON401 the response for an HTTP 401 `application/problem+json` response ApplicationproblemJSON401 *Unauthorized // ApplicationproblemJSON403 the response for an HTTP 403 `application/problem+json` response @@ -5829,32 +5828,32 @@ type GetDeploymentSummaryResponse struct { } // GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r GetDeploymentSummaryResponse) GetJSON200() *DeploymentSummary { +func (r GetAppSummaryResponse) GetJSON200() *AppSummary { return r.JSON200 } // GetApplicationproblemJSON401 returns the response for an HTTP 401 `application/problem+json` response -func (r GetDeploymentSummaryResponse) GetApplicationproblemJSON401() *Unauthorized { +func (r GetAppSummaryResponse) GetApplicationproblemJSON401() *Unauthorized { return r.ApplicationproblemJSON401 } // GetApplicationproblemJSON403 returns the response for an HTTP 403 `application/problem+json` response -func (r GetDeploymentSummaryResponse) GetApplicationproblemJSON403() *Forbidden { +func (r GetAppSummaryResponse) GetApplicationproblemJSON403() *Forbidden { return r.ApplicationproblemJSON403 } // GetApplicationproblemJSON503 returns the response for an HTTP 503 `application/problem+json` response -func (r GetDeploymentSummaryResponse) GetApplicationproblemJSON503() *ServiceUnavailable { +func (r GetAppSummaryResponse) GetApplicationproblemJSON503() *ServiceUnavailable { return r.ApplicationproblemJSON503 } // GetBody returns the raw response body bytes -func (r GetDeploymentSummaryResponse) GetBody() []byte { +func (r GetAppSummaryResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r GetDeploymentSummaryResponse) Status() string { +func (r GetAppSummaryResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -5862,7 +5861,7 @@ func (r GetDeploymentSummaryResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetDeploymentSummaryResponse) StatusCode() int { +func (r GetAppSummaryResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -5870,19 +5869,19 @@ func (r GetDeploymentSummaryResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r GetDeploymentSummaryResponse) ContentType() string { +func (r GetAppSummaryResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type ListDeploymentsResponse struct { +type ListAppsResponse struct { Body []byte HTTPResponse *http.Response // JSON200 the response for an HTTP 200 `application/json` response JSON200 *struct { - Data *[]Deployment `json:"data,omitempty"` + Data *[]App `json:"data,omitempty"` // NextCursor Cursor for the next page; null when there are no more items. NextCursor *string `json:"nextCursor,omitempty"` @@ -5900,8 +5899,8 @@ type ListDeploymentsResponse struct { } // GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r ListDeploymentsResponse) GetJSON200() *struct { - Data *[]Deployment `json:"data,omitempty"` +func (r ListAppsResponse) GetJSON200() *struct { + Data *[]App `json:"data,omitempty"` // NextCursor Cursor for the next page; null when there are no more items. NextCursor *string `json:"nextCursor,omitempty"` @@ -5910,37 +5909,37 @@ func (r ListDeploymentsResponse) GetJSON200() *struct { } // GetApplicationproblemJSON400 returns the response for an HTTP 400 `application/problem+json` response -func (r ListDeploymentsResponse) GetApplicationproblemJSON400() *BadRequest { +func (r ListAppsResponse) GetApplicationproblemJSON400() *BadRequest { return r.ApplicationproblemJSON400 } // GetApplicationproblemJSON401 returns the response for an HTTP 401 `application/problem+json` response -func (r ListDeploymentsResponse) GetApplicationproblemJSON401() *Unauthorized { +func (r ListAppsResponse) GetApplicationproblemJSON401() *Unauthorized { return r.ApplicationproblemJSON401 } // GetApplicationproblemJSON403 returns the response for an HTTP 403 `application/problem+json` response -func (r ListDeploymentsResponse) GetApplicationproblemJSON403() *Forbidden { +func (r ListAppsResponse) GetApplicationproblemJSON403() *Forbidden { return r.ApplicationproblemJSON403 } // GetApplicationproblemJSON422 returns the response for an HTTP 422 `application/problem+json` response -func (r ListDeploymentsResponse) GetApplicationproblemJSON422() *ValidationError { +func (r ListAppsResponse) GetApplicationproblemJSON422() *ValidationError { return r.ApplicationproblemJSON422 } // GetApplicationproblemJSON503 returns the response for an HTTP 503 `application/problem+json` response -func (r ListDeploymentsResponse) GetApplicationproblemJSON503() *ServiceUnavailable { +func (r ListAppsResponse) GetApplicationproblemJSON503() *ServiceUnavailable { return r.ApplicationproblemJSON503 } // GetBody returns the raw response body bytes -func (r ListDeploymentsResponse) GetBody() []byte { +func (r ListAppsResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r ListDeploymentsResponse) Status() string { +func (r ListAppsResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -5948,7 +5947,7 @@ func (r ListDeploymentsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r ListDeploymentsResponse) StatusCode() int { +func (r ListAppsResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -5956,18 +5955,18 @@ func (r ListDeploymentsResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r ListDeploymentsResponse) ContentType() string { +func (r ListAppsResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type CreateDeploymentResponse struct { +type CreateAppResponse struct { Body []byte HTTPResponse *http.Response // JSON201 the response for an HTTP 201 `application/json` response - JSON201 *Deployment + JSON201 *App // ApplicationproblemJSON400 the response for an HTTP 400 `application/problem+json` response ApplicationproblemJSON400 *BadRequest // ApplicationproblemJSON401 the response for an HTTP 401 `application/problem+json` response @@ -5983,47 +5982,47 @@ type CreateDeploymentResponse struct { } // GetJSON201 returns the response for an HTTP 201 `application/json` response -func (r CreateDeploymentResponse) GetJSON201() *Deployment { +func (r CreateAppResponse) GetJSON201() *App { return r.JSON201 } // GetApplicationproblemJSON400 returns the response for an HTTP 400 `application/problem+json` response -func (r CreateDeploymentResponse) GetApplicationproblemJSON400() *BadRequest { +func (r CreateAppResponse) GetApplicationproblemJSON400() *BadRequest { return r.ApplicationproblemJSON400 } // GetApplicationproblemJSON401 returns the response for an HTTP 401 `application/problem+json` response -func (r CreateDeploymentResponse) GetApplicationproblemJSON401() *Unauthorized { +func (r CreateAppResponse) GetApplicationproblemJSON401() *Unauthorized { return r.ApplicationproblemJSON401 } // GetApplicationproblemJSON403 returns the response for an HTTP 403 `application/problem+json` response -func (r CreateDeploymentResponse) GetApplicationproblemJSON403() *Forbidden { +func (r CreateAppResponse) GetApplicationproblemJSON403() *Forbidden { return r.ApplicationproblemJSON403 } // GetApplicationproblemJSON409 returns the response for an HTTP 409 `application/problem+json` response -func (r CreateDeploymentResponse) GetApplicationproblemJSON409() *Conflict { +func (r CreateAppResponse) GetApplicationproblemJSON409() *Conflict { return r.ApplicationproblemJSON409 } // GetApplicationproblemJSON422 returns the response for an HTTP 422 `application/problem+json` response -func (r CreateDeploymentResponse) GetApplicationproblemJSON422() *ValidationError { +func (r CreateAppResponse) GetApplicationproblemJSON422() *ValidationError { return r.ApplicationproblemJSON422 } // GetApplicationproblemJSON503 returns the response for an HTTP 503 `application/problem+json` response -func (r CreateDeploymentResponse) GetApplicationproblemJSON503() *ServiceUnavailable { +func (r CreateAppResponse) GetApplicationproblemJSON503() *ServiceUnavailable { return r.ApplicationproblemJSON503 } // GetBody returns the raw response body bytes -func (r CreateDeploymentResponse) GetBody() []byte { +func (r CreateAppResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r CreateDeploymentResponse) Status() string { +func (r CreateAppResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -6031,7 +6030,7 @@ func (r CreateDeploymentResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r CreateDeploymentResponse) StatusCode() int { +func (r CreateAppResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -6039,18 +6038,18 @@ func (r CreateDeploymentResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r CreateDeploymentResponse) ContentType() string { +func (r CreateAppResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type DeleteDeploymentResponse struct { +type DeleteAppResponse struct { Body []byte HTTPResponse *http.Response // JSON202 the response for an HTTP 202 `application/json` response - JSON202 *Deployment + JSON202 *App // ApplicationproblemJSON401 the response for an HTTP 401 `application/problem+json` response ApplicationproblemJSON401 *Unauthorized // ApplicationproblemJSON403 the response for an HTTP 403 `application/problem+json` response @@ -6062,37 +6061,37 @@ type DeleteDeploymentResponse struct { } // GetJSON202 returns the response for an HTTP 202 `application/json` response -func (r DeleteDeploymentResponse) GetJSON202() *Deployment { +func (r DeleteAppResponse) GetJSON202() *App { return r.JSON202 } // GetApplicationproblemJSON401 returns the response for an HTTP 401 `application/problem+json` response -func (r DeleteDeploymentResponse) GetApplicationproblemJSON401() *Unauthorized { +func (r DeleteAppResponse) GetApplicationproblemJSON401() *Unauthorized { return r.ApplicationproblemJSON401 } // GetApplicationproblemJSON403 returns the response for an HTTP 403 `application/problem+json` response -func (r DeleteDeploymentResponse) GetApplicationproblemJSON403() *Forbidden { +func (r DeleteAppResponse) GetApplicationproblemJSON403() *Forbidden { return r.ApplicationproblemJSON403 } // GetApplicationproblemJSON404 returns the response for an HTTP 404 `application/problem+json` response -func (r DeleteDeploymentResponse) GetApplicationproblemJSON404() *NotFound { +func (r DeleteAppResponse) GetApplicationproblemJSON404() *NotFound { return r.ApplicationproblemJSON404 } // GetApplicationproblemJSON503 returns the response for an HTTP 503 `application/problem+json` response -func (r DeleteDeploymentResponse) GetApplicationproblemJSON503() *ServiceUnavailable { +func (r DeleteAppResponse) GetApplicationproblemJSON503() *ServiceUnavailable { return r.ApplicationproblemJSON503 } // GetBody returns the raw response body bytes -func (r DeleteDeploymentResponse) GetBody() []byte { +func (r DeleteAppResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r DeleteDeploymentResponse) Status() string { +func (r DeleteAppResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -6100,7 +6099,7 @@ func (r DeleteDeploymentResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r DeleteDeploymentResponse) StatusCode() int { +func (r DeleteAppResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -6108,18 +6107,18 @@ func (r DeleteDeploymentResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r DeleteDeploymentResponse) ContentType() string { +func (r DeleteAppResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type GetDeploymentResponse struct { +type GetAppResponse struct { Body []byte HTTPResponse *http.Response // JSON200 the response for an HTTP 200 `application/json` response - JSON200 *Deployment + JSON200 *App // ApplicationproblemJSON401 the response for an HTTP 401 `application/problem+json` response ApplicationproblemJSON401 *Unauthorized // ApplicationproblemJSON403 the response for an HTTP 403 `application/problem+json` response @@ -6131,37 +6130,37 @@ type GetDeploymentResponse struct { } // GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r GetDeploymentResponse) GetJSON200() *Deployment { +func (r GetAppResponse) GetJSON200() *App { return r.JSON200 } // GetApplicationproblemJSON401 returns the response for an HTTP 401 `application/problem+json` response -func (r GetDeploymentResponse) GetApplicationproblemJSON401() *Unauthorized { +func (r GetAppResponse) GetApplicationproblemJSON401() *Unauthorized { return r.ApplicationproblemJSON401 } // GetApplicationproblemJSON403 returns the response for an HTTP 403 `application/problem+json` response -func (r GetDeploymentResponse) GetApplicationproblemJSON403() *Forbidden { +func (r GetAppResponse) GetApplicationproblemJSON403() *Forbidden { return r.ApplicationproblemJSON403 } // GetApplicationproblemJSON404 returns the response for an HTTP 404 `application/problem+json` response -func (r GetDeploymentResponse) GetApplicationproblemJSON404() *NotFound { +func (r GetAppResponse) GetApplicationproblemJSON404() *NotFound { return r.ApplicationproblemJSON404 } // GetApplicationproblemJSON503 returns the response for an HTTP 503 `application/problem+json` response -func (r GetDeploymentResponse) GetApplicationproblemJSON503() *ServiceUnavailable { +func (r GetAppResponse) GetApplicationproblemJSON503() *ServiceUnavailable { return r.ApplicationproblemJSON503 } // GetBody returns the raw response body bytes -func (r GetDeploymentResponse) GetBody() []byte { +func (r GetAppResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r GetDeploymentResponse) Status() string { +func (r GetAppResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -6169,7 +6168,7 @@ func (r GetDeploymentResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r GetDeploymentResponse) StatusCode() int { +func (r GetAppResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -6177,18 +6176,18 @@ func (r GetDeploymentResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r GetDeploymentResponse) ContentType() string { +func (r GetAppResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type UpdateDeploymentResponse struct { +type UpdateAppResponse struct { Body []byte HTTPResponse *http.Response // JSON200 the response for an HTTP 200 `application/json` response - JSON200 *Deployment + JSON200 *App // ApplicationproblemJSON400 the response for an HTTP 400 `application/problem+json` response ApplicationproblemJSON400 *BadRequest // ApplicationproblemJSON401 the response for an HTTP 401 `application/problem+json` response @@ -6206,52 +6205,52 @@ type UpdateDeploymentResponse struct { } // GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r UpdateDeploymentResponse) GetJSON200() *Deployment { +func (r UpdateAppResponse) GetJSON200() *App { return r.JSON200 } // GetApplicationproblemJSON400 returns the response for an HTTP 400 `application/problem+json` response -func (r UpdateDeploymentResponse) GetApplicationproblemJSON400() *BadRequest { +func (r UpdateAppResponse) GetApplicationproblemJSON400() *BadRequest { return r.ApplicationproblemJSON400 } // GetApplicationproblemJSON401 returns the response for an HTTP 401 `application/problem+json` response -func (r UpdateDeploymentResponse) GetApplicationproblemJSON401() *Unauthorized { +func (r UpdateAppResponse) GetApplicationproblemJSON401() *Unauthorized { return r.ApplicationproblemJSON401 } // GetApplicationproblemJSON403 returns the response for an HTTP 403 `application/problem+json` response -func (r UpdateDeploymentResponse) GetApplicationproblemJSON403() *Forbidden { +func (r UpdateAppResponse) GetApplicationproblemJSON403() *Forbidden { return r.ApplicationproblemJSON403 } // GetApplicationproblemJSON404 returns the response for an HTTP 404 `application/problem+json` response -func (r UpdateDeploymentResponse) GetApplicationproblemJSON404() *NotFound { +func (r UpdateAppResponse) GetApplicationproblemJSON404() *NotFound { return r.ApplicationproblemJSON404 } // GetApplicationproblemJSON409 returns the response for an HTTP 409 `application/problem+json` response -func (r UpdateDeploymentResponse) GetApplicationproblemJSON409() *Conflict { +func (r UpdateAppResponse) GetApplicationproblemJSON409() *Conflict { return r.ApplicationproblemJSON409 } // GetApplicationproblemJSON422 returns the response for an HTTP 422 `application/problem+json` response -func (r UpdateDeploymentResponse) GetApplicationproblemJSON422() *ValidationError { +func (r UpdateAppResponse) GetApplicationproblemJSON422() *ValidationError { return r.ApplicationproblemJSON422 } // GetApplicationproblemJSON503 returns the response for an HTTP 503 `application/problem+json` response -func (r UpdateDeploymentResponse) GetApplicationproblemJSON503() *ServiceUnavailable { +func (r UpdateAppResponse) GetApplicationproblemJSON503() *ServiceUnavailable { return r.ApplicationproblemJSON503 } // GetBody returns the raw response body bytes -func (r UpdateDeploymentResponse) GetBody() []byte { +func (r UpdateAppResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r UpdateDeploymentResponse) Status() string { +func (r UpdateAppResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -6259,7 +6258,7 @@ func (r UpdateDeploymentResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r UpdateDeploymentResponse) StatusCode() int { +func (r UpdateAppResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -6267,7 +6266,7 @@ func (r UpdateDeploymentResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r UpdateDeploymentResponse) ContentType() string { +func (r UpdateAppResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } @@ -6426,7 +6425,7 @@ type DeployVersionResponse struct { Body []byte HTTPResponse *http.Response // JSON202 the response for an HTTP 202 `application/json` response - JSON202 *Deployment + JSON202 *App // ApplicationproblemJSON400 the response for an HTTP 400 `application/problem+json` response ApplicationproblemJSON400 *BadRequest // ApplicationproblemJSON401 the response for an HTTP 401 `application/problem+json` response @@ -6444,7 +6443,7 @@ type DeployVersionResponse struct { } // GetJSON202 returns the response for an HTTP 202 `application/json` response -func (r DeployVersionResponse) GetJSON202() *Deployment { +func (r DeployVersionResponse) GetJSON202() *App { return r.JSON202 } @@ -6688,7 +6687,7 @@ func (r GetEndpointResponse) ContentType() string { return "" } -type ListDeploymentEnvironmentVariablesResponse struct { +type ListAppEnvironmentVariablesResponse struct { Body []byte HTTPResponse *http.Response // JSON200 the response for an HTTP 200 `application/json` response @@ -6709,7 +6708,7 @@ type ListDeploymentEnvironmentVariablesResponse struct { } // GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r ListDeploymentEnvironmentVariablesResponse) GetJSON200() *struct { +func (r ListAppEnvironmentVariablesResponse) GetJSON200() *struct { Data *[]EnvironmentVariable `json:"data,omitempty"` // NextCursor Cursor for the next page; null when there are no more items. @@ -6719,32 +6718,32 @@ func (r ListDeploymentEnvironmentVariablesResponse) GetJSON200() *struct { } // GetApplicationproblemJSON401 returns the response for an HTTP 401 `application/problem+json` response -func (r ListDeploymentEnvironmentVariablesResponse) GetApplicationproblemJSON401() *Unauthorized { +func (r ListAppEnvironmentVariablesResponse) GetApplicationproblemJSON401() *Unauthorized { return r.ApplicationproblemJSON401 } // GetApplicationproblemJSON403 returns the response for an HTTP 403 `application/problem+json` response -func (r ListDeploymentEnvironmentVariablesResponse) GetApplicationproblemJSON403() *Forbidden { +func (r ListAppEnvironmentVariablesResponse) GetApplicationproblemJSON403() *Forbidden { return r.ApplicationproblemJSON403 } // GetApplicationproblemJSON404 returns the response for an HTTP 404 `application/problem+json` response -func (r ListDeploymentEnvironmentVariablesResponse) GetApplicationproblemJSON404() *NotFound { +func (r ListAppEnvironmentVariablesResponse) GetApplicationproblemJSON404() *NotFound { return r.ApplicationproblemJSON404 } // GetApplicationproblemJSON503 returns the response for an HTTP 503 `application/problem+json` response -func (r ListDeploymentEnvironmentVariablesResponse) GetApplicationproblemJSON503() *ServiceUnavailable { +func (r ListAppEnvironmentVariablesResponse) GetApplicationproblemJSON503() *ServiceUnavailable { return r.ApplicationproblemJSON503 } // GetBody returns the raw response body bytes -func (r ListDeploymentEnvironmentVariablesResponse) GetBody() []byte { +func (r ListAppEnvironmentVariablesResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r ListDeploymentEnvironmentVariablesResponse) Status() string { +func (r ListAppEnvironmentVariablesResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -6752,7 +6751,7 @@ func (r ListDeploymentEnvironmentVariablesResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r ListDeploymentEnvironmentVariablesResponse) StatusCode() int { +func (r ListAppEnvironmentVariablesResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -6760,14 +6759,14 @@ func (r ListDeploymentEnvironmentVariablesResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r ListDeploymentEnvironmentVariablesResponse) ContentType() string { +func (r ListAppEnvironmentVariablesResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type DeleteDeploymentEnvironmentVariableResponse struct { +type DeleteAppEnvironmentVariableResponse struct { Body []byte HTTPResponse *http.Response // ApplicationproblemJSON401 the response for an HTTP 401 `application/problem+json` response @@ -6781,32 +6780,32 @@ type DeleteDeploymentEnvironmentVariableResponse struct { } // GetApplicationproblemJSON401 returns the response for an HTTP 401 `application/problem+json` response -func (r DeleteDeploymentEnvironmentVariableResponse) GetApplicationproblemJSON401() *Unauthorized { +func (r DeleteAppEnvironmentVariableResponse) GetApplicationproblemJSON401() *Unauthorized { return r.ApplicationproblemJSON401 } // GetApplicationproblemJSON403 returns the response for an HTTP 403 `application/problem+json` response -func (r DeleteDeploymentEnvironmentVariableResponse) GetApplicationproblemJSON403() *Forbidden { +func (r DeleteAppEnvironmentVariableResponse) GetApplicationproblemJSON403() *Forbidden { return r.ApplicationproblemJSON403 } // GetApplicationproblemJSON404 returns the response for an HTTP 404 `application/problem+json` response -func (r DeleteDeploymentEnvironmentVariableResponse) GetApplicationproblemJSON404() *NotFound { +func (r DeleteAppEnvironmentVariableResponse) GetApplicationproblemJSON404() *NotFound { return r.ApplicationproblemJSON404 } // GetApplicationproblemJSON503 returns the response for an HTTP 503 `application/problem+json` response -func (r DeleteDeploymentEnvironmentVariableResponse) GetApplicationproblemJSON503() *ServiceUnavailable { +func (r DeleteAppEnvironmentVariableResponse) GetApplicationproblemJSON503() *ServiceUnavailable { return r.ApplicationproblemJSON503 } // GetBody returns the raw response body bytes -func (r DeleteDeploymentEnvironmentVariableResponse) GetBody() []byte { +func (r DeleteAppEnvironmentVariableResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r DeleteDeploymentEnvironmentVariableResponse) Status() string { +func (r DeleteAppEnvironmentVariableResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -6814,7 +6813,7 @@ func (r DeleteDeploymentEnvironmentVariableResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r DeleteDeploymentEnvironmentVariableResponse) StatusCode() int { +func (r DeleteAppEnvironmentVariableResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -6822,14 +6821,14 @@ func (r DeleteDeploymentEnvironmentVariableResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r DeleteDeploymentEnvironmentVariableResponse) ContentType() string { +func (r DeleteAppEnvironmentVariableResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type UpdateDeploymentEnvironmentVariableResponse struct { +type UpdateAppEnvironmentVariableResponse struct { Body []byte HTTPResponse *http.Response // JSON200 the response for an HTTP 200 `application/json` response @@ -6849,47 +6848,47 @@ type UpdateDeploymentEnvironmentVariableResponse struct { } // GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r UpdateDeploymentEnvironmentVariableResponse) GetJSON200() *EnvironmentVariable { +func (r UpdateAppEnvironmentVariableResponse) GetJSON200() *EnvironmentVariable { return r.JSON200 } // GetApplicationproblemJSON400 returns the response for an HTTP 400 `application/problem+json` response -func (r UpdateDeploymentEnvironmentVariableResponse) GetApplicationproblemJSON400() *BadRequest { +func (r UpdateAppEnvironmentVariableResponse) GetApplicationproblemJSON400() *BadRequest { return r.ApplicationproblemJSON400 } // GetApplicationproblemJSON401 returns the response for an HTTP 401 `application/problem+json` response -func (r UpdateDeploymentEnvironmentVariableResponse) GetApplicationproblemJSON401() *Unauthorized { +func (r UpdateAppEnvironmentVariableResponse) GetApplicationproblemJSON401() *Unauthorized { return r.ApplicationproblemJSON401 } // GetApplicationproblemJSON403 returns the response for an HTTP 403 `application/problem+json` response -func (r UpdateDeploymentEnvironmentVariableResponse) GetApplicationproblemJSON403() *Forbidden { +func (r UpdateAppEnvironmentVariableResponse) GetApplicationproblemJSON403() *Forbidden { return r.ApplicationproblemJSON403 } // GetApplicationproblemJSON404 returns the response for an HTTP 404 `application/problem+json` response -func (r UpdateDeploymentEnvironmentVariableResponse) GetApplicationproblemJSON404() *NotFound { +func (r UpdateAppEnvironmentVariableResponse) GetApplicationproblemJSON404() *NotFound { return r.ApplicationproblemJSON404 } // GetApplicationproblemJSON422 returns the response for an HTTP 422 `application/problem+json` response -func (r UpdateDeploymentEnvironmentVariableResponse) GetApplicationproblemJSON422() *ValidationError { +func (r UpdateAppEnvironmentVariableResponse) GetApplicationproblemJSON422() *ValidationError { return r.ApplicationproblemJSON422 } // GetApplicationproblemJSON503 returns the response for an HTTP 503 `application/problem+json` response -func (r UpdateDeploymentEnvironmentVariableResponse) GetApplicationproblemJSON503() *ServiceUnavailable { +func (r UpdateAppEnvironmentVariableResponse) GetApplicationproblemJSON503() *ServiceUnavailable { return r.ApplicationproblemJSON503 } // GetBody returns the raw response body bytes -func (r UpdateDeploymentEnvironmentVariableResponse) GetBody() []byte { +func (r UpdateAppEnvironmentVariableResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r UpdateDeploymentEnvironmentVariableResponse) Status() string { +func (r UpdateAppEnvironmentVariableResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -6897,7 +6896,7 @@ func (r UpdateDeploymentEnvironmentVariableResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r UpdateDeploymentEnvironmentVariableResponse) StatusCode() int { +func (r UpdateAppEnvironmentVariableResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -6905,19 +6904,19 @@ func (r UpdateDeploymentEnvironmentVariableResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r UpdateDeploymentEnvironmentVariableResponse) ContentType() string { +func (r UpdateAppEnvironmentVariableResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type ListDeploymentEventsResponse struct { +type ListAppEventsResponse struct { Body []byte HTTPResponse *http.Response // JSON200 the response for an HTTP 200 `application/json` response JSON200 *struct { - Data *[]DeploymentEvent `json:"data,omitempty"` + Data *[]AppEvent `json:"data,omitempty"` // NextCursor Cursor for the next page; null when there are no more items. NextCursor *string `json:"nextCursor,omitempty"` @@ -6933,8 +6932,8 @@ type ListDeploymentEventsResponse struct { } // GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r ListDeploymentEventsResponse) GetJSON200() *struct { - Data *[]DeploymentEvent `json:"data,omitempty"` +func (r ListAppEventsResponse) GetJSON200() *struct { + Data *[]AppEvent `json:"data,omitempty"` // NextCursor Cursor for the next page; null when there are no more items. NextCursor *string `json:"nextCursor,omitempty"` @@ -6943,32 +6942,32 @@ func (r ListDeploymentEventsResponse) GetJSON200() *struct { } // GetApplicationproblemJSON401 returns the response for an HTTP 401 `application/problem+json` response -func (r ListDeploymentEventsResponse) GetApplicationproblemJSON401() *Unauthorized { +func (r ListAppEventsResponse) GetApplicationproblemJSON401() *Unauthorized { return r.ApplicationproblemJSON401 } // GetApplicationproblemJSON403 returns the response for an HTTP 403 `application/problem+json` response -func (r ListDeploymentEventsResponse) GetApplicationproblemJSON403() *Forbidden { +func (r ListAppEventsResponse) GetApplicationproblemJSON403() *Forbidden { return r.ApplicationproblemJSON403 } // GetApplicationproblemJSON404 returns the response for an HTTP 404 `application/problem+json` response -func (r ListDeploymentEventsResponse) GetApplicationproblemJSON404() *NotFound { +func (r ListAppEventsResponse) GetApplicationproblemJSON404() *NotFound { return r.ApplicationproblemJSON404 } // GetApplicationproblemJSON503 returns the response for an HTTP 503 `application/problem+json` response -func (r ListDeploymentEventsResponse) GetApplicationproblemJSON503() *ServiceUnavailable { +func (r ListAppEventsResponse) GetApplicationproblemJSON503() *ServiceUnavailable { return r.ApplicationproblemJSON503 } // GetBody returns the raw response body bytes -func (r ListDeploymentEventsResponse) GetBody() []byte { +func (r ListAppEventsResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r ListDeploymentEventsResponse) Status() string { +func (r ListAppEventsResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -6976,7 +6975,7 @@ func (r ListDeploymentEventsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r ListDeploymentEventsResponse) StatusCode() int { +func (r ListAppEventsResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -6984,18 +6983,18 @@ func (r ListDeploymentEventsResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r ListDeploymentEventsResponse) ContentType() string { +func (r ListAppEventsResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type UnfavouriteDeploymentResponse struct { +type UnfavouriteAppResponse struct { Body []byte HTTPResponse *http.Response // JSON200 the response for an HTTP 200 `application/json` response - JSON200 *Deployment + JSON200 *App // ApplicationproblemJSON401 the response for an HTTP 401 `application/problem+json` response ApplicationproblemJSON401 *Unauthorized // ApplicationproblemJSON403 the response for an HTTP 403 `application/problem+json` response @@ -7007,37 +7006,37 @@ type UnfavouriteDeploymentResponse struct { } // GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r UnfavouriteDeploymentResponse) GetJSON200() *Deployment { +func (r UnfavouriteAppResponse) GetJSON200() *App { return r.JSON200 } // GetApplicationproblemJSON401 returns the response for an HTTP 401 `application/problem+json` response -func (r UnfavouriteDeploymentResponse) GetApplicationproblemJSON401() *Unauthorized { +func (r UnfavouriteAppResponse) GetApplicationproblemJSON401() *Unauthorized { return r.ApplicationproblemJSON401 } // GetApplicationproblemJSON403 returns the response for an HTTP 403 `application/problem+json` response -func (r UnfavouriteDeploymentResponse) GetApplicationproblemJSON403() *Forbidden { +func (r UnfavouriteAppResponse) GetApplicationproblemJSON403() *Forbidden { return r.ApplicationproblemJSON403 } // GetApplicationproblemJSON404 returns the response for an HTTP 404 `application/problem+json` response -func (r UnfavouriteDeploymentResponse) GetApplicationproblemJSON404() *NotFound { +func (r UnfavouriteAppResponse) GetApplicationproblemJSON404() *NotFound { return r.ApplicationproblemJSON404 } // GetApplicationproblemJSON503 returns the response for an HTTP 503 `application/problem+json` response -func (r UnfavouriteDeploymentResponse) GetApplicationproblemJSON503() *ServiceUnavailable { +func (r UnfavouriteAppResponse) GetApplicationproblemJSON503() *ServiceUnavailable { return r.ApplicationproblemJSON503 } // GetBody returns the raw response body bytes -func (r UnfavouriteDeploymentResponse) GetBody() []byte { +func (r UnfavouriteAppResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r UnfavouriteDeploymentResponse) Status() string { +func (r UnfavouriteAppResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -7045,7 +7044,7 @@ func (r UnfavouriteDeploymentResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r UnfavouriteDeploymentResponse) StatusCode() int { +func (r UnfavouriteAppResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -7053,18 +7052,18 @@ func (r UnfavouriteDeploymentResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r UnfavouriteDeploymentResponse) ContentType() string { +func (r UnfavouriteAppResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type FavouriteDeploymentResponse struct { +type FavouriteAppResponse struct { Body []byte HTTPResponse *http.Response // JSON200 the response for an HTTP 200 `application/json` response - JSON200 *Deployment + JSON200 *App // ApplicationproblemJSON401 the response for an HTTP 401 `application/problem+json` response ApplicationproblemJSON401 *Unauthorized // ApplicationproblemJSON403 the response for an HTTP 403 `application/problem+json` response @@ -7076,37 +7075,37 @@ type FavouriteDeploymentResponse struct { } // GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r FavouriteDeploymentResponse) GetJSON200() *Deployment { +func (r FavouriteAppResponse) GetJSON200() *App { return r.JSON200 } // GetApplicationproblemJSON401 returns the response for an HTTP 401 `application/problem+json` response -func (r FavouriteDeploymentResponse) GetApplicationproblemJSON401() *Unauthorized { +func (r FavouriteAppResponse) GetApplicationproblemJSON401() *Unauthorized { return r.ApplicationproblemJSON401 } // GetApplicationproblemJSON403 returns the response for an HTTP 403 `application/problem+json` response -func (r FavouriteDeploymentResponse) GetApplicationproblemJSON403() *Forbidden { +func (r FavouriteAppResponse) GetApplicationproblemJSON403() *Forbidden { return r.ApplicationproblemJSON403 } // GetApplicationproblemJSON404 returns the response for an HTTP 404 `application/problem+json` response -func (r FavouriteDeploymentResponse) GetApplicationproblemJSON404() *NotFound { +func (r FavouriteAppResponse) GetApplicationproblemJSON404() *NotFound { return r.ApplicationproblemJSON404 } // GetApplicationproblemJSON503 returns the response for an HTTP 503 `application/problem+json` response -func (r FavouriteDeploymentResponse) GetApplicationproblemJSON503() *ServiceUnavailable { +func (r FavouriteAppResponse) GetApplicationproblemJSON503() *ServiceUnavailable { return r.ApplicationproblemJSON503 } // GetBody returns the raw response body bytes -func (r FavouriteDeploymentResponse) GetBody() []byte { +func (r FavouriteAppResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r FavouriteDeploymentResponse) Status() string { +func (r FavouriteAppResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -7114,7 +7113,7 @@ func (r FavouriteDeploymentResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r FavouriteDeploymentResponse) StatusCode() int { +func (r FavouriteAppResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -7122,7 +7121,7 @@ func (r FavouriteDeploymentResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r FavouriteDeploymentResponse) ContentType() string { +func (r FavouriteAppResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } @@ -7316,11 +7315,11 @@ func (r StartSyncTaskResponse) ContentType() string { return "" } -type ResumeDeploymentResponse struct { +type ResumeAppResponse struct { Body []byte HTTPResponse *http.Response // JSON202 the response for an HTTP 202 `application/json` response - JSON202 *Deployment + JSON202 *App // ApplicationproblemJSON401 the response for an HTTP 401 `application/problem+json` response ApplicationproblemJSON401 *Unauthorized // ApplicationproblemJSON403 the response for an HTTP 403 `application/problem+json` response @@ -7334,42 +7333,42 @@ type ResumeDeploymentResponse struct { } // GetJSON202 returns the response for an HTTP 202 `application/json` response -func (r ResumeDeploymentResponse) GetJSON202() *Deployment { +func (r ResumeAppResponse) GetJSON202() *App { return r.JSON202 } // GetApplicationproblemJSON401 returns the response for an HTTP 401 `application/problem+json` response -func (r ResumeDeploymentResponse) GetApplicationproblemJSON401() *Unauthorized { +func (r ResumeAppResponse) GetApplicationproblemJSON401() *Unauthorized { return r.ApplicationproblemJSON401 } // GetApplicationproblemJSON403 returns the response for an HTTP 403 `application/problem+json` response -func (r ResumeDeploymentResponse) GetApplicationproblemJSON403() *Forbidden { +func (r ResumeAppResponse) GetApplicationproblemJSON403() *Forbidden { return r.ApplicationproblemJSON403 } // GetApplicationproblemJSON404 returns the response for an HTTP 404 `application/problem+json` response -func (r ResumeDeploymentResponse) GetApplicationproblemJSON404() *NotFound { +func (r ResumeAppResponse) GetApplicationproblemJSON404() *NotFound { return r.ApplicationproblemJSON404 } // GetApplicationproblemJSON409 returns the response for an HTTP 409 `application/problem+json` response -func (r ResumeDeploymentResponse) GetApplicationproblemJSON409() *Conflict { +func (r ResumeAppResponse) GetApplicationproblemJSON409() *Conflict { return r.ApplicationproblemJSON409 } // GetApplicationproblemJSON503 returns the response for an HTTP 503 `application/problem+json` response -func (r ResumeDeploymentResponse) GetApplicationproblemJSON503() *ServiceUnavailable { +func (r ResumeAppResponse) GetApplicationproblemJSON503() *ServiceUnavailable { return r.ApplicationproblemJSON503 } // GetBody returns the raw response body bytes -func (r ResumeDeploymentResponse) GetBody() []byte { +func (r ResumeAppResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r ResumeDeploymentResponse) Status() string { +func (r ResumeAppResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -7377,7 +7376,7 @@ func (r ResumeDeploymentResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r ResumeDeploymentResponse) StatusCode() int { +func (r ResumeAppResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -7385,14 +7384,14 @@ func (r ResumeDeploymentResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r ResumeDeploymentResponse) ContentType() string { +func (r ResumeAppResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type ListDeploymentSecretsResponse struct { +type ListAppSecretsResponse struct { Body []byte HTTPResponse *http.Response // JSON200 the response for an HTTP 200 `application/json` response @@ -7417,7 +7416,7 @@ type ListDeploymentSecretsResponse struct { } // GetJSON200 returns the response for an HTTP 200 `application/json` response -func (r ListDeploymentSecretsResponse) GetJSON200() *struct { +func (r ListAppSecretsResponse) GetJSON200() *struct { Data *[]SecretAttachment `json:"data,omitempty"` // NextCursor Cursor for the next page; null when there are no more items. @@ -7427,42 +7426,42 @@ func (r ListDeploymentSecretsResponse) GetJSON200() *struct { } // GetApplicationproblemJSON400 returns the response for an HTTP 400 `application/problem+json` response -func (r ListDeploymentSecretsResponse) GetApplicationproblemJSON400() *BadRequest { +func (r ListAppSecretsResponse) GetApplicationproblemJSON400() *BadRequest { return r.ApplicationproblemJSON400 } // GetApplicationproblemJSON401 returns the response for an HTTP 401 `application/problem+json` response -func (r ListDeploymentSecretsResponse) GetApplicationproblemJSON401() *Unauthorized { +func (r ListAppSecretsResponse) GetApplicationproblemJSON401() *Unauthorized { return r.ApplicationproblemJSON401 } // GetApplicationproblemJSON403 returns the response for an HTTP 403 `application/problem+json` response -func (r ListDeploymentSecretsResponse) GetApplicationproblemJSON403() *Forbidden { +func (r ListAppSecretsResponse) GetApplicationproblemJSON403() *Forbidden { return r.ApplicationproblemJSON403 } // GetApplicationproblemJSON404 returns the response for an HTTP 404 `application/problem+json` response -func (r ListDeploymentSecretsResponse) GetApplicationproblemJSON404() *NotFound { +func (r ListAppSecretsResponse) GetApplicationproblemJSON404() *NotFound { return r.ApplicationproblemJSON404 } // GetApplicationproblemJSON422 returns the response for an HTTP 422 `application/problem+json` response -func (r ListDeploymentSecretsResponse) GetApplicationproblemJSON422() *ValidationError { +func (r ListAppSecretsResponse) GetApplicationproblemJSON422() *ValidationError { return r.ApplicationproblemJSON422 } // GetApplicationproblemJSON503 returns the response for an HTTP 503 `application/problem+json` response -func (r ListDeploymentSecretsResponse) GetApplicationproblemJSON503() *ServiceUnavailable { +func (r ListAppSecretsResponse) GetApplicationproblemJSON503() *ServiceUnavailable { return r.ApplicationproblemJSON503 } // GetBody returns the raw response body bytes -func (r ListDeploymentSecretsResponse) GetBody() []byte { +func (r ListAppSecretsResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r ListDeploymentSecretsResponse) Status() string { +func (r ListAppSecretsResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -7470,7 +7469,7 @@ func (r ListDeploymentSecretsResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r ListDeploymentSecretsResponse) StatusCode() int { +func (r ListAppSecretsResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -7478,14 +7477,14 @@ func (r ListDeploymentSecretsResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r ListDeploymentSecretsResponse) ContentType() string { +func (r ListAppSecretsResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type AttachDeploymentSecretResponse struct { +type AttachAppSecretResponse struct { Body []byte HTTPResponse *http.Response // ApplicationproblemJSON400 the response for an HTTP 400 `application/problem+json` response @@ -7505,47 +7504,47 @@ type AttachDeploymentSecretResponse struct { } // GetApplicationproblemJSON400 returns the response for an HTTP 400 `application/problem+json` response -func (r AttachDeploymentSecretResponse) GetApplicationproblemJSON400() *BadRequest { +func (r AttachAppSecretResponse) GetApplicationproblemJSON400() *BadRequest { return r.ApplicationproblemJSON400 } // GetApplicationproblemJSON401 returns the response for an HTTP 401 `application/problem+json` response -func (r AttachDeploymentSecretResponse) GetApplicationproblemJSON401() *Unauthorized { +func (r AttachAppSecretResponse) GetApplicationproblemJSON401() *Unauthorized { return r.ApplicationproblemJSON401 } // GetApplicationproblemJSON403 returns the response for an HTTP 403 `application/problem+json` response -func (r AttachDeploymentSecretResponse) GetApplicationproblemJSON403() *Forbidden { +func (r AttachAppSecretResponse) GetApplicationproblemJSON403() *Forbidden { return r.ApplicationproblemJSON403 } // GetApplicationproblemJSON404 returns the response for an HTTP 404 `application/problem+json` response -func (r AttachDeploymentSecretResponse) GetApplicationproblemJSON404() *NotFound { +func (r AttachAppSecretResponse) GetApplicationproblemJSON404() *NotFound { return r.ApplicationproblemJSON404 } // GetApplicationproblemJSON409 returns the response for an HTTP 409 `application/problem+json` response -func (r AttachDeploymentSecretResponse) GetApplicationproblemJSON409() *Conflict { +func (r AttachAppSecretResponse) GetApplicationproblemJSON409() *Conflict { return r.ApplicationproblemJSON409 } // GetApplicationproblemJSON422 returns the response for an HTTP 422 `application/problem+json` response -func (r AttachDeploymentSecretResponse) GetApplicationproblemJSON422() *ValidationError { +func (r AttachAppSecretResponse) GetApplicationproblemJSON422() *ValidationError { return r.ApplicationproblemJSON422 } // GetApplicationproblemJSON503 returns the response for an HTTP 503 `application/problem+json` response -func (r AttachDeploymentSecretResponse) GetApplicationproblemJSON503() *ServiceUnavailable { +func (r AttachAppSecretResponse) GetApplicationproblemJSON503() *ServiceUnavailable { return r.ApplicationproblemJSON503 } // GetBody returns the raw response body bytes -func (r AttachDeploymentSecretResponse) GetBody() []byte { +func (r AttachAppSecretResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r AttachDeploymentSecretResponse) Status() string { +func (r AttachAppSecretResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -7553,7 +7552,7 @@ func (r AttachDeploymentSecretResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r AttachDeploymentSecretResponse) StatusCode() int { +func (r AttachAppSecretResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -7561,14 +7560,14 @@ func (r AttachDeploymentSecretResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r AttachDeploymentSecretResponse) ContentType() string { +func (r AttachAppSecretResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type DetachDeploymentSecretResponse struct { +type DetachAppSecretResponse struct { Body []byte HTTPResponse *http.Response // ApplicationproblemJSON401 the response for an HTTP 401 `application/problem+json` response @@ -7584,37 +7583,37 @@ type DetachDeploymentSecretResponse struct { } // GetApplicationproblemJSON401 returns the response for an HTTP 401 `application/problem+json` response -func (r DetachDeploymentSecretResponse) GetApplicationproblemJSON401() *Unauthorized { +func (r DetachAppSecretResponse) GetApplicationproblemJSON401() *Unauthorized { return r.ApplicationproblemJSON401 } // GetApplicationproblemJSON403 returns the response for an HTTP 403 `application/problem+json` response -func (r DetachDeploymentSecretResponse) GetApplicationproblemJSON403() *Forbidden { +func (r DetachAppSecretResponse) GetApplicationproblemJSON403() *Forbidden { return r.ApplicationproblemJSON403 } // GetApplicationproblemJSON404 returns the response for an HTTP 404 `application/problem+json` response -func (r DetachDeploymentSecretResponse) GetApplicationproblemJSON404() *NotFound { +func (r DetachAppSecretResponse) GetApplicationproblemJSON404() *NotFound { return r.ApplicationproblemJSON404 } // GetApplicationproblemJSON422 returns the response for an HTTP 422 `application/problem+json` response -func (r DetachDeploymentSecretResponse) GetApplicationproblemJSON422() *ValidationError { +func (r DetachAppSecretResponse) GetApplicationproblemJSON422() *ValidationError { return r.ApplicationproblemJSON422 } // GetApplicationproblemJSON503 returns the response for an HTTP 503 `application/problem+json` response -func (r DetachDeploymentSecretResponse) GetApplicationproblemJSON503() *ServiceUnavailable { +func (r DetachAppSecretResponse) GetApplicationproblemJSON503() *ServiceUnavailable { return r.ApplicationproblemJSON503 } // GetBody returns the raw response body bytes -func (r DetachDeploymentSecretResponse) GetBody() []byte { +func (r DetachAppSecretResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r DetachDeploymentSecretResponse) Status() string { +func (r DetachAppSecretResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -7622,7 +7621,7 @@ func (r DetachDeploymentSecretResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r DetachDeploymentSecretResponse) StatusCode() int { +func (r DetachAppSecretResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -7630,18 +7629,18 @@ func (r DetachDeploymentSecretResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r DetachDeploymentSecretResponse) ContentType() string { +func (r DetachAppSecretResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } return "" } -type StopDeploymentResponse struct { +type StopAppResponse struct { Body []byte HTTPResponse *http.Response // JSON202 the response for an HTTP 202 `application/json` response - JSON202 *Deployment + JSON202 *App // ApplicationproblemJSON401 the response for an HTTP 401 `application/problem+json` response ApplicationproblemJSON401 *Unauthorized // ApplicationproblemJSON403 the response for an HTTP 403 `application/problem+json` response @@ -7655,42 +7654,42 @@ type StopDeploymentResponse struct { } // GetJSON202 returns the response for an HTTP 202 `application/json` response -func (r StopDeploymentResponse) GetJSON202() *Deployment { +func (r StopAppResponse) GetJSON202() *App { return r.JSON202 } // GetApplicationproblemJSON401 returns the response for an HTTP 401 `application/problem+json` response -func (r StopDeploymentResponse) GetApplicationproblemJSON401() *Unauthorized { +func (r StopAppResponse) GetApplicationproblemJSON401() *Unauthorized { return r.ApplicationproblemJSON401 } // GetApplicationproblemJSON403 returns the response for an HTTP 403 `application/problem+json` response -func (r StopDeploymentResponse) GetApplicationproblemJSON403() *Forbidden { +func (r StopAppResponse) GetApplicationproblemJSON403() *Forbidden { return r.ApplicationproblemJSON403 } // GetApplicationproblemJSON404 returns the response for an HTTP 404 `application/problem+json` response -func (r StopDeploymentResponse) GetApplicationproblemJSON404() *NotFound { +func (r StopAppResponse) GetApplicationproblemJSON404() *NotFound { return r.ApplicationproblemJSON404 } // GetApplicationproblemJSON409 returns the response for an HTTP 409 `application/problem+json` response -func (r StopDeploymentResponse) GetApplicationproblemJSON409() *Conflict { +func (r StopAppResponse) GetApplicationproblemJSON409() *Conflict { return r.ApplicationproblemJSON409 } // GetApplicationproblemJSON503 returns the response for an HTTP 503 `application/problem+json` response -func (r StopDeploymentResponse) GetApplicationproblemJSON503() *ServiceUnavailable { +func (r StopAppResponse) GetApplicationproblemJSON503() *ServiceUnavailable { return r.ApplicationproblemJSON503 } // GetBody returns the raw response body bytes -func (r StopDeploymentResponse) GetBody() []byte { +func (r StopAppResponse) GetBody() []byte { return r.Body } // Status returns HTTPResponse.Status -func (r StopDeploymentResponse) Status() string { +func (r StopAppResponse) Status() string { if r.HTTPResponse != nil { return r.HTTPResponse.Status } @@ -7698,7 +7697,7 @@ func (r StopDeploymentResponse) Status() string { } // StatusCode returns HTTPResponse.StatusCode -func (r StopDeploymentResponse) StatusCode() int { +func (r StopAppResponse) StatusCode() int { if r.HTTPResponse != nil { return r.HTTPResponse.StatusCode } @@ -7706,7 +7705,7 @@ func (r StopDeploymentResponse) StatusCode() int { } // ContentType is a convenience method to retrieve the Content-Type value from the HTTP response headers -func (r StopDeploymentResponse) ContentType() string { +func (r StopAppResponse) ContentType() string { if r.HTTPResponse != nil { return r.HTTPResponse.Header.Get("Content-Type") } @@ -9314,49 +9313,49 @@ func (r ListUsageEventsResponse) ContentType() string { return "" } -// GetDeploymentSummaryWithResponse Deployment summary metrics for the authenticated organisation +// GetAppSummaryWithResponse App summary metrics for the authenticated organisation // -// Aggregate dashboard metrics across all deployments owned by the authenticated organisation. Metrics whose backing system is not yet available are omitted from the response rather than reported as zero. +// Aggregate dashboard metrics across all apps owned by the authenticated organisation. Metrics whose backing system is not yet available are omitted from the response rather than reported as zero. // // Returns a wrapper object for the known response body format(s). // -// Corresponds with GET /v1/deployment-summary (the `GetDeploymentSummary` operationId). -func (c *ClientWithResponses) GetDeploymentSummaryWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetDeploymentSummaryResponse, error) { - rsp, err := c.GetDeploymentSummary(ctx, reqEditors...) +// Corresponds with GET /v1/app-summary (the `GetAppSummary` operationId). +func (c *ClientWithResponses) GetAppSummaryWithResponse(ctx context.Context, reqEditors ...RequestEditorFn) (*GetAppSummaryResponse, error) { + rsp, err := c.GetAppSummary(ctx, reqEditors...) if err != nil { return nil, err } - return ParseGetDeploymentSummaryResponse(rsp) + return ParseGetAppSummaryResponse(rsp) } -// ListDeploymentsWithResponse List deployments +// ListAppsWithResponse List apps // -// Returns a page of the organisation's deployments. Filters combine with AND; soft-deleted deployments are excluded unless `status=deleted` is requested explicitly. +// Returns a page of the organisation's apps. Filters combine with AND; soft-deleted apps are excluded unless `status=deleted` is requested explicitly. // // A `cursor` is only valid for the `sort` and filters it was issued under — reusing one across a different ordering or filter set returns `400`. // // Returns a wrapper object for the known response body format(s). // -// Corresponds with GET /v1/deployments (the `ListDeployments` operationId). -func (c *ClientWithResponses) ListDeploymentsWithResponse(ctx context.Context, params *ListDeploymentsParams, reqEditors ...RequestEditorFn) (*ListDeploymentsResponse, error) { - rsp, err := c.ListDeployments(ctx, params, reqEditors...) +// Corresponds with GET /v1/apps (the `ListApps` operationId). +func (c *ClientWithResponses) ListAppsWithResponse(ctx context.Context, params *ListAppsParams, reqEditors ...RequestEditorFn) (*ListAppsResponse, error) { + rsp, err := c.ListApps(ctx, params, reqEditors...) if err != nil { return nil, err } - return ParseListDeploymentsResponse(rsp) + return ParseListAppsResponse(rsp) } -// CreateDeploymentWithBodyWithResponse Create a deployment +// CreateAppWithBodyWithResponse Create an app // -// Creates a deployment together with its worker configuration, environment variables and endpoints, and records version `1` — the immutable description of what to deploy. The deployment starts in `initializing`, and what happens next depends on the deployment source type: +// Creates an app together with its worker configuration, environment variables and endpoints, and records version `1` — the immutable description of what to deploy. The app starts in `initializing`, and what happens next depends on the app source type: // // - `code` source: the codebase is submitted to the build pipeline; once the image is built -// and workers become healthy the deployment transitions to `active` and `activeVersionId` -// points at that version. If the build, validation, or rollout fails the deployment is +// and workers become healthy the app transitions to `active` and `activeVersionId` +// points at that version. If the build, validation, or rollout fails the app is // marked `failed`. // // - `container` source: no build step, so the version carries no `buildId`. No worker runs -// from a container source yet, so the deployment stays `initializing` and does not serve +// from a container source yet, so the app stays `initializing` and does not serve // inference — poll `active` only for a `code` source. // // `activeVersionId` is null until a rollout completes: a version records what should run, and only a finished deploy says what does. @@ -9365,26 +9364,26 @@ func (c *ClientWithResponses) ListDeploymentsWithResponse(ctx context.Context, p // // Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s). // -// Corresponds with POST /v1/deployments (the `CreateDeployment` operationId). -func (c *ClientWithResponses) CreateDeploymentWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateDeploymentResponse, error) { - rsp, err := c.CreateDeploymentWithBody(ctx, contentType, body, reqEditors...) +// Corresponds with POST /v1/apps (the `CreateApp` operationId). +func (c *ClientWithResponses) CreateAppWithBodyWithResponse(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*CreateAppResponse, error) { + rsp, err := c.CreateAppWithBody(ctx, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseCreateDeploymentResponse(rsp) + return ParseCreateAppResponse(rsp) } -// CreateDeploymentWithResponse Create a deployment +// CreateAppWithResponse Create an app // -// Creates a deployment together with its worker configuration, environment variables and endpoints, and records version `1` — the immutable description of what to deploy. The deployment starts in `initializing`, and what happens next depends on the deployment source type: +// Creates an app together with its worker configuration, environment variables and endpoints, and records version `1` — the immutable description of what to deploy. The app starts in `initializing`, and what happens next depends on the app source type: // // - `code` source: the codebase is submitted to the build pipeline; once the image is built -// and workers become healthy the deployment transitions to `active` and `activeVersionId` -// points at that version. If the build, validation, or rollout fails the deployment is +// and workers become healthy the app transitions to `active` and `activeVersionId` +// points at that version. If the build, validation, or rollout fails the app is // marked `failed`. // // - `container` source: no build step, so the version carries no `buildId`. No worker runs -// from a container source yet, so the deployment stays `initializing` and does not serve +// from a container source yet, so the app stays `initializing` and does not serve // inference — poll `active` only for a `code` source. // // `activeVersionId` is null until a rollout completes: a version records what should run, and only a finished deploy says what does. @@ -9393,57 +9392,57 @@ func (c *ClientWithResponses) CreateDeploymentWithBodyWithResponse(ctx context.C // // Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s). // -// Corresponds with POST /v1/deployments (the `CreateDeployment` operationId). -func (c *ClientWithResponses) CreateDeploymentWithResponse(ctx context.Context, body CreateDeploymentJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateDeploymentResponse, error) { - rsp, err := c.CreateDeployment(ctx, body, reqEditors...) +// Corresponds with POST /v1/apps (the `CreateApp` operationId). +func (c *ClientWithResponses) CreateAppWithResponse(ctx context.Context, body CreateAppJSONRequestBody, reqEditors ...RequestEditorFn) (*CreateAppResponse, error) { + rsp, err := c.CreateApp(ctx, body, reqEditors...) if err != nil { return nil, err } - return ParseCreateDeploymentResponse(rsp) + return ParseCreateAppResponse(rsp) } -// DeleteDeploymentWithResponse Delete a deployment +// DeleteAppWithResponse Delete an app // -// Soft delete. Sets `status = deleting` and returns `202` once that intent is persisted. Router removal, cancelling in-progress builds, and worker drain (`draining → stopping → stopped`) are performed asynchronously by the deployer/Scaler; `status` becomes `deleted` once all workers stop. All rows are retained for billing finalisation, audit, and usage history. Idempotent if the deployment is already `deleting`. +// Soft delete. Sets `status = deleting` and returns `202` once that intent is persisted. Router removal, cancelling in-progress builds, and worker drain (`draining → stopping → stopped`) are performed asynchronously by the deployer/Scaler; `status` becomes `deleted` once all workers stop. All rows are retained for billing finalisation, audit, and usage history. Idempotent if the app is already `deleting`. // // Returns a wrapper object for the known response body format(s). // -// Corresponds with DELETE /v1/deployments/{deploymentId} (the `DeleteDeployment` operationId). -func (c *ClientWithResponses) DeleteDeploymentWithResponse(ctx context.Context, deploymentId DeploymentId, reqEditors ...RequestEditorFn) (*DeleteDeploymentResponse, error) { - rsp, err := c.DeleteDeployment(ctx, deploymentId, reqEditors...) +// Corresponds with DELETE /v1/apps/{appId} (the `DeleteApp` operationId). +func (c *ClientWithResponses) DeleteAppWithResponse(ctx context.Context, appId AppId, reqEditors ...RequestEditorFn) (*DeleteAppResponse, error) { + rsp, err := c.DeleteApp(ctx, appId, reqEditors...) if err != nil { return nil, err } - return ParseDeleteDeploymentResponse(rsp) + return ParseDeleteAppResponse(rsp) } -// GetDeploymentWithResponse Get a deployment +// GetAppWithResponse Get an app // // Returns a wrapper object for the known response body format(s). // -// Corresponds with GET /v1/deployments/{deploymentId} (the `GetDeployment` operationId). -func (c *ClientWithResponses) GetDeploymentWithResponse(ctx context.Context, deploymentId DeploymentId, reqEditors ...RequestEditorFn) (*GetDeploymentResponse, error) { - rsp, err := c.GetDeployment(ctx, deploymentId, reqEditors...) +// Corresponds with GET /v1/apps/{appId} (the `GetApp` operationId). +func (c *ClientWithResponses) GetAppWithResponse(ctx context.Context, appId AppId, reqEditors ...RequestEditorFn) (*GetAppResponse, error) { + rsp, err := c.GetApp(ctx, appId, reqEditors...) if err != nil { return nil, err } - return ParseGetDeploymentResponse(rsp) + return ParseGetAppResponse(rsp) } -// UpdateDeploymentWithBodyWithResponse Update a deployment +// UpdateAppWithBodyWithResponse Update an app // -// Patches one or more aspects of a deployment in place. All fields are optional; omitted fields are left unchanged. Valid in any non-`deleted` status, including `stopped` (changes apply on `resume`). Lifecycle transitions use the dedicated `deploy`, `stop`, `resume`, and `delete` operations. +// Patches one or more aspects of an app in place. All fields are optional; omitted fields are left unchanged. Valid in any non-`deleted` status, including `stopped` (changes apply on `resume`). Lifecycle transitions use the dedicated `deploy`, `stop`, `resume`, and `delete` operations. // -// **Currently persisted:** `deploymentName` and `configuration` only. Supplying `deploymentSource`, `secrets`, `environmentVariables`, or `endpoints` returns `422` (bulk env-var replace is not wired — use the dedicated `/environment-variables` endpoints for individual keys). +// **Currently persisted:** `appName` and `configuration` only. Supplying `appSource`, `secrets`, `environmentVariables`, or `endpoints` returns `422` (bulk env-var replace is not wired — use the dedicated `/environment-variables` endpoints for individual keys). // // Target behaviour (once fully wired): // - `configuration`: applied on the next Scaler cycle; triggers a rollout so workers -// restart with the new configuration. If the rollout fails, the deployment remains on +// restart with the new configuration. If the rollout fails, the app remains on // the previous configuration. // -// - `deploymentSource`: triggers a build (for `code` sources) or image validation (for `container` +// - `appSource`: triggers a build (for `code` sources) or image validation (for `container` // sources); on success the new version is deployed automatically. If the build or -// validation fails, the deployment remains on the previous version. +// validation fails, the app remains on the previous version. // // - `secrets` / `environmentVariables` / `endpoints`: the supplied array **replaces** the // current set — any item absent from the request is deleted. Endpoints take effect @@ -9452,30 +9451,30 @@ func (c *ClientWithResponses) GetDeploymentWithResponse(ctx context.Context, dep // // Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s). // -// Corresponds with PATCH /v1/deployments/{deploymentId} (the `UpdateDeployment` operationId). -func (c *ClientWithResponses) UpdateDeploymentWithBodyWithResponse(ctx context.Context, deploymentId DeploymentId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateDeploymentResponse, error) { - rsp, err := c.UpdateDeploymentWithBody(ctx, deploymentId, contentType, body, reqEditors...) +// Corresponds with PATCH /v1/apps/{appId} (the `UpdateApp` operationId). +func (c *ClientWithResponses) UpdateAppWithBodyWithResponse(ctx context.Context, appId AppId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateAppResponse, error) { + rsp, err := c.UpdateAppWithBody(ctx, appId, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseUpdateDeploymentResponse(rsp) + return ParseUpdateAppResponse(rsp) } -// UpdateDeploymentWithResponse Update a deployment +// UpdateAppWithResponse Update an app // -// Patches one or more aspects of a deployment in place. All fields are optional; omitted fields are left unchanged. Valid in any non-`deleted` status, including `stopped` (changes apply on `resume`). Lifecycle transitions use the dedicated `deploy`, `stop`, `resume`, and `delete` operations. +// Patches one or more aspects of an app in place. All fields are optional; omitted fields are left unchanged. Valid in any non-`deleted` status, including `stopped` (changes apply on `resume`). Lifecycle transitions use the dedicated `deploy`, `stop`, `resume`, and `delete` operations. // -// **Currently persisted:** `deploymentName` and `configuration` only. Supplying `deploymentSource`, `secrets`, `environmentVariables`, or `endpoints` returns `422` (bulk env-var replace is not wired — use the dedicated `/environment-variables` endpoints for individual keys). +// **Currently persisted:** `appName` and `configuration` only. Supplying `appSource`, `secrets`, `environmentVariables`, or `endpoints` returns `422` (bulk env-var replace is not wired — use the dedicated `/environment-variables` endpoints for individual keys). // // Target behaviour (once fully wired): // // - `configuration`: applied on the next Scaler cycle; triggers a rollout so workers -// restart with the new configuration. If the rollout fails, the deployment remains on +// restart with the new configuration. If the rollout fails, the app remains on // the previous configuration. // -// - `deploymentSource`: triggers a build (for `code` sources) or image validation (for `container` +// - `appSource`: triggers a build (for `code` sources) or image validation (for `container` // sources); on success the new version is deployed automatically. If the build or -// validation fails, the deployment remains on the previous version. +// validation fails, the app remains on the previous version. // // - `secrets` / `environmentVariables` / `endpoints`: the supplied array **replaces** the // current set — any item absent from the request is deleted. Endpoints take effect @@ -9484,22 +9483,22 @@ func (c *ClientWithResponses) UpdateDeploymentWithBodyWithResponse(ctx context.C // // Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s). // -// Corresponds with PATCH /v1/deployments/{deploymentId} (the `UpdateDeployment` operationId). -func (c *ClientWithResponses) UpdateDeploymentWithResponse(ctx context.Context, deploymentId DeploymentId, body UpdateDeploymentJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateDeploymentResponse, error) { - rsp, err := c.UpdateDeployment(ctx, deploymentId, body, reqEditors...) +// Corresponds with PATCH /v1/apps/{appId} (the `UpdateApp` operationId). +func (c *ClientWithResponses) UpdateAppWithResponse(ctx context.Context, appId AppId, body UpdateAppJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateAppResponse, error) { + rsp, err := c.UpdateApp(ctx, appId, body, reqEditors...) if err != nil { return nil, err } - return ParseUpdateDeploymentResponse(rsp) + return ParseUpdateAppResponse(rsp) } // ListBuildsWithResponse List builds // // Returns a wrapper object for the known response body format(s). // -// Corresponds with GET /v1/deployments/{deploymentId}/builds (the `ListBuilds` operationId). -func (c *ClientWithResponses) ListBuildsWithResponse(ctx context.Context, deploymentId DeploymentId, params *ListBuildsParams, reqEditors ...RequestEditorFn) (*ListBuildsResponse, error) { - rsp, err := c.ListBuilds(ctx, deploymentId, params, reqEditors...) +// Corresponds with GET /v1/apps/{appId}/builds (the `ListBuilds` operationId). +func (c *ClientWithResponses) ListBuildsWithResponse(ctx context.Context, appId AppId, params *ListBuildsParams, reqEditors ...RequestEditorFn) (*ListBuildsResponse, error) { + rsp, err := c.ListBuilds(ctx, appId, params, reqEditors...) if err != nil { return nil, err } @@ -9510,9 +9509,9 @@ func (c *ClientWithResponses) ListBuildsWithResponse(ctx context.Context, deploy // // Returns a wrapper object for the known response body format(s). // -// Corresponds with GET /v1/deployments/{deploymentId}/builds/{buildId} (the `GetBuild` operationId). -func (c *ClientWithResponses) GetBuildWithResponse(ctx context.Context, deploymentId DeploymentId, buildId openapi_types.UUID, reqEditors ...RequestEditorFn) (*GetBuildResponse, error) { - rsp, err := c.GetBuild(ctx, deploymentId, buildId, reqEditors...) +// Corresponds with GET /v1/apps/{appId}/builds/{buildId} (the `GetBuild` operationId). +func (c *ClientWithResponses) GetBuildWithResponse(ctx context.Context, appId AppId, buildId openapi_types.UUID, reqEditors ...RequestEditorFn) (*GetBuildResponse, error) { + rsp, err := c.GetBuild(ctx, appId, buildId, reqEditors...) if err != nil { return nil, err } @@ -9523,16 +9522,16 @@ func (c *ClientWithResponses) GetBuildWithResponse(ctx context.Context, deployme // // Activates a `ready` version by number, setting `activeVersionId` and returning `202` once that intent is persisted. Worker rollout, routing switch, and cancelling in-progress builds (`failed` with `error: "superseded"`) are performed asynchronously by the deployer/Scaler. Permitted in any addressable status, including `initializing` and `failed`. // To roll back, supply an older `versionNumber` — the operation is identical to a forward deploy. No new version is created and no rebuild happens: the version's existing image is re-applied. Re-deploying the currently active version is permitted and re-applies it. -// A deploy to a `stopped` or `stopping` deployment records the version and rolls no workload, because no workers are running: the `202` does not imply a rollout there. The recorded version is the one applied when the deployment resumes. -// If the roll of a live deployment fails, `activeVersionId` is restored to the version that kept serving, so the field keeps naming the running image. -// **Rollout** (deployer/Scaler): the platform starts workers on the target version, waits for at least one to become healthy, switches task routing to the new version, then drains old-version workers gracefully. Old workers are given a fixed, platform-managed grace period to finish in-flight tasks before being force-terminated. If new workers fail to become healthy, old workers are not drained and the deployment continues on the previous version. -// Errors: - Deploy to a `deleting` deployment returns `409 Conflict` - `versionNumber` not found or not `ready` returns `409 Conflict` - A `container`-source version returns `409 Conflict` until container deployments are supported - Deploy to a non-existent or `deleted` deployment returns `404 Not Found` +// A deploy to a `stopped` or `stopping` app records the version and rolls no workload, because no workers are running: the `202` does not imply a rollout there. The recorded version is the one applied when the app resumes. +// If the roll of a live app fails, `activeVersionId` is restored to the version that kept serving, so the field keeps naming the running image. +// **Rollout** (deployer/Scaler): the platform starts workers on the target version, waits for at least one to become healthy, switches task routing to the new version, then drains old-version workers gracefully. Old workers are given a fixed, platform-managed grace period to finish in-flight tasks before being force-terminated. If new workers fail to become healthy, old workers are not drained and the app continues on the previous version. +// Errors: - Deploy to a `deleting` app returns `409 Conflict` - `versionNumber` not found or not `ready` returns `409 Conflict` - A `container`-source version returns `409 Conflict` until container apps are supported - Deploy to a non-existent or `deleted` app returns `404 Not Found` // // Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s). // -// Corresponds with POST /v1/deployments/{deploymentId}/deploy (the `DeployVersion` operationId). -func (c *ClientWithResponses) DeployVersionWithBodyWithResponse(ctx context.Context, deploymentId DeploymentId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeployVersionResponse, error) { - rsp, err := c.DeployVersionWithBody(ctx, deploymentId, contentType, body, reqEditors...) +// Corresponds with POST /v1/apps/{appId}/deploy (the `DeployVersion` operationId). +func (c *ClientWithResponses) DeployVersionWithBodyWithResponse(ctx context.Context, appId AppId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*DeployVersionResponse, error) { + rsp, err := c.DeployVersionWithBody(ctx, appId, contentType, body, reqEditors...) if err != nil { return nil, err } @@ -9543,16 +9542,16 @@ func (c *ClientWithResponses) DeployVersionWithBodyWithResponse(ctx context.Cont // // Activates a `ready` version by number, setting `activeVersionId` and returning `202` once that intent is persisted. Worker rollout, routing switch, and cancelling in-progress builds (`failed` with `error: "superseded"`) are performed asynchronously by the deployer/Scaler. Permitted in any addressable status, including `initializing` and `failed`. // To roll back, supply an older `versionNumber` — the operation is identical to a forward deploy. No new version is created and no rebuild happens: the version's existing image is re-applied. Re-deploying the currently active version is permitted and re-applies it. -// A deploy to a `stopped` or `stopping` deployment records the version and rolls no workload, because no workers are running: the `202` does not imply a rollout there. The recorded version is the one applied when the deployment resumes. -// If the roll of a live deployment fails, `activeVersionId` is restored to the version that kept serving, so the field keeps naming the running image. -// **Rollout** (deployer/Scaler): the platform starts workers on the target version, waits for at least one to become healthy, switches task routing to the new version, then drains old-version workers gracefully. Old workers are given a fixed, platform-managed grace period to finish in-flight tasks before being force-terminated. If new workers fail to become healthy, old workers are not drained and the deployment continues on the previous version. -// Errors: - Deploy to a `deleting` deployment returns `409 Conflict` - `versionNumber` not found or not `ready` returns `409 Conflict` - A `container`-source version returns `409 Conflict` until container deployments are supported - Deploy to a non-existent or `deleted` deployment returns `404 Not Found` +// A deploy to a `stopped` or `stopping` app records the version and rolls no workload, because no workers are running: the `202` does not imply a rollout there. The recorded version is the one applied when the app resumes. +// If the roll of a live app fails, `activeVersionId` is restored to the version that kept serving, so the field keeps naming the running image. +// **Rollout** (deployer/Scaler): the platform starts workers on the target version, waits for at least one to become healthy, switches task routing to the new version, then drains old-version workers gracefully. Old workers are given a fixed, platform-managed grace period to finish in-flight tasks before being force-terminated. If new workers fail to become healthy, old workers are not drained and the app continues on the previous version. +// Errors: - Deploy to a `deleting` app returns `409 Conflict` - `versionNumber` not found or not `ready` returns `409 Conflict` - A `container`-source version returns `409 Conflict` until container apps are supported - Deploy to a non-existent or `deleted` app returns `404 Not Found` // // Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s). // -// Corresponds with POST /v1/deployments/{deploymentId}/deploy (the `DeployVersion` operationId). -func (c *ClientWithResponses) DeployVersionWithResponse(ctx context.Context, deploymentId DeploymentId, body DeployVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*DeployVersionResponse, error) { - rsp, err := c.DeployVersion(ctx, deploymentId, body, reqEditors...) +// Corresponds with POST /v1/apps/{appId}/deploy (the `DeployVersion` operationId). +func (c *ClientWithResponses) DeployVersionWithResponse(ctx context.Context, appId AppId, body DeployVersionJSONRequestBody, reqEditors ...RequestEditorFn) (*DeployVersionResponse, error) { + rsp, err := c.DeployVersion(ctx, appId, body, reqEditors...) if err != nil { return nil, err } @@ -9563,9 +9562,9 @@ func (c *ClientWithResponses) DeployVersionWithResponse(ctx context.Context, dep // // Returns a wrapper object for the known response body format(s). // -// Corresponds with GET /v1/deployments/{deploymentId}/endpoints (the `ListEndpoints` operationId). -func (c *ClientWithResponses) ListEndpointsWithResponse(ctx context.Context, deploymentId DeploymentId, params *ListEndpointsParams, reqEditors ...RequestEditorFn) (*ListEndpointsResponse, error) { - rsp, err := c.ListEndpoints(ctx, deploymentId, params, reqEditors...) +// Corresponds with GET /v1/apps/{appId}/endpoints (the `ListEndpoints` operationId). +func (c *ClientWithResponses) ListEndpointsWithResponse(ctx context.Context, appId AppId, params *ListEndpointsParams, reqEditors ...RequestEditorFn) (*ListEndpointsResponse, error) { + rsp, err := c.ListEndpoints(ctx, appId, params, reqEditors...) if err != nil { return nil, err } @@ -9576,131 +9575,131 @@ func (c *ClientWithResponses) ListEndpointsWithResponse(ctx context.Context, dep // // Returns a wrapper object for the known response body format(s). // -// Corresponds with GET /v1/deployments/{deploymentId}/endpoints/{endpointId} (the `GetEndpoint` operationId). -func (c *ClientWithResponses) GetEndpointWithResponse(ctx context.Context, deploymentId DeploymentId, endpointId openapi_types.UUID, reqEditors ...RequestEditorFn) (*GetEndpointResponse, error) { - rsp, err := c.GetEndpoint(ctx, deploymentId, endpointId, reqEditors...) +// Corresponds with GET /v1/apps/{appId}/endpoints/{endpointId} (the `GetEndpoint` operationId). +func (c *ClientWithResponses) GetEndpointWithResponse(ctx context.Context, appId AppId, endpointId openapi_types.UUID, reqEditors ...RequestEditorFn) (*GetEndpointResponse, error) { + rsp, err := c.GetEndpoint(ctx, appId, endpointId, reqEditors...) if err != nil { return nil, err } return ParseGetEndpointResponse(rsp) } -// ListDeploymentEnvironmentVariablesWithResponse List deployment environment variables +// ListAppEnvironmentVariablesWithResponse List app environment variables // // Returns a wrapper object for the known response body format(s). // -// Corresponds with GET /v1/deployments/{deploymentId}/environment-variables (the `ListDeploymentEnvironmentVariables` operationId). -func (c *ClientWithResponses) ListDeploymentEnvironmentVariablesWithResponse(ctx context.Context, deploymentId DeploymentId, params *ListDeploymentEnvironmentVariablesParams, reqEditors ...RequestEditorFn) (*ListDeploymentEnvironmentVariablesResponse, error) { - rsp, err := c.ListDeploymentEnvironmentVariables(ctx, deploymentId, params, reqEditors...) +// Corresponds with GET /v1/apps/{appId}/environment-variables (the `ListAppEnvironmentVariables` operationId). +func (c *ClientWithResponses) ListAppEnvironmentVariablesWithResponse(ctx context.Context, appId AppId, params *ListAppEnvironmentVariablesParams, reqEditors ...RequestEditorFn) (*ListAppEnvironmentVariablesResponse, error) { + rsp, err := c.ListAppEnvironmentVariables(ctx, appId, params, reqEditors...) if err != nil { return nil, err } - return ParseListDeploymentEnvironmentVariablesResponse(rsp) + return ParseListAppEnvironmentVariablesResponse(rsp) } -// DeleteDeploymentEnvironmentVariableWithResponse Delete a deployment environment variable +// DeleteAppEnvironmentVariableWithResponse Delete an app environment variable // // Returns a wrapper object for the known response body format(s). // -// Corresponds with DELETE /v1/deployments/{deploymentId}/environment-variables/{variableName} (the `DeleteDeploymentEnvironmentVariable` operationId). -func (c *ClientWithResponses) DeleteDeploymentEnvironmentVariableWithResponse(ctx context.Context, deploymentId DeploymentId, variableName EnvironmentVariableName, reqEditors ...RequestEditorFn) (*DeleteDeploymentEnvironmentVariableResponse, error) { - rsp, err := c.DeleteDeploymentEnvironmentVariable(ctx, deploymentId, variableName, reqEditors...) +// Corresponds with DELETE /v1/apps/{appId}/environment-variables/{variableName} (the `DeleteAppEnvironmentVariable` operationId). +func (c *ClientWithResponses) DeleteAppEnvironmentVariableWithResponse(ctx context.Context, appId AppId, variableName EnvironmentVariableName, reqEditors ...RequestEditorFn) (*DeleteAppEnvironmentVariableResponse, error) { + rsp, err := c.DeleteAppEnvironmentVariable(ctx, appId, variableName, reqEditors...) if err != nil { return nil, err } - return ParseDeleteDeploymentEnvironmentVariableResponse(rsp) + return ParseDeleteAppEnvironmentVariableResponse(rsp) } -// UpdateDeploymentEnvironmentVariableWithBodyWithResponse Update a deployment environment variable +// UpdateAppEnvironmentVariableWithBodyWithResponse Update an app environment variable // // Sets one environment variable, creating it if absent. Names the platform sets on the serving container itself are rejected with `422`, as they are on create. // -// A deployment holds at most 100 environment bindings in total — plain variables plus attached secrets — the same combined ceiling `DeploymentCreate.environmentVariables` declares (create rejects secrets in-request; attach grows the set later). Overwriting an existing variable is always allowed; adding one past the ceiling returns `422`. +// An app holds at most 100 environment bindings in total — plain variables plus attached secrets — the same combined ceiling `AppCreate.environmentVariables` declares (create rejects secrets in-request; attach grows the set later). Overwriting an existing variable is always allowed; adding one past the ceiling returns `422`. // -// The name must not collide with a secret already attached to this deployment (the secret's injected env var name). Secrets and plain env vars share the pod environment; a duplicate would be resolved last-wins by kubelet with no error, so the server rejects it with `422`. The reverse check applies on attach. +// The name must not collide with a secret already attached to this app (the secret's injected env var name). Secrets and plain env vars share the pod environment; a duplicate would be resolved last-wins by kubelet with no error, so the server rejects it with `422`. The reverse check applies on attach. // // Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s). // -// Corresponds with PUT /v1/deployments/{deploymentId}/environment-variables/{variableName} (the `UpdateDeploymentEnvironmentVariable` operationId). -func (c *ClientWithResponses) UpdateDeploymentEnvironmentVariableWithBodyWithResponse(ctx context.Context, deploymentId DeploymentId, variableName EnvironmentVariableName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateDeploymentEnvironmentVariableResponse, error) { - rsp, err := c.UpdateDeploymentEnvironmentVariableWithBody(ctx, deploymentId, variableName, contentType, body, reqEditors...) +// Corresponds with PUT /v1/apps/{appId}/environment-variables/{variableName} (the `UpdateAppEnvironmentVariable` operationId). +func (c *ClientWithResponses) UpdateAppEnvironmentVariableWithBodyWithResponse(ctx context.Context, appId AppId, variableName EnvironmentVariableName, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*UpdateAppEnvironmentVariableResponse, error) { + rsp, err := c.UpdateAppEnvironmentVariableWithBody(ctx, appId, variableName, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseUpdateDeploymentEnvironmentVariableResponse(rsp) + return ParseUpdateAppEnvironmentVariableResponse(rsp) } -// UpdateDeploymentEnvironmentVariableWithResponse Update a deployment environment variable +// UpdateAppEnvironmentVariableWithResponse Update an app environment variable // // Sets one environment variable, creating it if absent. Names the platform sets on the serving container itself are rejected with `422`, as they are on create. // -// A deployment holds at most 100 environment bindings in total — plain variables plus attached secrets — the same combined ceiling `DeploymentCreate.environmentVariables` declares (create rejects secrets in-request; attach grows the set later). Overwriting an existing variable is always allowed; adding one past the ceiling returns `422`. +// An app holds at most 100 environment bindings in total — plain variables plus attached secrets — the same combined ceiling `AppCreate.environmentVariables` declares (create rejects secrets in-request; attach grows the set later). Overwriting an existing variable is always allowed; adding one past the ceiling returns `422`. // -// The name must not collide with a secret already attached to this deployment (the secret's injected env var name). Secrets and plain env vars share the pod environment; a duplicate would be resolved last-wins by kubelet with no error, so the server rejects it with `422`. The reverse check applies on attach. +// The name must not collide with a secret already attached to this app (the secret's injected env var name). Secrets and plain env vars share the pod environment; a duplicate would be resolved last-wins by kubelet with no error, so the server rejects it with `422`. The reverse check applies on attach. // // Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s). // -// Corresponds with PUT /v1/deployments/{deploymentId}/environment-variables/{variableName} (the `UpdateDeploymentEnvironmentVariable` operationId). -func (c *ClientWithResponses) UpdateDeploymentEnvironmentVariableWithResponse(ctx context.Context, deploymentId DeploymentId, variableName EnvironmentVariableName, body UpdateDeploymentEnvironmentVariableJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateDeploymentEnvironmentVariableResponse, error) { - rsp, err := c.UpdateDeploymentEnvironmentVariable(ctx, deploymentId, variableName, body, reqEditors...) +// Corresponds with PUT /v1/apps/{appId}/environment-variables/{variableName} (the `UpdateAppEnvironmentVariable` operationId). +func (c *ClientWithResponses) UpdateAppEnvironmentVariableWithResponse(ctx context.Context, appId AppId, variableName EnvironmentVariableName, body UpdateAppEnvironmentVariableJSONRequestBody, reqEditors ...RequestEditorFn) (*UpdateAppEnvironmentVariableResponse, error) { + rsp, err := c.UpdateAppEnvironmentVariable(ctx, appId, variableName, body, reqEditors...) if err != nil { return nil, err } - return ParseUpdateDeploymentEnvironmentVariableResponse(rsp) + return ParseUpdateAppEnvironmentVariableResponse(rsp) } -// ListDeploymentEventsWithResponse List deployment events +// ListAppEventsWithResponse List app events // // Returns a wrapper object for the known response body format(s). // -// Corresponds with GET /v1/deployments/{deploymentId}/events (the `ListDeploymentEvents` operationId). -func (c *ClientWithResponses) ListDeploymentEventsWithResponse(ctx context.Context, deploymentId DeploymentId, params *ListDeploymentEventsParams, reqEditors ...RequestEditorFn) (*ListDeploymentEventsResponse, error) { - rsp, err := c.ListDeploymentEvents(ctx, deploymentId, params, reqEditors...) +// Corresponds with GET /v1/apps/{appId}/events (the `ListAppEvents` operationId). +func (c *ClientWithResponses) ListAppEventsWithResponse(ctx context.Context, appId AppId, params *ListAppEventsParams, reqEditors ...RequestEditorFn) (*ListAppEventsResponse, error) { + rsp, err := c.ListAppEvents(ctx, appId, params, reqEditors...) if err != nil { return nil, err } - return ParseListDeploymentEventsResponse(rsp) + return ParseListAppEventsResponse(rsp) } -// UnfavouriteDeploymentWithResponse Unfavourite a deployment +// UnfavouriteAppWithResponse Unfavourite an app // -// Removes the organisation favourite pin from the deployment. Idempotent: unfavouriting a deployment that is not favourited succeeds and returns the deployment with `isFavourite: false`. Valid in any status including `deleting` and `deleted` — unpinning is not a deployment lifecycle mutation. Missing deployments return `404`. +// Removes the organisation favourite pin from the app. Idempotent: unfavouriting an app that is not favourited succeeds and returns the app with `isFavourite: false`. Valid in any status including `deleting` and `deleted` — unpinning is not an app lifecycle mutation. Missing apps return `404`. // // Returns a wrapper object for the known response body format(s). // -// Corresponds with DELETE /v1/deployments/{deploymentId}/favourite (the `UnfavouriteDeployment` operationId). -func (c *ClientWithResponses) UnfavouriteDeploymentWithResponse(ctx context.Context, deploymentId DeploymentId, reqEditors ...RequestEditorFn) (*UnfavouriteDeploymentResponse, error) { - rsp, err := c.UnfavouriteDeployment(ctx, deploymentId, reqEditors...) +// Corresponds with DELETE /v1/apps/{appId}/favourite (the `UnfavouriteApp` operationId). +func (c *ClientWithResponses) UnfavouriteAppWithResponse(ctx context.Context, appId AppId, reqEditors ...RequestEditorFn) (*UnfavouriteAppResponse, error) { + rsp, err := c.UnfavouriteApp(ctx, appId, reqEditors...) if err != nil { return nil, err } - return ParseUnfavouriteDeploymentResponse(rsp) + return ParseUnfavouriteAppResponse(rsp) } -// FavouriteDeploymentWithResponse Favourite a deployment +// FavouriteAppWithResponse Favourite an app // -// Pins the deployment as a favourite for the authenticated organisation so the console can surface it in a Favourites section. Idempotent: favouriting an already-favourited deployment succeeds and returns the deployment with `isFavourite: true`. Deployments in `deleting` or `deleted` status cannot be favourited (`404`). Soft-delete clears any existing pin when status becomes `deleting`. +// Pins the app as a favourite for the authenticated organisation so the console can surface it in a Favourites section. Idempotent: favouriting an already-favourited app succeeds and returns the app with `isFavourite: true`. Apps in `deleting` or `deleted` status cannot be favourited (`404`). Soft-delete clears any existing pin when status becomes `deleting`. // // Returns a wrapper object for the known response body format(s). // -// Corresponds with PUT /v1/deployments/{deploymentId}/favourite (the `FavouriteDeployment` operationId). -func (c *ClientWithResponses) FavouriteDeploymentWithResponse(ctx context.Context, deploymentId DeploymentId, reqEditors ...RequestEditorFn) (*FavouriteDeploymentResponse, error) { - rsp, err := c.FavouriteDeployment(ctx, deploymentId, reqEditors...) +// Corresponds with PUT /v1/apps/{appId}/favourite (the `FavouriteApp` operationId). +func (c *ClientWithResponses) FavouriteAppWithResponse(ctx context.Context, appId AppId, reqEditors ...RequestEditorFn) (*FavouriteAppResponse, error) { + rsp, err := c.FavouriteApp(ctx, appId, reqEditors...) if err != nil { return nil, err } - return ParseFavouriteDeploymentResponse(rsp) + return ParseFavouriteAppResponse(rsp) } // StartAsyncTaskWithBodyWithResponse Start a new async task // -// Starts a new async task on `deploymentId`, routing the request body payload to an available worker. The task runs asynchronously and the response is `202`; poll `GET /v1/deployments/{deploymentId}/tasks/{taskId}` for completion. Deployments in `initializing`, `active`, or `stopping` accept invocation. `stopped`, `deleting`, and `failed` return `409 Conflict`; unknown or deleted deployments return `404 Not Found`. +// Starts a new async task on `appId`, routing the request body payload to an available worker. The task runs asynchronously and the response is `202`; poll `GET /v1/apps/{appId}/tasks/{taskId}` for completion. Apps in `initializing`, `active`, or `stopping` accept invocation. `stopped`, `deleting`, and `failed` return `409 Conflict`; unknown or deleted apps return `404 Not Found`. // // Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s). // -// Corresponds with POST /v1/deployments/{deploymentId}/invoke-async/{endpointPath} (the `StartAsyncTask` operationId). -func (c *ClientWithResponses) StartAsyncTaskWithBodyWithResponse(ctx context.Context, deploymentId DeploymentId, endpointPath EndpointPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*StartAsyncTaskResponse, error) { - rsp, err := c.StartAsyncTaskWithBody(ctx, deploymentId, endpointPath, contentType, body, reqEditors...) +// Corresponds with POST /v1/apps/{appId}/invoke-async/{endpointPath} (the `StartAsyncTask` operationId). +func (c *ClientWithResponses) StartAsyncTaskWithBodyWithResponse(ctx context.Context, appId AppId, endpointPath EndpointPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*StartAsyncTaskResponse, error) { + rsp, err := c.StartAsyncTaskWithBody(ctx, appId, endpointPath, contentType, body, reqEditors...) if err != nil { return nil, err } @@ -9709,13 +9708,13 @@ func (c *ClientWithResponses) StartAsyncTaskWithBodyWithResponse(ctx context.Con // StartAsyncTaskWithResponse Start a new async task // -// Starts a new async task on `deploymentId`, routing the request body payload to an available worker. The task runs asynchronously and the response is `202`; poll `GET /v1/deployments/{deploymentId}/tasks/{taskId}` for completion. Deployments in `initializing`, `active`, or `stopping` accept invocation. `stopped`, `deleting`, and `failed` return `409 Conflict`; unknown or deleted deployments return `404 Not Found`. +// Starts a new async task on `appId`, routing the request body payload to an available worker. The task runs asynchronously and the response is `202`; poll `GET /v1/apps/{appId}/tasks/{taskId}` for completion. Apps in `initializing`, `active`, or `stopping` accept invocation. `stopped`, `deleting`, and `failed` return `409 Conflict`; unknown or deleted apps return `404 Not Found`. // // Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s). // -// Corresponds with POST /v1/deployments/{deploymentId}/invoke-async/{endpointPath} (the `StartAsyncTask` operationId). -func (c *ClientWithResponses) StartAsyncTaskWithResponse(ctx context.Context, deploymentId DeploymentId, endpointPath EndpointPath, body StartAsyncTaskJSONRequestBody, reqEditors ...RequestEditorFn) (*StartAsyncTaskResponse, error) { - rsp, err := c.StartAsyncTask(ctx, deploymentId, endpointPath, body, reqEditors...) +// Corresponds with POST /v1/apps/{appId}/invoke-async/{endpointPath} (the `StartAsyncTask` operationId). +func (c *ClientWithResponses) StartAsyncTaskWithResponse(ctx context.Context, appId AppId, endpointPath EndpointPath, body StartAsyncTaskJSONRequestBody, reqEditors ...RequestEditorFn) (*StartAsyncTaskResponse, error) { + rsp, err := c.StartAsyncTask(ctx, appId, endpointPath, body, reqEditors...) if err != nil { return nil, err } @@ -9724,13 +9723,13 @@ func (c *ClientWithResponses) StartAsyncTaskWithResponse(ctx context.Context, de // StartSyncTaskWithBodyWithResponse Start a new sync task // -// Starts a new sync task on `deploymentId`, routing the request body payload to an available worker. The request blocks until the task is terminal and returns the result inline (`200`), or `504` if it does not complete within the wait window. When the accepted task ID is available, the response includes `taskId` for polling. Deployments in `initializing`, `active`, or `stopping` accept invocation. `stopped`, `deleting`, and `failed` return `409 Conflict`; unknown or deleted deployments return `404 Not Found`. +// Starts a new sync task on `appId`, routing the request body payload to an available worker. The request blocks until the task is terminal and returns the result inline (`200`), or `504` if it does not complete within the wait window. When the accepted task ID is available, the response includes `taskId` for polling. Apps in `initializing`, `active`, or `stopping` accept invocation. `stopped`, `deleting`, and `failed` return `409 Conflict`; unknown or deleted apps return `404 Not Found`. // // Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s). // -// Corresponds with POST /v1/deployments/{deploymentId}/invoke-sync/{endpointPath} (the `StartSyncTask` operationId). -func (c *ClientWithResponses) StartSyncTaskWithBodyWithResponse(ctx context.Context, deploymentId DeploymentId, endpointPath EndpointPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*StartSyncTaskResponse, error) { - rsp, err := c.StartSyncTaskWithBody(ctx, deploymentId, endpointPath, contentType, body, reqEditors...) +// Corresponds with POST /v1/apps/{appId}/invoke-sync/{endpointPath} (the `StartSyncTask` operationId). +func (c *ClientWithResponses) StartSyncTaskWithBodyWithResponse(ctx context.Context, appId AppId, endpointPath EndpointPath, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*StartSyncTaskResponse, error) { + rsp, err := c.StartSyncTaskWithBody(ctx, appId, endpointPath, contentType, body, reqEditors...) if err != nil { return nil, err } @@ -9739,120 +9738,120 @@ func (c *ClientWithResponses) StartSyncTaskWithBodyWithResponse(ctx context.Cont // StartSyncTaskWithResponse Start a new sync task // -// Starts a new sync task on `deploymentId`, routing the request body payload to an available worker. The request blocks until the task is terminal and returns the result inline (`200`), or `504` if it does not complete within the wait window. When the accepted task ID is available, the response includes `taskId` for polling. Deployments in `initializing`, `active`, or `stopping` accept invocation. `stopped`, `deleting`, and `failed` return `409 Conflict`; unknown or deleted deployments return `404 Not Found`. +// Starts a new sync task on `appId`, routing the request body payload to an available worker. The request blocks until the task is terminal and returns the result inline (`200`), or `504` if it does not complete within the wait window. When the accepted task ID is available, the response includes `taskId` for polling. Apps in `initializing`, `active`, or `stopping` accept invocation. `stopped`, `deleting`, and `failed` return `409 Conflict`; unknown or deleted apps return `404 Not Found`. // // Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s). // -// Corresponds with POST /v1/deployments/{deploymentId}/invoke-sync/{endpointPath} (the `StartSyncTask` operationId). -func (c *ClientWithResponses) StartSyncTaskWithResponse(ctx context.Context, deploymentId DeploymentId, endpointPath EndpointPath, body StartSyncTaskJSONRequestBody, reqEditors ...RequestEditorFn) (*StartSyncTaskResponse, error) { - rsp, err := c.StartSyncTask(ctx, deploymentId, endpointPath, body, reqEditors...) +// Corresponds with POST /v1/apps/{appId}/invoke-sync/{endpointPath} (the `StartSyncTask` operationId). +func (c *ClientWithResponses) StartSyncTaskWithResponse(ctx context.Context, appId AppId, endpointPath EndpointPath, body StartSyncTaskJSONRequestBody, reqEditors ...RequestEditorFn) (*StartSyncTaskResponse, error) { + rsp, err := c.StartSyncTask(ctx, appId, endpointPath, body, reqEditors...) if err != nil { return nil, err } return ParseStartSyncTaskResponse(rsp) } -// ResumeDeploymentWithResponse Resume a deployment +// ResumeAppWithResponse Resume an app // -// Moves the deployment to `initializing` and returns `202` once that intent is persisted. The Scaler then starts workers and sets the deployment to `active`; tasks that remained queued when the deployment stopped are consumed as workers come online. Precondition: `status = stopped`. +// Moves the app to `initializing` and returns `202` once that intent is persisted. The Scaler then starts workers and sets the app to `active`; tasks that remained queued when the app stopped are consumed as workers come online. Precondition: `status = stopped`. // // Returns a wrapper object for the known response body format(s). // -// Corresponds with POST /v1/deployments/{deploymentId}/resume (the `ResumeDeployment` operationId). -func (c *ClientWithResponses) ResumeDeploymentWithResponse(ctx context.Context, deploymentId DeploymentId, reqEditors ...RequestEditorFn) (*ResumeDeploymentResponse, error) { - rsp, err := c.ResumeDeployment(ctx, deploymentId, reqEditors...) +// Corresponds with POST /v1/apps/{appId}/resume (the `ResumeApp` operationId). +func (c *ClientWithResponses) ResumeAppWithResponse(ctx context.Context, appId AppId, reqEditors ...RequestEditorFn) (*ResumeAppResponse, error) { + rsp, err := c.ResumeApp(ctx, appId, reqEditors...) if err != nil { return nil, err } - return ParseResumeDeploymentResponse(rsp) + return ParseResumeAppResponse(rsp) } -// ListDeploymentSecretsWithResponse List secrets attached to a deployment +// ListAppSecretsWithResponse List secrets attached to an app // // Returns a wrapper object for the known response body format(s). // -// Corresponds with GET /v1/deployments/{deploymentId}/secrets (the `ListDeploymentSecrets` operationId). -func (c *ClientWithResponses) ListDeploymentSecretsWithResponse(ctx context.Context, deploymentId DeploymentId, params *ListDeploymentSecretsParams, reqEditors ...RequestEditorFn) (*ListDeploymentSecretsResponse, error) { - rsp, err := c.ListDeploymentSecrets(ctx, deploymentId, params, reqEditors...) +// Corresponds with GET /v1/apps/{appId}/secrets (the `ListAppSecrets` operationId). +func (c *ClientWithResponses) ListAppSecretsWithResponse(ctx context.Context, appId AppId, params *ListAppSecretsParams, reqEditors ...RequestEditorFn) (*ListAppSecretsResponse, error) { + rsp, err := c.ListAppSecrets(ctx, appId, params, reqEditors...) if err != nil { return nil, err } - return ParseListDeploymentSecretsResponse(rsp) + return ParseListAppSecretsResponse(rsp) } -// AttachDeploymentSecretWithBodyWithResponse Attach a secret to a deployment +// AttachAppSecretWithBodyWithResponse Attach a secret to an app // -// Records that an organisation secret is attached to a deployment under a resolved env-var name. This is a control-plane association only in this release — it does not roll workers or inject values into pods yet (ADR-019 in-pod unseal is separate). Returns `409` if the secret is already attached, or if another attach would use the same env-var name. -// The resolved name (`envVarName`, or `secretName` when omitted) must not already exist as a plain environment variable on this deployment (`deployment_configs.key`). Both sources are reserved for the same future pod env namespace, so the server rejects the collision with `422` instead of allowing a last-wins override later. The reverse check applies when setting a plain environment variable. -// A deployment holds at most 100 environment bindings in total — plain environment variables plus attached secrets — the same combined ceiling as create and the single-key env-var route. Attaching when the deployment is already at that limit returns `422`. +// Records that an organisation secret is attached to an app under a resolved env-var name. This is a control-plane association only in this release — it does not roll workers or inject values into pods yet (ADR-019 in-pod unseal is separate). Returns `409` if the secret is already attached, or if another attach would use the same env-var name. +// The resolved name (`envVarName`, or `secretName` when omitted) must not already exist as a plain environment variable on this app (`deployment_configs.key`). Both sources are reserved for the same future pod env namespace, so the server rejects the collision with `422` instead of allowing a last-wins override later. The reverse check applies when setting a plain environment variable. +// An app holds at most 100 environment bindings in total — plain environment variables plus attached secrets — the same combined ceiling as create and the single-key env-var route. Attaching when the app is already at that limit returns `422`. // // Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s). // -// Corresponds with POST /v1/deployments/{deploymentId}/secrets (the `AttachDeploymentSecret` operationId). -func (c *ClientWithResponses) AttachDeploymentSecretWithBodyWithResponse(ctx context.Context, deploymentId DeploymentId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AttachDeploymentSecretResponse, error) { - rsp, err := c.AttachDeploymentSecretWithBody(ctx, deploymentId, contentType, body, reqEditors...) +// Corresponds with POST /v1/apps/{appId}/secrets (the `AttachAppSecret` operationId). +func (c *ClientWithResponses) AttachAppSecretWithBodyWithResponse(ctx context.Context, appId AppId, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*AttachAppSecretResponse, error) { + rsp, err := c.AttachAppSecretWithBody(ctx, appId, contentType, body, reqEditors...) if err != nil { return nil, err } - return ParseAttachDeploymentSecretResponse(rsp) + return ParseAttachAppSecretResponse(rsp) } -// AttachDeploymentSecretWithResponse Attach a secret to a deployment +// AttachAppSecretWithResponse Attach a secret to an app // -// Records that an organisation secret is attached to a deployment under a resolved env-var name. This is a control-plane association only in this release — it does not roll workers or inject values into pods yet (ADR-019 in-pod unseal is separate). Returns `409` if the secret is already attached, or if another attach would use the same env-var name. -// The resolved name (`envVarName`, or `secretName` when omitted) must not already exist as a plain environment variable on this deployment (`deployment_configs.key`). Both sources are reserved for the same future pod env namespace, so the server rejects the collision with `422` instead of allowing a last-wins override later. The reverse check applies when setting a plain environment variable. -// A deployment holds at most 100 environment bindings in total — plain environment variables plus attached secrets — the same combined ceiling as create and the single-key env-var route. Attaching when the deployment is already at that limit returns `422`. +// Records that an organisation secret is attached to an app under a resolved env-var name. This is a control-plane association only in this release — it does not roll workers or inject values into pods yet (ADR-019 in-pod unseal is separate). Returns `409` if the secret is already attached, or if another attach would use the same env-var name. +// The resolved name (`envVarName`, or `secretName` when omitted) must not already exist as a plain environment variable on this app (`deployment_configs.key`). Both sources are reserved for the same future pod env namespace, so the server rejects the collision with `422` instead of allowing a last-wins override later. The reverse check applies when setting a plain environment variable. +// An app holds at most 100 environment bindings in total — plain environment variables plus attached secrets — the same combined ceiling as create and the single-key env-var route. Attaching when the app is already at that limit returns `422`. // // Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s). // -// Corresponds with POST /v1/deployments/{deploymentId}/secrets (the `AttachDeploymentSecret` operationId). -func (c *ClientWithResponses) AttachDeploymentSecretWithResponse(ctx context.Context, deploymentId DeploymentId, body AttachDeploymentSecretJSONRequestBody, reqEditors ...RequestEditorFn) (*AttachDeploymentSecretResponse, error) { - rsp, err := c.AttachDeploymentSecret(ctx, deploymentId, body, reqEditors...) +// Corresponds with POST /v1/apps/{appId}/secrets (the `AttachAppSecret` operationId). +func (c *ClientWithResponses) AttachAppSecretWithResponse(ctx context.Context, appId AppId, body AttachAppSecretJSONRequestBody, reqEditors ...RequestEditorFn) (*AttachAppSecretResponse, error) { + rsp, err := c.AttachAppSecret(ctx, appId, body, reqEditors...) if err != nil { return nil, err } - return ParseAttachDeploymentSecretResponse(rsp) + return ParseAttachAppSecretResponse(rsp) } -// DetachDeploymentSecretWithResponse Detach a secret from a deployment +// DetachAppSecretWithResponse Detach a secret from an app // // Removes the control-plane attachment. Does not roll workers in this release. // // Returns a wrapper object for the known response body format(s). // -// Corresponds with DELETE /v1/deployments/{deploymentId}/secrets/{secretName} (the `DetachDeploymentSecret` operationId). -func (c *ClientWithResponses) DetachDeploymentSecretWithResponse(ctx context.Context, deploymentId DeploymentId, secretName SecretName, reqEditors ...RequestEditorFn) (*DetachDeploymentSecretResponse, error) { - rsp, err := c.DetachDeploymentSecret(ctx, deploymentId, secretName, reqEditors...) +// Corresponds with DELETE /v1/apps/{appId}/secrets/{secretName} (the `DetachAppSecret` operationId). +func (c *ClientWithResponses) DetachAppSecretWithResponse(ctx context.Context, appId AppId, secretName SecretName, reqEditors ...RequestEditorFn) (*DetachAppSecretResponse, error) { + rsp, err := c.DetachAppSecret(ctx, appId, secretName, reqEditors...) if err != nil { return nil, err } - return ParseDetachDeploymentSecretResponse(rsp) + return ParseDetachAppSecretResponse(rsp) } -// StopDeploymentWithResponse Stop a deployment +// StopAppWithResponse Stop an app // -// Moves the deployment to `stopping` and returns `202` once that intent is persisted. Scale-to-zero and worker drain are performed asynchronously by the Scaler; `status` becomes `stopped` once all workers drain. In-flight tasks have a fixed, platform-managed grace period to complete; workers that exceed it are force-terminated and their tasks return to the queue per delivery guarantees. New task submissions remain accepted while `stopping`; after the deployment reaches `stopped`, submissions return `409 Conflict`. Precondition: `status = active`. +// Moves the app to `stopping` and returns `202` once that intent is persisted. Scale-to-zero and worker drain are performed asynchronously by the Scaler; `status` becomes `stopped` once all workers drain. In-flight tasks have a fixed, platform-managed grace period to complete; workers that exceed it are force-terminated and their tasks return to the queue per delivery guarantees. New task submissions remain accepted while `stopping`; after the app reaches `stopped`, submissions return `409 Conflict`. Precondition: `status = active`. // // Returns a wrapper object for the known response body format(s). // -// Corresponds with POST /v1/deployments/{deploymentId}/stop (the `StopDeployment` operationId). -func (c *ClientWithResponses) StopDeploymentWithResponse(ctx context.Context, deploymentId DeploymentId, reqEditors ...RequestEditorFn) (*StopDeploymentResponse, error) { - rsp, err := c.StopDeployment(ctx, deploymentId, reqEditors...) +// Corresponds with POST /v1/apps/{appId}/stop (the `StopApp` operationId). +func (c *ClientWithResponses) StopAppWithResponse(ctx context.Context, appId AppId, reqEditors ...RequestEditorFn) (*StopAppResponse, error) { + rsp, err := c.StopApp(ctx, appId, reqEditors...) if err != nil { return nil, err } - return ParseStopDeploymentResponse(rsp) + return ParseStopAppResponse(rsp) } -// ListTasksWithResponse List tasks for a deployment +// ListTasksWithResponse List tasks for an app // -// Lists TTL-bounded asynchronous task metadata for this deployment so a client can recover task ids after an interrupted long-poll or CLI session. Pending includes queued, running and retrying work. Tasks appear only within the configured recovery window. A page can be empty and still have `nextCursor`; continue until it is null. Pending entries are best effort and may disappear if the recovery store restarts; tracked tasks reappear on completion. This is not persisted task history. Each submission has a new task id, so client retries can appear as separate tasks. If the deployment is `stopped`, `deleting`, or `failed`, recovery stays available. Unknown or deleted deployments return `404 Not Found`. +// Lists TTL-bounded asynchronous task metadata for this app so a client can recover task ids after an interrupted long-poll or CLI session. Pending includes queued, running and retrying work. Tasks appear only within the configured recovery window. A page can be empty and still have `nextCursor`; continue until it is null. Pending entries are best effort and may disappear if the recovery store restarts; tracked tasks reappear on completion. This is not persisted task history. Each submission has a new task id, so client retries can appear as separate tasks. If the app is `stopped`, `deleting`, or `failed`, recovery stays available. Unknown or deleted apps return `404 Not Found`. // // Returns a wrapper object for the known response body format(s). // -// Corresponds with GET /v1/deployments/{deploymentId}/tasks (the `ListTasks` operationId). -func (c *ClientWithResponses) ListTasksWithResponse(ctx context.Context, deploymentId DeploymentId, params *ListTasksParams, reqEditors ...RequestEditorFn) (*ListTasksResponse, error) { - rsp, err := c.ListTasks(ctx, deploymentId, params, reqEditors...) +// Corresponds with GET /v1/apps/{appId}/tasks (the `ListTasks` operationId). +func (c *ClientWithResponses) ListTasksWithResponse(ctx context.Context, appId AppId, params *ListTasksParams, reqEditors ...RequestEditorFn) (*ListTasksResponse, error) { + rsp, err := c.ListTasks(ctx, appId, params, reqEditors...) if err != nil { return nil, err } @@ -9861,13 +9860,13 @@ func (c *ClientWithResponses) ListTasksWithResponse(ctx context.Context, deploym // GetTaskWithResponse Get a task // -// Returns the task's current status, read through the inference transport layer from the shared result store. When `completed`, includes the result `output` and `completedAt`; when `failed`, includes `error`; when `pending`, neither is set. If the deployment is `stopped`, `deleting`, or `failed`, accepted task results stay readable. A `404 Not Found` means the task cannot currently be verified for this deployment. Because enqueue-time ownership tracking is best effort, a recently returned task ID can temporarily return `404`; retry it within the normal polling window. Unknown or deleted deployments also return `404 Not Found`. +// Returns the task's current status, read through the inference transport layer from the shared result store. When `completed`, includes the result `output` and `completedAt`; when `failed`, includes `error`; when `pending`, neither is set. If the app is `stopped`, `deleting`, or `failed`, accepted task results stay readable. A `404 Not Found` means the task cannot currently be verified for this app. Because enqueue-time ownership tracking is best effort, a recently returned task ID can temporarily return `404`; retry it within the normal polling window. Unknown or deleted apps also return `404 Not Found`. // // Returns a wrapper object for the known response body format(s). // -// Corresponds with GET /v1/deployments/{deploymentId}/tasks/{taskId} (the `GetTask` operationId). -func (c *ClientWithResponses) GetTaskWithResponse(ctx context.Context, deploymentId DeploymentId, taskId string, reqEditors ...RequestEditorFn) (*GetTaskResponse, error) { - rsp, err := c.GetTask(ctx, deploymentId, taskId, reqEditors...) +// Corresponds with GET /v1/apps/{appId}/tasks/{taskId} (the `GetTask` operationId). +func (c *ClientWithResponses) GetTaskWithResponse(ctx context.Context, appId AppId, taskId string, reqEditors ...RequestEditorFn) (*GetTaskResponse, error) { + rsp, err := c.GetTask(ctx, appId, taskId, reqEditors...) if err != nil { return nil, err } @@ -9878,9 +9877,9 @@ func (c *ClientWithResponses) GetTaskWithResponse(ctx context.Context, deploymen // // Returns a wrapper object for the known response body format(s). // -// Corresponds with GET /v1/deployments/{deploymentId}/versions (the `ListVersions` operationId). -func (c *ClientWithResponses) ListVersionsWithResponse(ctx context.Context, deploymentId DeploymentId, params *ListVersionsParams, reqEditors ...RequestEditorFn) (*ListVersionsResponse, error) { - rsp, err := c.ListVersions(ctx, deploymentId, params, reqEditors...) +// Corresponds with GET /v1/apps/{appId}/versions (the `ListVersions` operationId). +func (c *ClientWithResponses) ListVersionsWithResponse(ctx context.Context, appId AppId, params *ListVersionsParams, reqEditors ...RequestEditorFn) (*ListVersionsResponse, error) { + rsp, err := c.ListVersions(ctx, appId, params, reqEditors...) if err != nil { return nil, err } @@ -9891,9 +9890,9 @@ func (c *ClientWithResponses) ListVersionsWithResponse(ctx context.Context, depl // // Returns a wrapper object for the known response body format(s). // -// Corresponds with GET /v1/deployments/{deploymentId}/versions/{versionNumber} (the `GetVersion` operationId). -func (c *ClientWithResponses) GetVersionWithResponse(ctx context.Context, deploymentId DeploymentId, versionNumber int32, reqEditors ...RequestEditorFn) (*GetVersionResponse, error) { - rsp, err := c.GetVersion(ctx, deploymentId, versionNumber, reqEditors...) +// Corresponds with GET /v1/apps/{appId}/versions/{versionNumber} (the `GetVersion` operationId). +func (c *ClientWithResponses) GetVersionWithResponse(ctx context.Context, appId AppId, versionNumber int32, reqEditors ...RequestEditorFn) (*GetVersionResponse, error) { + rsp, err := c.GetVersion(ctx, appId, versionNumber, reqEditors...) if err != nil { return nil, err } @@ -9902,13 +9901,13 @@ func (c *ClientWithResponses) GetVersionWithResponse(ctx context.Context, deploy // ListWorkersWithResponse List workers // -// Returns a newest-first page of workers observed for the deployment (including terminal `stopped` rows until purged). Optional `status` narrows the page; a cursor must be replayed under the same status filter it was issued with. +// Returns a newest-first page of workers observed for the app (including terminal `stopped` rows until purged). Optional `status` narrows the page; a cursor must be replayed under the same status filter it was issued with. // // Returns a wrapper object for the known response body format(s). // -// Corresponds with GET /v1/deployments/{deploymentId}/workers (the `ListWorkers` operationId). -func (c *ClientWithResponses) ListWorkersWithResponse(ctx context.Context, deploymentId DeploymentId, params *ListWorkersParams, reqEditors ...RequestEditorFn) (*ListWorkersResponse, error) { - rsp, err := c.ListWorkers(ctx, deploymentId, params, reqEditors...) +// Corresponds with GET /v1/apps/{appId}/workers (the `ListWorkers` operationId). +func (c *ClientWithResponses) ListWorkersWithResponse(ctx context.Context, appId AppId, params *ListWorkersParams, reqEditors ...RequestEditorFn) (*ListWorkersResponse, error) { + rsp, err := c.ListWorkers(ctx, appId, params, reqEditors...) if err != nil { return nil, err } @@ -9917,13 +9916,13 @@ func (c *ClientWithResponses) ListWorkersWithResponse(ctx context.Context, deplo // GetWorkerWithResponse Get a worker // -// Returns one worker by id within the deployment. The id is the Kubernetes pod UID recorded by the reconciler. A worker that belongs to another deployment (or tenant) is not found. +// Returns one worker by id within the app. The id is the Kubernetes pod UID recorded by the reconciler. A worker that belongs to another app (or tenant) is not found. // // Returns a wrapper object for the known response body format(s). // -// Corresponds with GET /v1/deployments/{deploymentId}/workers/{workerId} (the `GetWorker` operationId). -func (c *ClientWithResponses) GetWorkerWithResponse(ctx context.Context, deploymentId DeploymentId, workerId WorkerId, reqEditors ...RequestEditorFn) (*GetWorkerResponse, error) { - rsp, err := c.GetWorker(ctx, deploymentId, workerId, reqEditors...) +// Corresponds with GET /v1/apps/{appId}/workers/{workerId} (the `GetWorker` operationId). +func (c *ClientWithResponses) GetWorkerWithResponse(ctx context.Context, appId AppId, workerId WorkerId, reqEditors ...RequestEditorFn) (*GetWorkerResponse, error) { + rsp, err := c.GetWorker(ctx, appId, workerId, reqEditors...) if err != nil { return nil, err } @@ -9932,7 +9931,7 @@ func (c *ClientWithResponses) GetWorkerWithResponse(ctx context.Context, deploym // ListGpuTypesWithResponse List supported GPU types and their pricing // -// Returns the global GPU type catalogue and pricing. The request requires authentication. Customer principals receive only GPU types with capacity currently offered to customers; a type whose hardware is not yet cleared for customer workloads is omitted. The Runware principal receives the full catalogue, including types not yet offered. Each entry's `pricing` is the price currently in effect; the Runware principal can read the full price history, including scheduled future changes, from `GET /v1/gpu-types/{gpuTypeId}/prices`. +// Returns the global GPU type catalogue and pricing. The request requires authentication. Customer principals receive only GPU types with capacity currently offered to customers; a type whose hardware is not yet cleared for customer workloads is omitted. The Runware principal receives the full catalogue, including retired types and types not yet offered. Retired entries carry `deletedAt`. Each entry's `pricing` is the price currently in effect; the Runware principal can read the full price history, including scheduled future changes, from `GET /v1/gpu-types/{gpuTypeId}/prices`. // // Returns a wrapper object for the known response body format(s). // @@ -9947,7 +9946,7 @@ func (c *ClientWithResponses) ListGpuTypesWithResponse(ctx context.Context, reqE // CreateGpuTypeWithBodyWithResponse Add a GPU type to the catalogue // -// Creates a new entry in the global GPU type catalogue. Restricted to the Runware platform organization. The `id` (catalogue code) is immutable after create. +// Creates a new entry in the global GPU type catalogue. Restricted to the Runware platform organization. The `id` (catalogue code) is immutable and remains reserved after retirement. // // Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s). // @@ -9962,7 +9961,7 @@ func (c *ClientWithResponses) CreateGpuTypeWithBodyWithResponse(ctx context.Cont // CreateGpuTypeWithResponse Add a GPU type to the catalogue // -// Creates a new entry in the global GPU type catalogue. Restricted to the Runware platform organization. The `id` (catalogue code) is immutable after create. +// Creates a new entry in the global GPU type catalogue. Restricted to the Runware platform organization. The `id` (catalogue code) is immutable and remains reserved after retirement. // // Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s). // @@ -9975,9 +9974,9 @@ func (c *ClientWithResponses) CreateGpuTypeWithResponse(ctx context.Context, bod return ParseCreateGpuTypeResponse(rsp) } -// DeleteGpuTypeWithResponse Remove a GPU type from the catalogue +// DeleteGpuTypeWithResponse Retire a GPU type from the catalogue // -// Deletes a GPU type from the global catalogue. Restricted to the Runware platform organization. Returns `409` if any live worker configuration still references the code. +// Soft-deletes a GPU type while preserving its code and price history. Restricted to the Runware platform organization. Returns `409` if a worker configuration or GPU pool still references the code. Retiring an already retired code returns `404`. // // Returns a wrapper object for the known response body format(s). // @@ -9992,7 +9991,7 @@ func (c *ClientWithResponses) DeleteGpuTypeWithResponse(ctx context.Context, gpu // GetGpuTypeWithResponse Get a GPU type from the catalogue // -// Returns a single entry from the global GPU type catalogue. The result is not organisation-specific, but the request still requires authentication. +// Returns an active entry from the global GPU type catalogue. Retired entries return `404`. The result is not organisation-specific, but the request still requires authentication. // // Returns a wrapper object for the known response body format(s). // @@ -10007,7 +10006,7 @@ func (c *ClientWithResponses) GetGpuTypeWithResponse(ctx context.Context, gpuTyp // UpdateGpuTypeWithBodyWithResponse Update a GPU type in the catalogue // -// Updates mutable fields of an existing GPU type. Restricted to the Runware platform organization. The catalogue code (`gpuTypeId`) cannot be changed. +// Updates mutable fields of an active GPU type. Restricted to the Runware platform organization. The catalogue code (`gpuTypeId`) cannot be changed; retired entries return `404`. // // Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s). // @@ -10022,7 +10021,7 @@ func (c *ClientWithResponses) UpdateGpuTypeWithBodyWithResponse(ctx context.Cont // UpdateGpuTypeWithResponse Update a GPU type in the catalogue // -// Updates mutable fields of an existing GPU type. Restricted to the Runware platform organization. The catalogue code (`gpuTypeId`) cannot be changed. +// Updates mutable fields of an active GPU type. Restricted to the Runware platform organization. The catalogue code (`gpuTypeId`) cannot be changed; retired entries return `404`. // // Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s). // @@ -10037,7 +10036,7 @@ func (c *ClientWithResponses) UpdateGpuTypeWithResponse(ctx context.Context, gpu // ListGpuTypePricesWithResponse List historical and future prices of a GPU type // -// Returns a page of a GPU type's prices, ordered by effectiveFrom. Restricted to the Runware platform organization: the page includes prices that are scheduled but not yet in effect. Customers read the price currently in effect from `GET /v1/gpu-types`. +// Returns a page of a GPU type's prices, ordered by effectiveFrom. Restricted to the Runware platform organization: the page includes retired types and prices that are scheduled but not yet in effect. Customers read the price currently in effect from `GET /v1/gpu-types`. // // Returns a wrapper object for the known response body format(s). // @@ -10052,7 +10051,7 @@ func (c *ClientWithResponses) ListGpuTypePricesWithResponse(ctx context.Context, // CreateGpuTypePriceWithBodyWithResponse Schedule a new price for a GPU type // -// Schedules a new price to take effect at `effectiveFrom`. Restricted to the Runware platform organization. `effectiveFrom` must be more than 7 days in the future, so downstream systems and customers get advance notice of the change; a value inside that window returns `422`. Returns `409` if the GPU type already has a price scheduled at that exact instant. +// Schedules a new price to take effect at `effectiveFrom`. Restricted to the Runware platform organization. `effectiveFrom` must normally be more than 7 days in the future. Before a GPU type is admitted or used, a later price can be added inside that window to correct its initial price. This preserves the original row and records the correction as a superseding price. Retired types return `404`; other values inside the notice window return `422`. Returns `409` if the GPU type already has a price scheduled at that exact instant. // // Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s). // @@ -10067,7 +10066,7 @@ func (c *ClientWithResponses) CreateGpuTypePriceWithBodyWithResponse(ctx context // CreateGpuTypePriceWithResponse Schedule a new price for a GPU type // -// Schedules a new price to take effect at `effectiveFrom`. Restricted to the Runware platform organization. `effectiveFrom` must be more than 7 days in the future, so downstream systems and customers get advance notice of the change; a value inside that window returns `422`. Returns `409` if the GPU type already has a price scheduled at that exact instant. +// Schedules a new price to take effect at `effectiveFrom`. Restricted to the Runware platform organization. `effectiveFrom` must normally be more than 7 days in the future. Before a GPU type is admitted or used, a later price can be added inside that window to correct its initial price. This preserves the original row and records the correction as a superseding price. Retired types return `404`; other values inside the notice window return `422`. Returns `409` if the GPU type already has a price scheduled at that exact instant. // // Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s). // @@ -10082,7 +10081,7 @@ func (c *ClientWithResponses) CreateGpuTypePriceWithResponse(ctx context.Context // DeleteGpuTypePriceWithResponse Remove a scheduled price for a GPU type // -// Deletes a scheduled price. Restricted to the Runware platform organization. Only a price whose effectiveFrom is still more than 7 days in the future can be deleted — once inside that window the price is locked in (about to take effect, or already has) and this returns `409`. +// Deletes a scheduled price. Restricted to the Runware platform organization. Only a price whose effectiveFrom is still more than 7 days in the future can be deleted — once inside that window the price is locked in (about to take effect, or already has) and this returns `409`. Retired GPU types return `404`. // // Returns a wrapper object for the known response body format(s). // @@ -10097,7 +10096,7 @@ func (c *ClientWithResponses) DeleteGpuTypePriceWithResponse(ctx context.Context // UpdateGpuTypePriceWithBodyWithResponse Update a scheduled price for a GPU type // -// Partially updates a scheduled price. Restricted to the Runware platform organization. Only a price whose current `effectiveFrom` is still more than 7 days in the future can be edited — once inside that window the price is locked in and this returns `409`. A supplied `effectiveFrom` must itself be more than 7 days in the future, returning `422` otherwise. Returns `409` if it collides with another price already scheduled at that exact instant. +// Partially updates a scheduled price. Restricted to the Runware platform organization. Only a price whose current `effectiveFrom` is still more than 7 days in the future can be edited — once inside that window the price is locked in and this returns `409`. A supplied `effectiveFrom` must itself be more than 7 days in the future, returning `422` otherwise. Retired GPU types return `404`. Returns `409` if the update collides with another price already scheduled at that exact instant. // // Takes any type of body and a specified content type, and returns a wrapper object for the known response body format(s). // @@ -10112,7 +10111,7 @@ func (c *ClientWithResponses) UpdateGpuTypePriceWithBodyWithResponse(ctx context // UpdateGpuTypePriceWithResponse Update a scheduled price for a GPU type // -// Partially updates a scheduled price. Restricted to the Runware platform organization. Only a price whose current `effectiveFrom` is still more than 7 days in the future can be edited — once inside that window the price is locked in and this returns `409`. A supplied `effectiveFrom` must itself be more than 7 days in the future, returning `422` otherwise. Returns `409` if it collides with another price already scheduled at that exact instant. +// Partially updates a scheduled price. Restricted to the Runware platform organization. Only a price whose current `effectiveFrom` is still more than 7 days in the future can be edited — once inside that window the price is locked in and this returns `409`. A supplied `effectiveFrom` must itself be more than 7 days in the future, returning `422` otherwise. Retired GPU types return `404`. Returns `409` if the update collides with another price already scheduled at that exact instant. // // Takes a body of the `application/json` content type, and returns a wrapper object for the known response body format(s). // @@ -10172,7 +10171,7 @@ func (c *ClientWithResponses) CreateSecretWithResponse(ctx context.Context, body // DeleteSecretWithResponse Delete a secret // -// Soft-deletes a secret: marks the row `pending_destroy` and bumps revision. This API does not hard-delete the row; a future GC path is expected to remove unattached `pending_destroy` secrets and release the name, but that sweep is not implemented yet. Returns `409` while any deployment still attaches it — cascade-detach is not performed here; detach each holder with `DELETE .../deployments/{id}/secrets/{name}` first. Attach/detach are control-plane records only in this release (they do not roll workers). While the row remains `pending_destroy` the name stays reserved, so create may return `409` even though list no longer shows the secret. Retries on an already-pending name are safe when no attachments remain (`204`); they still return `409` while attached. +// Soft-deletes a secret: marks the row `pending_destroy` and bumps revision. This API does not hard-delete the row; a future GC path is expected to remove unattached `pending_destroy` secrets and release the name, but that sweep is not implemented yet. Returns `409` while any app still attaches it — cascade-detach is not performed here; detach each holder with `DELETE .../apps/{id}/secrets/{name}` first. Attach/detach are control-plane records only in this release (they do not roll workers). While the row remains `pending_destroy` the name stays reserved, so create may return `409` even though list no longer shows the secret. Retries on an already-pending name are safe when no attachments remain (`204`); they still return `409` while attached. // // Returns a wrapper object for the known response body format(s). // @@ -10226,22 +10225,22 @@ func (c *ClientWithResponses) ListUsageEventsWithResponse(ctx context.Context, p return ParseListUsageEventsResponse(rsp) } -// ParseGetDeploymentSummaryResponse parses an HTTP response from a GetDeploymentSummaryWithResponse call -func ParseGetDeploymentSummaryResponse(rsp *http.Response) (*GetDeploymentSummaryResponse, error) { +// ParseGetAppSummaryResponse parses an HTTP response from a GetAppSummaryWithResponse call +func ParseGetAppSummaryResponse(rsp *http.Response) (*GetAppSummaryResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetDeploymentSummaryResponse{ + response := &GetAppSummaryResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest DeploymentSummary + var dest AppSummary if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -10273,15 +10272,15 @@ func ParseGetDeploymentSummaryResponse(rsp *http.Response) (*GetDeploymentSummar return response, nil } -// ParseListDeploymentsResponse parses an HTTP response from a ListDeploymentsWithResponse call -func ParseListDeploymentsResponse(rsp *http.Response) (*ListDeploymentsResponse, error) { +// ParseListAppsResponse parses an HTTP response from a ListAppsWithResponse call +func ParseListAppsResponse(rsp *http.Response) (*ListAppsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListDeploymentsResponse{ + response := &ListAppsResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -10289,7 +10288,7 @@ func ParseListDeploymentsResponse(rsp *http.Response) (*ListDeploymentsResponse, switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: var dest struct { - Data *[]Deployment `json:"data,omitempty"` + Data *[]App `json:"data,omitempty"` // NextCursor Cursor for the next page; null when there are no more items. NextCursor *string `json:"nextCursor,omitempty"` @@ -10339,22 +10338,22 @@ func ParseListDeploymentsResponse(rsp *http.Response) (*ListDeploymentsResponse, return response, nil } -// ParseCreateDeploymentResponse parses an HTTP response from a CreateDeploymentWithResponse call -func ParseCreateDeploymentResponse(rsp *http.Response) (*CreateDeploymentResponse, error) { +// ParseCreateAppResponse parses an HTTP response from a CreateAppWithResponse call +func ParseCreateAppResponse(rsp *http.Response) (*CreateAppResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &CreateDeploymentResponse{ + response := &CreateAppResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 201: - var dest Deployment + var dest App if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -10407,22 +10406,22 @@ func ParseCreateDeploymentResponse(rsp *http.Response) (*CreateDeploymentRespons return response, nil } -// ParseDeleteDeploymentResponse parses an HTTP response from a DeleteDeploymentWithResponse call -func ParseDeleteDeploymentResponse(rsp *http.Response) (*DeleteDeploymentResponse, error) { +// ParseDeleteAppResponse parses an HTTP response from a DeleteAppWithResponse call +func ParseDeleteAppResponse(rsp *http.Response) (*DeleteAppResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DeleteDeploymentResponse{ + response := &DeleteAppResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 202: - var dest Deployment + var dest App if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -10461,22 +10460,22 @@ func ParseDeleteDeploymentResponse(rsp *http.Response) (*DeleteDeploymentRespons return response, nil } -// ParseGetDeploymentResponse parses an HTTP response from a GetDeploymentWithResponse call -func ParseGetDeploymentResponse(rsp *http.Response) (*GetDeploymentResponse, error) { +// ParseGetAppResponse parses an HTTP response from a GetAppWithResponse call +func ParseGetAppResponse(rsp *http.Response) (*GetAppResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &GetDeploymentResponse{ + response := &GetAppResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest Deployment + var dest App if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -10515,22 +10514,22 @@ func ParseGetDeploymentResponse(rsp *http.Response) (*GetDeploymentResponse, err return response, nil } -// ParseUpdateDeploymentResponse parses an HTTP response from a UpdateDeploymentWithResponse call -func ParseUpdateDeploymentResponse(rsp *http.Response) (*UpdateDeploymentResponse, error) { +// ParseUpdateAppResponse parses an HTTP response from a UpdateAppWithResponse call +func ParseUpdateAppResponse(rsp *http.Response) (*UpdateAppResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &UpdateDeploymentResponse{ + response := &UpdateAppResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest Deployment + var dest App if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -10718,7 +10717,7 @@ func ParseDeployVersionResponse(rsp *http.Response) (*DeployVersionResponse, err switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 202: - var dest Deployment + var dest App if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -10919,15 +10918,15 @@ func ParseGetEndpointResponse(rsp *http.Response) (*GetEndpointResponse, error) return response, nil } -// ParseListDeploymentEnvironmentVariablesResponse parses an HTTP response from a ListDeploymentEnvironmentVariablesWithResponse call -func ParseListDeploymentEnvironmentVariablesResponse(rsp *http.Response) (*ListDeploymentEnvironmentVariablesResponse, error) { +// ParseListAppEnvironmentVariablesResponse parses an HTTP response from a ListAppEnvironmentVariablesWithResponse call +func ParseListAppEnvironmentVariablesResponse(rsp *http.Response) (*ListAppEnvironmentVariablesResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListDeploymentEnvironmentVariablesResponse{ + response := &ListAppEnvironmentVariablesResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -10978,15 +10977,15 @@ func ParseListDeploymentEnvironmentVariablesResponse(rsp *http.Response) (*ListD return response, nil } -// ParseDeleteDeploymentEnvironmentVariableResponse parses an HTTP response from a DeleteDeploymentEnvironmentVariableWithResponse call -func ParseDeleteDeploymentEnvironmentVariableResponse(rsp *http.Response) (*DeleteDeploymentEnvironmentVariableResponse, error) { +// ParseDeleteAppEnvironmentVariableResponse parses an HTTP response from a DeleteAppEnvironmentVariableWithResponse call +func ParseDeleteAppEnvironmentVariableResponse(rsp *http.Response) (*DeleteAppEnvironmentVariableResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DeleteDeploymentEnvironmentVariableResponse{ + response := &DeleteAppEnvironmentVariableResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -11028,15 +11027,15 @@ func ParseDeleteDeploymentEnvironmentVariableResponse(rsp *http.Response) (*Dele return response, nil } -// ParseUpdateDeploymentEnvironmentVariableResponse parses an HTTP response from a UpdateDeploymentEnvironmentVariableWithResponse call -func ParseUpdateDeploymentEnvironmentVariableResponse(rsp *http.Response) (*UpdateDeploymentEnvironmentVariableResponse, error) { +// ParseUpdateAppEnvironmentVariableResponse parses an HTTP response from a UpdateAppEnvironmentVariableWithResponse call +func ParseUpdateAppEnvironmentVariableResponse(rsp *http.Response) (*UpdateAppEnvironmentVariableResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &UpdateDeploymentEnvironmentVariableResponse{ + response := &UpdateAppEnvironmentVariableResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -11096,15 +11095,15 @@ func ParseUpdateDeploymentEnvironmentVariableResponse(rsp *http.Response) (*Upda return response, nil } -// ParseListDeploymentEventsResponse parses an HTTP response from a ListDeploymentEventsWithResponse call -func ParseListDeploymentEventsResponse(rsp *http.Response) (*ListDeploymentEventsResponse, error) { +// ParseListAppEventsResponse parses an HTTP response from a ListAppEventsWithResponse call +func ParseListAppEventsResponse(rsp *http.Response) (*ListAppEventsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListDeploymentEventsResponse{ + response := &ListAppEventsResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -11112,7 +11111,7 @@ func ParseListDeploymentEventsResponse(rsp *http.Response) (*ListDeploymentEvent switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: var dest struct { - Data *[]DeploymentEvent `json:"data,omitempty"` + Data *[]AppEvent `json:"data,omitempty"` // NextCursor Cursor for the next page; null when there are no more items. NextCursor *string `json:"nextCursor,omitempty"` @@ -11155,22 +11154,22 @@ func ParseListDeploymentEventsResponse(rsp *http.Response) (*ListDeploymentEvent return response, nil } -// ParseUnfavouriteDeploymentResponse parses an HTTP response from a UnfavouriteDeploymentWithResponse call -func ParseUnfavouriteDeploymentResponse(rsp *http.Response) (*UnfavouriteDeploymentResponse, error) { +// ParseUnfavouriteAppResponse parses an HTTP response from a UnfavouriteAppWithResponse call +func ParseUnfavouriteAppResponse(rsp *http.Response) (*UnfavouriteAppResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &UnfavouriteDeploymentResponse{ + response := &UnfavouriteAppResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest Deployment + var dest App if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -11209,22 +11208,22 @@ func ParseUnfavouriteDeploymentResponse(rsp *http.Response) (*UnfavouriteDeploym return response, nil } -// ParseFavouriteDeploymentResponse parses an HTTP response from a FavouriteDeploymentWithResponse call -func ParseFavouriteDeploymentResponse(rsp *http.Response) (*FavouriteDeploymentResponse, error) { +// ParseFavouriteAppResponse parses an HTTP response from a FavouriteAppWithResponse call +func ParseFavouriteAppResponse(rsp *http.Response) (*FavouriteAppResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &FavouriteDeploymentResponse{ + response := &FavouriteAppResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 200: - var dest Deployment + var dest App if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -11420,22 +11419,22 @@ func ParseStartSyncTaskResponse(rsp *http.Response) (*StartSyncTaskResponse, err return response, nil } -// ParseResumeDeploymentResponse parses an HTTP response from a ResumeDeploymentWithResponse call -func ParseResumeDeploymentResponse(rsp *http.Response) (*ResumeDeploymentResponse, error) { +// ParseResumeAppResponse parses an HTTP response from a ResumeAppWithResponse call +func ParseResumeAppResponse(rsp *http.Response) (*ResumeAppResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ResumeDeploymentResponse{ + response := &ResumeAppResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 202: - var dest Deployment + var dest App if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } @@ -11481,15 +11480,15 @@ func ParseResumeDeploymentResponse(rsp *http.Response) (*ResumeDeploymentRespons return response, nil } -// ParseListDeploymentSecretsResponse parses an HTTP response from a ListDeploymentSecretsWithResponse call -func ParseListDeploymentSecretsResponse(rsp *http.Response) (*ListDeploymentSecretsResponse, error) { +// ParseListAppSecretsResponse parses an HTTP response from a ListAppSecretsWithResponse call +func ParseListAppSecretsResponse(rsp *http.Response) (*ListAppSecretsResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &ListDeploymentSecretsResponse{ + response := &ListAppSecretsResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -11554,15 +11553,15 @@ func ParseListDeploymentSecretsResponse(rsp *http.Response) (*ListDeploymentSecr return response, nil } -// ParseAttachDeploymentSecretResponse parses an HTTP response from a AttachDeploymentSecretWithResponse call -func ParseAttachDeploymentSecretResponse(rsp *http.Response) (*AttachDeploymentSecretResponse, error) { +// ParseAttachAppSecretResponse parses an HTTP response from a AttachAppSecretWithResponse call +func ParseAttachAppSecretResponse(rsp *http.Response) (*AttachAppSecretResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &AttachDeploymentSecretResponse{ + response := &AttachAppSecretResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -11625,15 +11624,15 @@ func ParseAttachDeploymentSecretResponse(rsp *http.Response) (*AttachDeploymentS return response, nil } -// ParseDetachDeploymentSecretResponse parses an HTTP response from a DetachDeploymentSecretWithResponse call -func ParseDetachDeploymentSecretResponse(rsp *http.Response) (*DetachDeploymentSecretResponse, error) { +// ParseDetachAppSecretResponse parses an HTTP response from a DetachAppSecretWithResponse call +func ParseDetachAppSecretResponse(rsp *http.Response) (*DetachAppSecretResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &DetachDeploymentSecretResponse{ + response := &DetachAppSecretResponse{ Body: bodyBytes, HTTPResponse: rsp, } @@ -11682,22 +11681,22 @@ func ParseDetachDeploymentSecretResponse(rsp *http.Response) (*DetachDeploymentS return response, nil } -// ParseStopDeploymentResponse parses an HTTP response from a StopDeploymentWithResponse call -func ParseStopDeploymentResponse(rsp *http.Response) (*StopDeploymentResponse, error) { +// ParseStopAppResponse parses an HTTP response from a StopAppWithResponse call +func ParseStopAppResponse(rsp *http.Response) (*StopAppResponse, error) { bodyBytes, err := io.ReadAll(rsp.Body) defer func() { _ = rsp.Body.Close() }() if err != nil { return nil, err } - response := &StopDeploymentResponse{ + response := &StopAppResponse{ Body: bodyBytes, HTTPResponse: rsp, } switch { case strings.Contains(rsp.Header.Get("Content-Type"), "json") && rsp.StatusCode == 202: - var dest Deployment + var dest App if err := json.Unmarshal(bodyBytes, &dest); err != nil { return nil, err } diff --git a/internal/api/serverless/log_test.go b/internal/api/serverless/log_test.go index c5b5335..4c2ba4f 100644 --- a/internal/api/serverless/log_test.go +++ b/internal/api/serverless/log_test.go @@ -24,13 +24,13 @@ func TestRedactJSONValues_EnvVarList(t *testing.T) { } } -func TestRedactJSONValues_NestedDeploymentEnvVars(t *testing.T) { - in := []byte(`{"deploymentId":"my-app","environmentVariables":[{"key":"K","value":"v"}]}`) +func TestRedactJSONValues_NestedAppEnvVars(t *testing.T) { + in := []byte(`{"appId":"my-app","environmentVariables":[{"key":"K","value":"v"}]}`) out := redactJSONValues(in) if strings.Contains(string(out), `"value":"v"`) { t.Fatalf("nested value leaked: %s", out) } - if !strings.Contains(string(out), `"deploymentId":"my-app"`) { + if !strings.Contains(string(out), `"appId":"my-app"`) { t.Fatalf("other fields should remain: %s", out) } } diff --git a/internal/api/serverless/secrets.go b/internal/api/serverless/secrets.go index f18a9e2..6dbfd73 100644 --- a/internal/api/serverless/secrets.go +++ b/internal/api/serverless/secrets.go @@ -12,10 +12,10 @@ import ( // Secret is organisation-scoped secret metadata. The encrypted value is never returned. type Secret = gen.Secret -// SecretAttachment is a secret attached to a deployment. The encrypted value is never returned. +// SecretAttachment is a secret attached to an app. The encrypted value is never returned. type SecretAttachment = gen.SecretAttachment -// SecretAttach is the request body for attachDeploymentSecret. +// SecretAttach is the request body for attachAppSecret. type SecretAttach = gen.SecretAttach // SecretCreate is the request body for createSecret. @@ -33,8 +33,8 @@ const SecretTypeGeneric SecretType = gen.Generic // ListSecretsParams are optional filters for ListSecrets. type ListSecretsParams = gen.ListSecretsParams -// ListDeploymentSecretsParams are optional filters for ListDeploymentSecrets. -type ListDeploymentSecretsParams = gen.ListDeploymentSecretsParams +// ListAppSecretsParams are optional filters for ListAppSecrets. +type ListAppSecretsParams = gen.ListAppSecretsParams // ListSecrets returns a page of organisation secret metadata. func (c *Client) ListSecrets(ctx context.Context, params *ListSecretsParams) (Page[Secret], error) { @@ -138,7 +138,7 @@ func (c *Client) UpdateSecret(ctx context.Context, name string, body SecretUpdat } // DeleteSecret soft-deletes an organisation secret. Returns 409 while any -// deployment still attaches it. +// app still attaches it. func (c *Client) DeleteSecret(ctx context.Context, name string) error { if c.apiKey == "" { return transport.ErrNoAPIKey @@ -169,15 +169,15 @@ func (c *Client) DeleteSecret(ctx context.Context, name string) error { } } -// ListDeploymentSecrets returns a page of secrets attached to a deployment. -func (c *Client) ListDeploymentSecrets(ctx context.Context, deploymentID string, params *ListDeploymentSecretsParams) (Page[SecretAttachment], error) { +// ListAppSecrets returns a page of secrets attached to an app. +func (c *Client) ListAppSecrets(ctx context.Context, appID string, params *ListAppSecretsParams) (Page[SecretAttachment], error) { if c.apiKey == "" { return Page[SecretAttachment]{}, transport.ErrNoAPIKey } - resp, err := c.inner.ListDeploymentSecretsWithResponse(ctx, deploymentID, params) + resp, err := c.inner.ListAppSecretsWithResponse(ctx, appID, params) if err != nil { - return Page[SecretAttachment]{}, fmt.Errorf("list deployment secrets: %w", err) + return Page[SecretAttachment]{}, fmt.Errorf("list app secrets: %w", err) } c.logResponse(ctx, resp.HTTPResponse, nil) @@ -203,14 +203,14 @@ func (c *Client) ListDeploymentSecrets(ctx context.Context, deploymentID string, } } -// AttachDeploymentSecret records that an organisation secret is attached to a -// deployment. This is a control-plane association only in this API release. -func (c *Client) AttachDeploymentSecret(ctx context.Context, deploymentID string, body SecretAttach) error { +// AttachAppSecret records that an organisation secret is attached to an app. +// This is a control-plane association only in this API release. +func (c *Client) AttachAppSecret(ctx context.Context, appID string, body SecretAttach) error { if c.apiKey == "" { return transport.ErrNoAPIKey } - resp, err := c.inner.AttachDeploymentSecretWithResponse(ctx, deploymentID, body) + resp, err := c.inner.AttachAppSecretWithResponse(ctx, appID, body) if err != nil { return fmt.Errorf("attach secret: %w", err) } @@ -237,14 +237,14 @@ func (c *Client) AttachDeploymentSecret(ctx context.Context, deploymentID string } } -// DetachDeploymentSecret removes a secret attachment from a deployment. It does -// not delete the organisation secret. -func (c *Client) DetachDeploymentSecret(ctx context.Context, deploymentID, secretName string) error { +// DetachAppSecret removes a secret attachment from an app. It does not delete +// the organisation secret. +func (c *Client) DetachAppSecret(ctx context.Context, appID, secretName string) error { if c.apiKey == "" { return transport.ErrNoAPIKey } - resp, err := c.inner.DetachDeploymentSecretWithResponse(ctx, deploymentID, secretName) + resp, err := c.inner.DetachAppSecretWithResponse(ctx, appID, secretName) if err != nil { return fmt.Errorf("detach secret: %w", err) } diff --git a/internal/api/serverless/secrets_test.go b/internal/api/serverless/secrets_test.go index cadf950..f6c6e0b 100644 --- a/internal/api/serverless/secrets_test.go +++ b/internal/api/serverless/secrets_test.go @@ -192,7 +192,7 @@ func TestDeleteSecret_Conflict(t *testing.T) { srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", "application/problem+json") w.WriteHeader(http.StatusConflict) - _, _ = w.Write([]byte(`{"type":"about:blank","title":"Conflict","status":409,"detail":"Secret is still attached to a deployment"}`)) + _, _ = w.Write([]byte(`{"type":"about:blank","title":"Conflict","status":409,"detail":"Secret is still attached to an app"}`)) })) defer srv.Close() @@ -205,7 +205,7 @@ func TestDeleteSecret_Conflict(t *testing.T) { if re.StatusCode != http.StatusConflict { t.Errorf("expected status 409, got %d", re.StatusCode) } - if re.Message != "Secret is still attached to a deployment" { + if re.Message != "Secret is still attached to an app" { t.Errorf("unexpected message: %q", re.Message) } } @@ -217,9 +217,9 @@ func TestDeleteSecret_NoAPIKey(t *testing.T) { } } -func TestListDeploymentSecrets(t *testing.T) { +func TestListAppSecrets(t *testing.T) { srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - want := "/v1/deployments/" + testDeploymentID + "/secrets" + want := "/v1/apps/" + testAppID + "/secrets" if r.Method != http.MethodGet || r.URL.Path != want { t.Errorf("unexpected %s %s", r.Method, r.URL.Path) } @@ -243,12 +243,12 @@ func TestListDeploymentSecrets(t *testing.T) { limit := Limit(5) cursor := Cursor(testCursorPage2) c := newClient("test-key", srv.URL, slog.Default(), srv.Client()) - page, err := c.ListDeploymentSecrets(context.Background(), testDeploymentID, &ListDeploymentSecretsParams{ + page, err := c.ListAppSecrets(context.Background(), testAppID, &ListAppSecretsParams{ Limit: &limit, Cursor: &cursor, }) if err != nil { - t.Fatalf("ListDeploymentSecrets: %v", err) + t.Fatalf("ListAppSecrets: %v", err) } if len(page.Data) != 1 || page.Data[0].Name != testSecretName { t.Fatalf("unexpected attachments: %+v", page.Data) @@ -261,16 +261,16 @@ func TestListDeploymentSecrets(t *testing.T) { } } -func TestListDeploymentSecrets_NoAPIKey(t *testing.T) { +func TestListAppSecrets_NoAPIKey(t *testing.T) { c := NewClient("", "https://example.invalid", slog.Default()) - if _, err := c.ListDeploymentSecrets(context.Background(), testDeploymentID, nil); !errors.Is(err, transport.ErrNoAPIKey) { + if _, err := c.ListAppSecrets(context.Background(), testAppID, nil); !errors.Is(err, transport.ErrNoAPIKey) { t.Fatalf("expected ErrNoAPIKey, got %v", err) } } -func TestAttachDeploymentSecret(t *testing.T) { +func TestAttachAppSecret(t *testing.T) { srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - want := "/v1/deployments/" + testDeploymentID + "/secrets" + want := "/v1/apps/" + testAppID + "/secrets" if r.Method != http.MethodPost || r.URL.Path != want { t.Errorf("unexpected %s %s", r.Method, r.URL.Path) } @@ -294,15 +294,15 @@ func TestAttachDeploymentSecret(t *testing.T) { env := "FOO_KEY" c := newClient("test-key", srv.URL, slog.Default(), srv.Client()) - if err := c.AttachDeploymentSecret(context.Background(), testDeploymentID, SecretAttach{ + if err := c.AttachAppSecret(context.Background(), testAppID, SecretAttach{ SecretName: testSecretName, EnvVarName: &env, }); err != nil { - t.Fatalf("AttachDeploymentSecret: %v", err) + t.Fatalf("AttachAppSecret: %v", err) } } -func TestAttachDeploymentSecret_Conflict(t *testing.T) { +func TestAttachAppSecret_Conflict(t *testing.T) { srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", "application/problem+json") w.WriteHeader(http.StatusConflict) @@ -311,7 +311,7 @@ func TestAttachDeploymentSecret_Conflict(t *testing.T) { defer srv.Close() c := newClient("test-key", srv.URL, slog.Default(), srv.Client()) - err := c.AttachDeploymentSecret(context.Background(), testDeploymentID, SecretAttach{SecretName: testSecretName}) + err := c.AttachAppSecret(context.Background(), testAppID, SecretAttach{SecretName: testSecretName}) var re *transport.RunwareError if !errors.As(err, &re) { t.Fatalf("expected *transport.RunwareError, got %T: %v", err, err) @@ -324,7 +324,7 @@ func TestAttachDeploymentSecret_Conflict(t *testing.T) { } } -func TestAttachDeploymentSecret_Validation(t *testing.T) { +func TestAttachAppSecret_Validation(t *testing.T) { srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", "application/problem+json") w.WriteHeader(http.StatusUnprocessableEntity) @@ -339,7 +339,7 @@ func TestAttachDeploymentSecret_Validation(t *testing.T) { defer srv.Close() c := newClient("test-key", srv.URL, slog.Default(), srv.Client()) - err := c.AttachDeploymentSecret(context.Background(), testDeploymentID, SecretAttach{SecretName: testSecretName}) + err := c.AttachAppSecret(context.Background(), testAppID, SecretAttach{SecretName: testSecretName}) var re *transport.RunwareError if !errors.As(err, &re) { t.Fatalf("expected *transport.RunwareError, got %T: %v", err, err) @@ -355,16 +355,16 @@ func TestAttachDeploymentSecret_Validation(t *testing.T) { } } -func TestAttachDeploymentSecret_NoAPIKey(t *testing.T) { +func TestAttachAppSecret_NoAPIKey(t *testing.T) { c := NewClient("", "https://example.invalid", slog.Default()) - if err := c.AttachDeploymentSecret(context.Background(), testDeploymentID, SecretAttach{SecretName: testSecretName}); !errors.Is(err, transport.ErrNoAPIKey) { + if err := c.AttachAppSecret(context.Background(), testAppID, SecretAttach{SecretName: testSecretName}); !errors.Is(err, transport.ErrNoAPIKey) { t.Fatalf("expected ErrNoAPIKey, got %v", err) } } -func TestDetachDeploymentSecret(t *testing.T) { +func TestDetachAppSecret(t *testing.T) { srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - want := "/v1/deployments/" + testDeploymentID + "/secrets/" + testSecretName + want := "/v1/apps/" + testAppID + "/secrets/" + testSecretName if r.Method != http.MethodDelete || r.URL.Path != want { t.Errorf("unexpected %s %s", r.Method, r.URL.Path) } @@ -373,14 +373,14 @@ func TestDetachDeploymentSecret(t *testing.T) { defer srv.Close() c := newClient("test-key", srv.URL, slog.Default(), srv.Client()) - if err := c.DetachDeploymentSecret(context.Background(), testDeploymentID, testSecretName); err != nil { - t.Fatalf("DetachDeploymentSecret: %v", err) + if err := c.DetachAppSecret(context.Background(), testAppID, testSecretName); err != nil { + t.Fatalf("DetachAppSecret: %v", err) } } -func TestDetachDeploymentSecret_NoAPIKey(t *testing.T) { +func TestDetachAppSecret_NoAPIKey(t *testing.T) { c := NewClient("", "https://example.invalid", slog.Default()) - if err := c.DetachDeploymentSecret(context.Background(), testDeploymentID, testSecretName); !errors.Is(err, transport.ErrNoAPIKey) { + if err := c.DetachAppSecret(context.Background(), testAppID, testSecretName); !errors.Is(err, transport.ErrNoAPIKey) { t.Fatalf("expected ErrNoAPIKey, got %v", err) } } diff --git a/internal/cmd/serverless/apps.go b/internal/cmd/serverless/apps.go index a00ba93..36898d6 100644 --- a/internal/cmd/serverless/apps.go +++ b/internal/cmd/serverless/apps.go @@ -15,7 +15,7 @@ import ( ) // newAppsCmd returns the "serverless apps" command group for managing -// deployed serverless applications (API: deployments). +// deployed serverless applications. func newAppsCmd(logger *log.Logger) *cobra.Command { cmd := stubGroup("apps", "Manage deployed serverless applications") cmd.Long = "Manage deployed serverless applications on the Runware platform." @@ -69,18 +69,18 @@ func newAppsListCmd(logger *log.Logger) *cobra.Command { if err := validateListLimit(limit); err != nil { return err } - sortVal, err := parseDeploymentSort(sort) + sortVal, err := parseAppSort(sort) if err != nil { return err } - statusVal, err := parseDeploymentStatus(status) + statusVal, err := parseAppStatus(status) if err != nil { return err } - var params *serverlessapi.ListDeploymentsParams + var params *serverlessapi.ListAppsParams if limit > 0 || cursor != "" || status != "" || query != "" || gpuType != "" || sort != "" { - params = &serverlessapi.ListDeploymentsParams{} + params = &serverlessapi.ListAppsParams{} params.Limit, params.Cursor = listPageParams(limit, cursor) params.Status = statusVal params.Sort = sortVal @@ -92,14 +92,14 @@ func newAppsListCmd(logger *log.Logger) *cobra.Command { spin.Start() client := serverlessapi.NewClient(config.GetAPIKey(), config.GetServerlessBaseURL(), slog.New(logger)) - page, err := client.ListDeployments(cmd.Context(), params) + page, err := client.ListApps(cmd.Context(), params) if err != nil { spin.Stop() return err } spin.Stop() - return printPage(cmdutil.FormatFor(cmd), page, deploymentsResult(page.Data), cmd.ErrOrStderr(), extraListCursorFlags(query, gpuType, sort, status)) + return printPage(cmdutil.FormatFor(cmd), page, appsResult(page.Data), cmd.ErrOrStderr(), extraListCursorFlags(query, gpuType, sort, status)) }, } @@ -127,14 +127,14 @@ func newAppsShowCmd(logger *log.Logger) *cobra.Command { spin.Start() client := serverlessapi.NewClient(config.GetAPIKey(), config.GetServerlessBaseURL(), slog.New(logger)) - dep, err := client.GetDeployment(cmd.Context(), id) + app, err := client.GetApp(cmd.Context(), id) if err != nil { spin.Stop() return err } spin.Stop() - return output.Print(cmdutil.FormatFor(cmd), deploymentResult(*dep)) + return output.Print(cmdutil.FormatFor(cmd), appResult(*app)) }, } } @@ -279,16 +279,16 @@ func parseValidFlag[T validListFlag](flag, value, want string) (*T, error) { return &v, nil } -func parseDeploymentSort(sort string) (*serverlessapi.DeploymentSort, error) { - return parseValidFlag[serverlessapi.DeploymentSort]("--sort", sort, "createdAt, name, activity, or errorRate") +func parseAppSort(sort string) (*serverlessapi.AppSort, error) { + return parseValidFlag[serverlessapi.AppSort]("--sort", sort, "createdAt, name, activity, or errorRate") } -func parseDeploymentStatus(status string) (*serverlessapi.DeploymentStatus, error) { - return parseValidFlag[serverlessapi.DeploymentStatus]("--status", status, "active, initializing, stopping, stopped, deleting, deleted, or failed") +func parseAppStatus(status string) (*serverlessapi.AppStatus, error) { + return parseValidFlag[serverlessapi.AppStatus]("--status", status, "active, initializing, stopping, stopped, deleting, deleted, or failed") } func parseWorkerStatus(status string) (*serverlessapi.WorkerStatus, error) { - return parseValidFlag[serverlessapi.WorkerStatus]("--status", status, "pending, pulling, loading, ready, busy, draining, stopping, or stopped") + return parseValidFlag[serverlessapi.WorkerStatus]("--status", status, "pending, pulling, loading, ready, busy, unhealthy, draining, stopping, or stopped") } // extraListCursorFlags repeats the apps-list filter flags a next-page --cursor is bound to. diff --git a/internal/cmd/serverless/apps_env.go b/internal/cmd/serverless/apps_env.go index c230a35..ed190da 100644 --- a/internal/cmd/serverless/apps_env.go +++ b/internal/cmd/serverless/apps_env.go @@ -49,9 +49,9 @@ To list encrypted secrets attached to an application, use 'serverless secrets at return err } id := args[0] - var params *serverlessapi.ListDeploymentEnvironmentVariablesParams + var params *serverlessapi.ListAppEnvironmentVariablesParams if limit > 0 || cursor != "" { - params = &serverlessapi.ListDeploymentEnvironmentVariablesParams{} + params = &serverlessapi.ListAppEnvironmentVariablesParams{} params.Limit, params.Cursor = listPageParams(limit, cursor) } @@ -59,7 +59,7 @@ To list encrypted secrets attached to an application, use 'serverless secrets at spin.Start() client := serverlessapi.NewClient(config.GetAPIKey(), config.GetServerlessBaseURL(), slog.New(logger)) - page, err := client.ListDeploymentEnvironmentVariables(cmd.Context(), id, params) + page, err := client.ListAppEnvironmentVariables(cmd.Context(), id, params) if err != nil { spin.Stop() return err @@ -114,7 +114,7 @@ allowed.`, spin.Start() client := serverlessapi.NewClient(config.GetAPIKey(), config.GetServerlessBaseURL(), slog.New(logger)) - ev, err := client.UpdateDeploymentEnvironmentVariable(cmd.Context(), app, key, serverlessapi.EnvironmentVariableUpdate{ + ev, err := client.UpdateAppEnvironmentVariable(cmd.Context(), app, key, serverlessapi.EnvironmentVariableUpdate{ Value: v, }) if err != nil { @@ -150,15 +150,15 @@ func newAppsEnvUnsetCmd(logger *log.Logger) *cobra.Command { spin.Start() client := serverlessapi.NewClient(config.GetAPIKey(), config.GetServerlessBaseURL(), slog.New(logger)) - if err := client.DeleteDeploymentEnvironmentVariable(cmd.Context(), app, key); err != nil { + if err := client.DeleteAppEnvironmentVariable(cmd.Context(), app, key); err != nil { spin.Stop() return err } spin.Stop() return output.Print(cmdutil.FormatFor(cmd), envUnsetResult{ - DeploymentID: app, - Key: key, + AppID: app, + Key: key, }) }, } diff --git a/internal/cmd/serverless/apps_lifecycle.go b/internal/cmd/serverless/apps_lifecycle.go index 1e7de4a..6913fad 100644 --- a/internal/cmd/serverless/apps_lifecycle.go +++ b/internal/cmd/serverless/apps_lifecycle.go @@ -38,7 +38,7 @@ is stopped. The application must be active.`, runware serverless apps stop my-app`, Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) error { - return runLifecycle(cmd, logger, args[0], "Stopping", (*serverlessapi.Client).StopDeployment) + return runLifecycle(cmd, logger, args[0], "Stopping", (*serverlessapi.Client).StopApp) }, } } @@ -56,7 +56,7 @@ is active. The application must be stopped.`, runware serverless apps resume my-app`, Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) error { - return runLifecycle(cmd, logger, args[0], "Resuming", (*serverlessapi.Client).ResumeDeployment) + return runLifecycle(cmd, logger, args[0], "Resuming", (*serverlessapi.Client).ResumeApp) }, } } @@ -88,7 +88,7 @@ Confirmation is required unless --yes or --force is passed.`, if err := confirmDelete(id, yes || force, cmd.InOrStdin(), cmd.ErrOrStderr(), stdinIsTerminal(cmd.InOrStdin()), config.GetAPIKey()); err != nil { return err } - return runLifecycle(cmd, logger, id, "Deleting", (*serverlessapi.Client).DeleteDeployment) + return runLifecycle(cmd, logger, id, "Deleting", (*serverlessapi.Client).DeleteApp) }, } @@ -97,21 +97,21 @@ Confirmation is required unless --yes or --force is passed.`, return cmd } -type lifecycleAction func(*serverlessapi.Client, context.Context, string) (*serverlessapi.Deployment, error) +type lifecycleAction func(*serverlessapi.Client, context.Context, string) (*serverlessapi.App, error) func runLifecycle(cmd *cobra.Command, logger *log.Logger, id, verb string, action lifecycleAction) error { spin := cmdutil.NewSpinner(fmt.Sprintf("%s application %s...", verb, id)) spin.Start() client := serverlessapi.NewClient(config.GetAPIKey(), config.GetServerlessBaseURL(), slog.New(logger)) - dep, err := action(client, cmd.Context(), id) + app, err := action(client, cmd.Context(), id) if err != nil { spin.Stop() return err } spin.Stop() - return output.Print(cmdutil.FormatFor(cmd), deploymentResult(*dep)) + return output.Print(cmdutil.FormatFor(cmd), appResult(*app)) } // confirmDelete fails closed without an API key so a prompt cannot succeed diff --git a/internal/cmd/serverless/apps_scale.go b/internal/cmd/serverless/apps_scale.go index 1f00b3f..65a415f 100644 --- a/internal/cmd/serverless/apps_scale.go +++ b/internal/cmd/serverless/apps_scale.go @@ -59,7 +59,7 @@ The server rejects unsupported or invalid fields with HTTP 422.`, spin.Start() client := serverlessapi.NewClient(config.GetAPIKey(), config.GetServerlessBaseURL(), slog.New(logger)) - dep, err := client.UpdateDeployment(cmd.Context(), id, serverlessapi.DeploymentUpdate{ + app, err := client.UpdateApp(cmd.Context(), id, serverlessapi.AppUpdate{ Configuration: patch, }) if err != nil { @@ -68,7 +68,7 @@ The server rejects unsupported or invalid fields with HTTP 422.`, } spin.Stop() - return output.Print(cmdutil.FormatFor(cmd), deploymentResult(*dep)) + return output.Print(cmdutil.FormatFor(cmd), appResult(*app)) }, } diff --git a/internal/cmd/serverless/apps_scale_test.go b/internal/cmd/serverless/apps_scale_test.go index ee83bfc..4ed754b 100644 --- a/internal/cmd/serverless/apps_scale_test.go +++ b/internal/cmd/serverless/apps_scale_test.go @@ -59,7 +59,7 @@ func TestWorkerConfigPatchFromFlags_EachFlag(t *testing.T) { t.Fatalf("%s: JSON %s=%v, want %v (%s)", name, tc.key, got[tc.key], tc.want, raw) } - wrap, err := json.Marshal(serverlessapi.DeploymentUpdate{Configuration: patch}) + wrap, err := json.Marshal(serverlessapi.AppUpdate{Configuration: patch}) if err != nil { t.Fatalf("%s: marshal update: %v", name, err) } diff --git a/internal/cmd/serverless/deploy.go b/internal/cmd/serverless/deploy.go index 9d77f27..3f5acdd 100644 --- a/internal/cmd/serverless/deploy.go +++ b/internal/cmd/serverless/deploy.go @@ -35,7 +35,7 @@ The file is zipped and submitted as the application source. Worker settings are supplied via flags (a local project config via 'runware serverless init' is planned). Endpoints are derived server-side from the SDK.`, Example: ` # deploy a Python entry file - runware serverless deploy ./app.py --id my-app + runware serverless deploy ./app.py --id my-app --gpu-type h100 # override worker settings and base image runware serverless deploy ./app.py --id my-app --name "My App" \ @@ -53,7 +53,7 @@ is planned). Endpoints are derived server-side from the SDK.`, return err } - source, err := serverlessapi.NewCodeDeploymentSource(serverlessapi.CodeSourceUpsert{ + source, err := serverlessapi.NewCodeAppSource(serverlessapi.CodeSourceUpsert{ BaseImage: baseImage, Codebase: serverlessapi.CodebaseSource{ ModelFile: modelFile, @@ -65,15 +65,15 @@ is planned). Endpoints are derived server-side from the SDK.`, return fmt.Errorf("build application source: %w", err) } - body := serverlessapi.DeploymentCreate{ - DeploymentId: id, - DeploymentName: name, - DeploymentSource: source, + body := serverlessapi.AppCreate{ + AppId: id, + AppName: name, + AppSource: source, Configuration: serverlessapi.WorkerConfigCreate{ MaxWorkers: maxWorkers, IdleTtlSecs: idleTTL, ScalingDelaySecs: scalingDelay, - GpuType: optionalStringPtr(gpuType), + GpuType: gpuType, MinWorkers: optionalInt32Ptr(cmd, "min-workers", minWorkers), GpusPerWorker: optionalInt32Ptr(cmd, "gpus-per-worker", gpusPerWorker), }, @@ -83,14 +83,14 @@ is planned). Endpoints are derived server-side from the SDK.`, spin.Start() client := serverlessapi.NewClient(config.GetAPIKey(), config.GetServerlessBaseURL(), slog.New(logger)) - dep, err := client.CreateDeployment(cmd.Context(), body) + app, err := client.CreateApp(cmd.Context(), body) if err != nil { spin.Stop() return err } spin.Stop() - return output.Print(cmdutil.FormatFor(cmd), deploymentResult(*dep)) + return output.Print(cmdutil.FormatFor(cmd), appResult(*app)) }, } @@ -100,7 +100,7 @@ is planned). Endpoints are derived server-side from the SDK.`, cmd.Flags().Int32Var(&idleTTL, "idle-ttl", 60, "Idle TTL in seconds before scaling down") cmd.Flags().Int32Var(&scalingDelay, "scaling-delay", 10, "Scaling delay in seconds") cmd.Flags().StringVar(&baseImage, "base-image", "python:3.11-slim", "Builder base image") - cmd.Flags().StringVar(&gpuType, "gpu-type", "", "Preferred GPU type ID (see 'serverless gpus')") + cmd.Flags().StringVar(&gpuType, "gpu-type", "", "GPU type ID (see 'serverless gpus')") cmd.Flags().StringArrayVar(&requirements, "requirement", nil, "Additional pip package to install (repeatable)") cmd.Flags().Int32Var(&minWorkers, "min-workers", 0, "Minimum number of workers") cmd.Flags().Int32Var(&gpusPerWorker, "gpus-per-worker", 1, "GPUs allocated per worker") @@ -108,6 +108,9 @@ is planned). Endpoints are derived server-side from the SDK.`, if err := cmd.MarkFlagRequired("id"); err != nil { panic(err) } + if err := cmd.MarkFlagRequired("gpu-type"); err != nil { + panic(err) + } return cmd } diff --git a/internal/cmd/serverless/display.go b/internal/cmd/serverless/display.go index 51bfc5c..fe9252b 100644 --- a/internal/cmd/serverless/display.go +++ b/internal/cmd/serverless/display.go @@ -36,18 +36,18 @@ const ( colConcurrency = "Concurrency" ) -// deploymentResult wraps a single deployment for table/json/yaml display. -type deploymentResult serverlessapi.Deployment +// appResult wraps a single app for table/json/yaml display. +type appResult serverlessapi.App -func (r deploymentResult) Headers() []string { +func (r appResult) Headers() []string { return []string{colField, colValue} } -func (r deploymentResult) Rows() [][]any { +func (r appResult) Rows() [][]any { cfg := r.Configuration return [][]any{ - {colID, r.DeploymentId}, - {colName, r.DeploymentName}, + {colID, r.AppId}, + {colName, r.AppName}, {colStatus, string(r.Status)}, {colCreated, r.CreatedAt.Format(time.RFC3339)}, {colUpdated, r.UpdatedAt.Format(time.RFC3339)}, @@ -65,20 +65,20 @@ func (r deploymentResult) Rows() [][]any { } } -// deploymentsResult wraps a deployment list for table display. -type deploymentsResult []serverlessapi.Deployment +// appsResult wraps an app list for table display. +type appsResult []serverlessapi.App -func (r deploymentsResult) Headers() []string { +func (r appsResult) Headers() []string { return []string{colID, colName, colStatus, colCreated} } -func (r deploymentsResult) Rows() [][]any { +func (r appsResult) Rows() [][]any { rows := make([][]any, len(r)) for i := range r { d := &r[i] rows[i] = []any{ - d.DeploymentId, - d.DeploymentName, + d.AppId, + d.AppName, string(d.Status), d.CreatedAt.Format(time.RFC3339), } @@ -138,7 +138,7 @@ func (r versionResult) Rows() [][]any { return [][]any{ {"Version", r.VersionNumber}, {colID, r.Id.String()}, - {colApp, r.DeploymentId}, + {colApp, r.AppId}, {"Build", formatOptionalUUID(r.BuildId)}, {colCreated, r.CreatedAt.Format(time.RFC3339)}, } @@ -269,7 +269,7 @@ func (r secretsResult) Rows() [][]any { return rows } -// secretAttachmentsResult wraps deployment secret attachments for table display. +// secretAttachmentsResult wraps app secret attachments for table display. type secretAttachmentsResult []serverlessapi.SecretAttachment func (r secretAttachmentsResult) Headers() []string { @@ -305,9 +305,9 @@ func (r secretRemovedResult) Rows() [][]any { // secretAttachResult is the success payload for attaching a secret to an application. type secretAttachResult struct { - DeploymentID string `json:"deploymentId" yaml:"deploymentId"` - Name string `json:"name" yaml:"name"` - EnvVarName string `json:"envVarName,omitempty" yaml:"envVarName,omitempty"` + AppID string `json:"appId" yaml:"appId"` + Name string `json:"name" yaml:"name"` + EnvVarName string `json:"envVarName,omitempty" yaml:"envVarName,omitempty"` } func (r secretAttachResult) Headers() []string { @@ -315,13 +315,13 @@ func (r secretAttachResult) Headers() []string { } func (r secretAttachResult) Rows() [][]any { - return [][]any{{r.DeploymentID, r.Name, r.EnvVarName}} + return [][]any{{r.AppID, r.Name, r.EnvVarName}} } // secretDetachResult is the success payload for detaching a secret from an application. type secretDetachResult struct { - DeploymentID string `json:"deploymentId" yaml:"deploymentId"` - Name string `json:"name" yaml:"name"` + AppID string `json:"appId" yaml:"appId"` + Name string `json:"name" yaml:"name"` } func (r secretDetachResult) Headers() []string { @@ -329,7 +329,7 @@ func (r secretDetachResult) Headers() []string { } func (r secretDetachResult) Rows() [][]any { - return [][]any{{r.DeploymentID, r.Name}} + return [][]any{{r.AppID, r.Name}} } // envVarResult wraps a single plain-text environment variable for table/json/yaml display. @@ -371,8 +371,8 @@ func (r envVarsResult) Rows() [][]any { // envUnsetResult is the success payload for removing an environment variable. type envUnsetResult struct { - DeploymentID string `json:"deploymentId" yaml:"deploymentId"` - Key string `json:"key" yaml:"key"` + AppID string `json:"appId" yaml:"appId"` + Key string `json:"key" yaml:"key"` } func (r envUnsetResult) Headers() []string { @@ -380,7 +380,7 @@ func (r envUnsetResult) Headers() []string { } func (r envUnsetResult) Rows() [][]any { - return [][]any{{r.DeploymentID, r.Key}} + return [][]any{{r.AppID, r.Key}} } // printPage prints a cursor-paginated list. JSON/YAML use the API page shape diff --git a/internal/cmd/serverless/display_test.go b/internal/cmd/serverless/display_test.go index 04526fa..cc734d2 100644 --- a/internal/cmd/serverless/display_test.go +++ b/internal/cmd/serverless/display_test.go @@ -51,13 +51,13 @@ func TestValidateListLimit(t *testing.T) { } } -func TestParseDeploymentSort(t *testing.T) { - got, err := parseDeploymentSort("") +func TestParseAppSort(t *testing.T) { + got, err := parseAppSort("") if err != nil || got != nil { t.Fatalf("unset sort: got=%v err=%v", got, err) } - got, err = parseDeploymentSort("activity") + got, err = parseAppSort("activity") if err != nil { t.Fatalf("activity: %v", err) } @@ -65,12 +65,12 @@ func TestParseDeploymentSort(t *testing.T) { t.Fatalf("activity: got %+v", got) } - got, err = parseDeploymentSort("createdAt") + got, err = parseAppSort("createdAt") if err != nil || got == nil || *got != "createdAt" { t.Fatalf("createdAt: got=%v err=%v", got, err) } - _, err = parseDeploymentSort("nope") + _, err = parseAppSort("nope") if err == nil { t.Fatal("expected error for sort nope") } @@ -79,18 +79,18 @@ func TestParseDeploymentSort(t *testing.T) { } } -func TestParseDeploymentStatus(t *testing.T) { - got, err := parseDeploymentStatus("") +func TestParseAppStatus(t *testing.T) { + got, err := parseAppStatus("") if err != nil || got != nil { t.Fatalf("unset status: got=%v err=%v", got, err) } - got, err = parseDeploymentStatus("active") + got, err = parseAppStatus("active") if err != nil || got == nil || *got != "active" { t.Fatalf("active: got=%v err=%v", got, err) } - _, err = parseDeploymentStatus("nope") + _, err = parseAppStatus("nope") if err == nil { t.Fatal("expected error for status nope") } @@ -156,15 +156,15 @@ func TestExtraCursorFlag(t *testing.T) { } } -func TestDeploymentResult_IncludesConfiguration(t *testing.T) { +func TestAppResult_IncludesConfiguration(t *testing.T) { gpu := testGPUType created := time.Date(2026, 7, 30, 12, 0, 0, 0, time.UTC) - r := deploymentResult{ - DeploymentId: testAppID, - DeploymentName: "My App", - Status: "active", - CreatedAt: created, - UpdatedAt: created, + r := appResult{ + AppId: testAppID, + AppName: "My App", + Status: "active", + CreatedAt: created, + UpdatedAt: created, Configuration: serverlessapi.WorkerConfig{ ComputeType: "gpu", GpuType: &gpu, @@ -215,13 +215,13 @@ func TestDeploymentResult_IncludesConfiguration(t *testing.T) { func TestPrintPage_TableWritesNextCursorToErrOut(t *testing.T) { next := "page-2" - page := serverlessapi.Page[serverlessapi.Deployment]{ + page := serverlessapi.Page[serverlessapi.App]{ Data: nil, NextCursor: &next, } var errOut bytes.Buffer - if err := printPage(output.FormatTable, page, deploymentsResult(page.Data), &errOut, ""); err != nil { + if err := printPage(output.FormatTable, page, appsResult(page.Data), &errOut, ""); err != nil { t.Fatalf("printPage: %v", err) } if !strings.Contains(errOut.String(), "--cursor page-2") { @@ -251,8 +251,8 @@ func TestSecretsResult_NoValueColumn(t *testing.T) { secretAttachmentsResult{}, secretResult{}, secretRemovedResult{Name: testSecretName}, - secretAttachResult{DeploymentID: testAppID, Name: testSecretName, EnvVarName: "BAR"}, - secretDetachResult{DeploymentID: testAppID, Name: testSecretName}, + secretAttachResult{AppID: testAppID, Name: testSecretName, EnvVarName: "BAR"}, + secretDetachResult{AppID: testAppID, Name: testSecretName}, } for _, table := range tables { headers := table.Headers() @@ -297,7 +297,7 @@ func TestEnvVarsResult_ShowsValue(t *testing.T) { } } - unset := envUnsetResult{DeploymentID: testAppID, Key: testEnvKey} + unset := envUnsetResult{AppID: testAppID, Key: testEnvKey} for _, h := range unset.Headers() { if strings.EqualFold(h, "value") { t.Fatalf("envUnsetResult must not include a Value column: %v", unset.Headers()) @@ -326,7 +326,7 @@ func TestVersionsResult_NilBuildID(t *testing.T) { func TestVersionResult_NilBuildID(t *testing.T) { rows := (versionResult{ Id: uuid.MustParse("22222222-2222-2222-2222-222222222222"), - DeploymentId: testAppID, + AppId: testAppID, VersionNumber: 1, CreatedAt: time.Date(2026, 7, 30, 12, 0, 0, 0, time.UTC), }).Rows() @@ -340,7 +340,7 @@ func TestVersionResult_NilBuildID(t *testing.T) { t.Fatalf("version number: got %#v", rows[0][1]) } if rows[2][1] != testAppID { - t.Fatalf("deploymentId: got %#v", rows[2][1]) + t.Fatalf("appId: got %#v", rows[2][1]) } } diff --git a/internal/cmd/serverless/open.go b/internal/cmd/serverless/open.go index 5da088d..4382c25 100644 --- a/internal/cmd/serverless/open.go +++ b/internal/cmd/serverless/open.go @@ -15,8 +15,8 @@ import ( // openResult reports the application and dashboard URL that was opened. type openResult struct { - DeploymentID string `json:"deploymentId" yaml:"deploymentId"` - URL string `json:"url" yaml:"url"` + AppID string `json:"appId" yaml:"appId"` + URL string `json:"url" yaml:"url"` } func (r openResult) Headers() []string { @@ -25,7 +25,7 @@ func (r openResult) Headers() []string { func (r openResult) Rows() [][]any { return [][]any{ - {colApp, r.DeploymentID}, + {colApp, r.AppID}, {"URL", r.URL}, } } @@ -46,8 +46,8 @@ func newOpenCmd() *cobra.Command { } return output.Print(cmdutil.FormatFor(cmd), openResult{ - DeploymentID: id, - URL: dashboardURL, + AppID: id, + URL: dashboardURL, }) }, } diff --git a/internal/cmd/serverless/pack.go b/internal/cmd/serverless/pack.go index 9489012..16e2e35 100644 --- a/internal/cmd/serverless/pack.go +++ b/internal/cmd/serverless/pack.go @@ -11,7 +11,7 @@ import ( ) // maxPackEntryBytes is the maximum size of a single entry file we will zip and -// base64-encode for createDeployment. Keeps accidental large inputs from +// base64-encode for createApp. Keeps accidental large inputs from // blowing memory (base64 expands the payload by ~4/3). const maxPackEntryBytes int64 = 10 << 20 // 10 MiB diff --git a/internal/cmd/serverless/secrets.go b/internal/cmd/serverless/secrets.go index fa13624..f1c823a 100644 --- a/internal/cmd/serverless/secrets.go +++ b/internal/cmd/serverless/secrets.go @@ -188,9 +188,9 @@ Encrypted values are never returned.`, } app := args[0] - var params *serverlessapi.ListDeploymentSecretsParams + var params *serverlessapi.ListAppSecretsParams if limit > 0 || cursor != "" { - params = &serverlessapi.ListDeploymentSecretsParams{} + params = &serverlessapi.ListAppSecretsParams{} params.Limit, params.Cursor = listPageParams(limit, cursor) } @@ -198,7 +198,7 @@ Encrypted values are never returned.`, spin.Start() client := serverlessapi.NewClient(config.GetAPIKey(), config.GetServerlessBaseURL(), slog.New(logger)) - page, err := client.ListDeploymentSecrets(cmd.Context(), app, params) + page, err := client.ListAppSecrets(cmd.Context(), app, params) if err != nil { spin.Stop() return err @@ -243,16 +243,16 @@ control-plane association only in this API release — it does not roll workers. spin.Start() client := serverlessapi.NewClient(config.GetAPIKey(), config.GetServerlessBaseURL(), slog.New(logger)) - if err := client.AttachDeploymentSecret(cmd.Context(), app, body); err != nil { + if err := client.AttachAppSecret(cmd.Context(), app, body); err != nil { spin.Stop() return err } spin.Stop() return output.Print(cmdutil.FormatFor(cmd), secretAttachResult{ - DeploymentID: app, - Name: name, - EnvVarName: envVarName, + AppID: app, + Name: name, + EnvVarName: envVarName, }) }, } @@ -278,15 +278,15 @@ organisation secret.`, spin.Start() client := serverlessapi.NewClient(config.GetAPIKey(), config.GetServerlessBaseURL(), slog.New(logger)) - if err := client.DetachDeploymentSecret(cmd.Context(), app, name); err != nil { + if err := client.DetachAppSecret(cmd.Context(), app, name); err != nil { spin.Stop() return err } spin.Stop() return output.Print(cmdutil.FormatFor(cmd), secretDetachResult{ - DeploymentID: app, - Name: name, + AppID: app, + Name: name, }) }, } From dc397a819de49125bba33f4829fcd024242b69a3 Mon Sep 17 00:00:00 2001 From: ryank90 Date: Wed, 19 Aug 2026 18:01:01 +0100 Subject: [PATCH 2/2] fix: left over reference to dep instead of app --- internal/api/serverless/client_test.go | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/internal/api/serverless/client_test.go b/internal/api/serverless/client_test.go index e47f60a..3156aff 100644 --- a/internal/api/serverless/client_test.go +++ b/internal/api/serverless/client_test.go @@ -160,7 +160,7 @@ func TestCreateApp(t *testing.T) { } c := newClient("test-key", srv.URL, slog.Default(), srv.Client()) - dep, err := c.CreateApp(context.Background(), AppCreate{ + app, err := c.CreateApp(context.Background(), AppCreate{ AppId: testAppID, AppName: "My App", AppSource: source, @@ -174,8 +174,8 @@ func TestCreateApp(t *testing.T) { if err != nil { t.Fatalf("CreateApp: %v", err) } - if dep.AppId != testAppID || string(dep.Status) != "initializing" { - t.Errorf("unexpected app: %+v", dep) + if app.AppId != testAppID || string(app.Status) != "initializing" { + t.Errorf("unexpected app: %+v", app) } } @@ -393,12 +393,12 @@ func TestGetApp(t *testing.T) { defer srv.Close() c := newClient("test-key", srv.URL, slog.Default(), srv.Client()) - dep, err := c.GetApp(context.Background(), testAppID) + app, err := c.GetApp(context.Background(), testAppID) if err != nil { t.Fatalf("GetApp: %v", err) } - if dep.AppId != testAppID || string(dep.Status) != "initializing" { - t.Errorf("unexpected app: %+v", dep) + if app.AppId != testAppID || string(app.Status) != "initializing" { + t.Errorf("unexpected app: %+v", app) } } @@ -470,7 +470,7 @@ func TestUpdateApp(t *testing.T) { defer srv.Close() c := newClient("test-key", srv.URL, slog.Default(), srv.Client()) - dep, err := c.UpdateApp(context.Background(), testAppID, AppUpdate{ + app, err := c.UpdateApp(context.Background(), testAppID, AppUpdate{ Configuration: &WorkerConfigPatch{ MaxWorkers: &maxWorkers, }, @@ -478,8 +478,8 @@ func TestUpdateApp(t *testing.T) { if err != nil { t.Fatalf("UpdateApp: %v", err) } - if dep.AppId != testAppID || dep.Configuration.MaxWorkers != maxWorkers { - t.Errorf("unexpected app: %+v", dep) + if app.AppId != testAppID || app.Configuration.MaxWorkers != maxWorkers { + t.Errorf("unexpected app: %+v", app) } } @@ -580,12 +580,12 @@ func TestLifecycleApps(t *testing.T) { defer srv.Close() c := newClient("test-key", srv.URL, slog.Default(), srv.Client()) - dep, err := op.call(c, context.Background(), testAppID) + app, err := op.call(c, context.Background(), testAppID) if err != nil { t.Fatalf("%s: %v", op.name, err) } - if dep.AppId != testAppID || string(dep.Status) != op.status { - t.Errorf("unexpected app: %+v", dep) + if app.AppId != testAppID || string(app.Status) != op.status { + t.Errorf("unexpected app: %+v", app) } }) }