@ingram-cloud/sdk 1.8.0 → 1.10.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.
- package/dist/zod/tenant.js +8 -2
- package/dist/zod/vector-stores.js +20 -6
- package/package.json +1 -1
- package/ts/zod/tenant.ts +8 -2
- package/ts/zod/vector-stores.ts +21 -6
package/dist/zod/tenant.js
CHANGED
|
@@ -194,11 +194,14 @@ export const ModelsListOut = z
|
|
|
194
194
|
providers: z.array(ModelProviderOut),
|
|
195
195
|
})
|
|
196
196
|
.meta({ id: "ModelsListOut" });
|
|
197
|
-
/** A BYOK model key — the `api_key` is NEVER echoed, only its presence.
|
|
197
|
+
/** A BYOK model key — the `api_key` is NEVER echoed, only its presence.
|
|
198
|
+
* `workspace_id` is Anthropic's `anthropic-workspace-id`: required by an
|
|
199
|
+
* identity-linked (multi-workspace) key, implicit in a workspace-scoped one. */
|
|
198
200
|
export const ModelKeyOut = z
|
|
199
201
|
.object({
|
|
200
202
|
provider: z.string(),
|
|
201
203
|
base_url: z.string().nullable(),
|
|
204
|
+
workspace_id: z.string().nullable(),
|
|
202
205
|
has_key: z.boolean(),
|
|
203
206
|
updated_at: z.string().nullable(),
|
|
204
207
|
})
|
|
@@ -206,18 +209,21 @@ export const ModelKeyOut = z
|
|
|
206
209
|
export const ModelKeyListOut = z
|
|
207
210
|
.object({ data: z.array(ModelKeyOut) })
|
|
208
211
|
.meta({ id: "ModelKeyListOut" });
|
|
209
|
-
/** The PUT ack — never echoes the key, only presence + the
|
|
212
|
+
/** The PUT ack — never echoes the key, only presence + the non-secret
|
|
213
|
+
* `base_url` / `workspace_id`. */
|
|
210
214
|
export const ModelKeyConfiguredOut = z
|
|
211
215
|
.object({
|
|
212
216
|
provider: z.string(),
|
|
213
217
|
configured: z.boolean(),
|
|
214
218
|
base_url: z.string().nullable(),
|
|
219
|
+
workspace_id: z.string().nullable(),
|
|
215
220
|
})
|
|
216
221
|
.meta({ id: "ModelKeyConfiguredOut" });
|
|
217
222
|
export const ModelKeyIn = z
|
|
218
223
|
.object({
|
|
219
224
|
api_key: z.string(),
|
|
220
225
|
base_url: z.string().nullish(),
|
|
226
|
+
workspace_id: z.string().nullish(),
|
|
221
227
|
})
|
|
222
228
|
.meta({ id: "ModelKeyIn" });
|
|
223
229
|
// ── Providers (tenant OAuth client credentials) ──────────────────────────────
|
|
@@ -229,23 +229,37 @@ export const VectorStoreFileBatchOut = z
|
|
|
229
229
|
})
|
|
230
230
|
.meta({ id: "VectorStoreFileBatchOut" });
|
|
231
231
|
// ── Search ───────────────────────────────────────────────────────────────────
|
|
232
|
+
/** OpenAI's `ranking_options`. `hybrid_search` turns on reciprocal-rank fusion
|
|
233
|
+
* of the embedding ranking with a full-text (keyword) ranking, weighted as
|
|
234
|
+
* given; without it search is embedding-only. */
|
|
235
|
+
export const VectorStoreRankingOptions = z
|
|
236
|
+
.object({
|
|
237
|
+
score_threshold: z.number().min(0).max(1).optional(),
|
|
238
|
+
hybrid_search: z
|
|
239
|
+
.object({
|
|
240
|
+
embedding_weight: z.number().min(0),
|
|
241
|
+
text_weight: z.number().min(0),
|
|
242
|
+
})
|
|
243
|
+
.refine((w) => w.embedding_weight > 0 || w.text_weight > 0, {
|
|
244
|
+
message: "at least one weight must be positive",
|
|
245
|
+
})
|
|
246
|
+
.optional(),
|
|
247
|
+
})
|
|
248
|
+
.meta({ id: "VectorStoreRankingOptions" });
|
|
232
249
|
export const VectorStoreSearchIn = z
|
|
233
250
|
.object({
|
|
234
251
|
query: z.union([z.string().min(1), z.array(z.string().min(1)).min(1)]),
|
|
235
252
|
max_num_results: z.number().int().min(1).max(50).optional(),
|
|
236
253
|
filters: VectorStoreFilter.nullish(),
|
|
237
|
-
ranking_options:
|
|
238
|
-
.object({
|
|
239
|
-
score_threshold: z.number().min(0).max(1).optional(),
|
|
240
|
-
})
|
|
241
|
-
.optional(),
|
|
254
|
+
ranking_options: VectorStoreRankingOptions.optional(),
|
|
242
255
|
})
|
|
243
256
|
.meta({ id: "VectorStoreSearchIn" });
|
|
244
257
|
export const VectorStoreSearchResult = z
|
|
245
258
|
.object({
|
|
246
259
|
file_id: z.string(),
|
|
247
260
|
filename: z.string(),
|
|
248
|
-
/**
|
|
261
|
+
/** In [0, 1]: cosine similarity, or — with `hybrid_search` — the fused
|
|
262
|
+
* reciprocal-rank score (1 = first in both rankings). */
|
|
249
263
|
score: z.number(),
|
|
250
264
|
attributes: VectorStoreAttributes.nullable(),
|
|
251
265
|
content: z.array(z.object({ type: z.literal("text"), text: z.string() })),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ingram-cloud/sdk",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.10.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
|
"keywords": [
|
|
6
6
|
"api",
|
package/ts/zod/tenant.ts
CHANGED
|
@@ -226,11 +226,14 @@ export const ModelsListOut = z
|
|
|
226
226
|
})
|
|
227
227
|
.meta({ id: "ModelsListOut" });
|
|
228
228
|
|
|
229
|
-
/** A BYOK model key — the `api_key` is NEVER echoed, only its presence.
|
|
229
|
+
/** A BYOK model key — the `api_key` is NEVER echoed, only its presence.
|
|
230
|
+
* `workspace_id` is Anthropic's `anthropic-workspace-id`: required by an
|
|
231
|
+
* identity-linked (multi-workspace) key, implicit in a workspace-scoped one. */
|
|
230
232
|
export const ModelKeyOut = z
|
|
231
233
|
.object({
|
|
232
234
|
provider: z.string(),
|
|
233
235
|
base_url: z.string().nullable(),
|
|
236
|
+
workspace_id: z.string().nullable(),
|
|
234
237
|
has_key: z.boolean(),
|
|
235
238
|
updated_at: z.string().nullable(),
|
|
236
239
|
})
|
|
@@ -240,12 +243,14 @@ export const ModelKeyListOut = z
|
|
|
240
243
|
.object({ data: z.array(ModelKeyOut) })
|
|
241
244
|
.meta({ id: "ModelKeyListOut" });
|
|
242
245
|
|
|
243
|
-
/** The PUT ack — never echoes the key, only presence + the
|
|
246
|
+
/** The PUT ack — never echoes the key, only presence + the non-secret
|
|
247
|
+
* `base_url` / `workspace_id`. */
|
|
244
248
|
export const ModelKeyConfiguredOut = z
|
|
245
249
|
.object({
|
|
246
250
|
provider: z.string(),
|
|
247
251
|
configured: z.boolean(),
|
|
248
252
|
base_url: z.string().nullable(),
|
|
253
|
+
workspace_id: z.string().nullable(),
|
|
249
254
|
})
|
|
250
255
|
.meta({ id: "ModelKeyConfiguredOut" });
|
|
251
256
|
|
|
@@ -253,6 +258,7 @@ export const ModelKeyIn = z
|
|
|
253
258
|
.object({
|
|
254
259
|
api_key: z.string(),
|
|
255
260
|
base_url: z.string().nullish(),
|
|
261
|
+
workspace_id: z.string().nullish(),
|
|
256
262
|
})
|
|
257
263
|
.meta({ id: "ModelKeyIn" });
|
|
258
264
|
|
package/ts/zod/vector-stores.ts
CHANGED
|
@@ -268,16 +268,30 @@ export const VectorStoreFileBatchOut = z
|
|
|
268
268
|
|
|
269
269
|
// ── Search ───────────────────────────────────────────────────────────────────
|
|
270
270
|
|
|
271
|
+
/** OpenAI's `ranking_options`. `hybrid_search` turns on reciprocal-rank fusion
|
|
272
|
+
* of the embedding ranking with a full-text (keyword) ranking, weighted as
|
|
273
|
+
* given; without it search is embedding-only. */
|
|
274
|
+
export const VectorStoreRankingOptions = z
|
|
275
|
+
.object({
|
|
276
|
+
score_threshold: z.number().min(0).max(1).optional(),
|
|
277
|
+
hybrid_search: z
|
|
278
|
+
.object({
|
|
279
|
+
embedding_weight: z.number().min(0),
|
|
280
|
+
text_weight: z.number().min(0),
|
|
281
|
+
})
|
|
282
|
+
.refine((w) => w.embedding_weight > 0 || w.text_weight > 0, {
|
|
283
|
+
message: "at least one weight must be positive",
|
|
284
|
+
})
|
|
285
|
+
.optional(),
|
|
286
|
+
})
|
|
287
|
+
.meta({ id: "VectorStoreRankingOptions" });
|
|
288
|
+
|
|
271
289
|
export const VectorStoreSearchIn = z
|
|
272
290
|
.object({
|
|
273
291
|
query: z.union([z.string().min(1), z.array(z.string().min(1)).min(1)]),
|
|
274
292
|
max_num_results: z.number().int().min(1).max(50).optional(),
|
|
275
293
|
filters: VectorStoreFilter.nullish(),
|
|
276
|
-
ranking_options:
|
|
277
|
-
.object({
|
|
278
|
-
score_threshold: z.number().min(0).max(1).optional(),
|
|
279
|
-
})
|
|
280
|
-
.optional(),
|
|
294
|
+
ranking_options: VectorStoreRankingOptions.optional(),
|
|
281
295
|
})
|
|
282
296
|
.meta({ id: "VectorStoreSearchIn" });
|
|
283
297
|
|
|
@@ -285,7 +299,8 @@ export const VectorStoreSearchResult = z
|
|
|
285
299
|
.object({
|
|
286
300
|
file_id: z.string(),
|
|
287
301
|
filename: z.string(),
|
|
288
|
-
/**
|
|
302
|
+
/** In [0, 1]: cosine similarity, or — with `hybrid_search` — the fused
|
|
303
|
+
* reciprocal-rank score (1 = first in both rankings). */
|
|
289
304
|
score: z.number(),
|
|
290
305
|
attributes: VectorStoreAttributes.nullable(),
|
|
291
306
|
content: z.array(z.object({ type: z.literal("text"), text: z.string() })),
|