@burdenoff/be-sdk 2026.1110.3 → 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.
Files changed (108) hide show
  1. package/dist/activity/index.d.ts +165 -0
  2. package/dist/activity/index.js +389 -0
  3. package/dist/activity/index.js.map +1 -0
  4. package/dist/ai-credits/index.js +1 -1
  5. package/dist/{ai-credits-Ca-NNcVx.js → ai-credits-xxfwGpHS.js} +2 -2
  6. package/dist/{ai-credits-Ca-NNcVx.js.map → ai-credits-xxfwGpHS.js.map} +1 -1
  7. package/dist/auth/index.d.ts +1 -1
  8. package/dist/auth/index.js +1 -1
  9. package/dist/{auth-CEuBEBQN.js → auth-C5ctwSLp.js} +2 -2
  10. package/dist/{auth-CEuBEBQN.js.map → auth-C5ctwSLp.js.map} +1 -1
  11. package/dist/bootstrap/index.d.ts +74 -0
  12. package/dist/bootstrap/index.js +282 -0
  13. package/dist/bootstrap/index.js.map +1 -0
  14. package/dist/{client-DcZ3iGES.js → client-sAJTrb4i.js} +2 -2
  15. package/dist/{client-DcZ3iGES.js.map → client-sAJTrb4i.js.map} +1 -1
  16. package/dist/context/index.d.ts +35 -0
  17. package/dist/{context-CZnXf2yb.js → context/index.js} +38 -2
  18. package/dist/context/index.js.map +1 -0
  19. package/dist/database/index.js +1 -1
  20. package/dist/event-queue/index.d.ts +1 -1
  21. package/dist/explicit-activity-scope-DikJ7NAE.js +57 -0
  22. package/dist/explicit-activity-scope-DikJ7NAE.js.map +1 -0
  23. package/dist/export/index.js +1 -1
  24. package/dist/{export-B6fphx8a.js → export-DJXE3Osa.js} +3 -3
  25. package/dist/{export-B6fphx8a.js.map → export-DJXE3Osa.js.map} +1 -1
  26. package/dist/feature-flags/index.js +1 -1
  27. package/dist/{feature-flags-71oDkrUe.js → feature-flags-CP1KRgwD.js} +2 -2
  28. package/dist/{feature-flags-71oDkrUe.js.map → feature-flags-CP1KRgwD.js.map} +1 -1
  29. package/dist/files/index.js +1 -1
  30. package/dist/{files-DjH0099H.js → files-h5U-D2AF.js} +2 -2
  31. package/dist/{files-DjH0099H.js.map → files-h5U-D2AF.js.map} +1 -1
  32. package/dist/gateway/index.js +2 -2
  33. package/dist/{gateway-DBFmxWks.js → gateway-ByVo-n37.js} +2 -2
  34. package/dist/{gateway-DBFmxWks.js.map → gateway-ByVo-n37.js.map} +1 -1
  35. package/dist/graph/index.d.ts +1 -1
  36. package/dist/graph/index.js +1 -1
  37. package/dist/{graph-DDYgIryR.js → graph-CR7u4lpl.js} +2 -2
  38. package/dist/{graph-DDYgIryR.js.map → graph-CR7u4lpl.js.map} +1 -1
  39. package/dist/{graphql-DNkMkGBZ.d.ts → graphql-CUDyhibV.d.ts} +1 -1
  40. package/dist/{index-bZKZUvBu.d.ts → index-ADmsX0BI.d.ts} +3 -3
  41. package/dist/{index-BqYfCQSP.d.ts → index-B2LCaK0R.d.ts} +1 -1
  42. package/dist/{index-D6UeLAye.d.ts → index-CHwMhK6v.d.ts} +2 -2
  43. package/dist/{index-BQDsNAMR.d.ts → index-CTTwo9av.d.ts} +22 -1
  44. package/dist/{index-DZC-2o9R.d.ts → index-CVCyKzhB.d.ts} +2 -2
  45. package/dist/{index-CkT2aUr3.d.ts → index-C_GXXF32.d.ts} +2 -2
  46. package/dist/{index-BKwHQtHQ.d.ts → index-Cot73bdh.d.ts} +1 -1
  47. package/dist/{index-CnzbJZP7.d.ts → index-FRRaa6h2.d.ts} +2 -2
  48. package/dist/{index-N-huORcj.d.ts → index-U_tu3zUl.d.ts} +2 -2
  49. package/dist/index-cmR9k9ga.d.ts +26 -0
  50. package/dist/{index-CZTnQIRU.d.ts → index-zd_NPGJo.d.ts} +6 -141
  51. package/dist/index.d.ts +19 -479
  52. package/dist/index.js +22 -1492
  53. package/dist/index.js.map +1 -1
  54. package/dist/init/index.js +1 -1
  55. package/dist/{init-Dy3KhT6Y.js → init-CQPFmOOe.js} +3 -3
  56. package/dist/{init-Dy3KhT6Y.js.map → init-CQPFmOOe.js.map} +1 -1
  57. package/dist/instrumentation/index.d.ts +2 -2
  58. package/dist/logger/index.d.ts +1 -1
  59. package/dist/notifications/index.d.ts +1 -1
  60. package/dist/notifications/index.js +1 -1
  61. package/dist/{notifications-CdETrtFK.js → notifications-DY_i37WN.js} +2 -2
  62. package/dist/{notifications-CdETrtFK.js.map → notifications-DY_i37WN.js.map} +1 -1
  63. package/dist/payments/index.d.ts +144 -0
  64. package/dist/payments/index.js +404 -0
  65. package/dist/payments/index.js.map +1 -0
  66. package/dist/rate-limit-CBrK_U5H.js +142 -0
  67. package/dist/rate-limit-CBrK_U5H.js.map +1 -0
  68. package/dist/rbac/index.d.ts +1 -1
  69. package/dist/rbac/index.js +1 -1
  70. package/dist/{rbac-BB9l9Xph.js → rbac-Dvz0YzEt.js} +2 -2
  71. package/dist/{rbac-BB9l9Xph.js.map → rbac-Dvz0YzEt.js.map} +1 -1
  72. package/dist/resource-caps/index.d.ts +1 -1
  73. package/dist/search/index.d.ts +112 -0
  74. package/dist/search/index.js +266 -0
  75. package/dist/search/index.js.map +1 -0
  76. package/dist/security/index.d.ts +2 -0
  77. package/dist/security/index.js +4 -0
  78. package/dist/security/index.js.map +1 -0
  79. package/dist/security/rate-limit/index.d.ts +2 -0
  80. package/dist/security/rate-limit/index.js +4 -0
  81. package/dist/security/rate-limit/index.js.map +1 -0
  82. package/dist/server/index.js +3 -2
  83. package/dist/server/index.js.map +1 -1
  84. package/dist/{stub-BqwKn4eh.js → stub-BUnfMiAS.js} +3 -56
  85. package/dist/stub-BUnfMiAS.js.map +1 -0
  86. package/dist/tags/index.js +1 -1
  87. package/dist/{tags-B5xpbgsk.js → tags-CbijgoqR.js} +2 -2
  88. package/dist/{tags-B5xpbgsk.js.map → tags-CbijgoqR.js.map} +1 -1
  89. package/dist/telemetry/index.d.ts +2 -2
  90. package/dist/tracker/index.d.ts +2 -2
  91. package/dist/tracker/index.js +5 -3
  92. package/dist/{tracker-BQVoEFUo.js → tracker-PQztSlhJ.js} +9 -390
  93. package/dist/tracker-PQztSlhJ.js.map +1 -0
  94. package/dist/translation/index.d.ts +120 -0
  95. package/dist/translation/index.js +573 -0
  96. package/dist/translation/index.js.map +1 -0
  97. package/dist/types/index.d.ts +3 -0
  98. package/dist/{types-Cj2RWXbz.js → types/index.js} +3 -3
  99. package/dist/types/index.js.map +1 -0
  100. package/dist/usage/index.d.ts +1 -1
  101. package/dist/usage/index.js +1 -1
  102. package/dist/{usage-BKFZiWQn.js → usage-BRqVP3CJ.js} +4 -4
  103. package/dist/{usage-BKFZiWQn.js.map → usage-BRqVP3CJ.js.map} +1 -1
  104. package/package.json +1 -1
  105. package/dist/context-CZnXf2yb.js.map +0 -1
  106. package/dist/stub-BqwKn4eh.js.map +0 -1
  107. package/dist/tracker-BQVoEFUo.js.map +0 -1
  108. package/dist/types-Cj2RWXbz.js.map +0 -1
