@ingram-cloud/sdk 1.2.0 → 1.5.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 (49) hide show
  1. package/dist/client.js +185 -14
  2. package/dist/index.js +4 -0
  3. package/dist/scopes.js +52 -0
  4. package/dist/zod/_actor.js +33 -0
  5. package/dist/zod/_page.js +18 -4
  6. package/dist/zod/agents.js +17 -3
  7. package/dist/zod/billing.js +136 -0
  8. package/dist/zod/budgets.js +2 -3
  9. package/dist/zod/connections.js +2 -3
  10. package/dist/zod/conversations.js +4 -11
  11. package/dist/zod/deployments.js +32 -0
  12. package/dist/zod/files.js +2 -9
  13. package/dist/zod/index.js +3 -0
  14. package/dist/zod/mcp.js +20 -14
  15. package/dist/zod/observability.js +39 -19
  16. package/dist/zod/projects.js +4 -4
  17. package/dist/zod/runs.js +16 -4
  18. package/dist/zod/schedules.js +2 -7
  19. package/dist/zod/skills.js +73 -0
  20. package/dist/zod/smith-revisions.js +7 -5
  21. package/dist/zod/smiths.js +14 -0
  22. package/dist/zod/tenant.js +41 -4
  23. package/dist/zod/vector-stores.js +36 -23
  24. package/package.json +6 -8
  25. package/ts/client.ts +431 -50
  26. package/ts/index.ts +4 -0
  27. package/ts/responses.ts +40 -2
  28. package/ts/scopes.ts +57 -0
  29. package/ts/zod/.impeccable/hook.cache.json +1 -0
  30. package/ts/zod/_actor.ts +36 -0
  31. package/ts/zod/_page.ts +19 -4
  32. package/ts/zod/agents.ts +17 -3
  33. package/ts/zod/billing.ts +168 -0
  34. package/ts/zod/budgets.ts +2 -3
  35. package/ts/zod/connections.ts +2 -3
  36. package/ts/zod/conversations.ts +7 -11
  37. package/ts/zod/deployments.ts +36 -0
  38. package/ts/zod/files.ts +2 -9
  39. package/ts/zod/index.ts +3 -0
  40. package/ts/zod/mcp.ts +20 -15
  41. package/ts/zod/observability.ts +75 -24
  42. package/ts/zod/projects.ts +4 -4
  43. package/ts/zod/runs.ts +18 -4
  44. package/ts/zod/schedules.ts +2 -7
  45. package/ts/zod/skills.ts +85 -0
  46. package/ts/zod/smith-revisions.ts +7 -5
  47. package/ts/zod/smiths.ts +14 -0
  48. package/ts/zod/tenant.ts +52 -5
  49. package/ts/zod/vector-stores.ts +41 -23
@@ -7,13 +7,16 @@
7
7
  * filter grammar, and the `search_results.page` envelope are OpenAI's, wart for
8
8
  * wart (modify is `POST`, the batch object is `vector_store.files_batch`, the
9
9
  * search page uses a `next_page` token while CRUD lists use `first_id`/
10
- * `last_id`). `smith_id` is the one documented IC extension: it scopes a store
11
- * to a single smith ("" = tenant-wide), the same isolation boundary every other
12
- * smith-owned resource has. Expiration policies (`expires_after`), query
10
+ * `last_id`). Two documented IC extensions: `smith_id` scopes a store to a
11
+ * single smith ("" = tenant-wide), the same isolation boundary every other
12
+ * smith-owned resource has; `embedding_model` names the store's embedder,
13
+ * frozen at create (OpenAI pins one platform-wide, Gemini's File Search exposes
14
+ * it the same way). Expiration policies (`expires_after`), query
13
15
  * rewriting, and rankers are not implemented — the fields don't exist here
14
16
  * rather than being accepted and ignored.
15
17
  */
16
18
  import { z } from "zod";
19
+ import { oaiListOut } from "./_page.js";
17
20
 
18
21
  // ── Chunking ─────────────────────────────────────────────────────────────────
19
22
 
@@ -51,7 +54,9 @@ export const ChunkingStrategyOut = z
51
54
  /** File attributes: ≤16 keys, key ≤64 chars, value string(≤512)|number|bool. */
52
55
  export const VectorStoreAttributes = z
53
56
  .record(z.string().max(64), z.union([z.string().max(512), z.number(), z.boolean()]))
54
- .refine((v) => Object.keys(v).length <= 16, { message: "at most 16 attribute keys" });
57
+ .refine((v) => Object.keys(v).length <= 16, {
58
+ message: "at most 16 attribute keys",
59
+ });
55
60
 
56
61
  /** A filter node: a comparison (`type` eq/ne/gt/gte/lt/lte/in/nin over `key`/
57
62
  * `value`) or a compound (`type` and/or over nested `filters`). The grammar is
@@ -95,6 +100,11 @@ export const VectorStoreIn = z
95
100
  metadata: z.record(z.string(), z.unknown()).optional(),
96
101
  /** IC extension: own the store to one smith ("" / omitted = tenant-wide). */
