@burdenoff/be-sdk 2026.1031.1 → 2026.1101.1

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 (38) hide show
  1. package/dist/auth/index.d.ts +2 -2
  2. package/dist/{chunk-5ZP576CV.js → chunk-3MEZRD4Z.js} +2 -2
  3. package/dist/{chunk-5ZP576CV.js.map → chunk-3MEZRD4Z.js.map} +1 -1
  4. package/dist/{chunk-6GL4SLU7.js → chunk-5CJBZZLS.js} +82 -15
  5. package/dist/chunk-5CJBZZLS.js.map +1 -0
  6. package/dist/chunk-CKL6U4XE.js +883 -0
  7. package/dist/chunk-CKL6U4XE.js.map +1 -0
  8. package/dist/{chunk-57GT6PJK.js → chunk-X3RYQ74H.js} +5 -471
  9. package/dist/chunk-X3RYQ74H.js.map +1 -0
  10. package/dist/client-DSI_760t.d.ts +36 -0
  11. package/dist/feature-flags/index.d.ts +3 -3
  12. package/dist/gateway/index.d.ts +2 -1
  13. package/dist/i18n/index.d.ts +3 -3
  14. package/dist/{i18n-DrdPTann.d.ts → i18n-Qm2AkPC-.d.ts} +1 -1
  15. package/dist/{index-B2YkcG0J.d.ts → index--yvpa6ay.d.ts} +1 -1
  16. package/dist/{index-DJCb-l2J.d.ts → index-DXPFlxpZ.d.ts} +2 -127
  17. package/dist/{index-D4l1u8VR.d.ts → index-lFffh5-G.d.ts} +2 -2
  18. package/dist/{index-szTxGaO6.d.ts → index-wGuKj5rr.d.ts} +3 -35
  19. package/dist/index.d.ts +11 -8
  20. package/dist/index.js +8 -6
  21. package/dist/index.js.map +1 -1
  22. package/dist/init/index.js +1 -1
  23. package/dist/server/index.d.ts +5 -75
  24. package/dist/server/index.js +6 -4
  25. package/dist/server/index.js.map +1 -1
  26. package/dist/tracker/index.d.ts +4 -1
  27. package/dist/tracker/index.js +11 -1
  28. package/dist/{types-C8TbSdEj.d.ts → types-DVpvrAhd.d.ts} +1 -1
  29. package/dist/{types-DLFCJD3D.d.ts → types-USOv09qy.d.ts} +86 -2
  30. package/dist/usage/index.d.ts +179 -0
  31. package/dist/usage/index.js +16 -0
  32. package/dist/usage/index.js.map +1 -0
  33. package/dist/workspace-guard-ADPSEN6E.js +5 -0
  34. package/dist/{workspace-guard-7PEZT3ZJ.js.map → workspace-guard-ADPSEN6E.js.map} +1 -1
  35. package/package.json +2 -2
  36. package/dist/chunk-57GT6PJK.js.map +0 -1
  37. package/dist/chunk-6GL4SLU7.js.map +0 -1
  38. package/dist/workspace-guard-7PEZT3ZJ.js +0 -5
@@ -1,4 +1,4 @@
1
- export { getSDKState, initializeBurdenoffSDK, isSDKInitialized, resetSDK } from '../chunk-5ZP576CV.js';
1
+ export { getSDKState, initializeBurdenoffSDK, isSDKInitialized, resetSDK } from '../chunk-3MEZRD4Z.js';
2
2
  import '../chunk-MZCBEJ67.js';
3
3
  import '../chunk-AWPNRV3L.js';
4
4
  import '../chunk-6H4T2ADQ.js';
