@keboola/api-client 33.0.0 → 34.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 (420) hide show
  1. package/AGENTS.md +2 -2
  2. package/API-SURFACE.md +16 -2
  3. package/CHANGELOG.md +243 -0
  4. package/dist/{ManagementClientAuthError-DqeXL8nv.cjs → ManagementClientAuthError-DD4u0EU7.cjs} +2 -2
  5. package/dist/{ManagementClientAuthError-DqeXL8nv.cjs.map → ManagementClientAuthError-DD4u0EU7.cjs.map} +1 -1
  6. package/dist/{ManagementClientAuthError-iKbBugKC.js → ManagementClientAuthError-ey-f03vy.js} +2 -2
  7. package/dist/{ManagementClientAuthError-iKbBugKC.js.map → ManagementClientAuthError-ey-f03vy.js.map} +1 -1
  8. package/dist/{ValidationError-CzPWydEb.js → ValidationError-BekhphAq.js} +11 -7
  9. package/dist/ValidationError-BekhphAq.js.map +1 -0
  10. package/dist/{ValidationError-h5qvwahi.cjs → ValidationError-CLVJCCwH.cjs} +16 -6
  11. package/dist/ValidationError-CLVJCCwH.cjs.map +1 -0
  12. package/dist/ai/index.cjs +2 -2
  13. package/dist/ai/index.d.cts +2 -2
  14. package/dist/ai/index.d.ts +2 -2
  15. package/dist/ai/index.js +2 -2
  16. package/dist/ai/types.d.cts +1 -1
  17. package/dist/ai/types.d.ts +1 -1
  18. package/dist/{appLogs-D8K0VeNM.cjs → appLogs-BjfUoWzs.cjs} +2 -2
  19. package/dist/{appLogs-D8K0VeNM.cjs.map → appLogs-BjfUoWzs.cjs.map} +1 -1
  20. package/dist/{appLogs-u0XMZLjS.d.ts → appLogs-Ch7DYpzx.d.ts} +2 -2
  21. package/dist/{appLogs-Q4A7A_Fc.d.cts → appLogs-D5A13Y0y.d.cts} +2 -2
  22. package/dist/{appLogs-D72eD8vP.js → appLogs-xsVkTriU.js} +2 -2
  23. package/dist/{appLogs-D72eD8vP.js.map → appLogs-xsVkTriU.js.map} +1 -1
  24. package/dist/apps/index.cjs +3 -3
  25. package/dist/apps/index.d.cts +3 -3
  26. package/dist/apps/index.d.ts +3 -3
  27. package/dist/apps/index.js +3 -3
  28. package/dist/apps/types.d.cts +2 -2
  29. package/dist/apps/types.d.ts +2 -2
  30. package/dist/assets/index.cjs +1 -1
  31. package/dist/assets/index.d.cts +1 -1
  32. package/dist/assets/index.d.ts +1 -1
  33. package/dist/assets/index.js +1 -1
  34. package/dist/auth/index.cjs +1 -1
  35. package/dist/auth/index.d.cts +1 -1
  36. package/dist/auth/index.d.ts +1 -1
  37. package/dist/auth/index.js +1 -1
  38. package/dist/auth/types.d.cts +1 -1
  39. package/dist/auth/types.d.ts +1 -1
  40. package/dist/{auth-C2_JLisH.cjs → auth-JQ33o3nU.cjs} +2 -2
  41. package/dist/{auth-C2_JLisH.cjs.map → auth-JQ33o3nU.cjs.map} +1 -1
  42. package/dist/{auth-CE9rQV3-.js → auth-aItmDu45.js} +2 -2
  43. package/dist/{auth-CE9rQV3-.js.map → auth-aItmDu45.js.map} +1 -1
  44. package/dist/{authClient-DZ_8lvdJ.d.cts → authClient-CTHNs6Tq.d.cts} +4 -4
  45. package/dist/{authClient-DEyqR7GW.js → authClient-D7W9vWPR.js} +5 -5
  46. package/dist/{authClient-DEyqR7GW.js.map → authClient-D7W9vWPR.js.map} +1 -1
  47. package/dist/{authClient-DwT6xdg5.d.ts → authClient-D8i3JTM-.d.ts} +4 -4
  48. package/dist/{authClient-IwQ9Ti0J.cjs → authClient-_PpvGgZJ.cjs} +5 -5
  49. package/dist/{authClient-IwQ9Ti0J.cjs.map → authClient-_PpvGgZJ.cjs.map} +1 -1
  50. package/dist/billing/index.cjs +46 -0
  51. package/dist/billing/index.cjs.map +1 -0
  52. package/dist/billing/index.d.cts +48 -0
  53. package/dist/billing/index.d.ts +48 -0
  54. package/dist/billing/index.js +45 -0
  55. package/dist/billing/index.js.map +1 -0
  56. package/dist/billing/types.cjs +0 -0
  57. package/dist/billing/types.d.cts +635 -0
  58. package/dist/billing/types.d.ts +635 -0
  59. package/dist/billing/types.js +1 -0
  60. package/dist/chat/index.cjs +3 -3
  61. package/dist/chat/index.d.cts +2 -2
  62. package/dist/chat/index.d.ts +2 -2
  63. package/dist/chat/index.js +3 -3
  64. package/dist/chat/types.cjs +18 -0
  65. package/dist/chat/types.cjs.map +1 -1
  66. package/dist/chat/types.d.cts +2 -2
  67. package/dist/chat/types.d.ts +2 -2
  68. package/dist/chat/types.js +18 -1
  69. package/dist/chat/types.js.map +1 -1
  70. package/dist/{configurations-d7SZmw69.js → configurations-BVvcimzo.js} +17 -2
  71. package/dist/configurations-BVvcimzo.js.map +1 -0
  72. package/dist/{configurations-CqwAxiQL.cjs → configurations-CyFF9Dtu.cjs} +22 -1
  73. package/dist/configurations-CyFF9Dtu.cjs.map +1 -0
  74. package/dist/{configurations-ZwBXilW-.js → configurations-VtNE0nrT.js} +2 -2
  75. package/dist/{configurations-ZwBXilW-.js.map → configurations-VtNE0nrT.js.map} +1 -1
  76. package/dist/{configurations-Ck-mNB_E.cjs → configurations-zkNjr73Q.cjs} +2 -2
  77. package/dist/{configurations-Ck-mNB_E.cjs.map → configurations-zkNjr73Q.cjs.map} +1 -1
  78. package/dist/constants/index.cjs +1 -1
  79. package/dist/constants/index.d.cts +1 -1
  80. package/dist/constants/index.d.ts +1 -1
  81. package/dist/constants/index.js +1 -1
  82. package/dist/{constants-lIfSdTzS.cjs → constants-C4DlsF_M.cjs} +3 -2
  83. package/dist/constants-C4DlsF_M.cjs.map +1 -0
  84. package/dist/{constants-ByEwVtGf.js → constants-wfbFsqqN.js} +3 -2
  85. package/dist/constants-wfbFsqqN.js.map +1 -0
  86. package/dist/{createFetchClient-DvZvD31l.cjs → createFetchClient-DgMiqTJ8.cjs} +19 -4
  87. package/dist/createFetchClient-DgMiqTJ8.cjs.map +1 -0
  88. package/dist/{createFetchClient-DdyZMhxO.js → createFetchClient-U-ZrwPl2.js} +14 -5
  89. package/dist/{createFetchClient-DvZvD31l.cjs.map → createFetchClient-U-ZrwPl2.js.map} +1 -1
  90. package/dist/{createGenericFetchClient-qfCZlCTv.cjs → createGenericFetchClient-o3cPJeRn.cjs} +2 -2
  91. package/dist/{createGenericFetchClient-qfCZlCTv.cjs.map → createGenericFetchClient-o3cPJeRn.cjs.map} +1 -1
  92. package/dist/{createGenericFetchClient-MQeLRiNW.js → createGenericFetchClient-rxvUUbap.js} +2 -2
  93. package/dist/{createGenericFetchClient-MQeLRiNW.js.map → createGenericFetchClient-rxvUUbap.js.map} +1 -1
  94. package/dist/{createOpenapiFetchClient-E7OIVkYv.js → createOpenapiFetchClient-BVSc9ibR.js} +2 -2
  95. package/dist/{createOpenapiFetchClient-E7OIVkYv.js.map → createOpenapiFetchClient-BVSc9ibR.js.map} +1 -1
  96. package/dist/{createOpenapiFetchClient-C57Ljzi6.cjs → createOpenapiFetchClient-DhUU3M1W.cjs} +2 -2
  97. package/dist/{createOpenapiFetchClient-C57Ljzi6.cjs.map → createOpenapiFetchClient-DhUU3M1W.cjs.map} +1 -1
  98. package/dist/{credential-Bxv7yxOZ.js → credential-CihSf_xs.js} +2 -2
  99. package/dist/{credential-Bxv7yxOZ.js.map → credential-CihSf_xs.js.map} +1 -1
  100. package/dist/{credential-D-X5QQrM.cjs → credential-DVWvJFJs.cjs} +2 -2
  101. package/dist/{credential-D-X5QQrM.cjs.map → credential-DVWvJFJs.cjs.map} +1 -1
  102. package/dist/dataScience/index.cjs +2 -2
  103. package/dist/dataScience/index.d.cts +2 -2
  104. package/dist/dataScience/index.d.ts +2 -2
  105. package/dist/dataScience/index.js +2 -2
  106. package/dist/dataScience/types.d.cts +2 -2
  107. package/dist/dataScience/types.d.ts +2 -2
  108. package/dist/{dataScience-BPW993AG.cjs → dataScience-0Rl_EuV_.cjs} +5 -5
  109. package/dist/{dataScience-BPW993AG.cjs.map → dataScience-0Rl_EuV_.cjs.map} +1 -1
  110. package/dist/{dataScience-B_TA7wCB.js → dataScience-C1gO5zUn.js} +5 -5
  111. package/dist/{dataScience-B_TA7wCB.js.map → dataScience-C1gO5zUn.js.map} +1 -1
  112. package/dist/developerPortal/index.cjs +1 -1
  113. package/dist/developerPortal/index.d.cts +2 -2
  114. package/dist/developerPortal/index.d.ts +2 -2
  115. package/dist/developerPortal/index.js +1 -1
  116. package/dist/developerPortal/types.d.cts +1 -1
  117. package/dist/developerPortal/types.d.ts +1 -1
  118. package/dist/{developerPortalClient-jk46sjwP.js → developerPortalClient-C_48z8BN.js} +3 -3
  119. package/dist/{developerPortalClient-jk46sjwP.js.map → developerPortalClient-C_48z8BN.js.map} +1 -1
  120. package/dist/{developerPortalClient-Db2XVB_o.cjs → developerPortalClient-ki0XS_OD.cjs} +3 -3
  121. package/dist/{developerPortalClient-Db2XVB_o.cjs.map → developerPortalClient-ki0XS_OD.cjs.map} +1 -1
  122. package/dist/domain/permissions/index.cjs +2 -1
  123. package/dist/domain/permissions/index.d.cts +18 -3
  124. package/dist/domain/permissions/index.d.ts +18 -3
  125. package/dist/domain/permissions/index.js +2 -2
  126. package/dist/editor/index.cjs +2 -2
  127. package/dist/editor/index.d.cts +2 -2
  128. package/dist/editor/index.d.ts +2 -2
  129. package/dist/editor/index.js +2 -2
  130. package/dist/editor/types.d.cts +1 -1
  131. package/dist/editor/types.d.ts +1 -1
  132. package/dist/encryption/index.cjs +1 -1
  133. package/dist/encryption/index.d.cts +1 -1
  134. package/dist/encryption/index.d.ts +1 -1
  135. package/dist/encryption/index.js +1 -1
  136. package/dist/encryption/types.d.cts +1 -1
  137. package/dist/encryption/types.d.ts +1 -1
  138. package/dist/import/index.cjs +1 -1
  139. package/dist/import/index.d.cts +3 -3
  140. package/dist/import/index.d.ts +3 -3
  141. package/dist/import/index.js +1 -1
  142. package/dist/{import-DJilJ6tq.cjs → import-C83w7BKz.cjs} +3 -3
  143. package/dist/{import-DJilJ6tq.cjs.map → import-C83w7BKz.cjs.map} +1 -1
  144. package/dist/{import-2nqxQ9Rt.js → import-CROEK82b.js} +3 -3
  145. package/dist/{import-2nqxQ9Rt.js.map → import-CROEK82b.js.map} +1 -1
  146. package/dist/{index-DQef014j.d.ts → index-3LUk2rpD.d.ts} +4 -4
  147. package/dist/{index-BjKjp3Rf.d.ts → index-6Xe81qN3.d.ts} +5 -5
  148. package/dist/{index-DIVvL54G.d.cts → index-BLx14ZI4.d.cts} +104 -44
  149. package/dist/{index-CUXEFQ7i.d.cts → index-BgLnWTZU.d.cts} +6 -6
  150. package/dist/{index-C_cxKL1V.d.ts → index-BuegqrS1.d.ts} +3 -3
  151. package/dist/{index-bB6wvw1f.d.ts → index-C77vTm2K.d.ts} +4 -4
  152. package/dist/{index-qOK5FtAH.d.cts → index-CW3Pj7DY.d.cts} +4 -4
  153. package/dist/{index-B2OGaUap.d.ts → index-CqgtL2NU.d.ts} +6 -6
  154. package/dist/{index-C7gxKoDF.d.cts → index-D8rcUbnk.d.ts} +3 -3
  155. package/dist/{index-B0V1pJAa.d.ts → index-DFBFa3SS.d.ts} +104 -44
  156. package/dist/{index-CVqk63at.d.ts → index-DR4QqItd.d.cts} +3 -3
  157. package/dist/{index-DCN2lH0v.d.cts → index-DXSmFkol.d.cts} +4 -4
  158. package/dist/{index-CTd4YY8e.d.cts → index-Dodwl64k.d.cts} +69 -36
  159. package/dist/{index-t-a7kYnx.d.cts → index-DppA4k3b.d.cts} +5 -5
  160. package/dist/{index-DLYAvSWZ.d.cts → index-Dx52hNLP.d.cts} +3 -3
  161. package/dist/{index-exNi3I2Q.d.cts → index-GjcJTCbz.d.cts} +4 -4
  162. package/dist/{index-DhVFuQDv.d.cts → index-KuQ79Mnz.d.ts} +13 -3
  163. package/dist/{index-GNKwr7EQ.d.ts → index-P-iT5THa.d.ts} +69 -36
  164. package/dist/{index-DVhTNwvu.d.ts → index-V7XKUQm9.d.cts} +13 -3
  165. package/dist/{index-ChMtULt4.d.ts → index-pXN4LWUX.d.ts} +4 -4
  166. package/dist/index.cjs +77 -37
  167. package/dist/index.cjs.map +1 -1
  168. package/dist/index.d.cts +6 -6
  169. package/dist/index.d.ts +6 -6
  170. package/dist/index.js +74 -35
  171. package/dist/index.js.map +1 -1
  172. package/dist/isLoginPageRedirect-B0EmRsHr.cjs +25 -0
  173. package/dist/isLoginPageRedirect-B0EmRsHr.cjs.map +1 -0
  174. package/dist/isLoginPageRedirect-BTTAedW-.js +20 -0
  175. package/dist/isLoginPageRedirect-BTTAedW-.js.map +1 -0
  176. package/dist/kaiAgent/index.cjs +1 -1
  177. package/dist/kaiAgent/index.d.cts +1 -1
  178. package/dist/kaiAgent/index.d.ts +1 -1
  179. package/dist/kaiAgent/index.js +1 -1
  180. package/dist/kaiAgent/types.d.cts +1 -1
  181. package/dist/kaiAgent/types.d.ts +1 -1
  182. package/dist/{kaiAgent-CYYn0QJW.js → kaiAgent-8LNzGhZc.js} +4 -4
  183. package/dist/{kaiAgent-CYYn0QJW.js.map → kaiAgent-8LNzGhZc.js.map} +1 -1
  184. package/dist/{kaiAgent-CMVub6Sc.cjs → kaiAgent-B_TaUPRt.cjs} +4 -4
  185. package/dist/{kaiAgent-CMVub6Sc.cjs.map → kaiAgent-B_TaUPRt.cjs.map} +1 -1
  186. package/dist/{kaiAgentClient-B2O0DF4d.d.ts → kaiAgentClient-BJj_2aqt.d.ts} +4 -3
  187. package/dist/{kaiAgentClient-iCFR2tRU.d.cts → kaiAgentClient-DhTaM3GC.d.cts} +4 -3
  188. package/dist/management/index.cjs +1 -1
  189. package/dist/management/index.d.cts +1 -1
  190. package/dist/management/index.d.ts +1 -1
  191. package/dist/management/index.js +1 -1
  192. package/dist/management/types.d.cts +2 -2
  193. package/dist/management/types.d.ts +2 -2
  194. package/dist/{management-DGfgKsaA.cjs → management-BoxlRNg2.cjs} +53 -10
  195. package/dist/management-BoxlRNg2.cjs.map +1 -0
  196. package/dist/{management-DNEKhR6a.js → management-Bp440RsV.js} +53 -10
  197. package/dist/management-Bp440RsV.js.map +1 -0
  198. package/dist/metastore/index.cjs +1 -1
  199. package/dist/metastore/index.d.cts +1 -1
  200. package/dist/metastore/index.d.ts +1 -1
  201. package/dist/metastore/index.js +1 -1
  202. package/dist/metastore/types.d.cts +1 -1
  203. package/dist/metastore/types.d.ts +1 -1
  204. package/dist/{metastore-DksEte8P.cjs → metastore-BYYWTb3m.cjs} +4 -4
  205. package/dist/{metastore-DksEte8P.cjs.map → metastore-BYYWTb3m.cjs.map} +1 -1
  206. package/dist/{metastore-CjwktHvw.js → metastore-VCDRVhUT.js} +4 -4
  207. package/dist/{metastore-CjwktHvw.js.map → metastore-VCDRVhUT.js.map} +1 -1
  208. package/dist/microsoftGraph/index.cjs +2 -2
  209. package/dist/microsoftGraph/index.d.cts +2 -2
  210. package/dist/microsoftGraph/index.d.ts +2 -2
  211. package/dist/microsoftGraph/index.js +2 -2
  212. package/dist/microsoftGraph/types.d.cts +1 -1
  213. package/dist/microsoftGraph/types.d.ts +1 -1
  214. package/dist/notifications/index.cjs +3 -3
  215. package/dist/notifications/index.d.cts +2 -2
  216. package/dist/notifications/index.d.ts +2 -2
  217. package/dist/notifications/index.js +3 -3
  218. package/dist/notifications/types.d.cts +1 -1
  219. package/dist/notifications/types.d.ts +1 -1
  220. package/dist/oauth/index.cjs +1 -1
  221. package/dist/oauth/index.d.cts +2 -2
  222. package/dist/oauth/index.d.ts +2 -2
  223. package/dist/oauth/index.js +1 -1
  224. package/dist/oauth/types.d.cts +1 -1
  225. package/dist/oauth/types.d.ts +1 -1
  226. package/dist/{oauth-Bg5zro5S.js → oauth--asfePw-.js} +5 -5
  227. package/dist/{oauth-Bg5zro5S.js.map → oauth--asfePw-.js.map} +1 -1
  228. package/dist/{oauth-DFsI1TE5.cjs → oauth-B8yqG6Sy.cjs} +5 -5
  229. package/dist/{oauth-DFsI1TE5.cjs.map → oauth-B8yqG6Sy.cjs.map} +1 -1
  230. package/dist/omnisearch/index.cjs +2 -2
  231. package/dist/omnisearch/index.d.cts +2 -2
  232. package/dist/omnisearch/index.d.ts +2 -2
  233. package/dist/omnisearch/index.js +2 -2
  234. package/dist/omnisearch/types.d.cts +1 -1
  235. package/dist/omnisearch/types.d.ts +1 -1
  236. package/dist/{project-Bh954iOA.d.ts → project-C2wvX0xZ.d.ts} +2 -2
  237. package/dist/{project-D25GH8zK.d.cts → project-hePfzUY0.d.cts} +2 -2
  238. package/dist/queryService/index.cjs +1 -1
  239. package/dist/queryService/index.d.cts +1 -1
  240. package/dist/queryService/index.d.ts +1 -1
  241. package/dist/queryService/index.js +1 -1
  242. package/dist/queryService/types.d.cts +1 -1
  243. package/dist/queryService/types.d.ts +1 -1
  244. package/dist/{queryService--t_W9PSJ.cjs → queryService-BVtjkXy1.cjs} +5 -5
  245. package/dist/{queryService--t_W9PSJ.cjs.map → queryService-BVtjkXy1.cjs.map} +1 -1
  246. package/dist/{queryService-DX6zeAs_.js → queryService-Ca65E5KH.js} +5 -5
  247. package/dist/{queryService-DX6zeAs_.js.map → queryService-Ca65E5KH.js.map} +1 -1
  248. package/dist/queue/index.cjs +1 -1
  249. package/dist/queue/index.d.cts +3 -3
  250. package/dist/queue/index.d.ts +3 -3
  251. package/dist/queue/index.js +1 -1
  252. package/dist/queue/types.d.cts +1 -1
  253. package/dist/queue/types.d.ts +1 -1
  254. package/dist/{queue-DrLUbk98.js → queue-DyotLFJi.js} +4 -4
  255. package/dist/{queue-DrLUbk98.js.map → queue-DyotLFJi.js.map} +1 -1
  256. package/dist/{queue-D1_TCe0z.cjs → queue-OJJUUqc2.cjs} +4 -4
  257. package/dist/{queue-D1_TCe0z.cjs.map → queue-OJJUUqc2.cjs.map} +1 -1
  258. package/dist/scheduler/index.cjs +3 -3
  259. package/dist/scheduler/index.d.cts +2 -2
  260. package/dist/scheduler/index.d.ts +2 -2
  261. package/dist/scheduler/index.js +3 -3
  262. package/dist/scheduler/types.d.cts +1 -1
  263. package/dist/scheduler/types.d.ts +1 -1
  264. package/dist/sdk/configurations/index.cjs +1 -1
  265. package/dist/sdk/configurations/index.d.cts +4 -4
  266. package/dist/sdk/configurations/index.d.ts +4 -4
  267. package/dist/sdk/configurations/index.js +1 -1
  268. package/dist/sdk/developerPortal/index.cjs +3 -3
  269. package/dist/sdk/developerPortal/index.d.cts +3 -3
  270. package/dist/sdk/developerPortal/index.d.ts +3 -3
  271. package/dist/sdk/developerPortal/index.js +3 -3
  272. package/dist/sdk/queryService/index.cjs +1 -1
  273. package/dist/sdk/queryService/index.d.cts +1 -1
  274. package/dist/sdk/queryService/index.d.ts +1 -1
  275. package/dist/sdk/queryService/index.js +1 -1
  276. package/dist/sdk/semanticLayer/index.cjs +21 -448
  277. package/dist/sdk/semanticLayer/index.d.cts +21 -2
  278. package/dist/sdk/semanticLayer/index.d.ts +21 -2
  279. package/dist/sdk/semanticLayer/index.js +2 -430
  280. package/dist/sdk/semanticLayer/types.d.cts +2 -2
  281. package/dist/sdk/semanticLayer/types.d.ts +2 -2
  282. package/dist/sdk/storage/index.d.cts +1 -1
  283. package/dist/sdk/storage/index.d.ts +1 -1
  284. package/dist/sdk/tag/index.d.cts +2 -2
  285. package/dist/sdk/tag/index.d.ts +2 -2
  286. package/dist/sdk/tag/types.d.cts +1 -1
  287. package/dist/sdk/tag/types.d.ts +1 -1
  288. package/dist/sdk/vault/index.d.cts +1 -1
  289. package/dist/sdk/vault/index.d.ts +1 -1
  290. package/dist/semanticLayer-CSqmtHRo.js +692 -0
  291. package/dist/semanticLayer-CSqmtHRo.js.map +1 -0
  292. package/dist/semanticLayer-E0Vilu8u.cjs +811 -0
  293. package/dist/semanticLayer-E0Vilu8u.cjs.map +1 -0
  294. package/dist/{serviceIds-fHLDwOg9.d.ts → serviceIds-DRcoTnSd.d.cts} +2 -1
  295. package/dist/{serviceIds-fHLDwOg9.d.cts → serviceIds-DRcoTnSd.d.ts} +2 -1
  296. package/dist/status/index.cjs +1 -1
  297. package/dist/status/index.d.cts +1 -1
  298. package/dist/status/index.d.ts +1 -1
  299. package/dist/status/index.js +1 -1
  300. package/dist/storage/index.cjs +6 -5
  301. package/dist/storage/index.d.cts +3 -3
  302. package/dist/storage/index.d.ts +3 -3
  303. package/dist/storage/index.js +6 -6
  304. package/dist/storage/types.d.cts +3 -3
  305. package/dist/storage/types.d.ts +3 -3
  306. package/dist/{storage-DexWot8H.cjs → storage-BKm7cztt.cjs} +6 -6
  307. package/dist/{storage-DexWot8H.cjs.map → storage-BKm7cztt.cjs.map} +1 -1
  308. package/dist/{storage--cVaecFq.js → storage-LYwFQPNO.js} +6 -6
  309. package/dist/{storage--cVaecFq.js.map → storage-LYwFQPNO.js.map} +1 -1
  310. package/dist/stream/index.cjs +3 -3
  311. package/dist/stream/index.d.cts +2 -2
  312. package/dist/stream/index.d.ts +2 -2
  313. package/dist/stream/index.js +3 -3
  314. package/dist/stream/types.d.cts +1 -1
  315. package/dist/stream/types.d.ts +1 -1
  316. package/dist/syncActions/index.cjs +1 -1
  317. package/dist/syncActions/index.d.cts +1 -1
  318. package/dist/syncActions/index.d.ts +1 -1
  319. package/dist/syncActions/index.js +1 -1
  320. package/dist/syncActions/types.d.cts +1 -1
  321. package/dist/syncActions/types.d.ts +1 -1
  322. package/dist/{syncActions-DQq_A9v6.cjs → syncActions-OEZdVffK.cjs} +6 -6
  323. package/dist/{syncActions-DQq_A9v6.cjs.map → syncActions-OEZdVffK.cjs.map} +1 -1
  324. package/dist/{syncActions-CkMHM-jB.js → syncActions-QeBhIVhG.js} +6 -6
  325. package/dist/{syncActions-CkMHM-jB.js.map → syncActions-QeBhIVhG.js.map} +1 -1
  326. package/dist/telemetry/index.cjs +38 -2
  327. package/dist/telemetry/index.cjs.map +1 -0
  328. package/dist/telemetry/index.d.cts +15 -8
  329. package/dist/telemetry/index.d.ts +15 -8
  330. package/dist/telemetry/index.js +37 -1
  331. package/dist/telemetry/index.js.map +1 -0
  332. package/dist/telemetry/types.d.cts +2 -2
  333. package/dist/telemetry/types.d.ts +2 -2
  334. package/dist/{types-Be3Wgn1U.d.cts → types-3eUgOA7I.d.cts} +2 -2
  335. package/dist/{types-bY6K3y0O.d.cts → types-52irAt99.d.cts} +2 -2
  336. package/dist/{types-C2gzqtjf.d.ts → types-B2U9cFcx.d.ts} +2 -2
  337. package/dist/{types-C35GWNmq.d.ts → types-B3GOGUJ7.d.cts} +753 -45
  338. package/dist/{types-B42HhyB0.d.cts → types-BEe50G2r.d.cts} +2 -2
  339. package/dist/{types-6ThDkaJw.d.ts → types-BH5LLeJy.d.ts} +2 -2
  340. package/dist/{types-CxmV36rp.d.cts → types-BMeDOB_D.d.ts} +753 -45
  341. package/dist/{types-CPaluTW7.d.cts → types-BOqD3Hqy.d.cts} +3 -3
  342. package/dist/{types-CHCM9oNk.d.ts → types-BQsOHNI0.d.ts} +3 -3
  343. package/dist/{types-Cu-0LT4f.d.cts → types-BQvv4RaI.d.cts} +2 -2
  344. package/dist/{types-ZGAWRIBW.d.ts → types-BTWIPEiU.d.ts} +2 -2
  345. package/dist/{types-B4_MM5Wf.d.cts → types-BW2BXUB4.d.cts} +2 -2
  346. package/dist/{types-CSc8NQCY.d.ts → types-BrYkBQo4.d.ts} +2 -2
  347. package/dist/{types-D7Wgcp0u.d.ts → types-BsxLGDoC.d.cts} +2 -2
  348. package/dist/{types-CNQdtffE.d.ts → types-BupPADSm.d.ts} +10 -3
  349. package/dist/{types-B7O5koJb.d.cts → types-Bxhh2SJr.d.ts} +2 -2
  350. package/dist/{types-DAzmGzlb.d.ts → types-BztF4HeB.d.ts} +2 -2
  351. package/dist/{types-6ku2LeX6.d.ts → types-C0_2KZ-A.d.ts} +2 -2
  352. package/dist/{types-BUYqdN7B.d.ts → types-C2vefB4D.d.ts} +17 -4
  353. package/dist/{types-6hh_3SZs.d.ts → types-CBgLCkYe.d.ts} +3 -3
  354. package/dist/{types-C_ilZZkQ.d.ts → types-CKiW3n6v.d.ts} +2 -2
  355. package/dist/{types-sO52qIAA.d.cts → types-COL1kVEB.d.cts} +2 -2
  356. package/dist/types-CPB-eF82.d.ts +289 -0
  357. package/dist/{types-Ccgbipp4.d.cts → types-CW6lCqrC.d.cts} +2 -2
  358. package/dist/{types-BS5M67xm.d.cts → types-CaYtinmA.d.cts} +3 -3
  359. package/dist/{types-BHI8Lin9.d.ts → types-CcrvrAJX.d.ts} +2 -2
  360. package/dist/{types-D-98DirB.d.ts → types-Ct0YPy2w.d.ts} +2 -2
  361. package/dist/{types-Jt0ipbSm.d.cts → types-Cz83RiVu.d.cts} +2 -2
  362. package/dist/{types-B6JJCta-.d.cts → types-D8Rrz51O.d.cts} +2 -2
  363. package/dist/{types-3p0adMdd.d.cts → types-DARv_P6O.d.cts} +3 -3
  364. package/dist/{types-Cpjk0-ta.d.ts → types-DBOSvWtD.d.ts} +2 -2
  365. package/dist/{types-C4mr0lop.d.ts → types-DEc55spK.d.ts} +13 -4
  366. package/dist/{types-DqniGeDJ.d.cts → types-DNxOHnZI.d.cts} +2 -2
  367. package/dist/{types-CrH4H8M4.d.cts → types-DPS8nwkV.d.cts} +2 -2
  368. package/dist/{types-DTTC70Ac.d.ts → types-DYzJ6K2e.d.ts} +2 -2
  369. package/dist/{types-CCr1-9Q6.d.cts → types-DZk3XHiN.d.cts} +3 -3
  370. package/dist/{types-DHqIJKwx.d.ts → types-DajzGOKB.d.ts} +2 -2
  371. package/dist/{types-DlvZeert.d.ts → types-DfvdbRPL.d.ts} +2 -2
  372. package/dist/{types-k4R8gQ4U.d.ts → types-DhDNS-5B.d.ts} +21 -3
  373. package/dist/{types-D6ocCyGh.d.cts → types-DjrRmQUe.d.cts} +13 -4
  374. package/dist/{types-B6lOyHY_.d.ts → types-Dmu-8g4O.d.ts} +3 -3
  375. package/dist/{types-BT46XIgn.d.cts → types-DqxIx9Pi.d.cts} +2 -2
  376. package/dist/{types-BO3sCD0a.d.cts → types-Jw10xuOW.d.cts} +2 -2
  377. package/dist/{types-sp1rJY9E.d.cts → types-M46WuBSm.d.cts} +2 -2
  378. package/dist/{types-BOnf68s5.d.cts → types-N3EChotg.d.cts} +2 -2
  379. package/dist/{types-Ur37iOqb.d.ts → types-OaD-cbbl.d.ts} +3 -3
  380. package/dist/{types-DHI0g51U.d.cts → types-_RhBCj4_.d.cts} +2 -2
  381. package/dist/{types-0xa_7cgo.d.cts → types-bGQb4Jtl.d.cts} +21 -3
  382. package/dist/{types-E3VT-zYz.d.cts → types-f8W_j6qD.d.cts} +10 -3
  383. package/dist/{types-DONxb2-c.d.cts → types-fX4gbxfV.d.cts} +17 -4
  384. package/dist/types-g3vU7hcg.d.cts +289 -0
  385. package/dist/{types-BYKHr5bR.d.ts → types-l9o4gFsI.d.ts} +2 -2
  386. package/dist/{types-CaMfshWX.d.ts → types-nrviNdzZ.d.ts} +2 -2
  387. package/dist/{types-BgVKG4vg.d.ts → types-zZBxJ0P-.d.ts} +2 -2
  388. package/dist/{validateConnectionStatus-24zqIQ0p.cjs → validateConnectionStatus-CsvYmCOI.cjs} +5 -4
  389. package/dist/validateConnectionStatus-CsvYmCOI.cjs.map +1 -0
  390. package/dist/{validateConnectionStatus-DhkWg6Eq.js → validateConnectionStatus-olE2sQ3U.js} +5 -4
  391. package/dist/{validateConnectionStatus-DhkWg6Eq.js.map → validateConnectionStatus-olE2sQ3U.js.map} +1 -1
  392. package/dist/vault/index.cjs +4 -4
  393. package/dist/vault/index.d.cts +1 -1
  394. package/dist/vault/index.d.ts +1 -1
  395. package/dist/vault/index.js +4 -4
  396. package/dist/vault/types.d.cts +1 -1
  397. package/dist/vault/types.d.ts +1 -1
  398. package/package.json +29 -3
  399. package/surface/billing.md +9 -0
  400. package/surface/kaiAgent.md +2 -2
  401. package/surface/management.md +13 -3
  402. package/surface/telemetry.md +2 -4
  403. package/dist/ValidationError-CzPWydEb.js.map +0 -1
  404. package/dist/ValidationError-h5qvwahi.cjs.map +0 -1
  405. package/dist/configurations-CqwAxiQL.cjs.map +0 -1
  406. package/dist/configurations-d7SZmw69.js.map +0 -1
  407. package/dist/constants-ByEwVtGf.js.map +0 -1
  408. package/dist/constants-lIfSdTzS.cjs.map +0 -1
  409. package/dist/createFetchClient-DdyZMhxO.js.map +0 -1
  410. package/dist/management-DGfgKsaA.cjs.map +0 -1
  411. package/dist/management-DNEKhR6a.js.map +0 -1
  412. package/dist/sdk/semanticLayer/index.cjs.map +0 -1
  413. package/dist/sdk/semanticLayer/index.js.map +0 -1
  414. package/dist/telemetry-CAu1Qt7B.cjs +0 -29
  415. package/dist/telemetry-CAu1Qt7B.cjs.map +0 -1
  416. package/dist/telemetry-Ca6j0i9w.js +0 -24
  417. package/dist/telemetry-Ca6j0i9w.js.map +0 -1
  418. package/dist/types-lFsTSkhe.d.cts +0 -14
  419. package/dist/types-lFsTSkhe.d.ts +0 -14
  420. package/dist/validateConnectionStatus-24zqIQ0p.cjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"appLogs-D72eD8vP.js","names":["z","record"],"sources":["../src/domain/appLogs.ts"],"sourcesContent":["import dayjs from 'dayjs';\nimport utc from 'dayjs/plugin/utc.js';\nimport * as z from 'zod';\n\nimport {\n type ApiResponse,\n HttpHeader,\n isApiError,\n parseContentDispositionHeader,\n} from '../fetchClient';\nimport { HttpStatus } from '../internal';\nimport { isPlainObject } from '../utils/isPlainObject';\n\n/**\n * Reading a data app's container output. Shared by the two clients wrapping sandboxes-service —\n * `dataScience` (`/v1`) and `apps` (`/v2`) — which serve the same logs under different paths, so the\n * tail contract (how a line is parsed, where the next poll resumes, and that an idle app is not an\n * error) is defined once here rather than per surface.\n */\n\ndayjs.extend(utc);\n\nexport type LogEntry = {\n timestamp: string | null;\n message: string;\n};\n\nconst DEFAULT_LOGS_FILE_NAME = 'logs.txt';\n\nconst ISO_TIMESTAMP_REGEX = /\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z/;\nconst LEADING_ISO_TIMESTAMP_REGEX = /^(\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z)\\s?/;\n\n/** The error envelope sandboxes-service returns; the tail branches on its `code`. */\nconst TailError = z.object({\n context: z.object({\n code: z.string(),\n }),\n});\n\n/**\n * There is nothing to read right now, reported per scope: an app whose serving member is asleep\n * answers `apps.appNotRunning`, a deployment that isn't running answers `apps.deploymentNotRunning` —\n * the normal state of a staged or retired one, since a deployment only runs while it is production.\n */\nconst NOTHING_RUNNING_CODES = new Set(['apps.appNotRunning', 'apps.deploymentNotRunning']);\n\nconst tryParseJsonl = (line: string): LogEntry | null => {\n if (!line.startsWith('{')) return null;\n\n let parsed: unknown;\n try {\n parsed = JSON.parse(line);\n } catch {\n return null;\n }\n\n if (typeof parsed !== 'object' || parsed === null) return null;\n\n const record = parsed as Record<string, unknown>;\n const { timestamp, message } = record;\n\n if (typeof timestamp !== 'string' || typeof message !== 'string') return null;\n\n return {\n timestamp,\n message,\n };\n};\n\nconst parsePlainTextLine = (line: string): LogEntry => {\n const match = line.match(LEADING_ISO_TIMESTAMP_REGEX);\n if (match) {\n return { timestamp: match[1]!, message: line.slice(match[0].length) };\n }\n return { timestamp: null, message: line };\n};\n\nexport const parseLogLine = (line: string): LogEntry =>\n tryParseJsonl(line) ?? parsePlainTextLine(line);\n\nconst toLogEntryFromObject = (raw: Record<string, unknown>): LogEntry | null => {\n if (typeof raw.message !== 'string') return null;\n return {\n timestamp: typeof raw.timestamp === 'string' ? raw.timestamp : null,\n message: raw.message,\n };\n};\n\nexport const parseLogLines = (raw: unknown): LogEntry[] => {\n if (raw === null || raw === undefined || raw === '') return [];\n\n if (Array.isArray(raw)) {\n return raw.flatMap((item) => {\n if (typeof item === 'string') return item === '' ? [] : [parseLogLine(item)];\n if (isPlainObject(item)) {\n const entry = toLogEntryFromObject(item);\n return entry ? [entry] : [];\n }\n return [];\n });\n }\n\n if (isPlainObject(raw)) {\n const entry = toLogEntryFromObject(raw);\n return entry ? [entry] : [];\n }\n\n if (typeof raw !== 'string') return [];\n\n const lines = raw.split('\\n');\n const entries: LogEntry[] = [];\n for (const line of lines) {\n if (line === '') continue;\n entries.push(parseLogLine(line));\n }\n return entries;\n};\n\nexport const lastLogTimestamp = (entries: LogEntry[]) => {\n for (let i = entries.length - 1; i >= 0; i--) {\n const entry = entries[i];\n if (!entry) continue;\n if (entry.timestamp) return entry.timestamp;\n\n // A plain-text line may carry a timestamp embedded mid-line (legacy format).\n const match = entry.message.match(ISO_TIMESTAMP_REGEX);\n if (match) return match[0];\n }\n return null;\n};\n\nconst calculateNextLogTimestamp = (timestamp: string | null) => {\n if (timestamp === null) return null;\n return dayjs(timestamp).utc().add(1, 'second').utc().format();\n};\n\n/**\n * The tail plus the timestamp a follow-up poll resumes from. A {@link NOTHING_RUNNING_CODES} `400`\n * reads as an empty tail rather than an error — an idle app between visits, or a deployment that is\n * not the one currently serving, has no logs to stream and that is its normal condition.\n */\nexport const readAppLogsTail = async (fetchTail: () => Promise<ApiResponse<string>>) => {\n try {\n const { data } = await fetchTail();\n const entries = parseLogLines(data);\n\n return {\n entries,\n nextLogTimestamp: calculateNextLogTimestamp(lastLogTimestamp(entries)),\n };\n } catch (error) {\n if (isApiError(error) && error.response.status === HttpStatus.BAD_REQUEST) {\n const code = TailError.safeParse(error.data).data?.context?.code;\n if (code !== undefined && NOTHING_RUNNING_CODES.has(code)) {\n return { entries: [], nextLogTimestamp: null };\n }\n }\n throw error;\n }\n};\n\n/** The whole log as a file download, named by the service's `Content-Disposition` where it sets one. */\nexport const readAppLogsDownload = async (fetchLogs: () => Promise<ApiResponse<string>>) => {\n const { data, response } = await fetchLogs();\n const contentDisposition = parseContentDispositionHeader(\n response.headers.get(HttpHeader.CONTENT_DISPOSITION),\n );\n\n return {\n logs: data,\n fileName: contentDisposition.filename ?? DEFAULT_LOGS_FILE_NAME,\n };\n};\n"],"mappings":";;;;;;;;;;;;AAoBA,MAAM,OAAO,GAAG;AAOhB,MAAM,yBAAyB;AAE/B,MAAM,sBAAsB;AAC5B,MAAM,8BAA8B;;AAGpC,MAAM,YAAYA,IAAE,OAAO,EACzB,SAASA,IAAE,OAAO,EAChB,MAAMA,IAAE,OAAO,EACjB,CAAC,EACH,CAAC;;;;;;AAOD,MAAM,wCAAwB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AO,cAAkD;CAC1F,MAAM,EAAE,MAAM,aAAa,MAAM,UAAU;CAK3C,OAAO;EACL,MAAM;EACN,UANyB,8BACzB,SAAS,QAAQ,IAAI,WAAW,mBAAmB,CAKxB,CAAC,CAAC,YAAY;CAC3C;AACF"}
