@keboola/api-client 55.0.0 → 57.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.
- package/AGENTS.md +110 -229
- package/API-SURFACE.md +12 -2
- package/CHANGELOG.md +61 -0
- package/README.md +20 -133
- package/dist/{ManagementSessionMintError-Bc9bc7Ai.cjs → ManagementSessionMintError-BCOLLaJi.cjs} +3 -2
- package/dist/ManagementSessionMintError-BCOLLaJi.cjs.map +1 -0
- package/dist/{ManagementSessionMintError-BMHDcEqV.js → ManagementSessionMintError-KUX3utTV.js} +3 -2
- package/dist/ManagementSessionMintError-KUX3utTV.js.map +1 -0
- package/dist/{adminRoles-Cm513r1G.d.ts → adminRoles-CnfGDvjN.d.ts} +2 -2
- package/dist/{adminRoles-BTKVwEy8.d.cts → adminRoles-D6AS9Bzx.d.cts} +2 -2
- package/dist/ai/index.d.cts +2 -2
- package/dist/ai/index.d.ts +2 -2
- package/dist/ai/types.d.cts +1 -1
- package/dist/ai/types.d.ts +1 -1
- package/dist/apps/index.cjs +1 -1
- package/dist/apps/index.d.cts +2 -2
- package/dist/apps/index.d.ts +2 -2
- package/dist/apps/index.js +1 -1
- package/dist/apps/types.d.cts +2 -2
- package/dist/apps/types.d.ts +2 -2
- package/dist/{apps-C1x5IKNQ.cjs → apps-BA9JRLAZ.cjs} +55 -1
- package/dist/apps-BA9JRLAZ.cjs.map +1 -0
- package/dist/{apps-BN7fWtSm.js → apps-DDcguJ1i.js} +55 -1
- package/dist/apps-DDcguJ1i.js.map +1 -0
- package/dist/assets/index.d.cts +1 -1
- package/dist/assets/index.d.ts +1 -1
- package/dist/auth/index.cjs +1 -1
- package/dist/auth/index.d.cts +1 -1
- package/dist/auth/index.d.ts +1 -1
- package/dist/auth/index.js +1 -1
- package/dist/auth/types.d.cts +2 -2
- package/dist/auth/types.d.ts +2 -2
- package/dist/{authClient-BM4L8XEN.js → authClient-BKGpJI5L.js} +14 -45
- package/dist/authClient-BKGpJI5L.js.map +1 -0
- package/dist/{authClient-DspK50e7.cjs → authClient-C3KG9hXw.cjs} +15 -58
- package/dist/authClient-C3KG9hXw.cjs.map +1 -0
- package/dist/{authClient-ij_Rm2Yn.d.ts → authClient-CbWpMmdX.d.ts} +7 -4
- package/dist/{authClient-NBi0pqD5.d.cts → authClient-UKeopxZZ.d.cts} +7 -4
- package/dist/billing/index.d.cts +1 -1
- package/dist/billing/index.d.ts +1 -1
- package/dist/billing/types.d.cts +1 -1
- package/dist/billing/types.d.ts +1 -1
- package/dist/chat/index.d.cts +2 -2
- package/dist/chat/index.d.ts +2 -2
- package/dist/chat/types.d.cts +1 -1
- package/dist/chat/types.d.ts +1 -1
- package/dist/componentsMcp/index.d.cts +1 -1
- package/dist/componentsMcp/index.d.ts +1 -1
- package/dist/componentsMcp/types.d.cts +1 -1
- package/dist/componentsMcp/types.d.ts +1 -1
- package/dist/constants/index.cjs +2 -2
- package/dist/constants/index.d.cts +3 -3
- package/dist/constants/index.d.ts +3 -3
- package/dist/constants/index.js +2 -2
- package/dist/{constants-HccvU5kx.js → constants-CxEaHCyt.js} +4 -3
- package/dist/constants-CxEaHCyt.js.map +1 -0
- package/dist/{constants-V9hAyPTo.cjs → constants-fiyOLyZE.cjs} +4 -3
- package/dist/constants-fiyOLyZE.cjs.map +1 -0
- package/dist/dataScience/index.d.cts +3 -3
- package/dist/dataScience/index.d.ts +3 -3
- package/dist/dataScience/types.d.cts +1 -1
- package/dist/dataScience/types.d.ts +1 -1
- package/dist/developerPortal/index.cjs +1 -1
- package/dist/developerPortal/index.d.cts +3 -3
- package/dist/developerPortal/index.d.ts +3 -3
- package/dist/developerPortal/index.js +1 -1
- package/dist/developerPortal/types.d.cts +2 -2
- package/dist/developerPortal/types.d.ts +2 -2
- package/dist/{developerPortalClient-CzCJ5sE3.js → developerPortalClient-3Q7049-4.js} +19 -1
- package/dist/developerPortalClient-3Q7049-4.js.map +1 -0
- package/dist/{developerPortalClient-BcK9F-Fs.cjs → developerPortalClient-Cj9bStCS.cjs} +19 -1
- package/dist/developerPortalClient-Cj9bStCS.cjs.map +1 -0
- package/dist/domain/permissions/index.d.cts +1 -1
- package/dist/domain/permissions/index.d.ts +1 -1
- package/dist/editor/index.d.cts +2 -2
- package/dist/editor/index.d.ts +2 -2
- package/dist/editor/types.d.cts +1 -1
- package/dist/editor/types.d.ts +1 -1
- package/dist/{emitter-raKkIqRp.d.ts → emitter-yaYzJOdh.d.cts} +1 -2
- package/dist/{emitter-raKkIqRp.d.cts → emitter-yaYzJOdh.d.ts} +1 -2
- package/dist/encryption/index.d.cts +1 -1
- package/dist/encryption/index.d.ts +1 -1
- package/dist/encryption/types.d.cts +1 -1
- package/dist/encryption/types.d.ts +1 -1
- package/dist/import/index.d.cts +3 -3
- package/dist/import/index.d.ts +3 -3
- package/dist/{index-FrsEkDvX.d.cts → index-9p4O-clX.d.cts} +2035 -73
- package/dist/{index-FrsEkDvX.d.ts → index-9p4O-clX.d.ts} +2035 -73
- package/dist/{index-BGE3eZfd.d.cts → index-B-HCh7LL.d.cts} +3 -3
- package/dist/{index-D3hWR_e4.d.ts → index-B0e42GnK.d.cts} +4 -3
- package/dist/{index-DeWeUUfE.d.ts → index-BbXGsspe.d.ts} +4 -4
- package/dist/{index-CYk7Aa8u.d.cts → index-Bg9BWpIY.d.ts} +4 -3
- package/dist/{index-CmyFWQXn.d.cts → index-BgEu7wGk.d.cts} +2671 -7325
- package/dist/{index-B8K-Bbdq.d.cts → index-Btft3BFn.d.ts} +29 -3
- package/dist/{index-CNJBmCHM.d.cts → index-ByaAn_lm.d.cts} +4 -4
- package/dist/{index-DLWMm1-T.d.ts → index-C92Ct6K5.d.ts} +178 -4
- package/dist/{index-CEDjFidH.d.ts → index-CBq59Aif.d.ts} +3 -3
- package/dist/{index-CQNwp6wX.d.ts → index-CGUPsu_R.d.cts} +29 -3
- package/dist/{index-CZvBjQvl.d.ts → index-CIA6-x2Q.d.ts} +4 -4
- package/dist/{index-BVe4S2CK.d.ts → index-CeWVf3d1.d.ts} +4 -4
- package/dist/{index-CQPs3hrp.d.ts → index-Cj0l_DL_.d.ts} +2671 -7325
- package/dist/{index-BUZ-vTRt.d.ts → index-Ck0UPKMM.d.ts} +2 -2
- package/dist/{index-d9zxFmNI.d.cts → index-D0ACg_Pp.d.cts} +7 -4
- package/dist/{index-8QhOqFLY.d.cts → index-D8nMnVp1.d.cts} +4 -4
- package/dist/{index-24GpnYhn.d.cts → index-DENUPo51.d.cts} +2 -2
- package/dist/{index-iFCann29.d.cts → index-DGjxLWZ-.d.cts} +3 -3
- package/dist/{index-CdeWTy8t.d.ts → index-Dse6Psvc.d.ts} +7 -4
- package/dist/{index-DTGOEke4.d.ts → index-DxcaEIhU.d.ts} +3 -3
- package/dist/{index-BE6qM0vu.d.cts → index-OCEoQ1Y-.d.cts} +4 -4
- package/dist/{index-BXgjPlZN.d.cts → index-jR69kGUZ.d.cts} +178 -4
- package/dist/index.cjs +613 -865
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -9
- package/dist/index.d.ts +9 -9
- package/dist/index.js +611 -860
- package/dist/index.js.map +1 -1
- package/dist/kaiAgent/index.cjs +1 -1
- package/dist/kaiAgent/index.d.cts +2 -2
- package/dist/kaiAgent/index.d.ts +2 -2
- package/dist/kaiAgent/index.js +1 -1
- package/dist/kaiAgent/types.d.cts +2 -2
- package/dist/kaiAgent/types.d.ts +2 -2
- package/dist/{kaiAgent-De2T6G4G.cjs → kaiAgent-Q00g6S1v.cjs} +16 -1
- package/dist/kaiAgent-Q00g6S1v.cjs.map +1 -0
- package/dist/{kaiAgent-D0MoKqXe.js → kaiAgent-aqylPZHY.js} +16 -1
- package/dist/kaiAgent-aqylPZHY.js.map +1 -0
- package/dist/management/index.cjs +1 -1
- package/dist/management/index.d.cts +1 -1
- package/dist/management/index.d.ts +1 -1
- package/dist/management/index.js +1 -1
- package/dist/management/types.d.cts +1 -1
- package/dist/management/types.d.ts +1 -1
- package/dist/{management-BlMQnPNS.js → management-CIK5-Aq5.js} +14 -7
- package/dist/management-CIK5-Aq5.js.map +1 -0
- package/dist/{management-dIMrTTpI.cjs → management-Dqrc516s.cjs} +14 -7
- package/dist/management-Dqrc516s.cjs.map +1 -0
- package/dist/{metaObject-ClvW342q.d.ts → metaObject-AQ7wKDOu.d.ts} +2 -2
- package/dist/{metaObject-D7oudegV.d.cts → metaObject-I35_krxf.d.cts} +2 -2
- package/dist/metastore/index.d.cts +1 -1
- package/dist/metastore/index.d.ts +1 -1
- package/dist/metastore/types.d.cts +1 -1
- package/dist/metastore/types.d.ts +1 -1
- package/dist/microsoftGraph/index.d.cts +3 -3
- package/dist/microsoftGraph/index.d.ts +3 -3
- package/dist/microsoftGraph/types.d.cts +2 -2
- package/dist/microsoftGraph/types.d.ts +2 -2
- package/dist/{middleware-DxGv7DG8.js → middleware-DWmhthX0.js} +2 -2
- package/dist/middleware-DWmhthX0.js.map +1 -0
- package/dist/{middleware-vIaPDtQI.cjs → middleware-DYdDD4O6.cjs} +2 -2
- package/dist/middleware-DYdDD4O6.cjs.map +1 -0
- package/dist/notifications/index.d.cts +2 -2
- package/dist/notifications/index.d.ts +2 -2
- package/dist/notifications/types.d.cts +1 -1
- package/dist/notifications/types.d.ts +1 -1
- package/dist/oauth/index.d.cts +2 -2
- package/dist/oauth/index.d.ts +2 -2
- package/dist/oauth/types.d.cts +1 -1
- package/dist/oauth/types.d.ts +1 -1
- package/dist/omnisearch/index.d.cts +2 -2
- package/dist/omnisearch/index.d.ts +2 -2
- package/dist/omnisearch/types.d.cts +1 -1
- package/dist/omnisearch/types.d.ts +1 -1
- package/dist/{project-DS0HOV3M.d.ts → project-DwRvx_zN.d.ts} +3 -3
- package/dist/{project-BGk9CtOq.d.cts → project-ERH0FTGW.d.cts} +3 -3
- package/dist/queryService/index.cjs +1 -1
- package/dist/queryService/index.d.cts +1 -1
- package/dist/queryService/index.d.ts +1 -1
- package/dist/queryService/index.js +1 -1
- package/dist/queryService/types.d.cts +1 -1
- package/dist/queryService/types.d.ts +1 -1
- package/dist/{queryService-C3BQ6GKW.cjs → queryService-CECWubS0.cjs} +2 -2
- package/dist/{queryService-C3BQ6GKW.cjs.map → queryService-CECWubS0.cjs.map} +1 -1
- package/dist/{queryService-DQHtHy2-.js → queryService-CIxb_mcP.js} +2 -2
- package/dist/{queryService-DQHtHy2-.js.map → queryService-CIxb_mcP.js.map} +1 -1
- package/dist/queue/index.cjs +1 -1
- package/dist/queue/index.d.cts +11 -4
- package/dist/queue/index.d.ts +11 -4
- package/dist/queue/index.js +1 -1
- package/dist/queue/types.d.cts +1 -1
- package/dist/queue/types.d.ts +1 -1
- package/dist/{queue-6cywDnA-.js → queue-BBihD5qQ.js} +2 -2
- package/dist/{queue-6cywDnA-.js.map → queue-BBihD5qQ.js.map} +1 -1
- package/dist/{queue-J2uXzXR9.cjs → queue-PmTfoniJ.cjs} +2 -2
- package/dist/{queue-J2uXzXR9.cjs.map → queue-PmTfoniJ.cjs.map} +1 -1
- package/dist/scheduler/index.d.cts +2 -2
- package/dist/scheduler/index.d.ts +2 -2
- package/dist/scheduler/types.d.cts +1 -1
- package/dist/scheduler/types.d.ts +1 -1
- package/dist/{schema-DLmBEgPM.d.cts → schema-CqzWi5cO.d.cts} +14 -4
- package/dist/{schema-DLmBEgPM.d.ts → schema-CqzWi5cO.d.ts} +14 -4
- package/dist/sdk/configurations/index.d.cts +2 -3
- package/dist/sdk/configurations/index.d.ts +2 -3
- package/dist/sdk/dataAppServer/index.cjs +3 -3
- package/dist/sdk/dataAppServer/index.d.cts +1 -1
- package/dist/sdk/dataAppServer/index.d.ts +1 -1
- package/dist/sdk/dataAppServer/index.js +3 -3
- package/dist/sdk/developerPortal/index.cjs +3 -3
- package/dist/sdk/developerPortal/index.cjs.map +1 -1
- package/dist/sdk/developerPortal/index.d.cts +178 -4
- package/dist/sdk/developerPortal/index.d.ts +178 -4
- package/dist/sdk/developerPortal/index.js +3 -3
- package/dist/sdk/developerPortal/index.js.map +1 -1
- package/dist/sdk/kaiMemory/index.d.cts +1 -1
- package/dist/sdk/kaiMemory/index.d.ts +1 -1
- package/dist/sdk/kaiMemory/types.d.cts +1 -1
- package/dist/sdk/kaiMemory/types.d.ts +1 -1
- package/dist/sdk/queryService/index.d.cts +1 -1
- package/dist/sdk/queryService/index.d.ts +1 -1
- package/dist/sdk/securityPolicy/index.d.cts +2 -2
- package/dist/sdk/securityPolicy/index.d.ts +2 -2
- package/dist/sdk/securityPolicy/types.d.cts +1 -1
- package/dist/sdk/securityPolicy/types.d.ts +1 -1
- package/dist/sdk/semanticLayer/index.d.cts +1 -1
- package/dist/sdk/semanticLayer/index.d.ts +1 -1
- package/dist/sdk/semanticLayer/types.d.cts +1 -1
- package/dist/sdk/semanticLayer/types.d.ts +1 -1
- package/dist/sdk/tag/index.d.cts +3 -3
- package/dist/sdk/tag/index.d.ts +3 -3
- package/dist/sdk/tag/types.d.cts +1 -1
- package/dist/sdk/tag/types.d.ts +1 -1
- package/dist/sdk/vault/index.d.cts +1 -1
- package/dist/sdk/vault/index.d.ts +1 -1
- package/dist/status/index.d.cts +1 -1
- package/dist/status/index.d.ts +1 -1
- package/dist/storage/index.cjs +3 -3
- package/dist/storage/index.d.cts +2 -3
- package/dist/storage/index.d.ts +2 -3
- package/dist/storage/index.js +3 -3
- package/dist/storage/types.d.cts +6 -6
- package/dist/storage/types.d.ts +6 -6
- package/dist/{storage-BL-TfHp8.cjs → storage-chxoWtAL.cjs} +83 -42
- package/dist/storage-chxoWtAL.cjs.map +1 -0
- package/dist/{storage-DEJN8sw-.js → storage-o9teEKl_.js} +83 -42
- package/dist/storage-o9teEKl_.js.map +1 -0
- package/dist/{store-2OyH1XOP.cjs → store-7xlVu4qF.cjs} +3 -14
- package/dist/store-7xlVu4qF.cjs.map +1 -0
- package/dist/{store-HP0zRcLz.js → store-DDUzPeCm.js} +3 -14
- package/dist/store-DDUzPeCm.js.map +1 -0
- package/dist/stream/index.d.cts +2 -2
- package/dist/stream/index.d.ts +2 -2
- package/dist/stream/types.d.cts +1 -1
- package/dist/stream/types.d.ts +1 -1
- package/dist/syncActions/index.d.cts +2 -2
- package/dist/syncActions/index.d.ts +2 -2
- package/dist/syncActions/types.d.cts +1 -1
- package/dist/syncActions/types.d.ts +1 -1
- package/dist/telemetry/index.d.cts +2 -2
- package/dist/telemetry/index.d.ts +2 -2
- package/dist/telemetry/types.d.cts +1 -1
- package/dist/telemetry/types.d.ts +1 -1
- package/dist/{transientRetries-BORv47mH.js → transientRetries-dssygpwU.js} +2 -2
- package/dist/{transientRetries-BORv47mH.js.map → transientRetries-dssygpwU.js.map} +1 -1
- package/dist/{transientRetries-CBorl4Ue.cjs → transientRetries-yVaQgKqP.cjs} +2 -2
- package/dist/{transientRetries-CBorl4Ue.cjs.map → transientRetries-yVaQgKqP.cjs.map} +1 -1
- package/dist/{types-BEw98Dd2.d.cts → types-B1kernzE.d.cts} +2 -2
- package/dist/{types-DjSjUKUl.d.ts → types-BBmS7-IS.d.ts} +151 -4
- package/dist/{types-DbthI3r-.d.ts → types-BJyWTgXX.d.ts} +2 -2
- package/dist/{types-DNwIMEuB.d.cts → types-BPNFTA63.d.cts} +21 -7
- package/dist/{types-Bv2Ds1hL.d.cts → types-BPSExpye.d.cts} +244 -4
- package/dist/{types-Dsf7CYmm.d.ts → types-BiXonOK6.d.ts} +2 -2
- package/dist/{types-BXKL0wTI.d.cts → types-BimRBONo.d.cts} +3 -3
- package/dist/{types-D2hhEGem.d.cts → types-BuEC58u3.d.cts} +2 -2
- package/dist/{types-dU3EA8gk.d.ts → types-BzHyi99r.d.cts} +5 -3
- package/dist/{types-J_dgwMjP.d.ts → types-C4T_2JdN.d.cts} +40 -27
- package/dist/{types-OHt0D_f2.d.ts → types-C53aKnWt.d.ts} +2 -2
- package/dist/{types-Do3__S4Q.d.cts → types-CEjgqmr2.d.cts} +2 -2
- package/dist/{types-CQYyULrw.d.ts → types-CGtpwTJk.d.ts} +2 -2
- package/dist/{types-D5bxXqEU.d.ts → types-CH1uguug.d.cts} +2 -163
- package/dist/{types-Tg3euEN_.d.ts → types-CP8-CssY.d.ts} +2 -2
- package/dist/{types-DX1Dz0xK.d.ts → types-CPQ6RkiZ.d.ts} +244 -4
- package/dist/{types-DSWIIMdv.d.ts → types-CPwofeyq.d.ts} +3 -3
- package/dist/{types-ChOJ-Az7.d.cts → types-CQAEOq-K.d.cts} +2 -2
- package/dist/{types-CKdNf_2k.d.cts → types-CVWoP_PC.d.cts} +3 -3
- package/dist/{types-B4ezB18r.d.cts → types-CbM2MApW.d.cts} +2 -2
- package/dist/{types-BD0B1KQ6.d.ts → types-CbOfT6lb.d.ts} +21 -7
- package/dist/{types-DMhgKHCP.d.cts → types-CcPpqVhm.d.cts} +2 -2
- package/dist/{types-d5Bt8Mr3.d.ts → types-CeqpzbBH.d.ts} +2 -2
- package/dist/{types-DU8aPTFW.d.cts → types-CjJYZaMO.d.cts} +2 -2
- package/dist/{types-B4Vwz45w.d.cts → types-CjP8RcFN.d.cts} +2 -2
- package/dist/{types-Rrcx-8LM.d.ts → types-CjfsPtwk.d.ts} +2 -2
- package/dist/{types-B6f6LpZ_.d.cts → types-CnSBLcZB.d.ts} +163 -3
- package/dist/{types-Bp8G9yta.d.ts → types-CsXLdnfV.d.ts} +2 -2
- package/dist/{types-Y4e8GGa3.d.cts → types-CzAh5-0z.d.cts} +2 -2
- package/dist/{types-BDgOF2WN.d.ts → types-D0F_c5KI.d.ts} +4 -4
- package/dist/{types-C5B3Pfob.d.cts → types-D3L3CqKl.d.cts} +151 -4
- package/dist/{types-CTYTMXXj.d.ts → types-D4oIei5M.d.cts} +163 -3
- package/dist/{types-CSE8bHiq.d.cts → types-D6ilG8sC.d.cts} +3 -3
- package/dist/{types-Cf0WE6qK.d.cts → types-DEGkXcw2.d.ts} +5 -3
- package/dist/{types-BynQKst1.d.cts → types-DEhAcO1Z.d.cts} +2 -2
- package/dist/{types-DCARsJWs.d.cts → types-DaIfg9Mb.d.cts} +4 -4
- package/dist/{types-p_lWvuQJ.d.ts → types-DhofEmWy.d.ts} +2 -2
- package/dist/{types-zlYUn0oi.d.ts → types-Dp61pYgP.d.ts} +3 -3
- package/dist/{types-CRC4lbPw.d.cts → types-Dteot3tT.d.ts} +757 -112
- package/dist/{types-DoSZQ1Bi.d.ts → types-K-JISUUI.d.cts} +757 -112
- package/dist/{types-Bwvss_gW.d.cts → types-TywAc1ow.d.ts} +40 -27
- package/dist/{types-B6JcEPEu.d.ts → types-UBpth6_9.d.ts} +2 -2
- package/dist/{types-DKKHKj19.d.cts → types-Vw-tduOH.d.ts} +2 -163
- package/dist/{types-CIlBSV99.d.cts → types-ZyLTqgpa.d.cts} +2 -2
- package/dist/{types-D-ufoskb.d.cts → types-aylD1zQz.d.cts} +17 -2
- package/dist/{types-BVJmcoqA.d.cts → types-fYY4q7dC.d.cts} +2 -2
- package/dist/{types-DK1bSUNr.d.ts → types-jYn3e3Du.d.ts} +3 -3
- package/dist/{types-CepTvkfm.d.ts → types-qXqJRPHj.d.ts} +2 -2
- package/dist/{types-kGZQQcIK.d.ts → types-r-Qa3y8e.d.ts} +2 -2
- package/dist/{types-Cr6WA6CN.d.ts → types-z82j5aNW.d.ts} +17 -2
- package/dist/validateConnectionStatus-DgJwuEy9.js +86 -0
- package/dist/validateConnectionStatus-DgJwuEy9.js.map +1 -0
- package/dist/validateConnectionStatus-DpYRsU-e.cjs +121 -0
- package/dist/validateConnectionStatus-DpYRsU-e.cjs.map +1 -0
- package/dist/vault/index.d.cts +1 -1
- package/dist/vault/index.d.ts +1 -1
- package/dist/vault/types.d.cts +1 -1
- package/dist/vault/types.d.ts +1 -1
- package/package.json +2 -2
- package/surface/apps.md +8 -3
- package/surface/auth.md +3 -2
- package/surface/chat.md +3 -3
- package/surface/dataScience.md +2 -2
- package/surface/kaiAgent.md +4 -3
- package/surface/management.md +4 -4
- package/surface/queue.md +7 -7
- package/surface/storage.md +32 -26
- package/dist/ManagementSessionMintError-BMHDcEqV.js.map +0 -1
- package/dist/ManagementSessionMintError-Bc9bc7Ai.cjs.map +0 -1
- package/dist/apps-BN7fWtSm.js.map +0 -1
- package/dist/apps-C1x5IKNQ.cjs.map +0 -1
- package/dist/authClient-BM4L8XEN.js.map +0 -1
- package/dist/authClient-DspK50e7.cjs.map +0 -1
- package/dist/constants-HccvU5kx.js.map +0 -1
- package/dist/constants-V9hAyPTo.cjs.map +0 -1
- package/dist/developerPortalClient-BcK9F-Fs.cjs.map +0 -1
- package/dist/developerPortalClient-CzCJ5sE3.js.map +0 -1
- package/dist/index-BGsP2QBc.d.ts +0 -10
- package/dist/index-CWowDl63.d.cts +0 -10
- package/dist/kaiAgent-D0MoKqXe.js.map +0 -1
- package/dist/kaiAgent-De2T6G4G.cjs.map +0 -1
- package/dist/management-BlMQnPNS.js.map +0 -1
- package/dist/management-dIMrTTpI.cjs.map +0 -1
- package/dist/middleware-DxGv7DG8.js.map +0 -1
- package/dist/middleware-vIaPDtQI.cjs.map +0 -1
- package/dist/storage-BL-TfHp8.cjs.map +0 -1
- package/dist/storage-DEJN8sw-.js.map +0 -1
- package/dist/store-2OyH1XOP.cjs.map +0 -1
- package/dist/store-HP0zRcLz.js.map +0 -1
- package/dist/validateConnectionStatus-DV00sDmu.js +0 -34
- package/dist/validateConnectionStatus-DV00sDmu.js.map +0 -1
- package/dist/validateConnectionStatus-ckaHcRx8.cjs +0 -51
- package/dist/validateConnectionStatus-ckaHcRx8.cjs.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apps-DDcguJ1i.js","names":["z","record"],"sources":["../src/domain/appLogs.ts","../src/clients/apps/appsClient.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, as the `apps` client serves it.\n *\n * - The tail contract lives here: how a line is parsed, where the next poll resumes, and that an\n * idle app is not an error.\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","import { readAppLogsDownload, readAppLogsTail } from '../../domain/appLogs';\nimport { createOpenapiFetchClient } from '../../fetchClient';\nimport { createAuthHeaders } from '../auth';\nimport type { ClientInitOptions } from '../types';\n\nimport type { paths } from './__generated__/schema';\nimport type {\n App,\n AppId,\n CreateAppBody,\n CreateCredentialBody,\n CreateDeploymentBody,\n CreateDraftBody,\n CredentialId,\n DeploymentId,\n DraftId,\n GetAppGitEntrypointsQuery,\n GetAppRunsQuery,\n GetAppsQuery,\n GetDeploymentsQuery,\n GetDraftsQuery,\n GetLogsTailQuery,\n RunId,\n} from './types';\n\n/**\n * Options every write takes.\n *\n * - No `idempotencyKey`: the service ignores it, so a retried create may duplicate.\n */\ntype WriteOptions = {\n signal?: AbortSignal;\n};\n\ntype LogsTailOptions = {\n query?: GetLogsTailQuery;\n signal?: AbortSignal;\n};\n\n/**\n * `/v2` App Deployments — data apps and their immutable deployment history.\n *\n * - `/v1` of the same service is the `dataScience` client.\n * - `baseUrl` must already end in `/v2`; `createServiceClients` composes it.\n * - `POST /apps/{appId}/activity` is absent: it needs a Manage token with `apps:proxy` scope.\n */\nexport const createAppsClient = ({ baseUrl, middlewares, auth }: ClientInitOptions) => {\n const client = createOpenapiFetchClient<paths>({\n baseUrl,\n middlewares,\n headers: createAuthHeaders(auth),\n });\n\n const writeOptions = ({ signal }: WriteOptions) => ({ signal });\n\n /** Service metadata — the `/v2` surface has no `/health-check`. */\n const healthCheck = async (signal?: AbortSignal) => {\n const { data } = await client.get('/', {}, { signal });\n\n return data;\n };\n\n const getApps = async (query: GetAppsQuery = {}, signal?: AbortSignal) => {\n const { data } = await client.get('/apps', { query }, { signal });\n\n return data;\n };\n\n const getApp = async (appId: AppId, signal?: AbortSignal) => {\n const { data } = await client.get('/apps/{appId}', { path: { appId } }, { signal });\n\n return data;\n };\n\n /**\n * Reserves the app and its Storage configuration only.\n *\n * - `parameters` and `authorization.app_proxy` are written afterwards via the Storage API.\n */\n const createApp = async (body: CreateAppBody, options: WriteOptions = {}) => {\n const { data } = await client.post('/apps', { body }, writeOptions(options));\n\n return data;\n };\n\n const deleteApp = async (appId: AppId, signal?: AbortSignal) => {\n await client.delete('/apps/{appId}', { path: { appId } }, { signal });\n };\n\n /** Drops production routing (URL 404s). A no-op returns the app unchanged, not an error. */\n const unpublishApp = async (appId: AppId, signal?: AbortSignal): Promise<App> => {\n const { data } = await client.post('/apps/{appId}/unpublish', { path: { appId } }, { signal });\n\n return data;\n };\n\n /** Sleeps the app now; the next visitor wakes it, as after an idle auto-suspend. */\n const suspendApp = async (appId: AppId, signal?: AbortSignal): Promise<App> => {\n const { data } = await client.post('/apps/{appId}/suspend', { path: { appId } }, { signal });\n\n return data;\n };\n\n /** Wakes the app now and clears a failure stop (`disabled`). A stopped app comes back `starting`. */\n const resumeApp = async (appId: AppId, signal?: AbortSignal): Promise<App> => {\n const { data } = await client.post('/apps/{appId}/resume', { path: { appId } }, { signal });\n\n return data;\n };\n\n /** `null` until the first deployment or {@link resetAppPassword} mints one. */\n const getAppPassword = async (appId: AppId, signal?: AbortSignal) => {\n const { data } = await client.get('/apps/{appId}/password', { path: { appId } }, { signal });\n\n return data;\n };\n\n /** Replaces any existing password. Read it back with {@link getAppPassword}. */\n const resetAppPassword = async (appId: AppId, signal?: AbortSignal) => {\n const { data } = await client.post(\n '/apps/{appId}/password/reset',\n { path: { appId } },\n { signal },\n );\n\n return data;\n };\n\n /** App-wide runs, newest first — where a failed deployment's `failureReason` lives. */\n const getAppRuns = async (appId: AppId, query: GetAppRunsQuery = {}, signal?: AbortSignal) => {\n const { data } = await client.get('/apps/{appId}/runs', { path: { appId }, query }, { signal });\n\n return data;\n };\n\n const getAppRun = async (appId: AppId, runId: RunId, signal?: AbortSignal) => {\n const { data } = await client.get(\n '/apps/{appId}/runs/{runId}',\n { path: { appId, runId } },\n { signal },\n );\n\n return data;\n };\n\n /**\n * Deploys the current config version as a new immutable deployment.\n *\n * - Promotes it unless `body.promote` is `false`; a staged release never runs until promoted.\n * - Returns synchronously; readiness does not.\n */\n const createDeployment = async (\n appId: AppId,\n body?: CreateDeploymentBody,\n options: WriteOptions = {},\n ) => {\n const { data } = await client.post(\n '/apps/{appId}/deployments',\n { path: { appId }, body },\n writeOptions(options),\n );\n\n return data;\n };\n\n /** Live deployment history, newest first; `query.archived: true` lists the deleted ones instead. */\n const getDeployments = async (\n appId: AppId,\n query: GetDeploymentsQuery = {},\n signal?: AbortSignal,\n ) => {\n const { data } = await client.get(\n '/apps/{appId}/deployments',\n { path: { appId }, query },\n { signal },\n );\n\n return data;\n };\n\n const getDeployment = async (appId: AppId, deploymentId: DeploymentId, signal?: AbortSignal) => {\n const { data } = await client.get(\n '/apps/{appId}/deployments/{deploymentId}',\n { path: { appId, deploymentId } },\n { signal },\n );\n\n return data;\n };\n\n /** Deletes the deployment, keeping its row as `archived`. `409` while it is production. */\n const deleteDeployment = async (\n appId: AppId,\n deploymentId: DeploymentId,\n signal?: AbortSignal,\n ) => {\n await client.delete(\n '/apps/{appId}/deployments/{deploymentId}',\n { path: { appId, deploymentId } },\n { signal },\n );\n };\n\n /**\n * Makes this deployment production; also the rollback.\n *\n * - Routing switches once it serves; `desired`/`actualDeploymentId` differ until then.\n */\n const promoteDeployment = async (\n appId: AppId,\n deploymentId: DeploymentId,\n signal?: AbortSignal,\n ): Promise<App> => {\n const { data } = await client.post(\n '/apps/{appId}/deployments/{deploymentId}/promote',\n { path: { appId, deploymentId } },\n { signal },\n );\n\n return data;\n };\n\n /**\n * Starts a draft that live-syncs an existing branch of the app's Git repository on its own host.\n *\n * - `400` when `body.gitBranch` does not exist; a draft never creates a branch.\n * - `409` until the app has been deployed once.\n * - Not idempotent: a retried request starts a second draft.\n */\n const createDraft = async (appId: AppId, body: CreateDraftBody, options: WriteOptions = {}) => {\n const { data } = await client.post(\n '/apps/{appId}/drafts',\n { path: { appId }, body },\n writeOptions(options),\n );\n\n return data;\n };\n\n /** Live drafts, newest first. */\n const getDrafts = async (appId: AppId, query: GetDraftsQuery = {}, signal?: AbortSignal) => {\n const { data } = await client.get(\n '/apps/{appId}/drafts',\n { path: { appId }, query },\n { signal },\n );\n\n return data;\n };\n\n const getDraft = async (appId: AppId, draftId: DraftId, signal?: AbortSignal) => {\n const { data } = await client.get(\n '/apps/{appId}/drafts/{draftId}',\n { path: { appId, draftId } },\n { signal },\n );\n\n return data;\n };\n\n /** Stops and removes the draft; its Git branch is untouched. */\n const deleteDraft = async (appId: AppId, draftId: DraftId, signal?: AbortSignal) => {\n await client.delete('/apps/{appId}/drafts/{draftId}', { path: { appId, draftId } }, { signal });\n };\n\n /**\n * A 60-second link that opens the draft's own `url` without the app's authentication.\n *\n * - `400` while the draft has no `url` yet; retry once it reports one.\n * - `503` on a stack without preview links.\n */\n const createDraftPreviewLink = async (appId: AppId, draftId: DraftId, signal?: AbortSignal) => {\n const { data } = await client.post(\n '/apps/{appId}/drafts/{draftId}/preview-link',\n { path: { appId, draftId } },\n { signal },\n );\n\n return data;\n };\n\n /** Serving container's log. `query.since` and `query.lines` are mutually exclusive. */\n const getAppLogsTail = (appId: AppId, { query, signal }: LogsTailOptions = {}) =>\n readAppLogsTail(() =>\n client.get('/apps/{appId}/logs/tail', { path: { appId }, query }, { signal }),\n );\n\n const getAppLogsDownload = (appId: AppId, signal?: AbortSignal) =>\n readAppLogsDownload(() =>\n client.get('/apps/{appId}/logs/download', { path: { appId } }, { signal }),\n );\n\n const getDeploymentLogsTail = (\n appId: AppId,\n deploymentId: DeploymentId,\n { query, signal }: LogsTailOptions = {},\n ) =>\n readAppLogsTail(() =>\n client.get(\n '/apps/{appId}/deployments/{deploymentId}/logs/tail',\n { path: { appId, deploymentId }, query },\n { signal },\n ),\n );\n\n const getDeploymentLogsDownload = (\n appId: AppId,\n deploymentId: DeploymentId,\n signal?: AbortSignal,\n ) =>\n readAppLogsDownload(() =>\n client.get(\n '/apps/{appId}/deployments/{deploymentId}/logs/download',\n { path: { appId, deploymentId } },\n { signal },\n ),\n );\n\n /** `409` when the app has no Git repository configured. */\n const getAppGitRepo = async (appId: AppId, signal?: AbortSignal) => {\n const { data } = await client.get('/apps/{appId}/git-repo', { path: { appId } }, { signal });\n\n return data;\n };\n\n /**\n * The branches of the app's repository, read with the credentials in its saved configuration.\n *\n * - The request carries no credentials: changes to the Git settings count only once saved.\n * - `409` when the app has no Git repository, or the saved credentials cannot read it.\n */\n const getAppGitRepoBranches = async (appId: AppId, signal?: AbortSignal) => {\n const { data } = await client.get(\n '/apps/{appId}/git-repo/branches',\n { path: { appId } },\n { signal },\n );\n\n return data;\n };\n\n /**\n * The Streamlit entrypoint candidates in the repository root, read like `getAppGitRepoBranches`.\n *\n * - `query.ref` omitted means the saved branch, then the repository default.\n */\n const getAppGitRepoEntrypoints = async (\n appId: AppId,\n query: GetAppGitEntrypointsQuery = {},\n signal?: AbortSignal,\n ) => {\n const { data } = await client.get(\n '/apps/{appId}/git-repo/entrypoints',\n { path: { appId }, query },\n { signal },\n );\n\n return data;\n };\n\n /** Per app, not per deployment. */\n const getAppGitRepoCredentials = async (appId: AppId, signal?: AbortSignal) => {\n const { data } = await client.get(\n '/apps/{appId}/git-repo/credentials',\n { path: { appId } },\n { signal },\n );\n\n return data;\n };\n\n const getAppGitRepoCredential = async (\n appId: AppId,\n credentialId: CredentialId,\n signal?: AbortSignal,\n ) => {\n const { data } = await client.get(\n '/apps/{appId}/git-repo/credentials/{credentialId}',\n { path: { appId, credentialId } },\n { signal },\n );\n\n return data;\n };\n\n /** An `http_token` credential's `secret` is returned only here. */\n const createAppGitRepoCredential = async (\n appId: AppId,\n body: CreateCredentialBody,\n options: WriteOptions = {},\n ) => {\n const { data } = await client.post(\n '/apps/{appId}/git-repo/credentials',\n { path: { appId }, body },\n writeOptions(options),\n );\n\n return data;\n };\n\n const deleteAppGitRepoCredential = async (\n appId: AppId,\n credentialId: CredentialId,\n signal?: AbortSignal,\n ) => {\n await client.delete(\n '/apps/{appId}/git-repo/credentials/{credentialId}',\n { path: { appId, credentialId } },\n { signal },\n );\n };\n\n return {\n healthCheck,\n getApps,\n getApp,\n createApp,\n deleteApp,\n unpublishApp,\n suspendApp,\n resumeApp,\n getAppPassword,\n resetAppPassword,\n getAppRuns,\n getAppRun,\n createDeployment,\n getDeployments,\n getDeployment,\n deleteDeployment,\n promoteDeployment,\n createDraft,\n getDrafts,\n getDraft,\n deleteDraft,\n createDraftPreviewLink,\n getAppLogsTail,\n getAppLogsDownload,\n getDeploymentLogsTail,\n getDeploymentLogsDownload,\n getAppGitRepo,\n getAppGitRepoBranches,\n getAppGitRepoEntrypoints,\n getAppGitRepoCredentials,\n getAppGitRepoCredential,\n createAppGitRepoCredential,\n deleteAppGitRepoCredential,\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,WAAW,MAAM,OAAO;CAG1D,MAAM,EAAE,WAAW,YAAYC;CAE/B,IAAI,OAAO,cAAc,YAAY,OAAO,YAAY,UAAU,OAAO;CAEzE,OAAO;EACL;E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DACA,EAAE,MAAM;GAAE;GAAO;EAAa,EAAE,GAChC,EAAE,OAAO,CACX;EAEA,OAAO;CACT;;CAGA,MAAM,6BAA6B,OACjC,OACA,MACA,UAAwB,CAAC,MACtB;EACH,MAAM,EAAE,SAAS,MAAM,OAAO,KAC5B,sCACA;GAAE,MAAM,EAAE,MAAM;GAAG;EAAK,GACxB,aAAa,OAAO,CACtB;EAEA,OAAO;CACT;CAEA,MAAM,6BAA6B,OACjC,OACA,cACA,WACG;EACH,MAAM,OAAO,OACX,qDACA,EAAE,MAAM;GAAE;GAAO;EAAa,EAAE,GAChC,EAAE,OAAO,CACX;CACF;CAEA,OAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;AACF"}
|
package/dist/assets/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as ClientInitOptions } from "../types-
|
|
1
|
+
import { n as ClientInitOptions } from "../types-CbM2MApW.cjs";
|
|
2
2
|
declare const createAssetsClient: ({ baseUrl, middlewares }: Omit<ClientInitOptions, 'auth'>) => {
|
|
3
3
|
getPublishedChangelogPosts: (signal?: AbortSignal) => Promise<{
|
|
4
4
|
title: string;
|
package/dist/assets/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as ClientInitOptions } from "../types-
|
|
1
|
+
import { n as ClientInitOptions } from "../types-CP8-CssY.js";
|
|
2
2
|
declare const createAssetsClient: ({ baseUrl, middlewares }: Omit<ClientInitOptions, 'auth'>) => {
|
|
3
3
|
getPublishedChangelogPosts: (signal?: AbortSignal) => Promise<{
|
|
4
4
|
title: string;
|
package/dist/auth/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_authClient = require("../authClient-
|
|
2
|
+
const require_authClient = require("../authClient-C3KG9hXw.cjs");
|
|
3
3
|
exports.MFA_METHOD = require_authClient.MFA_METHOD;
|
|
4
4
|
exports.apiLoginResultSchema = require_authClient.apiLoginResultSchema;
|
|
5
5
|
exports.apiLoginSuccessSchema = require_authClient.apiLoginSuccessSchema;
|
package/dist/auth/index.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as PasswordInput, C as ApiLoginSuccess, D as LoginUser, E as LoginResultFor, F as mfaChallengeSchema, I as oidcInputSchema, L as passwordInputSchema, M as apiLoginSuccessSchema, N as browserLoginResultSchema, O as MfaChallenge, P as browserLoginSuccessSchema, S as ApiLoginResult, T as BrowserLoginSuccess, _ as MfaWebauthnInput, a as RefreshTokenInput, b as mfaWebauthnInputSchema, c as ChangePasswordInput, d as changeInputSchema, f as resetInputSchema, g as MfaMethod, h as MfaCodeInput, i as RefreshSessionInput, j as apiLoginResultSchema, k as OidcInput, l as ResetInput, m as MFA_METHOD, n as AuthOpenApiFetchClient, o as refreshSessionInputSchema, p as resetRequestInputSchema, r as createAuthClient, s as refreshTokenInputSchema, t as AuthClientInitOptions, u as ResetRequestInput, v as TotpVerifyInput, w as BrowserLoginResult, x as totpVerifyInputSchema, y as mfaCodeInputSchema } from "../authClient-
|
|
1
|
+
import { A as PasswordInput, C as ApiLoginSuccess, D as LoginUser, E as LoginResultFor, F as mfaChallengeSchema, I as oidcInputSchema, L as passwordInputSchema, M as apiLoginSuccessSchema, N as browserLoginResultSchema, O as MfaChallenge, P as browserLoginSuccessSchema, S as ApiLoginResult, T as BrowserLoginSuccess, _ as MfaWebauthnInput, a as RefreshTokenInput, b as mfaWebauthnInputSchema, c as ChangePasswordInput, d as changeInputSchema, f as resetInputSchema, g as MfaMethod, h as MfaCodeInput, i as RefreshSessionInput, j as apiLoginResultSchema, k as OidcInput, l as ResetInput, m as MFA_METHOD, n as AuthOpenApiFetchClient, o as refreshSessionInputSchema, p as resetRequestInputSchema, r as createAuthClient, s as refreshTokenInputSchema, t as AuthClientInitOptions, u as ResetRequestInput, v as TotpVerifyInput, w as BrowserLoginResult, x as totpVerifyInputSchema, y as mfaCodeInputSchema } from "../authClient-UKeopxZZ.cjs";
|
|
2
2
|
export { ApiLoginResult, ApiLoginSuccess, AuthClientInitOptions, AuthOpenApiFetchClient, BrowserLoginResult, BrowserLoginSuccess, ChangePasswordInput, LoginResultFor, LoginUser, MFA_METHOD, MfaChallenge, MfaCodeInput, MfaMethod, MfaWebauthnInput, OidcInput, PasswordInput, RefreshSessionInput, RefreshTokenInput, ResetInput, ResetRequestInput, TotpVerifyInput, apiLoginResultSchema, apiLoginSuccessSchema, browserLoginResultSchema, browserLoginSuccessSchema, changeInputSchema, createAuthClient, mfaChallengeSchema, mfaCodeInputSchema, mfaWebauthnInputSchema, oidcInputSchema, passwordInputSchema, refreshSessionInputSchema, refreshTokenInputSchema, resetInputSchema, resetRequestInputSchema, totpVerifyInputSchema };
|
package/dist/auth/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as PasswordInput, C as ApiLoginSuccess, D as LoginUser, E as LoginResultFor, F as mfaChallengeSchema, I as oidcInputSchema, L as passwordInputSchema, M as apiLoginSuccessSchema, N as browserLoginResultSchema, O as MfaChallenge, P as browserLoginSuccessSchema, S as ApiLoginResult, T as BrowserLoginSuccess, _ as MfaWebauthnInput, a as RefreshTokenInput, b as mfaWebauthnInputSchema, c as ChangePasswordInput, d as changeInputSchema, f as resetInputSchema, g as MfaMethod, h as MfaCodeInput, i as RefreshSessionInput, j as apiLoginResultSchema, k as OidcInput, l as ResetInput, m as MFA_METHOD, n as AuthOpenApiFetchClient, o as refreshSessionInputSchema, p as resetRequestInputSchema, r as createAuthClient, s as refreshTokenInputSchema, t as AuthClientInitOptions, u as ResetRequestInput, v as TotpVerifyInput, w as BrowserLoginResult, x as totpVerifyInputSchema, y as mfaCodeInputSchema } from "../authClient-
|
|
1
|
+
import { A as PasswordInput, C as ApiLoginSuccess, D as LoginUser, E as LoginResultFor, F as mfaChallengeSchema, I as oidcInputSchema, L as passwordInputSchema, M as apiLoginSuccessSchema, N as browserLoginResultSchema, O as MfaChallenge, P as browserLoginSuccessSchema, S as ApiLoginResult, T as BrowserLoginSuccess, _ as MfaWebauthnInput, a as RefreshTokenInput, b as mfaWebauthnInputSchema, c as ChangePasswordInput, d as changeInputSchema, f as resetInputSchema, g as MfaMethod, h as MfaCodeInput, i as RefreshSessionInput, j as apiLoginResultSchema, k as OidcInput, l as ResetInput, m as MFA_METHOD, n as AuthOpenApiFetchClient, o as refreshSessionInputSchema, p as resetRequestInputSchema, r as createAuthClient, s as refreshTokenInputSchema, t as AuthClientInitOptions, u as ResetRequestInput, v as TotpVerifyInput, w as BrowserLoginResult, x as totpVerifyInputSchema, y as mfaCodeInputSchema } from "../authClient-CbWpMmdX.js";
|
|
2
2
|
export { ApiLoginResult, ApiLoginSuccess, AuthClientInitOptions, AuthOpenApiFetchClient, BrowserLoginResult, BrowserLoginSuccess, ChangePasswordInput, LoginResultFor, LoginUser, MFA_METHOD, MfaChallenge, MfaCodeInput, MfaMethod, MfaWebauthnInput, OidcInput, PasswordInput, RefreshSessionInput, RefreshTokenInput, ResetInput, ResetRequestInput, TotpVerifyInput, apiLoginResultSchema, apiLoginSuccessSchema, browserLoginResultSchema, browserLoginSuccessSchema, changeInputSchema, createAuthClient, mfaChallengeSchema, mfaCodeInputSchema, mfaWebauthnInputSchema, oidcInputSchema, passwordInputSchema, refreshSessionInputSchema, refreshTokenInputSchema, resetInputSchema, resetRequestInputSchema, totpVerifyInputSchema };
|
package/dist/auth/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { s as MFA_METHOD,
|
|
1
|
+
export { s as MFA_METHOD, d as apiLoginResultSchema, f as apiLoginSuccessSchema, p as browserLoginResultSchema, m as browserLoginSuccessSchema, i as changeInputSchema, t as createAuthClient, h as mfaChallengeSchema, c as mfaCodeInputSchema, l as mfaWebauthnInputSchema, g as oidcInputSchema, _ as passwordInputSchema, n as refreshSessionInputSchema, r as refreshTokenInputSchema, a as resetInputSchema, o as resetRequestInputSchema, u as totpVerifyInputSchema } from "../authClient-BKGpJI5L.js";
|
package/dist/auth/types.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
export { ApproveDeviceAuthorizationBody, ApproveDeviceAuthorizationResult, AssertSamlBody, AssertSamlResult, CreateDeviceAuthorizationBody, CreateDeviceAuthorizationResult, CreatePatBodyRaw, CreatePatInput, CreatePatResult, DisableTotpPath, ExchangePatBodyRaw, ExchangePatInput, GetDeviceAuthorizationTokenBody, GetDeviceAuthorizationTokenResult, GetMeMaintainersQuery, GetMeMaintainersResult, GetMeOrganizationsQuery, GetMeOrganizationsResult, GetMeProjectsQuery, GetMeProjectsResult, GetPkceTokenBody, GetPkceTokenResult, InitiateSamlBody, InitiateSamlResult, IntrospectTokenResult, ListPatsResult, ListWebauthnCredentialsResult, LoginBody, MeMaintainer, MeOrganization, MeProject, MeResult, MeUser, PatScopeInput, RefreshTokenBody, RefreshTokenPartialBody, RefreshTokenResult, RegenerateRecoveryCodesResult, RegisterWebauthnInput, RegisterWebauthnOptionsResult, RegisterWebauthnResult, RemoveWebauthnInput, RemoveWebauthnPath, RemoveWebauthnQuery, RevokePatPath, RevokeSessionPath, RevokeTokenBody, SudoBody, SudoBodyRaw, SudoChallengeResult, SudoResult, TotpSetupResult, TotpVerifyResult, VerifyMfaBody, VerifyMfaResult, VerifyMfaType };
|
|
1
|
+
import { $ as ApproveDeviceAuthorizationBody, A as PatScopeInput, B as GetMeMaintainersResult, C as GetPkceTokenResult, D as ExchangePatBodyRaw, E as CreatePatResult, F as TotpVerifyResult, G as MeMaintainer, H as GetMeOrganizationsResult, I as VerifyMfaBody, J as MeResult, K as MeOrganization, L as VerifyMfaResult, M as DisableTotpPath, N as RegenerateRecoveryCodesResult, O as ExchangePatInput, P as TotpSetupResult, Q as LoginBody, R as VerifyMfaType, S as GetPkceTokenBody, T as CreatePatInput, U as GetMeProjectsQuery, V as GetMeOrganizationsQuery, W as GetMeProjectsResult, X as UpdateMeInput, Y as MeUser, Z as UpdateMeResult, _ as RevokeSessionPath, a as RemoveWebauthnInput, b as InitiateSamlBody, c as IntrospectTokenResult, d as RefreshTokenResult, et as ApproveDeviceAuthorizationResult, f as RevokeTokenBody, g as SudoResult, h as SudoChallengeResult, i as RegisterWebauthnResult, it as GetDeviceAuthorizationTokenResult, j as RevokePatPath, k as ListPatsResult, l as RefreshTokenBody, m as SudoBodyRaw, n as RegisterWebauthnInput, nt as CreateDeviceAuthorizationResult, o as RemoveWebauthnPath, p as SudoBody, q as MeProject, r as RegisterWebauthnOptionsResult, rt as GetDeviceAuthorizationTokenBody, s as RemoveWebauthnQuery, t as ListWebauthnCredentialsResult, tt as CreateDeviceAuthorizationBody, u as RefreshTokenPartialBody, v as AssertSamlBody, w as CreatePatBodyRaw, x as InitiateSamlResult, y as AssertSamlResult, z as GetMeMaintainersQuery } from "../types-D3L3CqKl.cjs";
|
|
2
|
+
export { ApproveDeviceAuthorizationBody, ApproveDeviceAuthorizationResult, AssertSamlBody, AssertSamlResult, CreateDeviceAuthorizationBody, CreateDeviceAuthorizationResult, CreatePatBodyRaw, CreatePatInput, CreatePatResult, DisableTotpPath, ExchangePatBodyRaw, ExchangePatInput, GetDeviceAuthorizationTokenBody, GetDeviceAuthorizationTokenResult, GetMeMaintainersQuery, GetMeMaintainersResult, GetMeOrganizationsQuery, GetMeOrganizationsResult, GetMeProjectsQuery, GetMeProjectsResult, GetPkceTokenBody, GetPkceTokenResult, InitiateSamlBody, InitiateSamlResult, IntrospectTokenResult, ListPatsResult, ListWebauthnCredentialsResult, LoginBody, MeMaintainer, MeOrganization, MeProject, MeResult, MeUser, PatScopeInput, RefreshTokenBody, RefreshTokenPartialBody, RefreshTokenResult, RegenerateRecoveryCodesResult, RegisterWebauthnInput, RegisterWebauthnOptionsResult, RegisterWebauthnResult, RemoveWebauthnInput, RemoveWebauthnPath, RemoveWebauthnQuery, RevokePatPath, RevokeSessionPath, RevokeTokenBody, SudoBody, SudoBodyRaw, SudoChallengeResult, SudoResult, TotpSetupResult, TotpVerifyResult, UpdateMeInput, UpdateMeResult, VerifyMfaBody, VerifyMfaResult, VerifyMfaType };
|
package/dist/auth/types.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
export { ApproveDeviceAuthorizationBody, ApproveDeviceAuthorizationResult, AssertSamlBody, AssertSamlResult, CreateDeviceAuthorizationBody, CreateDeviceAuthorizationResult, CreatePatBodyRaw, CreatePatInput, CreatePatResult, DisableTotpPath, ExchangePatBodyRaw, ExchangePatInput, GetDeviceAuthorizationTokenBody, GetDeviceAuthorizationTokenResult, GetMeMaintainersQuery, GetMeMaintainersResult, GetMeOrganizationsQuery, GetMeOrganizationsResult, GetMeProjectsQuery, GetMeProjectsResult, GetPkceTokenBody, GetPkceTokenResult, InitiateSamlBody, InitiateSamlResult, IntrospectTokenResult, ListPatsResult, ListWebauthnCredentialsResult, LoginBody, MeMaintainer, MeOrganization, MeProject, MeResult, MeUser, PatScopeInput, RefreshTokenBody, RefreshTokenPartialBody, RefreshTokenResult, RegenerateRecoveryCodesResult, RegisterWebauthnInput, RegisterWebauthnOptionsResult, RegisterWebauthnResult, RemoveWebauthnInput, RemoveWebauthnPath, RemoveWebauthnQuery, RevokePatPath, RevokeSessionPath, RevokeTokenBody, SudoBody, SudoBodyRaw, SudoChallengeResult, SudoResult, TotpSetupResult, TotpVerifyResult, VerifyMfaBody, VerifyMfaResult, VerifyMfaType };
|
|
1
|
+
import { $ as ApproveDeviceAuthorizationBody, A as PatScopeInput, B as GetMeMaintainersResult, C as GetPkceTokenResult, D as ExchangePatBodyRaw, E as CreatePatResult, F as TotpVerifyResult, G as MeMaintainer, H as GetMeOrganizationsResult, I as VerifyMfaBody, J as MeResult, K as MeOrganization, L as VerifyMfaResult, M as DisableTotpPath, N as RegenerateRecoveryCodesResult, O as ExchangePatInput, P as TotpSetupResult, Q as LoginBody, R as VerifyMfaType, S as GetPkceTokenBody, T as CreatePatInput, U as GetMeProjectsQuery, V as GetMeOrganizationsQuery, W as GetMeProjectsResult, X as UpdateMeInput, Y as MeUser, Z as UpdateMeResult, _ as RevokeSessionPath, a as RemoveWebauthnInput, b as InitiateSamlBody, c as IntrospectTokenResult, d as RefreshTokenResult, et as ApproveDeviceAuthorizationResult, f as RevokeTokenBody, g as SudoResult, h as SudoChallengeResult, i as RegisterWebauthnResult, it as GetDeviceAuthorizationTokenResult, j as RevokePatPath, k as ListPatsResult, l as RefreshTokenBody, m as SudoBodyRaw, n as RegisterWebauthnInput, nt as CreateDeviceAuthorizationResult, o as RemoveWebauthnPath, p as SudoBody, q as MeProject, r as RegisterWebauthnOptionsResult, rt as GetDeviceAuthorizationTokenBody, s as RemoveWebauthnQuery, t as ListWebauthnCredentialsResult, tt as CreateDeviceAuthorizationBody, u as RefreshTokenPartialBody, v as AssertSamlBody, w as CreatePatBodyRaw, x as InitiateSamlResult, y as AssertSamlResult, z as GetMeMaintainersQuery } from "../types-BBmS7-IS.js";
|
|
2
|
+
export { ApproveDeviceAuthorizationBody, ApproveDeviceAuthorizationResult, AssertSamlBody, AssertSamlResult, CreateDeviceAuthorizationBody, CreateDeviceAuthorizationResult, CreatePatBodyRaw, CreatePatInput, CreatePatResult, DisableTotpPath, ExchangePatBodyRaw, ExchangePatInput, GetDeviceAuthorizationTokenBody, GetDeviceAuthorizationTokenResult, GetMeMaintainersQuery, GetMeMaintainersResult, GetMeOrganizationsQuery, GetMeOrganizationsResult, GetMeProjectsQuery, GetMeProjectsResult, GetPkceTokenBody, GetPkceTokenResult, InitiateSamlBody, InitiateSamlResult, IntrospectTokenResult, ListPatsResult, ListWebauthnCredentialsResult, LoginBody, MeMaintainer, MeOrganization, MeProject, MeResult, MeUser, PatScopeInput, RefreshTokenBody, RefreshTokenPartialBody, RefreshTokenResult, RegenerateRecoveryCodesResult, RegisterWebauthnInput, RegisterWebauthnOptionsResult, RegisterWebauthnResult, RemoveWebauthnInput, RemoveWebauthnPath, RemoveWebauthnQuery, RevokePatPath, RevokeSessionPath, RevokeTokenBody, SudoBody, SudoBodyRaw, SudoChallengeResult, SudoResult, TotpSetupResult, TotpVerifyResult, UpdateMeInput, UpdateMeResult, VerifyMfaBody, VerifyMfaResult, VerifyMfaType };
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { s as HttpHeader, v as KeboolaHttpHeader } from "./createFetchClient-Dc_ZMuq7.js";
|
|
2
|
-
import { t as validateConnectionStatus } from "./validateConnectionStatus-
|
|
2
|
+
import { n as collectByCursor, t as validateConnectionStatus } from "./validateConnectionStatus-DgJwuEy9.js";
|
|
3
3
|
import { t as createGenericFetchClient } from "./createGenericFetchClient-Ba4E4T-Y.js";
|
|
4
4
|
import { t as createOpenapiFetchClient } from "./createOpenapiFetchClient-DSk29o_s.js";
|
|
5
|
-
import { t as createAbortError } from "./createAbortError-c6ekCpRy.js";
|
|
6
5
|
import * as z$1 from "zod";
|
|
7
6
|
// src/clients/auth/device/device.ts
|
|
8
7
|
const createDevice = (client) => {
|
|
@@ -144,47 +143,6 @@ const createManageTokens = (client) => {
|
|
|
144
143
|
revoke
|
|
145
144
|
};
|
|
146
145
|
};
|
|
147
|
-
// src/utils/async/collectByCursor.ts
|
|
148
|
-
/**
|
|
149
|
-
* The `page[after]` cursor `links.next` carries; `undefined` on the last page.
|
|
150
|
-
*
|
|
151
|
-
* - Read from the link, not rebuilt from the last row, so the encoding stays the server's.
|
|
152
|
-
* - Only the query is parsed, so a relative link works too.
|
|
153
|
-
*/
|
|
154
|
-
const nextCursorOf = (next) => {
|
|
155
|
-
if (next === null) return void 0;
|
|
156
|
-
const queryStart = next.indexOf("?");
|
|
157
|
-
if (queryStart === -1) return void 0;
|
|
158
|
-
const query = next.slice(queryStart + 1).split("#")[0];
|
|
159
|
-
return new URLSearchParams(query).get("page[after]") ?? void 0;
|
|
160
|
-
};
|
|
161
|
-
/**
|
|
162
|
-
* Collects items from a cursor-paginated endpoint — up to `limit`, or all when it is omitted.
|
|
163
|
-
*
|
|
164
|
-
* - Calls `fetchFrom` sequentially with the cursor each `links.next` carries, and hands it `pageSize`.
|
|
165
|
-
* - Ends on a `null` `links.next`, or on a link without a `page[after]`.
|
|
166
|
-
* - A cursor seen before means the server is looping; the walk throws rather than spin.
|
|
167
|
-
*/
|
|
168
|
-
const collectByCursor = async ({ fetchFrom, pageSize, limit, signal }) => {
|
|
169
|
-
if (signal?.aborted) throw createAbortError(signal.reason);
|
|
170
|
-
if (limit !== void 0 && limit < 0) throw new Error("Invalid collectByCursor limit");
|
|
171
|
-
if (pageSize !== void 0 && pageSize < 1) throw new Error("Invalid collectByCursor pageSize");
|
|
172
|
-
const items = [];
|
|
173
|
-
if (limit === 0) return items;
|
|
174
|
-
let after;
|
|
175
|
-
const seen = /* @__PURE__ */ new Set();
|
|
176
|
-
do {
|
|
177
|
-
const page = await fetchFrom(after, pageSize, signal);
|
|
178
|
-
items.push(...page.data);
|
|
179
|
-
if (limit !== void 0 && items.length >= limit) return items.slice(0, limit);
|
|
180
|
-
after = nextCursorOf(page.links.next);
|
|
181
|
-
if (after !== void 0) {
|
|
182
|
-
if (seen.has(after)) throw new Error(`collectByCursor: links.next repeats the cursor ${after}`);
|
|
183
|
-
seen.add(after);
|
|
184
|
-
}
|
|
185
|
-
} while (after !== void 0);
|
|
186
|
-
return items;
|
|
187
|
-
};
|
|
188
146
|
// src/clients/auth/me/me.ts
|
|
189
147
|
const PAGE_LIMIT = 200;
|
|
190
148
|
/**
|
|
@@ -199,6 +157,16 @@ const createMe = (client) => {
|
|
|
199
157
|
const { data } = await client.get("/v1/auth/me", {}, { signal });
|
|
200
158
|
return data;
|
|
201
159
|
};
|
|
160
|
+
/**
|
|
161
|
+
* Renames the caller: `name` is the only field, trimmed by Connection (1-255 characters).
|
|
162
|
+
*
|
|
163
|
+
* - Resolves the updated `user`, the same shape as `get`'s; an unchanged name is a no-op.
|
|
164
|
+
* - `400 validation.failed` for an empty or too long name.
|
|
165
|
+
*/
|
|
166
|
+
const update = async (input, signal) => {
|
|
167
|
+
const { data } = await client.patch("/v1/auth/me", { body: input }, { signal });
|
|
168
|
+
return data;
|
|
169
|
+
};
|
|
202
170
|
const getOrganizations = async (query, signal) => {
|
|
203
171
|
const { data } = await client.get("/v1/auth/me/organizations", { query }, { signal });
|
|
204
172
|
return data;
|
|
@@ -231,6 +199,7 @@ const createMe = (client) => {
|
|
|
231
199
|
});
|
|
232
200
|
return {
|
|
233
201
|
get,
|
|
202
|
+
update,
|
|
234
203
|
getOrganizations,
|
|
235
204
|
getMaintainers,
|
|
236
205
|
getProjects,
|
|
@@ -574,6 +543,6 @@ const createAuthClient = ({ baseUrl, middlewares }) => {
|
|
|
574
543
|
webauthn: createWebauthn(client)
|
|
575
544
|
};
|
|
576
545
|
};
|
|
577
|
-
export {
|
|
546
|
+
export { passwordInputSchema as _, resetInputSchema as a, mfaCodeInputSchema as c, apiLoginResultSchema as d, apiLoginSuccessSchema as f, oidcInputSchema as g, mfaChallengeSchema as h, changeInputSchema as i, mfaWebauthnInputSchema as l, browserLoginSuccessSchema as m, refreshSessionInputSchema as n, resetRequestInputSchema as o, browserLoginResultSchema as p, refreshTokenInputSchema as r, MFA_METHOD as s, createAuthClient as t, totpVerifyInputSchema as u };
|
|
578
547
|
|
|
579
|
-
//# sourceMappingURL=authClient-
|
|
548
|
+
//# sourceMappingURL=authClient-BKGpJI5L.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authClient-BKGpJI5L.js","names":["z","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/manageTokens/manageTokens.ts","../src/clients/auth/me/me.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/schemas.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\nconst loginInputSchema = z.object({\n /** Also mints a session cookie; `Origin` must be the stack app URL, else 403. */\n browserMode: z.boolean().default(false),\n});\n\nexport const passwordInputSchema = loginInputSchema.extend({\n email: z.email(),\n password: z.string().min(1, 'Required'),\n});\n\nexport const oidcInputSchema = loginInputSchema.extend({\n grantType: z.enum(['google', 'microsoft']),\n idToken: z.string().min(1, 'Required'),\n});\n\n// No `browserMode`: as `boolean` it would widen the result; the method signature keeps the literal.\nexport type PasswordInput = Omit<z.input<typeof passwordInputSchema>, 'browserMode'>;\nexport type OidcInput = Omit<z.input<typeof oidcInputSchema>, 'browserMode'>;\n\nconst userSchema = z.object({\n id: z.number(),\n email: z.string(),\n name: z.string(),\n});\n\n// The backend omits `mfaRequired` on success; the `false` default makes it the union discriminant.\nconst loginSuccessBaseSchema = z.object({\n mfaRequired: z.literal(false).default(false),\n accessToken: z.string(),\n tokenType: z.string(),\n expiresIn: z.number(),\n user: userSchema,\n sessionId: z.string(),\n});\n\nexport const apiLoginSuccessSchema = loginSuccessBaseSchema.extend({\n refreshToken: z.string(),\n});\n\nexport const browserLoginSuccessSchema = loginSuccessBaseSchema.extend({\n refreshToken: z.null().optional(),\n});\n\n/**\n * MFA-challenge shape.\n *\n * - `mfaType` / `allowedMethods` stay `string` so a new method still parses.\n * - `webauthn` is `PublicKeyCredentialRequestOptionsJSON`: present, `null` or absent (TOTP).\n * - `unknown`: a stricter shape failing would block every MFA sign-in; the ceremony validates.\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 // zod 4 `z.unknown()` is not implicitly optional; TOTP challenges omit the key.\n webauthn: z.unknown().optional(),\n});\n\nexport const apiLoginResultSchema = z.union([apiLoginSuccessSchema, mfaChallengeSchema]);\nexport const browserLoginResultSchema = z.union([browserLoginSuccessSchema, mfaChallengeSchema]);\n\nexport type LoginUser = z.infer<typeof userSchema>;\nexport type MfaChallenge = z.infer<typeof mfaChallengeSchema>;\nexport type ApiLoginSuccess = z.infer<typeof apiLoginSuccessSchema>;\nexport type BrowserLoginSuccess = z.infer<typeof browserLoginSuccessSchema>;\nexport type ApiLoginResult = z.infer<typeof apiLoginResultSchema>;\nexport type BrowserLoginResult = z.infer<typeof browserLoginResultSchema>;\n\nexport type LoginResultFor<Browser extends boolean> = Browser extends true\n ? BrowserLoginResult\n : ApiLoginResult;\n","import type { AuthOpenApiFetchClient } from '../authClient';\n\nimport type { LoginResultFor, OidcInput, PasswordInput } from './schemas';\nimport {\n apiLoginResultSchema,\n browserLoginResultSchema,\n oidcInputSchema,\n passwordInputSchema,\n} 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 /**\n * Grants parse with our own schemas — the generated response type is unreliable.\n *\n * - `browserMode` picks the schema: only API mode carries a refresh token.\n * - `const Browser` keeps the literal; a `boolean` flag widens the result to the union.\n */\n const withPassword = async <const Browser extends boolean = false>(\n input: Omit<PasswordInput, 'browserMode'> & { browserMode?: Browser },\n signal?: AbortSignal,\n ) => {\n const { email, password, browserMode } = passwordInputSchema.parse(input);\n // Cast: omit fields outside the grant — the backend rejects null.\n const data = await _login(\n { grantType: 'password', email, password, browserMode } as LoginBody,\n signal,\n );\n const schema = browserMode ? browserLoginResultSchema : apiLoginResultSchema;\n return schema.parse(data) as LoginResultFor<Browser>;\n };\n\n const withOidc = async <const Browser extends boolean = false>(\n input: Omit<OidcInput, 'browserMode'> & { browserMode?: Browser },\n signal?: AbortSignal,\n ) => {\n const { grantType, idToken, browserMode } = oidcInputSchema.parse(input);\n // Cast: omit fields outside the grant — the backend rejects null.\n const data = await _login({ grantType, idToken, browserMode } as LoginBody, signal);\n const schema = browserMode ? browserLoginResultSchema : apiLoginResultSchema;\n return schema.parse(data) as LoginResultFor<Browser>;\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 type { AuthOpenApiFetchClient } from '../authClient';\n\nimport type { CreateManageTokenInput, RevokeManageTokenPath } from './types';\n\nexport const createManageTokens = (client: AuthOpenApiFetchClient) => {\n /**\n * Every Manage API token the caller owns, in two lists.\n *\n * - `tokens` — the ones the caller created by hand, newest first.\n * - `sessionTokens` — the ones a browser sign-in minted, newest first.\n * - A token carries `scopes: []` when it merely inherits the caller's own permissions.\n */\n const getAll = async (signal?: AbortSignal) => {\n const { data } = await client.get('/v1/auth/manage-tokens', {}, { signal });\n return data;\n };\n\n /**\n * Mint a token and read its secret.\n *\n * - `token` in the response is returned this once and is unreadable afterwards.\n * - `manageToken` is the same row the list endpoint returns.\n * - Needs an active sudo window; without one the endpoint answers `403`.\n * - Rate-limited per caller, answering `429` with `Retry-After`.\n */\n const create = async (input: CreateManageTokenInput, signal?: AbortSignal) => {\n const { data } = await client.post('/v1/auth/manage-tokens', { body: input }, { signal });\n return data;\n };\n\n /** Deleting an id that is already gone answers `404` — the call is not idempotent. */\n const revoke = async (id: RevokeManageTokenPath['id'], signal?: AbortSignal) => {\n await client.delete('/v1/auth/manage-tokens/{id}', { path: { id } }, { signal });\n };\n\n return { getAll, create, revoke };\n};\n","import { collectByCursor } from '../../../utils';\nimport type { AuthOpenApiFetchClient } from '../authClient';\n\nimport type {\n GetMeMaintainersQuery,\n GetMeOrganizationsQuery,\n GetMeProjectsQuery,\n UpdateMeInput,\n} from './types';\n\n// Connection's `app.auth.me.page.max_limit` (`config/packages/auth_me.yaml`); above it the request is a 400.\nconst PAGE_LIMIT = 200;\n\n/**\n * The signed-in user and the organizations, maintainers and projects they reach.\n *\n * - Session-only: a PAT bearer answers `403`.\n * - `404` while the stack's `programmatic-auth` feature is off.\n */\nexport const createMe = (client: AuthOpenApiFetchClient) => {\n /** Each collection is a counted preview — its first page; the rest is behind the paged methods. */\n const get = async (signal?: AbortSignal) => {\n const { data } = await client.get('/v1/auth/me', {}, { signal });\n return data;\n };\n\n /**\n * Renames the caller: `name` is the only field, trimmed by Connection (1-255 characters).\n *\n * - Resolves the updated `user`, the same shape as `get`'s; an unchanged name is a no-op.\n * - `400 validation.failed` for an empty or too long name.\n */\n const update = async (input: UpdateMeInput, signal?: AbortSignal) => {\n const { data } = await client.patch('/v1/auth/me', { body: input }, { signal });\n return data;\n };\n\n const getOrganizations = async (query?: GetMeOrganizationsQuery, signal?: AbortSignal) => {\n const { data } = await client.get('/v1/auth/me/organizations', { query }, { signal });\n return data;\n };\n\n const getMaintainers = async (query?: GetMeMaintainersQuery, signal?: AbortSignal) => {\n const { data } = await client.get('/v1/auth/me/maintainers', { query }, { signal });\n return data;\n };\n\n const getProjects = async (query?: GetMeProjectsQuery, signal?: AbortSignal) => {\n const { data } = await client.get('/v1/auth/me/projects', { query }, { signal });\n return data;\n };\n\n /** Every organization the caller reaches, across all pages. */\n const getAllOrganizations = (signal?: AbortSignal) =>\n collectByCursor({\n pageSize: PAGE_LIMIT,\n signal,\n fetchFrom: (after, limit, pageSignal) =>\n getOrganizations({ page: { limit, after } }, pageSignal),\n });\n\n /** Every project the caller can open, across all pages. */\n const getAllProjects = (signal?: AbortSignal) =>\n collectByCursor({\n pageSize: PAGE_LIMIT,\n signal,\n fetchFrom: (after, limit, pageSignal) => getProjects({ page: { limit, after } }, pageSignal),\n });\n\n return {\n get,\n update,\n getOrganizations,\n getMaintainers,\n getProjects,\n getAllOrganizations,\n getAllProjects,\n };\n};\n","import * as z from 'zod';\n\nimport type { VerifyMfaType } from './types';\n\n/**\n * Methods `POST /v1/auth/mfa` accepts, also reported in a challenge's `mfaType` / `allowedMethods`.\n *\n * - `satisfies` fails the build if the generated spec renames or drops one.\n * - A challenge may name a method not listed 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, VerifyMfaType>;\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 // Mirrors the backend default; the generated type wrongly marks it required.\n revokeOtherSessions: z.boolean().default(false),\n});\n\nexport type MfaCodeInput = z.infer<typeof mfaCodeInputSchema>;\nexport type MfaWebauthnInput = z.infer<typeof mfaWebauthnInputSchema>;\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 // Defaults to true, matching the backend. 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 // Defaults to true on parse, so the SDK always sends it (matches the backend default).\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`.\nexport type ResetInput = z.input<typeof resetInputSchema>;\n// `z.input`: callers may omit `revokeOtherSessions`.\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 * as z from 'zod';\n\nexport const refreshTokenInputSchema = z.object({\n refreshToken: z.string().min(1, 'Required'),\n});\n\nexport const refreshSessionInputSchema = z.object({\n // The session id the login response carried. The refresh token itself stays in a server-side\n // channel bound to the session cookie, so the client never holds it.\n sessionId: z.string().min(1, 'Required'),\n});\n\nexport type RefreshTokenInput = z.infer<typeof refreshTokenInputSchema>;\nexport type RefreshSessionInput = z.infer<typeof refreshSessionInputSchema>;\n","import { HttpHeader } from '../../../fetchClient';\nimport { KeboolaHttpHeader } from '../../../internal';\nimport type { AuthOpenApiFetchClient } from '../authClient';\n\nimport type { RefreshSessionInput, RefreshTokenInput } from './schemas';\nimport { refreshSessionInputSchema, refreshTokenInputSchema } from './schemas';\nimport type { RefreshTokenBody, RefreshTokenPartialBody, RevokeTokenBody } from './types';\n\nexport const createToken = (client: AuthOpenApiFetchClient) => {\n const _refresh = async (\n body: RefreshTokenPartialBody,\n { signal, headers }: { signal?: AbortSignal; headers?: Record<string, string> } = {},\n ) => {\n const { data } = await client.post(\n '/v1/auth/token/refresh',\n { body: body as RefreshTokenBody },\n { signal, headers },\n );\n\n return data;\n };\n\n /** API mode: rotates the pair. The response carries the next refresh token. */\n const refreshWithToken = async (input: RefreshTokenInput, signal?: AbortSignal) => {\n const { refreshToken } = refreshTokenInputSchema.parse(input);\n return _refresh({ refreshToken }, { signal });\n };\n\n /**\n * Browser/cookie mode: renews the access token off the session cookie.\n *\n * - The `X-KBC-CSRF` header opts in; without it the request is API mode.\n * - Its value is a constant: its presence is the CSRF proof (custom headers need a preflight).\n * - No refresh token in the response; it stays server-side, bound to the cookie.\n * - Works only from the stack's own origin (fetch's default `same-origin` credentials).\n * - An `Authorization` header rejects the request — use a client with no auth middleware.\n */\n const refreshWithSession = async (input: RefreshSessionInput, signal?: AbortSignal) => {\n const { sessionId } = refreshSessionInputSchema.parse(input);\n return _refresh({ sessionId }, { signal, headers: { [KeboolaHttpHeader.CSRF]: '1' } });\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 { refreshWithToken, refreshWithSession, 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 { createManageTokens } from './manageTokens';\nimport { createMe } from './me';\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 manageTokens: createManageTokens(client),\n me: createMe(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,MAAM,mBAAmBA,IAAE,OAAO;;AAEhC,aAAaA,IAAE,QAAQ,CAAC,CAAC,QAAQ,KAAK,EACxC,CAAC;AAED,MAAa,sBAAsB,iBAAiB,OAAO;CACzD,OAAOA,IAAE,MAAM;CACf,UAAUA,IAAE,OAAO,CAAC,CAAC,IAAI,GAAG,UAAU;AACxC,CAAC;AAED,MAAa,kBAAkB,iBAAiB,OAAO;CACrD,WAAWA,IAAE,KAAK,CAAC,UAAU,WAAW,CAAC;CACzC,SAASA,IAAE,OAAO,CAAC,CAAC,IAAI,GAAG,UAAU;AACvC,CAAC;AAMD,MAAM,aAAaA,IAAE,OAAO;CAC1B,IAAIA,IAAE,OAAO;CACb,OAAOA,IAAE,OAAO;CAChB,MAAMA,IAAE,OAAO;AACjB,CAAC;AAGD,MAAM,yBAAyBA,IAAE,OAAO;CACtC,aAAaA,IAAE,QAAQ,KAAK,CAAC,CAAC,QAAQ,KA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AAY;GAAY;EAAoB,EAAE,GACxD,EAAE,OAAO,CACX;EACA,OAAO;CACT;CAIA,MAAM,SAAS,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;;AChBA,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,cAAc,mBAAmB,MAAM;EACvC,IAAI,SAAS,MAAM;EACnB,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,9 +1,8 @@
|
|
|
1
1
|
const require_rolldown_runtime = require("./rolldown-runtime-CmQyd0Gu.cjs");
|
|
2
2
|
const require_createFetchClient = require("./createFetchClient-CDKSkd7i.cjs");
|
|
3
|
-
const require_validateConnectionStatus = require("./validateConnectionStatus-
|
|
3
|
+
const require_validateConnectionStatus = require("./validateConnectionStatus-DpYRsU-e.cjs");
|
|
4
4
|
const require_createGenericFetchClient = require("./createGenericFetchClient-BuYzzV_D.cjs");
|
|
5
5
|
const require_createOpenapiFetchClient = require("./createOpenapiFetchClient-dkssExkU.cjs");
|
|
6
|
-
const require_createAbortError = require("./createAbortError-Dzc9yObN.cjs");
|
|
7
6
|
let zod = require("zod");
|
|
8
7
|
zod = require_rolldown_runtime.__toESM(zod, 1);
|
|
9
8
|
// src/clients/auth/device/device.ts
|
|
@@ -146,47 +145,6 @@ const createManageTokens = (client) => {
|
|
|
146
145
|
revoke
|
|
147
146
|
};
|
|
148
147
|
};
|
|
149
|
-
// src/utils/async/collectByCursor.ts
|
|
150
|
-
/**
|
|
151
|
-
* The `page[after]` cursor `links.next` carries; `undefined` on the last page.
|
|
152
|
-
*
|
|
153
|
-
* - Read from the link, not rebuilt from the last row, so the encoding stays the server's.
|
|
154
|
-
* - Only the query is parsed, so a relative link works too.
|
|
155
|
-
*/
|
|
156
|
-
const nextCursorOf = (next) => {
|
|
157
|
-
if (next === null) return void 0;
|
|
158
|
-
const queryStart = next.indexOf("?");
|
|
159
|
-
if (queryStart === -1) return void 0;
|
|
160
|
-
const query = next.slice(queryStart + 1).split("#")[0];
|
|
161
|
-
return new URLSearchParams(query).get("page[after]") ?? void 0;
|
|
162
|
-
};
|
|
163
|
-
/**
|
|
164
|
-
* Collects items from a cursor-paginated endpoint — up to `limit`, or all when it is omitted.
|
|
165
|
-
*
|
|
166
|
-
* - Calls `fetchFrom` sequentially with the cursor each `links.next` carries, and hands it `pageSize`.
|
|
167
|
-
* - Ends on a `null` `links.next`, or on a link without a `page[after]`.
|
|
168
|
-
* - A cursor seen before means the server is looping; the walk throws rather than spin.
|
|
169
|
-
*/
|
|
170
|
-
const collectByCursor = async ({ fetchFrom, pageSize, limit, signal }) => {
|
|
171
|
-
if (signal?.aborted) throw require_createAbortError.createAbortError(signal.reason);
|
|
172
|
-
if (limit !== void 0 && limit < 0) throw new Error("Invalid collectByCursor limit");
|
|
173
|
-
if (pageSize !== void 0 && pageSize < 1) throw new Error("Invalid collectByCursor pageSize");
|
|
174
|
-
const items = [];
|
|
175
|
-
if (limit === 0) return items;
|
|
176
|
-
let after;
|
|
177
|
-
const seen = /* @__PURE__ */ new Set();
|
|
178
|
-
do {
|
|
179
|
-
const page = await fetchFrom(after, pageSize, signal);
|
|
180
|
-
items.push(...page.data);
|
|
181
|
-
if (limit !== void 0 && items.length >= limit) return items.slice(0, limit);
|
|
182
|
-
after = nextCursorOf(page.links.next);
|
|
183
|
-
if (after !== void 0) {
|
|
184
|
-
if (seen.has(after)) throw new Error(`collectByCursor: links.next repeats the cursor ${after}`);
|
|
185
|
-
seen.add(after);
|
|
186
|
-
}
|
|
187
|
-
} while (after !== void 0);
|
|
188
|
-
return items;
|
|
189
|
-
};
|
|
190
148
|
// src/clients/auth/me/me.ts
|
|
191
149
|
const PAGE_LIMIT = 200;
|
|
192
150
|
/**
|
|
@@ -201,6 +159,16 @@ const createMe = (client) => {
|
|
|
201
159
|
const { data } = await client.get("/v1/auth/me", {}, { signal });
|
|
202
160
|
return data;
|
|
203
161
|
};
|
|
162
|
+
/**
|
|
163
|
+
* Renames the caller: `name` is the only field, trimmed by Connection (1-255 characters).
|
|
164
|
+
*
|
|
165
|
+
* - Resolves the updated `user`, the same shape as `get`'s; an unchanged name is a no-op.
|
|
166
|
+
* - `400 validation.failed` for an empty or too long name.
|
|
167
|
+
*/
|
|
168
|
+
const update = async (input, signal) => {
|
|
169
|
+
const { data } = await client.patch("/v1/auth/me", { body: input }, { signal });
|
|
170
|
+
return data;
|
|
171
|
+
};
|
|
204
172
|
const getOrganizations = async (query, signal) => {
|
|
205
173
|
const { data } = await client.get("/v1/auth/me/organizations", { query }, { signal });
|
|
206
174
|
return data;
|
|
@@ -214,7 +182,7 @@ const createMe = (client) => {
|
|
|
214
182
|
return data;
|
|
215
183
|
};
|
|
216
184
|
/** Every organization the caller reaches, across all pages. */
|
|
217
|
-
const getAllOrganizations = (signal) => collectByCursor({
|
|
185
|
+
const getAllOrganizations = (signal) => require_validateConnectionStatus.collectByCursor({
|
|
218
186
|
pageSize: PAGE_LIMIT,
|
|
219
187
|
signal,
|
|
220
188
|
fetchFrom: (after, limit, pageSignal) => getOrganizations({ page: {
|
|
@@ -223,7 +191,7 @@ const createMe = (client) => {
|
|
|
223
191
|
} }, pageSignal)
|
|
224
192
|
});
|
|
225
193
|
/** Every project the caller can open, across all pages. */
|
|
226
|
-
const getAllProjects = (signal) => collectByCursor({
|
|
194
|
+
const getAllProjects = (signal) => require_validateConnectionStatus.collectByCursor({
|
|
227
195
|
pageSize: PAGE_LIMIT,
|
|
228
196
|
signal,
|
|
229
197
|
fetchFrom: (after, limit, pageSignal) => getProjects({ page: {
|
|
@@ -233,6 +201,7 @@ const createMe = (client) => {
|
|
|
233
201
|
});
|
|
234
202
|
return {
|
|
235
203
|
get,
|
|
204
|
+
update,
|
|
236
205
|
getOrganizations,
|
|
237
206
|
getMaintainers,
|
|
238
207
|
getProjects,
|
|
@@ -612,12 +581,6 @@ Object.defineProperty(exports, "changeInputSchema", {
|
|
|
612
581
|
return changeInputSchema;
|
|
613
582
|
}
|
|
614
583
|
});
|
|
615
|
-
Object.defineProperty(exports, "collectByCursor", {
|
|
616
|
-
enumerable: true,
|
|
617
|
-
get: function() {
|
|
618
|
-
return collectByCursor;
|
|
619
|
-
}
|
|
620
|
-
});
|
|
621
584
|
Object.defineProperty(exports, "createAuthClient", {
|
|
622
585
|
enumerable: true,
|
|
623
586
|
get: function() {
|
|
@@ -642,12 +605,6 @@ Object.defineProperty(exports, "mfaWebauthnInputSchema", {
|
|
|
642
605
|
return mfaWebauthnInputSchema;
|
|
643
606
|
}
|
|
644
607
|
});
|
|
645
|
-
Object.defineProperty(exports, "nextCursorOf", {
|
|
646
|
-
enumerable: true,
|
|
647
|
-
get: function() {
|
|
648
|
-
return nextCursorOf;
|
|
649
|
-
}
|
|
650
|
-
});
|
|
651
608
|
Object.defineProperty(exports, "oidcInputSchema", {
|
|
652
609
|
enumerable: true,
|
|
653
610
|
get: function() {
|
|
@@ -691,4 +648,4 @@ Object.defineProperty(exports, "totpVerifyInputSchema", {
|
|
|
691
648
|
}
|
|
692
649
|
});
|
|
693
650
|
|
|
694
|
-
//# sourceMappingURL=authClient-
|
|
651
|
+
//# sourceMappingURL=authClient-C3KG9hXw.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authClient-C3KG9hXw.cjs","names":["z","collectByCursor","z","z","z","KeboolaHttpHeader","HttpHeader","createOpenapiFetchClient","validateConnectionStatus","createGenericFetchClient"],"sources":["../src/clients/auth/device/device.ts","../src/clients/auth/login/schemas.ts","../src/clients/auth/login/login.ts","../src/clients/auth/manageTokens/manageTokens.ts","../src/clients/auth/me/me.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/schemas.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\nconst loginInputSchema = z.object({\n /** Also mints a session cookie; `Origin` must be the stack app URL, else 403. */\n browserMode: z.boolean().default(false),\n});\n\nexport const passwordInputSchema = loginInputSchema.extend({\n email: z.email(),\n password: z.string().min(1, 'Required'),\n});\n\nexport const oidcInputSchema = loginInputSchema.extend({\n grantType: z.enum(['google', 'microsoft']),\n idToken: z.string().min(1, 'Required'),\n});\n\n// No `browserMode`: as `boolean` it would widen the result; the method signature keeps the literal.\nexport type PasswordInput = Omit<z.input<typeof passwordInputSchema>, 'browserMode'>;\nexport type OidcInput = Omit<z.input<typeof oidcInputSchema>, 'browserMode'>;\n\nconst userSchema = z.object({\n id: z.number(),\n email: z.string(),\n name: z.string(),\n});\n\n// The backend omits `mfaRequired` on success; the `false` default makes it the union discriminant.\nconst loginSuccessBaseSchema = z.object({\n mfaRequired: z.literal(false).default(false),\n accessToken: z.string(),\n tokenType: z.string(),\n expiresIn: z.number(),\n user: userSchema,\n sessionId: z.string(),\n});\n\nexport const apiLoginSuccessSchema = loginSuccessBaseSchema.extend({\n refreshToken: z.string(),\n});\n\nexport const browserLoginSuccessSchema = loginSuccessBaseSchema.extend({\n refreshToken: z.null().optional(),\n});\n\n/**\n * MFA-challenge shape.\n *\n * - `mfaType` / `allowedMethods` stay `string` so a new method still parses.\n * - `webauthn` is `PublicKeyCredentialRequestOptionsJSON`: present, `null` or absent (TOTP).\n * - `unknown`: a stricter shape failing would block every MFA sign-in; the ceremony validates.\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 // zod 4 `z.unknown()` is not implicitly optional; TOTP challenges omit the key.\n webauthn: z.unknown().optional(),\n});\n\nexport const apiLoginResultSchema = z.union([apiLoginSuccessSchema, mfaChallengeSchema]);\nexport const browserLoginResultSchema = z.union([browserLoginSuccessSchema, mfaChallengeSchema]);\n\nexport type LoginUser = z.infer<typeof userSchema>;\nexport type MfaChallenge = z.infer<typeof mfaChallengeSchema>;\nexport type ApiLoginSuccess = z.infer<typeof apiLoginSuccessSchema>;\nexport type BrowserLoginSuccess = z.infer<typeof browserLoginSuccessSchema>;\nexport type ApiLoginResult = z.infer<typeof apiLoginResultSchema>;\nexport type BrowserLoginResult = z.infer<typeof browserLoginResultSchema>;\n\nexport type LoginResultFor<Browser extends boolean> = Browser extends true\n ? BrowserLoginResult\n : ApiLoginResult;\n","import type { AuthOpenApiFetchClient } from '../authClient';\n\nimport type { LoginResultFor, OidcInput, PasswordInput } from './schemas';\nimport {\n apiLoginResultSchema,\n browserLoginResultSchema,\n oidcInputSchema,\n passwordInputSchema,\n} 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 /**\n * Grants parse with our own schemas — the generated response type is unreliable.\n *\n * - `browserMode` picks the schema: only API mode carries a refresh token.\n * - `const Browser` keeps the literal; a `boolean` flag widens the result to the union.\n */\n const withPassword = async <const Browser extends boolean = false>(\n input: Omit<PasswordInput, 'browserMode'> & { browserMode?: Browser },\n signal?: AbortSignal,\n ) => {\n const { email, password, browserMode } = passwordInputSchema.parse(input);\n // Cast: omit fields outside the grant — the backend rejects null.\n const data = await _login(\n { grantType: 'password', email, password, browserMode } as LoginBody,\n signal,\n );\n const schema = browserMode ? browserLoginResultSchema : apiLoginResultSchema;\n return schema.parse(data) as LoginResultFor<Browser>;\n };\n\n const withOidc = async <const Browser extends boolean = false>(\n input: Omit<OidcInput, 'browserMode'> & { browserMode?: Browser },\n signal?: AbortSignal,\n ) => {\n const { grantType, idToken, browserMode } = oidcInputSchema.parse(input);\n // Cast: omit fields outside the grant — the backend rejects null.\n const data = await _login({ grantType, idToken, browserMode } as LoginBody, signal);\n const schema = browserMode ? browserLoginResultSchema : apiLoginResultSchema;\n return schema.parse(data) as LoginResultFor<Browser>;\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 type { AuthOpenApiFetchClient } from '../authClient';\n\nimport type { CreateManageTokenInput, RevokeManageTokenPath } from './types';\n\nexport const createManageTokens = (client: AuthOpenApiFetchClient) => {\n /**\n * Every Manage API token the caller owns, in two lists.\n *\n * - `tokens` — the ones the caller created by hand, newest first.\n * - `sessionTokens` — the ones a browser sign-in minted, newest first.\n * - A token carries `scopes: []` when it merely inherits the caller's own permissions.\n */\n const getAll = async (signal?: AbortSignal) => {\n const { data } = await client.get('/v1/auth/manage-tokens', {}, { signal });\n return data;\n };\n\n /**\n * Mint a token and read its secret.\n *\n * - `token` in the response is returned this once and is unreadable afterwards.\n * - `manageToken` is the same row the list endpoint returns.\n * - Needs an active sudo window; without one the endpoint answers `403`.\n * - Rate-limited per caller, answering `429` with `Retry-After`.\n */\n const create = async (input: CreateManageTokenInput, signal?: AbortSignal) => {\n const { data } = await client.post('/v1/auth/manage-tokens', { body: input }, { signal });\n return data;\n };\n\n /** Deleting an id that is already gone answers `404` — the call is not idempotent. */\n const revoke = async (id: RevokeManageTokenPath['id'], signal?: AbortSignal) => {\n await client.delete('/v1/auth/manage-tokens/{id}', { path: { id } }, { signal });\n };\n\n return { getAll, create, revoke };\n};\n","import { collectByCursor } from '../../../utils';\nimport type { AuthOpenApiFetchClient } from '../authClient';\n\nimport type {\n GetMeMaintainersQuery,\n GetMeOrganizationsQuery,\n GetMeProjectsQuery,\n UpdateMeInput,\n} from './types';\n\n// Connection's `app.auth.me.page.max_limit` (`config/packages/auth_me.yaml`); above it the request is a 400.\nconst PAGE_LIMIT = 200;\n\n/**\n * The signed-in user and the organizations, maintainers and projects they reach.\n *\n * - Session-only: a PAT bearer answers `403`.\n * - `404` while the stack's `programmatic-auth` feature is off.\n */\nexport const createMe = (client: AuthOpenApiFetchClient) => {\n /** Each collection is a counted preview — its first page; the rest is behind the paged methods. */\n const get = async (signal?: AbortSignal) => {\n const { data } = await client.get('/v1/auth/me', {}, { signal });\n return data;\n };\n\n /**\n * Renames the caller: `name` is the only field, trimmed by Connection (1-255 characters).\n *\n * - Resolves the updated `user`, the same shape as `get`'s; an unchanged name is a no-op.\n * - `400 validation.failed` for an empty or too long name.\n */\n const update = async (input: UpdateMeInput, signal?: AbortSignal) => {\n const { data } = await client.patch('/v1/auth/me', { body: input }, { signal });\n return data;\n };\n\n const getOrganizations = async (query?: GetMeOrganizationsQuery, signal?: AbortSignal) => {\n const { data } = await client.get('/v1/auth/me/organizations', { query }, { signal });\n return data;\n };\n\n const getMaintainers = async (query?: GetMeMaintainersQuery, signal?: AbortSignal) => {\n const { data } = await client.get('/v1/auth/me/maintainers', { query }, { signal });\n return data;\n };\n\n const getProjects = async (query?: GetMeProjectsQuery, signal?: AbortSignal) => {\n const { data } = await client.get('/v1/auth/me/projects', { query }, { signal });\n return data;\n };\n\n /** Every organization the caller reaches, across all pages. */\n const getAllOrganizations = (signal?: AbortSignal) =>\n collectByCursor({\n pageSize: PAGE_LIMIT,\n signal,\n fetchFrom: (after, limit, pageSignal) =>\n getOrganizations({ page: { limit, after } }, pageSignal),\n });\n\n /** Every project the caller can open, across all pages. */\n const getAllProjects = (signal?: AbortSignal) =>\n collectByCursor({\n pageSize: PAGE_LIMIT,\n signal,\n fetchFrom: (after, limit, pageSignal) => getProjects({ page: { limit, after } }, pageSignal),\n });\n\n return {\n get,\n update,\n getOrganizations,\n getMaintainers,\n getProjects,\n getAllOrganizations,\n getAllProjects,\n };\n};\n","import * as z from 'zod';\n\nimport type { VerifyMfaType } from './types';\n\n/**\n * Methods `POST /v1/auth/mfa` accepts, also reported in a challenge's `mfaType` / `allowedMethods`.\n *\n * - `satisfies` fails the build if the generated spec renames or drops one.\n * - A challenge may name a method not listed 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, VerifyMfaType>;\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 // Mirrors the backend default; the generated type wrongly marks it required.\n revokeOtherSessions: z.boolean().default(false),\n});\n\nexport type MfaCodeInput = z.infer<typeof mfaCodeInputSchema>;\nexport type MfaWebauthnInput = z.infer<typeof mfaWebauthnInputSchema>;\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 // Defaults to true, matching the backend. 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 // Defaults to true on parse, so the SDK always sends it (matches the backend default).\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`.\nexport type ResetInput = z.input<typeof resetInputSchema>;\n// `z.input`: callers may omit `revokeOtherSessions`.\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 * as z from 'zod';\n\nexport const refreshTokenInputSchema = z.object({\n refreshToken: z.string().min(1, 'Required'),\n});\n\nexport const refreshSessionInputSchema = z.object({\n // The session id the login response carried. The refresh token itself stays in a server-side\n // channel bound to the session cookie, so the client never holds it.\n sessionId: z.string().min(1, 'Required'),\n});\n\nexport type RefreshTokenInput = z.infer<typeof refreshTokenInputSchema>;\nexport type RefreshSessionInput = z.infer<typeof refreshSessionInputSchema>;\n","import { HttpHeader } from '../../../fetchClient';\nimport { KeboolaHttpHeader } from '../../../internal';\nimport type { AuthOpenApiFetchClient } from '../authClient';\n\nimport type { RefreshSessionInput, RefreshTokenInput } from './schemas';\nimport { refreshSessionInputSchema, refreshTokenInputSchema } from './schemas';\nimport type { RefreshTokenBody, RefreshTokenPartialBody, RevokeTokenBody } from './types';\n\nexport const createToken = (client: AuthOpenApiFetchClient) => {\n const _refresh = async (\n body: RefreshTokenPartialBody,\n { signal, headers }: { signal?: AbortSignal; headers?: Record<string, string> } = {},\n ) => {\n const { data } = await client.post(\n '/v1/auth/token/refresh',\n { body: body as RefreshTokenBody },\n { signal, headers },\n );\n\n return data;\n };\n\n /** API mode: rotates the pair. The response carries the next refresh token. */\n const refreshWithToken = async (input: RefreshTokenInput, signal?: AbortSignal) => {\n const { refreshToken } = refreshTokenInputSchema.parse(input);\n return _refresh({ refreshToken }, { signal });\n };\n\n /**\n * Browser/cookie mode: renews the access token off the session cookie.\n *\n * - The `X-KBC-CSRF` header opts in; without it the request is API mode.\n * - Its value is a constant: its presence is the CSRF proof (custom headers need a preflight).\n * - No refresh token in the response; it stays server-side, bound to the cookie.\n * - Works only from the stack's own origin (fetch's default `same-origin` credentials).\n * - An `Authorization` header rejects the request — use a client with no auth middleware.\n */\n const refreshWithSession = async (input: RefreshSessionInput, signal?: AbortSignal) => {\n const { sessionId } = refreshSessionInputSchema.parse(input);\n return _refresh({ sessionId }, { signal, headers: { [KeboolaHttpHeader.CSRF]: '1' } });\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 { refreshWithToken, refreshWithSession, 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 { createManageTokens } from './manageTokens';\nimport { createMe } from './me';\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 manageTokens: createManageTokens(client),\n me: createMe(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,MAAM,mBAAmBA,IAAE,OAAO;;AAEhC,aAAaA,IAAE,QAAQ,CAAC,CAAC,QAAQ,KAAK,EACxC,CAAC;AAED,MAAa,sBAA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K,UAAU,MAAM;EACrB,cAAc,mBAAmB,MAAM;EACvC,IAAI,SAAS,MAAM;EACnB,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 { r as OpenapiBodyType, s as OpenapiPathType, t as createOpenapiFetchClient } from "./index-
|
|
2
|
-
import { n as ClientInitOptions } from "./types-
|
|
3
|
-
import { $ as
|
|
1
|
+
import { r as OpenapiBodyType, s as OpenapiPathType, t as createOpenapiFetchClient } from "./index-9p4O-clX.js";
|
|
2
|
+
import { n as ClientInitOptions } from "./types-CP8-CssY.js";
|
|
3
|
+
import { $ as ApproveDeviceAuthorizationBody, M as DisableTotpPath, O as ExchangePatInput, S as GetPkceTokenBody, T as CreatePatInput, U as GetMeProjectsQuery, V as GetMeOrganizationsQuery, X as UpdateMeInput, _ as RevokeSessionPath, a as RemoveWebauthnInput, at as components, b as InitiateSamlBody, f as RevokeTokenBody, j as RevokePatPath, n as RegisterWebauthnInput, ot as paths, p as SudoBody, r as RegisterWebauthnOptionsResult, rt as GetDeviceAuthorizationTokenBody, tt as CreateDeviceAuthorizationBody, v as AssertSamlBody, z as GetMeMaintainersQuery } from "./types-BBmS7-IS.js";
|
|
4
4
|
import * as z$1 from "zod";
|
|
5
5
|
declare const passwordInputSchema: z$1.ZodObject<{
|
|
6
6
|
browserMode: z$1.ZodDefault<z$1.ZodBoolean>;
|
|
@@ -305,6 +305,9 @@ declare const createAuthClient: ({ baseUrl, middlewares }: AuthClientInitOptions
|
|
|
305
305
|
hasMore: boolean;
|
|
306
306
|
};
|
|
307
307
|
}>;
|
|
308
|
+
update: (input: UpdateMeInput, signal?: AbortSignal) => Promise<{
|
|
309
|
+
user: components['schemas']['MeUser'];
|
|
310
|
+
}>;
|
|
308
311
|
getOrganizations: (query?: GetMeOrganizationsQuery, signal?: AbortSignal) => Promise<{
|
|
309
312
|
data: Record<string, never>[];
|
|
310
313
|
meta: components['schemas']['PaginationMeta'];
|
|
@@ -444,4 +447,4 @@ declare const createAuthClient: ({ baseUrl, middlewares }: AuthClientInitOptions
|
|
|
444
447
|
};
|
|
445
448
|
};
|
|
446
449
|
export { PasswordInput as A, ApiLoginSuccess as C, LoginUser as D, LoginResultFor as E, mfaChallengeSchema as F, oidcInputSchema as I, passwordInputSchema as L, apiLoginSuccessSchema as M, browserLoginResultSchema as N, MfaChallenge as O, browserLoginSuccessSchema as P, ApiLoginResult as S, BrowserLoginSuccess as T, MfaWebauthnInput as _, RefreshTokenInput as a, mfaWebauthnInputSchema as b, ChangePasswordInput as c, changeInputSchema as d, resetInputSchema as f, MfaMethod as g, MfaCodeInput as h, RefreshSessionInput as i, apiLoginResultSchema as j, OidcInput as k, ResetInput as l, MFA_METHOD as m, AuthOpenApiFetchClient as n, refreshSessionInputSchema as o, resetRequestInputSchema as p, createAuthClient as r, refreshTokenInputSchema as s, AuthClientInitOptions as t, ResetRequestInput as u, TotpVerifyInput as v, BrowserLoginResult as w, totpVerifyInputSchema as x, mfaCodeInputSchema as y };
|
|
447
|
-
//# sourceMappingURL=authClient-
|
|
450
|
+
//# sourceMappingURL=authClient-CbWpMmdX.d.ts.map
|