@ionite/core 0.0.24-beta.20260907.3 → 0.0.24-beta.20260915.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
@@ -1,4 +1,253 @@
1
1
  import { version } from "../package.json";
2
+ import { StandardSchemaV1 as StandardSchemaV19 } from "@standard-schema/spec";
3
+ import { StandardSchemaV1 as StandardSchemaV18 } from "@standard-schema/spec";
4
+ /**
5
+ * Third-party CIAM provider presets and claim mapping.
6
+ *
7
+ * Defines the built-in provider adapters used by the CIAM module for customer
8
+ * login. Each preset supplies default OIDC/OAuth2 endpoints, scope, branding,
9
+ * and a claim mapper that normalizes provider claims into a candidate customer.
10
+ * The application's `CustomerStore` remains the system of record: the SDK only
11
+ * extracts standard claims and hands a candidate to `lookup`/`upsert`.
12
+ */
13
+ /** Built-in provider types. `oidc` is a generic OIDC provider; `magic-link` is the passwordless flow. */
14
+ type CIAMProviderType = "oidc" | "google" | "github" | "microsoft" | "apple" | "magic-link";
15
+ /** Branding colors for rendering a provider button in light and dark themes. */
16
+ type CIAMProviderColors = {
17
+ /** Background/brand color for light theme (hex or CSS color). */
18
+ light: string;
19
+ /** Background/brand color for dark theme (hex or CSS color). */
20
+ dark: string;
21
+ /** Optional secondary/accent color. */
22
+ secondary?: string;
23
+ };
24
+ /** Operator-supplied branding so the UI can render a provider list without hardcoding. */
25
+ type CIAMProviderBranding = {
26
+ /** Human-readable name shown on the login button (e.g. "Google"). */
27
+ displayName: string;
28
+ /** External icon URL (typically an SVG/PNG hosted on a CDN). */
29
+ iconUrl?: string;
30
+ /** Light/dark brand colors. */
31
+ colors?: CIAMProviderColors;
32
+ /** Optional provider info/marketing URL. */
33
+ url?: string;
34
+ };
35
+ /**
36
+ * A single CIAM provider declaration. OIDC/OAuth2 endpoint and credential
37
+ * fields come from the ConfigSource (never application code).
38
+ */
39
+ type CIAMProviderConfig = {
40
+ /** Provider adapter type. Selects defaults and claim mapping. */
41
+ type: CIAMProviderType;
42
+ /** Whether this provider is enabled. Defaults to true when omitted. */
43
+ enabled?: boolean;
44
+ /** Recommended display order (ascending). Ties broken by declaration order. */
45
+ order?: number;
46
+ /** UI branding metadata. */
47
+ branding?: CIAMProviderBranding;
48
+ /** OIDC issuer/authority (used for discovery when explicit endpoints are omitted). */
49
+ authority?: string;
50
+ /** Authorization endpoint (overrides preset). */
51
+ authorizationUrl?: string;
52
+ /** Token endpoint (overrides preset). */
53
+ tokenUrl?: string;
54
+ /** JWKS endpoint for ID token verification (overrides preset). */
55
+ jwksUri?: string;
56
+ /** OAuth2 UserInfo endpoint for providers without an ID token (e.g. GitHub). */
57
+ userInfoUrl?: string;
58
+ /** OAuth2 client id (ConfigSource-only). */
59
+ clientId?: string;
60
+ /** OAuth2 client secret (ConfigSource-only). */
61
+ clientSecret?: string;
62
+ /** Requested scope (overrides preset). */
63
+ scope?: string;
64
+ /** Apple: team id for client-secret generation. */
65
+ teamId?: string;
66
+ /** Apple: key id for client-secret generation. */
67
+ keyId?: string;
68
+ /** Apple: PKCS#8 PEM private key for client-secret generation. */
69
+ privateKey?: string;
70
+ };
71
+ /** Sanitized provider entry returned by the discovery endpoint for the UI. */
72
+ type CIAMProviderDescriptor = {
73
+ /** Provider key (matches the RemoteConfig map key); used as `?provider=`. */
74
+ name: string;
75
+ type: CIAMProviderType;
76
+ displayName: string;
77
+ /** SDK-derived login URL to navigate to (begins the flow). */
78
+ loginUrl: string;
79
+ iconUrl?: string;
80
+ colors?: CIAMProviderColors;
81
+ url?: string;
82
+ };
83
+ /**
84
+ * Minimal logger interface compatible with common structured logging patterns.
85
+ */
86
+ interface Logger {
87
+ trace(message?: unknown, ...optionalParams: unknown[]): void;
88
+ debug(message?: unknown, ...optionalParams: unknown[]): void;
89
+ info(message?: unknown, ...optionalParams: unknown[]): void;
90
+ warn(message?: unknown, ...optionalParams: unknown[]): void;
91
+ error(message?: unknown, ...optionalParams: unknown[]): void;
92
+ }
93
+ /**
94
+ * Renders a structured logger call as one greppable line while leaving the source fields separate
95
+ * for telemetry exporters.
96
+ */
97
+ declare function formatLogLine(level: keyof Logger, message: unknown, optionalParams?: unknown[], timestamp?: Date): string;
98
+ /**
99
+ * No-op implementation — does nothing for any log level
100
+ */
101
+ declare const silentLogger: Logger;
102
+ /**
103
+ * Default logger used until an ionite instance is configured with
104
+ * an OpenTelemetry-backed logger or an application-provided logger.
105
+ */
106
+ declare const defaultLogger: Logger;
107
+ /**
108
+ * Logger that logs messages debug, info, warn, and error to the console.
109
+ */
110
+ declare const debugLogger: Logger;
111
+ /**
112
+ * Logger that logs messages info, warn, and error to the console.
113
+ */
114
+ declare const infoLogger: Logger;
115
+ /**
116
+ * Logger that logs messages warn and error to the console.
117
+ */
118
+ declare const warnLogger: Logger;
119
+ /**
120
+ * Human-readable single-line console logger for local application output.
121
+ */
122
+ declare const prettyLogger: Logger;
123
+ /** Synchronous, in-memory read surface for one code catalog entity kind. */
124
+ type CodeCatalogNamespace<TEntity> = {
125
+ get(id: string): TEntity | undefined;
126
+ list(): readonly TEntity[];
127
+ };
128
+ /**
129
+ * Normalized, frozen code-declared catalog produced by {@link defineCatalog}. All entities are
130
+ * deep-frozen and id-indexed.
131
+ */
132
+ type CodeCatalog = {
133
+ groups: CodeCatalogNamespace<Group>;
134
+ roles: CodeCatalogNamespace<Role>;
135
+ permissions: CodeCatalogNamespace<Permission>;
136
+ };
137
+ /** Declarative input for {@link defineCatalog} (plain arrays authored in app code). */
138
+ type CodeCatalogInput = {
139
+ groups?: readonly Group[];
140
+ roles?: readonly Role[];
141
+ permissions?: readonly Permission[];
142
+ };
143
+ /** True when the value is already a normalized {@link CodeCatalog} (vs a declarative input). */
144
+ declare function isCodeCatalog(value: CodeCatalog | CodeCatalogInput): value is CodeCatalog;
145
+ /** Normalize an `authz.catalog` config value: pass through a {@link CodeCatalog}, build one from input. */
146
+ declare function toCodeCatalog(value: CodeCatalog | CodeCatalogInput): CodeCatalog;
147
+ type CatalogEntityKind = "group" | "role" | "permission";
148
+ /**
149
+ * Build a validated, frozen {@link CodeCatalog} from declarative arrays. Call it once at module
150
+ * scope in a pure authz module (no store imports) and wire the result via
151
+ * `FrameworkConfig.authz.catalog`.
152
+ *
153
+ * Validation (throws {@link Error} at module evaluation on the first violation):
154
+ * - ids are globally unique across groups, roles, AND permissions (one SCIM Groups id space);
155
+ * - every group -> group/role/permission reference (string id or embedded object) resolves to an
156
+ * entity declared in the catalog arrays, and every role -> permission reference likewise
157
+ * (`resources` refs are NOT validated here — resources live in the app's `ResourceProvider`);
158
+ * - nested group composition is acyclic;
159
+ * - every entitlement declares a required non-empty `assignableSubjectTypes` within the platform
160
+ * ceiling, and `recommendedSubjectTypes` is a subset of it.
161
+ *
162
+ * Side effects: every entity (and its arrays/metadata) is frozen.
163
+ */
164
+ declare function defineCatalog(input: CodeCatalogInput): CodeCatalog;
165
+ /** Resolve one code entity and its kind from the shared id space. */
166
+ declare function getCodeCatalogEntity(code: CodeCatalog | undefined, id: string): {
167
+ entity: Group | Role | Permission;
168
+ kind: CatalogEntityKind;
169
+ } | undefined;
170
+ /** Return the entity namespace for one catalog kind. */
171
+ declare function catalogEntityStore<TEntity extends Group | Role | Permission>(catalog: AccessCatalogStore, kind: CatalogEntityKind): EntityStore<TEntity>;
172
+ /**
173
+ * Merge a materialized row with its code template. The row owns receipts, lifecycle, other runtime
174
+ * metadata, and any IAM-authored presentation overrides (`displayName`, `riskLevel`) — a stored
175
+ * value means IAM expressed an opinion, an absent one keeps following code edits. Code owns ids,
176
+ * subject scoping, and graph/resource structure.
177
+ */
178
+ declare function mergeCodeCatalogEntity<TEntity extends Group | Role | Permission>(kind: CatalogEntityKind, code: TEntity, stored: TEntity): TEntity;
179
+ /**
180
+ * Insert a code template into the runtime catalog only when no row exists. Existing rows are never
181
+ * rewritten, preserving IAM-authored presentation and receipts. `insertIfAbsent` closes the race
182
+ * between the initial read and insert.
183
+ *
184
+ * Advisory presentation (`riskLevel`, `displayName`) is deliberately NOT persisted: on the durable
185
+ * row an absent value means "no IAM override", so the merged read keeps following later code edits.
186
+ * Snapshotting the seed here would freeze it — indistinguishable from an IAM-authored value.
187
+ */
188
+ declare function materializeCodeCatalogEntity<TEntity extends Group | Role | Permission>(kind: CatalogEntityKind, code: TEntity, store: EntityStore<TEntity>): Promise<TEntity>;
189
+ /**
190
+ * Mark materialized code rows as deprecated when their template no longer exists. Callers choose
191
+ * when to run this lifecycle sweep; it never runs during config apply.
192
+ */
193
+ declare function deprecateRetiredCodeCatalogRows(code: CodeCatalog | undefined, store: AccessCatalogStore, onlyId?: string): Promise<void>;
194
+ /**
195
+ * {@link AccessCatalogStore}-shaped read union over code templates and the runtime store. Store rows
196
+ * win presentation for code ids, code owns their structure, and unmaterialized code entities remain
197
+ * visible. Returns undefined when neither source is wired.
198
+ */
199
+ declare function unionCatalogRead(code: CodeCatalog | undefined, store: AccessCatalogStore | undefined): AccessCatalogStore | undefined;
200
+ import { StandardSchemaV1 as StandardSchemaV15 } from "@standard-schema/spec";
201
+ /**
202
+ * Resolve an access subject/target/resource reference (a string id or an object carrying one) to its
203
+ * canonical, trimmed string id. This is the single id-resolution rule shared across the authz stack
204
+ * (AUDIT_HISTORY.md §8.4): `accessRootId`, the access stores, the access index, and SCIM diff keys all key off
205
+ * the same normalization so distinct roots never collapse and identical references never diverge.
206
+ * Returns `''` when no id can be resolved.
207
+ */
208
+ declare function accessRefId(value: unknown): string;
209
+ /**
210
+ * Deterministic id for a granted root. Includes the resource scope so that two grants of the same
211
+ * subject/target with different scopes are tracked as distinct roots. Application-wide scope (the
212
+ * default, or `applyToApplication`) collapses to the `app` scope key.
213
+ */
214
+ declare function accessRootId(change: AccessChange): string;
215
+ /**
216
+ * Shared minimal identity fields used to build both the workforce user
217
+ * record (`BaseUser`) and the CIAM customer record (`BaseCustomer`), as well
218
+ * as the authenticated session types (`WorkforceUser`, `Customer`).
219
+ *
220
+ * This is an internal structural base and is intentionally not part of the
221
+ * public API surface; consumers extend the `BaseUser` Zod/Valibot schema
222
+ * instead.
223
+ */
224
+ interface BaseUserFields {
225
+ /**
226
+ * Unique identifier for the user
227
+ */
228
+ id?: string;
229
+ /**
230
+ * REQUIRED. Unique identifier for login
231
+ */
232
+ userName: string;
233
+ /**
234
+ * REQUIRED. Simple display name
235
+ */
236
+ name: string;
237
+ /**
238
+ * REQUIRED. Primary email address
239
+ */
240
+ email: string;
241
+ /**
242
+ * URL to user's avatar/profile picture
243
+ */
244
+ avatar?: string;
245
+ /**
246
+ * User type (e.g., "employee", "contractor", "customer").
247
+ * Shared by SSO/CIAM and enterprise/SCIM user representations.
248
+ */
249
+ userType?: string;
250
+ }
2
251
  /**
3
252
  * Shared types for paginated list operations across stores.
4
253
  *
@@ -53,981 +302,921 @@ interface ListOptions {
53
302
  /** Optional server-side filter applied before pagination. */
54
303
  filter?: ListFilter;
55
304
  }
305
+ import { StandardSchemaV1 } from "@standard-schema/spec";
56
306
  /**
57
- * Shared minimal identity fields used to build both the workforce user
58
- * record (`BaseUser`) and the CIAM customer record (`BaseCustomer`), as well
59
- * as the authenticated session types (`WorkforceUser`, `Customer`).
60
- *
61
- * This is an internal structural base and is intentionally not part of the
62
- * public API surface; consumers extend the `BaseUser` Zod/Valibot schema
63
- * instead.
307
+ * SCIM 2.0 User Resource
308
+ * @see https://datatracker.ietf.org/doc/html/rfc7643#section-4.1
64
309
  */
