@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
@@ -9,6 +9,40 @@ import { ClosedEnum } from "../../types/enums.js";
9
9
  import { Result as SafeParseResult } from "../../types/fp.js";
10
10
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
11
 
12
+ export const CreateKnowledgeRequestBodyType = {
13
+ External: "external",
14
+ } as const;
15
+ export type CreateKnowledgeRequestBodyType = ClosedEnum<
16
+ typeof CreateKnowledgeRequestBodyType
17
+ >;
18
+
19
+ export type ExternalConfig = {
20
+ /**
21
+ * The name of the external knowledge base.
22
+ */
23
+ name: string;
24
+ /**
25
+ * The API URL of the external knowledge base.
26
+ */
27
+ apiUrl: string;
28
+ /**
29
+ * The API key to access the external knowledge base.
30
+ */
31
+ apiKey: string;
32
+ };
33
+
34
+ export type RequestBody2 = {
35
+ type?: CreateKnowledgeRequestBodyType | undefined;
36
+ key: string;
37
+ description?: string | undefined;
38
+ externalConfig: ExternalConfig;
39
+ };
40
+
41
+ export const RequestBodyType = {
42
+ Internal: "internal",
43
+ } as const;
44
+ export type RequestBodyType = ClosedEnum<typeof RequestBodyType>;
45
+
12
46
  /**
13
47
  * The retrieval type to use for the knowledge base. If not provided, Hybrid Search will be used as a default query strategy.
14
48
  */
@@ -25,7 +59,7 @@ export type RetrievalType = ClosedEnum<typeof RetrievalType>;
25
59
  /**
26
60
  * The rerank configuration for the knowledge base. In case the model is provided it will be used to enhance the search precision.
27
61
  */
