@orq-ai/node 3.2.8 → 3.2.10

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 (247) hide show
  1. package/bin/mcp-server.js +63 -63
  2. package/bin/mcp-server.js.map +49 -49
  3. package/funcs/contactsCreate.js +1 -1
  4. package/funcs/contactsCreate.js.map +1 -1
  5. package/funcs/datasetsClear.js +1 -1
  6. package/funcs/datasetsClear.js.map +1 -1
  7. package/funcs/datasetsCreate.js +1 -1
  8. package/funcs/datasetsCreate.js.map +1 -1
  9. package/funcs/datasetsCreateDatapoint.js +1 -1
  10. package/funcs/datasetsCreateDatapoint.js.map +1 -1
  11. package/funcs/datasetsCreateDatapoints.js +1 -1
  12. package/funcs/datasetsCreateDatapoints.js.map +1 -1
  13. package/funcs/datasetsDelete.js +1 -1
  14. package/funcs/datasetsDelete.js.map +1 -1
  15. package/funcs/datasetsDeleteDatapoint.js +1 -1
  16. package/funcs/datasetsDeleteDatapoint.js.map +1 -1
  17. package/funcs/datasetsList.js +1 -1
  18. package/funcs/datasetsList.js.map +1 -1
  19. package/funcs/datasetsListDatapoints.js +1 -1
  20. package/funcs/datasetsListDatapoints.js.map +1 -1
  21. package/funcs/datasetsRetrieve.js +1 -1
  22. package/funcs/datasetsRetrieve.js.map +1 -1
  23. package/funcs/datasetsRetrieveDatapoint.js +1 -1
  24. package/funcs/datasetsRetrieveDatapoint.js.map +1 -1
  25. package/funcs/datasetsUpdate.js +1 -1
  26. package/funcs/datasetsUpdate.js.map +1 -1
  27. package/funcs/datasetsUpdateDatapoint.js +1 -1
  28. package/funcs/datasetsUpdateDatapoint.js.map +1 -1
  29. package/funcs/deploymentsGetConfig.js +1 -1
  30. package/funcs/deploymentsGetConfig.js.map +1 -1
  31. package/funcs/deploymentsInvoke.js +1 -1
  32. package/funcs/deploymentsInvoke.js.map +1 -1
  33. package/funcs/deploymentsList.js +1 -1
  34. package/funcs/deploymentsList.js.map +1 -1
  35. package/funcs/deploymentsMetricsCreate.js +1 -1
  36. package/funcs/deploymentsMetricsCreate.js.map +1 -1
  37. package/funcs/deploymentsStream.js +1 -1
  38. package/funcs/deploymentsStream.js.map +1 -1
  39. package/funcs/feedbackCreate.js +1 -1
  40. package/funcs/feedbackCreate.js.map +1 -1
  41. package/funcs/filesCreate.js +1 -1
  42. package/funcs/filesCreate.js.map +1 -1
  43. package/funcs/filesDelete.js +1 -1
  44. package/funcs/filesDelete.js.map +1 -1
  45. package/funcs/filesGet.js +1 -1
  46. package/funcs/filesGet.js.map +1 -1
  47. package/funcs/filesList.js +1 -1
  48. package/funcs/filesList.js.map +1 -1
  49. package/funcs/promptsCreate.js +1 -1
  50. package/funcs/promptsCreate.js.map +1 -1
  51. package/funcs/promptsDelete.js +1 -1
  52. package/funcs/promptsDelete.js.map +1 -1
  53. package/funcs/promptsGetVersion.js +1 -1
  54. package/funcs/promptsGetVersion.js.map +1 -1
  55. package/funcs/promptsList.js +1 -1
  56. package/funcs/promptsList.js.map +1 -1
  57. package/funcs/promptsListVersions.js +1 -1
  58. package/funcs/promptsListVersions.js.map +1 -1
  59. package/funcs/promptsRetrieve.js +1 -1
  60. package/funcs/promptsRetrieve.js.map +1 -1
  61. package/funcs/promptsUpdate.js +1 -1
  62. package/funcs/promptsUpdate.js.map +1 -1
  63. package/funcs/remoteconfigsRetrieve.js +1 -1
  64. package/funcs/remoteconfigsRetrieve.js.map +1 -1
  65. package/hooks/types.d.ts +1 -1
  66. package/hooks/types.d.ts.map +1 -1
  67. package/jsr.json +1 -1
  68. package/lib/config.d.ts +3 -3
  69. package/lib/config.js +3 -3
  70. package/lib/config.js.map +1 -1
  71. package/mcp-server/mcp-server.js +1 -1
  72. package/mcp-server/mcp-server.js.map +1 -1
  73. package/mcp-server/server.js +1 -1
  74. package/mcp-server/server.js.map +1 -1
  75. package/models/operations/bulkcreatedatapoints.js +2 -2
  76. package/models/operations/createcontact.js +2 -2
  77. package/models/operations/createdataset.js +2 -2
  78. package/models/operations/createdatasetitem.js +2 -2
  79. package/models/operations/fileget.js +2 -2
  80. package/models/operations/filelist.js +2 -2
  81. package/models/operations/fileupload.js +2 -2
  82. package/models/operations/listdatasetdatapoints.js +2 -2
  83. package/models/operations/listdatasets.js +2 -2
  84. package/models/operations/retrievedatapoint.js +2 -2
  85. package/models/operations/retrievedataset.js +2 -2
  86. package/models/operations/updatedatapoint.js +2 -2
  87. package/models/operations/updatedataset.js +2 -2
  88. package/package.json +1 -1
  89. package/packages/orq-rc/README.md +37 -1
  90. package/packages/orq-rc/docs/sdks/files/README.md +8 -2
  91. package/packages/orq-rc/docs/sdks/knowledge/README.md +1197 -0
  92. package/packages/orq-rc/jsr.json +1 -1
  93. package/packages/orq-rc/package-lock.json +2 -2
  94. package/packages/orq-rc/package.json +1 -1
  95. package/packages/orq-rc/src/funcs/contactsCreate.ts +1 -1
  96. package/packages/orq-rc/src/funcs/datasetsClear.ts +1 -1
  97. package/packages/orq-rc/src/funcs/datasetsCreate.ts +1 -1
  98. package/packages/orq-rc/src/funcs/datasetsCreateDatapoint.ts +1 -1
  99. package/packages/orq-rc/src/funcs/datasetsCreateDatapoints.ts +1 -1
  100. package/packages/orq-rc/src/funcs/datasetsDelete.ts +1 -1
  101. package/packages/orq-rc/src/funcs/datasetsDeleteDatapoint.ts +1 -1
  102. package/packages/orq-rc/src/funcs/datasetsList.ts +1 -2
  103. package/packages/orq-rc/src/funcs/datasetsListDatapoints.ts +1 -2
  104. package/packages/orq-rc/src/funcs/datasetsRetrieve.ts +1 -1
  105. package/packages/orq-rc/src/funcs/datasetsRetrieveDatapoint.ts +1 -1
  106. package/packages/orq-rc/src/funcs/datasetsUpdate.ts +1 -1
  107. package/packages/orq-rc/src/funcs/datasetsUpdateDatapoint.ts +1 -1
  108. package/packages/orq-rc/src/funcs/deploymentsGetConfig.ts +1 -1
  109. package/packages/orq-rc/src/funcs/deploymentsInvoke.ts +1 -1
  110. package/packages/orq-rc/src/funcs/deploymentsList.ts +1 -2
  111. package/packages/orq-rc/src/funcs/deploymentsMetricsCreate.ts +1 -1
  112. package/packages/orq-rc/src/funcs/deploymentsStream.ts +1 -1
  113. package/packages/orq-rc/src/funcs/feedbackCreate.ts +1 -1
  114. package/packages/orq-rc/src/funcs/filesCreate.ts +19 -22
  115. package/packages/orq-rc/src/funcs/filesDelete.ts +1 -1
  116. package/packages/orq-rc/src/funcs/filesGet.ts +1 -1
  117. package/packages/orq-rc/src/funcs/filesList.ts +1 -2
  118. package/packages/orq-rc/src/funcs/knowledgeCreate.ts +152 -0
  119. package/packages/orq-rc/src/funcs/knowledgeCreateChunks.ts +165 -0
  120. package/packages/orq-rc/src/funcs/knowledgeCreateDatasource.ts +160 -0
  121. package/packages/orq-rc/src/funcs/knowledgeDelete.ts +161 -0
  122. package/packages/orq-rc/src/funcs/knowledgeDeleteChunk.ts +168 -0
  123. package/packages/orq-rc/src/funcs/knowledgeDeleteDatasource.ts +167 -0
  124. package/packages/orq-rc/src/funcs/knowledgeList.ts +163 -0
  125. package/packages/orq-rc/src/funcs/knowledgeListChunks.ts +172 -0
  126. package/packages/orq-rc/src/funcs/knowledgeListDatasources.ts +168 -0
  127. package/packages/orq-rc/src/funcs/knowledgeRetrieve.ts +160 -0
  128. package/packages/orq-rc/src/funcs/knowledgeRetrieveDatasource.ts +163 -0
  129. package/packages/orq-rc/src/funcs/knowledgeRetrieveFileUrl.ts +176 -0
  130. package/packages/orq-rc/src/funcs/knowledgeSearch.ts +158 -0
  131. package/packages/orq-rc/src/funcs/knowledgeUpdate.ts +158 -0
  132. package/packages/orq-rc/src/funcs/knowledgeUpdateChunk.ts +168 -0
  133. package/packages/orq-rc/src/funcs/promptsCreate.ts +1 -1
  134. package/packages/orq-rc/src/funcs/promptsDelete.ts +1 -1
  135. package/packages/orq-rc/src/funcs/promptsGetVersion.ts +1 -1
  136. package/packages/orq-rc/src/funcs/promptsList.ts +1 -2
  137. package/packages/orq-rc/src/funcs/promptsListVersions.ts +1 -2
  138. package/packages/orq-rc/src/funcs/promptsRetrieve.ts +1 -1
  139. package/packages/orq-rc/src/funcs/promptsUpdate.ts +1 -1
  140. package/packages/orq-rc/src/funcs/remoteconfigsRetrieve.ts +1 -1
  141. package/packages/orq-rc/src/hooks/types.ts +1 -1
  142. package/packages/orq-rc/src/lib/config.ts +3 -3
  143. package/packages/orq-rc/src/mcp-server/mcp-server.ts +1 -1
  144. package/packages/orq-rc/src/mcp-server/server.ts +31 -1
  145. package/packages/orq-rc/src/mcp-server/tools/filesCreate.ts +1 -1
  146. package/packages/orq-rc/src/mcp-server/tools/knowledgeCreate.ts +35 -0
  147. package/packages/orq-rc/src/mcp-server/tools/knowledgeCreateChunks.ts +35 -0
  148. package/packages/orq-rc/src/mcp-server/tools/knowledgeCreateDatasource.ts +35 -0
  149. package/packages/orq-rc/src/mcp-server/tools/knowledgeDelete.ts +35 -0
  150. package/packages/orq-rc/src/mcp-server/tools/knowledgeDeleteChunk.ts +33 -0
  151. package/packages/orq-rc/src/mcp-server/tools/knowledgeDeleteDatasource.ts +35 -0
  152. package/packages/orq-rc/src/mcp-server/tools/knowledgeList.ts +37 -0
  153. package/packages/orq-rc/src/mcp-server/tools/knowledgeListChunks.ts +35 -0
  154. package/packages/orq-rc/src/mcp-server/tools/knowledgeListDatasources.ts +35 -0
  155. package/packages/orq-rc/src/mcp-server/tools/knowledgeRetrieve.ts +37 -0
  156. package/packages/orq-rc/src/mcp-server/tools/knowledgeRetrieveDatasource.ts +35 -0
  157. package/packages/orq-rc/src/mcp-server/tools/knowledgeRetrieveFileUrl.ts +35 -0
  158. package/packages/orq-rc/src/mcp-server/tools/knowledgeSearch.ts +35 -0
  159. package/packages/orq-rc/src/mcp-server/tools/knowledgeUpdate.ts +35 -0
  160. package/packages/orq-rc/src/mcp-server/tools/knowledgeUpdateChunk.ts +35 -0
  161. package/packages/orq-rc/src/models/operations/bulkcreatedatapoints.ts +2 -2
  162. package/packages/orq-rc/src/models/operations/createchunk.ts +680 -0
  163. package/packages/orq-rc/src/models/operations/createcontact.ts +2 -2
  164. package/packages/orq-rc/src/models/operations/createdataset.ts +2 -2
  165. package/packages/orq-rc/src/models/operations/createdatasetitem.ts +2 -2
  166. package/packages/orq-rc/src/models/operations/createdatasource.ts +852 -0
  167. package/packages/orq-rc/src/models/operations/createknowledge.ts +2920 -0
  168. package/packages/orq-rc/src/models/operations/createprompt.ts +6 -0
  169. package/packages/orq-rc/src/models/operations/deletechunk.ts +96 -0
  170. package/packages/orq-rc/src/models/operations/deletedatasource.ts +87 -0
  171. package/packages/orq-rc/src/models/operations/deleteknowledge.ts +78 -0
  172. package/packages/orq-rc/src/models/operations/deployments.ts +0 -39
  173. package/packages/orq-rc/src/models/operations/fileget.ts +2 -2
  174. package/packages/orq-rc/src/models/operations/filelist.ts +2 -42
  175. package/packages/orq-rc/src/models/operations/fileupload.ts +6 -6
  176. package/packages/orq-rc/src/models/operations/getallprompts.ts +3 -42
  177. package/packages/orq-rc/src/models/operations/getonefileuploadurl.ts +157 -0
  178. package/packages/orq-rc/src/models/operations/getoneknowledge.ts +1631 -0
  179. package/packages/orq-rc/src/models/operations/getoneprompt.ts +3 -0
  180. package/packages/orq-rc/src/models/operations/getpromptversion.ts +3 -0
  181. package/packages/orq-rc/src/models/operations/index.ts +15 -0
  182. package/packages/orq-rc/src/models/operations/listchunks.ts +444 -0
  183. package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +2 -46
  184. package/packages/orq-rc/src/models/operations/listdatasets.ts +2 -44
  185. package/packages/orq-rc/src/models/operations/listdatasources.ts +447 -0
  186. package/packages/orq-rc/src/models/operations/listknowledgebases.ts +1782 -0
  187. package/packages/orq-rc/src/models/operations/listpromptversions.ts +3 -42
  188. package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +2 -2
  189. package/packages/orq-rc/src/models/operations/retrievedataset.ts +2 -2
  190. package/packages/orq-rc/src/models/operations/retrievedatasource.ts +273 -0
  191. package/packages/orq-rc/src/models/operations/searchknowledge.ts +1673 -0
  192. package/packages/orq-rc/src/models/operations/updatechunk.ts +418 -0
  193. package/packages/orq-rc/src/models/operations/updatedatapoint.ts +2 -2
  194. package/packages/orq-rc/src/models/operations/updatedataset.ts +2 -2
  195. package/packages/orq-rc/src/models/operations/updateknowledge.ts +3123 -0
  196. package/packages/orq-rc/src/models/operations/updateprompt.ts +6 -0
  197. package/packages/orq-rc/src/sdk/files.ts +1 -1
  198. package/packages/orq-rc/src/sdk/knowledge.ts +246 -0
  199. package/packages/orq-rc/src/sdk/sdk.ts +6 -0
  200. package/src/funcs/contactsCreate.ts +1 -1
  201. package/src/funcs/datasetsClear.ts +1 -1
  202. package/src/funcs/datasetsCreate.ts +1 -1
  203. package/src/funcs/datasetsCreateDatapoint.ts +1 -1
  204. package/src/funcs/datasetsCreateDatapoints.ts +1 -1
  205. package/src/funcs/datasetsDelete.ts +1 -1
  206. package/src/funcs/datasetsDeleteDatapoint.ts +1 -1
  207. package/src/funcs/datasetsList.ts +1 -1
  208. package/src/funcs/datasetsListDatapoints.ts +1 -1
  209. package/src/funcs/datasetsRetrieve.ts +1 -1
  210. package/src/funcs/datasetsRetrieveDatapoint.ts +1 -1
  211. package/src/funcs/datasetsUpdate.ts +1 -1
  212. package/src/funcs/datasetsUpdateDatapoint.ts +1 -1
  213. package/src/funcs/deploymentsGetConfig.ts +1 -1
  214. package/src/funcs/deploymentsInvoke.ts +1 -1
  215. package/src/funcs/deploymentsList.ts +1 -1
  216. package/src/funcs/deploymentsMetricsCreate.ts +1 -1
  217. package/src/funcs/deploymentsStream.ts +1 -1
  218. package/src/funcs/feedbackCreate.ts +1 -1
  219. package/src/funcs/filesCreate.ts +1 -1
  220. package/src/funcs/filesDelete.ts +1 -1
  221. package/src/funcs/filesGet.ts +1 -1
  222. package/src/funcs/filesList.ts +1 -1
  223. package/src/funcs/promptsCreate.ts +1 -1
  224. package/src/funcs/promptsDelete.ts +1 -1
  225. package/src/funcs/promptsGetVersion.ts +1 -1
  226. package/src/funcs/promptsList.ts +1 -1
  227. package/src/funcs/promptsListVersions.ts +1 -1
  228. package/src/funcs/promptsRetrieve.ts +1 -1
  229. package/src/funcs/promptsUpdate.ts +1 -1
  230. package/src/funcs/remoteconfigsRetrieve.ts +1 -1
  231. package/src/hooks/types.ts +1 -1
  232. package/src/lib/config.ts +3 -3
  233. package/src/mcp-server/mcp-server.ts +1 -1
  234. package/src/mcp-server/server.ts +1 -1
  235. package/src/models/operations/bulkcreatedatapoints.ts +2 -2
  236. package/src/models/operations/createcontact.ts +2 -2
  237. package/src/models/operations/createdataset.ts +2 -2
  238. package/src/models/operations/createdatasetitem.ts +2 -2
  239. package/src/models/operations/fileget.ts +2 -2
  240. package/src/models/operations/filelist.ts +2 -2
  241. package/src/models/operations/fileupload.ts +2 -2
  242. package/src/models/operations/listdatasetdatapoints.ts +2 -2
  243. package/src/models/operations/listdatasets.ts +2 -2
  244. package/src/models/operations/retrievedatapoint.ts +2 -2
  245. package/src/models/operations/retrievedataset.ts +2 -2
  246. package/src/models/operations/updatedatapoint.ts +2 -2
  247. package/src/models/operations/updatedataset.ts +2 -2
