@burdenoff/be-sdk 2026.516.2 → 2026.516.3
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/dist/auth/index.d.ts +2 -2
- package/dist/auth/index.js +3 -3
- package/dist/cache/index.d.ts +2 -2
- package/dist/cache/index.js +2 -2
- package/dist/{chunk-6U2P4ANJ.js → chunk-5M3YVBTH.js} +5 -5
- package/dist/{chunk-6U2P4ANJ.js.map → chunk-5M3YVBTH.js.map} +1 -1
- package/dist/{chunk-RVB5QFZ4.js → chunk-6WYNQ26B.js} +4 -4
- package/dist/{chunk-RVB5QFZ4.js.map → chunk-6WYNQ26B.js.map} +1 -1
- package/dist/{chunk-5CAA3JST.js → chunk-CPO7ZXUQ.js} +3 -3
- package/dist/{chunk-5CAA3JST.js.map → chunk-CPO7ZXUQ.js.map} +1 -1
- package/dist/{chunk-24VR7PF3.js → chunk-HF3EFD7G.js} +2 -2
- package/dist/{chunk-24VR7PF3.js.map → chunk-HF3EFD7G.js.map} +1 -1
- package/dist/{chunk-V4RLPTTT.js → chunk-IFES3AQS.js} +3 -3
- package/dist/{chunk-V4RLPTTT.js.map → chunk-IFES3AQS.js.map} +1 -1
- package/dist/{chunk-SNW4BLF2.js → chunk-IPKUQS7K.js} +3 -3
- package/dist/{chunk-SNW4BLF2.js.map → chunk-IPKUQS7K.js.map} +1 -1
- package/dist/{chunk-Q6N74R6S.js → chunk-JO6XUKZ5.js} +3 -3
- package/dist/{chunk-Q6N74R6S.js.map → chunk-JO6XUKZ5.js.map} +1 -1
- package/dist/{chunk-7Y3RNUS3.js → chunk-NGA6NTFG.js} +4 -4
- package/dist/{chunk-7Y3RNUS3.js.map → chunk-NGA6NTFG.js.map} +1 -1
- package/dist/{chunk-RTQIRGVB.js → chunk-O6RHB2YP.js} +2 -2
- package/dist/chunk-O6RHB2YP.js.map +1 -0
- package/dist/{chunk-Z4IRLBWO.js → chunk-R3XPCYHM.js} +3 -3
- package/dist/{chunk-Z4IRLBWO.js.map → chunk-R3XPCYHM.js.map} +1 -1
- package/dist/{chunk-AQTNM2EY.js → chunk-RMDKB5O7.js} +3 -3
- package/dist/{chunk-AQTNM2EY.js.map → chunk-RMDKB5O7.js.map} +1 -1
- package/dist/{chunk-VKSB2K5E.js → chunk-SO57HNXV.js} +3 -4
- package/dist/chunk-SO57HNXV.js.map +1 -0
- package/dist/{chunk-U455UF4O.js → chunk-TXW7ZKA2.js} +5 -5
- package/dist/{chunk-U455UF4O.js.map → chunk-TXW7ZKA2.js.map} +1 -1
- package/dist/{chunk-75VTKG4Q.js → chunk-U2GLUZAO.js} +4 -6
- package/dist/chunk-U2GLUZAO.js.map +1 -0
- package/dist/{chunk-HIWTWIGQ.js → chunk-UIJWXPOQ.js} +7 -7
- package/dist/chunk-UIJWXPOQ.js.map +1 -0
- package/dist/{chunk-WBWM7UY7.js → chunk-UNPJMENC.js} +3 -3
- package/dist/{chunk-WBWM7UY7.js.map → chunk-UNPJMENC.js.map} +1 -1
- package/dist/{chunk-MQ6OE5QR.js → chunk-WCBKW3CL.js} +6 -11
- package/dist/chunk-WCBKW3CL.js.map +1 -0
- package/dist/{chunk-NGMEI42S.js → chunk-ZA3IGCDJ.js} +4 -4
- package/dist/chunk-ZA3IGCDJ.js.map +1 -0
- package/dist/database/index.js +3 -3
- package/dist/event-queue/index.d.ts +5 -5
- package/dist/event-queue/index.js +2 -2
- package/dist/export/index.d.ts +2 -2
- package/dist/export/index.js +5 -5
- package/dist/gateway/index.d.ts +2 -2
- package/dist/gateway/index.js +4 -4
- package/dist/gateway/security/index.js +1 -1
- package/dist/graph/index.d.ts +4 -4
- package/dist/graph/index.js +5 -5
- package/dist/{graph-emitter-Dp7UE1Yd.d.ts → graph-emitter-r5TylDBm.d.ts} +1 -2
- package/dist/{graphql-0_hoaeUf.d.ts → graphql-DH3L5Hj7.d.ts} +1 -1
- package/dist/{index-DlFDFyWD.d.ts → index-BVjR9llq.d.ts} +2 -2
- package/dist/{index-DJq060D-.d.ts → index-BZPEyVOl.d.ts} +3 -3
- package/dist/{index-tJYziwMs.d.ts → index-BqSh1K8I.d.ts} +3 -23
- package/dist/{index-D_Nc4UHi.d.ts → index-C7T0Xx19.d.ts} +8 -9
- package/dist/{index-CSPbpywb.d.ts → index-Caqvetqq.d.ts} +5 -10
- package/dist/{index-Bo58dlMU.d.ts → index-CygU_fXS.d.ts} +3 -3
- package/dist/{index-DYEts1R8.d.ts → index-DLyc5o_K.d.ts} +1 -1
- package/dist/{index-BMq3lFjj.d.ts → index-Dg4kH1VJ.d.ts} +1 -1
- package/dist/{index-zzKCairW.d.ts → index-DohaJRZP.d.ts} +2 -2
- package/dist/{index-RU_M5c74.d.ts → index-KA3gg4es.d.ts} +1 -1
- package/dist/{index-B6IwtUb1.d.ts → index-cnFnfIjk.d.ts} +1 -1
- package/dist/{index-TKcu5LDR.d.ts → index-fhOvuvlv.d.ts} +1 -1
- package/dist/index.d.ts +27 -27
- package/dist/index.js +87 -87
- package/dist/index.js.map +1 -1
- package/dist/init/index.d.ts +2 -2
- package/dist/init/index.js +5 -5
- package/dist/instrumentation/index.d.ts +3 -3
- package/dist/layer/index.d.ts +2 -2
- package/dist/layer/index.js +2 -2
- package/dist/{layer-DDip18KY.d.ts → layer-CUu_cZ7d.d.ts} +1 -1
- package/dist/logger/index.d.ts +2 -2
- package/dist/notifications/index.d.ts +3 -3
- package/dist/notifications/index.js +3 -3
- package/dist/prisma/index.js +2 -2
- package/dist/rbac/index.d.ts +3 -3
- package/dist/rbac/index.js +3 -3
- package/dist/telemetry/index.d.ts +6 -6
- package/dist/telemetry/index.js.map +1 -1
- package/dist/temporal/index.d.ts +1 -1
- package/dist/temporal/index.js +2 -2
- package/dist/tracker/index.d.ts +4 -4
- package/dist/tracker/index.js +5 -5
- package/package.json +1 -1
- package/dist/chunk-75VTKG4Q.js.map +0 -1
- package/dist/chunk-HIWTWIGQ.js.map +0 -1
- package/dist/chunk-MQ6OE5QR.js.map +0 -1
- package/dist/chunk-NGMEI42S.js.map +0 -1
- package/dist/chunk-RTQIRGVB.js.map +0 -1
- package/dist/chunk-VKSB2K5E.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
import { S as SDKContext, a as SDKConfig,
|
|
2
|
-
export {
|
|
3
|
-
import { L as Logger } from './index-
|
|
4
|
-
export { i as Logger } from './index-
|
|
1
|
+
import { S as SDKContext, a as SDKConfig, E as EventQueueHealthStatus, T as TemporalHealthStatus, b as SDKHealthStatus, c as SDKShutdownOptions } from './index-Caqvetqq.js';
|
|
2
|
+
export { d as EventQueueSDKConfig, L as LoggerConfig, e as LoggerTransport } from './index-Caqvetqq.js';
|
|
3
|
+
import { L as Logger } from './index-DLyc5o_K.js';
|
|
4
|
+
export { i as Logger } from './index-DLyc5o_K.js';
|
|
5
5
|
import { AuthModule } from './auth/index.js';
|
|
6
|
-
import { T as TenantNotificationsModule, a as NotificationsModule } from './index-
|
|
7
|
-
export { t as Notifications } from './index-
|
|
6
|
+
import { T as TenantNotificationsModule, a as NotificationsModule } from './index-DohaJRZP.js';
|
|
7
|
+
export { t as Notifications } from './index-DohaJRZP.js';
|
|
8
8
|
import { RBACModule } from './rbac/index.js';
|
|
9
9
|
export { LayerAwareRBACConfig, RBACDirectiveConfig, createRBACDirective, createRBACDirectiveForLayer, createRBACDirectiveFromEnv } from './rbac/index.js';
|
|
10
|
-
import { A as ActivityModule, U as UsageModule, T as TrackerModule } from './index-
|
|
10
|
+
import { A as ActivityModule, U as UsageModule, T as TrackerModule } from './index-BZPEyVOl.js';
|
|
11
11
|
import { DatabaseConfig, DatabaseModule } from './database/index.js';
|
|
12
|
-
import { E as EventsModule, I as IEventPublisher } from './index-
|
|
13
|
-
export { i as EventQueue } from './index-
|
|
14
|
-
import { G as GraphModule } from './index-
|
|
15
|
-
export { i as Graph } from './index-
|
|
16
|
-
import { B as BurdenoffGraphQLClient } from './graphql-
|
|
12
|
+
import { E as EventsModule, I as IEventPublisher } from './index-C7T0Xx19.js';
|
|
13
|
+
export { i as EventQueue } from './index-C7T0Xx19.js';
|
|
14
|
+
import { G as GraphModule } from './index-CygU_fXS.js';
|
|
15
|
+
export { i as Graph } from './index-CygU_fXS.js';
|
|
16
|
+
import { B as BurdenoffGraphQLClient } from './graphql-DH3L5Hj7.js';
|
|
17
17
|
import { TemporalModule } from './temporal/index.js';
|
|
18
18
|
export { TemporalClient, TemporalClientConfig, TemporalClientFactory, TemporalWorker, TemporalWorkerConfig, TemporalWorkerFactory, TemporalWorkerManager, WorkflowStartOptions } from './temporal/index.js';
|
|
19
19
|
export { createInternalClient, createInternalClientForTenant, createInternalClientForWorkspaces } from './client/internal-client.js';
|
|
20
|
-
export { i as Cache } from './index-
|
|
20
|
+
export { i as Cache } from './index-cnFnfIjk.js';
|
|
21
21
|
export { i as Middleware } from './index-DSOpj8DI.js';
|
|
22
22
|
export { i as Observability } from './index-4gKQKZ2B.js';
|
|
23
23
|
export { i as GraphQL } from './index-joONjwLt.js';
|
|
24
24
|
export { i as Prisma } from './index-Dtf6FBaD.js';
|
|
25
25
|
export { i as Utils } from './index-PaojfSdd.js';
|
|
26
26
|
export { i as I18n, I as I18nCapableContext, T as Translator, c as createTranslator, g as getLanguage, a as getLocale, h as hasI18n, t } from './index-BV3G48cH.js';
|
|
27
|
-
export { i as Export } from './index-
|
|
28
|
-
export { i as Init } from './index-
|
|
27
|
+
export { i as Export } from './index-Dg4kH1VJ.js';
|
|
28
|
+
export { i as Init } from './index-BqSh1K8I.js';
|
|
29
29
|
export { i as DataLoader } from './index-DW9q22GH.js';
|
|
30
|
-
export { a as Instrumentation } from './index-
|
|
31
|
-
export { i as Layer } from './index-
|
|
30
|
+
export { a as Instrumentation } from './index-fhOvuvlv.js';
|
|
31
|
+
export { i as Layer } from './index-BVjR9llq.js';
|
|
32
32
|
export { i as Crypto } from './index-e_18DzAg.js';
|
|
33
|
-
export { i as Gateway } from './index-
|
|
33
|
+
export { i as Gateway } from './index-KA3gg4es.js';
|
|
34
34
|
export { i as FeatureFlags } from './index-jOuh_TKn.js';
|
|
35
35
|
export { i as Captcha, R as RecaptchaVerifyOptions, a as RecaptchaVerifyResult, b as isCaptchaEnabled, v as verifyCaptcha, c as verifyCaptchaIfEnabled } from './index-B70b5mYS.js';
|
|
36
|
-
export { C as CircuitBreakerConfig, h as DEFAULT_CIRCUIT_BREAKER_CONFIG, i as DEFAULT_GATEWAY_RETRY_CONFIG, D as DEFAULT_GATEWAY_ROUTING, b as DEFAULT_LAYER_RESOURCES, c as DEFAULT_LAYER_STREAMS, f as GatewayRequestHeaders, g as GatewayRetryConfig, G as GatewayRoutingConfig, L as LayerConfig, a as LayerFullConfig, d as LayerGatewayConfig, e as LayerResourceUrls, S as ServiceLayer } from './layer-
|
|
36
|
+
export { C as CircuitBreakerConfig, h as DEFAULT_CIRCUIT_BREAKER_CONFIG, i as DEFAULT_GATEWAY_RETRY_CONFIG, D as DEFAULT_GATEWAY_ROUTING, b as DEFAULT_LAYER_RESOURCES, c as DEFAULT_LAYER_STREAMS, f as GatewayRequestHeaders, g as GatewayRetryConfig, G as GatewayRoutingConfig, L as LayerConfig, a as LayerFullConfig, d as LayerGatewayConfig, e as LayerResourceUrls, S as ServiceLayer } from './layer-CUu_cZ7d.js';
|
|
37
37
|
import 'graphql-request';
|
|
38
38
|
import '@envelop/core';
|
|
39
39
|
import '@clickhouse/client';
|
|
40
|
-
import './graph-emitter-
|
|
40
|
+
import './graph-emitter-r5TylDBm.js';
|
|
41
41
|
import './client-CSjIrYKS.js';
|
|
42
42
|
import '@prisma/adapter-pg';
|
|
43
43
|
import 'pg';
|
|
@@ -538,9 +538,9 @@ declare function createTenantBackendClient(config: TenantBackendClientConfig): T
|
|
|
538
538
|
declare class BurdenoffSDK {
|
|
539
539
|
private client;
|
|
540
540
|
private defaultContext;
|
|
541
|
-
private
|
|
542
|
-
private
|
|
543
|
-
private
|
|
541
|
+
private eventPublisher;
|
|
542
|
+
private eventPublisherInitPromise;
|
|
543
|
+
private eventQueueConfig;
|
|
544
544
|
private initializationPromise;
|
|
545
545
|
private isShuttingDown;
|
|
546
546
|
readonly auth: AuthModule;
|
|
@@ -569,10 +569,10 @@ declare class BurdenoffSDK {
|
|
|
569
569
|
getContext(): SDKContext | undefined;
|
|
570
570
|
withContext<T>(context: SDKContext, fn: () => Promise<T>): Promise<T>;
|
|
571
571
|
private initializeAsync;
|
|
572
|
-
private
|
|
573
|
-
|
|
572
|
+
private initializeEventQueue;
|
|
573
|
+
getEventPublisher(): Promise<IEventPublisher>;
|
|
574
574
|
waitForReady(): Promise<void>;
|
|
575
|
-
|
|
575
|
+
isEventQueueHealthy(): Promise<EventQueueHealthStatus>;
|
|
576
576
|
isTemporalHealthy(): Promise<TemporalHealthStatus>;
|
|
577
577
|
getHealthStatus(): Promise<SDKHealthStatus>;
|
|
578
578
|
shutdown(options?: SDKShutdownOptions): Promise<void>;
|
|
@@ -581,4 +581,4 @@ declare class BurdenoffSDK {
|
|
|
581
581
|
|
|
582
582
|
declare function createSDK(config: SDKConfig, context?: SDKContext): BurdenoffSDK;
|
|
583
583
|
|
|
584
|
-
export { ActivityModule, AuthModule, BootstrapModule, BurdenoffGraphQLClient, BurdenoffSDK, ContextManager, DatabaseModule, EventsModule, type ExportProductTranslationsOptions, GraphModule,
|
|
584
|
+
export { ActivityModule, AuthModule, BootstrapModule, BurdenoffGraphQLClient, BurdenoffSDK, ContextManager, DatabaseModule, EventQueueHealthStatus, EventsModule, type ExportProductTranslationsOptions, GraphModule, NotificationsModule, PaymentsModule, type ProductTranslationTree, type ProductTranslationsExportResult, RBACModule, SDKConfig, SDKContext, SDKHealthStatus, SDKShutdownOptions, SearchModule, TemporalHealthStatus, TemporalModule, TenantBackendClient, type TenantBackendClientConfig, TrackerModule, type TranslationExportFormat, TranslationModule, type UpsertProductTranslationsOptions, type UpsertProductTranslationsResult, UsageModule, createBootstrap, createSDK, createTenantBackendClient, BurdenoffSDK as default };
|
package/dist/index.js
CHANGED
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
export { TemporalClient, TemporalClientFactory, TemporalModule, TemporalWorker, TemporalWorkerFactory, TemporalWorkerManager } from './chunk-
|
|
2
|
-
import { ActivityModule, UsageModule, TrackerModule } from './chunk-
|
|
3
|
-
export { ActivityModule, TrackerModule, UsageModule } from './chunk-
|
|
1
|
+
export { TemporalClient, TemporalClientFactory, TemporalModule, TemporalWorker, TemporalWorkerFactory, TemporalWorkerManager } from './chunk-R3XPCYHM.js';
|
|
2
|
+
import { ActivityModule, UsageModule, TrackerModule } from './chunk-5M3YVBTH.js';
|
|
3
|
+
export { ActivityModule, TrackerModule, UsageModule } from './chunk-5M3YVBTH.js';
|
|
4
4
|
export { instrumentation_exports as Instrumentation } from './chunk-4XAEES25.js';
|
|
5
5
|
export { middleware_exports as Middleware } from './chunk-2HANKZZM.js';
|
|
6
|
-
import { TenantNotificationsModule, NotificationsModule } from './chunk-
|
|
7
|
-
export { tenant_notifications_exports as Notifications, NotificationsModule } from './chunk-
|
|
6
|
+
import { TenantNotificationsModule, NotificationsModule } from './chunk-RMDKB5O7.js';
|
|
7
|
+
export { tenant_notifications_exports as Notifications, NotificationsModule } from './chunk-RMDKB5O7.js';
|
|
8
8
|
export { observability_exports as Observability } from './chunk-5LXDPGDH.js';
|
|
9
|
-
export { prisma_exports as Prisma } from './chunk-
|
|
9
|
+
export { prisma_exports as Prisma } from './chunk-IFES3AQS.js';
|
|
10
10
|
import './chunk-GTEMQXCA.js';
|
|
11
|
-
import { RBACModule } from './chunk-
|
|
12
|
-
export { RBACModule, createRBACDirective, createRBACDirectiveForLayer, createRBACDirectiveFromEnv } from './chunk-
|
|
13
|
-
export { export_exports as Export } from './chunk-
|
|
11
|
+
import { RBACModule } from './chunk-6WYNQ26B.js';
|
|
12
|
+
export { RBACModule, createRBACDirective, createRBACDirectiveForLayer, createRBACDirectiveFromEnv } from './chunk-6WYNQ26B.js';
|
|
13
|
+
export { export_exports as Export } from './chunk-IPKUQS7K.js';
|
|
14
14
|
export { feature_flags_exports as FeatureFlags } from './chunk-VWCN5PMD.js';
|
|
15
|
-
import { GraphModule } from './chunk-
|
|
16
|
-
export { graph_exports as Graph, GraphModule } from './chunk-
|
|
15
|
+
import { GraphModule } from './chunk-NGA6NTFG.js';
|
|
16
|
+
export { graph_exports as Graph, GraphModule } from './chunk-NGA6NTFG.js';
|
|
17
17
|
import './chunk-TKBD2ONF.js';
|
|
18
|
-
import { EventsModule } from './chunk-
|
|
19
|
-
export { event_queue_exports as EventQueue, EventsModule } from './chunk-
|
|
20
|
-
import './chunk-
|
|
21
|
-
import { EventQueueFactory } from './chunk-TM5RQ6P2.js';
|
|
18
|
+
import { EventsModule } from './chunk-WCBKW3CL.js';
|
|
19
|
+
export { event_queue_exports as EventQueue, EventsModule } from './chunk-WCBKW3CL.js';
|
|
20
|
+
import './chunk-SO57HNXV.js';
|
|
21
|
+
import { QueueType, EventQueueFactory } from './chunk-TM5RQ6P2.js';
|
|
22
22
|
export { graphql_exports as GraphQL } from './chunk-RRFNSBDZ.js';
|
|
23
23
|
import './chunk-QLVKMWFA.js';
|
|
24
24
|
import './chunk-MVHOP4IG.js';
|
|
25
25
|
export { i18n_exports as I18n, createTranslator, getLanguage, getLocale, hasI18n, t } from './chunk-IYE2NTRX.js';
|
|
26
|
-
export { init_exports as Init } from './chunk-
|
|
27
|
-
export { gateway_exports as Gateway } from './chunk-
|
|
28
|
-
import './chunk-
|
|
29
|
-
export { layer_exports as Layer } from './chunk-
|
|
30
|
-
import { AuthModule } from './chunk-
|
|
31
|
-
export { AuthModule } from './chunk-
|
|
26
|
+
export { init_exports as Init } from './chunk-U2GLUZAO.js';
|
|
27
|
+
export { gateway_exports as Gateway } from './chunk-TXW7ZKA2.js';
|
|
28
|
+
import './chunk-HF3EFD7G.js';
|
|
29
|
+
export { layer_exports as Layer } from './chunk-UIJWXPOQ.js';
|
|
30
|
+
import { AuthModule } from './chunk-UNPJMENC.js';
|
|
31
|
+
export { AuthModule } from './chunk-UNPJMENC.js';
|
|
32
32
|
export { utils_exports as Utils } from './chunk-MOCUBSTW.js';
|
|
33
|
-
export { cache_exports as Cache } from './chunk-
|
|
33
|
+
export { cache_exports as Cache } from './chunk-JO6XUKZ5.js';
|
|
34
34
|
export { captcha_exports as Captcha, isCaptchaEnabled, verifyCaptcha, verifyCaptchaIfEnabled } from './chunk-YMZEUTD2.js';
|
|
35
35
|
export { createInternalClient, createInternalClientForTenant, createInternalClientForWorkspaces } from './chunk-VI4VSNTI.js';
|
|
36
36
|
export { crypto_exports as Crypto } from './chunk-SBS4S2PJ.js';
|
|
37
|
-
import { DatabaseModule } from './chunk-
|
|
38
|
-
export { DatabaseModule } from './chunk-
|
|
39
|
-
import { APIError, NetworkError, TimeoutError, ValidationError } from './chunk-
|
|
40
|
-
export { DEFAULT_CIRCUIT_BREAKER_CONFIG, DEFAULT_GATEWAY_RETRY_CONFIG, DEFAULT_GATEWAY_ROUTING, DEFAULT_LAYER_RESOURCES, DEFAULT_LAYER_STREAMS } from './chunk-
|
|
37
|
+
import { DatabaseModule } from './chunk-CPO7ZXUQ.js';
|
|
38
|
+
export { DatabaseModule } from './chunk-CPO7ZXUQ.js';
|
|
39
|
+
import { APIError, NetworkError, TimeoutError, ValidationError } from './chunk-O6RHB2YP.js';
|
|
40
|
+
export { DEFAULT_CIRCUIT_BREAKER_CONFIG, DEFAULT_GATEWAY_RETRY_CONFIG, DEFAULT_GATEWAY_ROUTING, DEFAULT_LAYER_RESOURCES, DEFAULT_LAYER_STREAMS } from './chunk-ZA3IGCDJ.js';
|
|
41
41
|
import { logger } from './chunk-CBZNP6RF.js';
|
|
42
42
|
export { logger_exports as Logger } from './chunk-CBZNP6RF.js';
|
|
43
43
|
export { dataloader_exports as DataLoader } from './chunk-NUB5GQTU.js';
|
|
@@ -2198,10 +2198,10 @@ var BurdenoffSDK = class {
|
|
|
2198
2198
|
}
|
|
2199
2199
|
client;
|
|
2200
2200
|
defaultContext;
|
|
2201
|
-
//
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2201
|
+
// Event queue publisher state (Redis Streams)
|
|
2202
|
+
eventPublisher = null;
|
|
2203
|
+
eventPublisherInitPromise = null;
|
|
2204
|
+
eventQueueConfig = null;
|
|
2205
2205
|
// Initialization state
|
|
2206
2206
|
initializationPromise = null;
|
|
2207
2207
|
isShuttingDown = false;
|
|
@@ -2312,19 +2312,19 @@ var BurdenoffSDK = class {
|
|
|
2312
2312
|
taskQueue: config.temporalTaskQueue
|
|
2313
2313
|
};
|
|
2314
2314
|
}
|
|
2315
|
-
if (config.
|
|
2316
|
-
this.
|
|
2315
|
+
if (config.eventQueue || process.env["REDIS_URL"]) {
|
|
2316
|
+
this.eventQueueConfig = {
|
|
2317
2317
|
autoConnect: true,
|
|
2318
2318
|
maxReconnectAttempts: -1,
|
|
2319
2319
|
reconnectTimeWait: 2e3,
|
|
2320
|
-
...config.
|
|
2320
|
+
...config.eventQueue
|
|
2321
2321
|
};
|
|
2322
2322
|
}
|
|
2323
2323
|
logger.info("[SDK] Burdenoff SDK initialized", {
|
|
2324
2324
|
workspacesApiUrl: config.workspacesApiUrl,
|
|
2325
2325
|
tenantApiUrl: config.tenantApiUrl,
|
|
2326
2326
|
hasDefaultContext: Object.keys(defaultContext).length > 0,
|
|
2327
|
-
|
|
2327
|
+
hasEventQueueConfig: !!this.eventQueueConfig,
|
|
2328
2328
|
hasTemporalConfig: !!config.temporalModuleType
|
|
2329
2329
|
});
|
|
2330
2330
|
this.scheduleBackgroundInit();
|
|
@@ -2363,14 +2363,14 @@ var BurdenoffSDK = class {
|
|
|
2363
2363
|
return ContextManager.withContext(context, fn);
|
|
2364
2364
|
}
|
|
2365
2365
|
/**
|
|
2366
|
-
* Background initialization for
|
|
2366
|
+
* Background initialization for event queue and other async resources
|
|
2367
2367
|
* @private
|
|
2368
2368
|
*/
|
|
2369
2369
|
async initializeAsync() {
|
|
2370
2370
|
const promises = [];
|
|
2371
|
-
if (this.
|
|
2372
|
-
promises.push(this.
|
|
2373
|
-
logger.warn("[SDK] Failed to auto-connect to
|
|
2371
|
+
if (this.eventQueueConfig?.autoConnect) {
|
|
2372
|
+
promises.push(this.initializeEventQueue().catch((error) => {
|
|
2373
|
+
logger.warn("[SDK] Failed to auto-connect to Redis Streams", {
|
|
2374
2374
|
error
|
|
2375
2375
|
});
|
|
2376
2376
|
}));
|
|
@@ -2378,56 +2378,56 @@ var BurdenoffSDK = class {
|
|
|
2378
2378
|
await Promise.allSettled(promises);
|
|
2379
2379
|
}
|
|
2380
2380
|
/**
|
|
2381
|
-
* Initialize
|
|
2381
|
+
* Initialize the Redis Streams event publisher
|
|
2382
2382
|
* @private
|
|
2383
2383
|
*/
|
|
2384
|
-
async
|
|
2385
|
-
if (!this.
|
|
2386
|
-
const
|
|
2384
|
+
async initializeEventQueue() {
|
|
2385
|
+
if (!this.eventQueueConfig || this.eventPublisher) return;
|
|
2386
|
+
const url = this.eventQueueConfig.url || process.env["REDIS_URL"];
|
|
2387
|
+
if (!url) {
|
|
2388
|
+
logger.warn("[SDK] No REDIS_URL available \u2014 event publisher disabled");
|
|
2389
|
+
return;
|
|
2390
|
+
}
|
|
2387
2391
|
const publisherConfig = {
|
|
2388
|
-
type:
|
|
2389
|
-
url
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
credsFile: this.natsConfig.credsFile,
|
|
2395
|
-
name: this.natsConfig.name || "burdenoff-sdk-publisher",
|
|
2396
|
-
maxReconnectAttempts: this.natsConfig.maxReconnectAttempts ?? -1,
|
|
2397
|
-
reconnectTimeWait: this.natsConfig.reconnectTimeWait ?? 2e3
|
|
2392
|
+
type: QueueType.REDIS_STREAMS,
|
|
2393
|
+
url,
|
|
2394
|
+
password: this.eventQueueConfig.password,
|
|
2395
|
+
name: this.eventQueueConfig.name || "burdenoff-sdk-publisher",
|
|
2396
|
+
maxReconnectAttempts: this.eventQueueConfig.maxReconnectAttempts ?? -1,
|
|
2397
|
+
reconnectTimeWait: this.eventQueueConfig.reconnectTimeWait ?? 2e3
|
|
2398
2398
|
};
|
|
2399
|
-
this.
|
|
2400
|
-
await this.
|
|
2401
|
-
logger.info("[SDK]
|
|
2402
|
-
url
|
|
2403
|
-
name: this.
|
|
2399
|
+
this.eventPublisher = EventQueueFactory.createPublisher(publisherConfig);
|
|
2400
|
+
await this.eventPublisher.connect();
|
|
2401
|
+
logger.info("[SDK] Redis Streams event publisher initialized", {
|
|
2402
|
+
url,
|
|
2403
|
+
name: this.eventQueueConfig.name
|
|
2404
2404
|
});
|
|
2405
2405
|
}
|
|
2406
2406
|
/**
|
|
2407
|
-
* Get
|
|
2407
|
+
* Get the event publisher instance (lazy initialization).
|
|
2408
2408
|
*
|
|
2409
2409
|
* @example
|
|
2410
2410
|
* ```typescript
|
|
2411
|
-
* const publisher = await sdk.
|
|
2411
|
+
* const publisher = await sdk.getEventPublisher();
|
|
2412
2412
|
* await publisher.publish({
|
|
2413
2413
|
* subject: 'events.user.created',
|
|
2414
2414
|
* data: { userId: 'user-123' }
|
|
2415
2415
|
* });
|
|
2416
2416
|
* ```
|
|
2417
2417
|
*/
|
|
2418
|
-
async
|
|
2419
|
-
if (this.
|
|
2420
|
-
if (!this.
|
|
2421
|
-
throw new Error("[SDK]
|
|
2418
|
+
async getEventPublisher() {
|
|
2419
|
+
if (this.eventPublisher) return this.eventPublisher;
|
|
2420
|
+
if (!this.eventQueueConfig) {
|
|
2421
|
+
throw new Error("[SDK] Event queue not configured - set REDIS_URL or provide config.eventQueue");
|
|
2422
2422
|
}
|
|
2423
|
-
if (!this.
|
|
2424
|
-
this.
|
|
2423
|
+
if (!this.eventPublisherInitPromise) {
|
|
2424
|
+
this.eventPublisherInitPromise = this.initializeEventQueue();
|
|
2425
2425
|
}
|
|
2426
|
-
await this.
|
|
2427
|
-
if (!this.
|
|
2428
|
-
throw new Error("[SDK]
|
|
2426
|
+
await this.eventPublisherInitPromise;
|
|
2427
|
+
if (!this.eventPublisher) {
|
|
2428
|
+
throw new Error("[SDK] Event publisher initialization failed");
|
|
2429
2429
|
}
|
|
2430
|
-
return this.
|
|
2430
|
+
return this.eventPublisher;
|
|
2431
2431
|
}
|
|
2432
2432
|
/**
|
|
2433
2433
|
* Wait for SDK initialization to complete
|
|
@@ -2443,46 +2443,46 @@ var BurdenoffSDK = class {
|
|
|
2443
2443
|
}
|
|
2444
2444
|
}
|
|
2445
2445
|
/**
|
|
2446
|
-
* Check
|
|
2446
|
+
* Check event queue (Redis Streams) health status
|
|
2447
2447
|
*
|
|
2448
2448
|
* @example
|
|
2449
2449
|
* ```typescript
|
|
2450
|
-
* const health = await sdk.
|
|
2450
|
+
* const health = await sdk.isEventQueueHealthy();
|
|
2451
2451
|
* if (health.status === 'healthy') {
|
|
2452
|
-
* console.log('
|
|
2452
|
+
* console.log('Event queue is connected');
|
|
2453
2453
|
* }
|
|
2454
2454
|
* ```
|
|
2455
2455
|
*/
|
|
2456
|
-
async
|
|
2457
|
-
if (!this.
|
|
2456
|
+
async isEventQueueHealthy() {
|
|
2457
|
+
if (!this.eventQueueConfig) {
|
|
2458
2458
|
return {
|
|
2459
2459
|
status: "not_configured",
|
|
2460
2460
|
connected: false
|
|
2461
2461
|
};
|
|
2462
2462
|
}
|
|
2463
|
-
if (!this.
|
|
2463
|
+
if (!this.eventPublisher) {
|
|
2464
2464
|
return {
|
|
2465
2465
|
status: "unhealthy",
|
|
2466
2466
|
connected: false,
|
|
2467
|
-
url: this.
|
|
2467
|
+
url: this.eventQueueConfig.url,
|
|
2468
2468
|
details: {
|
|
2469
2469
|
reason: "Not initialized"
|
|
2470
2470
|
}
|
|
2471
2471
|
};
|
|
2472
2472
|
}
|
|
2473
2473
|
try {
|
|
2474
|
-
const healthCheck = await this.
|
|
2474
|
+
const healthCheck = await this.eventPublisher.healthCheck();
|
|
2475
2475
|
return {
|
|
2476
2476
|
status: healthCheck.status,
|
|
2477
|
-
connected: this.
|
|
2478
|
-
url: this.
|
|
2477
|
+
connected: this.eventPublisher.isConnected(),
|
|
2478
|
+
url: this.eventQueueConfig.url,
|
|
2479
2479
|
details: healthCheck.details
|
|
2480
2480
|
};
|
|
2481
2481
|
} catch (error) {
|
|
2482
2482
|
return {
|
|
2483
2483
|
status: "unhealthy",
|
|
2484
2484
|
connected: false,
|
|
2485
|
-
url: this.
|
|
2485
|
+
url: this.eventQueueConfig.url,
|
|
2486
2486
|
details: {
|
|
2487
2487
|
error: error instanceof Error ? error.message : String(error)
|
|
2488
2488
|
}
|
|
@@ -2544,17 +2544,17 @@ var BurdenoffSDK = class {
|
|
|
2544
2544
|
* @example
|
|
2545
2545
|
* ```typescript
|
|
2546
2546
|
* const health = await sdk.getHealthStatus();
|
|
2547
|
-
* console.log('
|
|
2547
|
+
* console.log('Event Queue:', health.eventQueue.status);
|
|
2548
2548
|
* console.log('Temporal:', health.temporal.status);
|
|
2549
2549
|
* ```
|
|
2550
2550
|
*/
|
|
2551
2551
|
async getHealthStatus() {
|
|
2552
|
-
const [
|
|
2553
|
-
this.
|
|
2552
|
+
const [eventQueue, temporal] = await Promise.all([
|
|
2553
|
+
this.isEventQueueHealthy(),
|
|
2554
2554
|
this.isTemporalHealthy()
|
|
2555
2555
|
]);
|
|
2556
2556
|
return {
|
|
2557
|
-
|
|
2557
|
+
eventQueue,
|
|
2558
2558
|
temporal
|
|
2559
2559
|
};
|
|
2560
2560
|
}
|
|
@@ -2580,9 +2580,9 @@ var BurdenoffSDK = class {
|
|
|
2580
2580
|
force
|
|
2581
2581
|
});
|
|
2582
2582
|
const shutdownPromises = [];
|
|
2583
|
-
if (this.
|
|
2584
|
-
shutdownPromises.push(this.
|
|
2585
|
-
logger.error("[SDK] Error disconnecting
|
|
2583
|
+
if (this.eventPublisher) {
|
|
2584
|
+
shutdownPromises.push(this.eventPublisher.disconnect().catch((error) => {
|
|
2585
|
+
logger.error("[SDK] Error disconnecting event publisher", {
|
|
2586
2586
|
error
|
|
2587
2587
|
});
|
|
2588
2588
|
}));
|