@finueva/auth 0.11.1 → 0.13.0

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 CHANGED
@@ -2,9 +2,9 @@
2
2
 
3
3
  Use `@finueva/auth` to add Finueva sign-in, organization access, invitations, and Drive credentials to a browser, server, CLI, or native application.
4
4
 
5
- The current published version is `0.11.0`. The package is ESM-only. Node.js consumers require Node.js 22 or later. Other server runtimes must provide compatible Fetch, Web Crypto, URL, and Web Streams APIs. Its interface is Experimental until version `1.0.0`.
5
+ The current published version is `0.11.1`. The package is ESM-only. Node.js consumers require Node.js 22 or later. Other server runtimes must provide compatible Fetch, Web Crypto, URL, and Web Streams APIs. Its interface is Experimental until version `1.0.0`.
6
6
 
7
- The platform-status and organization-authority methods below describe this repository's next package candidate. Published version `0.11.0` does not include them.
7
+ The platform-status, organization-authority, and invitation-administration methods below describe this repository's next package candidate. Published version `0.11.1` does not include them.
8
8
 
9
9
  ## Install
10
10
 
@@ -78,25 +78,28 @@ The browser owns the session cookie. The SDK does not expose or persist it.
78
78
 
79
79
  ## Common Tasks
80
80
 
81
- | Task | Browser | Server | Device |
82
- | ----------------------------- | ------------------------------------------- | -------------------------------------- | -------------------------------------- |
83
- | Create an account | `signUp()` | Not available | `signUpWithEmail()` |
84
- | Read the current session | `getSession()` | `getSession()` | `getSession()` |
85
- | Observe session state | `onAuthStateChange()` | Not available | Not available |
86
- | Update a profile | `updateProfile()` | Not available | `updateProfile()` |
87
- | Change a password | `changePassword()` | Not available | `changePassword()` |
88
- | Reset a password | `requestPasswordReset()`, `resetPassword()` | Not available | Not available |
89
- | Verify an email | `sendVerificationEmail()` | Not available | Not available |
90
- | List organizations | `listOrganizations()` | `listOrganizations()` | `listOrganizations()` |
91
- | Create an ordinary team | `createOrganizationTeam()` | `createOrganizationTeam()` | `createOrganizationTeam()` |
92
- | Invite an ordinary member | `createOrganizationMemberInvitation()` | `createOrganizationMemberInvitation()` | `createOrganizationMemberInvitation()` |
93
- | Accept an invitation | `acceptInvitation()` | `acceptInvitation()` | Not available |
94
- | Enroll a passkey | `addPasskey()` | Not available | Not available |
95
- | Perform recent authentication | Platform and organization action methods | Not available | Not available |
96
- | Change manual roles or owners | Organization authority methods | Not available | Not available |
97
- | Read current platform roles | `getPlatformStatus()` | Not available | Not available |
98
- | Request Drive access | `getDriveCredential()` | `getDriveCredential()` | `getDriveCredential()` |
99
- | End the current session | `signOut()` | `signOut()` | `revokeCurrentDevice()` |
81
+ | Task | Browser | Server | Device |
82
+ | ----------------------------- | ------------------------------------------- | ----------------------------------------- | -------------------------------------- |
83
+ | Create an account | `signUp()` | Not available | `signUpWithEmail()` |
84
+ | Read the current session | `getSession()` | `getSession()` | `getSession()` |
85
+ | Observe session state | `onAuthStateChange()` | Not available | Not available |
86
+ | Update a profile | `updateProfile()` | Not available | `updateProfile()` |
87
+ | Change a password | `changePassword()` | Not available | `changePassword()` |
88
+ | Reset a password | `requestPasswordReset()`, `resetPassword()` | Not available | Not available |
89
+ | Verify an email | `sendVerificationEmail()` | Not available | Not available |
90
+ | List organizations | `listOrganizations()` | `listOrganizations()` | `listOrganizations()` |
91
+ | Read member authority | `getOrganizationMemberAuthority()` | `getOrganizationMemberAuthority()` | `getOrganizationMemberAuthority()` |
92
+ | Create an ordinary team | `createOrganizationTeam()` | `createOrganizationTeam()` | `createOrganizationTeam()` |
93
+ | Invite an ordinary member | `createOrganizationMemberInvitation()` | `createOrganizationMemberInvitation()` | `createOrganizationMemberInvitation()` |
94
+ | Resend a member invitation | `resendOrganizationInvitation()` | `resendOrganizationInvitation()` (cookie) | Not available |
95
+ | Cancel a member invitation | `cancelOrganizationInvitation()` | `cancelOrganizationInvitation()` (cookie) | Not available |
96
+ | Accept an invitation | `acceptInvitation()` | `acceptInvitation()` | Not available |
97
+ | Enroll a passkey | `addPasskey()` | Not available | Not available |
98
+ | Perform recent authentication | Platform and organization action methods | Not available | Not available |
99
+ | Change manual roles or owners | Organization authority methods | Not available | Not available |
100
+ | Read current platform roles | `getPlatformStatus()` | Not available | Not available |
101
+ | Request Drive access | `getDriveCredential()` | `getDriveCredential()` | `getDriveCredential()` |
102
+ | End the current session | `signOut()` | `signOut()` | `revokeCurrentDevice()` |
100
103
 
101
104
  ## Create An Organization Invitation
102
105
 
@@ -114,6 +117,15 @@ console.log(invitation.id, invitation.expiresAt);
114
117
 
115
118
  If the response is lost, repeat the same request with the same key. The SDK does not retry automatically. The result confirms invitation creation. It does not confirm email delivery.
116
119
 
120
+ Manual owners and manual administrators can resend or cancel the exact pending invitation through browser-cookie or server-cookie authority:
121
+
122
+ ```ts
123
+ const resent = await auth.resendOrganizationInvitation(organizationId, invitation.id, crypto.randomUUID());
124
+ const canceled = await auth.cancelOrganizationInvitation(organizationId, invitation.id, crypto.randomUUID());
125
+ ```
126
+
127
+ Resend success confirms the committed expiry. It does not confirm email delivery. Repeat an action with the same key only after a lost response. A bearer-backed server client rejects both methods before network I/O.
128
+
117
129
  ## Perform Recent Authentication
118
130
 
119
131
  The experimental passkey methods run only when the browser page uses the exact Auth Origin. To enroll a passkey, first create a new password-authenticated session on that origin:
