@burdenoff/be-sdk 2026.527.1 → 2026.527.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.
@@ -0,0 +1 @@
1
+ export { B as BreakerConfig, C as CacheVersionRedis, a as CircuitBreakerOpenError, b as ClampLimitOptions, D as DataLoaderLike, c as DropOldOptions, E as EnsureMonthlyOptions, H as HttpClientConfig, d as HttpClientInit, L as LLMProviderAdapter, e as LLMRequest, f as LLMResponse, g as LLMRouter, h as LLMRouterOptions, j as LeaderLockOptions, k as LeaderLockRedis, l as LeaderLockResult, m as LoaderBuilder, n as LoaderMap, P as PaginateInput, o as PaginateResult, p as PrismaModelLike, q as PrismaRawClient, R as RateLimitInput, r as RateLimitRedis, s as RateLimitResult, t as ReferenceObject, u as RetryConfig, _ as __resetHttpClientBreakers, v as buildCacheKey, w as buildLoaders, x as clampLimit, y as createHttpClient, z as dropOldPartitions, A as ensureMonthlyPartitions, F as getNamespaceVersion, G as httpClient, I as invalidateNamespace, J as monthlyPartitionName, K as paginate, M as rateLimitIncr, N as resolveReferenceLoader, O as withLeaderLock } from '../index-BQ1yJn1K.js';
@@ -0,0 +1,5 @@
1
+ export { CircuitBreakerOpenError, LLMRouter, __resetHttpClientBreakers, buildCacheKey, buildLoaders, clampLimit, createHttpClient, dropOldPartitions, ensureMonthlyPartitions, getNamespaceVersion, httpClient, invalidateNamespace, monthlyPartitionName, paginate, rateLimitIncr, resolveReferenceLoader, withLeaderLock } from '../chunk-PHKK7725.js';
2
+ import '../chunk-CBZNP6RF.js';
3
+ import '../chunk-XE4OXN2W.js';
4
+ //# sourceMappingURL=index.js.map
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
@@ -0,0 +1,51 @@
1
+ import { GraphQLError } from 'graphql';
2
+ import { B as BurdenoffGraphQLClient } from '../graphql-DH3L5Hj7.js';
3
+ import 'graphql-request';
4
+ import '../index-Caqvetqq.js';
5
+
6
+ type ResourceName = 'workspace' | 'workspaceMember' | 'sandbox' | 'vibe' | 'agent' | 'conversation' | 'message' | 'tag' | 'file' | 'group' | 'calendar' | 'scheduledTask' | 'form' | 'apiKey' | 'webhook';
7
+ type PlanTier = 'free' | 'paid';
8
+ interface ResourceCapDefaults {
9
+ free: number;
10
+ paidDefault: number;
11
+ scope: 'user' | 'workspace' | 'user/day';
12
+ }
13
+ declare const RESOURCE_CAP_DEFAULTS: Record<ResourceName, ResourceCapDefaults>;
14
+ interface ResourceCap {
15
+ resource: ResourceName;
16
+ limit: number;
17
+ planName: string;
18
+ planTier: PlanTier;
19
+ isFallback: boolean;
20
+ }
21
+ interface ResourceCapsConfig {
22
+ client?: BurdenoffGraphQLClient;
23
+ cacheTtlMs?: number;
24
+ defaultTier?: PlanTier;
25
+ }
26
+ declare class ResourceCapExceededError extends GraphQLError {
27
+ constructor(detail: {
28
+ resource: ResourceName;
29
+ currentCount: number;
30
+ limit: number;
31
+ planName: string;
32
+ });
33
+ }
34
+ declare class ResourceCapsModule {
35
+ private readonly client?;
36
+ private readonly cacheTtlMs;
37
+ private readonly defaultTier;
38
+ private readonly planCache;
39
+ constructor(config?: ResourceCapsConfig);
40
+ getResourceCap(userId: string, resource: ResourceName): Promise<ResourceCap>;
41
+ enforceResourceCap(userId: string, resource: ResourceName, currentCount: number): Promise<ResourceCap>;
42
+ invalidate(userId: string): void;
43
+ invalidateAll(): void;
44
+ private resolvePlan;
45
+ private fetchPlan;
46
+ private fallbackPlan;
47
+ }
48
+ declare function getResourceCaps(config?: ResourceCapsConfig): ResourceCapsModule;
49
+ declare function __resetResourceCapsForTests(): void;
50
+
51
+ export { type PlanTier, RESOURCE_CAP_DEFAULTS, type ResourceCap, type ResourceCapDefaults, ResourceCapExceededError, type ResourceCapsConfig, ResourceCapsModule, type ResourceName, __resetResourceCapsForTests, getResourceCaps };
@@ -0,0 +1,5 @@
1
+ export { RESOURCE_CAP_DEFAULTS, ResourceCapExceededError, ResourceCapsModule, __resetResourceCapsForTests, getResourceCaps } from '../chunk-7BMKOD7N.js';
2
+ import '../chunk-CBZNP6RF.js';
3
+ import '../chunk-XE4OXN2W.js';
4
+ //# sourceMappingURL=index.js.map
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@burdenoff/be-sdk",
3
- "version": "2026.527.1",
3
+ "version": "2026.527.3",
4
4
  "description": "Backend SDK for Burdenoff products providing unified access to notifications, RBAC, activity tracking, usage monitoring, and more",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -50,6 +50,10 @@