97
102
  smith_id: z.string().optional(),
103
+ /** IC extension: the embedder to index and query this store with, frozen at
104
+ * create (omitted = the platform default). Any model your OpenAI-provider
105
+ * key can reach — including an EU-hosted OpenAI-compatible endpoint set as
106
+ * that key's `base_url` — of at most 1536 dimensions. */
107
+ embedding_model: z.string().optional(),
98
108
  })
99
109
  .meta({ id: "VectorStoreIn" });
100
110
 
@@ -124,19 +134,14 @@ export const VectorStoreOut = z
124
134
  metadata: z.record(z.string(), z.unknown()),
125
135
  /** IC extension: the owning smith ("" = tenant-wide). */
126
136
  smith_id: z.string(),
137
+ /** IC extension: the embedder this store is indexed and queried with,
138
+ * frozen at create. */
139
+ embedding_model: z.string(),
127
140
  })
128
141
  .meta({ id: "VectorStoreOut" });
129
142
 
130
143
  /** Vector stores, in OpenAI's `list` envelope. */
131
- export const VectorStoreListOut = z
132
- .object({
133
- object: z.literal("list"),
134
- data: z.array(VectorStoreOut),
135
- first_id: z.string().nullable(),
136
- last_id: z.string().nullable(),
137
- has_more: z.boolean(),
138
- })
139
- .meta({ id: "VectorStoreListOut" });
144
+ export const VectorStoreListOut = oaiListOut(VectorStoreOut, "VectorStoreListOut");
140
145
 
141
146
  /** Modify body (OpenAI uses `POST`, not `PATCH`). */
142
147
  export const VectorStorePatch = z
@@ -176,7 +181,12 @@ export const VectorStoreFileOut = z
176
181
  status: z.enum(["in_progress", "completed", "failed", "cancelled"]),
177
182
  last_error: z
178
183
  .object({
179
- code: z.enum(["server_error", "unsupported_file", "invalid_file"]),
184
+ code: z.enum([
185
+ "server_error",
186
+ "unsupported_file",
187
+ "no_text_layer",
188
+ "invalid_file",
189
+ ]),
180
190
  message: z.string(),
181
191
  })
182
192
  .nullable(),
@@ -185,15 +195,10 @@ export const VectorStoreFileOut = z
185
195
  })
186
196
  .meta({ id: "VectorStoreFileOut" });
187
197
 
188
- export const VectorStoreFileListOut = z
189
- .object({
190
- object: z.literal("list"),
191
- data: z.array(VectorStoreFileOut),
192
- first_id: z.string().nullable(),
193
- last_id: z.string().nullable(),
194
- has_more: z.boolean(),
195
- })
196
- .meta({ id: "VectorStoreFileListOut" });
198
+ export const VectorStoreFileListOut = oaiListOut(
199
+ VectorStoreFileOut,
200
+ "VectorStoreFileListOut",
201
+ );
197
202
 
198
203
  /** Update body: attributes only (chunking is frozen once indexed). */
199
204
  export const VectorStoreFileUpdate = z
@@ -202,6 +207,18 @@ export const VectorStoreFileUpdate = z
202
207
  })
203
208
  .meta({ id: "VectorStoreFileUpdate" });
204
209
 
210
+ /** The parsed text a file was indexed as, chunk by chunk, in OpenAI's
211
+ * `vector_store.file_content.page` envelope. The whole file is one page — the
212
+ * paging fields are the envelope's shape, not a promise of more. */
213
+ export const VectorStoreFileContentOut = z
214
+ .object({
215
+ object: z.literal("vector_store.file_content.page"),
216
+ data: z.array(z.object({ type: z.literal("text"), text: z.string() })),
217
+ has_more: z.literal(false),
218
+ next_page: z.null(),
219
+ })
220
+ .meta({ id: "VectorStoreFileContentOut" });
221
+
205
222
  export const VectorStoreFileDeleted = z
206
223
  .object({
207
224
  id: z.string(),
@@ -291,6 +308,7 @@ export const VectorStoreSearchOut = z
291
308
 
292
309
  export type ICVectorStore = z.infer<typeof VectorStoreOut>;
293
310
  export type ICVectorStoreFile = z.infer<typeof VectorStoreFileOut>;
311
+ export type ICVectorStoreFileContentPage = z.infer<typeof VectorStoreFileContentOut>;
294
312
  export type ICVectorStoreFileBatch = z.infer<typeof VectorStoreFileBatchOut>;
295
313
  export type ICVectorStoreSearchPage = z.infer<typeof VectorStoreSearchOut>;
296
314
  export type ICVectorStoreAttributes = z.infer<typeof VectorStoreAttributes>;