@ingram-cloud/sdk 1.0.0 → 1.1.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.
@@ -27,16 +27,25 @@ import { pageOut } from "./_page.js";
27
27
  export const DeploymentTarget = z
28
28
  .object({ type: z.enum(["smith", "agent"]), id: z.string() })
29
29
  .meta({ id: "DeploymentTarget" });
30
+ /** The connectable channel kinds. The single source for both the request
31
+ * (`DeploymentIn.kind`) and the response (`DeploymentOut.kind`); the API derives
32
+ * its accepted-kinds set from these options, so the enum is the discoverable list. */
33
+ export const DeploymentKind = z
34
+ .enum(["whatsapp", "telegram", "slack", "discord", "sms", "voice", "email", "mcp"])
35
+ .meta({ id: "DeploymentKind" });
30
36
  export const DeploymentOut = z
31
37
  .object({
32
38
  id: z.string(),
33
39
  target: DeploymentTarget,
34
- kind: z.string(),
40
+ kind: DeploymentKind,
35
41
  address: z.string().nullable(),
36
42
  provider: z.string().nullable(),
37
43
  provider_metadata: z.record(z.string(), z.unknown()).optional(),
38
44
  /** Names of the encrypted secret fields that are set (values never returned). */
39
45
  secret_keys: z.array(z.string()).optional(),
46
+ /** The connectable MCP endpoint — present only for `kind: "mcp"`. Paste into
47
+ * Claude / ChatGPT as the server URL; survives a later GET, not just create. */
48
+ mcp_url: z.string().optional(),
40
49
  status: z.string(),
41
50
  created_at: z.string().nullable(),
42
51
  })
@@ -49,6 +58,7 @@ export const DeploymentListOut = pageOut(DeploymentOut, "DeploymentListOut");
49
58
  * - whatsapp `start_token`: `start_token`, `prefilled_message`, `deep_link` (wa.me link).
50
59
  * - slack `provision`/`oauth_install`: `install_url`, `state`, optional `slack_app_id`.
51
60
  * - email `provision`: no extras (plain `DeploymentOut`).
61
+ * - mcp: `mcp_url` (on the base `DeploymentOut`, so it also survives a GET).
52
62
  * All are optional — which appear depends on the kind + setup mode.
53
63
  */
54
64
  export const DeploymentCreatedOut = DeploymentOut.extend({
@@ -65,7 +75,7 @@ export const DeploymentIn = z
65
75
  /** Who the deployment binds: a `smith` (fixed) or an `agent` (mints a smith
66
76
  * per inbound sender). A smith token may only target its own smith. */
67
77
  target: DeploymentTarget,
68
- kind: z.string(),
78
+ kind: DeploymentKind,
69
79
  address: z.string().nullish(),
70
80
  provider: z.string().nullish(),
71
81
  provider_metadata: z.record(z.string(), z.unknown()).optional(),
package/package.json CHANGED
@@ -1,12 +1,23 @@
1
1
  {
2
2
  "name": "@ingram-cloud/sdk",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "description": "Typed wire contract + management-plane client for the Ingram Cloud API: Zod schemas to validate request/response bodies, TypeScript types for the JSON you read back, SSE/webhook event types, and a typed REST client.",
5
5
  "license": "MIT",
6
6
  "type": "module",
7
7
  "homepage": "https://cloud.ingram.tech",
8
- "keywords": ["ingram-cloud", "ingram", "sdk", "api", "wire", "zod", "openapi"],
9
- "files": ["ts", "dist"],
8
+ "keywords": [
9
+ "ingram-cloud",
10
+ "ingram",
11
+ "sdk",
12
+ "api",
13
+ "wire",
14
+ "zod",
15
+ "openapi"
16
+ ],
17
+ "files": [
18
+ "ts",
19
+ "dist"
20
+ ],
10
21
  "publishConfig": {
11
22
  "access": "public"
12
23
  },
@@ -29,16 +29,26 @@ export const DeploymentTarget = z
29
29
  .object({ type: z.enum(["smith", "agent"]), id: z.string() })
30
30
  .meta({ id: "DeploymentTarget" });
31
31
 
32
+ /** The connectable channel kinds. The single source for both the request
33
+ * (`DeploymentIn.kind`) and the response (`DeploymentOut.kind`); the API derives
34
+ * its accepted-kinds set from these options, so the enum is the discoverable list. */
35
+ export const DeploymentKind = z
36
+ .enum(["whatsapp", "telegram", "slack", "discord", "sms", "voice", "email", "mcp"])
37
+ .meta({ id: "DeploymentKind" });
38
+
32
39
  export const DeploymentOut = z
33
40
  .object({
34
41
  id: z.string(),
35
42
  target: DeploymentTarget,
36
- kind: z.string(),
43
+ kind: DeploymentKind,
37
44
  address: z.string().nullable(),
38
45
  provider: z.string().nullable(),
39
46
  provider_metadata: z.record(z.string(), z.unknown()).optional(),
40
47
  /** Names of the encrypted secret fields that are set (values never returned). */
41
48
  secret_keys: z.array(z.string()).optional(),
49
+ /** The connectable MCP endpoint — present only for `kind: "mcp"`. Paste into
50
+ * Claude / ChatGPT as the server URL; survives a later GET, not just create. */
51
+ mcp_url: z.string().optional(),
42
52
  status: z.string(),
43
53
  created_at: z.string().nullable(),
44
54
  })
@@ -53,6 +63,7 @@ export const DeploymentListOut = pageOut(DeploymentOut, "DeploymentListOut");
53
63
  * - whatsapp `start_token`: `start_token`, `prefilled_message`, `deep_link` (wa.me link).
54
64
  * - slack `provision`/`oauth_install`: `install_url`, `state`, optional `slack_app_id`.
55
65
  * - email `provision`: no extras (plain `DeploymentOut`).
66
+ * - mcp: `mcp_url` (on the base `DeploymentOut`, so it also survives a GET).
56
67
  * All are optional — which appear depends on the kind + setup mode.
57
68
  */
58
69
  export const DeploymentCreatedOut = DeploymentOut.extend({
@@ -71,7 +82,7 @@ export const DeploymentIn = z
71
82
  /** Who the deployment binds: a `smith` (fixed) or an `agent` (mints a smith
72
83
  * per inbound sender). A smith token may only target its own smith. */
73
84
  target: DeploymentTarget,
74
- kind: z.string(),
85
+ kind: DeploymentKind,
75
86
  address: z.string().nullish(),
76
87
  provider: z.string().nullish(),
77
88
  provider_metadata: z.record(z.string(), z.unknown()).optional(),