@wix/auto_sdk_identity_authentication 1.0.31 → 1.0.33

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.
Files changed (37) hide show
  1. package/build/cjs/index.d.ts +36 -16
  2. package/build/cjs/index.js +2 -153
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +215 -183
  5. package/build/cjs/index.typings.js +2 -144
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +155 -145
  8. package/build/cjs/meta.js +2 -112
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/es/index.d.mts +36 -16
  11. package/build/es/index.mjs +1 -150
  12. package/build/es/index.mjs.map +1 -1
  13. package/build/es/index.typings.d.mts +215 -183
  14. package/build/es/index.typings.mjs +1 -141
  15. package/build/es/index.typings.mjs.map +1 -1
  16. package/build/es/meta.d.mts +155 -145
  17. package/build/es/meta.mjs +1 -109
  18. package/build/es/meta.mjs.map +1 -1
  19. package/build/internal/cjs/index.d.ts +36 -16
  20. package/build/internal/cjs/index.js +2 -153
  21. package/build/internal/cjs/index.js.map +1 -1
  22. package/build/internal/cjs/index.typings.d.ts +215 -183
  23. package/build/internal/cjs/index.typings.js +2 -144
  24. package/build/internal/cjs/index.typings.js.map +1 -1
  25. package/build/internal/cjs/meta.d.ts +155 -145
  26. package/build/internal/cjs/meta.js +2 -112
  27. package/build/internal/cjs/meta.js.map +1 -1
  28. package/build/internal/es/index.d.mts +36 -16
  29. package/build/internal/es/index.mjs +1 -150
  30. package/build/internal/es/index.mjs.map +1 -1
  31. package/build/internal/es/index.typings.d.mts +215 -183
  32. package/build/internal/es/index.typings.mjs +1 -141
  33. package/build/internal/es/index.typings.mjs.map +1 -1
  34. package/build/internal/es/meta.d.mts +155 -145
  35. package/build/internal/es/meta.mjs +1 -109
  36. package/build/internal/es/meta.mjs.map +1 -1
  37. package/package.json +3 -3
@@ -30,13 +30,13 @@ interface LoginIdTypeOneOf {
30
30
  email?: string;
31
31
  }
32
32
  interface IdentityProfile {
33
- /** Profile first name. */
33
+ /** Member's first name. */
34
34
  firstName?: string | null;
35
- /** Profile last name. */
35
+ /** Member's last name. */
36
36
  lastName?: string | null;
37
- /** Profile nickname. */
37
+ /** Member's display nickname. */
38
38
  nickname?: string | null;
39
- /** Profile picture URL. */
39
+ /** URL to member's profile picture. */
40
40
  picture?: string | null;
41
41
  /**
42
42
  * Deprecated. Use `secondaryEmails` instead.
@@ -53,27 +53,27 @@ interface IdentityProfile {
53
53
  */
54
54
  phones?: string[];
55
55
  /**
56
- * List of profile labels.
56
+ * Labels associated with the member.
57
57
  * @maxSize 2000
58
58
  */
59
59
  labels?: string[];
60
60
  /**
61
- * Profile language.
61
+ * Member's preferred language code.
62
62
  * @format LANGUAGE
63
63
  */
64
64
  language?: string | null;
65
- /** Profile privacy status. */
65
+ /** Member's profile visibility setting. */
66
66
  privacyStatus?: PrivacyStatusWithLiterals;
67
67
  /**
68
68
  * Any number of custom fields. [Custom fields](https://support.wix.com/en/article/adding-custom-fields-to-contacts)
69
69
  * are used to store additional information about your site or app's contacts.
70
70
  */
71
71
  customFields?: CustomField[];
72
- /** List of profile email addresses. */
72
+ /** Additional email addresses for the member. */
73
73
  secondaryEmails?: SecondaryEmail[];
74
- /** List of profile phone numbers. */
74
+ /** Phone numbers associated with the member. */
75
75
  phonesV2?: Phone[];
76
- /** List of profile physical addresses. */
76
+ /** Physical addresses for the member. */
77
77
  addresses?: AddressWrapper[];
78
78
  /**
79
79
  * Company name.
@@ -86,79 +86,83 @@ interface IdentityProfile {
86
86
  */
87
87
  position?: string | null;
88
88
  /**
89
- * Profile birthdate in `YYYY-MM-DD` format.
89
+ * Member's birth date in `YYYY-MM-DD` format.
90
90
  * @format LOCAL_DATE
91
91
  */
92
92
  birthdate?: string | null;
93
93
  /**
94
- * Profile slug.
94
+ * URL-friendly slug for the member's profile.
95
95
  * @maxLength 255
96
96
  */
97
97
  slug?: string | null;
98
- /** Consent to be added to mailing list */
98
+ /** Whether the member consents to receive marketing communications. */
99
99
  subscription?: boolean | null;
100
100
  /**
101
- * Government id for personal/corporate (Vat ID).
101
+ * Tax ID or VAT number for personal or corporate use.
102
102
  * @maxLength 1000
103
103
  */
104
104
  vatId?: string | null;
105
105
  }
106
106
  declare enum PrivacyStatus {
107
- /** No defined privacy status. */
107
+ /** No privacy status defined. */
108
108
  UNDEFINED = "UNDEFINED",
109
- /** Profile details, such as profile name and profile picture, are visible to other members. */
109
+ /** Profile details are visible to other members. */
110
110
  PUBLIC = "PUBLIC",
111
- /** Profile details aren't visible to other members. */
111
+ /** Profile details are hidden from other members. */
112
112
  PRIVATE = "PRIVATE"
113
113
  }
114
114
  /** @enumType */
115
115
  type PrivacyStatusWithLiterals = PrivacyStatus | 'UNDEFINED' | 'PUBLIC' | 'PRIVATE';