1
+ {"version":3,"file":"appLogs-xsVkTriU.js","names":["z","record"],"sources":["../src/domain/appLogs.ts"],"sourcesContent":["import dayjs from 'dayjs';\nimport utc from 'dayjs/plugin/utc.js';\nimport * as z from 'zod';\n\nimport {\n type ApiResponse,\n HttpHeader,\n isApiError,\n parseContentDispositionHeader,\n} from '../fetchClient';\nimport { HttpStatus } from '../internal';\nimport { isPlainObject } from '../utils/isPlainObject';\n\n/**\n * Reading a data app's container output. Shared by the two clients wrapping sandboxes-service —\n * `dataScience` (`/v1`) and `apps` (`/v2`) — which serve the same logs under different paths, so the\n * tail contract (how a line is parsed, where the next poll resumes, and that an idle app is not an\n * error) is defined once here rather than per surface.\n */\n\ndayjs.extend(utc);\n\nexport type LogEntry = {\n timestamp: string | null;\n message: string;\n};\n\nconst DEFAULT_LOGS_FILE_NAME = 'logs.txt';\n\nconst ISO_TIMESTAMP_REGEX = /\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z/;\nconst LEADING_ISO_TIMESTAMP_REGEX = /^(\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z)\\s?/;\n\n/** The error envelope sandboxes-service returns; the tail branches on its `code`. */\nconst TailError = z.object({\n context: z.object({\n code: z.string(),\n }),\n});\n\n/**\n * There is nothing to read right now, reported per scope: an app whose serving member is asleep\n * answers `apps.appNotRunning`, a deployment that isn't running answers `apps.deploymentNotRunning` —\n * the normal state of a staged or retired one, since a deployment only runs while it is production.\n */\nconst NOTHING_RUNNING_CODES = new Set(['apps.appNotRunning', 'apps.deploymentNotRunning']);\n\nconst tryParseJsonl = (line: string): LogEntry | null => {\n if (!line.startsWith('{')) return null;\n\n let parsed: unknown;\n try {\n parsed = JSON.parse(line);\n } catch {\n return null;\n }\n\n if (typeof parsed !== 'object' || parsed === null) return null;\n\n const record = parsed as Record<string, unknown>;\n const { timestamp, message } = record;\n\n if (typeof timestamp !== 'string' || typeof message !== 'string') return null;\n\n return {\n timestamp,\n message,\n };\n};\n\nconst parsePlainTextLine = (line: string): LogEntry => {\n const match = line.match(LEADING_ISO_TIMESTAMP_REGEX);\n if (match) {\n return { timestamp: match[1]!, message: line.slice(match[0].length) };\n }\n return { timestamp: null, message: line };\n};\n\nexport const parseLogLine = (line: string): LogEntry =>\n tryParseJsonl(line) ?? parsePlainTextLine(line);\n\nconst toLogEntryFromObject = (raw: Record<string, unknown>): LogEntry | null => {\n if (typeof raw.message !== 'string') return null;\n return {\n timestamp: typeof raw.timestamp === 'string' ? raw.timestamp : null,\n message: raw.message,\n };\n};\n\nexport const parseLogLines = (raw: unknown): LogEntry[] => {\n if (raw === null || raw === undefined || raw === '') return [];\n\n if (Array.isArray(raw)) {\n return raw.flatMap((item) => {\n if (typeof item === 'string') return item === '' ? [] : [parseLogLine(item)];\n if (isPlainObject(item)) {\n const entry = toLogEntryFromObject(item);\n return entry ? [entry] : [];\n }\n return [];\n });\n }\n\n if (isPlainObject(raw)) {\n const entry = toLogEntryFromObject(raw);\n return entry ? [entry] : [];\n }\n\n if (typeof raw !== 'string') return [];\n\n const lines = raw.split('\\n');\n const entries: LogEntry[] = [];\n for (const line of lines) {\n if (line === '') continue;\n entries.push(parseLogLine(line));\n }\n return entries;\n};\n\nexport const lastLogTimestamp = (entries: LogEntry[]) => {\n for (let i = entries.length - 1; i >= 0; i--) {\n const entry = entries[i];\n if (!entry) continue;\n if (entry.timestamp) return entry.timestamp;\n\n // A plain-text line may carry a timestamp embedded mid-line (legacy format).\n const match = entry.message.match(ISO_TIMESTAMP_REGEX);\n if (match) return match[0];\n }\n return null;\n};\n\nconst calculateNextLogTimestamp = (timestamp: string | null) => {\n if (timestamp === null) return null;\n return dayjs(timestamp).utc().add(1, 'second').utc().format();\n};\n\n/**\n * The tail plus the timestamp a follow-up poll resumes from. A {@link NOTHING_RUNNING_CODES} `400`\n * reads as an empty tail rather than an error — an idle app between visits, or a deployment that is\n * not the one currently serving, has no logs to stream and that is its normal condition.\n */\nexport const readAppLogsTail = async (fetchTail: () => Promise<ApiResponse<string>>) => {\n try {\n const { data } = await fetchTail();\n const entries = parseLogLines(data);\n\n return {\n entries,\n nextLogTimestamp: calculateNextLogTimestamp(lastLogTimestamp(entries)),\n };\n } catch (error) {\n if (isApiError(error) && error.response.status === HttpStatus.BAD_REQUEST) {\n const code = TailError.safeParse(error.data).data?.context?.code;\n if (code !== undefined && NOTHING_RUNNING_CODES.has(code)) {\n return { entries: [], nextLogTimestamp: null };\n }\n }\n throw error;\n }\n};\n\n/** The whole log as a file download, named by the service's `Content-Disposition` where it sets one. */\nexport const readAppLogsDownload = async (fetchLogs: () => Promise<ApiResponse<string>>) => {\n const { data, response } = await fetchLogs();\n const contentDisposition = parseContentDispositionHeader(\n response.headers.get(HttpHeader.CONTENT_DISPOSITION),\n );\n\n return {\n logs: data,\n fileName: contentDisposition.filename ?? DEFAULT_LOGS_FILE_NAME,\n };\n};\n"],"mappings":";;;;;;;;;;;;AAoBA,MAAM,OAAO,GAAG;AAOhB,MAAM,yBAAyB;AAE/B,MAAM,sBAAsB;AAC5B,MAAM,8BAA8B;;AAGpC,MAAM,YAAYA,IAAE,OAAO,EACzB,SAASA,IAAE,OAAO,EAChB,MAAMA,IAAE,OAAO,EACjB,CAAC,EACH,CAAC;;;;;;AAOD,MAAM,wCAAwB,IAAI,IAAI,CAAC,sBAAsB,2BAA2B,CAAC;AAEzF,MAAM,iBAAiB,SAAkC;CACvD,IAAI,CAAC,KAAK,WAAW,GAAG,GAAG,OAAO;CAElC,IAAI;CACJ,IAAI;EACF,SAAS,KAAK,MAAM,IAAI;CAC1B,QAAQ;EACN,OAAO;CACT;CAEA,IAAI,OAAO,WAAW,YAAY,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
2
- const require_createOpenapiFetchClient = require("../createOpenapiFetchClient-C57Ljzi6.cjs");
3
- const require_auth = require("../auth-C2_JLisH.cjs");
4
- const require_appLogs = require("../appLogs-D8K0VeNM.cjs");
2
+ const require_createOpenapiFetchClient = require("../createOpenapiFetchClient-DhUU3M1W.cjs");
3
+ const require_auth = require("../auth-JQ33o3nU.cjs");
4
+ const require_appLogs = require("../appLogs-BjfUoWzs.cjs");
5
5
  //#region src/clients/apps/appsClient.ts
6
6
  /**
7
7
  * `/v2` App Deployments — data apps plus the immutable deployment history behind them. Sibling of
@@ -1,6 +1,6 @@
1
- import { n as ClientInitOptions } from "../types-DHI0g51U.cjs";
2
- import { S as components, b as GetLogsTailQuery, c as CreateCredentialBody, f as CredentialId, g as DeploymentId, l as CreateDeploymentBody, r as AppId, s as CreateAppBody, t as App, v as GetAppRunsQuery, x as RunId, y as GetAppsQuery } from "../types-3p0adMdd.cjs";
3
- import { t as LogEntry } from "../appLogs-Q4A7A_Fc.cjs";
1
+ import { n as ClientInitOptions } from "../types-_RhBCj4_.cjs";
2
+ import { S as components, b as GetLogsTailQuery, c as CreateCredentialBody, f as CredentialId, g as DeploymentId, l as CreateDeploymentBody, r as AppId, s as CreateAppBody, t as App, v as GetAppRunsQuery, x as RunId, y as GetAppsQuery } from "../types-DARv_P6O.cjs";
3
+ import { t as LogEntry } from "../appLogs-D5A13Y0y.cjs";
4
4
  //#region src/clients/apps/appsClient.d.ts
5
5
  /**
6
6
  * No `idempotencyKey`. The service accepted an `Idempotency-Key` that turned a replayed create
@@ -1,6 +1,6 @@
1
- import { n as ClientInitOptions } from "../types-D-98DirB.js";
2
- import { S as components, b as GetLogsTailQuery, c as CreateCredentialBody, f as CredentialId, g as DeploymentId, l as CreateDeploymentBody, r as AppId, s as CreateAppBody, t as App, v as GetAppRunsQuery, x as RunId, y as GetAppsQuery } from "../types-6hh_3SZs.js";
3
- import { t as LogEntry } from "../appLogs-u0XMZLjS.js";
1
+ import { n as ClientInitOptions } from "../types-Ct0YPy2w.js";
2
+ import { S as components, b as GetLogsTailQuery, c as CreateCredentialBody, f as CredentialId, g as DeploymentId, l as CreateDeploymentBody, r as AppId, s as CreateAppBody, t as App, v as GetAppRunsQuery, x as RunId, y as GetAppsQuery } from "../types-CBgLCkYe.js";
3
+ import { t as LogEntry } from "../appLogs-Ch7DYpzx.js";
4
4
  //#region src/clients/apps/appsClient.d.ts
5
5
  /**
6
6
  * No `idempotencyKey`. The service accepted an `Idempotency-Key` that turned a replayed create
@@ -1,6 +1,6 @@
1
- import { t as createOpenapiFetchClient } from "../createOpenapiFetchClient-E7OIVkYv.js";
2
- import { t as createAuthHeaders } from "../auth-CE9rQV3-.js";
3
- import { n as readAppLogsDownload, r as readAppLogsTail } from "../appLogs-D72eD8vP.js";
1
+ import { t as createOpenapiFetchClient } from "../createOpenapiFetchClient-BVSc9ibR.js";
2
+ import { t as createAuthHeaders } from "../auth-aItmDu45.js";
3
+ import { n as readAppLogsDownload, r as readAppLogsTail } from "../appLogs-xsVkTriU.js";
4
4
  //#region src/clients/apps/appsClient.ts
5
5
  /**
6
6
  * `/v2` App Deployments — data apps plus the immutable deployment history behind them. Sibling of
@@ -1,3 +1,3 @@
1
- import { _ as DeploymentRunState, a as AppRun, b as GetLogsTailQuery, c as CreateCredentialBody, d as Credential, f as CredentialId, g as DeploymentId, h as DeploymentBuildState, i as AppPassword, l as CreateDeploymentBody, m as Deployment, n as AppGitRepo, o as AppState, p as CredentialList, r as AppId, s as CreateAppBody, t as App, u as CreatedCredential, v as GetAppRunsQuery, x as RunId, y as GetAppsQuery } from "../types-3p0adMdd.cjs";
2
- import { t as LogEntry } from "../appLogs-Q4A7A_Fc.cjs";
1
+ import { _ as DeploymentRunState, a as AppRun, b as GetLogsTailQuery, c as CreateCredentialBody, d as Credential, f as CredentialId, g as DeploymentId, h as DeploymentBuildState, i as AppPassword, l as CreateDeploymentBody, m as Deployment, n as AppGitRepo, o as AppState, p as CredentialList, r as AppId, s as CreateAppBody, t as App, u as CreatedCredential, v as GetAppRunsQuery, x as RunId, y as GetAppsQuery } from "../types-DARv_P6O.cjs";
2
+ import { t as LogEntry } from "../appLogs-D5A13Y0y.cjs";
3
3
  export { App, AppGitRepo, AppId, AppPassword, AppRun, AppState, CreateAppBody, CreateCredentialBody, CreateDeploymentBody, CreatedCredential, Credential, CredentialId, CredentialList, Deployment, DeploymentBuildState, DeploymentId, DeploymentRunState, GetAppRunsQuery, GetAppsQuery, GetLogsTailQuery, type LogEntry, RunId };
@@ -1,3 +1,3 @@
1
- import { _ as DeploymentRunState, a as AppRun, b as GetLogsTailQuery, c as CreateCredentialBody, d as Credential, f as CredentialId, g as DeploymentId, h as DeploymentBuildState, i as AppPassword, l as CreateDeploymentBody, m as Deployment, n as AppGitRepo, o as AppState, p as CredentialList, r as AppId, s as CreateAppBody, t as App, u as CreatedCredential, v as GetAppRunsQuery, x as RunId, y as GetAppsQuery } from "../types-6hh_3SZs.js";
2
- import { t as LogEntry } from "../appLogs-u0XMZLjS.js";
1
+ import { _ as DeploymentRunState, a as AppRun, b as GetLogsTailQuery, c as CreateCredentialBody, d as Credential, f as CredentialId, g as DeploymentId, h as DeploymentBuildState, i as AppPassword, l as CreateDeploymentBody, m as Deployment, n as AppGitRepo, o as AppState, p as CredentialList, r as AppId, s as CreateAppBody, t as App, u as CreatedCredential, v as GetAppRunsQuery, x as RunId, y as GetAppsQuery } from "../types-CBgLCkYe.js";
2
+ import { t as LogEntry } from "../appLogs-Ch7DYpzx.js";
3
3
  export { App, AppGitRepo, AppId, AppPassword, AppRun, AppState, CreateAppBody, CreateCredentialBody, CreateDeploymentBody, CreatedCredential, Credential, CredentialId, CredentialList, Deployment, DeploymentBuildState, DeploymentId, DeploymentRunState, GetAppRunsQuery, GetAppsQuery, GetLogsTailQuery, type LogEntry, RunId };
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_createGenericFetchClient = require("../createGenericFetchClient-qfCZlCTv.cjs");
2
+ const require_createGenericFetchClient = require("../createGenericFetchClient-o3cPJeRn.cjs");
3
3
  const require_assets_schema = require("./schema.cjs");
4
4
  //#region src/clients/assets/assetsClient.ts
5
5
  const createAssetsClient = ({ baseUrl, middlewares }) => {
@@ -1,4 +1,4 @@
1
- import { n as ClientInitOptions } from "../types-DHI0g51U.cjs";
1
+ import { n as ClientInitOptions } from "../types-_RhBCj4_.cjs";
2
2
  //#region src/clients/assets/assetsClient.d.ts
3
3
  declare const createAssetsClient: ({ baseUrl, middlewares }: Omit<ClientInitOptions, 'auth'>) => {
4
4
  getPublishedChangelogPosts: (signal?: AbortSignal) => Promise<{
@@ -1,4 +1,4 @@
1
- import { n as ClientInitOptions } from "../types-D-98DirB.js";
1
+ import { n as ClientInitOptions } from "../types-Ct0YPy2w.js";
2
2
  //#region src/clients/assets/assetsClient.d.ts
3
3
  declare const createAssetsClient: ({ baseUrl, middlewares }: Omit<ClientInitOptions, 'auth'>) => {
4
4
  getPublishedChangelogPosts: (signal?: AbortSignal) => Promise<{
@@ -1,4 +1,4 @@
1
- import { t as createGenericFetchClient } from "../createGenericFetchClient-MQeLRiNW.js";
1
+ import { t as createGenericFetchClient } from "../createGenericFetchClient-rxvUUbap.js";
2
2
  import { componentTemplatesSchema, publishedPostsSchema } from "./schema.js";
3
3
  //#region src/clients/assets/assetsClient.ts
4
4
  const createAssetsClient = ({ baseUrl, middlewares }) => {
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_authClient = require("../authClient-IwQ9Ti0J.cjs");
2
+ const require_authClient = require("../authClient-_PpvGgZJ.cjs");
3
3
  exports.MFA_METHOD = require_authClient.MFA_METHOD;
4
4
  exports.changeInputSchema = require_authClient.changeInputSchema;
5
5
  exports.createAuthClient = require_authClient.createAuthClient;
@@ -1,2 +1,2 @@
1
- import { C as OidcInput, D as mfaChallengeSchema, E as loginSuccessSchema, O as oidcInputSchema, S as MfaChallenge, T as loginResultSchema, _ as totpVerifyInputSchema, a as ResetInput, b as LoginSuccess, c as resetInputSchema, d as MfaCodeInput, f as MfaMethod, g as mfaWebauthnInputSchema, h as mfaCodeInputSchema, i as ChangePasswordInput, l as resetRequestInputSchema, m as TotpVerifyInput, n as AuthOpenApiFetchClient, o as ResetRequestInput, p as MfaWebauthnInput, r as createAuthClient, s as changeInputSchema, t as AuthClientInitOptions, u as MFA_METHOD, v as LoginInput, w as loginInputSchema, x as LoginUser, y as LoginResult } from "../authClient-DZ_8lvdJ.cjs";
1
+ import { C as OidcInput, D as mfaChallengeSchema, E as loginSuccessSchema, O as oidcInputSchema, S as MfaChallenge, T as loginResultSchema, _ as totpVerifyInputSchema, a as ResetInput, b as LoginSuccess, c as resetInputSchema, d as MfaCodeInput, f as MfaMethod, g as mfaWebauthnInputSchema, h as mfaCodeInputSchema, i as ChangePasswordInput, l as resetRequestInputSchema, m as TotpVerifyInput, n as AuthOpenApiFetchClient, o as ResetRequestInput, p as MfaWebauthnInput, r as createAuthClient, s as changeInputSchema, t as AuthClientInitOptions, u as MFA_METHOD, v as LoginInput, w as loginInputSchema, x as LoginUser, y as LoginResult } from "../authClient-CTHNs6Tq.cjs";
2
2
  export { AuthClientInitOptions, AuthOpenApiFetchClient, ChangePasswordInput, LoginInput, LoginResult, LoginSuccess, LoginUser, MFA_METHOD, MfaChallenge, MfaCodeInput, MfaMethod, MfaWebauthnInput, OidcInput, ResetInput, ResetRequestInput, TotpVerifyInput, changeInputSchema, createAuthClient, loginInputSchema, loginResultSchema, loginSuccessSchema, mfaChallengeSchema, mfaCodeInputSchema, mfaWebauthnInputSchema, oidcInputSchema, resetInputSchema, resetRequestInputSchema, totpVerifyInputSchema };
@@ -1,2 +1,2 @@
1
- import { C as OidcInput, D as mfaChallengeSchema, E as loginSuccessSchema, O as oidcInputSchema, S as MfaChallenge, T as loginResultSchema, _ as totpVerifyInputSchema, a as ResetInput, b as LoginSuccess, c as resetInputSchema, d as MfaCodeInput, f as MfaMethod, g as mfaWebauthnInputSchema, h as mfaCodeInputSchema, i as ChangePasswordInput, l as resetRequestInputSchema, m as TotpVerifyInput, n as AuthOpenApiFetchClient, o as ResetRequestInput, p as MfaWebauthnInput, r as createAuthClient, s as changeInputSchema, t as AuthClientInitOptions, u as MFA_METHOD, v as LoginInput, w as loginInputSchema, x as LoginUser, y as LoginResult } from "../authClient-DwT6xdg5.js";
1
+ import { C as OidcInput, D as mfaChallengeSchema, E as loginSuccessSchema, O as oidcInputSchema, S as MfaChallenge, T as loginResultSchema, _ as totpVerifyInputSchema, a as ResetInput, b as LoginSuccess, c as resetInputSchema, d as MfaCodeInput, f as MfaMethod, g as mfaWebauthnInputSchema, h as mfaCodeInputSchema, i as ChangePasswordInput, l as resetRequestInputSchema, m as TotpVerifyInput, n as AuthOpenApiFetchClient, o as ResetRequestInput, p as MfaWebauthnInput, r as createAuthClient, s as changeInputSchema, t as AuthClientInitOptions, u as MFA_METHOD, v as LoginInput, w as loginInputSchema, x as LoginUser, y as LoginResult } from "../authClient-D8i3JTM-.js";
2
2
  export { AuthClientInitOptions, AuthOpenApiFetchClient, ChangePasswordInput, LoginInput, LoginResult, LoginSuccess, LoginUser, MFA_METHOD, MfaChallenge, MfaCodeInput, MfaMethod, MfaWebauthnInput, OidcInput, ResetInput, ResetRequestInput, TotpVerifyInput, changeInputSchema, createAuthClient, loginInputSchema, loginResultSchema, loginSuccessSchema, mfaChallengeSchema, mfaCodeInputSchema, mfaWebauthnInputSchema, oidcInputSchema, resetInputSchema, resetRequestInputSchema, totpVerifyInputSchema };
@@ -1,2 +1,2 @@
1
- import { a as MFA_METHOD, c as totpVerifyInputSchema, d as loginSuccessSchema, f as mfaChallengeSchema, i as resetRequestInputSchema, l as loginInputSchema, n as changeInputSchema, o as mfaCodeInputSchema, p as oidcInputSchema, r as resetInputSchema, s as mfaWebauthnInputSchema, t as createAuthClient, u as loginResultSchema } from "../authClient-DEyqR7GW.js";
1
+ import { a as MFA_METHOD, c as totpVerifyInputSchema, d as loginSuccessSchema, f as mfaChallengeSchema, i as resetRequestInputSchema, l as loginInputSchema, n as changeInputSchema, o as mfaCodeInputSchema, p as oidcInputSchema, r as resetInputSchema, s as mfaWebauthnInputSchema, t as createAuthClient, u as loginResultSchema } from "../authClient-D7W9vWPR.js";
2
2
  export { MFA_METHOD, changeInputSchema, createAuthClient, loginInputSchema, loginResultSchema, loginSuccessSchema, mfaChallengeSchema, mfaCodeInputSchema, mfaWebauthnInputSchema, oidcInputSchema, resetInputSchema, resetRequestInputSchema, totpVerifyInputSchema };
@@ -1,2 +1,2 @@
1
- import { A as DisableTotpPath, B as CreateDeviceAuthorizationResult, C as CreatePatInput, D as ListPatsResult, E as ExchangePatInput, F as VerifyMfaResult, H as GetDeviceAuthorizationTokenResult, I as LoginBody, L as ApproveDeviceAuthorizationBody, M as TotpSetupResult, N as TotpVerifyResult, O as PatScopeInput, P as VerifyMfaBody, R as ApproveDeviceAuthorizationResult, S as CreatePatBodyRaw, T as ExchangePatBodyRaw, V as GetDeviceAuthorizationTokenBody, _ as AssertSamlResult, a as RemoveWebauthnInput, b as GetPkceTokenBody, c as IntrospectTokenResult, d as SudoBody, f as SudoBodyRaw, g as AssertSamlBody, h as RevokeSessionPath, i as RegisterWebauthnResult, j as RegenerateRecoveryCodesResult, k as RevokePatPath, l as RefreshTokenResult, m as SudoResult, n as RegisterWebauthnInput, o as RemoveWebauthnPath, p as SudoChallengeResult, r as RegisterWebauthnOptionsResult, s as RemoveWebauthnQuery, t as ListWebauthnCredentialsResult, u as RevokeTokenBody, v as InitiateSamlBody, w as CreatePatResult, x as GetPkceTokenResult, y as InitiateSamlResult, z as CreateDeviceAuthorizationBody } from "../types-BO3sCD0a.cjs";
1
+ import { A as DisableTotpPath, B as CreateDeviceAuthorizationResult, C as CreatePatInput, D as ListPatsResult, E as ExchangePatInput, F as VerifyMfaResult, H as GetDeviceAuthorizationTokenResult, I as LoginBody, L as ApproveDeviceAuthorizationBody, M as TotpSetupResult, N as TotpVerifyResult, O as PatScopeInput, P as VerifyMfaBody, R as ApproveDeviceAuthorizationResult, S as CreatePatBodyRaw, T as ExchangePatBodyRaw, V as GetDeviceAuthorizationTokenBody, _ as AssertSamlResult, a as RemoveWebauthnInput, b as GetPkceTokenBody, c as IntrospectTokenResult, d as SudoBody, f as SudoBodyRaw, g as AssertSamlBody, h as RevokeSessionPath, i as RegisterWebauthnResult, j as RegenerateRecoveryCodesResult, k as RevokePatPath, l as RefreshTokenResult, m as SudoResult, n as RegisterWebauthnInput, o as RemoveWebauthnPath, p as SudoChallengeResult, r as RegisterWebauthnOptionsResult, s as RemoveWebauthnQuery, t as ListWebauthnCredentialsResult, u as RevokeTokenBody, v as InitiateSamlBody, w as CreatePatResult, x as GetPkceTokenResult, y as InitiateSamlResult, z as CreateDeviceAuthorizationBody } from "../types-Jw10xuOW.cjs";
2
2
  export { ApproveDeviceAuthorizationBody, ApproveDeviceAuthorizationResult, AssertSamlBody, AssertSamlResult, CreateDeviceAuthorizationBody, CreateDeviceAuthorizationResult, CreatePatBodyRaw, CreatePatInput, CreatePatResult, DisableTotpPath, ExchangePatBodyRaw, ExchangePatInput, GetDeviceAuthorizationTokenBody, GetDeviceAuthorizationTokenResult, GetPkceTokenBody, GetPkceTokenResult, InitiateSamlBody, InitiateSamlResult, IntrospectTokenResult, ListPatsResult, ListWebauthnCredentialsResult, LoginBody, PatScopeInput, RefreshTokenResult, RegenerateRecoveryCodesResult, RegisterWebauthnInput, RegisterWebauthnOptionsResult, RegisterWebauthnResult, RemoveWebauthnInput, RemoveWebauthnPath, RemoveWebauthnQuery, RevokePatPath, RevokeSessionPath, RevokeTokenBody, SudoBody, SudoBodyRaw, SudoChallengeResult, SudoResult, TotpSetupResult, TotpVerifyResult, VerifyMfaBody, VerifyMfaResult };
@@ -1,2 +1,2 @@
1
- import { A as DisableTotpPath, B as CreateDeviceAuthorizationResult, C as CreatePatInput, D as ListPatsResult, E as ExchangePatInput, F as VerifyMfaResult, H as GetDeviceAuthorizationTokenResult, I as LoginBody, L as ApproveDeviceAuthorizationBody, M as TotpSetupResult, N as TotpVerifyResult, O as PatScopeInput, P as VerifyMfaBody, R as ApproveDeviceAuthorizationResult, S as CreatePatBodyRaw, T as ExchangePatBodyRaw, V as GetDeviceAuthorizationTokenBody, _ as AssertSamlResult, a as RemoveWebauthnInput, b as GetPkceTokenBody, c as IntrospectTokenResult, d as SudoBody, f as SudoBodyRaw, g as AssertSamlBody, h as RevokeSessionPath, i as RegisterWebauthnResult, j as RegenerateRecoveryCodesResult, k as RevokePatPath, l as RefreshTokenResult, m as SudoResult, n as RegisterWebauthnInput, o as RemoveWebauthnPath, p as SudoChallengeResult, r as RegisterWebauthnOptionsResult, s as RemoveWebauthnQuery, t as ListWebauthnCredentialsResult, u as RevokeTokenBody, v as InitiateSamlBody, w as CreatePatResult, x as GetPkceTokenResult, y as InitiateSamlResult, z as CreateDeviceAuthorizationBody } from "../types-CSc8NQCY.js";
1
+ import { A as DisableTotpPath, B as CreateDeviceAuthorizationResult, C as CreatePatInput, D as ListPatsResult, E as ExchangePatInput, F as VerifyMfaResult, H as GetDeviceAuthorizationTokenResult, I as LoginBody, L as ApproveDeviceAuthorizationBody, M as TotpSetupResult, N as TotpVerifyResult, O as PatScopeInput, P as VerifyMfaBody, R as ApproveDeviceAuthorizationResult, S as CreatePatBodyRaw, T as ExchangePatBodyRaw, V as GetDeviceAuthorizationTokenBody, _ as AssertSamlResult, a as RemoveWebauthnInput, b as GetPkceTokenBody, c as IntrospectTokenResult, d as SudoBody, f as SudoBodyRaw, g as AssertSamlBody, h as RevokeSessionPath, i as RegisterWebauthnResult, j as RegenerateRecoveryCodesResult, k as RevokePatPath, l as RefreshTokenResult, m as SudoResult, n as RegisterWebauthnInput, o as RemoveWebauthnPath, p as SudoChallengeResult, r as RegisterWebauthnOptionsResult, s as RemoveWebauthnQuery, t as ListWebauthnCredentialsResult, u as RevokeTokenBody, v as InitiateSamlBody, w as CreatePatResult, x as GetPkceTokenResult, y as InitiateSamlResult, z as CreateDeviceAuthorizationBody } from "../types-BrYkBQo4.js";
2
2
  export { ApproveDeviceAuthorizationBody, ApproveDeviceAuthorizationResult, AssertSamlBody, AssertSamlResult, CreateDeviceAuthorizationBody, CreateDeviceAuthorizationResult, CreatePatBodyRaw, CreatePatInput, CreatePatResult, DisableTotpPath, ExchangePatBodyRaw, ExchangePatInput, GetDeviceAuthorizationTokenBody, GetDeviceAuthorizationTokenResult, GetPkceTokenBody, GetPkceTokenResult, InitiateSamlBody, InitiateSamlResult, IntrospectTokenResult, ListPatsResult, ListWebauthnCredentialsResult, LoginBody, PatScopeInput, RefreshTokenResult, RegenerateRecoveryCodesResult, RegisterWebauthnInput, RegisterWebauthnOptionsResult, RegisterWebauthnResult, RemoveWebauthnInput, RemoveWebauthnPath, RemoveWebauthnQuery, RevokePatPath, RevokeSessionPath, RevokeTokenBody, SudoBody, SudoBodyRaw, SudoChallengeResult, SudoResult, TotpSetupResult, TotpVerifyResult, VerifyMfaBody, VerifyMfaResult };
@@ -1,4 +1,4 @@
1
- const require_createFetchClient = require("./createFetchClient-DvZvD31l.cjs");
1
+ const require_createFetchClient = require("./createFetchClient-DgMiqTJ8.cjs");
2
2
  //#region src/clients/auth.ts
3
3
  const createAuthHeaders = (auth) => {
4
4
  if (auth.type === "sapi-token") return { [require_createFetchClient.KeboolaHttpHeader.STORAGE_API_TOKEN]: auth.token };
@@ -15,4 +15,4 @@ Object.defineProperty(exports, "createAuthHeaders", {
15
15
  }
16
16
  });
17
17
 
18
- //# sourceMappingURL=auth-C2_JLisH.cjs.map
18
+ //# sourceMappingURL=auth-JQ33o3nU.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"auth-C2_JLisH.cjs","names":["KeboolaHttpHeader","HttpHeader"],"sources":["../src/clients/auth.ts"],"sourcesContent":["import { HttpHeader } from '../fetchClient';\nimport { KeboolaHttpHeader } from '../internal';\n\nexport type AuthStrategy =\n | {\n type: 'sapi-token';\n token: string;\n }\n | {\n type: 'bearer';\n token: string;\n projectId: number;\n };\n\nexport const createAuthHeaders = (auth: AuthStrategy): Record<string, string> => {\n if (auth.type === 'sapi-token') return { [KeboolaHttpHeader.STORAGE_API_TOKEN]: auth.token };\n\n // `auth.token` is the bare token; the `Bearer ` wire prefix is added here (mirroring the\n // management client). In the browser bearer flow the bearer auth middleware stamps the\n // Authorization header on every request, so this value only matters for middleware-less\n // clients (e.g. kai-agent's storage token verification).\n return {\n [HttpHeader.AUTHORIZATION]: `Bearer ${auth.token}`,\n [KeboolaHttpHeader.PROJECT_ID]: auth.projectId.toString(),\n };\n};\n"],"mappings":";;AAcA,MAAa,qBAAqB,SAA+C;CAC/E,IAAI,KAAK,SAAS,cAAc,OAAO,GAAGA,0BAAAA,kBAAkB,oBAAoB,KAAK,MAAM;CAM3F,OAAO;GACJC,0BAAAA,WAAW,gBAAgB,UAAU,KAAK;GAC1CD,0BAAAA,kBAAkB,aAAa,KAAK,UAAU,SAAS;CAC1D;AACF"}
1
+ {"version":3,"file":"auth-JQ33o3nU.cjs","names":["KeboolaHttpHeader","HttpHeader"],"sources":["../src/clients/auth.ts"],"sourcesContent":["import { HttpHeader } from '../fetchClient';\nimport { KeboolaHttpHeader } from '../internal';\n\nexport type AuthStrategy =\n | {\n type: 'sapi-token';\n token: string;\n }\n | {\n type: 'bearer';\n token: string;\n projectId: number;\n };\n\nexport const createAuthHeaders = (auth: AuthStrategy): Record<string, string> => {\n if (auth.type === 'sapi-token') return { [KeboolaHttpHeader.STORAGE_API_TOKEN]: auth.token };\n\n // `auth.token` is the bare token; the `Bearer ` wire prefix is added here (mirroring the\n // management client). In the browser bearer flow the bearer auth middleware stamps the\n // Authorization header on every request, so this value only matters for middleware-less\n // clients (e.g. kai-agent's storage token verification).\n return {\n [HttpHeader.AUTHORIZATION]: `Bearer ${auth.token}`,\n [KeboolaHttpHeader.PROJECT_ID]: auth.projectId.toString(),\n };\n};\n"],"mappings":";;AAcA,MAAa,qBAAqB,SAA+C;CAC/E,IAAI,KAAK,SAAS,cAAc,OAAO,GAAGA,0BAAAA,kBAAkB,oBAAoB,KAAK,MAAM;CAM3F,OAAO;GACJC,0BAAAA,WAAW,gBAAgB,UAAU,KAAK;GAC1CD,0BAAAA,kBAAkB,aAAa,KAAK,UAAU,SAAS;CAC1D;AACF"}
@@ -1,4 +1,4 @@
1
- import { m as KeboolaHttpHeader, s as HttpHeader } from "./createFetchClient-DdyZMhxO.js";
1
+ import { h as KeboolaHttpHeader, s as HttpHeader } from "./createFetchClient-U-ZrwPl2.js";
2
2
  //#region src/clients/auth.ts
3
3
  const createAuthHeaders = (auth) => {
4
4
  if (auth.type === "sapi-token") return { [KeboolaHttpHeader.STORAGE_API_TOKEN]: auth.token };
@@ -10,4 +10,4 @@ const createAuthHeaders = (auth) => {
10
10
  //#endregion
11
11
  export { createAuthHeaders as t };
12
12
 
13
- //# sourceMappingURL=auth-CE9rQV3-.js.map
13
+ //# sourceMappingURL=auth-aItmDu45.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"auth-CE9rQV3-.js","names":[],"sources":["../src/clients/auth.ts"],"sourcesContent":["import { HttpHeader } from '../fetchClient';\nimport { KeboolaHttpHeader } from '../internal';\n\nexport type AuthStrategy =\n | {\n type: 'sapi-token';\n token: string;\n }\n | {\n type: 'bearer';\n token: string;\n projectId: number;\n };\n\nexport const createAuthHeaders = (auth: AuthStrategy): Record<string, string> => {\n if (auth.type === 'sapi-token') return { [KeboolaHttpHeader.STORAGE_API_TOKEN]: auth.token };\n\n // `auth.token` is the bare token; the `Bearer ` wire prefix is added here (mirroring the\n // management client). In the browser bearer flow the bearer auth middleware stamps the\n // Authorization header on every request, so this value only matters for middleware-less\n // clients (e.g. kai-agent's storage token verification).\n return {\n [HttpHeader.AUTHORIZATION]: `Bearer ${auth.token}`,\n [KeboolaHttpHeader.PROJECT_ID]: auth.projectId.toString(),\n };\n};\n"],"mappings":";;AAcA,MAAa,qBAAqB,SAA+C;CAC/E,IAAI,KAAK,SAAS,cAAc,OAAO,GAAG,kBAAkB,oBAAoB,KAAK,MAAM;CAM3F,OAAO;GACJ,WAAW,gBAAgB,UAAU,KAAK;GAC1C,kBAAkB,aAAa,KAAK,UAAU,SAAS;CAC1D;AACF"}
1
+ {"version":3,"file":"auth-aItmDu45.js","names":[],"sources":["../src/clients/auth.ts"],"sourcesContent":["import { HttpHeader } from '../fetchClient';\nimport { KeboolaHttpHeader } from '../internal';\n\nexport type AuthStrategy =\n | {\n type: 'sapi-token';\n token: string;\n }\n | {\n type: 'bearer';\n token: string;\n projectId: number;\n };\n\nexport const createAuthHeaders = (auth: AuthStrategy): Record<string, string> => {\n if (auth.type === 'sapi-token') return { [KeboolaHttpHeader.STORAGE_API_TOKEN]: auth.token };\n\n // `auth.token` is the bare token; the `Bearer ` wire prefix is added here (mirroring the\n // management client). In the browser bearer flow the bearer auth middleware stamps the\n // Authorization header on every request, so this value only matters for middleware-less\n // clients (e.g. kai-agent's storage token verification).\n return {\n [HttpHeader.AUTHORIZATION]: `Bearer ${auth.token}`,\n [KeboolaHttpHeader.PROJECT_ID]: auth.projectId.toString(),\n };\n};\n"],"mappings":";;AAcA,MAAa,qBAAqB,SAA+C;CAC/E,IAAI,KAAK,SAAS,cAAc,OAAO,GAAG,kBAAkB,oBAAoB,KAAK,MAAM;CAM3F,OAAO;GACJ,WAAW,gBAAgB,UAAU,KAAK;GAC1C,kBAAkB,aAAa,KAAK,UAAU,SAAS;CAC1D;AACF"}
@@ -1,6 +1,6 @@
1
- import { t as createOpenapiFetchClient } from "./index-DhVFuQDv.cjs";
2
- import { n as ClientInitOptions } from "./types-DHI0g51U.cjs";
3
- import { A as DisableTotpPath, C as CreatePatInput, E as ExchangePatInput, L as ApproveDeviceAuthorizationBody, U as components, V as GetDeviceAuthorizationTokenBody, W as paths, a as RemoveWebauthnInput, b as GetPkceTokenBody, d as SudoBody, g as AssertSamlBody, h as RevokeSessionPath, k as RevokePatPath, n as RegisterWebauthnInput, r as RegisterWebauthnOptionsResult, u as RevokeTokenBody, v as InitiateSamlBody, z as CreateDeviceAuthorizationBody } from "./types-BO3sCD0a.cjs";
1
+ import { t as createOpenapiFetchClient } from "./index-V7XKUQm9.cjs";
2
+ import { n as ClientInitOptions } from "./types-_RhBCj4_.cjs";
3
+ import { A as DisableTotpPath, C as CreatePatInput, E as ExchangePatInput, L as ApproveDeviceAuthorizationBody, U as components, V as GetDeviceAuthorizationTokenBody, W as paths, a as RemoveWebauthnInput, b as GetPkceTokenBody, d as SudoBody, g as AssertSamlBody, h as RevokeSessionPath, k as RevokePatPath, n as RegisterWebauthnInput, r as RegisterWebauthnOptionsResult, u as RevokeTokenBody, v as InitiateSamlBody, z as CreateDeviceAuthorizationBody } from "./types-Jw10xuOW.cjs";
4
4
  import * as z$1 from "zod";
5
5
  //#region src/clients/auth/login/schemas.d.ts
6
6
  declare const loginInputSchema: z$1.ZodObject<{
@@ -364,4 +364,4 @@ declare const createAuthClient: ({ baseUrl, middlewares }: AuthClientInitOptions
364
364
  };
365
365
  //#endregion
366
366
  export { OidcInput as C, mfaChallengeSchema as D, loginSuccessSchema as E, oidcInputSchema as O, MfaChallenge as S, loginResultSchema as T, totpVerifyInputSchema as _, ResetInput as a, LoginSuccess as b, resetInputSchema as c, MfaCodeInput as d, MfaMethod as f, mfaWebauthnInputSchema as g, mfaCodeInputSchema as h, ChangePasswordInput as i, resetRequestInputSchema as l, TotpVerifyInput as m, AuthOpenApiFetchClient as n, ResetRequestInput as o, MfaWebauthnInput as p, createAuthClient as r, changeInputSchema as s, AuthClientInitOptions as t, MFA_METHOD as u, LoginInput as v, loginInputSchema as w, LoginUser as x, LoginResult as y };
367
- //# sourceMappingURL=authClient-DZ_8lvdJ.d.cts.map
367
+ //# sourceMappingURL=authClient-CTHNs6Tq.d.cts.map
@@ -1,7 +1,7 @@
1
- import { s as HttpHeader } from "./createFetchClient-DdyZMhxO.js";
2
- import { t as validateConnectionStatus } from "./validateConnectionStatus-DhkWg6Eq.js";
3
- import { t as createGenericFetchClient } from "./createGenericFetchClient-MQeLRiNW.js";
4
- import { t as createOpenapiFetchClient } from "./createOpenapiFetchClient-E7OIVkYv.js";
1
+ import { s as HttpHeader } from "./createFetchClient-U-ZrwPl2.js";
2
+ import { t as validateConnectionStatus } from "./validateConnectionStatus-olE2sQ3U.js";
3
+ import { t as createGenericFetchClient } from "./createGenericFetchClient-rxvUUbap.js";
4
+ import { t as createOpenapiFetchClient } from "./createOpenapiFetchClient-BVSc9ibR.js";
5
5
  import * as z$1 from "zod";
6
6
  //#region src/clients/auth/device/device.ts
7
7
  const createDevice = (client) => {
@@ -428,4 +428,4 @@ const createAuthClient = ({ baseUrl, middlewares }) => {
428
428
  //#endregion
429
429
  export { MFA_METHOD as a, totpVerifyInputSchema as c, loginSuccessSchema as d, mfaChallengeSchema as f, resetRequestInputSchema as i, loginInputSchema as l, changeInputSchema as n, mfaCodeInputSchema as o, oidcInputSchema as p, resetInputSchema as r, mfaWebauthnInputSchema as s, createAuthClient as t, loginResultSchema as u };
430
430
 
431
- //# sourceMappingURL=authClient-DEyqR7GW.js.map
431
+ //# sourceMappingURL=authClient-D7W9vWPR.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"authClient-DEyqR7GW.js","names":["z","z","z"],"sources":["../src/clients/auth/device/device.ts","../src/clients/auth/login/schemas.ts","../src/clients/auth/login/login.ts","../src/clients/auth/mfa/schemas.ts","../src/clients/auth/mfa/mfa.ts","../src/clients/auth/password/schemas.ts","../src/clients/auth/password/password.ts","../src/clients/auth/pat/pat.ts","../src/clients/auth/pkce/pkce.ts","../src/clients/auth/saml/saml.ts","../src/clients/auth/session/session.ts","../src/clients/auth/sudo/sudo.ts","../src/clients/auth/token/token.ts","../src/clients/auth/webauthn/webauthn.ts","../src/clients/auth/authClient.ts"],"sourcesContent":["import type { AuthOpenApiFetchClient } from '../authClient';\n\nimport type {\n ApproveDeviceAuthorizationBody,\n CreateDeviceAuthorizationBody,\n GetDeviceAuthorizationTokenBody,\n} from './types';\n\nexport const createDevice = (client: AuthOpenApiFetchClient) => {\n const create = async (body: CreateDeviceAuthorizationBody, signal?: AbortSignal) => {\n const { data } = await client.post('/v1/auth/device', { body }, { signal });\n return data;\n };\n\n const approve = async (body: ApproveDeviceAuthorizationBody, signal?: AbortSignal) => {\n const { data } = await client.post('/v1/auth/device/approve', { body }, { signal });\n return data;\n };\n\n const getToken = async (body: GetDeviceAuthorizationTokenBody, signal?: AbortSignal) => {\n const { data } = await client.post('/v1/auth/device/token', { body }, { signal });\n return data;\n };\n\n return { create, approve, getToken };\n};\n","import * as z from 'zod';\n\nexport const loginInputSchema = z.object({\n email: z.email(),\n password: z.string().min(1, 'Required'),\n});\n\nexport const oidcInputSchema = z.object({\n grantType: z.enum(['google', 'microsoft']),\n idToken: z.string().min(1, 'Required'),\n});\n\nexport type LoginInput = z.infer<typeof loginInputSchema>;\nexport type OidcInput = z.infer<typeof oidcInputSchema>;\n\nconst userSchema = z.object({\n id: z.number(),\n email: z.string(),\n name: z.string(),\n});\n\n// Success shape. The backend omits `mfaRequired` here, so we inject a `false`\n// literal to make the outcome a discriminated union on `mfaRequired`.\nexport const loginSuccessSchema = z.object({\n mfaRequired: z.literal(false).default(false),\n accessToken: z.string(),\n refreshToken: z.string(),\n tokenType: z.string(),\n expiresIn: z.number(),\n sessionId: z.string(),\n user: userSchema,\n});\n\n/**\n * MFA-challenge shape. `mfaRequired` is always true here — it is the discriminant.\n *\n * - `mfaType` is the account's single active factor, `allowedMethods` everything that may satisfy\n * it. Both stay `string`: a stack that grows a method must not fail to parse, so callers branch\n * and handle the unknown case themselves.\n * - `webauthn` carries the serialized `PublicKeyCredentialRequestOptionsJSON` for a passkey\n * challenge, inlined so the ceremony costs no extra round-trip. The spec declares it\n * required-and-nullable while the serializer omits the key outright for TOTP, so it must tolerate\n * present, `null` and absent alike.\n * - `unknown`, not a record: this sits inside the union `login` hard-parses, so a shape nobody\n * expected here would fail *both* branches and lock every MFA user out of sign-in — not merely\n * out of the passkey path. Whoever runs the ceremony validates it properly instead.\n */\nexport const mfaChallengeSchema = z.object({\n mfaRequired: z.literal(true),\n mfaType: z.string(),\n mfaToken: z.string(),\n expiresIn: z.number(),\n allowedMethods: z.array(z.string()),\n // `.optional()` explicitly: zod 4 dropped zod 3's implicit optionality for `z.unknown()`, so\n // without it a TOTP challenge — which omits the key — fails to parse and blocks sign-in.\n webauthn: z.unknown().optional(),\n});\n\nexport const loginResultSchema = z.union([loginSuccessSchema, mfaChallengeSchema]);\n\nexport type LoginUser = z.infer<typeof userSchema>;\nexport type LoginSuccess = z.infer<typeof loginSuccessSchema>;\nexport type MfaChallenge = z.infer<typeof mfaChallengeSchema>;\nexport type LoginResult = z.infer<typeof loginResultSchema>;\n","import type { AuthOpenApiFetchClient } from '../authClient';\n\nimport type { LoginInput, OidcInput } from './schemas';\nimport { loginInputSchema, loginResultSchema, oidcInputSchema } from './schemas';\nimport type { LoginBody } from './types';\n\nexport const createLogin = (client: AuthOpenApiFetchClient) => {\n const _login = async (body: LoginBody, signal?: AbortSignal) => {\n const { data } = await client.post('/v1/auth/login', { body }, { signal });\n return data;\n };\n\n const withPassword = async (input: LoginInput, signal?: AbortSignal) => {\n const { email, password } = loginInputSchema.parse(input);\n // Cast: omit fields outside the grant — the backend rejects null.\n const data = await _login({ grantType: 'password', email, password } as LoginBody, signal);\n // Validate against our own schema — the generated response type is unreliable,\n // and this narrows the outcome to a discriminated union on `mfaRequired`.\n return loginResultSchema.parse(data);\n };\n\n const withOidc = async (input: OidcInput, signal?: AbortSignal) => {\n const { grantType, idToken } = oidcInputSchema.parse(input);\n // Cast: omit fields outside the grant — the backend rejects null.\n const data = await _login({ grantType, idToken } as LoginBody, signal);\n return loginResultSchema.parse(data);\n };\n\n // Unauthenticated. Carries the public OAuth client ids `withOidc` callers mint an id token with.\n const methods = async (signal?: AbortSignal) => {\n const { data } = await client.get('/v1/auth/methods', {}, { signal });\n return data;\n };\n\n return { withPassword, withOidc, methods };\n};\n","import * as z from 'zod';\n\nimport type { components } from '../__generated__/schema';\n\n/**\n * The methods `POST /v1/auth/mfa` accepts, and the vocabulary a login challenge reports in\n * `mfaType` / `allowedMethods`.\n *\n * - `totp` and `recoveryCode` are verified by a typed code; `webauthn` by an assertion.\n * - `satisfies` binds the values to the generated spec, so a regenerated schema that renames or\n * drops a method fails the build here rather than at runtime mid-sign-in.\n * - A challenge may still name a method absent from here, so the wire fields stay `string`.\n */\nexport const MFA_METHOD = {\n totp: 'totp',\n webauthn: 'webauthn',\n recoveryCode: 'recovery_code',\n} as const satisfies Record<string, components['schemas']['MfaRequest']['type']>;\n\nexport type MfaMethod = (typeof MFA_METHOD)[keyof typeof MFA_METHOD];\n\nexport const mfaCodeInputSchema = z.object({\n mfaToken: z.string(),\n type: z.enum([MFA_METHOD.totp, MFA_METHOD.recoveryCode]),\n code: z.string().min(1, 'Required'),\n});\n\nexport const mfaWebauthnInputSchema = z.object({\n mfaToken: z.string(),\n assertion: z.string(),\n});\n\nexport const totpVerifyInputSchema = z.object({\n code: z.string().min(1, 'Required'),\n // Optional in the spec, but `openapi-typescript` emits every `default`-bearing property as\n // required — the schema fills in the backend's own default so callers may still omit it. Set true\n // to sign the admin out everywhere else as part of enrolling.\n revokeOtherSessions: z.boolean().default(false),\n});\n\nexport type MfaCodeInput = z.infer<typeof mfaCodeInputSchema>;\nexport type MfaWebauthnInput = z.infer<typeof mfaWebauthnInputSchema>;\n// `z.input`: callers may omit `revokeOtherSessions` (the default fills it in on parse).\nexport type TotpVerifyInput = z.input<typeof totpVerifyInputSchema>;\n","import type { AuthOpenApiFetchClient } from '../authClient';\n\nimport type { MfaCodeInput, MfaWebauthnInput, TotpVerifyInput } from './schemas';\nimport {\n MFA_METHOD,\n mfaCodeInputSchema,\n mfaWebauthnInputSchema,\n totpVerifyInputSchema,\n} from './schemas';\nimport type { DisableTotpPath, VerifyMfaBody } from './types';\n\nexport const createMfa = (client: AuthOpenApiFetchClient) => {\n const _verify = async (body: VerifyMfaBody, signal?: AbortSignal) => {\n const { data } = await client.post('/v1/auth/mfa', { body }, { signal });\n return data;\n };\n\n const verifyWithCode = async (input: MfaCodeInput, signal?: AbortSignal) => {\n const { mfaToken, type, code } = mfaCodeInputSchema.parse(input);\n // Cast: omit fields outside the type — the backend rejects null.\n return _verify({ mfaToken, type, code } as VerifyMfaBody, signal);\n };\n\n const verifyWithWebauthn = async (input: MfaWebauthnInput, signal?: AbortSignal) => {\n const { mfaToken, assertion } = mfaWebauthnInputSchema.parse(input);\n // Cast: omit fields outside the type — the backend rejects null.\n return _verify({ mfaToken, type: MFA_METHOD.webauthn, assertion } as VerifyMfaBody, signal);\n };\n\n const regenerateRecoveryCodes = async (signal?: AbortSignal) => {\n const { data } = await client.post('/v1/auth/mfa/recovery-codes', {}, { signal });\n return data;\n };\n\n // TOTP enrollment for the signed-in user (account MFA management). `setup` returns the shared\n // secret + `otpauthUri` to render as a QR; `verify` confirms the first code and hands back the\n // one-time recovery codes plus the new factor `id`; `disable` removes a factor by that `id`.\n const totp = {\n setup: async (signal?: AbortSignal) => {\n const { data } = await client.post('/v1/auth/mfa/totp', {}, { signal });\n return data;\n },\n verify: async (input: TotpVerifyInput, signal?: AbortSignal) => {\n const body = totpVerifyInputSchema.parse(input);\n const { data } = await client.post('/v1/auth/mfa/totp/verify', { body }, { signal });\n return data;\n },\n disable: async (id: DisableTotpPath['id'], signal?: AbortSignal) => {\n await client.delete('/v1/auth/mfa/totp/{id}', { path: { id } }, { signal });\n },\n };\n\n return { verifyWithCode, verifyWithWebauthn, regenerateRecoveryCodes, totp };\n};\n","import * as z from 'zod';\n\nexport const resetRequestInputSchema = z.object({\n email: z.email(),\n});\n\nexport const resetInputSchema = z.object({\n // The single-use reset token (`kbc_pr_…`) delivered by e-mail.\n token: z.string().min(1, 'Required'),\n newPassword: z.string().min(1, 'Required'),\n // Revoke every session after the reset. Defaults to true (the backend's own default), so callers\n // may omit it; set false only to keep existing sessions alive. Password policy is backend-enforced.\n revokeSessions: z.boolean().default(true),\n});\n\nexport const changeInputSchema = z.object({\n currentPassword: z.string().min(1, 'Required'),\n newPassword: z.string().min(1, 'Required'),\n // Revoke every other session once the password changes. The schema fills in `true` on parse, so\n // the SDK always sends the field (matching the backend's own default); callers may omit it. Set\n // false only to keep the other sessions alive.\n revokeOtherSessions: z.boolean().default(true),\n});\n\nexport type ResetRequestInput = z.infer<typeof resetRequestInputSchema>;\n// `z.input`, not `z.infer`: callers may omit `revokeSessions` (the default fills it in on parse).\nexport type ResetInput = z.input<typeof resetInputSchema>;\n// `z.input`: callers may omit `revokeOtherSessions` (the default fills it in on parse).\nexport type ChangePasswordInput = z.input<typeof changeInputSchema>;\n","import type { AuthOpenApiFetchClient } from '../authClient';\n\nimport type { ChangePasswordInput, ResetInput, ResetRequestInput } from './schemas';\nimport { changeInputSchema, resetInputSchema, resetRequestInputSchema } from './schemas';\n\nexport const createPassword = (client: AuthOpenApiFetchClient) => {\n // Fire-and-forget from the caller's view: the backend always answers 202 and reveals nothing about\n // whether the account exists. Resolves on 202; rejects on 429 (rate limited) or 400.\n const resetRequest = async (input: ResetRequestInput, signal?: AbortSignal) => {\n const body = resetRequestInputSchema.parse(input);\n await client.post('/v1/auth/password/reset-request', { body }, { signal });\n };\n\n // Applies the new password for the given reset token. Resolves on 204; rejects on 400 (invalid or\n // expired token, or a password that violates the policy).\n const reset = async (input: ResetInput, signal?: AbortSignal) => {\n // `revokeSessions` is defaulted by the schema, so the parsed body always carries all three\n // fields the endpoint requires — no field omission, no type assertion.\n const body = resetInputSchema.parse(input);\n await client.post('/v1/auth/password/reset', { body }, { signal });\n };\n\n // Changes the password for the signed-in user (bearer session). Resolves on 204; rejects on 400\n // (wrong current password, or a new password that violates the policy). Password policy is\n // backend-enforced.\n const change = async (input: ChangePasswordInput, signal?: AbortSignal) => {\n const body = changeInputSchema.parse(input);\n await client.post('/v1/auth/password/change', { body }, { signal });\n };\n\n return { resetRequest, reset, change };\n};\n","import type { AuthOpenApiFetchClient } from '../authClient';\n\nimport type {\n CreatePatBodyRaw,\n CreatePatInput,\n ExchangePatBodyRaw,\n ExchangePatInput,\n PatScopeInput,\n RevokePatPath,\n} from './types';\n\n/**\n * Drop the keys whose value is `null` or `undefined`, and only those — an empty array or string is\n * a value the caller meant.\n *\n * The spec documents each optional PAT field as \"Omit (do not send `null`)\". Callers hold nullables\n * either way — an empty expiry picker, an untouched switch — so the rule lives here rather than at\n * every call site, where one of them would forget it.\n */\nconst withoutNullish = (entries: Record<string, unknown>): Record<string, unknown> =>\n Object.fromEntries(Object.entries(entries).filter(([, value]) => value != null));\n\n/** `undefined` for a scope that narrows nothing — which is what an absent `scope` already asks for. */\nconst toScope = (scope: PatScopeInput | null | undefined): Record<string, unknown> | undefined => {\n if (scope == null) return undefined;\n\n const payload = withoutNullish({ projects: scope.projects, readOnly: scope.readOnly });\n return Object.keys(payload).length > 0 ? payload : undefined;\n};\n\n// `as unknown as` at these two boundaries: `CreatePatBodyRaw` and `ExchangePatBodyRaw` both demand\n// the keys the endpoint documents as omittable, so the honest body is not expressible in either.\nconst toCreateBody = ({ name, expiresIn, scope }: CreatePatInput): CreatePatBodyRaw =>\n ({\n name,\n ...withoutNullish({ expiresIn, scope: toScope(scope) }),\n }) as unknown as CreatePatBodyRaw;\n\nconst toExchangeBody = ({ expiresIn, scope }: ExchangePatInput): ExchangePatBodyRaw =>\n withoutNullish({ expiresIn, scope: toScope(scope) }) as unknown as ExchangePatBodyRaw;\n\nexport const createPat = (client: AuthOpenApiFetchClient) => {\n const getAll = async (signal?: AbortSignal) => {\n const { data } = await client.get('/v1/auth/pat', {}, { signal });\n return data;\n };\n\n const create = async (input: CreatePatInput, signal?: AbortSignal) => {\n const { data } = await client.post('/v1/auth/pat', { body: toCreateBody(input) }, { signal });\n return data;\n };\n\n /**\n * Issue a child token from the one this request is authorized with.\n *\n * A child only ever attenuates its parent, so an empty input is a full-inheritance copy.\n */\n const exchange = async (input: ExchangePatInput = {}, signal?: AbortSignal) => {\n const { data } = await client.post(\n '/v1/auth/pat/exchange',\n { body: toExchangeBody(input) },\n { signal },\n );\n return data;\n };\n\n const revoke = async (id: RevokePatPath['id'], signal?: AbortSignal) => {\n await client.delete('/v1/auth/pat/{id}', { path: { id } }, { signal });\n };\n\n return { create, exchange, revoke, getAll };\n};\n","import type { AuthOpenApiFetchClient } from '../authClient';\n\nimport type { GetPkceTokenBody } from './types';\n\nexport const createPkce = (client: AuthOpenApiFetchClient) => {\n const getToken = async (body: GetPkceTokenBody, signal?: AbortSignal) => {\n const { data } = await client.post('/v1/auth/pkce/token', { body }, { signal });\n return data;\n };\n\n return { getToken };\n};\n","import type { AuthOpenApiFetchClient } from '../authClient';\n\nimport type { AssertSamlBody, InitiateSamlBody } from './types';\n\nexport const createSaml = (client: AuthOpenApiFetchClient) => {\n const assert = async (body: AssertSamlBody, signal?: AbortSignal) => {\n const { data } = await client.post('/v1/auth/saml/assert', { body }, { signal });\n return data;\n };\n\n const initiate = async (body?: InitiateSamlBody, signal?: AbortSignal) => {\n const { data } = await client.post('/v1/auth/saml/initiate', { body }, { signal });\n return data;\n };\n\n return { assert, initiate };\n};\n","import type { AuthOpenApiFetchClient } from '../authClient';\n\nimport type { RevokeSessionPath } from './types';\n\nexport const createSession = (client: AuthOpenApiFetchClient) => {\n const getAll = async (signal?: AbortSignal) => {\n const { data } = await client.get('/v1/auth/sessions', {}, { signal });\n return data;\n };\n\n const revoke = async (sessionId: RevokeSessionPath['sessionId'], signal?: AbortSignal) => {\n await client.delete('/v1/auth/sessions/{sessionId}', { path: { sessionId } }, { signal });\n };\n\n const revokeAll = async (signal?: AbortSignal) => {\n await client.delete('/v1/auth/sessions', {}, { signal });\n };\n\n return { getAll, revoke, revokeAll };\n};\n","import type { AuthOpenApiFetchClient } from '../authClient';\n\nimport type { SudoBody, SudoBodyRaw } from './types';\n\nexport const createSudo = (client: AuthOpenApiFetchClient) => {\n const verify = async (body: SudoBody, signal?: AbortSignal) => {\n // The generated request body (`SudoBodyRaw`) describes a payload the endpoint rejects — see the\n // `SudoBody` docs. Assert at this one boundary rather than making every caller send the invalid\n // shape; the real fix is the `#[OA\\Schema]`-vs-object mismatch on the backend, upstream of the\n // generated schema. Same pattern as `syncActionsClient`'s `PostActionsBodyRaw`.\n const { data } = await client.post(\n '/v1/auth/sudo',\n { body: body as unknown as SudoBodyRaw },\n { signal },\n );\n return data;\n };\n\n const challenge = async (signal?: AbortSignal) => {\n const { data } = await client.post('/v1/auth/sudo/challenge', {}, { signal });\n return data;\n };\n\n return { verify, challenge };\n};\n","import { HttpHeader } from '../../../fetchClient';\nimport type { AuthOpenApiFetchClient } from '../authClient';\n\nimport type { RevokeTokenBody } from './types';\n\nexport const createToken = (client: AuthOpenApiFetchClient) => {\n const refresh = async (refreshToken: string, signal?: AbortSignal) => {\n const { data } = await client.post(\n '/v1/auth/token/refresh',\n { body: { refreshToken } },\n { signal },\n );\n\n return data;\n };\n\n /**\n * Introspects an authenticated session token.\n *\n * @param token - Optional token to introspect (`Authorization: Bearer`); a middleware-set header wins.\n */\n const introspect = async (token?: string, signal?: AbortSignal) => {\n const { data } = await client.get(\n '/v1/auth/token/introspect',\n {},\n { signal, headers: token ? { [HttpHeader.AUTHORIZATION]: `Bearer ${token}` } : undefined },\n );\n return data;\n };\n\n const revoke = async (body: RevokeTokenBody, signal?: AbortSignal) => {\n await client.post('/v1/auth/token/revoke', { body }, { signal });\n };\n\n return { refresh, introspect, revoke };\n};\n","import type { AuthOpenApiFetchClient } from '../authClient';\n\nimport type {\n RegisterWebauthnInput,\n RegisterWebauthnOptionsResult,\n RemoveWebauthnInput,\n} from './types';\n\nexport const createWebauthn = (client: AuthOpenApiFetchClient) => {\n const getAll = async (signal?: AbortSignal) => {\n const { data } = await client.get('/v1/auth/webauthn', {}, { signal });\n return data;\n };\n\n const registerOptions = async (signal?: AbortSignal) => {\n const { data } = await client.post('/v1/auth/webauthn/register/options', {}, { signal });\n // Cast: the spec types the free-form `options` object as `Record<string, never>`.\n return data as RegisterWebauthnOptionsResult;\n };\n\n const register = async (\n { credential, deviceName = null, revokeOtherSessions = false }: RegisterWebauthnInput,\n signal?: AbortSignal,\n ) => {\n const { data } = await client.post(\n '/v1/auth/webauthn/register',\n { body: { credential, deviceName, revokeOtherSessions } },\n { signal },\n );\n return data;\n };\n\n // `revokeOtherSessions` signs every other session out along with the credential — the calling\n // session and personal access tokens survive. Omitted means the backend's own `false`.\n const remove = async ({ id, ...query }: RemoveWebauthnInput, signal?: AbortSignal) => {\n await client.delete('/v1/auth/webauthn/{id}', { path: { id }, query }, { signal });\n };\n\n return { getAll, registerOptions, register, remove };\n};\n","import { createGenericFetchClient, createOpenapiFetchClient } from '../../fetchClient';\nimport type { ClientInitOptions } from '../types';\nimport { validateConnectionStatus } from '../validateConnectionStatus';\n\nimport type { paths } from './__generated__/schema';\nimport { createDevice } from './device';\nimport { createLogin } from './login';\nimport { createMfa } from './mfa';\nimport { createPassword } from './password';\nimport { createPat } from './pat';\nimport { createPkce } from './pkce';\nimport { createSaml } from './saml';\nimport { createSession } from './session';\nimport { createSudo } from './sudo';\nimport { createToken } from './token';\nimport { createWebauthn } from './webauthn';\n\nexport type AuthClientInitOptions = Omit<ClientInitOptions, 'auth'>;\n\nexport type AuthOpenApiFetchClient = ReturnType<typeof createOpenapiFetchClient<paths>>;\n\nexport const createAuthClient = ({ baseUrl, middlewares }: AuthClientInitOptions) => {\n const client = createOpenapiFetchClient<paths>({\n baseUrl,\n middlewares,\n validateStatus: validateConnectionStatus,\n });\n const genericClient = createGenericFetchClient({\n baseUrl,\n middlewares,\n validateStatus: validateConnectionStatus,\n });\n\n // Host-level: Connection serves the storage, management and auth APIs off one baseUrl, so this\n // probes the host, not this API's prefix — `/v2/storage/health-check`, `/manage/health-check`\n // and `/v1/auth/health-check` all 404.\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 login: createLogin(client),\n mfa: createMfa(client),\n password: createPassword(client),\n saml: createSaml(client),\n pat: createPat(client),\n device: createDevice(client),\n sudo: createSudo(client),\n pkce: createPkce(client),\n session: createSession(client),\n token: createToken(client),\n webauthn: createWebauthn(client),\n };\n};\n"],"mappings":";;;;;;AAQA,MAAa,gBAAgB,WAAmC;CAC9D,MAAM,SAAS,OAAO,MAAqC,WAAyB;EAClF,MAAM,EAAE,SAAS,MAAM,OAAO,KAAK,mBAAmB,EAAE,KAAK,GAAG,EAAE,OAAO,CAAC;EAC1E,OAAO;CACT;CAEA,MAAM,UAAU,OAAO,MAAsC,WAAyB;EACpF,MAAM,EAAE,SAAS,MAAM,OAAO,KAAK,2BAA2B,EAAE,KAAK,GAAG,EAAE,OAAO,CAAC;EAClF,OAAO;CACT;CAEA,MAAM,WAAW,OAAO,MAAuC,WAAyB;EACtF,MAAM,EAAE,SAAS,MAAM,OAAO,KAAK,yBAAyB,EAAE,KAAK,GAAG,EAAE,OAAO,CAAC;EAChF,OAAO;CACT;CAEA,OAAO;EAAE;EAAQ;EAAS;CAAS;AACrC;;;ACvBA,MAAa,mBAAmBA,IAAE,OAAO;CACvC,OAAOA,IAAE,MAAM;CACf,UAAUA,IAAE,OAAO,CAAC,CAAC,IAAI,GAAG,UAAU;AACxC,CAAC;AAED,MAAa,kBAAkBA,IAAE,OAAO;CACtC,WAAWA,IAAE,KAAK,CAAC,UAAU,WAAW,CAAC;CACzC,SAASA,IAAE,OAAO,CAAC,CAAC,IAAI,GAAG,UAAU;AACvC,CAAC;AAKD,MAAM,aAAaA,IAAE,OAAO;CAC1B,IAAIA,IAAE,OAAO;CACb,OAAOA,IAAE,OAAO;CAChB,MAAMA,IAAE,OAAO;AACjB,CAAC;AAID,MAAa,qBAAqBA,IAAE,OAAO;CACzC,aAAaA,IAAE,QAAQ,KAAK,CAAC,CAAC,QAAQ,KAAK;CAC3C,aAAaA,IAAE,OAAO;CACtB,cAAcA,IAAE,OAAO;CACvB,WAAWA,IAAE,OAAO;CACpB,WAAWA,IAAE,OAAO;CACpB,WAAWA,IAAE,OAAO;CACpB,MAAM;AACR,C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pF,MAAM,OAAO,OAAO,0BAA0B;GAAE,MAAM,EAAE,GAAG;GAAG;EAAM,GAAG,EAAE,OAAO,CAAC;CACnF;CAEA,OAAO;EAAE;EAAQ;EAAiB;EAAU;CAAO;AACrD;;;AClBA,MAAa,oBAAoB,EAAE,SAAS,kBAAyC;CACnF,MAAM,SAAS,yBAAgC;EAC7C;EACA;EACA,gBAAgB;CAClB,CAAC;CACD,MAAM,gBAAgB,yBAAyB;EAC7C;EACA;EACA,gBAAgB;CAClB,CAAC;CAKD,MAAM,cAAc,OAAO,WAAyB;EAClD,MAAM,EAAE,SAAS,MAAM,cAAc,IAAI,iBAAiB,CAAC,GAAG,EAAE,OAAO,CAAC;EAExE,OAAO;CACT;CAEA,OAAO;EACL;EACA,OAAO,YAAY,MAAM;EACzB,KAAK,UAAU,MAAM;EACrB,UAAU,eAAe,MAAM;EAC/B,MAAM,WAAW,MAAM;EACvB,KAAK,UAAU,MAAM;EACrB,QAAQ,aAAa,MAAM;EAC3B,MAAM,WAAW,MAAM;EACvB,MAAM,WAAW,MAAM;EACvB,SAAS,cAAc,MAAM;EAC7B,OAAO,YAAY,MAAM;EACzB,UAAU,eAAe,MAAM;CACjC;AACF"}
1
+ {"version":3,"file":"authClient-D7W9vWPR.js","names":["z","z","z"],"sources":["../src/clients/auth/device/device.ts","../src/clients/auth/login/schemas.ts","../src/clients/auth/login/login.ts","../src/clients/auth/mfa/schemas.ts","../src/clients/auth/mfa/mfa.ts","../src/clients/auth/password/schemas.ts","../src/clients/auth/password/password.ts","../src/clients/auth/pat/pat.ts","../src/clients/auth/pkce/pkce.ts","../src/clients/auth/saml/saml.ts","../src/clients/auth/session/session.ts","../src/clients/auth/sudo/sudo.ts","../src/clients/auth/token/token.ts","../src/clients/auth/webauthn/webauthn.ts","../src/clients/auth/authClient.ts"],"sourcesContent":["import type { AuthOpenApiFetchClient } from '../authClient';\n\nimport type {\n ApproveDeviceAuthorizationBody,\n CreateDeviceAuthorizationBody,\n GetDeviceAuthorizationTokenBody,\n} from './types';\n\nexport const createDevice = (client: AuthOpenApiFetchClient) => {\n const create = async (body: CreateDeviceAuthorizationBody, signal?: AbortSignal) => {\n const { data } = await client.post('/v1/auth/device', { body }, { signal });\n return data;\n };\n\n const approve = async (body: ApproveDeviceAuthorizationBody, signal?: AbortSignal) => {\n const { data } = await client.post('/v1/auth/device/approve', { body }, { signal });\n return data;\n };\n\n const getToken = async (body: GetDeviceAuthorizationTokenBody, signal?: AbortSignal) => {\n const { data } = await client.post('/v1/auth/device/token', { body }, { signal });\n return data;\n };\n\n return { create, approve, getToken };\n};\n","import * as z from 'zod';\n\nexport const loginInputSchema = z.object({\n email: z.email(),\n password: z.string().min(1, 'Required'),\n});\n\nexport const oidcInputSchema = z.object({\n grantType: z.enum(['google', 'microsoft']),\n idToken: z.string().min(1, 'Required'),\n});\n\nexport type LoginInput = z.infer<typeof loginInputSchema>;\nexport type OidcInput = z.infer<typeof oidcInputSchema>;\n\nconst userSchema = z.object({\n id: z.number(),\n email: z.string(),\n name: z.string(),\n});\n\n// Success shape. The backend omits `mfaRequired` here, so we inject a `false`\n// literal to make the outcome a discriminated union on `mfaRequired`.\nexport const loginSuccessSchema = z.object({\n mfaRequired: z.literal(false).default(false),\n accessToken: z.string(),\n refreshToken: z.string(),\n tokenType: z.string(),\n expiresIn: z.number(),\n sessionId: z.string(),\n user: userSchema,\n});\n\n/**\n * MFA-challenge shape. `mfaRequired` is always true here — it is the discriminant.\n *\n * - `mfaType` is the account's single active factor, `allowedMethods` everything that may satisfy\n * it. Both stay `string`: a stack that grows a method must not fail to parse, so callers branch\n * and handle the unknown case themselves.\n * - `webauthn` carries the serialized `PublicKeyCredentialRequestOptionsJSON` for a passkey\n * challenge, inlined so the ceremony costs no extra round-trip. The spec declares it\n * required-and-nullable while the serializer omits the key outright for TOTP, so it must tolerate\n * present, `null` and absent alike.\n * - `unknown`, not a record: this sits inside the union `login` hard-parses, so a shape nobody\n * expected here would fail *both* branches and lock every MFA user out of sign-in — not merely\n * out of the passkey path. Whoever runs the ceremony validates it properly instead.\n */\nexport const mfaChallengeSchema = z.object({\n mfaRequired: z.literal(true),\n mfaType: z.string(),\n mfaToken: z.string(),\n expiresIn: z.number(),\n allowedMethods: z.array(z.string()),\n // `.optional()` explicitly: zod 4 dropped zod 3's implicit optionality for `z.unknown()`, so\n // without it a TOTP challenge — which omits the key — fails to parse and blocks sign-in.\n webauthn: z.unknown().optional(),\n});\n\nexport const loginResultSchema = z.union([loginSuccessSchema, mfaChallengeSchema]);\n\nexport type LoginUser = z.infer<typeof userSchema>;\nexport type LoginSuccess = z.infer<typeof loginSuccessSchema>;\nexport type MfaChallenge = z.infer<typeof mfaChallengeSchema>;\nexport type LoginResult = z.infer<typeof loginResultSchema>;\n","import type { AuthOpenApiFetchClient } from '../authClient';\n\nimport type { LoginInput, OidcInput } from './schemas';\nimport { loginInputSchema, loginResultSchema, oidcInputSchema } from './schemas';\nimport type { LoginBody } from './types';\n\nexport const createLogin = (client: AuthOpenApiFetchClient) => {\n const _login = async (body: LoginBody, signal?: AbortSignal) => {\n const { data } = await client.post('/v1/auth/login', { body }, { signal });\n return data;\n };\n\n const withPassword = async (input: LoginInput, signal?: AbortSignal) => {\n const { email, password } = loginInputSchema.parse(input);\n // Cast: omit fields outside the grant — the backend rejects null.\n const data = await _login({ grantType: 'password', email, password } as LoginBody, signal);\n // Validate against our own schema — the generated response type is unreliable,\n // and this narrows the outcome to a discriminated union on `mfaRequired`.\n return loginResultSchema.parse(data);\n };\n\n const withOidc = async (input: OidcInput, signal?: AbortSignal) => {\n const { grantType, idToken } = oidcInputSchema.parse(input);\n // Cast: omit fields outside the grant — the backend rejects null.\n const data = await _login({ grantType, idToken } as LoginBody, signal);\n return loginResultSchema.parse(data);\n };\n\n // Unauthenticated. Carries the public OAuth client ids `withOidc` callers mint an id token with.\n const methods = async (signal?: AbortSignal) => {\n const { data } = await client.get('/v1/auth/methods', {}, { signal });\n return data;\n };\n\n return { withPassword, withOidc, methods };\n};\n","import * as z from 'zod';\n\nimport type { components } from '../__generated__/schema';\n\n/**\n * The methods `POST /v1/auth/mfa` accepts, and the vocabulary a login challenge reports in\n * `mfaType` / `allowedMethods`.\n *\n * - `totp` and `recoveryCode` are verified by a typed code; `webauthn` by an assertion.\n * - `satisfies` binds the values to the generated spec, so a regenerated schema that renames or\n * drops a method fails the build here rather than at runtime mid-sign-in.\n * - A challenge may still name a method absent from here, so the wire fields stay `string`.\n */\nexport const MFA_METHOD = {\n totp: 'totp',\n webauthn: 'webauthn',\n recoveryCode: 'recovery_code',\n} as const satisfies Record<string, components['schemas']['MfaRequest']['type']>;\n\nexport type MfaMethod = (typeof MFA_METHOD)[keyof typeof MFA_METHOD];\n\nexport const mfaCodeInputSchema = z.object({\n mfaToken: z.string(),\n type: z.enum([MFA_METHOD.totp, MFA_METHOD.recoveryCode]),\n code: z.string().min(1, 'Required'),\n});\n\nexport const mfaWebauthnInputSchema = z.object({\n mfaToken: z.string(),\n assertion: z.string(),\n});\n\nexport const totpVerifyInputSchema = z.object({\n code: z.string().min(1, 'Required'),\n // Optional in the spec, but `openapi-typescript` emits every `default`-bearing property as\n // required — the schema fills in the backend's own default so callers may still omit it. Set true\n // to sign the admin out everywhere else as part of enrolling.\n revokeOtherSessions: z.boolean().default(false),\n});\n\nexport type MfaCodeInput = z.infer<typeof mfaCodeInputSchema>;\nexport type MfaWebauthnInput = z.infer<typeof mfaWebauthnInputSchema>;\n// `z.input`: callers may omit `revokeOtherSessions` (the default fills it in on parse).\nexport type TotpVerifyInput = z.input<typeof totpVerifyInputSchema>;\n","import type { AuthOpenApiFetchClient } from '../authClient';\n\nimport type { MfaCodeInput, MfaWebauthnInput, TotpVerifyInput } from './schemas';\nimport {\n MFA_METHOD,\n mfaCodeInputSchema,\n mfaWebauthnInputSchema,\n totpVerifyInputSchema,\n} from './schemas';\nimport type { DisableTotpPath, VerifyMfaBody } from './types';\n\nexport const createMfa = (client: AuthOpenApiFetchClient) => {\n const _verify = async (body: VerifyMfaBody, signal?: AbortSignal) => {\n const { data } = await client.post('/v1/auth/mfa', { body }, { signal });\n return data;\n };\n\n const verifyWithCode = async (input: MfaCodeInput, signal?: AbortSignal) => {\n const { mfaToken, type, code } = mfaCodeInputSchema.parse(input);\n // Cast: omit fields outside the type — the backend rejects null.\n return _verify({ mfaToken, type, code } as VerifyMfaBody, signal);\n };\n\n const verifyWithWebauthn = async (input: MfaWebauthnInput, signal?: AbortSignal) => {\n const { mfaToken, assertion } = mfaWebauthnInputSchema.parse(input);\n // Cast: omit fields outside the type — the backend rejects null.\n return _verify({ mfaToken, type: MFA_METHOD.webauthn, assertion } as VerifyMfaBody, signal);\n };\n\n const regenerateRecoveryCodes = async (signal?: AbortSignal) => {\n const { data } = await client.post('/v1/auth/mfa/recovery-codes', {}, { signal });\n return data;\n };\n\n // TOTP enrollment for the signed-in user (account MFA management). `setup` returns the shared\n // secret + `otpauthUri` to render as a QR; `verify` confirms the first code and hands back the\n // one-time recovery codes plus the new factor `id`; `disable` removes a factor by that `id`.\n const totp = {\n setup: async (signal?: AbortSignal) => {\n const { data } = await client.post('/v1/auth/mfa/totp', {}, { signal });\n return data;\n },\n verify: async (input: TotpVerifyInput, signal?: AbortSignal) => {\n const body = totpVerifyInputSchema.parse(input);\n const { data } = await client.post('/v1/auth/mfa/totp/verify', { body }, { signal });\n return data;\n },\n disable: async (id: DisableTotpPath['id'], signal?: AbortSignal) => {\n await client.delete('/v1/auth/mfa/totp/{id}', { path: { id } }, { signal });\n },\n };\n\n return { verifyWithCode, verifyWithWebauthn, regenerateRecoveryCodes, totp };\n};\n","import * as z from 'zod';\n\nexport const resetRequestInputSchema = z.object({\n email: z.email(),\n});\n\nexport const resetInputSchema = z.object({\n // The single-use reset token (`kbc_pr_…`) delivered by e-mail.\n token: z.string().min(1, 'Required'),\n newPassword: z.string().min(1, 'Required'),\n // Revoke every session after the reset. Defaults to true (the backend's own default), so callers\n // may omit it; set false only to keep existing sessions alive. Password policy is backend-enforced.\n revokeSessions: z.boolean().default(true),\n});\n\nexport const changeInputSchema = z.object({\n currentPassword: z.string().min(1, 'Required'),\n newPassword: z.string().min(1, 'Required'),\n // Revoke every other session once the password changes. The schema fills in `true` on parse, so\n // the SDK always sends the field (matching the backend's own default); callers may omit it. Set\n // false only to keep the other sessions alive.\n revokeOtherSessions: z.boolean().default(true),\n});\n\nexport type ResetRequestInput = z.infer<typeof resetRequestInputSchema>;\n// `z.input`, not `z.infer`: callers may omit `revokeSessions` (the default fills it in on parse).\nexport type ResetInput = z.input<typeof resetInputSchema>;\n// `z.input`: callers may omit `revokeOtherSessions` (the default fills it in on parse).\nexport type ChangePasswordInput = z.input<typeof changeInputSchema>;\n","import type { AuthOpenApiFetchClient } from '../authClient';\n\nimport type { ChangePasswordInput, ResetInput, ResetRequestInput } from './schemas';\nimport { changeInputSchema, resetInputSchema, resetRequestInputSchema } from './schemas';\n\nexport const createPassword = (client: AuthOpenApiFetchClient) => {\n // Fire-and-forget from the caller's view: the backend always answers 202 and reveals nothing about\n // whether the account exists. Resolves on 202; rejects on 429 (rate limited) or 400.\n const resetRequest = async (input: ResetRequestInput, signal?: AbortSignal) => {\n const body = resetRequestInputSchema.parse(input);\n await client.post('/v1/auth/password/reset-request', { body }, { signal });\n };\n\n // Applies the new password for the given reset token. Resolves on 204; rejects on 400 (invalid or\n // expired token, or a password that violates the policy).\n const reset = async (input: ResetInput, signal?: AbortSignal) => {\n // `revokeSessions` is defaulted by the schema, so the parsed body always carries all three\n // fields the endpoint requires — no field omission, no type assertion.\n const body = resetInputSchema.parse(input);\n await client.post('/v1/auth/password/reset', { body }, { signal });\n };\n\n // Changes the password for the signed-in user (bearer session). Resolves on 204; rejects on 400\n // (wrong current password, or a new password that violates the policy). Password policy is\n // backend-enforced.\n const change = async (input: ChangePasswordInput, signal?: AbortSignal) => {\n const body = changeInputSchema.parse(input);\n await client.post('/v1/auth/password/change', { body }, { signal });\n };\n\n return { resetRequest, reset, change };\n};\n","import type { AuthOpenApiFetchClient } from '../authClient';\n\nimport type {\n CreatePatBodyRaw,\n CreatePatInput,\n ExchangePatBodyRaw,\n ExchangePatInput,\n PatScopeInput,\n RevokePatPath,\n} from './types';\n\n/**\n * Drop the keys whose value is `null` or `undefined`, and only those — an empty array or string is\n * a value the caller meant.\n *\n * The spec documents each optional PAT field as \"Omit (do not send `null`)\". Callers hold nullables\n * either way — an empty expiry picker, an untouched switch — so the rule lives here rather than at\n * every call site, where one of them would forget it.\n */\nconst withoutNullish = (entries: Record<string, unknown>): Record<string, unknown> =>\n Object.fromEntries(Object.entries(entries).filter(([, value]) => value != null));\n\n/** `undefined` for a scope that narrows nothing — which is what an absent `scope` already asks for. */\nconst toScope = (scope: PatScopeInput | null | undefined): Record<string, unknown> | undefined => {\n if (scope == null) return undefined;\n\n const payload = withoutNullish({ projects: scope.projects, readOnly: scope.readOnly });\n return Object.keys(payload).length > 0 ? payload : undefined;\n};\n\n// `as unknown as` at these two boundaries: `CreatePatBodyRaw` and `ExchangePatBodyRaw` both demand\n// the keys the endpoint documents as omittable, so the honest body is not expressible in either.\nconst toCreateBody = ({ name, expiresIn, scope }: CreatePatInput): CreatePatBodyRaw =>\n ({\n name,\n ...withoutNullish({ expiresIn, scope: toScope(scope) }),\n }) as unknown as CreatePatBodyRaw;\n\nconst toExchangeBody = ({ expiresIn, scope }: ExchangePatInput): ExchangePatBodyRaw =>\n withoutNullish({ expiresIn, scope: toScope(scope) }) as unknown as ExchangePatBodyRaw;\n\nexport const createPat = (client: AuthOpenApiFetchClient) => {\n const getAll = async (signal?: AbortSignal) => {\n const { data } = await client.get('/v1/auth/pat', {}, { signal });\n return data;\n };\n\n const create = async (input: CreatePatInput, signal?: AbortSignal) => {\n const { data } = await client.post('/v1/auth/pat', { body: toCreateBody(input) }, { signal });\n return data;\n };\n\n /**\n * Issue a child token from the one this request is authorized with.\n *\n * A child only ever attenuates its parent, so an empty input is a full-inheritance copy.\n */\n const exchange = async (input: ExchangePatInput = {}, signal?: AbortSignal) => {\n const { data } = await client.post(\n '/v1/auth/pat/exchange',\n { body: toExchangeBody(input) },\n { signal },\n );\n return data;\n };\n\n const revoke = async (id: RevokePatPath['id'], signal?: AbortSignal) => {\n await client.delete('/v1/auth/pat/{id}', { path: { id } }, { signal });\n };\n\n return { create, exchange, revoke, getAll };\n};\n","import type { AuthOpenApiFetchClient } from '../authClient';\n\nimport type { GetPkceTokenBody } from './types';\n\nexport const createPkce = (client: AuthOpenApiFetchClient) => {\n const getToken = async (body: GetPkceTokenBody, signal?: AbortSignal) => {\n const { data } = await client.post('/v1/auth/pkce/token', { body }, { signal });\n return data;\n };\n\n return { getToken };\n};\n","import type { AuthOpenApiFetchClient } from '../authClient';\n\nimport type { AssertSamlBody, InitiateSamlBody } from './types';\n\nexport const createSaml = (client: AuthOpenApiFetchClient) => {\n const assert = async (body: AssertSamlBody, signal?: AbortSignal) => {\n const { data } = await client.post('/v1/auth/saml/assert', { body }, { signal });\n return data;\n };\n\n const initiate = async (body?: InitiateSamlBody, signal?: AbortSignal) => {\n const { data } = await client.post('/v1/auth/saml/initiate', { body }, { signal });\n return data;\n };\n\n return { assert, initiate };\n};\n","import type { AuthOpenApiFetchClient } from '../authClient';\n\nimport type { RevokeSessionPath } from './types';\n\nexport const createSession = (client: AuthOpenApiFetchClient) => {\n const getAll = async (signal?: AbortSignal) => {\n const { data } = await client.get('/v1/auth/sessions', {}, { signal });\n return data;\n };\n\n const revoke = async (sessionId: RevokeSessionPath['sessionId'], signal?: AbortSignal) => {\n await client.delete('/v1/auth/sessions/{sessionId}', { path: { sessionId } }, { signal });\n };\n\n const revokeAll = async (signal?: AbortSignal) => {\n await client.delete('/v1/auth/sessions', {}, { signal });\n };\n\n return { getAll, revoke, revokeAll };\n};\n","import type { AuthOpenApiFetchClient } from '../authClient';\n\nimport type { SudoBody, SudoBodyRaw } from './types';\n\nexport const createSudo = (client: AuthOpenApiFetchClient) => {\n const verify = async (body: SudoBody, signal?: AbortSignal) => {\n // The generated request body (`SudoBodyRaw`) describes a payload the endpoint rejects — see the\n // `SudoBody` docs. Assert at this one boundary rather than making every caller send the invalid\n // shape; the real fix is the `#[OA\\Schema]`-vs-object mismatch on the backend, upstream of the\n // generated schema. Same pattern as `syncActionsClient`'s `PostActionsBodyRaw`.\n const { data } = await client.post(\n '/v1/auth/sudo',\n { body: body as unknown as SudoBodyRaw },\n { signal },\n );\n return data;\n };\n\n const challenge = async (signal?: AbortSignal) => {\n const { data } = await client.post('/v1/auth/sudo/challenge', {}, { signal });\n return data;\n };\n\n return { verify, challenge };\n};\n","import { HttpHeader } from '../../../fetchClient';\nimport type { AuthOpenApiFetchClient } from '../authClient';\n\nimport type { RevokeTokenBody } from './types';\n\nexport const createToken = (client: AuthOpenApiFetchClient) => {\n const refresh = async (refreshToken: string, signal?: AbortSignal) => {\n const { data } = await client.post(\n '/v1/auth/token/refresh',\n { body: { refreshToken } },\n { signal },\n );\n\n return data;\n };\n\n /**\n * Introspects an authenticated session token.\n *\n * @param token - Optional token to introspect (`Authorization: Bearer`); a middleware-set header wins.\n */\n const introspect = async (token?: string, signal?: AbortSignal) => {\n const { data } = await client.get(\n '/v1/auth/token/introspect',\n {},\n { signal, headers: token ? { [HttpHeader.AUTHORIZATION]: `Bearer ${token}` } : undefined },\n );\n return data;\n };\n\n const revoke = async (body: RevokeTokenBody, signal?: AbortSignal) => {\n await client.post('/v1/auth/token/revoke', { body }, { signal });\n };\n\n return { refresh, introspect, revoke };\n};\n","import type { AuthOpenApiFetchClient } from '../authClient';\n\nimport type {\n RegisterWebauthnInput,\n RegisterWebauthnOptionsResult,\n RemoveWebauthnInput,\n} from './types';\n\nexport const createWebauthn = (client: AuthOpenApiFetchClient) => {\n const getAll = async (signal?: AbortSignal) => {\n const { data } = await client.get('/v1/auth/webauthn', {}, { signal });\n return data;\n };\n\n const registerOptions = async (signal?: AbortSignal) => {\n const { data } = await client.post('/v1/auth/webauthn/register/options', {}, { signal });\n // Cast: the spec types the free-form `options` object as `Record<string, never>`.\n return data as RegisterWebauthnOptionsResult;\n };\n\n const register = async (\n { credential, deviceName = null, revokeOtherSessions = false }: RegisterWebauthnInput,\n signal?: AbortSignal,\n ) => {\n const { data } = await client.post(\n '/v1/auth/webauthn/register',\n { body: { credential, deviceName, revokeOtherSessions } },\n { signal },\n );\n return data;\n };\n\n // `revokeOtherSessions` signs every other session out along with the credential — the calling\n // session and personal access tokens survive. Omitted means the backend's own `false`.\n const remove = async ({ id, ...query }: RemoveWebauthnInput, signal?: AbortSignal) => {\n await client.delete('/v1/auth/webauthn/{id}', { path: { id }, query }, { signal });\n };\n\n return { getAll, registerOptions, register, remove };\n};\n","import { createGenericFetchClient, createOpenapiFetchClient } from '../../fetchClient';\nimport type { ClientInitOptions } from '../types';\nimport { validateConnectionStatus } from '../validateConnectionStatus';\n\nimport type { paths } from './__generated__/schema';\nimport { createDevice } from './device';\nimport { createLogin } from './login';\nimport { createMfa } from './mfa';\nimport { createPassword } from './password';\nimport { createPat } from './pat';\nimport { createPkce } from './pkce';\nimport { createSaml } from './saml';\nimport { createSession } from './session';\nimport { createSudo } from './sudo';\nimport { createToken } from './token';\nimport { createWebauthn } from './webauthn';\n\nexport type AuthClientInitOptions = Omit<ClientInitOptions, 'auth'>;\n\nexport type AuthOpenApiFetchClient = ReturnType<typeof createOpenapiFetchClient<paths>>;\n\nexport const createAuthClient = ({ baseUrl, middlewares }: AuthClientInitOptions) => {\n const client = createOpenapiFetchClient<paths>({\n baseUrl,\n middlewares,\n validateStatus: validateConnectionStatus,\n });\n const genericClient = createGenericFetchClient({\n baseUrl,\n middlewares,\n validateStatus: validateConnectionStatus,\n });\n\n // Host-level: Connection serves the storage, management and auth APIs off one baseUrl, so this\n // probes the host, not this API's prefix — `/v2/storage/health-check`, `/manage/health-check`\n // and `/v1/auth/health-check` all 404.\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 login: createLogin(client),\n mfa: createMfa(client),\n password: createPassword(client),\n saml: createSaml(client),\n pat: createPat(client),\n device: createDevice(client),\n sudo: createSudo(client),\n pkce: createPkce(client),\n session: createSession(client),\n token: createToken(client),\n webauthn: createWebauthn(client),\n };\n};\n"],"mappings":";;;;;;AAQA,MAAa,gBAAgB,WAAmC;CAC9D,MAAM,SAAS,OAAO,MAAqC,WAAyB;EAClF,MAAM,EAAE,SAAS,MAAM,OAAO,KAAK,mBAAmB,EAAE,KAAK,GAAG,EAAE,OAAO,CAAC;EAC1E,OAAO;CACT;CAEA,MAAM,UAAU,OAAO,MAAsC,WAAyB;EACpF,MAAM,EAAE,SAAS,MAAM,OAAO,KAAK,2BAA2B,EAAE,KAAK,GAAG,EAAE,OAAO,CAAC;EAClF,OAAO;CACT;CAEA,MAAM,WAAW,OAAO,MAAuC,WAAyB;EACtF,MAAM,EAAE,SAAS,MAAM,OAAO,KAAK,yBAAyB,EAAE,KAAK,GAAG,EAAE,OAAO,CAAC;EAChF,OAAO;CACT;CAEA,OAAO;EAAE;EAAQ;EAAS;CAAS;AACrC;;;ACvBA,MAAa,mBAAmBA,IAAE,OAAO;CACvC,OAAOA,IAAE,MAAM;CACf,UAAUA,IAAE,OAAO,CAAC,CAAC,IAAI,GAAG,UAAU;AACxC,CAAC;AAED,MAAa,kBAAkBA,IAAE,OAAO;CACtC,WAAWA,IAAE,KAAK,CAAC,UAAU,WAAW,CAAC;CACzC,SAASA,IAAE,OAAO,CAAC,CAAC,IAAI,GAAG,UAAU;AACvC,CAAC;AAKD,MAAM,aAAaA,IAAE,OAAO;CAC1B,IAAIA,IAAE,OAAO;CACb,OAAOA,IAAE,OAAO;CAChB,MAAMA,IAAE,OAAO;AACjB,CAAC;AAID,MAAa,qBAAqBA,IAAE,OAAO;CACzC,aAAaA,IAAE,QAAQ,KAAK,CAAC,CAAC,QAAQ,KAAK;CAC3C,aAAaA,IAAE,OAAO;CACtB,cAAcA,IAAE,OAAO;CACvB,WAAWA,IAAE,OAAO;CACpB,WAAWA,IAAE,OAA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AAS,OAAO,EAAE,IAAI,GAAG,SAA8B,WAAyB;EACpF,MAAM,OAAO,OAAO,0BAA0B;GAAE,MAAM,EAAE,GAAG;GAAG;EAAM,GAAG,EAAE,OAAO,CAAC;CACnF;CAEA,OAAO;EAAE;EAAQ;EAAiB;EAAU;CAAO;AACrD;;;AClBA,MAAa,oBAAoB,EAAE,SAAS,kBAAyC;CACnF,MAAM,SAAS,yBAAgC;EAC7C;EACA;EACA,gBAAgB;CAClB,CAAC;CACD,MAAM,gBAAgB,yBAAyB;EAC7C;EACA;EACA,gBAAgB;CAClB,CAAC;CAKD,MAAM,cAAc,OAAO,WAAyB;EAClD,MAAM,EAAE,SAAS,MAAM,cAAc,IAAI,iBAAiB,CAAC,GAAG,EAAE,OAAO,CAAC;EAExE,OAAO;CACT;CAEA,OAAO;EACL;EACA,OAAO,YAAY,MAAM;EACzB,KAAK,UAAU,MAAM;EACrB,UAAU,eAAe,MAAM;EAC/B,MAAM,WAAW,MAAM;EACvB,KAAK,UAAU,MAAM;EACrB,QAAQ,aAAa,MAAM;EAC3B,MAAM,WAAW,MAAM;EACvB,MAAM,WAAW,MAAM;EACvB,SAAS,cAAc,MAAM;EAC7B,OAAO,YAAY,MAAM;EACzB,UAAU,eAAe,MAAM;CACjC;AACF"}
@@ -1,6 +1,6 @@
1
- import { t as createOpenapiFetchClient } from "./index-DVhTNwvu.js";
2
- import { n as ClientInitOptions } from "./types-D-98DirB.js";
3
- import { A as DisableTotpPath, C as CreatePatInput, E as ExchangePatInput, L as ApproveDeviceAuthorizationBody, U as components, V as GetDeviceAuthorizationTokenBody, W as paths, a as RemoveWebauthnInput, b as GetPkceTokenBody, d as SudoBody, g as AssertSamlBody, h as RevokeSessionPath, k as RevokePatPath, n as RegisterWebauthnInput, r as RegisterWebauthnOptionsResult, u as RevokeTokenBody, v as InitiateSamlBody, z as CreateDeviceAuthorizationBody } from "./types-CSc8NQCY.js";
1
+ import { t as createOpenapiFetchClient } from "./index-KuQ79Mnz.js";
2
+ import { n as ClientInitOptions } from "./types-Ct0YPy2w.js";
3
+ import { A as DisableTotpPath, C as CreatePatInput, E as ExchangePatInput, L as ApproveDeviceAuthorizationBody, U as components, V as GetDeviceAuthorizationTokenBody, W as paths, a as RemoveWebauthnInput, b as GetPkceTokenBody, d as SudoBody, g as AssertSamlBody, h as RevokeSessionPath, k as RevokePatPath, n as RegisterWebauthnInput, r as RegisterWebauthnOptionsResult, u as RevokeTokenBody, v as InitiateSamlBody, z as CreateDeviceAuthorizationBody } from "./types-BrYkBQo4.js";
4
4
  import * as z$1 from "zod";
5
5
  //#region src/clients/auth/login/schemas.d.ts
6
6
  declare const loginInputSchema: z$1.ZodObject<{
@@ -364,4 +364,4 @@ declare const createAuthClient: ({ baseUrl, middlewares }: AuthClientInitOptions
364
364
  };
365
365
  //#endregion
366
366
  export { OidcInput as C, mfaChallengeSchema as D, loginSuccessSchema as E, oidcInputSchema as O, MfaChallenge as S, loginResultSchema as T, totpVerifyInputSchema as _, ResetInput as a, LoginSuccess as b, resetInputSchema as c, MfaCodeInput as d, MfaMethod as f, mfaWebauthnInputSchema as g, mfaCodeInputSchema as h, ChangePasswordInput as i, resetRequestInputSchema as l, TotpVerifyInput as m, AuthOpenApiFetchClient as n, ResetRequestInput as o, MfaWebauthnInput as p, createAuthClient as r, changeInputSchema as s, AuthClientInitOptions as t, MFA_METHOD as u, LoginInput as v, loginInputSchema as w, LoginUser as x, LoginResult as y };
367
- //# sourceMappingURL=authClient-DwT6xdg5.d.ts.map
367
+ //# sourceMappingURL=authClient-D8i3JTM-.d.ts.map
@@ -1,8 +1,8 @@
1
1
  const require_rolldown_runtime = require("./rolldown-runtime-VH7oDXx4.cjs");
2
- const require_createFetchClient = require("./createFetchClient-DvZvD31l.cjs");
3
- const require_validateConnectionStatus = require("./validateConnectionStatus-24zqIQ0p.cjs");
4
- const require_createGenericFetchClient = require("./createGenericFetchClient-qfCZlCTv.cjs");
5
- const require_createOpenapiFetchClient = require("./createOpenapiFetchClient-C57Ljzi6.cjs");
2
+ const require_createFetchClient = require("./createFetchClient-DgMiqTJ8.cjs");
3
+ const require_validateConnectionStatus = require("./validateConnectionStatus-CsvYmCOI.cjs");
4
+ const require_createGenericFetchClient = require("./createGenericFetchClient-o3cPJeRn.cjs");
5
+ const require_createOpenapiFetchClient = require("./createOpenapiFetchClient-DhUU3M1W.cjs");
6
6
  let zod = require("zod");
7
7
  zod = require_rolldown_runtime.__toESM(zod, 1);
8
8
  //#region src/clients/auth/device/device.ts
@@ -507,4 +507,4 @@ Object.defineProperty(exports, "totpVerifyInputSchema", {
507
507
  }
508
508
  });
509
509
 
510
- //# sourceMappingURL=authClient-IwQ9Ti0J.cjs.map
510
+ //# sourceMappingURL=authClient-_PpvGgZJ.cjs.map