@@ -409,6 +409,9 @@ export const GetOnePromptUseCases = {
409
409
  Sql: "SQL",
410
410
  Summarization: "Summarization",
411
411
  Tagging: "Tagging",
412
+ TranslationDocument: "Translation (document)",
413
+ TranslationSentences: "Translation (sentences)",
414
+ SentimentAnalysis: "Sentiment analysis",
412
415
  } as const;
413
416
  export type GetOnePromptUseCases = ClosedEnum<typeof GetOnePromptUseCases>;
414
417
 
@@ -412,6 +412,9 @@ export const GetPromptVersionUseCases = {
412
412
  Sql: "SQL",
413
413
  Summarization: "Summarization",
414
414
  Tagging: "Tagging",
415
+ TranslationDocument: "Translation (document)",
416
+ TranslationSentences: "Translation (sentences)",
417
+ SentimentAnalysis: "Sentiment analysis",
415
418
  } as const;
416
419
  export type GetPromptVersionUseCases = ClosedEnum<
417
420
  typeof GetPromptVersionUseCases
@@ -4,13 +4,19 @@
4
4
 
5
5
  export * from "./bulkcreatedatapoints.js";
6
6
  export * from "./cleardataset.js";
7
+ export * from "./createchunk.js";
7
8
  export * from "./createcontact.js";