28
- export type RerankConfig = {
62
+ export type CreateKnowledgeRequestBodyRerankConfig = {
29
63
  /**
30
64
  * The number of results to return by the reranking model
31
65
  */
@@ -43,7 +77,7 @@ export type RerankConfig = {
43
77
  /**
44
78
  * The Agentic RAG configuration for the knowledge base. If `null` is provided, Agentic RAG will be disabled.
45
79
  */
46
- export type AgenticRagConfig = {
80
+ export type CreateKnowledgeRequestBodyAgenticRagConfig = {
47
81
  /**
48
82
  * The model to use for the Agentic RAG
49
83
  */
@@ -69,34 +103,168 @@ export type RetrievalSettings = {
69
103
  /**
70
104
  * The rerank configuration for the knowledge base. In case the model is provided it will be used to enhance the search precision.
71
105
  */
72
- rerankConfig?: RerankConfig | null | undefined;
106
+ rerankConfig?: CreateKnowledgeRequestBodyRerankConfig | null | undefined;
73
107
  /**
74
108
  * The Agentic RAG configuration for the knowledge base. If `null` is provided, Agentic RAG will be disabled.
75
109
  */
76
- agenticRagConfig?: AgenticRagConfig | null | undefined;
110
+ agenticRagConfig?:
111
+ | CreateKnowledgeRequestBodyAgenticRagConfig
112
+ | null
113
+ | undefined;
77
114
  };
78
115
 
79
- export type CreateKnowledgeRequestBody = {
116
+ export type RequestBody1 = {
117
+ type?: RequestBodyType | undefined;
80
118
  key: string;
81
119
  description?: string | undefined;
82
120
  /**
83
121
  * The embeddings model to use for the knowledge base. This model will be used to embed the chunks when they are added to the knowledge base.
84
122
  */
85
123
  embeddingModel: string;
124
+ isPrivateModel?: boolean | undefined;
86
125
  /**
87
126
  * The retrieval settings for the knowledge base. If not provider, Hybrid Search will be used as a default query strategy.
88
127
  */
89
128
  retrievalSettings?: RetrievalSettings | undefined;
90
129
  /**
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.
130
+ * Entity storage path in the format: `project/folder/subfolder/...`
131
+ *
132
+ * @remarks
133
+ *
134
+ * The first element identifies the project, followed by nested folders (auto-created as needed).
135
+ *
136
+ * With project-based API keys, the first element is treated as a folder name, as the project is predetermined by the API key.
92
137
  */
93
138
  path: string;
94
139
  };
95
140
 
141
+ export type CreateKnowledgeRequestBody = RequestBody1 | RequestBody2;
142
+
143
+ export const CreateKnowledgeResponseBodyType = {
144
+ External: "external",
145
+ } as const;
146
+ export type CreateKnowledgeResponseBodyType = ClosedEnum<
147
+ typeof CreateKnowledgeResponseBodyType
148
+ >;
149
+
150
+ /**
151
+ * The rerank configuration for the knowledge base. In case the model is provided it will be used to enhance the search precision.
152
+ */
153
+ export type CreateKnowledgeResponseBodyRerankConfig = {
154
+ /**
155
+ * The number of results to return by the reranking model
156
+ */
157
+ topK?: number | undefined;
158
+ /**
159
+ * The threshold value used to filter the rerank results, only documents with a relevance score greater than the threshold will be returned
160
+ */
161
+ rerankThreshold?: number | undefined;
162
+ /**
163
+ * The rerank model to use for the knowledge base.
164
+ */
165
+ rerankModel: string;
166
+ };
167
+
168
+ /**
169
+ * The Agentic RAG configuration for the knowledge base. If `null` is provided, Agentic RAG will be disabled.
170
+ */
171
+ export type CreateKnowledgeResponseBodyAgenticRagConfig = {
172
+ /**
173
+ * The model to use for the Agentic RAG
174
+ */
175
+ model: string;
176
+ };
177
+
178
+ /**
179
+ * The retrieval settings for the knowledge base.
180
+ */
181
+ export type CreateKnowledgeResponseBodyRetrievalSettings = {
182
+ /**
183
+ * The number of results to return from the search.
184
+ */
185
+ topK?: number | undefined;
186
+ /**
187
+ * The threshold value used to filter the search results, only documents with a relevance score greater than the threshold will be returned
188
+ */
189
+ threshold?: number | undefined;
190
+ /**
191
+ * The rerank configuration for the knowledge base. In case the model is provided it will be used to enhance the search precision.
192
+ */
193
+ rerankConfig?: CreateKnowledgeResponseBodyRerankConfig | null | undefined;
194
+ /**
195
+ * The Agentic RAG configuration for the knowledge base. If `null` is provided, Agentic RAG will be disabled.
196
+ */
197
+ agenticRagConfig?:
198
+ | CreateKnowledgeResponseBodyAgenticRagConfig
199
+ | null
200
+ | undefined;
201
+ };
202
+
203
+ export type ResponseBodyExternalConfig = {
204
+ /**
205
+ * The name of the external knowledge base.
206
+ */
207
+ name: string;
208
+ /**
209
+ * The API URL of the external knowledge base.
210
+ */
211
+ apiUrl: string;
212
+ };
213
+
214
+ export type ResponseBody2 = {
215
+ /**
216
+ * The unique identifier of the knowledge base.
217
+ */
218
+ id: string;
219
+ /**
220
+ * The creation date of the knowledge base.
221
+ */
222
+ created: string;
223
+ /**
224
+ * The description of the knowledge base.
225
+ */
226
+ description?: string | undefined;
227
+ /**
228
+ * The unique key of the knowledge base.
229
+ */
230
+ key: string;
231
+ /**
232
+ * The project/domain ID of the knowledge base.
233
+ */
234
+ domainId: string;
235
+ /**
236
+ * Entity storage path in the format: `project/folder/subfolder/...`
237
+ *
238
+ * @remarks
239
+ *
240
+ * The first element identifies the project, followed by nested folders (auto-created as needed).
241
+ *
242
+ * With project-based API keys, the first element is treated as a folder name, as the project is predetermined by the API key.
243
+ */
244
+ path?: string | undefined;
245
+ createdById?: string | null | undefined;
246
+ updatedById?: string | null | undefined;
247
+ /**
248
+ * The last update date of the knowledge base.
249
+ */
250
+ updated: string;
251
+ type?: CreateKnowledgeResponseBodyType | undefined;
252
+ /**
253
+ * The retrieval settings for the knowledge base.
254
+ */
255
+ retrievalSettings?: CreateKnowledgeResponseBodyRetrievalSettings | undefined;
256
+ externalConfig: ResponseBodyExternalConfig;
257
+ };
258
+
259
+ export const ResponseBodyType = {
260
+ Internal: "internal",
261
+ } as const;
262
+ export type ResponseBodyType = ClosedEnum<typeof ResponseBodyType>;
263
+
96
264
  /**
97
265
  * The retrieval type to use for the knowledge base. If not provided, Hybrid Search will be used as a default query strategy.
98
266
  */
99
- export const CreateKnowledgeRetrievalType = {
267
+ export const ResponseBodyRetrievalType = {
100
268
  VectorSearch: "vector_search",
101
269
  KeywordSearch: "keyword_search",
102
270
  HybridSearch: "hybrid_search",
@@ -104,14 +272,14 @@ export const CreateKnowledgeRetrievalType = {
104
272
  /**
105
273
  * The retrieval type to use for the knowledge base. If not provided, Hybrid Search will be used as a default query strategy.
106
274
  */
107
- export type CreateKnowledgeRetrievalType = ClosedEnum<
108
- typeof CreateKnowledgeRetrievalType
275
+ export type ResponseBodyRetrievalType = ClosedEnum<
276
+ typeof ResponseBodyRetrievalType
109
277
  >;
110
278
 
111
279
  /**
112
280
  * The rerank configuration for the knowledge base. In case the model is provided it will be used to enhance the search precision.
113
281
  */
114
- export type CreateKnowledgeRerankConfig = {
282
+ export type ResponseBodyRerankConfig = {
115
283
  /**
116
284
  * The number of results to return by the reranking model
117
285
  */
@@ -129,7 +297,7 @@ export type CreateKnowledgeRerankConfig = {
129
297
  /**
130
298
  * The Agentic RAG configuration for the knowledge base. If `null` is provided, Agentic RAG will be disabled.
131
299
  */
132
- export type CreateKnowledgeAgenticRagConfig = {
300
+ export type ResponseBodyAgenticRagConfig = {
133
301
  /**
134
302
  * The model to use for the Agentic RAG
135
303
  */
@@ -139,11 +307,11 @@ export type CreateKnowledgeAgenticRagConfig = {
139
307
  /**
140
308
  * The retrieval settings for the knowledge base. If not provider, Hybrid Search will be used as a default query strategy.
141
309
  */
142
- export type CreateKnowledgeRetrievalSettings = {
310
+ export type ResponseBodyRetrievalSettings = {
143
311
  /**
144
312
  * The retrieval type to use for the knowledge base. If not provided, Hybrid Search will be used as a default query strategy.
145
313
  */
146
- retrievalType?: CreateKnowledgeRetrievalType | undefined;
314
+ retrievalType?: ResponseBodyRetrievalType | undefined;
147
315
  /**
148
316
  * The number of results to return from the search.
149
317
  */
@@ -155,17 +323,14 @@ export type CreateKnowledgeRetrievalSettings = {
155
323
  /**
156
324
  * The rerank configuration for the knowledge base. In case the model is provided it will be used to enhance the search precision.
157
325
  */
158
- rerankConfig?: CreateKnowledgeRerankConfig | null | undefined;
326
+ rerankConfig?: ResponseBodyRerankConfig | null | undefined;
159
327
  /**
160
328
  * The Agentic RAG configuration for the knowledge base. If `null` is provided, Agentic RAG will be disabled.
161
329
  */
162
- agenticRagConfig?: CreateKnowledgeAgenticRagConfig | null | undefined;
330
+ agenticRagConfig?: ResponseBodyAgenticRagConfig | null | undefined;
163
331
  };
164
332
 
165
- /**
166
- * Knowledge Base object
167
- */
168
- export type CreateKnowledgeResponseBody = {
333
+ export type ResponseBody1 = {
169
334
  /**
170
335
  * The unique identifier of the knowledge base.
171
336
  */
@@ -182,54 +347,634 @@ export type CreateKnowledgeResponseBody = {
182
347
  * The unique key of the knowledge base.
183
348
  */
184
349
  key: string;
185
- /**
186
- * The embeddings model used for the knowledge base.
187
- */
188
- model: string;
189
350
  /**
190
351
  * The project/domain ID of the knowledge base.
191
352
  */
192
353
  domainId: string;
193
354
  /**
194
- * 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.
355
+ * Entity storage path in the format: `project/folder/subfolder/...`
356
+ *
357
+ * @remarks
358
+ *
359
+ * The first element identifies the project, followed by nested folders (auto-created as needed).
360
+ *
361
+ * With project-based API keys, the first element is treated as a folder name, as the project is predetermined by the API key.
195
362
  */
196
363
  path?: string | undefined;
197
- /**
198
- * The retrieval settings for the knowledge base. If not provider, Hybrid Search will be used as a default query strategy.
199
- */
200
- retrievalSettings?: CreateKnowledgeRetrievalSettings | undefined;
201
364
  createdById?: string | null | undefined;
202
365
  updatedById?: string | null | undefined;
203
366
  /**
204
367
  * The last update date of the knowledge base.
205
368
  */
206
369
  updated: string;
370
+ type?: ResponseBodyType | undefined;
371
+ /**
372
+ * The retrieval settings for the knowledge base. If not provider, Hybrid Search will be used as a default query strategy.
373
+ */
374
+ retrievalSettings?: ResponseBodyRetrievalSettings | undefined;
375
+ /**
376
+ * The embeddings model used for the knowledge base.
377
+ */
378
+ model: string;
207
379
  };
208
380
 
381
+ /**
382
+ * Knowledge successfully created
383
+ */
384
+ export type CreateKnowledgeResponseBody = ResponseBody1 | ResponseBody2;
385
+
386
+ /** @internal */
387
+ export const CreateKnowledgeRequestBodyType$inboundSchema: z.ZodNativeEnum<
388
+ typeof CreateKnowledgeRequestBodyType
389
+ > = z.nativeEnum(CreateKnowledgeRequestBodyType);
390
+
391
+ /** @internal */
392
+ export const CreateKnowledgeRequestBodyType$outboundSchema: z.ZodNativeEnum<
393
+ typeof CreateKnowledgeRequestBodyType
394
+ > = CreateKnowledgeRequestBodyType$inboundSchema;
395
+
396
+ /**
397
+ * @internal
398
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
399
+ */
400
+ export namespace CreateKnowledgeRequestBodyType$ {
401
+ /** @deprecated use `CreateKnowledgeRequestBodyType$inboundSchema` instead. */
402
+ export const inboundSchema = CreateKnowledgeRequestBodyType$inboundSchema;
403
+ /** @deprecated use `CreateKnowledgeRequestBodyType$outboundSchema` instead. */
404
+ export const outboundSchema = CreateKnowledgeRequestBodyType$outboundSchema;
405
+ }
406
+
407
+ /** @internal */
408
+ export const ExternalConfig$inboundSchema: z.ZodType<
409
+ ExternalConfig,
410
+ z.ZodTypeDef,
411
+ unknown
412
+ > = z.object({
413
+ name: z.string(),
414
+ api_url: z.string(),
415
+ api_key: z.string(),
416
+ }).transform((v) => {
417
+ return remap$(v, {
418
+ "api_url": "apiUrl",
419
+ "api_key": "apiKey",
420
+ });
421
+ });
422
+
423
+ /** @internal */
424
+ export type ExternalConfig$Outbound = {
425
+ name: string;
426
+ api_url: string;
427
+ api_key: string;
428
+ };
429
+
430
+ /** @internal */
431
+ export const ExternalConfig$outboundSchema: z.ZodType<
432
+ ExternalConfig$Outbound,
433
+ z.ZodTypeDef,
434
+ ExternalConfig
435
+ > = z.object({
436
+ name: z.string(),
437
+ apiUrl: z.string(),
438
+ apiKey: z.string(),
439
+ }).transform((v) => {
440
+ return remap$(v, {
441
+ apiUrl: "api_url",
442
+ apiKey: "api_key",
443
+ });
444
+ });
445
+
446
+ /**
447
+ * @internal
448
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
449
+ */
450
+ export namespace ExternalConfig$ {
451
+ /** @deprecated use `ExternalConfig$inboundSchema` instead. */
452
+ export const inboundSchema = ExternalConfig$inboundSchema;
453
+ /** @deprecated use `ExternalConfig$outboundSchema` instead. */
454
+ export const outboundSchema = ExternalConfig$outboundSchema;
455
+ /** @deprecated use `ExternalConfig$Outbound` instead. */
456
+ export type Outbound = ExternalConfig$Outbound;
457
+ }
458
+
459
+ export function externalConfigToJSON(externalConfig: ExternalConfig): string {
460
+ return JSON.stringify(ExternalConfig$outboundSchema.parse(externalConfig));
461
+ }
462
+
463
+ export function externalConfigFromJSON(
464
+ jsonString: string,
465
+ ): SafeParseResult<ExternalConfig, SDKValidationError> {
466
+ return safeParse(
467
+ jsonString,
468
+ (x) => ExternalConfig$inboundSchema.parse(JSON.parse(x)),
469
+ `Failed to parse 'ExternalConfig' from JSON`,
470
+ );
471
+ }
472
+
473
+ /** @internal */
474
+ export const RequestBody2$inboundSchema: z.ZodType<
475
+ RequestBody2,
476
+ z.ZodTypeDef,
477
+ unknown
478
+ > = z.object({
479
+ type: CreateKnowledgeRequestBodyType$inboundSchema.default("external"),
480
+ key: z.string(),
481
+ description: z.string().optional(),
482
+ external_config: z.lazy(() => ExternalConfig$inboundSchema),
483
+ }).transform((v) => {
484
+ return remap$(v, {
485
+ "external_config": "externalConfig",
486
+ });
487
+ });
488
+
489
+ /** @internal */
490
+ export type RequestBody2$Outbound = {
491
+ type: string;
492
+ key: string;
493
+ description?: string | undefined;
494
+ external_config: ExternalConfig$Outbound;
495
+ };
496
+
497
+ /** @internal */
498
+ export const RequestBody2$outboundSchema: z.ZodType<
499
+ RequestBody2$Outbound,
500
+ z.ZodTypeDef,
501
+ RequestBody2
502
+ > = z.object({
503
+ type: CreateKnowledgeRequestBodyType$outboundSchema.default("external"),
504
+ key: z.string(),
505
+ description: z.string().optional(),
506
+ externalConfig: z.lazy(() => ExternalConfig$outboundSchema),
507
+ }).transform((v) => {
508
+ return remap$(v, {
509
+ externalConfig: "external_config",
510
+ });
511
+ });
512
+
513
+ /**
514
+ * @internal
515
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
516
+ */
517
+ export namespace RequestBody2$ {
518
+ /** @deprecated use `RequestBody2$inboundSchema` instead. */
519
+ export const inboundSchema = RequestBody2$inboundSchema;
520
+ /** @deprecated use `RequestBody2$outboundSchema` instead. */
521
+ export const outboundSchema = RequestBody2$outboundSchema;
522
+ /** @deprecated use `RequestBody2$Outbound` instead. */
523
+ export type Outbound = RequestBody2$Outbound;
524
+ }
525
+
526
+ export function requestBody2ToJSON(requestBody2: RequestBody2): string {
527
+ return JSON.stringify(RequestBody2$outboundSchema.parse(requestBody2));
528
+ }
529
+
530
+ export function requestBody2FromJSON(
531
+ jsonString: string,
532
+ ): SafeParseResult<RequestBody2, SDKValidationError> {
533
+ return safeParse(
534
+ jsonString,
535
+ (x) => RequestBody2$inboundSchema.parse(JSON.parse(x)),
536
+ `Failed to parse 'RequestBody2' from JSON`,
537
+ );
538
+ }
539
+
540
+ /** @internal */
541
+ export const RequestBodyType$inboundSchema: z.ZodNativeEnum<
542
+ typeof RequestBodyType
543
+ > = z.nativeEnum(RequestBodyType);
544
+
545
+ /** @internal */
546
+ export const RequestBodyType$outboundSchema: z.ZodNativeEnum<
547
+ typeof RequestBodyType
548
+ > = RequestBodyType$inboundSchema;
549
+
550
+ /**
551
+ * @internal
552
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
553
+ */
554
+ export namespace RequestBodyType$ {
555
+ /** @deprecated use `RequestBodyType$inboundSchema` instead. */
556
+ export const inboundSchema = RequestBodyType$inboundSchema;
557
+ /** @deprecated use `RequestBodyType$outboundSchema` instead. */
558
+ export const outboundSchema = RequestBodyType$outboundSchema;
559
+ }
560
+
561
+ /** @internal */
562
+ export const RetrievalType$inboundSchema: z.ZodNativeEnum<
563
+ typeof RetrievalType
564
+ > = z.nativeEnum(RetrievalType);
565
+
566
+ /** @internal */
567
+ export const RetrievalType$outboundSchema: z.ZodNativeEnum<
568
+ typeof RetrievalType
569
+ > = RetrievalType$inboundSchema;
570
+
571
+ /**
572
+ * @internal
573
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
574
+ */
575
+ export namespace RetrievalType$ {
576
+ /** @deprecated use `RetrievalType$inboundSchema` instead. */
577
+ export const inboundSchema = RetrievalType$inboundSchema;
578
+ /** @deprecated use `RetrievalType$outboundSchema` instead. */
579
+ export const outboundSchema = RetrievalType$outboundSchema;
580
+ }
581
+
582
+ /** @internal */
583
+ export const CreateKnowledgeRequestBodyRerankConfig$inboundSchema: z.ZodType<
584
+ CreateKnowledgeRequestBodyRerankConfig,
585
+ z.ZodTypeDef,
586
+ unknown
587
+ > = z.object({
588
+ top_k: z.number().int().default(5),
589
+ rerank_threshold: z.number().default(0.5),
590
+ rerank_model: z.string(),
591
+ }).transform((v) => {
592
+ return remap$(v, {
593
+ "top_k": "topK",
594
+ "rerank_threshold": "rerankThreshold",
595
+ "rerank_model": "rerankModel",
596
+ });
597
+ });
598
+
599
+ /** @internal */
600
+ export type CreateKnowledgeRequestBodyRerankConfig$Outbound = {
601
+ top_k: number;
602
+ rerank_threshold: number;
603
+ rerank_model: string;
604
+ };
605
+
606
+ /** @internal */
607
+ export const CreateKnowledgeRequestBodyRerankConfig$outboundSchema: z.ZodType<
608
+ CreateKnowledgeRequestBodyRerankConfig$Outbound,
609
+ z.ZodTypeDef,
610
+ CreateKnowledgeRequestBodyRerankConfig
611
+ > = z.object({
612
+ topK: z.number().int().default(5),
613
+ rerankThreshold: z.number().default(0.5),
614
+ rerankModel: z.string(),
615
+ }).transform((v) => {
616
+ return remap$(v, {
617
+ topK: "top_k",
618
+ rerankThreshold: "rerank_threshold",
619
+ rerankModel: "rerank_model",
620
+ });
621
+ });
622
+
623
+ /**
624
+ * @internal
625
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
626
+ */
627
+ export namespace CreateKnowledgeRequestBodyRerankConfig$ {
628
+ /** @deprecated use `CreateKnowledgeRequestBodyRerankConfig$inboundSchema` instead. */
629
+ export const inboundSchema =
630
+ CreateKnowledgeRequestBodyRerankConfig$inboundSchema;
631
+ /** @deprecated use `CreateKnowledgeRequestBodyRerankConfig$outboundSchema` instead. */
632
+ export const outboundSchema =
633
+ CreateKnowledgeRequestBodyRerankConfig$outboundSchema;
634
+ /** @deprecated use `CreateKnowledgeRequestBodyRerankConfig$Outbound` instead. */
635
+ export type Outbound = CreateKnowledgeRequestBodyRerankConfig$Outbound;
636
+ }
637
+
638
+ export function createKnowledgeRequestBodyRerankConfigToJSON(
639
+ createKnowledgeRequestBodyRerankConfig:
640
+ CreateKnowledgeRequestBodyRerankConfig,
641
+ ): string {
642
+ return JSON.stringify(
643
+ CreateKnowledgeRequestBodyRerankConfig$outboundSchema.parse(
644
+ createKnowledgeRequestBodyRerankConfig,
645
+ ),
646
+ );
647
+ }
648
+
649
+ export function createKnowledgeRequestBodyRerankConfigFromJSON(
650
+ jsonString: string,
651
+ ): SafeParseResult<CreateKnowledgeRequestBodyRerankConfig, SDKValidationError> {
652
+ return safeParse(
653
+ jsonString,
654
+ (x) =>
655
+ CreateKnowledgeRequestBodyRerankConfig$inboundSchema.parse(JSON.parse(x)),
656
+ `Failed to parse 'CreateKnowledgeRequestBodyRerankConfig' from JSON`,
657
+ );
658
+ }
659
+
660
+ /** @internal */
661
+ export const CreateKnowledgeRequestBodyAgenticRagConfig$inboundSchema:
662
+ z.ZodType<CreateKnowledgeRequestBodyAgenticRagConfig, z.ZodTypeDef, unknown> =
663
+ z.object({
664
+ model: z.string(),
665
+ });
666
+
667
+ /** @internal */
668
+ export type CreateKnowledgeRequestBodyAgenticRagConfig$Outbound = {
669
+ model: string;
670
+ };
671
+
672
+ /** @internal */
673
+ export const CreateKnowledgeRequestBodyAgenticRagConfig$outboundSchema:
674
+ z.ZodType<
675
+ CreateKnowledgeRequestBodyAgenticRagConfig$Outbound,
676
+ z.ZodTypeDef,
677
+ CreateKnowledgeRequestBodyAgenticRagConfig
678
+ > = z.object({
679
+ model: z.string(),
680
+ });
681
+
682
+ /**
683
+ * @internal
684
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
685
+ */
686
+ export namespace CreateKnowledgeRequestBodyAgenticRagConfig$ {
687
+ /** @deprecated use `CreateKnowledgeRequestBodyAgenticRagConfig$inboundSchema` instead. */
688
+ export const inboundSchema =
689
+ CreateKnowledgeRequestBodyAgenticRagConfig$inboundSchema;
690
+ /** @deprecated use `CreateKnowledgeRequestBodyAgenticRagConfig$outboundSchema` instead. */
691
+ export const outboundSchema =
692
+ CreateKnowledgeRequestBodyAgenticRagConfig$outboundSchema;
693
+ /** @deprecated use `CreateKnowledgeRequestBodyAgenticRagConfig$Outbound` instead. */
694
+ export type Outbound = CreateKnowledgeRequestBodyAgenticRagConfig$Outbound;
695
+ }
696
+
697
+ export function createKnowledgeRequestBodyAgenticRagConfigToJSON(
698
+ createKnowledgeRequestBodyAgenticRagConfig:
699
+ CreateKnowledgeRequestBodyAgenticRagConfig,
700
+ ): string {
701
+ return JSON.stringify(
702
+ CreateKnowledgeRequestBodyAgenticRagConfig$outboundSchema.parse(
703
+ createKnowledgeRequestBodyAgenticRagConfig,
704
+ ),
705
+ );
706
+ }
707
+
708
+ export function createKnowledgeRequestBodyAgenticRagConfigFromJSON(
709
+ jsonString: string,
710
+ ): SafeParseResult<
711
+ CreateKnowledgeRequestBodyAgenticRagConfig,
712
+ SDKValidationError
713
+ > {
714
+ return safeParse(
715
+ jsonString,
716
+ (x) =>
717
+ CreateKnowledgeRequestBodyAgenticRagConfig$inboundSchema.parse(
718
+ JSON.parse(x),
719
+ ),
720
+ `Failed to parse 'CreateKnowledgeRequestBodyAgenticRagConfig' from JSON`,
721
+ );
722
+ }
723
+
724
+ /** @internal */
725
+ export const RetrievalSettings$inboundSchema: z.ZodType<
726
+ RetrievalSettings,
727
+ z.ZodTypeDef,
728
+ unknown
729
+ > = z.object({
730
+ retrieval_type: RetrievalType$inboundSchema.default("hybrid_search"),
731
+ top_k: z.number().int().default(5),
732
+ threshold: z.number().default(0),
733
+ rerank_config: z.nullable(
734
+ z.lazy(() => CreateKnowledgeRequestBodyRerankConfig$inboundSchema),
735
+ ).optional(),
736
+ agentic_rag_config: z.nullable(
737
+ z.lazy(() => CreateKnowledgeRequestBodyAgenticRagConfig$inboundSchema),
738
+ ).optional(),
739
+ }).transform((v) => {
740
+ return remap$(v, {
741
+ "retrieval_type": "retrievalType",
742
+ "top_k": "topK",
743
+ "rerank_config": "rerankConfig",
744
+ "agentic_rag_config": "agenticRagConfig",
745
+ });
746
+ });
747
+
748
+ /** @internal */
749
+ export type RetrievalSettings$Outbound = {
750
+ retrieval_type: string;
751
+ top_k: number;
752
+ threshold: number;
753
+ rerank_config?:
754
+ | CreateKnowledgeRequestBodyRerankConfig$Outbound
755
+ | null
756
+ | undefined;
757
+ agentic_rag_config?:
758
+ | CreateKnowledgeRequestBodyAgenticRagConfig$Outbound
759
+ | null
760
+ | undefined;
761
+ };
762
+
763
+ /** @internal */
764
+ export const RetrievalSettings$outboundSchema: z.ZodType<
765
+ RetrievalSettings$Outbound,
766
+ z.ZodTypeDef,
767
+ RetrievalSettings
768
+ > = z.object({
769
+ retrievalType: RetrievalType$outboundSchema.default("hybrid_search"),
770
+ topK: z.number().int().default(5),
771
+ threshold: z.number().default(0),
772
+ rerankConfig: z.nullable(
773
+ z.lazy(() => CreateKnowledgeRequestBodyRerankConfig$outboundSchema),
774
+ ).optional(),
775
+ agenticRagConfig: z.nullable(
776
+ z.lazy(() => CreateKnowledgeRequestBodyAgenticRagConfig$outboundSchema),
777
+ ).optional(),
778
+ }).transform((v) => {
779
+ return remap$(v, {
780
+ retrievalType: "retrieval_type",
781
+ topK: "top_k",
782
+ rerankConfig: "rerank_config",
783
+ agenticRagConfig: "agentic_rag_config",
784
+ });
785
+ });
786
+
787
+ /**
788
+ * @internal
789
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
790
+ */
791
+ export namespace RetrievalSettings$ {
792
+ /** @deprecated use `RetrievalSettings$inboundSchema` instead. */
793
+ export const inboundSchema = RetrievalSettings$inboundSchema;
794
+ /** @deprecated use `RetrievalSettings$outboundSchema` instead. */
795
+ export const outboundSchema = RetrievalSettings$outboundSchema;
796
+ /** @deprecated use `RetrievalSettings$Outbound` instead. */
797
+ export type Outbound = RetrievalSettings$Outbound;
798
+ }
799
+
800
+ export function retrievalSettingsToJSON(
801
+ retrievalSettings: RetrievalSettings,
802
+ ): string {
803
+ return JSON.stringify(
804
+ RetrievalSettings$outboundSchema.parse(retrievalSettings),
805
+ );
806
+ }
807
+
808
+ export function retrievalSettingsFromJSON(
809
+ jsonString: string,
810
+ ): SafeParseResult<RetrievalSettings, SDKValidationError> {
811
+ return safeParse(
812
+ jsonString,
813
+ (x) => RetrievalSettings$inboundSchema.parse(JSON.parse(x)),
814
+ `Failed to parse 'RetrievalSettings' from JSON`,
815
+ );
816
+ }
817
+
818
+ /** @internal */
819
+ export const RequestBody1$inboundSchema: z.ZodType<
820
+ RequestBody1,
821
+ z.ZodTypeDef,
822
+ unknown
823
+ > = z.object({
824
+ type: RequestBodyType$inboundSchema.default("internal"),
825
+ key: z.string(),
826
+ description: z.string().optional(),
827
+ embedding_model: z.string(),
828
+ is_private_model: z.boolean().default(false),
829
+ retrieval_settings: z.lazy(() => RetrievalSettings$inboundSchema).optional(),
830
+ path: z.string(),
831
+ }).transform((v) => {
832
+ return remap$(v, {
833
+ "embedding_model": "embeddingModel",
834
+ "is_private_model": "isPrivateModel",
835
+ "retrieval_settings": "retrievalSettings",
836
+ });
837
+ });
838
+
839
+ /** @internal */
840
+ export type RequestBody1$Outbound = {
841
+ type: string;
842
+ key: string;
843
+ description?: string | undefined;
844
+ embedding_model: string;
845
+ is_private_model: boolean;
846
+ retrieval_settings?: RetrievalSettings$Outbound | undefined;
847
+ path: string;
848
+ };
849
+
850
+ /** @internal */
851
+ export const RequestBody1$outboundSchema: z.ZodType<
852
+ RequestBody1$Outbound,
853
+ z.ZodTypeDef,
854
+ RequestBody1
855
+ > = z.object({
856
+ type: RequestBodyType$outboundSchema.default("internal"),
857
+ key: z.string(),
858
+ description: z.string().optional(),
859
+ embeddingModel: z.string(),
860
+ isPrivateModel: z.boolean().default(false),
861
+ retrievalSettings: z.lazy(() => RetrievalSettings$outboundSchema).optional(),
862
+ path: z.string(),
863
+ }).transform((v) => {
864
+ return remap$(v, {
865
+ embeddingModel: "embedding_model",
866
+ isPrivateModel: "is_private_model",
867
+ retrievalSettings: "retrieval_settings",
868
+ });
869
+ });
870
+
871
+ /**
872
+ * @internal
873
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
874
+ */
875
+ export namespace RequestBody1$ {
876
+ /** @deprecated use `RequestBody1$inboundSchema` instead. */
877
+ export const inboundSchema = RequestBody1$inboundSchema;
878
+ /** @deprecated use `RequestBody1$outboundSchema` instead. */
879
+ export const outboundSchema = RequestBody1$outboundSchema;
880
+ /** @deprecated use `RequestBody1$Outbound` instead. */
881
+ export type Outbound = RequestBody1$Outbound;
882
+ }
883
+
884
+ export function requestBody1ToJSON(requestBody1: RequestBody1): string {
885
+ return JSON.stringify(RequestBody1$outboundSchema.parse(requestBody1));
886
+ }
887
+
888
+ export function requestBody1FromJSON(
889
+ jsonString: string,
890
+ ): SafeParseResult<RequestBody1, SDKValidationError> {
891
+ return safeParse(
892
+ jsonString,
893
+ (x) => RequestBody1$inboundSchema.parse(JSON.parse(x)),
894
+ `Failed to parse 'RequestBody1' from JSON`,
895
+ );
896
+ }
897
+
898
+ /** @internal */
899
+ export const CreateKnowledgeRequestBody$inboundSchema: z.ZodType<
900
+ CreateKnowledgeRequestBody,
901
+ z.ZodTypeDef,
902
+ unknown
903
+ > = z.union([
904
+ z.lazy(() => RequestBody1$inboundSchema),
905
+ z.lazy(() => RequestBody2$inboundSchema),
906
+ ]);
907
+
908
+ /** @internal */
909
+ export type CreateKnowledgeRequestBody$Outbound =
910
+ | RequestBody1$Outbound
911
+ | RequestBody2$Outbound;
912
+
913
+ /** @internal */
914
+ export const CreateKnowledgeRequestBody$outboundSchema: z.ZodType<
915
+ CreateKnowledgeRequestBody$Outbound,
916
+ z.ZodTypeDef,
917
+ CreateKnowledgeRequestBody
918
+ > = z.union([
919
+ z.lazy(() => RequestBody1$outboundSchema),
920
+ z.lazy(() => RequestBody2$outboundSchema),
921
+ ]);
922
+
923
+ /**
924
+ * @internal
925
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
926
+ */
927
+ export namespace CreateKnowledgeRequestBody$ {
928
+ /** @deprecated use `CreateKnowledgeRequestBody$inboundSchema` instead. */
929
+ export const inboundSchema = CreateKnowledgeRequestBody$inboundSchema;
930
+ /** @deprecated use `CreateKnowledgeRequestBody$outboundSchema` instead. */
931
+ export const outboundSchema = CreateKnowledgeRequestBody$outboundSchema;
932
+ /** @deprecated use `CreateKnowledgeRequestBody$Outbound` instead. */
933
+ export type Outbound = CreateKnowledgeRequestBody$Outbound;
934
+ }
935
+
936
+ export function createKnowledgeRequestBodyToJSON(
937
+ createKnowledgeRequestBody: CreateKnowledgeRequestBody,
938
+ ): string {
939
+ return JSON.stringify(
940
+ CreateKnowledgeRequestBody$outboundSchema.parse(createKnowledgeRequestBody),
941
+ );
942
+ }
943
+
944
+ export function createKnowledgeRequestBodyFromJSON(
945
+ jsonString: string,
946
+ ): SafeParseResult<CreateKnowledgeRequestBody, SDKValidationError> {
947
+ return safeParse(
948
+ jsonString,
949
+ (x) => CreateKnowledgeRequestBody$inboundSchema.parse(JSON.parse(x)),
950
+ `Failed to parse 'CreateKnowledgeRequestBody' from JSON`,
951
+ );
952
+ }
953
+
209
954
  /** @internal */
210
- export const RetrievalType$inboundSchema: z.ZodNativeEnum<
211
- typeof RetrievalType
212
- > = z.nativeEnum(RetrievalType);
955
+ export const CreateKnowledgeResponseBodyType$inboundSchema: z.ZodNativeEnum<
956
+ typeof CreateKnowledgeResponseBodyType
957
+ > = z.nativeEnum(CreateKnowledgeResponseBodyType);
213
958
 
214
959
  /** @internal */
215
- export const RetrievalType$outboundSchema: z.ZodNativeEnum<
216
- typeof RetrievalType
217
- > = RetrievalType$inboundSchema;
960
+ export const CreateKnowledgeResponseBodyType$outboundSchema: z.ZodNativeEnum<
961
+ typeof CreateKnowledgeResponseBodyType
962
+ > = CreateKnowledgeResponseBodyType$inboundSchema;
218
963
 
219
964
  /**
220
965
  * @internal
221
966
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
222
967
  */
223
- export namespace RetrievalType$ {
224
- /** @deprecated use `RetrievalType$inboundSchema` instead. */
225
- export const inboundSchema = RetrievalType$inboundSchema;
226
- /** @deprecated use `RetrievalType$outboundSchema` instead. */
227
- export const outboundSchema = RetrievalType$outboundSchema;
968
+ export namespace CreateKnowledgeResponseBodyType$ {
969
+ /** @deprecated use `CreateKnowledgeResponseBodyType$inboundSchema` instead. */
970
+ export const inboundSchema = CreateKnowledgeResponseBodyType$inboundSchema;
971
+ /** @deprecated use `CreateKnowledgeResponseBodyType$outboundSchema` instead. */
972
+ export const outboundSchema = CreateKnowledgeResponseBodyType$outboundSchema;
228
973
  }
229
974
 
230
975
  /** @internal */
231
- export const RerankConfig$inboundSchema: z.ZodType<
232
- RerankConfig,
976
+ export const CreateKnowledgeResponseBodyRerankConfig$inboundSchema: z.ZodType<
977
+ CreateKnowledgeResponseBodyRerankConfig,
233
978
  z.ZodTypeDef,
234
979
  unknown
235
980
  > = z.object({
@@ -245,17 +990,17 @@ export const RerankConfig$inboundSchema: z.ZodType<
245
990
  });
246
991
 
247
992
  /** @internal */
248
- export type RerankConfig$Outbound = {
993
+ export type CreateKnowledgeResponseBodyRerankConfig$Outbound = {
249
994
  top_k: number;
250
995
  rerank_threshold: number;
251
996
  rerank_model: string;
252
997
  };
253
998
 
254
999
  /** @internal */
255
- export const RerankConfig$outboundSchema: z.ZodType<
256
- RerankConfig$Outbound,
1000
+ export const CreateKnowledgeResponseBodyRerankConfig$outboundSchema: z.ZodType<
1001
+ CreateKnowledgeResponseBodyRerankConfig$Outbound,
257
1002
  z.ZodTypeDef,
258
- RerankConfig
1003
+ CreateKnowledgeResponseBodyRerankConfig
259
1004
  > = z.object({
260
1005
  topK: z.number().int().default(5),
261
1006
  rerankThreshold: z.number().default(0.5),
@@ -272,133 +1017,244 @@ export const RerankConfig$outboundSchema: z.ZodType<
272
1017
  * @internal
273
1018
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
274
1019
  */
275
- export namespace RerankConfig$ {
276
- /** @deprecated use `RerankConfig$inboundSchema` instead. */
277
- export const inboundSchema = RerankConfig$inboundSchema;
278
- /** @deprecated use `RerankConfig$outboundSchema` instead. */
279
- export const outboundSchema = RerankConfig$outboundSchema;
280
- /** @deprecated use `RerankConfig$Outbound` instead. */
281
- export type Outbound = RerankConfig$Outbound;
1020
+ export namespace CreateKnowledgeResponseBodyRerankConfig$ {
1021
+ /** @deprecated use `CreateKnowledgeResponseBodyRerankConfig$inboundSchema` instead. */
1022
+ export const inboundSchema =
1023
+ CreateKnowledgeResponseBodyRerankConfig$inboundSchema;
1024
+ /** @deprecated use `CreateKnowledgeResponseBodyRerankConfig$outboundSchema` instead. */
1025
+ export const outboundSchema =
1026
+ CreateKnowledgeResponseBodyRerankConfig$outboundSchema;
1027
+ /** @deprecated use `CreateKnowledgeResponseBodyRerankConfig$Outbound` instead. */
1028
+ export type Outbound = CreateKnowledgeResponseBodyRerankConfig$Outbound;
282
1029
  }
283
1030
 
284
- export function rerankConfigToJSON(rerankConfig: RerankConfig): string {
285
- return JSON.stringify(RerankConfig$outboundSchema.parse(rerankConfig));
1031
+ export function createKnowledgeResponseBodyRerankConfigToJSON(
1032
+ createKnowledgeResponseBodyRerankConfig:
1033
+ CreateKnowledgeResponseBodyRerankConfig,
1034
+ ): string {
1035
+ return JSON.stringify(
1036
+ CreateKnowledgeResponseBodyRerankConfig$outboundSchema.parse(
1037
+ createKnowledgeResponseBodyRerankConfig,
1038
+ ),
1039
+ );
286
1040
  }
287
1041
 
288
- export function rerankConfigFromJSON(
1042
+ export function createKnowledgeResponseBodyRerankConfigFromJSON(
289
1043
  jsonString: string,
290
- ): SafeParseResult<RerankConfig, SDKValidationError> {
1044
+ ): SafeParseResult<
1045
+ CreateKnowledgeResponseBodyRerankConfig,
1046
+ SDKValidationError
1047
+ > {
291
1048
  return safeParse(
292
1049
  jsonString,
293
- (x) => RerankConfig$inboundSchema.parse(JSON.parse(x)),
294
- `Failed to parse 'RerankConfig' from JSON`,
1050
+ (x) =>
1051
+ CreateKnowledgeResponseBodyRerankConfig$inboundSchema.parse(
1052
+ JSON.parse(x),
1053
+ ),
1054
+ `Failed to parse 'CreateKnowledgeResponseBodyRerankConfig' from JSON`,
295
1055
  );
296
1056
  }
297
1057
 
298
1058
  /** @internal */
299
- export const AgenticRagConfig$inboundSchema: z.ZodType<
300
- AgenticRagConfig,
301
- z.ZodTypeDef,
302
- unknown
303
- > = z.object({
304
- model: z.string(),
305
- });
1059
+ export const CreateKnowledgeResponseBodyAgenticRagConfig$inboundSchema:
1060
+ z.ZodType<
1061
+ CreateKnowledgeResponseBodyAgenticRagConfig,
1062
+ z.ZodTypeDef,
1063
+ unknown
1064
+ > = z.object({
1065
+ model: z.string(),
1066
+ });
306
1067
 
307
1068
  /** @internal */
308
- export type AgenticRagConfig$Outbound = {
1069
+ export type CreateKnowledgeResponseBodyAgenticRagConfig$Outbound = {
309
1070
  model: string;
310
1071
  };
311
1072
 
312
1073
  /** @internal */
313
- export const AgenticRagConfig$outboundSchema: z.ZodType<
314
- AgenticRagConfig$Outbound,
315
- z.ZodTypeDef,
316
- AgenticRagConfig
317
- > = z.object({
318
- model: z.string(),
319
- });
1074
+ export const CreateKnowledgeResponseBodyAgenticRagConfig$outboundSchema:
1075
+ z.ZodType<
1076
+ CreateKnowledgeResponseBodyAgenticRagConfig$Outbound,
1077
+ z.ZodTypeDef,
1078
+ CreateKnowledgeResponseBodyAgenticRagConfig
1079
+ > = z.object({
1080
+ model: z.string(),
1081
+ });
320
1082
 
321
1083
  /**
322
1084
  * @internal
323
1085
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
324
1086
  */
325
- export namespace AgenticRagConfig$ {
326
- /** @deprecated use `AgenticRagConfig$inboundSchema` instead. */
327
- export const inboundSchema = AgenticRagConfig$inboundSchema;
328
- /** @deprecated use `AgenticRagConfig$outboundSchema` instead. */
329
- export const outboundSchema = AgenticRagConfig$outboundSchema;
330
- /** @deprecated use `AgenticRagConfig$Outbound` instead. */
331
- export type Outbound = AgenticRagConfig$Outbound;
1087
+ export namespace CreateKnowledgeResponseBodyAgenticRagConfig$ {
1088
+ /** @deprecated use `CreateKnowledgeResponseBodyAgenticRagConfig$inboundSchema` instead. */
1089
+ export const inboundSchema =
1090
+ CreateKnowledgeResponseBodyAgenticRagConfig$inboundSchema;
1091
+ /** @deprecated use `CreateKnowledgeResponseBodyAgenticRagConfig$outboundSchema` instead. */
1092
+ export const outboundSchema =
1093
+ CreateKnowledgeResponseBodyAgenticRagConfig$outboundSchema;
1094
+ /** @deprecated use `CreateKnowledgeResponseBodyAgenticRagConfig$Outbound` instead. */
1095
+ export type Outbound = CreateKnowledgeResponseBodyAgenticRagConfig$Outbound;
332
1096
  }
333
1097
 
334
- export function agenticRagConfigToJSON(
335
- agenticRagConfig: AgenticRagConfig,
1098
+ export function createKnowledgeResponseBodyAgenticRagConfigToJSON(
1099
+ createKnowledgeResponseBodyAgenticRagConfig:
1100
+ CreateKnowledgeResponseBodyAgenticRagConfig,
336
1101
  ): string {
337
1102
  return JSON.stringify(
338
- AgenticRagConfig$outboundSchema.parse(agenticRagConfig),
1103
+ CreateKnowledgeResponseBodyAgenticRagConfig$outboundSchema.parse(
1104
+ createKnowledgeResponseBodyAgenticRagConfig,
1105
+ ),
339
1106
  );
340
1107
  }
341
1108
 
342
- export function agenticRagConfigFromJSON(
1109
+ export function createKnowledgeResponseBodyAgenticRagConfigFromJSON(
343
1110
  jsonString: string,
344
- ): SafeParseResult<AgenticRagConfig, SDKValidationError> {
1111
+ ): SafeParseResult<
1112
+ CreateKnowledgeResponseBodyAgenticRagConfig,
1113
+ SDKValidationError
1114
+ > {
345
1115
  return safeParse(
346
1116
  jsonString,
347
- (x) => AgenticRagConfig$inboundSchema.parse(JSON.parse(x)),
348
- `Failed to parse 'AgenticRagConfig' from JSON`,
1117
+ (x) =>
1118
+ CreateKnowledgeResponseBodyAgenticRagConfig$inboundSchema.parse(
1119
+ JSON.parse(x),
1120
+ ),
1121
+ `Failed to parse 'CreateKnowledgeResponseBodyAgenticRagConfig' from JSON`,
349
1122
  );
350
1123
  }
351
1124
 
352
1125
  /** @internal */
353
- export const RetrievalSettings$inboundSchema: z.ZodType<
354
- RetrievalSettings,
1126
+ export const CreateKnowledgeResponseBodyRetrievalSettings$inboundSchema:
1127
+ z.ZodType<
1128
+ CreateKnowledgeResponseBodyRetrievalSettings,
1129
+ z.ZodTypeDef,
1130
+ unknown
1131
+ > = z.object({
1132
+ top_k: z.number().int().default(5),
1133
+ threshold: z.number().default(0),
1134
+ rerank_config: z.nullable(
1135
+ z.lazy(() => CreateKnowledgeResponseBodyRerankConfig$inboundSchema),
1136
+ ).optional(),
1137
+ agentic_rag_config: z.nullable(
1138
+ z.lazy(() => CreateKnowledgeResponseBodyAgenticRagConfig$inboundSchema),
1139
+ ).optional(),
1140
+ }).transform((v) => {
1141
+ return remap$(v, {
1142
+ "top_k": "topK",
1143
+ "rerank_config": "rerankConfig",
1144
+ "agentic_rag_config": "agenticRagConfig",
1145
+ });
1146
+ });
1147
+
1148
+ /** @internal */
1149
+ export type CreateKnowledgeResponseBodyRetrievalSettings$Outbound = {
1150
+ top_k: number;
1151
+ threshold: number;
1152
+ rerank_config?:
1153
+ | CreateKnowledgeResponseBodyRerankConfig$Outbound
1154
+ | null
1155
+ | undefined;
1156
+ agentic_rag_config?:
1157
+ | CreateKnowledgeResponseBodyAgenticRagConfig$Outbound
1158
+ | null
1159
+ | undefined;
1160
+ };
1161
+
1162
+ /** @internal */
1163
+ export const CreateKnowledgeResponseBodyRetrievalSettings$outboundSchema:
1164
+ z.ZodType<
1165
+ CreateKnowledgeResponseBodyRetrievalSettings$Outbound,
1166
+ z.ZodTypeDef,
1167
+ CreateKnowledgeResponseBodyRetrievalSettings
1168
+ > = z.object({
1169
+ topK: z.number().int().default(5),
1170
+ threshold: z.number().default(0),
1171
+ rerankConfig: z.nullable(
1172
+ z.lazy(() => CreateKnowledgeResponseBodyRerankConfig$outboundSchema),
1173
+ ).optional(),
1174
+ agenticRagConfig: z.nullable(
1175
+ z.lazy(() => CreateKnowledgeResponseBodyAgenticRagConfig$outboundSchema),
1176
+ ).optional(),
1177
+ }).transform((v) => {
1178
+ return remap$(v, {
1179
+ topK: "top_k",
1180
+ rerankConfig: "rerank_config",
1181
+ agenticRagConfig: "agentic_rag_config",
1182
+ });
1183
+ });
1184
+
1185
+ /**
1186
+ * @internal
1187
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1188
+ */
1189
+ export namespace CreateKnowledgeResponseBodyRetrievalSettings$ {
1190
+ /** @deprecated use `CreateKnowledgeResponseBodyRetrievalSettings$inboundSchema` instead. */
1191
+ export const inboundSchema =
1192
+ CreateKnowledgeResponseBodyRetrievalSettings$inboundSchema;
1193
+ /** @deprecated use `CreateKnowledgeResponseBodyRetrievalSettings$outboundSchema` instead. */
1194
+ export const outboundSchema =
1195
+ CreateKnowledgeResponseBodyRetrievalSettings$outboundSchema;
1196
+ /** @deprecated use `CreateKnowledgeResponseBodyRetrievalSettings$Outbound` instead. */
1197
+ export type Outbound = CreateKnowledgeResponseBodyRetrievalSettings$Outbound;
1198
+ }
1199
+
1200
+ export function createKnowledgeResponseBodyRetrievalSettingsToJSON(
1201
+ createKnowledgeResponseBodyRetrievalSettings:
1202
+ CreateKnowledgeResponseBodyRetrievalSettings,
1203
+ ): string {
1204
+ return JSON.stringify(
1205
+ CreateKnowledgeResponseBodyRetrievalSettings$outboundSchema.parse(
1206
+ createKnowledgeResponseBodyRetrievalSettings,
1207
+ ),
1208
+ );
1209
+ }
1210
+
1211
+ export function createKnowledgeResponseBodyRetrievalSettingsFromJSON(
1212
+ jsonString: string,
1213
+ ): SafeParseResult<
1214
+ CreateKnowledgeResponseBodyRetrievalSettings,
1215
+ SDKValidationError
1216
+ > {
1217
+ return safeParse(
1218
+ jsonString,
1219
+ (x) =>
1220
+ CreateKnowledgeResponseBodyRetrievalSettings$inboundSchema.parse(
1221
+ JSON.parse(x),
1222
+ ),
1223
+ `Failed to parse 'CreateKnowledgeResponseBodyRetrievalSettings' from JSON`,
1224
+ );
1225
+ }
1226
+
1227
+ /** @internal */
1228
+ export const ResponseBodyExternalConfig$inboundSchema: z.ZodType<
1229
+ ResponseBodyExternalConfig,
355
1230
  z.ZodTypeDef,
356
1231
  unknown
357
1232
  > = z.object({
358
- retrieval_type: RetrievalType$inboundSchema.default("hybrid_search"),
359
- top_k: z.number().int().default(5),
360
- threshold: z.number().default(0),
361
- rerank_config: z.nullable(z.lazy(() => RerankConfig$inboundSchema))
362
- .optional(),
363
- agentic_rag_config: z.nullable(z.lazy(() => AgenticRagConfig$inboundSchema))
364
- .optional(),
1233
+ name: z.string(),
1234
+ api_url: z.string(),
365
1235
  }).transform((v) => {
366
1236
  return remap$(v, {
367
- "retrieval_type": "retrievalType",
368
- "top_k": "topK",
369
- "rerank_config": "rerankConfig",
370
- "agentic_rag_config": "agenticRagConfig",
1237
+ "api_url": "apiUrl",
371
1238
  });
372
1239
  });
373
1240
 
374
1241
  /** @internal */
375
- export type RetrievalSettings$Outbound = {
376
- retrieval_type: string;
377
- top_k: number;
378
- threshold: number;
379
- rerank_config?: RerankConfig$Outbound | null | undefined;
380
- agentic_rag_config?: AgenticRagConfig$Outbound | null | undefined;
1242
+ export type ResponseBodyExternalConfig$Outbound = {
1243
+ name: string;
1244
+ api_url: string;
381
1245
  };
382
1246
 
383
1247
  /** @internal */
384
- export const RetrievalSettings$outboundSchema: z.ZodType<
385
- RetrievalSettings$Outbound,
1248
+ export const ResponseBodyExternalConfig$outboundSchema: z.ZodType<
1249
+ ResponseBodyExternalConfig$Outbound,
386
1250
  z.ZodTypeDef,
387
- RetrievalSettings
1251
+ ResponseBodyExternalConfig
388
1252
  > = z.object({
389
- retrievalType: RetrievalType$outboundSchema.default("hybrid_search"),
390
- topK: z.number().int().default(5),
391
- threshold: z.number().default(0),
392
- rerankConfig: z.nullable(z.lazy(() => RerankConfig$outboundSchema))
393
- .optional(),
394
- agenticRagConfig: z.nullable(z.lazy(() => AgenticRagConfig$outboundSchema))
395
- .optional(),
1253
+ name: z.string(),
1254
+ apiUrl: z.string(),
396
1255
  }).transform((v) => {
397
1256
  return remap$(v, {
398
- retrievalType: "retrieval_type",
399
- topK: "top_k",
400
- rerankConfig: "rerank_config",
401
- agenticRagConfig: "agentic_rag_config",
1257
+ apiUrl: "api_url",
402
1258
  });
403
1259
  });
404
1260
 
@@ -406,75 +1262,110 @@ export const RetrievalSettings$outboundSchema: z.ZodType<
406
1262
  * @internal
407
1263
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
408
1264
  */
409
- export namespace RetrievalSettings$ {
410
- /** @deprecated use `RetrievalSettings$inboundSchema` instead. */
411
- export const inboundSchema = RetrievalSettings$inboundSchema;
412
- /** @deprecated use `RetrievalSettings$outboundSchema` instead. */
413
- export const outboundSchema = RetrievalSettings$outboundSchema;
414
- /** @deprecated use `RetrievalSettings$Outbound` instead. */
415
- export type Outbound = RetrievalSettings$Outbound;
1265
+ export namespace ResponseBodyExternalConfig$ {
1266
+ /** @deprecated use `ResponseBodyExternalConfig$inboundSchema` instead. */
1267
+ export const inboundSchema = ResponseBodyExternalConfig$inboundSchema;
1268
+ /** @deprecated use `ResponseBodyExternalConfig$outboundSchema` instead. */
1269
+ export const outboundSchema = ResponseBodyExternalConfig$outboundSchema;
1270
+ /** @deprecated use `ResponseBodyExternalConfig$Outbound` instead. */
1271
+ export type Outbound = ResponseBodyExternalConfig$Outbound;
416
1272
  }
417
1273
 
418
- export function retrievalSettingsToJSON(
419
- retrievalSettings: RetrievalSettings,
1274
+ export function responseBodyExternalConfigToJSON(
1275
+ responseBodyExternalConfig: ResponseBodyExternalConfig,
420
1276
  ): string {
421
1277
  return JSON.stringify(
422
- RetrievalSettings$outboundSchema.parse(retrievalSettings),
1278
+ ResponseBodyExternalConfig$outboundSchema.parse(responseBodyExternalConfig),
423
1279
  );
424
1280
  }
425
1281
 
426
- export function retrievalSettingsFromJSON(
1282
+ export function responseBodyExternalConfigFromJSON(
427
1283
  jsonString: string,
428
- ): SafeParseResult<RetrievalSettings, SDKValidationError> {
1284
+ ): SafeParseResult<ResponseBodyExternalConfig, SDKValidationError> {
429
1285
  return safeParse(
430
1286
  jsonString,
431
- (x) => RetrievalSettings$inboundSchema.parse(JSON.parse(x)),
432
- `Failed to parse 'RetrievalSettings' from JSON`,
1287
+ (x) => ResponseBodyExternalConfig$inboundSchema.parse(JSON.parse(x)),
1288
+ `Failed to parse 'ResponseBodyExternalConfig' from JSON`,
433
1289
  );
434
1290
  }
435
1291
 
436
1292
  /** @internal */
437
- export const CreateKnowledgeRequestBody$inboundSchema: z.ZodType<
438
- CreateKnowledgeRequestBody,
1293
+ export const ResponseBody2$inboundSchema: z.ZodType<
1294
+ ResponseBody2,
439
1295
  z.ZodTypeDef,
440
1296
  unknown
441
1297
  > = z.object({
442
- key: z.string(),
1298
+ _id: z.string(),
1299
+ created: z.string(),
443
1300
  description: z.string().optional(),
444
- embedding_model: z.string(),
445
- retrieval_settings: z.lazy(() => RetrievalSettings$inboundSchema).optional(),
446
- path: z.string(),
1301
+ key: z.string(),
1302
+ domain_id: z.string(),
1303
+ path: z.string().optional(),
1304
+ created_by_id: z.nullable(z.string()).optional(),
1305
+ updated_by_id: z.nullable(z.string()).optional(),
1306
+ updated: z.string(),
1307
+ type: CreateKnowledgeResponseBodyType$inboundSchema.default("external"),
1308
+ retrieval_settings: z.lazy(() =>
1309
+ CreateKnowledgeResponseBodyRetrievalSettings$inboundSchema
1310
+ ).optional(),
1311
+ external_config: z.lazy(() => ResponseBodyExternalConfig$inboundSchema),
447
1312
  }).transform((v) => {
448
1313
  return remap$(v, {
449
- "embedding_model": "embeddingModel",
1314
+ "_id": "id",
1315
+ "domain_id": "domainId",
1316
+ "created_by_id": "createdById",
1317
+ "updated_by_id": "updatedById",
450
1318
  "retrieval_settings": "retrievalSettings",
1319
+ "external_config": "externalConfig",
451
1320
  });
452
1321
  });
453
1322
 
454
1323
  /** @internal */
455
- export type CreateKnowledgeRequestBody$Outbound = {
456
- key: string;
1324
+ export type ResponseBody2$Outbound = {
1325
+ _id: string;
1326
+ created: string;
457
1327
  description?: string | undefined;
458
- embedding_model: string;
459
- retrieval_settings?: RetrievalSettings$Outbound | undefined;
460
- path: string;
1328
+ key: string;
1329
+ domain_id: string;
1330
+ path?: string | undefined;
1331
+ created_by_id?: string | null | undefined;
1332
+ updated_by_id?: string | null | undefined;
1333
+ updated: string;
1334
+ type: string;
1335
+ retrieval_settings?:
1336
+ | CreateKnowledgeResponseBodyRetrievalSettings$Outbound
1337
+ | undefined;
1338
+ external_config: ResponseBodyExternalConfig$Outbound;
461
1339
  };
462
1340
 
463
1341
  /** @internal */
464
- export const CreateKnowledgeRequestBody$outboundSchema: z.ZodType<
465
- CreateKnowledgeRequestBody$Outbound,
1342
+ export const ResponseBody2$outboundSchema: z.ZodType<
1343
+ ResponseBody2$Outbound,
466
1344
  z.ZodTypeDef,
467
- CreateKnowledgeRequestBody
1345
+ ResponseBody2
468
1346
  > = z.object({
469
- key: z.string(),
1347
+ id: z.string(),
1348
+ created: z.string(),
470
1349
  description: z.string().optional(),
471
- embeddingModel: z.string(),
472
- retrievalSettings: z.lazy(() => RetrievalSettings$outboundSchema).optional(),
473
- path: z.string(),
1350
+ key: z.string(),
1351
+ domainId: z.string(),
1352
+ path: z.string().optional(),
1353
+ createdById: z.nullable(z.string()).optional(),
1354
+ updatedById: z.nullable(z.string()).optional(),
1355
+ updated: z.string(),
1356
+ type: CreateKnowledgeResponseBodyType$outboundSchema.default("external"),
1357
+ retrievalSettings: z.lazy(() =>
1358
+ CreateKnowledgeResponseBodyRetrievalSettings$outboundSchema
1359
+ ).optional(),
1360
+ externalConfig: z.lazy(() => ResponseBodyExternalConfig$outboundSchema),
474
1361
  }).transform((v) => {
475
1362
  return remap$(v, {
476
- embeddingModel: "embedding_model",
1363
+ id: "_id",
1364
+ domainId: "domain_id",
1365
+ createdById: "created_by_id",
1366
+ updatedById: "updated_by_id",
477
1367
  retrievalSettings: "retrieval_settings",
1368
+ externalConfig: "external_config",
478
1369
  });
479
1370
  });
480
1371
 
@@ -482,57 +1373,74 @@ export const CreateKnowledgeRequestBody$outboundSchema: z.ZodType<
482
1373
  * @internal
483
1374
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
484
1375
  */
485
- export namespace CreateKnowledgeRequestBody$ {
486
- /** @deprecated use `CreateKnowledgeRequestBody$inboundSchema` instead. */
487
- export const inboundSchema = CreateKnowledgeRequestBody$inboundSchema;
488
- /** @deprecated use `CreateKnowledgeRequestBody$outboundSchema` instead. */
489
- export const outboundSchema = CreateKnowledgeRequestBody$outboundSchema;
490
- /** @deprecated use `CreateKnowledgeRequestBody$Outbound` instead. */
491
- export type Outbound = CreateKnowledgeRequestBody$Outbound;
1376
+ export namespace ResponseBody2$ {
1377
+ /** @deprecated use `ResponseBody2$inboundSchema` instead. */
1378
+ export const inboundSchema = ResponseBody2$inboundSchema;
1379
+ /** @deprecated use `ResponseBody2$outboundSchema` instead. */
1380
+ export const outboundSchema = ResponseBody2$outboundSchema;
1381
+ /** @deprecated use `ResponseBody2$Outbound` instead. */
1382
+ export type Outbound = ResponseBody2$Outbound;
492
1383
  }
493
1384
 
494
- export function createKnowledgeRequestBodyToJSON(
495
- createKnowledgeRequestBody: CreateKnowledgeRequestBody,
496
- ): string {
497
- return JSON.stringify(
498
- CreateKnowledgeRequestBody$outboundSchema.parse(createKnowledgeRequestBody),
499
- );
1385
+ export function responseBody2ToJSON(responseBody2: ResponseBody2): string {
1386
+ return JSON.stringify(ResponseBody2$outboundSchema.parse(responseBody2));
500
1387
  }
501
1388
 
502
- export function createKnowledgeRequestBodyFromJSON(
1389
+ export function responseBody2FromJSON(
503
1390
  jsonString: string,
504
- ): SafeParseResult<CreateKnowledgeRequestBody, SDKValidationError> {
1391
+ ): SafeParseResult<ResponseBody2, SDKValidationError> {
505
1392
  return safeParse(
506
1393
  jsonString,
507
- (x) => CreateKnowledgeRequestBody$inboundSchema.parse(JSON.parse(x)),
508
- `Failed to parse 'CreateKnowledgeRequestBody' from JSON`,
1394
+ (x) => ResponseBody2$inboundSchema.parse(JSON.parse(x)),
1395
+ `Failed to parse 'ResponseBody2' from JSON`,
509
1396
  );
510
1397
  }
511
1398
 
512
1399
  /** @internal */
513
- export const CreateKnowledgeRetrievalType$inboundSchema: z.ZodNativeEnum<
514
- typeof CreateKnowledgeRetrievalType
515
- > = z.nativeEnum(CreateKnowledgeRetrievalType);
1400
+ export const ResponseBodyType$inboundSchema: z.ZodNativeEnum<
1401
+ typeof ResponseBodyType
1402
+ > = z.nativeEnum(ResponseBodyType);
1403
+
1404
+ /** @internal */
1405
+ export const ResponseBodyType$outboundSchema: z.ZodNativeEnum<
1406
+ typeof ResponseBodyType
1407
+ > = ResponseBodyType$inboundSchema;
1408
+
1409
+ /**
1410
+ * @internal
1411
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1412
+ */
1413
+ export namespace ResponseBodyType$ {
1414
+ /** @deprecated use `ResponseBodyType$inboundSchema` instead. */
1415
+ export const inboundSchema = ResponseBodyType$inboundSchema;
1416
+ /** @deprecated use `ResponseBodyType$outboundSchema` instead. */
1417
+ export const outboundSchema = ResponseBodyType$outboundSchema;
1418
+ }
1419
+
1420
+ /** @internal */
1421
+ export const ResponseBodyRetrievalType$inboundSchema: z.ZodNativeEnum<
1422
+ typeof ResponseBodyRetrievalType
1423
+ > = z.nativeEnum(ResponseBodyRetrievalType);
516
1424
 
517
1425
  /** @internal */
518
- export const CreateKnowledgeRetrievalType$outboundSchema: z.ZodNativeEnum<
519
- typeof CreateKnowledgeRetrievalType
520
- > = CreateKnowledgeRetrievalType$inboundSchema;
1426
+ export const ResponseBodyRetrievalType$outboundSchema: z.ZodNativeEnum<
1427
+ typeof ResponseBodyRetrievalType
1428
+ > = ResponseBodyRetrievalType$inboundSchema;
521
1429
 
522
1430
  /**
523
1431
  * @internal
524
1432
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
525
1433
  */
526
- export namespace CreateKnowledgeRetrievalType$ {
527
- /** @deprecated use `CreateKnowledgeRetrievalType$inboundSchema` instead. */
528
- export const inboundSchema = CreateKnowledgeRetrievalType$inboundSchema;
529
- /** @deprecated use `CreateKnowledgeRetrievalType$outboundSchema` instead. */
530
- export const outboundSchema = CreateKnowledgeRetrievalType$outboundSchema;
1434
+ export namespace ResponseBodyRetrievalType$ {
1435
+ /** @deprecated use `ResponseBodyRetrievalType$inboundSchema` instead. */
1436
+ export const inboundSchema = ResponseBodyRetrievalType$inboundSchema;
1437
+ /** @deprecated use `ResponseBodyRetrievalType$outboundSchema` instead. */
1438
+ export const outboundSchema = ResponseBodyRetrievalType$outboundSchema;
531
1439
  }
532
1440
 
533
1441
  /** @internal */
534
- export const CreateKnowledgeRerankConfig$inboundSchema: z.ZodType<
535
- CreateKnowledgeRerankConfig,
1442
+ export const ResponseBodyRerankConfig$inboundSchema: z.ZodType<
1443
+ ResponseBodyRerankConfig,
536
1444
  z.ZodTypeDef,
537
1445
  unknown
538
1446
  > = z.object({
@@ -548,17 +1456,17 @@ export const CreateKnowledgeRerankConfig$inboundSchema: z.ZodType<
548
1456
  });
549
1457
 
550
1458
  /** @internal */
551
- export type CreateKnowledgeRerankConfig$Outbound = {
1459
+ export type ResponseBodyRerankConfig$Outbound = {
552
1460
  top_k: number;
553
1461
  rerank_threshold: number;
554
1462
  rerank_model: string;
555
1463
  };
556
1464
 
557
1465
  /** @internal */
558
- export const CreateKnowledgeRerankConfig$outboundSchema: z.ZodType<
559
- CreateKnowledgeRerankConfig$Outbound,
1466
+ export const ResponseBodyRerankConfig$outboundSchema: z.ZodType<
1467
+ ResponseBodyRerankConfig$Outbound,
560
1468
  z.ZodTypeDef,
561
- CreateKnowledgeRerankConfig
1469
+ ResponseBodyRerankConfig
562
1470
  > = z.object({
563
1471
  topK: z.number().int().default(5),
564
1472
  rerankThreshold: z.number().default(0.5),
@@ -575,38 +1483,36 @@ export const CreateKnowledgeRerankConfig$outboundSchema: z.ZodType<
575
1483
  * @internal
576
1484
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
577
1485
  */
578
- export namespace CreateKnowledgeRerankConfig$ {
579
- /** @deprecated use `CreateKnowledgeRerankConfig$inboundSchema` instead. */
580
- export const inboundSchema = CreateKnowledgeRerankConfig$inboundSchema;
581
- /** @deprecated use `CreateKnowledgeRerankConfig$outboundSchema` instead. */
582
- export const outboundSchema = CreateKnowledgeRerankConfig$outboundSchema;
583
- /** @deprecated use `CreateKnowledgeRerankConfig$Outbound` instead. */
584
- export type Outbound = CreateKnowledgeRerankConfig$Outbound;
1486
+ export namespace ResponseBodyRerankConfig$ {
1487
+ /** @deprecated use `ResponseBodyRerankConfig$inboundSchema` instead. */
1488
+ export const inboundSchema = ResponseBodyRerankConfig$inboundSchema;
1489
+ /** @deprecated use `ResponseBodyRerankConfig$outboundSchema` instead. */
1490
+ export const outboundSchema = ResponseBodyRerankConfig$outboundSchema;
1491
+ /** @deprecated use `ResponseBodyRerankConfig$Outbound` instead. */
1492
+ export type Outbound = ResponseBodyRerankConfig$Outbound;
585
1493
  }
586
1494
 
587
- export function createKnowledgeRerankConfigToJSON(
588
- createKnowledgeRerankConfig: CreateKnowledgeRerankConfig,
1495
+ export function responseBodyRerankConfigToJSON(
1496
+ responseBodyRerankConfig: ResponseBodyRerankConfig,
589
1497
  ): string {
590
1498
  return JSON.stringify(
591
- CreateKnowledgeRerankConfig$outboundSchema.parse(
592
- createKnowledgeRerankConfig,
593
- ),
1499
+ ResponseBodyRerankConfig$outboundSchema.parse(responseBodyRerankConfig),
594
1500
  );
595
1501
  }
596
1502
 
597
- export function createKnowledgeRerankConfigFromJSON(
1503
+ export function responseBodyRerankConfigFromJSON(
598
1504
  jsonString: string,
599
- ): SafeParseResult<CreateKnowledgeRerankConfig, SDKValidationError> {
1505
+ ): SafeParseResult<ResponseBodyRerankConfig, SDKValidationError> {
600
1506
  return safeParse(
601
1507
  jsonString,
602
- (x) => CreateKnowledgeRerankConfig$inboundSchema.parse(JSON.parse(x)),
603
- `Failed to parse 'CreateKnowledgeRerankConfig' from JSON`,
1508
+ (x) => ResponseBodyRerankConfig$inboundSchema.parse(JSON.parse(x)),
1509
+ `Failed to parse 'ResponseBodyRerankConfig' from JSON`,
604
1510
  );
605
1511
  }
606
1512
 
607
1513
  /** @internal */
608
- export const CreateKnowledgeAgenticRagConfig$inboundSchema: z.ZodType<
609
- CreateKnowledgeAgenticRagConfig,
1514
+ export const ResponseBodyAgenticRagConfig$inboundSchema: z.ZodType<
1515
+ ResponseBodyAgenticRagConfig,
610
1516
  z.ZodTypeDef,
611
1517
  unknown
612
1518
  > = z.object({
@@ -614,15 +1520,15 @@ export const CreateKnowledgeAgenticRagConfig$inboundSchema: z.ZodType<
614
1520
  });
615
1521
 
616
1522
  /** @internal */
617
- export type CreateKnowledgeAgenticRagConfig$Outbound = {
1523
+ export type ResponseBodyAgenticRagConfig$Outbound = {
618
1524
  model: string;
619
1525
  };
620
1526
 
621
1527
  /** @internal */
622
- export const CreateKnowledgeAgenticRagConfig$outboundSchema: z.ZodType<
623
- CreateKnowledgeAgenticRagConfig$Outbound,
1528
+ export const ResponseBodyAgenticRagConfig$outboundSchema: z.ZodType<
1529
+ ResponseBodyAgenticRagConfig$Outbound,
624
1530
  z.ZodTypeDef,
625
- CreateKnowledgeAgenticRagConfig
1531
+ ResponseBodyAgenticRagConfig
626
1532
  > = z.object({
627
1533
  model: z.string(),
628
1534
  });
@@ -631,51 +1537,51 @@ export const CreateKnowledgeAgenticRagConfig$outboundSchema: z.ZodType<
631
1537
  * @internal
632
1538
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
633
1539
  */
634
- export namespace CreateKnowledgeAgenticRagConfig$ {
635
- /** @deprecated use `CreateKnowledgeAgenticRagConfig$inboundSchema` instead. */
636
- export const inboundSchema = CreateKnowledgeAgenticRagConfig$inboundSchema;
637
- /** @deprecated use `CreateKnowledgeAgenticRagConfig$outboundSchema` instead. */
638
- export const outboundSchema = CreateKnowledgeAgenticRagConfig$outboundSchema;
639
- /** @deprecated use `CreateKnowledgeAgenticRagConfig$Outbound` instead. */
640
- export type Outbound = CreateKnowledgeAgenticRagConfig$Outbound;
1540
+ export namespace ResponseBodyAgenticRagConfig$ {
1541
+ /** @deprecated use `ResponseBodyAgenticRagConfig$inboundSchema` instead. */
1542
+ export const inboundSchema = ResponseBodyAgenticRagConfig$inboundSchema;
1543
+ /** @deprecated use `ResponseBodyAgenticRagConfig$outboundSchema` instead. */
1544
+ export const outboundSchema = ResponseBodyAgenticRagConfig$outboundSchema;
1545
+ /** @deprecated use `ResponseBodyAgenticRagConfig$Outbound` instead. */
1546
+ export type Outbound = ResponseBodyAgenticRagConfig$Outbound;
641
1547
  }
642
1548
 
643
- export function createKnowledgeAgenticRagConfigToJSON(
644
- createKnowledgeAgenticRagConfig: CreateKnowledgeAgenticRagConfig,
1549
+ export function responseBodyAgenticRagConfigToJSON(
1550
+ responseBodyAgenticRagConfig: ResponseBodyAgenticRagConfig,
645
1551
  ): string {
646
1552
  return JSON.stringify(
647
- CreateKnowledgeAgenticRagConfig$outboundSchema.parse(
648
- createKnowledgeAgenticRagConfig,
1553
+ ResponseBodyAgenticRagConfig$outboundSchema.parse(
1554
+ responseBodyAgenticRagConfig,
649
1555
  ),
650
1556
  );
651
1557
  }
652
1558
 
653
- export function createKnowledgeAgenticRagConfigFromJSON(
1559
+ export function responseBodyAgenticRagConfigFromJSON(
654
1560
  jsonString: string,
655
- ): SafeParseResult<CreateKnowledgeAgenticRagConfig, SDKValidationError> {
1561
+ ): SafeParseResult<ResponseBodyAgenticRagConfig, SDKValidationError> {
656
1562
  return safeParse(
657
1563
  jsonString,
658
- (x) => CreateKnowledgeAgenticRagConfig$inboundSchema.parse(JSON.parse(x)),
659
- `Failed to parse 'CreateKnowledgeAgenticRagConfig' from JSON`,
1564
+ (x) => ResponseBodyAgenticRagConfig$inboundSchema.parse(JSON.parse(x)),
1565
+ `Failed to parse 'ResponseBodyAgenticRagConfig' from JSON`,
660
1566
  );
661
1567
  }
662
1568
 
663
1569
  /** @internal */
664
- export const CreateKnowledgeRetrievalSettings$inboundSchema: z.ZodType<
665
- CreateKnowledgeRetrievalSettings,
1570
+ export const ResponseBodyRetrievalSettings$inboundSchema: z.ZodType<
1571
+ ResponseBodyRetrievalSettings,
666
1572
  z.ZodTypeDef,
667
1573
  unknown
668
1574
  > = z.object({
669
- retrieval_type: CreateKnowledgeRetrievalType$inboundSchema.default(
1575
+ retrieval_type: ResponseBodyRetrievalType$inboundSchema.default(
670
1576
  "hybrid_search",
671
1577
  ),
672
1578
  top_k: z.number().int().default(5),
673
1579
  threshold: z.number().default(0),
674
1580
  rerank_config: z.nullable(
675
- z.lazy(() => CreateKnowledgeRerankConfig$inboundSchema),
1581
+ z.lazy(() => ResponseBodyRerankConfig$inboundSchema),
676
1582
  ).optional(),
677
1583
  agentic_rag_config: z.nullable(
678
- z.lazy(() => CreateKnowledgeAgenticRagConfig$inboundSchema),
1584
+ z.lazy(() => ResponseBodyAgenticRagConfig$inboundSchema),
679
1585
  ).optional(),
680
1586
  }).transform((v) => {
681
1587
  return remap$(v, {
@@ -687,33 +1593,30 @@ export const CreateKnowledgeRetrievalSettings$inboundSchema: z.ZodType<
687
1593
  });
688
1594
 
689
1595
  /** @internal */
690
- export type CreateKnowledgeRetrievalSettings$Outbound = {
1596
+ export type ResponseBodyRetrievalSettings$Outbound = {
691
1597
  retrieval_type: string;
692
1598
  top_k: number;
693
1599
  threshold: number;
694
- rerank_config?: CreateKnowledgeRerankConfig$Outbound | null | undefined;
695
- agentic_rag_config?:
696
- | CreateKnowledgeAgenticRagConfig$Outbound
697
- | null
698
- | undefined;
1600
+ rerank_config?: ResponseBodyRerankConfig$Outbound | null | undefined;
1601
+ agentic_rag_config?: ResponseBodyAgenticRagConfig$Outbound | null | undefined;
699
1602
  };
700
1603
 
701
1604
  /** @internal */
702
- export const CreateKnowledgeRetrievalSettings$outboundSchema: z.ZodType<
703
- CreateKnowledgeRetrievalSettings$Outbound,
1605
+ export const ResponseBodyRetrievalSettings$outboundSchema: z.ZodType<
1606
+ ResponseBodyRetrievalSettings$Outbound,
704
1607
  z.ZodTypeDef,
705
- CreateKnowledgeRetrievalSettings
1608
+ ResponseBodyRetrievalSettings
706
1609
  > = z.object({
707
- retrievalType: CreateKnowledgeRetrievalType$outboundSchema.default(
1610
+ retrievalType: ResponseBodyRetrievalType$outboundSchema.default(
708
1611
  "hybrid_search",
709
1612
  ),
710
1613
  topK: z.number().int().default(5),
711
1614
  threshold: z.number().default(0),
712
1615
  rerankConfig: z.nullable(
713
- z.lazy(() => CreateKnowledgeRerankConfig$outboundSchema),
1616
+ z.lazy(() => ResponseBodyRerankConfig$outboundSchema),
714
1617
  ).optional(),
715
1618
  agenticRagConfig: z.nullable(
716
- z.lazy(() => CreateKnowledgeAgenticRagConfig$outboundSchema),
1619
+ z.lazy(() => ResponseBodyAgenticRagConfig$outboundSchema),
717
1620
  ).optional(),
718
1621
  }).transform((v) => {
719
1622
  return remap$(v, {
@@ -728,38 +1631,38 @@ export const CreateKnowledgeRetrievalSettings$outboundSchema: z.ZodType<
728
1631
  * @internal
729
1632
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
730
1633
  */
731
- export namespace CreateKnowledgeRetrievalSettings$ {
732
- /** @deprecated use `CreateKnowledgeRetrievalSettings$inboundSchema` instead. */
733
- export const inboundSchema = CreateKnowledgeRetrievalSettings$inboundSchema;
734
- /** @deprecated use `CreateKnowledgeRetrievalSettings$outboundSchema` instead. */
735
- export const outboundSchema = CreateKnowledgeRetrievalSettings$outboundSchema;
736
- /** @deprecated use `CreateKnowledgeRetrievalSettings$Outbound` instead. */
737
- export type Outbound = CreateKnowledgeRetrievalSettings$Outbound;
1634
+ export namespace ResponseBodyRetrievalSettings$ {
1635
+ /** @deprecated use `ResponseBodyRetrievalSettings$inboundSchema` instead. */
1636
+ export const inboundSchema = ResponseBodyRetrievalSettings$inboundSchema;
1637
+ /** @deprecated use `ResponseBodyRetrievalSettings$outboundSchema` instead. */
1638
+ export const outboundSchema = ResponseBodyRetrievalSettings$outboundSchema;
1639
+ /** @deprecated use `ResponseBodyRetrievalSettings$Outbound` instead. */
1640
+ export type Outbound = ResponseBodyRetrievalSettings$Outbound;
738
1641
  }
739
1642
 
740
- export function createKnowledgeRetrievalSettingsToJSON(
741
- createKnowledgeRetrievalSettings: CreateKnowledgeRetrievalSettings,
1643
+ export function responseBodyRetrievalSettingsToJSON(
1644
+ responseBodyRetrievalSettings: ResponseBodyRetrievalSettings,
742
1645
  ): string {
743
1646
  return JSON.stringify(
744
- CreateKnowledgeRetrievalSettings$outboundSchema.parse(
745
- createKnowledgeRetrievalSettings,
1647
+ ResponseBodyRetrievalSettings$outboundSchema.parse(
1648
+ responseBodyRetrievalSettings,
746
1649
  ),
747
1650
  );
748
1651
  }
749
1652
 
750
- export function createKnowledgeRetrievalSettingsFromJSON(
1653
+ export function responseBodyRetrievalSettingsFromJSON(
751
1654
  jsonString: string,
752
- ): SafeParseResult<CreateKnowledgeRetrievalSettings, SDKValidationError> {
1655
+ ): SafeParseResult<ResponseBodyRetrievalSettings, SDKValidationError> {
753
1656
  return safeParse(
754
1657
  jsonString,
755
- (x) => CreateKnowledgeRetrievalSettings$inboundSchema.parse(JSON.parse(x)),
756
- `Failed to parse 'CreateKnowledgeRetrievalSettings' from JSON`,
1658
+ (x) => ResponseBodyRetrievalSettings$inboundSchema.parse(JSON.parse(x)),
1659
+ `Failed to parse 'ResponseBodyRetrievalSettings' from JSON`,
757
1660
  );
758
1661
  }
759
1662
 
760
1663
  /** @internal */
761
- export const CreateKnowledgeResponseBody$inboundSchema: z.ZodType<
762
- CreateKnowledgeResponseBody,
1664
+ export const ResponseBody1$inboundSchema: z.ZodType<
1665
+ ResponseBody1,
763
1666
  z.ZodTypeDef,
764
1667
  unknown
765
1668
  > = z.object({
@@ -767,69 +1670,122 @@ export const CreateKnowledgeResponseBody$inboundSchema: z.ZodType<
767
1670
  created: z.string(),
768
1671
  description: z.string().optional(),
769
1672
  key: z.string(),
770
- model: z.string(),
771
1673
  domain_id: z.string(),
772
1674
  path: z.string().optional(),
773
- retrieval_settings: z.lazy(() =>
774
- CreateKnowledgeRetrievalSettings$inboundSchema
775
- ).optional(),
776
1675
  created_by_id: z.nullable(z.string()).optional(),
777
1676
  updated_by_id: z.nullable(z.string()).optional(),
778
1677
  updated: z.string(),
1678
+ type: ResponseBodyType$inboundSchema.default("internal"),
1679
+ retrieval_settings: z.lazy(() => ResponseBodyRetrievalSettings$inboundSchema)
1680
+ .optional(),
1681
+ model: z.string(),
779
1682
  }).transform((v) => {
780
1683
  return remap$(v, {
781
1684
  "_id": "id",
782
1685
  "domain_id": "domainId",
783
- "retrieval_settings": "retrievalSettings",
784
1686
  "created_by_id": "createdById",
785
1687
  "updated_by_id": "updatedById",
1688
+ "retrieval_settings": "retrievalSettings",
786
1689
  });
787
1690
  });
788
1691
 
789
1692
  /** @internal */
790
- export type CreateKnowledgeResponseBody$Outbound = {
1693
+ export type ResponseBody1$Outbound = {
791
1694
  _id: string;
792
1695
  created: string;
793
1696
  description?: string | undefined;
794
1697
  key: string;
795
- model: string;
796
1698
  domain_id: string;
797
1699
  path?: string | undefined;
798
- retrieval_settings?: CreateKnowledgeRetrievalSettings$Outbound | undefined;
799
1700
  created_by_id?: string | null | undefined;
800
1701
  updated_by_id?: string | null | undefined;
801
1702
  updated: string;
1703
+ type: string;
1704
+ retrieval_settings?: ResponseBodyRetrievalSettings$Outbound | undefined;
1705
+ model: string;
802
1706
  };
803
1707
 
804
1708
  /** @internal */
805
- export const CreateKnowledgeResponseBody$outboundSchema: z.ZodType<
806
- CreateKnowledgeResponseBody$Outbound,
1709
+ export const ResponseBody1$outboundSchema: z.ZodType<
1710
+ ResponseBody1$Outbound,
807
1711
  z.ZodTypeDef,
808
- CreateKnowledgeResponseBody
1712
+ ResponseBody1
809
1713
  > = z.object({
810
1714
  id: z.string(),
811
1715
  created: z.string(),
812
1716
  description: z.string().optional(),
813
1717
  key: z.string(),
814
- model: z.string(),
815
1718
  domainId: z.string(),
816
1719
  path: z.string().optional(),
817
- retrievalSettings: z.lazy(() =>
818
- CreateKnowledgeRetrievalSettings$outboundSchema
819
- ).optional(),
820
1720
  createdById: z.nullable(z.string()).optional(),
821
1721
  updatedById: z.nullable(z.string()).optional(),
822
1722
  updated: z.string(),
1723
+ type: ResponseBodyType$outboundSchema.default("internal"),
1724
+ retrievalSettings: z.lazy(() => ResponseBodyRetrievalSettings$outboundSchema)
1725
+ .optional(),
1726
+ model: z.string(),
823
1727
  }).transform((v) => {
824
1728
  return remap$(v, {
825
1729
  id: "_id",
826
1730
  domainId: "domain_id",
827
- retrievalSettings: "retrieval_settings",
828
1731
  createdById: "created_by_id",
829
1732
  updatedById: "updated_by_id",
1733
+ retrievalSettings: "retrieval_settings",
830
1734
  });
831
1735
  });
832
1736
 
1737
+ /**
1738
+ * @internal
1739
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1740
+ */
1741
+ export namespace ResponseBody1$ {
1742
+ /** @deprecated use `ResponseBody1$inboundSchema` instead. */
1743
+ export const inboundSchema = ResponseBody1$inboundSchema;
1744
+ /** @deprecated use `ResponseBody1$outboundSchema` instead. */
1745
+ export const outboundSchema = ResponseBody1$outboundSchema;
1746
+ /** @deprecated use `ResponseBody1$Outbound` instead. */
1747
+ export type Outbound = ResponseBody1$Outbound;
1748
+ }
1749
+
1750
+ export function responseBody1ToJSON(responseBody1: ResponseBody1): string {
1751
+ return JSON.stringify(ResponseBody1$outboundSchema.parse(responseBody1));
1752
+ }
1753
+
1754
+ export function responseBody1FromJSON(
1755
+ jsonString: string,
1756
+ ): SafeParseResult<ResponseBody1, SDKValidationError> {
1757
+ return safeParse(
1758
+ jsonString,
1759
+ (x) => ResponseBody1$inboundSchema.parse(JSON.parse(x)),
1760
+ `Failed to parse 'ResponseBody1' from JSON`,
1761
+ );
1762
+ }
1763
+
1764
+ /** @internal */
1765
+ export const CreateKnowledgeResponseBody$inboundSchema: z.ZodType<
1766
+ CreateKnowledgeResponseBody,
1767
+ z.ZodTypeDef,
1768
+ unknown
1769
+ > = z.union([
1770
+ z.lazy(() => ResponseBody1$inboundSchema),
1771
+ z.lazy(() => ResponseBody2$inboundSchema),
1772
+ ]);
1773
+
1774
+ /** @internal */
1775
+ export type CreateKnowledgeResponseBody$Outbound =
1776
+ | ResponseBody1$Outbound
1777
+ | ResponseBody2$Outbound;
1778
+
1779
+ /** @internal */
1780
+ export const CreateKnowledgeResponseBody$outboundSchema: z.ZodType<
1781
+ CreateKnowledgeResponseBody$Outbound,
1782
+ z.ZodTypeDef,
1783
+ CreateKnowledgeResponseBody
1784
+ > = z.union([
1785
+ z.lazy(() => ResponseBody1$outboundSchema),
1786
+ z.lazy(() => ResponseBody2$outboundSchema),
1787
+ ]);
1788
+
833
1789
  /**
834
1790
  * @internal
835
1791
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.