@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
package/CHANGELOG.md CHANGED
@@ -1,5 +1,33 @@
1
1
  # @keboola/api-client
2
2
 
3
+ ## 36.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - **Breaking:** the `apps` (`/v2` App Deployments) types are regenerated from the current canary spec, which renamed and dropped fields across `App` and `Deployment`.
8
+
9
+ `App`:
10
+ - `production.desiredId` / `actualId` → `production.desiredDeploymentId` / `actualDeploymentId`; the `desiredNumber` / `actualNumber` twins are gone.
11
+ - `state` values are camelCase and the set changed: `notDeployed | starting | running | suspended | disabled`. `SLEEPING` and `SUSPENDED` collapse into `suspended` (stopped, wakes on the next request); the new `disabled` is stopped by a failure and will not auto-wake.
12
+ - `configVersion`, `mode` and `undeployedChanges` are gone — an app no longer reports whether its config has moved past what is deployed.
13
+
14
+ `Deployment`:
15
+ - `number` and `configId` are gone; `size` → `runtimeSize`. Ids are UUIDv7, not the Kubernetes CR name.
16
+ - `buildState` is `pending | building | ready | failed` (`PREBUILT` → `ready`) and `runState` is camelCase.
17
+
18
+ Client surface:
19
+ - `unpublishApp`, `suspendApp`, `resumeApp` and `promoteDeployment` resolve with the `App` instead of `App | null` — the service answers a no-op with the app unchanged rather than `204`.
20
+ - `resetAppPassword` resolves with `{ password }` rather than the app.
21
+ - `getDeployments` takes a query (`archived`, `offset`, `limit`) between the app id and the signal.
22
+ - `createDeployment` takes `configVersion` to pin an older config version, and `createApp` requires `branchId` and `useManagedGitRepo`.
23
+ - `PATCH /apps/{appId}` is gone from the spec; it was never exposed.
24
+
25
+ `appFixtures` loses `undeployedChanges` and `sleeping`, and gains `disabled`.
26
+
27
+ ### Minor Changes
28
+
29
+ - `createProjectInvitation` accepts an optional `landingApp`, naming the ui-app the invitation leads into instead of the Keboola project. Absent means the ordinary invitation email.
30
+
3
31
  ## 35.0.0
4
32
 
5
33
  ### Major Changes
@@ -10,10 +10,9 @@ const require_appLogs = require("../appLogs-BjfUoWzs.cjs");
10
10
  * `baseUrl` must already point past the `/v2` prefix (`https://<data-science-host>/v2`); the
11
11
  * registry composes it — see `createServiceClients`.
12
12
  *
13
- * Two documented endpoints are deliberately absent: `PATCH /apps/{appId}` has no patchable field
14
- * yet (`name`/`description` are create-only, so `{}` is the only accepted body), and
15
- * `POST /apps/{appId}/activity` is apps-proxy's heartbeat, authenticated by a Manage API token with
16
- * the `apps:proxy` scope that this storage-token client cannot supply.
13
+ * One documented endpoint is deliberately absent: `POST /apps/{appId}/activity` is apps-proxy's
14
+ * heartbeat, authenticated by a Manage API token with the `apps:proxy` scope that this
15
+ * storage-token client cannot supply.
17
16
  */
