@authyon/server 0.2.0-beta.23 → 0.2.0-beta.24
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/{authorization-BLENxur8.d.cts → authorization-B-kQhcBm.d.cts} +1 -1
- package/dist/{authorization-Clf0Jx-U.d.ts → authorization-CxBweecR.d.ts} +1 -1
- package/dist/{authyonServerClient-CW46xIRD.d.cts → authyonServerClient-zNSLRCwj.d.cts} +42 -1
- package/dist/{authyonServerClient-CW46xIRD.d.ts → authyonServerClient-zNSLRCwj.d.ts} +42 -1
- package/dist/bff.d.cts +1 -1
- package/dist/bff.d.ts +1 -1
- package/dist/index.cjs +43 -3
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +43 -3
- package/dist/next.d.cts +2 -2
- package/dist/next.d.ts +2 -2
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { J as JwksTokenVerifier, A as AuthyonServerClient } from './authyonServerClient-
|
|
1
|
+
import { J as JwksTokenVerifier, A as AuthyonServerClient } from './authyonServerClient-zNSLRCwj.cjs';
|
|
2
2
|
|
|
3
3
|
type AbilitySubject = string | Record<string, unknown>;
|
|
4
4
|
type AbilityConditions = Record<string, unknown>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { J as JwksTokenVerifier, A as AuthyonServerClient } from './authyonServerClient-
|
|
1
|
+
import { J as JwksTokenVerifier, A as AuthyonServerClient } from './authyonServerClient-zNSLRCwj.js';
|
|
2
2
|
|
|
3
3
|
type AbilitySubject = string | Record<string, unknown>;
|
|
4
4
|
type AbilityConditions = Record<string, unknown>;
|
|
@@ -262,6 +262,8 @@ interface TenantAncestor {
|
|
|
262
262
|
* documents); `filter` is the structured half, ANDed, one entry per condition
|
|
263
263
|
* — see `tenantFilter` for the builders and the wire format.
|
|
264
264
|
*/
|
|
265
|
+
/** What `environment.tenants.list()` can order by. */
|
|
266
|
+
type TenantOrderField = "name" | "createdAt" | "updatedAt";
|
|
265
267
|
interface TenantListOptions extends PaginationOptions {
|
|
266
268
|
search?: string;
|
|
267
269
|
filter?: TenantFilterExpression[];
|
|
@@ -275,6 +277,20 @@ interface TenantListOptions extends PaginationOptions {
|
|
|
275
277
|
* on describing what you asked for.
|
|
276
278
|
*/
|
|
277
279
|
parentId?: string | null;
|
|
280
|
+
/** Keeps one side of the status. Omitted lists both. */
|
|
281
|
+
status?: "active" | "disabled";
|
|
282
|
+
/**
|
|
283
|
+
* Server-side order: a field, as a bare name (ascending) or with a
|
|
284
|
+
* direction. The default is the name, ascending. Ties always break on the
|
|
285
|
+
* id, so a row cannot move across a page boundary between two calls.
|
|
286
|
+
*
|
|
287
|
+
* Against an Authyon API older than 2026-11-03 both `status` and `orderBy`
|
|
288
|
+
* are ignored, which reads as a page that is too wide rather than an error.
|
|
289
|
+
*/
|
|
290
|
+
orderBy?: TenantOrderField | {
|
|
291
|
+
field: TenantOrderField;
|
|
292
|
+
direction?: "asc" | "desc";
|
|
293
|
+
};
|
|
278
294
|
}
|
|
279
295
|
/** One of a user's tenant memberships, as embedded in `EnvironmentUser.tenantMemberships`. */
|
|
280
296
|
interface TenantMembership {
|
|
@@ -1224,6 +1240,31 @@ declare class AuthyonServerClient {
|
|
|
1224
1240
|
* and the branch below it. Same handler as `disable()`.
|
|
1225
1241
|
*/
|
|
1226
1242
|
delete: (tenantId: string) => Promise<void>;
|
|
1243
|
+
/**
|
|
1244
|
+
* POST /env/tenants/{tenantId}/enable — the way back from `disable()`.
|
|
1245
|
+
*
|
|
1246
|
+
* Only this tenant comes back: a sub-tenant that went down with the
|
|
1247
|
+
* cascade stays off until enabled itself, and a tenant under a disabled
|
|
1248
|
+
* parent cannot come back before the parent does
|
|
1249
|
+
* (`tenant.ancestor_disabled`).
|
|
1250
|
+
*
|
|
1251
|
+
* Against an Authyon API older than 2026-11-03 this route does not exist.
|
|
1252
|
+
*/
|
|
1253
|
+
enable: (tenantId: string) => Promise<void>;
|
|
1254
|
+
/**
|
|
1255
|
+
* POST /env/tenants/{tenantId}/move — hang the tenant, with everything
|
|
1256
|
+
* below it, under another parent, or at the root with `null`.
|
|
1257
|
+
*
|
|
1258
|
+
* Refused into itself or one of its own descendants
|
|
1259
|
+
* (`tenant.parent.cycle`), into a switched-off branch, or where the
|
|
1260
|
+
* branch's deepest node would pass the environment's level cap
|
|
1261
|
+
* (`tenant.depth.not_allowed`). Every token minted at the old position
|
|
1262
|
+
* is retired (`tenant.path_stale`), so sessions inside the branch sign
|
|
1263
|
+
* in again.
|
|
1264
|
+
*
|
|
1265
|
+
* Against an Authyon API older than 2026-11-03 this route does not exist.
|
|
1266
|
+
*/
|
|
1267
|
+
move: (tenantId: string, parentTenantId: string | null) => Promise<void>;
|
|
1227
1268
|
members: {
|
|
1228
1269
|
/**
|
|
1229
1270
|
* GET /env/tenants/{tenantId}/members — a tenant's members as full
|
|
@@ -1451,4 +1492,4 @@ declare class TenantScopedClient {
|
|
|
1451
1492
|
/** Convenience factory: `const authyon = createClient({ clientId, clientSecret })`. */
|
|
1452
1493
|
declare function createClient(options?: AuthyonServerClientOptions): AuthyonServerClient;
|
|
1453
1494
|
|
|
1454
|
-
export { type ReservedPermissions as $, AuthyonServerClient as A, type CredentialPermissionsInput as B, CLIENT_IP_HEADER as C, type HttpAdapterRequest as D, type EnvironmentUser as E, FetchHttpAdapter as F, type HttpLogEvent as G, type HttpAdapter as H, type HttpLogger as I, JwksTokenVerifier as J, type IntrospectResult as K, type InviteTenantMemberInput as L, type IssuePasswordResetInput as M, type JsonWebKeySet as N, type JwksTokenVerifierOptions as O, LoggingHttpAdapter as P, type LoginActivity as Q, type OpenIdConfiguration as R, type Organization as S, type OtpCheckResult as T, type Paged as U, type PaginationOptions as V, type PasswordResetCompleted as W, type PasswordResetIssued as X, type PasswordResetPreview as Y, type Permission as Z, type PermissionsByRole as _, type HttpLoggerOptions as a, type Role as a0, type RoleGrant as a1, type RoleInput as a2, type RoleList as a3, type RolePermissions as a4, type SafeJwtAlgorithm as a5, type SecurityMethods as a6, type SubjectApprovals as a7, type SubjectSecurity as a8, TENANT_FILTER_MAX_DEPTH as a9, type
|
|
1495
|
+
export { type ReservedPermissions as $, AuthyonServerClient as A, type CredentialPermissionsInput as B, CLIENT_IP_HEADER as C, type HttpAdapterRequest as D, type EnvironmentUser as E, FetchHttpAdapter as F, type HttpLogEvent as G, type HttpAdapter as H, type HttpLogger as I, JwksTokenVerifier as J, type IntrospectResult as K, type InviteTenantMemberInput as L, type IssuePasswordResetInput as M, type JsonWebKeySet as N, type JwksTokenVerifierOptions as O, LoggingHttpAdapter as P, type LoginActivity as Q, type OpenIdConfiguration as R, type Organization as S, type OtpCheckResult as T, type Paged as U, type PaginationOptions as V, type PasswordResetCompleted as W, type PasswordResetIssued as X, type PasswordResetPreview as Y, type Permission as Z, type PermissionsByRole as _, type HttpLoggerOptions as a, type Role as a0, type RoleGrant as a1, type RoleInput as a2, type RoleList as a3, type RolePermissions as a4, type SafeJwtAlgorithm as a5, type SecurityMethods as a6, type SubjectApprovals as a7, type SubjectSecurity as a8, TENANT_FILTER_MAX_DEPTH as a9, type ValidateResult as aA, type VerifiedAccessToken as aB, createClient as aC, normalizeClientIp as aD, tenantFilter as aE, TENANT_FILTER_MAX_VALUES as aa, TENANT_FILTER_MAX_VALUE_LENGTH as ab, type TenantAncestor as ac, type TenantClientValidationResult as ad, type TenantCredentialIssued as ae, type TenantCredentialSummary as af, type TenantFilterExpression as ag, type TenantFilterValue as ah, type TenantInvite as ai, type TenantInviteAccepted as aj, type TenantInviteInput as ak, type TenantInviteIssued as al, type TenantInvitePreview as am, type TenantInviteStatus as an, type TenantListOptions as ao, type TenantMember as ap, type TenantMemberPage as aq, type TenantMembership as ar, type TenantOrderField as as, TenantScopedClient as at, type TokenResult as au, TokenVerificationError as av, type TokenVerificationErrorCode as aw, type UpdateOrganizationInput as ax, type User as ay, UserScopedClient as az, type AcceptTenantInviteInput as b, type AccessTokenSource as c, type Approval as d, type ApprovalAssurance as e, type ApprovalPayload as f, type ApprovalStatus as g, type ApprovalWebAuthnOptions as h, type AuditEvent as i, type AuthyonJwksDiscoveryOptions as j, type AuthyonJwtClaims as k, type AuthyonServerClientOptions as l, type AuthyonTenantClaim as m, type ClientCredentials as n, type ClientRequestContext as o, type ConfirmApprovalInput as p, type ConsumedApproval as q, type CreateApprovalInput as r, type CreateCredentialInput as s, type CreateOrganizationInput as t, type CreatePermissionInput as u, type CreateTenantCredentialInput as v, type CreateUserInput as w, type CredentialCreator as x, type CredentialDetail as y, type CredentialListOptions as z };
|
|
@@ -262,6 +262,8 @@ interface TenantAncestor {
|
|
|
262
262
|
* documents); `filter` is the structured half, ANDed, one entry per condition
|
|
263
263
|
* — see `tenantFilter` for the builders and the wire format.
|
|
264
264
|
*/
|
|
265
|
+
/** What `environment.tenants.list()` can order by. */
|
|
266
|
+
type TenantOrderField = "name" | "createdAt" | "updatedAt";
|
|
265
267
|
interface TenantListOptions extends PaginationOptions {
|
|
266
268
|
search?: string;
|
|
267
269
|
filter?: TenantFilterExpression[];
|
|
@@ -275,6 +277,20 @@ interface TenantListOptions extends PaginationOptions {
|
|
|
275
277
|
* on describing what you asked for.
|
|
276
278
|
*/
|
|
277
279
|
parentId?: string | null;
|
|
280
|
+
/** Keeps one side of the status. Omitted lists both. */
|
|
281
|
+
status?: "active" | "disabled";
|
|
282
|
+
/**
|
|
283
|
+
* Server-side order: a field, as a bare name (ascending) or with a
|
|
284
|
+
* direction. The default is the name, ascending. Ties always break on the
|
|
285
|
+
* id, so a row cannot move across a page boundary between two calls.
|
|
286
|
+
*
|
|
287
|
+
* Against an Authyon API older than 2026-11-03 both `status` and `orderBy`
|
|
288
|
+
* are ignored, which reads as a page that is too wide rather than an error.
|
|
289
|
+
*/
|
|
290
|
+
orderBy?: TenantOrderField | {
|
|
291
|
+
field: TenantOrderField;
|
|
292
|
+
direction?: "asc" | "desc";
|
|
293
|
+
};
|
|
278
294
|
}
|
|
279
295
|
/** One of a user's tenant memberships, as embedded in `EnvironmentUser.tenantMemberships`. */
|
|
280
296
|
interface TenantMembership {
|
|
@@ -1224,6 +1240,31 @@ declare class AuthyonServerClient {
|
|
|
1224
1240
|
* and the branch below it. Same handler as `disable()`.
|
|
1225
1241
|
*/
|
|
1226
1242
|
delete: (tenantId: string) => Promise<void>;
|
|
1243
|
+
/**
|
|
1244
|
+
* POST /env/tenants/{tenantId}/enable — the way back from `disable()`.
|
|
1245
|
+
*
|
|
1246
|
+
* Only this tenant comes back: a sub-tenant that went down with the
|
|
1247
|
+
* cascade stays off until enabled itself, and a tenant under a disabled
|
|
1248
|
+
* parent cannot come back before the parent does
|
|
1249
|
+
* (`tenant.ancestor_disabled`).
|
|
1250
|
+
*
|
|
1251
|
+
* Against an Authyon API older than 2026-11-03 this route does not exist.
|
|
1252
|
+
*/
|
|
1253
|
+
enable: (tenantId: string) => Promise<void>;
|
|
1254
|
+
/**
|
|
1255
|
+
* POST /env/tenants/{tenantId}/move — hang the tenant, with everything
|
|
1256
|
+
* below it, under another parent, or at the root with `null`.
|
|
1257
|
+
*
|
|
1258
|
+
* Refused into itself or one of its own descendants
|
|
1259
|
+
* (`tenant.parent.cycle`), into a switched-off branch, or where the
|
|
1260
|
+
* branch's deepest node would pass the environment's level cap
|
|
1261
|
+
* (`tenant.depth.not_allowed`). Every token minted at the old position
|
|
1262
|
+
* is retired (`tenant.path_stale`), so sessions inside the branch sign
|
|
1263
|
+
* in again.
|
|
1264
|
+
*
|
|
1265
|
+
* Against an Authyon API older than 2026-11-03 this route does not exist.
|
|
1266
|
+
*/
|
|
1267
|
+
move: (tenantId: string, parentTenantId: string | null) => Promise<void>;
|
|
1227
1268
|
members: {
|
|
1228
1269
|
/**
|
|
1229
1270
|
* GET /env/tenants/{tenantId}/members — a tenant's members as full
|
|
@@ -1451,4 +1492,4 @@ declare class TenantScopedClient {
|
|
|
1451
1492
|
/** Convenience factory: `const authyon = createClient({ clientId, clientSecret })`. */
|
|
1452
1493
|
declare function createClient(options?: AuthyonServerClientOptions): AuthyonServerClient;
|
|
1453
1494
|
|
|
1454
|
-
export { type ReservedPermissions as $, AuthyonServerClient as A, type CredentialPermissionsInput as B, CLIENT_IP_HEADER as C, type HttpAdapterRequest as D, type EnvironmentUser as E, FetchHttpAdapter as F, type HttpLogEvent as G, type HttpAdapter as H, type HttpLogger as I, JwksTokenVerifier as J, type IntrospectResult as K, type InviteTenantMemberInput as L, type IssuePasswordResetInput as M, type JsonWebKeySet as N, type JwksTokenVerifierOptions as O, LoggingHttpAdapter as P, type LoginActivity as Q, type OpenIdConfiguration as R, type Organization as S, type OtpCheckResult as T, type Paged as U, type PaginationOptions as V, type PasswordResetCompleted as W, type PasswordResetIssued as X, type PasswordResetPreview as Y, type Permission as Z, type PermissionsByRole as _, type HttpLoggerOptions as a, type Role as a0, type RoleGrant as a1, type RoleInput as a2, type RoleList as a3, type RolePermissions as a4, type SafeJwtAlgorithm as a5, type SecurityMethods as a6, type SubjectApprovals as a7, type SubjectSecurity as a8, TENANT_FILTER_MAX_DEPTH as a9, type
|
|
1495
|
+
export { type ReservedPermissions as $, AuthyonServerClient as A, type CredentialPermissionsInput as B, CLIENT_IP_HEADER as C, type HttpAdapterRequest as D, type EnvironmentUser as E, FetchHttpAdapter as F, type HttpLogEvent as G, type HttpAdapter as H, type HttpLogger as I, JwksTokenVerifier as J, type IntrospectResult as K, type InviteTenantMemberInput as L, type IssuePasswordResetInput as M, type JsonWebKeySet as N, type JwksTokenVerifierOptions as O, LoggingHttpAdapter as P, type LoginActivity as Q, type OpenIdConfiguration as R, type Organization as S, type OtpCheckResult as T, type Paged as U, type PaginationOptions as V, type PasswordResetCompleted as W, type PasswordResetIssued as X, type PasswordResetPreview as Y, type Permission as Z, type PermissionsByRole as _, type HttpLoggerOptions as a, type Role as a0, type RoleGrant as a1, type RoleInput as a2, type RoleList as a3, type RolePermissions as a4, type SafeJwtAlgorithm as a5, type SecurityMethods as a6, type SubjectApprovals as a7, type SubjectSecurity as a8, TENANT_FILTER_MAX_DEPTH as a9, type ValidateResult as aA, type VerifiedAccessToken as aB, createClient as aC, normalizeClientIp as aD, tenantFilter as aE, TENANT_FILTER_MAX_VALUES as aa, TENANT_FILTER_MAX_VALUE_LENGTH as ab, type TenantAncestor as ac, type TenantClientValidationResult as ad, type TenantCredentialIssued as ae, type TenantCredentialSummary as af, type TenantFilterExpression as ag, type TenantFilterValue as ah, type TenantInvite as ai, type TenantInviteAccepted as aj, type TenantInviteInput as ak, type TenantInviteIssued as al, type TenantInvitePreview as am, type TenantInviteStatus as an, type TenantListOptions as ao, type TenantMember as ap, type TenantMemberPage as aq, type TenantMembership as ar, type TenantOrderField as as, TenantScopedClient as at, type TokenResult as au, TokenVerificationError as av, type TokenVerificationErrorCode as aw, type UpdateOrganizationInput as ax, type User as ay, UserScopedClient as az, type AcceptTenantInviteInput as b, type AccessTokenSource as c, type Approval as d, type ApprovalAssurance as e, type ApprovalPayload as f, type ApprovalStatus as g, type ApprovalWebAuthnOptions as h, type AuditEvent as i, type AuthyonJwksDiscoveryOptions as j, type AuthyonJwtClaims as k, type AuthyonServerClientOptions as l, type AuthyonTenantClaim as m, type ClientCredentials as n, type ClientRequestContext as o, type ConfirmApprovalInput as p, type ConsumedApproval as q, type CreateApprovalInput as r, type CreateCredentialInput as s, type CreateOrganizationInput as t, type CreatePermissionInput as u, type CreateTenantCredentialInput as v, type CreateUserInput as w, type CredentialCreator as x, type CredentialDetail as y, type CredentialListOptions as z };
|
package/dist/bff.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { H as HttpAdapter, a as HttpLoggerOptions, A as AuthyonServerClient } from './authyonServerClient-
|
|
1
|
+
import { H as HttpAdapter, a as HttpLoggerOptions, A as AuthyonServerClient } from './authyonServerClient-zNSLRCwj.cjs';
|
|
2
2
|
import 'jose';
|
|
3
3
|
|
|
4
4
|
interface BffLoginInput {
|
package/dist/bff.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { H as HttpAdapter, a as HttpLoggerOptions, A as AuthyonServerClient } from './authyonServerClient-
|
|
1
|
+
import { H as HttpAdapter, a as HttpLoggerOptions, A as AuthyonServerClient } from './authyonServerClient-zNSLRCwj.js';
|
|
2
2
|
import 'jose';
|
|
3
3
|
|
|
4
4
|
interface BffLoginInput {
|
package/dist/index.cjs
CHANGED
|
@@ -808,9 +808,17 @@ function isRecord(value) {
|
|
|
808
808
|
|
|
809
809
|
// src/client/authyonServerClient.ts
|
|
810
810
|
var ROOT_PARENT_ID = "00000000-0000-0000-0000-000000000000";
|
|
811
|
-
function tenantListQuery({
|
|
812
|
-
|
|
813
|
-
|
|
811
|
+
function tenantListQuery({
|
|
812
|
+
parentId,
|
|
813
|
+
orderBy,
|
|
814
|
+
...rest
|
|
815
|
+
}) {
|
|
816
|
+
const query = { ...rest };
|
|
817
|
+
if (parentId !== void 0) query.parentId = parentId === null ? ROOT_PARENT_ID : parentId;
|
|
818
|
+
if (orderBy !== void 0) {
|
|
819
|
+
query.orderBy = typeof orderBy === "string" ? orderBy : `${orderBy.field}:${orderBy.direction ?? "asc"}`;
|
|
820
|
+
}
|
|
821
|
+
return query;
|
|
814
822
|
}
|
|
815
823
|
var _clientSecret;
|
|
816
824
|
var AuthyonServerClient = class {
|
|
@@ -1129,6 +1137,38 @@ var AuthyonServerClient = class {
|
|
|
1129
1137
|
method: "DELETE",
|
|
1130
1138
|
envBearer: true
|
|
1131
1139
|
}),
|
|
1140
|
+
/**
|
|
1141
|
+
* POST /env/tenants/{tenantId}/enable — the way back from `disable()`.
|
|
1142
|
+
*
|
|
1143
|
+
* Only this tenant comes back: a sub-tenant that went down with the
|
|
1144
|
+
* cascade stays off until enabled itself, and a tenant under a disabled
|
|
1145
|
+
* parent cannot come back before the parent does
|
|
1146
|
+
* (`tenant.ancestor_disabled`).
|
|
1147
|
+
*
|
|
1148
|
+
* Against an Authyon API older than 2026-11-03 this route does not exist.
|
|
1149
|
+
*/
|
|
1150
|
+
enable: (tenantId) => this.request(`/env/tenants/${encodeURIComponent(tenantId)}/enable`, {
|
|
1151
|
+
method: "POST",
|
|
1152
|
+
envBearer: true
|
|
1153
|
+
}),
|
|
1154
|
+
/**
|
|
1155
|
+
* POST /env/tenants/{tenantId}/move — hang the tenant, with everything
|
|
1156
|
+
* below it, under another parent, or at the root with `null`.
|
|
1157
|
+
*
|
|
1158
|
+
* Refused into itself or one of its own descendants
|
|
1159
|
+
* (`tenant.parent.cycle`), into a switched-off branch, or where the
|
|
1160
|
+
* branch's deepest node would pass the environment's level cap
|
|
1161
|
+
* (`tenant.depth.not_allowed`). Every token minted at the old position
|
|
1162
|
+
* is retired (`tenant.path_stale`), so sessions inside the branch sign
|
|
1163
|
+
* in again.
|
|
1164
|
+
*
|
|
1165
|
+
* Against an Authyon API older than 2026-11-03 this route does not exist.
|
|
1166
|
+
*/
|
|
1167
|
+
move: (tenantId, parentTenantId) => this.request(`/env/tenants/${encodeURIComponent(tenantId)}/move`, {
|
|
1168
|
+
method: "POST",
|
|
1169
|
+
envBearer: true,
|
|
1170
|
+
body: { parentTenantId }
|
|
1171
|
+
}),
|
|
1132
1172
|
members: {
|
|
1133
1173
|
/**
|
|
1134
1174
|
* GET /env/tenants/{tenantId}/members — a tenant's members as full
|
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { H as HttpAdapter, a as HttpLoggerOptions, A as AuthyonServerClient } from './authyonServerClient-
|
|
2
|
-
export { b as AcceptTenantInviteInput, c as AccessTokenSource, d as Approval, e as ApprovalAssurance, f as ApprovalPayload, g as ApprovalStatus, h as ApprovalWebAuthnOptions, i as AuditEvent, j as AuthyonJwksDiscoveryOptions, k as AuthyonJwtClaims, l as AuthyonServerClientOptions, m as AuthyonTenantClaim, C as CLIENT_IP_HEADER, n as ClientCredentials, o as ClientRequestContext, p as ConfirmApprovalInput, q as ConsumedApproval, r as CreateApprovalInput, s as CreateCredentialInput, t as CreateOrganizationInput, u as CreatePermissionInput, v as CreateTenantCredentialInput, w as CreateUserInput, x as CredentialCreator, y as CredentialDetail, z as CredentialListOptions, B as CredentialPermissionsInput, E as EnvironmentUser, F as FetchHttpAdapter, D as HttpAdapterRequest, G as HttpLogEvent, I as HttpLogger, K as IntrospectResult, L as InviteTenantMemberInput, M as IssuePasswordResetInput, N as JsonWebKeySet, J as JwksTokenVerifier, O as JwksTokenVerifierOptions, P as LoggingHttpAdapter, Q as LoginActivity, R as OpenIdConfiguration, S as Organization, T as OtpCheckResult, U as Paged, V as PaginationOptions, W as PasswordResetCompleted, X as PasswordResetIssued, Y as PasswordResetPreview, Z as Permission, _ as PermissionsByRole, $ as ReservedPermissions, a0 as Role, a1 as RoleGrant, a2 as RoleInput, a3 as RoleList, a4 as RolePermissions, a5 as SafeJwtAlgorithm, a6 as SecurityMethods, a7 as SubjectApprovals, a8 as SubjectSecurity, a9 as TENANT_FILTER_MAX_DEPTH, aa as TENANT_FILTER_MAX_VALUES, ab as TENANT_FILTER_MAX_VALUE_LENGTH, ac as TenantAncestor, ad as TenantClientValidationResult, ae as TenantCredentialIssued, af as TenantCredentialSummary, ag as TenantFilterExpression, ah as TenantFilterValue, ai as TenantInvite, aj as TenantInviteAccepted, ak as TenantInviteInput, al as TenantInviteIssued, am as TenantInvitePreview, an as TenantInviteStatus, ao as TenantListOptions, ap as TenantMember, aq as TenantMemberPage, ar as TenantMembership, as as
|
|
3
|
-
export { b as AbilityConditions, c as AbilityEvent, d as AbilityListener, e as AbilityRequirement, f as AbilityRule, A as AbilitySubject, g as AuthorizationContext, a as AuthorizationError, h as AuthorizationOptions, i as AuthyonAbility, j as AuthyonAbilityBuilder, k as AuthyonAbilityOptions, l as AuthyonPermissionSource, E as ExpressAuthorizationMiddlewareOptions, m as ExpressNext, n as ExpressRequestLike, o as ExpressResponseLike, P as PermissionGroup, R as RequestAuthorizationOptions, p as authorizeRequest, q as authorizeToken, r as createAuthorizationErrorResponse, s as createAuthyonAbility, t as createAuthyonRules, u as createExpressAuthorizationMiddleware, v as hasPermission, w as hasPermissionGroup } from './authorization-
|
|
1
|
+
import { H as HttpAdapter, a as HttpLoggerOptions, A as AuthyonServerClient } from './authyonServerClient-zNSLRCwj.cjs';
|
|
2
|
+
export { b as AcceptTenantInviteInput, c as AccessTokenSource, d as Approval, e as ApprovalAssurance, f as ApprovalPayload, g as ApprovalStatus, h as ApprovalWebAuthnOptions, i as AuditEvent, j as AuthyonJwksDiscoveryOptions, k as AuthyonJwtClaims, l as AuthyonServerClientOptions, m as AuthyonTenantClaim, C as CLIENT_IP_HEADER, n as ClientCredentials, o as ClientRequestContext, p as ConfirmApprovalInput, q as ConsumedApproval, r as CreateApprovalInput, s as CreateCredentialInput, t as CreateOrganizationInput, u as CreatePermissionInput, v as CreateTenantCredentialInput, w as CreateUserInput, x as CredentialCreator, y as CredentialDetail, z as CredentialListOptions, B as CredentialPermissionsInput, E as EnvironmentUser, F as FetchHttpAdapter, D as HttpAdapterRequest, G as HttpLogEvent, I as HttpLogger, K as IntrospectResult, L as InviteTenantMemberInput, M as IssuePasswordResetInput, N as JsonWebKeySet, J as JwksTokenVerifier, O as JwksTokenVerifierOptions, P as LoggingHttpAdapter, Q as LoginActivity, R as OpenIdConfiguration, S as Organization, T as OtpCheckResult, U as Paged, V as PaginationOptions, W as PasswordResetCompleted, X as PasswordResetIssued, Y as PasswordResetPreview, Z as Permission, _ as PermissionsByRole, $ as ReservedPermissions, a0 as Role, a1 as RoleGrant, a2 as RoleInput, a3 as RoleList, a4 as RolePermissions, a5 as SafeJwtAlgorithm, a6 as SecurityMethods, a7 as SubjectApprovals, a8 as SubjectSecurity, a9 as TENANT_FILTER_MAX_DEPTH, aa as TENANT_FILTER_MAX_VALUES, ab as TENANT_FILTER_MAX_VALUE_LENGTH, ac as TenantAncestor, ad as TenantClientValidationResult, ae as TenantCredentialIssued, af as TenantCredentialSummary, ag as TenantFilterExpression, ah as TenantFilterValue, ai as TenantInvite, aj as TenantInviteAccepted, ak as TenantInviteInput, al as TenantInviteIssued, am as TenantInvitePreview, an as TenantInviteStatus, ao as TenantListOptions, ap as TenantMember, aq as TenantMemberPage, ar as TenantMembership, as as TenantOrderField, at as TenantScopedClient, au as TokenResult, av as TokenVerificationError, aw as TokenVerificationErrorCode, ax as UpdateOrganizationInput, ay as User, az as UserScopedClient, aA as ValidateResult, aB as VerifiedAccessToken, aC as createClient, aD as normalizeClientIp, aE as tenantFilter } from './authyonServerClient-zNSLRCwj.cjs';
|
|
3
|
+
export { b as AbilityConditions, c as AbilityEvent, d as AbilityListener, e as AbilityRequirement, f as AbilityRule, A as AbilitySubject, g as AuthorizationContext, a as AuthorizationError, h as AuthorizationOptions, i as AuthyonAbility, j as AuthyonAbilityBuilder, k as AuthyonAbilityOptions, l as AuthyonPermissionSource, E as ExpressAuthorizationMiddlewareOptions, m as ExpressNext, n as ExpressRequestLike, o as ExpressResponseLike, P as PermissionGroup, R as RequestAuthorizationOptions, p as authorizeRequest, q as authorizeToken, r as createAuthorizationErrorResponse, s as createAuthyonAbility, t as createAuthyonRules, u as createExpressAuthorizationMiddleware, v as hasPermission, w as hasPermissionGroup } from './authorization-B-kQhcBm.cjs';
|
|
4
4
|
import 'jose';
|
|
5
5
|
|
|
6
6
|
declare const ErrorCodes: {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { H as HttpAdapter, a as HttpLoggerOptions, A as AuthyonServerClient } from './authyonServerClient-
|
|
2
|
-
export { b as AcceptTenantInviteInput, c as AccessTokenSource, d as Approval, e as ApprovalAssurance, f as ApprovalPayload, g as ApprovalStatus, h as ApprovalWebAuthnOptions, i as AuditEvent, j as AuthyonJwksDiscoveryOptions, k as AuthyonJwtClaims, l as AuthyonServerClientOptions, m as AuthyonTenantClaim, C as CLIENT_IP_HEADER, n as ClientCredentials, o as ClientRequestContext, p as ConfirmApprovalInput, q as ConsumedApproval, r as CreateApprovalInput, s as CreateCredentialInput, t as CreateOrganizationInput, u as CreatePermissionInput, v as CreateTenantCredentialInput, w as CreateUserInput, x as CredentialCreator, y as CredentialDetail, z as CredentialListOptions, B as CredentialPermissionsInput, E as EnvironmentUser, F as FetchHttpAdapter, D as HttpAdapterRequest, G as HttpLogEvent, I as HttpLogger, K as IntrospectResult, L as InviteTenantMemberInput, M as IssuePasswordResetInput, N as JsonWebKeySet, J as JwksTokenVerifier, O as JwksTokenVerifierOptions, P as LoggingHttpAdapter, Q as LoginActivity, R as OpenIdConfiguration, S as Organization, T as OtpCheckResult, U as Paged, V as PaginationOptions, W as PasswordResetCompleted, X as PasswordResetIssued, Y as PasswordResetPreview, Z as Permission, _ as PermissionsByRole, $ as ReservedPermissions, a0 as Role, a1 as RoleGrant, a2 as RoleInput, a3 as RoleList, a4 as RolePermissions, a5 as SafeJwtAlgorithm, a6 as SecurityMethods, a7 as SubjectApprovals, a8 as SubjectSecurity, a9 as TENANT_FILTER_MAX_DEPTH, aa as TENANT_FILTER_MAX_VALUES, ab as TENANT_FILTER_MAX_VALUE_LENGTH, ac as TenantAncestor, ad as TenantClientValidationResult, ae as TenantCredentialIssued, af as TenantCredentialSummary, ag as TenantFilterExpression, ah as TenantFilterValue, ai as TenantInvite, aj as TenantInviteAccepted, ak as TenantInviteInput, al as TenantInviteIssued, am as TenantInvitePreview, an as TenantInviteStatus, ao as TenantListOptions, ap as TenantMember, aq as TenantMemberPage, ar as TenantMembership, as as
|
|
3
|
-
export { b as AbilityConditions, c as AbilityEvent, d as AbilityListener, e as AbilityRequirement, f as AbilityRule, A as AbilitySubject, g as AuthorizationContext, a as AuthorizationError, h as AuthorizationOptions, i as AuthyonAbility, j as AuthyonAbilityBuilder, k as AuthyonAbilityOptions, l as AuthyonPermissionSource, E as ExpressAuthorizationMiddlewareOptions, m as ExpressNext, n as ExpressRequestLike, o as ExpressResponseLike, P as PermissionGroup, R as RequestAuthorizationOptions, p as authorizeRequest, q as authorizeToken, r as createAuthorizationErrorResponse, s as createAuthyonAbility, t as createAuthyonRules, u as createExpressAuthorizationMiddleware, v as hasPermission, w as hasPermissionGroup } from './authorization-
|
|
1
|
+
import { H as HttpAdapter, a as HttpLoggerOptions, A as AuthyonServerClient } from './authyonServerClient-zNSLRCwj.js';
|
|
2
|
+
export { b as AcceptTenantInviteInput, c as AccessTokenSource, d as Approval, e as ApprovalAssurance, f as ApprovalPayload, g as ApprovalStatus, h as ApprovalWebAuthnOptions, i as AuditEvent, j as AuthyonJwksDiscoveryOptions, k as AuthyonJwtClaims, l as AuthyonServerClientOptions, m as AuthyonTenantClaim, C as CLIENT_IP_HEADER, n as ClientCredentials, o as ClientRequestContext, p as ConfirmApprovalInput, q as ConsumedApproval, r as CreateApprovalInput, s as CreateCredentialInput, t as CreateOrganizationInput, u as CreatePermissionInput, v as CreateTenantCredentialInput, w as CreateUserInput, x as CredentialCreator, y as CredentialDetail, z as CredentialListOptions, B as CredentialPermissionsInput, E as EnvironmentUser, F as FetchHttpAdapter, D as HttpAdapterRequest, G as HttpLogEvent, I as HttpLogger, K as IntrospectResult, L as InviteTenantMemberInput, M as IssuePasswordResetInput, N as JsonWebKeySet, J as JwksTokenVerifier, O as JwksTokenVerifierOptions, P as LoggingHttpAdapter, Q as LoginActivity, R as OpenIdConfiguration, S as Organization, T as OtpCheckResult, U as Paged, V as PaginationOptions, W as PasswordResetCompleted, X as PasswordResetIssued, Y as PasswordResetPreview, Z as Permission, _ as PermissionsByRole, $ as ReservedPermissions, a0 as Role, a1 as RoleGrant, a2 as RoleInput, a3 as RoleList, a4 as RolePermissions, a5 as SafeJwtAlgorithm, a6 as SecurityMethods, a7 as SubjectApprovals, a8 as SubjectSecurity, a9 as TENANT_FILTER_MAX_DEPTH, aa as TENANT_FILTER_MAX_VALUES, ab as TENANT_FILTER_MAX_VALUE_LENGTH, ac as TenantAncestor, ad as TenantClientValidationResult, ae as TenantCredentialIssued, af as TenantCredentialSummary, ag as TenantFilterExpression, ah as TenantFilterValue, ai as TenantInvite, aj as TenantInviteAccepted, ak as TenantInviteInput, al as TenantInviteIssued, am as TenantInvitePreview, an as TenantInviteStatus, ao as TenantListOptions, ap as TenantMember, aq as TenantMemberPage, ar as TenantMembership, as as TenantOrderField, at as TenantScopedClient, au as TokenResult, av as TokenVerificationError, aw as TokenVerificationErrorCode, ax as UpdateOrganizationInput, ay as User, az as UserScopedClient, aA as ValidateResult, aB as VerifiedAccessToken, aC as createClient, aD as normalizeClientIp, aE as tenantFilter } from './authyonServerClient-zNSLRCwj.js';
|
|
3
|
+
export { b as AbilityConditions, c as AbilityEvent, d as AbilityListener, e as AbilityRequirement, f as AbilityRule, A as AbilitySubject, g as AuthorizationContext, a as AuthorizationError, h as AuthorizationOptions, i as AuthyonAbility, j as AuthyonAbilityBuilder, k as AuthyonAbilityOptions, l as AuthyonPermissionSource, E as ExpressAuthorizationMiddlewareOptions, m as ExpressNext, n as ExpressRequestLike, o as ExpressResponseLike, P as PermissionGroup, R as RequestAuthorizationOptions, p as authorizeRequest, q as authorizeToken, r as createAuthorizationErrorResponse, s as createAuthyonAbility, t as createAuthyonRules, u as createExpressAuthorizationMiddleware, v as hasPermission, w as hasPermissionGroup } from './authorization-CxBweecR.js';
|
|
4
4
|
import 'jose';
|
|
5
5
|
|
|
6
6
|
declare const ErrorCodes: {
|
package/dist/index.js
CHANGED
|
@@ -270,9 +270,17 @@ _inFlight = new WeakMap();
|
|
|
270
270
|
|
|
271
271
|
// src/client/authyonServerClient.ts
|
|
272
272
|
var ROOT_PARENT_ID = "00000000-0000-0000-0000-000000000000";
|
|
273
|
-
function tenantListQuery({
|
|
274
|
-
|
|
275
|
-
|
|
273
|
+
function tenantListQuery({
|
|
274
|
+
parentId,
|
|
275
|
+
orderBy,
|
|
276
|
+
...rest
|
|
277
|
+
}) {
|
|
278
|
+
const query = { ...rest };
|
|
279
|
+
if (parentId !== void 0) query.parentId = parentId === null ? ROOT_PARENT_ID : parentId;
|
|
280
|
+
if (orderBy !== void 0) {
|
|
281
|
+
query.orderBy = typeof orderBy === "string" ? orderBy : `${orderBy.field}:${orderBy.direction ?? "asc"}`;
|
|
282
|
+
}
|
|
283
|
+
return query;
|
|
276
284
|
}
|
|
277
285
|
var _clientSecret;
|
|
278
286
|
var AuthyonServerClient = class {
|
|
@@ -591,6 +599,38 @@ var AuthyonServerClient = class {
|
|
|
591
599
|
method: "DELETE",
|
|
592
600
|
envBearer: true
|
|
593
601
|
}),
|
|
602
|
+
/**
|
|
603
|
+
* POST /env/tenants/{tenantId}/enable — the way back from `disable()`.
|
|
604
|
+
*
|
|
605
|
+
* Only this tenant comes back: a sub-tenant that went down with the
|
|
606
|
+
* cascade stays off until enabled itself, and a tenant under a disabled
|
|
607
|
+
* parent cannot come back before the parent does
|
|
608
|
+
* (`tenant.ancestor_disabled`).
|
|
609
|
+
*
|
|
610
|
+
* Against an Authyon API older than 2026-11-03 this route does not exist.
|
|
611
|
+
*/
|
|
612
|
+
enable: (tenantId) => this.request(`/env/tenants/${encodeURIComponent(tenantId)}/enable`, {
|
|
613
|
+
method: "POST",
|
|
614
|
+
envBearer: true
|
|
615
|
+
}),
|
|
616
|
+
/**
|
|
617
|
+
* POST /env/tenants/{tenantId}/move — hang the tenant, with everything
|
|
618
|
+
* below it, under another parent, or at the root with `null`.
|
|
619
|
+
*
|
|
620
|
+
* Refused into itself or one of its own descendants
|
|
621
|
+
* (`tenant.parent.cycle`), into a switched-off branch, or where the
|
|
622
|
+
* branch's deepest node would pass the environment's level cap
|
|
623
|
+
* (`tenant.depth.not_allowed`). Every token minted at the old position
|
|
624
|
+
* is retired (`tenant.path_stale`), so sessions inside the branch sign
|
|
625
|
+
* in again.
|
|
626
|
+
*
|
|
627
|
+
* Against an Authyon API older than 2026-11-03 this route does not exist.
|
|
628
|
+
*/
|
|
629
|
+
move: (tenantId, parentTenantId) => this.request(`/env/tenants/${encodeURIComponent(tenantId)}/move`, {
|
|
630
|
+
method: "POST",
|
|
631
|
+
envBearer: true,
|
|
632
|
+
body: { parentTenantId }
|
|
633
|
+
}),
|
|
594
634
|
members: {
|
|
595
635
|
/**
|
|
596
636
|
* GET /env/tenants/{tenantId}/members — a tenant's members as full
|
package/dist/next.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { R as RequestAuthorizationOptions, A as AbilitySubject, a as AuthorizationError } from './authorization-
|
|
3
|
-
import { A as AuthyonServerClient } from './authyonServerClient-
|
|
2
|
+
import { R as RequestAuthorizationOptions, A as AbilitySubject, a as AuthorizationError } from './authorization-B-kQhcBm.cjs';
|
|
3
|
+
import { A as AuthyonServerClient } from './authyonServerClient-zNSLRCwj.cjs';
|
|
4
4
|
import 'jose';
|
|
5
5
|
|
|
6
6
|
interface ServerPermissionGuardFallbackContext {
|
package/dist/next.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { R as RequestAuthorizationOptions, A as AbilitySubject, a as AuthorizationError } from './authorization-
|
|
3
|
-
import { A as AuthyonServerClient } from './authyonServerClient-
|
|
2
|
+
import { R as RequestAuthorizationOptions, A as AbilitySubject, a as AuthorizationError } from './authorization-CxBweecR.js';
|
|
3
|
+
import { A as AuthyonServerClient } from './authyonServerClient-zNSLRCwj.js';
|
|
4
4
|
import 'jose';
|
|
5
5
|
|
|
6
6
|
interface ServerPermissionGuardFallbackContext {
|
package/package.json
CHANGED