@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
@@ -369,6 +369,9 @@ export const UseCases = {
369
369
  Sql: "SQL",
370
370
  Summarization: "Summarization",
371
371
  Tagging: "Tagging",
372
+ TranslationDocument: "Translation (document)",
373
+ TranslationSentences: "Translation (sentences)",
374
+ SentimentAnalysis: "Sentiment analysis",
372
375
  } as const;
373
376
  export type UseCases = ClosedEnum<typeof UseCases>;
374
377
 
@@ -823,6 +826,9 @@ export const CreatePromptUseCases = {
823
826
  Sql: "SQL",
824
827
  Summarization: "Summarization",
825
828
  Tagging: "Tagging",
829
+ TranslationDocument: "Translation (document)",
830
+ TranslationSentences: "Translation (sentences)",
831
+ SentimentAnalysis: "Sentiment analysis",
826
832
  } as const;
827
833
  export type CreatePromptUseCases = ClosedEnum<typeof CreatePromptUseCases>;
828
834
 
@@ -0,0 +1,96 @@
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 { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+
11
+ export type DeleteChunkRequest = {
12
+ /**
13
+ * The unique identifier of the chunk
14
+ */
15
+ chunkId: string;
16
+ /**
17
+ * The unique identifier of the data source
18
+ */
19
+ datasourceId: string;
20
+ /**
21
+ * The unique identifier of the knowledge base
22
+ */
23
+ knowledgeId: string;
24
+ };
25
+
26
+ /** @internal */
27
+ export const DeleteChunkRequest$inboundSchema: z.ZodType<
28
+ DeleteChunkRequest,
29
+ z.ZodTypeDef,
30
+ unknown
31
+ > = z.object({
32
+ chunk_id: z.string(),
33
+ datasource_id: z.string(),
34
+ knowledge_id: z.string(),
35
+ }).transform((v) => {
36
+ return remap$(v, {
37
+ "chunk_id": "chunkId",
38
+ "datasource_id": "datasourceId",
39
+ "knowledge_id": "knowledgeId",
40
+ });
41
+ });
42
+
43
+ /** @internal */
44
+ export type DeleteChunkRequest$Outbound = {
45
+ chunk_id: string;
46
+ datasource_id: string;
47
+ knowledge_id: string;
48
+ };
49
+
50
+ /** @internal */
51
+ export const DeleteChunkRequest$outboundSchema: z.ZodType<
52
+ DeleteChunkRequest$Outbound,
53
+ z.ZodTypeDef,
54
+ DeleteChunkRequest
55
+ > = z.object({
56
+ chunkId: z.string(),
57
+ datasourceId: z.string(),
58
+ knowledgeId: z.string(),
59
+ }).transform((v) => {
60
+ return remap$(v, {
61
+ chunkId: "chunk_id",
62
+ datasourceId: "datasource_id",
63
+ knowledgeId: "knowledge_id",
64
+ });
65
+ });
66
+
67
+ /**
68
+ * @internal
69
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
70
+ */
71
+ export namespace DeleteChunkRequest$ {
72
+ /** @deprecated use `DeleteChunkRequest$inboundSchema` instead. */
73
+ export const inboundSchema = DeleteChunkRequest$inboundSchema;
74
+ /** @deprecated use `DeleteChunkRequest$outboundSchema` instead. */
75
+ export const outboundSchema = DeleteChunkRequest$outboundSchema;
76
+ /** @deprecated use `DeleteChunkRequest$Outbound` instead. */
77
+ export type Outbound = DeleteChunkRequest$Outbound;
78
+ }
79
+
80
+ export function deleteChunkRequestToJSON(
81
+ deleteChunkRequest: DeleteChunkRequest,
82
+ ): string {
83
+ return JSON.stringify(
84
+ DeleteChunkRequest$outboundSchema.parse(deleteChunkRequest),
85
+ );
86
+ }
87
+
88
+ export function deleteChunkRequestFromJSON(
89
+ jsonString: string,
90
+ ): SafeParseResult<DeleteChunkRequest, SDKValidationError> {
91
+ return safeParse(
92
+ jsonString,
93
+ (x) => DeleteChunkRequest$inboundSchema.parse(JSON.parse(x)),
94
+ `Failed to parse 'DeleteChunkRequest' from JSON`,
95
+ );
96
+ }
@@ -0,0 +1,87 @@
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 { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+
11
+ export type DeleteDatasourceRequest = {
12
+ /**
13
+ * The unique identifier of the knowledge base
14
+ */
15
+ knowledgeId: string;
16
+ /**
17
+ * The unique identifier of the datasource.
18
+ */
19
+ datasourceId: string;
20
+ };
21
+
22
+ /** @internal */
23
+ export const DeleteDatasourceRequest$inboundSchema: z.ZodType<
24
+ DeleteDatasourceRequest,
25
+ z.ZodTypeDef,
26
+ unknown
27
+ > = z.object({
28
+ knowledge_id: z.string(),
29
+ datasource_id: z.string(),
30
+ }).transform((v) => {
31
+ return remap$(v, {
32
+ "knowledge_id": "knowledgeId",
33
+ "datasource_id": "datasourceId",
34
+ });
35
+ });
36
+
37
+ /** @internal */
38
+ export type DeleteDatasourceRequest$Outbound = {
39
+ knowledge_id: string;
40
+ datasource_id: string;
41
+ };
42
+
43
+ /** @internal */
44
+ export const DeleteDatasourceRequest$outboundSchema: z.ZodType<
45
+ DeleteDatasourceRequest$Outbound,
46
+ z.ZodTypeDef,
47
+ DeleteDatasourceRequest
48
+ > = z.object({
49
+ knowledgeId: z.string(),
50
+ datasourceId: z.string(),
51
+ }).transform((v) => {
52
+ return remap$(v, {
53
+ knowledgeId: "knowledge_id",
54
+ datasourceId: "datasource_id",
55
+ });
56
+ });
57
+
58
+ /**
59
+ * @internal
60
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
61
+ */
62
+ export namespace DeleteDatasourceRequest$ {
63
+ /** @deprecated use `DeleteDatasourceRequest$inboundSchema` instead. */
64
+ export const inboundSchema = DeleteDatasourceRequest$inboundSchema;
65
+ /** @deprecated use `DeleteDatasourceRequest$outboundSchema` instead. */
66
+ export const outboundSchema = DeleteDatasourceRequest$outboundSchema;
67
+ /** @deprecated use `DeleteDatasourceRequest$Outbound` instead. */
68
+ export type Outbound = DeleteDatasourceRequest$Outbound;
69
+ }
70
+
71
+ export function deleteDatasourceRequestToJSON(
72
+ deleteDatasourceRequest: DeleteDatasourceRequest,
73
+ ): string {
74
+ return JSON.stringify(
75
+ DeleteDatasourceRequest$outboundSchema.parse(deleteDatasourceRequest),
76
+ );
77
+ }
78
+
79
+ export function deleteDatasourceRequestFromJSON(
80
+ jsonString: string,
81
+ ): SafeParseResult<DeleteDatasourceRequest, SDKValidationError> {
82
+ return safeParse(
83
+ jsonString,
84
+ (x) => DeleteDatasourceRequest$inboundSchema.parse(JSON.parse(x)),
85
+ `Failed to parse 'DeleteDatasourceRequest' from JSON`,
86
+ );
87
+ }
@@ -0,0 +1,78 @@
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 { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+
11
+ export type DeleteKnowledgeRequest = {
12
+ /**
13
+ * The unique identifier of the knowledge base
14
+ */
15
+ knowledgeId: string;
16
+ };
17
+
18
+ /** @internal */
19
+ export const DeleteKnowledgeRequest$inboundSchema: z.ZodType<
20
+ DeleteKnowledgeRequest,
21
+ z.ZodTypeDef,
22
+ unknown
23
+ > = z.object({
24
+ knowledge_id: z.string(),
25
+ }).transform((v) => {
26
+ return remap$(v, {
27
+ "knowledge_id": "knowledgeId",
28
+ });
29
+ });
30
+
31
+ /** @internal */
32
+ export type DeleteKnowledgeRequest$Outbound = {
33
+ knowledge_id: string;
34
+ };
35
+
36
+ /** @internal */
37
+ export const DeleteKnowledgeRequest$outboundSchema: z.ZodType<
38
+ DeleteKnowledgeRequest$Outbound,
39
+ z.ZodTypeDef,
40
+ DeleteKnowledgeRequest
41
+ > = z.object({
42
+ knowledgeId: z.string(),
43
+ }).transform((v) => {
44
+ return remap$(v, {
45
+ knowledgeId: "knowledge_id",
46
+ });
47
+ });
48
+
49
+ /**
50
+ * @internal
51
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
52
+ */
53
+ export namespace DeleteKnowledgeRequest$ {
54
+ /** @deprecated use `DeleteKnowledgeRequest$inboundSchema` instead. */
55
+ export const inboundSchema = DeleteKnowledgeRequest$inboundSchema;
56
+ /** @deprecated use `DeleteKnowledgeRequest$outboundSchema` instead. */
57
+ export const outboundSchema = DeleteKnowledgeRequest$outboundSchema;
58
+ /** @deprecated use `DeleteKnowledgeRequest$Outbound` instead. */
59
+ export type Outbound = DeleteKnowledgeRequest$Outbound;
60
+ }
61
+
62
+ export function deleteKnowledgeRequestToJSON(
63
+ deleteKnowledgeRequest: DeleteKnowledgeRequest,
64
+ ): string {
65
+ return JSON.stringify(
66
+ DeleteKnowledgeRequest$outboundSchema.parse(deleteKnowledgeRequest),
67
+ );
68
+ }
69
+
70
+ export function deleteKnowledgeRequestFromJSON(
71
+ jsonString: string,
72
+ ): SafeParseResult<DeleteKnowledgeRequest, SDKValidationError> {
73
+ return safeParse(
74
+ jsonString,
75
+ (x) => DeleteKnowledgeRequest$inboundSchema.parse(JSON.parse(x)),
76
+ `Failed to parse 'DeleteKnowledgeRequest' from JSON`,
77
+ );
78
+ }
@@ -9,23 +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 Sort = {
16
- Asc: "asc",
17
- Desc: "desc",
18
- } as const;
19
- /**
20
- * List sorting preference.
21
- */
22
- export type Sort = ClosedEnum<typeof Sort>;
23
-
24
12
  export type DeploymentsRequest = {
25
- /**
26
- * List sorting preference.
27
- */
28
- sort?: Sort | undefined;
29
13
  /**
30
14
  * A limit on the number of objects to be returned. Limit can range between 1 and 50, and the default is 10
31
15
  */
@@ -500,33 +484,12 @@ export type DeploymentsResponseBody = {
500
484
  hasMore: boolean;
501
485
  };
502
486
 
503
- /** @internal */
504
- export const Sort$inboundSchema: z.ZodNativeEnum<typeof Sort> = z.nativeEnum(
505
- Sort,
506
- );
507
-
508
- /** @internal */
509
- export const Sort$outboundSchema: z.ZodNativeEnum<typeof Sort> =
510
- Sort$inboundSchema;
511
-
512
- /**
513
- * @internal
514
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
515
- */
516
- export namespace Sort$ {
517
- /** @deprecated use `Sort$inboundSchema` instead. */
518
- export const inboundSchema = Sort$inboundSchema;
519
- /** @deprecated use `Sort$outboundSchema` instead. */
520
- export const outboundSchema = Sort$outboundSchema;
521
- }
522
-
523
487
  /** @internal */
524
488
  export const DeploymentsRequest$inboundSchema: z.ZodType<
525
489
  DeploymentsRequest,
526
490
  z.ZodTypeDef,
527
491
  unknown
528
492
  > = z.object({
529
- sort: Sort$inboundSchema.default("asc"),
530
493
  limit: z.number().default(10),
531
494
  starting_after: z.string().optional(),
532
495
  ending_before: z.string().optional(),
@@ -539,7 +502,6 @@ export const DeploymentsRequest$inboundSchema: z.ZodType<
539
502
 
540
503
  /** @internal */
541
504
  export type DeploymentsRequest$Outbound = {
542
- sort: string;
543
505
  limit: number;
544
506
  starting_after?: string | undefined;
545
507
  ending_before?: string | undefined;
@@ -551,7 +513,6 @@ export const DeploymentsRequest$outboundSchema: z.ZodType<
551
513
  z.ZodTypeDef,
552
514
  DeploymentsRequest
553
515
  > = z.object({
554
- sort: Sort$outboundSchema.default("asc"),
555
516
  limit: z.number().default(10),
556
517
  startingAfter: z.string().optional(),
557
518
  endingBefore: z.string().optional(),
@@ -146,7 +146,7 @@ export const FileGetResponseBody$inboundSchema: z.ZodType<
146
146
  file_name: z.string(),
147
147
  workspace_id: z.string(),
148
148
  created: z.string().datetime({ offset: true }).default(
149
- "2025-03-21T10:08:07.574Z",
149
+ "2025-03-27T22:14:50.109Z",
150
150
  ).transform(v => new Date(v)),
151
151
  }).transform((v) => {
152
152
  return remap$(v, {
@@ -180,7 +180,7 @@ export const FileGetResponseBody$outboundSchema: z.ZodType<
180
180
  bytes: z.number(),
181
181
  fileName: z.string(),
182
182
  workspaceId: z.string(),
183
- created: z.date().default(() => new Date("2025-03-21T10:08:07.574Z"))
183
+ created: z.date().default(() => new Date("2025-03-27T22:14:50.109Z"))
184
184
  .transform(v => v.toISOString()),
185
185
  }).transform((v) => {
186
186
  return remap$(v, {
@@ -9,23 +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 QueryParamSort = {
16
- Asc: "asc",
17
- Desc: "desc",
18
- } as const;
19
- /**
20
- * List sorting preference.
21
- */
22
- export type QueryParamSort = ClosedEnum<typeof QueryParamSort>;
23
-
24
12
  export type FileListRequest = {
25
- /**
26
- * List sorting preference.
27
- */
28
- sort?: QueryParamSort | undefined;
29
13
  /**
30
14
  * A limit on the number of objects to be returned. Limit can range between 1 and 50, and the default is 10
31
15
  */
@@ -89,34 +73,12 @@ export type FileListResponseBody = {
89
73
  hasMore: boolean;
90
74
  };
91
75
 
92
- /** @internal */
93
- export const QueryParamSort$inboundSchema: z.ZodNativeEnum<
94
- typeof QueryParamSort
95
- > = z.nativeEnum(QueryParamSort);
96
-
97
- /** @internal */
98
- export const QueryParamSort$outboundSchema: z.ZodNativeEnum<
99
- typeof QueryParamSort
100
- > = QueryParamSort$inboundSchema;
101
-
102
- /**
103
- * @internal
104
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
105
- */
106
- export namespace QueryParamSort$ {
107
- /** @deprecated use `QueryParamSort$inboundSchema` instead. */
108
- export const inboundSchema = QueryParamSort$inboundSchema;
109
- /** @deprecated use `QueryParamSort$outboundSchema` instead. */
110
- export const outboundSchema = QueryParamSort$outboundSchema;
111
- }
112
-
113
76
  /** @internal */
114
77
  export const FileListRequest$inboundSchema: z.ZodType<
115
78
  FileListRequest,
116
79
  z.ZodTypeDef,
117
80
  unknown
118
81
  > = z.object({
119
- sort: QueryParamSort$inboundSchema.default("asc"),
120
82
  limit: z.number().default(10),
121
83
  starting_after: z.string().optional(),
122
84
  ending_before: z.string().optional(),
@@ -129,7 +91,6 @@ export const FileListRequest$inboundSchema: z.ZodType<
129
91
 
130
92
  /** @internal */
131
93
  export type FileListRequest$Outbound = {
132
- sort: string;
133
94
  limit: number;
134
95
  starting_after?: string | undefined;
135
96
  ending_before?: string | undefined;
@@ -141,7 +102,6 @@ export const FileListRequest$outboundSchema: z.ZodType<
141
102
  z.ZodTypeDef,
142
103
  FileListRequest
143
104
  > = z.object({
144
- sort: QueryParamSort$outboundSchema.default("asc"),
145
105
  limit: z.number().default(10),
146
106
  startingAfter: z.string().optional(),
147
107
  endingBefore: z.string().optional(),
@@ -236,7 +196,7 @@ export const FileListData$inboundSchema: z.ZodType<
236
196
  file_name: z.string(),
237
197
  workspace_id: z.string(),
238
198
  created: z.string().datetime({ offset: true }).default(
239
- "2025-03-21T10:08:07.574Z",
199
+ "2025-03-27T22:14:50.109Z",
240
200
  ).transform(v => new Date(v)),
241
201
  }).transform((v) => {
242
202
  return remap$(v, {
@@ -270,7 +230,7 @@ export const FileListData$outboundSchema: z.ZodType<
270
230
  bytes: z.number(),
271
231
  fileName: z.string(),
272
232
  workspaceId: z.string(),
273
- created: z.date().default(() => new Date("2025-03-21T10:08:07.574Z"))
233
+ created: z.date().default(() => new Date("2025-03-27T22:14:50.109Z"))
274
234
  .transform(v => v.toISOString()),
275
235
  }).transform((v) => {
276
236
  return remap$(v, {
@@ -32,7 +32,7 @@ export type FileUploadRequestBody = {
32
32
  /**
33
33
  * The file to be uploaded.
34
34
  */
35
- file?: FileT | Blob | undefined;
35
+ file: FileT | Blob;
36
36
  /**
37
37
  * The intended purpose of the uploaded file.
38
38
  */
@@ -162,13 +162,13 @@ export const FileUploadRequestBody$inboundSchema: z.ZodType<
162
162
  z.ZodTypeDef,
163
163
  unknown
164
164
  > = z.object({
165
- file: z.lazy(() => FileT$inboundSchema).optional(),
165
+ file: z.lazy(() => FileT$inboundSchema),
166
166
  purpose: Purpose$inboundSchema.default("retrieval"),
167
167
  });
168
168
 
169
169
  /** @internal */
170
170
  export type FileUploadRequestBody$Outbound = {
171
- file?: FileT$Outbound | Blob | undefined;
171
+ file: FileT$Outbound | Blob;
172
172
  purpose: string;
173
173
  };
174
174
 
@@ -178,7 +178,7 @@ export const FileUploadRequestBody$outboundSchema: z.ZodType<
178
178
  z.ZodTypeDef,
179
179
  FileUploadRequestBody
180
180
  > = z.object({
181
- file: z.lazy(() => FileT$outboundSchema).or(blobLikeSchema).optional(),
181
+ file: z.lazy(() => FileT$outboundSchema).or(blobLikeSchema),
182
182
  purpose: Purpose$outboundSchema.default("retrieval"),
183
183
  });
184
184
 
@@ -247,7 +247,7 @@ export const FileUploadResponseBody$inboundSchema: z.ZodType<
247
247
  file_name: z.string(),
248
248
  workspace_id: z.string(),
249
249
  created: z.string().datetime({ offset: true }).default(
250
- "2025-03-21T10:08:07.574Z",
250
+ "2025-03-27T22:14:50.109Z",
251
251
  ).transform(v => new Date(v)),
252
252
  }).transform((v) => {
253
253
  return remap$(v, {
@@ -281,7 +281,7 @@ export const FileUploadResponseBody$outboundSchema: z.ZodType<
281
281
  bytes: z.number(),
282
282
  fileName: z.string(),
283
283
  workspaceId: z.string(),
284
- created: z.date().default(() => new Date("2025-03-21T10:08:07.574Z"))
284
+ created: z.date().default(() => new Date("2025-03-27T22:14:50.109Z"))
285
285
  .transform(v => v.toISOString()),
286
286
  }).transform((v) => {
287
287
  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 GetAllPromptsQueryParamSort = {
16
- Asc: "asc",
17
- Desc: "desc",
18
- } as const;
19
- /**
20
- * List sorting preference.
21
- */
22
- export type GetAllPromptsQueryParamSort = ClosedEnum<
23
- typeof GetAllPromptsQueryParamSort
24
- >;
25
-
26
12
  export type GetAllPromptsRequest = {
27
- /**
28
- * List sorting preference.
29
- */
30
- sort?: GetAllPromptsQueryParamSort | 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
  */
@@ -440,6 +422,9 @@ export const GetAllPromptsUseCases = {
440
422
  Sql: "SQL",
441
423
  Summarization: "Summarization",
442
424
  Tagging: "Tagging",
425
+ TranslationDocument: "Translation (document)",
426
+ TranslationSentences: "Translation (sentences)",
427
+ SentimentAnalysis: "Sentiment analysis",
443
428
  } as const;
444
429
  export type GetAllPromptsUseCases = ClosedEnum<typeof GetAllPromptsUseCases>;
445
430
 
@@ -504,34 +489,12 @@ export type GetAllPromptsResponseBody = {
504
489
  hasMore: boolean;
505
490
  };
506
491
 
507
- /** @internal */
508
- export const GetAllPromptsQueryParamSort$inboundSchema: z.ZodNativeEnum<
509
- typeof GetAllPromptsQueryParamSort
510
- > = z.nativeEnum(GetAllPromptsQueryParamSort);
511
-
512
- /** @internal */
513
- export const GetAllPromptsQueryParamSort$outboundSchema: z.ZodNativeEnum<
514
- typeof GetAllPromptsQueryParamSort
515
- > = GetAllPromptsQueryParamSort$inboundSchema;
516
-
517
- /**
518
- * @internal
519
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
520
- */
521
- export namespace GetAllPromptsQueryParamSort$ {
522
- /** @deprecated use `GetAllPromptsQueryParamSort$inboundSchema` instead. */
523
- export const inboundSchema = GetAllPromptsQueryParamSort$inboundSchema;
524
- /** @deprecated use `GetAllPromptsQueryParamSort$outboundSchema` instead. */
525
- export const outboundSchema = GetAllPromptsQueryParamSort$outboundSchema;
526
- }
527
-
528
492
  /** @internal */
529
493
  export const GetAllPromptsRequest$inboundSchema: z.ZodType<
530
494
  GetAllPromptsRequest,
531
495
  z.ZodTypeDef,
532
496
  unknown
533
497
  > = z.object({
534
- sort: GetAllPromptsQueryParamSort$inboundSchema.default("asc"),
535
498
  limit: z.number().default(10),
536
499
  starting_after: z.string().optional(),
537
500
  ending_before: z.string().optional(),
@@ -544,7 +507,6 @@ export const GetAllPromptsRequest$inboundSchema: z.ZodType<
544
507
 
545
508
  /** @internal */
546
509
  export type GetAllPromptsRequest$Outbound = {
547
- sort: string;
548
510
  limit: number;
549
511
  starting_after?: string | undefined;
550
512
  ending_before?: string | undefined;
@@ -556,7 +518,6 @@ export const GetAllPromptsRequest$outboundSchema: z.ZodType<
556
518
  z.ZodTypeDef,
557
519
  GetAllPromptsRequest
558
520
  > = z.object({
559
- sort: GetAllPromptsQueryParamSort$outboundSchema.default("asc"),
560
521
  limit: z.number().default(10),
561
522
  startingAfter: z.string().optional(),
562
523
  endingBefore: z.string().optional(),