@orq-ai/node 3.13.8 → 3.13.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (170) hide show
  1. package/bin/mcp-server.js +215 -229
  2. package/bin/mcp-server.js.map +44 -44
  3. package/examples/package-lock.json +1 -1
  4. package/jsr.json +1 -1
  5. package/lib/config.d.ts +2 -2
  6. package/lib/config.js +2 -2
  7. package/mcp-server/mcp-server.js +1 -1
  8. package/mcp-server/server.js +1 -1
  9. package/models/components/deployments.d.ts +0 -6
  10. package/models/components/deployments.d.ts.map +1 -1
  11. package/models/components/deployments.js +0 -2
  12. package/models/components/deployments.js.map +1 -1
  13. package/models/operations/createbudget.js +2 -2
  14. package/models/operations/createcontact.js +2 -2
  15. package/models/operations/createdataset.js +2 -2
  16. package/models/operations/createdatasetitem.d.ts +0 -6
  17. package/models/operations/createdatasetitem.d.ts.map +1 -1
  18. package/models/operations/createdatasetitem.js +2 -4
  19. package/models/operations/createdatasetitem.js.map +1 -1
  20. package/models/operations/createdatasource.js +2 -2
  21. package/models/operations/createeval.js +28 -28
  22. package/models/operations/createtool.js +14 -14
  23. package/models/operations/deploymentcreatemetric.d.ts +0 -6
  24. package/models/operations/deploymentcreatemetric.d.ts.map +1 -1
  25. package/models/operations/deploymentcreatemetric.js +0 -2
  26. package/models/operations/deploymentcreatemetric.js.map +1 -1
  27. package/models/operations/deploymentgetconfig.d.ts +0 -6
  28. package/models/operations/deploymentgetconfig.d.ts.map +1 -1
  29. package/models/operations/deploymentgetconfig.js +0 -2
  30. package/models/operations/deploymentgetconfig.js.map +1 -1
  31. package/models/operations/deploymentstream.d.ts +0 -6
  32. package/models/operations/deploymentstream.d.ts.map +1 -1
  33. package/models/operations/deploymentstream.js +0 -2
  34. package/models/operations/deploymentstream.js.map +1 -1
  35. package/models/operations/duplicatetool.js +10 -10
  36. package/models/operations/fileget.js +2 -2
  37. package/models/operations/filelist.js +2 -2
  38. package/models/operations/fileupload.js +2 -2
  39. package/models/operations/getagent.js +2 -2
  40. package/models/operations/getalltools.js +10 -10
  41. package/models/operations/getbudget.js +2 -2
  42. package/models/operations/getevals.js +28 -28
  43. package/models/operations/listagents.js +2 -2
  44. package/models/operations/listbudgets.js +2 -2
  45. package/models/operations/listcontacts.js +2 -2
  46. package/models/operations/listdatasetdatapoints.d.ts +0 -3
  47. package/models/operations/listdatasetdatapoints.d.ts.map +1 -1
  48. package/models/operations/listdatasetdatapoints.js +2 -3
  49. package/models/operations/listdatasetdatapoints.js.map +1 -1
  50. package/models/operations/listdatasets.js +2 -2
  51. package/models/operations/listdatasources.js +2 -2
  52. package/models/operations/retrievecontact.js +2 -2
  53. package/models/operations/retrievedatapoint.d.ts +0 -3
  54. package/models/operations/retrievedatapoint.d.ts.map +1 -1
  55. package/models/operations/retrievedatapoint.js +2 -3
  56. package/models/operations/retrievedatapoint.js.map +1 -1
  57. package/models/operations/retrievedataset.js +2 -2
  58. package/models/operations/retrievedatasource.js +2 -2
  59. package/models/operations/retrievetool.js +10 -10
  60. package/models/operations/runagent.js +2 -2
  61. package/models/operations/streamrunagent.js +2 -2
  62. package/models/operations/updatebudget.js +2 -2
  63. package/models/operations/updatecontact.js +2 -2
  64. package/models/operations/updatedatapoint.d.ts +0 -6
  65. package/models/operations/updatedatapoint.d.ts.map +1 -1
  66. package/models/operations/updatedatapoint.js +2 -4
  67. package/models/operations/updatedatapoint.js.map +1 -1
  68. package/models/operations/updatedataset.js +2 -2
  69. package/models/operations/updatedatasource.js +2 -2
  70. package/models/operations/updateeval.js +28 -28
  71. package/models/operations/updatetool.js +14 -14
  72. package/package.json +1 -1
  73. package/packages/orq-rc/docs/sdks/knowledge/README.md +6 -0
  74. package/packages/orq-rc/examples/package-lock.json +1 -1
  75. package/packages/orq-rc/jsr.json +1 -1
  76. package/packages/orq-rc/package-lock.json +2 -2
  77. package/packages/orq-rc/package.json +1 -1
  78. package/packages/orq-rc/src/lib/config.ts +2 -2
  79. package/packages/orq-rc/src/mcp-server/mcp-server.ts +1 -1
  80. package/packages/orq-rc/src/mcp-server/server.ts +1 -1
  81. package/packages/orq-rc/src/models/components/deployments.ts +0 -2
  82. package/packages/orq-rc/src/models/operations/createbudget.ts +2 -2
  83. package/packages/orq-rc/src/models/operations/createcontact.ts +2 -2
  84. package/packages/orq-rc/src/models/operations/createdataset.ts +9 -3
  85. package/packages/orq-rc/src/models/operations/createdatasetitem.ts +8 -10
  86. package/packages/orq-rc/src/models/operations/createdatasource.ts +2 -2
  87. package/packages/orq-rc/src/models/operations/createeval.ts +236 -201
  88. package/packages/orq-rc/src/models/operations/createknowledge.ts +1231 -275
  89. package/packages/orq-rc/src/models/operations/creatememorystore.ts +7 -1
  90. package/packages/orq-rc/src/models/operations/createprompt.ts +7 -1
  91. package/packages/orq-rc/src/models/operations/createtool.ts +192 -116
  92. package/packages/orq-rc/src/models/operations/deploymentcreatemetric.ts +0 -2
  93. package/packages/orq-rc/src/models/operations/deploymentgetconfig.ts +0 -2
  94. package/packages/orq-rc/src/models/operations/deploymentstream.ts +0 -2
  95. package/packages/orq-rc/src/models/operations/duplicatetool.ts +45 -15
  96. package/packages/orq-rc/src/models/operations/fileget.ts +2 -2
  97. package/packages/orq-rc/src/models/operations/filelist.ts +2 -2
  98. package/packages/orq-rc/src/models/operations/fileupload.ts +2 -2
  99. package/packages/orq-rc/src/models/operations/getagent.ts +9 -3
  100. package/packages/orq-rc/src/models/operations/getalltools.ts +167 -118
  101. package/packages/orq-rc/src/models/operations/getbudget.ts +2 -2
  102. package/packages/orq-rc/src/models/operations/getevals.ts +157 -143
  103. package/packages/orq-rc/src/models/operations/getoneknowledge.ts +912 -166
  104. package/packages/orq-rc/src/models/operations/listagents.ts +9 -3
  105. package/packages/orq-rc/src/models/operations/listbudgets.ts +2 -2
  106. package/packages/orq-rc/src/models/operations/listcontacts.ts +2 -2
  107. package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +8 -9
  108. package/packages/orq-rc/src/models/operations/listdatasets.ts +2 -2
  109. package/packages/orq-rc/src/models/operations/listdatasources.ts +2 -2
  110. package/packages/orq-rc/src/models/operations/listknowledgebases.ts +755 -150
  111. package/packages/orq-rc/src/models/operations/retrievecontact.ts +2 -2
  112. package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +8 -9
  113. package/packages/orq-rc/src/models/operations/retrievedataset.ts +2 -2
  114. package/packages/orq-rc/src/models/operations/retrievedatasource.ts +2 -2
  115. package/packages/orq-rc/src/models/operations/retrievetool.ts +45 -15
  116. package/packages/orq-rc/src/models/operations/runagent.ts +7 -1
  117. package/packages/orq-rc/src/models/operations/searchknowledge.ts +49 -62
  118. package/packages/orq-rc/src/models/operations/streamrunagent.ts +7 -1
  119. package/packages/orq-rc/src/models/operations/updatebudget.ts +2 -2
  120. package/packages/orq-rc/src/models/operations/updatecontact.ts +2 -2
  121. package/packages/orq-rc/src/models/operations/updatedatapoint.ts +8 -10
  122. package/packages/orq-rc/src/models/operations/updatedataset.ts +9 -3
  123. package/packages/orq-rc/src/models/operations/updatedatasource.ts +2 -2
  124. package/packages/orq-rc/src/models/operations/updateeval.ts +56 -32
  125. package/packages/orq-rc/src/models/operations/updateknowledge.ts +1710 -367
  126. package/packages/orq-rc/src/models/operations/updatememorystore.ts +7 -1
  127. package/packages/orq-rc/src/models/operations/updateprompt.ts +7 -1
  128. package/packages/orq-rc/src/models/operations/updatetool.ts +80 -20
  129. package/src/lib/config.ts +2 -2
  130. package/src/mcp-server/mcp-server.ts +1 -1
  131. package/src/mcp-server/server.ts +1 -1
  132. package/src/models/components/deployments.ts +0 -2
  133. package/src/models/operations/createbudget.ts +2 -2
  134. package/src/models/operations/createcontact.ts +2 -2
  135. package/src/models/operations/createdataset.ts +2 -2
  136. package/src/models/operations/createdatasetitem.ts +2 -4
  137. package/src/models/operations/createdatasource.ts +2 -2
  138. package/src/models/operations/createeval.ts +28 -28
  139. package/src/models/operations/createtool.ts +14 -14
  140. package/src/models/operations/deploymentcreatemetric.ts +0 -2
  141. package/src/models/operations/deploymentgetconfig.ts +0 -2
  142. package/src/models/operations/deploymentstream.ts +0 -2
  143. package/src/models/operations/duplicatetool.ts +10 -10
  144. package/src/models/operations/fileget.ts +2 -2
  145. package/src/models/operations/filelist.ts +2 -2
  146. package/src/models/operations/fileupload.ts +2 -2
  147. package/src/models/operations/getagent.ts +2 -2
  148. package/src/models/operations/getalltools.ts +10 -10
  149. package/src/models/operations/getbudget.ts +2 -2
  150. package/src/models/operations/getevals.ts +28 -28
  151. package/src/models/operations/listagents.ts +2 -2
  152. package/src/models/operations/listbudgets.ts +2 -2
  153. package/src/models/operations/listcontacts.ts +2 -2
  154. package/src/models/operations/listdatasetdatapoints.ts +2 -3
  155. package/src/models/operations/listdatasets.ts +2 -2
  156. package/src/models/operations/listdatasources.ts +2 -2
  157. package/src/models/operations/retrievecontact.ts +2 -2
  158. package/src/models/operations/retrievedatapoint.ts +2 -3
  159. package/src/models/operations/retrievedataset.ts +2 -2
  160. package/src/models/operations/retrievedatasource.ts +2 -2
  161. package/src/models/operations/retrievetool.ts +10 -10
  162. package/src/models/operations/runagent.ts +2 -2
  163. package/src/models/operations/streamrunagent.ts +2 -2
  164. package/src/models/operations/updatebudget.ts +2 -2
  165. package/src/models/operations/updatecontact.ts +2 -2
  166. package/src/models/operations/updatedatapoint.ts +2 -4
  167. package/src/models/operations/updatedataset.ts +2 -2
  168. package/src/models/operations/updatedatasource.ts +2 -2
  169. package/src/models/operations/updateeval.ts +28 -28
  170. package/src/models/operations/updatetool.ts +14 -14
@@ -12,7 +12,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
12
12
  /**
13
13
  * The retrieval type to use for the knowledge base. If not provided, Hybrid Search will be used as a default query strategy.
14
14
  */
