@meetkai/mka1 0.51.20 → 0.51.22

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 (263) hide show
  1. package/README.md +246 -243
  2. package/bin/mcp-server.js +568 -371
  3. package/bin/mcp-server.js.map +27 -23
  4. package/dist/commonjs/funcs/servingDatasetsCreate.d.ts +1 -1
  5. package/dist/commonjs/funcs/servingDatasetsCreate.js +1 -1
  6. package/dist/commonjs/funcs/servingDatasetsUploadContent.d.ts +19 -0
  7. package/dist/commonjs/funcs/servingDatasetsUploadContent.d.ts.map +1 -0
  8. package/dist/commonjs/funcs/servingDatasetsUploadContent.js +139 -0
  9. package/dist/commonjs/funcs/servingDatasetsUploadContent.js.map +1 -0
  10. package/dist/commonjs/funcs/servingTenantsDeleteOrganization.d.ts +3 -1
  11. package/dist/commonjs/funcs/servingTenantsDeleteOrganization.d.ts.map +1 -1
  12. package/dist/commonjs/funcs/servingTenantsDeleteOrganization.js +3 -1
  13. package/dist/commonjs/funcs/servingTenantsDeleteOrganization.js.map +1 -1
  14. package/dist/commonjs/funcs/servingTenantsGet.d.ts +3 -1
  15. package/dist/commonjs/funcs/servingTenantsGet.d.ts.map +1 -1
  16. package/dist/commonjs/funcs/servingTenantsGet.js +3 -1
  17. package/dist/commonjs/funcs/servingTenantsGet.js.map +1 -1
  18. package/dist/commonjs/funcs/servingTenantsGetOrganizationDeletion.d.ts +3 -1
  19. package/dist/commonjs/funcs/servingTenantsGetOrganizationDeletion.d.ts.map +1 -1
  20. package/dist/commonjs/funcs/servingTenantsGetOrganizationDeletion.js +3 -1
  21. package/dist/commonjs/funcs/servingTenantsGetOrganizationDeletion.js.map +1 -1
  22. package/dist/commonjs/funcs/servingTenantsList.d.ts +3 -1
  23. package/dist/commonjs/funcs/servingTenantsList.d.ts.map +1 -1
  24. package/dist/commonjs/funcs/servingTenantsList.js +3 -1
  25. package/dist/commonjs/funcs/servingTenantsList.js.map +1 -1
  26. package/dist/commonjs/funcs/servingTenantsSet.d.ts +3 -1
  27. package/dist/commonjs/funcs/servingTenantsSet.d.ts.map +1 -1
  28. package/dist/commonjs/funcs/servingTenantsSet.js +3 -1
  29. package/dist/commonjs/funcs/servingTenantsSet.js.map +1 -1
  30. package/dist/commonjs/lib/config.d.ts +2 -2
  31. package/dist/commonjs/lib/config.js +2 -2
  32. package/dist/commonjs/mcp-server/mcp-server.js +1 -1
  33. package/dist/commonjs/mcp-server/server.d.ts.map +1 -1
  34. package/dist/commonjs/mcp-server/server.js +3 -1
  35. package/dist/commonjs/mcp-server/server.js.map +1 -1
  36. package/dist/commonjs/mcp-server/tools/servingDatasetsCreate.js +1 -1
  37. package/dist/commonjs/mcp-server/tools/servingDatasetsCreate.js.map +1 -1
  38. package/dist/commonjs/mcp-server/tools/servingDatasetsUploadContent.d.ts +8 -0
  39. package/dist/commonjs/mcp-server/tools/servingDatasetsUploadContent.d.ts.map +1 -0
  40. package/dist/commonjs/mcp-server/tools/servingDatasetsUploadContent.js +64 -0
  41. package/dist/commonjs/mcp-server/tools/servingDatasetsUploadContent.js.map +1 -0
  42. package/dist/commonjs/mcp-server/tools/servingTenantsDeleteOrganization.js +1 -1
  43. package/dist/commonjs/mcp-server/tools/servingTenantsDeleteOrganization.js.map +1 -1
  44. package/dist/commonjs/mcp-server/tools/servingTenantsGet.js +1 -1
  45. package/dist/commonjs/mcp-server/tools/servingTenantsGet.js.map +1 -1
  46. package/dist/commonjs/mcp-server/tools/servingTenantsGetOrganizationDeletion.js +1 -1
  47. package/dist/commonjs/mcp-server/tools/servingTenantsGetOrganizationDeletion.js.map +1 -1
  48. package/dist/commonjs/mcp-server/tools/servingTenantsList.js +1 -1
  49. package/dist/commonjs/mcp-server/tools/servingTenantsList.js.map +1 -1
  50. package/dist/commonjs/mcp-server/tools/servingTenantsSet.js +1 -1
  51. package/dist/commonjs/mcp-server/tools/servingTenantsSet.js.map +1 -1
  52. package/dist/commonjs/models/components/acceleratortype.d.ts +5 -5
  53. package/dist/commonjs/models/components/acceleratortype.js +1 -1
  54. package/dist/commonjs/models/components/datasetupload.d.ts +22 -1
  55. package/dist/commonjs/models/components/datasetupload.d.ts.map +1 -1
  56. package/dist/commonjs/models/components/datasetupload.js +14 -1
  57. package/dist/commonjs/models/components/datasetupload.js.map +1 -1
  58. package/dist/commonjs/models/components/datasetuploadreceipt.d.ts +33 -0
  59. package/dist/commonjs/models/components/datasetuploadreceipt.d.ts.map +1 -0
  60. package/dist/commonjs/models/components/datasetuploadreceipt.js +71 -0
  61. package/dist/commonjs/models/components/datasetuploadreceipt.js.map +1 -0
  62. package/dist/commonjs/models/components/datasetuploadtarget.d.ts +6 -3
  63. package/dist/commonjs/models/components/datasetuploadtarget.d.ts.map +1 -1
  64. package/dist/commonjs/models/components/datasetuploadtarget.js +2 -2
  65. package/dist/commonjs/models/components/datasetuploadtarget.js.map +1 -1
  66. package/dist/commonjs/models/components/index.d.ts +1 -0
  67. package/dist/commonjs/models/components/index.d.ts.map +1 -1
  68. package/dist/commonjs/models/components/index.js +1 -0
  69. package/dist/commonjs/models/components/index.js.map +1 -1
  70. package/dist/commonjs/models/operations/index.d.ts +1 -0
  71. package/dist/commonjs/models/operations/index.d.ts.map +1 -1
  72. package/dist/commonjs/models/operations/index.js +1 -0
  73. package/dist/commonjs/models/operations/index.js.map +1 -1
  74. package/dist/commonjs/models/operations/uploadservingdatasetcontent.d.ts +24 -0
  75. package/dist/commonjs/models/operations/uploadservingdatasetcontent.d.ts.map +1 -0
  76. package/dist/commonjs/models/operations/uploadservingdatasetcontent.js +85 -0
  77. package/dist/commonjs/models/operations/uploadservingdatasetcontent.js.map +1 -0
  78. package/dist/commonjs/react-query/index.d.ts +1 -0
  79. package/dist/commonjs/react-query/index.d.ts.map +1 -1
  80. package/dist/commonjs/react-query/index.js +1 -0
  81. package/dist/commonjs/react-query/index.js.map +1 -1
  82. package/dist/commonjs/react-query/servingDatasetsCreate.d.ts +1 -1
  83. package/dist/commonjs/react-query/servingDatasetsCreate.js +1 -1
  84. package/dist/commonjs/react-query/servingDatasetsUploadContent.d.ts +30 -0
  85. package/dist/commonjs/react-query/servingDatasetsUploadContent.d.ts.map +1 -0
  86. package/dist/commonjs/react-query/servingDatasetsUploadContent.js +47 -0
  87. package/dist/commonjs/react-query/servingDatasetsUploadContent.js.map +1 -0
  88. package/dist/commonjs/react-query/servingTenantsDeleteOrganization.d.ts +3 -1
  89. package/dist/commonjs/react-query/servingTenantsDeleteOrganization.d.ts.map +1 -1
  90. package/dist/commonjs/react-query/servingTenantsDeleteOrganization.js +3 -1
  91. package/dist/commonjs/react-query/servingTenantsDeleteOrganization.js.map +1 -1
  92. package/dist/commonjs/react-query/servingTenantsGet.d.ts +6 -2
  93. package/dist/commonjs/react-query/servingTenantsGet.d.ts.map +1 -1
  94. package/dist/commonjs/react-query/servingTenantsGet.js +6 -2
  95. package/dist/commonjs/react-query/servingTenantsGet.js.map +1 -1
  96. package/dist/commonjs/react-query/servingTenantsGetOrganizationDeletion.d.ts +6 -2
  97. package/dist/commonjs/react-query/servingTenantsGetOrganizationDeletion.d.ts.map +1 -1
  98. package/dist/commonjs/react-query/servingTenantsGetOrganizationDeletion.js +6 -2
  99. package/dist/commonjs/react-query/servingTenantsGetOrganizationDeletion.js.map +1 -1
  100. package/dist/commonjs/react-query/servingTenantsList.d.ts +6 -2
  101. package/dist/commonjs/react-query/servingTenantsList.d.ts.map +1 -1
  102. package/dist/commonjs/react-query/servingTenantsList.js +6 -2
  103. package/dist/commonjs/react-query/servingTenantsList.js.map +1 -1
  104. package/dist/commonjs/react-query/servingTenantsSet.d.ts +3 -1
  105. package/dist/commonjs/react-query/servingTenantsSet.d.ts.map +1 -1
  106. package/dist/commonjs/react-query/servingTenantsSet.js +3 -1
  107. package/dist/commonjs/react-query/servingTenantsSet.js.map +1 -1
  108. package/dist/commonjs/sdk/datasets.d.ts +8 -1
  109. package/dist/commonjs/sdk/datasets.d.ts.map +1 -1
  110. package/dist/commonjs/sdk/datasets.js +11 -1
  111. package/dist/commonjs/sdk/datasets.js.map +1 -1
  112. package/dist/commonjs/sdk/tenants.d.ts +15 -5
  113. package/dist/commonjs/sdk/tenants.d.ts.map +1 -1
  114. package/dist/commonjs/sdk/tenants.js +15 -5
  115. package/dist/commonjs/sdk/tenants.js.map +1 -1
  116. package/dist/esm/funcs/servingDatasetsCreate.d.ts +1 -1
  117. package/dist/esm/funcs/servingDatasetsCreate.js +1 -1
  118. package/dist/esm/funcs/servingDatasetsUploadContent.d.ts +19 -0
  119. package/dist/esm/funcs/servingDatasetsUploadContent.d.ts.map +1 -0
  120. package/dist/esm/funcs/servingDatasetsUploadContent.js +103 -0
  121. package/dist/esm/funcs/servingDatasetsUploadContent.js.map +1 -0
  122. package/dist/esm/funcs/servingTenantsDeleteOrganization.d.ts +3 -1
  123. package/dist/esm/funcs/servingTenantsDeleteOrganization.d.ts.map +1 -1
  124. package/dist/esm/funcs/servingTenantsDeleteOrganization.js +3 -1
  125. package/dist/esm/funcs/servingTenantsDeleteOrganization.js.map +1 -1
  126. package/dist/esm/funcs/servingTenantsGet.d.ts +3 -1
  127. package/dist/esm/funcs/servingTenantsGet.d.ts.map +1 -1
  128. package/dist/esm/funcs/servingTenantsGet.js +3 -1
  129. package/dist/esm/funcs/servingTenantsGet.js.map +1 -1
  130. package/dist/esm/funcs/servingTenantsGetOrganizationDeletion.d.ts +3 -1
  131. package/dist/esm/funcs/servingTenantsGetOrganizationDeletion.d.ts.map +1 -1
  132. package/dist/esm/funcs/servingTenantsGetOrganizationDeletion.js +3 -1
  133. package/dist/esm/funcs/servingTenantsGetOrganizationDeletion.js.map +1 -1
  134. package/dist/esm/funcs/servingTenantsList.d.ts +3 -1
  135. package/dist/esm/funcs/servingTenantsList.d.ts.map +1 -1
  136. package/dist/esm/funcs/servingTenantsList.js +3 -1
  137. package/dist/esm/funcs/servingTenantsList.js.map +1 -1
  138. package/dist/esm/funcs/servingTenantsSet.d.ts +3 -1
  139. package/dist/esm/funcs/servingTenantsSet.d.ts.map +1 -1
  140. package/dist/esm/funcs/servingTenantsSet.js +3 -1
  141. package/dist/esm/funcs/servingTenantsSet.js.map +1 -1
  142. package/dist/esm/lib/config.d.ts +2 -2
  143. package/dist/esm/lib/config.js +2 -2
  144. package/dist/esm/mcp-server/mcp-server.js +1 -1
  145. package/dist/esm/mcp-server/server.d.ts.map +1 -1
  146. package/dist/esm/mcp-server/server.js +3 -1
  147. package/dist/esm/mcp-server/server.js.map +1 -1
  148. package/dist/esm/mcp-server/tools/servingDatasetsCreate.js +1 -1
  149. package/dist/esm/mcp-server/tools/servingDatasetsCreate.js.map +1 -1
  150. package/dist/esm/mcp-server/tools/servingDatasetsUploadContent.d.ts +8 -0
  151. package/dist/esm/mcp-server/tools/servingDatasetsUploadContent.d.ts.map +1 -0
  152. package/dist/esm/mcp-server/tools/servingDatasetsUploadContent.js +28 -0
  153. package/dist/esm/mcp-server/tools/servingDatasetsUploadContent.js.map +1 -0
  154. package/dist/esm/mcp-server/tools/servingTenantsDeleteOrganization.js +1 -1
  155. package/dist/esm/mcp-server/tools/servingTenantsDeleteOrganization.js.map +1 -1
  156. package/dist/esm/mcp-server/tools/servingTenantsGet.js +1 -1
  157. package/dist/esm/mcp-server/tools/servingTenantsGet.js.map +1 -1
  158. package/dist/esm/mcp-server/tools/servingTenantsGetOrganizationDeletion.js +1 -1
  159. package/dist/esm/mcp-server/tools/servingTenantsGetOrganizationDeletion.js.map +1 -1
  160. package/dist/esm/mcp-server/tools/servingTenantsList.js +1 -1
  161. package/dist/esm/mcp-server/tools/servingTenantsList.js.map +1 -1
  162. package/dist/esm/mcp-server/tools/servingTenantsSet.js +1 -1
  163. package/dist/esm/mcp-server/tools/servingTenantsSet.js.map +1 -1
  164. package/dist/esm/models/components/acceleratortype.d.ts +5 -5
  165. package/dist/esm/models/components/acceleratortype.js +1 -1
  166. package/dist/esm/models/components/datasetupload.d.ts +22 -1
  167. package/dist/esm/models/components/datasetupload.d.ts.map +1 -1
  168. package/dist/esm/models/components/datasetupload.js +13 -0
  169. package/dist/esm/models/components/datasetupload.js.map +1 -1
  170. package/dist/esm/models/components/datasetuploadreceipt.d.ts +33 -0
  171. package/dist/esm/models/components/datasetuploadreceipt.d.ts.map +1 -0
  172. package/dist/esm/models/components/datasetuploadreceipt.js +33 -0
  173. package/dist/esm/models/components/datasetuploadreceipt.js.map +1 -0
  174. package/dist/esm/models/components/datasetuploadtarget.d.ts +6 -3
  175. package/dist/esm/models/components/datasetuploadtarget.d.ts.map +1 -1
  176. package/dist/esm/models/components/datasetuploadtarget.js +2 -2
  177. package/dist/esm/models/components/datasetuploadtarget.js.map +1 -1
  178. package/dist/esm/models/components/index.d.ts +1 -0
  179. package/dist/esm/models/components/index.d.ts.map +1 -1
  180. package/dist/esm/models/components/index.js +1 -0
  181. package/dist/esm/models/components/index.js.map +1 -1
  182. package/dist/esm/models/operations/index.d.ts +1 -0
  183. package/dist/esm/models/operations/index.d.ts.map +1 -1
  184. package/dist/esm/models/operations/index.js +1 -0
  185. package/dist/esm/models/operations/index.js.map +1 -1
  186. package/dist/esm/models/operations/uploadservingdatasetcontent.d.ts +24 -0
  187. package/dist/esm/models/operations/uploadservingdatasetcontent.d.ts.map +1 -0
  188. package/dist/esm/models/operations/uploadservingdatasetcontent.js +47 -0
  189. package/dist/esm/models/operations/uploadservingdatasetcontent.js.map +1 -0
  190. package/dist/esm/react-query/index.d.ts +1 -0
  191. package/dist/esm/react-query/index.d.ts.map +1 -1
  192. package/dist/esm/react-query/index.js +1 -0
  193. package/dist/esm/react-query/index.js.map +1 -1
  194. package/dist/esm/react-query/servingDatasetsCreate.d.ts +1 -1
  195. package/dist/esm/react-query/servingDatasetsCreate.js +1 -1
  196. package/dist/esm/react-query/servingDatasetsUploadContent.d.ts +30 -0
  197. package/dist/esm/react-query/servingDatasetsUploadContent.d.ts.map +1 -0
  198. package/dist/esm/react-query/servingDatasetsUploadContent.js +42 -0
  199. package/dist/esm/react-query/servingDatasetsUploadContent.js.map +1 -0
  200. package/dist/esm/react-query/servingTenantsDeleteOrganization.d.ts +3 -1
  201. package/dist/esm/react-query/servingTenantsDeleteOrganization.d.ts.map +1 -1
  202. package/dist/esm/react-query/servingTenantsDeleteOrganization.js +3 -1
  203. package/dist/esm/react-query/servingTenantsDeleteOrganization.js.map +1 -1
  204. package/dist/esm/react-query/servingTenantsGet.d.ts +6 -2
  205. package/dist/esm/react-query/servingTenantsGet.d.ts.map +1 -1
  206. package/dist/esm/react-query/servingTenantsGet.js +6 -2
  207. package/dist/esm/react-query/servingTenantsGet.js.map +1 -1
  208. package/dist/esm/react-query/servingTenantsGetOrganizationDeletion.d.ts +6 -2
  209. package/dist/esm/react-query/servingTenantsGetOrganizationDeletion.d.ts.map +1 -1
  210. package/dist/esm/react-query/servingTenantsGetOrganizationDeletion.js +6 -2
  211. package/dist/esm/react-query/servingTenantsGetOrganizationDeletion.js.map +1 -1
  212. package/dist/esm/react-query/servingTenantsList.d.ts +6 -2
  213. package/dist/esm/react-query/servingTenantsList.d.ts.map +1 -1
  214. package/dist/esm/react-query/servingTenantsList.js +6 -2
  215. package/dist/esm/react-query/servingTenantsList.js.map +1 -1
  216. package/dist/esm/react-query/servingTenantsSet.d.ts +3 -1
  217. package/dist/esm/react-query/servingTenantsSet.d.ts.map +1 -1
  218. package/dist/esm/react-query/servingTenantsSet.js +3 -1
  219. package/dist/esm/react-query/servingTenantsSet.js.map +1 -1
  220. package/dist/esm/sdk/datasets.d.ts +8 -1
  221. package/dist/esm/sdk/datasets.d.ts.map +1 -1
  222. package/dist/esm/sdk/datasets.js +11 -1
  223. package/dist/esm/sdk/datasets.js.map +1 -1
  224. package/dist/esm/sdk/tenants.d.ts +15 -5
  225. package/dist/esm/sdk/tenants.d.ts.map +1 -1
  226. package/dist/esm/sdk/tenants.js +15 -5
  227. package/dist/esm/sdk/tenants.js.map +1 -1
  228. package/jsr.json +1 -1
  229. package/package.json +1 -1
  230. package/src/funcs/servingDatasetsCreate.ts +1 -1
  231. package/src/funcs/servingDatasetsUploadContent.ts +202 -0
  232. package/src/funcs/servingTenantsDeleteOrganization.ts +3 -1
  233. package/src/funcs/servingTenantsGet.ts +3 -1
  234. package/src/funcs/servingTenantsGetOrganizationDeletion.ts +3 -1
  235. package/src/funcs/servingTenantsList.ts +3 -1
  236. package/src/funcs/servingTenantsSet.ts +3 -1
  237. package/src/lib/config.ts +2 -2
  238. package/src/mcp-server/mcp-server.ts +1 -1
  239. package/src/mcp-server/server.ts +3 -1
  240. package/src/mcp-server/tools/servingDatasetsCreate.ts +1 -1
  241. package/src/mcp-server/tools/servingDatasetsUploadContent.ts +37 -0
  242. package/src/mcp-server/tools/servingTenantsDeleteOrganization.ts +1 -1
  243. package/src/mcp-server/tools/servingTenantsGet.ts +1 -1
  244. package/src/mcp-server/tools/servingTenantsGetOrganizationDeletion.ts +1 -1
  245. package/src/mcp-server/tools/servingTenantsList.ts +1 -1
  246. package/src/mcp-server/tools/servingTenantsSet.ts +1 -1
  247. package/src/models/components/acceleratortype.ts +5 -5
  248. package/src/models/components/datasetupload.ts +30 -1
  249. package/src/models/components/datasetuploadreceipt.ts +80 -0
  250. package/src/models/components/datasetuploadtarget.ts +10 -5
  251. package/src/models/components/index.ts +1 -0
  252. package/src/models/operations/index.ts +1 -0
  253. package/src/models/operations/uploadservingdatasetcontent.ts +88 -0
  254. package/src/react-query/index.ts +1 -0
  255. package/src/react-query/servingDatasetsCreate.ts +1 -1
  256. package/src/react-query/servingDatasetsUploadContent.ts +113 -0
  257. package/src/react-query/servingTenantsDeleteOrganization.ts +3 -1
  258. package/src/react-query/servingTenantsGet.ts +6 -2
  259. package/src/react-query/servingTenantsGetOrganizationDeletion.ts +6 -2
  260. package/src/react-query/servingTenantsList.ts +6 -2
  261. package/src/react-query/servingTenantsSet.ts +3 -1
  262. package/src/sdk/datasets.ts +19 -1
  263. package/src/sdk/tenants.ts +15 -5
