@orq-ai/node 3.2.9 → 3.2.11
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/hooks/types.d.ts +1 -1
- package/hooks/types.d.ts.map +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/lib/config.js.map +1 -1
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/mcp-server.js.map +1 -1
- package/mcp-server/server.js +1 -1
- package/mcp-server/server.js.map +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 +37 -1
- package/packages/orq-rc/docs/sdks/files/README.md +8 -2
- package/packages/orq-rc/docs/sdks/knowledge/README.md +1197 -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 +19 -22
- 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 +152 -0
- package/packages/orq-rc/src/funcs/knowledgeCreateChunks.ts +165 -0
- package/packages/orq-rc/src/funcs/knowledgeCreateDatasource.ts +160 -0
- package/packages/orq-rc/src/funcs/knowledgeDelete.ts +161 -0
- package/packages/orq-rc/src/funcs/knowledgeDeleteChunk.ts +168 -0
- package/packages/orq-rc/src/funcs/knowledgeDeleteDatasource.ts +167 -0
- package/packages/orq-rc/src/funcs/knowledgeList.ts +163 -0
- package/packages/orq-rc/src/funcs/knowledgeListChunks.ts +172 -0
- package/packages/orq-rc/src/funcs/knowledgeListDatasources.ts +168 -0
- package/packages/orq-rc/src/funcs/knowledgeRetrieve.ts +160 -0
- package/packages/orq-rc/src/funcs/knowledgeRetrieveDatasource.ts +163 -0
- package/packages/orq-rc/src/funcs/knowledgeRetrieveFileUrl.ts +176 -0
- package/packages/orq-rc/src/funcs/knowledgeSearch.ts +158 -0
- package/packages/orq-rc/src/funcs/knowledgeUpdate.ts +158 -0
- package/packages/orq-rc/src/funcs/knowledgeUpdateChunk.ts +168 -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/hooks/types.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 +31 -1
- package/packages/orq-rc/src/mcp-server/tools/filesCreate.ts +1 -1
- package/packages/orq-rc/src/mcp-server/tools/knowledgeCreate.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/knowledgeCreateChunks.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/knowledgeCreateDatasource.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/knowledgeDelete.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/knowledgeDeleteChunk.ts +33 -0
- package/packages/orq-rc/src/mcp-server/tools/knowledgeDeleteDatasource.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/knowledgeList.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/knowledgeListChunks.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/knowledgeListDatasources.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/knowledgeRetrieve.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/knowledgeRetrieveDatasource.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/knowledgeRetrieveFileUrl.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/knowledgeSearch.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/knowledgeUpdate.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/knowledgeUpdateChunk.ts +35 -0
- package/packages/orq-rc/src/models/operations/bulkcreatedatapoints.ts +2 -2
- package/packages/orq-rc/src/models/operations/createchunk.ts +680 -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 +852 -0
- package/packages/orq-rc/src/models/operations/createknowledge.ts +2920 -0
- package/packages/orq-rc/src/models/operations/createprompt.ts +6 -0
- package/packages/orq-rc/src/models/operations/deletechunk.ts +96 -0
- package/packages/orq-rc/src/models/operations/deletedatasource.ts +87 -0
- package/packages/orq-rc/src/models/operations/deleteknowledge.ts +78 -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 +6 -6
- package/packages/orq-rc/src/models/operations/getallprompts.ts +3 -0
- package/packages/orq-rc/src/models/operations/getonefileuploadurl.ts +157 -0
- package/packages/orq-rc/src/models/operations/getoneknowledge.ts +1631 -0
- package/packages/orq-rc/src/models/operations/getoneprompt.ts +3 -0
- package/packages/orq-rc/src/models/operations/getpromptversion.ts +3 -0
- package/packages/orq-rc/src/models/operations/index.ts +15 -0
- package/packages/orq-rc/src/models/operations/listchunks.ts +444 -0
- 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 +447 -0
- package/packages/orq-rc/src/models/operations/listknowledgebases.ts +1782 -0
- package/packages/orq-rc/src/models/operations/listpromptversions.ts +3 -0
- 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 +273 -0
- package/packages/orq-rc/src/models/operations/searchknowledge.ts +1673 -0
- package/packages/orq-rc/src/models/operations/updatechunk.ts +418 -0
- 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/updateknowledge.ts +3123 -0
- package/packages/orq-rc/src/models/operations/updateprompt.ts +6 -0
- package/packages/orq-rc/src/sdk/files.ts +1 -1
- package/packages/orq-rc/src/sdk/knowledge.ts +246 -0
- package/packages/orq-rc/src/sdk/sdk.ts +6 -0
- package/src/hooks/types.ts +1 -1
- 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
|
@@ -0,0 +1,418 @@
|
|
|
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
|
+
/**
|
|
13
|
+
* Metadata of the chunk
|
|
14
|
+
*/
|
|
15
|
+
export type UpdateChunkMetadata = {
|
|
16
|
+
/**
|
|
17
|
+
* In case you are using PDFs, Word, PowerPoint, etc. this is the page number of the chunk.
|
|
18
|
+
*/
|
|
19
|
+
pageNumber?: number | undefined;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export type UpdateChunkRequestBody = {
|
|
23
|
+
/**
|
|
24
|
+
* The text content of the chunk
|
|
25
|
+
*/
|
|
26
|
+
text?: string | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* The embedding vector of the chunk. If not provided the chunk will be embedded with the knowledge base embeddings model.
|
|
29
|
+
*/
|
|
30
|
+
embedding?: Array<number> | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* Metadata of the chunk
|
|
33
|
+
*/
|
|
34
|
+
metadata?: UpdateChunkMetadata | undefined;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export type UpdateChunkRequest = {
|
|
38
|
+
/**
|
|
39
|
+
* The unique identifier of the chunk
|
|
40
|
+
*/
|
|
41
|
+
chunkId: string;
|
|
42
|
+
/**
|
|
43
|
+
* The unique identifier of the data source
|
|
44
|
+
*/
|
|
45
|
+
datasourceId: string;
|
|
46
|
+
/**
|
|
47
|
+
* The unique identifier of the knowledge base
|
|
48
|
+
*/
|
|
49
|
+
knowledgeId: string;
|
|
50
|
+
requestBody?: UpdateChunkRequestBody | undefined;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* The status of the chunk
|
|
55
|
+
*/
|
|
56
|
+
export const UpdateChunkStatus = {
|
|
57
|
+
Pending: "pending",
|
|
58
|
+
Processing: "processing",
|
|
59
|
+
Completed: "completed",
|
|
60
|
+
Failed: "failed",
|
|
61
|
+
Queued: "queued",
|
|
62
|
+
} as const;
|
|
63
|
+
/**
|
|
64
|
+
* The status of the chunk
|
|
65
|
+
*/
|
|
66
|
+
export type UpdateChunkStatus = ClosedEnum<typeof UpdateChunkStatus>;
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Chunk successfully updated
|
|
70
|
+
*/
|
|
71
|
+
export type UpdateChunkResponseBody = {
|
|
72
|
+
/**
|
|
73
|
+
* The unique identifier of the chunk
|
|
74
|
+
*/
|
|
75
|
+
id: string;
|
|
76
|
+
/**
|
|
77
|
+
* The text content of the chunk
|
|
78
|
+
*/
|
|
79
|
+
text: string;
|
|
80
|
+
/**
|
|
81
|
+
* Metadata of the chunk. Can include `page_number` or any other key-value pairs. Only values of type string are supported.
|
|
82
|
+
*/
|
|
83
|
+
metadata?: { [k: string]: string } | undefined;
|
|
84
|
+
/**
|
|
85
|
+
* Whether the chunk is enabled
|
|
86
|
+
*/
|
|
87
|
+
enabled: boolean;
|
|
88
|
+
/**
|
|
89
|
+
* The status of the chunk
|
|
90
|
+
*/
|
|
91
|
+
status: UpdateChunkStatus;
|
|
92
|
+
/**
|
|
93
|
+
* The date and time the chunk was created
|
|
94
|
+
*/
|
|
95
|
+
created: string;
|
|
96
|
+
/**
|
|
97
|
+
* The date and time the chunk was updated
|
|
98
|
+
*/
|
|
99
|
+
updated: string;
|
|
100
|
+
/**
|
|
101
|
+
* The unique identifier of the user who created the chunk
|
|
102
|
+
*/
|
|
103
|
+
createdById?: string | undefined;
|
|
104
|
+
/**
|
|
105
|
+
* The unique identifier of the user who updated the chunk
|
|
106
|
+
*/
|
|
107
|
+
updateById?: string | undefined;
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
/** @internal */
|
|
111
|
+
export const UpdateChunkMetadata$inboundSchema: z.ZodType<
|
|
112
|
+
UpdateChunkMetadata,
|
|
113
|
+
z.ZodTypeDef,
|
|
114
|
+
unknown
|
|
115
|
+
> = z.object({
|
|
116
|
+
page_number: z.number().optional(),
|
|
117
|
+
}).transform((v) => {
|
|
118
|
+
return remap$(v, {
|
|
119
|
+
"page_number": "pageNumber",
|
|
120
|
+
});
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
/** @internal */
|
|
124
|
+
export type UpdateChunkMetadata$Outbound = {
|
|
125
|
+
page_number?: number | undefined;
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
/** @internal */
|
|
129
|
+
export const UpdateChunkMetadata$outboundSchema: z.ZodType<
|
|
130
|
+
UpdateChunkMetadata$Outbound,
|
|
131
|
+
z.ZodTypeDef,
|
|
132
|
+
UpdateChunkMetadata
|
|
133
|
+
> = z.object({
|
|
134
|
+
pageNumber: z.number().optional(),
|
|
135
|
+
}).transform((v) => {
|
|
136
|
+
return remap$(v, {
|
|
137
|
+
pageNumber: "page_number",
|
|
138
|
+
});
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* @internal
|
|
143
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
144
|
+
*/
|
|
145
|
+
export namespace UpdateChunkMetadata$ {
|
|
146
|
+
/** @deprecated use `UpdateChunkMetadata$inboundSchema` instead. */
|
|
147
|
+
export const inboundSchema = UpdateChunkMetadata$inboundSchema;
|
|
148
|
+
/** @deprecated use `UpdateChunkMetadata$outboundSchema` instead. */
|
|
149
|
+
export const outboundSchema = UpdateChunkMetadata$outboundSchema;
|
|
150
|
+
/** @deprecated use `UpdateChunkMetadata$Outbound` instead. */
|
|
151
|
+
export type Outbound = UpdateChunkMetadata$Outbound;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
export function updateChunkMetadataToJSON(
|
|
155
|
+
updateChunkMetadata: UpdateChunkMetadata,
|
|
156
|
+
): string {
|
|
157
|
+
return JSON.stringify(
|
|
158
|
+
UpdateChunkMetadata$outboundSchema.parse(updateChunkMetadata),
|
|
159
|
+
);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
export function updateChunkMetadataFromJSON(
|
|
163
|
+
jsonString: string,
|
|
164
|
+
): SafeParseResult<UpdateChunkMetadata, SDKValidationError> {
|
|
165
|
+
return safeParse(
|
|
166
|
+
jsonString,
|
|
167
|
+
(x) => UpdateChunkMetadata$inboundSchema.parse(JSON.parse(x)),
|
|
168
|
+
`Failed to parse 'UpdateChunkMetadata' from JSON`,
|
|
169
|
+
);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/** @internal */
|
|
173
|
+
export const UpdateChunkRequestBody$inboundSchema: z.ZodType<
|
|
174
|
+
UpdateChunkRequestBody,
|
|
175
|
+
z.ZodTypeDef,
|
|
176
|
+
unknown
|
|
177
|
+
> = z.object({
|
|
178
|
+
text: z.string().optional(),
|
|
179
|
+
embedding: z.array(z.number()).optional(),
|
|
180
|
+
metadata: z.lazy(() => UpdateChunkMetadata$inboundSchema).optional(),
|
|
181
|
+
});
|
|
182
|
+
|
|
183
|
+
/** @internal */
|
|
184
|
+
export type UpdateChunkRequestBody$Outbound = {
|
|
185
|
+
text?: string | undefined;
|
|
186
|
+
embedding?: Array<number> | undefined;
|
|
187
|
+
metadata?: UpdateChunkMetadata$Outbound | undefined;
|
|
188
|
+
};
|
|
189
|
+
|
|
190
|
+
/** @internal */
|
|
191
|
+
export const UpdateChunkRequestBody$outboundSchema: z.ZodType<
|
|
192
|
+
UpdateChunkRequestBody$Outbound,
|
|
193
|
+
z.ZodTypeDef,
|
|
194
|
+
UpdateChunkRequestBody
|
|
195
|
+
> = z.object({
|
|
196
|
+
text: z.string().optional(),
|
|
197
|
+
embedding: z.array(z.number()).optional(),
|
|
198
|
+
metadata: z.lazy(() => UpdateChunkMetadata$outboundSchema).optional(),
|
|
199
|
+
});
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* @internal
|
|
203
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
204
|
+
*/
|
|
205
|
+
export namespace UpdateChunkRequestBody$ {
|
|
206
|
+
/** @deprecated use `UpdateChunkRequestBody$inboundSchema` instead. */
|
|
207
|
+
export const inboundSchema = UpdateChunkRequestBody$inboundSchema;
|
|
208
|
+
/** @deprecated use `UpdateChunkRequestBody$outboundSchema` instead. */
|
|
209
|
+
export const outboundSchema = UpdateChunkRequestBody$outboundSchema;
|
|
210
|
+
/** @deprecated use `UpdateChunkRequestBody$Outbound` instead. */
|
|
211
|
+
export type Outbound = UpdateChunkRequestBody$Outbound;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
export function updateChunkRequestBodyToJSON(
|
|
215
|
+
updateChunkRequestBody: UpdateChunkRequestBody,
|
|
216
|
+
): string {
|
|
217
|
+
return JSON.stringify(
|
|
218
|
+
UpdateChunkRequestBody$outboundSchema.parse(updateChunkRequestBody),
|
|
219
|
+
);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
export function updateChunkRequestBodyFromJSON(
|
|
223
|
+
jsonString: string,
|
|
224
|
+
): SafeParseResult<UpdateChunkRequestBody, SDKValidationError> {
|
|
225
|
+
return safeParse(
|
|
226
|
+
jsonString,
|
|
227
|
+
(x) => UpdateChunkRequestBody$inboundSchema.parse(JSON.parse(x)),
|
|
228
|
+
`Failed to parse 'UpdateChunkRequestBody' from JSON`,
|
|
229
|
+
);
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
/** @internal */
|
|
233
|
+
export const UpdateChunkRequest$inboundSchema: z.ZodType<
|
|
234
|
+
UpdateChunkRequest,
|
|
235
|
+
z.ZodTypeDef,
|
|
236
|
+
unknown
|
|
237
|
+
> = z.object({
|
|
238
|
+
chunk_id: z.string(),
|
|
239
|
+
datasource_id: z.string(),
|
|
240
|
+
knowledge_id: z.string(),
|
|
241
|
+
RequestBody: z.lazy(() => UpdateChunkRequestBody$inboundSchema).optional(),
|
|
242
|
+
}).transform((v) => {
|
|
243
|
+
return remap$(v, {
|
|
244
|
+
"chunk_id": "chunkId",
|
|
245
|
+
"datasource_id": "datasourceId",
|
|
246
|
+
"knowledge_id": "knowledgeId",
|
|
247
|
+
"RequestBody": "requestBody",
|
|
248
|
+
});
|
|
249
|
+
});
|
|
250
|
+
|
|
251
|
+
/** @internal */
|
|
252
|
+
export type UpdateChunkRequest$Outbound = {
|
|
253
|
+
chunk_id: string;
|
|
254
|
+
datasource_id: string;
|
|
255
|
+
knowledge_id: string;
|
|
256
|
+
RequestBody?: UpdateChunkRequestBody$Outbound | undefined;
|
|
257
|
+
};
|
|
258
|
+
|
|
259
|
+
/** @internal */
|
|
260
|
+
export const UpdateChunkRequest$outboundSchema: z.ZodType<
|
|
261
|
+
UpdateChunkRequest$Outbound,
|
|
262
|
+
z.ZodTypeDef,
|
|
263
|
+
UpdateChunkRequest
|
|
264
|
+
> = z.object({
|
|
265
|
+
chunkId: z.string(),
|
|
266
|
+
datasourceId: z.string(),
|
|
267
|
+
knowledgeId: z.string(),
|
|
268
|
+
requestBody: z.lazy(() => UpdateChunkRequestBody$outboundSchema).optional(),
|
|
269
|
+
}).transform((v) => {
|
|
270
|
+
return remap$(v, {
|
|
271
|
+
chunkId: "chunk_id",
|
|
272
|
+
datasourceId: "datasource_id",
|
|
273
|
+
knowledgeId: "knowledge_id",
|
|
274
|
+
requestBody: "RequestBody",
|
|
275
|
+
});
|
|
276
|
+
});
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* @internal
|
|
280
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
281
|
+
*/
|
|
282
|
+
export namespace UpdateChunkRequest$ {
|
|
283
|
+
/** @deprecated use `UpdateChunkRequest$inboundSchema` instead. */
|
|
284
|
+
export const inboundSchema = UpdateChunkRequest$inboundSchema;
|
|
285
|
+
/** @deprecated use `UpdateChunkRequest$outboundSchema` instead. */
|
|
286
|
+
export const outboundSchema = UpdateChunkRequest$outboundSchema;
|
|
287
|
+
/** @deprecated use `UpdateChunkRequest$Outbound` instead. */
|
|
288
|
+
export type Outbound = UpdateChunkRequest$Outbound;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
export function updateChunkRequestToJSON(
|
|
292
|
+
updateChunkRequest: UpdateChunkRequest,
|
|
293
|
+
): string {
|
|
294
|
+
return JSON.stringify(
|
|
295
|
+
UpdateChunkRequest$outboundSchema.parse(updateChunkRequest),
|
|
296
|
+
);
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
export function updateChunkRequestFromJSON(
|
|
300
|
+
jsonString: string,
|
|
301
|
+
): SafeParseResult<UpdateChunkRequest, SDKValidationError> {
|
|
302
|
+
return safeParse(
|
|
303
|
+
jsonString,
|
|
304
|
+
(x) => UpdateChunkRequest$inboundSchema.parse(JSON.parse(x)),
|
|
305
|
+
`Failed to parse 'UpdateChunkRequest' from JSON`,
|
|
306
|
+
);
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
/** @internal */
|
|
310
|
+
export const UpdateChunkStatus$inboundSchema: z.ZodNativeEnum<
|
|
311
|
+
typeof UpdateChunkStatus
|
|
312
|
+
> = z.nativeEnum(UpdateChunkStatus);
|
|
313
|
+
|
|
314
|
+
/** @internal */
|
|
315
|
+
export const UpdateChunkStatus$outboundSchema: z.ZodNativeEnum<
|
|
316
|
+
typeof UpdateChunkStatus
|
|
317
|
+
> = UpdateChunkStatus$inboundSchema;
|
|
318
|
+
|
|
319
|
+
/**
|
|
320
|
+
* @internal
|
|
321
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
322
|
+
*/
|
|
323
|
+
export namespace UpdateChunkStatus$ {
|
|
324
|
+
/** @deprecated use `UpdateChunkStatus$inboundSchema` instead. */
|
|
325
|
+
export const inboundSchema = UpdateChunkStatus$inboundSchema;
|
|
326
|
+
/** @deprecated use `UpdateChunkStatus$outboundSchema` instead. */
|
|
327
|
+
export const outboundSchema = UpdateChunkStatus$outboundSchema;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
/** @internal */
|
|
331
|
+
export const UpdateChunkResponseBody$inboundSchema: z.ZodType<
|
|
332
|
+
UpdateChunkResponseBody,
|
|
333
|
+
z.ZodTypeDef,
|
|
334
|
+
unknown
|
|
335
|
+
> = z.object({
|
|
336
|
+
_id: z.string(),
|
|
337
|
+
text: z.string(),
|
|
338
|
+
metadata: z.record(z.string()).optional(),
|
|
339
|
+
enabled: z.boolean(),
|
|
340
|
+
status: UpdateChunkStatus$inboundSchema,
|
|
341
|
+
created: z.string(),
|
|
342
|
+
updated: z.string(),
|
|
343
|
+
created_by_id: z.string().optional(),
|
|
344
|
+
update_by_id: z.string().optional(),
|
|
345
|
+
}).transform((v) => {
|
|
346
|
+
return remap$(v, {
|
|
347
|
+
"_id": "id",
|
|
348
|
+
"created_by_id": "createdById",
|
|
349
|
+
"update_by_id": "updateById",
|
|
350
|
+
});
|
|
351
|
+
});
|
|
352
|
+
|
|
353
|
+
/** @internal */
|
|
354
|
+
export type UpdateChunkResponseBody$Outbound = {
|
|
355
|
+
_id: string;
|
|
356
|
+
text: string;
|
|
357
|
+
metadata?: { [k: string]: string } | undefined;
|
|
358
|
+
enabled: boolean;
|
|
359
|
+
status: string;
|
|
360
|
+
created: string;
|
|
361
|
+
updated: string;
|
|
362
|
+
created_by_id?: string | undefined;
|
|
363
|
+
update_by_id?: string | undefined;
|
|
364
|
+
};
|
|
365
|
+
|
|
366
|
+
/** @internal */
|
|
367
|
+
export const UpdateChunkResponseBody$outboundSchema: z.ZodType<
|
|
368
|
+
UpdateChunkResponseBody$Outbound,
|
|
369
|
+
z.ZodTypeDef,
|
|
370
|
+
UpdateChunkResponseBody
|
|
371
|
+
> = z.object({
|
|
372
|
+
id: z.string(),
|
|
373
|
+
text: z.string(),
|
|
374
|
+
metadata: z.record(z.string()).optional(),
|
|
375
|
+
enabled: z.boolean(),
|
|
376
|
+
status: UpdateChunkStatus$outboundSchema,
|
|
377
|
+
created: z.string(),
|
|
378
|
+
updated: z.string(),
|
|
379
|
+
createdById: z.string().optional(),
|
|
380
|
+
updateById: z.string().optional(),
|
|
381
|
+
}).transform((v) => {
|
|
382
|
+
return remap$(v, {
|
|
383
|
+
id: "_id",
|
|
384
|
+
createdById: "created_by_id",
|
|
385
|
+
updateById: "update_by_id",
|
|
386
|
+
});
|
|
387
|
+
});
|
|
388
|
+
|
|
389
|
+
/**
|
|
390
|
+
* @internal
|
|
391
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
392
|
+
*/
|
|
393
|
+
export namespace UpdateChunkResponseBody$ {
|
|
394
|
+
/** @deprecated use `UpdateChunkResponseBody$inboundSchema` instead. */
|
|
395
|
+
export const inboundSchema = UpdateChunkResponseBody$inboundSchema;
|
|
396
|
+
/** @deprecated use `UpdateChunkResponseBody$outboundSchema` instead. */
|
|
397
|
+
export const outboundSchema = UpdateChunkResponseBody$outboundSchema;
|
|
398
|
+
/** @deprecated use `UpdateChunkResponseBody$Outbound` instead. */
|
|
399
|
+
export type Outbound = UpdateChunkResponseBody$Outbound;
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
export function updateChunkResponseBodyToJSON(
|
|
403
|
+
updateChunkResponseBody: UpdateChunkResponseBody,
|
|
404
|
+
): string {
|
|
405
|
+
return JSON.stringify(
|
|
406
|
+
UpdateChunkResponseBody$outboundSchema.parse(updateChunkResponseBody),
|
|
407
|
+
);
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
export function updateChunkResponseBodyFromJSON(
|
|
411
|
+
jsonString: string,
|
|
412
|
+
): SafeParseResult<UpdateChunkResponseBody, SDKValidationError> {
|
|
413
|
+
return safeParse(
|
|
414
|
+
jsonString,
|
|
415
|
+
(x) => UpdateChunkResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
416
|
+
`Failed to parse 'UpdateChunkResponseBody' from JSON`,
|
|
417
|
+
);
|
|
418
|
+
}
|
|
@@ -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-03-
|
|
1641
|
+
"2025-03-27T22:14:48.594Z",
|
|
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-03-
|
|
1685
|
+
updated: z.date().default(() => new Date("2025-03-27T22:14:48.594Z"))
|
|
1686
1686
|
.transform(v => v.toISOString()),
|
|
1687
1687
|
}).transform((v) => {
|
|
1688
1688
|
return remap$(v, {
|
|
@@ -283,7 +283,7 @@ export const UpdateDatasetResponseBody$inboundSchema: z.ZodType<
|
|
|
283
283
|
created: z.string().datetime({ offset: true }).transform(v => new Date(v))
|
|
284
284
|
.optional(),
|
|
285
285
|
updated: z.string().datetime({ offset: true }).default(
|
|
286
|
-
"2025-03-
|
|
286
|
+
"2025-03-27T22:14:48.594Z",
|
|
287
287
|
).transform(v => new Date(v)),
|
|
288
288
|
}).transform((v) => {
|
|
289
289
|
return remap$(v, {
|
|
@@ -328,7 +328,7 @@ export const UpdateDatasetResponseBody$outboundSchema: z.ZodType<
|
|
|
328
328
|
parentId: z.string().optional(),
|
|
329
329
|
version: z.string().optional(),
|
|
330
330
|
created: z.date().transform(v => v.toISOString()).optional(),
|
|
331
|
-
updated: z.date().default(() => new Date("2025-03-
|
|
331
|
+
updated: z.date().default(() => new Date("2025-03-27T22:14:48.594Z"))
|
|
332
332
|
.transform(v => v.toISOString()),
|
|
333
333
|
}).transform((v) => {
|
|
334
334
|
return remap$(v, {
|