package/dist/index.d.ts CHANGED
@@ -1,16 +1,22 @@
1
1
  import { a as DEFAULT_LAYER_RESOURCES, c as GatewayRetryConfig, d as LayerFullConfig, f as LayerGatewayConfig, i as DEFAULT_GATEWAY_ROUTING, l as GatewayRoutingConfig, m as ServiceLayer, n as DEFAULT_CIRCUIT_BREAKER_CONFIG, o as DEFAULT_LAYER_STREAMS, p as LayerResourceUrls, r as DEFAULT_GATEWAY_RETRY_CONFIG, s as GatewayRequestHeaders, t as CircuitBreakerConfig, u as LayerConfig } from "./layer-BZBZZWeV.js";
2
- import { a as SDKConfig, c as SDKHealthStatus, i as LoggerTransport, l as SDKShutdownOptions, n as EventQueueSDKConfig, o as SDKContext, r as LoggerConfig, t as EventQueueHealthStatus, u as TemporalHealthStatus } from "./index-BQDsNAMR.js";
3
- import { c as index_d_exports$17, r as Logger } from "./index-BKwHQtHQ.js";
4
- import { t as AuthModule } from "./index-D6UeLAye.js";
5
- import { _ as TenantNotificationsModule, o as NotificationsModule, v as tenant_notifications_d_exports } from "./index-N-huORcj.js";
6
- import { f as RBACDirectiveConfig, h as createRBACDirectiveFromEnv, m as createRBACDirectiveForLayer, o as RBACModule, p as createRBACDirective, u as LayerAwareRBACConfig } from "./index-CkT2aUr3.js";
7
- import { C as Activity, D as GetActivitiesOptions, E as ActivityOperationUnsupportedError, O as LogActivityOptions, T as ActivityModule, r as TrackerModule, w as ActivityActorType } from "./index-CZTnQIRU.js";
8
- import { C as OrgBillingUsageOperationInput, S as BillingUsageOperationInput, T as WorkspaceBillingUsageOperationInput, b as BillingUsageClient, m as UsageModule, w as QuotaLimit, x as BillingUsageClientConfig } from "./index-DZC-2o9R.js";
9
- import { DatabaseConfig, DatabaseModule } from "./database/index.js";
10
- import { Zt as IEventPublisher, t as index_d_exports$5, yt as EventsModule } from "./index-CnzbJZP7.js";
11
- import { i as GraphModule, u as index_d_exports$10 } from "./index-bZKZUvBu.js";
12
- import { t as BurdenoffGraphQLClient } from "./graphql-DNkMkGBZ.js";
2
+ import { _ as TemporalHealthStatus, a as EventQueueSDKConfig, f as SDKConfig, g as SDKShutdownOptions, h as SDKHealthStatus, i as EventQueueHealthStatus, o as LoggerConfig, p as SDKContext, s as LoggerTransport } from "./index-CTTwo9av.js";
3
+ import { c as index_d_exports$17, r as Logger } from "./index-Cot73bdh.js";
4
+ import { ContextManager } from "./context/index.js";
5
+ import { t as AuthModule } from "./index-CHwMhK6v.js";
6
+ import { _ as TenantNotificationsModule, o as NotificationsModule, v as tenant_notifications_d_exports } from "./index-U_tu3zUl.js";
7
+ import { f as RBACDirectiveConfig, h as createRBACDirectiveFromEnv, m as createRBACDirectiveForLayer, o as RBACModule, p as createRBACDirective, u as LayerAwareRBACConfig } from "./index-C_GXXF32.js";
8
+ import { Activity, ActivityActorType, ActivityModule, ActivityOperationUnsupportedError, GetActivitiesOptions, LogActivityOptions } from "./activity/index.js";
9
+ import { C as OrgBillingUsageOperationInput, S as BillingUsageOperationInput, T as WorkspaceBillingUsageOperationInput, b as BillingUsageClient, m as UsageModule, w as QuotaLimit, x as BillingUsageClientConfig } from "./index-CVCyKzhB.js";
10
+ import { r as TrackerModule } from "./index-zd_NPGJo.js";
11
+ import { DatabaseModule } from "./database/index.js";
12
+ import { Zt as IEventPublisher, t as index_d_exports$5, yt as EventsModule } from "./index-FRRaa6h2.js";
13
+ import { i as GraphModule, u as index_d_exports$10 } from "./index-ADmsX0BI.js";
14
+ import { SearchModule } from "./search/index.js";
15
+ import { ExportProductTranslationsOptions, ProductTranslationTree, ProductTranslationsExportResult, TranslationExportFormat, TranslationModule, UpsertProductTranslationsOptions, UpsertProductTranslationsResult } from "./translation/index.js";
16
+ import { PaymentsModule } from "./payments/index.js";
17
+ import { BootstrapModule, createBootstrap } from "./bootstrap/index.js";
13
18
  import { a as TemporalWorkerManager, c as TemporalClientFactory, i as TemporalWorkerFactory, l as WorkflowStartOptions, n as TemporalWorker, o as TemporalClient, r as TemporalWorkerConfig, s as TemporalClientConfig, t as TemporalModule } from "./index-CaM9JUcc.js";