@@ -0,0 +1,202 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { SDKCore } from "../core.js";
6
+ import { encodeSimple } from "../lib/encodings.js";
7
+ import { matchStatusCode } from "../lib/http.js";
8
+ import * as M from "../lib/matchers.js";
9
+ import { compactMap } from "../lib/primitives.js";
10
+ import { safeParse } from "../lib/schemas.js";
11
+ import { RequestOptions } from "../lib/sdks.js";
12
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
13
+ import { pathToFunc } from "../lib/url.js";
14
+ import * as components from "../models/components/index.js";
15
+ import {
16
+ ConnectionError,
17
+ InvalidRequestError,
18
+ RequestAbortedError,
19
+ RequestTimeoutError,
20
+ UnexpectedClientError,
21
+ } from "../models/errors/httpclienterrors.js";
22
+ import * as errors from "../models/errors/index.js";
23
+ import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
24
+ import { SDKError } from "../models/errors/sdkerror.js";
25
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
26
+ import * as operations from "../models/operations/index.js";
27
+ import { APICall, APIPromise } from "../types/async.js";
28
+ import { Result } from "../types/fp.js";
29
+
30
+ /**
31
+ * Upload dataset content through the API
32
+ *
33
+ * @remarks
34
+ * Stream the raw dataset bytes through the serving API into the dataset's object storage. Valid only while the dataset is `pending_upload`; repeating the upload before commit overwrites the previous bytes. The response receipt carries the stored size and SHA-256 digest so the client can verify the bytes before calling commit. Uploads are capped by the cluster's configured maximum dataset size.
35
+ */
36
+ export function servingDatasetsUploadContent(
37
+ client: SDKCore,
38
+ request: operations.UploadServingDatasetContentRequest,
39
+ options?: RequestOptions,
40
+ ): APIPromise<
41
+ Result<
42
+ components.DatasetUploadReceipt,
43
+ | errors.ServingError
44
+ | errors.ServingHTTPValidationError
45
+ | SDKError
46
+ | ResponseValidationError
47
+ | ConnectionError
48
+ | RequestAbortedError
49
+ | RequestTimeoutError
50
+ | InvalidRequestError
51
+ | UnexpectedClientError
52
+ | SDKValidationError
53
+ >
54
+ > {
55
+ return new APIPromise($do(
56
+ client,
57
+ request,
58
+ options,
59
+ ));
60
+ }
61
+
62
+ async function $do(
63
+ client: SDKCore,
64
+ request: operations.UploadServingDatasetContentRequest,
65
+ options?: RequestOptions,
66
+ ): Promise<
67
+ [
68
+ Result<
69
+ components.DatasetUploadReceipt,
70
+ | errors.ServingError
71
+ | errors.ServingHTTPValidationError
72
+ | SDKError
73
+ | ResponseValidationError
74
+ | ConnectionError
75
+ | RequestAbortedError
76
+ | RequestTimeoutError
77
+ | InvalidRequestError
78
+ | UnexpectedClientError
79
+ | SDKValidationError
80
+ >,
81
+ APICall,
82
+ ]
83
+ > {
84
+ const parsed = safeParse(
85
+ request,
86
+ (value) =>
87
+ operations.UploadServingDatasetContentRequest$outboundSchema.parse(value),
88
+ "Input validation failed",
89
+ );
90
+ if (!parsed.ok) {
91
+ return [parsed, { status: "invalid" }];
92
+ }
93
+ const payload = parsed.value;
94
+ const body = payload.RequestBody instanceof Uint8Array
95
+ ? new Uint8Array(payload.RequestBody).buffer
96
+ : payload.RequestBody;
97
+
98
+ const pathParams = {
99
+ dataset_id: encodeSimple("dataset_id", payload.dataset_id, {
100
+ explode: false,
101
+ charEncoding: "percent",
102
+ }),
103
+ };
104
+ const path = pathToFunc("/api/v1/serving/datasets/{dataset_id}/content")(
105
+ pathParams,
106
+ );
107
+
108
+ const headers = new Headers(compactMap({
109
+ "Content-Type": "application/octet-stream",
110
+ Accept: "application/json",
111
+ "X-On-Behalf-Of": encodeSimple(
112
+ "X-On-Behalf-Of",
113
+ payload["X-On-Behalf-Of"],
114
+ { explode: false, charEncoding: "none" },
115
+ ),
116
+ }));
117
+
118
+ const secConfig = await extractSecurity(client._options.bearerAuth);
119
+ const securityInput = secConfig == null ? {} : { bearerAuth: secConfig };
120
+ const requestSecurity = resolveGlobalSecurity(securityInput);
121
+
122
+ const context = {
123
+ options: client._options,
124
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
125
+ operationID: "uploadServingDatasetContent",
126
+ oAuth2Scopes: null,
127
+
128
+ resolvedSecurity: requestSecurity,
129
+
130
+ securitySource: client._options.bearerAuth,
131
+ retryConfig: options?.retries
132
+ || client._options.retryConfig
133
+ || {
134
+ strategy: "backoff",
135
+ backoff: {
136
+ initialInterval: 500,
137
+ maxInterval: 5000,
138
+ exponent: 1.5,
139
+ maxElapsedTime: 15000,
140
+ },
141
+ retryConnectionErrors: true,
142
+ }
143
+ || { strategy: "none" },
144
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
145
+ };
146
+
147
+ const requestRes = client._createRequest(context, {
148
+ security: requestSecurity,
149
+ method: "PUT",
150
+ baseURL: options?.serverURL,
151
+ path: path,
152
+ headers: headers,
153
+ body: body,
154
+ userAgent: client._options.userAgent,
155
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
156
+ }, options);
157
+ if (!requestRes.ok) {
158
+ return [requestRes, { status: "invalid" }];
159
+ }
160
+ const req = requestRes.value;
161
+
162
+ const doResult = await client._do(req, {
163
+ context,
164
+ isErrorStatusCode: (statusCode: number) =>
165
+ matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
166
+ retryConfig: context.retryConfig,
167
+ retryCodes: context.retryCodes,
168
+ });
169
+ if (!doResult.ok) {
170
+ return [doResult, { status: "request-error", request: req }];
171
+ }
172
+ const response = doResult.value;
173
+
174
+ const responseFields = {
175
+ HttpMeta: { Response: response, Request: req },
176
+ };
177
+
178
+ const [result] = await M.match<
179
+ components.DatasetUploadReceipt,
180
+ | errors.ServingError
181
+ | errors.ServingHTTPValidationError
182
+ | SDKError
183
+ | ResponseValidationError
184
+ | ConnectionError
185
+ | RequestAbortedError
186
+ | RequestTimeoutError
187
+ | InvalidRequestError
188
+ | UnexpectedClientError
189
+ | SDKValidationError
190
+ >(
191
+ M.json(200, components.DatasetUploadReceipt$inboundSchema),
192
+ M.jsonErr([403, 404, 409, 413], errors.ServingError$inboundSchema),
193
+ M.jsonErr(422, errors.ServingHTTPValidationError$inboundSchema),
194
+ M.fail([401, "4XX"]),
195
+ M.fail("5XX"),
196
+ )(response, req, { extraFields: responseFields });
197
+ if (!result.ok) {
198
+ return [result, { status: "complete", request: req, response }];
199
+ }
200
+
201
+ return [result, { status: "complete", request: req, response }];
202
+ }
@@ -31,7 +31,9 @@ import { Result } from "../types/fp.js";
31
31
  * Trigger organization deletion teardown
