@keboola/api-client 56.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 +10 -2
- package/CHANGELOG.md +45 -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-CUB0JddB.d.ts → adminRoles-CnfGDvjN.d.ts} +2 -2
- package/dist/{adminRoles-BFOPSedO.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-B_Mb4Vzs.js → authClient-BKGpJI5L.js} +13 -2
- package/dist/authClient-BKGpJI5L.js.map +1 -0
- package/dist/{authClient-C9QqhT2M.cjs → authClient-C3KG9hXw.cjs} +17 -6
- package/dist/authClient-C3KG9hXw.cjs.map +1 -0
- package/dist/{authClient-Dgyb0EFi.d.ts → authClient-CbWpMmdX.d.ts} +7 -4
- package/dist/{authClient-DOetdp2k.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-DcKc3_Y1.d.cts → index-9p4O-clX.d.cts} +2033 -72
- package/dist/{index-DcKc3_Y1.d.ts → index-9p4O-clX.d.ts} +2033 -72
- package/dist/{index-CLqZfRpv.d.cts → index-B-HCh7LL.d.cts} +3 -3
- package/dist/{index-CxoJuIzB.d.cts → index-B0e42GnK.d.cts} +4 -3
- package/dist/{index-Bgu3hnMO.d.ts → index-BbXGsspe.d.ts} +4 -4
- package/dist/{index-B7Ogo2SK.d.ts → index-Bg9BWpIY.d.ts} +4 -3
- package/dist/{index-DPhGNQC5.d.cts → index-BgEu7wGk.d.cts} +2559 -7319
- package/dist/{index-C_A0JS9s.d.ts → index-Btft3BFn.d.ts} +29 -3
- package/dist/{index-DXNRd61K.d.cts → index-ByaAn_lm.d.cts} +4 -4
- package/dist/{index-A8udJCGv.d.ts → index-C92Ct6K5.d.ts} +178 -4
- package/dist/{index-B30dBBBH.d.ts → index-CBq59Aif.d.ts} +3 -3
- package/dist/{index-DAb1g6je.d.cts → index-CGUPsu_R.d.cts} +29 -3
- package/dist/{index-CLxvW_pn.d.ts → index-CIA6-x2Q.d.ts} +4 -4
- package/dist/{index-B2YNTI4p.d.ts → index-CeWVf3d1.d.ts} +4 -4
- package/dist/{index-GlHJ4j3a.d.ts → index-Cj0l_DL_.d.ts} +2559 -7319
- package/dist/{index-BUZ-vTRt.d.ts → index-Ck0UPKMM.d.ts} +2 -2
- package/dist/{index-B-HhOTVk.d.cts → index-D0ACg_Pp.d.cts} +7 -4
- package/dist/{index-Dx02AUpZ.d.cts → index-D8nMnVp1.d.cts} +4 -4
- package/dist/{index-24GpnYhn.d.cts → index-DENUPo51.d.cts} +2 -2
- package/dist/{index-RHYdFrfn.d.cts → index-DGjxLWZ-.d.cts} +3 -3
- package/dist/{index-BH1jo-bb.d.ts → index-Dse6Psvc.d.ts} +7 -4
- package/dist/{index-BaJ-GMa7.d.ts → index-DxcaEIhU.d.ts} +3 -3
- package/dist/{index-CpidrJQc.d.cts → index-OCEoQ1Y-.d.cts} +4 -4
- package/dist/{index-DxbqDi_0.d.cts → index-jR69kGUZ.d.cts} +178 -4
- package/dist/index.cjs +615 -867
- 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-qWyZAD-5.d.ts → metaObject-AQ7wKDOu.d.ts} +2 -2
- package/dist/{metaObject-BsBMgWRt.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-CmV1OhK4.d.ts → project-DwRvx_zN.d.ts} +3 -3
- package/dist/{project-F6eHCACz.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 +5 -5
- 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 +5 -5
- package/dist/storage/types.d.ts +5 -5
- package/dist/{storage-jLhVrKZh.cjs → storage-chxoWtAL.cjs} +44 -56
- package/dist/storage-chxoWtAL.cjs.map +1 -0
- package/dist/{storage-Bw-HSnPp.js → storage-o9teEKl_.js} +42 -54
- 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-LOf_GCej.d.cts → types-B1kernzE.d.cts} +2 -2
- package/dist/{types-Cvbcjdgf.d.ts → types-BBmS7-IS.d.ts} +151 -4
- package/dist/{types-DaRxZt3v.d.ts → types-BJyWTgXX.d.ts} +2 -2
- package/dist/{types-CnKiVVb8.d.ts → types-BPNFTA63.d.cts} +21 -7
- package/dist/{types-BJRRAQ9R.d.cts → types-BPSExpye.d.cts} +244 -4
- package/dist/{types-Cg_66Toy.d.ts → types-BiXonOK6.d.ts} +2 -2
- package/dist/{types-CNDemlfn.d.cts → types-BimRBONo.d.cts} +3 -3
- package/dist/{types-CrXoqs8E.d.cts → types-BuEC58u3.d.cts} +2 -2
- package/dist/{types-BnkHyxdp.d.ts → types-BzHyi99r.d.cts} +5 -3
- package/dist/{types-2CMPwArl.d.ts → types-C4T_2JdN.d.cts} +40 -27
- package/dist/{types-lZRyNwOH.d.ts → types-C53aKnWt.d.ts} +2 -2
- package/dist/{types-6oLbURTK.d.cts → types-CEjgqmr2.d.cts} +2 -2
- package/dist/{types-BEEGI4aq.d.ts → types-CGtpwTJk.d.ts} +2 -2
- package/dist/{types-B_yv00AL.d.ts → types-CH1uguug.d.cts} +2 -163
- package/dist/{types-DMEl2iet.d.ts → types-CP8-CssY.d.ts} +2 -2
- package/dist/{types-DgAMVyiT.d.ts → types-CPQ6RkiZ.d.ts} +244 -4
- package/dist/{types-EdL0Eb0B.d.ts → types-CPwofeyq.d.ts} +3 -3
- package/dist/{types-CFuT8zr3.d.cts → types-CQAEOq-K.d.cts} +2 -2
- package/dist/{types-DslO1S5E.d.cts → types-CVWoP_PC.d.cts} +3 -3
- package/dist/{types-BqJycQNM.d.cts → types-CbM2MApW.d.cts} +2 -2
- package/dist/{types-BDGkMVWf.d.cts → types-CbOfT6lb.d.ts} +21 -7
- package/dist/{types-B6OG1lLf.d.cts → types-CcPpqVhm.d.cts} +2 -2
- package/dist/{types-D2J3SaoY.d.ts → types-CeqpzbBH.d.ts} +2 -2
- package/dist/{types-C_JO7FI9.d.cts → types-CjJYZaMO.d.cts} +2 -2
- package/dist/{types-D0Gqu-Xz.d.cts → types-CjP8RcFN.d.cts} +2 -2
- package/dist/{types-CUovU--e.d.ts → types-CjfsPtwk.d.ts} +2 -2
- package/dist/{types-DPFG6AAA.d.ts → types-CnSBLcZB.d.ts} +163 -3
- package/dist/{types-D4knWlwr.d.ts → types-CsXLdnfV.d.ts} +2 -2
- package/dist/{types-C3Kf_ggm.d.cts → types-CzAh5-0z.d.cts} +2 -2
- package/dist/{types-D6Fbf_y3.d.ts → types-D0F_c5KI.d.ts} +4 -4
- package/dist/{types-DykEfF2N.d.cts → types-D3L3CqKl.d.cts} +151 -4
- package/dist/{types--mz2z0Zm.d.cts → types-D4oIei5M.d.cts} +163 -3
- package/dist/{types-Cm1iOHE5.d.cts → types-D6ilG8sC.d.cts} +3 -3
- package/dist/{types-DtS7qAdz.d.cts → types-DEGkXcw2.d.ts} +5 -3
- package/dist/{types-DQguGTlM.d.cts → types-DEhAcO1Z.d.cts} +2 -2
- package/dist/{types-CuYaiy4R.d.cts → types-DaIfg9Mb.d.cts} +4 -4
- package/dist/{types-ByKSM08P.d.ts → types-DhofEmWy.d.ts} +2 -2
- package/dist/{types-B5FgsIiY.d.ts → types-Dp61pYgP.d.ts} +3 -3
- package/dist/{types-BhGr9OQ4.d.ts → types-Dteot3tT.d.ts} +757 -112
- package/dist/{types-3ZE32k8V.d.cts → types-K-JISUUI.d.cts} +757 -112
- package/dist/{types-CjqFLXVx.d.cts → types-TywAc1ow.d.ts} +40 -27
- package/dist/{types-DiXeO0yB.d.ts → types-UBpth6_9.d.ts} +2 -2
- package/dist/{types-D0BOES7q.d.cts → types-Vw-tduOH.d.ts} +2 -163
- package/dist/{types-CF5ZROX5.d.cts → types-ZyLTqgpa.d.cts} +2 -2
- package/dist/{types-BmcZyKgM.d.cts → types-aylD1zQz.d.cts} +3 -3
- package/dist/{types-CbPO9cGq.d.cts → types-fYY4q7dC.d.cts} +2 -2
- package/dist/{types-Foy0RnqF.d.ts → types-jYn3e3Du.d.ts} +3 -3
- package/dist/{types-p6UYqJo_.d.ts → types-qXqJRPHj.d.ts} +2 -2
- package/dist/{types-B452bFfS.d.ts → types-r-Qa3y8e.d.ts} +2 -2
- package/dist/{types-DhE7iY90.d.ts → types-z82j5aNW.d.ts} +3 -3
- package/dist/{collectByCursor-2-8SuJ-8.js → validateConnectionStatus-DgJwuEy9.js} +32 -22
- package/dist/validateConnectionStatus-DgJwuEy9.js.map +1 -0
- package/dist/{collectByCursor-D58__WD1.cjs → validateConnectionStatus-DpYRsU-e.cjs} +37 -21
- 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 +27 -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-B_Mb4Vzs.js.map +0 -1
- package/dist/authClient-C9QqhT2M.cjs.map +0 -1
- package/dist/collectByCursor-2-8SuJ-8.js.map +0 -1
- package/dist/collectByCursor-D58__WD1.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-C6FI_Lc7.d.ts +0 -10
- package/dist/index-CmtqbTse.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-Bw-HSnPp.js.map +0 -1
- package/dist/storage-jLhVrKZh.cjs.map +0 -1
- package/dist/store-2OyH1XOP.cjs.map +0 -1
- package/dist/store-HP0zRcLz.js.map +0 -1
package/AGENTS.md
CHANGED
|
@@ -26,9 +26,15 @@ the working tree to diff, so discard afterwards. See
|
|
|
26
26
|
|
|
27
27
|
## Getting a client
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
| You hold | Use |
|
|
30
|
+
| -------------------------------------------------------------------- | -------------------------------------------------------------------- |
|
|
31
|
+
| A React tree | `useProjectApi()` / `useStackApi()` from `@keboola/api-client-react` |
|
|
32
|
+
| A bearer sign-in (browser or Node) | `createKeboola` — [The bearer client](#the-bearer-client) |
|
|
33
|
+
| A Storage API token | `createStorageClient`, plus the per-service clients you call |
|
|
34
|
+
| A vendor API (`microsoftGraph`) or a public one (`assets`, `status`) | its factory from the sub-path |
|
|
30
35
|
|
|
31
36
|
```ts
|
|
37
|
+
// React: one project's api, provided by `ProjectApiProvider`
|
|
32
38
|
const api = useProjectApi();
|
|
33
39
|
const { data } = useQuery({
|
|
34
40
|
queryKey: storageApiKey.getTable(id),
|
|
@@ -36,225 +42,108 @@ const { data } = useQuery({
|
|
|
36
42
|
});
|
|
37
43
|
```
|
|
38
44
|
|
|
39
|
-
**Scripts / CLIs / non-React.** Create one directly — pick the smallest that covers you:
|
|
40
|
-
|
|
41
|
-
- **`createStorageClient`** — Storage-only. Needs only `baseUrl` + `token`, skipping the stack-info round-trip. Start here when in doubt; upgrading later is mechanical, downgrading is not. (React apps still get their client via `ProjectApiProvider` + `useProjectApi()` — see above; this section is about the non-React/single-service case.)
|
|
42
|
-
- **`createLegacyKeboola` / `createKeboola`** — full SDK across all stack services. `createLegacyKeboola` returns `{ api, session }` and `createKeboola` returns `{ session, getStackApi, getProjectApi }`; drive the `session` to ready, then use the product surface. Bootstrap (`getStackInfo`, to discover services against the actual stack) runs while the storage build resolves, after which `api.stack` is synchronous. The verified token and the dev branches are the consumer's to fetch (`api.storage.tokens.verify()`, `api.storage.branches.getDevBranches()`) and derive with `createProject` / `createBranchRefs` — kbc-ui holds them in TanStack queries (`useProject` reads the token). Every stack service — including `metastore` — is resolved from the stack's advertised service URLs. See the lifecycle section below for the per-flow `session` verbs. The token-less public clients `createAssetsClient` / `createStatusClient` are **not** part of this — import them directly from `@keboola/api-client/assets` and `@keboola/api-client/status`.
|
|
43
|
-
|
|
44
|
-
**`clients/` also holds clients for third-party APIs the platform talks to directly** (`microsoftGraph` today): a vendor API is still HTTP that must run through the shared fetch client, its middleware chain and its error guards, so it gets a client here rather than a hand-rolled `fetch` in the consuming app. They differ from stack clients in three ways, and a new one should follow the same rules: **never** registered in `createServiceClients.ts` (they are not stack services, so they must not appear on `api.*`), they default their own `baseUrl` (a vendor's host and version prefix are part of its API contract, not something we discover or configure), and they carry no `healthCheck` (we don't own the service's liveness). Consumers construct them directly from the sub-path, like the token-less clients above.
|
|
45
|
-
|
|
46
45
|
```ts
|
|
47
|
-
// Storage
|
|
46
|
+
// A Storage API token: Storage, plus any other service with its URL from the stack index
|
|
47
|
+
import { createOauthClient } from '@keboola/api-client/oauth';
|
|
48
48
|
import { createStorageClient } from '@keboola/api-client/storage';
|
|
49
49
|
|
|
50
|
-
const
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
const
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
```ts
|
|
58
|
-
// Full SDK across all services — drive the session to ready, then use `api`
|
|
59
|
-
import { createLegacyKeboola } from '@keboola/api-client';
|
|
60
|
-
|
|
61
|
-
const { api, session } = createLegacyKeboola({ baseUrl: process.env.KEBOOLA_STACK_URL! });
|
|
62
|
-
await session.authenticateStorageAsync(process.env.KEBOOLA_STORAGE_TOKEN!);
|
|
63
|
-
const stack = api.stack; // synchronous — the storage build has resolved
|
|
64
|
-
const buckets = await api.storage.buckets.getBuckets();
|
|
50
|
+
const auth = { type: 'sapi-token', token: process.env.KEBOOLA_STORAGE_TOKEN! } as const;
|
|
51
|
+
const storage = createStorageClient({ baseUrl: process.env.KEBOOLA_STACK_URL!, auth });
|
|
52
|
+
const { services } = await storage.getStackInfo({ exclude: 'componentDetails' });
|
|
53
|
+
const oauthUrl = services.find((service) => service.id === 'oauth')?.url;
|
|
54
|
+
const oauth = oauthUrl ? createOauthClient({ baseUrl: oauthUrl, auth, middlewares: [] }) : null;
|
|
65
55
|
```
|
|
66
56
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
Two flow-specific factories back the SDK:
|
|
70
|
-
|
|
71
|
-
- `createKeboola({ defaultBaseUrl, … })` — the **bearer (OAuth)** flow. Returns
|
|
72
|
-
`{ session, getStackApi, getProjectApi }`; `getStackApi()` is the active stack's surface,
|
|
73
|
-
`getProjectApi(projectId)` one project's (see below).
|
|
74
|
-
- `createLegacyKeboola(opts?)` — the **legacy (SAPI-token)** flow. Returns `{ api, session }`.
|
|
75
|
-
|
|
76
|
-
`api` is the same **flow-agnostic** product surface for both — a state-gating proxy:
|
|
77
|
-
|
|
78
|
-
- **`api.auth.*`** — auth-service client, live once a `baseUrl` is configured.
|
|
79
|
-
- **`api.management.*`** — management client, live once the management realm authenticates.
|
|
80
|
-
- **`api.storage` / `api.queue` / `api.stack` / `api.sdk` / …** — product namespaces. Under the
|
|
81
|
-
legacy flow, live once the async storage build reaches `ready`; under bearer, `api.storage` is live
|
|
82
|
-
from the sign-in on and the rest once the stack index lands (throw `KeboolaError` (`NotReady`)
|
|
83
|
-
before that).
|
|
84
|
-
|
|
85
|
-
`session` is **flow-specific** lifecycle machinery:
|
|
86
|
-
|
|
87
|
-
- bearer: `stack.select(baseUrl)` → `auth.authenticate(credential)`, plus
|
|
88
|
-
`auth.signOut({ baseUrl?, retain? }?)` / `auth.replace(credential)` / `auth.isAuthenticated()` /
|
|
89
|
-
`auth.isAuthenticatedAsync()` / `auth.getHeadersAsync(projectId)` /
|
|
90
|
-
`auth.restoreRetained(baseUrl)`, and `getState()` / `subscribe(cb)` over the stack table. Every verb changes the table synchronously —
|
|
91
|
-
nothing awaits a build; `api.stack` throws `NotReady` until the stack index lands.
|
|
92
|
-
`stack.select` and `auth.signOut` also return a promise that resolves once the change is stored:
|
|
93
|
-
await it before leaving the document, or the reload boots from the stack or sign-in it was meant
|
|
94
|
-
to replace.
|
|
95
|
-
That one fetch is readable both ways: `stack.getContext(baseUrl?)` answers from cache (`null`
|
|
96
|
-
until it lands), and `stack.getContextAsync` awaits it, fetching again after a failure.
|
|
97
|
-
**The table knows no project.** `active` is a stack's `baseUrl`; which project the app is in is
|
|
98
|
-
the app's to keep (kbc-ui: the URL's `:projectId`), and it names it to `getProjectApi`.
|
|
99
|
-
- legacy: `setBaseUrl`, `authenticateStorage(sapiToken)` / `authenticateStorageAsync(sapiToken)`
|
|
100
|
-
(awaits the build), `authenticateManagement(manageToken)`, `isStorageReady()`, `subscribe(cb)`
|
|
101
|
-
(fires on config **and** storage-build transitions) and `debug()`.
|
|
57
|
+
There is no full `api` for a token; `apps/kbc-ui-oauth-external/src/api.ts` is the worked example.
|
|
102
58
|
|
|
103
|
-
|
|
104
|
-
// Legacy (SAPI token in hand): one step to ready
|
|
105
|
-
const { api, session } = createLegacyKeboola({ baseUrl });
|
|
106
|
-
await session.authenticateStorageAsync(token);
|
|
107
|
-
const buckets = await api.storage.buckets.getBuckets(defaultBranchId);
|
|
108
|
-
|
|
109
|
-
// Bearer (OAuth) login flow (browser)
|
|
110
|
-
// `auth` is live from here on
|
|
111
|
-
const { session, getStackApi, getProjectApi } = createKeboola({ defaultBaseUrl: baseUrl });
|
|
112
|
-
const result = await getStackApi().auth.login.withPassword({ email, password });
|
|
113
|
-
if (!result.mfaRequired) session.auth.authenticate({ type: 'token', ...result });
|
|
114
|
-
const api = getProjectApi(projectId); // → every product namespace, for the project the app is in
|
|
115
|
-
```
|
|
59
|
+
A vendor client in `clients/` (`microsoftGraph`):
|
|
116
60
|
|
|
117
|
-
|
|
61
|
+
- is **never** registered in `createServiceClients.ts`, so it never appears on `api.*`;
|
|
62
|
+
- defaults its own `baseUrl` — the vendor's host is part of its contract;
|
|
63
|
+
- carries no `healthCheck` — we don't own its liveness.
|
|
118
64
|
|
|
119
|
-
|
|
120
|
-
so `getProjectApi(projectId)` hands out a product surface per project, off the client already in
|
|
121
|
-
hand:
|
|
65
|
+
## The bearer client
|
|
122
66
|
|
|
123
67
|
```ts
|
|
124
|
-
const { session,
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
const api = getProjectApi(42);
|
|
128
|
-
const other = getProjectApi(7);
|
|
68
|
+
const { session, stackApi, projectApi } = createKeboola({ defaultBaseUrl: baseUrl });
|
|
69
|
+
const result = await stackApi.auth.login.withPassword({ email, password });
|
|
70
|
+
if (!result.mfaRequired) session.auth.authenticate({ type: 'token', ...result });
|
|
129
71
|
|
|
130
|
-
const
|
|
131
|
-
|
|
132
|
-
other.storage.buckets.getBuckets({ branchId: 'default' }),
|
|
133
|
-
]);
|
|
72
|
+
const api = projectApi(projectId);
|
|
73
|
+
const buckets = await api.storage.buckets.getBuckets({ branchId: 'default' });
|
|
134
74
|
```
|
|
135
75
|
|
|
136
|
-
|
|
137
|
-
`
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
`
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
⚠️ **One client per stack, per page.** Two `createKeboola()` instances signed in to the same stack
|
|
180
|
-
share its single-use refresh token: whichever rotates first invalidates the other's, and that one's
|
|
181
|
-
next rotation is refused — which signs it out. Nothing in the SDK detects this (a client has no
|
|
182
|
-
`dispose`, so a live sibling is indistinguishable from an abandoned one). `apps/kbc-ui` builds two
|
|
183
|
-
bearer clients for its two strategies and stays correct only because just one of them ever holds a
|
|
184
|
-
credential.
|
|
185
|
-
|
|
186
|
-
⚠️ **A second `createKeboola()` is not the way to reach a second project — it signs you out of
|
|
187
|
-
both.** Both instances hold the same single-use refresh token, and refresh _rotates_ it, with
|
|
188
|
-
two-phase rotation and replay detection on the server. Whichever instance rotates first invalidates
|
|
189
|
-
the other's token, whose next refresh 401s and signs it out. This is a functional break, not a style
|
|
190
|
-
preference, and it does not depend on a `storage` adapter being configured.
|
|
191
|
-
|
|
192
|
-
In React, `useStackApi()` and `useProjectApi()` read what `StackApiProvider` and
|
|
193
|
-
`ProjectApiProvider` provide; `LegacyAuthProvider` drives a SAPI session to ready and gates on a
|
|
194
|
-
`fallback`. See [`@keboola/api-client-react`](../api-client-react/AGENTS.md).
|
|
195
|
-
|
|
196
|
-
**Persisting the bearer session.** `createKeboola` accepts a `storage` adapter (bearer only). Omit it
|
|
197
|
-
and the session is in-memory (lost on reload); pass a storage adapter to make it durable:
|
|
76
|
+
- **`stackApi`** — the active stack: `auth`, `management`, `baseUrl`, `stack`. It follows
|
|
77
|
+
`session.stack.select`; it is what an app uses before there is a project.
|
|
78
|
+
- **`projectApi(projectId)`** — one project on the active stack, with every namespace.
|
|
79
|
+
- Memoised: `projectApi(7) === projectApi(7)`.
|
|
80
|
+
- Pinned to the stack and the sign-in it was built under; after a sign-out it throws — ask for a
|
|
81
|
+
fresh one.
|
|
82
|
+
- One credential reaches every project on its stack, so several projects are several handles on
|
|
83
|
+
one client.
|
|
84
|
+
- **Namespaces are lazy.** `auth` works from the start; the rest need a sign-in (`NotAuthenticated`
|
|
85
|
+
before one). `api.stack` is `NotReady` until the stack index lands. A call to a service the stack
|
|
86
|
+
does not run rejects with `ServiceUnavailableError`.
|
|
87
|
+
- **The project's token is the caller's to fetch** — `api.storage.tokens.verify()`, derived with
|
|
88
|
+
`createProject`; dev branches likewise, with `createBranchRefs`.
|
|
89
|
+
- **`api.baseUrl`, not `api.stack.host`,** is the URL requests go to.
|
|
90
|
+
|
|
91
|
+
### The session
|
|
92
|
+
|
|
93
|
+
- `stack.select(baseUrl)`, `auth.authenticate` / `replace` / `signOut({ baseUrl?, retain? })` /
|
|
94
|
+
`restoreRetained(baseUrl)` / `isAuthenticated` / `isAuthenticatedAsync`, and `getState()` /
|
|
95
|
+
`subscribe(cb)` over the stack table.
|
|
96
|
+
- Every verb changes the table at once; `stack.select` and `auth.signOut` also resolve once the
|
|
97
|
+
change is stored — await them before leaving the document. `signOut` also waits, bounded, for the
|
|
98
|
+
server session to end.
|
|
99
|
+
- The table knows no project: the app keeps which one it is in and names it to `projectApi`.
|
|
100
|
+
- `stack.getContext(baseUrl?)` reads the stack index from cache (`null` until it lands);
|
|
101
|
+
`stack.getContextAsync` awaits it.
|
|
102
|
+
- `auth.getHeadersAsync(projectId)` is for a transport that is not a fetch client (the chat
|
|
103
|
+
stream); it renews a token near expiry first.
|
|
104
|
+
|
|
105
|
+
### Expiry
|
|
106
|
+
|
|
107
|
+
- A 401 fails the request, never the session: Connection answers an unreachable project with the
|
|
108
|
+
same 401 as a revoked token.
|
|
109
|
+
- A refused refresh is the one sign of a dead credential. It signs the stack out, and `onExpired`
|
|
110
|
+
reports it once per sign-in.
|
|
111
|
+
- `onExpired` also fires when a rotation finds the stack signed out in storage: another tab signed
|
|
112
|
+
out.
|
|
113
|
+
|
|
114
|
+
⚠️ **One client per stack, per page.** Two `createKeboola()` clients signed in to one stack share a
|
|
115
|
+
single-use refresh token, and the first rotation signs the other out. A second project is
|
|
116
|
+
`projectApi(id)` on the same client, never a second client.
|
|
117
|
+
|
|
118
|
+
### Persisting the session
|
|
198
119
|
|
|
199
120
|
```ts
|
|
200
|
-
import { createLocalStorage } from '@keboola/api-client';
|
|
201
|
-
|
|
202
|
-
// `defaultBaseUrl` is active from here on, until `resume()` or `stack.select` moves it.
|
|
203
121
|
const { session } = createKeboola({ defaultBaseUrl, storage: createLocalStorage() });
|
|
204
|
-
|
|
205
|
-
// The stored stack becomes active again; with nothing stored, the default stays.
|
|
206
|
-
// Resolves `restored | empty | expired | unreachable` — `expired` means a stored credential was refused.
|
|
207
|
-
const status = await session.resume();
|
|
122
|
+
const status = await session.resume(); // restored | empty | expired | unreachable
|
|
208
123
|
```
|
|
209
124
|
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
**`localStorage` vs `sessionStorage` — scope, not safety.** Neither is more secure: both are readable
|
|
233
|
-
by any script on the origin (XSS), so the choice is purely about lifetime. `createLocalStorage()`
|
|
234
|
-
survives a browser restart ("stay signed in") and is shared across tabs; `createSessionStorage()` is
|
|
235
|
-
per-tab and cleared when the tab closes. Because neither is XSS-proof, the persisted blob is kept
|
|
236
|
-
minimal — the rotating **refresh token** plus `baseUrl`/`projectId`, never the access token or
|
|
237
|
-
identity; the access token lives only in memory, and the stored refresh token is single-use (rotated
|
|
238
|
-
on every refresh) and server-revocable, so a leaked snapshot has limited, revocable value. The
|
|
239
|
-
genuinely secure option — keeping the refresh token out of JS entirely behind a BFF
|
|
240
|
-
(backend-for-frontend) with an HttpOnly cookie — is out of scope for now.
|
|
241
|
-
|
|
242
|
-
`createStorageClient` exposes the same Storage surface as `api.storage.*` but no lifecycle and no `context` helpers (`baseUrl` / `stack`). Per-service factories (`@keboola/api-client/storage`, `@keboola/api-client/management`, …) also exist for standalone single-service use.
|
|
243
|
-
|
|
244
|
-
**Need the stack URL? Use `api.baseUrl`, not `api.stack.host`.** `baseUrl` is the absolute URL the client is configured against and builds every request on, canonical form (no trailing slash). `stack.host` is a bare hostname the stack reports about itself in its index response — no scheme, and not what routes a request, so the two can legitimately differ on a proxied or custom-domain deployment.
|
|
245
|
-
|
|
246
|
-
Import paths:
|
|
247
|
-
|
|
248
|
-
| Export path | Purpose |
|
|
249
|
-
| ----------------------------------------- | ---------------------------------------------------------------- |
|
|
250
|
-
| `@keboola/api-client` | Full SDK: `createKeboola` / `createLegacyKeboola`, errors, utils |
|
|
251
|
-
| `@keboola/api-client/<client>` | Per-client factory (e.g. `storage`) |
|
|
252
|
-
| `@keboola/api-client/<client>/types` | Per-client type imports |
|
|
253
|
-
| `@keboola/api-client/sdk/tag` | Tag SDK (composes multiple clients) |
|
|
254
|
-
| `@keboola/api-client/sdk/developerPortal` | Developer Portal SDK (client + its session) |
|
|
255
|
-
| `@keboola/api-client/sdk/configurations` | Core configuration SDK |
|
|
256
|
-
| `@keboola/api-client/sdk/dataAppServer` | Data app server: Query Service per signed-in user (Node only) |
|
|
257
|
-
| `@keboola/api-client/domain/permissions` | Permission primitives |
|
|
125
|
+
- Call `resume()` once on startup; persistence starts after it settles. A stack the caller selected
|
|
126
|
+
or signed in or out first keeps that.
|
|
127
|
+
- Stored: the active stack and each stack's grant — its refresh token, or a cookie credential's
|
|
128
|
+
session id. Never an access token or an identity.
|
|
129
|
+
- A browser-mode login (`browserMode: true`) holds a `cookie` credential, which renews only on the
|
|
130
|
+
stack's own origin; localhost and previews hold a `token` one.
|
|
131
|
+
- Adapters: `createLocalStorage` (survives a restart, shared across tabs), `createSessionStorage`
|
|
132
|
+
(per tab), `createMemoryStorage`, `createNullStorage`. Both browser stores are readable by any
|
|
133
|
+
script on the origin, which is why only the single-use refresh token is written.
|
|
134
|
+
|
|
135
|
+
### Import paths
|
|
136
|
+
|
|
137
|
+
| Export path | Purpose |
|
|
138
|
+
| ----------------------------------------- | ------------------------------------------------------------- |
|
|
139
|
+
| `@keboola/api-client` | Full SDK: `createKeboola`, errors, utils |
|
|
140
|
+
| `@keboola/api-client/<client>` | Per-client factory (e.g. `storage`) |
|
|
141
|
+
| `@keboola/api-client/<client>/types` | Per-client type imports |
|
|
142
|
+
| `@keboola/api-client/sdk/tag` | Tag SDK (composes multiple clients) |
|
|
143
|
+
| `@keboola/api-client/sdk/developerPortal` | Developer Portal SDK (client + its session) |
|
|
144
|
+
| `@keboola/api-client/sdk/configurations` | Core configuration SDK |
|
|
145
|
+
| `@keboola/api-client/sdk/dataAppServer` | Data app server: Query Service per signed-in user (Node only) |
|
|
146
|
+
| `@keboola/api-client/domain/permissions` | Permission primitives |
|
|
258
147
|
|
|
259
148
|
### Query Service credentials
|
|
260
149
|
|
|
@@ -340,11 +229,10 @@ When a caller writes a component configuration on a user's behalf — an agent-g
|
|
|
340
229
|
`createConfigurationSdk` (`@keboola/api-client/sdk/configurations`) takes the storage and encryption clients plus the project context the permission guard reads — the verified token as `createProject` builds it, and the branch refs as `createBranchRefs` builds them. It is not on `api.sdk`: the token is the consumer's to fetch.
|
|
341
230
|
|
|
342
231
|
```ts
|
|
343
|
-
import { createBranchRefs,
|
|
232
|
+
import { createBranchRefs, createProject } from '@keboola/api-client';
|
|
344
233
|
import { createConfigurationSdk } from '@keboola/api-client/sdk/configurations';
|
|
345
234
|
|
|
346
|
-
const
|
|
347
|
-
await session.authenticateStorageAsync(sapiToken); // → ready
|
|
235
|
+
const api = keboola.projectApi(projectId); // a signed-in `createKeboola` client
|
|
348
236
|
const [token, devBranches] = await Promise.all([
|
|
349
237
|
api.storage.tokens.verify(),
|
|
350
238
|
api.storage.branches.getDevBranches(),
|
|
@@ -453,33 +341,26 @@ Don't reach for `err.message || 'fallback'` or test `err.message === ''` instead
|
|
|
453
341
|
|
|
454
342
|
Error classes the SDK can throw — branch on these instead of a catch-all `unknown`:
|
|
455
343
|
|
|
456
|
-
| Class | Exported from | Branch specifically when…
|
|
457
|
-
| --------------------------- | ---------------------------------------- |
|
|
458
|
-
| `ApiError` | `@keboola/api-client` | You need raw `response` / `request` / parsed `data` (e.g. 4xx payload)
|
|
459
|
-
| `UserError` | `@keboola/api-client` | You want to surface `err.message` verbatim — already phrased for users
|
|
460
|
-
| `ServiceUnavailableError` | `@keboola/api-client` | A
|
|
461
|
-
| `ManagementClientAuthError` | `@keboola/api-client` |
|
|
462
|
-
| `RowLevelSecurityError` | `@keboola/api-client` | Row-level security refused the query for the caller — show "no access"
|
|
463
|
-
| `PermissionDeniedError` | `@keboola/api-client/domain/permissions` | A client-side `assertCan*` refused before any HTTP round-trip
|
|
344
|
+
| Class | Exported from | Branch specifically when… |
|
|
345
|
+
| --------------------------- | ---------------------------------------- | ---------------------------------------------------------------------- |
|
|
346
|
+
| `ApiError` | `@keboola/api-client` | You need raw `response` / `request` / parsed `data` (e.g. 4xx payload) |
|
|
347
|
+
| `UserError` | `@keboola/api-client` | You want to surface `err.message` verbatim — already phrased for users |
|
|
348
|
+
| `ServiceUnavailableError` | `@keboola/api-client` | A call reached a service the stack doesn't host — hide the feature |
|
|
349
|
+
| `ManagementClientAuthError` | `@keboola/api-client` | A `management-token` session expired: Manage sent its login page |
|
|
350
|
+
| `RowLevelSecurityError` | `@keboola/api-client` | Row-level security refused the query for the caller — show "no access" |
|
|
351
|
+
| `PermissionDeniedError` | `@keboola/api-client/domain/permissions` | A client-side `assertCan*` refused before any HTTP round-trip |
|
|
464
352
|
|
|
465
353
|
There is **no** `ServerError` class — server-originated failures surface as `ApiError`; discriminate 5xx from 4xx via `err.response.status` inside `isApiError(err)`. `ManagementClientAuthError` and `RowLevelSecurityError` extend `ApiError`, so check `isManagementClientAuthError` / `isRowLevelSecurityError` first.
|
|
466
354
|
|
|
467
355
|
Canonical try/catch — order guards most-specific first:
|
|
468
356
|
|
|
469
357
|
```ts
|
|
470
|
-
import {
|
|
471
|
-
isAbortError,
|
|
472
|
-
isApiError,
|
|
473
|
-
isFetchClientError,
|
|
474
|
-
isManagementClientAuthError,
|
|
475
|
-
readableReason,
|
|
476
|
-
} from '@keboola/api-client';
|
|
358
|
+
import { isAbortError, isApiError, isFetchClientError, readableReason } from '@keboola/api-client';
|
|
477
359
|
|
|
478
360
|
try {
|
|
479
361
|
await api.storage.tables.getTable({ branchId, tableId: id }, signal);
|
|
480
362
|
} catch (err) {
|
|
481
363
|
if (isAbortError(err)) return; // cancelled — no UI
|
|
482
|
-
if (isManagementClientAuthError(err)) return redirectToLogin();
|
|
483
364
|
if (isApiError(err)) return toast.error(readableReason(err) ?? 'Saving failed.'); // see below
|
|
484
365
|
if (isFetchClientError(err)) return toast.error('Network problem');
|
|
485
366
|
throw err; // unexpected — propagate
|
|
@@ -489,9 +370,9 @@ try {
|
|
|
489
370
|
TanStack Query's `onError` / `throwOnError` handles most cases; the explicit try/catch applies to `mutationFn`, event handlers, or one-off `await`s outside queries. **Let Query handle retries and state; let the component decide UX.** Retry by status:
|
|
490
371
|
|
|
491
372
|
- **Transport (`TypeError`)** → transient; retry up to 3× with backoff (`retryDelay: (a) => Math.min(1000 * 2 ** a, 30_000)`). Skip `SyntaxError` (server contract bug, not transient).
|
|
492
|
-
- **401 / 403** → never retry.
|
|
373
|
+
- **401 / 403** → never retry. A bearer client reports a dead sign-in once, through `createKeboola`'s `onExpired`, not on each call.
|
|
493
374
|
- **404 on a `GET`** → normal product state; render an empty state, not "Something went wrong". A 404 on a _mutation_ (deleting an already-gone resource) can be treated as success.
|
|
494
|
-
- **5xx** → server-side, often transient. The default client wires **no** transport-level retry
|
|
375
|
+
- **5xx** → server-side, often transient. The default client wires **no** transport-level retry. Add `createRetryMiddleware` to the client's `middlewares` for automatic 5xx retry, and then keep `retry: false` at the query level so attempts don't multiply (query `retry: 2` × the middleware's 6 transport attempts = 18 requests). Surface `readableReason(err)` with your own wording as the fallback; richer detail may be on `err.data` (typed `unknown` — narrow before reading).
|
|
495
376
|
|
|
496
377
|
```ts
|
|
497
378
|
useQuery({
|
|
@@ -557,7 +438,7 @@ The `fetch()`, `axios`, and legacy `@/api` bans are mechanically enforced by oxl
|
|
|
557
438
|
|
|
558
439
|
**Authoritative surface index: [`API-SURFACE.md`](./API-SURFACE.md)** — a compact list of every namespace and method **name** (no signatures), generated from the `ProjectApi` type by `scripts/gen-surface.mjs`. Read it to confirm a namespace/method exists before calling it — don't guess. For the **full resolved signature**, open the per-namespace detail file it links to, [`surface/<namespace>.md`](./surface) (e.g. `surface/storage.md`) — split per namespace so you load only the slice you need rather than every signature at once. A CI drift check (`surface:check`, wired into the package's `ci-checks`) fails if either goes stale; regenerate with `pnpm --filter @keboola/api-client surface`.
|
|
559
440
|
|
|
560
|
-
The full namespace set is the `ProjectApi` type in `src/keboola/
|
|
441
|
+
The full namespace set is the `ProjectApi` type in `src/keboola/types.ts`. Quick top-level reference (see the index for the complete, current list):
|
|
561
442
|
|
|
562
443
|
```
|
|
563
444
|
api.storage.* api.management.* api.vault.*
|
|
@@ -576,7 +457,7 @@ api.sdk.tag.* api.sdk.storage.*
|
|
|
576
457
|
- `healthCheck()`, `GET /v2/docs/swagger.yaml` and unauthenticated calls answer the same everywhere.
|
|
577
458
|
- A `401` from an authenticated call means a bad or expired token, not a missing API.
|
|
578
459
|
|
|
579
|
-
|
|
460
|
+
A call to an optional stack service (vault, queue, …) that the stack doesn't host rejects with `ServiceUnavailableError` — check `api.stack.hasService(...)` before offering the feature.
|
|
580
461
|
|
|
581
462
|
**Liveness: every service client exposes a root-level `healthCheck()`.** It resolves with the service's payload when up and throws like any other call when not, and it needs no session — every one of these endpoints answers unauthenticated, so a probe works before login and is indifferent to whether a token rides along. Probe a service that way rather than by calling a real endpoint and interpreting the failure. **A 200 means up and a throw means down — that is the whole contract.** The payload is incidental, so **never hand-roll a response type** to make it look useful. Adding a client means adding its `healthCheck` too, and which client you probe through follows from the spec:
|
|
582
463
|
|
|
@@ -618,7 +499,7 @@ const { api, session } = createDeveloperPortalSdk({
|
|
|
618
499
|
|
|
619
500
|
An endpoint goes on the client; anything that has to _know a token over time_ goes in the SDK, which
|
|
620
501
|
owns the store, `credential.ts`, `middleware.ts` and `tokenExpiry.ts` — the analogue of
|
|
621
|
-
`keboola
|
|
502
|
+
`keboola/` for Connection. The client alone covers every operation the spec marks `security: []`.
|
|
622
503
|
|
|
623
504
|
Three things about it are unusual:
|
|
624
505
|
|
|
@@ -749,7 +630,7 @@ If the resolved value is a `Job` — the request only _enqueues_ the work — th
|
|
|
749
630
|
|
|
750
631
|
The suffix is the only thing at a call site that says "you are not done yet — poll this." Anything that returns a job needs a follow-up (`jobs.getJob`, `pollStorageJob`, a `jobPoller`), and a bare name is what makes a caller forget. Correspondingly, **don't** use `Async` on a method that resolves to the finished resource; every method here is `async` in the JavaScript sense, so the suffix would carry no information.
|
|
751
632
|
|
|
752
|
-
This rule governs **service-client endpoint methods**, where every method is already async. On a `session` surface the suffix means the other thing — the promise-returning sibling of a genuinely _synchronous_ call, where it does carry information: `
|
|
633
|
+
This rule governs **service-client endpoint methods**, where every method is already async. On a `session` surface the suffix means the other thing — the promise-returning sibling of a genuinely _synchronous_ call, where it does carry information: `auth.isAuthenticated` / `auth.isAuthenticatedAsync`, `stack.getContext` / `stack.getContextAsync`.
|
|
753
634
|
|
|
754
635
|
```ts
|
|
755
636
|
const deleteBucketAsync = async (…): Promise<Job<'bucketDelete'>> => { … }; // enqueues
|
|
@@ -832,7 +713,7 @@ committed schema byte-for-byte.
|
|
|
832
713
|
**3. Client and SDK are different things, and the split is not negotiable.** A client is one method
|
|
833
714
|
per endpoint, holds **no state and never holds a token** — if it takes a credential, it is not a
|
|
834
715
|
client. Anything that knows a token over time (a store, refresh-and-replay, expiry) belongs in
|
|
835
|
-
`sdks/`, the way `keboola
|
|
716
|
+
`sdks/`, the way `keboola/` does for Connection. A client that needs auth takes a
|
|
836
717
|
`MiddlewareFn`, not an `auth: AuthStrategy` and not a credential; the SDK supplies it. Endpoints
|
|
837
718
|
that authenticate with something other than the default credential take that token **as an
|
|
838
719
|
argument** and the SDK binds it, so the consumer surface stays argument-free.
|
|
@@ -877,7 +758,7 @@ A new client/namespace means touching four places that must stay in lock-step
|
|
|
877
758
|
|
|
878
759
|
Full mechanical steps (redocly registration, `gen:types`, file templates) live in [`README.md` → Adding a New OpenAPI Client](./README.md#adding-a-new-openapi-client). Add typed fixtures to `@keboola/api-fixtures` alongside the client so consumers can test against it.
|
|
879
760
|
|
|
880
|
-
**Worked example — the `auth` client.** `packages/api-client/src/clients/auth/*` (`authClient.ts`, `pkce.ts`, `index.ts`, `types.ts`) is a self-contained new service added this way: it exposes `./auth` + `./auth/types` sub-paths and is surfaced by `src/keboola/
|
|
761
|
+
**Worked example — the `auth` client.** `packages/api-client/src/clients/auth/*` (`authClient.ts`, `pkce.ts`, `index.ts`, `types.ts`) is a self-contained new service added this way: it exposes `./auth` + `./auth/types` sub-paths and is surfaced by `src/keboola/perStack.ts`. Read it as the reference shape for a new client rather than copying boilerplate. **Bearer auth lives in `keboola/`, not the auth client**, since it's specific to the bearer engine: `credential.ts` is a token provider (`getAccessToken({ forceRefresh })` returns a valid token, refreshing — deduped — when near expiry or forced), and `middleware.ts` is a thin policy that on every request asks the credential for a token and stamps the `Authorization` header, and on 401 force-refreshes and replays once. Session-expiry is latched (fire-once, re-armed per sign-in) in `state.auth.notifyExpired`, not the credential — the credential and middleware are long-lived singletons. The middleware holds no token — all token state is in the session table, which the credential reads live, so a rotation is picked up without rebuilding. See `keboola/keboola.ts` for the wiring.
|
|
881
762
|
|
|
882
763
|
## Development
|
|
883
764
|
|
package/API-SURFACE.md
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
<!-- GENERATED FILE — do not edit by hand. Run `pnpm --filter @keboola/api-client surface` to regenerate. -->
|
|
4
4
|
|
|
5
|
-
Every namespace and method reachable from a ready `ProjectApi` — one project's api (`createKeboola(...).
|
|
5
|
+
Every namespace and method reachable from a ready `ProjectApi` — one project's api (`createKeboola(...).projectApi(id)`, or `useProjectApi()`). Generated from the TypeScript type checker — see `scripts/gen-surface.mjs`.
|
|
6
6
|
|
|
7
|
-
26 top-level namespaces,
|
|
7
|
+
26 top-level namespaces, 715 methods. This index lists method **names** only — full signatures live per namespace under [`surface/`](./surface). Open `surface/<namespace>.md` for the one you need.
|
|
8
8
|
|
|
9
9
|
## [`api.ai`](./surface/ai.md)
|
|
10
10
|
|
|
@@ -22,9 +22,12 @@ Every namespace and method reachable from a ready `ProjectApi` — one project's
|
|
|
22
22
|
- `createApp`
|
|
23
23
|
- `createAppGitRepoCredential`
|
|
24
24
|
- `createDeployment`
|
|
25
|
+
- `createDraft`
|
|
26
|
+
- `createDraftPreviewLink`
|
|
25
27
|
- `deleteApp`
|
|
26
28
|
- `deleteAppGitRepoCredential`
|
|
27
29
|
- `deleteDeployment`
|
|
30
|
+
- `deleteDraft`
|
|
28
31
|
- `getApp`
|
|
29
32
|
- `getAppGitRepo`
|
|
30
33
|
- `getAppGitRepoBranches`
|
|
@@ -41,6 +44,8 @@ Every namespace and method reachable from a ready `ProjectApi` — one project's
|
|
|
41
44
|
- `getDeploymentLogsDownload`
|
|
42
45
|
- `getDeploymentLogsTail`
|
|
43
46
|
- `getDeployments`
|
|
47
|
+
- `getDraft`
|
|
48
|
+
- `getDrafts`
|
|
44
49
|
- `healthCheck`
|
|
45
50
|
- `promoteDeployment`
|
|
46
51
|
- `resetAppPassword`
|
|
@@ -66,6 +71,7 @@ Every namespace and method reachable from a ready `ProjectApi` — one project's
|
|
|
66
71
|
- `me.getMaintainers`
|
|
67
72
|
- `me.getOrganizations`
|
|
68
73
|
- `me.getProjects`
|
|
74
|
+
- `me.update`
|
|
69
75
|
- `mfa.regenerateRecoveryCodes`
|
|
70
76
|
- `mfa.totp.disable`
|
|
71
77
|
- `mfa.totp.setup`
|
|
@@ -193,6 +199,7 @@ Every namespace and method reachable from a ready `ProjectApi` — one project's
|
|
|
193
199
|
- `submitToolOutput`
|
|
194
200
|
- `submitVote`
|
|
195
201
|
- `updateAgentSettings`
|
|
202
|
+
- `updateChatProjects`
|
|
196
203
|
- `updateProjectToolPolicy`
|
|
197
204
|
- `updateSpendCaps`
|
|
198
205
|
- `updateTurnCredential`
|
|
@@ -648,6 +655,7 @@ Every namespace and method reachable from a ready `ProjectApi` — one project's
|
|
|
648
655
|
- `stats.getRunIdStats`
|
|
649
656
|
- `tableList.getAllTables`
|
|
650
657
|
- `tableList.getTables`
|
|
658
|
+
- `tableList.iterateTables`
|
|
651
659
|
- `tables.createAliasTable`
|
|
652
660
|
- `tables.createTableAsync`
|
|
653
661
|
- `tables.createTableDefinitionAsync`
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,50 @@
|
|
|
1
1
|
# @keboola/api-client
|
|
2
2
|
|
|
3
|
+
## 57.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- **Breaking:** `createLegacyKeboola` and its session are gone, with no replacement factory. `LegacySession`, `LegacyKeboolaOptions`, `LegacyAuthProvider` and `useLegacyAuth` go with it, as do the `NoManagementToken`, `NoStorageToken`, `MissingProject`, `NotBearer` and `InvalidBuildTransition` error types and the `all` key of `middlewares` — list a middleware under each client it belongs to. `createKeboola` returns `stackApi` in place of `getStackApi()` — the same object, whose reads follow the active stack — and `projectApi(projectId)` in place of `getProjectApi(projectId)`. The `BearerSession` type is `Session`. `createStorageClient` drops its `onRefreshToken` option, and `createDerivedStore`, `createDerivedAsyncStore`, `shallowEqual` and `AsyncState` go: the legacy client was their only user. `Store.dispose`, `Emitter.clear` and the `ReadableStore` type go with them. `ProjectApi.serviceMeta` goes: every entry was available, and a call to a missing service rejects instead. `ProjectFeature.FrontendLogin` goes: nothing reads it. A call to a service the stack does not run rejects with `ServiceUnavailableError` again, not `NotReady`; its `path` and `clientName` are optional. A Storage API token builds the per-service clients it calls (`createStorageClient`, `createOauthClient`, …), each service's URL from `storage.getStackInfo()`; a full `ProjectApi` comes from a `createKeboola` sign-in (UT-5193)
|
|
8
|
+
|
|
9
|
+
### Minor Changes
|
|
10
|
+
|
|
11
|
+
- `auth.me.update({ name })` renames the signed-in user (`PATCH /v1/auth/me`) and resolves the updated `user`. The auth schema is regenerated from Connection's spec with that endpoint; it also carries `reportedClientName` on `sessions[]` items (`SessionItemResponse`).
|
|
12
|
+
|
|
13
|
+
- `StackFeature.SpaDocument` (`spa-document`): the stack serves kbc-ui as a payload-less SPA document.
|
|
14
|
+
|
|
15
|
+
- Storage client: `tableList.getTables` and `tableList.getAllTables` take `filter.changedSince` (`filter[changedSince]`, an ISO 8601 time with an offset), listing only the tables whose row changed at or after it. `getAllTables` sends it on every page.
|
|
16
|
+
|
|
17
|
+
- `tableList.iterateTables` yields table list V2 pages one at a time as they arrive, so a caller can render the first page before the walk ends. `iterateByCursor` is the generic cursor walk behind it and behind `collectByCursor`.
|
|
18
|
+
|
|
19
|
+
- `api.apps` covers data-app drafts: `createDraft`, `getDrafts`, `getDraft`, `deleteDraft` and `createDraftPreviewLink`, with the `Draft`, `DraftId`, `DraftRunState`, `DraftPreviewLink`, `CreateDraftBody` and `GetDraftsQuery` types from `@keboola/api-client/apps/types`.
|
|
20
|
+
|
|
21
|
+
- The Developer Portal admin client gains `getAppVersions(id)` (`GET /admin/apps/{id}/versions`), which lists every version with its `waveTags`, and `getAppForWave(id, wave)` (`GET /admin/apps/{id}?wave=N`), which returns the app as a stack on that wave gets it. `AppWaveTags` and `AppWavePin` are exported from `@keboola/api-client/developerPortal/types`.
|
|
22
|
+
|
|
23
|
+
- Bucket listings carry the Snowflake variant (DMD-2496). `BucketListingDetail` and `ProjectBucketListing` may have `backend: 'snowflake'` with a `snowflake` section (`mode`, `grantees`, `objectName`, typed as `SnowflakeBucketListingDetail`). `createListingAsync` takes `snowflake: { mode: 'grant', grantees }` in place of `listingId` and `subscribers`, and `updateListingAsync` takes `grantees`. A finished `bucketListingUpdate` job carries its result, typed per backend as `BucketListingUpdateJobResult`. The Snowflake types are written by hand until the deployed Storage spec carries the section.
|
|
24
|
+
|
|
25
|
+
- Add `api.kaiAgent.updateChatProjects(chatId, { projectIds, activeProjectId })` to set the projects a chat spans, and `projectIds`/`activeProjectId` on the `getChat` response and `projectIds` on the create-chat request.
|
|
26
|
+
|
|
27
|
+
### Patch Changes
|
|
28
|
+
|
|
29
|
+
- The legacy management auth middleware replaces an expired manage token instead of failing: Connection answers it with `400` and `code: storage.tokenExpired`, not `401`. Any other `400`, such as a disabled token, still propagates.
|
|
30
|
+
|
|
31
|
+
- Regenerate the ai, apps, auth, dataScience, kaiAgent, management, microsoftGraph, omnisearch, queryService, queue, storage and vault OpenAPI types against the live services.
|
|
32
|
+
|
|
33
|
+
- Storage dev branches, workspaces and tokens carry a required, nullable `actor`; buckets carry `sharedByActor`; table details carry `createdBy` and `lastUpdatedBy`.
|
|
34
|
+
- `@keboola/api-fixtures` storage fixtures set these fields to `null`.
|
|
35
|
+
|
|
36
|
+
- `session.auth.signOut()` ends the sign-in on the server too: the session, its refresh token, its derived PATs and the paired browser session.
|
|
37
|
+
|
|
38
|
+
- A token grant revokes its refresh token; a cookie grant renews off its session cookie and revokes that fresh access token. The grant is read from storage, so a rotation in another tab does not leave the session alive.
|
|
39
|
+
- The local sign-out never depends on it: it is stored first, a failure is logged, and the wait is bounded (10 s).
|
|
40
|
+
- A repeated sign-out on the same stack (a double click) resolves only once the first has ended the session.
|
|
41
|
+
- A rotation that finds the stack signed out in storage (another tab signed out) signs this tab out and reports it through `onExpired`.
|
|
42
|
+
- `signOut({ retain: true })` and `auth.replace()` leave the server session alone.
|
|
43
|
+
|
|
44
|
+
- Configuration `folder` and `folderUpdated` come from the generated storage schema; the hand-written fields are gone (DMD-2348). A configuration read now always carries both, `null` when there is no folder, and the create and update bodies take `folder` as `string | null`.
|
|
45
|
+
|
|
46
|
+
- Snowflake bucket listings use the regenerated storage types (DMD-2496). `BucketListingDetail`, `ProjectBucketListing` and the `bucketListingUpdate` job result come from the spec, so the hand-written `SnowflakeExposureMode`, `SnowflakeBucketListingDetail` and `BucketListingUpdateJobResult` are removed. `createListingAsync` sends a Snowflake body through the typed client. The regeneration also makes a job's `creatorToken.id` nullable and adds `description` to workspace table loads.
|
|
47
|
+
|
|
3
48
|
## 56.0.0
|
|
4
49
|
|
|
5
50
|
### Minor Changes
|