@ionite/server 0.0.24-beta.20260921.7 → 0.0.24-beta.20260922.10
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 +127 -129
- package/dist/index.js +4 -4
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,94 +1,4 @@
|
|
|
1
1
|
import { ConfigChangeCallback, ConfigSource as ConfigSource9, FrameworkConfigInput, FrameworkStores as FrameworkStores2, Ionite as Ionite6, ModifiableFrameworkConfig, RemoteConfig as RemoteConfig3, RemoteConfigRetryHook, RemoteConfigRetryOptions, RoutingOptions as RoutingOptions2 } from "@ionite/core";
|
|
2
|
-
import { ApplicationValidators, BaseTenant as BaseTenant2, CreateTenantRequest, Ionite as Ionite2, TenantStore as TenantStore2, TenantValidators, UpdateTenantRequest, Workload } from "@ionite/core";
|
|
3
|
-
import { CapabilityEndpointUrls, FrameworkStores } from "@ionite/core";
|
|
4
|
-
/**
|
|
5
|
-
* Deterministic set of ionite endpoint paths derived from a single `basePath`.
|
|
6
|
-
* These are the only URLs the SDK mounts; application code cannot customize individual paths
|
|
7
|
-
* (only `basePath`). Post-login/logout destinations are NOT here: they are decided by the appdev's
|
|
8
|
-
* `beforeLogin`/`afterLogin`/`beforeLogout`/`afterLogout` hooks (application UI routes), not ionite endpoints derivable from `basePath`.
|
|
9
|
-
*/
|
|
10
|
-
type UrlMap = CapabilityEndpointUrls;
|
|
11
|
-
/**
|
|
12
|
-
* Derive every ionite endpoint path from `basePath`. Single source of truth consumed
|
|
13
|
-
* by module construction, the router, the readiness endpoint, and tenant-manager responses.
|
|
14
|
-
*/
|
|
15
|
-
declare function deriveIonUrls(basePath: string): UrlMap;
|
|
16
|
-
/**
|
|
17
|
-
* Prototype-only in-memory store set — the explicit replacement for the silent defaults the SDK
|
|
18
|
-
* used to apply. Everything here lives in one process `Map`: sessions, users, customers, magic
|
|
19
|
-
* links, and cached workload tokens vanish on restart and are never shared across replicas.
|
|
20
|
-
*
|
|
21
|
-
* Anything beyond a prototype needs durability: `@ionite/redis` / `@ionite/ioredis` stores, or
|
|
22
|
-
* app-owned SQL stores. Authz stores (`catalogStore`, `accessStore`, `accessIndex`, `resources`)
|
|
23
|
-
* are intentionally NOT included — they gate IAM/authz capabilities and must be chosen
|
|
24
|
-
* deliberately (in-memory variants exist for prototypes: `InMemoryAccessCatalogStore`,
|
|
25
|
-
* `InMemoryAccessAssignmentStore`, `InMemoryAccessIndex`, `InMemoryResourceStore`).
|
|
26
|
-
*/
|
|
27
|
-
declare function devInMemoryStores(): FrameworkStores;
|
|
28
|
-
import { BaseTenant, ConfigLocator, Ionite, LfvCallbackKind, Logger, RemoteConfig as RemoteConfig2, Secret, SecretsSource, TenantStore } from "@ionite/core";
|
|
29
|
-
type TenantMirrorHooks<TTenant extends BaseTenant = BaseTenant> = {
|
|
30
|
-
onRemoteConfigChange?(tenant: TTenant, config: RemoteConfig2, secret: Secret<Record<string, unknown>>): void | Promise<void>;
|
|
31
|
-
onRemoteConfigRevoke?(tenant: TTenant): void | Promise<void>;
|
|
32
|
-
};
|
|
33
|
-
type TenantMirrorOptions<TTenant extends BaseTenant = BaseTenant> = {
|
|
34
|
-
store: TenantStore<TTenant>;
|
|
35
|
-
/** App-owned durable mirror destination. */
|
|
36
|
-
to: SecretsSource;
|
|
37
|
-
/** Resolve a unique destination path for each tenant. */
|
|
38
|
-
path: (tenant: TTenant) => string;
|
|
39
|
-
hooks?: TenantMirrorHooks<TTenant>;
|
|
40
|
-
/** Overrides the root ion logger for tenant mirror operations. */
|
|
41
|
-
logger?: Logger;
|
|
42
|
-
/** Optional source factory for non-LFV locators. */
|
|
43
|
-
sourceFromLocator?: (locator: ConfigLocator, tenant: TTenant) => SecretsSource;
|
|
44
|
-
};
|
|
45
|
-
type TenantMirror = {
|
|
46
|
-
/**
|
|
47
|
-
* Blocks until the first mirror for this tenant lands. With no timeout it waits indefinitely;
|
|
48
|
-
* pass `timeout > 0` to reject after that many milliseconds.
|
|
49
|
-
*/
|
|
50
|
-
ensure(tenantId: string, timeout?: number): Promise<void>;
|
|
51
|
-
handleCallback(tenantId: string, kind: LfvCallbackKind, request: Request): Promise<Response>;
|
|
52
|
-
purge(tenantId: string): Promise<void>;
|
|
53
|
-
close(): Promise<void>;
|
|
54
|
-
};
|
|
55
|
-
/**
|
|
56
|
-
* Maintains per-tenant RemoteConfig mirrors. Tenant records own the upstream locators; app code owns
|
|
57
|
-
* the destination source and path mapping.
|
|
58
|
-
*/
|
|
59
|
-
declare function tenantMirror<TTenant extends BaseTenant = BaseTenant>(ion: Ionite, options: TenantMirrorOptions<TTenant>): TenantMirror;
|
|
60
|
-
type TenantManagerOptions<
|
|
61
|
-
TCreateTenantRequest extends CreateTenantRequest = CreateTenantRequest,
|
|
62
|
-
TUpdateTenantRequest extends UpdateTenantRequest = UpdateTenantRequest,
|
|
63
|
-
TTenant extends BaseTenant2 = BaseTenant2
|
|
64
|
-
> = {
|
|
65
|
-
validators: ApplicationValidators<TenantValidators<TCreateTenantRequest, TUpdateTenantRequest>>;
|
|
66
|
-
basePath: string;
|
|
67
|
-
store: TenantStore2<TTenant>;
|
|
68
|
-
mirror?: Pick<TenantMirror, "purge">;
|
|
69
|
-
workloadAuth?: Workload;
|
|
70
|
-
/**
|
|
71
|
-
* Resolve the ionite `basePath` for a given tenant (e.g. `/api/${tenant.id}/ionite`).
|
|
72
|
-
* When provided, tenant responses include the derived absolute SSO `callbackUrl` and full `ionUrls`
|
|
73
|
-
* so the ECI/ConfigSource can register the matching callback path at the IdP. ionite endpoint URLs are
|
|
74
|
-
* deterministic from this basePath; they are not configurable per-URL.
|
|
75
|
-
*/
|
|
76
|
-
tenantIonBasePath?: (tenant: TTenant) => string | undefined;
|
|
77
|
-
};
|
|
78
|
-
/** Absolute ionite URL set for a tenant, derived from its basePath and request origin. */
|
|
79
|
-
type TenantIonUrls = {
|
|
80
|
-
callbackUrl: string;
|
|
81
|
-
ionUrls: UrlMap;
|
|
82
|
-
};
|
|
83
|
-
type TenantManager<TTenant extends BaseTenant2 = BaseTenant2> = {
|
|
84
|
-
handler(request: Request): Promise<Response>;
|
|
85
|
-
getTenant(id: string): Promise<TTenant | undefined>;
|
|
86
|
-
};
|
|
87
|
-
declare function tenantManager<
|
|
88
|
-
TCreateTenantRequest extends CreateTenantRequest = CreateTenantRequest,
|
|
89
|
-
TUpdateTenantRequest extends UpdateTenantRequest = UpdateTenantRequest,
|
|
90
|
-
TTenant extends BaseTenant2 = BaseTenant2
|
|
91
|
-
>(ion: Ionite2, options: TenantManagerOptions<TCreateTenantRequest, TUpdateTenantRequest, TTenant>): TenantManager<TTenant>;
|
|
92
2
|
import { CapabilityKey as CapabilityKey2 } from "@ionite/core";
|
|
93
3
|
export * from "@ionite/core";
|
|
94
4
|
import { AccessCheckReason, AccessCheckResult, AssignmentPolicyError, CreateTenantRequest as CreateTenantRequest2, EnvironmentType, FrameworkOtelConfig, FrameworkStores as FrameworkStores3, generateULID, IamAssignmentPolicy, IoniteError, IoniteErrorOptions, listGenerator, Otel, OtelConfig, OtelLevels, OtelLogLevel, OtelLogRecord, OtelMetricsSignalConfig, OtelOAuthClientCredentialsConfig, OtelProviderType, OtelSignalConfig, SubjectScope, SubjectType as SubjectType3, TenantResponse, TenantStatus, TenantValidators as TenantValidators2, TenantWebhookPayload, UpdateTenantRequest as UpdateTenantRequest2 } from "@ionite/core";
|
|
@@ -199,9 +109,34 @@ declare class InMemoryAccessIndex implements AccessIndex {
|
|
|
199
109
|
private dropEdge;
|
|
200
110
|
private removeFromSet;
|
|
201
111
|
}
|
|
202
|
-
import {
|
|
112
|
+
import { CapabilityEndpointUrls, FrameworkStores } from "@ionite/core";
|
|
113
|
+
/**
|
|
114
|
+
* Deterministic set of ionite endpoint paths derived from a single `basePath`.
|
|
115
|
+
* These are the only URLs the SDK mounts; application code cannot customize individual paths
|
|
116
|
+
* (only `basePath`). Post-login/logout destinations are NOT here: they are decided by the appdev's
|
|
117
|
+
* `beforeLogin`/`afterLogin`/`beforeLogout`/`afterLogout` hooks (application UI routes), not ionite endpoints derivable from `basePath`.
|
|
118
|
+
*/
|
|
119
|
+
type UrlMap = CapabilityEndpointUrls;
|
|
120
|
+
/**
|
|
121
|
+
* Derive every ionite endpoint path from `basePath`. Single source of truth consumed
|
|
122
|
+
* by module construction, the router, the readiness endpoint, and tenant-manager responses.
|
|
123
|
+
*/
|
|
124
|
+
declare function deriveIonUrls(basePath: string): UrlMap;
|
|
125
|
+
/**
|
|
126
|
+
* Prototype-only in-memory store set — the explicit replacement for the silent defaults the SDK
|
|
127
|
+
* used to apply. Everything here lives in one process `Map`: sessions, users, customers, magic
|
|
128
|
+
* links, and cached workload tokens vanish on restart and are never shared across replicas.
|
|
129
|
+
*
|
|
130
|
+
* Anything beyond a prototype needs durability: `@ionite/redis` / `@ionite/ioredis` stores, or
|
|
131
|
+
* app-owned SQL stores. Authz stores (`catalogStore`, `accessStore`, `accessIndex`, `resources`)
|
|
132
|
+
* are intentionally NOT included — they gate IAM/authz capabilities and must be chosen
|
|
133
|
+
* deliberately (in-memory variants exist for prototypes: `InMemoryAccessCatalogStore`,
|
|
134
|
+
* `InMemoryAccessAssignmentStore`, `InMemoryAccessIndex`, `InMemoryResourceStore`).
|
|
135
|
+
*/
|
|
136
|
+
declare function devInMemoryStores(): FrameworkStores;
|
|
137
|
+
import { AwsSecretsConfig, ConfigSource, SecretsSource } from "@ionite/core";
|
|
203
138
|
type AwsConfigSourceOptions = Omit<AwsSecretsConfig, "type"> & {
|
|
204
|
-
vault?:
|
|
139
|
+
vault?: SecretsSource;
|
|
205
140
|
ttl?: number;
|
|
206
141
|
};
|
|
207
142
|
/**
|
|
@@ -212,9 +147,9 @@ type AwsConfigSourceOptions = Omit<AwsSecretsConfig, "type"> & {
|
|
|
212
147
|
* then throwing at first config access.
|
|
213
148
|
*/
|
|
214
149
|
declare function awsConfig(_config: AwsConfigSourceOptions): ConfigSource;
|
|
215
|
-
import { AzureSecretsConfig, ConfigSource as ConfigSource2, SecretsSource as
|
|
150
|
+
import { AzureSecretsConfig, ConfigSource as ConfigSource2, SecretsSource as SecretsSource2 } from "@ionite/core";
|
|
216
151
|
type AzureConfigSourceOptions = Omit<AzureSecretsConfig, "type"> & {
|
|
217
|
-
vault?:
|
|
152
|
+
vault?: SecretsSource2;
|
|
218
153
|
path?: string;
|
|
219
154
|
};
|
|
220
155
|
/**
|
|
@@ -223,7 +158,7 @@ type AzureConfigSourceOptions = Omit<AzureSecretsConfig, "type"> & {
|
|
|
223
158
|
* If ttl is set, the vault is polled every ttl milliseconds (minimum 10 minutes) and onConfig is called when config changes.
|
|
224
159
|
*/
|
|
225
160
|
declare function azureConfig(config: AzureConfigSourceOptions): ConfigSource2;
|
|
226
|
-
import { ConfigLocator
|
|
161
|
+
import { ConfigLocator, ConfigSource as ConfigSource3, SecretsSource as SecretsSource3 } from "@ionite/core";
|
|
227
162
|
/**
|
|
228
163
|
* Materialize a runtime {@link ConfigSource} from a full, self-contained {@link ConfigLocator}. This
|
|
229
164
|
* is the ROOT/bootstrap path (env vars via `envConfig()`, or a bootstrap secret via
|
|
@@ -231,7 +166,7 @@ import { ConfigLocator as ConfigLocator2, ConfigSource as ConfigSource3, Secrets
|
|
|
231
166
|
* fresh source. To reuse a source already connected on an Ionite instance, see
|
|
232
167
|
* {@link configFromSource}.
|
|
233
168
|
*/
|
|
234
|
-
declare function configSourceFromLocator(locator:
|
|
169
|
+
declare function configSourceFromLocator(locator: ConfigLocator): ConfigSource3;
|
|
235
170
|
/** Optional knobs for {@link configFromSource}. */
|
|
236
171
|
type ConfigFromSourceOptions = {
|
|
237
172
|
/** Polling interval fallback when the source has no native subscription support. */
|
|
@@ -251,13 +186,13 @@ type ConfigFromSourceOptions = {
|
|
|
251
186
|
* MUST resolve to a distinct backing path — two tenants sharing a path would cross-load each
|
|
252
187
|
* other's RemoteConfig.
|
|
253
188
|
*/
|
|
254
|
-
declare function configFromSource(source:
|
|
255
|
-
import { ConfigLocator as
|
|
189
|
+
declare function configFromSource(source: SecretsSource3, path: string, options?: ConfigFromSourceOptions): ConfigSource3;
|
|
190
|
+
import { ConfigLocator as ConfigLocator2, ConfigSource as ConfigSource4, ConfigSourceEnv, ConfigSourceType } from "@ionite/core";
|
|
256
191
|
type EnvConfigOptions = {
|
|
257
192
|
/** Override config source type (default: ION_CONFIG_TYPE from env). */
|
|
258
193
|
type?: ConfigSourceType;
|
|
259
194
|
};
|
|
260
|
-
declare function configLocatorFromEnvValues(env: Partial<ConfigSourceEnv>, options?: EnvConfigOptions):
|
|
195
|
+
declare function configLocatorFromEnvValues(env: Partial<ConfigSourceEnv>, options?: EnvConfigOptions): ConfigLocator2;
|
|
261
196
|
/**
|
|
262
197
|
* Creates a ConfigSource from environment variables.
|
|
263
198
|
* Reads ION_CONFIG_TYPE to choose the source.
|
|
@@ -265,9 +200,9 @@ declare function configLocatorFromEnvValues(env: Partial<ConfigSourceEnv>, optio
|
|
|
265
200
|
*/
|
|
266
201
|
declare function configSourceFromEnvValues(env: Partial<ConfigSourceEnv>, options?: EnvConfigOptions): ConfigSource4;
|
|
267
202
|
declare function envConfig(options?: EnvConfigOptions): ConfigSource4;
|
|
268
|
-
import { ConfigSource as ConfigSource5, GcpSecretsConfig, SecretsSource as
|
|
203
|
+
import { ConfigSource as ConfigSource5, GcpSecretsConfig, SecretsSource as SecretsSource4 } from "@ionite/core";
|
|
269
204
|
type GcpConfigSourceOptions = Omit<GcpSecretsConfig, "type"> & {
|
|
270
|
-
vault?:
|
|
205
|
+
vault?: SecretsSource4;
|
|
271
206
|
ttl?: number;
|
|
272
207
|
};
|
|
273
208
|
/**
|
|
@@ -278,17 +213,17 @@ type GcpConfigSourceOptions = Omit<GcpSecretsConfig, "type"> & {
|
|
|
278
213
|
* then throwing at first config access.
|
|
279
214
|
*/
|
|
280
215
|
declare function gcpConfig(_config: GcpConfigSourceOptions): ConfigSource5;
|
|
281
|
-
import { ConfigLocator as
|
|
282
|
-
import { Logger
|
|
216
|
+
import { ConfigLocator as ConfigLocator3, ConfigSource as ConfigSource6, LfvCallbackKind, Logger as Logger2, SecretsSource as SecretsSource6 } from "@ionite/core";
|
|
217
|
+
import { Logger, Secret, SecretEvent, SecretsSource as SecretsSource5, SecretsSubscriptionOptions } from "@ionite/core";
|
|
283
218
|
type MirrorSecretsOptions = {
|
|
284
|
-
from:
|
|
285
|
-
to:
|
|
219
|
+
from: SecretsSource5;
|
|
220
|
+
to: SecretsSource5;
|
|
286
221
|
paths: readonly string[];
|
|
287
222
|
mapPath: (path: string) => string;
|
|
288
223
|
/** Optional admission check. Rejected values are ignored without changing the current mirror. */
|
|
289
|
-
accept?: (secret:
|
|
224
|
+
accept?: (secret: Secret<Record<string, unknown>>, sourcePath: string) => boolean;
|
|
290
225
|
subscription?: SecretsSubscriptionOptions;
|
|
291
|
-
logger?:
|
|
226
|
+
logger?: Logger;
|
|
292
227
|
/** Receives every source lifecycle event after the mirror schedules its required state change. */
|
|
293
228
|
onEvent?: (event: SecretEvent) => void;
|
|
294
229
|
};
|
|
@@ -307,15 +242,15 @@ type SecretsMirror = {
|
|
|
307
242
|
*/
|
|
308
243
|
declare function mirrorSecrets(options: MirrorSecretsOptions): SecretsMirror;
|
|
309
244
|
type MirroredConfigOptions = {
|
|
310
|
-
from:
|
|
245
|
+
from: ConfigLocator3 | SecretsSource6;
|
|
311
246
|
fromPath?: string;
|
|
312
|
-
to:
|
|
247
|
+
to: ConfigLocator3 | SecretsSource6;
|
|
313
248
|
path: string;
|
|
314
|
-
logger?:
|
|
249
|
+
logger?: Logger2;
|
|
315
250
|
ttl?: number;
|
|
316
251
|
};
|
|
317
252
|
type MirroredConfigSource = ConfigSource6 & {
|
|
318
|
-
handleCallback(kind:
|
|
253
|
+
handleCallback(kind: LfvCallbackKind, request: Request): Promise<Response>;
|
|
319
254
|
mirror: SecretsMirror;
|
|
320
255
|
};
|
|
321
256
|
/**
|
|
@@ -323,7 +258,7 @@ type MirroredConfigSource = ConfigSource6 & {
|
|
|
323
258
|
* ConfigSource which reads only that durable mirror.
|
|
324
259
|
*/
|
|
325
260
|
declare function mirroredConfig(options: MirroredConfigOptions): MirroredConfigSource;
|
|
326
|
-
import { ConfigSource as ConfigSource7, SecretsSource as
|
|
261
|
+
import { ConfigSource as ConfigSource7, SecretsSource as SecretsSource7 } from "@ionite/core";
|
|
327
262
|
/**
|
|
328
263
|
* Creates a ConfigSource from a SecretsSource path that stores a ConfigLocator.
|
|
329
264
|
* The returned source rebinds subscriptions when the bootstrap secret changes.
|
|
@@ -334,10 +269,10 @@ import { ConfigSource as ConfigSource7, SecretsSource as SecretsSource8 } from "
|
|
|
334
269
|
* bootstrap actually changes, the superseded inner source is disposed (its `secret.close()` is
|
|
335
270
|
* invoked) before the new one is built, so config churn cannot leak duplicate connections.
|
|
336
271
|
*/
|
|
337
|
-
declare function secretConfigSource(source:
|
|
338
|
-
import { ConfigSource as ConfigSource8, SecretsSource as
|
|
272
|
+
declare function secretConfigSource(source: SecretsSource7, path: string): ConfigSource7;
|
|
273
|
+
import { ConfigSource as ConfigSource8, SecretsSource as SecretsSource8, VaultSecretsConfig } from "@ionite/core";
|
|
339
274
|
type VaultConfigSourceOptions = Omit<VaultSecretsConfig, "type"> & {
|
|
340
|
-
vault?:
|
|
275
|
+
vault?: SecretsSource8;
|
|
341
276
|
path?: string;
|
|
342
277
|
};
|
|
343
278
|
declare class VaultConfigWaitingForSecretError extends Error {
|
|
@@ -384,7 +319,7 @@ declare class InMemoryCustomerStore<TExtended = Record<string, never>> implement
|
|
|
384
319
|
delete(id: string): Promise<number>;
|
|
385
320
|
list(options?: ListOptions3): Promise<ListResult3<BaseCustomer<TExtended>>>;
|
|
386
321
|
}
|
|
387
|
-
import { AccessAssignmentStore as AccessAssignmentStore2, AccessCatalogStore as AccessCatalogStore2, BaseCustomer as BaseCustomer2, BaseUser as BaseUser2, BaseWorkloadIdentity, CodeCatalog, CustomerStore as CustomerStore2, IamDeltaEmitter, IamDeltaMode, Logger as
|
|
322
|
+
import { AccessAssignmentStore as AccessAssignmentStore2, AccessCatalogStore as AccessCatalogStore2, BaseCustomer as BaseCustomer2, BaseUser as BaseUser2, BaseWorkloadIdentity, CodeCatalog, CustomerStore as CustomerStore2, IamDeltaEmitter, IamDeltaMode, Logger as Logger3, ScimCustomer, ScimUser, ScimWorkload, UserStore, Workload, WorkloadIdentityStore } from "@ionite/core";
|
|
388
323
|
type FetchLike = (input: string, init?: RequestInit) => Promise<Response>;
|
|
389
324
|
/** RemoteConfig-derived destination descriptor for IAM delta egress. */
|
|
390
325
|
type IamDeltaConfig = {
|
|
@@ -398,7 +333,7 @@ type IamDeltaConfig = {
|
|
|
398
333
|
};
|
|
399
334
|
/** Runtime capabilities the emitter binds to (resolved from the merged config/stores in buildES). */
|
|
400
335
|
type IamDeltaDeps = {
|
|
401
|
-
workload?:
|
|
336
|
+
workload?: Workload;
|
|
402
337
|
workloadIdentityStore?: WorkloadIdentityStore;
|
|
403
338
|
userStore?: UserStore;
|
|
404
339
|
customerStore?: CustomerStore2;
|
|
@@ -425,7 +360,7 @@ type IamDeltaDeps = {
|
|
|
425
360
|
* authenticated with the outgoing workload client, which the destination treats as the verified
|
|
426
361
|
* origin. See the README "IAM delta egress" section.
|
|
427
362
|
*/
|
|
428
|
-
declare function createManagedIamDelta(log:
|
|
363
|
+
declare function createManagedIamDelta(log: Logger3): {
|
|
429
364
|
update(config: IamDeltaConfig, deps: IamDeltaDeps): IamDeltaEmitter;
|
|
430
365
|
handle(): IamDeltaEmitter;
|
|
431
366
|
};
|
|
@@ -521,6 +456,12 @@ declare const ION_CAPABILITY_CATALOG: readonly [{
|
|
|
521
456
|
readonly label: "Authz OAA projection (Veza)";
|
|
522
457
|
readonly requires: "AccessAssignmentStore + AccessCatalogStore";
|
|
523
458
|
readonly incapableReason: "OAA projection is configured by RemoteConfig but no access/catalog store capability is wired by the application.";
|
|
459
|
+
}, {
|
|
460
|
+
readonly key: "tm.integration";
|
|
461
|
+
readonly module: "tm";
|
|
462
|
+
readonly label: "Tenant Management staged integration and consent";
|
|
463
|
+
readonly requires: "TenantStore integration methods + onConnectRequest";
|
|
464
|
+
readonly incapableReason: "TM integration requires setIntegration/getByIntegrationHandleHash and an App-owned consent hook.";
|
|
524
465
|
}];
|
|
525
466
|
import { BaseCustomer as BaseCustomer3, MagicLink, MagicLinkStore } from "@ionite/core";
|
|
526
467
|
/**
|
|
@@ -533,7 +474,7 @@ declare class InMemoryMagicLinkStore<TExtended = Record<string, never>> implemen
|
|
|
533
474
|
getAndDelete(token: string): Promise<MagicLink<TExtended> | null>;
|
|
534
475
|
delete(token: string): Promise<void>;
|
|
535
476
|
}
|
|
536
|
-
import { Ionite
|
|
477
|
+
import { Ionite, ResolvedRoute, RoutingOptions } from "@ionite/core";
|
|
537
478
|
/**
|
|
538
479
|
* Deny-by-default authorization gate for a resolved SDK route. Returns the 401/403 `Response` to
|
|
539
480
|
* short-circuit with when the caller is not authorized, or `undefined` to proceed. Enforcement reuses
|
|
@@ -541,14 +482,14 @@ import { Ionite as Ionite3, ResolvedRoute, RoutingOptions } from "@ionite/core";
|
|
|
541
482
|
* `RemoteConfig.authz.scopesAsEntitlements` is enabled) satisfies the gate; the `response()` already
|
|
542
483
|
* logs the denial server-side without leaking the missing permission to the caller.
|
|
543
484
|
*/
|
|
544
|
-
declare function enforceEndpointAuthz(request: Request, ion:
|
|
485
|
+
declare function enforceEndpointAuthz(request: Request, ion: Ionite, required: NonNullable<ResolvedRoute["requiredPermission"]>): Promise<Response | undefined>;
|
|
545
486
|
/**
|
|
546
487
|
* Resolve the default route for a request using the deterministic, basePath-derived endpoint paths.
|
|
547
488
|
* Endpoint URLs are no longer read from per-module config; they are computed from `basePath`.
|
|
548
489
|
*/
|
|
549
|
-
declare function resolveDefaultRoute(request: Request, ion:
|
|
550
|
-
declare function routeRequest(request: Request, ion:
|
|
551
|
-
import { DestinationReference, GroupResource, IamDeltaResourceType, Logger as
|
|
490
|
+
declare function resolveDefaultRoute(request: Request, ion: Ionite, urls: UrlMap, pathname?: string): ResolvedRoute | undefined;
|
|
491
|
+
declare function routeRequest(request: Request, ion: Ionite, routing?: RoutingOptions, urls?: UrlMap): Promise<Response>;
|
|
492
|
+
import { DestinationReference, GroupResource, IamDeltaResourceType, Logger as Logger4, ScimUser as ScimUser2 } from "@ionite/core";
|
|
552
493
|
type FetchLike2 = (input: string, init?: RequestInit) => Promise<Response>;
|
|
553
494
|
/**
|
|
554
495
|
* Outcome of an outbound IAM delta operation:
|
|
@@ -606,7 +547,7 @@ type ScimOutboundClientOptions = {
|
|
|
606
547
|
getToken: () => Promise<string>;
|
|
607
548
|
/** Reads and writes destination receipts on the source User/AccessCatalogStore rows. */
|
|
608
549
|
receipts: ScimOutboundReceiptCallbacks;
|
|
609
|
-
log:
|
|
550
|
+
log: Logger4;
|
|
610
551
|
/** Injectable fetch (defaults to global fetch); enables testing against a mock SCIM server. */
|
|
611
552
|
fetchImpl?: FetchLike2;
|
|
612
553
|
};
|
|
@@ -681,10 +622,10 @@ declare class ScimOutboundClient {
|
|
|
681
622
|
patchGroupMembership(args: ScimGroupMembershipPatch): Promise<ScimOutboundOutcome>;
|
|
682
623
|
private patchGroupMembershipNow;
|
|
683
624
|
}
|
|
684
|
-
import { LfvCallbackTransport, Secret as
|
|
685
|
-
type LfvSecretsSource =
|
|
625
|
+
import { LfvCallbackTransport, Secret as Secret2, SecretsSource as SecretsSource9, VaultLfvSecretsConfig } from "@ionite/core";
|
|
626
|
+
type LfvSecretsSource = SecretsSource9 & {
|
|
686
627
|
/** Register for callback-delivered values without issuing an initial read request. */
|
|
687
|
-
subscribePassive<T>(path: string, onChange: (fullSecret:
|
|
628
|
+
subscribePassive<T>(path: string, onChange: (fullSecret: Secret2<T>) => void): Promise<() => void>;
|
|
688
629
|
isDeliveryRequest(request: Request): boolean;
|
|
689
630
|
isEventsRequest(request: Request): boolean;
|
|
690
631
|
handleDelivery(request: Request): Promise<Response>;
|
|
@@ -751,6 +692,63 @@ declare class InMemorySessionStore<TExtended = Record<string, never>> implements
|
|
|
751
692
|
update(sid: string, data: Partial<Session<TExtended>>): Promise<void>;
|
|
752
693
|
delete(sid: string): Promise<void>;
|
|
753
694
|
}
|
|
695
|
+
import { BaseTenant as BaseTenant2, CreateTenantRequest, FrameworkTmConfig, TenantValidators, UpdateTenantRequest, Workload as Workload2 } from "@ionite/core";
|
|
696
|
+
import { BaseTenant, ConfigLocator as ConfigLocator4, Ionite as Ionite2, LfvCallbackKind as LfvCallbackKind2, Logger as Logger5, RemoteConfig as RemoteConfig2, Secret as Secret3, SecretsSource as SecretsSource10, TenantStore } from "@ionite/core";
|
|
697
|
+
type TenantMirrorHooks<TTenant extends BaseTenant = BaseTenant> = {
|
|
698
|
+
onRemoteConfigChange?(tenant: TTenant, config: RemoteConfig2, secret: Secret3<Record<string, unknown>>): void | Promise<void>;
|
|
699
|
+
onRemoteConfigRevoke?(tenant: TTenant): void | Promise<void>;
|
|
700
|
+
};
|
|
701
|
+
type TenantMirrorOptions<TTenant extends BaseTenant = BaseTenant> = {
|
|
702
|
+
store: TenantStore<TTenant>;
|
|
703
|
+
/** App-owned durable mirror destination. */
|
|
704
|
+
to: SecretsSource10;
|
|
705
|
+
/** Resolve a unique destination path for each tenant. */
|
|
706
|
+
path: (tenant: TTenant) => string;
|
|
707
|
+
hooks?: TenantMirrorHooks<TTenant>;
|
|
708
|
+
/** Overrides the root ion logger for tenant mirror operations. */
|
|
709
|
+
logger?: Logger5;
|
|
710
|
+
/** Optional source factory for non-LFV locators. */
|
|
711
|
+
sourceFromLocator?: (locator: ConfigLocator4, tenant: TTenant) => SecretsSource10;
|
|
712
|
+
};
|
|
713
|
+
type TenantMirror = {
|
|
714
|
+
/**
|
|
715
|
+
* Blocks until the first mirror for this tenant lands. With no timeout it waits indefinitely;
|
|
716
|
+
* pass `timeout > 0` to reject after that many milliseconds.
|
|
717
|
+
*/
|
|
718
|
+
ensure(tenantId: string, timeout?: number): Promise<void>;
|
|
719
|
+
handleCallback(tenantId: string, kind: LfvCallbackKind2, request: Request): Promise<Response>;
|
|
720
|
+
purge(tenantId: string): Promise<void>;
|
|
721
|
+
close(): Promise<void>;
|
|
722
|
+
};
|
|
723
|
+
/**
|
|
724
|
+
* Maintains per-tenant RemoteConfig mirrors. Tenant records own the upstream locators; app code owns
|
|
725
|
+
* the destination source and path mapping.
|
|
726
|
+
*/
|
|
727
|
+
declare function tenantMirror<TTenant extends BaseTenant = BaseTenant>(ion: Ionite2, options: TenantMirrorOptions<TTenant>): TenantMirror;
|
|
728
|
+
type TenantManagerOptions<
|
|
729
|
+
TCreateTenantRequest extends CreateTenantRequest = CreateTenantRequest,
|
|
730
|
+
TUpdateTenantRequest extends UpdateTenantRequest = UpdateTenantRequest,
|
|
731
|
+
TTenant extends BaseTenant2 = BaseTenant2
|
|
732
|
+
> = Omit<FrameworkTmConfig<TTenant>, "validators" | "mirror"> & {
|
|
733
|
+
validators: {
|
|
734
|
+
tenant: TenantValidators<TCreateTenantRequest, TUpdateTenantRequest>;
|
|
735
|
+
};
|
|
736
|
+
mirror?: Pick<TenantMirror, "purge">;
|
|
737
|
+
workloadAuth?: Workload2;
|
|
738
|
+
/**
|
|
739
|
+
* Resolve the ionite `basePath` for a given tenant (e.g. `/api/${tenant.id}/ionite`).
|
|
740
|
+
* When provided, tenant responses include the derived absolute SSO `callbackUrl` and full `ionUrls`
|
|
741
|
+
* so the ECI/ConfigSource can register the matching callback path at the IdP. ionite endpoint URLs are
|
|
742
|
+
* deterministic from this basePath; they are not configurable per-URL.
|
|
743
|
+
*/
|
|
744
|
+
tenantIonBasePath?: (tenant: TTenant) => string | undefined;
|
|
745
|
+
};
|
|
746
|
+
/** Absolute ionite URL set for a tenant, derived from its basePath and request origin. */
|
|
747
|
+
type TenantIonUrls = {
|
|
748
|
+
callbackUrl: string;
|
|
749
|
+
ionUrls: UrlMap;
|
|
750
|
+
};
|
|
751
|
+
declare function hashIntegrationHandle(handle: string): Promise<string>;
|
|
754
752
|
import { Ionite as Ionite4, TenantPathNamespace, TenantRoutingStrategy } from "@ionite/core";
|
|
755
753
|
type MaybePromise<T> = Promise<T> | T;
|
|
756
754
|
type TenantResolutionContext = {
|
|
@@ -855,7 +853,7 @@ declare function closeAllVaultSockets(): void;
|
|
|
855
853
|
*
|
|
856
854
|
* Keep this synchronized with packages/server/package.json via publish.ts.
|
|
857
855
|
*/
|
|
858
|
-
declare const ION_SDK_VERSION = "0.0.24-beta.
|
|
856
|
+
declare const ION_SDK_VERSION = "0.0.24-beta.20260922.10";
|
|
859
857
|
import { Workload as CoreWorkload, FrameworkWorkloadConfig, Ionite as Ionite5, JWTAssertionClaims, Logger as Logger7, TokenValidationResult, TrustedIdp, WorkloadConfigMap, WorkloadGetToken, WorkloadIdentityStore as WorkloadIdentityStore2, WorkloadIncomingOutgoing, WorkloadTokenResponse, WorkloadTokenStore } from "@ionite/core";
|
|
860
858
|
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
861
859
|
/**
|
|
@@ -1175,4 +1173,4 @@ type IoniteConfig<C extends FrameworkConfigInput = FrameworkConfigInput> = C & {
|
|
|
1175
1173
|
onConfigLoadError?: RemoteConfigRetryHook;
|
|
1176
1174
|
};
|
|
1177
1175
|
declare function ionite<const C extends FrameworkConfigInput = FrameworkConfigInput>(source: ConfigSource9, config: IoniteConfig<C> | FrameworkConfigInput): Ionite6;
|
|
1178
|
-
export { AccessCheckReason, AccessCheckResult, AfterLoginContext, AfterLoginHook, AfterLogoutContext, AfterLogoutHook, AssignmentPolicyError, AwsConfigSourceOptions, AzureConfigSourceOptions, BeforeLoginContext, BeforeLoginHook, BeforeLogoutContext, BeforeLogoutHook, CapabilityDescriptor, CapabilityKey2 as CapabilityKey, CatalogAdjacencyCache, CatalogView, ConfigFromSourceOptions, CreateTenantIonHandlerOptions, CreateTenantIonResolverOptions, CreateTenantRequest2 as CreateTenantRequest, EnvConfigOptions, EnvironmentType, FrameworkOtelConfig, FrameworkStores3 as FrameworkStores, GcpConfigSourceOptions, HttpPollingHooks, ION_CAPABILITY_CATALOG, ION_CAPABILITY_CATALOG_VERSION, ION_READY_DEFAULT_TIMEOUT_MS, ION_SDK_VERSION, IamAssignmentPolicy, IamDeltaConfig, IamDeltaDeps, InMemoryAccessAssignmentStore, InMemoryAccessCatalogStore, InMemoryAccessIndex, InMemoryCustomerStore, InMemoryMagicLinkStore, InMemoryResourceStore, InMemorySessionStore, InMemoryTenantStore, InMemoryUserStore, InMemoryWorkloadIdentityStore, InMemoryWorkloadTokenStore, IoniteConfig, IoniteError, IoniteErrorOptions, LfvSecretsSource, MirrorSecretsOptions, MirroredConfigOptions, MirroredConfigSource, Otel, OtelConfig, OtelLevels, OtelLogLevel, OtelLogRecord, OtelMetricsSignalConfig, OtelOAuthClientCredentialsConfig, OtelProviderType, OtelSignalConfig, ReconcileStores, RedirectContext, RedirectPolicy, RedirectResult, RedirectRule, RedirectRuleContext, RedirectVerdict, ReferencedDefinitions, ResolveTenantFromRequestOptions, ScimOutboundClient, ScimOutboundClientOptions, ScimOutboundOutcome, ScimOutboundReceiptCallbacks, ScimOutboundResource, SecretsMirror, SessionDiscoveryOptions, SessionReadCacheOptions, SessionResponse, SubjectScope, SubjectType3 as SubjectType, TenantIonResolver, TenantIonUrls,
|
|
1176
|
+
export { AccessCheckReason, AccessCheckResult, AfterLoginContext, AfterLoginHook, AfterLogoutContext, AfterLogoutHook, AssignmentPolicyError, AwsConfigSourceOptions, AzureConfigSourceOptions, BeforeLoginContext, BeforeLoginHook, BeforeLogoutContext, BeforeLogoutHook, CapabilityDescriptor, CapabilityKey2 as CapabilityKey, CatalogAdjacencyCache, CatalogView, ConfigFromSourceOptions, CreateTenantIonHandlerOptions, CreateTenantIonResolverOptions, CreateTenantRequest2 as CreateTenantRequest, EnvConfigOptions, EnvironmentType, FrameworkOtelConfig, FrameworkStores3 as FrameworkStores, GcpConfigSourceOptions, HttpPollingHooks, ION_CAPABILITY_CATALOG, ION_CAPABILITY_CATALOG_VERSION, ION_READY_DEFAULT_TIMEOUT_MS, ION_SDK_VERSION, IamAssignmentPolicy, IamDeltaConfig, IamDeltaDeps, InMemoryAccessAssignmentStore, InMemoryAccessCatalogStore, InMemoryAccessIndex, InMemoryCustomerStore, InMemoryMagicLinkStore, InMemoryResourceStore, InMemorySessionStore, InMemoryTenantStore, InMemoryUserStore, InMemoryWorkloadIdentityStore, InMemoryWorkloadTokenStore, IoniteConfig, IoniteError, IoniteErrorOptions, LfvSecretsSource, MirrorSecretsOptions, MirroredConfigOptions, MirroredConfigSource, Otel, OtelConfig, OtelLevels, OtelLogLevel, OtelLogRecord, OtelMetricsSignalConfig, OtelOAuthClientCredentialsConfig, OtelProviderType, OtelSignalConfig, ReconcileStores, RedirectContext, RedirectPolicy, RedirectResult, RedirectRule, RedirectRuleContext, RedirectVerdict, ReferencedDefinitions, ResolveTenantFromRequestOptions, ScimOutboundClient, ScimOutboundClientOptions, ScimOutboundOutcome, ScimOutboundReceiptCallbacks, ScimOutboundResource, SecretsMirror, SessionDiscoveryOptions, SessionReadCacheOptions, SessionResponse, SubjectScope, SubjectType3 as SubjectType, TenantIonResolver, TenantIonUrls, TenantManagerOptions, TenantMirror, TenantMirrorHooks, TenantMirrorOptions, TenantResolutionContext, TenantResponse, TenantStatus, TenantValidators2 as TenantValidators, TenantWebhookPayload, UpdateTenantRequest2 as UpdateTenantRequest, UrlMap, VAULT_MIN_POLLING_TTL_MS, VaultConfigInvalidPayloadError, VaultConfigSourceOptions, VaultConfigWaitingForSecretError, VaultSubscribeNotSupportedError, VerifyUserOptions, allowHosts, allowOrigins, allowRelativePaths, allowSameOrigin, awsConfig, azureConfig, blockDangerousUrls, callback, captureRedirect, ciam, closeAllVaultSockets, collectReferencedDefinitions, configFromSource, configLocatorFromEnvValues, configSourceFromEnvValues, configSourceFromLocator, createManagedIamDelta, createSessionReadCache, createTenantIonHandler, createTenantIonResolver, defaultRedirectPolicies, deriveIonUrls, devInMemoryStores, discoverSessionRecords, discoverSessions, enforceEndpointAuthz, envConfig, escapeScimFilterValue, expandRoot, gcpConfig, generateULID, getCustomer, getUser, getWorkload, getWorkloadToken, has, hasAll2 as hasAll, hasAllScope, hasAny2 as hasAny, hasAnyScope, hasGroup2 as hasGroup, hasPermission2 as hasPermission, hasRole2 as hasRole, hasScope, hashIntegrationHandle, iam, initiateLogin, ionite, isRedirectAllowed, isVaultConfigInvalidPayloadError, isVaultConfigWaitingForSecretError, lfvVault, listGenerator, listSsoClientIdsFromCookies, mirrorSecrets, mirroredConfig, reconcileSubjectAccess, resolveAfterRedirect, resolveCapturedRedirect, resolveDefaultRoute, resolveRedirect, resolveTenantFromRequest, revokeWorkloadToken, rewriteRequestForDefaultTenantApi, rewriteRequestForDefaultTenantUi, rewriteRequestForTenantPath, rewriteRequestPath, routeRequest, sameOriginRedirectRules, secretConfigSource, sendTenantWebhook, setVaultWebSocketCommandTimeout, sso, subscribeSecretPathWithHttpPolling, tenantMirror, validateWorkloadToken, vault, vaultConfig, vaultSocketDiagnostics, verifyUser, withSetCookies, workload, workloadHandler };
|