116
116
  interface CustomField {
117
117
  /**
118
- * Custom field name. The name must match one of the key properties of the objects returned by
119
- * [`List Extended Fields`](https://dev.wix.com/docs/rest/api-reference/contacts/extended-fields/list-extended-fields)
120
- * with the `custom.` prefix removed.
118
+ * Custom field name matching an extended field key (without `custom.` prefix).
119
+ *
120
+ * Must match a key from [`List Extended Fields`](https://dev.wix.com/docs/rest/api-reference/contacts/extended-fields/list-extended-fields).
121
121
  */
122
122
  name?: string;
123
- /** Custom field value. */
123
+ /** Value for the custom field. */
124
124
  value?: V1CustomValue;
125
125
  }
126
126
  interface V1CustomValue extends V1CustomValueValueOneOf {
127
- /** String value. */
127
+ /** Text value. */
128
128
  strValue?: string;
129
- /** Number value. */
129
+ /** Numeric value. */
130
130
  numValue?: number;
131
- /** Date value. */
131
+ /** Date/time value. */
132
132
  dateValue?: Date | null;
133
- /** Array of values. */
133
+ /** List of values. */
134
134
  listValue?: V1ListValue;
135
- /** Map of values. */
135
+ /** Key-value pairs. */
136
136
  mapValue?: V1MapValue;
137
+ /** Bool value */
138
+ boolValue?: boolean;
137
139
  }
138
140
  /** @oneof */
139
141
  interface V1CustomValueValueOneOf {
140
- /** String value. */
142
+ /** Text value. */
141
143
  strValue?: string;
142
- /** Number value. */
144
+ /** Numeric value. */
143
145
  numValue?: number;
144
- /** Date value. */
146
+ /** Date/time value. */
145
147
  dateValue?: Date | null;
146
- /** Array of values. */
148
+ /** List of values. */
147
149
  listValue?: V1ListValue;
148
- /** Map of values. */
150
+ /** Key-value pairs. */
149
151
  mapValue?: V1MapValue;
152
+ /** Bool value */
153
+ boolValue?: boolean;
150
154
  }
151
155
  interface V1ListValue {
152
- /** Custom value. */
156
+ /** List of custom values. */
153
157
  value?: V1CustomValue[];
154
158
  }
155
159
  interface V1MapValue {
156
- /** Mapped custom value. */
160
+ /** Map of custom field values. */
157
161
  value?: Record<string, V1CustomValue>;
158
162
  }
