@keboola/api-client 32.0.0 → 33.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 +80 -2
- package/API-SURFACE.md +4 -1
- package/CHANGELOG.md +222 -0
- package/dist/{ManagementClientAuthError-B-tyPlyG.cjs → ManagementClientAuthError-DqeXL8nv.cjs} +2 -2
- package/dist/{ManagementClientAuthError-B-tyPlyG.cjs.map → ManagementClientAuthError-DqeXL8nv.cjs.map} +1 -1
- package/dist/{ManagementClientAuthError-BAFNvOdf.js → ManagementClientAuthError-iKbBugKC.js} +2 -2
- package/dist/{ManagementClientAuthError-BAFNvOdf.js.map → ManagementClientAuthError-iKbBugKC.js.map} +1 -1
- 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-DTLE6HTy.js → appLogs-D72eD8vP.js} +2 -2
- package/dist/{appLogs-DTLE6HTy.js.map → appLogs-D72eD8vP.js.map} +1 -1
- package/dist/{appLogs-NIEDTDHf.cjs → appLogs-D8K0VeNM.cjs} +2 -2
- package/dist/{appLogs-NIEDTDHf.cjs.map → appLogs-D8K0VeNM.cjs.map} +1 -1
- package/dist/{appLogs-BAaaGYKg.d.cts → appLogs-Q4A7A_Fc.d.cts} +2 -2
- package/dist/{appLogs-DX_WTBCa.d.ts → appLogs-u0XMZLjS.d.ts} +2 -2
- package/dist/apps/index.cjs +3 -3
- package/dist/apps/index.d.cts +3 -3
- package/dist/apps/index.d.ts +3 -3
- package/dist/apps/index.js +3 -3
- 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 +1 -1
- package/dist/auth/index.d.cts +1 -1
- package/dist/auth/index.d.ts +1 -1
- package/dist/auth/index.js +1 -1
- package/dist/auth/types.d.cts +2 -2
- package/dist/auth/types.d.ts +2 -2
- package/dist/{auth-DP-6TFiM.cjs → auth-C2_JLisH.cjs} +2 -2
- package/dist/{auth-DP-6TFiM.cjs.map → auth-C2_JLisH.cjs.map} +1 -1
- package/dist/{auth-DtbQaeDj.js → auth-CE9rQV3-.js} +2 -2
- package/dist/{auth-DtbQaeDj.js.map → auth-CE9rQV3-.js.map} +1 -1
- package/dist/{authClient--BtZgjIc.js → authClient-DEyqR7GW.js} +43 -9
- package/dist/authClient-DEyqR7GW.js.map +1 -0
- package/dist/{authClient-DhfzOUaa.d.cts → authClient-DZ_8lvdJ.d.cts} +6 -6
- package/dist/{authClient-CtfyVHRD.d.ts → authClient-DwT6xdg5.d.ts} +6 -6
- package/dist/{authClient-b7uec7sw.cjs → authClient-IwQ9Ti0J.cjs} +43 -9
- package/dist/authClient-IwQ9Ti0J.cjs.map +1 -0
- package/dist/chat/index.cjs +3 -3
- package/dist/chat/index.d.cts +2 -2
- package/dist/chat/index.d.ts +2 -2
- package/dist/chat/index.js +3 -3
- package/dist/chat/types.d.cts +1 -1
- package/dist/chat/types.d.ts +1 -1
- package/dist/{createFetchClient-BbG46bL0.js → createFetchClient-DdyZMhxO.js} +3 -2
- package/dist/{createFetchClient-BbG46bL0.js.map → createFetchClient-DdyZMhxO.js.map} +1 -1
- package/dist/{createFetchClient-BRfTjBLV.cjs → createFetchClient-DvZvD31l.cjs} +8 -1
- package/dist/{createFetchClient-BRfTjBLV.cjs.map → createFetchClient-DvZvD31l.cjs.map} +1 -1
- package/dist/{createGenericFetchClient-BHYQLZhe.js → createGenericFetchClient-MQeLRiNW.js} +2 -2
- package/dist/{createGenericFetchClient-BHYQLZhe.js.map → createGenericFetchClient-MQeLRiNW.js.map} +1 -1
- package/dist/{createGenericFetchClient-DHs-i7_O.cjs → createGenericFetchClient-qfCZlCTv.cjs} +2 -2
- package/dist/{createGenericFetchClient-DHs-i7_O.cjs.map → createGenericFetchClient-qfCZlCTv.cjs.map} +1 -1
- package/dist/{createOpenapiFetchClient-CyDUFxHB.cjs → createOpenapiFetchClient-C57Ljzi6.cjs} +2 -2
- package/dist/{createOpenapiFetchClient-CyDUFxHB.cjs.map → createOpenapiFetchClient-C57Ljzi6.cjs.map} +1 -1
- package/dist/{createOpenapiFetchClient-Bn6_Pn0H.js → createOpenapiFetchClient-E7OIVkYv.js} +2 -2
- package/dist/{createOpenapiFetchClient-Bn6_Pn0H.js.map → createOpenapiFetchClient-E7OIVkYv.js.map} +1 -1
- package/dist/{credential-d2RDcXRB.js → credential-Bxv7yxOZ.js} +7 -4
- package/dist/credential-Bxv7yxOZ.js.map +1 -0
- package/dist/{credential-DOXH7XRS.cjs → credential-D-X5QQrM.cjs} +7 -4
- package/dist/credential-D-X5QQrM.cjs.map +1 -0
- 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-wexHEIue.cjs → dataScience-BPW993AG.cjs} +5 -5
- package/dist/{dataScience-wexHEIue.cjs.map → dataScience-BPW993AG.cjs.map} +1 -1
- package/dist/{dataScience-Sm8iONhP.js → dataScience-B_TA7wCB.js} +5 -5
- package/dist/{dataScience-Sm8iONhP.js.map → dataScience-B_TA7wCB.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 -1
- package/dist/developerPortal/types.d.cts +1 -1
- package/dist/developerPortal/types.d.ts +1 -1
- package/dist/{developerPortalClient-CgTSzLoG.cjs → developerPortalClient-Db2XVB_o.cjs} +3 -3
- package/dist/{developerPortalClient-CgTSzLoG.cjs.map → developerPortalClient-Db2XVB_o.cjs.map} +1 -1
- package/dist/{developerPortalClient-DywKpDlW.js → developerPortalClient-jk46sjwP.js} +3 -3
- package/dist/{developerPortalClient-DywKpDlW.js.map → developerPortalClient-jk46sjwP.js.map} +1 -1
- package/dist/domain/permissions/index.d.cts +2 -2
- package/dist/domain/permissions/index.d.ts +2 -2
- package/dist/editor/index.cjs +2 -2
- 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/types.d.cts +1 -1
- package/dist/editor/types.d.ts +1 -1
- package/dist/emitter-dLF1Fyfg.d.cts +11 -0
- package/dist/emitter-dLF1Fyfg.d.ts +11 -0
- package/dist/encryption/index.cjs +1 -1
- package/dist/encryption/index.d.cts +1 -1
- package/dist/encryption/index.d.ts +1 -1
- package/dist/encryption/index.js +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-SQuurg1G.js → import-2nqxQ9Rt.js} +3 -3
- package/dist/{import-SQuurg1G.js.map → import-2nqxQ9Rt.js.map} +1 -1
- package/dist/{import-C0-y1GQK.cjs → import-DJilJ6tq.cjs} +3 -3
- package/dist/{import-C0-y1GQK.cjs.map → import-DJilJ6tq.cjs.map} +1 -1
- package/dist/{index-FhKX7Cv1.d.ts → index-B0V1pJAa.d.ts} +241 -200
- package/dist/{index-Bg1P6Bb2.d.ts → index-B2OGaUap.d.ts} +6 -6
- package/dist/{index-Dbzjvy5h.d.ts → index-BjKjp3Rf.d.ts} +5 -5
- package/dist/{index-DeKPpYQy.d.ts → index-C7gxKoDF.d.cts} +3 -3
- package/dist/{index-D_7yCRKy.d.cts → index-CTd4YY8e.d.cts} +4 -4
- package/dist/{index-DiHHyMEo.d.cts → index-CUXEFQ7i.d.cts} +6 -6
- package/dist/{index-eAlN694c.d.cts → index-CVqk63at.d.ts} +3 -3
- package/dist/{index-Bc_hXWae.d.ts → index-C_cxKL1V.d.ts} +3 -3
- package/dist/{index-tKsiUarj.d.ts → index-ChMtULt4.d.ts} +4 -4
- package/dist/{index-Gn1H63Hk.d.cts → index-DCN2lH0v.d.cts} +4 -4
- package/dist/{index-Bjk-tCpG.d.cts → index-DIVvL54G.d.cts} +241 -200
- package/dist/{index-C7e3wBt9.d.cts → index-DLYAvSWZ.d.cts} +3 -3
- package/dist/{index-fHfc_VqS.d.ts → index-DQef014j.d.ts} +4 -4
- package/dist/{index-CeJOmN-P.d.ts → index-DVhTNwvu.d.ts} +3 -2
- package/dist/{index-CQrKS7PV.d.cts → index-DhVFuQDv.d.cts} +3 -2
- package/dist/{index-Ctqkm3Fx.d.ts → index-GNKwr7EQ.d.ts} +4 -4
- package/dist/{index-GDdFZCXp.d.ts → index-bB6wvw1f.d.ts} +4 -4
- package/dist/{index-BKh0prif.d.cts → index-exNi3I2Q.d.cts} +4 -4
- package/dist/{index-CXtdQ7be.d.cts → index-qOK5FtAH.d.cts} +4 -4
- package/dist/{index-DqOAjqxN.d.cts → index-t-a7kYnx.d.cts} +5 -5
- package/dist/index.cjs +303 -47
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -6
- package/dist/index.d.ts +7 -6
- package/dist/index.js +285 -30
- package/dist/index.js.map +1 -1
- package/dist/{jobStatus-kQ9JqF8t.cjs → jobStatus-0_Y3Sr4i.cjs} +37 -20
- package/dist/jobStatus-0_Y3Sr4i.cjs.map +1 -0
- package/dist/{jobStatus-DbMupQEK.js → jobStatus-PSZJMTiA.js} +35 -18
- package/dist/jobStatus-PSZJMTiA.js.map +1 -0
- package/dist/kaiAgent/index.cjs +1 -1
- package/dist/kaiAgent/index.d.cts +2 -210
- package/dist/kaiAgent/index.d.ts +2 -210
- package/dist/kaiAgent/index.js +1 -1
- package/dist/kaiAgent/types.d.cts +1 -1
- package/dist/kaiAgent/types.d.ts +1 -1
- package/dist/{kaiAgent-4OiIK1C2.cjs → kaiAgent-CMVub6Sc.cjs} +48 -4
- package/dist/kaiAgent-CMVub6Sc.cjs.map +1 -0
- package/dist/{kaiAgent-HDaFS9BR.js → kaiAgent-CYYn0QJW.js} +48 -4
- package/dist/kaiAgent-CYYn0QJW.js.map +1 -0
- package/dist/kaiAgentClient-B2O0DF4d.d.ts +249 -0
- package/dist/kaiAgentClient-iCFR2tRU.d.cts +249 -0
- package/dist/management/index.cjs +1 -1
- package/dist/management/index.d.cts +1 -1
- package/dist/management/index.d.ts +1 -1
- package/dist/management/index.js +1 -1
- package/dist/management/types.d.cts +1 -1
- package/dist/management/types.d.ts +1 -1
- package/dist/{management-DfjwQo7z.cjs → management-DGfgKsaA.cjs} +5 -5
- package/dist/{management-DfjwQo7z.cjs.map → management-DGfgKsaA.cjs.map} +1 -1
- package/dist/{management-CIFhu1Nm.js → management-DNEKhR6a.js} +5 -5
- package/dist/{management-CIFhu1Nm.js.map → management-DNEKhR6a.js.map} +1 -1
- 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 +1 -1
- package/dist/metastore/types.d.ts +1 -1
- package/dist/{metastore-CrXkKufo.js → metastore-CjwktHvw.js} +4 -4
- package/dist/{metastore-CrXkKufo.js.map → metastore-CjwktHvw.js.map} +1 -1
- package/dist/{metastore-Dq2NS6jb.cjs → metastore-DksEte8P.cjs} +4 -4
- package/dist/{metastore-Dq2NS6jb.cjs.map → metastore-DksEte8P.cjs.map} +1 -1
- 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/notifications/index.cjs +3 -3
- package/dist/notifications/index.d.cts +2 -2
- package/dist/notifications/index.d.ts +2 -2
- package/dist/notifications/index.js +3 -3
- 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-CFwSNz37.js → oauth-Bg5zro5S.js} +5 -5
- package/dist/{oauth-CFwSNz37.js.map → oauth-Bg5zro5S.js.map} +1 -1
- package/dist/{oauth-CkW5gln-.cjs → oauth-DFsI1TE5.cjs} +5 -5
- package/dist/{oauth-CkW5gln-.cjs.map → oauth-DFsI1TE5.cjs.map} +1 -1
- package/dist/omnisearch/index.cjs +2 -2
- package/dist/omnisearch/index.d.cts +2 -2
- package/dist/omnisearch/index.d.ts +2 -2
- package/dist/omnisearch/index.js +2 -2
- package/dist/omnisearch/types.d.cts +1 -1
- package/dist/omnisearch/types.d.ts +1 -1
- package/dist/{project-BOGaVs-q.d.ts → project-Bh954iOA.d.ts} +2 -2
- package/dist/{project-BnQkL8cb.d.cts → project-D25GH8zK.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-BLaGbpm-.cjs → queryService--t_W9PSJ.cjs} +6 -6
- package/dist/{queryService-BLaGbpm-.cjs.map → queryService--t_W9PSJ.cjs.map} +1 -1
- package/dist/{queryService-DK-jUnET.js → queryService-DX6zeAs_.js} +6 -6
- package/dist/{queryService-DK-jUnET.js.map → queryService-DX6zeAs_.js.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-B7TY4JLf.cjs → queue-D1_TCe0z.cjs} +5 -5
- package/dist/{queue-B7TY4JLf.cjs.map → queue-D1_TCe0z.cjs.map} +1 -1
- package/dist/{queue-DViSQ-eq.js → queue-DrLUbk98.js} +5 -5
- package/dist/{queue-DViSQ-eq.js.map → queue-DrLUbk98.js.map} +1 -1
- package/dist/scheduler/index.cjs +3 -3
- package/dist/scheduler/index.d.cts +2 -2
- package/dist/scheduler/index.d.ts +2 -2
- package/dist/scheduler/index.js +3 -3
- package/dist/scheduler/types.d.cts +1 -1
- package/dist/scheduler/types.d.ts +1 -1
- package/dist/sdk/configurations/index.d.cts +4 -4
- package/dist/sdk/configurations/index.d.ts +4 -4
- package/dist/sdk/developerPortal/index.cjs +5 -5
- package/dist/sdk/developerPortal/index.cjs.map +1 -1
- package/dist/sdk/developerPortal/index.d.cts +5 -4
- package/dist/sdk/developerPortal/index.d.ts +5 -4
- package/dist/sdk/developerPortal/index.js +4 -4
- package/dist/sdk/queryService/index.cjs +1 -1
- package/dist/sdk/queryService/index.d.cts +1 -1
- package/dist/sdk/queryService/index.d.ts +1 -1
- package/dist/sdk/queryService/index.js +1 -1
- package/dist/sdk/semanticLayer/index.cjs +163 -74
- package/dist/sdk/semanticLayer/index.cjs.map +1 -1
- package/dist/sdk/semanticLayer/index.d.cts +16 -13
- package/dist/sdk/semanticLayer/index.d.ts +16 -13
- package/dist/sdk/semanticLayer/index.js +158 -75
- package/dist/sdk/semanticLayer/index.js.map +1 -1
- package/dist/sdk/semanticLayer/types.d.cts +2 -2
- package/dist/sdk/semanticLayer/types.d.ts +2 -2
- package/dist/sdk/storage/index.d.cts +1 -1
- package/dist/sdk/storage/index.d.ts +1 -1
- package/dist/sdk/tag/index.d.cts +2 -2
- package/dist/sdk/tag/index.d.ts +2 -2
- package/dist/sdk/tag/types.d.cts +1 -1
- package/dist/sdk/tag/types.d.ts +1 -1
- package/dist/sdk/vault/index.d.cts +1 -1
- package/dist/sdk/vault/index.d.ts +1 -1
- package/dist/status/index.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 +4 -4
- package/dist/storage/index.d.cts +2 -2
- package/dist/storage/index.d.ts +2 -2
- package/dist/storage/index.js +4 -4
- package/dist/storage/types.d.cts +2 -2
- package/dist/storage/types.d.ts +2 -2
- package/dist/{storage-kgxscFEg.js → storage--cVaecFq.js} +7 -7
- package/dist/{storage-kgxscFEg.js.map → storage--cVaecFq.js.map} +1 -1
- package/dist/{storage-CihHwZ7z.cjs → storage-DexWot8H.cjs} +7 -7
- package/dist/{storage-CihHwZ7z.cjs.map → storage-DexWot8H.cjs.map} +1 -1
- package/dist/store-C9FQCHGe.js +74 -0
- package/dist/store-C9FQCHGe.js.map +1 -0
- package/dist/store-xS-Cu_VS.cjs +85 -0
- package/dist/store-xS-Cu_VS.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 +1 -1
- package/dist/syncActions/types.d.ts +1 -1
- package/dist/{syncActions-B75t0NwP.js → syncActions-CkMHM-jB.js} +5 -5
- package/dist/{syncActions-B75t0NwP.js.map → syncActions-CkMHM-jB.js.map} +1 -1
- package/dist/{syncActions-CevF_TEb.cjs → syncActions-DQq_A9v6.cjs} +5 -5
- package/dist/{syncActions-CevF_TEb.cjs.map → syncActions-DQq_A9v6.cjs.map} +1 -1
- package/dist/telemetry/index.cjs +1 -1
- package/dist/telemetry/index.d.cts +2 -2
- package/dist/telemetry/index.d.ts +2 -2
- package/dist/telemetry/index.js +1 -1
- package/dist/{telemetry-DwlSLVAU.cjs → telemetry-CAu1Qt7B.cjs} +3 -3
- package/dist/{telemetry-DwlSLVAU.cjs.map → telemetry-CAu1Qt7B.cjs.map} +1 -1
- package/dist/{telemetry-FXpodtJN.js → telemetry-Ca6j0i9w.js} +3 -3
- package/dist/{telemetry-FXpodtJN.js.map → telemetry-Ca6j0i9w.js.map} +1 -1
- package/dist/{types-CGH_lfxS.d.cts → types-0xa_7cgo.d.cts} +2 -2
- package/dist/{types-CyiRYRVq.d.cts → types-3p0adMdd.d.cts} +3 -3
- package/dist/{types-BlCoTm7n.d.ts → types-6ThDkaJw.d.ts} +2 -2
- package/dist/{types-CkcMoXRk.d.ts → types-6hh_3SZs.d.ts} +3 -3
- package/dist/{types-dybUhlU2.d.ts → types-6ku2LeX6.d.ts} +2 -2
- package/dist/{types-BH9ljNmj.d.cts → types-B42HhyB0.d.cts} +2 -2
- package/dist/{types-C1vhYcic.d.cts → types-B4_MM5Wf.d.cts} +2 -2
- package/dist/{types-DlbiVsVo.d.cts → types-B6JJCta-.d.cts} +2 -2
- package/dist/{types-sVYo0o9_.d.ts → types-B6lOyHY_.d.ts} +3 -3
- package/dist/{types-BZBdLUpH.d.ts → types-B7O5koJb.d.cts} +2 -2
- package/dist/{types-De_DA2ga.d.ts → types-BHI8Lin9.d.ts} +2 -2
- package/dist/{types-Cj4bLPp5.d.cts → types-BO3sCD0a.d.cts} +37 -6
- package/dist/{types-zA3H84SM.d.cts → types-BOnf68s5.d.cts} +2 -2
- package/dist/{types-CPanB0p7.d.cts → types-BS5M67xm.d.cts} +3 -3
- package/dist/{types-COIsNoTQ.d.cts → types-BT46XIgn.d.cts} +2 -2
- package/dist/types-BUYqdN7B.d.ts +205 -0
- package/dist/{types-D-qI9ne4.d.ts → types-BYKHr5bR.d.ts} +2 -2
- package/dist/{types-D1uloiuY.d.cts → types-Be3Wgn1U.d.cts} +2 -2
- package/dist/{types-BTbczawY.d.ts → types-BgVKG4vg.d.ts} +2 -2
- package/dist/{types-CyHZ1ZQe.d.ts → types-C2gzqtjf.d.ts} +2 -2
- package/dist/{types-Av2egS_l.d.ts → types-C35GWNmq.d.ts} +2 -2
- package/dist/{types-D6jKxUv_.d.ts → types-C4mr0lop.d.ts} +35 -3
- package/dist/{types-BI2jI-3-.d.cts → types-CCr1-9Q6.d.cts} +3 -3
- package/dist/{types-DeSd3gqW.d.ts → types-CHCM9oNk.d.ts} +3 -3
- package/dist/{types-BMQW-2Yw.d.ts → types-CNQdtffE.d.ts} +729 -79
- package/dist/{types-MbcIiKDI.d.cts → types-CPaluTW7.d.cts} +3 -3
- package/dist/{types-CXTqFYah.d.ts → types-CSc8NQCY.d.ts} +37 -6
- package/dist/{types-Cz1dj_TM.d.ts → types-C_ilZZkQ.d.ts} +2 -2
- package/dist/{types-EJEoI3ZK.d.ts → types-CaMfshWX.d.ts} +2 -2
- package/dist/{types-BoV9M5Xg.d.cts → types-Ccgbipp4.d.cts} +2 -2
- package/dist/{types-DuiUN0h8.d.ts → types-Cpjk0-ta.d.ts} +2 -2
- package/dist/{types-GuWtMCMn.d.cts → types-CrH4H8M4.d.cts} +2 -2
- package/dist/{types-DNXC_-fA.d.cts → types-Cu-0LT4f.d.cts} +2 -2
- package/dist/{types-BptQ7jpP.d.cts → types-CxmV36rp.d.cts} +2 -2
- package/dist/{types-DwpRt3e9.d.ts → types-D-98DirB.d.ts} +2 -2
- package/dist/{types-BV2BDccJ.d.cts → types-D6ocCyGh.d.cts} +35 -3
- package/dist/{types-COc-nind.d.cts → types-D7Wgcp0u.d.ts} +2 -2
- package/dist/{types-ByWD2oeV.d.ts → types-DAzmGzlb.d.ts} +2 -2
- package/dist/{types-BREGN3qo.d.cts → types-DHI0g51U.d.cts} +2 -2
- package/dist/{types-Dfc58bPE.d.ts → types-DHqIJKwx.d.ts} +2 -2
- package/dist/types-DONxb2-c.d.cts +205 -0
- package/dist/{types-Di8VIZwQ.d.ts → types-DTTC70Ac.d.ts} +2 -2
- package/dist/{types-C2CLlR4i.d.ts → types-DlvZeert.d.ts} +2 -2
- package/dist/{types-cDU_J45_.d.cts → types-DqniGeDJ.d.cts} +2 -2
- package/dist/{types-iNlsdRkx.d.cts → types-E3VT-zYz.d.cts} +729 -79
- package/dist/{types-B4jdPHoL.d.cts → types-Jt0ipbSm.d.cts} +2 -2
- package/dist/{types-Bpnpa2Wt.d.ts → types-Ur37iOqb.d.ts} +3 -3
- package/dist/{types-BnaAo7xn.d.ts → types-ZGAWRIBW.d.ts} +2 -2
- package/dist/{types-CvkqEvhv.d.cts → types-bY6K3y0O.d.cts} +2 -2
- package/dist/{types-CpALS017.d.ts → types-k4R8gQ4U.d.ts} +2 -2
- package/dist/{types-CcuG9cid.d.cts → types-sO52qIAA.d.cts} +2 -2
- package/dist/{types-CJHi0zdD.d.cts → types-sp1rJY9E.d.cts} +2 -2
- package/dist/{validateConnectionStatus-V9q6Nl6u.cjs → validateConnectionStatus-24zqIQ0p.cjs} +2 -2
- package/dist/{validateConnectionStatus-V9q6Nl6u.cjs.map → validateConnectionStatus-24zqIQ0p.cjs.map} +1 -1
- package/dist/{validateConnectionStatus-BrLXkoSI.js → validateConnectionStatus-DhkWg6Eq.js} +2 -2
- package/dist/{validateConnectionStatus-BrLXkoSI.js.map → validateConnectionStatus-DhkWg6Eq.js.map} +1 -1
- 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 +2 -2
- package/surface/auth.md +2 -2
- package/surface/kaiAgent.md +5 -2
- package/dist/authClient--BtZgjIc.js.map +0 -1
- package/dist/authClient-b7uec7sw.cjs.map +0 -1
- package/dist/createStore-BNiCRQXa.js +0 -148
- package/dist/createStore-BNiCRQXa.js.map +0 -1
- package/dist/createStore-MQbboXcB.cjs +0 -177
- package/dist/createStore-MQbboXcB.cjs.map +0 -1
- package/dist/credential-DOXH7XRS.cjs.map +0 -1
- package/dist/credential-d2RDcXRB.js.map +0 -1
- package/dist/jobStatus-DbMupQEK.js.map +0 -1
- package/dist/jobStatus-kQ9JqF8t.cjs.map +0 -1
- package/dist/kaiAgent-4OiIK1C2.cjs.map +0 -1
- package/dist/kaiAgent-HDaFS9BR.js.map +0 -1
- package/dist/types-B2vmg_UF.d.cts +0 -148
- package/dist/types-RfaldD4P.d.ts +0 -148
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { $ as
|
|
3
|
-
import { r as AuthStrategy, t as BaseClientOptions } from "./types-
|
|
4
|
-
import { n as parseLogLines } from "./appLogs-
|
|
5
|
-
import { t as isManagementClientAuthError } from "./index-
|
|
1
|
+
import { C as isHtmlResponseError, E as MiddlewareFn, O as ApiError, S as HtmlResponseError, _ as isTimeoutError, b as parseOrThrow, d as HttpContentType, f as HttpHeader, g as isFetchClientError, h as isApiError, m as isAbortError, p as FetchClientError, u as createGenericFetchClient, v as ValidationError, x as ManagementClientAuthError, y as isValidationError } from "./index-DhVFuQDv.cjs";
|
|
2
|
+
import { $ as createDerivedStore, A as LegacySession, At as delay, Bt as KeboolaErrorType, C as LogLevel, Ct as poller, D as ResponseLog, Dt as PollResult, E as RequestLog, Et as PollOptions, F as ProjectClients, Ft as collect, G as createMemoryStorage, Gt as SyncActionError, H as createPersistor, Ht as ClientContext, It as coalesce, J as deepMerge, Jt as QueryJobTimeoutError, K as createNullStorage, Kt as isSyncActionError, Lt as TaskFn, M as createKeboola, Mt as ConcurrentOptions, N as KeboolaOptions, Nt as concurrent, O as createLoggingMiddleware, Ot as PollTick, P as KeboolaApi, Pt as CollectOptions, Q as createDerivedAsyncStore, Qt as UserError, Rt as assert, S as Log, St as poll, T as LoggingOptions, Tt as PollKey, U as StorageAdapter, Ut as isStorageTokenMutatingRequest, V as Persistor, Vt as isKeboolaError, W as createLocalStorage, X as isPlainObject, Xt as QueryJobError, Y as isEmptyDeep, Yt as isQueryJobTimeoutError, Z as AsyncState, Zt as isQueryJobError, _t as Poller, at as Failure, b as RetryOptions, bt as emitter, ct as asError, dt as PollRegistry, et as shallowEqual, ft as createPollRegistry, gt as PollTask, h as createStorageSdk, ht as PollState, i as createQueryServiceSdk, it as generateUUID, j as createLegacyKeboola, jt as dedupe, k as BearerSession, kt as lazy, lt as series, mt as PollSnapshot, nt as Store, ot as Result, pt as ObservedPoller, q as createSessionStorage, qt as ServiceUnavailableError, rt as createStore, st as Success, tt as ReadableStore, ut as PollEntry, v as jobStatus, vt as PollerStartFn, w as Logger, wt as PollContext, x as createRetryMiddleware, xt as failureOf, y as KeboolaHttpHeader, yt as PollerStopFn, zt as KeboolaError } from "./index-DIVvL54G.cjs";
|
|
3
|
+
import { r as AuthStrategy, t as BaseClientOptions } from "./types-DHI0g51U.cjs";
|
|
4
|
+
import { n as parseLogLines } from "./appLogs-Q4A7A_Fc.cjs";
|
|
5
|
+
import { t as isManagementClientAuthError } from "./index-CTd4YY8e.cjs";
|
|
6
|
+
import { r as createEmitter, t as Emitter } from "./emitter-dLF1Fyfg.cjs";
|
|
6
7
|
import { n as KeboolaObjectId, r as keboolaUID, t as schemaGuidedMerge } from "./index-NC1dXRTD.cjs";
|
|
7
|
-
export { ApiError, AsyncState, type AuthStrategy, type BaseClientOptions, BearerSession, type ClientContext, CollectOptions, ConcurrentOptions, Emitter, type FetchClientError, HtmlResponseError, HttpContentType, HttpHeader, type KeboolaApi, KeboolaError, KeboolaErrorType, KeboolaHttpHeader, KeboolaObjectId, type KeboolaOptions, LegacySession, Log, LogLevel, Logger, LoggingOptions, ManagementClientAuthError, MiddlewareFn, ObservedPoller, Persistor, type PollContext, PollEntry, type PollKey, type PollOptions, PollRegistry, type PollResult, PollSnapshot, PollState, PollTask, type PollTick, Poller, PollerStartFn, PollerStopFn, QueryJobError, QueryJobTimeoutError, ReadableStore, RequestLog, ResponseLog, Result, RetryOptions, ServiceUnavailableError, type StorageAdapter, Store, SyncActionError, TaskFn, UserError, ValidationError, asError, assert, coalesce, collect, concurrent, createDerivedAsyncStore, createDerivedStore, createEmitter, createGenericFetchClient, createKeboola, createLegacyKeboola, createLocalStorage, createLoggingMiddleware, createMemoryStorage, createNullStorage, createPersistor, createPollRegistry, createQueryServiceSdk, createRetryMiddleware, createSessionStorage, createStorageSdk, createStore, dedupe, deepMerge, delay, emitter, failureOf, generateUUID, isAbortError, isApiError, isEmptyDeep, isFetchClientError, isHtmlResponseError, isKeboolaError, isManagementClientAuthError, isPlainObject, isQueryJobError, isQueryJobTimeoutError, isStorageTokenMutatingRequest, isSyncActionError, isValidationError, jobStatus, keboolaUID, lazy, parseLogLines, parseOrThrow, poll, poller, schemaGuidedMerge, series, shallowEqual };
|
|
8
|
+
export { ApiError, type AsyncState, type AuthStrategy, type BaseClientOptions, BearerSession, type ClientContext, CollectOptions, ConcurrentOptions, type Emitter, Failure, type FetchClientError, HtmlResponseError, HttpContentType, HttpHeader, type KeboolaApi, KeboolaError, KeboolaErrorType, KeboolaHttpHeader, KeboolaObjectId, type KeboolaOptions, LegacySession, Log, LogLevel, Logger, LoggingOptions, ManagementClientAuthError, MiddlewareFn, ObservedPoller, Persistor, type PollContext, PollEntry, type PollKey, type PollOptions, PollRegistry, type PollResult, PollSnapshot, PollState, PollTask, type PollTick, Poller, PollerStartFn, PollerStopFn, type ProjectClients, QueryJobError, QueryJobTimeoutError, type ReadableStore, RequestLog, ResponseLog, Result, RetryOptions, ServiceUnavailableError, type StorageAdapter, type Store, Success, SyncActionError, TaskFn, UserError, ValidationError, asError, assert, coalesce, collect, concurrent, createDerivedAsyncStore, createDerivedStore, createEmitter, createGenericFetchClient, createKeboola, createLegacyKeboola, createLocalStorage, createLoggingMiddleware, createMemoryStorage, createNullStorage, createPersistor, createPollRegistry, createQueryServiceSdk, createRetryMiddleware, createSessionStorage, createStorageSdk, createStore, dedupe, deepMerge, delay, emitter, failureOf, generateUUID, isAbortError, isApiError, isEmptyDeep, isFetchClientError, isHtmlResponseError, isKeboolaError, isManagementClientAuthError, isPlainObject, isQueryJobError, isQueryJobTimeoutError, isStorageTokenMutatingRequest, isSyncActionError, isTimeoutError, isValidationError, jobStatus, keboolaUID, lazy, parseLogLines, parseOrThrow, poll, poller, schemaGuidedMerge, series, shallowEqual };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { $ as
|
|
3
|
-
import { r as AuthStrategy, t as BaseClientOptions } from "./types-
|
|
4
|
-
import { n as parseLogLines } from "./appLogs-
|
|
5
|
-
import { t as isManagementClientAuthError } from "./index-
|
|
1
|
+
import { C as isHtmlResponseError, E as MiddlewareFn, O as ApiError, S as HtmlResponseError, _ as isTimeoutError, b as parseOrThrow, d as HttpContentType, f as HttpHeader, g as isFetchClientError, h as isApiError, m as isAbortError, p as FetchClientError, u as createGenericFetchClient, v as ValidationError, x as ManagementClientAuthError, y as isValidationError } from "./index-DVhTNwvu.js";
|
|
2
|
+
import { $ as createDerivedStore, A as LegacySession, At as delay, Bt as KeboolaErrorType, C as LogLevel, Ct as poller, D as ResponseLog, Dt as PollResult, E as RequestLog, Et as PollOptions, F as ProjectClients, Ft as collect, G as createMemoryStorage, Gt as SyncActionError, H as createPersistor, Ht as ClientContext, It as coalesce, J as deepMerge, Jt as QueryJobTimeoutError, K as createNullStorage, Kt as isSyncActionError, Lt as TaskFn, M as createKeboola, Mt as ConcurrentOptions, N as KeboolaOptions, Nt as concurrent, O as createLoggingMiddleware, Ot as PollTick, P as KeboolaApi, Pt as CollectOptions, Q as createDerivedAsyncStore, Qt as UserError, Rt as assert, S as Log, St as poll, T as LoggingOptions, Tt as PollKey, U as StorageAdapter, Ut as isStorageTokenMutatingRequest, V as Persistor, Vt as isKeboolaError, W as createLocalStorage, X as isPlainObject, Xt as QueryJobError, Y as isEmptyDeep, Yt as isQueryJobTimeoutError, Z as AsyncState, Zt as isQueryJobError, _t as Poller, at as Failure, b as RetryOptions, bt as emitter, ct as asError, dt as PollRegistry, et as shallowEqual, ft as createPollRegistry, gt as PollTask, h as createStorageSdk, ht as PollState, i as createQueryServiceSdk, it as generateUUID, j as createLegacyKeboola, jt as dedupe, k as BearerSession, kt as lazy, lt as series, mt as PollSnapshot, nt as Store, ot as Result, pt as ObservedPoller, q as createSessionStorage, qt as ServiceUnavailableError, rt as createStore, st as Success, tt as ReadableStore, ut as PollEntry, v as jobStatus, vt as PollerStartFn, w as Logger, wt as PollContext, x as createRetryMiddleware, xt as failureOf, y as KeboolaHttpHeader, yt as PollerStopFn, zt as KeboolaError } from "./index-B0V1pJAa.js";
|
|
3
|
+
import { r as AuthStrategy, t as BaseClientOptions } from "./types-D-98DirB.js";
|
|
4
|
+
import { n as parseLogLines } from "./appLogs-u0XMZLjS.js";
|
|
5
|
+
import { t as isManagementClientAuthError } from "./index-GNKwr7EQ.js";
|
|
6
|
+
import { r as createEmitter, t as Emitter } from "./emitter-dLF1Fyfg.js";
|
|
6
7
|
import { n as KeboolaObjectId, r as keboolaUID, t as schemaGuidedMerge } from "./index-NC1dXRTD.js";
|
|
7
|
-
export { ApiError, AsyncState, type AuthStrategy, type BaseClientOptions, BearerSession, type ClientContext, CollectOptions, ConcurrentOptions, Emitter, type FetchClientError, HtmlResponseError, HttpContentType, HttpHeader, type KeboolaApi, KeboolaError, KeboolaErrorType, KeboolaHttpHeader, KeboolaObjectId, type KeboolaOptions, LegacySession, Log, LogLevel, Logger, LoggingOptions, ManagementClientAuthError, MiddlewareFn, ObservedPoller, Persistor, type PollContext, PollEntry, type PollKey, type PollOptions, PollRegistry, type PollResult, PollSnapshot, PollState, PollTask, type PollTick, Poller, PollerStartFn, PollerStopFn, QueryJobError, QueryJobTimeoutError, ReadableStore, RequestLog, ResponseLog, Result, RetryOptions, ServiceUnavailableError, type StorageAdapter, Store, SyncActionError, TaskFn, UserError, ValidationError, asError, assert, coalesce, collect, concurrent, createDerivedAsyncStore, createDerivedStore, createEmitter, createGenericFetchClient, createKeboola, createLegacyKeboola, createLocalStorage, createLoggingMiddleware, createMemoryStorage, createNullStorage, createPersistor, createPollRegistry, createQueryServiceSdk, createRetryMiddleware, createSessionStorage, createStorageSdk, createStore, dedupe, deepMerge, delay, emitter, failureOf, generateUUID, isAbortError, isApiError, isEmptyDeep, isFetchClientError, isHtmlResponseError, isKeboolaError, isManagementClientAuthError, isPlainObject, isQueryJobError, isQueryJobTimeoutError, isStorageTokenMutatingRequest, isSyncActionError, isValidationError, jobStatus, keboolaUID, lazy, parseLogLines, parseOrThrow, poll, poller, schemaGuidedMerge, series, shallowEqual };
|
|
8
|
+
export { ApiError, type AsyncState, type AuthStrategy, type BaseClientOptions, BearerSession, type ClientContext, CollectOptions, ConcurrentOptions, type Emitter, Failure, type FetchClientError, HtmlResponseError, HttpContentType, HttpHeader, type KeboolaApi, KeboolaError, KeboolaErrorType, KeboolaHttpHeader, KeboolaObjectId, type KeboolaOptions, LegacySession, Log, LogLevel, Logger, LoggingOptions, ManagementClientAuthError, MiddlewareFn, ObservedPoller, Persistor, type PollContext, PollEntry, type PollKey, type PollOptions, PollRegistry, type PollResult, PollSnapshot, PollState, PollTask, type PollTick, Poller, PollerStartFn, PollerStopFn, type ProjectClients, QueryJobError, QueryJobTimeoutError, type ReadableStore, RequestLog, ResponseLog, Result, RetryOptions, ServiceUnavailableError, type StorageAdapter, type Store, Success, SyncActionError, TaskFn, UserError, ValidationError, asError, assert, coalesce, collect, concurrent, createDerivedAsyncStore, createDerivedStore, createEmitter, createGenericFetchClient, createKeboola, createLegacyKeboola, createLocalStorage, createLoggingMiddleware, createMemoryStorage, createNullStorage, createPersistor, createPollRegistry, createQueryServiceSdk, createRetryMiddleware, createSessionStorage, createStorageSdk, createStore, dedupe, deepMerge, delay, emitter, failureOf, generateUUID, isAbortError, isApiError, isEmptyDeep, isFetchClientError, isHtmlResponseError, isKeboolaError, isManagementClientAuthError, isPlainObject, isQueryJobError, isQueryJobTimeoutError, isStorageTokenMutatingRequest, isSyncActionError, isTimeoutError, isValidationError, jobStatus, keboolaUID, lazy, parseLogLines, parseOrThrow, poll, poller, schemaGuidedMerge, series, shallowEqual };
|
package/dist/index.js
CHANGED
|
@@ -1,49 +1,49 @@
|
|
|
1
1
|
import { t as createProject } from "./project-DWwZv66D.js";
|
|
2
|
-
import { a as poller, c as Result, d as delay, i as poll, l as asError, n as emitter, o as clamp, r as failureOf, s as finiteOr, t as jobStatus, u as lazy } from "./jobStatus-
|
|
3
|
-
import { n as collect, t as createQueueClient } from "./queue-
|
|
2
|
+
import { a as poller, c as Result, d as delay, i as poll, l as asError, n as emitter, o as clamp, r as failureOf, s as finiteOr, t as jobStatus, u as lazy } from "./jobStatus-PSZJMTiA.js";
|
|
3
|
+
import { n as collect, t as createQueueClient } from "./queue-DrLUbk98.js";
|
|
4
4
|
import { t as concurrent } from "./concurrent-CH9fbNr3.js";
|
|
5
5
|
import { t as dedupe } from "./dedupe-DYIHgZoG.js";
|
|
6
|
-
import {
|
|
7
|
-
import { a as series, i as ServiceUnavailableError, t as createStorageClient } from "./storage
|
|
6
|
+
import { n as createEmitter, t as createStore } from "./store-C9FQCHGe.js";
|
|
7
|
+
import { a as series, i as ServiceUnavailableError, t as createStorageClient } from "./storage--cVaecFq.js";
|
|
8
8
|
import { n as keboolaUID, t as createTagSdk } from "./tag-DCsoewjL.js";
|
|
9
9
|
import { t as generateUUID } from "./generateUUID-Dr8l-aoc.js";
|
|
10
10
|
import { t as isPlainObject } from "./isPlainObject-LYW-03uB.js";
|
|
11
11
|
import { n as schemaGuidedMerge, r as isEmptyDeep, t as createConfigurationSdk } from "./configurations-ZwBXilW-.js";
|
|
12
12
|
import { t as UserError } from "./UserError-By_Zckmc.js";
|
|
13
|
-
import { a as
|
|
14
|
-
import { n as HtmlResponseError, r as isHtmlResponseError } from "./validateConnectionStatus-
|
|
15
|
-
import { t as ManagementClientAuthError } from "./ManagementClientAuthError-
|
|
13
|
+
import { a as isTimeoutError, h as ApiError, i as isFetchClientError, m as KeboolaHttpHeader, n as isAbortError, o as HttpContentType, p as HttpStatus, r as isApiError, s as HttpHeader, u as normalizeBaseUrl } from "./createFetchClient-DdyZMhxO.js";
|
|
14
|
+
import { n as HtmlResponseError, r as isHtmlResponseError } from "./validateConnectionStatus-DhkWg6Eq.js";
|
|
15
|
+
import { t as ManagementClientAuthError } from "./ManagementClientAuthError-iKbBugKC.js";
|
|
16
16
|
import { i as isQueryJobError, n as isQueryJobTimeoutError, r as QueryJobError, t as QueryJobTimeoutError } from "./QueryJobTimeoutError-C7JbNGOM.js";
|
|
17
17
|
import { n as isSyncActionError, t as SyncActionError } from "./SyncActionError-CoZFsdUk.js";
|
|
18
18
|
import { n as isValidationError, r as parseOrThrow, t as ValidationError } from "./ValidationError-CzPWydEb.js";
|
|
19
|
-
import { t as createGenericFetchClient } from "./createGenericFetchClient-
|
|
20
|
-
import { t as createImportClient } from "./import-
|
|
21
|
-
import { t as createAuthClient } from "./authClient
|
|
22
|
-
import { n as isManagementClientAuthError, t as createManagementClient } from "./management-
|
|
19
|
+
import { t as createGenericFetchClient } from "./createGenericFetchClient-MQeLRiNW.js";
|
|
20
|
+
import { t as createImportClient } from "./import-2nqxQ9Rt.js";
|
|
21
|
+
import { t as createAuthClient } from "./authClient-DEyqR7GW.js";
|
|
22
|
+
import { n as isManagementClientAuthError, t as createManagementClient } from "./management-DNEKhR6a.js";
|
|
23
23
|
import { s as ProjectFeature } from "./constants-ByEwVtGf.js";
|
|
24
24
|
import { t as createStorageTable } from "./storageTable-DslXtqNL.js";
|
|
25
25
|
import { createSemanticLayerSdk } from "./sdk/semanticLayer/index.js";
|
|
26
26
|
import { createStorageSdk } from "./sdk/storage/index.js";
|
|
27
27
|
import { createVaultSdk } from "./sdk/vault/index.js";
|
|
28
28
|
import { createAiClient } from "./ai/index.js";
|
|
29
|
-
import { t as parseLogLines } from "./appLogs-
|
|
29
|
+
import { t as parseLogLines } from "./appLogs-D72eD8vP.js";
|
|
30
30
|
import { createAppsClient } from "./apps/index.js";
|
|
31
31
|
import { createChatClient } from "./chat/index.js";
|
|
32
|
-
import { t as createDataScienceClient } from "./dataScience-
|
|
32
|
+
import { t as createDataScienceClient } from "./dataScience-B_TA7wCB.js";
|
|
33
33
|
import { createEditorClient } from "./editor/index.js";
|
|
34
34
|
import { createEncryptionClient } from "./encryption/index.js";
|
|
35
|
-
import { t as createKaiAgentClient } from "./kaiAgent-
|
|
36
|
-
import { t as createMetastoreClient } from "./metastore-
|
|
35
|
+
import { t as createKaiAgentClient } from "./kaiAgent-CYYn0QJW.js";
|
|
36
|
+
import { t as createMetastoreClient } from "./metastore-CjwktHvw.js";
|
|
37
37
|
import { createNotificationsClient } from "./notifications/index.js";
|
|
38
|
-
import { t as createOauthClient } from "./oauth-
|
|
38
|
+
import { t as createOauthClient } from "./oauth-Bg5zro5S.js";
|
|
39
39
|
import { createOmnisearchClient } from "./omnisearch/index.js";
|
|
40
|
-
import { t as createQueryServiceClient } from "./queryService-
|
|
40
|
+
import { t as createQueryServiceClient } from "./queryService-DX6zeAs_.js";
|
|
41
41
|
import { createSchedulerClient } from "./scheduler/index.js";
|
|
42
42
|
import { createStreamClient } from "./stream/index.js";
|
|
43
|
-
import { t as createSyncActionsClient } from "./syncActions-
|
|
44
|
-
import { t as createTelemetryClient } from "./telemetry-
|
|
43
|
+
import { t as createSyncActionsClient } from "./syncActions-CkMHM-jB.js";
|
|
44
|
+
import { t as createTelemetryClient } from "./telemetry-Ca6j0i9w.js";
|
|
45
45
|
import { createVaultClient } from "./vault/index.js";
|
|
46
|
-
import { n as isUnauthorized, t as createBearerCredential } from "./credential-
|
|
46
|
+
import { n as isUnauthorized, t as createBearerCredential } from "./credential-Bxv7yxOZ.js";
|
|
47
47
|
import { createQueryServiceSdk } from "./sdk/queryService/index.js";
|
|
48
48
|
import * as z$1 from "zod";
|
|
49
49
|
//#region src/utils/assert.ts
|
|
@@ -91,6 +91,111 @@ const coalesce = (task) => {
|
|
|
91
91
|
};
|
|
92
92
|
};
|
|
93
93
|
//#endregion
|
|
94
|
+
//#region src/utils/store/derivedStore.ts
|
|
95
|
+
const isPlainObjectOrArray = (value) => {
|
|
96
|
+
if (Array.isArray(value)) return true;
|
|
97
|
+
const proto = Object.getPrototypeOf(value);
|
|
98
|
+
return proto === Object.prototype || proto === null;
|
|
99
|
+
};
|
|
100
|
+
const shallowEqual = (a, b) => {
|
|
101
|
+
if (Object.is(a, b)) return true;
|
|
102
|
+
if (typeof a !== "object" || a === null || typeof b !== "object" || b === null) return false;
|
|
103
|
+
if (!isPlainObjectOrArray(a) || !isPlainObjectOrArray(b)) return false;
|
|
104
|
+
const aKeys = Object.keys(a);
|
|
105
|
+
const bKeys = Object.keys(b);
|
|
106
|
+
return aKeys.length === bKeys.length && aKeys.every((key) => Object.is(a[key], b[key]));
|
|
107
|
+
};
|
|
108
|
+
const createDerivedStore = ({ source, dependsOn, build, keyEquals = shallowEqual }) => {
|
|
109
|
+
let key = dependsOn(source.get());
|
|
110
|
+
const store = createStore(build(key));
|
|
111
|
+
const unsubscribe = source.subscribe((state) => {
|
|
112
|
+
const next = dependsOn(state);
|
|
113
|
+
if (keyEquals(key, next)) return;
|
|
114
|
+
key = next;
|
|
115
|
+
store.set(build(next));
|
|
116
|
+
});
|
|
117
|
+
const get = store.get;
|
|
118
|
+
const subscribe = store.subscribe;
|
|
119
|
+
const dispose = () => {
|
|
120
|
+
unsubscribe();
|
|
121
|
+
store.dispose();
|
|
122
|
+
};
|
|
123
|
+
return {
|
|
124
|
+
get,
|
|
125
|
+
subscribe,
|
|
126
|
+
dispose
|
|
127
|
+
};
|
|
128
|
+
};
|
|
129
|
+
//#endregion
|
|
130
|
+
//#region src/utils/store/derivedAsyncStore.ts
|
|
131
|
+
const createDerivedAsyncStore = ({ source, dependsOn, build, keyEquals = shallowEqual }) => {
|
|
132
|
+
const store = createStore({ state: "idle" });
|
|
133
|
+
let currentKey = null;
|
|
134
|
+
let generation = 0;
|
|
135
|
+
let controller = null;
|
|
136
|
+
const run = (key) => {
|
|
137
|
+
controller?.abort();
|
|
138
|
+
controller = new AbortController();
|
|
139
|
+
const runGeneration = ++generation;
|
|
140
|
+
store.set({ state: "pending" });
|
|
141
|
+
build(key, controller.signal).then((value) => {
|
|
142
|
+
if (runGeneration === generation) store.set({
|
|
143
|
+
state: "ready",
|
|
144
|
+
value
|
|
145
|
+
});
|
|
146
|
+
}, (error) => {
|
|
147
|
+
if (runGeneration === generation) store.set({
|
|
148
|
+
state: "errored",
|
|
149
|
+
error
|
|
150
|
+
});
|
|
151
|
+
});
|
|
152
|
+
};
|
|
153
|
+
const sync = (state) => {
|
|
154
|
+
const next = dependsOn(state);
|
|
155
|
+
if (next === null) {
|
|
156
|
+
if (currentKey === null) return;
|
|
157
|
+
controller?.abort();
|
|
158
|
+
controller = null;
|
|
159
|
+
generation += 1;
|
|
160
|
+
currentKey = null;
|
|
161
|
+
store.set({ state: "idle" });
|
|
162
|
+
return;
|
|
163
|
+
}
|
|
164
|
+
if (currentKey !== null && keyEquals(currentKey, next)) return;
|
|
165
|
+
currentKey = next;
|
|
166
|
+
run(next);
|
|
167
|
+
};
|
|
168
|
+
sync(source.get());
|
|
169
|
+
const unsubscribe = source.subscribe(sync);
|
|
170
|
+
const get = store.get;
|
|
171
|
+
const subscribe = store.subscribe;
|
|
172
|
+
const dispose = () => {
|
|
173
|
+
controller?.abort();
|
|
174
|
+
unsubscribe();
|
|
175
|
+
store.dispose();
|
|
176
|
+
};
|
|
177
|
+
const readable = {
|
|
178
|
+
get,
|
|
179
|
+
subscribe,
|
|
180
|
+
dispose
|
|
181
|
+
};
|
|
182
|
+
const settled = () => new Promise((resolve) => {
|
|
183
|
+
let unsubscribeSettled = () => {};
|
|
184
|
+
const check = (state) => {
|
|
185
|
+
if (state.state === "ready" || state.state === "errored") {
|
|
186
|
+
unsubscribeSettled();
|
|
187
|
+
resolve(state);
|
|
188
|
+
}
|
|
189
|
+
};
|
|
190
|
+
unsubscribeSettled = store.subscribe(check);
|
|
191
|
+
check(store.get());
|
|
192
|
+
});
|
|
193
|
+
return {
|
|
194
|
+
store: readable,
|
|
195
|
+
settled
|
|
196
|
+
};
|
|
197
|
+
};
|
|
198
|
+
//#endregion
|
|
94
199
|
//#region src/utils/async/poll/registry.ts
|
|
95
200
|
const DEFAULT_LIMIT = 50;
|
|
96
201
|
const isFinished = ({ snapshot }) => snapshot.state !== "idle" && snapshot.state !== "polling";
|
|
@@ -601,6 +706,7 @@ const stamp = (tokens) => ({
|
|
|
601
706
|
const createConfig$1 = (initial = INITIAL) => {
|
|
602
707
|
const store = createStore(initial);
|
|
603
708
|
let expiredNotified = false;
|
|
709
|
+
let epoch = 0;
|
|
604
710
|
const setBaseUrl = (baseUrl) => {
|
|
605
711
|
if (store.get().status !== "anonymous") throw new KeboolaError(KeboolaErrorType.AlreadyAuthenticated);
|
|
606
712
|
store.set({
|
|
@@ -613,6 +719,7 @@ const createConfig$1 = (initial = INITIAL) => {
|
|
|
613
719
|
if (state.status !== "anonymous") throw new KeboolaError(KeboolaErrorType.AlreadyAuthenticated);
|
|
614
720
|
if (!state.baseUrl) throw new KeboolaError(KeboolaErrorType.Unconfigured);
|
|
615
721
|
expiredNotified = false;
|
|
722
|
+
epoch += 1;
|
|
616
723
|
store.set({
|
|
617
724
|
status: "authenticated",
|
|
618
725
|
baseUrl: state.baseUrl,
|
|
@@ -646,6 +753,7 @@ const createConfig$1 = (initial = INITIAL) => {
|
|
|
646
753
|
};
|
|
647
754
|
/** Drop the credential (sign out); keeps the configured baseUrl. */
|
|
648
755
|
const reset = () => {
|
|
756
|
+
epoch += 1;
|
|
649
757
|
store.set({
|
|
650
758
|
status: "anonymous",
|
|
651
759
|
baseUrl: store.get().baseUrl
|
|
@@ -687,6 +795,15 @@ const createConfig$1 = (initial = INITIAL) => {
|
|
|
687
795
|
};
|
|
688
796
|
const getBaseUrl = () => store.get().baseUrl;
|
|
689
797
|
/**
|
|
798
|
+
* Which sign-in this is — a counter, bumped by `authenticate` and `reset`.
|
|
799
|
+
*
|
|
800
|
+
* - For anything long-lived that must not outlive the credential it was built against: capture it,
|
|
801
|
+
* compare it later. A rotation does not move it; only a new session or a sign-out does.
|
|
802
|
+
* - Distinct from `notifyExpired`'s latch, which answers "report this death once" rather than
|
|
803
|
+
* "which session are we in".
|
|
804
|
+
*/
|
|
805
|
+
const getEpoch = () => epoch;
|
|
806
|
+
/**
|
|
690
807
|
* Session-expiry latch (fire-once):
|
|
691
808
|
* - why: concurrent 401s all report expiry, but the app must sign out once; and the credential /
|
|
692
809
|
* auth middleware are long-lived singletons, so the latch can't live in them — it must reset
|
|
@@ -715,6 +832,7 @@ const createConfig$1 = (initial = INITIAL) => {
|
|
|
715
832
|
forceExpire,
|
|
716
833
|
requireCredential,
|
|
717
834
|
getBaseUrl,
|
|
835
|
+
getEpoch,
|
|
718
836
|
notifyExpired,
|
|
719
837
|
debug
|
|
720
838
|
};
|
|
@@ -1185,7 +1303,12 @@ const createKeboola = (options = {}) => {
|
|
|
1185
1303
|
const refresh = async () => {
|
|
1186
1304
|
const client = authClientBare.get();
|
|
1187
1305
|
assert$1(client, KeboolaErrorType.NotReady);
|
|
1188
|
-
const
|
|
1306
|
+
const epoch = config.getEpoch();
|
|
1307
|
+
const refreshed = await client.token.refresh(config.requireCredential().refreshToken).catch((error) => {
|
|
1308
|
+
if (config.getEpoch() !== epoch) throw new KeboolaError(KeboolaErrorType.NotAuthenticated);
|
|
1309
|
+
throw error;
|
|
1310
|
+
});
|
|
1311
|
+
if (config.getEpoch() !== epoch) throw new KeboolaError(KeboolaErrorType.NotAuthenticated);
|
|
1189
1312
|
config.applyRefresh(refreshed);
|
|
1190
1313
|
return refreshed.accessToken;
|
|
1191
1314
|
};
|
|
@@ -1201,8 +1324,36 @@ const createKeboola = (options = {}) => {
|
|
|
1201
1324
|
}
|
|
1202
1325
|
};
|
|
1203
1326
|
};
|
|
1327
|
+
/**
|
|
1328
|
+
* The project this session is scoped to, right now.
|
|
1329
|
+
*
|
|
1330
|
+
* - Read at every point that stamps a project, never snapshotted across an `await`: the scope moves
|
|
1331
|
+
* with `setProject`/`clearProject`, and neither ends the session, so it is not in the epoch and
|
|
1332
|
+
* `assertSameSession` cannot see it change.
|
|
1333
|
+
* - `NotReady` rather than `NotAuthenticated` when merely unscoped — the credential is fine, the
|
|
1334
|
+
* project is what is missing. A credential alone does not authorize a project request: kai-agent
|
|
1335
|
+
* reads the project from the header, not the token, and cannot attribute a call that omits it.
|
|
1336
|
+
*/
|
|
1337
|
+
const requireScopedProject = () => {
|
|
1338
|
+
const state = config.store.get();
|
|
1339
|
+
if (state.status === "anonymous") throw new KeboolaError(KeboolaErrorType.NotAuthenticated);
|
|
1340
|
+
if (state.status !== "scoped") throw new KeboolaError(KeboolaErrorType.NotReady);
|
|
1341
|
+
return state.projectId;
|
|
1342
|
+
};
|
|
1343
|
+
/**
|
|
1344
|
+
* The project client sets `forProject` has handed out, keyed by project id.
|
|
1345
|
+
*
|
|
1346
|
+
* - Not keyed by stack: `setBaseUrl` throws once authenticated and `signOut` empties this, so one
|
|
1347
|
+
* entry can never belong to a different `baseUrl` than the live session.
|
|
1348
|
+
* - A `lazy` per key, not a bare promise: concurrent callers share one bootstrap, later ones replay
|
|
1349
|
+
* the resolved set, and a rejected build clears only its own slot — so a build orphaned by a
|
|
1350
|
+
* sign-out cannot evict the entry that replaced it.
|
|
1351
|
+
*/
|
|
1352
|
+
const extraProjects = /* @__PURE__ */ new Map();
|
|
1204
1353
|
const signOut = () => {
|
|
1205
1354
|
config.reset();
|
|
1355
|
+
credential.abandonRefresh();
|
|
1356
|
+
extraProjects.clear();
|
|
1206
1357
|
persistor.clear();
|
|
1207
1358
|
};
|
|
1208
1359
|
const onSessionExpired = () => {
|
|
@@ -1213,13 +1364,75 @@ const createKeboola = (options = {}) => {
|
|
|
1213
1364
|
getToken,
|
|
1214
1365
|
onSessionExpired
|
|
1215
1366
|
});
|
|
1216
|
-
const
|
|
1367
|
+
const sessionGuard = (epoch) => () => {
|
|
1368
|
+
if (config.getEpoch() !== epoch) throw new KeboolaError(KeboolaErrorType.NotAuthenticated);
|
|
1369
|
+
};
|
|
1370
|
+
/**
|
|
1371
|
+
* The auth middleware, refusing to carry a request across a change of session.
|
|
1372
|
+
*
|
|
1373
|
+
* - The middleware holds no token — it reads the credential live — so anything built on it acts as
|
|
1374
|
+
* whoever is signed in *at request time*, not whoever built it. Rebuilding a store on sign-out
|
|
1375
|
+
* only stops new reads; a request already in flight completes as the next user, still stamped
|
|
1376
|
+
* with the old project. `config`'s epoch moves on `authenticate` and `reset` and never on a
|
|
1377
|
+
* rotation, so it is exactly "which sign-in is this".
|
|
1378
|
+
* - `epochFor` says which sign-in a request answers to, resolved per request:
|
|
1379
|
+
* 1. a client set pins to the sign-in that *built* it (`pinToSession`) — a set the caller still
|
|
1380
|
+
* holds must not ride the session that replaced it;
|
|
1381
|
+
* 2. `api.auth` pins to the sign-in the request *started* on, because its store is keyed on
|
|
1382
|
+
* `baseUrl` alone: it is built once, while anonymous, so a build-time pin would freeze at that
|
|
1383
|
+
* epoch and refuse every authenticated call.
|
|
1384
|
+
* - The guard covers every credential read, not only the wire request, so it wraps the credential
|
|
1385
|
+
* rather than sitting beside it. The 401 path rotates the token by calling the credential
|
|
1386
|
+
* directly: a straggler from a dead session would otherwise spend the *live* session's
|
|
1387
|
+
* single-use refresh token, and sign that session out if the rotation itself came back 401.
|
|
1388
|
+
* - `expiresSession` decides whether a 401 that survives a rotation means the session is dead.
|
|
1389
|
+
* True for this session's own realms; false where the 401 may be about the project instead of
|
|
1390
|
+
* the credential (see `forProject`).
|
|
1391
|
+
* - `inner` is for middleware that **re-invokes `next`** — a retry. Composed outside the pin it
|
|
1392
|
+
* would re-enter it per attempt, and with a per-request `epochFor` each attempt would re-pin to
|
|
1393
|
+
* whoever is signed in by then: a 503 backoff is exactly long enough for a sign-out to land, and
|
|
1394
|
+
* the retry then goes out as the next user. Inside, one epoch covers every attempt and each
|
|
1395
|
+
* attempt still passes the guard. Anything new that retries belongs here, not in the array.
|
|
1396
|
+
*/
|
|
1397
|
+
const createPinnedAuthMiddleware = (epochFor, { expiresSession = true, inner = [] } = {}) => {
|
|
1398
|
+
return (next) => (request) => {
|
|
1399
|
+
const assertSameSession = sessionGuard(epochFor());
|
|
1400
|
+
const pinnedCredential = {
|
|
1401
|
+
...credential,
|
|
1402
|
+
getAccessToken: async (options) => {
|
|
1403
|
+
assertSameSession();
|
|
1404
|
+
return credential.getAccessToken(options);
|
|
1405
|
+
},
|
|
1406
|
+
notifyExpired: expiresSession ? credential.notifyExpired : () => {}
|
|
1407
|
+
};
|
|
1408
|
+
const guarded = (wire) => (repeated) => {
|
|
1409
|
+
assertSameSession();
|
|
1410
|
+
return wire(repeated);
|
|
1411
|
+
};
|
|
1412
|
+
const chain = inner.reduceRight((acc, middleware) => middleware(acc), guarded(next));
|
|
1413
|
+
return createBearerAuthMiddleware(pinnedCredential)(chain)(request);
|
|
1414
|
+
};
|
|
1415
|
+
};
|
|
1416
|
+
/**
|
|
1417
|
+
* Pin something long-lived to the sign-in live right now.
|
|
1418
|
+
*
|
|
1419
|
+
* - `assertSameSession` is for whatever no middleware chain covers: a bootstrap whose every
|
|
1420
|
+
* request passed the guard before the sign-out resolves anyway and must not be handed back, and
|
|
1421
|
+
* `getAuthHeaders`, which emits the credential by hand.
|
|
1422
|
+
*/
|
|
1423
|
+
const pinToSession = (options) => {
|
|
1424
|
+
const epoch = config.getEpoch();
|
|
1425
|
+
return {
|
|
1426
|
+
assertSameSession: sessionGuard(epoch),
|
|
1427
|
+
pinnedAuthMiddleware: createPinnedAuthMiddleware(() => epoch, options)
|
|
1428
|
+
};
|
|
1429
|
+
};
|
|
1217
1430
|
const authClient = createDerivedStore({
|
|
1218
1431
|
source: config.store,
|
|
1219
1432
|
dependsOn: (state) => state.baseUrl,
|
|
1220
1433
|
build: (baseUrl) => baseUrl ? createAuthClient({
|
|
1221
1434
|
baseUrl,
|
|
1222
|
-
middlewares: middlewareFor("auth", [
|
|
1435
|
+
middlewares: middlewareFor("auth", [createPinnedAuthMiddleware(config.getEpoch, { inner: [retryContention] })])
|
|
1223
1436
|
}) : null
|
|
1224
1437
|
});
|
|
1225
1438
|
const management = createDerivedStore({
|
|
@@ -1231,7 +1444,7 @@ const createKeboola = (options = {}) => {
|
|
|
1231
1444
|
type: "bearer",
|
|
1232
1445
|
token: ""
|
|
1233
1446
|
},
|
|
1234
|
-
middlewares: middlewareFor("management", [
|
|
1447
|
+
middlewares: middlewareFor("management", [pinToSession().pinnedAuthMiddleware])
|
|
1235
1448
|
}) : null
|
|
1236
1449
|
});
|
|
1237
1450
|
const projectClientsAsync = createDerivedAsyncStore({
|
|
@@ -1243,13 +1456,33 @@ const createKeboola = (options = {}) => {
|
|
|
1243
1456
|
build: ({ baseUrl, projectId }) => {
|
|
1244
1457
|
return createProjectClients$1({
|
|
1245
1458
|
baseUrl,
|
|
1246
|
-
authMiddleware,
|
|
1459
|
+
authMiddleware: pinToSession().pinnedAuthMiddleware,
|
|
1247
1460
|
projectId,
|
|
1248
1461
|
middlewareFor,
|
|
1249
1462
|
clientServiceUrls: options.clientServiceUrls
|
|
1250
1463
|
});
|
|
1251
1464
|
}
|
|
1252
1465
|
});
|
|
1466
|
+
const forProject = async (projectId) => {
|
|
1467
|
+
const state = config.store.get();
|
|
1468
|
+
if (state.status === "anonymous") throw new KeboolaError(KeboolaErrorType.NotAuthenticated);
|
|
1469
|
+
const cached = extraProjects.get(projectId);
|
|
1470
|
+
if (cached) return cached();
|
|
1471
|
+
const { assertSameSession, pinnedAuthMiddleware } = pinToSession({ expiresSession: false });
|
|
1472
|
+
const build = lazy(async () => {
|
|
1473
|
+
const clients = await createProjectClients$1({
|
|
1474
|
+
baseUrl: state.baseUrl,
|
|
1475
|
+
authMiddleware: pinnedAuthMiddleware,
|
|
1476
|
+
projectId,
|
|
1477
|
+
middlewareFor,
|
|
1478
|
+
clientServiceUrls: options.clientServiceUrls
|
|
1479
|
+
});
|
|
1480
|
+
assertSameSession();
|
|
1481
|
+
return clients;
|
|
1482
|
+
});
|
|
1483
|
+
extraProjects.set(projectId, build);
|
|
1484
|
+
return build();
|
|
1485
|
+
};
|
|
1253
1486
|
if (options.baseUrl) config.setBaseUrl(options.baseUrl);
|
|
1254
1487
|
config.store.subscribe((state) => {
|
|
1255
1488
|
if (state.status === "anonymous") return;
|
|
@@ -1283,6 +1516,19 @@ const createKeboola = (options = {}) => {
|
|
|
1283
1516
|
* re-entering the project. Use `reset` to sign out instead.
|
|
1284
1517
|
*/
|
|
1285
1518
|
clearProject: config.clearProjectId,
|
|
1519
|
+
/**
|
|
1520
|
+
* The clients for one project, off this session — for reaching a second project without leaving
|
|
1521
|
+
* the first.
|
|
1522
|
+
*
|
|
1523
|
+
* - `setProjectAsync` *moves* the session (and `api`) to another project; this *adds* one. The
|
|
1524
|
+
* returned set is the caller's to hold and never appears on `api`.
|
|
1525
|
+
* - Every set shares this session's auth middleware, so one rotation serves all of them. A second
|
|
1526
|
+
* `createKeboola()` does not: both hold the same single-use refresh token, and the first to
|
|
1527
|
+
* rotate invalidates the other's, whose next refresh 401s and signs it out.
|
|
1528
|
+
* - Independent of the scope, including for the scoped project itself — asking for that one
|
|
1529
|
+
* builds a second set with its own `liveProject`, so prefer `api.*` there.
|
|
1530
|
+
*/
|
|
1531
|
+
forProject,
|
|
1286
1532
|
reset: signOut,
|
|
1287
1533
|
/**
|
|
1288
1534
|
* Dev/test only: mark the current access token as expired so the bearer credential rotates it on
|
|
@@ -1301,16 +1547,22 @@ const createKeboola = (options = {}) => {
|
|
|
1301
1547
|
* one is never re-sent. A snapshot held by the caller would do neither.
|
|
1302
1548
|
* - Throws rather than emitting a half-formed `Bearer null`: an unauthenticated or unscoped
|
|
1303
1549
|
* session has nothing to authorize with.
|
|
1550
|
+
* - Pinned to the sign-in it was called on, like every client here. This is the one
|
|
1551
|
+
* credential-emitting surface with no middleware chain for the guard to sit in, so the check
|
|
1552
|
+
* is written out around the `await` that rotates the token.
|
|
1553
|
+
* - The scope is re-read after that `await`, not carried across it. The epoch the pin compares
|
|
1554
|
+
* moves on a sign-in and a sign-out only, so a project switch mid-rotation is invisible to it.
|
|
1304
1555
|
*/
|
|
1305
1556
|
getAuthHeaders: async () => {
|
|
1306
|
-
const
|
|
1307
|
-
|
|
1308
|
-
if (state.status !== "scoped") throw new KeboolaError(KeboolaErrorType.NotReady);
|
|
1557
|
+
const { assertSameSession } = pinToSession();
|
|
1558
|
+
requireScopedProject();
|
|
1309
1559
|
const accessToken = await credential.getAccessToken();
|
|
1560
|
+
assertSameSession();
|
|
1561
|
+
const projectId = requireScopedProject();
|
|
1310
1562
|
assert$1(accessToken, KeboolaErrorType.NotAuthenticated);
|
|
1311
1563
|
return {
|
|
1312
1564
|
[HttpHeader.AUTHORIZATION]: `Bearer ${accessToken}`,
|
|
1313
|
-
[KeboolaHttpHeader.PROJECT_ID]: String(
|
|
1565
|
+
[KeboolaHttpHeader.PROJECT_ID]: String(projectId)
|
|
1314
1566
|
};
|
|
1315
1567
|
},
|
|
1316
1568
|
restore: async () => {
|
|
@@ -1324,8 +1576,10 @@ const createKeboola = (options = {}) => {
|
|
|
1324
1576
|
if (!configured) config.setBaseUrl(persisted.baseUrl);
|
|
1325
1577
|
const client = authClientBare.get();
|
|
1326
1578
|
assert$1(client, KeboolaErrorType.NotReady);
|
|
1579
|
+
const startedOn = config.getEpoch();
|
|
1327
1580
|
try {
|
|
1328
1581
|
const refreshed = await client.token.refresh(persisted.refreshToken);
|
|
1582
|
+
if (config.getEpoch() !== startedOn) return { status: "empty" };
|
|
1329
1583
|
config.authenticate(refreshed);
|
|
1330
1584
|
if (persisted.projectId !== null) {
|
|
1331
1585
|
config.setProjectId(persisted.projectId);
|
|
@@ -1333,6 +1587,7 @@ const createKeboola = (options = {}) => {
|
|
|
1333
1587
|
}
|
|
1334
1588
|
return { status: "restored" };
|
|
1335
1589
|
} catch (err) {
|
|
1590
|
+
if (config.getEpoch() !== startedOn) return { status: "empty" };
|
|
1336
1591
|
if (isUnauthorized(err)) {
|
|
1337
1592
|
persistor.clear();
|
|
1338
1593
|
return { status: "expired" };
|
|
@@ -1569,6 +1824,6 @@ const createLegacyKeboola = (options = {}) => {
|
|
|
1569
1824
|
};
|
|
1570
1825
|
};
|
|
1571
1826
|
//#endregion
|
|
1572
|
-
export { ApiError, HtmlResponseError, HttpContentType, HttpHeader, KeboolaError, KeboolaErrorType, KeboolaHttpHeader, ManagementClientAuthError, QueryJobError, QueryJobTimeoutError, Result, ServiceUnavailableError, SyncActionError, UserError, ValidationError, asError, assert, coalesce, collect, concurrent, createDerivedAsyncStore, createDerivedStore, createEmitter, createGenericFetchClient, createKeboola, createLegacyKeboola, createLocalStorage, createLoggingMiddleware, createMemoryStorage, createNullStorage, createPersistor, createPollRegistry, createQueryServiceSdk, createRetryMiddleware, createSessionStorage, createStorageSdk, createStore, dedupe, deepMerge, delay, emitter, failureOf, generateUUID, isAbortError, isApiError, isEmptyDeep, isFetchClientError, isHtmlResponseError, isKeboolaError, isManagementClientAuthError, isPlainObject, isQueryJobError, isQueryJobTimeoutError, isStorageTokenMutatingRequest, isSyncActionError, isValidationError, jobStatus, keboolaUID, lazy, parseLogLines, parseOrThrow, poll, poller, schemaGuidedMerge, series, shallowEqual };
|
|
1827
|
+
export { ApiError, HtmlResponseError, HttpContentType, HttpHeader, KeboolaError, KeboolaErrorType, KeboolaHttpHeader, ManagementClientAuthError, QueryJobError, QueryJobTimeoutError, Result, ServiceUnavailableError, SyncActionError, UserError, ValidationError, asError, assert, coalesce, collect, concurrent, createDerivedAsyncStore, createDerivedStore, createEmitter, createGenericFetchClient, createKeboola, createLegacyKeboola, createLocalStorage, createLoggingMiddleware, createMemoryStorage, createNullStorage, createPersistor, createPollRegistry, createQueryServiceSdk, createRetryMiddleware, createSessionStorage, createStorageSdk, createStore, dedupe, deepMerge, delay, emitter, failureOf, generateUUID, isAbortError, isApiError, isEmptyDeep, isFetchClientError, isHtmlResponseError, isKeboolaError, isManagementClientAuthError, isPlainObject, isQueryJobError, isQueryJobTimeoutError, isStorageTokenMutatingRequest, isSyncActionError, isTimeoutError, isValidationError, jobStatus, keboolaUID, lazy, parseLogLines, parseOrThrow, poll, poller, schemaGuidedMerge, series, shallowEqual };
|
|
1573
1828
|
|
|
1574
1829
|
//# sourceMappingURL=index.js.map
|