@keboola/api-client 46.0.0 → 48.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 (485) hide show
  1. package/AGENTS.md +95 -24
  2. package/API-SURFACE.md +52 -30
  3. package/CHANGELOG.md +85 -0
  4. package/README.md +47 -37
  5. package/dist/{ManagementSessionMintError-5FFyvBZi.js → ManagementSessionMintError-4Pkn5Oob.js} +2 -2
  6. package/dist/{ManagementSessionMintError-5FFyvBZi.js.map → ManagementSessionMintError-4Pkn5Oob.js.map} +1 -1
  7. package/dist/{ManagementSessionMintError-Bm8s6yDB.cjs → ManagementSessionMintError-Cu9beG7j.cjs} +2 -2
  8. package/dist/{ManagementSessionMintError-Bm8s6yDB.cjs.map → ManagementSessionMintError-Cu9beG7j.cjs.map} +1 -1
  9. package/dist/QueryJobError-ZZZ043Nm.js +22 -0
  10. package/dist/QueryJobError-ZZZ043Nm.js.map +1 -0
  11. package/dist/{QueryJobTimeoutError-CVNPdCWX.cjs → QueryJobError-irGiP5zh.cjs} +1 -29
  12. package/dist/QueryJobError-irGiP5zh.cjs.map +1 -0
  13. package/dist/QueueJobError-6qSEizWo.cjs +30 -0
  14. package/dist/QueueJobError-6qSEizWo.cjs.map +1 -0
  15. package/dist/QueueJobError-8bThS_Mc.js +19 -0
  16. package/dist/QueueJobError-8bThS_Mc.js.map +1 -0
  17. package/dist/adminRoles-B40yBcmq.js.map +1 -1
  18. package/dist/{adminRoles-C696kD_U.d.ts → adminRoles-BgpaBE7h.d.cts} +4 -2
  19. package/dist/adminRoles-CO7J5qAy.cjs.map +1 -1
  20. package/dist/{adminRoles-C696kD_U.d.cts → adminRoles-DsoGQipO.d.ts} +4 -2
  21. package/dist/ai/index.cjs +2 -7
  22. package/dist/ai/index.cjs.map +1 -1
  23. package/dist/ai/index.d.cts +2 -3
  24. package/dist/ai/index.d.ts +2 -3
  25. package/dist/ai/index.js +2 -7
  26. package/dist/ai/index.js.map +1 -1
  27. package/dist/ai/types.d.cts +2 -2
  28. package/dist/ai/types.d.ts +2 -2
  29. package/dist/{appLogs-BG9ueGxA.cjs → appLogs-Cix2KWra.cjs} +2 -2
  30. package/dist/{appLogs-BG9ueGxA.cjs.map → appLogs-Cix2KWra.cjs.map} +1 -1
  31. package/dist/{appLogs-DGIctwbb.d.ts → appLogs-DpcqeOe5.d.ts} +2 -2
  32. package/dist/{appLogs-CEKz68bE.js → appLogs-KslK7qHr.js} +2 -2
  33. package/dist/{appLogs-CEKz68bE.js.map → appLogs-KslK7qHr.js.map} +1 -1
  34. package/dist/{appLogs-Dl0v684o.d.cts → appLogs-SjrflOHk.d.cts} +2 -2
  35. package/dist/apps/index.cjs +5 -5
  36. package/dist/apps/index.cjs.map +1 -1
  37. package/dist/apps/index.d.cts +3 -3
  38. package/dist/apps/index.d.ts +3 -3
  39. package/dist/apps/index.js +5 -5
  40. package/dist/apps/index.js.map +1 -1
  41. package/dist/apps/types.d.cts +2 -2
  42. package/dist/apps/types.d.ts +2 -2
  43. package/dist/assets/index.cjs +1 -1
  44. package/dist/assets/index.d.cts +1 -1
  45. package/dist/assets/index.d.ts +1 -1
  46. package/dist/assets/index.js +1 -1
  47. package/dist/auth/index.cjs +1 -1
  48. package/dist/auth/index.d.cts +1 -1
  49. package/dist/auth/index.d.ts +1 -1
  50. package/dist/auth/index.js +1 -1
  51. package/dist/auth/types.d.cts +2 -2
  52. package/dist/auth/types.d.ts +2 -2
  53. package/dist/{auth-C6cHWIWx.js → auth-4coY1uwo.js} +2 -2
  54. package/dist/{auth-C6cHWIWx.js.map → auth-4coY1uwo.js.map} +1 -1
  55. package/dist/{auth-C9o_0bft.cjs → auth-C8Pjl0Mu.cjs} +2 -2
  56. package/dist/{auth-C9o_0bft.cjs.map → auth-C8Pjl0Mu.cjs.map} +1 -1
  57. package/dist/{authClient-CACOwVt0.js → authClient-2e8ZmzSP.js} +71 -7
  58. package/dist/authClient-2e8ZmzSP.js.map +1 -0
  59. package/dist/{authClient-DSa5t2Ft.d.cts → authClient-BYIGzL_u.d.ts} +22 -4
  60. package/dist/{authClient-ZiaKSKpp.d.ts → authClient-D06srBQE.d.cts} +22 -4
  61. package/dist/{authClient-DZcAR-eW.cjs → authClient-DfkKlc-2.cjs} +82 -6
  62. package/dist/authClient-DfkKlc-2.cjs.map +1 -0
  63. package/dist/billing/index.cjs +2 -2
  64. package/dist/billing/index.d.cts +1 -1
  65. package/dist/billing/index.d.ts +1 -1
  66. package/dist/billing/index.js +2 -2
  67. package/dist/billing/types.d.cts +1 -1
  68. package/dist/billing/types.d.ts +1 -1
  69. package/dist/chat/index.cjs +3 -3
  70. package/dist/chat/index.d.cts +2 -2
  71. package/dist/chat/index.d.ts +2 -2
  72. package/dist/chat/index.js +3 -3
  73. package/dist/chat/types.d.cts +1 -1
  74. package/dist/chat/types.d.ts +1 -1
  75. package/dist/{collect-97WhfEpt.js → collectByOffset-2XzJqmvr.js} +6 -6
  76. package/dist/collectByOffset-2XzJqmvr.js.map +1 -0
  77. package/dist/{collect-B5TCNiT1.cjs → collectByOffset-DQsqtmJg.cjs} +7 -7
  78. package/dist/collectByOffset-DQsqtmJg.cjs.map +1 -0
  79. package/dist/componentsMcp/index.cjs +3 -0
  80. package/dist/componentsMcp/index.d.cts +2 -0
  81. package/dist/componentsMcp/index.d.ts +2 -0
  82. package/dist/componentsMcp/index.js +2 -0
  83. package/dist/componentsMcp/types.cjs +0 -0
  84. package/dist/componentsMcp/types.d.cts +2 -0
  85. package/dist/componentsMcp/types.d.ts +2 -0
  86. package/dist/componentsMcp/types.js +1 -0
  87. package/dist/componentsMcp-CHobIsuU.js +57 -0
  88. package/dist/componentsMcp-CHobIsuU.js.map +1 -0
  89. package/dist/componentsMcp-pG-PcQrg.cjs +62 -0
  90. package/dist/componentsMcp-pG-PcQrg.cjs.map +1 -0
  91. package/dist/{configurations-D_Rbs0Wl.cjs → configurations-B2O8AAy0.cjs} +2 -2
  92. package/dist/{configurations-D_Rbs0Wl.cjs.map → configurations-B2O8AAy0.cjs.map} +1 -1
  93. package/dist/{configurations-Chg_JwJ1.js → configurations-CL0ouUMa.js} +3 -3
  94. package/dist/configurations-CL0ouUMa.js.map +1 -0
  95. package/dist/{configurations-BTRHVSRq.cjs → configurations-D9J3jh3g.cjs} +3 -3
  96. package/dist/configurations-D9J3jh3g.cjs.map +1 -0
  97. package/dist/{configurations-DcpUlC8I.js → configurations-DKINmjA3.js} +2 -2
  98. package/dist/{configurations-DcpUlC8I.js.map → configurations-DKINmjA3.js.map} +1 -1
  99. package/dist/constants/index.cjs +1 -1
  100. package/dist/constants/index.d.cts +2 -3
  101. package/dist/constants/index.d.ts +2 -3
  102. package/dist/constants/index.js +1 -1
  103. package/dist/{constants-Cifrqsls.js → constants-CA4UN2Xv.js} +11 -10
  104. package/dist/constants-CA4UN2Xv.js.map +1 -0
  105. package/dist/{constants-BDGRQqij.cjs → constants-a0jswUeK.cjs} +10 -9
  106. package/dist/constants-a0jswUeK.cjs.map +1 -0
  107. package/dist/{createFetchClient-DITkTV2k.js → createFetchClient-CkHdS_IG.js} +5 -5
  108. package/dist/createFetchClient-CkHdS_IG.js.map +1 -0
  109. package/dist/{createFetchClient-ClWD4ua3.cjs → createFetchClient-lZ_93Yrb.cjs} +5 -5
  110. package/dist/createFetchClient-lZ_93Yrb.cjs.map +1 -0
  111. package/dist/{createGenericFetchClient-KqiJhw8G.js → createGenericFetchClient-CQdNcPC3.js} +2 -2
  112. package/dist/{createGenericFetchClient-KqiJhw8G.js.map → createGenericFetchClient-CQdNcPC3.js.map} +1 -1
  113. package/dist/{createGenericFetchClient-B81Iezpb.cjs → createGenericFetchClient-MOx97wi-.cjs} +2 -2
  114. package/dist/{createGenericFetchClient-B81Iezpb.cjs.map → createGenericFetchClient-MOx97wi-.cjs.map} +1 -1
  115. package/dist/{createOpenapiFetchClient-CioTX11-.cjs → createOpenapiFetchClient-DHYo_k3t.cjs} +2 -2
  116. package/dist/{createOpenapiFetchClient-CioTX11-.cjs.map → createOpenapiFetchClient-DHYo_k3t.cjs.map} +1 -1
  117. package/dist/{createOpenapiFetchClient-wq8iGLZM.js → createOpenapiFetchClient-DXiMv9WL.js} +2 -2
  118. package/dist/{createOpenapiFetchClient-wq8iGLZM.js.map → createOpenapiFetchClient-DXiMv9WL.js.map} +1 -1
  119. package/dist/dataScience/index.cjs +2 -2
  120. package/dist/dataScience/index.d.cts +2 -2
  121. package/dist/dataScience/index.d.ts +2 -2
  122. package/dist/dataScience/index.js +2 -2
  123. package/dist/dataScience/types.d.cts +2 -2
  124. package/dist/dataScience/types.d.ts +2 -2
  125. package/dist/{dataScience-BwHmDoQb.js → dataScience-AwPMeGfz.js} +5 -5
  126. package/dist/{dataScience-BwHmDoQb.js.map → dataScience-AwPMeGfz.js.map} +1 -1
  127. package/dist/{dataScience-Hhoqoql_.cjs → dataScience-BjS1p8WO.cjs} +5 -5
  128. package/dist/{dataScience-Hhoqoql_.cjs.map → dataScience-BjS1p8WO.cjs.map} +1 -1
  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-loKq7X_U.js → developerPortalClient-Bb2suezr.js} +13 -5
  136. package/dist/{developerPortalClient-loKq7X_U.js.map → developerPortalClient-Bb2suezr.js.map} +1 -1
  137. package/dist/{developerPortalClient-COm7wJxS.cjs → developerPortalClient-DUerKw-7.cjs} +13 -5
  138. package/dist/{developerPortalClient-COm7wJxS.cjs.map → developerPortalClient-DUerKw-7.cjs.map} +1 -1
  139. package/dist/domain/permissions/index.cjs +1 -1
  140. package/dist/domain/permissions/index.d.cts +2 -3
  141. package/dist/domain/permissions/index.d.ts +2 -3
  142. package/dist/domain/permissions/index.js +1 -1
  143. package/dist/editor/index.cjs +2 -2
  144. package/dist/editor/index.d.cts +2 -2
  145. package/dist/editor/index.d.ts +2 -2
  146. package/dist/editor/index.js +2 -2
  147. package/dist/editor/types.d.cts +1 -1
  148. package/dist/editor/types.d.ts +1 -1
  149. package/dist/encryption/index.cjs +1 -1
  150. package/dist/encryption/index.d.cts +1 -1
  151. package/dist/encryption/index.d.ts +1 -1
  152. package/dist/encryption/index.js +1 -1
  153. package/dist/encryption/types.d.cts +1 -1
  154. package/dist/encryption/types.d.ts +1 -1
  155. package/dist/import/index.cjs +1 -1
  156. package/dist/import/index.d.cts +3 -3
  157. package/dist/import/index.d.ts +3 -3
  158. package/dist/import/index.js +1 -1
  159. package/dist/{import-B5DcJGMI.cjs → import-BahNYv91.cjs} +3 -3
  160. package/dist/{import-B5DcJGMI.cjs.map → import-BahNYv91.cjs.map} +1 -1
  161. package/dist/{import-JlH_QaDd.js → import-FWy_wQZ1.js} +3 -3
  162. package/dist/{import-JlH_QaDd.js.map → import-FWy_wQZ1.js.map} +1 -1
  163. package/dist/{index-BP3choXr.d.ts → index-B3QTeqfL.d.ts} +19976 -14513
  164. package/dist/{index-x8ET_BTN.d.cts → index-BCjU-g9t.d.cts} +3 -3
  165. package/dist/{index-DCxVLGHH.d.ts → index-BHiJu8LF.d.cts} +16 -28
  166. package/dist/{index-DXcTukgn.d.ts → index-BIldED4N.d.ts} +4 -4
  167. package/dist/index-BLvmyehw.d.ts +46 -0
  168. package/dist/{index-BnPYPXGQ.d.ts → index-BTrxCk90.d.ts} +3 -3
  169. package/dist/{index-DS6O4UDB.d.cts → index-ByLCYBaw.d.cts} +4 -4
  170. package/dist/{index-syAYY5LC.d.cts → index-C40Fbj-6.d.cts} +19976 -14513
  171. package/dist/{index-DWFxcmVD.d.ts → index-CIqWOEWD.d.ts} +4 -4
  172. package/dist/{index-Bt43tKyu.d.cts → index-Cc5wSIRJ.d.cts} +5 -5
  173. package/dist/{types-CESP1ONj.d.ts → index-ChDl6ig5.d.cts} +3780 -549
  174. package/dist/index-Co2Cd-nw.d.cts +46 -0
  175. package/dist/{index-CTKC-mwi.d.cts → index-CpGmmJbt.d.cts} +4 -4
  176. package/dist/{index-D-4TT5yW.d.cts → index-CpUYVB-d.d.cts} +4 -4
  177. package/dist/{index-DeQDdut6.d.ts → index-CzHrIfZS.d.ts} +34 -2
  178. package/dist/{index-BhDxP0x4.d.cts → index-D91RxB_S.d.cts} +18 -13
  179. package/dist/{index-GVxpBH6j.d.cts → index-DlZiWfQb.d.ts} +16 -28
  180. package/dist/{index-DRaVzOLM.d.ts → index-DzLXtE4Q.d.ts} +5 -5
  181. package/dist/{index-DeQDdut6.d.cts → index-VlzlOBkc.d.cts} +34 -2
  182. package/dist/{index-se5ee8U1.d.ts → index-avzO5sLa.d.ts} +18 -13
  183. package/dist/{index-yJ0HrxY6.d.ts → index-m7fX76x3.d.ts} +4 -4
  184. package/dist/{types-GaOcVZ3d.d.cts → index-sDHBkJhU.d.ts} +3780 -549
  185. package/dist/index.cjs +551 -375
  186. package/dist/index.cjs.map +1 -1
  187. package/dist/index.d.cts +7 -7
  188. package/dist/index.d.ts +7 -7
  189. package/dist/index.js +493 -320
  190. package/dist/index.js.map +1 -1
  191. package/dist/{isLoginPageRedirect-CsyRa3_v.js → isLoginPageRedirect-B4QKSiSa.js} +2 -2
  192. package/dist/{isLoginPageRedirect-CsyRa3_v.js.map → isLoginPageRedirect-B4QKSiSa.js.map} +1 -1
  193. package/dist/{isLoginPageRedirect-iNbwl3iz.cjs → isLoginPageRedirect-r0Opgc1n.cjs} +2 -2
  194. package/dist/{isLoginPageRedirect-iNbwl3iz.cjs.map → isLoginPageRedirect-r0Opgc1n.cjs.map} +1 -1
  195. package/dist/kaiAgent/index.cjs +1 -1
  196. package/dist/kaiAgent/index.d.cts +3 -3
  197. package/dist/kaiAgent/index.d.ts +3 -3
  198. package/dist/kaiAgent/index.js +1 -1
  199. package/dist/kaiAgent/types.d.cts +1 -1
  200. package/dist/kaiAgent/types.d.ts +1 -1
  201. package/dist/{kaiAgent-CUeT53-K.js → kaiAgent-CYvrS8oZ.js} +16 -7
  202. package/dist/kaiAgent-CYvrS8oZ.js.map +1 -0
  203. package/dist/{kaiAgent-BhcUsBDk.cjs → kaiAgent-N2qbUFZm.cjs} +16 -7
  204. package/dist/kaiAgent-N2qbUFZm.cjs.map +1 -0
  205. package/dist/{kaiMemory-DaOh0zVn.js → kaiMemory-C9di17bd.js} +2 -2
  206. package/dist/{kaiMemory-DaOh0zVn.js.map → kaiMemory-C9di17bd.js.map} +1 -1
  207. package/dist/{kaiMemory-Cf81ghNd.cjs → kaiMemory-Qch09f-m.cjs} +2 -2
  208. package/dist/{kaiMemory-Cf81ghNd.cjs.map → kaiMemory-Qch09f-m.cjs.map} +1 -1
  209. package/dist/management/index.cjs +1 -1
  210. package/dist/management/index.d.cts +1 -1
  211. package/dist/management/index.d.ts +1 -1
  212. package/dist/management/index.js +1 -1
  213. package/dist/management/types.d.cts +2 -2
  214. package/dist/management/types.d.ts +2 -2
  215. package/dist/{management-0cWVLHei.cjs → management-CXHnxVaZ.cjs} +34 -10
  216. package/dist/management-CXHnxVaZ.cjs.map +1 -0
  217. package/dist/{management-eg4Ig-Cx.js → management-NYAD6ej4.js} +34 -10
  218. package/dist/management-NYAD6ej4.js.map +1 -0
  219. package/dist/metastore/index.cjs +1 -1
  220. package/dist/metastore/index.d.cts +1 -1
  221. package/dist/metastore/index.d.ts +1 -1
  222. package/dist/metastore/index.js +1 -1
  223. package/dist/metastore/types.d.cts +1 -1
  224. package/dist/metastore/types.d.ts +1 -1
  225. package/dist/{metastore-YPHUK3jJ.cjs → metastore-BXHg33ku.cjs} +4 -4
  226. package/dist/{metastore-YPHUK3jJ.cjs.map → metastore-BXHg33ku.cjs.map} +1 -1
  227. package/dist/{metastore-D0C6uaPX.js → metastore-Ywq08DBz.js} +4 -4
  228. package/dist/{metastore-D0C6uaPX.js.map → metastore-Ywq08DBz.js.map} +1 -1
  229. package/dist/microsoftGraph/index.cjs +2 -2
  230. package/dist/microsoftGraph/index.d.cts +2 -2
  231. package/dist/microsoftGraph/index.d.ts +2 -2
  232. package/dist/microsoftGraph/index.js +2 -2
  233. package/dist/microsoftGraph/types.d.cts +1 -1
  234. package/dist/microsoftGraph/types.d.ts +1 -1
  235. package/dist/{middleware-D_p5TctO.cjs → middleware-CEP6uu_D.cjs} +5 -5
  236. package/dist/middleware-CEP6uu_D.cjs.map +1 -0
  237. package/dist/{middleware-DmR6OhTY.js → middleware-GOfx8Apu.js} +5 -5
  238. package/dist/middleware-GOfx8Apu.js.map +1 -0
  239. package/dist/notifications/index.cjs +3 -3
  240. package/dist/notifications/index.d.cts +2 -2
  241. package/dist/notifications/index.d.ts +2 -2
  242. package/dist/notifications/index.js +3 -3
  243. package/dist/notifications/types.d.cts +1 -1
  244. package/dist/notifications/types.d.ts +1 -1
  245. package/dist/oauth/index.cjs +1 -1
  246. package/dist/oauth/index.d.cts +6 -2
  247. package/dist/oauth/index.d.ts +6 -2
  248. package/dist/oauth/index.js +1 -1
  249. package/dist/oauth/types.d.cts +2 -2
  250. package/dist/oauth/types.d.ts +2 -2
  251. package/dist/{oauth-DyUwTqHJ.cjs → oauth-DKZPuUlt.cjs} +17 -6
  252. package/dist/{oauth-DyUwTqHJ.cjs.map → oauth-DKZPuUlt.cjs.map} +1 -1
  253. package/dist/{oauth-Ck_Fe14o.js → oauth-GXmZ9agP.js} +17 -6
  254. package/dist/{oauth-Ck_Fe14o.js.map → oauth-GXmZ9agP.js.map} +1 -1
  255. package/dist/omnisearch/index.cjs +2 -2
  256. package/dist/omnisearch/index.d.cts +2 -2
  257. package/dist/omnisearch/index.d.ts +2 -2
  258. package/dist/omnisearch/index.js +2 -2
  259. package/dist/omnisearch/types.d.cts +1 -1
  260. package/dist/omnisearch/types.d.ts +1 -1
  261. package/dist/project-Dzu85cqr.d.cts +74 -0
  262. package/dist/project-nbv9yjpl.d.ts +74 -0
  263. package/dist/queryService/index.cjs +1 -1
  264. package/dist/queryService/index.d.cts +1 -1
  265. package/dist/queryService/index.d.ts +1 -1
  266. package/dist/queryService/index.js +1 -1
  267. package/dist/queryService/types.d.cts +2 -2
  268. package/dist/queryService/types.d.ts +2 -2
  269. package/dist/{queryService-Blfz59Ms.js → queryService-C-pZha5p.js} +36 -27
  270. package/dist/queryService-C-pZha5p.js.map +1 -0
  271. package/dist/{queryService-RlNYw7LG.cjs → queryService-CzK53q94.cjs} +36 -27
  272. package/dist/queryService-CzK53q94.cjs.map +1 -0
  273. package/dist/queue/index.cjs +1 -1
  274. package/dist/queue/index.d.cts +75 -7
  275. package/dist/queue/index.d.ts +75 -7
  276. package/dist/queue/index.js +1 -1
  277. package/dist/queue/types.d.cts +1 -1
  278. package/dist/queue/types.d.ts +1 -1
  279. package/dist/{queue-BrgRdtOr.cjs → queue-BJvDWriM.cjs} +35 -25
  280. package/dist/queue-BJvDWriM.cjs.map +1 -0
  281. package/dist/{queue-CNvR-M23.js → queue-D6-x4OGF.js} +35 -25
  282. package/dist/queue-D6-x4OGF.js.map +1 -0
  283. package/dist/scheduler/index.cjs +3 -3
  284. package/dist/scheduler/index.d.cts +2 -2
  285. package/dist/scheduler/index.d.ts +2 -2
  286. package/dist/scheduler/index.js +3 -3
  287. package/dist/scheduler/types.d.cts +1 -1
  288. package/dist/scheduler/types.d.ts +1 -1
  289. package/dist/sdk/configurations/index.cjs +1 -1
  290. package/dist/sdk/configurations/index.d.cts +2 -4
  291. package/dist/sdk/configurations/index.d.ts +2 -4
  292. package/dist/sdk/configurations/index.js +1 -1
  293. package/dist/sdk/developerPortal/index.cjs +3 -3
  294. package/dist/sdk/developerPortal/index.d.cts +3 -3
  295. package/dist/sdk/developerPortal/index.d.ts +3 -3
  296. package/dist/sdk/developerPortal/index.js +3 -3
  297. package/dist/sdk/kaiMemory/index.cjs +1 -1
  298. package/dist/sdk/kaiMemory/index.d.cts +1 -1
  299. package/dist/sdk/kaiMemory/index.d.ts +1 -1
  300. package/dist/sdk/kaiMemory/index.js +1 -1
  301. package/dist/sdk/kaiMemory/types.d.cts +1 -1
  302. package/dist/sdk/kaiMemory/types.d.ts +1 -1
  303. package/dist/sdk/queryService/index.cjs +34 -55
  304. package/dist/sdk/queryService/index.cjs.map +1 -1
  305. package/dist/sdk/queryService/index.d.cts +2 -2
  306. package/dist/sdk/queryService/index.d.ts +2 -2
  307. package/dist/sdk/queryService/index.js +34 -55
  308. package/dist/sdk/queryService/index.js.map +1 -1
  309. package/dist/sdk/semanticLayer/index.d.cts +1 -1
  310. package/dist/sdk/semanticLayer/index.d.ts +1 -1
  311. package/dist/sdk/semanticLayer/types.d.cts +1 -1
  312. package/dist/sdk/semanticLayer/types.d.ts +1 -1
  313. package/dist/sdk/storage/index.cjs +0 -119
  314. package/dist/sdk/storage/index.cjs.map +1 -1
  315. package/dist/sdk/storage/index.d.cts +103 -2
  316. package/dist/sdk/storage/index.d.ts +103 -2
  317. package/dist/sdk/storage/index.js +1 -119
  318. package/dist/sdk/storage/index.js.map +1 -1
  319. package/dist/sdk/tag/index.d.cts +2 -2
  320. package/dist/sdk/tag/index.d.ts +2 -2
  321. package/dist/sdk/tag/types.d.cts +1 -1
  322. package/dist/sdk/tag/types.d.ts +1 -1
  323. package/dist/sdk/vault/index.d.cts +1 -1
  324. package/dist/sdk/vault/index.d.ts +1 -1
  325. package/dist/status/index.cjs +1 -1
  326. package/dist/status/index.d.cts +1 -1
  327. package/dist/status/index.d.ts +1 -1
  328. package/dist/status/index.js +1 -1
  329. package/dist/storage/index.cjs +13 -9
  330. package/dist/storage/index.d.cts +3 -3
  331. package/dist/storage/index.d.ts +3 -3
  332. package/dist/storage/index.js +7 -6
  333. package/dist/storage/types.d.cts +6 -5
  334. package/dist/storage/types.d.ts +6 -5
  335. package/dist/{storage-RkNaOFJ-.js → storage-BR-Kgi-6.js} +353 -169
  336. package/dist/storage-BR-Kgi-6.js.map +1 -0
  337. package/dist/{storage-76Sf_z_H.cjs → storage-CVBXivpB.cjs} +372 -170
  338. package/dist/storage-CVBXivpB.cjs.map +1 -0
  339. package/dist/stream/index.cjs +3 -3
  340. package/dist/stream/index.d.cts +2 -2
  341. package/dist/stream/index.d.ts +2 -2
  342. package/dist/stream/index.js +3 -3
  343. package/dist/stream/types.d.cts +1 -1
  344. package/dist/stream/types.d.ts +1 -1
  345. package/dist/syncActions/index.cjs +1 -1
  346. package/dist/syncActions/index.d.cts +2 -2
  347. package/dist/syncActions/index.d.ts +2 -2
  348. package/dist/syncActions/index.js +1 -1
  349. package/dist/syncActions/types.d.cts +1 -1
  350. package/dist/syncActions/types.d.ts +1 -1
  351. package/dist/{syncActions-DlNPhZY4.cjs → syncActions-C1rE4R3f.cjs} +5 -5
  352. package/dist/{syncActions-DlNPhZY4.cjs.map → syncActions-C1rE4R3f.cjs.map} +1 -1
  353. package/dist/{syncActions-BvFUa9xV.js → syncActions-DM8vP7p3.js} +5 -5
  354. package/dist/{syncActions-BvFUa9xV.js.map → syncActions-DM8vP7p3.js.map} +1 -1
  355. package/dist/telemetry/index.cjs +3 -6
  356. package/dist/telemetry/index.cjs.map +1 -1
  357. package/dist/telemetry/index.d.cts +2 -5
  358. package/dist/telemetry/index.d.ts +2 -5
  359. package/dist/telemetry/index.js +3 -6
  360. package/dist/telemetry/index.js.map +1 -1
  361. package/dist/telemetry/types.d.cts +1 -1
  362. package/dist/telemetry/types.d.ts +1 -1
  363. package/dist/{jobStatus-BJdbZ72V.js → transientRetries-B4iusp69.js} +79 -37
  364. package/dist/transientRetries-B4iusp69.js.map +1 -0
  365. package/dist/{jobStatus-B0E-MZ9I.cjs → transientRetries-DdJfH9QK.cjs} +82 -40
  366. package/dist/transientRetries-DdJfH9QK.cjs.map +1 -0
  367. package/dist/{types-QroFANIW.d.cts → types-0ZAMQhva.d.cts} +3 -3
  368. package/dist/{types-BMWeCO5M.d.ts → types-1LENlL5h.d.ts} +3 -3
  369. package/dist/{types-BRvs3fXN.d.cts → types-6KabdIyO.d.cts} +3 -3
  370. package/dist/{types-B5kkD7h4.d.cts → types-9d8ihjZh.d.cts} +2 -2
  371. package/dist/{types-qGMVZGSB.d.ts → types-B7L6uSYb.d.ts} +50 -3
  372. package/dist/{types-qWA5iU0j.d.ts → types-BTy_FFSu.d.ts} +2 -2
  373. package/dist/{types-B1GN_I06.d.ts → types-BWYtQkHu.d.ts} +2 -2
  374. package/dist/types-BXHZQvGy.d.ts +2111 -0
  375. package/dist/{types-Btb8r9iw.d.ts → types-BYFU_6Iz.d.ts} +95 -26
  376. package/dist/{types-Nwq1QtYe.d.ts → types-BaqdM92a.d.ts} +3 -4
  377. package/dist/{types-CFurl1xe.d.cts → types-BbwrMl0Q.d.cts} +2 -2
  378. package/dist/{types-Br04cEri.d.ts → types-Bt8CEZ6K.d.ts} +2 -2
  379. package/dist/types-BtS3DhGu.d.cts +2111 -0
  380. package/dist/{types-CaBhH99H.d.ts → types-C-GSYDTN.d.ts} +3 -3
  381. package/dist/{types-BGICH80a.d.cts → types-C4eQ-Zcx.d.cts} +2 -2
  382. package/dist/{types-BTqxM-IN.d.ts → types-C9VaQSqV.d.ts} +2 -2
  383. package/dist/{types-C05ALlV6.d.cts → types-CNkQuWnO.d.cts} +3 -3
  384. package/dist/{types-DMWfdZ5C.d.cts → types-CXv_e6xC.d.cts} +2 -2
  385. package/dist/{types-C8oZX0oP.d.cts → types-C_raqbl-.d.cts} +3 -3
  386. package/dist/{types-BtII5RSD.d.ts → types-Cc4yTEdK.d.ts} +11 -3
  387. package/dist/{types-BoNqe_Lz.d.ts → types-Ce5Blzhg.d.ts} +2 -2
  388. package/dist/{types-UI2aZ74n.d.ts → types-CfZLdfAL.d.ts} +3 -3
  389. package/dist/{types-sg2xnYlr.d.cts → types-Cfc-fYbq.d.cts} +95 -26
  390. package/dist/{types-C4yryy-R.d.ts → types-Cn8I0vcr.d.ts} +3 -3
  391. package/dist/{types-DQauEri3.d.ts → types-CpWE6Yg2.d.ts} +2 -2
  392. package/dist/{types-XHNJRi3-.d.cts → types-CrJIILXf.d.cts} +2 -2
  393. package/dist/{types-DHdXufVf.d.cts → types-CwGbiMF-.d.cts} +3 -3
  394. package/dist/{types-fAqPUl-a.d.ts → types-CwQ8_n8q.d.ts} +320 -43
  395. package/dist/{types-BksK2Eo0.d.cts → types-D3H3EAre.d.ts} +2 -2
  396. package/dist/{types-CyO8qCKl.d.cts → types-D3mj56iq.d.cts} +2 -2
  397. package/dist/{types-YdE2VJzw.d.cts → types-D8d5tyGi.d.cts} +2 -2
  398. package/dist/{types-Csmy6qFk.d.cts → types-DMpiG2q4.d.cts} +3 -3
  399. package/dist/{types-ggpJFEWZ.d.cts → types-DSBrhK_K.d.cts} +2 -2
  400. package/dist/{types-5HdT1rSH.d.cts → types-DXF6faow.d.cts} +2 -2
  401. package/dist/{types-DDjp9lXD.d.ts → types-DfJP6Dti.d.ts} +2 -2
  402. package/dist/{types-DSv1XS7s.d.ts → types-DgOLSRiy.d.ts} +3 -3
  403. package/dist/{types-tJLoKlMX.d.cts → types-DlgqPU_4.d.cts} +2 -2
  404. package/dist/{types-sI3K5t3w.d.cts → types-Dn1G-qv4.d.cts} +320 -43
  405. package/dist/{types--owScV0r.d.cts → types-EkyQ0_10.d.cts} +11 -3
  406. package/dist/{types-LxDyOfdY.d.cts → types-EmIcG-8K.d.cts} +2 -2
  407. package/dist/{types-DGu-wPPm.d.cts → types-NSxpnYW5.d.cts} +50 -3
  408. package/dist/{types-Dvysi2Eo.d.ts → types-QPW-7dPm.d.ts} +2 -2
  409. package/dist/{types-BE7mRarT.d.ts → types-UySfduQo.d.ts} +2 -2
  410. package/dist/{types-BHxsCu0f.d.ts → types-VehpPOQX.d.ts} +2 -2
  411. package/dist/{types-DiE081mn.d.ts → types-Vu09EUZs.d.ts} +3 -3
  412. package/dist/{types-CoQET4Ep.d.ts → types-c4h2YDMC.d.ts} +2 -2
  413. package/dist/{types-BuKviWct.d.ts → types-sOM2_KPc.d.cts} +2 -2
  414. package/dist/{types-DUDQg4ry.d.cts → types-wNuJUhco.d.cts} +3 -4
  415. package/dist/{validateConnectionStatus-DR-0h35y.cjs → validateConnectionStatus-BalWEyRk.cjs} +3 -3
  416. package/dist/{validateConnectionStatus-DR-0h35y.cjs.map → validateConnectionStatus-BalWEyRk.cjs.map} +1 -1
  417. package/dist/{validateConnectionStatus-CdTV3gsP.js → validateConnectionStatus-DyrYpn0G.js} +3 -3
  418. package/dist/{validateConnectionStatus-CdTV3gsP.js.map → validateConnectionStatus-DyrYpn0G.js.map} +1 -1
  419. package/dist/vault/index.cjs +6 -6
  420. package/dist/vault/index.cjs.map +1 -1
  421. package/dist/vault/index.d.cts +1 -1
  422. package/dist/vault/index.d.ts +1 -1
  423. package/dist/vault/index.js +6 -6
  424. package/dist/vault/index.js.map +1 -1
  425. package/dist/vault/types.d.cts +1 -1
  426. package/dist/vault/types.d.ts +1 -1
  427. package/package.json +27 -1
  428. package/surface/ai.md +0 -1
  429. package/surface/apps.md +5 -5
  430. package/surface/auth.md +2 -0
  431. package/surface/chat.md +2 -2
  432. package/surface/componentsMcp.md +9 -0
  433. package/surface/dataScience.md +2 -2
  434. package/surface/kaiAgent.md +5 -4
  435. package/surface/management.md +5 -2
  436. package/surface/oauth.md +1 -0
  437. package/surface/queryService.md +4 -4
  438. package/surface/queue.md +2 -2
  439. package/surface/sdk.md +0 -24
  440. package/surface/storage.md +88 -57
  441. package/dist/QueryJobTimeoutError-C7JbNGOM.js +0 -38
  442. package/dist/QueryJobTimeoutError-C7JbNGOM.js.map +0 -1
  443. package/dist/QueryJobTimeoutError-CVNPdCWX.cjs.map +0 -1
  444. package/dist/authClient-CACOwVt0.js.map +0 -1
  445. package/dist/authClient-DZcAR-eW.cjs.map +0 -1
  446. package/dist/collect-97WhfEpt.js.map +0 -1
  447. package/dist/collect-B5TCNiT1.cjs.map +0 -1
  448. package/dist/configurations-BTRHVSRq.cjs.map +0 -1
  449. package/dist/configurations-Chg_JwJ1.js.map +0 -1
  450. package/dist/constants-BDGRQqij.cjs.map +0 -1
  451. package/dist/constants-Cifrqsls.js.map +0 -1
  452. package/dist/createFetchClient-ClWD4ua3.cjs.map +0 -1
  453. package/dist/createFetchClient-DITkTV2k.js.map +0 -1
  454. package/dist/index-BzhLY7el.d.cts +0 -254
  455. package/dist/index-CH5Sg3rk.d.ts +0 -77
  456. package/dist/index-CiwWDu-q.d.cts +0 -16
  457. package/dist/index-DCAnnlcL.d.ts +0 -16
  458. package/dist/index-DQwjlSJi.d.cts +0 -77
  459. package/dist/index-PyTPrtaL.d.ts +0 -254
  460. package/dist/jobStatus-B0E-MZ9I.cjs.map +0 -1
  461. package/dist/jobStatus-BJdbZ72V.js.map +0 -1
  462. package/dist/kaiAgent-BhcUsBDk.cjs.map +0 -1
  463. package/dist/kaiAgent-CUeT53-K.js.map +0 -1
  464. package/dist/management-0cWVLHei.cjs.map +0 -1
  465. package/dist/management-eg4Ig-Cx.js.map +0 -1
  466. package/dist/middleware-D_p5TctO.cjs.map +0 -1
  467. package/dist/middleware-DmR6OhTY.js.map +0 -1
  468. package/dist/project-BN7YRWFS.d.cts +0 -24
  469. package/dist/project-BpWTnoQ_.d.ts +0 -24
  470. package/dist/queryService-Blfz59Ms.js.map +0 -1
  471. package/dist/queryService-RlNYw7LG.cjs.map +0 -1
  472. package/dist/queue-BrgRdtOr.cjs.map +0 -1
  473. package/dist/queue-CNvR-M23.js.map +0 -1
  474. package/dist/serviceIds-DRcoTnSd.d.cts +0 -32
  475. package/dist/serviceIds-DRcoTnSd.d.ts +0 -32
  476. package/dist/storage-76Sf_z_H.cjs.map +0 -1
  477. package/dist/storage-RkNaOFJ-.js.map +0 -1
  478. package/dist/types-1B3ioN33.d.cts +0 -1868
  479. package/dist/types-BjIuVrAZ.d.ts +0 -66
  480. package/dist/types-CGhu0tID.d.cts +0 -1298
  481. package/dist/types-CclheyE7.d.cts +0 -66
  482. package/dist/types-M9vU_ONp.d.ts +0 -1868
  483. package/dist/types-P_61P9Nd.d.ts +0 -1298
  484. package/dist/types-j30rKMe6.d.ts +0 -957
  485. package/dist/types-q5lgElyc.d.cts +0 -957
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createFetchClient-CkHdS_IG.js","names":[],"sources":["../src/internal.ts","../src/errors/ApiError.ts","../src/fetchClient/createFetchClient/utils.ts","../src/fetchClient/createFetchClient/createFetchClient.ts"],"sourcesContent":["// 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 UI_VERSION: 'X-KBC-Ui-Version',\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\n/** Request headers that carry a credential — never kept on an error or written to a log. */\nexport const CREDENTIAL_HEADERS = [\n KeboolaHttpHeader.STORAGE_API_TOKEN,\n KeboolaHttpHeader.MANAGEMENT_API_TOKEN,\n 'authorization',\n 'cookie',\n];\n\nexport const REDACTED = '[REDACTED]';\n\n/** The headers as a record, each one named in `redacted` (any case) set to `[REDACTED]`. */\nexport const redactHeaders = (headers: Headers, redacted: readonly string[]) => {\n const redactedSet = new Set(redacted.map((name) => name.toLowerCase()));\n const result: Record<string, string> = {};\n headers.forEach((value, name) => {\n result[name] = redactedSet.has(name.toLowerCase()) ? REDACTED : value;\n });\n return result;\n};\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 { ApiResponse } from '../fetchClient/createFetchClient/types';\nimport { CREDENTIAL_HEADERS, redactHeaders } from '../internal';\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\n/**\n * A body-less copy of the request with every credential header masked.\n *\n * - Keeps the method, URL and the remaining headers for whoever handles the error.\n * - A masked header still appears, as `[REDACTED]`, so a reader sees it was sent.\n * - A copy, not an edit: the original request may still be retried with its token.\n */\nconst withoutCredentials = (request: Request) =>\n new Request(request.url, {\n method: request.method,\n headers: redactHeaders(request.headers, CREDENTIAL_HEADERS),\n });\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 = withoutCredentials(request);\n this.data = data;\n }\n}\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 = (\n path: string,\n pathParam: PathParam = {},\n encodePathParam: (value: string) => string = encodeURIComponent,\n) =>\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 encodePathParam(String(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 encodePathParam,\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, encodePathParam);\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":";;AAGA,MAAa,oBAAoB;CAC/B,mBAAmB;CACnB,sBAAsB;CACtB,iBAAiB;CACjB,YAAY;CACZ,YAAY;;CAEZ,oBAAoB;;CAEpB,MAAM;AACR;;AAGA,MAAa,qBAAqB;CAChC,kBAAkB;CAClB,kBAAkB;CAClB;CACA;AACF;AAEA,MAAa,WAAW;;AAGxB,MAAa,iBAAiB,SAAkB,aAAgC;CAC9E,MAAM,cAAc,IAAI,IAAI,SAAS,KAAK,SAAS,KAAK,YAAY,CAAC,CAAC;CACtE,MAAM,SAAiC,CAAC;CACxC,QAAQ,SAAS,OAAO,SAAS;EAC/B,OAAO,QAAQ,YAAY,IAAI,KAAK,YAAY,CAAC,IAAI,WAAW;CAClE,CAAC;CACD,OAAO;AACT;AAEA,MAAa,aAAa;CACxB,YAAY;CACZ,aAAa;CACb,cAAc;CACd,WAAW;CACX,sBAAsB;CACtB,uBAAuB;CACvB,aAAa;CACb,qBAAqB;CACrB,iBAAiB;AACnB;AAEA,MAAa,yBAAyB;;;;;;;;;;;;ACnCtC,MAAM,cAAc,aAClB,SAAS,aAAa,GAAG,SAAS,OAAO,GAAG,SAAS,eAAe,GAAG,SAAS;;;;;;;;AASlF,MAAM,sBAAsB,YAC1B,IAAI,QAAQ,QAAQ,KAAK;CACvB,QAAQ,QAAQ;CAChB,SAAS,cAAc,QAAQ,SAAS,kBAAkB;AAC5D,CAAC;AAEH,IAAa,WAAb,cAA8B,MAAM;CAClC;CACA;CACA;CAEA,YAAY,EAAE,UAAU,SAAS,QAAqB;EACpD,MAAM,WAAW,QAAQ,CAAC;EAC1B,KAAK,OAAO;EACZ,KAAK,WAAW;EACh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B,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"}
@@ -152,9 +152,9 @@ const createHeaders = (headersInitA, headersInitB) => {
152
152
  });
