@orq-ai/node 3.8.4 → 3.8.5

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 (107) hide show
  1. package/bin/mcp-server.js +103 -103
  2. package/bin/mcp-server.js.map +26 -26
  3. package/jsr.json +1 -1
  4. package/lib/config.d.ts +2 -2
  5. package/lib/config.js +2 -2
  6. package/mcp-server/mcp-server.js +1 -1
  7. package/mcp-server/server.js +1 -1
  8. package/models/operations/createcontact.js +2 -2
  9. package/models/operations/createdataset.js +2 -2
  10. package/models/operations/createdatasetitem.js +2 -2
  11. package/models/operations/createdatasource.js +2 -2
  12. package/models/operations/createeval.js +16 -16
  13. package/models/operations/fileget.js +2 -2
  14. package/models/operations/filelist.js +2 -2
  15. package/models/operations/fileupload.js +2 -2
  16. package/models/operations/getevals.js +28 -28
  17. package/models/operations/listcontacts.js +2 -2
  18. package/models/operations/listdatasetdatapoints.js +2 -2
  19. package/models/operations/listdatasets.js +2 -2
  20. package/models/operations/listdatasources.js +2 -2
  21. package/models/operations/retrievecontact.js +2 -2
  22. package/models/operations/retrievedatapoint.js +2 -2
  23. package/models/operations/retrievedataset.js +2 -2
  24. package/models/operations/retrievedatasource.js +2 -2
  25. package/models/operations/updatecontact.js +2 -2
  26. package/models/operations/updatedatapoint.js +2 -2
  27. package/models/operations/updatedataset.js +2 -2
  28. package/models/operations/updatedatasource.js +2 -2
  29. package/models/operations/updateeval.js +16 -16
  30. package/package.json +1 -1
  31. package/packages/orq-rc/README.md +95 -83
  32. package/packages/orq-rc/docs/sdks/evals/README.md +213 -0
  33. package/packages/orq-rc/docs/sdks/knowledge/README.md +87 -77
  34. package/packages/orq-rc/jsr.json +1 -1
  35. package/packages/orq-rc/package-lock.json +2 -2
  36. package/packages/orq-rc/package.json +1 -1
  37. package/packages/orq-rc/src/funcs/evalsRagasContextEntitiesRecall.ts +183 -0
  38. package/packages/orq-rc/src/funcs/evalsRagasContextRecall.ts +177 -0
  39. package/packages/orq-rc/src/funcs/evalsRagasNoiseSensitivity.ts +180 -0
  40. package/packages/orq-rc/src/funcs/{knowledgeCreate.ts → knowledgeChunkText.ts} +13 -11
  41. package/packages/orq-rc/src/lib/config.ts +3 -3
  42. package/packages/orq-rc/src/mcp-server/mcp-server.ts +1 -1
  43. package/packages/orq-rc/src/mcp-server/server.ts +9 -3
  44. package/packages/orq-rc/src/mcp-server/tools/evalsRagasContextEntitiesRecall.ts +37 -0
  45. package/packages/orq-rc/src/mcp-server/tools/{knowledgeCreate.ts → evalsRagasContextRecall.ts} +7 -6
  46. package/packages/orq-rc/src/mcp-server/tools/evalsRagasNoiseSensitivity.ts +36 -0
  47. package/packages/orq-rc/src/mcp-server/tools/knowledgeChunkText.ts +37 -0
  48. package/packages/orq-rc/src/models/errors/evalsragascontextentitiesrecall.ts +167 -0
  49. package/packages/orq-rc/src/models/errors/evalsragascontextrecall.ts +162 -0
  50. package/packages/orq-rc/src/models/errors/evalsragasnoisesensitivity.ts +164 -0
  51. package/packages/orq-rc/src/models/errors/index.ts +3 -0
  52. package/packages/orq-rc/src/models/operations/chunktext.ts +1623 -0
  53. package/packages/orq-rc/src/models/operations/createcontact.ts +2 -2
  54. package/packages/orq-rc/src/models/operations/createdataset.ts +2 -2
  55. package/packages/orq-rc/src/models/operations/createdatasetitem.ts +2 -2
  56. package/packages/orq-rc/src/models/operations/createdatasource.ts +2 -2
  57. package/packages/orq-rc/src/models/operations/createeval.ts +16 -16
  58. package/packages/orq-rc/src/models/operations/evalsragascontextentitiesrecall.ts +164 -0
  59. package/packages/orq-rc/src/models/operations/evalsragascontextrecall.ts +164 -0
  60. package/packages/orq-rc/src/models/operations/evalsragasnoisesensitivity.ts +166 -0
  61. package/packages/orq-rc/src/models/operations/fileget.ts +2 -2
  62. package/packages/orq-rc/src/models/operations/filelist.ts +2 -2
  63. package/packages/orq-rc/src/models/operations/fileupload.ts +2 -2
  64. package/packages/orq-rc/src/models/operations/getevals.ts +29 -28
  65. package/packages/orq-rc/src/models/operations/index.ts +4 -1
  66. package/packages/orq-rc/src/models/operations/listcontacts.ts +2 -2
  67. package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +2 -2
  68. package/packages/orq-rc/src/models/operations/listdatasets.ts +2 -2
  69. package/packages/orq-rc/src/models/operations/listdatasources.ts +2 -2
  70. package/packages/orq-rc/src/models/operations/retrievecontact.ts +2 -2
  71. package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +2 -2
  72. package/packages/orq-rc/src/models/operations/retrievedataset.ts +2 -2
  73. package/packages/orq-rc/src/models/operations/retrievedatasource.ts +2 -2
  74. package/packages/orq-rc/src/models/operations/updatecontact.ts +2 -2
  75. package/packages/orq-rc/src/models/operations/updatedatapoint.ts +2 -2
  76. package/packages/orq-rc/src/models/operations/updatedataset.ts +2 -2
  77. package/packages/orq-rc/src/models/operations/updatedatasource.ts +2 -2
  78. package/packages/orq-rc/src/models/operations/updateeval.ts +16 -16
  79. package/packages/orq-rc/src/models/operations/updateknowledge.ts +206 -266
  80. package/packages/orq-rc/src/sdk/evals.ts +45 -0
  81. package/packages/orq-rc/src/sdk/knowledge.ts +18 -15
  82. package/src/lib/config.ts +2 -2
  83. package/src/mcp-server/mcp-server.ts +1 -1
  84. package/src/mcp-server/server.ts +1 -1
  85. package/src/models/operations/createcontact.ts +2 -2
  86. package/src/models/operations/createdataset.ts +2 -2
  87. package/src/models/operations/createdatasetitem.ts +2 -2
  88. package/src/models/operations/createdatasource.ts +2 -2
  89. package/src/models/operations/createeval.ts +16 -16
  90. package/src/models/operations/fileget.ts +2 -2
  91. package/src/models/operations/filelist.ts +2 -2
  92. package/src/models/operations/fileupload.ts +2 -2
  93. package/src/models/operations/getevals.ts +28 -28
  94. package/src/models/operations/listcontacts.ts +2 -2
  95. package/src/models/operations/listdatasetdatapoints.ts +2 -2
  96. package/src/models/operations/listdatasets.ts +2 -2
  97. package/src/models/operations/listdatasources.ts +2 -2
  98. package/src/models/operations/retrievecontact.ts +2 -2
  99. package/src/models/operations/retrievedatapoint.ts +2 -2
  100. package/src/models/operations/retrievedataset.ts +2 -2
  101. package/src/models/operations/retrievedatasource.ts +2 -2
  102. package/src/models/operations/updatecontact.ts +2 -2
  103. package/src/models/operations/updatedatapoint.ts +2 -2
  104. package/src/models/operations/updatedataset.ts +2 -2
  105. package/src/models/operations/updatedatasource.ts +2 -2
  106. package/src/models/operations/updateeval.ts +16 -16
  107. package/packages/orq-rc/src/models/operations/createknowledge.ts +0 -846
