@keboola/api-client 35.0.0 → 36.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/dist/apps/index.cjs +26 -19
  3. package/dist/apps/index.cjs.map +1 -1
  4. package/dist/apps/index.d.cts +31 -73
  5. package/dist/apps/index.d.ts +31 -73
  6. package/dist/apps/index.js +26 -19
  7. package/dist/apps/index.js.map +1 -1
  8. package/dist/apps/types.d.cts +2 -2
  9. package/dist/apps/types.d.ts +2 -2
  10. package/dist/{index-DFBFa3SS.d.ts → index-2JM0gyAf.d.ts} +27 -64
  11. package/dist/{index-Dodwl64k.d.cts → index-BDG-LKXj.d.cts} +2 -2
  12. package/dist/{index-P-iT5THa.d.ts → index-BXF-bs2d.d.ts} +2 -2
  13. package/dist/{index-BLx14ZI4.d.cts → index-DIAyi-EZ.d.cts} +27 -64
  14. package/dist/index.d.cts +2 -2
  15. package/dist/index.d.ts +2 -2
  16. package/dist/management/index.d.cts +1 -1
  17. package/dist/management/index.d.ts +1 -1
  18. package/dist/management/types.d.cts +1 -1
  19. package/dist/management/types.d.ts +1 -1
  20. package/dist/queryService/index.d.cts +1 -1
  21. package/dist/queryService/index.d.ts +1 -1
  22. package/dist/queue/index.d.cts +1 -1
  23. package/dist/queue/index.d.ts +1 -1
  24. package/dist/sdk/configurations/index.d.cts +1 -1
  25. package/dist/sdk/configurations/index.d.ts +1 -1
  26. package/dist/sdk/queryService/index.d.cts +1 -1
  27. package/dist/sdk/queryService/index.d.ts +1 -1
  28. package/dist/sdk/storage/index.d.cts +1 -1
  29. package/dist/sdk/storage/index.d.ts +1 -1
  30. package/dist/storage/index.d.cts +1 -1
  31. package/dist/storage/index.d.ts +1 -1
  32. package/dist/{types-BMeDOB_D.d.ts → types-BuqxXXYP.d.ts} +13 -1
  33. package/dist/{types-B3GOGUJ7.d.cts → types-CzsnuPFh.d.cts} +13 -1
  34. package/dist/{types-CBgLCkYe.d.ts → types-D6UmMa6E.d.ts} +224 -401
  35. package/dist/{types-DARv_P6O.d.cts → types-DXskkNp8.d.cts} +224 -401
  36. package/package.json +8 -8
  37. package/surface/apps.md +11 -11
  38. package/surface/billing.md +2 -2
  39. package/surface/editor.md +5 -5
@@ -36,30 +36,14 @@ type paths = {
36
36
  };
37
37
  /**
38
38
  * List apps
39
- * @description Lists apps for the project, each including `production {desiredNumber, desiredId,
40
- * actualNumber, actualId}` and `undeployedChanges` (whether the production
41
- * deployment's config version differs from the app's current config version — a
42
- * future branch-HEAD comparison is not implemented yet).
39
+ * @description Lists apps for the project.
43
40
  */
44
41
  get: operations['listApps'];
45
42
  put?: never;
46
43
  /**
47
44
  * Create app
48
- * @description Creates the app row plus its AppGroup CR (the product's Kubernetes object); the
49
- * app starts with `production: null` — its URL is reserved but publicly 404s until
50
- * a deployment is promoted. An optional `Idempotency-Key` header makes a retried
51
- * create return the same app instead of a duplicate Storage config, DB row, and
52
- * App CRD — `201` only on the request that actually created it, `200` on every
53
- * replay, so the status code alone tells a caller which happened without diffing
54
- * the body. A retry with no `Idempotency-Key` is always a genuine create (`201`):
55
- * nothing links it to the earlier request.
56
- *
57
- * The Storage config this creates has no app content and only the platform's
58
- * default auth (`authorization.app_proxy` requiring a password nobody has set
59
- * yet, so the URL stays unopenable) — this endpoint reserves the app and its
60
- * config address, nothing more. Set `parameters` (what the app runs) and
61
- * `authorization.app_proxy` (who can open it) via the Storage API, on the config
62
- * named by the response's `componentId`/`branchId`/`configId`, before deploying.
45
+ * @description Creates the app. Production starts empty — the URL is reserved but publicly 404s
46
+ * until a deployment is promoted.
63
47
  */
64
48
  post: operations['createApp'];
65
49
  delete?: never;
@@ -77,33 +61,19 @@ type paths = {
77
61
  };
78
62
  /**
79
63
  * Get app detail
80
- * @description Same shape as the list entry, incl. `production {desiredNumber, desiredId,
81
- * actualNumber, actualId}` and `undeployedChanges`.
64
+ * @description Same shape as the list entry.
82
65
  */
83
66
  get: operations['getApp'];
84
67
  put?: never;
85
68
  post?: never;
86
69
  /**
87
70
  * Delete app
88
- * @description Deletes the AppGroup CR, cascading to every deployment, Secret and pod owned by
89
- * it; rows are soft-deleted.
71
+ * @description Deletes the app and all its deployments.
90
72
  */
91
73
  delete: operations['deleteApp'];
92
74
  options?: never;
93
75
  head?: never;
94
- /**
95
- * Update app settings
96
- * @description Updates plain product settings. Per the `/v2` design rule (see API description),
97
- * operations with side effects beyond a plain attribute write — promote, unpublish,
98
- * suspend, resume — are separate action-verb endpoints, not part of this `PATCH`.
99
- *
100
- * No patchable field exists yet: `name` and `description` are create-only (see
101
- * `AppCreateRequest`) and live in the app's Storage configuration, not on the App
102
- * row, so there is nothing here to rename them into. Sending either is rejected as
103
- * an unknown field (`422`), not silently accepted — the only currently valid body is
104
- * `{}`. Additional fields will land here as the `/v2` surface grows.
105
- */
106
- patch: operations['patchApp'];
76
+ patch?: never;
107
77
  trace?: never;
108
78
  };
