@burdenoff/be-sdk 2026.1110.2 → 2026.1110.4
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/configs/eslint/index.js +1 -1
- package/configs/tsconfig/tsconfig.json +1 -1
- package/dist/EventQueueFactory-9NGZV9jl.js +1457 -0
- package/dist/EventQueueFactory-9NGZV9jl.js.map +1 -0
- package/dist/RedisStreamsConnection-CY8WySJy.js +283 -0
- package/dist/RedisStreamsConnection-CY8WySJy.js.map +1 -0
- package/dist/activity/index.d.ts +165 -0
- package/dist/activity/index.js +389 -0
- package/dist/activity/index.js.map +1 -0
- package/dist/ai-credits/index.d.ts +2 -3
- package/dist/ai-credits/index.js +3 -4
- package/dist/ai-credits/index.js.map +1 -1
- package/dist/ai-credits-xxfwGpHS.js +546 -0
- package/dist/ai-credits-xxfwGpHS.js.map +1 -0
- package/dist/{assistant-session-CJZhF4D6.d.ts → assistant-session-DA5ZKJOr.d.ts} +4 -5
- package/dist/auth/index.d.ts +2 -77
- package/dist/auth/index.js +3 -7
- package/dist/auth/index.js.map +1 -1
- package/dist/auth-C5ctwSLp.js +228 -0
- package/dist/auth-C5ctwSLp.js.map +1 -0
- package/dist/bootstrap/index.d.ts +74 -0
- package/dist/bootstrap/index.js +282 -0
- package/dist/bootstrap/index.js.map +1 -0
- package/dist/cache/index.d.ts +2 -3
- package/dist/cache/index.js +3 -7
- package/dist/cache/index.js.map +1 -1
- package/dist/cache-CU0uLwcS.js +1837 -0
- package/dist/cache-CU0uLwcS.js.map +1 -0
- package/dist/captcha/index.d.ts +2 -1
- package/dist/captcha/index.js +3 -3
- package/dist/captcha/index.js.map +1 -1
- package/dist/captcha-BT7yh1YS.js +77 -0
- package/dist/captcha-BT7yh1YS.js.map +1 -0
- package/dist/client/internal-client.d.ts +4 -7
- package/dist/client/internal-client.js +172 -4
- package/dist/client/internal-client.js.map +1 -1
- package/dist/client-BgAEvDC2.d.ts +86 -0
- package/dist/client-sAJTrb4i.js +565 -0
- package/dist/client-sAJTrb4i.js.map +1 -0
- package/dist/collector-endpoint-iyQYeI50.js +50 -0
- package/dist/collector-endpoint-iyQYeI50.js.map +1 -0
- package/dist/context/index.d.ts +35 -0
- package/dist/context/index.js +283 -0
- package/dist/context/index.js.map +1 -0
- package/dist/crypto/index.d.ts +2 -1
- package/dist/crypto/index.js +3 -3
- package/dist/crypto/index.js.map +1 -1
- package/dist/crypto-DO9fM0FO.js +145 -0
- package/dist/crypto-DO9fM0FO.js.map +1 -0
- package/dist/database/index.d.ts +104 -108
- package/dist/database/index.js +468 -6
- package/dist/database/index.js.map +1 -1
- package/dist/dataloader/index.d.ts +2 -1
- package/dist/dataloader/index.js +3 -3
- package/dist/dataloader/index.js.map +1 -1
- package/dist/dataloader-DwpT3YoS.js +294 -0
- package/dist/dataloader-DwpT3YoS.js.map +1 -0
- package/dist/deployed-environment-p_Tdl3sT.js +38 -0
- package/dist/deployed-environment-p_Tdl3sT.js.map +1 -0
- package/dist/dist-BGKdXVy3.js +1718 -0
- package/dist/dist-BGKdXVy3.js.map +1 -0
- package/dist/env-DdaoGjIt.js +74 -0
- package/dist/env-DdaoGjIt.js.map +1 -0
- package/dist/event-queue/index.d.ts +2 -7
- package/dist/event-queue/index.js +7 -9
- package/dist/event-queue/index.js.map +1 -1
- package/dist/event-queue-Cw-YJPY_.js +1384 -0
- package/dist/event-queue-Cw-YJPY_.js.map +1 -0
- package/dist/{explicit-activity-scope-CCoxVwAr.d.ts → explicit-activity-scope-D8VeGGpt.d.ts} +1 -2
- package/dist/explicit-activity-scope-DikJ7NAE.js +57 -0
- package/dist/explicit-activity-scope-DikJ7NAE.js.map +1 -0
- package/dist/export/index.d.ts +2 -2
- package/dist/export/index.js +3 -14
- package/dist/export/index.js.map +1 -1
- package/dist/export-DJXE3Osa.js +642 -0
- package/dist/export-DJXE3Osa.js.map +1 -0
- package/dist/feature-flags/index.d.ts +2 -10
- package/dist/feature-flags/index.js +3 -6
- package/dist/feature-flags/index.js.map +1 -1
- package/dist/feature-flags-CP1KRgwD.js +422 -0
- package/dist/feature-flags-CP1KRgwD.js.map +1 -0
- package/dist/files/index.d.ts +2 -3
- package/dist/files/index.js +3 -4
- package/dist/files/index.js.map +1 -1
- package/dist/files-h5U-D2AF.js +830 -0
- package/dist/files-h5U-D2AF.js.map +1 -0
- package/dist/gateway/index.d.ts +4 -6
- package/dist/gateway/index.js +7 -13
- package/dist/gateway/index.js.map +1 -1
- package/dist/gateway/security/index.d.ts +2 -2
- package/dist/gateway/security/index.js +3 -5
- package/dist/gateway/security/index.js.map +1 -1
- package/dist/gateway-ByVo-n37.js +50 -0
- package/dist/gateway-ByVo-n37.js.map +1 -0
- package/dist/graph/index.d.ts +3 -10
- package/dist/graph/index.js +4 -13
- package/dist/graph/index.js.map +1 -1
- package/dist/graph-CR7u4lpl.js +2152 -0
- package/dist/graph-CR7u4lpl.js.map +1 -0
- package/dist/graph-emitter-CdOXP7Tn.js +621 -0
- package/dist/graph-emitter-CdOXP7Tn.js.map +1 -0
- package/dist/graphql/index.d.ts +3 -2
- package/dist/graphql/index.js +4 -6
- package/dist/graphql/index.js.map +1 -1
- package/dist/graphql/services/index.d.ts +2 -24
- package/dist/graphql/services/index.js +3 -4
- package/dist/graphql/services/index.js.map +1 -1
- package/dist/graphql-CUDyhibV.d.ts +21 -0
- package/dist/graphql-DHAHHcww.js +161 -0
- package/dist/graphql-DHAHHcww.js.map +1 -0
- package/dist/i18n/index.d.ts +3 -3
- package/dist/i18n/index.js +3 -4
- package/dist/i18n/index.js.map +1 -1
- package/dist/i18n-BBMYFd0P.js +860 -0
- package/dist/i18n-BBMYFd0P.js.map +1 -0
- package/dist/import-optional-peer-B82VYxeX.js +18 -0
- package/dist/import-optional-peer-B82VYxeX.js.map +1 -0
- package/dist/index-3KOZ1zN9.d.ts +233 -0
- package/dist/index-ADmsX0BI.d.ts +646 -0
- package/dist/index-B2LCaK0R.d.ts +500 -0
- package/dist/index-BBqooJ52.d.ts +45 -0
- package/dist/index-BGzMYJsm.d.ts +209 -0
- package/dist/index-BMIMnp6T.d.ts +8 -0
- package/dist/index-BVOL7458.d.ts +10 -0
- package/dist/index-BcqQs-Uq.d.ts +69 -0
- package/dist/index-BeVtqGO-.d.ts +208 -0
- package/dist/index-BiTzGUZP.d.ts +114 -0
- package/dist/index-C0qLquY0.d.ts +150 -0
- package/dist/index-C5uEKchX.d.ts +60 -0
- package/dist/index-CDOqxSIi.d.ts +37 -0
- package/dist/index-CG6wj66Y.d.ts +148 -0
- package/dist/index-CHwMhK6v.d.ts +63 -0
- package/dist/index-CIgoeobA.d.ts +145 -0
- package/dist/index-CPQDMSFS.d.ts +103 -0
- package/dist/index-CSRcgkVi.d.ts +23 -0
- package/dist/index-CTTwo9av.d.ts +102 -0
- package/dist/index-CVCyKzhB.d.ts +207 -0
- package/dist/index-C_GXXF32.d.ts +704 -0
- package/dist/index-CaM9JUcc.d.ts +144 -0
- package/dist/index-CliOgq6L.d.ts +203 -0
- package/dist/index-Cot73bdh.d.ts +63 -0
- package/dist/index-DGgh9DWn.d.ts +59 -0
- package/dist/index-DY3dNhMN.d.ts +420 -0
- package/dist/index-DqbGqfAy.d.ts +127 -0
- package/dist/index-Dt1HJPTX.d.ts +12 -0
- package/dist/index-DtI6aBtB.d.ts +22 -0
- package/dist/index-FKohsiex.d.ts +38 -0
- package/dist/index-FRRaa6h2.d.ts +999 -0
- package/dist/index-FbXPfen7.d.ts +132 -0
- package/dist/index-MArCb8Aq.d.ts +306 -0
- package/dist/index-U_tu3zUl.d.ts +303 -0
- package/dist/index-YOShAwkq.d.ts +45 -0
- package/dist/index-cmR9k9ga.d.ts +26 -0
- package/dist/index-yBSjMY32.d.ts +24 -0
- package/dist/index-zd_NPGJo.d.ts +206 -0
- package/dist/index.d.ts +106 -609
- package/dist/index.js +769 -2590
- package/dist/index.js.map +1 -1
- package/dist/init/index.d.ts +2 -2
- package/dist/init/index.js +3 -16
- package/dist/init/index.js.map +1 -1
- package/dist/init-CQPFmOOe.js +325 -0
- package/dist/init-CQPFmOOe.js.map +1 -0
- package/dist/instrumentation/index.d.ts +3 -4
- package/dist/instrumentation/index.js +5 -5
- package/dist/instrumentation/index.js.map +1 -1
- package/dist/instrumentation-xkkmDgJ0.js +1678 -0
- package/dist/instrumentation-xkkmDgJ0.js.map +1 -0
- package/dist/lake/index.d.ts +50 -54
- package/dist/lake/index.js +169 -193
- package/dist/lake/index.js.map +1 -1
- package/dist/layer/index.d.ts +3 -2
- package/dist/layer/index.js +4 -5
- package/dist/layer/index.js.map +1 -1
- package/dist/layer-BZBZZWeV.d.ts +69 -0
- package/dist/layer-Bcix-WCl.js +105 -0
- package/dist/layer-Bcix-WCl.js.map +1 -0
- package/dist/layer-CEKy6cm8.js +252 -0
- package/dist/layer-CEKy6cm8.js.map +1 -0
- package/dist/lifecycle/index.d.ts +2 -1
- package/dist/lifecycle/index.js +3 -4
- package/dist/lifecycle/index.js.map +1 -1
- package/dist/lifecycle-DeoLSX0U.js +76 -0
- package/dist/lifecycle-DeoLSX0U.js.map +1 -0
- package/dist/logger/index.d.ts +2 -3
- package/dist/logger/index.js +3 -3
- package/dist/logger/index.js.map +1 -1
- package/dist/logger-B6rCpb7D.js +290 -0
- package/dist/logger-B6rCpb7D.js.map +1 -0
- package/dist/metrics/index.d.ts +13 -14
- package/dist/metrics/index.js +3 -4
- package/dist/metrics/index.js.map +1 -1
- package/dist/metrics-BrLwNUrb.js +52 -0
- package/dist/metrics-BrLwNUrb.js.map +1 -0
- package/dist/metrics-collector-C2eShrlW.js +922 -0
- package/dist/metrics-collector-C2eShrlW.js.map +1 -0
- package/dist/middleware/index.d.ts +3 -3
- package/dist/middleware/index.js +3 -4
- package/dist/middleware/index.js.map +1 -1
- package/dist/middleware-CUxJVUpD.js +1243 -0
- package/dist/middleware-CUxJVUpD.js.map +1 -0
- package/dist/middleware-Cq0zFMGp.js +253 -0
- package/dist/middleware-Cq0zFMGp.js.map +1 -0
- package/dist/notifications/index.d.ts +2 -5
- package/dist/notifications/index.js +3 -6
- package/dist/notifications/index.js.map +1 -1
- package/dist/notifications-DY_i37WN.js +869 -0
- package/dist/notifications-DY_i37WN.js.map +1 -0
- package/dist/observability/index.d.ts +2 -3
- package/dist/observability/index.js +3 -4
- package/dist/observability/index.js.map +1 -1
- package/dist/observability-DBDXipTU.js +272 -0
- package/dist/observability-DBDXipTU.js.map +1 -0
- package/dist/payments/index.d.ts +144 -0
- package/dist/payments/index.js +404 -0
- package/dist/payments/index.js.map +1 -0
- package/dist/platform/index.d.ts +2 -1
- package/dist/platform/index.js +3 -5
- package/dist/platform/index.js.map +1 -1
- package/dist/platform-DZwczW7v.js +1510 -0
- package/dist/platform-DZwczW7v.js.map +1 -0
- package/dist/prisma/generator/index.d.ts +1 -1
- package/dist/prisma/generator/index.js +97 -84
- package/dist/prisma/generator/index.js.map +1 -1
- package/dist/prisma/index.d.ts +4 -7
- package/dist/prisma/index.js +5 -12
- package/dist/prisma/index.js.map +1 -1
- package/dist/prisma-BzOOdt79.js +863 -0
- package/dist/prisma-BzOOdt79.js.map +1 -0
- package/dist/prisma-extension-Cfl09swM.d.ts +172 -0
- package/dist/product-alias/index.d.ts +2 -1
- package/dist/product-alias/index.js +3 -3
- package/dist/product-alias/index.js.map +1 -1
- package/dist/product-alias-BPqtskMq.js +273 -0
- package/dist/product-alias-BPqtskMq.js.map +1 -0
- package/dist/rate-limit-CBrK_U5H.js +142 -0
- package/dist/rate-limit-CBrK_U5H.js.map +1 -0
- package/dist/rbac/index.d.ts +2 -122
- package/dist/rbac/index.js +3 -6
- package/dist/rbac/index.js.map +1 -1
- package/dist/rbac-Dvz0YzEt.js +1486 -0
- package/dist/rbac-Dvz0YzEt.js.map +1 -0
- package/dist/resource-caps/index.d.ts +66 -72
- package/dist/resource-caps/index.js +430 -5
- package/dist/resource-caps/index.js.map +1 -1
- package/dist/rolldown-runtime-ad2WFvuA.js +17 -0
- package/dist/sdk-Dju9o-sq.js +124 -0
- package/dist/sdk-Dju9o-sq.js.map +1 -0
- package/dist/search/index.d.ts +112 -0
- package/dist/search/index.js +266 -0
- package/dist/search/index.js.map +1 -0
- package/dist/security/index.d.ts +2 -0
- package/dist/security/index.js +4 -0
- package/dist/security/index.js.map +1 -0
- package/dist/security/rate-limit/index.d.ts +2 -0
- package/dist/security/rate-limit/index.js +4 -0
- package/dist/security/rate-limit/index.js.map +1 -0
- package/dist/security-DIG-95Ic.js +1647 -0
- package/dist/security-DIG-95Ic.js.map +1 -0
- package/dist/server/index.d.ts +7 -164
- package/dist/server/index.js +2001 -1507
- package/dist/server/index.js.map +1 -1
- package/dist/service-jwt-Bu-WNA_-.js +80 -0
- package/dist/service-jwt-Bu-WNA_-.js.map +1 -0
- package/dist/services-BWzfz7vG.js +102 -0
- package/dist/services-BWzfz7vG.js.map +1 -0
- package/dist/sharding/index.d.ts +41 -44
- package/dist/sharding/index.js +156 -137
- package/dist/sharding/index.js.map +1 -1
- package/dist/sharing/index.d.ts +2 -1
- package/dist/sharing/index.js +3 -4
- package/dist/sharing/index.js.map +1 -1
- package/dist/sharing-CflDsSJ-.js +911 -0
- package/dist/sharing-CflDsSJ-.js.map +1 -0
- package/dist/stub-BUnfMiAS.js +577 -0
- package/dist/stub-BUnfMiAS.js.map +1 -0
- package/dist/tags/index.d.ts +2 -3
- package/dist/tags/index.js +3 -4
- package/dist/tags/index.js.map +1 -1
- package/dist/tags-CbijgoqR.js +868 -0
- package/dist/{chunk-PBZFAAOM.js.map → tags-CbijgoqR.js.map} +1 -1
- package/dist/telemetry/index.d.ts +64 -76
- package/dist/telemetry/index.js +369 -201
- package/dist/telemetry/index.js.map +1 -1
- package/dist/temporal/index.d.ts +2 -148
- package/dist/temporal/index.js +3 -5
- package/dist/temporal/index.js.map +1 -1
- package/dist/temporal-B534uYK8.js +706 -0
- package/dist/temporal-B534uYK8.js.map +1 -0
- package/dist/tracker/index.d.ts +5 -11
- package/dist/tracker/index.js +7 -20
- package/dist/tracker/index.js.map +1 -1
- package/dist/tracker-PQztSlhJ.js +458 -0
- package/dist/tracker-PQztSlhJ.js.map +1 -0
- package/dist/translation/index.d.ts +120 -0
- package/dist/translation/index.js +573 -0
- package/dist/translation/index.js.map +1 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/index.js +90 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types-BYMYND1L.js +44 -0
- package/dist/types-BYMYND1L.js.map +1 -0
- package/dist/types-C6EKaS3V.d.ts +106 -0
- package/dist/types-CWybW61E.d.ts +323 -0
- package/dist/types-C_yfu3XK.d.ts +34 -0
- package/dist/types-DgaQqvxo.d.ts +70 -0
- package/dist/usage/index.d.ts +2 -213
- package/dist/usage/index.js +3 -15
- package/dist/usage/index.js.map +1 -1
- package/dist/usage-BRqVP3CJ.js +682 -0
- package/dist/usage-BRqVP3CJ.js.map +1 -0
- package/dist/utils/index.d.ts +2 -1
- package/dist/utils/index.js +3 -3
- package/dist/utils/index.js.map +1 -1
- package/dist/utils-DL85Tnbn.js +500 -0
- package/dist/utils-DL85Tnbn.js.map +1 -0
- package/dist/validation/index.d.ts +2 -2
- package/dist/validation/index.js +3 -3
- package/dist/validation/index.js.map +1 -1
- package/dist/validation-CPUITdMk.js +762 -0
- package/dist/validation-CPUITdMk.js.map +1 -0
- package/dist/workspace-extension-COrC0dYi.js +979 -0
- package/dist/workspace-extension-COrC0dYi.js.map +1 -0
- package/dist/{workspace-extension-BGwTOV_r.d.ts → workspace-extension-DTFTdGVF.d.ts} +43 -45
- package/package.json +7 -10
- package/dist/EventQueueFactory-GXC3A7DH.js +0 -8
- package/dist/EventQueueFactory-GXC3A7DH.js.map +0 -1
- package/dist/chunk-4XIBXZ6J.js +0 -276
- package/dist/chunk-4XIBXZ6J.js.map +0 -1
- package/dist/chunk-554Z4C2K.js +0 -1006
- package/dist/chunk-554Z4C2K.js.map +0 -1
- package/dist/chunk-5CAFHK2Z.js +0 -107
- package/dist/chunk-5CAFHK2Z.js.map +0 -1
- package/dist/chunk-63ZXJ42X.js +0 -451
- package/dist/chunk-63ZXJ42X.js.map +0 -1
- package/dist/chunk-6XEXJATV.js +0 -304
- package/dist/chunk-6XEXJATV.js.map +0 -1
- package/dist/chunk-726AR6Q7.js +0 -1532
- package/dist/chunk-726AR6Q7.js.map +0 -1
- package/dist/chunk-A5F6Z5UE.js +0 -21
- package/dist/chunk-A5F6Z5UE.js.map +0 -1
- package/dist/chunk-A6DE32ZS.js +0 -1507
- package/dist/chunk-A6DE32ZS.js.map +0 -1
- package/dist/chunk-AXJDGQPE.js +0 -690
- package/dist/chunk-AXJDGQPE.js.map +0 -1
- package/dist/chunk-BJQOGOVW.js +0 -602
- package/dist/chunk-BJQOGOVW.js.map +0 -1
- package/dist/chunk-CFXWH2IS.js +0 -52
- package/dist/chunk-CFXWH2IS.js.map +0 -1
- package/dist/chunk-DRWH5XCJ.js +0 -876
- package/dist/chunk-DRWH5XCJ.js.map +0 -1
- package/dist/chunk-E4QNLVY4.js +0 -909
- package/dist/chunk-E4QNLVY4.js.map +0 -1
- package/dist/chunk-EBDHIL7V.js +0 -774
- package/dist/chunk-EBDHIL7V.js.map +0 -1
- package/dist/chunk-ELU7VL3E.js +0 -245
- package/dist/chunk-ELU7VL3E.js.map +0 -1
- package/dist/chunk-FZRODKIN.js +0 -31
- package/dist/chunk-FZRODKIN.js.map +0 -1
- package/dist/chunk-GCIB76AJ.js +0 -882
- package/dist/chunk-GCIB76AJ.js.map +0 -1
- package/dist/chunk-HC6MPUIH.js +0 -1571
- package/dist/chunk-HC6MPUIH.js.map +0 -1
- package/dist/chunk-HNMHPSAM.js +0 -272
- package/dist/chunk-HNMHPSAM.js.map +0 -1
- package/dist/chunk-HTLEGD3Q.js +0 -1480
- package/dist/chunk-HTLEGD3Q.js.map +0 -1
- package/dist/chunk-I3KOWRT3.js +0 -89
- package/dist/chunk-I3KOWRT3.js.map +0 -1
- package/dist/chunk-ID3WR4JS.js +0 -509
- package/dist/chunk-ID3WR4JS.js.map +0 -1
- package/dist/chunk-JS52ZHTK.js +0 -1346
- package/dist/chunk-JS52ZHTK.js.map +0 -1
- package/dist/chunk-JVMAQOA3.js +0 -521
- package/dist/chunk-JVMAQOA3.js.map +0 -1
- package/dist/chunk-KH4TRQCO.js +0 -1063
- package/dist/chunk-KH4TRQCO.js.map +0 -1
- package/dist/chunk-KJOSPVB2.js +0 -57
- package/dist/chunk-KJOSPVB2.js.map +0 -1
- package/dist/chunk-KO2ZXZ7W.js +0 -61
- package/dist/chunk-KO2ZXZ7W.js.map +0 -1
- package/dist/chunk-KS2HQCJR.js +0 -56
- package/dist/chunk-KS2HQCJR.js.map +0 -1
- package/dist/chunk-LA5KPWZ2.js +0 -413
- package/dist/chunk-LA5KPWZ2.js.map +0 -1
- package/dist/chunk-MESLAC5W.js +0 -574
- package/dist/chunk-MESLAC5W.js.map +0 -1
- package/dist/chunk-MWPYA2HD.js +0 -94
- package/dist/chunk-MWPYA2HD.js.map +0 -1
- package/dist/chunk-NUB5GQTU.js +0 -270
- package/dist/chunk-NUB5GQTU.js.map +0 -1
- package/dist/chunk-OBBCR6WY.js +0 -277
- package/dist/chunk-OBBCR6WY.js.map +0 -1
- package/dist/chunk-OQDSAOG3.js +0 -1908
- package/dist/chunk-OQDSAOG3.js.map +0 -1
- package/dist/chunk-OXNCBE7P.js +0 -971
- package/dist/chunk-OXNCBE7P.js.map +0 -1
- package/dist/chunk-PBZFAAOM.js +0 -941
- package/dist/chunk-PN6GIF3R.js +0 -1185
- package/dist/chunk-PN6GIF3R.js.map +0 -1
- package/dist/chunk-PYD44IHJ.js +0 -728
- package/dist/chunk-PYD44IHJ.js.map +0 -1
- package/dist/chunk-QVPIACWD.js +0 -679
- package/dist/chunk-QVPIACWD.js.map +0 -1
- package/dist/chunk-QWNNFE4P.js +0 -41
- package/dist/chunk-QWNNFE4P.js.map +0 -1
- package/dist/chunk-RU266375.js +0 -327
- package/dist/chunk-RU266375.js.map +0 -1
- package/dist/chunk-RYTSVGGA.js +0 -1624
- package/dist/chunk-RYTSVGGA.js.map +0 -1
- package/dist/chunk-RZOFS2BQ.js +0 -225
- package/dist/chunk-RZOFS2BQ.js.map +0 -1
- package/dist/chunk-SBS4S2PJ.js +0 -100
- package/dist/chunk-SBS4S2PJ.js.map +0 -1
- package/dist/chunk-SPRG6G6G.js +0 -530
- package/dist/chunk-SPRG6G6G.js.map +0 -1
- package/dist/chunk-STWFX5E2.js +0 -233
- package/dist/chunk-STWFX5E2.js.map +0 -1
- package/dist/chunk-UNASM5VJ.js +0 -419
- package/dist/chunk-UNASM5VJ.js.map +0 -1
- package/dist/chunk-VAT66FJA.js +0 -245
- package/dist/chunk-VAT66FJA.js.map +0 -1
- package/dist/chunk-VFCMR5GX.js +0 -49
- package/dist/chunk-VFCMR5GX.js.map +0 -1
- package/dist/chunk-VGAHZKNJ.js +0 -66
- package/dist/chunk-VGAHZKNJ.js.map +0 -1
- package/dist/chunk-VTJTAAXC.js +0 -627
- package/dist/chunk-VTJTAAXC.js.map +0 -1
- package/dist/chunk-VXVLKRU6.js +0 -758
- package/dist/chunk-VXVLKRU6.js.map +0 -1
- package/dist/chunk-WWUU5ETI.js +0 -163
- package/dist/chunk-WWUU5ETI.js.map +0 -1
- package/dist/chunk-XE4OXN2W.js +0 -10
- package/dist/chunk-XE4OXN2W.js.map +0 -1
- package/dist/chunk-XOJORS75.js +0 -1853
- package/dist/chunk-XOJORS75.js.map +0 -1
- package/dist/chunk-YMZEUTD2.js +0 -110
- package/dist/chunk-YMZEUTD2.js.map +0 -1
- package/dist/chunk-Z77BTSOK.js +0 -617
- package/dist/chunk-Z77BTSOK.js.map +0 -1
- package/dist/chunk-ZZK3WEDI.js +0 -181
- package/dist/chunk-ZZK3WEDI.js.map +0 -1
- package/dist/client-CCXpAZ2r.d.ts +0 -89
- package/dist/client-DSI_760t.d.ts +0 -36
- package/dist/client-JU6T3UPB.js +0 -11
- package/dist/client-JU6T3UPB.js.map +0 -1
- package/dist/dist-2X4Q7PJA.js +0 -1491
- package/dist/dist-2X4Q7PJA.js.map +0 -1
- package/dist/env-4UWSUS64.js +0 -4
- package/dist/env-4UWSUS64.js.map +0 -1
- package/dist/graph-emitter-r5TylDBm.d.ts +0 -47
- package/dist/graphql-CMHMQjvd.d.ts +0 -23
- package/dist/i18n-Qm2AkPC-.d.ts +0 -33
- package/dist/index--yvpa6ay.d.ts +0 -83
- package/dist/index-4gKQKZ2B.d.ts +0 -71
- package/dist/index-5x0XMKXN.d.ts +0 -149
- package/dist/index-B70b5mYS.d.ts +0 -33
- package/dist/index-B8KrxO4j.d.ts +0 -755
- package/dist/index-BOuDKnqD.d.ts +0 -201
- package/dist/index-BTMt4OjA.d.ts +0 -201
- package/dist/index-BejbszA7.d.ts +0 -39
- package/dist/index-BkeOYZye.d.ts +0 -198
- package/dist/index-BuAj5nXg.d.ts +0 -83
- package/dist/index-BvkVcW8I.d.ts +0 -349
- package/dist/index-CWmH_-RZ.d.ts +0 -247
- package/dist/index-CbgWNcus.d.ts +0 -258
- package/dist/index-CmfPeQza.d.ts +0 -166
- package/dist/index-CmpG-zak.d.ts +0 -607
- package/dist/index-CoMKgL-p.d.ts +0 -12
- package/dist/index-D8HGwglK.d.ts +0 -541
- package/dist/index-DCaVm66D.d.ts +0 -1101
- package/dist/index-DE2w7E0d.d.ts +0 -83
- package/dist/index-DSOpj8DI.d.ts +0 -17
- package/dist/index-DW9q22GH.d.ts +0 -75
- package/dist/index-DnjJ9CwI.d.ts +0 -347
- package/dist/index-DwMJZ8PP.d.ts +0 -317
- package/dist/index-PaojfSdd.d.ts +0 -71
- package/dist/index-aHtYvc3i.d.ts +0 -284
- package/dist/index-e_18DzAg.d.ts +0 -18
- package/dist/index-ffmipXSA.d.ts +0 -55
- package/dist/index-joONjwLt.d.ts +0 -33
- package/dist/index-kssw5ziY.d.ts +0 -250
- package/dist/index-lFffh5-G.d.ts +0 -125
- package/dist/index-pxYge_6k.d.ts +0 -79
- package/dist/layer-Cv9vSwBx.d.ts +0 -70
- package/dist/pino-logger-H4HPW5P6.js +0 -5
- package/dist/pino-logger-H4HPW5P6.js.map +0 -1
- package/dist/prisma-extension-gYhYriA0.d.ts +0 -174
- package/dist/sdk-L75WWUP3.js +0 -156
- package/dist/sdk-L75WWUP3.js.map +0 -1
- package/dist/shutdown-registry-CW9LryO8.d.ts +0 -10
- package/dist/types-Bo2wkjSP.d.ts +0 -35
- package/dist/types-DVpvrAhd.d.ts +0 -71
- package/dist/types-DgJ4lDYA.d.ts +0 -108
- package/dist/types-USOv09qy.d.ts +0 -327
- package/dist/workspace-guard-NXVYYBVJ.js +0 -5
- package/dist/workspace-guard-NXVYYBVJ.js.map +0 -1
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-ad2WFvuA.js";
|
|
2
|
+
import crypto from "crypto";
|
|
3
|
+
|
|
4
|
+
// src/crypto/encryption.ts
|
|
5
|
+
/**
|
|
6
|
+
* AES-256-GCM Encryption utilities for sensitive data
|
|
7
|
+
*
|
|
8
|
+
* @module crypto/encryption
|
|
9
|
+
*/
|
|
10
|
+
const ALGORITHM = "aes-256-gcm";
|
|
11
|
+
const IV_LENGTH = 16;
|
|
12
|
+
const AUTH_TAG_LENGTH = 16;
|
|
13
|
+
/**
|
|
14
|
+
* Encrypt a string using AES-256-GCM
|
|
15
|
+
*
|
|
16
|
+
* @param text - The plaintext to encrypt
|
|
17
|
+
* @param key - 32-byte hex-encoded encryption key (64 hex characters)
|
|
18
|
+
* @returns Encrypted string in format: iv:authTag:ciphertext (all hex-encoded)
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```typescript
|
|
22
|
+
* import { encrypt, generateEncryptionKey } from '@burdenoff/be-sdk/crypto';
|
|
23
|
+
*
|
|
24
|
+
* const key = generateEncryptionKey();
|
|
25
|
+
* const encrypted = encrypt('my-secret-data', key);
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
function encrypt(text, key) {
|
|
29
|
+
if (!text) throw new Error("Text to encrypt cannot be empty");
|
|
30
|
+
if (!key || key.length !== 64) throw new Error("Encryption key must be a 64-character hex string (32 bytes)");
|
|
31
|
+
const iv = crypto.randomBytes(IV_LENGTH);
|
|
32
|
+
const cipher = crypto.createCipheriv(ALGORITHM, Buffer.from(key, "hex"), iv);
|
|
33
|
+
let encrypted = cipher.update(text, "utf8", "hex");
|
|
34
|
+
encrypted += cipher.final("hex");
|
|
35
|
+
const authTag = cipher.getAuthTag();
|
|
36
|
+
return `${iv.toString("hex")}:${authTag.toString("hex")}:${encrypted}`;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Decrypt a string encrypted with AES-256-GCM
|
|
40
|
+
*
|
|
41
|
+
* @param encryptedText - Encrypted string in format: iv:authTag:ciphertext
|
|
42
|
+
* @param key - 32-byte hex-encoded encryption key (64 hex characters)
|
|
43
|
+
* @returns Decrypted plaintext
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* ```typescript
|
|
47
|
+
* import { decrypt } from '@burdenoff/be-sdk/crypto';
|
|
48
|
+
*
|
|
49
|
+
* const decrypted = decrypt(encryptedData, key);
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
52
|
+
function decrypt(encryptedText, key) {
|
|
53
|
+
if (!encryptedText) throw new Error("Encrypted text cannot be empty");
|
|
54
|
+
if (!key || key.length !== 64) throw new Error("Encryption key must be a 64-character hex string (32 bytes)");
|
|
55
|
+
const parts = encryptedText.split(":");
|
|
56
|
+
if (parts.length !== 3) throw new Error("Invalid encrypted text format. Expected: iv:authTag:ciphertext");
|
|
57
|
+
const [ivHex, authTagHex, encrypted] = parts;
|
|
58
|
+
if (!ivHex || !authTagHex || !encrypted) throw new Error("Invalid encrypted text format. Missing components.");
|
|
59
|
+
const iv = Buffer.from(ivHex, "hex");
|
|
60
|
+
const authTag = Buffer.from(authTagHex, "hex");
|
|
61
|
+
if (iv.length !== IV_LENGTH) throw new Error(`Invalid IV length. Expected ${IV_LENGTH} bytes.`);
|
|
62
|
+
if (authTag.length !== AUTH_TAG_LENGTH) throw new Error(`Invalid auth tag length. Expected ${AUTH_TAG_LENGTH} bytes.`);
|
|
63
|
+
const decipher = crypto.createDecipheriv(ALGORITHM, Buffer.from(key, "hex"), iv);
|
|
64
|
+
decipher.setAuthTag(authTag);
|
|
65
|
+
let decrypted = decipher.update(encrypted, "hex", "utf8");
|
|
66
|
+
decrypted += decipher.final("utf8");
|
|
67
|
+
return decrypted;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Generate a cryptographically secure encryption key
|
|
71
|
+
*
|
|
72
|
+
* @returns 64-character hex string (32 bytes) suitable for AES-256
|
|
73
|
+
*
|
|
74
|
+
* @example
|
|
75
|
+
* ```typescript
|
|
76
|
+
* import { generateEncryptionKey } from '@burdenoff/be-sdk/crypto';
|
|
77
|
+
*
|
|
78
|
+
* const key = generateEncryptionKey();
|
|
79
|
+
* // Store this key securely (e.g., in environment variables)
|
|
80
|
+
* console.log(key); // "a1b2c3d4e5f6..."
|
|
81
|
+
* ```
|
|
82
|
+
*/
|
|
83
|
+
function generateEncryptionKey() {
|
|
84
|
+
return crypto.randomBytes(32).toString("hex");
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Check if a string appears to be encrypted (has the expected format)
|
|
88
|
+
*
|
|
89
|
+
* @param text - The string to check
|
|
90
|
+
* @returns true if the string matches the encrypted format
|
|
91
|
+
*
|
|
92
|
+
* @example
|
|
93
|
+
* ```typescript
|
|
94
|
+
* import { isEncrypted } from '@burdenoff/be-sdk/crypto';
|
|
95
|
+
*
|
|
96
|
+
* if (!isEncrypted(data)) {
|
|
97
|
+
* data = encrypt(data, key);
|
|
98
|
+
* }
|
|
99
|
+
* ```
|
|
100
|
+
*/
|
|
101
|
+
function isEncrypted(text) {
|
|
102
|
+
if (!text) return false;
|
|
103
|
+
const parts = text.split(":");
|
|
104
|
+
if (parts.length !== 3) return false;
|
|
105
|
+
const [ivHex, authTagHex, ciphertext] = parts;
|
|
106
|
+
if (!ivHex || ivHex.length !== 32 || !/^[0-9a-f]+$/i.test(ivHex)) return false;
|
|
107
|
+
if (!authTagHex || authTagHex.length !== 32 || !/^[0-9a-f]+$/i.test(authTagHex)) return false;
|
|
108
|
+
if (!ciphertext || !/^[0-9a-f]+$/i.test(ciphertext)) return false;
|
|
109
|
+
return true;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Encrypt a value only if it's not already encrypted
|
|
113
|
+
*
|
|
114
|
+
* @param text - The text to potentially encrypt
|
|
115
|
+
* @param key - The encryption key
|
|
116
|
+
* @returns Encrypted text (either newly encrypted or unchanged if already encrypted)
|
|
117
|
+
*/
|
|
118
|
+
function encryptIfNeeded(text, key) {
|
|
119
|
+
if (isEncrypted(text)) return text;
|
|
120
|
+
return encrypt(text, key);
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Decrypt a value only if it appears to be encrypted
|
|
124
|
+
*
|
|
125
|
+
* @param text - The text to potentially decrypt
|
|
126
|
+
* @param key - The encryption key
|
|
127
|
+
* @returns Decrypted text (either newly decrypted or unchanged if not encrypted)
|
|
128
|
+
*/
|
|
129
|
+
function decryptIfNeeded(text, key) {
|
|
130
|
+
if (!isEncrypted(text)) return text;
|
|
131
|
+
return decrypt(text, key);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
// src/crypto/index.ts
|
|
135
|
+
var crypto_exports = /* @__PURE__ */ __exportAll({
|
|
136
|
+
decrypt: () => decrypt,
|
|
137
|
+
decryptIfNeeded: () => decryptIfNeeded,
|
|
138
|
+
encrypt: () => encrypt,
|
|
139
|
+
encryptIfNeeded: () => encryptIfNeeded,
|
|
140
|
+
generateEncryptionKey: () => generateEncryptionKey,
|
|
141
|
+
isEncrypted: () => isEncrypted
|
|
142
|
+
});
|
|
143
|
+
|
|
144
|
+
export { encryptIfNeeded as a, encrypt as i, decrypt as n, generateEncryptionKey as o, decryptIfNeeded as r, isEncrypted as s, crypto_exports as t };
|
|
145
|
+
//# sourceMappingURL=crypto-DO9fM0FO.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"crypto-DO9fM0FO.js","names":[],"sources":["../src/crypto/encryption.ts","../src/crypto/index.ts"],"sourcesContent":["/**\n * AES-256-GCM Encryption utilities for sensitive data\n *\n * @module crypto/encryption\n */\n\nimport crypto from 'crypto';\n\nconst ALGORITHM = 'aes-256-gcm';\nconst IV_LENGTH = 16;\nconst AUTH_TAG_LENGTH = 16;\n\n/**\n * Encrypt a string using AES-256-GCM\n *\n * @param text - The plaintext to encrypt\n * @param key - 32-byte hex-encoded encryption key (64 hex characters)\n * @returns Encrypted string in format: iv:authTag:ciphertext (all hex-encoded)\n *\n * @example\n * ```typescript\n * import { encrypt, generateEncryptionKey } from '@burdenoff/be-sdk/crypto';\n *\n * const key = generateEncryptionKey();\n * const encrypted = encrypt('my-secret-data', key);\n * ```\n */\nexport function encrypt(text: string, key: string): string {\n if (!text) {\n throw new Error('Text to encrypt cannot be empty');\n }\n if (!key || key.length !== 64) {\n throw new Error('Encryption key must be a 64-character hex string (32 bytes)');\n }\n\n const iv = crypto.randomBytes(IV_LENGTH);\n const cipher = crypto.createCipheriv(ALGORITHM, Buffer.from(key, 'hex'), iv);\n\n let encrypted = cipher.update(text, 'utf8', 'hex');\n encrypted += cipher.final('hex');\n\n const authTag = cipher.getAuthTag();\n\n return `${iv.toString('hex')}:${authTag.toString('hex')}:${encrypted}`;\n}\n\n/**\n * Decrypt a string encrypted with AES-256-GCM\n *\n * @param encryptedText - Encrypted string in format: iv:authTag:ciphertext\n * @param key - 32-byte hex-encoded encryption key (64 hex characters)\n * @returns Decrypted plaintext\n *\n * @example\n * ```typescript\n * import { decrypt } from '@burdenoff/be-sdk/crypto';\n *\n * const decrypted = decrypt(encryptedData, key);\n * ```\n */\nexport function decrypt(encryptedText: string, key: string): string {\n if (!encryptedText) {\n throw new Error('Encrypted text cannot be empty');\n }\n if (!key || key.length !== 64) {\n throw new Error('Encryption key must be a 64-character hex string (32 bytes)');\n }\n\n const parts = encryptedText.split(':');\n if (parts.length !== 3) {\n throw new Error('Invalid encrypted text format. Expected: iv:authTag:ciphertext');\n }\n\n const [ivHex, authTagHex, encrypted] = parts;\n\n if (!ivHex || !authTagHex || !encrypted) {\n throw new Error('Invalid encrypted text format. Missing components.');\n }\n\n const iv = Buffer.from(ivHex, 'hex');\n const authTag = Buffer.from(authTagHex, 'hex');\n\n if (iv.length !== IV_LENGTH) {\n throw new Error(`Invalid IV length. Expected ${IV_LENGTH} bytes.`);\n }\n if (authTag.length !== AUTH_TAG_LENGTH) {\n throw new Error(`Invalid auth tag length. Expected ${AUTH_TAG_LENGTH} bytes.`);\n }\n\n const decipher = crypto.createDecipheriv(ALGORITHM, Buffer.from(key, 'hex'), iv);\n decipher.setAuthTag(authTag);\n\n let decrypted = decipher.update(encrypted, 'hex', 'utf8');\n decrypted += decipher.final('utf8');\n\n return decrypted;\n}\n\n/**\n * Generate a cryptographically secure encryption key\n *\n * @returns 64-character hex string (32 bytes) suitable for AES-256\n *\n * @example\n * ```typescript\n * import { generateEncryptionKey } from '@burdenoff/be-sdk/crypto';\n *\n * const key = generateEncryptionKey();\n * // Store this key securely (e.g., in environment variables)\n * console.log(key); // \"a1b2c3d4e5f6...\"\n * ```\n */\nexport function generateEncryptionKey(): string {\n return crypto.randomBytes(32).toString('hex');\n}\n\n/**\n * Check if a string appears to be encrypted (has the expected format)\n *\n * @param text - The string to check\n * @returns true if the string matches the encrypted format\n *\n * @example\n * ```typescript\n * import { isEncrypted } from '@burdenoff/be-sdk/crypto';\n *\n * if (!isEncrypted(data)) {\n * data = encrypt(data, key);\n * }\n * ```\n */\nexport function isEncrypted(text: string): boolean {\n if (!text) return false;\n\n const parts = text.split(':');\n if (parts.length !== 3) return false;\n\n const [ivHex, authTagHex, ciphertext] = parts;\n\n // Check IV is 32 hex chars (16 bytes)\n if (!ivHex || ivHex.length !== 32 || !/^[0-9a-f]+$/i.test(ivHex)) {\n return false;\n }\n\n // Check auth tag is 32 hex chars (16 bytes)\n if (!authTagHex || authTagHex.length !== 32 || !/^[0-9a-f]+$/i.test(authTagHex)) {\n return false;\n }\n\n // Check ciphertext exists and is hex\n if (!ciphertext || !/^[0-9a-f]+$/i.test(ciphertext)) {\n return false;\n }\n\n return true;\n}\n\n/**\n * Encrypt a value only if it's not already encrypted\n *\n * @param text - The text to potentially encrypt\n * @param key - The encryption key\n * @returns Encrypted text (either newly encrypted or unchanged if already encrypted)\n */\nexport function encryptIfNeeded(text: string, key: string): string {\n if (isEncrypted(text)) {\n return text;\n }\n return encrypt(text, key);\n}\n\n/**\n * Decrypt a value only if it appears to be encrypted\n *\n * @param text - The text to potentially decrypt\n * @param key - The encryption key\n * @returns Decrypted text (either newly decrypted or unchanged if not encrypted)\n */\nexport function decryptIfNeeded(text: string, key: string): string {\n if (!isEncrypted(text)) {\n return text;\n }\n return decrypt(text, key);\n}\n","/**\n * Crypto module - Encryption utilities for sensitive data\n *\n * @module crypto\n *\n * @example\n * ```typescript\n * import { Crypto } from '@burdenoff/be-sdk';\n *\n * // Generate a key (do this once and store securely)\n * const key = Crypto.generateEncryptionKey();\n *\n * // Encrypt sensitive data\n * const encrypted = Crypto.encrypt('my-secret', key);\n *\n * // Decrypt when needed\n * const decrypted = Crypto.decrypt(encrypted, key);\n * ```\n */\n\nexport {\n encrypt,\n decrypt,\n generateEncryptionKey,\n isEncrypted,\n encryptIfNeeded,\n decryptIfNeeded,\n} from './encryption.js';\n"],"mappings":";;;;;;;;;AAQA,MAAM,YAAY;AAClB,MAAM,YAAY;AAClB,MAAM,kBAAkB;;;;;;;;;;;;;;;;AAiBxB,SAAgB,QAAQ,MAAc,KAAqB;CACzD,IAAI,CAAC,MACH,MAAM,IAAI,MAAM,iCAAiC;CAEnD,IAAI,CAAC,OAAO,IAAI,WAAW,IACzB,MAAM,IAAI,MAAM,6DAA6D;CAG/E,MAAM,KAAK,OAAO,YAAY,SAAS;CACvC,MAAM,SAAS,OAAO,eAAe,WAAW,OAAO,KAAK,KAAK,KAAK,GAAG,EAAE;CAE3E,IAAI,YAAY,OAAO,OAAO,MAAM,QAAQ,KAAK;CACjD,aAAa,OAAO,MAAM,KAAK;CAE/B,MAAM,UAAU,OAAO,WAAW;CAElC,OAAO,GAAG,GAAG,SAAS,KAAK,EAAE,GAAG,QAAQ,SAAS,KAAK,EAAE,GAAG;AAC7D;;;;;;;;;;;;;;;AAgBA,SAAgB,QAAQ,eAAuB,KAAqB;CAClE,IAAI,CAAC,eACH,MAAM,IAAI,MAAM,gCAAgC;CAElD,IAAI,CAAC,OAAO,IAAI,WAAW,IACzB,MAAM,IAAI,MAAM,6DAA6D;CAG/E,MAAM,QAAQ,cAAc,MAAM,GAAG;CACrC,IAAI,MAAM,WAAW,GACnB,MAAM,IAAI,MAAM,gEAAgE;CAGlF,MAAM,CAAC,OAAO,YAAY,aAAa;CAEvC,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,WAC5B,MAAM,IAAI,MAAM,oDAAoD;CAGtE,MAAM,KAAK,OAAO,KAAK,OAAO,KAAK;CACnC,MAAM,UAAU,OAAO,KAAK,YAAY,KAAK;CAE7C,IAAI,GAAG,WAAW,WAChB,MAAM,IAAI,MAAM,+BAA+B,UAAU,QAAQ;CAEnE,IAAI,QAAQ,WAAW,iBACrB,MAAM,IAAI,MAAM,qCAAqC,gBAAgB,QAAQ;CAG/E,MAAM,WAAW,OAAO,iBAAiB,WAAW,OAAO,KAAK,KAAK,KAAK,GAAG,EAAE;CAC/E,SAAS,WAAW,OAAO;CAE3B,IAAI,YAAY,SAAS,OAAO,WAAW,OAAO,MAAM;CACxD,aAAa,SAAS,MAAM,MAAM;CAElC,OAAO;AACT;;;;;;;;;;;;;;;AAgBA,SAAgB,wBAAgC;CAC9C,OAAO,OAAO,YAAY,EAAE,CAAC,CAAC,SAAS,KAAK;AAC9C;;;;;;;;;;;;;;;;AAiBA,SAAgB,YAAY,MAAuB;CACjD,IAAI,CAAC,MAAM,OAAO;CAElB,MAAM,QAAQ,KAAK,MAAM,GAAG;CAC5B,IAAI,MAAM,WAAW,GAAG,OAAO;CAE/B,MAAM,CAAC,OAAO,YAAY,cAAc;CAGxC,IAAI,CAAC,SAAS,MAAM,WAAW,MAAM,CAAC,eAAe,KAAK,KAAK,GAC7D,OAAO;CAIT,IAAI,CAAC,cAAc,WAAW,WAAW,MAAM,CAAC,eAAe,KAAK,UAAU,GAC5E,OAAO;CAIT,IAAI,CAAC,cAAc,CAAC,eAAe,KAAK,UAAU,GAChD,OAAO;CAGT,OAAO;AACT;;;;;;;;AASA,SAAgB,gBAAgB,MAAc,KAAqB;CACjE,IAAI,YAAY,IAAI,GAClB,OAAO;CAET,OAAO,QAAQ,MAAM,GAAG;AAC1B;;;;;;;;AASA,SAAgB,gBAAgB,MAAc,KAAqB;CACjE,IAAI,CAAC,YAAY,IAAI,GACnB,OAAO;CAET,OAAO,QAAQ,MAAM,GAAG;AAC1B"}
|
package/dist/database/index.d.ts
CHANGED
|
@@ -1,117 +1,113 @@
|
|
|
1
|
-
import { ClickHouseClient } from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
asyncInsert?: boolean;
|
|
1
|
+
import { ClickHouseClient } from "@clickhouse/client";
|
|
2
|
+
export interface ClickHouseConfig {
|
|
3
|
+
url?: string;
|
|
4
|
+
username?: string;
|
|
5
|
+
password?: string;
|
|
6
|
+
database?: string;
|
|
7
|
+
requestTimeout?: number;
|
|
8
|
+
asyncInsert?: boolean;
|
|
10
9
|
}
|
|
11
|
-
declare function getClickHouseClient(config?: ClickHouseConfig): Promise<ClickHouseClient>;
|
|
12
|
-
declare function testClickHouseConnection(): Promise<boolean>;
|
|
13
|
-
declare function closeClickHouseConnection(): Promise<void>;
|
|
14
|
-
declare function executeQuery<T = unknown>(query: string, params?: Record<string, unknown>): Promise<T[]>;
|
|
15
|
-
declare function insertData<T extends Record<string, unknown>>(table: string, data: T[]): Promise<void>;
|
|
16
|
-
declare function createTable(query: string): Promise<void>;
|
|
17
|
-
declare function getClickHouseStats(): Promise<{
|
|
18
|
-
|
|
19
|
-
|
|
10
|
+
export declare function getClickHouseClient(config?: ClickHouseConfig): Promise<ClickHouseClient>;
|
|
11
|
+
export declare function testClickHouseConnection(): Promise<boolean>;
|
|
12
|
+
export declare function closeClickHouseConnection(): Promise<void>;
|
|
13
|
+
export declare function executeQuery<T = unknown>(query: string, params?: Record<string, unknown>): Promise<T[]>;
|
|
14
|
+
export declare function insertData<T extends Record<string, unknown>>(table: string, data: T[]): Promise<void>;
|
|
15
|
+
export declare function createTable(query: string): Promise<void>;
|
|
16
|
+
export declare function getClickHouseStats(): Promise<{
|
|
17
|
+
isConnected: boolean;
|
|
18
|
+
database: string | null;
|
|
20
19
|
}>;
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
interface PrismaConfig extends DatabaseConfig {
|
|
36
|
-
log?: Array<'query' | 'info' | 'warn' | 'error'>;
|
|
37
|
-
errorFormat?: 'pretty' | 'colorless' | 'minimal';
|
|
20
|
+
export interface DatabaseConfig {
|
|
21
|
+
url: string;
|
|
22
|
+
poolSize?: number;
|
|
23
|
+
connectionTimeout?: number;
|
|
24
|
+
queryTimeout?: number;
|
|
25
|
+
logQueries?: boolean;
|
|
26
|
+
ssl?: {
|
|
27
|
+
rejectUnauthorized?: boolean;
|
|
28
|
+
ca?: string;
|
|
29
|
+
cert?: string;
|
|
30
|
+
key?: string;
|
|
31
|
+
};
|
|
38
32
|
}
|
|
39
|
-
interface
|
|
40
|
-
|
|
41
|
-
|
|
33
|
+
export interface PrismaConfig extends DatabaseConfig {
|
|
34
|
+
log?: Array<'query' | 'info' | 'warn' | 'error'>;
|
|
35
|
+
errorFormat?: 'pretty' | 'colorless' | 'minimal';
|
|
42
36
|
}
|
|
43
|
-
interface
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
offset?: number;
|
|
47
|
-
limit?: number;
|
|
37
|
+
export interface QueryOptions {
|
|
38
|
+
timeout?: number;
|
|
39
|
+
isolationLevel?: 'ReadUncommitted' | 'ReadCommitted' | 'RepeatableRead' | 'Serializable';
|
|
48
40
|
}
|
|
49
|
-
interface
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
totalPages: number;
|
|
55
|
-
hasNext: boolean;
|
|
56
|
-
hasPrevious: boolean;
|
|
41
|
+
export interface PaginationOptions {
|
|
42
|
+
page?: number;
|
|
43
|
+
pageSize?: number;
|
|
44
|
+
offset?: number;
|
|
45
|
+
limit?: number;
|
|
57
46
|
}
|
|
58
|
-
interface
|
|
59
|
-
|
|
60
|
-
|
|
47
|
+
export interface PaginatedResult<T> {
|
|
48
|
+
data: T[];
|
|
49
|
+
total: number;
|
|
50
|
+
page: number;
|
|
51
|
+
pageSize: number;
|
|
52
|
+
totalPages: number;
|
|
53
|
+
hasNext: boolean;
|
|
54
|
+
hasPrevious: boolean;
|
|
61
55
|
}
|
|
62
|
-
interface
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
value: unknown;
|
|
56
|
+
export interface SortOptions {
|
|
57
|
+
field: string;
|
|
58
|
+
direction: 'asc' | 'desc';
|
|
66
59
|
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
take: number;
|
|
72
|
-
page: number;
|
|
73
|
-
pageSize: number;
|
|
74
|
-
};
|
|
75
|
-
static createPaginatedResult<T>(data: T[], total: number, page: number, pageSize: number): PaginatedResult<T>;
|
|
76
|
-
static buildWhereClause(filters: FilterOptions[]): Record<string, unknown>;
|
|
77
|
-
static buildOrderByClause(sorts: SortOptions[]): Record<string, string>[];
|
|
78
|
-
static parseDatabaseUrl(url: string): {
|
|
79
|
-
protocol: string;
|
|
80
|
-
host: string;
|
|
81
|
-
port?: number;
|
|
82
|
-
database: string;
|
|
83
|
-
username?: string;
|
|
84
|
-
password?: string;
|
|
85
|
-
params?: Record<string, string>;
|
|
86
|
-
};
|
|
87
|
-
static buildDatabaseUrl(options: {
|
|
88
|
-
protocol: string;
|
|
89
|
-
host: string;
|
|
90
|
-
port?: number;
|
|
91
|
-
database: string;
|
|
92
|
-
username?: string;
|
|
93
|
-
password?: string;
|
|
94
|
-
params?: Record<string, string>;
|
|
95
|
-
}): string;
|
|
96
|
-
static sanitizeDatabaseUrl(url: string): string;
|
|
97
|
-
static validateDatabaseUrl(url: string): boolean;
|
|
98
|
-
static createPoolConfig(config: DatabaseConfig): {
|
|
99
|
-
min: number;
|
|
100
|
-
max: number;
|
|
101
|
-
acquireTimeoutMillis: number;
|
|
102
|
-
idleTimeoutMillis: number;
|
|
103
|
-
};
|
|
104
|
-
static generateMigrationName(description: string): string;
|
|
105
|
-
static buildSelectClause(fields: string[]): Record<string, boolean>;
|
|
106
|
-
static buildIncludeClause(relations: string[]): Record<string, boolean>;
|
|
107
|
-
static retry<T>(operation: () => Promise<T>, options?: {
|
|
108
|
-
maxAttempts?: number;
|
|
109
|
-
delay?: number;
|
|
110
|
-
backoff?: number;
|
|
111
|
-
}): Promise<T>;
|
|
112
|
-
static transaction<T>(prisma: unknown, operations: Array<(tx: unknown) => Promise<unknown>>): Promise<T[]>;
|
|
113
|
-
static healthCheck(prisma: unknown): Promise<boolean>;
|
|
114
|
-
static formatPrismaError(error: unknown): string;
|
|
60
|
+
export interface FilterOptions {
|
|
61
|
+
field: string;
|
|
62
|
+
operator: 'eq' | 'ne' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'nin' | 'like' | 'ilike';
|
|
63
|
+
value: unknown;
|
|
115
64
|
}
|
|
116
|
-
|
|
117
|
-
|
|
65
|
+
export declare class DatabaseModule {
|
|
66
|
+
static createPrismaConfig(config: PrismaConfig): Record<string, unknown>;
|
|
67
|
+
static buildPagination(options: PaginationOptions): {
|
|
68
|
+
skip: number;
|
|
69
|
+
take: number;
|
|
70
|
+
page: number;
|
|
71
|
+
pageSize: number;
|
|
72
|
+
};
|
|
73
|
+
static createPaginatedResult<T>(data: T[], total: number, page: number, pageSize: number): PaginatedResult<T>;
|
|
74
|
+
static buildWhereClause(filters: FilterOptions[]): Record<string, unknown>;
|
|
75
|
+
static buildOrderByClause(sorts: SortOptions[]): Record<string, string>[];
|
|
76
|
+
static parseDatabaseUrl(url: string): {
|
|
77
|
+
protocol: string;
|
|
78
|
+
host: string;
|
|
79
|
+
port?: number;
|
|
80
|
+
database: string;
|
|
81
|
+
username?: string;
|
|
82
|
+
password?: string;
|
|
83
|
+
params?: Record<string, string>;
|
|
84
|
+
};
|
|
85
|
+
static buildDatabaseUrl(options: {
|
|
86
|
+
protocol: string;
|
|
87
|
+
host: string;
|
|
88
|
+
port?: number;
|
|
89
|
+
database: string;
|
|
90
|
+
username?: string;
|
|
91
|
+
password?: string;
|
|
92
|
+
params?: Record<string, string>;
|
|
93
|
+
}): string;
|
|
94
|
+
static sanitizeDatabaseUrl(url: string): string;
|
|
95
|
+
static validateDatabaseUrl(url: string): boolean;
|
|
96
|
+
static createPoolConfig(config: DatabaseConfig): {
|
|
97
|
+
min: number;
|
|
98
|
+
max: number;
|
|
99
|
+
acquireTimeoutMillis: number;
|
|
100
|
+
idleTimeoutMillis: number;
|
|
101
|
+
};
|
|
102
|
+
static generateMigrationName(description: string): string;
|
|
103
|
+
static buildSelectClause(fields: string[]): Record<string, boolean>;
|
|
104
|
+
static buildIncludeClause(relations: string[]): Record<string, boolean>;
|
|
105
|
+
static retry<T>(operation: () => Promise<T>, options?: {
|
|
106
|
+
maxAttempts?: number;
|
|
107
|
+
delay?: number;
|
|
108
|
+
backoff?: number;
|
|
109
|
+
}): Promise<T>;
|
|
110
|
+
static transaction<T>(prisma: unknown, operations: Array<(tx: unknown) => Promise<unknown>>): Promise<T[]>;
|
|
111
|
+
static healthCheck(prisma: unknown): Promise<boolean>;
|
|
112
|
+
static formatPrismaError(error: unknown): string;
|
|
113
|
+
}
|