@ionite/core 0.0.23-beta.20260812.6 → 0.0.23-beta.20260820.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/index.d.ts CHANGED
@@ -389,8 +389,8 @@ type AuthenticatedUser = WorkforceUser | Customer;
389
389
  * flows that are inherently human.
390
390
  */
391
391
  type AuthenticatedPrincipal = AuthenticatedUser | WorkloadPrincipal;
392
+ import { StandardSchemaV1 as StandardSchemaV19 } from "@standard-schema/spec";
392
393
  import { StandardSchemaV1 as StandardSchemaV18 } from "@standard-schema/spec";
393
- import { StandardSchemaV1 as StandardSchemaV17 } from "@standard-schema/spec";
394
394
  /**
395
395
  * Third-party CIAM provider presets and claim mapping.
396
396
  *
@@ -504,12 +504,11 @@ declare const warnLogger: Logger;
504
504
  /** Synchronous, in-memory read surface for one code catalog entity kind. */
505
505
  type CodeCatalogNamespace<TEntity> = {
506
506
  get(id: string): TEntity | undefined;
507
- getByExternalId(externalId: string): TEntity | undefined;
508
507
  list(): readonly TEntity[];
509
508
  };
510
509
  /**
511
510
  * Normalized, frozen code-declared catalog produced by {@link defineCatalog}. All entities are
512
- * deep-frozen, id-indexed, and carry `externalId` (defaulted to `id`).
511
+ * deep-frozen and id-indexed.
513
512
  */