8
9
  export * from "./createdataset.js";
9
10
  export * from "./createdatasetitem.js";
11
+ export * from "./createdatasource.js";
10
12
  export * from "./createfeedback.js";
13
+ export * from "./createknowledge.js";
11
14
  export * from "./createprompt.js";
15
+ export * from "./deletechunk.js";
12
16
  export * from "./deletedatapoint.js";
13
17
  export * from "./deletedataset.js";
18
+ export * from "./deletedatasource.js";
19
+ export * from "./deleteknowledge.js";
14
20
  export * from "./deleteprompt.js";
15
21
  export * from "./deploymentcreatemetric.js";
16
22
  export * from "./deploymentgetconfig.js";
@@ -22,14 +28,23 @@ export * from "./fileget.js";
22
28
  export * from "./filelist.js";
23
29
  export * from "./fileupload.js";
24
30
  export * from "./getallprompts.js";
31
+ export * from "./getonefileuploadurl.js";
32
+ export * from "./getoneknowledge.js";
25
33
  export * from "./getoneprompt.js";
26
34
  export * from "./getpromptversion.js";
35
+ export * from "./listchunks.js";
27
36
  export * from "./listdatasetdatapoints.js";
28
37
  export * from "./listdatasets.js";
38
+ export * from "./listdatasources.js";
39
+ export * from "./listknowledgebases.js";
29
40
  export * from "./listpromptversions.js";
