@keboola/api-client 27.0.0 → 31.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 +145 -11
- package/API-SURFACE.md +13 -1
- package/CHANGELOG.md +1785 -0
- package/README.md +53 -18
- package/dist/ManagementClientAuthError-90pvsej0.js +15 -0
- package/dist/ManagementClientAuthError-90pvsej0.js.map +1 -0
- package/dist/ManagementClientAuthError-DFhi5yxe.cjs +20 -0
- package/dist/ManagementClientAuthError-DFhi5yxe.cjs.map +1 -0
- package/dist/QueryJobTimeoutError-C7JbNGOM.js +38 -0
- package/dist/QueryJobTimeoutError-C7JbNGOM.js.map +1 -0
- package/dist/QueryJobTimeoutError-CVNPdCWX.cjs +61 -0
- package/dist/QueryJobTimeoutError-CVNPdCWX.cjs.map +1 -0
- package/dist/SyncActionError-BG0zwchi.cjs +35 -0
- package/dist/SyncActionError-BG0zwchi.cjs.map +1 -0
- package/dist/SyncActionError-CoZFsdUk.js +24 -0
- package/dist/SyncActionError-CoZFsdUk.js.map +1 -0
- package/dist/UserError-By_Zckmc.js +10 -0
- package/dist/UserError-By_Zckmc.js.map +1 -0
- package/dist/UserError-CSGO1qII.cjs +15 -0
- package/dist/UserError-CSGO1qII.cjs.map +1 -0
- package/dist/ValidationError-CzPWydEb.js +44 -0
- package/dist/ValidationError-CzPWydEb.js.map +1 -0
- package/dist/ValidationError-h5qvwahi.cjs +61 -0
- package/dist/ValidationError-h5qvwahi.cjs.map +1 -0
- package/dist/adminRoles-B40yBcmq.js +14 -0
- package/dist/adminRoles-B40yBcmq.js.map +1 -0
- package/dist/adminRoles-C696kD_U.d.cts +14 -0
- package/dist/adminRoles-C696kD_U.d.ts +14 -0
- package/dist/adminRoles-CO7J5qAy.cjs +19 -0
- package/dist/adminRoles-CO7J5qAy.cjs.map +1 -0
- package/dist/ai/index.cjs +62 -12
- package/dist/ai/index.cjs.map +1 -1
- package/dist/ai/index.d.cts +52 -53
- package/dist/ai/index.d.ts +52 -53
- package/dist/ai/index.js +62 -4
- package/dist/ai/index.js.map +1 -1
- package/dist/ai/types.cjs +0 -4
- package/dist/ai/types.d.cts +2 -2
- package/dist/ai/types.d.ts +2 -2
- package/dist/ai/types.js +1 -3
- package/dist/appLogs-BCCi02w6.cjs +153 -0
- package/dist/appLogs-BCCi02w6.cjs.map +1 -0
- package/dist/appLogs-BdMG6Cvn.d.ts +10 -0
- package/dist/appLogs-CLHhkQJn.js +132 -0
- package/dist/appLogs-CLHhkQJn.js.map +1 -0
- package/dist/appLogs-hQdKt_8J.d.cts +10 -0
- package/dist/apps/index.cjs +229 -14
- package/dist/apps/index.cjs.map +1 -1
- package/dist/apps/index.d.cts +219 -220
- package/dist/apps/index.d.ts +219 -220
- package/dist/apps/index.js +229 -6
- package/dist/apps/index.js.map +1 -1
- package/dist/apps/types.cjs +0 -4
- package/dist/apps/types.d.cts +3 -3
- package/dist/apps/types.d.ts +3 -3
- package/dist/apps/types.js +1 -3
- package/dist/assets/index.cjs +33 -38
- package/dist/assets/index.cjs.map +1 -1
- package/dist/assets/index.d.cts +22 -22
- package/dist/assets/index.d.ts +22 -22
- package/dist/assets/index.js +32 -36
- package/dist/assets/index.js.map +1 -1
- package/dist/assets/schema.cjs +23 -13
- package/dist/assets/schema.cjs.map +1 -1
- package/dist/assets/schema.d.cts +29 -28
- package/dist/assets/schema.d.ts +29 -28
- package/dist/assets/schema.js +21 -2
- package/dist/assets/schema.js.map +1 -1
- package/dist/auth/index.cjs +15 -57
- package/dist/auth/index.d.cts +2 -318
- package/dist/auth/index.d.ts +2 -318
- package/dist/auth/index.js +2 -4
- package/dist/auth/types.cjs +0 -4
- package/dist/auth/types.d.cts +2 -7
- package/dist/auth/types.d.ts +2 -7
- package/dist/auth/types.js +1 -3
- package/dist/auth-CE6Hlc9W.js +13 -0
- package/dist/{chunk-5A3AQIXR.js.map → auth-CE6Hlc9W.js.map} +1 -1
- package/dist/auth-DmgTH0uY.cjs +18 -0
- package/dist/auth-DmgTH0uY.cjs.map +1 -0
- package/dist/authClient-BL6h78Q1.d.cts +367 -0
- package/dist/authClient-Bc_bDisO.d.ts +367 -0
- package/dist/authClient-Cixa8_L1.cjs +476 -0
- package/dist/authClient-Cixa8_L1.cjs.map +1 -0
- package/dist/authClient-XBAUz9g-.js +397 -0
- package/dist/authClient-XBAUz9g-.js.map +1 -0
- package/dist/backends-DKBz5OxE.d.cts +9 -0
- package/dist/backends-DKBz5OxE.d.ts +9 -0
- package/dist/chat/index.cjs +134 -13
- package/dist/chat/index.cjs.map +1 -1
- package/dist/chat/index.d.cts +49 -51
- package/dist/chat/index.d.ts +49 -51
- package/dist/chat/index.js +134 -5
- package/dist/chat/index.js.map +1 -1
- package/dist/chat/suggestions.cjs +152 -74
- package/dist/chat/suggestions.cjs.map +1 -1
- package/dist/chat/suggestions.d.cts +2 -437
- package/dist/chat/suggestions.d.ts +2 -437
- package/dist/chat/suggestions.js +136 -2
- package/dist/chat/suggestions.js.map +1 -1
- package/dist/chat/types.cjs +6 -8
- package/dist/chat/types.cjs.map +1 -1
- package/dist/chat/types.d.cts +2 -3
- package/dist/chat/types.d.ts +2 -3
- package/dist/chat/types.js +5 -6
- package/dist/chat/types.js.map +1 -1
- package/dist/componentId-DkyQ8PM0.cjs +73 -0
- package/dist/componentId-DkyQ8PM0.cjs.map +1 -0
- package/dist/componentId-vJz-kWs6.js +68 -0
- package/dist/componentId-vJz-kWs6.js.map +1 -0
- package/dist/concurrent-CH9fbNr3.js +34 -0
- package/dist/concurrent-CH9fbNr3.js.map +1 -0
- package/dist/concurrent-tbiIa0UL.cjs +39 -0
- package/dist/concurrent-tbiIa0UL.cjs.map +1 -0
- package/dist/configurations-Byt59bIa.js +726 -0
- package/dist/configurations-Byt59bIa.js.map +1 -0
- package/dist/configurations-CujCwDcB.cjs +743 -0
- package/dist/configurations-CujCwDcB.cjs.map +1 -0
- package/dist/configurations-DCOJONZZ.cjs +313 -0
- package/dist/configurations-DCOJONZZ.cjs.map +1 -0
- package/dist/configurations-iCbhe0tb.js +158 -0
- package/dist/configurations-iCbhe0tb.js.map +1 -0
- package/dist/constants/index.cjs +12 -34
- package/dist/constants/index.d.cts +4 -104
- package/dist/constants/index.d.ts +4 -104
- package/dist/constants/index.js +4 -5
- package/dist/constants-CkAVvuUq.cjs +219 -0
- package/dist/constants-CkAVvuUq.cjs.map +1 -0
- package/dist/constants-qeWGfk_7.js +184 -0
- package/dist/constants-qeWGfk_7.js.map +1 -0
- package/dist/createFetchClient-B1h3-p65.js +192 -0
- package/dist/createFetchClient-B1h3-p65.js.map +1 -0
- package/dist/createFetchClient-B9Cv0W9f.cjs +277 -0
- package/dist/createFetchClient-B9Cv0W9f.cjs.map +1 -0
- package/dist/createGenericFetchClient-BWoSkTki.cjs +12 -0
- package/dist/createGenericFetchClient-BWoSkTki.cjs.map +1 -0
- package/dist/createGenericFetchClient-DhpvUSlX.js +7 -0
- package/dist/createGenericFetchClient-DhpvUSlX.js.map +1 -0
- package/dist/createOpenapiFetchClient-0_oqhdPv.js +7 -0
- package/dist/createOpenapiFetchClient-0_oqhdPv.js.map +1 -0
- package/dist/createOpenapiFetchClient-yirrW6Tg.cjs +12 -0
- package/dist/createOpenapiFetchClient-yirrW6Tg.cjs.map +1 -0
- package/dist/createStore-BNiCRQXa.js +148 -0
- package/dist/createStore-BNiCRQXa.js.map +1 -0
- package/dist/createStore-MQbboXcB.cjs +177 -0
- package/dist/createStore-MQbboXcB.cjs.map +1 -0
- package/dist/credential-D-tX9gP4.cjs +44 -0
- package/dist/credential-D-tX9gP4.cjs.map +1 -0
- package/dist/credential-dKxArMic.js +33 -0
- package/dist/credential-dKxArMic.js.map +1 -0
- package/dist/dataScience/index.cjs +5 -20
- package/dist/dataScience/index.d.cts +3 -209
- package/dist/dataScience/index.d.ts +3 -209
- package/dist/dataScience/index.js +3 -7
- package/dist/dataScience/types.cjs +0 -4
- package/dist/dataScience/types.d.cts +3 -2172
- package/dist/dataScience/types.d.ts +3 -2172
- package/dist/dataScience/types.js +1 -3
- package/dist/dataScience-BqNWX-Gr.cjs +114 -0
- package/dist/dataScience-BqNWX-Gr.cjs.map +1 -0
- package/dist/dataScience-jdbSSPYF.js +109 -0
- package/dist/dataScience-jdbSSPYF.js.map +1 -0
- package/dist/dedupe-CiskLkGR.cjs +30 -0
- package/dist/dedupe-CiskLkGR.cjs.map +1 -0
- package/dist/dedupe-DYIHgZoG.js +25 -0
- package/dist/dedupe-DYIHgZoG.js.map +1 -0
- package/dist/developerPortal/index.cjs +6 -0
- package/dist/developerPortal/index.d.cts +3 -0
- package/dist/developerPortal/index.d.ts +3 -0
- package/dist/developerPortal/index.js +2 -0
- package/dist/developerPortal/types.cjs +0 -0
- package/dist/developerPortal/types.d.cts +2 -0
- package/dist/developerPortal/types.d.ts +2 -0
- package/dist/developerPortal/types.js +1 -0
- package/dist/developerPortalClient-5ABcxz1U.js +485 -0
- package/dist/developerPortalClient-5ABcxz1U.js.map +1 -0
- package/dist/developerPortalClient-B7lNR5q0.cjs +508 -0
- package/dist/developerPortalClient-B7lNR5q0.cjs.map +1 -0
- package/dist/domain/permissions/index.cjs +31 -122
- package/dist/domain/permissions/index.d.cts +19 -52
- package/dist/domain/permissions/index.d.ts +19 -52
- package/dist/domain/permissions/index.js +3 -5
- package/dist/domain/storageTable/index.cjs +4 -16
- package/dist/domain/storageTable/index.d.cts +2 -131
- package/dist/domain/storageTable/index.d.ts +2 -131
- package/dist/domain/storageTable/index.js +2 -3
- package/dist/editor/index.cjs +96 -12
- package/dist/editor/index.cjs.map +1 -1
- package/dist/editor/index.d.cts +163 -164
- package/dist/editor/index.d.ts +163 -164
- package/dist/editor/index.js +96 -4
- package/dist/editor/index.js.map +1 -1
- package/dist/editor/types.cjs +0 -4
- package/dist/editor/types.d.cts +2 -2
- package/dist/editor/types.d.ts +2 -2
- package/dist/editor/types.js +1 -3
- package/dist/encryption/index.cjs +58 -11
- package/dist/encryption/index.cjs.map +1 -1
- package/dist/encryption/index.d.cts +2 -20
- package/dist/encryption/index.d.ts +2 -20
- package/dist/encryption/index.js +58 -3
- package/dist/encryption/index.js.map +1 -1
- package/dist/encryption/types.cjs +0 -4
- package/dist/encryption/types.d.cts +2 -69
- package/dist/encryption/types.d.ts +2 -69
- package/dist/encryption/types.js +1 -3
- package/dist/generateUUID-C6qKBPIv.cjs +11 -0
- package/dist/generateUUID-C6qKBPIv.cjs.map +1 -0
- package/dist/generateUUID-Dr8l-aoc.js +6 -0
- package/dist/generateUUID-Dr8l-aoc.js.map +1 -0
- package/dist/import/index.cjs +3 -14
- package/dist/import/index.d.cts +41 -41
- package/dist/import/index.d.ts +41 -41
- package/dist/import/index.js +2 -5
- package/dist/import-CExRbskw.js +116 -0
- package/dist/import-CExRbskw.js.map +1 -0
- package/dist/import-CXHppAxd.cjs +121 -0
- package/dist/import-CXHppAxd.cjs.map +1 -0
- package/dist/index--pxLseaw.d.cts +125 -0
- package/dist/index--pxLseaw.d.ts +125 -0
- package/dist/index-7RvXnXmd.d.ts +77 -0
- package/dist/index-B-frWtGW.d.cts +235 -0
- package/dist/index-B6q7HxKJ.d.cts +1075 -0
- package/dist/index-BMqLPS6S.d.cts +135 -0
- package/dist/index-BMqLPS6S.d.ts +135 -0
- package/dist/index-BR2Fu-Wo.d.ts +19883 -0
- package/dist/index-BSjfVDTr.d.cts +208 -0
- package/dist/index-BfVv8isU.d.cts +1388 -0
- package/dist/index-C9mAoXF6.d.cts +77 -0
- package/dist/index-CMb0ygwb.d.ts +26 -0
- package/dist/index-CR9LsDaG.d.cts +65 -0
- package/dist/index-CW4VC9oN.d.ts +65 -0
- package/dist/index-CYMAwD3E.d.ts +1388 -0
- package/dist/index-Cpjh05sx.d.cts +31 -0
- package/dist/index-CwJE18PJ.d.cts +26 -0
- package/dist/index-D_TnbEtp.d.cts +16 -0
- package/dist/index-Daks5CeX.d.ts +31 -0
- package/dist/index-DeMDxHTz.d.ts +1075 -0
- package/dist/index-Ds8e0l7-.d.ts +235 -0
- package/dist/index-J1I2HlSm.d.ts +208 -0
- package/dist/index-NC1dXRTD.d.cts +40 -0
- package/dist/index-NC1dXRTD.d.ts +40 -0
- package/dist/index-NicJZIzu.d.ts +16 -0
- package/dist/index-cu8THqZV.d.cts +19883 -0
- package/dist/index.cjs +1735 -1884
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -15778
- package/dist/index.d.ts +7 -15778
- package/dist/index.js +1683 -1724
- package/dist/index.js.map +1 -1
- package/dist/isPlainObject-BB3iy87C.cjs +16 -0
- package/dist/isPlainObject-BB3iy87C.cjs.map +1 -0
- package/dist/isPlainObject-LYW-03uB.js +11 -0
- package/dist/isPlainObject-LYW-03uB.js.map +1 -0
- package/dist/jobStatus-DbMupQEK.js +423 -0
- package/dist/jobStatus-DbMupQEK.js.map +1 -0
- package/dist/jobStatus-kQ9JqF8t.cjs +494 -0
- package/dist/jobStatus-kQ9JqF8t.cjs.map +1 -0
- package/dist/management/index.cjs +4 -18
- package/dist/management/index.d.cts +2 -1076
- package/dist/management/index.d.ts +2 -1076
- package/dist/management/index.js +2 -5
- package/dist/management/types.cjs +0 -4
- package/dist/management/types.d.cts +2 -12
- package/dist/management/types.d.ts +2 -12
- package/dist/management/types.js +1 -3
- package/dist/management-Cc8mKfnf.js +1064 -0
- package/dist/management-Cc8mKfnf.js.map +1 -0
- package/dist/management-DlVdxzPw.cjs +1075 -0
- package/dist/management-DlVdxzPw.cjs.map +1 -0
- package/dist/metastore/index.cjs +3 -14
- package/dist/metastore/index.d.cts +2 -32
- package/dist/metastore/index.d.ts +2 -32
- package/dist/metastore/index.js +2 -5
- package/dist/metastore/types.cjs +0 -4
- package/dist/metastore/types.d.cts +2 -2
- package/dist/metastore/types.d.ts +2 -2
- package/dist/metastore/types.js +1 -3
- package/dist/metastore-CNf1412Z.js +134 -0
- package/dist/metastore-CNf1412Z.js.map +1 -0
- package/dist/metastore-DbsxqjhS.cjs +139 -0
- package/dist/metastore-DbsxqjhS.cjs.map +1 -0
- package/dist/notifications/index.cjs +67 -13
- package/dist/notifications/index.cjs.map +1 -1
- package/dist/notifications/index.d.cts +56 -57
- package/dist/notifications/index.d.ts +56 -57
- package/dist/notifications/index.js +67 -5
- package/dist/notifications/index.js.map +1 -1
- package/dist/notifications/types.cjs +0 -4
- package/dist/notifications/types.d.cts +2 -2
- package/dist/notifications/types.d.ts +2 -2
- package/dist/notifications/types.js +1 -3
- package/dist/oauth/index.cjs +3 -14
- package/dist/oauth/index.d.cts +49 -50
- package/dist/oauth/index.d.ts +49 -50
- package/dist/oauth/index.js +2 -5
- package/dist/oauth/types.cjs +0 -4
- package/dist/oauth/types.d.cts +2 -725
- package/dist/oauth/types.d.ts +2 -725
- package/dist/oauth/types.js +1 -3
- package/dist/oauth-ClksaYRY.js +83 -0
- package/dist/oauth-ClksaYRY.js.map +1 -0
- package/dist/oauth-DsZgmtPj.cjs +88 -0
- package/dist/oauth-DsZgmtPj.cjs.map +1 -0
- package/dist/omnisearch/index.cjs +47 -12
- package/dist/omnisearch/index.cjs.map +1 -1
- package/dist/omnisearch/index.d.cts +12 -14
- package/dist/omnisearch/index.d.ts +12 -14
- package/dist/omnisearch/index.js +47 -4
- package/dist/omnisearch/index.js.map +1 -1
- package/dist/omnisearch/types.cjs +0 -4
- package/dist/omnisearch/types.d.cts +2 -3
- package/dist/omnisearch/types.d.ts +2 -3
- package/dist/omnisearch/types.js +1 -3
- package/dist/project-5SLw86eZ.d.ts +18 -0
- package/dist/project-BvFi19K_.cjs +56 -0
- package/dist/project-BvFi19K_.cjs.map +1 -0
- package/dist/project-CRrsxSAK.d.cts +18 -0
- package/dist/project-DWwZv66D.js +39 -0
- package/dist/project-DWwZv66D.js.map +1 -0
- package/dist/queryService/index.cjs +3 -14
- package/dist/queryService/index.d.cts +2 -40
- package/dist/queryService/index.d.ts +2 -40
- package/dist/queryService/index.js +2 -5
- package/dist/queryService/types.cjs +0 -4
- package/dist/queryService/types.d.cts +2 -2
- package/dist/queryService/types.d.ts +2 -2
- package/dist/queryService/types.js +1 -3
- package/dist/queryService-BlyAcBxP.js +114 -0
- package/dist/queryService-BlyAcBxP.js.map +1 -0
- package/dist/queryService-DxUUkTcy.cjs +119 -0
- package/dist/queryService-DxUUkTcy.cjs.map +1 -0
- package/dist/queue/index.cjs +3 -15
- package/dist/queue/index.d.cts +411 -340
- package/dist/queue/index.d.ts +411 -340
- package/dist/queue/index.js +2 -6
- package/dist/queue/types.cjs +0 -4
- package/dist/queue/types.d.cts +2 -2
- package/dist/queue/types.d.ts +2 -2
- package/dist/queue/types.js +1 -3
- package/dist/queue-CpcqeMPz.cjs +137 -0
- package/dist/queue-CpcqeMPz.cjs.map +1 -0
- package/dist/queue-DpZTm7U7.js +126 -0
- package/dist/queue-DpZTm7U7.js.map +1 -0
- package/dist/rolldown-runtime-VH7oDXx4.cjs +28 -0
- package/dist/scheduler/index.cjs +61 -13
- package/dist/scheduler/index.cjs.map +1 -1
- package/dist/scheduler/index.d.cts +73 -74
- package/dist/scheduler/index.d.ts +73 -74
- package/dist/scheduler/index.js +61 -5
- package/dist/scheduler/index.js.map +1 -1
- package/dist/scheduler/types.cjs +0 -4
- package/dist/scheduler/types.d.cts +2 -372
- package/dist/scheduler/types.d.ts +2 -372
- package/dist/scheduler/types.js +1 -3
- package/dist/sdk/configurations/index.cjs +3 -16
- package/dist/sdk/configurations/index.d.cts +3066 -3078
- package/dist/sdk/configurations/index.d.ts +3066 -3078
- package/dist/sdk/configurations/index.js +2 -7
- package/dist/sdk/developerPortal/index.cjs +203 -0
- package/dist/sdk/developerPortal/index.cjs.map +1 -0
- package/dist/sdk/developerPortal/index.d.cts +1371 -0
- package/dist/sdk/developerPortal/index.d.ts +1371 -0
- package/dist/sdk/developerPortal/index.js +202 -0
- package/dist/sdk/developerPortal/index.js.map +1 -0
- package/dist/sdk/queryService/index.cjs +91 -14
- package/dist/sdk/queryService/index.cjs.map +1 -1
- package/dist/sdk/queryService/index.d.cts +2 -35
- package/dist/sdk/queryService/index.d.ts +2 -35
- package/dist/sdk/queryService/index.js +91 -6
- package/dist/sdk/queryService/index.js.map +1 -1
- package/dist/sdk/semanticLayer/index.cjs +352 -54
- package/dist/sdk/semanticLayer/index.cjs.map +1 -1
- package/dist/sdk/semanticLayer/index.d.cts +95 -99
- package/dist/sdk/semanticLayer/index.d.ts +95 -99
- package/dist/sdk/semanticLayer/index.js +346 -4
- package/dist/sdk/semanticLayer/index.js.map +1 -1
- package/dist/sdk/semanticLayer/types.cjs +0 -4
- package/dist/sdk/semanticLayer/types.d.cts +2 -152
- package/dist/sdk/semanticLayer/types.d.ts +2 -152
- package/dist/sdk/semanticLayer/types.js +1 -3
- package/dist/sdk/storage/index.cjs +267 -48
- package/dist/sdk/storage/index.cjs.map +1 -1
- package/dist/sdk/storage/index.d.cts +2 -120
- package/dist/sdk/storage/index.d.ts +2 -120
- package/dist/sdk/storage/index.js +258 -4
- package/dist/sdk/storage/index.js.map +1 -1
- package/dist/sdk/tag/index.cjs +3 -14
- package/dist/sdk/tag/index.d.cts +16 -20
- package/dist/sdk/tag/index.d.ts +16 -20
- package/dist/sdk/tag/index.js +2 -5
- package/dist/sdk/tag/types.cjs +0 -4
- package/dist/sdk/tag/types.d.cts +2 -36
- package/dist/sdk/tag/types.d.ts +2 -36
- package/dist/sdk/tag/types.js +1 -3
- package/dist/sdk/vault/index.cjs +93 -31
- package/dist/sdk/vault/index.cjs.map +1 -1
- package/dist/sdk/vault/index.d.cts +2 -73
- package/dist/sdk/vault/index.d.ts +2 -73
- package/dist/sdk/vault/index.js +88 -3
- package/dist/sdk/vault/index.js.map +1 -1
- package/dist/status/index.cjs +16 -20
- package/dist/status/index.cjs.map +1 -1
- package/dist/status/index.d.cts +8 -9
- package/dist/status/index.d.ts +8 -9
- package/dist/status/index.js +15 -18
- package/dist/status/index.js.map +1 -1
- package/dist/status/types.cjs +0 -6
- package/dist/status/types.d.cts +17 -15
- package/dist/status/types.d.ts +17 -15
- package/dist/status/types.js +1 -3
- package/dist/storage/index.cjs +30 -92
- package/dist/storage/index.d.cts +3 -24
- package/dist/storage/index.d.ts +3 -24
- package/dist/storage/index.js +9 -11
- package/dist/storage/types.cjs +0 -4
- package/dist/storage/types.d.cts +5 -1949
- package/dist/storage/types.d.ts +5 -1949
- package/dist/storage/types.js +1 -3
- package/dist/storage-CQxu0EY3.js +2432 -0
- package/dist/storage-CQxu0EY3.js.map +1 -0
- package/dist/storage-vnH64B_Q.cjs +2461 -0
- package/dist/storage-vnH64B_Q.cjs.map +1 -0
- package/dist/storageTable-C9crh4Ef.cjs +310 -0
- package/dist/storageTable-C9crh4Ef.cjs.map +1 -0
- package/dist/storageTable-DslXtqNL.js +299 -0
- package/dist/storageTable-DslXtqNL.js.map +1 -0
- package/dist/stream/index.cjs +363 -12
- package/dist/stream/index.cjs.map +1 -1
- package/dist/stream/index.d.cts +345 -346
- package/dist/stream/index.d.ts +345 -346
- package/dist/stream/index.js +363 -4
- package/dist/stream/index.js.map +1 -1
- package/dist/stream/types.cjs +0 -4
- package/dist/stream/types.d.cts +2 -2
- package/dist/stream/types.d.ts +2 -2
- package/dist/stream/types.js +1 -3
- package/dist/suggestions-BH3x7xU7.d.cts +438 -0
- package/dist/suggestions-BH3x7xU7.d.ts +438 -0
- package/dist/syncActions/index.cjs +3 -19
- package/dist/syncActions/index.d.cts +2 -67
- package/dist/syncActions/index.d.ts +2 -67
- package/dist/syncActions/index.js +2 -10
- package/dist/syncActions/types.cjs +0 -4
- package/dist/syncActions/types.d.cts +2 -614
- package/dist/syncActions/types.d.ts +2 -614
- package/dist/syncActions/types.js +1 -3
- package/dist/syncActions-AgFiMjRS.js +497 -0
- package/dist/syncActions-AgFiMjRS.js.map +1 -0
- package/dist/syncActions-DPcAPYgJ.cjs +504 -0
- package/dist/syncActions-DPcAPYgJ.cjs.map +1 -0
- package/dist/tag-CsoOZWB_.cjs +175 -0
- package/dist/tag-CsoOZWB_.cjs.map +1 -0
- package/dist/tag-DCsoewjL.js +164 -0
- package/dist/{chunk-WUFODWZV.js.map → tag-DCsoewjL.js.map} +1 -1
- package/dist/telemetry/index.cjs +3 -14
- package/dist/telemetry/index.d.cts +10 -10
- package/dist/telemetry/index.d.ts +10 -10
- package/dist/telemetry/index.js +2 -5
- package/dist/telemetry/types.cjs +0 -4
- package/dist/telemetry/types.d.cts +2 -12
- package/dist/telemetry/types.d.ts +2 -12
- package/dist/telemetry/types.js +1 -3
- package/dist/telemetry-BLgaYEvi.cjs +29 -0
- package/dist/telemetry-BLgaYEvi.cjs.map +1 -0
- package/dist/telemetry-CPiGWpLi.js +24 -0
- package/dist/telemetry-CPiGWpLi.js.map +1 -0
- package/dist/{types-DM1glEQI.d.ts → types-056giLrn.d.cts} +8 -10
- package/dist/types-B1S60aS2.d.ts +373 -0
- package/dist/{types-Dpwb4dD0.d.ts → types-B2Al1BNh.d.ts} +8 -13
- package/dist/types-B2El99VY.d.cts +2835 -0
- package/dist/types-BHCigZFc.d.ts +32 -0
- package/dist/{types-ebolWqn1.d.ts → types-BIAP4CYp.d.cts} +27 -16
- package/dist/types-BJLRgXw0.d.ts +726 -0
- package/dist/types-BMsK6T5k.d.ts +2835 -0
- package/dist/types-BV74LS5r.d.ts +148 -0
- package/dist/types-BXnUqdBB.d.cts +621 -0
- package/dist/{types-nt7I4XNc.d.cts → types-Bc3-a3DT.d.cts} +7 -6
- package/dist/types-BdKtW2Ml.d.cts +23 -0
- package/dist/types-Bv5vw2dc.d.cts +726 -0
- package/dist/{types-BALUbGA5.d.ts → types-BvXODdf5.d.ts} +48 -80
- package/dist/types-By47HWwB.d.cts +386 -0
- package/dist/{types-DOc5_aYZ.d.ts → types-C0bGZqFI.d.cts} +16 -21
- package/dist/types-C2p7JYQ3.d.cts +373 -0
- package/dist/types-CFhAduFK.d.cts +2162 -0
- package/dist/{types-EZBBpiFU.d.ts → types-CIJAtX8q.d.cts} +238 -349
- package/dist/types-CIybfUJ9.d.cts +66 -0
- package/dist/{types-CFeOCzzg.d.cts → types-COFrOmuO.d.ts} +27 -16
- package/dist/{types-D2qGShlS.d.ts → types-CQd9PuKY.d.cts} +31 -106
- package/dist/{types-COti0FGo.d.ts → types-CgF9R0Na.d.ts} +9 -12
- package/dist/types-Co8WobOo.d.ts +2162 -0
- package/dist/{types-D6dnnju2.d.ts → types-CuAoZH8w.d.cts} +32 -30
- package/dist/{types-BsejtGjZ.d.ts → types-Culr5v8R.d.ts} +9 -15
- package/dist/{types-Y1ynT2PH.d.cts → types-D5VvEdOv.d.ts} +31 -106
- package/dist/{types-BuEkMmKT.d.ts → types-D7YGPUsm.d.ts} +219 -234
- package/dist/types-DG_FlLJt.d.cts +2088 -0
- package/dist/{types-BcaALDYY.d.cts → types-DLazCdFR.d.cts} +9 -15
- package/dist/types-DMMMQuNt.d.ts +2088 -0
- package/dist/{types-Bp8d9PJf.d.cts → types-DN7RWWBw.d.ts} +16 -21
- package/dist/{types-DNyZ0z3L.d.cts → types-DQOOWgLt.d.cts} +219 -234
- package/dist/{types-DrGnvgkB.d.ts → types-DSBNqF1J.d.cts} +9 -14
- package/dist/{types-BCBF_5cU.d.cts → types-DWUd__fe.d.ts} +32 -30
- package/dist/types-DdeZK3BO.d.ts +386 -0
- package/dist/types-Dirp9mni.d.ts +66 -0
- package/dist/{types-CfzHhZVG.d.ts → types-DkoyCUqv.d.ts} +7 -6
- package/dist/{types-Cffam0Nw.d.ts → types-DnOGCb-p.d.cts} +105 -80
- package/dist/{types-CniF_D1P.d.cts → types-Drk7PEhk.d.ts} +8 -10
- package/dist/types-DyIKgbGB.d.ts +621 -0
- package/dist/{types-qvle4Ydu.d.cts → types-RmbvQimP.d.ts} +105 -80
- package/dist/types-SX78XZZ0.d.ts +23 -0
- package/dist/{types-cxk-0ftN.d.cts → types-X-gQF8F8.d.ts} +238 -349
- package/dist/types-ca-YNg1r.d.cts +148 -0
- package/dist/{types-CwAYn1EJ.d.cts → types-eP06LqcE.d.cts} +48 -80
- package/dist/types-lFsTSkhe.d.cts +14 -0
- package/dist/types-lFsTSkhe.d.ts +14 -0
- package/dist/{types-Bom93Zx2.d.cts → types-lVXf05pr.d.ts} +9 -14
- package/dist/types-mXM8MrYS.d.cts +32 -0
- package/dist/{types-BPKQRahf.d.cts → types-sTH4KiPc.d.cts} +8 -13
- package/dist/{types-CxAH36ip.d.cts → types-uP64XthM.d.cts} +9 -12
- package/dist/validateConnectionStatus-CBhXmvWC.js +38 -0
- package/dist/validateConnectionStatus-CBhXmvWC.js.map +1 -0
- package/dist/validateConnectionStatus-DVHXGTdi.cjs +55 -0
- package/dist/validateConnectionStatus-DVHXGTdi.cjs.map +1 -0
- package/dist/vault/index.cjs +49 -13
- package/dist/vault/index.cjs.map +1 -1
- package/dist/vault/index.d.cts +2 -27
- package/dist/vault/index.d.ts +2 -27
- package/dist/vault/index.js +49 -5
- package/dist/vault/index.js.map +1 -1
- package/dist/vault/types.cjs +0 -4
- package/dist/vault/types.d.cts +2 -385
- package/dist/vault/types.d.ts +2 -385
- package/dist/vault/types.js +1 -3
- package/package.json +46 -7
- package/surface/apps.md +2 -2
- package/surface/auth.md +9 -2
- package/surface/chat.md +2 -2
- package/surface/dataScience.md +2 -2
- package/surface/kaiAgent.md +2 -1
- package/surface/queryService.md +4 -3
- package/surface/queue.md +2 -1
- package/surface/sdk.md +8 -8
- package/surface/storage.md +40 -35
- package/surface/syncActions.md +2 -2
- package/dist/ManagementClientAuthError-4J0S5tV-.d.ts +0 -9
- package/dist/ManagementClientAuthError-CyDpa4NS.d.cts +0 -9
- package/dist/adminRoles-BSUPLfNf.d.cts +0 -12
- package/dist/adminRoles-BSUPLfNf.d.ts +0 -12
- package/dist/ai/types.cjs.map +0 -1
- package/dist/ai/types.js.map +0 -1
- package/dist/appLogs-BbgAJ5I8.d.cts +0 -7
- package/dist/appLogs-BbgAJ5I8.d.ts +0 -7
- package/dist/apps/types.cjs.map +0 -1
- package/dist/apps/types.js.map +0 -1
- package/dist/auth/index.cjs.map +0 -1
- package/dist/auth/index.js.map +0 -1
- package/dist/auth/types.cjs.map +0 -1
- package/dist/auth/types.js.map +0 -1
- package/dist/backends-UNp_e5y9.d.cts +0 -7
- package/dist/backends-UNp_e5y9.d.ts +0 -7
- package/dist/chunk-22E6IGXR.js +0 -6
- package/dist/chunk-22E6IGXR.js.map +0 -1
- package/dist/chunk-24YVNNAG.js +0 -83
- package/dist/chunk-24YVNNAG.js.map +0 -1
- package/dist/chunk-255CHZ3U.js +0 -200
- package/dist/chunk-255CHZ3U.js.map +0 -1
- package/dist/chunk-2BCH2U57.js +0 -67
- package/dist/chunk-2BCH2U57.js.map +0 -1
- package/dist/chunk-2BQBKU6E.js +0 -270
- package/dist/chunk-2BQBKU6E.js.map +0 -1
- package/dist/chunk-2JKTV7UG.cjs +0 -35
- package/dist/chunk-2JKTV7UG.cjs.map +0 -1
- package/dist/chunk-3UBGQFBU.js +0 -29
- package/dist/chunk-3UBGQFBU.js.map +0 -1
- package/dist/chunk-4RC5E3SL.js +0 -140
- package/dist/chunk-4RC5E3SL.js.map +0 -1
- package/dist/chunk-552FC4ZV.js +0 -14
- package/dist/chunk-552FC4ZV.js.map +0 -1
- package/dist/chunk-57Q4CY4H.js +0 -190
- package/dist/chunk-57Q4CY4H.js.map +0 -1
- package/dist/chunk-5A3AQIXR.js +0 -14
- package/dist/chunk-5HEIR4DC.js +0 -39
- package/dist/chunk-5HEIR4DC.js.map +0 -1
- package/dist/chunk-5SR2L35Y.cjs +0 -1828
- package/dist/chunk-5SR2L35Y.cjs.map +0 -1
- package/dist/chunk-62LG5KPI.js +0 -285
- package/dist/chunk-62LG5KPI.js.map +0 -1
- package/dist/chunk-67P5UI6H.js +0 -58
- package/dist/chunk-67P5UI6H.js.map +0 -1
- package/dist/chunk-6PVEHUJL.cjs +0 -1308
- package/dist/chunk-6PVEHUJL.cjs.map +0 -1
- package/dist/chunk-6XFXU5N4.js +0 -119
- package/dist/chunk-6XFXU5N4.js.map +0 -1
- package/dist/chunk-6YZQIMML.cjs +0 -163
- package/dist/chunk-6YZQIMML.cjs.map +0 -1
- package/dist/chunk-6ZQBFK2Y.js +0 -24
- package/dist/chunk-6ZQBFK2Y.js.map +0 -1
- package/dist/chunk-7J2R6XHB.js +0 -3
- package/dist/chunk-7J2R6XHB.js.map +0 -1
- package/dist/chunk-AJ3SCWUB.cjs +0 -69
- package/dist/chunk-AJ3SCWUB.cjs.map +0 -1
- package/dist/chunk-AXYNFDUI.cjs +0 -43
- package/dist/chunk-AXYNFDUI.cjs.map +0 -1
- package/dist/chunk-B45B4AYG.js +0 -272
- package/dist/chunk-B45B4AYG.js.map +0 -1
- package/dist/chunk-B4T4QCLB.js +0 -116
- package/dist/chunk-B4T4QCLB.js.map +0 -1
- package/dist/chunk-BCZPCMGL.cjs +0 -49
- package/dist/chunk-BCZPCMGL.cjs.map +0 -1
- package/dist/chunk-BGJWHTBJ.js +0 -66
- package/dist/chunk-BGJWHTBJ.js.map +0 -1
- package/dist/chunk-BVRPZKRE.cjs +0 -147
- package/dist/chunk-BVRPZKRE.cjs.map +0 -1
- package/dist/chunk-BZB4UVQA.cjs +0 -192
- package/dist/chunk-BZB4UVQA.cjs.map +0 -1
- package/dist/chunk-CHRBWCL7.cjs +0 -472
- package/dist/chunk-CHRBWCL7.cjs.map +0 -1
- package/dist/chunk-CPZME73I.js +0 -16
- package/dist/chunk-CPZME73I.js.map +0 -1
- package/dist/chunk-DVV35AIS.js +0 -468
- package/dist/chunk-DVV35AIS.js.map +0 -1
- package/dist/chunk-E7GGDLAH.cjs +0 -202
- package/dist/chunk-E7GGDLAH.cjs.map +0 -1
- package/dist/chunk-EQPBR3BE.cjs +0 -85
- package/dist/chunk-EQPBR3BE.cjs.map +0 -1
- package/dist/chunk-ERZEQ5JR.js +0 -40
- package/dist/chunk-ERZEQ5JR.js.map +0 -1
- package/dist/chunk-ES3ADC2G.cjs +0 -18
- package/dist/chunk-ES3ADC2G.cjs.map +0 -1
- package/dist/chunk-EWMXK3EI.cjs +0 -8
- package/dist/chunk-EWMXK3EI.cjs.map +0 -1
- package/dist/chunk-FEAE6L3K.cjs +0 -60
- package/dist/chunk-FEAE6L3K.cjs.map +0 -1
- package/dist/chunk-FPB6OGTV.js +0 -26
- package/dist/chunk-FPB6OGTV.js.map +0 -1
- package/dist/chunk-FVU7WU2H.cjs +0 -66
- package/dist/chunk-FVU7WU2H.cjs.map +0 -1
- package/dist/chunk-FW5GBBKL.js +0 -67
- package/dist/chunk-FW5GBBKL.js.map +0 -1
- package/dist/chunk-G2SWCC3X.js +0 -90
- package/dist/chunk-G2SWCC3X.js.map +0 -1
- package/dist/chunk-G3JHVIDZ.cjs +0 -286
- package/dist/chunk-G3JHVIDZ.cjs.map +0 -1
- package/dist/chunk-G3N5KDEY.js +0 -10
- package/dist/chunk-G3N5KDEY.js.map +0 -1
- package/dist/chunk-HGKDXF35.js +0 -301
- package/dist/chunk-HGKDXF35.js.map +0 -1
- package/dist/chunk-HITKHHWN.cjs +0 -174
- package/dist/chunk-HITKHHWN.cjs.map +0 -1
- package/dist/chunk-HQO572JW.cjs +0 -34
- package/dist/chunk-HQO572JW.cjs.map +0 -1
- package/dist/chunk-HUQ5ATIL.cjs +0 -290
- package/dist/chunk-HUQ5ATIL.cjs.map +0 -1
- package/dist/chunk-HZDVMHU6.js +0 -344
- package/dist/chunk-HZDVMHU6.js.map +0 -1
- package/dist/chunk-ICWUR5WA.cjs +0 -68
- package/dist/chunk-ICWUR5WA.cjs.map +0 -1
- package/dist/chunk-IQFNHQWP.cjs +0 -47
- package/dist/chunk-IQFNHQWP.cjs.map +0 -1
- package/dist/chunk-IZ4QM7O4.js +0 -1304
- package/dist/chunk-IZ4QM7O4.js.map +0 -1
- package/dist/chunk-J5JCXSAS.cjs +0 -117
- package/dist/chunk-J5JCXSAS.cjs.map +0 -1
- package/dist/chunk-JI7HLIDL.cjs +0 -119
- package/dist/chunk-JI7HLIDL.cjs.map +0 -1
- package/dist/chunk-JWISA775.cjs +0 -92
- package/dist/chunk-JWISA775.cjs.map +0 -1
- package/dist/chunk-K3BLXPLA.cjs +0 -16
- package/dist/chunk-K3BLXPLA.cjs.map +0 -1
- package/dist/chunk-KATUDT3E.js +0 -45
- package/dist/chunk-KATUDT3E.js.map +0 -1
- package/dist/chunk-KGBWWS6I.js +0 -32
- package/dist/chunk-KGBWWS6I.js.map +0 -1
- package/dist/chunk-KQENBXPS.cjs +0 -34
- package/dist/chunk-KQENBXPS.cjs.map +0 -1
- package/dist/chunk-KTKJD4DM.js +0 -60
- package/dist/chunk-KTKJD4DM.js.map +0 -1
- package/dist/chunk-LNZP2O4P.js +0 -169
- package/dist/chunk-LNZP2O4P.js.map +0 -1
- package/dist/chunk-LWQP7OWA.js +0 -75
- package/dist/chunk-LWQP7OWA.js.map +0 -1
- package/dist/chunk-MRHQJNWF.cjs +0 -8
- package/dist/chunk-MRHQJNWF.cjs.map +0 -1
- package/dist/chunk-MSI6FVGG.js +0 -6
- package/dist/chunk-MSI6FVGG.js.map +0 -1
- package/dist/chunk-N4COL54U.cjs +0 -22
- package/dist/chunk-N4COL54U.cjs.map +0 -1
- package/dist/chunk-NFJKJGXR.js +0 -397
- package/dist/chunk-NFJKJGXR.js.map +0 -1
- package/dist/chunk-NH2TQGRL.cjs +0 -28
- package/dist/chunk-NH2TQGRL.cjs.map +0 -1
- package/dist/chunk-NHYL5QPM.js +0 -74
- package/dist/chunk-NHYL5QPM.js.map +0 -1
- package/dist/chunk-ON4ILCHP.js +0 -1822
- package/dist/chunk-ON4ILCHP.js.map +0 -1
- package/dist/chunk-PLF4JX5B.cjs +0 -155
- package/dist/chunk-PLF4JX5B.cjs.map +0 -1
- package/dist/chunk-PSR3N4NC.js +0 -136
- package/dist/chunk-PSR3N4NC.js.map +0 -1
- package/dist/chunk-QHD4LPAQ.cjs +0 -8
- package/dist/chunk-QHD4LPAQ.cjs.map +0 -1
- package/dist/chunk-QNF3L4B7.js +0 -115
- package/dist/chunk-QNF3L4B7.js.map +0 -1
- package/dist/chunk-RBN3ITTM.js +0 -153
- package/dist/chunk-RBN3ITTM.js.map +0 -1
- package/dist/chunk-RRC5RKF7.cjs +0 -12
- package/dist/chunk-RRC5RKF7.cjs.map +0 -1
- package/dist/chunk-RXYT7EMN.cjs +0 -318
- package/dist/chunk-RXYT7EMN.cjs.map +0 -1
- package/dist/chunk-S46FMY4G.cjs +0 -64
- package/dist/chunk-S46FMY4G.cjs.map +0 -1
- package/dist/chunk-S6BWQKHJ.cjs +0 -116
- package/dist/chunk-S6BWQKHJ.cjs.map +0 -1
- package/dist/chunk-SFTI6QFB.cjs +0 -85
- package/dist/chunk-SFTI6QFB.cjs.map +0 -1
- package/dist/chunk-SNP577FA.cjs +0 -346
- package/dist/chunk-SNP577FA.cjs.map +0 -1
- package/dist/chunk-SUVM3S2T.cjs +0 -69
- package/dist/chunk-SUVM3S2T.cjs.map +0 -1
- package/dist/chunk-SYZ5OFNT.js +0 -114
- package/dist/chunk-SYZ5OFNT.js.map +0 -1
- package/dist/chunk-SZBW4EE2.cjs +0 -180
- package/dist/chunk-SZBW4EE2.cjs.map +0 -1
- package/dist/chunk-T526LPBK.js +0 -6
- package/dist/chunk-T526LPBK.js.map +0 -1
- package/dist/chunk-TBHJQCAE.js +0 -64
- package/dist/chunk-TBHJQCAE.js.map +0 -1
- package/dist/chunk-U3E5YMLO.cjs +0 -82
- package/dist/chunk-U3E5YMLO.cjs.map +0 -1
- package/dist/chunk-U5SE6W5M.cjs +0 -158
- package/dist/chunk-U5SE6W5M.cjs.map +0 -1
- package/dist/chunk-UUY6LQT6.cjs +0 -267
- package/dist/chunk-UUY6LQT6.cjs.map +0 -1
- package/dist/chunk-UVX733BX.js +0 -83
- package/dist/chunk-UVX733BX.js.map +0 -1
- package/dist/chunk-V6FT3RTU.cjs +0 -42
- package/dist/chunk-V6FT3RTU.cjs.map +0 -1
- package/dist/chunk-VB56OVFM.cjs +0 -312
- package/dist/chunk-VB56OVFM.cjs.map +0 -1
- package/dist/chunk-WQ7NNIJ3.js +0 -33
- package/dist/chunk-WQ7NNIJ3.js.map +0 -1
- package/dist/chunk-WUFODWZV.js +0 -177
- package/dist/chunk-WUJ53PP7.cjs +0 -76
- package/dist/chunk-WUJ53PP7.cjs.map +0 -1
- package/dist/chunk-XPDEQND7.cjs +0 -4
- package/dist/chunk-XPDEQND7.cjs.map +0 -1
- package/dist/chunk-YDOSWWE4.cjs +0 -419
- package/dist/chunk-YDOSWWE4.cjs.map +0 -1
- package/dist/chunk-YGEJDWGG.js +0 -19
- package/dist/chunk-YGEJDWGG.js.map +0 -1
- package/dist/chunk-YXGBD4WP.cjs +0 -16
- package/dist/chunk-YXGBD4WP.cjs.map +0 -1
- package/dist/chunk-ZOREOLGE.js +0 -264
- package/dist/chunk-ZOREOLGE.js.map +0 -1
- package/dist/constants/index.cjs.map +0 -1
- package/dist/constants/index.js.map +0 -1
- package/dist/createFetchClient-BHAsPDgF.d.cts +0 -86
- package/dist/createFetchClient-CFIwc6Lh.d.ts +0 -86
- package/dist/createGenericFetchClient-JcbIIqwF.d.cts +0 -18
- package/dist/createGenericFetchClient-ZGG5wbAC.d.ts +0 -18
- package/dist/createOpenapiFetchClient-CduEua6F.d.cts +0 -24
- package/dist/createOpenapiFetchClient-wLlVgp3k.d.ts +0 -24
- package/dist/dataScience/index.cjs.map +0 -1
- package/dist/dataScience/index.js.map +0 -1
- package/dist/dataScience/types.cjs.map +0 -1
- package/dist/dataScience/types.js.map +0 -1
- package/dist/domain/permissions/index.cjs.map +0 -1
- package/dist/domain/permissions/index.js.map +0 -1
- package/dist/domain/storageTable/index.cjs.map +0 -1
- package/dist/domain/storageTable/index.js.map +0 -1
- package/dist/editor/types.cjs.map +0 -1
- package/dist/editor/types.js.map +0 -1
- package/dist/encryption/types.cjs.map +0 -1
- package/dist/encryption/types.js.map +0 -1
- package/dist/import/index.cjs.map +0 -1
- package/dist/import/index.js.map +0 -1
- package/dist/keboolaUID-D1DGSbge.d.cts +0 -19
- package/dist/keboolaUID-D1DGSbge.d.ts +0 -19
- package/dist/management/index.cjs.map +0 -1
- package/dist/management/index.js.map +0 -1
- package/dist/management/types.cjs.map +0 -1
- package/dist/management/types.js.map +0 -1
- package/dist/metastore/index.cjs.map +0 -1
- package/dist/metastore/index.js.map +0 -1
- package/dist/metastore/types.cjs.map +0 -1
- package/dist/metastore/types.js.map +0 -1
- package/dist/notifications/types.cjs.map +0 -1
- package/dist/notifications/types.js.map +0 -1
- package/dist/oauth/index.cjs.map +0 -1
- package/dist/oauth/index.js.map +0 -1
- package/dist/oauth/types.cjs.map +0 -1
- package/dist/oauth/types.js.map +0 -1
- package/dist/omnisearch/types.cjs.map +0 -1
- package/dist/omnisearch/types.js.map +0 -1
- package/dist/project-Dmr-zrQG.d.ts +0 -17
- package/dist/project-DstzWVMN.d.cts +0 -17
- package/dist/queryService/index.cjs.map +0 -1
- package/dist/queryService/index.js.map +0 -1
- package/dist/queryService/types.cjs.map +0 -1
- package/dist/queryService/types.js.map +0 -1
- package/dist/queue/index.cjs.map +0 -1
- package/dist/queue/index.js.map +0 -1
- package/dist/queue/types.cjs.map +0 -1
- package/dist/queue/types.js.map +0 -1
- package/dist/registry-CcKlB-yY.d.ts +0 -1046
- package/dist/registry-Cg0Yng1z.d.cts +0 -1046
- package/dist/scheduler/types.cjs.map +0 -1
- package/dist/scheduler/types.js.map +0 -1
- package/dist/sdk/configurations/index.cjs.map +0 -1
- package/dist/sdk/configurations/index.js.map +0 -1
- package/dist/sdk/semanticLayer/types.cjs.map +0 -1
- package/dist/sdk/semanticLayer/types.js.map +0 -1
- package/dist/sdk/tag/index.cjs.map +0 -1
- package/dist/sdk/tag/index.js.map +0 -1
- package/dist/sdk/tag/types.cjs.map +0 -1
- package/dist/sdk/tag/types.js.map +0 -1
- package/dist/status/types.cjs.map +0 -1
- package/dist/status/types.js.map +0 -1
- package/dist/storage/index.cjs.map +0 -1
- package/dist/storage/index.js.map +0 -1
- package/dist/storage/types.cjs.map +0 -1
- package/dist/storage/types.js.map +0 -1
- package/dist/storageClient-BAid0vi2.d.cts +0 -1750
- package/dist/storageClient-BX50Attd.d.ts +0 -1750
- package/dist/storageSdk-BS5982c_.d.cts +0 -753
- package/dist/storageSdk-BeJcnEIO.d.ts +0 -753
- package/dist/stream/types.cjs.map +0 -1
- package/dist/stream/types.js.map +0 -1
- package/dist/syncActions/index.cjs.map +0 -1
- package/dist/syncActions/index.js.map +0 -1
- package/dist/syncActions/types.cjs.map +0 -1
- package/dist/syncActions/types.js.map +0 -1
- package/dist/telemetry/index.cjs.map +0 -1
- package/dist/telemetry/index.js.map +0 -1
- package/dist/telemetry/types.cjs.map +0 -1
- package/dist/telemetry/types.js.map +0 -1
- package/dist/types-C5DdOzx8.d.cts +0 -12
- package/dist/types-C_jxWM7A.d.ts +0 -12
- package/dist/types-UwuKN9Kx.d.cts +0 -60
- package/dist/types-UwuKN9Kx.d.ts +0 -60
- package/dist/types-f8dUjMX4.d.cts +0 -90
- package/dist/types-f8dUjMX4.d.ts +0 -90
- package/dist/vault/types.cjs.map +0 -1
- package/dist/vault/types.js.map +0 -1
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
const require_rolldown_runtime = require("./rolldown-runtime-VH7oDXx4.cjs");
|
|
2
|
+
let qs = require("qs");
|
|
3
|
+
qs = require_rolldown_runtime.__toESM(qs, 1);
|
|
4
|
+
//#region src/errors/ApiError.ts
|
|
5
|
+
var ApiError = class extends Error {
|
|
6
|
+
response;
|
|
7
|
+
request;
|
|
8
|
+
data;
|
|
9
|
+
constructor({ response, request, data }) {
|
|
10
|
+
super(response.statusText);
|
|
11
|
+
this.response = response;
|
|
12
|
+
this.request = request;
|
|
13
|
+
this.data = data;
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
//#endregion
|
|
17
|
+
//#region src/internal.ts
|
|
18
|
+
const KeboolaHttpHeader = {
|
|
19
|
+
STORAGE_API_TOKEN: "X-StorageApi-Token",
|
|
20
|
+
MANAGEMENT_API_TOKEN: "X-Kbc-Manageapitoken",
|
|
21
|
+
STORAGE_API_URL: "x-storageapi-url",
|
|
22
|
+
PROJECT_ID: "X-KBC-ProjectId",
|
|
23
|
+
/** Storage job a request enqueued, reported on the response rather than in its body. */
|
|
24
|
+
STORAGE_API_JOB_ID: "X-StorageApi-Job-Id"
|
|
25
|
+
};
|
|
26
|
+
const HttpStatus = {
|
|
27
|
+
NO_CONTENT: 204,
|
|
28
|
+
BAD_REQUEST: 400,
|
|
29
|
+
UNAUTHORIZED: 401,
|
|
30
|
+
UNPROCESSABLE_ENTITY: 422,
|
|
31
|
+
INTERNAL_SERVER_ERROR: 500,
|
|
32
|
+
BAD_GATEWAY: 502,
|
|
33
|
+
SERVICE_UNAVAILABLE: 503,
|
|
34
|
+
GATEWAY_TIMEOUT: 504
|
|
35
|
+
};
|
|
36
|
+
const ENCRYPTED_VALUE_PREFIX = "KBC::";
|
|
37
|
+
//#endregion
|
|
38
|
+
//#region src/fetchClient/createFetchClient/utils.ts
|
|
39
|
+
/**
|
|
40
|
+
* Strips trailing slashes from a base URL so concatenating a leading-slash
|
|
41
|
+
* path (e.g. `/v2/storage`) never produces a double slash.
|
|
42
|
+
*
|
|
43
|
+
* Without this, callers that pass `https://connection.keboola.com/` end up
|
|
44
|
+
* issuing requests to `https://connection.keboola.com//v2/storage/...`, which
|
|
45
|
+
* the Storage API rejects with a 404.
|
|
46
|
+
*/
|
|
47
|
+
const normalizeBaseUrl = (baseUrl) => baseUrl.replace(/\/+$/, "");
|
|
48
|
+
const HttpHeader = {
|
|
49
|
+
CONTENT_TYPE: "content-type",
|
|
50
|
+
CONTENT_DISPOSITION: "content-disposition",
|
|
51
|
+
AUTHORIZATION: "Authorization",
|
|
52
|
+
IDEMPOTENCY_KEY: "Idempotency-Key",
|
|
53
|
+
IF_MATCH: "If-Match"
|
|
54
|
+
};
|
|
55
|
+
const HttpContentType = {
|
|
56
|
+
JSON: "application/json",
|
|
57
|
+
TEXT_PLAIN: "text/plain",
|
|
58
|
+
FORM_DATA: "multipart/form-data",
|
|
59
|
+
TEXT_HTML: "text/html"
|
|
60
|
+
};
|
|
61
|
+
const defaultValidateStatus = ({ response }) => response.status >= 200 && response.status <= 299;
|
|
62
|
+
/**
|
|
63
|
+
* Whether a response carries an HTML document.
|
|
64
|
+
*
|
|
65
|
+
* - Media types are case-insensitive, so a `Text/HTML` login page is still one.
|
|
66
|
+
* - Only meaningful on a *successful* response: HTML on a failed one is a real error page.
|
|
67
|
+
*/
|
|
68
|
+
const isHtmlResponse = ({ response }) => !!response.headers.get(HttpHeader.CONTENT_TYPE)?.toLowerCase().includes(HttpContentType.TEXT_HTML);
|
|
69
|
+
function removeUndefined(obj) {
|
|
70
|
+
const objCopy = { ...obj };
|
|
71
|
+
for (const [key, value] of Object.entries(objCopy)) if (value == null) delete objCopy[key];
|
|
72
|
+
return objCopy;
|
|
73
|
+
}
|
|
74
|
+
const JSON_MEDIA_TYPE = /^application\/([\w.-]+\+)?json$/;
|
|
75
|
+
const getMediaType = (response) => response.headers.get(HttpHeader.CONTENT_TYPE)?.split(";")[0]?.trim().toLowerCase() ?? "";
|
|
76
|
+
const parseData = async (response) => {
|
|
77
|
+
if (response.status === HttpStatus.NO_CONTENT) return null;
|
|
78
|
+
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
|
+
}
|
|
83
|
+
if (mediaType === "application/octet-stream") return response.blob();
|
|
84
|
+
return response.text();
|
|
85
|
+
};
|
|
86
|
+
const cleanHeadersInit = (headersInit) => {
|
|
87
|
+
if (Array.isArray(headersInit)) return headersInit;
|
|
88
|
+
if (headersInit instanceof Headers) return headersInit;
|
|
89
|
+
if (headersInit == null) return headersInit;
|
|
90
|
+
return removeUndefined(headersInit);
|
|
91
|
+
};
|
|
92
|
+
const createHeaders = (headersInitA, headersInitB) => {
|
|
93
|
+
const headersA = new Headers(cleanHeadersInit(headersInitA));
|
|
94
|
+
new Headers(cleanHeadersInit(headersInitB)).forEach((value, key) => {
|
|
95
|
+
headersA.set(key, value);
|
|
96
|
+
});
|
|
97
|
+
return headersA;
|
|
98
|
+
};
|
|
99
|
+
const createPath = (path, pathParam = {}) => path.replace(/\{([^}]+)}/g, (_, key) => {
|
|
100
|
+
if (!(key in pathParam)) throw new Error(`Path parameter "${key}" is missing in the path "${path}"`);
|
|
101
|
+
return encodeURIComponent(pathParam[key]);
|
|
102
|
+
});
|
|
103
|
+
const createSearch = (query, options = {}) => {
|
|
104
|
+
return qs.default.stringify(query, {
|
|
105
|
+
encodeValuesOnly: true,
|
|
106
|
+
skipNulls: true,
|
|
107
|
+
...options
|
|
108
|
+
});
|
|
109
|
+
};
|
|
110
|
+
const createBody = (body, headers) => {
|
|
111
|
+
if (body == null) return null;
|
|
112
|
+
if (body instanceof FormData) return body;
|
|
113
|
+
if (typeof body === "string") return body;
|
|
114
|
+
const stringifyBody = JSON.stringify(body);
|
|
115
|
+
const stringBody = stringifyBody === "{}" ? null : stringifyBody;
|
|
116
|
+
if (stringBody) headers.set(HttpHeader.CONTENT_TYPE, HttpContentType.JSON);
|
|
117
|
+
return stringBody;
|
|
118
|
+
};
|
|
119
|
+
const parseContentDispositionHeader = (contentDisposition) => {
|
|
120
|
+
return {
|
|
121
|
+
type: (() => {
|
|
122
|
+
return (contentDisposition?.match(/^\s*(inline|attachment)\s*;/i))?.[1]?.toLowerCase() ?? "unknown";
|
|
123
|
+
})(),
|
|
124
|
+
filename: (() => {
|
|
125
|
+
const filenameMatch = contentDisposition?.match(/filename="([^"]+)"/i);
|
|
126
|
+
if (filenameMatch) return filenameMatch[1];
|
|
127
|
+
const encodedFilenameMatch = contentDisposition?.match(/filename\*=(?:UTF-8'')?([^;]+)/i);
|
|
128
|
+
if (encodedFilenameMatch?.[1]) return decodeURIComponent(encodedFilenameMatch[1]);
|
|
129
|
+
return (contentDisposition?.match(/filename=([^;]+)/i))?.[1] ?? null;
|
|
130
|
+
})()
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
const createFetchRequest = ({ url, method, params, options = {}, defaultOptions }) => {
|
|
134
|
+
const { baseUrl, validateStatus: defValidateStatus = defaultValidateStatus, headers: defaultHeaders, fetchFn: defaultFetchFn, ...restDefaultOptions } = defaultOptions;
|
|
135
|
+
const { validateStatus, queryArrayFormat, headers: endpointHeaders, fetchFn, ...restOptions } = options;
|
|
136
|
+
const headers = createHeaders(defaultHeaders, endpointHeaders);
|
|
137
|
+
const path = createPath(url, params.path);
|
|
138
|
+
const search = createSearch(params.query ?? {}, { arrayFormat: queryArrayFormat });
|
|
139
|
+
const body = createBody(params.body, headers);
|
|
140
|
+
const urlInstance = new URL(normalizeBaseUrl(baseUrl) + path);
|
|
141
|
+
urlInstance.search = search;
|
|
142
|
+
return {
|
|
143
|
+
request: new Request(urlInstance, {
|
|
144
|
+
...restDefaultOptions,
|
|
145
|
+
...restOptions,
|
|
146
|
+
headers,
|
|
147
|
+
method: method.toUpperCase(),
|
|
148
|
+
body
|
|
149
|
+
}),
|
|
150
|
+
validateStatus: validateStatus ?? defValidateStatus,
|
|
151
|
+
fetchFn: fetchFn ?? defaultFetchFn
|
|
152
|
+
};
|
|
153
|
+
};
|
|
154
|
+
//#endregion
|
|
155
|
+
//#region src/fetchClient/createFetchClient/createFetchClient.ts
|
|
156
|
+
const isApiError = (error) => error instanceof ApiError;
|
|
157
|
+
const isAbortError = (error) => error instanceof DOMException && error.name === "AbortError";
|
|
158
|
+
const isFetchClientError = (error) => error instanceof TypeError || error instanceof SyntaxError || isApiError(error);
|
|
159
|
+
const coreFetch = async ({ request, validateStatus, fetchFn = fetch }) => {
|
|
160
|
+
const response = await fetchFn(request);
|
|
161
|
+
const apiResponse = {
|
|
162
|
+
request,
|
|
163
|
+
response,
|
|
164
|
+
data: await parseData(response)
|
|
165
|
+
};
|
|
166
|
+
const boolOrError = validateStatus(apiResponse);
|
|
167
|
+
if (isApiError(boolOrError)) throw boolOrError;
|
|
168
|
+
if (!boolOrError) throw new ApiError(apiResponse);
|
|
169
|
+
return apiResponse;
|
|
170
|
+
};
|
|
171
|
+
const createFetchClient = ({ middlewares = [], ...defaultOptions }) => {
|
|
172
|
+
const fetchWithMiddlewares = middlewares.reduceRight((next, middleware) => middleware(next), coreFetch);
|
|
173
|
+
const createFetchMethod = (method) => async (url, params, options = {}) => {
|
|
174
|
+
const request = createFetchRequest({
|
|
175
|
+
url,
|
|
176
|
+
method,
|
|
177
|
+
params,
|
|
178
|
+
defaultOptions,
|
|
179
|
+
options
|
|
180
|
+
});
|
|
181
|
+
return (options?.middlewares ?? []).reduceRight((next, middleware) => middleware(next), fetchWithMiddlewares)(request);
|
|
182
|
+
};
|
|
183
|
+
return {
|
|
184
|
+
get: createFetchMethod("get"),
|
|
185
|
+
post: createFetchMethod("post"),
|
|
186
|
+
put: createFetchMethod("put"),
|
|
187
|
+
patch: createFetchMethod("patch"),
|
|
188
|
+
delete: createFetchMethod("delete")
|
|
189
|
+
};
|
|
190
|
+
};
|
|
191
|
+
//#endregion
|
|
192
|
+
Object.defineProperty(exports, "ApiError", {
|
|
193
|
+
enumerable: true,
|
|
194
|
+
get: function() {
|
|
195
|
+
return ApiError;
|
|
196
|
+
}
|
|
197
|
+
});
|
|
198
|
+
Object.defineProperty(exports, "ENCRYPTED_VALUE_PREFIX", {
|
|
199
|
+
enumerable: true,
|
|
200
|
+
get: function() {
|
|
201
|
+
return ENCRYPTED_VALUE_PREFIX;
|
|
202
|
+
}
|
|
203
|
+
});
|
|
204
|
+
Object.defineProperty(exports, "HttpContentType", {
|
|
205
|
+
enumerable: true,
|
|
206
|
+
get: function() {
|
|
207
|
+
return HttpContentType;
|
|
208
|
+
}
|
|
209
|
+
});
|
|
210
|
+
Object.defineProperty(exports, "HttpHeader", {
|
|
211
|
+
enumerable: true,
|
|
212
|
+
get: function() {
|
|
213
|
+
return HttpHeader;
|
|
214
|
+
}
|
|
215
|
+
});
|
|
216
|
+
Object.defineProperty(exports, "HttpStatus", {
|
|
217
|
+
enumerable: true,
|
|
218
|
+
get: function() {
|
|
219
|
+
return HttpStatus;
|
|
220
|
+
}
|
|
221
|
+
});
|
|
222
|
+
Object.defineProperty(exports, "KeboolaHttpHeader", {
|
|
223
|
+
enumerable: true,
|
|
224
|
+
get: function() {
|
|
225
|
+
return KeboolaHttpHeader;
|
|
226
|
+
}
|
|
227
|
+
});
|
|
228
|
+
Object.defineProperty(exports, "createFetchClient", {
|
|
229
|
+
enumerable: true,
|
|
230
|
+
get: function() {
|
|
231
|
+
return createFetchClient;
|
|
232
|
+
}
|
|
233
|
+
});
|
|
234
|
+
Object.defineProperty(exports, "defaultValidateStatus", {
|
|
235
|
+
enumerable: true,
|
|
236
|
+
get: function() {
|
|
237
|
+
return defaultValidateStatus;
|
|
238
|
+
}
|
|
239
|
+
});
|
|
240
|
+
Object.defineProperty(exports, "isAbortError", {
|
|
241
|
+
enumerable: true,
|
|
242
|
+
get: function() {
|
|
243
|
+
return isAbortError;
|
|
244
|
+
}
|
|
245
|
+
});
|
|
246
|
+
Object.defineProperty(exports, "isApiError", {
|
|
247
|
+
enumerable: true,
|
|
248
|
+
get: function() {
|
|
249
|
+
return isApiError;
|
|
250
|
+
}
|
|
251
|
+
});
|
|
252
|
+
Object.defineProperty(exports, "isFetchClientError", {
|
|
253
|
+
enumerable: true,
|
|
254
|
+
get: function() {
|
|
255
|
+
return isFetchClientError;
|
|
256
|
+
}
|
|
257
|
+
});
|
|
258
|
+
Object.defineProperty(exports, "isHtmlResponse", {
|
|
259
|
+
enumerable: true,
|
|
260
|
+
get: function() {
|
|
261
|
+
return isHtmlResponse;
|
|
262
|
+
}
|
|
263
|
+
});
|
|
264
|
+
Object.defineProperty(exports, "normalizeBaseUrl", {
|
|
265
|
+
enumerable: true,
|
|
266
|
+
get: function() {
|
|
267
|
+
return normalizeBaseUrl;
|
|
268
|
+
}
|
|
269
|
+
});
|
|
270
|
+
Object.defineProperty(exports, "parseContentDispositionHeader", {
|
|
271
|
+
enumerable: true,
|
|
272
|
+
get: function() {
|
|
273
|
+
return parseContentDispositionHeader;
|
|
274
|
+
}
|
|
275
|
+
});
|
|
276
|
+
|
|
277
|
+
//# sourceMappingURL=createFetchClient-B9Cv0W9f.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createFetchClient-B9Cv0W9f.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 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\nexport const parseData = async (response: Response) => {\n if (response.status === HttpStatus.NO_CONTENT) return null;\n\n const mediaType = getMediaType(response);\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.\n if (JSON_MEDIA_TYPE.test(mediaType)) {\n const text = await response.text();\n\n return text.trim() === '' ? null : JSON.parse(text);\n }\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') {\n return response.blob();\n }\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 ...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 };\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 }) => {\n const response = await fetchFn(request);\n const data = await parseData(response);\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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AGtC,MAAM,cAAc;EAClB;EACA;EACA,MAAA,MALiB,UAAU,QAAQ;CAMrC;CAEA,MAAM,cAAc,eAAe,WAAW;CAC9C,IAAI,WAAW,WAAW,GAAG,MAAM;CACnC,IAAI,CAAC,aAAa,MAAM,IAAI,SAAS,WAAW;CAEhD,OAAO;AACT;AAEA,MAAa,qBAAqB,EAChC,cAAc,CAAC,GACf,GAAG,qBAC2B;CAC9B,MAAM,uBAAuB,YAAY,aACtC,MAAM,eAAe,WAAW,IAAI,GACrC,SACF;CAEA,MAAM,qBACH,WACD,OAAO,KAAa,QAAyB,UAA8B,CAAC,MAAM;EAChF,MAAM,UAAU,mBAAmB;GACjC;GACA;GACA;GACA;GACA;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"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
const require_createFetchClient = require("./createFetchClient-B9Cv0W9f.cjs");
|
|
2
|
+
//#region src/fetchClient/createGenericFetchClient.ts
|
|
3
|
+
const createGenericFetchClient = (defaultOptions) => require_createFetchClient.createFetchClient(defaultOptions);
|
|
4
|
+
//#endregion
|
|
5
|
+
Object.defineProperty(exports, "createGenericFetchClient", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return createGenericFetchClient;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
//# sourceMappingURL=createGenericFetchClient-BWoSkTki.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createGenericFetchClient-BWoSkTki.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"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { t as createFetchClient } from "./createFetchClient-B1h3-p65.js";
|
|
2
|
+
//#region src/fetchClient/createGenericFetchClient.ts
|
|
3
|
+
const createGenericFetchClient = (defaultOptions) => createFetchClient(defaultOptions);
|
|
4
|
+
//#endregion
|
|
5
|
+
export { createGenericFetchClient as t };
|
|
6
|
+
|
|
7
|
+
//# sourceMappingURL=createGenericFetchClient-DhpvUSlX.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createGenericFetchClient-DhpvUSlX.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"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { t as createFetchClient } from "./createFetchClient-B1h3-p65.js";
|
|
2
|
+
//#region src/fetchClient/createOpenapiFetchClient.ts
|
|
3
|
+
const createOpenapiFetchClient = (defaultOptions) => createFetchClient(defaultOptions);
|
|
4
|
+
//#endregion
|
|
5
|
+
export { createOpenapiFetchClient as t };
|
|
6
|
+
|
|
7
|
+
//# sourceMappingURL=createOpenapiFetchClient-0_oqhdPv.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createOpenapiFetchClient-0_oqhdPv.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"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
const require_createFetchClient = require("./createFetchClient-B9Cv0W9f.cjs");
|
|
2
|
+
//#region src/fetchClient/createOpenapiFetchClient.ts
|
|
3
|
+
const createOpenapiFetchClient = (defaultOptions) => require_createFetchClient.createFetchClient(defaultOptions);
|
|
4
|
+
//#endregion
|
|
5
|
+
Object.defineProperty(exports, "createOpenapiFetchClient", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return createOpenapiFetchClient;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
//# sourceMappingURL=createOpenapiFetchClient-yirrW6Tg.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createOpenapiFetchClient-yirrW6Tg.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"}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
//#region src/utils/createStore.ts
|
|
2
|
+
/**
|
|
3
|
+
* An occurrence, announced to whoever is listening.
|
|
4
|
+
*
|
|
5
|
+
* - For what happened rather than what is: nothing is held, so a listener that arrives later hears
|
|
6
|
+
* the next event and never the last one. A store is this plus a value it keeps.
|
|
7
|
+
* - Listeners run in the order they subscribed, synchronously, so an emitter is safe where the
|
|
8
|
+
* emitting code must not be left waiting.
|
|
9
|
+
* - A listener that throws is logged and stepped over. Emitting happens on someone else's call
|
|
10
|
+
* stack — a poll reporting how it ended, a session announcing a new token — and a subscriber's
|
|
11
|
+
* failure must not become theirs.
|
|
12
|
+
*/
|
|
13
|
+
const createEmitter = () => {
|
|
14
|
+
const listeners = /* @__PURE__ */ new Set();
|
|
15
|
+
return {
|
|
16
|
+
emit: (event) => listeners.forEach((listener) => {
|
|
17
|
+
try {
|
|
18
|
+
listener(event);
|
|
19
|
+
} catch (error) {
|
|
20
|
+
console.error("A subscriber threw while handling an event", error);
|
|
21
|
+
}
|
|
22
|
+
}),
|
|
23
|
+
subscribe: (listener) => {
|
|
24
|
+
listeners.add(listener);
|
|
25
|
+
return () => {
|
|
26
|
+
listeners.delete(listener);
|
|
27
|
+
};
|
|
28
|
+
},
|
|
29
|
+
clear: () => listeners.clear()
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
/** A value that is kept, and announced when it changes: an emitter with the value in front of it. */
|
|
33
|
+
const createStore = (initial) => {
|
|
34
|
+
const changes = createEmitter();
|
|
35
|
+
let value = initial;
|
|
36
|
+
return {
|
|
37
|
+
get: () => value,
|
|
38
|
+
set: (next) => {
|
|
39
|
+
if (Object.is(next, value)) return;
|
|
40
|
+
value = next;
|
|
41
|
+
changes.emit(value);
|
|
42
|
+
},
|
|
43
|
+
subscribe: changes.subscribe,
|
|
44
|
+
dispose: () => {
|
|
45
|
+
value = initial;
|
|
46
|
+
changes.clear();
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
const isPlainObjectOrArray = (value) => {
|
|
51
|
+
if (Array.isArray(value)) return true;
|
|
52
|
+
const proto = Object.getPrototypeOf(value);
|
|
53
|
+
return proto === Object.prototype || proto === null;
|
|
54
|
+
};
|
|
55
|
+
const shallowEqual = (a, b) => {
|
|
56
|
+
if (Object.is(a, b)) return true;
|
|
57
|
+
if (typeof a !== "object" || a === null || typeof b !== "object" || b === null) return false;
|
|
58
|
+
if (!isPlainObjectOrArray(a) || !isPlainObjectOrArray(b)) return false;
|
|
59
|
+
const aKeys = Object.keys(a);
|
|
60
|
+
const bKeys = Object.keys(b);
|
|
61
|
+
return aKeys.length === bKeys.length && aKeys.every((key) => Object.is(a[key], b[key]));
|
|
62
|
+
};
|
|
63
|
+
const createDerivedStore = ({ source, dependsOn, build, keyEquals = shallowEqual }) => {
|
|
64
|
+
let key = dependsOn(source.get());
|
|
65
|
+
const store = createStore(build(key));
|
|
66
|
+
const unsubscribe = source.subscribe((state) => {
|
|
67
|
+
const next = dependsOn(state);
|
|
68
|
+
if (keyEquals(key, next)) return;
|
|
69
|
+
key = next;
|
|
70
|
+
store.set(build(next));
|
|
71
|
+
});
|
|
72
|
+
return {
|
|
73
|
+
get: store.get,
|
|
74
|
+
subscribe: store.subscribe,
|
|
75
|
+
dispose: () => {
|
|
76
|
+
unsubscribe();
|
|
77
|
+
store.dispose();
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
const createDerivedAsyncStore = ({ source, dependsOn, build, keyEquals = shallowEqual }) => {
|
|
82
|
+
const store = createStore({ state: "idle" });
|
|
83
|
+
let currentKey = null;
|
|
84
|
+
let generation = 0;
|
|
85
|
+
let controller = null;
|
|
86
|
+
const run = (key) => {
|
|
87
|
+
controller?.abort();
|
|
88
|
+
controller = new AbortController();
|
|
89
|
+
const runGeneration = ++generation;
|
|
90
|
+
store.set({ state: "pending" });
|
|
91
|
+
build(key, controller.signal).then((value) => {
|
|
92
|
+
if (runGeneration === generation) store.set({
|
|
93
|
+
state: "ready",
|
|
94
|
+
value
|
|
95
|
+
});
|
|
96
|
+
}, (error) => {
|
|
97
|
+
if (runGeneration === generation) store.set({
|
|
98
|
+
state: "errored",
|
|
99
|
+
error
|
|
100
|
+
});
|
|
101
|
+
});
|
|
102
|
+
};
|
|
103
|
+
const sync = (state) => {
|
|
104
|
+
const next = dependsOn(state);
|
|
105
|
+
if (next === null) {
|
|
106
|
+
if (currentKey === null) return;
|
|
107
|
+
controller?.abort();
|
|
108
|
+
controller = null;
|
|
109
|
+
generation += 1;
|
|
110
|
+
currentKey = null;
|
|
111
|
+
store.set({ state: "idle" });
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
114
|
+
if (currentKey !== null && keyEquals(currentKey, next)) return;
|
|
115
|
+
currentKey = next;
|
|
116
|
+
run(next);
|
|
117
|
+
};
|
|
118
|
+
sync(source.get());
|
|
119
|
+
const unsubscribe = source.subscribe(sync);
|
|
120
|
+
const readable = {
|
|
121
|
+
get: store.get,
|
|
122
|
+
subscribe: store.subscribe,
|
|
123
|
+
dispose: () => {
|
|
124
|
+
controller?.abort();
|
|
125
|
+
unsubscribe();
|
|
126
|
+
store.dispose();
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
const settled = () => new Promise((resolve) => {
|
|
130
|
+
let unsubscribeSettled = () => {};
|
|
131
|
+
const check = (state) => {
|
|
132
|
+
if (state.state === "ready" || state.state === "errored") {
|
|
133
|
+
unsubscribeSettled();
|
|
134
|
+
resolve(state);
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
unsubscribeSettled = store.subscribe(check);
|
|
138
|
+
check(store.get());
|
|
139
|
+
});
|
|
140
|
+
return {
|
|
141
|
+
store: readable,
|
|
142
|
+
settled
|
|
143
|
+
};
|
|
144
|
+
};
|
|
145
|
+
//#endregion
|
|
146
|
+
export { shallowEqual as a, createStore as i, createDerivedStore as n, createEmitter as r, createDerivedAsyncStore as t };
|
|
147
|
+
|
|
148
|
+
//# sourceMappingURL=createStore-BNiCRQXa.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createStore-BNiCRQXa.js","names":[],"sources":["../src/utils/createStore.ts"],"sourcesContent":["type Listener<T> = (value: T) => void;\n\nexport type Emitter<T> = {\n emit: (event: T) => void;\n subscribe: (listener: Listener<T>) => () => void;\n /** Drops every listener. A store's `dispose` is the reason this exists. */\n clear: () => void;\n};\n\n/**\n * An occurrence, announced to whoever is listening.\n *\n * - For what happened rather than what is: nothing is held, so a listener that arrives later hears\n * the next event and never the last one. A store is this plus a value it keeps.\n * - Listeners run in the order they subscribed, synchronously, so an emitter is safe where the\n * emitting code must not be left waiting.\n * - A listener that throws is logged and stepped over. Emitting happens on someone else's call\n * stack — a poll reporting how it ended, a session announcing a new token — and a subscriber's\n * failure must not become theirs.\n */\nexport const createEmitter = <T>(): Emitter<T> => {\n const listeners = new Set<Listener<T>>();\n\n return {\n emit: (event) =>\n listeners.forEach((listener) => {\n try {\n listener(event);\n } catch (error) {\n console.error('A subscriber threw while handling an event', error);\n }\n }),\n subscribe: (listener) => {\n listeners.add(listener);\n\n return () => {\n listeners.delete(listener);\n };\n },\n clear: () => listeners.clear(),\n };\n};\n\nexport type ReadableStore<T> = {\n get: () => T;\n subscribe: (listener: Listener<T>) => () => void;\n dispose: () => void;\n};\n\nexport type Store<T> = ReadableStore<T> & {\n set: (value: T) => void;\n};\n\n/** A value that is kept, and announced when it changes: an emitter with the value in front of it. */\nexport const createStore = <T>(initial: T): Store<T> => {\n const changes = createEmitter<T>();\n let value = initial;\n\n return {\n get: () => value,\n set: (next) => {\n if (Object.is(next, value)) return;\n\n value = next;\n changes.emit(value);\n },\n subscribe: changes.subscribe,\n dispose: () => {\n value = initial;\n changes.clear();\n },\n };\n};\n\nconst isPlainObjectOrArray = (value: object): boolean => {\n if (Array.isArray(value)) return true;\n const proto = Object.getPrototypeOf(value);\n return proto === Object.prototype || proto === null;\n};\n\nexport const shallowEqual = <T>(a: T, b: T): boolean => {\n if (Object.is(a, b)) return true;\n if (typeof a !== 'object' || a === null || typeof b !== 'object' || b === null) return false;\n if (!isPlainObjectOrArray(a) || !isPlainObjectOrArray(b)) return false;\n const aKeys = Object.keys(a) as (keyof T)[];\n const bKeys = Object.keys(b) as (keyof T)[];\n return aKeys.length === bKeys.length && aKeys.every((key) => Object.is(a[key], b[key]));\n};\n\ntype DerivedStoreOptions<S, K, T> = {\n source: ReadableStore<S>;\n dependsOn: (state: S) => K;\n build: (key: K) => T;\n keyEquals?: (a: K, b: K) => boolean;\n};\n\nexport const createDerivedStore = <S, K, T>({\n source,\n dependsOn,\n build,\n keyEquals = shallowEqual,\n}: DerivedStoreOptions<S, K, T>): ReadableStore<T> => {\n let key = dependsOn(source.get());\n const store = createStore(build(key));\n\n // The source subscription lives for the derived store's lifetime (both normally live as long as\n // the client). `dispose()` tears down both it and the derived store, so a short-lived derived\n // store can be cleaned up without leaking the source subscription or taking stale updates.\n const unsubscribe = source.subscribe((state) => {\n const next = dependsOn(state);\n if (keyEquals(key, next)) return;\n key = next;\n store.set(build(next));\n });\n\n return {\n get: store.get,\n subscribe: store.subscribe,\n dispose: () => {\n unsubscribe();\n store.dispose();\n },\n };\n};\n\nexport type AsyncState<T> =\n | { state: 'idle' }\n | { state: 'pending' }\n | { state: 'ready'; value: T }\n | { state: 'errored'; error: unknown };\n\n// The terminal states `settled()` resolves with.\ntype SettledState<T> = Extract<AsyncState<T>, { state: 'ready' } | { state: 'errored' }>;\n\ntype DerivedAsyncStoreOptions<S, K, T> = {\n source: ReadableStore<S>;\n dependsOn: (state: S) => K | null;\n build: (key: K, signal: AbortSignal) => Promise<T>;\n keyEquals?: (a: K, b: K) => boolean;\n};\n\n// The async sibling of `createDerivedStore`: it derives a value that arrives later, exposed as an\n// `AsyncState<T>` cell. Two switchMap-style guarantees keep concurrent rebuilds honest:\n// - generation guard: only the latest run may write state, so a stale build resolving after a\n// newer key can never clobber the fresh result;\n// - AbortController: a re-key (or a null key) aborts the previous run's `signal` so in-flight work\n// can actually stop.\n// `dependsOn` returning `null` means \"nothing to build\" → the store goes `idle` and any in-flight run\n// is aborted. Like `createDerivedStore`, the subscription is permanent for the store's lifetime.\n//\n// Returns `{ store, settled }`: `store` is the reactive `AsyncState<T>` cell; `settled()` resolves\n// on the next terminal state with that state (`ready` or `errored`) — the awaitable bridge for\n// callers that need to `await` the build rather than react to it. It never rejects: a failed build\n// is data (`{ state: 'errored', error }`), so callers handle it the same way whether they await or\n// subscribe. Settles immediately if the store is already terminal; while `idle`/`pending` it waits.\nexport const createDerivedAsyncStore = <S, K, T>({\n source,\n dependsOn,\n build,\n keyEquals = shallowEqual,\n}: DerivedAsyncStoreOptions<S, K, T>): {\n store: ReadableStore<AsyncState<T>>;\n settled: () => Promise<SettledState<T>>;\n} => {\n const store = createStore<AsyncState<T>>({ state: 'idle' });\n let currentKey: K | null = null;\n let generation = 0;\n let controller: AbortController | null = null;\n\n const run = (key: K) => {\n controller?.abort();\n controller = new AbortController();\n const runGeneration = ++generation;\n store.set({ state: 'pending' });\n // `.then(onFulfilled, onRejected)` — the reject handler consumes every rejection (including the\n // AbortError from a superseded run), so nothing goes unhandled; the generation guard drops the\n // stale write either way.\n build(key, controller.signal).then(\n (value) => {\n if (runGeneration === generation) store.set({ state: 'ready', value });\n },\n (error) => {\n if (runGeneration === generation) store.set({ state: 'errored', error });\n },\n );\n };\n\n const sync = (state: S) => {\n const next = dependsOn(state);\n if (next === null) {\n if (currentKey === null) return;\n controller?.abort();\n controller = null;\n generation += 1;\n currentKey = null;\n store.set({ state: 'idle' });\n return;\n }\n if (currentKey !== null && keyEquals(currentKey, next)) return;\n currentKey = next;\n run(next);\n };\n sync(source.get());\n\n const unsubscribe = source.subscribe(sync);\n\n const readable: ReadableStore<AsyncState<T>> = {\n get: store.get,\n subscribe: store.subscribe,\n dispose: () => {\n controller?.abort();\n unsubscribe();\n store.dispose();\n },\n };\n\n const settled = (): Promise<SettledState<T>> =>\n new Promise<SettledState<T>>((resolve) => {\n let unsubscribeSettled = () => {};\n const check = (state: AsyncState<T>) => {\n if (state.state === 'ready' || state.state === 'errored') {\n unsubscribeSettled();\n resolve(state);\n }\n };\n unsubscribeSettled = store.subscribe(check);\n check(store.get());\n });\n\n return { store: readable, settled };\n};\n"],"mappings":";;;;;;;;;;;;AAoBA,MAAa,sBAAqC;CAChD,MAAM,4BAAY,IAAI,IAAiB;CAEvC,OAAO;EACL,OAAO,UACL,UAAU,SAAS,aAAa;GAC9B,IAAI;IACF,SAAS,KAAK;GAChB,SAAS,OAAO;IACd,QAAQ,MAAM,8CAA8C,KAAK;GACnE;EACF,CAAC;EACH,YAAY,aAAa;GACvB,UAAU,IAAI,QAAQ;GAEtB,aAAa;IACX,UAAU,OAAO,QAAQ;GAC3B;EACF;EACA,aAAa,UAAU,MAAM;CAC/B;AACF;;AAaA,MAAa,eAAkB,YAAyB;CACtD,MAAM,UAAU,cAAiB;CACjC,IAAI,QAAQ;CAEZ,OAAO;EACL,WAAW;EACX,MAAM,SAAS;GACb,IAAI,OAAO,G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