@authyon/auth 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 +40 -39
- package/dist/{ability-CmJEviJj.d.cts → ability-DBh_yZ5o.d.cts} +356 -102
- package/dist/{ability-CmJEviJj.d.ts → ability-DBh_yZ5o.d.ts} +356 -102
- package/dist/index.cjs +141 -67
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +141 -67
- package/dist/react/index.d.cts +2 -2
- package/dist/react/index.d.ts +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -481,6 +481,38 @@ function memberQuery(options = {}) {
|
|
|
481
481
|
var ORDER_FIELDS = ["name", "createdAt", "updatedAt"];
|
|
482
482
|
var MAX_FILTERS = 10;
|
|
483
483
|
var MAX_FILTER_LENGTH = 512;
|
|
484
|
+
var MAX_PERMISSIONS = 10;
|
|
485
|
+
var MAX_PERMISSION_LENGTH = 256;
|
|
486
|
+
function permissionQuery(options = {}) {
|
|
487
|
+
const { permission, permissionMatch } = options;
|
|
488
|
+
const query = {};
|
|
489
|
+
if (permissionMatch !== void 0) {
|
|
490
|
+
if (permissionMatch !== "all" && permissionMatch !== "any")
|
|
491
|
+
throw new RangeError('Authyon: permissionMatch must be "all" or "any".');
|
|
492
|
+
query.permissionMatch = permissionMatch;
|
|
493
|
+
}
|
|
494
|
+
if (permission === void 0) return query;
|
|
495
|
+
if (!Array.isArray(permission)) throw new RangeError("Authyon: permission must be an array.");
|
|
496
|
+
const values = permission.map((p) => typeof p === "string" ? p.trim() : "");
|
|
497
|
+
if (values.some((p) => p.length === 0))
|
|
498
|
+
throw new RangeError("Authyon: a permission value may not be empty.");
|
|
499
|
+
if (values.length > MAX_PERMISSIONS)
|
|
500
|
+
throw new RangeError(`Authyon: at most ${MAX_PERMISSIONS} permission values per request.`);
|
|
501
|
+
for (const p of values) {
|
|
502
|
+
if (p.length > MAX_PERMISSION_LENGTH)
|
|
503
|
+
throw new RangeError(
|
|
504
|
+
`Authyon: a permission holds at most ${MAX_PERMISSION_LENGTH} characters.`
|
|
505
|
+
);
|
|
506
|
+
if (p.includes("*"))
|
|
507
|
+
throw new RangeError(`Authyon: name a concrete permission, not a wildcard (got "${p}").`);
|
|
508
|
+
}
|
|
509
|
+
if (values.length > 0) query.permission = values;
|
|
510
|
+
return query;
|
|
511
|
+
}
|
|
512
|
+
function tenantListQuery(options = {}) {
|
|
513
|
+
const { permission, permissionMatch, ...page } = options;
|
|
514
|
+
return { ...memberQuery(page), ...permissionQuery({ permission, permissionMatch }) };
|
|
515
|
+
}
|
|
484
516
|
function orderByParam(order) {
|
|
485
517
|
if (order === void 0) return void 0;
|
|
486
518
|
const field = typeof order === "string" ? order : order?.field;
|
|
@@ -492,8 +524,11 @@ function orderByParam(order) {
|
|
|
492
524
|
return `${field}:${direction}`;
|
|
493
525
|
}
|
|
494
526
|
function subTenantQuery(options = {}) {
|
|
495
|
-
const { filter, orderBy, ...page } = options;
|
|
496
|
-
const query = {
|
|
527
|
+
const { filter, orderBy, permission, permissionMatch, ...page } = options;
|
|
528
|
+
const query = {
|
|
529
|
+
...memberQuery(page),
|
|
530
|
+
...permissionQuery({ permission, permissionMatch })
|
|
531
|
+
};
|
|
497
532
|
if (filter !== void 0) {
|
|
498
533
|
if (!Array.isArray(filter)) throw new RangeError("Authyon: filter must be an array.");
|
|
499
534
|
const present = filter.filter((f) => typeof f === "string" && f.trim().length > 0);
|
|
@@ -516,6 +551,15 @@ function subTenantQuery(options = {}) {
|
|
|
516
551
|
return query;
|
|
517
552
|
}
|
|
518
553
|
|
|
554
|
+
// ../../internal/core/http/tenantLookup.ts
|
|
555
|
+
var UUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/iu;
|
|
556
|
+
function tenantLookupPath(idOrSlug) {
|
|
557
|
+
const value = typeof idOrSlug === "string" ? idOrSlug.trim() : "";
|
|
558
|
+
if (!value) throw new RangeError("Authyon: a tenant id or slug is required.");
|
|
559
|
+
if (value.length > 64) throw new RangeError("Authyon: a tenant slug has at most 64 characters.");
|
|
560
|
+
return UUID.test(value) ? `/auth/tenants/${encodeURIComponent(value)}` : `/auth/tenants/by-slug/${encodeURIComponent(value.toLowerCase())}`;
|
|
561
|
+
}
|
|
562
|
+
|
|
519
563
|
// src/client/authyonClient.ts
|
|
520
564
|
var FALLBACK_EXPIRES_IN = 1800;
|
|
521
565
|
function readTokens(raw) {
|
|
@@ -624,54 +668,75 @@ var AuthyonClient = class {
|
|
|
624
668
|
return { redirectUri: done?.redirectUri ?? null };
|
|
625
669
|
}
|
|
626
670
|
};
|
|
627
|
-
// ──
|
|
628
|
-
this.
|
|
671
|
+
// ── Tenant ─────────────────────────────────────────────────────────
|
|
672
|
+
this.tenants = {
|
|
629
673
|
/**
|
|
630
|
-
* GET /auth/tenants — filterable list of
|
|
674
|
+
* GET /auth/tenants — filterable list of tenant memberships.
|
|
631
675
|
*
|
|
632
|
-
* Also lists the
|
|
676
|
+
* Also lists the tenants below them that the user may switch into
|
|
633
677
|
* without being a member, marked `inherited` — only the ones that actually
|
|
634
|
-
* carry `subtenants:tree:switch`, so the switcher never offers
|
|
635
|
-
*
|
|
678
|
+
* carry `subtenants:tree:switch`, so the switcher never offers a
|
|
679
|
+
* tenant the switch would then refuse. `depth` indents the list into
|
|
636
680
|
* the tree it describes.
|
|
681
|
+
*
|
|
682
|
+
* `search`, `skip`/`take` and the permission filter (`permission`,
|
|
683
|
+
* `permissionMatch`) narrow it — see `TenantListParams`. The answer stays
|
|
684
|
+
* a plain array. A bad option raises `RangeError` before any request.
|
|
685
|
+
* APIs older than 2026-11-27 ignored every option and always answered the
|
|
686
|
+
* whole list.
|
|
637
687
|
*/
|
|
638
|
-
list: (params = {}) => this.request(appendQuery("/auth/tenants", params), { bearer: true }),
|
|
688
|
+
list: (params = {}) => this.request(appendQuery("/auth/tenants", tenantListQuery(params)), { bearer: true }),
|
|
639
689
|
/**
|
|
640
|
-
* POST /auth/tenants — creates
|
|
641
|
-
* user (only available when self-service
|
|
690
|
+
* POST /auth/tenants — creates a tenant owned by the signed-in
|
|
691
|
+
* user (only available when self-service tenant creation is
|
|
642
692
|
* enabled for the environment).
|
|
643
693
|
*
|
|
644
694
|
* `parentTenantId` nests it under one the user already belongs to, which
|
|
645
695
|
* needs `subtenants:tree:create` there. The creator lands as the effective
|
|
646
696
|
* owner either way, with `tenants:settings:manage`,
|
|
647
697
|
* `tenants:members:invite` and `tenants:members:remove` granted directly
|
|
648
|
-
* inside the new
|
|
698
|
+
* inside the new tenant.
|
|
649
699
|
*/
|
|
650
700
|
create: (params = {}) => this.request("/auth/tenants", { method: "POST", bearer: true, body: params }),
|
|
651
|
-
/** GET /auth/tenants/{organizationId} — fetch one of the user's organizations by id. */
|
|
652
|
-
get: (organizationId) => this.request(`/auth/tenants/${encodeURIComponent(organizationId)}`, { bearer: true }),
|
|
653
701
|
/**
|
|
654
|
-
*
|
|
702
|
+
* GET /auth/tenants/{tenantId} — one tenant by id: the user's own,
|
|
703
|
+
* or one below it with `subtenants:tree:read` on an ancestor.
|
|
704
|
+
*/
|
|
705
|
+
get: (tenantId) => this.request(`/auth/tenants/${encodeURIComponent(tenantId)}`, { bearer: true }),
|
|
706
|
+
/**
|
|
707
|
+
* One tenant by id **or** slug — a UUID goes to `GET /auth/tenants/{id}`,
|
|
708
|
+
* anything else to `GET /auth/tenants/by-slug/{slug}`. Same access rule and
|
|
709
|
+
* same answer as `get`, so a page that only has the slug from its URL
|
|
710
|
+
* doesn't have to page `subTenants.list` to find it.
|
|
711
|
+
*
|
|
712
|
+
* By slug, every refusal answers `tenant.not_found` (a slug is guessable,
|
|
713
|
+
* so "exists, not yours" is never told apart from "doesn't exist"). An
|
|
714
|
+
* empty value raises `RangeError` before any request. The slug route needs
|
|
715
|
+
* the Authyon API of 2026-11-26 or newer.
|
|
716
|
+
*/
|
|
717
|
+
find: (idOrSlug) => this.request(tenantLookupPath(idOrSlug), { bearer: true }),
|
|
718
|
+
/**
|
|
719
|
+
* PATCH /auth/tenants/{tenantId} — renames the tenant.
|
|
655
720
|
*
|
|
656
721
|
* Requires the `tenants:settings:manage` custom permission on it, or
|
|
657
|
-
* `subtenants:tree:manage` on
|
|
722
|
+
* `subtenants:tree:manage` on a tenant above it. The value was
|
|
658
723
|
* spelled `tenants:manage` before 2026-10-31 — two segments, which the API
|
|
659
724
|
* could not store, so the endpoint refused everyone who had been granted
|
|
660
725
|
* it.
|
|
661
726
|
*/
|
|
662
|
-
rename: (
|
|
727
|
+
rename: (tenantId, name) => this.request(`/auth/tenants/${encodeURIComponent(tenantId)}`, {
|
|
663
728
|
method: "PATCH",
|
|
664
729
|
bearer: true,
|
|
665
730
|
body: { name }
|
|
666
731
|
}),
|
|
667
732
|
/**
|
|
668
733
|
* POST /auth/switch-tenant — issues a fresh token scoped to the new
|
|
669
|
-
*
|
|
734
|
+
* tenant.
|
|
670
735
|
*
|
|
671
|
-
* Membership is enough for one of the user's own
|
|
672
|
-
* into one below it takes `subtenants:tree:switch` at the
|
|
736
|
+
* Membership is enough for one of the user's own tenants. Descending
|
|
737
|
+
* into one below it takes `subtenants:tree:switch` at the tenant they
|
|
673
738
|
* belong to — deliberately not the same permission as administering a
|
|
674
|
-
* sub-
|
|
739
|
+
* sub-tenant from the outside, since operating AS it is the larger of
|
|
675
740
|
* the two powers. The grants then travel from the node the user belongs to,
|
|
676
741
|
* and the token says so in its `tenant.via`.
|
|
677
742
|
*
|
|
@@ -679,61 +744,58 @@ var AuthyonClient = class {
|
|
|
679
744
|
* `tenant.ancestor_disabled`, and `tenant.path_stale` when the tree moved
|
|
680
745
|
* under a session — sign-in again rather than retrying.
|
|
681
746
|
*/
|
|
682
|
-
switch: (
|
|
747
|
+
switch: (tenantSlug) => this.request("/auth/switch-tenant", {
|
|
683
748
|
method: "POST",
|
|
684
749
|
bearer: true,
|
|
685
|
-
body: { tenantSlug
|
|
750
|
+
body: { tenantSlug }
|
|
686
751
|
}).then((data) => this.setSession({ tokens: readTokens(data) }, "refreshed")).then((session) => this.hydrateUser(session)),
|
|
687
|
-
/** The
|
|
688
|
-
current: () => this.getSession()?.user?.
|
|
752
|
+
/** The tenant the current session is scoped to, from the cached session — no network call. */
|
|
753
|
+
current: () => this.getSession()?.user?.activeTenant ?? null,
|
|
689
754
|
members: {
|
|
690
755
|
/**
|
|
691
|
-
* GET /auth/tenants/{
|
|
692
|
-
*
|
|
756
|
+
* GET /auth/tenants/{tenantId}/members — paginated list of an
|
|
757
|
+
* tenant's members, newest first, in the `Paged<T>` envelope every
|
|
693
758
|
* other `skip`/`take` endpoint returns. `search` matches email, username
|
|
694
759
|
* or name; at most 100 characters, and `take` 1-100, checked before any
|
|
695
760
|
* request.
|
|
696
761
|
*/
|
|
697
|
-
list: (
|
|
698
|
-
appendQuery(
|
|
699
|
-
`/auth/tenants/${encodeURIComponent(organizationId)}/members`,
|
|
700
|
-
memberQuery(params)
|
|
701
|
-
),
|
|
762
|
+
list: (tenantId, params = {}) => this.request(
|
|
763
|
+
appendQuery(`/auth/tenants/${encodeURIComponent(tenantId)}/members`, memberQuery(params)),
|
|
702
764
|
{ bearer: true }
|
|
703
765
|
),
|
|
704
766
|
/**
|
|
705
|
-
* POST /auth/tenants/{
|
|
767
|
+
* POST /auth/tenants/{tenantId}/members — add an existing
|
|
706
768
|
* environment user by e-mail (no e-mail is sent). To invite an address
|
|
707
|
-
* that may not have an account yet, use `
|
|
769
|
+
* that may not have an account yet, use `tenants.invites.create`.
|
|
708
770
|
*/
|
|
709
|
-
invite: (
|
|
771
|
+
invite: (tenantId, params) => this.request(`/auth/tenants/${encodeURIComponent(tenantId)}/members`, {
|
|
710
772
|
method: "POST",
|
|
711
773
|
bearer: true,
|
|
712
774
|
body: params
|
|
713
775
|
}),
|
|
714
|
-
/** DELETE /auth/tenants/{
|
|
715
|
-
remove: (
|
|
716
|
-
`/auth/tenants/${encodeURIComponent(
|
|
776
|
+
/** DELETE /auth/tenants/{tenantId}/members/{userId} — remove a member. */
|
|
777
|
+
remove: (tenantId, userId) => this.request(
|
|
778
|
+
`/auth/tenants/${encodeURIComponent(tenantId)}/members/${encodeURIComponent(userId)}`,
|
|
717
779
|
{ method: "DELETE", bearer: true }
|
|
718
780
|
)
|
|
719
781
|
},
|
|
720
782
|
/**
|
|
721
783
|
* Invites by e-mail or by link. Managing them requires the
|
|
722
|
-
* `tenants:members:invite` permission on the
|
|
784
|
+
* `tenants:members:invite` permission on the tenant; `preview` and
|
|
723
785
|
* `accept` are public — the token in the link is the credential.
|
|
724
786
|
*/
|
|
725
787
|
invites: {
|
|
726
|
-
/** GET /auth/tenants/{
|
|
727
|
-
list: (
|
|
788
|
+
/** GET /auth/tenants/{tenantId}/invites — every invite with its status, newest first. */
|
|
789
|
+
list: (tenantId) => this.request(`/auth/tenants/${encodeURIComponent(tenantId)}/invites`, {
|
|
728
790
|
bearer: true
|
|
729
791
|
}),
|
|
730
792
|
/**
|
|
731
|
-
* POST /auth/tenants/{
|
|
793
|
+
* POST /auth/tenants/{tenantId}/invites — invite an address.
|
|
732
794
|
* Always returns `acceptUrl`; with `sendEmail: false` Authyon does not
|
|
733
795
|
* mail it and you deliver the link yourself. The link is valid for 7
|
|
734
796
|
* days, once, and can't be read again later.
|
|
735
797
|
*/
|
|
736
|
-
create: (
|
|
798
|
+
create: (tenantId, params) => this.request(`/auth/tenants/${encodeURIComponent(tenantId)}/invites`, {
|
|
737
799
|
method: "POST",
|
|
738
800
|
bearer: true,
|
|
739
801
|
body: {
|
|
@@ -744,17 +806,17 @@ var AuthyonClient = class {
|
|
|
744
806
|
}
|
|
745
807
|
}),
|
|
746
808
|
/**
|
|
747
|
-
* POST /auth/tenants/{
|
|
809
|
+
* POST /auth/tenants/{tenantId}/invites/{inviteId}/resend — issue
|
|
748
810
|
* a new link (the previous one stops working), mailing it unless
|
|
749
811
|
* `sendEmail` is `false`.
|
|
750
812
|
*/
|
|
751
|
-
resend: (
|
|
752
|
-
`/auth/tenants/${encodeURIComponent(
|
|
813
|
+
resend: (tenantId, inviteId, params = {}) => this.request(
|
|
814
|
+
`/auth/tenants/${encodeURIComponent(tenantId)}/invites/${encodeURIComponent(inviteId)}/resend`,
|
|
753
815
|
{ method: "POST", bearer: true, body: { sendEmail: params.sendEmail ?? true } }
|
|
754
816
|
),
|
|
755
|
-
/** DELETE /auth/tenants/{
|
|
756
|
-
revoke: (
|
|
757
|
-
`/auth/tenants/${encodeURIComponent(
|
|
817
|
+
/** DELETE /auth/tenants/{tenantId}/invites/{inviteId} — revoke a pending invite. */
|
|
818
|
+
revoke: (tenantId, inviteId) => this.request(
|
|
819
|
+
`/auth/tenants/${encodeURIComponent(tenantId)}/invites/${encodeURIComponent(inviteId)}`,
|
|
758
820
|
{ method: "DELETE", bearer: true }
|
|
759
821
|
),
|
|
760
822
|
/**
|
|
@@ -764,41 +826,41 @@ var AuthyonClient = class {
|
|
|
764
826
|
*/
|
|
765
827
|
preview: (token) => this.request("/auth/tenant-invites/preview", { method: "POST", body: { token } }),
|
|
766
828
|
/**
|
|
767
|
-
* POST /auth/tenant-invites/accept — public. Joins the
|
|
829
|
+
* POST /auth/tenant-invites/accept — public. Joins the tenant; for
|
|
768
830
|
* an address with no account, also creates it (password required) with
|
|
769
831
|
* the e-mail already confirmed. Does not sign the user in.
|
|
770
832
|
*/
|
|
771
833
|
accept: (params) => this.request("/auth/tenant-invites/accept", { method: "POST", body: params })
|
|
772
834
|
},
|
|
773
835
|
/**
|
|
774
|
-
* The direct, active sub-
|
|
836
|
+
* The direct, active sub-tenants of a tenant. One level per
|
|
775
837
|
* call: each row's `childCount` says where the next call is worth making,
|
|
776
838
|
* which is what a lazily expanded tree asks for.
|
|
777
839
|
*
|
|
778
|
-
* Needs `subtenants:tree:read` on the
|
|
779
|
-
* even on the user's own
|
|
840
|
+
* Needs `subtenants:tree:read` on the tenant or on one above it —
|
|
841
|
+
* even on the user's own tenant, since listing the children is
|
|
780
842
|
* reading below it. Paged like every other `skip`/`take` listing, with
|
|
781
843
|
* `search` (name, slug, description and public metadata), `filter` (public
|
|
782
844
|
* scope only — build them with `tenantFilter`) and `orderBy`
|
|
783
845
|
* (`name` | `createdAt` | `updatedAt`, ascending or descending). A bad
|
|
784
846
|
* option raises `RangeError` before any request.
|
|
785
847
|
*
|
|
786
|
-
* Not the same list as `
|
|
848
|
+
* Not the same list as `tenants.list()`, which is the switcher's and
|
|
787
849
|
* only brings what `subtenants:tree:switch` lets the user enter. Requires
|
|
788
850
|
* the Authyon API of 2026-11-26 or newer.
|
|
789
851
|
*/
|
|
790
|
-
|
|
791
|
-
/** GET /auth/tenants/{
|
|
792
|
-
list: (
|
|
852
|
+
subTenants: {
|
|
853
|
+
/** GET /auth/tenants/{tenantId}/subtenants. */
|
|
854
|
+
list: (tenantId, params = {}) => this.request(
|
|
793
855
|
appendQuery(
|
|
794
|
-
`/auth/tenants/${encodeURIComponent(
|
|
856
|
+
`/auth/tenants/${encodeURIComponent(tenantId)}/subtenants`,
|
|
795
857
|
subTenantQuery(params)
|
|
796
858
|
),
|
|
797
859
|
{ bearer: true }
|
|
798
860
|
),
|
|
799
861
|
/**
|
|
800
|
-
* GET /auth/tenants/subtenants — the same, for the
|
|
801
|
-
* session is scoped to (`
|
|
862
|
+
* GET /auth/tenants/subtenants — the same, for the tenant the
|
|
863
|
+
* session is scoped to (`tenants.current()`, the token's
|
|
802
864
|
* `tenant_id`). Same permission rule; answers `tenant.no_active_tenant`
|
|
803
865
|
* when the session never switched into one.
|
|
804
866
|
*/
|
|
@@ -807,12 +869,19 @@ var AuthyonClient = class {
|
|
|
807
869
|
})
|
|
808
870
|
},
|
|
809
871
|
roles: {
|
|
810
|
-
/** GET /auth/tenants/{
|
|
811
|
-
list: (
|
|
872
|
+
/** GET /auth/tenants/{tenantId}/roles — roles available in the tenant. */
|
|
873
|
+
list: (tenantId) => this.request(`/auth/tenants/${encodeURIComponent(tenantId)}/roles`, {
|
|
812
874
|
bearer: true
|
|
813
875
|
})
|
|
814
876
|
}
|
|
815
877
|
};
|
|
878
|
+
/**
|
|
879
|
+
* @deprecated Use `tenants` — the same methods, named after the API's own
|
|
880
|
+
* vocabulary (`tenants.subTenants` instead of `subOrganizations`). Kept so
|
|
881
|
+
* code written against 0.2.0-beta.30 and earlier keeps working; removed in a
|
|
882
|
+
* later release.
|
|
883
|
+
*/
|
|
884
|
+
this.organization = { ...this.tenants, subOrganizations: this.tenants.subTenants };
|
|
816
885
|
// ── Two-factor management (authenticated) ────────────────────────────────
|
|
817
886
|
this.twoFactor = {
|
|
818
887
|
/** GET /auth/2fa/status — enrolled methods and recovery code count. */
|
|
@@ -1055,8 +1124,9 @@ var AuthyonClient = class {
|
|
|
1055
1124
|
* 2FA challenge to complete via `verifyTwoFactor()`.
|
|
1056
1125
|
*/
|
|
1057
1126
|
async login(params) {
|
|
1058
|
-
const { organizationSlug, ...rest } = params;
|
|
1059
|
-
const
|
|
1127
|
+
const { organizationSlug, tenantSlug, ...rest } = params;
|
|
1128
|
+
const slug = tenantSlug ?? organizationSlug;
|
|
1129
|
+
const body = slug ? { ...rest, tenantSlug: slug } : rest;
|
|
1060
1130
|
const data = await this.request("/auth/login", { method: "POST", body });
|
|
1061
1131
|
if (data.twoFactor) {
|
|
1062
1132
|
return { twoFactorRequired: true, ...data.twoFactor };
|
|
@@ -1157,11 +1227,15 @@ var AuthyonClient = class {
|
|
|
1157
1227
|
}
|
|
1158
1228
|
};
|
|
1159
1229
|
function normalizeUser(raw) {
|
|
1160
|
-
const { tenant, tenants, activeTenant, ...rest } = raw;
|
|
1230
|
+
const { tenant, tenants, activeTenant, organizations, activeOrganization, ...rest } = raw;
|
|
1231
|
+
const list = tenants ?? organizations;
|
|
1232
|
+
const active = tenant ?? activeTenant ?? activeOrganization ?? null;
|
|
1161
1233
|
return {
|
|
1162
1234
|
...rest,
|
|
1163
|
-
|
|
1164
|
-
|
|
1235
|
+
tenants: list,
|
|
1236
|
+
activeTenant: active,
|
|
1237
|
+
organizations: list,
|
|
1238
|
+
activeOrganization: active
|
|
1165
1239
|
};
|
|
1166
1240
|
}
|
|
1167
1241
|
function createClient(options) {
|
package/dist/react/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
import {
|
|
4
|
-
export {
|
|
3
|
+
import { aw as User, a5 as SessionControllerOptions, A as AuthyonClient, a7 as SessionSnapshot, a4 as Session, f as AbilitySubject, u as AuthyonAbilityOptions, s as AuthyonAbility } from '../ability-DBh_yZ5o.cjs';
|
|
4
|
+
export { x as AuthyonSessionController, a8 as SessionSnapshotListener, a9 as SessionStatus } from '../ability-DBh_yZ5o.cjs';
|
|
5
5
|
|
|
6
6
|
interface AuthyonProviderProps<TUser extends User = User> extends SessionControllerOptions {
|
|
7
7
|
client: AuthyonClient;
|
package/dist/react/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
import {
|
|
4
|
-
export {
|
|
3
|
+
import { aw as User, a5 as SessionControllerOptions, A as AuthyonClient, a7 as SessionSnapshot, a4 as Session, f as AbilitySubject, u as AuthyonAbilityOptions, s as AuthyonAbility } from '../ability-DBh_yZ5o.js';
|
|
4
|
+
export { x as AuthyonSessionController, a8 as SessionSnapshotListener, a9 as SessionStatus } from '../ability-DBh_yZ5o.js';
|
|
5
5
|
|
|
6
6
|
interface AuthyonProviderProps<TUser extends User = User> extends SessionControllerOptions {
|
|
7
7
|
client: AuthyonClient;
|