@keboola/api-client 31.0.0 → 32.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 +11 -5
- package/API-SURFACE.md +1 -1
- package/CHANGELOG.md +105 -0
- package/README.md +45 -19
- package/dist/{ManagementClientAuthError-DFhi5yxe.cjs → ManagementClientAuthError-B-tyPlyG.cjs} +2 -2
- package/dist/{ManagementClientAuthError-DFhi5yxe.cjs.map → ManagementClientAuthError-B-tyPlyG.cjs.map} +1 -1
- package/dist/{ManagementClientAuthError-90pvsej0.js → ManagementClientAuthError-BAFNvOdf.js} +2 -2
- package/dist/{ManagementClientAuthError-90pvsej0.js.map → ManagementClientAuthError-BAFNvOdf.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-hQdKt_8J.d.cts → appLogs-BAaaGYKg.d.cts} +2 -2
- package/dist/{appLogs-CLHhkQJn.js → appLogs-DTLE6HTy.js} +2 -2
- package/dist/{appLogs-CLHhkQJn.js.map → appLogs-DTLE6HTy.js.map} +1 -1
- package/dist/{appLogs-BdMG6Cvn.d.ts → appLogs-DX_WTBCa.d.ts} +2 -2
- package/dist/{appLogs-BCCi02w6.cjs → appLogs-NIEDTDHf.cjs} +2 -2
- package/dist/{appLogs-BCCi02w6.cjs.map → appLogs-NIEDTDHf.cjs.map} +1 -1
- 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 +1 -1
- package/dist/auth/types.d.ts +1 -1
- package/dist/{auth-DmgTH0uY.cjs → auth-DP-6TFiM.cjs} +2 -2
- package/dist/{auth-DmgTH0uY.cjs.map → auth-DP-6TFiM.cjs.map} +1 -1
- package/dist/{auth-CE6Hlc9W.js → auth-DtbQaeDj.js} +2 -2
- package/dist/{auth-CE6Hlc9W.js.map → auth-DtbQaeDj.js.map} +1 -1
- package/dist/{authClient-XBAUz9g-.js → authClient--BtZgjIc.js} +5 -5
- package/dist/{authClient-XBAUz9g-.js.map → authClient--BtZgjIc.js.map} +1 -1
- package/dist/{authClient-Bc_bDisO.d.ts → authClient-CtfyVHRD.d.ts} +4 -4
- package/dist/{authClient-BL6h78Q1.d.cts → authClient-DhfzOUaa.d.cts} +4 -4
- package/dist/{authClient-Cixa8_L1.cjs → authClient-b7uec7sw.cjs} +5 -5
- package/dist/{authClient-Cixa8_L1.cjs.map → authClient-b7uec7sw.cjs.map} +1 -1
- package/dist/chat/index.cjs +3 -3
- package/dist/chat/index.d.cts +2 -7
- package/dist/chat/index.d.ts +2 -7
- 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/{configurations-CujCwDcB.cjs → configurations-Ck-mNB_E.cjs} +2 -2
- package/dist/{configurations-CujCwDcB.cjs.map → configurations-Ck-mNB_E.cjs.map} +1 -1
- package/dist/{configurations-DCOJONZZ.cjs → configurations-CqwAxiQL.cjs} +5 -1
- package/dist/configurations-CqwAxiQL.cjs.map +1 -0
- package/dist/{configurations-Byt59bIa.js → configurations-ZwBXilW-.js} +2 -2
- package/dist/{configurations-Byt59bIa.js.map → configurations-ZwBXilW-.js.map} +1 -1
- package/dist/{configurations-iCbhe0tb.js → configurations-d7SZmw69.js} +5 -1
- package/dist/configurations-d7SZmw69.js.map +1 -0
- package/dist/constants/index.cjs +2 -1
- package/dist/constants/index.d.cts +3 -2
- package/dist/constants/index.d.ts +3 -2
- package/dist/constants/index.js +2 -2
- package/dist/{constants-qeWGfk_7.js → constants-ByEwVtGf.js} +38 -2
- package/dist/constants-ByEwVtGf.js.map +1 -0
- package/dist/{constants-CkAVvuUq.cjs → constants-lIfSdTzS.cjs} +43 -1
- package/dist/constants-lIfSdTzS.cjs.map +1 -0
- package/dist/{createFetchClient-B9Cv0W9f.cjs → createFetchClient-BRfTjBLV.cjs} +15 -10
- package/dist/createFetchClient-BRfTjBLV.cjs.map +1 -0
- package/dist/{createFetchClient-B1h3-p65.js → createFetchClient-BbG46bL0.js} +15 -10
- package/dist/createFetchClient-BbG46bL0.js.map +1 -0
- package/dist/{createGenericFetchClient-DhpvUSlX.js → createGenericFetchClient-BHYQLZhe.js} +2 -2
- package/dist/{createGenericFetchClient-DhpvUSlX.js.map → createGenericFetchClient-BHYQLZhe.js.map} +1 -1
- package/dist/{createGenericFetchClient-BWoSkTki.cjs → createGenericFetchClient-DHs-i7_O.cjs} +2 -2
- package/dist/{createGenericFetchClient-BWoSkTki.cjs.map → createGenericFetchClient-DHs-i7_O.cjs.map} +1 -1
- package/dist/{createOpenapiFetchClient-0_oqhdPv.js → createOpenapiFetchClient-Bn6_Pn0H.js} +2 -2
- package/dist/{createOpenapiFetchClient-0_oqhdPv.js.map → createOpenapiFetchClient-Bn6_Pn0H.js.map} +1 -1
- package/dist/{createOpenapiFetchClient-yirrW6Tg.cjs → createOpenapiFetchClient-CyDUFxHB.cjs} +2 -2
- package/dist/{createOpenapiFetchClient-yirrW6Tg.cjs.map → createOpenapiFetchClient-CyDUFxHB.cjs.map} +1 -1
- package/dist/{credential-D-tX9gP4.cjs → credential-DOXH7XRS.cjs} +2 -2
- package/dist/{credential-D-tX9gP4.cjs.map → credential-DOXH7XRS.cjs.map} +1 -1
- package/dist/{credential-dKxArMic.js → credential-d2RDcXRB.js} +2 -2
- package/dist/{credential-dKxArMic.js.map → credential-d2RDcXRB.js.map} +1 -1
- package/dist/dataScience/index.cjs +2 -2
- package/dist/dataScience/index.d.cts +2 -2
- package/dist/dataScience/index.d.ts +2 -2
- package/dist/dataScience/index.js +2 -2
- package/dist/dataScience/types.d.cts +2 -2
- package/dist/dataScience/types.d.ts +2 -2
- package/dist/{dataScience-jdbSSPYF.js → dataScience-Sm8iONhP.js} +5 -5
- package/dist/{dataScience-jdbSSPYF.js.map → dataScience-Sm8iONhP.js.map} +1 -1
- package/dist/{dataScience-BqNWX-Gr.cjs → dataScience-wexHEIue.cjs} +5 -5
- package/dist/{dataScience-BqNWX-Gr.cjs.map → dataScience-wexHEIue.cjs.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-B7lNR5q0.cjs → developerPortalClient-CgTSzLoG.cjs} +3 -3
- package/dist/{developerPortalClient-B7lNR5q0.cjs.map → developerPortalClient-CgTSzLoG.cjs.map} +1 -1
- package/dist/{developerPortalClient-5ABcxz1U.js → developerPortalClient-DywKpDlW.js} +3 -3
- package/dist/{developerPortalClient-5ABcxz1U.js.map → developerPortalClient-DywKpDlW.js.map} +1 -1
- package/dist/domain/permissions/index.cjs +63 -1
- package/dist/domain/permissions/index.cjs.map +1 -0
- package/dist/domain/permissions/index.d.cts +52 -3
- package/dist/domain/permissions/index.d.ts +52 -3
- package/dist/domain/permissions/index.js +59 -2
- package/dist/domain/permissions/index.js.map +1 -0
- 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/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-CXHppAxd.cjs → import-C0-y1GQK.cjs} +3 -3
- package/dist/{import-CXHppAxd.cjs.map → import-C0-y1GQK.cjs.map} +1 -1
- package/dist/{import-CExRbskw.js → import-SQuurg1G.js} +3 -3
- package/dist/{import-CExRbskw.js.map → import-SQuurg1G.js.map} +1 -1
- package/dist/{index-BfVv8isU.d.cts → index-BKh0prif.d.cts} +4 -4
- package/dist/{index-CMb0ygwb.d.ts → index-Bc_hXWae.d.ts} +3 -3
- package/dist/{index-7RvXnXmd.d.ts → index-Bg1P6Bb2.d.ts} +6 -6
- package/dist/{index-cu8THqZV.d.cts → index-Bjk-tCpG.d.cts} +547 -3073
- package/dist/{index-CwJE18PJ.d.cts → index-C7e3wBt9.d.cts} +3 -3
- package/dist/{index-B-frWtGW.d.cts → index-CQrKS7PV.d.cts} +5 -2
- package/dist/{index-CR9LsDaG.d.cts → index-CXtdQ7be.d.cts} +4 -4
- package/dist/{index-Ds8e0l7-.d.ts → index-CeJOmN-P.d.ts} +5 -2
- package/dist/{index-DeMDxHTz.d.ts → index-Ctqkm3Fx.d.ts} +4 -4
- package/dist/{index-B6q7HxKJ.d.cts → index-D_7yCRKy.d.cts} +4 -4
- package/dist/{index-J1I2HlSm.d.ts → index-Dbzjvy5h.d.ts} +5 -5
- package/dist/{index-NicJZIzu.d.ts → index-DeKPpYQy.d.ts} +3 -3
- package/dist/{index-C9mAoXF6.d.cts → index-DiHHyMEo.d.cts} +6 -6
- package/dist/{index-BSjfVDTr.d.cts → index-DqOAjqxN.d.cts} +5 -5
- package/dist/{index-BR2Fu-Wo.d.ts → index-FhKX7Cv1.d.ts} +547 -3073
- package/dist/{index-Daks5CeX.d.ts → index-GDdFZCXp.d.ts} +4 -4
- package/dist/{index-Cpjh05sx.d.cts → index-Gn1H63Hk.d.cts} +4 -4
- package/dist/{index--pxLseaw.d.cts → index-NaYLwG_h.d.cts} +143 -2
- package/dist/{index--pxLseaw.d.ts → index-NaYLwG_h.d.ts} +143 -2
- package/dist/{index-D_TnbEtp.d.cts → index-eAlN694c.d.cts} +3 -3
- package/dist/{index-CW4VC9oN.d.ts → index-fHfc_VqS.d.ts} +4 -4
- package/dist/{index-CYMAwD3E.d.ts → index-tKsiUarj.d.ts} +4 -4
- package/dist/index.cjs +44 -232
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +43 -232
- package/dist/index.js.map +1 -1
- package/dist/kaiAgent/index.cjs +3 -0
- package/dist/kaiAgent/index.d.cts +210 -0
- package/dist/kaiAgent/index.d.ts +210 -0
- package/dist/kaiAgent/index.js +2 -0
- package/dist/kaiAgent/types.cjs +0 -0
- package/dist/kaiAgent/types.d.cts +2 -0
- package/dist/kaiAgent/types.d.ts +2 -0
- package/dist/kaiAgent/types.js +1 -0
- package/dist/kaiAgent-4OiIK1C2.cjs +222 -0
- package/dist/kaiAgent-4OiIK1C2.cjs.map +1 -0
- package/dist/kaiAgent-HDaFS9BR.js +217 -0
- package/dist/kaiAgent-HDaFS9BR.js.map +1 -0
- package/dist/management/index.cjs +1 -1
- package/dist/management/index.d.cts +1 -1
- package/dist/management/index.d.ts +1 -1
- package/dist/management/index.js +1 -1
- package/dist/management/types.d.cts +1 -1
- package/dist/management/types.d.ts +1 -1
- package/dist/{management-Cc8mKfnf.js → management-CIFhu1Nm.js} +5 -5
- package/dist/{management-Cc8mKfnf.js.map → management-CIFhu1Nm.js.map} +1 -1
- package/dist/{management-DlVdxzPw.cjs → management-DfjwQo7z.cjs} +5 -5
- package/dist/{management-DlVdxzPw.cjs.map → management-DfjwQo7z.cjs.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-CNf1412Z.js → metastore-CrXkKufo.js} +4 -4
- package/dist/{metastore-CNf1412Z.js.map → metastore-CrXkKufo.js.map} +1 -1
- package/dist/{metastore-DbsxqjhS.cjs → metastore-Dq2NS6jb.cjs} +4 -4
- package/dist/{metastore-DbsxqjhS.cjs.map → metastore-Dq2NS6jb.cjs.map} +1 -1
- package/dist/microsoftGraph/index.cjs +92 -0
- package/dist/microsoftGraph/index.cjs.map +1 -0
- package/dist/microsoftGraph/index.d.cts +305 -0
- package/dist/microsoftGraph/index.d.ts +305 -0
- package/dist/microsoftGraph/index.js +90 -0
- package/dist/microsoftGraph/index.js.map +1 -0
- package/dist/microsoftGraph/types.cjs +0 -0
- package/dist/microsoftGraph/types.d.cts +10 -0
- package/dist/microsoftGraph/types.d.ts +10 -0
- package/dist/microsoftGraph/types.js +1 -0
- 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-ClksaYRY.js → oauth-CFwSNz37.js} +5 -5
- package/dist/{oauth-ClksaYRY.js.map → oauth-CFwSNz37.js.map} +1 -1
- package/dist/{oauth-DsZgmtPj.cjs → oauth-CkW5gln-.cjs} +5 -5
- package/dist/{oauth-DsZgmtPj.cjs.map → oauth-CkW5gln-.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-5SLw86eZ.d.ts → project-BOGaVs-q.d.ts} +2 -2
- package/dist/{project-CRrsxSAK.d.cts → project-BnQkL8cb.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-DxUUkTcy.cjs → queryService-BLaGbpm-.cjs} +5 -5
- package/dist/{queryService-DxUUkTcy.cjs.map → queryService-BLaGbpm-.cjs.map} +1 -1
- package/dist/{queryService-BlyAcBxP.js → queryService-DK-jUnET.js} +5 -5
- package/dist/{queryService-BlyAcBxP.js.map → queryService-DK-jUnET.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-CpcqeMPz.cjs → queue-B7TY4JLf.cjs} +4 -4
- package/dist/{queue-CpcqeMPz.cjs.map → queue-B7TY4JLf.cjs.map} +1 -1
- package/dist/{queue-DpZTm7U7.js → queue-DViSQ-eq.js} +4 -4
- package/dist/{queue-DpZTm7U7.js.map → queue-DViSQ-eq.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/schema-D1oxyn1O.d.cts +8760 -0
- package/dist/schema-D1oxyn1O.d.ts +8760 -0
- package/dist/sdk/configurations/index.cjs +1 -1
- package/dist/sdk/configurations/index.d.cts +4 -4
- package/dist/sdk/configurations/index.d.ts +4 -4
- package/dist/sdk/configurations/index.js +1 -1
- package/dist/sdk/developerPortal/index.cjs +3 -3
- package/dist/sdk/developerPortal/index.d.cts +3 -3
- package/dist/sdk/developerPortal/index.d.ts +3 -3
- package/dist/sdk/developerPortal/index.js +3 -3
- package/dist/sdk/queryService/index.d.cts +1 -1
- package/dist/sdk/queryService/index.d.ts +1 -1
- package/dist/sdk/semanticLayer/index.d.cts +1 -1
- package/dist/sdk/semanticLayer/index.d.ts +1 -1
- package/dist/sdk/semanticLayer/types.d.cts +1 -1
- package/dist/sdk/semanticLayer/types.d.ts +1 -1
- package/dist/sdk/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/serviceIds-fHLDwOg9.d.cts +31 -0
- package/dist/serviceIds-fHLDwOg9.d.ts +31 -0
- package/dist/status/index.cjs +1 -1
- package/dist/status/index.d.cts +1 -1
- package/dist/status/index.d.ts +1 -1
- package/dist/status/index.js +1 -1
- package/dist/storage/index.cjs +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 +4 -3
- package/dist/storage/types.d.ts +4 -3
- package/dist/{storage-vnH64B_Q.cjs → storage-CihHwZ7z.cjs} +149 -160
- package/dist/storage-CihHwZ7z.cjs.map +1 -0
- package/dist/{storage-CQxu0EY3.js → storage-kgxscFEg.js} +149 -160
- package/dist/storage-kgxscFEg.js.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-AgFiMjRS.js → syncActions-B75t0NwP.js} +5 -5
- package/dist/{syncActions-AgFiMjRS.js.map → syncActions-B75t0NwP.js.map} +1 -1
- package/dist/{syncActions-DPcAPYgJ.cjs → syncActions-CevF_TEb.cjs} +5 -5
- package/dist/{syncActions-DPcAPYgJ.cjs.map → syncActions-CevF_TEb.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-BLgaYEvi.cjs → telemetry-DwlSLVAU.cjs} +3 -3
- package/dist/{telemetry-BLgaYEvi.cjs.map → telemetry-DwlSLVAU.cjs.map} +1 -1
- package/dist/{telemetry-CPiGWpLi.js → telemetry-FXpodtJN.js} +3 -3
- package/dist/{telemetry-CPiGWpLi.js.map → telemetry-FXpodtJN.js.map} +1 -1
- package/dist/{types-DQOOWgLt.d.cts → types-Av2egS_l.d.ts} +408 -24
- package/dist/{types-ca-YNg1r.d.cts → types-B2vmg_UF.d.cts} +3 -3
- package/dist/{types-CuAoZH8w.d.cts → types-B4jdPHoL.d.cts} +2 -2
- package/dist/{types-DSBNqF1J.d.cts → types-BH9ljNmj.d.cts} +2 -2
- package/dist/{types-CFhAduFK.d.cts → types-BI2jI-3-.d.cts} +3 -3
- package/dist/types-BMQW-2Yw.d.ts +2804 -0
- package/dist/{types-BdKtW2Ml.d.cts → types-BREGN3qo.d.cts} +2 -2
- package/dist/{types-B1S60aS2.d.ts → types-BTbczawY.d.ts} +2 -2
- package/dist/{types-DG_FlLJt.d.cts → types-BV2BDccJ.d.cts} +247 -430
- package/dist/{types-Bc3-a3DT.d.cts → types-BZBdLUpH.d.ts} +2 -2
- package/dist/{types-DWUd__fe.d.ts → types-BlCoTm7n.d.ts} +2 -2
- package/dist/{types-Drk7PEhk.d.ts → types-BnaAo7xn.d.ts} +2 -2
- package/dist/{types-BXnUqdBB.d.cts → types-BoV9M5Xg.d.cts} +2 -2
- package/dist/{types-Co8WobOo.d.ts → types-Bpnpa2Wt.d.ts} +3 -3
- package/dist/{types-D7YGPUsm.d.ts → types-BptQ7jpP.d.cts} +408 -24
- package/dist/{types-COFrOmuO.d.ts → types-ByWD2oeV.d.ts} +2 -2
- package/dist/{types-C2p7JYQ3.d.cts → types-C1vhYcic.d.cts} +2 -2
- package/dist/{types-B2Al1BNh.d.ts → types-C2CLlR4i.d.ts} +2 -2
- package/dist/{types-eP06LqcE.d.cts → types-CGH_lfxS.d.cts} +2 -16
- package/dist/{types-By47HWwB.d.cts → types-CJHi0zdD.d.cts} +2 -2
- package/dist/{types-C0bGZqFI.d.cts → types-COIsNoTQ.d.cts} +2 -2
- package/dist/{types-DkoyCUqv.d.ts → types-COc-nind.d.cts} +2 -2
- package/dist/{types-CIybfUJ9.d.cts → types-CPanB0p7.d.cts} +3 -3
- package/dist/{types-DnOGCb-p.d.cts → types-CXTqFYah.d.ts} +6 -6
- package/dist/{types-sTH4KiPc.d.cts → types-CcuG9cid.d.cts} +2 -2
- package/dist/{types-RmbvQimP.d.ts → types-Cj4bLPp5.d.cts} +6 -6
- package/dist/{types-Culr5v8R.d.ts → types-CkcMoXRk.d.ts} +3 -3
- package/dist/{types-BvXODdf5.d.ts → types-CpALS017.d.ts} +2 -16
- package/dist/{types-056giLrn.d.cts → types-CvkqEvhv.d.cts} +2 -2
- package/dist/{types-BJLRgXw0.d.ts → types-CyHZ1ZQe.d.ts} +2 -2
- package/dist/{types-DLazCdFR.d.cts → types-CyiRYRVq.d.cts} +3 -3
- package/dist/{types-CgF9R0Na.d.ts → types-Cz1dj_TM.d.ts} +2 -2
- package/dist/{types-DdeZK3BO.d.ts → types-D-qI9ne4.d.ts} +2 -2
- package/dist/{types-BIAP4CYp.d.cts → types-D1uloiuY.d.cts} +2 -2
- package/dist/{types-DMMMQuNt.d.ts → types-D6jKxUv_.d.ts} +247 -430
- package/dist/{types-CQd9PuKY.d.cts → types-DNXC_-fA.d.cts} +2 -2
- package/dist/{types-Dirp9mni.d.ts → types-DeSd3gqW.d.ts} +3 -3
- package/dist/{types-D5VvEdOv.d.ts → types-De_DA2ga.d.ts} +2 -2
- package/dist/{types-BMsK6T5k.d.ts → types-Dfc58bPE.d.ts} +2 -2
- package/dist/{types-DyIKgbGB.d.ts → types-Di8VIZwQ.d.ts} +2 -2
- package/dist/{types-B2El99VY.d.cts → types-DlbiVsVo.d.cts} +2 -2
- package/dist/types-DuiUN0h8.d.ts +33557 -0
- package/dist/{types-SX78XZZ0.d.ts → types-DwpRt3e9.d.ts} +2 -2
- package/dist/{types-lVXf05pr.d.ts → types-EJEoI3ZK.d.ts} +2 -2
- package/dist/types-GuWtMCMn.d.cts +33557 -0
- package/dist/{types-mXM8MrYS.d.cts → types-MbcIiKDI.d.cts} +3 -3
- package/dist/{types-BV74LS5r.d.ts → types-RfaldD4P.d.ts} +3 -3
- package/dist/{types-uP64XthM.d.cts → types-cDU_J45_.d.cts} +2 -2
- package/dist/{types-DN7RWWBw.d.ts → types-dybUhlU2.d.ts} +2 -2
- package/dist/types-iNlsdRkx.d.cts +2804 -0
- package/dist/{types-BHCigZFc.d.ts → types-sVYo0o9_.d.ts} +3 -3
- package/dist/{types-Bv5vw2dc.d.cts → types-zA3H84SM.d.cts} +2 -2
- package/dist/{validateConnectionStatus-CBhXmvWC.js → validateConnectionStatus-BrLXkoSI.js} +2 -2
- package/dist/{validateConnectionStatus-CBhXmvWC.js.map → validateConnectionStatus-BrLXkoSI.js.map} +1 -1
- package/dist/{validateConnectionStatus-DVHXGTdi.cjs → validateConnectionStatus-V9q6Nl6u.cjs} +2 -2
- package/dist/{validateConnectionStatus-DVHXGTdi.cjs.map → validateConnectionStatus-V9q6Nl6u.cjs.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 +54 -2
- package/surface/chat.md +1 -1
- package/surface/sdk.md +4 -4
- package/surface/storage.md +44 -44
- package/dist/configurations-DCOJONZZ.cjs.map +0 -1
- package/dist/configurations-iCbhe0tb.js.map +0 -1
- package/dist/constants-CkAVvuUq.cjs.map +0 -1
- package/dist/constants-qeWGfk_7.js.map +0 -1
- package/dist/createFetchClient-B1h3-p65.js.map +0 -1
- package/dist/createFetchClient-B9Cv0W9f.cjs.map +0 -1
- package/dist/storage-CQxu0EY3.js.map +0 -1
- package/dist/storage-vnH64B_Q.cjs.map +0 -1
- package/dist/types-CIJAtX8q.d.cts +0 -18784
- package/dist/types-X-gQF8F8.d.ts +0 -18784
|
@@ -73,13 +73,17 @@ function removeUndefined(obj) {
|
|
|
73
73
|
}
|
|
74
74
|
const JSON_MEDIA_TYPE = /^application\/([\w.-]+\+)?json$/;
|
|
75
75
|
const getMediaType = (response) => response.headers.get(HttpHeader.CONTENT_TYPE)?.split(";")[0]?.trim().toLowerCase() ?? "";
|
|
76
|
-
const
|
|
76
|
+
const parseJson = async (response) => {
|
|
77
|
+
const text = await response.text();
|
|
78
|
+
return text.trim() === "" ? null : JSON.parse(text);
|
|
79
|
+
};
|
|
80
|
+
const parseData = async (response, parseAs = "auto") => {
|
|
77
81
|
if (response.status === HttpStatus.NO_CONTENT) return null;
|
|
82
|
+
if (parseAs === "text") return response.text();
|
|
83
|
+
if (parseAs === "blob") return response.blob();
|
|
84
|
+
if (parseAs === "json") return parseJson(response);
|
|
78
85
|
const mediaType = getMediaType(response);
|
|
79
|
-
if (JSON_MEDIA_TYPE.test(mediaType))
|
|
80
|
-
const text = await response.text();
|
|
81
|
-
return text.trim() === "" ? null : JSON.parse(text);
|
|
82
|
-
}
|
|
86
|
+
if (JSON_MEDIA_TYPE.test(mediaType)) return parseJson(response);
|
|
83
87
|
if (mediaType === "application/octet-stream") return response.blob();
|
|
84
88
|
return response.text();
|
|
85
89
|
};
|
|
@@ -132,7 +136,7 @@ const parseContentDispositionHeader = (contentDisposition) => {
|
|
|
132
136
|
};
|
|
133
137
|
const createFetchRequest = ({ url, method, params, options = {}, defaultOptions }) => {
|
|
134
138
|
const { baseUrl, validateStatus: defValidateStatus = defaultValidateStatus, headers: defaultHeaders, fetchFn: defaultFetchFn, ...restDefaultOptions } = defaultOptions;
|
|
135
|
-
const { validateStatus, queryArrayFormat, headers: endpointHeaders, fetchFn, ...restOptions } = options;
|
|
139
|
+
const { validateStatus, queryArrayFormat, headers: endpointHeaders, fetchFn, parseAs, ...restOptions } = options;
|
|
136
140
|
const headers = createHeaders(defaultHeaders, endpointHeaders);
|
|
137
141
|
const path = createPath(url, params.path);
|
|
138
142
|
const search = createSearch(params.query ?? {}, { arrayFormat: queryArrayFormat });
|
|
@@ -148,7 +152,8 @@ const createFetchRequest = ({ url, method, params, options = {}, defaultOptions
|
|
|
148
152
|
body
|
|
149
153
|
}),
|
|
150
154
|
validateStatus: validateStatus ?? defValidateStatus,
|
|
151
|
-
fetchFn: fetchFn ?? defaultFetchFn
|
|
155
|
+
fetchFn: fetchFn ?? defaultFetchFn,
|
|
156
|
+
parseAs
|
|
152
157
|
};
|
|
153
158
|
};
|
|
154
159
|
//#endregion
|
|
@@ -156,12 +161,12 @@ const createFetchRequest = ({ url, method, params, options = {}, defaultOptions
|
|
|
156
161
|
const isApiError = (error) => error instanceof ApiError;
|
|
157
162
|
const isAbortError = (error) => error instanceof DOMException && error.name === "AbortError";
|
|
158
163
|
const isFetchClientError = (error) => error instanceof TypeError || error instanceof SyntaxError || isApiError(error);
|
|
159
|
-
const coreFetch = async ({ request, validateStatus, fetchFn = fetch }) => {
|
|
164
|
+
const coreFetch = async ({ request, validateStatus, fetchFn = fetch, parseAs }) => {
|
|
160
165
|
const response = await fetchFn(request);
|
|
161
166
|
const apiResponse = {
|
|
162
167
|
request,
|
|
163
168
|
response,
|
|
164
|
-
data: await parseData(response)
|
|
169
|
+
data: await parseData(response, parseAs)
|
|
165
170
|
};
|
|
166
171
|
const boolOrError = validateStatus(apiResponse);
|
|
167
172
|
if (isApiError(boolOrError)) throw boolOrError;
|
|
@@ -274,4 +279,4 @@ Object.defineProperty(exports, "parseContentDispositionHeader", {
|
|
|
274
279
|
}
|
|
275
280
|
});
|
|
276
281
|
|
|
277
|
-
//# sourceMappingURL=createFetchClient-
|
|
282
|
+
//# sourceMappingURL=createFetchClient-BRfTjBLV.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createFetchClient-BRfTjBLV.cjs","names":[],"sources":["../src/errors/ApiError.ts","../src/internal.ts","../src/fetchClient/createFetchClient/utils.ts","../src/fetchClient/createFetchClient/createFetchClient.ts"],"sourcesContent":["import type { ApiResponse } from '../fetchClient/createFetchClient/types';\n\nexport class ApiError extends Error {\n response: Response;\n request: Request;\n data: unknown;\n\n constructor({ response, request, data }: ApiResponse) {\n super(response.statusText);\n this.response = response;\n this.request = request;\n this.data = data;\n }\n}\n","// Package-internal constants. Not part of the public\n// `@keboola/api-client/constants` sub-path (that is the `constants/` directory).\n\nexport const KeboolaHttpHeader = {\n STORAGE_API_TOKEN: 'X-StorageApi-Token',\n MANAGEMENT_API_TOKEN: 'X-Kbc-Manageapitoken',\n STORAGE_API_URL: 'x-storageapi-url',\n PROJECT_ID: 'X-KBC-ProjectId',\n /** Storage job a request enqueued, reported on the response rather than in its body. */\n STORAGE_API_JOB_ID: 'X-StorageApi-Job-Id',\n} as const;\n\nexport const HttpStatus = {\n NO_CONTENT: 204,\n BAD_REQUEST: 400,\n UNAUTHORIZED: 401,\n UNPROCESSABLE_ENTITY: 422,\n INTERNAL_SERVER_ERROR: 500,\n BAD_GATEWAY: 502,\n SERVICE_UNAVAILABLE: 503,\n GATEWAY_TIMEOUT: 504,\n} as const;\n\nexport const ENCRYPTED_VALUE_PREFIX = 'KBC::';\n","import type { IStringifyOptions } from 'qs';\nimport qs from 'qs';\n\nimport { HttpStatus } from '../../internal';\n\nimport type {\n ApiResponse,\n BodyParam,\n CreateFetchRequestFn,\n ParseAs,\n PathParam,\n ValidateStatusFn,\n} from './types';\n\n/**\n * Strips trailing slashes from a base URL so concatenating a leading-slash\n * path (e.g. `/v2/storage`) never produces a double slash.\n *\n * Without this, callers that pass `https://connection.keboola.com/` end up\n * issuing requests to `https://connection.keboola.com//v2/storage/...`, which\n * the Storage API rejects with a 404.\n */\nexport const normalizeBaseUrl = (baseUrl: string): string => baseUrl.replace(/\\/+$/, '');\n\nexport const HttpHeader = {\n CONTENT_TYPE: 'content-type',\n CONTENT_DISPOSITION: 'content-disposition',\n AUTHORIZATION: 'Authorization',\n IDEMPOTENCY_KEY: 'Idempotency-Key',\n IF_MATCH: 'If-Match',\n};\n\nexport const HttpContentType = {\n JSON: 'application/json',\n TEXT_PLAIN: 'text/plain',\n FORM_DATA: 'multipart/form-data',\n TEXT_HTML: 'text/html',\n};\n\nexport const defaultValidateStatus: ValidateStatusFn = ({ response }) =>\n response.status >= 200 && response.status <= 299;\n\n/**\n * Whether a response carries an HTML document.\n *\n * - Media types are case-insensitive, so a `Text/HTML` login page is still one.\n * - Only meaningful on a *successful* response: HTML on a failed one is a real error page.\n */\nexport const isHtmlResponse = ({ response }: ApiResponse) =>\n !!response.headers\n .get(HttpHeader.CONTENT_TYPE)\n ?.toLowerCase()\n .includes(HttpContentType.TEXT_HTML);\n\nfunction removeUndefined(obj: Record<string, string>) {\n const objCopy = { ...obj };\n for (const [key, value] of Object.entries(objCopy)) {\n if (value == null) delete objCopy[key];\n }\n return objCopy;\n}\n\n// `application/json`, but also `application/json; charset=utf-8` and the `+json` suffix family.\n// Comparing the raw header for equality misses every response that carries a charset.\nconst JSON_MEDIA_TYPE = /^application\\/([\\w.-]+\\+)?json$/;\n\nconst getMediaType = (response: Response) =>\n response.headers.get(HttpHeader.CONTENT_TYPE)?.split(';')[0]?.trim().toLowerCase() ?? '';\n\n// Declared JSON is parsed strictly: a body that doesn't parse is a broken response, not a text\n// payload, and `JSON.parse` throwing is the right answer. Read it as text first only so an empty\n// body can resolve to `null` like a 204 — matching the charset form brings `application/json;\n// charset=utf-8` onto this path, where `response.json()` would turn a 200-with-no-body into a\n// `SyntaxError` it never used to be.\nconst parseJson = async (response: Response) => {\n const text = await response.text();\n return text.trim() === '' ? null : JSON.parse(text);\n};\n\nexport const parseData = async (response: Response, parseAs: ParseAs = 'auto') => {\n // No body to read, whatever the caller asked for.\n if (response.status === HttpStatus.NO_CONTENT) return null;\n\n // Per-method-call override\n if (parseAs === 'text') return response.text();\n if (parseAs === 'blob') return response.blob();\n if (parseAs === 'json') return parseJson(response);\n\n const mediaType = getMediaType(response);\n if (JSON_MEDIA_TYPE.test(mediaType)) return parseJson(response);\n\n // A declared binary payload must come back as bytes — `text()` would decode it as UTF-8 and\n // corrupt it. `application/octet-stream` is the only binary type an endpoint declares today\n // (kai-agent's sandbox file download); widen deliberately, never by sniffing.\n if (mediaType === 'application/octet-stream') return response.blob();\n\n // Any other declared type describes its own payload — the query-service CSV export, the\n // data-science `text/plain` endpoints — so hand back the exact bytes instead of sniffing them.\n return response.text();\n};\n\n// Header instance serialize undefined value as `undefined`, we do not want that\nconst cleanHeadersInit = (headersInit: HeadersInit | undefined) => {\n if (Array.isArray(headersInit)) return headersInit;\n if (headersInit instanceof Headers) return headersInit;\n if (headersInit == null) return headersInit;\n\n return removeUndefined(headersInit);\n};\n\nconst createHeaders = (\n headersInitA: HeadersInit | undefined,\n headersInitB: HeadersInit | undefined,\n) => {\n const headersA = new Headers(cleanHeadersInit(headersInitA));\n const headersB = new Headers(cleanHeadersInit(headersInitB));\n\n headersB.forEach((value, key) => {\n headersA.set(key, value);\n });\n\n return headersA;\n};\n\nexport const createPath = (path: string, pathParam: PathParam = {}) =>\n path.replace(/\\{([^}]+)}/g, (_, key) => {\n if (!(key in pathParam))\n throw new Error(`Path parameter \"${key}\" is missing in the path \"${path}\"`);\n\n return encodeURIComponent(pathParam[key]!);\n });\n\nexport const createSearch = (\n query: Record<string, unknown>,\n options: Pick<IStringifyOptions, 'arrayFormat'> = {},\n) => {\n return qs.stringify(query, {\n encodeValuesOnly: true,\n skipNulls: true,\n ...options,\n });\n};\n\nexport const createBody = (body: BodyParam, headers: Headers) => {\n if (body == null) return null;\n if (body instanceof FormData) return body; // fetch automatically sets content-type header\n if (typeof body === 'string') return body; // fetch automatically sets content-type header\n\n const stringifyBody = JSON.stringify(body);\n const stringBody = stringifyBody === '{}' ? null : stringifyBody;\n if (stringBody) headers.set(HttpHeader.CONTENT_TYPE, HttpContentType.JSON);\n\n return stringBody;\n};\n\nexport const parseContentDispositionHeader = (contentDisposition?: string | null) => {\n // extract the type ('inline' or 'attachment'), default the type to 'unknown'\n const type = (() => {\n const typeMatch = contentDisposition?.match(/^\\s*(inline|attachment)\\s*;/i);\n return (typeMatch?.[1]?.toLowerCase() ?? 'unknown') as 'inline' | 'attachment' | 'unknown';\n })();\n\n // extract the filename, default the type to null\n const filename = (() => {\n const filenameMatch = contentDisposition?.match(/filename=\"([^\"]+)\"/i);\n if (filenameMatch) return filenameMatch[1];\n\n // If no filename=\"...\", check for encoded filename*=UTF-8''\n const encodedFilenameMatch = contentDisposition?.match(/filename\\*=(?:UTF-8'')?([^;]+)/i);\n if (encodedFilenameMatch?.[1]) return decodeURIComponent(encodedFilenameMatch[1]);\n\n // Check for unquoted filenames (rare but possible)\n const unquotedFilenameMatch = contentDisposition?.match(/filename=([^;]+)/i);\n return unquotedFilenameMatch?.[1] ?? null;\n })();\n\n // Return the parsed result\n return { type, filename };\n};\n\nexport const createFetchRequest: CreateFetchRequestFn = ({\n url,\n method,\n params,\n options = {},\n defaultOptions,\n}) => {\n const {\n baseUrl,\n validateStatus: defValidateStatus = defaultValidateStatus,\n headers: defaultHeaders,\n fetchFn: defaultFetchFn,\n ...restDefaultOptions\n } = defaultOptions;\n const {\n validateStatus,\n queryArrayFormat,\n headers: endpointHeaders,\n fetchFn,\n parseAs,\n ...restOptions\n } = options;\n\n const headers = createHeaders(defaultHeaders, endpointHeaders);\n const path = createPath(url, params.path);\n const search = createSearch(params.query ?? {}, { arrayFormat: queryArrayFormat });\n const body = createBody(params.body, headers);\n\n const urlInstance = new URL(normalizeBaseUrl(baseUrl) + path);\n urlInstance.search = search;\n\n const request = new Request(urlInstance, {\n ...restDefaultOptions,\n ...restOptions,\n headers,\n method: method.toUpperCase(),\n body,\n });\n\n return {\n request,\n validateStatus: validateStatus ?? defValidateStatus,\n fetchFn: fetchFn ?? defaultFetchFn,\n parseAs,\n };\n};\n","import { ApiError } from '../../errors';\n\nimport type {\n BaseFetchParams,\n CoreFetchFn,\n CreateFetchClientOptions,\n FetchClientOptions,\n HttpMethod,\n} from './types';\nimport { createFetchRequest, parseData } from './utils';\n\nexport type FetchClientError = TypeError | ApiError | SyntaxError | DOMException;\n\nexport const isApiError = (error: unknown): error is ApiError => error instanceof ApiError;\n\nexport const isAbortError = (error: unknown): error is DOMException =>\n error instanceof DOMException && error.name === 'AbortError';\n\nexport const isFetchClientError = (error: unknown): error is FetchClientError =>\n error instanceof TypeError || error instanceof SyntaxError || isApiError(error);\n\n// `fetchFn` is resolved per request by `createFetchRequest` (endpoint option beats client option),\n// so a single request can swap the transport without rebuilding the client.\nconst coreFetch: CoreFetchFn = async ({ request, validateStatus, fetchFn = fetch, parseAs }) => {\n const response = await fetchFn(request);\n const data = await parseData(response, parseAs);\n\n const apiResponse = {\n request,\n response,\n data,\n };\n\n const boolOrError = validateStatus(apiResponse);\n if (isApiError(boolOrError)) throw boolOrError;\n if (!boolOrError) throw new ApiError(apiResponse);\n\n return apiResponse;\n};\n\nexport const createFetchClient = ({\n middlewares = [],\n ...defaultOptions\n}: CreateFetchClientOptions) => {\n const fetchWithMiddlewares = middlewares.reduceRight(\n (next, middleware) => middleware(next),\n coreFetch,\n );\n\n const createFetchMethod =\n (method: HttpMethod) =>\n async (url: string, params: BaseFetchParams, options: FetchClientOptions = {}) => {\n const request = createFetchRequest({\n url,\n method,\n params,\n defaultOptions,\n options,\n });\n\n const methodMiddlewares = options?.middlewares ?? [];\n\n return methodMiddlewares.reduceRight(\n (next, middleware) => middleware(next),\n fetchWithMiddlewares,\n )(request);\n };\n\n return {\n get: createFetchMethod('get'),\n post: createFetchMethod('post'),\n put: createFetchMethod('put'),\n patch: createFetchMethod('patch'),\n delete: createFetchMethod('delete'),\n };\n};\n"],"mappings":";;;;AAEA,IAAa,WAAb,cAA8B,MAAM;CAClC;CACA;CACA;CAEA,YAAY,EAAE,UAAU,SAAS,QAAqB;EACpD,MAAM,SAAS,UAAU;EACzB,KAAK,WAAW;EAChB,KAAK,UAAU;EACf,KAAK,OAAO;CACd;AACF;;;ACVA,MAAa,oBAAoB;CAC/B,mBAAmB;CACnB,sBAAsB;CACtB,iBAAiB;CACjB,YAAY;;CAEZ,oBAAoB;AACtB;AAEA,MAAa,aAAa;CACxB,YAAY;CACZ,aAAa;CACb,cAAc;CACd,sBAAsB;CACtB,uBAAuB;CACvB,aAAa;CACb,qBAAqB;CACrB,iBAAiB;AACnB;AAEA,MAAa,yBAAyB;;;;;;;;;;;ACDtC,MAAa,oBAAoB,YAA4B,QAAQ,QAAQ,QAAQ,EAAE;AAEvF,MAAa,aAAa;CACxB,cAAc;CACd,qBAAqB;CACrB,eAAe;CACf,iBAAiB;CACjB,UAAU;AACZ;AAEA,MAAa,kBAAkB;CAC7B,MAAM;CACN,YAAY;CACZ,WAAW;CACX,WAAW;AACb;AAEA,MAAa,yBAA2C,EAAE,eACxD,SAAS,UAAU,OAAO,SAAS,UAAU;;;;;;;AAQ/C,MAAa,kBAAkB,EAAE,eAC/B,CAAC,CAAC,SAAS,QACR,IAAI,WAAW,YAAY,CAAC,EAC3B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F,CAAC;EAID,QAF0B,SAAS,eAAe,CAAC,EAAA,CAE1B,aACtB,MAAM,eAAe,WAAW,IAAI,GACrC,oBACF,CAAC,CAAC,OAAO;CACX;CAEF,OAAO;EACL,KAAK,kBAAkB,KAAK;EAC5B,MAAM,kBAAkB,MAAM;EAC9B,KAAK,kBAAkB,KAAK;EAC5B,OAAO,kBAAkB,OAAO;EAChC,QAAQ,kBAAkB,QAAQ;CACpC;AACF"}
|
|
@@ -71,13 +71,17 @@ function removeUndefined(obj) {
|
|
|
71
71
|
}
|
|
72
72
|
const JSON_MEDIA_TYPE = /^application\/([\w.-]+\+)?json$/;
|
|
73
73
|
const getMediaType = (response) => response.headers.get(HttpHeader.CONTENT_TYPE)?.split(";")[0]?.trim().toLowerCase() ?? "";
|
|
74
|
-
const
|
|
74
|
+
const parseJson = async (response) => {
|
|
75
|
+
const text = await response.text();
|
|
76
|
+
return text.trim() === "" ? null : JSON.parse(text);
|
|
77
|
+
};
|
|
78
|
+
const parseData = async (response, parseAs = "auto") => {
|
|
75
79
|
if (response.status === HttpStatus.NO_CONTENT) return null;
|
|
80
|
+
if (parseAs === "text") return response.text();
|
|
81
|
+
if (parseAs === "blob") return response.blob();
|
|
82
|
+
if (parseAs === "json") return parseJson(response);
|
|
76
83
|
const mediaType = getMediaType(response);
|
|
77
|
-
if (JSON_MEDIA_TYPE.test(mediaType))
|
|
78
|
-
const text = await response.text();
|
|
79
|
-
return text.trim() === "" ? null : JSON.parse(text);
|
|
80
|
-
}
|
|
84
|
+
if (JSON_MEDIA_TYPE.test(mediaType)) return parseJson(response);
|
|
81
85
|
if (mediaType === "application/octet-stream") return response.blob();
|
|
82
86
|
return response.text();
|
|
83
87
|
};
|
|
@@ -130,7 +134,7 @@ const parseContentDispositionHeader = (contentDisposition) => {
|
|
|
130
134
|
};
|
|
131
135
|
const createFetchRequest = ({ url, method, params, options = {}, defaultOptions }) => {
|
|
132
136
|
const { baseUrl, validateStatus: defValidateStatus = defaultValidateStatus, headers: defaultHeaders, fetchFn: defaultFetchFn, ...restDefaultOptions } = defaultOptions;
|
|
133
|
-
const { validateStatus, queryArrayFormat, headers: endpointHeaders, fetchFn, ...restOptions } = options;
|
|
137
|
+
const { validateStatus, queryArrayFormat, headers: endpointHeaders, fetchFn, parseAs, ...restOptions } = options;
|
|
134
138
|
const headers = createHeaders(defaultHeaders, endpointHeaders);
|
|
135
139
|
const path = createPath(url, params.path);
|
|
136
140
|
const search = createSearch(params.query ?? {}, { arrayFormat: queryArrayFormat });
|
|
@@ -146,7 +150,8 @@ const createFetchRequest = ({ url, method, params, options = {}, defaultOptions
|
|
|
146
150
|
body
|
|
147
151
|
}),
|
|
148
152
|
validateStatus: validateStatus ?? defValidateStatus,
|
|
149
|
-
fetchFn: fetchFn ?? defaultFetchFn
|
|
153
|
+
fetchFn: fetchFn ?? defaultFetchFn,
|
|
154
|
+
parseAs
|
|
150
155
|
};
|
|
151
156
|
};
|
|
152
157
|
//#endregion
|
|
@@ -154,12 +159,12 @@ const createFetchRequest = ({ url, method, params, options = {}, defaultOptions
|
|
|
154
159
|
const isApiError = (error) => error instanceof ApiError;
|
|
155
160
|
const isAbortError = (error) => error instanceof DOMException && error.name === "AbortError";
|
|
156
161
|
const isFetchClientError = (error) => error instanceof TypeError || error instanceof SyntaxError || isApiError(error);
|
|
157
|
-
const coreFetch = async ({ request, validateStatus, fetchFn = fetch }) => {
|
|
162
|
+
const coreFetch = async ({ request, validateStatus, fetchFn = fetch, parseAs }) => {
|
|
158
163
|
const response = await fetchFn(request);
|
|
159
164
|
const apiResponse = {
|
|
160
165
|
request,
|
|
161
166
|
response,
|
|
162
|
-
data: await parseData(response)
|
|
167
|
+
data: await parseData(response, parseAs)
|
|
163
168
|
};
|
|
164
169
|
const boolOrError = validateStatus(apiResponse);
|
|
165
170
|
if (isApiError(boolOrError)) throw boolOrError;
|
|
@@ -189,4 +194,4 @@ const createFetchClient = ({ middlewares = [], ...defaultOptions }) => {
|
|
|
189
194
|
//#endregion
|
|
190
195
|
export { HttpContentType as a, isHtmlResponse as c, ENCRYPTED_VALUE_PREFIX as d, HttpStatus as f, isFetchClientError as i, normalizeBaseUrl as l, ApiError as m, isAbortError as n, HttpHeader as o, KeboolaHttpHeader as p, isApiError as r, defaultValidateStatus as s, createFetchClient as t, parseContentDispositionHeader as u };
|
|
191
196
|
|
|
192
|
-
//# sourceMappingURL=createFetchClient-
|
|
197
|
+
//# sourceMappingURL=createFetchClient-BbG46bL0.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createFetchClient-BbG46bL0.js","names":[],"sources":["../src/errors/ApiError.ts","../src/internal.ts","../src/fetchClient/createFetchClient/utils.ts","../src/fetchClient/createFetchClient/createFetchClient.ts"],"sourcesContent":["import type { ApiResponse } from '../fetchClient/createFetchClient/types';\n\nexport class ApiError extends Error {\n response: Response;\n request: Request;\n data: unknown;\n\n constructor({ response, request, data }: ApiResponse) {\n super(response.statusText);\n this.response = response;\n this.request = request;\n this.data = data;\n }\n}\n","// Package-internal constants. Not part of the public\n// `@keboola/api-client/constants` sub-path (that is the `constants/` directory).\n\nexport const KeboolaHttpHeader = {\n STORAGE_API_TOKEN: 'X-StorageApi-Token',\n MANAGEMENT_API_TOKEN: 'X-Kbc-Manageapitoken',\n STORAGE_API_URL: 'x-storageapi-url',\n PROJECT_ID: 'X-KBC-ProjectId',\n /** Storage job a request enqueued, reported on the response rather than in its body. */\n STORAGE_API_JOB_ID: 'X-StorageApi-Job-Id',\n} as const;\n\nexport const HttpStatus = {\n NO_CONTENT: 204,\n BAD_REQUEST: 400,\n UNAUTHORIZED: 401,\n UNPROCESSABLE_ENTITY: 422,\n INTERNAL_SERVER_ERROR: 500,\n BAD_GATEWAY: 502,\n SERVICE_UNAVAILABLE: 503,\n GATEWAY_TIMEOUT: 504,\n} as const;\n\nexport const ENCRYPTED_VALUE_PREFIX = 'KBC::';\n","import type { IStringifyOptions } from 'qs';\nimport qs from 'qs';\n\nimport { HttpStatus } from '../../internal';\n\nimport type {\n ApiResponse,\n BodyParam,\n CreateFetchRequestFn,\n ParseAs,\n PathParam,\n ValidateStatusFn,\n} from './types';\n\n/**\n * Strips trailing slashes from a base URL so concatenating a leading-slash\n * path (e.g. `/v2/storage`) never produces a double slash.\n *\n * Without this, callers that pass `https://connection.keboola.com/` end up\n * issuing requests to `https://connection.keboola.com//v2/storage/...`, which\n * the Storage API rejects with a 404.\n */\nexport const normalizeBaseUrl = (baseUrl: string): string => baseUrl.replace(/\\/+$/, '');\n\nexport const HttpHeader = {\n CONTENT_TYPE: 'content-type',\n CONTENT_DISPOSITION: 'content-disposition',\n AUTHORIZATION: 'Authorization',\n IDEMPOTENCY_KEY: 'Idempotency-Key',\n IF_MATCH: 'If-Match',\n};\n\nexport const HttpContentType = {\n JSON: 'application/json',\n TEXT_PLAIN: 'text/plain',\n FORM_DATA: 'multipart/form-data',\n TEXT_HTML: 'text/html',\n};\n\nexport const defaultValidateStatus: ValidateStatusFn = ({ response }) =>\n response.status >= 200 && response.status <= 299;\n\n/**\n * Whether a response carries an HTML document.\n *\n * - Media types are case-insensitive, so a `Text/HTML` login page is still one.\n * - Only meaningful on a *successful* response: HTML on a failed one is a real error page.\n */\nexport const isHtmlResponse = ({ response }: ApiResponse) =>\n !!response.headers\n .get(HttpHeader.CONTENT_TYPE)\n ?.toLowerCase()\n .includes(HttpContentType.TEXT_HTML);\n\nfunction removeUndefined(obj: Record<string, string>) {\n const objCopy = { ...obj };\n for (const [key, value] of Object.entries(objCopy)) {\n if (value == null) delete objCopy[key];\n }\n return objCopy;\n}\n\n// `application/json`, but also `application/json; charset=utf-8` and the `+json` suffix family.\n// Comparing the raw header for equality misses every response that carries a charset.\nconst JSON_MEDIA_TYPE = /^application\\/([\\w.-]+\\+)?json$/;\n\nconst getMediaType = (response: Response) =>\n response.headers.get(HttpHeader.CONTENT_TYPE)?.split(';')[0]?.trim().toLowerCase() ?? '';\n\n// Declared JSON is parsed strictly: a body that doesn't parse is a broken response, not a text\n// payload, and `JSON.parse` throwing is the right answer. Read it as text first only so an empty\n// body can resolve to `null` like a 204 — matching the charset form brings `application/json;\n// charset=utf-8` onto this path, where `response.json()` would turn a 200-with-no-body into a\n// `SyntaxError` it never used to be.\nconst parseJson = async (response: Response) => {\n const text = await response.text();\n return text.trim() === '' ? null : JSON.parse(text);\n};\n\nexport const parseData = async (response: Response, parseAs: ParseAs = 'auto') => {\n // No body to read, whatever the caller asked for.\n if (response.status === HttpStatus.NO_CONTENT) return null;\n\n // Per-method-call override\n if (parseAs === 'text') return response.text();\n if (parseAs === 'blob') return response.blob();\n if (parseAs === 'json') return parseJson(response);\n\n const mediaType = getMediaType(response);\n if (JSON_MEDIA_TYPE.test(mediaType)) return parseJson(response);\n\n // A declared binary payload must come back as bytes — `text()` would decode it as UTF-8 and\n // corrupt it. `application/octet-stream` is the only binary type an endpoint declares today\n // (kai-agent's sandbox file download); widen deliberately, never by sniffing.\n if (mediaType === 'application/octet-stream') return response.blob();\n\n // Any other declared type describes its own payload — the query-service CSV export, the\n // data-science `text/plain` endpoints — so hand back the exact bytes instead of sniffing them.\n return response.text();\n};\n\n// Header instance serialize undefined value as `undefined`, we do not want that\nconst cleanHeadersInit = (headersInit: HeadersInit | undefined) => {\n if (Array.isArray(headersInit)) return headersInit;\n if (headersInit instanceof Headers) return headersInit;\n if (headersInit == null) return headersInit;\n\n return removeUndefined(headersInit);\n};\n\nconst createHeaders = (\n headersInitA: HeadersInit | undefined,\n headersInitB: HeadersInit | undefined,\n) => {\n const headersA = new Headers(cleanHeadersInit(headersInitA));\n const headersB = new Headers(cleanHeadersInit(headersInitB));\n\n headersB.forEach((value, key) => {\n headersA.set(key, value);\n });\n\n return headersA;\n};\n\nexport const createPath = (path: string, pathParam: PathParam = {}) =>\n path.replace(/\\{([^}]+)}/g, (_, key) => {\n if (!(key in pathParam))\n throw new Error(`Path parameter \"${key}\" is missing in the path \"${path}\"`);\n\n return encodeURIComponent(pathParam[key]!);\n });\n\nexport const createSearch = (\n query: Record<string, unknown>,\n options: Pick<IStringifyOptions, 'arrayFormat'> = {},\n) => {\n return qs.stringify(query, {\n encodeValuesOnly: true,\n skipNulls: true,\n ...options,\n });\n};\n\nexport const createBody = (body: BodyParam, headers: Headers) => {\n if (body == null) return null;\n if (body instanceof FormData) return body; // fetch automatically sets content-type header\n if (typeof body === 'string') return body; // fetch automatically sets content-type header\n\n const stringifyBody = JSON.stringify(body);\n const stringBody = stringifyBody === '{}' ? null : stringifyBody;\n if (stringBody) headers.set(HttpHeader.CONTENT_TYPE, HttpContentType.JSON);\n\n return stringBody;\n};\n\nexport const parseContentDispositionHeader = (contentDisposition?: string | null) => {\n // extract the type ('inline' or 'attachment'), default the type to 'unknown'\n const type = (() => {\n const typeMatch = contentDisposition?.match(/^\\s*(inline|attachment)\\s*;/i);\n return (typeMatch?.[1]?.toLowerCase() ?? 'unknown') as 'inline' | 'attachment' | 'unknown';\n })();\n\n // extract the filename, default the type to null\n const filename = (() => {\n const filenameMatch = contentDisposition?.match(/filename=\"([^\"]+)\"/i);\n if (filenameMatch) return filenameMatch[1];\n\n // If no filename=\"...\", check for encoded filename*=UTF-8''\n const encodedFilenameMatch = contentDisposition?.match(/filename\\*=(?:UTF-8'')?([^;]+)/i);\n if (encodedFilenameMatch?.[1]) return decodeURIComponent(encodedFilenameMatch[1]);\n\n // Check for unquoted filenames (rare but possible)\n const unquotedFilenameMatch = contentDisposition?.match(/filename=([^;]+)/i);\n return unquotedFilenameMatch?.[1] ?? null;\n })();\n\n // Return the parsed result\n return { type, filename };\n};\n\nexport const createFetchRequest: CreateFetchRequestFn = ({\n url,\n method,\n params,\n options = {},\n defaultOptions,\n}) => {\n const {\n baseUrl,\n validateStatus: defValidateStatus = defaultValidateStatus,\n headers: defaultHeaders,\n fetchFn: defaultFetchFn,\n ...restDefaultOptions\n } = defaultOptions;\n const {\n validateStatus,\n queryArrayFormat,\n headers: endpointHeaders,\n fetchFn,\n parseAs,\n ...restOptions\n } = options;\n\n const headers = createHeaders(defaultHeaders, endpointHeaders);\n const path = createPath(url, params.path);\n const search = createSearch(params.query ?? {}, { arrayFormat: queryArrayFormat });\n const body = createBody(params.body, headers);\n\n const urlInstance = new URL(normalizeBaseUrl(baseUrl) + path);\n urlInstance.search = search;\n\n const request = new Request(urlInstance, {\n ...restDefaultOptions,\n ...restOptions,\n headers,\n method: method.toUpperCase(),\n body,\n });\n\n return {\n request,\n validateStatus: validateStatus ?? defValidateStatus,\n fetchFn: fetchFn ?? defaultFetchFn,\n parseAs,\n };\n};\n","import { ApiError } from '../../errors';\n\nimport type {\n BaseFetchParams,\n CoreFetchFn,\n CreateFetchClientOptions,\n FetchClientOptions,\n HttpMethod,\n} from './types';\nimport { createFetchRequest, parseData } from './utils';\n\nexport type FetchClientError = TypeError | ApiError | SyntaxError | DOMException;\n\nexport const isApiError = (error: unknown): error is ApiError => error instanceof ApiError;\n\nexport const isAbortError = (error: unknown): error is DOMException =>\n error instanceof DOMException && error.name === 'AbortError';\n\nexport const isFetchClientError = (error: unknown): error is FetchClientError =>\n error instanceof TypeError || error instanceof SyntaxError || isApiError(error);\n\n// `fetchFn` is resolved per request by `createFetchRequest` (endpoint option beats client option),\n// so a single request can swap the transport without rebuilding the client.\nconst coreFetch: CoreFetchFn = async ({ request, validateStatus, fetchFn = fetch, parseAs }) => {\n const response = await fetchFn(request);\n const data = await parseData(response, parseAs);\n\n const apiResponse = {\n request,\n response,\n data,\n };\n\n const boolOrError = validateStatus(apiResponse);\n if (isApiError(boolOrError)) throw boolOrError;\n if (!boolOrError) throw new ApiError(apiResponse);\n\n return apiResponse;\n};\n\nexport const createFetchClient = ({\n middlewares = [],\n ...defaultOptions\n}: CreateFetchClientOptions) => {\n const fetchWithMiddlewares = middlewares.reduceRight(\n (next, middleware) => middleware(next),\n coreFetch,\n );\n\n const createFetchMethod =\n (method: HttpMethod) =>\n async (url: string, params: BaseFetchParams, options: FetchClientOptions = {}) => {\n const request = createFetchRequest({\n url,\n method,\n params,\n defaultOptions,\n options,\n });\n\n const methodMiddlewares = options?.middlewares ?? [];\n\n return methodMiddlewares.reduceRight(\n (next, middleware) => middleware(next),\n fetchWithMiddlewares,\n )(request);\n };\n\n return {\n get: createFetchMethod('get'),\n post: createFetchMethod('post'),\n put: createFetchMethod('put'),\n patch: createFetchMethod('patch'),\n delete: createFetchMethod('delete'),\n };\n};\n"],"mappings":";;AAEA,IAAa,WAAb,cAA8B,MAAM;CAClC;CACA;CACA;CAEA,YAAY,EAAE,UAAU,SAAS,QAAqB;EACpD,MAAM,SAAS,UAAU;EACzB,KAAK,WAAW;EAChB,KAAK,UAAU;EACf,KAAK,OAAO;CACd;AACF;;;ACVA,MAAa,oBAAoB;CAC/B,mBAAmB;CACnB,sBAAsB;CACtB,iBAAiB;CACjB,YAAY;;CAEZ,oBAAoB;AACtB;AAEA,MAAa,aAAa;CACxB,YAAY;CACZ,aAAa;CACb,cAAc;CACd,sBAAsB;CACtB,uBAAuB;CACvB,aAAa;CACb,qBAAqB;CACrB,iBAAiB;AACnB;AAEA,MAAa,yBAAyB;;;;;;;;;;;ACDtC,MAAa,oBAAoB,YAA4B,QAAQ,QAAQ,QAAQ,EAAE;AAEvF,MAAa,aAAa;CACxB,cAAc;CACd,qBAAqB;CACrB,eAAe;CACf,iBAAiB;CACjB,UAAU;AACZ;AAEA,MAAa,kBAAkB;CAC7B,MAAM;CACN,YAAY;CACZ,WAAW;CACX,WAAW;AACb;AAEA,MAAa,yBAA2C,EAAE,eACxD,SAAS,UAAU,OAAO,SAAS,UAAU;;;;;;;AAQ/C,MAAa,kBAAkB,EAAE,eAC/B,CAAC,CAAC,SAAS,QACR,IAAI,WAAW,YAAY,CAAC,EAC3B,YAAY,CAAC,CACd,SAAS,gBAAgB,SAAS;AAEvC,SAAS,gBAAgB,KAA6B;CACpD,MAAM,UAAU,EAAE,GAAG,IAAI;CACzB,KAAK,MAAM,CAAC,KAAK,UAAU,OAAO,QAAQ,OAAO,GAC/C,IAAI,SAAS,MAAM,OAAO,QA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AkB,KAAK;EAC5B,OAAO,kBAAkB,OAAO;EAChC,QAAQ,kBAAkB,QAAQ;CACpC;AACF"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as createFetchClient } from "./createFetchClient-
|
|
1
|
+
import { t as createFetchClient } from "./createFetchClient-BbG46bL0.js";
|
|
2
2
|
//#region src/fetchClient/createGenericFetchClient.ts
|
|
3
3
|
const createGenericFetchClient = (defaultOptions) => createFetchClient(defaultOptions);
|
|
4
4
|
//#endregion
|
|
5
5
|
export { createGenericFetchClient as t };
|
|
6
6
|
|
|
7
|
-
//# sourceMappingURL=createGenericFetchClient-
|
|
7
|
+
//# sourceMappingURL=createGenericFetchClient-BHYQLZhe.js.map
|
package/dist/{createGenericFetchClient-DhpvUSlX.js.map → createGenericFetchClient-BHYQLZhe.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createGenericFetchClient-
|
|
1
|
+
{"version":3,"file":"createGenericFetchClient-BHYQLZhe.js","names":[],"sources":["../src/fetchClient/createGenericFetchClient.ts"],"sourcesContent":["import type {\n ApiResponse,\n BodyParam,\n CreateFetchClientOptions,\n FetchClientOptions,\n PathParam,\n QueryParam,\n} from './createFetchClient';\nimport { createFetchClient } from './createFetchClient';\n\ntype FetchParams<Path = PathParam, Query = QueryParam, Body = BodyParam> = {\n path?: Path;\n query?: Query;\n body?: Body;\n};\n\ntype FetchMethod = <Data, Path = PathParam, Query = QueryParam, Body = BodyParam>(\n url: string,\n params: FetchParams<Path, Query, Body>,\n options?: FetchClientOptions,\n) => Promise<ApiResponse<Data>>;\n\ntype FetchClient = {\n get: FetchMethod;\n post: FetchMethod;\n put: FetchMethod;\n patch: FetchMethod;\n delete: FetchMethod;\n};\n\nexport const createGenericFetchClient = (defaultOptions: CreateFetchClientOptions) =>\n createFetchClient(defaultOptions) as FetchClient;\n"],"mappings":";;AA8BA,MAAa,4BAA4B,mBACvC,kBAAkB,cAAc"}
|
package/dist/{createGenericFetchClient-BWoSkTki.cjs → createGenericFetchClient-DHs-i7_O.cjs}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_createFetchClient = require("./createFetchClient-
|
|
1
|
+
const require_createFetchClient = require("./createFetchClient-BRfTjBLV.cjs");
|
|
2
2
|
//#region src/fetchClient/createGenericFetchClient.ts
|
|
3
3
|
const createGenericFetchClient = (defaultOptions) => require_createFetchClient.createFetchClient(defaultOptions);
|
|
4
4
|
//#endregion
|
|
@@ -9,4 +9,4 @@ Object.defineProperty(exports, "createGenericFetchClient", {
|
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
11
|
|
|
12
|
-
//# sourceMappingURL=createGenericFetchClient-
|
|
12
|
+
//# sourceMappingURL=createGenericFetchClient-DHs-i7_O.cjs.map
|
package/dist/{createGenericFetchClient-BWoSkTki.cjs.map → createGenericFetchClient-DHs-i7_O.cjs.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createGenericFetchClient-
|
|
1
|
+
{"version":3,"file":"createGenericFetchClient-DHs-i7_O.cjs","names":["createFetchClient"],"sources":["../src/fetchClient/createGenericFetchClient.ts"],"sourcesContent":["import type {\n ApiResponse,\n BodyParam,\n CreateFetchClientOptions,\n FetchClientOptions,\n PathParam,\n QueryParam,\n} from './createFetchClient';\nimport { createFetchClient } from './createFetchClient';\n\ntype FetchParams<Path = PathParam, Query = QueryParam, Body = BodyParam> = {\n path?: Path;\n query?: Query;\n body?: Body;\n};\n\ntype FetchMethod = <Data, Path = PathParam, Query = QueryParam, Body = BodyParam>(\n url: string,\n params: FetchParams<Path, Query, Body>,\n options?: FetchClientOptions,\n) => Promise<ApiResponse<Data>>;\n\ntype FetchClient = {\n get: FetchMethod;\n post: FetchMethod;\n put: FetchMethod;\n patch: FetchMethod;\n delete: FetchMethod;\n};\n\nexport const createGenericFetchClient = (defaultOptions: CreateFetchClientOptions) =>\n createFetchClient(defaultOptions) as FetchClient;\n"],"mappings":";;AA8BA,MAAa,4BAA4B,mBACvCA,0BAAAA,kBAAkB,cAAc"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as createFetchClient } from "./createFetchClient-
|
|
1
|
+
import { t as createFetchClient } from "./createFetchClient-BbG46bL0.js";
|
|
2
2
|
//#region src/fetchClient/createOpenapiFetchClient.ts
|
|
3
3
|
const createOpenapiFetchClient = (defaultOptions) => createFetchClient(defaultOptions);
|
|
4
4
|
//#endregion
|
|
5
5
|
export { createOpenapiFetchClient as t };
|
|
6
6
|
|
|
7
|
-
//# sourceMappingURL=createOpenapiFetchClient-
|
|
7
|
+
//# sourceMappingURL=createOpenapiFetchClient-Bn6_Pn0H.js.map
|
package/dist/{createOpenapiFetchClient-0_oqhdPv.js.map → createOpenapiFetchClient-Bn6_Pn0H.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createOpenapiFetchClient-
|
|
1
|
+
{"version":3,"file":"createOpenapiFetchClient-Bn6_Pn0H.js","names":[],"sources":["../src/fetchClient/createOpenapiFetchClient.ts"],"sourcesContent":["import {\n type ApiResponse,\n createFetchClient,\n type CreateFetchClientOptions,\n type FetchClientOptions,\n type HttpMethod,\n} from './createFetchClient';\nimport type { OpenapiParametersType, OpenapiReturnType } from './types';\n\ntype OpenapiPaths<Paths> = {\n [P in keyof Paths]: {\n [M in HttpMethod]?: unknown;\n };\n};\n\ntype PathsWithMethod<Paths extends OpenapiPaths<Paths>, PathnameMethod extends HttpMethod> = {\n [Pathname in keyof Paths]: Paths[Pathname] extends {\n [K in PathnameMethod]: any;\n }\n ? Pathname\n : never;\n}[keyof Paths];\n\ntype FetchMethod<Paths extends OpenapiPaths<Paths>, Method extends HttpMethod> = <\n Path extends PathsWithMethod<Paths, Method>,\n>(\n url: Path,\n params: OpenapiParametersType<Paths[Path][Method]>,\n options?: FetchClientOptions,\n) => Promise<ApiResponse<OpenapiReturnType<Paths[Path][Method]>>>;\n\ntype FetchClient<Paths extends OpenapiPaths<Paths>> = {\n get: FetchMethod<Paths, 'get'>;\n post: FetchMethod<Paths, 'post'>;\n put: FetchMethod<Paths, 'put'>;\n patch: FetchMethod<Paths, 'patch'>;\n delete: FetchMethod<Paths, 'delete'>;\n};\n\nexport const createOpenapiFetchClient = <Paths extends OpenapiPaths<Paths>>(\n defaultOptions: CreateFetchClientOptions,\n) => createFetchClient(defaultOptions) as FetchClient<Paths>;\n"],"mappings":";;AAuCA,MAAa,4BACX,mBACG,kBAAkB,cAAc"}
|
package/dist/{createOpenapiFetchClient-yirrW6Tg.cjs → createOpenapiFetchClient-CyDUFxHB.cjs}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_createFetchClient = require("./createFetchClient-
|
|
1
|
+
const require_createFetchClient = require("./createFetchClient-BRfTjBLV.cjs");
|
|
2
2
|
//#region src/fetchClient/createOpenapiFetchClient.ts
|
|
3
3
|
const createOpenapiFetchClient = (defaultOptions) => require_createFetchClient.createFetchClient(defaultOptions);
|
|
4
4
|
//#endregion
|
|
@@ -9,4 +9,4 @@ Object.defineProperty(exports, "createOpenapiFetchClient", {
|
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
11
|
|
|
12
|
-
//# sourceMappingURL=createOpenapiFetchClient-
|
|
12
|
+
//# sourceMappingURL=createOpenapiFetchClient-CyDUFxHB.cjs.map
|
package/dist/{createOpenapiFetchClient-yirrW6Tg.cjs.map → createOpenapiFetchClient-CyDUFxHB.cjs.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createOpenapiFetchClient-
|
|
1
|
+
{"version":3,"file":"createOpenapiFetchClient-CyDUFxHB.cjs","names":["createFetchClient"],"sources":["../src/fetchClient/createOpenapiFetchClient.ts"],"sourcesContent":["import {\n type ApiResponse,\n createFetchClient,\n type CreateFetchClientOptions,\n type FetchClientOptions,\n type HttpMethod,\n} from './createFetchClient';\nimport type { OpenapiParametersType, OpenapiReturnType } from './types';\n\ntype OpenapiPaths<Paths> = {\n [P in keyof Paths]: {\n [M in HttpMethod]?: unknown;\n };\n};\n\ntype PathsWithMethod<Paths extends OpenapiPaths<Paths>, PathnameMethod extends HttpMethod> = {\n [Pathname in keyof Paths]: Paths[Pathname] extends {\n [K in PathnameMethod]: any;\n }\n ? Pathname\n : never;\n}[keyof Paths];\n\ntype FetchMethod<Paths extends OpenapiPaths<Paths>, Method extends HttpMethod> = <\n Path extends PathsWithMethod<Paths, Method>,\n>(\n url: Path,\n params: OpenapiParametersType<Paths[Path][Method]>,\n options?: FetchClientOptions,\n) => Promise<ApiResponse<OpenapiReturnType<Paths[Path][Method]>>>;\n\ntype FetchClient<Paths extends OpenapiPaths<Paths>> = {\n get: FetchMethod<Paths, 'get'>;\n post: FetchMethod<Paths, 'post'>;\n put: FetchMethod<Paths, 'put'>;\n patch: FetchMethod<Paths, 'patch'>;\n delete: FetchMethod<Paths, 'delete'>;\n};\n\nexport const createOpenapiFetchClient = <Paths extends OpenapiPaths<Paths>>(\n defaultOptions: CreateFetchClientOptions,\n) => createFetchClient(defaultOptions) as FetchClient<Paths>;\n"],"mappings":";;AAuCA,MAAa,4BACX,mBACGA,0BAAAA,kBAAkB,cAAc"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_dedupe = require("./dedupe-CiskLkGR.cjs");
|
|
2
|
-
const require_createFetchClient = require("./createFetchClient-
|
|
2
|
+
const require_createFetchClient = require("./createFetchClient-BRfTjBLV.cjs");
|
|
3
3
|
//#region src/keboola/bearer/credential.ts
|
|
4
4
|
const DEFAULT_REFRESH_THRESHOLD = .9;
|
|
5
5
|
const isUnauthorized = (error) => error instanceof require_createFetchClient.ApiError && error.response.status === require_createFetchClient.HttpStatus.UNAUTHORIZED;
|
|
@@ -41,4 +41,4 @@ Object.defineProperty(exports, "isUnauthorized", {
|
|
|
41
41
|
}
|
|
42
42
|
});
|
|
43
43
|
|
|
44
|
-
//# sourceMappingURL=credential-
|
|
44
|
+
//# sourceMappingURL=credential-DOXH7XRS.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credential-
|
|
1
|
+
{"version":3,"file":"credential-DOXH7XRS.cjs","names":["ApiError","HttpStatus","dedupe"],"sources":["../src/keboola/bearer/credential.ts"],"sourcesContent":["import { ApiError } from '../../errors';\nimport { HttpStatus } from '../../internal';\nimport { dedupe } from '../../utils';\n\ntype TokenTiming = { issuedAt: number; expiresIn: number };\ntype TokenSnapshot = { accessToken: string; timing: TokenTiming };\n\ntype Options = {\n // Rotate the credential (single-use refresh-token flow); resolves to the fresh access token.\n refresh: () => Promise<string>;\n // Live read of the current token + timing from the single source of truth (config). `null` when the\n // session is anonymous (no credential yet) — e.g. a pre-auth `login` request.\n getToken: () => TokenSnapshot | null;\n // Called when the session is found dead (refresh or replay rejected). The caller owns the\n // fire-once latch + per-session re-arm (see `config.notifyExpired`), so this may fire more than once.\n onSessionExpired?: () => void;\n refreshThreshold?: number;\n};\n\nconst DEFAULT_REFRESH_THRESHOLD = 0.9;\n\nexport const isUnauthorized = (error: unknown): boolean =>\n error instanceof ApiError && error.response.status === HttpStatus.UNAUTHORIZED;\n\nexport type BearerCredential = {\n // Resolves the current access token, or `null` when the session is anonymous (nothing to stamp).\n getAccessToken: (options?: { forceRefresh?: boolean }) => Promise<string | null>;\n notifyExpired: () => void;\n};\n\nexport const createBearerCredential = ({\n refresh,\n getToken,\n onSessionExpired,\n refreshThreshold = DEFAULT_REFRESH_THRESHOLD,\n}: Options): BearerCredential => {\n const doRefresh = async (): Promise<string> => {\n try {\n return await refresh();\n } catch (error) {\n if (isUnauthorized(error)) onSessionExpired?.();\n throw error;\n }\n };\n\n const refreshShared = dedupe(doRefresh);\n\n const refreshAt = (timing: TokenTiming): number =>\n timing.issuedAt + timing.expiresIn * 1000 * refreshThreshold;\n\n const getAccessToken = async ({ forceRefresh = false } = {}): Promise<string | null> => {\n const snapshot = getToken();\n if (snapshot === null) return null; // anonymous: nothing to stamp (pre-auth request)\n const { accessToken, timing } = snapshot;\n if (forceRefresh) return refreshShared(); // 401 path: must succeed, propagate failure\n if (Date.now() < refreshAt(timing)) return accessToken; // still fresh: current token\n // Proactive: best-effort — if the ahead-of-time refresh fails, proceed with the current token\n // and let a real 401 drive the mandatory refresh.\n return refreshShared().catch(() => accessToken);\n };\n\n return { getAccessToken, notifyExpired: () => onSessionExpired?.() };\n};\n"],"mappings":";;;AAmBA,MAAM,4BAA4B;AAElC,MAAa,kBAAkB,UAC7B,iBAAiBA,0BAAAA,YAAY,MAAM,SAAS,WAAWC,0BAAAA,WAAW;AAQpE,MAAa,0BAA0B,EACrC,SACA,UACA,kBACA,mBAAmB,gCACY;CAC/B,MAAM,YAAY,YAA6B;EAC7C,IAAI;GACF,OAAO,MAAM,QAAQ;EACvB,SAAS,OAAO;GACd,IAAI,eAAe,KAAK,GAAG,mBAAmB;GAC9C,MAAM;EACR;CACF;CAEA,MAAM,gBAAgBC,eAAAA,OAAO,SAAS;CAEtC,MAAM,aAAa,WACjB,OAAO,WAAW,OAAO,YAAY,MAAO;CAE9C,MAAM,iBAAiB,OAAO,EAAE,eAAe,UAAU,CAAC,MAA8B;EACtF,MAAM,WAAW,SAAS;EAC1B,IAAI,aAAa,MAAM,OAAO;EAC9B,MAAM,EAAE,aAAa,WAAW;EAChC,IAAI,cAAc,OAAO,cAAc;EACvC,IAAI,KAAK,IAAI,IAAI,UAAU,MAAM,GAAG,OAAO;EAG3C,OAAO,cAAc,CAAC,CAAC,YAAY,WAAW;CAChD;CAEA,OAAO;EAAE;EAAgB,qBAAqB,mBAAmB;CAAE;AACrE"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as dedupe } from "./dedupe-DYIHgZoG.js";
|
|
2
|
-
import { f as HttpStatus, m as ApiError } from "./createFetchClient-
|
|
2
|
+
import { f as HttpStatus, m as ApiError } from "./createFetchClient-BbG46bL0.js";
|
|
3
3
|
//#region src/keboola/bearer/credential.ts
|
|
4
4
|
const DEFAULT_REFRESH_THRESHOLD = .9;
|
|
5
5
|
const isUnauthorized = (error) => error instanceof ApiError && error.response.status === HttpStatus.UNAUTHORIZED;
|
|
@@ -30,4 +30,4 @@ const createBearerCredential = ({ refresh, getToken, onSessionExpired, refreshTh
|
|
|
30
30
|
//#endregion
|
|
31
31
|
export { isUnauthorized as n, createBearerCredential as t };
|
|
32
32
|
|
|
33
|
-
//# sourceMappingURL=credential-
|
|
33
|
+
//# sourceMappingURL=credential-d2RDcXRB.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credential-
|
|
1
|
+
{"version":3,"file":"credential-d2RDcXRB.js","names":[],"sources":["../src/keboola/bearer/credential.ts"],"sourcesContent":["import { ApiError } from '../../errors';\nimport { HttpStatus } from '../../internal';\nimport { dedupe } from '../../utils';\n\ntype TokenTiming = { issuedAt: number; expiresIn: number };\ntype TokenSnapshot = { accessToken: string; timing: TokenTiming };\n\ntype Options = {\n // Rotate the credential (single-use refresh-token flow); resolves to the fresh access token.\n refresh: () => Promise<string>;\n // Live read of the current token + timing from the single source of truth (config). `null` when the\n // session is anonymous (no credential yet) — e.g. a pre-auth `login` request.\n getToken: () => TokenSnapshot | null;\n // Called when the session is found dead (refresh or replay rejected). The caller owns the\n // fire-once latch + per-session re-arm (see `config.notifyExpired`), so this may fire more than once.\n onSessionExpired?: () => void;\n refreshThreshold?: number;\n};\n\nconst DEFAULT_REFRESH_THRESHOLD = 0.9;\n\nexport const isUnauthorized = (error: unknown): boolean =>\n error instanceof ApiError && error.response.status === HttpStatus.UNAUTHORIZED;\n\nexport type BearerCredential = {\n // Resolves the current access token, or `null` when the session is anonymous (nothing to stamp).\n getAccessToken: (options?: { forceRefresh?: boolean }) => Promise<string | null>;\n notifyExpired: () => void;\n};\n\nexport const createBearerCredential = ({\n refresh,\n getToken,\n onSessionExpired,\n refreshThreshold = DEFAULT_REFRESH_THRESHOLD,\n}: Options): BearerCredential => {\n const doRefresh = async (): Promise<string> => {\n try {\n return await refresh();\n } catch (error) {\n if (isUnauthorized(error)) onSessionExpired?.();\n throw error;\n }\n };\n\n const refreshShared = dedupe(doRefresh);\n\n const refreshAt = (timing: TokenTiming): number =>\n timing.issuedAt + timing.expiresIn * 1000 * refreshThreshold;\n\n const getAccessToken = async ({ forceRefresh = false } = {}): Promise<string | null> => {\n const snapshot = getToken();\n if (snapshot === null) return null; // anonymous: nothing to stamp (pre-auth request)\n const { accessToken, timing } = snapshot;\n if (forceRefresh) return refreshShared(); // 401 path: must succeed, propagate failure\n if (Date.now() < refreshAt(timing)) return accessToken; // still fresh: current token\n // Proactive: best-effort — if the ahead-of-time refresh fails, proceed with the current token\n // and let a real 401 drive the mandatory refresh.\n return refreshShared().catch(() => accessToken);\n };\n\n return { getAccessToken, notifyExpired: () => onSessionExpired?.() };\n};\n"],"mappings":";;;AAmBA,MAAM,4BAA4B;AAElC,MAAa,kBAAkB,UAC7B,iBAAiB,YAAY,MAAM,SAAS,WAAW,WAAW;AAQpE,MAAa,0BAA0B,EACrC,SACA,UACA,kBACA,mBAAmB,gCACY;CAC/B,MAAM,YAAY,YAA6B;EAC7C,IAAI;GACF,OAAO,MAAM,QAAQ;EACvB,SAAS,OAAO;GACd,IAAI,eAAe,KAAK,GAAG,mBAAmB;GAC9C,MAAM;EACR;CACF;CAEA,MAAM,gBAAgB,OAAO,SAAS;CAEtC,MAAM,aAAa,WACjB,OAAO,WAAW,OAAO,YAAY,MAAO;CAE9C,MAAM,iBAAiB,OAAO,EAAE,eAAe,UAAU,CAAC,MAA8B;EACtF,MAAM,WAAW,SAAS;EAC1B,IAAI,aAAa,MAAM,OAAO;EAC9B,MAAM,EAAE,aAAa,WAAW;EAChC,IAAI,cAAc,OAAO,cAAc;EACvC,IAAI,KAAK,IAAI,IAAI,UAAU,MAAM,GAAG,OAAO;EAG3C,OAAO,cAAc,CAAC,CAAC,YAAY,WAAW;CAChD;CAEA,OAAO;EAAE;EAAgB,qBAAqB,mBAAmB;CAAE;AACrE"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_appLogs = require("../appLogs-
|
|
3
|
-
const require_dataScience = require("../dataScience-
|
|
2
|
+
const require_appLogs = require("../appLogs-NIEDTDHf.cjs");
|
|
3
|
+
const require_dataScience = require("../dataScience-wexHEIue.cjs");
|
|
4
4
|
exports.createDataScienceClient = require_dataScience.createDataScienceClient;
|
|
5
5
|
exports.parseLogLines = require_appLogs.parseLogLines;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as parseLogLines } from "../appLogs-
|
|
2
|
-
import { t as createDataScienceClient } from "../index-
|
|
1
|
+
import { n as parseLogLines } from "../appLogs-BAaaGYKg.cjs";
|
|
2
|
+
import { t as createDataScienceClient } from "../index-DqOAjqxN.cjs";
|
|
3
3
|
export { createDataScienceClient, parseLogLines };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as parseLogLines } from "../appLogs-
|
|
2
|
-
import { t as createDataScienceClient } from "../index-
|
|
1
|
+
import { n as parseLogLines } from "../appLogs-DX_WTBCa.js";
|
|
2
|
+
import { t as createDataScienceClient } from "../index-Dbzjvy5h.js";
|
|
3
3
|
export { createDataScienceClient, parseLogLines };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { t as parseLogLines } from "../appLogs-
|
|
2
|
-
import { t as createDataScienceClient } from "../dataScience-
|
|
1
|
+
import { t as parseLogLines } from "../appLogs-DTLE6HTy.js";
|
|
2
|
+
import { t as createDataScienceClient } from "../dataScience-Sm8iONhP.js";
|
|
3
3
|
export { createDataScienceClient, parseLogLines };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { t as LogEntry } from "../appLogs-
|
|
2
|
-
import { S as Sandbox, _ as PatchDataAppPath, a as DeleteSandboxPath, b as Runtime, c as GetDataAppLogsTailPath, d as GetDataAppPath, f as GetDataAppRunPath, g as PatchDataAppBody, h as GetSandboxPath, i as DeleteDataAppPath, l as GetDataAppLogsTailQuery, m as GetDataAppRunsQuery, n as DataApp, o as GetAppsQuery, p as GetDataAppRunsPath, r as DataAppRun, s as GetDataAppLogsDownloadPath, t as CreateDataAppBody, u as GetDataAppPasswordPath, v as RawAppRun, x as RuntimeImageKey, y as ResetDataAppPasswordPath } from "../types-
|
|
1
|
+
import { t as LogEntry } from "../appLogs-BAaaGYKg.cjs";
|
|
2
|
+
import { S as Sandbox, _ as PatchDataAppPath, a as DeleteSandboxPath, b as Runtime, c as GetDataAppLogsTailPath, d as GetDataAppPath, f as GetDataAppRunPath, g as PatchDataAppBody, h as GetSandboxPath, i as DeleteDataAppPath, l as GetDataAppLogsTailQuery, m as GetDataAppRunsQuery, n as DataApp, o as GetAppsQuery, p as GetDataAppRunsPath, r as DataAppRun, s as GetDataAppLogsDownloadPath, t as CreateDataAppBody, u as GetDataAppPasswordPath, v as RawAppRun, x as RuntimeImageKey, y as ResetDataAppPasswordPath } from "../types-BI2jI-3-.cjs";
|
|
3
3
|
export { CreateDataAppBody, DataApp, DataAppRun, DeleteDataAppPath, DeleteSandboxPath, GetAppsQuery, GetDataAppLogsDownloadPath, GetDataAppLogsTailPath, GetDataAppLogsTailQuery, GetDataAppPasswordPath, GetDataAppPath, GetDataAppRunPath, GetDataAppRunsPath, GetDataAppRunsQuery, GetSandboxPath, type LogEntry, PatchDataAppBody, PatchDataAppPath, RawAppRun, ResetDataAppPasswordPath, Runtime, RuntimeImageKey, Sandbox };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { t as LogEntry } from "../appLogs-
|
|
2
|
-
import { S as Sandbox, _ as PatchDataAppPath, a as DeleteSandboxPath, b as Runtime, c as GetDataAppLogsTailPath, d as GetDataAppPath, f as GetDataAppRunPath, g as PatchDataAppBody, h as GetSandboxPath, i as DeleteDataAppPath, l as GetDataAppLogsTailQuery, m as GetDataAppRunsQuery, n as DataApp, o as GetAppsQuery, p as GetDataAppRunsPath, r as DataAppRun, s as GetDataAppLogsDownloadPath, t as CreateDataAppBody, u as GetDataAppPasswordPath, v as RawAppRun, x as RuntimeImageKey, y as ResetDataAppPasswordPath } from "../types-
|
|
1
|
+
import { t as LogEntry } from "../appLogs-DX_WTBCa.js";
|
|
2
|
+
import { S as Sandbox, _ as PatchDataAppPath, a as DeleteSandboxPath, b as Runtime, c as GetDataAppLogsTailPath, d as GetDataAppPath, f as GetDataAppRunPath, g as PatchDataAppBody, h as GetSandboxPath, i as DeleteDataAppPath, l as GetDataAppLogsTailQuery, m as GetDataAppRunsQuery, n as DataApp, o as GetAppsQuery, p as GetDataAppRunsPath, r as DataAppRun, s as GetDataAppLogsDownloadPath, t as CreateDataAppBody, u as GetDataAppPasswordPath, v as RawAppRun, x as RuntimeImageKey, y as ResetDataAppPasswordPath } from "../types-Bpnpa2Wt.js";
|
|
3
3
|
export { CreateDataAppBody, DataApp, DataAppRun, DeleteDataAppPath, DeleteSandboxPath, GetAppsQuery, GetDataAppLogsDownloadPath, GetDataAppLogsTailPath, GetDataAppLogsTailQuery, GetDataAppPasswordPath, GetDataAppPath, GetDataAppRunPath, GetDataAppRunsPath, GetDataAppRunsQuery, GetSandboxPath, type LogEntry, PatchDataAppBody, PatchDataAppPath, RawAppRun, ResetDataAppPasswordPath, Runtime, RuntimeImageKey, Sandbox };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as createGenericFetchClient } from "./createGenericFetchClient-
|
|
2
|
-
import { t as createOpenapiFetchClient } from "./createOpenapiFetchClient-
|
|
3
|
-
import { t as createAuthHeaders } from "./auth-
|
|
4
|
-
import { n as readAppLogsDownload, r as readAppLogsTail } from "./appLogs-
|
|
1
|
+
import { t as createGenericFetchClient } from "./createGenericFetchClient-BHYQLZhe.js";
|
|
2
|
+
import { t as createOpenapiFetchClient } from "./createOpenapiFetchClient-Bn6_Pn0H.js";
|
|
3
|
+
import { t as createAuthHeaders } from "./auth-DtbQaeDj.js";
|
|
4
|
+
import { n as readAppLogsDownload, r as readAppLogsTail } from "./appLogs-DTLE6HTy.js";
|
|
5
5
|
//#region src/clients/dataScience/utils.ts
|
|
6
6
|
const prepareAppRun = (appRun) => {
|
|
7
7
|
return {
|
|
@@ -106,4 +106,4 @@ const createDataScienceClient = ({ baseUrl, middlewares, auth }) => {
|
|
|
106
106
|
//#endregion
|
|
107
107
|
export { createDataScienceClient as t };
|
|
108
108
|
|
|
109
|
-
//# sourceMappingURL=dataScience-
|
|
109
|
+
//# sourceMappingURL=dataScience-Sm8iONhP.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dataScience-
|
|
1
|
+
{"version":3,"file":"dataScience-Sm8iONhP.js","names":[],"sources":["../src/clients/dataScience/utils.ts","../src/clients/dataScience/dataScienceClient.ts"],"sourcesContent":["import type { RawAppRun } from './types';\n\nexport const prepareAppRun = (appRun: RawAppRun) => {\n return {\n ...appRun,\n state: appRun.state ?? (appRun.stoppedAt ? 'finished' : 'running'), // fallback state for historic non migrated runs\n };\n};\n","import { readAppLogsDownload, readAppLogsTail } from '../../domain/appLogs';\nimport { createGenericFetchClient, createOpenapiFetchClient } from '../../fetchClient';\nimport { createAuthHeaders } from '../auth';\nimport type { ClientInitOptions } from '../types';\n\nimport type { paths } from './__generated__/schema';\nimport type {\n CreateDataAppBody,\n DeleteDataAppPath,\n DeleteSandboxPath,\n GetAppsQuery,\n GetDataAppLogsDownloadPath,\n GetDataAppLogsTailPath,\n GetDataAppLogsTailQuery,\n GetDataAppPasswordPath,\n GetDataAppPath,\n GetDataAppRunPath,\n GetDataAppRunsPath,\n GetDataAppRunsQuery,\n GetSandboxPath,\n PatchDataAppBody,\n PatchDataAppPath,\n ResetDataAppPasswordPath,\n} from './types';\nimport { prepareAppRun } from './utils';\n\nexport const createDataScienceClient = ({ 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 getAppRuns = async (\n appId: GetDataAppRunsPath['appId'],\n query?: GetDataAppRunsQuery,\n signal?: AbortSignal,\n ) => {\n const { data } = await client.get('/apps/{appId}/runs', { path: { appId }, query }, { signal });\n\n return data.map(prepareAppRun);\n };\n\n const getAppRun = async (\n appId: GetDataAppRunPath['appId'],\n runId: GetDataAppRunPath['runId'],\n signal?: AbortSignal,\n ) => {\n const { data } = await client.get(\n '/apps/{appId}/runs/{runId}',\n { path: { appId, runId } },\n { signal },\n );\n\n return prepareAppRun(data);\n };\n\n const getAppLogsDownload = (id: GetDataAppLogsDownloadPath['appId'], signal?: AbortSignal) =>\n readAppLogsDownload(() =>\n client.get('/apps/{appId}/logs/download', { path: { appId: id } }, { signal }),\n );\n\n const getAppLogsTail = (\n id: GetDataAppLogsTailPath['appId'],\n { query, signal }: { query?: GetDataAppLogsTailQuery; signal?: AbortSignal } = {},\n ) =>\n readAppLogsTail(() =>\n client.get('/apps/{appId}/logs/tail', { query, path: { appId: id } }, { signal }),\n );\n\n const getApps = async (query: GetAppsQuery, signal?: AbortSignal) => {\n const { data } = await client.get('/apps', { query }, { signal });\n\n return data;\n };\n\n const getApp = async (appId: GetDataAppPath['appId'], signal?: AbortSignal) => {\n const { data } = await client.get('/apps/{appId}', { path: { appId } }, { signal });\n\n return data;\n };\n\n const createApp = async (body: CreateDataAppBody, signal?: AbortSignal) => {\n const { data } = await client.post('/apps', { body }, { signal });\n\n return data;\n };\n\n const patchApp = async (\n appId: PatchDataAppPath['appId'],\n body: PatchDataAppBody,\n signal?: AbortSignal,\n ) => {\n const { data } = await client.patch(\n '/apps/{appId}',\n {\n path: { appId: appId },\n body: body,\n },\n { signal },\n );\n return data;\n };\n\n const deleteApp = async (appId: DeleteDataAppPath['appId'], signal?: AbortSignal) => {\n return client.delete('/apps/{appId}', { path: { appId } }, { signal });\n };\n\n const getAppPassword = async (appId: GetDataAppPasswordPath['appId'], signal?: AbortSignal) => {\n const { data } = await client.get('/apps/{appId}/password', { path: { appId } }, { signal });\n\n return data;\n };\n\n const resetAppPassword = async (\n appId: ResetDataAppPasswordPath['appId'],\n signal?: AbortSignal,\n ) => {\n const { data } = await client.post(\n '/apps/{appId}/reset-password',\n { path: { appId } },\n { signal },\n );\n\n return data;\n };\n\n const getRuntimes = async (signal?: AbortSignal) => {\n const { data } = await client.get('/runtimes', {}, { signal });\n\n return data;\n };\n\n const getSandbox = async (appId: GetSandboxPath['appId'], signal?: AbortSignal) => {\n const { data } = await client.get('/sandboxes/{appId}', { path: { appId } }, { signal });\n\n return data;\n };\n\n const deleteSandbox = async (appId: DeleteSandboxPath['appId'], signal?: AbortSignal) => {\n return client.delete('/sandboxes/{appId}', { path: { appId } }, { signal });\n };\n\n const healthCheck = async (signal?: AbortSignal) => {\n const { data } = await genericClient.get('/health-check', {}, { signal });\n\n return data;\n };\n\n return {\n healthCheck,\n getAppRuns,\n getAppRun,\n getAppLogsDownload,\n getAppLogsTail,\n getApps,\n getApp,\n createApp,\n patchApp,\n deleteApp,\n getAppPassword,\n resetAppPassword,\n getRuntimes,\n getSandbox,\n deleteSandbox,\n };\n};\n"],"mappings":";;;;;AAEA,MAAa,iBAAiB,WAAsB;CAClD,OAAO;EACL,GAAG;EACH,OAAO,OAAO,UAAU,OAAO,YAAY,aAAa;CAC1D;AACF;;;ACmBA,MAAa,2BAA2B,EAAE,SAAS,aAAa,WAA8B;CAC5F,MAAM,SAAS,yBAAgC;EAC7C;EACA;EACA,SAAS,kBAAkB,IAAI;CACjC,CAAC;CACD,MAAM,gBAAgB,yBAAyB;EAAE;EAAS;CAAY,CAAC;CAEvE,MAAM,aAAa,OACjB,OACA,OACA,WACG;EACH,MAAM,EAAE,SAAS,MAAM,OAAO,IAAI,sBAAsB;GAAE,MAAM,EAAE,MAAM;GAAG;EAAM,GAAG,EAAE,OAAO,CAAC;EAE9F,OAAO,KAAK,IAAI,aAAa;CAC/B;CAEA,MAAM,YAAY,OAChB,OACA,OACA,WACG;EACH,MAAM,EAAE,SAAS,MAAM,OAAO,IAC5B,8BACA,EAAE,MAAM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CAAC;EAE3F,OAAO;CACT;CAEA,MAAM,mBAAmB,OACvB,OACA,WACG;EACH,MAAM,EAAE,SAAS,MAAM,OAAO,KAC5B,gCACA,EAAE,MAAM,EAAE,MAAM,EAAE,GAClB,EAAE,OAAO,CACX;EAEA,OAAO;CACT;CAEA,MAAM,cAAc,OAAO,WAAyB;EAClD,MAAM,EAAE,SAAS,MAAM,OAAO,IAAI,aAAa,CAAC,GAAG,EAAE,OAAO,CAAC;EAE7D,OAAO;CACT;CAEA,MAAM,aAAa,OAAO,OAAgC,WAAyB;EACjF,MAAM,EAAE,SAAS,MAAM,OAAO,IAAI,sBAAsB,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,CAAC;EAEvF,OAAO;CACT;CAEA,MAAM,gBAAgB,OAAO,OAAmC,WAAyB;EACvF,OAAO,OAAO,OAAO,sBAAsB,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,CAAC;CAC5E;CAEA,MAAM,cAAc,OAAO,WAAyB;EAClD,MAAM,EAAE,SAAS,MAAM,cAAc,IAAI,iBAAiB,CAAC,GAAG,EAAE,OAAO,CAAC;EAExE,OAAO;CACT;CAEA,OAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;AACF"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
const require_createGenericFetchClient = require("./createGenericFetchClient-
|
|
2
|
-
const require_createOpenapiFetchClient = require("./createOpenapiFetchClient-
|
|
3
|
-
const require_auth = require("./auth-
|
|
4
|
-
const require_appLogs = require("./appLogs-
|
|
1
|
+
const require_createGenericFetchClient = require("./createGenericFetchClient-DHs-i7_O.cjs");
|
|
2
|
+
const require_createOpenapiFetchClient = require("./createOpenapiFetchClient-CyDUFxHB.cjs");
|
|
3
|
+
const require_auth = require("./auth-DP-6TFiM.cjs");
|
|
4
|
+
const require_appLogs = require("./appLogs-NIEDTDHf.cjs");
|
|
5
5
|
//#region src/clients/dataScience/utils.ts
|
|
6
6
|
const prepareAppRun = (appRun) => {
|
|
7
7
|
return {
|
|
@@ -111,4 +111,4 @@ Object.defineProperty(exports, "createDataScienceClient", {
|
|
|
111
111
|
}
|
|
112
112
|
});
|
|
113
113
|
|
|
114
|
-
//# sourceMappingURL=dataScience-
|
|
114
|
+
//# sourceMappingURL=dataScience-wexHEIue.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dataScience-
|
|
1
|
+
{"version":3,"file":"dataScience-wexHEIue.cjs","names":["createOpenapiFetchClient","createAuthHeaders","createGenericFetchClient","readAppLogsDownload","readAppLogsTail"],"sources":["../src/clients/dataScience/utils.ts","../src/clients/dataScience/dataScienceClient.ts"],"sourcesContent":["import type { RawAppRun } from './types';\n\nexport const prepareAppRun = (appRun: RawAppRun) => {\n return {\n ...appRun,\n state: appRun.state ?? (appRun.stoppedAt ? 'finished' : 'running'), // fallback state for historic non migrated runs\n };\n};\n","import { readAppLogsDownload, readAppLogsTail } from '../../domain/appLogs';\nimport { createGenericFetchClient, createOpenapiFetchClient } from '../../fetchClient';\nimport { createAuthHeaders } from '../auth';\nimport type { ClientInitOptions } from '../types';\n\nimport type { paths } from './__generated__/schema';\nimport type {\n CreateDataAppBody,\n DeleteDataAppPath,\n DeleteSandboxPath,\n GetAppsQuery,\n GetDataAppLogsDownloadPath,\n GetDataAppLogsTailPath,\n GetDataAppLogsTailQuery,\n GetDataAppPasswordPath,\n GetDataAppPath,\n GetDataAppRunPath,\n GetDataAppRunsPath,\n GetDataAppRunsQuery,\n GetSandboxPath,\n PatchDataAppBody,\n PatchDataAppPath,\n ResetDataAppPasswordPath,\n} from './types';\nimport { prepareAppRun } from './utils';\n\nexport const createDataScienceClient = ({ 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 getAppRuns = async (\n appId: GetDataAppRunsPath['appId'],\n query?: GetDataAppRunsQuery,\n signal?: AbortSignal,\n ) => {\n const { data } = await client.get('/apps/{appId}/runs', { path: { appId }, query }, { signal });\n\n return data.map(prepareAppRun);\n };\n\n const getAppRun = async (\n appId: GetDataAppRunPath['appId'],\n runId: GetDataAppRunPath['runId'],\n signal?: AbortSignal,\n ) => {\n const { data } = await client.get(\n '/apps/{appId}/runs/{runId}',\n { path: { appId, runId } },\n { signal },\n );\n\n return prepareAppRun(data);\n };\n\n const getAppLogsDownload = (id: GetDataAppLogsDownloadPath['appId'], signal?: AbortSignal) =>\n readAppLogsDownload(() =>\n client.get('/apps/{appId}/logs/download', { path: { appId: id } }, { signal }),\n );\n\n const getAppLogsTail = (\n id: GetDataAppLogsTailPath['appId'],\n { query, signal }: { query?: GetDataAppLogsTailQuery; signal?: AbortSignal } = {},\n ) =>\n readAppLogsTail(() =>\n client.get('/apps/{appId}/logs/tail', { query, path: { appId: id } }, { signal }),\n );\n\n const getApps = async (query: GetAppsQuery, signal?: AbortSignal) => {\n const { data } = await client.get('/apps', { query }, { signal });\n\n return data;\n };\n\n const getApp = async (appId: GetDataAppPath['appId'], signal?: AbortSignal) => {\n const { data } = await client.get('/apps/{appId}', { path: { appId } }, { signal });\n\n return data;\n };\n\n const createApp = async (body: CreateDataAppBody, signal?: AbortSignal) => {\n const { data } = await client.post('/apps', { body }, { signal });\n\n return data;\n };\n\n const patchApp = async (\n appId: PatchDataAppPath['appId'],\n body: PatchDataAppBody,\n signal?: AbortSignal,\n ) => {\n const { data } = await client.patch(\n '/apps/{appId}',\n {\n path: { appId: appId },\n body: body,\n },\n { signal },\n );\n return data;\n };\n\n const deleteApp = async (appId: DeleteDataAppPath['appId'], signal?: AbortSignal) => {\n return client.delete('/apps/{appId}', { path: { appId } }, { signal });\n };\n\n const getAppPassword = async (appId: GetDataAppPasswordPath['appId'], signal?: AbortSignal) => {\n const { data } = await client.get('/apps/{appId}/password', { path: { appId } }, { signal });\n\n return data;\n };\n\n const resetAppPassword = async (\n appId: ResetDataAppPasswordPath['appId'],\n signal?: AbortSignal,\n ) => {\n const { data } = await client.post(\n '/apps/{appId}/reset-password',\n { path: { appId } },\n { signal },\n );\n\n return data;\n };\n\n const getRuntimes = async (signal?: AbortSignal) => {\n const { data } = await client.get('/runtimes', {}, { signal });\n\n return data;\n };\n\n const getSandbox = async (appId: GetSandboxPath['appId'], signal?: AbortSignal) => {\n const { data } = await client.get('/sandboxes/{appId}', { path: { appId } }, { signal });\n\n return data;\n };\n\n const deleteSandbox = async (appId: DeleteSandboxPath['appId'], signal?: AbortSignal) => {\n return client.delete('/sandboxes/{appId}', { path: { appId } }, { signal });\n };\n\n const healthCheck = async (signal?: AbortSignal) => {\n const { data } = await genericClient.get('/health-check', {}, { signal });\n\n return data;\n };\n\n return {\n healthCheck,\n getAppRuns,\n getAppRun,\n getAppLogsDownload,\n getAppLogsTail,\n getApps,\n getApp,\n createApp,\n patchApp,\n deleteApp,\n getAppPassword,\n resetAppPassword,\n getRuntimes,\n getSandbox,\n deleteSandbox,\n };\n};\n"],"mappings":";;;;;AAEA,MAAa,iBAAiB,WAAsB;CAClD,OAAO;EACL,GAAG;EACH,OAAO,OAAO,UAAU,OAAO,YAAY,aAAa;CAC1D;AACF;;;ACmBA,MAAa,2BAA2B,EAAE,SAAS,aAAa,WAA8B;CAC5F,MAAM,SAASA,iCAAAA,yBAAgC;EAC7C;EACA;EACA,SAASC,aAAAA,kBAAkB,IAAI;CACjC,CAAC;CACD,MAAM,gBAAgBC,iCAAAA,yBAAyB;EAAE;EAAS;CAAY,CAAC;CAEvE,MAAM,aAAa,OACjB,OACA,OACA,WACG;EACH,MAAM,EAAE,SAAS,MAAM,OAAO,IAAI,sBAAsB;GAAE,MAAM,EAAE,MAAM;GAAG;EAAM,GAAG,EAAE,OAAO,CAAC;EAE9F,OAAO,KAAK,IAAI,aAAa;CAC/B;CAEA,MAAM,YAAY,OAChB,OACA,OACA,WACG;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AS,MAAM,OAAO,IAAI,0BAA0B,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,CAAC;EAE3F,OAAO;CACT;CAEA,MAAM,mBAAmB,OACvB,OACA,WACG;EACH,MAAM,EAAE,SAAS,MAAM,OAAO,KAC5B,gCACA,EAAE,MAAM,EAAE,MAAM,EAAE,GAClB,EAAE,OAAO,CACX;EAEA,OAAO;CACT;CAEA,MAAM,cAAc,OAAO,WAAyB;EAClD,MAAM,EAAE,SAAS,MAAM,OAAO,IAAI,aAAa,CAAC,GAAG,EAAE,OAAO,CAAC;EAE7D,OAAO;CACT;CAEA,MAAM,aAAa,OAAO,OAAgC,WAAyB;EACjF,MAAM,EAAE,SAAS,MAAM,OAAO,IAAI,sBAAsB,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,CAAC;EAEvF,OAAO;CACT;CAEA,MAAM,gBAAgB,OAAO,OAAmC,WAAyB;EACvF,OAAO,OAAO,OAAO,sBAAsB,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,CAAC;CAC5E;CAEA,MAAM,cAAc,OAAO,WAAyB;EAClD,MAAM,EAAE,SAAS,MAAM,cAAc,IAAI,iBAAiB,CAAC,GAAG,EAAE,OAAO,CAAC;EAExE,OAAO;CACT;CAEA,OAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;AACF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_developerPortalClient = require("../developerPortalClient-
|
|
2
|
+
const require_developerPortalClient = require("../developerPortalClient-CgTSzLoG.cjs");
|
|
3
3
|
exports.authHeader = require_developerPortalClient.authHeader;
|
|
4
4
|
exports.createDeveloperPortalClient = require_developerPortalClient.createDeveloperPortalClient;
|
|
5
5
|
exports.isMfaChallengeResponse = require_developerPortalClient.isMfaChallengeResponse;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { A as ResetPasswordConfirmInput, B as UserRequest, C as MfaConfirmInput, D as Profile, E as PaginationQuery, F as UpdateAppAsAdminInput, H as VendorListItem, I as UpdateAppInput, L as UpdateVendorAsAdminInput, M as ServiceIndex, N as SignUpInput, O as RefreshTokensResult, P as Stack, R as UpdateVendorInput, S as LoginSuccess, T as MfaSetupResult, U as Version, V as Vendor, _ as GetVendorUsersQuery, a as AppRepository, b as LoginInput, c as ConfirmAccountInput, d as CreateVendorAsAdminInput, f as CreateVendorInput, g as GetChangesQuery, h as GetAppsQuery, i as AppChange, j as ServiceAccount, k as RejectAppInput, l as CreateAppInput, m as DeveloperPortalError, n as AdminVendor, o as AppVendor, p as DeprecateAppInput, r as App, s as ApproveVendorInput, t as AdminPaginationQuery, u as CreateServiceAccountInput, v as IconUploadLink, w as MfaSetupInput, x as LoginResult, y as LoginChallenge, z as User } from "../types-
|
|
2
|
-
import { a as DeveloperPortalClient, c as createDeveloperPortalClient, i as isMfaChallengeResponse, n as authHeader, o as DeveloperPortalClientInitOptions, r as uploadAppIcon, s as DeveloperPortalFetchClient, t as DeveloperPortalTokens } from "../index-
|
|
1
|
+
import { A as ResetPasswordConfirmInput, B as UserRequest, C as MfaConfirmInput, D as Profile, E as PaginationQuery, F as UpdateAppAsAdminInput, H as VendorListItem, I as UpdateAppInput, L as UpdateVendorAsAdminInput, M as ServiceIndex, N as SignUpInput, O as RefreshTokensResult, P as Stack, R as UpdateVendorInput, S as LoginSuccess, T as MfaSetupResult, U as Version, V as Vendor, _ as GetVendorUsersQuery, a as AppRepository, b as LoginInput, c as ConfirmAccountInput, d as CreateVendorAsAdminInput, f as CreateVendorInput, g as GetChangesQuery, h as GetAppsQuery, i as AppChange, j as ServiceAccount, k as RejectAppInput, l as CreateAppInput, m as DeveloperPortalError, n as AdminVendor, o as AppVendor, p as DeprecateAppInput, r as App, s as ApproveVendorInput, t as AdminPaginationQuery, u as CreateServiceAccountInput, v as IconUploadLink, w as MfaSetupInput, x as LoginResult, y as LoginChallenge, z as User } from "../types-DlbiVsVo.cjs";
|
|
2
|
+
import { a as DeveloperPortalClient, c as createDeveloperPortalClient, i as isMfaChallengeResponse, n as authHeader, o as DeveloperPortalClientInitOptions, r as uploadAppIcon, s as DeveloperPortalFetchClient, t as DeveloperPortalTokens } from "../index-BKh0prif.cjs";
|
|
3
3
|
export { type AdminPaginationQuery, type AdminVendor, type App, type AppChange, type AppRepository, type AppVendor, type ApproveVendorInput, type ConfirmAccountInput, type CreateAppInput, type CreateServiceAccountInput, type CreateVendorAsAdminInput, type CreateVendorInput, type DeprecateAppInput, DeveloperPortalClient, DeveloperPortalClientInitOptions, type DeveloperPortalError, DeveloperPortalFetchClient, type DeveloperPortalTokens, type GetAppsQuery, type GetChangesQuery, type GetVendorUsersQuery, type IconUploadLink, type LoginChallenge, type LoginInput, type LoginResult, type LoginSuccess, type MfaConfirmInput, type MfaSetupInput, type MfaSetupResult, type PaginationQuery, type Profile, type RefreshTokensResult, type RejectAppInput, type ResetPasswordConfirmInput, type ServiceAccount, type ServiceIndex, type SignUpInput, type Stack, type UpdateAppAsAdminInput, type UpdateAppInput, type UpdateVendorAsAdminInput, type UpdateVendorInput, type User, type UserRequest, type Vendor, type VendorListItem, type Version, authHeader, createDeveloperPortalClient, isMfaChallengeResponse, uploadAppIcon };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { A as ResetPasswordConfirmInput, B as UserRequest, C as MfaConfirmInput, D as Profile, E as PaginationQuery, F as UpdateAppAsAdminInput, H as VendorListItem, I as UpdateAppInput, L as UpdateVendorAsAdminInput, M as ServiceIndex, N as SignUpInput, O as RefreshTokensResult, P as Stack, R as UpdateVendorInput, S as LoginSuccess, T as MfaSetupResult, U as Version, V as Vendor, _ as GetVendorUsersQuery, a as AppRepository, b as LoginInput, c as ConfirmAccountInput, d as CreateVendorAsAdminInput, f as CreateVendorInput, g as GetChangesQuery, h as GetAppsQuery, i as AppChange, j as ServiceAccount, k as RejectAppInput, l as CreateAppInput, m as DeveloperPortalError, n as AdminVendor, o as AppVendor, p as DeprecateAppInput, r as App, s as ApproveVendorInput, t as AdminPaginationQuery, u as CreateServiceAccountInput, v as IconUploadLink, w as MfaSetupInput, x as LoginResult, y as LoginChallenge, z as User } from "../types-
|
|
2
|
-
import { a as DeveloperPortalClient, c as createDeveloperPortalClient, i as isMfaChallengeResponse, n as authHeader, o as DeveloperPortalClientInitOptions, r as uploadAppIcon, s as DeveloperPortalFetchClient, t as DeveloperPortalTokens } from "../index-
|
|
1
|
+
import { A as ResetPasswordConfirmInput, B as UserRequest, C as MfaConfirmInput, D as Profile, E as PaginationQuery, F as UpdateAppAsAdminInput, H as VendorListItem, I as UpdateAppInput, L as UpdateVendorAsAdminInput, M as ServiceIndex, N as SignUpInput, O as RefreshTokensResult, P as Stack, R as UpdateVendorInput, S as LoginSuccess, T as MfaSetupResult, U as Version, V as Vendor, _ as GetVendorUsersQuery, a as AppRepository, b as LoginInput, c as ConfirmAccountInput, d as CreateVendorAsAdminInput, f as CreateVendorInput, g as GetChangesQuery, h as GetAppsQuery, i as AppChange, j as ServiceAccount, k as RejectAppInput, l as CreateAppInput, m as DeveloperPortalError, n as AdminVendor, o as AppVendor, p as DeprecateAppInput, r as App, s as ApproveVendorInput, t as AdminPaginationQuery, u as CreateServiceAccountInput, v as IconUploadLink, w as MfaSetupInput, x as LoginResult, y as LoginChallenge, z as User } from "../types-Dfc58bPE.js";
|
|
2
|
+
import { a as DeveloperPortalClient, c as createDeveloperPortalClient, i as isMfaChallengeResponse, n as authHeader, o as DeveloperPortalClientInitOptions, r as uploadAppIcon, s as DeveloperPortalFetchClient, t as DeveloperPortalTokens } from "../index-tKsiUarj.js";
|
|
3
3
|
export { type AdminPaginationQuery, type AdminVendor, type App, type AppChange, type AppRepository, type AppVendor, type ApproveVendorInput, type ConfirmAccountInput, type CreateAppInput, type CreateServiceAccountInput, type CreateVendorAsAdminInput, type CreateVendorInput, type DeprecateAppInput, DeveloperPortalClient, DeveloperPortalClientInitOptions, type DeveloperPortalError, DeveloperPortalFetchClient, type DeveloperPortalTokens, type GetAppsQuery, type GetChangesQuery, type GetVendorUsersQuery, type IconUploadLink, type LoginChallenge, type LoginInput, type LoginResult, type LoginSuccess, type MfaConfirmInput, type MfaSetupInput, type MfaSetupResult, type PaginationQuery, type Profile, type RefreshTokensResult, type RejectAppInput, type ResetPasswordConfirmInput, type ServiceAccount, type ServiceIndex, type SignUpInput, type Stack, type UpdateAppAsAdminInput, type UpdateAppInput, type UpdateVendorAsAdminInput, type UpdateVendorInput, type User, type UserRequest, type Vendor, type VendorListItem, type Version, authHeader, createDeveloperPortalClient, isMfaChallengeResponse, uploadAppIcon };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as uploadAppIcon, n as isMfaChallengeResponse, r as authHeader, t as createDeveloperPortalClient } from "../developerPortalClient-
|
|
1
|
+
import { i as uploadAppIcon, n as isMfaChallengeResponse, r as authHeader, t as createDeveloperPortalClient } from "../developerPortalClient-DywKpDlW.js";
|
|
2
2
|
export { authHeader, createDeveloperPortalClient, isMfaChallengeResponse, uploadAppIcon };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as ResetPasswordConfirmInput, B as UserRequest, C as MfaConfirmInput, D as Profile, E as PaginationQuery, F as UpdateAppAsAdminInput, H as VendorListItem, I as UpdateAppInput, L as UpdateVendorAsAdminInput, M as ServiceIndex, N as SignUpInput, O as RefreshTokensResult, P as Stack, R as UpdateVendorInput, S as LoginSuccess, T as MfaSetupResult, U as Version, V as Vendor, _ as GetVendorUsersQuery, a as AppRepository, b as LoginInput, c as ConfirmAccountInput, d as CreateVendorAsAdminInput, f as CreateVendorInput, g as GetChangesQuery, h as GetAppsQuery, i as AppChange, j as ServiceAccount, k as RejectAppInput, l as CreateAppInput, m as DeveloperPortalError, n as AdminVendor, o as AppVendor, p as DeprecateAppInput, r as App, s as ApproveVendorInput, t as AdminPaginationQuery, u as CreateServiceAccountInput, v as IconUploadLink, w as MfaSetupInput, x as LoginResult, y as LoginChallenge, z as User } from "../types-
|
|
1
|
+
import { A as ResetPasswordConfirmInput, B as UserRequest, C as MfaConfirmInput, D as Profile, E as PaginationQuery, F as UpdateAppAsAdminInput, H as VendorListItem, I as UpdateAppInput, L as UpdateVendorAsAdminInput, M as ServiceIndex, N as SignUpInput, O as RefreshTokensResult, P as Stack, R as UpdateVendorInput, S as LoginSuccess, T as MfaSetupResult, U as Version, V as Vendor, _ as GetVendorUsersQuery, a as AppRepository, b as LoginInput, c as ConfirmAccountInput, d as CreateVendorAsAdminInput, f as CreateVendorInput, g as GetChangesQuery, h as GetAppsQuery, i as AppChange, j as ServiceAccount, k as RejectAppInput, l as CreateAppInput, m as DeveloperPortalError, n as AdminVendor, o as AppVendor, p as DeprecateAppInput, r as App, s as ApproveVendorInput, t as AdminPaginationQuery, u as CreateServiceAccountInput, v as IconUploadLink, w as MfaSetupInput, x as LoginResult, y as LoginChallenge, z as User } from "../types-DlbiVsVo.cjs";
|
|
2
2
|
export { AdminPaginationQuery, AdminVendor, App, AppChange, AppRepository, AppVendor, ApproveVendorInput, ConfirmAccountInput, CreateAppInput, CreateServiceAccountInput, CreateVendorAsAdminInput, CreateVendorInput, DeprecateAppInput, DeveloperPortalError, GetAppsQuery, GetChangesQuery, GetVendorUsersQuery, IconUploadLink, LoginChallenge, LoginInput, LoginResult, LoginSuccess, MfaConfirmInput, MfaSetupInput, MfaSetupResult, PaginationQuery, Profile, RefreshTokensResult, RejectAppInput, ResetPasswordConfirmInput, ServiceAccount, ServiceIndex, SignUpInput, Stack, UpdateAppAsAdminInput, UpdateAppInput, UpdateVendorAsAdminInput, UpdateVendorInput, User, UserRequest, Vendor, VendorListItem, Version };
|