@orq-ai/node 3.0.1 → 3.1.0-rc.7

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 (300) hide show
  1. package/README.md +11 -9
  2. package/docs/sdks/deployments/README.md +195 -5
  3. package/docs/sdks/files/README.md +8 -4
  4. package/funcs/contactsCreate.d.ts.map +1 -1
  5. package/funcs/contactsCreate.js +1 -1
  6. package/funcs/contactsCreate.js.map +1 -1
  7. package/funcs/deploymentsGetConfig.d.ts.map +1 -1
  8. package/funcs/deploymentsGetConfig.js +1 -1
  9. package/funcs/deploymentsGetConfig.js.map +1 -1
  10. package/funcs/deploymentsGetLogs.d.ts +15 -0
  11. package/funcs/deploymentsGetLogs.d.ts.map +1 -0
  12. package/funcs/deploymentsGetLogs.js +113 -0
  13. package/funcs/deploymentsGetLogs.js.map +1 -0
  14. package/funcs/deploymentsInvalidate.d.ts +15 -0
  15. package/funcs/deploymentsInvalidate.d.ts.map +1 -0
  16. package/funcs/deploymentsInvalidate.js +113 -0
  17. package/funcs/deploymentsInvalidate.js.map +1 -0
  18. package/funcs/deploymentsInvoke.d.ts.map +1 -1
  19. package/funcs/deploymentsInvoke.js +1 -1
  20. package/funcs/deploymentsInvoke.js.map +1 -1
  21. package/funcs/{deploymentsAll.d.ts → deploymentsList.d.ts} +2 -2
  22. package/funcs/deploymentsList.d.ts.map +1 -0
  23. package/funcs/{deploymentsAll.js → deploymentsList.js} +6 -5
  24. package/funcs/deploymentsList.js.map +1 -0
  25. package/funcs/deploymentsMetricsCreate.d.ts.map +1 -1
  26. package/funcs/deploymentsMetricsCreate.js +1 -1
  27. package/funcs/deploymentsMetricsCreate.js.map +1 -1
  28. package/funcs/feedbackCreate.d.ts.map +1 -1
  29. package/funcs/feedbackCreate.js +1 -1
  30. package/funcs/feedbackCreate.js.map +1 -1
  31. package/funcs/filesBulkUpload.d.ts.map +1 -1
  32. package/funcs/filesBulkUpload.js +1 -1
  33. package/funcs/filesBulkUpload.js.map +1 -1
  34. package/funcs/filesDelete.d.ts.map +1 -1
  35. package/funcs/filesDelete.js +1 -1
  36. package/funcs/filesDelete.js.map +1 -1
  37. package/funcs/filesGet.d.ts.map +1 -1
  38. package/funcs/filesGet.js +1 -1
  39. package/funcs/filesGet.js.map +1 -1
  40. package/funcs/filesList.d.ts.map +1 -1
  41. package/funcs/filesList.js +1 -1
  42. package/funcs/filesList.js.map +1 -1
  43. package/funcs/filesUpdate.d.ts.map +1 -1
  44. package/funcs/filesUpdate.js +1 -1
  45. package/funcs/filesUpdate.js.map +1 -1
  46. package/funcs/filesUpload.d.ts.map +1 -1
  47. package/funcs/filesUpload.js +1 -1
  48. package/funcs/filesUpload.js.map +1 -1
  49. package/funcs/promptSnippetsFindOne.d.ts.map +1 -1
  50. package/funcs/promptSnippetsFindOne.js +1 -1
  51. package/funcs/promptSnippetsFindOne.js.map +1 -1
  52. package/funcs/promptTemplatesGetAll.d.ts.map +1 -1
  53. package/funcs/promptTemplatesGetAll.js +1 -1
  54. package/funcs/promptTemplatesGetAll.js.map +1 -1
  55. package/funcs/promptsCreate.d.ts.map +1 -1
  56. package/funcs/promptsCreate.js +1 -1
  57. package/funcs/promptsCreate.js.map +1 -1
  58. package/funcs/promptsCreateVersion.d.ts.map +1 -1
  59. package/funcs/promptsCreateVersion.js +1 -1
  60. package/funcs/promptsCreateVersion.js.map +1 -1
  61. package/funcs/promptsDelete.d.ts.map +1 -1
  62. package/funcs/promptsDelete.js +1 -1
  63. package/funcs/promptsDelete.js.map +1 -1
  64. package/funcs/promptsDuplicate.d.ts.map +1 -1
  65. package/funcs/promptsDuplicate.js +1 -1
  66. package/funcs/promptsDuplicate.js.map +1 -1
  67. package/funcs/promptsGetAll.d.ts.map +1 -1
  68. package/funcs/promptsGetAll.js +1 -1
  69. package/funcs/promptsGetAll.js.map +1 -1
  70. package/funcs/promptsGetOne.d.ts.map +1 -1
  71. package/funcs/promptsGetOne.js +1 -1
  72. package/funcs/promptsGetOne.js.map +1 -1
  73. package/funcs/promptsUpdate.d.ts.map +1 -1
  74. package/funcs/promptsUpdate.js +1 -1
  75. package/funcs/promptsUpdate.js.map +1 -1
  76. package/funcs/remoteconfigGetConfig.d.ts.map +1 -1
  77. package/funcs/remoteconfigGetConfig.js +1 -1
  78. package/funcs/remoteconfigGetConfig.js.map +1 -1
  79. package/jsr.json +28 -0
  80. package/lib/config.d.ts +3 -3
  81. package/lib/config.js +3 -3
  82. package/lib/config.js.map +1 -1
  83. package/lib/schemas.d.ts +1 -1
  84. package/lib/schemas.d.ts.map +1 -1
  85. package/lib/schemas.js +4 -1
  86. package/lib/schemas.js.map +1 -1
  87. package/models/operations/bulkfileupload.js +2 -2
  88. package/models/operations/createcontact.js +2 -2
  89. package/models/operations/createprompt.d.ts +12 -0
  90. package/models/operations/createprompt.d.ts.map +1 -1
  91. package/models/operations/createprompt.js +4 -0
  92. package/models/operations/createprompt.js.map +1 -1
  93. package/models/operations/createpromptversion.d.ts +12 -0
  94. package/models/operations/createpromptversion.d.ts.map +1 -1
  95. package/models/operations/createpromptversion.js +4 -0
  96. package/models/operations/createpromptversion.js.map +1 -1
  97. package/models/operations/deploymentgetlogs.d.ts +52406 -0
  98. package/models/operations/deploymentgetlogs.d.ts.map +1 -0
  99. package/models/operations/deploymentgetlogs.js +53803 -0
  100. package/models/operations/deploymentgetlogs.js.map +1 -0
  101. package/models/operations/deploymentinvoke.d.ts +6 -0
  102. package/models/operations/deploymentinvoke.d.ts.map +1 -1
  103. package/models/operations/deploymentinvoke.js +2 -0
  104. package/models/operations/deploymentinvoke.js.map +1 -1
  105. package/models/operations/deployments.d.ts +15 -8
  106. package/models/operations/deployments.d.ts.map +1 -1
  107. package/models/operations/deployments.js +16 -10
  108. package/models/operations/deployments.js.map +1 -1
  109. package/models/operations/fileget.js +2 -2
  110. package/models/operations/filelist.d.ts +1 -5
  111. package/models/operations/filelist.d.ts.map +1 -1
  112. package/models/operations/filelist.js +4 -12
  113. package/models/operations/filelist.js.map +1 -1
  114. package/models/operations/fileupdate.js +2 -2
  115. package/models/operations/fileupload.js +2 -2
  116. package/models/operations/findonepromptsnippet.d.ts +36 -0
  117. package/models/operations/findonepromptsnippet.d.ts.map +1 -1
  118. package/models/operations/findonepromptsnippet.js +18 -6
  119. package/models/operations/findonepromptsnippet.js.map +1 -1
  120. package/models/operations/getallprompts.d.ts +944 -912
  121. package/models/operations/getallprompts.d.ts.map +1 -1
  122. package/models/operations/getallprompts.js +1372 -1362
  123. package/models/operations/getallprompts.js.map +1 -1
  124. package/models/operations/getallprompttemplates.d.ts +151 -115
  125. package/models/operations/getallprompttemplates.d.ts.map +1 -1
  126. package/models/operations/getallprompttemplates.js +182 -173
  127. package/models/operations/getallprompttemplates.js.map +1 -1
  128. package/models/operations/index.d.ts +2 -0
  129. package/models/operations/index.d.ts.map +1 -1
  130. package/models/operations/index.js +2 -0
  131. package/models/operations/index.js.map +1 -1
  132. package/models/operations/invaliddeployment.d.ts +29 -0
  133. package/models/operations/invaliddeployment.d.ts.map +1 -0
  134. package/models/operations/invaliddeployment.js +78 -0
  135. package/models/operations/invaliddeployment.js.map +1 -0
  136. package/models/operations/updateprompt.d.ts +42 -0
  137. package/models/operations/updateprompt.d.ts.map +1 -1
  138. package/models/operations/updateprompt.js +20 -6
  139. package/models/operations/updateprompt.js.map +1 -1
  140. package/package.json +3 -2
  141. package/sdk/deployments.d.ts +15 -1
  142. package/sdk/deployments.d.ts.map +1 -1
  143. package/sdk/deployments.js +23 -3
  144. package/sdk/deployments.js.map +1 -1
  145. package/src/funcs/contactsCreate.ts +2 -1
  146. package/src/funcs/deploymentsGetConfig.ts +2 -1
  147. package/{packages/orq-rc/src/funcs/deploymentsMetricsCreate.ts → src/funcs/deploymentsGetLogs.ts} +17 -16
  148. package/{packages/orq-rc/src/funcs/promptsDelete.ts → src/funcs/deploymentsInvalidate.ts} +18 -11
  149. package/src/funcs/deploymentsInvoke.ts +2 -1
  150. package/src/funcs/{deploymentsAll.ts → deploymentsList.ts} +5 -3
  151. package/src/funcs/deploymentsMetricsCreate.ts +2 -1
  152. package/src/funcs/feedbackCreate.ts +2 -1
  153. package/src/funcs/filesBulkUpload.ts +2 -1
  154. package/src/funcs/filesDelete.ts +2 -1
  155. package/src/funcs/filesGet.ts +2 -1
  156. package/src/funcs/filesList.ts +2 -1
  157. package/src/funcs/filesUpdate.ts +2 -1
  158. package/src/funcs/filesUpload.ts +2 -1
  159. package/src/funcs/promptSnippetsFindOne.ts +2 -1
  160. package/src/funcs/promptTemplatesGetAll.ts +2 -1
  161. package/src/funcs/promptsCreate.ts +2 -1
  162. package/src/funcs/promptsCreateVersion.ts +2 -1
  163. package/src/funcs/promptsDelete.ts +2 -1
  164. package/src/funcs/promptsDuplicate.ts +2 -1
  165. package/src/funcs/promptsGetAll.ts +2 -1
  166. package/src/funcs/promptsGetOne.ts +2 -1
  167. package/src/funcs/promptsUpdate.ts +2 -1
  168. package/src/funcs/remoteconfigGetConfig.ts +2 -1
  169. package/src/lib/config.ts +3 -3
  170. package/src/lib/schemas.ts +5 -0
  171. package/src/models/operations/bulkfileupload.ts +2 -2
  172. package/src/models/operations/createcontact.ts +2 -2
  173. package/src/models/operations/createprompt.ts +4 -0
  174. package/src/models/operations/createpromptversion.ts +4 -0
  175. package/src/models/operations/deploymentgetlogs.ts +119430 -0
  176. package/src/models/operations/deploymentinvoke.ts +2 -0
  177. package/src/models/operations/deployments.ts +25 -18
  178. package/src/models/operations/fileget.ts +2 -2
  179. package/src/models/operations/filelist.ts +5 -17
  180. package/src/models/operations/fileupdate.ts +2 -2
  181. package/src/models/operations/fileupload.ts +2 -2
  182. package/src/models/operations/findonepromptsnippet.ts +18 -6
  183. package/src/models/operations/getallprompts.ts +2464 -2159
  184. package/src/models/operations/getallprompttemplates.ts +321 -232
  185. package/src/models/operations/index.ts +2 -0
  186. package/src/models/operations/invaliddeployment.ts +75 -0
  187. package/src/models/operations/updateprompt.ts +20 -6
  188. package/src/sdk/deployments.ts +39 -3
  189. package/tsconfig.json +41 -0
  190. package/funcs/deploymentsAll.d.ts.map +0 -1
  191. package/funcs/deploymentsAll.js.map +0 -1
  192. package/packages/orq-rc/FUNCTIONS.md +0 -106
  193. package/packages/orq-rc/README.md +0 -564
  194. package/packages/orq-rc/RUNTIMES.md +0 -22
  195. package/packages/orq-rc/docs/sdks/contacts/README.md +0 -84
  196. package/packages/orq-rc/docs/sdks/deployments/README.md +0 -239
  197. package/packages/orq-rc/docs/sdks/feedback/README.md +0 -92
  198. package/packages/orq-rc/docs/sdks/files/README.md +0 -473
  199. package/packages/orq-rc/docs/sdks/metrics/README.md +0 -86
  200. package/packages/orq-rc/docs/sdks/orq/README.md +0 -10
  201. package/packages/orq-rc/docs/sdks/prompt/README.md +0 -6
  202. package/packages/orq-rc/docs/sdks/prompts/README.md +0 -533
  203. package/packages/orq-rc/docs/sdks/remoteconfig/README.md +0 -80
  204. package/packages/orq-rc/docs/sdks/snippets/README.md +0 -84
  205. package/packages/orq-rc/docs/sdks/templates/README.md +0 -80
  206. package/packages/orq-rc/src/core.ts +0 -13
  207. package/packages/orq-rc/src/funcs/contactsCreate.ts +0 -124
  208. package/packages/orq-rc/src/funcs/deploymentsAll.ts +0 -138
  209. package/packages/orq-rc/src/funcs/deploymentsGetConfig.ts +0 -132
  210. package/packages/orq-rc/src/funcs/deploymentsInvoke.ts +0 -135
  211. package/packages/orq-rc/src/funcs/feedbackCreate.ts +0 -124
  212. package/packages/orq-rc/src/funcs/filesBulkUpload.ts +0 -126
  213. package/packages/orq-rc/src/funcs/filesDelete.ts +0 -128
  214. package/packages/orq-rc/src/funcs/filesGet.ts +0 -127
  215. package/packages/orq-rc/src/funcs/filesList.ts +0 -129
  216. package/packages/orq-rc/src/funcs/filesUpdate.ts +0 -128
  217. package/packages/orq-rc/src/funcs/filesUpload.ts +0 -145
  218. package/packages/orq-rc/src/funcs/promptSnippetsFindOne.ts +0 -128
  219. package/packages/orq-rc/src/funcs/promptTemplatesGetAll.ts +0 -130
  220. package/packages/orq-rc/src/funcs/promptsCreate.ts +0 -124
  221. package/packages/orq-rc/src/funcs/promptsCreateVersion.ts +0 -129
  222. package/packages/orq-rc/src/funcs/promptsDuplicate.ts +0 -128
  223. package/packages/orq-rc/src/funcs/promptsGetAll.ts +0 -126
  224. package/packages/orq-rc/src/funcs/promptsGetOne.ts +0 -128
  225. package/packages/orq-rc/src/funcs/promptsUpdate.ts +0 -136
  226. package/packages/orq-rc/src/funcs/remoteconfigGetConfig.ts +0 -125
  227. package/packages/orq-rc/src/hooks/hooks.ts +0 -132
  228. package/packages/orq-rc/src/hooks/index.ts +0 -6
  229. package/packages/orq-rc/src/hooks/registration.ts +0 -14
  230. package/packages/orq-rc/src/hooks/types.ts +0 -109
  231. package/packages/orq-rc/src/index.ts +0 -7
  232. package/packages/orq-rc/src/lib/base64.ts +0 -37
  233. package/packages/orq-rc/src/lib/config.ts +0 -60
  234. package/packages/orq-rc/src/lib/dlv.ts +0 -53
  235. package/packages/orq-rc/src/lib/encodings.ts +0 -449
  236. package/packages/orq-rc/src/lib/env.ts +0 -41
  237. package/packages/orq-rc/src/lib/event-streams.ts +0 -264
  238. package/packages/orq-rc/src/lib/files.ts +0 -40
  239. package/packages/orq-rc/src/lib/http.ts +0 -323
  240. package/packages/orq-rc/src/lib/is-plain-object.ts +0 -43
  241. package/packages/orq-rc/src/lib/logger.ts +0 -9
  242. package/packages/orq-rc/src/lib/matchers.ts +0 -325
  243. package/packages/orq-rc/src/lib/primitives.ts +0 -122
  244. package/packages/orq-rc/src/lib/retries.ts +0 -219
  245. package/packages/orq-rc/src/lib/schemas.ts +0 -86
  246. package/packages/orq-rc/src/lib/sdks.ts +0 -397
  247. package/packages/orq-rc/src/lib/security.ts +0 -254
  248. package/packages/orq-rc/src/lib/url.ts +0 -33
  249. package/packages/orq-rc/src/models/components/deployments.ts +0 -1673
  250. package/packages/orq-rc/src/models/components/index.ts +0 -6
  251. package/packages/orq-rc/src/models/components/security.ts +0 -71
  252. package/packages/orq-rc/src/models/errors/apierror.ts +0 -27
  253. package/packages/orq-rc/src/models/errors/honoapierror.ts +0 -82
  254. package/packages/orq-rc/src/models/errors/httpclienterrors.ts +0 -62
  255. package/packages/orq-rc/src/models/errors/index.ts +0 -9
  256. package/packages/orq-rc/src/models/errors/sdkvalidationerror.ts +0 -97
  257. package/packages/orq-rc/src/models/errors/updateprompt.ts +0 -71
  258. package/packages/orq-rc/src/models/operations/bulkfileupload.ts +0 -315
  259. package/packages/orq-rc/src/models/operations/createcontact.ts +0 -256
  260. package/packages/orq-rc/src/models/operations/createfeedback.ts +0 -286
  261. package/packages/orq-rc/src/models/operations/createprompt.ts +0 -3461
  262. package/packages/orq-rc/src/models/operations/createpromptversion.ts +0 -3703
  263. package/packages/orq-rc/src/models/operations/deleteprompt.ts +0 -69
  264. package/packages/orq-rc/src/models/operations/deploymentcreatemetric.ts +0 -1790
  265. package/packages/orq-rc/src/models/operations/deploymentgetconfig.ts +0 -3483
  266. package/packages/orq-rc/src/models/operations/deploymentinvoke.ts +0 -2385
  267. package/packages/orq-rc/src/models/operations/deployments.ts +0 -2098
  268. package/packages/orq-rc/src/models/operations/duplicateprompt.ts +0 -69
  269. package/packages/orq-rc/src/models/operations/filedelete.ts +0 -78
  270. package/packages/orq-rc/src/models/operations/fileget.ts +0 -222
  271. package/packages/orq-rc/src/models/operations/filelist.ts +0 -333
  272. package/packages/orq-rc/src/models/operations/fileupdate.ts +0 -298
  273. package/packages/orq-rc/src/models/operations/fileupload.ts +0 -322
  274. package/packages/orq-rc/src/models/operations/findonepromptsnippet.ts +0 -13629
  275. package/packages/orq-rc/src/models/operations/getallprompts.ts +0 -18640
  276. package/packages/orq-rc/src/models/operations/getallprompttemplates.ts +0 -13690
  277. package/packages/orq-rc/src/models/operations/getoneprompt.ts +0 -69
  278. package/packages/orq-rc/src/models/operations/index.ts +0 -26
  279. package/packages/orq-rc/src/models/operations/remoteconfigsgetconfig.ts +0 -190
  280. package/packages/orq-rc/src/models/operations/updateprompt.ts +0 -14407
  281. package/packages/orq-rc/src/sdk/contacts.ts +0 -27
  282. package/packages/orq-rc/src/sdk/deployments.ts +0 -75
  283. package/packages/orq-rc/src/sdk/feedback.ts +0 -27
  284. package/packages/orq-rc/src/sdk/files.ts +0 -105
  285. package/packages/orq-rc/src/sdk/index.ts +0 -5
  286. package/packages/orq-rc/src/sdk/metrics.ts +0 -27
  287. package/packages/orq-rc/src/sdk/prompt.ts +0 -19
  288. package/packages/orq-rc/src/sdk/prompts.ts +0 -114
  289. package/packages/orq-rc/src/sdk/remoteconfig.ts +0 -24
  290. package/packages/orq-rc/src/sdk/sdk.ts +0 -49
  291. package/packages/orq-rc/src/sdk/snippets.ts +0 -24
  292. package/packages/orq-rc/src/sdk/templates.ts +0 -24
  293. package/packages/orq-rc/src/types/blobs.ts +0 -31
  294. package/packages/orq-rc/src/types/constdatetime.ts +0 -15
  295. package/packages/orq-rc/src/types/enums.ts +0 -16
  296. package/packages/orq-rc/src/types/fp.ts +0 -50
  297. package/packages/orq-rc/src/types/index.ts +0 -11
  298. package/packages/orq-rc/src/types/operations.ts +0 -105
  299. package/packages/orq-rc/src/types/rfcdate.ts +0 -54
  300. package/packages/orq-rc/src/types/streams.ts +0 -21