@@ -1,13 +1,13 @@
1
- import { W as WorkspaceSecret, I as IActor, J as JWTPayload, S as ServerDefinition, a as ServerInstance, R as RESTEndpoint, b as ITenant, G as GraphQLContext, V as VerifiedDelegationContext, Y as YogaPlugin } from '../types-DLFCJD3D.js';
2
- export { A as ActorProvenance, C as ConsentContext, E as ElysiaApp, c as IContextFilterInput, d as IOperationContext, e as IOrganization, f as IProduct, g as IProject, h as ITracking, i as IWorkspace, M as ModuleGraphConfig, P as PrismaClientConstructor, j as ServerConfig, k as ServerI18nConfig, l as ServerInfo, m as WspaceGraphQLContext } from '../types-DLFCJD3D.js';
1
+ import { W as WorkspaceSecret, I as IActor, J as JWTPayload, S as ServerDefinition, a as ServerInstance, R as RESTEndpoint, b as ITenant, G as GraphQLContext, V as VerifiedDelegationContext, Y as YogaPlugin } from '../types-USOv09qy.js';
2
+ export { A as ActorProvenance, C as ConsentContext, E as ElysiaApp, c as IContextFilterInput, d as IOperationContext, e as IOrganization, f as IProduct, g as IProject, h as ITracking, i as IWorkspace, M as ModuleGraphConfig, P as PrismaClientConstructor, j as ServerConfig, k as ServerI18nConfig, l as ServerInfo, m as WorkspaceGuardConfig, n as WorkspaceMembershipValidation, o as WspaceGraphQLContext, p as createWorkspaceGuardPlugin } from '../types-USOv09qy.js';
3
3
  import * as jose from 'jose';
4
4
  import { VerifyOptions } from 'jsonwebtoken';
5
- import { I as I18n } from '../i18n-DrdPTann.js';
5
+ import { I as I18n } from '../i18n-Qm2AkPC-.js';
6
6
  export { c as ACTOR_ORIGIN_HEADER, a as AI_ASSISTANT_ACTOR_ORIGIN, d as ASSISTANT_CORRELATION_ID_HEADER, e as ASSISTANT_SESSION_ID_HEADER, b as ActorOrigin, A as AssistantSessionAttribution, p as parseAssistantSessionHeaders, r as readAssistantSessionAttribution, t as toAssistantSessionAttribution } from '../assistant-session-CJZhF4D6.js';
7
7
  import { DocumentNode, GraphQLError } from 'graphql';
8
8
  import { Plugin } from 'graphql-yoga';
9
9
  export { s as suppressMutationAudit } from '../explicit-activity-scope-CCoxVwAr.js';
10
- export { I as I18nContext, L as LocaleCode } from '../types-C8TbSdEj.js';
10
+ export { b as I18nContext, L as LocaleCode } from '../types-DVpvrAhd.js';
11
11
  export { P as PrismaClientBase } from '../client-CCXpAZ2r.js';
12
12
  import '../workspace-extension-BGwTOV_r.js';
13
13
  import '@prisma/adapter-pg';
@@ -107,76 +107,6 @@ declare function getDelegatedPrincipal(context: {
107
107
  verifiedDelegation?: VerifiedDelegationContext;
108
108
  }): DelegatedPrincipal | null;
109
109
 
110
- interface WorkspaceGuardConfig {
111
- enabled?: boolean;
112
- whitelistedOperations?: string[];
113
- errorMessage?: string;
114
- allowPublicDirective?: boolean;
115
- }
116
- interface FieldLikeDef {
117
- astNode?: {
118
- directives?: ReadonlyArray<{
119
- name: {
120
- value: string;
121
- };
122
- arguments?: ReadonlyArray<{
123
- name: {
124
- value: string;
125
- };
126
- value: {
127
- kind: string;
128
- value?: unknown;
129
- };
130
- }>;
131
- }>;
132
- };
133
- }
134
- interface SchemaLike {
135
- getQueryType?: () => {
136
- getFields: () => Record<string, FieldLikeDef>;
137
- } | null | undefined;
138
- getMutationType?: () => {
139
- getFields: () => Record<string, FieldLikeDef>;
140
- } | null | undefined;
141
- getSubscriptionType?: () => {
142
- getFields: () => Record<string, FieldLikeDef>;
143
- } | null | undefined;
144
- }
145
- interface DocumentLike {
146
- definitions?: ReadonlyArray<{
147
- kind?: string;
148
- operation?: string;
149
- name?: {
150
- value?: string;
151
- };
152
- selectionSet?: {
153
- selections?: ReadonlyArray<{
154
- kind?: string;
155
- name?: {
156
- value?: string;
157
- };
158
- }>;
159
- };
160
- }>;
161
- }
162
- declare function createWorkspaceGuardPlugin(config?: WorkspaceGuardConfig): {
163
- onExecute?: undefined;
164
- } | {
165
- onExecute({ args, }: {
166
- args: {
167
- schema?: SchemaLike;
168
- document?: DocumentLike;
169
- operationName?: string | null;
170
- contextValue?: {
171
- workspace?: {
172
- id?: string;
173
- };
174
- request?: Request;
175
- };
176
- };
177
- }): undefined;
178
- };
179
-
180
110
  declare const MUTATION_AUDIT_ACTIVITY_TYPE = "graphql.mutation";