50
50
  "types": "./dist/gateway/security/index.d.ts",
51
51
  "import": "./dist/gateway/security/index.js"
52
52
  },
53
+ "./platform": {
54
+ "types": "./dist/platform/index.d.ts",
55
+ "import": "./dist/platform/index.js"
56
+ },
53
57
  "./*": {
54
58
  "types": "./dist/*/index.d.ts",
55
59
  "import": "./dist/*/index.js"
@@ -67,8 +71,8 @@
67
71
  "deps:status": "bun scripts/deps-mode.ts status",
68
72
  "deps:workspace": "bun scripts/deps-mode.ts workspace",
69
73
  "dev": "tsx watch ./src/index.ts",
70
- "build": "NODE_OPTIONS=--max-old-space-size=4096 tsup src/index.ts src/init/index.ts src/logger/index.ts src/cache/index.ts src/database/index.ts src/event-queue/index.ts src/graph/index.ts src/middleware/index.ts src/observability/index.ts src/graphql/index.ts src/graphql/services/index.ts src/prisma/index.ts src/utils/index.ts src/notifications/index.ts src/tracker/index.ts src/export/index.ts src/dataloader/index.ts src/prisma/generator/index.ts src/server/index.ts src/i18n/index.ts src/instrumentation/index.ts src/rbac/index.ts src/temporal/index.ts src/client/internal-client.ts src/layer/index.ts src/gateway/index.ts src/gateway/security/index.ts src/crypto/index.ts src/feature-flags/index.ts src/telemetry/index.ts src/auth/index.ts src/captcha/index.ts src/metrics/index.ts --format esm --dts --clean --shims",
71
- "build:watch": "tsup src/index.ts src/init/index.ts src/logger/index.ts src/cache/index.ts src/database/index.ts src/event-queue/index.ts src/graph/index.ts src/middleware/index.ts src/observability/index.ts src/graphql/index.ts src/graphql/services/index.ts src/prisma/index.ts src/utils/index.ts src/notifications/index.ts src/tracker/index.ts src/export/index.ts src/dataloader/index.ts src/prisma/generator/index.ts src/server/index.ts src/i18n/index.ts src/instrumentation/index.ts src/rbac/index.ts src/temporal/index.ts src/client/internal-client.ts src/layer/index.ts src/gateway/index.ts src/gateway/security/index.ts src/crypto/index.ts src/feature-flags/index.ts src/telemetry/index.ts src/auth/index.ts src/captcha/index.ts src/metrics/index.ts --format esm --dts --watch --shims",
74
+ "build": "NODE_OPTIONS=--max-old-space-size=4096 tsup src/index.ts src/init/index.ts src/logger/index.ts src/cache/index.ts src/database/index.ts src/event-queue/index.ts src/graph/index.ts src/middleware/index.ts src/observability/index.ts src/graphql/index.ts src/graphql/services/index.ts src/prisma/index.ts src/utils/index.ts src/notifications/index.ts src/tracker/index.ts src/export/index.ts src/dataloader/index.ts src/prisma/generator/index.ts src/server/index.ts src/i18n/index.ts src/instrumentation/index.ts src/rbac/index.ts src/temporal/index.ts src/client/internal-client.ts src/layer/index.ts src/gateway/index.ts src/gateway/security/index.ts src/crypto/index.ts src/feature-flags/index.ts src/telemetry/index.ts src/auth/index.ts src/captcha/index.ts src/metrics/index.ts src/platform/index.ts src/resource-caps/index.ts --format esm --dts --clean --shims",
75
+ "build:watch": "tsup src/index.ts src/init/index.ts src/logger/index.ts src/cache/index.ts src/database/index.ts src/event-queue/index.ts src/graph/index.ts src/middleware/index.ts src/observability/index.ts src/graphql/index.ts src/graphql/services/index.ts src/prisma/index.ts src/utils/index.ts src/notifications/index.ts src/tracker/index.ts src/export/index.ts src/dataloader/index.ts src/prisma/generator/index.ts src/server/index.ts src/i18n/index.ts src/instrumentation/index.ts src/rbac/index.ts src/temporal/index.ts src/client/internal-client.ts src/layer/index.ts src/gateway/index.ts src/gateway/security/index.ts src/crypto/index.ts src/feature-flags/index.ts src/telemetry/index.ts src/auth/index.ts src/captcha/index.ts src/metrics/index.ts src/platform/index.ts src/resource-caps/index.ts --format esm --dts --watch --shims",
72
76
  "typecheck": "tsc --noEmit",
73
77
  "lint": "eslint ./src",
74
78
  "lint:sanity": "if [ \"${CI:-}\" = \"true\" ]; then bun run lint; else bun run lint -- --cache --cache-location .eslintcache; fi",