65
- interface BaseUserFields {
310
+ /**
311
+ * SCIM Name sub-attribute
312
+ */
313
+ interface Name {
66
314
  /**
67
- * Unique identifier for the user
315
+ * The full name, including all middle names, titles, and suffixes as appropriate
68
316
  */
69
- id?: string;
317
+ formatted?: string;
70
318
  /**
71
- * REQUIRED. Unique identifier for login
319
+ * The family name of the User, or last name
72
320
  */
73
- userName: string;
321
+ familyName?: string;
74
322
  /**
75
- * REQUIRED. Simple display name
323
+ * The given name of the User, or first name
76
324
  */
77
- name: string;
325
+ givenName?: string;
78
326
  /**
79
- * REQUIRED. Primary email address
327
+ * The middle name(s) of the User
80
328
  */
81
- email: string;
329
+ middleName?: string;
82
330
  /**
83
- * URL to user's avatar/profile picture
331
+ * The honorific prefix(es) of the User, or title
84
332
  */
85
- avatar?: string;
333
+ honorificPrefix?: string;
86
334
  /**
87
- * User type (e.g., "employee", "contractor", "customer").
88
- * Shared by SSO/CIAM and enterprise/SCIM user representations.
335
+ * The honorific suffix(es) of the User, or suffix
89
336
  */
90
- userType?: string;
337
+ honorificSuffix?: string;
91
338
  }
92
- import { StandardSchemaV1 } from "@standard-schema/spec";
93
339
  /**
94
- * OIDC Code Flow Callback URL Parameters
95
- * @see https://openid.net/specs/openid-connect-core-1_0.html#CodeFlowAuth
340
+ * SCIM Photo sub-attribute
96
341
  */
97
- interface OidcCallbackParams {
342
+ interface Photo {
98
343
  /**
99
- * REQUIRED. The authorization code returned from the authorization server.
344
+ * The photo url
100
345
  */
101
- code: string;
346
+ value: string;
102
347
  /**
103
- * REQUIRED if the "state" parameter was present in the client authorization request.
104
- * The exact value received from the client.
348
+ * The type of the photo
105
349
  */
106
- state?: string;
350
+ type?: "photo" | "thumbnail";
107
351
  /**
108
- * RECOMMENDED. The session state value. Clients should use this to verify the session state.
352
+ * A Boolean value indicating the 'primary' or preferred attribute value
109
353
  */
110
- session_state?: string;
354
+ primary?: boolean;
355
+ }
356
+ /**
357
+ * SCIM Email sub-attribute
358
+ */
359
+ interface Email {
111
360
  /**
112
- * OAuth 2.0 error code if the authorization request failed.
361
+ * The email address value
113
362
  */
114
- error?: string;
363
+ value: string;
115
364
  /**
116
- * Human-readable ASCII text providing additional information for the error.
365
+ * A human-readable name, primarily used for display purposes
117
366
  */
118
- error_description?: string;
367
+ display?: string;
119
368
  /**
120
- * A URI identifying a human-readable web page with information about the error.
369
+ * A label indicating the attribute's function (e.g., "work" or "home")
121
370
  */
122
- error_uri?: string;
371
+ type?: string;
123
372
  /**
124
- * The "iss" (issuer) parameter identifies the principal that issued the response.
125
- * This is typically used in the implicit flow.
373
+ * A Boolean value indicating the 'primary' or preferred attribute value
126
374
  */
127
- iss?: string;
128
- }
129
- /**
130
- * Creates a StandardSchemaV1 for validating OIDC callback URL parameters.
131
- * @param vendor - The name of the vendor creating this schema
132
- * @returns A StandardSchemaV1 instance for OIDC callback parameters
133
- */
134
- declare function oidcCallbackSchema(vendor: string): StandardSchemaV1<Record<string, unknown>, OidcCallbackParams>;
135
- /**
136
- * Token Response from IdP
137
- */
138
- interface TokenResponse {
139
- access_token: string;
140
- id_token: string;
141
- refresh_token?: string;
142
- token_type: string;
143
- expires_in?: number;
144
- scope?: string;
145
- refresh_expires_in?: number;
146
- session_state?: string;
147
- expires?: string;
375
+ primary?: boolean;
148
376
  }
149
377
  /**
150
- * Creates a StandardSchemaV1 for validating OIDC Token Responses.
151
- * @param vendor - The name of the vendor creating this schema
152
- * @returns A StandardSchemaV1 instance for Token Response validation
153
- */
154
- declare function tokenResponseSchema(vendor: string): StandardSchemaV1<Record<string, unknown>, TokenResponse>;
155
- /**
156
- * ID Token Claims
378
+ * SCIM Phone Number sub-attribute
157
379
  */
158
- interface IdTokenClaims {
159
- iss?: string;
160
- aud?: string | string[];
161
- exp?: number;
162
- iat?: number;
163
- sub?: string;
164
- sid?: string;
165
- name?: string;
166
- email?: string;
167
- preferred_username?: string;
168
- picture?: string;
380
+ interface PhoneNumber {
169
381
  /**
170
- * Enterprise Controlled ID claim (`ecid:<realm>:<opaque>`). When present it correlates this
171
- * account to a single identity across systems. See https://ionite.com/docs/llms-ecid.txt.
382
+ * The phone number value
172
383
  */
173
- ecid?: string;
174
- [key: string]: unknown;
384
+ value: string;
385
+ /**
386
+ * A human-readable name, primarily used for display purposes
387
+ */
388
+ display?: string;
389
+ /**
390
+ * A label indicating the attribute's function (e.g., "work", "home", "mobile")
391
+ */
392
+ type?: string;
393
+ /**
394
+ * A Boolean value indicating the 'primary' or preferred attribute value
395
+ */
396
+ primary?: boolean;
175
397
  }
176
398
  /**
177
- * Creates a StandardSchemaV1 for validating ID Token Claims.
178
- * @param vendor - The name of the vendor creating this schema
179
- * @returns A StandardSchemaV1 instance for ID Token Claims validation
180
- */
181
- declare function idTokenClaimsSchema(vendor: string): StandardSchemaV1<Record<string, unknown>, IdTokenClaims>;
182
- import { StandardSchemaV1 as StandardSchemaV12 } from "@standard-schema/spec";
183
- /**
184
- * JWT Assertion Claims for OAuth2 JWT Bearer Grant (RFC 7523) and OAuth2 Access Tokens
185
- * @see https://datatracker.ietf.org/doc/html/rfc7523
186
- * @see https://datatracker.ietf.org/doc/html/rfc9068
399
+ * SCIM Address sub-attribute
187
400
  */
188
- interface JWTAssertionClaims {
401
+ interface Address {
189
402
  /**
190
- * REQUIRED. Issuer - the workload identity (e.g., SPIFFE ID) or authorization server
403
+ * The full mailing address, formatted for display
191
404
  */
192
- iss: string;
405
+ formatted?: string;
193
406
  /**
194
- * REQUIRED. Subject - the workload identity or service account
407
+ * The full street address component
195
408
  */
196
- sub: string;
409
+ streetAddress?: string;
197
410
  /**
198
- * OPTIONAL. Audience - may be a string or array of strings
199
- * Note: Required for JWT assertions, but may be absent in OAuth2 access tokens
411
+ * The city or locality component
200
412
  */
201
- aud?: string | string[];
413
+ locality?: string;
202
414
  /**
203
- * REQUIRED. Expiration time (Unix timestamp)
415
+ * The state or region component
204
416
  */
205
- exp: number;
417
+ region?: string;
206
418
  /**
207
- * REQUIRED. Issued at time (Unix timestamp)
419
+ * The zip code or postal code component
208
420
  */
209
- iat: number;
421
+ postalCode?: string;
210
422
  /**
211
- * OPTIONAL. JWT ID - unique identifier for this token
212
- * Note: Required for JWT assertions, optional for access tokens
423
+ * The country name component
213
424
  */
214
- jti?: string;
425
+ country?: string;
215
426
  /**
216
- * OPTIONAL. Requested OAuth scopes (space-delimited)
427
+ * A label indicating the attribute's function (e.g., "work" or "home")
217
428
  */
218
- scope?: string;
429
+ type?: string;
219
430
  /**
220
- * Allow additional claims for extensibility
431
+ * A Boolean value indicating the 'primary' or preferred attribute value
221
432
  */
222
- [key: string]: unknown;
433
+ primary?: boolean;
223
434
  }
224
435
  /**
225
- * Creates a StandardSchemaV1 for validating JWT Assertion Claims.
226
- * @param vendor - The name of the vendor creating this schema
227
- * @returns A StandardSchemaV1 instance for JWT Assertion Claims validation
228
- */
229
- declare function jwtAssertionClaimsSchema(vendor: string): StandardSchemaV12<Record<string, unknown>, JWTAssertionClaims>;
230
- /**
231
- * Workload Token Response from OAuth2 token endpoint
232
- * @see https://datatracker.ietf.org/doc/html/rfc6749#section-5.1
436
+ * SCIM Group reference (used within User resources)
233
437
  */
234
- interface WorkloadTokenResponse {
235
- /**
236
- * REQUIRED. The access token issued by the authorization server.
237
- */
238
- access_token: string;
239
- /**
240
- * REQUIRED. The type of the token (typically "Bearer").
241
- */
242
- token_type: string;
438
+ interface Group2 {
243
439
  /**
244
- * RECOMMENDED. The lifetime in seconds of the access token.
440
+ * The identifier of the User's group
245
441
  */
246
- expires_in?: number;
442
+ value: string;
247
443
  /**
248
- * OPTIONAL. The scope of the access token.
444
+ * The URI of the corresponding 'Group' resource
249
445
  */
250
- scope?: string;
446
+ $ref?: string;
251
447
  /**
252
- * OPTIONAL. The refresh token (rarely used for workload identities).
448
+ * A human-readable name, primarily used for display purposes
253
449
  */
254
- refresh_token?: string;
450
+ display?: string;
255
451
  /**
256
- * OPTIONAL. The expiration time as an ISO 8601 string.
452
+ * A label indicating the attribute's function (e.g., "direct" or "indirect")
257
453
  */
258
- expires?: string;
454
+ type?: string;
259
455
  }
260
456
  /**
261
- * Creates a StandardSchemaV1 for validating Workload Token Responses.
262
- * @param vendor - The name of the vendor creating this schema
263
- * @returns A StandardSchemaV1 instance for Workload Token Response validation
264
- */
265
- declare function workloadTokenResponseSchema(vendor: string): StandardSchemaV12<Record<string, unknown>, WorkloadTokenResponse>;
266
- /**
267
- * Token Validation Result
457
+ * SCIM Group Member reference
268
458
  */
269
- interface TokenValidationResult {
459
+ interface GroupMember {
270
460
  /**
271
- * Whether the token is valid
461
+ * The identifier of the member (User or Group)
272
462
  */
273
- valid: boolean;
463
+ value: string;
274
464
  /**
275
- * The decoded and validated claims (if valid)
465
+ * The URI of the corresponding member resource
276
466
  */
277
- claims?: JWTAssertionClaims;
467
+ $ref?: string;
278
468
  /**
279
- * Error message (if invalid)
469
+ * A human-readable name of the member
280
470
  */
281
- error?: string;
471
+ display?: string;
282
472
  /**
283
- * Token expiration time (if valid)
473
+ * The type of the member. `"Workload"` labels a service-account/workload principal (including
474
+ * config-declared trusted provisioning clients) and `"Customer"` a CIAM customer so SCIM consumers
475
+ * can distinguish them from a workforce `"User"` or a nested `"Group"`.
284
476
  */
285
- expiresAt?: Date;
477
+ type?: "User" | "Group" | "Workload" | "Customer";
286
478
  }
287
479
  /**
288
- * Workload Identity extracted from a validated token.
289
- *
290
- * This is the raw, token-derived view of a calling workload. For authorization it is normalized
291
- * into a {@link WorkloadPrincipal} (which adds a stable `id`).
480
+ * SCIM 2.0 Group Resource
481
+ * @see https://datatracker.ietf.org/doc/html/rfc7643#section-4.2
292
482
  */
293
- type WorkloadIdentity = {
294
- /** Workload identifier (for JWT Bearer Grant tokens). */
295
- workloadId?: string;
296
- /** Client identifier (for OAuth2 Client Credentials tokens). */
297
- clientId?: string;
298
- /** Granted OAuth scopes (space-delimited). */
299
- scope?: string;
483
+ interface GroupResource {
300
484
  /**
301
- * Whether the trusted IdP that validated this token opts into honoring its OAuth `scope` claim as
302
- * entitlements (per-IdP intent, resolved at validation time). Consumed by the request-level `has*`
303
- * helpers; `undefined` falls back to the global `RemoteConfig.authz.scopesAsEntitlements`.
485
+ * REQUIRED. The schemas attribute
304
486
  */
305
- scopesAsEntitlements?: boolean;
487
+ schemas?: string[];
306
488
  /**
307
- * Enterprise Controlled ID for this workload (`ecid:<realm>:<opaque>`), when carried on the token
308
- * `ecid` claim or enriched from a wired `WorkloadIdentityStore`. A workload is its own governance
309
- * root. See https://ionite.com/docs/llms-ecid.txt.
489
+ * Unique identifier for the Group, assigned by the service provider
310
490
  */
311
- ecid?: string;
312
- /** Full JWT claims from the token. */
313
- claims: JWTAssertionClaims;
314
- };
315
- /**
316
- * A workload resolved as an authorization subject. It is a {@link WorkloadIdentity} with a stable
317
- * `id` (chosen as `clientId ?? workloadId ?? claims.sub`) used as the AccessIndex subject for
318
- * `subjectType: 'workload'` checks. When a `WorkloadIdentityStore` is wired, the identity may also
319
- * carry stored enrichment fields (merged in by `getWorkloadIdentity`).
320
- */
321
- type WorkloadPrincipal = WorkloadIdentity & {
322
- /** Stable subject id used for entitlement checks (`clientId ?? workloadId ?? claims.sub`). */
323
- id: string;
324
- };
325
- /**
326
- * Workforce user type for SSO/OIDC and IAM-backed applications.
327
- * Carries the SSO/OIDC context used by server helpers and user stores.
328
- */
329
- interface WorkforceUser extends BaseUserFields {
491
+ id?: string;
330
492
  /**
331
- * SSO/OIDC authentication data
493
+ * External identifier from the provisioning client
332
494
  */
333
- sso: {
334
- /**
335
- * ID Token claims from the identity provider
336
- */
337
- profile: IdTokenClaims;
338
- /**
339
- * Tenant/organization information
340
- */
341
- tenant: {
342
- id: string;
343
- name: string;
344
- };
345
- /**
346
- * OAuth scopes granted
347
- */
348
- scope?: string;
349
- /**
350
- * Token type (typically "Bearer")
351
- */
352
- tokenType: string;
353
- /**
354
- * Session state from the identity provider
355
- */
356
- sessionState?: string;
357
- /**
358
- * Token expiration time
359
- */
360
- expires: Date;
495
+ externalId?: string;
496
+ /**
497
+ * Resource metadata
498
+ */
499
+ meta?: {
500
+ resourceType?: string;
501
+ created?: string;
502
+ lastModified?: string;
503
+ location?: string;
504
+ version?: string;
361
505
  };
506
+ /**
507
+ * REQUIRED. A human-readable name for the Group
508
+ */
509
+ displayName: string;
510
+ /**
511
+ * A list of members of the Group
512
+ */
513
+ members?: GroupMember[];
362
514
  }
363
- /**
364
- * Customer session type for CIAM-backed applications.
365
- * The persisted customer record is `BaseCustomer` (see customer-store.types).
366
- */
367
- interface Customer extends BaseUserFields {
368
- ciam: {
369
- /**
370
- * ID token-like claims for CIAM sessions.
371
- */
372
- profile: IdTokenClaims;
373
- /**
374
- * OAuth scopes granted for this customer session.
375
- */
376
- scope?: string;
377
- /**
378
- * Token type (typically "Bearer").
379
- */
380
- tokenType: string;
381
- /**
382
- * Session expiration time.
383
- */
384
- expires: Date;
515
+ /** SCIM Workload resource — machine/service principal, not a User. */
516
+ interface ScimWorkload {
517
+ [key: string]: unknown;
518
+ schemas?: string[];
519
+ id?: string;
520
+ externalId?: string;
521
+ /** Login identifier; typically the OAuth `clientId`. */
522
+ userName?: string;
523
+ displayName?: string;
524
+ description?: string;
525
+ active?: boolean;
526
+ providerId?: string;
527
+ requestUrl?: string;
528
+ /** Enterprise Controlled ID for workload correlation across datasources. */
529
+ ecid?: string;
530
+ meta?: {
531
+ resourceType?: string;
532
+ created?: string;
533
+ lastModified?: string;
534
+ location?: string;
535
+ version?: string;
385
536
  };
386
537
  }
387
- /**
388
- * Union of currently authenticated user domains.
389
- */
390
- type AuthenticatedUser = WorkforceUser | Customer;
391
- /**
392
- * Union of every principal kind that can be resolved as an authorization subject: human-facing
393
- * users (workforce/customer) plus non-human {@link WorkloadPrincipal}s. Use this where a resolved
394
- * subject may be any authenticated principal; keep {@link AuthenticatedUser} for browser/tenant-HRD
395
- * flows that are inherently human.
396
- */
397
- type AuthenticatedPrincipal = AuthenticatedUser | WorkloadPrincipal;
398
- import { StandardSchemaV1 as StandardSchemaV19 } from "@standard-schema/spec";
399
- import { StandardSchemaV1 as StandardSchemaV18 } from "@standard-schema/spec";
400
- /**
401
- * Third-party CIAM provider presets and claim mapping.
402
- *
403
- * Defines the built-in provider adapters used by the CIAM module for customer
404
- * login. Each preset supplies default OIDC/OAuth2 endpoints, scope, branding,
405
- * and a claim mapper that normalizes provider claims into a candidate customer.
406
- * The application's `CustomerStore` remains the system of record: the SDK only
407
- * extracts standard claims and hands a candidate to `lookup`/`upsert`.
408
- */
409
- /** Built-in provider types. `oidc` is a generic OIDC provider; `magic-link` is the passwordless flow. */
410
- type CIAMProviderType = "oidc" | "google" | "github" | "microsoft" | "apple" | "magic-link";
411
- /** Branding colors for rendering a provider button in light and dark themes. */
412
- type CIAMProviderColors = {
413
- /** Background/brand color for light theme (hex or CSS color). */
414
- light: string;
415
- /** Background/brand color for dark theme (hex or CSS color). */
416
- dark: string;
417
- /** Optional secondary/accent color. */
418
- secondary?: string;
419
- };
420
- /** Operator-supplied branding so the UI can render a provider list without hardcoding. */
421
- type CIAMProviderBranding = {
422
- /** Human-readable name shown on the login button (e.g. "Google"). */
423
- displayName: string;
424
- /** External icon URL (typically an SVG/PNG hosted on a CDN). */
425
- iconUrl?: string;
426
- /** Light/dark brand colors. */
427
- colors?: CIAMProviderColors;
428
- /** Optional provider info/marketing URL. */
429
- url?: string;
430
- };
431
- /**
432
- * A single CIAM provider declaration. OIDC/OAuth2 endpoint and credential
433
- * fields come from the ConfigSource (never application code).
434
- */
435
- type CIAMProviderConfig = {
436
- /** Provider adapter type. Selects defaults and claim mapping. */
437
- type: CIAMProviderType;
438
- /** Whether this provider is enabled. Defaults to true when omitted. */
439
- enabled?: boolean;
440
- /** Recommended display order (ascending). Ties broken by declaration order. */
441
- order?: number;
442
- /** UI branding metadata. */
443
- branding?: CIAMProviderBranding;
444
- /** OIDC issuer/authority (used for discovery when explicit endpoints are omitted). */
445
- authority?: string;
446
- /** Authorization endpoint (overrides preset). */
447
- authorizationUrl?: string;
448
- /** Token endpoint (overrides preset). */
449
- tokenUrl?: string;
450
- /** JWKS endpoint for ID token verification (overrides preset). */
451
- jwksUri?: string;
452
- /** OAuth2 UserInfo endpoint for providers without an ID token (e.g. GitHub). */
453
- userInfoUrl?: string;
454
- /** OAuth2 client id (ConfigSource-only). */
455
- clientId?: string;
456
- /** OAuth2 client secret (ConfigSource-only). */
457
- clientSecret?: string;
458
- /** Requested scope (overrides preset). */
459
- scope?: string;
460
- /** Apple: team id for client-secret generation. */
461
- teamId?: string;
462
- /** Apple: key id for client-secret generation. */
463
- keyId?: string;
464
- /** Apple: PKCS#8 PEM private key for client-secret generation. */
465
- privateKey?: string;
466
- };
467
- /** Sanitized provider entry returned by the discovery endpoint for the UI. */
468
- type CIAMProviderDescriptor = {
469
- /** Provider key (matches the RemoteConfig map key); used as `?provider=`. */
470
- name: string;
471
- type: CIAMProviderType;
472
- displayName: string;
473
- /** SDK-derived login URL to navigate to (begins the flow). */
474
- loginUrl: string;
475
- iconUrl?: string;
476
- colors?: CIAMProviderColors;
477
- url?: string;
478
- };
479
- /**
480
- * Minimal logger interface compatible with common structured logging patterns.
481
- */
482
- interface Logger {
483
- trace(message?: unknown, ...optionalParams: unknown[]): void;
484
- debug(message?: unknown, ...optionalParams: unknown[]): void;
485
- info(message?: unknown, ...optionalParams: unknown[]): void;
486
- warn(message?: unknown, ...optionalParams: unknown[]): void;
487
- error(message?: unknown, ...optionalParams: unknown[]): void;
538
+ /** SCIM Customer resource — CIAM consumer principal, not a workforce User. */
539
+ interface ScimCustomer {
540
+ [key: string]: unknown;
541
+ schemas?: string[];
542
+ id?: string;
543
+ externalId?: string;
544
+ userName?: string;
545
+ displayName?: string;
546
+ active?: boolean;
547
+ emails?: Email[];
548
+ providerId?: string;
549
+ requestUrl?: string;
550
+ meta?: {
551
+ resourceType?: string;
552
+ created?: string;
553
+ lastModified?: string;
554
+ location?: string;
555
+ version?: string;
556
+ };
488
557
  }
489
558
  /**
490
- * No-op implementation — does nothing for any log level
491
- */
492
- declare const silentLogger: Logger;
493
- /**
494
- * Default logger used until an ionite instance is configured with
495
- * an OpenTelemetry-backed logger or an application-provided logger.
496
- */
497
- declare const defaultLogger: Logger;
498
- /**
499
- * Logger that logs messages debug, info, warn, and error to the console.
500
- */
501
- declare const debugLogger: Logger;
502
- /**
503
- * Logger that logs messages info, warn, and error to the console.
504
- */
505
- declare const infoLogger: Logger;
506
- /**
507
- * Logger that logs messages warn and error to the console.
508
- */
509
- declare const warnLogger: Logger;
510
- /** Synchronous, in-memory read surface for one code catalog entity kind. */
511
- type CodeCatalogNamespace<TEntity> = {
512
- get(id: string): TEntity | undefined;
513
- list(): readonly TEntity[];
514
- };
515
- /**
516
- * Normalized, frozen code-declared catalog produced by {@link defineCatalog}. All entities are
517
- * deep-frozen and id-indexed.
518
- */
519
- type CodeCatalog = {
520
- groups: CodeCatalogNamespace<Group>;
521
- roles: CodeCatalogNamespace<Role>;
522
- permissions: CodeCatalogNamespace<Permission>;
523
- };
524
- /** Declarative input for {@link defineCatalog} (plain arrays authored in app code). */
525
- type CodeCatalogInput = {
526
- groups?: readonly Group[];
527
- roles?: readonly Role[];
528
- permissions?: readonly Permission[];
529
- };
530
- /** True when the value is already a normalized {@link CodeCatalog} (vs a declarative input). */
531
- declare function isCodeCatalog(value: CodeCatalog | CodeCatalogInput): value is CodeCatalog;
532
- /** Normalize an `authz.catalog` config value: pass through a {@link CodeCatalog}, build one from input. */
533
- declare function toCodeCatalog(value: CodeCatalog | CodeCatalogInput): CodeCatalog;
534
- type CatalogEntityKind = "group" | "role" | "permission";
535
- /**
536
- * Build a validated, frozen {@link CodeCatalog} from declarative arrays. Call it once at module
537
- * scope in a pure authz module (no store imports) and wire the result via
538
- * `FrameworkConfig.authz.catalog`.
539
- *
540
- * Validation (throws {@link Error} at module evaluation on the first violation):
541
- * - ids are globally unique across groups, roles, AND permissions (one SCIM Groups id space);
542
- * - every group -> group/role/permission reference (string id or embedded object) resolves to an
543
- * entity declared in the catalog arrays, and every role -> permission reference likewise
544
- * (`resources` refs are NOT validated here — resources live in the app's `ResourceProvider`);
545
- * - nested group composition is acyclic;
546
- * - every entitlement declares a required non-empty `assignableSubjectTypes` within the platform
547
- * ceiling, and `recommendedSubjectTypes` is a subset of it.
548
- *
549
- * Side effects: every entity (and its arrays/metadata) is frozen.
550
- */
551
- declare function defineCatalog(input: CodeCatalogInput): CodeCatalog;
552
- /** Resolve one code entity and its kind from the shared id space. */
553
- declare function getCodeCatalogEntity(code: CodeCatalog | undefined, id: string): {
554
- entity: Group | Role | Permission;
555
- kind: CatalogEntityKind;
556
- } | undefined;
557
- /** Return the entity namespace for one catalog kind. */
558
- declare function catalogEntityStore<TEntity extends Group | Role | Permission>(catalog: AccessCatalogStore, kind: CatalogEntityKind): EntityStore<TEntity>;
559
- /**
560
- * Merge a materialized row with its code template. The row owns presentation, receipts, lifecycle,
561
- * and other runtime metadata; code owns ids, subject scoping, and graph/resource structure.
562
- */
563
- declare function mergeCodeCatalogEntity<TEntity extends Group | Role | Permission>(kind: CatalogEntityKind, code: TEntity, stored: TEntity): TEntity;
564
- /**
565
- * Insert a code template into the runtime catalog only when no row exists. Existing rows are never
566
- * rewritten, preserving IAM-renamed presentation and receipts. `insertIfAbsent` closes the race
567
- * between the initial read and insert.
568
- */
569
- declare function materializeCodeCatalogEntity<TEntity extends Group | Role | Permission>(kind: CatalogEntityKind, code: TEntity, store: EntityStore<TEntity>): Promise<TEntity>;
570
- /**
571
- * Mark materialized code rows as deprecated when their template no longer exists. Callers choose
572
- * when to run this lifecycle sweep; it never runs during config apply.
573
- */
574
- declare function deprecateRetiredCodeCatalogRows(code: CodeCatalog | undefined, store: AccessCatalogStore, onlyId?: string): Promise<void>;
575
- /**
576
- * {@link AccessCatalogStore}-shaped read union over code templates and the runtime store. Store rows
577
- * win presentation for code ids, code owns their structure, and unmaterialized code entities remain
578
- * visible. Returns undefined when neither source is wired.
579
- */
580
- declare function unionCatalogRead(code: CodeCatalog | undefined, store: AccessCatalogStore | undefined): AccessCatalogStore | undefined;
581
- import { StandardSchemaV1 as StandardSchemaV15 } from "@standard-schema/spec";
582
- /**
583
- * Resolve an access subject/target/resource reference (a string id or an object carrying one) to its
584
- * canonical, trimmed string id. This is the single id-resolution rule shared across the authz stack
585
- * (AUDIT_HISTORY.md §8.4): `accessRootId`, the access stores, the access index, and SCIM diff keys all key off
586
- * the same normalization so distinct roots never collapse and identical references never diverge.
587
- * Returns `''` when no id can be resolved.
588
- */
589
- declare function accessRefId(value: unknown): string;
590
- /**
591
- * Deterministic id for a granted root. Includes the resource scope so that two grants of the same
592
- * subject/target with different scopes are tracked as distinct roots. Application-wide scope (the
593
- * default, or `applyToApplication`) collapses to the `app` scope key.
559
+ * SCIM Role
594
560
  */
595
- declare function accessRootId(change: AccessChange): string;
596
- import { StandardSchemaV1 as StandardSchemaV13 } from "@standard-schema/spec";
561
+ interface Role2 {
562
+ /**
563
+ * The value of the role
564
+ */
565
+ value: string;
566
+ /**
567
+ * A human-readable name, primarily used for display purposes
568
+ */
569
+ display?: string;
570
+ /**
571
+ * A label indicating the attribute's function
572
+ */
573
+ type?: string;
574
+ /**
575
+ * A Boolean value indicating the 'primary' or preferred attribute value
576
+ */
577
+ primary?: boolean;
578
+ }
597
579
  /**
598
- * SCIM 2.0 User Resource
599
- * @see https://datatracker.ietf.org/doc/html/rfc7643#section-4.1
580
+ * SCIM X509 Certificate
600
581
  */
582
+ interface X509Certificate {
583
+ /**
584
+ * The value of the X.509 certificate
585
+ */
586
+ value: string;
587
+ /**
588
+ * A human-readable name, primarily used for display purposes
589
+ */
590
+ display?: string;
591
+ /**
592
+ * A label indicating the attribute's function
593
+ */
594
+ type?: string;
595
+ /**
596
+ * A Boolean value indicating the 'primary' or preferred attribute value
597
+ */
598
+ primary?: boolean;
599
+ }
601
600
  /**
602
- * SCIM Name sub-attribute
601
+ * SCIM Enterprise User Extension
602
+ * @see https://datatracker.ietf.org/doc/html/rfc7643#section-4.3
603
603
  */
604
- interface Name {
604
+ interface EnterpriseExtension {
605
605
  /**
606
- * The full name, including all middle names, titles, and suffixes as appropriate
606
+ * Numeric or alphanumeric identifier assigned to a person
607
607
  */
608
- formatted?: string;
608
+ employeeNumber?: string;
609
609
  /**
610
- * The family name of the User, or last name
610
+ * Identifies the name of a cost center
611
611
  */
612
- familyName?: string;
612
+ costCenter?: string;
613
613
  /**
614
- * The given name of the User, or first name
614
+ * Identifies the name of an organization
615
615
  */
616
- givenName?: string;
616
+ organization?: string;
617
617
  /**
618
- * The middle name(s) of the User
618
+ * Identifies the name of a division
619
619
  */
620
- middleName?: string;
620
+ division?: string;
621
621
  /**
622
- * The honorific prefix(es) of the User, or title
622
+ * Identifies the name of a department
623
623
  */
624
- honorificPrefix?: string;
624
+ department?: string;
625
625
  /**
626
- * The honorific suffix(es) of the User, or suffix
626
+ * The user's manager
627
627
  */
628
- honorificSuffix?: string;
628
+ manager?: {
629
+ /**
630
+ * The "id" of the SCIM resource representing the User's manager
631
+ */
632
+ value?: string;
633
+ /**
634
+ * The URI of the SCIM resource representing the User's manager
635
+ */
636
+ $ref?: string;
637
+ /**
638
+ * The displayName of the User's manager
639
+ */
640
+ displayName?: string;
641
+ };
629
642
  }
630
643
  /**
631
- * SCIM Photo sub-attribute
644
+ * SCIM URN for the ionite User extension, carrying the ECID identity correlator and
645
+ * the account purpose (`accountClass`). Hosted schema:
646
+ * https://ionite.com/schemas/ion-scim-user-extension.json
632
647
  */
633
- interface Photo {
634
- /**
635
- * The photo url
636
- */
637
- value: string;
648
+ declare const ION_SCIM_USER_EXTENSION_URN = "urn:ionite:scim:schemas:extension:ion:2.0:User";
649
+ /** SCIM core schema for a Workload principal (distinct ResourceType from User). */
650
+ declare const ION_SCIM_WORKLOAD_SCHEMA = "urn:ionite:scim:schemas:core:2.0:Workload";
651
+ /** SCIM core schema for a Customer principal (distinct ResourceType from User). */
652
+ declare const ION_SCIM_CUSTOMER_SCHEMA = "urn:ionite:scim:schemas:core:2.0:Customer";
653
+ /**
654
+ * ionite SCIM User extension. See https://ionite.com/docs/llms-ecid.txt.
655
+ */
656
+ interface IoniteUserExtension {
638
657
  /**
639
- * The type of the photo
658
+ * Enterprise Controlled ID: `ecid:<realm>:<opaque>` (realm = the minting authority's id).
659
+ * Correlates multiple accounts to one identity across systems.
640
660
  */
641
- type?: "photo" | "thumbnail";
661
+ ecid?: string;
642
662
  /**
643
- * A Boolean value indicating the 'primary' or preferred attribute value
663
+ * Account purpose (distinct from `userType` persona). Open value set:
664
+ * `daily`, `privileged`, `break_glass`, `service`.
644
665
  */
645
- primary?: boolean;
666
+ accountClass?: string;
646
667
  }
647
668
  /**
648
- * SCIM Email sub-attribute
669
+ * SCIM User Resource
649
670
  */
650
- interface Email {
671
+ interface User {
672
+ [key: string]: unknown;
651
673
  /**
652
- * The email address value
674
+ * REQUIRED. Unique identifier for the User, typically from the provider
653
675
  */
654
- value: string;
676
+ id?: string;
677
+ /**
678
+ * REQUIRED. A unique identifier for a SCIM resource as defined by the service provider
679
+ */
680
+ externalId?: string;
681
+ /**
682
+ * Resource metadata
683
+ */
684
+ meta?: {
685
+ resourceType?: string;
686
+ created?: string;
687
+ lastModified?: string;
688
+ location?: string;
689
+ version?: string;
690
+ };
655
691
  /**
656
- * A human-readable name, primarily used for display purposes
692
+ * REQUIRED. Unique identifier for the User, typically used for login
657
693
  */
658
- display?: string;
694
+ userName: string;
659
695
  /**
660
- * A label indicating the attribute's function (e.g., "work" or "home")
696
+ * The components of the user's name
661
697
  */
662
- type?: string;
698
+ name?: Name;
663
699
  /**
664
- * A Boolean value indicating the 'primary' or preferred attribute value
700
+ * The name of the User, suitable for display to end-users
665
701
  */
666
- primary?: boolean;
667
- }
668
- /**
669
- * SCIM Phone Number sub-attribute
670
- */
671
- interface PhoneNumber {
702
+ displayName?: string;
672
703
  /**
673
- * The phone number value
704
+ * The casual way to address the user
674
705
  */
675
- value: string;
706
+ nickName?: string;
676
707
  /**
677
- * A human-readable name, primarily used for display purposes
708
+ * A fully qualified URL pointing to a page representing the User's online profile
678
709
  */
679
- display?: string;
710
+ profileUrl?: string;
680
711
  /**
681
- * A label indicating the attribute's function (e.g., "work", "home", "mobile")
712
+ * The user's title, such as "Vice President"
682
713
  */
683
- type?: string;
714
+ title?: string;
684
715
  /**
685
- * A Boolean value indicating the 'primary' or preferred attribute value
716
+ * Used to identify the relationship between the organization and the user
686
717
  */
687
- primary?: boolean;
688
- }
689
- /**
690
- * SCIM Address sub-attribute
691
- */
692
- interface Address {
718
+ userType?: string;
693
719
  /**
694
- * The full mailing address, formatted for display
720
+ * Indicates the User's preferred written or spoken language
695
721
  */
696
- formatted?: string;
722
+ preferredLanguage?: string;
697
723
  /**
698
- * The full street address component
724
+ * Used to indicate the User's default location for purposes of localizing items such as currency
699
725
  */
700
- streetAddress?: string;
726
+ locale?: string;
701
727
  /**
702
- * The city or locality component
728
+ * The User's time zone in the "Olson" time zone database format
703
729
  */
704
- locality?: string;
730
+ timezone?: string;
705
731
  /**
706
- * The state or region component
732
+ * A Boolean value indicating the User's administrative status
707
733
  */
708
- region?: string;
734
+ active?: boolean;
709
735
  /**
710
- * The zip code or postal code component
736
+ * Email addresses for the user
711
737
  */
712
- postalCode?: string;
738
+ emails?: Email[];
713
739
  /**
714
- * The country name component
740
+ * Phone numbers for the User
715
741
  */
716
- country?: string;
742
+ phoneNumbers?: PhoneNumber[];
717
743
  /**
718
- * A label indicating the attribute's function (e.g., "work" or "home")
744
+ * Instant messaging addresses for the User
719
745
  */
720
- type?: string;
746
+ ims?: Array<{
747
+ value: string;
748
+ display?: string;
749
+ type?: string;
750
+ primary?: boolean;
751
+ }>;
721
752
  /**
722
- * A Boolean value indicating the 'primary' or preferred attribute value
753
+ * URLs of photos of the User
723
754
  */
724
- primary?: boolean;
725
- }
726
- /**
727
- * SCIM Group reference (used within User resources)
728
- */
729
- interface Group2 {
755
+ photos?: Array<{
756
+ value: string;
757
+ display?: string;
758
+ type?: string;
759
+ primary?: boolean;
760
+ }>;
730
761
  /**
731
- * The identifier of the User's group
762
+ * Physical mailing addresses for this User
732
763
  */
733
- value: string;
764
+ addresses?: Address[];
734
765
  /**
735
- * The URI of the corresponding 'Group' resource
766
+ * A list of groups to which the user belongs
736
767
  */
737
- $ref?: string;
768
+ groups?: Group2[];
738
769
  /**
739
- * A human-readable name, primarily used for display purposes
770
+ * A list of entitlements for the User
740
771
  */
741
- display?: string;
772
+ entitlements?: Array<{
773
+ value: string;
774
+ display?: string;
775
+ type?: string;
776
+ primary?: boolean;
777
+ }>;
742
778
  /**
743
- * A label indicating the attribute's function (e.g., "direct" or "indirect")
779
+ * A list of roles for the User
744
780
  */
745
- type?: string;
746
- }
747
- /**
748
- * SCIM Group Member reference
749
- */
750
- interface GroupMember {
781
+ roles?: Role2[];
751
782
  /**
752
- * The identifier of the member (User or Group)
783
+ * A list of certificates issued to the User
753
784
  */
754
- value: string;
785
+ x509Certificates?: X509Certificate[];
755
786
  /**
756
- * The URI of the corresponding member resource
787
+ * Enterprise User Extension
757
788
  */
758
- $ref?: string;
789
+ "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User"?: EnterpriseExtension;
759
790
  /**
760
- * A human-readable name of the member
791
+ * ionite User Extension (ECID + accountClass).
761
792
  */
762
- display?: string;
793
+ "urn:ionite:scim:schemas:extension:ion:2.0:User"?: IoniteUserExtension;
763
794
  /**
764
- * The type of the member. `"Workload"` labels a service-account/workload principal (including
765
- * config-declared trusted provisioning clients) and `"Customer"` a CIAM customer so SCIM consumers
766
- * can distinguish them from a workforce `"User"` or a nested `"Group"`.
795
+ * REQUIRED. The schemas attribute is an array of Strings which allows introspection of the supported schema version
767
796
  */
768
- type?: "User" | "Group" | "Workload" | "Customer";
797
+ schemas?: string[];
769
798
  }
770
799
  /**
771
- * SCIM 2.0 Group Resource
772
- * @see https://datatracker.ietf.org/doc/html/rfc7643#section-4.2
800
+ * Creates a StandardSchemaV1 for validating SCIM User resources.
801
+ * @param vendor - The name of the vendor creating this schema
802
+ * @returns A StandardSchemaV1 instance for SCIM User resources
773
803
  */
774
- interface GroupResource {
804
+ declare function userSchema(vendor: string): StandardSchemaV1<Record<string, unknown>, User>;
805
+ /**
806
+ * Creates a StandardSchemaV1 for validating SCIM Group resources.
807
+ * @param vendor - The name of the vendor creating this schema
808
+ * @returns A StandardSchemaV1 instance for SCIM Group resources
809
+ */
810
+ declare function groupResourceSchema(vendor: string): StandardSchemaV1<Record<string, unknown>, GroupResource>;
811
+ /** Validates a SCIM Workload resource. */
812
+ declare const workloadResourceSchema: StandardSchemaV1<unknown, ScimWorkload>;
813
+ /** Validates a SCIM Customer resource. */
814
+ declare const customerResourceSchema: StandardSchemaV1<unknown, ScimCustomer>;
815
+ import { StandardSchemaV1 as StandardSchemaV12 } from "@standard-schema/spec";
816
+ /**
817
+ * OIDC Code Flow Callback URL Parameters
818
+ * @see https://openid.net/specs/openid-connect-core-1_0.html#CodeFlowAuth
819
+ */
820
+ interface OidcCallbackParams {
775
821
  /**
776
- * REQUIRED. The schemas attribute
822
+ * REQUIRED. The authorization code returned from the authorization server.
777
823
  */
778
- schemas?: string[];
824
+ code: string;
779
825
  /**
780
- * Unique identifier for the Group, assigned by the service provider
826
+ * REQUIRED if the "state" parameter was present in the client authorization request.
827
+ * The exact value received from the client.
781
828
  */
782
- id?: string;
829
+ state?: string;
783
830
  /**
784
- * External identifier from the provisioning client
831
+ * RECOMMENDED. The session state value. Clients should use this to verify the session state.
785
832
  */
786
- externalId?: string;
833
+ session_state?: string;
787
834
  /**
788
- * Resource metadata
835
+ * OAuth 2.0 error code if the authorization request failed.
789
836
  */
790
- meta?: {
791
- resourceType?: string;
792
- created?: string;
793
- lastModified?: string;
794
- location?: string;
795
- version?: string;
796
- };
837
+ error?: string;
797
838
  /**
798
- * REQUIRED. A human-readable name for the Group
839
+ * Human-readable ASCII text providing additional information for the error.
799
840
  */
800
- displayName: string;
841
+ error_description?: string;
801
842
  /**
802
- * A list of members of the Group
843
+ * A URI identifying a human-readable web page with information about the error.
803
844
  */
804
- members?: GroupMember[];
845
+ error_uri?: string;
846
+ /**
847
+ * The "iss" (issuer) parameter identifies the principal that issued the response.
848
+ * This is typically used in the implicit flow.
849
+ */
850
+ iss?: string;
805
851
  }
806
- /** SCIM Workload resource — machine/service principal, not a User. */
807
- interface ScimWorkload {
808
- schemas?: string[];
809
- id?: string;
810
- externalId?: string;
811
- /** Login identifier; typically the OAuth `clientId`. */
812
- userName?: string;
813
- displayName?: string;
814
- description?: string;
815
- active?: boolean;
816
- providerId?: string;
817
- requestUrl?: string;
818
- meta?: {
819
- resourceType?: string;
820
- created?: string;
821
- lastModified?: string;
822
- location?: string;
823
- version?: string;
824
- };
852
+ /**
853
+ * Creates a StandardSchemaV1 for validating OIDC callback URL parameters.
854
+ * @param vendor - The name of the vendor creating this schema
855
+ * @returns A StandardSchemaV1 instance for OIDC callback parameters
856
+ */
857
+ declare function oidcCallbackSchema(vendor: string): StandardSchemaV12<Record<string, unknown>, OidcCallbackParams>;
858
+ /**
859
+ * Token Response from IdP
860
+ */
861
+ interface TokenResponse {
862
+ access_token: string;
863
+ id_token: string;
864
+ refresh_token?: string;
865
+ token_type: string;
866
+ expires_in?: number;
867
+ scope?: string;
868
+ refresh_expires_in?: number;
869
+ session_state?: string;
870
+ expires?: string;
825
871
  }
826
- /** SCIM Customer resource — CIAM consumer principal, not a workforce User. */
827
- interface ScimCustomer {
828
- schemas?: string[];
829
- id?: string;
830
- externalId?: string;
831
- userName?: string;
832
- displayName?: string;
833
- active?: boolean;
834
- emails?: Email[];
835
- providerId?: string;
836
- requestUrl?: string;
837
- meta?: {
838
- resourceType?: string;
839
- created?: string;
840
- lastModified?: string;
841
- location?: string;
842
- version?: string;
843
- };
872
+ /**
873
+ * Creates a StandardSchemaV1 for validating OIDC Token Responses.
874
+ * @param vendor - The name of the vendor creating this schema
875
+ * @returns A StandardSchemaV1 instance for Token Response validation
876
+ */
877
+ declare function tokenResponseSchema(vendor: string): StandardSchemaV12<Record<string, unknown>, TokenResponse>;
878
+ /**
879
+ * ID Token Claims
880
+ */
881
+ interface IdTokenClaims {
882
+ iss?: string;
883
+ aud?: string | string[];
884
+ exp?: number;
885
+ iat?: number;
886
+ sub?: string;
887
+ sid?: string;
888
+ name?: string;
889
+ email?: string;
890
+ preferred_username?: string;
891
+ picture?: string;
892
+ /**
893
+ * Enterprise Controlled ID claim (`ecid:<realm>:<opaque>`). When present it correlates this
894
+ * account to a single identity across systems. See https://ionite.com/docs/llms-ecid.txt.
895
+ */
896
+ ecid?: string;
897
+ [key: string]: unknown;
844
898
  }
845
899
  /**
846
- * SCIM Role
900
+ * Creates a StandardSchemaV1 for validating ID Token Claims.
901
+ * @param vendor - The name of the vendor creating this schema
902
+ * @returns A StandardSchemaV1 instance for ID Token Claims validation
847
903
  */
848
- interface Role2 {
904
+ declare function idTokenClaimsSchema(vendor: string): StandardSchemaV12<Record<string, unknown>, IdTokenClaims>;
905
+ import { StandardSchemaV1 as StandardSchemaV13 } from "@standard-schema/spec";
906
+ /**
907
+ * JWT Assertion Claims for OAuth2 JWT Bearer Grant (RFC 7523) and OAuth2 Access Tokens
908
+ * @see https://datatracker.ietf.org/doc/html/rfc7523
909
+ * @see https://datatracker.ietf.org/doc/html/rfc9068
910
+ */
911
+ interface JWTAssertionClaims {
849
912
  /**
850
- * The value of the role
913
+ * REQUIRED. Issuer - the workload identity (e.g., SPIFFE ID) or authorization server
851
914
  */
852
- value: string;
915
+ iss: string;
853
916
  /**
854
- * A human-readable name, primarily used for display purposes
917
+ * REQUIRED. Subject - the workload identity or service account
855
918
  */
856
- display?: string;
919
+ sub: string;
857
920
  /**
858
- * A label indicating the attribute's function
921
+ * OPTIONAL. Audience - may be a string or array of strings
922
+ * Note: Required for JWT assertions, but may be absent in OAuth2 access tokens
859
923
  */
860
- type?: string;
924
+ aud?: string | string[];
861
925
  /**
862
- * A Boolean value indicating the 'primary' or preferred attribute value
926
+ * REQUIRED. Expiration time (Unix timestamp)
863
927
  */
864
- primary?: boolean;
928
+ exp: number;
929
+ /**
930
+ * REQUIRED. Issued at time (Unix timestamp)
931
+ */
932
+ iat: number;
933
+ /**
934
+ * OPTIONAL. JWT ID - unique identifier for this token
935
+ * Note: Required for JWT assertions, optional for access tokens
936
+ */
937
+ jti?: string;
938
+ /**
939
+ * OPTIONAL. Requested OAuth scopes (space-delimited)
940
+ */
941
+ scope?: string;
942
+ /**
943
+ * Allow additional claims for extensibility
944
+ */
945
+ [key: string]: unknown;
865
946
  }
866
947
  /**
867
- * SCIM X509 Certificate
948
+ * Creates a StandardSchemaV1 for validating JWT Assertion Claims.
949
+ * @param vendor - The name of the vendor creating this schema
950
+ * @returns A StandardSchemaV1 instance for JWT Assertion Claims validation
868
951
  */
869
- interface X509Certificate {
952
+ declare function jwtAssertionClaimsSchema(vendor: string): StandardSchemaV13<Record<string, unknown>, JWTAssertionClaims>;
953
+ /**
954
+ * Workload Token Response from OAuth2 token endpoint
955
+ * @see https://datatracker.ietf.org/doc/html/rfc6749#section-5.1
956
+ */
957
+ interface WorkloadTokenResponse {
870
958
  /**
871
- * The value of the X.509 certificate
959
+ * REQUIRED. The access token issued by the authorization server.
872
960
  */
873
- value: string;
961
+ access_token: string;
874
962
  /**
875
- * A human-readable name, primarily used for display purposes
963
+ * REQUIRED. The type of the token (typically "Bearer").
876
964
  */
877
- display?: string;
965
+ token_type: string;
878
966
  /**
879
- * A label indicating the attribute's function
967
+ * RECOMMENDED. The lifetime in seconds of the access token.
880
968
  */
881
- type?: string;
969
+ expires_in?: number;
882
970
  /**
883
- * A Boolean value indicating the 'primary' or preferred attribute value
971
+ * OPTIONAL. The scope of the access token.
884
972
  */
885
- primary?: boolean;
973
+ scope?: string;
974
+ /**
975
+ * OPTIONAL. The refresh token (rarely used for workload identities).
976
+ */
977
+ refresh_token?: string;
978
+ /**
979
+ * OPTIONAL. The expiration time as an ISO 8601 string.
980
+ */
981
+ expires?: string;
886
982
  }
887
983
  /**
888
- * SCIM Enterprise User Extension
889
- * @see https://datatracker.ietf.org/doc/html/rfc7643#section-4.3
984
+ * Creates a StandardSchemaV1 for validating Workload Token Responses.
985
+ * @param vendor - The name of the vendor creating this schema
986
+ * @returns A StandardSchemaV1 instance for Workload Token Response validation
890
987
  */
891
- interface EnterpriseExtension {
988
+ declare function workloadTokenResponseSchema(vendor: string): StandardSchemaV13<Record<string, unknown>, WorkloadTokenResponse>;
989
+ /**
990
+ * Token Validation Result
991
+ */
992
+ interface TokenValidationResult {
892
993
  /**
893
- * Numeric or alphanumeric identifier assigned to a person
994
+ * Whether the token is valid
894
995
  */
895
- employeeNumber?: string;
996
+ valid: boolean;
896
997
  /**
897
- * Identifies the name of a cost center
998
+ * The decoded and validated claims (if valid)
898
999
  */
899
- costCenter?: string;
1000
+ claims?: JWTAssertionClaims;
900
1001
  /**
901
- * Identifies the name of an organization
1002
+ * Error message (if invalid)
902
1003
  */
903
- organization?: string;
1004
+ error?: string;
904
1005
  /**
905
- * Identifies the name of a division
1006
+ * Token expiration time (if valid)
906
1007
  */
907
- division?: string;
1008
+ expiresAt?: Date;
1009
+ }
1010
+ /**
1011
+ * Workload Identity extracted from a validated token.
1012
+ *
1013
+ * This is the raw, token-derived view of a calling workload. For authorization it is normalized
1014
+ * into a {@link WorkloadPrincipal} (which adds a stable `id`).
1015
+ */
1016
+ type WorkloadIdentity = {
1017
+ /** Workload identifier (for JWT Bearer Grant tokens). */
1018
+ workloadId?: string;
1019
+ /** Client identifier (for OAuth2 Client Credentials tokens). */
1020
+ clientId?: string;
1021
+ /** Granted OAuth scopes (space-delimited). */
1022
+ scope?: string;
908
1023
  /**
909
- * Identifies the name of a department
1024
+ * Whether the trusted IdP that validated this token opts into honoring its OAuth `scope` claim as
1025
+ * entitlements (per-IdP intent, resolved at validation time). Consumed by the request-level `has*`
1026
+ * helpers; `undefined` falls back to the global `RemoteConfig.authz.scopesAsEntitlements`.
910
1027
  */
911
- department?: string;
1028
+ scopesAsEntitlements?: boolean;
912
1029
  /**
913
- * The user's manager
1030
+ * Enterprise Controlled ID for this workload (`ecid:<realm>:<opaque>`), when carried on the token
1031
+ * `ecid` claim or enriched from a wired `WorkloadIdentityStore`. A workload is its own governance
1032
+ * root. See https://ionite.com/docs/llms-ecid.txt.
914
1033
  */
915
- manager?: {
1034
+ ecid?: string;
1035
+ /** Full JWT claims from the token. */
1036
+ claims: JWTAssertionClaims;
1037
+ };
1038
+ /**
1039
+ * A workload resolved as an authorization subject. It is a {@link WorkloadIdentity} with a stable
1040
+ * `id` (chosen as `clientId ?? workloadId ?? claims.sub`) used as the AccessIndex subject for
1041
+ * `subjectType: 'workload'` checks. When a `WorkloadIdentityStore` is wired, the identity may also
1042
+ * carry stored enrichment fields (merged in by `getWorkloadIdentity`).
1043
+ */
1044
+ type WorkloadPrincipal = WorkloadIdentity & {
1045
+ /** Stable subject id used for entitlement checks (`clientId ?? workloadId ?? claims.sub`). */
1046
+ id: string;
1047
+ };
1048
+ /**
1049
+ * Workforce user type for SSO/OIDC and IAM-backed applications.
1050
+ * Carries the SSO/OIDC context used by server helpers and user stores.
1051
+ */
1052
+ interface WorkforceUser extends BaseUserFields {
1053
+ /**
1054
+ * SSO/OIDC authentication data
1055
+ */
1056
+ sso: {
916
1057
  /**
917
- * The "id" of the SCIM resource representing the User's manager
1058
+ * ID Token claims from the identity provider
918
1059
  */
919
- value?: string;
1060
+ profile: IdTokenClaims;
920
1061
  /**
921
- * The URI of the SCIM resource representing the User's manager
1062
+ * Tenant/organization information
922
1063
  */
923
- $ref?: string;
1064
+ tenant: {
1065
+ id: string;
1066
+ name: string;
1067
+ };
924
1068
  /**
925
- * The displayName of the User's manager
1069
+ * OAuth scopes granted
926
1070
  */
927
- displayName?: string;
1071
+ scope?: string;
1072
+ /**
1073
+ * Token type (typically "Bearer")
1074
+ */
1075
+ tokenType: string;
1076
+ /**
1077
+ * Session state from the identity provider
1078
+ */
1079
+ sessionState?: string;
1080
+ /**
1081
+ * Token expiration time
1082
+ */
1083
+ expires: Date;
928
1084
  };
929
1085
  }
930
1086
  /**
931
- * SCIM URN for the ionite User extension, carrying the ECID identity correlator and
932
- * the account purpose (`accountClass`). Hosted schema:
933
- * https://ionite.com/schemas/ion-scim-user-extension.json
1087
+ * Customer session type for CIAM-backed applications.
1088
+ * The persisted customer record is `BaseCustomer` (see customer-store.types).
934
1089
  */
935
- declare const ION_SCIM_USER_EXTENSION_URN = "urn:ionite:scim:schemas:extension:ion:2.0:User";
936
- /** SCIM core schema for a Workload principal (distinct ResourceType from User). */
937
- declare const ION_SCIM_WORKLOAD_SCHEMA = "urn:ionite:scim:schemas:core:2.0:Workload";
938
- /** SCIM core schema for a Customer principal (distinct ResourceType from User). */
939
- declare const ION_SCIM_CUSTOMER_SCHEMA = "urn:ionite:scim:schemas:core:2.0:Customer";
1090
+ interface Customer extends BaseUserFields {
1091
+ ciam: {
1092
+ /**
1093
+ * ID token-like claims for CIAM sessions.
1094
+ */
1095
+ profile: IdTokenClaims;
1096
+ /**
1097
+ * OAuth scopes granted for this customer session.
1098
+ */
1099
+ scope?: string;
1100
+ /**
1101
+ * Token type (typically "Bearer").
1102
+ */
1103
+ tokenType: string;
1104
+ /**
1105
+ * Session expiration time.
1106
+ */
1107
+ expires: Date;
1108
+ };
1109
+ }
940
1110
  /**
941
- * ionite SCIM User extension. See https://ionite.com/docs/llms-ecid.txt.
1111
+ * Union of currently authenticated user domains.
942
1112
  */
943
- interface IoniteUserExtension {
944
- /**
945
- * Enterprise Controlled ID: `ecid:<realm>:<opaque>` (realm = the minting authority's id).
946
- * Correlates multiple accounts to one identity across systems.
947
- */
948
- ecid?: string;
949
- /**
950
- * Account purpose (distinct from `userType` persona). Open value set:
951
- * `daily`, `privileged`, `break_glass`, `service`.
952
- */
953
- accountClass?: string;
954
- }
1113
+ type AuthenticatedUser = WorkforceUser | Customer;
955
1114
  /**
956
- * SCIM User Resource
1115
+ * Union of every principal kind that can be resolved as an authorization subject: human-facing
1116
+ * users (workforce/customer) plus non-human {@link WorkloadPrincipal}s. Use this where a resolved
1117
+ * subject may be any authenticated principal; keep {@link AuthenticatedUser} for browser/tenant-HRD
1118
+ * flows that are inherently human.
1119
+ */
1120
+ type AuthenticatedPrincipal = AuthenticatedUser | WorkloadPrincipal;
1121
+ /**
1122
+ * Persisted workforce user record with identity fields and tracking metadata.
1123
+ *
1124
+ * Builds on the shared minimal identity fields with:
1125
+ * - Optional SCIM attributes commonly set by IAM inbound provisioning
1126
+ * - An optional workforce (`sso`) session envelope
1127
+ * - Timestamps for tracking when users were first seen and last updated
1128
+ * - Optional custom extended data
1129
+ *
1130
+ * This is the type returned by `UserStore`. Apps typically extend the
1131
+ * `BaseUser` Zod/Valibot schema and name their extension `User`.
1132
+ *
1133
+ * @template TExtended - Type-safe custom data that consumers can add to users
957
1134
  */
958
- interface User {
1135
+ type BaseUser<TExtended = object> = BaseUserFields & {
959
1136
  /**
960
- * REQUIRED. Unique identifier for the User, typically from the provider
1137
+ * Optional ionite tenant identifier for tenant-aware apps.
1138
+ * Built-in user stores can use this when registering HRD mappings.
961
1139
  */
962
- id?: string;
1140
+ tenantId?: string;
963
1141
  /**
964
- * REQUIRED. A unique identifier for a SCIM resource as defined by the service provider
1142
+ * Optional external identifier from the provisioning client.
1143
+ * Commonly set by IAM inbound SCIM provisioning flows.
965
1144
  */
966
1145
  externalId?: string;
967
1146
  /**
968
- * Resource metadata
1147
+ * Optional destination service-provider id captured after IAM materializes this user.
969
1148
  */
970
- meta?: {
971
- resourceType?: string;
972
- created?: string;
973
- lastModified?: string;
974
- location?: string;
975
- version?: string;
976
- };
1149
+ providerId?: string;
977
1150
  /**
978
- * REQUIRED. Unique identifier for the User, typically used for login
1151
+ * Optional IAM-owned deep link associated with this user receipt.
979
1152
  */
980
- userName: string;
1153
+ requestUrl?: string;
981
1154
  /**
982
- * The components of the user's name
1155
+ * Optional Enterprise Controlled ID: a system-of-record-owned identity correlator formatted as
1156
+ * `ecid:<realm>:<opaque>` (realm = the minting authority's id). Correlates this account to a
1157
+ * single identity across systems. Minted by the enterprise SOR (via an ECI), never by the app;
1158
+ * received on the SCIM ionite extension or the `ecid` JWT claim. Never an authorization subject.
1159
+ * See https://ionite.com/docs/llms-ecid.txt.
983
1160
  */
984
- name?: Name;
1161
+ ecid?: string;
985
1162
  /**
986
- * The name of the User, suitable for display to end-users
1163
+ * Optional account purpose (distinct from `userType` persona). Documented open value set:
1164
+ * `daily`, `privileged`, `break_glass`, `service`.
987
1165
  */
988
- displayName?: string;
1166
+ accountClass?: string;
989
1167
  /**
990
- * The casual way to address the user
1168
+ * Optional SCIM display name distinct from the simple `name` field.
1169
+ * Commonly set by IAM inbound SCIM provisioning flows.
991
1170
  */
992
- nickName?: string;
1171
+ displayName?: string;
993
1172
  /**
994
- * A fully qualified URL pointing to a page representing the User's online profile
1173
+ * Optional structured SCIM name.
1174
+ * Commonly set by IAM inbound SCIM provisioning flows.
995
1175
  */
996
- profileUrl?: string;
1176
+ scimName?: Name;
997
1177
  /**
998
- * The user's title, such as "Vice President"
1178
+ * Optional SCIM email collection.
1179
+ * The simple `email` field still stores the primary email for convenience.
999
1180
  */
1000
- title?: string;
1181
+ emails?: Email[];
1001
1182
  /**
1002
- * Used to identify the relationship between the organization and the user
1183
+ * Optional SCIM nickname.
1184
+ * Commonly set by IAM inbound SCIM provisioning flows.
1003
1185
  */
1004
- userType?: string;
1186
+ nickName?: string;
1005
1187
  /**
1006
- * Indicates the User's preferred written or spoken language
1188
+ * Optional SCIM account state.
1189
+ * Commonly set by IAM inbound SCIM provisioning flows.
1007
1190
  */
1008
- preferredLanguage?: string;
1191
+ active?: boolean;
1009
1192
  /**
1010
- * Used to indicate the User's default location for purposes of localizing items such as currency
1193
+ * Optional SCIM job title.
1194
+ * Commonly set by IAM inbound SCIM provisioning flows.
1011
1195
  */
1012
- locale?: string;
1196
+ title?: string;
1013
1197
  /**
1014
- * The User's time zone in the "Olson" time zone database format
1198
+ * Optional SCIM preferred language.
1199
+ * Commonly set by IAM inbound SCIM provisioning flows.
1015
1200
  */
1016
- timezone?: string;
1201
+ preferredLanguage?: string;
1017
1202
  /**
1018
- * A Boolean value indicating the User's administrative status
1203
+ * Optional SCIM locale.
1204
+ * Commonly set by IAM inbound SCIM provisioning flows.
1019
1205
  */
1020
- active?: boolean;
1206
+ locale?: string;
1021
1207
  /**
1022
- * Email addresses for the user
1208
+ * Optional SCIM timezone.
1209
+ * Commonly set by IAM inbound SCIM provisioning flows.
1023
1210
  */
1024
- emails?: Email[];
1211
+ timezone?: string;
1025
1212
  /**
1026
- * Phone numbers for the User
1213
+ * Optional SCIM phone numbers.
1214
+ * Commonly set by IAM inbound SCIM provisioning flows.
1027
1215
  */
1028
1216
  phoneNumbers?: PhoneNumber[];
1029
1217
  /**
1030
- * Instant messaging addresses for the User
1218
+ * Optional SCIM instant messaging addresses.
1219
+ * Commonly set by IAM inbound SCIM provisioning flows.
1031
1220
  */
1032
1221
  ims?: Array<{
1033
1222
  value: string;
@@ -1036,24 +1225,28 @@ interface User {
1036
1225
  primary?: boolean;
1037
1226
  }>;
1038
1227
  /**
1039
- * URLs of photos of the User
1228
+ * Optional SCIM photos.
1229
+ * Commonly set by IAM inbound SCIM provisioning flows.
1040
1230
  */
1041
- photos?: Array<{
1042
- value: string;
1043
- display?: string;
1044
- type?: string;
1045
- primary?: boolean;
1046
- }>;
1231
+ photos?: Photo[];
1047
1232
  /**
1048
- * Physical mailing addresses for this User
1233
+ * Optional SCIM addresses.
1234
+ * Commonly set by IAM inbound SCIM provisioning flows.
1049
1235
  */
1050
1236
  addresses?: Address[];
1051
1237
  /**
1052
- * A list of groups to which the user belongs
1238
+ * Optional SCIM roles.
1239
+ * Commonly set by IAM inbound SCIM provisioning flows.
1240
+ */
1241
+ roles?: Role2[];
1242
+ /**
1243
+ * Optional SCIM groups.
1244
+ * Commonly set by IAM inbound SCIM provisioning flows.
1053
1245
  */
1054
1246
  groups?: Group2[];
1055
1247
  /**
1056
- * A list of entitlements for the User
1248
+ * Optional SCIM entitlements.
1249
+ * Commonly set by IAM inbound SCIM provisioning flows.
1057
1250
  */
1058
1251
  entitlements?: Array<{
1059
1252
  value: string;
@@ -1062,151 +1255,111 @@ interface User {
1062
1255
  primary?: boolean;
1063
1256
  }>;
1064
1257
  /**
1065
- * A list of roles for the User
1066
- */
1067
- roles?: Role2[];
1068
- /**
1069
- * A list of certificates issued to the User
1258
+ * Optional SCIM X.509 certificates.
1259
+ * Commonly set by IAM inbound SCIM provisioning flows.
1070
1260
  */
1071
1261
  x509Certificates?: X509Certificate[];
1072
1262
  /**
1073
- * Enterprise User Extension
1074
- */
1075
- "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User"?: EnterpriseExtension;
1076
- /**
1077
- * ionite User Extension (ECID + accountClass).
1078
- */
1079
- "urn:ionite:scim:schemas:extension:ion:2.0:User"?: IoniteUserExtension;
1080
- /**
1081
- * REQUIRED. The schemas attribute is an array of Strings which allows introspection of the supported schema version
1082
- */
1083
- schemas?: string[];
1084
- }
1085
- /**
1086
- * Creates a StandardSchemaV1 for validating SCIM User resources.
1087
- * @param vendor - The name of the vendor creating this schema
1088
- * @returns A StandardSchemaV1 instance for SCIM User resources
1089
- */
1090
- declare function userSchema(vendor: string): StandardSchemaV13<Record<string, unknown>, User>;
1091
- /**
1092
- * Creates a StandardSchemaV1 for validating SCIM Group resources.
1093
- * @param vendor - The name of the vendor creating this schema
1094
- * @returns A StandardSchemaV1 instance for SCIM Group resources
1095
- */
1096
- declare function groupResourceSchema(vendor: string): StandardSchemaV13<Record<string, unknown>, GroupResource>;
1097
- /** Validates a SCIM Workload resource. */
1098
- declare const workloadResourceSchema: StandardSchemaV13<unknown, ScimWorkload>;
1099
- /** Validates a SCIM Customer resource. */
1100
- declare const customerResourceSchema: StandardSchemaV13<unknown, ScimCustomer>;
1101
- /**
1102
- * Persisted CIAM customer record with identity fields and tracking metadata.
1103
- *
1104
- * Builds on the shared minimal identity fields with a lightweight set of
1105
- * consumer-oriented attributes and an optional CIAM (`ciam`) session envelope.
1106
- * This is the type returned by `CustomerStore`. Apps typically extend the
1107
- * `BaseCustomer` Zod/Valibot schema to add custom attributes.
1108
- *
1109
- * @template TExtended - Type-safe custom data that consumers can add to customers
1110
- */
1111
- type BaseCustomer<TExtended = object> = BaseUserFields & {
1112
- /**
1113
- * Optional ionite tenant identifier for tenant-aware apps.
1114
- */
1115
- tenantId?: string;
1116
- /**
1117
- * Optional external identifier from a provisioning client.
1118
- */
1119
- externalId?: string;
1120
- /**
1121
- * Optional destination service-provider id captured after IAM materializes this customer.
1122
- */
1123
- providerId?: string;
1124
- /**
1125
- * Optional IAM-owned deep link associated with this customer receipt.
1126
- */
1127
- requestUrl?: string;
1128
- /**
1129
- * Optional display name distinct from the simple `name` field.
1130
- */
1131
- displayName?: string;
1132
- /**
1133
- * Optional email collection.
1134
- * The simple `email` field still stores the primary email for convenience.
1135
- */
1136
- emails?: Email[];
1137
- /**
1138
- * Optional phone numbers.
1263
+ * Optional SCIM enterprise extension.
1264
+ * Mirrors `urn:ietf:params:scim:schemas:extension:enterprise:2.0:User`.
1265
+ * Commonly set by IAM inbound SCIM provisioning flows.
1139
1266
  */
1140
- phoneNumbers?: PhoneNumber[];
1267
+ scimEnterprise?: EnterpriseExtension;
1141
1268
  /**
1142
- * Optional account state.
1269
+ * Optional pass-through SCIM schema extensions keyed by full URN.
1270
+ * Use this when your validator accepts custom top-level SCIM extensions and
1271
+ * you want them to round-trip through a `UserStore` implementation.
1143
1272
  */
1144
- active?: boolean;
1273
+ scimSchemaExtensions?: Record<string, unknown>;
1145
1274
  /**
1146
- * Timestamp when the customer was first stored.
1275
+ * Timestamp when the user was first stored.
1147
1276
  */
1148
1277
  createdAt?: Date;
1149
1278
  /**
1150
- * Timestamp when the customer was last updated (e.g., on re-login).
1279
+ * Timestamp when the user was last updated (e.g., on re-login).
1151
1280
  */
1152
1281
  updatedAt?: Date;
1153
1282
  /**
1154
- * Optional CIAM envelope for stores that persist customer session profile data.
1283
+ * Optional SSO envelope for stores that persist full auth profile data.
1155
1284
  * Simple app stores MAY omit this field.
1156
1285
  */
1157
- ciam?: Customer["ciam"];
1286
+ sso?: WorkforceUser["sso"];
1158
1287
  } & TExtended;
1159
- type CustomerStoreOptions = {
1288
+ type UserStoreOptions = {
1160
1289
  tenantId: string;
1161
1290
  tenants: TenantStore;
1162
1291
  };
1163
1292
  /**
1164
- * Abstract interface for customer storage backends.
1293
+ * Abstract interface for user storage backends.
1165
1294
  *
1166
- * Mirrors `UserStore` but for the CIAM customer domain. Consumers can
1167
- * implement this for in-memory, Redis, or database-backed persistence.
1295
+ * Consumers can implement this interface to use different storage backends:
1296
+ * - In-memory (for development/testing)
1297
+ * - Redis (for production with fast lookups)
1298
+ * - Database (PostgreSQL, MySQL, etc.)
1168
1299
  *
1169
- * @template TExtended - Type-safe custom data that consumers can add to customers
1300
+ * @template TExtended - Type-safe custom data that consumers can add to users
1301
+ *
1302
+ * @example
1303
+ * ```typescript
1304
+ * // Custom user data
1305
+ * type MyUserData = {
1306
+ * department: string;
1307
+ * roles: string[];
1308
+ * };
1309
+ *
1310
+ * // Implement custom store
1311
+ * class RedisUserStore implements UserStore<MyUserData> {
1312
+ * async get(sub: string): Promise<BaseUser<MyUserData> | null> {
1313
+ * const data = await redis.get(`user:${sub}`);
1314
+ * return data ? JSON.parse(data) : null;
1315
+ * }
1316
+ * // ... other methods
1317
+ * }
1318
+ * ```
1170
1319
  */
1171
- interface CustomerStore<TExtended = object> {
1320
+ interface UserStore<TExtended = object> {
1172
1321
  /**
1173
- * Retrieve a customer by their unique identifier.
1322
+ * Retrieve a user by their unique identifier.
1174
1323
  *
1175
- * @param id - The customer's unique identifier as defined by the store implementation
1176
- * @returns The customer if found, undefined otherwise
1324
+ * @param id - The user's unique identifier as defined by the store implementation
1325
+ * @returns The user if found, undefined otherwise
1177
1326
  */
1178
- get(id: string): Promise<BaseCustomer<TExtended> | undefined>;
1327
+ get(id: string): Promise<BaseUser<TExtended> | undefined>;
1179
1328
  /**
1180
- * Retrieve a customer based on their identity attributes or CIAM claims.
1181
- *
1182
- * @param customer - The customer to lookup
1183
- * @returns The customer if found, undefined otherwise
1329
+ * Optional secondary-index lookup for the stable enterprise correlation key. Implementations that
1330
+ * omit it remain correct; callers fall back to paged `list()` scans.
1184
1331
  */
1185
- lookup(customer: BaseCustomer<TExtended>): Promise<BaseCustomer<TExtended> | undefined>;
1332
+ getByExternalId?(externalId: string): Promise<BaseUser<TExtended> | undefined>;
1186
1333
  /**
1187
- * Optional indexed lookup by `externalId`. When omitted, callers fall back to `lookup` or a list scan.
1334
+ * Retrieve a user based on their SCIM attributes or SSO JWT Claims.
1335
+ *
1336
+ * @param user - The user to lookup by SCIM attributes or SSO JWT Claims
1337
+ * @returns The user if found, undefined otherwise
1188
1338
  */
1189
- getByExternalId?(externalId: string): Promise<BaseCustomer<TExtended> | undefined>;
1339
+ lookup(user: BaseUser<TExtended>): Promise<BaseUser<TExtended> | undefined>;
1190
1340
  /**
1191
- * Create or update a customer in the store.
1341
+ * Create or update a user in the store.
1192
1342
  *
1193
- * @param customer - The customer data to store
1343
+ * If a user with the same `id` (sub) exists, it will be updated.
1344
+ * Otherwise, a new user will be created.
1345
+ *
1346
+ * @param user - The user data to store
1194
1347
  */
1195
- upsert(customer: BaseCustomer<TExtended>): Promise<BaseCustomer<TExtended>>;
1348
+ upsert(user: BaseUser<TExtended>): Promise<BaseUser<TExtended>>;
1196
1349
  /**
1197
- * Delete a customer by their unique identifier.
1350
+ * Delete a user by their unique identifier.
1198
1351
  *
1199
- * @param id - The customer's unique identifier as defined by the store implementation
1200
- * @returns The number of customers deleted (0 or 1)
1352
+ * @param id - The user's unique identifier as defined by the store implementation
1353
+ * @returns The number of users deleted (0 or 1)
1201
1354
  */
1202
1355
  delete(id: string): Promise<number>;
1203
1356
  /**
1204
- * List customers in the store with optional pagination and sort.
1357
+ * List users in the store with optional pagination and sort.
1205
1358
  *
1206
1359
  * @param options - Optional start (0-based), limit (page size), and sort
1207
1360
  * @returns ListResult with total, count, items, size, page, pages
1208
1361
  */
1209
- list(options?: ListOptions): Promise<ListResult<BaseCustomer<TExtended>>>;
1362
+ list(options?: ListOptions): Promise<ListResult<BaseUser<TExtended>>>;
1210
1363
  }
1211
1364
  /**
1212
1365
  * Persisted workload principal record. Mirrors the registry/enrichment shape of `BaseUser`, scoped
@@ -1373,6 +1526,14 @@ interface IamDeltaEmitter {
1373
1526
  onUserUpsert(user: BaseUser): Promise<void>;
1374
1527
  /** Delete a destination User identified strictly by externalId. */
1375
1528
  onUserDelete(externalId: string): Promise<void>;
1529
+ /** Upsert a full AppDev-projected SCIM Workload representation at the destination. */
1530
+ onWorkloadUpsert(workload: BaseWorkloadIdentity): Promise<void>;
1531
+ /** Delete a destination Workload identified by externalId (falling back to its App-owned id). */
1532
+ onWorkloadDelete(externalId: string): Promise<void>;
1533
+ /** Upsert a full AppDev-projected SCIM Customer representation at the destination. */
1534
+ onCustomerUpsert(customer: BaseCustomer): Promise<void>;
1535
+ /** Delete a destination Customer identified by externalId (falling back to its App-owned id). */
1536
+ onCustomerDelete(externalId: string): Promise<void>;
1376
1537
  /** Upsert a full SCIM Group representation for a group, role, or permission definition. */
1377
1538
  onEntitlementUpsert(entity: Entitlement, type: EntitlementType): Promise<void>;
1378
1539
  /** Delete a destination entitlement Group identified by the App-owned catalog id. */
@@ -1997,6 +2158,10 @@ type IAMConfig = {
1997
2158
  * for your application's database model.
1998
2159
  */
1999
2160
  inboundUsers?: IAMInboundUsersConfig;
2161
+ /** AppDev-owned SCIM projection and persistence hooks for customer principals. */
2162
+ inboundCustomers?: IAMInboundCustomersConfig;
2163
+ /** AppDev-owned SCIM projection and persistence hooks for workload principals. */
2164
+ inboundWorkloads?: IAMInboundWorkloadsConfig;
2000
2165
  /**
2001
2166
  * FrameworkConfig-only fallback that mints an IAM-owned deep link where access to an entitlement
2002
2167
  * can be requested. A `requestUrl` written back into the catalog row by IAM takes precedence.
@@ -2105,6 +2270,20 @@ interface IAMInboundUsersConfig {
2105
2270
  */
2106
2271
  mapBaseUserToScim?: (stored: BaseUser) => User | Promise<User>;
2107
2272
  }
2273
+ interface IAMInboundPrincipalContext<TStored> {
2274
+ /** Current stored principal when replacing or patching an existing resource. */
2275
+ existing?: TStored;
2276
+ /** Operation mode for the inbound mapper. */
2277
+ mode: "create" | "replace" | "patch";
2278
+ }
2279
+ interface IAMInboundCustomersConfig {
2280
+ mapValidatedScimToBaseCustomer?: (validated: ScimCustomer, context: IAMInboundPrincipalContext<BaseCustomer>) => BaseCustomer | Promise<BaseCustomer>;
2281
+ mapBaseCustomerToScim?: (stored: BaseCustomer) => ScimCustomer | Promise<ScimCustomer>;
2282
+ }
2283
+ interface IAMInboundWorkloadsConfig {
2284
+ mapValidatedScimToBaseWorkload?: (validated: ScimWorkload, context: IAMInboundPrincipalContext<BaseWorkloadIdentity>) => BaseWorkloadIdentity | Promise<BaseWorkloadIdentity>;
2285
+ mapBaseWorkloadToScim?: (stored: BaseWorkloadIdentity) => ScimWorkload | Promise<ScimWorkload>;
2286
+ }
2108
2287
  interface ScimAuthenticationScheme {
2109
2288
  type: string;
2110
2289
  name: string;
@@ -2548,6 +2727,8 @@ type OtelProtocol = "http/protobuf" | "http/json";
2548
2727
  type OtelProviderType = "otlp" | "grafana-lgtm" | "datadog" | "splunk" | "elastic";
2549
2728
  type OtelLogLevel = "trace" | "debug" | "info" | "warn" | "error";
2550
2729
  type OtelLevels = Partial<Record<OtelLogLevel, boolean>>;
2730
+ /** Local console mirror policy: disable it or set its minimum emitted severity. */
2731
+ type OtelConsoleMode = "off" | OtelLogLevel;
2551
2732
  type OtelAttributeValue = string | number | boolean | string[] | number[] | boolean[];
2552
2733
  type OtelAttributes = Record<string, OtelAttributeValue>;
2553
2734
  type OtelSignalConfig = {
@@ -2594,6 +2775,8 @@ type OtelConfig = {
2594
2775
  deploymentEnvironment?: string;
2595
2776
  resourceAttributes?: OtelAttributes;
2596
2777
  levels?: OtelLevels;
2778
+ /** `'off'` exports only to OTel; a level dual-emits at or above that severity. Defaults to `'info'`. */
2779
+ console?: OtelConsoleMode;
2597
2780
  traces?: boolean | OtelSignalConfig;
2598
2781
  metrics?: boolean | OtelMetricsSignalConfig;
2599
2782
  logs?: boolean | OtelSignalConfig;
@@ -2605,7 +2788,8 @@ type OtelConfig = {
2605
2788
  type FrameworkOtelConfig = {
2606
2789
  levels?: OtelLevels;
2607
2790
  instrument?: unknown[];
2608
- console?: boolean | ((record: OtelLogRecord) => void);
2791
+ /** Optional app-owned destination/renderer for records admitted by `RemoteConfig.otel.console`. */
2792
+ console?: (record: OtelLogRecord) => void;
2609
2793
  spanProcessors?: unknown[];
2610
2794
  metricReaders?: unknown[];
2611
2795
  logRecordProcessors?: unknown[];
@@ -3802,6 +3986,14 @@ type IoniteValidators = {
3802
3986
  type ApplicationValidators<TTenantValidators extends TenantValidators = TenantValidators> = IoniteValidators & {
3803
3987
  tenant: TTenantValidators;
3804
3988
  };
3989
+ type AuthzOaaPrincipalConfig = {
3990
+ /**
3991
+ * Principals included in OAA snapshots. `'all'` enumerates the wired store; `'access'` includes
3992
+ * only principals referenced by access roots. Access-root subjects are always projected so OAA
3993
+ * edges remain referentially closed.
3994
+ */
3995
+ population?: OaaPrincipalPopulation;
3996
+ };
3805
3997
  type AuthzOaaConfig = {
3806
3998
  url?: string;
3807
3999
  apiKey?: string;
@@ -3809,6 +4001,12 @@ type AuthzOaaConfig = {
3809
4001
  datasourceId?: string;
3810
4002
  applicationName?: string;
3811
4003
  applicationType?: string;
4004
+ /** Workforce population. Defaults to `'all'` to preserve existing OAA snapshot behavior. */
4005
+ users?: AuthzOaaPrincipalConfig;
4006
+ /** CIAM customer population. Defaults to `'access'`. */
4007
+ customers?: AuthzOaaPrincipalConfig;
4008
+ /** Workload population. Defaults to `'access'`. */
4009
+ workloads?: AuthzOaaPrincipalConfig;
3812
4010
  compression?: "gzip" | "none";
3813
4011
  multipart?: "auto" | "always" | "never";
3814
4012
  maxPayloadBytes?: number;
@@ -4716,247 +4914,114 @@ type InMemoryTenantStoreOptions = {
4716
4914
  ionCache?: TenantIonCache;
4717
4915
  };
4718
4916
  /**
4719
- * Persisted workforce user record with identity fields and tracking metadata.
4720
- *
4721
- * Builds on the shared minimal identity fields with:
4722
- * - Optional SCIM attributes commonly set by IAM inbound provisioning
4723
- * - An optional workforce (`sso`) session envelope
4724
- * - Timestamps for tracking when users were first seen and last updated
4725
- * - Optional custom extended data
4917
+ * Persisted CIAM customer record with identity fields and tracking metadata.
4726
4918
  *
4727
- * This is the type returned by `UserStore`. Apps typically extend the
4728
- * `BaseUser` Zod/Valibot schema and name their extension `User`.
4919
+ * Builds on the shared minimal identity fields with a lightweight set of
4920
+ * consumer-oriented attributes and an optional CIAM (`ciam`) session envelope.
4921
+ * This is the type returned by `CustomerStore`. Apps typically extend the
4922
+ * `BaseCustomer` Zod/Valibot schema to add custom attributes.
4729
4923
  *
4730
- * @template TExtended - Type-safe custom data that consumers can add to users
4924
+ * @template TExtended - Type-safe custom data that consumers can add to customers
4731
4925
  */
4732
- type BaseUser<TExtended = object> = BaseUserFields & {
4926
+ type BaseCustomer<TExtended = object> = BaseUserFields & {
4733
4927
  /**
4734
4928
  * Optional ionite tenant identifier for tenant-aware apps.
4735
- * Built-in user stores can use this when registering HRD mappings.
4736
4929
  */
4737
4930
  tenantId?: string;
4738
4931
  /**
4739
- * Optional external identifier from the provisioning client.
4740
- * Commonly set by IAM inbound SCIM provisioning flows.
4932
+ * Optional external identifier from a provisioning client.
4741
4933
  */
4742
4934
  externalId?: string;
4743
4935
  /**
4744
- * Optional destination service-provider id captured after IAM materializes this user.
4936
+ * Optional destination service-provider id captured after IAM materializes this customer.
4745
4937
  */
4746
4938
  providerId?: string;
4747
4939
  /**
4748
- * Optional IAM-owned deep link associated with this user receipt.
4940
+ * Optional IAM-owned deep link associated with this customer receipt.
4749
4941
  */
4750
4942
  requestUrl?: string;
4751
4943
  /**
4752
- * Optional Enterprise Controlled ID: a system-of-record-owned identity correlator formatted as
4753
- * `ecid:<realm>:<opaque>` (realm = the minting authority's id). Correlates this account to a
4754
- * single identity across systems. Minted by the enterprise SOR (via an ECI), never by the app;
4755
- * received on the SCIM ionite extension or the `ecid` JWT claim. Never an authorization subject.
4756
- * See https://ionite.com/docs/llms-ecid.txt.
4757
- */
4758
- ecid?: string;
4759
- /**
4760
- * Optional account purpose (distinct from `userType` persona). Documented open value set:
4761
- * `daily`, `privileged`, `break_glass`, `service`.
4762
- */
4763
- accountClass?: string;
4764
- /**
4765
- * Optional SCIM display name distinct from the simple `name` field.
4766
- * Commonly set by IAM inbound SCIM provisioning flows.
4944
+ * Optional display name distinct from the simple `name` field.
4767
4945
  */
4768
4946
  displayName?: string;
4769
4947
  /**
4770
- * Optional structured SCIM name.
4771
- * Commonly set by IAM inbound SCIM provisioning flows.
4772
- */
4773
- scimName?: Name;
4774
- /**
4775
- * Optional SCIM email collection.
4948
+ * Optional email collection.
4776
4949
  * The simple `email` field still stores the primary email for convenience.
4777
4950
  */
4778
4951
  emails?: Email[];
4779
4952
  /**
4780
- * Optional SCIM nickname.
4781
- * Commonly set by IAM inbound SCIM provisioning flows.
4782
- */
4783
- nickName?: string;
4784
- /**
4785
- * Optional SCIM account state.
4786
- * Commonly set by IAM inbound SCIM provisioning flows.
4787
- */
4788
- active?: boolean;
4789
- /**
4790
- * Optional SCIM job title.
4791
- * Commonly set by IAM inbound SCIM provisioning flows.
4792
- */
4793
- title?: string;
4794
- /**
4795
- * Optional SCIM preferred language.
4796
- * Commonly set by IAM inbound SCIM provisioning flows.
4797
- */
4798
- preferredLanguage?: string;
4799
- /**
4800
- * Optional SCIM locale.
4801
- * Commonly set by IAM inbound SCIM provisioning flows.
4802
- */
4803
- locale?: string;
4804
- /**
4805
- * Optional SCIM timezone.
4806
- * Commonly set by IAM inbound SCIM provisioning flows.
4807
- */
4808
- timezone?: string;
4809
- /**
4810
- * Optional SCIM phone numbers.
4811
- * Commonly set by IAM inbound SCIM provisioning flows.
4953
+ * Optional phone numbers.
4812
4954
  */
4813
4955
  phoneNumbers?: PhoneNumber[];
4814
4956
  /**
4815
- * Optional SCIM instant messaging addresses.
4816
- * Commonly set by IAM inbound SCIM provisioning flows.
4817
- */
4818
- ims?: Array<{
4819
- value: string;
4820
- display?: string;
4821
- type?: string;
4822
- primary?: boolean;
4823
- }>;
4824
- /**
4825
- * Optional SCIM photos.
4826
- * Commonly set by IAM inbound SCIM provisioning flows.
4827
- */
4828
- photos?: Photo[];
4829
- /**
4830
- * Optional SCIM addresses.
4831
- * Commonly set by IAM inbound SCIM provisioning flows.
4832
- */
4833
- addresses?: Address[];
4834
- /**
4835
- * Optional SCIM roles.
4836
- * Commonly set by IAM inbound SCIM provisioning flows.
4837
- */
4838
- roles?: Role2[];
4839
- /**
4840
- * Optional SCIM groups.
4841
- * Commonly set by IAM inbound SCIM provisioning flows.
4842
- */
4843
- groups?: Group2[];
4844
- /**
4845
- * Optional SCIM entitlements.
4846
- * Commonly set by IAM inbound SCIM provisioning flows.
4847
- */
4848
- entitlements?: Array<{
4849
- value: string;
4850
- display?: string;
4851
- type?: string;
4852
- primary?: boolean;
4853
- }>;
4854
- /**
4855
- * Optional SCIM X.509 certificates.
4856
- * Commonly set by IAM inbound SCIM provisioning flows.
4857
- */
4858
- x509Certificates?: X509Certificate[];
4859
- /**
4860
- * Optional SCIM enterprise extension.
4861
- * Mirrors `urn:ietf:params:scim:schemas:extension:enterprise:2.0:User`.
4862
- * Commonly set by IAM inbound SCIM provisioning flows.
4863
- */
4864
- scimEnterprise?: EnterpriseExtension;
4865
- /**
4866
- * Optional pass-through SCIM schema extensions keyed by full URN.
4867
- * Use this when your validator accepts custom top-level SCIM extensions and
4868
- * you want them to round-trip through a `UserStore` implementation.
4957
+ * Optional account state.
4869
4958
  */
4870
- scimSchemaExtensions?: Record<string, unknown>;
4959
+ active?: boolean;
4871
4960
  /**
4872
- * Timestamp when the user was first stored.
4961
+ * Timestamp when the customer was first stored.
4873
4962
  */
4874
4963
  createdAt?: Date;
4875
4964
  /**
4876
- * Timestamp when the user was last updated (e.g., on re-login).
4965
+ * Timestamp when the customer was last updated (e.g., on re-login).
4877
4966
  */
4878
4967
  updatedAt?: Date;
4879
4968
  /**
4880
- * Optional SSO envelope for stores that persist full auth profile data.
4969
+ * Optional CIAM envelope for stores that persist customer session profile data.
4881
4970
  * Simple app stores MAY omit this field.
4882
4971
  */
4883
- sso?: WorkforceUser["sso"];
4972
+ ciam?: Customer["ciam"];
4884
4973
  } & TExtended;
4885
- type UserStoreOptions = {
4974
+ type CustomerStoreOptions = {
4886
4975
  tenantId: string;
4887
4976
  tenants: TenantStore;
4888
4977
  };
4889
4978
  /**
4890
- * Abstract interface for user storage backends.
4891
- *
4892
- * Consumers can implement this interface to use different storage backends:
4893
- * - In-memory (for development/testing)
4894
- * - Redis (for production with fast lookups)
4895
- * - Database (PostgreSQL, MySQL, etc.)
4896
- *
4897
- * @template TExtended - Type-safe custom data that consumers can add to users
4979
+ * Abstract interface for customer storage backends.
4898
4980
  *
4899
- * @example
4900
- * ```typescript
4901
- * // Custom user data
4902
- * type MyUserData = {
4903
- * department: string;
4904
- * roles: string[];
4905
- * };
4981
+ * Mirrors `UserStore` but for the CIAM customer domain. Consumers can
4982
+ * implement this for in-memory, Redis, or database-backed persistence.
4906
4983
  *
4907
- * // Implement custom store
4908
- * class RedisUserStore implements UserStore<MyUserData> {
4909
- * async get(sub: string): Promise<BaseUser<MyUserData> | null> {
4910
- * const data = await redis.get(`user:${sub}`);
4911
- * return data ? JSON.parse(data) : null;
4912
- * }
4913
- * // ... other methods
4914
- * }
4915
- * ```
4984
+ * @template TExtended - Type-safe custom data that consumers can add to customers
4916
4985
  */
4917
- interface UserStore<TExtended = object> {
4986
+ interface CustomerStore<TExtended = object> {
4918
4987
  /**
4919
- * Retrieve a user by their unique identifier.
4988
+ * Retrieve a customer by their unique identifier.
4920
4989
  *
4921
- * @param id - The user's unique identifier as defined by the store implementation
4922
- * @returns The user if found, undefined otherwise
4990
+ * @param id - The customer's unique identifier as defined by the store implementation
4991
+ * @returns The customer if found, undefined otherwise
4923
4992
  */
4924
- get(id: string): Promise<BaseUser<TExtended> | undefined>;
4993
+ get(id: string): Promise<BaseCustomer<TExtended> | undefined>;
4925
4994
  /**
4926
- * Optional secondary-index lookup for the stable enterprise correlation key. Implementations that
4927
- * omit it remain correct; callers fall back to paged `list()` scans.
4995
+ * Retrieve a customer based on their identity attributes or CIAM claims.
4996
+ *
4997
+ * @param customer - The customer to lookup
4998
+ * @returns The customer if found, undefined otherwise
4928
4999
  */
4929
- getByExternalId?(externalId: string): Promise<BaseUser<TExtended> | undefined>;
5000
+ lookup(customer: BaseCustomer<TExtended>): Promise<BaseCustomer<TExtended> | undefined>;
4930
5001
  /**
4931
- * Retrieve a user based on their SCIM attributes or SSO JWT Claims.
4932
- *
4933
- * @param user - The user to lookup by SCIM attributes or SSO JWT Claims
4934
- * @returns The user if found, undefined otherwise
5002
+ * Optional indexed lookup by `externalId`. When omitted, callers fall back to `lookup` or a list scan.
4935
5003
  */
4936
- lookup(user: BaseUser<TExtended>): Promise<BaseUser<TExtended> | undefined>;
5004
+ getByExternalId?(externalId: string): Promise<BaseCustomer<TExtended> | undefined>;
4937
5005
  /**
4938
- * Create or update a user in the store.
4939
- *
4940
- * If a user with the same `id` (sub) exists, it will be updated.
4941
- * Otherwise, a new user will be created.
5006
+ * Create or update a customer in the store.
4942
5007
  *
4943
- * @param user - The user data to store
5008
+ * @param customer - The customer data to store
4944
5009
  */
4945
- upsert(user: BaseUser<TExtended>): Promise<BaseUser<TExtended>>;
5010
+ upsert(customer: BaseCustomer<TExtended>): Promise<BaseCustomer<TExtended>>;
4946
5011
  /**
4947
- * Delete a user by their unique identifier.
5012
+ * Delete a customer by their unique identifier.
4948
5013
  *
4949
- * @param id - The user's unique identifier as defined by the store implementation
4950
- * @returns The number of users deleted (0 or 1)
5014
+ * @param id - The customer's unique identifier as defined by the store implementation
5015
+ * @returns The number of customers deleted (0 or 1)
4951
5016
  */
4952
5017
  delete(id: string): Promise<number>;
4953
5018
  /**
4954
- * List users in the store with optional pagination and sort.
5019
+ * List customers in the store with optional pagination and sort.
4955
5020
  *
4956
5021
  * @param options - Optional start (0-based), limit (page size), and sort
4957
5022
  * @returns ListResult with total, count, items, size, page, pages
4958
5023
  */
4959
- list(options?: ListOptions): Promise<ListResult<BaseUser<TExtended>>>;
5024
+ list(options?: ListOptions): Promise<ListResult<BaseCustomer<TExtended>>>;
4960
5025
  }
4961
5026
  type AuthzEntityBase = {
4962
5027
  id: string;
@@ -4995,9 +5060,20 @@ type SubjectTypeScoping = {
4995
5060
  /** AppDev advisory default principal kinds; must be a subset of `assignableSubjectTypes` (read-only to IAM). */
4996
5061
  recommendedSubjectTypes?: SubjectType[];
4997
5062
  };
5063
+ /** Suggested IAM governance labels for an entitlement's advisory risk classification. */
5064
+ declare const CANONICAL_RISK_LEVELS: readonly ["basic", "elevated", "privileged", "admin"];
5065
+ /** Canonical IAM governance suggestions with autocomplete, while allowing AppDev-defined labels. */
5066
+ type RiskLevel = (typeof CANONICAL_RISK_LEVELS)[number] | (string & {});
5067
+ /** Risk projected to IAM when an entitlement does not declare or store an explicit classification. */
5068
+ declare const DEFAULT_RISK_LEVEL = "basic";
4998
5069
  type Permission = AuthzEntityBase & SubjectTypeScoping & {
4999
5070
  /** True when this catalog entry should be exposed as requestable access in IAM tooling. */
5000
5071
  requestable?: boolean;
5072
+ /**
5073
+ * Advisory access-risk classification. App code seeds the initial value; IAM may replace it after
5074
+ * materialization. Unset values project to IAM as {@link DEFAULT_RISK_LEVEL}.
5075
+ */
5076
+ riskLevel?: RiskLevel;
5001
5077
  /** IAM-owned deep link where a principal can request this entitlement, when the destination provides one. */
5002
5078
  requestUrl?: string;
5003
5079
  action?: string;
@@ -5011,6 +5087,11 @@ type Permission = AuthzEntityBase & SubjectTypeScoping & {
5011
5087
  type Role = AuthzEntityBase & SubjectTypeScoping & {
5012
5088
  /** True when this catalog entry should be exposed as requestable access in IAM tooling. */
5013
5089
  requestable?: boolean;
5090
+ /**
5091
+ * Advisory access-risk classification. App code seeds the initial value; IAM may replace it after
5092
+ * materialization. Unset values project to IAM as {@link DEFAULT_RISK_LEVEL}.
5093
+ */
5094
+ riskLevel?: RiskLevel;
5014
5095
  /** IAM-owned deep link where a principal can request this entitlement, when the destination provides one. */
5015
5096
  requestUrl?: string;
5016
5097
  /** Permissions this role confers (definitional). Roles are flat bundles — OAA has no nested-role edge. */
@@ -5019,6 +5100,11 @@ type Role = AuthzEntityBase & SubjectTypeScoping & {
5019
5100
  type Group = AuthzEntityBase & SubjectTypeScoping & {
5020
5101
  /** True when this catalog entry should be exposed as requestable access in IAM tooling. */
5021
5102
  requestable?: boolean;
5103
+ /**
5104
+ * Advisory access-risk classification. App code seeds the initial value; IAM may replace it after
5105
+ * materialization. Unset values project to IAM as {@link DEFAULT_RISK_LEVEL}.
5106
+ */
5107
+ riskLevel?: RiskLevel;
5022
5108
  /** IAM-owned deep link where a principal can request this entitlement, when the destination provides one. */
5023
5109
  requestUrl?: string;
5024
5110
  /** Nested child groups composed into this group (definitional). */
@@ -5053,6 +5139,8 @@ type AuthzScimGroupType = OaaAccessTargetType;
5053
5139
  type AuthzScimGroupExtension = {
5054
5140
  type?: AuthzScimGroupType;
5055
5141
  requestable?: boolean;
5142
+ /** Advisory access-risk classification. Writable by IAM; unset catalog values project as `basic`. */
5143
+ riskLevel?: string;
5056
5144
  /** Destination service-provider id written back by IAM. */
5057
5145
  providerId?: string;
5058
5146
  /** IAM-owned deep link for requesting this entitlement. Writable by IAM. */
@@ -5394,6 +5482,7 @@ type OaaSyncOptions = {
5394
5482
  multipartThresholdBytes?: number;
5395
5483
  partSizeBytes?: number;
5396
5484
  };
5485
+ type OaaPrincipalPopulation = "all" | "access";
5397
5486
  type OaaSyncResult = {
5398
5487
  success: boolean;
5399
5488
  syncToken?: string;
@@ -5405,9 +5494,13 @@ type OaaSyncResult = {
5405
5494
  type OaaSyncInput<
5406
5495
  TUser,
5407
5496
  TGroup,
5408
- TResource
5497
+ TResource,
5498
+ TCustomer = BaseCustomer,
5499
+ TWorkload = BaseWorkloadIdentity
5409
5500
  > = {
5410
5501
  users?: Iterable<TUser> | AsyncIterable<TUser>;
5502
+ customers?: Iterable<TCustomer> | AsyncIterable<TCustomer>;
5503
+ workloads?: Iterable<TWorkload> | AsyncIterable<TWorkload>;
5411
5504
  groups?: Iterable<TGroup | Group> | AsyncIterable<TGroup | Group>;
5412
5505
  roles?: Iterable<Role> | AsyncIterable<Role>;
5413
5506
  permissions?: Iterable<Permission> | AsyncIterable<Permission>;
@@ -5424,9 +5517,13 @@ interface OaaClient<
5424
5517
  TGroup = Group,
5425
5518
  TRole = Role,
5426
5519
  TPermission = Permission,
5427
- TResource = Resource
5520
+ TResource = Resource,
5521
+ TCustomer = BaseCustomer,
5522
+ TWorkload = BaseWorkloadIdentity
5428
5523
  > {
5429
5524
  pushUser(user: TUser): Promise<void>;
5525
+ pushCustomer(customer: TCustomer): Promise<void>;
5526
+ pushWorkload(workload: TWorkload): Promise<void>;
5430
5527
  pushGroup(group: TGroup | Group): Promise<void>;
5431
5528
  pushRole(role: TRole): Promise<void>;
5432
5529
  pushPermission(permission: TPermission): Promise<void>;
@@ -5439,6 +5536,8 @@ interface OaaClient<
5439
5536
  * `sync` remains the safety net for any drift (e.g. an outage between revoke and delete).
5440
5537
  */
5441
5538
  deleteUser(id: string): Promise<void>;
5539
+ deleteCustomer(id: string): Promise<void>;
5540
+ deleteWorkload(id: string): Promise<void>;
5442
5541
  deleteGroup(id: string): Promise<void>;
5443
5542
  deleteRole(id: string): Promise<void>;
5444
5543
  deletePermission(id: string): Promise<void>;
@@ -5454,7 +5553,12 @@ interface OaaClient<
5454
5553
  * response (a later full `sync` reconciles), same contract as the single-change methods.
5455
5554
  */
5456
5555
  pushAccessChanges(items: OaaAccessChangeBatchItem[]): Promise<void>;
5457
- sync(input: OaaSyncInput<TUser, TGroup, TResource>, options?: OaaSyncOptions): Promise<OaaSyncResult>;
5556
+ sync(input: OaaSyncInput<TUser, TGroup, TResource, TCustomer, TWorkload>, options?: OaaSyncOptions): Promise<OaaSyncResult>;
5557
+ /**
5558
+ * Resolved Ops-owned snapshot population for a principal kind. Apps may use this as an
5559
+ * enumeration optimization; the SDK enforces it independently.
5560
+ */
5561
+ population(kind: SubjectType): OaaPrincipalPopulation;
5458
5562
  /**
5459
5563
  * Synchronous readiness check. Returns true once OAA config (url, providerId,
5460
5564
  * datasourceId) is available from RemoteConfig/FrameworkConfig. Use this in request
@@ -6065,4 +6169,4 @@ type LfvErrorResponse = {
6065
6169
  };
6066
6170
  /** Generates a ULID */
6067
6171
  declare function generateULID(prefix?: string): string;
6068
- export { workloadTokenResponseSchema, workloadResourceSchema, 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, matchesListFilter, matchTenantPath, listGenerator, list, jwtAssertionClaimsSchema, isStoreConflictError, isEcid, isConfigSourceError, isConfigLocator, isCodeCatalog, infoLogger, idTokenClaimsSchema, groupResourceSchema, getCodeCatalogEntity, generateULID, formatEcid, deprecateRetiredCodeCatalogRows, defineSecretType, defineCatalog, defaultSecretContentType, defaultLogger, deepEqualPlain, decodeUser, debugLogger, customerResourceSchema, configTrustedClientGrants, claimsToUser, catalogEntityStore, buildTenantPath, assertValidSubjectTypeScoping, assertRequiredSubjectType, 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, ScimWorkload, User as ScimUser, ScimServiceProviderConfig, ScimSchemaDefinition, ScimSchemaAttributeDefinition, Role2 as ScimRole, ScimResult, ScimResourceTypeSchemaExtension, ScimResourceType, ScimMutationSummary, ScimListResponse, Group2 as ScimGroup, ScimError, ScimCustomer, 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, PrincipalInboundHandlerConfig, 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, KmsRevokeKeyResult, KmsRevokeKeyRequest, KmsPoolSlot, KmsPoolListener, KmsPoolIssuer, KmsPoolDocument, KmsPoolControlDocument, KmsPoolConfig, KmsPool, KmsParkResult, KmsParkRequest, KmsParkReport, KmsParkDisposition, KmsKeyState, KmsKey, KmsIssuerEventName, KmsIssuerEventListener, KmsIssuerEvent, KmsIssuedKey, KmsConfig, KmsAllocationStrategy, KmsAllocationPolicy, KmsAddKeysResult, KmsAddKeysRequest, Kms, JwtBearerWorkloadConfig, JWTAssertionClaims, IoniteValidators, IoniteUserExtension, IoniteErrorOptions, IoniteError, IoniteBase, Ionite, InferSecretType, InMemoryTenantStoreOptions, IdentityResolution, IdTokenClaims, IamPrincipalKindFlag, IamPrincipalKind, IamDeltaResourceType, IamDeltaReconcileResult, IamDeltaReconcileInput, IamDeltaMode, IamDeltaEmitter, IamAssignmentPolicy, ION_TENANT_MANAGE, ION_SDK_PERMISSIONS, ION_SCIM_WORKLOAD_SCHEMA, ION_SCIM_USER_EXTENSION_URN, ION_SCIM_CUSTOMER_SCHEMA, ION_IAM_WORKLOADS_WRITE, ION_IAM_USERS_WRITE, ION_IAM_READ, ION_IAM_GROUPS_WRITE, ION_IAM_CUSTOMERS_WRITE, ION_IAM_ACCESS_REQUESTS_WRITE, ION_ENDPOINT_PERMISSIONS, ION_CIAM_MAGIC_LINK_CREATE, ION_CAPABILITIEZ_READ, ION_AUTHZ_OAA_SYNC, ION_AUTHZ_GROUP_SCHEMA, IAMValidators, IAMUsersInbound, IAMPrincipalsInbound, IAMInboundUsersConfig, IAMInboundUserContext, IAMHandlerConfig, IAMGroupsOutbound, IAMGroupsInbound, IAMEndpointFlag, IAMDiscoveryHandlerConfig, IAMDiscoveryContext, IAMDiscoveryConfig, IAMConfigFromCode, IAMConfig, IAMAppValidators, IAMAppRegistry, IAMAccessRequestsConfig, 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, AssignmentPolicyError, ApplicationValidators, Address, AccessStatus, AccessRequestSubmit, AccessRequestResult, AccessRequestCreate, AccessRef, AccessProvenance, AccessMutationStatus, AccessMutationResult, AccessIndex, AccessCheckTarget, AccessCheckResult, AccessCheckReason, AccessChange, AccessCatalogStore, AccessAssignmentStore };
6172
+ export { AccessAssignmentStore, AccessCatalogStore, AccessChange, AccessCheckReason, AccessCheckResult, AccessCheckTarget, AccessIndex, AccessMutationResult, AccessMutationStatus, AccessProvenance, AccessRef, AccessRequestCreate, AccessRequestResult, AccessRequestSubmit, AccessStatus, Address, ApplicationValidators, AssignmentPolicyError, AuthenticatedPrincipal, AuthenticatedUser, Authz, AuthzConfig, AuthzDecision, AuthzEntityBase, AuthzOaaConfig, AuthzOaaPrincipalConfig, AuthzScimGroupExtension, AuthzScimGroupType, AwsConfigLocator, AwsSecretsConfig, AzureAuthMethod, AzureConfigLocator, AzureSecretsConfig, BaseCustomer, BaseTenant, BaseUser, BaseWorkloadIdentity, CANONICAL_RISK_LEVELS, CIAM, CIAMConfig, CIAMConfigFromCode, CIAMConfigFromCodeInput, CIAMProviderBranding, CIAMProviderColors, CIAMProviderConfig, CIAMProviderDescriptor, CIAMProviderType, CIAMValidators, CacheConfig, CachedWorkloadToken, CapabilitiezManifest, CapabilityEndpointUrls, CapabilityKey, CapabilityState, CatalogChange, CatalogChangeKind, CatalogChangeListener, CatalogEntityKind, ChangeListener, ClientCredentialsWorkloadConfig, CodeCatalog, CodeCatalogInput, CodeCatalogNamespace, ConfigApplyStatus, ConfigChangeCallback, ConfigChangeOptions, ConfigChangeResult, ConfigErrorKind, ConfigLocator, ConfigSource, ConfigSourceEnv, ConfigSourceError, ConfigSourceErrorInit, ConfigSourceResolver, ConfigSourceType, ConfigSubscriptionOptions, CreateGroupOptions, CreateTenantRequest, CreateUserOptions, Customer, CustomerStore, CustomerStoreOptions, DEFAULT_RISK_LEVEL, DEFAULT_SECRET_MIME_TYPES, DEFAULT_TENANT_API_NAMESPACE, DEFAULT_TENANT_UI_NAMESPACE, DestinationReference, DevSecretsConfig, ECID_SCHEME, EcidFormatError, EffectiveEdge, EgressChannelOutcome, EgressOutcome, Email, EndpointOperation, EndpointPermission, EnterpriseExtension, Entitlement, EntitlementType, EntityStore, EnvironmentType, FrameworkConfig, FrameworkConfigInput, FrameworkLfvConfig, FrameworkOtelConfig, FrameworkSecretsModuleConfig, FrameworkSecretsSourceConfig, FrameworkStores, FrameworkWorkloadConfig, FrameworkWorkloadConfigFromCode, FrameworkWorkloadIncomingOutgoing, GcpConfigLocator, GcpSecretsConfig, Group, GroupMember, GroupResource, GroupsInboundHandlerConfig, IAM, IAMAccessRequestsConfig, IAMAppRegistry, IAMAppValidators, IAMConfig, IAMConfigFromCode, IAMDiscoveryConfig, IAMDiscoveryContext, IAMDiscoveryHandlerConfig, IAMEndpointFlag, IAMGroupsInbound, IAMGroupsOutbound, IAMHandlerConfig, IAMInboundCustomersConfig, IAMInboundPrincipalContext, IAMInboundUserContext, IAMInboundUsersConfig, IAMInboundWorkloadsConfig, IAMPrincipalsInbound, IAMUsersInbound, IAMValidators, ION_AUTHZ_GROUP_SCHEMA, ION_AUTHZ_OAA_SYNC, ION_CAPABILITIEZ_READ, ION_CIAM_MAGIC_LINK_CREATE, ION_ENDPOINT_PERMISSIONS, ION_IAM_ACCESS_REQUESTS_WRITE, ION_IAM_CUSTOMERS_WRITE, ION_IAM_GROUPS_WRITE, ION_IAM_READ, ION_IAM_USERS_WRITE, ION_IAM_WORKLOADS_WRITE, ION_SCIM_CUSTOMER_SCHEMA, ION_SCIM_USER_EXTENSION_URN, ION_SCIM_WORKLOAD_SCHEMA, ION_SDK_PERMISSIONS, ION_TENANT_MANAGE, IamAssignmentPolicy, IamDeltaEmitter, IamDeltaMode, IamDeltaReconcileInput, IamDeltaReconcileResult, IamDeltaResourceType, IamPrincipalKind, IamPrincipalKindFlag, IdTokenClaims, IdentityResolution, InMemoryTenantStoreOptions, InferSecretType, Ionite, IoniteBase, IoniteError, IoniteErrorOptions, IoniteUserExtension, IoniteValidators, JWTAssertionClaims, JwtBearerWorkloadConfig, Kms, KmsAddKeysRequest, KmsAddKeysResult, KmsAllocationPolicy, KmsAllocationStrategy, KmsConfig, KmsIssuedKey, KmsIssuerEvent, KmsIssuerEventListener, KmsIssuerEventName, KmsKey, KmsKeyState, KmsParkDisposition, KmsParkReport, KmsParkRequest, KmsParkResult, KmsPool, KmsPoolConfig, KmsPoolControlDocument, KmsPoolDocument, KmsPoolIssuer, KmsPoolListener, KmsPoolSlot, KmsRevokeKeyRequest, KmsRevokeKeyResult, LfvActionAcceptedResponse, LfvActionName, LfvActionRequestBase, LfvCallbackEnvelope, LfvCallbackHeaders, LfvCallbackKind, LfvCallbackTransport, LfvEd25519PrivateJwk, LfvEd25519PublicJwk, LfvErrorCode, LfvErrorResponse, LfvJwks, LfvOtpRequest, LfvOtpResponse, ListFilter, ListOptions, ListResult, Logger, MagicLink, MagicLinkStore, MetaData, MirrorConfigLocator, ModifiableFrameworkConfig, ModuleName, ModuleReadiness, ModuleReadinessState, Name, OaaAccessChangeBatchItem, OaaAccessTargetType, OaaClient, OaaPrincipalPopulation, OaaSyncInput, OaaSyncOptions, OaaSyncResult, OidcCallbackParams, Otel, OtelAttributeValue, OtelAttributes, OtelConfig, OtelConsoleMode, OtelLevels, OtelLogLevel, OtelLogRecord, OtelMetricsSignalConfig, OtelOAuthClientCredentialsConfig, OtelProtocol, OtelProviderType, OtelSignalConfig, OtelSignalName, PLATFORM_ASSIGNABLE_SUBJECT_TYPES, ParsedEcid, Permission, PhoneNumber, Photo, PrincipalInboundHandlerConfig, ReactiveHandle, ReadinessReport, ReadyAccessCatalogEntry, ReadyzEndpointConfig, ReconcileReport, RegisterIAMAppError, RegisterIAMAppPayload, RegisterIAMAppResult, RegisterSSOAppError, RegisterSSOAppPayload, RegisterSSOAppResult, RemoteConfig, RemoteConfigLoadErrorKind, RemoteConfigRetryContext, RemoteConfigRetryHook, RemoteConfigRetryOptions, RequireReadyResult, ResolvedRoute, ResolvedVaultLfvSecretsConfig, Resource, ResourceChange, ResourceChangeListener, ResourceProvider, RiskLevel, Role, RouteFilterResult, RouteModule, RoutingOptions, SSO, SSOAppRegistry, SSOAppValidators, SSOConfig, SSOConfigFromCode, SSOHandlerConfig, SSOValidators, ScimAuthenticationScheme, ScimCustomer, ScimError, Group2 as ScimGroup, ScimListResponse, ScimMutationSummary, ScimResourceType, ScimResourceTypeSchemaExtension, ScimResult, Role2 as ScimRole, ScimSchemaAttributeDefinition, ScimSchemaDefinition, ScimServiceProviderConfig, User as ScimUser, ScimWorkload, Secret, SecretContentType, SecretContentTypeMismatchError, SecretEvent, SecretEventListener, SecretEventName, SecretFormat, SecretHandle, SecretLifecycleRequest, SecretRequestSeverity, SecretTypeDescriptor, SecretTypeInput, SecretTypeRegistryEntry, Secrets, SecretsModuleConfig, SecretsOperationOptions, SecretsSource, SecretsSourceConfig, SecretsSourceMap, SecretsSourceType, SecretsSubscriptionOptions, SecretsValidators, SecretsWriteOptions, ServerOnlyWorkloadConfig, Session, SessionStore, StandardSchemaWithValidate, StateCookie, StoreConflictError, StoreConflictKind, SubjectRef, SubjectScope, SubjectType, SubjectTypeScoping, SubscriptionMode, TenantIonCache, TenantPathMatch, TenantPathNamespace, TenantPathRoutingStrategy, TenantResponse, TenantRoutingStrategy, TenantStatus, TenantStore, TenantValidators, TenantWebhookPayload, TokenResponse, TokenValidationResult, TrustedIdp, TrustedProvisioningClient, UpdateTenantRequest, UserStore, UserStoreOptions, UsersInboundHandlerConfig, ValidateResult, VaultConfigLocator, VaultLfvSecretsConfig, VaultSecretsConfig, VaultWebSocketAuthHeader, VaultWebSocketSecretsConfig, VaultWorkloadAuthConfig, WorkforceUser, Workload, WorkloadClient, WorkloadConfig, WorkloadConfigMap, WorkloadGetToken, WorkloadIdentity, WorkloadIdentityStore, WorkloadIncomingOutgoing, WorkloadPrincipal, WorkloadTokenResponse, WorkloadTokenStore, WorkloadValidators, X509Certificate, accessRefId, accessRootId, assertEcid, assertRequiredSubjectType, assertValidSubjectTypeScoping, buildTenantPath, catalogEntityStore, claimsToUser, configTrustedClientGrants, customerResourceSchema, debugLogger, decodeUser, deepEqualPlain, defaultLogger, defaultSecretContentType, defineCatalog, defineSecretType, deprecateRetiredCodeCatalogRows, formatEcid, formatLogLine, generateULID, getCodeCatalogEntity, groupResourceSchema, idTokenClaimsSchema, infoLogger, isCodeCatalog, isConfigLocator, isConfigSourceError, isEcid, isStoreConflictError, jwtAssertionClaimsSchema, list, listGenerator, matchTenantPath, matchesListFilter, materializeCodeCatalogEntity, mergeCodeCatalogEntity, mergeConfig, must, normalizeTenantPathNamespace, normalizeTenantRoutingStrategy, oidcCallbackSchema, parseEcid, parseJsonc, parseKmsPoolControlDocument, parseKmsPoolDocument, prettyLogger, readyCatalogEntry, remoteConfigSecretType, serializeConfig, silentLogger, stableConfigHash, stripJsonComments, toCodeCatalog, tokenResponseSchema, trimTrailingSlash, trustedClientPermissionsForPrincipal, unionCatalogRead, userSchema, validationFailureResponse, version, waitOn, warnLogger, withValidate, workloadResourceSchema, workloadTokenResponseSchema };