153
153
  return headersA;
154
154
  };
155
- const createPath = (path, pathParam = {}) => path.replace(/\{([^}]+)}/g, (_, key) => {
155
+ const createPath = (path, pathParam = {}, encodePathParam = encodeURIComponent) => path.replace(/\{([^}]+)}/g, (_, key) => {
156
156
  if (!(key in pathParam)) throw new Error(`Path parameter "${key}" is missing in the path "${path}"`);
157
- return encodeURIComponent(pathParam[key]);
157
+ return encodePathParam(String(pathParam[key]));
158
158
  });
159
159
  const createSearch = (query, options = {}) => {
160
160
  return qs.default.stringify(query, {
@@ -187,10 +187,10 @@ const parseContentDispositionHeader = (contentDisposition) => {
187
187
  };
188
188
  };
189
189
  const createFetchRequest = ({ url, method, params, options = {}, defaultOptions }) => {
190
- const { baseUrl, validateStatus: defValidateStatus = defaultValidateStatus, headers: defaultHeaders, fetchFn: defaultFetchFn, ...restDefaultOptions } = defaultOptions;
190
+ const { baseUrl, validateStatus: defValidateStatus = defaultValidateStatus, headers: defaultHeaders, fetchFn: defaultFetchFn, encodePathParam, ...restDefaultOptions } = defaultOptions;
191
191
  const { validateStatus, queryArrayFormat, headers: endpointHeaders, fetchFn, parseAs, ...restOptions } = options;
192
192
  const headers = createHeaders(defaultHeaders, endpointHeaders);
193
- const path = createPath(url, params.path);
193
+ const path = createPath(url, params.path, encodePathParam);
194
194
  const search = createSearch(params.query ?? {}, { arrayFormat: queryArrayFormat });
195
195
  const body = createBody(params.body, headers);
196
196
  const urlInstance = new URL(normalizeBaseUrl(baseUrl) + path);
@@ -367,4 +367,4 @@ Object.defineProperty(exports, "redactHeaders", {
367
367
  }
368
368
  });
369
369
 
370
- //# sourceMappingURL=createFetchClient-ClWD4ua3.cjs.map
370
+ //# sourceMappingURL=createFetchClient-lZ_93Yrb.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createFetchClient-lZ_93Yrb.cjs","names":[],"sources":["../src/internal.ts","../src/errors/ApiError.ts","../src/fetchClient/createFetchClient/utils.ts","../src/fetchClient/createFetchClient/createFetchClient.ts"],"sourcesContent":["// 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 UI_VERSION: 'X-KBC-Ui-Version',\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\n/** Request headers that carry a credential — never kept on an error or written to a log. */\nexport const CREDENTIAL_HEADERS = [\n KeboolaHttpHeader.STORAGE_API_TOKEN,\n KeboolaHttpHeader.MANAGEMENT_API_TOKEN,\n 'authorization',\n 'cookie',\n];\n\nexport const REDACTED = '[REDACTED]';\n\n/** The headers as a record, each one named in `redacted` (any case) set to `[REDACTED]`. */\nexport const redactHeaders = (headers: Headers, redacted: readonly string[]) => {\n const redactedSet = new Set(redacted.map((name) => name.toLowerCase()));\n const result: Record<string, string> = {};\n headers.forEach((value, name) => {\n result[name] = redactedSet.has(name.toLowerCase()) ? REDACTED : value;\n });\n return result;\n};\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 { ApiResponse } from '../fetchClient/createFetchClient/types';\nimport { CREDENTIAL_HEADERS, redactHeaders } from '../internal';\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\n/**\n * A body-less copy of the request with every credential header masked.\n *\n * - Keeps the method, URL and the remaining headers for whoever handles the error.\n * - A masked header still appears, as `[REDACTED]`, so a reader sees it was sent.\n * - A copy, not an edit: the original request may still be retried with its token.\n */\nconst withoutCredentials = (request: Request) =>\n new Request(request.url, {\n method: request.method,\n headers: redactHeaders(request.headers, CREDENTIAL_HEADERS),\n });\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 = withoutCredentials(request);\n this.data = data;\n }\n}\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 = (\n path: string,\n pathParam: PathParam = {},\n encodePathParam: (value: string) => string = encodeURIComponent,\n) =>\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 encodePathParam(String(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 encodePathParam,\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, encodePathParam);\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":";;;;AAGA,MAAa,oBAAoB;CAC/B,mBAAmB;CACn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AU,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-DITkTV2k.js";
1
+ import { t as createFetchClient } from "./createFetchClient-CkHdS_IG.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-KqiJhw8G.js.map
7
+ //# sourceMappingURL=createGenericFetchClient-CQdNcPC3.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"createGenericFetchClient-KqiJhw8G.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-CQdNcPC3.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-ClWD4ua3.cjs");
1
+ const require_createFetchClient = require("./createFetchClient-lZ_93Yrb.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-B81Iezpb.cjs.map
12
+ //# sourceMappingURL=createGenericFetchClient-MOx97wi-.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"createGenericFetchClient-B81Iezpb.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-MOx97wi-.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-ClWD4ua3.cjs");
1
+ const require_createFetchClient = require("./createFetchClient-lZ_93Yrb.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-CioTX11-.cjs.map
12
+ //# sourceMappingURL=createOpenapiFetchClient-DHYo_k3t.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"createOpenapiFetchClient-CioTX11-.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-DHYo_k3t.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-DITkTV2k.js";
1
+ import { t as createFetchClient } from "./createFetchClient-CkHdS_IG.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-wq8iGLZM.js.map
7
+ //# sourceMappingURL=createOpenapiFetchClient-DXiMv9WL.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"createOpenapiFetchClient-wq8iGLZM.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-DXiMv9WL.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-BG9ueGxA.cjs");
3
- const require_dataScience = require("../dataScience-Hhoqoql_.cjs");
2
+ const require_appLogs = require("../appLogs-Cix2KWra.cjs");
3
+ const require_dataScience = require("../dataScience-BjS1p8WO.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-Dl0v684o.cjs";
2
- import { t as createDataScienceClient } from "../index-Bt43tKyu.cjs";
1
+ import { n as parseLogLines } from "../appLogs-SjrflOHk.cjs";
2
+ import { t as createDataScienceClient } from "../index-Cc5wSIRJ.cjs";
3
3
  export { createDataScienceClient, parseLogLines };
@@ -1,3 +1,3 @@
1
- import { n as parseLogLines } from "../appLogs-DGIctwbb.js";
2
- import { t as createDataScienceClient } from "../index-DRaVzOLM.js";
1
+ import { n as parseLogLines } from "../appLogs-DpcqeOe5.js";
2
+ import { t as createDataScienceClient } from "../index-DzLXtE4Q.js";
3
3
  export { createDataScienceClient, parseLogLines };
@@ -1,3 +1,3 @@
1
- import { t as parseLogLines } from "../appLogs-CEKz68bE.js";
2
- import { t as createDataScienceClient } from "../dataScience-BwHmDoQb.js";
1
+ import { t as parseLogLines } from "../appLogs-KslK7qHr.js";
2
+ import { t as createDataScienceClient } from "../dataScience-AwPMeGfz.js";
3
3
  export { createDataScienceClient, parseLogLines };
@@ -1,3 +1,3 @@
1
- import { t as LogEntry } from "../appLogs-Dl0v684o.cjs";
2
- import { C as RuntimeImageKey, S as Runtime, _ as GetSandboxPath, a as DataAppRun, b as RawAppRun, c as GetAppsQuery, d as GetDataAppLogsTailQuery, f as GetDataAppPasswordPath, g as GetDataAppRunsQuery, h as GetDataAppRunsPath, i as DataAppPreviewLink, l as GetDataAppLogsDownloadPath, m as GetDataAppRunPath, n as CreateDataAppPreviewLinkPath, o as DeleteDataAppPath, p as GetDataAppPath, r as DataApp, s as DeleteSandboxPath, t as CreateDataAppBody, u as GetDataAppLogsTailPath, v as PatchDataAppBody, w as Sandbox, x as ResetDataAppPasswordPath, y as PatchDataAppPath } from "../types-BRvs3fXN.cjs";
1
+ import { t as LogEntry } from "../appLogs-SjrflOHk.cjs";
2
+ import { C as RuntimeImageKey, S as Runtime, _ as GetSandboxPath, a as DataAppRun, b as RawAppRun, c as GetAppsQuery, d as GetDataAppLogsTailQuery, f as GetDataAppPasswordPath, g as GetDataAppRunsQuery, h as GetDataAppRunsPath, i as DataAppPreviewLink, l as GetDataAppLogsDownloadPath, m as GetDataAppRunPath, n as CreateDataAppPreviewLinkPath, o as DeleteDataAppPath, p as GetDataAppPath, r as DataApp, s as DeleteSandboxPath, t as CreateDataAppBody, u as GetDataAppLogsTailPath, v as PatchDataAppBody, w as Sandbox, x as ResetDataAppPasswordPath, y as PatchDataAppPath } from "../types-6KabdIyO.cjs";
3
3
  export { CreateDataAppBody, CreateDataAppPreviewLinkPath, DataApp, DataAppPreviewLink, 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-DGIctwbb.js";
2
- import { C as RuntimeImageKey, S as Runtime, _ as GetSandboxPath, a as DataAppRun, b as RawAppRun, c as GetAppsQuery, d as GetDataAppLogsTailQuery, f as GetDataAppPasswordPath, g as GetDataAppRunsQuery, h as GetDataAppRunsPath, i as DataAppPreviewLink, l as GetDataAppLogsDownloadPath, m as GetDataAppRunPath, n as CreateDataAppPreviewLinkPath, o as DeleteDataAppPath, p as GetDataAppPath, r as DataApp, s as DeleteSandboxPath, t as CreateDataAppBody, u as GetDataAppLogsTailPath, v as PatchDataAppBody, w as Sandbox, x as ResetDataAppPasswordPath, y as PatchDataAppPath } from "../types-UI2aZ74n.js";
1
+ import { t as LogEntry } from "../appLogs-DpcqeOe5.js";
2
+ import { C as RuntimeImageKey, S as Runtime, _ as GetSandboxPath, a as DataAppRun, b as RawAppRun, c as GetAppsQuery, d as GetDataAppLogsTailQuery, f as GetDataAppPasswordPath, g as GetDataAppRunsQuery, h as GetDataAppRunsPath, i as DataAppPreviewLink, l as GetDataAppLogsDownloadPath, m as GetDataAppRunPath, n as CreateDataAppPreviewLinkPath, o as DeleteDataAppPath, p as GetDataAppPath, r as DataApp, s as DeleteSandboxPath, t as CreateDataAppBody, u as GetDataAppLogsTailPath, v as PatchDataAppBody, w as Sandbox, x as ResetDataAppPasswordPath, y as PatchDataAppPath } from "../types-CfZLdfAL.js";
3
3
  export { CreateDataAppBody, CreateDataAppPreviewLinkPath, DataApp, DataAppPreviewLink, 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
- import { t as createGenericFetchClient } from "./createGenericFetchClient-KqiJhw8G.js";
2
- import { t as createOpenapiFetchClient } from "./createOpenapiFetchClient-wq8iGLZM.js";
3
- import { t as createAuthHeaders } from "./auth-C6cHWIWx.js";
4
- import { n as readAppLogsDownload, r as readAppLogsTail } from "./appLogs-CEKz68bE.js";
1
+ import { t as createGenericFetchClient } from "./createGenericFetchClient-CQdNcPC3.js";
2
+ import { t as createOpenapiFetchClient } from "./createOpenapiFetchClient-DXiMv9WL.js";
3
+ import { t as createAuthHeaders } from "./auth-4coY1uwo.js";
4
+ import { n as readAppLogsDownload, r as readAppLogsTail } from "./appLogs-KslK7qHr.js";
5
5
  //#region src/clients/dataScience/utils.ts
6
6
  const prepareAppRun = (appRun) => {
7
7
  return {
@@ -117,4 +117,4 @@ const createDataScienceClient = ({ baseUrl, middlewares, auth }) => {
117
117
  //#endregion
118
118
  export { createDataScienceClient as t };
119
119
 
120
- //# sourceMappingURL=dataScience-BwHmDoQb.js.map
120
+ //# sourceMappingURL=dataScience-AwPMeGfz.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dataScience-BwHmDoQb.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 CreateDataAppPreviewLinkPath,\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 /**\n * A 60-second link that opens a dev-mode app without the app's own authentication.\n *\n * - Opening `url` in a browser (or an iframe) starts a preview session on the app host.\n * - The token rides in the URL fragment: never fetch the link, navigate to it.\n */\n const createAppPreviewLink = async (\n appId: CreateDataAppPreviewLinkPath['appId'],\n signal?: AbortSignal,\n ) => {\n const { data } = await client.post(\n '/apps/{appId}/preview-link',\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 createAppPreviewLink,\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;;;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AM,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;EACA;CACF;AACF"}
1
+ {"version":3,"file":"dataScience-AwPMeGfz.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 CreateDataAppPreviewLinkPath,\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 /**\n * A 60-second link that opens a dev-mode app without the app's own authentication.\n *\n * - Opening `url` in a browser (or an iframe) starts a preview session on the app host.\n * - The token rides in the URL fragment: never fetch the link, navigate to it.\n */\n const createAppPreviewLink = async (\n appId: CreateDataAppPreviewLinkPath['appId'],\n signal?: AbortSignal,\n ) => {\n const { data } = await client.post(\n '/apps/{appId}/preview-link',\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 createAppPreviewLink,\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;;;ACoBA,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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-B81Iezpb.cjs");
2
- const require_createOpenapiFetchClient = require("./createOpenapiFetchClient-CioTX11-.cjs");
3
- const require_auth = require("./auth-C9o_0bft.cjs");
4
- const require_appLogs = require("./appLogs-BG9ueGxA.cjs");
1
+ const require_createGenericFetchClient = require("./createGenericFetchClient-MOx97wi-.cjs");
2
+ const require_createOpenapiFetchClient = require("./createOpenapiFetchClient-DHYo_k3t.cjs");
3
+ const require_auth = require("./auth-C8Pjl0Mu.cjs");
4
+ const require_appLogs = require("./appLogs-Cix2KWra.cjs");
5
5
  //#region src/clients/dataScience/utils.ts
6
6
  const prepareAppRun = (appRun) => {
7
7
  return {
@@ -122,4 +122,4 @@ Object.defineProperty(exports, "createDataScienceClient", {
122
122
  }
123
123
  });
124
124
 
125
- //# sourceMappingURL=dataScience-Hhoqoql_.cjs.map
125
+ //# sourceMappingURL=dataScience-BjS1p8WO.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"dataScience-Hhoqoql_.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 CreateDataAppPreviewLinkPath,\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 /**\n * A 60-second link that opens a dev-mode app without the app's own authentication.\n *\n * - Opening `url` in a browser (or an iframe) starts a preview session on the app host.\n * - The token rides in the URL fragment: never fetch the link, navigate to it.\n */\n const createAppPreviewLink = async (\n appId: CreateDataAppPreviewLinkPath['appId'],\n signal?: AbortSignal,\n ) => {\n const { data } = await client.post(\n '/apps/{appId}/preview-link',\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 createAppPreviewLink,\n getRuntimes,\n getSandbox,\n deleteSandbox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AE,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;EACA;CACF;AACF"}
1
+ {"version":3,"file":"dataScience-BjS1p8WO.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 CreateDataAppPreviewLinkPath,\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 /**\n * A 60-second link that opens a dev-mode app without the app's own authentication.\n *\n * - Opening `url` in a browser (or an iframe) starts a preview session on the app host.\n * - The token rides in the URL fragment: never fetch the link, navigate to it.\n */\n const createAppPreviewLink = async (\n appId: CreateDataAppPreviewLinkPath['appId'],\n signal?: AbortSignal,\n ) => {\n const { data } = await client.post(\n '/apps/{appId}/preview-link',\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 createAppPreviewLink,\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;;;ACoBA,MAAa,2BAA2B,EAAE,SAAS,aA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;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;EACA;CACF;AACF"}
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_developerPortalClient = require("../developerPortalClient-COm7wJxS.cjs");
2
+ const require_developerPortalClient = require("../developerPortalClient-DUerKw-7.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-Csmy6qFk.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-CTKC-mwi.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-DMpiG2q4.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-CpGmmJbt.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-C4yryy-R.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-yJ0HrxY6.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-Cn8I0vcr.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-m7fX76x3.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-loKq7X_U.js";
1
+ import { i as uploadAppIcon, n as isMfaChallengeResponse, r as authHeader, t as createDeveloperPortalClient } from "../developerPortalClient-Bb2suezr.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-Csmy6qFk.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-DMpiG2q4.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-C4yryy-R.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-Cn8I0vcr.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-DITkTV2k.js";
2
- import { t as createOpenapiFetchClient } from "./createOpenapiFetchClient-wq8iGLZM.js";
1
+ import { s as HttpHeader } from "./createFetchClient-CkHdS_IG.js";
2
+ import { t as createOpenapiFetchClient } from "./createOpenapiFetchClient-DXiMv9WL.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,6 +442,12 @@ const createVendors = ({ client, publicClient }) => {
442
442
  //#endregion
443
443
  //#region src/clients/developerPortal/developerPortalClient.ts
444
444
  /**
445
+ * Percent-encodes a path parameter, leaving the RFC 3986 segment characters `$&+,;=:@` raw.
446
+ *
447
+ * - apps-api never decodes a path parameter, so `%40` fails its email validation.
448
+ */
449
+ const encodePathParam = (value) => encodeURIComponent(value).replace(/%(24|26|2B|2C|3B|3D|3A|40)/g, (match) => decodeURIComponent(match));
450
+ /**
445
451
  * The Developer Portal (apps-api) client; types generated via `redocly.yaml` / `pnpm gen:types`.
446
452
  *
447
453
  * - Two fetch clients: `security: []` operations go out unauthenticated, and four use the access or
@@ -450,11 +456,13 @@ const createVendors = ({ client, publicClient }) => {
450
456
  const createDeveloperPortalClient = ({ baseUrl, middlewares = [], authMiddleware }) => {
451
457
  const publicClient = createOpenapiFetchClient({
452
458
  baseUrl,
453
- middlewares
459
+ middlewares,
460
+ encodePathParam
454
461
  });
455
462
  const client = authMiddleware ? createOpenapiFetchClient({
456
463
  baseUrl,
457
- middlewares: [authMiddleware, ...middlewares]
464
+ middlewares: [authMiddleware, ...middlewares],
465
+ encodePathParam
458
466
  }) : publicClient;
459
467
  const healthCheck = async (signal) => {
460
468
  const { data } = await publicClient.get("/", {}, { signal });
@@ -480,4 +488,4 @@ const createDeveloperPortalClient = ({ baseUrl, middlewares = [], authMiddleware
480
488
  //#endregion
481
489
  export { uploadAppIcon as i, isMfaChallengeResponse as n, authHeader as r, createDeveloperPortalClient as t };
482
490
 
483
- //# sourceMappingURL=developerPortalClient-loKq7X_U.js.map
491
+ //# sourceMappingURL=developerPortalClient-Bb2suezr.js.map