@orq-ai/node 3.9.4 → 3.9.6

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