30
41
  export * from "./remoteconfigsgetconfig.js";
31
42
  export * from "./retrievedatapoint.js";
32
43
  export * from "./retrievedataset.js";
44
+ export * from "./retrievedatasource.js";
45
+ export * from "./searchknowledge.js";
46
+ export * from "./updatechunk.js";
33
47
  export * from "./updatedatapoint.js";
34
48
  export * from "./updatedataset.js";
49
+ export * from "./updateknowledge.js";
35
50
  export * from "./updateprompt.js";
@@ -0,0 +1,444 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { ClosedEnum } from "../../types/enums.js";
9
+ import { Result as SafeParseResult } from "../../types/fp.js";
10
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
+
12
+ /**
13
+ * Filter datasources by status.
14
+ */
15
+ export type QueryParamStatus = Array<string> | string;
16
+
17
+ export type ListChunksRequest = {
18
+ /**
19
+ * The unique identifier of the knowledge base
20
+ */
21
+ knowledgeId: string;
22
+ /**
23
+ * The unique identifier of the datasource.
24
+ */
25
+ datasourceId: string;
26
+ /**
27
+ * A limit on the number of objects to be returned. Limit can range between 1 and 50, and the default is 10
28
+ */
29
+ limit?: number | undefined;
30
+ /**
31
+ * A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 20 objects, ending with `01JJ1HDHN79XAS7A01WB3HYSDB`, your subsequent call can include `after=01JJ1HDHN79XAS7A01WB3HYSDB` in order to fetch the next page of the list.
32
+ */
33
+ startingAfter?: string | undefined;
34
+ /**
35
+ * A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 20 objects, starting with `01JJ1HDHN79XAS7A01WB3HYSDB`, your subsequent call can include `before=01JJ1HDHN79XAS7A01WB3HYSDB` in order to fetch the previous page of the list.
36
+ */
37
+ endingBefore?: string | undefined;
38
+ /**
39
+ * Search query to find datasources by name.
40
+ */
41
+ q?: string | undefined;
42
+ /**
43
+ * Filter datasources by status.
44
+ */
45
+ status?: Array<string> | string | undefined;
46
+ };
47
+
48
+ export const ListChunksObject = {
49
+ List: "list",
50
+ } as const;
51
+ export type ListChunksObject = ClosedEnum<typeof ListChunksObject>;
52
+
53
+ /**
54
+ * The status of the chunk
55
+ */
56
+ export const ListChunksStatus = {
57
+ Pending: "pending",
58
+ Processing: "processing",
59
+ Completed: "completed",
60
+ Failed: "failed",
61
+ Queued: "queued",
62
+ } as const;
63
+ /**
64
+ * The status of the chunk
65
+ */
66
+ export type ListChunksStatus = ClosedEnum<typeof ListChunksStatus>;
67
+
68
+ export type ListChunksData = {
69
+ /**
70
+ * The unique identifier of the chunk
71
+ */
72
+ id: string;
73
+ /**
74
+ * The text content of the chunk
75
+ */
76
+ text: string;
77
+ /**
78
+ * Metadata of the chunk. Can include `page_number` or any other key-value pairs. Only values of type string are supported.
79
+ */
80
+ metadata?: { [k: string]: string } | undefined;
81
+ /**
82
+ * Whether the chunk is enabled
83
+ */
84
+ enabled: boolean;
85
+ /**
86
+ * The status of the chunk
87
+ */
88
+ status: ListChunksStatus;
89
+ /**
90
+ * The date and time the chunk was created
91
+ */
92
+ created: string;
93
+ /**
94
+ * The date and time the chunk was updated
95
+ */
96
+ updated: string;
97
+ /**
98
+ * The unique identifier of the user who created the chunk
99
+ */
100
+ createdById?: string | undefined;
101
+ /**
102
+ * The unique identifier of the user who updated the chunk
103
+ */
104
+ updateById?: string | undefined;
105
+ };
106
+
107
+ /**
108
+ * Chunks successfully retrieved
109
+ */
110
+ export type ListChunksResponseBody = {
111
+ object: ListChunksObject;
112
+ data: Array<ListChunksData>;
113
+ hasMore: boolean;
114
+ };
115
+
116
+ /** @internal */
117
+ export const QueryParamStatus$inboundSchema: z.ZodType<
118
+ QueryParamStatus,
119
+ z.ZodTypeDef,
120
+ unknown
121
+ > = z.union([z.array(z.string()), z.string()]);
122
+
123
+ /** @internal */
124
+ export type QueryParamStatus$Outbound = Array<string> | string;
125
+
126
+ /** @internal */
127
+ export const QueryParamStatus$outboundSchema: z.ZodType<
128
+ QueryParamStatus$Outbound,
129
+ z.ZodTypeDef,
130
+ QueryParamStatus
131
+ > = z.union([z.array(z.string()), z.string()]);
132
+
133
+ /**
134
+ * @internal
135
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
136
+ */
137
+ export namespace QueryParamStatus$ {
138
+ /** @deprecated use `QueryParamStatus$inboundSchema` instead. */
139
+ export const inboundSchema = QueryParamStatus$inboundSchema;
140
+ /** @deprecated use `QueryParamStatus$outboundSchema` instead. */
141
+ export const outboundSchema = QueryParamStatus$outboundSchema;
142
+ /** @deprecated use `QueryParamStatus$Outbound` instead. */
143
+ export type Outbound = QueryParamStatus$Outbound;
144
+ }
145
+
146
+ export function queryParamStatusToJSON(
147
+ queryParamStatus: QueryParamStatus,
148
+ ): string {
149
+ return JSON.stringify(
150
+ QueryParamStatus$outboundSchema.parse(queryParamStatus),
151
+ );
152
+ }
153
+
154
+ export function queryParamStatusFromJSON(
155
+ jsonString: string,
156
+ ): SafeParseResult<QueryParamStatus, SDKValidationError> {
157
+ return safeParse(
158
+ jsonString,
159
+ (x) => QueryParamStatus$inboundSchema.parse(JSON.parse(x)),
160
+ `Failed to parse 'QueryParamStatus' from JSON`,
161
+ );
162
+ }
163
+
164
+ /** @internal */
165
+ export const ListChunksRequest$inboundSchema: z.ZodType<
166
+ ListChunksRequest,
167
+ z.ZodTypeDef,
168
+ unknown
169
+ > = z.object({
170
+ knowledge_id: z.string(),
171
+ datasource_id: z.string(),
172
+ limit: z.number().default(10),
173
+ starting_after: z.string().optional(),
174
+ ending_before: z.string().optional(),
175
+ q: z.string().optional(),
176
+ status: z.union([z.array(z.string()), z.string()]).optional(),
177
+ }).transform((v) => {
178
+ return remap$(v, {
179
+ "knowledge_id": "knowledgeId",
180
+ "datasource_id": "datasourceId",
181
+ "starting_after": "startingAfter",
182
+ "ending_before": "endingBefore",
183
+ });
184
+ });
185
+
186
+ /** @internal */
187
+ export type ListChunksRequest$Outbound = {
188
+ knowledge_id: string;
189
+ datasource_id: string;
190
+ limit: number;
191
+ starting_after?: string | undefined;
192
+ ending_before?: string | undefined;
193
+ q?: string | undefined;
194
+ status?: Array<string> | string | undefined;
195
+ };
196
+
197
+ /** @internal */
198
+ export const ListChunksRequest$outboundSchema: z.ZodType<
199
+ ListChunksRequest$Outbound,
200
+ z.ZodTypeDef,
201
+ ListChunksRequest
202
+ > = z.object({
203
+ knowledgeId: z.string(),
204
+ datasourceId: z.string(),
205
+ limit: z.number().default(10),
206
+ startingAfter: z.string().optional(),
207
+ endingBefore: z.string().optional(),
208
+ q: z.string().optional(),
209
+ status: z.union([z.array(z.string()), z.string()]).optional(),
210
+ }).transform((v) => {
211
+ return remap$(v, {
212
+ knowledgeId: "knowledge_id",
213
+ datasourceId: "datasource_id",
214
+ startingAfter: "starting_after",
215
+ endingBefore: "ending_before",
216
+ });
217
+ });
218
+
219
+ /**
220
+ * @internal
221
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
222
+ */
223
+ export namespace ListChunksRequest$ {
224
+ /** @deprecated use `ListChunksRequest$inboundSchema` instead. */
225
+ export const inboundSchema = ListChunksRequest$inboundSchema;
226
+ /** @deprecated use `ListChunksRequest$outboundSchema` instead. */
227
+ export const outboundSchema = ListChunksRequest$outboundSchema;
228
+ /** @deprecated use `ListChunksRequest$Outbound` instead. */
229
+ export type Outbound = ListChunksRequest$Outbound;
230
+ }
231
+
232
+ export function listChunksRequestToJSON(
233
+ listChunksRequest: ListChunksRequest,
234
+ ): string {
235
+ return JSON.stringify(
236
+ ListChunksRequest$outboundSchema.parse(listChunksRequest),
237
+ );
238
+ }
239
+
240
+ export function listChunksRequestFromJSON(
241
+ jsonString: string,
242
+ ): SafeParseResult<ListChunksRequest, SDKValidationError> {
243
+ return safeParse(
244
+ jsonString,
245
+ (x) => ListChunksRequest$inboundSchema.parse(JSON.parse(x)),
246
+ `Failed to parse 'ListChunksRequest' from JSON`,
247
+ );
248
+ }
249
+
250
+ /** @internal */
251
+ export const ListChunksObject$inboundSchema: z.ZodNativeEnum<
252
+ typeof ListChunksObject
253
+ > = z.nativeEnum(ListChunksObject);
254
+
255
+ /** @internal */
256
+ export const ListChunksObject$outboundSchema: z.ZodNativeEnum<
257
+ typeof ListChunksObject
258
+ > = ListChunksObject$inboundSchema;
259
+
260
+ /**
261
+ * @internal
262
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
263
+ */
264
+ export namespace ListChunksObject$ {
265
+ /** @deprecated use `ListChunksObject$inboundSchema` instead. */
266
+ export const inboundSchema = ListChunksObject$inboundSchema;
267
+ /** @deprecated use `ListChunksObject$outboundSchema` instead. */
268
+ export const outboundSchema = ListChunksObject$outboundSchema;
269
+ }
270
+
271
+ /** @internal */
272
+ export const ListChunksStatus$inboundSchema: z.ZodNativeEnum<
273
+ typeof ListChunksStatus
274
+ > = z.nativeEnum(ListChunksStatus);
275
+
276
+ /** @internal */
277
+ export const ListChunksStatus$outboundSchema: z.ZodNativeEnum<
278
+ typeof ListChunksStatus
279
+ > = ListChunksStatus$inboundSchema;
280
+
281
+ /**
282
+ * @internal
283
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
284
+ */
285
+ export namespace ListChunksStatus$ {
286
+ /** @deprecated use `ListChunksStatus$inboundSchema` instead. */
287
+ export const inboundSchema = ListChunksStatus$inboundSchema;
288
+ /** @deprecated use `ListChunksStatus$outboundSchema` instead. */
289
+ export const outboundSchema = ListChunksStatus$outboundSchema;
290
+ }
291
+
292
+ /** @internal */
293
+ export const ListChunksData$inboundSchema: z.ZodType<
294
+ ListChunksData,
295
+ z.ZodTypeDef,
296
+ unknown
297
+ > = z.object({
298
+ _id: z.string(),
299
+ text: z.string(),
300
+ metadata: z.record(z.string()).optional(),
301
+ enabled: z.boolean(),
302
+ status: ListChunksStatus$inboundSchema,
303
+ created: z.string(),
304
+ updated: z.string(),
305
+ created_by_id: z.string().optional(),
306
+ update_by_id: z.string().optional(),
307
+ }).transform((v) => {
308
+ return remap$(v, {
309
+ "_id": "id",
310
+ "created_by_id": "createdById",
311
+ "update_by_id": "updateById",
312
+ });
313
+ });
314
+
315
+ /** @internal */
316
+ export type ListChunksData$Outbound = {
317
+ _id: string;
318
+ text: string;
319
+ metadata?: { [k: string]: string } | undefined;
320
+ enabled: boolean;
321
+ status: string;
322
+ created: string;
323
+ updated: string;
324
+ created_by_id?: string | undefined;
325
+ update_by_id?: string | undefined;
326
+ };
327
+
328
+ /** @internal */
329
+ export const ListChunksData$outboundSchema: z.ZodType<
330
+ ListChunksData$Outbound,
331
+ z.ZodTypeDef,
332
+ ListChunksData
333
+ > = z.object({
334
+ id: z.string(),
335
+ text: z.string(),
336
+ metadata: z.record(z.string()).optional(),
337
+ enabled: z.boolean(),
338
+ status: ListChunksStatus$outboundSchema,
339
+ created: z.string(),
340
+ updated: z.string(),
341
+ createdById: z.string().optional(),
342
+ updateById: z.string().optional(),
343
+ }).transform((v) => {
344
+ return remap$(v, {
345
+ id: "_id",
346
+ createdById: "created_by_id",
347
+ updateById: "update_by_id",
348
+ });
349
+ });
350
+
351
+ /**
352
+ * @internal
353
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
354
+ */
355
+ export namespace ListChunksData$ {
356
+ /** @deprecated use `ListChunksData$inboundSchema` instead. */
357
+ export const inboundSchema = ListChunksData$inboundSchema;
358
+ /** @deprecated use `ListChunksData$outboundSchema` instead. */
359
+ export const outboundSchema = ListChunksData$outboundSchema;
360
+ /** @deprecated use `ListChunksData$Outbound` instead. */
361
+ export type Outbound = ListChunksData$Outbound;
362
+ }
363
+
364
+ export function listChunksDataToJSON(listChunksData: ListChunksData): string {
365
+ return JSON.stringify(ListChunksData$outboundSchema.parse(listChunksData));
366
+ }
367
+
368
+ export function listChunksDataFromJSON(
369
+ jsonString: string,
370
+ ): SafeParseResult<ListChunksData, SDKValidationError> {
371
+ return safeParse(
372
+ jsonString,
373
+ (x) => ListChunksData$inboundSchema.parse(JSON.parse(x)),
374
+ `Failed to parse 'ListChunksData' from JSON`,
375
+ );
376
+ }
377
+
378
+ /** @internal */
379
+ export const ListChunksResponseBody$inboundSchema: z.ZodType<
380
+ ListChunksResponseBody,
381
+ z.ZodTypeDef,
382
+ unknown
383
+ > = z.object({
384
+ object: ListChunksObject$inboundSchema,
385
+ data: z.array(z.lazy(() => ListChunksData$inboundSchema)),
386
+ has_more: z.boolean(),
387
+ }).transform((v) => {
388
+ return remap$(v, {
389
+ "has_more": "hasMore",
390
+ });
391
+ });
392
+
393
+ /** @internal */
394
+ export type ListChunksResponseBody$Outbound = {
395
+ object: string;
396
+ data: Array<ListChunksData$Outbound>;
397
+ has_more: boolean;
398
+ };
399
+
400
+ /** @internal */
401
+ export const ListChunksResponseBody$outboundSchema: z.ZodType<
402
+ ListChunksResponseBody$Outbound,
403
+ z.ZodTypeDef,
404
+ ListChunksResponseBody
405
+ > = z.object({
406
+ object: ListChunksObject$outboundSchema,
407
+ data: z.array(z.lazy(() => ListChunksData$outboundSchema)),
408
+ hasMore: z.boolean(),
409
+ }).transform((v) => {
410
+ return remap$(v, {
411
+ hasMore: "has_more",
412
+ });
413
+ });
414
+
415
+ /**
416
+ * @internal
417
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
418
+ */
419
+ export namespace ListChunksResponseBody$ {
420
+ /** @deprecated use `ListChunksResponseBody$inboundSchema` instead. */
421
+ export const inboundSchema = ListChunksResponseBody$inboundSchema;
422
+ /** @deprecated use `ListChunksResponseBody$outboundSchema` instead. */
423
+ export const outboundSchema = ListChunksResponseBody$outboundSchema;
424
+ /** @deprecated use `ListChunksResponseBody$Outbound` instead. */
425
+ export type Outbound = ListChunksResponseBody$Outbound;
426
+ }
427
+
428
+ export function listChunksResponseBodyToJSON(
429
+ listChunksResponseBody: ListChunksResponseBody,
430
+ ): string {
431
+ return JSON.stringify(
432
+ ListChunksResponseBody$outboundSchema.parse(listChunksResponseBody),
433
+ );
434
+ }
435
+
436
+ export function listChunksResponseBodyFromJSON(
437
+ jsonString: string,
438
+ ): SafeParseResult<ListChunksResponseBody, SDKValidationError> {
439
+ return safeParse(
440
+ jsonString,
441
+ (x) => ListChunksResponseBody$inboundSchema.parse(JSON.parse(x)),
442
+ `Failed to parse 'ListChunksResponseBody' from JSON`,
443
+ );
444
+ }
@@ -9,26 +9,8 @@ import { ClosedEnum } from "../../types/enums.js";
9
9
  import { Result as SafeParseResult } from "../../types/fp.js";