@@ -214,7 +226,7 @@ import { createServerAuth } from "@finueva/auth/server";
214
226
  export async function handleRequest(request: Request): Promise<Response> {
215
227
  const auth = createServerAuth({
216
228
  authOrigin: "https://auth.finueva.com",
217
- appOrigin: "https://files.finueva.com",
229
+ appOrigin: "https://app.heylomeet.com",
218
230
  request,
219
231
  });
220
232
 
@@ -315,7 +327,7 @@ Use `error.code` for application behavior. Do not parse `error.message`. Except
315
327
  - Organization collections use page sizes from 1 through 100.
316
328
  - Organization Drive context supports at most 50 current teams.
317
329
  - Invitation creation supports only the `member` role in ordinary organizations.
318
- - Invitation resend and cancellation are not public SDK methods.
330
+ - Invitation resend and cancellation require browser-cookie or server-cookie authority and a manual owner or manual administrator.
319
331
  - Cross-root SSO, custom refresh tokens, and account deletion are not implemented.
320
332
  - Production support gates are incomplete. Ask the Auth operator for the current environment status before adoption.
321
333
 
package/dist/device.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { C as OrganizationTeam, E as OrganizationTeamPage, G as UpdateProfileInput, H as SocialIdTokenProvider, I as ReceivedOrganizationInvitation, J as AuthErrorCode, L as ReceivedOrganizationInvitationPage, S as OrganizationPageInput, T as OrganizationTeamMemberPage, U as UpdateOrganizationDisplayInput, V as SocialIdTokenInput, W as UpdateOrganizationTeamDisplayInput, Y as AuthErrorStatus, _ as OrganizationInvitation, b as OrganizationMemberPage, d as CreatedOrganizationTeam, f as DriveCredential, g as OrganizationDisplay, l as CreateOrganizationMemberInvitationInput, o as AuthSession, p as DriveCredentialInput, q as AuthError, r as AuthOrganization, u as CreatedOrganizationMemberInvitation, v as OrganizationInvitationPage, w as OrganizationTeamDisplay, x as OrganizationPage, y as OrganizationMember } from "./types--G_Gwf2r.js";
1
+ import { C as OrganizationPage, D as OrganizationTeamMemberPage, E as OrganizationTeamDisplay, G as SocialIdTokenProvider, J as UpdateProfileInput, K as UpdateOrganizationDisplayInput, O as OrganizationTeamPage, Q as AuthErrorStatus, R as ReceivedOrganizationInvitation, S as OrganizationMemberPage, T as OrganizationTeam, W as SocialIdTokenInput, X as AuthError, Z as AuthErrorCode, _ as OrganizationDisplay, b as OrganizationMember, d as CreatedOrganizationMemberInvitation, f as CreatedOrganizationTeam, m as DriveCredentialInput, o as AuthSession, p as DriveCredential, q as UpdateOrganizationTeamDisplayInput, r as AuthOrganization, u as CreateOrganizationMemberInvitationInput, v as OrganizationInvitation, w as OrganizationPageInput, x as OrganizationMemberAuthority, y as OrganizationInvitationPage, z as ReceivedOrganizationInvitationPage } from "./types-Dsu3nEaN.js";
2
2
  //#region src/device.d.ts
3
3
  type DeviceAuthorizationErrorCode = "device_access_denied" | "device_authorization_cancelled" | "device_code_expired" | "invalid_device_authorization" | "identity_authority_unavailable";
4
4
  declare class DeviceAuthorizationError extends Error {
@@ -45,6 +45,7 @@ interface DeviceAuthClient {
45
45
  getSession(): Promise<AuthSession | null>;
46
46
  listOrganizations(input?: OrganizationPageInput): Promise<OrganizationPage>;
47
47
  getOrganization(organizationId: string): Promise<AuthOrganization>;
48
+ getOrganizationMemberAuthority(organizationId: string, memberId: string): Promise<OrganizationMemberAuthority>;
48
49
  createOrganizationTeam(organizationId: string, name: string, idempotencyKey: string): Promise<CreatedOrganizationTeam>;
49
50
  createOrganizationMemberInvitation(organizationId: string, input: CreateOrganizationMemberInvitationInput): Promise<CreatedOrganizationMemberInvitation>;
50
51
  updateOrganizationDisplay(organizationId: string, input: UpdateOrganizationDisplayInput): Promise<OrganizationDisplay>;
@@ -68,4 +69,4 @@ interface DeviceAuthClient {
68
69
  }
69
70
  declare function createDeviceAuth(options: DeviceAuthOptions): DeviceAuthClient;
70
71
  //#endregion
71
- export { AuthError, type AuthErrorCode, type AuthErrorStatus, type AuthOrganization, type CreateOrganizationMemberInvitationInput, type CreatedOrganizationMemberInvitation, type CreatedOrganizationTeam, DeviceAuthClient, DeviceAuthOptions, DeviceAuthorization, DeviceAuthorizationError, DeviceAuthorizationErrorCode, DeviceToken, DeviceTokenPersistence, type OrganizationDisplay, type OrganizationInvitation, type OrganizationInvitationPage, type OrganizationMember, type OrganizationMemberPage, type OrganizationPage, type OrganizationPageInput, type OrganizationTeam, type OrganizationTeamDisplay, type OrganizationTeamMemberPage, type OrganizationTeamPage, PollDeviceOptions, type ReceivedOrganizationInvitation, type ReceivedOrganizationInvitationPage, type SocialIdTokenInput, type SocialIdTokenProvider, type UpdateOrganizationDisplayInput, type UpdateOrganizationTeamDisplayInput, createDeviceAuth };
72
+ export { AuthError, type AuthErrorCode, type AuthErrorStatus, type AuthOrganization, type CreateOrganizationMemberInvitationInput, type CreatedOrganizationMemberInvitation, type CreatedOrganizationTeam, DeviceAuthClient, DeviceAuthOptions, DeviceAuthorization, DeviceAuthorizationError, DeviceAuthorizationErrorCode, DeviceToken, DeviceTokenPersistence, type OrganizationDisplay, type OrganizationInvitation, type OrganizationInvitationPage, type OrganizationMember, type OrganizationMemberAuthority, type OrganizationMemberPage, type OrganizationPage, type OrganizationPageInput, type OrganizationTeam, type OrganizationTeamDisplay, type OrganizationTeamMemberPage, type OrganizationTeamPage, PollDeviceOptions, type ReceivedOrganizationInvitation, type ReceivedOrganizationInvitationPage, type SocialIdTokenInput, type SocialIdTokenProvider, type UpdateOrganizationDisplayInput, type UpdateOrganizationTeamDisplayInput, createDeviceAuth };
package/dist/device.js CHANGED
@@ -448,6 +448,7 @@ const messages = {
448
448
  invalid_invitation: "The invitation is invalid.",
449
449
  invitation_unavailable: "The invitation is not available.",
450
450
  invitation_recipient_mismatch: "The invitation cannot be accepted by this account.",
451
+ invitation_recovery_required: "Invitation administration requires separate recovery.",
451
452
  email_verification_required: "Email verification is required.",
452
453
  invalid_workspace_selection: "The workspace selection is invalid.",
453
454
  organization_context_too_large: "The organization context is too large.",
@@ -896,6 +897,44 @@ function fromOrganizationMutationAuthorityError(value, status, retryAfter) {
896
897
  if (status === 403 && code === "REQUEST_ORIGIN_DENIED") return new AuthError("request_origin_denied", 403);
897
898
  return fromOrganizationReadAuthorityError(value, status);
898
899
  }
900
+ function normalizeOrganizationMemberAuthority(value, organizationId, memberId) {
901
+ exact(value, [
902
+ "organizationId",
903
+ "actor",
904
+ "target"
905
+ ]);
906
+ if (!isId(value.organizationId) || value.organizationId !== organizationId) throw authorityUnavailable();
907
+ const actor = normalizeOrganizationAuthorityMemberOutcome(value.actor);
908
+ const target = normalizeOrganizationAuthorityMemberOutcome(value.target);
909
+ if (target.memberId !== memberId || actor.manualRole !== "owner" && actor.manualRole !== "admin") throw authorityUnavailable();
910
+ for (const member of [actor, target]) if (member.manualRole === "member" ? member.role === "owner" : member.role !== member.manualRole) throw authorityUnavailable();
911
+ if (actor.memberId === target.memberId && (actor.manualRole !== target.manualRole || actor.role !== target.role || actor.authorityRevision !== target.authorityRevision)) throw authorityUnavailable();
912
+ return {
913
+ organizationId: value.organizationId,
914
+ actor,
915
+ target
916
+ };
917
+ }
918
+ function normalizeOrganizationAuthorityMemberOutcome(value, includesStatus = false) {
919
+ exact(value, [
920
+ "memberId",
921
+ "manualRole",
922
+ "role",
923
+ "authorityRevision",
924
+ ...includesStatus ? ["status"] : []
925
+ ]);
926
+ if (!isId(value.memberId) || value.manualRole !== "owner" && value.manualRole !== "admin" && value.manualRole !== "member" || value.role !== "owner" && value.role !== "admin" && value.role !== "member") throw authorityUnavailable();
927
+ return {
928
+ memberId: value.memberId,
929
+ manualRole: value.manualRole,
930
+ role: value.role,
931
+ authorityRevision: normalizeAuthorityResultRevision(value.authorityRevision)
932
+ };
933
+ }
934
+ function normalizeAuthorityResultRevision(value) {
935
+ if (!Number.isSafeInteger(value) || value < 0 || value >= Number.MAX_SAFE_INTEGER) throw authorityUnavailable();
936
+ return value;
937
+ }
899
938
  function mapError(code, status) {
900
939
  if (code === "authentication_required") return {
901
940
  code,
@@ -1475,6 +1514,11 @@ function createDeviceAuth(options) {
1475
1514
  return Promise.reject(error);
1476
1515
  }
1477
1516
  },
1517
+ async getOrganizationMemberAuthority(organizationId, memberId) {
1518
+ const organization = normalizeIdInput(organizationId);
1519
+ const member = normalizeIdInput(memberId);
1520
+ return serializeAuthority(() => organizationRead(`${organization}/members/${member}/authority`, void 0, (value) => normalizeOrganizationMemberAuthority(value, organization, member)));
1521
+ },
1478
1522
  createOrganizationTeam(organizationId, name, idempotencyKey) {
1479
1523
  let id;
1480
1524
  let body;
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { A as PlatformRole, B as SignInInput, C as OrganizationTeam, D as OrganizationWorkspaceSelection, E as OrganizationTeamPage, F as PlatformStatus, G as UpdateProfileInput, H as SocialIdTokenProvider, I as ReceivedOrganizationInvitation, J as AuthErrorCode, K as WorkspaceSelection, L as ReceivedOrganizationInvitationPage, M as PlatformRoleApproval, N as PlatformRoleChangeRecentAuthenticationInput, O as PersonalWorkspaceSelection, P as PlatformRoleFirstApproval, R as RecentAuthenticationStatus, S as OrganizationPageInput, T as OrganizationTeamMemberPage, U as UpdateOrganizationDisplayInput, V as SocialIdTokenInput, W as UpdateOrganizationTeamDisplayInput, Y as AuthErrorStatus, _ as OrganizationInvitation, a as AuthPersistenceDriver, b as OrganizationMemberPage, c as AuthUser, d as CreatedOrganizationTeam, f as DriveCredential, g as OrganizationDisplay, h as InvitationAcceptance, i as AuthPersistence, j as PlatformRoleApplied, k as PlatformBootstrapRoleChangeInput, l as CreateOrganizationMemberInvitationInput, m as FinuevaAuthClient, n as AuthClientOptions, o as AuthSession, p as DriveCredentialInput, q as AuthError, r as AuthOrganization, s as AuthState, t as AcceptInvitationInput, u as CreatedOrganizationMemberInvitation, v as OrganizationInvitationPage, w as OrganizationTeamDisplay, x as OrganizationPage, y as OrganizationMember, z as SendVerificationEmailInput } from "./types--G_Gwf2r.js";
1
+ import { A as PersonalWorkspaceSelection, B as RecentAuthenticationStatus, C as OrganizationPage, D as OrganizationTeamMemberPage, E as OrganizationTeamDisplay, F as PlatformRoleChangeRecentAuthenticationInput, G as SocialIdTokenProvider, H as SendVerificationEmailInput, I as PlatformRoleFirstApproval, J as UpdateProfileInput, K as UpdateOrganizationDisplayInput, L as PlatformStatus, M as PlatformRole, N as PlatformRoleApplied, O as OrganizationTeamPage, P as PlatformRoleApproval, Q as AuthErrorStatus, R as ReceivedOrganizationInvitation, S as OrganizationMemberPage, T as OrganizationTeam, U as SignInInput, V as ResentOrganizationInvitation, W as SocialIdTokenInput, X as AuthError, Y as WorkspaceSelection, Z as AuthErrorCode, _ as OrganizationDisplay, a as AuthPersistenceDriver, b as OrganizationMember, c as AuthUser, d as CreatedOrganizationMemberInvitation, f as CreatedOrganizationTeam, g as InvitationAcceptance, h as FinuevaAuthClient, i as AuthPersistence, j as PlatformBootstrapRoleChangeInput, k as OrganizationWorkspaceSelection, l as CanceledOrganizationInvitation, m as DriveCredentialInput, n as AuthClientOptions, o as AuthSession, p as DriveCredential, q as UpdateOrganizationTeamDisplayInput, r as AuthOrganization, s as AuthState, t as AcceptInvitationInput, u as CreateOrganizationMemberInvitationInput, v as OrganizationInvitation, w as OrganizationPageInput, x as OrganizationMemberAuthority, y as OrganizationInvitationPage, z as ReceivedOrganizationInvitationPage } from "./types-Dsu3nEaN.js";
2
2
  //#region src/client.d.ts
3
3
  declare function createAuthClient(options: AuthClientOptions): FinuevaAuthClient;
4
4
  //#endregion
5
- export { type AcceptInvitationInput, type AuthClientOptions, AuthError, type AuthErrorCode, type AuthErrorStatus, type AuthOrganization, type AuthPersistence, type AuthPersistenceDriver, type AuthSession, type AuthState, type AuthUser, type CreateOrganizationMemberInvitationInput, type CreatedOrganizationMemberInvitation, type CreatedOrganizationTeam, type DriveCredential, type DriveCredentialInput, type FinuevaAuthClient, type InvitationAcceptance, type OrganizationDisplay, type OrganizationInvitation, type OrganizationInvitationPage, type OrganizationMember, type OrganizationMemberPage, type OrganizationPage, type OrganizationPageInput, type OrganizationTeam, type OrganizationTeamDisplay, type OrganizationTeamMemberPage, type OrganizationTeamPage, type OrganizationWorkspaceSelection, type PersonalWorkspaceSelection, type PlatformBootstrapRoleChangeInput, type PlatformRole, type PlatformRoleApplied, type PlatformRoleApproval, type PlatformRoleChangeRecentAuthenticationInput, type PlatformRoleFirstApproval, type PlatformStatus, type ReceivedOrganizationInvitation, type ReceivedOrganizationInvitationPage, type RecentAuthenticationStatus, type SendVerificationEmailInput, type SignInInput, type SocialIdTokenInput, type SocialIdTokenProvider, type UpdateOrganizationDisplayInput, type UpdateOrganizationTeamDisplayInput, type UpdateProfileInput, type WorkspaceSelection, createAuthClient };
5
+ export { type AcceptInvitationInput, type AuthClientOptions, AuthError, type AuthErrorCode, type AuthErrorStatus, type AuthOrganization, type AuthPersistence, type AuthPersistenceDriver, type AuthSession, type AuthState, type AuthUser, type CanceledOrganizationInvitation, type CreateOrganizationMemberInvitationInput, type CreatedOrganizationMemberInvitation, type CreatedOrganizationTeam, type DriveCredential, type DriveCredentialInput, type FinuevaAuthClient, type InvitationAcceptance, type OrganizationDisplay, type OrganizationInvitation, type OrganizationInvitationPage, type OrganizationMember, type OrganizationMemberAuthority, type OrganizationMemberPage, type OrganizationPage, type OrganizationPageInput, type OrganizationTeam, type OrganizationTeamDisplay, type OrganizationTeamMemberPage, type OrganizationTeamPage, type OrganizationWorkspaceSelection, type PersonalWorkspaceSelection, type PlatformBootstrapRoleChangeInput, type PlatformRole, type PlatformRoleApplied, type PlatformRoleApproval, type PlatformRoleChangeRecentAuthenticationInput, type PlatformRoleFirstApproval, type PlatformStatus, type ReceivedOrganizationInvitation, type ReceivedOrganizationInvitationPage, type RecentAuthenticationStatus, type ResentOrganizationInvitation, type SendVerificationEmailInput, type SignInInput, type SocialIdTokenInput, type SocialIdTokenProvider, type UpdateOrganizationDisplayInput, type UpdateOrganizationTeamDisplayInput, type UpdateProfileInput, type WorkspaceSelection, createAuthClient };
package/dist/index.js CHANGED
@@ -2544,6 +2544,7 @@ const messages = {
2544
2544
  invalid_invitation: "The invitation is invalid.",
2545
2545
  invitation_unavailable: "The invitation is not available.",
2546
2546
  invitation_recipient_mismatch: "The invitation cannot be accepted by this account.",
2547
+ invitation_recovery_required: "Invitation administration requires separate recovery.",
2547
2548
  email_verification_required: "Email verification is required.",
2548
2549
  invalid_workspace_selection: "The workspace selection is invalid.",
2549
2550
  organization_context_too_large: "The organization context is too large.",
@@ -3067,6 +3068,20 @@ function normalizeCreatedOrganizationMemberInvitation(value) {
3067
3068
  expiresAt: responseDate(value.expiresAt)
3068
3069
  };
3069
3070
  }
3071
+ function normalizeResentOrganizationInvitation(value, invitationId) {
3072
+ const invitation = normalizeCreatedOrganizationMemberInvitation(value);
3073
+ if (invitation.id !== invitationId) throw authorityUnavailable();
3074
+ return invitation;
3075
+ }
3076
+ function normalizeOrganizationInvitationAdministrationInput(idempotencyKey) {
3077
+ if (!boundedString(idempotencyKey, 255)) throw new AuthError("invalid_request", 400);
3078
+ return { idempotencyKey };
3079
+ }
3080
+ function normalizeCanceledOrganizationInvitation(value) {
3081
+ exact(value, ["status"]);
3082
+ if (value.status !== "canceled") throw authorityUnavailable();
3083
+ return { status: "canceled" };
3084
+ }
3070
3085
  function normalizeOrganizations(value) {
3071
3086
  exact(value, ["nextCursor", "organizations"]);
3072
3087
  if (!Array.isArray(value.organizations) || value.organizations.length > 100) throw authorityUnavailable();
@@ -3298,6 +3313,10 @@ function fromOrganizationMutationAuthorityError(value, status, retryAfter) {
3298
3313
  if (status === 403 && code === "REQUEST_ORIGIN_DENIED") return new AuthError("request_origin_denied", 403);
3299
3314
  return fromOrganizationReadAuthorityError(value, status);
3300
3315
  }
3316
+ function fromOrganizationInvitationAdministrationError(value, status, retryAfter) {
3317
+ if (status === 422 && isObject(value) && value.code === "RECOVERY_REQUIRED") return new AuthError("invitation_recovery_required", 422);
3318
+ return fromOrganizationMutationAuthorityError(value, status, retryAfter);
3319
+ }
3301
3320
  function normalizePlatformRoleChangeRecentAuthenticationInput(value) {
3302
3321
  if (!isObject(value) || Object.keys(value).sort().join(",") !== "changeReference,expectedGlobalRevision,expectedTargetRevision,idempotencyKey,reasonCategory,requestedRoles,targetUserId") throw new TypeError("recent authentication input is invalid");
3303
3322
  if (!isId(value.targetUserId)) throw new TypeError("targetUserId is invalid");
@@ -3363,6 +3382,24 @@ function normalizeOrganizationManualRoleChangeResult(value) {
3363
3382
  ...normalizeOrganizationAuthorityMemberOutcome(value, true)
3364
3383
  };
3365
3384
  }
3385
+ function normalizeOrganizationMemberAuthority(value, organizationId, memberId) {
3386
+ exact(value, [
3387
+ "organizationId",
3388
+ "actor",
3389
+ "target"
3390
+ ]);
3391
+ if (!isId(value.organizationId) || value.organizationId !== organizationId) throw authorityUnavailable();
3392
+ const actor = normalizeOrganizationAuthorityMemberOutcome(value.actor);
3393
+ const target = normalizeOrganizationAuthorityMemberOutcome(value.target);
3394
+ if (target.memberId !== memberId || actor.manualRole !== "owner" && actor.manualRole !== "admin") throw authorityUnavailable();
3395
+ for (const member of [actor, target]) if (member.manualRole === "member" ? member.role === "owner" : member.role !== member.manualRole) throw authorityUnavailable();
3396
+ if (actor.memberId === target.memberId && (actor.manualRole !== target.manualRole || actor.role !== target.role || actor.authorityRevision !== target.authorityRevision)) throw authorityUnavailable();
3397
+ return {
3398
+ organizationId: value.organizationId,
3399
+ actor,
3400
+ target
3401
+ };
3402
+ }
3366
3403
  function normalizeOrganizationOwnershipTransferResult(value) {
3367
3404
  exact(value, [
3368
3405
  "status",
@@ -4911,6 +4948,11 @@ function createAuthClient(options) {
4911
4948
  async getOrganization(organizationId) {
4912
4949
  return organizationRead(normalizeIdInput(organizationId), void 0, normalizeOrganization);
4913
4950
  },
4951
+ async getOrganizationMemberAuthority(organizationId, memberId) {
4952
+ const organization = normalizeIdInput(organizationId);
4953
+ const member = normalizeIdInput(memberId);
4954
+ return organizationRead(`${organization}/members/${member}/authority`, void 0, (value) => normalizeOrganizationMemberAuthority(value, organization, member));
4955
+ },
4914
4956
  async createOrganizationTeam(organizationId, name, idempotencyKey) {
4915
4957
  const id = normalizeIdInput(organizationId);
4916
4958
  const body = normalizeOrganizationTeamCreationInput(name, idempotencyKey);
@@ -4943,6 +4985,40 @@ function createAuthClient(options) {
4943
4985
  if (generation !== authorityGeneration) throw new AuthError("state_conflict", 409);
4944
4986
  return normalizeCreatedOrganizationMemberInvitation(value);
4945
4987
  },
4988
+ async resendOrganizationInvitation(organizationId, invitationId, idempotencyKey) {
4989
+ const organization = normalizeIdInput(organizationId);
4990
+ const invitation = normalizeIdInput(invitationId);
4991
+ const body = normalizeOrganizationInvitationAdministrationInput(idempotencyKey);
4992
+ if (signOutRequest || activeAccountMutationGeneration !== void 0 || invitationRequest) throw new AuthError("state_conflict", 409);
4993
+ const generation = authorityGeneration;
4994
+ const value = await requestJson(joinURL(authOrigin, "api/v1/auth/organizations", organization, "invitations", invitation, "resend"), {
4995
+ fetch: fetchImpl,
4996
+ timeoutMs,
4997
+ method: "POST",
4998
+ headers: { "content-type": "application/json" },
4999
+ body,
5000
+ mapError: fromOrganizationInvitationAdministrationError
5001
+ });
5002
+ if (generation !== authorityGeneration) throw new AuthError("state_conflict", 409);
5003
+ return normalizeResentOrganizationInvitation(value, invitation);
5004
+ },
5005
+ async cancelOrganizationInvitation(organizationId, invitationId, idempotencyKey) {
5006
+ const organization = normalizeIdInput(organizationId);
5007
+ const invitation = normalizeIdInput(invitationId);
5008
+ const body = normalizeOrganizationInvitationAdministrationInput(idempotencyKey);
5009
+ if (signOutRequest || activeAccountMutationGeneration !== void 0 || invitationRequest) throw new AuthError("state_conflict", 409);
5010
+ const generation = authorityGeneration;
5011
+ const value = await requestJson(joinURL(authOrigin, "api/v1/auth/organizations", organization, "invitations", invitation, "cancel"), {
5012
+ fetch: fetchImpl,
5013
+ timeoutMs,
5014
+ method: "POST",
5015
+ headers: { "content-type": "application/json" },
5016
+ body,
5017
+ mapError: fromOrganizationInvitationAdministrationError
5018
+ });
5019
+ if (generation !== authorityGeneration) throw new AuthError("state_conflict", 409);
5020
+ return normalizeCanceledOrganizationInvitation(value);
5021
+ },
4946
5022
  async updateOrganizationDisplay(organizationId, input) {
4947
5023
  const id = normalizeIdInput(organizationId);
4948
5024
  const desired = normalizeOrganizationDisplayInput(input);
package/dist/server.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { C as OrganizationTeam, D as OrganizationWorkspaceSelection, E as OrganizationTeamPage, H as SocialIdTokenProvider, I as ReceivedOrganizationInvitation, J as AuthErrorCode, K as WorkspaceSelection, L as ReceivedOrganizationInvitationPage, O as PersonalWorkspaceSelection, S as OrganizationPageInput, T as OrganizationTeamMemberPage, U as UpdateOrganizationDisplayInput, V as SocialIdTokenInput, W as UpdateOrganizationTeamDisplayInput, Y as AuthErrorStatus, _ as OrganizationInvitation, b as OrganizationMemberPage, c as AuthUser, d as CreatedOrganizationTeam, f as DriveCredential, g as OrganizationDisplay, h as InvitationAcceptance, l as CreateOrganizationMemberInvitationInput, o as AuthSession, p as DriveCredentialInput, q as AuthError, r as AuthOrganization, t as AcceptInvitationInput, u as CreatedOrganizationMemberInvitation, v as OrganizationInvitationPage, w as OrganizationTeamDisplay, x as OrganizationPage, y as OrganizationMember } from "./types--G_Gwf2r.js";
1
+ import { A as PersonalWorkspaceSelection, C as OrganizationPage, D as OrganizationTeamMemberPage, E as OrganizationTeamDisplay, G as SocialIdTokenProvider, K as UpdateOrganizationDisplayInput, O as OrganizationTeamPage, Q as AuthErrorStatus, R as ReceivedOrganizationInvitation, S as OrganizationMemberPage, T as OrganizationTeam, V as ResentOrganizationInvitation, W as SocialIdTokenInput, X as AuthError, Y as WorkspaceSelection, Z as AuthErrorCode, _ as OrganizationDisplay, b as OrganizationMember, c as AuthUser, d as CreatedOrganizationMemberInvitation, f as CreatedOrganizationTeam, g as InvitationAcceptance, k as OrganizationWorkspaceSelection, l as CanceledOrganizationInvitation, m as DriveCredentialInput, o as AuthSession, p as DriveCredential, q as UpdateOrganizationTeamDisplayInput, r as AuthOrganization, t as AcceptInvitationInput, u as CreateOrganizationMemberInvitationInput, v as OrganizationInvitation, w as OrganizationPageInput, x as OrganizationMemberAuthority, y as OrganizationInvitationPage, z as ReceivedOrganizationInvitationPage } from "./types-Dsu3nEaN.js";
2
2
  //#region src/server.d.ts
3
3
  interface ServerAuthOptions {
4
4
  authOrigin: string;
@@ -22,8 +22,11 @@ interface FinuevaServerAuth {
22
22
  getSession(): Promise<AuthSession | null>;
23
23
  listOrganizations(input?: OrganizationPageInput): Promise<OrganizationPage>;
24
24
  getOrganization(organizationId: string): Promise<AuthOrganization>;
25
+ getOrganizationMemberAuthority(organizationId: string, memberId: string): Promise<OrganizationMemberAuthority>;
25
26
  createOrganizationTeam(organizationId: string, name: string, idempotencyKey: string): Promise<CreatedOrganizationTeam>;
26
27
  createOrganizationMemberInvitation(organizationId: string, input: CreateOrganizationMemberInvitationInput): Promise<CreatedOrganizationMemberInvitation>;
28
+ resendOrganizationInvitation(organizationId: string, invitationId: string, idempotencyKey: string): Promise<ResentOrganizationInvitation>;
29
+ cancelOrganizationInvitation(organizationId: string, invitationId: string, idempotencyKey: string): Promise<CanceledOrganizationInvitation>;
27
30
  updateOrganizationDisplay(organizationId: string, input: UpdateOrganizationDisplayInput): Promise<OrganizationDisplay>;
28
31
  updateOrganizationTeamDisplay(organizationId: string, teamId: string, input: UpdateOrganizationTeamDisplayInput): Promise<OrganizationTeamDisplay>;
29
32
  listOrganizationMembers(organizationId: string, input?: OrganizationPageInput): Promise<OrganizationMemberPage>;
@@ -39,4 +42,4 @@ interface FinuevaServerAuth {
39
42
  }
40
43
  declare function createServerAuth(options: ServerAuthOptions): FinuevaServerAuth;
41
44
  //#endregion
42
- export { type AcceptInvitationInput, AuthError, type AuthErrorCode, type AuthErrorStatus, type AuthOrganization, type AuthSession, type AuthUser, type CreateOrganizationMemberInvitationInput, type CreatedOrganizationMemberInvitation, type CreatedOrganizationTeam, type DriveCredential, type DriveCredentialInput, FinuevaServerAuth, type InvitationAcceptance, type OrganizationDisplay, type OrganizationInvitation, type OrganizationInvitationPage, type OrganizationMember, type OrganizationMemberPage, type OrganizationPage, type OrganizationPageInput, type OrganizationTeam, type OrganizationTeamDisplay, type OrganizationTeamMemberPage, type OrganizationTeamPage, type OrganizationWorkspaceSelection, type PersonalWorkspaceSelection, type ReceivedOrganizationInvitation, type ReceivedOrganizationInvitationPage, ServerAuthOptions, ServerInvitationAcceptance, ServerSignOutResult, ServerSocialIdTokenSession, type SocialIdTokenInput, type SocialIdTokenProvider, type UpdateOrganizationDisplayInput, type UpdateOrganizationTeamDisplayInput, type WorkspaceSelection, createServerAuth };
45
+ export { type AcceptInvitationInput, AuthError, type AuthErrorCode, type AuthErrorStatus, type AuthOrganization, type AuthSession, type AuthUser, type CanceledOrganizationInvitation, type CreateOrganizationMemberInvitationInput, type CreatedOrganizationMemberInvitation, type CreatedOrganizationTeam, type DriveCredential, type DriveCredentialInput, FinuevaServerAuth, type InvitationAcceptance, type OrganizationDisplay, type OrganizationInvitation, type OrganizationInvitationPage, type OrganizationMember, type OrganizationMemberAuthority, type OrganizationMemberPage, type OrganizationPage, type OrganizationPageInput, type OrganizationTeam, type OrganizationTeamDisplay, type OrganizationTeamMemberPage, type OrganizationTeamPage, type OrganizationWorkspaceSelection, type PersonalWorkspaceSelection, type ReceivedOrganizationInvitation, type ReceivedOrganizationInvitationPage, type ResentOrganizationInvitation, ServerAuthOptions, ServerInvitationAcceptance, ServerSignOutResult, ServerSocialIdTokenSession, type SocialIdTokenInput, type SocialIdTokenProvider, type UpdateOrganizationDisplayInput, type UpdateOrganizationTeamDisplayInput, type WorkspaceSelection, createServerAuth };
package/dist/server.js CHANGED
@@ -185,6 +185,7 @@ const messages = {
185
185
  invalid_invitation: "The invitation is invalid.",
186
186
  invitation_unavailable: "The invitation is not available.",
187
187
  invitation_recipient_mismatch: "The invitation cannot be accepted by this account.",
188
+ invitation_recovery_required: "Invitation administration requires separate recovery.",
188
189
  email_verification_required: "Email verification is required.",
189
190
  invalid_workspace_selection: "The workspace selection is invalid.",
190
191
  organization_context_too_large: "The organization context is too large.",
@@ -673,6 +674,20 @@ function normalizeCreatedOrganizationMemberInvitation(value) {
673
674
  expiresAt: responseDate(value.expiresAt)
674
675
  };
675
676
  }
677
+ function normalizeResentOrganizationInvitation(value, invitationId) {
678
+ const invitation = normalizeCreatedOrganizationMemberInvitation(value);
679
+ if (invitation.id !== invitationId) throw authorityUnavailable();
680
+ return invitation;
681
+ }
682
+ function normalizeOrganizationInvitationAdministrationInput(idempotencyKey) {
683
+ if (!boundedString(idempotencyKey, 255)) throw new AuthError("invalid_request", 400);
684
+ return { idempotencyKey };
685
+ }
686
+ function normalizeCanceledOrganizationInvitation(value) {
687
+ exact(value, ["status"]);
688
+ if (value.status !== "canceled") throw authorityUnavailable();
689
+ return { status: "canceled" };
690
+ }
676
691
  function normalizeOrganizations(value) {
677
692
  exact(value, ["nextCursor", "organizations"]);
678
693
  if (!Array.isArray(value.organizations) || value.organizations.length > 100) throw authorityUnavailable();
@@ -890,6 +905,48 @@ function fromOrganizationMutationAuthorityError(value, status, retryAfter) {
890
905
  if (status === 403 && code === "REQUEST_ORIGIN_DENIED") return new AuthError("request_origin_denied", 403);
891
906
  return fromOrganizationReadAuthorityError(value, status);
892
907
  }
908
+ function fromOrganizationInvitationAdministrationError(value, status, retryAfter) {
909
+ if (status === 422 && isObject(value) && value.code === "RECOVERY_REQUIRED") return new AuthError("invitation_recovery_required", 422);
910
+ return fromOrganizationMutationAuthorityError(value, status, retryAfter);
911
+ }
912
+ function normalizeOrganizationMemberAuthority(value, organizationId, memberId) {
913
+ exact(value, [
914
+ "organizationId",
915
+ "actor",
916
+ "target"
917
+ ]);
918
+ if (!isId(value.organizationId) || value.organizationId !== organizationId) throw authorityUnavailable();
919
+ const actor = normalizeOrganizationAuthorityMemberOutcome(value.actor);
920
+ const target = normalizeOrganizationAuthorityMemberOutcome(value.target);
921
+ if (target.memberId !== memberId || actor.manualRole !== "owner" && actor.manualRole !== "admin") throw authorityUnavailable();
922
+ for (const member of [actor, target]) if (member.manualRole === "member" ? member.role === "owner" : member.role !== member.manualRole) throw authorityUnavailable();
923
+ if (actor.memberId === target.memberId && (actor.manualRole !== target.manualRole || actor.role !== target.role || actor.authorityRevision !== target.authorityRevision)) throw authorityUnavailable();
924
+ return {
925
+ organizationId: value.organizationId,
926
+ actor,
927
+ target
928
+ };
929
+ }
930
+ function normalizeOrganizationAuthorityMemberOutcome(value, includesStatus = false) {
931
+ exact(value, [
932
+ "memberId",
933
+ "manualRole",
934
+ "role",
935
+ "authorityRevision",
936
+ ...includesStatus ? ["status"] : []
937
+ ]);
938
+ if (!isId(value.memberId) || value.manualRole !== "owner" && value.manualRole !== "admin" && value.manualRole !== "member" || value.role !== "owner" && value.role !== "admin" && value.role !== "member") throw authorityUnavailable();
939
+ return {
940
+ memberId: value.memberId,
941
+ manualRole: value.manualRole,
942
+ role: value.role,
943
+ authorityRevision: normalizeAuthorityResultRevision(value.authorityRevision)
944
+ };
945
+ }
946
+ function normalizeAuthorityResultRevision(value) {
947
+ if (!Number.isSafeInteger(value) || value < 0 || value >= Number.MAX_SAFE_INTEGER) throw authorityUnavailable();
948
+ return value;
949
+ }
893
950
  function fromInvitationAuthorityError(value, status) {
894
951
  const code = isObject(value) && typeof value.code === "string" ? value.code : void 0;
895
952
  if (status === 401 && code === "UNAUTHORIZED") return new AuthError("authentication_required", 401);
@@ -1154,6 +1211,11 @@ function createServerAuth(options) {
1154
1211
  getOrganization(organizationId) {
1155
1212
  return organizationRead(normalizeIdInput(organizationId), void 0, normalizeOrganization);
1156
1213
  },
1214
+ async getOrganizationMemberAuthority(organizationId, memberId) {
1215
+ const organization = normalizeIdInput(organizationId);
1216
+ const member = normalizeIdInput(memberId);
1217
+ return organizationRead(`${organization}/members/${member}/authority`, void 0, (value) => normalizeOrganizationMemberAuthority(value, organization, member));
1218
+ },
1157
1219
  async createOrganizationTeam(organizationId, name, idempotencyKey) {
1158
1220
  const id = normalizeIdInput(organizationId);
1159
1221
  const body = normalizeOrganizationTeamCreationInput(name, idempotencyKey);
@@ -1186,6 +1248,42 @@ function createServerAuth(options) {
1186
1248
  mapError: fromOrganizationMutationAuthorityError
1187
1249
  }));
1188
1250
  },
1251
+ async resendOrganizationInvitation(organizationId, invitationId, idempotencyKey) {
1252
+ if (authorization) throw new AuthError("authentication_required", 401);
1253
+ const organization = normalizeIdInput(organizationId);
1254
+ const invitation = normalizeIdInput(invitationId);
1255
+ const body = normalizeOrganizationInvitationAdministrationInput(idempotencyKey);
1256
+ return normalizeResentOrganizationInvitation(await requestJson(joinURL(authOrigin, "api/v1/auth/organizations", organization, "invitations", invitation, "resend"), {
1257
+ fetch: fetchImpl,
1258
+ timeoutMs,
1259
+ method: "POST",
1260
+ credentials,
1261
+ headers: {
1262
+ ...authHeaders(),
1263
+ "content-type": "application/json"
1264
+ },
1265
+ body,
1266
+ mapError: fromOrganizationInvitationAdministrationError
1267
+ }), invitation);
1268
+ },
1269
+ async cancelOrganizationInvitation(organizationId, invitationId, idempotencyKey) {
1270
+ if (authorization) throw new AuthError("authentication_required", 401);
1271
+ const organization = normalizeIdInput(organizationId);
1272
+ const invitation = normalizeIdInput(invitationId);
1273
+ const body = normalizeOrganizationInvitationAdministrationInput(idempotencyKey);
1274
+ return normalizeCanceledOrganizationInvitation(await requestJson(joinURL(authOrigin, "api/v1/auth/organizations", organization, "invitations", invitation, "cancel"), {
1275
+ fetch: fetchImpl,
1276
+ timeoutMs,
1277
+ method: "POST",
1278
+ credentials,
1279
+ headers: {
1280
+ ...authHeaders(),
1281
+ "content-type": "application/json"
1282
+ },
1283
+ body,
1284
+ mapError: fromOrganizationInvitationAdministrationError
1285
+ }));
1286
+ },
1189
1287
  async updateOrganizationDisplay(organizationId, input) {
1190
1288
  const id = normalizeIdInput(organizationId);
1191
1289
  const desired = normalizeOrganizationDisplayInput(input);
@@ -1,5 +1,5 @@
1
1
  //#region src/errors.d.ts
2
- type AuthErrorCode = "invalid_credentials" | "invalid_auth_input" | "account_conflict" | "password_reset_invalid" | "authentication_required" | "request_origin_denied" | "invalid_request" | "invalid_invitation" | "invitation_unavailable" | "invitation_recipient_mismatch" | "email_verification_required" | "invalid_workspace_selection" | "organization_context_too_large" | "credential_rate_limited" | "auth_request_rate_limited" | "state_conflict" | "access_denied" | "platform_target_unavailable" | "platform_quorum_unavailable" | "platform_recovery_required" | "identity_authority_unavailable";
2
+ type AuthErrorCode = "invalid_credentials" | "invalid_auth_input" | "account_conflict" | "password_reset_invalid" | "authentication_required" | "request_origin_denied" | "invalid_request" | "invalid_invitation" | "invitation_unavailable" | "invitation_recipient_mismatch" | "invitation_recovery_required" | "email_verification_required" | "invalid_workspace_selection" | "organization_context_too_large" | "credential_rate_limited" | "auth_request_rate_limited" | "state_conflict" | "access_denied" | "platform_target_unavailable" | "platform_quorum_unavailable" | "platform_recovery_required" | "identity_authority_unavailable";
3
3
  type AuthErrorStatus = 400 | 401 | 403 | 404 | 409 | 413 | 415 | 422 | 429 | 503;
4
4
  declare class AuthError extends Error {
5
5
  readonly code: AuthErrorCode;
@@ -86,6 +86,13 @@ interface CreatedOrganizationMemberInvitation {
86
86
  id: string;
87
87
  expiresAt: Date;
88
88
  }
89
+ interface ResentOrganizationInvitation {
90
+ id: string;
91
+ expiresAt: Date;
92
+ }
93
+ interface CanceledOrganizationInvitation {
94
+ status: "canceled";
95
+ }
89
96
  interface OrganizationTeamPage {
90
97
  teams: OrganizationTeam[];
91
98
  nextCursor: string | null;
@@ -244,6 +251,11 @@ interface OrganizationManualRoleChangeResult {
244
251
  role: OrganizationManualRole;
245
252
  authorityRevision: number;
246
253
  }
254
+ interface OrganizationMemberAuthority {
255
+ organizationId: string;
256
+ actor: Omit<OrganizationManualRoleChangeResult, "status">;
257
+ target: Omit<OrganizationManualRoleChangeResult, "status">;
258
+ }
247
259
  interface OrganizationOwnershipTransferInput {
248
260
  outgoingOwnerMembershipId: string;
249
261
  successorMembershipId: string;
@@ -280,8 +292,11 @@ interface FinuevaAuthClient {
280
292
  getSession(): Promise<AuthSession | null>;
281
293
  listOrganizations(input?: OrganizationPageInput): Promise<OrganizationPage>;
282
294
  getOrganization(organizationId: string): Promise<AuthOrganization>;
295
+ getOrganizationMemberAuthority(organizationId: string, memberId: string): Promise<OrganizationMemberAuthority>;
283
296
  createOrganizationTeam(organizationId: string, name: string, idempotencyKey: string): Promise<CreatedOrganizationTeam>;
284
297
  createOrganizationMemberInvitation(organizationId: string, input: CreateOrganizationMemberInvitationInput): Promise<CreatedOrganizationMemberInvitation>;
298
+ resendOrganizationInvitation(organizationId: string, invitationId: string, idempotencyKey: string): Promise<ResentOrganizationInvitation>;
299
+ cancelOrganizationInvitation(organizationId: string, invitationId: string, idempotencyKey: string): Promise<CanceledOrganizationInvitation>;
285
300
  updateOrganizationDisplay(organizationId: string, input: UpdateOrganizationDisplayInput): Promise<OrganizationDisplay>;
286
301
  updateOrganizationTeamDisplay(organizationId: string, teamId: string, input: UpdateOrganizationTeamDisplayInput): Promise<OrganizationTeamDisplay>;
287
302
  changeOrganizationMemberManualRole(organizationId: string, targetMembershipId: string, input: OrganizationManualRoleChangeInput): Promise<OrganizationManualRoleChangeResult>;
@@ -307,4 +322,4 @@ interface FinuevaAuthClient {
307
322
  onSessionChange(listener: (session: AuthSession | null) => void): () => void;
308
323
  }
309
324
  //#endregion
310
- export { PlatformRole as A, SignInInput as B, OrganizationTeam as C, OrganizationWorkspaceSelection as D, OrganizationTeamPage as E, PlatformStatus as F, UpdateProfileInput as G, SocialIdTokenProvider as H, ReceivedOrganizationInvitation as I, AuthErrorCode as J, WorkspaceSelection as K, ReceivedOrganizationInvitationPage as L, PlatformRoleApproval as M, PlatformRoleChangeRecentAuthenticationInput as N, PersonalWorkspaceSelection as O, PlatformRoleFirstApproval as P, RecentAuthenticationStatus as R, OrganizationPageInput as S, OrganizationTeamMemberPage as T, UpdateOrganizationDisplayInput as U, SocialIdTokenInput as V, UpdateOrganizationTeamDisplayInput as W, AuthErrorStatus as Y, OrganizationInvitation as _, AuthPersistenceDriver as a, OrganizationMemberPage as b, AuthUser as c, CreatedOrganizationTeam as d, DriveCredential as f, OrganizationDisplay as g, InvitationAcceptance as h, AuthPersistence as i, PlatformRoleApplied as j, PlatformBootstrapRoleChangeInput as k, CreateOrganizationMemberInvitationInput as l, FinuevaAuthClient as m, AuthClientOptions as n, AuthSession as o, DriveCredentialInput as p, AuthError as q, AuthOrganization as r, AuthState as s, AcceptInvitationInput as t, CreatedOrganizationMemberInvitation as u, OrganizationInvitationPage as v, OrganizationTeamDisplay as w, OrganizationPage as x, OrganizationMember as y, SendVerificationEmailInput as z };
325
+ export { PersonalWorkspaceSelection as A, RecentAuthenticationStatus as B, OrganizationPage as C, OrganizationTeamMemberPage as D, OrganizationTeamDisplay as E, PlatformRoleChangeRecentAuthenticationInput as F, SocialIdTokenProvider as G, SendVerificationEmailInput as H, PlatformRoleFirstApproval as I, UpdateProfileInput as J, UpdateOrganizationDisplayInput as K, PlatformStatus as L, PlatformRole as M, PlatformRoleApplied as N, OrganizationTeamPage as O, PlatformRoleApproval as P, AuthErrorStatus as Q, ReceivedOrganizationInvitation as R, OrganizationMemberPage as S, OrganizationTeam as T, SignInInput as U, ResentOrganizationInvitation as V, SocialIdTokenInput as W, AuthError as X, WorkspaceSelection as Y, AuthErrorCode as Z, OrganizationDisplay as _, AuthPersistenceDriver as a, OrganizationMember as b, AuthUser as c, CreatedOrganizationMemberInvitation as d, CreatedOrganizationTeam as f, InvitationAcceptance as g, FinuevaAuthClient as h, AuthPersistence as i, PlatformBootstrapRoleChangeInput as j, OrganizationWorkspaceSelection as k, CanceledOrganizationInvitation as l, DriveCredentialInput as m, AuthClientOptions as n, AuthSession as o, DriveCredential as p, UpdateOrganizationTeamDisplayInput as q, AuthOrganization as r, AuthState as s, AcceptInvitationInput as t, CreateOrganizationMemberInvitationInput as u, OrganizationInvitation as v, OrganizationPageInput as w, OrganizationMemberAuthority as x, OrganizationInvitationPage as y, ReceivedOrganizationInvitationPage as z };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finueva/auth",
3
- "version": "0.11.1",
3
+ "version": "0.13.0",
4
4
  "description": "Public browser and server SDK for Finueva Auth",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -43,8 +43,8 @@
43
43
  "lint": "oxlint . --deny-warnings",
44
44
  "prepack": "pnpm build",
45
45
  "test": "pnpm test:unit && pnpm build && pnpm test:package",
46
- "test:composition": "node scripts/test-composition.mjs",
47
- "test:package": "node scripts/test-package.mjs",
46
+ "test:composition": "node scripts/test/composition/runner.mjs",
47
+ "test:package": "node scripts/test/package.mjs",
48
48
  "test:unit": "vitest run",
49
49
  "typecheck": "tsc --noEmit"
50
50
  },