32
32
  *
33
33
  * @remarks
34
- * Durably records an organization.deleted.v1 event and starts (or adopts) the mandatory teardown cascade: the organization is fenced against new work and every deployment is tombstoned and wound down, while all pricing, budget, spend, and usage records are preserved. Idempotent by event id. Cluster administrators only.
34
+ * Durably records an organization.deleted.v1 event and starts (or adopts) the mandatory teardown cascade: the organization is fenced against new work and every deployment is tombstoned and wound down, while all pricing, budget, spend, and usage records are preserved. Idempotent by event id. Cluster administrators only. Deprecated: this operation has moved to the operator admin plane at `POST /api/v1/admin/tenants/{org_id}/deletion`. This path keeps working for one transition release (responses carry `Deprecation: true` and a `Link` successor header) and is removed from this document in the next SDK major.
35
+ *
36
+ * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.
35
37
  */
36
38
  export function servingTenantsDeleteOrganization(
37
39
  client: SDKCore,
@@ -31,7 +31,9 @@ import { Result } from "../types/fp.js";
31
31
  * Get a serving tenant
32
32
  *
33
33
  * @remarks
34
- * Get one organization's serving enablement record. Cluster administrators only.
34
+ * Get one organization's serving enablement record. Cluster administrators only. Deprecated: this operation has moved to the operator admin plane at `GET /api/v1/admin/tenants/{org_id}`. This path keeps working for one transition release (responses carry `Deprecation: true` and a `Link` successor header) and is removed from this document in the next SDK major.
35
+ *
36
+ * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.
35
37
  */
36
38
  export function servingTenantsGet(
37
39
  client: SDKCore,
@@ -31,7 +31,9 @@ import { Result } from "../types/fp.js";
31
31
  * Get organization deletion teardown state
32
32
  *
33
33
  * @remarks
34
- * Returns the durable teardown-cascade state for an organization (running or complete), so a cluster administrator can confirm offboarding progressed to completion. 404 if the organization has no teardown. Cluster administrators only.
34
+ * Returns the durable teardown-cascade state for an organization (running or complete), so a cluster administrator can confirm offboarding progressed to completion. 404 if the organization has no teardown. Cluster administrators only. Deprecated: this operation has moved to the operator admin plane at `GET /api/v1/admin/tenants/{org_id}/deletion`. This path keeps working for one transition release (responses carry `Deprecation: true` and a `Link` successor header) and is removed from this document in the next SDK major.
35
+ *
36
+ * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.
35
37
  */
36
38
  export function servingTenantsGetOrganizationDeletion(
37
39
  client: SDKCore,
@@ -31,7 +31,9 @@ import { Result } from "../types/fp.js";
31
31
  * List serving tenants
32
32
  *
33
33
  * @remarks
34
- * List organization-wide serving enablement records. Cluster administrators only; a missing organization is not provisioned.
34
+ * List organization-wide serving enablement records. Cluster administrators only; a missing organization is not provisioned. Deprecated: this operation has moved to the operator admin plane at `GET /api/v1/admin/tenants`. This path keeps working for one transition release (responses carry `Deprecation: true` and a `Link` successor header) and is removed from this document in the next SDK major.
35
+ *
36
+ * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.
35
37
  */
36
38
  export function servingTenantsList(
37
39
  client: SDKCore,
@@ -31,7 +31,9 @@ import { Result } from "../types/fp.js";
31
31
  * Set serving tenant enablement
32
32
  *
33
33
  * @remarks
34
- * Enable or disable serving for an organization and all of its teams. Disabling blocks product API access but does not stop existing workloads or callbacks. Cluster administrators only.
34
+ * Enable or disable serving for an organization and all of its teams. Disabling blocks product API access but does not stop existing workloads or callbacks. Cluster administrators only. Deprecated: this operation has moved to the operator admin plane at `PUT /api/v1/admin/tenants/{org_id}`. This path keeps working for one transition release (responses carry `Deprecation: true` and a `Link` successor header) and is removed from this document in the next SDK major.
35
+ *
36
+ * @deprecated method: This will be removed in a future release, please migrate away from it as soon as possible.
35
37
  */
36
38
  export function servingTenantsSet(
37
39
  client: SDKCore,
package/src/lib/config.ts CHANGED
@@ -65,7 +65,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
65
65
  export const SDK_METADATA = {
66
66
  language: "typescript",
67
67
  openapiDocVersion: "1.1.0",
68
- sdkVersion: "0.51.20",
68
+ sdkVersion: "0.51.22",
69
69
  genVersion: "2.924.0",
70
- userAgent: "speakeasy-sdk/typescript 0.51.20 2.924.0 1.1.0 @meetkai/mka1",
70
+ userAgent: "speakeasy-sdk/typescript 0.51.22 2.924.0 1.1.0 @meetkai/mka1",
71
71
  } as const;
@@ -19,7 +19,7 @@ const routes = buildRouteMap({
19
19
  export const app = buildApplication(routes, {
20
20
  name: "mcp",
21
21
  versionInfo: {
22
- currentVersion: "0.51.20",
22
+ currentVersion: "0.51.22",
23
23
  },
24
24
  });
25
25
 
@@ -308,6 +308,7 @@ import { tool$servingDatasetsCreate } from "./tools/servingDatasetsCreate.js";
308
308
  import { tool$servingDatasetsDelete } from "./tools/servingDatasetsDelete.js";
309
309
  import { tool$servingDatasetsGet } from "./tools/servingDatasetsGet.js";
310
310
  import { tool$servingDatasetsList } from "./tools/servingDatasetsList.js";
311
+ import { tool$servingDatasetsUploadContent } from "./tools/servingDatasetsUploadContent.js";
311
312
  import { tool$servingDeploymentsCreate } from "./tools/servingDeploymentsCreate.js";
312
313
  import { tool$servingDeploymentsDelete } from "./tools/servingDeploymentsDelete.js";
313
314
  import { tool$servingDeploymentsDeregister } from "./tools/servingDeploymentsDeregister.js";
@@ -370,7 +371,7 @@ export function createMCPServer(deps: {
370
371
  }) {
371
372
  const server = new McpServer({
372
373
  name: "SDK",
373
- version: "0.51.20",
374
+ version: "0.51.22",
374
375
  });
375
376
 
376
377
  const client = new SDKCore({
@@ -697,6 +698,7 @@ export function createMCPServer(deps: {
697
698
  tool(tool$servingDatasetsDelete);
698
699
  tool(tool$servingDatasetsGet);
699
700
  tool(tool$servingDatasetsCommit);
701
+ tool(tool$servingDatasetsUploadContent);
700
702
  tool(tool$servingDeploymentsList);
701
703
  tool(tool$servingDeploymentsCreate);
702
704
  tool(tool$servingDeploymentsDelete);
@@ -14,7 +14,7 @@ export const tool$servingDatasetsCreate: ToolDefinition<typeof args> = {
14
14
  name: "serving-datasets-create",
15
15
  description: `Register or begin uploading a dataset
16
16
 
17
- Register a dataset by reference (\`source\`: an external dataset reference passed to the trainer as-is, or a \`repo://{repo}[@{revision}][/{path}]\` reference reserved for the versioned dataset store) — the dataset is \`ready\` immediately. Omit \`source\` to upload instead: the response is \`pending_upload\` and carries an \`upload\` block of presigned PUT targets; PUT the data, then call commit to seal the immutable manifest.`,
17
+ Register a dataset by reference (\`source\`: an external dataset reference passed to the trainer as-is, or a \`repo://{repo}[@{revision}][/{path}]\` reference reserved for the versioned dataset store) — the dataset is \`ready\` immediately. Omit \`source\` to upload instead: the response is \`pending_upload\` and carries an \`upload\` block describing where to PUT the data. When the artifact store is not internet-exposed (the default posture) the block is \`mode: api\` and the target is the API upload path; when a public artifact endpoint is configured it is \`mode: presigned\` with time-bounded presigned PUT URLs. PUT the data, then call commit to seal the immutable manifest.`,
18
18
  args,
19
19
  tool: async (client, args, ctx) => {
20
20
  const [result, apiCall] = await servingDatasetsCreate(
@@ -0,0 +1,37 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { servingDatasetsUploadContent } from "../../funcs/servingDatasetsUploadContent.js";
6
+ import * as operations from "../../models/operations/index.js";
7
+ import { formatResult, ToolDefinition } from "../tools.js";
8
+
9
+ const args = {
10
+ request: operations.UploadServingDatasetContentRequest$inboundSchema,
11
+ };
12
+
13
+ export const tool$servingDatasetsUploadContent: ToolDefinition<typeof args> = {
14
+ name: "serving-datasets-upload-content",
15
+ description: `Upload dataset content through the API
16
+
17
+ Stream the raw dataset bytes through the serving API into the dataset's object storage. Valid only while the dataset is \`pending_upload\`; repeating the upload before commit overwrites the previous bytes. The response receipt carries the stored size and SHA-256 digest so the client can verify the bytes before calling commit. Uploads are capped by the cluster's configured maximum dataset size.`,
18
+ args,
19
+ tool: async (client, args, ctx) => {
20
+ const [result, apiCall] = await servingDatasetsUploadContent(
21
+ client,
22
+ args.request,
23
+ { fetchOptions: { signal: ctx.signal } },
24
+ ).$inspect();
25
+
26
+ if (!result.ok) {
27
+ return {
28
+ content: [{ type: "text", text: result.error.message }],
29
+ isError: true,
30
+ };
31
+ }
32
+
33
+ const value = result.value;
34
+
35
+ return formatResult(value, apiCall);
36
+ },
37
+ };
@@ -16,7 +16,7 @@ export const tool$servingTenantsDeleteOrganization: ToolDefinition<
16
16
  name: "serving-tenants-delete-organization",
17
17
  description: `Trigger organization deletion teardown
18
18
 
19
- Durably records an organization.deleted.v1 event and starts (or adopts) the mandatory teardown cascade: the organization is fenced against new work and every deployment is tombstoned and wound down, while all pricing, budget, spend, and usage records are preserved. Idempotent by event id. Cluster administrators only.`,
19
+ Durably records an organization.deleted.v1 event and starts (or adopts) the mandatory teardown cascade: the organization is fenced against new work and every deployment is tombstoned and wound down, while all pricing, budget, spend, and usage records are preserved. Idempotent by event id. Cluster administrators only. Deprecated: this operation has moved to the operator admin plane at \`POST /api/v1/admin/tenants/{org_id}/deletion\`. This path keeps working for one transition release (responses carry \`Deprecation: true\` and a \`Link\` successor header) and is removed from this document in the next SDK major.`,
20
20
  args,
21
21
  tool: async (client, args, ctx) => {
22
22
  const [result, apiCall] = await servingTenantsDeleteOrganization(
@@ -14,7 +14,7 @@ export const tool$servingTenantsGet: ToolDefinition<typeof args> = {
14
14
  name: "serving-tenants-get",
15
15
  description: `Get a serving tenant
16
16
 
17
- Get one organization's serving enablement record. Cluster administrators only.`,
17
+ Get one organization's serving enablement record. Cluster administrators only. Deprecated: this operation has moved to the operator admin plane at \`GET /api/v1/admin/tenants/{org_id}\`. This path keeps working for one transition release (responses carry \`Deprecation: true\` and a \`Link\` successor header) and is removed from this document in the next SDK major.`,
18
18
  args,
19
19
  tool: async (client, args, ctx) => {
20
20
  const [result, apiCall] = await servingTenantsGet(
@@ -16,7 +16,7 @@ export const tool$servingTenantsGetOrganizationDeletion: ToolDefinition<
16
16
  name: "serving-tenants-get-organization-deletion",
17
17
  description: `Get organization deletion teardown state
18
18
 
19
- Returns the durable teardown-cascade state for an organization (running or complete), so a cluster administrator can confirm offboarding progressed to completion. 404 if the organization has no teardown. Cluster administrators only.`,
19
+ Returns the durable teardown-cascade state for an organization (running or complete), so a cluster administrator can confirm offboarding progressed to completion. 404 if the organization has no teardown. Cluster administrators only. Deprecated: this operation has moved to the operator admin plane at \`GET /api/v1/admin/tenants/{org_id}/deletion\`. This path keeps working for one transition release (responses carry \`Deprecation: true\` and a \`Link\` successor header) and is removed from this document in the next SDK major.`,
20
20
  args,
21
21
  tool: async (client, args, ctx) => {
22
22
  const [result, apiCall] = await servingTenantsGetOrganizationDeletion(
@@ -14,7 +14,7 @@ export const tool$servingTenantsList: ToolDefinition<typeof args> = {
14
14
  name: "serving-tenants-list",
15
15
  description: `List serving tenants
16
16
 
17
- List organization-wide serving enablement records. Cluster administrators only; a missing organization is not provisioned.`,
17
+ List organization-wide serving enablement records. Cluster administrators only; a missing organization is not provisioned. Deprecated: this operation has moved to the operator admin plane at \`GET /api/v1/admin/tenants\`. This path keeps working for one transition release (responses carry \`Deprecation: true\` and a \`Link\` successor header) and is removed from this document in the next SDK major.`,
18
18
  args,
19
19
  tool: async (client, args, ctx) => {
20
20
  const [result, apiCall] = await servingTenantsList(
@@ -14,7 +14,7 @@ export const tool$servingTenantsSet: ToolDefinition<typeof args> = {
14
14
  name: "serving-tenants-set",
15
15
  description: `Set serving tenant enablement
16
16
 
17
- Enable or disable serving for an organization and all of its teams. Disabling blocks product API access but does not stop existing workloads or callbacks. Cluster administrators only.`,
17
+ Enable or disable serving for an organization and all of its teams. Disabling blocks product API access but does not stop existing workloads or callbacks. Cluster administrators only. Deprecated: this operation has moved to the operator admin plane at \`PUT /api/v1/admin/tenants/{org_id}\`. This path keeps working for one transition release (responses carry \`Deprecation: true\` and a \`Link\` successor header) and is removed from this document in the next SDK major.`,
18
18
  args,
19
19
  tool: async (client, args, ctx) => {
20
20
  const [result, apiCall] = await servingTenantsSet(
@@ -27,14 +27,14 @@ import {
27
27
  } from "./acquirability.js";
28
28
 
29
29
  /**
30
- * Coarse accelerator class. npu/tpu are reserved for future catalog entries.
30
+ * Coarse accelerator class. npu/tpu are reserved for future catalog entries. No cpu-class type is listed: CPU is a class, not an accelerator type, and cpu-class serving is requested through the deployment accelerator spec's class field rather than by naming a type here.
31
31
  */
32
32
  export const Class = {
33
33
  Gpu: "gpu",
34
34
  Cpu: "cpu",
35
35
  } as const;
36
36
  /**
37
- * Coarse accelerator class. npu/tpu are reserved for future catalog entries.
37
+ * Coarse accelerator class. npu/tpu are reserved for future catalog entries. No cpu-class type is listed: CPU is a class, not an accelerator type, and cpu-class serving is requested through the deployment accelerator spec's class field rather than by naming a type here.
38
38
  */
39
39
  export type Class = ClosedEnum<typeof Class>;
40
40
 
@@ -75,7 +75,7 @@ export type AcceleratorType = {
75
75
  */
76
76
  acquirableCount?: number | undefined;
77
77
  /**
78
- * Coarse accelerator class. npu/tpu are reserved for future catalog entries.
78
+ * Coarse accelerator class. npu/tpu are reserved for future catalog entries. No cpu-class type is listed: CPU is a class, not an accelerator type, and cpu-class serving is requested through the deployment accelerator spec's class field rather than by naming a type here.
79
79
  */
80
80
  class: Class;
81
81
  /**
@@ -85,11 +85,11 @@ export type AcceleratorType = {
85
85
  */
86
86
  kind?: Kind | undefined;
87
87
  /**
88
- * Max accelerators of this type per replica. For class cpu the unit is vCPUs: the maximum rentable vCPU count per replica.
88
+ * Max accelerators of this type per replica.
89
89
  */
90
90
  maxCount: number;
91
91
  /**
92
- * Per-accelerator memory in GB. Absent for class cpu: CPU capacity is sized per request (min_vcpus/min_mem_gb), not by a fixed module.
92
+ * Per-accelerator memory in GB. Absent for cpu-class entries, which have no fixed memory module.
93
93
  */
94
94
  memoryGb?: number | undefined;
95
95
  name: string;
@@ -4,6 +4,7 @@
4
4
 
5
5
  import * as z from "zod/v3";
6
6
  import { safeParse } from "../../lib/schemas.js";
7
+ import { ClosedEnum } from "../../types/enums.js";
7
8
  import { Result as SafeParseResult } from "../../types/fp.js";
8
9
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
10
  import {
@@ -14,22 +15,49 @@ import {
14
15
  } from "./datasetuploadtarget.js";
15
16
 
16
17
  /**
17
- * Presigned upload targets for an upload-mode dataset.
18
+ * How the targets are addressed: `api` (PUT through the serving API) or `presigned` (direct PUT to a presigned object-store URL).
19
+ */
20
+ export const DatasetUploadMode = {
21
+ Api: "api",
22
+ Presigned: "presigned",
23
+ } as const;
24
+ /**
25
+ * How the targets are addressed: `api` (PUT through the serving API) or `presigned` (direct PUT to a presigned object-store URL).
26
+ */
27
+ export type DatasetUploadMode = ClosedEnum<typeof DatasetUploadMode>;
28
+
29
+ /**
30
+ * Upload instructions for an upload-mode dataset. `mode` is `api` when the artifact store is not internet-exposed (the default posture): PUT the raw bytes to the API-relative `targets[].url` path. `mode` is `presigned` only when the cluster exposes a public artifact endpoint: targets carry time-bounded presigned URLs.
18
31
  */
19
32
  export type DatasetUpload = {
33
+ /**
34
+ * How the targets are addressed: `api` (PUT through the serving API) or `presigned` (direct PUT to a presigned object-store URL).
35
+ */
36
+ mode: DatasetUploadMode;
20
37
  targets: Array<DatasetUploadTarget>;
21
38
  };
22
39
 
40
+ /** @internal */
41
+ export const DatasetUploadMode$inboundSchema: z.ZodNativeEnum<
42
+ typeof DatasetUploadMode
43
+ > = z.nativeEnum(DatasetUploadMode);
44
+ /** @internal */
45
+ export const DatasetUploadMode$outboundSchema: z.ZodNativeEnum<
46
+ typeof DatasetUploadMode
47
+ > = DatasetUploadMode$inboundSchema;
48
+
23
49
  /** @internal */
24
50
  export const DatasetUpload$inboundSchema: z.ZodType<
25
51
  DatasetUpload,
26
52
  z.ZodTypeDef,
27
53
  unknown
28
54
  > = z.object({
55
+ mode: DatasetUploadMode$inboundSchema,
29
56
  targets: z.array(DatasetUploadTarget$inboundSchema),
30
57
  });
31
58
  /** @internal */
32
59
  export type DatasetUpload$Outbound = {
60
+ mode: string;
33
61
  targets: Array<DatasetUploadTarget$Outbound>;
34
62
  };
35
63
 
@@ -39,6 +67,7 @@ export const DatasetUpload$outboundSchema: z.ZodType<
39
67
  z.ZodTypeDef,
40
68
  DatasetUpload
41
69
  > = z.object({
70
+ mode: DatasetUploadMode$outboundSchema,
42
71
  targets: z.array(DatasetUploadTarget$outboundSchema),
43
72
  });
44
73
 
@@ -0,0 +1,80 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
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
+ /**
12
+ * Receipt for one dataset object streamed through the API upload endpoint.
13
+ */
14
+ export type DatasetUploadReceipt = {
15
+ /**
16
+ * The manifest object key the bytes were stored under.
17
+ */
18
+ key: string;
19
+ /**
20
+ * Hex SHA-256 digest computed while the upload streamed to the artifact store; verify it before committing.
21
+ */
22
+ sha256: string;
23
+ /**
24
+ * Number of bytes stored.
25
+ */
26
+ sizeBytes: number;
27
+ };
28
+
29
+ /** @internal */
30
+ export const DatasetUploadReceipt$inboundSchema: z.ZodType<
31
+ DatasetUploadReceipt,
32
+ z.ZodTypeDef,
33
+ unknown
34
+ > = z.object({
35
+ key: z.string(),
36
+ sha256: z.string(),
37
+ size_bytes: z.number().int(),
38
+ }).transform((v) => {
39
+ return remap$(v, {
40
+ "size_bytes": "sizeBytes",
41
+ });
42
+ });
43
+ /** @internal */
44
+ export type DatasetUploadReceipt$Outbound = {
45
+ key: string;
46
+ sha256: string;
47
+ size_bytes: number;
48
+ };
49
+
50
+ /** @internal */
51
+ export const DatasetUploadReceipt$outboundSchema: z.ZodType<
52
+ DatasetUploadReceipt$Outbound,
53
+ z.ZodTypeDef,
54
+ DatasetUploadReceipt
55
+ > = z.object({
56
+ key: z.string(),
57
+ sha256: z.string(),
58
+ sizeBytes: z.number().int(),
59
+ }).transform((v) => {
60
+ return remap$(v, {
61
+ sizeBytes: "size_bytes",
62
+ });
63
+ });
64
+
65
+ export function datasetUploadReceiptToJSON(
66
+ datasetUploadReceipt: DatasetUploadReceipt,
67
+ ): string {
68
+ return JSON.stringify(
69
+ DatasetUploadReceipt$outboundSchema.parse(datasetUploadReceipt),
70
+ );
71
+ }
72
+ export function datasetUploadReceiptFromJSON(
73
+ jsonString: string,
74
+ ): SafeParseResult<DatasetUploadReceipt, SDKValidationError> {
75
+ return safeParse(
76
+ jsonString,
77
+ (x) => DatasetUploadReceipt$inboundSchema.parse(JSON.parse(x)),
78
+ `Failed to parse 'DatasetUploadReceipt' from JSON`,
79
+ );
80
+ }
@@ -17,14 +17,17 @@ export type DatasetUploadTargetMethod = ClosedEnum<
17
17
  >;
18
18
 
19
19
  export type DatasetUploadTarget = {
20
- expiresAt: Date;
20
+ /**
21
+ * When a presigned target stops accepting uploads. Absent for `mode: api` targets, which remain valid while the dataset is `pending_upload`.
22
+ */
23
+ expiresAt?: Date | null | undefined;
21
24
  /**
22
25
  * The manifest object key this target uploads.
23
26
  */
24
27
  key: string;
25
28
  method: DatasetUploadTargetMethod;
26
29
  /**
27
- * Presigned URL to PUT the object bytes to.
30
+ * Where to PUT the object bytes: a presigned object-store URL (`mode: presigned`) or an API-relative path such as `/api/v1/serving/datasets/{dataset_id}/content` (`mode: api`).
28
31
  */
29
32
  url: string;
30
33
  };
@@ -44,7 +47,9 @@ export const DatasetUploadTarget$inboundSchema: z.ZodType<
44
47
  z.ZodTypeDef,
45
48
  unknown
46
49
  > = z.object({
47
- expires_at: z.string().datetime({ offset: true }).transform(v => new Date(v)),
50
+ expires_at: z.nullable(
51
+ z.string().datetime({ offset: true }).transform(v => new Date(v)),
52
+ ).optional(),
48
53
  key: z.string(),
49
54
  method: DatasetUploadTargetMethod$inboundSchema,
50
55
  url: z.string(),
@@ -55,7 +60,7 @@ export const DatasetUploadTarget$inboundSchema: z.ZodType<
55
60
  });
56
61
  /** @internal */
57
62
  export type DatasetUploadTarget$Outbound = {
58
- expires_at: string;
63
+ expires_at?: string | null | undefined;
59
64
  key: string;
60
65
  method: string;
61
66
  url: string;
@@ -67,7 +72,7 @@ export const DatasetUploadTarget$outboundSchema: z.ZodType<
67
72
  z.ZodTypeDef,
68
73
  DatasetUploadTarget
69
74
  > = z.object({
70
- expiresAt: z.date().transform(v => v.toISOString()),
75
+ expiresAt: z.nullable(z.date().transform(v => v.toISOString())).optional(),
71
76
  key: z.string(),
72
77
  method: DatasetUploadTargetMethod$outboundSchema,
73
78
  url: z.string(),
@@ -137,6 +137,7 @@ export * from "./datasetcreate.js";
137
137
  export * from "./datasetmanifest.js";
138
138
  export * from "./datasetmanifestobject.js";
139
139
  export * from "./datasetupload.js";
140
+ export * from "./datasetuploadreceipt.js";
140
141
  export * from "./datasetuploadtarget.js";
141
142
  export * from "./deactivateregistryentryresponse.js";
142
143
  export * from "./decideagentrunmcpapprovalrequest.js";