19
+ import { t as BurdenoffGraphQLClient } from "./graphql-CUDyhibV.js";
14
20
  import { createInternalClient, createInternalClientForTenant, createInternalClientForWorkspaces } from "./client/internal-client.js";
15
21
  import { a as registerDisposable, i as getRegisteredDisposableCount, n as ShutdownDisposable, o as unregisterDisposable, r as disposeAll, t as index_d_exports$16 } from "./index-Dt1HJPTX.js";
16
22
  import { BillingPlanTransport, PlanTier, RESOURCE_CAP_DEFAULTS, ResourceCap, ResourceCapDefaults, ResourceCapExceededError, ResourceCapsConfig, ResourceCapsModule, ResourceName, WorkspaceResourceCapScope, configureResourceCaps, getResourceCaps } from "./resource-caps/index.js";
@@ -28,7 +34,7 @@ import { C as getLocale, S as getLanguage, T as t, b as Translator, r as index_d
28
34
  import { t as index_d_exports$6 } from "./index-BeVtqGO-.js";
29
35
  import { n as index_d_exports$13 } from "./index-DqbGqfAy.js";
30
36
  import { p as index_d_exports$4 } from "./index-DGgh9DWn.js";
31
- import { a as index_d_exports$14 } from "./index-BqYfCQSP.js";
37
+ import { a as index_d_exports$14 } from "./index-B2LCaK0R.js";
32
38
  import { a as index_d_exports$15 } from "./index-CDOqxSIi.js";
33
39
  import { t as index_d_exports$3 } from "./index-BVOL7458.js";
34
40
  import { t as index_d_exports$9 } from "./index-YOShAwkq.js";
@@ -37,472 +43,6 @@ import { a as index_d_exports$2, c as verifyCaptchaIfEnabled, n as RecaptchaVeri
37
43
  import { t as index_d_exports$20 } from "./index-DY3dNhMN.js";
38
44
  import { B as validateUsername, D as assertRbacCoverage, E as analyzeRbacCoverage, F as validateUserFields, G as lengthInCodePoints, H as NAME_MIN_LENGTH, I as USERNAME_MAX_LENGTH, K as validateName, L as USERNAME_MIN_LENGTH, M as UserFieldKey, N as UserFieldsValidationResult, P as ValidatedUserFields, R as UsernameErrorCode, U as NameErrorCode, V as NAME_MAX_LENGTH, W as NameValidationResult, _ as RbacCoverageError, b as RbacCoverageSource, j as UserFieldError, t as index_d_exports$26, v as RbacCoverageOptions, y as RbacCoverageReport, z as UsernameValidationResult } from "./index-CIgoeobA.js";
39
45
  import { A as normalizeTemplateKey, C as isSameTemplateKey, D as normalizeProductSlug, E as normalizeGraphQLName, F as templateKeyVariants, I as toCurrentName, L as toLegacyName, M as quotaKeyVariants, N as rbacResourceVariants, O as normalizeQuotaKey, P as readRenamedEnv, S as isSameRbacResource, T as normalizeBillingId, _ as isSameBillingId, a as ProductRename, b as isSameProductSlug, c as billingIdVariants, d as emitProductSlug, f as emitQuotaKey, g as isLegacyName, h as index_d_exports$22, i as PRODUCT_SLUG_ALIASES, j as productSlugVariants, k as normalizeRbacResource, l as emitBillingId, m as emitTemplateKey, n as PRODUCT_RENAMES, o as RENAME_CONCERNS, p as emitRbacResource, r as PRODUCT_RENAME_EMIT, s as RenameConcern, t as EmitGeneration, u as emitName, v as isSameGraphQLName, w as nameVariants, x as isSameQuotaKey, y as isSameName } from "./index-BBqooJ52.js";
40
- export declare class ContextManager {
41
- static getContext(): SDKContext | undefined;
42
- static setContext(context: SDKContext): void;
43
- static setCfAccessContext(clientId?: string, clientSecret?: string, cfAuthorization?: string): void;
44
- static withContext<T>(context: SDKContext, fn: () => Promise<T>): Promise<T>;
45
- static withContextSync<T>(context: SDKContext, fn: () => T): T;
46
- static clearContext(): void;
47
- static getActorId(): string | undefined;
48
- static getUser(): string | undefined;
49
- static getWorkspace(): string | undefined;
50
- static getTenant(): string | undefined;
51
- static getOrganization(): string | undefined;
52
- static getProject(): string | undefined;
53
- static getApp(): string | undefined;
54
- static getToken(): string | undefined;
55
- static getProduct(): string | undefined;
56
- static getCfAccessClientId(): string | undefined;
57
- static getCfAccessClientSecret(): string | undefined;
58
- static getCfAuthorization(): string | undefined;
59
- static getCfAccessHeaders(): Record<string, string>;
60
- static updateContext(updates: Partial<SDKContext>): void;
61
- static hasContext(): boolean;
62
- static getCustomField(key: string): unknown;
63
- static setCustomField(key: string, value: unknown): void;
64
- }
65
- interface SearchOptions {
66
- query: string;
67
- resourceTypes?: string[];
68
- workspaceId?: string;
69
- organizationId?: string;
70
- projectId?: string;
71
- fields?: string[];
72
- fuzziness?: number;
73
- boosts?: Record<string, number>;
74
- filters?: SearchFilter[];
75
- sort?: SearchSort[];
76
- limit?: number;
77
- offset?: number;
78
- highlight?: boolean;
79
- }
80
- interface SearchFilter {
81
- field: string;
82
- operator: 'eq' | 'ne' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'range';
83
- value: unknown;
84
- }
85
- interface SearchSort {
86
- field: string;
87
- order: 'asc' | 'desc';
88
- }
89
- interface SearchResult {
90
- id: string;
91
- type: string;
92
- title: string;
93
- description?: string;
94
- data: Record<string, unknown>;
95
- workspaceId?: string;
96
- organizationId?: string;
97
- projectId?: string;
98
- score: number;
99
- highlights?: Record<string, string[]>;
100
- createdAt: string;
101
- updatedAt: string;
102
- }
103
- interface SearchResponse {
104
- results: SearchResult[];
105
- total: number;
106
- took: number;
107
- aggregations?: Record<string, SearchAggregation>;
108
- }
109
- interface SearchAggregation {
110
- buckets: Array<{
111
- key: string;
112
- count: number;
113
- }>;
114
- }
115
- interface IndexDocumentOptions {
116
- id: string;
117
- type: string;
118
- title: string;
119
- description?: string;
120
- content?: string;
121
- data: Record<string, unknown>;
122
- workspaceId?: string;
123
- organizationId?: string;
124
- projectId?: string;
125
- tags?: string[];
126
- metadata?: Record<string, unknown>;
127
- }
128
- export declare class SearchModule {
129
- private client;
130
- private context;
131
- constructor(client: BurdenoffGraphQLClient, context: SDKContext);
132
- search(options: SearchOptions): Promise<SearchResponse>;
133
- indexDocument(options: IndexDocumentOptions): Promise<{
134
- id: string;
135
- indexed: boolean;
136
- }>;
137
- removeDocument(id: string, type: string): Promise<boolean>;
138
- updateDocument(id: string, type: string, updates: Partial<IndexDocumentOptions>): Promise<{
139
- id: string;
140
- updated: boolean;
141
- }>;
142
- indexDocumentsBulk(documents: IndexDocumentOptions[]): Promise<{
143
- indexed: number;
144
- failed: number;
145
- errors: string[];
146
- }>;
147
- suggest(prefix: string, options?: {
148
- resourceTypes?: string[];
149
- limit?: number;
150
- }): Promise<Array<{
151
- text: string;
152
- score: number;
153
- type?: string;
154
- }>>;
155
- getRelated(documentId: string, options?: {
156
- limit?: number;
157
- minScore?: number;
158
- }): Promise<SearchResult[]>;
159
- aggregate(query: string, aggregations: Array<{
160
- field: string;
161
- type: 'terms' | 'date_histogram' | 'range';
162
- size?: number;
163
- }>): Promise<Record<string, SearchAggregation>>;
164
- clearIndex(workspaceId?: string): Promise<{
165
- deletedCount: number;
166
- }>;
167
- reindex(options?: {
168
- workspaceId?: string;
169
- resourceTypes?: string[];
170
- }): Promise<{
171
- indexed: number;
172
- failed: number;
173
- }>;
174
- }
175
- type SupportedLanguage = 'en' | 'es' | 'fr' | 'de' | 'it' | 'pt' | 'ru' | 'zh' | 'ja' | 'ko' | 'ar' | 'hi' | 'bn' | 'ta' | 'te' | 'ml';
176
- interface TranslationOptions {
177
- text: string;
178
- sourceLanguage?: SupportedLanguage;
179
- targetLanguage: SupportedLanguage;
180
- context?: string;
181
- variables?: Record<string, string | number>;
182
- }
183
- interface Translation {
184
- original: string;
185
- translated: string;
186
- sourceLanguage: string;
187
- targetLanguage: string;
188
- confidence?: number;
189
- }
190
- interface GetTranslationsOptions {
191
- keys: string[];
192
- language: SupportedLanguage;
193
- namespace?: string;
194
- fallbackLanguage?: SupportedLanguage;
195
- }
196
- interface TranslationKey {
197
- key: string;
198
- value: string;
199
- language: SupportedLanguage;
200
- namespace?: string;
201
- description?: string;
202
- variables?: string[];
203
- }
204
- interface SetTranslationOptions {
205
- key: string;
206
- value: string;
207
- language: SupportedLanguage;
208
- namespace?: string;
209
- description?: string;
210
- variables?: string[];
211
- }
212
- type TranslationExportFormat = 'JSON' | 'CSV' | 'XLSX' | 'PO' | 'XLIFF';
213
- interface ProductTranslationTree {
214
- [key: string]: string | ProductTranslationTree;
215
- }
216
- interface ExportProductTranslationsOptions {
217
- productId?: string;
218
- productName?: string;
219
- languageCode?: string;
220
- format?: TranslationExportFormat;
221
- decodeJson?: boolean;
222
- }
223
- interface ProductTranslationsExportResult {
224
- format: TranslationExportFormat;
225
- url: string;
226
- translations?: Record<string, unknown>;
227
- }
228
- interface UpsertProductTranslationsOptions {
229
- productId?: string;
230
- productName?: string;
231
- languageCode: string;
232
- translations: Record<string, string> | ProductTranslationTree;
233
- defaultValues?: Record<string, string> | ProductTranslationTree;
234
- updateExisting?: boolean;
235
- publish?: boolean;
236
- }
237
- interface UpsertProductTranslationsResult {
238
- productId: string;
239
- languageCode: string;
240
- keysProcessed: number;
241
- createdKeys: number;
242
- updatedKeyDefaults: number;
243
- createdTranslations: number;
244
- updatedTranslations: number;
245
- }
246
- export declare class TranslationModule {
247
- private client;
248
- private context;
249
- constructor(client: BurdenoffGraphQLClient, context: SDKContext);
250
- translate(options: TranslationOptions): Promise<Translation>;
251
- getTranslations(options: GetTranslationsOptions): Promise<Record<string, string>>;
252
- get(key: string, language: SupportedLanguage, variables?: Record<string, string | number>): Promise<string>;
253
- setTranslation(options: SetTranslationOptions): Promise<TranslationKey>;
254
- deleteTranslation(key: string, language: SupportedLanguage, namespace?: string): Promise<boolean>;
255
- setTranslationsBatch(translations: SetTranslationOptions[]): Promise<TranslationKey[]>;
256
- getAllTranslations(language: SupportedLanguage, namespace?: string): Promise<TranslationKey[]>;
257
- detectLanguage(text: string): Promise<{
258
- language: SupportedLanguage;
259
- confidence: number;
260
- }>;
261
- getSupportedLanguages(): Promise<Array<{
262
- code: SupportedLanguage;
263
- name: string;
264
- nativeName: string;
265
- }>>;
266
- importTranslations(language: SupportedLanguage, translations: Record<string, string>, namespace?: string): Promise<{
267
- imported: number;
268
- failed: number;
269
- }>;
270
- exportTranslations(language: SupportedLanguage, namespace?: string): Promise<Record<string, string>>;
271
- exportProductTranslations(options: ExportProductTranslationsOptions): Promise<ProductTranslationsExportResult>;
272
- upsertProductTranslations(options: UpsertProductTranslationsOptions): Promise<UpsertProductTranslationsResult>;
273
- private flattenTranslationTree;
274
- private decodeDataUrlJson;
275
- private resolveProductId;
276
- private findTranslationKeyByKey;
277
- private createTranslationKey;
278
- private updateTranslationKeyDefaultValue;
279
- private findGlobalTranslation;
280
- private createLanguageTranslation;
281
- private updateLanguageTranslation;
282
- private escapeRegex;
283
- private interpolate;
284
- formatPlural(_language: SupportedLanguage, count: number, translations: {
285
- zero?: string;
286
- one: string;
287
- other: string;
288
- }): string;
289
- formatDateTime(date: Date | string, language: SupportedLanguage, options?: Intl.DateTimeFormatOptions): string;
290
- formatNumber(number: number, language: SupportedLanguage, options?: Intl.NumberFormatOptions): string;
291
- formatCurrency(amount: number, currency: string, language: SupportedLanguage): string;
292
- }
293
- declare enum PaymentStatus {
294
- PENDING = "pending",
295
- PROCESSING = "processing",
296
- SUCCEEDED = "succeeded",
297
- FAILED = "failed",
298
- CANCELLED = "cancelled",
299
- REFUNDED = "refunded"
300
- }
301
- declare enum PaymentMethod {
302
- CREDIT_CARD = "credit_card",
303
- DEBIT_CARD = "debit_card",
304
- BANK_TRANSFER = "bank_transfer",
305
- UPI = "upi",
306
- WALLET = "wallet",
307
- PAYPAL = "paypal",
308
- STRIPE = "stripe"
309
- }
310
- declare enum SubscriptionStatus {
311
- ACTIVE = "active",
312
- INACTIVE = "inactive",
313
- CANCELLED = "cancelled",
314
- EXPIRED = "expired",
315
- PAST_DUE = "past_due",
316
- TRIALING = "trialing"
317
- }
318
- interface CreatePaymentOptions {
319
- amount: number;
320
- currency: string;
321
- paymentMethod: PaymentMethod;
322
- customerId: string;
323
- description?: string;
324
- metadata?: Record<string, unknown>;
325
- workspaceId?: string;
326
- organizationId?: string;
327
- }
328
- interface Payment {
329
- id: string;
330
- amount: number;
331
- currency: string;
332
- status: PaymentStatus;
333
- paymentMethod: PaymentMethod;
334
- customerId: string;
335
- description?: string;
336
- metadata?: Record<string, unknown>;
337
- workspaceId?: string;
338
- organizationId?: string;
339
- transactionId?: string;
340
- failureReason?: string;
341
- createdAt: string;
342
- updatedAt: string;
343
- }
344
- interface CreateSubscriptionOptions {
345
- customerId: string;
346
- planId: string;
347
- paymentMethod: PaymentMethod;
348
- trialDays?: number;
349
- metadata?: Record<string, unknown>;
350
- workspaceId?: string;
351
- organizationId?: string;
352
- }
353
- interface Subscription {
354
- id: string;
355
- customerId: string;
356
- planId: string;
357
- status: SubscriptionStatus;
358
- currentPeriodStart: string;
359
- currentPeriodEnd: string;
360
- trialEnd?: string;
361
- cancelledAt?: string;
362
- endedAt?: string;
363
- metadata?: Record<string, unknown>;
364
- workspaceId?: string;
365
- organizationId?: string;
366
- createdAt: string;
367
- updatedAt: string;
368
- }
369
- interface Plan {
370
- id: string;
371
- name: string;
372
- description?: string;
373
- amount: number;
374
- currency: string;
375
- interval: 'day' | 'week' | 'month' | 'year';
376
- intervalCount: number;
377
- features?: string[];
378
- metadata?: Record<string, unknown>;
379
- active: boolean;
380
- createdAt: string;
381
- }
382
- interface GetPaymentsOptions {
383
- customerId?: string;
384
- status?: PaymentStatus;
385
- workspaceId?: string;
386
- organizationId?: string;
387
- startDate?: string;
388
- endDate?: string;
389
- limit?: number;
390
- offset?: number;
391
- }
392
- export declare class PaymentsModule {
393
- private client;
394
- private context;
395
- constructor(client: BurdenoffGraphQLClient, context: SDKContext);
396
- createPayment(options: CreatePaymentOptions): Promise<Payment>;
397
- getPayment(paymentId: string): Promise<Payment>;
398
- getPayments(options: GetPaymentsOptions): Promise<{
399
- payments: Payment[];
400
- total: number;
401
- }>;
402
- refundPayment(paymentId: string, amount?: number, reason?: string): Promise<Payment>;
403
- verifyPayment(paymentId: string, verificationData: Record<string, unknown>): Promise<{
404
- verified: boolean;
405
- status: PaymentStatus;
406
- }>;
407
- createSubscription(options: CreateSubscriptionOptions): Promise<Subscription>;
408
- getSubscription(subscriptionId: string): Promise<Subscription>;
409
- cancelSubscription(subscriptionId: string, cancelAtPeriodEnd?: boolean): Promise<Subscription>;
410
- getCustomerSubscriptions(customerId: string): Promise<Subscription[]>;
411
- getPlans(activeOnly?: boolean): Promise<Plan[]>;
412
- createPaymentIntent(options: {
413
- amount: number;
414
- currency: string;
415
- customerId: string;
416
- paymentMethod?: PaymentMethod;
417
- metadata?: Record<string, unknown>;
418
- }): Promise<{
419
- clientSecret: string;
420
- paymentIntentId: string;
421
- }>;
422
- getPaymentStats(options?: {
423
- startDate?: string;
424
- endDate?: string;
425
- workspaceId?: string;
426
- }): Promise<{
427
- totalRevenue: number;
428
- totalPayments: number;
429
- successfulPayments: number;
430
- failedPayments: number;
431
- refundedAmount: number;
432
- averagePaymentAmount: number;
433
- }>;
434
- }
435
- type HeaderValue = string | string[] | undefined;
436
- interface BootstrapConfig extends SDKConfig {
437
- database?: DatabaseConfig;
438
- healthCheck?: boolean;
439
- healthCheckInterval?: number;
440
- modules?: string[];
441
- environment?: 'development' | 'staging' | 'production';
442
- serviceName?: string;
443
- serviceVersion?: string;
444
- healthCheckPort?: number;
445
- }
446
- interface BootstrapResult {
447
- success: boolean;
448
- serviceName: string;
449
- serviceVersion: string;
450
- environment: string;
451
- startedAt: string;
452
- modules: string[];
453
- databaseConnected: boolean;
454
- healthCheckEnabled: boolean;
455
- }
456
- interface BootstrapHealthCheckResult {
457
- healthy: boolean;
458
- checks: {
459
- database?: boolean;
460
- graphql?: boolean;
461
- memory?: {
462
- used: number;
463
- total: number;
464
- percentage: number;
465
- };
466
- uptime?: number;
467
- };
468
- timestamp: string;
469
- }
470
- export declare class BootstrapModule {
471
- private config;
472
- private startTime;
473
- private healthCheckInterval?;
474
- constructor(config: BootstrapConfig);
475
- bootstrap(): Promise<BootstrapResult>;
476
- private validateConfiguration;
477
- private connectDatabase;
478
- private loadModules;
479
- private setupHealthChecks;
480
- performHealthCheck(): Promise<BootstrapHealthCheckResult>;
481
- private setupSignalHandlers;
482
- private cleanup;
483
- getInfo(): {
484
- serviceName: string;
485
- serviceVersion: string;
486
- environment: string;
487
- uptime: number;
488
- startedAt: string;
489
- };
490
- setupDefaultContext(context: SDKContext): void;
491
- createContextMiddleware(): (req: {
492
- headers: Record<string, HeaderValue>;
493
- user?: unknown;
494
- }, _res: unknown, next: () => void) => Promise<void>;
495
- private extractContextFromRequest;
496
- loadSchema(schemaPath: string): Promise<boolean>;
497
- onShutdown(callback: () => Promise<void> | void): void;
498
- isReady(): Promise<boolean>;
499
- getMetrics(): {
500
- memory: NodeJS.MemoryUsage;
501
- uptime: number;
502
- cpu: NodeJS.CpuUsage;
503
- };
504
- }
505
- export declare function createBootstrap(config: BootstrapConfig): BootstrapModule;
506
46
  interface TenantBackendClientConfig {
507
47
  tenantBackendUrl: string;
508
48
  workspacesBackendUrl?: string;
@@ -564,4 +104,4 @@ export declare class BurdenoffSDK {
564
104
  static createBootstrap(config: Parameters<typeof createBootstrap>[0]): BootstrapModule;
565
105
  }
566
106
  export declare function createSDK(config: SDKConfig, context?: SDKContext): BurdenoffSDK;
567
- export { type Activity, type ActivityActorType, ActivityModule, ActivityOperationUnsupportedError, index_d_exports as AiCredits, AuthModule, type BillingPlanTransport, BillingUsageClient, type BillingUsageClientConfig, type BillingUsageOperationInput, BurdenoffGraphQLClient, BurdenoffSDK as default, index_d_exports$1 as Cache, index_d_exports$2 as Captcha, type CircuitBreakerConfig, index_d_exports$3 as Crypto, DEFAULT_CIRCUIT_BREAKER_CONFIG, DEFAULT_GATEWAY_RETRY_CONFIG, DEFAULT_GATEWAY_ROUTING, DEFAULT_LAYER_RESOURCES, DEFAULT_LAYER_STREAMS, index_d_exports$4 as DataLoader, DatabaseModule, type EmitGeneration, index_d_exports$5 as EventQueue, type EventQueueHealthStatus, type EventQueueSDKConfig, EventsModule, index_d_exports$6 as Export, type ExportProductTranslationsOptions, index_d_exports$7 as FeatureFlags, index_d_exports$8 as Files, index_d_exports$9 as Gateway, type GatewayRequestHeaders, type GatewayRetryConfig, type GatewayRoutingConfig, type GetActivitiesOptions, index_d_exports$10 as Graph, GraphModule, index_d_exports$11 as GraphQL, index_d_exports$12 as I18n, type I18nCapableContext, index_d_exports$13 as Init, index_d_exports$14 as Instrumentation, index_d_exports$15 as Layer, type LayerAwareRBACConfig, type LayerConfig, type LayerFullConfig, type LayerGatewayConfig, type LayerResourceUrls, index_d_exports$16 as Lifecycle, type LogActivityOptions, index_d_exports$17 as Logger, type LoggerConfig, type LoggerTransport, index_d_exports$18 as Middleware, NAME_MAX_LENGTH, NAME_MIN_LENGTH, type NameErrorCode, type NameValidationResult, tenant_notifications_d_exports as Notifications, NotificationsModule, index_d_exports$19 as Observability, type OrgBillingUsageOperationInput, PRODUCT_RENAMES, PRODUCT_RENAME_EMIT, PRODUCT_SLUG_ALIASES, type PlanTier, index_d_exports$20 as Platform, index_d_exports$21 as Prisma, index_d_exports$22 as ProductAlias, type ProductRename, type ProductTranslationTree, type ProductTranslationsExportResult, type QuotaLimit, type RBACDirectiveConfig, RBACModule, RENAME_CONCERNS, RESOURCE_CAP_DEFAULTS, RbacCoverageError, type RbacCoverageOptions, type RbacCoverageReport, type RbacCoverageSource, type RecaptchaVerifyOptions, type RecaptchaVerifyResult, type RenameConcern, type ResourceCap, type ResourceCapDefaults, ResourceCapExceededError, type ResourceCapsConfig, ResourceCapsModule, type ResourceName, type SDKConfig, type SDKContext, type SDKHealthStatus, type SDKShutdownOptions, type ServiceLayer, index_d_exports$23 as Sharing, type ShutdownDisposable, index_d_exports$24 as Tags, TemporalClient, type TemporalClientConfig, TemporalClientFactory, type TemporalHealthStatus, TemporalModule, TemporalWorker, type TemporalWorkerConfig, TemporalWorkerFactory, TemporalWorkerManager, type TenantBackendClientConfig, TrackerModule, type TranslationExportFormat, type Translator, USERNAME_MAX_LENGTH, USERNAME_MIN_LENGTH, type UpsertProductTranslationsOptions, type UpsertProductTranslationsResult, UsageModule, type UserFieldError, type UserFieldKey, type UserFieldsValidationResult, type UsernameErrorCode, type UsernameValidationResult, index_d_exports$25 as Utils, type ValidatedUserFields, index_d_exports$26 as Validation, type WorkflowStartOptions, type WorkspaceBillingUsageOperationInput, type WorkspaceResourceCapScope, analyzeRbacCoverage, assertRbacCoverage, billingIdVariants, configureResourceCaps, createInternalClient, createInternalClientForTenant, createInternalClientForWorkspaces, createRBACDirective, createRBACDirectiveForLayer, createRBACDirectiveFromEnv, createTranslator, disposeAll, emitBillingId, emitName, emitProductSlug, emitQuotaKey, emitRbacResource, emitTemplateKey, getLanguage, getLocale, getRegisteredDisposableCount, getResourceCaps, hasI18n, isCaptchaEnabled, isLegacyName, isSameBillingId, isSameGraphQLName, isSameName, isSameProductSlug, isSameQuotaKey, isSameRbacResource, isSameTemplateKey, lengthInCodePoints, nameVariants, normalizeBillingId, normalizeGraphQLName, normalizeProductSlug, normalizeQuotaKey, normalizeRbacResource, normalizeTemplateKey, productSlugVariants, quotaKeyVariants, rbacResourceVariants, readRenamedEnv, registerDisposable, t, templateKeyVariants, toCurrentName, toLegacyName, unregisterDisposable, validateName, validateUserFields, validateUsername, verifyCaptcha, verifyCaptchaIfEnabled };
107
+ export { type Activity, type ActivityActorType, ActivityModule, ActivityOperationUnsupportedError, index_d_exports as AiCredits, AuthModule, type BillingPlanTransport, BillingUsageClient, type BillingUsageClientConfig, type BillingUsageOperationInput, BootstrapModule, BurdenoffGraphQLClient, BurdenoffSDK as default, index_d_exports$1 as Cache, index_d_exports$2 as Captcha, type CircuitBreakerConfig, ContextManager, index_d_exports$3 as Crypto, DEFAULT_CIRCUIT_BREAKER_CONFIG, DEFAULT_GATEWAY_RETRY_CONFIG, DEFAULT_GATEWAY_ROUTING, DEFAULT_LAYER_RESOURCES, DEFAULT_LAYER_STREAMS, index_d_exports$4 as DataLoader, DatabaseModule, type EmitGeneration, index_d_exports$5 as EventQueue, type EventQueueHealthStatus, type EventQueueSDKConfig, EventsModule, index_d_exports$6 as Export, type ExportProductTranslationsOptions, index_d_exports$7 as FeatureFlags, index_d_exports$8 as Files, index_d_exports$9 as Gateway, type GatewayRequestHeaders, type GatewayRetryConfig, type GatewayRoutingConfig, type GetActivitiesOptions, index_d_exports$10 as Graph, GraphModule, index_d_exports$11 as GraphQL, index_d_exports$12 as I18n, type I18nCapableContext, index_d_exports$13 as Init, index_d_exports$14 as Instrumentation, index_d_exports$15 as Layer, type LayerAwareRBACConfig, type LayerConfig, type LayerFullConfig, type LayerGatewayConfig, type LayerResourceUrls, index_d_exports$16 as Lifecycle, type LogActivityOptions, index_d_exports$17 as Logger, type LoggerConfig, type LoggerTransport, index_d_exports$18 as Middleware, NAME_MAX_LENGTH, NAME_MIN_LENGTH, type NameErrorCode, type NameValidationResult, tenant_notifications_d_exports as Notifications, NotificationsModule, index_d_exports$19 as Observability, type OrgBillingUsageOperationInput, PRODUCT_RENAMES, PRODUCT_RENAME_EMIT, PRODUCT_SLUG_ALIASES, PaymentsModule, type PlanTier, index_d_exports$20 as Platform, index_d_exports$21 as Prisma, index_d_exports$22 as ProductAlias, type ProductRename, type ProductTranslationTree, type ProductTranslationsExportResult, type QuotaLimit, type RBACDirectiveConfig, RBACModule, RENAME_CONCERNS, RESOURCE_CAP_DEFAULTS, RbacCoverageError, type RbacCoverageOptions, type RbacCoverageReport, type RbacCoverageSource, type RecaptchaVerifyOptions, type RecaptchaVerifyResult, type RenameConcern, type ResourceCap, type ResourceCapDefaults, ResourceCapExceededError, type ResourceCapsConfig, ResourceCapsModule, type ResourceName, type SDKConfig, type SDKContext, type SDKHealthStatus, type SDKShutdownOptions, SearchModule, type ServiceLayer, index_d_exports$23 as Sharing, type ShutdownDisposable, index_d_exports$24 as Tags, TemporalClient, type TemporalClientConfig, TemporalClientFactory, type TemporalHealthStatus, TemporalModule, TemporalWorker, type TemporalWorkerConfig, TemporalWorkerFactory, TemporalWorkerManager, type TenantBackendClientConfig, TrackerModule, type TranslationExportFormat, TranslationModule, type Translator, USERNAME_MAX_LENGTH, USERNAME_MIN_LENGTH, type UpsertProductTranslationsOptions, type UpsertProductTranslationsResult, UsageModule, type UserFieldError, type UserFieldKey, type UserFieldsValidationResult, type UsernameErrorCode, type UsernameValidationResult, index_d_exports$25 as Utils, type ValidatedUserFields, index_d_exports$26 as Validation, type WorkflowStartOptions, type WorkspaceBillingUsageOperationInput, type WorkspaceResourceCapScope, analyzeRbacCoverage, assertRbacCoverage, billingIdVariants, configureResourceCaps, createBootstrap, createInternalClient, createInternalClientForTenant, createInternalClientForWorkspaces, createRBACDirective, createRBACDirectiveForLayer, createRBACDirectiveFromEnv, createTranslator, disposeAll, emitBillingId, emitName, emitProductSlug, emitQuotaKey, emitRbacResource, emitTemplateKey, getLanguage, getLocale, getRegisteredDisposableCount, getResourceCaps, hasI18n, isCaptchaEnabled, isLegacyName, isSameBillingId, isSameGraphQLName, isSameName, isSameProductSlug, isSameQuotaKey, isSameRbacResource, isSameTemplateKey, lengthInCodePoints, nameVariants, normalizeBillingId, normalizeGraphQLName, normalizeProductSlug, normalizeQuotaKey, normalizeRbacResource, normalizeTemplateKey, productSlugVariants, quotaKeyVariants, rbacResourceVariants, readRenamedEnv, registerDisposable, t, templateKeyVariants, toCurrentName, toLegacyName, unregisterDisposable, validateName, validateUserFields, validateUsername, verifyCaptcha, verifyCaptchaIfEnabled };