@orq-ai/node 3.9.14 → 3.9.16
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/bin/mcp-server.js +124 -114
- package/bin/mcp-server.js.map +35 -35
- package/examples/README.md +5 -0
- package/examples/contactsCreate.example.ts +2 -0
- package/examples/package-lock.json +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/server.js +1 -1
- package/models/operations/createcontact.js +2 -2
- package/models/operations/createdataset.js +2 -2
- package/models/operations/createdatasetitem.js +2 -2
- package/models/operations/createdatasource.js +2 -2
- package/models/operations/createeval.js +16 -16
- package/models/operations/createprompt.d.ts +6 -0
- package/models/operations/createprompt.d.ts.map +1 -1
- package/models/operations/createprompt.js +2 -0
- package/models/operations/createprompt.js.map +1 -1
- package/models/operations/deploymentinvoke.d.ts +3 -0
- package/models/operations/deploymentinvoke.d.ts.map +1 -1
- package/models/operations/deploymentinvoke.js +1 -0
- package/models/operations/deploymentinvoke.js.map +1 -1
- package/models/operations/deployments.d.ts +3 -0
- package/models/operations/deployments.d.ts.map +1 -1
- package/models/operations/deployments.js +1 -0
- package/models/operations/deployments.js.map +1 -1
- package/models/operations/fileget.js +2 -2
- package/models/operations/filelist.js +2 -2
- package/models/operations/fileupload.js +2 -2
- package/models/operations/getallprompts.d.ts +3 -0
- package/models/operations/getallprompts.d.ts.map +1 -1
- package/models/operations/getallprompts.js +1 -0
- package/models/operations/getallprompts.js.map +1 -1
- package/models/operations/getevals.js +28 -28
- package/models/operations/getoneprompt.d.ts +3 -0
- package/models/operations/getoneprompt.d.ts.map +1 -1
- package/models/operations/getoneprompt.js +1 -0
- package/models/operations/getoneprompt.js.map +1 -1
- package/models/operations/getpromptversion.d.ts +3 -0
- package/models/operations/getpromptversion.d.ts.map +1 -1
- package/models/operations/getpromptversion.js +1 -0
- package/models/operations/getpromptversion.js.map +1 -1
- package/models/operations/listcontacts.js +2 -2
- package/models/operations/listdatasetdatapoints.js +2 -2
- package/models/operations/listdatasets.js +2 -2
- package/models/operations/listdatasources.js +2 -2
- package/models/operations/listpromptversions.d.ts +3 -0
- package/models/operations/listpromptversions.d.ts.map +1 -1
- package/models/operations/listpromptversions.js +1 -0
- package/models/operations/listpromptversions.js.map +1 -1
- package/models/operations/retrievecontact.js +2 -2
- package/models/operations/retrievedatapoint.js +2 -2
- package/models/operations/retrievedataset.js +2 -2
- package/models/operations/retrievedatasource.js +2 -2
- package/models/operations/updatecontact.js +2 -2
- package/models/operations/updatedatapoint.js +2 -2
- package/models/operations/updatedataset.js +2 -2
- package/models/operations/updatedatasource.js +2 -2
- package/models/operations/updateeval.js +16 -16
- package/models/operations/updateprompt.d.ts +6 -0
- package/models/operations/updateprompt.d.ts.map +1 -1
- package/models/operations/updateprompt.js +2 -0
- package/models/operations/updateprompt.js.map +1 -1
- package/package.json +1 -1
- package/packages/orq-rc/README.md +93 -91
- package/packages/orq-rc/docs/sdks/{knowledgebases → chunking}/README.md +10 -10
- package/packages/orq-rc/docs/sdks/knowledge/README.md +77 -0
- package/packages/orq-rc/examples/README.md +5 -0
- package/packages/orq-rc/examples/contactsCreate.example.ts +2 -0
- package/packages/orq-rc/examples/package-lock.json +1 -1
- package/packages/orq-rc/jsr.json +1 -1
- package/packages/orq-rc/package-lock.json +2 -2
- package/packages/orq-rc/package.json +1 -1
- package/packages/orq-rc/src/funcs/{knowledgeBasesChunkText.ts → chunkingParse.ts} +11 -11
- package/packages/orq-rc/src/funcs/knowledgeCreate.ts +158 -0
- package/packages/orq-rc/src/lib/config.ts +3 -3
- package/packages/orq-rc/src/mcp-server/mcp-server.ts +1 -1
- package/packages/orq-rc/src/mcp-server/server.ts +5 -3
- package/packages/orq-rc/src/mcp-server/tools/{knowledgeBasesChunkText.ts → chunkingParse.ts} +6 -6
- package/packages/orq-rc/src/mcp-server/tools/knowledgeCreate.ts +35 -0
- package/packages/orq-rc/src/models/operations/createcontact.ts +2 -2
- package/packages/orq-rc/src/models/operations/createdataset.ts +2 -2
- package/packages/orq-rc/src/models/operations/createdatasetitem.ts +2 -2
- package/packages/orq-rc/src/models/operations/createdatasource.ts +2 -2
- package/packages/orq-rc/src/models/operations/createeval.ts +16 -16
- package/packages/orq-rc/src/models/operations/createknowledge.ts +846 -0
- package/packages/orq-rc/src/models/operations/createprompt.ts +4 -0
- package/packages/orq-rc/src/models/operations/deploymentinvoke.ts +2 -0
- package/packages/orq-rc/src/models/operations/deployments.ts +2 -0
- package/packages/orq-rc/src/models/operations/fileget.ts +2 -2
- package/packages/orq-rc/src/models/operations/filelist.ts +2 -2
- package/packages/orq-rc/src/models/operations/fileupload.ts +2 -2
- package/packages/orq-rc/src/models/operations/getallprompts.ts +2 -0
- package/packages/orq-rc/src/models/operations/getevals.ts +28 -28
- package/packages/orq-rc/src/models/operations/getoneprompt.ts +2 -0
- package/packages/orq-rc/src/models/operations/getpromptversion.ts +2 -0
- package/packages/orq-rc/src/models/operations/index.ts +2 -1
- package/packages/orq-rc/src/models/operations/listcontacts.ts +2 -2
- package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +2 -2
- package/packages/orq-rc/src/models/operations/listdatasets.ts +2 -2
- package/packages/orq-rc/src/models/operations/listdatasources.ts +2 -2
- package/packages/orq-rc/src/models/operations/listpromptversions.ts +2 -0
- package/packages/orq-rc/src/models/operations/{chunktext.ts → parse.ts} +164 -183
- package/packages/orq-rc/src/models/operations/retrievecontact.ts +2 -2
- package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +2 -2
- package/packages/orq-rc/src/models/operations/retrievedataset.ts +2 -2
- package/packages/orq-rc/src/models/operations/retrievedatasource.ts +2 -2
- package/packages/orq-rc/src/models/operations/updatecontact.ts +2 -2
- package/packages/orq-rc/src/models/operations/updatedatapoint.ts +2 -2
- package/packages/orq-rc/src/models/operations/updatedataset.ts +2 -2
- package/packages/orq-rc/src/models/operations/updatedatasource.ts +2 -2
- package/packages/orq-rc/src/models/operations/updateeval.ts +16 -16
- package/packages/orq-rc/src/models/operations/updateknowledge.ts +266 -206
- package/packages/orq-rc/src/models/operations/updateprompt.ts +4 -0
- package/packages/orq-rc/src/sdk/{knowledgebases.ts → chunking.ts} +7 -7
- package/packages/orq-rc/src/sdk/knowledge.ts +15 -0
- package/packages/orq-rc/src/sdk/sdk.ts +4 -4
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/models/operations/createcontact.ts +2 -2
- package/src/models/operations/createdataset.ts +2 -2
- package/src/models/operations/createdatasetitem.ts +2 -2
- package/src/models/operations/createdatasource.ts +2 -2
- package/src/models/operations/createeval.ts +16 -16
- package/src/models/operations/createprompt.ts +2 -0
- package/src/models/operations/deploymentinvoke.ts +1 -0
- package/src/models/operations/deployments.ts +1 -0
- package/src/models/operations/fileget.ts +2 -2
- package/src/models/operations/filelist.ts +2 -2
- package/src/models/operations/fileupload.ts +2 -2
- package/src/models/operations/getallprompts.ts +1 -0
- package/src/models/operations/getevals.ts +28 -28
- package/src/models/operations/getoneprompt.ts +1 -0
- package/src/models/operations/getpromptversion.ts +1 -0
- package/src/models/operations/listcontacts.ts +2 -2
- package/src/models/operations/listdatasetdatapoints.ts +2 -2
- package/src/models/operations/listdatasets.ts +2 -2
- package/src/models/operations/listdatasources.ts +2 -2
- package/src/models/operations/listpromptversions.ts +1 -0
- package/src/models/operations/retrievecontact.ts +2 -2
- package/src/models/operations/retrievedatapoint.ts +2 -2
- package/src/models/operations/retrievedataset.ts +2 -2
- package/src/models/operations/retrievedatasource.ts +2 -2
- package/src/models/operations/updatecontact.ts +2 -2
- package/src/models/operations/updatedatapoint.ts +2 -2
- package/src/models/operations/updatedataset.ts +2 -2
- package/src/models/operations/updatedatasource.ts +2 -2
- package/src/models/operations/updateeval.ts +16 -16
- package/src/models/operations/updateprompt.ts +2 -0
|
@@ -12,18 +12,15 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
|
12
12
|
/**
|
|
13
13
|
* Return format: chunks (with metadata) or texts (plain strings)
|
|
14
14
|
*/
|
|
15
|
-
export const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
} as const;
|
|
15
|
+
export const ParseChunkingRequestChunkingRequestRequestBodyReturnType = {
|
|
16
|
+
Chunks: "chunks",
|
|
17
|
+
Texts: "texts",
|
|
18
|
+
} as const;
|
|
20
19
|
/**
|
|
21
20
|
* Return format: chunks (with metadata) or texts (plain strings)
|
|
22
21
|
*/
|
|
23
|
-
export type
|
|
24
|
-
ClosedEnum<
|
|
25
|
-
typeof ChunkTextChunkingRequestKnowledgeBasesRequestRequestBodyReturnType
|
|
26
|
-
>;
|
|
22
|
+
export type ParseChunkingRequestChunkingRequestRequestBodyReturnType =
|
|
23
|
+
ClosedEnum<typeof ParseChunkingRequestChunkingRequestRequestBodyReturnType>;
|
|
27
24
|
|
|
28
25
|
export const AgenticChunker = {
|
|
29
26
|
Agentic: "agentic",
|
|
@@ -46,7 +43,7 @@ export type AgenticChunkerStrategy = {
|
|
|
46
43
|
* Return format: chunks (with metadata) or texts (plain strings)
|
|
47
44
|
*/
|
|
48
45
|
returnType?:
|
|
49
|
-
|
|
|
46
|
+
| ParseChunkingRequestChunkingRequestRequestBodyReturnType
|
|
50
47
|
| undefined;
|
|
51
48
|
strategy: AgenticChunker;
|
|
52
49
|
/**
|
|
@@ -70,30 +67,31 @@ export type AgenticChunkerStrategy = {
|
|
|
70
67
|
/**
|
|
71
68
|
* Return format: chunks (with metadata) or texts (plain strings)
|
|
72
69
|
*/
|
|
73
|
-
export const
|
|
70
|
+
export const ParseChunkingRequestChunkingRequestReturnType = {
|
|
74
71
|
Chunks: "chunks",
|
|
75
72
|
Texts: "texts",
|
|
76
73
|
} as const;
|
|
77
74
|
/**
|
|
78
75
|
* Return format: chunks (with metadata) or texts (plain strings)
|
|
79
76
|
*/
|
|
80
|
-
export type
|
|
81
|
-
|
|
77
|
+
export type ParseChunkingRequestChunkingRequestReturnType = ClosedEnum<
|
|
78
|
+
typeof ParseChunkingRequestChunkingRequestReturnType
|
|
79
|
+
>;
|
|
82
80
|
|
|
83
81
|
export const SDPMChunker = {
|
|
84
82
|
Sdpm: "sdpm",
|
|
85
83
|
} as const;
|
|
86
84
|
export type SDPMChunker = ClosedEnum<typeof SDPMChunker>;
|
|
87
85
|
|
|
88
|
-
export const
|
|
86
|
+
export const ParseThreshold2 = {
|
|
89
87
|
Auto: "auto",
|
|
90
88
|
} as const;
|
|
91
|
-
export type
|
|
89
|
+
export type ParseThreshold2 = ClosedEnum<typeof ParseThreshold2>;
|
|
92
90
|
|
|
93
91
|
/**
|
|
94
92
|
* Similarity threshold for grouping (0-1) or "auto" for automatic detection
|
|
95
93
|
*/
|
|
96
|
-
export type ChunkingRequestThreshold = number |
|
|
94
|
+
export type ChunkingRequestThreshold = number | ParseThreshold2;
|
|
97
95
|
|
|
98
96
|
/**
|
|
99
97
|
* Chunking mode: window-based or sentence-based similarity
|
|
@@ -122,9 +120,7 @@ export type SDPMChunkerStrategy = {
|
|
|
122
120
|
/**
|
|
123
121
|
* Return format: chunks (with metadata) or texts (plain strings)
|
|
124
122
|
*/
|
|
125
|
-
returnType?:
|
|
126
|
-
| ChunkTextChunkingRequestKnowledgeBasesRequestReturnType
|
|
127
|
-
| undefined;
|
|
123
|
+
returnType?: ParseChunkingRequestChunkingRequestReturnType | undefined;
|
|
128
124
|
strategy: SDPMChunker;
|
|
129
125
|
/**
|
|
130
126
|
* Maximum tokens per chunk
|
|
@@ -137,7 +133,7 @@ export type SDPMChunkerStrategy = {
|
|
|
137
133
|
/**
|
|
138
134
|
* Similarity threshold for grouping (0-1) or "auto" for automatic detection
|
|
139
135
|
*/
|
|
140
|
-
threshold?: number |
|
|
136
|
+
threshold?: number | ParseThreshold2 | undefined;
|
|
141
137
|
/**
|
|
142
138
|
* Embedding model to use for semantic similarity. (Available embedding models)[https://docs.orq.ai/docs/proxy#embedding-models]
|
|
143
139
|
*/
|
|
@@ -151,15 +147,15 @@ export type SDPMChunkerStrategy = {
|
|
|
151
147
|
/**
|
|
152
148
|
* Return format: chunks (with metadata) or texts (plain strings)
|
|
153
149
|
*/
|
|
154
|
-
export const
|
|
150
|
+
export const ParseChunkingRequestChunkingReturnType = {
|
|
155
151
|
Chunks: "chunks",
|
|
156
152
|
Texts: "texts",
|
|
157
153
|
} as const;
|
|
158
154
|
/**
|
|
159
155
|
* Return format: chunks (with metadata) or texts (plain strings)
|
|
160
156
|
*/
|
|
161
|
-
export type
|
|
162
|
-
typeof
|
|
157
|
+
export type ParseChunkingRequestChunkingReturnType = ClosedEnum<
|
|
158
|
+
typeof ParseChunkingRequestChunkingReturnType
|
|
163
159
|
>;
|
|
164
160
|
|
|
165
161
|
export const SemanticChunker = {
|
|
@@ -204,7 +200,7 @@ export type SemanticChunkerStrategy = {
|
|
|
204
200
|
/**
|
|
205
201
|
* Return format: chunks (with metadata) or texts (plain strings)
|
|
206
202
|
*/
|
|
207
|
-
returnType?:
|
|
203
|
+
returnType?: ParseChunkingRequestChunkingReturnType | undefined;
|
|
208
204
|
strategy: SemanticChunker;
|
|
209
205
|
/**
|
|
210
206
|
* Maximum tokens per chunk
|
|
@@ -231,15 +227,15 @@ export type SemanticChunkerStrategy = {
|
|
|
231
227
|
/**
|
|
232
228
|
* Return format: chunks (with metadata) or texts (plain strings)
|
|
233
229
|
*/
|
|
234
|
-
export const
|
|
230
|
+
export const ParseChunkingRequestReturnType = {
|
|
235
231
|
Chunks: "chunks",
|
|
236
232
|
Texts: "texts",
|
|
237
233
|
} as const;
|
|
238
234
|
/**
|
|
239
235
|
* Return format: chunks (with metadata) or texts (plain strings)
|
|
240
236
|
*/
|
|
241
|
-
export type
|
|
242
|
-
typeof
|
|
237
|
+
export type ParseChunkingRequestReturnType = ClosedEnum<
|
|
238
|
+
typeof ParseChunkingRequestReturnType
|
|
243
239
|
>;
|
|
244
240
|
|
|
245
241
|
export const RecursiveChunker = {
|
|
@@ -262,7 +258,7 @@ export type RecursiveChunkerStrategy = {
|
|
|
262
258
|
/**
|
|
263
259
|
* Return format: chunks (with metadata) or texts (plain strings)
|
|
264
260
|
*/
|
|
265
|
-
returnType?:
|
|
261
|
+
returnType?: ParseChunkingRequestReturnType | undefined;
|
|
266
262
|
strategy: RecursiveChunker;
|
|
267
263
|
/**
|
|
268
264
|
* Maximum tokens per chunk
|
|
@@ -375,7 +371,7 @@ export type TokenChunkerStrategy = {
|
|
|
375
371
|
/**
|
|
376
372
|
* Request payload for text chunking with strategy-specific configuration
|
|
377
373
|
*/
|
|
378
|
-
export type
|
|
374
|
+
export type ParseChunkingRequest =
|
|
379
375
|
| SemanticChunkerStrategy
|
|
380
376
|
| SDPMChunkerStrategy
|
|
381
377
|
| AgenticChunkerStrategy
|
|
@@ -383,7 +379,7 @@ export type ChunkTextChunkingRequest =
|
|
|
383
379
|
| SentenceChunkerStrategy
|
|
384
380
|
| RecursiveChunkerStrategy;
|
|
385
381
|
|
|
386
|
-
export type
|
|
382
|
+
export type ParseMetadata = {
|
|
387
383
|
startIndex: number | null;
|
|
388
384
|
endIndex: number | null;
|
|
389
385
|
tokenCount: number | null;
|
|
@@ -398,42 +394,39 @@ export type Chunks = {
|
|
|
398
394
|
* The position index of this chunk in the sequence
|
|
399
395
|
*/
|
|
400
396
|
index: number;
|
|
401
|
-
metadata?:
|
|
397
|
+
metadata?: ParseMetadata | undefined;
|
|
402
398
|
};
|
|
403
399
|
|
|
404
400
|
/**
|
|
405
401
|
* Text successfully chunked
|
|
406
402
|
*/
|
|
407
|
-
export type
|
|
403
|
+
export type ParseResponseBody = {
|
|
408
404
|
chunks: Array<Chunks>;
|
|
409
405
|
};
|
|
410
406
|
|
|
411
407
|
/** @internal */
|
|
412
|
-
export const
|
|
408
|
+
export const ParseChunkingRequestChunkingRequestRequestBodyReturnType$inboundSchema:
|
|
413
409
|
z.ZodNativeEnum<
|
|
414
|
-
typeof
|
|
415
|
-
> = z.nativeEnum(
|
|
416
|
-
ChunkTextChunkingRequestKnowledgeBasesRequestRequestBodyReturnType,
|
|
417
|
-
);
|
|
410
|
+
typeof ParseChunkingRequestChunkingRequestRequestBodyReturnType
|
|
411
|
+
> = z.nativeEnum(ParseChunkingRequestChunkingRequestRequestBodyReturnType);
|
|
418
412
|
|
|
419
413
|
/** @internal */
|
|
420
|
-
export const
|
|
414
|
+
export const ParseChunkingRequestChunkingRequestRequestBodyReturnType$outboundSchema:
|
|
421
415
|
z.ZodNativeEnum<
|
|
422
|
-
typeof
|
|
423
|
-
> =
|
|
424
|
-
ChunkTextChunkingRequestKnowledgeBasesRequestRequestBodyReturnType$inboundSchema;
|
|
416
|
+
typeof ParseChunkingRequestChunkingRequestRequestBodyReturnType
|
|
417
|
+
> = ParseChunkingRequestChunkingRequestRequestBodyReturnType$inboundSchema;
|
|
425
418
|
|
|
426
419
|
/**
|
|
427
420
|
* @internal
|
|
428
421
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
429
422
|
*/
|
|
430
|
-
export namespace
|
|
431
|
-
/** @deprecated use `
|
|
423
|
+
export namespace ParseChunkingRequestChunkingRequestRequestBodyReturnType$ {
|
|
424
|
+
/** @deprecated use `ParseChunkingRequestChunkingRequestRequestBodyReturnType$inboundSchema` instead. */
|
|
432
425
|
export const inboundSchema =
|
|
433
|
-
|
|
434
|
-
/** @deprecated use `
|
|
426
|
+
ParseChunkingRequestChunkingRequestRequestBodyReturnType$inboundSchema;
|
|
427
|
+
/** @deprecated use `ParseChunkingRequestChunkingRequestRequestBodyReturnType$outboundSchema` instead. */
|
|
435
428
|
export const outboundSchema =
|
|
436
|
-
|
|
429
|
+
ParseChunkingRequestChunkingRequestRequestBodyReturnType$outboundSchema;
|
|
437
430
|
}
|
|
438
431
|
|
|
439
432
|
/** @internal */
|
|
@@ -466,7 +459,7 @@ export const AgenticChunkerStrategy$inboundSchema: z.ZodType<
|
|
|
466
459
|
text: z.string(),
|
|
467
460
|
metadata: z.boolean().default(true),
|
|
468
461
|
return_type:
|
|
469
|
-
|
|
462
|
+
ParseChunkingRequestChunkingRequestRequestBodyReturnType$inboundSchema
|
|
470
463
|
.default("chunks"),
|
|
471
464
|
strategy: AgenticChunker$inboundSchema,
|
|
472
465
|
model: z.string(),
|
|
@@ -503,7 +496,7 @@ export const AgenticChunkerStrategy$outboundSchema: z.ZodType<
|
|
|
503
496
|
text: z.string(),
|
|
504
497
|
metadata: z.boolean().default(true),
|
|
505
498
|
returnType:
|
|
506
|
-
|
|
499
|
+
ParseChunkingRequestChunkingRequestRequestBodyReturnType$outboundSchema
|
|
507
500
|
.default("chunks"),
|
|
508
501
|
strategy: AgenticChunker$outboundSchema,
|
|
509
502
|
model: z.string(),
|
|
@@ -551,28 +544,26 @@ export function agenticChunkerStrategyFromJSON(
|
|
|
551
544
|
}
|
|
552
545
|
|
|
553
546
|
/** @internal */
|
|
554
|
-
export const
|
|
555
|
-
z.ZodNativeEnum<
|
|
556
|
-
|
|
557
|
-
> = z.nativeEnum(ChunkTextChunkingRequestKnowledgeBasesRequestReturnType);
|
|
547
|
+
export const ParseChunkingRequestChunkingRequestReturnType$inboundSchema:
|
|
548
|
+
z.ZodNativeEnum<typeof ParseChunkingRequestChunkingRequestReturnType> = z
|
|
549
|
+
.nativeEnum(ParseChunkingRequestChunkingRequestReturnType);
|
|
558
550
|
|
|
559
551
|
/** @internal */
|
|
560
|
-
export const
|
|
561
|
-
z.ZodNativeEnum<
|
|
562
|
-
|
|
563
|
-
> = ChunkTextChunkingRequestKnowledgeBasesRequestReturnType$inboundSchema;
|
|
552
|
+
export const ParseChunkingRequestChunkingRequestReturnType$outboundSchema:
|
|
553
|
+
z.ZodNativeEnum<typeof ParseChunkingRequestChunkingRequestReturnType> =
|
|
554
|
+
ParseChunkingRequestChunkingRequestReturnType$inboundSchema;
|
|
564
555
|
|
|
565
556
|
/**
|
|
566
557
|
* @internal
|
|
567
558
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
568
559
|
*/
|
|
569
|
-
export namespace
|
|
570
|
-
/** @deprecated use `
|
|
560
|
+
export namespace ParseChunkingRequestChunkingRequestReturnType$ {
|
|
561
|
+
/** @deprecated use `ParseChunkingRequestChunkingRequestReturnType$inboundSchema` instead. */
|
|
571
562
|
export const inboundSchema =
|
|
572
|
-
|
|
573
|
-
/** @deprecated use `
|
|
563
|
+
ParseChunkingRequestChunkingRequestReturnType$inboundSchema;
|
|
564
|
+
/** @deprecated use `ParseChunkingRequestChunkingRequestReturnType$outboundSchema` instead. */
|
|
574
565
|
export const outboundSchema =
|
|
575
|
-
|
|
566
|
+
ParseChunkingRequestChunkingRequestReturnType$outboundSchema;
|
|
576
567
|
}
|
|
577
568
|
|
|
578
569
|
/** @internal */
|
|
@@ -595,24 +586,24 @@ export namespace SDPMChunker$ {
|
|
|
595
586
|
}
|
|
596
587
|
|
|
597
588
|
/** @internal */
|
|
598
|
-
export const
|
|
599
|
-
typeof
|
|
600
|
-
> = z.nativeEnum(
|
|
589
|
+
export const ParseThreshold2$inboundSchema: z.ZodNativeEnum<
|
|
590
|
+
typeof ParseThreshold2
|
|
591
|
+
> = z.nativeEnum(ParseThreshold2);
|
|
601
592
|
|
|
602
593
|
/** @internal */
|
|
603
|
-
export const
|
|
604
|
-
typeof
|
|
605
|
-
> =
|
|
594
|
+
export const ParseThreshold2$outboundSchema: z.ZodNativeEnum<
|
|
595
|
+
typeof ParseThreshold2
|
|
596
|
+
> = ParseThreshold2$inboundSchema;
|
|
606
597
|
|
|
607
598
|
/**
|
|
608
599
|
* @internal
|
|
609
600
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
610
601
|
*/
|
|
611
|
-
export namespace
|
|
612
|
-
/** @deprecated use `
|
|
613
|
-
export const inboundSchema =
|
|
614
|
-
/** @deprecated use `
|
|
615
|
-
export const outboundSchema =
|
|
602
|
+
export namespace ParseThreshold2$ {
|
|
603
|
+
/** @deprecated use `ParseThreshold2$inboundSchema` instead. */
|
|
604
|
+
export const inboundSchema = ParseThreshold2$inboundSchema;
|
|
605
|
+
/** @deprecated use `ParseThreshold2$outboundSchema` instead. */
|
|
606
|
+
export const outboundSchema = ParseThreshold2$outboundSchema;
|
|
616
607
|
}
|
|
617
608
|
|
|
618
609
|
/** @internal */
|
|
@@ -620,7 +611,7 @@ export const ChunkingRequestThreshold$inboundSchema: z.ZodType<
|
|
|
620
611
|
ChunkingRequestThreshold,
|
|
621
612
|
z.ZodTypeDef,
|
|
622
613
|
unknown
|
|
623
|
-
> = z.union([z.number(),
|
|
614
|
+
> = z.union([z.number(), ParseThreshold2$inboundSchema]);
|
|
624
615
|
|
|
625
616
|
/** @internal */
|
|
626
617
|
export type ChunkingRequestThreshold$Outbound = number | string;
|
|
@@ -630,7 +621,7 @@ export const ChunkingRequestThreshold$outboundSchema: z.ZodType<
|
|
|
630
621
|
ChunkingRequestThreshold$Outbound,
|
|
631
622
|
z.ZodTypeDef,
|
|
632
623
|
ChunkingRequestThreshold
|
|
633
|
-
> = z.union([z.number(),
|
|
624
|
+
> = z.union([z.number(), ParseThreshold2$outboundSchema]);
|
|
634
625
|
|
|
635
626
|
/**
|
|
636
627
|
* @internal
|
|
@@ -692,14 +683,12 @@ export const SDPMChunkerStrategy$inboundSchema: z.ZodType<
|
|
|
692
683
|
> = z.object({
|
|
693
684
|
text: z.string(),
|
|
694
685
|
metadata: z.boolean().default(true),
|
|
695
|
-
return_type:
|
|
696
|
-
|
|
697
|
-
.default("chunks"),
|
|
686
|
+
return_type: ParseChunkingRequestChunkingRequestReturnType$inboundSchema
|
|
687
|
+
.default("chunks"),
|
|
698
688
|
strategy: SDPMChunker$inboundSchema,
|
|
699
689
|
chunk_size: z.number().int().default(512),
|
|
700
690
|
skip_window: z.number().int().default(1),
|
|
701
|
-
threshold: z.union([z.number(),
|
|
702
|
-
.optional(),
|
|
691
|
+
threshold: z.union([z.number(), ParseThreshold2$inboundSchema]).optional(),
|
|
703
692
|
embedding_model: z.string(),
|
|
704
693
|
mode: ChunkingRequestMode$inboundSchema.default("window"),
|
|
705
694
|
}).transform((v) => {
|
|
@@ -732,14 +721,12 @@ export const SDPMChunkerStrategy$outboundSchema: z.ZodType<
|
|
|
732
721
|
> = z.object({
|
|
733
722
|
text: z.string(),
|
|
734
723
|
metadata: z.boolean().default(true),
|
|
735
|
-
returnType:
|
|
736
|
-
|
|
737
|
-
.default("chunks"),
|
|
724
|
+
returnType: ParseChunkingRequestChunkingRequestReturnType$outboundSchema
|
|
725
|
+
.default("chunks"),
|
|
738
726
|
strategy: SDPMChunker$outboundSchema,
|
|
739
727
|
chunkSize: z.number().int().default(512),
|
|
740
728
|
skipWindow: z.number().int().default(1),
|
|
741
|
-
threshold: z.union([z.number(),
|
|
742
|
-
.optional(),
|
|
729
|
+
threshold: z.union([z.number(), ParseThreshold2$outboundSchema]).optional(),
|
|
743
730
|
embeddingModel: z.string(),
|
|
744
731
|
mode: ChunkingRequestMode$outboundSchema.default("window"),
|
|
745
732
|
}).transform((v) => {
|
|
@@ -783,26 +770,27 @@ export function sdpmChunkerStrategyFromJSON(
|
|
|
783
770
|
}
|
|
784
771
|
|
|
785
772
|
/** @internal */
|
|
786
|
-
export const
|
|
787
|
-
z.ZodNativeEnum<typeof
|
|
788
|
-
|
|
773
|
+
export const ParseChunkingRequestChunkingReturnType$inboundSchema:
|
|
774
|
+
z.ZodNativeEnum<typeof ParseChunkingRequestChunkingReturnType> = z.nativeEnum(
|
|
775
|
+
ParseChunkingRequestChunkingReturnType,
|
|
776
|
+
);
|
|
789
777
|
|
|
790
778
|
/** @internal */
|
|
791
|
-
export const
|
|
792
|
-
z.ZodNativeEnum<typeof
|
|
793
|
-
|
|
779
|
+
export const ParseChunkingRequestChunkingReturnType$outboundSchema:
|
|
780
|
+
z.ZodNativeEnum<typeof ParseChunkingRequestChunkingReturnType> =
|
|
781
|
+
ParseChunkingRequestChunkingReturnType$inboundSchema;
|
|
794
782
|
|
|
795
783
|
/**
|
|
796
784
|
* @internal
|
|
797
785
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
798
786
|
*/
|
|
799
|
-
export namespace
|
|
800
|
-
/** @deprecated use `
|
|
787
|
+
export namespace ParseChunkingRequestChunkingReturnType$ {
|
|
788
|
+
/** @deprecated use `ParseChunkingRequestChunkingReturnType$inboundSchema` instead. */
|
|
801
789
|
export const inboundSchema =
|
|
802
|
-
|
|
803
|
-
/** @deprecated use `
|
|
790
|
+
ParseChunkingRequestChunkingReturnType$inboundSchema;
|
|
791
|
+
/** @deprecated use `ParseChunkingRequestChunkingReturnType$outboundSchema` instead. */
|
|
804
792
|
export const outboundSchema =
|
|
805
|
-
|
|
793
|
+
ParseChunkingRequestChunkingReturnType$outboundSchema;
|
|
806
794
|
}
|
|
807
795
|
|
|
808
796
|
/** @internal */
|
|
@@ -917,8 +905,9 @@ export const SemanticChunkerStrategy$inboundSchema: z.ZodType<
|
|
|
917
905
|
> = z.object({
|
|
918
906
|
text: z.string(),
|
|
919
907
|
metadata: z.boolean().default(true),
|
|
920
|
-
return_type:
|
|
921
|
-
|
|
908
|
+
return_type: ParseChunkingRequestChunkingReturnType$inboundSchema.default(
|
|
909
|
+
"chunks",
|
|
910
|
+
),
|
|
922
911
|
strategy: SemanticChunker$inboundSchema,
|
|
923
912
|
chunk_size: z.number().int().default(512),
|
|
924
913
|
threshold: z.union([z.number(), Threshold2$inboundSchema]).optional(),
|
|
@@ -955,8 +944,9 @@ export const SemanticChunkerStrategy$outboundSchema: z.ZodType<
|
|
|
955
944
|
> = z.object({
|
|
956
945
|
text: z.string(),
|
|
957
946
|
metadata: z.boolean().default(true),
|
|
958
|
-
returnType:
|
|
959
|
-
|
|
947
|
+
returnType: ParseChunkingRequestChunkingReturnType$outboundSchema.default(
|
|
948
|
+
"chunks",
|
|
949
|
+
),
|
|
960
950
|
strategy: SemanticChunker$outboundSchema,
|
|
961
951
|
chunkSize: z.number().int().default(512),
|
|
962
952
|
threshold: z.union([z.number(), Threshold2$outboundSchema]).optional(),
|
|
@@ -1004,25 +994,24 @@ export function semanticChunkerStrategyFromJSON(
|
|
|
1004
994
|
}
|
|
1005
995
|
|
|
1006
996
|
/** @internal */
|
|
1007
|
-
export const
|
|
1008
|
-
typeof
|
|
1009
|
-
> = z.nativeEnum(
|
|
997
|
+
export const ParseChunkingRequestReturnType$inboundSchema: z.ZodNativeEnum<
|
|
998
|
+
typeof ParseChunkingRequestReturnType
|
|
999
|
+
> = z.nativeEnum(ParseChunkingRequestReturnType);
|
|
1010
1000
|
|
|
1011
1001
|
/** @internal */
|
|
1012
|
-
export const
|
|
1013
|
-
typeof
|
|
1014
|
-
> =
|
|
1002
|
+
export const ParseChunkingRequestReturnType$outboundSchema: z.ZodNativeEnum<
|
|
1003
|
+
typeof ParseChunkingRequestReturnType
|
|
1004
|
+
> = ParseChunkingRequestReturnType$inboundSchema;
|
|
1015
1005
|
|
|
1016
1006
|
/**
|
|
1017
1007
|
* @internal
|
|
1018
1008
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1019
1009
|
*/
|
|
1020
|
-
export namespace
|
|
1021
|
-
/** @deprecated use `
|
|
1022
|
-
export const inboundSchema =
|
|
1023
|
-
/** @deprecated use `
|
|
1024
|
-
export const outboundSchema =
|
|
1025
|
-
ChunkTextChunkingRequestReturnType$outboundSchema;
|
|
1010
|
+
export namespace ParseChunkingRequestReturnType$ {
|
|
1011
|
+
/** @deprecated use `ParseChunkingRequestReturnType$inboundSchema` instead. */
|
|
1012
|
+
export const inboundSchema = ParseChunkingRequestReturnType$inboundSchema;
|
|
1013
|
+
/** @deprecated use `ParseChunkingRequestReturnType$outboundSchema` instead. */
|
|
1014
|
+
export const outboundSchema = ParseChunkingRequestReturnType$outboundSchema;
|
|
1026
1015
|
}
|
|
1027
1016
|
|
|
1028
1017
|
/** @internal */
|
|
@@ -1054,9 +1043,7 @@ export const RecursiveChunkerStrategy$inboundSchema: z.ZodType<
|
|
|
1054
1043
|
> = z.object({
|
|
1055
1044
|
text: z.string(),
|
|
1056
1045
|
metadata: z.boolean().default(true),
|
|
1057
|
-
return_type:
|
|
1058
|
-
"chunks",
|
|
1059
|
-
),
|
|
1046
|
+
return_type: ParseChunkingRequestReturnType$inboundSchema.default("chunks"),
|
|
1060
1047
|
strategy: RecursiveChunker$inboundSchema,
|
|
1061
1048
|
chunk_size: z.number().int().default(512),
|
|
1062
1049
|
separators: z.array(z.string()).optional(),
|
|
@@ -1088,9 +1075,7 @@ export const RecursiveChunkerStrategy$outboundSchema: z.ZodType<
|
|
|
1088
1075
|
> = z.object({
|
|
1089
1076
|
text: z.string(),
|
|
1090
1077
|
metadata: z.boolean().default(true),
|
|
1091
|
-
returnType:
|
|
1092
|
-
"chunks",
|
|
1093
|
-
),
|
|
1078
|
+
returnType: ParseChunkingRequestReturnType$outboundSchema.default("chunks"),
|
|
1094
1079
|
strategy: RecursiveChunker$outboundSchema,
|
|
1095
1080
|
chunkSize: z.number().int().default(512),
|
|
1096
1081
|
separators: z.array(z.string()).optional(),
|
|
@@ -1382,8 +1367,8 @@ export function tokenChunkerStrategyFromJSON(
|
|
|
1382
1367
|
}
|
|
1383
1368
|
|
|
1384
1369
|
/** @internal */
|
|
1385
|
-
export const
|
|
1386
|
-
|
|
1370
|
+
export const ParseChunkingRequest$inboundSchema: z.ZodType<
|
|
1371
|
+
ParseChunkingRequest,
|
|
1387
1372
|
z.ZodTypeDef,
|
|
1388
1373
|
unknown
|
|
1389
1374
|
> = z.union([
|
|
@@ -1396,7 +1381,7 @@ export const ChunkTextChunkingRequest$inboundSchema: z.ZodType<
|
|
|
1396
1381
|
]);
|
|
1397
1382
|
|
|
1398
1383
|
/** @internal */
|
|
1399
|
-
export type
|
|
1384
|
+
export type ParseChunkingRequest$Outbound =
|
|
1400
1385
|
| SemanticChunkerStrategy$Outbound
|
|
1401
1386
|
| SDPMChunkerStrategy$Outbound
|
|
1402
1387
|
| AgenticChunkerStrategy$Outbound
|
|
@@ -1405,10 +1390,10 @@ export type ChunkTextChunkingRequest$Outbound =
|
|
|
1405
1390
|
| RecursiveChunkerStrategy$Outbound;
|
|
1406
1391
|
|
|
1407
1392
|
/** @internal */
|
|
1408
|
-
export const
|
|
1409
|
-
|
|
1393
|
+
export const ParseChunkingRequest$outboundSchema: z.ZodType<
|
|
1394
|
+
ParseChunkingRequest$Outbound,
|
|
1410
1395
|
z.ZodTypeDef,
|
|
1411
|
-
|
|
1396
|
+
ParseChunkingRequest
|
|
1412
1397
|
> = z.union([
|
|
1413
1398
|
z.lazy(() => SemanticChunkerStrategy$outboundSchema),
|
|
1414
1399
|
z.lazy(() => SDPMChunkerStrategy$outboundSchema),
|
|
@@ -1422,36 +1407,36 @@ export const ChunkTextChunkingRequest$outboundSchema: z.ZodType<
|
|
|
1422
1407
|
* @internal
|
|
1423
1408
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1424
1409
|
*/
|
|
1425
|
-
export namespace
|
|
1426
|
-
/** @deprecated use `
|
|
1427
|
-
export const inboundSchema =
|
|
1428
|
-
/** @deprecated use `
|
|
1429
|
-
export const outboundSchema =
|
|
1430
|
-
/** @deprecated use `
|
|
1431
|
-
export type Outbound =
|
|
1410
|
+
export namespace ParseChunkingRequest$ {
|
|
1411
|
+
/** @deprecated use `ParseChunkingRequest$inboundSchema` instead. */
|
|
1412
|
+
export const inboundSchema = ParseChunkingRequest$inboundSchema;
|
|
1413
|
+
/** @deprecated use `ParseChunkingRequest$outboundSchema` instead. */
|
|
1414
|
+
export const outboundSchema = ParseChunkingRequest$outboundSchema;
|
|
1415
|
+
/** @deprecated use `ParseChunkingRequest$Outbound` instead. */
|
|
1416
|
+
export type Outbound = ParseChunkingRequest$Outbound;
|
|
1432
1417
|
}
|
|
1433
1418
|
|
|
1434
|
-
export function
|
|
1435
|
-
|
|
1419
|
+
export function parseChunkingRequestToJSON(
|
|
1420
|
+
parseChunkingRequest: ParseChunkingRequest,
|
|
1436
1421
|
): string {
|
|
1437
1422
|
return JSON.stringify(
|
|
1438
|
-
|
|
1423
|
+
ParseChunkingRequest$outboundSchema.parse(parseChunkingRequest),
|
|
1439
1424
|
);
|
|
1440
1425
|
}
|
|
1441
1426
|
|
|
1442
|
-
export function
|
|
1427
|
+
export function parseChunkingRequestFromJSON(
|
|
1443
1428
|
jsonString: string,
|
|
1444
|
-
): SafeParseResult<
|
|
1429
|
+
): SafeParseResult<ParseChunkingRequest, SDKValidationError> {
|
|
1445
1430
|
return safeParse(
|
|
1446
1431
|
jsonString,
|
|
1447
|
-
(x) =>
|
|
1448
|
-
`Failed to parse '
|
|
1432
|
+
(x) => ParseChunkingRequest$inboundSchema.parse(JSON.parse(x)),
|
|
1433
|
+
`Failed to parse 'ParseChunkingRequest' from JSON`,
|
|
1449
1434
|
);
|
|
1450
1435
|
}
|
|
1451
1436
|
|
|
1452
1437
|
/** @internal */
|
|
1453
|
-
export const
|
|
1454
|
-
|
|
1438
|
+
export const ParseMetadata$inboundSchema: z.ZodType<
|
|
1439
|
+
ParseMetadata,
|
|
1455
1440
|
z.ZodTypeDef,
|
|
1456
1441
|
unknown
|
|
1457
1442
|
> = z.object({
|
|
@@ -1467,17 +1452,17 @@ export const ChunkTextMetadata$inboundSchema: z.ZodType<
|
|
|
1467
1452
|
});
|
|
1468
1453
|
|
|
1469
1454
|
/** @internal */
|
|
1470
|
-
export type
|
|
1455
|
+
export type ParseMetadata$Outbound = {
|
|
1471
1456
|
start_index: number | null;
|
|
1472
1457
|
end_index: number | null;
|
|
1473
1458
|
token_count: number | null;
|
|
1474
1459
|
};
|
|
1475
1460
|
|
|
1476
1461
|
/** @internal */
|
|
1477
|
-
export const
|
|
1478
|
-
|
|
1462
|
+
export const ParseMetadata$outboundSchema: z.ZodType<
|
|
1463
|
+
ParseMetadata$Outbound,
|
|
1479
1464
|
z.ZodTypeDef,
|
|
1480
|
-
|
|
1465
|
+
ParseMetadata
|
|
1481
1466
|
> = z.object({
|
|
1482
1467
|
startIndex: z.nullable(z.number()),
|
|
1483
1468
|
endIndex: z.nullable(z.number()),
|
|
@@ -1494,30 +1479,26 @@ export const ChunkTextMetadata$outboundSchema: z.ZodType<
|
|
|
1494
1479
|
* @internal
|
|
1495
1480
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1496
1481
|
*/
|
|
1497
|
-
export namespace
|
|
1498
|
-
/** @deprecated use `
|
|
1499
|
-
export const inboundSchema =
|
|
1500
|
-
/** @deprecated use `
|
|
1501
|
-
export const outboundSchema =
|
|
1502
|
-
/** @deprecated use `
|
|
1503
|
-
export type Outbound =
|
|
1482
|
+
export namespace ParseMetadata$ {
|
|
1483
|
+
/** @deprecated use `ParseMetadata$inboundSchema` instead. */
|
|
1484
|
+
export const inboundSchema = ParseMetadata$inboundSchema;
|
|
1485
|
+
/** @deprecated use `ParseMetadata$outboundSchema` instead. */
|
|
1486
|
+
export const outboundSchema = ParseMetadata$outboundSchema;
|
|
1487
|
+
/** @deprecated use `ParseMetadata$Outbound` instead. */
|
|
1488
|
+
export type Outbound = ParseMetadata$Outbound;
|
|
1504
1489
|
}
|
|
1505
1490
|
|
|
1506
|
-
export function
|
|
1507
|
-
|
|
1508
|
-
): string {
|
|
1509
|
-
return JSON.stringify(
|
|
1510
|
-
ChunkTextMetadata$outboundSchema.parse(chunkTextMetadata),
|
|
1511
|
-
);
|
|
1491
|
+
export function parseMetadataToJSON(parseMetadata: ParseMetadata): string {
|
|
1492
|
+
return JSON.stringify(ParseMetadata$outboundSchema.parse(parseMetadata));
|
|
1512
1493
|
}
|
|
1513
1494
|
|
|
1514
|
-
export function
|
|
1495
|
+
export function parseMetadataFromJSON(
|
|
1515
1496
|
jsonString: string,
|
|
1516
|
-
): SafeParseResult<
|
|
1497
|
+
): SafeParseResult<ParseMetadata, SDKValidationError> {
|
|
1517
1498
|
return safeParse(
|
|
1518
1499
|
jsonString,
|
|
1519
|
-
(x) =>
|
|
1520
|
-
`Failed to parse '
|
|
1500
|
+
(x) => ParseMetadata$inboundSchema.parse(JSON.parse(x)),
|
|
1501
|
+
`Failed to parse 'ParseMetadata' from JSON`,
|
|
1521
1502
|
);
|
|
1522
1503
|
}
|
|
1523
1504
|
|
|
@@ -1526,14 +1507,14 @@ export const Chunks$inboundSchema: z.ZodType<Chunks, z.ZodTypeDef, unknown> = z
|
|
|
1526
1507
|
.object({
|
|
1527
1508
|
text: z.string(),
|
|
1528
1509
|
index: z.number(),
|
|
1529
|
-
metadata: z.lazy(() =>
|
|
1510
|
+
metadata: z.lazy(() => ParseMetadata$inboundSchema).optional(),
|
|
1530
1511
|
});
|
|
1531
1512
|
|
|
1532
1513
|
/** @internal */
|
|
1533
1514
|
export type Chunks$Outbound = {
|
|
1534
1515
|
text: string;
|
|
1535
1516
|
index: number;
|
|
1536
|
-
metadata?:
|
|
1517
|
+
metadata?: ParseMetadata$Outbound | undefined;
|
|
1537
1518
|
};
|
|
1538
1519
|
|
|
1539
1520
|
/** @internal */
|
|
@@ -1544,7 +1525,7 @@ export const Chunks$outboundSchema: z.ZodType<
|
|
|
1544
1525
|
> = z.object({
|
|
1545
1526
|
text: z.string(),
|
|
1546
1527
|
index: z.number(),
|
|
1547
|
-
metadata: z.lazy(() =>
|
|
1528
|
+
metadata: z.lazy(() => ParseMetadata$outboundSchema).optional(),
|
|
1548
1529
|
});
|
|
1549
1530
|
|
|
1550
1531
|
/**
|
|
@@ -1575,8 +1556,8 @@ export function chunksFromJSON(
|
|
|
1575
1556
|
}
|
|
1576
1557
|
|
|
1577
1558
|
/** @internal */
|
|
1578
|
-
export const
|
|
1579
|
-
|
|
1559
|
+
export const ParseResponseBody$inboundSchema: z.ZodType<
|
|
1560
|
+
ParseResponseBody,
|
|
1580
1561
|
z.ZodTypeDef,
|
|
1581
1562
|
unknown
|
|
1582
1563
|
> = z.object({
|
|
@@ -1584,15 +1565,15 @@ export const ChunkTextResponseBody$inboundSchema: z.ZodType<
|
|
|
1584
1565
|
});
|
|
1585
1566
|
|
|
1586
1567
|
/** @internal */
|
|
1587
|
-
export type
|
|
1568
|
+
export type ParseResponseBody$Outbound = {
|
|
1588
1569
|
chunks: Array<Chunks$Outbound>;
|
|
1589
1570
|
};
|
|
1590
1571
|
|
|
1591
1572
|
/** @internal */
|
|
1592
|
-
export const
|
|
1593
|
-
|
|
1573
|
+
export const ParseResponseBody$outboundSchema: z.ZodType<
|
|
1574
|
+
ParseResponseBody$Outbound,
|
|
1594
1575
|
z.ZodTypeDef,
|
|
1595
|
-
|
|
1576
|
+
ParseResponseBody
|
|
1596
1577
|
> = z.object({
|
|
1597
1578
|
chunks: z.array(z.lazy(() => Chunks$outboundSchema)),
|
|
1598
1579
|
});
|
|
@@ -1601,29 +1582,29 @@ export const ChunkTextResponseBody$outboundSchema: z.ZodType<
|
|
|
1601
1582
|
* @internal
|
|
1602
1583
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
1603
1584
|
*/
|
|
1604
|
-
export namespace
|
|
1605
|
-
/** @deprecated use `
|
|
1606
|
-
export const inboundSchema =
|
|
1607
|
-
/** @deprecated use `
|
|
1608
|
-
export const outboundSchema =
|
|
1609
|
-
/** @deprecated use `
|
|
1610
|
-
export type Outbound =
|
|
1585
|
+
export namespace ParseResponseBody$ {
|
|
1586
|
+
/** @deprecated use `ParseResponseBody$inboundSchema` instead. */
|
|
1587
|
+
export const inboundSchema = ParseResponseBody$inboundSchema;
|
|
1588
|
+
/** @deprecated use `ParseResponseBody$outboundSchema` instead. */
|
|
1589
|
+
export const outboundSchema = ParseResponseBody$outboundSchema;
|
|
1590
|
+
/** @deprecated use `ParseResponseBody$Outbound` instead. */
|
|
1591
|
+
export type Outbound = ParseResponseBody$Outbound;
|
|
1611
1592
|
}
|
|
1612
1593
|
|
|
1613
|
-
export function
|
|
1614
|
-
|
|
1594
|
+
export function parseResponseBodyToJSON(
|
|
1595
|
+
parseResponseBody: ParseResponseBody,
|
|
1615
1596
|
): string {
|
|
1616
1597
|
return JSON.stringify(
|
|
1617
|
-
|
|
1598
|
+
ParseResponseBody$outboundSchema.parse(parseResponseBody),
|
|
1618
1599
|
);
|
|
1619
1600
|
}
|
|
1620
1601
|
|
|
1621
|
-
export function
|
|
1602
|
+
export function parseResponseBodyFromJSON(
|
|
1622
1603
|
jsonString: string,
|
|
1623
|
-
): SafeParseResult<
|
|
1604
|
+
): SafeParseResult<ParseResponseBody, SDKValidationError> {
|
|
1624
1605
|
return safeParse(
|
|
1625
1606
|
jsonString,
|
|
1626
|
-
(x) =>
|
|
1627
|
-
`Failed to parse '
|
|
1607
|
+
(x) => ParseResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
1608
|
+
`Failed to parse 'ParseResponseBody' from JSON`,
|
|
1628
1609
|
);
|
|
1629
1610
|
}
|