@keboola/api-client 48.0.0 → 50.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 +109 -95
- package/API-SURFACE.md +14 -32
- package/CHANGELOG.md +78 -0
- package/README.md +33 -29
- package/dist/{ManagementSessionMintError-Cu9beG7j.cjs → ManagementSessionMintError-ByOulHQH.cjs} +4 -6
- package/dist/{ManagementSessionMintError-Cu9beG7j.cjs.map → ManagementSessionMintError-ByOulHQH.cjs.map} +1 -1
- package/dist/{ManagementSessionMintError-4Pkn5Oob.js → ManagementSessionMintError-DNMbYauw.js} +4 -6
- package/dist/{ManagementSessionMintError-4Pkn5Oob.js.map → ManagementSessionMintError-DNMbYauw.js.map} +1 -1
- package/dist/{QueryJobError-ZZZ043Nm.js → QueryJobError-Iq9O90Uh.js} +2 -3
- package/dist/{QueryJobError-ZZZ043Nm.js.map → QueryJobError-Iq9O90Uh.js.map} +1 -1
- package/dist/{QueryJobError-irGiP5zh.cjs → QueryJobError-Oy0fl4aw.cjs} +2 -3
- package/dist/{QueryJobError-irGiP5zh.cjs.map → QueryJobError-Oy0fl4aw.cjs.map} +1 -1
- package/dist/{QueueJobError-8bThS_Mc.js → QueueJobError-BJNUINXW.js} +2 -3
- package/dist/{QueueJobError-8bThS_Mc.js.map → QueueJobError-BJNUINXW.js.map} +1 -1
- package/dist/{QueueJobError-6qSEizWo.cjs → QueueJobError-DruZK3tc.cjs} +2 -3
- package/dist/{QueueJobError-6qSEizWo.cjs.map → QueueJobError-DruZK3tc.cjs.map} +1 -1
- package/dist/{SyncActionError-CoZFsdUk.js → SyncActionError-DuGcDbkd.js} +2 -3
- package/dist/{SyncActionError-CoZFsdUk.js.map → SyncActionError-DuGcDbkd.js.map} +1 -1
- package/dist/{SyncActionError-BG0zwchi.cjs → SyncActionError-mbpVg63X.cjs} +2 -3
- package/dist/{SyncActionError-BG0zwchi.cjs.map → SyncActionError-mbpVg63X.cjs.map} +1 -1
- package/dist/{UserError-By_Zckmc.js → UserError-BxoOJJ_u.js} +2 -3
- package/dist/{UserError-By_Zckmc.js.map → UserError-BxoOJJ_u.js.map} +1 -1
- package/dist/{UserError-CSGO1qII.cjs → UserError-D4P9Tbhf.cjs} +2 -3
- package/dist/{UserError-CSGO1qII.cjs.map → UserError-D4P9Tbhf.cjs.map} +1 -1
- package/dist/{ValidationError-D65QU0uq.cjs → ValidationError-BXcFX4nD.cjs} +2 -3
- package/dist/{ValidationError-D65QU0uq.cjs.map → ValidationError-BXcFX4nD.cjs.map} +1 -1
- package/dist/{ValidationError-DjhtNMfZ.js → ValidationError-BsdFDGY2.js} +2 -3
- package/dist/{ValidationError-DjhtNMfZ.js.map → ValidationError-BsdFDGY2.js.map} +1 -1
- package/dist/{configurations-CL0ouUMa.js → admin-CbMOsfgs.js} +5 -53
- package/dist/admin-CbMOsfgs.js.map +1 -0
- package/dist/{configurations-D9J3jh3g.cjs → admin-Di-MmGFP.cjs} +4 -124
- package/dist/admin-Di-MmGFP.cjs.map +1 -0
- package/dist/{adminRoles-DsoGQipO.d.ts → adminRoles-DAwl657q.d.ts} +2 -4
- package/dist/{adminRoles-CO7J5qAy.cjs → adminRoles-DnFpO_2W.cjs} +2 -3
- package/dist/{adminRoles-CO7J5qAy.cjs.map → adminRoles-DnFpO_2W.cjs.map} +1 -1
- package/dist/{adminRoles-BgpaBE7h.d.cts → adminRoles-FFyl7Dyx.d.cts} +2 -4
- package/dist/{adminRoles-B40yBcmq.js → adminRoles-asa-MhDD.js} +2 -3
- package/dist/{adminRoles-B40yBcmq.js.map → adminRoles-asa-MhDD.js.map} +1 -1
- package/dist/ai/index.cjs +3 -4
- package/dist/ai/index.d.cts +2 -4
- package/dist/ai/index.d.ts +2 -4
- package/dist/ai/index.js +3 -4
- package/dist/ai/types.d.cts +1 -1
- package/dist/ai/types.d.ts +1 -1
- package/dist/{appLogs-DpcqeOe5.d.ts → appLogs-CTvZAihm.d.ts} +2 -4
- package/dist/{appLogs-SjrflOHk.d.cts → appLogs-CnLNMH7M.d.cts} +2 -4
- package/dist/{appLogs-Cix2KWra.cjs → appLogs-CoAWQGxs.cjs} +5 -6
- package/dist/{appLogs-Cix2KWra.cjs.map → appLogs-CoAWQGxs.cjs.map} +1 -1
- package/dist/{appLogs-KslK7qHr.js → appLogs-DFcPwVk8.js} +4 -5
- package/dist/{appLogs-KslK7qHr.js.map → appLogs-DFcPwVk8.js.map} +1 -1
- package/dist/apps/index.cjs +29 -6
- package/dist/apps/index.cjs.map +1 -1
- package/dist/apps/index.d.cts +16 -5
- package/dist/apps/index.d.ts +16 -5
- package/dist/apps/index.js +29 -6
- package/dist/apps/index.js.map +1 -1
- package/dist/apps/types.d.cts +3 -3
- package/dist/apps/types.d.ts +3 -3
- package/dist/assets/index.cjs +2 -3
- package/dist/assets/index.d.cts +1 -3
- package/dist/assets/index.d.ts +1 -3
- package/dist/assets/index.js +2 -3
- package/dist/assets/schema.cjs +2 -3
- package/dist/assets/schema.d.cts +0 -2
- package/dist/assets/schema.d.ts +0 -2
- package/dist/assets/schema.js +1 -2
- 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 -2
- package/dist/auth/types.d.cts +1 -1
- package/dist/auth/types.d.ts +1 -1
- package/dist/{auth-C8Pjl0Mu.cjs → auth-CvB4MukT.cjs} +3 -4
- package/dist/{auth-C8Pjl0Mu.cjs.map → auth-CvB4MukT.cjs.map} +1 -1
- package/dist/{auth-4coY1uwo.js → auth-DYfQMQCs.js} +3 -4
- package/dist/{auth-4coY1uwo.js.map → auth-DYfQMQCs.js.map} +1 -1
- package/dist/{authClient-DfkKlc-2.cjs → authClient-DcKBpMcU.cjs} +66 -85
- package/dist/{authClient-DfkKlc-2.cjs.map → authClient-DcKBpMcU.cjs.map} +1 -1
- package/dist/{authClient-BYIGzL_u.d.ts → authClient-Df3U4q_6.d.cts} +4 -16
- package/dist/{authClient-D06srBQE.d.cts → authClient-JtMVJWXY.d.ts} +4 -16
- package/dist/{authClient-2e8ZmzSP.js → authClient-oB5ydxWp.js} +66 -85
- package/dist/{authClient-2e8ZmzSP.js.map → authClient-oB5ydxWp.js.map} +1 -1
- package/dist/{backends-DKBz5OxE.d.ts → backends-BHotIdL0.d.cts} +1 -3
- package/dist/{backends-DKBz5OxE.d.cts → backends-BHotIdL0.d.ts} +1 -3
- package/dist/billing/index.cjs +3 -5
- package/dist/billing/index.cjs.map +1 -1
- package/dist/billing/index.d.cts +27 -29
- package/dist/billing/index.d.ts +27 -29
- package/dist/billing/index.js +3 -5
- package/dist/billing/index.js.map +1 -1
- package/dist/billing/types.d.cts +26 -26
- package/dist/billing/types.d.ts +26 -26
- package/dist/chat/index.cjs +4 -5
- package/dist/chat/index.d.cts +3 -5
- package/dist/chat/index.d.ts +3 -5
- package/dist/chat/index.js +4 -5
- package/dist/chat/suggestions.cjs +1 -2
- package/dist/chat/suggestions.d.cts +1 -1
- package/dist/chat/suggestions.d.ts +1 -1
- package/dist/chat/suggestions.js +1 -2
- package/dist/chat/types.cjs +1 -2
- package/dist/chat/types.d.cts +1 -1
- package/dist/chat/types.d.ts +1 -1
- package/dist/chat/types.js +1 -2
- package/dist/{collectByOffset-DQsqtmJg.cjs → collectByOffset-DgxJ3zT9.cjs} +3 -4
- package/dist/{collectByOffset-DQsqtmJg.cjs.map → collectByOffset-DgxJ3zT9.cjs.map} +1 -1
- package/dist/{collectByOffset-2XzJqmvr.js → collectByOffset-i8Tdoze7.js} +3 -4
- package/dist/{collectByOffset-2XzJqmvr.js.map → collectByOffset-i8Tdoze7.js.map} +1 -1
- package/dist/{componentId-D4jp6a13.cjs → componentId-C8ZTXXDo.cjs} +2 -3
- package/dist/{componentId-D4jp6a13.cjs.map → componentId-C8ZTXXDo.cjs.map} +1 -1
- package/dist/{componentId-DmHwHG5V.js → componentId-b_qBbJEM.js} +2 -3
- package/dist/{componentId-DmHwHG5V.js.map → componentId-b_qBbJEM.js.map} +1 -1
- package/dist/componentsMcp/index.cjs +1 -1
- package/dist/componentsMcp/index.d.cts +1 -1
- package/dist/componentsMcp/index.d.ts +1 -1
- package/dist/componentsMcp/index.js +1 -2
- package/dist/componentsMcp/types.d.cts +1 -1
- package/dist/componentsMcp/types.d.ts +1 -1
- package/dist/{componentsMcp-pG-PcQrg.cjs → componentsMcp-BaHy5iLr.cjs} +5 -7
- package/dist/{componentsMcp-pG-PcQrg.cjs.map → componentsMcp-BaHy5iLr.cjs.map} +1 -1
- package/dist/{componentsMcp-CHobIsuU.js → componentsMcp-BrB4js6b.js} +5 -7
- package/dist/{componentsMcp-CHobIsuU.js.map → componentsMcp-BrB4js6b.js.map} +1 -1
- package/dist/{concurrent-BacWxPwi.js → concurrent-BtsT10Xe.js} +2 -3
- package/dist/{concurrent-BacWxPwi.js.map → concurrent-BtsT10Xe.js.map} +1 -1
- package/dist/{concurrent-CdVfR1N5.cjs → concurrent-DnTV_ppY.cjs} +2 -3
- package/dist/{concurrent-CdVfR1N5.cjs.map → concurrent-DnTV_ppY.cjs.map} +1 -1
- package/dist/configurations-Cd6Nsox-.js +49 -0
- package/dist/configurations-Cd6Nsox-.js.map +1 -0
- package/dist/configurations-WI8H4zLk.cjs +120 -0
- package/dist/configurations-WI8H4zLk.cjs.map +1 -0
- package/dist/constants/index.cjs +6 -3
- package/dist/constants/index.d.cts +5 -4
- package/dist/constants/index.d.ts +5 -4
- package/dist/constants/index.js +4 -4
- package/dist/{constants-CA4UN2Xv.js → constants-BMSHGwOR.js} +86 -17
- package/dist/constants-BMSHGwOR.js.map +1 -0
- package/dist/{constants-a0jswUeK.cjs → constants-DhFQWQgy.cjs} +103 -16
- package/dist/constants-DhFQWQgy.cjs.map +1 -0
- package/dist/{createAbortError-RendOpo7.cjs → createAbortError-Dzc9yObN.cjs} +2 -3
- package/dist/{createAbortError-RendOpo7.cjs.map → createAbortError-Dzc9yObN.cjs.map} +1 -1
- package/dist/{createAbortError-BxupOt-6.js → createAbortError-c6ekCpRy.js} +2 -3
- package/dist/{createAbortError-BxupOt-6.js.map → createAbortError-c6ekCpRy.js.map} +1 -1
- package/dist/{createFetchClient-lZ_93Yrb.cjs → createFetchClient-DEkUH662.cjs} +6 -10
- package/dist/{createFetchClient-lZ_93Yrb.cjs.map → createFetchClient-DEkUH662.cjs.map} +1 -1
- package/dist/{createFetchClient-CkHdS_IG.js → createFetchClient-DlGCbltR.js} +5 -9
- package/dist/{createFetchClient-CkHdS_IG.js.map → createFetchClient-DlGCbltR.js.map} +1 -1
- package/dist/{createGenericFetchClient-MOx97wi-.cjs → createGenericFetchClient-2oU-PXVo.cjs} +3 -4
- package/dist/{createGenericFetchClient-MOx97wi-.cjs.map → createGenericFetchClient-2oU-PXVo.cjs.map} +1 -1
- package/dist/createGenericFetchClient-wGxemBwR.js +6 -0
- package/dist/{createGenericFetchClient-CQdNcPC3.js.map → createGenericFetchClient-wGxemBwR.js.map} +1 -1
- package/dist/createOpenapiFetchClient-Bhz62MUE.js +6 -0
- package/dist/{createOpenapiFetchClient-DXiMv9WL.js.map → createOpenapiFetchClient-Bhz62MUE.js.map} +1 -1
- package/dist/{createOpenapiFetchClient-DHYo_k3t.cjs → createOpenapiFetchClient-DL9w7vU-.cjs} +3 -4
- package/dist/{createOpenapiFetchClient-DHYo_k3t.cjs.map → createOpenapiFetchClient-DL9w7vU-.cjs.map} +1 -1
- package/dist/dataScience/index.cjs +2 -2
- package/dist/dataScience/index.d.cts +2 -2
- package/dist/dataScience/index.d.ts +2 -2
- package/dist/dataScience/index.js +2 -2
- package/dist/dataScience/types.d.cts +2 -2
- package/dist/dataScience/types.d.ts +2 -2
- package/dist/{dataScience-AwPMeGfz.js → dataScience-CXmkEOAi.js} +7 -9
- package/dist/{dataScience-AwPMeGfz.js.map → dataScience-CXmkEOAi.js.map} +1 -1
- package/dist/{dataScience-BjS1p8WO.cjs → dataScience-CufjHPSd.cjs} +7 -9
- package/dist/{dataScience-BjS1p8WO.cjs.map → dataScience-CufjHPSd.cjs.map} +1 -1
- package/dist/{dedupe-OSnnst2u.cjs → dedupe-Bf0gl9TJ.cjs} +2 -3
- package/dist/{dedupe-OSnnst2u.cjs.map → dedupe-Bf0gl9TJ.cjs.map} +1 -1
- package/dist/{dedupe-Cky1gSUu.js → dedupe-Bu0d2i_w.js} +2 -3
- package/dist/{dedupe-Cky1gSUu.js.map → dedupe-Bu0d2i_w.js.map} +1 -1
- package/dist/developerPortal/index.cjs +1 -1
- package/dist/developerPortal/index.d.cts +2 -2
- package/dist/developerPortal/index.d.ts +2 -2
- package/dist/developerPortal/index.js +1 -2
- package/dist/developerPortal/types.d.cts +1 -1
- package/dist/developerPortal/types.d.ts +1 -1
- package/dist/{developerPortalClient-DUerKw-7.cjs → developerPortalClient-BfRxYrWj.cjs} +9 -15
- package/dist/{developerPortalClient-DUerKw-7.cjs.map → developerPortalClient-BfRxYrWj.cjs.map} +1 -1
- package/dist/{developerPortalClient-Bb2suezr.js → developerPortalClient-D9XOYwWF.js} +9 -15
- package/dist/{developerPortalClient-Bb2suezr.js.map → developerPortalClient-D9XOYwWF.js.map} +1 -1
- package/dist/domain/permissions/index.cjs +24 -58
- package/dist/domain/permissions/index.d.cts +4 -10
- package/dist/domain/permissions/index.d.ts +4 -10
- package/dist/domain/permissions/index.js +4 -39
- package/dist/domain/storageTable/index.cjs +403 -9
- package/dist/domain/storageTable/index.cjs.map +1 -0
- package/dist/domain/storageTable/index.d.cts +189 -2
- package/dist/domain/storageTable/index.d.ts +189 -2
- package/dist/domain/storageTable/index.js +395 -1
- package/dist/domain/storageTable/index.js.map +1 -0
- package/dist/editor/index.cjs +3 -4
- package/dist/editor/index.d.cts +2 -4
- package/dist/editor/index.d.ts +2 -4
- package/dist/editor/index.js +3 -4
- package/dist/editor/types.d.cts +1 -1
- package/dist/editor/types.d.ts +1 -1
- package/dist/{emitter-dLF1Fyfg.d.ts → emitter-raKkIqRp.d.cts} +1 -3
- package/dist/{emitter-dLF1Fyfg.d.cts → emitter-raKkIqRp.d.ts} +1 -3
- package/dist/encryption/index.cjs +2 -3
- package/dist/encryption/index.d.cts +1 -1
- package/dist/encryption/index.d.ts +1 -1
- package/dist/encryption/index.js +2 -3
- package/dist/encryption/types.d.cts +1 -1
- package/dist/encryption/types.d.ts +1 -1
- package/dist/generateUUID-DE9sNyJF.js +5 -0
- package/dist/{generateUUID-Dr8l-aoc.js.map → generateUUID-DE9sNyJF.js.map} +1 -1
- package/dist/{generateUUID-C6qKBPIv.cjs → generateUUID-DbSTmvVP.cjs} +2 -3
- package/dist/{generateUUID-C6qKBPIv.cjs.map → generateUUID-DbSTmvVP.cjs.map} +1 -1
- package/dist/import/index.cjs +1 -1
- package/dist/import/index.d.cts +3 -5
- package/dist/import/index.d.ts +3 -5
- package/dist/import/index.js +1 -2
- package/dist/{import-BahNYv91.cjs → import-CABlFMQX.cjs} +6 -9
- package/dist/{import-BahNYv91.cjs.map → import-CABlFMQX.cjs.map} +1 -1
- package/dist/{import-FWy_wQZ1.js → import-CT1Ce5Rp.js} +6 -9
- package/dist/{import-FWy_wQZ1.js.map → import-CT1Ce5Rp.js.map} +1 -1
- package/dist/index-24GpnYhn.d.cts +150 -0
- package/dist/{index-VlzlOBkc.d.cts → index-AA3MRfRn.d.cts} +71 -13
- package/dist/{index-BLvmyehw.d.ts → index-BDPxm9qu.d.ts} +3 -7
- package/dist/index-BUZ-vTRt.d.ts +150 -0
- package/dist/{index-DzLXtE4Q.d.ts → index-BZDxWvZW.d.ts} +5 -7
- package/dist/index-C9iNazAc.d.ts +15103 -0
- package/dist/{index-avzO5sLa.d.ts → index-CCcdySOC.d.cts} +5 -7
- package/dist/{index-D91RxB_S.d.cts → index-CN0--VsY.d.ts} +5 -7
- package/dist/index-CTMnmISl.d.cts +15103 -0
- package/dist/{index-m7fX76x3.d.ts → index-CbSh3KFw.d.cts} +4 -12
- package/dist/{index-Cc5wSIRJ.d.cts → index-ClIV2Lch.d.cts} +5 -7
- package/dist/{index-BIldED4N.d.ts → index-CuI8OI9E.d.ts} +4 -13
- package/dist/{index-ChDl6ig5.d.cts → index-D1mduJne.d.cts} +11 -48
- package/dist/{index-sDHBkJhU.d.ts → index-D1mduJne.d.ts} +12 -49
- package/dist/{index-DlZiWfQb.d.ts → index-DIPMzH--.d.ts} +17 -10
- package/dist/{index-Co2Cd-nw.d.cts → index-DQagqTVa.d.cts} +3 -7
- package/dist/{index-CIqWOEWD.d.ts → index-DVBQgFg0.d.ts} +4 -6
- package/dist/index-DXoN8VwV.d.cts +10 -0
- package/dist/{index-BHiJu8LF.d.cts → index-Db266tLz.d.cts} +17 -10
- package/dist/{index-ByLCYBaw.d.cts → index-DgGpQsAT.d.cts} +4 -6
- package/dist/{index-CzHrIfZS.d.ts → index-DjSthn8d.d.ts} +71 -13
- package/dist/index-Xpu7qIZk.d.ts +10 -0
- package/dist/{index-BTrxCk90.d.ts → index-lTrNMlj6.d.ts} +3 -5
- package/dist/{index-CpGmmJbt.d.cts → index-m9-mN8Gg.d.ts} +4 -12
- package/dist/{index-CpUYVB-d.d.cts → index-xX8-Stoq.d.cts} +4 -13
- package/dist/{index-BCjU-g9t.d.cts → index-z-2okomN.d.cts} +3 -5
- package/dist/index.cjs +434 -1053
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -8
- package/dist/index.d.ts +9 -8
- package/dist/index.js +427 -1050
- package/dist/index.js.map +1 -1
- package/dist/{isLoginPageRedirect-r0Opgc1n.cjs → isLoginPageRedirect-CoUxJi2x.cjs} +3 -4
- package/dist/{isLoginPageRedirect-r0Opgc1n.cjs.map → isLoginPageRedirect-CoUxJi2x.cjs.map} +1 -1
- package/dist/{isLoginPageRedirect-B4QKSiSa.js → isLoginPageRedirect-D-lqF_kZ.js} +3 -4
- package/dist/{isLoginPageRedirect-B4QKSiSa.js.map → isLoginPageRedirect-D-lqF_kZ.js.map} +1 -1
- package/dist/{isPlainObject-LYW-03uB.js → isPlainObject-BxsT8_t2.js} +2 -3
- package/dist/{isPlainObject-LYW-03uB.js.map → isPlainObject-BxsT8_t2.js.map} +1 -1
- package/dist/{isPlainObject-BB3iy87C.cjs → isPlainObject-CcvQt0qB.cjs} +2 -3
- package/dist/{isPlainObject-BB3iy87C.cjs.map → isPlainObject-CcvQt0qB.cjs.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 -2
- package/dist/kaiAgent/types.d.cts +1 -1
- package/dist/kaiAgent/types.d.ts +1 -1
- package/dist/{kaiAgent-CYvrS8oZ.js → kaiAgent-D2TiMDjW.js} +6 -7
- package/dist/{kaiAgent-CYvrS8oZ.js.map → kaiAgent-D2TiMDjW.js.map} +1 -1
- package/dist/{kaiAgent-N2qbUFZm.cjs → kaiAgent-gaA7dqki.cjs} +6 -7
- package/dist/{kaiAgent-N2qbUFZm.cjs.map → kaiAgent-gaA7dqki.cjs.map} +1 -1
- package/dist/{kaiMemory-Qch09f-m.cjs → kaiMemory-CkLQfJXD.cjs} +6 -9
- package/dist/{kaiMemory-Qch09f-m.cjs.map → kaiMemory-CkLQfJXD.cjs.map} +1 -1
- package/dist/{kaiMemory-C9di17bd.js → kaiMemory-oir_qCo_.js} +6 -9
- package/dist/{kaiMemory-C9di17bd.js.map → kaiMemory-oir_qCo_.js.map} +1 -1
- 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 -2
- package/dist/management/types.cjs +13 -0
- package/dist/management/types.cjs.map +1 -0
- package/dist/management/types.d.cts +2 -2
- package/dist/management/types.d.ts +2 -2
- package/dist/management/types.js +11 -1
- package/dist/management/types.js.map +1 -0
- package/dist/{management-CXHnxVaZ.cjs → management-BEGOEQxM.cjs} +34 -59
- package/dist/management-BEGOEQxM.cjs.map +1 -0
- package/dist/{management-NYAD6ej4.js → management-BcGHyxAP.js} +34 -59
- package/dist/management-BcGHyxAP.js.map +1 -0
- package/dist/metastore/index.cjs +1 -1
- package/dist/metastore/index.d.cts +1 -1
- package/dist/metastore/index.d.ts +1 -1
- package/dist/metastore/index.js +1 -2
- package/dist/metastore/types.d.cts +1 -1
- package/dist/metastore/types.d.ts +1 -1
- package/dist/{metastore-Ywq08DBz.js → metastore-CGsgxjng.js} +7 -10
- package/dist/{metastore-Ywq08DBz.js.map → metastore-CGsgxjng.js.map} +1 -1
- package/dist/{metastore-BXHg33ku.cjs → metastore-DeRQ2VIv.cjs} +7 -10
- package/dist/{metastore-BXHg33ku.cjs.map → metastore-DeRQ2VIv.cjs.map} +1 -1
- package/dist/microsoftGraph/index.cjs +5 -8
- package/dist/microsoftGraph/index.cjs.map +1 -1
- package/dist/microsoftGraph/index.d.cts +3 -7
- package/dist/microsoftGraph/index.d.ts +3 -7
- package/dist/microsoftGraph/index.js +5 -8
- package/dist/microsoftGraph/index.js.map +1 -1
- package/dist/microsoftGraph/types.d.cts +2 -4
- package/dist/microsoftGraph/types.d.ts +2 -4
- package/dist/{middleware-GOfx8Apu.js → middleware-8zaJWcyU.js} +3 -5
- package/dist/middleware-8zaJWcyU.js.map +1 -0
- package/dist/{middleware-CEP6uu_D.cjs → middleware-B9RNuLfD.cjs} +3 -5
- package/dist/middleware-B9RNuLfD.cjs.map +1 -0
- package/dist/notifications/index.cjs +5 -6
- package/dist/notifications/index.d.cts +2 -4
- package/dist/notifications/index.d.ts +2 -4
- package/dist/notifications/index.js +5 -6
- package/dist/notifications/types.d.cts +1 -1
- package/dist/notifications/types.d.ts +1 -1
- package/dist/oauth/index.cjs +1 -1
- package/dist/oauth/index.d.cts +2 -4
- package/dist/oauth/index.d.ts +2 -4
- package/dist/oauth/index.js +1 -2
- package/dist/oauth/types.d.cts +1 -1
- package/dist/oauth/types.d.ts +1 -1
- package/dist/{oauth-DKZPuUlt.cjs → oauth-B5Biqz21.cjs} +7 -9
- package/dist/{oauth-DKZPuUlt.cjs.map → oauth-B5Biqz21.cjs.map} +1 -1
- package/dist/{oauth-GXmZ9agP.js → oauth-ByCdISsV.js} +7 -9
- package/dist/{oauth-GXmZ9agP.js.map → oauth-ByCdISsV.js.map} +1 -1
- package/dist/omnisearch/index.cjs +3 -4
- package/dist/omnisearch/index.d.cts +2 -4
- package/dist/omnisearch/index.d.ts +2 -4
- package/dist/omnisearch/index.js +3 -4
- package/dist/omnisearch/types.d.cts +1 -1
- package/dist/omnisearch/types.d.ts +1 -1
- package/dist/project-DmuC0bMK.js +83 -0
- package/dist/project-DmuC0bMK.js.map +1 -0
- package/dist/project-Onf-IcPW.cjs +136 -0
- package/dist/project-Onf-IcPW.cjs.map +1 -0
- package/dist/{project-nbv9yjpl.d.ts → project-UHZGFmmG.d.cts} +6 -9
- package/dist/{project-Dzu85cqr.d.cts → project-iBm4cIIR.d.ts} +6 -9
- 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 -2
- package/dist/queryService/types.d.cts +1 -1
- package/dist/queryService/types.d.ts +1 -1
- package/dist/{queryService-CzK53q94.cjs → queryService-Cg-eMysa.cjs} +9 -11
- package/dist/{queryService-CzK53q94.cjs.map → queryService-Cg-eMysa.cjs.map} +1 -1
- package/dist/{queryService-C-pZha5p.js → queryService-x8kq8Z2-.js} +9 -11
- package/dist/{queryService-C-pZha5p.js.map → queryService-x8kq8Z2-.js.map} +1 -1
- package/dist/queue/index.cjs +1 -1
- package/dist/queue/index.d.cts +4 -5
- package/dist/queue/index.d.ts +4 -5
- package/dist/queue/index.js +1 -2
- package/dist/queue/types.d.cts +1 -1
- package/dist/queue/types.d.ts +1 -1
- package/dist/{queue-D6-x4OGF.js → queue-BiIs9fX4.js} +9 -11
- package/dist/{queue-D6-x4OGF.js.map → queue-BiIs9fX4.js.map} +1 -1
- package/dist/{queue-BJvDWriM.cjs → queue-CBi9Q8vp.cjs} +9 -11
- package/dist/{queue-BJvDWriM.cjs.map → queue-CBi9Q8vp.cjs.map} +1 -1
- package/dist/{rolldown-runtime-VH7oDXx4.cjs → rolldown-runtime-CmQyd0Gu.cjs} +1 -2
- package/dist/scheduler/index.cjs +5 -6
- package/dist/scheduler/index.d.cts +2 -4
- package/dist/scheduler/index.d.ts +2 -4
- package/dist/scheduler/index.js +5 -6
- package/dist/scheduler/types.d.cts +1 -1
- package/dist/scheduler/types.d.ts +1 -1
- package/dist/{schema-BUyMwQnM.d.cts → schema-DLmBEgPM.d.cts} +1 -3
- package/dist/{schema-BUyMwQnM.d.ts → schema-DLmBEgPM.d.ts} +1 -3
- package/dist/schemaGuidedMerge-C8CqrNGe.cjs +55 -0
- package/dist/schemaGuidedMerge-C8CqrNGe.cjs.map +1 -0
- package/dist/schemaGuidedMerge-DFNqj9Nz.js +44 -0
- package/dist/schemaGuidedMerge-DFNqj9Nz.js.map +1 -0
- package/dist/sdk/configurations/index.cjs +634 -2
- package/dist/sdk/configurations/index.cjs.map +1 -0
- package/dist/sdk/configurations/index.d.cts +1030 -4
- package/dist/sdk/configurations/index.d.ts +1030 -4
- package/dist/sdk/configurations/index.js +633 -1
- package/dist/sdk/configurations/index.js.map +1 -0
- package/dist/sdk/developerPortal/index.cjs +9 -13
- package/dist/sdk/developerPortal/index.cjs.map +1 -1
- package/dist/sdk/developerPortal/index.d.cts +4 -6
- package/dist/sdk/developerPortal/index.d.ts +4 -6
- package/dist/sdk/developerPortal/index.js +9 -13
- package/dist/sdk/developerPortal/index.js.map +1 -1
- package/dist/sdk/kaiMemory/index.cjs +1 -1
- package/dist/sdk/kaiMemory/index.d.cts +1 -3
- package/dist/sdk/kaiMemory/index.d.ts +1 -3
- package/dist/sdk/kaiMemory/index.js +1 -2
- package/dist/sdk/kaiMemory/types.d.cts +1 -1
- package/dist/sdk/kaiMemory/types.d.ts +1 -1
- package/dist/sdk/queryService/index.cjs +3 -4
- package/dist/sdk/queryService/index.d.cts +1 -1
- package/dist/sdk/queryService/index.d.ts +1 -1
- package/dist/sdk/queryService/index.js +3 -4
- package/dist/sdk/semanticLayer/index.cjs +1 -1
- package/dist/sdk/semanticLayer/index.d.cts +1 -7
- package/dist/sdk/semanticLayer/index.d.ts +1 -7
- package/dist/sdk/semanticLayer/index.js +1 -2
- package/dist/sdk/semanticLayer/types.d.cts +1 -1
- package/dist/sdk/semanticLayer/types.d.ts +1 -1
- package/dist/sdk/storage/index.cjs +3 -6
- package/dist/sdk/storage/index.cjs.map +1 -1
- package/dist/sdk/storage/index.d.cts +0 -6
- package/dist/sdk/storage/index.d.ts +0 -6
- package/dist/sdk/storage/index.js +3 -6
- package/dist/sdk/storage/index.js.map +1 -1
- package/dist/sdk/tag/index.cjs +1 -1
- package/dist/sdk/tag/index.d.cts +3 -5
- package/dist/sdk/tag/index.d.ts +3 -5
- package/dist/sdk/tag/index.js +1 -2
- package/dist/sdk/tag/types.d.cts +1 -1
- package/dist/sdk/tag/types.d.ts +1 -1
- package/dist/sdk/vault/index.cjs +3 -5
- package/dist/sdk/vault/index.cjs.map +1 -1
- package/dist/sdk/vault/index.d.cts +1 -1
- package/dist/sdk/vault/index.d.ts +1 -1
- package/dist/sdk/vault/index.js +3 -5
- package/dist/sdk/vault/index.js.map +1 -1
- package/dist/{semanticLayer-DvjS_nzo.js → semanticLayer-BdPW_wLo.js} +9 -14
- package/dist/{semanticLayer-DvjS_nzo.js.map → semanticLayer-BdPW_wLo.js.map} +1 -1
- package/dist/{semanticLayer-7BejcMj_.cjs → semanticLayer-djom-J78.cjs} +9 -14
- package/dist/{semanticLayer-7BejcMj_.cjs.map → semanticLayer-djom-J78.cjs.map} +1 -1
- package/dist/status/index.cjs +2 -3
- package/dist/status/index.d.cts +1 -3
- package/dist/status/index.d.ts +1 -3
- package/dist/status/index.js +2 -3
- package/dist/status/types.d.cts +0 -2
- package/dist/status/types.d.ts +0 -2
- package/dist/storage/index.cjs +12 -9
- package/dist/storage/index.d.cts +4 -3
- package/dist/storage/index.d.ts +4 -3
- package/dist/storage/index.js +10 -10
- package/dist/storage/types.d.cts +6 -6
- package/dist/storage/types.d.ts +6 -6
- package/dist/{storage-BR-Kgi-6.js → storage-BpOLWT6h.js} +73 -85
- package/dist/{storage-CVBXivpB.cjs.map → storage-BpOLWT6h.js.map} +1 -1
- package/dist/{storage-CVBXivpB.cjs → storage-KJ5Ki_ma.cjs} +90 -84
- package/dist/storage-KJ5Ki_ma.cjs.map +1 -0
- package/dist/{store-xS-Cu_VS.cjs → store-2OyH1XOP.cjs} +3 -5
- package/dist/{store-xS-Cu_VS.cjs.map → store-2OyH1XOP.cjs.map} +1 -1
- package/dist/{store-C9FQCHGe.js → store-HP0zRcLz.js} +3 -5
- package/dist/{store-C9FQCHGe.js.map → store-HP0zRcLz.js.map} +1 -1
- package/dist/stream/index.cjs +4 -5
- package/dist/stream/index.d.cts +2 -4
- package/dist/stream/index.d.ts +2 -4
- package/dist/stream/index.js +4 -5
- package/dist/stream/types.d.cts +1 -1
- package/dist/stream/types.d.ts +1 -1
- package/dist/{suggestions-BH3x7xU7.d.ts → suggestions-xhIjrlvi.d.cts} +1 -3
- package/dist/{suggestions-BH3x7xU7.d.cts → suggestions-xhIjrlvi.d.ts} +1 -3
- package/dist/syncActions/index.cjs +1 -1
- package/dist/syncActions/index.d.cts +2 -2
- package/dist/syncActions/index.d.ts +2 -2
- package/dist/syncActions/index.js +1 -2
- package/dist/syncActions/types.d.cts +2 -2
- package/dist/syncActions/types.d.ts +2 -2
- package/dist/{syncActions-C1rE4R3f.cjs → syncActions-BcX3jm2E.cjs} +74 -187
- package/dist/syncActions-BcX3jm2E.cjs.map +1 -0
- package/dist/{syncActions-DM8vP7p3.js → syncActions-giPLTfje.js} +73 -186
- package/dist/syncActions-giPLTfje.js.map +1 -0
- package/dist/{tag-DHS_soa7.cjs → tag-A5z4tJn1.cjs} +5 -7
- package/dist/{tag-DHS_soa7.cjs.map → tag-A5z4tJn1.cjs.map} +1 -1
- package/dist/{tag-hh-1nhNr.js → tag-BwjbG3tT.js} +5 -7
- package/dist/{tag-hh-1nhNr.js.map → tag-BwjbG3tT.js.map} +1 -1
- package/dist/telemetry/index.cjs +4 -5
- package/dist/telemetry/index.d.cts +2 -4
- package/dist/telemetry/index.d.ts +2 -4
- package/dist/telemetry/index.js +4 -5
- package/dist/telemetry/types.d.cts +1 -1
- package/dist/telemetry/types.d.ts +1 -1
- package/dist/{transientRetries-B4iusp69.js → transientRetries-BKqmb85B.js} +13 -22
- package/dist/{transientRetries-B4iusp69.js.map → transientRetries-BKqmb85B.js.map} +1 -1
- package/dist/{transientRetries-DdJfH9QK.cjs → transientRetries-CM7rAEXQ.cjs} +13 -22
- package/dist/{transientRetries-DdJfH9QK.cjs.map → transientRetries-CM7rAEXQ.cjs.map} +1 -1
- package/dist/{types-DfJP6Dti.d.ts → types--Rp5wvaz.d.ts} +2 -6
- package/dist/{types-DlgqPU_4.d.cts → types-1IBnjBVJ.d.cts} +2 -6
- package/dist/{types-BXHZQvGy.d.ts → types-37vwxse4.d.cts} +2 -6
- package/dist/{types-QPW-7dPm.d.ts → types-6T04_qUf.d.ts} +2 -6
- package/dist/{types-CwQ8_n8q.d.ts → types-B0e-no6u.d.ts} +41 -62
- package/dist/{types-C_raqbl-.d.cts → types-B1qe1etN.d.cts} +3 -7
- package/dist/{types-Cc4yTEdK.d.ts → types-B3ri-iiC.d.ts} +2 -26
- package/dist/{types-0ZAMQhva.d.cts → types-BB49alHP.d.cts} +245 -9
- package/dist/{types-NSxpnYW5.d.cts → types-BCGrKW1K.d.cts} +6 -10
- package/dist/{types-BaqdM92a.d.ts → types-BE8abIig.d.cts} +2 -6
- package/dist/{types-c4h2YDMC.d.ts → types-BWMOK6eL.d.cts} +2 -6
- package/dist/{types-VehpPOQX.d.ts → types-Bat0SIZA.d.cts} +16 -97
- package/dist/{types-CpWE6Yg2.d.ts → types-Bdl7EFMc.d.ts} +2 -6
- package/dist/{types-DgOLSRiy.d.ts → types-BfB-XXLF.d.ts} +245 -9
- package/dist/{types-C9VaQSqV.d.ts → types-BiDdBXSm.d.ts} +2 -8
- package/dist/{types-EkyQ0_10.d.cts → types-BuclMPeY.d.cts} +2 -26
- package/dist/{types-CfZLdfAL.d.ts → types-C9okze_R.d.ts} +3 -7
- package/dist/{types-Dn1G-qv4.d.cts → types-CPWjRdnj.d.cts} +41 -62
- package/dist/{types-D3mj56iq.d.cts → types-CRubbBcU.d.cts} +2 -6
- package/dist/{types-BTy_FFSu.d.ts → types-CWcdaq-K.d.ts} +2 -6
- package/dist/{types-Bt8CEZ6K.d.ts → types-CcGp6O3B.d.cts} +3 -7
- package/dist/{types-BWYtQkHu.d.ts → types-Cr5lyI99.d.ts} +2 -6
- package/dist/{types-CNkQuWnO.d.cts → types-CxEJ77m3.d.cts} +3 -7
- package/dist/{types-CrJIILXf.d.cts → types-D-tJt0hQ.d.cts} +2 -6
- package/dist/{types-BYFU_6Iz.d.ts → types-D6lre27s.d.ts} +2 -8
- package/dist/{types-Cn8I0vcr.d.ts → types-DHMxPJZq.d.cts} +2 -6
- package/dist/{types-BtS3DhGu.d.cts → types-DJzTVMu1.d.ts} +2 -6
- package/dist/{types-DXF6faow.d.cts → types-DNgazFnF.d.cts} +2 -8
- package/dist/{types-UySfduQo.d.ts → types-DRCttnIN.d.ts} +2 -6
- package/dist/{types-D3H3EAre.d.ts → types-DUpVIuk7.d.ts} +2 -6
- package/dist/{types-Ce5Blzhg.d.ts → types-DeyXJzWz.d.cts} +2 -6
- package/dist/{types-sOM2_KPc.d.cts → types-Dryq2GGE.d.cts} +2 -6
- package/dist/{types-CwGbiMF-.d.cts → types-DschSZHf.d.cts} +3 -5
- package/dist/{types-C-GSYDTN.d.ts → types-DtOfhDzz.d.ts} +3 -5
- package/dist/{types-C4eQ-Zcx.d.cts → types-Du5o-tud.d.ts} +16 -97
- package/dist/{types-BbwrMl0Q.d.cts → types-DwbTiyhZ.d.cts} +2 -6
- package/dist/{types-B7L6uSYb.d.ts → types-Dz9vyloX.d.ts} +6 -10
- package/dist/{types-6KabdIyO.d.cts → types-E8tzafsk.d.cts} +3 -7
- package/dist/{types-EmIcG-8K.d.cts → types-LconaX98.d.cts} +2 -6
- package/dist/{types-Cfc-fYbq.d.cts → types-YpOm4yXE.d.cts} +2 -8
- package/dist/{types-CXv_e6xC.d.cts → types-ZZwdKCBl.d.ts} +2 -6
- package/dist/{types-D8d5tyGi.d.cts → types-eFi8xJIM.d.cts} +2 -6
- package/dist/{types-wNuJUhco.d.cts → types-inG9y3dP.d.ts} +2 -6
- package/dist/{types-Vu09EUZs.d.ts → types-ir7T2a9a.d.ts} +3 -7
- package/dist/{types-DMpiG2q4.d.cts → types-jjOulnni.d.ts} +2 -6
- package/dist/{types-DSBrhK_K.d.cts → types-wYrC2boT.d.ts} +3 -7
- package/dist/{types-1LENlL5h.d.ts → types-xzt_2H63.d.ts} +3 -7
- package/dist/{types-9d8ihjZh.d.cts → types-zPY-XGnM.d.ts} +2 -6
- package/dist/{validateConnectionStatus-BalWEyRk.cjs → validateConnectionStatus-BjemGI1e.cjs} +5 -7
- package/dist/{validateConnectionStatus-BalWEyRk.cjs.map → validateConnectionStatus-BjemGI1e.cjs.map} +1 -1
- package/dist/{validateConnectionStatus-DyrYpn0G.js → validateConnectionStatus-DYwWeWVo.js} +5 -7
- package/dist/{validateConnectionStatus-DyrYpn0G.js.map → validateConnectionStatus-DYwWeWVo.js.map} +1 -1
- package/dist/vault/index.cjs +7 -8
- package/dist/vault/index.d.cts +1 -1
- package/dist/vault/index.d.ts +1 -1
- package/dist/vault/index.js +7 -8
- package/dist/vault/types.d.cts +1 -1
- package/dist/vault/types.d.ts +1 -1
- package/package.json +7 -7
- package/surface/apps.md +12 -10
- package/surface/billing.md +2 -2
- package/surface/chat.md +1 -1
- package/surface/dataScience.md +1 -1
- package/surface/editor.md +5 -5
- package/surface/kaiAgent.md +4 -4
- package/surface/management.md +3 -2
- package/surface/queue.md +3 -3
- package/surface/sdk.md +0 -6
- package/surface/stack.md +11 -0
- package/surface/storage.md +2 -2
- package/surface/stream.md +6 -6
- package/surface/syncActions.md +1 -2
- package/dist/configurations-B2O8AAy0.cjs +0 -735
- package/dist/configurations-B2O8AAy0.cjs.map +0 -1
- package/dist/configurations-CL0ouUMa.js.map +0 -1
- package/dist/configurations-D9J3jh3g.cjs.map +0 -1
- package/dist/configurations-DKINmjA3.js +0 -718
- package/dist/configurations-DKINmjA3.js.map +0 -1
- package/dist/constants-CA4UN2Xv.js.map +0 -1
- package/dist/constants-a0jswUeK.cjs.map +0 -1
- package/dist/createGenericFetchClient-CQdNcPC3.js +0 -7
- package/dist/createOpenapiFetchClient-DXiMv9WL.js +0 -7
- package/dist/domain/permissions/index.cjs.map +0 -1
- package/dist/domain/permissions/index.js.map +0 -1
- package/dist/generateUUID-Dr8l-aoc.js +0 -6
- package/dist/index-B3QTeqfL.d.ts +0 -23575
- package/dist/index-BfqkgPGI.d.cts +0 -34
- package/dist/index-BfqkgPGI.d.ts +0 -34
- package/dist/index-C40Fbj-6.d.cts +0 -23575
- package/dist/index-P1vR966i.d.cts +0 -199
- package/dist/index-P1vR966i.d.ts +0 -199
- package/dist/management-CXHnxVaZ.cjs.map +0 -1
- package/dist/management-NYAD6ej4.js.map +0 -1
- package/dist/middleware-CEP6uu_D.cjs.map +0 -1
- package/dist/middleware-GOfx8Apu.js.map +0 -1
- package/dist/project-BXLFrWJ6.js +0 -45
- package/dist/project-BXLFrWJ6.js.map +0 -1
- package/dist/project-CpgplgCr.cjs +0 -62
- package/dist/project-CpgplgCr.cjs.map +0 -1
- package/dist/storage-BR-Kgi-6.js.map +0 -1
- package/dist/storageTable-BNOR2FCh.cjs +0 -442
- package/dist/storageTable-BNOR2FCh.cjs.map +0 -1
- package/dist/storageTable-BldTNyEk.js +0 -395
- package/dist/storageTable-BldTNyEk.js.map +0 -1
- package/dist/syncActions-C1rE4R3f.cjs.map +0 -1
- package/dist/syncActions-DM8vP7p3.js.map +0 -1
- package/surface/context.md +0 -40
package/AGENTS.md
CHANGED
|
@@ -26,10 +26,10 @@ the working tree to diff, so discard afterwards. See
|
|
|
26
26
|
|
|
27
27
|
## Getting a client
|
|
28
28
|
|
|
29
|
-
**React (the common case).** In `apps/kbc-ui` and other React apps, use
|
|
29
|
+
**React (the common case).** In `apps/kbc-ui` and other React apps, use the hooks from [`@keboola/api-client-react`](../api-client-react/AGENTS.md): `useProjectApi()` for one project's `ProjectApi` (auth + management + product namespaces), `useStackApi()` for the `StackApi` that is there before a project (sign-in, the account, the project list). `StackApiProvider` and `ProjectApiProvider` propagate them; a `ProjectApiProvider` provides its stack too. Don't create a client per component.
|
|
30
30
|
|
|
31
31
|
```ts
|
|
32
|
-
const api =
|
|
32
|
+
const api = useProjectApi();
|
|
33
33
|
const { data } = useQuery({
|
|
34
34
|
queryKey: storageApiKey.getTable(id),
|
|
35
35
|
queryFn: ({ signal }) => api.storage.tables.getTable({ branchId, tableId: id }, signal),
|
|
@@ -38,8 +38,8 @@ const { data } = useQuery({
|
|
|
38
38
|
|
|
39
39
|
**Scripts / CLIs / non-React.** Create one directly — pick the smallest that covers you:
|
|
40
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 `
|
|
42
|
-
- **`createLegacyKeboola` / `createKeboola`** — full SDK across all stack services. `createLegacyKeboola` returns `{ api, session }` and `createKeboola` returns `{ session,
|
|
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` / `createDefaultBranch` — 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
43
|
|
|
44
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
45
|
|
|
@@ -60,7 +60,7 @@ import { createLegacyKeboola } from '@keboola/api-client';
|
|
|
60
60
|
|
|
61
61
|
const { api, session } = createLegacyKeboola({ baseUrl: process.env.KEBOOLA_STACK_URL! });
|
|
62
62
|
await session.authenticateStorageAsync(process.env.KEBOOLA_STORAGE_TOKEN!);
|
|
63
|
-
const stack = api.
|
|
63
|
+
const stack = api.stack; // synchronous — the storage build has resolved
|
|
64
64
|
const buckets = await api.storage.buckets.getBuckets();
|
|
65
65
|
```
|
|
66
66
|
|
|
@@ -68,31 +68,34 @@ const buckets = await api.storage.buckets.getBuckets();
|
|
|
68
68
|
|
|
69
69
|
Two flow-specific factories back the SDK:
|
|
70
70
|
|
|
71
|
-
- `createKeboola({ defaultBaseUrl, … })` — the **bearer (OAuth)** flow. Returns
|
|
72
|
-
`
|
|
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).
|
|
73
74
|
- `createLegacyKeboola(opts?)` — the **legacy (SAPI-token)** flow. Returns `{ api, session }`.
|
|
74
75
|
|
|
75
76
|
`api` is the same **flow-agnostic** product surface for both — a state-gating proxy:
|
|
76
77
|
|
|
77
78
|
- **`api.auth.*`** — auth-service client, live once a `baseUrl` is configured.
|
|
78
79
|
- **`api.management.*`** — management client, live once the management realm authenticates.
|
|
79
|
-
- **`api.storage` / `api.queue` / `api.
|
|
80
|
-
the async storage build reaches `ready
|
|
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).
|
|
81
84
|
|
|
82
85
|
`session` is **flow-specific** lifecycle machinery:
|
|
83
86
|
|
|
84
|
-
- bearer: `stack.select(baseUrl)` → `auth.authenticate(credential)
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
from the
|
|
91
|
-
|
|
92
|
-
`
|
|
93
|
-
`getContextAsync`
|
|
94
|
-
|
|
95
|
-
|
|
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`.
|
|
96
99
|
- legacy: `setBaseUrl`, `authenticateStorage(sapiToken)` / `authenticateStorageAsync(sapiToken)`
|
|
97
100
|
(awaits the build), `authenticateManagement(manageToken)`, `isStorageReady()`, `subscribe(cb)`
|
|
98
101
|
(fires on config **and** storage-build transitions) and `debug()`.
|
|
@@ -104,24 +107,25 @@ await session.authenticateStorageAsync(token);
|
|
|
104
107
|
const buckets = await api.storage.buckets.getBuckets(defaultBranchId);
|
|
105
108
|
|
|
106
109
|
// Bearer (OAuth) login flow (browser)
|
|
107
|
-
|
|
108
|
-
const
|
|
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 });
|
|
109
113
|
if (!result.mfaRequired) session.auth.authenticate({ type: 'token', ...result });
|
|
110
|
-
|
|
114
|
+
const api = getProjectApi(projectId); // → every product namespace, for the project the app is in
|
|
111
115
|
```
|
|
112
116
|
|
|
113
117
|
### Several projects at once (bearer)
|
|
114
118
|
|
|
115
119
|
One credential reaches every project on its stack — project scope is one header, `X-KBC-ProjectId` —
|
|
116
|
-
so `
|
|
120
|
+
so `getProjectApi(projectId)` hands out a product surface per project, off the client already in
|
|
121
|
+
hand:
|
|
117
122
|
|
|
118
123
|
```ts
|
|
119
|
-
const { session,
|
|
124
|
+
const { session, getProjectApi } = createKeboola({ defaultBaseUrl: baseUrl });
|
|
120
125
|
session.auth.authenticate(credential);
|
|
121
|
-
session.project.select(42);
|
|
122
126
|
|
|
123
|
-
const api =
|
|
124
|
-
const other =
|
|
127
|
+
const api = getProjectApi(42);
|
|
128
|
+
const other = getProjectApi(7);
|
|
125
129
|
|
|
126
130
|
const [mine, theirs] = await Promise.all([
|
|
127
131
|
api.storage.buckets.getBuckets({ branchId: 'default' }),
|
|
@@ -129,50 +133,48 @@ const [mine, theirs] = await Promise.all([
|
|
|
129
133
|
]);
|
|
130
134
|
```
|
|
131
135
|
|
|
132
|
-
Both
|
|
133
|
-
|
|
134
|
-
lands, exactly as the scoped one does.
|
|
136
|
+
Both are synchronous and lazy: the surface resolves per property read, so `stack` throws
|
|
137
|
+
`KeboolaError` (`NotReady`) until the stack index lands.
|
|
135
138
|
|
|
136
|
-
**
|
|
139
|
+
**Two handles, two lifetimes:**
|
|
137
140
|
|
|
138
|
-
- **`
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
- **`
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
signed in after. Ask for a fresh one.
|
|
141
|
+
- **`getStackApi()` is the active stack's `StackApi`.** `auth`, `management`, `baseUrl` and `stack`
|
|
142
|
+
follow `session.stack.select`; it has no project namespace. It is what an app uses before there is
|
|
143
|
+
a project — sign-in, the project picker.
|
|
144
|
+
- **`getProjectApi(7)` is one project's `ProjectApi`, pinned.** It never re-points, and it lives as
|
|
145
|
+
long as the sign-in it was built under. A handle held across a sign-out throws on its next read
|
|
146
|
+
rather than quietly serving whoever signed in after. Ask for a fresh one.
|
|
145
147
|
|
|
146
|
-
|
|
148
|
+
Worth knowing before you hold one:
|
|
147
149
|
|
|
148
|
-
- **`
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
time** and pins the result; nothing follows a later `session.stack.select`.
|
|
150
|
+
- **`getProjectApi(7)` holds no state.** Nothing is written to the table or persisted, so there is
|
|
151
|
+
nothing to close; the app keeps which project it is in. Asked for before the sign-in lands, the
|
|
152
|
+
handle comes back anyway and its reads throw `NotAuthenticated` until one does. It resolves
|
|
153
|
+
against the **active stack at call time** and pins the result; nothing follows a later
|
|
154
|
+
`session.stack.select`.
|
|
154
155
|
- **One credential, one refresh loop.** Every handle shares the stack's auth middleware, which reads
|
|
155
156
|
the credential live, so a rotation happens once and serves all of them. `auth` and `management`
|
|
156
157
|
answer for the stack the handle's project sits on, not for whatever stack is active.
|
|
157
158
|
- **A project you cannot reach fails the request, not the session.** Connection answers a denied or
|
|
158
159
|
nonexistent project with the same `invalid_token` 401 as a revoked token — collapsed deliberately,
|
|
159
|
-
so scope cannot be probed. So a 401 is never read as expiry: the
|
|
160
|
-
|
|
160
|
+
so scope cannot be probed. So a 401 is never read as expiry: the request fails and the sign-in
|
|
161
|
+
stands. **The refresh is the only oracle** — the server refusing the refresh token is
|
|
161
162
|
the one unambiguous report of a dead credential, and that is where the sign-out happens
|
|
162
163
|
(`rotateOnce` in `credentials.ts`). A cookie credential's refresh is the same oracle: the server
|
|
163
164
|
refusing its session signs it out. `onExpired` on `createKeboola` reports that sign-out, once per
|
|
164
165
|
sign-in and never for one the caller made, so an app can leave the document.
|
|
165
|
-
- **Memoised per project** — `
|
|
166
|
-
need. A sign-out drops everything built for that stack's projects, so
|
|
167
|
-
from scratch rather than from what the previous sign-in left behind.
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
166
|
+
- **Memoised per project** — `getProjectApi(7) === getProjectApi(7)`, which is what React `key`s and
|
|
167
|
+
hook deps need. A sign-out drops everything built for that stack's projects, so the next sign-in's
|
|
168
|
+
handle is built from scratch rather than from what the previous sign-in left behind.
|
|
169
|
+
- **A project's token is not on the handle.** `api.storage.tokens.verify()` answers for the project
|
|
170
|
+
the handle names; derive the features with `createProject` and keep it where the app keeps state.
|
|
171
|
+
|
|
172
|
+
`session.auth.getHeadersAsync(projectId)` takes the same argument, for a transport that is not a
|
|
173
|
+
fetch client (the chat stream). Pass the project whose `api` produced the URL, so the request's
|
|
171
174
|
headers and its target name the same project. A project id alone does not name a project — two
|
|
172
|
-
stacks can each have a project 138 — so the active stack
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
run after the fetch traffic has gone quiet.
|
|
175
|
+
stacks can each have a project 138 — so it resolves on the active stack, as `getProjectApi` does.
|
|
176
|
+
It renews the token first once it nears expiry, for a transport that can run after the fetch
|
|
177
|
+
traffic has gone quiet.
|
|
176
178
|
|
|
177
179
|
⚠️ **One client per stack, per page.** Two `createKeboola()` instances signed in to the same stack
|
|
178
180
|
share its single-use refresh token: whichever rotates first invalidates the other's, and that one's
|
|
@@ -187,9 +189,9 @@ two-phase rotation and replay detection on the server. Whichever instance rotate
|
|
|
187
189
|
the other's token, whose next refresh 401s and signs it out. This is a functional break, not a style
|
|
188
190
|
preference, and it does not depend on a `storage` adapter being configured.
|
|
189
191
|
|
|
190
|
-
In React, `
|
|
191
|
-
|
|
192
|
-
[`@keboola/api-client-react`](../api-client-react/AGENTS.md).
|
|
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).
|
|
193
195
|
|
|
194
196
|
**Persisting the bearer session.** `createKeboola` accepts a `storage` adapter (bearer only). Omit it
|
|
195
197
|
and the session is in-memory (lost on reload); pass a storage adapter to make it durable:
|
|
@@ -200,17 +202,17 @@ import { createLocalStorage } from '@keboola/api-client';
|
|
|
200
202
|
// `defaultBaseUrl` is active from here on, until `resume()` or `stack.select` moves it.
|
|
201
203
|
const { session } = createKeboola({ defaultBaseUrl, storage: createLocalStorage() });
|
|
202
204
|
|
|
203
|
-
// The stored stack
|
|
205
|
+
// The stored stack becomes active again; with nothing stored, the default stays.
|
|
204
206
|
// Resolves `restored | empty | expired | unreachable` — `expired` means a stored credential was refused.
|
|
205
207
|
const status = await session.resume();
|
|
206
208
|
```
|
|
207
209
|
|
|
208
|
-
Every
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
210
|
+
Every change (login, stack switch, token rotation, sign-out) is written back under one fixed key,
|
|
211
|
+
and what it holds is the whole table rather than a single session: `current` — the active stack —
|
|
212
|
+
plus a `stacks` array, each entry carrying its own credential. Only the durable part of a
|
|
213
|
+
credential is written: a token credential's rotating refresh token, and a cookie one's session id,
|
|
214
|
+
which renews nothing without the HttpOnly session cookie the browser keeps. An access token or user
|
|
215
|
+
identity is never written.
|
|
214
216
|
|
|
215
217
|
**Token or cookie is the login's choice, and the credential carries it.** A browser-mode login
|
|
216
218
|
(`login.withPassword({ …, browserMode: true })`) answers with no refresh token; stored as a `cookie`
|
|
@@ -219,12 +221,11 @@ works only from the stack's own origin, so localhost and previews log in in API
|
|
|
219
221
|
`token` credential. One client takes either kind, renews each by its own grant, and restores a
|
|
220
222
|
persisted grant of either kind.
|
|
221
223
|
|
|
222
|
-
**A stack is always active**, so `session.stack.getActive()` never returns `null`
|
|
223
|
-
stack cannot be closed. Call `resume()` once on startup: persistence starts only after it settles,
|
|
224
|
+
**A stack is always active**, so `session.stack.getActive()` never returns `null`. Call `resume()` once on startup: persistence starts only after it settles,
|
|
224
225
|
and a second call returns the same promise. The caller wins over the stored session — once it
|
|
225
|
-
has selected a stack
|
|
226
|
-
stack already signed in or out keeps that sign-in.
|
|
227
|
-
|
|
226
|
+
has selected a stack, or signed in or out, the resume leaves the active stack where it is, and a
|
|
227
|
+
stack already signed in or out keeps that sign-in. Switching stacks keeps every other stack's
|
|
228
|
+
credential.
|
|
228
229
|
Adapters: `createLocalStorage` / `createSessionStorage` (browser, memory fallback on Node/SSR),
|
|
229
230
|
`createMemoryStorage`, `createNullStorage`. In Node, supply your own adapter or default to memory.
|
|
230
231
|
|
|
@@ -238,9 +239,9 @@ on every refresh) and server-revocable, so a leaked snapshot has limited, revoca
|
|
|
238
239
|
genuinely secure option — keeping the refresh token out of JS entirely behind a BFF
|
|
239
240
|
(backend-for-frontend) with an HttpOnly cookie — is out of scope for now.
|
|
240
241
|
|
|
241
|
-
`createStorageClient` exposes the same Storage surface as `api.storage.*` but no lifecycle and no `context` helpers (`baseUrl` / `stack`
|
|
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.
|
|
242
243
|
|
|
243
|
-
**Need the stack URL? Use `api.
|
|
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.
|
|
244
245
|
|
|
245
246
|
Import paths:
|
|
246
247
|
|
|
@@ -265,22 +266,35 @@ Never reach below `clients/` to `fetchClient` directly — all HTTP must flow th
|
|
|
265
266
|
|
|
266
267
|
## Writing a configuration safely (agents / Node)
|
|
267
268
|
|
|
268
|
-
When a caller writes a component configuration on a user's behalf — an agent-generated payload, a BE/Node process, a script — go through
|
|
269
|
+
When a caller writes a component configuration on a user's behalf — an agent-generated payload, a BE/Node process, a script — go through the configuration SDK, **never** `api.storage.configurations.createConfiguration` directly. The SDK method carries the config-write business logic that would otherwise have to be re-implemented (and kept in sync) per consumer:
|
|
269
270
|
|
|
270
271
|
1. **Validate** — parses `configuration` against the component's registered **input schema** (a deep-partial of the runnable schema) from `sdks/configurations/registry.ts`.
|
|
271
272
|
2. **Encrypt** — hands every `#`-prefixed secret field to the encryption service (a remote call) and writes back the ciphertext, so a **plaintext secret is never sent to Storage**.
|
|
272
273
|
3. **Write** — only then calls Storage.
|
|
273
274
|
|
|
274
|
-
`api
|
|
275
|
+
`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 default branch as `createDefaultBranch` builds it. It is not on `api.sdk`: the token is the consumer's to fetch.
|
|
275
276
|
|
|
276
277
|
```ts
|
|
277
|
-
import { createLegacyKeboola } from '@keboola/api-client';
|
|
278
|
+
import { createDefaultBranch, createLegacyKeboola, createProject } from '@keboola/api-client';
|
|
279
|
+
import { createConfigurationSdk } from '@keboola/api-client/sdk/configurations';
|
|
278
280
|
|
|
279
281
|
const { api, session } = createLegacyKeboola({ baseUrl });
|
|
280
282
|
await session.authenticateStorageAsync(sapiToken); // → ready
|
|
283
|
+
const [token, devBranches] = await Promise.all([
|
|
284
|
+
api.storage.tokens.verify(),
|
|
285
|
+
api.storage.branches.getDevBranches(),
|
|
286
|
+
]);
|
|
287
|
+
const configuration = createConfigurationSdk({
|
|
288
|
+
storageClient: api.storage,
|
|
289
|
+
encryptionClient: api.encryption,
|
|
290
|
+
context: {
|
|
291
|
+
project: createProject({ sapiToken: token }),
|
|
292
|
+
defaultBranch: createDefaultBranch({ devBranches }),
|
|
293
|
+
},
|
|
294
|
+
});
|
|
281
295
|
|
|
282
296
|
// componentId must be a registered id; `#`-prefixed fields are encrypted before the write.
|
|
283
|
-
const result = await
|
|
297
|
+
const result = await configuration.createConfiguration({
|
|
284
298
|
componentId: 'keboola.ex-db-mysql',
|
|
285
299
|
name: 'Orders DB',
|
|
286
300
|
configuration: {
|
|
@@ -439,7 +453,7 @@ Surfacing — toast vs inline:
|
|
|
439
453
|
|
|
440
454
|
`@keboola/api-client/domain/permissions` holds token-only capability predicates: `canX` (boolean, safe in any UI condition) paired with `assertCanX` (throws `PermissionDeniedError` before any HTTP round-trip). Catch the error to gate UI without a network call; let it propagate from `useQuery` to surface a "no access" empty state.
|
|
441
455
|
|
|
442
|
-
Implemented today: `admin.ts` (`isAdmin`, `isProductionManager`, … + matching `assertCan*`, all `(token)`-only), `configurations.ts` (`canCreate/canCopy/canMigrateFromTemplate/canPurge/canAssignFolder` + `assertCan*`, taking a trailing `ctx: ConfigurationCtx`), and `organization.ts` (`isOrganizationMember`, `isOrganizationAdmin`, `canWriteKaiSpendCaps`, all `(token)`-only — reads `StorageToken.admin.isOrganizationMember` rather than the project role string; `assertCanAdministerOrganization`/`assertCanWriteKaiSpendCaps` pair with the latter two, `isOrganizationMember` is a raw signal with no assert)
|
|
456
|
+
Implemented today: `admin.ts` (`isAdmin`, `isProductionManager`, … + matching `assertCan*`, all `(token)`-only), `configurations.ts` (`canCreate/canCopy/canMigrateFromTemplate/canPurge/canAssignFolder` + `assertCan*`, taking a trailing `ctx: ConfigurationCtx`), and `organization.ts` (`isOrganizationMember`, `isOrganizationAdmin`, `canWriteKaiSpendCaps`, all `(token)`-only — reads `StorageToken.admin.isOrganizationMember` rather than the project role string; `assertCanAdministerOrganization`/`assertCanWriteKaiSpendCaps` pair with the latter two, `isOrganizationMember` is a raw signal with no assert), and `storage.ts` (`canListSharingTargets`, `(token)`-only, no assert — it gates a query; `createProject` exposes it). `devBranches.ts`, `sandboxes.ts` are still `export {}` placeholders.
|
|
443
457
|
|
|
444
458
|
```ts
|
|
445
459
|
import { PermissionDeniedError } from '@keboola/api-client/domain/permissions';
|
|
@@ -457,13 +471,13 @@ try {
|
|
|
457
471
|
|
|
458
472
|
## What NOT to Do
|
|
459
473
|
|
|
460
|
-
| Anti-pattern | Why it's wrong | Replacement
|
|
461
|
-
| ------------------------------------------------ | ------------------------------------------ |
|
|
462
|
-
| `fetch('/api/...')` directly | Bypasses auth, middleware, and type safety | `
|
|
463
|
-
| `import axios from 'axios'` | Not installed; circumvents the SDK layer | `
|
|
464
|
-
| `import { Api } from '@/api'` | Legacy hand-rolled client being removed | `
|
|
465
|
-
| Importing from `@keboola/api-client/fetchClient` | Internal transport layer, not public API | Use the `clients/` or `sdks/` layer
|
|
466
|
-
| `enabled: false` for conditional queries | Does not narrow `data` type | `queryFn: !ready ? skipToken : ...`
|
|
474
|
+
| Anti-pattern | Why it's wrong | Replacement |
|
|
475
|
+
| ------------------------------------------------ | ------------------------------------------ | -------------------------------------------------- |
|
|
476
|
+
| `fetch('/api/...')` directly | Bypasses auth, middleware, and type safety | `useProjectApi()` + `api.*` methods |
|
|
477
|
+
| `import axios from 'axios'` | Not installed; circumvents the SDK layer | `useProjectApi()` from `@keboola/api-client-react` |
|
|
478
|
+
| `import { Api } from '@/api'` | Legacy hand-rolled client being removed | `useProjectApi()` + typed service client |
|
|
479
|
+
| Importing from `@keboola/api-client/fetchClient` | Internal transport layer, not public API | Use the `clients/` or `sdks/` layer |
|
|
480
|
+
| `enabled: false` for conditional queries | Does not narrow `data` type | `queryFn: !ready ? skipToken : ...` |
|
|
467
481
|
|
|
468
482
|
The `fetch()`, `axios`, and legacy `@/api` bans are mechanically enforced by oxlint — see `apps/kbc-ui/oxlint.config.ts`.
|
|
469
483
|
|
|
@@ -475,9 +489,9 @@ The `fetch()`, `axios`, and legacy `@/api` bans are mechanically enforced by oxl
|
|
|
475
489
|
|
|
476
490
|
## Service Discovery
|
|
477
491
|
|
|
478
|
-
**Authoritative surface index: [`API-SURFACE.md`](./API-SURFACE.md)** — a compact list of every namespace and method **name** (no signatures), generated from the `
|
|
492
|
+
**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`.
|
|
479
493
|
|
|
480
|
-
The full namespace set is the `
|
|
494
|
+
The full namespace set is the `ProjectApi` type in `src/keboola/createApi.ts`. Quick top-level reference (see the index for the complete, current list):
|
|
481
495
|
|
|
482
496
|
```
|
|
483
497
|
api.storage.* api.management.* api.vault.*
|
|
@@ -496,7 +510,7 @@ api.sdk.tag.* api.sdk.storage.*
|
|
|
496
510
|
- `healthCheck()`, `GET /v2/docs/swagger.yaml` and unauthenticated calls answer the same everywhere.
|
|
497
511
|
- A `401` from an authenticated call means a bad or expired token, not a missing API.
|
|
498
512
|
|
|
499
|
-
Clients backing optional stack services (vault, queue, …) throw `ServiceUnavailableError` if absent from the current stack — check `api.
|
|
513
|
+
Clients backing optional stack services (vault, queue, …) throw `ServiceUnavailableError` if absent from the current stack — check `api.stack.hasService(...)` before assuming a namespace exists.
|
|
500
514
|
|
|
501
515
|
**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:
|
|
502
516
|
|
|
@@ -511,9 +525,9 @@ Don't invent a shape for the second case. These specs are uneven and, where pres
|
|
|
511
525
|
|
|
512
526
|
`apps-api.keboola.com` (the Developer Portal / `components.keboola.com` backend) authenticates with its
|
|
513
527
|
**own Cognito pool**, issuing a token trio — `token` (id), `accessToken`, `refreshToken` — not a
|
|
514
|
-
Connection storage token. `createKeboola`'s session cannot drive it:
|
|
515
|
-
|
|
516
|
-
|
|
528
|
+
Connection storage token. `createKeboola`'s session cannot drive it: its credential and its stack
|
|
529
|
+
index are Connection's. So it is not registered in `createServiceClients.ts` and never appears on
|
|
530
|
+
the `api` proxy — `api.developerPortal` does not exist.
|
|
517
531
|
|
|
518
532
|
Two layers, as everywhere else in this package:
|
|
519
533
|
|
|
@@ -569,7 +583,7 @@ import { fixtures, getTable, listTables, tableFixtures } from '@keboola/api-fixt
|
|
|
569
583
|
import type { Table, TableDetail } from '@keboola/api-fixtures';
|
|
570
584
|
```
|
|
571
585
|
|
|
572
|
-
To mock the client itself, mock at the module boundary with `vi.mock` against `@keboola/api-client` or the `
|
|
586
|
+
To mock the client itself, mock at the module boundary with `vi.mock` against `@keboola/api-client` or the `useProjectApi` hook.
|
|
573
587
|
|
|
574
588
|
## Authoring types — the generated schema is the source
|
|
575
589
|
|
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 `
|
|
5
|
+
Every namespace and method reachable from a ready `ProjectApi` — one project's api (`createKeboola(...).getProjectApi(id)` / `createLegacyKeboola(...).api`, 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, 709 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
|
|
|
@@ -27,8 +27,10 @@ Every namespace and method reachable from a ready `KeboolaApi` — the `api` hal
|
|
|
27
27
|
- `deleteDeployment`
|
|
28
28
|
- `getApp`
|
|
29
29
|
- `getAppGitRepo`
|
|
30
|
+
- `getAppGitRepoBranches`
|
|
30
31
|
- `getAppGitRepoCredential`
|
|
31
32
|
- `getAppGitRepoCredentials`
|
|
33
|
+
- `getAppGitRepoEntrypoints`
|
|
32
34
|
- `getAppLogsDownload`
|
|
33
35
|
- `getAppLogsTail`
|
|
34
36
|
- `getAppPassword`
|
|
@@ -123,31 +125,6 @@ Every namespace and method reachable from a ready `KeboolaApi` — the `api` hal
|
|
|
123
125
|
- `healthCheck`
|
|
124
126
|
- `setConnectorCredentials`
|
|
125
127
|
|
|
126
|
-
## [`api.context`](./surface/context.md)
|
|
127
|
-
|
|
128
|
-
- `defaultBranch.getType`
|
|
129
|
-
- `defaultBranch.isDefault`
|
|
130
|
-
- `defaultBranch.isDev`
|
|
131
|
-
- `project.hasAdminFeature`
|
|
132
|
-
- `project.hasBackend`
|
|
133
|
-
- `project.hasFeature`
|
|
134
|
-
- `st.createBucket`
|
|
135
|
-
- `st.createDefaultBucket`
|
|
136
|
-
- `st.createDefaultConfigBucket`
|
|
137
|
-
- `st.createDefaultConfigTable`
|
|
138
|
-
- `st.createDefaultCsvImportTable`
|
|
139
|
-
- `st.createTable`
|
|
140
|
-
- `st.parse`
|
|
141
|
-
- `st.parseBucket`
|
|
142
|
-
- `st.safeCreateDefaultBucket`
|
|
143
|
-
- `st.safeParse`
|
|
144
|
-
- `st.safeParseBucket`
|
|
145
|
-
- `stack.getComponent`
|
|
146
|
-
- `stack.getServiceUrl`
|
|
147
|
-
- `stack.hasComponent`
|
|
148
|
-
- `stack.hasFeature`
|
|
149
|
-
- `stack.hasService`
|
|
150
|
-
|
|
151
128
|
## [`api.dataScience`](./surface/dataScience.md)
|
|
152
129
|
|
|
153
130
|
- `createApp`
|
|
@@ -326,7 +303,8 @@ Every namespace and method reachable from a ready `KeboolaApi` — the `api` hal
|
|
|
326
303
|
- `payAsYouGo.getTopUpSetting`
|
|
327
304
|
- `payAsYouGo.updateStripeCustomer`
|
|
328
305
|
- `payAsYouGo.updateTopUpSetting`
|
|
329
|
-
- `programmaticProjects.
|
|
306
|
+
- `programmaticProjects.confirmByCookie`
|
|
307
|
+
- `programmaticProjects.confirmByToken`
|
|
330
308
|
- `programmaticProjects.getClaim`
|
|
331
309
|
- `projects.addProjectFeature`
|
|
332
310
|
- `projects.addProjectTemplateFeature`
|
|
@@ -480,9 +458,6 @@ Every namespace and method reachable from a ready `KeboolaApi` — the `api` hal
|
|
|
480
458
|
|
|
481
459
|
## [`api.sdk`](./surface/sdk.md)
|
|
482
460
|
|
|
483
|
-
- `configuration.createConfiguration`
|
|
484
|
-
- `configuration.getConfiguration`
|
|
485
|
-
- `configuration.updateConfiguration`
|
|
486
461
|
- `kaiMemory.createItem`
|
|
487
462
|
- `kaiMemory.deleteUnreadableItem`
|
|
488
463
|
- `kaiMemory.getItems`
|
|
@@ -525,6 +500,14 @@ Every namespace and method reachable from a ready `KeboolaApi` — the `api` hal
|
|
|
525
500
|
- `vault.setVariablesGroup`
|
|
526
501
|
- `vault.updateVariable`
|
|
527
502
|
|
|
503
|
+
## [`api.stack`](./surface/stack.md)
|
|
504
|
+
|
|
505
|
+
- `getComponent`
|
|
506
|
+
- `getServiceUrl`
|
|
507
|
+
- `hasComponent`
|
|
508
|
+
- `hasFeature`
|
|
509
|
+
- `hasService`
|
|
510
|
+
|
|
528
511
|
## [`api.storage`](./surface/storage.md)
|
|
529
512
|
|
|
530
513
|
- `branches.createDevBranchAsync`
|
|
@@ -779,7 +762,6 @@ Every namespace and method reachable from a ready `KeboolaApi` — the `api` hal
|
|
|
779
762
|
- `genericExtractor.performFunction`
|
|
780
763
|
- `genericExtractor.testRequest`
|
|
781
764
|
- `git.getBranches`
|
|
782
|
-
- `git.getEntrypoints`
|
|
783
765
|
- `googleAnalytics.getProfilesProperties`
|
|
784
766
|
- `googleAnalytics.getPropertiesMetadata`
|
|
785
767
|
- `googleDrive.createFile`
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,83 @@
|
|
|
1
1
|
# @keboola/api-client
|
|
2
2
|
|
|
3
|
+
## 50.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- The SDK no longer fetches a project's state. `api.baseUrl` and `api.stack` replace `api.context`; the verified token and the dev branches are the consumer's to fetch (`api.storage.tokens.verify()`, `api.storage.branches.getDevBranches()`) and derive with the exported `createProject` / `createDefaultBranch`.
|
|
8
|
+
- **Breaking:** `api.context` is gone. `api.baseUrl` is the canonical stack URL — on a bearer handle readable before a sign-in; `api.stack` is the parsed stack index, `NotReady` until it lands. The `ClientContext` type is replaced by `Stack`.
|
|
9
|
+
- **Breaking:** the project context (`sapiToken`, `defaultBranch`) is gone, with `session.project.getContext` / `getContextAsync` / `retryContext` and the `context` status on a project row. `api.sdk.configuration` is gone — build it with `createConfigurationSdk` from `@keboola/api-client/sdk/configurations`, handing it the project and default branch.
|
|
10
|
+
- **Breaking:** the bearer session knows no project; which one the app is in is the app's to keep. `getState().active` is the active stack's `baseUrl`. `session.project` (`select`, `deactivate`, `close`), `getState().projects` and the `ProjectEntry` and `ActiveLocation` types are gone, and `resume()` restores the stack alone.
|
|
11
|
+
- **Breaking:** the flat `KeboolaApi` splits in two. `StackApi` (`auth`, `management`, `baseUrl`, `stack`) is what is there before a project; `ProjectApi` is a `StackApi` plus every project namespace. `createKeboola` returns `getStackApi()` — the active stack, re-pointed by `session.stack.select` — and `getProjectApi(projectId)` in place of `getActiveApi` / `getApi`; `createLegacyKeboola(...).api` is a `ProjectApi`.
|
|
12
|
+
- **Breaking:** `getProjectApi(projectId)` writes and persists nothing, lives as long as the sign-in it was built under, and throws `NotAuthenticated` before one lands. A handle read after its sign-in ended throws `KeboolaError` (`SignInEnded`).
|
|
13
|
+
- **Breaking:** `auth.getHeadersAsync(projectId)` requires the project, resolved on the active stack. The synchronous `auth.getHeaders` is gone.
|
|
14
|
+
- **Breaking:** `session.stack.close`, `session.stack.retryContext`, `session.auth.rotate` and the `StackActive` error type are gone. A stack, once opened, stays in the table; `stack.getContextAsync` fetches a failed stack index again.
|
|
15
|
+
- The persisted session still writes `current.projectId: null` and an empty `projects` per stack, so an older build reading it does not sign out.
|
|
16
|
+
- **Breaking:** `@keboola/api-client-react` replaces `ApiClientProvider` / `useApiClient` with `StackApiProvider` / `useStackApi` and `ProjectApiProvider` / `useProjectApi`; a `ProjectApiProvider` provides its stack too. `useStack` and `useProject` are gone; `useStackApi().stack` reads the stack.
|
|
17
|
+
- **Breaking:** `createLegacyKeboola`'s storage build reads the stack index only; it no longer verifies the SAPI token, so a ready session does not mean a live token. Verify it with `api.storage.tokens.verify()` where a dead token must be caught.
|
|
18
|
+
- **Breaking:** the storage client no longer re-verifies the token after a bucket or feature write, and `isStorageTokenMutatingRequest` is no longer exported; the predicate moved to kbc-ui beside its refresh middleware.
|
|
19
|
+
- `api.storage` under the bearer flow is live from the sign-in on.
|
|
20
|
+
|
|
21
|
+
- Data apps list git branches and entrypoints from the app's saved configuration; `syncActions.git` serves only dbt
|
|
22
|
+
- `apps.getAppGitRepoBranches(appId)` and `apps.getAppGitRepoEntrypoints(appId, { ref? })` call `GET /apps/{appId}/git-repo/branches` and `/entrypoints`. The service reads the saved Git settings and decrypts their credentials, so changes count only once saved.
|
|
23
|
+
- `syncActions.git.getBranches` takes only dbt component ids and `public`, `password` or `organization` auth (`GitAuth`). `organization` is sent as `authType: organization`, the same key as data apps.
|
|
24
|
+
- `syncActions.git.getEntrypoints`, the `sshKey` auth, the `GitComponentId` and `DataAppComponentId` types and the `DATA_APP_ENTRYPOINTS` / `DATA_APP_GIT_REPOSITORY` sync actions are gone; `DbtComponentId` names the accepted ids.
|
|
25
|
+
|
|
26
|
+
- `api.kaiAgent.createChat`, `prepareChat` and `getHistory` accept only `client: 'kbc-ui'`.
|
|
27
|
+
- A history row's `client` is still typed `'kbc-ui' | 'business-chat' | null`; no row holds `business-chat`.
|
|
28
|
+
- `getHistory`'s `client` filters nothing: every listed chat is Kai's.
|
|
29
|
+
|
|
30
|
+
### Minor Changes
|
|
31
|
+
|
|
32
|
+
- `management.projects.addProjectFeature` returns the API's `warnings` (`ProjectWithFeatureWarnings`), and `ProjectFeature.BigqueryPolicyTags` names the `bigquery-policy-tags` feature.
|
|
33
|
+
|
|
34
|
+
### Patch Changes
|
|
35
|
+
|
|
36
|
+
- `AdminFeature.CanManageMaintainers` names the `can-manage-maintainers` admin feature.
|
|
37
|
+
|
|
38
|
+
- `storageTable` decodes every bucket name the parser accepts into a bucket that serializes back without throwing.
|
|
39
|
+
- A `c-` or `{branchId}-` prefix is stripped only when the rest is a valid name on its own.
|
|
40
|
+
- Otherwise the prefix stays in `baseName` — `c-_foo` and `c-` keep their full name as the display name.
|
|
41
|
+
|
|
42
|
+
- Runtime dependencies require their latest patch and minor releases.
|
|
43
|
+
- `@keboola/design`: `@rjsf/*` 6.11, `pele` 1.10, `react-resizable-panels` 4.15, `tailwind-merge` 3.7, `vega-lite` 6.5, `@tanstack/react-virtual` 3.14.22, plus patch releases of `dompurify`, `sonner`, `react-day-picker`, `node-diff3` and `@lezer/highlight`.
|
|
44
|
+
- `@keboola/api-client`: `qs` 6.16.1.
|
|
45
|
+
- `@keboola/codemirror-lang-sql`: `@lezer/highlight` 1.2.5.
|
|
46
|
+
|
|
47
|
+
## 49.0.0
|
|
48
|
+
|
|
49
|
+
### Major Changes
|
|
50
|
+
|
|
51
|
+
- **Breaking:** `programmaticProjects.confirm` is gone. `confirmByToken(claimToken)` redeems the claim a link carried and `confirmByCookie()` the claim Connection parked in its cookie, both through the OpenAPI client now that the Manage schema carries the endpoint (UT-5890)
|
|
52
|
+
|
|
53
|
+
### Minor Changes
|
|
54
|
+
|
|
55
|
+
- `App` carries `hasManagedGitRepo`: whether the app's code lives in a Keboola-managed Git repository.
|
|
56
|
+
|
|
57
|
+
- `canListSharingTargets(token)` in `@keboola/api-client/domain/permissions`, exposed as `api.context.project.canListSharingTargets`, tells whether the token may call `api.storage.bucketSharing.sharingTargets()` — the `share` role, or organization membership, as Connection's voter decides.
|
|
58
|
+
|
|
59
|
+
- `Credits` follows the billing spec's corrected `/credits` response (billing-api#225):
|
|
60
|
+
- `marketplaceSubscription` is a top-level key, not one under `stats`; its `vendor` includes `gcp` and its `billingLink` is `null` for `aws` and `gcp`.
|
|
61
|
+
- `stats` and its `componentJobs` are always present, and `stats.workspaceJobs` is a list.
|
|
62
|
+
|
|
63
|
+
- `CreditPurchase` types x402 top-ups: `invoiceTopUpType` may be `'x402'`, and the optional `paymentProvider`, `paymentStatus` (`pending` | `settled` | `expired`) and `externalPaymentId` (the settlement tx hash) describe the payment. `X402_TOP_UP_TYPE` exports the top-up type value, and `X402_PAYMENT_STATUS` and `X402PaymentStatus` the payment-status values.
|
|
64
|
+
|
|
65
|
+
- `ProjectFeature` in `constants` names every project feature the apps gate on, the new `AdminFeature` names the admin features, and `StackFeature` gains `SandboxesPythonSpark`
|
|
66
|
+
|
|
67
|
+
- `ManageErrorCode` in `constants` names the Manage API's string error codes the apps classify on, starting with the programmatic-project ones (UT-5890)
|
|
68
|
+
|
|
69
|
+
- `manageErrorCode(error)` reads the Manage API's string code off an `ApiError`, wherever the backend put it, and `isManageError(error, code)` narrows on one (UT-5890)
|
|
70
|
+
|
|
71
|
+
- `retryAfterSeconds(error)` reads a failed response's `Retry-After` header off an `ApiError`, for the endpoints that answer 429 or 503 with one (UT-5890)
|
|
72
|
+
|
|
73
|
+
- `StackFeature` in `constants` names the stack features the apps gate on, the way `ProjectFeature` already names project features (UT-5890)
|
|
74
|
+
|
|
75
|
+
### Patch Changes
|
|
76
|
+
|
|
77
|
+
- `resumeApp` wakes the app and clears a failure stop (`disabled`); a stopped app comes back `starting`.
|
|
78
|
+
|
|
79
|
+
- The bearer session's stack-index fetch gives up after 30 seconds, so a stack that never answers errors its context instead of leaving every caller waiting (UT-5890)
|
|
80
|
+
|
|
3
81
|
## 48.0.0
|
|
4
82
|
|
|
5
83
|
### Major Changes
|