@orq-ai/node 3.2.12 → 3.2.13
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 +32 -32
- package/bin/mcp-server.js.map +17 -17
- 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/bulkcreatedatapoints.js +2 -2
- package/models/operations/createcontact.js +2 -2
- package/models/operations/createdataset.js +2 -2
- package/models/operations/createdatasetitem.js +2 -2
- package/models/operations/fileget.js +2 -2
- package/models/operations/filelist.js +2 -2
- package/models/operations/fileupload.js +2 -2
- package/models/operations/listdatasetdatapoints.js +2 -2
- package/models/operations/listdatasets.js +2 -2
- package/models/operations/retrievedatapoint.js +2 -2
- package/models/operations/retrievedataset.js +2 -2
- package/models/operations/updatedatapoint.js +2 -2
- package/models/operations/updatedataset.js +2 -2
- package/package.json +1 -1
- package/packages/orq-rc/README.md +4 -2
- package/packages/orq-rc/docs/sdks/datasets/README.md +6 -0
- package/packages/orq-rc/docs/sdks/knowledge/README.md +140 -58
- package/packages/orq-rc/docs/sdks/prompts/README.md +6 -0
- 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/contactsCreate.ts +1 -1
- package/packages/orq-rc/src/funcs/datasetsClear.ts +1 -1
- package/packages/orq-rc/src/funcs/datasetsCreate.ts +1 -1
- package/packages/orq-rc/src/funcs/datasetsCreateDatapoint.ts +1 -1
- package/packages/orq-rc/src/funcs/datasetsCreateDatapoints.ts +1 -1
- package/packages/orq-rc/src/funcs/datasetsDelete.ts +1 -1
- package/packages/orq-rc/src/funcs/datasetsDeleteDatapoint.ts +1 -1
- package/packages/orq-rc/src/funcs/datasetsList.ts +1 -1
- package/packages/orq-rc/src/funcs/datasetsListDatapoints.ts +1 -1
- package/packages/orq-rc/src/funcs/datasetsRetrieve.ts +1 -1
- package/packages/orq-rc/src/funcs/datasetsRetrieveDatapoint.ts +1 -1
- package/packages/orq-rc/src/funcs/datasetsUpdate.ts +1 -1
- package/packages/orq-rc/src/funcs/datasetsUpdateDatapoint.ts +1 -1
- package/packages/orq-rc/src/funcs/deploymentsGetConfig.ts +1 -1
- package/packages/orq-rc/src/funcs/deploymentsInvoke.ts +1 -1
- package/packages/orq-rc/src/funcs/deploymentsList.ts +1 -1
- package/packages/orq-rc/src/funcs/deploymentsMetricsCreate.ts +1 -1
- package/packages/orq-rc/src/funcs/deploymentsStream.ts +1 -1
- package/packages/orq-rc/src/funcs/feedbackCreate.ts +1 -1
- package/packages/orq-rc/src/funcs/filesCreate.ts +1 -1
- package/packages/orq-rc/src/funcs/filesDelete.ts +1 -1
- package/packages/orq-rc/src/funcs/filesGet.ts +1 -1
- package/packages/orq-rc/src/funcs/filesList.ts +1 -1
- package/packages/orq-rc/src/funcs/knowledgeCreate.ts +1 -1
- package/packages/orq-rc/src/funcs/knowledgeCreateChunks.ts +1 -1
- package/packages/orq-rc/src/funcs/knowledgeCreateDatasource.ts +1 -1
- package/packages/orq-rc/src/funcs/knowledgeDelete.ts +1 -1
- package/packages/orq-rc/src/funcs/knowledgeDeleteChunk.ts +1 -1
- package/packages/orq-rc/src/funcs/knowledgeDeleteDatasource.ts +1 -1
- package/packages/orq-rc/src/funcs/knowledgeList.ts +1 -1
- package/packages/orq-rc/src/funcs/knowledgeListChunks.ts +1 -1
- package/packages/orq-rc/src/funcs/knowledgeListDatasources.ts +1 -1
- package/packages/orq-rc/src/funcs/knowledgeRetrieve.ts +1 -1
- package/packages/orq-rc/src/funcs/{knowledgeRetrieveFileUrl.ts → knowledgeRetrieveChunk.ts} +25 -34
- package/packages/orq-rc/src/funcs/knowledgeRetrieveDatasource.ts +1 -1
- package/packages/orq-rc/src/funcs/knowledgeSearch.ts +1 -1
- package/packages/orq-rc/src/funcs/knowledgeUpdate.ts +1 -1
- package/packages/orq-rc/src/funcs/knowledgeUpdateChunk.ts +1 -1
- package/packages/orq-rc/src/funcs/knowledgeUpdateDatasource.ts +164 -0
- package/packages/orq-rc/src/funcs/promptsCreate.ts +1 -1
- package/packages/orq-rc/src/funcs/promptsDelete.ts +1 -1
- package/packages/orq-rc/src/funcs/promptsGetVersion.ts +1 -1
- package/packages/orq-rc/src/funcs/promptsList.ts +1 -1
- package/packages/orq-rc/src/funcs/promptsListVersions.ts +1 -1
- package/packages/orq-rc/src/funcs/promptsRetrieve.ts +1 -1
- package/packages/orq-rc/src/funcs/promptsUpdate.ts +1 -1
- package/packages/orq-rc/src/funcs/remoteconfigsRetrieve.ts +1 -1
- 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/{knowledgeRetrieveFileUrl.ts → knowledgeRetrieveChunk.ts} +6 -6
- package/packages/orq-rc/src/mcp-server/tools/knowledgeUpdateDatasource.ts +35 -0
- package/packages/orq-rc/src/models/operations/bulkcreatedatapoints.ts +2 -2
- package/packages/orq-rc/src/models/operations/createchunk.ts +2 -2
- 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/createknowledge.ts +324 -2562
- 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/getonechunk.ts +265 -0
- package/packages/orq-rc/src/models/operations/getoneknowledge.ts +101 -1282
- package/packages/orq-rc/src/models/operations/index.ts +2 -1
- 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/listknowledgebases.ts +101 -1309
- 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/updatedatapoint.ts +2 -2
- package/packages/orq-rc/src/models/operations/updatedataset.ts +25 -6
- package/packages/orq-rc/src/models/operations/updatedatasource.ts +345 -0
- package/packages/orq-rc/src/models/operations/updateknowledge.ts +383 -2710
- package/packages/orq-rc/src/models/operations/updateprompt.ts +7 -0
- package/packages/orq-rc/src/sdk/knowledge.ts +30 -15
- 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/bulkcreatedatapoints.ts +2 -2
- 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/fileget.ts +2 -2
- package/src/models/operations/filelist.ts +2 -2
- package/src/models/operations/fileupload.ts +2 -2
- package/src/models/operations/listdatasetdatapoints.ts +2 -2
- package/src/models/operations/listdatasets.ts +2 -2
- package/src/models/operations/retrievedatapoint.ts +2 -2
- package/src/models/operations/retrievedataset.ts +2 -2
- package/src/models/operations/updatedatapoint.ts +2 -2
- package/src/models/operations/updatedataset.ts +2 -2
- package/packages/orq-rc/src/models/operations/getonefileuploadurl.ts +0 -157
|
@@ -834,7 +834,7 @@ export const RetrieveDatapointResponseBody$inboundSchema: z.ZodType<
|
|
|
834
834
|
created: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
835
835
|
.optional(),
|
|
836
836
|
updated: z.string().datetime({ offset: true }).default(
|
|
837
|
-
"2025-
|
|
837
|
+
"2025-04-01T11:18:13.725Z",
|
|
838
838
|
).transform(v => new Date(v)),
|
|
839
839
|
}).transform((v) => {
|
|
840
840
|
return remap$(v, {
|
|
@@ -877,7 +877,7 @@ export const RetrieveDatapointResponseBody$outboundSchema: z.ZodType<
|
|
|
877
877
|
createdById: z.string().optional(),
|
|
878
878
|
updatedById: z.string().optional(),
|
|
879
879
|
created: z.date().transform(v => v.toISOString()).optional(),
|
|
880
|
-
updated: z.date().default(() => new Date("2025-
|
|
880
|
+
updated: z.date().default(() => new Date("2025-04-01T11:18:13.725Z"))
|
|
881
881
|
.transform(v => v.toISOString()),
|
|
882
882
|
}).transform((v) => {
|
|
883
883
|
return remap$(v, {
|
|
@@ -201,7 +201,7 @@ export const RetrieveDatasetResponseBody$inboundSchema: z.ZodType<
|
|
|
201
201
|
created: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
202
202
|
.optional(),
|
|
203
203
|
updated: z.string().datetime({ offset: true }).default(
|
|
204
|
-
"2025-
|
|
204
|
+
"2025-04-01T11:18:13.725Z",
|
|
205
205
|
).transform(v => new Date(v)),
|
|
206
206
|
}).transform((v) => {
|
|
207
207
|
return remap$(v, {
|
|
@@ -241,7 +241,7 @@ export const RetrieveDatasetResponseBody$outboundSchema: z.ZodType<
|
|
|
241
241
|
updatedById: z.string().optional(),
|
|
242
242
|
metadata: z.lazy(() => RetrieveDatasetMetadata$outboundSchema),
|
|
243
243
|
created: z.date().transform(v => v.toISOString()).optional(),
|
|
244
|
-
updated: z.date().default(() => new Date("2025-
|
|
244
|
+
updated: z.date().default(() => new Date("2025-04-01T11:18:13.725Z"))
|
|
245
245
|
.transform(v => v.toISOString()),
|
|
246
246
|
}).transform((v) => {
|
|
247
247
|
return remap$(v, {
|
|
@@ -172,7 +172,7 @@ export const RetrieveDatasourceResponseBody$inboundSchema: z.ZodType<
|
|
|
172
172
|
z.ZodTypeDef,
|
|
173
173
|
unknown
|
|
174
174
|
> = z.object({
|
|
175
|
-
_id: z.string().default("
|
|
175
|
+
_id: z.string().default("01JQRH5PKFE97N2FFWZVB2K9MK"),
|
|
176
176
|
display_name: z.string(),
|
|
177
177
|
description: z.string().optional(),
|
|
178
178
|
status: RetrieveDatasourceStatus$inboundSchema,
|
|
@@ -216,7 +216,7 @@ export const RetrieveDatasourceResponseBody$outboundSchema: z.ZodType<
|
|
|
216
216
|
z.ZodTypeDef,
|
|
217
217
|
RetrieveDatasourceResponseBody
|
|
218
218
|
> = z.object({
|
|
219
|
-
id: z.string().default("
|
|
219
|
+
id: z.string().default("01JQRH5PKFE97N2FFWZVB2K9MK"),
|
|
220
220
|
displayName: z.string(),
|
|
221
221
|
description: z.string().optional(),
|
|
222
222
|
status: RetrieveDatasourceStatus$outboundSchema,
|
|
@@ -1638,7 +1638,7 @@ export const UpdateDatapointResponseBody$inboundSchema: z.ZodType<
|
|
|
1638
1638
|
created: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
1639
1639
|
.optional(),
|
|
1640
1640
|
updated: z.string().datetime({ offset: true }).default(
|
|
1641
|
-
"2025-
|
|
1641
|
+
"2025-04-01T11:18:13.725Z",
|
|
1642
1642
|
).transform(v => new Date(v)),
|
|
1643
1643
|
}).transform((v) => {
|
|
1644
1644
|
return remap$(v, {
|
|
@@ -1682,7 +1682,7 @@ export const UpdateDatapointResponseBody$outboundSchema: z.ZodType<
|
|
|
1682
1682
|
createdById: z.string().optional(),
|
|
1683
1683
|
updatedById: z.string().optional(),
|
|
1684
1684
|
created: z.date().transform(v => v.toISOString()).optional(),
|
|
1685
|
-
updated: z.date().default(() => new Date("2025-
|
|
1685
|
+
updated: z.date().default(() => new Date("2025-04-01T11:18:13.725Z"))
|
|
1686
1686
|
.transform(v => v.toISOString()),
|
|
1687
1687
|
}).transform((v) => {
|
|
1688
1688
|
return remap$(v, {
|
|
@@ -9,7 +9,18 @@ import { Result as SafeParseResult } from "../../types/fp.js";
|
|
|
9
9
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
10
|
|
|
11
11
|
export type UpdateDatasetRequestBody = {
|
|
12
|
-
|
|
12
|
+
/**
|
|
13
|
+
* The display name of the dataset
|
|
14
|
+
*/
|
|
15
|
+
displayName?: string | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* The unique identifier of the project it belongs to
|
|
18
|
+
*/
|
|
19
|
+
projectId?: string | undefined;
|
|
20
|
+
/**
|
|
21
|
+
* The path where the entity is stored in the project structure. The first element of the path always represents the project name. Any subsequent path element after the project will be created as a folder in the project if it does not exists.
|
|
22
|
+
*/
|
|
23
|
+
path?: string | undefined;
|
|
13
24
|
};
|
|
14
25
|
|
|
15
26
|
export type UpdateDatasetRequest = {
|
|
@@ -75,16 +86,21 @@ export const UpdateDatasetRequestBody$inboundSchema: z.ZodType<
|
|
|
75
86
|
z.ZodTypeDef,
|
|
76
87
|
unknown
|
|
77
88
|
> = z.object({
|
|
78
|
-
display_name: z.string(),
|
|
89
|
+
display_name: z.string().optional(),
|
|
90
|
+
project_id: z.string().optional(),
|
|
91
|
+
path: z.string().optional(),
|
|
79
92
|
}).transform((v) => {
|
|
80
93
|
return remap$(v, {
|
|
81
94
|
"display_name": "displayName",
|
|
95
|
+
"project_id": "projectId",
|
|
82
96
|
});
|
|
83
97
|
});
|
|
84
98
|
|
|
85
99
|
/** @internal */
|
|
86
100
|
export type UpdateDatasetRequestBody$Outbound = {
|
|
87
|
-
display_name
|
|
101
|
+
display_name?: string | undefined;
|
|
102
|
+
project_id?: string | undefined;
|
|
103
|
+
path?: string | undefined;
|
|
88
104
|
};
|
|
89
105
|
|
|
90
106
|
/** @internal */
|
|
@@ -93,10 +109,13 @@ export const UpdateDatasetRequestBody$outboundSchema: z.ZodType<
|
|
|
93
109
|
z.ZodTypeDef,
|
|
94
110
|
UpdateDatasetRequestBody
|
|
95
111
|
> = z.object({
|
|
96
|
-
displayName: z.string(),
|
|
112
|
+
displayName: z.string().optional(),
|
|
113
|
+
projectId: z.string().optional(),
|
|
114
|
+
path: z.string().optional(),
|
|
97
115
|
}).transform((v) => {
|
|
98
116
|
return remap$(v, {
|
|
99
117
|
displayName: "display_name",
|
|
118
|
+
projectId: "project_id",
|
|
100
119
|
});
|
|
101
120
|
});
|
|
102
121
|
|
|
@@ -283,7 +302,7 @@ export const UpdateDatasetResponseBody$inboundSchema: z.ZodType<
|
|
|
283
302
|
created: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
284
303
|
.optional(),
|
|
285
304
|
updated: z.string().datetime({ offset: true }).default(
|
|
286
|
-
"2025-
|
|
305
|
+
"2025-04-01T11:18:13.725Z",
|
|
287
306
|
).transform(v => new Date(v)),
|
|
288
307
|
}).transform((v) => {
|
|
289
308
|
return remap$(v, {
|
|
@@ -328,7 +347,7 @@ export const UpdateDatasetResponseBody$outboundSchema: z.ZodType<
|
|
|
328
347
|
parentId: z.string().optional(),
|
|
329
348
|
version: z.string().optional(),
|
|
330
349
|
created: z.date().transform(v => v.toISOString()).optional(),
|
|
331
|
-
updated: z.date().default(() => new Date("2025-
|
|
350
|
+
updated: z.date().default(() => new Date("2025-04-01T11:18:13.725Z"))
|
|
332
351
|
.transform(v => v.toISOString()),
|
|
333
352
|
}).transform((v) => {
|
|
334
353
|
return remap$(v, {
|
|
@@ -0,0 +1,345 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
9
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
export type UpdateDatasourceRequestBody = {
|
|
13
|
+
displayName: string;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export type UpdateDatasourceRequest = {
|
|
17
|
+
/**
|
|
18
|
+
* The unique identifier of the knowledge base
|
|
19
|
+
*/
|
|
20
|
+
knowledgeId: string;
|
|
21
|
+
/**
|
|
22
|
+
* The unique identifier of the datasource.
|
|
23
|
+
*/
|
|
24
|
+
datasourceId: string;
|
|
25
|
+
requestBody: UpdateDatasourceRequestBody;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export const UpdateDatasourceStatus = {
|
|
29
|
+
Pending: "pending",
|
|
30
|
+
Processing: "processing",
|
|
31
|
+
Completed: "completed",
|
|
32
|
+
Failed: "failed",
|
|
33
|
+
Queued: "queued",
|
|
34
|
+
} as const;
|
|
35
|
+
export type UpdateDatasourceStatus = ClosedEnum<typeof UpdateDatasourceStatus>;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Datasource successfully updated
|
|
39
|
+
*/
|
|
40
|
+
export type UpdateDatasourceResponseBody = {
|
|
41
|
+
/**
|
|
42
|
+
* The id of the resource
|
|
43
|
+
*/
|
|
44
|
+
id?: string | undefined;
|
|
45
|
+
/**
|
|
46
|
+
* The display name of the datasource. Normally the name of the uploaded file
|
|
47
|
+
*/
|
|
48
|
+
displayName: string;
|
|
49
|
+
/**
|
|
50
|
+
* The description of the knowledge base
|
|
51
|
+
*/
|
|
52
|
+
description?: string | undefined;
|
|
53
|
+
status: UpdateDatasourceStatus;
|
|
54
|
+
/**
|
|
55
|
+
* The unique identifier of the file used to create the datasource.
|
|
56
|
+
*/
|
|
57
|
+
fileId?: string | null | undefined;
|
|
58
|
+
/**
|
|
59
|
+
* The date and time the datasource was created
|
|
60
|
+
*/
|
|
61
|
+
created: string;
|
|
62
|
+
/**
|
|
63
|
+
* The date and time the datasource was updated
|
|
64
|
+
*/
|
|
65
|
+
updated: string;
|
|
66
|
+
/**
|
|
67
|
+
* The id of the resource
|
|
68
|
+
*/
|
|
69
|
+
createdById?: string | undefined;
|
|
70
|
+
/**
|
|
71
|
+
* The id of the resource
|
|
72
|
+
*/
|
|
73
|
+
updateById?: string | undefined;
|
|
74
|
+
/**
|
|
75
|
+
* The unique identifier of the knowledge base
|
|
76
|
+
*/
|
|
77
|
+
knowledgeId: string;
|
|
78
|
+
/**
|
|
79
|
+
* The number of chunks in the datasource
|
|
80
|
+
*/
|
|
81
|
+
chunksCount: number;
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
/** @internal */
|
|
85
|
+
export const UpdateDatasourceRequestBody$inboundSchema: z.ZodType<
|
|
86
|
+
UpdateDatasourceRequestBody,
|
|
87
|
+
z.ZodTypeDef,
|
|
88
|
+
unknown
|
|
89
|
+
> = z.object({
|
|
90
|
+
display_name: z.string(),
|
|
91
|
+
}).transform((v) => {
|
|
92
|
+
return remap$(v, {
|
|
93
|
+
"display_name": "displayName",
|
|
94
|
+
});
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
/** @internal */
|
|
98
|
+
export type UpdateDatasourceRequestBody$Outbound = {
|
|
99
|
+
display_name: string;
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
/** @internal */
|
|
103
|
+
export const UpdateDatasourceRequestBody$outboundSchema: z.ZodType<
|
|
104
|
+
UpdateDatasourceRequestBody$Outbound,
|
|
105
|
+
z.ZodTypeDef,
|
|
106
|
+
UpdateDatasourceRequestBody
|
|
107
|
+
> = z.object({
|
|
108
|
+
displayName: z.string(),
|
|
109
|
+
}).transform((v) => {
|
|
110
|
+
return remap$(v, {
|
|
111
|
+
displayName: "display_name",
|
|
112
|
+
});
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* @internal
|
|
117
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
118
|
+
*/
|
|
119
|
+
export namespace UpdateDatasourceRequestBody$ {
|
|
120
|
+
/** @deprecated use `UpdateDatasourceRequestBody$inboundSchema` instead. */
|
|
121
|
+
export const inboundSchema = UpdateDatasourceRequestBody$inboundSchema;
|
|
122
|
+
/** @deprecated use `UpdateDatasourceRequestBody$outboundSchema` instead. */
|
|
123
|
+
export const outboundSchema = UpdateDatasourceRequestBody$outboundSchema;
|
|
124
|
+
/** @deprecated use `UpdateDatasourceRequestBody$Outbound` instead. */
|
|
125
|
+
export type Outbound = UpdateDatasourceRequestBody$Outbound;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
export function updateDatasourceRequestBodyToJSON(
|
|
129
|
+
updateDatasourceRequestBody: UpdateDatasourceRequestBody,
|
|
130
|
+
): string {
|
|
131
|
+
return JSON.stringify(
|
|
132
|
+
UpdateDatasourceRequestBody$outboundSchema.parse(
|
|
133
|
+
updateDatasourceRequestBody,
|
|
134
|
+
),
|
|
135
|
+
);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
export function updateDatasourceRequestBodyFromJSON(
|
|
139
|
+
jsonString: string,
|
|
140
|
+
): SafeParseResult<UpdateDatasourceRequestBody, SDKValidationError> {
|
|
141
|
+
return safeParse(
|
|
142
|
+
jsonString,
|
|
143
|
+
(x) => UpdateDatasourceRequestBody$inboundSchema.parse(JSON.parse(x)),
|
|
144
|
+
`Failed to parse 'UpdateDatasourceRequestBody' from JSON`,
|
|
145
|
+
);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/** @internal */
|
|
149
|
+
export const UpdateDatasourceRequest$inboundSchema: z.ZodType<
|
|
150
|
+
UpdateDatasourceRequest,
|
|
151
|
+
z.ZodTypeDef,
|
|
152
|
+
unknown
|
|
153
|
+
> = z.object({
|
|
154
|
+
knowledge_id: z.string(),
|
|
155
|
+
datasource_id: z.string(),
|
|
156
|
+
RequestBody: z.lazy(() => UpdateDatasourceRequestBody$inboundSchema),
|
|
157
|
+
}).transform((v) => {
|
|
158
|
+
return remap$(v, {
|
|
159
|
+
"knowledge_id": "knowledgeId",
|
|
160
|
+
"datasource_id": "datasourceId",
|
|
161
|
+
"RequestBody": "requestBody",
|
|
162
|
+
});
|
|
163
|
+
});
|
|
164
|
+
|
|
165
|
+
/** @internal */
|
|
166
|
+
export type UpdateDatasourceRequest$Outbound = {
|
|
167
|
+
knowledge_id: string;
|
|
168
|
+
datasource_id: string;
|
|
169
|
+
RequestBody: UpdateDatasourceRequestBody$Outbound;
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
/** @internal */
|
|
173
|
+
export const UpdateDatasourceRequest$outboundSchema: z.ZodType<
|
|
174
|
+
UpdateDatasourceRequest$Outbound,
|
|
175
|
+
z.ZodTypeDef,
|
|
176
|
+
UpdateDatasourceRequest
|
|
177
|
+
> = z.object({
|
|
178
|
+
knowledgeId: z.string(),
|
|
179
|
+
datasourceId: z.string(),
|
|
180
|
+
requestBody: z.lazy(() => UpdateDatasourceRequestBody$outboundSchema),
|
|
181
|
+
}).transform((v) => {
|
|
182
|
+
return remap$(v, {
|
|
183
|
+
knowledgeId: "knowledge_id",
|
|
184
|
+
datasourceId: "datasource_id",
|
|
185
|
+
requestBody: "RequestBody",
|
|
186
|
+
});
|
|
187
|
+
});
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* @internal
|
|
191
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
192
|
+
*/
|
|
193
|
+
export namespace UpdateDatasourceRequest$ {
|
|
194
|
+
/** @deprecated use `UpdateDatasourceRequest$inboundSchema` instead. */
|
|
195
|
+
export const inboundSchema = UpdateDatasourceRequest$inboundSchema;
|
|
196
|
+
/** @deprecated use `UpdateDatasourceRequest$outboundSchema` instead. */
|
|
197
|
+
export const outboundSchema = UpdateDatasourceRequest$outboundSchema;
|
|
198
|
+
/** @deprecated use `UpdateDatasourceRequest$Outbound` instead. */
|
|
199
|
+
export type Outbound = UpdateDatasourceRequest$Outbound;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
export function updateDatasourceRequestToJSON(
|
|
203
|
+
updateDatasourceRequest: UpdateDatasourceRequest,
|
|
204
|
+
): string {
|
|
205
|
+
return JSON.stringify(
|
|
206
|
+
UpdateDatasourceRequest$outboundSchema.parse(updateDatasourceRequest),
|
|
207
|
+
);
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
export function updateDatasourceRequestFromJSON(
|
|
211
|
+
jsonString: string,
|
|
212
|
+
): SafeParseResult<UpdateDatasourceRequest, SDKValidationError> {
|
|
213
|
+
return safeParse(
|
|
214
|
+
jsonString,
|
|
215
|
+
(x) => UpdateDatasourceRequest$inboundSchema.parse(JSON.parse(x)),
|
|
216
|
+
`Failed to parse 'UpdateDatasourceRequest' from JSON`,
|
|
217
|
+
);
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
/** @internal */
|
|
221
|
+
export const UpdateDatasourceStatus$inboundSchema: z.ZodNativeEnum<
|
|
222
|
+
typeof UpdateDatasourceStatus
|
|
223
|
+
> = z.nativeEnum(UpdateDatasourceStatus);
|
|
224
|
+
|
|
225
|
+
/** @internal */
|
|
226
|
+
export const UpdateDatasourceStatus$outboundSchema: z.ZodNativeEnum<
|
|
227
|
+
typeof UpdateDatasourceStatus
|
|
228
|
+
> = UpdateDatasourceStatus$inboundSchema;
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* @internal
|
|
232
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
233
|
+
*/
|
|
234
|
+
export namespace UpdateDatasourceStatus$ {
|
|
235
|
+
/** @deprecated use `UpdateDatasourceStatus$inboundSchema` instead. */
|
|
236
|
+
export const inboundSchema = UpdateDatasourceStatus$inboundSchema;
|
|
237
|
+
/** @deprecated use `UpdateDatasourceStatus$outboundSchema` instead. */
|
|
238
|
+
export const outboundSchema = UpdateDatasourceStatus$outboundSchema;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
/** @internal */
|
|
242
|
+
export const UpdateDatasourceResponseBody$inboundSchema: z.ZodType<
|
|
243
|
+
UpdateDatasourceResponseBody,
|
|
244
|
+
z.ZodTypeDef,
|
|
245
|
+
unknown
|
|
246
|
+
> = z.object({
|
|
247
|
+
_id: z.string().default("01JQRH5PKGWXXC5X93WTVNDNP6"),
|
|
248
|
+
display_name: z.string(),
|
|
249
|
+
description: z.string().optional(),
|
|
250
|
+
status: UpdateDatasourceStatus$inboundSchema,
|
|
251
|
+
file_id: z.nullable(z.string()).optional(),
|
|
252
|
+
created: z.string(),
|
|
253
|
+
updated: z.string(),
|
|
254
|
+
created_by_id: z.string().optional(),
|
|
255
|
+
update_by_id: z.string().optional(),
|
|
256
|
+
knowledge_id: z.string(),
|
|
257
|
+
chunks_count: z.number(),
|
|
258
|
+
}).transform((v) => {
|
|
259
|
+
return remap$(v, {
|
|
260
|
+
"_id": "id",
|
|
261
|
+
"display_name": "displayName",
|
|
262
|
+
"file_id": "fileId",
|
|
263
|
+
"created_by_id": "createdById",
|
|
264
|
+
"update_by_id": "updateById",
|
|
265
|
+
"knowledge_id": "knowledgeId",
|
|
266
|
+
"chunks_count": "chunksCount",
|
|
267
|
+
});
|
|
268
|
+
});
|
|
269
|
+
|
|
270
|
+
/** @internal */
|
|
271
|
+
export type UpdateDatasourceResponseBody$Outbound = {
|
|
272
|
+
_id: string;
|
|
273
|
+
display_name: string;
|
|
274
|
+
description?: string | undefined;
|
|
275
|
+
status: string;
|
|
276
|
+
file_id?: string | null | undefined;
|
|
277
|
+
created: string;
|
|
278
|
+
updated: string;
|
|
279
|
+
created_by_id?: string | undefined;
|
|
280
|
+
update_by_id?: string | undefined;
|
|
281
|
+
knowledge_id: string;
|
|
282
|
+
chunks_count: number;
|
|
283
|
+
};
|
|
284
|
+
|
|
285
|
+
/** @internal */
|
|
286
|
+
export const UpdateDatasourceResponseBody$outboundSchema: z.ZodType<
|
|
287
|
+
UpdateDatasourceResponseBody$Outbound,
|
|
288
|
+
z.ZodTypeDef,
|
|
289
|
+
UpdateDatasourceResponseBody
|
|
290
|
+
> = z.object({
|
|
291
|
+
id: z.string().default("01JQRH5PKGWXXC5X93WTVNDNP6"),
|
|
292
|
+
displayName: z.string(),
|
|
293
|
+
description: z.string().optional(),
|
|
294
|
+
status: UpdateDatasourceStatus$outboundSchema,
|
|
295
|
+
fileId: z.nullable(z.string()).optional(),
|
|
296
|
+
created: z.string(),
|
|
297
|
+
updated: z.string(),
|
|
298
|
+
createdById: z.string().optional(),
|
|
299
|
+
updateById: z.string().optional(),
|
|
300
|
+
knowledgeId: z.string(),
|
|
301
|
+
chunksCount: z.number(),
|
|
302
|
+
}).transform((v) => {
|
|
303
|
+
return remap$(v, {
|
|
304
|
+
id: "_id",
|
|
305
|
+
displayName: "display_name",
|
|
306
|
+
fileId: "file_id",
|
|
307
|
+
createdById: "created_by_id",
|
|
308
|
+
updateById: "update_by_id",
|
|
309
|
+
knowledgeId: "knowledge_id",
|
|
310
|
+
chunksCount: "chunks_count",
|
|
311
|
+
});
|
|
312
|
+
});
|
|
313
|
+
|
|
314
|
+
/**
|
|
315
|
+
* @internal
|
|
316
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
317
|
+
*/
|
|
318
|
+
export namespace UpdateDatasourceResponseBody$ {
|
|
319
|
+
/** @deprecated use `UpdateDatasourceResponseBody$inboundSchema` instead. */
|
|
320
|
+
export const inboundSchema = UpdateDatasourceResponseBody$inboundSchema;
|
|
321
|
+
/** @deprecated use `UpdateDatasourceResponseBody$outboundSchema` instead. */
|
|
322
|
+
export const outboundSchema = UpdateDatasourceResponseBody$outboundSchema;
|
|
323
|
+
/** @deprecated use `UpdateDatasourceResponseBody$Outbound` instead. */
|
|
324
|
+
export type Outbound = UpdateDatasourceResponseBody$Outbound;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
export function updateDatasourceResponseBodyToJSON(
|
|
328
|
+
updateDatasourceResponseBody: UpdateDatasourceResponseBody,
|
|
329
|
+
): string {
|
|
330
|
+
return JSON.stringify(
|
|
331
|
+
UpdateDatasourceResponseBody$outboundSchema.parse(
|
|
332
|
+
updateDatasourceResponseBody,
|
|
333
|
+
),
|
|
334
|
+
);
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
export function updateDatasourceResponseBodyFromJSON(
|
|
338
|
+
jsonString: string,
|
|
339
|
+
): SafeParseResult<UpdateDatasourceResponseBody, SDKValidationError> {
|
|
340
|
+
return safeParse(
|
|
341
|
+
jsonString,
|
|
342
|
+
(x) => UpdateDatasourceResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
343
|
+
`Failed to parse 'UpdateDatasourceResponseBody' from JSON`,
|
|
344
|
+
);
|
|
345
|
+
}
|