159
163
  interface SecondaryEmail {
160
164
  /**
161
- * Email address.
165
+ * Secondary email address.
162
166
  * @format EMAIL
163
167
  */
164
168
  email?: string;
@@ -175,12 +179,12 @@ declare enum EmailTag {
175
179
  type EmailTagWithLiterals = EmailTag | 'UNTAGGED' | 'MAIN' | 'HOME' | 'WORK';
176
180
  interface Phone {
177
181
  /**
178
- * Phone country code.
182
+ * Country code for the phone number.
179
183
  * @format COUNTRY
180
184
  */
181
185
  countryCode?: string | null;
182
186
  /**
183
- * Phone number.
187
+ * Phone number without country code.
184
188
  * @format PHONE
185
189
  */
186
190
  phone?: string;
@@ -198,7 +202,7 @@ declare enum PhoneTag {
198
202
  /** @enumType */
199
203
  type PhoneTagWithLiterals = PhoneTag | 'UNTAGGED' | 'MAIN' | 'HOME' | 'MOBILE' | 'WORK' | 'FAX';
200
204
  interface AddressWrapper {
201
- /** Address. */
205
+ /** Physical address details. */
202
206
  address?: Address;
203
207
  /** Address tag. */
204
208
  tag?: AddressTagWithLiterals;
@@ -267,11 +271,11 @@ declare enum StateType {
267
271
  UNKNOWN_STATE = "UNKNOWN_STATE",
268
272
  /** Login completed successfully. */
269
273
  SUCCESS = "SUCCESS",
270
- /** Indicates that the member needs the owner to approve their registration. */
274
+ /** Member needs the owner to approve their registration. */
271
275
  REQUIRE_OWNER_APPROVAL = "REQUIRE_OWNER_APPROVAL",
272
- /** Indicates that the member needs to verify their email. */
276
+ /** Member needs to verify their email. */
273
277
  REQUIRE_EMAIL_VERIFICATION = "REQUIRE_EMAIL_VERIFICATION",
274
- /** Indicates that the `status` is not one that prevents the member logging in, meaning it's not `OFFLINE`, `BLOCKED`, or `DELETED`. */
278
+ /** The `status` is not one that prevents the member logging in, meaning it's not `OFFLINE`, `BLOCKED`, or `DELETED`. */
275
279
  STATUS_CHECK = "STATUS_CHECK"
276
280
  }
277
281
  /** @enumType */
@@ -313,8 +317,6 @@ interface Identity {
313
317
  email?: Email;
314
318
  /** Identity's current status. */
315
319
  status?: StatusV2;
316
- /** Custom attributes. */
317
- customAttributes?: Record<string, any> | null;
318
320
  /**
319
321
  * Identity verification factors.
320
322
  * @maxSize 10
@@ -546,91 +548,10 @@ interface WebAuthnChallengeData {
546
548
  */
547
549
  challengeId?: string;
548
550
  /**
549
- * The challenge that will be signed by the authenticator during the WebAuthn authentication ceremony.
550
- * This should be a cryptographically secure random value with at least 16 bytes of entropy.
551
- * The value is used to prevent replay attacks and MUST be randomly generated by the implementer.
552
- */
553
- challenge?: Uint8Array;
554
- /**
555
- * The timeout in milliseconds for the WebAuthn authentication ceremony.
556
- * After this time, the challenge will be considered expired and the authentication will need to be restarted.
557
- * This is optional and may be overridden by the client if provided.
558
- * The WebAuthn spec recommends a timeout of at least 1 minute (60000ms).
559
- */
560
- timeoutMs?: number | null;
561
- /**
562
- * Optional list of credentials that are acceptable for this authentication ceremony.
563
- * If empty, all credentials associated with the user will be considered.
564
- * @maxSize 50
565
- */
566
- allowCredentials?: PublicKeyCredentialDescriptor[];
567
- /** Specifies the requirement for user verification during the authentication ceremony. */
568
- userVerification?: UserVerificationRequirementWithLiterals;
569
- /**
570
- * Optional hints to guide the client UI
571
- * Examples include "security-key" to emphasize external authenticators
572
- * or "client-device" to emphasize built-in authenticators
573
- * @maxLength 50
574
- * @maxSize 10
575
- */
576
- hints?: string[];
577
- /**
578
- * Optional extensions for the authentication ceremony
579
- * Provides additional parameters for specialized WebAuthn functionality
580
- */
581
- extensions?: AuthenticationExtensionInputs;
582
- }
583
- interface PublicKeyCredentialDescriptor {
584
- /** The credential ID */
585
- _id?: Uint8Array;
586
- /**
587
- * An optional hint as to the transports used by the credential
588
- * Examples include "usb", "nfc", "ble", "internal", "hybrid"
589
- * @maxLength 50
590
- * @maxSize 10
591
- */
592
- transports?: string[];
593
- }
594
- declare enum UserVerificationRequirement {
595
- /** Default unspecified value */
596
- USER_VERIFICATION_UNSPECIFIED = "USER_VERIFICATION_UNSPECIFIED",
597
- /**
598
- * The Relying Party requires user verification and will fail the operation if the response doesn't have the UV flag
599
- * set
600
- */
601
- USER_VERIFICATION_REQUIRED = "USER_VERIFICATION_REQUIRED",
602
- /** The Relying Party prefers user verification but will not fail the operation if unavailable */
603
- USER_VERIFICATION_PREFERRED = "USER_VERIFICATION_PREFERRED",
604
- /** The Relying Party does not want user verification employed (e.g., to minimize disruption to the user experience) */
605
- USER_VERIFICATION_DISCOURAGED = "USER_VERIFICATION_DISCOURAGED"
606
- }
607
- /** @enumType */
608
- type UserVerificationRequirementWithLiterals = UserVerificationRequirement | 'USER_VERIFICATION_UNSPECIFIED' | 'USER_VERIFICATION_REQUIRED' | 'USER_VERIFICATION_PREFERRED' | 'USER_VERIFICATION_DISCOURAGED';
609
- interface AuthenticationExtensionInputs extends AuthenticationExtensionInputsLargeBlobOperationOneOf {
610
- /** Read existing large blob data from the authenticator */
611
- largeBlobRead?: boolean;
612
- /** Write data to the authenticator's large blob storage */
613
- largeBlobWrite?: Uint8Array;
614
- /**
615
- * FIDO AppID Extension (appid)
616
- * An AppID that was used for previously registered U2F authenticators
617
- * This makes already-registered U2F credentials forward-compatible with the WebAuthn API
618
- * @maxLength 256
619
- */
620
- appid?: string;
621
- /**
622
- * User Verification Method Extension (uvm)
623
- * Requests the authenticator to report which verification methods were used
624
- * Examples include fingerprint, PIN, or facial recognition
551
+ * A PublicKeyCredentialRequestOptions JSON as defined in the WebAuthn spec (https://www.w3.org/TR/webauthn-3/#dictdef-publickeycredentialrequestoptions).
552
+ * @maxLength 40000
625
553
  */
626
- uvm?: boolean;
627
- }
628
- /** @oneof */
629
- interface AuthenticationExtensionInputsLargeBlobOperationOneOf {
630
- /** Read existing large blob data from the authenticator */
631
- largeBlobRead?: boolean;
632
- /** Write data to the authenticator's large blob storage */
633
- largeBlobWrite?: Uint8Array;
554
+ publicKeyCredentialRequestOptionsJson?: string;
634
555
  }
635
556
  interface LoginV2Request {
636
557
  /** Identifier of identity logging in. */
@@ -673,7 +594,11 @@ interface ExternalEmailVerifyData {
673
594
  code?: string | null;
674
595
  }
675
596
  interface ChangePasswordRequest {
676
- /** The new password to set for the logged in user */
597
+ /**
598
+ * New password to set for the logged-in member.
599
+ *
600
+ * The password must meet the site's configured password requirements for length and complexity.
601
+ */
677
602
  newPassword: string;
678
603
  }
679
604
  interface ChangePasswordResponse {
@@ -698,8 +623,24 @@ interface LoginWithIdpConnectionRequest {
698
623
  * Encryption key should be base64 encoded. Encryption is done using AES-GCM with a random IV that's sent alongside the payload
699
624
  */
700
625
  sessionId?: string;
626
+ /**
627
+ * Base64-encoded encryption key for securing the authentication response.
628
+ *
629
+ * Used to encrypt the authentication response sent via BroadcastChannel API.
630
+ * Encryption uses AES-GCM with a random IV.
631
+ */
701
632
  encryptionKey?: string;
633
+ /**
634
+ * Visitor ID for tracking purposes.
635
+ *
636
+ * Optional identifier for analytics and tracking the authentication flow.
637
+ */
702
638
  visitorId?: string | null;
639
+ /**
640
+ * Browser session identifier.
641
+ *
642
+ * Optional identifier for correlating the authentication request with browser session data.
643
+ */
703
644
  bsi?: string | null;
704
645
  }
705
646
  declare enum TenantType {
@@ -754,58 +695,122 @@ interface LoginWithIdpConnectionTokenParamsRequest {
754
695
  tokenParams?: Record<string, string>;
755
696
  }
756
697
  interface SignOnRequest {
757
- /** the identifier of the identity */
698
+ /**
699
+ * Member identifier for authentication.
700
+ *
701
+ * Currently only email addresses are supported.
702
+ */
758
703
  loginId: LoginId;
759
- /** profile of the identity */
704
+ /**
705
+ * Member profile information.
706
+ *
707
+ * Profile data such as first name, last name, and other member details.
708
+ * If the member already exists, provided profile information will update the existing member's profile.
709
+ * If the member doesn't exist, this profile information is used to create the new member.
710
+ */
760
711
  profile?: IdentityProfile;
761
- /** when true will mark the email of the identity as verified */
712
+ /**
713
+ * Whether to mark the member's email as verified without requiring verification.
714
+ *
715
+ * When `true`, marks the email as verified without requiring verification.
716
+ * Use with caution in production as this bypasses security verification.
717
+ *
718
+ * Default: `false`
719
+ */
762
720
  verifyEmail?: boolean;
763
- /** when false will create a new contact instead of merging the existing contact into the identity */
721
+ /**
722
+ * Whether to merge with an existing contact with the same email address.
723
+ *
724
+ * When `true`, links the member to an existing contact record with the same email
725
+ * and inherits contact data. When `false`, creates a new contact record.
726
+ *
727
+ * Default: `true`
728
+ */
764
729
  mergeExistingContact?: boolean;
765
730
  }
766
731
  interface SignOnResponse {
767
- /** session token for the requested identity */
732
+ /**
733
+ * Session token for the authenticated member.
734
+ *
735
+ * Use this token to obtain access and refresh tokens for subsequent API calls.
736
+ */
768
737
  sessionToken?: string;
769
- /** The Identity of the provided login_id */
738
+ /**
739
+ * Member identity information.
740
+ *
741
+ * Contains the member's identity details after successful authentication.
742
+ */
770
743
  identity?: Identity;
771
744
  }
772
745
  /** logout request payload */
773
746
  interface LogoutRequest {
774
747
  /**
775
- * redirect after logout
748
+ * URL to redirect to after logout.
749
+ *
750
+ * Optional redirect destination after the logout process completes.
776
751
  * @format WEB_URL
777
752
  */
778
753
  postLogoutRedirectUri?: string | null;
779
754
  /**
780
- * caller identifier
755
+ * Client identifier for the logout request.
756
+ *
757
+ * Identifies the application or client initiating the logout.
781
758
  * @format GUID
782
759
  */
783
760
  clientId?: string | null;
784
761
  }
785
762
  interface VerifyRequest extends VerifyRequestFactorDataOneOf {
763
+ /** SMS verification code sent to the member's phone number. */
786
764
  smsData?: SmsVerifyData;
765
+ /** Voice call verification code received by the member. */
787
766
  callData?: CallVerifyData;
767
+ /** Email verification code sent to the member's email address. */
788
768
  emailData?: ExternalEmailVerifyData;
769
+ /** TOTP code from the member's authenticator app. */
789
770
  totpData?: TotpVerifyData;
771
+ /** Push notification authentication response from the member's device. */
790
772
  pushData?: PushVerifyData;
773
+ /** WebAuthn response from biometric or security key authentication. */
791
774
  webauthnData?: WebAuthnVerifyData;
775
+ /** RecoveryCode response from a one-time code. */
776
+ recoveryCodeData?: RecoveryCodeVerifyData;
792
777
  /**
793
- * TODO: is this a reasonable maxLength?
778
+ * State token from the initial authentication response.
779
+ *
780
+ * Required to continue the multi-step authentication process.
794
781
  * @maxLength 1000
795
782
  */
796
783
  stateToken?: string;
797
- factorType: FactorTypeWithLiterals;
798
- /** Relevant for second factors only. */
784
+ /**
785
+ * Type of authentication factor being verified.
786
+ *
787
+ * Specifies which verification method is being used (SMS, email, TOTP, etc.).
788
+ */
789
+ factorType?: FactorTypeWithLiterals;
790
+ /**
791
+ * Whether to remember this device for future authentication.
792
+ *
793
+ * When `true`, reduces future authentication requirements for this device.
794
+ * Only applicable for second factor authentication.
795
+ */
799
796
  rememberThisDevice?: boolean;
800
797
  }
801
798
  /** @oneof */
802
799
  interface VerifyRequestFactorDataOneOf {
800
+ /** SMS verification code sent to the member's phone number. */
803
801
  smsData?: SmsVerifyData;
802
+ /** Voice call verification code received by the member. */
804
803
  callData?: CallVerifyData;
804
+ /** Email verification code sent to the member's email address. */
805
805
  emailData?: ExternalEmailVerifyData;
806
+ /** TOTP code from the member's authenticator app. */
806
807
  totpData?: TotpVerifyData;
808
+ /** Push notification authentication response from the member's device. */
807
809
  pushData?: PushVerifyData;
810
+ /** WebAuthn response from biometric or security key authentication. */
808
811
  webauthnData?: WebAuthnVerifyData;
812
+ /** RecoveryCode response from a one-time code. */
813
+ recoveryCodeData?: RecoveryCodeVerifyData;
809
814
  }
810
815
  interface SmsVerifyData {
811
816
  /**
@@ -832,10 +837,18 @@ interface PushVerifyData {
832
837
  /** @maxLength 36 */
833
838
  transactionId?: string | null;
834
839
  }
840
+ interface RecoveryCodeVerifyData {
841
+ /**
842
+ * @minLength 1
843
+ * @maxLength 100
844
+ */
845
+ code?: string | null;
846
+ }
835
847
  interface GetWebauthnChallengeRequest {
836
848
  /**
837
- * Identifier of identity for which the WebAuthn challenge is requested for.
838
- * If not provided an anonymous webAuthn challenge will be returned.
849
+ * Identifier of the member requesting the WebAuthn challenge.
850
+ *
851
+ * If not provided, returns an anonymous WebAuthn challenge for usernameless authentication.
839
852
  */
840
853
  loginId?: LoginId;
841
854
  }
@@ -967,7 +980,7 @@ type LoginV2ValidationErrors = {
967
980
  * @requiredField loginId
968
981
  * @fqn wix.iam.authentication.v1.AuthenticationService.RegisterV2
969
982
  */
970
- declare function registerV2(loginId: LoginId, options?: RegisterV2Options): Promise<NonNullablePaths<StateMachineResponse, `state` | `identity.connections` | `identity.connections.${number}.idpConnection.idpConnectionId` | `identity.connections.${number}.idpConnection.idpUserId` | `identity.connections.${number}.authenticatorConnection.authenticatorConnectionId` | `identity.connections.${number}.authenticatorConnection.reEnrollmentRequired` | `identity.identityProfile.emails` | `identity.identityProfile.phones` | `identity.identityProfile.labels` | `identity.identityProfile.privacyStatus` | `identity.identityProfile.customFields` | `identity.identityProfile.customFields.${number}.name` | `identity.identityProfile.customFields.${number}.value.strValue` | `identity.identityProfile.customFields.${number}.value.numValue` | `identity.identityProfile.secondaryEmails` | `identity.identityProfile.secondaryEmails.${number}.email` | `identity.identityProfile.secondaryEmails.${number}.tag` | `identity.identityProfile.phonesV2` | `identity.identityProfile.phonesV2.${number}.phone` | `identity.identityProfile.phonesV2.${number}.tag` | `identity.identityProfile.addresses` | `identity.identityProfile.addresses.${number}.tag` | `identity.email.address` | `identity.email.isVerified` | `identity.status.name` | `identity.status.reasons` | `identity.factors` | `identity.factors.${number}.factorId` | `identity.factors.${number}.type` | `identity.factors.${number}.status`, 7> & {
983
+ declare function registerV2(loginId: LoginId, options?: RegisterV2Options): Promise<NonNullablePaths<StateMachineResponse, `state` | `identity.connections` | `identity.connections.${number}.idpConnection.idpConnectionId` | `identity.connections.${number}.idpConnection.idpUserId` | `identity.connections.${number}.authenticatorConnection.authenticatorConnectionId` | `identity.connections.${number}.authenticatorConnection.reEnrollmentRequired` | `identity.identityProfile.emails` | `identity.identityProfile.phones` | `identity.identityProfile.labels` | `identity.identityProfile.privacyStatus` | `identity.identityProfile.customFields` | `identity.identityProfile.customFields.${number}.name` | `identity.identityProfile.customFields.${number}.value.strValue` | `identity.identityProfile.customFields.${number}.value.numValue` | `identity.identityProfile.customFields.${number}.value.boolValue` | `identity.identityProfile.secondaryEmails` | `identity.identityProfile.secondaryEmails.${number}.email` | `identity.identityProfile.secondaryEmails.${number}.tag` | `identity.identityProfile.phonesV2` | `identity.identityProfile.phonesV2.${number}.phone` | `identity.identityProfile.phonesV2.${number}.tag` | `identity.identityProfile.addresses` | `identity.identityProfile.addresses.${number}.tag` | `identity.email.address` | `identity.email.isVerified` | `identity.status.name` | `identity.status.reasons` | `identity.factors` | `identity.factors.${number}.factorId` | `identity.factors.${number}.type` | `identity.factors.${number}.status`, 7> & {
971
984
  __applicationErrorsType?: RegisterV2ApplicationErrors;
972
985
  __validationErrorsType?: RegisterV2ValidationErrors;
973
986
  }>;
@@ -992,7 +1005,7 @@ interface RegisterV2Options {
992
1005
  * @requiredField loginId
993
1006
  * @fqn wix.iam.authentication.v1.AuthenticationService.LoginV2
994
1007
  */
995
- declare function loginV2(loginId: LoginId, options?: LoginV2Options): Promise<NonNullablePaths<StateMachineResponse, `state` | `identity.connections` | `identity.connections.${number}.idpConnection.idpConnectionId` | `identity.connections.${number}.idpConnection.idpUserId` | `identity.connections.${number}.authenticatorConnection.authenticatorConnectionId` | `identity.connections.${number}.authenticatorConnection.reEnrollmentRequired` | `identity.identityProfile.emails` | `identity.identityProfile.phones` | `identity.identityProfile.labels` | `identity.identityProfile.privacyStatus` | `identity.identityProfile.customFields` | `identity.identityProfile.customFields.${number}.name` | `identity.identityProfile.customFields.${number}.value.strValue` | `identity.identityProfile.customFields.${number}.value.numValue` | `identity.identityProfile.secondaryEmails` | `identity.identityProfile.secondaryEmails.${number}.email` | `identity.identityProfile.secondaryEmails.${number}.tag` | `identity.identityProfile.phonesV2` | `identity.identityProfile.phonesV2.${number}.phone` | `identity.identityProfile.phonesV2.${number}.tag` | `identity.identityProfile.addresses` | `identity.identityProfile.addresses.${number}.tag` | `identity.email.address` | `identity.email.isVerified` | `identity.status.name` | `identity.status.reasons` | `identity.factors` | `identity.factors.${number}.factorId` | `identity.factors.${number}.type` | `identity.factors.${number}.status`, 7> & {
1008
+ declare function loginV2(loginId: LoginId, options?: LoginV2Options): Promise<NonNullablePaths<StateMachineResponse, `state` | `identity.connections` | `identity.connections.${number}.idpConnection.idpConnectionId` | `identity.connections.${number}.idpConnection.idpUserId` | `identity.connections.${number}.authenticatorConnection.authenticatorConnectionId` | `identity.connections.${number}.authenticatorConnection.reEnrollmentRequired` | `identity.identityProfile.emails` | `identity.identityProfile.phones` | `identity.identityProfile.labels` | `identity.identityProfile.privacyStatus` | `identity.identityProfile.customFields` | `identity.identityProfile.customFields.${number}.name` | `identity.identityProfile.customFields.${number}.value.strValue` | `identity.identityProfile.customFields.${number}.value.numValue` | `identity.identityProfile.customFields.${number}.value.boolValue` | `identity.identityProfile.secondaryEmails` | `identity.identityProfile.secondaryEmails.${number}.email` | `identity.identityProfile.secondaryEmails.${number}.tag` | `identity.identityProfile.phonesV2` | `identity.identityProfile.phonesV2.${number}.phone` | `identity.identityProfile.phonesV2.${number}.tag` | `identity.identityProfile.addresses` | `identity.identityProfile.addresses.${number}.tag` | `identity.email.address` | `identity.email.isVerified` | `identity.status.name` | `identity.status.reasons` | `identity.factors` | `identity.factors.${number}.factorId` | `identity.factors.${number}.type` | `identity.factors.${number}.status`, 7> & {
996
1009
  __applicationErrorsType?: LoginV2ApplicationErrors;
997
1010
  __validationErrorsType?: LoginV2ValidationErrors;
998
1011
  }>;
@@ -1005,8 +1018,18 @@ interface LoginV2Options {
1005
1018
  clientMetaData?: Record<string, any> | null;
1006
1019
  }
1007
1020
  /**
1008
- * Changes the password of a logged in user.
1009
- * @param newPassword - The new password to set for the logged in user
1021
+ * Changes the password of a logged-in member.
1022
+ *
1023
+ * Updates the password for an authenticated member. The member must have a valid session
1024
+ * to use this method.
1025
+ *
1026
+ * The member's session remains valid after password change.
1027
+ *
1028
+ * The new password must meet the site's configured password requirements for length
1029
+ * and complexity. These requirements are enforced automatically when processing the request.
1030
+ * @param newPassword - New password to set for the logged-in member.
1031
+ *
1032
+ * The password must meet the site's configured password requirements for length and complexity.
1010
1033
  * @public
1011
1034
  * @documentationMaturity preview
1012
1035
  * @requiredField newPassword
@@ -1014,7 +1037,15 @@ interface LoginV2Options {
1014
1037
  * @fqn wix.iam.authentication.v1.AuthenticationService.ChangePassword
1015
1038
  */
1016
1039
  declare function changePassword(newPassword: string): Promise<void>;
1017
- /** @param loginId - the identifier of the identity
1040
+ /**
1041
+ * Authenticates a member without credentials and returns a session token.
1042
+ *
1043
+ * This method provides authentication that automatically creates or updates
1044
+ * member accounts as needed during the authentication process.
1045
+ * Use this for trusted integrations and scenarios where you already have verified user information.
1046
+ * @param loginId - Member identifier for authentication.
1047
+ *
1048
+ * Currently only email addresses are supported.
1018
1049
  * @public
1019
1050
  * @documentationMaturity preview
1020
1051
  * @requiredField loginId
@@ -1022,17 +1053,44 @@ declare function changePassword(newPassword: string): Promise<void>;
1022
1053
  * @applicableIdentity APP
1023
1054
  * @fqn wix.iam.authentication.v1.AuthenticationService.SignOn
1024
1055
  */
1025
- declare function signOn(loginId: LoginId, options?: SignOnOptions): Promise<NonNullablePaths<SignOnResponse, `sessionToken` | `identity.connections` | `identity.connections.${number}.idpConnection.idpConnectionId` | `identity.connections.${number}.idpConnection.idpUserId` | `identity.connections.${number}.authenticatorConnection.authenticatorConnectionId` | `identity.connections.${number}.authenticatorConnection.reEnrollmentRequired` | `identity.identityProfile.emails` | `identity.identityProfile.phones` | `identity.identityProfile.labels` | `identity.identityProfile.privacyStatus` | `identity.identityProfile.customFields` | `identity.identityProfile.customFields.${number}.name` | `identity.identityProfile.customFields.${number}.value.strValue` | `identity.identityProfile.customFields.${number}.value.numValue` | `identity.identityProfile.secondaryEmails` | `identity.identityProfile.secondaryEmails.${number}.email` | `identity.identityProfile.secondaryEmails.${number}.tag` | `identity.identityProfile.phonesV2` | `identity.identityProfile.phonesV2.${number}.phone` | `identity.identityProfile.phonesV2.${number}.tag` | `identity.identityProfile.addresses` | `identity.identityProfile.addresses.${number}.tag` | `identity.email.address` | `identity.email.isVerified` | `identity.status.name` | `identity.status.reasons` | `identity.factors` | `identity.factors.${number}.factorId` | `identity.factors.${number}.type` | `identity.factors.${number}.status`, 7>>;
1056
+ declare function signOn(loginId: LoginId, options?: SignOnOptions): Promise<NonNullablePaths<SignOnResponse, `sessionToken` | `identity.connections` | `identity.connections.${number}.idpConnection.idpConnectionId` | `identity.connections.${number}.idpConnection.idpUserId` | `identity.connections.${number}.authenticatorConnection.authenticatorConnectionId` | `identity.connections.${number}.authenticatorConnection.reEnrollmentRequired` | `identity.identityProfile.emails` | `identity.identityProfile.phones` | `identity.identityProfile.labels` | `identity.identityProfile.privacyStatus` | `identity.identityProfile.customFields` | `identity.identityProfile.customFields.${number}.name` | `identity.identityProfile.customFields.${number}.value.strValue` | `identity.identityProfile.customFields.${number}.value.numValue` | `identity.identityProfile.customFields.${number}.value.boolValue` | `identity.identityProfile.secondaryEmails` | `identity.identityProfile.secondaryEmails.${number}.email` | `identity.identityProfile.secondaryEmails.${number}.tag` | `identity.identityProfile.phonesV2` | `identity.identityProfile.phonesV2.${number}.phone` | `identity.identityProfile.phonesV2.${number}.tag` | `identity.identityProfile.addresses` | `identity.identityProfile.addresses.${number}.tag` | `identity.email.address` | `identity.email.isVerified` | `identity.status.name` | `identity.status.reasons` | `identity.factors` | `identity.factors.${number}.factorId` | `identity.factors.${number}.type` | `identity.factors.${number}.status`, 7>>;
1026
1057
  interface SignOnOptions {
1027
- /** profile of the identity */
1058
+ /**
1059
+ * Member profile information.
1060
+ *
1061
+ * Profile data such as first name, last name, and other member details.
1062
+ * If the member already exists, provided profile information will update the existing member's profile.
1063
+ * If the member doesn't exist, this profile information is used to create the new member.
1064
+ */
1028
1065
  profile?: IdentityProfile;
1029
- /** when true will mark the email of the identity as verified */
1066
+ /**
1067
+ * Whether to mark the member's email as verified without requiring verification.
1068
+ *
1069
+ * When `true`, marks the email as verified without requiring verification.
1070
+ * Use with caution in production as this bypasses security verification.
1071
+ *
1072
+ * Default: `false`
1073
+ */
1030
1074
  verifyEmail?: boolean;
1031
- /** when false will create a new contact instead of merging the existing contact into the identity */
1075
+ /**
1076
+ * Whether to merge with an existing contact with the same email address.
1077
+ *
1078
+ * When `true`, links the member to an existing contact record with the same email
1079
+ * and inherits contact data. When `false`, creates a new contact record.
1080
+ *
1081
+ * Default: `true`
1082
+ */
1032
1083
  mergeExistingContact?: boolean;
1033
1084
  }
1034
1085
  /**
1035
- * Logs out a member.
1086
+ * Terminates the member's session and clears authentication cookies.
1087
+ *
1088
+ * Returns the following:
1089
+ * - `body`: HTML content for the logout response
1090
+ * - `statusCode`: HTTP status code (200 for success, 302 for redirect)
1091
+ * - `headers`: Array of key-value pairs including:
1092
+ * - `Set-Cookie` headers to remove all session cookies
1093
+ * - `Location` header (when `postLogoutRedirectUri` is provided, with 302 status)
1036
1094
  * @public
1037
1095
  * @documentationMaturity preview
1038
1096
  * @fqn wix.iam.authentication.v1.AuthenticationService.Logout
@@ -1040,45 +1098,19 @@ interface SignOnOptions {
1040
1098
  declare function logout(options?: LogoutOptions): Promise<NonNullablePaths<RawHttpResponse, `body` | `headers` | `headers.${number}.key` | `headers.${number}.value`, 4>>;
1041
1099
  interface LogoutOptions {
1042
1100
  /**
1043
- * redirect after logout
1101
+ * URL to redirect to after logout.
1102
+ *
1103
+ * Optional redirect destination after the logout process completes.
1044
1104
  * @format WEB_URL
1045
1105
  */
1046
1106
  postLogoutRedirectUri?: string | null;
1047
1107
  /**
1048
- * caller identifier
1108
+ * Client identifier for the logout request.
1109
+ *
1110
+ * Identifies the application or client initiating the logout.
1049
1111
  * @format GUID
1050
1112
  */
1051
1113
  clientId?: string | null;
1052
1114
  }
1053
- /** @public
1054
- * @documentationMaturity preview
1055
- * @requiredField factorType
1056
- * @fqn wix.iam.authentication.v1.AuthenticationService.Verify
1057
- */
1058
- declare function verify(factorType: FactorTypeWithLiterals, options?: VerifyOptions): Promise<NonNullablePaths<StateMachineResponse, `state` | `identity.connections` | `identity.connections.${number}.idpConnection.idpConnectionId` | `identity.connections.${number}.idpConnection.idpUserId` | `identity.connections.${number}.authenticatorConnection.authenticatorConnectionId` | `identity.connections.${number}.authenticatorConnection.reEnrollmentRequired` | `identity.identityProfile.emails` | `identity.identityProfile.phones` | `identity.identityProfile.labels` | `identity.identityProfile.privacyStatus` | `identity.identityProfile.customFields` | `identity.identityProfile.customFields.${number}.name` | `identity.identityProfile.customFields.${number}.value.strValue` | `identity.identityProfile.customFields.${number}.value.numValue` | `identity.identityProfile.secondaryEmails` | `identity.identityProfile.secondaryEmails.${number}.email` | `identity.identityProfile.secondaryEmails.${number}.tag` | `identity.identityProfile.phonesV2` | `identity.identityProfile.phonesV2.${number}.phone` | `identity.identityProfile.phonesV2.${number}.tag` | `identity.identityProfile.addresses` | `identity.identityProfile.addresses.${number}.tag` | `identity.email.address` | `identity.email.isVerified` | `identity.status.name` | `identity.status.reasons` | `identity.factors` | `identity.factors.${number}.factorId` | `identity.factors.${number}.type` | `identity.factors.${number}.status`, 7>>;
1059
- interface VerifyOptions extends VerifyOptionsFactorDataOneOf {
1060
- /**
1061
- * TODO: is this a reasonable maxLength?
1062
- * @maxLength 1000
1063
- */
1064
- stateToken?: string;
1065
- /** Relevant for second factors only. */
1066
- rememberThisDevice?: boolean;
1067
- smsData?: SmsVerifyData;
1068
- callData?: CallVerifyData;
1069
- emailData?: ExternalEmailVerifyData;
1070
- totpData?: TotpVerifyData;
1071
- pushData?: PushVerifyData;
1072
- webauthnData?: WebAuthnVerifyData;
1073
- }
1074
- /** @oneof */
1075
- interface VerifyOptionsFactorDataOneOf {
1076
- smsData?: SmsVerifyData;
1077
- callData?: CallVerifyData;
1078
- emailData?: ExternalEmailVerifyData;
1079
- totpData?: TotpVerifyData;
1080
- pushData?: PushVerifyData;
1081
- webauthnData?: WebAuthnVerifyData;
1082
- }
1083
1115
 
1084
- export { type Address, AddressTag, type AddressTagWithLiterals, type AddressWrapper, type Authentication, type AuthenticationExtensionInputs, type AuthenticationExtensionInputsLargeBlobOperationOneOf, type AuthenticatorConnection, type CallVerifyData, type CaptchaToken, type CaptchaTokenTokenOneOf, type ChangePasswordRequest, type ChangePasswordResponse, type Connection, type ConnectionTypeOneOf, type CustomField, type CustomValue, type CustomValueValueOneOf, type Email, EmailTag, type EmailTagWithLiterals, type ExternalEmailVerifyData, type Factor, FactorStatus, type FactorStatusWithLiterals, FactorType, type FactorTypeWithLiterals, type GetWebauthnChallengeRequest, type GetWebauthnChallengeResponse, type HeadersEntry, type Identity, type IdentityProfile, type IdpConnection, type ListValue, type LoginCallbackRequest, type LoginId, type LoginIdTypeOneOf, type LoginV2ApplicationErrors, type LoginV2Options, type LoginV2Request, type LoginV2ValidationErrors, type LoginWithIdpConnectionRequest, type LoginWithIdpConnectionTokenParamsRequest, type LogoutOptions, type LogoutRequest, type MapValue, type Metadata, type MfaChallengeData, MfaReason, type MfaReasonWithLiterals, type PathParametersEntry, type Phone, PhoneTag, type PhoneTagWithLiterals, PrivacyStatus, type PrivacyStatusWithLiterals, type PublicKeyCredentialDescriptor, type PushChallengeData, type PushVerifyData, type QueryParametersEntry, type RawHttpRequest, type RawHttpResponse, Reason, type ReasonWithLiterals, type RegisterV2ApplicationErrors, type RegisterV2Options, type RegisterV2Request, type RegisterV2ValidationErrors, type RequireMfaData, type SecondaryEmail, type SignOnOptions, type SignOnRequest, type SignOnResponse, type SmsVerifyData, type StateMachineResponse, type StateMachineResponseStateDataOneOf, StateType, type StateTypeWithLiterals, Status, StatusName, type StatusNameWithLiterals, type StatusV2, type StatusWithLiterals, TenantType, type TenantTypeWithLiterals, type TotpVerifyData, UserVerificationRequirement, type UserVerificationRequirementWithLiterals, type V1CustomValue, type V1CustomValueValueOneOf, type V1Factor, type V1ListValue, type V1MapValue, type VerificationChallenge, type VerificationChallengeFactorChallengeDataOneOf, type VerifyOptions, type VerifyOptionsFactorDataOneOf, type VerifyRequest, type VerifyRequestFactorDataOneOf, type WebAuthnChallengeData, type WebAuthnVerifyData, changePassword, loginV2, logout, registerV2, signOn, verify };
1116
+ export { type Address, AddressTag, type AddressTagWithLiterals, type AddressWrapper, type Authentication, type AuthenticatorConnection, type CallVerifyData, type CaptchaToken, type CaptchaTokenTokenOneOf, type ChangePasswordRequest, type ChangePasswordResponse, type Connection, type ConnectionTypeOneOf, type CustomField, type CustomValue, type CustomValueValueOneOf, type Email, EmailTag, type EmailTagWithLiterals, type ExternalEmailVerifyData, type Factor, FactorStatus, type FactorStatusWithLiterals, FactorType, type FactorTypeWithLiterals, type GetWebauthnChallengeRequest, type GetWebauthnChallengeResponse, type HeadersEntry, type Identity, type IdentityProfile, type IdpConnection, type ListValue, type LoginCallbackRequest, type LoginId, type LoginIdTypeOneOf, type LoginV2ApplicationErrors, type LoginV2Options, type LoginV2Request, type LoginV2ValidationErrors, type LoginWithIdpConnectionRequest, type LoginWithIdpConnectionTokenParamsRequest, type LogoutOptions, type LogoutRequest, type MapValue, type Metadata, type MfaChallengeData, MfaReason, type MfaReasonWithLiterals, type PathParametersEntry, type Phone, PhoneTag, type PhoneTagWithLiterals, PrivacyStatus, type PrivacyStatusWithLiterals, type PushChallengeData, type PushVerifyData, type QueryParametersEntry, type RawHttpRequest, type RawHttpResponse, Reason, type ReasonWithLiterals, type RecoveryCodeVerifyData, type RegisterV2ApplicationErrors, type RegisterV2Options, type RegisterV2Request, type RegisterV2ValidationErrors, type RequireMfaData, type SecondaryEmail, type SignOnOptions, type SignOnRequest, type SignOnResponse, type SmsVerifyData, type StateMachineResponse, type StateMachineResponseStateDataOneOf, StateType, type StateTypeWithLiterals, Status, StatusName, type StatusNameWithLiterals, type StatusV2, type StatusWithLiterals, TenantType, type TenantTypeWithLiterals, type TotpVerifyData, type V1CustomValue, type V1CustomValueValueOneOf, type V1Factor, type V1ListValue, type V1MapValue, type VerificationChallenge, type VerificationChallengeFactorChallengeDataOneOf, type VerifyRequest, type VerifyRequestFactorDataOneOf, type WebAuthnChallengeData, type WebAuthnVerifyData, changePassword, loginV2, logout, registerV2, signOn };