@burdenoff/be-sdk 2026.516.1 → 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/EventQueueFactory-6UJ3UIP4.js +6 -0
- package/dist/{EventQueueFactory-DGHBOV7I.js.map → EventQueueFactory-6UJ3UIP4.js.map} +1 -1
- 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-CCV2AVAI.js → chunk-IFES3AQS.js} +3 -3
- package/dist/{chunk-CCV2AVAI.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-N52W3RQA.js → chunk-MVHOP4IG.js} +3 -174
- package/dist/chunk-MVHOP4IG.js.map +1 -0
- package/dist/{chunk-M3PYLAPT.js → chunk-NGA6NTFG.js} +5 -5
- package/dist/{chunk-M3PYLAPT.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-RRFNSBDZ.js +181 -0
- package/dist/chunk-RRFNSBDZ.js.map +1 -0
- package/dist/{chunk-KLYAIEAX.js → chunk-SO57HNXV.js} +14 -30
- package/dist/chunk-SO57HNXV.js.map +1 -0
- package/dist/chunk-TM5RQ6P2.js +925 -0
- package/dist/chunk-TM5RQ6P2.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-U2GLUZAO.js +241 -0
- 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-FSTWNBRX.js → chunk-WCBKW3CL.js} +13 -41
- 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 +4 -6
- 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 +7 -8
- package/dist/{graph-emitter-Bk0FqD53.d.ts → graph-emitter-r5TylDBm.d.ts} +2 -2
- package/dist/graphql/index.d.ts +1 -1
- package/dist/graphql/index.js +2 -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-XY9x2I6b.d.ts → index-BqSh1K8I.d.ts} +4 -23
- package/dist/{index-syMAjErz.d.ts → index-C7T0Xx19.d.ts} +11 -90
- package/dist/{index-CSPbpywb.d.ts → index-Caqvetqq.d.ts} +5 -10
- package/dist/{index-DZO2nvC9.d.ts → index-CygU_fXS.d.ts} +4 -4
- 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-joONjwLt.d.ts +33 -0
- package/dist/index.d.ts +28 -28
- package/dist/index.js +89 -90
- package/dist/index.js.map +1 -1
- package/dist/init/index.d.ts +2 -2
- package/dist/init/index.js +5 -8
- 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 +4 -6
- 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 -6
- package/dist/EventQueueFactory-DGHBOV7I.js +0 -8
- package/dist/chunk-462GJL5K.js +0 -478
- package/dist/chunk-462GJL5K.js.map +0 -1
- package/dist/chunk-7V6GUNGP.js +0 -438
- package/dist/chunk-7V6GUNGP.js.map +0 -1
- package/dist/chunk-FSTWNBRX.js.map +0 -1
- package/dist/chunk-HIWTWIGQ.js.map +0 -1
- package/dist/chunk-KLYAIEAX.js.map +0 -1
- package/dist/chunk-LRGXT37B.js +0 -1966
- package/dist/chunk-LRGXT37B.js.map +0 -1
- package/dist/chunk-N52W3RQA.js.map +0 -1
- package/dist/chunk-NGMEI42S.js.map +0 -1
- package/dist/chunk-RTQIRGVB.js.map +0 -1
- package/dist/chunk-UVYDP6P6.js +0 -13
- package/dist/chunk-UVYDP6P6.js.map +0 -1
- package/dist/config-QVYSAUMT.js +0 -4
- package/dist/config-QVYSAUMT.js.map +0 -1
- package/dist/index-CDFQRL-h.d.ts +0 -66
|
@@ -4,7 +4,7 @@ interface SDKConfig {
|
|
|
4
4
|
timeout?: number;
|
|
5
5
|
retry?: RetryConfig;
|
|
6
6
|
logger?: LoggerConfig;
|
|
7
|
-
|
|
7
|
+
eventQueue?: EventQueueSDKConfig;
|
|
8
8
|
temporalModuleType?: 'workspace' | 'tenant';
|
|
9
9
|
temporalAddress?: string;
|
|
10
10
|
temporalNamespace?: string;
|
|
@@ -37,20 +37,15 @@ interface SDKContext {
|
|
|
37
37
|
productId?: string;
|
|
38
38
|
[key: string]: unknown;
|
|
39
39
|
}
|
|
40
|
-
interface
|
|
40
|
+
interface EventQueueSDKConfig {
|
|
41
41
|
url?: string;
|
|
42
|
-
servers?: string[];
|
|
43
|
-
user?: string;
|
|
44
42
|
password?: string;
|
|
45
|
-
token?: string;
|
|
46
|
-
creds?: string;
|
|
47
|
-
credsFile?: string;
|
|
48
43
|
maxReconnectAttempts?: number;
|
|
49
44
|
reconnectTimeWait?: number;
|
|
50
45
|
name?: string;
|
|
51
46
|
autoConnect?: boolean;
|
|
52
47
|
}
|
|
53
|
-
interface
|
|
48
|
+
interface EventQueueHealthStatus {
|
|
54
49
|
status: 'healthy' | 'unhealthy' | 'not_configured';
|
|
55
50
|
connected: boolean;
|
|
56
51
|
url?: string;
|
|
@@ -64,7 +59,7 @@ interface TemporalHealthStatus {
|
|
|
64
59
|
details?: Record<string, unknown>;
|
|
65
60
|
}
|
|
66
61
|
interface SDKHealthStatus {
|
|
67
|
-
|
|
62
|
+
eventQueue: EventQueueHealthStatus;
|
|
68
63
|
temporal: TemporalHealthStatus;
|
|
69
64
|
}
|
|
70
65
|
interface SDKShutdownOptions {
|
|
@@ -72,4 +67,4 @@ interface SDKShutdownOptions {
|
|
|
72
67
|
force?: boolean;
|
|
73
68
|
}
|
|
74
69
|
|
|
75
|
-
export type {
|
|
70
|
+
export type { EventQueueHealthStatus as E, LoggerConfig as L, SDKContext as S, TemporalHealthStatus as T, SDKConfig as a, SDKHealthStatus as b, SDKShutdownOptions as c, EventQueueSDKConfig as d, LoggerTransport as e };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { B as BurdenoffGraphQLClient } from './graphql-
|
|
2
|
-
import { S as SDKContext } from './index-
|
|
1
|
+
import { B as BurdenoffGraphQLClient } from './graphql-DH3L5Hj7.js';
|
|
2
|
+
import { S as SDKContext } from './index-Caqvetqq.js';
|
|
3
3
|
import { P as PrismaClientBase } from './client-CSjIrYKS.js';
|
|
4
|
-
import {
|
|
4
|
+
import { G as GraphEventEmitterImpl, E as EntityEventRbacMetadata } from './graph-emitter-r5TylDBm.js';
|
|
5
5
|
import { G as GraphEventEmitter, E as EntityEventType, a as GraphMiddlewareConfig, b as addGraphExtension } from './prisma-extension-krXnYnrN.js';
|
|
6
6
|
|
|
7
7
|
type GraphEventType = 'entity.created' | 'entity.updated' | 'entity.deleted' | 'relationship.created' | 'relationship.updated' | 'relationship.deleted';
|
|
@@ -308,7 +308,7 @@ declare function createPrismaGraphIntegration<TPrismaClient extends PrismaClient
|
|
|
308
308
|
};
|
|
309
309
|
prisma: TPrismaClient;
|
|
310
310
|
cleanup: () => Promise<void>;
|
|
311
|
-
getGraphEmitter: () =>
|
|
311
|
+
getGraphEmitter: () => GraphEventEmitterImpl | null;
|
|
312
312
|
isInitialized: () => boolean;
|
|
313
313
|
};
|
|
314
314
|
type PrismaGraphIntegration<TPrismaClient extends PrismaClientBase> = ReturnType<typeof createPrismaGraphIntegration<TPrismaClient>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { B as BurdenoffGraphQLClient } from './graphql-
|
|
2
|
-
import { S as SDKContext } from './index-
|
|
1
|
+
import { B as BurdenoffGraphQLClient } from './graphql-DH3L5Hj7.js';
|
|
2
|
+
import { S as SDKContext } from './index-Caqvetqq.js';
|
|
3
3
|
|
|
4
4
|
declare enum NotificationChannel$1 {
|
|
5
5
|
EMAIL = "EMAIL",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { f as GatewayRequestHeaders, S as ServiceLayer, C as CircuitBreakerConfig, g as GatewayRetryConfig } from './layer-
|
|
1
|
+
import { f as GatewayRequestHeaders, S as ServiceLayer, C as CircuitBreakerConfig, g as GatewayRetryConfig } from './layer-CUu_cZ7d.js';
|
|
2
2
|
import { i as index$1 } from './index-UhkH2eaB.js';
|
|
3
3
|
|
|
4
4
|
interface GatewayClientConfig {
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { DatabaseService, Logger, PrismaTransactionClient, createDatabaseService } from './graphql/services/index.js';
|
|
2
|
+
|
|
3
|
+
interface RedisStreamsEventTarget {
|
|
4
|
+
addEventListener(type: string, listener: (event: Event) => void): void;
|
|
5
|
+
removeEventListener(type: string, listener: (event: Event) => void): void;
|
|
6
|
+
dispatchEvent(event: Event): boolean;
|
|
7
|
+
close(): Promise<void>;
|
|
8
|
+
isHealthy(): boolean;
|
|
9
|
+
}
|
|
10
|
+
interface RedisStreamsEventTargetOptions {
|
|
11
|
+
redisUrl?: string;
|
|
12
|
+
password?: string;
|
|
13
|
+
subjectPrefix?: string;
|
|
14
|
+
maxLen?: number;
|
|
15
|
+
serializer?: {
|
|
16
|
+
stringify: (data: unknown) => string | Promise<string>;
|
|
17
|
+
parse: (msg: string) => unknown | Promise<unknown>;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
declare function createRedisStreamsEventTarget(options?: RedisStreamsEventTargetOptions): Promise<RedisStreamsEventTarget>;
|
|
21
|
+
|
|
22
|
+
declare const index_DatabaseService: typeof DatabaseService;
|
|
23
|
+
declare const index_Logger: typeof Logger;
|
|
24
|
+
declare const index_PrismaTransactionClient: typeof PrismaTransactionClient;
|
|
25
|
+
type index_RedisStreamsEventTarget = RedisStreamsEventTarget;
|
|
26
|
+
type index_RedisStreamsEventTargetOptions = RedisStreamsEventTargetOptions;
|
|
27
|
+
declare const index_createDatabaseService: typeof createDatabaseService;
|
|
28
|
+
declare const index_createRedisStreamsEventTarget: typeof createRedisStreamsEventTarget;
|
|
29
|
+
declare namespace index {
|
|
30
|
+
export { index_DatabaseService as DatabaseService, index_Logger as Logger, index_PrismaTransactionClient as PrismaTransactionClient, type index_RedisStreamsEventTarget as RedisStreamsEventTarget, type index_RedisStreamsEventTargetOptions as RedisStreamsEventTargetOptions, index_createDatabaseService as createDatabaseService, index_createRedisStreamsEventTarget as createRedisStreamsEventTarget };
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export { type RedisStreamsEventTarget as R, type RedisStreamsEventTargetOptions as a, createRedisStreamsEventTarget as c, index as i };
|
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
|
-
export { i as GraphQL } from './index-
|
|
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,44 +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
|
-
|
|
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
|
+
export { graphql_exports as GraphQL } from './chunk-RRFNSBDZ.js';
|
|
22
23
|
import './chunk-QLVKMWFA.js';
|
|
24
|
+
import './chunk-MVHOP4IG.js';
|
|
23
25
|
export { i18n_exports as I18n, createTranslator, getLanguage, getLocale, hasI18n, t } from './chunk-IYE2NTRX.js';
|
|
24
|
-
export { init_exports as Init } from './chunk-
|
|
25
|
-
export { gateway_exports as Gateway } from './chunk-
|
|
26
|
-
import './chunk-
|
|
27
|
-
export { layer_exports as Layer } from './chunk-
|
|
28
|
-
import {
|
|
29
|
-
|
|
30
|
-
import './chunk-N52W3RQA.js';
|
|
31
|
-
import { AuthModule } from './chunk-WBWM7UY7.js';
|
|
32
|
-
export { AuthModule } from './chunk-WBWM7UY7.js';
|
|
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';
|
|
33
32
|
export { utils_exports as Utils } from './chunk-MOCUBSTW.js';
|
|
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
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
export { DEFAULT_CIRCUIT_BREAKER_CONFIG, DEFAULT_GATEWAY_RETRY_CONFIG, DEFAULT_GATEWAY_ROUTING, DEFAULT_LAYER_RESOURCES, DEFAULT_LAYER_STREAMS } from './chunk-NGMEI42S.js';
|
|
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';
|
|
42
41
|
import { logger } from './chunk-CBZNP6RF.js';
|
|
43
42
|
export { logger_exports as Logger } from './chunk-CBZNP6RF.js';
|
|
44
43
|
export { dataloader_exports as DataLoader } from './chunk-NUB5GQTU.js';
|
|
@@ -2199,10 +2198,10 @@ var BurdenoffSDK = class {
|
|
|
2199
2198
|
}
|
|
2200
2199
|
client;
|
|
2201
2200
|
defaultContext;
|
|
2202
|
-
//
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2201
|
+
// Event queue publisher state (Redis Streams)
|
|
2202
|
+
eventPublisher = null;
|
|
2203
|
+
eventPublisherInitPromise = null;
|
|
2204
|
+
eventQueueConfig = null;
|
|
2206
2205
|
// Initialization state
|
|
2207
2206
|
initializationPromise = null;
|
|
2208
2207
|
isShuttingDown = false;
|
|
@@ -2313,19 +2312,19 @@ var BurdenoffSDK = class {
|
|
|
2313
2312
|
taskQueue: config.temporalTaskQueue
|
|
2314
2313
|
};
|
|
2315
2314
|
}
|
|
2316
|
-
if (config.
|
|
2317
|
-
this.
|
|
2315
|
+
if (config.eventQueue || process.env["REDIS_URL"]) {
|
|
2316
|
+
this.eventQueueConfig = {
|
|
2318
2317
|
autoConnect: true,
|
|
2319
2318
|
maxReconnectAttempts: -1,
|
|
2320
2319
|
reconnectTimeWait: 2e3,
|
|
2321
|
-
...config.
|
|
2320
|
+
...config.eventQueue
|
|
2322
2321
|
};
|
|
2323
2322
|
}
|
|
2324
2323
|
logger.info("[SDK] Burdenoff SDK initialized", {
|
|
2325
2324
|
workspacesApiUrl: config.workspacesApiUrl,
|
|
2326
2325
|
tenantApiUrl: config.tenantApiUrl,
|
|
2327
2326
|
hasDefaultContext: Object.keys(defaultContext).length > 0,
|
|
2328
|
-
|
|
2327
|
+
hasEventQueueConfig: !!this.eventQueueConfig,
|
|
2329
2328
|
hasTemporalConfig: !!config.temporalModuleType
|
|
2330
2329
|
});
|
|
2331
2330
|
this.scheduleBackgroundInit();
|
|
@@ -2364,14 +2363,14 @@ var BurdenoffSDK = class {
|
|
|
2364
2363
|
return ContextManager.withContext(context, fn);
|
|
2365
2364
|
}
|
|
2366
2365
|
/**
|
|
2367
|
-
* Background initialization for
|
|
2366
|
+
* Background initialization for event queue and other async resources
|
|
2368
2367
|
* @private
|
|
2369
2368
|
*/
|
|
2370
2369
|
async initializeAsync() {
|
|
2371
2370
|
const promises = [];
|
|
2372
|
-
if (this.
|
|
2373
|
-
promises.push(this.
|
|
2374
|
-
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", {
|
|
2375
2374
|
error
|
|
2376
2375
|
});
|
|
2377
2376
|
}));
|
|
@@ -2379,56 +2378,56 @@ var BurdenoffSDK = class {
|
|
|
2379
2378
|
await Promise.allSettled(promises);
|
|
2380
2379
|
}
|
|
2381
2380
|
/**
|
|
2382
|
-
* Initialize
|
|
2381
|
+
* Initialize the Redis Streams event publisher
|
|
2383
2382
|
* @private
|
|
2384
2383
|
*/
|
|
2385
|
-
async
|
|
2386
|
-
if (!this.
|
|
2387
|
-
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
|
+
}
|
|
2388
2391
|
const publisherConfig = {
|
|
2389
|
-
type:
|
|
2390
|
-
url
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
credsFile: this.natsConfig.credsFile,
|
|
2396
|
-
name: this.natsConfig.name || "burdenoff-sdk-publisher",
|
|
2397
|
-
maxReconnectAttempts: this.natsConfig.maxReconnectAttempts ?? -1,
|
|
2398
|
-
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
|
|
2399
2398
|
};
|
|
2400
|
-
this.
|
|
2401
|
-
await this.
|
|
2402
|
-
logger.info("[SDK]
|
|
2403
|
-
url
|
|
2404
|
-
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
|
|
2405
2404
|
});
|
|
2406
2405
|
}
|
|
2407
2406
|
/**
|
|
2408
|
-
* Get
|
|
2407
|
+
* Get the event publisher instance (lazy initialization).
|
|
2409
2408
|
*
|
|
2410
2409
|
* @example
|
|
2411
2410
|
* ```typescript
|
|
2412
|
-
* const publisher = await sdk.
|
|
2411
|
+
* const publisher = await sdk.getEventPublisher();
|
|
2413
2412
|
* await publisher.publish({
|
|
2414
2413
|
* subject: 'events.user.created',
|
|
2415
2414
|
* data: { userId: 'user-123' }
|
|
2416
2415
|
* });
|
|
2417
2416
|
* ```
|
|
2418
2417
|
*/
|
|
2419
|
-
async
|
|
2420
|
-
if (this.
|
|
2421
|
-
if (!this.
|
|
2422
|
-
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");
|
|
2423
2422
|
}
|
|
2424
|
-
if (!this.
|
|
2425
|
-
this.
|
|
2423
|
+
if (!this.eventPublisherInitPromise) {
|
|
2424
|
+
this.eventPublisherInitPromise = this.initializeEventQueue();
|
|
2426
2425
|
}
|
|
2427
|
-
await this.
|
|
2428
|
-
if (!this.
|
|
2429
|
-
throw new Error("[SDK]
|
|
2426
|
+
await this.eventPublisherInitPromise;
|
|
2427
|
+
if (!this.eventPublisher) {
|
|
2428
|
+
throw new Error("[SDK] Event publisher initialization failed");
|
|
2430
2429
|
}
|
|
2431
|
-
return this.
|
|
2430
|
+
return this.eventPublisher;
|
|
2432
2431
|
}
|
|
2433
2432
|
/**
|
|
2434
2433
|
* Wait for SDK initialization to complete
|
|
@@ -2444,46 +2443,46 @@ var BurdenoffSDK = class {
|
|
|
2444
2443
|
}
|
|
2445
2444
|
}
|
|
2446
2445
|
/**
|
|
2447
|
-
* Check
|
|
2446
|
+
* Check event queue (Redis Streams) health status
|
|
2448
2447
|
*
|
|
2449
2448
|
* @example
|
|
2450
2449
|
* ```typescript
|
|
2451
|
-
* const health = await sdk.
|
|
2450
|
+
* const health = await sdk.isEventQueueHealthy();
|
|
2452
2451
|
* if (health.status === 'healthy') {
|
|
2453
|
-
* console.log('
|
|
2452
|
+
* console.log('Event queue is connected');
|
|
2454
2453
|
* }
|
|
2455
2454
|
* ```
|
|
2456
2455
|
*/
|
|
2457
|
-
async
|
|
2458
|
-
if (!this.
|
|
2456
|
+
async isEventQueueHealthy() {
|
|
2457
|
+
if (!this.eventQueueConfig) {
|
|
2459
2458
|
return {
|
|
2460
2459
|
status: "not_configured",
|
|
2461
2460
|
connected: false
|
|
2462
2461
|
};
|
|
2463
2462
|
}
|
|
2464
|
-
if (!this.
|
|
2463
|
+
if (!this.eventPublisher) {
|
|
2465
2464
|
return {
|
|
2466
2465
|
status: "unhealthy",
|
|
2467
2466
|
connected: false,
|
|
2468
|
-
url: this.
|
|
2467
|
+
url: this.eventQueueConfig.url,
|
|
2469
2468
|
details: {
|
|
2470
2469
|
reason: "Not initialized"
|
|
2471
2470
|
}
|
|
2472
2471
|
};
|
|
2473
2472
|
}
|
|
2474
2473
|
try {
|
|
2475
|
-
const healthCheck = await this.
|
|
2474
|
+
const healthCheck = await this.eventPublisher.healthCheck();
|
|
2476
2475
|
return {
|
|
2477
2476
|
status: healthCheck.status,
|
|
2478
|
-
connected: this.
|
|
2479
|
-
url: this.
|
|
2477
|
+
connected: this.eventPublisher.isConnected(),
|
|
2478
|
+
url: this.eventQueueConfig.url,
|
|
2480
2479
|
details: healthCheck.details
|
|
2481
2480
|
};
|
|
2482
2481
|
} catch (error) {
|
|
2483
2482
|
return {
|
|
2484
2483
|
status: "unhealthy",
|
|
2485
2484
|
connected: false,
|
|
2486
|
-
url: this.
|
|
2485
|
+
url: this.eventQueueConfig.url,
|
|
2487
2486
|
details: {
|
|
2488
2487
|
error: error instanceof Error ? error.message : String(error)
|
|
2489
2488
|
}
|
|
@@ -2545,17 +2544,17 @@ var BurdenoffSDK = class {
|
|
|
2545
2544
|
* @example
|
|
2546
2545
|
* ```typescript
|
|
2547
2546
|
* const health = await sdk.getHealthStatus();
|
|
2548
|
-
* console.log('
|
|
2547
|
+
* console.log('Event Queue:', health.eventQueue.status);
|
|
2549
2548
|
* console.log('Temporal:', health.temporal.status);
|
|
2550
2549
|
* ```
|
|
2551
2550
|
*/
|
|
2552
2551
|
async getHealthStatus() {
|
|
2553
|
-
const [
|
|
2554
|
-
this.
|
|
2552
|
+
const [eventQueue, temporal] = await Promise.all([
|
|
2553
|
+
this.isEventQueueHealthy(),
|
|
2555
2554
|
this.isTemporalHealthy()
|
|
2556
2555
|
]);
|
|
2557
2556
|
return {
|
|
2558
|
-
|
|
2557
|
+
eventQueue,
|
|
2559
2558
|
temporal
|
|
2560
2559
|
};
|
|
2561
2560
|
}
|
|
@@ -2581,9 +2580,9 @@ var BurdenoffSDK = class {
|
|
|
2581
2580
|
force
|
|
2582
2581
|
});
|
|
2583
2582
|
const shutdownPromises = [];
|
|
2584
|
-
if (this.
|
|
2585
|
-
shutdownPromises.push(this.
|
|
2586
|
-
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", {
|
|
2587
2586
|
error
|
|
2588
2587
|
});
|
|
2589
2588
|
}));
|