@burdenoff/be-sdk 2026.1128.1 → 2026.1128.2
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/activity/index.d.ts +2 -2
- package/dist/auth/index.d.ts +1 -1
- package/dist/bootstrap/index.d.ts +1 -1
- package/dist/bootstrap/index.js.map +1 -1
- package/dist/context/index.d.ts +3 -2
- package/dist/context/index.js +100 -72
- package/dist/context/index.js.map +1 -1
- package/dist/event-queue/index.d.ts +1 -1
- package/dist/feature-flags/index.d.ts +1 -1
- package/dist/graph/index.d.ts +1 -1
- package/dist/{graphql-C8jKLLel.d.ts → graphql-DcZAKC6p.d.ts} +1 -1
- package/dist/{index-tLd9b-nS.d.ts → index-B-yXdMeb.d.ts} +2 -2
- package/dist/{index-CkB68nQA.d.ts → index-B4ckqUZX.d.ts} +1 -1
- package/dist/{index-jStzN9rq.d.ts → index-BmL-JjQK.d.ts} +1 -1
- package/dist/{index-Dw_0wE4q.d.ts → index-C96mNrLW.d.ts} +2 -2
- package/dist/{index-B1bHk4Rq.d.ts → index-CGPNFIR3.d.ts} +2 -2
- package/dist/{index-BTaQMEgB.d.ts → index-CQ3vxT5P.d.ts} +6 -1
- package/dist/{index-KlrnELrN.d.ts → index-CZWopQsh.d.ts} +1 -1
- package/dist/{index-Cl2L2P47.d.ts → index-Cs426iRP.d.ts} +4 -4
- package/dist/{index-BQ5O967l.d.ts → index-Cx3z-7T1.d.ts} +3 -3
- package/dist/{index-CIayzveI.d.ts → index-DYKWUbL4.d.ts} +3 -3
- package/dist/{index-C_WEvMzP.d.ts → index-UQSbAERe.d.ts} +2 -2
- package/dist/{index-12NbzOYy.d.ts → index-cPPtZTJh.d.ts} +1 -1
- package/dist/{index-DS-tPMFi.d.ts → index-j1B6eYHc.d.ts} +2 -2
- package/dist/index.d.ts +14 -14
- package/dist/index.js +1 -1
- package/dist/instrumentation/index.d.ts +2 -2
- package/dist/logger/index.d.ts +1 -1
- package/dist/notifications/index.d.ts +1 -1
- package/dist/payments/index.d.ts +2 -2
- package/dist/prisma/index.d.ts +2 -2
- package/dist/rbac/index.d.ts +1 -1
- package/dist/resource-caps/index.d.ts +1 -1
- package/dist/search/index.d.ts +2 -2
- package/dist/server/index.d.ts +2 -2
- package/dist/server/index.js +30 -3
- package/dist/server/index.js.map +1 -1
- package/dist/telemetry/index.d.ts +2 -2
- package/dist/tracker/index.d.ts +2 -2
- package/dist/translation/index.d.ts +2 -2
- package/dist/types/index.d.ts +2 -2
- package/dist/types/index.js.map +1 -1
- package/dist/{types-oV9uAkMA.d.ts → types-IXZyPJCR.d.ts} +1 -1
- package/dist/usage/index.d.ts +1 -1
- package/dist/workspace-extension-ByopOwtK.js.map +1 -1
- package/dist/{workspace-extension-DKxDI4H6.d.ts → workspace-extension-C0qib11C.d.ts} +2 -0
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as Logger } from "../index-
|
|
2
|
-
import { l as setupInstrumentation, n as InstrumentationSetupResult, o as initializeInstrumentation, r as SetupInstrumentationOptions } from "../index-
|
|
1
|
+
import { r as Logger } from "../index-CZWopQsh.js";
|
|
2
|
+
import { l as setupInstrumentation, n as InstrumentationSetupResult, o as initializeInstrumentation, r as SetupInstrumentationOptions } from "../index-BmL-JjQK.js";
|
|
3
3
|
interface TelemetryIdGenerator {
|
|
4
4
|
generateTraceId(): string;
|
|
5
5
|
generateSpanId(): string;
|
package/dist/tracker/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as ActorOrigin, n as AI_ASSISTANT_ACTOR_ORIGIN, o as AssistantSessionAttribution } from "../assistant-session-DA5ZKJOr.js";
|
|
2
2
|
import { t as suppressMutationAudit } from "../explicit-activity-scope-D8VeGGpt.js";
|
|
3
|
-
import { p as UsageMetricType } from "../index-
|
|
4
|
-
import { S as trackerStub, _ as UsageTrackingOptions, a as AGENT_ACTIVITY_RESOURCE_TYPE, b as resolveAssistantSession, c as trackAgentActivity, d as RbacCheckOptions, f as TrackedActorType, g as UnifiedTrackingOptions, h as UnifiedTrackerStub, i as AGENT_ACTIVITY_ACTIONS, l as ActivityTrackingOptions, m as UNIFIED_TRACKER_CONSTANTS, n as TrackResult, o as AgentActivityAction, p as TrackingEvent, r as TrackerModule, s as AgentActivityOptions, t as TrackOptions, u as ProductTracker, v as createProductTracker, x as trackOperation, y as isTrackedActorType } from "../index-
|
|
3
|
+
import { p as UsageMetricType } from "../index-UQSbAERe.js";
|
|
4
|
+
import { S as trackerStub, _ as UsageTrackingOptions, a as AGENT_ACTIVITY_RESOURCE_TYPE, b as resolveAssistantSession, c as trackAgentActivity, d as RbacCheckOptions, f as TrackedActorType, g as UnifiedTrackingOptions, h as UnifiedTrackerStub, i as AGENT_ACTIVITY_ACTIONS, l as ActivityTrackingOptions, m as UNIFIED_TRACKER_CONSTANTS, n as TrackResult, o as AgentActivityAction, p as TrackingEvent, r as TrackerModule, s as AgentActivityOptions, t as TrackOptions, u as ProductTracker, v as createProductTracker, x as trackOperation, y as isTrackedActorType } from "../index-Cs426iRP.js";
|
|
5
5
|
export { AGENT_ACTIVITY_ACTIONS, AGENT_ACTIVITY_RESOURCE_TYPE, AI_ASSISTANT_ACTOR_ORIGIN, type ActivityTrackingOptions, type ActorOrigin, type AgentActivityAction, type AgentActivityOptions, type AssistantSessionAttribution, type ProductTracker, type RbacCheckOptions, TrackOptions, TrackResult, type TrackedActorType, TrackerModule, type TrackingEvent, UNIFIED_TRACKER_CONSTANTS, UnifiedTrackerStub, type UnifiedTrackingOptions, UsageMetricType, type UsageTrackingOptions, createProductTracker, isTrackedActorType, resolveAssistantSession, suppressMutationAudit, trackAgentActivity, trackOperation, trackerStub };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as BurdenoffGraphQLClient } from "../graphql-
|
|
2
|
-
import {
|
|
1
|
+
import { t as BurdenoffGraphQLClient } from "../graphql-DcZAKC6p.js";
|
|
2
|
+
import { m as SDKContext } from "../index-CQ3vxT5P.js";
|
|
3
3
|
export type SupportedLanguage = 'en' | 'es' | 'fr' | 'de' | 'it' | 'pt' | 'ru' | 'zh' | 'ja' | 'ko' | 'ar' | 'hi' | 'bn' | 'ta' | 'te' | 'ml';
|
|
4
4
|
export interface TranslationOptions {
|
|
5
5
|
text: string;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
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-C0zxAUgR.js";
|
|
2
|
-
import { _ as
|
|
3
|
-
export { APIError, ActorType, AuthenticationError, type CircuitBreakerConfig, DEFAULT_CIRCUIT_BREAKER_CONFIG, DEFAULT_GATEWAY_RETRY_CONFIG, DEFAULT_GATEWAY_ROUTING, DEFAULT_LAYER_RESOURCES, DEFAULT_LAYER_STREAMS, EventQueueHealthStatus, EventQueueSDKConfig, type GatewayRequestHeaders, type GatewayRetryConfig, type GatewayRoutingConfig, type LayerConfig, type LayerFullConfig, type LayerGatewayConfig, type LayerResourceUrls, LoggerConfig, LoggerTransport, NetworkError, PermissionDeniedError, QuotaExceededError, RetryConfig, SDKConfig, SDKContext, SDKError, SDKHealthStatus, SDKShutdownOptions, type ServiceLayer, TemporalHealthStatus, TimeoutError, ValidationError };
|
|
2
|
+
import { _ as SDKShutdownOptions, a as EventQueueHealthStatus, b as ValidationError, c as LoggerTransport, d as QuotaExceededError, f as RetryConfig, g as SDKHealthStatus, h as SDKError, i as CfAccessCredentials, l as NetworkError, m as SDKContext, n as ActorType, o as EventQueueSDKConfig, p as SDKConfig, r as AuthenticationError, s as LoggerConfig, t as APIError, u as PermissionDeniedError, v as TemporalHealthStatus, y as TimeoutError } from "../index-CQ3vxT5P.js";
|
|
3
|
+
export { APIError, ActorType, AuthenticationError, CfAccessCredentials, type CircuitBreakerConfig, DEFAULT_CIRCUIT_BREAKER_CONFIG, DEFAULT_GATEWAY_RETRY_CONFIG, DEFAULT_GATEWAY_ROUTING, DEFAULT_LAYER_RESOURCES, DEFAULT_LAYER_STREAMS, EventQueueHealthStatus, EventQueueSDKConfig, type GatewayRequestHeaders, type GatewayRetryConfig, type GatewayRoutingConfig, type LayerConfig, type LayerFullConfig, type LayerGatewayConfig, type LayerResourceUrls, LoggerConfig, LoggerTransport, NetworkError, PermissionDeniedError, QuotaExceededError, RetryConfig, SDKConfig, SDKContext, SDKError, SDKHealthStatus, SDKShutdownOptions, type ServiceLayer, TemporalHealthStatus, TimeoutError, ValidationError };
|
package/dist/types/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../src/types/index.ts"],"sourcesContent":["/**\n * Core type definitions for Burdenoff Backend SDK\n */\n\nimport type { ServiceLayer } from './layer.js';\n\n/**\n * SDK Configuration\n */\nexport interface SDKConfig {\n /** Workspaces API GraphQL endpoint (should point to wspace-int-gateway for M2M calls) */\n workspacesApiUrl: string;\n /**\n * Tenant API GraphQL endpoint for cross-layer (wspace → global) M2M calls.\n * Cross-layer traffic must go through the **public** global gateway\n * (`GLOBAL_PUBLIC_GATEWAY_URL`). In alpha and production this is the private\n * Route53 address of that gateway; the internal gateway is for same-layer calls.\n */\n tenantApiUrl?: string;\n /**\n * Calling service's layer (`wspace` | `global`). Used to construct the\n * cross-layer GatewayClient. Defaults to the `SERVICE_LAYER` env var, then\n * `wspace`.\n */\n serviceLayer?: ServiceLayer;\n /**\n * Calling service name. Used as the cross-layer GatewayClient service identity\n * and the `sub` of the minted service JWT. Defaults to the `SERVICE_NAME` env\n * var, then `burdenoff-be-sdk`.\n */\n serviceName?: string;\n /** Default timeout for API requests in milliseconds */\n timeout?: number;\n /** Retry configuration */\n retry?: RetryConfig;\n /** Logger configuration */\n logger?: LoggerConfig;\n /** Event queue configuration (Redis Streams). Reads `REDIS_URL` when present. */\n eventQueue?: EventQueueSDKConfig;\n /** Temporal module type (workspace or tenant) */\n temporalModuleType?: 'workspace' | 'tenant';\n /** Temporal server address */\n temporalAddress?: string;\n /** Temporal namespace */\n temporalNamespace?: string;\n /** Temporal task queue */\n temporalTaskQueue?: string;\n /** Auto-connect to Temporal (default: true) */\n temporalAutoConnect?: boolean;\n}\n\n/**\n * Retry configuration for API requests\n */\nexport interface RetryConfig {\n /** Maximum number of retry attempts */\n maxAttempts: number;\n /** Initial retry delay in milliseconds */\n initialDelay: number;\n /** Maximum retry delay in milliseconds */\n maxDelay: number;\n /** Backoff multiplier */\n backoffMultiplier: number;\n}\n\n/**\n * Logger configuration\n */\nexport interface LoggerConfig {\n /** Log level */\n level: 'debug' | 'info' | 'warn' | 'error';\n /** Enable console output */\n console: boolean;\n /** Custom logger transport */\n transport?: LoggerTransport;\n}\n\n/**\n * Custom logger transport interface\n */\nexport interface LoggerTransport {\n log(level: string, message: string, meta?: Record<string, unknown>): void;\n}\n\n/**\n * Actor type for RBAC authorization\n * - user: Direct user request (via frontend)\n * - app: OAuth app acting on behalf of user\n * - service: M2M service-to-service communication\n * - super_admin: Platform administration (bypasses all checks)\n */\nexport type ActorType = 'user' | 'app' | 'service' | 'super_admin';\n\n/**\n * Request context passed with every SDK operation\n */\nexport interface SDKContext {\n /** Actor ID - identifies the entity making the request */\n actorId?: string;\n /** Actor type - determines authorization behavior */\n actorType?: ActorType;\n /** Workspace ID */\n workspaceId?: string;\n /** Organization routing context for gateway calls. */\n organizationId?: string;\n /** Tenant ID */\n tenantId?: string;\n /** Project ID */\n projectId?: string;\n /** App ID */\n appId?: string;\n /** JWT token for authentication */\n token?: string;\n /** Product ID */\n productId?: string;\n /**\n * Cloudflare Access service-token client id, captured from the inbound\n * `cf-access-client-id` header. Re-presented on cross-layer outbound calls so\n * the peer layer's CF-Access-gated public gateway admits the request.\n */\n cfAccessClientId?: string;\n /**\n * Cloudflare Access service-token client secret, from `cf-access-client-secret`.\n * Sensitive — redacted by the SDK logger's secret pattern; never log directly.\n */\n cfAccessClientSecret?: string;\n /**\n * Cloudflare Access USER-SSO credential — the `CF_Authorization` cookie value,\n * forwarded by the public gateway as `x-cf-authorization`. On alpha a real user\n * request carries this (not the service-token pair); re-presented as the\n * `CF_Authorization` cookie on cross-layer outbound calls so the peer layer's\n * CF-Access-gated public gateway (same CF-Access app / shared AUD) admits it.\n * Sensitive — never log directly. See BOFF-2929.\n */\n cfAuthorization?: string;\n /** Additional custom context */\n [key: string]: unknown;\n}\n\n/**\n * SDK Error base class\n */\nexport class SDKError extends Error {\n constructor(\n message: string,\n public code: string,\n public details?: Record<string, unknown>\n ) {\n super(message);\n this.name = 'SDKError';\n Object.setPrototypeOf(this, SDKError.prototype);\n }\n}\n\n/**\n * Permission denied error\n */\nexport class PermissionDeniedError extends SDKError {\n constructor(message: string, details?: Record<string, unknown>) {\n super(message, 'PERMISSION_DENIED', details);\n this.name = 'PermissionDeniedError';\n Object.setPrototypeOf(this, PermissionDeniedError.prototype);\n }\n}\n\n/**\n * Authentication error\n */\nexport class AuthenticationError extends SDKError {\n constructor(message: string, details?: Record<string, unknown>) {\n super(message, 'AUTHENTICATION_ERROR', details);\n this.name = 'AuthenticationError';\n Object.setPrototypeOf(this, AuthenticationError.prototype);\n }\n}\n\n/**\n * API error from backend\n */\nexport class APIError extends SDKError {\n constructor(message: string, details?: Record<string, unknown>) {\n super(message, 'API_ERROR', details);\n this.name = 'APIError';\n Object.setPrototypeOf(this, APIError.prototype);\n }\n}\n\n/**\n * Validation error\n */\nexport class ValidationError extends SDKError {\n constructor(message: string, details?: Record<string, unknown>) {\n super(message, 'VALIDATION_ERROR', details);\n this.name = 'ValidationError';\n Object.setPrototypeOf(this, ValidationError.prototype);\n }\n}\n\n/**\n * Quota exceeded error\n */\nexport class QuotaExceededError extends SDKError {\n constructor(message: string, details?: Record<string, unknown>) {\n super(message, 'QUOTA_EXCEEDED', details);\n this.name = 'QuotaExceededError';\n Object.setPrototypeOf(this, QuotaExceededError.prototype);\n }\n}\n\n/**\n * Network error\n */\nexport class NetworkError extends SDKError {\n constructor(message: string, details?: Record<string, unknown>) {\n super(message, 'NETWORK_ERROR', details);\n this.name = 'NetworkError';\n Object.setPrototypeOf(this, NetworkError.prototype);\n }\n}\n\n/**\n * Timeout error\n */\nexport class TimeoutError extends SDKError {\n constructor(message: string, details?: Record<string, unknown>) {\n super(message, 'TIMEOUT_ERROR', details);\n this.name = 'TimeoutError';\n Object.setPrototypeOf(this, TimeoutError.prototype);\n }\n}\n\n/**\n * Event queue SDK configuration (Redis Streams backend).\n *\n * The publisher is created via `createPublisher()` from\n * `@burdenoff/be-sdk/event-queue` and reads `REDIS_URL` from the env.\n * The fields here are for client-name + reconnect tuning only.\n */\nexport interface EventQueueSDKConfig {\n /** Redis Streams server URL. Overrides `REDIS_URL` env if set. */\n url?: string;\n /** Optional password for TLS/auth */\n password?: string;\n /** Maximum reconnect attempts (default: -1 = infinite) */\n maxReconnectAttempts?: number;\n /** Reconnect time wait in milliseconds (default: 2000) */\n reconnectTimeWait?: number;\n /** Client name for logging (default: service name) */\n name?: string;\n /** Auto-connect on SDK initialization (default: true) */\n autoConnect?: boolean;\n}\n\n/**\n * Event queue health status\n */\nexport interface EventQueueHealthStatus {\n status: 'healthy' | 'unhealthy' | 'not_configured';\n connected: boolean;\n url?: string;\n details?: Record<string, unknown>;\n}\n\n/**\n * Temporal health status\n */\nexport interface TemporalHealthStatus {\n status: 'healthy' | 'unhealthy' | 'not_configured';\n connected: boolean;\n address?: string;\n namespace?: string;\n details?: Record<string, unknown>;\n}\n\n/**\n * Overall SDK health status\n */\nexport interface SDKHealthStatus {\n eventQueue: EventQueueHealthStatus;\n temporal: TemporalHealthStatus;\n}\n\n/**\n * SDK shutdown options\n */\nexport interface SDKShutdownOptions {\n /** Shutdown timeout in milliseconds (default: 5000) */\n timeout?: number;\n /** Force shutdown even if timeout is exceeded (default: true) */\n force?: boolean;\n}\n\n// ============================================================================\n// Layer Types Export\n// ============================================================================\n\n/**\n * Re-export all layer-related types for convenience\n */\nexport type {\n ServiceLayer,\n LayerConfig,\n LayerGatewayConfig,\n LayerResourceUrls,\n LayerFullConfig,\n GatewayRoutingConfig,\n CircuitBreakerConfig,\n GatewayRetryConfig,\n GatewayRequestHeaders,\n} from './layer.js';\n\nexport {\n DEFAULT_GATEWAY_ROUTING,\n DEFAULT_LAYER_RESOURCES,\n DEFAULT_LAYER_STREAMS,\n DEFAULT_CIRCUIT_BREAKER_CONFIG,\n DEFAULT_GATEWAY_RETRY_CONFIG,\n} from './layer.js';\n"],"mappings":";;;;;;AA8IA,IAAa,WAAb,MAAa,iBAAiB,MAAM;CAGzB;CACA;CAHT,YACE,SACA,AAAO,MACP,AAAO,SACP;EACA,MAAM,OAAO;EAHN;EACA;EAGP,KAAK,OAAO;EACZ,OAAO,eAAe,MAAM,SAAS,SAAS;CAChD;AACF;;;;AAKA,IAAa,wBAAb,MAAa,8BAA8B,SAAS;CAClD,YAAY,SAAiB,SAAmC;EAC9D,MAAM,SAAS,qBAAqB,OAAO;EAC3C,KAAK,OAAO;EACZ,OAAO,eAAe,MAAM,sBAAsB,SAAS;CAC7D;AACF;;;;AAKA,IAAa,sBAAb,MAAa,4BAA4B,SAAS;CAChD,YAAY,SAAiB,SAAmC;EAC9D,MAAM,SAAS,wBAAwB,OAAO;EAC9C,KAAK,OAAO;EACZ,OAAO,eAAe,MAAM,oBAAoB,SAAS;CAC3D;AACF;;;;AAKA,IAAa,WAAb,MAAa,iBAAiB,SAAS;CACrC,YAAY,SAAiB,SAAmC;EAC9D,MAAM,SAAS,aAAa,OAAO;EACnC,KAAK,OAAO;EACZ,OAAO,eAAe,MAAM,SAAS,SAAS;CAChD;AACF;;;;AAKA,IAAa,kBAAb,MAAa,wBAAwB,SAAS;CAC5C,YAAY,SAAiB,SAAmC;EAC9D,MAAM,SAAS,oBAAoB,OAAO;EAC1C,KAAK,OAAO;EACZ,OAAO,eAAe,MAAM,gBAAgB,SAAS;CACvD;AACF;;;;AAKA,IAAa,qBAAb,MAAa,2BAA2B,SAAS;CAC/C,YAAY,SAAiB,SAAmC;EAC9D,MAAM,SAAS,kBAAkB,OAAO;EACxC,KAAK,OAAO;EACZ,OAAO,eAAe,MAAM,mBAAmB,SAAS;CAC1D;AACF;;;;AAKA,IAAa,eAAb,MAAa,qBAAqB,SAAS;CACzC,YAAY,SAAiB,SAAmC;EAC9D,MAAM,SAAS,iBAAiB,OAAO;EACvC,KAAK,OAAO;EACZ,OAAO,eAAe,MAAM,aAAa,SAAS;CACpD;AACF;;;;AAKA,IAAa,eAAb,MAAa,qBAAqB,SAAS;CACzC,YAAY,SAAiB,SAAmC;EAC9D,MAAM,SAAS,iBAAiB,OAAO;EACvC,KAAK,OAAO;EACZ,OAAO,eAAe,MAAM,aAAa,SAAS;CACpD;AACF"}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/types/index.ts"],"sourcesContent":["/**\n * Core type definitions for Burdenoff Backend SDK\n */\n\nimport type { ServiceLayer } from './layer.js';\n\n/**\n * SDK Configuration\n */\nexport interface SDKConfig {\n /** Workspaces API GraphQL endpoint (should point to wspace-int-gateway for M2M calls) */\n workspacesApiUrl: string;\n /**\n * Tenant API GraphQL endpoint for cross-layer (wspace → global) M2M calls.\n * Cross-layer traffic must go through the **public** global gateway\n * (`GLOBAL_PUBLIC_GATEWAY_URL`). In alpha and production this is the private\n * Route53 address of that gateway; the internal gateway is for same-layer calls.\n */\n tenantApiUrl?: string;\n /**\n * Calling service's layer (`wspace` | `global`). Used to construct the\n * cross-layer GatewayClient. Defaults to the `SERVICE_LAYER` env var, then\n * `wspace`.\n */\n serviceLayer?: ServiceLayer;\n /**\n * Calling service name. Used as the cross-layer GatewayClient service identity\n * and the `sub` of the minted service JWT. Defaults to the `SERVICE_NAME` env\n * var, then `burdenoff-be-sdk`.\n */\n serviceName?: string;\n /** Default timeout for API requests in milliseconds */\n timeout?: number;\n /** Retry configuration */\n retry?: RetryConfig;\n /** Logger configuration */\n logger?: LoggerConfig;\n /** Event queue configuration (Redis Streams). Reads `REDIS_URL` when present. */\n eventQueue?: EventQueueSDKConfig;\n /** Temporal module type (workspace or tenant) */\n temporalModuleType?: 'workspace' | 'tenant';\n /** Temporal server address */\n temporalAddress?: string;\n /** Temporal namespace */\n temporalNamespace?: string;\n /** Temporal task queue */\n temporalTaskQueue?: string;\n /** Auto-connect to Temporal (default: true) */\n temporalAutoConnect?: boolean;\n}\n\n/**\n * Retry configuration for API requests\n */\nexport interface RetryConfig {\n /** Maximum number of retry attempts */\n maxAttempts: number;\n /** Initial retry delay in milliseconds */\n initialDelay: number;\n /** Maximum retry delay in milliseconds */\n maxDelay: number;\n /** Backoff multiplier */\n backoffMultiplier: number;\n}\n\n/**\n * Logger configuration\n */\nexport interface LoggerConfig {\n /** Log level */\n level: 'debug' | 'info' | 'warn' | 'error';\n /** Enable console output */\n console: boolean;\n /** Custom logger transport */\n transport?: LoggerTransport;\n}\n\n/**\n * Custom logger transport interface\n */\nexport interface LoggerTransport {\n log(level: string, message: string, meta?: Record<string, unknown>): void;\n}\n\n/**\n * Actor type for RBAC authorization\n * - user: Direct user request (via frontend)\n * - app: OAuth app acting on behalf of user\n * - service: M2M service-to-service communication\n * - super_admin: Platform administration (bypasses all checks)\n */\nexport type ActorType = 'user' | 'app' | 'service' | 'super_admin';\n\n/**\n * Cloudflare Access credentials that one inbound request presented.\n *\n * Request-scoped: carried only inside the request's bound async scope (see\n * `WorkspaceContext.cfAccess` and `ContextManager.getCfAccessHeaders`), never\n * in module state, so one request's credentials cannot reach another request\n * or background work.\n */\nexport interface CfAccessCredentials {\n /** Service-token client id, from the inbound `cf-access-client-id` header. */\n clientId?: string;\n /** Service-token client secret, from `cf-access-client-secret`. Sensitive, never log it. */\n clientSecret?: string;\n /** The `CF_Authorization` cookie value, forwarded as `x-cf-authorization`. Sensitive, never log it. */\n authorization?: string;\n}\n\n/**\n * Request context passed with every SDK operation\n */\nexport interface SDKContext {\n /** Actor ID - identifies the entity making the request */\n actorId?: string;\n /** Actor type - determines authorization behavior */\n actorType?: ActorType;\n /** Workspace ID */\n workspaceId?: string;\n /** Organization routing context for gateway calls. */\n organizationId?: string;\n /** Tenant ID */\n tenantId?: string;\n /** Project ID */\n projectId?: string;\n /** App ID */\n appId?: string;\n /** JWT token for authentication */\n token?: string;\n /** Product ID */\n productId?: string;\n /**\n * Cloudflare Access service-token client id, captured from the inbound\n * `cf-access-client-id` header. Re-presented on cross-layer outbound calls so\n * the peer layer's CF-Access-gated public gateway admits the request.\n */\n cfAccessClientId?: string;\n /**\n * Cloudflare Access service-token client secret, from `cf-access-client-secret`.\n * Sensitive — redacted by the SDK logger's secret pattern; never log directly.\n */\n cfAccessClientSecret?: string;\n /**\n * Cloudflare Access USER-SSO credential — the `CF_Authorization` cookie value,\n * forwarded by the public gateway as `x-cf-authorization`. On alpha a real user\n * request carries this (not the service-token pair); re-presented as the\n * `CF_Authorization` cookie on cross-layer outbound calls so the peer layer's\n * CF-Access-gated public gateway (same CF-Access app / shared AUD) admits it.\n * Sensitive — never log directly. See BOFF-2929.\n */\n cfAuthorization?: string;\n /** Additional custom context */\n [key: string]: unknown;\n}\n\n/**\n * SDK Error base class\n */\nexport class SDKError extends Error {\n constructor(\n message: string,\n public code: string,\n public details?: Record<string, unknown>\n ) {\n super(message);\n this.name = 'SDKError';\n Object.setPrototypeOf(this, SDKError.prototype);\n }\n}\n\n/**\n * Permission denied error\n */\nexport class PermissionDeniedError extends SDKError {\n constructor(message: string, details?: Record<string, unknown>) {\n super(message, 'PERMISSION_DENIED', details);\n this.name = 'PermissionDeniedError';\n Object.setPrototypeOf(this, PermissionDeniedError.prototype);\n }\n}\n\n/**\n * Authentication error\n */\nexport class AuthenticationError extends SDKError {\n constructor(message: string, details?: Record<string, unknown>) {\n super(message, 'AUTHENTICATION_ERROR', details);\n this.name = 'AuthenticationError';\n Object.setPrototypeOf(this, AuthenticationError.prototype);\n }\n}\n\n/**\n * API error from backend\n */\nexport class APIError extends SDKError {\n constructor(message: string, details?: Record<string, unknown>) {\n super(message, 'API_ERROR', details);\n this.name = 'APIError';\n Object.setPrototypeOf(this, APIError.prototype);\n }\n}\n\n/**\n * Validation error\n */\nexport class ValidationError extends SDKError {\n constructor(message: string, details?: Record<string, unknown>) {\n super(message, 'VALIDATION_ERROR', details);\n this.name = 'ValidationError';\n Object.setPrototypeOf(this, ValidationError.prototype);\n }\n}\n\n/**\n * Quota exceeded error\n */\nexport class QuotaExceededError extends SDKError {\n constructor(message: string, details?: Record<string, unknown>) {\n super(message, 'QUOTA_EXCEEDED', details);\n this.name = 'QuotaExceededError';\n Object.setPrototypeOf(this, QuotaExceededError.prototype);\n }\n}\n\n/**\n * Network error\n */\nexport class NetworkError extends SDKError {\n constructor(message: string, details?: Record<string, unknown>) {\n super(message, 'NETWORK_ERROR', details);\n this.name = 'NetworkError';\n Object.setPrototypeOf(this, NetworkError.prototype);\n }\n}\n\n/**\n * Timeout error\n */\nexport class TimeoutError extends SDKError {\n constructor(message: string, details?: Record<string, unknown>) {\n super(message, 'TIMEOUT_ERROR', details);\n this.name = 'TimeoutError';\n Object.setPrototypeOf(this, TimeoutError.prototype);\n }\n}\n\n/**\n * Event queue SDK configuration (Redis Streams backend).\n *\n * The publisher is created via `createPublisher()` from\n * `@burdenoff/be-sdk/event-queue` and reads `REDIS_URL` from the env.\n * The fields here are for client-name + reconnect tuning only.\n */\nexport interface EventQueueSDKConfig {\n /** Redis Streams server URL. Overrides `REDIS_URL` env if set. */\n url?: string;\n /** Optional password for TLS/auth */\n password?: string;\n /** Maximum reconnect attempts (default: -1 = infinite) */\n maxReconnectAttempts?: number;\n /** Reconnect time wait in milliseconds (default: 2000) */\n reconnectTimeWait?: number;\n /** Client name for logging (default: service name) */\n name?: string;\n /** Auto-connect on SDK initialization (default: true) */\n autoConnect?: boolean;\n}\n\n/**\n * Event queue health status\n */\nexport interface EventQueueHealthStatus {\n status: 'healthy' | 'unhealthy' | 'not_configured';\n connected: boolean;\n url?: string;\n details?: Record<string, unknown>;\n}\n\n/**\n * Temporal health status\n */\nexport interface TemporalHealthStatus {\n status: 'healthy' | 'unhealthy' | 'not_configured';\n connected: boolean;\n address?: string;\n namespace?: string;\n details?: Record<string, unknown>;\n}\n\n/**\n * Overall SDK health status\n */\nexport interface SDKHealthStatus {\n eventQueue: EventQueueHealthStatus;\n temporal: TemporalHealthStatus;\n}\n\n/**\n * SDK shutdown options\n */\nexport interface SDKShutdownOptions {\n /** Shutdown timeout in milliseconds (default: 5000) */\n timeout?: number;\n /** Force shutdown even if timeout is exceeded (default: true) */\n force?: boolean;\n}\n\n// ============================================================================\n// Layer Types Export\n// ============================================================================\n\n/**\n * Re-export all layer-related types for convenience\n */\nexport type {\n ServiceLayer,\n LayerConfig,\n LayerGatewayConfig,\n LayerResourceUrls,\n LayerFullConfig,\n GatewayRoutingConfig,\n CircuitBreakerConfig,\n GatewayRetryConfig,\n GatewayRequestHeaders,\n} from './layer.js';\n\nexport {\n DEFAULT_GATEWAY_ROUTING,\n DEFAULT_LAYER_RESOURCES,\n DEFAULT_LAYER_STREAMS,\n DEFAULT_CIRCUIT_BREAKER_CONFIG,\n DEFAULT_GATEWAY_RETRY_CONFIG,\n} from './layer.js';\n"],"mappings":";;;;;;AA+JA,IAAa,WAAb,MAAa,iBAAiB,MAAM;CAGzB;CACA;CAHT,YACE,SACA,AAAO,MACP,AAAO,SACP;EACA,MAAM,OAAO;EAHN;EACA;EAGP,KAAK,OAAO;EACZ,OAAO,eAAe,MAAM,SAAS,SAAS;CAChD;AACF;;;;AAKA,IAAa,wBAAb,MAAa,8BAA8B,SAAS;CAClD,YAAY,SAAiB,SAAmC;EAC9D,MAAM,SAAS,qBAAqB,OAAO;EAC3C,KAAK,OAAO;EACZ,OAAO,eAAe,MAAM,sBAAsB,SAAS;CAC7D;AACF;;;;AAKA,IAAa,sBAAb,MAAa,4BAA4B,SAAS;CAChD,YAAY,SAAiB,SAAmC;EAC9D,MAAM,SAAS,wBAAwB,OAAO;EAC9C,KAAK,OAAO;EACZ,OAAO,eAAe,MAAM,oBAAoB,SAAS;CAC3D;AACF;;;;AAKA,IAAa,WAAb,MAAa,iBAAiB,SAAS;CACrC,YAAY,SAAiB,SAAmC;EAC9D,MAAM,SAAS,aAAa,OAAO;EACnC,KAAK,OAAO;EACZ,OAAO,eAAe,MAAM,SAAS,SAAS;CAChD;AACF;;;;AAKA,IAAa,kBAAb,MAAa,wBAAwB,SAAS;CAC5C,YAAY,SAAiB,SAAmC;EAC9D,MAAM,SAAS,oBAAoB,OAAO;EAC1C,KAAK,OAAO;EACZ,OAAO,eAAe,MAAM,gBAAgB,SAAS;CACvD;AACF;;;;AAKA,IAAa,qBAAb,MAAa,2BAA2B,SAAS;CAC/C,YAAY,SAAiB,SAAmC;EAC9D,MAAM,SAAS,kBAAkB,OAAO;EACxC,KAAK,OAAO;EACZ,OAAO,eAAe,MAAM,mBAAmB,SAAS;CAC1D;AACF;;;;AAKA,IAAa,eAAb,MAAa,qBAAqB,SAAS;CACzC,YAAY,SAAiB,SAAmC;EAC9D,MAAM,SAAS,iBAAiB,OAAO;EACvC,KAAK,OAAO;EACZ,OAAO,eAAe,MAAM,aAAa,SAAS;CACpD;AACF;;;;AAKA,IAAa,eAAb,MAAa,qBAAqB,SAAS;CACzC,YAAY,SAAiB,SAAmC;EAC9D,MAAM,SAAS,iBAAiB,OAAO;EACvC,KAAK,OAAO;EACZ,OAAO,eAAe,MAAM,aAAa,SAAS;CACpD;AACF"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as PrismaClientBase, r as PrismaClientConstructorOptions } from "./client-NknQrWsP.js";
|
|
2
|
-
import { c as WorkspaceExtensionConfig } from "./workspace-extension-
|
|
2
|
+
import { c as WorkspaceExtensionConfig } from "./workspace-extension-C0qib11C.js";
|
|
3
3
|
import { r as I18nContext, s as LocaleCode } from "./types-DgaQqvxo.js";
|
|
4
4
|
import { o as AssistantSessionAttribution } from "./assistant-session-DA5ZKJOr.js";
|
|
5
5
|
import { GraphQLSchema } from "graphql";
|
package/dist/usage/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as OrgBillingUsageOperationInput, S as BillingUsageOperationInput, T as WorkspaceBillingUsageOperationInput, _ as UsageSummary, a as Quota, b as BillingUsageClient, c as SetQuotaOptions, d as TrackWorkspaceUsageOptions, f as UsageEntityType, g as UsageRecord, h as UsageOperationUnsupportedError, i as GetUsageOptions, l as TRACK_USAGE_MUTATION, m as UsageModule, n as CheckQuotaOptions, o as QuotaCheckResult, p as UsageMetricType, r as CheckWorkspaceQuotaOptions, s as QuotaPeriod, t as CHECK_WORKSPACE_QUOTA_QUERY, u as TrackUsageOptions, v as WorkspaceQuotaCheckResult, w as QuotaLimit, x as BillingUsageClientConfig, y as buildTrackUsageInput } from "../index-
|
|
1
|
+
import { C as OrgBillingUsageOperationInput, S as BillingUsageOperationInput, T as WorkspaceBillingUsageOperationInput, _ as UsageSummary, a as Quota, b as BillingUsageClient, c as SetQuotaOptions, d as TrackWorkspaceUsageOptions, f as UsageEntityType, g as UsageRecord, h as UsageOperationUnsupportedError, i as GetUsageOptions, l as TRACK_USAGE_MUTATION, m as UsageModule, n as CheckQuotaOptions, o as QuotaCheckResult, p as UsageMetricType, r as CheckWorkspaceQuotaOptions, s as QuotaPeriod, t as CHECK_WORKSPACE_QUOTA_QUERY, u as TrackUsageOptions, v as WorkspaceQuotaCheckResult, w as QuotaLimit, x as BillingUsageClientConfig, y as buildTrackUsageInput } from "../index-UQSbAERe.js";
|
|
2
2
|
export { BillingUsageClient, type BillingUsageClientConfig, type BillingUsageOperationInput, CHECK_WORKSPACE_QUOTA_QUERY, CheckQuotaOptions, CheckWorkspaceQuotaOptions, GetUsageOptions, type OrgBillingUsageOperationInput, Quota, QuotaCheckResult, type QuotaLimit, QuotaPeriod, SetQuotaOptions, TRACK_USAGE_MUTATION, TrackUsageOptions, TrackWorkspaceUsageOptions, UsageEntityType, UsageMetricType, UsageModule, UsageOperationUnsupportedError, UsageRecord, UsageSummary, type WorkspaceBillingUsageOperationInput, WorkspaceQuotaCheckResult, buildTrackUsageInput };
|