18
17
  const createAppsClient = ({ baseUrl, middlewares, auth }) => {
19
18
  const client = require_createOpenapiFetchClient.createOpenapiFetchClient({
@@ -48,8 +47,8 @@ const createAppsClient = ({ baseUrl, middlewares, auth }) => {
48
47
  await client.delete("/apps/{appId}", { path: { appId } }, { signal });
49
48
  };
50
49
  /**
51
- * Drops production routing — the app's URL 404s afterwards. `null` when there was nothing to
52
- * unpublish (already unpublished, or never deployed via `/v2`): the service answers `204`.
50
+ * Drops production routing — the app's URL 404s afterwards. A no-op (already unpublished, or
51
+ * never deployed) returns the app unchanged rather than failing.
53
52
  */
54
53
  const unpublishApp = async (appId, signal) => {
55
54
  const { data } = await client.post("/apps/{appId}/unpublish", { path: { appId } }, { signal });
@@ -57,15 +56,15 @@ const createAppsClient = ({ baseUrl, middlewares, auth }) => {
57
56
  };
58
57
  /**
59
58
  * Sleeps the app now instead of waiting for the idle timer, and disarms wake-on-request: a
60
- * visitor gets a `503` until an explicit {@link resumeApp}. `null` when already suspended (`204`).
59
+ * visitor gets a `503` until an explicit {@link resumeApp}. A no-op on an already suspended app.
61
60
  */
62
61
  const suspendApp = async (appId, signal) => {
63
62
  const { data } = await client.post("/apps/{appId}/suspend", { path: { appId } }, { signal });
64
63
  return data;
65
64
  };
66
65
  /**
67
- * Wakes the app now and re-arms wake-on-request. `null` when it was already running (`204`).
68
- * The returned app reports `STARTING` — the operator has not confirmed it serving yet.
66
+ * Wakes the app now and re-arms wake-on-request. A no-op on an already running app.
67
+ * The returned app reports `starting` — the operator has not confirmed it serving yet.
69
68
  */
70
69
  const resumeApp = async (appId, signal) => {
71
70
  const { data } = await client.post("/apps/{appId}/resume", { path: { appId } }, { signal });
@@ -78,7 +77,7 @@ const createAppsClient = ({ baseUrl, middlewares, auth }) => {
78
77
  };
79
78
  /** Mints a fresh password, replacing any existing one. Read it back with {@link getAppPassword}. */
80
79
  const resetAppPassword = async (appId, signal) => {
81
- const { data } = await client.post("/apps/{appId}/reset-password", { path: { appId } }, { signal });
80
+ const { data } = await client.post("/apps/{appId}/password/reset", { path: { appId } }, { signal });
82
81
  return data;
83
82
  };
84
83
  /**
@@ -101,8 +100,8 @@ const createAppsClient = ({ baseUrl, middlewares, auth }) => {
101
100
  };
102
101
  /**
103
102
  * Deploys the app's current config version as a new immutable deployment, promoting it unless
104
- * `body.promote` is `false` (a staged release never runs until promoted). The id and `number` come
105
- * back synchronously; readiness does not.
103
+ * `body.promote` is `false` (a staged release never runs until promoted). Pin an older config
104
+ * version with `body.configVersion`. The deployment comes back synchronously; readiness does not.
106
105
  */
107
106
  const createDeployment = async (appId, body, options = {}) => {
108
107
  const { data } = await client.post("/apps/{appId}/deployments", {
@@ -111,9 +110,17 @@ const createAppsClient = ({ baseUrl, middlewares, auth }) => {
111
110
  }, writeOptions(options));
112
111
  return data;
113
112
  };
114
- /** Full history, retired (`archived: true`) deployments included — rows outlive their workloads. */
115
- const getDeployments = async (appId, signal) => {
116
- const { data } = await client.get("/apps/{appId}/deployments", { path: { appId } }, { signal });
113
+ /**
114
+ * Deployment history, newest page first.
115
+ *
116
+ * - `query.archived` filters on whether the deployment was deleted; omitting it returns both.
117
+ * - A deleted deployment keeps its row — history outlives the workload.
118
+ */
119
+ const getDeployments = async (appId, query = {}, signal) => {
120
+ const { data } = await client.get("/apps/{appId}/deployments", {
121
+ path: { appId },
122
+ query
123
+ }, { signal });
117
124
  return data;
118
125
  };
119
126
  const getDeployment = async (appId, deploymentId, signal) => {
@@ -124,8 +131,8 @@ const createAppsClient = ({ baseUrl, middlewares, auth }) => {
124
131
  return data;
125
132
  };
126
133
  /**
127
- * Retires the deployment: the workload and its rendered-config secret go, the row stays in
128
- * history as `archived`. Rejected with a `409` while the app's `production` still names it.
134
+ * Deletes the deployment: its running resources and credentials go, the row stays in history as
135
+ * `archived`. Rejected with a `409` while the app's `production` still names it.
129
136
  */
130
137
  const deleteDeployment = async (appId, deploymentId, signal) => {
131
138
  await client.delete("/apps/{appId}/deployments/{deploymentId}", { path: {
@@ -135,8 +142,8 @@ const createAppsClient = ({ baseUrl, middlewares, auth }) => {
135
142
  };
136
143
  /**
137
144
  * Makes this deployment production — the same call rolls back, applied to an older one. The route
138
- * switches only once the target serves, so the returned app's `production.desiredId` and
139
- * `.actualId` differ until it converges. `null` when it was already production (`204`).
145
+ * switches only once the target serves, so the returned app's `production.desiredDeploymentId`
146
+ * and `.actualDeploymentId` differ until it converges.
140
147
  */
141
148
  const promoteDeployment = async (appId, deploymentId, signal) => {
142
149
  const { data } = await client.post("/apps/{appId}/deployments/{deploymentId}/promote", { path: {
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":["createOpenapiFetchClient","createAuthHeaders","readAppLogsTail","readAppLogsDownload"],"sources":["../../src/clients/apps/appsClient.ts"],"sourcesContent":["import { readAppLogsDownload, readAppLogsTail } from '../../domain/appLogs';\nimport { createOpenapiFetchClient } from '../../fetchClient';\nimport { createAuthHeaders } from '../auth';\nimport type { ClientInitOptions } from '../types';\n\nimport type { paths } from './__generated__/schema';\nimport type {\n App,\n AppId,\n CreateAppBody,\n CreateCredentialBody,\n CreateDeploymentBody,\n CredentialId,\n DeploymentId,\n GetAppRunsQuery,\n GetAppsQuery,\n GetLogsTailQuery,\n RunId,\n} from './types';\n\n/**\n * No `idempotencyKey`. The service accepted an `Idempotency-Key` that turned a replayed create\n * into a no-op, and support for it was **dropped on 17 Aug 2026** — the spec still documents the\n * header and has yet to catch up. It was\n * unusable from a browser in any case — the service's `Access-Control-Allow-Headers` never listed\n * the header, so sending it failed the preflight and the request never left the page.\n *\n * Every create here is therefore a genuine create, and a caller that retries one is responsible\n * for the duplicate it may produce.\n */\ntype WriteOptions = {\n signal?: AbortSignal;\n};\n\ntype LogsTailOptions = {\n query?: GetLogsTailQuery;\n signal?: AbortSignal;\n};\n\n/**\n * `/v2` App Deployments — data apps plus the immutable deployment history behind them. Sibling of\n * the `dataScience` client, which wraps the same service's `/v1` surface.\n *\n * `baseUrl` must already point past the `/v2` prefix (`https://<data-science-host>/v2`); the\n * registry composes it — see `createServiceClients`.\n *\n * Two documented endpoints are deliberately absent: `PATCH /apps/{appId}` has no patchable field\n * yet (`name`/`description` are create-only, so `{}` is the only accepted body), and\n * `POST /apps/{appId}/activity` is apps-proxy's heartbeat, authenticated by a Manage API token with\n * the `apps:proxy` scope that this storage-token client cannot supply.\n */\nexport const createAppsClient = ({ baseUrl, middlewares, auth }: ClientInitOptions) => {\n const client = createOpenapiFetchClient<paths>({\n baseUrl,\n middlewares,\n headers: createAuthHeaders(auth),\n });\n\n const writeOptions = ({ signal }: WriteOptions) => ({ signal });\n\n /** Service metadata (`appName`, `appVersion`, `apiDocs`) — the `/v2` surface has no `/health-check`. */\n const healthCheck = async (signal?: AbortSignal) => {\n const { data } = await client.get('/', {}, { signal });\n\n return data;\n };\n\n const getApps = async (query: GetAppsQuery = {}, signal?: AbortSignal) => {\n const { data } = await client.get('/apps', { query }, { signal });\n\n return data;\n };\n\n const getApp = async (appId: AppId, signal?: AbortSignal) => {\n const { data } = await client.get('/apps/{appId}', { path: { appId } }, { signal });\n\n return data;\n };\n\n /**\n * Reserves the app and its Storage configuration only. Content (`parameters`) and auth\n * (`authorization.app_proxy`) are written afterwards through the Storage API, on the config named\n * by the response's `componentId`/`branchId`/`configId`.\n */\n const createApp = async (body: CreateAppBody, options: WriteOptions = {}) => {\n const { data } = await client.post('/apps', { body }, writeOptions(options));\n\n return data;\n };\n\n const deleteApp = async (appId: AppId, signal?: AbortSignal) => {\n await client.delete('/apps/{appId}', { path: { appId } }, { signal });\n };\n\n /**\n * Drops production routing — the app's URL 404s afterwards. `null` when there was nothing to\n * unpublish (already unpublished, or never deployed via `/v2`): the service answers `204`.\n */\n const unpublishApp = async (appId: AppId, signal?: AbortSignal): Promise<App | null> => {\n const { data } = await client.post('/apps/{appId}/unpublish', { path: { appId } }, { signal });\n\n return data;\n };\n\n /**\n * Sleeps the app now instead of waiting for the idle timer, and disarms wake-on-request: a\n * visitor gets a `503` until an explicit {@link resumeApp}. `null` when already suspended (`204`).\n */\n const suspendApp = async (appId: AppId, signal?: AbortSignal): Promise<App | null> => {\n const { data } = await client.post('/apps/{appId}/suspend', { path: { appId } }, { signal });\n\n return data;\n };\n\n /**\n * Wakes the app now and re-arms wake-on-request. `null` when it was already running (`204`).\n * The returned app reports `STARTING` — the operator has not confirmed it serving yet.\n */\n const resumeApp = async (appId: AppId, signal?: AbortSignal): Promise<App | null> => {\n const { data } = await client.post('/apps/{appId}/resume', { path: { appId } }, { signal });\n\n return data;\n };\n\n /** `password` is `null` until one is minted — by the app's first deployment or {@link resetAppPassword}. */\n const getAppPassword = async (appId: AppId, signal?: AbortSignal) => {\n const { data } = await client.get('/apps/{appId}/password', { path: { appId } }, { signal });\n\n return data;\n };\n\n /** Mints a fresh password, replacing any existing one. Read it back with {@link getAppPassword}. */\n const resetAppPassword = async (appId: AppId, signal?: AbortSignal) => {\n const { data } = await client.post(\n '/apps/{appId}/reset-password',\n { path: { appId } },\n { signal },\n );\n\n return data;\n };\n\n /**\n * Runs of the app, newest first — app-wide, so this is where a failed deployment's cause lives\n * (`failureReason`, `startupLogs`). Narrow to one deployment with `query.deploymentId`.\n */\n const getAppRuns = async (appId: AppId, query: GetAppRunsQuery = {}, signal?: AbortSignal) => {\n const { data } = await client.get('/apps/{appId}/runs', { path: { appId }, query }, { signal });\n\n return data;\n };\n\n const getAppRun = async (appId: AppId, runId: RunId, signal?: AbortSignal) => {\n const { data } = await client.get(\n '/apps/{appId}/runs/{runId}',\n { path: { appId, runId } },\n { signal },\n );\n\n return data;\n };\n\n /**\n * Deploys the app's current config version as a new immutable deployment, promoting it unless\n * `body.promote` is `false` (a staged release never runs until promoted). The id and `number` come\n * back synchronously; readiness does not.\n */\n const createDeployment = async (\n appId: AppId,\n body?: CreateDeploymentBody,\n options: WriteOptions = {},\n ) => {\n const { data } = await client.post(\n '/apps/{appId}/deployments',\n { path: { appId }, body },\n writeOptions(options),\n );\n\n return data;\n };\n\n /** Full history, retired (`archived: true`) deployments included — rows outlive their workloads. */\n const getDeployments = async (appId: AppId, signal?: AbortSignal) => {\n const { data } = await client.get('/apps/{appId}/deployments', { path: { appId } }, { signal });\n\n return data;\n };\n\n const getDeployment = async (appId: AppId, deploymentId: DeploymentId, signal?: AbortSignal) => {\n const { data } = await client.get(\n '/apps/{appId}/deployments/{deploymentId}',\n { path: { appId, deploymentId } },\n { signal },\n );\n\n return data;\n };\n\n /**\n * Retires the deployment: the workload and its rendered-config secret go, the row stays in\n * history as `archived`. Rejected with a `409` while the app's `production` still names it.\n */\n const deleteDeployment = async (\n appId: AppId,\n deploymentId: DeploymentId,\n signal?: AbortSignal,\n ) => {\n await client.delete(\n '/apps/{appId}/deployments/{deploymentId}',\n { path: { appId, deploymentId } },\n { signal },\n );\n };\n\n /**\n * Makes this deployment production — the same call rolls back, applied to an older one. The route\n * switches only once the target serves, so the returned app's `production.desiredId` and\n * `.actualId` differ until it converges. `null` when it was already production (`204`).\n */\n const promoteDeployment = async (\n appId: AppId,\n deploymentId: DeploymentId,\n signal?: AbortSignal,\n ): Promise<App | null> => {\n const { data } = await client.post(\n '/apps/{appId}/deployments/{deploymentId}/promote',\n { path: { appId, deploymentId } },\n { signal },\n );\n\n return data;\n };\n\n /**\n * Container output of the app's currently serving member. `query.since` and `query.lines` are\n * mutually exclusive; passing neither returns the log from its start.\n */\n const getAppLogsTail = (appId: AppId, { query, signal }: LogsTailOptions = {}) =>\n readAppLogsTail(() =>\n client.get('/apps/{appId}/logs/tail', { path: { appId }, query }, { signal }),\n );\n\n const getAppLogsDownload = (appId: AppId, signal?: AbortSignal) =>\n readAppLogsDownload(() =>\n client.get('/apps/{appId}/logs/download', { path: { appId } }, { signal }),\n );\n\n const getDeploymentLogsTail = (\n appId: AppId,\n deploymentId: DeploymentId,\n { query, signal }: LogsTailOptions = {},\n ) =>\n readAppLogsTail(() =>\n client.get(\n '/apps/{appId}/deployments/{deploymentId}/logs/tail',\n { path: { appId, deploymentId }, query },\n { signal },\n ),\n );\n\n const getDeploymentLogsDownload = (\n appId: AppId,\n deploymentId: DeploymentId,\n signal?: AbortSignal,\n ) =>\n readAppLogsDownload(() =>\n client.get(\n '/apps/{appId}/deployments/{deploymentId}/logs/download',\n { path: { appId, deploymentId } },\n { signal },\n ),\n );\n\n /** The app's Git repository — managed or external. `409` when it has none configured. */\n const getAppGitRepo = async (appId: AppId, signal?: AbortSignal) => {\n const { data } = await client.get('/apps/{appId}/git-repo', { path: { appId } }, { signal });\n\n return data;\n };\n\n /** Credentials of the app's managed repository, per app rather than per deployment. */\n const getAppGitRepoCredentials = async (appId: AppId, signal?: AbortSignal) => {\n const { data } = await client.get(\n '/apps/{appId}/git-repo/credentials',\n { path: { appId } },\n { signal },\n );\n\n return data;\n };\n\n const getAppGitRepoCredential = async (\n appId: AppId,\n credentialId: CredentialId,\n signal?: AbortSignal,\n ) => {\n const { data } = await client.get(\n '/apps/{appId}/git-repo/credentials/{credentialId}',\n { path: { appId, credentialId } },\n { signal },\n );\n\n return data;\n };\n\n /** An `http_token` credential returns its `secret` here and nowhere else — store it now or lose it. */\n const createAppGitRepoCredential = async (\n appId: AppId,\n body: CreateCredentialBody,\n options: WriteOptions = {},\n ) => {\n const { data } = await client.post(\n '/apps/{appId}/git-repo/credentials',\n { path: { appId }, body },\n writeOptions(options),\n );\n\n return data;\n };\n\n const deleteAppGitRepoCredential = async (\n appId: AppId,\n credentialId: CredentialId,\n signal?: AbortSignal,\n ) => {\n await client.delete(\n '/apps/{appId}/git-repo/credentials/{credentialId}',\n { path: { appId, credentialId } },\n { signal },\n );\n };\n\n return {\n healthCheck,\n getApps,\n getApp,\n createApp,\n deleteApp,\n unpublishApp,\n suspendApp,\n resumeApp,\n getAppPassword,\n resetAppPassword,\n getAppRuns,\n getAppRun,\n createDeployment,\n getDeployments,\n getDeployment,\n deleteDeployment,\n promoteDeployment,\n getAppLogsTail,\n getAppLogsDownload,\n getDeploymentLogsTail,\n getDeploymentLogsDownload,\n getAppGitRepo,\n getAppGitRepoCredentials,\n getAppGitRepoCredential,\n createAppGitRepoCredential,\n deleteAppGitRepoCredential,\n };\n};\n"],"mappings":";;;;;;;;;;;;;;;;;AAmDA,MAAa,oBAAoB,EAAE,SAAS,aAAa,WAA8B;CACrF,MAAM,SAASA,iCAAAA,yBAAgC;EAC7C;EACA;EACA,SAASC,aAAAA,kBAAkB,IAAI;CACjC,CAAC;CAED,MAAM,gBAAgB,EAAE,cAA4B,EAAE,OAAO;;CAG7D,MAAM,cAAc,OAAO,WAAyB;EAClD,MAAM,EAAE,SAAS,MAAM,OAAO,IAAI,KAAK,CAAC,GAAG,EAAE,OAAO,CAAC;EAErD,OAAO;CACT;CAEA,MAAM,UAAU,OAAO,QAAsB,CAAC,GAAG,WAAyB;EACxE,MAAM,EAAE,SAAS,MAAM,OAAO,IAAI,SAAS,EAAE,MAAM,GAAG,EAAE,OAAO,CAAC;EAEhE,OAAO;CACT;CAEA,MAAM,SAAS,OAAO,OAAc,WAAyB;EAC3D,MAAM,EAAE,SAAS,MAAM,OAAO,IAAI,iBAAiB,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,CAAC;EAElF,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OAAO,CACX;CACF;CAEA,OAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;AACF"}
1
+ {"version":3,"file":"index.cjs","names":["createOpenapiFetchClient","createAuthHeaders","readAppLogsTail","readAppLogsDownload"],"sources":["../../src/clients/apps/appsClient.ts"],"sourcesContent":["import { readAppLogsDownload, readAppLogsTail } from '../../domain/appLogs';\nimport { createOpenapiFetchClient } from '../../fetchClient';\nimport { createAuthHeaders } from '../auth';\nimport type { ClientInitOptions } from '../types';\n\nimport type { paths } from './__generated__/schema';\nimport type {\n App,\n AppId,\n CreateAppBody,\n CreateCredentialBody,\n CreateDeploymentBody,\n CredentialId,\n DeploymentId,\n GetAppRunsQuery,\n GetAppsQuery,\n GetDeploymentsQuery,\n GetLogsTailQuery,\n RunId,\n} from './types';\n\n/**\n * Options every write takes.\n *\n * - No `idempotencyKey`: the service accepts no `Idempotency-Key`, so every create here is a\n * genuine create and a caller that retries one owns the duplicate it may produce.\n */\ntype WriteOptions = {\n signal?: AbortSignal;\n};\n\ntype LogsTailOptions = {\n query?: GetLogsTailQuery;\n signal?: AbortSignal;\n};\n\n/**\n * `/v2` App Deployments — data apps plus the immutable deployment history behind them. Sibling of\n * the `dataScience` client, which wraps the same service's `/v1` surface.\n *\n * `baseUrl` must already point past the `/v2` prefix (`https://<data-science-host>/v2`); the\n * registry composes it — see `createServiceClients`.\n *\n * One documented endpoint is deliberately absent: `POST /apps/{appId}/activity` is apps-proxy's\n * heartbeat, authenticated by a Manage API token with the `apps:proxy` scope that this\n * storage-token client cannot supply.\n */\nexport const createAppsClient = ({ baseUrl, middlewares, auth }: ClientInitOptions) => {\n const client = createOpenapiFetchClient<paths>({\n baseUrl,\n middlewares,\n headers: createAuthHeaders(auth),\n });\n\n const writeOptions = ({ signal }: WriteOptions) => ({ signal });\n\n /** Service metadata (`appName`, `appVersion`, `apiDocs`) — the `/v2` surface has no `/health-check`. */\n const healthCheck = async (signal?: AbortSignal) => {\n const { data } = await client.get('/', {}, { signal });\n\n return data;\n };\n\n const getApps = async (query: GetAppsQuery = {}, signal?: AbortSignal) => {\n const { data } = await client.get('/apps', { query }, { signal });\n\n return data;\n };\n\n const getApp = async (appId: AppId, signal?: AbortSignal) => {\n const { data } = await client.get('/apps/{appId}', { path: { appId } }, { signal });\n\n return data;\n };\n\n /**\n * Reserves the app and its Storage configuration only. Content (`parameters`) and auth\n * (`authorization.app_proxy`) are written afterwards through the Storage API, on the config named\n * by the response's `componentId`/`branchId`/`configId`.\n */\n const createApp = async (body: CreateAppBody, options: WriteOptions = {}) => {\n const { data } = await client.post('/apps', { body }, writeOptions(options));\n\n return data;\n };\n\n const deleteApp = async (appId: AppId, signal?: AbortSignal) => {\n await client.delete('/apps/{appId}', { path: { appId } }, { signal });\n };\n\n /**\n * Drops production routing — the app's URL 404s afterwards. A no-op (already unpublished, or\n * never deployed) returns the app unchanged rather than failing.\n */\n const unpublishApp = async (appId: AppId, signal?: AbortSignal): Promise<App> => {\n const { data } = await client.post('/apps/{appId}/unpublish', { path: { appId } }, { signal });\n\n return data;\n };\n\n /**\n * Sleeps the app now instead of waiting for the idle timer, and disarms wake-on-request: a\n * visitor gets a `503` until an explicit {@link resumeApp}. A no-op on an already suspended app.\n */\n const suspendApp = async (appId: AppId, signal?: AbortSignal): Promise<App> => {\n const { data } = await client.post('/apps/{appId}/suspend', { path: { appId } }, { signal });\n\n return data;\n };\n\n /**\n * Wakes the app now and re-arms wake-on-request. A no-op on an already running app.\n * The returned app reports `starting` — the operator has not confirmed it serving yet.\n */\n const resumeApp = async (appId: AppId, signal?: AbortSignal): Promise<App> => {\n const { data } = await client.post('/apps/{appId}/resume', { path: { appId } }, { signal });\n\n return data;\n };\n\n /** `password` is `null` until one is minted — by the app's first deployment or {@link resetAppPassword}. */\n const getAppPassword = async (appId: AppId, signal?: AbortSignal) => {\n const { data } = await client.get('/apps/{appId}/password', { path: { appId } }, { signal });\n\n return data;\n };\n\n /** Mints a fresh password, replacing any existing one. Read it back with {@link getAppPassword}. */\n const resetAppPassword = async (appId: AppId, signal?: AbortSignal) => {\n const { data } = await client.post(\n '/apps/{appId}/password/reset',\n { path: { appId } },\n { signal },\n );\n\n return data;\n };\n\n /**\n * Runs of the app, newest first — app-wide, so this is where a failed deployment's cause lives\n * (`failureReason`, `startupLogs`). Narrow to one deployment with `query.deploymentId`.\n */\n const getAppRuns = async (appId: AppId, query: GetAppRunsQuery = {}, signal?: AbortSignal) => {\n const { data } = await client.get('/apps/{appId}/runs', { path: { appId }, query }, { signal });\n\n return data;\n };\n\n const getAppRun = async (appId: AppId, runId: RunId, signal?: AbortSignal) => {\n const { data } = await client.get(\n '/apps/{appId}/runs/{runId}',\n { path: { appId, runId } },\n { signal },\n );\n\n return data;\n };\n\n /**\n * Deploys the app's current config version as a new immutable deployment, promoting it unless\n * `body.promote` is `false` (a staged release never runs until promoted). Pin an older config\n * version with `body.configVersion`. The deployment comes back synchronously; readiness does not.\n */\n const createDeployment = async (\n appId: AppId,\n body?: CreateDeploymentBody,\n options: WriteOptions = {},\n ) => {\n const { data } = await client.post(\n '/apps/{appId}/deployments',\n { path: { appId }, body },\n writeOptions(options),\n );\n\n return data;\n };\n\n /**\n * Deployment history, newest page first.\n *\n * - `query.archived` filters on whether the deployment was deleted; omitting it returns both.\n * - A deleted deployment keeps its row — history outlives the workload.\n */\n const getDeployments = async (\n appId: AppId,\n query: GetDeploymentsQuery = {},\n signal?: AbortSignal,\n ) => {\n const { data } = await client.get(\n '/apps/{appId}/deployments',\n { path: { appId }, query },\n { signal },\n );\n\n return data;\n };\n\n const getDeployment = async (appId: AppId, deploymentId: DeploymentId, signal?: AbortSignal) => {\n const { data } = await client.get(\n '/apps/{appId}/deployments/{deploymentId}',\n { path: { appId, deploymentId } },\n { signal },\n );\n\n return data;\n };\n\n /**\n * Deletes the deployment: its running resources and credentials go, the row stays in history as\n * `archived`. Rejected with a `409` while the app's `production` still names it.\n */\n const deleteDeployment = async (\n appId: AppId,\n deploymentId: DeploymentId,\n signal?: AbortSignal,\n ) => {\n await client.delete(\n '/apps/{appId}/deployments/{deploymentId}',\n { path: { appId, deploymentId } },\n { signal },\n );\n };\n\n /**\n * Makes this deployment production — the same call rolls back, applied to an older one. The route\n * switches only once the target serves, so the returned app's `production.desiredDeploymentId`\n * and `.actualDeploymentId` differ until it converges.\n */\n const promoteDeployment = async (\n appId: AppId,\n deploymentId: DeploymentId,\n signal?: AbortSignal,\n ): Promise<App> => {\n const { data } = await client.post(\n '/apps/{appId}/deployments/{deploymentId}/promote',\n { path: { appId, deploymentId } },\n { signal },\n );\n\n return data;\n };\n\n /**\n * Container output of the app's currently serving member. `query.since` and `query.lines` are\n * mutually exclusive; passing neither returns the log from its start.\n */\n const getAppLogsTail = (appId: AppId, { query, signal }: LogsTailOptions = {}) =>\n readAppLogsTail(() =>\n client.get('/apps/{appId}/logs/tail', { path: { appId }, query }, { signal }),\n );\n\n const getAppLogsDownload = (appId: AppId, signal?: AbortSignal) =>\n readAppLogsDownload(() =>\n client.get('/apps/{appId}/logs/download', { path: { appId } }, { signal }),\n );\n\n const getDeploymentLogsTail = (\n appId: AppId,\n deploymentId: DeploymentId,\n { query, signal }: LogsTailOptions = {},\n ) =>\n readAppLogsTail(() =>\n client.get(\n '/apps/{appId}/deployments/{deploymentId}/logs/tail',\n { path: { appId, deploymentId }, query },\n { signal },\n ),\n );\n\n const getDeploymentLogsDownload = (\n appId: AppId,\n deploymentId: DeploymentId,\n signal?: AbortSignal,\n ) =>\n readAppLogsDownload(() =>\n client.get(\n '/apps/{appId}/deployments/{deploymentId}/logs/download',\n { path: { appId, deploymentId } },\n { signal },\n ),\n );\n\n /** The app's Git repository — managed or external. `409` when it has none configured. */\n const getAppGitRepo = async (appId: AppId, signal?: AbortSignal) => {\n const { data } = await client.get('/apps/{appId}/git-repo', { path: { appId } }, { signal });\n\n return data;\n };\n\n /** Credentials of the app's managed repository, per app rather than per deployment. */\n const getAppGitRepoCredentials = async (appId: AppId, signal?: AbortSignal) => {\n const { data } = await client.get(\n '/apps/{appId}/git-repo/credentials',\n { path: { appId } },\n { signal },\n );\n\n return data;\n };\n\n const getAppGitRepoCredential = async (\n appId: AppId,\n credentialId: CredentialId,\n signal?: AbortSignal,\n ) => {\n const { data } = await client.get(\n '/apps/{appId}/git-repo/credentials/{credentialId}',\n { path: { appId, credentialId } },\n { signal },\n );\n\n return data;\n };\n\n /** An `http_token` credential returns its `secret` here and nowhere else — store it now or lose it. */\n const createAppGitRepoCredential = async (\n appId: AppId,\n body: CreateCredentialBody,\n options: WriteOptions = {},\n ) => {\n const { data } = await client.post(\n '/apps/{appId}/git-repo/credentials',\n { path: { appId }, body },\n writeOptions(options),\n );\n\n return data;\n };\n\n const deleteAppGitRepoCredential = async (\n appId: AppId,\n credentialId: CredentialId,\n signal?: AbortSignal,\n ) => {\n await client.delete(\n '/apps/{appId}/git-repo/credentials/{credentialId}',\n { path: { appId, credentialId } },\n { signal },\n );\n };\n\n return {\n healthCheck,\n getApps,\n getApp,\n createApp,\n deleteApp,\n unpublishApp,\n suspendApp,\n resumeApp,\n getAppPassword,\n resetAppPassword,\n getAppRuns,\n getAppRun,\n createDeployment,\n getDeployments,\n getDeployment,\n deleteDeployment,\n promoteDeployment,\n getAppLogsTail,\n getAppLogsDownload,\n getDeploymentLogsTail,\n getDeploymentLogsDownload,\n getAppGitRepo,\n getAppGitRepoCredentials,\n getAppGitRepoCredential,\n createAppGitRepoCredential,\n deleteAppGitRepoCredential,\n };\n};\n"],"mappings":";;;;;;;;;;;;;;;;AA+CA,MAAa,oBAAoB,EAAE,SAAS,aAAa,WAA8B;CACrF,MAAM,SAASA,iCAAAA,yBAAgC;EAC7C;EACA;EACA,SAASC,aAAAA,kBAAkB,IAAI;CACjC,CAAC;CAED,MAAM,gBAAgB,EAAE,cAA4B,EAAE,OAAO;;CAG7D,MAAM,cAAc,OAAO,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cACA,WACG;EACH,MAAM,EAAE,SAAS,MAAM,OAAO,IAC5B,qDACA,EAAE,MAAM;GAAE;GAAO;EAAa,EAAE,GAChC,EAAE,OAAO,CACX;EAEA,OAAO;CACT;;CAGA,MAAM,6BAA6B,OACjC,OACA,MACA,UAAwB,CAAC,MACtB;EACH,MAAM,EAAE,SAAS,MAAM,OAAO,KAC5B,sCACA;GAAE,MAAM,EAAE,MAAM;GAAG;EAAK,GACxB,aAAa,OAAO,CACtB;EAEA,OAAO;CACT;CAEA,MAAM,6BAA6B,OACjC,OACA,cACA,WACG;EACH,MAAM,OAAO,OACX,qDACA,EAAE,MAAM;GAAE;GAAO;EAAa,EAAE,GAChC,EAAE,OAAO,CACX;CACF;CAEA,OAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;AACF"}
@@ -1,16 +1,12 @@
1
1
  import { n as ClientInitOptions } from "../types-_RhBCj4_.cjs";
2
- import { S as components, b as GetLogsTailQuery, c as CreateCredentialBody, f as CredentialId, g as DeploymentId, l as CreateDeploymentBody, r as AppId, s as CreateAppBody, t as App, v as GetAppRunsQuery, x as RunId, y as GetAppsQuery } from "../types-DARv_P6O.cjs";
2
+ import { C as components, S as RunId, b as GetDeploymentsQuery, c as CreateCredentialBody, f as CredentialId, g as DeploymentId, l as CreateDeploymentBody, r as AppId, s as CreateAppBody, t as App, v as GetAppRunsQuery, x as GetLogsTailQuery, y as GetAppsQuery } from "../types-DXskkNp8.cjs";
3
3
  import { t as LogEntry } from "../appLogs-D5A13Y0y.cjs";
4
4
  //#region src/clients/apps/appsClient.d.ts
5
5
  /**
6
- * No `idempotencyKey`. The service accepted an `Idempotency-Key` that turned a replayed create
7
- * into a no-op, and support for it was **dropped on 17 Aug 2026** — the spec still documents the
8
- * header and has yet to catch up. It was
9
- * unusable from a browser in any case — the service's `Access-Control-Allow-Headers` never listed
10
- * the header, so sending it failed the preflight and the request never left the page.
6
+ * Options every write takes.
11
7
  *
12
- * Every create here is therefore a genuine create, and a caller that retries one is responsible
13
- * for the duplicate it may produce.
8
+ * - No `idempotencyKey`: the service accepts no `Idempotency-Key`, so every create here is a
9
+ * genuine create and a caller that retries one owns the duplicate it may produce.
14
10
  */
15
11
  type WriteOptions = {
16
12
  signal?: AbortSignal;
@@ -26,10 +22,9 @@ type LogsTailOptions = {
26
22
  * `baseUrl` must already point past the `/v2` prefix (`https://<data-science-host>/v2`); the
27
23
  * registry composes it — see `createServiceClients`.
28
24
  *
29
- * Two documented endpoints are deliberately absent: `PATCH /apps/{appId}` has no patchable field
30
- * yet (`name`/`description` are create-only, so `{}` is the only accepted body), and
31
- * `POST /apps/{appId}/activity` is apps-proxy's heartbeat, authenticated by a Manage API token with
32
- * the `apps:proxy` scope that this storage-token client cannot supply.
25
+ * One documented endpoint is deliberately absent: `POST /apps/{appId}/activity` is apps-proxy's
26
+ * heartbeat, authenticated by a Manage API token with the `apps:proxy` scope that this
27
+ * storage-token client cannot supply.
33
28
  */
34
29
  declare const createAppsClient: ({ baseUrl, middlewares, auth }: ClientInitOptions) => {
35
30
  healthCheck: (signal?: AbortSignal) => Promise<{
@@ -43,18 +38,13 @@ declare const createAppsClient: ({ baseUrl, middlewares, auth }: ClientInitOptio
43
38
  componentId: string;
44
39
  branchId: string | null;
45
40
  configId: string;
46
- configVersion: string;
47
41
  type?: 'streamlit' | 'python-js' | null;
48
- mode?: 'prod' | 'dev';
49
42
  url: string | null;
50
43
  production: {
51
- desiredNumber?: number | null;
52
- desiredId?: string | null;
53
- actualNumber?: number | null;
54
- actualId?: string | null;
44
+ desiredDeploymentId?: string | null;
45
+ actualDeploymentId?: string | null;
55
46
  };
56
- undeployedChanges?: boolean;
57
- state: 'NOT_DEPLOYED' | 'STARTING' | 'RUNNING' | 'SLEEPING' | 'SUSPENDED';
47
+ state: 'notDeployed' | 'starting' | 'running' | 'suspended' | 'disabled';
58
48
  }[]>;
59
49
  getApp: (appId: AppId, signal?: AbortSignal) => Promise<{
60
50
  id: string;
@@ -62,18 +52,13 @@ declare const createAppsClient: ({ baseUrl, middlewares, auth }: ClientInitOptio
62
52
  componentId: string;
63
53
  branchId: string | null;
64
54
  configId: string;
65
- configVersion: string;
66
55
  type?: 'streamlit' | 'python-js' | null;
67
- mode?: 'prod' | 'dev';
68
56
  url: string | null;
69
57
  production: {
70
- desiredNumber?: number | null;
71
- desiredId?: string | null;
72
- actualNumber?: number | null;
73
- actualId?: string | null;
58
+ desiredDeploymentId?: string | null;
59
+ actualDeploymentId?: string | null;
74
60
  };
75
- undeployedChanges?: boolean;
76
- state: 'NOT_DEPLOYED' | 'STARTING' | 'RUNNING' | 'SLEEPING' | 'SUSPENDED';
61
+ state: 'notDeployed' | 'starting' | 'running' | 'suspended' | 'disabled';
77
62
  }>;
78
63
  createApp: (body: CreateAppBody, options?: WriteOptions) => Promise<{
79
64
  id: string;
@@ -81,44 +66,23 @@ declare const createAppsClient: ({ baseUrl, middlewares, auth }: ClientInitOptio
81
66
  componentId: string;
82
67
  branchId: string | null;
83
68
  configId: string;
84
- configVersion: string;
85
69
  type?: 'streamlit' | 'python-js' | null;
86
- mode?: 'prod' | 'dev';
87
70
  url: string | null;
88
71
  production: {
89
- desiredNumber?: number | null;
90
- desiredId?: string | null;
91
- actualNumber?: number | null;
92
- actualId?: string | null;
72
+ desiredDeploymentId?: string | null;
73
+ actualDeploymentId?: string | null;
93
74
  };
94
- undeployedChanges?: boolean;
95
- state: 'NOT_DEPLOYED' | 'STARTING' | 'RUNNING' | 'SLEEPING' | 'SUSPENDED';
75
+ state: 'notDeployed' | 'starting' | 'running' | 'suspended' | 'disabled';
96
76
  }>;
97
77
  deleteApp: (appId: AppId, signal?: AbortSignal) => Promise<void>;
98
- unpublishApp: (appId: AppId, signal?: AbortSignal) => Promise<App | null>;
99
- suspendApp: (appId: AppId, signal?: AbortSignal) => Promise<App | null>;
100
- resumeApp: (appId: AppId, signal?: AbortSignal) => Promise<App | null>;
78
+ unpublishApp: (appId: AppId, signal?: AbortSignal) => Promise<App>;
79
+ suspendApp: (appId: AppId, signal?: AbortSignal) => Promise<App>;
80
+ resumeApp: (appId: AppId, signal?: AbortSignal) => Promise<App>;
101
81
  getAppPassword: (appId: AppId, signal?: AbortSignal) => Promise<{
102
82
  password?: string | null;
103
83
  }>;
104
84
  resetAppPassword: (appId: AppId, signal?: AbortSignal) => Promise<{
105
- id: string;
106
- projectId: string;
107
- componentId: string;
108
- branchId: string | null;
109
- configId: string;
110
- configVersion: string;
111
- type?: 'streamlit' | 'python-js' | null;
112
- mode?: 'prod' | 'dev';
113
- url: string | null;
114
- production: {
115
- desiredNumber?: number | null;
116
- desiredId?: string | null;
117
- actualNumber?: number | null;
118
- actualId?: string | null;
119
- };
120
- undeployedChanges?: boolean;
121
- state: 'NOT_DEPLOYED' | 'STARTING' | 'RUNNING' | 'SLEEPING' | 'SUSPENDED';
85
+ password: string;
122
86
  }>;
123
87
  getAppRuns: (appId: AppId, query?: GetAppRunsQuery, signal?: AbortSignal) => Promise<{
124
88
  id: string;
@@ -160,45 +124,39 @@ declare const createAppsClient: ({ baseUrl, middlewares, auth }: ClientInitOptio
160
124
  }>;
161
125
  createDeployment: (appId: AppId, body?: CreateDeploymentBody, options?: WriteOptions) => Promise<{
162
126
  id: string;
163
- number: number;
164
- configId: string;
165
127
  configVersion: string;
166
128
  gitCommitSha: string | null;
167
- size?: 'micro' | 'tiny' | 'small' | 'medium' | 'large' | 'external' | null;
168
- buildState: 'PREBUILT' | 'PENDING' | 'BUILDING' | 'BUILT' | 'FAILED';
169
- runState: 'NEVER_RUN' | 'PENDING' | 'STARTING' | 'RUNNING' | 'STOPPING' | 'STOPPED' | 'FAILED';
129
+ runtimeSize?: 'micro' | 'tiny' | 'small' | 'medium' | 'large' | 'external' | null;
130
+ buildState: 'pending' | 'building' | 'ready' | 'failed';
131
+ runState: 'neverRun' | 'pending' | 'starting' | 'running' | 'stopping' | 'stopped' | 'failed';
170
132
  archived: boolean;
171
133
  archivedAt: string | null;
172
134
  createdAt: string;
173
135
  }>;
174
- getDeployments: (appId: AppId, signal?: AbortSignal) => Promise<{
136
+ getDeployments: (appId: AppId, query?: GetDeploymentsQuery, signal?: AbortSignal) => Promise<{
175
137
  id: string;
176
- number: number;
177
- configId: string;
178
138
  configVersion: string;
179
139
  gitCommitSha: string | null;
180
- size?: 'micro' | 'tiny' | 'small' | 'medium' | 'large' | 'external' | null;
181
- buildState: 'PREBUILT' | 'PENDING' | 'BUILDING' | 'BUILT' | 'FAILED';
182
- runState: 'NEVER_RUN' | 'PENDING' | 'STARTING' | 'RUNNING' | 'STOPPING' | 'STOPPED' | 'FAILED';
140
+ runtimeSize?: 'micro' | 'tiny' | 'small' | 'medium' | 'large' | 'external' | null;
141
+ buildState: 'pending' | 'building' | 'ready' | 'failed';
142
+ runState: 'neverRun' | 'pending' | 'starting' | 'running' | 'stopping' | 'stopped' | 'failed';
183
143
  archived: boolean;
184
144
  archivedAt: string | null;
185
145
  createdAt: string;
186
146
  }[]>;
187
147
  getDeployment: (appId: AppId, deploymentId: DeploymentId, signal?: AbortSignal) => Promise<{
188
148
  id: string;
189
- number: number;
190
- configId: string;
191
149
  configVersion: string;
192
150
  gitCommitSha: string | null;
193
- size?: 'micro' | 'tiny' | 'small' | 'medium' | 'large' | 'external' | null;
194
- buildState: 'PREBUILT' | 'PENDING' | 'BUILDING' | 'BUILT' | 'FAILED';
195
- runState: 'NEVER_RUN' | 'PENDING' | 'STARTING' | 'RUNNING' | 'STOPPING' | 'STOPPED' | 'FAILED';
151
+ runtimeSize?: 'micro' | 'tiny' | 'small' | 'medium' | 'large' | 'external' | null;
152
+ buildState: 'pending' | 'building' | 'ready' | 'failed';
153
+ runState: 'neverRun' | 'pending' | 'starting' | 'running' | 'stopping' | 'stopped' | 'failed';
196
154
  archived: boolean;
197
155
  archivedAt: string | null;
198
156
  createdAt: string;
199
157
  }>;
200
158
  deleteDeployment: (appId: AppId, deploymentId: DeploymentId, signal?: AbortSignal) => Promise<void>;
201
- promoteDeployment: (appId: AppId, deploymentId: DeploymentId, signal?: AbortSignal) => Promise<App | null>;
159
+ promoteDeployment: (appId: AppId, deploymentId: DeploymentId, signal?: AbortSignal) => Promise<App>;
202
160
  getAppLogsTail: (appId: AppId, { query, signal }?: LogsTailOptions) => Promise<{
203
161
  entries: LogEntry[];
204
162
  nextLogTimestamp: string | null;
@@ -1,16 +1,12 @@
1
1
  import { n as ClientInitOptions } from "../types-Ct0YPy2w.js";
2
- import { S as components, b as GetLogsTailQuery, c as CreateCredentialBody, f as CredentialId, g as DeploymentId, l as CreateDeploymentBody, r as AppId, s as CreateAppBody, t as App, v as GetAppRunsQuery, x as RunId, y as GetAppsQuery } from "../types-CBgLCkYe.js";
2
+ import { C as components, S as RunId, b as GetDeploymentsQuery, c as CreateCredentialBody, f as CredentialId, g as DeploymentId, l as CreateDeploymentBody, r as AppId, s as CreateAppBody, t as App, v as GetAppRunsQuery, x as GetLogsTailQuery, y as GetAppsQuery } from "../types-D6UmMa6E.js";
3
3
  import { t as LogEntry } from "../appLogs-Ch7DYpzx.js";
4
4
  //#region src/clients/apps/appsClient.d.ts
5
5
  /**
6
- * No `idempotencyKey`. The service accepted an `Idempotency-Key` that turned a replayed create
7
- * into a no-op, and support for it was **dropped on 17 Aug 2026** — the spec still documents the
8
- * header and has yet to catch up. It was
9
- * unusable from a browser in any case — the service's `Access-Control-Allow-Headers` never listed
10
- * the header, so sending it failed the preflight and the request never left the page.
6
+ * Options every write takes.
11
7
  *
12
- * Every create here is therefore a genuine create, and a caller that retries one is responsible
13
- * for the duplicate it may produce.
8
+ * - No `idempotencyKey`: the service accepts no `Idempotency-Key`, so every create here is a
9
+ * genuine create and a caller that retries one owns the duplicate it may produce.
14
10
  */
15
11
  type WriteOptions = {
16
12
  signal?: AbortSignal;
@@ -26,10 +22,9 @@ type LogsTailOptions = {
26
22
  * `baseUrl` must already point past the `/v2` prefix (`https://<data-science-host>/v2`); the
27
23
  * registry composes it — see `createServiceClients`.
28
24
  *
29
- * Two documented endpoints are deliberately absent: `PATCH /apps/{appId}` has no patchable field
30
- * yet (`name`/`description` are create-only, so `{}` is the only accepted body), and
31
- * `POST /apps/{appId}/activity` is apps-proxy's heartbeat, authenticated by a Manage API token with
32
- * the `apps:proxy` scope that this storage-token client cannot supply.
25
+ * One documented endpoint is deliberately absent: `POST /apps/{appId}/activity` is apps-proxy's
26
+ * heartbeat, authenticated by a Manage API token with the `apps:proxy` scope that this
27
+ * storage-token client cannot supply.
33
28
  */
34
29
  declare const createAppsClient: ({ baseUrl, middlewares, auth }: ClientInitOptions) => {
35
30
  healthCheck: (signal?: AbortSignal) => Promise<{
@@ -43,18 +38,13 @@ declare const createAppsClient: ({ baseUrl, middlewares, auth }: ClientInitOptio
43
38
  componentId: string;
44
39
  branchId: string | null;
45
40
  configId: string;
46
- configVersion: string;
47
41
  type?: 'streamlit' | 'python-js' | null;
48
- mode?: 'prod' | 'dev';
49
42
  url: string | null;
50
43
  production: {
51
- desiredNumber?: number | null;
52
- desiredId?: string | null;
53
- actualNumber?: number | null;
54
- actualId?: string | null;
44
+ desiredDeploymentId?: string | null;
45
+ actualDeploymentId?: string | null;
55
46
  };
56
- undeployedChanges?: boolean;
57
- state: 'NOT_DEPLOYED' | 'STARTING' | 'RUNNING' | 'SLEEPING' | 'SUSPENDED';
47
+ state: 'notDeployed' | 'starting' | 'running' | 'suspended' | 'disabled';
58
48
  }[]>;
59
49
  getApp: (appId: AppId, signal?: AbortSignal) => Promise<{
60
50
  id: string;
@@ -62,18 +52,13 @@ declare const createAppsClient: ({ baseUrl, middlewares, auth }: ClientInitOptio
62
52
  componentId: string;
63
53
  branchId: string | null;
64
54
  configId: string;
65
- configVersion: string;
66
55
  type?: 'streamlit' | 'python-js' | null;
67
- mode?: 'prod' | 'dev';
68
56
  url: string | null;
69
57
  production: {
70
- desiredNumber?: number | null;
71
- desiredId?: string | null;
72
- actualNumber?: number | null;
73
- actualId?: string | null;
58
+ desiredDeploymentId?: string | null;
59
+ actualDeploymentId?: string | null;
74
60
  };
75
- undeployedChanges?: boolean;
76
- state: 'NOT_DEPLOYED' | 'STARTING' | 'RUNNING' | 'SLEEPING' | 'SUSPENDED';
61
+ state: 'notDeployed' | 'starting' | 'running' | 'suspended' | 'disabled';
77
62
  }>;
78
63
  createApp: (body: CreateAppBody, options?: WriteOptions) => Promise<{
79
64
  id: string;
@@ -81,44 +66,23 @@ declare const createAppsClient: ({ baseUrl, middlewares, auth }: ClientInitOptio
81
66
  componentId: string;
82
67
  branchId: string | null;
83
68
  configId: string;
84
- configVersion: string;
85
69
  type?: 'streamlit' | 'python-js' | null;
86
- mode?: 'prod' | 'dev';
87
70
  url: string | null;
88
71
  production: {
89
- desiredNumber?: number | null;
90
- desiredId?: string | null;
91
- actualNumber?: number | null;
92
- actualId?: string | null;
72
+ desiredDeploymentId?: string | null;
73
+ actualDeploymentId?: string | null;
93
74
  };
94
- undeployedChanges?: boolean;
95
- state: 'NOT_DEPLOYED' | 'STARTING' | 'RUNNING' | 'SLEEPING' | 'SUSPENDED';
75
+ state: 'notDeployed' | 'starting' | 'running' | 'suspended' | 'disabled';
96
76
  }>;
97
77
  deleteApp: (appId: AppId, signal?: AbortSignal) => Promise<void>;
98
- unpublishApp: (appId: AppId, signal?: AbortSignal) => Promise<App | null>;
99
- suspendApp: (appId: AppId, signal?: AbortSignal) => Promise<App | null>;
100
- resumeApp: (appId: AppId, signal?: AbortSignal) => Promise<App | null>;
78
+ unpublishApp: (appId: AppId, signal?: AbortSignal) => Promise<App>;
79
+ suspendApp: (appId: AppId, signal?: AbortSignal) => Promise<App>;
80
+ resumeApp: (appId: AppId, signal?: AbortSignal) => Promise<App>;
101
81
  getAppPassword: (appId: AppId, signal?: AbortSignal) => Promise<{
102
82
  password?: string | null;
103
83
  }>;
104
84
  resetAppPassword: (appId: AppId, signal?: AbortSignal) => Promise<{
105
- id: string;
106
- projectId: string;
107
- componentId: string;
108
- branchId: string | null;
109
- configId: string;
110
- configVersion: string;
111
- type?: 'streamlit' | 'python-js' | null;
112
- mode?: 'prod' | 'dev';
113
- url: string | null;
114
- production: {
115
- desiredNumber?: number | null;
116
- desiredId?: string | null;
117
- actualNumber?: number | null;
118
- actualId?: string | null;
119
- };
120
- undeployedChanges?: boolean;
121
- state: 'NOT_DEPLOYED' | 'STARTING' | 'RUNNING' | 'SLEEPING' | 'SUSPENDED';
85
+ password: string;
122
86
  }>;
123
87
  getAppRuns: (appId: AppId, query?: GetAppRunsQuery, signal?: AbortSignal) => Promise<{
124
88
  id: string;
@@ -160,45 +124,39 @@ declare const createAppsClient: ({ baseUrl, middlewares, auth }: ClientInitOptio
160
124
  }>;
161
125
  createDeployment: (appId: AppId, body?: CreateDeploymentBody, options?: WriteOptions) => Promise<{
162
126
  id: string;
163
- number: number;
164
- configId: string;
165
127
  configVersion: string;
166
128
  gitCommitSha: string | null;
167
- size?: 'micro' | 'tiny' | 'small' | 'medium' | 'large' | 'external' | null;
168
- buildState: 'PREBUILT' | 'PENDING' | 'BUILDING' | 'BUILT' | 'FAILED';
169
- runState: 'NEVER_RUN' | 'PENDING' | 'STARTING' | 'RUNNING' | 'STOPPING' | 'STOPPED' | 'FAILED';
129
+ runtimeSize?: 'micro' | 'tiny' | 'small' | 'medium' | 'large' | 'external' | null;
130
+ buildState: 'pending' | 'building' | 'ready' | 'failed';
131
+ runState: 'neverRun' | 'pending' | 'starting' | 'running' | 'stopping' | 'stopped' | 'failed';
170
132
  archived: boolean;
171
133
  archivedAt: string | null;
172
134
  createdAt: string;
173
135
  }>;
174
- getDeployments: (appId: AppId, signal?: AbortSignal) => Promise<{
136
+ getDeployments: (appId: AppId, query?: GetDeploymentsQuery, signal?: AbortSignal) => Promise<{
175
137
  id: string;
176
- number: number;
177
- configId: string;
178
138
  configVersion: string;
179
139
  gitCommitSha: string | null;
180
- size?: 'micro' | 'tiny' | 'small' | 'medium' | 'large' | 'external' | null;
181
- buildState: 'PREBUILT' | 'PENDING' | 'BUILDING' | 'BUILT' | 'FAILED';
182
- runState: 'NEVER_RUN' | 'PENDING' | 'STARTING' | 'RUNNING' | 'STOPPING' | 'STOPPED' | 'FAILED';
140
+ runtimeSize?: 'micro' | 'tiny' | 'small' | 'medium' | 'large' | 'external' | null;
141
+ buildState: 'pending' | 'building' | 'ready' | 'failed';
142
+ runState: 'neverRun' | 'pending' | 'starting' | 'running' | 'stopping' | 'stopped' | 'failed';
183
143
  archived: boolean;
184
144
  archivedAt: string | null;
185
145
  createdAt: string;
186
146
  }[]>;
187
147
  getDeployment: (appId: AppId, deploymentId: DeploymentId, signal?: AbortSignal) => Promise<{
188
148
  id: string;
189
- number: number;
190
- configId: string;
191
149
  configVersion: string;
192
150
  gitCommitSha: string | null;
193
- size?: 'micro' | 'tiny' | 'small' | 'medium' | 'large' | 'external' | null;
194
- buildState: 'PREBUILT' | 'PENDING' | 'BUILDING' | 'BUILT' | 'FAILED';
195
- runState: 'NEVER_RUN' | 'PENDING' | 'STARTING' | 'RUNNING' | 'STOPPING' | 'STOPPED' | 'FAILED';
151
+ runtimeSize?: 'micro' | 'tiny' | 'small' | 'medium' | 'large' | 'external' | null;
152
+ buildState: 'pending' | 'building' | 'ready' | 'failed';
153
+ runState: 'neverRun' | 'pending' | 'starting' | 'running' | 'stopping' | 'stopped' | 'failed';
196
154
  archived: boolean;
197
155
  archivedAt: string | null;
198
156
  createdAt: string;
199
157
  }>;
200
158
  deleteDeployment: (appId: AppId, deploymentId: DeploymentId, signal?: AbortSignal) => Promise<void>;
201
- promoteDeployment: (appId: AppId, deploymentId: DeploymentId, signal?: AbortSignal) => Promise<App | null>;
159
+ promoteDeployment: (appId: AppId, deploymentId: DeploymentId, signal?: AbortSignal) => Promise<App>;
202
160
  getAppLogsTail: (appId: AppId, { query, signal }?: LogsTailOptions) => Promise<{
203
161
  entries: LogEntry[];
204
162
  nextLogTimestamp: string | null;