@myapihq/sdk 2.23.3 → 2.24.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.
@@ -17,6 +17,8 @@ export interface Container {
17
17
  custom_domain?: string;
18
18
  status: string;
19
19
  egress: string;
20
+ /** Startup probe path. Absent (omitempty) when the probe is a bare TCP connect. */
21
+ health_check?: string;
20
22
  created_at: string;
21
23
  updated_at: string;
22
24
  }
@@ -74,6 +76,21 @@ export interface EnvUpdate {
74
76
  * scoped key and its custom domain. Until 2026-08-19 this was impossible and
75
77
  * the documented answer was to recreate the container.
76
78
  */
79
+ /**
80
+ * Changes environment variables and/or the startup probe on an existing
81
+ * container, rolling a new revision on the SAME image. Send only what you are
82
+ * changing; a variable set to null is removed, and `health_check: ''` clears
83
+ * the probe.
84
+ *
85
+ * Anything settable at creation but not here becomes a delete-and-recreate,
86
+ * which costs the URL, the scoped key and the custom domain. That is why this
87
+ * takes a patch rather than one named field.
88
+ */
89
+ export declare function updateContainer(apiKey: string, orgId: string, containerId: string, patch: {
90
+ env?: Record<string, string | null>;
91
+ health_check?: string;
92
+ }): Promise<EnvUpdate>;
93
+ /** Environment-only shorthand for {@link updateContainer}. */
77
94
  export declare function updateContainerEnv(apiKey: string, orgId: string, containerId: string, env: Record<string, string | null>): Promise<EnvUpdate>;
78
95
  export declare function deleteContainer(apiKey: string, orgId: string, containerId: string): Promise<void>;
79
96
  export interface SmokeCheck {
package/dist/container.js CHANGED
@@ -4,6 +4,7 @@ exports.EXPOSES = void 0;
4
4
  exports.createContainer = createContainer;
5
5
  exports.listContainers = listContainers;
6
6
  exports.getContainer = getContainer;
7
+ exports.updateContainer = updateContainer;
7
8
  exports.updateContainerEnv = updateContainerEnv;
8
9
  exports.deleteContainer = deleteContainer;
9
10
  exports.deployContainer = deployContainer;
@@ -56,8 +57,22 @@ async function getContainer(apiKey, orgId, containerId) {
56
57
  * scoped key and its custom domain. Until 2026-08-19 this was impossible and
57
58
  * the documented answer was to recreate the container.
58
59
  */
60
+ /**
61
+ * Changes environment variables and/or the startup probe on an existing
62
+ * container, rolling a new revision on the SAME image. Send only what you are
63
+ * changing; a variable set to null is removed, and `health_check: ''` clears
64
+ * the probe.
65
+ *
66
+ * Anything settable at creation but not here becomes a delete-and-recreate,
67
+ * which costs the URL, the scoped key and the custom domain. That is why this
68
+ * takes a patch rather than one named field.
69
+ */
70
+ async function updateContainer(apiKey, orgId, containerId, patch) {
71
+ return (0, client_1.request)('PATCH', `${config_1.CONTAINER_BASE}/container/orgs/${encodeURIComponent(orgId)}/containers/${encodeURIComponent(containerId)}`, apiKey, patch);
72
+ }
73
+ /** Environment-only shorthand for {@link updateContainer}. */
59
74
  async function updateContainerEnv(apiKey, orgId, containerId, env) {
60
- return (0, client_1.request)('PATCH', `${config_1.CONTAINER_BASE}/container/orgs/${encodeURIComponent(orgId)}/containers/${encodeURIComponent(containerId)}`, apiKey, { env });
75
+ return updateContainer(apiKey, orgId, containerId, { env });
61
76
  }
62
77
  async function deleteContainer(apiKey, orgId, containerId) {
63
78
  return (0, client_1.request)('DELETE', `${config_1.CONTAINER_BASE}/container/orgs/${encodeURIComponent(orgId)}/containers/${encodeURIComponent(containerId)}`, apiKey);
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "2.23.3";
1
+ export declare const SDK_VERSION = "2.24.0";
package/dist/version.js CHANGED
@@ -8,4 +8,4 @@ exports.SDK_VERSION = void 0;
8
8
  // Why a constant and not a package.json read: the SDK runs inside edge
9
9
  // functions (Cloudflare Workers), so it must not import node:fs. A literal
10
10
  // is the only version source that works in every runtime we ship to.
11
- exports.SDK_VERSION = '2.23.3';
11
+ exports.SDK_VERSION = '2.24.0';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@myapihq/sdk",
3
3
  "license": "Apache-2.0",
4
- "version": "2.23.3",
4
+ "version": "2.24.0",
5
5
  "description": "TypeScript SDK for the MyAPI ecosystem",
6
6
  "repository": {
7
7
  "type": "git",