@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queue-
|
|
1
|
+
{"version":3,"file":"queue-D1_TCe0z.cjs","names":["createAbortError","poller","jobStatus","createOpenapiFetchClient","createAuthHeaders","createGenericFetchClient"],"sources":["../src/utils/async/collect.ts","../src/clients/queue/poller.ts","../src/clients/queue/queueClient.ts"],"sourcesContent":["import { createAbortError } from '../createAbortError';\n\nexport type CollectOptions<T> = {\n fetchFrom: (offset: number, pageSize?: number, signal?: AbortSignal) => Promise<T[]>;\n pageSize?: number;\n limit?: number;\n signal?: AbortSignal;\n};\n\n/**\n * Collects items from an offset-paginated endpoint — up to `limit` of them, or all of them when\n * `limit` is omitted. Calls `fetchFrom` sequentially with the offset advancing by the number of\n * items received, and hands it `pageSize` so the request and the traversal agree on one value.\n *\n * Traversal ends on a page shorter than `pageSize`, or — when `pageSize` is omitted — only on an\n * empty page. Passing it therefore saves the trailing request, at the cost of stopping early if the\n * endpoint returns fewer items per page than asked for.\n */\nexport const collect = async <T>({\n fetchFrom,\n pageSize,\n limit,\n signal,\n}: CollectOptions<T>): Promise<T[]> => {\n if (signal?.aborted) throw createAbortError(signal.reason);\n if (limit !== undefined && limit < 0) throw new Error('Invalid collect limit');\n if (pageSize !== undefined && pageSize < 1) throw new Error('Invalid collect pageSize');\n\n const items: T[] = [];\n\n if (limit === 0) return items;\n\n let offset = 0;\n\n while (true) {\n const batch = await fetchFrom(offset, pageSize, signal);\n\n items.push(...batch);\n offset += batch.length;\n\n if (limit !== undefined && items.length >= limit) return items.slice(0, limit);\n if (pageSize === undefined ? batch.length === 0 : batch.length < pageSize) return items;\n }\n};\n","import { jobStatus } from '../../domain/jobStatus';\nimport { poller } from '../../utils/async';\n\nimport type { GetQueueJobPath, QueueJob } from './types';\n\nconst DEFAULT_POLL_INTERVAL = 2000;\n\ntype QueueJobPollOptions = {\n interval?: number;\n maxAttempts?: number;\n timeout?: number;\n signal?: AbortSignal;\n};\n\ntype GetJob = (jobId: GetQueueJobPath['jobId'], signal?: AbortSignal) => Promise<QueueJob>;\n\n/**\n * Waits on a queue job.\n *\n * - Takes the job, not its id: the component is what makes a poll legible in dev tools, and only the\n * job carries it.\n * - The request reads the id off the key rather than out of a closure, which is what makes the key\n * the whole input.\n * - Terminal is terminal: a job that ended as `error` is a `done` poll carrying a failed job, and\n * what that means is the caller's business.\n */\nexport const createJobPoller =\n ({ getJob }: { getJob: GetJob }) =>\n (\n { id, component }: { id: GetQueueJobPath['jobId']; component: string },\n { interval, maxAttempts, timeout, signal }: QueueJobPollOptions = {},\n ) =>\n poller({\n pollKey: ['queue.job', { jobId: id, component }] as const,\n pollFn: ({ pollKey: [, params], signal: pollSignal }) => getJob(params.jobId, pollSignal),\n until: ({ data }) => jobStatus.queue.isTerminal(data.status),\n backoff: { type: 'constant', interval: interval ?? DEFAULT_POLL_INTERVAL },\n maxAttempts,\n timeout,\n signal,\n });\n","import { createGenericFetchClient, createOpenapiFetchClient } from '../../fetchClient';\nimport { collect } from '../../utils';\nimport { createAuthHeaders } from '../auth';\nimport type { ClientInitOptions } from '../types';\n\nimport type { paths } from './__generated__/schema';\nimport { createJobPoller } from './poller';\nimport type {\n CreateJobBody,\n GetQueueJobPath,\n KillJobPath,\n OrchestrationRerunPlanPath,\n SearchAllJobsQuery,\n SearchGroupedJobsQuery,\n SearchJobsQuery,\n} from './types';\n\nexport const createQueueClient = ({ baseUrl, middlewares, auth }: ClientInitOptions) => {\n const client = createOpenapiFetchClient<paths>({\n baseUrl,\n middlewares,\n headers: createAuthHeaders(auth),\n });\n const genericClient = createGenericFetchClient({ baseUrl, middlewares });\n\n const getJob = async (jobId: GetQueueJobPath['jobId'], signal?: AbortSignal) => {\n const { data } = await client.get(\n '/jobs/{jobId}',\n {\n path: { jobId },\n },\n { signal },\n );\n\n return data;\n };\n\n const searchJobs = async (query?: SearchJobsQuery, signal?: AbortSignal) => {\n const { data } = await client.get(\n '/search/jobs',\n {\n query,\n },\n { signal },\n );\n\n return data;\n };\n\n const searchAllJobs = (query: SearchAllJobsQuery, signal?: AbortSignal) => {\n return collect({\n pageSize: query.limit,\n signal,\n fetchFrom: (offset, pageSize, batchSignal) => {\n return searchJobs({ ...query, limit: pageSize, offset }, batchSignal);\n },\n });\n };\n\n const createJob = async (body: CreateJobBody, signal?: AbortSignal) => {\n const { data } = await client.post('/jobs', { body }, { signal });\n\n return data;\n };\n\n const killJob = async (jobId: KillJobPath['jobId'], signal?: AbortSignal) => {\n const { data } = await client.post(\n '/jobs/{jobId}/kill',\n {\n path: { jobId },\n },\n { signal },\n );\n\n return data;\n };\n\n const searchGroupedJobs = async (query: SearchGroupedJobsQuery, signal?: AbortSignal) => {\n const { data } = await client.get(\n '/search/grouped-jobs',\n {\n query,\n },\n { signal },\n );\n\n return data;\n };\n\n const getOrchestrationRerunPlan = async (\n jobId: OrchestrationRerunPlanPath['jobId'],\n signal?: AbortSignal,\n ) => {\n const { data } = await client.get(\n '/orchestration-rerun-plan/{jobId}',\n {\n path: { jobId },\n },\n { signal },\n );\n\n return data;\n };\n\n const healthCheck = async (signal?: AbortSignal) => {\n const { data } = await genericClient.get('/health-check', {}, { signal });\n\n return data;\n };\n\n // Every wait on a queue job is the same wait, so it is the client's rather than a caller's.\n const poller = createJobPoller({ getJob });\n\n return {\n healthCheck,\n poller,\n getJob,\n searchJobs,\n searchAllJobs,\n createJob,\n killJob,\n searchGroupedJobs,\n getOrchestrationRerunPlan,\n };\n};\n"],"mappings":";;;;;;;;;;;;;;AAkBA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B,EAAE,OAAO,CAIjC;EACL;EACA;EACA;EACA;EACA;EACA;EACA;CACF;AACF"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as poller, f as createAbortError, t as jobStatus } from "./jobStatus-
|
|
2
|
-
import { t as createGenericFetchClient } from "./createGenericFetchClient-
|
|
3
|
-
import { t as createOpenapiFetchClient } from "./createOpenapiFetchClient-
|
|
4
|
-
import { t as createAuthHeaders } from "./auth-
|
|
1
|
+
import { a as poller, f as createAbortError, t as jobStatus } from "./jobStatus-PSZJMTiA.js";
|
|
2
|
+
import { t as createGenericFetchClient } from "./createGenericFetchClient-MQeLRiNW.js";
|
|
3
|
+
import { t as createOpenapiFetchClient } from "./createOpenapiFetchClient-E7OIVkYv.js";
|
|
4
|
+
import { t as createAuthHeaders } from "./auth-CE9rQV3-.js";
|
|
5
5
|
//#region src/utils/async/collect.ts
|
|
6
6
|
/**
|
|
7
7
|
* Collects items from an offset-paginated endpoint — up to `limit` of them, or all of them when
|
|
@@ -123,4 +123,4 @@ const createQueueClient = ({ baseUrl, middlewares, auth }) => {
|
|
|
123
123
|
//#endregion
|
|
124
124
|
export { collect as n, createQueueClient as t };
|
|
125
125
|
|
|
126
|
-
//# sourceMappingURL=queue-
|
|
126
|
+
//# sourceMappingURL=queue-DrLUbk98.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queue-
|
|
1
|
+
{"version":3,"file":"queue-DrLUbk98.js","names":[],"sources":["../src/utils/async/collect.ts","../src/clients/queue/poller.ts","../src/clients/queue/queueClient.ts"],"sourcesContent":["import { createAbortError } from '../createAbortError';\n\nexport type CollectOptions<T> = {\n fetchFrom: (offset: number, pageSize?: number, signal?: AbortSignal) => Promise<T[]>;\n pageSize?: number;\n limit?: number;\n signal?: AbortSignal;\n};\n\n/**\n * Collects items from an offset-paginated endpoint — up to `limit` of them, or all of them when\n * `limit` is omitted. Calls `fetchFrom` sequentially with the offset advancing by the number of\n * items received, and hands it `pageSize` so the request and the traversal agree on one value.\n *\n * Traversal ends on a page shorter than `pageSize`, or — when `pageSize` is omitted — only on an\n * empty page. Passing it therefore saves the trailing request, at the cost of stopping early if the\n * endpoint returns fewer items per page than asked for.\n */\nexport const collect = async <T>({\n fetchFrom,\n pageSize,\n limit,\n signal,\n}: CollectOptions<T>): Promise<T[]> => {\n if (signal?.aborted) throw createAbortError(signal.reason);\n if (limit !== undefined && limit < 0) throw new Error('Invalid collect limit');\n if (pageSize !== undefined && pageSize < 1) throw new Error('Invalid collect pageSize');\n\n const items: T[] = [];\n\n if (limit === 0) return items;\n\n let offset = 0;\n\n while (true) {\n const batch = await fetchFrom(offset, pageSize, signal);\n\n items.push(...batch);\n offset += batch.length;\n\n if (limit !== undefined && items.length >= limit) return items.slice(0, limit);\n if (pageSize === undefined ? batch.length === 0 : batch.length < pageSize) return items;\n }\n};\n","import { jobStatus } from '../../domain/jobStatus';\nimport { poller } from '../../utils/async';\n\nimport type { GetQueueJobPath, QueueJob } from './types';\n\nconst DEFAULT_POLL_INTERVAL = 2000;\n\ntype QueueJobPollOptions = {\n interval?: number;\n maxAttempts?: number;\n timeout?: number;\n signal?: AbortSignal;\n};\n\ntype GetJob = (jobId: GetQueueJobPath['jobId'], signal?: AbortSignal) => Promise<QueueJob>;\n\n/**\n * Waits on a queue job.\n *\n * - Takes the job, not its id: the component is what makes a poll legible in dev tools, and only the\n * job carries it.\n * - The request reads the id off the key rather than out of a closure, which is what makes the key\n * the whole input.\n * - Terminal is terminal: a job that ended as `error` is a `done` poll carrying a failed job, and\n * what that means is the caller's business.\n */\nexport const createJobPoller =\n ({ getJob }: { getJob: GetJob }) =>\n (\n { id, component }: { id: GetQueueJobPath['jobId']; component: string },\n { interval, maxAttempts, timeout, signal }: QueueJobPollOptions = {},\n ) =>\n poller({\n pollKey: ['queue.job', { jobId: id, component }] as const,\n pollFn: ({ pollKey: [, params], signal: pollSignal }) => getJob(params.jobId, pollSignal),\n until: ({ data }) => jobStatus.queue.isTerminal(data.status),\n backoff: { type: 'constant', interval: interval ?? DEFAULT_POLL_INTERVAL },\n maxAttempts,\n timeout,\n signal,\n });\n","import { createGenericFetchClient, createOpenapiFetchClient } from '../../fetchClient';\nimport { collect } from '../../utils';\nimport { createAuthHeaders } from '../auth';\nimport type { ClientInitOptions } from '../types';\n\nimport type { paths } from './__generated__/schema';\nimport { createJobPoller } from './poller';\nimport type {\n CreateJobBody,\n GetQueueJobPath,\n KillJobPath,\n OrchestrationRerunPlanPath,\n SearchAllJobsQuery,\n SearchGroupedJobsQuery,\n SearchJobsQuery,\n} from './types';\n\nexport const createQueueClient = ({ baseUrl, middlewares, auth }: ClientInitOptions) => {\n const client = createOpenapiFetchClient<paths>({\n baseUrl,\n middlewares,\n headers: createAuthHeaders(auth),\n });\n const genericClient = createGenericFetchClient({ baseUrl, middlewares });\n\n const getJob = async (jobId: GetQueueJobPath['jobId'], signal?: AbortSignal) => {\n const { data } = await client.get(\n '/jobs/{jobId}',\n {\n path: { jobId },\n },\n { signal },\n );\n\n return data;\n };\n\n const searchJobs = async (query?: SearchJobsQuery, signal?: AbortSignal) => {\n const { data } = await client.get(\n '/search/jobs',\n {\n query,\n },\n { signal },\n );\n\n return data;\n };\n\n const searchAllJobs = (query: SearchAllJobsQuery, signal?: AbortSignal) => {\n return collect({\n pageSize: query.limit,\n signal,\n fetchFrom: (offset, pageSize, batchSignal) => {\n return searchJobs({ ...query, limit: pageSize, offset }, batchSignal);\n },\n });\n };\n\n const createJob = async (body: CreateJobBody, signal?: AbortSignal) => {\n const { data } = await client.post('/jobs', { body }, { signal });\n\n return data;\n };\n\n const killJob = async (jobId: KillJobPath['jobId'], signal?: AbortSignal) => {\n const { data } = await client.post(\n '/jobs/{jobId}/kill',\n {\n path: { jobId },\n },\n { signal },\n );\n\n return data;\n };\n\n const searchGroupedJobs = async (query: SearchGroupedJobsQuery, signal?: AbortSignal) => {\n const { data } = await client.get(\n '/search/grouped-jobs',\n {\n query,\n },\n { signal },\n );\n\n return data;\n };\n\n const getOrchestrationRerunPlan = async (\n jobId: OrchestrationRerunPlanPath['jobId'],\n signal?: AbortSignal,\n ) => {\n const { data } = await client.get(\n '/orchestration-rerun-plan/{jobId}',\n {\n path: { jobId },\n },\n { signal },\n );\n\n return data;\n };\n\n const healthCheck = async (signal?: AbortSignal) => {\n const { data } = await genericClient.get('/health-check', {}, { signal });\n\n return data;\n };\n\n // Every wait on a queue job is the same wait, so it is the client's rather than a caller's.\n const poller = createJobPoller({ getJob });\n\n return {\n healthCheck,\n poller,\n getJob,\n searchJobs,\n searchAllJobs,\n createJob,\n killJob,\n searchGroupedJobs,\n getOrchestrationRerunPlan,\n };\n};\n"],"mappings":";;;;;;;;;;;;;;AAkBA,MAAa,UAAU,OAAU,EAC/B,WACA,UACA,OACA,aACqC;CACrC,IAAI,QAAQ,SAAS,MAAM,iBAAiB,OAAO,MAAM;CACzD,IAAI,UAAU,KAAA,KAAa,QAAQ,GAAG,MAAM,IAAI,MAAM,uBAAuB;CAC7E,IAAI,aAAa,KAAA,KAAa,WAAW,GAAG,MAAM,IAAI,MAAM,0BAA0B;CAEtF,MAAM,QAAa,CAAC;CAEpB,IAAI,UAAU,GAAG,OAAO;CAExB,IAAI,SAAS;CAEb,OAAO,MAAM;EACX,MAAM,QAAQ,MAAM,UAAU,QAAQ,UAAU,MAAM;EAEtD,MAAM,KAAK,GAAG,KAAK;EACnB,UAAU,MAAM;EAEhB,IAAI,UAAU,KAAA,KAAa,MAAM,UAAU,OAAO,OAAO,MAAM,MAAM,GAAG,KAAK;EAC7E,IAAI,aAAa,KAAA,IAAY,MAAM,WAAW,IAAI,MAAM,SAAS,UAAU,OAAO;CACpF;AACF;;;ACtCA,MAAM,wBAAwB;;;;;;;;;;;AAqB9B,MAAa,mBACV,EAAE,cAED,EAAE,IAAI,aACN,EAAE,UAAU,aAAa,SAAS,WAAgC,CAAC,MAEnE,OAAO;CACL,SAAS,CAAC,aAAa;EAAE,OAAO;EAAI;CAAU,CAAC;CAC/C,SAA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AAM,OAAO,IAC5B,wBACA,EACE,MACF,GACA,EAAE,OAAO,CACX;EAEA,OAAO;CACT;CAEA,MAAM,4BAA4B,OAChC,OACA,WACG;EACH,MAAM,EAAE,SAAS,MAAM,OAAO,IAC5B,qCACA,EACE,MAAM,EAAE,MAAM,EAChB,GACA,EAAE,OAAO,CACX;EAEA,OAAO;CACT;CAEA,MAAM,cAAc,OAAO,WAAyB;EAClD,MAAM,EAAE,SAAS,MAAM,cAAc,IAAI,iBAAiB,CAAC,GAAG,EAAE,OAAO,CAAC;EAExE,OAAO;CACT;CAKA,OAAO;EACL;EACA,QAJa,gBAAgB,EAAE,OAAO,CAIjC;EACL;EACA;EACA;EACA;EACA;EACA;EACA;CACF;AACF"}
|
package/dist/scheduler/index.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_concurrent = require("../concurrent-tbiIa0UL.cjs");
|
|
3
|
-
const require_createGenericFetchClient = require("../createGenericFetchClient-
|
|
4
|
-
const require_createOpenapiFetchClient = require("../createOpenapiFetchClient-
|
|
5
|
-
const require_auth = require("../auth-
|
|
3
|
+
const require_createGenericFetchClient = require("../createGenericFetchClient-qfCZlCTv.cjs");
|
|
4
|
+
const require_createOpenapiFetchClient = require("../createOpenapiFetchClient-C57Ljzi6.cjs");
|
|
5
|
+
const require_auth = require("../auth-C2_JLisH.cjs");
|
|
6
6
|
//#region src/clients/scheduler/schedulerClient.ts
|
|
7
7
|
const createSchedulerClient = ({ baseUrl, middlewares, auth }) => {
|
|
8
8
|
const client = require_createOpenapiFetchClient.createOpenapiFetchClient({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as ClientInitOptions } from "../types-
|
|
2
|
-
import { a as SchedulePath, n as ConfigurationPath, r as GetSchedulesQuery, t as ActivateScheduleBody } from "../types-
|
|
1
|
+
import { n as ClientInitOptions } from "../types-DHI0g51U.cjs";
|
|
2
|
+
import { a as SchedulePath, n as ConfigurationPath, r as GetSchedulesQuery, t as ActivateScheduleBody } from "../types-B4_MM5Wf.cjs";
|
|
3
3
|
//#region src/clients/scheduler/schedulerClient.d.ts
|
|
4
4
|
declare const createSchedulerClient: ({ baseUrl, middlewares, auth }: ClientInitOptions) => {
|
|
5
5
|
healthCheck: (signal?: AbortSignal) => Promise<unknown>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as ClientInitOptions } from "../types-
|
|
2
|
-
import { a as SchedulePath, n as ConfigurationPath, r as GetSchedulesQuery, t as ActivateScheduleBody } from "../types-
|
|
1
|
+
import { n as ClientInitOptions } from "../types-D-98DirB.js";
|
|
2
|
+
import { a as SchedulePath, n as ConfigurationPath, r as GetSchedulesQuery, t as ActivateScheduleBody } from "../types-BgVKG4vg.js";
|
|
3
3
|
//#region src/clients/scheduler/schedulerClient.d.ts
|
|
4
4
|
declare const createSchedulerClient: ({ baseUrl, middlewares, auth }: ClientInitOptions) => {
|
|
5
5
|
healthCheck: (signal?: AbortSignal) => Promise<unknown>;
|
package/dist/scheduler/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as concurrent } from "../concurrent-CH9fbNr3.js";
|
|
2
|
-
import { t as createGenericFetchClient } from "../createGenericFetchClient-
|
|
3
|
-
import { t as createOpenapiFetchClient } from "../createOpenapiFetchClient-
|
|
4
|
-
import { t as createAuthHeaders } from "../auth-
|
|
2
|
+
import { t as createGenericFetchClient } from "../createGenericFetchClient-MQeLRiNW.js";
|
|
3
|
+
import { t as createOpenapiFetchClient } from "../createOpenapiFetchClient-E7OIVkYv.js";
|
|
4
|
+
import { t as createAuthHeaders } from "../auth-CE9rQV3-.js";
|
|
5
5
|
//#region src/clients/scheduler/schedulerClient.ts
|
|
6
6
|
const createSchedulerClient = ({ baseUrl, middlewares, auth }) => {
|
|
7
7
|
const client = createOpenapiFetchClient({
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as SchedulePath, i as Schedule, n as ConfigurationPath, o as Schedules, r as GetSchedulesQuery, t as ActivateScheduleBody } from "../types-
|
|
1
|
+
import { a as SchedulePath, i as Schedule, n as ConfigurationPath, o as Schedules, r as GetSchedulesQuery, t as ActivateScheduleBody } from "../types-B4_MM5Wf.cjs";
|
|
2
2
|
export { ActivateScheduleBody, ConfigurationPath, GetSchedulesQuery, Schedule, SchedulePath, Schedules };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as SchedulePath, i as Schedule, n as ConfigurationPath, o as Schedules, r as GetSchedulesQuery, t as ActivateScheduleBody } from "../types-
|
|
1
|
+
import { a as SchedulePath, i as Schedule, n as ConfigurationPath, o as Schedules, r as GetSchedulesQuery, t as ActivateScheduleBody } from "../types-BgVKG4vg.js";
|
|
2
2
|
export { ActivateScheduleBody, ConfigurationPath, GetSchedulesQuery, Schedule, SchedulePath, Schedules };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Dn as UpdateConfigurationInput, Xt as BaseComponentConfig, an as ConfigurationPath, sn as CreateConfigurationInput } from "../../types-
|
|
3
|
-
import { t as createEncryptionClient } from "../../index-
|
|
4
|
-
import { t as Project } from "../../project-
|
|
1
|
+
import { B as createStorageClient, I as RegisteredComponentId, L as registry, Wt as createDefaultBranch } from "../../index-DIVvL54G.cjs";
|
|
2
|
+
import { Dn as UpdateConfigurationInput, Xt as BaseComponentConfig, an as ConfigurationPath, sn as CreateConfigurationInput } from "../../types-D6ocCyGh.cjs";
|
|
3
|
+
import { t as createEncryptionClient } from "../../index-C7gxKoDF.cjs";
|
|
4
|
+
import { t as Project } from "../../project-D25GH8zK.cjs";
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
//#region src/sdks/configurations/configurationsSdk.d.ts
|
|
7
7
|
type ConfigurationSdkContext = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Dn as UpdateConfigurationInput, Xt as BaseComponentConfig, an as ConfigurationPath, sn as CreateConfigurationInput } from "../../types-
|
|
3
|
-
import { t as createEncryptionClient } from "../../index-
|
|
4
|
-
import { t as Project } from "../../project-
|
|
1
|
+
import { B as createStorageClient, I as RegisteredComponentId, L as registry, Wt as createDefaultBranch } from "../../index-B0V1pJAa.js";
|
|
2
|
+
import { Dn as UpdateConfigurationInput, Xt as BaseComponentConfig, an as ConfigurationPath, sn as CreateConfigurationInput } from "../../types-C4mr0lop.js";
|
|
3
|
+
import { t as createEncryptionClient } from "../../index-CVqk63at.js";
|
|
4
|
+
import { t as Project } from "../../project-Bh954iOA.js";
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
//#region src/sdks/configurations/configurationsSdk.d.ts
|
|
7
7
|
type ConfigurationSdkContext = {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_dedupe = require("../../dedupe-CiskLkGR.cjs");
|
|
3
|
-
const
|
|
4
|
-
const require_createFetchClient = require("../../createFetchClient-
|
|
5
|
-
const require_credential = require("../../credential-
|
|
6
|
-
const require_developerPortalClient = require("../../developerPortalClient-
|
|
3
|
+
const require_store = require("../../store-xS-Cu_VS.cjs");
|
|
4
|
+
const require_createFetchClient = require("../../createFetchClient-DvZvD31l.cjs");
|
|
5
|
+
const require_credential = require("../../credential-D-X5QQrM.cjs");
|
|
6
|
+
const require_developerPortalClient = require("../../developerPortalClient-Db2XVB_o.cjs");
|
|
7
7
|
//#region src/sdks/developerPortal/tokenExpiry.ts
|
|
8
8
|
/**
|
|
9
9
|
* Reads a JWT's `exp` claim as milliseconds, or `null` when unparseable ("expiry unknown", which the
|
|
@@ -103,7 +103,7 @@ const createDeveloperPortalAuthMiddleware = (credential) => {
|
|
|
103
103
|
* apps-api is its own identity domain.
|
|
104
104
|
*/
|
|
105
105
|
const createDeveloperPortalSdk = ({ baseUrl, tokens: initialTokens = null, onTokensChange, onSessionExpired, refreshLeadTimeMs, middlewares = [] }) => {
|
|
106
|
-
const store =
|
|
106
|
+
const store = require_store.createStore(initialTokens);
|
|
107
107
|
store.subscribe((value) => onTokensChange?.(value));
|
|
108
108
|
const getTokens = () => store.get();
|
|
109
109
|
const requireTokens = (action) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":["isUnauthorized","dedupe","HttpHeader","isUnauthorized","createStore","createDeveloperPortalClient"],"sources":["../../../src/sdks/developerPortal/tokenExpiry.ts","../../../src/sdks/developerPortal/credential.ts","../../../src/sdks/developerPortal/middleware.ts","../../../src/sdks/developerPortal/developerPortalSdk.ts"],"sourcesContent":["/**\n * Reads a JWT's `exp` claim as milliseconds, or `null` when unparseable (\"expiry unknown\", which the\n * caller leaves to the 401 path). A read, not a verification.\n *\n * Needed because apps-api reports `expiresIn` on login but never on refresh, so it cannot keep a\n * proactive-refresh clock honest past the first rotation. The token always carries its own expiry.\n */\nexport const readTokenExpiry = (token: string): number | null => {\n const segments = token.split('.');\n if (segments.length !== 3) return null;\n\n const payload = segments[1];\n if (payload === undefined || payload === '') return null;\n\n try {\n // base64url -> base64, and re-pad: `atob` requires padding, base64url omits it.\n const base64 = payload.replaceAll('-', '+').replaceAll('_', '/');\n const padded = base64.padEnd(base64.length + ((4 - (base64.length % 4)) % 4), '=');\n const claims: unknown = JSON.parse(atob(padded));\n if (typeof claims !== 'object' || claims === null || !('exp' in claims)) return null;\n const { exp } = claims as { exp: unknown };\n if (typeof exp !== 'number' || !Number.isFinite(exp)) return null;\n return exp * 1000;\n } catch {\n return null;\n }\n};\n","import type { DeveloperPortalTokens } from '../../clients/developerPortal/tokens';\nimport { isUnauthorized } from '../../keboola/bearer/credential';\nimport { dedupe } from '../../utils';\n\nimport { readTokenExpiry } from './tokenExpiry';\n\ntype Options = {\n refresh: () => Promise<DeveloperPortalTokens>;\n /** Live read from the session, so this holds no token of its own. `null` when signed out. */\n getTokens: () => DeveloperPortalTokens | null;\n /** May fire more than once; the caller owns any fire-once latch. */\n onSessionExpired?: () => void;\n /**\n * An absolute lead time rather than `createBearerCredential`'s fractional threshold: that needs the\n * token's full lifetime, and apps-api reports `expiresIn` on login only, never on refresh.\n */\n refreshLeadTimeMs?: number;\n};\n\nconst DEFAULT_REFRESH_LEAD_TIME_MS = 5 * 60 * 1000;\n\nexport type DeveloperPortalCredential = {\n getIdToken: (options?: { forceRefresh?: boolean }) => Promise<string | null>;\n getTokens: () => DeveloperPortalTokens | null;\n notifyExpired: () => void;\n};\n\n/** Mirrors `createBearerCredential`, over the id token of the trio. */\nexport const createDeveloperPortalCredential = ({\n refresh,\n getTokens,\n onSessionExpired,\n refreshLeadTimeMs = DEFAULT_REFRESH_LEAD_TIME_MS,\n}: Options): DeveloperPortalCredential => {\n const doRefresh = async (): Promise<DeveloperPortalTokens> => {\n try {\n return await refresh();\n } catch (error) {\n // Only a 401 means the refresh token is dead. Signing out over a 5xx would be a self-inflicted\n // logout, so anything else propagates without expiring the session.\n if (isUnauthorized(error)) onSessionExpired?.();\n throw error;\n }\n };\n\n // N concurrent 401s must cause one rotation: each extra one invalidates the tokens the others got.\n const refreshShared = dedupe(doRefresh);\n\n const getIdToken = async ({ forceRefresh = false } = {}): Promise<string | null> => {\n const tokens = getTokens();\n if (tokens === null) return null;\n if (forceRefresh) return (await refreshShared()).token;\n\n const expiresAt = readTokenExpiry(tokens.token);\n // Unknown expiry is left to the 401 path; a `0` here would rotate on every request.\n if (expiresAt === null) return tokens.token;\n if (Date.now() < expiresAt - refreshLeadTimeMs) return tokens.token;\n\n // Proactive rotation is best-effort — a real 401 drives the mandatory one.\n return refreshShared()\n .then((fresh) => fresh.token)\n .catch(() => tokens.token);\n };\n\n return { getIdToken, getTokens, notifyExpired: () => onSessionExpired?.() };\n};\n","import { HttpHeader, type MiddlewareFn } from '../../fetchClient';\nimport { isUnauthorized } from '../../keboola/bearer/credential';\n\nimport type { DeveloperPortalCredential } from './credential';\n\n/**\n * Stamps the id token, and on a 401 force-refreshes and replays once. Mirrors\n * `createBearerAuthMiddleware`, minus the `Bearer ` prefix apps-api does not use.\n *\n * An anonymous session passes through unstamped, so a failed login is never read as session expiry.\n */\nexport const createDeveloperPortalAuthMiddleware = (\n credential: DeveloperPortalCredential,\n): MiddlewareFn => {\n return (next) => async (request) => {\n const token = await credential.getIdToken();\n if (token === null) return next(request);\n\n // Cloned before the first attempt consumes the body. Cloning the `Request` carries a binary or\n // FormData payload through byte-for-byte.\n const retryRequest = request.request.clone();\n request.request.headers.set(HttpHeader.AUTHORIZATION, token);\n\n try {\n return await next(request);\n } catch (error) {\n if (!isUnauthorized(error)) throw error;\n\n const refreshed = await credential.getIdToken({ forceRefresh: true }).catch(() => null);\n // Nothing to replay with, because a concurrent sign-out landed or the rotation failed. The\n // caller's request failed with a 401, so that is what they see.\n if (refreshed === null) throw error;\n retryRequest.headers.set(HttpHeader.AUTHORIZATION, refreshed);\n\n try {\n return await next({ ...request, request: retryRequest });\n } catch (retryError) {\n if (isUnauthorized(retryError)) credential.notifyExpired();\n throw retryError;\n }\n }\n };\n};\n","import { createDeveloperPortalClient } from '../../clients/developerPortal/developerPortalClient';\nimport type { DeveloperPortalTokens } from '../../clients/developerPortal/tokens';\nimport type { LoginSuccess } from '../../clients/developerPortal/types';\nimport type { MiddlewareFn } from '../../fetchClient';\nimport { createStore } from '../../utils';\n\nimport { createDeveloperPortalCredential } from './credential';\nimport { createDeveloperPortalAuthMiddleware } from './middleware';\n\nexport type DeveloperPortalSdkOptions = {\n baseUrl: string;\n /** Session to restore on construction — e.g. a trio read back out of `localStorage`. */\n tokens?: DeveloperPortalTokens | null;\n /** Persistence hook, fired on sign-in, every rotation, and with `null` on sign-out or expiry. */\n onTokensChange?: (tokens: DeveloperPortalTokens | null) => void;\n /** The session is dead; tokens are already cleared. The consumer redirects to sign-in. */\n onSessionExpired?: () => void;\n refreshLeadTimeMs?: number;\n middlewares?: MiddlewareFn[];\n};\n\n/**\n * `createDeveloperPortalClient` plus the session that keeps it authenticated: the token store, the\n * credential, the auth middleware, and the tokens the four self-authenticating endpoints need.\n *\n * It constructs its client rather than receiving one like `createTagSdk` does, because the middleware\n * needs the credential, the credential needs the session, and the session needs a client to rotate\n * with. `createKeboola` closes the same cycle the same way, and stays separate from this one because\n * apps-api is its own identity domain.\n */\nexport const createDeveloperPortalSdk = ({\n baseUrl,\n tokens: initialTokens = null,\n onTokensChange,\n onSessionExpired,\n refreshLeadTimeMs,\n middlewares = [],\n}: DeveloperPortalSdkOptions) => {\n const store = createStore<DeveloperPortalTokens | null>(initialTokens);\n store.subscribe((value) => onTokensChange?.(value));\n\n const getTokens = () => store.get();\n\n const requireTokens = (action: string): DeveloperPortalTokens => {\n const tokens = store.get();\n if (tokens === null) {\n throw new Error(`Developer Portal: ${action} requires a signed-in session.`);\n }\n return tokens;\n };\n\n // No auth middleware: `refreshTokens` sets its own header, so a rotation cannot recurse into the\n // middleware that triggered it.\n const refreshClient = createDeveloperPortalClient({ baseUrl, middlewares });\n\n const refresh = async (): Promise<DeveloperPortalTokens> => {\n const before = store.get();\n if (before === null) {\n throw new Error('Cannot refresh the Developer Portal session: signed out.');\n }\n\n const { token, accessToken } = await refreshClient.auth.refreshTokens(before.refreshToken);\n const next: DeveloperPortalTokens = { token, accessToken, refreshToken: before.refreshToken };\n\n // Sign-out wins over an in-flight rotation: without this, a `clear()` that lands while the request\n // is on the wire is undone by the response, silently signing the user back in.\n const after = store.get();\n if (after === null || after.refreshToken !== before.refreshToken) {\n throw new Error('Developer Portal session changed while refreshing; discarding the result.');\n }\n\n store.set(next);\n return next;\n };\n\n const clear = () => store.set(null);\n\n const credential = createDeveloperPortalCredential({\n refresh,\n getTokens,\n refreshLeadTimeMs,\n onSessionExpired: () => {\n clear();\n onSessionExpired?.();\n },\n });\n\n const client = createDeveloperPortalClient({\n baseUrl,\n middlewares,\n authMiddleware: createDeveloperPortalAuthMiddleware(credential),\n });\n\n // `refreshTokens` is not re-exposed: rotating outside the store would leave the session holding\n // tokens the server has moved past. `session.refresh()` is the supported way.\n const { refreshTokens: _storeBypassingRotation, ...auth } = client.auth;\n\n const api = {\n ...client,\n auth: {\n ...auth,\n logout: async (signal?: AbortSignal) =>\n client.auth.logout(requireTokens('sign-out').accessToken, signal),\n // Both MFA calls bypass the reactive 401 path, so rotate proactively first.\n setupMfa: async (signal?: AbortSignal) => {\n await credential.getIdToken();\n const { token, accessToken } = requireTokens('MFA enrolment');\n return client.auth.setupMfa({ idToken: token, accessToken }, signal);\n },\n confirmMfa: async (code: string, signal?: AbortSignal) => {\n await credential.getIdToken();\n const { token, accessToken } = requireTokens('MFA confirmation');\n return client.auth.confirmMfa({ idToken: token, accessToken, code }, signal);\n },\n },\n };\n\n const session = {\n set: (result: LoginSuccess) => {\n store.set({\n token: result.token,\n accessToken: result.accessToken,\n refreshToken: result.refreshToken,\n });\n },\n get: getTokens,\n subscribe: store.subscribe,\n clear,\n /** Rotates if the id token is inside the lead time. Best-effort; the 401 path is the guarantee. */\n ensureFresh: async (): Promise<void> => {\n await credential.getIdToken();\n },\n /**\n * Rotates now, for a change of *claims* rather than age — leaving a vendor is the case that\n * matters, since the stale `profile` claim keeps scoping requests to a vendor the user just left.\n * Propagates failure: a caller forcing this needs to know whether the claims actually changed.\n */\n refresh: async (): Promise<void> => {\n await credential.getIdToken({ forceRefresh: true });\n },\n isAuthenticated: () => store.get() !== null,\n };\n\n return { api, session };\n};\n\nexport type DeveloperPortalSdk = ReturnType<typeof createDeveloperPortalSdk>;\nexport type DeveloperPortalSession = DeveloperPortalSdk['session'];\n"],"mappings":";;;;;;;;;;;;;;AAOA,MAAa,mBAAmB,UAAiC;CAC/D,MAAM,WAAW,MAAM,MAAM,GAAG;CAChC,IAAI,SAAS,WAAW,GAAG,OAAO;CAElC,MAAM,UAAU,SAAS;CACzB,IAAI,YAAY,KAAA,KAAa,YAAY,IAAI,OAAO;CAEpD,IAAI;EAEF,MAAM,SAAS,QAAQ,WAAW,KAAK,GAAG,CAAC,CAAC,WAAW,KAAK,GAAG;EAC/D,MAAM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"index.cjs","names":["isUnauthorized","dedupe","HttpHeader","isUnauthorized","createStore","createDeveloperPortalClient"],"sources":["../../../src/sdks/developerPortal/tokenExpiry.ts","../../../src/sdks/developerPortal/credential.ts","../../../src/sdks/developerPortal/middleware.ts","../../../src/sdks/developerPortal/developerPortalSdk.ts"],"sourcesContent":["/**\n * Reads a JWT's `exp` claim as milliseconds, or `null` when unparseable (\"expiry unknown\", which the\n * caller leaves to the 401 path). A read, not a verification.\n *\n * Needed because apps-api reports `expiresIn` on login but never on refresh, so it cannot keep a\n * proactive-refresh clock honest past the first rotation. The token always carries its own expiry.\n */\nexport const readTokenExpiry = (token: string): number | null => {\n const segments = token.split('.');\n if (segments.length !== 3) return null;\n\n const payload = segments[1];\n if (payload === undefined || payload === '') return null;\n\n try {\n // base64url -> base64, and re-pad: `atob` requires padding, base64url omits it.\n const base64 = payload.replaceAll('-', '+').replaceAll('_', '/');\n const padded = base64.padEnd(base64.length + ((4 - (base64.length % 4)) % 4), '=');\n const claims: unknown = JSON.parse(atob(padded));\n if (typeof claims !== 'object' || claims === null || !('exp' in claims)) return null;\n const { exp } = claims as { exp: unknown };\n if (typeof exp !== 'number' || !Number.isFinite(exp)) return null;\n return exp * 1000;\n } catch {\n return null;\n }\n};\n","import type { DeveloperPortalTokens } from '../../clients/developerPortal/tokens';\nimport { isUnauthorized } from '../../keboola/bearer/credential';\nimport { dedupe } from '../../utils';\n\nimport { readTokenExpiry } from './tokenExpiry';\n\ntype Options = {\n refresh: () => Promise<DeveloperPortalTokens>;\n /** Live read from the session, so this holds no token of its own. `null` when signed out. */\n getTokens: () => DeveloperPortalTokens | null;\n /** May fire more than once; the caller owns any fire-once latch. */\n onSessionExpired?: () => void;\n /**\n * An absolute lead time rather than `createBearerCredential`'s fractional threshold: that needs the\n * token's full lifetime, and apps-api reports `expiresIn` on login only, never on refresh.\n */\n refreshLeadTimeMs?: number;\n};\n\nconst DEFAULT_REFRESH_LEAD_TIME_MS = 5 * 60 * 1000;\n\nexport type DeveloperPortalCredential = {\n getIdToken: (options?: { forceRefresh?: boolean }) => Promise<string | null>;\n getTokens: () => DeveloperPortalTokens | null;\n notifyExpired: () => void;\n};\n\n/** Mirrors `createBearerCredential`, over the id token of the trio. */\nexport const createDeveloperPortalCredential = ({\n refresh,\n getTokens,\n onSessionExpired,\n refreshLeadTimeMs = DEFAULT_REFRESH_LEAD_TIME_MS,\n}: Options): DeveloperPortalCredential => {\n const doRefresh = async (): Promise<DeveloperPortalTokens> => {\n try {\n return await refresh();\n } catch (error) {\n // Only a 401 means the refresh token is dead. Signing out over a 5xx would be a self-inflicted\n // logout, so anything else propagates without expiring the session.\n if (isUnauthorized(error)) onSessionExpired?.();\n throw error;\n }\n };\n\n // N concurrent 401s must cause one rotation: each extra one invalidates the tokens the others got.\n const refreshShared = dedupe(doRefresh);\n\n const getIdToken = async ({ forceRefresh = false } = {}): Promise<string | null> => {\n const tokens = getTokens();\n if (tokens === null) return null;\n if (forceRefresh) return (await refreshShared()).token;\n\n const expiresAt = readTokenExpiry(tokens.token);\n // Unknown expiry is left to the 401 path; a `0` here would rotate on every request.\n if (expiresAt === null) return tokens.token;\n if (Date.now() < expiresAt - refreshLeadTimeMs) return tokens.token;\n\n // Proactive rotation is best-effort — a real 401 drives the mandatory one.\n return refreshShared()\n .then((fresh) => fresh.token)\n .catch(() => tokens.token);\n };\n\n return { getIdToken, getTokens, notifyExpired: () => onSessionExpired?.() };\n};\n","import { HttpHeader, type MiddlewareFn } from '../../fetchClient';\nimport { isUnauthorized } from '../../keboola/bearer/credential';\n\nimport type { DeveloperPortalCredential } from './credential';\n\n/**\n * Stamps the id token, and on a 401 force-refreshes and replays once. Mirrors\n * `createBearerAuthMiddleware`, minus the `Bearer ` prefix apps-api does not use.\n *\n * An anonymous session passes through unstamped, so a failed login is never read as session expiry.\n */\nexport const createDeveloperPortalAuthMiddleware = (\n credential: DeveloperPortalCredential,\n): MiddlewareFn => {\n return (next) => async (request) => {\n const token = await credential.getIdToken();\n if (token === null) return next(request);\n\n // Cloned before the first attempt consumes the body. Cloning the `Request` carries a binary or\n // FormData payload through byte-for-byte.\n const retryRequest = request.request.clone();\n request.request.headers.set(HttpHeader.AUTHORIZATION, token);\n\n try {\n return await next(request);\n } catch (error) {\n if (!isUnauthorized(error)) throw error;\n\n const refreshed = await credential.getIdToken({ forceRefresh: true }).catch(() => null);\n // Nothing to replay with, because a concurrent sign-out landed or the rotation failed. The\n // caller's request failed with a 401, so that is what they see.\n if (refreshed === null) throw error;\n retryRequest.headers.set(HttpHeader.AUTHORIZATION, refreshed);\n\n try {\n return await next({ ...request, request: retryRequest });\n } catch (retryError) {\n if (isUnauthorized(retryError)) credential.notifyExpired();\n throw retryError;\n }\n }\n };\n};\n","import { createDeveloperPortalClient } from '../../clients/developerPortal/developerPortalClient';\nimport type { DeveloperPortalTokens } from '../../clients/developerPortal/tokens';\nimport type { LoginSuccess } from '../../clients/developerPortal/types';\nimport type { MiddlewareFn } from '../../fetchClient';\nimport { createStore } from '../../utils';\n\nimport { createDeveloperPortalCredential } from './credential';\nimport { createDeveloperPortalAuthMiddleware } from './middleware';\n\nexport type DeveloperPortalSdkOptions = {\n baseUrl: string;\n /** Session to restore on construction — e.g. a trio read back out of `localStorage`. */\n tokens?: DeveloperPortalTokens | null;\n /** Persistence hook, fired on sign-in, every rotation, and with `null` on sign-out or expiry. */\n onTokensChange?: (tokens: DeveloperPortalTokens | null) => void;\n /** The session is dead; tokens are already cleared. The consumer redirects to sign-in. */\n onSessionExpired?: () => void;\n refreshLeadTimeMs?: number;\n middlewares?: MiddlewareFn[];\n};\n\n/**\n * `createDeveloperPortalClient` plus the session that keeps it authenticated: the token store, the\n * credential, the auth middleware, and the tokens the four self-authenticating endpoints need.\n *\n * It constructs its client rather than receiving one like `createTagSdk` does, because the middleware\n * needs the credential, the credential needs the session, and the session needs a client to rotate\n * with. `createKeboola` closes the same cycle the same way, and stays separate from this one because\n * apps-api is its own identity domain.\n */\nexport const createDeveloperPortalSdk = ({\n baseUrl,\n tokens: initialTokens = null,\n onTokensChange,\n onSessionExpired,\n refreshLeadTimeMs,\n middlewares = [],\n}: DeveloperPortalSdkOptions) => {\n const store = createStore<DeveloperPortalTokens | null>(initialTokens);\n store.subscribe((value) => onTokensChange?.(value));\n\n const getTokens = () => store.get();\n\n const requireTokens = (action: string): DeveloperPortalTokens => {\n const tokens = store.get();\n if (tokens === null) {\n throw new Error(`Developer Portal: ${action} requires a signed-in session.`);\n }\n return tokens;\n };\n\n // No auth middleware: `refreshTokens` sets its own header, so a rotation cannot recurse into the\n // middleware that triggered it.\n const refreshClient = createDeveloperPortalClient({ baseUrl, middlewares });\n\n const refresh = async (): Promise<DeveloperPortalTokens> => {\n const before = store.get();\n if (before === null) {\n throw new Error('Cannot refresh the Developer Portal session: signed out.');\n }\n\n const { token, accessToken } = await refreshClient.auth.refreshTokens(before.refreshToken);\n const next: DeveloperPortalTokens = { token, accessToken, refreshToken: before.refreshToken };\n\n // Sign-out wins over an in-flight rotation: without this, a `clear()` that lands while the request\n // is on the wire is undone by the response, silently signing the user back in.\n const after = store.get();\n if (after === null || after.refreshToken !== before.refreshToken) {\n throw new Error('Developer Portal session changed while refreshing; discarding the result.');\n }\n\n store.set(next);\n return next;\n };\n\n const clear = () => store.set(null);\n\n const credential = createDeveloperPortalCredential({\n refresh,\n getTokens,\n refreshLeadTimeMs,\n onSessionExpired: () => {\n clear();\n onSessionExpired?.();\n },\n });\n\n const client = createDeveloperPortalClient({\n baseUrl,\n middlewares,\n authMiddleware: createDeveloperPortalAuthMiddleware(credential),\n });\n\n // `refreshTokens` is not re-exposed: rotating outside the store would leave the session holding\n // tokens the server has moved past. `session.refresh()` is the supported way.\n const { refreshTokens: _storeBypassingRotation, ...auth } = client.auth;\n\n const api = {\n ...client,\n auth: {\n ...auth,\n logout: async (signal?: AbortSignal) =>\n client.auth.logout(requireTokens('sign-out').accessToken, signal),\n // Both MFA calls bypass the reactive 401 path, so rotate proactively first.\n setupMfa: async (signal?: AbortSignal) => {\n await credential.getIdToken();\n const { token, accessToken } = requireTokens('MFA enrolment');\n return client.auth.setupMfa({ idToken: token, accessToken }, signal);\n },\n confirmMfa: async (code: string, signal?: AbortSignal) => {\n await credential.getIdToken();\n const { token, accessToken } = requireTokens('MFA confirmation');\n return client.auth.confirmMfa({ idToken: token, accessToken, code }, signal);\n },\n },\n };\n\n const session = {\n set: (result: LoginSuccess) => {\n store.set({\n token: result.token,\n accessToken: result.accessToken,\n refreshToken: result.refreshToken,\n });\n },\n get: getTokens,\n subscribe: store.subscribe,\n clear,\n /** Rotates if the id token is inside the lead time. Best-effort; the 401 path is the guarantee. */\n ensureFresh: async (): Promise<void> => {\n await credential.getIdToken();\n },\n /**\n * Rotates now, for a change of *claims* rather than age — leaving a vendor is the case that\n * matters, since the stale `profile` claim keeps scoping requests to a vendor the user just left.\n * Propagates failure: a caller forcing this needs to know whether the claims actually changed.\n */\n refresh: async (): Promise<void> => {\n await credential.getIdToken({ forceRefresh: true });\n },\n isAuthenticated: () => store.get() !== null,\n };\n\n return { api, session };\n};\n\nexport type DeveloperPortalSdk = ReturnType<typeof createDeveloperPortalSdk>;\nexport type DeveloperPortalSession = DeveloperPortalSdk['session'];\n"],"mappings":";;;;;;;;;;;;;;AAOA,MAAa,mBAAmB,UAAiC;CAC/D,MAAM,WAAW,MAAM,MAAM,GAAG;CAChC,IAAI,SAAS,WAAW,GAAG,OAAO;CAElC,MAAM,UAAU,SAAS;CACzB,IAAI,YAAY,KAAA,KAAa,YAAY,IAAI,OAAO;CAEpD,IAAI;EAEF,MAAM,SAAS,QAAQ,WAAW,KAAK,GAAG,CAAC,CAAC,WAAW,KAAK,GAAG;EAC/D,MAAM,SAAS,OAAO,OAAO,OAAO,UAAW,IAAK,OAAO,SAAS,KAAM,GAAI,GAAG;EACjF,MAAM,SAAkB,KAAK,MAAM,KAAK,MAAM,CAAC;EAC/C,IAAI,OAAO,WAAW,YAAY,WAAW,QAAQ,EAAE,SAAS,SAAS,OAAO;EAChF,M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tB,MAAM;GACN,mBAAmB;EACrB;CACF,CAAC;CAED,MAAM,SAASA,8BAAAA,4BAA4B;EACzC;EACA;EACA,gBAAgB,oCAAoC,UAAU;CAChE,CAAC;CAID,MAAM,EAAE,eAAe,yBAAyB,GAAG,SAAS,OAAO;CAgDnE,OAAO;EAAE,KAAA;GA7CP,GAAG;GACH,MAAM;IACJ,GAAG;IACH,QAAQ,OAAO,WACb,OAAO,KAAK,OAAO,cAAc,UAAU,CAAC,CAAC,aAAa,MAAM;IAElE,UAAU,OAAO,WAAyB;KACxC,MAAM,WAAW,WAAW;KAC5B,MAAM,EAAE,OAAO,gBAAgB,cAAc,eAAe;KAC5D,OAAO,OAAO,KAAK,SAAS;MAAE,SAAS;MAAO;KAAY,GAAG,MAAM;IACrE;IACA,YAAY,OAAO,MAAc,WAAyB;KACxD,MAAM,WAAW,WAAW;KAC5B,MAAM,EAAE,OAAO,gBAAgB,cAAc,kBAAkB;KAC/D,OAAO,OAAO,KAAK,WAAW;MAAE,SAAS;MAAO;MAAa;KAAK,GAAG,MAAM;IAC7E;GACF;EA6BS;EAAG,SAAA;GAzBZ,MAAM,WAAyB;IAC7B,MAAM,IAAI;KACR,OAAO,OAAO;KACd,aAAa,OAAO;KACpB,cAAc,OAAO;IACvB,CAAC;GACH;GACA,KAAK;GACL,WAAW,MAAM;GACjB;;GAEA,aAAa,YAA2B;IACtC,MAAM,WAAW,WAAW;GAC9B;;;;;;GAMA,SAAS,YAA2B;IAClC,MAAM,WAAW,WAAW,EAAE,cAAc,KAAK,CAAC;GACpD;GACA,uBAAuB,MAAM,IAAI,MAAM;EAGrB;CAAE;AACxB"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { A as ResetPasswordConfirmInput, E as PaginationQuery, F as UpdateAppAsAdminInput, I as UpdateAppInput, L as UpdateVendorAsAdminInput, N as SignUpInput, R as UpdateVendorInput, S as LoginSuccess, W as components, _ as GetVendorUsersQuery, b as LoginInput, c as ConfirmAccountInput, d as CreateVendorAsAdminInput, f as CreateVendorInput, g as GetChangesQuery, h as GetAppsQuery, k as RejectAppInput, l as CreateAppInput, p as DeprecateAppInput, s as ApproveVendorInput, t as AdminPaginationQuery, u as CreateServiceAccountInput } from "../../types-
|
|
3
|
-
import { t as DeveloperPortalTokens } from "../../index-
|
|
1
|
+
import { E as MiddlewareFn } from "../../index-DhVFuQDv.cjs";
|
|
2
|
+
import { A as ResetPasswordConfirmInput, E as PaginationQuery, F as UpdateAppAsAdminInput, I as UpdateAppInput, L as UpdateVendorAsAdminInput, N as SignUpInput, R as UpdateVendorInput, S as LoginSuccess, W as components, _ as GetVendorUsersQuery, b as LoginInput, c as ConfirmAccountInput, d as CreateVendorAsAdminInput, f as CreateVendorInput, g as GetChangesQuery, h as GetAppsQuery, k as RejectAppInput, l as CreateAppInput, p as DeprecateAppInput, s as ApproveVendorInput, t as AdminPaginationQuery, u as CreateServiceAccountInput } from "../../types-B6JJCta-.cjs";
|
|
3
|
+
import { t as DeveloperPortalTokens } from "../../index-exNi3I2Q.cjs";
|
|
4
|
+
import { n as Listener } from "../../emitter-dLF1Fyfg.cjs";
|
|
4
5
|
//#region src/sdks/developerPortal/developerPortalSdk.d.ts
|
|
5
6
|
type DeveloperPortalSdkOptions = {
|
|
6
7
|
baseUrl: string;
|
|
@@ -1351,7 +1352,7 @@ declare const createDeveloperPortalSdk: ({ baseUrl, tokens: initialTokens, onTok
|
|
|
1351
1352
|
session: {
|
|
1352
1353
|
set: (result: LoginSuccess) => void;
|
|
1353
1354
|
get: () => DeveloperPortalTokens | null;
|
|
1354
|
-
subscribe: (listener:
|
|
1355
|
+
subscribe: (listener: Listener<DeveloperPortalTokens | null>) => () => void;
|
|
1355
1356
|
clear: () => void;
|
|
1356
1357
|
/** Rotates if the id token is inside the lead time. Best-effort; the 401 path is the guarantee. */
|
|
1357
1358
|
ensureFresh: () => Promise<void>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { A as ResetPasswordConfirmInput, E as PaginationQuery, F as UpdateAppAsAdminInput, I as UpdateAppInput, L as UpdateVendorAsAdminInput, N as SignUpInput, R as UpdateVendorInput, S as LoginSuccess, W as components, _ as GetVendorUsersQuery, b as LoginInput, c as ConfirmAccountInput, d as CreateVendorAsAdminInput, f as CreateVendorInput, g as GetChangesQuery, h as GetAppsQuery, k as RejectAppInput, l as CreateAppInput, p as DeprecateAppInput, s as ApproveVendorInput, t as AdminPaginationQuery, u as CreateServiceAccountInput } from "../../types-
|
|
3
|
-
import { t as DeveloperPortalTokens } from "../../index-
|
|
1
|
+
import { E as MiddlewareFn } from "../../index-DVhTNwvu.js";
|
|
2
|
+
import { A as ResetPasswordConfirmInput, E as PaginationQuery, F as UpdateAppAsAdminInput, I as UpdateAppInput, L as UpdateVendorAsAdminInput, N as SignUpInput, R as UpdateVendorInput, S as LoginSuccess, W as components, _ as GetVendorUsersQuery, b as LoginInput, c as ConfirmAccountInput, d as CreateVendorAsAdminInput, f as CreateVendorInput, g as GetChangesQuery, h as GetAppsQuery, k as RejectAppInput, l as CreateAppInput, p as DeprecateAppInput, s as ApproveVendorInput, t as AdminPaginationQuery, u as CreateServiceAccountInput } from "../../types-DHqIJKwx.js";
|
|
3
|
+
import { t as DeveloperPortalTokens } from "../../index-ChMtULt4.js";
|
|
4
|
+
import { n as Listener } from "../../emitter-dLF1Fyfg.js";
|
|
4
5
|
//#region src/sdks/developerPortal/developerPortalSdk.d.ts
|
|
5
6
|
type DeveloperPortalSdkOptions = {
|
|
6
7
|
baseUrl: string;
|
|
@@ -1351,7 +1352,7 @@ declare const createDeveloperPortalSdk: ({ baseUrl, tokens: initialTokens, onTok
|
|
|
1351
1352
|
session: {
|
|
1352
1353
|
set: (result: LoginSuccess) => void;
|
|
1353
1354
|
get: () => DeveloperPortalTokens | null;
|
|
1354
|
-
subscribe: (listener:
|
|
1355
|
+
subscribe: (listener: Listener<DeveloperPortalTokens | null>) => () => void;
|
|
1355
1356
|
clear: () => void;
|
|
1356
1357
|
/** Rotates if the id token is inside the lead time. Best-effort; the 401 path is the guarantee. */
|
|
1357
1358
|
ensureFresh: () => Promise<void>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as dedupe } from "../../dedupe-DYIHgZoG.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { n as isUnauthorized } from "../../credential-
|
|
5
|
-
import { t as createDeveloperPortalClient } from "../../developerPortalClient-
|
|
2
|
+
import { t as createStore } from "../../store-C9FQCHGe.js";
|
|
3
|
+
import { s as HttpHeader } from "../../createFetchClient-DdyZMhxO.js";
|
|
4
|
+
import { n as isUnauthorized } from "../../credential-Bxv7yxOZ.js";
|
|
5
|
+
import { t as createDeveloperPortalClient } from "../../developerPortalClient-jk46sjwP.js";
|
|
6
6
|
//#region src/sdks/developerPortal/tokenExpiry.ts
|
|
7
7
|
/**
|
|
8
8
|
* Reads a JWT's `exp` claim as milliseconds, or `null` when unparseable ("expiry unknown", which the
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_jobStatus = require("../../jobStatus-
|
|
2
|
+
const require_jobStatus = require("../../jobStatus-0_Y3Sr4i.cjs");
|
|
3
3
|
const require_QueryJobTimeoutError = require("../../QueryJobTimeoutError-CVNPdCWX.cjs");
|
|
4
4
|
const require_ValidationError = require("../../ValidationError-h5qvwahi.cjs");
|
|
5
5
|
//#region src/sdks/queryService/queryServiceSdk.ts
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as createQueryServiceSdk, n as ExecuteQueryOptions, r as WaitForJobOptions } from "../../index-
|
|
1
|
+
import { i as createQueryServiceSdk, n as ExecuteQueryOptions, r as WaitForJobOptions } from "../../index-DIVvL54G.cjs";
|
|
2
2
|
export { ExecuteQueryOptions, WaitForJobOptions, createQueryServiceSdk };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as createQueryServiceSdk, n as ExecuteQueryOptions, r as WaitForJobOptions } from "../../index-
|
|
1
|
+
import { i as createQueryServiceSdk, n as ExecuteQueryOptions, r as WaitForJobOptions } from "../../index-B0V1pJAa.js";
|
|
2
2
|
export { ExecuteQueryOptions, WaitForJobOptions, createQueryServiceSdk };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as poll, t as jobStatus } from "../../jobStatus-
|
|
1
|
+
import { i as poll, t as jobStatus } from "../../jobStatus-PSZJMTiA.js";
|
|
2
2
|
import { r as QueryJobError, t as QueryJobTimeoutError } from "../../QueryJobTimeoutError-C7JbNGOM.js";
|
|
3
3
|
import { t as ValidationError } from "../../ValidationError-CzPWydEb.js";
|
|
4
4
|
//#region src/sdks/queryService/queryServiceSdk.ts
|