@keboola/api-client 25.0.0 → 29.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 +623 -0
- package/API-SURFACE.md +133 -57
- package/README.md +81 -42
- package/dist/ManagementClientAuthError-B97OtOQ7.js +15 -0
- package/dist/ManagementClientAuthError-B97OtOQ7.js.map +1 -0
- package/dist/ManagementClientAuthError-ZJ2-RoKT.cjs +20 -0
- package/dist/ManagementClientAuthError-ZJ2-RoKT.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 -50
- package/dist/ai/index.d.ts +52 -50
- 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-CNG3yby-.cjs +153 -0
- package/dist/appLogs-CNG3yby-.cjs.map +1 -0
- package/dist/appLogs-Dl5BcCSD.d.cts +10 -0
- package/dist/appLogs-VdgP08aX.d.ts +10 -0
- package/dist/appLogs-enL9XR9r.js +132 -0
- package/dist/appLogs-enL9XR9r.js.map +1 -0
- package/dist/apps/index.cjs +231 -0
- package/dist/apps/index.cjs.map +1 -0
- package/dist/apps/index.d.cts +248 -0
- package/dist/apps/index.d.ts +248 -0
- package/dist/apps/index.js +230 -0
- package/dist/apps/index.js.map +1 -0
- package/dist/apps/types.cjs +0 -0
- package/dist/apps/types.d.cts +3 -0
- package/dist/apps/types.d.ts +3 -0
- package/dist/apps/types.js +1 -0
- 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 +14 -53
- package/dist/auth/index.d.cts +2 -305
- package/dist/auth/index.d.ts +2 -305
- 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-5HCvCsZO.cjs +18 -0
- package/dist/auth-5HCvCsZO.cjs.map +1 -0
- package/dist/auth-D2jfNlpX.js +13 -0
- package/dist/{chunk-EDX5D6UY.js.map → auth-D2jfNlpX.js.map} +1 -1
- package/dist/authClient-Bgj2Ay7h.d.cts +320 -0
- package/dist/authClient-DOk6VKdV.js +332 -0
- package/dist/authClient-DOk6VKdV.js.map +1 -0
- package/dist/authClient-Dsd7W99W.d.ts +320 -0
- package/dist/authClient-Z8Eg8rlN.cjs +405 -0
- package/dist/authClient-Z8Eg8rlN.cjs.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 -48
- package/dist/chat/index.d.ts +49 -48
- 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/{chunk-IAYPOSMM.cjs.map → configurations-Byt59bIa.js.map} +1 -1
- 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 +10 -34
- package/dist/constants/index.d.cts +4 -92
- package/dist/constants/index.d.ts +4 -92
- package/dist/constants/index.js +4 -5
- package/dist/constants-CqyyBkXW.cjs +197 -0
- package/dist/constants-CqyyBkXW.cjs.map +1 -0
- package/dist/constants-_HhqKvBg.js +174 -0
- package/dist/constants-_HhqKvBg.js.map +1 -0
- package/dist/createFetchClient-BK0TZK-U.js +184 -0
- package/dist/createFetchClient-BK0TZK-U.js.map +1 -0
- package/dist/createFetchClient-BsG719K1.cjs +263 -0
- package/dist/createFetchClient-BsG719K1.cjs.map +1 -0
- package/dist/createGenericFetchClient-CVZYekDk.js +7 -0
- package/dist/createGenericFetchClient-CVZYekDk.js.map +1 -0
- package/dist/createGenericFetchClient-DLbjX0eM.cjs +12 -0
- package/dist/createGenericFetchClient-DLbjX0eM.cjs.map +1 -0
- package/dist/createOpenapiFetchClient-B5U1fCHS.js +7 -0
- package/dist/createOpenapiFetchClient-B5U1fCHS.js.map +1 -0
- package/dist/createOpenapiFetchClient-Cr90VXY4.cjs +12 -0
- package/dist/createOpenapiFetchClient-Cr90VXY4.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-0c6yFwtp.cjs +44 -0
- package/dist/credential-0c6yFwtp.cjs.map +1 -0
- package/dist/credential-kEGLnVez.js +33 -0
- package/dist/credential-kEGLnVez.js.map +1 -0
- package/dist/dataScience/index.cjs +5 -19
- package/dist/dataScience/index.d.cts +3 -207
- package/dist/dataScience/index.d.ts +3 -207
- package/dist/dataScience/index.js +3 -6
- package/dist/dataScience/types.cjs +0 -4
- package/dist/dataScience/types.d.cts +3 -2
- package/dist/dataScience/types.d.ts +3 -2
- package/dist/dataScience/types.js +1 -3
- package/dist/dataScience-C-JrA0Uk.cjs +114 -0
- package/dist/dataScience-C-JrA0Uk.cjs.map +1 -0
- package/dist/dataScience-CE0pSWbl.js +109 -0
- package/dist/dataScience-CE0pSWbl.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-BPPEAdJW.js +485 -0
- package/dist/developerPortalClient-BPPEAdJW.js.map +1 -0
- package/dist/developerPortalClient-C8oq48xW.cjs +508 -0
- package/dist/developerPortalClient-C8oq48xW.cjs.map +1 -0
- package/dist/domain/permissions/index.cjs +31 -122
- package/dist/domain/permissions/index.d.cts +19 -51
- package/dist/domain/permissions/index.d.ts +19 -51
- 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 -161
- package/dist/editor/index.d.ts +163 -161
- 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 -18
- package/dist/encryption/index.d.ts +2 -18
- 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 -68
- package/dist/encryption/types.d.ts +2 -68
- 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 -38
- package/dist/import/index.d.ts +41 -38
- package/dist/import/index.js +2 -5
- package/dist/import-Cf0W-7YD.js +116 -0
- package/dist/import-Cf0W-7YD.js.map +1 -0
- package/dist/import-KLH1uRtx.cjs +121 -0
- package/dist/import-KLH1uRtx.cjs.map +1 -0
- package/dist/index-8pN6Emos.d.ts +218 -0
- package/dist/index-BEKaJ7Cc.d.cts +1388 -0
- package/dist/index-BMqLPS6S.d.cts +135 -0
- package/dist/index-BMqLPS6S.d.ts +135 -0
- package/dist/index-BWBScAYc.d.cts +16 -0
- package/dist/index-BmjeNd9u.d.ts +1075 -0
- package/dist/index-BthgbVdd.d.ts +31 -0
- package/dist/index-CLPrlyIz.d.cts +218 -0
- package/dist/index-CXQRvZ-f.d.cts +31 -0
- package/dist/index-CeistZnj.d.ts +1388 -0
- package/dist/index-Cfrl7sd5.d.ts +65 -0
- package/dist/index-DIM8KZly.d.ts +16 -0
- package/dist/index-DNlX-H1V.d.ts +208 -0
- package/dist/index-DVsnxZap.d.cts +65 -0
- package/dist/index-DXi6wsr5.d.cts +77 -0
- package/dist/index-DYQt4zxC.d.ts +77 -0
- package/dist/index-DplMbm9E.d.cts +19882 -0
- package/dist/index-Dwp8tF6O.d.ts +19882 -0
- package/dist/index-IN0qzs52.d.cts +208 -0
- package/dist/index-KKJkrxjx.d.ts +26 -0
- package/dist/index-NC1dXRTD.d.cts +40 -0
- package/dist/index-NC1dXRTD.d.ts +40 -0
- package/dist/index-WQkVzx5e.d.cts +1075 -0
- package/dist/index-eEBVG5s3.d.cts +26 -0
- package/dist/index-vb9Rfqca.d.cts +115 -0
- package/dist/index-vb9Rfqca.d.ts +115 -0
- package/dist/index.cjs +1728 -1802
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -15301
- package/dist/index.d.ts +7 -15301
- package/dist/index.js +1678 -1675
- 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 -1083
- package/dist/management/index.d.ts +2 -1083
- 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-DqwQcDCx.js +1065 -0
- package/dist/management-DqwQcDCx.js.map +1 -0
- package/dist/management-WOmlBt6H.cjs +1076 -0
- package/dist/management-WOmlBt6H.cjs.map +1 -0
- package/dist/metastore/index.cjs +3 -14
- package/dist/metastore/index.d.cts +2 -33
- package/dist/metastore/index.d.ts +2 -33
- 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-CNEhL66f.js +134 -0
- package/dist/metastore-CNEhL66f.js.map +1 -0
- package/dist/metastore-CkQluyX1.cjs +139 -0
- package/dist/metastore-CkQluyX1.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 -56
- package/dist/notifications/index.d.ts +56 -56
- 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 -49
- package/dist/oauth/index.d.ts +49 -49
- 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-DTvrqe6P.cjs +88 -0
- package/dist/oauth-DTvrqe6P.cjs.map +1 -0
- package/dist/oauth-DYDObUX9.js +83 -0
- package/dist/oauth-DYDObUX9.js.map +1 -0
- package/dist/omnisearch/index.cjs +49 -0
- package/dist/omnisearch/index.cjs.map +1 -0
- package/dist/omnisearch/index.d.cts +30 -0
- package/dist/omnisearch/index.d.ts +30 -0
- package/dist/omnisearch/index.js +48 -0
- package/dist/omnisearch/index.js.map +1 -0
- package/dist/omnisearch/types.cjs +0 -0
- package/dist/omnisearch/types.d.cts +2 -0
- package/dist/omnisearch/types.d.ts +2 -0
- package/dist/omnisearch/types.js +1 -0
- package/dist/project-BvFi19K_.cjs +56 -0
- package/dist/project-BvFi19K_.cjs.map +1 -0
- package/dist/project-CcGxXIW_.d.cts +18 -0
- package/dist/project-DWwZv66D.js +39 -0
- package/dist/project-DWwZv66D.js.map +1 -0
- package/dist/project-io1pY-hW.d.ts +18 -0
- package/dist/queryService/index.cjs +3 -14
- package/dist/queryService/index.d.cts +2 -39
- package/dist/queryService/index.d.ts +2 -39
- 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-BHV_OZI2.js +114 -0
- package/dist/queryService-BHV_OZI2.js.map +1 -0
- package/dist/queryService-CvqDqigW.cjs +119 -0
- package/dist/queryService-CvqDqigW.cjs.map +1 -0
- package/dist/queue/index.cjs +3 -15
- package/dist/queue/index.d.cts +411 -334
- package/dist/queue/index.d.ts +411 -334
- 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-CUHKupTA.cjs +137 -0
- package/dist/queue-CUHKupTA.cjs.map +1 -0
- package/dist/queue-uofE4Eu6.js +126 -0
- package/dist/queue-uofE4Eu6.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 -73
- package/dist/scheduler/index.d.ts +73 -73
- 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 -3077
- package/dist/sdk/configurations/index.d.ts +3066 -3077
- 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 +93 -0
- package/dist/sdk/queryService/index.cjs.map +1 -0
- package/dist/sdk/queryService/index.d.cts +2 -0
- package/dist/sdk/queryService/index.d.ts +2 -0
- package/dist/sdk/queryService/index.js +92 -0
- package/dist/sdk/queryService/index.js.map +1 -0
- package/dist/sdk/semanticLayer/index.cjs +352 -50
- package/dist/sdk/semanticLayer/index.cjs.map +1 -1
- package/dist/sdk/semanticLayer/index.d.cts +105 -94
- package/dist/sdk/semanticLayer/index.d.ts +105 -94
- 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 -132
- package/dist/sdk/semanticLayer/types.d.ts +2 -132
- package/dist/sdk/semanticLayer/types.js +1 -3
- package/dist/sdk/storage/index.cjs +267 -47
- package/dist/sdk/storage/index.cjs.map +1 -1
- package/dist/sdk/storage/index.d.cts +2 -119
- package/dist/sdk/storage/index.d.ts +2 -119
- package/dist/sdk/storage/index.js +258 -3
- 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 -30
- package/dist/sdk/tag/types.d.ts +2 -30
- 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 -72
- package/dist/sdk/vault/index.d.ts +2 -72
- 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 +27 -54
- package/dist/storage/index.d.cts +3 -43
- package/dist/storage/index.d.ts +3 -43
- package/dist/storage/index.js +8 -9
- package/dist/storage/types.cjs +0 -4
- package/dist/storage/types.d.cts +5 -1654
- package/dist/storage/types.d.ts +5 -1654
- package/dist/storage/types.js +1 -3
- package/dist/storage-DbyNnkIJ.cjs +2458 -0
- package/dist/storage-DbyNnkIJ.cjs.map +1 -0
- package/dist/storage-luq7YBZF.js +2429 -0
- package/dist/storage-luq7YBZF.js.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 -345
- package/dist/stream/index.d.ts +345 -345
- 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 -18
- package/dist/syncActions/index.d.cts +2 -112
- package/dist/syncActions/index.d.ts +2 -112
- package/dist/syncActions/index.js +2 -9
- package/dist/syncActions/types.cjs +0 -4
- package/dist/syncActions/types.d.cts +2 -298
- package/dist/syncActions/types.d.ts +2 -298
- package/dist/syncActions/types.js +1 -3
- package/dist/syncActions-DKWeJ8GH.cjs +504 -0
- package/dist/syncActions-DKWeJ8GH.cjs.map +1 -0
- package/dist/syncActions-ssWWVN_4.js +497 -0
- package/dist/syncActions-ssWWVN_4.js.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-DHOVQ2TW.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-2IrE8HaZ.cjs +29 -0
- package/dist/telemetry-2IrE8HaZ.cjs.map +1 -0
- package/dist/telemetry-yQfQxBBI.js +24 -0
- package/dist/telemetry-yQfQxBBI.js.map +1 -0
- package/dist/types--T-vBqdd.d.cts +2835 -0
- package/dist/{types-CM1zHzgm.d.ts → types-2mHlPakp.d.cts} +893 -69
- package/dist/types-7H6Dnz0Y.d.ts +23 -0
- package/dist/types-B06L4-WE.d.cts +2124 -0
- package/dist/types-B1S2H7q1.d.ts +373 -0
- package/dist/types-B1glyy_Q.d.ts +726 -0
- package/dist/{utils-DK7uJcmR.d.cts → types-BCt0EMiO.d.ts} +16 -905
- package/dist/{types-BX1xr4CX.d.cts → types-BD6czYPH.d.ts} +43 -108
- package/dist/{types-BEnE7LHB.d.cts → types-BO-mTxKb.d.cts} +57 -81
- package/dist/{types-BieLFMW1.d.cts → types-BREBK0xX.d.ts} +9 -8
- package/dist/types-BRQAKEC1.d.cts +32 -0
- package/dist/types-BXK6Ebtm.d.ts +32 -0
- package/dist/types-BefwoXik.d.cts +373 -0
- package/dist/{types-DeoA45gz.d.cts → types-BhBvnvqe.d.ts} +632 -464
- package/dist/{types-Cgh3jqrV.d.cts → types-BmFyDKe6.d.ts} +893 -69
- package/dist/types-BpWqpMkL.d.ts +66 -0
- package/dist/types-C8XiTXxi.d.cts +23 -0
- package/dist/{types-BfuVN8Pk.d.cts → types-CAOvDtMC.d.cts} +11 -16
- package/dist/types-CC0wymfG.d.ts +2088 -0
- package/dist/{types-YzkNUuYo.d.ts → types-CI1mW2lA.d.ts} +11 -16
- package/dist/{types-00IaLn3S.d.ts → types-CRYtdj5w.d.ts} +876 -374
- package/dist/{types-CrLjE5xf.d.ts → types-CSmttcZ_.d.ts} +10 -12
- package/dist/{types-DgSyBwP3.d.cts → types-CbZ8aMKW.d.cts} +11 -14
- package/dist/{types-DwMezEHT.d.ts → types-CexuN7Mw.d.cts} +43 -108
- package/dist/types-CjAia48k.d.ts +386 -0
- package/dist/{types-D-MuJHwl.d.cts → types-CtdyAkzI.d.cts} +28 -16
- package/dist/{types-DpUcInCX.d.ts → types-CvADp-x-.d.ts} +11 -14
- package/dist/types-CwvOcTOm.d.cts +2088 -0
- package/dist/types-CyRK5z-E.d.cts +386 -0
- package/dist/{types-DbAO-Tgk.d.ts → types-D2n3h1gp.d.ts} +57 -81
- package/dist/types-DBOEA7l0.d.cts +148 -0
- package/dist/{types-DYnHIm7m.d.cts → types-DCBKso0t.d.cts} +10 -12
- package/dist/{types-Hj1CaKtV.d.ts → types-DEKF5pbg.d.cts} +632 -464
- package/dist/{types-B30y9Lhc.d.ts → types-DMvU4kZ2.d.cts} +208 -24
- package/dist/{types-B-vmDlWB.d.cts → types-DS8uFAeq.d.cts} +10 -15
- package/dist/types-DeApSCzx.d.cts +602 -0
- package/dist/types-DebL68-g.d.ts +148 -0
- package/dist/types-DgaYUtu_.d.cts +726 -0
- package/dist/{types-CiJ5ULtS.d.ts → types-DkbfBOBr.d.cts} +9 -8
- package/dist/types-DvsGS8By.d.cts +66 -0
- package/dist/{types-DHXZZKb3.d.ts → types-DwX1uxp_.d.ts} +10 -15
- package/dist/{types-sVyfECai.d.cts → types-ISUNM_BR.d.cts} +876 -374
- package/dist/{utils-B_SOM1XR.d.ts → types-QOIQ-dZU.d.cts} +16 -905
- package/dist/types-SGuvOEV8.d.ts +2124 -0
- package/dist/types-V8rC5if7.d.cts +621 -0
- package/dist/{types-CSZoV4lM.d.cts → types-Z-vUwgym.d.ts} +208 -24
- package/dist/types-bws2RtKq.d.ts +602 -0
- package/dist/types-h9TTimS_.d.ts +2835 -0
- package/dist/types-lFsTSkhe.d.cts +14 -0
- package/dist/types-lFsTSkhe.d.ts +14 -0
- package/dist/types-n4FFKqa4.d.ts +621 -0
- package/dist/{types-DeS-oVdn.d.ts → types-x4xPlrr0.d.ts} +28 -16
- package/dist/vault/index.cjs +49 -13
- package/dist/vault/index.cjs.map +1 -1
- package/dist/vault/index.d.cts +2 -26
- package/dist/vault/index.d.ts +2 -26
- 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 +113 -7
- package/surface/ai.md +1 -0
- package/surface/apps.md +32 -0
- package/surface/auth.md +6 -4
- package/surface/chat.md +3 -2
- package/surface/dataScience.md +3 -2
- package/surface/editor.md +1 -0
- package/surface/encryption.md +1 -0
- package/surface/import.md +1 -0
- package/surface/kaiAgent.md +2 -1
- package/surface/management.md +17 -16
- package/surface/metastore.md +2 -1
- package/surface/notifications.md +1 -0
- package/surface/oauth.md +1 -0
- package/surface/omnisearch.md +9 -0
- package/surface/queryService.md +5 -3
- package/surface/queue.md +8 -6
- package/surface/scheduler.md +1 -0
- package/surface/sdk.md +22 -22
- package/surface/storage.md +147 -106
- package/surface/stream.md +1 -0
- package/surface/syncActions.md +13 -6
- package/surface/vault.md +1 -0
- package/dist/ManagementClientAuthError-4J0S5tV-.d.ts +0 -9
- package/dist/ManagementClientAuthError-CyDpa4NS.d.cts +0 -9
- package/dist/adminRoles-Cil1lavB.d.cts +0 -18
- package/dist/adminRoles-Cil1lavB.d.ts +0 -18
- package/dist/ai/types.cjs.map +0 -1
- package/dist/ai/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/chunk-22E6IGXR.js +0 -6
- package/dist/chunk-22E6IGXR.js.map +0 -1
- package/dist/chunk-2BOG5U7C.js +0 -75
- package/dist/chunk-2BOG5U7C.js.map +0 -1
- package/dist/chunk-2CFM7K4U.cjs +0 -55
- package/dist/chunk-2CFM7K4U.cjs.map +0 -1
- package/dist/chunk-34GM6NXB.js +0 -77
- package/dist/chunk-34GM6NXB.js.map +0 -1
- package/dist/chunk-3BFPNM2J.js +0 -61
- package/dist/chunk-3BFPNM2J.js.map +0 -1
- package/dist/chunk-3PVERYSF.js +0 -16
- package/dist/chunk-3PVERYSF.js.map +0 -1
- package/dist/chunk-3YWQQ3OG.cjs +0 -79
- package/dist/chunk-3YWQQ3OG.cjs.map +0 -1
- package/dist/chunk-4RC5E3SL.js +0 -140
- package/dist/chunk-4RC5E3SL.js.map +0 -1
- package/dist/chunk-4VVF2PIX.js +0 -110
- package/dist/chunk-4VVF2PIX.js.map +0 -1
- package/dist/chunk-552FC4ZV.js +0 -14
- package/dist/chunk-552FC4ZV.js.map +0 -1
- package/dist/chunk-5XWVWFTC.js +0 -33
- package/dist/chunk-5XWVWFTC.js.map +0 -1
- package/dist/chunk-6YZQIMML.cjs +0 -163
- package/dist/chunk-6YZQIMML.cjs.map +0 -1
- package/dist/chunk-77LILJYX.js +0 -110
- package/dist/chunk-77LILJYX.js.map +0 -1
- package/dist/chunk-7J2R6XHB.js +0 -3
- package/dist/chunk-7J2R6XHB.js.map +0 -1
- package/dist/chunk-7R22VKV7.cjs +0 -62
- package/dist/chunk-7R22VKV7.cjs.map +0 -1
- package/dist/chunk-7RO6PKZ4.cjs +0 -16
- package/dist/chunk-7RO6PKZ4.cjs.map +0 -1
- package/dist/chunk-7YXL4FKN.cjs +0 -340
- package/dist/chunk-7YXL4FKN.cjs.map +0 -1
- package/dist/chunk-7Z4MU7ZB.js +0 -1294
- package/dist/chunk-7Z4MU7ZB.js.map +0 -1
- package/dist/chunk-AFJGNBVM.cjs +0 -63
- package/dist/chunk-AFJGNBVM.cjs.map +0 -1
- package/dist/chunk-AVH6F5LB.js +0 -1492
- package/dist/chunk-AVH6F5LB.js.map +0 -1
- package/dist/chunk-AXEANGGK.js +0 -226
- package/dist/chunk-AXEANGGK.js.map +0 -1
- package/dist/chunk-BCZPCMGL.cjs +0 -49
- package/dist/chunk-BCZPCMGL.cjs.map +0 -1
- package/dist/chunk-BR6WZE3O.cjs +0 -42
- package/dist/chunk-BR6WZE3O.cjs.map +0 -1
- package/dist/chunk-BZA3FGO6.js +0 -40
- package/dist/chunk-BZA3FGO6.js.map +0 -1
- package/dist/chunk-CV2JGHBN.js +0 -183
- package/dist/chunk-CV2JGHBN.js.map +0 -1
- package/dist/chunk-CWCUQACX.cjs +0 -18
- package/dist/chunk-CWCUQACX.cjs.map +0 -1
- package/dist/chunk-CWUQ6ZAO.cjs +0 -185
- package/dist/chunk-CWUQ6ZAO.cjs.map +0 -1
- package/dist/chunk-D4WOOKMI.js +0 -350
- package/dist/chunk-D4WOOKMI.js.map +0 -1
- package/dist/chunk-DHOVQ2TW.js +0 -177
- package/dist/chunk-DRNOCC6W.cjs +0 -295
- package/dist/chunk-DRNOCC6W.cjs.map +0 -1
- package/dist/chunk-EDX5D6UY.js +0 -14
- package/dist/chunk-EWMXK3EI.cjs +0 -8
- package/dist/chunk-EWMXK3EI.cjs.map +0 -1
- package/dist/chunk-EYIPM2XB.cjs +0 -82
- package/dist/chunk-EYIPM2XB.cjs.map +0 -1
- package/dist/chunk-F6ZAYTBX.cjs +0 -364
- package/dist/chunk-F6ZAYTBX.cjs.map +0 -1
- package/dist/chunk-FJBP3MRI.cjs +0 -63
- package/dist/chunk-FJBP3MRI.cjs.map +0 -1
- package/dist/chunk-FMS5PNM2.cjs +0 -37
- package/dist/chunk-FMS5PNM2.cjs.map +0 -1
- package/dist/chunk-FPB6OGTV.js +0 -26
- package/dist/chunk-FPB6OGTV.js.map +0 -1
- package/dist/chunk-FRLSKIUI.cjs +0 -180
- package/dist/chunk-FRLSKIUI.cjs.map +0 -1
- package/dist/chunk-G3N5KDEY.js +0 -10
- package/dist/chunk-G3N5KDEY.js.map +0 -1
- package/dist/chunk-G66EP527.js +0 -59
- package/dist/chunk-G66EP527.js.map +0 -1
- package/dist/chunk-GF4XZK5N.cjs +0 -43
- package/dist/chunk-GF4XZK5N.cjs.map +0 -1
- package/dist/chunk-HITKHHWN.cjs +0 -174
- package/dist/chunk-HITKHHWN.cjs.map +0 -1
- package/dist/chunk-HMCZUHR7.js +0 -53
- package/dist/chunk-HMCZUHR7.js.map +0 -1
- package/dist/chunk-HTVJR5WS.cjs +0 -305
- package/dist/chunk-HTVJR5WS.cjs.map +0 -1
- package/dist/chunk-HY7J3OD3.cjs +0 -1298
- package/dist/chunk-HY7J3OD3.cjs.map +0 -1
- package/dist/chunk-IAYPOSMM.cjs +0 -472
- package/dist/chunk-IDWGBCSB.cjs +0 -61
- package/dist/chunk-IDWGBCSB.cjs.map +0 -1
- package/dist/chunk-J3NLKXQ5.cjs +0 -79
- package/dist/chunk-J3NLKXQ5.cjs.map +0 -1
- package/dist/chunk-KEFXOJD7.js +0 -61
- package/dist/chunk-KEFXOJD7.js.map +0 -1
- package/dist/chunk-KUYVBCUM.cjs +0 -231
- package/dist/chunk-KUYVBCUM.cjs.map +0 -1
- package/dist/chunk-L262THNK.cjs +0 -253
- package/dist/chunk-L262THNK.cjs.map +0 -1
- package/dist/chunk-LD3JERYP.js +0 -77
- package/dist/chunk-LD3JERYP.js.map +0 -1
- package/dist/chunk-LIXSIM3H.cjs +0 -113
- package/dist/chunk-LIXSIM3H.cjs.map +0 -1
- package/dist/chunk-LNZP2O4P.js +0 -169
- package/dist/chunk-LNZP2O4P.js.map +0 -1
- package/dist/chunk-MMOAH3EH.cjs +0 -288
- package/dist/chunk-MMOAH3EH.cjs.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-NVQ6LGDO.cjs +0 -35
- package/dist/chunk-NVQ6LGDO.cjs.map +0 -1
- package/dist/chunk-NVRVPWNY.js +0 -148
- package/dist/chunk-NVRVPWNY.js.map +0 -1
- package/dist/chunk-OUSPQ55W.js +0 -263
- package/dist/chunk-OUSPQ55W.js.map +0 -1
- package/dist/chunk-PPQF7LTS.cjs +0 -63
- package/dist/chunk-PPQF7LTS.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-RRC5RKF7.cjs +0 -12
- package/dist/chunk-RRC5RKF7.cjs.map +0 -1
- package/dist/chunk-RVBGE2Z4.js +0 -468
- package/dist/chunk-RVBGE2Z4.js.map +0 -1
- package/dist/chunk-S4JK7DKM.js +0 -61
- package/dist/chunk-S4JK7DKM.js.map +0 -1
- package/dist/chunk-SJZ66FD5.js +0 -35
- package/dist/chunk-SJZ66FD5.js.map +0 -1
- package/dist/chunk-T242YFMT.cjs +0 -150
- package/dist/chunk-T242YFMT.cjs.map +0 -1
- package/dist/chunk-T526LPBK.js +0 -6
- package/dist/chunk-T526LPBK.js.map +0 -1
- package/dist/chunk-U5SE6W5M.cjs +0 -158
- package/dist/chunk-U5SE6W5M.cjs.map +0 -1
- package/dist/chunk-UABYNGBZ.js +0 -39
- package/dist/chunk-UABYNGBZ.js.map +0 -1
- package/dist/chunk-UP5SEEYZ.js +0 -218
- package/dist/chunk-UP5SEEYZ.js.map +0 -1
- package/dist/chunk-UQ5CACMW.js +0 -283
- package/dist/chunk-UQ5CACMW.js.map +0 -1
- package/dist/chunk-UUY6LQT6.cjs +0 -267
- package/dist/chunk-UUY6LQT6.cjs.map +0 -1
- package/dist/chunk-UWQUHP3T.cjs +0 -112
- package/dist/chunk-UWQUHP3T.cjs.map +0 -1
- package/dist/chunk-XHDYLUM4.js +0 -268
- package/dist/chunk-XHDYLUM4.js.map +0 -1
- package/dist/chunk-XIIER7QQ.js +0 -60
- package/dist/chunk-XIIER7QQ.js.map +0 -1
- package/dist/chunk-XKIENBIE.js +0 -338
- package/dist/chunk-XKIENBIE.js.map +0 -1
- package/dist/chunk-XPDEQND7.cjs +0 -4
- package/dist/chunk-XPDEQND7.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-Z3HZ4MP4.cjs +0 -1496
- package/dist/chunk-Z3HZ4MP4.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/createGenericFetchClient-JcbIIqwF.d.cts +0 -18
- package/dist/createGenericFetchClient-ZGG5wbAC.d.ts +0 -18
- package/dist/createOpenapiFetchClient-6RX67Hws.d.ts +0 -24
- package/dist/createOpenapiFetchClient-BFmiJ9C5.d.cts +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/project-CXqPYo4T.d.ts +0 -17
- package/dist/project-CZPvcxRW.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-Cd4jVt58.d.ts +0 -1519
- package/dist/storageClient-Dkcg7hKa.d.cts +0 -1519
- package/dist/storageSdk-15_Fbucc.d.cts +0 -746
- package/dist/storageSdk-L6NOdgSJ.d.ts +0 -746
- 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-BqC3U0k0.d.cts +0 -12
- package/dist/types-Dkipk6NN.d.ts +0 -12
- package/dist/types-UwuKN9Kx.d.cts +0 -60
- package/dist/types-UwuKN9Kx.d.ts +0 -60
- package/dist/types-gcShAmmi.d.cts +0 -90
- package/dist/types-gcShAmmi.d.ts +0 -90
- package/dist/vault/types.cjs.map +0 -1
- package/dist/vault/types.js.map +0 -1
package/dist/ai/index.d.ts
CHANGED
|
@@ -1,53 +1,55 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
import 'qs';
|
|
5
|
-
|
|
1
|
+
import { a as DescribeConfigurationVersionBody, f as SuggestComponentBody, i as DescribeConfigurationMergeBody, l as ExplainErrorBody, p as components, r as DescribeConfigurationBody, s as DocsQuestionBody, u as FeedbackBody } from "../types-CSmttcZ_.js";
|
|
2
|
+
import { n as ClientInitOptions } from "../types-7H6Dnz0Y.js";
|
|
3
|
+
//#region src/clients/ai/aiClient.d.ts
|
|
6
4
|
declare const createAiClient: ({ baseUrl, middlewares, auth }: ClientInitOptions) => {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
5
|
+
healthCheck: (signal?: AbortSignal) => Promise<{
|
|
6
|
+
status: 'ok';
|
|
7
|
+
}>;
|
|
8
|
+
describeConfigurationVersion: (body: DescribeConfigurationVersionBody) => Promise<{
|
|
9
|
+
description: string;
|
|
10
|
+
correlationId: string;
|
|
11
|
+
}>;
|
|
12
|
+
describeConfigurationMerge: (body: DescribeConfigurationMergeBody) => Promise<{
|
|
13
|
+
description: string;
|
|
14
|
+
correlationId: string;
|
|
15
|
+
}>;
|
|
16
|
+
explainError: (body: ExplainErrorBody) => Promise<{
|
|
17
|
+
answer: string;
|
|
18
|
+
correlationId: string;
|
|
19
|
+
}>;
|
|
20
|
+
describeConfiguration: (body: DescribeConfigurationBody) => Promise<{
|
|
21
|
+
description: string;
|
|
22
|
+
correlationId: string;
|
|
23
|
+
}>;
|
|
24
|
+
suggestComponent: (body: SuggestComponentBody) => Promise<{
|
|
25
|
+
components: components['schemas']['SuggestedComponent'][];
|
|
26
|
+
correlationId: string;
|
|
27
|
+
}>;
|
|
28
|
+
feedback: (body: FeedbackBody) => Promise<never>;
|
|
29
|
+
docsQuestion: (body: DocsQuestionBody) => Promise<{
|
|
30
|
+
response: string;
|
|
31
|
+
metadata: {
|
|
32
|
+
sources: string[];
|
|
33
|
+
};
|
|
34
|
+
}>;
|
|
35
|
+
getComponentDetail: (componentId: string) => Promise<{
|
|
36
|
+
componentId: string;
|
|
37
|
+
componentType: string;
|
|
38
|
+
componentName: string;
|
|
39
|
+
componentCategories: string[];
|
|
40
|
+
description: string;
|
|
41
|
+
longDescription: string;
|
|
42
|
+
documentationUrl: string | null;
|
|
43
|
+
documentation: string | null;
|
|
44
|
+
configurationSchema: Record<string, never> | null;
|
|
45
|
+
configurationRowSchema: Record<string, never> | null;
|
|
46
|
+
configurationDescription: string | null;
|
|
47
|
+
rootConfigurationExamples: Record<string, never>[] | null;
|
|
48
|
+
rowConfigurationExamples: Record<string, never>[] | null;
|
|
49
|
+
componentFlags: string[] | null;
|
|
50
|
+
synchronousActions?: string[] | null;
|
|
51
|
+
}>;
|
|
51
52
|
};
|
|
52
|
-
|
|
53
|
+
//#endregion
|
|
53
54
|
export { createAiClient };
|
|
55
|
+
//# sourceMappingURL=index.d.ts.map
|
package/dist/ai/index.js
CHANGED
|
@@ -1,5 +1,63 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { t as createOpenapiFetchClient } from "../createOpenapiFetchClient-B5U1fCHS.js";
|
|
2
|
+
import { t as createAuthHeaders } from "../auth-D2jfNlpX.js";
|
|
3
|
+
//#region src/clients/ai/aiClient.ts
|
|
4
|
+
const createAiClient = ({ baseUrl, middlewares, auth }) => {
|
|
5
|
+
const client = createOpenapiFetchClient({
|
|
6
|
+
baseUrl,
|
|
7
|
+
middlewares,
|
|
8
|
+
headers: createAuthHeaders(auth)
|
|
9
|
+
});
|
|
10
|
+
const describeConfigurationVersion = async (body) => {
|
|
11
|
+
const { data } = await client.post("/describe/configuration-version", { body });
|
|
12
|
+
return data;
|
|
13
|
+
};
|
|
14
|
+
const describeConfigurationMerge = async (body) => {
|
|
15
|
+
const { data } = await client.post("/describe/configuration-merge", { body });
|
|
16
|
+
return data;
|
|
17
|
+
};
|
|
18
|
+
const explainError = async (body) => {
|
|
19
|
+
const { data } = await client.post("/explain", { body });
|
|
20
|
+
return data;
|
|
21
|
+
};
|
|
22
|
+
const describeConfiguration = async (body) => {
|
|
23
|
+
const { data } = await client.post("/describe/configuration", { body });
|
|
24
|
+
return data;
|
|
25
|
+
};
|
|
26
|
+
const suggestComponent = async (body) => {
|
|
27
|
+
const { data } = await client.post("/suggest/component", { body });
|
|
28
|
+
return data;
|
|
29
|
+
};
|
|
30
|
+
const feedback = async (body) => {
|
|
31
|
+
const { data } = await client.post("/feedback", { body });
|
|
32
|
+
return data;
|
|
33
|
+
};
|
|
34
|
+
/** Answers a question using the Keboola documentation as a source. */
|
|
35
|
+
const docsQuestion = async (body) => {
|
|
36
|
+
const { data } = await client.post("/docs/question", { body });
|
|
37
|
+
return data;
|
|
38
|
+
};
|
|
39
|
+
/** Retrieves documentation details for a single component. */
|
|
40
|
+
const getComponentDetail = async (componentId) => {
|
|
41
|
+
const { data } = await client.get("/docs/components/{componentId}", { path: { componentId } });
|
|
42
|
+
return data;
|
|
43
|
+
};
|
|
44
|
+
const healthCheck = async (signal) => {
|
|
45
|
+
const { data } = await client.get("/health-check", {}, { signal });
|
|
46
|
+
return data;
|
|
47
|
+
};
|
|
48
|
+
return {
|
|
49
|
+
healthCheck,
|
|
50
|
+
describeConfigurationVersion,
|
|
51
|
+
describeConfigurationMerge,
|
|
52
|
+
explainError,
|
|
53
|
+
describeConfiguration,
|
|
54
|
+
suggestComponent,
|
|
55
|
+
feedback,
|
|
56
|
+
docsQuestion,
|
|
57
|
+
getComponentDetail
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
//#endregion
|
|
61
|
+
export { createAiClient };
|
|
62
|
+
|
|
5
63
|
//# sourceMappingURL=index.js.map
|
package/dist/ai/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/clients/ai/aiClient.ts"],"sourcesContent":["import { createOpenapiFetchClient } from '../../fetchClient';\nimport { createAuthHeaders } from '../auth';\nimport type { ClientInitOptions } from '../types';\n\nimport type { paths } from './__generated__/schema';\nimport type {\n DescribeConfigurationBody,\n DescribeConfigurationMergeBody,\n DescribeConfigurationVersionBody,\n DocsQuestionBody,\n ExplainErrorBody,\n FeedbackBody,\n SuggestComponentBody,\n} from './types';\n\nexport const createAiClient = ({ baseUrl, middlewares, auth }: ClientInitOptions) => {\n const client = createOpenapiFetchClient<paths>({\n baseUrl,\n middlewares,\n headers: createAuthHeaders(auth),\n });\n\n const describeConfigurationVersion = async (body: DescribeConfigurationVersionBody) => {\n const { data } = await client.post('/describe/configuration-version', { body });\n\n return data;\n };\n\n const describeConfigurationMerge = async (body: DescribeConfigurationMergeBody) => {\n const { data } = await client.post('/describe/configuration-merge', { body });\n\n return data;\n };\n\n const explainError = async (body: ExplainErrorBody) => {\n const { data } = await client.post('/explain', { body });\n\n return data;\n };\n\n const describeConfiguration = async (body: DescribeConfigurationBody) => {\n const { data } = await client.post('/describe/configuration', { body });\n\n return data;\n };\n\n const suggestComponent = async (body: SuggestComponentBody) => {\n const { data } = await client.post('/suggest/component', { body });\n\n return data;\n };\n\n const feedback = async (body: FeedbackBody) => {\n const { data } = await client.post('/feedback', { body });\n\n return data;\n };\n\n /** Answers a question using the Keboola documentation as a source. */\n const docsQuestion = async (body: DocsQuestionBody) => {\n const { data } = await client.post('/docs/question', { body });\n\n return data;\n };\n\n /** Retrieves documentation details for a single component. */\n const getComponentDetail = async (componentId: string) => {\n const { data } = await client.get('/docs/components/{componentId}', {\n path: { componentId },\n });\n\n return data;\n };\n\n const healthCheck = async (signal?: AbortSignal) => {\n const { data } = await client.get('/health-check', {}, { signal });\n\n return data;\n };\n\n return {\n healthCheck,\n describeConfigurationVersion,\n describeConfigurationMerge,\n explainError,\n describeConfiguration,\n suggestComponent,\n feedback,\n docsQuestion,\n getComponentDetail,\n };\n};\n"],"mappings":";;;AAeA,MAAa,kBAAkB,EAAE,SAAS,aAAa,WAA8B;CACnF,MAAM,SAAS,yBAAgC;EAC7C;EACA;EACA,SAAS,kBAAkB,IAAI;CACjC,CAAC;CAED,MAAM,+BAA+B,OAAO,SAA2C;EACrF,MAAM,EAAE,SAAS,MAAM,OAAO,KAAK,mCAAmC,EAAE,KAAK,CAAC;EAE9E,OAAO;CACT;CAEA,MAAM,6BAA6B,OAAO,SAAyC;EACjF,MAAM,EAAE,SAAS,MAAM,OAAO,KAAK,iCAAiC,EAAE,KAAK,CAAC;EAE5E,OAAO;CACT;CAEA,MAAM,eAAe,OAAO,SAA2B;EACrD,MAAM,EAAE,SAAS,MAAM,OAAO,KAAK,YAAY,EAAE,KAAK,CAAC;EAEvD,OAAO;CACT;CAEA,MAAM,wBAAwB,OAAO,SAAoC;EACvE,MAAM,EAAE,SAAS,MAAM,OAAO,KAAK,2BAA2B,EAAE,KAAK,CAAC;EAEtE,OAAO;CACT;CAEA,MAAM,mBAAmB,OAAO,SAA+B;EAC7D,MAAM,EAAE,SAAS,MAAM,OAAO,KAAK,sBAAsB,EAAE,KAAK,CAAC;EAEjE,OAAO;CACT;CAEA,MAAM,WAAW,OAAO,SAAuB;EAC7C,MAAM,EAAE,SAAS,MAAM,OAAO,KAAK,aAAa,EAAE,KAAK,CAAC;EAExD,OAAO;CACT;;CAGA,MAAM,eAAe,OAAO,SAA2B;EACrD,MAAM,EAAE,SAAS,MAAM,OAAO,KAAK,kBAAkB,EAAE,KAAK,CAAC;EAE7D,OAAO;CACT;;CAGA,MAAM,qBAAqB,OAAO,gBAAwB;EACxD,MAAM,EAAE,SAAS,MAAM,OAAO,IAAI,kCAAkC,EAClE,MAAM,EAAE,YAAY,EACtB,CAAC;EAED,OAAO;CACT;CAEA,MAAM,cAAc,OAAO,WAAyB;EAClD,MAAM,EAAE,SAAS,MAAM,OAAO,IAAI,iBAAiB,CAAC,GAAG,EAAE,OAAO,CAAC;EAEjE,OAAO;CACT;CAEA,OAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;AACF"}
|
package/dist/ai/types.cjs
CHANGED
package/dist/ai/types.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
export {
|
|
1
|
+
import { a as DescribeConfigurationVersionBody, c as ErrorExplanation, d as ObjectDescription, f as SuggestComponentBody, i as DescribeConfigurationMergeBody, l as ExplainErrorBody, n as ComponentSuggestion, o as DocsAnswer, r as DescribeConfigurationBody, s as DocsQuestionBody, t as ComponentDocsDetail, u as FeedbackBody } from "../types-DCBKso0t.cjs";
|
|
2
|
+
export { ComponentDocsDetail, ComponentSuggestion, DescribeConfigurationBody, DescribeConfigurationMergeBody, DescribeConfigurationVersionBody, DocsAnswer, DocsQuestionBody, ErrorExplanation, ExplainErrorBody, FeedbackBody, ObjectDescription, SuggestComponentBody };
|
package/dist/ai/types.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
export {
|
|
1
|
+
import { a as DescribeConfigurationVersionBody, c as ErrorExplanation, d as ObjectDescription, f as SuggestComponentBody, i as DescribeConfigurationMergeBody, l as ExplainErrorBody, n as ComponentSuggestion, o as DocsAnswer, r as DescribeConfigurationBody, s as DocsQuestionBody, t as ComponentDocsDetail, u as FeedbackBody } from "../types-CSmttcZ_.js";
|
|
2
|
+
export { ComponentDocsDetail, ComponentSuggestion, DescribeConfigurationBody, DescribeConfigurationMergeBody, DescribeConfigurationVersionBody, DocsAnswer, DocsQuestionBody, ErrorExplanation, ExplainErrorBody, FeedbackBody, ObjectDescription, SuggestComponentBody };
|
package/dist/ai/types.js
CHANGED
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
const require_rolldown_runtime = require("./rolldown-runtime-VH7oDXx4.cjs");
|
|
2
|
+
const require_isPlainObject = require("./isPlainObject-BB3iy87C.cjs");
|
|
3
|
+
const require_createFetchClient = require("./createFetchClient-BsG719K1.cjs");
|
|
4
|
+
let zod = require("zod");
|
|
5
|
+
zod = require_rolldown_runtime.__toESM(zod, 1);
|
|
6
|
+
let dayjs = require("dayjs");
|
|
7
|
+
dayjs = require_rolldown_runtime.__toESM(dayjs, 1);
|
|
8
|
+
let dayjs_plugin_utc_js = require("dayjs/plugin/utc.js");
|
|
9
|
+
dayjs_plugin_utc_js = require_rolldown_runtime.__toESM(dayjs_plugin_utc_js, 1);
|
|
10
|
+
//#region src/domain/appLogs.ts
|
|
11
|
+
/**
|
|
12
|
+
* Reading a data app's container output. Shared by the two clients wrapping sandboxes-service —
|
|
13
|
+
* `dataScience` (`/v1`) and `apps` (`/v2`) — which serve the same logs under different paths, so the
|
|
14
|
+
* tail contract (how a line is parsed, where the next poll resumes, and that an idle app is not an
|
|
15
|
+
* error) is defined once here rather than per surface.
|
|
16
|
+
*/
|
|
17
|
+
dayjs.default.extend(dayjs_plugin_utc_js.default);
|
|
18
|
+
const DEFAULT_LOGS_FILE_NAME = "logs.txt";
|
|
19
|
+
const ISO_TIMESTAMP_REGEX = /\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?Z/;
|
|
20
|
+
const LEADING_ISO_TIMESTAMP_REGEX = /^(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?Z)\s?/;
|
|
21
|
+
/** The error envelope sandboxes-service returns; the tail branches on its `code`. */
|
|
22
|
+
const TailError = zod.object({ context: zod.object({ code: zod.string() }) });
|
|
23
|
+
/**
|
|
24
|
+
* There is nothing to read right now, reported per scope: an app whose serving member is asleep
|
|
25
|
+
* answers `apps.appNotRunning`, a deployment that isn't running answers `apps.deploymentNotRunning` —
|
|
26
|
+
* the normal state of a staged or retired one, since a deployment only runs while it is production.
|
|
27
|
+
*/
|
|
28
|
+
const NOTHING_RUNNING_CODES = /* @__PURE__ */ new Set(["apps.appNotRunning", "apps.deploymentNotRunning"]);
|
|
29
|
+
const tryParseJsonl = (line) => {
|
|
30
|
+
if (!line.startsWith("{")) return null;
|
|
31
|
+
let parsed;
|
|
32
|
+
try {
|
|
33
|
+
parsed = JSON.parse(line);
|
|
34
|
+
} catch {
|
|
35
|
+
return null;
|
|
36
|
+
}
|
|
37
|
+
if (typeof parsed !== "object" || parsed === null) return null;
|
|
38
|
+
const { timestamp, message } = parsed;
|
|
39
|
+
if (typeof timestamp !== "string" || typeof message !== "string") return null;
|
|
40
|
+
return {
|
|
41
|
+
timestamp,
|
|
42
|
+
message
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
const parsePlainTextLine = (line) => {
|
|
46
|
+
const match = line.match(LEADING_ISO_TIMESTAMP_REGEX);
|
|
47
|
+
if (match) return {
|
|
48
|
+
timestamp: match[1],
|
|
49
|
+
message: line.slice(match[0].length)
|
|
50
|
+
};
|
|
51
|
+
return {
|
|
52
|
+
timestamp: null,
|
|
53
|
+
message: line
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
const parseLogLine = (line) => tryParseJsonl(line) ?? parsePlainTextLine(line);
|
|
57
|
+
const toLogEntryFromObject = (raw) => {
|
|
58
|
+
if (typeof raw.message !== "string") return null;
|
|
59
|
+
return {
|
|
60
|
+
timestamp: typeof raw.timestamp === "string" ? raw.timestamp : null,
|
|
61
|
+
message: raw.message
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
const parseLogLines = (raw) => {
|
|
65
|
+
if (raw === null || raw === void 0 || raw === "") return [];
|
|
66
|
+
if (Array.isArray(raw)) return raw.flatMap((item) => {
|
|
67
|
+
if (typeof item === "string") return item === "" ? [] : [parseLogLine(item)];
|
|
68
|
+
if (require_isPlainObject.isPlainObject(item)) {
|
|
69
|
+
const entry = toLogEntryFromObject(item);
|
|
70
|
+
return entry ? [entry] : [];
|
|
71
|
+
}
|
|
72
|
+
return [];
|
|
73
|
+
});
|
|
74
|
+
if (require_isPlainObject.isPlainObject(raw)) {
|
|
75
|
+
const entry = toLogEntryFromObject(raw);
|
|
76
|
+
return entry ? [entry] : [];
|
|
77
|
+
}
|
|
78
|
+
if (typeof raw !== "string") return [];
|
|
79
|
+
const lines = raw.split("\n");
|
|
80
|
+
const entries = [];
|
|
81
|
+
for (const line of lines) {
|
|
82
|
+
if (line === "") continue;
|
|
83
|
+
entries.push(parseLogLine(line));
|
|
84
|
+
}
|
|
85
|
+
return entries;
|
|
86
|
+
};
|
|
87
|
+
const lastLogTimestamp = (entries) => {
|
|
88
|
+
for (let i = entries.length - 1; i >= 0; i--) {
|
|
89
|
+
const entry = entries[i];
|
|
90
|
+
if (!entry) continue;
|
|
91
|
+
if (entry.timestamp) return entry.timestamp;
|
|
92
|
+
const match = entry.message.match(ISO_TIMESTAMP_REGEX);
|
|
93
|
+
if (match) return match[0];
|
|
94
|
+
}
|
|
95
|
+
return null;
|
|
96
|
+
};
|
|
97
|
+
const calculateNextLogTimestamp = (timestamp) => {
|
|
98
|
+
if (timestamp === null) return null;
|
|
99
|
+
return (0, dayjs.default)(timestamp).utc().add(1, "second").utc().format();
|
|
100
|
+
};
|
|
101
|
+
/**
|
|
102
|
+
* The tail plus the timestamp a follow-up poll resumes from. A {@link NOTHING_RUNNING_CODES} `400`
|
|
103
|
+
* reads as an empty tail rather than an error — an idle app between visits, or a deployment that is
|
|
104
|
+
* not the one currently serving, has no logs to stream and that is its normal condition.
|
|
105
|
+
*/
|
|
106
|
+
const readAppLogsTail = async (fetchTail) => {
|
|
107
|
+
try {
|
|
108
|
+
const { data } = await fetchTail();
|
|
109
|
+
const entries = parseLogLines(data);
|
|
110
|
+
return {
|
|
111
|
+
entries,
|
|
112
|
+
nextLogTimestamp: calculateNextLogTimestamp(lastLogTimestamp(entries))
|
|
113
|
+
};
|
|
114
|
+
} catch (error) {
|
|
115
|
+
if (require_createFetchClient.isApiError(error) && error.response.status === require_createFetchClient.HttpStatus.BAD_REQUEST) {
|
|
116
|
+
const code = TailError.safeParse(error.data).data?.context?.code;
|
|
117
|
+
if (code !== void 0 && NOTHING_RUNNING_CODES.has(code)) return {
|
|
118
|
+
entries: [],
|
|
119
|
+
nextLogTimestamp: null
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
throw error;
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
/** The whole log as a file download, named by the service's `Content-Disposition` where it sets one. */
|
|
126
|
+
const readAppLogsDownload = async (fetchLogs) => {
|
|
127
|
+
const { data, response } = await fetchLogs();
|
|
128
|
+
return {
|
|
129
|
+
logs: data,
|
|
130
|
+
fileName: require_createFetchClient.parseContentDispositionHeader(response.headers.get(require_createFetchClient.HttpHeader.CONTENT_DISPOSITION)).filename ?? DEFAULT_LOGS_FILE_NAME
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
//#endregion
|
|
134
|
+
Object.defineProperty(exports, "parseLogLines", {
|
|
135
|
+
enumerable: true,
|
|
136
|
+
get: function() {
|
|
137
|
+
return parseLogLines;
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
Object.defineProperty(exports, "readAppLogsDownload", {
|
|
141
|
+
enumerable: true,
|
|
142
|
+
get: function() {
|
|
143
|
+
return readAppLogsDownload;
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
Object.defineProperty(exports, "readAppLogsTail", {
|
|
147
|
+
enumerable: true,
|
|
148
|
+
get: function() {
|
|
149
|
+
return readAppLogsTail;
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
|
|
153
|
+
//# sourceMappingURL=appLogs-CNG3yby-.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"appLogs-CNG3yby-.cjs","names":["utc","z","record","isPlainObject","isApiError","HttpStatus","parseContentDispositionHeader","HttpHeader"],"sources":["../src/domain/appLogs.ts"],"sourcesContent":["import dayjs from 'dayjs';\nimport utc from 'dayjs/plugin/utc.js';\nimport * as z from 'zod';\n\nimport {\n type ApiResponse,\n HttpHeader,\n isApiError,\n parseContentDispositionHeader,\n} from '../fetchClient';\nimport { HttpStatus } from '../internal';\nimport { isPlainObject } from '../utils/isPlainObject';\n\n/**\n * Reading a data app's container output. Shared by the two clients wrapping sandboxes-service —\n * `dataScience` (`/v1`) and `apps` (`/v2`) — which serve the same logs under different paths, so the\n * tail contract (how a line is parsed, where the next poll resumes, and that an idle app is not an\n * error) is defined once here rather than per surface.\n */\n\ndayjs.extend(utc);\n\nexport type LogEntry = {\n timestamp: string | null;\n message: string;\n};\n\nconst DEFAULT_LOGS_FILE_NAME = 'logs.txt';\n\nconst ISO_TIMESTAMP_REGEX = /\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z/;\nconst LEADING_ISO_TIMESTAMP_REGEX = /^(\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z)\\s?/;\n\n/** The error envelope sandboxes-service returns; the tail branches on its `code`. */\nconst TailError = z.object({\n context: z.object({\n code: z.string(),\n }),\n});\n\n/**\n * There is nothing to read right now, reported per scope: an app whose serving member is asleep\n * answers `apps.appNotRunning`, a deployment that isn't running answers `apps.deploymentNotRunning` —\n * the normal state of a staged or retired one, since a deployment only runs while it is production.\n */\nconst NOTHING_RUNNING_CODES = new Set(['apps.appNotRunning', 'apps.deploymentNotRunning']);\n\nconst tryParseJsonl = (line: string): LogEntry | null => {\n if (!line.startsWith('{')) return null;\n\n let parsed: unknown;\n try {\n parsed = JSON.parse(line);\n } catch {\n return null;\n }\n\n if (typeof parsed !== 'object' || parsed === null) return null;\n\n const record = parsed as Record<string, unknown>;\n const { timestamp, message } = record;\n\n if (typeof timestamp !== 'string' || typeof message !== 'string') return null;\n\n return {\n timestamp,\n message,\n };\n};\n\nconst parsePlainTextLine = (line: string): LogEntry => {\n const match = line.match(LEADING_ISO_TIMESTAMP_REGEX);\n if (match) {\n return { timestamp: match[1]!, message: line.slice(match[0].length) };\n }\n return { timestamp: null, message: line };\n};\n\nexport const parseLogLine = (line: string): LogEntry =>\n tryParseJsonl(line) ?? parsePlainTextLine(line);\n\nconst toLogEntryFromObject = (raw: Record<string, unknown>): LogEntry | null => {\n if (typeof raw.message !== 'string') return null;\n return {\n timestamp: typeof raw.timestamp === 'string' ? raw.timestamp : null,\n message: raw.message,\n };\n};\n\nexport const parseLogLines = (raw: unknown): LogEntry[] => {\n if (raw === null || raw === undefined || raw === '') return [];\n\n if (Array.isArray(raw)) {\n return raw.flatMap((item) => {\n if (typeof item === 'string') return item === '' ? [] : [parseLogLine(item)];\n if (isPlainObject(item)) {\n const entry = toLogEntryFromObject(item);\n return entry ? [entry] : [];\n }\n return [];\n });\n }\n\n if (isPlainObject(raw)) {\n const entry = toLogEntryFromObject(raw);\n return entry ? [entry] : [];\n }\n\n if (typeof raw !== 'string') return [];\n\n const lines = raw.split('\\n');\n const entries: LogEntry[] = [];\n for (const line of lines) {\n if (line === '') continue;\n entries.push(parseLogLine(line));\n }\n return entries;\n};\n\nexport const lastLogTimestamp = (entries: LogEntry[]) => {\n for (let i = entries.length - 1; i >= 0; i--) {\n const entry = entries[i];\n if (!entry) continue;\n if (entry.timestamp) return entry.timestamp;\n\n // A plain-text line may carry a timestamp embedded mid-line (legacy format).\n const match = entry.message.match(ISO_TIMESTAMP_REGEX);\n if (match) return match[0];\n }\n return null;\n};\n\nconst calculateNextLogTimestamp = (timestamp: string | null) => {\n if (timestamp === null) return null;\n return dayjs(timestamp).utc().add(1, 'second').utc().format();\n};\n\n/**\n * The tail plus the timestamp a follow-up poll resumes from. A {@link NOTHING_RUNNING_CODES} `400`\n * reads as an empty tail rather than an error — an idle app between visits, or a deployment that is\n * not the one currently serving, has no logs to stream and that is its normal condition.\n */\nexport const readAppLogsTail = async (fetchTail: () => Promise<ApiResponse<string>>) => {\n try {\n const { data } = await fetchTail();\n const entries = parseLogLines(data);\n\n return {\n entries,\n nextLogTimestamp: calculateNextLogTimestamp(lastLogTimestamp(entries)),\n };\n } catch (error) {\n if (isApiError(error) && error.response.status === HttpStatus.BAD_REQUEST) {\n const code = TailError.safeParse(error.data).data?.context?.code;\n if (code !== undefined && NOTHING_RUNNING_CODES.has(code)) {\n return { entries: [], nextLogTimestamp: null };\n }\n }\n throw error;\n }\n};\n\n/** The whole log as a file download, named by the service's `Content-Disposition` where it sets one. */\nexport const readAppLogsDownload = async (fetchLogs: () => Promise<ApiResponse<string>>) => {\n const { data, response } = await fetchLogs();\n const contentDisposition = parseContentDispositionHeader(\n response.headers.get(HttpHeader.CONTENT_DISPOSITION),\n );\n\n return {\n logs: data,\n fileName: contentDisposition.filename ?? DEFAULT_LOGS_FILE_NAME,\n };\n};\n"],"mappings":"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"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import "./index-CLPrlyIz.cjs";
|
|
2
|
+
//#region src/domain/appLogs.d.ts
|
|
3
|
+
type LogEntry = {
|
|
4
|
+
timestamp: string | null;
|
|
5
|
+
message: string;
|
|
6
|
+
};
|
|
7
|
+
declare const parseLogLines: (raw: unknown) => LogEntry[];
|
|
8
|
+
//#endregion
|
|
9
|
+
export { parseLogLines as n, LogEntry as t };
|
|
10
|
+
//# sourceMappingURL=appLogs-Dl5BcCSD.d.cts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import "./index-8pN6Emos.js";
|
|
2
|
+
//#region src/domain/appLogs.d.ts
|
|
3
|
+
type LogEntry = {
|
|
4
|
+
timestamp: string | null;
|
|
5
|
+
message: string;
|
|
6
|
+
};
|
|
7
|
+
declare const parseLogLines: (raw: unknown) => LogEntry[];
|
|
8
|
+
//#endregion
|
|
9
|
+
export { parseLogLines as n, LogEntry as t };
|
|
10
|
+
//# sourceMappingURL=appLogs-VdgP08aX.d.ts.map
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { t as isPlainObject } from "./isPlainObject-LYW-03uB.js";
|
|
2
|
+
import { d as HttpStatus, l as parseContentDispositionHeader, o as HttpHeader, r as isApiError } from "./createFetchClient-BK0TZK-U.js";
|
|
3
|
+
import * as z$1 from "zod";
|
|
4
|
+
import dayjs from "dayjs";
|
|
5
|
+
import utc from "dayjs/plugin/utc.js";
|
|
6
|
+
//#region src/domain/appLogs.ts
|
|
7
|
+
/**
|
|
8
|
+
* Reading a data app's container output. Shared by the two clients wrapping sandboxes-service —
|
|
9
|
+
* `dataScience` (`/v1`) and `apps` (`/v2`) — which serve the same logs under different paths, so the
|
|
10
|
+
* tail contract (how a line is parsed, where the next poll resumes, and that an idle app is not an
|
|
11
|
+
* error) is defined once here rather than per surface.
|
|
12
|
+
*/
|
|
13
|
+
dayjs.extend(utc);
|
|
14
|
+
const DEFAULT_LOGS_FILE_NAME = "logs.txt";
|
|
15
|
+
const ISO_TIMESTAMP_REGEX = /\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?Z/;
|
|
16
|
+
const LEADING_ISO_TIMESTAMP_REGEX = /^(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?Z)\s?/;
|
|
17
|
+
/** The error envelope sandboxes-service returns; the tail branches on its `code`. */
|
|
18
|
+
const TailError = z$1.object({ context: z$1.object({ code: z$1.string() }) });
|
|
19
|
+
/**
|
|
20
|
+
* There is nothing to read right now, reported per scope: an app whose serving member is asleep
|
|
21
|
+
* answers `apps.appNotRunning`, a deployment that isn't running answers `apps.deploymentNotRunning` —
|
|
22
|
+
* the normal state of a staged or retired one, since a deployment only runs while it is production.
|
|
23
|
+
*/
|
|
24
|
+
const NOTHING_RUNNING_CODES = /* @__PURE__ */ new Set(["apps.appNotRunning", "apps.deploymentNotRunning"]);
|
|
25
|
+
const tryParseJsonl = (line) => {
|
|
26
|
+
if (!line.startsWith("{")) return null;
|
|
27
|
+
let parsed;
|
|
28
|
+
try {
|
|
29
|
+
parsed = JSON.parse(line);
|
|
30
|
+
} catch {
|
|
31
|
+
return null;
|
|
32
|
+
}
|
|
33
|
+
if (typeof parsed !== "object" || parsed === null) return null;
|
|
34
|
+
const { timestamp, message } = parsed;
|
|
35
|
+
if (typeof timestamp !== "string" || typeof message !== "string") return null;
|
|
36
|
+
return {
|
|
37
|
+
timestamp,
|
|
38
|
+
message
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
const parsePlainTextLine = (line) => {
|
|
42
|
+
const match = line.match(LEADING_ISO_TIMESTAMP_REGEX);
|
|
43
|
+
if (match) return {
|
|
44
|
+
timestamp: match[1],
|
|
45
|
+
message: line.slice(match[0].length)
|
|
46
|
+
};
|
|
47
|
+
return {
|
|
48
|
+
timestamp: null,
|
|
49
|
+
message: line
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
const parseLogLine = (line) => tryParseJsonl(line) ?? parsePlainTextLine(line);
|
|
53
|
+
const toLogEntryFromObject = (raw) => {
|
|
54
|
+
if (typeof raw.message !== "string") return null;
|
|
55
|
+
return {
|
|
56
|
+
timestamp: typeof raw.timestamp === "string" ? raw.timestamp : null,
|
|
57
|
+
message: raw.message
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
const parseLogLines = (raw) => {
|
|
61
|
+
if (raw === null || raw === void 0 || raw === "") return [];
|
|
62
|
+
if (Array.isArray(raw)) return raw.flatMap((item) => {
|
|
63
|
+
if (typeof item === "string") return item === "" ? [] : [parseLogLine(item)];
|
|
64
|
+
if (isPlainObject(item)) {
|
|
65
|
+
const entry = toLogEntryFromObject(item);
|
|
66
|
+
return entry ? [entry] : [];
|
|
67
|
+
}
|
|
68
|
+
return [];
|
|
69
|
+
});
|
|
70
|
+
if (isPlainObject(raw)) {
|
|
71
|
+
const entry = toLogEntryFromObject(raw);
|
|
72
|
+
return entry ? [entry] : [];
|
|
73
|
+
}
|
|
74
|
+
if (typeof raw !== "string") return [];
|
|
75
|
+
const lines = raw.split("\n");
|
|
76
|
+
const entries = [];
|
|
77
|
+
for (const line of lines) {
|
|
78
|
+
if (line === "") continue;
|
|
79
|
+
entries.push(parseLogLine(line));
|
|
80
|
+
}
|
|
81
|
+
return entries;
|
|
82
|
+
};
|
|
83
|
+
const lastLogTimestamp = (entries) => {
|
|
84
|
+
for (let i = entries.length - 1; i >= 0; i--) {
|
|
85
|
+
const entry = entries[i];
|
|
86
|
+
if (!entry) continue;
|
|
87
|
+
if (entry.timestamp) return entry.timestamp;
|
|
88
|
+
const match = entry.message.match(ISO_TIMESTAMP_REGEX);
|
|
89
|
+
if (match) return match[0];
|
|
90
|
+
}
|
|
91
|
+
return null;
|
|
92
|
+
};
|
|
93
|
+
const calculateNextLogTimestamp = (timestamp) => {
|
|
94
|
+
if (timestamp === null) return null;
|
|
95
|
+
return dayjs(timestamp).utc().add(1, "second").utc().format();
|
|
96
|
+
};
|
|
97
|
+
/**
|
|
98
|
+
* The tail plus the timestamp a follow-up poll resumes from. A {@link NOTHING_RUNNING_CODES} `400`
|
|
99
|
+
* reads as an empty tail rather than an error — an idle app between visits, or a deployment that is
|
|
100
|
+
* not the one currently serving, has no logs to stream and that is its normal condition.
|
|
101
|
+
*/
|
|
102
|
+
const readAppLogsTail = async (fetchTail) => {
|
|
103
|
+
try {
|
|
104
|
+
const { data } = await fetchTail();
|
|
105
|
+
const entries = parseLogLines(data);
|
|
106
|
+
return {
|
|
107
|
+
entries,
|
|
108
|
+
nextLogTimestamp: calculateNextLogTimestamp(lastLogTimestamp(entries))
|
|
109
|
+
};
|
|
110
|
+
} catch (error) {
|
|
111
|
+
if (isApiError(error) && error.response.status === HttpStatus.BAD_REQUEST) {
|
|
112
|
+
const code = TailError.safeParse(error.data).data?.context?.code;
|
|
113
|
+
if (code !== void 0 && NOTHING_RUNNING_CODES.has(code)) return {
|
|
114
|
+
entries: [],
|
|
115
|
+
nextLogTimestamp: null
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
throw error;
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
/** The whole log as a file download, named by the service's `Content-Disposition` where it sets one. */
|
|
122
|
+
const readAppLogsDownload = async (fetchLogs) => {
|
|
123
|
+
const { data, response } = await fetchLogs();
|
|
124
|
+
return {
|
|
125
|
+
logs: data,
|
|
126
|
+
fileName: parseContentDispositionHeader(response.headers.get(HttpHeader.CONTENT_DISPOSITION)).filename ?? DEFAULT_LOGS_FILE_NAME
|
|
127
|
+
};
|
|
128
|
+
};
|
|
129
|
+
//#endregion
|
|
130
|
+
export { readAppLogsDownload as n, readAppLogsTail as r, parseLogLines as t };
|
|
131
|
+
|
|
132
|
+
//# sourceMappingURL=appLogs-enL9XR9r.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"appLogs-enL9XR9r.js","names":["z","record"],"sources":["../src/domain/appLogs.ts"],"sourcesContent":["import dayjs from 'dayjs';\nimport utc from 'dayjs/plugin/utc.js';\nimport * as z from 'zod';\n\nimport {\n type ApiResponse,\n HttpHeader,\n isApiError,\n parseContentDispositionHeader,\n} from '../fetchClient';\nimport { HttpStatus } from '../internal';\nimport { isPlainObject } from '../utils/isPlainObject';\n\n/**\n * Reading a data app's container output. Shared by the two clients wrapping sandboxes-service —\n * `dataScience` (`/v1`) and `apps` (`/v2`) — which serve the same logs under different paths, so the\n * tail contract (how a line is parsed, where the next poll resumes, and that an idle app is not an\n * error) is defined once here rather than per surface.\n */\n\ndayjs.extend(utc);\n\nexport type LogEntry = {\n timestamp: string | null;\n message: string;\n};\n\nconst DEFAULT_LOGS_FILE_NAME = 'logs.txt';\n\nconst ISO_TIMESTAMP_REGEX = /\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z/;\nconst LEADING_ISO_TIMESTAMP_REGEX = /^(\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z)\\s?/;\n\n/** The error envelope sandboxes-service returns; the tail branches on its `code`. */\nconst TailError = z.object({\n context: z.object({\n code: z.string(),\n }),\n});\n\n/**\n * There is nothing to read right now, reported per scope: an app whose serving member is asleep\n * answers `apps.appNotRunning`, a deployment that isn't running answers `apps.deploymentNotRunning` —\n * the normal state of a staged or retired one, since a deployment only runs while it is production.\n */\nconst NOTHING_RUNNING_CODES = new Set(['apps.appNotRunning', 'apps.deploymentNotRunning']);\n\nconst tryParseJsonl = (line: string): LogEntry | null => {\n if (!line.startsWith('{')) return null;\n\n let parsed: unknown;\n try {\n parsed = JSON.parse(line);\n } catch {\n return null;\n }\n\n if (typeof parsed !== 'object' || parsed === null) return null;\n\n const record = parsed as Record<string, unknown>;\n const { timestamp, message } = record;\n\n if (typeof timestamp !== 'string' || typeof message !== 'string') return null;\n\n return {\n timestamp,\n message,\n };\n};\n\nconst parsePlainTextLine = (line: string): LogEntry => {\n const match = line.match(LEADING_ISO_TIMESTAMP_REGEX);\n if (match) {\n return { timestamp: match[1]!, message: line.slice(match[0].length) };\n }\n return { timestamp: null, message: line };\n};\n\nexport const parseLogLine = (line: string): LogEntry =>\n tryParseJsonl(line) ?? parsePlainTextLine(line);\n\nconst toLogEntryFromObject = (raw: Record<string, unknown>): LogEntry | null => {\n if (typeof raw.message !== 'string') return null;\n return {\n timestamp: typeof raw.timestamp === 'string' ? raw.timestamp : null,\n message: raw.message,\n };\n};\n\nexport const parseLogLines = (raw: unknown): LogEntry[] => {\n if (raw === null || raw === undefined || raw === '') return [];\n\n if (Array.isArray(raw)) {\n return raw.flatMap((item) => {\n if (typeof item === 'string') return item === '' ? [] : [parseLogLine(item)];\n if (isPlainObject(item)) {\n const entry = toLogEntryFromObject(item);\n return entry ? [entry] : [];\n }\n return [];\n });\n }\n\n if (isPlainObject(raw)) {\n const entry = toLogEntryFromObject(raw);\n return entry ? [entry] : [];\n }\n\n if (typeof raw !== 'string') return [];\n\n const lines = raw.split('\\n');\n const entries: LogEntry[] = [];\n for (const line of lines) {\n if (line === '') continue;\n entries.push(parseLogLine(line));\n }\n return entries;\n};\n\nexport const lastLogTimestamp = (entries: LogEntry[]) => {\n for (let i = entries.length - 1; i >= 0; i--) {\n const entry = entries[i];\n if (!entry) continue;\n if (entry.timestamp) return entry.timestamp;\n\n // A plain-text line may carry a timestamp embedded mid-line (legacy format).\n const match = entry.message.match(ISO_TIMESTAMP_REGEX);\n if (match) return match[0];\n }\n return null;\n};\n\nconst calculateNextLogTimestamp = (timestamp: string | null) => {\n if (timestamp === null) return null;\n return dayjs(timestamp).utc().add(1, 'second').utc().format();\n};\n\n/**\n * The tail plus the timestamp a follow-up poll resumes from. A {@link NOTHING_RUNNING_CODES} `400`\n * reads as an empty tail rather than an error — an idle app between visits, or a deployment that is\n * not the one currently serving, has no logs to stream and that is its normal condition.\n */\nexport const readAppLogsTail = async (fetchTail: () => Promise<ApiResponse<string>>) => {\n try {\n const { data } = await fetchTail();\n const entries = parseLogLines(data);\n\n return {\n entries,\n nextLogTimestamp: calculateNextLogTimestamp(lastLogTimestamp(entries)),\n };\n } catch (error) {\n if (isApiError(error) && error.response.status === HttpStatus.BAD_REQUEST) {\n const code = TailError.safeParse(error.data).data?.context?.code;\n if (code !== undefined && NOTHING_RUNNING_CODES.has(code)) {\n return { entries: [], nextLogTimestamp: null };\n }\n }\n throw error;\n }\n};\n\n/** The whole log as a file download, named by the service's `Content-Disposition` where it sets one. */\nexport const readAppLogsDownload = async (fetchLogs: () => Promise<ApiResponse<string>>) => {\n const { data, response } = await fetchLogs();\n const contentDisposition = parseContentDispositionHeader(\n response.headers.get(HttpHeader.CONTENT_DISPOSITION),\n );\n\n return {\n logs: data,\n fileName: contentDisposition.filename ?? DEFAULT_LOGS_FILE_NAME,\n };\n};\n"],"mappings":"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"}
|