@enterprisestandard/core 0.0.16 → 0.0.17-beta.20260501.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -39,7 +39,7 @@ declare const consoleLogger: Logger;
39
39
  /**
40
40
  * Result of a paginated list operation.
41
41
  *
42
- * @template T - Item type (e.g. StoredGroup, StoredUser, StoredTenant)
42
+ * @template T - Item type (e.g. StoredGroup, StoredUser, BaseTenant)
43
43
  */
44
44
  interface ListResult<T> {
45
45
  /** Total number of records matching (before pagination). */
@@ -642,7 +642,6 @@ interface GroupStore<TExtended = Record<string, never>> {
642
642
  removeMember(groupId: string, memberId: string): Promise<void>;
643
643
  }
644
644
  import { StandardSchemaV1 as StandardSchemaV16 } from "@standard-schema/spec";
645
- import { StandardSchemaV1 as StandardSchemaV13 } from "@standard-schema/spec";
646
645
  import { StandardSchemaV1 as StandardSchemaV12 } from "@standard-schema/spec";
647
646
  /**
648
647
  * OIDC Code Flow Callback URL Parameters
@@ -884,7 +883,7 @@ interface SessionStore<TExtended = object> {
884
883
  }
885
884
  /**
886
885
  * Base user with simple, developer-friendly attributes.
887
- * Extended by User (SSO) and EnterpriseUser (SCIM).
886
+ * Extended by WorkforceUser/Customer and EnterpriseUser (SCIM).
888
887
  */
889
888
  interface BaseUser {
890
889
  /**
@@ -914,10 +913,10 @@ interface BaseUser {
914
913
  userType?: string;
915
914
  }
916
915
  /**
917
- * Primary user type for SSO/OIDC applications.
918
- * Extends BaseUser with SSO-specific data.
916
+ * Workforce user type for SSO/OIDC and IAM-backed applications.
917
+ * Carries the SSO/OIDC context used by server helpers and user stores.
919
918
  */
920
- interface User2 extends BaseUser {
919
+ interface WorkforceUser extends BaseUser {
921
920
  /**
922
921
  * SSO/OIDC authentication data
923
922
  */
@@ -951,6 +950,93 @@ interface User2 extends BaseUser {
951
950
  expires: Date;
952
951
  };
953
952
  }
953
+ /**
954
+ * Customer user type for CIAM-backed applications.
955
+ */
956
+ interface Customer extends BaseUser {
957
+ ciam: {
958
+ /**
959
+ * ID token-like claims for CIAM sessions.
960
+ */
961
+ profile: IdTokenClaims;
962
+ /**
963
+ * OAuth scopes granted for this customer session.
964
+ */
965
+ scope?: string;
966
+ /**
967
+ * Token type (typically "Bearer").
968
+ */
969
+ tokenType: string;
970
+ /**
971
+ * Session expiration time.
972
+ */
973
+ expires: Date;
974
+ };
975
+ }
976
+ /**
977
+ * Union of currently authenticated user domains.
978
+ */
979
+ type AuthenticatedUser = WorkforceUser | Customer;
980
+ import { StandardSchemaV1 as StandardSchemaV13 } from "@standard-schema/spec";
981
+ /**
982
+ * Result type for Standard Schema validation (success or failure).
983
+ */
984
+ type ValidateResult<T> = StandardSchemaV13.Result<T>;
985
+ /**
986
+ * A Standard Schema with a top-level `validate()` method for a cleaner API.
987
+ * Use this so callers can call `schema.validate(value)` instead of `schema['~standard'].validate(value)`.
988
+ */
989
+ type StandardSchemaWithValidate<T> = StandardSchemaV13<unknown, T> & {
990
+ validate(value: unknown): Promise<StandardSchemaV13.Result<T>>;
991
+ };
992
+ /**
993
+ * Wraps a Standard Schema so it has a top-level `validate(value)` method.
994
+ * Use when creating or modifying validators so application code can call
995
+ * `validators.ciam.baseUser.validate(raw)` instead of `validators.ciam.baseUser['~standard'].validate(raw)`.
996
+ *
997
+ * @example
998
+ * const baseUser = withValidate(createBaseUserValidator());
999
+ * const result = await baseUser.validate(requestBody);
1000
+ */
1001
+ declare function withValidate<T>(schema: StandardSchemaV13<unknown, T>): StandardSchemaWithValidate<T>;
1002
+ declare function must<T>(value: T | undefined | null, message?: string): T;
1003
+ /**
1004
+ * Returns a 400 Response with the issues if there are any.
1005
+ * @param issues - Any validation issues.
1006
+ * @param message - The message to include in the response.
1007
+ * @returns A 400 Response with the issues if it does, otherwise null.
1008
+ */
1009
+ declare function validationFailureResponse(issues: unknown, message: string): Response;
1010
+ /**
1011
+ * Merges two config objects, ensuring critical fields from vault take precedence.
1012
+ *
1013
+ * @param fromVault - Configuration from vault (takes precedence for critical fields)
1014
+ * @param fromCode - Configuration from code (used as fallback)
1015
+ * @param criticalFields - Array of field names that should prefer vault values
1016
+ * @returns Merged configuration object
1017
+ */
1018
+ declare function mergeConfig<T extends Record<string, unknown>>(fromVault: T | undefined, fromCode: T | undefined, criticalFields?: string[]): T;
1019
+ /**
1020
+ * Strips // and /* *\/ comments from JSONC, respecting string literals.
1021
+ */
1022
+ declare function stripJsonComments(content: string): string;
1023
+ declare function parseJsonc<T>(content: string): T;
1024
+ /**
1025
+ * Deep equality for JSON-like values used in config snapshots.
1026
+ * Treats object key order as irrelevant and treats missing and `undefined`
1027
+ * object properties as equal by ignoring `undefined` keys on both sides.
1028
+ */
1029
+ declare function deepEqualPlain(a: unknown, b: unknown): boolean;
1030
+ /**
1031
+ * Waits for a HTTP service to be ready by polling its URL.
1032
+ * Connection errors (e.g. connection refused) are treated as "not ready" and retried.
1033
+ * @param url - The URL to poll.
1034
+ * @param pingInterval - The interval in milliseconds to poll the URL.
1035
+ * @param warnInterval - The interval in milliseconds to warn about the status. Set warnInterval to 0 to disable warnings.
1036
+ * @param timeout - The timeout in milliseconds to reject the promise.
1037
+ * @returns A promise that resolves when the service is ready.
1038
+ */
1039
+ declare function waitOn(url: string, test?: (resp: Response) => boolean | Promise<boolean>, pingInterval?: number, warnInterval?: number, timeout?: number): Promise<void>;
954
1040
  type SSOConfig<
955
1041
  TSessionData = Record<string, never>,
956
1042
  TUserData = Record<string, never>
@@ -1031,16 +1117,16 @@ type SSOHandlerConfig = {
1031
1117
  logoutBackChannelUrl?: string;
1032
1118
  };
1033
1119
  type SSOValidators = {
1034
- callbackParams: StandardSchemaV13<unknown, OidcCallbackParams>;
1035
- idTokenClaims: StandardSchemaV13<unknown, IdTokenClaims>;
1036
- tokenResponse: StandardSchemaV13<unknown, TokenResponse>;
1120
+ callbackParams: StandardSchemaWithValidate<OidcCallbackParams>;
1121
+ idTokenClaims: StandardSchemaWithValidate<IdTokenClaims>;
1122
+ tokenResponse: StandardSchemaWithValidate<TokenResponse>;
1037
1123
  };
1038
1124
  type SSO<
1039
1125
  TSessionData = Record<string, never>,
1040
1126
  TUserData = Record<string, never>
1041
1127
  > = SSOConfig<TSessionData, TUserData> & {
1042
- getUser: (request: Request) => Promise<User2 | undefined>;
1043
- getRequiredUser: (request: Request) => Promise<User2>;
1128
+ getUser: (request: Request) => Promise<WorkforceUser | undefined>;
1129
+ getRequiredUser: (request: Request) => Promise<WorkforceUser>;
1044
1130
  getJwt: (request: Request) => Promise<string | undefined>;
1045
1131
  initiateLogin: (config: LoginConfig, requestUrl?: string) => Promise<Response>;
1046
1132
  logout: (request: Request, config?: LoginConfig) => Promise<Response>;
@@ -1833,10 +1919,22 @@ type VaultWebSocketSecretsConfig = {
1833
1919
  /** Header name used to send the websocket token. Defaults to X-Vault-Token. */
1834
1920
  header?: VaultWebSocketAuthHeader;
1835
1921
  };
1922
+ type VaultWorkloadAuthConfig = {
1923
+ /** OAuth2 token endpoint used to mint workload access tokens for vault calls. */
1924
+ idpTokenUrl?: string;
1925
+ /** OAuth2 client id for this workload. */
1926
+ clientId?: string;
1927
+ /** OAuth2 client secret for this workload. */
1928
+ clientSecret?: string;
1929
+ /** Optional OAuth2 scope for the workload token request. */
1930
+ scope?: string;
1931
+ };
1836
1932
  type VaultSecretsConfig = {
1837
1933
  type: "vault";
1838
1934
  url?: string;
1839
1935
  token?: string;
1936
+ /** Optional workload identity used to authenticate vault HTTP and websocket requests. */
1937
+ workload?: VaultWorkloadAuthConfig;
1840
1938
  /** Optional LFV transport capability for reads/lifecycle operations. */
1841
1939
  lfv?: VaultLfvSecretsConfig;
1842
1940
  /** Optional websocket capability for vault commands and live subscriptions. */
@@ -1937,6 +2035,97 @@ type AzureSecretsConfig = {
1937
2035
  ttl?: number;
1938
2036
  };
1939
2037
  type ConfigSourceType = "vault" | "azure" | "aws" | "gcp";
2038
+ type ConfigSourceEnv = {
2039
+ ES_CONFIG_TYPE?: ConfigSourceType;
2040
+ ES_VAULT_URL?: string;
2041
+ ES_VAULT_TOKEN?: string;
2042
+ ES_VAULT_PATH?: string;
2043
+ ES_VAULT_TTL?: string;
2044
+ ES_VAULT_WORKLOAD_TOKEN_URL?: string;
2045
+ ES_VAULT_WORKLOAD_CLIENT_ID?: string;
2046
+ ES_VAULT_WORKLOAD_CLIENT_SECRET?: string;
2047
+ ES_VAULT_WORKLOAD_SCOPE?: string;
2048
+ ES_VAULT_LFV_SERVER_URL?: string;
2049
+ ES_VAULT_LFV_CLIENT_ID?: string;
2050
+ ES_VAULT_LFV_SIGNATURE?: string;
2051
+ ES_VAULT_LFV_DELIVERY_ENDPOINT?: string;
2052
+ ES_VAULT_LFV_VERIFY_PUBLIC_KEY?: string;
2053
+ ES_VAULT_LFV_EVENTS_ENDPOINT?: string;
2054
+ ES_VAULT_LFV_DELIVERY_TIMEOUT?: string;
2055
+ ES_VAULT_LFV_RETRY_INTERVAL?: string;
2056
+ ES_VAULT_LFV_WARN_INTERVAL?: string;
2057
+ ES_VAULT_WEBSOCKET_URL?: string;
2058
+ ES_VAULT_WEBSOCKET_TOKEN?: string;
2059
+ ES_VAULT_WEBSOCKET_HEADER?: "X-Vault-Token" | "Authorization";
2060
+ ES_AZURE_API_VERSION?: string;
2061
+ ES_AZURE_SCOPE?: string;
2062
+ ES_AZURE_SECRET_NAME_PREFIX?: string;
2063
+ ES_AZURE_AUTH_METHOD?: AwsAuthMethod;
2064
+ ES_AZURE_TENANT_ID?: string;
2065
+ ES_AZURE_CLIENT_ID?: string;
2066
+ ES_AZURE_CLIENT_SECRET?: string;
2067
+ ES_AZURE_FEDERATED_TOKEN_FILE?: string;
2068
+ ES_AZURE_MANAGED_IDENTITY_CLIENT_ID?: string;
2069
+ ES_AZURE_IMDS_API_VERSION?: string;
2070
+ ES_AZURE_PATH?: string;
2071
+ ES_AZURE_VAULT_URL?: string;
2072
+ ES_AZURE_VAULT_NAME?: string;
2073
+ ES_AZURE_TTL?: string;
2074
+ ES_AWS_WEBHOOK_URL?: string;
2075
+ ES_AWS_TTL?: string;
2076
+ ES_GCP_TTL?: string;
2077
+ };
2078
+ type VaultConfigLocator = {
2079
+ type: "vault";
2080
+ vaultUrl?: string;
2081
+ vaultToken?: string;
2082
+ vaultPath: string;
2083
+ vaultTtl?: number;
2084
+ vaultWorkloadTokenUrl?: string;
2085
+ vaultWorkloadClientId?: string;
2086
+ vaultWorkloadClientSecret?: string;
2087
+ vaultWorkloadScope?: string;
2088
+ vaultLfvServerUrl?: string;
2089
+ vaultLfvClientId?: string;
2090
+ vaultLfvSignature?: string;
2091
+ vaultLfvDeliveryEndpoint?: string;
2092
+ vaultLfvVerifyPublicKey?: string;
2093
+ vaultLfvEventsEndpoint?: string;
2094
+ vaultLfvPath?: string;
2095
+ vaultLfvDeliveryTimeout?: number;
2096
+ vaultLfvRetryInterval?: number;
2097
+ vaultLfvWarnInterval?: number;
2098
+ vaultWebsocketUrl?: string;
2099
+ vaultWebsocketToken?: string;
2100
+ vaultWebsocketHeader?: VaultWebSocketAuthHeader;
2101
+ };
2102
+ type AwsConfigLocator = {
2103
+ type: "aws";
2104
+ awsWebhookUrl: string;
2105
+ awsTtl?: number;
2106
+ };
2107
+ type AzureConfigLocator = {
2108
+ type: "azure";
2109
+ azureAuthMethod?: AwsAuthMethod;
2110
+ azureTenantId?: string;
2111
+ azureClientId?: string;
2112
+ azureClientSecret?: string;
2113
+ azureFederatedTokenFile?: string;
2114
+ azureManagedIdentityClientId?: string;
2115
+ azureImdsApiVersion?: string;
2116
+ azurePath?: string;
2117
+ azureVaultUrl?: string;
2118
+ azureVaultName?: string;
2119
+ azureApiVersion?: string;
2120
+ azureScope?: string;
2121
+ azureSecretNamePrefix?: string;
2122
+ azureTtl?: number;
2123
+ };
2124
+ type GcpConfigLocator = {
2125
+ type: "gcp";
2126
+ gcpTtl?: number;
2127
+ };
2128
+ type ConfigLocator = VaultConfigLocator | AwsConfigLocator | AzureConfigLocator | GcpConfigLocator;
1940
2129
  type ESValidators = {
1941
2130
  sso: SSOValidators;
1942
2131
  iam: IAMValidators;
@@ -2008,6 +2197,40 @@ type ESConfigChangeResult = {
2008
2197
  config?: RemoteConfig;
2009
2198
  frameworkConfig?: FrameworkConfig;
2010
2199
  };
2200
+ type RemoteConfigLoadErrorKind = "auth" | "connection" | "invalid_payload" | "invalid_status" | "not_found" | "timeout" | "unknown";
2201
+ type RemoteConfigRetryContext = {
2202
+ /** 1-based retry attempt count for the current unavailable period. */
2203
+ attempt: number;
2204
+ /** Original error thrown by the ConfigSource. */
2205
+ error: unknown;
2206
+ /** Best-effort error classification for logging and policy decisions. */
2207
+ errorKind: RemoteConfigLoadErrorKind;
2208
+ /** Human-readable single-line error detail. */
2209
+ message: string;
2210
+ /** Retry delay selected by the policy. */
2211
+ nextDelayMs: number;
2212
+ /** Maximum delay allowed by the policy. */
2213
+ maxDelayMs: number;
2214
+ /** Config source transport when known, such as "vault", "azure", or "aws". */
2215
+ sourceType?: ConfigSourceType | string;
2216
+ /** Config path when known. */
2217
+ path?: string;
2218
+ };
2219
+ type RemoteConfigRetryHook = (context: RemoteConfigRetryContext) => void | Promise<void>;
2220
+ type RemoteConfigRetryOptions = {
2221
+ /** Initial retry delay. Defaults to 2000ms. */
2222
+ initialDelayMs?: number;
2223
+ /** Maximum retry delay. Defaults to 600000ms. */
2224
+ maxDelayMs?: number;
2225
+ /** Exponential multiplier applied after each failed attempt. Defaults to 2. */
2226
+ multiplier?: number;
2227
+ /** Jitter ratio applied to retry delays. Defaults to 0.2. */
2228
+ jitterRatio?: number;
2229
+ /** Timeout for each ConfigSource load attempt. Defaults to 30000ms. */
2230
+ loadTimeoutMs?: number;
2231
+ /** Called before each retry is scheduled. Throw to stop retrying and reject ready(). */
2232
+ onRetry?: RemoteConfigRetryHook;
2233
+ };
2011
2234
  /** beforeChange callback invoked on every config application (initial load and updates). */
2012
2235
  type ESConfigChangeCallback = (config: RemoteConfig, frameworkConfig: ModifiableFrameworkConfig, oldConfig: RemoteConfig | undefined) => ESConfigChangeResult | void;
2013
2236
  type ConfigSource = {
@@ -2044,7 +2267,7 @@ type UpsertTenantRequestBase = {
2044
2267
  email?: string;
2045
2268
  webhookUrl?: string;
2046
2269
  callbackUrl?: string;
2047
- configSource: TenantSecretsConfig;
2270
+ configSource: ConfigLocator;
2048
2271
  };
2049
2272
  type UpsertTenantRequest<TExtended extends object = object> = UpsertTenantRequestBase & TExtended;
2050
2273
  type UpsertTenantResponse = {
@@ -2059,8 +2282,6 @@ type UpsertTenantResponse = {
2059
2282
  expiresAt: string;
2060
2283
  refs?: RefUrls[];
2061
2284
  };
2062
- type CreateTenantRequest = UpsertTenantRequest;
2063
- type CreateTenantResponse = UpsertTenantResponse;
2064
2285
  /**
2065
2286
  * The audience of the reference URL.
2066
2287
  * - 'human' for human-readable documentation such as user guides, documentation, etc.
@@ -2099,75 +2320,9 @@ type TenantValidators<
2099
2320
  > = {
2100
2321
  upsertTenantRequest: StandardSchemaV16<unknown, TUpsertTenantRequest>;
2101
2322
  upsertTenantResponse?: StandardSchemaV16<unknown, TUpsertTenantResponse>;
2102
- createTenantRequest?: StandardSchemaV16<unknown, TUpsertTenantRequest>;
2103
- createTenantResponse?: StandardSchemaV16<unknown, TUpsertTenantResponse>;
2104
- };
2105
- /**
2106
- * Env-like tenant config variables used to build a ConfigSource at runtime.
2107
- * These mirror the ES_* variables read by envConfig().
2108
- */
2109
- type TenantConfigEnv = {
2110
- ES_CONFIG_TYPE?: ConfigSourceType;
2111
- ES_VAULT_URL?: string;
2112
- ES_VAULT_TOKEN?: string;
2113
- ES_VAULT_PATH?: string;
2114
- ES_VAULT_TTL?: string;
2115
- ES_VAULT_LFV_SERVER_URL?: string;
2116
- ES_VAULT_LFV_CLIENT_ID?: string;
2117
- ES_VAULT_LFV_SIGNATURE?: string;
2118
- ES_VAULT_LFV_DELIVERY_ENDPOINT?: string;
2119
- ES_VAULT_LFV_VERIFY_PUBLIC_KEY?: string;
2120
- ES_VAULT_LFV_EVENTS_ENDPOINT?: string;
2121
- ES_VAULT_LFV_DELIVERY_TIMEOUT?: string;
2122
- ES_VAULT_LFV_RETRY_INTERVAL?: string;
2123
- ES_VAULT_LFV_WARN_INTERVAL?: string;
2124
- ES_VAULT_WEBSOCKET_URL?: string;
2125
- ES_VAULT_WEBSOCKET_TOKEN?: string;
2126
- ES_VAULT_WEBSOCKET_HEADER?: "X-Vault-Token" | "Authorization";
2127
- ES_AZURE_API_VERSION?: string;
2128
- ES_AZURE_SCOPE?: string;
2129
- ES_AZURE_SECRET_NAME_PREFIX?: string;
2130
- ES_AZURE_AUTH_METHOD?: AwsAuthMethod;
2131
- ES_AZURE_TENANT_ID?: string;
2132
- ES_AZURE_CLIENT_ID?: string;
2133
- ES_AZURE_CLIENT_SECRET?: string;
2134
- ES_AZURE_FEDERATED_TOKEN_FILE?: string;
2135
- ES_AZURE_MANAGED_IDENTITY_CLIENT_ID?: string;
2136
- ES_AZURE_IMDS_API_VERSION?: string;
2137
- ES_AZURE_VAULT_URL?: string;
2138
- ES_AZURE_VAULT_NAME?: string;
2139
- ES_AZURE_TTL?: string;
2140
- ES_AWS_WEBHOOK_URL?: string;
2141
- ES_AWS_TTL?: string;
2142
- ES_GCP_TTL?: string;
2143
2323
  };
2144
- type TenantSecretsConfig = (VaultSecretsConfig & {
2145
- path: string;
2146
- retryInterval?: number;
2147
- }) | (AwsSecretsConfig & {
2148
- ttl?: number;
2149
- }) | AzureSecretsConfig | (GcpSecretsConfig & {
2150
- ttl?: number;
2151
- });
2152
- type TenantStoredConfigLocator = {
2153
- /** Indicates that the tenant config descriptor is stored securely outside the tenant record. */
2154
- type: "stored";
2155
- /** Root secure source type used to fetch the stored tenant config descriptor. */
2156
- sourceType: "vault";
2157
- /** Path to the stored tenant config descriptor. */
2158
- path: string;
2159
- };
2160
- type TenantRemoteConfigLocator = {
2161
- /** Indicates that the tenant RemoteConfig already exists at this secure source path. */
2162
- type: "remoteConfig";
2163
- /** Secure source type used to load the RemoteConfig document directly. */
2164
- sourceType: "vault";
2165
- /** Path to the tenant RemoteConfig document. */
2166
- path: string;
2167
- };
2168
- type TenantConfigLocator = TenantStoredConfigLocator | TenantRemoteConfigLocator;
2169
- type TenantConfigSourceInput = TenantConfigLocator | ConfigSource;
2170
- type TenantBaseRecord = {
2324
+ declare function isConfigLocator(value: unknown): value is ConfigLocator;
2325
+ type BaseTenant = {
2171
2326
  tenantId: string;
2172
2327
  companyId: string;
2173
2328
  companyName: string;
@@ -2183,121 +2338,60 @@ type TenantBaseRecord = {
2183
2338
  expiresAt?: string;
2184
2339
  createdAt: Date;
2185
2340
  updatedAt: Date;
2186
- /** Persisted tenant config metadata, or a runtime ConfigSource for internal-only tenants. */
2187
- configSource: TenantConfigSourceInput;
2341
+ /** Serializable metadata used to materialize this tenant's ConfigSource. */
2342
+ configSource: ConfigLocator;
2188
2343
  /** Runtime helper that returns a ConfigSource for this tenant. */
2189
2344
  config?: (source?: SecretsSource) => ConfigSource;
2190
2345
  };
2191
- type TenantBaseConstraint = Omit<TenantBaseRecord, "configSource"> & {
2192
- configSource?: TenantConfigSourceInput;
2193
- };
2194
- type TenantRecordBase = TenantBaseConstraint;
2195
- type StoredTenant<TTenant extends TenantRecordBase = TenantRecordBase> = TTenant;
2196
- type StoredTenantRecord<TTenant extends TenantRecordBase = TenantRecordBase> = Omit<StoredTenant<TTenant>, "config">;
2197
- type TenantEsFactory<TTenant extends TenantRecordBase = TenantRecordBase> = (tenant: StoredTenant<TTenant>) => EnterpriseStandard;
2198
- type TenantConfigStoreRequest<
2199
- TTenant extends TenantRecordBase = TenantRecordBase,
2200
- TRequest extends UpsertTenantRequest = UpsertTenantRequest
2201
- > = {
2202
- es: EnterpriseStandard;
2203
- tenantId: string;
2204
- request: TRequest;
2205
- configData: TenantSecretsConfig;
2206
- existingTenant: StoredTenant<TTenant> | undefined;
2207
- };
2208
- type TenantStoreWithESOptions<TTenant extends TenantRecordBase = TenantRecordBase> = {
2209
- /**
2210
- * TTL for cached per-tenant EnterpriseStandard instances, in milliseconds.
2211
- * Default is forever; set to 0 to recreate ES on every getEs() call.
2212
- */
2213
- ttl?: number;
2214
- /**
2215
- * Optional factory used to create an ES instance for a tenant.
2216
- * If omitted, getEs() throws.
2217
- */
2218
- createEs?: TenantEsFactory<TTenant>;
2219
- };
2220
- type TenantUserRegistration = {
2221
- registerUserTenantId(userId: string, tenantId: string | null | undefined): void | Promise<void>;
2222
- registerUserToTenant?(userId: string, tenantId: string): void | Promise<void>;
2223
- };
2224
- declare abstract class TenantStore<TTenant extends TenantRecordBase = TenantRecordBase> implements TenantUserRegistration {
2225
- storeConfig?(config: TenantConfigStoreRequest<TTenant>): Promise<TenantConfigSourceInput>;
2226
- abstract get(tenantId: string): Promise<StoredTenant<TTenant> | undefined>;
2227
- abstract list(options?: TenantListOptions): Promise<ListResult<StoredTenant<TTenant>>>;
2228
- abstract upsert(tenant: StoredTenant<TTenant>): Promise<StoredTenant<TTenant>>;
2229
- abstract delete(tenantId: string): Promise<number>;
2230
- abstract registerUserTenantId(userId: string, tenantId: string | null | undefined): void | Promise<void>;
2231
- registerUserToTenant?(userId: string, tenantId: string): void | Promise<void>;
2232
- abstract findTenantsByUser(user: User2): Promise<StoredTenant<TTenant>[]>;
2233
- findTenantByUser(user: User2): Promise<StoredTenant<TTenant> | undefined>;
2234
- }
2235
- type TenantManagerStore<TTenant extends TenantRecordBase = TenantRecordBase> = Pick<TenantStoreWithES<TTenant>, "get" | "list" | "upsert" | "delete" | "getEs" | "findTenantByUser" | "findTenantsByUser"> & {
2236
- storeConfig?: TenantStoreWithES<TTenant>["storeConfig"];
2237
- };
2238
- type InMemoryTenantStoreOptions<TTenant extends TenantRecordBase = TenantRecordBase> = TenantStoreWithESOptions<TTenant>;
2239
- type TenantStoreWithRequiredEsOptions<TTenant extends TenantRecordBase = TenantRecordBase> = Omit<TenantStoreWithESOptions<TTenant>, "createEs"> & {
2240
- createEs: TenantEsFactory<TTenant>;
2241
- };
2242
- type SingleTenantStoreOptions<TTenant extends TenantRecordBase = TenantRecordBase> = TenantStoreWithRequiredEsOptions<TTenant>;
2243
- type MultiTenantStoreOptions<TTenant extends TenantRecordBase = TenantRecordBase> = TenantStoreWithRequiredEsOptions<TTenant>;
2244
- declare abstract class TenantStoreWithEsCache<TTenant extends TenantRecordBase = TenantRecordBase> extends TenantStore<TTenant> {
2245
- readonly ttl: number;
2246
- private readonly createEs?;
2247
- private readonly tenantEsMap;
2248
- constructor(options: TenantStoreWithESOptions<TTenant>);
2249
- registerUserTenantId(userId: string, tenantId: string | null | undefined): Promise<void>;
2250
- registerUserToTenant(_userId: string, _tenantId: string): Promise<void>;
2251
- protected prepareTenantForCreateEs(tenant: StoredTenant<TTenant>): StoredTenant<TTenant>;
2252
- protected invalidateTenantEsCache(tenantId: string): void;
2253
- getEs(tenantId: string): Promise<EnterpriseStandard | undefined>;
2254
- getCachedTenantIds(): string[];
2255
- }
2256
- declare abstract class SingleTenantStore<TTenant extends TenantRecordBase = TenantRecordBase> extends TenantStoreWithEsCache<TTenant> {
2257
- abstract findTenantByUser(user: User2): Promise<StoredTenant<TTenant> | undefined>;
2258
- findTenantsByUser(user: User2): Promise<StoredTenant<TTenant>[]>;
2259
- }
2260
- declare abstract class MultiTenantStore<TTenant extends TenantRecordBase = TenantRecordBase> extends TenantStoreWithEsCache<TTenant> {}
2261
- type TenantStoreWithES<TTenant extends TenantRecordBase = TenantRecordBase> = TenantStoreWithEsCache<TTenant>;
2262
- type InMemorySingleTenantStoreOptions<TTenant extends TenantRecordBase = TenantRecordBase> = InMemoryTenantStoreOptions<TTenant>;
2263
- type InMemoryMultiTenantStoreOptions<TTenant extends TenantRecordBase = TenantRecordBase> = InMemoryTenantStoreOptions<TTenant>;
2264
- declare class InMemorySingleTenantStore<TTenant extends TenantRecordBase = TenantRecordBase> extends SingleTenantStore<TTenant> {
2265
- private readonly store;
2266
- constructor(options?: InMemorySingleTenantStoreOptions<TTenant>);
2267
- get(tenantId: string): Promise<StoredTenant<TTenant> | undefined>;
2268
- list(options?: TenantListOptions): Promise<ListResult<StoredTenant<TTenant>>>;
2269
- upsert(tenant: StoredTenant<TTenant>): Promise<StoredTenant<TTenant>>;
2346
+ type SerializableTenant<TTenant extends BaseTenant = BaseTenant> = Omit<TTenant, "config">;
2347
+ type TenantEsFactory<TTenant extends BaseTenant = BaseTenant> = (tenant: TTenant) => EnterpriseStandard;
2348
+ interface TenantStore<
2349
+ TTenant extends BaseTenant = BaseTenant,
2350
+ TUser extends {
2351
+ id?: string;
2352
+ } = AuthenticatedUser
2353
+ > {
2354
+ get(tenantId: string): Promise<TTenant | undefined>;
2355
+ list(options?: TenantListOptions): Promise<ListResult<TTenant>>;
2356
+ upsert(tenant: TTenant): Promise<TTenant>;
2270
2357
  delete(tenantId: string): Promise<number>;
2358
+ getEs(tenantId: string): Promise<EnterpriseStandard | undefined>;
2359
+ findTenantsByUser(user: TUser): Promise<TTenant[]>;
2271
2360
  registerUserTenantId(userId: string, tenantId: string | null | undefined): Promise<void>;
2272
- findTenantByUser(user: User2): Promise<StoredTenant<TTenant> | undefined>;
2273
2361
  }
2274
- declare class InMemoryMultiTenantStore<TTenant extends TenantRecordBase = TenantRecordBase> extends MultiTenantStore<TTenant> {
2362
+ type InMemoryTenantStoreOptions<TTenant extends BaseTenant = BaseTenant> = {
2363
+ createEs?: TenantEsFactory<TTenant>;
2364
+ };
2365
+ declare function hydrateTenantForEs<TTenant extends BaseTenant = BaseTenant>(tenant: TTenant): TTenant;
2366
+ declare class InMemoryTenantStore<
2367
+ TTenant extends BaseTenant = BaseTenant,
2368
+ TUser extends {
2369
+ id?: string;
2370
+ } = AuthenticatedUser
2371
+ > implements TenantStore<TTenant, TUser> {
2275
2372
  private readonly store;
2276
- constructor(options?: InMemoryMultiTenantStoreOptions<TTenant>);
2277
- get(tenantId: string): Promise<StoredTenant<TTenant> | undefined>;
2278
- list(options?: TenantListOptions): Promise<ListResult<StoredTenant<TTenant>>>;
2279
- upsert(tenant: StoredTenant<TTenant>): Promise<StoredTenant<TTenant>>;
2373
+ private readonly createEs?;
2374
+ constructor(options?: InMemoryTenantStoreOptions<TTenant>);
2375
+ get(tenantId: string): Promise<TTenant | undefined>;
2376
+ list(options?: TenantListOptions): Promise<ListResult<TTenant>>;
2377
+ upsert(tenant: TTenant): Promise<TTenant>;
2280
2378
  delete(tenantId: string): Promise<number>;
2281
2379
  registerUserTenantId(userId: string, tenantId: string | null | undefined): Promise<void>;
2282
- findTenantsByUser(user: User2): Promise<StoredTenant<TTenant>[]>;
2380
+ findTenantsByUser(user: TUser): Promise<TTenant[]>;
2381
+ getEs(tenantId: string): Promise<EnterpriseStandard | undefined>;
2283
2382
  }
2284
2383
  declare function sendTenantWebhook(webhookUrl: string, payload: TenantWebhookPayload, log: Logger): Promise<void>;
2285
2384
  /**
2286
2385
  * Stored user data with required id and tracking metadata.
2287
2386
  *
2288
- * Extends the SSO User type with:
2289
- * - Required `id` (the `sub` claim from the IdP)
2387
+ * Extends the BaseUser type with:
2388
+ * - Optional auth envelopes for workforce (`sso`) and customer (`ciam`) sessions
2290
2389
  * - Timestamps for tracking when users were first seen and last updated
2291
2390
  * - Optional custom extended data
2292
2391
  *
2293
2392
  * @template TExtended - Type-safe custom data that consumers can add to users
2294
2393
  */
2295
- type StoredUser<TExtended = object> = Omit<User2, "sso"> & {
2296
- /**
2297
- * Required unique identifier (the `sub` claim from the IdP).
2298
- * This is the primary key for user storage.
2299
- */
2300
- id?: string;
2394
+ type StoredUser<TExtended = object> = BaseUser & {
2301
2395
  /**
2302
2396
  * Optional Enterprise Standard tenant identifier for tenant-aware apps.
2303
2397
  * Built-in user stores can use this when registering HRD mappings.
@@ -2427,7 +2521,11 @@ type StoredUser<TExtended = object> = Omit<User2, "sso"> & {
2427
2521
  * Optional SSO envelope for stores that persist full auth profile data.
2428
2522
  * Simple app stores MAY omit this field.
2429
2523
  */
2430
- sso?: User2["sso"];
2524
+ sso?: WorkforceUser["sso"];
2525
+ /**
2526
+ * Optional CIAM envelope for stores that persist customer session profile data.
2527
+ */
2528
+ ciam?: Customer["ciam"];
2431
2529
  } & TExtended;
2432
2530
  type UserStoreOptions = {
2433
2531
  tenantId: string;
@@ -2463,22 +2561,19 @@ type UserStoreOptions = {
2463
2561
  */
2464
2562
  interface UserStore<TExtended = object> {
2465
2563
  /**
2466
- * Retrieve a user by their subject identifier (sub).
2467
- *
2468
- * This is the canonical lookup used by SDK flows whenever possible.
2469
- * Other lookup methods (userName) are secondary convenience indexes.
2564
+ * Retrieve a user by their unique identifier.
2470
2565
  *
2471
- * @param sub - The user's unique identifier from the IdP
2566
+ * @param id - The user's unique identifier as defined by the store implementation
2472
2567
  * @returns The user if found, undefined otherwise
2473
2568
  */
2474
- get(sub: string): Promise<StoredUser<TExtended> | undefined>;
2569
+ get(id: string): Promise<StoredUser<TExtended> | undefined>;
2475
2570
  /**
2476
- * Retrieve a user by their username.
2571
+ * Retrieve a user based on their SCIM attributes or SSO JWT Claims.
2477
2572
  *
2478
- * @param userName - The user's username
2573
+ * @param user - The user to lookup by SCIM attributes or SSO JWT Claims
2479
2574
  * @returns The user if found, undefined otherwise
2480
2575
  */
2481
- getByUserName(userName: string): Promise<StoredUser<TExtended> | undefined>;
2576
+ lookup(user: StoredUser<TExtended>): Promise<StoredUser<TExtended> | undefined>;
2482
2577
  /**
2483
2578
  * Create or update a user in the store.
2484
2579
  *
@@ -2489,11 +2584,12 @@ interface UserStore<TExtended = object> {
2489
2584
  */
2490
2585
  upsert(user: StoredUser<TExtended>): Promise<StoredUser<TExtended>>;
2491
2586
  /**
2492
- * Delete a user by their subject identifier (sub).
2587
+ * Delete a user by their unique identifier.
2493
2588
  *
2494
- * @param sub - The user's unique identifier to delete
2589
+ * @param id - The user's unique identifier as defined by the store implementation
2590
+ * @returns The number of users deleted (0 or 1)
2495
2591
  */
2496
- delete(sub: string): Promise<number>;
2592
+ delete(id: string): Promise<number>;
2497
2593
  /**
2498
2594
  * List users in the store with optional pagination and sort.
2499
2595
  *
@@ -2901,6 +2997,10 @@ type EnterpriseStandardBase = {
2901
2997
  reload?(): Promise<void>;
2902
2998
  /** When present (e.g. from server enterpriseStandard), merge config then reload from the config source and reapply. */
2903
2999
  reconfigure?(config?: FrameworkConfig): Promise<void>;
3000
+ /** When present (e.g. from server enterpriseStandard), release config subscriptions and background resources. */
3001
+ close?(): void;
3002
+ /** When present (e.g. from server enterpriseStandard), replace runtime store instances. */
3003
+ setStores?(stores: FrameworkStores): void;
2904
3004
  };
2905
3005
  /** Config-driven module types: null in config → never; otherwise module type (non-optional). */
2906
3006
  type EnterpriseStandardStrict<C extends FrameworkConfig> = {
@@ -2918,6 +3018,8 @@ type EnterpriseStandardStrict<C extends FrameworkConfig> = {
2918
3018
  isReady(): boolean;
2919
3019
  reload?(): Promise<void>;
2920
3020
  reconfigure?(config?: FrameworkConfig): Promise<void>;
3021
+ close?(): void;
3022
+ setStores(stores: FrameworkStores): void;
2921
3023
  };
2922
3024
  type EnterpriseStandard = EnterpriseStandardBase;
2923
3025
  type ESRouteModule = "sso" | "iam" | "workload" | "ciam" | "secrets";
@@ -2958,6 +3060,14 @@ type ESConfigChangeOptions = {
2958
3060
  * Optional runtime routing customization for `es.handler(request)`.
2959
3061
  */
2960
3062
  routing?: ESRoutingOptions;
3063
+ /**
3064
+ * ConfigSource retry policy for loading RemoteConfig. The default retries forever with exponential backoff.
3065
+ */
3066
+ configRetry?: RemoteConfigRetryOptions;
3067
+ /**
3068
+ * Called before each RemoteConfig retry is scheduled. Throw to stop retrying and reject ready().
3069
+ */
3070
+ onConfigLoadError?: RemoteConfigRetryHook;
2961
3071
  };
2962
3072
  /**
2963
3073
  * Validators for CIAM (magic link) request bodies.
@@ -3068,8 +3178,8 @@ type CIAM<
3068
3178
  TMagicLinkData = Record<string, never>,
3069
3179
  TUserData = Record<string, never>
3070
3180
  > = CIAMConfig<TMagicLinkData, TUserData> & {
3071
- getUser: (request: Request) => Promise<User2 | undefined>;
3072
- getRequiredUser: (request: Request) => Promise<User2>;
3181
+ getUser: (request: Request) => Promise<Customer | undefined>;
3182
+ getRequiredUser: (request: Request) => Promise<Customer>;
3073
3183
  logout: (request: Request) => Promise<Response>;
3074
3184
  logoutBackChannel: (request: Request) => Promise<Response>;
3075
3185
  handler: (request: Request) => Promise<Response>;
@@ -3080,12 +3190,12 @@ type CIAMConfigFromCode<
3080
3190
  TUserData = Record<string, never>
3081
3191
  > = Omit<CIAMConfig<TMagicLinkData, TUserData>, "signingKey">;
3082
3192
  /**
3083
- * Maps OIDC ID token claims to the shared User type.
3193
+ * Maps OIDC ID token claims to the shared workforce user type.
3084
3194
  * Used by decodeUser and verifyUser; no config required (iss/exp from claims).
3085
3195
  */
3086
- declare function claimsToUser(claims: IdTokenClaims): User2;
3196
+ declare function claimsToUser(claims: IdTokenClaims): WorkforceUser;
3087
3197
  /**
3088
- * Decodes the JWT payload and returns a User.
3198
+ * Decodes the JWT payload and returns a workforce user.
3089
3199
  *
3090
3200
  * **This only decodes the payload.** It does not verify the signature, expiry, or
3091
3201
  * issuer. Do not use the result for authorization. Safe for client-side use for
@@ -3095,10 +3205,10 @@ declare function claimsToUser(claims: IdTokenClaims): User2;
3095
3205
  * `@enterprisestandard/core/server` or `@enterprisestandard/server`.
3096
3206
  *
3097
3207
  * @param jwt - Raw JWT string (e.g. OIDC ID token).
3098
- * @returns User shaped from the payload.
3208
+ * @returns WorkforceUser shaped from the payload.
3099
3209
  * @throws If the JWT format is invalid or the payload does not match ID token claims shape.
3100
3210
  */
3101
- declare function decodeUser(jwt: string): Promise<User2>;
3211
+ declare function decodeUser(jwt: string): Promise<WorkforceUser>;
3102
3212
  /**
3103
3213
  * List result from total count, sliced items, start index, and optional limit.
3104
3214
  * When limit is omitted, size is set to total (one logical page), page and pages are 1.
@@ -3107,7 +3217,7 @@ declare function list<T>(total: number, items: T[], start: number, limit: number
3107
3217
  type TenantDirectoryAccount = {
3108
3218
  clientId: string;
3109
3219
  active: boolean;
3110
- user: User2;
3220
+ user: AuthenticatedUser;
3111
3221
  valid: boolean;
3112
3222
  expiresAt?: string;
3113
3223
  tenantId?: string;
@@ -3445,64 +3555,4 @@ type LfvErrorResponse = {
3445
3555
  error: LfvErrorCode;
3446
3556
  message: string;
3447
3557
  };
3448
- import { StandardSchemaV1 as StandardSchemaV110 } from "@standard-schema/spec";
3449
- /**
3450
- * Result type for Standard Schema validation (success or failure).
3451
- */
3452
- type ValidateResult<T> = StandardSchemaV110.Result<T>;
3453
- /**
3454
- * A Standard Schema with a top-level `validate()` method for a cleaner API.
3455
- * Use this so callers can call `schema.validate(value)` instead of `schema['~standard'].validate(value)`.
3456
- */
3457
- type StandardSchemaWithValidate<T> = StandardSchemaV110<unknown, T> & {
3458
- validate(value: unknown): Promise<StandardSchemaV110.Result<T>>;
3459
- };
3460
- /**
3461
- * Wraps a Standard Schema so it has a top-level `validate(value)` method.
3462
- * Use when creating or modifying validators so application code can call
3463
- * `validators.ciam.baseUser.validate(raw)` instead of `validators.ciam.baseUser['~standard'].validate(raw)`.
3464
- *
3465
- * @example
3466
- * const baseUser = withValidate(createBaseUserValidator());
3467
- * const result = await baseUser.validate(requestBody);
3468
- */
3469
- declare function withValidate<T>(schema: StandardSchemaV110<unknown, T>): StandardSchemaWithValidate<T>;
3470
- declare function must<T>(value: T | undefined | null, message?: string): T;
3471
- /**
3472
- * Returns a 400 Response with the issues if there are any.
3473
- * @param issues - Any validation issues.
3474
- * @param message - The message to include in the response.
3475
- * @returns A 400 Response with the issues if it does, otherwise null.
3476
- */
3477
- declare function validationFailureResponse(issues: unknown, message: string): Response;
3478
- /**
3479
- * Merges two config objects, ensuring critical fields from vault take precedence.
3480
- *
3481
- * @param fromVault - Configuration from vault (takes precedence for critical fields)
3482
- * @param fromCode - Configuration from code (used as fallback)
3483
- * @param criticalFields - Array of field names that should prefer vault values
3484
- * @returns Merged configuration object
3485
- */
3486
- declare function mergeConfig<T extends Record<string, unknown>>(fromVault: T | undefined, fromCode: T | undefined, criticalFields?: string[]): T;
3487
- /**
3488
- * Strips // and /* *\/ comments from JSONC, respecting string literals.
3489
- */
3490
- declare function stripJsonComments(content: string): string;
3491
- declare function parseJsonc<T>(content: string): T;
3492
- /**
3493
- * Deep equality for JSON-like values used in config snapshots.
3494
- * Treats object key order as irrelevant and treats missing and `undefined`
3495
- * object properties as equal by ignoring `undefined` keys on both sides.
3496
- */
3497
- declare function deepEqualPlain(a: unknown, b: unknown): boolean;
3498
- /**
3499
- * Waits for a HTTP service to be ready by polling its URL.
3500
- * Connection errors (e.g. connection refused) are treated as "not ready" and retried.
3501
- * @param url - The URL to poll.
3502
- * @param pingInterval - The interval in milliseconds to poll the URL.
3503
- * @param warnInterval - The interval in milliseconds to warn about the status. Set warnInterval to 0 to disable warnings.
3504
- * @param timeout - The timeout in milliseconds to reject the promise.
3505
- * @returns A promise that resolves when the service is ready.
3506
- */
3507
- declare function waitOn(url: string, test?: (resp: Response) => boolean | Promise<boolean>, pingInterval?: number, warnInterval?: number, timeout?: number): Promise<void>;
3508
- export { workloadTokenResponseSchema, withValidate, waitOn, version, validationFailureResponse, userSchema, tokenResponseSchema, stripJsonComments, silentLogger, setActiveSession, serializeESConfig, sendTenantWebhook, parseJsonc, oidcCallbackSchema, normalizeTenantRoutingStrategy, normalizeTenantPathNamespace, must, mergeConfig, matchTenantPath, listSsoClientIdsFromCookies, list, jwtAssertionClaimsSchema, infoLogger, idTokenClaimsSchema, groupResourceSchema, getActiveSession, findTenantFromStateParam, defaultLogger, deepEqualPlain, decodeUser, debugLogger, consoleLogger, clearActiveSession, claimsToUser, buildTenantPath, X509Certificate, WorkloadValidators, WorkloadTokenStore, WorkloadTokenResponse, WorkloadIncomingOutgoing, WorkloadIdentity, WorkloadConfigMap, WorkloadConfig, WorkloadClient, Workload, VaultWebSocketSecretsConfig, VaultWebSocketAuthHeader, VaultSecretsConfig, VaultLfvSecretsConfig, ValidateResult, UsersInboundHandlerConfig, UserStoreOptions, UserStore, UserSortOptions, UserSortField, UserListOptions, User2 as User, UpsertTenantResponse, UpsertTenantRequest, TokenValidationResult, TokenResponse, TenantWebhookPayload, TenantValidators, TenantUserRegistration, TenantStoredConfigLocator, TenantStoreWithEsCache, TenantStoreWithESOptions, TenantStoreWithES, TenantStore, TenantStatus, TenantSortOptions, TenantSortField, TenantSecretsConfig, TenantRoutingStrategy, TenantRequestError, TenantRemoteConfigLocator, TenantPathRoutingStrategy, TenantPathNamespace, TenantPathMatch, TenantManagerStore, TenantListOptions, TenantJwtRoutingStrategy, TenantEsFactory, TenantDirectoryTenant, TenantDirectoryResponse, TenantDirectoryAccount, TenantConfigStoreRequest, TenantConfigSourceInput, TenantConfigLocator, TenantConfigEnv, StoredUser, StoredTenantRecord, StoredTenant, StoredGroup, StateCookie, StandardSchemaWithValidate, SortDirection, SingleTenantStoreOptions, SingleTenantStore, SessionStore, Session, ServerOnlyWorkloadConfig, SecretsValidators, SecretsSourceType, SecretsSourceMap, SecretsSourceConfig, SecretsSource, SecretsOperationOptions, SecretsModuleConfig, Secrets, SecretRequestSeverity, SecretLifecycleRequest, Secret, User as ScimUser, ScimServiceProviderConfig, ScimSchemaDefinition, ScimSchemaAttributeDefinition, ScimResult, ScimResourceTypeSchemaExtension, ScimResourceType, ScimListResponse, ScimError, ScimAuthenticationScheme, SSOValidators, SSOHandlerConfig, SSOConfig, SSOAppValidators, SSOAppRegistry, SSO, Role, ResolvedVaultLfvSecretsConfig, RemoteConfig, RegisterSSOAppResult, RegisterSSOAppPayload, RegisterSSOAppError, RegisterIAMAppResult, RegisterIAMAppPayload, RegisterIAMAppError, ReactiveHandle, Photo, PhoneNumber, OidcCallbackParams, Name, MultipleTenantsForUserError, MultiTenantStoreOptions, MultiTenantStore, ModifiableFrameworkConfig, MetaData, MagicLinkStore, MagicLink, LoginConfig, Logger, ListResult, LfvOtpResponse, LfvOtpRequest, LfvErrorResponse, LfvErrorCode, LfvActionRequestBase, LfvActionName, LfvActionAcceptedResponse, JwtBearerWorkloadConfig, JWTAssertionClaims, InMemoryTenantStoreOptions, InMemorySingleTenantStoreOptions, InMemorySingleTenantStore, InMemoryMultiTenantStoreOptions, InMemoryMultiTenantStore, IdTokenClaims, IAMValidators, IAMUsersInbound, IAMInboundUsersConfig, IAMInboundUserContext, IAMHandlerConfig, IAMGroupsOutbound, IAMGroupsInbound, IAMDiscoveryHandlerConfig, IAMDiscoveryContext, IAMDiscoveryConfig, IAMConfig, IAMAppValidators, IAMAppRole, IAMAppRegistry, IAM, GroupsInboundHandlerConfig, GroupStore, GroupSortOptions, GroupSortField, GroupResource, GroupMember, GroupListOptions, Group, GcpSecretsConfig, FrameworkWorkloadIncomingOutgoing, FrameworkWorkloadConfig, FrameworkStores, FrameworkSecretsSourceConfig, FrameworkSecretsModuleConfig, FrameworkConfig, EnvironmentType, EnterpriseUser, EnterpriseStandardFromConfig, EnterpriseStandardBase, EnterpriseStandard, EnterpriseExtension, Email, ESValidators, ESRoutingOptions, ESRouteModule, ESRouteFilterResult, ESResolvedRoute, ESModuleFromConfig, ESConfigChangeResult, ESConfigChangeOptions, ESConfigChangeCallback, ESConfig, DevSecretsConfig, DEFAULT_TENANT_UI_NAMESPACE, DEFAULT_TENANT_API_NAMESPACE, CreateUserOptions, CreateTenantResponse, CreateTenantRequest, CreateGroupOptions, ConfigSourceType, ConfigSource, ClientCredentialsWorkloadConfig, ChangeListener, CachedWorkloadToken, CIAMValidators, CIAMConfigFromCode, CIAMConfig, CIAM, BaseUser, AzureSecretsConfig, AwsSecretsConfig, AwsAuthMethod, ApplicationValidators, Address };
3558
+ export { workloadTokenResponseSchema, withValidate, waitOn, version, validationFailureResponse, userSchema, tokenResponseSchema, stripJsonComments, silentLogger, setActiveSession, serializeESConfig, sendTenantWebhook, parseJsonc, oidcCallbackSchema, normalizeTenantRoutingStrategy, normalizeTenantPathNamespace, must, mergeConfig, matchTenantPath, listSsoClientIdsFromCookies, list, jwtAssertionClaimsSchema, isConfigLocator, infoLogger, idTokenClaimsSchema, hydrateTenantForEs, groupResourceSchema, getActiveSession, findTenantFromStateParam, defaultLogger, deepEqualPlain, decodeUser, debugLogger, consoleLogger, clearActiveSession, claimsToUser, buildTenantPath, X509Certificate, WorkloadValidators, WorkloadTokenStore, WorkloadTokenResponse, WorkloadIncomingOutgoing, WorkloadIdentity, WorkloadConfigMap, WorkloadConfig, WorkloadClient, Workload, WorkforceUser, VaultWorkloadAuthConfig, VaultWebSocketSecretsConfig, VaultWebSocketAuthHeader, VaultSecretsConfig, VaultLfvSecretsConfig, VaultConfigLocator, ValidateResult, UsersInboundHandlerConfig, UserStoreOptions, UserStore, UserSortOptions, UserSortField, UserListOptions, UpsertTenantResponse, UpsertTenantRequest, TokenValidationResult, TokenResponse, TenantWebhookPayload, TenantValidators, TenantStore, TenantStatus, TenantSortOptions, TenantSortField, TenantRoutingStrategy, TenantRequestError, TenantPathRoutingStrategy, TenantPathNamespace, TenantPathMatch, TenantListOptions, TenantJwtRoutingStrategy, TenantEsFactory, TenantDirectoryTenant, TenantDirectoryResponse, TenantDirectoryAccount, StoredUser, StoredGroup, StateCookie, StandardSchemaWithValidate, SortDirection, SessionStore, Session, ServerOnlyWorkloadConfig, SerializableTenant, SecretsValidators, SecretsSourceType, SecretsSourceMap, SecretsSourceConfig, SecretsSource, SecretsOperationOptions, SecretsModuleConfig, Secrets, SecretRequestSeverity, SecretLifecycleRequest, Secret, User as ScimUser, ScimServiceProviderConfig, ScimSchemaDefinition, ScimSchemaAttributeDefinition, ScimResult, ScimResourceTypeSchemaExtension, ScimResourceType, ScimListResponse, ScimError, ScimAuthenticationScheme, SSOValidators, SSOHandlerConfig, SSOConfig, SSOAppValidators, SSOAppRegistry, SSO, Role, ResolvedVaultLfvSecretsConfig, RemoteConfigRetryOptions, RemoteConfigRetryHook, RemoteConfigRetryContext, RemoteConfigLoadErrorKind, RemoteConfig, RegisterSSOAppResult, RegisterSSOAppPayload, RegisterSSOAppError, RegisterIAMAppResult, RegisterIAMAppPayload, RegisterIAMAppError, ReactiveHandle, Photo, PhoneNumber, OidcCallbackParams, Name, MultipleTenantsForUserError, ModifiableFrameworkConfig, MetaData, MagicLinkStore, MagicLink, LoginConfig, Logger, ListResult, LfvOtpResponse, LfvOtpRequest, LfvErrorResponse, LfvErrorCode, LfvActionRequestBase, LfvActionName, LfvActionAcceptedResponse, JwtBearerWorkloadConfig, JWTAssertionClaims, InMemoryTenantStoreOptions, InMemoryTenantStore, IdTokenClaims, IAMValidators, IAMUsersInbound, IAMInboundUsersConfig, IAMInboundUserContext, IAMHandlerConfig, IAMGroupsOutbound, IAMGroupsInbound, IAMDiscoveryHandlerConfig, IAMDiscoveryContext, IAMDiscoveryConfig, IAMConfig, IAMAppValidators, IAMAppRole, IAMAppRegistry, IAM, GroupsInboundHandlerConfig, GroupStore, GroupSortOptions, GroupSortField, GroupResource, GroupMember, GroupListOptions, Group, GcpSecretsConfig, GcpConfigLocator, FrameworkWorkloadIncomingOutgoing, FrameworkWorkloadConfig, FrameworkStores, FrameworkSecretsSourceConfig, FrameworkSecretsModuleConfig, FrameworkConfig, EnvironmentType, EnterpriseUser, EnterpriseStandardFromConfig, EnterpriseStandardBase, EnterpriseStandard, EnterpriseExtension, Email, ESValidators, ESRoutingOptions, ESRouteModule, ESRouteFilterResult, ESResolvedRoute, ESModuleFromConfig, ESConfigChangeResult, ESConfigChangeOptions, ESConfigChangeCallback, ESConfig, DevSecretsConfig, DEFAULT_TENANT_UI_NAMESPACE, DEFAULT_TENANT_API_NAMESPACE, Customer, CreateUserOptions, CreateGroupOptions, ConfigSourceType, ConfigSourceEnv, ConfigSource, ConfigLocator, ClientCredentialsWorkloadConfig, ChangeListener, CachedWorkloadToken, CIAMValidators, CIAMConfigFromCode, CIAMConfig, CIAM, BaseUser, BaseTenant, AzureSecretsConfig, AzureConfigLocator, AwsSecretsConfig, AwsConfigLocator, AwsAuthMethod, AuthenticatedUser, ApplicationValidators, Address };