@finueva/auth 0.31.0 → 0.32.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.
@@ -379,6 +379,15 @@ interface EnterpriseConnection {
379
379
  updatedAt: Date;
380
380
  }
381
381
  /** OIDC self-service configuration. Client secrets are write-only. */
382
+ interface EnterpriseConnectionDomain {
383
+ domain: string;
384
+ revision: number;
385
+ primary: boolean;
386
+ verified: boolean;
387
+ dnsRecordName: string;
388
+ dnsRecordValue: string;
389
+ challengeExpiresAt: Date;
390
+ }
382
391
  interface EnterpriseConnectionSetup {
383
392
  id: string;
384
393
  revision: number;
@@ -388,19 +397,23 @@ interface EnterpriseConnectionSetup {
388
397
  memberJit: boolean;
389
398
  /** Require the provider to attest email verification. Defaults to true for a new connection. */
390
399
  requireVerifiedEmail: boolean;
400
+ /** An enabled provider requires a genuine organization/session admission when true. */
401
+ requireOrganizationSignIn: boolean;
391
402
  capability: "federated_sign_in" | "managed_lifecycle";
392
403
  groupsSync: boolean;
393
- domain: string;
404
+ domain: string | null;
405
+ domains: EnterpriseConnectionDomain[];
394
406
  domainVerified: boolean;
395
407
  validatedAt: Date | null;
396
408
  testedAt: Date | null;
397
- dnsRecordName: string;
398
- dnsRecordValue: string;
399
- challengeExpiresAt: Date;
409
+ dnsRecordName: string | null;
410
+ dnsRecordValue: string | null;
411
+ challengeExpiresAt: Date | null;
400
412
  redirectUri: string;
401
413
  }
402
414
  interface CreateEnterpriseConnectionInput {
403
415
  requireVerifiedEmail?: boolean;
416
+ requireOrganizationSignIn?: boolean;
404
417
  /** SCIM requires provisioned users before enterprise sign-in. A used connection cannot change mode. */
405
418
  provisioning?: boolean;
406
419
  groupsSync?: boolean;
@@ -409,11 +422,12 @@ interface CreateEnterpriseConnectionInput {
409
422
  issuer: string;
410
423
  clientId: string;
411
424
  clientSecret: string;
412
- domain: string;
425
+ domain: string | null;
413
426
  memberJit: boolean;
414
427
  }
415
428
  interface UpdateEnterpriseConnectionInput {
416
429
  requireVerifiedEmail?: boolean;
430
+ requireOrganizationSignIn?: boolean;
417
431
  /** SCIM requires provisioned users before enterprise sign-in. A used connection cannot change mode. */
418
432
  provisioning?: boolean;
419
433
  groupsSync?: boolean;
@@ -516,6 +530,13 @@ interface OrganizationMemberAuthority {
516
530
  actor: Omit<OrganizationManualRoleChangeResult, "status">;
517
531
  target: Omit<OrganizationManualRoleChangeResult, "status">;
518
532
  }
533
+ /** Explicit version 2 preparation data. A null target role means no manual contribution. */
534
+ interface OrganizationMemberAuthorityV2 extends Omit<OrganizationMemberAuthority, "target"> {
535
+ version: 2;
536
+ target: Omit<OrganizationMemberAuthority["target"], "manualRole"> & {
537
+ manualRole: OrganizationManualRole | null;
538
+ };
539
+ }
519
540
  interface OrganizationOwnershipTransferInput {
520
541
  outgoingOwnerMembershipId: string;
521
542
  successorMembershipId: string;
@@ -557,6 +578,21 @@ interface ClosingOrganization {
557
578
  interface ClosingOrganizationList {
558
579
  organizations: ClosingOrganization[];
559
580
  }
581
+ type OrganizationSignInState = {
582
+ status: "available";
583
+ mode: "membership" | "provider";
584
+ } | {
585
+ status: "sign_in_required";
586
+ connectionId: string;
587
+ };
588
+ interface OrganizationSignInStates {
589
+ organizations: Array<{
590
+ organizationId: string;
591
+ state: OrganizationSignInState | {
592
+ status: "forbidden";
593
+ };
594
+ }>;
595
+ }
560
596
  interface AuthClientOptions {
561
597
  authOrigin: string;
562
598
  appOrigin: string;
@@ -584,7 +620,9 @@ interface FinuevaAuthClient {
584
620
  getSession(): Promise<AuthSession | null>;
585
621
  listOrganizations(input?: OrganizationPageInput): Promise<OrganizationPage>;
586
622
  getOrganization(organizationId: string): Promise<AuthOrganization>;
623
+ getOrganizationSignInState(organizationId: string): Promise<OrganizationSignInState>;
587
624
  getOrganizationMemberAuthority(organizationId: string, memberId: string): Promise<OrganizationMemberAuthority>;
625
+ getOrganizationMemberAuthorityV2(organizationId: string, memberId: string): Promise<OrganizationMemberAuthorityV2>;
588
626
  /** Browser cookie session and exact registered app Origin required. Native bearer setup is not supported. */
589
627
  getOrganizationApplicationRegistration(organizationId: string, applicationId: string): Promise<OrganizationApplicationRegistration>;
590
628
  registerOrganizationApplication(organizationId: string, applicationId: string, input: RegisterOrganizationApplicationInput): Promise<RegisteredOrganizationApplication>;
@@ -646,6 +684,15 @@ interface FinuevaAuthClient {
646
684
  }): Promise<EnterpriseConnectionSetup | {
647
685
  removed: true;
648
686
  }>;
687
+ addEnterpriseConnectionDomain(organizationId: string, connectionId: string, input: {
688
+ expectedRevision: number;
689
+ domain: string;
690
+ }): Promise<EnterpriseConnectionSetup>;
691
+ actOnEnterpriseConnectionDomain(organizationId: string, connectionId: string, domain: string, input: {
692
+ expectedRevision: number;
693
+ expectedDomainRevision: number;
694
+ action: "challenge" | "verify" | "remove";
695
+ }): Promise<EnterpriseConnectionSetup>;
649
696
  /** Cookie-only. Reads SCIM credential state for an eligible managed-lifecycle connection. */
650
697
  getScimCredential(organizationId: string, connectionId: string): Promise<ScimCredentialState>;
651
698
  issueScimCredential(organizationId: string, connectionId: string): Promise<ScimCredentialIssuance>;
@@ -689,4 +736,4 @@ interface FinuevaAuthClient {
689
736
  onSessionChange(listener: (session: AuthSession | null) => void): () => void;
690
737
  }
691
738
  //#endregion
692
- export { OrganizationWorkspaceSelection as $, EnterpriseConnection as A, UpdateEnterpriseConnectionInput as At, OrganizationDisplay as B, AuthErrorCode as Bt, CreatedOrganizationTeam as C, SocialIdTokenProvider as Ct, DepartedOrganizationMemberPage as D, TwoFactorEnrollment as Dt, DepartedOrganizationMember as E, SuspendedOrganizationMemberStatus as Et, InvitationDecline as F, OrganizationApplicationRegistration as Ft, OrganizationMemberPage as G, OrganizationInvitationPage as H, UserApiCredential as Ht, OrganizationClosure as I, RegisterOrganizationApplicationInput as It, OrganizationPageInput as J, OrganizationMemberPageInput as K, OrganizationClosureCancelInput as L, RegisteredOrganizationApplication as Lt, EnterpriseConnectionSetup as M, UpdateOrganizationTeamDisplayInput as Mt, FinuevaAuthClient as N, UpdateProfileInput as Nt, DriveCredential as O, TwoFactorStatus as Ot, InvitationAcceptance as P, WorkspaceSelection as Pt, OrganizationTeamPage as Q, OrganizationClosureStartInput as R, OrganizationDirectoryEntry as Rt, CreatedOrganizationMemberInvitation as S, SocialIdTokenInput as St, DeletedOrganizationTeam as T, SuspendedOrganizationMemberPage as Tt, OrganizationMember as U, UserApiCredentialInput as Ut, OrganizationInvitation as V, AuthErrorStatus as Vt, OrganizationMemberAuthority as W, OrganizationTeamDisplay as X, OrganizationTeam as Y, OrganizationTeamMemberPage as Z, ClosingOrganization as _, RotateScimCredentialInput as _t, AuthPersistence as a, PlatformRoleApplied as at, CreateOrganizationMemberInvitationInput as b, SendVerificationEmailInput as bt, AuthSessionInventory as c, PlatformRoleFirstApproval as ct, AuthUser as d, ReceivedOrganizationInvitationPage as dt, PasskeyInventory as et, CanceledOrganizationInvitation as f, RecentAuthenticationStatus as ft, CeremonyReturnInput as g, RestoredOrganizationMember as gt, CeremonyRecentAuthenticationRequest as h, ResentOrganizationInvitation as ht, AuthOrganization as i, PlatformRole as it, EnterpriseConnectionAction as j, UpdateOrganizationDisplayInput as jt, DriveCredentialInput as k, TwoFactorStepUpInput as kt, AuthSessionSummary as l, PlatformStatus as lt, CeremonyHandoffInput as m, RemovedOrganizationTeamMember as mt, AddedOrganizationTeamMember as n, PersonalWorkspaceSelection as nt, AuthPersistenceDriver as o, PlatformRoleApproval as ot, CeremonyHandoff as p, RemovedOrganizationMember as pt, OrganizationPage as q, AuthClientOptions as r, PlatformBootstrapRoleChangeInput as rt, AuthSession as s, PlatformRoleChangeRecentAuthenticationInput as st, AcceptInvitationInput as t, PasskeySummary as tt, AuthState as u, ReceivedOrganizationInvitation as ut, ClosingOrganizationList as v, ScimCredentialIssuance as vt, DeclineInvitationInput as w, SuspendedOrganizationMember as wt, CreatedOrganization as x, SignInInput as xt, CreateEnterpriseConnectionInput as y, ScimCredentialState as yt, OrganizationDeparture as z, AuthError as zt };
739
+ export { OrganizationTeam as $, EnterpriseConnection as A, SuspendedOrganizationMemberStatus as At, OrganizationDeparture as B, RegisterOrganizationApplicationInput as Bt, CreatedOrganizationTeam as C, ScimCredentialState as Ct, DepartedOrganizationMemberPage as D, SocialIdTokenProvider as Dt, DepartedOrganizationMember as E, SocialIdTokenInput as Et, InvitationAcceptance as F, UpdateOrganizationDisplayInput as Ft, OrganizationMemberAuthority as G, AuthErrorStatus as Gt, OrganizationInvitation as H, OrganizationDirectoryEntry as Ht, InvitationDecline as I, UpdateOrganizationTeamDisplayInput as It, OrganizationMemberPageInput as J, OrganizationMemberAuthorityV2 as K, UserApiCredential as Kt, OrganizationClosure as L, UpdateProfileInput as Lt, EnterpriseConnectionDomain as M, TwoFactorStatus as Mt, EnterpriseConnectionSetup as N, TwoFactorStepUpInput as Nt, DriveCredential as O, SuspendedOrganizationMember as Ot, FinuevaAuthClient as P, UpdateEnterpriseConnectionInput as Pt, OrganizationSignInStates as Q, OrganizationClosureCancelInput as R, WorkspaceSelection as Rt, CreatedOrganizationMemberInvitation as S, ScimCredentialIssuance as St, DeletedOrganizationTeam as T, SignInInput as Tt, OrganizationInvitationPage as U, AuthError as Ut, OrganizationDisplay as V, RegisteredOrganizationApplication as Vt, OrganizationMember as W, AuthErrorCode as Wt, OrganizationPageInput as X, OrganizationPage as Y, OrganizationSignInState as Z, ClosingOrganization as _, RemovedOrganizationMember as _t, AuthPersistence as a, PasskeySummary as at, CreateOrganizationMemberInvitationInput as b, RestoredOrganizationMember as bt, AuthSessionInventory as c, PlatformRole as ct, AuthUser as d, PlatformRoleChangeRecentAuthenticationInput as dt, OrganizationTeamDisplay as et, CanceledOrganizationInvitation as f, PlatformRoleFirstApproval as ft, CeremonyReturnInput as g, RecentAuthenticationStatus as gt, CeremonyRecentAuthenticationRequest as h, ReceivedOrganizationInvitationPage as ht, AuthOrganization as i, PasskeyInventory as it, EnterpriseConnectionAction as j, TwoFactorEnrollment as jt, DriveCredentialInput as k, SuspendedOrganizationMemberPage as kt, AuthSessionSummary as l, PlatformRoleApplied as lt, CeremonyHandoffInput as m, ReceivedOrganizationInvitation as mt, AddedOrganizationTeamMember as n, OrganizationTeamPage as nt, AuthPersistenceDriver as o, PersonalWorkspaceSelection as ot, CeremonyHandoff as p, PlatformStatus as pt, OrganizationMemberPage as q, UserApiCredentialInput as qt, AuthClientOptions as r, OrganizationWorkspaceSelection as rt, AuthSession as s, PlatformBootstrapRoleChangeInput as st, AcceptInvitationInput as t, OrganizationTeamMemberPage as tt, AuthState as u, PlatformRoleApproval as ut, ClosingOrganizationList as v, RemovedOrganizationTeamMember as vt, DeclineInvitationInput as w, SendVerificationEmailInput as wt, CreatedOrganization as x, RotateScimCredentialInput as xt, CreateEnterpriseConnectionInput as y, ResentOrganizationInvitation as yt, OrganizationClosureStartInput as z, OrganizationApplicationRegistration as zt };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finueva/auth",
3
- "version": "0.31.0",
3
+ "version": "0.32.0",
4
4
  "description": "Public browser and server SDK for Finueva Auth",
5
5
  "type": "module",
6
6
  "sideEffects": false,