@keboola/api-client 42.0.0 → 44.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 +4 -2
- package/API-SURFACE.md +5 -10
- package/CHANGELOG.md +48 -0
- package/README.md +17 -19
- package/dist/{ManagementClientAuthError-DUbXlry2.js → ManagementClientAuthError-BcPYxAWZ.js} +2 -2
- package/dist/{ManagementClientAuthError-DUbXlry2.js.map → ManagementClientAuthError-BcPYxAWZ.js.map} +1 -1
- package/dist/{ManagementClientAuthError-BFZOtLgj.cjs → ManagementClientAuthError-DHuykEPF.cjs} +2 -2
- package/dist/{ManagementClientAuthError-BFZOtLgj.cjs.map → ManagementClientAuthError-DHuykEPF.cjs.map} +1 -1
- package/dist/ai/index.cjs +2 -2
- package/dist/ai/index.js +2 -2
- package/dist/{appLogs-oZvt59mk.cjs → appLogs-BG9ueGxA.cjs} +2 -2
- package/dist/{appLogs-oZvt59mk.cjs.map → appLogs-BG9ueGxA.cjs.map} +1 -1
- package/dist/{appLogs-DfkItQCO.js → appLogs-CEKz68bE.js} +2 -2
- package/dist/{appLogs-DfkItQCO.js.map → appLogs-CEKz68bE.js.map} +1 -1
- package/dist/apps/index.cjs +3 -3
- package/dist/apps/index.js +3 -3
- package/dist/assets/index.cjs +1 -1
- package/dist/assets/index.js +1 -1
- package/dist/auth/index.cjs +1 -1
- package/dist/auth/index.js +1 -1
- package/dist/{auth-DUHTJTwS.js → auth-C6cHWIWx.js} +2 -2
- package/dist/{auth-DUHTJTwS.js.map → auth-C6cHWIWx.js.map} +1 -1
- package/dist/{auth-zfI04oj7.cjs → auth-C9o_0bft.cjs} +2 -2
- package/dist/{auth-zfI04oj7.cjs.map → auth-C9o_0bft.cjs.map} +1 -1
- package/dist/{authClient-CX4buUMc.js → authClient-CACOwVt0.js} +5 -5
- package/dist/{authClient-CX4buUMc.js.map → authClient-CACOwVt0.js.map} +1 -1
- package/dist/{authClient-BxqRGR5c.cjs → authClient-DZcAR-eW.cjs} +5 -5
- package/dist/{authClient-BxqRGR5c.cjs.map → authClient-DZcAR-eW.cjs.map} +1 -1
- package/dist/billing/index.cjs +2 -2
- package/dist/billing/index.js +2 -2
- package/dist/chat/index.cjs +3 -3
- package/dist/chat/index.js +3 -3
- package/dist/collect-97WhfEpt.js +30 -0
- package/dist/collect-97WhfEpt.js.map +1 -0
- package/dist/collect-B5TCNiT1.cjs +35 -0
- package/dist/collect-B5TCNiT1.cjs.map +1 -0
- package/dist/constants/index.cjs +1 -1
- package/dist/constants/index.d.cts +1 -1
- package/dist/constants/index.d.ts +1 -1
- package/dist/constants/index.js +1 -1
- package/dist/{constants-C6xku_Vx.cjs → constants-BDGRQqij.cjs} +1 -2
- package/dist/constants-BDGRQqij.cjs.map +1 -0
- package/dist/{constants-C2tYAJSj.js → constants-Cifrqsls.js} +1 -2
- package/dist/constants-Cifrqsls.js.map +1 -0
- package/dist/createAbortError-BxupOt-6.js +6 -0
- package/dist/createAbortError-BxupOt-6.js.map +1 -0
- package/dist/createAbortError-RendOpo7.cjs +11 -0
- package/dist/createAbortError-RendOpo7.cjs.map +1 -0
- package/dist/{createFetchClient-BgihytBn.cjs → createFetchClient-ClWD4ua3.cjs} +71 -25
- package/dist/createFetchClient-ClWD4ua3.cjs.map +1 -0
- package/dist/{createFetchClient-cgWkwgAQ.js → createFetchClient-DITkTV2k.js} +54 -26
- package/dist/createFetchClient-DITkTV2k.js.map +1 -0
- package/dist/{createGenericFetchClient-C7Y0YVfc.cjs → createGenericFetchClient-B81Iezpb.cjs} +2 -2
- package/dist/{createGenericFetchClient-C7Y0YVfc.cjs.map → createGenericFetchClient-B81Iezpb.cjs.map} +1 -1
- package/dist/{createGenericFetchClient-CX9Hn3Aq.js → createGenericFetchClient-KqiJhw8G.js} +2 -2
- package/dist/{createGenericFetchClient-CX9Hn3Aq.js.map → createGenericFetchClient-KqiJhw8G.js.map} +1 -1
- package/dist/{createOpenapiFetchClient-DY5s-aH6.cjs → createOpenapiFetchClient-CioTX11-.cjs} +2 -2
- package/dist/{createOpenapiFetchClient-DY5s-aH6.cjs.map → createOpenapiFetchClient-CioTX11-.cjs.map} +1 -1
- package/dist/{createOpenapiFetchClient-BxcLLU_N.js → createOpenapiFetchClient-wq8iGLZM.js} +2 -2
- package/dist/{createOpenapiFetchClient-BxcLLU_N.js.map → createOpenapiFetchClient-wq8iGLZM.js.map} +1 -1
- package/dist/dataScience/index.cjs +2 -2
- package/dist/dataScience/index.d.cts +1 -1
- package/dist/dataScience/index.d.ts +1 -1
- 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-BxRoGfnG.js → dataScience-BwHmDoQb.js} +16 -5
- package/dist/dataScience-BwHmDoQb.js.map +1 -0
- package/dist/{dataScience-BoS8Xfvx.cjs → dataScience-Hhoqoql_.cjs} +16 -5
- package/dist/dataScience-Hhoqoql_.cjs.map +1 -0
- package/dist/developerPortal/index.cjs +1 -1
- package/dist/developerPortal/index.d.cts +2 -2
- package/dist/developerPortal/index.d.ts +2 -2
- package/dist/developerPortal/index.js +1 -1
- package/dist/developerPortal/types.d.cts +1 -1
- package/dist/developerPortal/types.d.ts +1 -1
- package/dist/{developerPortalClient-DFHEsrlt.cjs → developerPortalClient-COm7wJxS.cjs} +3 -3
- package/dist/{developerPortalClient-DFHEsrlt.cjs.map → developerPortalClient-COm7wJxS.cjs.map} +1 -1
- package/dist/{developerPortalClient-C7s0kpjK.js → developerPortalClient-loKq7X_U.js} +3 -3
- package/dist/{developerPortalClient-C7s0kpjK.js.map → developerPortalClient-loKq7X_U.js.map} +1 -1
- package/dist/editor/index.cjs +2 -2
- package/dist/editor/index.js +2 -2
- 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.js +1 -1
- package/dist/{import-BSYvG3Uy.cjs → import-B5DcJGMI.cjs} +3 -3
- package/dist/{import-BSYvG3Uy.cjs.map → import-B5DcJGMI.cjs.map} +1 -1
- package/dist/{import-CXBcFVbk.js → import-JlH_QaDd.js} +3 -3
- package/dist/{import-CXBcFVbk.js.map → import-JlH_QaDd.js.map} +1 -1
- package/dist/{index-VnJCp8IL.d.cts → index-04pgr-EO.d.cts} +3 -2
- package/dist/{index-D-VMgpGc.d.ts → index-BCgmwncs.d.ts} +10 -2
- package/dist/{index-CcMHJcuP.d.cts → index-BHWTa4YN.d.cts} +3 -2
- package/dist/{index-CBWfpd-0.d.ts → index-Bf8dr2KQ.d.ts} +2 -2
- package/dist/{index-B03vhWSX.d.ts → index-CA6QxbhZ.d.ts} +4 -2
- package/dist/{index-Cw-d6vV3.d.ts → index-CWPi7lBF.d.ts} +5 -5
- package/dist/{index-C11JSxBY.d.ts → index-CX8GAP2g.d.ts} +13 -8
- package/dist/{index-C4TNAA8-.d.cts → index-Cvkrjh--.d.cts} +13 -8
- package/dist/{index-Cz0MXhzs.d.cts → index-D9UsQOuT.d.cts} +10 -2
- package/dist/{index-B2-7WJ-E.d.cts → index-DZcQUZaO.d.cts} +52 -84
- package/dist/{index-CKENwClW.d.cts → index-Dd40ojPr.d.cts} +5 -5
- package/dist/{index-BUsLHNOA.d.cts → index-DkCXaYsn.d.cts} +2 -2
- package/dist/{index-D3HFMfJJ.d.cts → index-DkvrbR2i.d.cts} +4 -2
- package/dist/{index-CpE_NWuq.d.ts → index-DzGmgUvQ.d.ts} +52 -84
- package/dist/{index-DwM1EpnZ.d.ts → index-R-w0Zncz.d.ts} +3 -2
- package/dist/{index-D_-4uQF8.d.ts → index-zyxZVJnd.d.ts} +3 -2
- package/dist/index.cjs +53 -60
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +49 -56
- package/dist/index.js.map +1 -1
- package/dist/{isLoginPageRedirect-CsjF95_P.js → isLoginPageRedirect-CsyRa3_v.js} +2 -2
- package/dist/{isLoginPageRedirect-CsjF95_P.js.map → isLoginPageRedirect-CsyRa3_v.js.map} +1 -1
- package/dist/{isLoginPageRedirect-c451CoWW.cjs → isLoginPageRedirect-iNbwl3iz.cjs} +2 -2
- package/dist/{isLoginPageRedirect-c451CoWW.cjs.map → isLoginPageRedirect-iNbwl3iz.cjs.map} +1 -1
- package/dist/{jobStatus-CfRtsIpv.js → jobStatus-CDp4r5JQ.js} +3 -5
- package/dist/jobStatus-CDp4r5JQ.js.map +1 -0
- package/dist/{jobStatus-BMlsyXWI.cjs → jobStatus-CcNlIy5R.cjs} +5 -13
- package/dist/{jobStatus-CfRtsIpv.js.map → jobStatus-CcNlIy5R.cjs.map} +1 -1
- package/dist/kaiAgent/index.cjs +1 -1
- package/dist/kaiAgent/index.d.cts +1 -1
- package/dist/kaiAgent/index.d.ts +1 -1
- package/dist/kaiAgent/index.js +1 -1
- package/dist/kaiAgent/types.d.cts +1 -1
- package/dist/kaiAgent/types.d.ts +1 -1
- package/dist/{kaiAgent-ph4DRKlT.cjs → kaiAgent-BhcUsBDk.cjs} +5 -5
- package/dist/{kaiAgent-ph4DRKlT.cjs.map → kaiAgent-BhcUsBDk.cjs.map} +1 -1
- package/dist/{kaiAgent-xBpUwLeQ.js → kaiAgent-CUeT53-K.js} +5 -5
- package/dist/{kaiAgent-xBpUwLeQ.js.map → kaiAgent-CUeT53-K.js.map} +1 -1
- package/dist/{kaiMemory-U0DG-CpY.cjs → kaiMemory-Cf81ghNd.cjs} +2 -2
- package/dist/{kaiMemory-U0DG-CpY.cjs.map → kaiMemory-Cf81ghNd.cjs.map} +1 -1
- package/dist/{kaiMemory-BAniZZAN.js → kaiMemory-DaOh0zVn.js} +2 -2
- package/dist/{kaiMemory-BAniZZAN.js.map → kaiMemory-DaOh0zVn.js.map} +1 -1
- package/dist/management/index.cjs +1 -1
- package/dist/management/index.d.cts +1 -1
- package/dist/management/index.d.ts +1 -1
- package/dist/management/index.js +1 -1
- package/dist/management/types.d.cts +2 -2
- package/dist/management/types.d.ts +2 -2
- package/dist/{management-5597SiC7.cjs → management-C5lf9nsU.cjs} +31 -6
- package/dist/management-C5lf9nsU.cjs.map +1 -0
- package/dist/{management-D46KlXts.js → management-WAtKH6Tu.js} +31 -6
- package/dist/management-WAtKH6Tu.js.map +1 -0
- package/dist/metastore/index.cjs +1 -1
- package/dist/metastore/index.js +1 -1
- package/dist/{metastore-_OskcLGz.js → metastore-D0C6uaPX.js} +4 -4
- package/dist/{metastore-_OskcLGz.js.map → metastore-D0C6uaPX.js.map} +1 -1
- package/dist/{metastore-DwMFlP2d.cjs → metastore-YPHUK3jJ.cjs} +4 -4
- package/dist/{metastore-DwMFlP2d.cjs.map → metastore-YPHUK3jJ.cjs.map} +1 -1
- package/dist/microsoftGraph/index.cjs +2 -2
- package/dist/microsoftGraph/index.d.cts +2 -1
- package/dist/microsoftGraph/index.d.ts +2 -1
- package/dist/microsoftGraph/index.js +2 -2
- package/dist/microsoftGraph/types.d.cts +1 -1
- package/dist/microsoftGraph/types.d.ts +1 -1
- package/dist/{middleware-xhg2r2fE.cjs → middleware-D_p5TctO.cjs} +2 -2
- package/dist/{middleware-xhg2r2fE.cjs.map → middleware-D_p5TctO.cjs.map} +1 -1
- package/dist/{middleware-Drbo_UIZ.js → middleware-DmR6OhTY.js} +2 -2
- package/dist/{middleware-Drbo_UIZ.js.map → middleware-DmR6OhTY.js.map} +1 -1
- package/dist/notifications/index.cjs +3 -3
- package/dist/notifications/index.js +3 -3
- package/dist/oauth/index.cjs +1 -1
- package/dist/oauth/index.d.cts +1 -1
- package/dist/oauth/index.d.ts +1 -1
- 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-TWwAv-va.js → oauth-Ck_Fe14o.js} +5 -5
- package/dist/{oauth-TWwAv-va.js.map → oauth-Ck_Fe14o.js.map} +1 -1
- package/dist/{oauth-L0Uic3YA.cjs → oauth-DyUwTqHJ.cjs} +5 -5
- package/dist/{oauth-L0Uic3YA.cjs.map → oauth-DyUwTqHJ.cjs.map} +1 -1
- package/dist/omnisearch/index.cjs +2 -2
- package/dist/omnisearch/index.d.cts +1 -1
- package/dist/omnisearch/index.d.ts +1 -1
- 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/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-CdtogGr7.js → queryService-OgdbrBjA.js} +6 -6
- package/dist/{queryService-CdtogGr7.js.map → queryService-OgdbrBjA.js.map} +1 -1
- package/dist/{queryService-Dx6AdxOl.cjs → queryService-e2ql5eev.cjs} +6 -6
- package/dist/{queryService-Dx6AdxOl.cjs.map → queryService-e2ql5eev.cjs.map} +1 -1
- package/dist/queue/index.cjs +1 -1
- package/dist/queue/index.d.cts +1 -1
- package/dist/queue/index.d.ts +1 -1
- package/dist/queue/index.js +1 -1
- package/dist/{queue-f2xsjy0o.js → queue-BZwZuZZx.js} +7 -32
- package/dist/queue-BZwZuZZx.js.map +1 -0
- package/dist/{queue-wIdnMtaZ.cjs → queue-DGoMbK1X.cjs} +7 -38
- package/dist/{queue-f2xsjy0o.js.map → queue-DGoMbK1X.cjs.map} +1 -1
- package/dist/scheduler/index.cjs +3 -3
- package/dist/scheduler/index.d.cts +13 -1
- package/dist/scheduler/index.d.ts +13 -1
- 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 → schema-DJa9WBjR.d.cts} +28 -1
- package/dist/{schema-D1oxyn1O.d.ts → schema-DJa9WBjR.d.ts} +28 -1
- package/dist/sdk/configurations/index.d.cts +3 -3
- package/dist/sdk/configurations/index.d.ts +3 -3
- package/dist/sdk/developerPortal/index.cjs +3 -3
- package/dist/sdk/developerPortal/index.d.cts +13 -8
- package/dist/sdk/developerPortal/index.d.ts +13 -8
- package/dist/sdk/developerPortal/index.js +3 -3
- package/dist/sdk/kaiMemory/index.cjs +1 -1
- package/dist/sdk/kaiMemory/index.js +1 -1
- package/dist/sdk/queryService/index.cjs +1 -1
- package/dist/sdk/queryService/index.d.cts +1 -1
- package/dist/sdk/queryService/index.d.ts +1 -1
- package/dist/sdk/queryService/index.js +1 -1
- package/dist/sdk/semanticLayer/index.cjs +1 -1
- package/dist/sdk/semanticLayer/index.js +1 -1
- package/dist/sdk/storage/index.d.cts +1 -1
- package/dist/sdk/storage/index.d.ts +1 -1
- package/dist/sdk/vault/index.d.cts +1 -1
- package/dist/sdk/vault/index.d.ts +1 -1
- package/dist/{semanticLayer-D3NDh_QH.cjs → semanticLayer-Cz22bIjd.cjs} +2 -2
- package/dist/{semanticLayer-D3NDh_QH.cjs.map → semanticLayer-Cz22bIjd.cjs.map} +1 -1
- package/dist/{semanticLayer-Ddg0LSnt.js → semanticLayer-JSE51K68.js} +2 -2
- package/dist/{semanticLayer-Ddg0LSnt.js.map → semanticLayer-JSE51K68.js.map} +1 -1
- package/dist/{serviceIds-DC-H6ZD9.d.ts → serviceIds-DRcoTnSd.d.cts} +1 -2
- package/dist/{serviceIds-DC-H6ZD9.d.cts → serviceIds-DRcoTnSd.d.ts} +1 -2
- package/dist/status/index.cjs +1 -1
- package/dist/status/index.js +1 -1
- package/dist/storage/index.cjs +4 -4
- package/dist/storage/index.d.cts +1 -1
- package/dist/storage/index.d.ts +1 -1
- package/dist/storage/index.js +4 -4
- package/dist/storage/types.d.cts +3 -3
- package/dist/storage/types.d.ts +3 -3
- package/dist/{storage-CXQTTVXl.cjs → storage-B4AnXas_.cjs} +35 -24
- package/dist/storage-B4AnXas_.cjs.map +1 -0
- package/dist/{storage-BkdjgtCU.js → storage-CsdA47AL.js} +35 -24
- package/dist/storage-CsdA47AL.js.map +1 -0
- package/dist/stream/index.cjs +3 -3
- package/dist/stream/index.js +3 -3
- package/dist/syncActions/index.cjs +1 -1
- package/dist/syncActions/index.js +1 -1
- package/dist/{syncActions-BQ8kMgL6.js → syncActions-BvFUa9xV.js} +5 -5
- package/dist/{syncActions-BQ8kMgL6.js.map → syncActions-BvFUa9xV.js.map} +1 -1
- package/dist/{syncActions-DyxNmbUR.cjs → syncActions-DlNPhZY4.cjs} +5 -5
- package/dist/{syncActions-DyxNmbUR.cjs.map → syncActions-DlNPhZY4.cjs.map} +1 -1
- package/dist/telemetry/index.cjs +3 -3
- package/dist/telemetry/index.js +3 -3
- package/dist/{types-n4PTnLii.d.ts → types-AYX7VtS6.d.ts} +179 -2
- package/dist/{types-CZXPu3gn.d.ts → types-BBUZ9EHs.d.ts} +4 -1
- package/dist/{types-CP_LBmw3.d.cts → types-BhOUS9j1.d.cts} +26 -3
- package/dist/{types-tKkeLa2B.d.cts → types-BiEh5c_t.d.cts} +60 -8
- package/dist/{types-RbrfiY8T.d.ts → types-CAp1VexS.d.ts} +3 -3
- package/dist/{types-DinIJ1D_.d.cts → types-CBPKpLTf.d.cts} +179 -2
- package/dist/{types-BLNB882w.d.cts → types-CGm2fQKK.d.cts} +187 -5
- package/dist/{types-BgVt8SUY.d.cts → types-CLHaZv9f.d.cts} +17 -13
- package/dist/{types-DE9hgr7i.d.cts → types-CgBzm1YR.d.cts} +106 -1
- package/dist/{types-BzPuxmaR.d.cts → types-D1A4mAG0.d.cts} +2 -2
- package/dist/{types-C0rVtqz2.d.ts → types-D8pGSkRe.d.ts} +17 -13
- package/dist/{types-B61aCifg.d.cts → types-D9axmt5o.d.cts} +4 -1
- package/dist/{types-BWmLo73i.d.cts → types-DVt0qlzI.d.cts} +14 -3
- package/dist/{types-CWyXTMwy.d.ts → types-DaMmgW-O.d.ts} +106 -1
- package/dist/{types-R3AFJD6r.d.ts → types-DazRtukc.d.ts} +14 -3
- package/dist/{types-2Do0DZ60.d.ts → types-DxN2siRW.d.ts} +2 -2
- package/dist/{types-q-1r_9d1.d.ts → types-DzV6LaZq.d.ts} +60 -8
- package/dist/{types-DIiOMV-t.d.ts → types-Fs4a3mVs.d.ts} +187 -5
- package/dist/{types-6kuMW4JW.d.cts → types-c_bsDkV6.d.cts} +3 -3
- package/dist/{types-DgJeO9Nd.d.ts → types-gcAb6olM.d.ts} +26 -3
- package/dist/{validateConnectionStatus-gFsBi5FV.js → validateConnectionStatus-CdTV3gsP.js} +3 -3
- package/dist/{validateConnectionStatus-gFsBi5FV.js.map → validateConnectionStatus-CdTV3gsP.js.map} +1 -1
- package/dist/{validateConnectionStatus-Ca1uEizv.cjs → validateConnectionStatus-DR-0h35y.cjs} +3 -3
- package/dist/{validateConnectionStatus-Ca1uEizv.cjs.map → validateConnectionStatus-DR-0h35y.cjs.map} +1 -1
- package/dist/vault/index.cjs +31 -6
- package/dist/vault/index.cjs.map +1 -1
- package/dist/vault/index.d.cts +1 -1
- package/dist/vault/index.d.ts +1 -1
- package/dist/vault/index.js +31 -6
- package/dist/vault/index.js.map +1 -1
- package/dist/vault/types.d.cts +1 -1
- package/dist/vault/types.d.ts +1 -1
- package/package.json +1 -27
- package/surface/dataScience.md +3 -2
- package/surface/kaiAgent.md +1 -1
- package/surface/management.md +2 -0
- package/surface/scheduler.md +3 -3
- package/surface/storage.md +7 -7
- package/surface/vault.md +1 -0
- package/dist/businessWorkspaceApi/index.cjs +0 -3
- package/dist/businessWorkspaceApi/index.d.cts +0 -2
- package/dist/businessWorkspaceApi/index.d.ts +0 -2
- package/dist/businessWorkspaceApi/index.js +0 -2
- package/dist/businessWorkspaceApi/types.cjs +0 -0
- package/dist/businessWorkspaceApi/types.d.cts +0 -2
- package/dist/businessWorkspaceApi/types.d.ts +0 -2
- package/dist/businessWorkspaceApi/types.js +0 -1
- package/dist/businessWorkspaceApi-DFky1k61.js +0 -61
- package/dist/businessWorkspaceApi-DFky1k61.js.map +0 -1
- package/dist/businessWorkspaceApi-Uzqu0PJM.cjs +0 -66
- package/dist/businessWorkspaceApi-Uzqu0PJM.cjs.map +0 -1
- package/dist/businessWorkspaceApiClient-BHDJlHFo.d.cts +0 -529
- package/dist/businessWorkspaceApiClient-DI-z1VIH.d.ts +0 -529
- package/dist/constants-C2tYAJSj.js.map +0 -1
- package/dist/constants-C6xku_Vx.cjs.map +0 -1
- package/dist/createFetchClient-BgihytBn.cjs.map +0 -1
- package/dist/createFetchClient-cgWkwgAQ.js.map +0 -1
- package/dist/dataScience-BoS8Xfvx.cjs.map +0 -1
- package/dist/dataScience-BxRoGfnG.js.map +0 -1
- package/dist/jobStatus-BMlsyXWI.cjs.map +0 -1
- package/dist/management-5597SiC7.cjs.map +0 -1
- package/dist/management-D46KlXts.js.map +0 -1
- package/dist/queue-wIdnMtaZ.cjs.map +0 -1
- package/dist/storage-BkdjgtCU.js.map +0 -1
- package/dist/storage-CXQTTVXl.cjs.map +0 -1
- package/surface/businessWorkspaceApi.md +0 -12
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants-BDGRQqij.cjs","names":[],"sources":["../src/constants/projectFeatures.ts","../src/constants/backends.ts","../src/constants/serviceIds.ts","../src/constants/stacks.ts","../src/constants/index.ts"],"sourcesContent":["export const ProjectFeature = {\n DisableLegacyBucketPrefix: 'disable-legacy-bucket-prefix',\n SoxProtectedDefaultBranch: 'protected-default-branch',\n StorageBranches: 'storage-branches',\n} as const;\n\nexport type ProjectFeature = (typeof ProjectFeature)[keyof typeof ProjectFeature];\n","export const Backend = {\n Snowflake: 'snowflake',\n Bigquery: 'bigquery',\n} as const;\n\nexport type Backend = (typeof Backend)[keyof typeof Backend];\n","/**\n * Every service a Keboola stack can announce in its `GET /v2/storage` index.\n *\n * - The values are the `id`s the stack reports; `Service['id']` and the service-client registry\n * both narrow on them.\n * - Callers enumerate them at runtime — a test double announcing every service, for one.\n */\nexport const ServiceId = {\n Vault: 'vault',\n DataScience: 'data-science',\n Encryption: 'encryption',\n Telemetry: 'telemetry',\n Ai: 'ai',\n Editor: 'editor',\n Import: 'import',\n Oauth: 'oauth',\n Query: 'query',\n Queue: 'queue',\n KaiAssistant: 'kai-assistant',\n KaiAgent: 'kai-agent',\n SyncActions: 'sync-actions',\n Stream: 'stream',\n Notification: 'notification',\n Scheduler: 'scheduler',\n Metastore: 'metastore',\n Billing: 'billing',\n} as const;\n\nexport type ServiceId = (typeof ServiceId)[keyof typeof ServiceId];\n","export const Provider = {\n Aws: 'aws',\n Azure: 'azure',\n Gcp: 'gcp',\n} as const;\n\nexport type Provider = (typeof Provider)[keyof typeof Provider];\n\nexport const Continent = {\n Us: 'us',\n Europe: 'europe',\n} as const;\n\nexport type Continent = (typeof Continent)[keyof typeof Continent];\n\nexport type KeboolaStack = {\n id: string;\n host: string;\n isSingleTenant?: boolean;\n isTesting?: boolean;\n isPayg?: boolean;\n provider?: Provider;\n continent?: Continent;\n region?: string;\n isCanary?: boolean;\n};\n\nconst stacks = {\n NORTH_EUROPE_AZURE: {\n id: 'com-keboola-azure-north-europe',\n region: 'north-europe',\n host: 'connection.north-europe.azure.keboola.com',\n provider: 'azure',\n continent: 'europe',\n isPayg: true,\n },\n EU_CENTRAL_1_AWS: {\n id: 'kbc-eu-central-1',\n region: 'eu-central-1',\n host: 'connection.eu-central-1.keboola.com',\n provider: 'aws',\n continent: 'europe',\n },\n US_EAST_1_AWS: {\n id: 'kbc-us-east-1',\n region: 'us-east-1',\n host: 'connection.keboola.com',\n provider: 'aws',\n continent: 'us',\n },\n EUROPE_WEST3_GCP: {\n id: 'com-keboola-gcp-europe-west3',\n region: 'europe-west3',\n host: 'connection.europe-west3.gcp.keboola.com',\n provider: 'gcp',\n continent: 'europe',\n },\n US_EAST_4_GCP: {\n id: 'com-keboola-gcp-us-east4',\n region: 'us-east4',\n host: 'connection.us-east4.gcp.keboola.com',\n provider: 'gcp',\n continent: 'us',\n isPayg: true,\n },\n\n /* PRIVATE SINGLE TENANT STACKS\n ---------------------------- */\n HCI: {\n id: 'cloud-keboola-hci',\n host: 'connection.hci.keboola.cloud',\n isSingleTenant: true,\n },\n CSAS_PROD: {\n id: 'cloud-keboola-cs',\n host: 'connection.cs.keboola.cloud',\n isSingleTenant: true,\n },\n CSAS_TEST: {\n id: 'cloud-keboola-cs-test',\n host: 'connection.cs-test.keboola.cloud',\n isSingleTenant: true,\n },\n INNOGY: {\n id: 'cloud-keboola-innogy-hub',\n host: 'connection.innogy-hub.keboola.cloud',\n isSingleTenant: true,\n },\n GROUPON: {\n id: 'cloud-keboola-groupon',\n host: 'connection.groupon.keboola.cloud',\n isSingleTenant: true,\n },\n CREDIT_INFO: {\n id: 'cloud-keboola-creditinfo',\n host: 'connection.creditinfo.keboola.cloud',\n isSingleTenant: true,\n },\n COATES: {\n id: 'cloud-keboola-coates',\n host: 'connection.coates.keboola.cloud',\n isSingleTenant: true,\n },\n SLSP: {\n id: 'cloud-keboola-slsp',\n host: 'connection.slsp.keboola.cloud',\n isSingleTenant: true,\n },\n HCKZ: {\n id: 'cloud-keboola-hckz',\n host: 'connection.hckz.keboola.cloud',\n isSingleTenant: true,\n },\n PASHA: {\n id: 'cloud-keboola-pasha',\n host: 'connection.pasha.keboola.cloud',\n isSingleTenant: true,\n },\n RBI: {\n id: 'cloud-keboola-rbi',\n host: 'connection.rbi.keboola.cloud',\n isSingleTenant: true,\n },\n NAH: {\n id: 'cloud-keboola-nah',\n host: 'connection.nah.keboola.cloud',\n isSingleTenant: true,\n provider: 'azure',\n continent: 'us',\n },\n\n /* DEV STACKS\n ---------------------------- */\n DEV_US_CENTRAL_1_GCP: {\n id: 'dev-keboola-gcp-us-central1',\n region: 'us-central1',\n host: 'connection.us-central1.gcp.keboola.dev',\n provider: 'gcp',\n continent: 'us',\n isTesting: true,\n },\n DEV_EU_WEST_1_AWS: {\n id: 'dev-keboola-aws-eu-west-1',\n region: 'eu-west-1',\n host: 'connection.eu-west-1.aws.keboola.dev',\n provider: 'aws',\n continent: 'europe',\n isTesting: true,\n },\n DEV_US_EAST_1_AWS_E2E: {\n id: 'dev-keboola-aws-us-east-1-e2e',\n region: 'us-east-1',\n host: 'connection.e2e.us-east-1.aws.keboola.dev',\n provider: 'aws',\n continent: 'us',\n isTesting: true,\n },\n DEV_US_EAST_2_AZURE: {\n id: 'kbc-testing-azure-east-us-2',\n region: 'east-us-2',\n host: 'connection.east-us-2.azure.keboola-testing.com',\n provider: 'azure',\n continent: 'us',\n isTesting: true,\n },\n DEV_KEBOOLA_CANARY_ORION: {\n id: 'dev-keboola-canary-orion',\n region: 'europe-west3',\n host: 'connection.canary-orion.keboola.dev',\n provider: 'gcp',\n continent: 'europe',\n isCanary: true,\n },\n} satisfies Record<string, Readonly<KeboolaStack>>;\n\n/**\n * Every stack the platform knows, keyed by name.\n *\n * - The key set is literal, so a name that is not in the object is a compile error at the call site\n * rather than an `undefined` to fall back from.\n * - The value type stays the uniform `KeboolaStack`, so `stack.isCanary` reads on any entry, not\n * only on the ones that carry the flag.\n */\nexport const STACKS: Record<keyof typeof stacks, Readonly<KeboolaStack>> = stacks;\n","export { ComponentId } from './componentId';\nexport { ProjectFeature } from './projectFeatures';\nexport { Backend } from './backends';\nexport { AdminRole } from './adminRoles';\nexport { ServiceId } from './serviceIds';\nexport { Continent, Provider, STACKS } from './stacks';\nexport type { KeboolaStack } from './stacks';\n\nexport const URLS = {\n USER_DOCUMENTATION: 'https://help.keboola.com',\n COMPONENTS: 'https://components.keboola.com',\n DEVELOPERS_DOCUMENTATION: 'https://developers.keboola.com',\n ACADEMY: 'https://academy.keboola.com',\n SALES_CONTACT_FORM: 'https://keboola.com/contact',\n SNOWFLAKE: 'https://www.snowflake.com',\n SNOWFLAKE_DOCS: 'https://docs.snowflake.com',\n MCP: 'https://www.keboola.com/mcp',\n CLI: 'https://www.keboola.com/cli',\n NODE_JS: 'https://nodejs.org/en',\n CLAUDE_CONNECTORS: 'https://claude.ai/customize/connectors',\n // Vendor \"how do I get this client\" pages linked from the connect surfaces.\n CLIENT_CLAUDE_CODE_QUICKSTART: 'https://code.claude.com/docs/en/quickstart',\n CLIENT_CLAUDE_AI: 'https://claude.ai',\n CLIENT_CLAUDE_DESKTOP_DOWNLOAD: 'https://claude.com/download',\n CLIENT_CURSOR_QUICKSTART: 'https://cursor.com/docs/get-started/quickstart',\n CLIENT_VS_CODE_SETUP: 'https://code.visualstudio.com/docs/setup/setup-overview',\n CLIENT_CODEX_QUICKSTART: 'https://developers.openai.com/codex/cli',\n CLIENT_CHATGPT_DOWNLOAD: 'https://chatgpt.com/download',\n CLIENT_MAKE_GET_STARTED: 'https://help.make.com/get-started',\n CLIENT_DEVIN_DESKTOP: 'https://docs.devin.ai/desktop/getting-started',\n} as const;\n"],"mappings":";AAAA,MAAa,iBAAiB;CAC5B,2BAA2B;CAC3B,2BAA2B;CAC3B,iBAAiB;AACnB;;;ACJA,MAAa,UAAU;CACrB,WAAW;CACX,UAAU;AACZ;;;;;;;;;;ACIA,MAAa,YAAY;CACvB,OAAO;CACP,aAAa;CACb,YAAY;CACZ,WAAW;CACX,IAAI;CACJ,QAAQ;CACR,QAAQ;CACR,OAAO;CACP,OAAO;CACP,OAAO;CACP,cAAc;CACd,UAAU;CACV,aAAa;CACb,QAAQ;CACR,cAAc;CACd,WAAW;CACX,WAAW;CACX,SAAS;AACX;;;AC1BA,MAAa,WAAW;CACtB,KAAK;CACL,OAAO;CACP,KAAK;AACP;AAIA,MAAa,YAAY;CACvB,IAAI;CACJ,QAAQ;AACV;;;;;;;;;AA4KA,MAAa,SAA8D;CA3JzE,oBAAoB;EAClB,IAAI;EACJ,QAAQ;EACR,MAAM;EACN,UAAU;EACV,WAAW;EACX,QAAQ;CACV;CACA,kBAAkB;EAChB,IAAI;EACJ,QAAQ;EACR,MAAM;EACN,UAAU;EACV,WAAW;CACb;CACA,eAAe;EACb,IAAI;EACJ,QAAQ;EACR,MAAM;EACN,UAAU;EACV,WAAW;CACb;CACA,kBAAkB;EAChB,IAAI;E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AAWyE;;;AC/K3E,MAAa,OAAO;CAClB,oBAAoB;CACpB,YAAY;CACZ,0BAA0B;CAC1B,SAAS;CACT,oBAAoB;CACpB,WAAW;CACX,gBAAgB;CAChB,KAAK;CACL,KAAK;CACL,SAAS;CACT,mBAAmB;CAEnB,+BAA+B;CAC/B,kBAAkB;CAClB,gCAAgC;CAChC,0BAA0B;CAC1B,sBAAsB;CACtB,yBAAyB;CACzB,yBAAyB;CACzB,yBAAyB;CACzB,sBAAsB;AACxB"}
|
|
@@ -32,7 +32,6 @@ const ServiceId = {
|
|
|
32
32
|
Queue: "queue",
|
|
33
33
|
KaiAssistant: "kai-assistant",
|
|
34
34
|
KaiAgent: "kai-agent",
|
|
35
|
-
BusinessWorkspaceApi: "business-workspace",
|
|
36
35
|
SyncActions: "sync-actions",
|
|
37
36
|
Stream: "stream",
|
|
38
37
|
Notification: "notification",
|
|
@@ -227,4 +226,4 @@ const URLS = {
|
|
|
227
226
|
//#endregion
|
|
228
227
|
export { ServiceId as a, STACKS as i, Continent as n, Backend as o, Provider as r, ProjectFeature as s, URLS as t };
|
|
229
228
|
|
|
230
|
-
//# sourceMappingURL=constants-
|
|
229
|
+
//# sourceMappingURL=constants-Cifrqsls.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants-Cifrqsls.js","names":[],"sources":["../src/constants/projectFeatures.ts","../src/constants/backends.ts","../src/constants/serviceIds.ts","../src/constants/stacks.ts","../src/constants/index.ts"],"sourcesContent":["export const ProjectFeature = {\n DisableLegacyBucketPrefix: 'disable-legacy-bucket-prefix',\n SoxProtectedDefaultBranch: 'protected-default-branch',\n StorageBranches: 'storage-branches',\n} as const;\n\nexport type ProjectFeature = (typeof ProjectFeature)[keyof typeof ProjectFeature];\n","export const Backend = {\n Snowflake: 'snowflake',\n Bigquery: 'bigquery',\n} as const;\n\nexport type Backend = (typeof Backend)[keyof typeof Backend];\n","/**\n * Every service a Keboola stack can announce in its `GET /v2/storage` index.\n *\n * - The values are the `id`s the stack reports; `Service['id']` and the service-client registry\n * both narrow on them.\n * - Callers enumerate them at runtime — a test double announcing every service, for one.\n */\nexport const ServiceId = {\n Vault: 'vault',\n DataScience: 'data-science',\n Encryption: 'encryption',\n Telemetry: 'telemetry',\n Ai: 'ai',\n Editor: 'editor',\n Import: 'import',\n Oauth: 'oauth',\n Query: 'query',\n Queue: 'queue',\n KaiAssistant: 'kai-assistant',\n KaiAgent: 'kai-agent',\n SyncActions: 'sync-actions',\n Stream: 'stream',\n Notification: 'notification',\n Scheduler: 'scheduler',\n Metastore: 'metastore',\n Billing: 'billing',\n} as const;\n\nexport type ServiceId = (typeof ServiceId)[keyof typeof ServiceId];\n","export const Provider = {\n Aws: 'aws',\n Azure: 'azure',\n Gcp: 'gcp',\n} as const;\n\nexport type Provider = (typeof Provider)[keyof typeof Provider];\n\nexport const Continent = {\n Us: 'us',\n Europe: 'europe',\n} as const;\n\nexport type Continent = (typeof Continent)[keyof typeof Continent];\n\nexport type KeboolaStack = {\n id: string;\n host: string;\n isSingleTenant?: boolean;\n isTesting?: boolean;\n isPayg?: boolean;\n provider?: Provider;\n continent?: Continent;\n region?: string;\n isCanary?: boolean;\n};\n\nconst stacks = {\n NORTH_EUROPE_AZURE: {\n id: 'com-keboola-azure-north-europe',\n region: 'north-europe',\n host: 'connection.north-europe.azure.keboola.com',\n provider: 'azure',\n continent: 'europe',\n isPayg: true,\n },\n EU_CENTRAL_1_AWS: {\n id: 'kbc-eu-central-1',\n region: 'eu-central-1',\n host: 'connection.eu-central-1.keboola.com',\n provider: 'aws',\n continent: 'europe',\n },\n US_EAST_1_AWS: {\n id: 'kbc-us-east-1',\n region: 'us-east-1',\n host: 'connection.keboola.com',\n provider: 'aws',\n continent: 'us',\n },\n EUROPE_WEST3_GCP: {\n id: 'com-keboola-gcp-europe-west3',\n region: 'europe-west3',\n host: 'connection.europe-west3.gcp.keboola.com',\n provider: 'gcp',\n continent: 'europe',\n },\n US_EAST_4_GCP: {\n id: 'com-keboola-gcp-us-east4',\n region: 'us-east4',\n host: 'connection.us-east4.gcp.keboola.com',\n provider: 'gcp',\n continent: 'us',\n isPayg: true,\n },\n\n /* PRIVATE SINGLE TENANT STACKS\n ---------------------------- */\n HCI: {\n id: 'cloud-keboola-hci',\n host: 'connection.hci.keboola.cloud',\n isSingleTenant: true,\n },\n CSAS_PROD: {\n id: 'cloud-keboola-cs',\n host: 'connection.cs.keboola.cloud',\n isSingleTenant: true,\n },\n CSAS_TEST: {\n id: 'cloud-keboola-cs-test',\n host: 'connection.cs-test.keboola.cloud',\n isSingleTenant: true,\n },\n INNOGY: {\n id: 'cloud-keboola-innogy-hub',\n host: 'connection.innogy-hub.keboola.cloud',\n isSingleTenant: true,\n },\n GROUPON: {\n id: 'cloud-keboola-groupon',\n host: 'connection.groupon.keboola.cloud',\n isSingleTenant: true,\n },\n CREDIT_INFO: {\n id: 'cloud-keboola-creditinfo',\n host: 'connection.creditinfo.keboola.cloud',\n isSingleTenant: true,\n },\n COATES: {\n id: 'cloud-keboola-coates',\n host: 'connection.coates.keboola.cloud',\n isSingleTenant: true,\n },\n SLSP: {\n id: 'cloud-keboola-slsp',\n host: 'connection.slsp.keboola.cloud',\n isSingleTenant: true,\n },\n HCKZ: {\n id: 'cloud-keboola-hckz',\n host: 'connection.hckz.keboola.cloud',\n isSingleTenant: true,\n },\n PASHA: {\n id: 'cloud-keboola-pasha',\n host: 'connection.pasha.keboola.cloud',\n isSingleTenant: true,\n },\n RBI: {\n id: 'cloud-keboola-rbi',\n host: 'connection.rbi.keboola.cloud',\n isSingleTenant: true,\n },\n NAH: {\n id: 'cloud-keboola-nah',\n host: 'connection.nah.keboola.cloud',\n isSingleTenant: true,\n provider: 'azure',\n continent: 'us',\n },\n\n /* DEV STACKS\n ---------------------------- */\n DEV_US_CENTRAL_1_GCP: {\n id: 'dev-keboola-gcp-us-central1',\n region: 'us-central1',\n host: 'connection.us-central1.gcp.keboola.dev',\n provider: 'gcp',\n continent: 'us',\n isTesting: true,\n },\n DEV_EU_WEST_1_AWS: {\n id: 'dev-keboola-aws-eu-west-1',\n region: 'eu-west-1',\n host: 'connection.eu-west-1.aws.keboola.dev',\n provider: 'aws',\n continent: 'europe',\n isTesting: true,\n },\n DEV_US_EAST_1_AWS_E2E: {\n id: 'dev-keboola-aws-us-east-1-e2e',\n region: 'us-east-1',\n host: 'connection.e2e.us-east-1.aws.keboola.dev',\n provider: 'aws',\n continent: 'us',\n isTesting: true,\n },\n DEV_US_EAST_2_AZURE: {\n id: 'kbc-testing-azure-east-us-2',\n region: 'east-us-2',\n host: 'connection.east-us-2.azure.keboola-testing.com',\n provider: 'azure',\n continent: 'us',\n isTesting: true,\n },\n DEV_KEBOOLA_CANARY_ORION: {\n id: 'dev-keboola-canary-orion',\n region: 'europe-west3',\n host: 'connection.canary-orion.keboola.dev',\n provider: 'gcp',\n continent: 'europe',\n isCanary: true,\n },\n} satisfies Record<string, Readonly<KeboolaStack>>;\n\n/**\n * Every stack the platform knows, keyed by name.\n *\n * - The key set is literal, so a name that is not in the object is a compile error at the call site\n * rather than an `undefined` to fall back from.\n * - The value type stays the uniform `KeboolaStack`, so `stack.isCanary` reads on any entry, not\n * only on the ones that carry the flag.\n */\nexport const STACKS: Record<keyof typeof stacks, Readonly<KeboolaStack>> = stacks;\n","export { ComponentId } from './componentId';\nexport { ProjectFeature } from './projectFeatures';\nexport { Backend } from './backends';\nexport { AdminRole } from './adminRoles';\nexport { ServiceId } from './serviceIds';\nexport { Continent, Provider, STACKS } from './stacks';\nexport type { KeboolaStack } from './stacks';\n\nexport const URLS = {\n USER_DOCUMENTATION: 'https://help.keboola.com',\n COMPONENTS: 'https://components.keboola.com',\n DEVELOPERS_DOCUMENTATION: 'https://developers.keboola.com',\n ACADEMY: 'https://academy.keboola.com',\n SALES_CONTACT_FORM: 'https://keboola.com/contact',\n SNOWFLAKE: 'https://www.snowflake.com',\n SNOWFLAKE_DOCS: 'https://docs.snowflake.com',\n MCP: 'https://www.keboola.com/mcp',\n CLI: 'https://www.keboola.com/cli',\n NODE_JS: 'https://nodejs.org/en',\n CLAUDE_CONNECTORS: 'https://claude.ai/customize/connectors',\n // Vendor \"how do I get this client\" pages linked from the connect surfaces.\n CLIENT_CLAUDE_CODE_QUICKSTART: 'https://code.claude.com/docs/en/quickstart',\n CLIENT_CLAUDE_AI: 'https://claude.ai',\n CLIENT_CLAUDE_DESKTOP_DOWNLOAD: 'https://claude.com/download',\n CLIENT_CURSOR_QUICKSTART: 'https://cursor.com/docs/get-started/quickstart',\n CLIENT_VS_CODE_SETUP: 'https://code.visualstudio.com/docs/setup/setup-overview',\n CLIENT_CODEX_QUICKSTART: 'https://developers.openai.com/codex/cli',\n CLIENT_CHATGPT_DOWNLOAD: 'https://chatgpt.com/download',\n CLIENT_MAKE_GET_STARTED: 'https://help.make.com/get-started',\n CLIENT_DEVIN_DESKTOP: 'https://docs.devin.ai/desktop/getting-started',\n} as const;\n"],"mappings":";AAAA,MAAa,iBAAiB;CAC5B,2BAA2B;CAC3B,2BAA2B;CAC3B,iBAAiB;AACnB;;;ACJA,MAAa,UAAU;CACrB,WAAW;CACX,UAAU;AACZ;;;;;;;;;;ACIA,MAAa,YAAY;CACvB,OAAO;CACP,aAAa;CACb,YAAY;CACZ,WAAW;CACX,IAAI;CACJ,QAAQ;CACR,QAAQ;CACR,OAAO;CACP,OAAO;CACP,OAAO;CACP,cAAc;CACd,UAAU;CACV,aAAa;CACb,QAAQ;CACR,cAAc;CACd,WAAW;CACX,WAAW;CACX,SAAS;AACX;;;AC1BA,MAAa,WAAW;CACtB,KAAK;CACL,OAAO;CACP,KAAK;AACP;AAIA,MAAa,YAAY;CACvB,IAAI;CACJ,QAAQ;AACV;;;;;;;;;AA4KA,MAAa,SAA8D;CA3JzE,oBAAoB;EAClB,IAAI;EACJ,QAAQ;EACR,MAAM;EACN,UAAU;EACV,WAAW;EACX,QAAQ;CACV;CACA,kBAAkB;EAChB,IAAI;EACJ,QAAQ;EACR,MAAM;EACN,U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AAU;EACV,WAAW;EACX,WAAW;CACb;CACA,0BAA0B;EACxB,IAAI;EACJ,QAAQ;EACR,MAAM;EACN,UAAU;EACV,WAAW;EACX,UAAU;CACZ;AAWyE;;;AC/K3E,MAAa,OAAO;CAClB,oBAAoB;CACpB,YAAY;CACZ,0BAA0B;CAC1B,SAAS;CACT,oBAAoB;CACpB,WAAW;CACX,gBAAgB;CAChB,KAAK;CACL,KAAK;CACL,SAAS;CACT,mBAAmB;CAEnB,+BAA+B;CAC/B,kBAAkB;CAClB,gCAAgC;CAChC,0BAA0B;CAC1B,sBAAsB;CACtB,yBAAyB;CACzB,yBAAyB;CACzB,yBAAyB;CACzB,sBAAsB;AACxB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createAbortError-BxupOt-6.js","names":[],"sources":["../src/utils/createAbortError.ts"],"sourcesContent":["export const createAbortError = (reason?: string) => new DOMException(reason, 'AbortError');\n"],"mappings":";AAAA,MAAa,oBAAoB,WAAoB,IAAI,aAAa,QAAQ,YAAY"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
//#region src/utils/createAbortError.ts
|
|
2
|
+
const createAbortError = (reason) => new DOMException(reason, "AbortError");
|
|
3
|
+
//#endregion
|
|
4
|
+
Object.defineProperty(exports, "createAbortError", {
|
|
5
|
+
enumerable: true,
|
|
6
|
+
get: function() {
|
|
7
|
+
return createAbortError;
|
|
8
|
+
}
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
//# sourceMappingURL=createAbortError-RendOpo7.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createAbortError-RendOpo7.cjs","names":[],"sources":["../src/utils/createAbortError.ts"],"sourcesContent":["export const createAbortError = (reason?: string) => new DOMException(reason, 'AbortError');\n"],"mappings":";AAAA,MAAa,oBAAoB,WAAoB,IAAI,aAAa,QAAQ,YAAY"}
|
|
@@ -1,30 +1,6 @@
|
|
|
1
1
|
const require_rolldown_runtime = require("./rolldown-runtime-VH7oDXx4.cjs");
|
|
2
2
|
let qs = require("qs");
|
|
3
3
|
qs = require_rolldown_runtime.__toESM(qs, 1);
|
|
4
|
-
//#region src/errors/ApiError.ts
|
|
5
|
-
/**
|
|
6
|
-
* The status line, as a message an error reporter can group on.
|
|
7
|
-
*
|
|
8
|
-
* - `statusText` is empty on every HTTP/2 response: the protocol dropped the reason phrase, and
|
|
9
|
-
* `fetch` reports that as `''` rather than synthesising one.
|
|
10
|
-
* - So the status number leads, and `statusText` only decorates it where a server sent one.
|
|
11
|
-
* - Without this an HTTP/2 failure reaches Sentry as `Error:` with an empty message, and the
|
|
12
|
-
* status — the one field that says what went wrong — is absent from the report.
|
|
13
|
-
*/
|
|
14
|
-
const statusLine = (response) => response.statusText ? `${response.status} ${response.statusText}` : `${response.status}`;
|
|
15
|
-
var ApiError = class extends Error {
|
|
16
|
-
response;
|
|
17
|
-
request;
|
|
18
|
-
data;
|
|
19
|
-
constructor({ response, request, data }) {
|
|
20
|
-
super(statusLine(response));
|
|
21
|
-
this.name = "ApiError";
|
|
22
|
-
this.response = response;
|
|
23
|
-
this.request = request;
|
|
24
|
-
this.data = data;
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
//#endregion
|
|
28
4
|
//#region src/internal.ts
|
|
29
5
|
const KeboolaHttpHeader = {
|
|
30
6
|
STORAGE_API_TOKEN: "X-StorageApi-Token",
|
|
@@ -37,6 +13,23 @@ const KeboolaHttpHeader = {
|
|
|
37
13
|
/** Set to "1" to opt an auth call into browser/cookie mode. */
|
|
38
14
|
CSRF: "X-KBC-CSRF"
|
|
39
15
|
};
|
|
16
|
+
/** Request headers that carry a credential — never kept on an error or written to a log. */
|
|
17
|
+
const CREDENTIAL_HEADERS = [
|
|
18
|
+
KeboolaHttpHeader.STORAGE_API_TOKEN,
|
|
19
|
+
KeboolaHttpHeader.MANAGEMENT_API_TOKEN,
|
|
20
|
+
"authorization",
|
|
21
|
+
"cookie"
|
|
22
|
+
];
|
|
23
|
+
const REDACTED = "[REDACTED]";
|
|
24
|
+
/** The headers as a record, each one named in `redacted` (any case) set to `[REDACTED]`. */
|
|
25
|
+
const redactHeaders = (headers, redacted) => {
|
|
26
|
+
const redactedSet = new Set(redacted.map((name) => name.toLowerCase()));
|
|
27
|
+
const result = {};
|
|
28
|
+
headers.forEach((value, name) => {
|
|
29
|
+
result[name] = redactedSet.has(name.toLowerCase()) ? REDACTED : value;
|
|
30
|
+
});
|
|
31
|
+
return result;
|
|
32
|
+
};
|
|
40
33
|
const HttpStatus = {
|
|
41
34
|
NO_CONTENT: 204,
|
|
42
35
|
BAD_REQUEST: 400,
|
|
@@ -50,6 +43,41 @@ const HttpStatus = {
|
|
|
50
43
|
};
|
|
51
44
|
const ENCRYPTED_VALUE_PREFIX = "KBC::";
|
|
52
45
|
//#endregion
|
|
46
|
+
//#region src/errors/ApiError.ts
|
|
47
|
+
/**
|
|
48
|
+
* The status line, as a message an error reporter can group on.
|
|
49
|
+
*
|
|
50
|
+
* - `statusText` is empty on every HTTP/2 response: the protocol dropped the reason phrase, and
|
|
51
|
+
* `fetch` reports that as `''` rather than synthesising one.
|
|
52
|
+
* - So the status number leads, and `statusText` only decorates it where a server sent one.
|
|
53
|
+
* - Without this an HTTP/2 failure reaches Sentry as `Error:` with an empty message, and the
|
|
54
|
+
* status — the one field that says what went wrong — is absent from the report.
|
|
55
|
+
*/
|
|
56
|
+
const statusLine = (response) => response.statusText ? `${response.status} ${response.statusText}` : `${response.status}`;
|
|
57
|
+
/**
|
|
58
|
+
* A body-less copy of the request with every credential header masked.
|
|
59
|
+
*
|
|
60
|
+
* - Keeps the method, URL and the remaining headers for whoever handles the error.
|
|
61
|
+
* - A masked header still appears, as `[REDACTED]`, so a reader sees it was sent.
|
|
62
|
+
* - A copy, not an edit: the original request may still be retried with its token.
|
|
63
|
+
*/
|
|
64
|
+
const withoutCredentials = (request) => new Request(request.url, {
|
|
65
|
+
method: request.method,
|
|
66
|
+
headers: redactHeaders(request.headers, CREDENTIAL_HEADERS)
|
|
67
|
+
});
|
|
68
|
+
var ApiError = class extends Error {
|
|
69
|
+
response;
|
|
70
|
+
request;
|
|
71
|
+
data;
|
|
72
|
+
constructor({ response, request, data }) {
|
|
73
|
+
super(statusLine(response));
|
|
74
|
+
this.name = "ApiError";
|
|
75
|
+
this.response = response;
|
|
76
|
+
this.request = withoutCredentials(request);
|
|
77
|
+
this.data = data;
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
//#endregion
|
|
53
81
|
//#region src/fetchClient/createFetchClient/utils.ts
|
|
54
82
|
/**
|
|
55
83
|
* Strips trailing slashes from a base URL so concatenating a leading-slash
|
|
@@ -230,6 +258,12 @@ Object.defineProperty(exports, "ApiError", {
|
|
|
230
258
|
return ApiError;
|
|
231
259
|
}
|
|
232
260
|
});
|
|
261
|
+
Object.defineProperty(exports, "CREDENTIAL_HEADERS", {
|
|
262
|
+
enumerable: true,
|
|
263
|
+
get: function() {
|
|
264
|
+
return CREDENTIAL_HEADERS;
|
|
265
|
+
}
|
|
266
|
+
});
|
|
233
267
|
Object.defineProperty(exports, "ENCRYPTED_VALUE_PREFIX", {
|
|
234
268
|
enumerable: true,
|
|
235
269
|
get: function() {
|
|
@@ -260,6 +294,12 @@ Object.defineProperty(exports, "KeboolaHttpHeader", {
|
|
|
260
294
|
return KeboolaHttpHeader;
|
|
261
295
|
}
|
|
262
296
|
});
|
|
297
|
+
Object.defineProperty(exports, "REDACTED", {
|
|
298
|
+
enumerable: true,
|
|
299
|
+
get: function() {
|
|
300
|
+
return REDACTED;
|
|
301
|
+
}
|
|
302
|
+
});
|
|
263
303
|
Object.defineProperty(exports, "createFetchClient", {
|
|
264
304
|
enumerable: true,
|
|
265
305
|
get: function() {
|
|
@@ -320,5 +360,11 @@ Object.defineProperty(exports, "parseContentDispositionHeader", {
|
|
|
320
360
|
return parseContentDispositionHeader;
|
|
321
361
|
}
|
|
322
362
|
});
|
|
363
|
+
Object.defineProperty(exports, "redactHeaders", {
|
|
364
|
+
enumerable: true,
|
|
365
|
+
get: function() {
|
|
366
|
+
return redactHeaders;
|
|
367
|
+
}
|
|
368
|
+
});
|
|
323
369
|
|
|
324
|
-
//# sourceMappingURL=createFetchClient-
|
|
370
|
+
//# sourceMappingURL=createFetchClient-ClWD4ua3.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createFetchClient-ClWD4ua3.cjs","names":[],"sources":["../src/internal.ts","../src/errors/ApiError.ts","../src/fetchClient/createFetchClient/utils.ts","../src/fetchClient/createFetchClient/createFetchClient.ts"],"sourcesContent":["// 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 UI_VERSION: 'X-KBC-Ui-Version',\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 /** Set to \"1\" to opt an auth call into browser/cookie mode. */\n CSRF: 'X-KBC-CSRF',\n} as const;\n\n/** Request headers that carry a credential — never kept on an error or written to a log. */\nexport const CREDENTIAL_HEADERS = [\n KeboolaHttpHeader.STORAGE_API_TOKEN,\n KeboolaHttpHeader.MANAGEMENT_API_TOKEN,\n 'authorization',\n 'cookie',\n];\n\nexport const REDACTED = '[REDACTED]';\n\n/** The headers as a record, each one named in `redacted` (any case) set to `[REDACTED]`. */\nexport const redactHeaders = (headers: Headers, redacted: readonly string[]) => {\n const redactedSet = new Set(redacted.map((name) => name.toLowerCase()));\n const result: Record<string, string> = {};\n headers.forEach((value, name) => {\n result[name] = redactedSet.has(name.toLowerCase()) ? REDACTED : value;\n });\n return result;\n};\n\nexport const HttpStatus = {\n NO_CONTENT: 204,\n BAD_REQUEST: 400,\n UNAUTHORIZED: 401,\n NOT_FOUND: 404,\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 { ApiResponse } from '../fetchClient/createFetchClient/types';\nimport { CREDENTIAL_HEADERS, redactHeaders } from '../internal';\n\n/**\n * The status line, as a message an error reporter can group on.\n *\n * - `statusText` is empty on every HTTP/2 response: the protocol dropped the reason phrase, and\n * `fetch` reports that as `''` rather than synthesising one.\n * - So the status number leads, and `statusText` only decorates it where a server sent one.\n * - Without this an HTTP/2 failure reaches Sentry as `Error:` with an empty message, and the\n * status — the one field that says what went wrong — is absent from the report.\n */\nconst statusLine = (response: Response) =>\n response.statusText ? `${response.status} ${response.statusText}` : `${response.status}`;\n\n/**\n * A body-less copy of the request with every credential header masked.\n *\n * - Keeps the method, URL and the remaining headers for whoever handles the error.\n * - A masked header still appears, as `[REDACTED]`, so a reader sees it was sent.\n * - A copy, not an edit: the original request may still be retried with its token.\n */\nconst withoutCredentials = (request: Request) =>\n new Request(request.url, {\n method: request.method,\n headers: redactHeaders(request.headers, CREDENTIAL_HEADERS),\n });\n\nexport class ApiError extends Error {\n response: Response;\n request: Request;\n data: unknown;\n\n constructor({ response, request, data }: ApiResponse) {\n super(statusLine(response));\n this.name = 'ApiError';\n this.response = response;\n this.request = withoutCredentials(request);\n this.data = data;\n }\n}\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 declares HTML.\n *\n * - Media types are case-insensitive, so `Text/HTML` counts.\n * - A header fact only: a `text/html` response may still carry no body at all.\n */\nexport const isHtmlResponse = ({ response }: ApiResponse) =>\n !!response.headers\n .get(HttpHeader.CONTENT_TYPE)\n ?.toLowerCase()\n .includes(HttpContentType.TEXT_HTML);\n\n/**\n * Whether a response carried no payload, across every shape `parseData` produces for one:\n *\n * 1. `null` — a `204`, or a JSON body that was empty or whitespace.\n * 2. `''` — any other media type with an empty body, read as text.\n *\n * Whitespace-only text counts as empty, matching how `parseJson` already treats it.\n */\nexport const isContentEmpty = ({ data }: ApiResponse) =>\n data === null || data === undefined || (typeof data === 'string' && data.trim() === '');\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 isTimeoutError = (error: unknown): error is DOMException =>\n error instanceof DOMException && error.name === 'TimeoutError';\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 baseUrl: _baseUrl,\n ...defaultOptions\n}: CreateFetchClientOptions) => {\n const fetchWithMiddlewares = middlewares.reduceRight(\n (next, middleware) => middleware(next),\n coreFetch,\n );\n const resolveBaseUrl = async () => (typeof _baseUrl === 'function' ? _baseUrl() : _baseUrl);\n\n const createFetchMethod =\n (method: HttpMethod) =>\n async (url: string, params: BaseFetchParams, options: FetchClientOptions = {}) => {\n const baseUrl = await resolveBaseUrl();\n const request = createFetchRequest({\n url,\n method,\n params,\n defaultOptions: { ...defaultOptions, baseUrl: baseUrl },\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":";;;;AAGA,MAAa,oBAAoB;CAC/B,mBAAmB;CACnB,sBAAsB;CACtB,iBAAiB;CACjB,YAAY;CACZ,YAAY;;CAEZ,oBAAoB;;CAEpB,MAAM;AACR;;AAGA,MAAa,qBAAqB;CAChC,kBAAkB;CAClB,kBAAkB;CAClB;CACA;AACF;AAEA,MAAa,WAAW;;AAGxB,MAAa,iBAAiB,SAAkB,aAAgC;CAC9E,MAAM,cAAc,IAAI,IAAI,SAAS,KAAK,SAAS,KAAK,YAAY,CAAC,CAAC;CACtE,MAAM,SAAiC,CAAC;CACxC,QAAQ,SAAS,OAAO,SAAS;EAC/B,OAAO,QAAQ,YAAY,IAAI,KAAK,YAAY,CAAC,IAAI,WAAW;CAClE,CAAC;CACD,OAAO;AACT;AAEA,MAAa,aAAa;CACxB,YAAY;CACZ,aAAa;CACb,cAAc;CACd,WAAW;CACX,sBAAsB;CACtB,uBAAuB;CACvB,aAAa;CACb,qBAAqB;CACrB,iBAAiB;AACnB;AAEA,MAAa,yBAAyB;;;;;;;;;;;;ACnCtC,MAAM,cAAc,aAClB,SAAS,aAAa,GAAG,SAAS,OAAO,GAAG,SAAS,eAAe,GAAG,SAAS;;;;;;;;AASlF,MAAM,sBAAsB,YAC1B,IAAI,QAAQ,QAAQ,KAAK;CACvB,QAAQ,QAAQ;CAChB,SAAS,cAAc,QAAQ,SAAS,k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
1
|
import qs from "qs";
|
|
2
|
-
//#region src/errors/ApiError.ts
|
|
3
|
-
/**
|
|
4
|
-
* The status line, as a message an error reporter can group on.
|
|
5
|
-
*
|
|
6
|
-
* - `statusText` is empty on every HTTP/2 response: the protocol dropped the reason phrase, and
|
|
7
|
-
* `fetch` reports that as `''` rather than synthesising one.
|
|
8
|
-
* - So the status number leads, and `statusText` only decorates it where a server sent one.
|
|
9
|
-
* - Without this an HTTP/2 failure reaches Sentry as `Error:` with an empty message, and the
|
|
10
|
-
* status — the one field that says what went wrong — is absent from the report.
|
|
11
|
-
*/
|
|
12
|
-
const statusLine = (response) => response.statusText ? `${response.status} ${response.statusText}` : `${response.status}`;
|
|
13
|
-
var ApiError = class extends Error {
|
|
14
|
-
response;
|
|
15
|
-
request;
|
|
16
|
-
data;
|
|
17
|
-
constructor({ response, request, data }) {
|
|
18
|
-
super(statusLine(response));
|
|
19
|
-
this.name = "ApiError";
|
|
20
|
-
this.response = response;
|
|
21
|
-
this.request = request;
|
|
22
|
-
this.data = data;
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
//#endregion
|
|
26
2
|
//#region src/internal.ts
|
|
27
3
|
const KeboolaHttpHeader = {
|
|
28
4
|
STORAGE_API_TOKEN: "X-StorageApi-Token",
|
|
@@ -35,6 +11,23 @@ const KeboolaHttpHeader = {
|
|
|
35
11
|
/** Set to "1" to opt an auth call into browser/cookie mode. */
|
|
36
12
|
CSRF: "X-KBC-CSRF"
|
|
37
13
|
};
|
|
14
|
+
/** Request headers that carry a credential — never kept on an error or written to a log. */
|
|
15
|
+
const CREDENTIAL_HEADERS = [
|
|
16
|
+
KeboolaHttpHeader.STORAGE_API_TOKEN,
|
|
17
|
+
KeboolaHttpHeader.MANAGEMENT_API_TOKEN,
|
|
18
|
+
"authorization",
|
|
19
|
+
"cookie"
|
|
20
|
+
];
|
|
21
|
+
const REDACTED = "[REDACTED]";
|
|
22
|
+
/** The headers as a record, each one named in `redacted` (any case) set to `[REDACTED]`. */
|
|
23
|
+
const redactHeaders = (headers, redacted) => {
|
|
24
|
+
const redactedSet = new Set(redacted.map((name) => name.toLowerCase()));
|
|
25
|
+
const result = {};
|
|
26
|
+
headers.forEach((value, name) => {
|
|
27
|
+
result[name] = redactedSet.has(name.toLowerCase()) ? REDACTED : value;
|
|
28
|
+
});
|
|
29
|
+
return result;
|
|
30
|
+
};
|
|
38
31
|
const HttpStatus = {
|
|
39
32
|
NO_CONTENT: 204,
|
|
40
33
|
BAD_REQUEST: 400,
|
|
@@ -48,6 +41,41 @@ const HttpStatus = {
|
|
|
48
41
|
};
|
|
49
42
|
const ENCRYPTED_VALUE_PREFIX = "KBC::";
|
|
50
43
|
//#endregion
|
|
44
|
+
//#region src/errors/ApiError.ts
|
|
45
|
+
/**
|
|
46
|
+
* The status line, as a message an error reporter can group on.
|
|
47
|
+
*
|
|
48
|
+
* - `statusText` is empty on every HTTP/2 response: the protocol dropped the reason phrase, and
|
|
49
|
+
* `fetch` reports that as `''` rather than synthesising one.
|
|
50
|
+
* - So the status number leads, and `statusText` only decorates it where a server sent one.
|
|
51
|
+
* - Without this an HTTP/2 failure reaches Sentry as `Error:` with an empty message, and the
|
|
52
|
+
* status — the one field that says what went wrong — is absent from the report.
|
|
53
|
+
*/
|
|
54
|
+
const statusLine = (response) => response.statusText ? `${response.status} ${response.statusText}` : `${response.status}`;
|
|
55
|
+
/**
|
|
56
|
+
* A body-less copy of the request with every credential header masked.
|
|
57
|
+
*
|
|
58
|
+
* - Keeps the method, URL and the remaining headers for whoever handles the error.
|
|
59
|
+
* - A masked header still appears, as `[REDACTED]`, so a reader sees it was sent.
|
|
60
|
+
* - A copy, not an edit: the original request may still be retried with its token.
|
|
61
|
+
*/
|
|
62
|
+
const withoutCredentials = (request) => new Request(request.url, {
|
|
63
|
+
method: request.method,
|
|
64
|
+
headers: redactHeaders(request.headers, CREDENTIAL_HEADERS)
|
|
65
|
+
});
|
|
66
|
+
var ApiError = class extends Error {
|
|
67
|
+
response;
|
|
68
|
+
request;
|
|
69
|
+
data;
|
|
70
|
+
constructor({ response, request, data }) {
|
|
71
|
+
super(statusLine(response));
|
|
72
|
+
this.name = "ApiError";
|
|
73
|
+
this.response = response;
|
|
74
|
+
this.request = withoutCredentials(request);
|
|
75
|
+
this.data = data;
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
//#endregion
|
|
51
79
|
//#region src/fetchClient/createFetchClient/utils.ts
|
|
52
80
|
/**
|
|
53
81
|
* Strips trailing slashes from a base URL so concatenating a leading-slash
|
|
@@ -222,6 +250,6 @@ const createFetchClient = ({ middlewares = [], baseUrl: _baseUrl, ...defaultOpti
|
|
|
222
250
|
};
|
|
223
251
|
};
|
|
224
252
|
//#endregion
|
|
225
|
-
export { isTimeoutError as a, defaultValidateStatus as c, normalizeBaseUrl as d, parseContentDispositionHeader as f,
|
|
253
|
+
export { KeboolaHttpHeader as _, isTimeoutError as a, defaultValidateStatus as c, normalizeBaseUrl as d, parseContentDispositionHeader as f, HttpStatus as g, ENCRYPTED_VALUE_PREFIX as h, isFetchClientError as i, isContentEmpty as l, CREDENTIAL_HEADERS as m, isAbortError as n, HttpContentType as o, ApiError as p, isApiError as r, HttpHeader as s, createFetchClient as t, isHtmlResponse as u, REDACTED as v, redactHeaders as y };
|
|
226
254
|
|
|
227
|
-
//# sourceMappingURL=createFetchClient-
|
|
255
|
+
//# sourceMappingURL=createFetchClient-DITkTV2k.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createFetchClient-DITkTV2k.js","names":[],"sources":["../src/internal.ts","../src/errors/ApiError.ts","../src/fetchClient/createFetchClient/utils.ts","../src/fetchClient/createFetchClient/createFetchClient.ts"],"sourcesContent":["// 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 UI_VERSION: 'X-KBC-Ui-Version',\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 /** Set to \"1\" to opt an auth call into browser/cookie mode. */\n CSRF: 'X-KBC-CSRF',\n} as const;\n\n/** Request headers that carry a credential — never kept on an error or written to a log. */\nexport const CREDENTIAL_HEADERS = [\n KeboolaHttpHeader.STORAGE_API_TOKEN,\n KeboolaHttpHeader.MANAGEMENT_API_TOKEN,\n 'authorization',\n 'cookie',\n];\n\nexport const REDACTED = '[REDACTED]';\n\n/** The headers as a record, each one named in `redacted` (any case) set to `[REDACTED]`. */\nexport const redactHeaders = (headers: Headers, redacted: readonly string[]) => {\n const redactedSet = new Set(redacted.map((name) => name.toLowerCase()));\n const result: Record<string, string> = {};\n headers.forEach((value, name) => {\n result[name] = redactedSet.has(name.toLowerCase()) ? REDACTED : value;\n });\n return result;\n};\n\nexport const HttpStatus = {\n NO_CONTENT: 204,\n BAD_REQUEST: 400,\n UNAUTHORIZED: 401,\n NOT_FOUND: 404,\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 { ApiResponse } from '../fetchClient/createFetchClient/types';\nimport { CREDENTIAL_HEADERS, redactHeaders } from '../internal';\n\n/**\n * The status line, as a message an error reporter can group on.\n *\n * - `statusText` is empty on every HTTP/2 response: the protocol dropped the reason phrase, and\n * `fetch` reports that as `''` rather than synthesising one.\n * - So the status number leads, and `statusText` only decorates it where a server sent one.\n * - Without this an HTTP/2 failure reaches Sentry as `Error:` with an empty message, and the\n * status — the one field that says what went wrong — is absent from the report.\n */\nconst statusLine = (response: Response) =>\n response.statusText ? `${response.status} ${response.statusText}` : `${response.status}`;\n\n/**\n * A body-less copy of the request with every credential header masked.\n *\n * - Keeps the method, URL and the remaining headers for whoever handles the error.\n * - A masked header still appears, as `[REDACTED]`, so a reader sees it was sent.\n * - A copy, not an edit: the original request may still be retried with its token.\n */\nconst withoutCredentials = (request: Request) =>\n new Request(request.url, {\n method: request.method,\n headers: redactHeaders(request.headers, CREDENTIAL_HEADERS),\n });\n\nexport class ApiError extends Error {\n response: Response;\n request: Request;\n data: unknown;\n\n constructor({ response, request, data }: ApiResponse) {\n super(statusLine(response));\n this.name = 'ApiError';\n this.response = response;\n this.request = withoutCredentials(request);\n this.data = data;\n }\n}\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 declares HTML.\n *\n * - Media types are case-insensitive, so `Text/HTML` counts.\n * - A header fact only: a `text/html` response may still carry no body at all.\n */\nexport const isHtmlResponse = ({ response }: ApiResponse) =>\n !!response.headers\n .get(HttpHeader.CONTENT_TYPE)\n ?.toLowerCase()\n .includes(HttpContentType.TEXT_HTML);\n\n/**\n * Whether a response carried no payload, across every shape `parseData` produces for one:\n *\n * 1. `null` — a `204`, or a JSON body that was empty or whitespace.\n * 2. `''` — any other media type with an empty body, read as text.\n *\n * Whitespace-only text counts as empty, matching how `parseJson` already treats it.\n */\nexport const isContentEmpty = ({ data }: ApiResponse) =>\n data === null || data === undefined || (typeof data === 'string' && data.trim() === '');\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 isTimeoutError = (error: unknown): error is DOMException =>\n error instanceof DOMException && error.name === 'TimeoutError';\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 baseUrl: _baseUrl,\n ...defaultOptions\n}: CreateFetchClientOptions) => {\n const fetchWithMiddlewares = middlewares.reduceRight(\n (next, middleware) => middleware(next),\n coreFetch,\n );\n const resolveBaseUrl = async () => (typeof _baseUrl === 'function' ? _baseUrl() : _baseUrl);\n\n const createFetchMethod =\n (method: HttpMethod) =>\n async (url: string, params: BaseFetchParams, options: FetchClientOptions = {}) => {\n const baseUrl = await resolveBaseUrl();\n const request = createFetchRequest({\n url,\n method,\n params,\n defaultOptions: { ...defaultOptions, baseUrl: baseUrl },\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":";;AAGA,MAAa,oBAAoB;CAC/B,mBAAmB;CACnB,sBAAsB;CACtB,iBAAiB;CACjB,YAAY;CACZ,YAAY;;CAEZ,oBAAoB;;CAEpB,MAAM;AACR;;AAGA,MAAa,qBAAqB;C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AAEA,MAAa,qBAAqB,EAChC,cAAc,CAAC,GACf,SAAS,UACT,GAAG,qBAC2B;CAC9B,MAAM,uBAAuB,YAAY,aACtC,MAAM,eAAe,WAAW,IAAI,GACrC,SACF;CACA,MAAM,iBAAiB,YAAa,OAAO,aAAa,aAAa,SAAS,IAAI;CAElF,MAAM,qBACH,WACD,OAAO,KAAa,QAAyB,UAA8B,CAAC,MAAM;EAChF,MAAM,UAAU,MAAM,eAAe;EACrC,MAAM,UAAU,mBAAmB;GACjC;GACA;GACA;GACA,gBAAgB;IAAE,GAAG;IAAyB;GAAQ;GACtD;EACF,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"}
|
package/dist/{createGenericFetchClient-C7Y0YVfc.cjs → createGenericFetchClient-B81Iezpb.cjs}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_createFetchClient = require("./createFetchClient-
|
|
1
|
+
const require_createFetchClient = require("./createFetchClient-ClWD4ua3.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-B81Iezpb.cjs.map
|
package/dist/{createGenericFetchClient-C7Y0YVfc.cjs.map → createGenericFetchClient-B81Iezpb.cjs.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createGenericFetchClient-
|
|
1
|
+
{"version":3,"file":"createGenericFetchClient-B81Iezpb.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-DITkTV2k.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-KqiJhw8G.js.map
|
package/dist/{createGenericFetchClient-CX9Hn3Aq.js.map → createGenericFetchClient-KqiJhw8G.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createGenericFetchClient-
|
|
1
|
+
{"version":3,"file":"createGenericFetchClient-KqiJhw8G.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/{createOpenapiFetchClient-DY5s-aH6.cjs → createOpenapiFetchClient-CioTX11-.cjs}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_createFetchClient = require("./createFetchClient-
|
|
1
|
+
const require_createFetchClient = require("./createFetchClient-ClWD4ua3.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-CioTX11-.cjs.map
|
package/dist/{createOpenapiFetchClient-DY5s-aH6.cjs.map → createOpenapiFetchClient-CioTX11-.cjs.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createOpenapiFetchClient-
|
|
1
|
+
{"version":3,"file":"createOpenapiFetchClient-CioTX11-.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,7 +1,7 @@
|
|
|
1
|
-
import { t as createFetchClient } from "./createFetchClient-
|
|
1
|
+
import { t as createFetchClient } from "./createFetchClient-DITkTV2k.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-wq8iGLZM.js.map
|
package/dist/{createOpenapiFetchClient-BxcLLU_N.js.map → createOpenapiFetchClient-wq8iGLZM.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createOpenapiFetchClient-
|
|
1
|
+
{"version":3,"file":"createOpenapiFetchClient-wq8iGLZM.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"}
|
|
@@ -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-BG9ueGxA.cjs");
|
|
3
|
+
const require_dataScience = require("../dataScience-Hhoqoql_.cjs");
|
|
4
4
|
exports.createDataScienceClient = require_dataScience.createDataScienceClient;
|
|
5
5
|
exports.parseLogLines = require_appLogs.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-CEKz68bE.js";
|
|
2
|
+
import { t as createDataScienceClient } from "../dataScience-BwHmDoQb.js";
|
|
3
3
|
export { createDataScienceClient, parseLogLines };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { t as LogEntry } from "../appLogs-C9YlJ2g8.cjs";
|
|
2
|
-
import { S as
|
|
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 };
|
|
2
|
+
import { C as RuntimeImageKey, S as Runtime, _ as GetSandboxPath, a as DataAppRun, b as RawAppRun, c as GetAppsQuery, d as GetDataAppLogsTailQuery, f as GetDataAppPasswordPath, g as GetDataAppRunsQuery, h as GetDataAppRunsPath, i as DataAppPreviewLink, l as GetDataAppLogsDownloadPath, m as GetDataAppRunPath, n as CreateDataAppPreviewLinkPath, o as DeleteDataAppPath, p as GetDataAppPath, r as DataApp, s as DeleteSandboxPath, t as CreateDataAppBody, u as GetDataAppLogsTailPath, v as PatchDataAppBody, w as Sandbox, x as ResetDataAppPasswordPath, y as PatchDataAppPath } from "../types-CGm2fQKK.cjs";
|
|
3
|
+
export { CreateDataAppBody, CreateDataAppPreviewLinkPath, DataApp, DataAppPreviewLink, 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
1
|
import { t as LogEntry } from "../appLogs-BS6ViVGR.js";
|
|
2
|
-
import { S as
|
|
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 };
|
|
2
|
+
import { C as RuntimeImageKey, S as Runtime, _ as GetSandboxPath, a as DataAppRun, b as RawAppRun, c as GetAppsQuery, d as GetDataAppLogsTailQuery, f as GetDataAppPasswordPath, g as GetDataAppRunsQuery, h as GetDataAppRunsPath, i as DataAppPreviewLink, l as GetDataAppLogsDownloadPath, m as GetDataAppRunPath, n as CreateDataAppPreviewLinkPath, o as DeleteDataAppPath, p as GetDataAppPath, r as DataApp, s as DeleteSandboxPath, t as CreateDataAppBody, u as GetDataAppLogsTailPath, v as PatchDataAppBody, w as Sandbox, x as ResetDataAppPasswordPath, y as PatchDataAppPath } from "../types-Fs4a3mVs.js";
|
|
3
|
+
export { CreateDataAppBody, CreateDataAppPreviewLinkPath, DataApp, DataAppPreviewLink, DataAppRun, DeleteDataAppPath, DeleteSandboxPath, GetAppsQuery, GetDataAppLogsDownloadPath, GetDataAppLogsTailPath, GetDataAppLogsTailQuery, GetDataAppPasswordPath, GetDataAppPath, GetDataAppRunPath, GetDataAppRunsPath, GetDataAppRunsQuery, GetSandboxPath, type LogEntry, PatchDataAppBody, PatchDataAppPath, RawAppRun, ResetDataAppPasswordPath, Runtime, RuntimeImageKey, Sandbox };
|