15
- export const UpdateKnowledgeRetrievalType = {
15
+ export const RequestBodyRetrievalType = {
16
16
  VectorSearch: "vector_search",
17
17
  KeywordSearch: "keyword_search",
18
18
  HybridSearch: "hybrid_search",
@@ -20,14 +20,14 @@ export const UpdateKnowledgeRetrievalType = {
20
20
  /**
21
21
  * The retrieval type to use for the knowledge base. If not provided, Hybrid Search will be used as a default query strategy.
22
22
  */
23
- export type UpdateKnowledgeRetrievalType = ClosedEnum<
24
- typeof UpdateKnowledgeRetrievalType
23
+ export type RequestBodyRetrievalType = ClosedEnum<
24
+ typeof RequestBodyRetrievalType
25
25
  >;
26
26
 
27
27
  /**
28
28
  * The rerank configuration for the knowledge base. In case the model is provided it will be used to enhance the search precision.
29
29
  */
30
- export type UpdateKnowledgeRerankConfig = {
30
+ export type UpdateKnowledgeRequestBodyRerankConfig = {
31
31
  /**
32
32
  * The number of results to return by the reranking model
33
33
  */
@@ -45,7 +45,7 @@ export type UpdateKnowledgeRerankConfig = {
45
45
  /**
46
46
  * The Agentic RAG configuration for the knowledge base. If `null` is provided, Agentic RAG will be disabled.
47
47
  */
48
- export type UpdateKnowledgeAgenticRagConfig = {
48
+ export type UpdateKnowledgeRequestBodyAgenticRagConfig = {
49
49
  /**
50
50
  * The model to use for the Agentic RAG
51
51
  */
@@ -55,11 +55,11 @@ export type UpdateKnowledgeAgenticRagConfig = {
55
55
  /**
56
56
  * The retrieval settings for the knowledge base. If not provider, Hybrid Search will be used as a default query strategy.
57
57
  */
58
- export type UpdateKnowledgeRetrievalSettings = {
58
+ export type UpdateKnowledgeRequestBodyRetrievalSettings = {
59
59
  /**
60
60
  * The retrieval type to use for the knowledge base. If not provided, Hybrid Search will be used as a default query strategy.
61
61
  */
62
- retrievalType?: UpdateKnowledgeRetrievalType | undefined;
62
+ retrievalType?: RequestBodyRetrievalType | undefined;
63
63
  /**
64
64
  * The number of results to return from the search.
65
65
  */
@@ -71,14 +71,24 @@ export type UpdateKnowledgeRetrievalSettings = {
71
71
  /**
72
72
  * The rerank configuration for the knowledge base. In case the model is provided it will be used to enhance the search precision.
73
73
  */
74
- rerankConfig?: UpdateKnowledgeRerankConfig | null | undefined;
74
+ rerankConfig?: UpdateKnowledgeRequestBodyRerankConfig | null | undefined;
75
75
  /**
76
76
  * The Agentic RAG configuration for the knowledge base. If `null` is provided, Agentic RAG will be disabled.
77
77
  */
78
- agenticRagConfig?: UpdateKnowledgeAgenticRagConfig | null | undefined;
78
+ agenticRagConfig?:
79
+ | UpdateKnowledgeRequestBodyAgenticRagConfig
80
+ | null
81
+ | undefined;
79
82
  };
80
83
 
81
- export type UpdateKnowledgeRequestBody = {
84
+ export const UpdateKnowledgeRequestBodyKnowledgeType = {
85
+ Internal: "internal",
86
+ } as const;
87
+ export type UpdateKnowledgeRequestBodyKnowledgeType = ClosedEnum<
88
+ typeof UpdateKnowledgeRequestBodyKnowledgeType
89
+ >;
90
+
91
+ export type UpdateKnowledgeRequestBody2 = {
82
92
  /**
83
93
  * The description of the knowledge base.
84
94
  */
@@ -88,27 +98,267 @@ export type UpdateKnowledgeRequestBody = {
88
98
  */
89
99
  embeddingModel?: string | undefined;
90
100
  /**
91
- * 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.
101
+ * Entity storage path in the format: `project/folder/subfolder/...`
102
+ *
103
+ * @remarks
104
+ *
105
+ * The first element identifies the project, followed by nested folders (auto-created as needed).
106
+ *
107
+ * With project-based API keys, the first element is treated as a folder name, as the project is predetermined by the API key.
92
108
  */
93
109
  path?: string | undefined;
94
110
  /**
95
111
  * The retrieval settings for the knowledge base. If not provider, Hybrid Search will be used as a default query strategy.
96
112
  */
97
- retrievalSettings?: UpdateKnowledgeRetrievalSettings | undefined;
113
+ retrievalSettings?: UpdateKnowledgeRequestBodyRetrievalSettings | undefined;
114
+ type?: UpdateKnowledgeRequestBodyKnowledgeType | undefined;
115
+ };
116
+
117
+ /**
118
+ * The rerank configuration for the knowledge base. In case the model is provided it will be used to enhance the search precision.
119
+ */
120
+ export type RequestBodyRerankConfig = {
121
+ /**
122
+ * The number of results to return by the reranking model
123
+ */
124
+ topK?: number | undefined;
125
+ /**
126
+ * The threshold value used to filter the rerank results, only documents with a relevance score greater than the threshold will be returned
127
+ */
128
+ rerankThreshold?: number | undefined;
129
+ /**
130
+ * The rerank model to use for the knowledge base.
131
+ */
132
+ rerankModel: string;
133
+ };
134
+
135
+ /**
136
+ * The Agentic RAG configuration for the knowledge base. If `null` is provided, Agentic RAG will be disabled.
137
+ */
138
+ export type RequestBodyAgenticRagConfig = {
139
+ /**
140
+ * The model to use for the Agentic RAG
141
+ */
142
+ model: string;
143
+ };
144
+
145
+ /**
146
+ * The retrieval settings for the knowledge base.
147
+ */
148
+ export type RequestBodyRetrievalSettings = {
149
+ /**
150
+ * The number of results to return from the search.
151
+ */
152
+ topK?: number | undefined;
153
+ /**
154
+ * The threshold value used to filter the search results, only documents with a relevance score greater than the threshold will be returned
155
+ */
156
+ threshold?: number | undefined;
157
+ /**
158
+ * The rerank configuration for the knowledge base. In case the model is provided it will be used to enhance the search precision.
159
+ */
160
+ rerankConfig?: RequestBodyRerankConfig | null | undefined;
161
+ /**
162
+ * The Agentic RAG configuration for the knowledge base. If `null` is provided, Agentic RAG will be disabled.
163
+ */
164
+ agenticRagConfig?: RequestBodyAgenticRagConfig | null | undefined;
165
+ };
166
+
167
+ /**
168
+ * Configuration for the external knowledge base.
169
+ */
170
+ export type RequestBodyExternalConfig = {
171
+ /**
172
+ * The name of the external knowledge base.
173
+ */
174
+ name?: string | undefined;
175
+ /**
176
+ * The API URL for the external knowledge base.
177
+ */
178
+ apiUrl?: string | undefined;
179
+ /**
180
+ * The API key for the external knowledge base.
181
+ */
182
+ apiKey?: string | undefined;
183
+ };
184
+
185
+ export const UpdateKnowledgeRequestBodyType = {
186
+ External: "external",
187
+ } as const;
188
+ export type UpdateKnowledgeRequestBodyType = ClosedEnum<
189
+ typeof UpdateKnowledgeRequestBodyType
190
+ >;
191
+
192
+ export type UpdateKnowledgeRequestBody1 = {
193
+ /**
194
+ * The description of the knowledge base.
195
+ */
196
+ description?: string | null | undefined;
197
+ /**
198
+ * Entity storage path in the format: `project/folder/subfolder/...`
199
+ *
200
+ * @remarks
201
+ *
202
+ * The first element identifies the project, followed by nested folders (auto-created as needed).
203
+ *
204
+ * With project-based API keys, the first element is treated as a folder name, as the project is predetermined by the API key.
205
+ */
206
+ path?: string | undefined;
207
+ /**
208
+ * The retrieval settings for the knowledge base.
209
+ */
210
+ retrievalSettings?: RequestBodyRetrievalSettings | undefined;
211
+ /**
212
+ * Configuration for the external knowledge base.
213
+ */
214
+ externalConfig?: RequestBodyExternalConfig | undefined;
215
+ type?: UpdateKnowledgeRequestBodyType | undefined;
98
216
  };
99
217
 
218
+ export type UpdateKnowledgeRequestBody =
219
+ | UpdateKnowledgeRequestBody1
220
+ | UpdateKnowledgeRequestBody2;
221
+
100
222
  export type UpdateKnowledgeRequest = {
101
223
  /**
102
224
  * The unique identifier of the knowledge base
103
225
  */
104
226
  knowledgeId: string;
105
- requestBody: UpdateKnowledgeRequestBody;
227
+ requestBody: UpdateKnowledgeRequestBody1 | UpdateKnowledgeRequestBody2;
228
+ };
229
+
230
+ export const UpdateKnowledgeResponseBodyKnowledgeType = {
231
+ External: "external",
232
+ } as const;
233
+ export type UpdateKnowledgeResponseBodyKnowledgeType = ClosedEnum<
234
+ typeof UpdateKnowledgeResponseBodyKnowledgeType
235
+ >;
236
+
237
+ /**
238
+ * The rerank configuration for the knowledge base. In case the model is provided it will be used to enhance the search precision.
239
+ */
240
+ export type UpdateKnowledgeResponseBodyKnowledgeRerankConfig = {
241
+ /**
242
+ * The number of results to return by the reranking model
243
+ */
244
+ topK?: number | undefined;
245
+ /**
246
+ * The threshold value used to filter the rerank results, only documents with a relevance score greater than the threshold will be returned
247
+ */
248
+ rerankThreshold?: number | undefined;
249
+ /**
250
+ * The rerank model to use for the knowledge base.
251
+ */
252
+ rerankModel: string;
253
+ };
254
+
255
+ /**
256
+ * The Agentic RAG configuration for the knowledge base. If `null` is provided, Agentic RAG will be disabled.
257
+ */
258
+ export type UpdateKnowledgeResponseBodyKnowledgeAgenticRagConfig = {
259
+ /**
260
+ * The model to use for the Agentic RAG
261
+ */
262
+ model: string;
263
+ };
264
+
265
+ /**
266
+ * The retrieval settings for the knowledge base.
267
+ */
268
+ export type UpdateKnowledgeResponseBodyKnowledgeRetrievalSettings = {
269
+ /**
270
+ * The number of results to return from the search.
271
+ */
272
+ topK?: number | undefined;
273
+ /**
274
+ * The threshold value used to filter the search results, only documents with a relevance score greater than the threshold will be returned
275
+ */
276
+ threshold?: number | undefined;
277
+ /**
278
+ * The rerank configuration for the knowledge base. In case the model is provided it will be used to enhance the search precision.
279
+ */
280
+ rerankConfig?:
281
+ | UpdateKnowledgeResponseBodyKnowledgeRerankConfig
282
+ | null
283
+ | undefined;
284
+ /**
285
+ * The Agentic RAG configuration for the knowledge base. If `null` is provided, Agentic RAG will be disabled.
286
+ */
287
+ agenticRagConfig?:
288
+ | UpdateKnowledgeResponseBodyKnowledgeAgenticRagConfig
289
+ | null
290
+ | undefined;
291
+ };
292
+
293
+ export type UpdateKnowledgeResponseBodyExternalConfig = {
294
+ /**
295
+ * The name of the external knowledge base.
296
+ */
297
+ name: string;
298
+ /**
299
+ * The API URL of the external knowledge base.
300
+ */
301
+ apiUrl: string;
302
+ };
303
+
304
+ export type UpdateKnowledgeResponseBody2 = {
305
+ /**
306
+ * The unique identifier of the knowledge base.
307
+ */
308
+ id: string;
309
+ /**
310
+ * The creation date of the knowledge base.
311
+ */
312
+ created: string;
313
+ /**
314
+ * The description of the knowledge base.
315
+ */
316
+ description?: string | undefined;
317
+ /**
318
+ * The unique key of the knowledge base.
319
+ */
320
+ key: string;
321
+ /**
322
+ * The project/domain ID of the knowledge base.
323
+ */
324
+ domainId: string;
325
+ /**
326
+ * Entity storage path in the format: `project/folder/subfolder/...`
327
+ *
328
+ * @remarks
329
+ *
330
+ * The first element identifies the project, followed by nested folders (auto-created as needed).
331
+ *
332
+ * With project-based API keys, the first element is treated as a folder name, as the project is predetermined by the API key.
333
+ */
334
+ path?: string | undefined;
335
+ createdById?: string | null | undefined;
336
+ updatedById?: string | null | undefined;
337
+ /**
338
+ * The last update date of the knowledge base.
339
+ */
340
+ updated: string;
341
+ type?: UpdateKnowledgeResponseBodyKnowledgeType | undefined;
342
+ /**
343
+ * The retrieval settings for the knowledge base.
344
+ */
345
+ retrievalSettings?:
346
+ | UpdateKnowledgeResponseBodyKnowledgeRetrievalSettings
347
+ | undefined;
348
+ externalConfig: UpdateKnowledgeResponseBodyExternalConfig;
106
349
  };
107
350
 
351
+ export const UpdateKnowledgeResponseBodyType = {
352
+ Internal: "internal",
353
+ } as const;
354
+ export type UpdateKnowledgeResponseBodyType = ClosedEnum<
355
+ typeof UpdateKnowledgeResponseBodyType
356
+ >;
357
+
108
358
  /**
109
359
  * The retrieval type to use for the knowledge base. If not provided, Hybrid Search will be used as a default query strategy.
110
360
  */
111
- export const UpdateKnowledgeKnowledgeRetrievalType = {
361
+ export const UpdateKnowledgeResponseBodyRetrievalType = {
112
362
  VectorSearch: "vector_search",
113
363
  KeywordSearch: "keyword_search",
114
364
  HybridSearch: "hybrid_search",
@@ -116,14 +366,14 @@ export const UpdateKnowledgeKnowledgeRetrievalType = {
116
366
  /**
117
367
  * The retrieval type to use for the knowledge base. If not provided, Hybrid Search will be used as a default query strategy.
118
368
  */
119
- export type UpdateKnowledgeKnowledgeRetrievalType = ClosedEnum<
120
- typeof UpdateKnowledgeKnowledgeRetrievalType
369
+ export type UpdateKnowledgeResponseBodyRetrievalType = ClosedEnum<
370
+ typeof UpdateKnowledgeResponseBodyRetrievalType
121
371
  >;
122
372
 
123
373
  /**
124
374
  * The rerank configuration for the knowledge base. In case the model is provided it will be used to enhance the search precision.
125
375
  */
126
- export type UpdateKnowledgeKnowledgeRerankConfig = {
376
+ export type UpdateKnowledgeResponseBodyRerankConfig = {
127
377
  /**
128
378
  * The number of results to return by the reranking model
129
379
  */
@@ -141,7 +391,7 @@ export type UpdateKnowledgeKnowledgeRerankConfig = {
141
391
  /**
142
392
  * The Agentic RAG configuration for the knowledge base. If `null` is provided, Agentic RAG will be disabled.
143
393
  */
144
- export type UpdateKnowledgeKnowledgeAgenticRagConfig = {
394
+ export type UpdateKnowledgeResponseBodyAgenticRagConfig = {
145
395
  /**
146
396
  * The model to use for the Agentic RAG
147
397
  */
@@ -151,11 +401,11 @@ export type UpdateKnowledgeKnowledgeAgenticRagConfig = {
151
401
  /**
152
402
  * The retrieval settings for the knowledge base. If not provider, Hybrid Search will be used as a default query strategy.
153
403
  */
154
- export type UpdateKnowledgeKnowledgeRetrievalSettings = {
404
+ export type UpdateKnowledgeResponseBodyRetrievalSettings = {
155
405
  /**
156
406
  * The retrieval type to use for the knowledge base. If not provided, Hybrid Search will be used as a default query strategy.
157
407
  */
158
- retrievalType?: UpdateKnowledgeKnowledgeRetrievalType | undefined;
408
+ retrievalType?: UpdateKnowledgeResponseBodyRetrievalType | undefined;
159
409
  /**
160
410
  * The number of results to return from the search.
161
411
  */
@@ -167,20 +417,17 @@ export type UpdateKnowledgeKnowledgeRetrievalSettings = {
167
417
  /**
168
418
  * The rerank configuration for the knowledge base. In case the model is provided it will be used to enhance the search precision.
169
419
  */
170
- rerankConfig?: UpdateKnowledgeKnowledgeRerankConfig | null | undefined;
420
+ rerankConfig?: UpdateKnowledgeResponseBodyRerankConfig | null | undefined;
171
421
  /**
172
422
  * The Agentic RAG configuration for the knowledge base. If `null` is provided, Agentic RAG will be disabled.
173
423
  */
174
424
  agenticRagConfig?:
175
- | UpdateKnowledgeKnowledgeAgenticRagConfig
425
+ | UpdateKnowledgeResponseBodyAgenticRagConfig
176
426
  | null
177
427
  | undefined;
178
428
  };
179
429
 
180
- /**
181
- * Knowledge Base object
182
- */
183
- export type UpdateKnowledgeResponseBody = {
430
+ export type UpdateKnowledgeResponseBody1 = {
184
431
  /**
185
432
  * The unique identifier of the knowledge base.
186
433
  */
@@ -197,54 +444,68 @@ export type UpdateKnowledgeResponseBody = {
197
444
  * The unique key of the knowledge base.
198
445
  */
199
446
  key: string;
200
- /**
201
- * The embeddings model used for the knowledge base.
202
- */
203
- model: string;
204
447
  /**
205
448
  * The project/domain ID of the knowledge base.
206
449
  */
207
450
  domainId: string;
208
451
  /**
209
- * 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.
452
+ * Entity storage path in the format: `project/folder/subfolder/...`
453
+ *
454
+ * @remarks
455
+ *
456
+ * The first element identifies the project, followed by nested folders (auto-created as needed).
457
+ *
458
+ * With project-based API keys, the first element is treated as a folder name, as the project is predetermined by the API key.
210
459
  */
211
460
  path?: string | undefined;
212
- /**
213
- * The retrieval settings for the knowledge base. If not provider, Hybrid Search will be used as a default query strategy.
214
- */
215
- retrievalSettings?: UpdateKnowledgeKnowledgeRetrievalSettings | undefined;
216
461
  createdById?: string | null | undefined;
217
462
  updatedById?: string | null | undefined;
218
463
  /**
219
464
  * The last update date of the knowledge base.
220
465
  */
221
466
  updated: string;
467
+ type?: UpdateKnowledgeResponseBodyType | undefined;
468
+ /**
469
+ * The retrieval settings for the knowledge base. If not provider, Hybrid Search will be used as a default query strategy.
470
+ */
471
+ retrievalSettings?: UpdateKnowledgeResponseBodyRetrievalSettings | undefined;
472
+ /**
473
+ * The embeddings model used for the knowledge base.
474
+ */
475
+ model: string;
222
476
  };
223
477
 
478
+ /**
479
+ * Knowledge successfully updated
480
+ */
481
+ export type UpdateKnowledgeResponseBody =
482
+ | UpdateKnowledgeResponseBody1
483
+ | UpdateKnowledgeResponseBody2;
484
+
224
485
  /** @internal */
225
- export const UpdateKnowledgeRetrievalType$inboundSchema: z.ZodNativeEnum<
226
- typeof UpdateKnowledgeRetrievalType
227
- > = z.nativeEnum(UpdateKnowledgeRetrievalType);
486
+ export const RequestBodyRetrievalType$inboundSchema: z.ZodNativeEnum<
487
+ typeof RequestBodyRetrievalType
488
+ > = z.nativeEnum(RequestBodyRetrievalType);
228
489
 
229
490
  /** @internal */
230
- export const UpdateKnowledgeRetrievalType$outboundSchema: z.ZodNativeEnum<
231
- typeof UpdateKnowledgeRetrievalType
232
- > = UpdateKnowledgeRetrievalType$inboundSchema;
491
+ export const RequestBodyRetrievalType$outboundSchema: z.ZodNativeEnum<
492
+ typeof RequestBodyRetrievalType
493
+ > = RequestBodyRetrievalType$inboundSchema;
233
494
 
234
495
  /**
235
496
  * @internal
236
497
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
237
498
  */
238
- export namespace UpdateKnowledgeRetrievalType$ {
239
- /** @deprecated use `UpdateKnowledgeRetrievalType$inboundSchema` instead. */
240
- export const inboundSchema = UpdateKnowledgeRetrievalType$inboundSchema;
241
- /** @deprecated use `UpdateKnowledgeRetrievalType$outboundSchema` instead. */
242
- export const outboundSchema = UpdateKnowledgeRetrievalType$outboundSchema;
499
+ export namespace RequestBodyRetrievalType$ {
500
+ /** @deprecated use `RequestBodyRetrievalType$inboundSchema` instead. */
501
+ export const inboundSchema = RequestBodyRetrievalType$inboundSchema;
502
+ /** @deprecated use `RequestBodyRetrievalType$outboundSchema` instead. */
503
+ export const outboundSchema = RequestBodyRetrievalType$outboundSchema;
243
504
  }
244
505
 
245
506
  /** @internal */
246
- export const UpdateKnowledgeRerankConfig$inboundSchema: z.ZodType<
247
- UpdateKnowledgeRerankConfig,
507
+ export const UpdateKnowledgeRequestBodyRerankConfig$inboundSchema: z.ZodType<
508
+ UpdateKnowledgeRequestBodyRerankConfig,
248
509
  z.ZodTypeDef,
249
510
  unknown
250
511
  > = z.object({
@@ -260,17 +521,17 @@ export const UpdateKnowledgeRerankConfig$inboundSchema: z.ZodType<
260
521
  });
261
522
 
262
523
  /** @internal */
263
- export type UpdateKnowledgeRerankConfig$Outbound = {
524
+ export type UpdateKnowledgeRequestBodyRerankConfig$Outbound = {
264
525
  top_k: number;
265
526
  rerank_threshold: number;
266
527
  rerank_model: string;
267
528
  };
268
529
 
269
530
  /** @internal */
270
- export const UpdateKnowledgeRerankConfig$outboundSchema: z.ZodType<
271
- UpdateKnowledgeRerankConfig$Outbound,
531
+ export const UpdateKnowledgeRequestBodyRerankConfig$outboundSchema: z.ZodType<
532
+ UpdateKnowledgeRequestBodyRerankConfig$Outbound,
272
533
  z.ZodTypeDef,
273
- UpdateKnowledgeRerankConfig
534
+ UpdateKnowledgeRequestBodyRerankConfig
274
535
  > = z.object({
275
536
  topK: z.number().int().default(5),
276
537
  rerankThreshold: z.number().default(0.5),
@@ -287,150 +548,498 @@ export const UpdateKnowledgeRerankConfig$outboundSchema: z.ZodType<
287
548
  * @internal
288
549
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
289
550
  */
290
- export namespace UpdateKnowledgeRerankConfig$ {
291
- /** @deprecated use `UpdateKnowledgeRerankConfig$inboundSchema` instead. */
292
- export const inboundSchema = UpdateKnowledgeRerankConfig$inboundSchema;
293
- /** @deprecated use `UpdateKnowledgeRerankConfig$outboundSchema` instead. */
294
- export const outboundSchema = UpdateKnowledgeRerankConfig$outboundSchema;
295
- /** @deprecated use `UpdateKnowledgeRerankConfig$Outbound` instead. */
296
- export type Outbound = UpdateKnowledgeRerankConfig$Outbound;
551
+ export namespace UpdateKnowledgeRequestBodyRerankConfig$ {
552
+ /** @deprecated use `UpdateKnowledgeRequestBodyRerankConfig$inboundSchema` instead. */
553
+ export const inboundSchema =
554
+ UpdateKnowledgeRequestBodyRerankConfig$inboundSchema;
555
+ /** @deprecated use `UpdateKnowledgeRequestBodyRerankConfig$outboundSchema` instead. */
556
+ export const outboundSchema =
557
+ UpdateKnowledgeRequestBodyRerankConfig$outboundSchema;
558
+ /** @deprecated use `UpdateKnowledgeRequestBodyRerankConfig$Outbound` instead. */
559
+ export type Outbound = UpdateKnowledgeRequestBodyRerankConfig$Outbound;
297
560
  }
298
561
 
299
- export function updateKnowledgeRerankConfigToJSON(
300
- updateKnowledgeRerankConfig: UpdateKnowledgeRerankConfig,
562
+ export function updateKnowledgeRequestBodyRerankConfigToJSON(
563
+ updateKnowledgeRequestBodyRerankConfig:
564
+ UpdateKnowledgeRequestBodyRerankConfig,
301
565
  ): string {
302
566
  return JSON.stringify(
303
- UpdateKnowledgeRerankConfig$outboundSchema.parse(
304
- updateKnowledgeRerankConfig,
567
+ UpdateKnowledgeRequestBodyRerankConfig$outboundSchema.parse(
568
+ updateKnowledgeRequestBodyRerankConfig,
305
569
  ),
306
570
  );
307
571
  }
308
572
 
309
- export function updateKnowledgeRerankConfigFromJSON(
573
+ export function updateKnowledgeRequestBodyRerankConfigFromJSON(
310
574
  jsonString: string,
311
- ): SafeParseResult<UpdateKnowledgeRerankConfig, SDKValidationError> {
575
+ ): SafeParseResult<UpdateKnowledgeRequestBodyRerankConfig, SDKValidationError> {
312
576
  return safeParse(
313
577
  jsonString,
314
- (x) => UpdateKnowledgeRerankConfig$inboundSchema.parse(JSON.parse(x)),
315
- `Failed to parse 'UpdateKnowledgeRerankConfig' from JSON`,
578
+ (x) =>
579
+ UpdateKnowledgeRequestBodyRerankConfig$inboundSchema.parse(JSON.parse(x)),
580
+ `Failed to parse 'UpdateKnowledgeRequestBodyRerankConfig' from JSON`,
316
581
  );
317
582
  }
318
583
 
319
584
  /** @internal */
320
- export const UpdateKnowledgeAgenticRagConfig$inboundSchema: z.ZodType<
321
- UpdateKnowledgeAgenticRagConfig,
322
- z.ZodTypeDef,
323
- unknown
324
- > = z.object({
325
- model: z.string(),
326
- });
585
+ export const UpdateKnowledgeRequestBodyAgenticRagConfig$inboundSchema:
586
+ z.ZodType<UpdateKnowledgeRequestBodyAgenticRagConfig, z.ZodTypeDef, unknown> =
587
+ z.object({
588
+ model: z.string(),
589
+ });
327
590
 
328
591
  /** @internal */
329
- export type UpdateKnowledgeAgenticRagConfig$Outbound = {
592
+ export type UpdateKnowledgeRequestBodyAgenticRagConfig$Outbound = {
330
593
  model: string;
331
594
  };
332
595
 
333
596
  /** @internal */
334
- export const UpdateKnowledgeAgenticRagConfig$outboundSchema: z.ZodType<
335
- UpdateKnowledgeAgenticRagConfig$Outbound,
336
- z.ZodTypeDef,
337
- UpdateKnowledgeAgenticRagConfig
338
- > = z.object({
339
- model: z.string(),
340
- });
597
+ export const UpdateKnowledgeRequestBodyAgenticRagConfig$outboundSchema:
598
+ z.ZodType<
599
+ UpdateKnowledgeRequestBodyAgenticRagConfig$Outbound,
600
+ z.ZodTypeDef,
601
+ UpdateKnowledgeRequestBodyAgenticRagConfig
602
+ > = z.object({
603
+ model: z.string(),
604
+ });
341
605
 
342
606
  /**
343
607
  * @internal
344
608
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
345
609
  */
346
- export namespace UpdateKnowledgeAgenticRagConfig$ {
347
- /** @deprecated use `UpdateKnowledgeAgenticRagConfig$inboundSchema` instead. */
348
- export const inboundSchema = UpdateKnowledgeAgenticRagConfig$inboundSchema;
349
- /** @deprecated use `UpdateKnowledgeAgenticRagConfig$outboundSchema` instead. */
350
- export const outboundSchema = UpdateKnowledgeAgenticRagConfig$outboundSchema;
351
- /** @deprecated use `UpdateKnowledgeAgenticRagConfig$Outbound` instead. */
352
- export type Outbound = UpdateKnowledgeAgenticRagConfig$Outbound;
610
+ export namespace UpdateKnowledgeRequestBodyAgenticRagConfig$ {
611
+ /** @deprecated use `UpdateKnowledgeRequestBodyAgenticRagConfig$inboundSchema` instead. */
612
+ export const inboundSchema =
613
+ UpdateKnowledgeRequestBodyAgenticRagConfig$inboundSchema;
614
+ /** @deprecated use `UpdateKnowledgeRequestBodyAgenticRagConfig$outboundSchema` instead. */
615
+ export const outboundSchema =
616
+ UpdateKnowledgeRequestBodyAgenticRagConfig$outboundSchema;
617
+ /** @deprecated use `UpdateKnowledgeRequestBodyAgenticRagConfig$Outbound` instead. */
618
+ export type Outbound = UpdateKnowledgeRequestBodyAgenticRagConfig$Outbound;
353
619
  }
354
620
 
355
- export function updateKnowledgeAgenticRagConfigToJSON(
356
- updateKnowledgeAgenticRagConfig: UpdateKnowledgeAgenticRagConfig,
621
+ export function updateKnowledgeRequestBodyAgenticRagConfigToJSON(
622
+ updateKnowledgeRequestBodyAgenticRagConfig:
623
+ UpdateKnowledgeRequestBodyAgenticRagConfig,
357
624
  ): string {
358
625
  return JSON.stringify(
359
- UpdateKnowledgeAgenticRagConfig$outboundSchema.parse(
360
- updateKnowledgeAgenticRagConfig,
626
+ UpdateKnowledgeRequestBodyAgenticRagConfig$outboundSchema.parse(
627
+ updateKnowledgeRequestBodyAgenticRagConfig,
361
628
  ),
362
629
  );
363
630
  }
364
631
 
365
- export function updateKnowledgeAgenticRagConfigFromJSON(
632
+ export function updateKnowledgeRequestBodyAgenticRagConfigFromJSON(
366
633
  jsonString: string,
367
- ): SafeParseResult<UpdateKnowledgeAgenticRagConfig, SDKValidationError> {
634
+ ): SafeParseResult<
635
+ UpdateKnowledgeRequestBodyAgenticRagConfig,
636
+ SDKValidationError
637
+ > {
368
638
  return safeParse(
369
639
  jsonString,
370
- (x) => UpdateKnowledgeAgenticRagConfig$inboundSchema.parse(JSON.parse(x)),
371
- `Failed to parse 'UpdateKnowledgeAgenticRagConfig' from JSON`,
640
+ (x) =>
641
+ UpdateKnowledgeRequestBodyAgenticRagConfig$inboundSchema.parse(
642
+ JSON.parse(x),
643
+ ),
644
+ `Failed to parse 'UpdateKnowledgeRequestBodyAgenticRagConfig' from JSON`,
372
645
  );
373
646
  }
374
647
 
375
648
  /** @internal */
376
- export const UpdateKnowledgeRetrievalSettings$inboundSchema: z.ZodType<
377
- UpdateKnowledgeRetrievalSettings,
378
- z.ZodTypeDef,
379
- unknown
380
- > = z.object({
381
- retrieval_type: UpdateKnowledgeRetrievalType$inboundSchema.default(
382
- "hybrid_search",
383
- ),
384
- top_k: z.number().int().default(5),
385
- threshold: z.number().default(0),
386
- rerank_config: z.nullable(
387
- z.lazy(() => UpdateKnowledgeRerankConfig$inboundSchema),
388
- ).optional(),
389
- agentic_rag_config: z.nullable(
390
- z.lazy(() => UpdateKnowledgeAgenticRagConfig$inboundSchema),
391
- ).optional(),
392
- }).transform((v) => {
393
- return remap$(v, {
394
- "retrieval_type": "retrievalType",
395
- "top_k": "topK",
396
- "rerank_config": "rerankConfig",
397
- "agentic_rag_config": "agenticRagConfig",
649
+ export const UpdateKnowledgeRequestBodyRetrievalSettings$inboundSchema:
650
+ z.ZodType<
651
+ UpdateKnowledgeRequestBodyRetrievalSettings,
652
+ z.ZodTypeDef,
653
+ unknown
654
+ > = z.object({
655
+ retrieval_type: RequestBodyRetrievalType$inboundSchema.default(
656
+ "hybrid_search",
657
+ ),
658
+ top_k: z.number().int().default(5),
659
+ threshold: z.number().default(0),
660
+ rerank_config: z.nullable(
661
+ z.lazy(() => UpdateKnowledgeRequestBodyRerankConfig$inboundSchema),
662
+ ).optional(),
663
+ agentic_rag_config: z.nullable(
664
+ z.lazy(() => UpdateKnowledgeRequestBodyAgenticRagConfig$inboundSchema),
665
+ ).optional(),
666
+ }).transform((v) => {
667
+ return remap$(v, {
668
+ "retrieval_type": "retrievalType",
669
+ "top_k": "topK",
670
+ "rerank_config": "rerankConfig",
671
+ "agentic_rag_config": "agenticRagConfig",
672
+ });
398
673
  });
399
- });
400
674
 
401
675
  /** @internal */
402
- export type UpdateKnowledgeRetrievalSettings$Outbound = {
676
+ export type UpdateKnowledgeRequestBodyRetrievalSettings$Outbound = {
403
677
  retrieval_type: string;
404
678
  top_k: number;
405
679
  threshold: number;
406
- rerank_config?: UpdateKnowledgeRerankConfig$Outbound | null | undefined;
680
+ rerank_config?:
681
+ | UpdateKnowledgeRequestBodyRerankConfig$Outbound
682
+ | null
683
+ | undefined;
407
684
  agentic_rag_config?:
408
- | UpdateKnowledgeAgenticRagConfig$Outbound
685
+ | UpdateKnowledgeRequestBodyAgenticRagConfig$Outbound
409
686
  | null
410
687
  | undefined;
411
688
  };
412
689
 
413
690
  /** @internal */
414
- export const UpdateKnowledgeRetrievalSettings$outboundSchema: z.ZodType<
415
- UpdateKnowledgeRetrievalSettings$Outbound,
416
- z.ZodTypeDef,
417
- UpdateKnowledgeRetrievalSettings
418
- > = z.object({
419
- retrievalType: UpdateKnowledgeRetrievalType$outboundSchema.default(
420
- "hybrid_search",
421
- ),
422
- topK: z.number().int().default(5),
423
- threshold: z.number().default(0),
424
- rerankConfig: z.nullable(
425
- z.lazy(() => UpdateKnowledgeRerankConfig$outboundSchema),
426
- ).optional(),
427
- agenticRagConfig: z.nullable(
428
- z.lazy(() => UpdateKnowledgeAgenticRagConfig$outboundSchema),
429
- ).optional(),
430
- }).transform((v) => {
431
- return remap$(v, {
432
- retrievalType: "retrieval_type",
433
- topK: "top_k",
691
+ export const UpdateKnowledgeRequestBodyRetrievalSettings$outboundSchema:
692
+ z.ZodType<
693
+ UpdateKnowledgeRequestBodyRetrievalSettings$Outbound,
694
+ z.ZodTypeDef,
695
+ UpdateKnowledgeRequestBodyRetrievalSettings
696
+ > = z.object({
697
+ retrievalType: RequestBodyRetrievalType$outboundSchema.default(
698
+ "hybrid_search",
699
+ ),
700
+ topK: z.number().int().default(5),
701
+ threshold: z.number().default(0),
702
+ rerankConfig: z.nullable(
703
+ z.lazy(() => UpdateKnowledgeRequestBodyRerankConfig$outboundSchema),
704
+ ).optional(),
705
+ agenticRagConfig: z.nullable(
706
+ z.lazy(() => UpdateKnowledgeRequestBodyAgenticRagConfig$outboundSchema),
707
+ ).optional(),
708
+ }).transform((v) => {
709
+ return remap$(v, {
710
+ retrievalType: "retrieval_type",
711
+ topK: "top_k",
712
+ rerankConfig: "rerank_config",
713
+ agenticRagConfig: "agentic_rag_config",
714
+ });
715
+ });
716
+
717
+ /**
718
+ * @internal
719
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
720
+ */
721
+ export namespace UpdateKnowledgeRequestBodyRetrievalSettings$ {
722
+ /** @deprecated use `UpdateKnowledgeRequestBodyRetrievalSettings$inboundSchema` instead. */
723
+ export const inboundSchema =
724
+ UpdateKnowledgeRequestBodyRetrievalSettings$inboundSchema;
725
+ /** @deprecated use `UpdateKnowledgeRequestBodyRetrievalSettings$outboundSchema` instead. */
726
+ export const outboundSchema =
727
+ UpdateKnowledgeRequestBodyRetrievalSettings$outboundSchema;
728
+ /** @deprecated use `UpdateKnowledgeRequestBodyRetrievalSettings$Outbound` instead. */
729
+ export type Outbound = UpdateKnowledgeRequestBodyRetrievalSettings$Outbound;
730
+ }
731
+
732
+ export function updateKnowledgeRequestBodyRetrievalSettingsToJSON(
733
+ updateKnowledgeRequestBodyRetrievalSettings:
734
+ UpdateKnowledgeRequestBodyRetrievalSettings,
735
+ ): string {
736
+ return JSON.stringify(
737
+ UpdateKnowledgeRequestBodyRetrievalSettings$outboundSchema.parse(
738
+ updateKnowledgeRequestBodyRetrievalSettings,
739
+ ),
740
+ );
741
+ }
742
+
743
+ export function updateKnowledgeRequestBodyRetrievalSettingsFromJSON(
744
+ jsonString: string,
745
+ ): SafeParseResult<
746
+ UpdateKnowledgeRequestBodyRetrievalSettings,
747
+ SDKValidationError
748
+ > {
749
+ return safeParse(
750
+ jsonString,
751
+ (x) =>
752
+ UpdateKnowledgeRequestBodyRetrievalSettings$inboundSchema.parse(
753
+ JSON.parse(x),
754
+ ),
755
+ `Failed to parse 'UpdateKnowledgeRequestBodyRetrievalSettings' from JSON`,
756
+ );
757
+ }
758
+
759
+ /** @internal */
760
+ export const UpdateKnowledgeRequestBodyKnowledgeType$inboundSchema:
761
+ z.ZodNativeEnum<typeof UpdateKnowledgeRequestBodyKnowledgeType> = z
762
+ .nativeEnum(UpdateKnowledgeRequestBodyKnowledgeType);
763
+
764
+ /** @internal */
765
+ export const UpdateKnowledgeRequestBodyKnowledgeType$outboundSchema:
766
+ z.ZodNativeEnum<typeof UpdateKnowledgeRequestBodyKnowledgeType> =
767
+ UpdateKnowledgeRequestBodyKnowledgeType$inboundSchema;
768
+
769
+ /**
770
+ * @internal
771
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
772
+ */
773
+ export namespace UpdateKnowledgeRequestBodyKnowledgeType$ {
774
+ /** @deprecated use `UpdateKnowledgeRequestBodyKnowledgeType$inboundSchema` instead. */
775
+ export const inboundSchema =
776
+ UpdateKnowledgeRequestBodyKnowledgeType$inboundSchema;
777
+ /** @deprecated use `UpdateKnowledgeRequestBodyKnowledgeType$outboundSchema` instead. */
778
+ export const outboundSchema =
779
+ UpdateKnowledgeRequestBodyKnowledgeType$outboundSchema;
780
+ }
781
+
782
+ /** @internal */
783
+ export const UpdateKnowledgeRequestBody2$inboundSchema: z.ZodType<
784
+ UpdateKnowledgeRequestBody2,
785
+ z.ZodTypeDef,
786
+ unknown
787
+ > = z.object({
788
+ description: z.nullable(z.string()).optional(),
789
+ embedding_model: z.string().optional(),
790
+ path: z.string().optional(),
791
+ retrieval_settings: z.lazy(() =>
792
+ UpdateKnowledgeRequestBodyRetrievalSettings$inboundSchema
793
+ ).optional(),
794
+ type: UpdateKnowledgeRequestBodyKnowledgeType$inboundSchema.default(
795
+ "internal",
796
+ ),
797
+ }).transform((v) => {
798
+ return remap$(v, {
799
+ "embedding_model": "embeddingModel",
800
+ "retrieval_settings": "retrievalSettings",
801
+ });
802
+ });
803
+
804
+ /** @internal */
805
+ export type UpdateKnowledgeRequestBody2$Outbound = {
806
+ description?: string | null | undefined;
807
+ embedding_model?: string | undefined;
808
+ path?: string | undefined;
809
+ retrieval_settings?:
810
+ | UpdateKnowledgeRequestBodyRetrievalSettings$Outbound
811
+ | undefined;
812
+ type: string;
813
+ };
814
+
815
+ /** @internal */
816
+ export const UpdateKnowledgeRequestBody2$outboundSchema: z.ZodType<
817
+ UpdateKnowledgeRequestBody2$Outbound,
818
+ z.ZodTypeDef,
819
+ UpdateKnowledgeRequestBody2
820
+ > = z.object({
821
+ description: z.nullable(z.string()).optional(),
822
+ embeddingModel: z.string().optional(),
823
+ path: z.string().optional(),
824
+ retrievalSettings: z.lazy(() =>
825
+ UpdateKnowledgeRequestBodyRetrievalSettings$outboundSchema
826
+ ).optional(),
827
+ type: UpdateKnowledgeRequestBodyKnowledgeType$outboundSchema.default(
828
+ "internal",
829
+ ),
830
+ }).transform((v) => {
831
+ return remap$(v, {
832
+ embeddingModel: "embedding_model",
833
+ retrievalSettings: "retrieval_settings",
834
+ });
835
+ });
836
+
837
+ /**
838
+ * @internal
839
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
840
+ */
841
+ export namespace UpdateKnowledgeRequestBody2$ {
842
+ /** @deprecated use `UpdateKnowledgeRequestBody2$inboundSchema` instead. */
843
+ export const inboundSchema = UpdateKnowledgeRequestBody2$inboundSchema;
844
+ /** @deprecated use `UpdateKnowledgeRequestBody2$outboundSchema` instead. */
845
+ export const outboundSchema = UpdateKnowledgeRequestBody2$outboundSchema;
846
+ /** @deprecated use `UpdateKnowledgeRequestBody2$Outbound` instead. */
847
+ export type Outbound = UpdateKnowledgeRequestBody2$Outbound;
848
+ }
849
+
850
+ export function updateKnowledgeRequestBody2ToJSON(
851
+ updateKnowledgeRequestBody2: UpdateKnowledgeRequestBody2,
852
+ ): string {
853
+ return JSON.stringify(
854
+ UpdateKnowledgeRequestBody2$outboundSchema.parse(
855
+ updateKnowledgeRequestBody2,
856
+ ),
857
+ );
858
+ }
859
+
860
+ export function updateKnowledgeRequestBody2FromJSON(
861
+ jsonString: string,
862
+ ): SafeParseResult<UpdateKnowledgeRequestBody2, SDKValidationError> {
863
+ return safeParse(
864
+ jsonString,
865
+ (x) => UpdateKnowledgeRequestBody2$inboundSchema.parse(JSON.parse(x)),
866
+ `Failed to parse 'UpdateKnowledgeRequestBody2' from JSON`,
867
+ );
868
+ }
869
+
870
+ /** @internal */
871
+ export const RequestBodyRerankConfig$inboundSchema: z.ZodType<
872
+ RequestBodyRerankConfig,
873
+ z.ZodTypeDef,
874
+ unknown
875
+ > = z.object({
876
+ top_k: z.number().int().default(5),
877
+ rerank_threshold: z.number().default(0.5),
878
+ rerank_model: z.string(),
879
+ }).transform((v) => {
880
+ return remap$(v, {
881
+ "top_k": "topK",
882
+ "rerank_threshold": "rerankThreshold",
883
+ "rerank_model": "rerankModel",
884
+ });
885
+ });
886
+
887
+ /** @internal */
888
+ export type RequestBodyRerankConfig$Outbound = {
889
+ top_k: number;
890
+ rerank_threshold: number;
891
+ rerank_model: string;
892
+ };
893
+
894
+ /** @internal */
895
+ export const RequestBodyRerankConfig$outboundSchema: z.ZodType<
896
+ RequestBodyRerankConfig$Outbound,
897
+ z.ZodTypeDef,
898
+ RequestBodyRerankConfig
899
+ > = z.object({
900
+ topK: z.number().int().default(5),
901
+ rerankThreshold: z.number().default(0.5),
902
+ rerankModel: z.string(),
903
+ }).transform((v) => {
904
+ return remap$(v, {
905
+ topK: "top_k",
906
+ rerankThreshold: "rerank_threshold",
907
+ rerankModel: "rerank_model",
908
+ });
909
+ });
910
+
911
+ /**
912
+ * @internal
913
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
914
+ */
915
+ export namespace RequestBodyRerankConfig$ {
916
+ /** @deprecated use `RequestBodyRerankConfig$inboundSchema` instead. */
917
+ export const inboundSchema = RequestBodyRerankConfig$inboundSchema;
918
+ /** @deprecated use `RequestBodyRerankConfig$outboundSchema` instead. */
919
+ export const outboundSchema = RequestBodyRerankConfig$outboundSchema;
920
+ /** @deprecated use `RequestBodyRerankConfig$Outbound` instead. */
921
+ export type Outbound = RequestBodyRerankConfig$Outbound;
922
+ }
923
+
924
+ export function requestBodyRerankConfigToJSON(
925
+ requestBodyRerankConfig: RequestBodyRerankConfig,
926
+ ): string {
927
+ return JSON.stringify(
928
+ RequestBodyRerankConfig$outboundSchema.parse(requestBodyRerankConfig),
929
+ );
930
+ }
931
+
932
+ export function requestBodyRerankConfigFromJSON(
933
+ jsonString: string,
934
+ ): SafeParseResult<RequestBodyRerankConfig, SDKValidationError> {
935
+ return safeParse(
936
+ jsonString,
937
+ (x) => RequestBodyRerankConfig$inboundSchema.parse(JSON.parse(x)),
938
+ `Failed to parse 'RequestBodyRerankConfig' from JSON`,
939
+ );
940
+ }
941
+
942
+ /** @internal */
943
+ export const RequestBodyAgenticRagConfig$inboundSchema: z.ZodType<
944
+ RequestBodyAgenticRagConfig,
945
+ z.ZodTypeDef,
946
+ unknown
947
+ > = z.object({
948
+ model: z.string(),
949
+ });
950
+
951
+ /** @internal */
952
+ export type RequestBodyAgenticRagConfig$Outbound = {
953
+ model: string;
954
+ };
955
+
956
+ /** @internal */
957
+ export const RequestBodyAgenticRagConfig$outboundSchema: z.ZodType<
958
+ RequestBodyAgenticRagConfig$Outbound,
959
+ z.ZodTypeDef,
960
+ RequestBodyAgenticRagConfig
961
+ > = z.object({
962
+ model: z.string(),
963
+ });
964
+
965
+ /**
966
+ * @internal
967
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
968
+ */
969
+ export namespace RequestBodyAgenticRagConfig$ {
970
+ /** @deprecated use `RequestBodyAgenticRagConfig$inboundSchema` instead. */
971
+ export const inboundSchema = RequestBodyAgenticRagConfig$inboundSchema;
972
+ /** @deprecated use `RequestBodyAgenticRagConfig$outboundSchema` instead. */
973
+ export const outboundSchema = RequestBodyAgenticRagConfig$outboundSchema;
974
+ /** @deprecated use `RequestBodyAgenticRagConfig$Outbound` instead. */
975
+ export type Outbound = RequestBodyAgenticRagConfig$Outbound;
976
+ }
977
+
978
+ export function requestBodyAgenticRagConfigToJSON(
979
+ requestBodyAgenticRagConfig: RequestBodyAgenticRagConfig,
980
+ ): string {
981
+ return JSON.stringify(
982
+ RequestBodyAgenticRagConfig$outboundSchema.parse(
983
+ requestBodyAgenticRagConfig,
984
+ ),
985
+ );
986
+ }
987
+
988
+ export function requestBodyAgenticRagConfigFromJSON(
989
+ jsonString: string,
990
+ ): SafeParseResult<RequestBodyAgenticRagConfig, SDKValidationError> {
991
+ return safeParse(
992
+ jsonString,
993
+ (x) => RequestBodyAgenticRagConfig$inboundSchema.parse(JSON.parse(x)),
994
+ `Failed to parse 'RequestBodyAgenticRagConfig' from JSON`,
995
+ );
996
+ }
997
+
998
+ /** @internal */
999
+ export const RequestBodyRetrievalSettings$inboundSchema: z.ZodType<
1000
+ RequestBodyRetrievalSettings,
1001
+ z.ZodTypeDef,
1002
+ unknown
1003
+ > = z.object({
1004
+ top_k: z.number().int().default(5),
1005
+ threshold: z.number().default(0),
1006
+ rerank_config: z.nullable(z.lazy(() => RequestBodyRerankConfig$inboundSchema))
1007
+ .optional(),
1008
+ agentic_rag_config: z.nullable(
1009
+ z.lazy(() => RequestBodyAgenticRagConfig$inboundSchema),
1010
+ ).optional(),
1011
+ }).transform((v) => {
1012
+ return remap$(v, {
1013
+ "top_k": "topK",
1014
+ "rerank_config": "rerankConfig",
1015
+ "agentic_rag_config": "agenticRagConfig",
1016
+ });
1017
+ });
1018
+
1019
+ /** @internal */
1020
+ export type RequestBodyRetrievalSettings$Outbound = {
1021
+ top_k: number;
1022
+ threshold: number;
1023
+ rerank_config?: RequestBodyRerankConfig$Outbound | null | undefined;
1024
+ agentic_rag_config?: RequestBodyAgenticRagConfig$Outbound | null | undefined;
1025
+ };
1026
+
1027
+ /** @internal */
1028
+ export const RequestBodyRetrievalSettings$outboundSchema: z.ZodType<
1029
+ RequestBodyRetrievalSettings$Outbound,
1030
+ z.ZodTypeDef,
1031
+ RequestBodyRetrievalSettings
1032
+ > = z.object({
1033
+ topK: z.number().int().default(5),
1034
+ threshold: z.number().default(0),
1035
+ rerankConfig: z.nullable(z.lazy(() => RequestBodyRerankConfig$outboundSchema))
1036
+ .optional(),
1037
+ agenticRagConfig: z.nullable(
1038
+ z.lazy(() => RequestBodyAgenticRagConfig$outboundSchema),
1039
+ ).optional(),
1040
+ }).transform((v) => {
1041
+ return remap$(v, {
1042
+ topK: "top_k",
434
1043
  rerankConfig: "rerank_config",
435
1044
  agenticRagConfig: "agentic_rag_config",
436
1045
  });
@@ -440,145 +1049,789 @@ export const UpdateKnowledgeRetrievalSettings$outboundSchema: z.ZodType<
440
1049
  * @internal
441
1050
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
442
1051
  */
443
- export namespace UpdateKnowledgeRetrievalSettings$ {
444
- /** @deprecated use `UpdateKnowledgeRetrievalSettings$inboundSchema` instead. */
445
- export const inboundSchema = UpdateKnowledgeRetrievalSettings$inboundSchema;
446
- /** @deprecated use `UpdateKnowledgeRetrievalSettings$outboundSchema` instead. */
447
- export const outboundSchema = UpdateKnowledgeRetrievalSettings$outboundSchema;
448
- /** @deprecated use `UpdateKnowledgeRetrievalSettings$Outbound` instead. */
449
- export type Outbound = UpdateKnowledgeRetrievalSettings$Outbound;
1052
+ export namespace RequestBodyRetrievalSettings$ {
1053
+ /** @deprecated use `RequestBodyRetrievalSettings$inboundSchema` instead. */
1054
+ export const inboundSchema = RequestBodyRetrievalSettings$inboundSchema;
1055
+ /** @deprecated use `RequestBodyRetrievalSettings$outboundSchema` instead. */
1056
+ export const outboundSchema = RequestBodyRetrievalSettings$outboundSchema;
1057
+ /** @deprecated use `RequestBodyRetrievalSettings$Outbound` instead. */
1058
+ export type Outbound = RequestBodyRetrievalSettings$Outbound;
1059
+ }
1060
+
1061
+ export function requestBodyRetrievalSettingsToJSON(
1062
+ requestBodyRetrievalSettings: RequestBodyRetrievalSettings,
1063
+ ): string {
1064
+ return JSON.stringify(
1065
+ RequestBodyRetrievalSettings$outboundSchema.parse(
1066
+ requestBodyRetrievalSettings,
1067
+ ),
1068
+ );
1069
+ }
1070
+
1071
+ export function requestBodyRetrievalSettingsFromJSON(
1072
+ jsonString: string,
1073
+ ): SafeParseResult<RequestBodyRetrievalSettings, SDKValidationError> {
1074
+ return safeParse(
1075
+ jsonString,
1076
+ (x) => RequestBodyRetrievalSettings$inboundSchema.parse(JSON.parse(x)),
1077
+ `Failed to parse 'RequestBodyRetrievalSettings' from JSON`,
1078
+ );
1079
+ }
1080
+
1081
+ /** @internal */
1082
+ export const RequestBodyExternalConfig$inboundSchema: z.ZodType<
1083
+ RequestBodyExternalConfig,
1084
+ z.ZodTypeDef,
1085
+ unknown
1086
+ > = z.object({
1087
+ name: z.string().optional(),
1088
+ api_url: z.string().optional(),
1089
+ api_key: z.string().optional(),
1090
+ }).transform((v) => {
1091
+ return remap$(v, {
1092
+ "api_url": "apiUrl",
1093
+ "api_key": "apiKey",
1094
+ });
1095
+ });
1096
+
1097
+ /** @internal */
1098
+ export type RequestBodyExternalConfig$Outbound = {
1099
+ name?: string | undefined;
1100
+ api_url?: string | undefined;
1101
+ api_key?: string | undefined;
1102
+ };
1103
+
1104
+ /** @internal */
1105
+ export const RequestBodyExternalConfig$outboundSchema: z.ZodType<
1106
+ RequestBodyExternalConfig$Outbound,
1107
+ z.ZodTypeDef,
1108
+ RequestBodyExternalConfig
1109
+ > = z.object({
1110
+ name: z.string().optional(),
1111
+ apiUrl: z.string().optional(),
1112
+ apiKey: z.string().optional(),
1113
+ }).transform((v) => {
1114
+ return remap$(v, {
1115
+ apiUrl: "api_url",
1116
+ apiKey: "api_key",
1117
+ });
1118
+ });
1119
+
1120
+ /**
1121
+ * @internal
1122
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1123
+ */
1124
+ export namespace RequestBodyExternalConfig$ {
1125
+ /** @deprecated use `RequestBodyExternalConfig$inboundSchema` instead. */
1126
+ export const inboundSchema = RequestBodyExternalConfig$inboundSchema;
1127
+ /** @deprecated use `RequestBodyExternalConfig$outboundSchema` instead. */
1128
+ export const outboundSchema = RequestBodyExternalConfig$outboundSchema;
1129
+ /** @deprecated use `RequestBodyExternalConfig$Outbound` instead. */
1130
+ export type Outbound = RequestBodyExternalConfig$Outbound;
1131
+ }
1132
+
1133
+ export function requestBodyExternalConfigToJSON(
1134
+ requestBodyExternalConfig: RequestBodyExternalConfig,
1135
+ ): string {
1136
+ return JSON.stringify(
1137
+ RequestBodyExternalConfig$outboundSchema.parse(requestBodyExternalConfig),
1138
+ );
1139
+ }
1140
+
1141
+ export function requestBodyExternalConfigFromJSON(
1142
+ jsonString: string,
1143
+ ): SafeParseResult<RequestBodyExternalConfig, SDKValidationError> {
1144
+ return safeParse(
1145
+ jsonString,
1146
+ (x) => RequestBodyExternalConfig$inboundSchema.parse(JSON.parse(x)),
1147
+ `Failed to parse 'RequestBodyExternalConfig' from JSON`,
1148
+ );
1149
+ }
1150
+
1151
+ /** @internal */
1152
+ export const UpdateKnowledgeRequestBodyType$inboundSchema: z.ZodNativeEnum<
1153
+ typeof UpdateKnowledgeRequestBodyType
1154
+ > = z.nativeEnum(UpdateKnowledgeRequestBodyType);
1155
+
1156
+ /** @internal */
1157
+ export const UpdateKnowledgeRequestBodyType$outboundSchema: z.ZodNativeEnum<
1158
+ typeof UpdateKnowledgeRequestBodyType
1159
+ > = UpdateKnowledgeRequestBodyType$inboundSchema;
1160
+
1161
+ /**
1162
+ * @internal
1163
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1164
+ */
1165
+ export namespace UpdateKnowledgeRequestBodyType$ {
1166
+ /** @deprecated use `UpdateKnowledgeRequestBodyType$inboundSchema` instead. */
1167
+ export const inboundSchema = UpdateKnowledgeRequestBodyType$inboundSchema;
1168
+ /** @deprecated use `UpdateKnowledgeRequestBodyType$outboundSchema` instead. */
1169
+ export const outboundSchema = UpdateKnowledgeRequestBodyType$outboundSchema;
1170
+ }
1171
+
1172
+ /** @internal */
1173
+ export const UpdateKnowledgeRequestBody1$inboundSchema: z.ZodType<
1174
+ UpdateKnowledgeRequestBody1,
1175
+ z.ZodTypeDef,
1176
+ unknown
1177
+ > = z.object({
1178
+ description: z.nullable(z.string()).optional(),
1179
+ path: z.string().optional(),
1180
+ retrieval_settings: z.lazy(() => RequestBodyRetrievalSettings$inboundSchema)
1181
+ .optional(),
1182
+ external_config: z.lazy(() => RequestBodyExternalConfig$inboundSchema)
1183
+ .optional(),
1184
+ type: UpdateKnowledgeRequestBodyType$inboundSchema.default("external"),
1185
+ }).transform((v) => {
1186
+ return remap$(v, {
1187
+ "retrieval_settings": "retrievalSettings",
1188
+ "external_config": "externalConfig",
1189
+ });
1190
+ });
1191
+
1192
+ /** @internal */
1193
+ export type UpdateKnowledgeRequestBody1$Outbound = {
1194
+ description?: string | null | undefined;
1195
+ path?: string | undefined;
1196
+ retrieval_settings?: RequestBodyRetrievalSettings$Outbound | undefined;
1197
+ external_config?: RequestBodyExternalConfig$Outbound | undefined;
1198
+ type: string;
1199
+ };
1200
+
1201
+ /** @internal */
1202
+ export const UpdateKnowledgeRequestBody1$outboundSchema: z.ZodType<
1203
+ UpdateKnowledgeRequestBody1$Outbound,
1204
+ z.ZodTypeDef,
1205
+ UpdateKnowledgeRequestBody1
1206
+ > = z.object({
1207
+ description: z.nullable(z.string()).optional(),
1208
+ path: z.string().optional(),
1209
+ retrievalSettings: z.lazy(() => RequestBodyRetrievalSettings$outboundSchema)
1210
+ .optional(),
1211
+ externalConfig: z.lazy(() => RequestBodyExternalConfig$outboundSchema)
1212
+ .optional(),
1213
+ type: UpdateKnowledgeRequestBodyType$outboundSchema.default("external"),
1214
+ }).transform((v) => {
1215
+ return remap$(v, {
1216
+ retrievalSettings: "retrieval_settings",
1217
+ externalConfig: "external_config",
1218
+ });
1219
+ });
1220
+
1221
+ /**
1222
+ * @internal
1223
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1224
+ */
1225
+ export namespace UpdateKnowledgeRequestBody1$ {
1226
+ /** @deprecated use `UpdateKnowledgeRequestBody1$inboundSchema` instead. */
1227
+ export const inboundSchema = UpdateKnowledgeRequestBody1$inboundSchema;
1228
+ /** @deprecated use `UpdateKnowledgeRequestBody1$outboundSchema` instead. */
1229
+ export const outboundSchema = UpdateKnowledgeRequestBody1$outboundSchema;
1230
+ /** @deprecated use `UpdateKnowledgeRequestBody1$Outbound` instead. */
1231
+ export type Outbound = UpdateKnowledgeRequestBody1$Outbound;
1232
+ }
1233
+
1234
+ export function updateKnowledgeRequestBody1ToJSON(
1235
+ updateKnowledgeRequestBody1: UpdateKnowledgeRequestBody1,
1236
+ ): string {
1237
+ return JSON.stringify(
1238
+ UpdateKnowledgeRequestBody1$outboundSchema.parse(
1239
+ updateKnowledgeRequestBody1,
1240
+ ),
1241
+ );
1242
+ }
1243
+
1244
+ export function updateKnowledgeRequestBody1FromJSON(
1245
+ jsonString: string,
1246
+ ): SafeParseResult<UpdateKnowledgeRequestBody1, SDKValidationError> {
1247
+ return safeParse(
1248
+ jsonString,
1249
+ (x) => UpdateKnowledgeRequestBody1$inboundSchema.parse(JSON.parse(x)),
1250
+ `Failed to parse 'UpdateKnowledgeRequestBody1' from JSON`,
1251
+ );
1252
+ }
1253
+
1254
+ /** @internal */
1255
+ export const UpdateKnowledgeRequestBody$inboundSchema: z.ZodType<
1256
+ UpdateKnowledgeRequestBody,
1257
+ z.ZodTypeDef,
1258
+ unknown
1259
+ > = z.union([
1260
+ z.lazy(() => UpdateKnowledgeRequestBody1$inboundSchema),
1261
+ z.lazy(() => UpdateKnowledgeRequestBody2$inboundSchema),
1262
+ ]);
1263
+
1264
+ /** @internal */
1265
+ export type UpdateKnowledgeRequestBody$Outbound =
1266
+ | UpdateKnowledgeRequestBody1$Outbound
1267
+ | UpdateKnowledgeRequestBody2$Outbound;
1268
+
1269
+ /** @internal */
1270
+ export const UpdateKnowledgeRequestBody$outboundSchema: z.ZodType<
1271
+ UpdateKnowledgeRequestBody$Outbound,
1272
+ z.ZodTypeDef,
1273
+ UpdateKnowledgeRequestBody
1274
+ > = z.union([
1275
+ z.lazy(() => UpdateKnowledgeRequestBody1$outboundSchema),
1276
+ z.lazy(() => UpdateKnowledgeRequestBody2$outboundSchema),
1277
+ ]);
1278
+
1279
+ /**
1280
+ * @internal
1281
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1282
+ */
1283
+ export namespace UpdateKnowledgeRequestBody$ {
1284
+ /** @deprecated use `UpdateKnowledgeRequestBody$inboundSchema` instead. */
1285
+ export const inboundSchema = UpdateKnowledgeRequestBody$inboundSchema;
1286
+ /** @deprecated use `UpdateKnowledgeRequestBody$outboundSchema` instead. */
1287
+ export const outboundSchema = UpdateKnowledgeRequestBody$outboundSchema;
1288
+ /** @deprecated use `UpdateKnowledgeRequestBody$Outbound` instead. */
1289
+ export type Outbound = UpdateKnowledgeRequestBody$Outbound;
1290
+ }
1291
+
1292
+ export function updateKnowledgeRequestBodyToJSON(
1293
+ updateKnowledgeRequestBody: UpdateKnowledgeRequestBody,
1294
+ ): string {
1295
+ return JSON.stringify(
1296
+ UpdateKnowledgeRequestBody$outboundSchema.parse(updateKnowledgeRequestBody),
1297
+ );
1298
+ }
1299
+
1300
+ export function updateKnowledgeRequestBodyFromJSON(
1301
+ jsonString: string,
1302
+ ): SafeParseResult<UpdateKnowledgeRequestBody, SDKValidationError> {
1303
+ return safeParse(
1304
+ jsonString,
1305
+ (x) => UpdateKnowledgeRequestBody$inboundSchema.parse(JSON.parse(x)),
1306
+ `Failed to parse 'UpdateKnowledgeRequestBody' from JSON`,
1307
+ );
1308
+ }
1309
+
1310
+ /** @internal */
1311
+ export const UpdateKnowledgeRequest$inboundSchema: z.ZodType<
1312
+ UpdateKnowledgeRequest,
1313
+ z.ZodTypeDef,
1314
+ unknown
1315
+ > = z.object({
1316
+ knowledge_id: z.string(),
1317
+ RequestBody: z.union([
1318
+ z.lazy(() => UpdateKnowledgeRequestBody1$inboundSchema),
1319
+ z.lazy(() => UpdateKnowledgeRequestBody2$inboundSchema),
1320
+ ]),
1321
+ }).transform((v) => {
1322
+ return remap$(v, {
1323
+ "knowledge_id": "knowledgeId",
1324
+ "RequestBody": "requestBody",
1325
+ });
1326
+ });
1327
+
1328
+ /** @internal */
1329
+ export type UpdateKnowledgeRequest$Outbound = {
1330
+ knowledge_id: string;
1331
+ RequestBody:
1332
+ | UpdateKnowledgeRequestBody1$Outbound
1333
+ | UpdateKnowledgeRequestBody2$Outbound;
1334
+ };
1335
+
1336
+ /** @internal */
1337
+ export const UpdateKnowledgeRequest$outboundSchema: z.ZodType<
1338
+ UpdateKnowledgeRequest$Outbound,
1339
+ z.ZodTypeDef,
1340
+ UpdateKnowledgeRequest
1341
+ > = z.object({
1342
+ knowledgeId: z.string(),
1343
+ requestBody: z.union([
1344
+ z.lazy(() => UpdateKnowledgeRequestBody1$outboundSchema),
1345
+ z.lazy(() => UpdateKnowledgeRequestBody2$outboundSchema),
1346
+ ]),
1347
+ }).transform((v) => {
1348
+ return remap$(v, {
1349
+ knowledgeId: "knowledge_id",
1350
+ requestBody: "RequestBody",
1351
+ });
1352
+ });
1353
+
1354
+ /**
1355
+ * @internal
1356
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1357
+ */
1358
+ export namespace UpdateKnowledgeRequest$ {
1359
+ /** @deprecated use `UpdateKnowledgeRequest$inboundSchema` instead. */
1360
+ export const inboundSchema = UpdateKnowledgeRequest$inboundSchema;
1361
+ /** @deprecated use `UpdateKnowledgeRequest$outboundSchema` instead. */
1362
+ export const outboundSchema = UpdateKnowledgeRequest$outboundSchema;
1363
+ /** @deprecated use `UpdateKnowledgeRequest$Outbound` instead. */
1364
+ export type Outbound = UpdateKnowledgeRequest$Outbound;
1365
+ }
1366
+
1367
+ export function updateKnowledgeRequestToJSON(
1368
+ updateKnowledgeRequest: UpdateKnowledgeRequest,
1369
+ ): string {
1370
+ return JSON.stringify(
1371
+ UpdateKnowledgeRequest$outboundSchema.parse(updateKnowledgeRequest),
1372
+ );
1373
+ }
1374
+
1375
+ export function updateKnowledgeRequestFromJSON(
1376
+ jsonString: string,
1377
+ ): SafeParseResult<UpdateKnowledgeRequest, SDKValidationError> {
1378
+ return safeParse(
1379
+ jsonString,
1380
+ (x) => UpdateKnowledgeRequest$inboundSchema.parse(JSON.parse(x)),
1381
+ `Failed to parse 'UpdateKnowledgeRequest' from JSON`,
1382
+ );
1383
+ }
1384
+
1385
+ /** @internal */
1386
+ export const UpdateKnowledgeResponseBodyKnowledgeType$inboundSchema:
1387
+ z.ZodNativeEnum<typeof UpdateKnowledgeResponseBodyKnowledgeType> = z
1388
+ .nativeEnum(UpdateKnowledgeResponseBodyKnowledgeType);
1389
+
1390
+ /** @internal */
1391
+ export const UpdateKnowledgeResponseBodyKnowledgeType$outboundSchema:
1392
+ z.ZodNativeEnum<typeof UpdateKnowledgeResponseBodyKnowledgeType> =
1393
+ UpdateKnowledgeResponseBodyKnowledgeType$inboundSchema;
1394
+
1395
+ /**
1396
+ * @internal
1397
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1398
+ */
1399
+ export namespace UpdateKnowledgeResponseBodyKnowledgeType$ {
1400
+ /** @deprecated use `UpdateKnowledgeResponseBodyKnowledgeType$inboundSchema` instead. */
1401
+ export const inboundSchema =
1402
+ UpdateKnowledgeResponseBodyKnowledgeType$inboundSchema;
1403
+ /** @deprecated use `UpdateKnowledgeResponseBodyKnowledgeType$outboundSchema` instead. */
1404
+ export const outboundSchema =
1405
+ UpdateKnowledgeResponseBodyKnowledgeType$outboundSchema;
1406
+ }
1407
+
1408
+ /** @internal */
1409
+ export const UpdateKnowledgeResponseBodyKnowledgeRerankConfig$inboundSchema:
1410
+ z.ZodType<
1411
+ UpdateKnowledgeResponseBodyKnowledgeRerankConfig,
1412
+ z.ZodTypeDef,
1413
+ unknown
1414
+ > = z.object({
1415
+ top_k: z.number().int().default(5),
1416
+ rerank_threshold: z.number().default(0.5),
1417
+ rerank_model: z.string(),
1418
+ }).transform((v) => {
1419
+ return remap$(v, {
1420
+ "top_k": "topK",
1421
+ "rerank_threshold": "rerankThreshold",
1422
+ "rerank_model": "rerankModel",
1423
+ });
1424
+ });
1425
+
1426
+ /** @internal */
1427
+ export type UpdateKnowledgeResponseBodyKnowledgeRerankConfig$Outbound = {
1428
+ top_k: number;
1429
+ rerank_threshold: number;
1430
+ rerank_model: string;
1431
+ };
1432
+
1433
+ /** @internal */
1434
+ export const UpdateKnowledgeResponseBodyKnowledgeRerankConfig$outboundSchema:
1435
+ z.ZodType<
1436
+ UpdateKnowledgeResponseBodyKnowledgeRerankConfig$Outbound,
1437
+ z.ZodTypeDef,
1438
+ UpdateKnowledgeResponseBodyKnowledgeRerankConfig
1439
+ > = z.object({
1440
+ topK: z.number().int().default(5),
1441
+ rerankThreshold: z.number().default(0.5),
1442
+ rerankModel: z.string(),
1443
+ }).transform((v) => {
1444
+ return remap$(v, {
1445
+ topK: "top_k",
1446
+ rerankThreshold: "rerank_threshold",
1447
+ rerankModel: "rerank_model",
1448
+ });
1449
+ });
1450
+
1451
+ /**
1452
+ * @internal
1453
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1454
+ */
1455
+ export namespace UpdateKnowledgeResponseBodyKnowledgeRerankConfig$ {
1456
+ /** @deprecated use `UpdateKnowledgeResponseBodyKnowledgeRerankConfig$inboundSchema` instead. */
1457
+ export const inboundSchema =
1458
+ UpdateKnowledgeResponseBodyKnowledgeRerankConfig$inboundSchema;
1459
+ /** @deprecated use `UpdateKnowledgeResponseBodyKnowledgeRerankConfig$outboundSchema` instead. */
1460
+ export const outboundSchema =
1461
+ UpdateKnowledgeResponseBodyKnowledgeRerankConfig$outboundSchema;
1462
+ /** @deprecated use `UpdateKnowledgeResponseBodyKnowledgeRerankConfig$Outbound` instead. */
1463
+ export type Outbound =
1464
+ UpdateKnowledgeResponseBodyKnowledgeRerankConfig$Outbound;
1465
+ }
1466
+
1467
+ export function updateKnowledgeResponseBodyKnowledgeRerankConfigToJSON(
1468
+ updateKnowledgeResponseBodyKnowledgeRerankConfig:
1469
+ UpdateKnowledgeResponseBodyKnowledgeRerankConfig,
1470
+ ): string {
1471
+ return JSON.stringify(
1472
+ UpdateKnowledgeResponseBodyKnowledgeRerankConfig$outboundSchema.parse(
1473
+ updateKnowledgeResponseBodyKnowledgeRerankConfig,
1474
+ ),
1475
+ );
1476
+ }
1477
+
1478
+ export function updateKnowledgeResponseBodyKnowledgeRerankConfigFromJSON(
1479
+ jsonString: string,
1480
+ ): SafeParseResult<
1481
+ UpdateKnowledgeResponseBodyKnowledgeRerankConfig,
1482
+ SDKValidationError
1483
+ > {
1484
+ return safeParse(
1485
+ jsonString,
1486
+ (x) =>
1487
+ UpdateKnowledgeResponseBodyKnowledgeRerankConfig$inboundSchema.parse(
1488
+ JSON.parse(x),
1489
+ ),
1490
+ `Failed to parse 'UpdateKnowledgeResponseBodyKnowledgeRerankConfig' from JSON`,
1491
+ );
1492
+ }
1493
+
1494
+ /** @internal */
1495
+ export const UpdateKnowledgeResponseBodyKnowledgeAgenticRagConfig$inboundSchema:
1496
+ z.ZodType<
1497
+ UpdateKnowledgeResponseBodyKnowledgeAgenticRagConfig,
1498
+ z.ZodTypeDef,
1499
+ unknown
1500
+ > = z.object({
1501
+ model: z.string(),
1502
+ });
1503
+
1504
+ /** @internal */
1505
+ export type UpdateKnowledgeResponseBodyKnowledgeAgenticRagConfig$Outbound = {
1506
+ model: string;
1507
+ };
1508
+
1509
+ /** @internal */
1510
+ export const UpdateKnowledgeResponseBodyKnowledgeAgenticRagConfig$outboundSchema:
1511
+ z.ZodType<
1512
+ UpdateKnowledgeResponseBodyKnowledgeAgenticRagConfig$Outbound,
1513
+ z.ZodTypeDef,
1514
+ UpdateKnowledgeResponseBodyKnowledgeAgenticRagConfig
1515
+ > = z.object({
1516
+ model: z.string(),
1517
+ });
1518
+
1519
+ /**
1520
+ * @internal
1521
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1522
+ */
1523
+ export namespace UpdateKnowledgeResponseBodyKnowledgeAgenticRagConfig$ {
1524
+ /** @deprecated use `UpdateKnowledgeResponseBodyKnowledgeAgenticRagConfig$inboundSchema` instead. */
1525
+ export const inboundSchema =
1526
+ UpdateKnowledgeResponseBodyKnowledgeAgenticRagConfig$inboundSchema;
1527
+ /** @deprecated use `UpdateKnowledgeResponseBodyKnowledgeAgenticRagConfig$outboundSchema` instead. */
1528
+ export const outboundSchema =
1529
+ UpdateKnowledgeResponseBodyKnowledgeAgenticRagConfig$outboundSchema;
1530
+ /** @deprecated use `UpdateKnowledgeResponseBodyKnowledgeAgenticRagConfig$Outbound` instead. */
1531
+ export type Outbound =
1532
+ UpdateKnowledgeResponseBodyKnowledgeAgenticRagConfig$Outbound;
1533
+ }
1534
+
1535
+ export function updateKnowledgeResponseBodyKnowledgeAgenticRagConfigToJSON(
1536
+ updateKnowledgeResponseBodyKnowledgeAgenticRagConfig:
1537
+ UpdateKnowledgeResponseBodyKnowledgeAgenticRagConfig,
1538
+ ): string {
1539
+ return JSON.stringify(
1540
+ UpdateKnowledgeResponseBodyKnowledgeAgenticRagConfig$outboundSchema.parse(
1541
+ updateKnowledgeResponseBodyKnowledgeAgenticRagConfig,
1542
+ ),
1543
+ );
1544
+ }
1545
+
1546
+ export function updateKnowledgeResponseBodyKnowledgeAgenticRagConfigFromJSON(
1547
+ jsonString: string,
1548
+ ): SafeParseResult<
1549
+ UpdateKnowledgeResponseBodyKnowledgeAgenticRagConfig,
1550
+ SDKValidationError
1551
+ > {
1552
+ return safeParse(
1553
+ jsonString,
1554
+ (x) =>
1555
+ UpdateKnowledgeResponseBodyKnowledgeAgenticRagConfig$inboundSchema.parse(
1556
+ JSON.parse(x),
1557
+ ),
1558
+ `Failed to parse 'UpdateKnowledgeResponseBodyKnowledgeAgenticRagConfig' from JSON`,
1559
+ );
1560
+ }
1561
+
1562
+ /** @internal */
1563
+ export const UpdateKnowledgeResponseBodyKnowledgeRetrievalSettings$inboundSchema:
1564
+ z.ZodType<
1565
+ UpdateKnowledgeResponseBodyKnowledgeRetrievalSettings,
1566
+ z.ZodTypeDef,
1567
+ unknown
1568
+ > = z.object({
1569
+ top_k: z.number().int().default(5),
1570
+ threshold: z.number().default(0),
1571
+ rerank_config: z.nullable(
1572
+ z.lazy(() =>
1573
+ UpdateKnowledgeResponseBodyKnowledgeRerankConfig$inboundSchema
1574
+ ),
1575
+ ).optional(),
1576
+ agentic_rag_config: z.nullable(
1577
+ z.lazy(() =>
1578
+ UpdateKnowledgeResponseBodyKnowledgeAgenticRagConfig$inboundSchema
1579
+ ),
1580
+ ).optional(),
1581
+ }).transform((v) => {
1582
+ return remap$(v, {
1583
+ "top_k": "topK",
1584
+ "rerank_config": "rerankConfig",
1585
+ "agentic_rag_config": "agenticRagConfig",
1586
+ });
1587
+ });
1588
+
1589
+ /** @internal */
1590
+ export type UpdateKnowledgeResponseBodyKnowledgeRetrievalSettings$Outbound = {
1591
+ top_k: number;
1592
+ threshold: number;
1593
+ rerank_config?:
1594
+ | UpdateKnowledgeResponseBodyKnowledgeRerankConfig$Outbound
1595
+ | null
1596
+ | undefined;
1597
+ agentic_rag_config?:
1598
+ | UpdateKnowledgeResponseBodyKnowledgeAgenticRagConfig$Outbound
1599
+ | null
1600
+ | undefined;
1601
+ };
1602
+
1603
+ /** @internal */
1604
+ export const UpdateKnowledgeResponseBodyKnowledgeRetrievalSettings$outboundSchema:
1605
+ z.ZodType<
1606
+ UpdateKnowledgeResponseBodyKnowledgeRetrievalSettings$Outbound,
1607
+ z.ZodTypeDef,
1608
+ UpdateKnowledgeResponseBodyKnowledgeRetrievalSettings
1609
+ > = z.object({
1610
+ topK: z.number().int().default(5),
1611
+ threshold: z.number().default(0),
1612
+ rerankConfig: z.nullable(
1613
+ z.lazy(() =>
1614
+ UpdateKnowledgeResponseBodyKnowledgeRerankConfig$outboundSchema
1615
+ ),
1616
+ ).optional(),
1617
+ agenticRagConfig: z.nullable(
1618
+ z.lazy(() =>
1619
+ UpdateKnowledgeResponseBodyKnowledgeAgenticRagConfig$outboundSchema
1620
+ ),
1621
+ ).optional(),
1622
+ }).transform((v) => {
1623
+ return remap$(v, {
1624
+ topK: "top_k",
1625
+ rerankConfig: "rerank_config",
1626
+ agenticRagConfig: "agentic_rag_config",
1627
+ });
1628
+ });
1629
+
1630
+ /**
1631
+ * @internal
1632
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1633
+ */
1634
+ export namespace UpdateKnowledgeResponseBodyKnowledgeRetrievalSettings$ {
1635
+ /** @deprecated use `UpdateKnowledgeResponseBodyKnowledgeRetrievalSettings$inboundSchema` instead. */
1636
+ export const inboundSchema =
1637
+ UpdateKnowledgeResponseBodyKnowledgeRetrievalSettings$inboundSchema;
1638
+ /** @deprecated use `UpdateKnowledgeResponseBodyKnowledgeRetrievalSettings$outboundSchema` instead. */
1639
+ export const outboundSchema =
1640
+ UpdateKnowledgeResponseBodyKnowledgeRetrievalSettings$outboundSchema;
1641
+ /** @deprecated use `UpdateKnowledgeResponseBodyKnowledgeRetrievalSettings$Outbound` instead. */
1642
+ export type Outbound =
1643
+ UpdateKnowledgeResponseBodyKnowledgeRetrievalSettings$Outbound;
450
1644
  }
451
1645
 
452
- export function updateKnowledgeRetrievalSettingsToJSON(
453
- updateKnowledgeRetrievalSettings: UpdateKnowledgeRetrievalSettings,
1646
+ export function updateKnowledgeResponseBodyKnowledgeRetrievalSettingsToJSON(
1647
+ updateKnowledgeResponseBodyKnowledgeRetrievalSettings:
1648
+ UpdateKnowledgeResponseBodyKnowledgeRetrievalSettings,
454
1649
  ): string {
455
1650
  return JSON.stringify(
456
- UpdateKnowledgeRetrievalSettings$outboundSchema.parse(
457
- updateKnowledgeRetrievalSettings,
1651
+ UpdateKnowledgeResponseBodyKnowledgeRetrievalSettings$outboundSchema.parse(
1652
+ updateKnowledgeResponseBodyKnowledgeRetrievalSettings,
458
1653
  ),
459
1654
  );
460
1655
  }
461
1656
 
462
- export function updateKnowledgeRetrievalSettingsFromJSON(
1657
+ export function updateKnowledgeResponseBodyKnowledgeRetrievalSettingsFromJSON(
463
1658
  jsonString: string,
464
- ): SafeParseResult<UpdateKnowledgeRetrievalSettings, SDKValidationError> {
1659
+ ): SafeParseResult<
1660
+ UpdateKnowledgeResponseBodyKnowledgeRetrievalSettings,
1661
+ SDKValidationError
1662
+ > {
465
1663
  return safeParse(
466
1664
  jsonString,
467
- (x) => UpdateKnowledgeRetrievalSettings$inboundSchema.parse(JSON.parse(x)),
468
- `Failed to parse 'UpdateKnowledgeRetrievalSettings' from JSON`,
1665
+ (x) =>
1666
+ UpdateKnowledgeResponseBodyKnowledgeRetrievalSettings$inboundSchema.parse(
1667
+ JSON.parse(x),
1668
+ ),
1669
+ `Failed to parse 'UpdateKnowledgeResponseBodyKnowledgeRetrievalSettings' from JSON`,
469
1670
  );
470
1671
  }
471
1672
 
472
1673
  /** @internal */
473
- export const UpdateKnowledgeRequestBody$inboundSchema: z.ZodType<
474
- UpdateKnowledgeRequestBody,
1674
+ export const UpdateKnowledgeResponseBodyExternalConfig$inboundSchema: z.ZodType<
1675
+ UpdateKnowledgeResponseBodyExternalConfig,
475
1676
  z.ZodTypeDef,
476
1677
  unknown
477
1678
  > = z.object({
478
- description: z.nullable(z.string()).optional(),
479
- embedding_model: z.string().optional(),
480
- path: z.string().optional(),
481
- retrieval_settings: z.lazy(() =>
482
- UpdateKnowledgeRetrievalSettings$inboundSchema
483
- ).optional(),
1679
+ name: z.string(),
1680
+ api_url: z.string(),
484
1681
  }).transform((v) => {
485
1682
  return remap$(v, {
486
- "embedding_model": "embeddingModel",
487
- "retrieval_settings": "retrievalSettings",
1683
+ "api_url": "apiUrl",
488
1684
  });
489
1685
  });
490
1686
 
491
1687
  /** @internal */
492
- export type UpdateKnowledgeRequestBody$Outbound = {
493
- description?: string | null | undefined;
494
- embedding_model?: string | undefined;
495
- path?: string | undefined;
496
- retrieval_settings?: UpdateKnowledgeRetrievalSettings$Outbound | undefined;
1688
+ export type UpdateKnowledgeResponseBodyExternalConfig$Outbound = {
1689
+ name: string;
1690
+ api_url: string;
497
1691
  };
498
1692
 
499
1693
  /** @internal */
500
- export const UpdateKnowledgeRequestBody$outboundSchema: z.ZodType<
501
- UpdateKnowledgeRequestBody$Outbound,
502
- z.ZodTypeDef,
503
- UpdateKnowledgeRequestBody
504
- > = z.object({
505
- description: z.nullable(z.string()).optional(),
506
- embeddingModel: z.string().optional(),
507
- path: z.string().optional(),
508
- retrievalSettings: z.lazy(() =>
509
- UpdateKnowledgeRetrievalSettings$outboundSchema
510
- ).optional(),
511
- }).transform((v) => {
512
- return remap$(v, {
513
- embeddingModel: "embedding_model",
514
- retrievalSettings: "retrieval_settings",
1694
+ export const UpdateKnowledgeResponseBodyExternalConfig$outboundSchema:
1695
+ z.ZodType<
1696
+ UpdateKnowledgeResponseBodyExternalConfig$Outbound,
1697
+ z.ZodTypeDef,
1698
+ UpdateKnowledgeResponseBodyExternalConfig
1699
+ > = z.object({
1700
+ name: z.string(),
1701
+ apiUrl: z.string(),
1702
+ }).transform((v) => {
1703
+ return remap$(v, {
1704
+ apiUrl: "api_url",
1705
+ });
515
1706
  });
516
- });
517
1707
 
518
1708
  /**
519
1709
  * @internal
520
1710
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
521
1711
  */
522
- export namespace UpdateKnowledgeRequestBody$ {
523
- /** @deprecated use `UpdateKnowledgeRequestBody$inboundSchema` instead. */
524
- export const inboundSchema = UpdateKnowledgeRequestBody$inboundSchema;
525
- /** @deprecated use `UpdateKnowledgeRequestBody$outboundSchema` instead. */
526
- export const outboundSchema = UpdateKnowledgeRequestBody$outboundSchema;
527
- /** @deprecated use `UpdateKnowledgeRequestBody$Outbound` instead. */
528
- export type Outbound = UpdateKnowledgeRequestBody$Outbound;
1712
+ export namespace UpdateKnowledgeResponseBodyExternalConfig$ {
1713
+ /** @deprecated use `UpdateKnowledgeResponseBodyExternalConfig$inboundSchema` instead. */
1714
+ export const inboundSchema =
1715
+ UpdateKnowledgeResponseBodyExternalConfig$inboundSchema;
1716
+ /** @deprecated use `UpdateKnowledgeResponseBodyExternalConfig$outboundSchema` instead. */
1717
+ export const outboundSchema =
1718
+ UpdateKnowledgeResponseBodyExternalConfig$outboundSchema;
1719
+ /** @deprecated use `UpdateKnowledgeResponseBodyExternalConfig$Outbound` instead. */
1720
+ export type Outbound = UpdateKnowledgeResponseBodyExternalConfig$Outbound;
529
1721
  }
530
1722
 
531
- export function updateKnowledgeRequestBodyToJSON(
532
- updateKnowledgeRequestBody: UpdateKnowledgeRequestBody,
1723
+ export function updateKnowledgeResponseBodyExternalConfigToJSON(
1724
+ updateKnowledgeResponseBodyExternalConfig:
1725
+ UpdateKnowledgeResponseBodyExternalConfig,
533
1726
  ): string {
534
1727
  return JSON.stringify(
535
- UpdateKnowledgeRequestBody$outboundSchema.parse(updateKnowledgeRequestBody),
1728
+ UpdateKnowledgeResponseBodyExternalConfig$outboundSchema.parse(
1729
+ updateKnowledgeResponseBodyExternalConfig,
1730
+ ),
536
1731
  );
537
1732
  }
538
1733
 
539
- export function updateKnowledgeRequestBodyFromJSON(
1734
+ export function updateKnowledgeResponseBodyExternalConfigFromJSON(
540
1735
  jsonString: string,
541
- ): SafeParseResult<UpdateKnowledgeRequestBody, SDKValidationError> {
1736
+ ): SafeParseResult<
1737
+ UpdateKnowledgeResponseBodyExternalConfig,
1738
+ SDKValidationError
1739
+ > {
542
1740
  return safeParse(
543
1741
  jsonString,
544
- (x) => UpdateKnowledgeRequestBody$inboundSchema.parse(JSON.parse(x)),
545
- `Failed to parse 'UpdateKnowledgeRequestBody' from JSON`,
1742
+ (x) =>
1743
+ UpdateKnowledgeResponseBodyExternalConfig$inboundSchema.parse(
1744
+ JSON.parse(x),
1745
+ ),
1746
+ `Failed to parse 'UpdateKnowledgeResponseBodyExternalConfig' from JSON`,
546
1747
  );
547
1748
  }
548
1749
 
549
1750
  /** @internal */
550
- export const UpdateKnowledgeRequest$inboundSchema: z.ZodType<
551
- UpdateKnowledgeRequest,
1751
+ export const UpdateKnowledgeResponseBody2$inboundSchema: z.ZodType<
1752
+ UpdateKnowledgeResponseBody2,
552
1753
  z.ZodTypeDef,
553
1754
  unknown
554
1755
  > = z.object({
555
- knowledge_id: z.string(),
556
- RequestBody: z.lazy(() => UpdateKnowledgeRequestBody$inboundSchema),
1756
+ _id: z.string(),
1757
+ created: z.string(),
1758
+ description: z.string().optional(),
1759
+ key: z.string(),
1760
+ domain_id: z.string(),
1761
+ path: z.string().optional(),
1762
+ created_by_id: z.nullable(z.string()).optional(),
1763
+ updated_by_id: z.nullable(z.string()).optional(),
1764
+ updated: z.string(),
1765
+ type: UpdateKnowledgeResponseBodyKnowledgeType$inboundSchema.default(
1766
+ "external",
1767
+ ),
1768
+ retrieval_settings: z.lazy(() =>
1769
+ UpdateKnowledgeResponseBodyKnowledgeRetrievalSettings$inboundSchema
1770
+ ).optional(),
1771
+ external_config: z.lazy(() =>
1772
+ UpdateKnowledgeResponseBodyExternalConfig$inboundSchema
1773
+ ),
557
1774
  }).transform((v) => {
558
1775
  return remap$(v, {
559
- "knowledge_id": "knowledgeId",
560
- "RequestBody": "requestBody",
1776
+ "_id": "id",
1777
+ "domain_id": "domainId",
1778
+ "created_by_id": "createdById",
1779
+ "updated_by_id": "updatedById",
1780
+ "retrieval_settings": "retrievalSettings",
1781
+ "external_config": "externalConfig",
561
1782
  });
562
1783
  });
563
1784
 
564
1785
  /** @internal */
565
- export type UpdateKnowledgeRequest$Outbound = {
566
- knowledge_id: string;
567
- RequestBody: UpdateKnowledgeRequestBody$Outbound;
1786
+ export type UpdateKnowledgeResponseBody2$Outbound = {
1787
+ _id: string;
1788
+ created: string;
1789
+ description?: string | undefined;
1790
+ key: string;
1791
+ domain_id: string;
1792
+ path?: string | undefined;
1793
+ created_by_id?: string | null | undefined;
1794
+ updated_by_id?: string | null | undefined;
1795
+ updated: string;
1796
+ type: string;
1797
+ retrieval_settings?:
1798
+ | UpdateKnowledgeResponseBodyKnowledgeRetrievalSettings$Outbound
1799
+ | undefined;
1800
+ external_config: UpdateKnowledgeResponseBodyExternalConfig$Outbound;
568
1801
  };
569
1802
 
570
1803
  /** @internal */
571
- export const UpdateKnowledgeRequest$outboundSchema: z.ZodType<
572
- UpdateKnowledgeRequest$Outbound,
1804
+ export const UpdateKnowledgeResponseBody2$outboundSchema: z.ZodType<
1805
+ UpdateKnowledgeResponseBody2$Outbound,
573
1806
  z.ZodTypeDef,
574
- UpdateKnowledgeRequest
1807
+ UpdateKnowledgeResponseBody2
575
1808
  > = z.object({
576
- knowledgeId: z.string(),
577
- requestBody: z.lazy(() => UpdateKnowledgeRequestBody$outboundSchema),
1809
+ id: z.string(),
1810
+ created: z.string(),
1811
+ description: z.string().optional(),
1812
+ key: z.string(),
1813
+ domainId: z.string(),
1814
+ path: z.string().optional(),
1815
+ createdById: z.nullable(z.string()).optional(),
1816
+ updatedById: z.nullable(z.string()).optional(),
1817
+ updated: z.string(),
1818
+ type: UpdateKnowledgeResponseBodyKnowledgeType$outboundSchema.default(
1819
+ "external",
1820
+ ),
1821
+ retrievalSettings: z.lazy(() =>
1822
+ UpdateKnowledgeResponseBodyKnowledgeRetrievalSettings$outboundSchema
1823
+ ).optional(),
1824
+ externalConfig: z.lazy(() =>
1825
+ UpdateKnowledgeResponseBodyExternalConfig$outboundSchema
1826
+ ),
578
1827
  }).transform((v) => {
579
1828
  return remap$(v, {
580
- knowledgeId: "knowledge_id",
581
- requestBody: "RequestBody",
1829
+ id: "_id",
1830
+ domainId: "domain_id",
1831
+ createdById: "created_by_id",
1832
+ updatedById: "updated_by_id",
1833
+ retrievalSettings: "retrieval_settings",
1834
+ externalConfig: "external_config",
582
1835
  });
583
1836
  });
584
1837
 
@@ -586,60 +1839,82 @@ export const UpdateKnowledgeRequest$outboundSchema: z.ZodType<
586
1839
  * @internal
587
1840
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
588
1841
  */
589
- export namespace UpdateKnowledgeRequest$ {
590
- /** @deprecated use `UpdateKnowledgeRequest$inboundSchema` instead. */
591
- export const inboundSchema = UpdateKnowledgeRequest$inboundSchema;
592
- /** @deprecated use `UpdateKnowledgeRequest$outboundSchema` instead. */
593
- export const outboundSchema = UpdateKnowledgeRequest$outboundSchema;
594
- /** @deprecated use `UpdateKnowledgeRequest$Outbound` instead. */
595
- export type Outbound = UpdateKnowledgeRequest$Outbound;
1842
+ export namespace UpdateKnowledgeResponseBody2$ {
1843
+ /** @deprecated use `UpdateKnowledgeResponseBody2$inboundSchema` instead. */
1844
+ export const inboundSchema = UpdateKnowledgeResponseBody2$inboundSchema;
1845
+ /** @deprecated use `UpdateKnowledgeResponseBody2$outboundSchema` instead. */
1846
+ export const outboundSchema = UpdateKnowledgeResponseBody2$outboundSchema;
1847
+ /** @deprecated use `UpdateKnowledgeResponseBody2$Outbound` instead. */
1848
+ export type Outbound = UpdateKnowledgeResponseBody2$Outbound;
596
1849
  }
597
1850
 
598
- export function updateKnowledgeRequestToJSON(
599
- updateKnowledgeRequest: UpdateKnowledgeRequest,
1851
+ export function updateKnowledgeResponseBody2ToJSON(
1852
+ updateKnowledgeResponseBody2: UpdateKnowledgeResponseBody2,
600
1853
  ): string {
601
1854
  return JSON.stringify(
602
- UpdateKnowledgeRequest$outboundSchema.parse(updateKnowledgeRequest),
1855
+ UpdateKnowledgeResponseBody2$outboundSchema.parse(
1856
+ updateKnowledgeResponseBody2,
1857
+ ),
603
1858
  );
604
1859
  }
605
1860
 
606
- export function updateKnowledgeRequestFromJSON(
1861
+ export function updateKnowledgeResponseBody2FromJSON(
607
1862
  jsonString: string,
608
- ): SafeParseResult<UpdateKnowledgeRequest, SDKValidationError> {
1863
+ ): SafeParseResult<UpdateKnowledgeResponseBody2, SDKValidationError> {
609
1864
  return safeParse(
610
1865
  jsonString,
611
- (x) => UpdateKnowledgeRequest$inboundSchema.parse(JSON.parse(x)),
612
- `Failed to parse 'UpdateKnowledgeRequest' from JSON`,
1866
+ (x) => UpdateKnowledgeResponseBody2$inboundSchema.parse(JSON.parse(x)),
1867
+ `Failed to parse 'UpdateKnowledgeResponseBody2' from JSON`,
613
1868
  );
614
1869
  }
615
1870
 
616
1871
  /** @internal */
617
- export const UpdateKnowledgeKnowledgeRetrievalType$inboundSchema:
618
- z.ZodNativeEnum<typeof UpdateKnowledgeKnowledgeRetrievalType> = z.nativeEnum(
619
- UpdateKnowledgeKnowledgeRetrievalType,
620
- );
1872
+ export const UpdateKnowledgeResponseBodyType$inboundSchema: z.ZodNativeEnum<
1873
+ typeof UpdateKnowledgeResponseBodyType
1874
+ > = z.nativeEnum(UpdateKnowledgeResponseBodyType);
1875
+
1876
+ /** @internal */
1877
+ export const UpdateKnowledgeResponseBodyType$outboundSchema: z.ZodNativeEnum<
1878
+ typeof UpdateKnowledgeResponseBodyType
1879
+ > = UpdateKnowledgeResponseBodyType$inboundSchema;
1880
+
1881
+ /**
1882
+ * @internal
1883
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1884
+ */
1885
+ export namespace UpdateKnowledgeResponseBodyType$ {
1886
+ /** @deprecated use `UpdateKnowledgeResponseBodyType$inboundSchema` instead. */
1887
+ export const inboundSchema = UpdateKnowledgeResponseBodyType$inboundSchema;
1888
+ /** @deprecated use `UpdateKnowledgeResponseBodyType$outboundSchema` instead. */
1889
+ export const outboundSchema = UpdateKnowledgeResponseBodyType$outboundSchema;
1890
+ }
1891
+
1892
+ /** @internal */
1893
+ export const UpdateKnowledgeResponseBodyRetrievalType$inboundSchema:
1894
+ z.ZodNativeEnum<typeof UpdateKnowledgeResponseBodyRetrievalType> = z
1895
+ .nativeEnum(UpdateKnowledgeResponseBodyRetrievalType);
621
1896
 
622
1897
  /** @internal */
623
- export const UpdateKnowledgeKnowledgeRetrievalType$outboundSchema:
624
- z.ZodNativeEnum<typeof UpdateKnowledgeKnowledgeRetrievalType> =
625
- UpdateKnowledgeKnowledgeRetrievalType$inboundSchema;
1898
+ export const UpdateKnowledgeResponseBodyRetrievalType$outboundSchema:
1899
+ z.ZodNativeEnum<typeof UpdateKnowledgeResponseBodyRetrievalType> =
1900
+ UpdateKnowledgeResponseBodyRetrievalType$inboundSchema;
626
1901
 
627
1902
  /**
628
1903
  * @internal
629
1904
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
630
1905
  */
631
- export namespace UpdateKnowledgeKnowledgeRetrievalType$ {
632
- /** @deprecated use `UpdateKnowledgeKnowledgeRetrievalType$inboundSchema` instead. */
1906
+ export namespace UpdateKnowledgeResponseBodyRetrievalType$ {
1907
+ /** @deprecated use `UpdateKnowledgeResponseBodyRetrievalType$inboundSchema` instead. */
633
1908
  export const inboundSchema =
634
- UpdateKnowledgeKnowledgeRetrievalType$inboundSchema;
635
- /** @deprecated use `UpdateKnowledgeKnowledgeRetrievalType$outboundSchema` instead. */
1909
+ UpdateKnowledgeResponseBodyRetrievalType$inboundSchema;
1910
+ /** @deprecated use `UpdateKnowledgeResponseBodyRetrievalType$outboundSchema` instead. */
636
1911
  export const outboundSchema =
637
- UpdateKnowledgeKnowledgeRetrievalType$outboundSchema;
1912
+ UpdateKnowledgeResponseBodyRetrievalType$outboundSchema;
638
1913
  }
639
1914
 
640
1915
  /** @internal */
641
- export const UpdateKnowledgeKnowledgeRerankConfig$inboundSchema: z.ZodType<
642
- UpdateKnowledgeKnowledgeRerankConfig,
1916
+ export const UpdateKnowledgeResponseBodyRerankConfig$inboundSchema: z.ZodType<
1917
+ UpdateKnowledgeResponseBodyRerankConfig,
643
1918
  z.ZodTypeDef,
644
1919
  unknown
645
1920
  > = z.object({
@@ -655,17 +1930,17 @@ export const UpdateKnowledgeKnowledgeRerankConfig$inboundSchema: z.ZodType<
655
1930
  });
656
1931
 
657
1932
  /** @internal */
658
- export type UpdateKnowledgeKnowledgeRerankConfig$Outbound = {
1933
+ export type UpdateKnowledgeResponseBodyRerankConfig$Outbound = {
659
1934
  top_k: number;
660
1935
  rerank_threshold: number;
661
1936
  rerank_model: string;
662
1937
  };
663
1938
 
664
1939
  /** @internal */
665
- export const UpdateKnowledgeKnowledgeRerankConfig$outboundSchema: z.ZodType<
666
- UpdateKnowledgeKnowledgeRerankConfig$Outbound,
1940
+ export const UpdateKnowledgeResponseBodyRerankConfig$outboundSchema: z.ZodType<
1941
+ UpdateKnowledgeResponseBodyRerankConfig$Outbound,
667
1942
  z.ZodTypeDef,
668
- UpdateKnowledgeKnowledgeRerankConfig
1943
+ UpdateKnowledgeResponseBodyRerankConfig
669
1944
  > = z.object({
670
1945
  topK: z.number().int().default(5),
671
1946
  rerankThreshold: z.number().default(0.5),
@@ -682,161 +1957,168 @@ export const UpdateKnowledgeKnowledgeRerankConfig$outboundSchema: z.ZodType<
682
1957
  * @internal
683
1958
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
684
1959
  */
685
- export namespace UpdateKnowledgeKnowledgeRerankConfig$ {
686
- /** @deprecated use `UpdateKnowledgeKnowledgeRerankConfig$inboundSchema` instead. */
1960
+ export namespace UpdateKnowledgeResponseBodyRerankConfig$ {
1961
+ /** @deprecated use `UpdateKnowledgeResponseBodyRerankConfig$inboundSchema` instead. */
687
1962
  export const inboundSchema =
688
- UpdateKnowledgeKnowledgeRerankConfig$inboundSchema;
689
- /** @deprecated use `UpdateKnowledgeKnowledgeRerankConfig$outboundSchema` instead. */
1963
+ UpdateKnowledgeResponseBodyRerankConfig$inboundSchema;
1964
+ /** @deprecated use `UpdateKnowledgeResponseBodyRerankConfig$outboundSchema` instead. */
690
1965
  export const outboundSchema =
691
- UpdateKnowledgeKnowledgeRerankConfig$outboundSchema;
692
- /** @deprecated use `UpdateKnowledgeKnowledgeRerankConfig$Outbound` instead. */
693
- export type Outbound = UpdateKnowledgeKnowledgeRerankConfig$Outbound;
1966
+ UpdateKnowledgeResponseBodyRerankConfig$outboundSchema;
1967
+ /** @deprecated use `UpdateKnowledgeResponseBodyRerankConfig$Outbound` instead. */
1968
+ export type Outbound = UpdateKnowledgeResponseBodyRerankConfig$Outbound;
694
1969
  }
695
1970
 
696
- export function updateKnowledgeKnowledgeRerankConfigToJSON(
697
- updateKnowledgeKnowledgeRerankConfig: UpdateKnowledgeKnowledgeRerankConfig,
1971
+ export function updateKnowledgeResponseBodyRerankConfigToJSON(
1972
+ updateKnowledgeResponseBodyRerankConfig:
1973
+ UpdateKnowledgeResponseBodyRerankConfig,
698
1974
  ): string {
699
1975
  return JSON.stringify(
700
- UpdateKnowledgeKnowledgeRerankConfig$outboundSchema.parse(
701
- updateKnowledgeKnowledgeRerankConfig,
1976
+ UpdateKnowledgeResponseBodyRerankConfig$outboundSchema.parse(
1977
+ updateKnowledgeResponseBodyRerankConfig,
702
1978
  ),
703
1979
  );
704
1980
  }
705
1981
 
706
- export function updateKnowledgeKnowledgeRerankConfigFromJSON(
1982
+ export function updateKnowledgeResponseBodyRerankConfigFromJSON(
707
1983
  jsonString: string,
708
- ): SafeParseResult<UpdateKnowledgeKnowledgeRerankConfig, SDKValidationError> {
1984
+ ): SafeParseResult<
1985
+ UpdateKnowledgeResponseBodyRerankConfig,
1986
+ SDKValidationError
1987
+ > {
709
1988
  return safeParse(
710
1989
  jsonString,
711
1990
  (x) =>
712
- UpdateKnowledgeKnowledgeRerankConfig$inboundSchema.parse(JSON.parse(x)),
713
- `Failed to parse 'UpdateKnowledgeKnowledgeRerankConfig' from JSON`,
1991
+ UpdateKnowledgeResponseBodyRerankConfig$inboundSchema.parse(
1992
+ JSON.parse(x),
1993
+ ),
1994
+ `Failed to parse 'UpdateKnowledgeResponseBodyRerankConfig' from JSON`,
714
1995
  );
715
1996
  }
716
1997
 
717
1998
  /** @internal */
718
- export const UpdateKnowledgeKnowledgeAgenticRagConfig$inboundSchema: z.ZodType<
719
- UpdateKnowledgeKnowledgeAgenticRagConfig,
720
- z.ZodTypeDef,
721
- unknown
722
- > = z.object({
723
- model: z.string(),
724
- });
1999
+ export const UpdateKnowledgeResponseBodyAgenticRagConfig$inboundSchema:
2000
+ z.ZodType<
2001
+ UpdateKnowledgeResponseBodyAgenticRagConfig,
2002
+ z.ZodTypeDef,
2003
+ unknown
2004
+ > = z.object({
2005
+ model: z.string(),
2006
+ });
725
2007
 
726
2008
  /** @internal */
727
- export type UpdateKnowledgeKnowledgeAgenticRagConfig$Outbound = {
2009
+ export type UpdateKnowledgeResponseBodyAgenticRagConfig$Outbound = {
728
2010
  model: string;
729
2011
  };
730
2012
 
731
2013
  /** @internal */
732
- export const UpdateKnowledgeKnowledgeAgenticRagConfig$outboundSchema: z.ZodType<
733
- UpdateKnowledgeKnowledgeAgenticRagConfig$Outbound,
734
- z.ZodTypeDef,
735
- UpdateKnowledgeKnowledgeAgenticRagConfig
736
- > = z.object({
737
- model: z.string(),
738
- });
2014
+ export const UpdateKnowledgeResponseBodyAgenticRagConfig$outboundSchema:
2015
+ z.ZodType<
2016
+ UpdateKnowledgeResponseBodyAgenticRagConfig$Outbound,
2017
+ z.ZodTypeDef,
2018
+ UpdateKnowledgeResponseBodyAgenticRagConfig
2019
+ > = z.object({
2020
+ model: z.string(),
2021
+ });
739
2022
 
740
2023
  /**
741
2024
  * @internal
742
2025
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
743
2026
  */
744
- export namespace UpdateKnowledgeKnowledgeAgenticRagConfig$ {
745
- /** @deprecated use `UpdateKnowledgeKnowledgeAgenticRagConfig$inboundSchema` instead. */
2027
+ export namespace UpdateKnowledgeResponseBodyAgenticRagConfig$ {
2028
+ /** @deprecated use `UpdateKnowledgeResponseBodyAgenticRagConfig$inboundSchema` instead. */
746
2029
  export const inboundSchema =
747
- UpdateKnowledgeKnowledgeAgenticRagConfig$inboundSchema;
748
- /** @deprecated use `UpdateKnowledgeKnowledgeAgenticRagConfig$outboundSchema` instead. */
2030
+ UpdateKnowledgeResponseBodyAgenticRagConfig$inboundSchema;
2031
+ /** @deprecated use `UpdateKnowledgeResponseBodyAgenticRagConfig$outboundSchema` instead. */
749
2032
  export const outboundSchema =
750
- UpdateKnowledgeKnowledgeAgenticRagConfig$outboundSchema;
751
- /** @deprecated use `UpdateKnowledgeKnowledgeAgenticRagConfig$Outbound` instead. */
752
- export type Outbound = UpdateKnowledgeKnowledgeAgenticRagConfig$Outbound;
2033
+ UpdateKnowledgeResponseBodyAgenticRagConfig$outboundSchema;
2034
+ /** @deprecated use `UpdateKnowledgeResponseBodyAgenticRagConfig$Outbound` instead. */
2035
+ export type Outbound = UpdateKnowledgeResponseBodyAgenticRagConfig$Outbound;
753
2036
  }
754
2037
 
755
- export function updateKnowledgeKnowledgeAgenticRagConfigToJSON(
756
- updateKnowledgeKnowledgeAgenticRagConfig:
757
- UpdateKnowledgeKnowledgeAgenticRagConfig,
2038
+ export function updateKnowledgeResponseBodyAgenticRagConfigToJSON(
2039
+ updateKnowledgeResponseBodyAgenticRagConfig:
2040
+ UpdateKnowledgeResponseBodyAgenticRagConfig,
758
2041
  ): string {
759
2042
  return JSON.stringify(
760
- UpdateKnowledgeKnowledgeAgenticRagConfig$outboundSchema.parse(
761
- updateKnowledgeKnowledgeAgenticRagConfig,
2043
+ UpdateKnowledgeResponseBodyAgenticRagConfig$outboundSchema.parse(
2044
+ updateKnowledgeResponseBodyAgenticRagConfig,
762
2045
  ),
763
2046
  );
764
2047
  }
765
2048
 
766
- export function updateKnowledgeKnowledgeAgenticRagConfigFromJSON(
2049
+ export function updateKnowledgeResponseBodyAgenticRagConfigFromJSON(
767
2050
  jsonString: string,
768
2051
  ): SafeParseResult<
769
- UpdateKnowledgeKnowledgeAgenticRagConfig,
2052
+ UpdateKnowledgeResponseBodyAgenticRagConfig,
770
2053
  SDKValidationError
771
2054
  > {
772
2055
  return safeParse(
773
2056
  jsonString,
774
2057
  (x) =>
775
- UpdateKnowledgeKnowledgeAgenticRagConfig$inboundSchema.parse(
2058
+ UpdateKnowledgeResponseBodyAgenticRagConfig$inboundSchema.parse(
776
2059
  JSON.parse(x),
777
2060
  ),
778
- `Failed to parse 'UpdateKnowledgeKnowledgeAgenticRagConfig' from JSON`,
2061
+ `Failed to parse 'UpdateKnowledgeResponseBodyAgenticRagConfig' from JSON`,
779
2062
  );
780
2063
  }
781
2064
 
782
2065
  /** @internal */
783
- export const UpdateKnowledgeKnowledgeRetrievalSettings$inboundSchema: z.ZodType<
784
- UpdateKnowledgeKnowledgeRetrievalSettings,
785
- z.ZodTypeDef,
786
- unknown
787
- > = z.object({
788
- retrieval_type: UpdateKnowledgeKnowledgeRetrievalType$inboundSchema.default(
789
- "hybrid_search",
790
- ),
791
- top_k: z.number().int().default(5),
792
- threshold: z.number().default(0),
793
- rerank_config: z.nullable(
794
- z.lazy(() => UpdateKnowledgeKnowledgeRerankConfig$inboundSchema),
795
- ).optional(),
796
- agentic_rag_config: z.nullable(
797
- z.lazy(() => UpdateKnowledgeKnowledgeAgenticRagConfig$inboundSchema),
798
- ).optional(),
799
- }).transform((v) => {
800
- return remap$(v, {
801
- "retrieval_type": "retrievalType",
802
- "top_k": "topK",
803
- "rerank_config": "rerankConfig",
804
- "agentic_rag_config": "agenticRagConfig",
2066
+ export const UpdateKnowledgeResponseBodyRetrievalSettings$inboundSchema:
2067
+ z.ZodType<
2068
+ UpdateKnowledgeResponseBodyRetrievalSettings,
2069
+ z.ZodTypeDef,
2070
+ unknown
2071
+ > = z.object({
2072
+ retrieval_type: UpdateKnowledgeResponseBodyRetrievalType$inboundSchema
2073
+ .default("hybrid_search"),
2074
+ top_k: z.number().int().default(5),
2075
+ threshold: z.number().default(0),
2076
+ rerank_config: z.nullable(
2077
+ z.lazy(() => UpdateKnowledgeResponseBodyRerankConfig$inboundSchema),
2078
+ ).optional(),
2079
+ agentic_rag_config: z.nullable(
2080
+ z.lazy(() => UpdateKnowledgeResponseBodyAgenticRagConfig$inboundSchema),
2081
+ ).optional(),
2082
+ }).transform((v) => {
2083
+ return remap$(v, {
2084
+ "retrieval_type": "retrievalType",
2085
+ "top_k": "topK",
2086
+ "rerank_config": "rerankConfig",
2087
+ "agentic_rag_config": "agenticRagConfig",
2088
+ });
805
2089
  });
806
- });
807
2090
 
808
2091
  /** @internal */
809
- export type UpdateKnowledgeKnowledgeRetrievalSettings$Outbound = {
2092
+ export type UpdateKnowledgeResponseBodyRetrievalSettings$Outbound = {
810
2093
  retrieval_type: string;
811
2094
  top_k: number;
812
2095
  threshold: number;
813
2096
  rerank_config?:
814
- | UpdateKnowledgeKnowledgeRerankConfig$Outbound
2097
+ | UpdateKnowledgeResponseBodyRerankConfig$Outbound
815
2098
  | null
816
2099
  | undefined;
817
2100
  agentic_rag_config?:
818
- | UpdateKnowledgeKnowledgeAgenticRagConfig$Outbound
2101
+ | UpdateKnowledgeResponseBodyAgenticRagConfig$Outbound
819
2102
  | null
820
2103
  | undefined;
821
2104
  };
822
2105
 
823
2106
  /** @internal */
824
- export const UpdateKnowledgeKnowledgeRetrievalSettings$outboundSchema:
2107
+ export const UpdateKnowledgeResponseBodyRetrievalSettings$outboundSchema:
825
2108
  z.ZodType<
826
- UpdateKnowledgeKnowledgeRetrievalSettings$Outbound,
2109
+ UpdateKnowledgeResponseBodyRetrievalSettings$Outbound,
827
2110
  z.ZodTypeDef,
828
- UpdateKnowledgeKnowledgeRetrievalSettings
2111
+ UpdateKnowledgeResponseBodyRetrievalSettings
829
2112
  > = z.object({
830
- retrievalType: UpdateKnowledgeKnowledgeRetrievalType$outboundSchema.default(
831
- "hybrid_search",
832
- ),
2113
+ retrievalType: UpdateKnowledgeResponseBodyRetrievalType$outboundSchema
2114
+ .default("hybrid_search"),
833
2115
  topK: z.number().int().default(5),
834
2116
  threshold: z.number().default(0),
835
2117
  rerankConfig: z.nullable(
836
- z.lazy(() => UpdateKnowledgeKnowledgeRerankConfig$outboundSchema),
2118
+ z.lazy(() => UpdateKnowledgeResponseBodyRerankConfig$outboundSchema),
837
2119
  ).optional(),
838
2120
  agenticRagConfig: z.nullable(
839
- z.lazy(() => UpdateKnowledgeKnowledgeAgenticRagConfig$outboundSchema),
2121
+ z.lazy(() => UpdateKnowledgeResponseBodyAgenticRagConfig$outboundSchema),
840
2122
  ).optional(),
841
2123
  }).transform((v) => {
842
2124
  return remap$(v, {
@@ -851,47 +2133,47 @@ export const UpdateKnowledgeKnowledgeRetrievalSettings$outboundSchema:
851
2133
  * @internal
852
2134
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
853
2135
  */
854
- export namespace UpdateKnowledgeKnowledgeRetrievalSettings$ {
855
- /** @deprecated use `UpdateKnowledgeKnowledgeRetrievalSettings$inboundSchema` instead. */
2136
+ export namespace UpdateKnowledgeResponseBodyRetrievalSettings$ {
2137
+ /** @deprecated use `UpdateKnowledgeResponseBodyRetrievalSettings$inboundSchema` instead. */
856
2138
  export const inboundSchema =
857
- UpdateKnowledgeKnowledgeRetrievalSettings$inboundSchema;
858
- /** @deprecated use `UpdateKnowledgeKnowledgeRetrievalSettings$outboundSchema` instead. */
2139
+ UpdateKnowledgeResponseBodyRetrievalSettings$inboundSchema;
2140
+ /** @deprecated use `UpdateKnowledgeResponseBodyRetrievalSettings$outboundSchema` instead. */
859
2141
  export const outboundSchema =
860
- UpdateKnowledgeKnowledgeRetrievalSettings$outboundSchema;
861
- /** @deprecated use `UpdateKnowledgeKnowledgeRetrievalSettings$Outbound` instead. */
862
- export type Outbound = UpdateKnowledgeKnowledgeRetrievalSettings$Outbound;
2142
+ UpdateKnowledgeResponseBodyRetrievalSettings$outboundSchema;
2143
+ /** @deprecated use `UpdateKnowledgeResponseBodyRetrievalSettings$Outbound` instead. */
2144
+ export type Outbound = UpdateKnowledgeResponseBodyRetrievalSettings$Outbound;
863
2145
  }
864
2146
 
865
- export function updateKnowledgeKnowledgeRetrievalSettingsToJSON(
866
- updateKnowledgeKnowledgeRetrievalSettings:
867
- UpdateKnowledgeKnowledgeRetrievalSettings,
2147
+ export function updateKnowledgeResponseBodyRetrievalSettingsToJSON(
2148
+ updateKnowledgeResponseBodyRetrievalSettings:
2149
+ UpdateKnowledgeResponseBodyRetrievalSettings,
868
2150
  ): string {
869
2151
  return JSON.stringify(
870
- UpdateKnowledgeKnowledgeRetrievalSettings$outboundSchema.parse(
871
- updateKnowledgeKnowledgeRetrievalSettings,
2152
+ UpdateKnowledgeResponseBodyRetrievalSettings$outboundSchema.parse(
2153
+ updateKnowledgeResponseBodyRetrievalSettings,
872
2154
  ),
873
2155
  );
874
2156
  }
875
2157
 
876
- export function updateKnowledgeKnowledgeRetrievalSettingsFromJSON(
2158
+ export function updateKnowledgeResponseBodyRetrievalSettingsFromJSON(
877
2159
  jsonString: string,
878
2160
  ): SafeParseResult<
879
- UpdateKnowledgeKnowledgeRetrievalSettings,
2161
+ UpdateKnowledgeResponseBodyRetrievalSettings,
880
2162
  SDKValidationError
881
2163
  > {
882
2164
  return safeParse(
883
2165
  jsonString,
884
2166
  (x) =>
885
- UpdateKnowledgeKnowledgeRetrievalSettings$inboundSchema.parse(
2167
+ UpdateKnowledgeResponseBodyRetrievalSettings$inboundSchema.parse(
886
2168
  JSON.parse(x),
887
2169
  ),
888
- `Failed to parse 'UpdateKnowledgeKnowledgeRetrievalSettings' from JSON`,
2170
+ `Failed to parse 'UpdateKnowledgeResponseBodyRetrievalSettings' from JSON`,
889
2171
  );
890
2172
  }
891
2173
 
892
2174
  /** @internal */
893
- export const UpdateKnowledgeResponseBody$inboundSchema: z.ZodType<
894
- UpdateKnowledgeResponseBody,
2175
+ export const UpdateKnowledgeResponseBody1$inboundSchema: z.ZodType<
2176
+ UpdateKnowledgeResponseBody1,
895
2177
  z.ZodTypeDef,
896
2178
  unknown
897
2179
  > = z.object({
@@ -899,71 +2181,132 @@ export const UpdateKnowledgeResponseBody$inboundSchema: z.ZodType<
899
2181
  created: z.string(),
900
2182
  description: z.string().optional(),
901
2183
  key: z.string(),
902
- model: z.string(),
903
2184
  domain_id: z.string(),
904
2185
  path: z.string().optional(),
905
- retrieval_settings: z.lazy(() =>
906
- UpdateKnowledgeKnowledgeRetrievalSettings$inboundSchema
907
- ).optional(),
908
2186
  created_by_id: z.nullable(z.string()).optional(),
909
2187
  updated_by_id: z.nullable(z.string()).optional(),
910
2188
  updated: z.string(),
2189
+ type: UpdateKnowledgeResponseBodyType$inboundSchema.default("internal"),
2190
+ retrieval_settings: z.lazy(() =>
2191
+ UpdateKnowledgeResponseBodyRetrievalSettings$inboundSchema
2192
+ ).optional(),
2193
+ model: z.string(),
911
2194
  }).transform((v) => {
912
2195
  return remap$(v, {
913
2196
  "_id": "id",
914
2197
  "domain_id": "domainId",
915
- "retrieval_settings": "retrievalSettings",
916
2198
  "created_by_id": "createdById",
917
2199
  "updated_by_id": "updatedById",
2200
+ "retrieval_settings": "retrievalSettings",
918
2201
  });
919
2202
  });
920
2203
 
921
2204
  /** @internal */
922
- export type UpdateKnowledgeResponseBody$Outbound = {
2205
+ export type UpdateKnowledgeResponseBody1$Outbound = {
923
2206
  _id: string;
924
2207
  created: string;
925
2208
  description?: string | undefined;
926
2209
  key: string;
927
- model: string;
928
2210
  domain_id: string;
929
2211
  path?: string | undefined;
930
- retrieval_settings?:
931
- | UpdateKnowledgeKnowledgeRetrievalSettings$Outbound
932
- | undefined;
933
2212
  created_by_id?: string | null | undefined;
934
2213
  updated_by_id?: string | null | undefined;
935
2214
  updated: string;
2215
+ type: string;
2216
+ retrieval_settings?:
2217
+ | UpdateKnowledgeResponseBodyRetrievalSettings$Outbound
2218
+ | undefined;
2219
+ model: string;
936
2220
  };
937
2221
 
938
2222
  /** @internal */
939
- export const UpdateKnowledgeResponseBody$outboundSchema: z.ZodType<
940
- UpdateKnowledgeResponseBody$Outbound,
2223
+ export const UpdateKnowledgeResponseBody1$outboundSchema: z.ZodType<
2224
+ UpdateKnowledgeResponseBody1$Outbound,
941
2225
  z.ZodTypeDef,
942
- UpdateKnowledgeResponseBody
2226
+ UpdateKnowledgeResponseBody1
943
2227
  > = z.object({
944
2228
  id: z.string(),
945
2229
  created: z.string(),
946
2230
  description: z.string().optional(),
947
2231
  key: z.string(),
948
- model: z.string(),
949
2232
  domainId: z.string(),
950
2233
  path: z.string().optional(),
951
- retrievalSettings: z.lazy(() =>
952
- UpdateKnowledgeKnowledgeRetrievalSettings$outboundSchema
953
- ).optional(),
954
2234
  createdById: z.nullable(z.string()).optional(),
955
2235
  updatedById: z.nullable(z.string()).optional(),
956
2236
  updated: z.string(),
2237
+ type: UpdateKnowledgeResponseBodyType$outboundSchema.default("internal"),
2238
+ retrievalSettings: z.lazy(() =>
2239
+ UpdateKnowledgeResponseBodyRetrievalSettings$outboundSchema
2240
+ ).optional(),
2241
+ model: z.string(),
957
2242
  }).transform((v) => {
958
2243
  return remap$(v, {
959
2244
  id: "_id",
960
2245
  domainId: "domain_id",
961
- retrievalSettings: "retrieval_settings",
962
2246
  createdById: "created_by_id",
963
2247
  updatedById: "updated_by_id",
2248
+ retrievalSettings: "retrieval_settings",
964
2249
  });
965
2250
  });
966
2251
 
2252
+ /**
2253
+ * @internal
2254
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2255
+ */
2256
+ export namespace UpdateKnowledgeResponseBody1$ {
2257
+ /** @deprecated use `UpdateKnowledgeResponseBody1$inboundSchema` instead. */
2258
+ export const inboundSchema = UpdateKnowledgeResponseBody1$inboundSchema;
2259
+ /** @deprecated use `UpdateKnowledgeResponseBody1$outboundSchema` instead. */
2260
+ export const outboundSchema = UpdateKnowledgeResponseBody1$outboundSchema;
2261
+ /** @deprecated use `UpdateKnowledgeResponseBody1$Outbound` instead. */
2262
+ export type Outbound = UpdateKnowledgeResponseBody1$Outbound;
2263
+ }
2264
+
2265
+ export function updateKnowledgeResponseBody1ToJSON(
2266
+ updateKnowledgeResponseBody1: UpdateKnowledgeResponseBody1,
2267
+ ): string {
2268
+ return JSON.stringify(
2269
+ UpdateKnowledgeResponseBody1$outboundSchema.parse(
2270
+ updateKnowledgeResponseBody1,
2271
+ ),
2272
+ );
2273
+ }
2274
+
2275
+ export function updateKnowledgeResponseBody1FromJSON(
2276
+ jsonString: string,
2277
+ ): SafeParseResult<UpdateKnowledgeResponseBody1, SDKValidationError> {
2278
+ return safeParse(
2279
+ jsonString,
2280
+ (x) => UpdateKnowledgeResponseBody1$inboundSchema.parse(JSON.parse(x)),
2281
+ `Failed to parse 'UpdateKnowledgeResponseBody1' from JSON`,
2282
+ );
2283
+ }
2284
+
2285
+ /** @internal */
2286
+ export const UpdateKnowledgeResponseBody$inboundSchema: z.ZodType<
2287
+ UpdateKnowledgeResponseBody,
2288
+ z.ZodTypeDef,
2289
+ unknown
2290
+ > = z.union([
2291
+ z.lazy(() => UpdateKnowledgeResponseBody1$inboundSchema),
2292
+ z.lazy(() => UpdateKnowledgeResponseBody2$inboundSchema),
2293
+ ]);
2294
+
2295
+ /** @internal */
2296
+ export type UpdateKnowledgeResponseBody$Outbound =
2297
+ | UpdateKnowledgeResponseBody1$Outbound
2298
+ | UpdateKnowledgeResponseBody2$Outbound;
2299
+
2300
+ /** @internal */
2301
+ export const UpdateKnowledgeResponseBody$outboundSchema: z.ZodType<
2302
+ UpdateKnowledgeResponseBody$Outbound,
2303
+ z.ZodTypeDef,
2304
+ UpdateKnowledgeResponseBody
2305
+ > = z.union([
2306
+ z.lazy(() => UpdateKnowledgeResponseBody1$outboundSchema),
2307
+ z.lazy(() => UpdateKnowledgeResponseBody2$outboundSchema),
2308
+ ]);
2309
+
967
2310
  /**
968
2311
  * @internal
969
2312
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.