181
111
  declare const MUTATION_AUDIT_RESOURCE_TYPE = "graphql_mutation";
182
112
  interface MutationAuditPluginOptions {
@@ -231,4 +161,4 @@ declare function createHumanReadableErrorPlugin(options?: ErrorNormalizationOpti
231
161
  declare function formatHttpError(error: unknown, options?: ErrorNormalizationOptions): HttpErrorResult;
232
162
  declare function createHttpErrorResponse(error: unknown, options?: ErrorNormalizationOptions): Response;
233
163
 
234
- export { type AuthConfig, type ContextBuilderOptions, type DelegatedPrincipal, type ErrorNormalizationOptions, type FetchWorkspaceSecretFn, GraphQLContext, type HttpErrorPayload, type HttpErrorResult, IActor, ITenant, JWTPayload, MAX_IDLE_TIMEOUT_SECONDS, MUTATION_AUDIT_ACTIVITY_TYPE, MUTATION_AUDIT_RESOURCE_TYPE, type MutationAuditPluginOptions, type NormalizedErrorState, type OrdinaryRoute, RESTEndpoint, type RawBodyResolution, type RawBodyRouter, ServerDefinition, ServerInstance, type UserFacingErrorOptions, UserFacingGraphQLError, VerifiedDelegationContext, type WorkspaceGuardConfig, WorkspaceSecret, YogaPlugin, authCheck, buildContext, configureAuth, configureContext, configureDefaultAuth, configureServerAuth, createHttpErrorResponse, createHumanReadableErrorPlugin, createMutationAuditPlugin, createRawBodyRouter, createServer, createWorkspaceGuardPlugin, decodeJWT, extendRequestIdleTimeout, fetchWorkspaceSecret, formatHttpError, generateSymmetricSecret, getContextOptions, getDelegatedPrincipal, getMutationFieldNames, normalizeError, normalizeExecutionResultErrors, normalizeGraphQLResponse, normalizeGraphQLResponsePayload, orgCheck, requireWorkspace, resolveOnBehalfOf, sanitizeAuditValue, tenantCheck, toUserFacingGraphQLError, verifyJWT, workspaceCheck };
164
+ export { type AuthConfig, type ContextBuilderOptions, type DelegatedPrincipal, type ErrorNormalizationOptions, type FetchWorkspaceSecretFn, GraphQLContext, type HttpErrorPayload, type HttpErrorResult, IActor, ITenant, JWTPayload, MAX_IDLE_TIMEOUT_SECONDS, MUTATION_AUDIT_ACTIVITY_TYPE, MUTATION_AUDIT_RESOURCE_TYPE, type MutationAuditPluginOptions, type NormalizedErrorState, type OrdinaryRoute, RESTEndpoint, type RawBodyResolution, type RawBodyRouter, ServerDefinition, ServerInstance, type UserFacingErrorOptions, UserFacingGraphQLError, VerifiedDelegationContext, WorkspaceSecret, YogaPlugin, authCheck, buildContext, configureAuth, configureContext, configureDefaultAuth, configureServerAuth, createHttpErrorResponse, createHumanReadableErrorPlugin, createMutationAuditPlugin, createRawBodyRouter, createServer, decodeJWT, extendRequestIdleTimeout, fetchWorkspaceSecret, formatHttpError, generateSymmetricSecret, getContextOptions, getDelegatedPrincipal, getMutationFieldNames, normalizeError, normalizeExecutionResultErrors, normalizeGraphQLResponse, normalizeGraphQLResponsePayload, orgCheck, requireWorkspace, resolveOnBehalfOf, sanitizeAuditValue, tenantCheck, toUserFacingGraphQLError, verifyJWT, workspaceCheck };
@@ -1,5 +1,5 @@
1
- import { createHumanReadableErrorPlugin, formatHttpError, normalizeGraphQLResponse, createHttpErrorResponse } from '../chunk-6GL4SLU7.js';
2
- export { UserFacingGraphQLError, createHttpErrorResponse, createHumanReadableErrorPlugin, createWorkspaceGuardPlugin, formatHttpError, normalizeError, normalizeExecutionResultErrors, normalizeGraphQLResponse, normalizeGraphQLResponsePayload, toUserFacingGraphQLError } from '../chunk-6GL4SLU7.js';
1
+ import { createHumanReadableErrorPlugin, formatHttpError, normalizeGraphQLResponse, createHttpErrorResponse } from '../chunk-5CJBZZLS.js';
2
+ export { UserFacingGraphQLError, createHttpErrorResponse, createHumanReadableErrorPlugin, createWorkspaceGuardPlugin, formatHttpError, normalizeError, normalizeExecutionResultErrors, normalizeGraphQLResponse, normalizeGraphQLResponsePayload, toUserFacingGraphQLError } from '../chunk-5CJBZZLS.js';
3
3
  import { getWorkspaceQuotaRegistry } from '../chunk-WTEHAVBX.js';
4
4
  import { parseAssistantSessionHeaders, readAssistantSessionAttribution, trackOperation, createExplicitActivityScope, runInExplicitActivityScope } from '../chunk-TANAOLAV.js';
5
5
  export { ACTOR_ORIGIN_HEADER, AI_ASSISTANT_ACTOR_ORIGIN, ASSISTANT_CORRELATION_ID_HEADER, ASSISTANT_SESSION_ID_HEADER, parseAssistantSessionHeaders, readAssistantSessionAttribution, suppressMutationAudit, toAssistantSessionAttribution } from '../chunk-TANAOLAV.js';
@@ -942,7 +942,7 @@ async function createServer(definition) {
942
942
  const { initializeDatabase, getDb: getDb2, getDatabaseManager } = await import('../prisma/index.js');
943
943
  const { createSecurityPlugin } = await import('../middleware/index.js');
944
944
  const { createMetricsPlugin } = await import('../observability/index.js');
945
- const { createWorkspaceGuardPlugin: createWorkspaceGuardPlugin2 } = await import('../workspace-guard-7PEZT3ZJ.js');
945
+ const { createWorkspaceGuardPlugin: createWorkspaceGuardPlugin2 } = await import('../workspace-guard-ADPSEN6E.js');
946
946
  logger.info(`[Server] Initializing ${config.serviceName}...`);
947
947
  const boundary = config.boundary ?? (config.serviceName.startsWith("wspace-") ? "wspace" : config.serviceName.startsWith("global-") ? "global" : "wspace");
948
948
  const shouldEnableWorkspaceExtension = disableWorkspaceExtension === true ? false : disableWorkspaceExtension === false ? true : boundary === "wspace";
@@ -992,7 +992,9 @@ async function createServer(definition) {
992
992
  const workspaceGuardPlugins = workspaceGuardEnabled ? [
993
993
  createWorkspaceGuardPlugin2({
994
994
  enabled: true,
995
- whitelistedOperations: config.workspaceGuard?.whitelistedOperations
995
+ whitelistedOperations: config.workspaceGuard?.whitelistedOperations,
996
+ whitelistedFields: config.workspaceGuard?.whitelistedFields,
997
+ validateWorkspaceMembership: config.workspaceGuard?.validateWorkspaceMembership
996
998
  })
997
999
  ] : [];
998
1000
  const graphqlEndpoint = config.graphqlEndpoint || "/graphql";