@keboola/api-client 39.0.0 → 41.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 +121 -100
- package/API-SURFACE.md +27 -2
- package/CHANGELOG.md +129 -0
- package/README.md +3 -3
- package/dist/{ManagementClientAuthError-FcfMJNhr.cjs → ManagementClientAuthError-DE7lNGZQ.cjs} +2 -2
- package/dist/{ManagementClientAuthError-FcfMJNhr.cjs.map → ManagementClientAuthError-DE7lNGZQ.cjs.map} +1 -1
- package/dist/{ManagementClientAuthError-Cr9IOsnJ.js → ManagementClientAuthError-H30lti_Q.js} +2 -2
- package/dist/{ManagementClientAuthError-Cr9IOsnJ.js.map → ManagementClientAuthError-H30lti_Q.js.map} +1 -1
- package/dist/{ValidationError-CLVJCCwH.cjs → ValidationError-D65QU0uq.cjs} +10 -16
- package/dist/ValidationError-D65QU0uq.cjs.map +1 -0
- package/dist/ValidationError-DjhtNMfZ.js +42 -0
- package/dist/ValidationError-DjhtNMfZ.js.map +1 -0
- package/dist/ai/index.cjs +2 -2
- package/dist/ai/index.d.cts +2 -2
- package/dist/ai/index.d.ts +2 -2
- package/dist/ai/index.js +2 -2
- package/dist/ai/types.d.cts +1 -1
- package/dist/ai/types.d.ts +1 -1
- package/dist/{appLogs-C_zP0lpv.cjs → appLogs-B9zFJIuy.cjs} +2 -2
- package/dist/{appLogs-C_zP0lpv.cjs.map → appLogs-B9zFJIuy.cjs.map} +1 -1
- package/dist/{appLogs-Cl7Q_MR9.js → appLogs-BBkkUOW1.js} +2 -2
- package/dist/{appLogs-Cl7Q_MR9.js.map → appLogs-BBkkUOW1.js.map} +1 -1
- package/dist/{appLogs-Ch7DYpzx.d.ts → appLogs-BS6ViVGR.d.ts} +2 -2
- package/dist/{appLogs-D5A13Y0y.d.cts → appLogs-C9YlJ2g8.d.cts} +2 -2
- package/dist/apps/index.cjs +30 -56
- package/dist/apps/index.cjs.map +1 -1
- package/dist/apps/index.d.cts +8 -13
- package/dist/apps/index.d.ts +8 -13
- package/dist/apps/index.js +30 -56
- package/dist/apps/index.js.map +1 -1
- package/dist/apps/types.d.cts +2 -2
- package/dist/apps/types.d.ts +2 -2
- package/dist/assets/index.cjs +1 -1
- package/dist/assets/index.d.cts +1 -1
- package/dist/assets/index.d.ts +1 -1
- package/dist/assets/index.js +1 -1
- package/dist/auth/index.cjs +8 -4
- package/dist/auth/index.d.cts +2 -2
- package/dist/auth/index.d.ts +2 -2
- package/dist/auth/index.js +2 -2
- package/dist/auth/types.d.cts +2 -2
- package/dist/auth/types.d.ts +2 -2
- package/dist/{auth-DLWnl18b.cjs → auth-Dm0F2rOh.cjs} +2 -2
- package/dist/{auth-DLWnl18b.cjs.map → auth-Dm0F2rOh.cjs.map} +1 -1
- package/dist/{auth-BjmkFOgd.js → auth-DworfoPy.js} +2 -2
- package/dist/{auth-BjmkFOgd.js.map → auth-DworfoPy.js.map} +1 -1
- package/dist/{authClient-8yU1last.cjs → authClient-BmuUo0J4.cjs} +141 -48
- package/dist/authClient-BmuUo0J4.cjs.map +1 -0
- package/dist/{authClient-CTHNs6Tq.d.cts → authClient-CHXWJ9x3.d.ts} +109 -76
- package/dist/{authClient-BTo4Afm6.js → authClient-CgcDGd30.js} +108 -39
- package/dist/authClient-CgcDGd30.js.map +1 -0
- package/dist/{authClient-D8i3JTM-.d.ts → authClient-vEt_7_uk.d.cts} +109 -76
- package/dist/billing/index.cjs +2 -2
- package/dist/billing/index.d.cts +1 -1
- package/dist/billing/index.d.ts +1 -1
- package/dist/billing/index.js +2 -2
- package/dist/billing/types.d.cts +1 -1
- package/dist/billing/types.d.ts +1 -1
- package/dist/businessWorkspaceApi/index.cjs +1 -1
- package/dist/businessWorkspaceApi/index.d.cts +1 -1
- package/dist/businessWorkspaceApi/index.d.ts +1 -1
- package/dist/businessWorkspaceApi/index.js +1 -1
- package/dist/businessWorkspaceApi/types.d.cts +1 -1
- package/dist/businessWorkspaceApi/types.d.ts +1 -1
- package/dist/{businessWorkspaceApi-wyBdbpIJ.cjs → businessWorkspaceApi-6tCDdpnY.cjs} +3 -3
- package/dist/{businessWorkspaceApi-wyBdbpIJ.cjs.map → businessWorkspaceApi-6tCDdpnY.cjs.map} +1 -1
- package/dist/{businessWorkspaceApi-BD-iUj07.js → businessWorkspaceApi-BLUdefRF.js} +3 -3
- package/dist/{businessWorkspaceApi-BD-iUj07.js.map → businessWorkspaceApi-BLUdefRF.js.map} +1 -1
- package/dist/{businessWorkspaceApiClient-CRM1U8b-.d.cts → businessWorkspaceApiClient-BHDJlHFo.d.cts} +3 -3
- package/dist/{businessWorkspaceApiClient-C2WyWN3b.d.ts → businessWorkspaceApiClient-DI-z1VIH.d.ts} +3 -3
- package/dist/chat/index.cjs +7 -3
- package/dist/chat/index.cjs.map +1 -1
- package/dist/chat/index.d.cts +2 -2
- package/dist/chat/index.d.ts +2 -2
- package/dist/chat/index.js +7 -3
- package/dist/chat/index.js.map +1 -1
- package/dist/chat/types.cjs +1 -3
- package/dist/chat/types.cjs.map +1 -1
- package/dist/chat/types.d.cts +2 -2
- package/dist/chat/types.d.ts +2 -2
- package/dist/chat/types.js +1 -3
- package/dist/chat/types.js.map +1 -1
- package/dist/{componentId-vJz-kWs6.js → componentId-BJLfnaGc.js} +6 -2
- package/dist/componentId-BJLfnaGc.js.map +1 -0
- package/dist/{componentId-DkyQ8PM0.cjs → componentId-_IKXxICq.cjs} +6 -2
- package/dist/componentId-_IKXxICq.cjs.map +1 -0
- package/dist/{concurrent-CH9fbNr3.js → concurrent-BacWxPwi.js} +5 -7
- package/dist/concurrent-BacWxPwi.js.map +1 -0
- package/dist/{concurrent-tbiIa0UL.cjs → concurrent-CdVfR1N5.cjs} +5 -7
- package/dist/concurrent-CdVfR1N5.cjs.map +1 -0
- package/dist/{configurations-CyFF9Dtu.cjs → configurations-BTRHVSRq.cjs} +20 -53
- package/dist/configurations-BTRHVSRq.cjs.map +1 -0
- package/dist/{configurations-VtNE0nrT.js → configurations-CF3xz7RB.js} +14 -22
- package/dist/configurations-CF3xz7RB.js.map +1 -0
- package/dist/{configurations-BVvcimzo.js → configurations-Chg_JwJ1.js} +20 -53
- package/dist/configurations-Chg_JwJ1.js.map +1 -0
- package/dist/{configurations-zkNjr73Q.cjs → configurations-VlfQ_37Y.cjs} +14 -22
- package/dist/configurations-VlfQ_37Y.cjs.map +1 -0
- package/dist/constants/index.cjs +1 -1
- package/dist/constants/index.d.cts +1 -1
- package/dist/constants/index.d.ts +1 -1
- package/dist/constants/index.js +1 -1
- package/dist/{createFetchClient-BlgPbjFj.cjs → createFetchClient-Cwp8max9.cjs} +11 -4
- package/dist/createFetchClient-Cwp8max9.cjs.map +1 -0
- package/dist/{createFetchClient-C-cadpBx.js → createFetchClient-DXHQK63w.js} +11 -4
- package/dist/createFetchClient-DXHQK63w.js.map +1 -0
- package/dist/{createGenericFetchClient-Bnf1QK9W.js → createGenericFetchClient-Dg1rgzmG.js} +2 -2
- package/dist/{createGenericFetchClient-Bnf1QK9W.js.map → createGenericFetchClient-Dg1rgzmG.js.map} +1 -1
- package/dist/{createGenericFetchClient-lcozzwk2.cjs → createGenericFetchClient-Dl9cqTvR.cjs} +2 -2
- package/dist/{createGenericFetchClient-lcozzwk2.cjs.map → createGenericFetchClient-Dl9cqTvR.cjs.map} +1 -1
- package/dist/{createOpenapiFetchClient-C3UmDXpe.cjs → createOpenapiFetchClient-BYqW-9tm.cjs} +2 -2
- package/dist/{createOpenapiFetchClient-C3UmDXpe.cjs.map → createOpenapiFetchClient-BYqW-9tm.cjs.map} +1 -1
- package/dist/{createOpenapiFetchClient-COaPeeQ0.js → createOpenapiFetchClient-DZUOVupy.js} +2 -2
- package/dist/{createOpenapiFetchClient-COaPeeQ0.js.map → createOpenapiFetchClient-DZUOVupy.js.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-D-hyc4GY.cjs → dataScience-B5QxZnvW.cjs} +5 -5
- package/dist/{dataScience-D-hyc4GY.cjs.map → dataScience-B5QxZnvW.cjs.map} +1 -1
- package/dist/{dataScience-B_BmnB1m.js → dataScience-OXcwdk1p.js} +5 -5
- package/dist/{dataScience-B_BmnB1m.js.map → dataScience-OXcwdk1p.js.map} +1 -1
- package/dist/dedupe-Cky1gSUu.js +21 -0
- package/dist/dedupe-Cky1gSUu.js.map +1 -0
- package/dist/dedupe-OSnnst2u.cjs +26 -0
- package/dist/dedupe-OSnnst2u.cjs.map +1 -0
- 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 -1
- package/dist/developerPortal/types.d.cts +1 -1
- package/dist/developerPortal/types.d.ts +1 -1
- package/dist/{developerPortalClient-yHFTkKPb.js → developerPortalClient-B1QZ1rYi.js} +6 -8
- package/dist/{developerPortalClient-yHFTkKPb.js.map → developerPortalClient-B1QZ1rYi.js.map} +1 -1
- package/dist/{developerPortalClient-CutPqoAa.cjs → developerPortalClient-CLPpBksD.cjs} +6 -8
- package/dist/{developerPortalClient-CutPqoAa.cjs.map → developerPortalClient-CLPpBksD.cjs.map} +1 -1
- package/dist/domain/permissions/index.cjs +9 -30
- package/dist/domain/permissions/index.cjs.map +1 -1
- package/dist/domain/permissions/index.d.cts +29 -102
- package/dist/domain/permissions/index.d.ts +29 -102
- package/dist/domain/permissions/index.js +9 -30
- package/dist/domain/permissions/index.js.map +1 -1
- package/dist/domain/storageTable/index.d.cts +1 -1
- package/dist/domain/storageTable/index.d.ts +1 -1
- package/dist/editor/index.cjs +2 -2
- package/dist/editor/index.cjs.map +1 -1
- package/dist/editor/index.d.cts +2 -2
- package/dist/editor/index.d.ts +2 -2
- package/dist/editor/index.js +2 -2
- package/dist/editor/index.js.map +1 -1
- package/dist/editor/types.d.cts +1 -1
- package/dist/editor/types.d.ts +1 -1
- package/dist/encryption/index.cjs +2 -22
- package/dist/encryption/index.cjs.map +1 -1
- package/dist/encryption/index.d.cts +1 -1
- package/dist/encryption/index.d.ts +1 -1
- package/dist/encryption/index.js +2 -22
- package/dist/encryption/index.js.map +1 -1
- package/dist/encryption/types.d.cts +1 -1
- package/dist/encryption/types.d.ts +1 -1
- package/dist/import/index.cjs +1 -1
- package/dist/import/index.d.cts +3 -3
- package/dist/import/index.d.ts +3 -3
- package/dist/import/index.js +1 -1
- package/dist/{import-7YyyD_U_.cjs → import-CNk89mqy.cjs} +3 -3
- package/dist/{import-7YyyD_U_.cjs.map → import-CNk89mqy.cjs.map} +1 -1
- package/dist/{import-xliONVib.js → import-DiMQCzLa.js} +3 -3
- package/dist/{import-xliONVib.js.map → import-DiMQCzLa.js.map} +1 -1
- package/dist/{index-1r_CskjU.d.ts → index--ZpnE3YT.d.cts} +3 -3
- package/dist/{index-DBklbaTp.d.cts → index-B5w7WlaU.d.cts} +5 -1
- package/dist/{index-DBklbaTp.d.ts → index-B5w7WlaU.d.ts} +5 -1
- package/dist/{index-C77vTm2K.d.ts → index-BDZvaRud.d.ts} +6 -6
- package/dist/{index-KuQ79Mnz.d.ts → index-BVhHt5lx.d.cts} +18 -26
- package/dist/{index-NC1dXRTD.d.ts → index-BfqkgPGI.d.cts} +7 -13
- package/dist/{index-NC1dXRTD.d.cts → index-BfqkgPGI.d.ts} +7 -13
- package/dist/{index-V7XKUQm9.d.cts → index-BgR5zcjJ.d.ts} +18 -26
- package/dist/{index-BK-qHT39.d.ts → index-ByRpNVcs.d.cts} +83 -17
- package/dist/{index-pXN4LWUX.d.ts → index-C11JSxBY.d.ts} +8 -11
- package/dist/{index-GjcJTCbz.d.cts → index-C4TNAA8-.d.cts} +8 -11
- package/dist/{index-BMqLPS6S.d.ts → index-CXcWpZQ2.d.cts} +4 -12
- package/dist/{index-BMqLPS6S.d.cts → index-CXcWpZQ2.d.ts} +4 -12
- package/dist/{index-GfKzh267.d.ts → index-CaaTOANF.d.ts} +395 -297
- package/dist/{index-Dx52hNLP.d.cts → index-CcMHJcuP.d.cts} +3 -3
- package/dist/{index-DVw4Av4b.d.cts → index-Cvbjp3jx.d.cts} +6 -6
- package/dist/{index-DppA4k3b.d.cts → index-Cz0MXhzs.d.cts} +5 -5
- package/dist/{index-6Xe81qN3.d.ts → index-D-VMgpGc.d.ts} +5 -5
- package/dist/{index-DWf6FXOr.d.cts → index-D7-o-oGa.d.ts} +3 -3
- package/dist/{index-CWoEnDJ_.d.cts → index-DCRKjihs.d.ts} +83 -17
- package/dist/{kaiAgentClient-CHpULyeG.d.cts → index-DNThyEej.d.cts} +14 -5
- package/dist/{index-DXSmFkol.d.cts → index-DOAZmWvh.d.cts} +6 -6
- package/dist/{index-BuegqrS1.d.ts → index-D_-4uQF8.d.ts} +3 -3
- package/dist/index-DbLFwXgb.d.cts +116 -0
- package/dist/{index-De5qUWhp.d.ts → index-DnQTuc6t.d.ts} +6 -6
- package/dist/{kaiAgentClient-B5L4gbQ1.d.ts → index-Qb7X6-ph.d.ts} +14 -5
- package/dist/{index-CHXnJQ9s.d.cts → index-cWp_V6K5.d.cts} +395 -297
- package/dist/index-rwK7GcB2.d.ts +116 -0
- package/dist/index.cjs +1498 -901
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +1497 -902
- package/dist/index.js.map +1 -1
- package/dist/isLoginPageRedirect-XPwAOKK3.js +14 -0
- package/dist/isLoginPageRedirect-XPwAOKK3.js.map +1 -0
- package/dist/isLoginPageRedirect-jQHiLrG7.cjs +19 -0
- package/dist/isLoginPageRedirect-jQHiLrG7.cjs.map +1 -0
- package/dist/{jobStatus-0_Y3Sr4i.cjs → jobStatus-BMlsyXWI.cjs} +19 -45
- package/dist/jobStatus-BMlsyXWI.cjs.map +1 -0
- package/dist/{jobStatus-PSZJMTiA.js → jobStatus-CfRtsIpv.js} +19 -45
- package/dist/jobStatus-CfRtsIpv.js.map +1 -0
- package/dist/kaiAgent/index.cjs +1 -1
- package/dist/kaiAgent/index.d.cts +3 -2
- package/dist/kaiAgent/index.d.ts +3 -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-CcT2oNip.js → kaiAgent-Dp20HLTh.js} +32 -11
- package/dist/kaiAgent-Dp20HLTh.js.map +1 -0
- package/dist/{kaiAgent-DaB6UCsh.cjs → kaiAgent-QNoeVKPs.cjs} +32 -11
- package/dist/kaiAgent-QNoeVKPs.cjs.map +1 -0
- package/dist/kaiMemory-CClSPInt.cjs +289 -0
- package/dist/kaiMemory-CClSPInt.cjs.map +1 -0
- package/dist/kaiMemory-D0Y_16U4.js +260 -0
- package/dist/kaiMemory-D0Y_16U4.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 +2 -2
- package/dist/management/types.d.ts +2 -2
- package/dist/{management-DeZiQSlw.cjs → management-CCY0IYnq.cjs} +59 -24
- package/dist/management-CCY0IYnq.cjs.map +1 -0
- package/dist/{management-ckdnu1dA.js → management-DvmPiG64.js} +59 -24
- package/dist/management-DvmPiG64.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 -1
- package/dist/metastore/types.d.cts +2 -2
- package/dist/metastore/types.d.ts +2 -2
- package/dist/{metastore-B0PolCjQ.js → metastore-BycJxe7A.js} +14 -8
- package/dist/metastore-BycJxe7A.js.map +1 -0
- package/dist/{metastore-9AGrwjmN.cjs → metastore-XtWciCZT.cjs} +14 -8
- package/dist/metastore-XtWciCZT.cjs.map +1 -0
- package/dist/microsoftGraph/index.cjs +2 -2
- package/dist/microsoftGraph/index.d.cts +2 -2
- package/dist/microsoftGraph/index.d.ts +2 -2
- package/dist/microsoftGraph/index.js +2 -2
- package/dist/microsoftGraph/types.d.cts +1 -1
- package/dist/microsoftGraph/types.d.ts +1 -1
- package/dist/middleware-CBwrtgQd.js +34 -0
- package/dist/middleware-CBwrtgQd.js.map +1 -0
- package/dist/middleware-IjYx3d5u.cjs +45 -0
- package/dist/middleware-IjYx3d5u.cjs.map +1 -0
- package/dist/notifications/index.cjs +4 -4
- package/dist/notifications/index.d.cts +2 -2
- package/dist/notifications/index.d.ts +2 -2
- package/dist/notifications/index.js +4 -4
- 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 -2
- package/dist/oauth/index.d.ts +2 -2
- package/dist/oauth/index.js +1 -1
- package/dist/oauth/types.d.cts +1 -1
- package/dist/oauth/types.d.ts +1 -1
- package/dist/{oauth-DNtv4Ihb.cjs → oauth--2p8jkJf.cjs} +5 -5
- package/dist/{oauth-DNtv4Ihb.cjs.map → oauth--2p8jkJf.cjs.map} +1 -1
- package/dist/{oauth-BnHVf4cB.js → oauth-l5zE39cD.js} +5 -5
- package/dist/{oauth-BnHVf4cB.js.map → oauth-l5zE39cD.js.map} +1 -1
- package/dist/omnisearch/index.cjs +6 -14
- package/dist/omnisearch/index.cjs.map +1 -1
- package/dist/omnisearch/index.d.cts +6 -14
- package/dist/omnisearch/index.d.ts +6 -14
- package/dist/omnisearch/index.js +6 -14
- package/dist/omnisearch/index.js.map +1 -1
- package/dist/omnisearch/types.d.cts +1 -1
- package/dist/omnisearch/types.d.ts +1 -1
- package/dist/{project-DCHOxRWd.d.ts → project-B15gStbM.d.ts} +2 -2
- package/dist/{project-BRpzv3yE.d.cts → project-cHKuGvqJ.d.cts} +2 -2
- 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-j3XZ2mX6.js → queryService-CCOYbRbw.js} +6 -6
- package/dist/{queryService-j3XZ2mX6.js.map → queryService-CCOYbRbw.js.map} +1 -1
- package/dist/{queryService-BVwD6Vmc.cjs → queryService-CQzclHdL.cjs} +6 -6
- package/dist/{queryService-BVwD6Vmc.cjs.map → queryService-CQzclHdL.cjs.map} +1 -1
- package/dist/queue/index.cjs +1 -1
- package/dist/queue/index.d.cts +3 -3
- package/dist/queue/index.d.ts +3 -3
- 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-Dagl0sdP.js → queue-Cowbg6bR.js} +8 -11
- package/dist/queue-Cowbg6bR.js.map +1 -0
- package/dist/{queue-e3rMWbmK.cjs → queue-UG_BWKIC.cjs} +8 -11
- package/dist/queue-UG_BWKIC.cjs.map +1 -0
- package/dist/scheduler/index.cjs +4 -4
- package/dist/scheduler/index.d.cts +2 -2
- package/dist/scheduler/index.d.ts +2 -2
- package/dist/scheduler/index.js +4 -4
- package/dist/scheduler/types.d.cts +1 -1
- package/dist/scheduler/types.d.ts +1 -1
- package/dist/sdk/configurations/index.cjs +1 -1
- package/dist/sdk/configurations/index.d.cts +11 -11
- package/dist/sdk/configurations/index.d.ts +11 -11
- package/dist/sdk/configurations/index.js +1 -1
- package/dist/sdk/developerPortal/index.cjs +10 -18
- package/dist/sdk/developerPortal/index.cjs.map +1 -1
- package/dist/sdk/developerPortal/index.d.cts +7 -15
- package/dist/sdk/developerPortal/index.d.ts +7 -15
- package/dist/sdk/developerPortal/index.js +7 -15
- package/dist/sdk/developerPortal/index.js.map +1 -1
- package/dist/sdk/kaiMemory/index.cjs +7 -0
- package/dist/sdk/kaiMemory/index.d.cts +41 -0
- package/dist/sdk/kaiMemory/index.d.ts +41 -0
- package/dist/sdk/kaiMemory/index.js +2 -0
- package/dist/sdk/kaiMemory/types.cjs +0 -0
- package/dist/sdk/kaiMemory/types.d.cts +2 -0
- package/dist/sdk/kaiMemory/types.d.ts +2 -0
- package/dist/sdk/kaiMemory/types.js +1 -0
- package/dist/sdk/queryService/index.cjs +2 -2
- package/dist/sdk/queryService/index.d.cts +1 -1
- package/dist/sdk/queryService/index.d.ts +1 -1
- package/dist/sdk/queryService/index.js +2 -2
- package/dist/sdk/semanticLayer/index.cjs +1 -1
- package/dist/sdk/semanticLayer/index.d.cts +16 -40
- package/dist/sdk/semanticLayer/index.d.ts +16 -40
- package/dist/sdk/semanticLayer/index.js +1 -1
- package/dist/sdk/semanticLayer/types.d.cts +1 -1
- package/dist/sdk/semanticLayer/types.d.ts +1 -1
- package/dist/sdk/storage/index.cjs +0 -5
- package/dist/sdk/storage/index.cjs.map +1 -1
- package/dist/sdk/storage/index.d.cts +2 -2
- package/dist/sdk/storage/index.d.ts +2 -2
- package/dist/sdk/storage/index.js +1 -5
- 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 -3
- package/dist/sdk/tag/index.d.ts +3 -3
- package/dist/sdk/tag/index.js +1 -1
- package/dist/sdk/tag/types.d.cts +1 -1
- package/dist/sdk/tag/types.d.ts +1 -1
- package/dist/sdk/vault/index.cjs +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 +1 -1
- package/dist/{semanticLayer-9uTaU7UT.cjs → semanticLayer-CKDVkU56.cjs} +62 -183
- package/dist/semanticLayer-CKDVkU56.cjs.map +1 -0
- package/dist/{semanticLayer-6_gtFxDu.js → semanticLayer-pYy082Ju.js} +62 -183
- package/dist/semanticLayer-pYy082Ju.js.map +1 -0
- package/dist/status/index.cjs +1 -1
- package/dist/status/index.d.cts +1 -1
- package/dist/status/index.d.ts +1 -1
- package/dist/status/index.js +1 -1
- package/dist/storage/index.cjs +5 -5
- package/dist/storage/index.d.cts +2 -2
- package/dist/storage/index.d.ts +2 -2
- package/dist/storage/index.js +5 -5
- package/dist/storage/types.d.cts +2 -2
- package/dist/storage/types.d.ts +2 -2
- package/dist/{storage-Ob1LUIDq.js → storage-CZQHZcXG.js} +109 -302
- package/dist/storage-CZQHZcXG.js.map +1 -0
- package/dist/{storage-HFUdEy7P.cjs → storage-JinL1y1s.cjs} +109 -302
- package/dist/storage-JinL1y1s.cjs.map +1 -0
- package/dist/stream/index.cjs +3 -3
- package/dist/stream/index.d.cts +2 -2
- package/dist/stream/index.d.ts +2 -2
- package/dist/stream/index.js +3 -3
- package/dist/stream/types.d.cts +1 -1
- package/dist/stream/types.d.ts +1 -1
- package/dist/syncActions/index.cjs +1 -1
- package/dist/syncActions/index.d.cts +1 -1
- package/dist/syncActions/index.d.ts +1 -1
- package/dist/syncActions/index.js +1 -1
- package/dist/syncActions/types.d.cts +2 -2
- package/dist/syncActions/types.d.ts +2 -2
- package/dist/{syncActions-B3NS5a0g.js → syncActions-ChNWuhYA.js} +260 -111
- package/dist/syncActions-ChNWuhYA.js.map +1 -0
- package/dist/{syncActions-D2DhY6pP.cjs → syncActions-mFlF16cl.cjs} +260 -111
- package/dist/syncActions-mFlF16cl.cjs.map +1 -0
- package/dist/{tag-CsoOZWB_.cjs → tag-DHS_soa7.cjs} +2 -2
- package/dist/{tag-CsoOZWB_.cjs.map → tag-DHS_soa7.cjs.map} +1 -1
- package/dist/{tag-DCsoewjL.js → tag-hh-1nhNr.js} +2 -2
- package/dist/{tag-DCsoewjL.js.map → tag-hh-1nhNr.js.map} +1 -1
- package/dist/telemetry/index.cjs +7 -11
- package/dist/telemetry/index.cjs.map +1 -1
- package/dist/telemetry/index.d.cts +5 -9
- package/dist/telemetry/index.d.ts +5 -9
- package/dist/telemetry/index.js +7 -11
- package/dist/telemetry/index.js.map +1 -1
- package/dist/telemetry/types.d.cts +1 -1
- package/dist/telemetry/types.d.ts +1 -1
- package/dist/{types-DqxIx9Pi.d.cts → types-6kuMW4JW.d.cts} +2 -2
- package/dist/{types-Ct0YPy2w.d.ts → types-B2w2TtSA.d.ts} +3 -3
- package/dist/{types-M46WuBSm.d.cts → types-B61aCifg.d.cts} +2 -2
- package/dist/{types-COL1kVEB.d.cts → types-B8N_k79M.d.cts} +2 -2
- package/dist/{types-Jw10xuOW.d.cts → types-BIECJYun.d.ts} +171 -44
- package/dist/{types-DZk3XHiN.d.cts → types-BLNB882w.d.cts} +3 -3
- package/dist/{types-BEe50G2r.d.cts → types-BPy5Ozee.d.cts} +2 -2
- package/dist/{types-gi4Eay19.d.ts → types-BS4jwuMi.d.ts} +7 -15
- package/dist/{types-BrYkBQo4.d.ts → types-BTK7Bv3n.d.cts} +171 -44
- package/dist/{types-D6UmMa6E.d.ts → types-BZDV8DZk.d.ts} +3 -3
- package/dist/{types-Cz83RiVu.d.cts → types-B_iLJlp4.d.ts} +255 -12
- package/dist/{types-CmF3pR2n.d.cts → types-BiMahEK8.d.cts} +91 -237
- package/dist/{types-BH5LLeJy.d.ts → types-Bl03Cg2n.d.cts} +255 -12
- package/dist/{types-bGQb4Jtl.d.cts → types-ByLH46Dt.d.cts} +13 -8
- package/dist/{types-g3vU7hcg.d.cts → types-Bydx6ga_.d.cts} +2 -2
- package/dist/{types-B95uNQ9o.d.ts → types-CKmTZSPG.d.ts} +91 -237
- package/dist/{types-D_j2Uq5X.d.cts → types-CMzQSHAQ.d.cts} +3 -3
- package/dist/{types-N3EChotg.d.cts → types-CP_LBmw3.d.cts} +2 -2
- package/dist/{types-CW6lCqrC.d.cts → types-CQFOCQzk.d.ts} +230 -43
- package/dist/{types-zZBxJ0P-.d.ts → types-CWyXTMwy.d.ts} +2 -2
- package/dist/{types-CPB-eF82.d.ts → types-CZJlLCbA.d.ts} +2 -2
- package/dist/{types-l9o4gFsI.d.ts → types-CZXPu3gn.d.ts} +2 -2
- package/dist/{types-BztF4HeB.d.ts → types-CaOtNjSZ.d.ts} +6 -13
- package/dist/{types-BTWIPEiU.d.ts → types-CfwqVkEA.d.ts} +2 -2
- package/dist/types-Cg14ncdV.d.ts +63 -0
- package/dist/{types-BsxLGDoC.d.cts → types-CoJVrRAD.d.ts} +2 -2
- package/dist/{types-DYzJ6K2e.d.ts → types-CqwHP7mN.d.cts} +230 -43
- package/dist/{types-CKiW3n6v.d.ts → types-D3wcs4tp.d.ts} +2 -2
- package/dist/{types-DOyNe7oe.d.cts → types-DDOa07rU.d.cts} +7 -15
- package/dist/{types-BW2BXUB4.d.cts → types-DE9hgr7i.d.cts} +2 -2
- package/dist/{types-BOqD3Hqy.d.cts → types-DEzW1CfI.d.cts} +3 -3
- package/dist/{types-OaD-cbbl.d.ts → types-DIiOMV-t.d.ts} +3 -3
- package/dist/{types-B-P4vQe0.d.cts → types-DKc1gmd9.d.ts} +857 -131
- package/dist/{types-BrPlv-NS.d.ts → types-DRCMBt89.d.ts} +3 -3
- package/dist/{types-BQvv4RaI.d.cts → types-DUMal2E-.d.cts} +5 -8
- package/dist/types-DWiLcrxt.d.cts +63 -0
- package/dist/{types-DNxOHnZI.d.cts → types-Dd31Lw4S.d.cts} +2 -2
- package/dist/{types-Dmu-8g4O.d.ts → types-DekYAlA-.d.ts} +3 -3
- package/dist/{types-B2U9cFcx.d.ts → types-DgJeO9Nd.d.ts} +2 -2
- package/dist/{types-nrviNdzZ.d.ts → types-DicSaNwq.d.ts} +2 -2
- package/dist/{types-Crhy0c9m.d.cts → types-DinIJ1D_.d.cts} +40 -11
- package/dist/{types-DhDNS-5B.d.ts → types-DlQw6FCi.d.ts} +13 -8
- package/dist/{types-_RhBCj4_.d.cts → types-DoZtE9tz.d.cts} +3 -3
- package/dist/{types-Bxhh2SJr.d.ts → types-DrvKfXXd.d.cts} +2 -2
- package/dist/{types-DPl8pZsY.d.ts → types-Dtuvhm3K.d.cts} +857 -131
- package/dist/{types-CcrvrAJX.d.ts → types-DwVSj-Da.d.ts} +5 -8
- package/dist/{types-C2vefB4D.d.ts → types-FwRmjsNN.d.ts} +10 -34
- package/dist/{types-C0_2KZ-A.d.ts → types-RbrfiY8T.d.ts} +2 -2
- package/dist/{types-DfvdbRPL.d.ts → types-WZBztugL.d.ts} +2 -2
- package/dist/{types-52irAt99.d.cts → types-YHUEArkR.d.cts} +2 -2
- package/dist/{types-fX4gbxfV.d.cts → types-bc-4z_gc.d.cts} +10 -34
- package/dist/{types-3eUgOA7I.d.cts → types-ePSqbXRr.d.cts} +6 -13
- package/dist/{types-DrqKICcK.d.ts → types-n4PTnLii.d.ts} +40 -11
- package/dist/{types-DXskkNp8.d.cts → types-pvQzbgNE.d.cts} +3 -3
- package/dist/{types-DajzGOKB.d.ts → types-q-1r_9d1.d.ts} +2 -2
- package/dist/{types-D8Rrz51O.d.cts → types-tKkeLa2B.d.cts} +2 -2
- package/dist/{validateConnectionStatus-828HV8WL.js → validateConnectionStatus-BEGu8wXT.js} +6 -10
- package/dist/validateConnectionStatus-BEGu8wXT.js.map +1 -0
- package/dist/{validateConnectionStatus-CvBKyeDO.cjs → validateConnectionStatus-BEYkQpu9.cjs} +6 -10
- package/dist/validateConnectionStatus-BEYkQpu9.cjs.map +1 -0
- package/dist/vault/index.cjs +4 -4
- package/dist/vault/index.d.cts +1 -1
- package/dist/vault/index.d.ts +1 -1
- package/dist/vault/index.js +4 -4
- package/dist/vault/types.d.cts +1 -1
- package/dist/vault/types.d.ts +1 -1
- package/package.json +32 -4
- package/surface/apps.md +3 -3
- package/surface/auth.md +13 -6
- package/surface/chat.md +6 -6
- package/surface/kaiAgent.md +9 -8
- package/surface/management.md +14 -5
- package/surface/metastore.md +2 -2
- package/surface/queue.md +3 -3
- package/surface/sdk.md +13 -3
- package/surface/storage.md +6 -6
- package/surface/syncActions.md +16 -0
- package/dist/ValidationError-BekhphAq.js +0 -48
- package/dist/ValidationError-BekhphAq.js.map +0 -1
- package/dist/ValidationError-CLVJCCwH.cjs.map +0 -1
- package/dist/authClient-8yU1last.cjs.map +0 -1
- package/dist/authClient-BTo4Afm6.js.map +0 -1
- package/dist/componentId-DkyQ8PM0.cjs.map +0 -1
- package/dist/componentId-vJz-kWs6.js.map +0 -1
- package/dist/concurrent-CH9fbNr3.js.map +0 -1
- package/dist/concurrent-tbiIa0UL.cjs.map +0 -1
- package/dist/configurations-BVvcimzo.js.map +0 -1
- package/dist/configurations-CyFF9Dtu.cjs.map +0 -1
- package/dist/configurations-VtNE0nrT.js.map +0 -1
- package/dist/configurations-zkNjr73Q.cjs.map +0 -1
- package/dist/createFetchClient-BlgPbjFj.cjs.map +0 -1
- package/dist/createFetchClient-C-cadpBx.js.map +0 -1
- package/dist/credential-CAulvfZ-.cjs +0 -47
- package/dist/credential-CAulvfZ-.cjs.map +0 -1
- package/dist/credential-DWXbo4IX.js +0 -36
- package/dist/credential-DWXbo4IX.js.map +0 -1
- package/dist/dedupe-CiskLkGR.cjs +0 -30
- package/dist/dedupe-CiskLkGR.cjs.map +0 -1
- package/dist/dedupe-DYIHgZoG.js +0 -25
- package/dist/dedupe-DYIHgZoG.js.map +0 -1
- package/dist/index-3LUk2rpD.d.ts +0 -65
- package/dist/index-CW3Pj7DY.d.cts +0 -65
- package/dist/isLoginPageRedirect-Cm6Pn8Pj.cjs +0 -25
- package/dist/isLoginPageRedirect-Cm6Pn8Pj.cjs.map +0 -1
- package/dist/isLoginPageRedirect-hyPqyWNX.js +0 -20
- package/dist/isLoginPageRedirect-hyPqyWNX.js.map +0 -1
- package/dist/jobStatus-0_Y3Sr4i.cjs.map +0 -1
- package/dist/jobStatus-PSZJMTiA.js.map +0 -1
- package/dist/kaiAgent-CcT2oNip.js.map +0 -1
- package/dist/kaiAgent-DaB6UCsh.cjs.map +0 -1
- package/dist/management-DeZiQSlw.cjs.map +0 -1
- package/dist/management-ckdnu1dA.js.map +0 -1
- package/dist/metastore-9AGrwjmN.cjs.map +0 -1
- package/dist/metastore-B0PolCjQ.js.map +0 -1
- package/dist/queue-Dagl0sdP.js.map +0 -1
- package/dist/queue-e3rMWbmK.cjs.map +0 -1
- package/dist/semanticLayer-6_gtFxDu.js.map +0 -1
- package/dist/semanticLayer-9uTaU7UT.cjs.map +0 -1
- package/dist/storage-HFUdEy7P.cjs.map +0 -1
- package/dist/storage-Ob1LUIDq.js.map +0 -1
- package/dist/syncActions-B3NS5a0g.js.map +0 -1
- package/dist/syncActions-D2DhY6pP.cjs.map +0 -1
- package/dist/validateConnectionStatus-828HV8WL.js.map +0 -1
- package/dist/validateConnectionStatus-CvBKyeDO.cjs.map +0 -1
package/AGENTS.md
CHANGED
|
@@ -17,8 +17,13 @@ pnpm type-check --filter=@keboola/api-client # tsc --noEmit
|
|
|
17
17
|
pnpm --filter @keboola/api-client gen:types --list # What can be regenerated
|
|
18
18
|
pnpm --filter @keboola/api-client gen:types storage # One service — leaves the rest alone
|
|
19
19
|
pnpm --filter @keboola/api-client gen:types # Every API in redocly.yaml
|
|
20
|
+
pnpm --filter @keboola/api-client gen:types:drift # Which schemas no longer match their service
|
|
20
21
|
```
|
|
21
22
|
|
|
23
|
+
`gen:types:drift` is what the weekly **api-client Weekly OpenAPI Drift** lane runs; it writes into
|
|
24
|
+
the working tree to diff, so discard afterwards. See
|
|
25
|
+
[`docs/regenerate-api-types.md`](./docs/regenerate-api-types.md).
|
|
26
|
+
|
|
22
27
|
## Getting a client
|
|
23
28
|
|
|
24
29
|
**React (the common case).** In `apps/kbc-ui` and other React apps, use `useApiClient()` from [`@keboola/api-client-react`](../api-client-react/AGENTS.md) — it returns the flow-agnostic `api` (auth + management + product namespaces). At startup an auth provider (`LegacyAuthProvider` for SAPI, `AuthProvider` for bearer) drives the module-load singleton's `session` to ready and renders a fallback until then; `ApiClientProvider` propagates that `api` to the tree. Don't create a client per component.
|
|
@@ -34,7 +39,7 @@ const { data } = useQuery({
|
|
|
34
39
|
**Scripts / CLIs / non-React.** Create one directly — pick the smallest that covers you:
|
|
35
40
|
|
|
36
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 `ApiClientProvider` + `useApiClient()` — see above; this section is about the non-React/single-service case.)
|
|
37
|
-
- **`createLegacyKeboola` / `createKeboola`** — full SDK across all stack services.
|
|
42
|
+
- **`createLegacyKeboola` / `createKeboola`** — full SDK across all stack services. `createLegacyKeboola` returns `{ api, session }` and `createKeboola` returns `{ session, getActiveApi, getApi }`; drive the `session` to ready, then use the product surface. Bootstrap (`getStackInfo` + `tokens.verify()` to discover services against the actual stack) runs while the storage build resolves, after which `api.context` is synchronous. 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`.
|
|
38
43
|
|
|
39
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.
|
|
40
45
|
|
|
@@ -61,10 +66,11 @@ const buckets = await api.storage.buckets.getBuckets();
|
|
|
61
66
|
|
|
62
67
|
## Lifecycle & auth (the stateful client)
|
|
63
68
|
|
|
64
|
-
Two flow-specific factories back the SDK
|
|
69
|
+
Two flow-specific factories back the SDK:
|
|
65
70
|
|
|
66
|
-
- `createKeboola(
|
|
67
|
-
|
|
71
|
+
- `createKeboola({ defaultBaseUrl, … })` — the **bearer (OAuth)** flow. Returns `{ session, getActiveApi, getApi }`;
|
|
72
|
+
`getActiveApi()` is the scoped product surface, `getApi(projectId)` a pinned one (see below).
|
|
73
|
+
- `createLegacyKeboola(opts?)` — the **legacy (SAPI-token)** flow. Returns `{ api, session }`.
|
|
68
74
|
|
|
69
75
|
`api` is the same **flow-agnostic** product surface for both — a state-gating proxy:
|
|
70
76
|
|
|
@@ -73,13 +79,20 @@ Two flow-specific factories back the SDK, and **both return `{ api, session }`**
|
|
|
73
79
|
- **`api.storage` / `api.queue` / `api.context` / `api.sdk` / …** — product namespaces, live only once
|
|
74
80
|
the async storage build reaches `ready` (throw `KeboolaError` (`NotReady`) before that).
|
|
75
81
|
|
|
76
|
-
`session` is **flow-specific** lifecycle machinery
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
`
|
|
82
|
+
`session` is **flow-specific** lifecycle machinery:
|
|
83
|
+
|
|
84
|
+
- bearer: `stack.select(baseUrl)` → `auth.authenticate(credential)` → `project.select(projectId)`,
|
|
85
|
+
plus `auth.signOut()` / `auth.replace(credential)` / `auth.isAuthenticated()` / `auth.isAuthenticatedAsync()` / `auth.rotate(baseUrl)` / `auth.getHeaders(projectId?)`, `stack.close` and
|
|
86
|
+
the two `deactivate`s, and `getState()` / `subscribe(cb)` over the stack-and-project table. Every
|
|
87
|
+
verb is synchronous — nothing awaits a build; a namespace throws `NotReady` until its fetch lands.
|
|
88
|
+
The one fetch each entry does own is readable both ways: `stack.getContext(baseUrl?)` /
|
|
89
|
+
`project.getContext(entryId?)` answer from cache (`null` until it lands), and the
|
|
90
|
+
`getContextAsync` sibling of each awaits it. `retryContext` refetches after a failure. The
|
|
91
|
+
project trio keys by `${baseUrl}#${projectId}` — a row on any stack — where `getApi` and
|
|
92
|
+
`auth.getHeaders` take a bare project id and address the active stack.
|
|
93
|
+
- legacy: `setBaseUrl`, `authenticateStorage(sapiToken)` / `authenticateStorageAsync(sapiToken)`
|
|
94
|
+
(awaits the build), `authenticateManagement(manageToken)`, `isStorageReady()`, `subscribe(cb)`
|
|
95
|
+
(fires on config **and** storage-build transitions) and `debug()`.
|
|
83
96
|
|
|
84
97
|
```ts
|
|
85
98
|
// Legacy (SAPI token in hand): one step to ready
|
|
@@ -88,92 +101,86 @@ await session.authenticateStorageAsync(token);
|
|
|
88
101
|
const buckets = await api.storage.buckets.getBuckets(defaultBranchId);
|
|
89
102
|
|
|
90
103
|
// Bearer (OAuth) login flow (browser)
|
|
91
|
-
const {
|
|
92
|
-
await
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
await session.setProjectAsync(projects[0].id); // → ready
|
|
96
|
-
session.setProject(otherId); // runtime re-scope (rebuilds against the new project)
|
|
97
|
-
|
|
98
|
-
session.debug(); // { baseUrl, authReady, managementReady, storage, config }
|
|
104
|
+
const { session, getActiveApi } = createKeboola({ defaultBaseUrl: baseUrl }); // `auth` is live now
|
|
105
|
+
const result = await getActiveApi().auth.login.withPassword({ email, password });
|
|
106
|
+
if (!result.mfaRequired) session.auth.authenticate({ type: 'token', ...result });
|
|
107
|
+
session.project.select(projectId); // → the scope `getActiveApi()` addresses
|
|
99
108
|
```
|
|
100
109
|
|
|
101
110
|
### Several projects at once (bearer)
|
|
102
111
|
|
|
103
|
-
One
|
|
104
|
-
|
|
105
|
-
any project the user can reach, off the session already in hand:
|
|
112
|
+
One credential reaches every project on its stack — project scope is one header, `X-KBC-ProjectId` —
|
|
113
|
+
so `getApi(projectId)` hands out a product surface per project, off the client already in hand:
|
|
106
114
|
|
|
107
115
|
```ts
|
|
108
|
-
const {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
116
|
+
const { session, getActiveApi, getApi } = createKeboola({ defaultBaseUrl: baseUrl });
|
|
117
|
+
session.auth.authenticate(credential);
|
|
118
|
+
session.project.select(42);
|
|
119
|
+
|
|
120
|
+
const api = getActiveApi(); // the scoped project, 42
|
|
121
|
+
const other = getApi(7); // project 7, opened by the call
|
|
112
122
|
|
|
113
|
-
const other = await session.forProject(7); // a second project, alongside the first
|
|
114
123
|
const [mine, theirs] = await Promise.all([
|
|
115
|
-
api.storage.buckets.getBuckets({ branchId: 'default' }),
|
|
116
|
-
other.storage.buckets.getBuckets({ branchId: 'default' }),
|
|
124
|
+
api.storage.buckets.getBuckets({ branchId: 'default' }),
|
|
125
|
+
other.storage.buckets.getBuckets({ branchId: 'default' }),
|
|
117
126
|
]);
|
|
118
127
|
```
|
|
119
128
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
the
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
in
|
|
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
|
-
token, whose next refresh 401s and signs it out. This is a functional break, not a style preference,
|
|
176
|
-
and it does not depend on a `storage` adapter being configured.
|
|
129
|
+
Both return the same `KeboolaApi`, and both are synchronous and lazy: the surface resolves per
|
|
130
|
+
property read, so a namespace throws `KeboolaError` (`NotReady`) until that project's context fetch
|
|
131
|
+
lands, exactly as the scoped one does.
|
|
132
|
+
|
|
133
|
+
**The method is the lifetime, and that is the whole difference:**
|
|
134
|
+
|
|
135
|
+
- **`getActiveApi()` follows the scope.** It re-points when `session.project.select` moves, so a
|
|
136
|
+
component holding it sees the new project. This is the handle an app is centred on, and what
|
|
137
|
+
`ApiClientProvider` propagates to `useApiClient()`.
|
|
138
|
+
- **`getApi(7)` is pinned.** It never re-points, and it stops working when project 7 closes — by
|
|
139
|
+
`session.project.close(7)`, or by a sign-out, which closes every project on the stack. A handle
|
|
140
|
+
held across either throws `No project "…"` on its next read rather than quietly serving whoever
|
|
141
|
+
signed in after. Ask for a fresh one.
|
|
142
|
+
|
|
143
|
+
Three things follow from that, worth knowing before you hold one:
|
|
144
|
+
|
|
145
|
+
- **`getApi(7)` opens project 7**, which starts its context fetch and persists the row — so the
|
|
146
|
+
project comes back on reload, alongside the scoped one. **Close it when you are done with it**
|
|
147
|
+
(`session.project.close(7)`), or the set only grows and every reload re-fetches all of it. The
|
|
148
|
+
open is attempted, not required: asked for before the sign-in lands, the handle comes back
|
|
149
|
+
anyway and its reads throw until the row exists. It resolves against the **active stack at call
|
|
150
|
+
time** and pins the result; nothing follows a later `session.stack.select`.
|
|
151
|
+
- **One credential, one refresh loop.** Every handle shares the stack's auth middleware, which reads
|
|
152
|
+
the credential live, so a rotation happens once and serves all of them. `auth` and `management`
|
|
153
|
+
answer for the stack the handle's project sits on, not for whatever stack is active.
|
|
154
|
+
- **A project you cannot reach fails the request, not the session.** Connection answers a denied or
|
|
155
|
+
nonexistent project with the same `invalid_token` 401 as a revoked token — collapsed deliberately,
|
|
156
|
+
so scope cannot be probed. So a 401 is never read as expiry: the project's row goes `errored` and
|
|
157
|
+
the sign-in stands. **The refresh is the only oracle** — the server refusing the refresh token is
|
|
158
|
+
the one unambiguous report of a dead credential, and that is where the sign-out happens
|
|
159
|
+
(`rotateOnce` in `credentials.ts`). A cookie credential's refresh is the same oracle: the server
|
|
160
|
+
refusing its session signs it out. A static token cannot refresh, so it never signs itself out; a
|
|
161
|
+
401 on it surfaces to the caller.
|
|
162
|
+
- **Memoised per project** — `getApi(7) === getApi(7)`, which is what React `key`s and hook deps
|
|
163
|
+
need. A sign-out drops everything built for that stack's projects, so a reopened project is built
|
|
164
|
+
from scratch rather than from what the previous sign-in left behind.
|
|
165
|
+
|
|
166
|
+
`session.auth.getHeaders(projectId?)` takes the same optional argument, for a transport that is not
|
|
167
|
+
a fetch client (the chat stream). Pass the project whose `api` produced the URL, so the request's
|
|
168
|
+
headers and its target name the same project. A project id alone does not name a project — two
|
|
169
|
+
stacks can each have a project 138 — so the active stack decides, falling back to a single project
|
|
170
|
+
with that id open elsewhere.
|
|
171
|
+
|
|
172
|
+
⚠️ **One client per stack, per page.** Two `createKeboola()` instances signed in to the same stack
|
|
173
|
+
share its single-use refresh token: whichever rotates first invalidates the other's, and that one's
|
|
174
|
+
next rotation is refused — which signs it out. Nothing in the SDK detects this (a client has no
|
|
175
|
+
`dispose`, so a live sibling is indistinguishable from an abandoned one). `apps/kbc-ui` builds two
|
|
176
|
+
bearer clients for its two strategies and stays correct only because just one of them ever holds a
|
|
177
|
+
credential.
|
|
178
|
+
|
|
179
|
+
⚠️ **A second `createKeboola()` is not the way to reach a second project — it signs you out of
|
|
180
|
+
both.** Both instances hold the same single-use refresh token, and refresh _rotates_ it, with
|
|
181
|
+
two-phase rotation and replay detection on the server. Whichever instance rotates first invalidates
|
|
182
|
+
the other's token, whose next refresh 401s and signs it out. This is a functional break, not a style
|
|
183
|
+
preference, and it does not depend on a `storage` adapter being configured.
|
|
177
184
|
|
|
178
185
|
In React, `useApiClient()` returns `api`; `AuthProvider` (bearer) / `LegacyAuthProvider` (legacy) own
|
|
179
186
|
driving the `session` to ready and gate on a `fallback`. See
|
|
@@ -185,21 +192,33 @@ and the session is in-memory (lost on reload); pass a storage adapter to make it
|
|
|
185
192
|
```ts
|
|
186
193
|
import { createLocalStorage } from '@keboola/api-client';
|
|
187
194
|
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
//
|
|
192
|
-
//
|
|
193
|
-
|
|
194
|
-
const result = await session.restore();
|
|
195
|
+
// `defaultBaseUrl` is active from here on, until `resume()` or `stack.select` moves it.
|
|
196
|
+
const { session } = createKeboola({ defaultBaseUrl, storage: createLocalStorage() });
|
|
197
|
+
|
|
198
|
+
// The stored stack and project become active again; with nothing stored, the default stays.
|
|
199
|
+
// Resolves `restored | empty | expired | unreachable` — `expired` means a stored credential was refused.
|
|
200
|
+
const status = await session.resume();
|
|
195
201
|
```
|
|
196
202
|
|
|
197
|
-
Every credential change (login, project switch, token rotation, sign-out) is written back
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
+
Every credential change (login, project switch, token rotation, sign-out) is written back under one
|
|
204
|
+
fixed key, and what it holds is the whole table rather than a single session: `current` — the scoped
|
|
205
|
+
stack and project — plus a `stacks` array, each entry carrying its own credential and the projects
|
|
206
|
+
open under it. Only the durable part of a credential is written: a token credential's rotating
|
|
207
|
+
refresh token, a static one's token, and a cookie one's session id, which renews nothing without the
|
|
208
|
+
HttpOnly session cookie the browser keeps. An access token or user identity is never written.
|
|
209
|
+
|
|
210
|
+
**Token or cookie is picked at construction.** `createKeboola({ defaultBaseUrl, credentials: 'cookie' })` signs in with
|
|
211
|
+
browser-mode logins (`login.withPassword({ …, browserMode: true })`) and renews through
|
|
212
|
+
`token.refreshWithSession` — the refresh token never reaches JS. It only works from the stack's own
|
|
213
|
+
origin, so localhost and previews stay on the default `'token'`. `authenticate` refuses the other
|
|
214
|
+
rotating kind, and a restore ignores a stored one.
|
|
215
|
+
|
|
216
|
+
**A stack is always active**, so `session.stack.getActive()` never returns `null` and the active
|
|
217
|
+
stack cannot be closed. Call `resume()` once on startup: persistence starts only after it settles,
|
|
218
|
+
and a second call returns the same promise. The caller wins over the stored session — once it
|
|
219
|
+
has selected a stack or project, or signed in or out, the resume leaves the scope where it is, and a
|
|
220
|
+
stack already signed in or out keeps that sign-in. Leaving a project is `project.deactivate()`; switching stacks
|
|
221
|
+
keeps every other stack's credential.
|
|
203
222
|
Adapters: `createLocalStorage` / `createSessionStorage` (browser, memory fallback on Node/SSR),
|
|
204
223
|
`createMemoryStorage`, `createNullStorage`. In Node, supply your own adapter or default to memory.
|
|
205
224
|
|
|
@@ -484,7 +503,7 @@ Don't invent a shape for the second case. These specs are uneven and, where pres
|
|
|
484
503
|
`apps-api.keboola.com` (the Developer Portal / `components.keboola.com` backend) authenticates with its
|
|
485
504
|
**own Cognito pool**, issuing a token trio — `token` (id), `accessToken`, `refreshToken` — not a
|
|
486
505
|
Connection storage token. `createKeboola`'s session cannot drive it: driving to ready runs
|
|
487
|
-
`tokens.verify()` against Connection, and `
|
|
506
|
+
`tokens.verify()` against Connection, and `session.project.select` is meaningless. So it is not registered in
|
|
488
507
|
`createServiceClients.ts` and never appears on the `api` proxy — `api.developerPortal` does not exist.
|
|
489
508
|
|
|
490
509
|
Two layers, as everywhere else in this package:
|
|
@@ -594,6 +613,8 @@ If the resolved value is a `Job` — the request only _enqueues_ the work — th
|
|
|
594
613
|
|
|
595
614
|
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.
|
|
596
615
|
|
|
616
|
+
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: `authenticateStorage` / `authenticateStorageAsync`, `stack.getContext` / `stack.getContextAsync`.
|
|
617
|
+
|
|
597
618
|
```ts
|
|
598
619
|
const deleteBucketAsync = async (…): Promise<Job<'bucketDelete'>> => { … }; // enqueues
|
|
599
620
|
const getBucket = async (…): Promise<BucketDetail> => { … }; // done on resolve
|
package/API-SURFACE.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
Every namespace and method reachable from a ready `KeboolaApi` — the `api` half of a keboola client (`createKeboola(...).api` / `createLegacyKeboola(...).api`, or `useApiClient()`). Generated from the TypeScript type checker — see `scripts/gen-surface.mjs`.
|
|
6
6
|
|
|
7
|
-
26 top-level namespaces,
|
|
7
|
+
26 top-level namespaces, 670 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
|
|
|
@@ -56,6 +56,9 @@ Every namespace and method reachable from a ready `KeboolaApi` — the `api` hal
|
|
|
56
56
|
- `login.methods`
|
|
57
57
|
- `login.withOidc`
|
|
58
58
|
- `login.withPassword`
|
|
59
|
+
- `manageTokens.create`
|
|
60
|
+
- `manageTokens.getAll`
|
|
61
|
+
- `manageTokens.revoke`
|
|
59
62
|
- `mfa.regenerateRecoveryCodes`
|
|
60
63
|
- `mfa.totp.disable`
|
|
61
64
|
- `mfa.totp.setup`
|
|
@@ -78,7 +81,8 @@ Every namespace and method reachable from a ready `KeboolaApi` — the `api` hal
|
|
|
78
81
|
- `sudo.challenge`
|
|
79
82
|
- `sudo.verify`
|
|
80
83
|
- `token.introspect`
|
|
81
|
-
- `token.
|
|
84
|
+
- `token.refreshWithSession`
|
|
85
|
+
- `token.refreshWithToken`
|
|
82
86
|
- `token.revoke`
|
|
83
87
|
- `webauthn.getAll`
|
|
84
88
|
- `webauthn.register`
|
|
@@ -216,11 +220,16 @@ Every namespace and method reachable from a ready `KeboolaApi` — the `api` hal
|
|
|
216
220
|
- `submitToolOutput`
|
|
217
221
|
- `submitVote`
|
|
218
222
|
- `updateAgentSettings`
|
|
223
|
+
- `updateProjectToolPolicy`
|
|
219
224
|
- `updateSpendCaps`
|
|
220
225
|
- `updateUserAgentSettings`
|
|
221
226
|
|
|
222
227
|
## [`api.management`](./surface/management.md)
|
|
223
228
|
|
|
229
|
+
- `applicationTokens.createApplicationToken`
|
|
230
|
+
- `applicationTokens.deleteApplicationToken`
|
|
231
|
+
- `applicationTokens.getApplicationTokenScopes`
|
|
232
|
+
- `applicationTokens.getApplicationTokens`
|
|
224
233
|
- `currentUser.acceptMaintainerInvitation`
|
|
225
234
|
- `currentUser.acceptOrganizationInvitation`
|
|
226
235
|
- `currentUser.acceptProjectInvitation`
|
|
@@ -353,8 +362,10 @@ Every namespace and method reachable from a ready `KeboolaApi` — the `api` hal
|
|
|
353
362
|
- `storageBackends.updateStorageBackend`
|
|
354
363
|
- `uiApps.activateUiAppVersion`
|
|
355
364
|
- `uiApps.deleteUiApp`
|
|
365
|
+
- `uiApps.getUiApp`
|
|
356
366
|
- `uiApps.getUiApps`
|
|
357
367
|
- `uiApps.registerUiApp`
|
|
368
|
+
- `uiApps.renameUiApp`
|
|
358
369
|
- `users.addUserAdminFeature`
|
|
359
370
|
- `users.deleteUser`
|
|
360
371
|
- `users.deleteUserMetadata`
|
|
@@ -451,6 +462,13 @@ Every namespace and method reachable from a ready `KeboolaApi` — the `api` hal
|
|
|
451
462
|
- `configuration.createConfiguration`
|
|
452
463
|
- `configuration.getConfiguration`
|
|
453
464
|
- `configuration.updateConfiguration`
|
|
465
|
+
- `kaiMemory.createItem`
|
|
466
|
+
- `kaiMemory.deleteUnreadableItem`
|
|
467
|
+
- `kaiMemory.getItems`
|
|
468
|
+
- `kaiMemory.getItemsByStatus`
|
|
469
|
+
- `kaiMemory.getItemsByStatusStrict`
|
|
470
|
+
- `kaiMemory.getUnreadableItemIds`
|
|
471
|
+
- `kaiMemory.updateStatus`
|
|
454
472
|
- `semanticLayer.createModel`
|
|
455
473
|
- `semanticLayer.createModelTree`
|
|
456
474
|
- `semanticLayer.createObject`
|
|
@@ -709,11 +727,18 @@ Every namespace and method reachable from a ready `KeboolaApi` — the `api` hal
|
|
|
709
727
|
- `dbt.compile`
|
|
710
728
|
- `dbt.runResults`
|
|
711
729
|
- `enrollMFA`
|
|
730
|
+
- `flowMigration.preview`
|
|
731
|
+
- `flowMigration.validate`
|
|
712
732
|
- `git.getBranches`
|
|
713
733
|
- `git.getEntrypoints`
|
|
714
734
|
- `healthCheck`
|
|
715
735
|
- `looker.testCredentials`
|
|
736
|
+
- `oneDrive.createWorkbook`
|
|
737
|
+
- `oneDrive.createWorksheet`
|
|
738
|
+
- `oneDrive.getWorksheets`
|
|
739
|
+
- `oneDrive.searchFiles`
|
|
716
740
|
- `sendSyncAction`
|
|
741
|
+
- `sshKeys.generate`
|
|
717
742
|
|
|
718
743
|
## [`api.telemetry`](./surface/telemetry.md)
|
|
719
744
|
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,134 @@
|
|
|
1
1
|
# @keboola/api-client
|
|
2
2
|
|
|
3
|
+
## 41.0.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- `api.syncActions.oneDrive` wraps the OneDrive components' sync actions: `searchFiles`
|
|
8
|
+
(`keboola.ex-onedrive`), `createWorkbook` and `createWorksheet` (`keboola.wr-onedrive`), and
|
|
9
|
+
`getWorksheets`, which takes the `componentId` of either. Each takes the configuration's OAuth
|
|
10
|
+
`credentials` and throws `SyncActionError` when the component reports a failure.
|
|
11
|
+
|
|
12
|
+
## 40.0.0
|
|
13
|
+
|
|
14
|
+
### Major Changes
|
|
15
|
+
|
|
16
|
+
- Cookie (browser-mode) credentials on the bearer client.
|
|
17
|
+
- `createKeboola({ credentials: 'cookie' })` renews its credential through `auth.token.refreshWithSession`. The refresh token stays server-side, bound to the session cookie. A refused session signs the stack out, the same way a refused refresh token does. The default stays `'token'`.
|
|
18
|
+
- **Breaking:** a `cookie` credential carries `sessionId`, and `session.auth.authenticate` requires it.
|
|
19
|
+
- `authenticate` refuses a rotating credential of the kind the client was not built for, with `KeboolaErrorType.CredentialKindMismatch`. A restore reads a stored one of that kind as nothing stored.
|
|
20
|
+
- A cookie credential persists its session id, so a reload restores it through the session cookie.
|
|
21
|
+
- `CredentialMode` is exported.
|
|
22
|
+
|
|
23
|
+
- Remove `removeBranchFromUrl` from `@keboola/api-client/sdk/storage`
|
|
24
|
+
|
|
25
|
+
It stripped the `/branch/{id}/` segment from a project URL. Project URLs now always name a branch — production is the default branch, not the absence of one — so a URL with the segment removed is not a production URL, it is an old link that gets rewritten back on arrival. Its last caller is gone.
|
|
26
|
+
|
|
27
|
+
Replace a call with the branch you actually want: build the URL at the default branch id rather than stripping the segment.
|
|
28
|
+
|
|
29
|
+
- Browser/cookie mode on the auth client.
|
|
30
|
+
- `auth.login.withPassword` / `withOidc` take `browserMode` (default `false`), which also mints a browser session cookie for the issued session. The backend requires an `Origin` matching the stack app URL for it. The result type follows the flag: browser mode carries no `refreshToken`, API mode guarantees one.
|
|
31
|
+
- **Breaking:** `auth.token.refresh` is replaced by `refreshWithToken({ refreshToken })` (API mode) and `refreshWithSession({ sessionId })` (browser mode, sending `X-KBC-CSRF`).
|
|
32
|
+
- **Breaking:** the bearer credential kinds are renamed for what renews them — `browser` → `token`, `mediated` → `cookie`. A session stored under the old names is not read, so it signs in again.
|
|
33
|
+
- **Breaking:** `LoginSuccess` / `LoginResult` / `loginSuccessSchema` / `loginResultSchema` are replaced by `Api*` and `Browser*` pairs; `loginInputSchema` is no longer exported (use `passwordInputSchema`).
|
|
34
|
+
- **Breaking:** `saml.assert` takes the regenerated body, which now carries `browserMode`.
|
|
35
|
+
|
|
36
|
+
- replace MANAGE_TOKEN_SCOPES with management.applicationTokens.getApplicationTokenScopes
|
|
37
|
+
|
|
38
|
+
The constant mirrored the stack's scope list by hand and had to be edited in lockstep with the
|
|
39
|
+
backend; the Manage API now publishes the list, so the copy is gone.
|
|
40
|
+
|
|
41
|
+
- The bearer client always has an active stack, and restores only when asked.
|
|
42
|
+
- `createKeboola({ defaultBaseUrl })` is required. That stack is active from construction until `session.resume()` or `stack.select` moves it; `baseUrl` is gone.
|
|
43
|
+
- `session.stack.getActive()` returns `Stack`, never `null`. `stack.close` refuses the active stack (`KeboolaErrorType.StackActive`); `stack.deactivate()` is removed.
|
|
44
|
+
- `session.restored` is replaced by `session.resume()`, called once on startup and resolving with the same `RestoreStatus`. It rebuilds the stored stacks, credentials and projects and makes the stored stack and project active again; with nothing stored, or on a failed restore, the default stays active. A caller that selected a stack or project, or signed in or out, first keeps its scope, and a stack it signed in or out of keeps that sign-in. Persistence starts only after it settles.
|
|
45
|
+
- `session.auth.isAuthenticated()` reports whether the active stack holds a credential; `isAuthenticatedAsync()` answers once the stored session has resumed.
|
|
46
|
+
- `session.auth.replace(credential)` signs the active stack out and in with `credential`, winning over a restore still in flight.
|
|
47
|
+
- `session.auth.adoptInjected(credential)` (deprecated on arrival) adopts a server-injected `token` credential even in cookie mode. Temporary, for the agent-project claim page, until Connection stops injecting `UiConfig.programmaticAuth`.
|
|
48
|
+
- `createLegacyKeboola` keeps `baseUrl` (`LegacyKeboolaOptions`).
|
|
49
|
+
|
|
50
|
+
- rework management.uiApps around the application's `stringId`
|
|
51
|
+
- **New:** `getUiApp(stringId)` returns the application with every registered version.
|
|
52
|
+
- **New:** `renameUiApp({ stringId, name })`.
|
|
53
|
+
- **New:** `getUiApps({ includeInactive })` also lists applications with no active version.
|
|
54
|
+
- **Breaking:** `activateUiAppVersion` and `deleteUiApp` take the `stringId` instead of `id`.
|
|
55
|
+
- **Breaking:** `UiApp` carries `stringId`, and its version fields are nullable; `ActivateUiAppVersionPath` is no longer exported.
|
|
56
|
+
|
|
57
|
+
- Rebuild the bearer (OAuth) flow around a session-state table addressed by stack and project.
|
|
58
|
+
- **`createKeboola` is the factory's only public name.** The `createSessionClient` alias and the `SessionClient` type are gone — import `createKeboola`, and type a session as `BearerSession`.
|
|
59
|
+
- **It returns `{ session, getActiveApi, getApi }`, not `{ api, session }`.** `getActiveApi()` follows `session.project.select`; `getApi(projectId)` opens that project and stays pinned to it, so one signed-in client reaches several projects at once. Close a pinned project with `session.project.close(projectId)`.
|
|
60
|
+
- **The bearer `session` is regrouped** into `stack.*`, `project.*` and `auth.*`, plus `getState()` / `subscribe()` over the stack-and-project table and a `restored` promise resolving `RestoreStatus` (`'restored' | 'expired' | 'unreachable' | 'empty'`, where `expired` means the server refused the refresh token and `unreachable` means the exchange never got an answer — retry, never a login). Every verb is synchronous — a product namespace throws `NotReady` until that entry's context fetch lands, and `stack.getContextAsync` / `project.getContextAsync` await it.
|
|
61
|
+
|
|
62
|
+
| Was | Now |
|
|
63
|
+
| -------------------------------- | ------------------------------------------ |
|
|
64
|
+
| `setBaseUrl(url)` | `stack.select(url)` |
|
|
65
|
+
| `authenticate(tokens)` | `auth.authenticate(credential)` |
|
|
66
|
+
| `setProject(id)` | `project.select(id)` |
|
|
67
|
+
| `clearProject()` | `project.deactivate()` |
|
|
68
|
+
| `reset()` | `auth.signOut()` |
|
|
69
|
+
| `getAuthHeaders(projectId?)` | `auth.getHeaders(projectId?)` |
|
|
70
|
+
| `api` (the scoped surface) | `getActiveApi()` |
|
|
71
|
+
| `forProject(id)` | `getApi(id)` |
|
|
72
|
+
| `restore()` | the `restored` promise |
|
|
73
|
+
| `subscribe(cb)` (debug snapshot) | `subscribe(cb)` + `getState()` (the table) |
|
|
74
|
+
|
|
75
|
+
Removed with no replacement: `setProjectAsync`, `isStorageReady`, `hasPersistedValue`, `debug`, `debugForceRefresh`.
|
|
76
|
+
|
|
77
|
+
- **`baseUrl` is now the stack to start on, not the stack to talk to.** The bearer factory scopes it once `restored` settles, and only if the restore scoped nothing — so a stored session keeps its own stack. Any stack still enters the table through `session.stack.select(baseUrl)`.
|
|
78
|
+
- **The bearer engine no longer carries the legacy SAPI flow.** Use `createLegacyKeboola` for SAPI tokens.
|
|
79
|
+
- New type exports: `RestoreStatus`, `SessionState`, `AuthPhase`, `FetchStatus`, `ActiveLocation`, `StackEntry`, `ProjectEntry`, `BearerCredentialEntry`.
|
|
80
|
+
|
|
81
|
+
### Minor Changes
|
|
82
|
+
|
|
83
|
+
- Project-level Kai tool policy: `kaiAgent.updateProjectToolPolicy`, `toolPermissions`/`canWriteToolPolicy` on agent settings and `projectToolPermissions` on user agent settings; org-admin Tool permissions card in Project Settings.
|
|
84
|
+
|
|
85
|
+
- AI-3943: `kaiAgent.getUsage` exposes the organization's one-time free Kai allowance (`freeAllowance.grantedPpu`/`remainingPpu`); kbc-ui shows a one-time dismissible info notice in the Kai chat surfaces until dismissed or spent.
|
|
86
|
+
|
|
87
|
+
- Deprecate `createModelTree` in the semantic layer SDK (`@keboola/api-client/sdk/semanticLayer`); it is removed in the next major
|
|
88
|
+
|
|
89
|
+
It creates a model, then its children, one request each, and rejects on the first failed child, leaving behind whatever it had already written. Nothing in this repository calls it.
|
|
90
|
+
|
|
91
|
+
Create the model with `createModel`, then its children with `createObject` or `createObjects`. To delete a model that failed partway through, use `deleteModel`.
|
|
92
|
+
|
|
93
|
+
- `api.syncActions.flowMigration.validate` and `.preview` run `keboola.flow-migration-tool`'s sync
|
|
94
|
+
actions for a list of orchestrations and return one parsed result per orchestration. `preview` is a
|
|
95
|
+
dry run: its results carry the status (`dry-run`, `skipped` or `failed`), the structural changes,
|
|
96
|
+
and the flow configuration the orchestration would become.
|
|
97
|
+
|
|
98
|
+
- `api.syncActions.sshKeys.generate` generates an SSH key pair via `keboola.ssh-keygen-v2` and
|
|
99
|
+
returns its `public` and `private` keys.
|
|
100
|
+
|
|
101
|
+
- Deleted project detail exposes storage backend `backends` (like project detail) so the UI can show the backend ID as a link to `/control/storage-backends/<id>`; control-ui renders ID + type badge, gated by `canReadStorageBackends`.
|
|
102
|
+
|
|
103
|
+
- Support per-chat model tier selection and optional Fast preparation context. Chat detail responses include requested and effective tier labels plus the fixed effort. Existing callers may omit the additive request fields.
|
|
104
|
+
|
|
105
|
+
- Adds the `kaiMemory` SDK (`api.sdk.kaiMemory`) over the metastore client for Kai's org-wide knowledge-base notes, and a `canManageKaiMemory` permission predicate.
|
|
106
|
+
|
|
107
|
+
- add management.applicationTokens service, including the stack-published scope list
|
|
108
|
+
|
|
109
|
+
- `createManagementClient` takes `mintSessionToken` on a `management-token` auth strategy.
|
|
110
|
+
- The client authenticates every call with a session token minted from `token` (`POST /manage/current-user/session-token`), not with `token` itself.
|
|
111
|
+
- When that session token expires, the next one is minted from `token` again.
|
|
112
|
+
- Without `mintSessionToken`, an invalid token is replaced from the browser's login session (`POST /admin/account/session-token`) in every environment.
|
|
113
|
+
|
|
114
|
+
### Patch Changes
|
|
115
|
+
|
|
116
|
+
- `canWriteSemanticLayer` now mirrors the metastore's role rule: only the `admin` and `productionManager` project roles may write the semantic layer, and the metastore answers every other role (and a limited token) with a 403. kbc-ui's semantic-layer editor stops offering write actions to those callers, and Kai hides its semantic-layer write tools from them. Tool Permissions lists those tools for every caller, a project block hides them from Kai, and Kai reports a metastore 403 in the metastore's own words (AI-3742).
|
|
117
|
+
|
|
118
|
+
- Messages the UI sends on its own (data-app preview error forwards, job-finished nudges) are tagged `autoForwarded` and no longer count toward the monthly Kai message limit; the burst limiter still counts them. kai-agent honors the flag only when the text matches one of the UI's fixed auto-forward templates and strips it otherwise (AI-3887)
|
|
119
|
+
|
|
120
|
+
- Accept an optional `AbortSignal` in `chat.getHistory` and `kaiAgent.getHistory`, matching the other read methods on both clients. Callers that cancel a query now abort the request it started.
|
|
121
|
+
|
|
122
|
+
- Add `auth.manageTokens` — list, create and revoke Manage API tokens. The list keeps hand-made tokens and session tokens in separate arrays, and creating one needs an active sudo window.
|
|
123
|
+
|
|
124
|
+
- Add the optional `continueOnFailure` boolean to the `keboola.ex-google-ads` configuration schema, alongside the existing `onlyEnabledCustomers` flag.
|
|
125
|
+
|
|
126
|
+
- The generated Manage API types match the live document.
|
|
127
|
+
- A deleted project's `backends` entries are `{ id }`, the only field the endpoint returns for each backend.
|
|
128
|
+
- The schema carries `PATCH` and `DELETE /manage/file-storage/{fileStorageId}`.
|
|
129
|
+
|
|
130
|
+
- Accept an optional `query` filter on `metastore.repository.getMetaObjects` and `getMetaObjectRevisions` (AI-3975). The metastore already filters these list endpoints server-side on any object field (`{ status: 'pending' }`, `{ 'field[in]': 'a|b' }`, ...) — the SDK just wasn't forwarding it. Callers no longer have to page every object of a type and filter client-side.
|
|
131
|
+
|
|
3
132
|
## 39.0.0
|
|
4
133
|
|
|
5
134
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -78,9 +78,9 @@ Interactive login, then scope to a project:
|
|
|
78
78
|
```typescript
|
|
79
79
|
import { createKeboola } from '@keboola/api-client';
|
|
80
80
|
|
|
81
|
-
const { api, session } = createKeboola({ baseUrl });
|
|
81
|
+
const { api, session } = createKeboola({ defaultBaseUrl: baseUrl });
|
|
82
82
|
|
|
83
|
-
// api.auth is live
|
|
83
|
+
// api.auth is live from construction: a stack is always active
|
|
84
84
|
const result = await api.auth.login.withPassword({ email, password });
|
|
85
85
|
if (result.mfaRequired) {
|
|
86
86
|
// result is an MFA challenge — verify via api.auth.mfa.* to obtain the LoginSuccess
|
|
@@ -103,7 +103,7 @@ credential, hand a `LoginSuccess`-shaped object straight to `session.authenticat
|
|
|
103
103
|
```typescript
|
|
104
104
|
import { createKeboola } from '@keboola/api-client';
|
|
105
105
|
|
|
106
|
-
const { api, session } = createKeboola({
|
|
106
|
+
const { api, session } = createKeboola({ defaultBaseUrl: process.env.KEBOOLA_STACK_URL! });
|
|
107
107
|
|
|
108
108
|
session.authenticate({
|
|
109
109
|
mfaRequired: false,
|
package/dist/{ManagementClientAuthError-FcfMJNhr.cjs → ManagementClientAuthError-DE7lNGZQ.cjs}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_createFetchClient = require("./createFetchClient-
|
|
1
|
+
const require_createFetchClient = require("./createFetchClient-Cwp8max9.cjs");
|
|
2
2
|
//#region src/errors/ManagementClientAuthError.ts
|
|
3
3
|
var ManagementClientAuthError = class extends require_createFetchClient.ApiError {
|
|
4
4
|
title;
|
|
@@ -18,4 +18,4 @@ Object.defineProperty(exports, "ManagementClientAuthError", {
|
|
|
18
18
|
}
|
|
19
19
|
});
|
|
20
20
|
|
|
21
|
-
//# sourceMappingURL=ManagementClientAuthError-
|
|
21
|
+
//# sourceMappingURL=ManagementClientAuthError-DE7lNGZQ.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ManagementClientAuthError-
|
|
1
|
+
{"version":3,"file":"ManagementClientAuthError-DE7lNGZQ.cjs","names":["ApiError"],"sources":["../src/errors/ManagementClientAuthError.ts"],"sourcesContent":["import type { ApiResponse } from '../fetchClient/createFetchClient/types';\n\nimport { ApiError } from './ApiError';\n\nexport class ManagementClientAuthError extends ApiError {\n title: string;\n message: string;\n constructor(title: string, message: string, res: ApiResponse) {\n super(res);\n this.name = 'ManagementClientAuthError';\n this.title = title;\n this.message = message;\n }\n}\n"],"mappings":";;AAIA,IAAa,4BAAb,cAA+CA,0BAAAA,SAAS;CACtD;CACA;CACA,YAAY,OAAe,SAAiB,KAAkB;EAC5D,MAAM,GAAG;EACT,KAAK,OAAO;EACZ,KAAK,QAAQ;EACb,KAAK,UAAU;CACjB;AACF"}
|
package/dist/{ManagementClientAuthError-Cr9IOsnJ.js → ManagementClientAuthError-H30lti_Q.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as ApiError } from "./createFetchClient-
|
|
1
|
+
import { g as ApiError } from "./createFetchClient-DXHQK63w.js";
|
|
2
2
|
//#region src/errors/ManagementClientAuthError.ts
|
|
3
3
|
var ManagementClientAuthError = class extends ApiError {
|
|
4
4
|
title;
|
|
@@ -13,4 +13,4 @@ var ManagementClientAuthError = class extends ApiError {
|
|
|
13
13
|
//#endregion
|
|
14
14
|
export { ManagementClientAuthError as t };
|
|
15
15
|
|
|
16
|
-
//# sourceMappingURL=ManagementClientAuthError-
|
|
16
|
+
//# sourceMappingURL=ManagementClientAuthError-H30lti_Q.js.map
|
package/dist/{ManagementClientAuthError-Cr9IOsnJ.js.map → ManagementClientAuthError-H30lti_Q.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ManagementClientAuthError-
|
|
1
|
+
{"version":3,"file":"ManagementClientAuthError-H30lti_Q.js","names":[],"sources":["../src/errors/ManagementClientAuthError.ts"],"sourcesContent":["import type { ApiResponse } from '../fetchClient/createFetchClient/types';\n\nimport { ApiError } from './ApiError';\n\nexport class ManagementClientAuthError extends ApiError {\n title: string;\n message: string;\n constructor(title: string, message: string, res: ApiResponse) {\n super(res);\n this.name = 'ManagementClientAuthError';\n this.title = title;\n this.message = message;\n }\n}\n"],"mappings":";;AAIA,IAAa,4BAAb,cAA+C,SAAS;CACtD;CACA;CACA,YAAY,OAAe,SAAiB,KAAkB;EAC5D,MAAM,GAAG;EACT,KAAK,OAAO;EACZ,KAAK,QAAQ;EACb,KAAK,UAAU;CACjB;AACF"}
|