@keboola/api-client 36.0.0 → 40.0.0

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 (529) hide show
  1. package/AGENTS.md +133 -103
  2. package/API-SURFACE.md +36 -2
  3. package/CHANGELOG.md +194 -0
  4. package/README.md +22 -20
  5. package/dist/{ManagementClientAuthError-DD4u0EU7.cjs → ManagementClientAuthError-DE7lNGZQ.cjs} +3 -2
  6. package/dist/{ManagementClientAuthError-DD4u0EU7.cjs.map → ManagementClientAuthError-DE7lNGZQ.cjs.map} +1 -1
  7. package/dist/{ManagementClientAuthError-ey-f03vy.js → ManagementClientAuthError-H30lti_Q.js} +3 -2
  8. package/dist/{ManagementClientAuthError-ey-f03vy.js.map → ManagementClientAuthError-H30lti_Q.js.map} +1 -1
  9. package/dist/{ValidationError-CLVJCCwH.cjs → ValidationError-D65QU0uq.cjs} +10 -16
  10. package/dist/ValidationError-D65QU0uq.cjs.map +1 -0
  11. package/dist/ValidationError-DjhtNMfZ.js +42 -0
  12. package/dist/ValidationError-DjhtNMfZ.js.map +1 -0
  13. package/dist/ai/index.cjs +2 -2
  14. package/dist/ai/index.d.cts +2 -2
  15. package/dist/ai/index.d.ts +2 -2
  16. package/dist/ai/index.js +2 -2
  17. package/dist/ai/types.d.cts +1 -1
  18. package/dist/ai/types.d.ts +1 -1
  19. package/dist/{appLogs-BjfUoWzs.cjs → appLogs-B9zFJIuy.cjs} +2 -2
  20. package/dist/{appLogs-BjfUoWzs.cjs.map → appLogs-B9zFJIuy.cjs.map} +1 -1
  21. package/dist/{appLogs-xsVkTriU.js → appLogs-BBkkUOW1.js} +2 -2
  22. package/dist/{appLogs-xsVkTriU.js.map → appLogs-BBkkUOW1.js.map} +1 -1
  23. package/dist/{appLogs-Ch7DYpzx.d.ts → appLogs-BS6ViVGR.d.ts} +2 -2
  24. package/dist/{appLogs-D5A13Y0y.d.cts → appLogs-C9YlJ2g8.d.cts} +2 -2
  25. package/dist/apps/index.cjs +30 -56
  26. package/dist/apps/index.cjs.map +1 -1
  27. package/dist/apps/index.d.cts +8 -13
  28. package/dist/apps/index.d.ts +8 -13
  29. package/dist/apps/index.js +30 -56
  30. package/dist/apps/index.js.map +1 -1
  31. package/dist/apps/types.d.cts +2 -2
  32. package/dist/apps/types.d.ts +2 -2
  33. package/dist/assets/index.cjs +1 -1
  34. package/dist/assets/index.d.cts +1 -1
  35. package/dist/assets/index.d.ts +1 -1
  36. package/dist/assets/index.js +1 -1
  37. package/dist/auth/index.cjs +8 -4
  38. package/dist/auth/index.d.cts +2 -2
  39. package/dist/auth/index.d.ts +2 -2
  40. package/dist/auth/index.js +2 -2
  41. package/dist/auth/types.d.cts +2 -2
  42. package/dist/auth/types.d.ts +2 -2
  43. package/dist/{auth-JQ33o3nU.cjs → auth-Dm0F2rOh.cjs} +2 -2
  44. package/dist/{auth-JQ33o3nU.cjs.map → auth-Dm0F2rOh.cjs.map} +1 -1
  45. package/dist/{auth-aItmDu45.js → auth-DworfoPy.js} +2 -2
  46. package/dist/{auth-aItmDu45.js.map → auth-DworfoPy.js.map} +1 -1
  47. package/dist/{authClient-_PpvGgZJ.cjs → authClient-BmuUo0J4.cjs} +141 -48
  48. package/dist/authClient-BmuUo0J4.cjs.map +1 -0
  49. package/dist/{authClient-D8i3JTM-.d.ts → authClient-CHXWJ9x3.d.ts} +109 -76
  50. package/dist/{authClient-D7W9vWPR.js → authClient-CgcDGd30.js} +108 -39
  51. package/dist/authClient-CgcDGd30.js.map +1 -0
  52. package/dist/{authClient-CTHNs6Tq.d.cts → authClient-vEt_7_uk.d.cts} +109 -76
  53. package/dist/billing/index.cjs +2 -2
  54. package/dist/billing/index.d.cts +1 -1
  55. package/dist/billing/index.d.ts +1 -1
  56. package/dist/billing/index.js +2 -2
  57. package/dist/billing/types.d.cts +1 -1
  58. package/dist/billing/types.d.ts +1 -1
  59. package/dist/businessWorkspaceApi/index.cjs +3 -0
  60. package/dist/businessWorkspaceApi/index.d.cts +2 -0
  61. package/dist/businessWorkspaceApi/index.d.ts +2 -0
  62. package/dist/businessWorkspaceApi/index.js +2 -0
  63. package/dist/businessWorkspaceApi/types.cjs +0 -0
  64. package/dist/businessWorkspaceApi/types.d.cts +2 -0
  65. package/dist/businessWorkspaceApi/types.d.ts +2 -0
  66. package/dist/businessWorkspaceApi/types.js +1 -0
  67. package/dist/businessWorkspaceApi-6tCDdpnY.cjs +66 -0
  68. package/dist/businessWorkspaceApi-6tCDdpnY.cjs.map +1 -0
  69. package/dist/businessWorkspaceApi-BLUdefRF.js +61 -0
  70. package/dist/businessWorkspaceApi-BLUdefRF.js.map +1 -0
  71. package/dist/businessWorkspaceApiClient-BHDJlHFo.d.cts +529 -0
  72. package/dist/businessWorkspaceApiClient-DI-z1VIH.d.ts +529 -0
  73. package/dist/chat/index.cjs +9 -5
  74. package/dist/chat/index.cjs.map +1 -1
  75. package/dist/chat/index.d.cts +3 -3
  76. package/dist/chat/index.d.ts +3 -3
  77. package/dist/chat/index.js +9 -5
  78. package/dist/chat/index.js.map +1 -1
  79. package/dist/chat/types.cjs +1 -3
  80. package/dist/chat/types.cjs.map +1 -1
  81. package/dist/chat/types.d.cts +2 -2
  82. package/dist/chat/types.d.ts +2 -2
  83. package/dist/chat/types.js +1 -3
  84. package/dist/chat/types.js.map +1 -1
  85. package/dist/{componentId-DkyQ8PM0.cjs → componentId-57vjsa2i.cjs} +4 -2
  86. package/dist/{componentId-DkyQ8PM0.cjs.map → componentId-57vjsa2i.cjs.map} +1 -1
  87. package/dist/{componentId-vJz-kWs6.js → componentId-C6WZa_R1.js} +4 -2
  88. package/dist/{componentId-vJz-kWs6.js.map → componentId-C6WZa_R1.js.map} +1 -1
  89. package/dist/{concurrent-CH9fbNr3.js → concurrent-BacWxPwi.js} +5 -7
  90. package/dist/concurrent-BacWxPwi.js.map +1 -0
  91. package/dist/{concurrent-tbiIa0UL.cjs → concurrent-CdVfR1N5.cjs} +5 -7
  92. package/dist/concurrent-CdVfR1N5.cjs.map +1 -0
  93. package/dist/{configurations-VtNE0nrT.js → configurations-BPKGGy-M.js} +14 -22
  94. package/dist/configurations-BPKGGy-M.js.map +1 -0
  95. package/dist/{configurations-CyFF9Dtu.cjs → configurations-BTRHVSRq.cjs} +20 -53
  96. package/dist/configurations-BTRHVSRq.cjs.map +1 -0
  97. package/dist/{configurations-BVvcimzo.js → configurations-Chg_JwJ1.js} +20 -53
  98. package/dist/configurations-Chg_JwJ1.js.map +1 -0
  99. package/dist/{configurations-zkNjr73Q.cjs → configurations-IYyOvhI3.cjs} +14 -22
  100. package/dist/configurations-IYyOvhI3.cjs.map +1 -0
  101. package/dist/constants/index.cjs +2 -2
  102. package/dist/constants/index.d.cts +2 -2
  103. package/dist/constants/index.d.ts +2 -2
  104. package/dist/constants/index.js +2 -2
  105. package/dist/{constants-wfbFsqqN.js → constants-C2tYAJSj.js} +10 -1
  106. package/dist/constants-C2tYAJSj.js.map +1 -0
  107. package/dist/{constants-C4DlsF_M.cjs → constants-C6xku_Vx.cjs} +10 -1
  108. package/dist/constants-C6xku_Vx.cjs.map +1 -0
  109. package/dist/{createFetchClient-DgMiqTJ8.cjs → createFetchClient-Cwp8max9.cjs} +24 -5
  110. package/dist/createFetchClient-Cwp8max9.cjs.map +1 -0
  111. package/dist/{createFetchClient-U-ZrwPl2.js → createFetchClient-DXHQK63w.js} +24 -5
  112. package/dist/createFetchClient-DXHQK63w.js.map +1 -0
  113. package/dist/{createGenericFetchClient-rxvUUbap.js → createGenericFetchClient-Dg1rgzmG.js} +2 -2
  114. package/dist/{createGenericFetchClient-rxvUUbap.js.map → createGenericFetchClient-Dg1rgzmG.js.map} +1 -1
  115. package/dist/{createGenericFetchClient-o3cPJeRn.cjs → createGenericFetchClient-Dl9cqTvR.cjs} +2 -2
  116. package/dist/{createGenericFetchClient-o3cPJeRn.cjs.map → createGenericFetchClient-Dl9cqTvR.cjs.map} +1 -1
  117. package/dist/{createOpenapiFetchClient-DhUU3M1W.cjs → createOpenapiFetchClient-BYqW-9tm.cjs} +2 -2
  118. package/dist/{createOpenapiFetchClient-DhUU3M1W.cjs.map → createOpenapiFetchClient-BYqW-9tm.cjs.map} +1 -1
  119. package/dist/{createOpenapiFetchClient-BVSc9ibR.js → createOpenapiFetchClient-DZUOVupy.js} +2 -2
  120. package/dist/{createOpenapiFetchClient-BVSc9ibR.js.map → createOpenapiFetchClient-DZUOVupy.js.map} +1 -1
  121. package/dist/dataScience/index.cjs +2 -2
  122. package/dist/dataScience/index.d.cts +2 -2
  123. package/dist/dataScience/index.d.ts +2 -2
  124. package/dist/dataScience/index.js +2 -2
  125. package/dist/dataScience/types.d.cts +2 -2
  126. package/dist/dataScience/types.d.ts +2 -2
  127. package/dist/{dataScience-0Rl_EuV_.cjs → dataScience-B5QxZnvW.cjs} +5 -5
  128. package/dist/{dataScience-0Rl_EuV_.cjs.map → dataScience-B5QxZnvW.cjs.map} +1 -1
  129. package/dist/{dataScience-C1gO5zUn.js → dataScience-OXcwdk1p.js} +5 -5
  130. package/dist/{dataScience-C1gO5zUn.js.map → dataScience-OXcwdk1p.js.map} +1 -1
  131. package/dist/dedupe-Cky1gSUu.js +21 -0
  132. package/dist/dedupe-Cky1gSUu.js.map +1 -0
  133. package/dist/dedupe-OSnnst2u.cjs +26 -0
  134. package/dist/dedupe-OSnnst2u.cjs.map +1 -0
  135. package/dist/developerPortal/index.cjs +1 -1
  136. package/dist/developerPortal/index.d.cts +2 -2
  137. package/dist/developerPortal/index.d.ts +2 -2
  138. package/dist/developerPortal/index.js +1 -1
  139. package/dist/developerPortal/types.d.cts +1 -1
  140. package/dist/developerPortal/types.d.ts +1 -1
  141. package/dist/{developerPortalClient-C_48z8BN.js → developerPortalClient-B1QZ1rYi.js} +6 -8
  142. package/dist/{developerPortalClient-C_48z8BN.js.map → developerPortalClient-B1QZ1rYi.js.map} +1 -1
  143. package/dist/{developerPortalClient-ki0XS_OD.cjs → developerPortalClient-CLPpBksD.cjs} +6 -8
  144. package/dist/{developerPortalClient-ki0XS_OD.cjs.map → developerPortalClient-CLPpBksD.cjs.map} +1 -1
  145. package/dist/domain/permissions/index.cjs +9 -30
  146. package/dist/domain/permissions/index.cjs.map +1 -1
  147. package/dist/domain/permissions/index.d.cts +29 -102
  148. package/dist/domain/permissions/index.d.ts +29 -102
  149. package/dist/domain/permissions/index.js +9 -30
  150. package/dist/domain/permissions/index.js.map +1 -1
  151. package/dist/domain/storageTable/index.d.cts +1 -1
  152. package/dist/domain/storageTable/index.d.ts +1 -1
  153. package/dist/editor/index.cjs +2 -2
  154. package/dist/editor/index.cjs.map +1 -1
  155. package/dist/editor/index.d.cts +2 -2
  156. package/dist/editor/index.d.ts +2 -2
  157. package/dist/editor/index.js +2 -2
  158. package/dist/editor/index.js.map +1 -1
  159. package/dist/editor/types.d.cts +1 -1
  160. package/dist/editor/types.d.ts +1 -1
  161. package/dist/encryption/index.cjs +2 -22
  162. package/dist/encryption/index.cjs.map +1 -1
  163. package/dist/encryption/index.d.cts +1 -1
  164. package/dist/encryption/index.d.ts +1 -1
  165. package/dist/encryption/index.js +2 -22
  166. package/dist/encryption/index.js.map +1 -1
  167. package/dist/encryption/types.d.cts +1 -1
  168. package/dist/encryption/types.d.ts +1 -1
  169. package/dist/import/index.cjs +1 -1
  170. package/dist/import/index.d.cts +3 -3
  171. package/dist/import/index.d.ts +3 -3
  172. package/dist/import/index.js +1 -1
  173. package/dist/{import-C83w7BKz.cjs → import-CNk89mqy.cjs} +3 -3
  174. package/dist/{import-C83w7BKz.cjs.map → import-CNk89mqy.cjs.map} +1 -1
  175. package/dist/{import-CROEK82b.js → import-DiMQCzLa.js} +3 -3
  176. package/dist/{import-CROEK82b.js.map → import-DiMQCzLa.js.map} +1 -1
  177. package/dist/{index-DR4QqItd.d.cts → index--ZpnE3YT.d.cts} +3 -3
  178. package/dist/{index-C77vTm2K.d.ts → index-BDZvaRud.d.ts} +6 -6
  179. package/dist/{index-KuQ79Mnz.d.ts → index-BVhHt5lx.d.cts} +18 -26
  180. package/dist/{index-NC1dXRTD.d.ts → index-BfqkgPGI.d.cts} +7 -13
  181. package/dist/{index-NC1dXRTD.d.cts → index-BfqkgPGI.d.ts} +7 -13
  182. package/dist/{index-V7XKUQm9.d.cts → index-BgR5zcjJ.d.ts} +18 -26
  183. package/dist/{index-2JM0gyAf.d.ts → index-BkqackZf.d.ts} +439 -289
  184. package/dist/{index-BDG-LKXj.d.cts → index-ByRpNVcs.d.cts} +88 -18
  185. package/dist/{index-pXN4LWUX.d.ts → index-C11JSxBY.d.ts} +8 -11
  186. package/dist/{index-GjcJTCbz.d.cts → index-C4TNAA8-.d.cts} +8 -11
  187. package/dist/{index-NaYLwG_h.d.cts → index-C8gRRWHL.d.cts} +11 -1
  188. package/dist/{index-NaYLwG_h.d.ts → index-C8gRRWHL.d.ts} +11 -1
  189. package/dist/{index-3LUk2rpD.d.ts → index-CPu4Nezo.d.cts} +34 -9
  190. package/dist/{index-BMqLPS6S.d.ts → index-CXcWpZQ2.d.cts} +4 -12
  191. package/dist/{index-BMqLPS6S.d.cts → index-CXcWpZQ2.d.ts} +4 -12
  192. package/dist/{index-Dx52hNLP.d.cts → index-CcMHJcuP.d.cts} +3 -3
  193. package/dist/{index-BgLnWTZU.d.cts → index-Cvbjp3jx.d.cts} +6 -6
  194. package/dist/{index-DppA4k3b.d.cts → index-Cz0MXhzs.d.cts} +5 -5
  195. package/dist/{index-6Xe81qN3.d.ts → index-D-VMgpGc.d.ts} +5 -5
  196. package/dist/{index-D8rcUbnk.d.ts → index-D7-o-oGa.d.ts} +3 -3
  197. package/dist/{index-BXF-bs2d.d.ts → index-DCRKjihs.d.ts} +88 -18
  198. package/dist/{kaiAgentClient-DhTaM3GC.d.cts → index-DNThyEej.d.cts} +19 -5
  199. package/dist/{index-DXSmFkol.d.cts → index-DOAZmWvh.d.cts} +6 -6
  200. package/dist/{index-DIAyi-EZ.d.cts → index-DXYASsPP.d.cts} +439 -289
  201. package/dist/{index-BuegqrS1.d.ts → index-D_-4uQF8.d.ts} +3 -3
  202. package/dist/{index-CW3Pj7DY.d.cts → index-Dazy-meb.d.ts} +34 -9
  203. package/dist/{index-CqgtL2NU.d.ts → index-DnQTuc6t.d.ts} +6 -6
  204. package/dist/{kaiAgentClient-BJj_2aqt.d.ts → index-Qb7X6-ph.d.ts} +19 -5
  205. package/dist/index.cjs +1503 -895
  206. package/dist/index.cjs.map +1 -1
  207. package/dist/index.d.cts +7 -7
  208. package/dist/index.d.ts +7 -7
  209. package/dist/index.js +1501 -896
  210. package/dist/index.js.map +1 -1
  211. package/dist/isLoginPageRedirect-XPwAOKK3.js +14 -0
  212. package/dist/isLoginPageRedirect-XPwAOKK3.js.map +1 -0
  213. package/dist/isLoginPageRedirect-jQHiLrG7.cjs +19 -0
  214. package/dist/isLoginPageRedirect-jQHiLrG7.cjs.map +1 -0
  215. package/dist/{jobStatus-0_Y3Sr4i.cjs → jobStatus-BMlsyXWI.cjs} +19 -45
  216. package/dist/jobStatus-BMlsyXWI.cjs.map +1 -0
  217. package/dist/{jobStatus-PSZJMTiA.js → jobStatus-CfRtsIpv.js} +19 -45
  218. package/dist/jobStatus-CfRtsIpv.js.map +1 -0
  219. package/dist/kaiAgent/index.cjs +1 -1
  220. package/dist/kaiAgent/index.d.cts +3 -2
  221. package/dist/kaiAgent/index.d.ts +3 -2
  222. package/dist/kaiAgent/index.js +1 -1
  223. package/dist/kaiAgent/types.d.cts +2 -2
  224. package/dist/kaiAgent/types.d.ts +2 -2
  225. package/dist/{kaiAgent-8LNzGhZc.js → kaiAgent-Dp20HLTh.js} +63 -7
  226. package/dist/kaiAgent-Dp20HLTh.js.map +1 -0
  227. package/dist/{kaiAgent-B_TaUPRt.cjs → kaiAgent-QNoeVKPs.cjs} +63 -7
  228. package/dist/kaiAgent-QNoeVKPs.cjs.map +1 -0
  229. package/dist/kaiMemory-CClSPInt.cjs +289 -0
  230. package/dist/kaiMemory-CClSPInt.cjs.map +1 -0
  231. package/dist/kaiMemory-D0Y_16U4.js +260 -0
  232. package/dist/kaiMemory-D0Y_16U4.js.map +1 -0
  233. package/dist/management/index.cjs +1 -1
  234. package/dist/management/index.d.cts +2 -2
  235. package/dist/management/index.d.ts +2 -2
  236. package/dist/management/index.js +1 -1
  237. package/dist/management/types.d.cts +2 -2
  238. package/dist/management/types.d.ts +2 -2
  239. package/dist/{management-BoxlRNg2.cjs → management-CCY0IYnq.cjs} +93 -25
  240. package/dist/management-CCY0IYnq.cjs.map +1 -0
  241. package/dist/{management-Bp440RsV.js → management-DvmPiG64.js} +93 -25
  242. package/dist/management-DvmPiG64.js.map +1 -0
  243. package/dist/metastore/index.cjs +1 -1
  244. package/dist/metastore/index.d.cts +1 -1
  245. package/dist/metastore/index.d.ts +1 -1
  246. package/dist/metastore/index.js +1 -1
  247. package/dist/metastore/types.d.cts +2 -2
  248. package/dist/metastore/types.d.ts +2 -2
  249. package/dist/{metastore-VCDRVhUT.js → metastore-BycJxe7A.js} +14 -8
  250. package/dist/metastore-BycJxe7A.js.map +1 -0
  251. package/dist/{metastore-BYYWTb3m.cjs → metastore-XtWciCZT.cjs} +14 -8
  252. package/dist/metastore-XtWciCZT.cjs.map +1 -0
  253. package/dist/microsoftGraph/index.cjs +2 -2
  254. package/dist/microsoftGraph/index.d.cts +2 -2
  255. package/dist/microsoftGraph/index.d.ts +2 -2
  256. package/dist/microsoftGraph/index.js +2 -2
  257. package/dist/microsoftGraph/types.d.cts +1 -1
  258. package/dist/microsoftGraph/types.d.ts +1 -1
  259. package/dist/middleware-CBwrtgQd.js +34 -0
  260. package/dist/middleware-CBwrtgQd.js.map +1 -0
  261. package/dist/middleware-IjYx3d5u.cjs +45 -0
  262. package/dist/middleware-IjYx3d5u.cjs.map +1 -0
  263. package/dist/notifications/index.cjs +4 -4
  264. package/dist/notifications/index.d.cts +2 -2
  265. package/dist/notifications/index.d.ts +2 -2
  266. package/dist/notifications/index.js +4 -4
  267. package/dist/notifications/types.d.cts +1 -1
  268. package/dist/notifications/types.d.ts +1 -1
  269. package/dist/oauth/index.cjs +1 -1
  270. package/dist/oauth/index.d.cts +2 -2
  271. package/dist/oauth/index.d.ts +2 -2
  272. package/dist/oauth/index.js +1 -1
  273. package/dist/oauth/types.d.cts +1 -1
  274. package/dist/oauth/types.d.ts +1 -1
  275. package/dist/{oauth-B8yqG6Sy.cjs → oauth--2p8jkJf.cjs} +5 -5
  276. package/dist/{oauth-B8yqG6Sy.cjs.map → oauth--2p8jkJf.cjs.map} +1 -1
  277. package/dist/{oauth--asfePw-.js → oauth-l5zE39cD.js} +5 -5
  278. package/dist/{oauth--asfePw-.js.map → oauth-l5zE39cD.js.map} +1 -1
  279. package/dist/omnisearch/index.cjs +6 -14
  280. package/dist/omnisearch/index.cjs.map +1 -1
  281. package/dist/omnisearch/index.d.cts +6 -14
  282. package/dist/omnisearch/index.d.ts +6 -14
  283. package/dist/omnisearch/index.js +6 -14
  284. package/dist/omnisearch/index.js.map +1 -1
  285. package/dist/omnisearch/types.d.cts +1 -1
  286. package/dist/omnisearch/types.d.ts +1 -1
  287. package/dist/{project-C2wvX0xZ.d.ts → project-B15gStbM.d.ts} +2 -2
  288. package/dist/{project-hePfzUY0.d.cts → project-cHKuGvqJ.d.cts} +2 -2
  289. package/dist/queryService/index.cjs +1 -1
  290. package/dist/queryService/index.d.cts +1 -1
  291. package/dist/queryService/index.d.ts +1 -1
  292. package/dist/queryService/index.js +1 -1
  293. package/dist/queryService/types.d.cts +1 -1
  294. package/dist/queryService/types.d.ts +1 -1
  295. package/dist/{queryService-Ca65E5KH.js → queryService-CCOYbRbw.js} +6 -6
  296. package/dist/{queryService-Ca65E5KH.js.map → queryService-CCOYbRbw.js.map} +1 -1
  297. package/dist/{queryService-BVtjkXy1.cjs → queryService-CQzclHdL.cjs} +6 -6
  298. package/dist/{queryService-BVtjkXy1.cjs.map → queryService-CQzclHdL.cjs.map} +1 -1
  299. package/dist/queue/index.cjs +1 -1
  300. package/dist/queue/index.d.cts +3 -3
  301. package/dist/queue/index.d.ts +3 -3
  302. package/dist/queue/index.js +1 -1
  303. package/dist/queue/types.d.cts +1 -1
  304. package/dist/queue/types.d.ts +1 -1
  305. package/dist/{queue-DyotLFJi.js → queue-Cowbg6bR.js} +8 -11
  306. package/dist/queue-Cowbg6bR.js.map +1 -0
  307. package/dist/{queue-OJJUUqc2.cjs → queue-UG_BWKIC.cjs} +8 -11
  308. package/dist/queue-UG_BWKIC.cjs.map +1 -0
  309. package/dist/scheduler/index.cjs +4 -4
  310. package/dist/scheduler/index.d.cts +2 -2
  311. package/dist/scheduler/index.d.ts +2 -2
  312. package/dist/scheduler/index.js +4 -4
  313. package/dist/scheduler/types.d.cts +1 -1
  314. package/dist/scheduler/types.d.ts +1 -1
  315. package/dist/sdk/configurations/index.cjs +1 -1
  316. package/dist/sdk/configurations/index.d.cts +11 -11
  317. package/dist/sdk/configurations/index.d.ts +11 -11
  318. package/dist/sdk/configurations/index.js +1 -1
  319. package/dist/sdk/developerPortal/index.cjs +10 -18
  320. package/dist/sdk/developerPortal/index.cjs.map +1 -1
  321. package/dist/sdk/developerPortal/index.d.cts +7 -15
  322. package/dist/sdk/developerPortal/index.d.ts +7 -15
  323. package/dist/sdk/developerPortal/index.js +7 -15
  324. package/dist/sdk/developerPortal/index.js.map +1 -1
  325. package/dist/sdk/kaiMemory/index.cjs +7 -0
  326. package/dist/sdk/kaiMemory/index.d.cts +41 -0
  327. package/dist/sdk/kaiMemory/index.d.ts +41 -0
  328. package/dist/sdk/kaiMemory/index.js +2 -0
  329. package/dist/sdk/kaiMemory/types.cjs +0 -0
  330. package/dist/sdk/kaiMemory/types.d.cts +2 -0
  331. package/dist/sdk/kaiMemory/types.d.ts +2 -0
  332. package/dist/sdk/kaiMemory/types.js +1 -0
  333. package/dist/sdk/queryService/index.cjs +2 -2
  334. package/dist/sdk/queryService/index.d.cts +1 -1
  335. package/dist/sdk/queryService/index.d.ts +1 -1
  336. package/dist/sdk/queryService/index.js +2 -2
  337. package/dist/sdk/semanticLayer/index.cjs +1 -1
  338. package/dist/sdk/semanticLayer/index.d.cts +16 -40
  339. package/dist/sdk/semanticLayer/index.d.ts +16 -40
  340. package/dist/sdk/semanticLayer/index.js +1 -1
  341. package/dist/sdk/semanticLayer/types.d.cts +1 -1
  342. package/dist/sdk/semanticLayer/types.d.ts +1 -1
  343. package/dist/sdk/storage/index.cjs +0 -5
  344. package/dist/sdk/storage/index.cjs.map +1 -1
  345. package/dist/sdk/storage/index.d.cts +2 -2
  346. package/dist/sdk/storage/index.d.ts +2 -2
  347. package/dist/sdk/storage/index.js +1 -5
  348. package/dist/sdk/storage/index.js.map +1 -1
  349. package/dist/sdk/tag/index.cjs +1 -1
  350. package/dist/sdk/tag/index.d.cts +3 -3
  351. package/dist/sdk/tag/index.d.ts +3 -3
  352. package/dist/sdk/tag/index.js +1 -1
  353. package/dist/sdk/tag/types.d.cts +1 -1
  354. package/dist/sdk/tag/types.d.ts +1 -1
  355. package/dist/sdk/vault/index.cjs +1 -1
  356. package/dist/sdk/vault/index.d.cts +1 -1
  357. package/dist/sdk/vault/index.d.ts +1 -1
  358. package/dist/sdk/vault/index.js +1 -1
  359. package/dist/{semanticLayer-E0Vilu8u.cjs → semanticLayer-CKDVkU56.cjs} +78 -166
  360. package/dist/semanticLayer-CKDVkU56.cjs.map +1 -0
  361. package/dist/{semanticLayer-CSqmtHRo.js → semanticLayer-pYy082Ju.js} +78 -166
  362. package/dist/semanticLayer-pYy082Ju.js.map +1 -0
  363. package/dist/{serviceIds-DRcoTnSd.d.cts → serviceIds-DC-H6ZD9.d.cts} +2 -1
  364. package/dist/{serviceIds-DRcoTnSd.d.ts → serviceIds-DC-H6ZD9.d.ts} +2 -1
  365. package/dist/status/index.cjs +1 -1
  366. package/dist/status/index.d.cts +1 -1
  367. package/dist/status/index.d.ts +1 -1
  368. package/dist/status/index.js +1 -1
  369. package/dist/storage/index.cjs +6 -5
  370. package/dist/storage/index.d.cts +3 -3
  371. package/dist/storage/index.d.ts +3 -3
  372. package/dist/storage/index.js +6 -6
  373. package/dist/storage/types.d.cts +3 -3
  374. package/dist/storage/types.d.ts +3 -3
  375. package/dist/{storage-LYwFQPNO.js → storage-CZQHZcXG.js} +127 -289
  376. package/dist/storage-CZQHZcXG.js.map +1 -0
  377. package/dist/{storage-BKm7cztt.cjs → storage-JinL1y1s.cjs} +132 -288
  378. package/dist/storage-JinL1y1s.cjs.map +1 -0
  379. package/dist/stream/index.cjs +3 -3
  380. package/dist/stream/index.d.cts +2 -2
  381. package/dist/stream/index.d.ts +2 -2
  382. package/dist/stream/index.js +3 -3
  383. package/dist/stream/types.d.cts +1 -1
  384. package/dist/stream/types.d.ts +1 -1
  385. package/dist/syncActions/index.cjs +1 -1
  386. package/dist/syncActions/index.d.cts +1 -1
  387. package/dist/syncActions/index.d.ts +1 -1
  388. package/dist/syncActions/index.js +1 -1
  389. package/dist/syncActions/types.d.cts +2 -2
  390. package/dist/syncActions/types.d.ts +2 -2
  391. package/dist/{syncActions-QeBhIVhG.js → syncActions-BmmoqZO_.js} +130 -111
  392. package/dist/syncActions-BmmoqZO_.js.map +1 -0
  393. package/dist/{syncActions-OEZdVffK.cjs → syncActions-CtcLGQiy.cjs} +130 -111
  394. package/dist/syncActions-CtcLGQiy.cjs.map +1 -0
  395. package/dist/{tag-CsoOZWB_.cjs → tag-DHS_soa7.cjs} +2 -2
  396. package/dist/{tag-CsoOZWB_.cjs.map → tag-DHS_soa7.cjs.map} +1 -1
  397. package/dist/{tag-DCsoewjL.js → tag-hh-1nhNr.js} +2 -2
  398. package/dist/{tag-DCsoewjL.js.map → tag-hh-1nhNr.js.map} +1 -1
  399. package/dist/telemetry/index.cjs +7 -11
  400. package/dist/telemetry/index.cjs.map +1 -1
  401. package/dist/telemetry/index.d.cts +5 -9
  402. package/dist/telemetry/index.d.ts +5 -9
  403. package/dist/telemetry/index.js +7 -11
  404. package/dist/telemetry/index.js.map +1 -1
  405. package/dist/telemetry/types.d.cts +1 -1
  406. package/dist/telemetry/types.d.ts +1 -1
  407. package/dist/{types-DqxIx9Pi.d.cts → types-6kuMW4JW.d.cts} +2 -2
  408. package/dist/{types-Ct0YPy2w.d.ts → types-B2w2TtSA.d.ts} +3 -3
  409. package/dist/{types-M46WuBSm.d.cts → types-B61aCifg.d.cts} +2 -2
  410. package/dist/{types-COL1kVEB.d.cts → types-B8N_k79M.d.cts} +2 -2
  411. package/dist/{types-Jw10xuOW.d.cts → types-BIECJYun.d.ts} +171 -44
  412. package/dist/{types-DZk3XHiN.d.cts → types-BLNB882w.d.cts} +3 -3
  413. package/dist/{types-BEe50G2r.d.cts → types-BPy5Ozee.d.cts} +2 -2
  414. package/dist/{types-DBOSvWtD.d.ts → types-BS4jwuMi.d.ts} +8 -15
  415. package/dist/{types-BrYkBQo4.d.ts → types-BTK7Bv3n.d.cts} +171 -44
  416. package/dist/{types-CW6lCqrC.d.cts → types-BYM9Ptz5.d.ts} +93 -43
  417. package/dist/{types-D6UmMa6E.d.ts → types-BZDV8DZk.d.ts} +3 -3
  418. package/dist/{types-Cz83RiVu.d.cts → types-B_iLJlp4.d.ts} +255 -12
  419. package/dist/{types-DjrRmQUe.d.cts → types-BiMahEK8.d.cts} +92 -238
  420. package/dist/{types-BH5LLeJy.d.ts → types-Bl03Cg2n.d.cts} +255 -12
  421. package/dist/{types-bGQb4Jtl.d.cts → types-ByLH46Dt.d.cts} +13 -8
  422. package/dist/{types-g3vU7hcg.d.cts → types-Bydx6ga_.d.cts} +2 -2
  423. package/dist/{types-DYzJ6K2e.d.ts → types-CFeZCQ9p.d.cts} +93 -43
  424. package/dist/{types-DEc55spK.d.ts → types-CKmTZSPG.d.ts} +92 -238
  425. package/dist/{types-CaYtinmA.d.cts → types-CMzQSHAQ.d.cts} +3 -3
  426. package/dist/{types-N3EChotg.d.cts → types-CP_LBmw3.d.cts} +2 -2
  427. package/dist/{types-zZBxJ0P-.d.ts → types-CWyXTMwy.d.ts} +2 -2
  428. package/dist/{types-CPB-eF82.d.ts → types-CZJlLCbA.d.ts} +2 -2
  429. package/dist/{types-l9o4gFsI.d.ts → types-CZXPu3gn.d.ts} +2 -2
  430. package/dist/{types-BztF4HeB.d.ts → types-CaOtNjSZ.d.ts} +6 -13
  431. package/dist/{types-BTWIPEiU.d.ts → types-CfwqVkEA.d.ts} +2 -2
  432. package/dist/types-Cg14ncdV.d.ts +63 -0
  433. package/dist/{types-Bxhh2SJr.d.ts → types-CoJVrRAD.d.ts} +2 -2
  434. package/dist/{types-CKiW3n6v.d.ts → types-D3wcs4tp.d.ts} +2 -2
  435. package/dist/{types-DPS8nwkV.d.cts → types-DDOa07rU.d.cts} +8 -15
  436. package/dist/{types-BW2BXUB4.d.cts → types-DE9hgr7i.d.cts} +2 -2
  437. package/dist/{types-BOqD3Hqy.d.cts → types-DEzW1CfI.d.cts} +3 -3
  438. package/dist/{types-OaD-cbbl.d.ts → types-DIiOMV-t.d.ts} +3 -3
  439. package/dist/{types-BuqxXXYP.d.ts → types-DKc1gmd9.d.ts} +949 -190
  440. package/dist/{types-BQsOHNI0.d.ts → types-DRCMBt89.d.ts} +3 -3
  441. package/dist/{types-BQvv4RaI.d.cts → types-DUMal2E-.d.cts} +5 -8
  442. package/dist/types-DWiLcrxt.d.cts +63 -0
  443. package/dist/{types-DNxOHnZI.d.cts → types-Dd31Lw4S.d.cts} +2 -2
  444. package/dist/{types-Dmu-8g4O.d.ts → types-DekYAlA-.d.ts} +3 -3
  445. package/dist/{types-B2U9cFcx.d.ts → types-DgJeO9Nd.d.ts} +2 -2
  446. package/dist/{types-nrviNdzZ.d.ts → types-DicSaNwq.d.ts} +2 -2
  447. package/dist/{types-f8W_j6qD.d.cts → types-DinIJ1D_.d.cts} +688 -201
  448. package/dist/{types-DhDNS-5B.d.ts → types-DlQw6FCi.d.ts} +13 -8
  449. package/dist/{types-_RhBCj4_.d.cts → types-DoZtE9tz.d.cts} +3 -3
  450. package/dist/{types-BsxLGDoC.d.cts → types-DrvKfXXd.d.cts} +2 -2
  451. package/dist/{types-CzsnuPFh.d.cts → types-Dtuvhm3K.d.cts} +949 -190
  452. package/dist/{types-CcrvrAJX.d.ts → types-DwVSj-Da.d.ts} +5 -8
  453. package/dist/{types-C2vefB4D.d.ts → types-FwRmjsNN.d.ts} +10 -34
  454. package/dist/{types-C0_2KZ-A.d.ts → types-RbrfiY8T.d.ts} +2 -2
  455. package/dist/{types-DfvdbRPL.d.ts → types-WZBztugL.d.ts} +2 -2
  456. package/dist/{types-52irAt99.d.cts → types-YHUEArkR.d.cts} +2 -2
  457. package/dist/{types-fX4gbxfV.d.cts → types-bc-4z_gc.d.cts} +10 -34
  458. package/dist/{types-3eUgOA7I.d.cts → types-ePSqbXRr.d.cts} +6 -13
  459. package/dist/{types-BupPADSm.d.ts → types-n4PTnLii.d.ts} +688 -201
  460. package/dist/{types-DXskkNp8.d.cts → types-pvQzbgNE.d.cts} +3 -3
  461. package/dist/{types-DajzGOKB.d.ts → types-q-1r_9d1.d.ts} +2 -2
  462. package/dist/{types-D8Rrz51O.d.cts → types-tKkeLa2B.d.cts} +2 -2
  463. package/dist/{validateConnectionStatus-olE2sQ3U.js → validateConnectionStatus-BEGu8wXT.js} +7 -10
  464. package/dist/validateConnectionStatus-BEGu8wXT.js.map +1 -0
  465. package/dist/{validateConnectionStatus-CsvYmCOI.cjs → validateConnectionStatus-BEYkQpu9.cjs} +7 -10
  466. package/dist/validateConnectionStatus-BEYkQpu9.cjs.map +1 -0
  467. package/dist/vault/index.cjs +4 -4
  468. package/dist/vault/index.d.cts +1 -1
  469. package/dist/vault/index.d.ts +1 -1
  470. package/dist/vault/index.js +4 -4
  471. package/dist/vault/types.d.cts +1 -1
  472. package/dist/vault/types.d.ts +1 -1
  473. package/package.json +58 -4
  474. package/surface/apps.md +3 -3
  475. package/surface/auth.md +13 -6
  476. package/surface/businessWorkspaceApi.md +12 -0
  477. package/surface/chat.md +7 -7
  478. package/surface/kaiAgent.md +13 -9
  479. package/surface/management.md +18 -5
  480. package/surface/metastore.md +2 -2
  481. package/surface/queue.md +3 -3
  482. package/surface/sdk.md +13 -3
  483. package/surface/storage.md +6 -6
  484. package/surface/syncActions.md +9 -0
  485. package/dist/ValidationError-BekhphAq.js +0 -48
  486. package/dist/ValidationError-BekhphAq.js.map +0 -1
  487. package/dist/ValidationError-CLVJCCwH.cjs.map +0 -1
  488. package/dist/authClient-D7W9vWPR.js.map +0 -1
  489. package/dist/authClient-_PpvGgZJ.cjs.map +0 -1
  490. package/dist/concurrent-CH9fbNr3.js.map +0 -1
  491. package/dist/concurrent-tbiIa0UL.cjs.map +0 -1
  492. package/dist/configurations-BVvcimzo.js.map +0 -1
  493. package/dist/configurations-CyFF9Dtu.cjs.map +0 -1
  494. package/dist/configurations-VtNE0nrT.js.map +0 -1
  495. package/dist/configurations-zkNjr73Q.cjs.map +0 -1
  496. package/dist/constants-C4DlsF_M.cjs.map +0 -1
  497. package/dist/constants-wfbFsqqN.js.map +0 -1
  498. package/dist/createFetchClient-DgMiqTJ8.cjs.map +0 -1
  499. package/dist/createFetchClient-U-ZrwPl2.js.map +0 -1
  500. package/dist/credential-CihSf_xs.js +0 -36
  501. package/dist/credential-CihSf_xs.js.map +0 -1
  502. package/dist/credential-DVWvJFJs.cjs +0 -47
  503. package/dist/credential-DVWvJFJs.cjs.map +0 -1
  504. package/dist/dedupe-CiskLkGR.cjs +0 -30
  505. package/dist/dedupe-CiskLkGR.cjs.map +0 -1
  506. package/dist/dedupe-DYIHgZoG.js +0 -25
  507. package/dist/dedupe-DYIHgZoG.js.map +0 -1
  508. package/dist/isLoginPageRedirect-B0EmRsHr.cjs +0 -25
  509. package/dist/isLoginPageRedirect-B0EmRsHr.cjs.map +0 -1
  510. package/dist/isLoginPageRedirect-BTTAedW-.js +0 -20
  511. package/dist/isLoginPageRedirect-BTTAedW-.js.map +0 -1
  512. package/dist/jobStatus-0_Y3Sr4i.cjs.map +0 -1
  513. package/dist/jobStatus-PSZJMTiA.js.map +0 -1
  514. package/dist/kaiAgent-8LNzGhZc.js.map +0 -1
  515. package/dist/kaiAgent-B_TaUPRt.cjs.map +0 -1
  516. package/dist/management-BoxlRNg2.cjs.map +0 -1
  517. package/dist/management-Bp440RsV.js.map +0 -1
  518. package/dist/metastore-BYYWTb3m.cjs.map +0 -1
  519. package/dist/metastore-VCDRVhUT.js.map +0 -1
  520. package/dist/queue-DyotLFJi.js.map +0 -1
  521. package/dist/queue-OJJUUqc2.cjs.map +0 -1
  522. package/dist/semanticLayer-CSqmtHRo.js.map +0 -1
  523. package/dist/semanticLayer-E0Vilu8u.cjs.map +0 -1
  524. package/dist/storage-BKm7cztt.cjs.map +0 -1
  525. package/dist/storage-LYwFQPNO.js.map +0 -1
  526. package/dist/syncActions-OEZdVffK.cjs.map +0 -1
  527. package/dist/syncActions-QeBhIVhG.js.map +0 -1
  528. package/dist/validateConnectionStatus-CsvYmCOI.cjs.map +0 -1
  529. package/dist/validateConnectionStatus-olE2sQ3U.js.map +0 -1
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_createGenericFetchClient = require("../createGenericFetchClient-o3cPJeRn.cjs");
2
+ const require_createGenericFetchClient = require("../createGenericFetchClient-Dl9cqTvR.cjs");
3
3
  //#region src/clients/encryption/encryptionClient.ts