10
10
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
11
 
12
- /**
13
- * List sorting preference.
14
- */
15
- export const ListDatasetDatapointsQueryParamSort = {
16
- Asc: "asc",
17
- Desc: "desc",
18
- } as const;
19
- /**
20
- * List sorting preference.
21
- */
22
- export type ListDatasetDatapointsQueryParamSort = ClosedEnum<
23
- typeof ListDatasetDatapointsQueryParamSort
24
- >;
25
-
26
12
  export type ListDatasetDatapointsRequest = {
27
13
  datasetId: string;
28
- /**
29
- * List sorting preference.
30
- */
31
- sort?: ListDatasetDatapointsQueryParamSort | undefined;
32
14
  /**
33
15
  * A limit on the number of objects to be returned. Limit can range between 1 and 50, and the default is 10
34
16
  */
@@ -209,29 +191,6 @@ export type ListDatasetDatapointsResponseBody = {
209
191
  hasMore: boolean;
210
192
  };
211
193
 
212
- /** @internal */
213
- export const ListDatasetDatapointsQueryParamSort$inboundSchema: z.ZodNativeEnum<
214
- typeof ListDatasetDatapointsQueryParamSort
215
- > = z.nativeEnum(ListDatasetDatapointsQueryParamSort);
216
-
217
- /** @internal */
218
- export const ListDatasetDatapointsQueryParamSort$outboundSchema:
219
- z.ZodNativeEnum<typeof ListDatasetDatapointsQueryParamSort> =
220
- ListDatasetDatapointsQueryParamSort$inboundSchema;
221
-
222
- /**
223
- * @internal
224
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
225
- */
226
- export namespace ListDatasetDatapointsQueryParamSort$ {
227
- /** @deprecated use `ListDatasetDatapointsQueryParamSort$inboundSchema` instead. */
228
- export const inboundSchema =
229
- ListDatasetDatapointsQueryParamSort$inboundSchema;
230
- /** @deprecated use `ListDatasetDatapointsQueryParamSort$outboundSchema` instead. */
231
- export const outboundSchema =
232
- ListDatasetDatapointsQueryParamSort$outboundSchema;
233
- }
234
-
235
194
  /** @internal */
236
195
  export const ListDatasetDatapointsRequest$inboundSchema: z.ZodType<
237
196
  ListDatasetDatapointsRequest,
@@ -239,7 +198,6 @@ export const ListDatasetDatapointsRequest$inboundSchema: z.ZodType<
239
198
  unknown
240
199
  > = z.object({
241
200
  dataset_id: z.string(),
242
- sort: ListDatasetDatapointsQueryParamSort$inboundSchema.default("asc"),
243
201
  limit: z.number().default(10),
244
202
  starting_after: z.string().optional(),
245
203
  ending_before: z.string().optional(),
@@ -254,7 +212,6 @@ export const ListDatasetDatapointsRequest$inboundSchema: z.ZodType<
254
212
  /** @internal */
255
213
  export type ListDatasetDatapointsRequest$Outbound = {
256
214
  dataset_id: string;
257
- sort: string;
258
215
  limit: number;
259
216
  starting_after?: string | undefined;
260
217
  ending_before?: string | undefined;
@@ -267,7 +224,6 @@ export const ListDatasetDatapointsRequest$outboundSchema: z.ZodType<
267
224
  ListDatasetDatapointsRequest
268
225
  > = z.object({
269
226
  datasetId: z.string(),
270
- sort: ListDatasetDatapointsQueryParamSort$outboundSchema.default("asc"),
271
227
  limit: z.number().default(10),
272
228
  startingAfter: z.string().optional(),
273
229
  endingBefore: z.string().optional(),
@@ -956,7 +912,7 @@ export const ListDatasetDatapointsData$inboundSchema: z.ZodType<
956
912
  created: z.string().datetime({ offset: true }).transform(v => new Date(v))
957
913
  .optional(),
958
914
  updated: z.string().datetime({ offset: true }).default(
959
- "2025-03-21T10:08:06.343Z",
915
+ "2025-03-27T22:14:48.594Z",
960
916
  ).transform(v => new Date(v)),
961
917
  }).transform((v) => {
962
918
  return remap$(v, {
@@ -999,7 +955,7 @@ export const ListDatasetDatapointsData$outboundSchema: z.ZodType<
999
955
  createdById: z.string().optional(),
1000
956
  updatedById: z.string().optional(),
1001
957
  created: z.date().transform(v => v.toISOString()).optional(),
1002
- updated: z.date().default(() => new Date("2025-03-21T10:08:06.343Z"))
958
+ updated: z.date().default(() => new Date("2025-03-27T22:14:48.594Z"))
1003
959
  .transform(v => v.toISOString()),
1004
960
  }).transform((v) => {
1005
961
  return remap$(v, {
@@ -9,25 +9,7 @@ import { ClosedEnum } from "../../types/enums.js";
9
9
  import { Result as SafeParseResult } from "../../types/fp.js";
10
10
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
11
 
12
- /**
13
- * List sorting preference.
14
- */
15
- export const ListDatasetsQueryParamSort = {
16
- Asc: "asc",
17
- Desc: "desc",
18
- } as const;
19
- /**
20
- * List sorting preference.
21
- */
22
- export type ListDatasetsQueryParamSort = ClosedEnum<
23
- typeof ListDatasetsQueryParamSort
24
- >;
25
-
26
12
  export type ListDatasetsRequest = {
27
- /**
28
- * List sorting preference.
29
- */
30
- sort?: ListDatasetsQueryParamSort | undefined;
31
13
  /**
32
14
  * A limit on the number of objects to be returned. Limit can range between 1 and 50, and the default is 10
33
15
  */
@@ -97,34 +79,12 @@ export type ListDatasetsResponseBody = {
97
79
  hasMore: boolean;
98
80
  };
99
81
 
100
- /** @internal */
101
- export const ListDatasetsQueryParamSort$inboundSchema: z.ZodNativeEnum<
102
- typeof ListDatasetsQueryParamSort
103
- > = z.nativeEnum(ListDatasetsQueryParamSort);
104
-
105
- /** @internal */
106
- export const ListDatasetsQueryParamSort$outboundSchema: z.ZodNativeEnum<
107
- typeof ListDatasetsQueryParamSort
108
- > = ListDatasetsQueryParamSort$inboundSchema;
109
-
110
- /**
111
- * @internal
112
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
113
- */
114
- export namespace ListDatasetsQueryParamSort$ {
115
- /** @deprecated use `ListDatasetsQueryParamSort$inboundSchema` instead. */
116
- export const inboundSchema = ListDatasetsQueryParamSort$inboundSchema;
117
- /** @deprecated use `ListDatasetsQueryParamSort$outboundSchema` instead. */
118
- export const outboundSchema = ListDatasetsQueryParamSort$outboundSchema;
119
- }
120
-
121
82
  /** @internal */
122
83
  export const ListDatasetsRequest$inboundSchema: z.ZodType<
123
84
  ListDatasetsRequest,
124
85
  z.ZodTypeDef,
125
86
  unknown
126
87
  > = z.object({
127
- sort: ListDatasetsQueryParamSort$inboundSchema.default("asc"),
128
88
  limit: z.number().default(10),
129
89
  starting_after: z.string().optional(),
130
90
  ending_before: z.string().optional(),
@@ -137,7 +97,6 @@ export const ListDatasetsRequest$inboundSchema: z.ZodType<
137
97
 
138
98
  /** @internal */
139
99
  export type ListDatasetsRequest$Outbound = {
140
- sort: string;
141
100
  limit: number;
142
101
  starting_after?: string | undefined;
143
102
  ending_before?: string | undefined;
@@ -149,7 +108,6 @@ export const ListDatasetsRequest$outboundSchema: z.ZodType<
149
108
  z.ZodTypeDef,
150
109
  ListDatasetsRequest
151
110
  > = z.object({
152
- sort: ListDatasetsQueryParamSort$outboundSchema.default("asc"),
153
111
  limit: z.number().default(10),
154
112
  startingAfter: z.string().optional(),
155
113
  endingBefore: z.string().optional(),
@@ -295,7 +253,7 @@ export const ListDatasetsData$inboundSchema: z.ZodType<
295
253
  created: z.string().datetime({ offset: true }).transform(v => new Date(v))
296
254
  .optional(),
297
255
  updated: z.string().datetime({ offset: true }).default(
298
- "2025-03-21T10:08:06.343Z",
256
+ "2025-03-27T22:14:48.594Z",
299
257
  ).transform(v => new Date(v)),
300
258
  }).transform((v) => {
301
259
  return remap$(v, {
@@ -335,7 +293,7 @@ export const ListDatasetsData$outboundSchema: z.ZodType<
335
293
  updatedById: z.string().optional(),
336
294
  metadata: z.lazy(() => ListDatasetsMetadata$outboundSchema),
337
295
  created: z.date().transform(v => v.toISOString()).optional(),
338
- updated: z.date().default(() => new Date("2025-03-21T10:08:06.343Z"))
296
+ updated: z.date().default(() => new Date("2025-03-27T22:14:48.594Z"))
339
297
  .transform(v => v.toISOString()),
340
298
  }).transform((v) => {
341
299
  return remap$(v, {