109
79
  '/apps/{appId}/unpublish': {
@@ -117,11 +87,8 @@ type paths = {
117
87
  put?: never;
118
88
  /**
119
89
  * Unpublish app
120
- * @description Sets `production` to none — routing is dropped and the app's URL 404s.
121
- * Idempotent: unpublishing an already-unpublished app is a no-op, and so is
122
- * unpublishing an app that has no App CRD at all (never deployed via `/v2`) — from a
123
- * caller's perspective "no App CRD" and "an App CRD with nothing published" are the
124
- * same fact, so both return `204` rather than one of them 409ing.
90
+ * @description Sets `production` to none — routing is dropped and the app's URL 404s. The app won't automatically wake up
91
+ * in incoming traffic until other Deployment is promoted.
125
92
  */
126
93
  post: operations['unpublishApp'];
127
94
  delete?: never;
@@ -142,12 +109,12 @@ type paths = {
142
109
  /**
143
110
  * Suspend app
144
111
  * @description Sleeps the app's currently serving member now, instead of waiting for the idle
145
- * timer, and disarms wake-on-request: unlike idle auto-suspend, a visitor hitting
146
- * the app's URL afterwards gets a 503 rather than triggering a wakeup. Stays
147
- * suspended until an explicit `resume`. Idempotent: suspending an already-suspended
148
- * app is a no-op; returns `409` if the app has no serving member to suspend.
112
+ * timer. Wake-on-request stays armed: a visitor hitting the app's URL afterwards
113
+ * wakes it, exactly as after an idle auto-suspend. Idempotent: suspending an
114
+ * already-suspended app is a no-op; returns `409` if the app has no serving member
115
+ * to suspend.
149
116
  *
150
- * The returned App's `state` becomes `SUSPENDED` — immediately, not on the next
117
+ * The returned App's `state` becomes `suspended` — immediately, not on the next
151
118
  * list/get poll.
152
119
  */
153
120
  post: operations['suspendApp'];
@@ -173,9 +140,9 @@ type paths = {
173
140
  * resuming an already-running app is a no-op; returns `409` if the app has no
174
141
  * serving member to resume.
175
142
  *
176
- * The returned App's `state` is `STARTING` immediately after resuming an app that
143
+ * The returned App's `state` is `starting` immediately after resuming an app that
177
144
  * was actually stopped — the operator has not confirmed the member serving yet at
178
- * the instant this call returns — settling to `RUNNING` once it does.
145
+ * the instant this call returns — settling to `running` once it does.
179
146
  */
180
147
  post: operations['resumeApp'];
181
148
  delete?: never;
@@ -204,8 +171,9 @@ type paths = {
204
171
  * `apps:proxy` scope (or an equivalent ServiceAccount token). A Storage API token is
205
172
  * not accepted here, unlike `PATCH /apps/{appId}`.
206
173
  *
207
- * Idempotent by nature: re-reporting the same or an older timestamp has no side effect
208
- * beyond overwriting the stored value, so no `Idempotency-Key` is needed.
174
+ * Monotonic: a timestamp older than the one already stored is ignored rather than applied,
175
+ * so an out-of-order or retried call can never move the heartbeat backwards and make an
176
+ * active app read as idle sooner than it really is.
209
177
  */
210
178
  post: operations['recordAppActivity'];
211
179
  delete?: never;
@@ -224,9 +192,9 @@ type paths = {
224
192
  /**
225
193
  * Get app password
226
194
  * @description Returns the app's current password for its `password`-type auth provider. `null`
227
- * if none has been minted yet — that happens on the app's first deployment (see
228
- * `POST .../deployments`) or on demand via `POST .../reset-password`. Mirrors
229
- * `/v1`'s `GET /apps/{appId}/password`.
195
+ * if none has been minted yet. A non-null value does not mean the app currently uses
196
+ * password auth — it can outlive a later switch away from it. Do not use its presence
197
+ * or absence to infer the app's current auth configuration.
230
198
  */
231
199
  get: operations['getAppPassword'];
232
200
  put?: never;
@@ -237,7 +205,7 @@ type paths = {
237
205
  patch?: never;
238
206
  trace?: never;
239
207
  };
240
- '/apps/{appId}/reset-password': {
208
+ '/apps/{appId}/password/reset': {
241
209
  parameters: {
242
210
  query?: never;
243
211
  header?: never;
@@ -248,11 +216,8 @@ type paths = {
248
216
  put?: never;
249
217
  /**
250
218
  * Reset app password
251
- * @description Mints a new password, replacing any existing one. Not idempotent by design: the
252
- * minted value is unpredictable, so there is no target state a retry could
253
- * re-declare — each call always generates a fresh secret. `400` if the app's config
254
- * has no `password`-type auth provider (nothing to reset). The new password is not
255
- * returned here; fetch it with `GET .../password` immediately after.
219
+ * @description Mints a new password, replacing any existing one, and returns it. Each call always
220
+ * generates a fresh secret.
256
221
  */
257
222
  post: operations['resetAppPassword'];
258
223
  delete?: never;
@@ -270,20 +235,16 @@ type paths = {
270
235
  };
271
236
  /**
272
237
  * List runs
273
- * @description Runs of this app, newest first — app-wide, mirroring `/v1`'s paths. The rollup is
274
- * what you want when something is wrong and you do not yet know which deployment to
275
- * look at; each run carries its own `deploymentId`, and `deploymentId=` narrows the
276
- * list once you do.
238
+ * @description Runs of this app, newest first, across every deployment.
277
239
  *
278
240
  * This is where a failed deployment's cause lives: a run carries `failureReason` and
279
- * `startupLogs`. A deployment reported `FAILED` has an explanation here. One reported
280
- * `PENDING` does not, and that is not an omission — nothing upstream records a cause
241
+ * `startupLogs`. A deployment reported `failed` has an explanation here. One reported
242
+ * `pending` does not, and that is not an omission — nothing upstream records a cause
281
243
  * for a container that never executed.
282
244
  *
283
245
  * `since`/`until` filter on `createdAt`, not `startedAt`: `createdAt` is stamped
284
246
  * before any compute exists, so it is the only timestamp every run has, including one
285
- * that never started. Filtering on `startedAt` would silently drop exactly the runs
286
- * this endpoint exists to explain. `offset`/`limit` page through the filtered window,
247
+ * that never started. `offset`/`limit` page through the filtered window,
287
248
  * not the full history — pass `since`/`until` and page until the response is shorter
288
249
  * than `limit` to know you have the whole window, rather than an arbitrary slice of a
289
250
  * larger, unbounded one.
@@ -306,7 +267,7 @@ type paths = {
306
267
  };
307
268
  /**
308
269
  * Get run detail
309
- * @description A single run. Addressed under the app rather than under its deployment, matching `/v1`: a run id is unique on its own, so nesting it would add a path segment carrying no information and force a caller holding an id from the app-wide list to find its deployment first.
270
+ * @description A single run detail.
310
271
  */
311
272
  get: operations['getRun'];
312
273
  put?: never;
@@ -326,33 +287,18 @@ type paths = {
326
287
  };
327
288
  /**
328
289
  * List deployments
329
- * @description Full deployment history including retired (`archived: true`) deployments —
330
- * rows outlive their Kubernetes CRs.
290
+ * @description Deployment history. Returns only live deployments by default — set
291
+ * `archived=true` to list deleted ones instead. A deleted deployment can no
292
+ * longer run or be promoted, but stays listed here.
331
293
  */
332
294
  get: operations['listDeployments'];
333
295
  put?: never;
334
296
  /**
335
297
  * Create deployment (deploy)
336
- * @description Deploys the current config version / branch HEAD as a new immutable deployment.
337
- * `promote: true` by default — deploying also promotes to production unless
338
- * explicitly disabled, in which case the deployment is staged for a later
339
- * promotion and never runs in the meantime. The deployment id is minted synchronously (deterministic
340
- * Kubernetes CR name); the display `number` is allocated from a per-app DB
341
- * sequence, also returned synchronously — an optional `Idempotency-Key` header
342
- * makes a retried deploy return the same row instead of a duplicate: `202` only on
343
- * the request that actually created it, `200` on every replay. A request with no
344
- * `Idempotency-Key` is always a genuine deploy (`202`): nothing links it to an
345
- * earlier request, so it can never be recognised as a replay.
346
- *
347
- * Nothing here validates app content: a config with no `parameters` builds
348
- * (`buildState: PREBUILT`) and promotes successfully, then crashes on every run.
349
- * Content lives in the Storage config named by the app's `componentId`/
350
- * `branchId`/`configId`, set via the Storage API — not this request.
351
- *
352
- * If the app's config has a `password`-type auth provider and the app has no
353
- * password yet, this call mints one — the same lazy, one-time generation `/v1`
354
- * does when an app with simple auth is first started. Fetch it with
355
- * `GET .../password`; a later deployment never rotates it.
298
+ * @description Deploys the current config version / branch HEAD as a new immutable deployment,
299
+ * or a specific past version via `configVersion`. `promote: true` by default —
300
+ * deploying also promotes to production unless explicitly disabled, in which case
301
+ * the deployment is staged for a later promotion and never runs in the meantime.
356
302
  */
357
303
  post: operations['createDeployment'];
358
304
  delete?: never;
@@ -370,27 +316,19 @@ type paths = {
370
316
  };
371
317
  /**
372
318
  * Get deployment detail
373
- * @description Deployment detail; served from the DB projection. The row is written
374
- * synchronously before the create request returns, so there is no window
375
- * where it is missing (read-your-writes) and no Kubernetes CR fallback.
319
+ * @description Deployment detail.
376
320
  */
377
321
  get: operations['getDeployment'];
378
322
  put?: never;
379
323
  post?: never;
380
324
  /**
381
- * Retire deployment
382
- * @description **Retires, does not erase** — deletes the member CR and its rendered-config
383
- * Secret immediately (credential hygiene); the row stays in history marked
384
- * `archived: true` and is re-materializable. Deployments have no `PATCH`/`PUT` —
385
- * they are immutable; retirement is a lifecycle transition, not a mutation. `409`
386
- * if this deployment's id is named production by either `production.desiredId` or
387
- * `production.actualId` on the app (promote or roll back to another deployment, or
388
- * unpublish, before retiring it) — a promotion in flight can leave those two
389
- * different for a while, and retiring the one not currently named `desiredId` is
390
- * just as unsafe as retiring the one not currently named `actualId`, since either
391
- * one is still something the app depends on. Idempotent: retiring an already
392
- * `archived` deployment is a no-op. Row hard-deletion happens only via app
393
- * deletion.
325
+ * Delete deployment
326
+ * @description **Deletes, does not erase** — stops the deployment; it stays in history marked `archived: true` and can
327
+ * still be listed, but can no longer be promoted.
328
+ *
329
+ * Deployment can't be deleted when it acts as the current app production deployment
330
+ * (`production.desiredDeploymentId` or `production.actualDeploymentId`). Promote or roll back to another
331
+ * deployment, or unpublish, before deleting it.
394
332
  */
395
333
  delete: operations['deleteDeployment'];
396
334
  options?: never;
@@ -410,27 +348,20 @@ type paths = {
410
348
  /**
411
349
  * Promote deployment (promote / rollback)
412
350
  * @description Makes this deployment production. Rollback is the same action applied to an
413
- * older deployment — every repoint is audited. Promoting an `archived` deployment
414
- * is allowed (it is re-materialized first).
415
- *
416
- * Promotion is **declarative**: this records the intent and returns. The operator
417
- * validates by starting the target deployment — including when the app is
418
- * suspended — and switches the route only once that deployment is serving. A
419
- * target that fails to start never becomes production, and the deployment that was
420
- * already serving keeps serving. There is deliberately no readiness precondition:
421
- * a deployment cannot become ready until it has been asked to be production.
351
+ * older deployment. `409` if the deployment has been deleted (`archived: true`)
352
+ * — deploy it again to get a new, promotable deployment.
422
353
  *
423
- * Idempotent: re-declaring the deployment that is already production is a no-op.
424
- * Authorized separately from plain app settings.
354
+ * There is deliberately **no readiness precondition**: a deployment only becomes
355
+ * ready by being promoted — nothing runs it before that — so requiring readiness
356
+ * first would be circular. Promotion records the intent and returns; the
357
+ * platform then validates it by starting the target, even when the app is
358
+ * suspended. On success the app is left running: promoting a suspended app
359
+ * resumes it. If that fails, the app is left `PromotionBlocked` and production
360
+ * keeps serving what it was already serving.
425
361
  *
426
- * `runState`/`buildState` are not inputs to this decision — a `FAILED`,
427
- * non-archived deployment is promoted exactly like any other non-archived one, by
428
- * whether it is already production, not by why it stopped running. Re-declaring it
429
- * while it is still `production.desired`/`.actual` is the no-op above (`204`).
430
- * Re-declaring it while it is **not** currently production — rolled back away from,
431
- * or never promoted — repoints `production.desired` (`202`) and the operator starts
432
- * it, which from the outside looks like restarting a failed deployment; it is the
433
- * same repoint any not-yet-run deployment gets, not special-cased recovery.
362
+ * Safe to retry: re-declaring the deployment that is already production always returns
363
+ * `202`, whether or not anything actually changed — it also always ensures the app is
364
+ * running, so re-declaring the current deployment on a suspended app resumes it.
434
365
  */
435
366
  post: operations['promoteDeployment'];
436
367
  delete?: never;
@@ -448,16 +379,10 @@ type paths = {
448
379
  };
449
380
  /**
450
381
  * Tail app logs
451
- * @description Streams recent container output of the app's currently serving member — the same
452
- * member `promote` most recently switched traffic to, resolved by the operator from
453
- * the App CRD's serving pointer, not looked up by this service. Mirrors `/v1`'s
454
- * `GET /apps/{appId}/logs/tail`.
382
+ * @description Streams recent container output of the app's currently serving deployment.
455
383
  *
456
384
  * `since` and `lines` are mutually exclusive filters on where the tail starts;
457
- * omitting both returns the log from its start. `404` if the app has no App CRD at
458
- * all (never deployed via `/v2`); `400` (`apps.appNotRunning`) if it has one but
459
- * nothing is currently serving — both are "there is nothing to tail right now",
460
- * distinguished only by whether the app was ever deployed.
385
+ * omitting both returns the log from its start.
461
386
  */
462
387
  get: operations['tailAppLogs'];
463
388
  put?: never;
@@ -477,10 +402,8 @@ type paths = {
477
402
  };
478
403
  /**
479
404
  * Download app logs
480
- * @description The full container output of the app's currently serving member, as a file
481
- * download. Same underlying call as `tail` with neither `since` nor `lines` set —
482
- * no separate retention or size limit applies. Mirrors `/v1`'s
483
- * `GET /apps/{appId}/logs/download`.
405
+ * @description The full container output of the app's currently serving deployment, as a file
406
+ * download.
484
407
  */
485
408
  get: operations['downloadAppLogs'];
486
409
  put?: never;
@@ -500,17 +423,10 @@ type paths = {
500
423
  };
501
424
  /**
502
425
  * Tail deployment logs
503
- * @description Streams recent container output of this specific deployment's own member — not
504
- * resolved through the app's serving pointer, so this works for a deployment that
505
- * is not (or never was) production, e.g. a candidate that failed to promote. The
506
- * operator streams directly from the deployment's Sandbox CR, which is named after
507
- * the deployment id.
426
+ * @description Streams recent container output of this specific deployment.
508
427
  *
509
428
  * `since` and `lines` are mutually exclusive filters on where the tail starts;
510
- * omitting both returns the log from its start. `404` if the app or the deployment
511
- * doesn't exist (or the deployment belongs to a different app); `400`
512
- * (`apps.deploymentNotRunning`) if the deployment exists but has nothing currently
513
- * running to read logs from.
429
+ * omitting both returns the log from its start.
514
430
  */
515
431
  get: operations['tailDeploymentLogs'];
516
432
  put?: never;
@@ -530,9 +446,7 @@ type paths = {
530
446
  };
531
447
  /**
532
448
  * Download deployment logs
533
- * @description The full container output of this specific deployment's own member, as a file
534
- * download — same underlying call as `tail` with neither `since` nor `lines` set.
535
- * Not resolved through the app's serving pointer; see `tail` for why that matters.
449
+ * @description The full container output of this specific deployment, as a file download.
536
450
  */
537
451
  get: operations['downloadDeploymentLogs'];
538
452
  put?: never;
@@ -554,10 +468,9 @@ type paths = {
554
468
  * Get app's Git repository
555
469
  * @description Returns details of the Git repository configured in the app's config
556
470
  * (`parameters.dataApp.git`). For a managed Git repository both `sshUrl` and
557
- * `httpsUrl` are returned, fetched from the upstream git-service. For an
558
- * externally configured repository only the URL matching the configured protocol
559
- * is returned and the other field is `null`; any embedded credentials are
560
- * stripped.
471
+ * `httpsUrl` are returned. For an externally configured repository only the URL
472
+ * matching the configured protocol is returned and the other field is `null`;
473
+ * any embedded credentials are stripped.
561
474
  */
562
475
  get: operations['getAppGitRepo'];
563
476
  put?: never;
@@ -586,11 +499,8 @@ type paths = {
586
499
  * Create credential for the app's managed Git repository
587
500
  * @description Creates a credential (SSH key or HTTP token) for the app's managed Git
588
501
  * repository. For `http_token` credentials, the response includes a one-time
589
- * `secret` that is never returned again — not on subsequent reads, and not on an
590
- * `Idempotency-Key` replay of this request. Requires an admin Storage API token.
591
- * An optional `Idempotency-Key` header makes a retried create return the existing
592
- * credential instead of a duplicate: `201` only on the request that actually
593
- * created it, `200` on every replay.
502
+ * `secret` that is never returned again — not on subsequent reads. Requires an
503
+ * admin Storage API token.
594
504
  */
595
505
  post: operations['createAppGitRepoCredential'];
596
506
  delete?: never;
@@ -617,8 +527,7 @@ type paths = {
617
527
  post?: never;
618
528
  /**
619
529
  * Revoke and remove a credential
620
- * @description Revokes a credential on git-service and soft-deletes the local row. Tolerates
621
- * git-service `404` as already-removed. Requires an admin Storage API token.
530
+ * @description Revokes the credential. Requires an admin Storage API token.
622
531
  */
623
532
  delete: operations['deleteAppGitRepoCredential'];
624
533
  options?: never;
@@ -629,120 +538,78 @@ type paths = {
629
538
  };
630
539
  type components = {
631
540
  schemas: {
632
- /** @description Flat error shape used by every v2 endpoint, matching the v1 convention (e.g. 404 → `{"error": "App \"123\" not found"}`). */
541
+ /** @description Flat error shape used by every `/v2` endpoint, e.g. `{"error": "App \"123\" not found"}`. */
633
542
  ErrorResponse: {
634
543
  error?: string;
635
544
  };
636
545
  App: {
637
546
  id: string;
638
547
  projectId: string;
639
- /**
640
- * @description Together with `branchId` and `configId`, the Storage address of this app's configuration. The app's **name** and **description** — both set once at creation via `AppCreateRequest` and never editable afterwards — live there and are deliberately not copied onto this response — pointing at where they authoritatively live keeps them correct by construction. Resolve labels for a page of apps with one bulk `listComponentConfigurations` call.
641
- * The app's **content** (`parameters` — what it runs) and **auth** (`authorization.app_proxy` — who can open it) live there too, for the same reason: `/v2` manages apps and deployments, not their configuration. A newly created app's config has neither — no content, and an auth block that requires a password nobody has set — until configured via the Storage API.
642
- */
548
+ /** @description Together with `branchId` and `configId`, addresses the app's Storage configuration, which holds its name, description, content (`parameters`) and auth (`authorization.app_proxy`). */
643
549
  componentId: string;
644
- /** @description `null` on an app created through `/v1` without a branch. Apps created through `/v2` always resolve the project's default branch at creation, so this is never null for them. */
550
+ /** @description The dev branch this app's Storage configuration lives in. */
645
551
  branchId: string | null;
646
552
  configId: string;
647
- /** @description The app's current configuration revision. */
648
- configVersion: string;
649
553
  /** @enum {string|null} */
650
554
  type?: 'streamlit' | 'python-js' | null;
651
- /**
652
- * @description Apps created through `/v2` are always `prod`; `dev` occurs only on an app created through `/v1` in dev mode and later adopted.
653
- * @enum {string}
654
- */
655
- mode?: 'prod' | 'dev';
656
555
  /**
657
556
  * Format: url
658
- * @description Production URL — stable, unchanged by promote/rollback.
659
- * Mirrored from the operator, which derives the address and publishes it on the App resource; it is not computed here, so it cannot disagree with where the app actually answers. `null` only in the window between creating an app and the first state-sync pass picking the address up, so a freshly created app can report `null` here for a short time.
660
- * Null does not mean "not deployed" — check `production` for that. A URL is reserved from creation and 404s publicly until something is promoted to it.
557
+ * @description Production URL — stable, unchanged by promote/rollback. May briefly be `null` right after creation. Does not mean "not deployed" — check `production` for that; the URL is reserved from creation and 404s publicly until something is promoted to it.
661
558
  */
662
559
  url: string | null;
663
- /**
664
- * @description Always present. `null` on all four fields means the app has never been deployed (URL reserved, publicly 404s). Carries both the display number and the id for each of `desired`/`actual` because `promote`/`retire` take a deployment id, not a number — a client holding only the number would have to fetch the deployment list just to find the id it needs to act.
665
- * `desired` and `actual` differ while a promotion is in flight — the operator only moves `actual` once the newly desired deployment reports ready — and this is the supported way to detect that in progress, independently of `state`, which deliberately does not encode it. See `App.state`'s own description.
666
- */
560
+ /** @description Always present. `null` on both fields means the app has never been deployed (URL reserved, publicly 404s). The two fields differ while a promotion is in progress — see `App.state` for how to read that alongside it. */
667
561
  production: {
668
- /** @description Deployment number most recently asked to be production. */
669
- desiredNumber?: number | null;
670
- /** @description Id of the deployment most recently asked to be production — pass this to `promote`/`retire`, not `desiredNumber`. */
671
- desiredId?: string | null;
672
- /** @description Deployment number actually serving production traffic right now, per the AppGroup controller's convergence status. */
673
- actualNumber?: number | null;
674
- /** @description Id of the deployment actually serving production traffic right now — pass this to `promote`/`retire`, not `actualNumber`. */
675
- actualId?: string | null;
676
- };
677
- /** @description Whether the production deployment's config version differs from the app's current config version. A future branch-HEAD comparison is not implemented yet. */
678
- undeployedChanges?: boolean;
562
+ /** @description Id of the deployment most recently asked to be production — pass this to `promote`, or delete it instead. */
563
+ desiredDeploymentId?: string | null;
564
+ /** @description Id of the deployment actually serving production traffic right now. */
565
+ actualDeploymentId?: string | null;
566
+ };
679
567
  /**
680
- * @description Is this app's production currently serving traffic, and if not, why? Answers
681
- * exactly that one question — not "is my code healthy" (that's a deployment's
682
- * own `runState`, which can be `FAILED` while this stays `RUNNING`, because an
683
- * older, still-serving deployment and the newest built one are different
684
- * things at the same instant) and not "will a request wake it" alone (both
685
- * `SLEEPING` and `SUSPENDED` are stopped; only the label tells you which).
568
+ * @description Whether this app's production is currently serving traffic, and if not, why.
569
+ * Does not encode rollout progress: a promotion can be in flight while this
570
+ * stays `running`, or while it is `notDeployed`. Compare `production`'s
571
+ * `desiredDeploymentId` against `actualDeploymentId` to check that separately.
686
572
  *
687
- * Deliberately does NOT encode rollout progress — whether a promotion is in
688
- * flight is an orthogonal question to whether production is serving, and this
689
- * field answers only the latter. A promotion can be started from an app that is
690
- * currently `RUNNING` (the old deployment keeps serving throughout) just as much
691
- * as from one that is `SUSPENDED`/`SLEEPING`/`NOT_DEPLOYED` (nothing serves until
692
- * the new one comes up), so "is a promotion in progress" cannot be read off this
693
- * field's value under any reading of it. To detect one, compare `production`'s
694
- * `desiredId`/`desiredNumber` against `actualId`/`actualNumber`: while they
695
- * differ, the deployment named `desired` has been asked for but the one named
696
- * `actual` is still what traffic actually reaches (or nothing is serving yet, if
697
- * `actual` is still `null`). A client that needs both facts — is production
698
- * serving, and is a rollout in progress — must read both `state` and `production`;
699
- * neither can be derived from the other.
700
- *
701
- * | Value | Meaning for a caller |
573
+ * | Value | Meaning |
702
574
  * |---|---|
703
- * | `NOT_DEPLOYED` | No `/v2` deployment has ever been promoted to this app's production. Its URL is reserved and publicly 404s. Also shown for an app that only runs via `/v1` and was never adopted into the deployments model — `production` is `{null, null}` for it too, for the same reason. |
704
- * | `STARTING` | Production is named but not yet confirmed serving — right after a first `promote`/`resume`, during a normal startup, or a promotion in flight where nothing was already serving beforehand (`production.actualId` was `null` going in). |
705
- * | `RUNNING` | Production is named and serving. Normal and healthy — including for the entire duration of a blue/green promotion started from a `RUNNING` app: the old, still-`actual` deployment keeps serving traffic throughout, so this stays `RUNNING` rather than dropping to `STARTING` for the length of the rollout. Compare `production.desiredId`/`actualId` if you need to know whether that rollout is still in progress. |
706
- * | `SLEEPING` | Stopped, but **will** wake on the next request — apps-proxy's wake-on-request path is still armed. This is the NORMAL, expected condition for an idle data app between visits, not an outage; do not alert on it. Produced by idle auto-suspend, which patches only the workload state and deliberately leaves wake-on-request armed. No idle-auto-suspend mechanism exists for a purely `/v2`-created app yet (deferred, not built) — today this is reachable only for a `/v1`-adopted app still picked up by the legacy idle-suspend job, the same way `Deployment.buildState`'s non-`PREBUILT` values are not reachable until builds land. |
707
- * | `SUSPENDED` | Stopped and will **not** wake on the next request — a visitor gets a `503` instead. Produced only by an explicit `POST .../suspend`; cleared only by `POST .../resume`. This is the field this whole enum exists to make distinguishable from `SLEEPING`: before it, both looked identical from the outside, and the only way to tell them apart was `POST .../resume` and inspecting `202` vs `204` — a write used as a read, which could itself wake a sleeping app. |
708
- *
709
- * Mirrored from the App CRD (`spec.state`, `spec.autoRestartEnabled`,
710
- * `status.currentState`, `status.production`) by the same background sync that
711
- * mirrors `production`, so reading it costs no extra cluster call — including on
712
- * `GET /apps`, which would otherwise be one cluster round trip per row. The one
713
- * exception: `suspend`/`resume`/`promote`/`unpublish` write this field
714
- * themselves, immediately, in the same call that changes it, so the App they
715
- * return is never one sync cycle stale about its own action.
716
- *
717
- * Deliberately not `Stopping`, even though the App CRD's `status.currentState`
718
- * names a fourth value: verified against the operator's product-role
719
- * controller, which never publishes it for a product App — its derivation has
720
- * exactly three branches. Also deliberately not `FAILED` — see above.
575
+ * | `notDeployed` | Nothing has ever been promoted. The URL is reserved and publicly 404s. |
576
+ * | `starting` | Production is named but not yet confirmed serving. |
577
+ * | `running` | Production is named and serving. Normal and healthy. |
578
+ * | `suspended` | Stopped, but wakes on the next request. Normal for an idle app between visits, not an outage. |
579
+ * | `disabled` | Stopped by a failure and will not auto-wake; a visitor sees the restart-disabled page. Cleared only by an explicit start. |
721
580
  * @enum {string}
722
581
  */
723
- state: 'NOT_DEPLOYED' | 'STARTING' | 'RUNNING' | 'SLEEPING' | 'SUSPENDED';
582
+ state: 'notDeployed' | 'starting' | 'running' | 'suspended' | 'disabled';
724
583
  };
725
- /** @description Minimal shape — additional fields may be added as the `/v2` surface grows. Deliberately excludes app content and auth: both are Storage API concerns, configured after creation on the config named by the response's `componentId`/`branchId`/`configId` — content via `parameters`, auth via `authorization.app_proxy`. */
584
+ /** @description Every `/v2`-created app is `prod`, so there is no `mode` field. Additional fields may be added as the surface grows. */
726
585
  AppCreateRequest: {
727
- /** @description Create-only: stored in the app's Storage configuration (see `App.componentId`) and never copied onto the `App` response. There is no way to rename it after creation — `AppPatchRequest` carries no field for it. */
586
+ /** @description The dev branch to create the app's Storage configuration in. `null` resolves to the project's default branch — see `App.branchId` for what ends up stored. */
587
+ branchId: string | null;
588
+ /** @description Create-only: stored in the app's Storage configuration (see `App.componentId`) and never copied onto the `App` response. There is no way to rename it after creation — `/v2` has no update endpoint for an app's plain settings yet. */
728
589
  name: string;
729
590
  /**
730
- * @description App type. Only data-app types are supported by `/v2/apps` — workspace types (e.g. `snowflake`, `bigquery`) are created via `/apps`, not this endpoint.
591
+ * @description App type.
731
592
  * @enum {string}
732
593
  */
733
594
  type: 'streamlit' | 'python-js';
734
595
  /** @description Create-only, same as `name` — stored in the app's Storage configuration (see `App.componentId`) and never copied onto the `App` response or editable afterwards. */
735
596
  description?: string | null;
597
+ /** @description Initial `parameters`/`authorization.app_proxy` content for the app's Storage configuration, same shape as the config itself. Defaults to `{}` — see the operation description for what an app has until this or a later Storage API call sets it. */
598
+ config?: {
599
+ [key: string]: unknown;
600
+ };
601
+ /**
602
+ * @description If `true`, a managed Git repository is provisioned via the Git Service and linked to the app. Repo creation failure aborts app creation (best-effort rollback). The linked repo is deleted when the app is deleted.
603
+ * @default false
604
+ */
605
+ useManagedGitRepo: boolean;
736
606
  };
737
- /** @description No patchable field exists yet — `name` and `description` are create-only (see `AppCreateRequest`), so the only currently valid body is `{}`; sending either is rejected as an unknown field (`422`), not silently ignored. Additional fields may be added here as the `/v2` surface grows. Promotion, unpublishing, suspend, and resume are separate action-verb endpoints, not part of this shape. */
738
- AppPatchRequest: Record<string, never>;
739
607
  Deployment: {
740
- /** @description Deployment id — also the deterministic Kubernetes CR name. */
608
+ /**
609
+ * Format: uuid
610
+ * @description Deployment id (UUIDv7), assigned when the deployment is created.
611
+ */
741
612
  id: string;
742
- /** @description Display/sort number, allocated from a per-app DB sequence. */
743
- number: number;
744
- /** @description Storage config id this deployment was created from. Paired with `configVersion` below because a version number alone cannot be resolved via the Storage API without knowing which config it belongs to — the pairing mirrors `GET /apps/{appId}`, whose own `configId`/`configVersion` describe the app's *current* config rather than what a specific deployment was pinned to. */
745
- configId: string;
746
613
  /** @description Storage config version pinned at deploy time. Resolved fresh from Storage on every `POST .../deployments` call, so it can differ from the app's own `configVersion` (which only reflects the config as of app creation). */
747
614
  configVersion: string;
748
615
  /** @description Git commit the deployment's code was built from. Always `null` today: no /v2 app type builds from a git-managed source yet, so nothing ever resolves a commit SHA to attach here. Present as a field now so a future git-backed build path has nowhere else to put it. */
@@ -751,75 +618,45 @@ type components = {
751
618
  * @description Backend size, pinned per version at deploy time from the config's `runtime.backend.size` (falling back to `parameters.size`). `null` when the config named no size, or named one that is not a recognised value — in both cases the platform default applies.
752
619
  * @enum {string|null}
753
620
  */
754
- size?: 'micro' | 'tiny' | 'small' | 'medium' | 'large' | 'external' | null;
621
+ runtimeSize?: 'micro' | 'tiny' | 'small' | 'medium' | 'large' | 'external' | null;
755
622
  /**
756
623
  * @description Does a runnable artifact exist for this deployment?
757
624
  *
758
- * Only `PREBUILT` occurs today, and it is a fact rather than a placeholder: a
625
+ * Only `ready` occurs today, and it is a fact rather than a placeholder: a
759
626
  * deployment is created with `source.image`, so an image is supplied and the
760
627
  * platform builds nothing. The remaining values become reachable when builds
761
- * land and a deployment can name a commit or branch instead. `PREBUILT` does
628
+ * land and a deployment can name a commit or branch instead. `ready` does
762
629
  * not become obsolete then — supplying a ready image stays legitimate, so it
763
630
  * stops being the only value rather than becoming a wrong one.
764
631
  *
765
- * `FAILED` here means no artifact was produced, so the deployment can never
632
+ * `failed` here means no artifact was produced, so the deployment can never
766
633
  * run. That is a different problem, with a different fix, from a run failure.
767
634
  * @enum {string}
768
635
  */
769
- buildState: 'PREBUILT' | 'PENDING' | 'BUILDING' | 'BUILT' | 'FAILED';
636
+ buildState: 'pending' | 'building' | 'ready' | 'failed';
770
637
  /**
771
- * @description Is there a live workload for this deployment right now, and is it healthy?
772
- *
773
- * * `NEVER_RUN` — nothing ever started it. Deployments are created stopped and
774
- * only become running once promoted, so this is the normal state of a staged
775
- * deployment, not a stall.
776
- * * `PENDING` — a run was requested but nothing is executing yet: pulling an
777
- * image, waiting to be scheduled, or unable to be placed at all.
778
- * * `STARTING` — a container is executing but not ready yet.
779
- * * `RUNNING` — up and ready.
780
- * * `STOPPING` / `STOPPED` — shutting down, or stopped having run before.
781
- * * `FAILED` — the workload crashed, could not start, or hit a terminal
782
- * dependency error. `GET /apps/{appId}/runs` carries the cause.
783
- *
784
- * **Known limitation.** A promoted deployment blocked by a *platform* failure —
785
- * an image that cannot be pulled, a pod that cannot be scheduled — stays
786
- * `PENDING` indefinitely with no reason attached and no automatic resolution.
787
- * Its container never executes, so nothing records a workload failure. This is
788
- * accepted behaviour, not a transient state to wait out: a `PENDING` that is
789
- * not advancing, with the app's `production.desiredId` naming this deployment's
790
- * `id` while `production.actualId` names another, is what it looks like.
791
- * Production is unaffected — the previously promoted deployment keeps serving.
792
- *
793
- * This axis says nothing about whether the deployment is production. That is a
794
- * property of the app's pointer, not of the version, and lives on the app as
795
- * `production.desiredId` / `production.actualId` (plus their `Number` twins).
638
+ * @description Whether this deployment currently has a live, healthy workload.
796
639
  *
797
- * **Deriving a single headline status**, for clients that want one. Apply in
798
- * order, first match wins — recorded here so every client agrees rather than
799
- * inventing its own rule:
800
- *
801
- * | condition | headline |
640
+ * | Value | Meaning |
802
641
  * |---|---|
803
- * | `buildState == FAILED` | build failed |
804
- * | `buildState in (PENDING, BUILDING)` | building |
805
- * | `runState == FAILED` | failed |
806
- * | `runState in (PENDING, STARTING)` | starting |
807
- * | `runState == RUNNING` | running |
808
- * | `runState == STOPPING` | stopping |
809
- * | `runState == STOPPED` | stopped |
810
- * | `runState == NEVER_RUN` | ready — built, idle, promotable |
642
+ * | `neverRun` | Created but never promoted — normal for a staged deployment. |
643
+ * | `pending` | Requested but not yet executing (pulling an image, scheduling). |
644
+ * | `starting` | Executing but not ready yet. |
645
+ * | `running` | Up and healthy. |
646
+ * | `stopping` / `stopped` | Shutting down, or stopped after running. |
647
+ * | `failed` | Crashed, failed to start, or hit a terminal error — see `GET /apps/{appId}/runs` for the cause. |
811
648
  *
812
- * Not published as a field: with `buildState` fixed at `PREBUILT`, it would be
813
- * a pure function of `runState` and so a rename of the field beside it. It
814
- * becomes worth shipping once builds make `buildState` vary.
649
+ * **Caveat:** a platform-level failure (image can't be pulled, no schedulable
650
+ * node) can leave a deployment stuck at `pending` indefinitely instead of
651
+ * reaching `failed`.
815
652
  * @enum {string}
816
653
  */
817
- runState: 'NEVER_RUN' | 'PENDING' | 'STARTING' | 'RUNNING' | 'STOPPING' | 'STOPPED' | 'FAILED';
818
- /** @description `true` once retired (member CR + rendered-config Secret deleted); the row remains in history and is re-materializable. */
654
+ runState: 'neverRun' | 'pending' | 'starting' | 'running' | 'stopping' | 'stopped' | 'failed';
655
+ /** @description `true` once deleted — its running resources and credentials are gone and it can no longer be promoted — but it remains in history. */
819
656
  archived: boolean;
820
657
  /**
821
658
  * Format: date-time
822
- * @description When the deployment was retired; `null` while `archived` is `false`.
659
+ * @description When the deployment was deleted; `null` while `archived` is `false`.
823
660
  */
824
661
  archivedAt: string | null;
825
662
  /**
@@ -828,26 +665,23 @@ type components = {
828
665
  */
829
666
  createdAt: string;
830
667
  };
831
- /** @description A single execution of a deployment. Shares every field with `/v1`'s run payload except `deploymentId`, which `/v1` does not carry: `/v1` has no concept of deployments, so unlike the rest of this shape it does not travel back there. This is a deliberate, permanent divergence — not drift to "fix" by adding `deploymentId` to `/v1` or by removing it here. */
668
+ /** @description A single execution of a deployment. */
832
669
  Run: {
833
670
  /** Format: uuid */
834
671
  id: string;
835
672
  appId: string;
836
- /** @description The deployment this run belongs to. `null` for a run that belongs to the app itself rather than to a deployment (a `/v1`-style run), which is why it is nullable rather than required-and-present. */
673
+ /** @description The deployment this run belongs to. `null` for a run that belongs to the app itself rather than to one of its deployments, and for one recorded before runs carried a subject. */
837
674
  deploymentId: string | null;
838
- /**
839
- * @description Lower-case, unlike the `UPPER_SNAKE` of a deployment's `buildState` and `runState`. That is deliberate, not an oversight: this field is shared with `/v1`'s run payload, and changing the casing on the `/v2` copy alone would fork the two. If it is ever normalised, both surfaces move together.
840
- * @enum {string|null}
841
- */
675
+ /** @enum {string|null} */
842
676
  state?: 'starting' | 'running' | 'failed' | 'finished' | null;
843
677
  /**
844
678
  * Format: date-time
845
- * @description When the run was opened — stamped before any compute exists, so `now - createdAt` on a deployment still reported `PENDING` is how long it has failed to start.
679
+ * @description When the run was opened — stamped before any compute exists, so `now - createdAt` on a deployment still reported `pending` is how long it has failed to start.
846
680
  */
847
681
  createdAt?: string | null;
848
682
  /**
849
683
  * Format: date-time
850
- * @description When the run's workload became ready — stamped only once a Pod matching this run reports `Ready`. A run that never got that far keeps `null` here for good, so `startedAt: null` means "no compute ever became healthy", not "no information". It is not a failure signal on its own: a run can end `failed` with `startedAt: null` and still carry a classified `failureReason`.
684
+ * @description When the run's workload became ready to serve traffic. A run that never got that far keeps `null` here for good, so `startedAt: null` means "no compute ever became healthy", not "no information". It is not a failure signal on its own: a run can end `failed` with `startedAt: null` and still carry a classified `failureReason`.
851
685
  */
852
686
  startedAt?: string | null;
853
687
  /** Format: date-time */
@@ -860,14 +694,13 @@ type components = {
860
694
  /**
861
695
  * @description Why the run failed, when it did. The cause a failed deployment points at. Set at the moment a cause is attributed and never updated afterwards.
862
696
  * A cause is recorded whenever one can be attributed, which happens on both sides of the container ever executing: **before compute** — configuration, decryption, storage-token and workspace failures — and **after the container has executed** — a startup probe that never passed, a startup deadline exceeded. So a classified failure says nothing about how far the run got: plenty of them never started at all.
863
- * **The one gap is a container that never executed for a platform reason** — `ImagePullBackOff`, `CreateContainerError`, a Pod that cannot be scheduled. Such a run keeps its `createdAt`, never gets a `startedAt`, and never gets a `failureReason`; it stays open indefinitely rather than being closed as failed. That is deliberate — platform problems are left to recover once the platform issue is fixed — and it is the same gap a deployment stuck at `runState: PENDING` is the visible form of. A run left open this way is never billed: billing needs `startedAt`, and there is no fallback to `createdAt`.
864
- * Absence therefore means "no cause was attributable", not "look again later" — for the platform case nothing further will ever arrive. Runs predating the field are also unclassified.
697
+ * Absence therefore means "no cause was attributable", not "look again later". Runs predating the field are also unclassified.
865
698
  * Both members are present whenever the object is, but either may be `null`. Branch on `reason`, not on `message`.
866
699
  */
867
700
  failureReason?: {
868
701
  /**
869
- * @description Short, stable, machine-readable identifier, intended as a UI i18n key — the member to switch on when headlining a failure. The value set is owned by the operator and is not enumerated here, so a client must keep a default branch for identifiers it does not know.
870
- * Stable, but **coarser than the names suggest**: one identifier is deliberately reused across related causes rather than split, because each value is an i18n key a client has to learn before it can be emitted. Do not infer the precise cause from `reason` alone — `message` carries the actionable detail, and two failures sharing a `reason` need not share a remedy.
702
+ * @description Short, stable, machine-readable identifier — the member to switch on when headlining a failure. The value set is owned by the platform and is not enumerated here, so a client must keep a default branch for identifiers it does not know.
703
+ * Stable, but **coarser than the names suggest**: one identifier is deliberately reused across related causes rather than split, because each value is one a client has to learn before it can be handled. Do not infer the precise cause from `reason` alone — `message` carries the actionable detail, and two failures sharing a `reason` need not share a remedy.
871
704
  */
872
705
  reason?: string | null;
873
706
  /** @description Human-readable description of the failure, free of internal resource names and cluster-internal detail. Safe to show verbatim. */
@@ -877,10 +710,12 @@ type components = {
877
710
  };
878
711
  DeploymentCreateRequest: {
879
712
  /**
880
- * @description If true (the default), this deployment is also promoted to production. Set `false` to stage a release now and promote it later: the deployment is created and its config version pinned immutably, but nothing starts it and it is not reachable — a staged deployment only ever runs once promoted, at which point the operator validates it by starting it and switches the route only if it becomes healthy.
713
+ * @description If true (the default), this deployment is also promoted to production and started right away. Set `false` to stage a release now and promote it later: the deployment is created and its config version pinned immutably, but nothing starts it and it is not reachable — a staged deployment only ever runs once promoted, at which point it is started and put on the route only if it becomes healthy.
881
714
  * @default true
882
715
  */
883
716
  promote: boolean;
717
+ /** @description Pins this deployment to a specific Storage config version instead of whatever is newest at the moment of the request. Omit to deploy the latest version. */
718
+ configVersion?: string | null;
884
719
  };
885
720
  CreateCredentialRequest: {
886
721
  /** @enum {string} */
@@ -980,9 +815,7 @@ interface operations {
980
815
  createApp: {
981
816
  parameters: {
982
817
  query?: never;
983
- header?: {
984
- 'Idempotency-Key'?: string;
985
- };
818
+ header?: never;
986
819
  path?: never;
987
820
  cookie?: never;
988
821
  };
@@ -992,15 +825,6 @@ interface operations {
992
825
  };
993
826
  };
994
827
  responses: {
995
- /** @description OK — an `Idempotency-Key` replay; the app already existed and nothing was created. */
996
- 200: {
997
- headers: {
998
- [name: string]: unknown;
999
- };
1000
- content: {
1001
- 'application/json': components['schemas']['App'];
1002
- };
1003
- };
1004
828
  /** @description Created */
1005
829
  201: {
1006
830
  headers: {
@@ -1039,8 +863,8 @@ interface operations {
1039
863
  'application/json': components['schemas']['App'];
1040
864
  };
1041
865
  };
1042
- /** @description Forbidden — the app belongs to a different project than the token's. */
1043
- 403: {
866
+ /** @description Bad Request */
867
+ 400: {
1044
868
  headers: {
1045
869
  [name: string]: unknown;
1046
870
  };
@@ -1073,8 +897,8 @@ interface operations {
1073
897
  };
1074
898
  content?: never;
1075
899
  };
1076
- /** @description Forbidden — the app belongs to a different project than the token's. */
1077
- 403: {
900
+ /** @description Bad Request */
901
+ 400: {
1078
902
  headers: {
1079
903
  [name: string]: unknown;
1080
904
  };
@@ -1089,7 +913,7 @@ interface operations {
1089
913
  };
1090
914
  };
1091
915
  };
1092
- patchApp: {
916
+ unpublishApp: {
1093
917
  parameters: {
1094
918
  query?: never;
1095
919
  header?: never;
@@ -1098,13 +922,9 @@ interface operations {
1098
922
  };
1099
923
  cookie?: never;
1100
924
  };
1101
- requestBody: {
1102
- content: {
1103
- 'application/json': components['schemas']['AppPatchRequest'];
1104
- };
1105
- };
925
+ requestBody?: never;
1106
926
  responses: {
1107
- /** @description OK */
927
+ /** @description OK — already unpublished (with or without an App CRD); no-op, returns the app unchanged */
1108
928
  200: {
1109
929
  headers: {
1110
930
  [name: string]: unknown;
@@ -1113,33 +933,6 @@ interface operations {
1113
933
  'application/json': components['schemas']['App'];
1114
934
  };
1115
935
  };
1116
- /** @description Forbidden — the app belongs to a different project than the token's. */
1117
- 403: {
1118
- headers: {
1119
- [name: string]: unknown;
1120
- };
1121
- content?: never;
1122
- };
1123
- /** @description Not Found */
1124
- 404: {
1125
- headers: {
1126
- [name: string]: unknown;
1127
- };
1128
- content?: never;
1129
- };
1130
- };
1131
- };
1132
- unpublishApp: {
1133
- parameters: {
1134
- query?: never;
1135
- header?: never;
1136
- path: {
1137
- appId: string;
1138
- };
1139
- cookie?: never;
1140
- };
1141
- requestBody?: never;
1142
- responses: {
1143
936
  /** @description Accepted — production is being unset */
1144
937
  202: {
1145
938
  headers: {
@@ -1149,8 +942,8 @@ interface operations {
1149
942
  'application/json': components['schemas']['App'];
1150
943
  };
1151
944
  };
1152
- /** @description No Content — already unpublished (with or without an App CRD); no-op */
1153
- 204: {
945
+ /** @description Forbidden — the app belongs to a different project than the token's. */
946
+ 403: {
1154
947
  headers: {
1155
948
  [name: string]: unknown;
1156
949
  };
@@ -1176,6 +969,15 @@ interface operations {
1176
969
  };
1177
970
  requestBody?: never;
1178
971
  responses: {
972
+ /** @description OK — already suspended; no-op, returns the app unchanged */
973
+ 200: {
974
+ headers: {
975
+ [name: string]: unknown;
976
+ };
977
+ content: {
978
+ 'application/json': components['schemas']['App'];
979
+ };
980
+ };
1179
981
  /** @description Accepted — suspend is being applied */
1180
982
  202: {
1181
983
  headers: {
@@ -1185,8 +987,8 @@ interface operations {
1185
987
  'application/json': components['schemas']['App'];
1186
988
  };
1187
989
  };
1188
- /** @description No Content — already suspended; no-op */
1189
- 204: {
990
+ /** @description Forbidden — the app belongs to a different project than the token's. */
991
+ 403: {
1190
992
  headers: {
1191
993
  [name: string]: unknown;
1192
994
  };
@@ -1221,6 +1023,15 @@ interface operations {
1221
1023
  };
1222
1024
  requestBody?: never;
1223
1025
  responses: {
1026
+ /** @description OK — already running; no-op, returns the app unchanged */
1027
+ 200: {
1028
+ headers: {
1029
+ [name: string]: unknown;
1030
+ };
1031
+ content: {
1032
+ 'application/json': components['schemas']['App'];
1033
+ };
1034
+ };
1224
1035
  /** @description Accepted — resume is being applied */
1225
1036
  202: {
1226
1037
  headers: {
@@ -1230,8 +1041,8 @@ interface operations {
1230
1041
  'application/json': components['schemas']['App'];
1231
1042
  };
1232
1043
  };
1233
- /** @description No Content — already running; no-op */
1234
- 204: {
1044
+ /** @description Forbidden — the app belongs to a different project than the token's. */
1045
+ 403: {
1235
1046
  headers: {
1236
1047
  [name: string]: unknown;
1237
1048
  };
@@ -1287,7 +1098,7 @@ interface operations {
1287
1098
  };
1288
1099
  content?: never;
1289
1100
  };
1290
- /** @description Forbidden */
1101
+ /** @description Forbidden — the token is valid but lacks the `apps:proxy` scope. A Storage API token is rejected here whatever its project, unlike every other endpoint on this app. */
1291
1102
  403: {
1292
1103
  headers: {
1293
1104
  [name: string]: unknown;
@@ -1367,7 +1178,9 @@ interface operations {
1367
1178
  [name: string]: unknown;
1368
1179
  };
1369
1180
  content: {
1370
- 'application/json': components['schemas']['App'];
1181
+ 'application/json': {
1182
+ password: string;
1183
+ };
1371
1184
  };
1372
1185
  };
1373
1186
  /** @description Bad Request — the app's config has no `password`-type auth provider. */
@@ -1375,9 +1188,7 @@ interface operations {
1375
1188
  headers: {
1376
1189
  [name: string]: unknown;
1377
1190
  };
1378
- content: {
1379
- 'application/json': components['schemas']['ErrorResponse'];
1380
- };
1191
+ content?: never;
1381
1192
  };
1382
1193
  /** @description Forbidden — the app belongs to a different project than the token's. */
1383
1194
  403: {
@@ -1398,7 +1209,7 @@ interface operations {
1398
1209
  listRuns: {
1399
1210
  parameters: {
1400
1211
  query?: {
1401
- /** @description Restrict to runs of a single deployment. */
1212
+ /** @description Restrict to runs of a single deployment. Runs recorded before runs carried a subject have none and are never returned by this filter. */
1402
1213
  deploymentId?: string;
1403
1214
  /** @description Restrict to runs with `createdAt >= since` (RFC 3339 / ISO-8601, e.g. `2026-01-01T00:00:00+00:00`). */
1404
1215
  since?: string;
@@ -1434,7 +1245,7 @@ interface operations {
1434
1245
  'application/json': components['schemas']['ErrorResponse'];
1435
1246
  };
1436
1247
  };
1437
- /** @description Forbidden — the token belongs to a different project */
1248
+ /** @description Forbidden — the app belongs to a different project than the token's. */
1438
1249
  403: {
1439
1250
  headers: {
1440
1251
  [name: string]: unknown;
@@ -1473,7 +1284,7 @@ interface operations {
1473
1284
  'application/json': components['schemas']['Run'];
1474
1285
  };
1475
1286
  };
1476
- /** @description Forbidden — the token belongs to a different project */
1287
+ /** @description Forbidden — the app belongs to a different project than the token's. */
1477
1288
  403: {
1478
1289
  headers: {
1479
1290
  [name: string]: unknown;
@@ -1493,7 +1304,12 @@ interface operations {
1493
1304
  };
1494
1305
  listDeployments: {
1495
1306
  parameters: {
1496
- query?: never;
1307
+ query?: {
1308
+ /** @description `false` (the default) lists live deployments only. `true` lists deleted deployments only. */
1309
+ archived?: boolean;
1310
+ offset?: number;
1311
+ limit?: number;
1312
+ };
1497
1313
  header?: never;
1498
1314
  path: {
1499
1315
  appId: string;
@@ -1511,6 +1327,13 @@ interface operations {
1511
1327
  'application/json': components['schemas']['Deployment'][];
1512
1328
  };
1513
1329
  };
1330
+ /** @description Bad Request — the app belongs to a different project than the token's, or `archived`, `offset` or `limit` is not valid. */
1331
+ 400: {
1332
+ headers: {
1333
+ [name: string]: unknown;
1334
+ };
1335
+ content?: never;
1336
+ };
1514
1337
  /** @description Not Found */
1515
1338
  404: {
1516
1339
  headers: {
@@ -1523,9 +1346,7 @@ interface operations {
1523
1346
  createDeployment: {
1524
1347
  parameters: {
1525
1348
  query?: never;
1526
- header?: {
1527
- 'Idempotency-Key'?: string;
1528
- };
1349
+ header?: never;
1529
1350
  path: {
1530
1351
  appId: string;
1531
1352
  };
@@ -1537,8 +1358,8 @@ interface operations {
1537
1358
  };
1538
1359
  };
1539
1360
  responses: {
1540
- /** @description OK — an `Idempotency-Key` replay; the deployment already existed and nothing was created. */
1541
- 200: {
1361
+ /** @description Accepted — deployment created. It starts at `buildState: ready`, `runState: neverRun`; promoting it is what causes it to run. */
1362
+ 202: {
1542
1363
  headers: {
1543
1364
  [name: string]: unknown;
1544
1365
  };
@@ -1546,14 +1367,12 @@ interface operations {
1546
1367
  'application/json': components['schemas']['Deployment'];
1547
1368
  };
1548
1369
  };
1549
- /** @description Accepted — deployment created. It starts at `buildState: PREBUILT`, `runState: NEVER_RUN`; promoting it is what causes it to run. */
1550
- 202: {
1370
+ /** @description Bad Request — the app belongs to a different project than the token's, or `configVersion` names a version that does not exist for this app's config. */
1371
+ 400: {
1551
1372
  headers: {
1552
1373
  [name: string]: unknown;
1553
1374
  };
1554
- content: {
1555
- 'application/json': components['schemas']['Deployment'];
1556
- };
1375
+ content?: never;
1557
1376
  };
1558
1377
  /** @description Not Found */
1559
1378
  404: {
@@ -1585,6 +1404,13 @@ interface operations {
1585
1404
  'application/json': components['schemas']['Deployment'];
1586
1405
  };
1587
1406
  };
1407
+ /** @description Bad Request — the app belongs to a different project than the token's. */
1408
+ 400: {
1409
+ headers: {
1410
+ [name: string]: unknown;
1411
+ };
1412
+ content?: never;
1413
+ };
1588
1414
  /** @description Not Found */
1589
1415
  404: {
1590
1416
  headers: {
@@ -1606,20 +1432,27 @@ interface operations {
1606
1432
  };
1607
1433
  requestBody?: never;
1608
1434
  responses: {
1609
- /** @description Accepted — the member CR and its rendered-config Secret are being deleted */
1435
+ /** @description Accepted — the deployment is being deleted; its running resources and credentials are being torn down */
1610
1436
  202: {
1611
1437
  headers: {
1612
1438
  [name: string]: unknown;
1613
1439
  };
1614
1440
  content?: never;
1615
1441
  };
1616
- /** @description No Content — already archived; no-op */
1442
+ /** @description No Content — already deleted; no-op */
1617
1443
  204: {
1618
1444
  headers: {
1619
1445
  [name: string]: unknown;
1620
1446
  };
1621
1447
  content?: never;
1622
1448
  };
1449
+ /** @description Bad Request — the app belongs to a different project than the token's. */
1450
+ 400: {
1451
+ headers: {
1452
+ [name: string]: unknown;
1453
+ };
1454
+ content?: never;
1455
+ };
1623
1456
  /** @description Not Found */
1624
1457
  404: {
1625
1458
  headers: {
@@ -1627,7 +1460,7 @@ interface operations {
1627
1460
  };
1628
1461
  content?: never;
1629
1462
  };
1630
- /** @description Conflict — this deployment's id is named production.desiredId or production.actualId on the app. */
1463
+ /** @description Conflict — this deployment's id is named production.desiredDeploymentId or production.actualDeploymentId on the app. */
1631
1464
  409: {
1632
1465
  headers: {
1633
1466
  [name: string]: unknown;
@@ -1650,7 +1483,7 @@ interface operations {
1650
1483
  };
1651
1484
  requestBody?: never;
1652
1485
  responses: {
1653
- /** @description Accepted — the intent was recorded. The operator validates and switches the route asynchronously; `production.desiredId`/`desiredNumber` and `production.actualId`/`actualNumber` on the app differ until it converges, and the deployment's own `runState` reports a target that failed to start. */
1486
+ /** @description Accepted — the promotion happens asynchronously. Watch the app's `production.desiredDeploymentId` and `production.actualDeploymentId` to see its progress. */
1654
1487
  202: {
1655
1488
  headers: {
1656
1489
  [name: string]: unknown;
@@ -1659,8 +1492,8 @@ interface operations {
1659
1492
  'application/json': components['schemas']['App'];
1660
1493
  };
1661
1494
  };
1662
- /** @description No Content — already production; no-op */
1663
- 204: {
1495
+ /** @description Bad Request — the app belongs to a different project than the token's. */
1496
+ 400: {
1664
1497
  headers: {
1665
1498
  [name: string]: unknown;
1666
1499
  };
@@ -1673,7 +1506,7 @@ interface operations {
1673
1506
  };
1674
1507
  content?: never;
1675
1508
  };
1676
- /** @description Conflict — the app has no App CRD (it was never deployed via /v2). */
1509
+ /** @description Conflict — either the app was never deployed via /v2, or this deployment has been deleted (`archived: true`). */
1677
1510
  409: {
1678
1511
  headers: {
1679
1512
  [name: string]: unknown;
@@ -1707,7 +1540,7 @@ interface operations {
1707
1540
  'text/plain': string;
1708
1541
  };
1709
1542
  };
1710
- /** @description Bad Request — the app has an App CRD but no currently serving member (`apps.appNotRunning`). */
1543
+ /** @description Bad Request — the app has an App CRD but no currently serving deployment (`apps.appNotRunning`). */
1711
1544
  400: {
1712
1545
  headers: {
1713
1546
  [name: string]: unknown;
@@ -1752,7 +1585,7 @@ interface operations {
1752
1585
  'text/plain': string;
1753
1586
  };
1754
1587
  };
1755
- /** @description Bad Request — the app has an App CRD but no currently serving member (`apps.appNotRunning`). */
1588
+ /** @description Bad Request — the app has an App CRD but no currently serving deployment (`apps.appNotRunning`). */
1756
1589
  400: {
1757
1590
  headers: {
1758
1591
  [name: string]: unknown;
@@ -1961,9 +1794,7 @@ interface operations {
1961
1794
  createAppGitRepoCredential: {
1962
1795
  parameters: {
1963
1796
  query?: never;
1964
- header?: {
1965
- 'Idempotency-Key'?: string;
1966
- };
1797
+ header?: never;
1967
1798
  path: {
1968
1799
  appId: string;
1969
1800
  };
@@ -1975,15 +1806,6 @@ interface operations {
1975
1806
  };
1976
1807
  };
1977
1808
  responses: {
1978
- /** @description OK — an `Idempotency-Key` replay; the credential already existed and nothing was created. */
1979
- 200: {
1980
- headers: {
1981
- [name: string]: unknown;
1982
- };
1983
- content: {
1984
- 'application/json': components['schemas']['CreatedCredential'];
1985
- };
1986
- };
1987
1809
  /** @description Created */
1988
1810
  201: {
1989
1811
  headers: {
@@ -2115,10 +1937,11 @@ type RunId = OpenapiPathType<paths['/apps/{appId}/runs/{runId}']['get']>['runId'
2115
1937
  type CredentialId = OpenapiPathType<paths['/apps/{appId}/git-repo/credentials/{credentialId}']['get']>['credentialId'];
2116
1938
  type GetAppsQuery = OpenapiQueryType<paths['/apps']['get']>;
2117
1939
  type GetAppRunsQuery = OpenapiQueryType<paths['/apps/{appId}/runs']['get']>;
1940
+ type GetDeploymentsQuery = OpenapiQueryType<paths['/apps/{appId}/deployments']['get']>;
2118
1941
  type GetLogsTailQuery = OpenapiQueryType<paths['/apps/{appId}/logs/tail']['get']>;
2119
1942
  type CreateAppBody = OpenapiBodyType<paths['/apps']['post']>;
2120
1943
  type CreateDeploymentBody = OpenapiBodyType<paths['/apps/{appId}/deployments']['post']>;
2121
1944
  type CreateCredentialBody = OpenapiBodyType<paths['/apps/{appId}/git-repo/credentials']['post']>;
2122
1945
  //#endregion
2123
- export { components as S, DeploymentRunState as _, AppRun as a, GetLogsTailQuery as b, CreateCredentialBody as c, Credential as d, CredentialId as f, DeploymentId as g, DeploymentBuildState as h, AppPassword as i, CreateDeploymentBody as l, Deployment as m, AppGitRepo as n, AppState as o, CredentialList as p, AppId as r, CreateAppBody as s, App as t, CreatedCredential as u, GetAppRunsQuery as v, RunId as x, GetAppsQuery as y };
2124
- //# sourceMappingURL=types-CBgLCkYe.d.ts.map
1946
+ export { components as C, RunId as S, DeploymentRunState as _, AppRun as a, GetDeploymentsQuery as b, CreateCredentialBody as c, Credential as d, CredentialId as f, DeploymentId as g, DeploymentBuildState as h, AppPassword as i, CreateDeploymentBody as l, Deployment as m, AppGitRepo as n, AppState as o, CredentialList as p, AppId as r, CreateAppBody as s, App as t, CreatedCredential as u, GetAppRunsQuery as v, GetLogsTailQuery as x, GetAppsQuery as y };
1947
+ //# sourceMappingURL=types-D6UmMa6E.d.ts.map