4
4
  const createEncryptionClient = ({ baseUrl, middlewares }) => {
5
5
  const client = require_createGenericFetchClient.createGenericFetchClient({
@@ -19,27 +19,7 @@ const createEncryptionClient = ({ baseUrl, middlewares }) => {
19
19
  };
20
20
  const encrypt = (data, signal) => _encrypt(data, signal);
21
21
  /**
22
- * A function that encrypts a given data object using
23
- * Secret is an attribute prefixed with `#`.
24
- *
25
- * @example
26
- * Input data:
27
- * {
28
- * "name": "test",
29
- * "#secret": "sensitive-value",
30
- * "nested": {
31
- * "#password": "abc123"
32
- * }
33
- *
34
- * Return:
35
- * {
36
- * "name": "test",
37
- * "#secret": "KBC:ioeiuropqweurioewu==",
38
- * "nested": {
39
- * "#password": "KBC:ioeiuropqweurioewu=="
40
- * }
41
- *
42
- * @returns A promise resolving to the given data object with encrypted secrets.
22
+ * Encrypts every `#`-prefixed attribute of `data`, nested ones included, to a `KBC:` value.
43
23
  */
44
24
  const encryptSecrets = (data, signal) => _encrypt(data, signal);
45
25
  const encryptScopedSecrets = ({ scope, ...params }, signal) => _encrypt(params, signal);
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":["createGenericFetchClient"],"sources":["../../src/clients/encryption/encryptionClient.ts"],"sourcesContent":["import { createGenericFetchClient } from '../../fetchClient';\nimport type { ClientInitOptions } from '../types';\n\nimport type { EncryptBody, EncryptQuery, ScopedSecrets } from './types';\n\nexport const createEncryptionClient = ({\n baseUrl,\n middlewares,\n}: Omit<ClientInitOptions, 'auth'>) => {\n const client = createGenericFetchClient({\n baseUrl,\n middlewares,\n });\n\n const _encrypt = async <T extends string | Record<string, unknown>>(\n data: EncryptQuery & { data: EncryptBody },\n signal?: AbortSignal,\n ) => {\n const response = await client.post<T, void, EncryptQuery, EncryptBody>(\n '/encrypt',\n {\n query: {\n projectId: data.projectId,\n branchType: data.branchType,\n componentId: data.componentId,\n configId: data.configId,\n },\n body: data.data,\n },\n { signal },\n );\n\n return response.data;\n };\n\n const encrypt = (data: EncryptQuery & { data: string }, signal?: AbortSignal) =>\n _encrypt<string>(data, signal);\n\n /**\n * A function that encrypts a given data object using\n * Secret is an attribute prefixed with `#`.\n *\n * @example\n * Input data:\n * {\n * \"name\": \"test\",\n * \"#secret\": \"sensitive-value\",\n * \"nested\": {\n * \"#password\": \"abc123\"\n * }\n *\n * Return:\n * {\n * \"name\": \"test\",\n * \"#secret\": \"KBC:ioeiuropqweurioewu==\",\n * \"nested\": {\n * \"#password\": \"KBC:ioeiuropqweurioewu==\"\n * }\n *\n * @returns A promise resolving to the given data object with encrypted secrets.\n */\n const encryptSecrets = <T extends Record<string, unknown>>(\n data: EncryptQuery & { data: T },\n signal?: AbortSignal,\n ) => _encrypt<T>(data, signal);\n\n const encryptScopedSecrets = <T extends Record<string, unknown>>(\n // oxlint-disable-next-line no-unused-vars\n { scope, ...params }: ScopedSecrets<T>,\n signal?: AbortSignal,\n ) => _encrypt<T>(params, signal);\n\n const healthCheck = async (signal?: AbortSignal) => {\n const { data } = await client.get('/health-check', {}, { signal });\n\n return data;\n };\n\n return {\n healthCheck,\n encryptSecrets,\n encryptScopedSecrets,\n encrypt,\n };\n};\n"],"mappings":";;;AAKA,MAAa,0BAA0B,EACrC,SACA,kBACqC;CACrC,MAAM,SAASA,iCAAAA,yBAAyB;EACtC;EACA;CACF,CAAC;CAED,MAAM,WAAW,OACf,MACA,WACG;EAeH,QAAO,MAdgB,OAAO,KAC5B,YACA;GACE,OAAO;IACL,WAAW,KAAK;IAChB,YAAY,KAAK;IACjB,aAAa,KAAK;IAClB,UAAU,KAAK;GACjB;GACA,MAAM,KAAK;EACb,GACA,EAAE,OAAO,CACX,EAAA,CAEgB;CAClB;CAEA,MAAM,WAAW,MAAuC,WACtD,SAAiB,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;CAyB/B,MAAM,kBACJ,MACA,WACG,SAAY,MAAM,MAAM;CAE7B,MAAM,wBAEJ,EAAE,OAAO,GAAG,UACZ,WACG,SAAY,QAAQ,MAAM;CAE/B,MAAM,cAAc,OAAO,WAAyB;EAClD,MAAM,EAAE,SAAS,MAAM,OAAO,IAAI,iBAAiB,CAAC,GAAG,EAAE,OAAO,CAAC;EAEjE,OAAO;CACT;CAEA,OAAO;EACL;EACA;EACA;EACA;CACF;AACF"}
1
+ {"version":3,"file":"index.cjs","names":["createGenericFetchClient"],"sources":["../../src/clients/encryption/encryptionClient.ts"],"sourcesContent":["import { createGenericFetchClient } from '../../fetchClient';\nimport type { ClientInitOptions } from '../types';\n\nimport type { EncryptBody, EncryptQuery, ScopedSecrets } from './types';\n\nexport const createEncryptionClient = ({\n baseUrl,\n middlewares,\n}: Omit<ClientInitOptions, 'auth'>) => {\n const client = createGenericFetchClient({\n baseUrl,\n middlewares,\n });\n\n const _encrypt = async <T extends string | Record<string, unknown>>(\n data: EncryptQuery & { data: EncryptBody },\n signal?: AbortSignal,\n ) => {\n const response = await client.post<T, void, EncryptQuery, EncryptBody>(\n '/encrypt',\n {\n query: {\n projectId: data.projectId,\n branchType: data.branchType,\n componentId: data.componentId,\n configId: data.configId,\n },\n body: data.data,\n },\n { signal },\n );\n\n return response.data;\n };\n\n const encrypt = (data: EncryptQuery & { data: string }, signal?: AbortSignal) =>\n _encrypt<string>(data, signal);\n\n /**\n * Encrypts every `#`-prefixed attribute of `data`, nested ones included, to a `KBC:` value.\n */\n const encryptSecrets = <T extends Record<string, unknown>>(\n data: EncryptQuery & { data: T },\n signal?: AbortSignal,\n ) => _encrypt<T>(data, signal);\n\n const encryptScopedSecrets = <T extends Record<string, unknown>>(\n // oxlint-disable-next-line no-unused-vars\n { scope, ...params }: ScopedSecrets<T>,\n signal?: AbortSignal,\n ) => _encrypt<T>(params, signal);\n\n const healthCheck = async (signal?: AbortSignal) => {\n const { data } = await client.get('/health-check', {}, { signal });\n\n return data;\n };\n\n return {\n healthCheck,\n encryptSecrets,\n encryptScopedSecrets,\n encrypt,\n };\n};\n"],"mappings":";;;AAKA,MAAa,0BAA0B,EACrC,SACA,kBACqC;CACrC,MAAM,SAASA,iCAAAA,yBAAyB;EACtC;EACA;CACF,CAAC;CAED,MAAM,WAAW,OACf,MACA,WACG;EAeH,QAAO,MAdgB,OAAO,KAC5B,YACA;GACE,OAAO;IACL,WAAW,KAAK;IAChB,YAAY,KAAK;IACjB,aAAa,KAAK;IAClB,UAAU,KAAK;GACjB;GACA,MAAM,KAAK;EACb,GACA,EAAE,OAAO,CACX,EAAA,CAEgB;CAClB;CAEA,MAAM,WAAW,MAAuC,WACtD,SAAiB,MAAM,MAAM;;;;CAK/B,MAAM,kBACJ,MACA,WACG,SAAY,MAAM,MAAM;CAE7B,MAAM,wBAEJ,EAAE,OAAO,GAAG,UACZ,WACG,SAAY,QAAQ,MAAM;CAE/B,MAAM,cAAc,OAAO,WAAyB;EAClD,MAAM,EAAE,SAAS,MAAM,OAAO,IAAI,iBAAiB,CAAC,GAAG,EAAE,OAAO,CAAC;EAEjE,OAAO;CACT;CAEA,OAAO;EACL;EACA;EACA;EACA;CACF;AACF"}
@@ -1,2 +1,2 @@
1
- import { t as createEncryptionClient } from "../index-DR4QqItd.cjs";
1
+ import { t as createEncryptionClient } from "../index--ZpnE3YT.cjs";
2
2
  export { createEncryptionClient };
@@ -1,2 +1,2 @@
1
- import { t as createEncryptionClient } from "../index-D8rcUbnk.js";
1
+ import { t as createEncryptionClient } from "../index-D7-o-oGa.js";
2
2
  export { createEncryptionClient };
@@ -1,4 +1,4 @@
1
- import { t as createGenericFetchClient } from "../createGenericFetchClient-rxvUUbap.js";
1
+ import { t as createGenericFetchClient } from "../createGenericFetchClient-Dg1rgzmG.js";
2
2
  //#region src/clients/encryption/encryptionClient.ts
3
3
  const createEncryptionClient = ({ baseUrl, middlewares }) => {
4
4
  const client = createGenericFetchClient({
@@ -18,27 +18,7 @@ const createEncryptionClient = ({ baseUrl, middlewares }) => {
18
18
  };
19
19
  const encrypt = (data, signal) => _encrypt(data, signal);
20
20
  /**
21
- * A function that encrypts a given data object using
22
- * Secret is an attribute prefixed with `#`.
23
- *
24
- * @example
25
- * Input data:
26
- * {
27
- * "name": "test",
28
- * "#secret": "sensitive-value",
29
- * "nested": {
30
- * "#password": "abc123"
31
- * }
32
- *
33
- * Return:
34
- * {
35
- * "name": "test",
36
- * "#secret": "KBC:ioeiuropqweurioewu==",
37
- * "nested": {
38
- * "#password": "KBC:ioeiuropqweurioewu=="
39
- * }
40
- *
41
- * @returns A promise resolving to the given data object with encrypted secrets.
21
+ * Encrypts every `#`-prefixed attribute of `data`, nested ones included, to a `KBC:` value.
42
22
  */
43
23
  const encryptSecrets = (data, signal) => _encrypt(data, signal);
44
24
  const encryptScopedSecrets = ({ scope, ...params }, signal) => _encrypt(params, signal);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../src/clients/encryption/encryptionClient.ts"],"sourcesContent":["import { createGenericFetchClient } from '../../fetchClient';\nimport type { ClientInitOptions } from '../types';\n\nimport type { EncryptBody, EncryptQuery, ScopedSecrets } from './types';\n\nexport const createEncryptionClient = ({\n baseUrl,\n middlewares,\n}: Omit<ClientInitOptions, 'auth'>) => {\n const client = createGenericFetchClient({\n baseUrl,\n middlewares,\n });\n\n const _encrypt = async <T extends string | Record<string, unknown>>(\n data: EncryptQuery & { data: EncryptBody },\n signal?: AbortSignal,\n ) => {\n const response = await client.post<T, void, EncryptQuery, EncryptBody>(\n '/encrypt',\n {\n query: {\n projectId: data.projectId,\n branchType: data.branchType,\n componentId: data.componentId,\n configId: data.configId,\n },\n body: data.data,\n },\n { signal },\n );\n\n return response.data;\n };\n\n const encrypt = (data: EncryptQuery & { data: string }, signal?: AbortSignal) =>\n _encrypt<string>(data, signal);\n\n /**\n * A function that encrypts a given data object using\n * Secret is an attribute prefixed with `#`.\n *\n * @example\n * Input data:\n * {\n * \"name\": \"test\",\n * \"#secret\": \"sensitive-value\",\n * \"nested\": {\n * \"#password\": \"abc123\"\n * }\n *\n * Return:\n * {\n * \"name\": \"test\",\n * \"#secret\": \"KBC:ioeiuropqweurioewu==\",\n * \"nested\": {\n * \"#password\": \"KBC:ioeiuropqweurioewu==\"\n * }\n *\n * @returns A promise resolving to the given data object with encrypted secrets.\n */\n const encryptSecrets = <T extends Record<string, unknown>>(\n data: EncryptQuery & { data: T },\n signal?: AbortSignal,\n ) => _encrypt<T>(data, signal);\n\n const encryptScopedSecrets = <T extends Record<string, unknown>>(\n // oxlint-disable-next-line no-unused-vars\n { scope, ...params }: ScopedSecrets<T>,\n signal?: AbortSignal,\n ) => _encrypt<T>(params, signal);\n\n const healthCheck = async (signal?: AbortSignal) => {\n const { data } = await client.get('/health-check', {}, { signal });\n\n return data;\n };\n\n return {\n healthCheck,\n encryptSecrets,\n encryptScopedSecrets,\n encrypt,\n };\n};\n"],"mappings":";;AAKA,MAAa,0BAA0B,EACrC,SACA,kBACqC;CACrC,MAAM,SAAS,yBAAyB;EACtC;EACA;CACF,CAAC;CAED,MAAM,WAAW,OACf,MACA,WACG;EAeH,QAAO,MAdgB,OAAO,KAC5B,YACA;GACE,OAAO;IACL,WAAW,KAAK;IAChB,YAAY,KAAK;IACjB,aAAa,KAAK;IAClB,UAAU,KAAK;GACjB;GACA,MAAM,KAAK;EACb,GACA,EAAE,OAAO,CACX,EAAA,CAEgB;CAClB;CAEA,MAAM,WAAW,MAAuC,WACtD,SAAiB,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;CAyB/B,MAAM,kBACJ,MACA,WACG,SAAY,MAAM,MAAM;CAE7B,MAAM,wBAEJ,EAAE,OAAO,GAAG,UACZ,WACG,SAAY,QAAQ,MAAM;CAE/B,MAAM,cAAc,OAAO,WAAyB;EAClD,MAAM,EAAE,SAAS,MAAM,OAAO,IAAI,iBAAiB,CAAC,GAAG,EAAE,OAAO,CAAC;EAEjE,OAAO;CACT;CAEA,OAAO;EACL;EACA;EACA;EACA;CACF;AACF"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../src/clients/encryption/encryptionClient.ts"],"sourcesContent":["import { createGenericFetchClient } from '../../fetchClient';\nimport type { ClientInitOptions } from '../types';\n\nimport type { EncryptBody, EncryptQuery, ScopedSecrets } from './types';\n\nexport const createEncryptionClient = ({\n baseUrl,\n middlewares,\n}: Omit<ClientInitOptions, 'auth'>) => {\n const client = createGenericFetchClient({\n baseUrl,\n middlewares,\n });\n\n const _encrypt = async <T extends string | Record<string, unknown>>(\n data: EncryptQuery & { data: EncryptBody },\n signal?: AbortSignal,\n ) => {\n const response = await client.post<T, void, EncryptQuery, EncryptBody>(\n '/encrypt',\n {\n query: {\n projectId: data.projectId,\n branchType: data.branchType,\n componentId: data.componentId,\n configId: data.configId,\n },\n body: data.data,\n },\n { signal },\n );\n\n return response.data;\n };\n\n const encrypt = (data: EncryptQuery & { data: string }, signal?: AbortSignal) =>\n _encrypt<string>(data, signal);\n\n /**\n * Encrypts every `#`-prefixed attribute of `data`, nested ones included, to a `KBC:` value.\n */\n const encryptSecrets = <T extends Record<string, unknown>>(\n data: EncryptQuery & { data: T },\n signal?: AbortSignal,\n ) => _encrypt<T>(data, signal);\n\n const encryptScopedSecrets = <T extends Record<string, unknown>>(\n // oxlint-disable-next-line no-unused-vars\n { scope, ...params }: ScopedSecrets<T>,\n signal?: AbortSignal,\n ) => _encrypt<T>(params, signal);\n\n const healthCheck = async (signal?: AbortSignal) => {\n const { data } = await client.get('/health-check', {}, { signal });\n\n return data;\n };\n\n return {\n healthCheck,\n encryptSecrets,\n encryptScopedSecrets,\n encrypt,\n };\n};\n"],"mappings":";;AAKA,MAAa,0BAA0B,EACrC,SACA,kBACqC;CACrC,MAAM,SAAS,yBAAyB;EACtC;EACA;CACF,CAAC;CAED,MAAM,WAAW,OACf,MACA,WACG;EAeH,QAAO,MAdgB,OAAO,KAC5B,YACA;GACE,OAAO;IACL,WAAW,KAAK;IAChB,YAAY,KAAK;IACjB,aAAa,KAAK;IAClB,UAAU,KAAK;GACjB;GACA,MAAM,KAAK;EACb,GACA,EAAE,OAAO,CACX,EAAA,CAEgB;CAClB;CAEA,MAAM,WAAW,MAAuC,WACtD,SAAiB,MAAM,MAAM;;;;CAK/B,MAAM,kBACJ,MACA,WACG,SAAY,MAAM,MAAM;CAE7B,MAAM,wBAEJ,EAAE,OAAO,GAAG,UACZ,WACG,SAAY,QAAQ,MAAM;CAE/B,MAAM,cAAc,OAAO,WAAyB;EAClD,MAAM,EAAE,SAAS,MAAM,OAAO,IAAI,iBAAiB,CAAC,GAAG,EAAE,OAAO,CAAC;EAEjE,OAAO;CACT;CAEA,OAAO;EACL;EACA;EACA;EACA;CACF;AACF"}
@@ -1,2 +1,2 @@
1
- import { a as EncryptQuery, i as EncryptParamsByScope, n as EncryptBody, o as EncryptionScope, r as EncryptParams, s as ScopedSecrets, t as BranchType } from "../types-CaYtinmA.cjs";
1
+ import { a as EncryptQuery, i as EncryptParamsByScope, n as EncryptBody, o as EncryptionScope, r as EncryptParams, s as ScopedSecrets, t as BranchType } from "../types-CMzQSHAQ.cjs";
2
2
  export { BranchType, EncryptBody, EncryptParams, EncryptParamsByScope, EncryptQuery, EncryptionScope, ScopedSecrets };
@@ -1,2 +1,2 @@
1
- import { a as EncryptQuery, i as EncryptParamsByScope, n as EncryptBody, o as EncryptionScope, r as EncryptParams, s as ScopedSecrets, t as BranchType } from "../types-BQsOHNI0.js";
1
+ import { a as EncryptQuery, i as EncryptParamsByScope, n as EncryptBody, o as EncryptionScope, r as EncryptParams, s as ScopedSecrets, t as BranchType } from "../types-DRCMBt89.js";
2
2
  export { BranchType, EncryptBody, EncryptParams, EncryptParamsByScope, EncryptQuery, EncryptionScope, ScopedSecrets };
@@ -1,3 +1,3 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_import = require("../import-C83w7BKz.cjs");
2
+ const require_import = require("../import-CNk89mqy.cjs");
3
3
  exports.createImportClient = require_import.createImportClient;
@@ -1,6 +1,6 @@
1
- import { l as UploadProgress } from "../index-V7XKUQm9.cjs";
2
- import { n as ClientInitOptions } from "../types-_RhBCj4_.cjs";
3
- import { n as WriteTableInput, t as UploadFileInput } from "../types-BEe50G2r.cjs";
1
+ import { l as UploadProgress } from "../index-BVhHt5lx.cjs";
2
+ import { n as ClientInitOptions } from "../types-DoZtE9tz.cjs";
3
+ import { n as WriteTableInput, t as UploadFileInput } from "../types-BPy5Ozee.cjs";
4
4
  //#region src/clients/import/importClient.d.ts
5
5
  type Options = {
6
6
  signal?: AbortSignal;
@@ -1,6 +1,6 @@
1
- import { l as UploadProgress } from "../index-KuQ79Mnz.js";
2
- import { n as ClientInitOptions } from "../types-Ct0YPy2w.js";
3
- import { n as WriteTableInput, t as UploadFileInput } from "../types-nrviNdzZ.js";
1
+ import { l as UploadProgress } from "../index-BgR5zcjJ.js";
2
+ import { n as ClientInitOptions } from "../types-B2w2TtSA.js";
3
+ import { n as WriteTableInput, t as UploadFileInput } from "../types-DicSaNwq.js";
4
4
  //#region src/clients/import/importClient.d.ts
5
5
  type Options = {
6
6
  signal?: AbortSignal;
@@ -1,2 +1,2 @@
1
- import { t as createImportClient } from "../import-CROEK82b.js";
1
+ import { t as createImportClient } from "../import-DiMQCzLa.js";
2
2
  export { createImportClient };
@@ -1,5 +1,5 @@
1
- const require_createOpenapiFetchClient = require("./createOpenapiFetchClient-DhUU3M1W.cjs");
2
- const require_auth = require("./auth-JQ33o3nU.cjs");
1
+ const require_createOpenapiFetchClient = require("./createOpenapiFetchClient-BYqW-9tm.cjs");
2
+ const require_auth = require("./auth-Dm0F2rOh.cjs");
3
3
  //#region src/fetchClient/xhrFetch.ts
4
4
  const parseResponseHeaders = (raw) => {
5
5
  const headers = new Headers();
@@ -118,4 +118,4 @@ Object.defineProperty(exports, "createImportClient", {
118
118
  }
119
119
  });
120
120
 
121
- //# sourceMappingURL=import-C83w7BKz.cjs.map
121
+ //# sourceMappingURL=import-CNk89mqy.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"import-C83w7BKz.cjs","names":["createOpenapiFetchClient","createAuthHeaders"],"sources":["../src/fetchClient/xhrFetch.ts","../src/clients/import/utils.ts","../src/clients/import/importClient.ts"],"sourcesContent":["import type { FetchFn } from './createFetchClient';\n\nexport type UploadProgress = {\n loaded: number;\n total: number;\n percent: number;\n};\n\nconst parseResponseHeaders = (raw: string) => {\n const headers = new Headers();\n\n for (const line of raw.trim().split(/[\\r\\n]+/)) {\n const separator = line.indexOf(':');\n if (separator < 0) continue;\n\n headers.append(line.slice(0, separator).trim(), line.slice(separator + 1).trim());\n }\n\n return headers;\n};\n\nconst createAbortError = () => new DOMException('The operation was aborted.', 'AbortError');\n\n// `new Response(body)` throws for these statuses even when the body is empty.\nconst BODILESS_STATUSES = [204, 205];\n\nconst BODILESS_METHODS = ['GET', 'HEAD'];\n\n/**\n * A `fetch` implementation backed by XHR, for the `fetchFn` escape hatch: `fetch` cannot observe\n * request-body upload progress outside Chromium, `xhr.upload.onprogress` can.\n */\nexport const xhrFetch = (onProgress: (progress: UploadProgress) => void): FetchFn => {\n return async (input, init) => {\n // Node has no XHR, and asking for progress is not worth failing an upload over — the caller\n // simply gets no progress events there.\n if (typeof XMLHttpRequest === 'undefined') return fetch(input, init);\n\n const request = new Request(input, init);\n const body = BODILESS_METHODS.includes(request.method) ? null : await request.blob();\n\n if (request.signal.aborted) throw createAbortError();\n\n const { promise, resolve, reject } = Promise.withResolvers<Response>();\n const xhr = new XMLHttpRequest();\n\n const handleProgress = (event: ProgressEvent) => {\n if (!event.lengthComputable) return;\n\n onProgress({\n loaded: event.loaded,\n total: event.total,\n percent: (event.loaded / event.total) * 100,\n });\n };\n\n const handleLoad = () => {\n resolve(\n new Response(BODILESS_STATUSES.includes(xhr.status) ? null : xhr.response, {\n status: xhr.status,\n statusText: xhr.statusText,\n headers: parseResponseHeaders(xhr.getAllResponseHeaders()),\n }),\n );\n };\n\n // `TypeError` for parity with `fetch` — `isFetchClientError` keys off it.\n const handleError = () => reject(new TypeError('Failed to fetch'));\n const handleAbort = () => reject(createAbortError());\n\n xhr.open(request.method, request.url, true);\n xhr.responseType = 'blob';\n xhr.withCredentials = request.credentials === 'include';\n\n // The body we send is the one this `Request` serialized, so its `content-type` — multipart\n // boundary included — describes those exact bytes and can be forwarded as-is.\n request.headers.forEach((value, name) => xhr.setRequestHeader(name, value));\n\n xhr.upload.addEventListener('progress', handleProgress);\n xhr.addEventListener('load', handleLoad);\n xhr.addEventListener('error', handleError);\n xhr.addEventListener('abort', handleAbort);\n request.signal.addEventListener('abort', () => xhr.abort(), { once: true });\n\n xhr.send(body);\n\n return promise;\n };\n};\n","/**\n * Every field the importer takes is a form part, named exactly as the spec names it: flags go as\n * `1` when on and are left out when off (so the service applies its own default), and arrays repeat\n * under the `[]`-suffixed name. The payload rides along as the `data` part — `file` is the public\n * API's word for it, not the wire's.\n */\nexport const createFormData = (\n fields: Record<string, string | boolean | string[] | File | null | undefined>,\n) => {\n const formData = new FormData();\n\n for (const [name, value] of Object.entries(fields)) {\n if (!value) {\n continue;\n }\n\n if (Array.isArray(value)) {\n for (const item of value) {\n formData.append(`${name}[]`, item);\n }\n } else {\n formData.append(name, value === true ? '1' : value);\n }\n }\n\n return formData;\n};\n","import type { UploadProgress } from '../../fetchClient';\nimport { createOpenapiFetchClient, xhrFetch } from '../../fetchClient';\nimport { createAuthHeaders } from '../auth';\nimport type { ClientInitOptions } from '../types';\n\nimport type { paths } from './__generated__/schema';\nimport type { UploadFileInput, WriteTableInput } from './types';\nimport { createFormData } from './utils';\n\ntype Options = {\n signal?: AbortSignal;\n onProgress?: (progress: UploadProgress) => void;\n};\n\nexport const createImportClient = ({ baseUrl, middlewares, auth }: ClientInitOptions) => {\n const client = createOpenapiFetchClient<paths>({\n baseUrl,\n middlewares,\n headers: createAuthHeaders(auth),\n });\n\n const uploadFile = async (\n { file, ...fields }: UploadFileInput,\n { signal, onProgress }: Options = {},\n ) => {\n const { data } = await client.post(\n '/upload-file',\n { body: createFormData({ data: file, ...fields }) },\n { signal, fetchFn: onProgress ? xhrFetch(onProgress) : undefined },\n );\n\n return data;\n };\n\n const writeTable = async (\n { file, ...fields }: WriteTableInput,\n { signal, onProgress }: Options = {},\n ) => {\n const { data } = await client.post(\n '/write-table',\n { body: createFormData({ data: file, ...fields }) },\n { signal, fetchFn: onProgress ? xhrFetch(onProgress) : undefined },\n );\n\n return data;\n };\n\n const healthCheck = async (signal?: AbortSignal) => {\n const { data } = await client.get('/health-check', {}, { signal });\n\n return data;\n };\n\n return {\n healthCheck,\n uploadFile,\n writeTable,\n };\n};\n"],"mappings":"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"}
1
+ {"version":3,"file":"import-CNk89mqy.cjs","names":["createOpenapiFetchClient","createAuthHeaders"],"sources":["../src/fetchClient/xhrFetch.ts","../src/clients/import/utils.ts","../src/clients/import/importClient.ts"],"sourcesContent":["import type { FetchFn } from './createFetchClient';\n\nexport type UploadProgress = {\n loaded: number;\n total: number;\n percent: number;\n};\n\nconst parseResponseHeaders = (raw: string) => {\n const headers = new Headers();\n\n for (const line of raw.trim().split(/[\\r\\n]+/)) {\n const separator = line.indexOf(':');\n if (separator < 0) continue;\n\n headers.append(line.slice(0, separator).trim(), line.slice(separator + 1).trim());\n }\n\n return headers;\n};\n\nconst createAbortError = () => new DOMException('The operation was aborted.', 'AbortError');\n\n// `new Response(body)` throws for these statuses even when the body is empty.\nconst BODILESS_STATUSES = [204, 205];\n\nconst BODILESS_METHODS = ['GET', 'HEAD'];\n\n/**\n * A `fetch` implementation backed by XHR, for the `fetchFn` escape hatch: `fetch` cannot observe\n * request-body upload progress outside Chromium, `xhr.upload.onprogress` can.\n */\nexport const xhrFetch = (onProgress: (progress: UploadProgress) => void): FetchFn => {\n return async (input, init) => {\n // Node has no XHR, and asking for progress is not worth failing an upload over — the caller\n // simply gets no progress events there.\n if (typeof XMLHttpRequest === 'undefined') return fetch(input, init);\n\n const request = new Request(input, init);\n const body = BODILESS_METHODS.includes(request.method) ? null : await request.blob();\n\n if (request.signal.aborted) throw createAbortError();\n\n const { promise, resolve, reject } = Promise.withResolvers<Response>();\n const xhr = new XMLHttpRequest();\n\n const handleProgress = (event: ProgressEvent) => {\n if (!event.lengthComputable) return;\n\n onProgress({\n loaded: event.loaded,\n total: event.total,\n percent: (event.loaded / event.total) * 100,\n });\n };\n\n const handleLoad = () => {\n resolve(\n new Response(BODILESS_STATUSES.includes(xhr.status) ? null : xhr.response, {\n status: xhr.status,\n statusText: xhr.statusText,\n headers: parseResponseHeaders(xhr.getAllResponseHeaders()),\n }),\n );\n };\n\n // `TypeError` for parity with `fetch` — `isFetchClientError` keys off it.\n const handleError = () => reject(new TypeError('Failed to fetch'));\n const handleAbort = () => reject(createAbortError());\n\n xhr.open(request.method, request.url, true);\n xhr.responseType = 'blob';\n xhr.withCredentials = request.credentials === 'include';\n\n // The body we send is the one this `Request` serialized, so its `content-type` — multipart\n // boundary included — describes those exact bytes and can be forwarded as-is.\n request.headers.forEach((value, name) => xhr.setRequestHeader(name, value));\n\n xhr.upload.addEventListener('progress', handleProgress);\n xhr.addEventListener('load', handleLoad);\n xhr.addEventListener('error', handleError);\n xhr.addEventListener('abort', handleAbort);\n request.signal.addEventListener('abort', () => xhr.abort(), { once: true });\n\n xhr.send(body);\n\n return promise;\n };\n};\n","/**\n * Every field the importer takes is a form part, named exactly as the spec names it: flags go as\n * `1` when on and are left out when off (so the service applies its own default), and arrays repeat\n * under the `[]`-suffixed name. The payload rides along as the `data` part — `file` is the public\n * API's word for it, not the wire's.\n */\nexport const createFormData = (\n fields: Record<string, string | boolean | string[] | File | null | undefined>,\n) => {\n const formData = new FormData();\n\n for (const [name, value] of Object.entries(fields)) {\n if (!value) {\n continue;\n }\n\n if (Array.isArray(value)) {\n for (const item of value) {\n formData.append(`${name}[]`, item);\n }\n } else {\n formData.append(name, value === true ? '1' : value);\n }\n }\n\n return formData;\n};\n","import type { UploadProgress } from '../../fetchClient';\nimport { createOpenapiFetchClient, xhrFetch } from '../../fetchClient';\nimport { createAuthHeaders } from '../auth';\nimport type { ClientInitOptions } from '../types';\n\nimport type { paths } from './__generated__/schema';\nimport type { UploadFileInput, WriteTableInput } from './types';\nimport { createFormData } from './utils';\n\ntype Options = {\n signal?: AbortSignal;\n onProgress?: (progress: UploadProgress) => void;\n};\n\nexport const createImportClient = ({ baseUrl, middlewares, auth }: ClientInitOptions) => {\n const client = createOpenapiFetchClient<paths>({\n baseUrl,\n middlewares,\n headers: createAuthHeaders(auth),\n });\n\n const uploadFile = async (\n { file, ...fields }: UploadFileInput,\n { signal, onProgress }: Options = {},\n ) => {\n const { data } = await client.post(\n '/upload-file',\n { body: createFormData({ data: file, ...fields }) },\n { signal, fetchFn: onProgress ? xhrFetch(onProgress) : undefined },\n );\n\n return data;\n };\n\n const writeTable = async (\n { file, ...fields }: WriteTableInput,\n { signal, onProgress }: Options = {},\n ) => {\n const { data } = await client.post(\n '/write-table',\n { body: createFormData({ data: file, ...fields }) },\n { signal, fetchFn: onProgress ? xhrFetch(onProgress) : undefined },\n );\n\n return data;\n };\n\n const healthCheck = async (signal?: AbortSignal) => {\n const { data } = await client.get('/health-check', {}, { signal });\n\n return data;\n };\n\n return {\n healthCheck,\n uploadFile,\n writeTable,\n };\n};\n"],"mappings":";;;AAQA,MAAM,wBAAwB,QAAgB;CAC5C,MAAM,UAAU,IAAI,QAAQ;CAE5B,KAAK,MAAM,QAAQ,IAAI,KAAK,CAAC,CAAC,MAAM,SAAS,GAAG;EAC9C,MAAM,YAAY,KAAK,QAAQ,GAAG;EAClC,IAAI,YAAY,GAAG;EAEnB,QAAQ,OAAO,KAAK,MAAM,GAAG,SAAS,CAAC,CAAC,KAAK,GAAG,KAAK,MAAM,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC;CAClF;CAEA,OAAO;AACT;AAEA,MAAM,yBAAyB,IAAI,aAAa,8BAA8B,YAAY;AAG1F,MAAM,oBAAoB,CAAC,KAAK,GAAG;AAEnC,MAAM,mBAAmB,CAAC,OAAO,MAAM;;;;;AAMvC,MAAa,YAAY,eAA4D;CACnF,OAAO,OAAO,OAAO,SAAS;EAG5B,IAAI,OAAO,mBAAmB,aAAa,OAAO,MAAM,OAAO,IAAI;EAEnE,MAAM,UAAU,IAAI,QAAQ,OAAO,IAAI;EACvC,MAAM,OAAO,iBAAiB,SAAS,QAAQ,MAAM,IAAI,OAAO,MAAM,QAAQ,KAAK;EAEnF,IAAI,QAAQ,OAAO,SAAS,MAAM,iBAAiB;EAEnD,MAAM,EAAE,SAAS,SAAS,WAAW,QAAQ,cAAwB;EACrE,MAAM,MAAM,IAAI,eAAe;EAE/B,MAAM,kBAAkB,UAAyB;GAC/C,IAAI,CAAC,MAAM,kBAAkB;GAE7B,WAAW;IACT,QAAQ,MAAM;IACd,OAAO,MAAM;IACb,SAAU,MAAM,SAAS,MAAM,QAAS;GAC1C,CAAC;EACH;EAEA,MAAM,mBAAmB;GACvB,QACE,IAAI,SAAS,kBAAkB,SAAS,IAAI,MAAM,IAAI,OAAO,IAAI,UAAU;IACzE,QAAQ,IAAI;IACZ,YAAY,IAAI;IAChB,SAAS,qBAAqB,IAAI,sBAAsB,CAAC;GAC3D,CAAC,CACH;EACF;EAGA,MAAM,oBAAoB,uBAAO,IAAI,UAAU,iBAAiB,CAAC;EACjE,MAAM,oBAAoB,OAAO,iBAAiB,CAAC;EAEnD,IAAI,KAAK,QAAQ,QAAQ,QAAQ,KAAK,IAAI;EAC1C,IAAI,eAAe;EACnB,IAAI,kBAAkB,QAAQ,gBAAgB;EAI9C,QAAQ,QAAQ,SAAS,OAAO,SAAS,IAAI,iBAAiB,MAAM,KAAK,CAAC;EAE1E,IAAI,OAAO,iBAAiB,YAAY,cAAc;EACtD,IAAI,iBAAiB,QAAQ,UAAU;EACvC,IAAI,iBAAiB,SAAS,WAAW;EACzC,IAAI,iBAAiB,SAAS,WAAW;EACzC,QAAQ,OAAO,iBAAiB,eAAe,IAAI,MAAM,GAAG,EAAE,MAAM,KAAK,CAAC;EAE1E,IAAI,KAAK,IAAI;EAEb,OAAO;CACT;AACF;;;;;;;;;AClFA,MAAa,kBACX,WACG;CACH,MAAM,WAAW,IAAI,SAAS;CAE9B,KAAK,MAAM,CAAC,MAAM,UAAU,OAAO,QAAQ,MAAM,GAAG;EAClD,IAAI,CAAC,OACH;EAGF,IAAI,MAAM,QAAQ,KAAK,GACrB,KAAK,MAAM,QAAQ,OACjB,SAAS,OAAO,GAAG,KAAK,KAAK,IAAI;OAGnC,SAAS,OAAO,MAAM,UAAU,OAAO,MAAM,KAAK;CAEtD;CAEA,OAAO;AACT;;;ACZA,MAAa,sBAAsB,EAAE,SAAS,aAAa,WAA8B;CACvF,MAAM,SAASA,iCAAAA,yBAAgC;EAC7C;EACA;EACA,SAASC,aAAAA,kBAAkB,IAAI;CACjC,CAAC;CAED,MAAM,aAAa,OACjB,EAAE,MAAM,GAAG,UACX,EAAE,QAAQ,eAAwB,CAAC,MAChC;EACH,MAAM,EAAE,SAAS,MAAM,OAAO,KAC5B,gBACA,EAAE,MAAM,eAAe;GAAE,MAAM;GAAM,GAAG;EAAO,CAAC,EAAE,GAClD;GAAE;GAAQ,SAAS,aAAa,SAAS,UAAU,IAAI,KAAA;EAAU,CACnE;EAEA,OAAO;CACT;CAEA,MAAM,aAAa,OACjB,EAAE,MAAM,GAAG,UACX,EAAE,QAAQ,eAAwB,CAAC,MAChC;EACH,MAAM,EAAE,SAAS,MAAM,OAAO,KAC5B,gBACA,EAAE,MAAM,eAAe;GAAE,MAAM;GAAM,GAAG;EAAO,CAAC,EAAE,GAClD;GAAE;GAAQ,SAAS,aAAa,SAAS,UAAU,IAAI,KAAA;EAAU,CACnE;EAEA,OAAO;CACT;CAEA,MAAM,cAAc,OAAO,WAAyB;EAClD,MAAM,EAAE,SAAS,MAAM,OAAO,IAAI,iBAAiB,CAAC,GAAG,EAAE,OAAO,CAAC;EAEjE,OAAO;CACT;CAEA,OAAO;EACL;EACA;EACA;CACF;AACF"}
@@ -1,5 +1,5 @@
1
- import { t as createOpenapiFetchClient } from "./createOpenapiFetchClient-BVSc9ibR.js";
2
- import { t as createAuthHeaders } from "./auth-aItmDu45.js";
1
+ import { t as createOpenapiFetchClient } from "./createOpenapiFetchClient-DZUOVupy.js";
2
+ import { t as createAuthHeaders } from "./auth-DworfoPy.js";
3
3
  //#region src/fetchClient/xhrFetch.ts
4
4
  const parseResponseHeaders = (raw) => {
5
5
  const headers = new Headers();
@@ -113,4 +113,4 @@ const createImportClient = ({ baseUrl, middlewares, auth }) => {
113
113
  //#endregion
114
114
  export { createImportClient as t };
115
115
 
116
- //# sourceMappingURL=import-CROEK82b.js.map
116
+ //# sourceMappingURL=import-DiMQCzLa.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"import-CROEK82b.js","names":[],"sources":["../src/fetchClient/xhrFetch.ts","../src/clients/import/utils.ts","../src/clients/import/importClient.ts"],"sourcesContent":["import type { FetchFn } from './createFetchClient';\n\nexport type UploadProgress = {\n loaded: number;\n total: number;\n percent: number;\n};\n\nconst parseResponseHeaders = (raw: string) => {\n const headers = new Headers();\n\n for (const line of raw.trim().split(/[\\r\\n]+/)) {\n const separator = line.indexOf(':');\n if (separator < 0) continue;\n\n headers.append(line.slice(0, separator).trim(), line.slice(separator + 1).trim());\n }\n\n return headers;\n};\n\nconst createAbortError = () => new DOMException('The operation was aborted.', 'AbortError');\n\n// `new Response(body)` throws for these statuses even when the body is empty.\nconst BODILESS_STATUSES = [204, 205];\n\nconst BODILESS_METHODS = ['GET', 'HEAD'];\n\n/**\n * A `fetch` implementation backed by XHR, for the `fetchFn` escape hatch: `fetch` cannot observe\n * request-body upload progress outside Chromium, `xhr.upload.onprogress` can.\n */\nexport const xhrFetch = (onProgress: (progress: UploadProgress) => void): FetchFn => {\n return async (input, init) => {\n // Node has no XHR, and asking for progress is not worth failing an upload over — the caller\n // simply gets no progress events there.\n if (typeof XMLHttpRequest === 'undefined') return fetch(input, init);\n\n const request = new Request(input, init);\n const body = BODILESS_METHODS.includes(request.method) ? null : await request.blob();\n\n if (request.signal.aborted) throw createAbortError();\n\n const { promise, resolve, reject } = Promise.withResolvers<Response>();\n const xhr = new XMLHttpRequest();\n\n const handleProgress = (event: ProgressEvent) => {\n if (!event.lengthComputable) return;\n\n onProgress({\n loaded: event.loaded,\n total: event.total,\n percent: (event.loaded / event.total) * 100,\n });\n };\n\n const handleLoad = () => {\n resolve(\n new Response(BODILESS_STATUSES.includes(xhr.status) ? null : xhr.response, {\n status: xhr.status,\n statusText: xhr.statusText,\n headers: parseResponseHeaders(xhr.getAllResponseHeaders()),\n }),\n );\n };\n\n // `TypeError` for parity with `fetch` — `isFetchClientError` keys off it.\n const handleError = () => reject(new TypeError('Failed to fetch'));\n const handleAbort = () => reject(createAbortError());\n\n xhr.open(request.method, request.url, true);\n xhr.responseType = 'blob';\n xhr.withCredentials = request.credentials === 'include';\n\n // The body we send is the one this `Request` serialized, so its `content-type` — multipart\n // boundary included — describes those exact bytes and can be forwarded as-is.\n request.headers.forEach((value, name) => xhr.setRequestHeader(name, value));\n\n xhr.upload.addEventListener('progress', handleProgress);\n xhr.addEventListener('load', handleLoad);\n xhr.addEventListener('error', handleError);\n xhr.addEventListener('abort', handleAbort);\n request.signal.addEventListener('abort', () => xhr.abort(), { once: true });\n\n xhr.send(body);\n\n return promise;\n };\n};\n","/**\n * Every field the importer takes is a form part, named exactly as the spec names it: flags go as\n * `1` when on and are left out when off (so the service applies its own default), and arrays repeat\n * under the `[]`-suffixed name. The payload rides along as the `data` part — `file` is the public\n * API's word for it, not the wire's.\n */\nexport const createFormData = (\n fields: Record<string, string | boolean | string[] | File | null | undefined>,\n) => {\n const formData = new FormData();\n\n for (const [name, value] of Object.entries(fields)) {\n if (!value) {\n continue;\n }\n\n if (Array.isArray(value)) {\n for (const item of value) {\n formData.append(`${name}[]`, item);\n }\n } else {\n formData.append(name, value === true ? '1' : value);\n }\n }\n\n return formData;\n};\n","import type { UploadProgress } from '../../fetchClient';\nimport { createOpenapiFetchClient, xhrFetch } from '../../fetchClient';\nimport { createAuthHeaders } from '../auth';\nimport type { ClientInitOptions } from '../types';\n\nimport type { paths } from './__generated__/schema';\nimport type { UploadFileInput, WriteTableInput } from './types';\nimport { createFormData } from './utils';\n\ntype Options = {\n signal?: AbortSignal;\n onProgress?: (progress: UploadProgress) => void;\n};\n\nexport const createImportClient = ({ baseUrl, middlewares, auth }: ClientInitOptions) => {\n const client = createOpenapiFetchClient<paths>({\n baseUrl,\n middlewares,\n headers: createAuthHeaders(auth),\n });\n\n const uploadFile = async (\n { file, ...fields }: UploadFileInput,\n { signal, onProgress }: Options = {},\n ) => {\n const { data } = await client.post(\n '/upload-file',\n { body: createFormData({ data: file, ...fields }) },\n { signal, fetchFn: onProgress ? xhrFetch(onProgress) : undefined },\n );\n\n return data;\n };\n\n const writeTable = async (\n { file, ...fields }: WriteTableInput,\n { signal, onProgress }: Options = {},\n ) => {\n const { data } = await client.post(\n '/write-table',\n { body: createFormData({ data: file, ...fields }) },\n { signal, fetchFn: onProgress ? xhrFetch(onProgress) : undefined },\n );\n\n return data;\n };\n\n const healthCheck = async (signal?: AbortSignal) => {\n const { data } = await client.get('/health-check', {}, { signal });\n\n return data;\n };\n\n return {\n healthCheck,\n uploadFile,\n writeTable,\n };\n};\n"],"mappings":"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"}
1
+ {"version":3,"file":"import-DiMQCzLa.js","names":[],"sources":["../src/fetchClient/xhrFetch.ts","../src/clients/import/utils.ts","../src/clients/import/importClient.ts"],"sourcesContent":["import type { FetchFn } from './createFetchClient';\n\nexport type UploadProgress = {\n loaded: number;\n total: number;\n percent: number;\n};\n\nconst parseResponseHeaders = (raw: string) => {\n const headers = new Headers();\n\n for (const line of raw.trim().split(/[\\r\\n]+/)) {\n const separator = line.indexOf(':');\n if (separator < 0) continue;\n\n headers.append(line.slice(0, separator).trim(), line.slice(separator + 1).trim());\n }\n\n return headers;\n};\n\nconst createAbortError = () => new DOMException('The operation was aborted.', 'AbortError');\n\n// `new Response(body)` throws for these statuses even when the body is empty.\nconst BODILESS_STATUSES = [204, 205];\n\nconst BODILESS_METHODS = ['GET', 'HEAD'];\n\n/**\n * A `fetch` implementation backed by XHR, for the `fetchFn` escape hatch: `fetch` cannot observe\n * request-body upload progress outside Chromium, `xhr.upload.onprogress` can.\n */\nexport const xhrFetch = (onProgress: (progress: UploadProgress) => void): FetchFn => {\n return async (input, init) => {\n // Node has no XHR, and asking for progress is not worth failing an upload over — the caller\n // simply gets no progress events there.\n if (typeof XMLHttpRequest === 'undefined') return fetch(input, init);\n\n const request = new Request(input, init);\n const body = BODILESS_METHODS.includes(request.method) ? null : await request.blob();\n\n if (request.signal.aborted) throw createAbortError();\n\n const { promise, resolve, reject } = Promise.withResolvers<Response>();\n const xhr = new XMLHttpRequest();\n\n const handleProgress = (event: ProgressEvent) => {\n if (!event.lengthComputable) return;\n\n onProgress({\n loaded: event.loaded,\n total: event.total,\n percent: (event.loaded / event.total) * 100,\n });\n };\n\n const handleLoad = () => {\n resolve(\n new Response(BODILESS_STATUSES.includes(xhr.status) ? null : xhr.response, {\n status: xhr.status,\n statusText: xhr.statusText,\n headers: parseResponseHeaders(xhr.getAllResponseHeaders()),\n }),\n );\n };\n\n // `TypeError` for parity with `fetch` — `isFetchClientError` keys off it.\n const handleError = () => reject(new TypeError('Failed to fetch'));\n const handleAbort = () => reject(createAbortError());\n\n xhr.open(request.method, request.url, true);\n xhr.responseType = 'blob';\n xhr.withCredentials = request.credentials === 'include';\n\n // The body we send is the one this `Request` serialized, so its `content-type` — multipart\n // boundary included — describes those exact bytes and can be forwarded as-is.\n request.headers.forEach((value, name) => xhr.setRequestHeader(name, value));\n\n xhr.upload.addEventListener('progress', handleProgress);\n xhr.addEventListener('load', handleLoad);\n xhr.addEventListener('error', handleError);\n xhr.addEventListener('abort', handleAbort);\n request.signal.addEventListener('abort', () => xhr.abort(), { once: true });\n\n xhr.send(body);\n\n return promise;\n };\n};\n","/**\n * Every field the importer takes is a form part, named exactly as the spec names it: flags go as\n * `1` when on and are left out when off (so the service applies its own default), and arrays repeat\n * under the `[]`-suffixed name. The payload rides along as the `data` part — `file` is the public\n * API's word for it, not the wire's.\n */\nexport const createFormData = (\n fields: Record<string, string | boolean | string[] | File | null | undefined>,\n) => {\n const formData = new FormData();\n\n for (const [name, value] of Object.entries(fields)) {\n if (!value) {\n continue;\n }\n\n if (Array.isArray(value)) {\n for (const item of value) {\n formData.append(`${name}[]`, item);\n }\n } else {\n formData.append(name, value === true ? '1' : value);\n }\n }\n\n return formData;\n};\n","import type { UploadProgress } from '../../fetchClient';\nimport { createOpenapiFetchClient, xhrFetch } from '../../fetchClient';\nimport { createAuthHeaders } from '../auth';\nimport type { ClientInitOptions } from '../types';\n\nimport type { paths } from './__generated__/schema';\nimport type { UploadFileInput, WriteTableInput } from './types';\nimport { createFormData } from './utils';\n\ntype Options = {\n signal?: AbortSignal;\n onProgress?: (progress: UploadProgress) => void;\n};\n\nexport const createImportClient = ({ baseUrl, middlewares, auth }: ClientInitOptions) => {\n const client = createOpenapiFetchClient<paths>({\n baseUrl,\n middlewares,\n headers: createAuthHeaders(auth),\n });\n\n const uploadFile = async (\n { file, ...fields }: UploadFileInput,\n { signal, onProgress }: Options = {},\n ) => {\n const { data } = await client.post(\n '/upload-file',\n { body: createFormData({ data: file, ...fields }) },\n { signal, fetchFn: onProgress ? xhrFetch(onProgress) : undefined },\n );\n\n return data;\n };\n\n const writeTable = async (\n { file, ...fields }: WriteTableInput,\n { signal, onProgress }: Options = {},\n ) => {\n const { data } = await client.post(\n '/write-table',\n { body: createFormData({ data: file, ...fields }) },\n { signal, fetchFn: onProgress ? xhrFetch(onProgress) : undefined },\n );\n\n return data;\n };\n\n const healthCheck = async (signal?: AbortSignal) => {\n const { data } = await client.get('/health-check', {}, { signal });\n\n return data;\n };\n\n return {\n healthCheck,\n uploadFile,\n writeTable,\n };\n};\n"],"mappings":"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"}
@@ -1,5 +1,5 @@
1
- import { n as ClientInitOptions } from "./types-_RhBCj4_.cjs";
2
- import { a as EncryptQuery, s as ScopedSecrets } from "./types-CaYtinmA.cjs";
1
+ import { n as ClientInitOptions } from "./types-DoZtE9tz.cjs";
2
+ import { a as EncryptQuery, s as ScopedSecrets } from "./types-CMzQSHAQ.cjs";
3
3
  //#region src/clients/encryption/encryptionClient.d.ts
4
4
  declare const createEncryptionClient: ({ baseUrl, middlewares }: Omit<ClientInitOptions, 'auth'>) => {
5
5
  healthCheck: (signal?: AbortSignal) => Promise<unknown>;
@@ -13,4 +13,4 @@ declare const createEncryptionClient: ({ baseUrl, middlewares }: Omit<ClientInit
13
13
  };
14
14
  //#endregion
15
15
  export { createEncryptionClient as t };
16
- //# sourceMappingURL=index-DR4QqItd.d.cts.map
16
+ //# sourceMappingURL=index--ZpnE3YT.d.cts.map
@@ -1,13 +1,13 @@
1
- import { t as createOpenapiFetchClient } from "./index-KuQ79Mnz.js";
2
- import { n as ClientInitOptions } from "./types-Ct0YPy2w.js";
3
- import { D as components, O as paths, S as ReplaceTargetProjectsInput, T as UpdateMetaObjectInput, c as DeleteMetaObjectRevisionPath, d as GetMetaObjectRevisionsPath, f as GetMetaObjectsPath, g as MetaStoreObjectResponse, h as MetaStoreListResponse, i as CreateMetaObjectInput, l as GetMetaObjectPath, n as GetVersionedSchemaPath, s as DeleteMetaObjectPath, t as GetSchemaPath, u as GetMetaObjectRevisionPath, y as ReplaceMetaObjectInput } from "./types-BH5LLeJy.js";
1
+ import { t as createOpenapiFetchClient } from "./index-BgR5zcjJ.js";
2
+ import { n as ClientInitOptions } from "./types-B2w2TtSA.js";
3
+ import { N as components, O as ReplaceTargetProjectsInput, P as paths, S as MetaStoreObjectResponse, T as ReplaceMetaObjectInput, c as DeleteMetaObjectRevisionPath, d as GetMetaObjectRevisionsInput, h as GetMetaObjectsInput, i as CreateMetaObjectInput, j as UpdateMetaObjectInput, l as GetMetaObjectPath, n as GetVersionedSchemaPath, s as DeleteMetaObjectPath, t as GetSchemaPath, u as GetMetaObjectRevisionPath, x as MetaStoreListResponse } from "./types-B_iLJlp4.js";
4
4
  //#region src/clients/metastore/metastoreClient.d.ts
5
5
  type MetastoreFetchClient = ReturnType<typeof createOpenapiFetchClient<paths>>;
6
6
  declare const createMetastoreClient: ({ baseUrl, middlewares, auth }: ClientInitOptions) => {
7
7
  healthCheck: (signal?: AbortSignal) => Promise<unknown>;
8
8
  repository: {
9
- getMetaObjects: <TData extends Record<string, unknown>>(input: GetMetaObjectsPath, signal?: AbortSignal) => Promise<MetaStoreListResponse<TData>>;
10
- getMetaObjectRevisions: <TData extends Record<string, unknown>>(input: GetMetaObjectRevisionsPath, signal?: AbortSignal) => Promise<MetaStoreListResponse<TData>>;
9
+ getMetaObjects: <TData extends Record<string, unknown>>({ query, ...path }: GetMetaObjectsInput, signal?: AbortSignal) => Promise<MetaStoreListResponse<TData>>;
10
+ getMetaObjectRevisions: <TData extends Record<string, unknown>>({ query, ...path }: GetMetaObjectRevisionsInput, signal?: AbortSignal) => Promise<MetaStoreListResponse<TData>>;
11
11
  getMetaObject: <TData extends Record<string, unknown>>(input: GetMetaObjectPath, signal?: AbortSignal) => Promise<MetaStoreObjectResponse<TData>>;
12
12
  createMetaObject: <TData extends Record<string, unknown>>({ objectType, data, ...body }: CreateMetaObjectInput<TData>) => Promise<MetaStoreObjectResponse<TData>>;
13
13
  deleteMetaObject: (input: DeleteMetaObjectPath) => Promise<never>;
@@ -28,4 +28,4 @@ declare const createMetastoreClient: ({ baseUrl, middlewares, auth }: ClientInit
28
28
  };
29
29
  //#endregion
30
30
  export { createMetastoreClient as n, MetastoreFetchClient as t };
31
- //# sourceMappingURL=index-C77vTm2K.d.ts.map
31
+ //# sourceMappingURL=index-BDZvaRud.d.ts.map
@@ -1,5 +1,5 @@
1
- import * as z$1 from "zod";
2
1
  import { IStringifyOptions } from "qs";
2
+ import * as z$1 from "zod";
3
3
  //#region src/errors/ApiError.d.ts
4
4
  declare class ApiError extends Error {
5
5
  response: Response;
@@ -17,8 +17,10 @@ type ParseAs = 'auto' | 'text' | 'json' | 'blob';
17
17
  type ValidateStatusFn = (options: ApiResponse) => boolean | ApiError;
18
18
  type CustomRequestInit = Omit<RequestInit, 'method' | 'body'>;
19
19
  type FetchFn = typeof fetch;
20
+ type BaseUrlFn = () => Promise<string>;
21
+ type BaseUrl = string | BaseUrlFn;
20
22
  type CreateFetchClientOptions = {
21
- baseUrl: string;
23
+ baseUrl: BaseUrl;
22
24
  validateStatus?: ValidateStatusFn;
23
25
  middlewares?: MiddlewareFn[];
24
26
  fetchFn?: FetchFn;
@@ -48,13 +50,9 @@ type MiddlewareFn = (next: CoreFetchFn) => CoreFetchFn;
48
50
  /**
49
51
  * A successful response that carried an HTML page instead of the endpoint's payload.
50
52
  *
51
- * - Connection answers an expired session with a 302 to the login screen, and `fetch` follows it,
52
- * so the request resolves `200 text/html`.
53
- * - Without this the page reaches the caller as a string typed as the endpoint's DTO and fails much
54
- * later, wherever the value is first read — an Immutable accessor on a string, modules away.
55
- * - The message stays constant so Sentry groups every occurrence together; `request` and `response`
56
- * carry the per-request detail.
57
- * - Raised only by the clients that opt in: some APIs do serve HTML from a 200 on purpose.
53
+ * - An expired session 302s to the login page; `fetch` follows it to `200 text/html`.
54
+ * - Constant message so Sentry groups it; `request`/`response` carry the detail.
55
+ * - Opt-in per client: some APIs serve HTML from a 200 on purpose.
58
56
  */
59
57
  declare class HtmlResponseError extends ApiError {
60
58
  constructor(res: ApiResponse);
@@ -70,14 +68,10 @@ declare class ManagementClientAuthError extends ApiError {
70
68
  //#endregion
71
69
  //#region src/errors/ValidationError.d.ts
72
70
  /**
73
- * A payload the SDK refused to accept — an input a caller assembled wrongly, or a response that did
74
- * not match the shape the endpoint is documented to return.
71
+ * A rejected SDK input or a response not matching its documented shape.
75
72
  *
76
- * It exists so a `ZodError` never leaves the package. `ZodError.message` is `JSON.stringify` of its
77
- * issue list — over a kilobyte for two problems — and a consumer that renders a caught error's
78
- * message puts that blob in front of a user. `message` here is a single line built for exactly that
79
- * rendering, while `issues` keeps the structured detail for anyone inspecting the failure rather
80
- * than displaying it.
73
+ * - Replaces `ZodError`, whose `message` is a JSON blob; `message` here is one user-facing line.
74
+ * - `issues` keeps the structured detail.
81
75
  */
82
76
  declare class ValidationError extends Error {
83
77
  issues: z$1.core.$ZodIssue[];
@@ -87,17 +81,15 @@ declare const isValidationError: (error: unknown) => error is ValidationError;
87
81
  /**
88
82
  * One line per issue, prefixed by the field it belongs to.
89
83
  *
90
- * - Not `z.prettifyError`, which formats for a terminal — its `✖`/`→` glyphs and newlines survive a
91
- * log but collapse into one run-on line in HTML, where most of these end up.
92
- * - Exported for the boundaries that degrade instead of throwing: a read that drops one malformed
93
- * element still owes a reason, and it needs the same one line without a `ValidationError`.
94
- * - Says which field and what is wrong with it, never the value — so it is safe to log.
84
+ * - Not `z.prettifyError`: its terminal glyphs and newlines collapse in HTML.
85
+ * - Exported for boundaries that drop malformed elements instead of throwing.
86
+ * - Never includes the value, so it is safe to log.
95
87
  */
96
88
  declare const formatValidationIssues: (issues: readonly z$1.core.$ZodIssue[]) => string;
97
89
  /**
98
- * Parses with `schema`, converting a `ZodError` into a {@link ValidationError}. Use it instead of a
99
- * bare `schema.parse()` anywhere the value crosses the package boundary — every client input and
100
- * every response body.
90
+ * Parses with `schema`, throwing a {@link ValidationError} instead of a `ZodError`.
91
+ *
92
+ * - Use instead of `schema.parse()` for every client input and response body.
101
93
  */
102
94
  declare const parseOrThrow: <T extends z$1.ZodType>(schema: T, value: unknown) => z$1.output<T>;
103
95
  //#endregion
@@ -245,5 +237,5 @@ type FetchClient<Paths extends OpenapiPaths<Paths>> = {
245
237
  };
246
238
  declare const createOpenapiFetchClient: <Paths extends OpenapiPaths<Paths>>(defaultOptions: CreateFetchClientOptions) => FetchClient<Paths>;
247
239
  //#endregion
248
- export { HtmlResponseError as C, MiddlewareFn as D, HttpMethod as E, ValidateStatusFn as O, ManagementClientAuthError as S, ApiResponse as T, isTimeoutError as _, OpenapiParametersType as a, isValidationError as b, OpenapiReturnType as c, HttpContentType as d, HttpHeader as f, isFetchClientError as g, isApiError as h, OpenapiFormDataType as i, ApiError as k, UploadProgress as l, isAbortError as m, ArrayElement as n, OpenapiPathType as o, FetchClientError as p, OpenapiBodyType as r, OpenapiQueryType as s, createOpenapiFetchClient as t, createGenericFetchClient as u, ValidationError as v, isHtmlResponseError as w, parseOrThrow as x, formatValidationIssues as y };
249
- //# sourceMappingURL=index-KuQ79Mnz.d.ts.map
240
+ export { ApiError as A, HtmlResponseError as C, HttpMethod as D, BaseUrl as E, MiddlewareFn as O, ManagementClientAuthError as S, ApiResponse as T, isTimeoutError as _, OpenapiParametersType as a, isValidationError as b, OpenapiReturnType as c, HttpContentType as d, HttpHeader as f, isFetchClientError as g, isApiError as h, OpenapiFormDataType as i, ValidateStatusFn as k, UploadProgress as l, isAbortError as m, ArrayElement as n, OpenapiPathType as o, FetchClientError as p, OpenapiBodyType as r, OpenapiQueryType as s, createOpenapiFetchClient as t, createGenericFetchClient as u, ValidationError as v, isHtmlResponseError as w, parseOrThrow as x, formatValidationIssues as y };
241
+ //# sourceMappingURL=index-BVhHt5lx.d.cts.map
@@ -20,21 +20,15 @@ declare const keboolaUID: {
20
20
  //#endregion
21
21
  //#region src/utils/schemaGuidedMerge.d.ts
22
22
  /**
23
- * Merge `patch` into `base`, guided by `schema`: descend only through object schemas, merging
24
- * key-by-key. At every non-object node — a `z.union` (e.g. Snowflake's password|keypair auth),
25
- * an array, or a primitive — the patch REPLACES the base wholesale. That replace is what lets an
26
- * update *delete* keys the additive `deepMerge` cannot: switching a credential union to the other
27
- * variant drops the abandoned variant's secret, because the entire union subtree is swapped.
23
+ * Merge `patch` into `base`, descending only through object schemas.
28
24
  *
29
- * Consequence: a union (or array) subtree is all-or-nothing — the caller must send the complete
30
- * block, since a partial patch replaces (and so loses) the omitted siblings.
31
- *
32
- * Object keys present only in `base` (e.g. `storage`, `processors`, anything the schema omits) are
33
- * preserved at every level; `undefined` patch values are skipped. Assumes `patch` is already
34
- * schema-validated (so every object-valued patch key has a matching schema node). Pure — neither
35
- * argument is mutated.
25
+ * - At a non-object node (union, array, primitive) the patch replaces the base wholesale, so
26
+ * switching a union variant drops the old variant's secret.
27
+ * - Hence a union or array subtree is all-or-nothing: send the complete block.
28
+ * - Keys only in `base` are kept; `undefined` patch values are skipped.
29
+ * - Assumes `patch` is schema-validated. Pure.
36
30
  */
37
31
  declare const schemaGuidedMerge: <T extends Record<string, unknown>>(schema: z.core.$ZodType, base: T, patch: Record<string, unknown>) => T;
38
32
  //#endregion
39
33
  export { KeboolaObjectId as n, keboolaUID as r, schemaGuidedMerge as t };
40
- //# sourceMappingURL=index-NC1dXRTD.d.ts.map
34
+ //# sourceMappingURL=index-BfqkgPGI.d.cts.map
@@ -20,21 +20,15 @@ declare const keboolaUID: {
20
20
  //#endregion
21
21
  //#region src/utils/schemaGuidedMerge.d.ts
22
22
  /**
23
- * Merge `patch` into `base`, guided by `schema`: descend only through object schemas, merging
24
- * key-by-key. At every non-object node — a `z.union` (e.g. Snowflake's password|keypair auth),
25
- * an array, or a primitive — the patch REPLACES the base wholesale. That replace is what lets an
26
- * update *delete* keys the additive `deepMerge` cannot: switching a credential union to the other
27
- * variant drops the abandoned variant's secret, because the entire union subtree is swapped.
23
+ * Merge `patch` into `base`, descending only through object schemas.
28
24
  *
29
- * Consequence: a union (or array) subtree is all-or-nothing — the caller must send the complete
30
- * block, since a partial patch replaces (and so loses) the omitted siblings.
31
- *
32
- * Object keys present only in `base` (e.g. `storage`, `processors`, anything the schema omits) are
33
- * preserved at every level; `undefined` patch values are skipped. Assumes `patch` is already
34
- * schema-validated (so every object-valued patch key has a matching schema node). Pure — neither
35
- * argument is mutated.
25
+ * - At a non-object node (union, array, primitive) the patch replaces the base wholesale, so
26
+ * switching a union variant drops the old variant's secret.
27
+ * - Hence a union or array subtree is all-or-nothing: send the complete block.
28
+ * - Keys only in `base` are kept; `undefined` patch values are skipped.
29
+ * - Assumes `patch` is schema-validated. Pure.
36
30
  */
37
31
  declare const schemaGuidedMerge: <T extends Record<string, unknown>>(schema: z.core.$ZodType, base: T, patch: Record<string, unknown>) => T;
38
32
  //#endregion
39
33
  export { KeboolaObjectId as n, keboolaUID as r, schemaGuidedMerge as t };
40
- //# sourceMappingURL=index-NC1dXRTD.d.cts.map
34
+ //# sourceMappingURL=index-BfqkgPGI.d.ts.map
@@ -1,5 +1,5 @@
1
- import { IStringifyOptions } from "qs";
2
1
  import * as z$1 from "zod";
2
+ import { IStringifyOptions } from "qs";
3
3
  //#region src/errors/ApiError.d.ts
4
4
  declare class ApiError extends Error {
5
5
  response: Response;
@@ -17,8 +17,10 @@ type ParseAs = 'auto' | 'text' | 'json' | 'blob';
17
17
  type ValidateStatusFn = (options: ApiResponse) => boolean | ApiError;
18
18
  type CustomRequestInit = Omit<RequestInit, 'method' | 'body'>;
19
19
  type FetchFn = typeof fetch;
20
+ type BaseUrlFn = () => Promise<string>;
21
+ type BaseUrl = string | BaseUrlFn;
20
22
  type CreateFetchClientOptions = {
21
- baseUrl: string;
23
+ baseUrl: BaseUrl;
22
24
  validateStatus?: ValidateStatusFn;
23
25
  middlewares?: MiddlewareFn[];
24
26
  fetchFn?: FetchFn;
@@ -48,13 +50,9 @@ type MiddlewareFn = (next: CoreFetchFn) => CoreFetchFn;
48
50
  /**
49
51
  * A successful response that carried an HTML page instead of the endpoint's payload.
50
52
  *
51
- * - Connection answers an expired session with a 302 to the login screen, and `fetch` follows it,
52
- * so the request resolves `200 text/html`.
53
- * - Without this the page reaches the caller as a string typed as the endpoint's DTO and fails much
54
- * later, wherever the value is first read — an Immutable accessor on a string, modules away.
55
- * - The message stays constant so Sentry groups every occurrence together; `request` and `response`
56
- * carry the per-request detail.
57
- * - Raised only by the clients that opt in: some APIs do serve HTML from a 200 on purpose.
53
+ * - An expired session 302s to the login page; `fetch` follows it to `200 text/html`.
54
+ * - Constant message so Sentry groups it; `request`/`response` carry the detail.
55
+ * - Opt-in per client: some APIs serve HTML from a 200 on purpose.
58
56
  */
59
57
  declare class HtmlResponseError extends ApiError {
60
58
  constructor(res: ApiResponse);
@@ -70,14 +68,10 @@ declare class ManagementClientAuthError extends ApiError {
70
68
  //#endregion
71
69
  //#region src/errors/ValidationError.d.ts
72
70
  /**
73
- * A payload the SDK refused to accept — an input a caller assembled wrongly, or a response that did
74
- * not match the shape the endpoint is documented to return.
71
+ * A rejected SDK input or a response not matching its documented shape.
75
72
  *
76
- * It exists so a `ZodError` never leaves the package. `ZodError.message` is `JSON.stringify` of its
77
- * issue list — over a kilobyte for two problems — and a consumer that renders a caught error's
78
- * message puts that blob in front of a user. `message` here is a single line built for exactly that
79
- * rendering, while `issues` keeps the structured detail for anyone inspecting the failure rather
80
- * than displaying it.
73
+ * - Replaces `ZodError`, whose `message` is a JSON blob; `message` here is one user-facing line.
74
+ * - `issues` keeps the structured detail.
81
75
  */
82
76
  declare class ValidationError extends Error {
83
77
  issues: z$1.core.$ZodIssue[];
@@ -87,17 +81,15 @@ declare const isValidationError: (error: unknown) => error is ValidationError;
87
81
  /**
88
82
  * One line per issue, prefixed by the field it belongs to.
89
83
  *
90
- * - Not `z.prettifyError`, which formats for a terminal — its `✖`/`→` glyphs and newlines survive a
91
- * log but collapse into one run-on line in HTML, where most of these end up.
92
- * - Exported for the boundaries that degrade instead of throwing: a read that drops one malformed
93
- * element still owes a reason, and it needs the same one line without a `ValidationError`.
94
- * - Says which field and what is wrong with it, never the value — so it is safe to log.
84
+ * - Not `z.prettifyError`: its terminal glyphs and newlines collapse in HTML.
85
+ * - Exported for boundaries that drop malformed elements instead of throwing.
86
+ * - Never includes the value, so it is safe to log.
95
87
  */
96
88
  declare const formatValidationIssues: (issues: readonly z$1.core.$ZodIssue[]) => string;
97
89
  /**
98
- * Parses with `schema`, converting a `ZodError` into a {@link ValidationError}. Use it instead of a
99
- * bare `schema.parse()` anywhere the value crosses the package boundary — every client input and
100
- * every response body.
90
+ * Parses with `schema`, throwing a {@link ValidationError} instead of a `ZodError`.
91
+ *
92
+ * - Use instead of `schema.parse()` for every client input and response body.
101
93
  */
102
94
  declare const parseOrThrow: <T extends z$1.ZodType>(schema: T, value: unknown) => z$1.output<T>;
103
95
  //#endregion
@@ -245,5 +237,5 @@ type FetchClient<Paths extends OpenapiPaths<Paths>> = {
245
237
  };
246
238
  declare const createOpenapiFetchClient: <Paths extends OpenapiPaths<Paths>>(defaultOptions: CreateFetchClientOptions) => FetchClient<Paths>;
247
239
  //#endregion
248
- export { HtmlResponseError as C, MiddlewareFn as D, HttpMethod as E, ValidateStatusFn as O, ManagementClientAuthError as S, ApiResponse as T, isTimeoutError as _, OpenapiParametersType as a, isValidationError as b, OpenapiReturnType as c, HttpContentType as d, HttpHeader as f, isFetchClientError as g, isApiError as h, OpenapiFormDataType as i, ApiError as k, UploadProgress as l, isAbortError as m, ArrayElement as n, OpenapiPathType as o, FetchClientError as p, OpenapiBodyType as r, OpenapiQueryType as s, createOpenapiFetchClient as t, createGenericFetchClient as u, ValidationError as v, isHtmlResponseError as w, parseOrThrow as x, formatValidationIssues as y };
249
- //# sourceMappingURL=index-V7XKUQm9.d.cts.map
240
+ export { ApiError as A, HtmlResponseError as C, HttpMethod as D, BaseUrl as E, MiddlewareFn as O, ManagementClientAuthError as S, ApiResponse as T, isTimeoutError as _, OpenapiParametersType as a, isValidationError as b, OpenapiReturnType as c, HttpContentType as d, HttpHeader as f, isFetchClientError as g, isApiError as h, OpenapiFormDataType as i, ValidateStatusFn as k, UploadProgress as l, isAbortError as m, ArrayElement as n, OpenapiPathType as o, FetchClientError as p, OpenapiBodyType as r, OpenapiQueryType as s, createOpenapiFetchClient as t, createGenericFetchClient as u, ValidationError as v, isHtmlResponseError as w, parseOrThrow as x, formatValidationIssues as y };
241
+ //# sourceMappingURL=index-BgR5zcjJ.d.ts.map