@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/dist/index.cjs CHANGED
@@ -519,6 +519,38 @@ function memberQuery(options = {}) {
519
519
  var ORDER_FIELDS = ["name", "createdAt", "updatedAt"];
520
520
  var MAX_FILTERS = 10;
521
521
  var MAX_FILTER_LENGTH = 512;
522
+ var MAX_PERMISSIONS = 10;
523
+ var MAX_PERMISSION_LENGTH = 256;
524
+ function permissionQuery(options = {}) {
525
+ const { permission, permissionMatch } = options;
526
+ const query = {};
527
+ if (permissionMatch !== void 0) {
528
+ if (permissionMatch !== "all" && permissionMatch !== "any")
529
+ throw new RangeError('Authyon: permissionMatch must be "all" or "any".');
530
+ query.permissionMatch = permissionMatch;
531
+ }
532
+ if (permission === void 0) return query;
533
+ if (!Array.isArray(permission)) throw new RangeError("Authyon: permission must be an array.");
534
+ const values = permission.map((p) => typeof p === "string" ? p.trim() : "");
535
+ if (values.some((p) => p.length === 0))
536
+ throw new RangeError("Authyon: a permission value may not be empty.");
537
+ if (values.length > MAX_PERMISSIONS)
538
+ throw new RangeError(`Authyon: at most ${MAX_PERMISSIONS} permission values per request.`);
539
+ for (const p of values) {
540
+ if (p.length > MAX_PERMISSION_LENGTH)
541
+ throw new RangeError(
542
+ `Authyon: a permission holds at most ${MAX_PERMISSION_LENGTH} characters.`
543
+ );
544
+ if (p.includes("*"))
545
+ throw new RangeError(`Authyon: name a concrete permission, not a wildcard (got "${p}").`);
546
+ }
547
+ if (values.length > 0) query.permission = values;
548
+ return query;
549
+ }
550
+ function tenantListQuery(options = {}) {
551
+ const { permission, permissionMatch, ...page } = options;
552
+ return { ...memberQuery(page), ...permissionQuery({ permission, permissionMatch }) };
553
+ }
522
554
  function orderByParam(order) {
523
555
  if (order === void 0) return void 0;
524
556
  const field = typeof order === "string" ? order : order?.field;
@@ -530,8 +562,11 @@ function orderByParam(order) {
530
562
  return `${field}:${direction}`;
531
563
  }
532
564
  function subTenantQuery(options = {}) {
533
- const { filter, orderBy, ...page } = options;
534
- const query = { ...memberQuery(page) };
565
+ const { filter, orderBy, permission, permissionMatch, ...page } = options;
566
+ const query = {
567
+ ...memberQuery(page),
568
+ ...permissionQuery({ permission, permissionMatch })
569
+ };
535
570
  if (filter !== void 0) {
536
571
  if (!Array.isArray(filter)) throw new RangeError("Authyon: filter must be an array.");
537
572
  const present = filter.filter((f) => typeof f === "string" && f.trim().length > 0);
@@ -554,6 +589,15 @@ function subTenantQuery(options = {}) {
554
589
  return query;
555
590
  }
556
591
 
592
+ // ../../internal/core/http/tenantLookup.ts
593
+ var UUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/iu;
594
+ function tenantLookupPath(idOrSlug) {
595
+ const value = typeof idOrSlug === "string" ? idOrSlug.trim() : "";
596
+ if (!value) throw new RangeError("Authyon: a tenant id or slug is required.");
597
+ if (value.length > 64) throw new RangeError("Authyon: a tenant slug has at most 64 characters.");
598
+ return UUID.test(value) ? `/auth/tenants/${encodeURIComponent(value)}` : `/auth/tenants/by-slug/${encodeURIComponent(value.toLowerCase())}`;
599
+ }
600
+
557
601
  // src/client/authyonClient.ts
558
602
  var FALLBACK_EXPIRES_IN = 1800;
559
603
  function readTokens(raw) {
@@ -662,54 +706,75 @@ var AuthyonClient = class {
662
706
  return { redirectUri: done?.redirectUri ?? null };
663
707
  }
664
708
  };
665
- // ── Organization ─────────────────────────────────────────────────────────
666
- this.organization = {
709
+ // ── Tenant ─────────────────────────────────────────────────────────
710
+ this.tenants = {
667
711
  /**
668
- * GET /auth/tenants — filterable list of organization memberships.
712
+ * GET /auth/tenants — filterable list of tenant memberships.
669
713
  *
670
- * Also lists the organizations below them that the user may switch into
714
+ * Also lists the tenants below them that the user may switch into
671
715
  * without being a member, marked `inherited` — only the ones that actually
672
- * carry `subtenants:tree:switch`, so the switcher never offers an
673
- * organization the switch would then refuse. `depth` indents the list into
716
+ * carry `subtenants:tree:switch`, so the switcher never offers a
717
+ * tenant the switch would then refuse. `depth` indents the list into
674
718
  * the tree it describes.
719
+ *
720
+ * `search`, `skip`/`take` and the permission filter (`permission`,
721
+ * `permissionMatch`) narrow it — see `TenantListParams`. The answer stays
722
+ * a plain array. A bad option raises `RangeError` before any request.
723
+ * APIs older than 2026-11-27 ignored every option and always answered the
724
+ * whole list.
675
725
  */
676
- list: (params = {}) => this.request(appendQuery("/auth/tenants", params), { bearer: true }),
726
+ list: (params = {}) => this.request(appendQuery("/auth/tenants", tenantListQuery(params)), { bearer: true }),
677
727
  /**
678
- * POST /auth/tenants — creates an organization owned by the signed-in
679
- * user (only available when self-service organization creation is
728
+ * POST /auth/tenants — creates a tenant owned by the signed-in
729
+ * user (only available when self-service tenant creation is
680
730
  * enabled for the environment).
681
731
  *
682
732
  * `parentTenantId` nests it under one the user already belongs to, which
683
733
  * needs `subtenants:tree:create` there. The creator lands as the effective
684
734
  * owner either way, with `tenants:settings:manage`,
685
735
  * `tenants:members:invite` and `tenants:members:remove` granted directly
686
- * inside the new organization.
736
+ * inside the new tenant.
687
737
  */
688
738
  create: (params = {}) => this.request("/auth/tenants", { method: "POST", bearer: true, body: params }),
689
- /** GET /auth/tenants/{organizationId} — fetch one of the user's organizations by id. */
690
- get: (organizationId) => this.request(`/auth/tenants/${encodeURIComponent(organizationId)}`, { bearer: true }),
691
739
  /**
692
- * PATCH /auth/tenants/{organizationId} — renames the organization.
740
+ * GET /auth/tenants/{tenantId} — one tenant by id: the user's own,
741
+ * or one below it with `subtenants:tree:read` on an ancestor.
742
+ */
743
+ get: (tenantId) => this.request(`/auth/tenants/${encodeURIComponent(tenantId)}`, { bearer: true }),
744
+ /**
745
+ * One tenant by id **or** slug — a UUID goes to `GET /auth/tenants/{id}`,
746
+ * anything else to `GET /auth/tenants/by-slug/{slug}`. Same access rule and
747
+ * same answer as `get`, so a page that only has the slug from its URL
748
+ * doesn't have to page `subTenants.list` to find it.
749
+ *
750
+ * By slug, every refusal answers `tenant.not_found` (a slug is guessable,
751
+ * so "exists, not yours" is never told apart from "doesn't exist"). An
752
+ * empty value raises `RangeError` before any request. The slug route needs
753
+ * the Authyon API of 2026-11-26 or newer.
754
+ */
755
+ find: (idOrSlug) => this.request(tenantLookupPath(idOrSlug), { bearer: true }),
756
+ /**
757
+ * PATCH /auth/tenants/{tenantId} — renames the tenant.
693
758
  *
694
759
  * Requires the `tenants:settings:manage` custom permission on it, or
695
- * `subtenants:tree:manage` on an organization above it. The value was
760
+ * `subtenants:tree:manage` on a tenant above it. The value was
696
761
  * spelled `tenants:manage` before 2026-10-31 — two segments, which the API
697
762
  * could not store, so the endpoint refused everyone who had been granted
698
763
  * it.
699
764
  */
700
- rename: (organizationId, name) => this.request(`/auth/tenants/${encodeURIComponent(organizationId)}`, {
765
+ rename: (tenantId, name) => this.request(`/auth/tenants/${encodeURIComponent(tenantId)}`, {
701
766
  method: "PATCH",
702
767
  bearer: true,
703
768
  body: { name }
704
769
  }),
705
770
  /**
706
771
  * POST /auth/switch-tenant — issues a fresh token scoped to the new
707
- * organization.
772
+ * tenant.
708
773
  *
709
- * Membership is enough for one of the user's own organizations. Descending
710
- * into one below it takes `subtenants:tree:switch` at the organization they
774
+ * Membership is enough for one of the user's own tenants. Descending
775
+ * into one below it takes `subtenants:tree:switch` at the tenant they
711
776
  * belong to — deliberately not the same permission as administering a
712
- * sub-organization from the outside, since operating AS it is the larger of
777
+ * sub-tenant from the outside, since operating AS it is the larger of
713
778
  * the two powers. The grants then travel from the node the user belongs to,
714
779
  * and the token says so in its `tenant.via`.
715
780
  *
@@ -717,61 +782,58 @@ var AuthyonClient = class {
717
782
  * `tenant.ancestor_disabled`, and `tenant.path_stale` when the tree moved
718
783
  * under a session — sign-in again rather than retrying.
719
784
  */
720
- switch: (organizationSlug) => this.request("/auth/switch-tenant", {
785
+ switch: (tenantSlug) => this.request("/auth/switch-tenant", {
721
786
  method: "POST",
722
787
  bearer: true,
723
- body: { tenantSlug: organizationSlug }
788
+ body: { tenantSlug }
724
789
  }).then((data) => this.setSession({ tokens: readTokens(data) }, "refreshed")).then((session) => this.hydrateUser(session)),
725
- /** The organization the current session is scoped to, from the cached session — no network call. */
726
- current: () => this.getSession()?.user?.activeOrganization ?? null,
790
+ /** The tenant the current session is scoped to, from the cached session — no network call. */
791
+ current: () => this.getSession()?.user?.activeTenant ?? null,
727
792
  members: {
728
793
  /**
729
- * GET /auth/tenants/{organizationId}/members — paginated list of an
730
- * organization's members, newest first, in the `Paged<T>` envelope every
794
+ * GET /auth/tenants/{tenantId}/members — paginated list of an
795
+ * tenant's members, newest first, in the `Paged<T>` envelope every
731
796
  * other `skip`/`take` endpoint returns. `search` matches email, username
732
797
  * or name; at most 100 characters, and `take` 1-100, checked before any
733
798
  * request.
734
799
  */
735
- list: (organizationId, params = {}) => this.request(
736
- appendQuery(
737
- `/auth/tenants/${encodeURIComponent(organizationId)}/members`,
738
- memberQuery(params)
739
- ),
800
+ list: (tenantId, params = {}) => this.request(
801
+ appendQuery(`/auth/tenants/${encodeURIComponent(tenantId)}/members`, memberQuery(params)),
740
802
  { bearer: true }
741
803
  ),
742
804
  /**
743
- * POST /auth/tenants/{organizationId}/members — add an existing
805
+ * POST /auth/tenants/{tenantId}/members — add an existing
744
806
  * environment user by e-mail (no e-mail is sent). To invite an address
745
- * that may not have an account yet, use `organization.invites.create`.
807
+ * that may not have an account yet, use `tenants.invites.create`.
746
808
  */
747
- invite: (organizationId, params) => this.request(`/auth/tenants/${encodeURIComponent(organizationId)}/members`, {
809
+ invite: (tenantId, params) => this.request(`/auth/tenants/${encodeURIComponent(tenantId)}/members`, {
748
810
  method: "POST",
749
811
  bearer: true,
750
812
  body: params
751
813
  }),
752
- /** DELETE /auth/tenants/{organizationId}/members/{userId} — remove a member. */
753
- remove: (organizationId, userId) => this.request(
754
- `/auth/tenants/${encodeURIComponent(organizationId)}/members/${encodeURIComponent(userId)}`,
814
+ /** DELETE /auth/tenants/{tenantId}/members/{userId} — remove a member. */
815
+ remove: (tenantId, userId) => this.request(
816
+ `/auth/tenants/${encodeURIComponent(tenantId)}/members/${encodeURIComponent(userId)}`,
755
817
  { method: "DELETE", bearer: true }
756
818
  )
757
819
  },
758
820
  /**
759
821
  * Invites by e-mail or by link. Managing them requires the
760
- * `tenants:members:invite` permission on the organization; `preview` and
822
+ * `tenants:members:invite` permission on the tenant; `preview` and
761
823
  * `accept` are public — the token in the link is the credential.
762
824
  */
763
825
  invites: {
764
- /** GET /auth/tenants/{organizationId}/invites — every invite with its status, newest first. */
765
- list: (organizationId) => this.request(`/auth/tenants/${encodeURIComponent(organizationId)}/invites`, {
826
+ /** GET /auth/tenants/{tenantId}/invites — every invite with its status, newest first. */
827
+ list: (tenantId) => this.request(`/auth/tenants/${encodeURIComponent(tenantId)}/invites`, {
766
828
  bearer: true
767
829
  }),
768
830
  /**
769
- * POST /auth/tenants/{organizationId}/invites — invite an address.
831
+ * POST /auth/tenants/{tenantId}/invites — invite an address.
770
832
  * Always returns `acceptUrl`; with `sendEmail: false` Authyon does not
771
833
  * mail it and you deliver the link yourself. The link is valid for 7
772
834
  * days, once, and can't be read again later.
773
835
  */
774
- create: (organizationId, params) => this.request(`/auth/tenants/${encodeURIComponent(organizationId)}/invites`, {
836
+ create: (tenantId, params) => this.request(`/auth/tenants/${encodeURIComponent(tenantId)}/invites`, {
775
837
  method: "POST",
776
838
  bearer: true,
777
839
  body: {
@@ -782,17 +844,17 @@ var AuthyonClient = class {
782
844
  }
783
845
  }),
784
846
  /**
785
- * POST /auth/tenants/{organizationId}/invites/{inviteId}/resend — issue
847
+ * POST /auth/tenants/{tenantId}/invites/{inviteId}/resend — issue
786
848
  * a new link (the previous one stops working), mailing it unless
787
849
  * `sendEmail` is `false`.
788
850
  */
789
- resend: (organizationId, inviteId, params = {}) => this.request(
790
- `/auth/tenants/${encodeURIComponent(organizationId)}/invites/${encodeURIComponent(inviteId)}/resend`,
851
+ resend: (tenantId, inviteId, params = {}) => this.request(
852
+ `/auth/tenants/${encodeURIComponent(tenantId)}/invites/${encodeURIComponent(inviteId)}/resend`,
791
853
  { method: "POST", bearer: true, body: { sendEmail: params.sendEmail ?? true } }
792
854
  ),
793
- /** DELETE /auth/tenants/{organizationId}/invites/{inviteId} — revoke a pending invite. */
794
- revoke: (organizationId, inviteId) => this.request(
795
- `/auth/tenants/${encodeURIComponent(organizationId)}/invites/${encodeURIComponent(inviteId)}`,
855
+ /** DELETE /auth/tenants/{tenantId}/invites/{inviteId} — revoke a pending invite. */
856
+ revoke: (tenantId, inviteId) => this.request(
857
+ `/auth/tenants/${encodeURIComponent(tenantId)}/invites/${encodeURIComponent(inviteId)}`,
796
858
  { method: "DELETE", bearer: true }
797
859
  ),
798
860
  /**
@@ -802,41 +864,41 @@ var AuthyonClient = class {
802
864
  */
803
865
  preview: (token) => this.request("/auth/tenant-invites/preview", { method: "POST", body: { token } }),
804
866
  /**
805
- * POST /auth/tenant-invites/accept — public. Joins the organization; for
867
+ * POST /auth/tenant-invites/accept — public. Joins the tenant; for
806
868
  * an address with no account, also creates it (password required) with
807
869
  * the e-mail already confirmed. Does not sign the user in.
808
870
  */
809
871
  accept: (params) => this.request("/auth/tenant-invites/accept", { method: "POST", body: params })
810
872
  },
811
873
  /**
812
- * The direct, active sub-organizations of an organization. One level per
874
+ * The direct, active sub-tenants of a tenant. One level per
813
875
  * call: each row's `childCount` says where the next call is worth making,
814
876
  * which is what a lazily expanded tree asks for.
815
877
  *
816
- * Needs `subtenants:tree:read` on the organization or on one above it —
817
- * even on the user's own organization, since listing the children is
878
+ * Needs `subtenants:tree:read` on the tenant or on one above it —
879
+ * even on the user's own tenant, since listing the children is
818
880
  * reading below it. Paged like every other `skip`/`take` listing, with
819
881
  * `search` (name, slug, description and public metadata), `filter` (public
820
882
  * scope only — build them with `tenantFilter`) and `orderBy`
821
883
  * (`name` | `createdAt` | `updatedAt`, ascending or descending). A bad
822
884
  * option raises `RangeError` before any request.
823
885
  *
824
- * Not the same list as `organization.list()`, which is the switcher's and
886
+ * Not the same list as `tenants.list()`, which is the switcher's and
825
887
  * only brings what `subtenants:tree:switch` lets the user enter. Requires
826
888
  * the Authyon API of 2026-11-26 or newer.
827
889
  */
828
- subOrganizations: {
829
- /** GET /auth/tenants/{organizationId}/subtenants. */
830
- list: (organizationId, params = {}) => this.request(
890
+ subTenants: {
891
+ /** GET /auth/tenants/{tenantId}/subtenants. */
892
+ list: (tenantId, params = {}) => this.request(
831
893
  appendQuery(
832
- `/auth/tenants/${encodeURIComponent(organizationId)}/subtenants`,
894
+ `/auth/tenants/${encodeURIComponent(tenantId)}/subtenants`,
833
895
  subTenantQuery(params)
834
896
  ),
835
897
  { bearer: true }
836
898
  ),
837
899
  /**
838
- * GET /auth/tenants/subtenants — the same, for the organization the
839
- * session is scoped to (`organization.current()`, the token's
900
+ * GET /auth/tenants/subtenants — the same, for the tenant the
901
+ * session is scoped to (`tenants.current()`, the token's
840
902
  * `tenant_id`). Same permission rule; answers `tenant.no_active_tenant`
841
903
  * when the session never switched into one.
842
904
  */
@@ -845,12 +907,19 @@ var AuthyonClient = class {
845
907
  })
846
908
  },
847
909
  roles: {
848
- /** GET /auth/tenants/{organizationId}/roles — roles available in the organization. */
849
- list: (organizationId) => this.request(`/auth/tenants/${encodeURIComponent(organizationId)}/roles`, {
910
+ /** GET /auth/tenants/{tenantId}/roles — roles available in the tenant. */
911
+ list: (tenantId) => this.request(`/auth/tenants/${encodeURIComponent(tenantId)}/roles`, {
850
912
  bearer: true
851
913
  })
852
914
  }
853
915
  };
916
+ /**
917
+ * @deprecated Use `tenants` — the same methods, named after the API's own
918
+ * vocabulary (`tenants.subTenants` instead of `subOrganizations`). Kept so
919
+ * code written against 0.2.0-beta.30 and earlier keeps working; removed in a
920
+ * later release.
921
+ */
922
+ this.organization = { ...this.tenants, subOrganizations: this.tenants.subTenants };
854
923
  // ── Two-factor management (authenticated) ────────────────────────────────
855
924
  this.twoFactor = {
856
925
  /** GET /auth/2fa/status — enrolled methods and recovery code count. */
@@ -1093,8 +1162,9 @@ var AuthyonClient = class {
1093
1162
  * 2FA challenge to complete via `verifyTwoFactor()`.
1094
1163
  */
1095
1164
  async login(params) {
1096
- const { organizationSlug, ...rest } = params;
1097
- const body = organizationSlug ? { ...rest, tenantSlug: organizationSlug } : rest;
1165
+ const { organizationSlug, tenantSlug, ...rest } = params;
1166
+ const slug = tenantSlug ?? organizationSlug;
1167
+ const body = slug ? { ...rest, tenantSlug: slug } : rest;
1098
1168
  const data = await this.request("/auth/login", { method: "POST", body });
1099
1169
  if (data.twoFactor) {
1100
1170
  return { twoFactorRequired: true, ...data.twoFactor };
@@ -1195,11 +1265,15 @@ var AuthyonClient = class {
1195
1265
  }
1196
1266
  };
1197
1267
  function normalizeUser(raw) {
1198
- const { tenant, tenants, activeTenant, ...rest } = raw;
1268
+ const { tenant, tenants, activeTenant, organizations, activeOrganization, ...rest } = raw;
1269
+ const list = tenants ?? organizations;
1270
+ const active = tenant ?? activeTenant ?? activeOrganization ?? null;
1199
1271
  return {
1200
1272
  ...rest,
1201
- organizations: raw.organizations ?? tenants,
1202
- activeOrganization: tenant ?? raw.activeOrganization ?? activeTenant ?? null
1273
+ tenants: list,
1274
+ activeTenant: active,
1275
+ organizations: list,
1276
+ activeOrganization: active
1203
1277
  };
1204
1278
  }
1205
1279
  function createClient(options) {
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { T as TokenStorage, H as HttpAdapter, a as HttpLoggerOptions, A as AuthyonClient } from './ability-CmJEviJj.cjs';
2
- export { b as AbilityConditions, c as AbilityEvent, d as AbilityListener, e as AbilityRule, f as AbilitySubject, g as AcceptOrganizationInviteInput, h as Activity, i as Approval, j as ApprovalAssurance, k as ApprovalPayload, l as ApprovalStatus, m as ApprovalWebAuthnOptions, n as AuthEvent, o as AuthState, p as AuthStateListener, q as AuthenticatorSetup, r as AuthyonAbility, s as AuthyonAbilityBuilder, t as AuthyonAbilityOptions, u as AuthyonClientOptions, v as AuthyonPermissionSource, w as AuthyonSessionController, C as ConfirmApprovalInput, x as CreateOrganizationInput, F as FetchHttpAdapter, y as HttpAdapterRequest, z as HttpLogEvent, B as HttpLogger, I as IntrospectResult, D as InviteMemberInput, L as LoggingHttpAdapter, E as LoginInput, G as LoginResult, M as MemberListOptions, O as Organization, J as OrganizationInvite, K as OrganizationInviteAccepted, N as OrganizationInviteInput, P as OrganizationInviteIssued, Q as OrganizationInvitePreview, R as OrganizationInviteStatus, S as OrganizationMember, U as Paged, V as PaginationOptions, W as PasswordResetCompleted, X as PasswordResetPreview, Y as PasswordResetRequestOptions, Z as PermissionGroup, _ as RegisterInput, $ as Role, a0 as SecurityMethods, a1 as Session, a2 as SessionControllerOptions, a3 as SessionInfo, a4 as SessionSnapshot, a5 as SessionSnapshotListener, a6 as SessionStatus, a7 as SsoProvider, a8 as SubOrganization, a9 as SubOrganizationListOptions, aa as SubTenant, ab as SubTenantListOptions, ac as SubjectApprovals, ad as SubjectSecurity, ae as TenantOrder, af as TenantOrderField, ag as TenantParent, ah as TwoFactorChallenge, ai as TwoFactorMethod, aj as TwoFactorStatus, ak as User, al as ValidateResult, am as VerifyTwoFactorInput, an as WebAuthnAssertion, ao as WebAuthnCeremonyStart, ap as WebAuthnCredential, aq as createAuthyonAbility, ar as createAuthyonRules, as as createClient, at as hasPermission, au as hasPermissionGroup } from './ability-CmJEviJj.cjs';
1
+ import { T as TokenStorage, H as HttpAdapter, a as HttpLoggerOptions, A as AuthyonClient } from './ability-DBh_yZ5o.cjs';
2
+ export { b as AbilityConditions, c as AbilityEvent, d as AbilityListener, e as AbilityRule, f as AbilitySubject, g as AcceptOrganizationInviteInput, h as AcceptTenantInviteInput, i as Activity, j as Approval, k as ApprovalAssurance, l as ApprovalPayload, m as ApprovalStatus, n as ApprovalWebAuthnOptions, o as AuthEvent, p as AuthState, q as AuthStateListener, r as AuthenticatorSetup, s as AuthyonAbility, t as AuthyonAbilityBuilder, u as AuthyonAbilityOptions, v as AuthyonClientOptions, w as AuthyonPermissionSource, x as AuthyonSessionController, C as ConfirmApprovalInput, y as CreateOrganizationInput, z as CreateTenantInput, F as FetchHttpAdapter, B as HttpAdapterRequest, D as HttpLogEvent, E as HttpLogger, I as IntrospectResult, G as InviteMemberInput, L as LoggingHttpAdapter, J as LoginInput, K as LoginResult, M as MemberListOptions, O as Organization, N as OrganizationInvite, P as OrganizationInviteAccepted, Q as OrganizationInviteInput, R as OrganizationInviteIssued, S as OrganizationInvitePreview, U as OrganizationInviteStatus, V as OrganizationMember, W as Paged, X as PaginationOptions, Y as PasswordResetCompleted, Z as PasswordResetPreview, _ as PasswordResetRequestOptions, $ as PermissionFilterOptions, a0 as PermissionGroup, a1 as RegisterInput, a2 as Role, a3 as SecurityMethods, a4 as Session, a5 as SessionControllerOptions, a6 as SessionInfo, a7 as SessionSnapshot, a8 as SessionSnapshotListener, a9 as SessionStatus, aa as SsoProvider, ab as SubOrganization, ac as SubOrganizationListOptions, ad as SubTenant, ae as SubTenantListOptions, af as SubjectApprovals, ag as SubjectSecurity, ah as Tenant, ai as TenantInvite, aj as TenantInviteAccepted, ak as TenantInviteInput, al as TenantInviteIssued, am as TenantInvitePreview, an as TenantInviteStatus, ao as TenantListParams, ap as TenantMember, aq as TenantOrder, ar as TenantOrderField, as as TenantParent, at as TwoFactorChallenge, au as TwoFactorMethod, av as TwoFactorStatus, aw as User, ax as ValidateResult, ay as VerifyTwoFactorInput, az as WebAuthnAssertion, aA as WebAuthnCeremonyStart, aB as WebAuthnCredential, aC as createAuthyonAbility, aD as createAuthyonRules, aE as createClient, aF as hasPermission, aG as hasPermissionGroup } from './ability-DBh_yZ5o.cjs';
3
3
 
4
4
  declare const ErrorCodes: {
5
5
  readonly Unknown: "unknown";
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { T as TokenStorage, H as HttpAdapter, a as HttpLoggerOptions, A as AuthyonClient } from './ability-CmJEviJj.js';
2
- export { b as AbilityConditions, c as AbilityEvent, d as AbilityListener, e as AbilityRule, f as AbilitySubject, g as AcceptOrganizationInviteInput, h as Activity, i as Approval, j as ApprovalAssurance, k as ApprovalPayload, l as ApprovalStatus, m as ApprovalWebAuthnOptions, n as AuthEvent, o as AuthState, p as AuthStateListener, q as AuthenticatorSetup, r as AuthyonAbility, s as AuthyonAbilityBuilder, t as AuthyonAbilityOptions, u as AuthyonClientOptions, v as AuthyonPermissionSource, w as AuthyonSessionController, C as ConfirmApprovalInput, x as CreateOrganizationInput, F as FetchHttpAdapter, y as HttpAdapterRequest, z as HttpLogEvent, B as HttpLogger, I as IntrospectResult, D as InviteMemberInput, L as LoggingHttpAdapter, E as LoginInput, G as LoginResult, M as MemberListOptions, O as Organization, J as OrganizationInvite, K as OrganizationInviteAccepted, N as OrganizationInviteInput, P as OrganizationInviteIssued, Q as OrganizationInvitePreview, R as OrganizationInviteStatus, S as OrganizationMember, U as Paged, V as PaginationOptions, W as PasswordResetCompleted, X as PasswordResetPreview, Y as PasswordResetRequestOptions, Z as PermissionGroup, _ as RegisterInput, $ as Role, a0 as SecurityMethods, a1 as Session, a2 as SessionControllerOptions, a3 as SessionInfo, a4 as SessionSnapshot, a5 as SessionSnapshotListener, a6 as SessionStatus, a7 as SsoProvider, a8 as SubOrganization, a9 as SubOrganizationListOptions, aa as SubTenant, ab as SubTenantListOptions, ac as SubjectApprovals, ad as SubjectSecurity, ae as TenantOrder, af as TenantOrderField, ag as TenantParent, ah as TwoFactorChallenge, ai as TwoFactorMethod, aj as TwoFactorStatus, ak as User, al as ValidateResult, am as VerifyTwoFactorInput, an as WebAuthnAssertion, ao as WebAuthnCeremonyStart, ap as WebAuthnCredential, aq as createAuthyonAbility, ar as createAuthyonRules, as as createClient, at as hasPermission, au as hasPermissionGroup } from './ability-CmJEviJj.js';
1
+ import { T as TokenStorage, H as HttpAdapter, a as HttpLoggerOptions, A as AuthyonClient } from './ability-DBh_yZ5o.js';
2
+ export { b as AbilityConditions, c as AbilityEvent, d as AbilityListener, e as AbilityRule, f as AbilitySubject, g as AcceptOrganizationInviteInput, h as AcceptTenantInviteInput, i as Activity, j as Approval, k as ApprovalAssurance, l as ApprovalPayload, m as ApprovalStatus, n as ApprovalWebAuthnOptions, o as AuthEvent, p as AuthState, q as AuthStateListener, r as AuthenticatorSetup, s as AuthyonAbility, t as AuthyonAbilityBuilder, u as AuthyonAbilityOptions, v as AuthyonClientOptions, w as AuthyonPermissionSource, x as AuthyonSessionController, C as ConfirmApprovalInput, y as CreateOrganizationInput, z as CreateTenantInput, F as FetchHttpAdapter, B as HttpAdapterRequest, D as HttpLogEvent, E as HttpLogger, I as IntrospectResult, G as InviteMemberInput, L as LoggingHttpAdapter, J as LoginInput, K as LoginResult, M as MemberListOptions, O as Organization, N as OrganizationInvite, P as OrganizationInviteAccepted, Q as OrganizationInviteInput, R as OrganizationInviteIssued, S as OrganizationInvitePreview, U as OrganizationInviteStatus, V as OrganizationMember, W as Paged, X as PaginationOptions, Y as PasswordResetCompleted, Z as PasswordResetPreview, _ as PasswordResetRequestOptions, $ as PermissionFilterOptions, a0 as PermissionGroup, a1 as RegisterInput, a2 as Role, a3 as SecurityMethods, a4 as Session, a5 as SessionControllerOptions, a6 as SessionInfo, a7 as SessionSnapshot, a8 as SessionSnapshotListener, a9 as SessionStatus, aa as SsoProvider, ab as SubOrganization, ac as SubOrganizationListOptions, ad as SubTenant, ae as SubTenantListOptions, af as SubjectApprovals, ag as SubjectSecurity, ah as Tenant, ai as TenantInvite, aj as TenantInviteAccepted, ak as TenantInviteInput, al as TenantInviteIssued, am as TenantInvitePreview, an as TenantInviteStatus, ao as TenantListParams, ap as TenantMember, aq as TenantOrder, ar as TenantOrderField, as as TenantParent, at as TwoFactorChallenge, au as TwoFactorMethod, av as TwoFactorStatus, aw as User, ax as ValidateResult, ay as VerifyTwoFactorInput, az as WebAuthnAssertion, aA as WebAuthnCeremonyStart, aB as WebAuthnCredential, aC as createAuthyonAbility, aD as createAuthyonRules, aE as createClient, aF as hasPermission, aG as hasPermissionGroup } from './ability-DBh_yZ5o.js';
3
3
 
4
4
  declare const ErrorCodes: {
5
5
  readonly Unknown: "unknown";