@authyon/server 0.2.0-beta.25 → 0.2.0-beta.27
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 +9 -1
- package/dist/{authorization-DPymgDb8.d.ts → authorization-RHojgDKD.d.cts} +4 -2
- package/dist/{authorization-BLVSHGQu.d.cts → authorization-gJv_i_p5.d.ts} +4 -2
- package/dist/{authyonServerClient-6ezHxvwa.d.cts → authyonServerClient-D7mSUfe5.d.cts} +23 -5
- package/dist/{authyonServerClient-6ezHxvwa.d.ts → authyonServerClient-D7mSUfe5.d.ts} +23 -5
- package/dist/bff.d.cts +1 -1
- package/dist/bff.d.ts +1 -1
- package/dist/{chunk-WF26WYSX.js → chunk-V6JQIOSP.js} +19 -0
- package/dist/index.cjs +62 -4
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +44 -5
- package/dist/next.d.cts +2 -2
- package/dist/next.d.ts +2 -2
- package/dist/next.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -483,7 +483,15 @@ const invite = await authyon.environment.tenants.invites.create(tenantId, {
|
|
|
483
483
|
});
|
|
484
484
|
invite.acceptUrl; // só aparece aqui — a API guarda apenas o hash do token
|
|
485
485
|
|
|
486
|
-
|
|
486
|
+
// Paginado, sempre do mais recente para o mais antigo. `search` procura no
|
|
487
|
+
// e-mail; `status` aceita pending, accepted, revoked e expired.
|
|
488
|
+
const page = await authyon.environment.tenants.invites.list(tenantId, {
|
|
489
|
+
search: "acme.com",
|
|
490
|
+
status: ["pending", "expired"],
|
|
491
|
+
take: 25,
|
|
492
|
+
});
|
|
493
|
+
page.data; // TenantInvite[]
|
|
494
|
+
page.total; // total com os filtros aplicados
|
|
487
495
|
await authyon.environment.tenants.invites.resend(tenantId, invite.id, { sendEmail: true });
|
|
488
496
|
await authyon.environment.tenants.invites.revoke(tenantId, invite.id);
|
|
489
497
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { J as JwksTokenVerifier, A as AuthyonServerClient } from './authyonServerClient-
|
|
1
|
+
import { J as JwksTokenVerifier, A as AuthyonServerClient } from './authyonServerClient-D7mSUfe5.cjs';
|
|
2
2
|
|
|
3
3
|
type AbilitySubject = string | Record<string, unknown>;
|
|
4
4
|
type AbilityConditions = Record<string, unknown>;
|
|
@@ -58,7 +58,9 @@ declare function createAuthyonAbility(source?: AuthyonPermissionSource, options?
|
|
|
58
58
|
* Whether a source holds an Authyon permission, by Authyon's own rules: the
|
|
59
59
|
* values are compared segment by segment, `*` stands for any one segment, and
|
|
60
60
|
* two values of different lengths never match — except an all-wildcard grant,
|
|
61
|
-
* which is everything
|
|
61
|
+
* which is everything, and a grant ending in `**`, which stands for one or
|
|
62
|
+
* more segments (`manager:**` covers `manager:account:read` and
|
|
63
|
+
* `manager:account:credentials:write`). OAuth scopes count as permissions.
|
|
62
64
|
*
|
|
63
65
|
* Not the same question as {@link AuthyonAbility.can}. An ability is CASL, so
|
|
64
66
|
* the action `manage` there means "every action on this subject", which is a
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { J as JwksTokenVerifier, A as AuthyonServerClient } from './authyonServerClient-
|
|
1
|
+
import { J as JwksTokenVerifier, A as AuthyonServerClient } from './authyonServerClient-D7mSUfe5.js';
|
|
2
2
|
|
|
3
3
|
type AbilitySubject = string | Record<string, unknown>;
|
|
4
4
|
type AbilityConditions = Record<string, unknown>;
|
|
@@ -58,7 +58,9 @@ declare function createAuthyonAbility(source?: AuthyonPermissionSource, options?
|
|
|
58
58
|
* Whether a source holds an Authyon permission, by Authyon's own rules: the
|
|
59
59
|
* values are compared segment by segment, `*` stands for any one segment, and
|
|
60
60
|
* two values of different lengths never match — except an all-wildcard grant,
|
|
61
|
-
* which is everything
|
|
61
|
+
* which is everything, and a grant ending in `**`, which stands for one or
|
|
62
|
+
* more segments (`manager:**` covers `manager:account:read` and
|
|
63
|
+
* `manager:account:credentials:write`). OAuth scopes count as permissions.
|
|
62
64
|
*
|
|
63
65
|
* Not the same question as {@link AuthyonAbility.can}. An ability is CASL, so
|
|
64
66
|
* the action `manage` there means "every action on this subject", which is a
|
|
@@ -746,6 +746,15 @@ interface TenantInviteIssued {
|
|
|
746
746
|
redirectUri: string | null;
|
|
747
747
|
}
|
|
748
748
|
type TenantInviteStatus = "pending" | "accepted" | "revoked" | "expired";
|
|
749
|
+
/**
|
|
750
|
+
* Options for an invite listing. The API always orders newest first.
|
|
751
|
+
* `status` keeps only invites in any of the given states; omitted, every state.
|
|
752
|
+
*/
|
|
753
|
+
interface TenantInviteListOptions extends PaginationOptions {
|
|
754
|
+
/** Case-insensitive substring of the invited address. */
|
|
755
|
+
search?: string;
|
|
756
|
+
status?: TenantInviteStatus[];
|
|
757
|
+
}
|
|
749
758
|
interface TenantInvite {
|
|
750
759
|
id: string;
|
|
751
760
|
tenantId: string;
|
|
@@ -1332,8 +1341,13 @@ declare class AuthyonServerClient {
|
|
|
1332
1341
|
* credential's `authyon:users:write` scope (listing, `authyon:tenants:read`).
|
|
1333
1342
|
*/
|
|
1334
1343
|
invites: {
|
|
1335
|
-
/**
|
|
1336
|
-
|
|
1344
|
+
/**
|
|
1345
|
+
* GET /env/tenants/{tenantId}/invites — one page of the tenant's
|
|
1346
|
+
* invites, newest first, optionally narrowed by address (`search`)
|
|
1347
|
+
* and by `status`. Up to 0.2.0-beta.26 this returned every invite as
|
|
1348
|
+
* a plain array.
|
|
1349
|
+
*/
|
|
1350
|
+
list: (tenantId: string, options?: TenantInviteListOptions) => Promise<Paged<TenantInvite>>;
|
|
1337
1351
|
/**
|
|
1338
1352
|
* POST /env/tenants/{tenantId}/invites — invite an address. Always
|
|
1339
1353
|
* returns `acceptUrl`; with `sendEmail: false` Authyon does not mail
|
|
@@ -1468,8 +1482,12 @@ declare class TenantScopedClient {
|
|
|
1468
1482
|
validate(context?: ClientRequestContext): Promise<TenantClientValidationResult>;
|
|
1469
1483
|
/** Invites to the token's tenant, by e-mail or by link. */
|
|
1470
1484
|
readonly invites: {
|
|
1471
|
-
/**
|
|
1472
|
-
|
|
1485
|
+
/**
|
|
1486
|
+
* GET /tenant/invites — one page of the tenant's invites, newest first,
|
|
1487
|
+
* optionally narrowed by address (`search`) and by `status`. Up to
|
|
1488
|
+
* 0.2.0-beta.26 this returned every invite as a plain array.
|
|
1489
|
+
*/
|
|
1490
|
+
list: (options?: TenantInviteListOptions) => Promise<Paged<TenantInvite>>;
|
|
1473
1491
|
/** POST /tenant/invites — always returns `acceptUrl`; `sendEmail: false` skips the e-mail. */
|
|
1474
1492
|
create: (input: TenantInviteInput) => Promise<TenantInviteIssued>;
|
|
1475
1493
|
/** POST /tenant/invites/{inviteId}/resend — new link (the previous one stops working), mailed unless `sendEmail` is `false`. */
|
|
@@ -1525,4 +1543,4 @@ declare class TenantScopedClient {
|
|
|
1525
1543
|
/** Convenience factory: `const authyon = createClient({ clientId, clientSecret })`. */
|
|
1526
1544
|
declare function createClient(options?: AuthyonServerClientOptions): AuthyonServerClient;
|
|
1527
1545
|
|
|
1528
|
-
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
|
|
1546
|
+
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, UserScopedClient as aA, type ValidateResult as aB, type VerifiedAccessToken as aC, createClient as aD, normalizeClientIp as aE, tenantFilter as aF, 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 TenantInviteListOptions as am, type TenantInvitePreview as an, type TenantInviteStatus as ao, type TenantListOptions as ap, type TenantMember as aq, type TenantMemberPage as ar, type TenantMembership as as, type TenantOrderField as at, TenantScopedClient as au, type TokenResult as av, TokenVerificationError as aw, type TokenVerificationErrorCode as ax, type UpdateOrganizationInput as ay, type User 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 };
|
|
@@ -746,6 +746,15 @@ interface TenantInviteIssued {
|
|
|
746
746
|
redirectUri: string | null;
|
|
747
747
|
}
|
|
748
748
|
type TenantInviteStatus = "pending" | "accepted" | "revoked" | "expired";
|
|
749
|
+
/**
|
|
750
|
+
* Options for an invite listing. The API always orders newest first.
|
|
751
|
+
* `status` keeps only invites in any of the given states; omitted, every state.
|
|
752
|
+
*/
|
|
753
|
+
interface TenantInviteListOptions extends PaginationOptions {
|
|
754
|
+
/** Case-insensitive substring of the invited address. */
|
|
755
|
+
search?: string;
|
|
756
|
+
status?: TenantInviteStatus[];
|
|
757
|
+
}
|
|
749
758
|
interface TenantInvite {
|
|
750
759
|
id: string;
|
|
751
760
|
tenantId: string;
|
|
@@ -1332,8 +1341,13 @@ declare class AuthyonServerClient {
|
|
|
1332
1341
|
* credential's `authyon:users:write` scope (listing, `authyon:tenants:read`).
|
|
1333
1342
|
*/
|
|
1334
1343
|
invites: {
|
|
1335
|
-
/**
|
|
1336
|
-
|
|
1344
|
+
/**
|
|
1345
|
+
* GET /env/tenants/{tenantId}/invites — one page of the tenant's
|
|
1346
|
+
* invites, newest first, optionally narrowed by address (`search`)
|
|
1347
|
+
* and by `status`. Up to 0.2.0-beta.26 this returned every invite as
|
|
1348
|
+
* a plain array.
|
|
1349
|
+
*/
|
|
1350
|
+
list: (tenantId: string, options?: TenantInviteListOptions) => Promise<Paged<TenantInvite>>;
|
|
1337
1351
|
/**
|
|
1338
1352
|
* POST /env/tenants/{tenantId}/invites — invite an address. Always
|
|
1339
1353
|
* returns `acceptUrl`; with `sendEmail: false` Authyon does not mail
|
|
@@ -1468,8 +1482,12 @@ declare class TenantScopedClient {
|
|
|
1468
1482
|
validate(context?: ClientRequestContext): Promise<TenantClientValidationResult>;
|
|
1469
1483
|
/** Invites to the token's tenant, by e-mail or by link. */
|
|
1470
1484
|
readonly invites: {
|
|
1471
|
-
/**
|
|
1472
|
-
|
|
1485
|
+
/**
|
|
1486
|
+
* GET /tenant/invites — one page of the tenant's invites, newest first,
|
|
1487
|
+
* optionally narrowed by address (`search`) and by `status`. Up to
|
|
1488
|
+
* 0.2.0-beta.26 this returned every invite as a plain array.
|
|
1489
|
+
*/
|
|
1490
|
+
list: (options?: TenantInviteListOptions) => Promise<Paged<TenantInvite>>;
|
|
1473
1491
|
/** POST /tenant/invites — always returns `acceptUrl`; `sendEmail: false` skips the e-mail. */
|
|
1474
1492
|
create: (input: TenantInviteInput) => Promise<TenantInviteIssued>;
|
|
1475
1493
|
/** POST /tenant/invites/{inviteId}/resend — new link (the previous one stops working), mailed unless `sendEmail` is `false`. */
|
|
@@ -1525,4 +1543,4 @@ declare class TenantScopedClient {
|
|
|
1525
1543
|
/** Convenience factory: `const authyon = createClient({ clientId, clientSecret })`. */
|
|
1526
1544
|
declare function createClient(options?: AuthyonServerClientOptions): AuthyonServerClient;
|
|
1527
1545
|
|
|
1528
|
-
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
|
|
1546
|
+
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, UserScopedClient as aA, type ValidateResult as aB, type VerifiedAccessToken as aC, createClient as aD, normalizeClientIp as aE, tenantFilter as aF, 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 TenantInviteListOptions as am, type TenantInvitePreview as an, type TenantInviteStatus as ao, type TenantListOptions as ap, type TenantMember as aq, type TenantMemberPage as ar, type TenantMembership as as, type TenantOrderField as at, TenantScopedClient as au, type TokenResult as av, TokenVerificationError as aw, type TokenVerificationErrorCode as ax, type UpdateOrganizationInput as ay, type User 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-D7mSUfe5.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-D7mSUfe5.js';
|
|
2
2
|
import 'jose';
|
|
3
3
|
|
|
4
4
|
interface BffLoginInput {
|
|
@@ -238,11 +238,30 @@ function grants(granted, required) {
|
|
|
238
238
|
if (isFullWildcard(granted)) return true;
|
|
239
239
|
const grantedSegments = granted.split(":");
|
|
240
240
|
const requiredSegments = required.split(":");
|
|
241
|
+
if (isRecursive(grantedSegments) || isRecursive(requiredSegments)) {
|
|
242
|
+
return grantsRecursive(grantedSegments, requiredSegments);
|
|
243
|
+
}
|
|
241
244
|
if (grantedSegments.length !== requiredSegments.length) return false;
|
|
242
245
|
return grantedSegments.every(
|
|
243
246
|
(segment, index) => segment === "*" || segment === requiredSegments[index]
|
|
244
247
|
);
|
|
245
248
|
}
|
|
249
|
+
var RECURSIVE_WILDCARD = "**";
|
|
250
|
+
function isRecursive(segments) {
|
|
251
|
+
return segments[segments.length - 1] === RECURSIVE_WILDCARD;
|
|
252
|
+
}
|
|
253
|
+
function grantsRecursive(granted, required) {
|
|
254
|
+
if (!isRecursive(granted)) return false;
|
|
255
|
+
if (granted.slice(0, -1).includes(RECURSIVE_WILDCARD)) return false;
|
|
256
|
+
if (required.slice(0, -1).includes(RECURSIVE_WILDCARD)) return false;
|
|
257
|
+
const prefix = granted.length - 1;
|
|
258
|
+
const requiredPinned = isRecursive(required) ? required.length - 1 : required.length;
|
|
259
|
+
if (isRecursive(required) ? requiredPinned < prefix : requiredPinned <= prefix) return false;
|
|
260
|
+
for (let index = 0; index < prefix; index++) {
|
|
261
|
+
if (granted[index] !== "*" && granted[index] !== required[index]) return false;
|
|
262
|
+
}
|
|
263
|
+
return true;
|
|
264
|
+
}
|
|
246
265
|
function isWellFormedPermission(permission) {
|
|
247
266
|
if (!permission) return false;
|
|
248
267
|
const segments = permission.split(":");
|
package/dist/index.cjs
CHANGED
|
@@ -287,6 +287,33 @@ var UserScopedClient = class {
|
|
|
287
287
|
};
|
|
288
288
|
_request = new WeakMap();
|
|
289
289
|
|
|
290
|
+
// src/client/inviteQuery.ts
|
|
291
|
+
var STATUSES = /* @__PURE__ */ new Set([
|
|
292
|
+
"pending",
|
|
293
|
+
"accepted",
|
|
294
|
+
"revoked",
|
|
295
|
+
"expired"
|
|
296
|
+
]);
|
|
297
|
+
function inviteQuery(options = {}) {
|
|
298
|
+
const { skip, take, search, status } = options;
|
|
299
|
+
if (skip !== void 0 && (!Number.isInteger(skip) || skip < 0 || skip > 2147483647))
|
|
300
|
+
throw new RangeError("Authyon: invalid skip.");
|
|
301
|
+
if (take !== void 0 && (!Number.isInteger(take) || take < 1 || take > 100))
|
|
302
|
+
throw new RangeError("Authyon: take must be between 1 and 100.");
|
|
303
|
+
if (search !== void 0 && (typeof search !== "string" || search.trim().length > 254))
|
|
304
|
+
throw new RangeError("Authyon: search must contain at most 254 characters.");
|
|
305
|
+
let statuses;
|
|
306
|
+
if (status !== void 0) {
|
|
307
|
+
if (!Array.isArray(status)) throw new TypeError("Authyon: status must be an array.");
|
|
308
|
+
const normalized = status.map((s) => String(s).trim().toLowerCase()).filter((s) => s.length > 0);
|
|
309
|
+
const unknown = normalized.find((s) => !STATUSES.has(s));
|
|
310
|
+
if (unknown) throw new RangeError(`Authyon: unknown invite status "${unknown}".`);
|
|
311
|
+
statuses = [...new Set(normalized)];
|
|
312
|
+
if (statuses.length === 0) statuses = void 0;
|
|
313
|
+
}
|
|
314
|
+
return { search: search?.trim() || void 0, skip, take, status: statuses };
|
|
315
|
+
}
|
|
316
|
+
|
|
290
317
|
// ../../internal/core/config/defaults.ts
|
|
291
318
|
var DEFAULT_BASE_URL = "https://api.authyon.com";
|
|
292
319
|
var DEFAULT_EXPIRY_SKEW_MS = 3e4;
|
|
@@ -1257,8 +1284,16 @@ var AuthyonServerClient = class {
|
|
|
1257
1284
|
* credential's `authyon:users:write` scope (listing, `authyon:tenants:read`).
|
|
1258
1285
|
*/
|
|
1259
1286
|
invites: {
|
|
1260
|
-
/**
|
|
1261
|
-
|
|
1287
|
+
/**
|
|
1288
|
+
* GET /env/tenants/{tenantId}/invites — one page of the tenant's
|
|
1289
|
+
* invites, newest first, optionally narrowed by address (`search`)
|
|
1290
|
+
* and by `status`. Up to 0.2.0-beta.26 this returned every invite as
|
|
1291
|
+
* a plain array.
|
|
1292
|
+
*/
|
|
1293
|
+
list: (tenantId, options = {}) => this.request(`/env/tenants/${encodeURIComponent(tenantId)}/invites`, {
|
|
1294
|
+
envBearer: true,
|
|
1295
|
+
query: inviteQuery(options)
|
|
1296
|
+
}),
|
|
1262
1297
|
/**
|
|
1263
1298
|
* POST /env/tenants/{tenantId}/invites — invite an address. Always
|
|
1264
1299
|
* returns `acceptUrl`; with `sendEmail: false` Authyon does not mail
|
|
@@ -1554,8 +1589,12 @@ var TenantScopedClient = class {
|
|
|
1554
1589
|
constructor(server, credentials) {
|
|
1555
1590
|
/** Invites to the token's tenant, by e-mail or by link. */
|
|
1556
1591
|
this.invites = {
|
|
1557
|
-
/**
|
|
1558
|
-
|
|
1592
|
+
/**
|
|
1593
|
+
* GET /tenant/invites — one page of the tenant's invites, newest first,
|
|
1594
|
+
* optionally narrowed by address (`search`) and by `status`. Up to
|
|
1595
|
+
* 0.2.0-beta.26 this returned every invite as a plain array.
|
|
1596
|
+
*/
|
|
1597
|
+
list: (options = {}) => this.request("/tenant/invites", { query: inviteQuery(options) }),
|
|
1559
1598
|
/** POST /tenant/invites — always returns `acceptUrl`; `sendEmail: false` skips the e-mail. */
|
|
1560
1599
|
create: (input) => this.request("/tenant/invites", {
|
|
1561
1600
|
method: "POST",
|
|
@@ -1851,11 +1890,30 @@ function grants(granted, required) {
|
|
|
1851
1890
|
if (isFullWildcard(granted)) return true;
|
|
1852
1891
|
const grantedSegments = granted.split(":");
|
|
1853
1892
|
const requiredSegments = required.split(":");
|
|
1893
|
+
if (isRecursive(grantedSegments) || isRecursive(requiredSegments)) {
|
|
1894
|
+
return grantsRecursive(grantedSegments, requiredSegments);
|
|
1895
|
+
}
|
|
1854
1896
|
if (grantedSegments.length !== requiredSegments.length) return false;
|
|
1855
1897
|
return grantedSegments.every(
|
|
1856
1898
|
(segment2, index) => segment2 === "*" || segment2 === requiredSegments[index]
|
|
1857
1899
|
);
|
|
1858
1900
|
}
|
|
1901
|
+
var RECURSIVE_WILDCARD = "**";
|
|
1902
|
+
function isRecursive(segments) {
|
|
1903
|
+
return segments[segments.length - 1] === RECURSIVE_WILDCARD;
|
|
1904
|
+
}
|
|
1905
|
+
function grantsRecursive(granted, required) {
|
|
1906
|
+
if (!isRecursive(granted)) return false;
|
|
1907
|
+
if (granted.slice(0, -1).includes(RECURSIVE_WILDCARD)) return false;
|
|
1908
|
+
if (required.slice(0, -1).includes(RECURSIVE_WILDCARD)) return false;
|
|
1909
|
+
const prefix = granted.length - 1;
|
|
1910
|
+
const requiredPinned = isRecursive(required) ? required.length - 1 : required.length;
|
|
1911
|
+
if (isRecursive(required) ? requiredPinned < prefix : requiredPinned <= prefix) return false;
|
|
1912
|
+
for (let index = 0; index < prefix; index++) {
|
|
1913
|
+
if (granted[index] !== "*" && granted[index] !== required[index]) return false;
|
|
1914
|
+
}
|
|
1915
|
+
return true;
|
|
1916
|
+
}
|
|
1859
1917
|
function isWellFormedPermission(permission) {
|
|
1860
1918
|
if (!permission) return false;
|
|
1861
1919
|
const segments = permission.split(":");
|
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
|
|
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-D7mSUfe5.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 TenantInviteListOptions, an as TenantInvitePreview, ao as TenantInviteStatus, ap as TenantListOptions, aq as TenantMember, ar as TenantMemberPage, as as TenantMembership, at as TenantOrderField, au as TenantScopedClient, av as TokenResult, aw as TokenVerificationError, ax as TokenVerificationErrorCode, ay as UpdateOrganizationInput, az as User, aA as UserScopedClient, aB as ValidateResult, aC as VerifiedAccessToken, aD as createClient, aE as normalizeClientIp, aF as tenantFilter } from './authyonServerClient-D7mSUfe5.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-RHojgDKD.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
|
|
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-D7mSUfe5.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 TenantInviteListOptions, an as TenantInvitePreview, ao as TenantInviteStatus, ap as TenantListOptions, aq as TenantMember, ar as TenantMemberPage, as as TenantMembership, at as TenantOrderField, au as TenantScopedClient, av as TokenResult, aw as TokenVerificationError, ax as TokenVerificationErrorCode, ay as UpdateOrganizationInput, az as User, aA as UserScopedClient, aB as ValidateResult, aC as VerifiedAccessToken, aD as createClient, aE as normalizeClientIp, aF as tenantFilter } from './authyonServerClient-D7mSUfe5.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-gJv_i_p5.js';
|
|
4
4
|
import 'jose';
|
|
5
5
|
|
|
6
6
|
declare const ErrorCodes: {
|
package/dist/index.js
CHANGED
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
hasPermission,
|
|
26
26
|
hasPermissionGroup,
|
|
27
27
|
normalizeClientIp
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-V6JQIOSP.js";
|
|
29
29
|
import {
|
|
30
30
|
__privateAdd,
|
|
31
31
|
__privateGet,
|
|
@@ -259,6 +259,33 @@ var UserScopedClient = class {
|
|
|
259
259
|
};
|
|
260
260
|
_request = new WeakMap();
|
|
261
261
|
|
|
262
|
+
// src/client/inviteQuery.ts
|
|
263
|
+
var STATUSES = /* @__PURE__ */ new Set([
|
|
264
|
+
"pending",
|
|
265
|
+
"accepted",
|
|
266
|
+
"revoked",
|
|
267
|
+
"expired"
|
|
268
|
+
]);
|
|
269
|
+
function inviteQuery(options = {}) {
|
|
270
|
+
const { skip, take, search, status } = options;
|
|
271
|
+
if (skip !== void 0 && (!Number.isInteger(skip) || skip < 0 || skip > 2147483647))
|
|
272
|
+
throw new RangeError("Authyon: invalid skip.");
|
|
273
|
+
if (take !== void 0 && (!Number.isInteger(take) || take < 1 || take > 100))
|
|
274
|
+
throw new RangeError("Authyon: take must be between 1 and 100.");
|
|
275
|
+
if (search !== void 0 && (typeof search !== "string" || search.trim().length > 254))
|
|
276
|
+
throw new RangeError("Authyon: search must contain at most 254 characters.");
|
|
277
|
+
let statuses;
|
|
278
|
+
if (status !== void 0) {
|
|
279
|
+
if (!Array.isArray(status)) throw new TypeError("Authyon: status must be an array.");
|
|
280
|
+
const normalized = status.map((s) => String(s).trim().toLowerCase()).filter((s) => s.length > 0);
|
|
281
|
+
const unknown = normalized.find((s) => !STATUSES.has(s));
|
|
282
|
+
if (unknown) throw new RangeError(`Authyon: unknown invite status "${unknown}".`);
|
|
283
|
+
statuses = [...new Set(normalized)];
|
|
284
|
+
if (statuses.length === 0) statuses = void 0;
|
|
285
|
+
}
|
|
286
|
+
return { search: search?.trim() || void 0, skip, take, status: statuses };
|
|
287
|
+
}
|
|
288
|
+
|
|
262
289
|
// ../../internal/core/auth/expiringTokenProvider.ts
|
|
263
290
|
var _token, _inFlight;
|
|
264
291
|
var ExpiringTokenProvider = class {
|
|
@@ -719,8 +746,16 @@ var AuthyonServerClient = class {
|
|
|
719
746
|
* credential's `authyon:users:write` scope (listing, `authyon:tenants:read`).
|
|
720
747
|
*/
|
|
721
748
|
invites: {
|
|
722
|
-
/**
|
|
723
|
-
|
|
749
|
+
/**
|
|
750
|
+
* GET /env/tenants/{tenantId}/invites — one page of the tenant's
|
|
751
|
+
* invites, newest first, optionally narrowed by address (`search`)
|
|
752
|
+
* and by `status`. Up to 0.2.0-beta.26 this returned every invite as
|
|
753
|
+
* a plain array.
|
|
754
|
+
*/
|
|
755
|
+
list: (tenantId, options = {}) => this.request(`/env/tenants/${encodeURIComponent(tenantId)}/invites`, {
|
|
756
|
+
envBearer: true,
|
|
757
|
+
query: inviteQuery(options)
|
|
758
|
+
}),
|
|
724
759
|
/**
|
|
725
760
|
* POST /env/tenants/{tenantId}/invites — invite an address. Always
|
|
726
761
|
* returns `acceptUrl`; with `sendEmail: false` Authyon does not mail
|
|
@@ -1016,8 +1051,12 @@ var TenantScopedClient = class {
|
|
|
1016
1051
|
constructor(server, credentials) {
|
|
1017
1052
|
/** Invites to the token's tenant, by e-mail or by link. */
|
|
1018
1053
|
this.invites = {
|
|
1019
|
-
/**
|
|
1020
|
-
|
|
1054
|
+
/**
|
|
1055
|
+
* GET /tenant/invites — one page of the tenant's invites, newest first,
|
|
1056
|
+
* optionally narrowed by address (`search`) and by `status`. Up to
|
|
1057
|
+
* 0.2.0-beta.26 this returned every invite as a plain array.
|
|
1058
|
+
*/
|
|
1059
|
+
list: (options = {}) => this.request("/tenant/invites", { query: inviteQuery(options) }),
|
|
1021
1060
|
/** POST /tenant/invites — always returns `acceptUrl`; `sendEmail: false` skips the e-mail. */
|
|
1022
1061
|
create: (input) => this.request("/tenant/invites", {
|
|
1023
1062
|
method: "POST",
|
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-RHojgDKD.cjs';
|
|
3
|
+
import { A as AuthyonServerClient } from './authyonServerClient-D7mSUfe5.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-gJv_i_p5.js';
|
|
3
|
+
import { A as AuthyonServerClient } from './authyonServerClient-D7mSUfe5.js';
|
|
4
4
|
import 'jose';
|
|
5
5
|
|
|
6
6
|
interface ServerPermissionGuardFallbackContext {
|
package/dist/next.js
CHANGED
package/package.json
CHANGED