@authhero/multi-tenancy 15.2.0 → 15.3.0
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/multi-tenancy.cjs +1 -1
- package/dist/multi-tenancy.mjs +2251 -1204
- package/dist/types/index.d.ts +5 -2
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/inheritance/legacy.d.ts.map +1 -1
- package/dist/types/inheritance/merge.d.ts +1 -0
- package/dist/types/inheritance/merge.d.ts.map +1 -1
- package/dist/types/inheritance/read.d.ts.map +1 -1
- package/dist/types/inheritance/types.d.ts +3 -1
- package/dist/types/inheritance/types.d.ts.map +1 -1
- package/dist/types/init.d.ts +28 -0
- package/dist/types/init.d.ts.map +1 -1
- package/dist/types/middleware/config-sync-mode.d.ts +36 -0
- package/dist/types/middleware/config-sync-mode.d.ts.map +1 -0
- package/dist/types/middleware/index.d.ts +3 -1
- package/dist/types/middleware/index.d.ts.map +1 -1
- package/dist/types/middleware/protect-synced.d.ts +1 -1
- package/dist/types/middleware/protect-synced.d.ts.map +1 -1
- package/dist/types/middleware/settings-inheritance.d.ts +20 -2
- package/dist/types/middleware/settings-inheritance.d.ts.map +1 -1
- package/dist/types/operations/enqueue.d.ts +8 -1
- package/dist/types/operations/enqueue.d.ts.map +1 -1
- package/dist/types/operations/index.d.ts +3 -1
- package/dist/types/operations/index.d.ts.map +1 -1
- package/dist/types/operations/recorder.d.ts +2 -0
- package/dist/types/operations/recorder.d.ts.map +1 -1
- package/dist/types/operations/sync-defaults.d.ts +55 -0
- package/dist/types/operations/sync-defaults.d.ts.map +1 -0
- package/dist/types/operations/types.d.ts +2 -0
- package/dist/types/operations/types.d.ts.map +1 -1
- package/dist/types/rollout/index.d.ts +2 -0
- package/dist/types/rollout/index.d.ts.map +1 -1
- package/dist/types/rollout/payload.d.ts +15 -0
- package/dist/types/rollout/payload.d.ts.map +1 -1
- package/dist/types/rollout/resolved-sync.d.ts +91 -0
- package/dist/types/rollout/resolved-sync.d.ts.map +1 -0
- package/dist/types/rollouts/advance.d.ts +44 -0
- package/dist/types/rollouts/advance.d.ts.map +1 -0
- package/dist/types/rollouts/config.d.ts +54 -0
- package/dist/types/rollouts/config.d.ts.map +1 -0
- package/dist/types/rollouts/controller.d.ts +29 -0
- package/dist/types/rollouts/controller.d.ts.map +1 -0
- package/dist/types/rollouts/enumerate.d.ts +25 -0
- package/dist/types/rollouts/enumerate.d.ts.map +1 -0
- package/dist/types/rollouts/hashes.d.ts +10 -0
- package/dist/types/rollouts/hashes.d.ts.map +1 -0
- package/dist/types/rollouts/index.d.ts +19 -0
- package/dist/types/rollouts/index.d.ts.map +1 -0
- package/dist/types/rollouts/plan.d.ts +29 -0
- package/dist/types/rollouts/plan.d.ts.map +1 -0
- package/dist/types/rollouts/reconcile.d.ts +38 -0
- package/dist/types/rollouts/reconcile.d.ts.map +1 -0
- package/dist/types/rollouts/status.d.ts +28 -0
- package/dist/types/rollouts/status.d.ts.map +1 -0
- package/dist/types/rollouts/trigger.d.ts +52 -0
- package/dist/types/rollouts/trigger.d.ts.map +1 -0
- package/dist/types/rollouts/types.d.ts +25 -0
- package/dist/types/rollouts/types.d.ts.map +1 -0
- package/dist/types/routes/tenants.d.ts.map +1 -1
- package/dist/types/types.d.ts +12 -0
- package/dist/types/types.d.ts.map +1 -1
- package/dist/types/utils/tenant-tree.d.ts +2 -1
- package/dist/types/utils/tenant-tree.d.ts.map +1 -1
- package/package.json +5 -5
package/dist/types/index.d.ts
CHANGED
|
@@ -3,14 +3,17 @@ import { MultiTenancyConfig, MultiTenancyHooks, MultiTenancyBindings, MultiTenan
|
|
|
3
3
|
export * from "./types";
|
|
4
4
|
export { initMultiTenant } from "./init";
|
|
5
5
|
export type { MultiTenantConfig, MultiTenantResult, ControlPlaneConfig, } from "./init";
|
|
6
|
-
export { createDirectRolloutAdapter, projectControlPlaneDefaults, buildControlPlaneDefaultsPayload, applyControlPlaneDefaultsPayload, } from "./rollout";
|
|
7
|
-
export type { ControlPlaneRolloutAdapter, DefaultsProjectionConfig, DefaultsProjectionEntities, DefaultsProjectionResult, EntityProjectionOutcome, ProjectableDefaults, ControlPlaneDefaultsPayload, ControlPlaneDefaultsApplyResult, ControlPlaneTenantSeed, DefaultsPayloadEntities, } from "./rollout";
|
|
6
|
+
export { createDirectRolloutAdapter, projectControlPlaneDefaults, buildControlPlaneDefaultsPayload, applyControlPlaneDefaultsPayload, applyResolvedConfigBlock, buildResolvedConfigBlock, findUndecryptableKeyIds, syncedRowId, } from "./rollout";
|
|
7
|
+
export type { ControlPlaneRolloutAdapter, DefaultsProjectionConfig, DefaultsProjectionEntities, DefaultsProjectionResult, EntityProjectionOutcome, ProjectableDefaults, ControlPlaneDefaultsPayload, ControlPlaneDefaultsApplyResult, ControlPlaneTenantSeed, DefaultsPayloadEntities, ApplyResolvedBlockOptions, ApplyResolvedBlockResult, BuildResolvedBlockOptions, ResolvedConfigBlock, SyncEntity, SyncEntityOutcome, } from "./rollout";
|
|
8
8
|
export * from "./operations";
|
|
9
|
+
export * from "./rollouts";
|
|
9
10
|
export { createSyncHooks } from "./hooks/sync";
|
|
10
11
|
export type { EntitySyncConfig, SyncHooksResult } from "./hooks/sync";
|
|
11
12
|
export { createTenantsOpenAPIRouter } from "./routes";
|
|
12
13
|
export { createMultiTenancyMiddleware, createAccessControlMiddleware, createControlPlaneTenantMiddleware, createSubdomainMiddleware, createDatabaseMiddleware, createProtectSyncedMiddleware, createRuntimeFallbackAdapter, withRuntimeFallback, withSystemResourceServerInheritance, mergeClientWithFallback, } from "./middleware";
|
|
13
14
|
export type { RuntimeFallbackConfig, ControlPlaneResolver } from "./middleware";
|
|
15
|
+
export { createConfigSyncResolver } from "./middleware";
|
|
16
|
+
export type { ConfigSyncResolver, ConfigSyncResolverOptions, } from "./middleware";
|
|
14
17
|
export * from "./inheritance";
|
|
15
18
|
export { createMultiTenancyPlugin } from "./plugin";
|
|
16
19
|
export type { AuthHeroPlugin } from "./plugin";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,oBAAoB,EACpB,qBAAqB,EACtB,MAAM,SAAS,CAAC;AAajB,cAAc,SAAS,CAAC;AAGxB,OAAO,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AACzC,YAAY,EACV,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,QAAQ,CAAC;AAKhB,OAAO,EACL,0BAA0B,EAC1B,2BAA2B,EAC3B,gCAAgC,EAChC,gCAAgC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,oBAAoB,EACpB,qBAAqB,EACtB,MAAM,SAAS,CAAC;AAajB,cAAc,SAAS,CAAC;AAGxB,OAAO,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AACzC,YAAY,EACV,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,QAAQ,CAAC;AAKhB,OAAO,EACL,0BAA0B,EAC1B,2BAA2B,EAC3B,gCAAgC,EAChC,gCAAgC,EAChC,wBAAwB,EACxB,wBAAwB,EACxB,uBAAuB,EACvB,WAAW,GACZ,MAAM,WAAW,CAAC;AACnB,YAAY,EACV,0BAA0B,EAC1B,wBAAwB,EACxB,0BAA0B,EAC1B,wBAAwB,EACxB,uBAAuB,EACvB,mBAAmB,EACnB,2BAA2B,EAC3B,+BAA+B,EAC/B,sBAAsB,EACtB,uBAAuB,EACvB,yBAAyB,EACzB,wBAAwB,EACxB,yBAAyB,EACzB,mBAAmB,EACnB,UAAU,EACV,iBAAiB,GAClB,MAAM,W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,kBAAkB;;;;;;;kBAnD9C,oBAAoB;mBACnB,qBAAqB;;;IAwDhC;;;;;;;OAOG;6BAES,OAAO,UAAU,EAAE,YAAY,qBACtB;QAAE,oBAAoB,CAAC,EAAE,MAAM,CAAA;KAAE;EAOzD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"legacy.d.ts","sourceRoot":"","sources":["../../../src/inheritance/legacy.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAiCrC;;;GAGG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,UAAU,EAClB,YAAY,EAAE,UAAU,GAAG,SAAS,GACnC,UAAU,
|
|
1
|
+
{"version":3,"file":"legacy.d.ts","sourceRoot":"","sources":["../../../src/inheritance/legacy.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAiCrC;;;GAGG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,UAAU,EAClB,YAAY,EAAE,UAAU,GAAG,SAAS,GACnC,UAAU,CAkCZ"}
|
|
@@ -17,6 +17,7 @@ export declare function effectiveScope(entity: ConfigEntity, row: Publishable):
|
|
|
17
17
|
* legacy merge behaves: the tenant's values win.
|
|
18
18
|
*/
|
|
19
19
|
export declare function effectiveOverride(row: Publishable): ConfigOverride;
|
|
20
|
+
export declare const SECRET_KEY: RegExp;
|
|
20
21
|
type Layer = ConfigRows;
|
|
21
22
|
/**
|
|
22
23
|
* Merges the config of a parent chain with the tenant's own, with no I/O.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"merge.d.ts","sourceRoot":"","sources":["../../../src/inheritance/merge.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,cAAc,EACd,WAAW,
|
|
1
|
+
{"version":3,"file":"merge.d.ts","sourceRoot":"","sources":["../../../src/inheritance/merge.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,cAAc,EACd,WAAW,EAKZ,MAAM,UAAU,CAAC;AAKlB,OAAO,EACL,YAAY,EACZ,UAAU,EACV,cAAc,EAEf,MAAM,SAAS,CAAC;AAEjB,KAAK,WAAW,GAAG;IACjB,KAAK,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;IAC3B,QAAQ,CAAC,EAAE,cAAc,GAAG,IAAI,CAAC;IACjC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,YAAY,EACpB,GAAG,EAAE,WAAW,GACf,WAAW,CAcb;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,WAAW,GAAG,cAAc,CAElE;AAED,eAAO,MAAM,UAAU,QAA+C,CAAC;AA0EvE,KAAK,KAAK,GAAG,UAAU,CAAC;AAExB;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,KAAK,GAAG,cAAc,CA0HzE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"read.d.ts","sourceRoot":"","sources":["../../../src/inheritance/read.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,
|
|
1
|
+
{"version":3,"file":"read.d.ts","sourceRoot":"","sources":["../../../src/inheritance/read.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAA8B,MAAM,UAAU,CAAC;AAEpE,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErC,6DAA6D;AAC7D,wBAAsB,cAAc,CAClC,QAAQ,EAAE,YAAY,EACtB,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,UAAU,CAAC,CA8BrB"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import type { Action, Branding, Connection, EmailProvider, Hook, PromptSetting, ResourceServer } from "authhero";
|
|
1
|
+
import type { Action, Branding, Connection, EmailProvider, Hook, HookCode, PromptSetting, ResourceServer } from "authhero";
|
|
2
2
|
/** Plain config rows for one tenant. Singletons are `null` when unset. */
|
|
3
3
|
export interface ConfigRows {
|
|
4
4
|
connections: Connection[];
|
|
5
5
|
resourceServers: ResourceServer[];
|
|
6
6
|
hooks: Hook[];
|
|
7
|
+
/** Code referenced by `code_id` of the code hooks in `hooks`. */
|
|
8
|
+
hookCode: HookCode[];
|
|
7
9
|
actions: Action[];
|
|
8
10
|
emailProvider: EmailProvider | null;
|
|
9
11
|
branding: Branding | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/inheritance/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,MAAM,EACN,QAAQ,EACR,UAAU,EACV,aAAa,EACb,IAAI,EACJ,aAAa,EACb,cAAc,EACf,MAAM,UAAU,CAAC;AAElB,0EAA0E;AAC1E,MAAM,WAAW,UAAU;IACzB,WAAW,EAAE,UAAU,EAAE,CAAC;IAC1B,eAAe,EAAE,cAAc,EAAE,CAAC;IAClC,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,aAAa,EAAE,aAAa,GAAG,IAAI,CAAC;IACpC,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAAC;IAC1B,cAAc,EAAE,aAAa,GAAG,IAAI,CAAC;CACtC;AAED,eAAO,MAAM,eAAe,QAAO,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/inheritance/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,MAAM,EACN,QAAQ,EACR,UAAU,EACV,aAAa,EACb,IAAI,EACJ,QAAQ,EACR,aAAa,EACb,cAAc,EACf,MAAM,UAAU,CAAC;AAElB,0EAA0E;AAC1E,MAAM,WAAW,UAAU;IACzB,WAAW,EAAE,UAAU,EAAE,CAAC;IAC1B,eAAe,EAAE,cAAc,EAAE,CAAC;IAClC,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,iEAAiE;IACjE,QAAQ,EAAE,QAAQ,EAAE,CAAC;IACrB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,aAAa,EAAE,aAAa,GAAG,IAAI,CAAC;IACpC,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAAC;IAC1B,cAAc,EAAE,aAAa,GAAG,IAAI,CAAC;CACtC;AAED,eAAO,MAAM,eAAe,QAAO,UASjC,CAAC;AAEH,MAAM,MAAM,YAAY,GACpB,YAAY,GACZ,gBAAgB,GAChB,MAAM,GACN,QAAQ,GACR,eAAe,GACf,UAAU,GACV,gBAAgB,CAAC;AAErB,iEAAiE;AACjE,MAAM,WAAW,cAAe,SAAQ,UAAU;IAChD;;;OAGG;IACH,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB"}
|
package/dist/types/init.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { init, AuthHeroConfig, DataAdapters } from "authhero";
|
|
2
|
+
import type { SyncConfigFn, TenantOperationExecutor } from "./operations";
|
|
3
|
+
import { type RolloutDeps } from "./rollouts";
|
|
2
4
|
import type { ControlPlaneResolver } from "./middleware";
|
|
3
5
|
import type { InheritanceShadowOptions } from "./inheritance";
|
|
4
6
|
/**
|
|
@@ -63,6 +65,19 @@ export interface MultiTenantConfig extends Omit<AuthHeroConfig, "entityHooks" |
|
|
|
63
65
|
* @default false
|
|
64
66
|
*/
|
|
65
67
|
inheritanceShadow?: boolean | InheritanceShadowOptions;
|
|
68
|
+
/**
|
|
69
|
+
* How the `sync-defaults` tenant operation reaches a tenant's database. The
|
|
70
|
+
* default syncs tenants that share the control plane's database in-process
|
|
71
|
+
* and refuses tenants with their own worker and database; pass a transport
|
|
72
|
+
* (for example a dispatch push to the tenant worker) to reach those.
|
|
73
|
+
*/
|
|
74
|
+
syncDefaults?: SyncConfigFn;
|
|
75
|
+
/**
|
|
76
|
+
* Starts the per-tenant operations of a fleet rollout. Defaults to the same
|
|
77
|
+
* inline executor as `sync-defaults` requests; Workflows deployments pass
|
|
78
|
+
* `createCloudflareWorkflowsExecutor(...)` so waves run durably.
|
|
79
|
+
*/
|
|
80
|
+
rolloutExecutor?: TenantOperationExecutor;
|
|
66
81
|
/**
|
|
67
82
|
* Control which entities to sync from control plane to child tenants.
|
|
68
83
|
* Set to `false` to disable all syncing.
|
|
@@ -112,6 +127,19 @@ export interface MultiTenantResult {
|
|
|
112
127
|
app: ReturnType<typeof init>["app"];
|
|
113
128
|
/** The control plane tenant ID */
|
|
114
129
|
controlPlaneTenantId: string;
|
|
130
|
+
/**
|
|
131
|
+
* What a scheduled handler needs to keep fleet rollouts moving, present when
|
|
132
|
+
* the control plane carries the rollouts and tenant operations adapters:
|
|
133
|
+
*
|
|
134
|
+
* ```typescript
|
|
135
|
+
* async scheduled(_event, env) {
|
|
136
|
+
* if (!rollouts) return;
|
|
137
|
+
* await reconcileConfigDrift(rollouts); // catches lost triggers
|
|
138
|
+
* await advanceRollouts(rollouts); // starts the next wave
|
|
139
|
+
* }
|
|
140
|
+
* ```
|
|
141
|
+
*/
|
|
142
|
+
rollouts?: RolloutDeps;
|
|
115
143
|
}
|
|
116
144
|
/**
|
|
117
145
|
* Initialize a multi-tenant AuthHero application with sensible defaults.
|
package/dist/types/init.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/init.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EACJ,cAAc,EAEd,YAAY,EAGb,MAAM,UAAU,CAAC;AAUlB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AAG9D;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;;OAIG;IACH,QA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AAE,CAAC,CAAC;IAE5C;;;;OAIG;IACH,WAAW,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,YAAY,CAAC,CAAC;CAC3D;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,8BAA8B;IAC9B,GAAG,EAAE,UAAU,CAAC,OAAO,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC;IACpC,kCAAkC;IAClC,oBAAoB,EAAE,MAAM,CAAC;IAC7B;;;;;;;;;;;OAWG;IACH,QAAQ,CAAC,EAAE,WAAW,CAAC;CACxB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0DG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,iBAAiB,GAAG,iBAAiB,CAoT5E"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { ResolvedControlPlane } from "./settings-inheritance";
|
|
2
|
+
/**
|
|
3
|
+
* Per-tenant config sync mode (docs/design/tenant-config-inheritance.md,
|
|
4
|
+
* section 5 step 3). A tenant in `synced` mode reads only its own database:
|
|
5
|
+
* the resolver below answers `undefined` ("do not inherit") for it, which every
|
|
6
|
+
* read-time inheritance path already understands.
|
|
7
|
+
*/
|
|
8
|
+
export interface ConfigSyncResolver {
|
|
9
|
+
/** The control plane to inherit from, or `undefined` for opted-out and synced tenants. */
|
|
10
|
+
resolve(params: {
|
|
11
|
+
tenant_id: string;
|
|
12
|
+
}): Promise<ResolvedControlPlane>;
|
|
13
|
+
/** Whether the tenant is in `synced` mode. Cached; never throws. */
|
|
14
|
+
isSynced(tenantId: string): Promise<boolean>;
|
|
15
|
+
/** Forget a tenant's cached mode (or all of them). */
|
|
16
|
+
invalidate(tenantId?: string): void;
|
|
17
|
+
}
|
|
18
|
+
export interface ConfigSyncResolverOptions {
|
|
19
|
+
/** The inheritance target for a tenant before the mode is considered. */
|
|
20
|
+
base: (tenantId: string) => Promise<ResolvedControlPlane>;
|
|
21
|
+
/** Reads the tenant row, from the raw (uncached) adapter. */
|
|
22
|
+
getTenant: (tenantId: string) => Promise<{
|
|
23
|
+
config_sync?: string | null;
|
|
24
|
+
} | null>;
|
|
25
|
+
/** The control plane tenant, which is never treated as synced. */
|
|
26
|
+
controlPlaneTenantId?: string;
|
|
27
|
+
/**
|
|
28
|
+
* How long a tenant's mode is remembered, per isolate. A mode change reaches
|
|
29
|
+
* other isolates within this time. @default 30000
|
|
30
|
+
*/
|
|
31
|
+
ttlMs?: number;
|
|
32
|
+
/** Upper bound on remembered tenants. @default 1000 */
|
|
33
|
+
maxEntries?: number;
|
|
34
|
+
}
|
|
35
|
+
export declare function createConfigSyncResolver(options: ConfigSyncResolverOptions): ConfigSyncResolver;
|
|
36
|
+
//# sourceMappingURL=config-sync-mode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config-sync-mode.d.ts","sourceRoot":"","sources":["../../../src/middleware/config-sync-mode.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAEnE;;;;;GAKG;AAEH,MAAM,WAAW,kBAAkB;IACjC,0FAA0F;IAC1F,OAAO,CAAC,MAAM,EAAE;QAAE,SAAS,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;IACtE,oEAAoE;IACpE,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAC7C,sDAAsD;IACtD,UAAU,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACrC;AAED,MAAM,WAAW,yBAAyB;IACxC,yEAAyE;IACzE,IAAI,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAC1D,6DAA6D;IAC7D,SAAS,EAAE,CACT,QAAQ,EAAE,MAAM,KACb,OAAO,CAAC;QAAE,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,GAAG,IAAI,CAAC,CAAC;IACrD,kEAAkE;IAClE,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,uDAAuD;IACvD,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,yBAAyB,GACjC,kBAAkB,CAwCpB"}
|
|
@@ -109,6 +109,8 @@ export declare function createMultiTenancyMiddleware(config: MultiTenancyConfig)
|
|
|
109
109
|
Variables: MultiTenancyVariables;
|
|
110
110
|
}>;
|
|
111
111
|
export { createProtectSyncedMiddleware } from "./protect-synced";
|
|
112
|
-
export { createRuntimeFallbackAdapter, withRuntimeFallback, withSystemResourceServerInheritance, mergeClientWithFallback, } from "./settings-inheritance";
|
|
112
|
+
export { createRuntimeFallbackAdapter, withRuntimeFallback, withSystemResourceServerInheritance, mergeClientWithFallback, buildResolver, } from "./settings-inheritance";
|
|
113
|
+
export { createConfigSyncResolver } from "./config-sync-mode";
|
|
114
|
+
export type { ConfigSyncResolver, ConfigSyncResolverOptions, } from "./config-sync-mode";
|
|
113
115
|
export type { RuntimeFallbackConfig, ControlPlaneResolver, } from "./settings-inheritance";
|
|
114
116
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/middleware/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AAGzC,OAAO,EACL,oBAAoB,EACpB,qBAAqB,EACrB,kBAAkB,EACnB,MAAM,UAAU,CAAC;AAIlB;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,kCAAkC,CAChD,oBAAoB,EAAE,MAAM,GAC3B,iBAAiB,CAAC;IACnB,QAAQ,EAAE,oBAAoB,CAAC;IAC/B,SAAS,EAAE,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":["../../../src/middleware/protect-synced.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AAEzC,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"protect-synced.d.ts","sourceRoot":"","sources":["../../../src/middleware/protect-synced.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAC;AAEzC,OAAO,EAAiB,KAAK,YAAY,EAAE,MAAM,UAAU,CAAC;AAG5D;;GAEG;AACH,UAAU,qBAAqB;IAC7B,IAAI,EAAE,YAAY,CAAC;CACpB;AAED;;GAEG;AACH,UAAU,sBAAsB;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,YAAY,CAAC;CACrB;AAoRD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,6BAA6B,IAAI,iBAAiB,CAAC;IACjE,QAAQ,EAAE,qBAAqB,CAAC;IAChC,SAAS,EAAE,sBAAsB,CAAC;CACnC,CAAC,CA0CD"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { DataAdapters, Connection, Client, ResourceServer, ResourceServerScope } from "authhero";
|
|
2
2
|
import { InheritanceShadowOptions } from "../inheritance/report";
|
|
3
|
+
import { ConfigSyncResolver } from "./config-sync-mode";
|
|
3
4
|
/**
|
|
4
5
|
* Merges a connection with control plane fallback options.
|
|
5
6
|
*/
|
|
@@ -30,7 +31,7 @@ export declare function mergeClientWithFallback(client: Client, controlPlaneClie
|
|
|
30
31
|
* Resolved inheritance target for a single tenant. `undefined` means the
|
|
31
32
|
* tenant opts out of inheritance entirely.
|
|
32
33
|
*/
|
|
33
|
-
type ResolvedControlPlane = {
|
|
34
|
+
export type ResolvedControlPlane = {
|
|
34
35
|
tenantId: string;
|
|
35
36
|
clientId?: string;
|
|
36
37
|
} | undefined;
|
|
@@ -45,6 +46,17 @@ type ResolvedControlPlane = {
|
|
|
45
46
|
export type ControlPlaneResolver = (params: {
|
|
46
47
|
tenant_id: string;
|
|
47
48
|
}) => ResolvedControlPlane | Promise<ResolvedControlPlane>;
|
|
49
|
+
/**
|
|
50
|
+
* Builds a single resolver from either a static `{tenantId, clientId}` pair
|
|
51
|
+
* or a user-supplied resolver. The user-supplied resolver, when present,
|
|
52
|
+
* fully replaces the static fallback — that's the lever a caller uses to
|
|
53
|
+
* disable inheritance for individual tenants by returning `undefined`.
|
|
54
|
+
*/
|
|
55
|
+
export declare function buildResolver(config: {
|
|
56
|
+
controlPlaneTenantId?: string;
|
|
57
|
+
controlPlaneClientId?: string;
|
|
58
|
+
resolveControlPlane?: ControlPlaneResolver;
|
|
59
|
+
}): (tenantId: string) => Promise<ResolvedControlPlane>;
|
|
48
60
|
/**
|
|
49
61
|
* Wraps data adapters with is_system-gated resource server scope inheritance
|
|
50
62
|
* from a control plane tenant.
|
|
@@ -98,6 +110,13 @@ export interface RuntimeFallbackConfig {
|
|
|
98
110
|
* @default false
|
|
99
111
|
*/
|
|
100
112
|
inheritanceShadow?: boolean | InheritanceShadowOptions;
|
|
113
|
+
/**
|
|
114
|
+
* Per-tenant `config_sync` mode support. Tenants in `synced` mode read only
|
|
115
|
+
* their own database. Pass a resolver to share its cache with other adapters
|
|
116
|
+
* (the management adapter); omit it and one is created. Failed lookups fall
|
|
117
|
+
* back to inheriting.
|
|
118
|
+
*/
|
|
119
|
+
configSync?: ConfigSyncResolver;
|
|
101
120
|
}
|
|
102
121
|
/**
|
|
103
122
|
* Creates a data adapter wrapper that provides runtime settings fallback from a control plane tenant.
|
|
@@ -162,5 +181,4 @@ export declare function isInheritableHook(hook: unknown): boolean;
|
|
|
162
181
|
* ```
|
|
163
182
|
*/
|
|
164
183
|
export declare function withRuntimeFallback(baseAdapters: DataAdapters, config: RuntimeFallbackConfig): DataAdapters;
|
|
165
|
-
export {};
|
|
166
184
|
//# sourceMappingURL=settings-inheritance.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings-inheritance.d.ts","sourceRoot":"","sources":["../../../src/middleware/settings-inheritance.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,UAAU,EACV,MAAM,EACN,cAAc,EACd,mBAAmB,EAGpB,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,wBAAwB,EAEzB,MAAM,uBAAuB,CAAC;AAE/B;;GAEG;AACH,wBAAgB,2BAA2B,CACzC,UAAU,EAAE,UAAU,EACtB,uBAAuB,EAAE,UAAU,EAAE,GACpC,UAAU,CAwBZ;AAcD;;;GAGG;AACH,wBAAgB,yBAAyB,CACvC,YAAY,EAAE,mBAAmB,EAAE,GAAG,SAAS,EAC/C,kBAAkB,EAAE,mBAAmB,EAAE,GAAG,SAAS,GACpD,mBAAmB,EAAE,CAmBvB;AAED;;GAEG;AACH,wBAAgB,+BAA+B,CAC7C,cAAc,EAAE,cAAc,EAC9B,0BAA0B,EAAE,cAAc,GAAG,IAAI,GAChD,cAAc,CAYhB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,MAAM,EACd,kBAAkB,EAAE,MAAM,GAAG,IAAI,GAChC,MAAM,CAqBR;AAED;;;GAGG;AACH,
|
|
1
|
+
{"version":3,"file":"settings-inheritance.d.ts","sourceRoot":"","sources":["../../../src/middleware/settings-inheritance.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,UAAU,EACV,MAAM,EACN,cAAc,EACd,mBAAmB,EAGpB,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,wBAAwB,EAEzB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACL,kBAAkB,EAEnB,MAAM,oBAAoB,CAAC;AAE5B;;GAEG;AACH,wBAAgB,2BAA2B,CACzC,UAAU,EAAE,UAAU,EACtB,uBAAuB,EAAE,UAAU,EAAE,GACpC,UAAU,CAwBZ;AAcD;;;GAGG;AACH,wBAAgB,yBAAyB,CACvC,YAAY,EAAE,mBAAmB,EAAE,GAAG,S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;OAWG;IACH,mBAAmB,CAAC,EAAE,oBAAoB,CAAC;IAE3C;;;;;;;OAOG;IACH,iBAAiB,CAAC,EAAE,OAAO,GAAG,wBAAwB,CAAC;IAEvD;;;;;OAKG;IACH,UAAU,CAAC,EAAE,kBAAkB,CAAC;CACjC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,wBAAgB,4BAA4B,CAC1C,YAAY,EAAE,YAAY,EAC1B,MAAM,EAAE,qBAAqB,GAC5B,YAAY,CA6Ld;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,CAKxD;AA2FD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,mBAAmB,CACjC,YAAY,EAAE,YAAY,EAC1B,MAAM,EAAE,qBAAqB,GAC5B,YAAY,CAEd"}
|
|
@@ -13,5 +13,12 @@ export declare function createOperationRow(stores: TenantOperationStores, params
|
|
|
13
13
|
* finalized it) and the error is rethrown so callers keep their existing
|
|
14
14
|
* failure semantics.
|
|
15
15
|
*/
|
|
16
|
-
export declare function enqueueTenantOperation(stores: TenantOperationStores, executor: TenantOperationExecutor, params: EnqueueTenantOperationParams
|
|
16
|
+
export declare function enqueueTenantOperation(stores: TenantOperationStores, executor: TenantOperationExecutor, params: EnqueueTenantOperationParams, options?: {
|
|
17
|
+
/**
|
|
18
|
+
* Resolve with the failed operation row instead of rethrowing when the
|
|
19
|
+
* executor's run fails. For operations whose row is the deliverable
|
|
20
|
+
* (a sync reports its outcome there), not for callers that need the error.
|
|
21
|
+
*/
|
|
22
|
+
returnFailed?: boolean;
|
|
23
|
+
}): Promise<TenantOperation>;
|
|
17
24
|
//# sourceMappingURL=enqueue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enqueue.d.ts","sourceRoot":"","sources":["../../../src/operations/enqueue.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EACL,4BAA4B,EAC5B,uBAAuB,EACvB,qBAAqB,EACtB,MAAM,SAAS,CAAC;AAIjB;;;;GAIG;AACH,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,qBAAqB,EAC7B,MAAM,EAAE,4BAA4B,EACpC,MAAM,EAAE,uBAAuB,CAAC,QAAQ,CAAC,GACxC,OAAO,CAAC,eAAe,CAAC,
|
|
1
|
+
{"version":3,"file":"enqueue.d.ts","sourceRoot":"","sources":["../../../src/operations/enqueue.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EACL,4BAA4B,EAC5B,uBAAuB,EACvB,qBAAqB,EACtB,MAAM,SAAS,CAAC;AAIjB;;;;GAIG;AACH,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,qBAAqB,EAC7B,MAAM,EAAE,4BAA4B,EACpC,MAAM,EAAE,uBAAuB,CAAC,QAAQ,CAAC,GACxC,OAAO,CAAC,eAAe,CAAC,CA0B1B;AAED;;;;;;GAMG;AACH,wBAAsB,sBAAsB,CAC1C,MAAM,EAAE,qBAAqB,EAC7B,QAAQ,EAAE,uBAAuB,EACjC,MAAM,EAAE,4BAA4B,EACpC,OAAO,GAAE;IACP;;;;OAIG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;CACnB,GACL,OAAO,CAAC,eAAe,CAAC,CAmC1B"}
|
|
@@ -4,6 +4,8 @@ export { createOperationRecorder, errorToMessage, isTerminalStatus, } from "./re
|
|
|
4
4
|
export type { OperationRecorder } from "./recorder";
|
|
5
5
|
export { createInlineExecutor, inlineStepRunner } from "./inline-executor";
|
|
6
6
|
export type { InlineExecutorConfig, TenantOperationDefinitions, TenantOperationStep, TenantOperationStepContext, } from "./inline-executor";
|
|
7
|
-
export { enqueueTenantOperation } from "./enqueue";
|
|
7
|
+
export { createOperationRow, enqueueTenantOperation } from "./enqueue";
|
|
8
|
+
export { createInProcessSyncConfig, runSyncDefaultsStep, summarizeSyncResult, syncErrors, syncOptionsOf, } from "./sync-defaults";
|
|
9
|
+
export type { SyncConfigFn, SyncConfigOptions } from "./sync-defaults";
|
|
8
10
|
export { runRecordedTenantOperation } from "./record-provision";
|
|
9
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/operations/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,UAAU,EACV,UAAU,EACV,YAAY,EACZ,qBAAqB,EACrB,uBAAuB,EACvB,4BAA4B,GAC7B,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EACL,uBAAuB,EACvB,cAAc,EACd,gBAAgB,GACjB,MAAM,YAAY,CAAC;AACpB,YAAY,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC3E,YAAY,EACV,oBAAoB,EACpB,0BAA0B,EAC1B,mBAAmB,EACnB,0BAA0B,GAC3B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/operations/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,UAAU,EACV,UAAU,EACV,YAAY,EACZ,qBAAqB,EACrB,uBAAuB,EACvB,4BAA4B,GAC7B,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EACL,uBAAuB,EACvB,cAAc,EACd,gBAAgB,GACjB,MAAM,YAAY,CAAC;AACpB,YAAY,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC3E,YAAY,EACV,oBAAoB,EACpB,0BAA0B,EAC1B,mBAAmB,EACnB,0BAA0B,GAC3B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;AACvE,OAAO,EACL,yBAAyB,EACzB,mBAAmB,EACnB,mBAAmB,EACnB,UAAU,EACV,aAAa,GACd,MAAM,iBAAiB,CAAC;AACzB,YAAY,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACvE,OAAO,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -20,6 +20,8 @@ export declare function createOperationRecorder(stores: TenantOperationStores):
|
|
|
20
20
|
detail?: Record<string, unknown>;
|
|
21
21
|
attempt?: number;
|
|
22
22
|
}): Promise<void>;
|
|
23
|
+
/** Stores the operation's outcome (e.g. a dry-run diff). Idempotent. */
|
|
24
|
+
setResult(operationId: string, result: Record<string, unknown>): Promise<void>;
|
|
23
25
|
markSucceeded(operationId: string): Promise<void>;
|
|
24
26
|
markFailed(operationId: string, error: unknown): Promise<void>;
|
|
25
27
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recorder.d.ts","sourceRoot":"","sources":["../../../src/operations/recorder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAIhD,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAcrD;AAED;;;;;;;;;GASG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,qBAAqB;6BAIlC,MAAM,gBAAgB,MAAM;gCAOzB,MAAM,QAAQ,MAAM;6BAKvC,MAAM,SACZ;QACL,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EACH,SAAS,GACT,WAAW,GACX,QAAQ,GACR,SAAS,GACT,SAAS,GACT,YAAY,CAAC;QACjB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QACjC,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB;+
|
|
1
|
+
{"version":3,"file":"recorder.d.ts","sourceRoot":"","sources":["../../../src/operations/recorder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAIhD,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAcrD;AAED;;;;;;;;;GASG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,qBAAqB;6BAIlC,MAAM,gBAAgB,MAAM;gCAOzB,MAAM,QAAQ,MAAM;6BAKvC,MAAM,SACZ;QACL,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EACH,SAAS,GACT,WAAW,GACX,QAAQ,GACR,SAAS,GACT,SAAS,GACT,YAAY,CAAC;QACjB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QACjC,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB;IAWH,wEAAwE;2BAC3C,MAAM,UAAU,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;+BAInC,MAAM;4BAQT,MAAM,SAAS,OAAO;EAQvD;AAED,MAAM,MAAM,iBAAiB,GAAG,UAAU,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAE3E,2EAA2E;AAC3E,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,eAAe,CAAC,QAAQ,CAAC,GAAG,OAAO,CAI3E"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { DataAdapters, TenantOperation } from "authhero";
|
|
2
|
+
import { ApplyResolvedBlockResult } from "../rollout/resolved-sync";
|
|
3
|
+
import type { ControlPlaneResolver } from "../middleware";
|
|
4
|
+
import type { OperationRecorder } from "./recorder";
|
|
5
|
+
/**
|
|
6
|
+
* The `sync-defaults` tenant operation (docs/design/tenant-config-inheritance.md
|
|
7
|
+
* sections 4.1 and 5 step 4): sync one tenant's resolved parent-chain config
|
|
8
|
+
* into its own database, as a tracked operation with history.
|
|
9
|
+
*
|
|
10
|
+
* Execution is split from transport. The steps below are shared by the inline
|
|
11
|
+
* and the Cloudflare Workflows executor; how the block reaches the tenant's
|
|
12
|
+
* database (in-process, or pushed to a tenant worker) is a `SyncConfigFn`.
|
|
13
|
+
*/
|
|
14
|
+
export interface SyncConfigOptions {
|
|
15
|
+
/** Compute and report the diff; write nothing. */
|
|
16
|
+
dryRun: boolean;
|
|
17
|
+
/** Apply even when the tenant's stored hash equals the block's. */
|
|
18
|
+
force: boolean;
|
|
19
|
+
}
|
|
20
|
+
/** Syncs one tenant and returns what happened (or, for a dry run, what would). */
|
|
21
|
+
export type SyncConfigFn = (tenantId: string, options: SyncConfigOptions) => Promise<ApplyResolvedBlockResult>;
|
|
22
|
+
/** Reads the operation's `input` (fixed at creation, never secrets). */
|
|
23
|
+
export declare function syncOptionsOf(operation: Pick<TenantOperation, "input">): SyncConfigOptions;
|
|
24
|
+
/** Every per-entity error message the sync reported. */
|
|
25
|
+
export declare function syncErrors(result: ApplyResolvedBlockResult): string[];
|
|
26
|
+
/**
|
|
27
|
+
* The JSON-serialisable outcome stored in the operation's `result`: the status,
|
|
28
|
+
* hash, per-entity counts and the changed `entity:key` list. Never row content
|
|
29
|
+
* or secrets.
|
|
30
|
+
*/
|
|
31
|
+
export declare function summarizeSyncResult(result: ApplyResolvedBlockResult, options: SyncConfigOptions): Record<string, unknown>;
|
|
32
|
+
/**
|
|
33
|
+
* The step both executors run: sync, record the outcome on the operation row,
|
|
34
|
+
* and fail the step when any row reported an error. The result is written
|
|
35
|
+
* before the failure is raised so a failed run still shows what it did.
|
|
36
|
+
*/
|
|
37
|
+
export declare function runSyncDefaultsStep(params: {
|
|
38
|
+
operation: Pick<TenantOperation, "id" | "tenant_id" | "input">;
|
|
39
|
+
syncConfig: SyncConfigFn;
|
|
40
|
+
recorder: Pick<OperationRecorder, "setResult">;
|
|
41
|
+
}): Promise<Record<string, unknown>>;
|
|
42
|
+
/**
|
|
43
|
+
* Sync for tenants whose database is the control plane's own (shared
|
|
44
|
+
* deployments). Reads the chain from, and applies the block to, `adapters`,
|
|
45
|
+
* which should be the layer that returns secrets as stored (ciphertext) so they
|
|
46
|
+
* are copied without being decrypted. A tenant with its own worker and database
|
|
47
|
+
* (`deployment_type: "wfp"`) is not reachable this way: use a dispatch
|
|
48
|
+
* transport.
|
|
49
|
+
*/
|
|
50
|
+
export declare function createInProcessSyncConfig(adapters: DataAdapters, config: {
|
|
51
|
+
controlPlaneTenantId: string;
|
|
52
|
+
resolveControlPlane?: ControlPlaneResolver;
|
|
53
|
+
maxDepth?: number;
|
|
54
|
+
}): SyncConfigFn;
|
|
55
|
+
//# sourceMappingURL=sync-defaults.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sync-defaults.d.ts","sourceRoot":"","sources":["../../../src/operations/sync-defaults.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAC9D,OAAO,EACL,wBAAwB,EAGzB,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAEpD;;;;;;;;GAQG;AAEH,MAAM,WAAW,iBAAiB;IAChC,kDAAkD;IAClD,MAAM,EAAE,OAAO,CAAC;IAChB,mEAAmE;IACnE,KAAK,EAAE,OAAO,CAAC;CAChB;AAED,kFAAkF;AAClF,MAAM,MAAM,YAAY,GAAG,CACzB,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,iBAAiB,KACvB,OAAO,CAAC,wBAAwB,CAAC,CAAC;AAEvC,wEAAwE;AACxE,wBAAgB,aAAa,CAC3B,SAAS,EAAE,IAAI,CAAC,eAAe,EAAE,OAAO,CAAC,GACxC,iBAAiB,CAGnB;AAED,wDAAwD;AACxD,wBAAgB,UAAU,CAAC,MAAM,EAAE,wBAAwB,GAAG,MAAM,EAAE,CAErE;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,wBAAwB,EAChC,OAAO,EAAE,iBAAiB,GACzB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAmBzB;AAED;;;;GAIG;AACH,wBAAsB,mBAAmB,CAAC,MAAM,EAAE;IAChD,SAAS,EAAE,IAAI,CAAC,eAAe,EAAE,IAAI,GAAG,WAAW,GAAG,OAAO,CAAC,CAAC;IAC/D,UAAU,EAAE,YAAY,CAAC;IACzB,QAAQ,EAAE,IAAI,CAAC,iBAAiB,EAAE,WAAW,CAAC,CAAC;CAChD,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAqBnC;AAED;;;;;;;GAOG;AACH,wBAAgB,yBAAyB,CACvC,QAAQ,EAAE,YAAY,EACtB,MAAM,EAAE;IACN,oBAAoB,EAAE,MAAM,CAAC;IAC7B,mBAAmB,CAAC,EAAE,oBAAoB,CAAC;IAC3C,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,GACA,YAAY,CAwBd"}
|
|
@@ -34,6 +34,8 @@ export interface EnqueueTenantOperationParams {
|
|
|
34
34
|
initiated_by?: string;
|
|
35
35
|
target_worker_version?: string;
|
|
36
36
|
target_database_version?: string;
|
|
37
|
+
/** Kind-specific parameters, fixed at creation. Never contains secrets. */
|
|
38
|
+
input?: Record<string, unknown>;
|
|
37
39
|
}
|
|
38
40
|
/**
|
|
39
41
|
* Executes an already-persisted operation row. Row-first contract: the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/operations/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,4BAA4B,EAC5B,mBA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MAAM,YAAY,GAAG,CACzB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,SAAS,GAAG,WAAW,GAAG,QAAQ,EAC3C,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAC7B,OAAO,CAAC,IAAI,CAAC,CAAC"}
|
|
@@ -3,6 +3,8 @@ export type { DefaultsProjectionConfig, DefaultsProjectionEntities, DefaultsProj
|
|
|
3
3
|
export { projectControlPlaneDefaults } from "./defaults-projection";
|
|
4
4
|
export type { ControlPlaneDefaultsPayload, ControlPlaneDefaultsApplyResult, ControlPlaneTenantSeed, DefaultsPayloadEntities, } from "./payload";
|
|
5
5
|
export { buildControlPlaneDefaultsPayload, applyControlPlaneDefaultsPayload, } from "./payload";
|
|
6
|
+
export type { ApplyResolvedBlockOptions, ApplyResolvedBlockResult, BuildResolvedBlockOptions, ResolvedConfigBlock, SyncEntity, SyncEntityOutcome, } from "./resolved-sync";
|
|
7
|
+
export { applyResolvedConfigBlock, buildResolvedConfigBlock, findUndecryptableKeyIds, syncedRowId, } from "./resolved-sync";
|
|
6
8
|
/**
|
|
7
9
|
* A control plane rollout applies the control plane's state to one or more
|
|
8
10
|
* tenant databases. `syncDefaults` is the only operation today; schema
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/rollout/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,wBAAwB,EAEzB,MAAM,uBAAuB,CAAC;AAE/B,YAAY,EACV,wBAAwB,EACxB,0BAA0B,EAC1B,wBAAwB,EACxB,uBAAuB,EACvB,mBAAmB,GACpB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,2BAA2B,EAAE,MAAM,uBAAuB,CAAC;AAEpE,YAAY,EACV,2BAA2B,EAC3B,+BAA+B,EAC/B,sBAAsB,EACtB,uBAAuB,GACxB,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,gCAAgC,EAChC,gCAAgC,GACjC,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/rollout/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,wBAAwB,EAEzB,MAAM,uBAAuB,CAAC;AAE/B,YAAY,EACV,wBAAwB,EACxB,0BAA0B,EAC1B,wBAAwB,EACxB,uBAAuB,EACvB,mBAAmB,GACpB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,2BAA2B,EAAE,MAAM,uBAAuB,CAAC;AAEpE,YAAY,EACV,2BAA2B,EAC3B,+BAA+B,EAC/B,sBAAsB,EACtB,uBAAuB,GACxB,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,gCAAgC,EAChC,gCAAgC,GACjC,MAAM,WAAW,CAAC;AACnB,YAAY,EACV,yBAAyB,EACzB,wBAAwB,EACxB,yBAAyB,EACzB,mBAAmB,EACnB,UAAU,EACV,iBAAiB,GAClB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,wBAAwB,EACxB,wBAAwB,EACxB,uBAAuB,EACvB,WAAW,GACZ,MAAM,iBAAiB,CAAC;AAEzB;;;;;;;;;;GAUG;AACH,MAAM,WAAW,0BAA0B;IACzC,0EAA0E;IAC1E,YAAY,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAAC;IAExE;;;OAGG;IACH,qBAAqB,CACnB,eAAe,EAAE,MAAM,EAAE,GACxB,OAAO,CAAC,wBAAwB,EAAE,CAAC,CAAC;CACxC;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,CACxC,MAAM,EAAE,wBAAwB,GAC/B,0BAA0B,CAa5B"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { DataAdapters, SigningKey } from "authhero";
|
|
2
2
|
import { DefaultsProjectionEntities, DefaultsProjectionResult, EntityProjectionOutcome, ProjectableDefaults } from "./defaults-projection";
|
|
3
|
+
import { ApplyResolvedBlockOptions, ApplyResolvedBlockResult, ResolvedConfigBlock } from "./resolved-sync";
|
|
3
4
|
/**
|
|
4
5
|
* Entity flags for the wire payload — the six default entities plus signing
|
|
5
6
|
* keys and tenant rows, which only flow through the payload (build + apply),
|
|
@@ -56,11 +57,18 @@ export interface ControlPlaneDefaultsPayload extends ProjectableDefaults {
|
|
|
56
57
|
* {@link ControlPlaneTenantSeed}.
|
|
57
58
|
*/
|
|
58
59
|
tenants: ControlPlaneTenantSeed[];
|
|
60
|
+
/**
|
|
61
|
+
* The tenant's resolved parent-chain config, materialised under the tenant's
|
|
62
|
+
* own id. Optional and opt-in on apply; see {@link ResolvedConfigBlock}.
|
|
63
|
+
*/
|
|
64
|
+
resolved?: ResolvedConfigBlock;
|
|
59
65
|
}
|
|
60
66
|
/** Result of applying a payload — the projection result plus the key/tenant outcomes. */
|
|
61
67
|
export interface ControlPlaneDefaultsApplyResult extends DefaultsProjectionResult {
|
|
62
68
|
signingKeys: EntityProjectionOutcome;
|
|
63
69
|
tenants: EntityProjectionOutcome;
|
|
70
|
+
/** Present when a `resolved` block was applied (or dry-run). */
|
|
71
|
+
resolved?: ApplyResolvedBlockResult;
|
|
64
72
|
}
|
|
65
73
|
/**
|
|
66
74
|
* Reads the control plane's defaults + public signing keys off a control-plane
|
|
@@ -87,5 +95,12 @@ export declare function buildControlPlaneDefaultsPayload(controlPlaneAdapters: D
|
|
|
87
95
|
export declare function applyControlPlaneDefaultsPayload(payload: ControlPlaneDefaultsPayload, targetAdapters: DataAdapters, controlPlaneTenantId: string, options?: {
|
|
88
96
|
continueOnError?: boolean;
|
|
89
97
|
entities?: DefaultsPayloadEntities;
|
|
98
|
+
/**
|
|
99
|
+
* Also apply the payload's `resolved` block to `tenantId`. Without this the
|
|
100
|
+
* block is ignored, so existing callers are unaffected.
|
|
101
|
+
*/
|
|
102
|
+
resolved?: ApplyResolvedBlockOptions & {
|
|
103
|
+
tenantId: string;
|
|
104
|
+
};
|
|
90
105
|
}): Promise<ControlPlaneDefaultsApplyResult>;
|
|
91
106
|
//# sourceMappingURL=payload.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../src/rollout/payload.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,UAAU,EAKX,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,0BAA0B,EAC1B,wBAAwB,EACxB,uBAAuB,EACvB,mBAAmB,EAQpB,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../src/rollout/payload.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,UAAU,EAKX,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,0BAA0B,EAC1B,wBAAwB,EACxB,uBAAuB,EACvB,mBAAmB,EAQpB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,yBAAyB,EACzB,wBAAwB,EACxB,mBAAmB,EAEpB,MAAM,iBAAiB,CAAC;AAEzB;;;;GAIG;AACH,MAAM,MAAM,uBAAuB,GAAG,0BAA0B,GAAG;IACjE,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,WAAW,sBAAsB;IACrC,EAAE,EAAE,MAAM,CAAC;IACX,aAAa,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,2BAA4B,SAAQ,mBAAmB;IACtE;;;;;OAKG;IACH,WAAW,EAAE,UAAU,EAAE,CAAC;IAC1B;;;;OAIG;IACH,OAAO,EAAE,sBAAsB,EAAE,CAAC;IAClC;;;OAGG;IACH,QAAQ,CAAC,EAAE,mBAAmB,CAAC;CAChC;AAED,yFAAyF;AACzF,MAAM,WAAW,+BAAgC,SAAQ,wBAAwB;IAC/E,WAAW,EAAE,uBAAuB,CAAC;IACrC,OAAO,EAAE,uBAAuB,CAAC;IACjC,gEAAgE;IAChE,QAAQ,CAAC,EAAE,wBAAwB,CAAC;CACrC;AAkBD;;;;;;;;GAQG;AACH,wBAAsB,gCAAgC,CACpD,oBAAoB,EAAE,YAAY,EAClC,oBAAoB,EAAE,MAAM,EAC5B,QAAQ,GAAE,uBAA4B,EACtC,cAAc,CAAC,EAAE,MAAM,GACtB,OAAO,CAAC,2BAA2B,CAAC,CAqCtC;AA0FD;;;;;;;;;;;GAWG;AACH,wBAAsB,gCAAgC,CACpD,OAAO,EAAE,2BAA2B,EACpC,cAAc,EAAE,YAAY,EAC5B,oBAAoB,EAAE,MAAM,EAC5B,OAAO,GAAE;IACP,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,EAAE,uBAAuB,CAAC;IACnC;;;OAGG;IACH,QAAQ,CAAC,EAAE,yBAAyB,GAAG;QAAE,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC;CACxD,GACL,OAAO,CAAC,+BAA+B,CAAC,CA+D1C"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { Action, Branding, Connection, DataAdapters, EmailProvider, Hook, HookCode, KeyRing, PromptSetting, ResourceServer } from "authhero";
|
|
2
|
+
/**
|
|
3
|
+
* Sync of a tenant's resolved config (docs/design/tenant-config-inheritance.md,
|
|
4
|
+
* section 4.1). The block is the tenant's parent chain merged with
|
|
5
|
+
* `mergeConfig` and materialised under the **tenant's own id**. It carries only
|
|
6
|
+
* what is inherited, never the tenant's own rows.
|
|
7
|
+
*
|
|
8
|
+
* Rows get deterministic ids derived from the target tenant, the entity and
|
|
9
|
+
* the stable key, so a re-sync finds its rows by id and never touches a row the
|
|
10
|
+
* tenant owns. Secrets are copied as stored (ciphertext).
|
|
11
|
+
*/
|
|
12
|
+
export type SyncEntity = "connection" | "resourceServer" | "hook" | "hookCode" | "action";
|
|
13
|
+
export declare const SYNC_ENTITIES: readonly ["connection", "resourceServer", "hookCode", "action", "hook"];
|
|
14
|
+
export interface ResolvedConfigBlock {
|
|
15
|
+
version: 1;
|
|
16
|
+
/** Ancestors the block was resolved from, nearest first. */
|
|
17
|
+
chain: string[];
|
|
18
|
+
connections: Connection[];
|
|
19
|
+
resourceServers: ResourceServer[];
|
|
20
|
+
hookCode: HookCode[];
|
|
21
|
+
actions: Action[];
|
|
22
|
+
hooks: Hook[];
|
|
23
|
+
emailProvider: EmailProvider | null;
|
|
24
|
+
branding: Branding | null;
|
|
25
|
+
promptSettings: PromptSetting | null;
|
|
26
|
+
/** `<entity>:<key>` of rows from `platform`-scoped ancestor rows. */
|
|
27
|
+
hidden: string[];
|
|
28
|
+
/** Explicit deletes. Only executed when the apply asks for `deletes`. */
|
|
29
|
+
deletes: Array<{
|
|
30
|
+
entity: SyncEntity;
|
|
31
|
+
key: string;
|
|
32
|
+
}>;
|
|
33
|
+
/** Content hash of everything above; equal hash means nothing to apply. */
|
|
34
|
+
hash: string;
|
|
35
|
+
}
|
|
36
|
+
export interface BuildResolvedBlockOptions {
|
|
37
|
+
/** Control plane used as implicit parent for tenants without `parent_tenant_id`. */
|
|
38
|
+
legacyControlPlane?: string;
|
|
39
|
+
maxDepth?: number;
|
|
40
|
+
deletes?: ResolvedConfigBlock["deletes"];
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Deterministic id of a synced row: the type prefix, a `sy` marker and 15 hex
|
|
44
|
+
* characters of a hash of (tenant, entity, key). 17 characters after the
|
|
45
|
+
* prefix, the same shape as the ids each adapter generates.
|
|
46
|
+
*/
|
|
47
|
+
export declare function syncedRowId(entity: SyncEntity, tenantId: string, key: string): Promise<string>;
|
|
48
|
+
/** The stable key a row is synced by (matches `mergeConfig`). */
|
|
49
|
+
export declare function keyOf(entity: SyncEntity, row: unknown): string;
|
|
50
|
+
/**
|
|
51
|
+
* Resolves `tenantId`'s parent chain into the block to push. Reads from
|
|
52
|
+
* `adapters`, which should be the layer that returns secrets as stored
|
|
53
|
+
* (ciphertext), so they are copied without being decrypted.
|
|
54
|
+
*/
|
|
55
|
+
export declare function buildResolvedConfigBlock(adapters: DataAdapters, tenantId: string, options?: BuildResolvedBlockOptions): Promise<ResolvedConfigBlock>;
|
|
56
|
+
/**
|
|
57
|
+
* Checks that `ring` can decrypt every ciphertext in the block. Returns the
|
|
58
|
+
* key ids it cannot (never the values).
|
|
59
|
+
*/
|
|
60
|
+
export declare function findUndecryptableKeyIds(block: ResolvedConfigBlock, ring: KeyRing): Promise<string[]>;
|
|
61
|
+
export interface ApplyResolvedBlockOptions {
|
|
62
|
+
/** Compute the diff and report it; write nothing. */
|
|
63
|
+
dryRun?: boolean;
|
|
64
|
+
/** Execute the block's explicit `deletes`. @default false */
|
|
65
|
+
deletes?: boolean;
|
|
66
|
+
/** Apply even when the stored hash equals the block hash. */
|
|
67
|
+
force?: boolean;
|
|
68
|
+
/**
|
|
69
|
+
* The tenant's key ring. When given, the apply is refused before any write if
|
|
70
|
+
* it cannot decrypt a key id the block carries.
|
|
71
|
+
*/
|
|
72
|
+
keyRing?: KeyRing;
|
|
73
|
+
/** Keep going after a failed row instead of throwing. @default true */
|
|
74
|
+
continueOnError?: boolean;
|
|
75
|
+
}
|
|
76
|
+
export interface SyncEntityOutcome {
|
|
77
|
+
added: number;
|
|
78
|
+
changed: number;
|
|
79
|
+
unchanged: number;
|
|
80
|
+
deleted: number;
|
|
81
|
+
errors: string[];
|
|
82
|
+
}
|
|
83
|
+
export interface ApplyResolvedBlockResult {
|
|
84
|
+
status: "applied" | "up-to-date" | "dry-run";
|
|
85
|
+
hash: string;
|
|
86
|
+
entities: Record<SyncEntity | "emailProvider" | "branding" | "promptSettings", SyncEntityOutcome>;
|
|
87
|
+
/** `<entity>:<key>` of rows that would be/were added, changed or deleted. */
|
|
88
|
+
changes: string[];
|
|
89
|
+
}
|
|
90
|
+
export declare function applyResolvedConfigBlock(block: ResolvedConfigBlock, target: DataAdapters, tenantId: string, options?: ApplyResolvedBlockOptions): Promise<ApplyResolvedBlockResult>;
|
|
91
|
+
//# sourceMappingURL=resolved-sync.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolved-sync.d.ts","sourceRoot":"","sources":["../../../src/rollout/resolved-sync.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,MAAM,EACN,QAAQ,EACR,UAAU,EACV,YAAY,EACZ,aAAa,EACb,IAAI,EACJ,QAAQ,EACR,OAAO,EACP,aAAa,EACb,cAAc,EASf,MAAM,UAAU,CAAC;AAMlB;;;;;;;;;GASG;AAEH,MAAM,MAAM,UAAU,GAClB,YAAY,GACZ,gBAAgB,GAChB,MAAM,GACN,UAAU,GACV,QAAQ,CAAC;AAEb,eAAO,MAAM,aAAa,yEAMgB,CAAC;AAE3C,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,CAAC,CAAC;IACX,4DAA4D;IAC5D,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,WAAW,EAAE,UAAU,EAAE,CAAC;IAC1B,eAAe,EAAE,cAAc,EAAE,CAAC;IAClC,QAAQ,EAAE,QAAQ,EAAE,CAAC;IACrB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,aAAa,EAAE,aAAa,GAAG,IAAI,CAAC;IACpC,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAAC;IAC1B,cAAc,EAAE,aAAa,GAAG,IAAI,CAAC;IACrC,qEAAqE;IACrE,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,yEAAyE;IACzE,OAAO,EAAE,KAAK,CAAC;QAAE,MAAM,EAAE,UAAU,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACpD,2EAA2E;IAC3E,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,yBAAyB;IACxC,oFAAoF;IACpF,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OA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