@burdenoff/be-sdk 2026.1121.1 → 2026.1123.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/auth/index.d.ts +1 -1
- package/dist/dsar-orchestrator-BlOSa9A_.js +126 -0
- package/dist/dsar-orchestrator-BlOSa9A_.js.map +1 -0
- package/dist/feature-flags/index.d.ts +1 -1
- package/dist/{index-CG6wj66Y.d.ts → index-CzMD97-N.d.ts} +40 -2
- package/dist/{index-Bh6W5JO4.d.ts → index-DS-tPMFi.d.ts} +23 -5
- package/dist/{index-BcqQs-Uq.d.ts → index-DSA8h4W3.d.ts} +2 -2
- package/dist/{index-YMGOJins.d.ts → index-nP7g1FZm.d.ts} +1 -1
- package/dist/index.d.ts +5 -4
- package/dist/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/dist/rbac/index.d.ts +2 -2
- package/dist/rbac/index.js +2 -2
- package/dist/{rbac-Dvz0YzEt.js → rbac-pRCcWVS_.js} +213 -31
- package/dist/rbac-pRCcWVS_.js.map +1 -0
- package/dist/server/index.d.ts +3 -3
- package/dist/server/index.js +6 -1
- package/dist/server/index.js.map +1 -1
- package/dist/tracker/index.js +1 -1
- package/dist/{tracker-Cl3cGKe-.js → tracker-BXW8-5Yx.js} +2 -2
- package/dist/{tracker-Cl3cGKe-.js.map → tracker-BXW8-5Yx.js.map} +1 -1
- package/dist/{types-CWybW61E.d.ts → types-De_pO1Wz.d.ts} +2 -0
- package/package.json +1 -1
- package/dist/rbac-Dvz0YzEt.js.map +0 -1
package/dist/auth/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as AuthCookieHelper, i as VerifyTokenResult, n as RefreshTokenResult, o as CookieOptions, r as TokenPayload, t as AuthModule } from "../index-
|
|
1
|
+
import { a as AuthCookieHelper, i as VerifyTokenResult, n as RefreshTokenResult, o as CookieOptions, r as TokenPayload, t as AuthModule } from "../index-nP7g1FZm.js";
|
|
2
2
|
export { AuthCookieHelper, AuthModule, CookieOptions, RefreshTokenResult, TokenPayload, VerifyTokenResult };
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
// src/server/dsar-orchestrator.ts
|
|
2
|
+
/**
|
|
3
|
+
* DSAR Orchestrator Identity Verification (BOFF-9550)
|
|
4
|
+
*
|
|
5
|
+
* Participant `*ExportSubject` and `*EraseSubject` mutations are high-impact
|
|
6
|
+
* cross-tenant operations: they can export or irreversibly erase all of a
|
|
7
|
+
* data subject's records across workspaces. Authorising them broadly by actor
|
|
8
|
+
* type (`service` or `super_admin`) allows any service in the fleet — or any
|
|
9
|
+
* caller able to reach an internal gateway as an arbitrary service — to invoke
|
|
10
|
+
* subject export/erasure.
|
|
11
|
+
*
|
|
12
|
+
* This helper enforces an explicit orchestrator allowlist (defaulting to
|
|
13
|
+
* `global-privacy-svc`) and binds to gateway-verified service identity
|
|
14
|
+
* (`x-verified-service-identity`, set only after `service-v1` JWT verification
|
|
15
|
+
* at the gateway) whenever present or required.
|
|
16
|
+
*
|
|
17
|
+
* @module server/dsar-orchestrator
|
|
18
|
+
*/
|
|
19
|
+
/** Canonical service identity of the DSAR orchestrator. */
|
|
20
|
+
const DEFAULT_DSAR_ORCHESTRATOR_ID = "global-privacy-svc";
|
|
21
|
+
/**
|
|
22
|
+
* Header stamped exclusively by API gateways after verifying a signed
|
|
23
|
+
* `service-v1` JWT (`sub === iss`, `actor_type === 'service'`).
|
|
24
|
+
* Gateways strip any caller-supplied copy of this header.
|
|
25
|
+
*/
|
|
26
|
+
const VERIFIED_SERVICE_IDENTITY_HEADER = "x-verified-service-identity";
|
|
27
|
+
/** Optional comma-separated override of allowed orchestrator service identities. */
|
|
28
|
+
const DSAR_ALLOWED_ORCHESTRATORS_ENV = "DSAR_ALLOWED_ORCHESTRATORS";
|
|
29
|
+
/**
|
|
30
|
+
* When set to `'true'`, participant mutations require the gateway-verified
|
|
31
|
+
* `x-verified-service-identity` header (rejecting unverified header-only calls).
|
|
32
|
+
*/
|
|
33
|
+
const DSAR_REQUIRE_VERIFIED_SERVICE_TOKEN_ENV = "DSAR_REQUIRE_VERIFIED_SERVICE_TOKEN";
|
|
34
|
+
/** Strict pattern for a valid service identity slug (no wildcards or whitespace). */
|
|
35
|
+
const SERVICE_IDENTITY_RE = /^[a-z0-9][a-z0-9._-]{0,127}$/;
|
|
36
|
+
/**
|
|
37
|
+
* Error thrown when a caller is not the authorized DSAR orchestrator.
|
|
38
|
+
* Carries `extensions.code = 'FORBIDDEN'` so GraphQL Yoga / gateways translate
|
|
39
|
+
* it to HTTP 403 with a stable machine-readable code.
|
|
40
|
+
*/
|
|
41
|
+
var DsarOrchestratorForbiddenError = class extends Error {
|
|
42
|
+
code = "FORBIDDEN";
|
|
43
|
+
reason;
|
|
44
|
+
extensions;
|
|
45
|
+
constructor(operation, reason) {
|
|
46
|
+
super(`Forbidden: ${operation} may only be invoked by the verified DSAR orchestrator`);
|
|
47
|
+
this.name = "DsarOrchestratorForbiddenError";
|
|
48
|
+
this.reason = reason;
|
|
49
|
+
this.extensions = {
|
|
50
|
+
code: "FORBIDDEN",
|
|
51
|
+
reason
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
function normalizeValue(raw) {
|
|
56
|
+
return typeof raw === "string" ? raw.trim().toLowerCase() : "";
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Parse and validate the allowed DSAR orchestrator service identities.
|
|
60
|
+
* Wildcards (`*`) and malformed entries are ignored; falls back to
|
|
61
|
+
* `['global-privacy-svc']` when no valid override is configured.
|
|
62
|
+
*/
|
|
63
|
+
function getAllowedDsarOrchestrators(env = process.env) {
|
|
64
|
+
const raw = env[DSAR_ALLOWED_ORCHESTRATORS_ENV];
|
|
65
|
+
if (typeof raw !== "string" || raw.trim().length === 0) return /* @__PURE__ */ new Set([DEFAULT_DSAR_ORCHESTRATOR_ID]);
|
|
66
|
+
const parsed = /* @__PURE__ */ new Set();
|
|
67
|
+
for (const part of raw.split(",")) {
|
|
68
|
+
const candidate = normalizeValue(part);
|
|
69
|
+
if (candidate && SERVICE_IDENTITY_RE.test(candidate)) parsed.add(candidate);
|
|
70
|
+
}
|
|
71
|
+
return parsed.size > 0 ? parsed : /* @__PURE__ */ new Set([DEFAULT_DSAR_ORCHESTRATOR_ID]);
|
|
72
|
+
}
|
|
73
|
+
function resolveAllowedSet(options) {
|
|
74
|
+
if (!options?.allowedOrchestrators) return getAllowedDsarOrchestrators(options?.env ?? process.env);
|
|
75
|
+
const result = /* @__PURE__ */ new Set();
|
|
76
|
+
for (const entry of options.allowedOrchestrators) {
|
|
77
|
+
const normalized = normalizeValue(entry);
|
|
78
|
+
if (normalized && SERVICE_IDENTITY_RE.test(normalized)) result.add(normalized);
|
|
79
|
+
}
|
|
80
|
+
return result;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Extract normalized caller identity fields from a GraphQL/service context.
|
|
84
|
+
*/
|
|
85
|
+
function resolveDsarCallerIdentity(ctx) {
|
|
86
|
+
if (!ctx) return {
|
|
87
|
+
actorType: "",
|
|
88
|
+
actorId: "",
|
|
89
|
+
verifiedServiceIdentity: ""
|
|
90
|
+
};
|
|
91
|
+
return {
|
|
92
|
+
actorType: normalizeValue(ctx.actorType ?? ctx.actor?.type),
|
|
93
|
+
actorId: normalizeValue(ctx.actorId ?? ctx.actor?.id),
|
|
94
|
+
verifiedServiceIdentity: normalizeValue(ctx.verifiedServiceIdentity ?? ctx.actor?.verifiedServiceIdentity)
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
function evaluateDsarOrchestrator(ctx, options) {
|
|
98
|
+
const { actorType, actorId, verifiedServiceIdentity } = resolveDsarCallerIdentity(ctx);
|
|
99
|
+
if (actorType !== "service") return "NON_SERVICE_ACTOR";
|
|
100
|
+
const env = options?.env ?? process.env;
|
|
101
|
+
if ((options?.requireVerifiedServiceIdentity ?? normalizeValue(env["DSAR_REQUIRE_VERIFIED_SERVICE_TOKEN"]) === "true") && !verifiedServiceIdentity) return "UNVERIFIED_SERVICE_IDENTITY";
|
|
102
|
+
if (verifiedServiceIdentity && actorId && verifiedServiceIdentity !== actorId) return "IDENTITY_MISMATCH";
|
|
103
|
+
const effectiveId = verifiedServiceIdentity || actorId;
|
|
104
|
+
if (!effectiveId) return "MISSING_ACTOR_ID";
|
|
105
|
+
if (!resolveAllowedSet(options).has(effectiveId)) return "NOT_ALLOWED_ORCHESTRATOR";
|
|
106
|
+
return null;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Return true iff the context represents an authorized DSAR orchestrator service.
|
|
110
|
+
*/
|
|
111
|
+
function isDsarOrchestratorActor(ctx, options) {
|
|
112
|
+
return evaluateDsarOrchestrator(ctx, options) === null;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Assert that the caller is the authorized DSAR orchestrator (`global-privacy-svc`
|
|
116
|
+
* by default). Refuses `user`, `app`, `super_admin`, and any other `service` actor.
|
|
117
|
+
*
|
|
118
|
+
* @throws {DsarOrchestratorForbiddenError} with `extensions.code === 'FORBIDDEN'`
|
|
119
|
+
*/
|
|
120
|
+
function assertDsarOrchestrator(ctx, operation, options) {
|
|
121
|
+
const rejection = evaluateDsarOrchestrator(ctx, options);
|
|
122
|
+
if (rejection !== null) throw new DsarOrchestratorForbiddenError(operation, rejection);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export { VERIFIED_SERVICE_IDENTITY_HEADER as a, isDsarOrchestratorActor as c, DsarOrchestratorForbiddenError as i, resolveDsarCallerIdentity as l, DSAR_ALLOWED_ORCHESTRATORS_ENV as n, assertDsarOrchestrator as o, DSAR_REQUIRE_VERIFIED_SERVICE_TOKEN_ENV as r, getAllowedDsarOrchestrators as s, DEFAULT_DSAR_ORCHESTRATOR_ID as t };
|
|
126
|
+
//# sourceMappingURL=dsar-orchestrator-BlOSa9A_.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dsar-orchestrator-BlOSa9A_.js","names":[],"sources":["../src/server/dsar-orchestrator.ts"],"sourcesContent":["/**\n * DSAR Orchestrator Identity Verification (BOFF-9550)\n *\n * Participant `*ExportSubject` and `*EraseSubject` mutations are high-impact\n * cross-tenant operations: they can export or irreversibly erase all of a\n * data subject's records across workspaces. Authorising them broadly by actor\n * type (`service` or `super_admin`) allows any service in the fleet — or any\n * caller able to reach an internal gateway as an arbitrary service — to invoke\n * subject export/erasure.\n *\n * This helper enforces an explicit orchestrator allowlist (defaulting to\n * `global-privacy-svc`) and binds to gateway-verified service identity\n * (`x-verified-service-identity`, set only after `service-v1` JWT verification\n * at the gateway) whenever present or required.\n *\n * @module server/dsar-orchestrator\n */\n\n/** Canonical service identity of the DSAR orchestrator. */\nexport const DEFAULT_DSAR_ORCHESTRATOR_ID = 'global-privacy-svc';\n\n/**\n * Header stamped exclusively by API gateways after verifying a signed\n * `service-v1` JWT (`sub === iss`, `actor_type === 'service'`).\n * Gateways strip any caller-supplied copy of this header.\n */\nexport const VERIFIED_SERVICE_IDENTITY_HEADER = 'x-verified-service-identity';\n\n/** Optional comma-separated override of allowed orchestrator service identities. */\nexport const DSAR_ALLOWED_ORCHESTRATORS_ENV = 'DSAR_ALLOWED_ORCHESTRATORS';\n\n/**\n * When set to `'true'`, participant mutations require the gateway-verified\n * `x-verified-service-identity` header (rejecting unverified header-only calls).\n */\nexport const DSAR_REQUIRE_VERIFIED_SERVICE_TOKEN_ENV = 'DSAR_REQUIRE_VERIFIED_SERVICE_TOKEN';\n\n/** Strict pattern for a valid service identity slug (no wildcards or whitespace). */\nconst SERVICE_IDENTITY_RE = /^[a-z0-9][a-z0-9._-]{0,127}$/;\n\n/**\n * Context shape accepted by the DSAR orchestrator guard.\n *\n * Supports both `@burdenoff/be-sdk`'s `GraphQLContext` (`ctx.actor.{id,type}`)\n * and legacy flat service contexts (`ctx.actorId`, `ctx.actorType`).\n */\nexport interface DsarOrchestratorContext {\n actor?: {\n id?: string | null;\n type?: string | null;\n verifiedServiceIdentity?: string | null;\n } | null;\n actorId?: string | null;\n actorType?: string | null;\n verifiedServiceIdentity?: string | null;\n}\n\nexport interface DsarOrchestratorOptions {\n /** Override the allowed orchestrator service identities (defaults to env / `global-privacy-svc`). */\n allowedOrchestrators?: ReadonlyArray<string> | ReadonlySet<string>;\n /**\n * When true, refuse callers that do not carry a gateway-verified service\n * identity (`x-verified-service-identity`). Defaults to\n * `env[DSAR_REQUIRE_VERIFIED_SERVICE_TOKEN_ENV] === 'true'`.\n */\n requireVerifiedServiceIdentity?: boolean;\n /** Environment map override for testing. */\n env?: Readonly<Record<string, string | undefined>>;\n}\n\nexport interface ResolvedDsarCaller {\n actorType: string;\n actorId: string;\n verifiedServiceIdentity: string;\n}\n\nexport type DsarOrchestratorRejectionReason =\n | 'NON_SERVICE_ACTOR'\n | 'MISSING_ACTOR_ID'\n | 'UNVERIFIED_SERVICE_IDENTITY'\n | 'IDENTITY_MISMATCH'\n | 'NOT_ALLOWED_ORCHESTRATOR';\n\n/**\n * Error thrown when a caller is not the authorized DSAR orchestrator.\n * Carries `extensions.code = 'FORBIDDEN'` so GraphQL Yoga / gateways translate\n * it to HTTP 403 with a stable machine-readable code.\n */\nexport class DsarOrchestratorForbiddenError extends Error {\n public readonly code = 'FORBIDDEN' as const;\n public readonly reason: DsarOrchestratorRejectionReason;\n public readonly extensions: {\n readonly code: 'FORBIDDEN';\n readonly reason: DsarOrchestratorRejectionReason;\n };\n\n constructor(operation: string, reason: DsarOrchestratorRejectionReason) {\n super(`Forbidden: ${operation} may only be invoked by the verified DSAR orchestrator`);\n this.name = 'DsarOrchestratorForbiddenError';\n this.reason = reason;\n this.extensions = { code: 'FORBIDDEN', reason };\n }\n}\n\nfunction normalizeValue(raw: string | null | undefined): string {\n return typeof raw === 'string' ? raw.trim().toLowerCase() : '';\n}\n\n/**\n * Parse and validate the allowed DSAR orchestrator service identities.\n * Wildcards (`*`) and malformed entries are ignored; falls back to\n * `['global-privacy-svc']` when no valid override is configured.\n */\nexport function getAllowedDsarOrchestrators(\n env: Readonly<Record<string, string | undefined>> = process.env\n): ReadonlySet<string> {\n const raw = env[DSAR_ALLOWED_ORCHESTRATORS_ENV];\n if (typeof raw !== 'string' || raw.trim().length === 0) {\n return new Set([DEFAULT_DSAR_ORCHESTRATOR_ID]);\n }\n\n const parsed = new Set<string>();\n for (const part of raw.split(',')) {\n const candidate = normalizeValue(part);\n if (candidate && SERVICE_IDENTITY_RE.test(candidate)) {\n parsed.add(candidate);\n }\n }\n\n return parsed.size > 0 ? parsed : new Set([DEFAULT_DSAR_ORCHESTRATOR_ID]);\n}\n\nfunction resolveAllowedSet(options?: DsarOrchestratorOptions): ReadonlySet<string> {\n if (!options?.allowedOrchestrators) {\n return getAllowedDsarOrchestrators(options?.env ?? process.env);\n }\n const result = new Set<string>();\n for (const entry of options.allowedOrchestrators) {\n const normalized = normalizeValue(entry);\n if (normalized && SERVICE_IDENTITY_RE.test(normalized)) {\n result.add(normalized);\n }\n }\n return result;\n}\n\n/**\n * Extract normalized caller identity fields from a GraphQL/service context.\n */\nexport function resolveDsarCallerIdentity(ctx: DsarOrchestratorContext | null | undefined): ResolvedDsarCaller {\n if (!ctx) {\n return { actorType: '', actorId: '', verifiedServiceIdentity: '' };\n }\n const actorType = normalizeValue(ctx.actorType ?? ctx.actor?.type);\n const actorId = normalizeValue(ctx.actorId ?? ctx.actor?.id);\n const verifiedServiceIdentity = normalizeValue(ctx.verifiedServiceIdentity ?? ctx.actor?.verifiedServiceIdentity);\n return { actorType, actorId, verifiedServiceIdentity };\n}\n\nfunction evaluateDsarOrchestrator(\n ctx: DsarOrchestratorContext | null | undefined,\n options?: DsarOrchestratorOptions\n): DsarOrchestratorRejectionReason | null {\n const { actorType, actorId, verifiedServiceIdentity } = resolveDsarCallerIdentity(ctx);\n\n if (actorType !== 'service') {\n return 'NON_SERVICE_ACTOR';\n }\n\n const env = options?.env ?? process.env;\n const requireVerified =\n options?.requireVerifiedServiceIdentity ?? normalizeValue(env[DSAR_REQUIRE_VERIFIED_SERVICE_TOKEN_ENV]) === 'true';\n\n if (requireVerified && !verifiedServiceIdentity) {\n return 'UNVERIFIED_SERVICE_IDENTITY';\n }\n\n if (verifiedServiceIdentity && actorId && verifiedServiceIdentity !== actorId) {\n return 'IDENTITY_MISMATCH';\n }\n\n const effectiveId = verifiedServiceIdentity || actorId;\n if (!effectiveId) {\n return 'MISSING_ACTOR_ID';\n }\n\n const allowed = resolveAllowedSet(options);\n if (!allowed.has(effectiveId)) {\n return 'NOT_ALLOWED_ORCHESTRATOR';\n }\n\n return null;\n}\n\n/**\n * Return true iff the context represents an authorized DSAR orchestrator service.\n */\nexport function isDsarOrchestratorActor(\n ctx: DsarOrchestratorContext | null | undefined,\n options?: DsarOrchestratorOptions\n): boolean {\n return evaluateDsarOrchestrator(ctx, options) === null;\n}\n\n/**\n * Assert that the caller is the authorized DSAR orchestrator (`global-privacy-svc`\n * by default). Refuses `user`, `app`, `super_admin`, and any other `service` actor.\n *\n * @throws {DsarOrchestratorForbiddenError} with `extensions.code === 'FORBIDDEN'`\n */\nexport function assertDsarOrchestrator(\n ctx: DsarOrchestratorContext | null | undefined,\n operation: string,\n options?: DsarOrchestratorOptions\n): void {\n const rejection = evaluateDsarOrchestrator(ctx, options);\n if (rejection !== null) {\n throw new DsarOrchestratorForbiddenError(operation, rejection);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAmBA,MAAa,+BAA+B;;;;;;AAO5C,MAAa,mCAAmC;;AAGhD,MAAa,iCAAiC;;;;;AAM9C,MAAa,0CAA0C;;AAGvD,MAAM,sBAAsB;;;;;;AAkD5B,IAAa,iCAAb,cAAoD,MAAM;CACxD,AAAgB,OAAO;CACvB,AAAgB;CAChB,AAAgB;CAKhB,YAAY,WAAmB,QAAyC;EACtE,MAAM,cAAc,UAAU,uDAAuD;EACrF,KAAK,OAAO;EACZ,KAAK,SAAS;EACd,KAAK,aAAa;GAAE,MAAM;GAAa;EAAO;CAChD;AACF;AAEA,SAAS,eAAe,KAAwC;CAC9D,OAAO,OAAO,QAAQ,WAAW,IAAI,KAAK,CAAC,CAAC,YAAY,IAAI;AAC9D;;;;;;AAOA,SAAgB,4BACd,MAAoD,QAAQ,KACvC;CACrB,MAAM,MAAM,IAAI;CAChB,IAAI,OAAO,QAAQ,YAAY,IAAI,KAAK,CAAC,CAAC,WAAW,GACnD,uBAAO,IAAI,IAAI,CAAC,4BAA4B,CAAC;CAG/C,MAAM,yBAAS,IAAI,IAAY;CAC/B,KAAK,MAAM,QAAQ,IAAI,MAAM,GAAG,GAAG;EACjC,MAAM,YAAY,eAAe,IAAI;EACrC,IAAI,aAAa,oBAAoB,KAAK,SAAS,GACjD,OAAO,IAAI,SAAS;CAExB;CAEA,OAAO,OAAO,OAAO,IAAI,yBAAS,IAAI,IAAI,CAAC,4BAA4B,CAAC;AAC1E;AAEA,SAAS,kBAAkB,SAAwD;CACjF,IAAI,CAAC,SAAS,sBACZ,OAAO,4BAA4B,SAAS,OAAO,QAAQ,GAAG;CAEhE,MAAM,yBAAS,IAAI,IAAY;CAC/B,KAAK,MAAM,SAAS,QAAQ,sBAAsB;EAChD,MAAM,aAAa,eAAe,KAAK;EACvC,IAAI,cAAc,oBAAoB,KAAK,UAAU,GACnD,OAAO,IAAI,UAAU;CAEzB;CACA,OAAO;AACT;;;;AAKA,SAAgB,0BAA0B,KAAqE;CAC7G,IAAI,CAAC,KACH,OAAO;EAAE,WAAW;EAAI,SAAS;EAAI,yBAAyB;CAAG;CAKnE,OAAO;EAAE,WAHS,eAAe,IAAI,aAAa,IAAI,OAAO,IAG5C;EAAG,SAFJ,eAAe,IAAI,WAAW,IAAI,OAAO,EAE/B;EAAG,yBADG,eAAe,IAAI,2BAA2B,IAAI,OAAO,uBACtC;CAAE;AACvD;AAEA,SAAS,yBACP,KACA,SACwC;CACxC,MAAM,EAAE,WAAW,SAAS,4BAA4B,0BAA0B,GAAG;CAErF,IAAI,cAAc,WAChB,OAAO;CAGT,MAAM,MAAM,SAAS,OAAO,QAAQ;CAIpC,KAFE,SAAS,kCAAkC,eAAe,0CAA4C,MAAM,WAEvF,CAAC,yBACtB,OAAO;CAGT,IAAI,2BAA2B,WAAW,4BAA4B,SACpE,OAAO;CAGT,MAAM,cAAc,2BAA2B;CAC/C,IAAI,CAAC,aACH,OAAO;CAIT,IAAI,CADY,kBAAkB,OACvB,CAAC,CAAC,IAAI,WAAW,GAC1B,OAAO;CAGT,OAAO;AACT;;;;AAKA,SAAgB,wBACd,KACA,SACS;CACT,OAAO,yBAAyB,KAAK,OAAO,MAAM;AACpD;;;;;;;AAQA,SAAgB,uBACd,KACA,WACA,SACM;CACN,MAAM,YAAY,yBAAyB,KAAK,OAAO;CACvD,IAAI,cAAc,MAChB,MAAM,IAAI,+BAA+B,WAAW,SAAS;AAEjE"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as FeatureFlagProvider, c as FlagEvaluation, i as createOperationsFlagGatePlugin, l as FlagType, n as GatedOperationType, o as EvaluationContext, r as OperationsFlagGatePluginOptions, s as FeatureFlagProviderConfig, u as ResolutionDetails } from "../index-
|
|
1
|
+
import { a as FeatureFlagProvider, c as FlagEvaluation, i as createOperationsFlagGatePlugin, l as FlagType, n as GatedOperationType, o as EvaluationContext, r as OperationsFlagGatePluginOptions, s as FeatureFlagProviderConfig, u as ResolutionDetails } from "../index-DSA8h4W3.js";
|
|
2
2
|
export { type EvaluationContext, FeatureFlagProvider, type FeatureFlagProviderConfig, type FlagEvaluation, type FlagType, type GatedOperationType, type OperationsFlagGatePluginOptions, type ResolutionDetails, createOperationsFlagGatePlugin };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as VerifiedDelegationContext, E as YogaPlugin, S as ServerInstance, _ as RESTEndpoint, a as IActor, d as ITenant, i as GraphQLContext, m as JWTPayload, w as WorkspaceSecret, y as ServerDefinition } from "./types-
|
|
1
|
+
import { C as VerifiedDelegationContext, E as YogaPlugin, S as ServerInstance, _ as RESTEndpoint, a as IActor, d as ITenant, i as GraphQLContext, m as JWTPayload, w as WorkspaceSecret, y as ServerDefinition } from "./types-De_pO1Wz.js";
|
|
2
2
|
import { E as I18n } from "./index-CPQDMSFS.js";
|
|
3
3
|
import { VerifyOptions } from "jsonwebtoken";
|
|
4
4
|
import { DocumentNode, GraphQLError } from "graphql";
|
|
@@ -93,6 +93,44 @@ declare function getDelegatedPrincipal(context: {
|
|
|
93
93
|
actor: IActor | null;
|
|
94
94
|
verifiedDelegation?: VerifiedDelegationContext;
|
|
95
95
|
}): DelegatedPrincipal | null;
|
|
96
|
+
declare const DEFAULT_DSAR_ORCHESTRATOR_ID = "global-privacy-svc";
|
|
97
|
+
declare const VERIFIED_SERVICE_IDENTITY_HEADER = "x-verified-service-identity";
|
|
98
|
+
declare const DSAR_ALLOWED_ORCHESTRATORS_ENV = "DSAR_ALLOWED_ORCHESTRATORS";
|
|
99
|
+
declare const DSAR_REQUIRE_VERIFIED_SERVICE_TOKEN_ENV = "DSAR_REQUIRE_VERIFIED_SERVICE_TOKEN";
|
|
100
|
+
interface DsarOrchestratorContext {
|
|
101
|
+
actor?: {
|
|
102
|
+
id?: string | null;
|
|
103
|
+
type?: string | null;
|
|
104
|
+
verifiedServiceIdentity?: string | null;
|
|
105
|
+
} | null;
|
|
106
|
+
actorId?: string | null;
|
|
107
|
+
actorType?: string | null;
|
|
108
|
+
verifiedServiceIdentity?: string | null;
|
|
109
|
+
}
|
|
110
|
+
interface DsarOrchestratorOptions {
|
|
111
|
+
allowedOrchestrators?: ReadonlyArray<string> | ReadonlySet<string>;
|
|
112
|
+
requireVerifiedServiceIdentity?: boolean;
|
|
113
|
+
env?: Readonly<Record<string, string | undefined>>;
|
|
114
|
+
}
|
|
115
|
+
interface ResolvedDsarCaller {
|
|
116
|
+
actorType: string;
|
|
117
|
+
actorId: string;
|
|
118
|
+
verifiedServiceIdentity: string;
|
|
119
|
+
}
|
|
120
|
+
type DsarOrchestratorRejectionReason = 'NON_SERVICE_ACTOR' | 'MISSING_ACTOR_ID' | 'UNVERIFIED_SERVICE_IDENTITY' | 'IDENTITY_MISMATCH' | 'NOT_ALLOWED_ORCHESTRATOR';
|
|
121
|
+
declare class DsarOrchestratorForbiddenError extends Error {
|
|
122
|
+
readonly code: "FORBIDDEN";
|
|
123
|
+
readonly reason: DsarOrchestratorRejectionReason;
|
|
124
|
+
readonly extensions: {
|
|
125
|
+
readonly code: 'FORBIDDEN';
|
|
126
|
+
readonly reason: DsarOrchestratorRejectionReason;
|
|
127
|
+
};
|
|
128
|
+
constructor(operation: string, reason: DsarOrchestratorRejectionReason);
|
|
129
|
+
}
|
|
130
|
+
declare function getAllowedDsarOrchestrators(env?: Readonly<Record<string, string | undefined>>): ReadonlySet<string>;
|
|
131
|
+
declare function resolveDsarCallerIdentity(ctx: DsarOrchestratorContext | null | undefined): ResolvedDsarCaller;
|
|
132
|
+
declare function isDsarOrchestratorActor(ctx: DsarOrchestratorContext | null | undefined, options?: DsarOrchestratorOptions): boolean;
|
|
133
|
+
declare function assertDsarOrchestrator(ctx: DsarOrchestratorContext | null | undefined, operation: string, options?: DsarOrchestratorOptions): void;
|
|
96
134
|
declare const MUTATION_AUDIT_ACTIVITY_TYPE = "graphql.mutation";
|
|
97
135
|
declare const MUTATION_AUDIT_RESOURCE_TYPE = "graphql_mutation";
|
|
98
136
|
interface MutationAuditPluginOptions {
|
|
@@ -145,4 +183,4 @@ declare function normalizeGraphQLResponse(response: Response, options?: ErrorNor
|
|
|
145
183
|
declare function createHumanReadableErrorPlugin(options?: ErrorNormalizationOptions): YogaPlugin;
|
|
146
184
|
declare function formatHttpError(error: unknown, options?: ErrorNormalizationOptions): HttpErrorResult;
|
|
147
185
|
declare function createHttpErrorResponse(error: unknown, options?: ErrorNormalizationOptions): Response;
|
|
148
|
-
export {
|
|
186
|
+
export { configureDefaultAuth as $, assertDsarOrchestrator as A, getContextOptions as B, DSAR_REQUIRE_VERIFIED_SERVICE_TOKEN_ENV as C, DsarOrchestratorRejectionReason as D, DsarOrchestratorOptions as E, getDelegatedPrincipal as F, createRawBodyRouter as G, OrdinaryRoute as H, resolveOnBehalfOf as I, createServer as J, extendRequestIdleTimeout as K, ContextBuilderOptions as L, isDsarOrchestratorActor as M, resolveDsarCallerIdentity as N, ResolvedDsarCaller as O, DelegatedPrincipal as P, configureAuth as Q, buildContext as R, DSAR_ALLOWED_ORCHESTRATORS_ENV as S, DsarOrchestratorForbiddenError as T, RawBodyResolution as U, MAX_IDLE_TIMEOUT_SECONDS as V, RawBodyRouter as W, FetchWorkspaceSecretFn as X, AuthConfig as Y, authCheck as Z, MutationAuditPluginOptions as _, UserFacingErrorOptions as a, tenantCheck as at, sanitizeAuditValue as b, createHumanReadableErrorPlugin as c, normalizeExecutionResultErrors as d, decodeJWT as et, normalizeGraphQLResponse as f, MUTATION_AUDIT_RESOURCE_TYPE as g, MUTATION_AUDIT_ACTIVITY_TYPE as h, NormalizedErrorState as i, requireWorkspace as it, getAllowedDsarOrchestrators as j, VERIFIED_SERVICE_IDENTITY_HEADER as k, formatHttpError as l, toUserFacingGraphQLError as m, HttpErrorPayload as n, generateSymmetricSecret as nt, UserFacingGraphQLError as o, verifyJWT as ot, normalizeGraphQLResponsePayload as p, configureServerAuth as q, HttpErrorResult as r, orgCheck as rt, createHttpErrorResponse as s, workspaceCheck as st, ErrorNormalizationOptions as t, fetchWorkspaceSecret as tt, normalizeError as u, createMutationAuditPlugin as v, DsarOrchestratorContext as w, DEFAULT_DSAR_ORCHESTRATOR_ID as x, getMutationFieldNames as y, configureContext as z };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { t as BurdenoffGraphQLClient } from "./graphql-C8jKLLel.js";
|
|
2
2
|
import { p as SDKContext } from "./index-BTaQMEgB.js";
|
|
3
3
|
import { m as ServiceLayer } from "./layer-C0zxAUgR.js";
|
|
4
|
+
import { DocumentNode, FieldNode, GraphQLSchema, OperationDefinitionNode } from "graphql";
|
|
4
5
|
type MaybePromise<T> = Promise<T> | T;
|
|
5
6
|
type AsyncIterableIteratorOrValue<T> = T | AsyncIterableIterator<T>;
|
|
6
7
|
type Maybe<T> = T | null | undefined;
|
|
@@ -18,14 +19,14 @@ interface ExecutionArgs {
|
|
|
18
19
|
typeResolver?: any;
|
|
19
20
|
subscribeFieldResolver?: any;
|
|
20
21
|
}
|
|
21
|
-
declare function parse(source: any, options?: any): any;
|
|
22
|
+
declare function parse$1(source: any, options?: any): any;
|
|
22
23
|
declare function execute(args: ExecutionArgs): any;
|
|
23
24
|
declare function subscribe(args: ExecutionArgs): any;
|
|
24
|
-
declare function validate(schema: any, documentAST: any, rules?: any, options?: any, typeInfo?: any): any;
|
|
25
|
+
declare function validate$1(schema: any, documentAST: any, rules?: any, options?: any, typeInfo?: any): any;
|
|
25
26
|
type ExecuteFunction = typeof execute;
|
|
26
27
|
type SubscribeFunction = typeof subscribe;
|
|
27
|
-
type ParseFunction = typeof parse;
|
|
28
|
-
type ValidateFunction = typeof validate;
|
|
28
|
+
type ParseFunction = typeof parse$1;
|
|
29
|
+
type ValidateFunction = typeof validate$1;
|
|
29
30
|
type ValidateFunctionParameter = {
|
|
30
31
|
/**
|
|
31
32
|
* GraphQL schema instance.
|
|
@@ -618,6 +619,23 @@ declare class RBACClient {
|
|
|
618
619
|
invalidateForActor(actorId: string): number;
|
|
619
620
|
getLayer(): RBACLayer;
|
|
620
621
|
}
|
|
622
|
+
declare const MAX_ROOT_FRAGMENT_DEPTH = 32;
|
|
623
|
+
type OperationResolution = {
|
|
624
|
+
ok: true;
|
|
625
|
+
operation: OperationDefinitionNode;
|
|
626
|
+
} | {
|
|
627
|
+
ok: false;
|
|
628
|
+
reason: string;
|
|
629
|
+
};
|
|
630
|
+
type RootFieldResolution = {
|
|
631
|
+
ok: true;
|
|
632
|
+
fields: FieldNode[];
|
|
633
|
+
} | {
|
|
634
|
+
ok: false;
|
|
635
|
+
reason: string;
|
|
636
|
+
};
|
|
637
|
+
declare function resolveOperation(document: DocumentNode, operationName?: string | null): OperationResolution;
|
|
638
|
+
declare function collectRootFields(document: DocumentNode, operation: OperationDefinitionNode, schema: GraphQLSchema | null): RootFieldResolution;
|
|
621
639
|
declare function createRBACDirective(config: RBACDirectiveConfig): Plugin;
|
|
622
640
|
interface LayerAwareRBACConfig extends Omit<RBACDirectiveConfig, 'rbacServiceUrl' | 'layer'> {
|
|
623
641
|
rbacServiceUrl?: string;
|
|
@@ -701,4 +719,4 @@ declare class RBACModule {
|
|
|
701
719
|
}): Promise<Role[]>;
|
|
702
720
|
getRole(roleId: string, workspaceId: string): Promise<Role | null>;
|
|
703
721
|
}
|
|
704
|
-
export { Permission as a, RoleDefaultPermission as c,
|
|
722
|
+
export { createRBACDirective as _, Permission as a, resolveOperation as b, RoleDefaultPermission as c, MAX_ROOT_FRAGMENT_DEPTH as d, OperationResolution as f, collectRootFields as g, RootFieldResolution as h, PBACPermissionLevel as i, createRBACClientFromEnv as l, RBACDirectiveConfig as m, EffectivePermissionEntry as n, RBACModule as o, RBACClient as p, PBACActorType as r, Role as s, CheckPermissionOptions as t, LayerAwareRBACConfig as u, createRBACDirectiveForLayer as v, createRBACDirectiveFromEnv as y };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { E as YogaPlugin } from "./types-
|
|
2
|
-
import "./index-
|
|
1
|
+
import { E as YogaPlugin } from "./types-De_pO1Wz.js";
|
|
2
|
+
import "./index-CzMD97-N.js";
|
|
3
3
|
type FlagType = 'BOOLEAN' | 'STRING' | 'NUMBER' | 'JSON';
|
|
4
4
|
interface EvaluationContext {
|
|
5
5
|
actorId?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as BurdenoffGraphQLClient } from "./graphql-C8jKLLel.js";
|
|
2
2
|
import { p as SDKContext } from "./index-BTaQMEgB.js";
|
|
3
|
-
import { i as GraphQLContext } from "./types-
|
|
3
|
+
import { i as GraphQLContext } from "./types-De_pO1Wz.js";
|
|
4
4
|
interface CookieOptions {
|
|
5
5
|
name: string;
|
|
6
6
|
value: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -2,9 +2,9 @@ import { a as DEFAULT_LAYER_RESOURCES, c as GatewayRetryConfig, d as LayerFullCo
|
|
|
2
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-BTaQMEgB.js";
|
|
3
3
|
import { c as index_d_exports$17, r as Logger } from "./index-KlrnELrN.js";
|
|
4
4
|
import { ContextManager } from "./context/index.js";
|
|
5
|
-
import { t as AuthModule } from "./index-
|
|
5
|
+
import { t as AuthModule } from "./index-nP7g1FZm.js";
|
|
6
6
|
import { _ as TenantNotificationsModule, o as NotificationsModule, v as tenant_notifications_d_exports } from "./index-Dw_0wE4q.js";
|
|
7
|
-
import {
|
|
7
|
+
import { _ as createRBACDirective, m as RBACDirectiveConfig, o as RBACModule, u as LayerAwareRBACConfig, v as createRBACDirectiveForLayer, y as createRBACDirectiveFromEnv } from "./index-DS-tPMFi.js";
|
|
8
8
|
import { Activity, ActivityActorType, ActivityModule, ActivityOperationUnsupportedError, GetActivitiesOptions, LogActivityOptions } from "./activity/index.js";
|
|
9
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-DWER4-_x.js";
|
|
10
10
|
import { r as TrackerModule } from "./index-DqpCL9kD.js";
|
|
@@ -38,11 +38,12 @@ import { a as index_d_exports$14 } from "./index-479i3w77.js";
|
|
|
38
38
|
import { a as index_d_exports$15 } from "./index-Base-sg5.js";
|
|
39
39
|
import { t as index_d_exports$3 } from "./index-BVOL7458.js";
|
|
40
40
|
import { t as index_d_exports$9 } from "./index-oJMtR3nl.js";
|
|
41
|
-
import { t as index_d_exports$7 } from "./index-
|
|
41
|
+
import { t as index_d_exports$7 } from "./index-DSA8h4W3.js";
|
|
42
42
|
import { a as index_d_exports$2, c as verifyCaptchaIfEnabled, n as RecaptchaVerifyResult, o as isCaptchaEnabled, s as verifyCaptcha, t as RecaptchaVerifyOptions } from "./index-yBSjMY32.js";
|
|
43
43
|
import { t as index_d_exports$20 } from "./index-DY3dNhMN.js";
|
|
44
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";
|
|
45
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";
|
|
46
|
+
import { A as assertDsarOrchestrator, C as DSAR_REQUIRE_VERIFIED_SERVICE_TOKEN_ENV, D as DsarOrchestratorRejectionReason, E as DsarOrchestratorOptions, M as isDsarOrchestratorActor, N as resolveDsarCallerIdentity, O as ResolvedDsarCaller, S as DSAR_ALLOWED_ORCHESTRATORS_ENV, T as DsarOrchestratorForbiddenError, j as getAllowedDsarOrchestrators, k as VERIFIED_SERVICE_IDENTITY_HEADER, w as DsarOrchestratorContext, x as DEFAULT_DSAR_ORCHESTRATOR_ID } from "./index-CzMD97-N.js";
|
|
46
47
|
interface TenantBackendClientConfig {
|
|
47
48
|
tenantBackendUrl: string;
|
|
48
49
|
workspacesBackendUrl?: string;
|
|
@@ -104,4 +105,4 @@ export declare class BurdenoffSDK {
|
|
|
104
105
|
static createBootstrap(config: Parameters<typeof createBootstrap>[0]): BootstrapModule;
|
|
105
106
|
}
|
|
106
107
|
export declare function createSDK(config: SDKConfig, context?: SDKContext): BurdenoffSDK;
|
|
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 };
|
|
108
|
+
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_DSAR_ORCHESTRATOR_ID, DEFAULT_GATEWAY_RETRY_CONFIG, DEFAULT_GATEWAY_ROUTING, DEFAULT_LAYER_RESOURCES, DEFAULT_LAYER_STREAMS, DSAR_ALLOWED_ORCHESTRATORS_ENV, DSAR_REQUIRE_VERIFIED_SERVICE_TOKEN_ENV, index_d_exports$4 as DataLoader, DatabaseModule, type DsarOrchestratorContext, DsarOrchestratorForbiddenError, type DsarOrchestratorOptions, type DsarOrchestratorRejectionReason, 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 ResolvedDsarCaller, 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, VERIFIED_SERVICE_IDENTITY_HEADER, type ValidatedUserFields, index_d_exports$26 as Validation, type WorkflowStartOptions, type WorkspaceBillingUsageOperationInput, type WorkspaceResourceCapScope, analyzeRbacCoverage, assertDsarOrchestrator, assertRbacCoverage, billingIdVariants, configureResourceCaps, createBootstrap, createInternalClient, createInternalClientForTenant, createInternalClientForWorkspaces, createRBACDirective, createRBACDirectiveForLayer, createRBACDirectiveFromEnv, createTranslator, disposeAll, emitBillingId, emitName, emitProductSlug, emitQuotaKey, emitRbacResource, emitTemplateKey, getAllowedDsarOrchestrators, getLanguage, getLocale, getRegisteredDisposableCount, getResourceCaps, hasI18n, isCaptchaEnabled, isDsarOrchestratorActor, isLegacyName, isSameBillingId, isSameGraphQLName, isSameName, isSameProductSlug, isSameQuotaKey, isSameRbacResource, isSameTemplateKey, lengthInCodePoints, nameVariants, normalizeBillingId, normalizeGraphQLName, normalizeProductSlug, normalizeQuotaKey, normalizeRbacResource, normalizeTemplateKey, productSlugVariants, quotaKeyVariants, rbacResourceVariants, readRenamedEnv, registerDisposable, resolveDsarCallerIdentity, t, templateKeyVariants, toCurrentName, toLegacyName, unregisterDisposable, validateName, validateUserFields, validateUsername, verifyCaptcha, verifyCaptchaIfEnabled };
|
package/dist/index.js
CHANGED
|
@@ -6,10 +6,10 @@ import { a as logger, o as logger_exports } from "./logger-B6rCpb7D.js";
|
|
|
6
6
|
import { ContextManager } from "./context/index.js";
|
|
7
7
|
import { t as AuthModule } from "./auth-C5ctwSLp.js";
|
|
8
8
|
import { c as tenant_notifications_exports, r as NotificationsModule, s as TenantNotificationsModule } from "./notifications-DY_i37WN.js";
|
|
9
|
-
import {
|
|
9
|
+
import { c as createRBACDirectiveFromEnv, o as createRBACDirective, s as createRBACDirectiveForLayer, t as RBACModule } from "./rbac-pRCcWVS_.js";
|
|
10
10
|
import { ActivityModule, ActivityOperationUnsupportedError } from "./activity/index.js";
|
|
11
11
|
import { a as UsageModule, c as BillingUsageClient } from "./usage-ygkKsxdd.js";
|
|
12
|
-
import { t as TrackerModule } from "./tracker-
|
|
12
|
+
import { t as TrackerModule } from "./tracker-BXW8-5Yx.js";
|
|
13
13
|
import { DatabaseModule } from "./database/index.js";
|
|
14
14
|
import { T as EventsModule, t as event_queue_exports } from "./event-queue-CKvgAqF3.js";
|
|
15
15
|
import { a as unregisterDisposable, i as registerDisposable, n as disposeAll, r as getRegisteredDisposableCount, t as lifecycle_exports } from "./lifecycle-DeoLSX0U.js";
|
|
@@ -46,6 +46,7 @@ import { i as verifyCaptchaIfEnabled, n as isCaptchaEnabled, r as verifyCaptcha,
|
|
|
46
46
|
import { t as platform_exports } from "./platform-DZwczW7v.js";
|
|
47
47
|
import { C as NAME_MIN_LENGTH, S as NAME_MAX_LENGTH, T as validateName, b as USERNAME_MIN_LENGTH, f as RbacCoverageError, m as assertRbacCoverage, p as analyzeRbacCoverage, t as validation_exports, v as validateUserFields, w as lengthInCodePoints, x as validateUsername, y as USERNAME_MAX_LENGTH } from "./validation-CPUITdMk.js";
|
|
48
48
|
import { A as rbacResourceVariants, C as normalizeProductSlug, D as productSlugVariants, E as normalizeTemplateKey, M as templateKeyVariants, N as toCurrentName, O as product_alias_exports, P as toLegacyName, S as normalizeGraphQLName, T as normalizeRbacResource, _ as isSameQuotaKey, a as billingIdVariants, b as nameVariants, c as emitProductSlug, d as emitTemplateKey, f as isLegacyName, g as isSameProductSlug, h as isSameName, i as RENAME_CONCERNS, j as readRenamedEnv, k as quotaKeyVariants, l as emitQuotaKey, m as isSameGraphQLName, n as PRODUCT_RENAME_EMIT, o as emitBillingId, p as isSameBillingId, r as PRODUCT_SLUG_ALIASES, s as emitName, t as PRODUCT_RENAMES, u as emitRbacResource, v as isSameRbacResource, w as normalizeQuotaKey, x as normalizeBillingId, y as isSameTemplateKey } from "./product-alias-BPqtskMq.js";
|
|
49
|
+
import { a as VERIFIED_SERVICE_IDENTITY_HEADER, c as isDsarOrchestratorActor, i as DsarOrchestratorForbiddenError, l as resolveDsarCallerIdentity, n as DSAR_ALLOWED_ORCHESTRATORS_ENV, o as assertDsarOrchestrator, r as DSAR_REQUIRE_VERIFIED_SERVICE_TOKEN_ENV, s as getAllowedDsarOrchestrators, t as DEFAULT_DSAR_ORCHESTRATOR_ID } from "./dsar-orchestrator-BlOSa9A_.js";
|
|
49
50
|
import { GraphQLClient } from "graphql-request";
|
|
50
51
|
|
|
51
52
|
// src/client/graphql.ts
|
|
@@ -787,5 +788,5 @@ function createSDK(config, context) {
|
|
|
787
788
|
return new BurdenoffSDK(config, context);
|
|
788
789
|
}
|
|
789
790
|
|
|
790
|
-
export { ActivityModule, ActivityOperationUnsupportedError, ai_credits_exports as AiCredits, AuthModule, BillingUsageClient, BootstrapModule, BurdenoffGraphQLClient, BurdenoffSDK, BurdenoffSDK as default, cache_exports as Cache, captcha_exports as Captcha, ContextManager, crypto_exports as Crypto, DEFAULT_CIRCUIT_BREAKER_CONFIG, DEFAULT_GATEWAY_RETRY_CONFIG, DEFAULT_GATEWAY_ROUTING, DEFAULT_LAYER_RESOURCES, DEFAULT_LAYER_STREAMS, dataloader_exports as DataLoader, DatabaseModule, event_queue_exports as EventQueue, EventsModule, export_exports as Export, feature_flags_exports as FeatureFlags, files_exports as Files, gateway_exports as Gateway, graph_exports as Graph, GraphModule, graphql_exports as GraphQL, i18n_exports as I18n, init_exports as Init, instrumentation_exports as Instrumentation, layer_exports as Layer, lifecycle_exports as Lifecycle, logger_exports as Logger, middleware_exports as Middleware, NAME_MAX_LENGTH, NAME_MIN_LENGTH, tenant_notifications_exports as Notifications, NotificationsModule, observability_exports as Observability, PRODUCT_RENAMES, PRODUCT_RENAME_EMIT, PRODUCT_SLUG_ALIASES, PaymentsModule, platform_exports as Platform, prisma_exports as Prisma, product_alias_exports as ProductAlias, RBACModule, RENAME_CONCERNS, RESOURCE_CAP_DEFAULTS, RbacCoverageError, ResourceCapExceededError, ResourceCapsModule, SearchModule, sharing_exports as Sharing, tags_exports as Tags, TemporalClient, TemporalClientFactory, TemporalModule, TemporalWorker, TemporalWorkerFactory, TemporalWorkerManager, TenantBackendClient, TrackerModule, TranslationModule, USERNAME_MAX_LENGTH, USERNAME_MIN_LENGTH, UsageModule, utils_exports as Utils, validation_exports as Validation, analyzeRbacCoverage, assertRbacCoverage, billingIdVariants, configureResourceCaps, createBootstrap, createInternalClient, createInternalClientForTenant, createInternalClientForWorkspaces, createRBACDirective, createRBACDirectiveForLayer, createRBACDirectiveFromEnv, createSDK, createTenantBackendClient, 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 };
|
|
791
|
+
export { ActivityModule, ActivityOperationUnsupportedError, ai_credits_exports as AiCredits, AuthModule, BillingUsageClient, BootstrapModule, BurdenoffGraphQLClient, BurdenoffSDK, BurdenoffSDK as default, cache_exports as Cache, captcha_exports as Captcha, ContextManager, crypto_exports as Crypto, DEFAULT_CIRCUIT_BREAKER_CONFIG, DEFAULT_DSAR_ORCHESTRATOR_ID, DEFAULT_GATEWAY_RETRY_CONFIG, DEFAULT_GATEWAY_ROUTING, DEFAULT_LAYER_RESOURCES, DEFAULT_LAYER_STREAMS, DSAR_ALLOWED_ORCHESTRATORS_ENV, DSAR_REQUIRE_VERIFIED_SERVICE_TOKEN_ENV, dataloader_exports as DataLoader, DatabaseModule, DsarOrchestratorForbiddenError, event_queue_exports as EventQueue, EventsModule, export_exports as Export, feature_flags_exports as FeatureFlags, files_exports as Files, gateway_exports as Gateway, graph_exports as Graph, GraphModule, graphql_exports as GraphQL, i18n_exports as I18n, init_exports as Init, instrumentation_exports as Instrumentation, layer_exports as Layer, lifecycle_exports as Lifecycle, logger_exports as Logger, middleware_exports as Middleware, NAME_MAX_LENGTH, NAME_MIN_LENGTH, tenant_notifications_exports as Notifications, NotificationsModule, observability_exports as Observability, PRODUCT_RENAMES, PRODUCT_RENAME_EMIT, PRODUCT_SLUG_ALIASES, PaymentsModule, platform_exports as Platform, prisma_exports as Prisma, product_alias_exports as ProductAlias, RBACModule, RENAME_CONCERNS, RESOURCE_CAP_DEFAULTS, RbacCoverageError, ResourceCapExceededError, ResourceCapsModule, SearchModule, sharing_exports as Sharing, tags_exports as Tags, TemporalClient, TemporalClientFactory, TemporalModule, TemporalWorker, TemporalWorkerFactory, TemporalWorkerManager, TenantBackendClient, TrackerModule, TranslationModule, USERNAME_MAX_LENGTH, USERNAME_MIN_LENGTH, UsageModule, utils_exports as Utils, VERIFIED_SERVICE_IDENTITY_HEADER, validation_exports as Validation, analyzeRbacCoverage, assertDsarOrchestrator, assertRbacCoverage, billingIdVariants, configureResourceCaps, createBootstrap, createInternalClient, createInternalClientForTenant, createInternalClientForWorkspaces, createRBACDirective, createRBACDirectiveForLayer, createRBACDirectiveFromEnv, createSDK, createTenantBackendClient, createTranslator, disposeAll, emitBillingId, emitName, emitProductSlug, emitQuotaKey, emitRbacResource, emitTemplateKey, getAllowedDsarOrchestrators, getLanguage, getLocale, getRegisteredDisposableCount, getResourceCaps, hasI18n, isCaptchaEnabled, isDsarOrchestratorActor, isLegacyName, isSameBillingId, isSameGraphQLName, isSameName, isSameProductSlug, isSameQuotaKey, isSameRbacResource, isSameTemplateKey, lengthInCodePoints, nameVariants, normalizeBillingId, normalizeGraphQLName, normalizeProductSlug, normalizeQuotaKey, normalizeRbacResource, normalizeTemplateKey, productSlugVariants, quotaKeyVariants, rbacResourceVariants, readRenamedEnv, registerDisposable, resolveDsarCallerIdentity, t, templateKeyVariants, toCurrentName, toLegacyName, unregisterDisposable, validateName, validateUserFields, validateUsername, verifyCaptcha, verifyCaptchaIfEnabled };
|
|
791
792
|
//# sourceMappingURL=index.js.map
|