514
513
  type CodeCatalog = {
515
514
  groups: CodeCatalogNamespace<Group>;
@@ -526,6 +525,7 @@ type CodeCatalogInput = {
526
525
  declare function isCodeCatalog(value: CodeCatalog | CodeCatalogInput): value is CodeCatalog;
527
526
  /** Normalize an `authz.catalog` config value: pass through a {@link CodeCatalog}, build one from input. */
528
527
  declare function toCodeCatalog(value: CodeCatalog | CodeCatalogInput): CodeCatalog;
528
+ type CatalogEntityKind = "group" | "role" | "permission";
529
529
  /**
530
530
  * Build a validated, frozen {@link CodeCatalog} from declarative arrays. Call it once at module
531
531
  * scope in a pure authz module (no store imports) and wire the result via
@@ -533,33 +533,52 @@ declare function toCodeCatalog(value: CodeCatalog | CodeCatalogInput): CodeCatal
533
533
  *
534
534
  * Validation (throws {@link Error} at module evaluation on the first violation):
535
535
  * - ids are globally unique across groups, roles, AND permissions (one SCIM Groups id space);
536
- * - `externalId`s (after defaulting to `id`) are globally unique (SCIM `externalId eq` contract);
537
536
  * - every group -> group/role/permission reference (string id or embedded object) resolves to an
538
537
  * entity declared in the catalog arrays, and every role -> permission reference likewise
539
538
  * (`resources` refs are NOT validated here — resources live in the app's `ResourceProvider`);
540
539
  * - nested group composition is acyclic;
541
540
  * - `recommendedSubjectTypes` is a subset of `assignableSubjectTypes`.
542
541
  *
543
- * Side effects: entities missing `externalId` are stamped with `externalId = id`, then every
544
- * entity (and its arrays/metadata) is frozen.
542
+ * Side effects: every entity (and its arrays/metadata) is frozen.
545
543
  */
546
544
  declare function defineCatalog(input: CodeCatalogInput): CodeCatalog;
545
+ /** Resolve one code entity and its kind from the shared id space. */
546
+ declare function getCodeCatalogEntity(code: CodeCatalog | undefined, id: string): {
547
+ entity: Group | Role | Permission;
548
+ kind: CatalogEntityKind;
549
+ } | undefined;
550
+ /** Return the entity namespace for one catalog kind. */
551
+ declare function catalogEntityStore<TEntity extends Group | Role | Permission>(catalog: AccessCatalogStore, kind: CatalogEntityKind): EntityStore<TEntity>;
552
+ /**
553
+ * Merge a materialized row with its code template. The row owns presentation, receipts, lifecycle,
554
+ * and other runtime metadata; code owns ids, subject scoping, and graph/resource structure.
555
+ */
556
+ declare function mergeCodeCatalogEntity<TEntity extends Group | Role | Permission>(kind: CatalogEntityKind, code: TEntity, stored: TEntity): TEntity;
547
557
  /**
548
- * {@link AccessCatalogStore}-shaped READ union over the code-declared catalog and the optional
549
- * backing store (lookup order code -> store, per kind). This is the single surface SCIM Groups
550
- * reads and OAA projection enumerate so code entities are first-class entitlements to IAM tooling
551
- * without ever being stored. Returns undefined when neither source is wired.
558
+ * Insert a code template into the runtime catalog only when no row exists. Existing rows are never
559
+ * rewritten, preserving IAM-renamed presentation and receipts. `insertIfAbsent` closes the race
560
+ * between the initial read and insert.
561
+ */
562
+ declare function materializeCodeCatalogEntity<TEntity extends Group | Role | Permission>(kind: CatalogEntityKind, code: TEntity, store: EntityStore<TEntity>): Promise<TEntity>;
563
+ /**
564
+ * Mark materialized code rows as deprecated when their template no longer exists. Callers choose
565
+ * when to run this lifecycle sweep; it never runs during config apply.
566
+ */
567
+ declare function deprecateRetiredCodeCatalogRows(code: CodeCatalog | undefined, store: AccessCatalogStore, onlyId?: string): Promise<void>;
568
+ /**
569
+ * {@link AccessCatalogStore}-shaped read union over code templates and the runtime store. Store rows
570
+ * win presentation for code ids, code owns their structure, and unmaterialized code entities remain
571
+ * visible. Returns undefined when neither source is wired.
552
572
  */
553
573
  declare function unionCatalogRead(code: CodeCatalog | undefined, store: AccessCatalogStore | undefined): AccessCatalogStore | undefined;
554
574
  import { StandardSchemaV1 as StandardSchemaV15 } from "@standard-schema/spec";
555
575
  /**
556
- * IAM delta egress mode (RemoteConfig/ECI intent). Selects how access changes that occur inside the
557
- * application are surfaced to the enterprise's IAM/governance layer:
576
+ * IAM delta egress mode (RemoteConfig/ECI intent). Selects how IAM-visible runtime changes that
577
+ * occur inside the application are surfaced to the enterprise's IAM/governance layer:
558
578
  *
559
- * - `'patch'`: outbound SCIM into the IAM tool (per-resource PATCH/POST, externalId-only). The IAM
560
- * tool's view stays fresh as access changes in the app, and the tool can reconcile the echo
561
- * against the originating request (an unmatched change is an out-of-band access grant for the
562
- * enterprise's policy to handle). See the README "IAM delta egress" section.
579
+ * - `'patch'`: outbound SCIM into the IAM tool (per-resource POST/PUT/PATCH/DELETE,
580
+ * correlated by the App-owned id carried as SCIM `externalId`). The IAM tool's view stays fresh as users, materialized entitlement
581
+ * definitions, and access change in the app. See the README "IAM delta egress" section.
563
582
  *
564
583
  * Origin/trust: every push is authenticated with the app's outgoing workload client (OAuth bearer);
565
584
  * the receiver treats the authenticated workload identity as the verified origin. Audit
@@ -570,55 +589,65 @@ import { StandardSchemaV1 as StandardSchemaV15 } from "@standard-schema/spec";
570
589
  type IamDeltaMode = "patch";
571
590
  /** SCIM resource types the delta patch adapter addresses. */
572
591
  type IamDeltaResourceType = "user" | "group";
592
+ /** Destination-owned reference captured from a SCIM User/Group response. */
593
+ type DestinationReference = {
594
+ /** Service-provider-assigned SCIM resource id. */
595
+ providerId: string;
596
+ /** IAM-owned deep link where access to an entitlement can be requested, when supplied. */
597
+ requestUrl?: string;
598
+ };
573
599
  /**
574
- * Cache key for an externalId -> destination provider id mapping. Scoped by `destination` (the SCIM
575
- * base URL) so the same `externalId` can map to different provider ids across IAM tools, and by
576
- * `tenantId` for multi-tenant isolation.
600
+ * Full IAM delta snapshot supplied by the app's maintenance/reconcile path. It mirrors the entities
601
+ * visible through IAM aggregation: users, durable entitlement definitions, and active access roots.
577
602
  */
578
- type IamDeltaIdMapKey = {
579
- tenantId?: string;
580
- /** Destination SCIM base URL (keys the mapping per IAM target). */
581
- destination: string;
582
- resourceType: IamDeltaResourceType;
583
- externalId: string;
584
- };
585
- /**
586
- * Durable cache of `externalId -> destination provider id` so the patch adapter resolves a resource
587
- * once and reuses the id for subsequent writes (steady state = one write call, no lookup). The cache
588
- * is self-healing: a stale id (destination 404/410) is re-resolved via an externalId filter and the
589
- * mapping refreshed. The SDK NEVER resolves a destination resource by any attribute other than
590
- * `externalId`.
591
- */
592
- interface IamDeltaIdMapStore {
593
- get(key: IamDeltaIdMapKey): Promise<string | undefined>;
594
- set(key: IamDeltaIdMapKey, providerId: string): Promise<void>;
595
- delete(key: IamDeltaIdMapKey): Promise<void>;
596
- }
597
- /** Result of an app-driven full reconcile (re-push of all active roots). */
603
+ type IamDeltaReconcileInput = {
604
+ users?: Iterable<BaseUser> | AsyncIterable<BaseUser>;
605
+ groups?: Iterable<Group> | AsyncIterable<Group>;
606
+ roles?: Iterable<Role> | AsyncIterable<Role>;
607
+ permissions?: Iterable<Permission> | AsyncIterable<Permission>;
608
+ access?: Iterable<AccessChange> | AsyncIterable<AccessChange>;
609
+ };
610
+ /** Result of an app-driven full reconcile (re-push of definitions, users, and active roots). */
598
611
  type IamDeltaReconcileResult = {
599
612
  pushed: number;
600
613
  skipped: number;
601
614
  errors: string[];
602
615
  };
603
616
  /**
604
- * Projects access-root changes to the configured IAM delta destination. Implemented by the server
605
- * package; threaded into the access-mutation chokepoint so every grant/revoke that flows through the
606
- * SDK (including direct SCIM calls) is surfaced. `onGrant`/`onRevoke` resolve when the projection
607
- * completes (or resolve immediately when not ready). They are best-effort egress: the SCIM mutation
608
- * path awaits them (bounded) inside the request so no work is left detached (serverless-safe), but a
609
- * rejection is caught and reported as degraded egress — it never turns a committed store mutation
610
- * into a SCIM error. A rejected promise signals the projection failed so the caller can report it.
617
+ * Projects observed runtime mutations to the configured IAM delta destination. The invariant is:
618
+ * every runtime mutation the SDK observes that would change what IAM full sync shows must also
619
+ * egress through this handle. That includes users, materialized entitlement definitions, and access
620
+ * roots. Code templates are not pushed during config apply.
621
+ *
622
+ * Request-triggered methods resolve when projection completes (or immediately when not ready). They
623
+ * are best-effort egress: the SCIM mutation path awaits them inside the request, but a rejection is
624
+ * caught and reported as degraded egress — it never turns a committed store mutation into a SCIM
625
+ * error. Reactive catalog/resource events use the same methods outside a request and warn on failure.
611
626
  *
612
627
  * Readiness follows the shared contract: `isReady()` is a synchronous check; `ready(timeout?)`
613
628
  * resolves once the emitter first becomes usable.
614
629
  */
615
630
  interface IamDeltaEmitter {
631
+ /** Upsert a full SCIM User representation at the destination. */
632
+ onUserUpsert(user: BaseUser): Promise<void>;
633
+ /** Delete a destination User identified strictly by externalId. */
634
+ onUserDelete(externalId: string): Promise<void>;
635
+ /** Upsert a full SCIM Group representation for a group, role, or permission definition. */
636
+ onEntitlementUpsert(entity: Entitlement, type: EntitlementType): Promise<void>;
637
+ /** Delete a destination entitlement Group identified by the App-owned catalog id. */
638
+ onEntitlementDelete(type: EntitlementType, id: string): Promise<void>;
616
639
  /** Project a granted root; resolves on completion (or immediately when not ready), rejects on push failure. */
617
640
  onGrant(change: AccessChange): Promise<void>;
618
641
  /** Project a revoked root; resolves on completion (or immediately when not ready), rejects on push failure. */
619
642
  onRevoke(change: AccessChange): Promise<void>;
620
- /** Re-push all active roots to the destination (app-driven full reconcile). */
621
- reconcile(roots: AsyncIterable<AccessChange> | Iterable<AccessChange>): Promise<IamDeltaReconcileResult>;
643
+ /** Re-push the complete IAM-visible snapshot to the destination (app-driven full reconcile). */
644
+ reconcile(input: IamDeltaReconcileInput): Promise<IamDeltaReconcileResult>;
645
+ /**
646
+ * Read a previously captured destination reference without making a network request. Returns
647
+ * undefined until the resource has been resolved or pushed to the configured IAM destination.
648
+ * `correlationId` is a User's `externalId` or an entitlement's App-owned catalog `id`.
649
+ */
650
+ getDestinationRef(resourceType: IamDeltaResourceType, correlationId: string): Promise<DestinationReference | undefined>;
622
651
  isReady(): boolean;
623
652
  ready(timeout?: number): Promise<void>;
624
653
  }
@@ -1651,7 +1680,7 @@ interface WorkloadGetToken {
1651
1680
  /**
1652
1681
  * Workload Identity Authentication Interface
1653
1682
  */
1654
- type Workload = WorkloadConfig & ModuleReadiness & {
1683
+ type Workload = WorkloadConfig & ModuleReadiness & Required<Pick<ModuleReadiness, "isReady" | "ready">> & {
1655
1684
  /**
1656
1685
  * Returns a token for this workload configuration.
1657
1686
  * The optional argument overrides the configured default scope.
@@ -1737,6 +1766,11 @@ type IAMConfig = {
1737
1766
  */
1738
1767
  inboundUsers?: IAMInboundUsersConfig;
1739
1768
  /**
1769
+ * FrameworkConfig-only fallback that mints an IAM-owned deep link where access to an entitlement
1770
+ * can be requested. A `requestUrl` written back into the catalog row by IAM takes precedence.
1771
+ */
1772
+ entitlementRequestUrl?: (entitlement: Entitlement, type: EntitlementType, context: IAMEntitlementRequestUrlContext) => string | undefined;
1773
+ /**
1740
1774
  * Optional handler defaults. These are merged with per-call overrides in
1741
1775
  * `iam.handler`, with per-call values taking precedence.
1742
1776
  */
@@ -1759,10 +1793,10 @@ type IAMConfig = {
1759
1793
  * RemoteConfig/ECI intent: how access changes that occur inside the application are surfaced to the
1760
1794
  * enterprise IAM/governance layer. Not configurable from application code.
1761
1795
  *
1762
- * `'patch'`: outbound SCIM into the IAM tool keyed strictly by `externalId` (uses `url` as the
1763
- * destination base and `deltaAudience` for the outgoing workload client). Keeps the IAM tool's
1764
- * view fresh as the app grants/revokes access directly, so the tool can reconcile the echo
1765
- * against the originating request. See the README "IAM delta egress" section.
1796
+ * `'patch'`: outbound SCIM into the IAM tool keyed by the App-owned catalog id carried as SCIM
1797
+ * `externalId` (uses `url` as the destination base and `deltaAudience` for the outgoing workload client). Every observed runtime
1798
+ * mutation that changes the IAM full-sync view egresses: user and entitlement upsert/delete, and
1799
+ * access grant/revoke. See the README "IAM delta egress" section.
1766
1800
  *
1767
1801
  * When omitted, delta egress is disabled. The SDK only emits the signal; the enterprise's IAM
1768
1802
  * tooling owns the response (flag, auto-revoke + notify, or audit). See `IamDeltaMode`.
@@ -1773,12 +1807,6 @@ type IAMConfig = {
1773
1807
  * pushes to the destination (`url`). When omitted, the default workload server token is used.
1774
1808
  */
1775
1809
  deltaAudience?: string;
1776
- /**
1777
- * Durable externalId -> destination provider-id mapping store for `delta:'patch'`. Wired by the
1778
- * application via `FrameworkStores.deltaIdMapStore` (a code/runtime capability, not a secret), so
1779
- * the patch adapter resolves each resource once and reuses the id thereafter.
1780
- */
1781
- deltaIdMapStore?: IamDeltaIdMapStore;
1782
1810
  };
1783
1811
  /**
1784
1812
  * Per-endpoint enablement flag carried in RemoteConfig (Ops/ECI intent).
@@ -1786,6 +1814,10 @@ type IAMConfig = {
1786
1814
  type IAMEndpointFlag = {
1787
1815
  enabled?: boolean;
1788
1816
  };
1817
+ type IAMEntitlementRequestUrlContext = {
1818
+ request: Request;
1819
+ tenantId?: string;
1820
+ };
1789
1821
  type IAMValidators = {
1790
1822
  user: StandardSchemaV15<unknown, User>;
1791
1823
  group: StandardSchemaV15<unknown, GroupResource>;
@@ -1936,9 +1968,9 @@ interface CreateUserOptions {
1936
1968
  */
1937
1969
  interface CreateGroupOptions {
1938
1970
  /**
1939
- * External identifier for the group
1971
+ * App-owned identifier for the group. Sent to the provider as SCIM `externalId`.
1940
1972
  */
1941
- externalId?: string;
1973
+ id?: string;
1942
1974
  /**
1943
1975
  * Initial members to add to the group
1944
1976
  */
@@ -2052,45 +2084,43 @@ type IAM = IAMConfig & {
2052
2084
  */
2053
2085
  delta?: IamDeltaEmitter;
2054
2086
  };
2055
- type KmsKeyState = "pending" | "active" | "deprecated" | "revoked";
2056
- type KmsPoolKind = "token" | "allocation";
2057
- type KmsTokenKey = {
2087
+ type KmsKeyState = "pending" | "active" | "deprecated" | "rotated" | "revoked";
2088
+ type KmsKey = {
2058
2089
  id: string;
2059
2090
  state: KmsKeyState;
2060
2091
  value?: string;
2061
2092
  notBefore?: string;
2062
2093
  notAfter?: string;
2094
+ /** Control-plane lifecycle timestamps. Vaults omit these from personalized client grants. */
2095
+ createdAt?: string;
2096
+ activatedAt?: string;
2097
+ deprecatedAt?: string;
2098
+ rotatedAt?: string;
2099
+ revokedAt?: string;
2063
2100
  /** Control-plane metadata used for allocation policy and UI. Consumers should treat it as opaque. */
2064
2101
  meta?: Record<string, unknown>;
2065
2102
  };
2066
- type KmsTokenPoolDocument = {
2067
- kind: "token";
2068
- active: string;
2069
- keys: KmsTokenKey[];
2103
+ /** Personalized per-client view delivered by a secrets source. */
2104
+ type KmsPoolDocument = {
2105
+ kind: "kms";
2106
+ /** Omitted when the server has revoked the previous grant and no replacement is available yet. */
2107
+ active?: string;
2108
+ keys: KmsKey[];
2070
2109
  };
2071
- /** Per-client allocation view delivered by a secrets source. */
2072
- type KmsAllocationPoolView = {
2073
- kind: "allocation";
2074
- active: string;
2075
- keys: KmsTokenKey[];
2076
- };
2077
- type KmsPoolDocument = KmsTokenPoolDocument | KmsAllocationPoolView;
2078
2110
  type KmsAllocationStrategy = "spread" | "low-quota-first";
2079
2111
  type KmsAllocationPolicy = {
2080
2112
  strategy?: KmsAllocationStrategy;
2081
2113
  maxHoldersPerKey?: number;
2114
+ /** Grace period during which a gracefully rotated key remains accepted. Defaults to 300 seconds. */
2115
+ overlapSeconds?: number;
2082
2116
  };
2083
- /** Control-plane allocation document stored by the vault. Clients receive a personalized view instead. */
2084
- type KmsAllocationPoolDocument = {
2085
- kind: "allocation";
2086
- keys: KmsTokenKey[];
2087
- assignments: Record<string, string>;
2088
- policy?: KmsAllocationPolicy;
2117
+ /** Key-material document stored by the vault. Operational assignment and policy state is external. */
2118
+ type KmsPoolControlDocument = {
2119
+ kind: "kms";
2120
+ keys: KmsKey[];
2089
2121
  };
2090
2122
  /** ConfigSource-owned pointer to a KMS pool document. */
2091
2123
  type KmsPoolConfig = {
2092
- /** Pool semantics. Defaults to `token`. */
2093
- kind?: KmsPoolKind;
2094
2124
  /** Named `ion.secrets` source. Omit to use the default `ion.secret` source. */
2095
2125
  source?: string;
2096
2126
  /** Secret path. Defaults to `/kms/{poolName}`. */
@@ -2098,13 +2128,16 @@ type KmsPoolConfig = {
2098
2128
  };
2099
2129
  /** ConfigSource-owned named KMS pool declarations. */
2100
2130
  type KmsConfig = Record<string, KmsPoolConfig>;
2101
- type KmsPoolListener = (current: KmsTokenKey | undefined) => void;
2131
+ type KmsPoolListener = (current: KmsKey | undefined) => void;
2102
2132
  type KmsPool = {
2103
- /** Returns the usable token value, briefly awaiting only a locally scheduled imminent activation. */
2104
- value(): Promise<string>;
2105
- /** Timing-safe verification against the active token and usable deprecated overlap tokens. */
2133
+ /**
2134
+ * Returns the current granted key. Calls wait on one shared local subscription until a grant is
2135
+ * available; repeated calls resolve from the local cache and never initiate a vault request.
2136
+ */
2137
+ value(timeout?: number): Promise<string>;
2138
+ /** Timing-safe verification against the active key and usable deprecated rotation-overlap keys. */
2106
2139
  accepts(candidate: string): boolean;
2107
- /** Notifies immediately and whenever the selected active token changes. */
2140
+ /** Notifies immediately and whenever the selected active key changes. */
2108
2141
  subscribe(listener: KmsPoolListener): () => void;
2109
2142
  beforeChange(listener: ChangeListener): () => void;
2110
2143
  afterChange(listener: ChangeListener): () => void;
@@ -2121,12 +2154,9 @@ type Kms = ModuleReadiness & {
2121
2154
  getPool(name: string): KmsPool;
2122
2155
  };
2123
2156
  /** Parse and fail closed on a personalized KMS pool document. */
2124
- declare function parseKmsPoolDocument(value: unknown): KmsTokenPoolDocument;
2125
- declare function parseKmsPoolDocument(value: unknown, expectedKind: "token"): KmsTokenPoolDocument;
2126
- declare function parseKmsPoolDocument(value: unknown, expectedKind: "allocation"): KmsAllocationPoolView;
2127
- declare function parseKmsPoolDocument(value: unknown, expectedKind: KmsPoolKind): KmsPoolDocument;
2128
- /** Parse and fail closed on a control-plane allocation-pool document. */
2129
- declare function parseKmsAllocationPool(value: unknown): KmsAllocationPoolDocument;
2157
+ declare function parseKmsPoolDocument(value: unknown): KmsPoolDocument;
2158
+ /** Parse and fail closed on a vault-stored KMS key-material document. */
2159
+ declare function parseKmsPoolControlDocument(value: unknown): KmsPoolControlDocument;
2130
2160
  type OtelSignalName = "traces" | "metrics" | "logs";
2131
2161
  type OtelProtocol = "http/protobuf" | "http/json";
2132
2162
  type OtelProviderType = "otlp" | "grafana-lgtm" | "datadog" | "splunk" | "elastic";
@@ -2170,7 +2200,7 @@ type OtelConfig = {
2170
2200
  protocol?: OtelProtocol;
2171
2201
  headers?: Record<string, string>;
2172
2202
  apiKey?: string;
2173
- /** Name of a `RemoteConfig.kms` token pool used for exporter authentication. */
2203
+ /** Name of a `RemoteConfig.kms` key pool used for exporter authentication. */
2174
2204
  apiKeyPool?: string;
2175
2205
  apiKeyHeader?: string;
2176
2206
  oauth?: OtelOAuthClientCredentialsConfig;
@@ -2494,9 +2524,7 @@ declare function validationFailureResponse(issues: unknown, message: string): Re
2494
2524
  * @returns Merged configuration object
2495
2525
  */
2496
2526
  declare function mergeConfig<T extends Record<string, unknown>>(fromVault: T | undefined, fromCode: T | undefined, criticalFields?: string[]): T;
2497
- /**
2498
- * Strips // and /* *\/ comments from JSONC, respecting string literals.
2499
- */
2527
+ /** Strips // and /* *\/ comments from JSONC, respecting string literals. */
2500
2528
  declare function stripJsonComments(content: string): string;
2501
2529
  declare function parseJsonc<T>(content: string): T;
2502
2530
  /**
@@ -2849,6 +2877,58 @@ interface MagicLinkStore<TExtended = object> {
2849
2877
  */
2850
2878
  delete(token: string): Promise<void>;
2851
2879
  }
2880
+ import { StandardSchemaV1 as StandardSchemaV17 } from "@standard-schema/spec";
2881
+ declare const DEFAULT_SECRET_MIME_TYPES: Readonly<Record<SecretFormat, string>>;
2882
+ type SecretTypeRegistryEntry = SecretContentType & {
2883
+ id: string;
2884
+ label?: string;
2885
+ };
2886
+ type SecretTypeInput<T> = {
2887
+ id: string;
2888
+ label?: string;
2889
+ format: SecretFormat;
2890
+ mimeType?: string;
2891
+ schemaUrl?: string;
2892
+ schema?: StandardSchemaV17<unknown, T>;
2893
+ };
2894
+ /**
2895
+ * Runtime contract for a custom secret type. The Standard Schema value is used only by server-side
2896
+ * parsing; `toRegistryEntry()` returns the serializable half that a vault editor can register.
2897
+ */
2898
+ type SecretTypeDescriptor<T = unknown> = Readonly<{
2899
+ id: string;
2900
+ label?: string;
2901
+ format: SecretFormat;
2902
+ mimeType: string;
2903
+ schemaUrl?: string;
2904
+ schema?: StandardSchemaV17<unknown, T>;
2905
+ toRegistryEntry(): SecretTypeRegistryEntry;
2906
+ }>;
2907
+ type InferSecretType<TType> = TType extends SecretTypeDescriptor<infer T> ? T : never;
2908
+ declare function defineSecretType<T>(input: SecretTypeInput<T> & {
2909
+ schema: StandardSchemaV17<unknown, T>;
2910
+ }): SecretTypeDescriptor<T>;
2911
+ declare function defineSecretType<T>(input: SecretTypeInput<T>): SecretTypeDescriptor<T>;
2912
+ declare function defineSecretType(input: SecretTypeInput<unknown>): SecretTypeDescriptor<unknown>;
2913
+ declare function defaultSecretContentType(format?: SecretFormat): SecretContentType;
2914
+ /** Raised before decoding when a stored secret does not match the requested runtime contract. */
2915
+ declare class SecretContentTypeMismatchError extends Error {
2916
+ readonly expected: SecretContentType;
2917
+ readonly received: SecretContentType;
2918
+ constructor(expected: SecretContentType, received: SecretContentType);
2919
+ }
2920
+ type SecretFormat = "jsonc" | "env" | "text" | "binary" | "yaml" | "toml" | "xml";
2921
+ /**
2922
+ * Self-describing content metadata persisted with a secret. `typeId` identifies an authoring preset;
2923
+ * decoding never depends on the preset registry because the resolved format/mime/schema travel with
2924
+ * the secret.
2925
+ */
2926
+ type SecretContentType = {
2927
+ format: SecretFormat;
2928
+ mimeType: string;
2929
+ schemaUrl?: string;
2930
+ typeId?: string;
2931
+ };
2852
2932
  type Secret<T> = {
2853
2933
  data: T;
2854
2934
  metadata: MetaData;
@@ -2857,6 +2937,8 @@ type MetaData = {
2857
2937
  path: string;
2858
2938
  version: number;
2859
2939
  created: Date;
2940
+ /** Persisted write contract. Absent only on records written before type became mandatory. */
2941
+ contentType?: SecretContentType;
2860
2942
  };
2861
2943
  type SecretsSourceType = "vault" | "azure" | "aws" | "gcp" | "dev";
2862
2944
  type SecretRequestSeverity = "low" | "medium" | "high" | "critical";
@@ -2878,6 +2960,24 @@ type SecretsOperationOptions = {
2878
2960
  /** Optional timeout in milliseconds for this secrets operation. */
2879
2961
  timeout?: number;
2880
2962
  };
2963
+ type SecretsWriteOptions = SecretsOperationOptions & {
2964
+ /** Content contract stored with the secret and returned by all transports. Required on every write. */
2965
+ contentType: SecretContentType;
2966
+ };
2967
+ type SecretHandle = {
2968
+ /** Reads the canonical textual representation. Binary secrets reject this accessor. */
2969
+ text(): Promise<string>;
2970
+ /** Decodes JSONC. Other formats reject this accessor. */
2971
+ json<T = unknown>(): Promise<T>;
2972
+ /** Reads the canonical bytes. Text formats are UTF-8 encoded. */
2973
+ bytes(): Promise<Uint8Array>;
2974
+ /** Decodes an env/key=value secret. */
2975
+ env(): Promise<Record<string, string>>;
2976
+ /** Reads metadata without decoding the value. */
2977
+ metadata(): Promise<MetaData>;
2978
+ /** Decodes and validates using a runtime secret-type descriptor. */
2979
+ parse<T>(type: SecretTypeDescriptor<T>): Promise<T>;
2980
+ };
2881
2981
  type SubscriptionMode = "fail-fast" | "wait";
2882
2982
  type SecretsSubscriptionOptions = SecretsOperationOptions & {
2883
2983
  /**
@@ -2894,7 +2994,7 @@ type LfvCallbackHeaders = {
2894
2994
  signature: string;
2895
2995
  };
2896
2996
  /**
2897
- * Original LFV callback bytes and signature headers distributed between App processes. Consumers
2997
+ * Original LFV callback bytes and signature headers handed between App processes. Consumers
2898
2998
  * MUST independently verify this envelope against their own configured `verifyJwks`; the transport
2899
2999
  * is never a signature trust anchor.
2900
3000
  */
@@ -2902,20 +3002,17 @@ type LfvCallbackEnvelope = {
2902
3002
  kind: LfvCallbackKind;
2903
3003
  /** Normalized `serverUrl|path` routing key. */
2904
3004
  key: string;
2905
- /** Random process/source identity used to suppress transport echo. */
2906
- originId: string;
2907
3005
  rawBody: string;
2908
3006
  headers: LfvCallbackHeaders;
2909
3007
  };
2910
- type LfvCallbackEnvelopeListener = (envelope: LfvCallbackEnvelope) => void | Promise<void>;
2911
3008
  /**
2912
- * Cross-process transport for signed LFV callback envelopes. The default SDK behavior remains the
2913
- * in-process callback hub; applications opt into a transport (for example Redis Pub/Sub) through
2914
- * FrameworkConfig.
3009
+ * Cross-process, single-consume mailbox for signed LFV OTP callbacks. The process that receives a
3010
+ * callback with no local waiter parks it by request id; the process that initiated the operation
3011
+ * takes it. TTL is mandatory so abandoned OTPs cannot accumulate.
2915
3012
  */
2916
3013
  type LfvCallbackTransport = {
2917
- publish(envelope: LfvCallbackEnvelope): Promise<void>;
2918
- subscribe(key: string, listener: LfvCallbackEnvelopeListener): Promise<() => void>;
3014
+ put(requestId: string, envelope: LfvCallbackEnvelope, ttlMs: number): Promise<void>;
3015
+ take(requestId: string): Promise<LfvCallbackEnvelope | undefined>;
2919
3016
  };
2920
3017
  /** Framework-only LFV runtime wiring. Live transports MUST never be supplied by RemoteConfig. */
2921
3018
  type FrameworkLfvConfig = {
@@ -2923,13 +3020,15 @@ type FrameworkLfvConfig = {
2923
3020
  };
2924
3021
  type SecretsSource = ReactiveHandle & ModuleReadiness & {
2925
3022
  type: SecretsSourceType;
3023
+ /** Creates a lazy, Bun.file-style handle. No I/O occurs until an accessor is awaited. */
3024
+ get(path: string, options?: SecretsOperationOptions): SecretHandle;
2926
3025
  getFullSecret: <T>(path: string, options?: SecretsOperationOptions) => Promise<Secret<T>>;
2927
3026
  getSecret: <T>(path: string, options?: SecretsOperationOptions) => Promise<T>;
2928
3027
  /**
2929
3028
  * Write a secret at the given path.
2930
3029
  * Implementations may throw for read-only or unsupported secret sources.
2931
3030
  */
2932
- putSecret: (path: string, value: Record<string, unknown>, options?: SecretsOperationOptions) => Promise<void>;
3031
+ putSecret: (path: string, value: Record<string, unknown>, options: SecretsWriteOptions) => Promise<void>;
2933
3032
  /**
2934
3033
  * When set, the secret source supports change detection, reads the current value first, and calls onChange
2935
3034
  * immediately with that value before watching for changes.
@@ -2991,12 +3090,14 @@ type Secrets = ModuleReadiness & {
2991
3090
  listSecretsSources(): string[];
2992
3091
  /** Gets a named secrets source client. Throws when missing. */
2993
3092
  getSecretsSource(sourceName: string): SecretsSource;
3093
+ /** Creates a lazy handle for a secret in a named source. */
3094
+ get(sourceName: string, path: string, options?: SecretsOperationOptions): SecretHandle;
2994
3095
  /** Reads a secret from a named secrets source client. */
2995
3096
  getSecret<T>(sourceName: string, path: string, options?: SecretsOperationOptions): Promise<T>;
2996
3097
  /** Reads full secret data + metadata from a named secrets source client. */
2997
3098
  getFullSecret<T>(sourceName: string, path: string, options?: SecretsOperationOptions): Promise<Secret<T>>;
2998
3099
  /** Writes a secret to a named secrets source client. */
2999
- putSecret(sourceName: string, path: string, value: Record<string, unknown>, options?: SecretsOperationOptions): Promise<void>;
3100
+ putSecret(sourceName: string, path: string, value: Record<string, unknown>, options: SecretsWriteOptions): Promise<void>;
3000
3101
  /** Deletes a secret from a named secrets source client. */
3001
3102
  deleteSecret(sourceName: string, path: string, options?: SecretsOperationOptions): Promise<void>;
3002
3103
  /** Lists child paths under a base path for a named secrets source client. */
@@ -3247,7 +3348,7 @@ type AzureSecretsConfig = {
3247
3348
  */
3248
3349
  ttl?: number;
3249
3350
  };
3250
- type ConfigSourceType = "vault" | "azure" | "aws" | "gcp";
3351
+ type ConfigSourceType = "vault" | "azure" | "aws" | "gcp" | "mirror";
3251
3352
  type ConfigSourceEnv = {
3252
3353
  ION_CONFIG_TYPE?: ConfigSourceType;
3253
3354
  ION_VAULT_URL?: string;
@@ -3263,6 +3364,7 @@ type ConfigSourceEnv = {
3263
3364
  ION_VAULT_LFV_DELIVERY_ENDPOINT?: string;
3264
3365
  ION_VAULT_LFV_VERIFY_JWKS?: string;
3265
3366
  ION_VAULT_LFV_EVENTS_ENDPOINT?: string;
3367
+ ION_VAULT_LFV_PATH?: string;
3266
3368
  ION_VAULT_LFV_DELIVERY_TIMEOUT?: string;
3267
3369
  ION_VAULT_LFV_RETRY_INTERVAL?: string;
3268
3370
  ION_VAULT_LFV_WARN_INTERVAL?: string;
@@ -3287,6 +3389,8 @@ type ConfigSourceEnv = {
3287
3389
  ION_AWS_WEBHOOK_URL?: string;
3288
3390
  ION_AWS_TTL?: string;
3289
3391
  ION_GCP_TTL?: string;
3392
+ /** Complete upstream ConfigLocator for `ION_CONFIG_TYPE=mirror`, using existing names after this prefix. */
3393
+ [key: `ION_FROM_${string}`]: string | undefined;
3290
3394
  };
3291
3395
  type VaultConfigLocator = {
3292
3396
  type: "vault";
@@ -3338,30 +3442,18 @@ type GcpConfigLocator = {
3338
3442
  type: "gcp";
3339
3443
  gcpTtl?: number;
3340
3444
  };
3341
- type ConfigLocator = VaultConfigLocator | AwsConfigLocator | AzureConfigLocator | GcpConfigLocator;
3342
- /**
3343
- * Narrow, serializable pointer a tenant stores to locate its RemoteConfig. Unlike the full
3344
- * {@link ConfigLocator} (used only to bootstrap the ROOT config source from env/a trusted secret),
3345
- * a `TenantConfigLocator` carries NO connection details or credentials. It resolves against secrets
3346
- * sources already declared on the root ionite instance:
3347
- * - `source` (optional): the name of a declared source in `ion.secrets`. When omitted, `ion.secret`
3348
- * (the default config-source-backed client) is used.
3349
- * - `path`: the tenant-specific secret path within that source.
3350
- * - `ttl` (optional): poll interval (ms) for the tenant config subscription.
3351
- *
3352
- * This keeps credentials/connection wiring on the root Ionite (ConfigSource-owned) and out of the tenant
3353
- * store, and forces apps to declare their secrets sources up front rather than spinning them up
3354
- * ad-hoc per tenant.
3355
- */
3356
- type TenantConfigLocator = {
3357
- source?: string;
3358
- path: string;
3359
- ttl?: number;
3445
+ type MirrorConfigLocator = {
3446
+ type: "mirror";
3447
+ /** Authoritative upstream. Nested mirrors are rejected by runtime validation. */
3448
+ from: ConfigLocator;
3449
+ /** App-owned, write-capable mirror destination. */
3450
+ to: VaultConfigLocator;
3360
3451
  };
3452
+ type ConfigLocator = VaultConfigLocator | AwsConfigLocator | AzureConfigLocator | GcpConfigLocator | MirrorConfigLocator;
3361
3453
  /**
3362
- * Minimal handle needed to materialize a tenant's {@link ConfigSource} from a {@link TenantConfigLocator}.
3363
- * Structurally satisfied by an `Ionite` instance (`ion`): the default `secret` client plus
3364
- * the optional named `secrets` sources.
3454
+ * Minimal handle needed to materialize a config source from an already-configured secrets source.
3455
+ * Structurally satisfied by an `Ionite` instance (`ion`): the default `secret` client plus optional
3456
+ * named `secrets` sources.
3365
3457
  */
3366
3458
  type ConfigSourceResolver = {
3367
3459
  secret: SecretsSource;
@@ -3446,24 +3538,22 @@ type AuthzConfig = {
3446
3538
  */
3447
3539
  trustedProvisioningClients?: TrustedProvisioningClient[];
3448
3540
  /**
3449
- * Code-declared catalog (Framework-only; a ConfigSource can never supply it). An in-memory,
3450
- * read-path definition source for code-authored groups/roles/permissions: never seeded or
3451
- * written to any store, unified with `catalogStore` and resource-derived entitlements on every
3452
- * read (lookup order code -> store -> derived), and immutable through SCIM (member grant/revoke
3453
- * allowed; metadata writes return 403 `mutability`). Accepts declarative arrays or a
3454
- * `defineCatalog(...)` result; validated/normalized at config apply. See `defineCatalog`.
3541
+ * Code-declared catalog (Framework-only; a ConfigSource can never supply it). Supplies structural
3542
+ * templates for code-authored groups/roles/permissions. Entries remain readable before
3543
+ * materialization, then `catalogStore` rows own runtime presentation and IAM receipts while code
3544
+ * continues to own structure. Accepts declarative arrays or a `defineCatalog(...)` result;
3545
+ * validated/normalized at config apply. See `defineCatalog`.
3455
3546
  */
3456
3547
  catalog?: CodeCatalog | CodeCatalogInput;
3457
- /** Durable catalog store for SCIM/IAM-sourced entitlement definitions (full SCIM CRUD). */
3548
+ /** Runtime authority for grantable entitlement definitions, presentation, lifecycle, and IAM receipts. */
3458
3549
  catalogStore?: AccessCatalogStore;
3459
3550
  /** Granted roots (source of truth) used by SCIM/IAM orchestration and OAA projection. */
3460
3551
  accessStore?: AccessAssignmentStore;
3461
3552
  /** Derived closure index for fast `has*` checks; materialized from accessStore + catalogStore. */
3462
3553
  accessIndex?: AccessIndex;
3463
3554
  /**
3464
- * Read-through provider over the application's own resource data (teams, projects, ...), including
3465
- * optional derived-entitlement functions. The SDK never stores resources itself; see
3466
- * {@link ResourceProvider}.
3555
+ * Read-through provider over the application's own resource data (teams, projects, ...). The SDK
3556
+ * never stores resources itself; see {@link ResourceProvider}.
3467
3557
  */
3468
3558
  resources?: ResourceProvider;
3469
3559
  /**
@@ -3563,7 +3653,7 @@ type RemoteConfig = {
3563
3653
  workload?: WorkloadConfig | WorkloadConfigMap | WorkloadIncomingOutgoing;
3564
3654
  /** Optional named secrets-source configs available to this App instance. */
3565
3655
  secrets?: SecretsModuleConfig;
3566
- /** ConfigSource-owned named managed token pools consumed through `ion.kms`. */
3656
+ /** ConfigSource-owned named server-allocated key pools consumed through `ion.kms`. */
3567
3657
  kms?: KmsConfig;
3568
3658
  ciam?: CIAMConfig;
3569
3659
  /** OpenTelemetry collector/exporter config loaded from ConfigSource. */
@@ -3643,7 +3733,7 @@ type FrameworkStores = {
3643
3733
  customerStore?: CustomerStore<unknown>;
3644
3734
  accessStore?: AccessAssignmentStore<unknown>;
3645
3735
  accessIndex?: AccessIndex;
3646
- /** Code-declared catalog (read-path, in-memory; never stored). See `AuthzConfig.catalog`. */
3736
+ /** Code-declared structural catalog templates. See `AuthzConfig.catalog`. */
3647
3737
  catalog?: CodeCatalog | CodeCatalogInput;
3648
3738
  catalogStore?: AccessCatalogStore;
3649
3739
  /** Read-through {@link ResourceProvider} over the app's own resource data (never SDK-stored). */
@@ -3656,11 +3746,6 @@ type FrameworkStores = {
3656
3746
  * provisioned/assigned access (`subjectType: 'workload'`). Authorization works without it.
3657
3747
  */
3658
3748
  workloadIdentityStore?: WorkloadIdentityStore<unknown>;
3659
- /**
3660
- * Durable externalId -> destination provider-id cache for IAM delta `'patch'` egress. Optional; when
3661
- * absent, `delta:'patch'` reports not-ready (the adapter requires a mapping store).
3662
- */
3663
- deltaIdMapStore?: IamDeltaIdMapStore;
3664
3749
  };
3665
3750
  type ModifiableFrameworkConfig = FrameworkConfig & {
3666
3751
  setStores(stores: FrameworkStores): void;
@@ -3782,8 +3867,8 @@ type ConfigSource = {
3782
3867
  * built-in core schemas.
3783
3868
  */
3784
3869
  type CIAMValidators = {
3785
- customer: StandardSchemaV17<unknown, BaseCustomer> & {
3786
- validate(value: unknown): Promise<StandardSchemaV17.Result<BaseCustomer>>;
3870
+ customer: StandardSchemaV18<unknown, BaseCustomer> & {
3871
+ validate(value: unknown): Promise<StandardSchemaV18.Result<BaseCustomer>>;
3787
3872
  };
3788
3873
  callbackParams?: StandardSchemaWithValidate<OidcCallbackParams>;
3789
3874
  idTokenClaims?: StandardSchemaWithValidate<IdTokenClaims>;
@@ -4128,16 +4213,16 @@ type CreateTenantRequestBase = {
4128
4213
  companyId: string;
4129
4214
  companyName: string;
4130
4215
  environmentType: EnvironmentType;
4131
- /** Required at creation: the pointer used to materialize this tenant's ConfigSource. */
4132
- configLocator: TenantConfigLocator;
4216
+ /** Optional until the tenant's ConfigSource has been provisioned. */
4217
+ configLocator?: ConfigLocator;
4133
4218
  email?: string;
4134
4219
  webhookUrl?: string;
4135
4220
  callbackUrl?: string;
4136
4221
  };
4137
4222
  /**
4138
- * Body for creating a tenant (`POST ${basePath}`). All identity fields plus `configLocator` are
4139
- * required — a tenant cannot exist without config. Idempotent by `id`: re-submitting the same `id`
4140
- * re-applies the record (safe for provisioning retries).
4223
+ * Body for creating a tenant (`POST ${basePath}`). `configLocator` may be supplied immediately or
4224
+ * patched later after the tenant's ConfigSource has been provisioned. Idempotent by `id`:
4225
+ * re-submitting the same `id` re-applies the record (safe for provisioning retries).
4141
4226
  */
4142
4227
  type CreateTenantRequest<TExtended extends object = object> = CreateTenantRequestBase & TExtended;
4143
4228
  /**
@@ -4150,7 +4235,7 @@ type UpdateTenantRequest<TExtended extends object = object> = {
4150
4235
  companyId?: string;
4151
4236
  companyName?: string;
4152
4237
  environmentType?: EnvironmentType;
4153
- configLocator?: TenantConfigLocator;
4238
+ configLocator?: ConfigLocator;
4154
4239
  email?: string;
4155
4240
  webhookUrl?: string;
4156
4241
  callbackUrl?: string;
@@ -4205,9 +4290,9 @@ type TenantValidators<
4205
4290
  TUpdateTenantRequest extends UpdateTenantRequest = UpdateTenantRequest,
4206
4291
  TTenantResponse extends TenantResponse = TenantResponse
4207
4292
  > = {
4208
- createTenantRequest: StandardSchemaV18<unknown, TCreateTenantRequest>;
4209
- updateTenantRequest: StandardSchemaV18<unknown, TUpdateTenantRequest>;
4210
- tenantResponse?: StandardSchemaV18<unknown, TTenantResponse>;
4293
+ createTenantRequest: StandardSchemaV19<unknown, TCreateTenantRequest>;
4294
+ updateTenantRequest: StandardSchemaV19<unknown, TUpdateTenantRequest>;
4295
+ tenantResponse?: StandardSchemaV19<unknown, TTenantResponse>;
4211
4296
  };
4212
4297
  declare function isConfigLocator(value: unknown): value is ConfigLocator;
4213
4298
  type BaseTenant = {
@@ -4227,14 +4312,12 @@ type BaseTenant = {
4227
4312
  createdAt: Date;
4228
4313
  updatedAt: Date;
4229
4314
  /**
4230
- * Serializable pointer used to materialize this tenant's ConfigSource. Resolves against the root
4231
- * ionite secrets sources ({@link TenantConfigLocator}); carries no connection details or credentials.
4232
- * Required: every tenant has config, so `createIon`/`tenantConfigSource` can rely on it without a
4233
- * runtime presence guard.
4315
+ * Serializable descriptor used to materialize this tenant's ConfigSource. Tenant-management
4316
+ * payloads must contain only credential-free locator fields. Optional until vault/config-source
4317
+ * integration completes; runtime construction must reject or remain unavailable while absent.
4234
4318
  */
4235
- configLocator: TenantConfigLocator;
4319
+ configLocator?: ConfigLocator;
4236
4320
  };
4237
- type TenantFactory<TTenant extends BaseTenant = BaseTenant> = (tenant: TTenant) => Ionite;
4238
4321
  /**
4239
4322
  * A single-flight cache of per-tenant {@link Ionite} instances, supplied by the app.
4240
4323
  *
@@ -4306,6 +4389,14 @@ type BaseUser<TExtended = object> = BaseUserFields & {
4306
4389
  */
4307
4390
  externalId?: string;
4308
4391
  /**
4392
+ * Optional destination service-provider id captured after IAM materializes this user.
4393
+ */
4394
+ providerId?: string;
4395
+ /**
4396
+ * Optional IAM-owned deep link associated with this user receipt.
4397
+ */
4398
+ requestUrl?: string;
4399
+ /**
4309
4400
  * Optional Enterprise Controlled ID: a system-of-record-owned identity correlator formatted as
4310
4401
  * `ecid:<realm>:<opaque>` (realm = the minting authority's id). Correlates this account to a
4311
4402
  * single identity across systems. Minted by the enterprise SOR (via an ECI), never by the app;
@@ -4480,6 +4571,11 @@ interface UserStore<TExtended = object> {
4480
4571
  */
4481
4572
  get(id: string): Promise<BaseUser<TExtended> | undefined>;
4482
4573
  /**
4574
+ * Optional secondary-index lookup for the stable enterprise correlation key. Implementations that
4575
+ * omit it remain correct; callers fall back to paged `list()` scans.
4576
+ */
4577
+ getByExternalId?(externalId: string): Promise<BaseUser<TExtended> | undefined>;
4578
+ /**
4483
4579
  * Retrieve a user based on their SCIM attributes or SSO JWT Claims.
4484
4580
  *
4485
4581
  * @param user - The user to lookup by SCIM attributes or SSO JWT Claims
@@ -4515,7 +4611,12 @@ type AuthzEntityBase = {
4515
4611
  name: string;
4516
4612
  displayName?: string;
4517
4613
  description: string;
4518
- externalId?: string;
4614
+ /** Destination service-provider id captured after IAM materializes this entitlement. */
4615
+ providerId?: string;
4616
+ /** Provenance of the durable catalog row. Code entries are materialized with `source: 'code'`. */
4617
+ source?: "code" | "app" | "scim";
4618
+ /** A retired entitlement may be deleted by IAM after its grants have been removed. */
4619
+ deprecated?: boolean;
4519
4620
  metadata?: Record<string, unknown>;
4520
4621
  };
4521
4622
  type Resource = AuthzEntityBase & {
@@ -4545,6 +4646,8 @@ type SubjectTypeScoping = {
4545
4646
  type Permission = AuthzEntityBase & SubjectTypeScoping & {
4546
4647
  /** True when this catalog entry should be exposed as requestable access in IAM tooling. */
4547
4648
  requestable?: boolean;
4649
+ /** IAM-owned deep link where a principal can request this entitlement, when the destination provides one. */
4650
+ requestUrl?: string;
4548
4651
  action?: string;
4549
4652
  /** Canonical OAA permission types (maps to OAA `permission_type`). */
4550
4653
  permissionTypes?: string[];
@@ -4556,12 +4659,16 @@ type Permission = AuthzEntityBase & SubjectTypeScoping & {
4556
4659
  type Role = AuthzEntityBase & SubjectTypeScoping & {
4557
4660
  /** True when this catalog entry should be exposed as requestable access in IAM tooling. */
4558
4661
  requestable?: boolean;
4662
+ /** IAM-owned deep link where a principal can request this entitlement, when the destination provides one. */
4663
+ requestUrl?: string;
4559
4664
  /** Permissions this role confers (definitional). Roles are flat bundles — OAA has no nested-role edge. */
4560
4665
  permissions?: Array<string | Permission>;
4561
4666
  };
4562
4667
  type Group = AuthzEntityBase & SubjectTypeScoping & {
4563
4668
  /** True when this catalog entry should be exposed as requestable access in IAM tooling. */
4564
4669
  requestable?: boolean;
4670
+ /** IAM-owned deep link where a principal can request this entitlement, when the destination provides one. */
4671
+ requestUrl?: string;
4565
4672
  /** Nested child groups composed into this group (definitional). */
4566
4673
  groups?: Array<string | Group>;
4567
4674
  /** Roles this group confers (group is the principal). Projected as OAA `local_group` role assignments. */
@@ -4594,6 +4701,14 @@ type AuthzScimGroupType = OaaAccessTargetType;
4594
4701
  type AuthzScimGroupExtension = {
4595
4702
  type?: AuthzScimGroupType;
4596
4703
  requestable?: boolean;
4704
+ /** Destination service-provider id written back by IAM. */
4705
+ providerId?: string;
4706
+ /** IAM-owned deep link for requesting this entitlement. Writable by IAM. */
4707
+ requestUrl?: string;
4708
+ /** Catalog-row provenance. Read-only to IAM. */
4709
+ source?: "code" | "app" | "scim";
4710
+ /** Whether the entitlement has been retired and can be deleted. Read-only to IAM. */
4711
+ deprecated?: boolean;
4597
4712
  description?: string;
4598
4713
  /** Resource ids this entitlement is scoped to (the catalog `Group.resources` binding, by id). */
4599
4714
  resources?: string[];
@@ -4629,23 +4744,22 @@ interface EntityStore<TEntity> {
4629
4744
  * durability guarantee is required (e.g. SCIM write-through).
4630
4745
  */
4631
4746
  set(entity: TEntity): ReadyAccessCatalogEntry<TEntity>;
4632
- delete(id: string): Promise<void>;
4633
- list(options?: ListOptions): Promise<ListResult<TEntity>>;
4634
4747
  /**
4635
- * Optional `externalId` secondary lookup. When implemented, the SDK resolves SCIM
4636
- * `externalId eq "..."` filters through this index instead of a full `list()` scan (AUDIT_HISTORY.md §7.4).
4637
- * Returns the single entity with the given `externalId`, or `undefined` when none matches. Stores
4638
- * that omit it fall back to scanning `list()`.
4748
+ * Atomic insert-if-absent operation. Catalog materialization uses this so concurrent IAM
4749
+ * presentation edits can never be overwritten by a late code-template insert. Returns the
4750
+ * existing row when one already exists.
4639
4751
  */
4640
- getByExternalId?(externalId: string): Promise<TEntity | undefined>;
4752
+ insertIfAbsent(entity: TEntity): ReadyAccessCatalogEntry<TEntity>;
4753
+ delete(id: string): Promise<void>;
4754
+ list(options?: ListOptions): Promise<ListResult<TEntity>>;
4641
4755
  }
4642
4756
  /** The catalog entity kind a {@link CatalogChange} refers to. */
4643
4757
  type CatalogChangeKind = OaaAccessTargetType;
4644
4758
  /**
4645
4759
  * A reactive catalog change emitted AFTER a durable `set()`/`delete()` lands on the backing store.
4646
- * `set` carries the persisted entity so subscribers can project exactly what was stored without an
4647
- * extra read; `delete` carries only the id, which the SDK projects as an incremental OAA entity
4648
- * delete (full incremental CRUD). A later full `oaa.sync` remains the reconciliation safety net.
4760
+ * `set` carries the persisted entity and prior value (`undefined` on insert); `delete` carries the
4761
+ * removed entity so downstream projections can delete the matching provider resource after the
4762
+ * local row is gone. A later full sync remains the reconciliation safety net.
4649
4763
  *
4650
4764
  * Resource changes are NOT catalog changes: resources live in the application's own store and are
4651
4765
  * signaled through {@link ResourceProvider.changed} instead.
@@ -4654,10 +4768,11 @@ type CatalogChange = {
4654
4768
  op: "set";
4655
4769
  kind: CatalogChangeKind;
4656
4770
  entity: Group | Role | Permission;
4771
+ previous: Group | Role | Permission | undefined;
4657
4772
  } | {
4658
4773
  op: "delete";
4659
4774
  kind: CatalogChangeKind;
4660
- id: string;
4775
+ entity: Group | Role | Permission;
4661
4776
  };
4662
4777
  /** Listener invoked with a {@link CatalogChange} after a durable catalog write lands. */
4663
4778
  type CatalogChangeListener = (change: CatalogChange) => void;
@@ -4667,9 +4782,8 @@ type AccessCatalogStore = {
4667
4782
  permissions: EntityStore<Permission>;
4668
4783
  /**
4669
4784
  * Reactive change subscription (the catalog analog of {@link ReactiveHandle}). When implemented,
4670
- * the SDK subscribes once at wiring time and projects each change to OAA. Stores that omit it do
4671
- * not drive incremental OAA projection; a later full `oaa.sync` still reconciles. Returns an
4672
- * unsubscribe function.
4785
+ * the SDK subscribes once at wiring time and projects each change to OAA and ready IAM delta.
4786
+ * Stores that omit it rely on later full sync/reconcile. Returns an unsubscribe function.
4673
4787
  */
4674
4788
  afterChange?(listener: CatalogChangeListener): () => void;
4675
4789
  };
@@ -4686,20 +4800,8 @@ type ResourceChangeListener = (change: ResourceChange) => void;
4686
4800
  * Resources are app-domain rows the application already persists in its own database/ORM — they are
4687
4801
  * NOT authorization state, so the SDK never stores a copy. Instead the app wires a `ResourceProvider`
4688
4802
  * (via `FrameworkStores.resources` / `AuthzConfig.resources`) and the SDK reads through it for
4689
- * closure expansion, SCIM Group projection, and OAA projection. There is no seeding step, no
4690
- * dual-write on CRUD routes, and no lifecycle to keep in sync: `db.insert(...)` (plus a `changed`
4691
- * signal) is the whole integration.
4692
- *
4693
- * **Resource-derived entitlements.** `entitlements(resource)` is an app-authored PURE function that
4694
- * derives the per-resource requestable entitlement {@link Group}s (e.g. "Team X (member)") on demand.
4695
- * Unlike catalog entitlements (definitions authored as rows in the {@link AccessCatalogStore}),
4696
- * resource-derived groups are rules, not rows: their definitions are never stored, they appear in
4697
- * SCIM Groups list/get and OAA projection automatically, and member grants against their ids expand
4698
- * with the group's `resources` scope like any catalog group (grants against both kinds are stored
4699
- * identically as access roots). Keep the function next to your catalog entitlement definitions so the
4700
- * logic stays grep-able and debuggable — it is plain code the SDK calls, not configuration.
4701
- * `entitlement(id)` is the deliberate, app-authored reverse resolver (derived group id -> group);
4702
- * both must be provided together.
4803
+ * resource-scoped closure expansion and OAA projection. Grantable entitlements are durable
4804
+ * {@link AccessCatalogStore} rows; resource providers no longer synthesize entitlement definitions.
4703
4805
  */
4704
4806
  type ResourceProvider = {
4705
4807
  /** Point lookup by resource id (e.g. `'team:t1'`). */
@@ -4712,22 +4814,9 @@ type ResourceProvider = {
4712
4814
  */
4713
4815
  children?(id: string): Promise<Resource[]>;
4714
4816
  /**
4715
- * Pure, synchronous derivation of a resource's requestable entitlement {@link Group}s. Called on
4716
- * demand (results are memoized alongside catalog adjacency and invalidated by `changed`); must be
4717
- * deterministic for a given resource. Requires `entitlement` to be provided as well.
4718
- */
4719
- entitlements?(resource: Resource): Group[];
4720
- /**
4721
- * Reverse resolution of a resource-derived entitlement id to its {@link Group} (or `undefined`
4722
- * when the id is not a resource-derived entitlement). App-authored on purpose — the id scheme is
4723
- * the app's, and an explicit resolver keeps derivation traceable. Required when `entitlements` is
4724
- * provided.
4725
- */
4726
- entitlement?(id: string): Promise<Group | undefined>;
4727
- /**
4728
4817
  * Change signal invoked after the app's own resource write/delete lands. Drives adjacency-cache
4729
- * invalidation, targeted index reconciliation, and incremental OAA resource projection. Returns an
4730
- * unsubscribe function. Without it, drift is only repaired by a later full reconcile/sync.
4818
+ * invalidation, targeted index reconciliation, and incremental OAA resource projection. Returns
4819
+ * an unsubscribe function. Without it, drift is only repaired by a later full reconcile/sync.
4731
4820
  */
4732
4821
  changed?(listener: ResourceChangeListener): () => void;
4733
4822
  };
@@ -5084,6 +5173,10 @@ type ReconcileReport = {
5084
5173
  */
5085
5174
  type Authz = {
5086
5175
  oaa: OaaClient;
5176
+ /** Read the effective catalog union (materialized rows plus unmaterialized code templates). */
5177
+ entitlements: {
5178
+ list(options?: ListOptions): Promise<ListResult<Entitlement>>;
5179
+ };
5087
5180
  /** The wired closure index powering `has*`, when the app provided one via stores. */
5088
5181
  accessIndex?: AccessIndex;
5089
5182
  has(subject: AccessRef<BaseUser>, targetType: OaaAccessTargetType, target: AccessRef<Group | Role | Permission>, resource?: AccessRef<Resource>, subjectType?: SubjectType): Promise<AuthzDecision>;
@@ -5379,6 +5472,14 @@ declare function listGenerator<T>(listFn: (start: number, limit: number) => Prom
5379
5472
  */
5380
5473
  declare function readyCatalogEntry<TEntity extends object>(entity: TEntity, write: Promise<void>): ReadyAccessCatalogEntry<TEntity>;
5381
5474
  /**
5475
+ * Persisted content contract for an ionite RemoteConfig document.
5476
+ *
5477
+ * The descriptor intentionally omits a runtime schema because applications may extend validation
5478
+ * through their configured Standard Schema validators. Use `toRegistryEntry()` when writing the
5479
+ * secret so the serializable content metadata travels across Vault, WebSocket, and LFV transports.
5480
+ */
5481
+ declare const remoteConfigSecretType: SecretTypeDescriptor<RemoteConfig>;
5482
+ /**
5382
5483
  * Typed store-layer conflict (§5.9). Persistence stores throw this instead of a generic `Error` when
5383
5484
  * a create/uniqueness invariant is violated, so callers (SCIM, iam-delta, app code) can distinguish a
5384
5485
  * genuine conflict (map to HTTP 409, do not retry blindly) from a transient store/network failure
@@ -5422,7 +5523,7 @@ declare function normalizeTenantPathNamespace(namespace?: TenantPathNamespace):
5422
5523
  declare function normalizeTenantRoutingStrategy(strategy?: TenantRoutingStrategy): TenantPathRoutingStrategy;
5423
5524
  declare function matchTenantPath(pathname: string, namespace?: TenantPathNamespace): TenantPathMatch | null;
5424
5525
  declare function buildTenantPath(id: string, restPath?: string, namespace?: TenantPathNamespace): string;
5425
- import { StandardSchemaV1 as StandardSchemaV19 } from "@standard-schema/spec";
5526
+ import { StandardSchemaV1 as StandardSchemaV110 } from "@standard-schema/spec";
5426
5527
  type RegisterSSOAppPayload = {
5427
5528
  /** Redirect URIs for the client. */
5428
5529
  redirectUris: string[];
@@ -5464,7 +5565,7 @@ type SSOAppRegistry = {
5464
5565
  register: (payload: RegisterSSOAppPayload) => Promise<RegisterSSOAppResult>;
5465
5566
  };
5466
5567
  type SSOAppValidators = {
5467
- registerSSOAppPayload: StandardSchemaV19<unknown, RegisterSSOAppPayload>;
5568
+ registerSSOAppPayload: StandardSchemaV110<unknown, RegisterSSOAppPayload>;
5468
5569
  };
5469
5570
  type RegisterIAMAppPayload = {
5470
5571
  /** App/tenant identifier (same globally unique id used by the App tenant). */
@@ -5503,7 +5604,7 @@ type IAMAppRegistry = {
5503
5604
  register: (payload: RegisterIAMAppPayload) => Promise<RegisterIAMAppResult>;
5504
5605
  };
5505
5606
  type IAMAppValidators = {
5506
- registerIAMAppPayload: StandardSchemaV19<unknown, RegisterIAMAppPayload>;
5607
+ registerIAMAppPayload: StandardSchemaV110<unknown, RegisterIAMAppPayload>;
5507
5608
  };
5508
5609
  type LfvActionName = "read_secret" | "create_secret" | "update_secret" | "delete_secret" | "request_rotate" | "request_revoke" | "rotate_secret" | "revoke_secret" | "list_paths" | "list_secrets" | "read_metadata" | "remove_path";
5509
5610
  type LfvOtpRequest = {
@@ -5536,4 +5637,4 @@ type LfvErrorResponse = {
5536
5637
  };
5537
5638
  /** Generates a ULID */
5538
5639
  declare function generateULID(prefix?: string): string;
5539
- export { workloadTokenResponseSchema, withValidate, warnLogger, waitOn, version, validationFailureResponse, userSchema, unionCatalogRead, trustedClientPermissionsForPrincipal, trimTrailingSlash, tokenResponseSchema, toCodeCatalog, stripJsonComments, stableConfigHash, silentLogger, serializeConfig, readyCatalogEntry, parseKmsPoolDocument, parseKmsAllocationPool, parseJsonc, parseEcid, oidcCallbackSchema, normalizeTenantRoutingStrategy, normalizeTenantPathNamespace, must, mergeConfig, matchTenantPath, listGenerator, list, jwtAssertionClaimsSchema, isStoreConflictError, isEcid, isConfigSourceError, isConfigLocator, isCodeCatalog, infoLogger, idTokenClaimsSchema, groupResourceSchema, generateULID, formatEcid, defineCatalog, defaultLogger, deepEqualPlain, decodeUser, debugLogger, configTrustedClientGrants, claimsToUser, buildTenantPath, assertValidSubjectTypeScoping, assertEcid, accessRootId, accessRefId, X509Certificate, WorkloadValidators, WorkloadTokenStore, WorkloadTokenResponse, WorkloadPrincipal, WorkloadIncomingOutgoing, WorkloadIdentityStore, WorkloadIdentity, WorkloadGetToken, WorkloadConfigMap, WorkloadConfig, WorkloadClient, Workload, WorkforceUser, VaultWorkloadAuthConfig, VaultWebSocketSecretsConfig, VaultWebSocketAuthHeader, VaultSecretsConfig, VaultLfvSecretsConfig, VaultConfigLocator, ValidateResult, UsersInboundHandlerConfig, UserStoreOptions, UserStore, UpdateTenantRequest, TrustedProvisioningClient, TrustedIdp, TokenValidationResult, TokenResponse, TenantWebhookPayload, TenantValidators, TenantStore, TenantStatus, TenantRoutingStrategy, TenantResponse, TenantPathRoutingStrategy, TenantPathNamespace, TenantPathMatch, TenantIonCache, TenantFactory, TenantConfigLocator, SubscriptionMode, SubjectTypeScoping, SubjectType, SubjectScope, SubjectRef, StoreConflictKind, StoreConflictError, StateCookie, StandardSchemaWithValidate, SessionStore, Session, ServerOnlyWorkloadConfig, SecretsValidators, SecretsSubscriptionOptions, SecretsSourceType, SecretsSourceMap, SecretsSourceConfig, SecretsSource, SecretsOperationOptions, SecretsModuleConfig, Secrets, SecretRequestSeverity, SecretLifecycleRequest, SecretEventName, SecretEventListener, SecretEvent, Secret, User as ScimUser, ScimServiceProviderConfig, ScimSchemaDefinition, ScimSchemaAttributeDefinition, Role2 as ScimRole, ScimResult, ScimResourceTypeSchemaExtension, ScimResourceType, ScimMutationSummary, ScimListResponse, Group2 as ScimGroup, ScimError, ScimAuthenticationScheme, SSOValidators, SSOHandlerConfig, SSOConfigFromCode, SSOConfig, SSOAppValidators, SSOAppRegistry, SSO, RoutingOptions, RouteModule, RouteFilterResult, Role, ResourceProvider, ResourceChangeListener, ResourceChange, Resource, ResolvedVaultLfvSecretsConfig, ResolvedRoute, RequireReadyResult, RemoteConfigRetryOptions, RemoteConfigRetryHook, RemoteConfigRetryContext, RemoteConfigLoadErrorKind, RemoteConfig, RegisterSSOAppResult, RegisterSSOAppPayload, RegisterSSOAppError, RegisterIAMAppResult, RegisterIAMAppPayload, RegisterIAMAppError, ReconcileReport, ReadyzEndpointConfig, ReadyAccessCatalogEntry, ReadinessReport, ReactiveHandle, Photo, PhoneNumber, Permission, ParsedEcid, PLATFORM_ASSIGNABLE_SUBJECT_TYPES, OtelSignalName, OtelSignalConfig, OtelProviderType, OtelProtocol, OtelOAuthClientCredentialsConfig, OtelMetricsSignalConfig, OtelLogRecord, OtelLogLevel, OtelLevels, OtelConfig, OtelAttributes, OtelAttributeValue, Otel, OidcCallbackParams, OaaSyncResult, OaaSyncOptions, OaaSyncInput, OaaClient, OaaAccessTargetType, OaaAccessChangeBatchItem, Name, ModuleReadinessState, ModuleReadiness, ModuleName, ModifiableFrameworkConfig, MetaData, MagicLinkStore, MagicLink, Logger, ListResult, ListOptions, ListFilter, LfvOtpResponse, LfvOtpRequest, LfvJwks, LfvErrorResponse, LfvErrorCode, LfvEd25519PublicJwk, LfvEd25519PrivateJwk, LfvCallbackTransport, LfvCallbackKind, LfvCallbackHeaders, LfvCallbackEnvelopeListener, LfvCallbackEnvelope, LfvActionRequestBase, LfvActionName, LfvActionAcceptedResponse, KmsTokenPoolDocument, KmsTokenKey, KmsPoolListener, KmsPoolKind, KmsPoolDocument, KmsPoolConfig, KmsPool, KmsKeyState, KmsConfig, KmsAllocationStrategy, KmsAllocationPoolView, KmsAllocationPoolDocument, KmsAllocationPolicy, Kms, JwtBearerWorkloadConfig, JWTAssertionClaims, IoniteValidators, IoniteUserExtension, IoniteErrorOptions, IoniteError, IoniteBase, Ionite, InMemoryTenantStoreOptions, IdentityResolution, IdTokenClaims, IamDeltaResourceType, IamDeltaReconcileResult, IamDeltaMode, IamDeltaIdMapStore, IamDeltaIdMapKey, IamDeltaEmitter, ION_TENANT_MANAGE, ION_SDK_PERMISSIONS, ION_SCIM_USER_EXTENSION_URN, ION_IAM_USERS_WRITE, ION_IAM_READ, ION_IAM_GROUPS_WRITE, ION_ENDPOINT_PERMISSIONS, ION_CIAM_MAGIC_LINK_CREATE, ION_CAPABILITIEZ_READ, ION_AUTHZ_OAA_SYNC, ION_AUTHZ_GROUP_SCHEMA, IAMValidators, IAMUsersInbound, IAMInboundUsersConfig, IAMInboundUserContext, IAMHandlerConfig, IAMGroupsOutbound, IAMGroupsInbound, IAMDiscoveryHandlerConfig, IAMDiscoveryContext, IAMDiscoveryConfig, IAMConfigFromCode, IAMConfig, IAMAppValidators, IAMAppRegistry, IAM, GroupsInboundHandlerConfig, GroupResource, GroupMember, Group, GcpSecretsConfig, GcpConfigLocator, FrameworkWorkloadIncomingOutgoing, FrameworkWorkloadConfigFromCode, FrameworkWorkloadConfig, FrameworkStores, FrameworkSecretsSourceConfig, FrameworkSecretsModuleConfig, FrameworkOtelConfig, FrameworkLfvConfig, FrameworkConfigInput, FrameworkConfig, EnvironmentType, EntityStore, EntitlementType, Entitlement, EnterpriseExtension, EndpointPermission, EndpointOperation, Email, EgressOutcome, EgressChannelOutcome, EffectiveEdge, EcidFormatError, ECID_SCHEME, DevSecretsConfig, DEFAULT_TENANT_UI_NAMESPACE, DEFAULT_TENANT_API_NAMESPACE, CustomerStoreOptions, CustomerStore, Customer, CreateUserOptions, CreateTenantRequest, CreateGroupOptions, ConfigSubscriptionOptions, ConfigSourceType, ConfigSourceResolver, ConfigSourceErrorInit, ConfigSourceError, ConfigSourceEnv, ConfigSource, ConfigLocator, ConfigErrorKind, ConfigChangeResult, ConfigChangeOptions, ConfigChangeCallback, ConfigApplyStatus, CodeCatalogNamespace, CodeCatalogInput, CodeCatalog, ClientCredentialsWorkloadConfig, ChangeListener, CatalogChangeListener, CatalogChangeKind, CatalogChange, CapabilityState, CapabilityKey, CapabilityEndpointUrls, CapabilitiezManifest, CachedWorkloadToken, CacheConfig, CIAMValidators, CIAMProviderType, CIAMProviderDescriptor, CIAMProviderConfig, CIAMProviderColors, CIAMProviderBranding, CIAMConfigFromCodeInput, CIAMConfigFromCode, CIAMConfig, CIAM, BaseWorkloadIdentity, BaseUser, BaseTenant, BaseCustomer, AzureSecretsConfig, AzureConfigLocator, AzureAuthMethod, AwsSecretsConfig, AwsConfigLocator, AuthzScimGroupType, AuthzScimGroupExtension, AuthzOaaConfig, AuthzEntityBase, AuthzDecision, AuthzConfig, Authz, AuthenticatedUser, AuthenticatedPrincipal, ApplicationValidators, Address, AccessStatus, AccessRef, AccessProvenance, AccessMutationStatus, AccessMutationResult, AccessIndex, AccessCheckTarget, AccessCheckResult, AccessCheckReason, AccessChange, AccessCatalogStore, AccessAssignmentStore };
5640
+ export { workloadTokenResponseSchema, withValidate, warnLogger, waitOn, version, validationFailureResponse, userSchema, unionCatalogRead, trustedClientPermissionsForPrincipal, trimTrailingSlash, tokenResponseSchema, toCodeCatalog, stripJsonComments, stableConfigHash, silentLogger, serializeConfig, remoteConfigSecretType, readyCatalogEntry, parseKmsPoolDocument, parseKmsPoolControlDocument, parseJsonc, parseEcid, oidcCallbackSchema, normalizeTenantRoutingStrategy, normalizeTenantPathNamespace, must, mergeConfig, mergeCodeCatalogEntity, materializeCodeCatalogEntity, matchTenantPath, listGenerator, list, jwtAssertionClaimsSchema, isStoreConflictError, isEcid, isConfigSourceError, isConfigLocator, isCodeCatalog, infoLogger, idTokenClaimsSchema, groupResourceSchema, getCodeCatalogEntity, generateULID, formatEcid, deprecateRetiredCodeCatalogRows, defineSecretType, defineCatalog, defaultSecretContentType, defaultLogger, deepEqualPlain, decodeUser, debugLogger, configTrustedClientGrants, claimsToUser, catalogEntityStore, buildTenantPath, assertValidSubjectTypeScoping, assertEcid, accessRootId, accessRefId, X509Certificate, WorkloadValidators, WorkloadTokenStore, WorkloadTokenResponse, WorkloadPrincipal, WorkloadIncomingOutgoing, WorkloadIdentityStore, WorkloadIdentity, WorkloadGetToken, WorkloadConfigMap, WorkloadConfig, WorkloadClient, Workload, WorkforceUser, VaultWorkloadAuthConfig, VaultWebSocketSecretsConfig, VaultWebSocketAuthHeader, VaultSecretsConfig, VaultLfvSecretsConfig, VaultConfigLocator, ValidateResult, UsersInboundHandlerConfig, UserStoreOptions, UserStore, UpdateTenantRequest, TrustedProvisioningClient, TrustedIdp, TokenValidationResult, TokenResponse, TenantWebhookPayload, TenantValidators, TenantStore, TenantStatus, TenantRoutingStrategy, TenantResponse, TenantPathRoutingStrategy, TenantPathNamespace, TenantPathMatch, TenantIonCache, SubscriptionMode, SubjectTypeScoping, SubjectType, SubjectScope, SubjectRef, StoreConflictKind, StoreConflictError, StateCookie, StandardSchemaWithValidate, SessionStore, Session, ServerOnlyWorkloadConfig, SecretsWriteOptions, SecretsValidators, SecretsSubscriptionOptions, SecretsSourceType, SecretsSourceMap, SecretsSourceConfig, SecretsSource, SecretsOperationOptions, SecretsModuleConfig, Secrets, SecretTypeRegistryEntry, SecretTypeInput, SecretTypeDescriptor, SecretRequestSeverity, SecretLifecycleRequest, SecretHandle, SecretFormat, SecretEventName, SecretEventListener, SecretEvent, SecretContentTypeMismatchError, SecretContentType, Secret, User as ScimUser, ScimServiceProviderConfig, ScimSchemaDefinition, ScimSchemaAttributeDefinition, Role2 as ScimRole, ScimResult, ScimResourceTypeSchemaExtension, ScimResourceType, ScimMutationSummary, ScimListResponse, Group2 as ScimGroup, ScimError, ScimAuthenticationScheme, SSOValidators, SSOHandlerConfig, SSOConfigFromCode, SSOConfig, SSOAppValidators, SSOAppRegistry, SSO, RoutingOptions, RouteModule, RouteFilterResult, Role, ResourceProvider, ResourceChangeListener, ResourceChange, Resource, ResolvedVaultLfvSecretsConfig, ResolvedRoute, RequireReadyResult, RemoteConfigRetryOptions, RemoteConfigRetryHook, RemoteConfigRetryContext, RemoteConfigLoadErrorKind, RemoteConfig, RegisterSSOAppResult, RegisterSSOAppPayload, RegisterSSOAppError, RegisterIAMAppResult, RegisterIAMAppPayload, RegisterIAMAppError, ReconcileReport, ReadyzEndpointConfig, ReadyAccessCatalogEntry, ReadinessReport, ReactiveHandle, Photo, PhoneNumber, Permission, ParsedEcid, PLATFORM_ASSIGNABLE_SUBJECT_TYPES, OtelSignalName, OtelSignalConfig, OtelProviderType, OtelProtocol, OtelOAuthClientCredentialsConfig, OtelMetricsSignalConfig, OtelLogRecord, OtelLogLevel, OtelLevels, OtelConfig, OtelAttributes, OtelAttributeValue, Otel, OidcCallbackParams, OaaSyncResult, OaaSyncOptions, OaaSyncInput, OaaClient, OaaAccessTargetType, OaaAccessChangeBatchItem, Name, ModuleReadinessState, ModuleReadiness, ModuleName, ModifiableFrameworkConfig, MirrorConfigLocator, MetaData, MagicLinkStore, MagicLink, Logger, ListResult, ListOptions, ListFilter, LfvOtpResponse, LfvOtpRequest, LfvJwks, LfvErrorResponse, LfvErrorCode, LfvEd25519PublicJwk, LfvEd25519PrivateJwk, LfvCallbackTransport, LfvCallbackKind, LfvCallbackHeaders, LfvCallbackEnvelope, LfvActionRequestBase, LfvActionName, LfvActionAcceptedResponse, KmsPoolListener, KmsPoolDocument, KmsPoolControlDocument, KmsPoolConfig, KmsPool, KmsKeyState, KmsKey, KmsConfig, KmsAllocationStrategy, KmsAllocationPolicy, Kms, JwtBearerWorkloadConfig, JWTAssertionClaims, IoniteValidators, IoniteUserExtension, IoniteErrorOptions, IoniteError, IoniteBase, Ionite, InferSecretType, InMemoryTenantStoreOptions, IdentityResolution, IdTokenClaims, IamDeltaResourceType, IamDeltaReconcileResult, IamDeltaReconcileInput, IamDeltaMode, IamDeltaEmitter, ION_TENANT_MANAGE, ION_SDK_PERMISSIONS, ION_SCIM_USER_EXTENSION_URN, ION_IAM_USERS_WRITE, ION_IAM_READ, ION_IAM_GROUPS_WRITE, ION_ENDPOINT_PERMISSIONS, ION_CIAM_MAGIC_LINK_CREATE, ION_CAPABILITIEZ_READ, ION_AUTHZ_OAA_SYNC, ION_AUTHZ_GROUP_SCHEMA, IAMValidators, IAMUsersInbound, IAMInboundUsersConfig, IAMInboundUserContext, IAMHandlerConfig, IAMGroupsOutbound, IAMGroupsInbound, IAMDiscoveryHandlerConfig, IAMDiscoveryContext, IAMDiscoveryConfig, IAMConfigFromCode, IAMConfig, IAMAppValidators, IAMAppRegistry, IAM, GroupsInboundHandlerConfig, GroupResource, GroupMember, Group, GcpSecretsConfig, GcpConfigLocator, FrameworkWorkloadIncomingOutgoing, FrameworkWorkloadConfigFromCode, FrameworkWorkloadConfig, FrameworkStores, FrameworkSecretsSourceConfig, FrameworkSecretsModuleConfig, FrameworkOtelConfig, FrameworkLfvConfig, FrameworkConfigInput, FrameworkConfig, EnvironmentType, EntityStore, EntitlementType, Entitlement, EnterpriseExtension, EndpointPermission, EndpointOperation, Email, EgressOutcome, EgressChannelOutcome, EffectiveEdge, EcidFormatError, ECID_SCHEME, DevSecretsConfig, DestinationReference, DEFAULT_TENANT_UI_NAMESPACE, DEFAULT_TENANT_API_NAMESPACE, DEFAULT_SECRET_MIME_TYPES, CustomerStoreOptions, CustomerStore, Customer, CreateUserOptions, CreateTenantRequest, CreateGroupOptions, ConfigSubscriptionOptions, ConfigSourceType, ConfigSourceResolver, ConfigSourceErrorInit, ConfigSourceError, ConfigSourceEnv, ConfigSource, ConfigLocator, ConfigErrorKind, ConfigChangeResult, ConfigChangeOptions, ConfigChangeCallback, ConfigApplyStatus, CodeCatalogNamespace, CodeCatalogInput, CodeCatalog, ClientCredentialsWorkloadConfig, ChangeListener, CatalogEntityKind, CatalogChangeListener, CatalogChangeKind, CatalogChange, CapabilityState, CapabilityKey, CapabilityEndpointUrls, CapabilitiezManifest, CachedWorkloadToken, CacheConfig, CIAMValidators, CIAMProviderType, CIAMProviderDescriptor, CIAMProviderConfig, CIAMProviderColors, CIAMProviderBranding, CIAMConfigFromCodeInput, CIAMConfigFromCode, CIAMConfig, CIAM, BaseWorkloadIdentity, BaseUser, BaseTenant, BaseCustomer, AzureSecretsConfig, AzureConfigLocator, AzureAuthMethod, AwsSecretsConfig, AwsConfigLocator, AuthzScimGroupType, AuthzScimGroupExtension, AuthzOaaConfig, AuthzEntityBase, AuthzDecision, AuthzConfig, Authz, AuthenticatedUser, AuthenticatedPrincipal, ApplicationValidators, Address, AccessStatus, AccessRef, AccessProvenance, AccessMutationStatus, AccessMutationResult, AccessIndex, AccessCheckTarget, AccessCheckResult, AccessCheckReason, AccessChange, AccessCatalogStore, AccessAssignmentStore };