@@ -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 RetrievalType = {
16
16
  VectorSearch: "vector_search",
17
17
  KeywordSearch: "keyword_search",
18
18
  HybridSearch: "hybrid_search",
@@ -20,14 +20,12 @@ 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
25
- >;
23
+ export type RetrievalType = ClosedEnum<typeof RetrievalType>;
26
24
 
27
25
  /**
28
26
  * The rerank configuration for the knowledge base. In case the model is provided it will be used to enhance the search precision.
29
27
  */
30
- export type UpdateKnowledgeRerankConfig = {
28
+ export type RerankConfig = {
31
29
  /**
32
30
  * The threshold value used to filter the rerank results, only documents with a relevance score greater than the threshold will be returned
33
31
  */
@@ -41,7 +39,7 @@ export type UpdateKnowledgeRerankConfig = {
41
39
  /**
42
40
  * The Agentic RAG configuration for the knowledge base. If `null` is provided, Agentic RAG will be disabled.
43
41
  */
44
- export type UpdateKnowledgeAgenticRagConfig = {
42
+ export type AgenticRagConfig = {
45
43
  /**
46
44
  * The model to use for the Agentic RAG
47
45
  */
@@ -51,11 +49,11 @@ export type UpdateKnowledgeAgenticRagConfig = {
51
49
  /**
52
50
  * The retrieval settings for the knowledge base. If not provider, Hybrid Search will be used as a default query strategy.
53
51
  */
54
- export type UpdateKnowledgeRetrievalSettings = {
52
+ export type RetrievalSettings = {
55
53
  /**
56
54
  * The retrieval type to use for the knowledge base. If not provided, Hybrid Search will be used as a default query strategy.
57
55
  */
58
- retrievalType?: UpdateKnowledgeRetrievalType | undefined;
56
+ retrievalType?: RetrievalType | undefined;
59
57
  /**
60
58
  * The number of results to return from the search.
61
59
  */
@@ -67,11 +65,11 @@ export type UpdateKnowledgeRetrievalSettings = {
67
65
  /**
68
66
  * The rerank configuration for the knowledge base. In case the model is provided it will be used to enhance the search precision.
69
67
  */
70
- rerankConfig?: UpdateKnowledgeRerankConfig | null | undefined;
68
+ rerankConfig?: RerankConfig | null | undefined;
71
69
  /**
72
70
  * The Agentic RAG configuration for the knowledge base. If `null` is provided, Agentic RAG will be disabled.
73
71
  */
74
- agenticRagConfig?: UpdateKnowledgeAgenticRagConfig | null | undefined;
72
+ agenticRagConfig?: AgenticRagConfig | null | undefined;
75
73
  };
76
74
 
77
75
  export type UpdateKnowledgeRequestBody = {
@@ -90,7 +88,7 @@ export type UpdateKnowledgeRequestBody = {
90
88
  /**
91
89
  * The retrieval settings for the knowledge base. If not provider, Hybrid Search will be used as a default query strategy.
92
90
  */
93
- retrievalSettings?: UpdateKnowledgeRetrievalSettings | undefined;
91
+ retrievalSettings?: RetrievalSettings | undefined;
94
92
  };
95
93
 
96
94
  export type UpdateKnowledgeRequest = {
@@ -104,7 +102,7 @@ export type UpdateKnowledgeRequest = {
104
102
  /**
105
103
  * The retrieval type to use for the knowledge base. If not provided, Hybrid Search will be used as a default query strategy.
106
104
  */
107
- export const UpdateKnowledgeKnowledgeRetrievalType = {
105
+ export const UpdateKnowledgeRetrievalType = {
108
106
  VectorSearch: "vector_search",
109
107
  KeywordSearch: "keyword_search",
110
108
  HybridSearch: "hybrid_search",
@@ -112,14 +110,14 @@ export const UpdateKnowledgeKnowledgeRetrievalType = {
112
110
  /**
113
111
  * The retrieval type to use for the knowledge base. If not provided, Hybrid Search will be used as a default query strategy.
114
112
  */
115
- export type UpdateKnowledgeKnowledgeRetrievalType = ClosedEnum<
116
- typeof UpdateKnowledgeKnowledgeRetrievalType
113
+ export type UpdateKnowledgeRetrievalType = ClosedEnum<
114
+ typeof UpdateKnowledgeRetrievalType
117
115
  >;
118
116
 
119
117
  /**
120
118
  * The rerank configuration for the knowledge base. In case the model is provided it will be used to enhance the search precision.
121
119
  */
122
- export type UpdateKnowledgeKnowledgeRerankConfig = {
120
+ export type UpdateKnowledgeRerankConfig = {
123
121
  /**
124
122
  * The threshold value used to filter the rerank results, only documents with a relevance score greater than the threshold will be returned
125
123
  */
@@ -133,7 +131,7 @@ export type UpdateKnowledgeKnowledgeRerankConfig = {
133
131
  /**
134
132
  * The Agentic RAG configuration for the knowledge base. If `null` is provided, Agentic RAG will be disabled.
135
133
  */
136
- export type UpdateKnowledgeKnowledgeAgenticRagConfig = {
134
+ export type UpdateKnowledgeAgenticRagConfig = {
137
135
  /**
138
136
  * The model to use for the Agentic RAG
139
137
  */
@@ -143,11 +141,11 @@ export type UpdateKnowledgeKnowledgeAgenticRagConfig = {
143
141
  /**
144
142
  * The retrieval settings for the knowledge base. If not provider, Hybrid Search will be used as a default query strategy.
145
143
  */
146
- export type UpdateKnowledgeKnowledgeRetrievalSettings = {
144
+ export type UpdateKnowledgeRetrievalSettings = {
147
145
  /**
148
146
  * The retrieval type to use for the knowledge base. If not provided, Hybrid Search will be used as a default query strategy.
149
147
  */
150
- retrievalType?: UpdateKnowledgeKnowledgeRetrievalType | undefined;
148
+ retrievalType?: UpdateKnowledgeRetrievalType | undefined;
151
149
  /**
152
150
  * The number of results to return from the search.
153
151
  */
@@ -159,14 +157,11 @@ export type UpdateKnowledgeKnowledgeRetrievalSettings = {
159
157
  /**
160
158
  * The rerank configuration for the knowledge base. In case the model is provided it will be used to enhance the search precision.
161
159
  */
162
- rerankConfig?: UpdateKnowledgeKnowledgeRerankConfig | null | undefined;
160
+ rerankConfig?: UpdateKnowledgeRerankConfig | null | undefined;
163
161
  /**
164
162
  * The Agentic RAG configuration for the knowledge base. If `null` is provided, Agentic RAG will be disabled.
165
163
  */
166
- agenticRagConfig?:
167
- | UpdateKnowledgeKnowledgeAgenticRagConfig
168
- | null
169
- | undefined;
164
+ agenticRagConfig?: UpdateKnowledgeAgenticRagConfig | null | undefined;
170
165
  };
171
166
 
172
167
  /**
@@ -204,7 +199,7 @@ export type UpdateKnowledgeResponseBody = {
204
199
  /**
205
200
  * The retrieval settings for the knowledge base. If not provider, Hybrid Search will be used as a default query strategy.
206
201
  */
207
- retrievalSettings?: UpdateKnowledgeKnowledgeRetrievalSettings | undefined;
202
+ retrievalSettings?: UpdateKnowledgeRetrievalSettings | undefined;
208
203
  createdById?: string | null | undefined;
209
204
  updatedById?: string | null | undefined;
210
205
  /**
@@ -214,29 +209,29 @@ export type UpdateKnowledgeResponseBody = {
214
209
  };
215
210
 
216
211
  /** @internal */
217
- export const UpdateKnowledgeRetrievalType$inboundSchema: z.ZodNativeEnum<
218
- typeof UpdateKnowledgeRetrievalType
219
- > = z.nativeEnum(UpdateKnowledgeRetrievalType);
212
+ export const RetrievalType$inboundSchema: z.ZodNativeEnum<
213
+ typeof RetrievalType
214
+ > = z.nativeEnum(RetrievalType);
220
215
 
221
216
  /** @internal */
222
- export const UpdateKnowledgeRetrievalType$outboundSchema: z.ZodNativeEnum<
223
- typeof UpdateKnowledgeRetrievalType
224
- > = UpdateKnowledgeRetrievalType$inboundSchema;
217
+ export const RetrievalType$outboundSchema: z.ZodNativeEnum<
218
+ typeof RetrievalType
219
+ > = RetrievalType$inboundSchema;
225
220
 
226
221
  /**
227
222
  * @internal
228
223
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
229
224
  */
230
- export namespace UpdateKnowledgeRetrievalType$ {
231
- /** @deprecated use `UpdateKnowledgeRetrievalType$inboundSchema` instead. */
232
- export const inboundSchema = UpdateKnowledgeRetrievalType$inboundSchema;
233
- /** @deprecated use `UpdateKnowledgeRetrievalType$outboundSchema` instead. */
234
- export const outboundSchema = UpdateKnowledgeRetrievalType$outboundSchema;
225
+ export namespace RetrievalType$ {
226
+ /** @deprecated use `RetrievalType$inboundSchema` instead. */
227
+ export const inboundSchema = RetrievalType$inboundSchema;
228
+ /** @deprecated use `RetrievalType$outboundSchema` instead. */
229
+ export const outboundSchema = RetrievalType$outboundSchema;
235
230
  }
236
231
 
237
232
  /** @internal */
238
- export const UpdateKnowledgeRerankConfig$inboundSchema: z.ZodType<
239
- UpdateKnowledgeRerankConfig,
233
+ export const RerankConfig$inboundSchema: z.ZodType<
234
+ RerankConfig,
240
235
  z.ZodTypeDef,
241
236
  unknown
242
237
  > = z.object({
@@ -250,16 +245,16 @@ export const UpdateKnowledgeRerankConfig$inboundSchema: z.ZodType<
250
245
  });
251
246
 
252
247
  /** @internal */
253
- export type UpdateKnowledgeRerankConfig$Outbound = {
248
+ export type RerankConfig$Outbound = {
254
249
  rerank_threshold: number;
255
250
  rerank_model: string;
256
251
  };
257
252
 
258
253
  /** @internal */
259
- export const UpdateKnowledgeRerankConfig$outboundSchema: z.ZodType<
260
- UpdateKnowledgeRerankConfig$Outbound,
254
+ export const RerankConfig$outboundSchema: z.ZodType<
255
+ RerankConfig$Outbound,
261
256
  z.ZodTypeDef,
262
- UpdateKnowledgeRerankConfig
257
+ RerankConfig
263
258
  > = z.object({
264
259
  rerankThreshold: z.number().default(0.5),
265
260
  rerankModel: z.string(),
@@ -274,38 +269,32 @@ export const UpdateKnowledgeRerankConfig$outboundSchema: z.ZodType<
274
269
  * @internal
275
270
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
276
271
  */
277
- export namespace UpdateKnowledgeRerankConfig$ {
278
- /** @deprecated use `UpdateKnowledgeRerankConfig$inboundSchema` instead. */
279
- export const inboundSchema = UpdateKnowledgeRerankConfig$inboundSchema;
280
- /** @deprecated use `UpdateKnowledgeRerankConfig$outboundSchema` instead. */
281
- export const outboundSchema = UpdateKnowledgeRerankConfig$outboundSchema;
282
- /** @deprecated use `UpdateKnowledgeRerankConfig$Outbound` instead. */
283
- export type Outbound = UpdateKnowledgeRerankConfig$Outbound;
272
+ export namespace RerankConfig$ {
273
+ /** @deprecated use `RerankConfig$inboundSchema` instead. */
274
+ export const inboundSchema = RerankConfig$inboundSchema;
275
+ /** @deprecated use `RerankConfig$outboundSchema` instead. */
276
+ export const outboundSchema = RerankConfig$outboundSchema;
277
+ /** @deprecated use `RerankConfig$Outbound` instead. */
278
+ export type Outbound = RerankConfig$Outbound;
284
279
  }
285
280
 
286
- export function updateKnowledgeRerankConfigToJSON(
287
- updateKnowledgeRerankConfig: UpdateKnowledgeRerankConfig,
288
- ): string {
289
- return JSON.stringify(
290
- UpdateKnowledgeRerankConfig$outboundSchema.parse(
291
- updateKnowledgeRerankConfig,
292
- ),
293
- );
281
+ export function rerankConfigToJSON(rerankConfig: RerankConfig): string {
282
+ return JSON.stringify(RerankConfig$outboundSchema.parse(rerankConfig));
294
283
  }
295
284
 
296
- export function updateKnowledgeRerankConfigFromJSON(
285
+ export function rerankConfigFromJSON(
297
286
  jsonString: string,
298
- ): SafeParseResult<UpdateKnowledgeRerankConfig, SDKValidationError> {
287
+ ): SafeParseResult<RerankConfig, SDKValidationError> {
299
288
  return safeParse(
300
289
  jsonString,
301
- (x) => UpdateKnowledgeRerankConfig$inboundSchema.parse(JSON.parse(x)),
302
- `Failed to parse 'UpdateKnowledgeRerankConfig' from JSON`,
290
+ (x) => RerankConfig$inboundSchema.parse(JSON.parse(x)),
291
+ `Failed to parse 'RerankConfig' from JSON`,
303
292
  );
304
293
  }
305
294
 
306
295
  /** @internal */
307
- export const UpdateKnowledgeAgenticRagConfig$inboundSchema: z.ZodType<
308
- UpdateKnowledgeAgenticRagConfig,
296
+ export const AgenticRagConfig$inboundSchema: z.ZodType<
297
+ AgenticRagConfig,
309
298
  z.ZodTypeDef,
310
299
  unknown
311
300
  > = z.object({
@@ -313,15 +302,15 @@ export const UpdateKnowledgeAgenticRagConfig$inboundSchema: z.ZodType<
313
302
  });
314
303
 
315
304
  /** @internal */
316
- export type UpdateKnowledgeAgenticRagConfig$Outbound = {
305
+ export type AgenticRagConfig$Outbound = {
317
306
  model: string;
318
307
  };
319
308
 
320
309
  /** @internal */
321
- export const UpdateKnowledgeAgenticRagConfig$outboundSchema: z.ZodType<
322
- UpdateKnowledgeAgenticRagConfig$Outbound,
310
+ export const AgenticRagConfig$outboundSchema: z.ZodType<
311
+ AgenticRagConfig$Outbound,
323
312
  z.ZodTypeDef,
324
- UpdateKnowledgeAgenticRagConfig
313
+ AgenticRagConfig
325
314
  > = z.object({
326
315
  model: z.string(),
327
316
  });
@@ -330,52 +319,46 @@ export const UpdateKnowledgeAgenticRagConfig$outboundSchema: z.ZodType<
330
319
  * @internal
331
320
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
332
321
  */
333
- export namespace UpdateKnowledgeAgenticRagConfig$ {
334
- /** @deprecated use `UpdateKnowledgeAgenticRagConfig$inboundSchema` instead. */
335
- export const inboundSchema = UpdateKnowledgeAgenticRagConfig$inboundSchema;
336
- /** @deprecated use `UpdateKnowledgeAgenticRagConfig$outboundSchema` instead. */
337
- export const outboundSchema = UpdateKnowledgeAgenticRagConfig$outboundSchema;
338
- /** @deprecated use `UpdateKnowledgeAgenticRagConfig$Outbound` instead. */
339
- export type Outbound = UpdateKnowledgeAgenticRagConfig$Outbound;
322
+ export namespace AgenticRagConfig$ {
323
+ /** @deprecated use `AgenticRagConfig$inboundSchema` instead. */
324
+ export const inboundSchema = AgenticRagConfig$inboundSchema;
325
+ /** @deprecated use `AgenticRagConfig$outboundSchema` instead. */
326
+ export const outboundSchema = AgenticRagConfig$outboundSchema;
327
+ /** @deprecated use `AgenticRagConfig$Outbound` instead. */
328
+ export type Outbound = AgenticRagConfig$Outbound;
340
329
  }
341
330
 
342
- export function updateKnowledgeAgenticRagConfigToJSON(
343
- updateKnowledgeAgenticRagConfig: UpdateKnowledgeAgenticRagConfig,
331
+ export function agenticRagConfigToJSON(
332
+ agenticRagConfig: AgenticRagConfig,
344
333
  ): string {
345
334
  return JSON.stringify(
346
- UpdateKnowledgeAgenticRagConfig$outboundSchema.parse(
347
- updateKnowledgeAgenticRagConfig,
348
- ),
335
+ AgenticRagConfig$outboundSchema.parse(agenticRagConfig),
349
336
  );
350
337
  }
351
338
 
352
- export function updateKnowledgeAgenticRagConfigFromJSON(
339
+ export function agenticRagConfigFromJSON(
353
340
  jsonString: string,
354
- ): SafeParseResult<UpdateKnowledgeAgenticRagConfig, SDKValidationError> {
341
+ ): SafeParseResult<AgenticRagConfig, SDKValidationError> {
355
342
  return safeParse(
356
343
  jsonString,
357
- (x) => UpdateKnowledgeAgenticRagConfig$inboundSchema.parse(JSON.parse(x)),
358
- `Failed to parse 'UpdateKnowledgeAgenticRagConfig' from JSON`,
344
+ (x) => AgenticRagConfig$inboundSchema.parse(JSON.parse(x)),
345
+ `Failed to parse 'AgenticRagConfig' from JSON`,
359
346
  );
360
347
  }
361
348
 
362
349
  /** @internal */
363
- export const UpdateKnowledgeRetrievalSettings$inboundSchema: z.ZodType<
364
- UpdateKnowledgeRetrievalSettings,
350
+ export const RetrievalSettings$inboundSchema: z.ZodType<
351
+ RetrievalSettings,
365
352
  z.ZodTypeDef,
366
353
  unknown
367
354
  > = z.object({
368
- retrieval_type: UpdateKnowledgeRetrievalType$inboundSchema.default(
369
- "hybrid_search",
370
- ),
355
+ retrieval_type: RetrievalType$inboundSchema.default("hybrid_search"),
371
356
  top_k: z.number().int().default(5),
372
357
  threshold: z.number().default(0),
373
- rerank_config: z.nullable(
374
- z.lazy(() => UpdateKnowledgeRerankConfig$inboundSchema),
375
- ).optional(),
376
- agentic_rag_config: z.nullable(
377
- z.lazy(() => UpdateKnowledgeAgenticRagConfig$inboundSchema),
378
- ).optional(),
358
+ rerank_config: z.nullable(z.lazy(() => RerankConfig$inboundSchema))
359
+ .optional(),
360
+ agentic_rag_config: z.nullable(z.lazy(() => AgenticRagConfig$inboundSchema))
361
+ .optional(),
379
362
  }).transform((v) => {
380
363
  return remap$(v, {
381
364
  "retrieval_type": "retrievalType",
@@ -386,34 +369,27 @@ export const UpdateKnowledgeRetrievalSettings$inboundSchema: z.ZodType<
386
369
  });
387
370
 
388
371
  /** @internal */
389
- export type UpdateKnowledgeRetrievalSettings$Outbound = {
372
+ export type RetrievalSettings$Outbound = {
390
373
  retrieval_type: string;
391
374
  top_k: number;
392
375
  threshold: number;
393
- rerank_config?: UpdateKnowledgeRerankConfig$Outbound | null | undefined;
394
- agentic_rag_config?:
395
- | UpdateKnowledgeAgenticRagConfig$Outbound
396
- | null
397
- | undefined;
376
+ rerank_config?: RerankConfig$Outbound | null | undefined;
377
+ agentic_rag_config?: AgenticRagConfig$Outbound | null | undefined;
398
378
  };
399
379
 
400
380
  /** @internal */
401
- export const UpdateKnowledgeRetrievalSettings$outboundSchema: z.ZodType<
402
- UpdateKnowledgeRetrievalSettings$Outbound,
381
+ export const RetrievalSettings$outboundSchema: z.ZodType<
382
+ RetrievalSettings$Outbound,
403
383
  z.ZodTypeDef,
404
- UpdateKnowledgeRetrievalSettings
384
+ RetrievalSettings
405
385
  > = z.object({
406
- retrievalType: UpdateKnowledgeRetrievalType$outboundSchema.default(
407
- "hybrid_search",
408
- ),
386
+ retrievalType: RetrievalType$outboundSchema.default("hybrid_search"),
409
387
  topK: z.number().int().default(5),
410
388
  threshold: z.number().default(0),
411
- rerankConfig: z.nullable(
412
- z.lazy(() => UpdateKnowledgeRerankConfig$outboundSchema),
413
- ).optional(),
414
- agenticRagConfig: z.nullable(
415
- z.lazy(() => UpdateKnowledgeAgenticRagConfig$outboundSchema),
416
- ).optional(),
389
+ rerankConfig: z.nullable(z.lazy(() => RerankConfig$outboundSchema))
390
+ .optional(),
391
+ agenticRagConfig: z.nullable(z.lazy(() => AgenticRagConfig$outboundSchema))
392
+ .optional(),
417
393
  }).transform((v) => {
418
394
  return remap$(v, {
419
395
  retrievalType: "retrieval_type",
@@ -427,32 +403,30 @@ export const UpdateKnowledgeRetrievalSettings$outboundSchema: z.ZodType<
427
403
  * @internal
428
404
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
429
405
  */
430
- export namespace UpdateKnowledgeRetrievalSettings$ {
431
- /** @deprecated use `UpdateKnowledgeRetrievalSettings$inboundSchema` instead. */
432
- export const inboundSchema = UpdateKnowledgeRetrievalSettings$inboundSchema;
433
- /** @deprecated use `UpdateKnowledgeRetrievalSettings$outboundSchema` instead. */
434
- export const outboundSchema = UpdateKnowledgeRetrievalSettings$outboundSchema;
435
- /** @deprecated use `UpdateKnowledgeRetrievalSettings$Outbound` instead. */
436
- export type Outbound = UpdateKnowledgeRetrievalSettings$Outbound;
406
+ export namespace RetrievalSettings$ {
407
+ /** @deprecated use `RetrievalSettings$inboundSchema` instead. */
408
+ export const inboundSchema = RetrievalSettings$inboundSchema;
409
+ /** @deprecated use `RetrievalSettings$outboundSchema` instead. */
410
+ export const outboundSchema = RetrievalSettings$outboundSchema;
411
+ /** @deprecated use `RetrievalSettings$Outbound` instead. */
412
+ export type Outbound = RetrievalSettings$Outbound;
437
413
  }
438
414
 
439
- export function updateKnowledgeRetrievalSettingsToJSON(
440
- updateKnowledgeRetrievalSettings: UpdateKnowledgeRetrievalSettings,
415
+ export function retrievalSettingsToJSON(
416
+ retrievalSettings: RetrievalSettings,
441
417
  ): string {
442
418
  return JSON.stringify(
443
- UpdateKnowledgeRetrievalSettings$outboundSchema.parse(
444
- updateKnowledgeRetrievalSettings,
445
- ),
419
+ RetrievalSettings$outboundSchema.parse(retrievalSettings),
446
420
  );
447
421
  }
448
422
 
449
- export function updateKnowledgeRetrievalSettingsFromJSON(
423
+ export function retrievalSettingsFromJSON(
450
424
  jsonString: string,
451
- ): SafeParseResult<UpdateKnowledgeRetrievalSettings, SDKValidationError> {
425
+ ): SafeParseResult<RetrievalSettings, SDKValidationError> {
452
426
  return safeParse(
453
427
  jsonString,
454
- (x) => UpdateKnowledgeRetrievalSettings$inboundSchema.parse(JSON.parse(x)),
455
- `Failed to parse 'UpdateKnowledgeRetrievalSettings' from JSON`,
428
+ (x) => RetrievalSettings$inboundSchema.parse(JSON.parse(x)),
429
+ `Failed to parse 'RetrievalSettings' from JSON`,
456
430
  );
457
431
  }
458
432
 
@@ -465,9 +439,7 @@ export const UpdateKnowledgeRequestBody$inboundSchema: z.ZodType<
465
439
  description: z.nullable(z.string()).optional(),
466
440
  embedding_model: z.string().optional(),
467
441
  path: z.string().optional(),
468
- retrieval_settings: z.lazy(() =>
469
- UpdateKnowledgeRetrievalSettings$inboundSchema
470
- ).optional(),
442
+ retrieval_settings: z.lazy(() => RetrievalSettings$inboundSchema).optional(),
471
443
  }).transform((v) => {
472
444
  return remap$(v, {
473
445
  "embedding_model": "embeddingModel",
@@ -480,7 +452,7 @@ export type UpdateKnowledgeRequestBody$Outbound = {
480
452
  description?: string | null | undefined;
481
453
  embedding_model?: string | undefined;
482
454
  path?: string | undefined;
483
- retrieval_settings?: UpdateKnowledgeRetrievalSettings$Outbound | undefined;
455
+ retrieval_settings?: RetrievalSettings$Outbound | undefined;
484
456
  };
485
457
 
486
458
  /** @internal */
@@ -492,9 +464,7 @@ export const UpdateKnowledgeRequestBody$outboundSchema: z.ZodType<
492
464
  description: z.nullable(z.string()).optional(),
493
465
  embeddingModel: z.string().optional(),
494
466
  path: z.string().optional(),
495
- retrievalSettings: z.lazy(() =>
496
- UpdateKnowledgeRetrievalSettings$outboundSchema
497
- ).optional(),
467
+ retrievalSettings: z.lazy(() => RetrievalSettings$outboundSchema).optional(),
498
468
  }).transform((v) => {
499
469
  return remap$(v, {
500
470
  embeddingModel: "embedding_model",
@@ -601,32 +571,29 @@ export function updateKnowledgeRequestFromJSON(
601
571
  }
602
572
 
603
573
  /** @internal */
604
- export const UpdateKnowledgeKnowledgeRetrievalType$inboundSchema:
605
- z.ZodNativeEnum<typeof UpdateKnowledgeKnowledgeRetrievalType> = z.nativeEnum(
606
- UpdateKnowledgeKnowledgeRetrievalType,
607
- );
574
+ export const UpdateKnowledgeRetrievalType$inboundSchema: z.ZodNativeEnum<
575
+ typeof UpdateKnowledgeRetrievalType
576
+ > = z.nativeEnum(UpdateKnowledgeRetrievalType);
608
577
 
609
578
  /** @internal */
610
- export const UpdateKnowledgeKnowledgeRetrievalType$outboundSchema:
611
- z.ZodNativeEnum<typeof UpdateKnowledgeKnowledgeRetrievalType> =
612
- UpdateKnowledgeKnowledgeRetrievalType$inboundSchema;
579
+ export const UpdateKnowledgeRetrievalType$outboundSchema: z.ZodNativeEnum<
580
+ typeof UpdateKnowledgeRetrievalType
581
+ > = UpdateKnowledgeRetrievalType$inboundSchema;
613
582
 
614
583
  /**
615
584
  * @internal
616
585
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
617
586
  */
618
- export namespace UpdateKnowledgeKnowledgeRetrievalType$ {
619
- /** @deprecated use `UpdateKnowledgeKnowledgeRetrievalType$inboundSchema` instead. */
620
- export const inboundSchema =
621
- UpdateKnowledgeKnowledgeRetrievalType$inboundSchema;
622
- /** @deprecated use `UpdateKnowledgeKnowledgeRetrievalType$outboundSchema` instead. */
623
- export const outboundSchema =
624
- UpdateKnowledgeKnowledgeRetrievalType$outboundSchema;
587
+ export namespace UpdateKnowledgeRetrievalType$ {
588
+ /** @deprecated use `UpdateKnowledgeRetrievalType$inboundSchema` instead. */
589
+ export const inboundSchema = UpdateKnowledgeRetrievalType$inboundSchema;
590
+ /** @deprecated use `UpdateKnowledgeRetrievalType$outboundSchema` instead. */
591
+ export const outboundSchema = UpdateKnowledgeRetrievalType$outboundSchema;
625
592
  }
626
593
 
627
594
  /** @internal */
628
- export const UpdateKnowledgeKnowledgeRerankConfig$inboundSchema: z.ZodType<
629
- UpdateKnowledgeKnowledgeRerankConfig,
595
+ export const UpdateKnowledgeRerankConfig$inboundSchema: z.ZodType<
596
+ UpdateKnowledgeRerankConfig,
630
597
  z.ZodTypeDef,
631
598
  unknown
632
599
  > = z.object({
@@ -640,16 +607,16 @@ export const UpdateKnowledgeKnowledgeRerankConfig$inboundSchema: z.ZodType<
640
607
  });
641
608
 
642
609
  /** @internal */
643
- export type UpdateKnowledgeKnowledgeRerankConfig$Outbound = {
610
+ export type UpdateKnowledgeRerankConfig$Outbound = {
644
611
  rerank_threshold: number;
645
612
  rerank_model: string;
646
613
  };
647
614
 
648
615
  /** @internal */
649
- export const UpdateKnowledgeKnowledgeRerankConfig$outboundSchema: z.ZodType<
650
- UpdateKnowledgeKnowledgeRerankConfig$Outbound,
616
+ export const UpdateKnowledgeRerankConfig$outboundSchema: z.ZodType<
617
+ UpdateKnowledgeRerankConfig$Outbound,
651
618
  z.ZodTypeDef,
652
- UpdateKnowledgeKnowledgeRerankConfig
619
+ UpdateKnowledgeRerankConfig
653
620
  > = z.object({
654
621
  rerankThreshold: z.number().default(0.5),
655
622
  rerankModel: z.string(),
@@ -664,41 +631,38 @@ export const UpdateKnowledgeKnowledgeRerankConfig$outboundSchema: z.ZodType<
664
631
  * @internal
665
632
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
666
633
  */
667
- export namespace UpdateKnowledgeKnowledgeRerankConfig$ {
668
- /** @deprecated use `UpdateKnowledgeKnowledgeRerankConfig$inboundSchema` instead. */
669
- export const inboundSchema =
670
- UpdateKnowledgeKnowledgeRerankConfig$inboundSchema;
671
- /** @deprecated use `UpdateKnowledgeKnowledgeRerankConfig$outboundSchema` instead. */
672
- export const outboundSchema =
673
- UpdateKnowledgeKnowledgeRerankConfig$outboundSchema;
674
- /** @deprecated use `UpdateKnowledgeKnowledgeRerankConfig$Outbound` instead. */
675
- export type Outbound = UpdateKnowledgeKnowledgeRerankConfig$Outbound;
634
+ export namespace UpdateKnowledgeRerankConfig$ {
635
+ /** @deprecated use `UpdateKnowledgeRerankConfig$inboundSchema` instead. */
636
+ export const inboundSchema = UpdateKnowledgeRerankConfig$inboundSchema;
637
+ /** @deprecated use `UpdateKnowledgeRerankConfig$outboundSchema` instead. */
638
+ export const outboundSchema = UpdateKnowledgeRerankConfig$outboundSchema;
639
+ /** @deprecated use `UpdateKnowledgeRerankConfig$Outbound` instead. */
640
+ export type Outbound = UpdateKnowledgeRerankConfig$Outbound;
676
641
  }
677
642
 
678
- export function updateKnowledgeKnowledgeRerankConfigToJSON(
679
- updateKnowledgeKnowledgeRerankConfig: UpdateKnowledgeKnowledgeRerankConfig,
643
+ export function updateKnowledgeRerankConfigToJSON(
644
+ updateKnowledgeRerankConfig: UpdateKnowledgeRerankConfig,
680
645
  ): string {
681
646
  return JSON.stringify(
682
- UpdateKnowledgeKnowledgeRerankConfig$outboundSchema.parse(
683
- updateKnowledgeKnowledgeRerankConfig,
647
+ UpdateKnowledgeRerankConfig$outboundSchema.parse(
648
+ updateKnowledgeRerankConfig,
684
649
  ),
685
650
  );
686
651
  }
687
652
 
688
- export function updateKnowledgeKnowledgeRerankConfigFromJSON(
653
+ export function updateKnowledgeRerankConfigFromJSON(
689
654
  jsonString: string,
690
- ): SafeParseResult<UpdateKnowledgeKnowledgeRerankConfig, SDKValidationError> {
655
+ ): SafeParseResult<UpdateKnowledgeRerankConfig, SDKValidationError> {
691
656
  return safeParse(
692
657
  jsonString,
693
- (x) =>
694
- UpdateKnowledgeKnowledgeRerankConfig$inboundSchema.parse(JSON.parse(x)),
695
- `Failed to parse 'UpdateKnowledgeKnowledgeRerankConfig' from JSON`,
658
+ (x) => UpdateKnowledgeRerankConfig$inboundSchema.parse(JSON.parse(x)),
659
+ `Failed to parse 'UpdateKnowledgeRerankConfig' from JSON`,
696
660
  );
697
661
  }
698
662
 
699
663
  /** @internal */
700
- export const UpdateKnowledgeKnowledgeAgenticRagConfig$inboundSchema: z.ZodType<
701
- UpdateKnowledgeKnowledgeAgenticRagConfig,
664
+ export const UpdateKnowledgeAgenticRagConfig$inboundSchema: z.ZodType<
665
+ UpdateKnowledgeAgenticRagConfig,
702
666
  z.ZodTypeDef,
703
667
  unknown
704
668
  > = z.object({
@@ -706,15 +670,15 @@ export const UpdateKnowledgeKnowledgeAgenticRagConfig$inboundSchema: z.ZodType<
706
670
  });
707
671
 
708
672
  /** @internal */
709
- export type UpdateKnowledgeKnowledgeAgenticRagConfig$Outbound = {
673
+ export type UpdateKnowledgeAgenticRagConfig$Outbound = {
710
674
  model: string;
711
675
  };
712
676
 
713
677
  /** @internal */
714
- export const UpdateKnowledgeKnowledgeAgenticRagConfig$outboundSchema: z.ZodType<
715
- UpdateKnowledgeKnowledgeAgenticRagConfig$Outbound,
678
+ export const UpdateKnowledgeAgenticRagConfig$outboundSchema: z.ZodType<
679
+ UpdateKnowledgeAgenticRagConfig$Outbound,
716
680
  z.ZodTypeDef,
717
- UpdateKnowledgeKnowledgeAgenticRagConfig
681
+ UpdateKnowledgeAgenticRagConfig
718
682
  > = z.object({
719
683
  model: z.string(),
720
684
  });
@@ -723,60 +687,51 @@ export const UpdateKnowledgeKnowledgeAgenticRagConfig$outboundSchema: z.ZodType<
723
687
  * @internal
724
688
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
725
689
  */
726
- export namespace UpdateKnowledgeKnowledgeAgenticRagConfig$ {
727
- /** @deprecated use `UpdateKnowledgeKnowledgeAgenticRagConfig$inboundSchema` instead. */
728
- export const inboundSchema =
729
- UpdateKnowledgeKnowledgeAgenticRagConfig$inboundSchema;
730
- /** @deprecated use `UpdateKnowledgeKnowledgeAgenticRagConfig$outboundSchema` instead. */
731
- export const outboundSchema =
732
- UpdateKnowledgeKnowledgeAgenticRagConfig$outboundSchema;
733
- /** @deprecated use `UpdateKnowledgeKnowledgeAgenticRagConfig$Outbound` instead. */
734
- export type Outbound = UpdateKnowledgeKnowledgeAgenticRagConfig$Outbound;
690
+ export namespace UpdateKnowledgeAgenticRagConfig$ {
691
+ /** @deprecated use `UpdateKnowledgeAgenticRagConfig$inboundSchema` instead. */
692
+ export const inboundSchema = UpdateKnowledgeAgenticRagConfig$inboundSchema;
693
+ /** @deprecated use `UpdateKnowledgeAgenticRagConfig$outboundSchema` instead. */
694
+ export const outboundSchema = UpdateKnowledgeAgenticRagConfig$outboundSchema;
695
+ /** @deprecated use `UpdateKnowledgeAgenticRagConfig$Outbound` instead. */
696
+ export type Outbound = UpdateKnowledgeAgenticRagConfig$Outbound;
735
697
  }
736
698
 
737
- export function updateKnowledgeKnowledgeAgenticRagConfigToJSON(
738
- updateKnowledgeKnowledgeAgenticRagConfig:
739
- UpdateKnowledgeKnowledgeAgenticRagConfig,
699
+ export function updateKnowledgeAgenticRagConfigToJSON(
700
+ updateKnowledgeAgenticRagConfig: UpdateKnowledgeAgenticRagConfig,
740
701
  ): string {
741
702
  return JSON.stringify(
742
- UpdateKnowledgeKnowledgeAgenticRagConfig$outboundSchema.parse(
743
- updateKnowledgeKnowledgeAgenticRagConfig,
703
+ UpdateKnowledgeAgenticRagConfig$outboundSchema.parse(
704
+ updateKnowledgeAgenticRagConfig,
744
705
  ),
745
706
  );
746
707
  }
747
708
 
748
- export function updateKnowledgeKnowledgeAgenticRagConfigFromJSON(
709
+ export function updateKnowledgeAgenticRagConfigFromJSON(
749
710
  jsonString: string,
750
- ): SafeParseResult<
751
- UpdateKnowledgeKnowledgeAgenticRagConfig,
752
- SDKValidationError
753
- > {
711
+ ): SafeParseResult<UpdateKnowledgeAgenticRagConfig, SDKValidationError> {
754
712
  return safeParse(
755
713
  jsonString,
756
- (x) =>
757
- UpdateKnowledgeKnowledgeAgenticRagConfig$inboundSchema.parse(
758
- JSON.parse(x),
759
- ),
760
- `Failed to parse 'UpdateKnowledgeKnowledgeAgenticRagConfig' from JSON`,
714
+ (x) => UpdateKnowledgeAgenticRagConfig$inboundSchema.parse(JSON.parse(x)),
715
+ `Failed to parse 'UpdateKnowledgeAgenticRagConfig' from JSON`,
761
716
  );
762
717
  }
763
718
 
764
719
  /** @internal */
765
- export const UpdateKnowledgeKnowledgeRetrievalSettings$inboundSchema: z.ZodType<
766
- UpdateKnowledgeKnowledgeRetrievalSettings,
720
+ export const UpdateKnowledgeRetrievalSettings$inboundSchema: z.ZodType<
721
+ UpdateKnowledgeRetrievalSettings,
767
722
  z.ZodTypeDef,
768
723
  unknown
769
724
  > = z.object({
770
- retrieval_type: UpdateKnowledgeKnowledgeRetrievalType$inboundSchema.default(
725
+ retrieval_type: UpdateKnowledgeRetrievalType$inboundSchema.default(
771
726
  "hybrid_search",
772
727
  ),
773
728
  top_k: z.number().int().default(5),
774
729
  threshold: z.number().default(0),
775
730
  rerank_config: z.nullable(
776
- z.lazy(() => UpdateKnowledgeKnowledgeRerankConfig$inboundSchema),
731
+ z.lazy(() => UpdateKnowledgeRerankConfig$inboundSchema),
777
732
  ).optional(),
778
733
  agentic_rag_config: z.nullable(
779
- z.lazy(() => UpdateKnowledgeKnowledgeAgenticRagConfig$inboundSchema),
734
+ z.lazy(() => UpdateKnowledgeAgenticRagConfig$inboundSchema),
780
735
  ).optional(),
781
736
  }).transform((v) => {
782
737
  return remap$(v, {
@@ -788,86 +743,73 @@ export const UpdateKnowledgeKnowledgeRetrievalSettings$inboundSchema: z.ZodType<
788
743
  });
789
744
 
790
745
  /** @internal */
791
- export type UpdateKnowledgeKnowledgeRetrievalSettings$Outbound = {
746
+ export type UpdateKnowledgeRetrievalSettings$Outbound = {
792
747
  retrieval_type: string;
793
748
  top_k: number;
794
749
  threshold: number;
795
- rerank_config?:
796
- | UpdateKnowledgeKnowledgeRerankConfig$Outbound
797
- | null
798
- | undefined;
750
+ rerank_config?: UpdateKnowledgeRerankConfig$Outbound | null | undefined;
799
751
  agentic_rag_config?:
800
- | UpdateKnowledgeKnowledgeAgenticRagConfig$Outbound
752
+ | UpdateKnowledgeAgenticRagConfig$Outbound
801
753
  | null
802
754
  | undefined;
803
755
  };
804
756
 
805
757
  /** @internal */
806
- export const UpdateKnowledgeKnowledgeRetrievalSettings$outboundSchema:
807
- z.ZodType<
808
- UpdateKnowledgeKnowledgeRetrievalSettings$Outbound,
809
- z.ZodTypeDef,
810
- UpdateKnowledgeKnowledgeRetrievalSettings
811
- > = z.object({
812
- retrievalType: UpdateKnowledgeKnowledgeRetrievalType$outboundSchema.default(
813
- "hybrid_search",
814
- ),
815
- topK: z.number().int().default(5),
816
- threshold: z.number().default(0),
817
- rerankConfig: z.nullable(
818
- z.lazy(() => UpdateKnowledgeKnowledgeRerankConfig$outboundSchema),
819
- ).optional(),
820
- agenticRagConfig: z.nullable(
821
- z.lazy(() => UpdateKnowledgeKnowledgeAgenticRagConfig$outboundSchema),
822
- ).optional(),
823
- }).transform((v) => {
824
- return remap$(v, {
825
- retrievalType: "retrieval_type",
826
- topK: "top_k",
827
- rerankConfig: "rerank_config",
828
- agenticRagConfig: "agentic_rag_config",
829
- });
758
+ export const UpdateKnowledgeRetrievalSettings$outboundSchema: z.ZodType<
759
+ UpdateKnowledgeRetrievalSettings$Outbound,
760
+ z.ZodTypeDef,
761
+ UpdateKnowledgeRetrievalSettings
762
+ > = z.object({
763
+ retrievalType: UpdateKnowledgeRetrievalType$outboundSchema.default(
764
+ "hybrid_search",
765
+ ),
766
+ topK: z.number().int().default(5),
767
+ threshold: z.number().default(0),
768
+ rerankConfig: z.nullable(
769
+ z.lazy(() => UpdateKnowledgeRerankConfig$outboundSchema),
770
+ ).optional(),
771
+ agenticRagConfig: z.nullable(
772
+ z.lazy(() => UpdateKnowledgeAgenticRagConfig$outboundSchema),
773
+ ).optional(),
774
+ }).transform((v) => {
775
+ return remap$(v, {
776
+ retrievalType: "retrieval_type",
777
+ topK: "top_k",
778
+ rerankConfig: "rerank_config",
779
+ agenticRagConfig: "agentic_rag_config",
830
780
  });
781
+ });
831
782
 
832
783
  /**
833
784
  * @internal
834
785
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
835
786
  */
836
- export namespace UpdateKnowledgeKnowledgeRetrievalSettings$ {
837
- /** @deprecated use `UpdateKnowledgeKnowledgeRetrievalSettings$inboundSchema` instead. */
838
- export const inboundSchema =
839
- UpdateKnowledgeKnowledgeRetrievalSettings$inboundSchema;
840
- /** @deprecated use `UpdateKnowledgeKnowledgeRetrievalSettings$outboundSchema` instead. */
841
- export const outboundSchema =
842
- UpdateKnowledgeKnowledgeRetrievalSettings$outboundSchema;
843
- /** @deprecated use `UpdateKnowledgeKnowledgeRetrievalSettings$Outbound` instead. */
844
- export type Outbound = UpdateKnowledgeKnowledgeRetrievalSettings$Outbound;
787
+ export namespace UpdateKnowledgeRetrievalSettings$ {
788
+ /** @deprecated use `UpdateKnowledgeRetrievalSettings$inboundSchema` instead. */
789
+ export const inboundSchema = UpdateKnowledgeRetrievalSettings$inboundSchema;
790
+ /** @deprecated use `UpdateKnowledgeRetrievalSettings$outboundSchema` instead. */
791
+ export const outboundSchema = UpdateKnowledgeRetrievalSettings$outboundSchema;
792
+ /** @deprecated use `UpdateKnowledgeRetrievalSettings$Outbound` instead. */
793
+ export type Outbound = UpdateKnowledgeRetrievalSettings$Outbound;
845
794
  }
846
795
 
847
- export function updateKnowledgeKnowledgeRetrievalSettingsToJSON(
848
- updateKnowledgeKnowledgeRetrievalSettings:
849
- UpdateKnowledgeKnowledgeRetrievalSettings,
796
+ export function updateKnowledgeRetrievalSettingsToJSON(
797
+ updateKnowledgeRetrievalSettings: UpdateKnowledgeRetrievalSettings,
850
798
  ): string {
851
799
  return JSON.stringify(
852
- UpdateKnowledgeKnowledgeRetrievalSettings$outboundSchema.parse(
853
- updateKnowledgeKnowledgeRetrievalSettings,
800
+ UpdateKnowledgeRetrievalSettings$outboundSchema.parse(
801
+ updateKnowledgeRetrievalSettings,
854
802
  ),
855
803
  );
856
804
  }
857
805
 
858
- export function updateKnowledgeKnowledgeRetrievalSettingsFromJSON(
806
+ export function updateKnowledgeRetrievalSettingsFromJSON(
859
807
  jsonString: string,
860
- ): SafeParseResult<
861
- UpdateKnowledgeKnowledgeRetrievalSettings,
862
- SDKValidationError
863
- > {
808
+ ): SafeParseResult<UpdateKnowledgeRetrievalSettings, SDKValidationError> {
864
809
  return safeParse(
865
810
  jsonString,
866
- (x) =>
867
- UpdateKnowledgeKnowledgeRetrievalSettings$inboundSchema.parse(
868
- JSON.parse(x),
869
- ),
870
- `Failed to parse 'UpdateKnowledgeKnowledgeRetrievalSettings' from JSON`,
811
+ (x) => UpdateKnowledgeRetrievalSettings$inboundSchema.parse(JSON.parse(x)),
812
+ `Failed to parse 'UpdateKnowledgeRetrievalSettings' from JSON`,
871
813
  );
872
814
  }
873
815
 
@@ -885,7 +827,7 @@ export const UpdateKnowledgeResponseBody$inboundSchema: z.ZodType<
885
827
  domain_id: z.string(),
886
828
  path: z.string().optional(),
887
829
  retrieval_settings: z.lazy(() =>
888
- UpdateKnowledgeKnowledgeRetrievalSettings$inboundSchema
830
+ UpdateKnowledgeRetrievalSettings$inboundSchema
889
831
  ).optional(),
890
832
  created_by_id: z.nullable(z.string()).optional(),
891
833
  updated_by_id: z.nullable(z.string()).optional(),
@@ -909,9 +851,7 @@ export type UpdateKnowledgeResponseBody$Outbound = {
909
851
  model: string;
910
852
  domain_id: string;
911
853
  path?: string | undefined;
912
- retrieval_settings?:
913
- | UpdateKnowledgeKnowledgeRetrievalSettings$Outbound
914
- | undefined;
854
+ retrieval_settings?: UpdateKnowledgeRetrievalSettings$Outbound | undefined;
915
855
  created_by_id?: string | null | undefined;
916
856
  updated_by_id?: string | null | undefined;
917
857
  updated: string;
@@ -931,7 +871,7 @@ export const UpdateKnowledgeResponseBody$outboundSchema: z.ZodType<
931
871
  domainId: z.string(),
932
872
  path: z.string().optional(),
933
873
  retrievalSettings: z.lazy(() =>
934
- UpdateKnowledgeKnowledgeRetrievalSettings$outboundSchema
874
+ UpdateKnowledgeRetrievalSettings$outboundSchema
935
875
  ).optional(),
936
876
  createdById: z.nullable(z.string()).optional(),
937
877
  updatedById: z.nullable(z.string()).optional(),