@keboola/api-client 39.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 (518) hide show
  1. package/AGENTS.md +121 -100
  2. package/API-SURFACE.md +23 -2
  3. package/CHANGELOG.md +120 -0
  4. package/README.md +3 -3
  5. package/dist/{ManagementClientAuthError-FcfMJNhr.cjs → ManagementClientAuthError-DE7lNGZQ.cjs} +2 -2
  6. package/dist/{ManagementClientAuthError-FcfMJNhr.cjs.map → ManagementClientAuthError-DE7lNGZQ.cjs.map} +1 -1
  7. package/dist/{ManagementClientAuthError-Cr9IOsnJ.js → ManagementClientAuthError-H30lti_Q.js} +2 -2
  8. package/dist/{ManagementClientAuthError-Cr9IOsnJ.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-C_zP0lpv.cjs → appLogs-B9zFJIuy.cjs} +2 -2
  20. package/dist/{appLogs-C_zP0lpv.cjs.map → appLogs-B9zFJIuy.cjs.map} +1 -1
  21. package/dist/{appLogs-Cl7Q_MR9.js → appLogs-BBkkUOW1.js} +2 -2
  22. package/dist/{appLogs-Cl7Q_MR9.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-DLWnl18b.cjs → auth-Dm0F2rOh.cjs} +2 -2
  44. package/dist/{auth-DLWnl18b.cjs.map → auth-Dm0F2rOh.cjs.map} +1 -1
  45. package/dist/{auth-BjmkFOgd.js → auth-DworfoPy.js} +2 -2
  46. package/dist/{auth-BjmkFOgd.js.map → auth-DworfoPy.js.map} +1 -1
  47. package/dist/{authClient-8yU1last.cjs → authClient-BmuUo0J4.cjs} +141 -48
  48. package/dist/authClient-BmuUo0J4.cjs.map +1 -0
  49. package/dist/{authClient-CTHNs6Tq.d.cts → authClient-CHXWJ9x3.d.ts} +109 -76
  50. package/dist/{authClient-BTo4Afm6.js → authClient-CgcDGd30.js} +108 -39
  51. package/dist/authClient-CgcDGd30.js.map +1 -0
  52. package/dist/{authClient-D8i3JTM-.d.ts → 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 +1 -1
  60. package/dist/businessWorkspaceApi/index.d.cts +1 -1
  61. package/dist/businessWorkspaceApi/index.d.ts +1 -1
  62. package/dist/businessWorkspaceApi/index.js +1 -1
  63. package/dist/businessWorkspaceApi/types.d.cts +1 -1
  64. package/dist/businessWorkspaceApi/types.d.ts +1 -1
  65. package/dist/{businessWorkspaceApi-wyBdbpIJ.cjs → businessWorkspaceApi-6tCDdpnY.cjs} +3 -3
  66. package/dist/{businessWorkspaceApi-wyBdbpIJ.cjs.map → businessWorkspaceApi-6tCDdpnY.cjs.map} +1 -1
  67. package/dist/{businessWorkspaceApi-BD-iUj07.js → businessWorkspaceApi-BLUdefRF.js} +3 -3
  68. package/dist/{businessWorkspaceApi-BD-iUj07.js.map → businessWorkspaceApi-BLUdefRF.js.map} +1 -1
  69. package/dist/{businessWorkspaceApiClient-CRM1U8b-.d.cts → businessWorkspaceApiClient-BHDJlHFo.d.cts} +3 -3
  70. package/dist/{businessWorkspaceApiClient-C2WyWN3b.d.ts → businessWorkspaceApiClient-DI-z1VIH.d.ts} +3 -3
  71. package/dist/chat/index.cjs +7 -3
  72. package/dist/chat/index.cjs.map +1 -1
  73. package/dist/chat/index.d.cts +2 -2
  74. package/dist/chat/index.d.ts +2 -2
  75. package/dist/chat/index.js +7 -3
  76. package/dist/chat/index.js.map +1 -1
  77. package/dist/chat/types.cjs +1 -3
  78. package/dist/chat/types.cjs.map +1 -1
  79. package/dist/chat/types.d.cts +2 -2
  80. package/dist/chat/types.d.ts +2 -2
  81. package/dist/chat/types.js +1 -3
  82. package/dist/chat/types.js.map +1 -1
  83. package/dist/{componentId-DkyQ8PM0.cjs → componentId-57vjsa2i.cjs} +4 -2
  84. package/dist/{componentId-DkyQ8PM0.cjs.map → componentId-57vjsa2i.cjs.map} +1 -1
  85. package/dist/{componentId-vJz-kWs6.js → componentId-C6WZa_R1.js} +4 -2
  86. package/dist/{componentId-vJz-kWs6.js.map → componentId-C6WZa_R1.js.map} +1 -1
  87. package/dist/{concurrent-CH9fbNr3.js → concurrent-BacWxPwi.js} +5 -7
  88. package/dist/concurrent-BacWxPwi.js.map +1 -0
  89. package/dist/{concurrent-tbiIa0UL.cjs → concurrent-CdVfR1N5.cjs} +5 -7
  90. package/dist/concurrent-CdVfR1N5.cjs.map +1 -0
  91. package/dist/{configurations-VtNE0nrT.js → configurations-BPKGGy-M.js} +14 -22
  92. package/dist/configurations-BPKGGy-M.js.map +1 -0
  93. package/dist/{configurations-CyFF9Dtu.cjs → configurations-BTRHVSRq.cjs} +20 -53
  94. package/dist/configurations-BTRHVSRq.cjs.map +1 -0
  95. package/dist/{configurations-BVvcimzo.js → configurations-Chg_JwJ1.js} +20 -53
  96. package/dist/configurations-Chg_JwJ1.js.map +1 -0
  97. package/dist/{configurations-zkNjr73Q.cjs → configurations-IYyOvhI3.cjs} +14 -22
  98. package/dist/configurations-IYyOvhI3.cjs.map +1 -0
  99. package/dist/constants/index.cjs +1 -1
  100. package/dist/constants/index.d.cts +1 -1
  101. package/dist/constants/index.d.ts +1 -1
  102. package/dist/constants/index.js +1 -1
  103. package/dist/{createFetchClient-BlgPbjFj.cjs → createFetchClient-Cwp8max9.cjs} +11 -4
  104. package/dist/createFetchClient-Cwp8max9.cjs.map +1 -0
  105. package/dist/{createFetchClient-C-cadpBx.js → createFetchClient-DXHQK63w.js} +11 -4
  106. package/dist/createFetchClient-DXHQK63w.js.map +1 -0
  107. package/dist/{createGenericFetchClient-Bnf1QK9W.js → createGenericFetchClient-Dg1rgzmG.js} +2 -2
  108. package/dist/{createGenericFetchClient-Bnf1QK9W.js.map → createGenericFetchClient-Dg1rgzmG.js.map} +1 -1
  109. package/dist/{createGenericFetchClient-lcozzwk2.cjs → createGenericFetchClient-Dl9cqTvR.cjs} +2 -2
  110. package/dist/{createGenericFetchClient-lcozzwk2.cjs.map → createGenericFetchClient-Dl9cqTvR.cjs.map} +1 -1
  111. package/dist/{createOpenapiFetchClient-C3UmDXpe.cjs → createOpenapiFetchClient-BYqW-9tm.cjs} +2 -2
  112. package/dist/{createOpenapiFetchClient-C3UmDXpe.cjs.map → createOpenapiFetchClient-BYqW-9tm.cjs.map} +1 -1
  113. package/dist/{createOpenapiFetchClient-COaPeeQ0.js → createOpenapiFetchClient-DZUOVupy.js} +2 -2
  114. package/dist/{createOpenapiFetchClient-COaPeeQ0.js.map → createOpenapiFetchClient-DZUOVupy.js.map} +1 -1
  115. package/dist/dataScience/index.cjs +2 -2
  116. package/dist/dataScience/index.d.cts +2 -2
  117. package/dist/dataScience/index.d.ts +2 -2
  118. package/dist/dataScience/index.js +2 -2
  119. package/dist/dataScience/types.d.cts +2 -2
  120. package/dist/dataScience/types.d.ts +2 -2
  121. package/dist/{dataScience-D-hyc4GY.cjs → dataScience-B5QxZnvW.cjs} +5 -5
  122. package/dist/{dataScience-D-hyc4GY.cjs.map → dataScience-B5QxZnvW.cjs.map} +1 -1
  123. package/dist/{dataScience-B_BmnB1m.js → dataScience-OXcwdk1p.js} +5 -5
  124. package/dist/{dataScience-B_BmnB1m.js.map → dataScience-OXcwdk1p.js.map} +1 -1
  125. package/dist/dedupe-Cky1gSUu.js +21 -0
  126. package/dist/dedupe-Cky1gSUu.js.map +1 -0
  127. package/dist/dedupe-OSnnst2u.cjs +26 -0
  128. package/dist/dedupe-OSnnst2u.cjs.map +1 -0
  129. package/dist/developerPortal/index.cjs +1 -1
  130. package/dist/developerPortal/index.d.cts +2 -2
  131. package/dist/developerPortal/index.d.ts +2 -2
  132. package/dist/developerPortal/index.js +1 -1
  133. package/dist/developerPortal/types.d.cts +1 -1
  134. package/dist/developerPortal/types.d.ts +1 -1
  135. package/dist/{developerPortalClient-yHFTkKPb.js → developerPortalClient-B1QZ1rYi.js} +6 -8
  136. package/dist/{developerPortalClient-yHFTkKPb.js.map → developerPortalClient-B1QZ1rYi.js.map} +1 -1
  137. package/dist/{developerPortalClient-CutPqoAa.cjs → developerPortalClient-CLPpBksD.cjs} +6 -8
  138. package/dist/{developerPortalClient-CutPqoAa.cjs.map → developerPortalClient-CLPpBksD.cjs.map} +1 -1
  139. package/dist/domain/permissions/index.cjs +9 -30
  140. package/dist/domain/permissions/index.cjs.map +1 -1
  141. package/dist/domain/permissions/index.d.cts +29 -102
  142. package/dist/domain/permissions/index.d.ts +29 -102
  143. package/dist/domain/permissions/index.js +9 -30
  144. package/dist/domain/permissions/index.js.map +1 -1
  145. package/dist/domain/storageTable/index.d.cts +1 -1
  146. package/dist/domain/storageTable/index.d.ts +1 -1
  147. package/dist/editor/index.cjs +2 -2
  148. package/dist/editor/index.cjs.map +1 -1
  149. package/dist/editor/index.d.cts +2 -2
  150. package/dist/editor/index.d.ts +2 -2
  151. package/dist/editor/index.js +2 -2
  152. package/dist/editor/index.js.map +1 -1
  153. package/dist/editor/types.d.cts +1 -1
  154. package/dist/editor/types.d.ts +1 -1
  155. package/dist/encryption/index.cjs +2 -22
  156. package/dist/encryption/index.cjs.map +1 -1
  157. package/dist/encryption/index.d.cts +1 -1
  158. package/dist/encryption/index.d.ts +1 -1
  159. package/dist/encryption/index.js +2 -22
  160. package/dist/encryption/index.js.map +1 -1
  161. package/dist/encryption/types.d.cts +1 -1
  162. package/dist/encryption/types.d.ts +1 -1
  163. package/dist/import/index.cjs +1 -1
  164. package/dist/import/index.d.cts +3 -3
  165. package/dist/import/index.d.ts +3 -3
  166. package/dist/import/index.js +1 -1
  167. package/dist/{import-7YyyD_U_.cjs → import-CNk89mqy.cjs} +3 -3
  168. package/dist/{import-7YyyD_U_.cjs.map → import-CNk89mqy.cjs.map} +1 -1
  169. package/dist/{import-xliONVib.js → import-DiMQCzLa.js} +3 -3
  170. package/dist/{import-xliONVib.js.map → import-DiMQCzLa.js.map} +1 -1
  171. package/dist/{index-1r_CskjU.d.ts → index--ZpnE3YT.d.cts} +3 -3
  172. package/dist/{index-C77vTm2K.d.ts → index-BDZvaRud.d.ts} +6 -6
  173. package/dist/{index-KuQ79Mnz.d.ts → index-BVhHt5lx.d.cts} +18 -26
  174. package/dist/{index-NC1dXRTD.d.ts → index-BfqkgPGI.d.cts} +7 -13
  175. package/dist/{index-NC1dXRTD.d.cts → index-BfqkgPGI.d.ts} +7 -13
  176. package/dist/{index-V7XKUQm9.d.cts → index-BgR5zcjJ.d.ts} +18 -26
  177. package/dist/{index-GfKzh267.d.ts → index-BkqackZf.d.ts} +369 -297
  178. package/dist/{index-BK-qHT39.d.ts → index-ByRpNVcs.d.cts} +83 -17
  179. package/dist/{index-pXN4LWUX.d.ts → index-C11JSxBY.d.ts} +8 -11
  180. package/dist/{index-GjcJTCbz.d.cts → index-C4TNAA8-.d.cts} +8 -11
  181. package/dist/{index-DBklbaTp.d.cts → index-C8gRRWHL.d.cts} +3 -1
  182. package/dist/{index-DBklbaTp.d.ts → index-C8gRRWHL.d.ts} +3 -1
  183. package/dist/{index-3LUk2rpD.d.ts → index-CPu4Nezo.d.cts} +34 -9
  184. package/dist/{index-BMqLPS6S.d.ts → index-CXcWpZQ2.d.cts} +4 -12
  185. package/dist/{index-BMqLPS6S.d.cts → index-CXcWpZQ2.d.ts} +4 -12
  186. package/dist/{index-Dx52hNLP.d.cts → index-CcMHJcuP.d.cts} +3 -3
  187. package/dist/{index-DVw4Av4b.d.cts → index-Cvbjp3jx.d.cts} +6 -6
  188. package/dist/{index-DppA4k3b.d.cts → index-Cz0MXhzs.d.cts} +5 -5
  189. package/dist/{index-6Xe81qN3.d.ts → index-D-VMgpGc.d.ts} +5 -5
  190. package/dist/{index-DWf6FXOr.d.cts → index-D7-o-oGa.d.ts} +3 -3
  191. package/dist/{index-CWoEnDJ_.d.cts → index-DCRKjihs.d.ts} +83 -17
  192. package/dist/{kaiAgentClient-CHpULyeG.d.cts → index-DNThyEej.d.cts} +14 -5
  193. package/dist/{index-DXSmFkol.d.cts → index-DOAZmWvh.d.cts} +6 -6
  194. package/dist/{index-CHXnJQ9s.d.cts → index-DXYASsPP.d.cts} +369 -297
  195. package/dist/{index-BuegqrS1.d.ts → index-D_-4uQF8.d.ts} +3 -3
  196. package/dist/{index-CW3Pj7DY.d.cts → index-Dazy-meb.d.ts} +34 -9
  197. package/dist/{index-De5qUWhp.d.ts → index-DnQTuc6t.d.ts} +6 -6
  198. package/dist/{kaiAgentClient-B5L4gbQ1.d.ts → index-Qb7X6-ph.d.ts} +14 -5
  199. package/dist/index.cjs +1498 -901
  200. package/dist/index.cjs.map +1 -1
  201. package/dist/index.d.cts +7 -7
  202. package/dist/index.d.ts +7 -7
  203. package/dist/index.js +1497 -902
  204. package/dist/index.js.map +1 -1
  205. package/dist/isLoginPageRedirect-XPwAOKK3.js +14 -0
  206. package/dist/isLoginPageRedirect-XPwAOKK3.js.map +1 -0
  207. package/dist/isLoginPageRedirect-jQHiLrG7.cjs +19 -0
  208. package/dist/isLoginPageRedirect-jQHiLrG7.cjs.map +1 -0
  209. package/dist/{jobStatus-0_Y3Sr4i.cjs → jobStatus-BMlsyXWI.cjs} +19 -45
  210. package/dist/jobStatus-BMlsyXWI.cjs.map +1 -0
  211. package/dist/{jobStatus-PSZJMTiA.js → jobStatus-CfRtsIpv.js} +19 -45
  212. package/dist/jobStatus-CfRtsIpv.js.map +1 -0
  213. package/dist/kaiAgent/index.cjs +1 -1
  214. package/dist/kaiAgent/index.d.cts +3 -2
  215. package/dist/kaiAgent/index.d.ts +3 -2
  216. package/dist/kaiAgent/index.js +1 -1
  217. package/dist/kaiAgent/types.d.cts +2 -2
  218. package/dist/kaiAgent/types.d.ts +2 -2
  219. package/dist/{kaiAgent-CcT2oNip.js → kaiAgent-Dp20HLTh.js} +32 -11
  220. package/dist/kaiAgent-Dp20HLTh.js.map +1 -0
  221. package/dist/{kaiAgent-DaB6UCsh.cjs → kaiAgent-QNoeVKPs.cjs} +32 -11
  222. package/dist/kaiAgent-QNoeVKPs.cjs.map +1 -0
  223. package/dist/kaiMemory-CClSPInt.cjs +289 -0
  224. package/dist/kaiMemory-CClSPInt.cjs.map +1 -0
  225. package/dist/kaiMemory-D0Y_16U4.js +260 -0
  226. package/dist/kaiMemory-D0Y_16U4.js.map +1 -0
  227. package/dist/management/index.cjs +1 -1
  228. package/dist/management/index.d.cts +1 -1
  229. package/dist/management/index.d.ts +1 -1
  230. package/dist/management/index.js +1 -1
  231. package/dist/management/types.d.cts +2 -2
  232. package/dist/management/types.d.ts +2 -2
  233. package/dist/{management-DeZiQSlw.cjs → management-CCY0IYnq.cjs} +59 -24
  234. package/dist/management-CCY0IYnq.cjs.map +1 -0
  235. package/dist/{management-ckdnu1dA.js → management-DvmPiG64.js} +59 -24
  236. package/dist/management-DvmPiG64.js.map +1 -0
  237. package/dist/metastore/index.cjs +1 -1
  238. package/dist/metastore/index.d.cts +1 -1
  239. package/dist/metastore/index.d.ts +1 -1
  240. package/dist/metastore/index.js +1 -1
  241. package/dist/metastore/types.d.cts +2 -2
  242. package/dist/metastore/types.d.ts +2 -2
  243. package/dist/{metastore-B0PolCjQ.js → metastore-BycJxe7A.js} +14 -8
  244. package/dist/metastore-BycJxe7A.js.map +1 -0
  245. package/dist/{metastore-9AGrwjmN.cjs → metastore-XtWciCZT.cjs} +14 -8
  246. package/dist/metastore-XtWciCZT.cjs.map +1 -0
  247. package/dist/microsoftGraph/index.cjs +2 -2
  248. package/dist/microsoftGraph/index.d.cts +2 -2
  249. package/dist/microsoftGraph/index.d.ts +2 -2
  250. package/dist/microsoftGraph/index.js +2 -2
  251. package/dist/microsoftGraph/types.d.cts +1 -1
  252. package/dist/microsoftGraph/types.d.ts +1 -1
  253. package/dist/middleware-CBwrtgQd.js +34 -0
  254. package/dist/middleware-CBwrtgQd.js.map +1 -0
  255. package/dist/middleware-IjYx3d5u.cjs +45 -0
  256. package/dist/middleware-IjYx3d5u.cjs.map +1 -0
  257. package/dist/notifications/index.cjs +4 -4
  258. package/dist/notifications/index.d.cts +2 -2
  259. package/dist/notifications/index.d.ts +2 -2
  260. package/dist/notifications/index.js +4 -4
  261. package/dist/notifications/types.d.cts +1 -1
  262. package/dist/notifications/types.d.ts +1 -1
  263. package/dist/oauth/index.cjs +1 -1
  264. package/dist/oauth/index.d.cts +2 -2
  265. package/dist/oauth/index.d.ts +2 -2
  266. package/dist/oauth/index.js +1 -1
  267. package/dist/oauth/types.d.cts +1 -1
  268. package/dist/oauth/types.d.ts +1 -1
  269. package/dist/{oauth-DNtv4Ihb.cjs → oauth--2p8jkJf.cjs} +5 -5
  270. package/dist/{oauth-DNtv4Ihb.cjs.map → oauth--2p8jkJf.cjs.map} +1 -1
  271. package/dist/{oauth-BnHVf4cB.js → oauth-l5zE39cD.js} +5 -5
  272. package/dist/{oauth-BnHVf4cB.js.map → oauth-l5zE39cD.js.map} +1 -1
  273. package/dist/omnisearch/index.cjs +6 -14
  274. package/dist/omnisearch/index.cjs.map +1 -1
  275. package/dist/omnisearch/index.d.cts +6 -14
  276. package/dist/omnisearch/index.d.ts +6 -14
  277. package/dist/omnisearch/index.js +6 -14
  278. package/dist/omnisearch/index.js.map +1 -1
  279. package/dist/omnisearch/types.d.cts +1 -1
  280. package/dist/omnisearch/types.d.ts +1 -1
  281. package/dist/{project-DCHOxRWd.d.ts → project-B15gStbM.d.ts} +2 -2
  282. package/dist/{project-BRpzv3yE.d.cts → project-cHKuGvqJ.d.cts} +2 -2
  283. package/dist/queryService/index.cjs +1 -1
  284. package/dist/queryService/index.d.cts +1 -1
  285. package/dist/queryService/index.d.ts +1 -1
  286. package/dist/queryService/index.js +1 -1
  287. package/dist/queryService/types.d.cts +1 -1
  288. package/dist/queryService/types.d.ts +1 -1
  289. package/dist/{queryService-j3XZ2mX6.js → queryService-CCOYbRbw.js} +6 -6
  290. package/dist/{queryService-j3XZ2mX6.js.map → queryService-CCOYbRbw.js.map} +1 -1
  291. package/dist/{queryService-BVwD6Vmc.cjs → queryService-CQzclHdL.cjs} +6 -6
  292. package/dist/{queryService-BVwD6Vmc.cjs.map → queryService-CQzclHdL.cjs.map} +1 -1
  293. package/dist/queue/index.cjs +1 -1
  294. package/dist/queue/index.d.cts +3 -3
  295. package/dist/queue/index.d.ts +3 -3
  296. package/dist/queue/index.js +1 -1
  297. package/dist/queue/types.d.cts +1 -1
  298. package/dist/queue/types.d.ts +1 -1
  299. package/dist/{queue-Dagl0sdP.js → queue-Cowbg6bR.js} +8 -11
  300. package/dist/queue-Cowbg6bR.js.map +1 -0
  301. package/dist/{queue-e3rMWbmK.cjs → queue-UG_BWKIC.cjs} +8 -11
  302. package/dist/queue-UG_BWKIC.cjs.map +1 -0
  303. package/dist/scheduler/index.cjs +4 -4
  304. package/dist/scheduler/index.d.cts +2 -2
  305. package/dist/scheduler/index.d.ts +2 -2
  306. package/dist/scheduler/index.js +4 -4
  307. package/dist/scheduler/types.d.cts +1 -1
  308. package/dist/scheduler/types.d.ts +1 -1
  309. package/dist/sdk/configurations/index.cjs +1 -1
  310. package/dist/sdk/configurations/index.d.cts +11 -11
  311. package/dist/sdk/configurations/index.d.ts +11 -11
  312. package/dist/sdk/configurations/index.js +1 -1
  313. package/dist/sdk/developerPortal/index.cjs +10 -18
  314. package/dist/sdk/developerPortal/index.cjs.map +1 -1
  315. package/dist/sdk/developerPortal/index.d.cts +7 -15
  316. package/dist/sdk/developerPortal/index.d.ts +7 -15
  317. package/dist/sdk/developerPortal/index.js +7 -15
  318. package/dist/sdk/developerPortal/index.js.map +1 -1
  319. package/dist/sdk/kaiMemory/index.cjs +7 -0
  320. package/dist/sdk/kaiMemory/index.d.cts +41 -0
  321. package/dist/sdk/kaiMemory/index.d.ts +41 -0
  322. package/dist/sdk/kaiMemory/index.js +2 -0
  323. package/dist/sdk/kaiMemory/types.cjs +0 -0
  324. package/dist/sdk/kaiMemory/types.d.cts +2 -0
  325. package/dist/sdk/kaiMemory/types.d.ts +2 -0
  326. package/dist/sdk/kaiMemory/types.js +1 -0
  327. package/dist/sdk/queryService/index.cjs +2 -2
  328. package/dist/sdk/queryService/index.d.cts +1 -1
  329. package/dist/sdk/queryService/index.d.ts +1 -1
  330. package/dist/sdk/queryService/index.js +2 -2
  331. package/dist/sdk/semanticLayer/index.cjs +1 -1
  332. package/dist/sdk/semanticLayer/index.d.cts +16 -40
  333. package/dist/sdk/semanticLayer/index.d.ts +16 -40
  334. package/dist/sdk/semanticLayer/index.js +1 -1
  335. package/dist/sdk/semanticLayer/types.d.cts +1 -1
  336. package/dist/sdk/semanticLayer/types.d.ts +1 -1
  337. package/dist/sdk/storage/index.cjs +0 -5
  338. package/dist/sdk/storage/index.cjs.map +1 -1
  339. package/dist/sdk/storage/index.d.cts +2 -2
  340. package/dist/sdk/storage/index.d.ts +2 -2
  341. package/dist/sdk/storage/index.js +1 -5
  342. package/dist/sdk/storage/index.js.map +1 -1
  343. package/dist/sdk/tag/index.cjs +1 -1
  344. package/dist/sdk/tag/index.d.cts +3 -3
  345. package/dist/sdk/tag/index.d.ts +3 -3
  346. package/dist/sdk/tag/index.js +1 -1
  347. package/dist/sdk/tag/types.d.cts +1 -1
  348. package/dist/sdk/tag/types.d.ts +1 -1
  349. package/dist/sdk/vault/index.cjs +1 -1
  350. package/dist/sdk/vault/index.d.cts +1 -1
  351. package/dist/sdk/vault/index.d.ts +1 -1
  352. package/dist/sdk/vault/index.js +1 -1
  353. package/dist/{semanticLayer-9uTaU7UT.cjs → semanticLayer-CKDVkU56.cjs} +62 -183
  354. package/dist/semanticLayer-CKDVkU56.cjs.map +1 -0
  355. package/dist/{semanticLayer-6_gtFxDu.js → semanticLayer-pYy082Ju.js} +62 -183
  356. package/dist/semanticLayer-pYy082Ju.js.map +1 -0
  357. package/dist/status/index.cjs +1 -1
  358. package/dist/status/index.d.cts +1 -1
  359. package/dist/status/index.d.ts +1 -1
  360. package/dist/status/index.js +1 -1
  361. package/dist/storage/index.cjs +5 -5
  362. package/dist/storage/index.d.cts +2 -2
  363. package/dist/storage/index.d.ts +2 -2
  364. package/dist/storage/index.js +5 -5
  365. package/dist/storage/types.d.cts +2 -2
  366. package/dist/storage/types.d.ts +2 -2
  367. package/dist/{storage-Ob1LUIDq.js → storage-CZQHZcXG.js} +109 -302
  368. package/dist/storage-CZQHZcXG.js.map +1 -0
  369. package/dist/{storage-HFUdEy7P.cjs → storage-JinL1y1s.cjs} +109 -302
  370. package/dist/storage-JinL1y1s.cjs.map +1 -0
  371. package/dist/stream/index.cjs +3 -3
  372. package/dist/stream/index.d.cts +2 -2
  373. package/dist/stream/index.d.ts +2 -2
  374. package/dist/stream/index.js +3 -3
  375. package/dist/stream/types.d.cts +1 -1
  376. package/dist/stream/types.d.ts +1 -1
  377. package/dist/syncActions/index.cjs +1 -1
  378. package/dist/syncActions/index.d.cts +1 -1
  379. package/dist/syncActions/index.d.ts +1 -1
  380. package/dist/syncActions/index.js +1 -1
  381. package/dist/syncActions/types.d.cts +2 -2
  382. package/dist/syncActions/types.d.ts +2 -2
  383. package/dist/{syncActions-B3NS5a0g.js → syncActions-BmmoqZO_.js} +130 -111
  384. package/dist/syncActions-BmmoqZO_.js.map +1 -0
  385. package/dist/{syncActions-D2DhY6pP.cjs → syncActions-CtcLGQiy.cjs} +130 -111
  386. package/dist/syncActions-CtcLGQiy.cjs.map +1 -0
  387. package/dist/{tag-CsoOZWB_.cjs → tag-DHS_soa7.cjs} +2 -2
  388. package/dist/{tag-CsoOZWB_.cjs.map → tag-DHS_soa7.cjs.map} +1 -1
  389. package/dist/{tag-DCsoewjL.js → tag-hh-1nhNr.js} +2 -2
  390. package/dist/{tag-DCsoewjL.js.map → tag-hh-1nhNr.js.map} +1 -1
  391. package/dist/telemetry/index.cjs +7 -11
  392. package/dist/telemetry/index.cjs.map +1 -1
  393. package/dist/telemetry/index.d.cts +5 -9
  394. package/dist/telemetry/index.d.ts +5 -9
  395. package/dist/telemetry/index.js +7 -11
  396. package/dist/telemetry/index.js.map +1 -1
  397. package/dist/telemetry/types.d.cts +1 -1
  398. package/dist/telemetry/types.d.ts +1 -1
  399. package/dist/{types-DqxIx9Pi.d.cts → types-6kuMW4JW.d.cts} +2 -2
  400. package/dist/{types-Ct0YPy2w.d.ts → types-B2w2TtSA.d.ts} +3 -3
  401. package/dist/{types-M46WuBSm.d.cts → types-B61aCifg.d.cts} +2 -2
  402. package/dist/{types-COL1kVEB.d.cts → types-B8N_k79M.d.cts} +2 -2
  403. package/dist/{types-Jw10xuOW.d.cts → types-BIECJYun.d.ts} +171 -44
  404. package/dist/{types-DZk3XHiN.d.cts → types-BLNB882w.d.cts} +3 -3
  405. package/dist/{types-BEe50G2r.d.cts → types-BPy5Ozee.d.cts} +2 -2
  406. package/dist/{types-gi4Eay19.d.ts → types-BS4jwuMi.d.ts} +7 -15
  407. package/dist/{types-BrYkBQo4.d.ts → types-BTK7Bv3n.d.cts} +171 -44
  408. package/dist/{types-DYzJ6K2e.d.ts → types-BYM9Ptz5.d.ts} +93 -43
  409. package/dist/{types-D6UmMa6E.d.ts → types-BZDV8DZk.d.ts} +3 -3
  410. package/dist/{types-Cz83RiVu.d.cts → types-B_iLJlp4.d.ts} +255 -12
  411. package/dist/{types-CmF3pR2n.d.cts → types-BiMahEK8.d.cts} +91 -237
  412. package/dist/{types-BH5LLeJy.d.ts → types-Bl03Cg2n.d.cts} +255 -12
  413. package/dist/{types-bGQb4Jtl.d.cts → types-ByLH46Dt.d.cts} +13 -8
  414. package/dist/{types-g3vU7hcg.d.cts → types-Bydx6ga_.d.cts} +2 -2
  415. package/dist/{types-CW6lCqrC.d.cts → types-CFeZCQ9p.d.cts} +93 -43
  416. package/dist/{types-B95uNQ9o.d.ts → types-CKmTZSPG.d.ts} +91 -237
  417. package/dist/{types-D_j2Uq5X.d.cts → types-CMzQSHAQ.d.cts} +3 -3
  418. package/dist/{types-N3EChotg.d.cts → types-CP_LBmw3.d.cts} +2 -2
  419. package/dist/{types-zZBxJ0P-.d.ts → types-CWyXTMwy.d.ts} +2 -2
  420. package/dist/{types-CPB-eF82.d.ts → types-CZJlLCbA.d.ts} +2 -2
  421. package/dist/{types-l9o4gFsI.d.ts → types-CZXPu3gn.d.ts} +2 -2
  422. package/dist/{types-BztF4HeB.d.ts → types-CaOtNjSZ.d.ts} +6 -13
  423. package/dist/{types-BTWIPEiU.d.ts → types-CfwqVkEA.d.ts} +2 -2
  424. package/dist/types-Cg14ncdV.d.ts +63 -0
  425. package/dist/{types-BsxLGDoC.d.cts → types-CoJVrRAD.d.ts} +2 -2
  426. package/dist/{types-CKiW3n6v.d.ts → types-D3wcs4tp.d.ts} +2 -2
  427. package/dist/{types-DOyNe7oe.d.cts → types-DDOa07rU.d.cts} +7 -15
  428. package/dist/{types-BW2BXUB4.d.cts → types-DE9hgr7i.d.cts} +2 -2
  429. package/dist/{types-BOqD3Hqy.d.cts → types-DEzW1CfI.d.cts} +3 -3
  430. package/dist/{types-OaD-cbbl.d.ts → types-DIiOMV-t.d.ts} +3 -3
  431. package/dist/{types-B-P4vQe0.d.cts → types-DKc1gmd9.d.ts} +857 -131
  432. package/dist/{types-BrPlv-NS.d.ts → types-DRCMBt89.d.ts} +3 -3
  433. package/dist/{types-BQvv4RaI.d.cts → types-DUMal2E-.d.cts} +5 -8
  434. package/dist/types-DWiLcrxt.d.cts +63 -0
  435. package/dist/{types-DNxOHnZI.d.cts → types-Dd31Lw4S.d.cts} +2 -2
  436. package/dist/{types-Dmu-8g4O.d.ts → types-DekYAlA-.d.ts} +3 -3
  437. package/dist/{types-B2U9cFcx.d.ts → types-DgJeO9Nd.d.ts} +2 -2
  438. package/dist/{types-nrviNdzZ.d.ts → types-DicSaNwq.d.ts} +2 -2
  439. package/dist/{types-Crhy0c9m.d.cts → types-DinIJ1D_.d.cts} +40 -11
  440. package/dist/{types-DhDNS-5B.d.ts → types-DlQw6FCi.d.ts} +13 -8
  441. package/dist/{types-_RhBCj4_.d.cts → types-DoZtE9tz.d.cts} +3 -3
  442. package/dist/{types-Bxhh2SJr.d.ts → types-DrvKfXXd.d.cts} +2 -2
  443. package/dist/{types-DPl8pZsY.d.ts → types-Dtuvhm3K.d.cts} +857 -131
  444. package/dist/{types-CcrvrAJX.d.ts → types-DwVSj-Da.d.ts} +5 -8
  445. package/dist/{types-C2vefB4D.d.ts → types-FwRmjsNN.d.ts} +10 -34
  446. package/dist/{types-C0_2KZ-A.d.ts → types-RbrfiY8T.d.ts} +2 -2
  447. package/dist/{types-DfvdbRPL.d.ts → types-WZBztugL.d.ts} +2 -2
  448. package/dist/{types-52irAt99.d.cts → types-YHUEArkR.d.cts} +2 -2
  449. package/dist/{types-fX4gbxfV.d.cts → types-bc-4z_gc.d.cts} +10 -34
  450. package/dist/{types-3eUgOA7I.d.cts → types-ePSqbXRr.d.cts} +6 -13
  451. package/dist/{types-DrqKICcK.d.ts → types-n4PTnLii.d.ts} +40 -11
  452. package/dist/{types-DXskkNp8.d.cts → types-pvQzbgNE.d.cts} +3 -3
  453. package/dist/{types-DajzGOKB.d.ts → types-q-1r_9d1.d.ts} +2 -2
  454. package/dist/{types-D8Rrz51O.d.cts → types-tKkeLa2B.d.cts} +2 -2
  455. package/dist/{validateConnectionStatus-828HV8WL.js → validateConnectionStatus-BEGu8wXT.js} +6 -10
  456. package/dist/validateConnectionStatus-BEGu8wXT.js.map +1 -0
  457. package/dist/{validateConnectionStatus-CvBKyeDO.cjs → validateConnectionStatus-BEYkQpu9.cjs} +6 -10
  458. package/dist/validateConnectionStatus-BEYkQpu9.cjs.map +1 -0
  459. package/dist/vault/index.cjs +4 -4
  460. package/dist/vault/index.d.cts +1 -1
  461. package/dist/vault/index.d.ts +1 -1
  462. package/dist/vault/index.js +4 -4
  463. package/dist/vault/types.d.cts +1 -1
  464. package/dist/vault/types.d.ts +1 -1
  465. package/package.json +32 -4
  466. package/surface/apps.md +3 -3
  467. package/surface/auth.md +13 -6
  468. package/surface/chat.md +6 -6
  469. package/surface/kaiAgent.md +9 -8
  470. package/surface/management.md +14 -5
  471. package/surface/metastore.md +2 -2
  472. package/surface/queue.md +3 -3
  473. package/surface/sdk.md +13 -3
  474. package/surface/storage.md +6 -6
  475. package/surface/syncActions.md +9 -0
  476. package/dist/ValidationError-BekhphAq.js +0 -48
  477. package/dist/ValidationError-BekhphAq.js.map +0 -1
  478. package/dist/ValidationError-CLVJCCwH.cjs.map +0 -1
  479. package/dist/authClient-8yU1last.cjs.map +0 -1
  480. package/dist/authClient-BTo4Afm6.js.map +0 -1
  481. package/dist/concurrent-CH9fbNr3.js.map +0 -1
  482. package/dist/concurrent-tbiIa0UL.cjs.map +0 -1
  483. package/dist/configurations-BVvcimzo.js.map +0 -1
  484. package/dist/configurations-CyFF9Dtu.cjs.map +0 -1
  485. package/dist/configurations-VtNE0nrT.js.map +0 -1
  486. package/dist/configurations-zkNjr73Q.cjs.map +0 -1
  487. package/dist/createFetchClient-BlgPbjFj.cjs.map +0 -1
  488. package/dist/createFetchClient-C-cadpBx.js.map +0 -1
  489. package/dist/credential-CAulvfZ-.cjs +0 -47
  490. package/dist/credential-CAulvfZ-.cjs.map +0 -1
  491. package/dist/credential-DWXbo4IX.js +0 -36
  492. package/dist/credential-DWXbo4IX.js.map +0 -1
  493. package/dist/dedupe-CiskLkGR.cjs +0 -30
  494. package/dist/dedupe-CiskLkGR.cjs.map +0 -1
  495. package/dist/dedupe-DYIHgZoG.js +0 -25
  496. package/dist/dedupe-DYIHgZoG.js.map +0 -1
  497. package/dist/isLoginPageRedirect-Cm6Pn8Pj.cjs +0 -25
  498. package/dist/isLoginPageRedirect-Cm6Pn8Pj.cjs.map +0 -1
  499. package/dist/isLoginPageRedirect-hyPqyWNX.js +0 -20
  500. package/dist/isLoginPageRedirect-hyPqyWNX.js.map +0 -1
  501. package/dist/jobStatus-0_Y3Sr4i.cjs.map +0 -1
  502. package/dist/jobStatus-PSZJMTiA.js.map +0 -1
  503. package/dist/kaiAgent-CcT2oNip.js.map +0 -1
  504. package/dist/kaiAgent-DaB6UCsh.cjs.map +0 -1
  505. package/dist/management-DeZiQSlw.cjs.map +0 -1
  506. package/dist/management-ckdnu1dA.js.map +0 -1
  507. package/dist/metastore-9AGrwjmN.cjs.map +0 -1
  508. package/dist/metastore-B0PolCjQ.js.map +0 -1
  509. package/dist/queue-Dagl0sdP.js.map +0 -1
  510. package/dist/queue-e3rMWbmK.cjs.map +0 -1
  511. package/dist/semanticLayer-6_gtFxDu.js.map +0 -1
  512. package/dist/semanticLayer-9uTaU7UT.cjs.map +0 -1
  513. package/dist/storage-HFUdEy7P.cjs.map +0 -1
  514. package/dist/storage-Ob1LUIDq.js.map +0 -1
  515. package/dist/syncActions-B3NS5a0g.js.map +0 -1
  516. package/dist/syncActions-D2DhY6pP.cjs.map +0 -1
  517. package/dist/validateConnectionStatus-828HV8WL.js.map +0 -1
  518. package/dist/validateConnectionStatus-CvBKyeDO.cjs.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createFetchClient-Cwp8max9.cjs","names":[],"sources":["../src/errors/ApiError.ts","../src/internal.ts","../src/fetchClient/createFetchClient/utils.ts","../src/fetchClient/createFetchClient/createFetchClient.ts"],"sourcesContent":["import type { ApiResponse } from '../fetchClient/createFetchClient/types';\n\n/**\n * The status line, as a message an error reporter can group on.\n *\n * - `statusText` is empty on every HTTP/2 response: the protocol dropped the reason phrase, and\n * `fetch` reports that as `''` rather than synthesising one.\n * - So the status number leads, and `statusText` only decorates it where a server sent one.\n * - Without this an HTTP/2 failure reaches Sentry as `Error:` with an empty message, and the\n * status — the one field that says what went wrong — is absent from the report.\n */\nconst statusLine = (response: Response) =>\n response.statusText ? `${response.status} ${response.statusText}` : `${response.status}`;\n\nexport class ApiError extends Error {\n response: Response;\n request: Request;\n data: unknown;\n\n constructor({ response, request, data }: ApiResponse) {\n super(statusLine(response));\n this.name = 'ApiError';\n this.response = response;\n this.request = request;\n this.data = data;\n }\n}\n","// Package-internal constants. Not part of the public\n// `@keboola/api-client/constants` sub-path (that is the `constants/` directory).\n\nexport const KeboolaHttpHeader = {\n STORAGE_API_TOKEN: 'X-StorageApi-Token',\n MANAGEMENT_API_TOKEN: 'X-Kbc-Manageapitoken',\n STORAGE_API_URL: 'x-storageapi-url',\n PROJECT_ID: 'X-KBC-ProjectId',\n /** Storage job a request enqueued, reported on the response rather than in its body. */\n STORAGE_API_JOB_ID: 'X-StorageApi-Job-Id',\n /** Set to \"1\" to opt an auth call into browser/cookie mode. */\n CSRF: 'X-KBC-CSRF',\n} as const;\n\nexport const HttpStatus = {\n NO_CONTENT: 204,\n BAD_REQUEST: 400,\n UNAUTHORIZED: 401,\n NOT_FOUND: 404,\n UNPROCESSABLE_ENTITY: 422,\n INTERNAL_SERVER_ERROR: 500,\n BAD_GATEWAY: 502,\n SERVICE_UNAVAILABLE: 503,\n GATEWAY_TIMEOUT: 504,\n} as const;\n\nexport const ENCRYPTED_VALUE_PREFIX = 'KBC::';\n","import type { IStringifyOptions } from 'qs';\nimport qs from 'qs';\n\nimport { HttpStatus } from '../../internal';\n\nimport type {\n ApiResponse,\n BodyParam,\n CreateFetchRequestFn,\n ParseAs,\n PathParam,\n ValidateStatusFn,\n} from './types';\n\n/**\n * Strips trailing slashes from a base URL so concatenating a leading-slash\n * path (e.g. `/v2/storage`) never produces a double slash.\n *\n * Without this, callers that pass `https://connection.keboola.com/` end up\n * issuing requests to `https://connection.keboola.com//v2/storage/...`, which\n * the Storage API rejects with a 404.\n */\nexport const normalizeBaseUrl = (baseUrl: string): string => baseUrl.replace(/\\/+$/, '');\n\nexport const HttpHeader = {\n CONTENT_TYPE: 'content-type',\n CONTENT_DISPOSITION: 'content-disposition',\n AUTHORIZATION: 'Authorization',\n IDEMPOTENCY_KEY: 'Idempotency-Key',\n IF_MATCH: 'If-Match',\n};\n\nexport const HttpContentType = {\n JSON: 'application/json',\n TEXT_PLAIN: 'text/plain',\n FORM_DATA: 'multipart/form-data',\n TEXT_HTML: 'text/html',\n};\n\nexport const defaultValidateStatus: ValidateStatusFn = ({ response }) =>\n response.status >= 200 && response.status <= 299;\n\n/**\n * Whether a response declares HTML.\n *\n * - Media types are case-insensitive, so `Text/HTML` counts.\n * - A header fact only: a `text/html` response may still carry no body at all.\n */\nexport const isHtmlResponse = ({ response }: ApiResponse) =>\n !!response.headers\n .get(HttpHeader.CONTENT_TYPE)\n ?.toLowerCase()\n .includes(HttpContentType.TEXT_HTML);\n\n/**\n * Whether a response carried no payload, across every shape `parseData` produces for one:\n *\n * 1. `null` — a `204`, or a JSON body that was empty or whitespace.\n * 2. `''` — any other media type with an empty body, read as text.\n *\n * Whitespace-only text counts as empty, matching how `parseJson` already treats it.\n */\nexport const isContentEmpty = ({ data }: ApiResponse) =>\n data === null || data === undefined || (typeof data === 'string' && data.trim() === '');\n\nfunction removeUndefined(obj: Record<string, string>) {\n const objCopy = { ...obj };\n for (const [key, value] of Object.entries(objCopy)) {\n if (value == null) delete objCopy[key];\n }\n return objCopy;\n}\n\n// `application/json`, but also `application/json; charset=utf-8` and the `+json` suffix family.\n// Comparing the raw header for equality misses every response that carries a charset.\nconst JSON_MEDIA_TYPE = /^application\\/([\\w.-]+\\+)?json$/;\n\nconst getMediaType = (response: Response) =>\n response.headers.get(HttpHeader.CONTENT_TYPE)?.split(';')[0]?.trim().toLowerCase() ?? '';\n\n// Declared JSON is parsed strictly: a body that doesn't parse is a broken response, not a text\n// payload, and `JSON.parse` throwing is the right answer. Read it as text first only so an empty\n// body can resolve to `null` like a 204 — matching the charset form brings `application/json;\n// charset=utf-8` onto this path, where `response.json()` would turn a 200-with-no-body into a\n// `SyntaxError` it never used to be.\nconst parseJson = async (response: Response) => {\n const text = await response.text();\n return text.trim() === '' ? null : JSON.parse(text);\n};\n\nexport const parseData = async (response: Response, parseAs: ParseAs = 'auto') => {\n // No body to read, whatever the caller asked for.\n if (response.status === HttpStatus.NO_CONTENT) return null;\n\n // Per-method-call override\n if (parseAs === 'text') return response.text();\n if (parseAs === 'blob') return response.blob();\n if (parseAs === 'json') return parseJson(response);\n\n const mediaType = getMediaType(response);\n if (JSON_MEDIA_TYPE.test(mediaType)) return parseJson(response);\n\n // A declared binary payload must come back as bytes — `text()` would decode it as UTF-8 and\n // corrupt it. `application/octet-stream` is the only binary type an endpoint declares today\n // (kai-agent's sandbox file download); widen deliberately, never by sniffing.\n if (mediaType === 'application/octet-stream') return response.blob();\n\n // Any other declared type describes its own payload — the query-service CSV export, the\n // data-science `text/plain` endpoints — so hand back the exact bytes instead of sniffing them.\n return response.text();\n};\n\n// Header instance serialize undefined value as `undefined`, we do not want that\nconst cleanHeadersInit = (headersInit: HeadersInit | undefined) => {\n if (Array.isArray(headersInit)) return headersInit;\n if (headersInit instanceof Headers) return headersInit;\n if (headersInit == null) return headersInit;\n\n return removeUndefined(headersInit);\n};\n\nconst createHeaders = (\n headersInitA: HeadersInit | undefined,\n headersInitB: HeadersInit | undefined,\n) => {\n const headersA = new Headers(cleanHeadersInit(headersInitA));\n const headersB = new Headers(cleanHeadersInit(headersInitB));\n\n headersB.forEach((value, key) => {\n headersA.set(key, value);\n });\n\n return headersA;\n};\n\nexport const createPath = (path: string, pathParam: PathParam = {}) =>\n path.replace(/\\{([^}]+)}/g, (_, key) => {\n if (!(key in pathParam))\n throw new Error(`Path parameter \"${key}\" is missing in the path \"${path}\"`);\n\n return encodeURIComponent(pathParam[key]!);\n });\n\nexport const createSearch = (\n query: Record<string, unknown>,\n options: Pick<IStringifyOptions, 'arrayFormat'> = {},\n) => {\n return qs.stringify(query, {\n encodeValuesOnly: true,\n skipNulls: true,\n ...options,\n });\n};\n\nexport const createBody = (body: BodyParam, headers: Headers) => {\n if (body == null) return null;\n if (body instanceof FormData) return body; // fetch automatically sets content-type header\n if (typeof body === 'string') return body; // fetch automatically sets content-type header\n\n const stringifyBody = JSON.stringify(body);\n const stringBody = stringifyBody === '{}' ? null : stringifyBody;\n if (stringBody) headers.set(HttpHeader.CONTENT_TYPE, HttpContentType.JSON);\n\n return stringBody;\n};\n\nexport const parseContentDispositionHeader = (contentDisposition?: string | null) => {\n // extract the type ('inline' or 'attachment'), default the type to 'unknown'\n const type = (() => {\n const typeMatch = contentDisposition?.match(/^\\s*(inline|attachment)\\s*;/i);\n return (typeMatch?.[1]?.toLowerCase() ?? 'unknown') as 'inline' | 'attachment' | 'unknown';\n })();\n\n // extract the filename, default the type to null\n const filename = (() => {\n const filenameMatch = contentDisposition?.match(/filename=\"([^\"]+)\"/i);\n if (filenameMatch) return filenameMatch[1];\n\n // If no filename=\"...\", check for encoded filename*=UTF-8''\n const encodedFilenameMatch = contentDisposition?.match(/filename\\*=(?:UTF-8'')?([^;]+)/i);\n if (encodedFilenameMatch?.[1]) return decodeURIComponent(encodedFilenameMatch[1]);\n\n // Check for unquoted filenames (rare but possible)\n const unquotedFilenameMatch = contentDisposition?.match(/filename=([^;]+)/i);\n return unquotedFilenameMatch?.[1] ?? null;\n })();\n\n // Return the parsed result\n return { type, filename };\n};\n\nexport const createFetchRequest: CreateFetchRequestFn = ({\n url,\n method,\n params,\n options = {},\n defaultOptions,\n}) => {\n const {\n baseUrl,\n validateStatus: defValidateStatus = defaultValidateStatus,\n headers: defaultHeaders,\n fetchFn: defaultFetchFn,\n ...restDefaultOptions\n } = defaultOptions;\n const {\n validateStatus,\n queryArrayFormat,\n headers: endpointHeaders,\n fetchFn,\n parseAs,\n ...restOptions\n } = options;\n\n const headers = createHeaders(defaultHeaders, endpointHeaders);\n const path = createPath(url, params.path);\n const search = createSearch(params.query ?? {}, { arrayFormat: queryArrayFormat });\n const body = createBody(params.body, headers);\n\n const urlInstance = new URL(normalizeBaseUrl(baseUrl) + path);\n urlInstance.search = search;\n\n const request = new Request(urlInstance, {\n ...restDefaultOptions,\n ...restOptions,\n headers,\n method: method.toUpperCase(),\n body,\n });\n\n return {\n request,\n validateStatus: validateStatus ?? defValidateStatus,\n fetchFn: fetchFn ?? defaultFetchFn,\n parseAs,\n };\n};\n","import { ApiError } from '../../errors';\n\nimport type {\n BaseFetchParams,\n CoreFetchFn,\n CreateFetchClientOptions,\n FetchClientOptions,\n HttpMethod,\n} from './types';\nimport { createFetchRequest, parseData } from './utils';\n\nexport type FetchClientError = TypeError | ApiError | SyntaxError | DOMException;\n\nexport const isApiError = (error: unknown): error is ApiError => error instanceof ApiError;\n\nexport const isAbortError = (error: unknown): error is DOMException =>\n error instanceof DOMException && error.name === 'AbortError';\n\nexport const isTimeoutError = (error: unknown): error is DOMException =>\n error instanceof DOMException && error.name === 'TimeoutError';\n\nexport const isFetchClientError = (error: unknown): error is FetchClientError =>\n error instanceof TypeError || error instanceof SyntaxError || isApiError(error);\n\n// `fetchFn` is resolved per request by `createFetchRequest` (endpoint option beats client option),\n// so a single request can swap the transport without rebuilding the client.\nconst coreFetch: CoreFetchFn = async ({ request, validateStatus, fetchFn = fetch, parseAs }) => {\n const response = await fetchFn(request);\n const data = await parseData(response, parseAs);\n\n const apiResponse = {\n request,\n response,\n data,\n };\n\n const boolOrError = validateStatus(apiResponse);\n if (isApiError(boolOrError)) throw boolOrError;\n if (!boolOrError) throw new ApiError(apiResponse);\n\n return apiResponse;\n};\n\nexport const createFetchClient = ({\n middlewares = [],\n baseUrl: _baseUrl,\n ...defaultOptions\n}: CreateFetchClientOptions) => {\n const fetchWithMiddlewares = middlewares.reduceRight(\n (next, middleware) => middleware(next),\n coreFetch,\n );\n const resolveBaseUrl = async () => (typeof _baseUrl === 'function' ? _baseUrl() : _baseUrl);\n\n const createFetchMethod =\n (method: HttpMethod) =>\n async (url: string, params: BaseFetchParams, options: FetchClientOptions = {}) => {\n const baseUrl = await resolveBaseUrl();\n const request = createFetchRequest({\n url,\n method,\n params,\n defaultOptions: { ...defaultOptions, baseUrl: baseUrl },\n options,\n });\n\n const methodMiddlewares = options?.middlewares ?? [];\n\n return methodMiddlewares.reduceRight(\n (next, middleware) => middleware(next),\n fetchWithMiddlewares,\n )(request);\n };\n\n return {\n get: createFetchMethod('get'),\n post: createFetchMethod('post'),\n put: createFetchMethod('put'),\n patch: createFetchMethod('patch'),\n delete: createFetchMethod('delete'),\n };\n};\n"],"mappings":";;;;;;;;;;;;;AAWA,MAAM,cAAc,aAClB,SAAS,aAAa,GAAG,SAAS,OAAO,GAAG,SAAS,eAAe,GAAG,SAAS;AAElF,IAAa,WAAb,cAA8B,MAAM;CAClC;CACA;CACA;CAEA,YAAY,EAAE,UAAU,SAAS,QAAqB;EACpD,MAAM,WAAW,QAAQ,CAAC;EAC1B,KAAK,OAAO;EACZ,KAAK,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AO,kBAAkB,OAAO;EAChC,QAAQ,kBAAkB,QAAQ;CACpC;AACF"}
@@ -30,7 +30,9 @@ const KeboolaHttpHeader = {
30
30
  STORAGE_API_URL: "x-storageapi-url",
31
31
  PROJECT_ID: "X-KBC-ProjectId",
32
32
  /** Storage job a request enqueued, reported on the response rather than in its body. */
33
- STORAGE_API_JOB_ID: "X-StorageApi-Job-Id"
33
+ STORAGE_API_JOB_ID: "X-StorageApi-Job-Id",
34
+ /** Set to "1" to opt an auth call into browser/cookie mode. */
35
+ CSRF: "X-KBC-CSRF"
34
36
  };
35
37
  const HttpStatus = {
36
38
  NO_CONTENT: 204,
@@ -193,14 +195,19 @@ const coreFetch = async ({ request, validateStatus, fetchFn = fetch, parseAs })
193
195
  if (!boolOrError) throw new ApiError(apiResponse);
194
196
  return apiResponse;
195
197
  };
196
- const createFetchClient = ({ middlewares = [], ...defaultOptions }) => {
198
+ const createFetchClient = ({ middlewares = [], baseUrl: _baseUrl, ...defaultOptions }) => {
197
199
  const fetchWithMiddlewares = middlewares.reduceRight((next, middleware) => middleware(next), coreFetch);
200
+ const resolveBaseUrl = async () => typeof _baseUrl === "function" ? _baseUrl() : _baseUrl;
198
201
  const createFetchMethod = (method) => async (url, params, options = {}) => {
202
+ const baseUrl = await resolveBaseUrl();
199
203
  const request = createFetchRequest({
200
204
  url,
201
205
  method,
202
206
  params,
203
- defaultOptions,
207
+ defaultOptions: {
208
+ ...defaultOptions,
209
+ baseUrl
210
+ },
204
211
  options
205
212
  });
206
213
  return (options?.middlewares ?? []).reduceRight((next, middleware) => middleware(next), fetchWithMiddlewares)(request);
@@ -216,4 +223,4 @@ const createFetchClient = ({ middlewares = [], ...defaultOptions }) => {
216
223
  //#endregion
217
224
  export { isTimeoutError as a, defaultValidateStatus as c, normalizeBaseUrl as d, parseContentDispositionHeader as f, ApiError as g, KeboolaHttpHeader as h, isFetchClientError as i, isContentEmpty as l, HttpStatus as m, isAbortError as n, HttpContentType as o, ENCRYPTED_VALUE_PREFIX as p, isApiError as r, HttpHeader as s, createFetchClient as t, isHtmlResponse as u };
218
225
 
219
- //# sourceMappingURL=createFetchClient-C-cadpBx.js.map
226
+ //# sourceMappingURL=createFetchClient-DXHQK63w.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createFetchClient-DXHQK63w.js","names":[],"sources":["../src/errors/ApiError.ts","../src/internal.ts","../src/fetchClient/createFetchClient/utils.ts","../src/fetchClient/createFetchClient/createFetchClient.ts"],"sourcesContent":["import type { ApiResponse } from '../fetchClient/createFetchClient/types';\n\n/**\n * The status line, as a message an error reporter can group on.\n *\n * - `statusText` is empty on every HTTP/2 response: the protocol dropped the reason phrase, and\n * `fetch` reports that as `''` rather than synthesising one.\n * - So the status number leads, and `statusText` only decorates it where a server sent one.\n * - Without this an HTTP/2 failure reaches Sentry as `Error:` with an empty message, and the\n * status — the one field that says what went wrong — is absent from the report.\n */\nconst statusLine = (response: Response) =>\n response.statusText ? `${response.status} ${response.statusText}` : `${response.status}`;\n\nexport class ApiError extends Error {\n response: Response;\n request: Request;\n data: unknown;\n\n constructor({ response, request, data }: ApiResponse) {\n super(statusLine(response));\n this.name = 'ApiError';\n this.response = response;\n this.request = request;\n this.data = data;\n }\n}\n","// Package-internal constants. Not part of the public\n// `@keboola/api-client/constants` sub-path (that is the `constants/` directory).\n\nexport const KeboolaHttpHeader = {\n STORAGE_API_TOKEN: 'X-StorageApi-Token',\n MANAGEMENT_API_TOKEN: 'X-Kbc-Manageapitoken',\n STORAGE_API_URL: 'x-storageapi-url',\n PROJECT_ID: 'X-KBC-ProjectId',\n /** Storage job a request enqueued, reported on the response rather than in its body. */\n STORAGE_API_JOB_ID: 'X-StorageApi-Job-Id',\n /** Set to \"1\" to opt an auth call into browser/cookie mode. */\n CSRF: 'X-KBC-CSRF',\n} as const;\n\nexport const HttpStatus = {\n NO_CONTENT: 204,\n BAD_REQUEST: 400,\n UNAUTHORIZED: 401,\n NOT_FOUND: 404,\n UNPROCESSABLE_ENTITY: 422,\n INTERNAL_SERVER_ERROR: 500,\n BAD_GATEWAY: 502,\n SERVICE_UNAVAILABLE: 503,\n GATEWAY_TIMEOUT: 504,\n} as const;\n\nexport const ENCRYPTED_VALUE_PREFIX = 'KBC::';\n","import type { IStringifyOptions } from 'qs';\nimport qs from 'qs';\n\nimport { HttpStatus } from '../../internal';\n\nimport type {\n ApiResponse,\n BodyParam,\n CreateFetchRequestFn,\n ParseAs,\n PathParam,\n ValidateStatusFn,\n} from './types';\n\n/**\n * Strips trailing slashes from a base URL so concatenating a leading-slash\n * path (e.g. `/v2/storage`) never produces a double slash.\n *\n * Without this, callers that pass `https://connection.keboola.com/` end up\n * issuing requests to `https://connection.keboola.com//v2/storage/...`, which\n * the Storage API rejects with a 404.\n */\nexport const normalizeBaseUrl = (baseUrl: string): string => baseUrl.replace(/\\/+$/, '');\n\nexport const HttpHeader = {\n CONTENT_TYPE: 'content-type',\n CONTENT_DISPOSITION: 'content-disposition',\n AUTHORIZATION: 'Authorization',\n IDEMPOTENCY_KEY: 'Idempotency-Key',\n IF_MATCH: 'If-Match',\n};\n\nexport const HttpContentType = {\n JSON: 'application/json',\n TEXT_PLAIN: 'text/plain',\n FORM_DATA: 'multipart/form-data',\n TEXT_HTML: 'text/html',\n};\n\nexport const defaultValidateStatus: ValidateStatusFn = ({ response }) =>\n response.status >= 200 && response.status <= 299;\n\n/**\n * Whether a response declares HTML.\n *\n * - Media types are case-insensitive, so `Text/HTML` counts.\n * - A header fact only: a `text/html` response may still carry no body at all.\n */\nexport const isHtmlResponse = ({ response }: ApiResponse) =>\n !!response.headers\n .get(HttpHeader.CONTENT_TYPE)\n ?.toLowerCase()\n .includes(HttpContentType.TEXT_HTML);\n\n/**\n * Whether a response carried no payload, across every shape `parseData` produces for one:\n *\n * 1. `null` — a `204`, or a JSON body that was empty or whitespace.\n * 2. `''` — any other media type with an empty body, read as text.\n *\n * Whitespace-only text counts as empty, matching how `parseJson` already treats it.\n */\nexport const isContentEmpty = ({ data }: ApiResponse) =>\n data === null || data === undefined || (typeof data === 'string' && data.trim() === '');\n\nfunction removeUndefined(obj: Record<string, string>) {\n const objCopy = { ...obj };\n for (const [key, value] of Object.entries(objCopy)) {\n if (value == null) delete objCopy[key];\n }\n return objCopy;\n}\n\n// `application/json`, but also `application/json; charset=utf-8` and the `+json` suffix family.\n// Comparing the raw header for equality misses every response that carries a charset.\nconst JSON_MEDIA_TYPE = /^application\\/([\\w.-]+\\+)?json$/;\n\nconst getMediaType = (response: Response) =>\n response.headers.get(HttpHeader.CONTENT_TYPE)?.split(';')[0]?.trim().toLowerCase() ?? '';\n\n// Declared JSON is parsed strictly: a body that doesn't parse is a broken response, not a text\n// payload, and `JSON.parse` throwing is the right answer. Read it as text first only so an empty\n// body can resolve to `null` like a 204 — matching the charset form brings `application/json;\n// charset=utf-8` onto this path, where `response.json()` would turn a 200-with-no-body into a\n// `SyntaxError` it never used to be.\nconst parseJson = async (response: Response) => {\n const text = await response.text();\n return text.trim() === '' ? null : JSON.parse(text);\n};\n\nexport const parseData = async (response: Response, parseAs: ParseAs = 'auto') => {\n // No body to read, whatever the caller asked for.\n if (response.status === HttpStatus.NO_CONTENT) return null;\n\n // Per-method-call override\n if (parseAs === 'text') return response.text();\n if (parseAs === 'blob') return response.blob();\n if (parseAs === 'json') return parseJson(response);\n\n const mediaType = getMediaType(response);\n if (JSON_MEDIA_TYPE.test(mediaType)) return parseJson(response);\n\n // A declared binary payload must come back as bytes — `text()` would decode it as UTF-8 and\n // corrupt it. `application/octet-stream` is the only binary type an endpoint declares today\n // (kai-agent's sandbox file download); widen deliberately, never by sniffing.\n if (mediaType === 'application/octet-stream') return response.blob();\n\n // Any other declared type describes its own payload — the query-service CSV export, the\n // data-science `text/plain` endpoints — so hand back the exact bytes instead of sniffing them.\n return response.text();\n};\n\n// Header instance serialize undefined value as `undefined`, we do not want that\nconst cleanHeadersInit = (headersInit: HeadersInit | undefined) => {\n if (Array.isArray(headersInit)) return headersInit;\n if (headersInit instanceof Headers) return headersInit;\n if (headersInit == null) return headersInit;\n\n return removeUndefined(headersInit);\n};\n\nconst createHeaders = (\n headersInitA: HeadersInit | undefined,\n headersInitB: HeadersInit | undefined,\n) => {\n const headersA = new Headers(cleanHeadersInit(headersInitA));\n const headersB = new Headers(cleanHeadersInit(headersInitB));\n\n headersB.forEach((value, key) => {\n headersA.set(key, value);\n });\n\n return headersA;\n};\n\nexport const createPath = (path: string, pathParam: PathParam = {}) =>\n path.replace(/\\{([^}]+)}/g, (_, key) => {\n if (!(key in pathParam))\n throw new Error(`Path parameter \"${key}\" is missing in the path \"${path}\"`);\n\n return encodeURIComponent(pathParam[key]!);\n });\n\nexport const createSearch = (\n query: Record<string, unknown>,\n options: Pick<IStringifyOptions, 'arrayFormat'> = {},\n) => {\n return qs.stringify(query, {\n encodeValuesOnly: true,\n skipNulls: true,\n ...options,\n });\n};\n\nexport const createBody = (body: BodyParam, headers: Headers) => {\n if (body == null) return null;\n if (body instanceof FormData) return body; // fetch automatically sets content-type header\n if (typeof body === 'string') return body; // fetch automatically sets content-type header\n\n const stringifyBody = JSON.stringify(body);\n const stringBody = stringifyBody === '{}' ? null : stringifyBody;\n if (stringBody) headers.set(HttpHeader.CONTENT_TYPE, HttpContentType.JSON);\n\n return stringBody;\n};\n\nexport const parseContentDispositionHeader = (contentDisposition?: string | null) => {\n // extract the type ('inline' or 'attachment'), default the type to 'unknown'\n const type = (() => {\n const typeMatch = contentDisposition?.match(/^\\s*(inline|attachment)\\s*;/i);\n return (typeMatch?.[1]?.toLowerCase() ?? 'unknown') as 'inline' | 'attachment' | 'unknown';\n })();\n\n // extract the filename, default the type to null\n const filename = (() => {\n const filenameMatch = contentDisposition?.match(/filename=\"([^\"]+)\"/i);\n if (filenameMatch) return filenameMatch[1];\n\n // If no filename=\"...\", check for encoded filename*=UTF-8''\n const encodedFilenameMatch = contentDisposition?.match(/filename\\*=(?:UTF-8'')?([^;]+)/i);\n if (encodedFilenameMatch?.[1]) return decodeURIComponent(encodedFilenameMatch[1]);\n\n // Check for unquoted filenames (rare but possible)\n const unquotedFilenameMatch = contentDisposition?.match(/filename=([^;]+)/i);\n return unquotedFilenameMatch?.[1] ?? null;\n })();\n\n // Return the parsed result\n return { type, filename };\n};\n\nexport const createFetchRequest: CreateFetchRequestFn = ({\n url,\n method,\n params,\n options = {},\n defaultOptions,\n}) => {\n const {\n baseUrl,\n validateStatus: defValidateStatus = defaultValidateStatus,\n headers: defaultHeaders,\n fetchFn: defaultFetchFn,\n ...restDefaultOptions\n } = defaultOptions;\n const {\n validateStatus,\n queryArrayFormat,\n headers: endpointHeaders,\n fetchFn,\n parseAs,\n ...restOptions\n } = options;\n\n const headers = createHeaders(defaultHeaders, endpointHeaders);\n const path = createPath(url, params.path);\n const search = createSearch(params.query ?? {}, { arrayFormat: queryArrayFormat });\n const body = createBody(params.body, headers);\n\n const urlInstance = new URL(normalizeBaseUrl(baseUrl) + path);\n urlInstance.search = search;\n\n const request = new Request(urlInstance, {\n ...restDefaultOptions,\n ...restOptions,\n headers,\n method: method.toUpperCase(),\n body,\n });\n\n return {\n request,\n validateStatus: validateStatus ?? defValidateStatus,\n fetchFn: fetchFn ?? defaultFetchFn,\n parseAs,\n };\n};\n","import { ApiError } from '../../errors';\n\nimport type {\n BaseFetchParams,\n CoreFetchFn,\n CreateFetchClientOptions,\n FetchClientOptions,\n HttpMethod,\n} from './types';\nimport { createFetchRequest, parseData } from './utils';\n\nexport type FetchClientError = TypeError | ApiError | SyntaxError | DOMException;\n\nexport const isApiError = (error: unknown): error is ApiError => error instanceof ApiError;\n\nexport const isAbortError = (error: unknown): error is DOMException =>\n error instanceof DOMException && error.name === 'AbortError';\n\nexport const isTimeoutError = (error: unknown): error is DOMException =>\n error instanceof DOMException && error.name === 'TimeoutError';\n\nexport const isFetchClientError = (error: unknown): error is FetchClientError =>\n error instanceof TypeError || error instanceof SyntaxError || isApiError(error);\n\n// `fetchFn` is resolved per request by `createFetchRequest` (endpoint option beats client option),\n// so a single request can swap the transport without rebuilding the client.\nconst coreFetch: CoreFetchFn = async ({ request, validateStatus, fetchFn = fetch, parseAs }) => {\n const response = await fetchFn(request);\n const data = await parseData(response, parseAs);\n\n const apiResponse = {\n request,\n response,\n data,\n };\n\n const boolOrError = validateStatus(apiResponse);\n if (isApiError(boolOrError)) throw boolOrError;\n if (!boolOrError) throw new ApiError(apiResponse);\n\n return apiResponse;\n};\n\nexport const createFetchClient = ({\n middlewares = [],\n baseUrl: _baseUrl,\n ...defaultOptions\n}: CreateFetchClientOptions) => {\n const fetchWithMiddlewares = middlewares.reduceRight(\n (next, middleware) => middleware(next),\n coreFetch,\n );\n const resolveBaseUrl = async () => (typeof _baseUrl === 'function' ? _baseUrl() : _baseUrl);\n\n const createFetchMethod =\n (method: HttpMethod) =>\n async (url: string, params: BaseFetchParams, options: FetchClientOptions = {}) => {\n const baseUrl = await resolveBaseUrl();\n const request = createFetchRequest({\n url,\n method,\n params,\n defaultOptions: { ...defaultOptions, baseUrl: baseUrl },\n options,\n });\n\n const methodMiddlewares = options?.middlewares ?? [];\n\n return methodMiddlewares.reduceRight(\n (next, middleware) => middleware(next),\n fetchWithMiddlewares,\n )(request);\n };\n\n return {\n get: createFetchMethod('get'),\n post: createFetchMethod('post'),\n put: createFetchMethod('put'),\n patch: createFetchMethod('patch'),\n delete: createFetchMethod('delete'),\n };\n};\n"],"mappings":";;;;;;;;;;;AAWA,MAAM,cAAc,aAClB,SAAS,aAAa,GAAG,SAAS,OAAO,GAAG,SAAS,eAAe,GAAG,SAAS;AAElF,IAAa,WAAb,cAA8B,MAAM;CAClC;CACA;CACA;CAEA,YAAY,EAAE,UAAU,SAAS,QAAqB;EACpD,MAAM,WAAW,QAAQ,CAAC;EAC1B,KAAK,OAAO;EACZ,KAAK,WAAW;EAChB,KAAK,UAAU;EACf,KAAK,OAAO;CACd;AACF;;;ACvBA,MAAa,oBAAoB;CAC/B,mBAAmB;CACnB,sBAAsB;CACtB,iBAAiB;CACjB,YAAY;;CAEZ,oBAAoB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F,MAAa,gBAAgB,UAC3B,iBAAiB,gBAAgB,MAAM,SAAS;AAElD,MAAa,kBAAkB,UAC7B,iBAAiB,gBAAgB,MAAM,SAAS;AAElD,MAAa,sBAAsB,UACjC,iBAAiB,aAAa,iBAAiB,eAAe,WAAW,KAAK;AAIhF,MAAM,YAAyB,OAAO,EAAE,SAAS,gBAAgB,UAAU,OAAO,cAAc;CAC9F,MAAM,WAAW,MAAM,QAAQ,OAAO;CAGtC,MAAM,cAAc;EAClB;EACA;EACA,MAAA,MALiB,UAAU,UAAU,OAAO;CAM9C;CAEA,MAAM,cAAc,eAAe,WAAW;CAC9C,IAAI,WAAW,WAAW,GAAG,MAAM;CACnC,IAAI,CAAC,aAAa,MAAM,IAAI,SAAS,WAAW;CAEhD,OAAO;AACT;AAEA,MAAa,qBAAqB,EAChC,cAAc,CAAC,GACf,SAAS,UACT,GAAG,qBAC2B;CAC9B,MAAM,uBAAuB,YAAY,aACtC,MAAM,eAAe,WAAW,IAAI,GACrC,SACF;CACA,MAAM,iBAAiB,YAAa,OAAO,aAAa,aAAa,SAAS,IAAI;CAElF,MAAM,qBACH,WACD,OAAO,KAAa,QAAyB,UAA8B,CAAC,MAAM;EAChF,MAAM,UAAU,MAAM,eAAe;EACrC,MAAM,UAAU,mBAAmB;GACjC;GACA;GACA;GACA,gBAAgB;IAAE,GAAG;IAAyB;GAAQ;GACtD;EACF,CAAC;EAID,QAF0B,SAAS,eAAe,CAAC,EAAA,CAE1B,aACtB,MAAM,eAAe,WAAW,IAAI,GACrC,oBACF,CAAC,CAAC,OAAO;CACX;CAEF,OAAO;EACL,KAAK,kBAAkB,KAAK;EAC5B,MAAM,kBAAkB,MAAM;EAC9B,KAAK,kBAAkB,KAAK;EAC5B,OAAO,kBAAkB,OAAO;EAChC,QAAQ,kBAAkB,QAAQ;CACpC;AACF"}
@@ -1,7 +1,7 @@
1
- import { t as createFetchClient } from "./createFetchClient-C-cadpBx.js";
1
+ import { t as createFetchClient } from "./createFetchClient-DXHQK63w.js";
2
2
  //#region src/fetchClient/createGenericFetchClient.ts
3
3
  const createGenericFetchClient = (defaultOptions) => createFetchClient(defaultOptions);
4
4
  //#endregion
5
5
  export { createGenericFetchClient as t };
6
6
 
7
- //# sourceMappingURL=createGenericFetchClient-Bnf1QK9W.js.map
7
+ //# sourceMappingURL=createGenericFetchClient-Dg1rgzmG.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"createGenericFetchClient-Bnf1QK9W.js","names":[],"sources":["../src/fetchClient/createGenericFetchClient.ts"],"sourcesContent":["import type {\n ApiResponse,\n BodyParam,\n CreateFetchClientOptions,\n FetchClientOptions,\n PathParam,\n QueryParam,\n} from './createFetchClient';\nimport { createFetchClient } from './createFetchClient';\n\ntype FetchParams<Path = PathParam, Query = QueryParam, Body = BodyParam> = {\n path?: Path;\n query?: Query;\n body?: Body;\n};\n\ntype FetchMethod = <Data, Path = PathParam, Query = QueryParam, Body = BodyParam>(\n url: string,\n params: FetchParams<Path, Query, Body>,\n options?: FetchClientOptions,\n) => Promise<ApiResponse<Data>>;\n\ntype FetchClient = {\n get: FetchMethod;\n post: FetchMethod;\n put: FetchMethod;\n patch: FetchMethod;\n delete: FetchMethod;\n};\n\nexport const createGenericFetchClient = (defaultOptions: CreateFetchClientOptions) =>\n createFetchClient(defaultOptions) as FetchClient;\n"],"mappings":";;AA8BA,MAAa,4BAA4B,mBACvC,kBAAkB,cAAc"}
1
+ {"version":3,"file":"createGenericFetchClient-Dg1rgzmG.js","names":[],"sources":["../src/fetchClient/createGenericFetchClient.ts"],"sourcesContent":["import type {\n ApiResponse,\n BodyParam,\n CreateFetchClientOptions,\n FetchClientOptions,\n PathParam,\n QueryParam,\n} from './createFetchClient';\nimport { createFetchClient } from './createFetchClient';\n\ntype FetchParams<Path = PathParam, Query = QueryParam, Body = BodyParam> = {\n path?: Path;\n query?: Query;\n body?: Body;\n};\n\ntype FetchMethod = <Data, Path = PathParam, Query = QueryParam, Body = BodyParam>(\n url: string,\n params: FetchParams<Path, Query, Body>,\n options?: FetchClientOptions,\n) => Promise<ApiResponse<Data>>;\n\ntype FetchClient = {\n get: FetchMethod;\n post: FetchMethod;\n put: FetchMethod;\n patch: FetchMethod;\n delete: FetchMethod;\n};\n\nexport const createGenericFetchClient = (defaultOptions: CreateFetchClientOptions) =>\n createFetchClient(defaultOptions) as FetchClient;\n"],"mappings":";;AA8BA,MAAa,4BAA4B,mBACvC,kBAAkB,cAAc"}
@@ -1,4 +1,4 @@
1
- const require_createFetchClient = require("./createFetchClient-BlgPbjFj.cjs");
1
+ const require_createFetchClient = require("./createFetchClient-Cwp8max9.cjs");
2
2
  //#region src/fetchClient/createGenericFetchClient.ts
3
3
  const createGenericFetchClient = (defaultOptions) => require_createFetchClient.createFetchClient(defaultOptions);
4
4
  //#endregion
@@ -9,4 +9,4 @@ Object.defineProperty(exports, "createGenericFetchClient", {
9
9
  }
10
10
  });
11
11
 
12
- //# sourceMappingURL=createGenericFetchClient-lcozzwk2.cjs.map
12
+ //# sourceMappingURL=createGenericFetchClient-Dl9cqTvR.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"createGenericFetchClient-lcozzwk2.cjs","names":["createFetchClient"],"sources":["../src/fetchClient/createGenericFetchClient.ts"],"sourcesContent":["import type {\n ApiResponse,\n BodyParam,\n CreateFetchClientOptions,\n FetchClientOptions,\n PathParam,\n QueryParam,\n} from './createFetchClient';\nimport { createFetchClient } from './createFetchClient';\n\ntype FetchParams<Path = PathParam, Query = QueryParam, Body = BodyParam> = {\n path?: Path;\n query?: Query;\n body?: Body;\n};\n\ntype FetchMethod = <Data, Path = PathParam, Query = QueryParam, Body = BodyParam>(\n url: string,\n params: FetchParams<Path, Query, Body>,\n options?: FetchClientOptions,\n) => Promise<ApiResponse<Data>>;\n\ntype FetchClient = {\n get: FetchMethod;\n post: FetchMethod;\n put: FetchMethod;\n patch: FetchMethod;\n delete: FetchMethod;\n};\n\nexport const createGenericFetchClient = (defaultOptions: CreateFetchClientOptions) =>\n createFetchClient(defaultOptions) as FetchClient;\n"],"mappings":";;AA8BA,MAAa,4BAA4B,mBACvCA,0BAAAA,kBAAkB,cAAc"}
1
+ {"version":3,"file":"createGenericFetchClient-Dl9cqTvR.cjs","names":["createFetchClient"],"sources":["../src/fetchClient/createGenericFetchClient.ts"],"sourcesContent":["import type {\n ApiResponse,\n BodyParam,\n CreateFetchClientOptions,\n FetchClientOptions,\n PathParam,\n QueryParam,\n} from './createFetchClient';\nimport { createFetchClient } from './createFetchClient';\n\ntype FetchParams<Path = PathParam, Query = QueryParam, Body = BodyParam> = {\n path?: Path;\n query?: Query;\n body?: Body;\n};\n\ntype FetchMethod = <Data, Path = PathParam, Query = QueryParam, Body = BodyParam>(\n url: string,\n params: FetchParams<Path, Query, Body>,\n options?: FetchClientOptions,\n) => Promise<ApiResponse<Data>>;\n\ntype FetchClient = {\n get: FetchMethod;\n post: FetchMethod;\n put: FetchMethod;\n patch: FetchMethod;\n delete: FetchMethod;\n};\n\nexport const createGenericFetchClient = (defaultOptions: CreateFetchClientOptions) =>\n createFetchClient(defaultOptions) as FetchClient;\n"],"mappings":";;AA8BA,MAAa,4BAA4B,mBACvCA,0BAAAA,kBAAkB,cAAc"}
@@ -1,4 +1,4 @@
1
- const require_createFetchClient = require("./createFetchClient-BlgPbjFj.cjs");
1
+ const require_createFetchClient = require("./createFetchClient-Cwp8max9.cjs");
2
2
  //#region src/fetchClient/createOpenapiFetchClient.ts
3
3
  const createOpenapiFetchClient = (defaultOptions) => require_createFetchClient.createFetchClient(defaultOptions);
4
4
  //#endregion
@@ -9,4 +9,4 @@ Object.defineProperty(exports, "createOpenapiFetchClient", {
9
9
  }
10
10
  });
11
11
 
12
- //# sourceMappingURL=createOpenapiFetchClient-C3UmDXpe.cjs.map
12
+ //# sourceMappingURL=createOpenapiFetchClient-BYqW-9tm.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"createOpenapiFetchClient-C3UmDXpe.cjs","names":["createFetchClient"],"sources":["../src/fetchClient/createOpenapiFetchClient.ts"],"sourcesContent":["import {\n type ApiResponse,\n createFetchClient,\n type CreateFetchClientOptions,\n type FetchClientOptions,\n type HttpMethod,\n} from './createFetchClient';\nimport type { OpenapiParametersType, OpenapiReturnType } from './types';\n\ntype OpenapiPaths<Paths> = {\n [P in keyof Paths]: {\n [M in HttpMethod]?: unknown;\n };\n};\n\ntype PathsWithMethod<Paths extends OpenapiPaths<Paths>, PathnameMethod extends HttpMethod> = {\n [Pathname in keyof Paths]: Paths[Pathname] extends {\n [K in PathnameMethod]: any;\n }\n ? Pathname\n : never;\n}[keyof Paths];\n\ntype FetchMethod<Paths extends OpenapiPaths<Paths>, Method extends HttpMethod> = <\n Path extends PathsWithMethod<Paths, Method>,\n>(\n url: Path,\n params: OpenapiParametersType<Paths[Path][Method]>,\n options?: FetchClientOptions,\n) => Promise<ApiResponse<OpenapiReturnType<Paths[Path][Method]>>>;\n\ntype FetchClient<Paths extends OpenapiPaths<Paths>> = {\n get: FetchMethod<Paths, 'get'>;\n post: FetchMethod<Paths, 'post'>;\n put: FetchMethod<Paths, 'put'>;\n patch: FetchMethod<Paths, 'patch'>;\n delete: FetchMethod<Paths, 'delete'>;\n};\n\nexport const createOpenapiFetchClient = <Paths extends OpenapiPaths<Paths>>(\n defaultOptions: CreateFetchClientOptions,\n) => createFetchClient(defaultOptions) as FetchClient<Paths>;\n"],"mappings":";;AAuCA,MAAa,4BACX,mBACGA,0BAAAA,kBAAkB,cAAc"}
1
+ {"version":3,"file":"createOpenapiFetchClient-BYqW-9tm.cjs","names":["createFetchClient"],"sources":["../src/fetchClient/createOpenapiFetchClient.ts"],"sourcesContent":["import {\n type ApiResponse,\n createFetchClient,\n type CreateFetchClientOptions,\n type FetchClientOptions,\n type HttpMethod,\n} from './createFetchClient';\nimport type { OpenapiParametersType, OpenapiReturnType } from './types';\n\ntype OpenapiPaths<Paths> = {\n [P in keyof Paths]: {\n [M in HttpMethod]?: unknown;\n };\n};\n\ntype PathsWithMethod<Paths extends OpenapiPaths<Paths>, PathnameMethod extends HttpMethod> = {\n [Pathname in keyof Paths]: Paths[Pathname] extends {\n [K in PathnameMethod]: any;\n }\n ? Pathname\n : never;\n}[keyof Paths];\n\ntype FetchMethod<Paths extends OpenapiPaths<Paths>, Method extends HttpMethod> = <\n Path extends PathsWithMethod<Paths, Method>,\n>(\n url: Path,\n params: OpenapiParametersType<Paths[Path][Method]>,\n options?: FetchClientOptions,\n) => Promise<ApiResponse<OpenapiReturnType<Paths[Path][Method]>>>;\n\ntype FetchClient<Paths extends OpenapiPaths<Paths>> = {\n get: FetchMethod<Paths, 'get'>;\n post: FetchMethod<Paths, 'post'>;\n put: FetchMethod<Paths, 'put'>;\n patch: FetchMethod<Paths, 'patch'>;\n delete: FetchMethod<Paths, 'delete'>;\n};\n\nexport const createOpenapiFetchClient = <Paths extends OpenapiPaths<Paths>>(\n defaultOptions: CreateFetchClientOptions,\n) => createFetchClient(defaultOptions) as FetchClient<Paths>;\n"],"mappings":";;AAuCA,MAAa,4BACX,mBACGA,0BAAAA,kBAAkB,cAAc"}
@@ -1,7 +1,7 @@
1
- import { t as createFetchClient } from "./createFetchClient-C-cadpBx.js";
1
+ import { t as createFetchClient } from "./createFetchClient-DXHQK63w.js";
2
2
  //#region src/fetchClient/createOpenapiFetchClient.ts
3
3
  const createOpenapiFetchClient = (defaultOptions) => createFetchClient(defaultOptions);
4
4
  //#endregion
5
5
  export { createOpenapiFetchClient as t };
6
6
 
7
- //# sourceMappingURL=createOpenapiFetchClient-COaPeeQ0.js.map
7
+ //# sourceMappingURL=createOpenapiFetchClient-DZUOVupy.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"createOpenapiFetchClient-COaPeeQ0.js","names":[],"sources":["../src/fetchClient/createOpenapiFetchClient.ts"],"sourcesContent":["import {\n type ApiResponse,\n createFetchClient,\n type CreateFetchClientOptions,\n type FetchClientOptions,\n type HttpMethod,\n} from './createFetchClient';\nimport type { OpenapiParametersType, OpenapiReturnType } from './types';\n\ntype OpenapiPaths<Paths> = {\n [P in keyof Paths]: {\n [M in HttpMethod]?: unknown;\n };\n};\n\ntype PathsWithMethod<Paths extends OpenapiPaths<Paths>, PathnameMethod extends HttpMethod> = {\n [Pathname in keyof Paths]: Paths[Pathname] extends {\n [K in PathnameMethod]: any;\n }\n ? Pathname\n : never;\n}[keyof Paths];\n\ntype FetchMethod<Paths extends OpenapiPaths<Paths>, Method extends HttpMethod> = <\n Path extends PathsWithMethod<Paths, Method>,\n>(\n url: Path,\n params: OpenapiParametersType<Paths[Path][Method]>,\n options?: FetchClientOptions,\n) => Promise<ApiResponse<OpenapiReturnType<Paths[Path][Method]>>>;\n\ntype FetchClient<Paths extends OpenapiPaths<Paths>> = {\n get: FetchMethod<Paths, 'get'>;\n post: FetchMethod<Paths, 'post'>;\n put: FetchMethod<Paths, 'put'>;\n patch: FetchMethod<Paths, 'patch'>;\n delete: FetchMethod<Paths, 'delete'>;\n};\n\nexport const createOpenapiFetchClient = <Paths extends OpenapiPaths<Paths>>(\n defaultOptions: CreateFetchClientOptions,\n) => createFetchClient(defaultOptions) as FetchClient<Paths>;\n"],"mappings":";;AAuCA,MAAa,4BACX,mBACG,kBAAkB,cAAc"}
1
+ {"version":3,"file":"createOpenapiFetchClient-DZUOVupy.js","names":[],"sources":["../src/fetchClient/createOpenapiFetchClient.ts"],"sourcesContent":["import {\n type ApiResponse,\n createFetchClient,\n type CreateFetchClientOptions,\n type FetchClientOptions,\n type HttpMethod,\n} from './createFetchClient';\nimport type { OpenapiParametersType, OpenapiReturnType } from './types';\n\ntype OpenapiPaths<Paths> = {\n [P in keyof Paths]: {\n [M in HttpMethod]?: unknown;\n };\n};\n\ntype PathsWithMethod<Paths extends OpenapiPaths<Paths>, PathnameMethod extends HttpMethod> = {\n [Pathname in keyof Paths]: Paths[Pathname] extends {\n [K in PathnameMethod]: any;\n }\n ? Pathname\n : never;\n}[keyof Paths];\n\ntype FetchMethod<Paths extends OpenapiPaths<Paths>, Method extends HttpMethod> = <\n Path extends PathsWithMethod<Paths, Method>,\n>(\n url: Path,\n params: OpenapiParametersType<Paths[Path][Method]>,\n options?: FetchClientOptions,\n) => Promise<ApiResponse<OpenapiReturnType<Paths[Path][Method]>>>;\n\ntype FetchClient<Paths extends OpenapiPaths<Paths>> = {\n get: FetchMethod<Paths, 'get'>;\n post: FetchMethod<Paths, 'post'>;\n put: FetchMethod<Paths, 'put'>;\n patch: FetchMethod<Paths, 'patch'>;\n delete: FetchMethod<Paths, 'delete'>;\n};\n\nexport const createOpenapiFetchClient = <Paths extends OpenapiPaths<Paths>>(\n defaultOptions: CreateFetchClientOptions,\n) => createFetchClient(defaultOptions) as FetchClient<Paths>;\n"],"mappings":";;AAuCA,MAAa,4BACX,mBACG,kBAAkB,cAAc"}
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_appLogs = require("../appLogs-C_zP0lpv.cjs");
3
- const require_dataScience = require("../dataScience-D-hyc4GY.cjs");
2
+ const require_appLogs = require("../appLogs-B9zFJIuy.cjs");
3
+ const require_dataScience = require("../dataScience-B5QxZnvW.cjs");
4
4
  exports.createDataScienceClient = require_dataScience.createDataScienceClient;
5
5
  exports.parseLogLines = require_appLogs.parseLogLines;
@@ -1,3 +1,3 @@
1
- import { n as parseLogLines } from "../appLogs-D5A13Y0y.cjs";
2
- import { t as createDataScienceClient } from "../index-DppA4k3b.cjs";
1
+ import { n as parseLogLines } from "../appLogs-C9YlJ2g8.cjs";
2
+ import { t as createDataScienceClient } from "../index-Cz0MXhzs.cjs";
3
3
  export { createDataScienceClient, parseLogLines };
@@ -1,3 +1,3 @@
1
- import { n as parseLogLines } from "../appLogs-Ch7DYpzx.js";
2
- import { t as createDataScienceClient } from "../index-6Xe81qN3.js";
1
+ import { n as parseLogLines } from "../appLogs-BS6ViVGR.js";
2
+ import { t as createDataScienceClient } from "../index-D-VMgpGc.js";
3
3
  export { createDataScienceClient, parseLogLines };
@@ -1,3 +1,3 @@
1
- import { t as parseLogLines } from "../appLogs-Cl7Q_MR9.js";
2
- import { t as createDataScienceClient } from "../dataScience-B_BmnB1m.js";
1
+ import { t as parseLogLines } from "../appLogs-BBkkUOW1.js";
2
+ import { t as createDataScienceClient } from "../dataScience-OXcwdk1p.js";
3
3
  export { createDataScienceClient, parseLogLines };
@@ -1,3 +1,3 @@
1
- import { t as LogEntry } from "../appLogs-D5A13Y0y.cjs";
2
- import { S as Sandbox, _ as PatchDataAppPath, a as DeleteSandboxPath, b as Runtime, c as GetDataAppLogsTailPath, d as GetDataAppPath, f as GetDataAppRunPath, g as PatchDataAppBody, h as GetSandboxPath, i as DeleteDataAppPath, l as GetDataAppLogsTailQuery, m as GetDataAppRunsQuery, n as DataApp, o as GetAppsQuery, p as GetDataAppRunsPath, r as DataAppRun, s as GetDataAppLogsDownloadPath, t as CreateDataAppBody, u as GetDataAppPasswordPath, v as RawAppRun, x as RuntimeImageKey, y as ResetDataAppPasswordPath } from "../types-DZk3XHiN.cjs";
1
+ import { t as LogEntry } from "../appLogs-C9YlJ2g8.cjs";
2
+ import { S as Sandbox, _ as PatchDataAppPath, a as DeleteSandboxPath, b as Runtime, c as GetDataAppLogsTailPath, d as GetDataAppPath, f as GetDataAppRunPath, g as PatchDataAppBody, h as GetSandboxPath, i as DeleteDataAppPath, l as GetDataAppLogsTailQuery, m as GetDataAppRunsQuery, n as DataApp, o as GetAppsQuery, p as GetDataAppRunsPath, r as DataAppRun, s as GetDataAppLogsDownloadPath, t as CreateDataAppBody, u as GetDataAppPasswordPath, v as RawAppRun, x as RuntimeImageKey, y as ResetDataAppPasswordPath } from "../types-BLNB882w.cjs";
3
3
  export { CreateDataAppBody, DataApp, DataAppRun, DeleteDataAppPath, DeleteSandboxPath, GetAppsQuery, GetDataAppLogsDownloadPath, GetDataAppLogsTailPath, GetDataAppLogsTailQuery, GetDataAppPasswordPath, GetDataAppPath, GetDataAppRunPath, GetDataAppRunsPath, GetDataAppRunsQuery, GetSandboxPath, type LogEntry, PatchDataAppBody, PatchDataAppPath, RawAppRun, ResetDataAppPasswordPath, Runtime, RuntimeImageKey, Sandbox };
@@ -1,3 +1,3 @@
1
- import { t as LogEntry } from "../appLogs-Ch7DYpzx.js";
2
- import { S as Sandbox, _ as PatchDataAppPath, a as DeleteSandboxPath, b as Runtime, c as GetDataAppLogsTailPath, d as GetDataAppPath, f as GetDataAppRunPath, g as PatchDataAppBody, h as GetSandboxPath, i as DeleteDataAppPath, l as GetDataAppLogsTailQuery, m as GetDataAppRunsQuery, n as DataApp, o as GetAppsQuery, p as GetDataAppRunsPath, r as DataAppRun, s as GetDataAppLogsDownloadPath, t as CreateDataAppBody, u as GetDataAppPasswordPath, v as RawAppRun, x as RuntimeImageKey, y as ResetDataAppPasswordPath } from "../types-OaD-cbbl.js";
1
+ import { t as LogEntry } from "../appLogs-BS6ViVGR.js";
2
+ import { S as Sandbox, _ as PatchDataAppPath, a as DeleteSandboxPath, b as Runtime, c as GetDataAppLogsTailPath, d as GetDataAppPath, f as GetDataAppRunPath, g as PatchDataAppBody, h as GetSandboxPath, i as DeleteDataAppPath, l as GetDataAppLogsTailQuery, m as GetDataAppRunsQuery, n as DataApp, o as GetAppsQuery, p as GetDataAppRunsPath, r as DataAppRun, s as GetDataAppLogsDownloadPath, t as CreateDataAppBody, u as GetDataAppPasswordPath, v as RawAppRun, x as RuntimeImageKey, y as ResetDataAppPasswordPath } from "../types-DIiOMV-t.js";
3
3
  export { CreateDataAppBody, DataApp, DataAppRun, DeleteDataAppPath, DeleteSandboxPath, GetAppsQuery, GetDataAppLogsDownloadPath, GetDataAppLogsTailPath, GetDataAppLogsTailQuery, GetDataAppPasswordPath, GetDataAppPath, GetDataAppRunPath, GetDataAppRunsPath, GetDataAppRunsQuery, GetSandboxPath, type LogEntry, PatchDataAppBody, PatchDataAppPath, RawAppRun, ResetDataAppPasswordPath, Runtime, RuntimeImageKey, Sandbox };
@@ -1,7 +1,7 @@
1
- const require_createGenericFetchClient = require("./createGenericFetchClient-lcozzwk2.cjs");
2
- const require_createOpenapiFetchClient = require("./createOpenapiFetchClient-C3UmDXpe.cjs");
3
- const require_auth = require("./auth-DLWnl18b.cjs");
4
- const require_appLogs = require("./appLogs-C_zP0lpv.cjs");
1
+ const require_createGenericFetchClient = require("./createGenericFetchClient-Dl9cqTvR.cjs");
2
+ const require_createOpenapiFetchClient = require("./createOpenapiFetchClient-BYqW-9tm.cjs");
3
+ const require_auth = require("./auth-Dm0F2rOh.cjs");
4
+ const require_appLogs = require("./appLogs-B9zFJIuy.cjs");
5
5
  //#region src/clients/dataScience/utils.ts
6
6
  const prepareAppRun = (appRun) => {
7
7
  return {
@@ -111,4 +111,4 @@ Object.defineProperty(exports, "createDataScienceClient", {
111
111
  }
112
112
  });
113
113
 
114
- //# sourceMappingURL=dataScience-D-hyc4GY.cjs.map
114
+ //# sourceMappingURL=dataScience-B5QxZnvW.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"dataScience-D-hyc4GY.cjs","names":["createOpenapiFetchClient","createAuthHeaders","createGenericFetchClient","readAppLogsDownload","readAppLogsTail"],"sources":["../src/clients/dataScience/utils.ts","../src/clients/dataScience/dataScienceClient.ts"],"sourcesContent":["import type { RawAppRun } from './types';\n\nexport const prepareAppRun = (appRun: RawAppRun) => {\n return {\n ...appRun,\n state: appRun.state ?? (appRun.stoppedAt ? 'finished' : 'running'), // fallback state for historic non migrated runs\n };\n};\n","import { readAppLogsDownload, readAppLogsTail } from '../../domain/appLogs';\nimport { createGenericFetchClient, createOpenapiFetchClient } from '../../fetchClient';\nimport { createAuthHeaders } from '../auth';\nimport type { ClientInitOptions } from '../types';\n\nimport type { paths } from './__generated__/schema';\nimport type {\n CreateDataAppBody,\n DeleteDataAppPath,\n DeleteSandboxPath,\n GetAppsQuery,\n GetDataAppLogsDownloadPath,\n GetDataAppLogsTailPath,\n GetDataAppLogsTailQuery,\n GetDataAppPasswordPath,\n GetDataAppPath,\n GetDataAppRunPath,\n GetDataAppRunsPath,\n GetDataAppRunsQuery,\n GetSandboxPath,\n PatchDataAppBody,\n PatchDataAppPath,\n ResetDataAppPasswordPath,\n} from './types';\nimport { prepareAppRun } from './utils';\n\nexport const createDataScienceClient = ({ baseUrl, middlewares, auth }: ClientInitOptions) => {\n const client = createOpenapiFetchClient<paths>({\n baseUrl,\n middlewares,\n headers: createAuthHeaders(auth),\n });\n const genericClient = createGenericFetchClient({ baseUrl, middlewares });\n\n const getAppRuns = async (\n appId: GetDataAppRunsPath['appId'],\n query?: GetDataAppRunsQuery,\n signal?: AbortSignal,\n ) => {\n const { data } = await client.get('/apps/{appId}/runs', { path: { appId }, query }, { signal });\n\n return data.map(prepareAppRun);\n };\n\n const getAppRun = async (\n appId: GetDataAppRunPath['appId'],\n runId: GetDataAppRunPath['runId'],\n signal?: AbortSignal,\n ) => {\n const { data } = await client.get(\n '/apps/{appId}/runs/{runId}',\n { path: { appId, runId } },\n { signal },\n );\n\n return prepareAppRun(data);\n };\n\n const getAppLogsDownload = (id: GetDataAppLogsDownloadPath['appId'], signal?: AbortSignal) =>\n readAppLogsDownload(() =>\n client.get('/apps/{appId}/logs/download', { path: { appId: id } }, { signal }),\n );\n\n const getAppLogsTail = (\n id: GetDataAppLogsTailPath['appId'],\n { query, signal }: { query?: GetDataAppLogsTailQuery; signal?: AbortSignal } = {},\n ) =>\n readAppLogsTail(() =>\n client.get('/apps/{appId}/logs/tail', { query, path: { appId: id } }, { signal }),\n );\n\n const getApps = async (query: GetAppsQuery, signal?: AbortSignal) => {\n const { data } = await client.get('/apps', { query }, { signal });\n\n return data;\n };\n\n const getApp = async (appId: GetDataAppPath['appId'], signal?: AbortSignal) => {\n const { data } = await client.get('/apps/{appId}', { path: { appId } }, { signal });\n\n return data;\n };\n\n const createApp = async (body: CreateDataAppBody, signal?: AbortSignal) => {\n const { data } = await client.post('/apps', { body }, { signal });\n\n return data;\n };\n\n const patchApp = async (\n appId: PatchDataAppPath['appId'],\n body: PatchDataAppBody,\n signal?: AbortSignal,\n ) => {\n const { data } = await client.patch(\n '/apps/{appId}',\n {\n path: { appId: appId },\n body: body,\n },\n { signal },\n );\n return data;\n };\n\n const deleteApp = async (appId: DeleteDataAppPath['appId'], signal?: AbortSignal) => {\n return client.delete('/apps/{appId}', { path: { appId } }, { signal });\n };\n\n const getAppPassword = async (appId: GetDataAppPasswordPath['appId'], signal?: AbortSignal) => {\n const { data } = await client.get('/apps/{appId}/password', { path: { appId } }, { signal });\n\n return data;\n };\n\n const resetAppPassword = async (\n appId: ResetDataAppPasswordPath['appId'],\n signal?: AbortSignal,\n ) => {\n const { data } = await client.post(\n '/apps/{appId}/reset-password',\n { path: { appId } },\n { signal },\n );\n\n return data;\n };\n\n const getRuntimes = async (signal?: AbortSignal) => {\n const { data } = await client.get('/runtimes', {}, { signal });\n\n return data;\n };\n\n const getSandbox = async (appId: GetSandboxPath['appId'], signal?: AbortSignal) => {\n const { data } = await client.get('/sandboxes/{appId}', { path: { appId } }, { signal });\n\n return data;\n };\n\n const deleteSandbox = async (appId: DeleteSandboxPath['appId'], signal?: AbortSignal) => {\n return client.delete('/sandboxes/{appId}', { path: { appId } }, { signal });\n };\n\n const healthCheck = async (signal?: AbortSignal) => {\n const { data } = await genericClient.get('/health-check', {}, { signal });\n\n return data;\n };\n\n return {\n healthCheck,\n getAppRuns,\n getAppRun,\n getAppLogsDownload,\n getAppLogsTail,\n getApps,\n getApp,\n createApp,\n patchApp,\n deleteApp,\n getAppPassword,\n resetAppPassword,\n getRuntimes,\n getSandbox,\n deleteSandbox,\n };\n};\n"],"mappings":";;;;;AAEA,MAAa,iBAAiB,WAAsB;CAClD,OAAO;EACL,GAAG;EACH,OAAO,OAAO,UAAU,OAAO,YAAY,aAAa;CAC1D;AACF;;;ACmBA,MAAa,2BAA2B,EAAE,SAAS,aAAa,WAA8B;CAC5F,MAAM,SAASA,iCAAAA,yBAAgC;EAC7C;EACA;EACA,SAASC,aAAAA,kBAAkB,IAAI;CACjC,CAAC;CACD,MAAM,gBAAgBC,iCAAAA,y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enericFetchClient","readAppLogsDownload","readAppLogsTail"],"sources":["../src/clients/dataScience/utils.ts","../src/clients/dataScience/dataScienceClient.ts"],"sourcesContent":["import type { RawAppRun } from './types';\n\nexport const prepareAppRun = (appRun: RawAppRun) => {\n return {\n ...appRun,\n state: appRun.state ?? (appRun.stoppedAt ? 'finished' : 'running'), // fallback state for historic non migrated runs\n };\n};\n","import { readAppLogsDownload, readAppLogsTail } from '../../domain/appLogs';\nimport { createGenericFetchClient, createOpenapiFetchClient } from '../../fetchClient';\nimport { createAuthHeaders } from '../auth';\nimport type { ClientInitOptions } from '../types';\n\nimport type { paths } from './__generated__/schema';\nimport type {\n CreateDataAppBody,\n DeleteDataAppPath,\n DeleteSandboxPath,\n GetAppsQuery,\n GetDataAppLogsDownloadPath,\n GetDataAppLogsTailPath,\n GetDataAppLogsTailQuery,\n GetDataAppPasswordPath,\n GetDataAppPath,\n GetDataAppRunPath,\n GetDataAppRunsPath,\n GetDataAppRunsQuery,\n GetSandboxPath,\n PatchDataAppBody,\n PatchDataAppPath,\n ResetDataAppPasswordPath,\n} from './types';\nimport { prepareAppRun } from './utils';\n\nexport const createDataScienceClient = ({ baseUrl, middlewares, auth }: ClientInitOptions) => {\n const client = createOpenapiFetchClient<paths>({\n baseUrl,\n middlewares,\n headers: createAuthHeaders(auth),\n });\n const genericClient = createGenericFetchClient({ baseUrl, middlewares });\n\n const getAppRuns = async (\n appId: GetDataAppRunsPath['appId'],\n query?: GetDataAppRunsQuery,\n signal?: AbortSignal,\n ) => {\n const { data } = await client.get('/apps/{appId}/runs', { path: { appId }, query }, { signal });\n\n return data.map(prepareAppRun);\n };\n\n const getAppRun = async (\n appId: GetDataAppRunPath['appId'],\n runId: GetDataAppRunPath['runId'],\n signal?: AbortSignal,\n ) => {\n const { data } = await client.get(\n '/apps/{appId}/runs/{runId}',\n { path: { appId, runId } },\n { signal },\n );\n\n return prepareAppRun(data);\n };\n\n const getAppLogsDownload = (id: GetDataAppLogsDownloadPath['appId'], signal?: AbortSignal) =>\n readAppLogsDownload(() =>\n client.get('/apps/{appId}/logs/download', { path: { appId: id } }, { signal }),\n );\n\n const getAppLogsTail = (\n id: GetDataAppLogsTailPath['appId'],\n { query, signal }: { query?: GetDataAppLogsTailQuery; signal?: AbortSignal } = {},\n ) =>\n readAppLogsTail(() =>\n client.get('/apps/{appId}/logs/tail', { query, path: { appId: id } }, { signal }),\n );\n\n const getApps = async (query: GetAppsQuery, signal?: AbortSignal) => {\n const { data } = await client.get('/apps', { query }, { signal });\n\n return data;\n };\n\n const getApp = async (appId: GetDataAppPath['appId'], signal?: AbortSignal) => {\n const { data } = await client.get('/apps/{appId}', { path: { appId } }, { signal });\n\n return data;\n };\n\n const createApp = async (body: CreateDataAppBody, signal?: AbortSignal) => {\n const { data } = await client.post('/apps', { body }, { signal });\n\n return data;\n };\n\n const patchApp = async (\n appId: PatchDataAppPath['appId'],\n body: PatchDataAppBody,\n signal?: AbortSignal,\n ) => {\n const { data } = await client.patch(\n '/apps/{appId}',\n {\n path: { appId: appId },\n body: body,\n },\n { signal },\n );\n return data;\n };\n\n const deleteApp = async (appId: DeleteDataAppPath['appId'], signal?: AbortSignal) => {\n return client.delete('/apps/{appId}', { path: { appId } }, { signal });\n };\n\n const getAppPassword = async (appId: GetDataAppPasswordPath['appId'], signal?: AbortSignal) => {\n const { data } = await client.get('/apps/{appId}/password', { path: { appId } }, { signal });\n\n return data;\n };\n\n const resetAppPassword = async (\n appId: ResetDataAppPasswordPath['appId'],\n signal?: AbortSignal,\n ) => {\n const { data } = await client.post(\n '/apps/{appId}/reset-password',\n { path: { appId } },\n { signal },\n );\n\n return data;\n };\n\n const getRuntimes = async (signal?: AbortSignal) => {\n const { data } = await client.get('/runtimes', {}, { signal });\n\n return data;\n };\n\n const getSandbox = async (appId: GetSandboxPath['appId'], signal?: AbortSignal) => {\n const { data } = await client.get('/sandboxes/{appId}', { path: { appId } }, { signal });\n\n return data;\n };\n\n const deleteSandbox = async (appId: DeleteSandboxPath['appId'], signal?: AbortSignal) => {\n return client.delete('/sandboxes/{appId}', { path: { appId } }, { signal });\n };\n\n const healthCheck = async (signal?: AbortSignal) => {\n const { data } = await genericClient.get('/health-check', {}, { signal });\n\n return data;\n };\n\n return {\n healthCheck,\n getAppRuns,\n getAppRun,\n getAppLogsDownload,\n getAppLogsTail,\n getApps,\n getApp,\n createApp,\n patchApp,\n deleteApp,\n getAppPassword,\n resetAppPassword,\n getRuntimes,\n getSandbox,\n deleteSandbox,\n };\n};\n"],"mappings":";;;;;AAEA,MAAa,iBAAiB,WAAsB;CAClD,OAAO;EACL,GAAG;EACH,OAAO,OAAO,UAAU,OAAO,YAAY,aAAa;CAC1D;AACF;;;ACmBA,MAAa,2BAA2B,EAAE,SAAS,aAAa,WAA8B;CAC5F,MAAM,SAASA,iCAAAA,yBAAgC;EAC7C;EACA;EACA,SAASC,aAAAA,kBAAkB,IAAI;CACjC,CAAC;CACD,MAAM,gBAAgBC,iCAAAA,yBAAyB;EAAE;EAAS;CAAY,CAAC;CAEvE,MAAM,aAAa,OACjB,OACA,OACA,WACG;EACH,MAAM,EAAE,SAAS,MAAM,OAAO,IAAI,sBAAsB;GAAE,MAAM,EAAE,MAAM;GAAG;EAAM,GAAG,EAAE,OAAO,CAAC;EAE9F,OAAO,KAAK,IAAI,aAAa;CAC/B;CAEA,MAAM,YAAY,OAChB,OACA,OACA,WACG;EACH,MAAM,EAAE,SAAS,MAAM,OAAO,IAC5B,8BACA,EAAE,MAAM;GAAE;GAAO;EAAM,EAAE,GACzB,EAAE,OAAO,CACX;EAEA,OAAO,cAAc,IAAI;CAC3B;CAEA,MAAM,sBAAsB,IAAyC,WACnEC,gBAAAA,0BACE,OAAO,IAAI,+BAA+B,EAAE,MAAM,EAAE,OAAO,GAAG,EAAE,GAAG,EAAE,OAAO,CAAC,CAC/E;CAEF,MAAM,kBACJ,IACA,EAAE,OAAO,WAAsE,CAAC,MAEhFC,gBAAAA,sBACE,OAAO,IAAI,2BAA2B;EAAE;EAA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;CACT;CAEA,MAAM,aAAa,OAAO,OAAgC,WAAyB;EACjF,MAAM,EAAE,SAAS,MAAM,OAAO,IAAI,sBAAsB,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,CAAC;EAEvF,OAAO;CACT;CAEA,MAAM,gBAAgB,OAAO,OAAmC,WAAyB;EACvF,OAAO,OAAO,OAAO,sBAAsB,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,CAAC;CAC5E;CAEA,MAAM,cAAc,OAAO,WAAyB;EAClD,MAAM,EAAE,SAAS,MAAM,cAAc,IAAI,iBAAiB,CAAC,GAAG,EAAE,OAAO,CAAC;EAExE,OAAO;CACT;CAEA,OAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;AACF"}
@@ -1,7 +1,7 @@
1
- import { t as createGenericFetchClient } from "./createGenericFetchClient-Bnf1QK9W.js";
2
- import { t as createOpenapiFetchClient } from "./createOpenapiFetchClient-COaPeeQ0.js";
3
- import { t as createAuthHeaders } from "./auth-BjmkFOgd.js";
4
- import { n as readAppLogsDownload, r as readAppLogsTail } from "./appLogs-Cl7Q_MR9.js";
1
+ import { t as createGenericFetchClient } from "./createGenericFetchClient-Dg1rgzmG.js";
2
+ import { t as createOpenapiFetchClient } from "./createOpenapiFetchClient-DZUOVupy.js";
3
+ import { t as createAuthHeaders } from "./auth-DworfoPy.js";
4
+ import { n as readAppLogsDownload, r as readAppLogsTail } from "./appLogs-BBkkUOW1.js";
5
5
  //#region src/clients/dataScience/utils.ts
6
6
  const prepareAppRun = (appRun) => {
7
7
  return {
@@ -106,4 +106,4 @@ const createDataScienceClient = ({ baseUrl, middlewares, auth }) => {
106
106
  //#endregion
107
107
  export { createDataScienceClient as t };
108
108
 
109
- //# sourceMappingURL=dataScience-B_BmnB1m.js.map
109
+ //# sourceMappingURL=dataScience-OXcwdk1p.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dataScience-B_BmnB1m.js","names":[],"sources":["../src/clients/dataScience/utils.ts","../src/clients/dataScience/dataScienceClient.ts"],"sourcesContent":["import type { RawAppRun } from './types';\n\nexport const prepareAppRun = (appRun: RawAppRun) => {\n return {\n ...appRun,\n state: appRun.state ?? (appRun.stoppedAt ? 'finished' : 'running'), // fallback state for historic non migrated runs\n };\n};\n","import { readAppLogsDownload, readAppLogsTail } from '../../domain/appLogs';\nimport { createGenericFetchClient, createOpenapiFetchClient } from '../../fetchClient';\nimport { createAuthHeaders } from '../auth';\nimport type { ClientInitOptions } from '../types';\n\nimport type { paths } from './__generated__/schema';\nimport type {\n CreateDataAppBody,\n DeleteDataAppPath,\n DeleteSandboxPath,\n GetAppsQuery,\n GetDataAppLogsDownloadPath,\n GetDataAppLogsTailPath,\n GetDataAppLogsTailQuery,\n GetDataAppPasswordPath,\n GetDataAppPath,\n GetDataAppRunPath,\n GetDataAppRunsPath,\n GetDataAppRunsQuery,\n GetSandboxPath,\n PatchDataAppBody,\n PatchDataAppPath,\n ResetDataAppPasswordPath,\n} from './types';\nimport { prepareAppRun } from './utils';\n\nexport const createDataScienceClient = ({ baseUrl, middlewares, auth }: ClientInitOptions) => {\n const client = createOpenapiFetchClient<paths>({\n baseUrl,\n middlewares,\n headers: createAuthHeaders(auth),\n });\n const genericClient = createGenericFetchClient({ baseUrl, middlewares });\n\n const getAppRuns = async (\n appId: GetDataAppRunsPath['appId'],\n query?: GetDataAppRunsQuery,\n signal?: AbortSignal,\n ) => {\n const { data } = await client.get('/apps/{appId}/runs', { path: { appId }, query }, { signal });\n\n return data.map(prepareAppRun);\n };\n\n const getAppRun = async (\n appId: GetDataAppRunPath['appId'],\n runId: GetDataAppRunPath['runId'],\n signal?: AbortSignal,\n ) => {\n const { data } = await client.get(\n '/apps/{appId}/runs/{runId}',\n { path: { appId, runId } },\n { signal },\n );\n\n return prepareAppRun(data);\n };\n\n const getAppLogsDownload = (id: GetDataAppLogsDownloadPath['appId'], signal?: AbortSignal) =>\n readAppLogsDownload(() =>\n client.get('/apps/{appId}/logs/download', { path: { appId: id } }, { signal }),\n );\n\n const getAppLogsTail = (\n id: GetDataAppLogsTailPath['appId'],\n { query, signal }: { query?: GetDataAppLogsTailQuery; signal?: AbortSignal } = {},\n ) =>\n readAppLogsTail(() =>\n client.get('/apps/{appId}/logs/tail', { query, path: { appId: id } }, { signal }),\n );\n\n const getApps = async (query: GetAppsQuery, signal?: AbortSignal) => {\n const { data } = await client.get('/apps', { query }, { signal });\n\n return data;\n };\n\n const getApp = async (appId: GetDataAppPath['appId'], signal?: AbortSignal) => {\n const { data } = await client.get('/apps/{appId}', { path: { appId } }, { signal });\n\n return data;\n };\n\n const createApp = async (body: CreateDataAppBody, signal?: AbortSignal) => {\n const { data } = await client.post('/apps', { body }, { signal });\n\n return data;\n };\n\n const patchApp = async (\n appId: PatchDataAppPath['appId'],\n body: PatchDataAppBody,\n signal?: AbortSignal,\n ) => {\n const { data } = await client.patch(\n '/apps/{appId}',\n {\n path: { appId: appId },\n body: body,\n },\n { signal },\n );\n return data;\n };\n\n const deleteApp = async (appId: DeleteDataAppPath['appId'], signal?: AbortSignal) => {\n return client.delete('/apps/{appId}', { path: { appId } }, { signal });\n };\n\n const getAppPassword = async (appId: GetDataAppPasswordPath['appId'], signal?: AbortSignal) => {\n const { data } = await client.get('/apps/{appId}/password', { path: { appId } }, { signal });\n\n return data;\n };\n\n const resetAppPassword = async (\n appId: ResetDataAppPasswordPath['appId'],\n signal?: AbortSignal,\n ) => {\n const { data } = await client.post(\n '/apps/{appId}/reset-password',\n { path: { appId } },\n { signal },\n );\n\n return data;\n };\n\n const getRuntimes = async (signal?: AbortSignal) => {\n const { data } = await client.get('/runtimes', {}, { signal });\n\n return data;\n };\n\n const getSandbox = async (appId: GetSandboxPath['appId'], signal?: AbortSignal) => {\n const { data } = await client.get('/sandboxes/{appId}', { path: { appId } }, { signal });\n\n return data;\n };\n\n const deleteSandbox = async (appId: DeleteSandboxPath['appId'], signal?: AbortSignal) => {\n return client.delete('/sandboxes/{appId}', { path: { appId } }, { signal });\n };\n\n const healthCheck = async (signal?: AbortSignal) => {\n const { data } = await genericClient.get('/health-check', {}, { signal });\n\n return data;\n };\n\n return {\n healthCheck,\n getAppRuns,\n getAppRun,\n getAppLogsDownload,\n getAppLogsTail,\n getApps,\n getApp,\n createApp,\n patchApp,\n deleteApp,\n getAppPassword,\n resetAppPassword,\n getRuntimes,\n getSandbox,\n deleteSandbox,\n };\n};\n"],"mappings":";;;;;AAEA,MAAa,iBAAiB,WAAsB;CAClD,OAAO;EACL,GAAG;EACH,OAAO,OAAO,UAAU,OAAO,YAAY,aAAa;CAC1D;AACF;;;ACmBA,MAAa,2BAA2B,EAAE,SAAS,aAAa,WAA8B;CAC5F,MAAM,SAAS,yBAAgC;EAC7C;EACA;EACA,SAAS,kBAAkB,IAAI;CACjC,CAAC;CACD,MAAM,gBAAgB,yBAAyB;EAAE;EAAS;CAAY,CAAC;CAEvE,MAAM,aAAa,OACjB,OACA,OACA,WACG;EACH,MAAM,EAAE,SAAS,MAAM,OAAO,IAAI,sBAAsB;GAAE,MAAM,EAAE,MAAM;GAAG;EAAM,GAAG,EAAE,OAAO,CAAC;EAE9F,OAAO,KAAK,IAAI,aAAa;CAC/B;CAEA,MAAM,YAAY,OAChB,OACA,OACA,WACG;EACH,MAAM,EAAE,SAAS,MAAM,OAAO,IAC5B,8BACA,EAAE,MAAM;GAAE;GAAO;EAAM,EAAE,GACzB,EAAE,OAAO,CACX;EAEA,OAAO,cAAc,IAAI;CAC3B;CAEA,MAAM,sBAAsB,IAAyC,WACnE,0BACE,OAAO,IAAI,+BAA+B,EAAE,MAAM,EAAE,OAAO,GAAG,EAAE,GAAG,EAAE,OAAO,CAAC,CAC/E;CAEF,MAAM,kBACJ,IACA,EAAE,OAAO,WAAsE,CAAC,MAEhF,sBACE,OAAO,IAAI,2BAA2B;EAAE;EAAO,MAAM,EAAE,OAAO,GAAG;CAAE,GAAG,EAAE,OAAO,C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AAM,EAAE,SAAS,MAAM,OAAO,IAAI,sBAAsB,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,CAAC;EAEvF,OAAO;CACT;CAEA,MAAM,gBAAgB,OAAO,OAAmC,WAAyB;EACvF,OAAO,OAAO,OAAO,sBAAsB,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,CAAC;CAC5E;CAEA,MAAM,cAAc,OAAO,WAAyB;EAClD,MAAM,EAAE,SAAS,MAAM,cAAc,IAAI,iBAAiB,CAAC,GAAG,EAAE,OAAO,CAAC;EAExE,OAAO;CACT;CAEA,OAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;AACF"}
1
+ {"version":3,"file":"dataScience-OXcwdk1p.js","names":[],"sources":["../src/clients/dataScience/utils.ts","../src/clients/dataScience/dataScienceClient.ts"],"sourcesContent":["import type { RawAppRun } from './types';\n\nexport const prepareAppRun = (appRun: RawAppRun) => {\n return {\n ...appRun,\n state: appRun.state ?? (appRun.stoppedAt ? 'finished' : 'running'), // fallback state for historic non migrated runs\n };\n};\n","import { readAppLogsDownload, readAppLogsTail } from '../../domain/appLogs';\nimport { createGenericFetchClient, createOpenapiFetchClient } from '../../fetchClient';\nimport { createAuthHeaders } from '../auth';\nimport type { ClientInitOptions } from '../types';\n\nimport type { paths } from './__generated__/schema';\nimport type {\n CreateDataAppBody,\n DeleteDataAppPath,\n DeleteSandboxPath,\n GetAppsQuery,\n GetDataAppLogsDownloadPath,\n GetDataAppLogsTailPath,\n GetDataAppLogsTailQuery,\n GetDataAppPasswordPath,\n GetDataAppPath,\n GetDataAppRunPath,\n GetDataAppRunsPath,\n GetDataAppRunsQuery,\n GetSandboxPath,\n PatchDataAppBody,\n PatchDataAppPath,\n ResetDataAppPasswordPath,\n} from './types';\nimport { prepareAppRun } from './utils';\n\nexport const createDataScienceClient = ({ baseUrl, middlewares, auth }: ClientInitOptions) => {\n const client = createOpenapiFetchClient<paths>({\n baseUrl,\n middlewares,\n headers: createAuthHeaders(auth),\n });\n const genericClient = createGenericFetchClient({ baseUrl, middlewares });\n\n const getAppRuns = async (\n appId: GetDataAppRunsPath['appId'],\n query?: GetDataAppRunsQuery,\n signal?: AbortSignal,\n ) => {\n const { data } = await client.get('/apps/{appId}/runs', { path: { appId }, query }, { signal });\n\n return data.map(prepareAppRun);\n };\n\n const getAppRun = async (\n appId: GetDataAppRunPath['appId'],\n runId: GetDataAppRunPath['runId'],\n signal?: AbortSignal,\n ) => {\n const { data } = await client.get(\n '/apps/{appId}/runs/{runId}',\n { path: { appId, runId } },\n { signal },\n );\n\n return prepareAppRun(data);\n };\n\n const getAppLogsDownload = (id: GetDataAppLogsDownloadPath['appId'], signal?: AbortSignal) =>\n readAppLogsDownload(() =>\n client.get('/apps/{appId}/logs/download', { path: { appId: id } }, { signal }),\n );\n\n const getAppLogsTail = (\n id: GetDataAppLogsTailPath['appId'],\n { query, signal }: { query?: GetDataAppLogsTailQuery; signal?: AbortSignal } = {},\n ) =>\n readAppLogsTail(() =>\n client.get('/apps/{appId}/logs/tail', { query, path: { appId: id } }, { signal }),\n );\n\n const getApps = async (query: GetAppsQuery, signal?: AbortSignal) => {\n const { data } = await client.get('/apps', { query }, { signal });\n\n return data;\n };\n\n const getApp = async (appId: GetDataAppPath['appId'], signal?: AbortSignal) => {\n const { data } = await client.get('/apps/{appId}', { path: { appId } }, { signal });\n\n return data;\n };\n\n const createApp = async (body: CreateDataAppBody, signal?: AbortSignal) => {\n const { data } = await client.post('/apps', { body }, { signal });\n\n return data;\n };\n\n const patchApp = async (\n appId: PatchDataAppPath['appId'],\n body: PatchDataAppBody,\n signal?: AbortSignal,\n ) => {\n const { data } = await client.patch(\n '/apps/{appId}',\n {\n path: { appId: appId },\n body: body,\n },\n { signal },\n );\n return data;\n };\n\n const deleteApp = async (appId: DeleteDataAppPath['appId'], signal?: AbortSignal) => {\n return client.delete('/apps/{appId}', { path: { appId } }, { signal });\n };\n\n const getAppPassword = async (appId: GetDataAppPasswordPath['appId'], signal?: AbortSignal) => {\n const { data } = await client.get('/apps/{appId}/password', { path: { appId } }, { signal });\n\n return data;\n };\n\n const resetAppPassword = async (\n appId: ResetDataAppPasswordPath['appId'],\n signal?: AbortSignal,\n ) => {\n const { data } = await client.post(\n '/apps/{appId}/reset-password',\n { path: { appId } },\n { signal },\n );\n\n return data;\n };\n\n const getRuntimes = async (signal?: AbortSignal) => {\n const { data } = await client.get('/runtimes', {}, { signal });\n\n return data;\n };\n\n const getSandbox = async (appId: GetSandboxPath['appId'], signal?: AbortSignal) => {\n const { data } = await client.get('/sandboxes/{appId}', { path: { appId } }, { signal });\n\n return data;\n };\n\n const deleteSandbox = async (appId: DeleteSandboxPath['appId'], signal?: AbortSignal) => {\n return client.delete('/sandboxes/{appId}', { path: { appId } }, { signal });\n };\n\n const healthCheck = async (signal?: AbortSignal) => {\n const { data } = await genericClient.get('/health-check', {}, { signal });\n\n return data;\n };\n\n return {\n healthCheck,\n getAppRuns,\n getAppRun,\n getAppLogsDownload,\n getAppLogsTail,\n getApps,\n getApp,\n createApp,\n patchApp,\n deleteApp,\n getAppPassword,\n resetAppPassword,\n getRuntimes,\n getSandbox,\n deleteSandbox,\n };\n};\n"],"mappings":";;;;;AAEA,MAAa,iBAAiB,WAAsB;CAClD,OAAO;EACL,GAAG;EACH,OAAO,OAAO,UAAU,OAAO,YAAY,aAAa;CAC1D;AACF;;;ACmBA,MAAa,2BAA2B,EAAE,SAAS,aAAa,WAA8B;CAC5F,MAAM,SAAS,yBAAgC;EAC7C;EACA;EACA,SAAS,kBAAkB,IAAI;CACjC,CAAC;CACD,MAAM,gBAAgB,yBAAyB;EAAE;EAAS;CAAY,CAAC;CAEvE,MAAM,aAAa,OACjB,OACA,OACA,WACG;EACH,MAAM,EAAE,SAAS,MAAM,OAAO,IAAI,sBAAsB;GAAE,MAAM,EAAE,MAAM;GAAG;EAAM,GAAG,EAAE,OAAO,CAA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EA,MAAM,iBAAiB,OAAO,OAAwC,WAAyB;EAC7F,MAAM,EAAE,SAAS,MAAM,OAAO,IAAI,0BAA0B,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,CAAC;EAE3F,OAAO;CACT;CAEA,MAAM,mBAAmB,OACvB,OACA,WACG;EACH,MAAM,EAAE,SAAS,MAAM,OAAO,KAC5B,gCACA,EAAE,MAAM,EAAE,MAAM,EAAE,GAClB,EAAE,OAAO,CACX;EAEA,OAAO;CACT;CAEA,MAAM,cAAc,OAAO,WAAyB;EAClD,MAAM,EAAE,SAAS,MAAM,OAAO,IAAI,aAAa,CAAC,GAAG,EAAE,OAAO,CAAC;EAE7D,OAAO;CACT;CAEA,MAAM,aAAa,OAAO,OAAgC,WAAyB;EACjF,MAAM,EAAE,SAAS,MAAM,OAAO,IAAI,sBAAsB,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,CAAC;EAEvF,OAAO;CACT;CAEA,MAAM,gBAAgB,OAAO,OAAmC,WAAyB;EACvF,OAAO,OAAO,OAAO,sBAAsB,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,CAAC;CAC5E;CAEA,MAAM,cAAc,OAAO,WAAyB;EAClD,MAAM,EAAE,SAAS,MAAM,cAAc,IAAI,iBAAiB,CAAC,GAAG,EAAE,OAAO,CAAC;EAExE,OAAO;CACT;CAEA,OAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;AACF"}
@@ -0,0 +1,21 @@
1
+ //#region src/utils/async/dedupe.ts
2
+ /**
3
+ * Shares one in-flight run of `task` across concurrent triggers.
4
+ *
5
+ * - Once it settles, the next trigger starts a fresh run (unlike `coalesce`, no trailing run).
6
+ * - The returned promise rejects with whatever `task` throws.
7
+ */
8
+ const dedupe = (task) => {
9
+ let inflight = null;
10
+ const runTask = async () => await task();
11
+ return () => {
12
+ inflight ??= runTask().finally(() => {
13
+ inflight = null;
14
+ });
15
+ return inflight;
16
+ };
17
+ };
18
+ //#endregion
19
+ export { dedupe as t };
20
+
21
+ //# sourceMappingURL=dedupe-Cky1gSUu.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dedupe-Cky1gSUu.js","names":[],"sources":["../src/utils/async/dedupe.ts"],"sourcesContent":["import type { TaskFn } from './types';\n\n/**\n * Shares one in-flight run of `task` across concurrent triggers.\n *\n * - Once it settles, the next trigger starts a fresh run (unlike `coalesce`, no trailing run).\n * - The returned promise rejects with whatever `task` throws.\n */\nexport const dedupe = <T>(task: TaskFn<T>): (() => Promise<Awaited<T>>) => {\n let inflight: Promise<Awaited<T>> | null = null;\n\n // async wrapper so a synchronous throw from `task` rejects rather than throws.\n const runTask = async (): Promise<Awaited<T>> => await task();\n\n return () => {\n inflight ??= runTask().finally(() => {\n inflight = null;\n });\n return inflight;\n };\n};\n"],"mappings":";;;;;;;AAQA,MAAa,UAAa,SAAiD;CACzE,IAAI,WAAuC;CAG3C,MAAM,UAAU,YAAiC,MAAM,KAAK;CAE5D,aAAa;EACX,aAAa,QAAQ,CAAC,CAAC,cAAc;GACnC,WAAW;EACb,CAAC;EACD,OAAO;CACT;AACF"}
@@ -0,0 +1,26 @@
1
+ //#region src/utils/async/dedupe.ts
2
+ /**
3
+ * Shares one in-flight run of `task` across concurrent triggers.
4
+ *
5
+ * - Once it settles, the next trigger starts a fresh run (unlike `coalesce`, no trailing run).
6
+ * - The returned promise rejects with whatever `task` throws.
7
+ */
8
+ const dedupe = (task) => {
9
+ let inflight = null;
10
+ const runTask = async () => await task();
11
+ return () => {
12
+ inflight ??= runTask().finally(() => {
13
+ inflight = null;
14
+ });
15
+ return inflight;
16
+ };
17
+ };
18
+ //#endregion
19
+ Object.defineProperty(exports, "dedupe", {
20
+ enumerable: true,
21
+ get: function() {
22
+ return dedupe;
23
+ }
24
+ });
25
+
26
+ //# sourceMappingURL=dedupe-OSnnst2u.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dedupe-OSnnst2u.cjs","names":[],"sources":["../src/utils/async/dedupe.ts"],"sourcesContent":["import type { TaskFn } from './types';\n\n/**\n * Shares one in-flight run of `task` across concurrent triggers.\n *\n * - Once it settles, the next trigger starts a fresh run (unlike `coalesce`, no trailing run).\n * - The returned promise rejects with whatever `task` throws.\n */\nexport const dedupe = <T>(task: TaskFn<T>): (() => Promise<Awaited<T>>) => {\n let inflight: Promise<Awaited<T>> | null = null;\n\n // async wrapper so a synchronous throw from `task` rejects rather than throws.\n const runTask = async (): Promise<Awaited<T>> => await task();\n\n return () => {\n inflight ??= runTask().finally(() => {\n inflight = null;\n });\n return inflight;\n };\n};\n"],"mappings":";;;;;;;AAQA,MAAa,UAAa,SAAiD;CACzE,IAAI,WAAuC;CAG3C,MAAM,UAAU,YAAiC,MAAM,KAAK;CAE5D,aAAa;EACX,aAAa,QAAQ,CAAC,CAAC,cAAc;GACnC,WAAW;EACb,CAAC;EACD,OAAO;CACT;AACF"}
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_developerPortalClient = require("../developerPortalClient-CutPqoAa.cjs");
2
+ const require_developerPortalClient = require("../developerPortalClient-CLPpBksD.cjs");
3
3
  exports.authHeader = require_developerPortalClient.authHeader;
4
4
  exports.createDeveloperPortalClient = require_developerPortalClient.createDeveloperPortalClient;
5
5
  exports.isMfaChallengeResponse = require_developerPortalClient.isMfaChallengeResponse;
@@ -1,3 +1,3 @@
1
- import { A as ResetPasswordConfirmInput, B as UserRequest, C as MfaConfirmInput, D as Profile, E as PaginationQuery, F as UpdateAppAsAdminInput, H as VendorListItem, I as UpdateAppInput, L as UpdateVendorAsAdminInput, M as ServiceIndex, N as SignUpInput, O as RefreshTokensResult, P as Stack, R as UpdateVendorInput, S as LoginSuccess, T as MfaSetupResult, U as Version, V as Vendor, _ as GetVendorUsersQuery, a as AppRepository, b as LoginInput, c as ConfirmAccountInput, d as CreateVendorAsAdminInput, f as CreateVendorInput, g as GetChangesQuery, h as GetAppsQuery, i as AppChange, j as ServiceAccount, k as RejectAppInput, l as CreateAppInput, m as DeveloperPortalError, n as AdminVendor, o as AppVendor, p as DeprecateAppInput, r as App, s as ApproveVendorInput, t as AdminPaginationQuery, u as CreateServiceAccountInput, v as IconUploadLink, w as MfaSetupInput, x as LoginResult, y as LoginChallenge, z as User } from "../types-D8Rrz51O.cjs";
2
- import { a as DeveloperPortalClient, c as createDeveloperPortalClient, i as isMfaChallengeResponse, n as authHeader, o as DeveloperPortalClientInitOptions, r as uploadAppIcon, s as DeveloperPortalFetchClient, t as DeveloperPortalTokens } from "../index-GjcJTCbz.cjs";
1
+ import { A as ResetPasswordConfirmInput, B as UserRequest, C as MfaConfirmInput, D as Profile, E as PaginationQuery, F as UpdateAppAsAdminInput, H as VendorListItem, I as UpdateAppInput, L as UpdateVendorAsAdminInput, M as ServiceIndex, N as SignUpInput, O as RefreshTokensResult, P as Stack, R as UpdateVendorInput, S as LoginSuccess, T as MfaSetupResult, U as Version, V as Vendor, _ as GetVendorUsersQuery, a as AppRepository, b as LoginInput, c as ConfirmAccountInput, d as CreateVendorAsAdminInput, f as CreateVendorInput, g as GetChangesQuery, h as GetAppsQuery, i as AppChange, j as ServiceAccount, k as RejectAppInput, l as CreateAppInput, m as DeveloperPortalError, n as AdminVendor, o as AppVendor, p as DeprecateAppInput, r as App, s as ApproveVendorInput, t as AdminPaginationQuery, u as CreateServiceAccountInput, v as IconUploadLink, w as MfaSetupInput, x as LoginResult, y as LoginChallenge, z as User } from "../types-tKkeLa2B.cjs";
2
+ import { a as DeveloperPortalClient, c as createDeveloperPortalClient, i as isMfaChallengeResponse, n as authHeader, o as DeveloperPortalClientInitOptions, r as uploadAppIcon, s as DeveloperPortalFetchClient, t as DeveloperPortalTokens } from "../index-C4TNAA8-.cjs";
3
3
  export { type AdminPaginationQuery, type AdminVendor, type App, type AppChange, type AppRepository, type AppVendor, type ApproveVendorInput, type ConfirmAccountInput, type CreateAppInput, type CreateServiceAccountInput, type CreateVendorAsAdminInput, type CreateVendorInput, type DeprecateAppInput, DeveloperPortalClient, DeveloperPortalClientInitOptions, type DeveloperPortalError, DeveloperPortalFetchClient, type DeveloperPortalTokens, type GetAppsQuery, type GetChangesQuery, type GetVendorUsersQuery, type IconUploadLink, type LoginChallenge, type LoginInput, type LoginResult, type LoginSuccess, type MfaConfirmInput, type MfaSetupInput, type MfaSetupResult, type PaginationQuery, type Profile, type RefreshTokensResult, type RejectAppInput, type ResetPasswordConfirmInput, type ServiceAccount, type ServiceIndex, type SignUpInput, type Stack, type UpdateAppAsAdminInput, type UpdateAppInput, type UpdateVendorAsAdminInput, type UpdateVendorInput, type User, type UserRequest, type Vendor, type VendorListItem, type Version, authHeader, createDeveloperPortalClient, isMfaChallengeResponse, uploadAppIcon };
@@ -1,3 +1,3 @@
1
- import { A as ResetPasswordConfirmInput, B as UserRequest, C as MfaConfirmInput, D as Profile, E as PaginationQuery, F as UpdateAppAsAdminInput, H as VendorListItem, I as UpdateAppInput, L as UpdateVendorAsAdminInput, M as ServiceIndex, N as SignUpInput, O as RefreshTokensResult, P as Stack, R as UpdateVendorInput, S as LoginSuccess, T as MfaSetupResult, U as Version, V as Vendor, _ as GetVendorUsersQuery, a as AppRepository, b as LoginInput, c as ConfirmAccountInput, d as CreateVendorAsAdminInput, f as CreateVendorInput, g as GetChangesQuery, h as GetAppsQuery, i as AppChange, j as ServiceAccount, k as RejectAppInput, l as CreateAppInput, m as DeveloperPortalError, n as AdminVendor, o as AppVendor, p as DeprecateAppInput, r as App, s as ApproveVendorInput, t as AdminPaginationQuery, u as CreateServiceAccountInput, v as IconUploadLink, w as MfaSetupInput, x as LoginResult, y as LoginChallenge, z as User } from "../types-DajzGOKB.js";
2
- import { a as DeveloperPortalClient, c as createDeveloperPortalClient, i as isMfaChallengeResponse, n as authHeader, o as DeveloperPortalClientInitOptions, r as uploadAppIcon, s as DeveloperPortalFetchClient, t as DeveloperPortalTokens } from "../index-pXN4LWUX.js";
1
+ import { A as ResetPasswordConfirmInput, B as UserRequest, C as MfaConfirmInput, D as Profile, E as PaginationQuery, F as UpdateAppAsAdminInput, H as VendorListItem, I as UpdateAppInput, L as UpdateVendorAsAdminInput, M as ServiceIndex, N as SignUpInput, O as RefreshTokensResult, P as Stack, R as UpdateVendorInput, S as LoginSuccess, T as MfaSetupResult, U as Version, V as Vendor, _ as GetVendorUsersQuery, a as AppRepository, b as LoginInput, c as ConfirmAccountInput, d as CreateVendorAsAdminInput, f as CreateVendorInput, g as GetChangesQuery, h as GetAppsQuery, i as AppChange, j as ServiceAccount, k as RejectAppInput, l as CreateAppInput, m as DeveloperPortalError, n as AdminVendor, o as AppVendor, p as DeprecateAppInput, r as App, s as ApproveVendorInput, t as AdminPaginationQuery, u as CreateServiceAccountInput, v as IconUploadLink, w as MfaSetupInput, x as LoginResult, y as LoginChallenge, z as User } from "../types-q-1r_9d1.js";
2
+ import { a as DeveloperPortalClient, c as createDeveloperPortalClient, i as isMfaChallengeResponse, n as authHeader, o as DeveloperPortalClientInitOptions, r as uploadAppIcon, s as DeveloperPortalFetchClient, t as DeveloperPortalTokens } from "../index-C11JSxBY.js";
3
3
  export { type AdminPaginationQuery, type AdminVendor, type App, type AppChange, type AppRepository, type AppVendor, type ApproveVendorInput, type ConfirmAccountInput, type CreateAppInput, type CreateServiceAccountInput, type CreateVendorAsAdminInput, type CreateVendorInput, type DeprecateAppInput, DeveloperPortalClient, DeveloperPortalClientInitOptions, type DeveloperPortalError, DeveloperPortalFetchClient, type DeveloperPortalTokens, type GetAppsQuery, type GetChangesQuery, type GetVendorUsersQuery, type IconUploadLink, type LoginChallenge, type LoginInput, type LoginResult, type LoginSuccess, type MfaConfirmInput, type MfaSetupInput, type MfaSetupResult, type PaginationQuery, type Profile, type RefreshTokensResult, type RejectAppInput, type ResetPasswordConfirmInput, type ServiceAccount, type ServiceIndex, type SignUpInput, type Stack, type UpdateAppAsAdminInput, type UpdateAppInput, type UpdateVendorAsAdminInput, type UpdateVendorInput, type User, type UserRequest, type Vendor, type VendorListItem, type Version, authHeader, createDeveloperPortalClient, isMfaChallengeResponse, uploadAppIcon };
@@ -1,2 +1,2 @@
1
- import { i as uploadAppIcon, n as isMfaChallengeResponse, r as authHeader, t as createDeveloperPortalClient } from "../developerPortalClient-yHFTkKPb.js";
1
+ import { i as uploadAppIcon, n as isMfaChallengeResponse, r as authHeader, t as createDeveloperPortalClient } from "../developerPortalClient-B1QZ1rYi.js";
2
2
  export { authHeader, createDeveloperPortalClient, isMfaChallengeResponse, uploadAppIcon };
@@ -1,2 +1,2 @@
1
- import { A as ResetPasswordConfirmInput, B as UserRequest, C as MfaConfirmInput, D as Profile, E as PaginationQuery, F as UpdateAppAsAdminInput, H as VendorListItem, I as UpdateAppInput, L as UpdateVendorAsAdminInput, M as ServiceIndex, N as SignUpInput, O as RefreshTokensResult, P as Stack, R as UpdateVendorInput, S as LoginSuccess, T as MfaSetupResult, U as Version, V as Vendor, _ as GetVendorUsersQuery, a as AppRepository, b as LoginInput, c as ConfirmAccountInput, d as CreateVendorAsAdminInput, f as CreateVendorInput, g as GetChangesQuery, h as GetAppsQuery, i as AppChange, j as ServiceAccount, k as RejectAppInput, l as CreateAppInput, m as DeveloperPortalError, n as AdminVendor, o as AppVendor, p as DeprecateAppInput, r as App, s as ApproveVendorInput, t as AdminPaginationQuery, u as CreateServiceAccountInput, v as IconUploadLink, w as MfaSetupInput, x as LoginResult, y as LoginChallenge, z as User } from "../types-D8Rrz51O.cjs";
1
+ import { A as ResetPasswordConfirmInput, B as UserRequest, C as MfaConfirmInput, D as Profile, E as PaginationQuery, F as UpdateAppAsAdminInput, H as VendorListItem, I as UpdateAppInput, L as UpdateVendorAsAdminInput, M as ServiceIndex, N as SignUpInput, O as RefreshTokensResult, P as Stack, R as UpdateVendorInput, S as LoginSuccess, T as MfaSetupResult, U as Version, V as Vendor, _ as GetVendorUsersQuery, a as AppRepository, b as LoginInput, c as ConfirmAccountInput, d as CreateVendorAsAdminInput, f as CreateVendorInput, g as GetChangesQuery, h as GetAppsQuery, i as AppChange, j as ServiceAccount, k as RejectAppInput, l as CreateAppInput, m as DeveloperPortalError, n as AdminVendor, o as AppVendor, p as DeprecateAppInput, r as App, s as ApproveVendorInput, t as AdminPaginationQuery, u as CreateServiceAccountInput, v as IconUploadLink, w as MfaSetupInput, x as LoginResult, y as LoginChallenge, z as User } from "../types-tKkeLa2B.cjs";
2
2
  export { AdminPaginationQuery, AdminVendor, App, AppChange, AppRepository, AppVendor, ApproveVendorInput, ConfirmAccountInput, CreateAppInput, CreateServiceAccountInput, CreateVendorAsAdminInput, CreateVendorInput, DeprecateAppInput, DeveloperPortalError, GetAppsQuery, GetChangesQuery, GetVendorUsersQuery, IconUploadLink, LoginChallenge, LoginInput, LoginResult, LoginSuccess, MfaConfirmInput, MfaSetupInput, MfaSetupResult, PaginationQuery, Profile, RefreshTokensResult, RejectAppInput, ResetPasswordConfirmInput, ServiceAccount, ServiceIndex, SignUpInput, Stack, UpdateAppAsAdminInput, UpdateAppInput, UpdateVendorAsAdminInput, UpdateVendorInput, User, UserRequest, Vendor, VendorListItem, Version };
@@ -1,2 +1,2 @@
1
- import { A as ResetPasswordConfirmInput, B as UserRequest, C as MfaConfirmInput, D as Profile, E as PaginationQuery, F as UpdateAppAsAdminInput, H as VendorListItem, I as UpdateAppInput, L as UpdateVendorAsAdminInput, M as ServiceIndex, N as SignUpInput, O as RefreshTokensResult, P as Stack, R as UpdateVendorInput, S as LoginSuccess, T as MfaSetupResult, U as Version, V as Vendor, _ as GetVendorUsersQuery, a as AppRepository, b as LoginInput, c as ConfirmAccountInput, d as CreateVendorAsAdminInput, f as CreateVendorInput, g as GetChangesQuery, h as GetAppsQuery, i as AppChange, j as ServiceAccount, k as RejectAppInput, l as CreateAppInput, m as DeveloperPortalError, n as AdminVendor, o as AppVendor, p as DeprecateAppInput, r as App, s as ApproveVendorInput, t as AdminPaginationQuery, u as CreateServiceAccountInput, v as IconUploadLink, w as MfaSetupInput, x as LoginResult, y as LoginChallenge, z as User } from "../types-DajzGOKB.js";
1
+ import { A as ResetPasswordConfirmInput, B as UserRequest, C as MfaConfirmInput, D as Profile, E as PaginationQuery, F as UpdateAppAsAdminInput, H as VendorListItem, I as UpdateAppInput, L as UpdateVendorAsAdminInput, M as ServiceIndex, N as SignUpInput, O as RefreshTokensResult, P as Stack, R as UpdateVendorInput, S as LoginSuccess, T as MfaSetupResult, U as Version, V as Vendor, _ as GetVendorUsersQuery, a as AppRepository, b as LoginInput, c as ConfirmAccountInput, d as CreateVendorAsAdminInput, f as CreateVendorInput, g as GetChangesQuery, h as GetAppsQuery, i as AppChange, j as ServiceAccount, k as RejectAppInput, l as CreateAppInput, m as DeveloperPortalError, n as AdminVendor, o as AppVendor, p as DeprecateAppInput, r as App, s as ApproveVendorInput, t as AdminPaginationQuery, u as CreateServiceAccountInput, v as IconUploadLink, w as MfaSetupInput, x as LoginResult, y as LoginChallenge, z as User } from "../types-q-1r_9d1.js";
2
2
  export { AdminPaginationQuery, AdminVendor, App, AppChange, AppRepository, AppVendor, ApproveVendorInput, ConfirmAccountInput, CreateAppInput, CreateServiceAccountInput, CreateVendorAsAdminInput, CreateVendorInput, DeprecateAppInput, DeveloperPortalError, GetAppsQuery, GetChangesQuery, GetVendorUsersQuery, IconUploadLink, LoginChallenge, LoginInput, LoginResult, LoginSuccess, MfaConfirmInput, MfaSetupInput, MfaSetupResult, PaginationQuery, Profile, RefreshTokensResult, RejectAppInput, ResetPasswordConfirmInput, ServiceAccount, ServiceIndex, SignUpInput, Stack, UpdateAppAsAdminInput, UpdateAppInput, UpdateVendorAsAdminInput, UpdateVendorInput, User, UserRequest, Vendor, VendorListItem, Version };
@@ -1,5 +1,5 @@
1
- import { s as HttpHeader } from "./createFetchClient-C-cadpBx.js";
2
- import { t as createOpenapiFetchClient } from "./createOpenapiFetchClient-COaPeeQ0.js";
1
+ import { s as HttpHeader } from "./createFetchClient-DXHQK63w.js";
2
+ import { t as createOpenapiFetchClient } from "./createOpenapiFetchClient-DZUOVupy.js";
3
3
  //#region src/clients/developerPortal/admin/admin.ts
4
4
  /** Keboola staff only. Every method 403s for a non-admin token; the UI gates on `custom:isAdmin`. */
5
5
  const createAdmin = (client) => {
@@ -442,11 +442,10 @@ const createVendors = ({ client, publicClient }) => {
442
442
  //#endregion
443
443
  //#region src/clients/developerPortal/developerPortalClient.ts
444
444
  /**
445
- * The Developer Portal (apps-api) client. Paths and types are generated from
446
- * `https://apps-api.keboola.com/docs/openapi.yaml` — see `redocly.yaml` and `pnpm gen:types`.
445
+ * The Developer Portal (apps-api) client; types generated via `redocly.yaml` / `pnpm gen:types`.
447
446
  *
448
- * Two fetch clients because the spec splits its operations: `security: []` ones must go out
449
- * unauthenticated, and four authenticate with the access or refresh token instead of the id token.
447
+ * - Two fetch clients: `security: []` operations go out unauthenticated, and four use the access or
448
+ * refresh token instead of the id token.
450
449
  */
451
450
  const createDeveloperPortalClient = ({ baseUrl, middlewares = [], authMiddleware }) => {
452
451
  const publicClient = createOpenapiFetchClient({
@@ -457,7 +456,6 @@ const createDeveloperPortalClient = ({ baseUrl, middlewares = [], authMiddleware
457
456
  baseUrl,
458
457
  middlewares: [authMiddleware, ...middlewares]
459
458
  }) : publicClient;
460
- /** `GET /` — the spec's service index. */
461
459
  const healthCheck = async (signal) => {
462
460
  const { data } = await publicClient.get("/", {}, { signal });
463
461
  return data;
@@ -482,4 +480,4 @@ const createDeveloperPortalClient = ({ baseUrl, middlewares = [], authMiddleware
482
480
  //#endregion
483
481
  export { uploadAppIcon as i, isMfaChallengeResponse as n, authHeader as r, createDeveloperPortalClient as t };
484
482
 
485
- //# sourceMappingURL=developerPortalClient-yHFTkKPb.js.map
483
+ //# sourceMappingURL=developerPortalClient-B1QZ1rYi.js.map