@@ -1,69 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import * as z from "zod";
6
- import { safeParse } from "../../lib/schemas.js";
7
- import { Result as SafeParseResult } from "../../types/fp.js";
8
- import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
-
10
- export type DuplicatePromptRequest = {
11
- /**
12
- * Prompt ID
13
- */
14
- id: string;
15
- };
16
-
17
- /** @internal */
18
- export const DuplicatePromptRequest$inboundSchema: z.ZodType<
19
- DuplicatePromptRequest,
20
- z.ZodTypeDef,
21
- unknown
22
- > = z.object({
23
- id: z.string(),
24
- });
25
-
26
- /** @internal */
27
- export type DuplicatePromptRequest$Outbound = {
28
- id: string;
29
- };
30
-
31
- /** @internal */
32
- export const DuplicatePromptRequest$outboundSchema: z.ZodType<
33
- DuplicatePromptRequest$Outbound,
34
- z.ZodTypeDef,
35
- DuplicatePromptRequest
36
- > = z.object({
37
- id: z.string(),
38
- });
39
-
40
- /**
41
- * @internal
42
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
43
- */
44
- export namespace DuplicatePromptRequest$ {
45
- /** @deprecated use `DuplicatePromptRequest$inboundSchema` instead. */
46
- export const inboundSchema = DuplicatePromptRequest$inboundSchema;
47
- /** @deprecated use `DuplicatePromptRequest$outboundSchema` instead. */
48
- export const outboundSchema = DuplicatePromptRequest$outboundSchema;
49
- /** @deprecated use `DuplicatePromptRequest$Outbound` instead. */
50
- export type Outbound = DuplicatePromptRequest$Outbound;
51
- }
52
-
53
- export function duplicatePromptRequestToJSON(
54
- duplicatePromptRequest: DuplicatePromptRequest,
55
- ): string {
56
- return JSON.stringify(
57
- DuplicatePromptRequest$outboundSchema.parse(duplicatePromptRequest),
58
- );
59
- }
60
-
61
- export function duplicatePromptRequestFromJSON(
62
- jsonString: string,
63
- ): SafeParseResult<DuplicatePromptRequest, SDKValidationError> {
64
- return safeParse(
65
- jsonString,
66
- (x) => DuplicatePromptRequest$inboundSchema.parse(JSON.parse(x)),
67
- `Failed to parse 'DuplicatePromptRequest' from JSON`,
68
- );
69
- }
@@ -1,78 +0,0 @@
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 FileDeleteRequest = {
12
- /**
13
- * The ID of the file
14
- */
15
- fileId: string;
16
- };
17
-
18
- /** @internal */
19
- export const FileDeleteRequest$inboundSchema: z.ZodType<
20
- FileDeleteRequest,
21
- z.ZodTypeDef,
22
- unknown
23
- > = z.object({
24
- file_id: z.string(),
25
- }).transform((v) => {
26
- return remap$(v, {
27
- "file_id": "fileId",
28
- });
29
- });
30
-
31
- /** @internal */
32
- export type FileDeleteRequest$Outbound = {
33
- file_id: string;
34
- };
35
-
36
- /** @internal */
37
- export const FileDeleteRequest$outboundSchema: z.ZodType<
38
- FileDeleteRequest$Outbound,
39
- z.ZodTypeDef,
40
- FileDeleteRequest
41
- > = z.object({
42
- fileId: z.string(),
43
- }).transform((v) => {
44
- return remap$(v, {
45
- fileId: "file_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 FileDeleteRequest$ {
54
- /** @deprecated use `FileDeleteRequest$inboundSchema` instead. */
55
- export const inboundSchema = FileDeleteRequest$inboundSchema;
56
- /** @deprecated use `FileDeleteRequest$outboundSchema` instead. */
57
- export const outboundSchema = FileDeleteRequest$outboundSchema;
58
- /** @deprecated use `FileDeleteRequest$Outbound` instead. */
59
- export type Outbound = FileDeleteRequest$Outbound;
60
- }
61
-
62
- export function fileDeleteRequestToJSON(
63
- fileDeleteRequest: FileDeleteRequest,
64
- ): string {
65
- return JSON.stringify(
66
- FileDeleteRequest$outboundSchema.parse(fileDeleteRequest),
67
- );
68
- }
69
-
70
- export function fileDeleteRequestFromJSON(
71
- jsonString: string,
72
- ): SafeParseResult<FileDeleteRequest, SDKValidationError> {
73
- return safeParse(
74
- jsonString,
75
- (x) => FileDeleteRequest$inboundSchema.parse(JSON.parse(x)),
76
- `Failed to parse 'FileDeleteRequest' from JSON`,
77
- );
78
- }
@@ -1,222 +0,0 @@
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
- export type FileGetRequest = {
13
- /**
14
- * The ID of the file
15
- */
16
- fileId: string;
17
- };
18
-
19
- /**
20
- * The intended purpose of the uploaded file.
21
- */
22
- export const FileGetPurpose = {
23
- Retrieval: "retrieval",
24
- KnowledgeDatasource: "knowledge_datasource",
25
- } as const;
26
- /**
27
- * The intended purpose of the uploaded file.
28
- */
29
- export type FileGetPurpose = ClosedEnum<typeof FileGetPurpose>;
30
-
31
- /**
32
- * File details retrieved successfully
33
- */
34
- export type FileGetResponseBody = {
35
- id: string;
36
- /**
37
- * path to the file in the storage
38
- */
39
- objectName: string;
40
- /**
41
- * The intended purpose of the uploaded file.
42
- */
43
- purpose: FileGetPurpose;
44
- bytes: number;
45
- fileName: string;
46
- /**
47
- * The id of the resource
48
- */
49
- workspaceId: string;
50
- /**
51
- * The date and time the resource was created
52
- */
53
- created?: Date | undefined;
54
- };
55
-
56
- /** @internal */
57
- export const FileGetRequest$inboundSchema: z.ZodType<
58
- FileGetRequest,
59
- z.ZodTypeDef,
60
- unknown
61
- > = z.object({
62
- file_id: z.string(),
63
- }).transform((v) => {
64
- return remap$(v, {
65
- "file_id": "fileId",
66
- });
67
- });
68
-
69
- /** @internal */
70
- export type FileGetRequest$Outbound = {
71
- file_id: string;
72
- };
73
-
74
- /** @internal */
75
- export const FileGetRequest$outboundSchema: z.ZodType<
76
- FileGetRequest$Outbound,
77
- z.ZodTypeDef,
78
- FileGetRequest
79
- > = z.object({
80
- fileId: z.string(),
81
- }).transform((v) => {
82
- return remap$(v, {
83
- fileId: "file_id",
84
- });
85
- });
86
-
87
- /**
88
- * @internal
89
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
90
- */
91
- export namespace FileGetRequest$ {
92
- /** @deprecated use `FileGetRequest$inboundSchema` instead. */
93
- export const inboundSchema = FileGetRequest$inboundSchema;
94
- /** @deprecated use `FileGetRequest$outboundSchema` instead. */
95
- export const outboundSchema = FileGetRequest$outboundSchema;
96
- /** @deprecated use `FileGetRequest$Outbound` instead. */
97
- export type Outbound = FileGetRequest$Outbound;
98
- }
99
-
100
- export function fileGetRequestToJSON(fileGetRequest: FileGetRequest): string {
101
- return JSON.stringify(FileGetRequest$outboundSchema.parse(fileGetRequest));
102
- }
103
-
104
- export function fileGetRequestFromJSON(
105
- jsonString: string,
106
- ): SafeParseResult<FileGetRequest, SDKValidationError> {
107
- return safeParse(
108
- jsonString,
109
- (x) => FileGetRequest$inboundSchema.parse(JSON.parse(x)),
110
- `Failed to parse 'FileGetRequest' from JSON`,
111
- );
112
- }
113
-
114
- /** @internal */
115
- export const FileGetPurpose$inboundSchema: z.ZodNativeEnum<
116
- typeof FileGetPurpose
117
- > = z.nativeEnum(FileGetPurpose);
118
-
119
- /** @internal */
120
- export const FileGetPurpose$outboundSchema: z.ZodNativeEnum<
121
- typeof FileGetPurpose
122
- > = FileGetPurpose$inboundSchema;
123
-
124
- /**
125
- * @internal
126
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
127
- */
128
- export namespace FileGetPurpose$ {
129
- /** @deprecated use `FileGetPurpose$inboundSchema` instead. */
130
- export const inboundSchema = FileGetPurpose$inboundSchema;
131
- /** @deprecated use `FileGetPurpose$outboundSchema` instead. */
132
- export const outboundSchema = FileGetPurpose$outboundSchema;
133
- }
134
-
135
- /** @internal */
136
- export const FileGetResponseBody$inboundSchema: z.ZodType<
137
- FileGetResponseBody,
138
- z.ZodTypeDef,
139
- unknown
140
- > = z.object({
141
- _id: z.string(),
142
- object_name: z.string(),
143
- purpose: FileGetPurpose$inboundSchema,
144
- bytes: z.number(),
145
- file_name: z.string(),
146
- workspace_id: z.string(),
147
- created: z.string().datetime({ offset: true }).default(
148
- "2025-01-02T13:55:01.176Z",
149
- ).transform(v => new Date(v)),
150
- }).transform((v) => {
151
- return remap$(v, {
152
- "_id": "id",
153
- "object_name": "objectName",
154
- "file_name": "fileName",
155
- "workspace_id": "workspaceId",
156
- });
157
- });
158
-
159
- /** @internal */
160
- export type FileGetResponseBody$Outbound = {
161
- _id: string;
162
- object_name: string;
163
- purpose: string;
164
- bytes: number;
165
- file_name: string;
166
- workspace_id: string;
167
- created: string;
168
- };
169
-
170
- /** @internal */
171
- export const FileGetResponseBody$outboundSchema: z.ZodType<
172
- FileGetResponseBody$Outbound,
173
- z.ZodTypeDef,
174
- FileGetResponseBody
175
- > = z.object({
176
- id: z.string(),
177
- objectName: z.string(),
178
- purpose: FileGetPurpose$outboundSchema,
179
- bytes: z.number(),
180
- fileName: z.string(),
181
- workspaceId: z.string(),
182
- created: z.date().default(() => new Date("2025-01-02T13:55:01.176Z"))
183
- .transform(v => v.toISOString()),
184
- }).transform((v) => {
185
- return remap$(v, {
186
- id: "_id",
187
- objectName: "object_name",
188
- fileName: "file_name",
189
- workspaceId: "workspace_id",
190
- });
191
- });
192
-
193
- /**
194
- * @internal
195
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
196
- */
197
- export namespace FileGetResponseBody$ {
198
- /** @deprecated use `FileGetResponseBody$inboundSchema` instead. */
199
- export const inboundSchema = FileGetResponseBody$inboundSchema;
200
- /** @deprecated use `FileGetResponseBody$outboundSchema` instead. */
201
- export const outboundSchema = FileGetResponseBody$outboundSchema;
202
- /** @deprecated use `FileGetResponseBody$Outbound` instead. */
203
- export type Outbound = FileGetResponseBody$Outbound;
204
- }
205
-
206
- export function fileGetResponseBodyToJSON(
207
- fileGetResponseBody: FileGetResponseBody,
208
- ): string {
209
- return JSON.stringify(
210
- FileGetResponseBody$outboundSchema.parse(fileGetResponseBody),
211
- );
212
- }
213
-
214
- export function fileGetResponseBodyFromJSON(
215
- jsonString: string,
216
- ): SafeParseResult<FileGetResponseBody, SDKValidationError> {
217
- return safeParse(
218
- jsonString,
219
- (x) => FileGetResponseBody$inboundSchema.parse(JSON.parse(x)),
220
- `Failed to parse 'FileGetResponseBody' from JSON`,
221
- );
222
- }
@@ -1,333 +0,0 @@
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
- export type FileListRequest = {
13
- page?: number | undefined;
14
- limit?: number | undefined;
15
- lastId?: string | null | undefined;
16
- firstId?: string | null | undefined;
17
- };
18
-
19
- export const FileListObject = {
20
- List: "list",
21
- } as const;
22
- export type FileListObject = ClosedEnum<typeof FileListObject>;
23
-
24
- /**
25
- * The intended purpose of the uploaded file.
26
- */
27
- export const FileListPurpose = {
28
- Retrieval: "retrieval",
29
- KnowledgeDatasource: "knowledge_datasource",
30
- } as const;
31
- /**
32
- * The intended purpose of the uploaded file.
33
- */
34
- export type FileListPurpose = ClosedEnum<typeof FileListPurpose>;
35
-
36
- export type FileListData = {
37
- id: string;
38
- /**
39
- * path to the file in the storage
40
- */
41
- objectName: string;
42
- /**
43
- * The intended purpose of the uploaded file.
44
- */
45
- purpose: FileListPurpose;
46
- bytes: number;
47
- fileName: string;
48
- /**
49
- * The id of the resource
50
- */
51
- workspaceId: string;
52
- /**
53
- * The date and time the resource was created
54
- */
55
- created?: Date | undefined;
56
- };
57
-
58
- /**
59
- * Files retrieved successfully
60
- */
61
- export type FileListResponseBody = {
62
- object: FileListObject;
63
- data: Array<FileListData>;
64
- hasMore: boolean;
65
- firstId: string | null;
66
- lastId: string | null;
67
- };
68
-
69
- /** @internal */
70
- export const FileListRequest$inboundSchema: z.ZodType<
71
- FileListRequest,
72
- z.ZodTypeDef,
73
- unknown
74
- > = z.object({
75
- page: z.number().optional(),
76
- limit: z.number().optional(),
77
- lastId: z.nullable(z.string()).optional(),
78
- firstId: z.nullable(z.string()).optional(),
79
- });
80
-
81
- /** @internal */
82
- export type FileListRequest$Outbound = {
83
- page?: number | undefined;
84
- limit?: number | undefined;
85
- lastId?: string | null | undefined;
86
- firstId?: string | null | undefined;
87
- };
88
-
89
- /** @internal */
90
- export const FileListRequest$outboundSchema: z.ZodType<
91
- FileListRequest$Outbound,
92
- z.ZodTypeDef,
93
- FileListRequest
94
- > = z.object({
95
- page: z.number().optional(),
96
- limit: z.number().optional(),
97
- lastId: z.nullable(z.string()).optional(),
98
- firstId: z.nullable(z.string()).optional(),
99
- });
100
-
101
- /**
102
- * @internal
103
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
104
- */
105
- export namespace FileListRequest$ {
106
- /** @deprecated use `FileListRequest$inboundSchema` instead. */
107
- export const inboundSchema = FileListRequest$inboundSchema;
108
- /** @deprecated use `FileListRequest$outboundSchema` instead. */
109
- export const outboundSchema = FileListRequest$outboundSchema;
110
- /** @deprecated use `FileListRequest$Outbound` instead. */
111
- export type Outbound = FileListRequest$Outbound;
112
- }
113
-
114
- export function fileListRequestToJSON(
115
- fileListRequest: FileListRequest,
116
- ): string {
117
- return JSON.stringify(FileListRequest$outboundSchema.parse(fileListRequest));
118
- }
119
-
120
- export function fileListRequestFromJSON(
121
- jsonString: string,
122
- ): SafeParseResult<FileListRequest, SDKValidationError> {
123
- return safeParse(
124
- jsonString,
125
- (x) => FileListRequest$inboundSchema.parse(JSON.parse(x)),
126
- `Failed to parse 'FileListRequest' from JSON`,
127
- );
128
- }
129
-
130
- /** @internal */
131
- export const FileListObject$inboundSchema: z.ZodNativeEnum<
132
- typeof FileListObject
133
- > = z.nativeEnum(FileListObject);
134
-
135
- /** @internal */
136
- export const FileListObject$outboundSchema: z.ZodNativeEnum<
137
- typeof FileListObject
138
- > = FileListObject$inboundSchema;
139
-
140
- /**
141
- * @internal
142
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
143
- */
144
- export namespace FileListObject$ {
145
- /** @deprecated use `FileListObject$inboundSchema` instead. */
146
- export const inboundSchema = FileListObject$inboundSchema;
147
- /** @deprecated use `FileListObject$outboundSchema` instead. */
148
- export const outboundSchema = FileListObject$outboundSchema;
149
- }
150
-
151
- /** @internal */
152
- export const FileListPurpose$inboundSchema: z.ZodNativeEnum<
153
- typeof FileListPurpose
154
- > = z.nativeEnum(FileListPurpose);
155
-
156
- /** @internal */
157
- export const FileListPurpose$outboundSchema: z.ZodNativeEnum<
158
- typeof FileListPurpose
159
- > = FileListPurpose$inboundSchema;
160
-
161
- /**
162
- * @internal
163
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
164
- */
165
- export namespace FileListPurpose$ {
166
- /** @deprecated use `FileListPurpose$inboundSchema` instead. */
167
- export const inboundSchema = FileListPurpose$inboundSchema;
168
- /** @deprecated use `FileListPurpose$outboundSchema` instead. */
169
- export const outboundSchema = FileListPurpose$outboundSchema;
170
- }
171
-
172
- /** @internal */
173
- export const FileListData$inboundSchema: z.ZodType<
174
- FileListData,
175
- z.ZodTypeDef,
176
- unknown
177
- > = z.object({
178
- _id: z.string(),
179
- object_name: z.string(),
180
- purpose: FileListPurpose$inboundSchema,
181
- bytes: z.number(),
182
- file_name: z.string(),
183
- workspace_id: z.string(),
184
- created: z.string().datetime({ offset: true }).default(
185
- "2025-01-02T13:55:01.176Z",
186
- ).transform(v => new Date(v)),
187
- }).transform((v) => {
188
- return remap$(v, {
189
- "_id": "id",
190
- "object_name": "objectName",
191
- "file_name": "fileName",
192
- "workspace_id": "workspaceId",
193
- });
194
- });
195
-
196
- /** @internal */
197
- export type FileListData$Outbound = {
198
- _id: string;
199
- object_name: string;
200
- purpose: string;
201
- bytes: number;
202
- file_name: string;
203
- workspace_id: string;
204
- created: string;
205
- };
206
-
207
- /** @internal */
208
- export const FileListData$outboundSchema: z.ZodType<
209
- FileListData$Outbound,
210
- z.ZodTypeDef,
211
- FileListData
212
- > = z.object({
213
- id: z.string(),
214
- objectName: z.string(),
215
- purpose: FileListPurpose$outboundSchema,
216
- bytes: z.number(),
217
- fileName: z.string(),
218
- workspaceId: z.string(),
219
- created: z.date().default(() => new Date("2025-01-02T13:55:01.176Z"))
220
- .transform(v => v.toISOString()),
221
- }).transform((v) => {
222
- return remap$(v, {
223
- id: "_id",
224
- objectName: "object_name",
225
- fileName: "file_name",
226
- workspaceId: "workspace_id",
227
- });
228
- });
229
-
230
- /**
231
- * @internal
232
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
233
- */
234
- export namespace FileListData$ {
235
- /** @deprecated use `FileListData$inboundSchema` instead. */
236
- export const inboundSchema = FileListData$inboundSchema;
237
- /** @deprecated use `FileListData$outboundSchema` instead. */
238
- export const outboundSchema = FileListData$outboundSchema;
239
- /** @deprecated use `FileListData$Outbound` instead. */
240
- export type Outbound = FileListData$Outbound;
241
- }
242
-
243
- export function fileListDataToJSON(fileListData: FileListData): string {
244
- return JSON.stringify(FileListData$outboundSchema.parse(fileListData));
245
- }
246
-
247
- export function fileListDataFromJSON(
248
- jsonString: string,
249
- ): SafeParseResult<FileListData, SDKValidationError> {
250
- return safeParse(
251
- jsonString,
252
- (x) => FileListData$inboundSchema.parse(JSON.parse(x)),
253
- `Failed to parse 'FileListData' from JSON`,
254
- );
255
- }
256
-
257
- /** @internal */
258
- export const FileListResponseBody$inboundSchema: z.ZodType<
259
- FileListResponseBody,
260
- z.ZodTypeDef,
261
- unknown
262
- > = z.object({
263
- object: FileListObject$inboundSchema,
264
- data: z.array(z.lazy(() => FileListData$inboundSchema)),
265
- has_more: z.boolean(),
266
- first_id: z.nullable(z.string()),
267
- last_id: z.nullable(z.string()),
268
- }).transform((v) => {
269
- return remap$(v, {
270
- "has_more": "hasMore",
271
- "first_id": "firstId",
272
- "last_id": "lastId",
273
- });
274
- });
275
-
276
- /** @internal */
277
- export type FileListResponseBody$Outbound = {
278
- object: string;
279
- data: Array<FileListData$Outbound>;
280
- has_more: boolean;
281
- first_id: string | null;
282
- last_id: string | null;
283
- };
284
-
285
- /** @internal */
286
- export const FileListResponseBody$outboundSchema: z.ZodType<
287
- FileListResponseBody$Outbound,
288
- z.ZodTypeDef,
289
- FileListResponseBody
290
- > = z.object({
291
- object: FileListObject$outboundSchema,
292
- data: z.array(z.lazy(() => FileListData$outboundSchema)),
293
- hasMore: z.boolean(),
294
- firstId: z.nullable(z.string()),
295
- lastId: z.nullable(z.string()),
296
- }).transform((v) => {
297
- return remap$(v, {
298
- hasMore: "has_more",
299
- firstId: "first_id",
300
- lastId: "last_id",
301
- });
302
- });
303
-
304
- /**
305
- * @internal
306
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
307
- */
308
- export namespace FileListResponseBody$ {
309
- /** @deprecated use `FileListResponseBody$inboundSchema` instead. */
310
- export const inboundSchema = FileListResponseBody$inboundSchema;
311
- /** @deprecated use `FileListResponseBody$outboundSchema` instead. */
312
- export const outboundSchema = FileListResponseBody$outboundSchema;
313
- /** @deprecated use `FileListResponseBody$Outbound` instead. */
314
- export type Outbound = FileListResponseBody$Outbound;
315
- }
316
-
317
- export function fileListResponseBodyToJSON(
318
- fileListResponseBody: FileListResponseBody,
319
- ): string {
320
- return JSON.stringify(
321
- FileListResponseBody$outboundSchema.parse(fileListResponseBody),
322
- );
323
- }
324
-
325
- export function fileListResponseBodyFromJSON(
326
- jsonString: string,
327
- ): SafeParseResult<FileListResponseBody, SDKValidationError> {
328
- return safeParse(
329
- jsonString,
330
- (x) => FileListResponseBody$inboundSchema.parse(JSON.parse(x)),
331
- `Failed to parse 'FileListResponseBody' from JSON`,
332
- );
333
- }