@authyon/server 0.2.0-beta.30 → 0.2.0-beta.32
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/README.md +4 -4
- package/dist/{authorization-DR079xKg.d.cts → authorization-CGex2N6O.d.cts} +1 -1
- package/dist/{authorization-Dkawj1IN.d.ts → authorization-TbK43K94.d.ts} +1 -1
- package/dist/{authyonServerClient-C_iWckru.d.cts → authyonServerClient-DqY5OtxL.d.cts} +86 -16
- package/dist/{authyonServerClient-C_iWckru.d.ts → authyonServerClient-DqY5OtxL.d.ts} +86 -16
- package/dist/bff.cjs +59 -31
- package/dist/bff.d.cts +37 -4
- package/dist/bff.d.ts +37 -4
- package/dist/bff.js +59 -31
- package/dist/index.cjs +55 -2
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +55 -2
- package/dist/next.d.cts +2 -2
- package/dist/next.d.ts +2 -2
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -211,6 +211,34 @@ function memberQuery(options = {}) {
|
|
|
211
211
|
var ORDER_FIELDS = ["name", "createdAt", "updatedAt"];
|
|
212
212
|
var MAX_FILTERS = 10;
|
|
213
213
|
var MAX_FILTER_LENGTH = 512;
|
|
214
|
+
var MAX_PERMISSIONS = 10;
|
|
215
|
+
var MAX_PERMISSION_LENGTH = 256;
|
|
216
|
+
function permissionQuery(options = {}) {
|
|
217
|
+
const { permission, permissionMatch } = options;
|
|
218
|
+
const query = {};
|
|
219
|
+
if (permissionMatch !== void 0) {
|
|
220
|
+
if (permissionMatch !== "all" && permissionMatch !== "any")
|
|
221
|
+
throw new RangeError('Authyon: permissionMatch must be "all" or "any".');
|
|
222
|
+
query.permissionMatch = permissionMatch;
|
|
223
|
+
}
|
|
224
|
+
if (permission === void 0) return query;
|
|
225
|
+
if (!Array.isArray(permission)) throw new RangeError("Authyon: permission must be an array.");
|
|
226
|
+
const values = permission.map((p) => typeof p === "string" ? p.trim() : "");
|
|
227
|
+
if (values.some((p) => p.length === 0))
|
|
228
|
+
throw new RangeError("Authyon: a permission value may not be empty.");
|
|
229
|
+
if (values.length > MAX_PERMISSIONS)
|
|
230
|
+
throw new RangeError(`Authyon: at most ${MAX_PERMISSIONS} permission values per request.`);
|
|
231
|
+
for (const p of values) {
|
|
232
|
+
if (p.length > MAX_PERMISSION_LENGTH)
|
|
233
|
+
throw new RangeError(
|
|
234
|
+
`Authyon: a permission holds at most ${MAX_PERMISSION_LENGTH} characters.`
|
|
235
|
+
);
|
|
236
|
+
if (p.includes("*"))
|
|
237
|
+
throw new RangeError(`Authyon: name a concrete permission, not a wildcard (got "${p}").`);
|
|
238
|
+
}
|
|
239
|
+
if (values.length > 0) query.permission = values;
|
|
240
|
+
return query;
|
|
241
|
+
}
|
|
214
242
|
function orderByParam(order) {
|
|
215
243
|
if (order === void 0) return void 0;
|
|
216
244
|
const field = typeof order === "string" ? order : order?.field;
|
|
@@ -222,8 +250,11 @@ function orderByParam(order) {
|
|
|
222
250
|
return `${field}:${direction}`;
|
|
223
251
|
}
|
|
224
252
|
function subTenantQuery(options = {}) {
|
|
225
|
-
const { filter, orderBy, ...page } = options;
|
|
226
|
-
const query = {
|
|
253
|
+
const { filter, orderBy, permission, permissionMatch, ...page } = options;
|
|
254
|
+
const query = {
|
|
255
|
+
...memberQuery(page),
|
|
256
|
+
...permissionQuery({ permission, permissionMatch })
|
|
257
|
+
};
|
|
227
258
|
if (filter !== void 0) {
|
|
228
259
|
if (!Array.isArray(filter)) throw new RangeError("Authyon: filter must be an array.");
|
|
229
260
|
const present = filter.filter((f) => typeof f === "string" && f.trim().length > 0);
|
|
@@ -246,6 +277,15 @@ function subTenantQuery(options = {}) {
|
|
|
246
277
|
return query;
|
|
247
278
|
}
|
|
248
279
|
|
|
280
|
+
// ../../internal/core/http/tenantLookup.ts
|
|
281
|
+
var UUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/iu;
|
|
282
|
+
function tenantLookupPath(idOrSlug) {
|
|
283
|
+
const value = typeof idOrSlug === "string" ? idOrSlug.trim() : "";
|
|
284
|
+
if (!value) throw new RangeError("Authyon: a tenant id or slug is required.");
|
|
285
|
+
if (value.length > 64) throw new RangeError("Authyon: a tenant slug has at most 64 characters.");
|
|
286
|
+
return UUID.test(value) ? `/auth/tenants/${encodeURIComponent(value)}` : `/auth/tenants/by-slug/${encodeURIComponent(value.toLowerCase())}`;
|
|
287
|
+
}
|
|
288
|
+
|
|
249
289
|
// ../../internal/core/security/approvals.ts
|
|
250
290
|
function path(id, suffix = "") {
|
|
251
291
|
if (typeof id !== "string" || !id.trim())
|
|
@@ -295,6 +335,19 @@ var UserScopedClient = class {
|
|
|
295
335
|
constructor(request, token) {
|
|
296
336
|
__privateAdd(this, _request);
|
|
297
337
|
this.tenants = {
|
|
338
|
+
/**
|
|
339
|
+
* GET /auth/tenants/{tenantId} — one tenant, acting as the user: their own,
|
|
340
|
+
* or one below it with `subtenants:tree:read` on an ancestor.
|
|
341
|
+
*/
|
|
342
|
+
get: (tenantId) => __privateGet(this, _request).call(this, `/auth/tenants/${segment(tenantId)}`),
|
|
343
|
+
/**
|
|
344
|
+
* One tenant by id **or** slug: a UUID goes to `GET /auth/tenants/{id}`,
|
|
345
|
+
* anything else to `GET /auth/tenants/by-slug/{slug}`. Same rule and answer
|
|
346
|
+
* as `get`; by slug every refusal is `tenant.not_found`. An empty value
|
|
347
|
+
* raises `RangeError` before any request. The slug route needs the Authyon
|
|
348
|
+
* API of 2026-11-26 or newer.
|
|
349
|
+
*/
|
|
350
|
+
find: (idOrSlug) => __privateGet(this, _request).call(this, tenantLookupPath(idOrSlug)),
|
|
298
351
|
/**
|
|
299
352
|
* The direct, active sub-tenants of a tenant, acting as the user. One level
|
|
300
353
|
* per call: each row's `childCount` says where the next call is worth
|
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, B as BuiltInPermission, 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
|
|
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-DqY5OtxL.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, B as BuiltInPermission, 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 CreateTenantInput, x as CreateUserInput, y as CredentialCreator, z as CredentialDetail, D as CredentialListOptions, E as CredentialPermissionsInput, F as EnvironmentUser, G as FetchHttpAdapter, I as HttpAdapterRequest, K as HttpLogEvent, L as HttpLogger, M as IntrospectResult, N as InviteTenantMemberInput, O as IssuePasswordResetInput, P as JsonWebKeySet, J as JwksTokenVerifier, Q as JwksTokenVerifierOptions, R as LoggingHttpAdapter, S as LoginActivity, T as MemberListOptions, U as MyTenant, V as OpenIdConfiguration, W as Organization, X as OtpCheckResult, Y as Paged, Z as PaginationOptions, _ as PasswordResetCompleted, $ as PasswordResetIssued, a0 as PasswordResetPreview, a1 as Permission, a2 as PermissionFilterOptions, a3 as PermissionsByRole, a4 as ReservedPermissions, a5 as Role, a6 as RoleGrant, a7 as RoleInput, a8 as RoleList, a9 as RolePermissions, aa as SafeJwtAlgorithm, ab as SecurityMethods, ac as SubTenant, ad as SubTenantListOptions, ae as SubjectApprovals, af as SubjectSecurity, ag as TENANT_FILTER_MAX_DEPTH, ah as TENANT_FILTER_MAX_VALUES, ai as TENANT_FILTER_MAX_VALUE_LENGTH, aj as Tenant, ak as TenantAncestor, al as TenantClientValidationResult, am as TenantCredentialIssued, an as TenantCredentialSummary, ao as TenantFilterExpression, ap as TenantFilterValue, aq as TenantInvite, ar as TenantInviteAccepted, as as TenantInviteInput, at as TenantInviteIssued, au as TenantInviteListOptions, av as TenantInvitePreview, aw as TenantInviteStatus, ax as TenantListOptions, ay as TenantMember, az as TenantMemberPage, aA as TenantMembership, aB as TenantOrder, aC as TenantOrderField, aD as TenantParent, aE as TenantScopedClient, aF as TokenResult, aG as TokenVerificationError, aH as TokenVerificationErrorCode, aI as UpdateOrganizationInput, aJ as UpdateTenantInput, aK as User, aL as UserScopedClient, aM as ValidateResult, aN as VerifiedAccessToken, aO as createClient, aP as normalizeClientIp, aQ as tenantFilter } from './authyonServerClient-DqY5OtxL.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-CGex2N6O.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, B as BuiltInPermission, 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
|
|
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-DqY5OtxL.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, B as BuiltInPermission, 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 CreateTenantInput, x as CreateUserInput, y as CredentialCreator, z as CredentialDetail, D as CredentialListOptions, E as CredentialPermissionsInput, F as EnvironmentUser, G as FetchHttpAdapter, I as HttpAdapterRequest, K as HttpLogEvent, L as HttpLogger, M as IntrospectResult, N as InviteTenantMemberInput, O as IssuePasswordResetInput, P as JsonWebKeySet, J as JwksTokenVerifier, Q as JwksTokenVerifierOptions, R as LoggingHttpAdapter, S as LoginActivity, T as MemberListOptions, U as MyTenant, V as OpenIdConfiguration, W as Organization, X as OtpCheckResult, Y as Paged, Z as PaginationOptions, _ as PasswordResetCompleted, $ as PasswordResetIssued, a0 as PasswordResetPreview, a1 as Permission, a2 as PermissionFilterOptions, a3 as PermissionsByRole, a4 as ReservedPermissions, a5 as Role, a6 as RoleGrant, a7 as RoleInput, a8 as RoleList, a9 as RolePermissions, aa as SafeJwtAlgorithm, ab as SecurityMethods, ac as SubTenant, ad as SubTenantListOptions, ae as SubjectApprovals, af as SubjectSecurity, ag as TENANT_FILTER_MAX_DEPTH, ah as TENANT_FILTER_MAX_VALUES, ai as TENANT_FILTER_MAX_VALUE_LENGTH, aj as Tenant, ak as TenantAncestor, al as TenantClientValidationResult, am as TenantCredentialIssued, an as TenantCredentialSummary, ao as TenantFilterExpression, ap as TenantFilterValue, aq as TenantInvite, ar as TenantInviteAccepted, as as TenantInviteInput, at as TenantInviteIssued, au as TenantInviteListOptions, av as TenantInvitePreview, aw as TenantInviteStatus, ax as TenantListOptions, ay as TenantMember, az as TenantMemberPage, aA as TenantMembership, aB as TenantOrder, aC as TenantOrderField, aD as TenantParent, aE as TenantScopedClient, aF as TokenResult, aG as TokenVerificationError, aH as TokenVerificationErrorCode, aI as UpdateOrganizationInput, aJ as UpdateTenantInput, aK as User, aL as UserScopedClient, aM as ValidateResult, aN as VerifiedAccessToken, aO as createClient, aP as normalizeClientIp, aQ as tenantFilter } from './authyonServerClient-DqY5OtxL.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-TbK43K94.js';
|
|
4
4
|
import 'jose';
|
|
5
5
|
|
|
6
6
|
declare const ErrorCodes: {
|
package/dist/index.js
CHANGED
|
@@ -183,6 +183,34 @@ function memberQuery(options = {}) {
|
|
|
183
183
|
var ORDER_FIELDS = ["name", "createdAt", "updatedAt"];
|
|
184
184
|
var MAX_FILTERS = 10;
|
|
185
185
|
var MAX_FILTER_LENGTH = 512;
|
|
186
|
+
var MAX_PERMISSIONS = 10;
|
|
187
|
+
var MAX_PERMISSION_LENGTH = 256;
|
|
188
|
+
function permissionQuery(options = {}) {
|
|
189
|
+
const { permission, permissionMatch } = options;
|
|
190
|
+
const query = {};
|
|
191
|
+
if (permissionMatch !== void 0) {
|
|
192
|
+
if (permissionMatch !== "all" && permissionMatch !== "any")
|
|
193
|
+
throw new RangeError('Authyon: permissionMatch must be "all" or "any".');
|
|
194
|
+
query.permissionMatch = permissionMatch;
|
|
195
|
+
}
|
|
196
|
+
if (permission === void 0) return query;
|
|
197
|
+
if (!Array.isArray(permission)) throw new RangeError("Authyon: permission must be an array.");
|
|
198
|
+
const values = permission.map((p) => typeof p === "string" ? p.trim() : "");
|
|
199
|
+
if (values.some((p) => p.length === 0))
|
|
200
|
+
throw new RangeError("Authyon: a permission value may not be empty.");
|
|
201
|
+
if (values.length > MAX_PERMISSIONS)
|
|
202
|
+
throw new RangeError(`Authyon: at most ${MAX_PERMISSIONS} permission values per request.`);
|
|
203
|
+
for (const p of values) {
|
|
204
|
+
if (p.length > MAX_PERMISSION_LENGTH)
|
|
205
|
+
throw new RangeError(
|
|
206
|
+
`Authyon: a permission holds at most ${MAX_PERMISSION_LENGTH} characters.`
|
|
207
|
+
);
|
|
208
|
+
if (p.includes("*"))
|
|
209
|
+
throw new RangeError(`Authyon: name a concrete permission, not a wildcard (got "${p}").`);
|
|
210
|
+
}
|
|
211
|
+
if (values.length > 0) query.permission = values;
|
|
212
|
+
return query;
|
|
213
|
+
}
|
|
186
214
|
function orderByParam(order) {
|
|
187
215
|
if (order === void 0) return void 0;
|
|
188
216
|
const field = typeof order === "string" ? order : order?.field;
|
|
@@ -194,8 +222,11 @@ function orderByParam(order) {
|
|
|
194
222
|
return `${field}:${direction}`;
|
|
195
223
|
}
|
|
196
224
|
function subTenantQuery(options = {}) {
|
|
197
|
-
const { filter, orderBy, ...page } = options;
|
|
198
|
-
const query = {
|
|
225
|
+
const { filter, orderBy, permission, permissionMatch, ...page } = options;
|
|
226
|
+
const query = {
|
|
227
|
+
...memberQuery(page),
|
|
228
|
+
...permissionQuery({ permission, permissionMatch })
|
|
229
|
+
};
|
|
199
230
|
if (filter !== void 0) {
|
|
200
231
|
if (!Array.isArray(filter)) throw new RangeError("Authyon: filter must be an array.");
|
|
201
232
|
const present = filter.filter((f) => typeof f === "string" && f.trim().length > 0);
|
|
@@ -218,6 +249,15 @@ function subTenantQuery(options = {}) {
|
|
|
218
249
|
return query;
|
|
219
250
|
}
|
|
220
251
|
|
|
252
|
+
// ../../internal/core/http/tenantLookup.ts
|
|
253
|
+
var UUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/iu;
|
|
254
|
+
function tenantLookupPath(idOrSlug) {
|
|
255
|
+
const value = typeof idOrSlug === "string" ? idOrSlug.trim() : "";
|
|
256
|
+
if (!value) throw new RangeError("Authyon: a tenant id or slug is required.");
|
|
257
|
+
if (value.length > 64) throw new RangeError("Authyon: a tenant slug has at most 64 characters.");
|
|
258
|
+
return UUID.test(value) ? `/auth/tenants/${encodeURIComponent(value)}` : `/auth/tenants/by-slug/${encodeURIComponent(value.toLowerCase())}`;
|
|
259
|
+
}
|
|
260
|
+
|
|
221
261
|
// ../../internal/core/security/approvals.ts
|
|
222
262
|
function path(id, suffix = "") {
|
|
223
263
|
if (typeof id !== "string" || !id.trim())
|
|
@@ -267,6 +307,19 @@ var UserScopedClient = class {
|
|
|
267
307
|
constructor(request, token) {
|
|
268
308
|
__privateAdd(this, _request);
|
|
269
309
|
this.tenants = {
|
|
310
|
+
/**
|
|
311
|
+
* GET /auth/tenants/{tenantId} — one tenant, acting as the user: their own,
|
|
312
|
+
* or one below it with `subtenants:tree:read` on an ancestor.
|
|
313
|
+
*/
|
|
314
|
+
get: (tenantId) => __privateGet(this, _request).call(this, `/auth/tenants/${segment(tenantId)}`),
|
|
315
|
+
/**
|
|
316
|
+
* One tenant by id **or** slug: a UUID goes to `GET /auth/tenants/{id}`,
|
|
317
|
+
* anything else to `GET /auth/tenants/by-slug/{slug}`. Same rule and answer
|
|
318
|
+
* as `get`; by slug every refusal is `tenant.not_found`. An empty value
|
|
319
|
+
* raises `RangeError` before any request. The slug route needs the Authyon
|
|
320
|
+
* API of 2026-11-26 or newer.
|
|
321
|
+
*/
|
|
322
|
+
find: (idOrSlug) => __privateGet(this, _request).call(this, tenantLookupPath(idOrSlug)),
|
|
270
323
|
/**
|
|
271
324
|
* The direct, active sub-tenants of a tenant, acting as the user. One level
|
|
272
325
|
* per call: each row's `childCount` says where the next call is worth
|
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-CGex2N6O.cjs';
|
|
3
|
+
import { A as AuthyonServerClient } from './authyonServerClient-DqY5OtxL.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-TbK43K94.js';
|
|
3
|
+
import { A as AuthyonServerClient } from './authyonServerClient-DqY5OtxL.js';
|
|
4
4
|
import 'jose';
|
|
5
5
|
|
|
6
6
|
interface ServerPermissionGuardFallbackContext {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@authyon/server",
|
|
3
|
-
"version": "0.2.0-beta.
|
|
4
|
-
"description": "Authyon SDK for backends — server-to-server
|
|
3
|
+
"version": "0.2.0-beta.32",
|
|
4
|
+
"description": "Authyon SDK for backends — server-to-server tenant/member management and access-token verification.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"engines": {
|