@wix/auto_sdk_identity_authentication 1.0.65 → 1.0.67

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.
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/iam-authentication-v1-authentication-authentication.universal.ts","../../src/iam-authentication-v1-authentication-authentication.http.ts","../../src/iam-authentication-v1-authentication-authentication.public.ts","../../src/iam-authentication-v1-authentication-authentication.context.ts"],"sourcesContent":["import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixIamAuthenticationV1Authentication from './iam-authentication-v1-authentication-authentication.http.js';\nimport { transformSDKAddressToRESTAddress } from '@wix/sdk-runtime/transformations/address';\nimport { transformRESTAddressToSDKAddress } from '@wix/sdk-runtime/transformations/address';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\n\nconst TRANSFORM_PATHS_0 = [{ path: 'profile.addresses.address' }];\nconst TRANSFORM_PATHS_1 = [\n { path: 'identity.identityProfile.addresses.address' },\n];\n\nexport interface Authentication {}\n\nexport interface RegisterV2Request {\n /** Identifier of the registering member. */\n loginId: LoginId;\n /** Password of the registering member. */\n password?: string;\n /** Profile information of registering member. */\n profile?: IdentityProfile;\n /** CAPTCHA tokens, when CAPTCHA setting is on. */\n captchaTokens?: CaptchaToken[];\n /** Additional data that's relevant for the flow. */\n clientMetaData?: Record<string, any> | null;\n /**\n * The factor to register with: `PASSWORD`, the default, or `EMAIL`, which sends a code and returns\n * `REQUIRE_REGISTRATION_FACTOR` until the code is submitted to `Verify`.\n */\n factorType?: FactorTypeWithLiterals;\n /**\n * ID of the organization the user registers into. The new user's account is created as a sub-account of this organization.\n * @format GUID\n */\n organizationId?: string | null;\n}\n\nexport interface LoginId extends LoginIdTypeOneOf {\n /**\n * Login email address.\n * @format EMAIL\n */\n email?: string;\n}\n\n/** @oneof */\nexport interface LoginIdTypeOneOf {\n /**\n * Login email address.\n * @format EMAIL\n */\n email?: string;\n}\n\nexport interface IdentityProfile {\n /** Member's first name. */\n firstName?: string | null;\n /** Member's last name. */\n lastName?: string | null;\n /** Member's display nickname. */\n nickname?: string | null;\n /** URL to member's profile picture. */\n picture?: string | null;\n /**\n * Deprecated. Use `secondaryEmails` instead.\n * @deprecated Deprecated. Use `secondaryEmails` instead.\n * @replacedBy secondary_emails\n * @targetRemovalDate 2023-11-01\n */\n emails?: string[];\n /**\n * Deprecated. Use `phonesV2` instead.\n * @deprecated Deprecated. Use `phonesV2` instead.\n * @replacedBy phones_v2\n * @targetRemovalDate 2023-11-01\n */\n phones?: string[];\n /**\n * Labels associated with the member.\n * @maxSize 2000\n */\n labels?: string[];\n /**\n * Member's preferred language code.\n * @format LANGUAGE\n */\n language?: string | null;\n /** Member's profile visibility setting. */\n privacyStatus?: PrivacyStatusWithLiterals;\n /**\n * Any number of custom fields. [Custom fields](https://support.wix.com/en/article/adding-custom-fields-to-contacts)\n * are used to store additional information about your site or app's contacts.\n */\n customFields?: CustomField[];\n /** Additional email addresses for the member. */\n secondaryEmails?: SecondaryEmail[];\n /** Phone numbers associated with the member. */\n phonesV2?: Phone[];\n /** Physical addresses for the member. */\n addresses?: AddressWrapper[];\n /**\n * Company name.\n * @maxLength 1000\n */\n company?: string | null;\n /**\n * Position within company.\n * @maxLength 1000\n */\n position?: string | null;\n /**\n * Member's birth date in `YYYY-MM-DD` format.\n * @format LOCAL_DATE\n */\n birthdate?: string | null;\n /**\n * URL-friendly slug for the member's profile.\n * @maxLength 255\n */\n slug?: string | null;\n /** Whether the member consents to receive marketing communications. */\n subscription?: boolean | null;\n /**\n * Tax ID or VAT number for personal or corporate use.\n * @maxLength 1000\n */\n vatId?: string | null;\n}\n\nexport enum PrivacyStatus {\n /** No privacy status defined. */\n UNDEFINED = 'UNDEFINED',\n /** Profile details are visible to other members. */\n PUBLIC = 'PUBLIC',\n /** Profile details are hidden from other members. */\n PRIVATE = 'PRIVATE',\n}\n\n/** @enumType */\nexport type PrivacyStatusWithLiterals =\n | PrivacyStatus\n | 'UNDEFINED'\n | 'PUBLIC'\n | 'PRIVATE';\n\nexport interface CustomField {\n /**\n * Custom field name matching an extended field key (without `custom.` prefix).\n *\n * Must match a key from [`List Extended Fields`](https://dev.wix.com/docs/rest/api-reference/contacts/extended-fields/list-extended-fields).\n */\n name?: string;\n /** Value for the custom field. */\n value?: V1CustomValue;\n}\n\nexport interface V1CustomValue extends V1CustomValueValueOneOf {\n /** Text value. */\n strValue?: string;\n /** Numeric value. */\n numValue?: number;\n /** Date/time value. */\n dateValue?: Date | null;\n /** List of values. */\n listValue?: V1ListValue;\n /** Key-value pairs. */\n mapValue?: V1MapValue;\n /** Bool value */\n boolValue?: boolean;\n}\n\n/** @oneof */\nexport interface V1CustomValueValueOneOf {\n /** Text value. */\n strValue?: string;\n /** Numeric value. */\n numValue?: number;\n /** Date/time value. */\n dateValue?: Date | null;\n /** List of values. */\n listValue?: V1ListValue;\n /** Key-value pairs. */\n mapValue?: V1MapValue;\n /** Bool value */\n boolValue?: boolean;\n}\n\nexport interface V1ListValue {\n /** List of custom values. */\n value?: V1CustomValue[];\n}\n\nexport interface V1MapValue {\n /** Map of custom field values. */\n value?: Record<string, V1CustomValue>;\n}\n\nexport interface SecondaryEmail {\n /**\n * Secondary email address.\n * @format EMAIL\n */\n email?: string;\n /** Email tag. */\n tag?: EmailTagWithLiterals;\n}\n\nexport enum EmailTag {\n UNTAGGED = 'UNTAGGED',\n MAIN = 'MAIN',\n HOME = 'HOME',\n WORK = 'WORK',\n}\n\n/** @enumType */\nexport type EmailTagWithLiterals =\n | EmailTag\n | 'UNTAGGED'\n | 'MAIN'\n | 'HOME'\n | 'WORK';\n\nexport interface Phone {\n /**\n * Country code for the phone number.\n * @format COUNTRY\n */\n countryCode?: string | null;\n /**\n * Phone number without country code.\n * @format PHONE\n */\n phone?: string;\n /** Phone tag. */\n tag?: PhoneTagWithLiterals;\n}\n\nexport enum PhoneTag {\n UNTAGGED = 'UNTAGGED',\n MAIN = 'MAIN',\n HOME = 'HOME',\n MOBILE = 'MOBILE',\n WORK = 'WORK',\n FAX = 'FAX',\n}\n\n/** @enumType */\nexport type PhoneTagWithLiterals =\n | PhoneTag\n | 'UNTAGGED'\n | 'MAIN'\n | 'HOME'\n | 'MOBILE'\n | 'WORK'\n | 'FAX';\n\nexport interface AddressWrapper {\n /** Physical address details. */\n address?: Address;\n /** Address tag. */\n tag?: AddressTagWithLiterals;\n}\n\n/** Physical address */\nexport interface Address {\n /**\n * Country code.\n * @format COUNTRY\n */\n country?: string | null;\n /** Subdivision. Usually a state, region, prefecture, or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2). */\n subdivision?: string | null;\n /** City name. */\n city?: string | null;\n /** Zip/postal code. */\n postalCode?: string | null;\n /** Main address line, usually street and number as free text. */\n addressLine1?: string | null;\n /** Free text providing more detailed address info. Usually contains apartment, suite, and floor. */\n addressLine2?: string | null;\n /**\n * A string containing the full address of this location.\n * @internal\n */\n formatted?: string | null;\n}\n\nexport enum AddressTag {\n UNTAGGED = 'UNTAGGED',\n HOME = 'HOME',\n WORK = 'WORK',\n BILLING = 'BILLING',\n SHIPPING = 'SHIPPING',\n}\n\n/** @enumType */\nexport type AddressTagWithLiterals =\n | AddressTag\n | 'UNTAGGED'\n | 'HOME'\n | 'WORK'\n | 'BILLING'\n | 'SHIPPING';\n\nexport interface CaptchaToken extends CaptchaTokenTokenOneOf {\n /** @maxLength 5000 */\n Recaptcha?: string;\n /** @maxLength 5000 */\n InvisibleRecaptcha?: string;\n /** @maxLength 5000 */\n NoCaptcha?: string;\n /** Use this when the client has registered their own reCAPTCHA site key (e.g., branded apps, headless apps). */\n recaptchaForClientSiteKey?: RecaptchaForClientSiteKey;\n}\n\n/** @oneof */\nexport interface CaptchaTokenTokenOneOf {\n /** @maxLength 5000 */\n Recaptcha?: string;\n /** @maxLength 5000 */\n InvisibleRecaptcha?: string;\n /** @maxLength 5000 */\n NoCaptcha?: string;\n /** Use this when the client has registered their own reCAPTCHA site key (e.g., branded apps, headless apps). */\n recaptchaForClientSiteKey?: RecaptchaForClientSiteKey;\n}\n\n/** reCAPTCHA token with a client-provided site key ID. */\nexport interface RecaptchaForClientSiteKey {\n /**\n * The reCAPTCHA token obtained from the client-side reCAPTCHA widget.\n * @maxLength 5000\n */\n token?: string;\n /**\n * The site key ID registered in ReCAPTCHA service SDL for this client's reCAPTCHA configuration.\n * @format GUID\n */\n siteKeyId?: string;\n}\n\nexport enum FactorType {\n /** Requires a password. */\n PASSWORD = 'PASSWORD',\n /** Requires a code sent via SMS. */\n SMS = 'SMS',\n /** Requires a code sent by phone call. */\n CALL = 'CALL',\n /** Requires a code sent by email. */\n EMAIL = 'EMAIL',\n /** Requires authentication via an authenticator app. */\n TOTP = 'TOTP',\n /** Requires authentication via a push notification. */\n PUSH = 'PUSH',\n /** Requires authentication via WebAuthn/passkey. */\n WEBAUTHN = 'WEBAUTHN',\n /** Requires a recovery code. */\n RECOVERY_CODE = 'RECOVERY_CODE',\n}\n\n/** @enumType */\nexport type FactorTypeWithLiterals =\n | FactorType\n | 'PASSWORD'\n | 'SMS'\n | 'CALL'\n | 'EMAIL'\n | 'TOTP'\n | 'PUSH'\n | 'WEBAUTHN'\n | 'RECOVERY_CODE';\n\nexport interface StateMachineResponse\n extends StateMachineResponseStateDataOneOf {\n /** @internal */\n requireMfaData?: RequireMfaData;\n /**\n * User needs to solve an MFA challenge, such as providing the code that sent to them by SMS.\n * @internal\n */\n mfaChallengeData?: MfaChallengeData;\n /** Current state of the login or registration process. */\n state?: StateTypeWithLiterals;\n /** Session token. If `state` is not `SUCCESS`, this field is undefined. */\n sessionToken?: string | null;\n /** Token that represents the current state of the login or registration process. */\n stateToken?: string | null;\n /** Identity of the current member. */\n identity?: Identity;\n /** Additional data relevant to the login or registration process. */\n additionalData?: Record<string, CustomValue>;\n}\n\n/** @oneof */\nexport interface StateMachineResponseStateDataOneOf {\n /** @internal */\n requireMfaData?: RequireMfaData;\n /**\n * User needs to solve an MFA challenge, such as providing the code that sent to them by SMS.\n * @internal\n */\n mfaChallengeData?: MfaChallengeData;\n}\n\nexport enum StateType {\n /** Initial unknown state. */\n UNKNOWN_STATE = 'UNKNOWN_STATE',\n /** Login completed successfully. */\n SUCCESS = 'SUCCESS',\n /** Member needs the owner to approve their registration. */\n REQUIRE_OWNER_APPROVAL = 'REQUIRE_OWNER_APPROVAL',\n /** Member needs to verify their email. */\n REQUIRE_EMAIL_VERIFICATION = 'REQUIRE_EMAIL_VERIFICATION',\n /** The `status` is not one that prevents the member logging in, meaning it's not `OFFLINE`, `BLOCKED`, or `DELETED`. */\n STATUS_CHECK = 'STATUS_CHECK',\n /**\n * Multi-factor authentication is required to complete login.\n * @internal\n */\n REQUIRE_MFA = 'REQUIRE_MFA',\n /**\n * Indicates that the member needs to verify themselves using the selected verication factor type.\n * @internal\n */\n MFA_CHALLENGE = 'MFA_CHALLENGE',\n /**\n * User needs to provide the first factor authentication (e.g., password, webAuthN).\n * @internal\n */\n REQUIRE_FIRST_FACTOR = 'REQUIRE_FIRST_FACTOR',\n /** Member is missing fields that are marked as required on the site's signup form, and needs to complete them to finish registration. */\n REQUIRE_MISSING_FIELDS = 'REQUIRE_MISSING_FIELDS',\n /**\n * Registering identity must prove their sign-up factor (e.g. an emailed code) before the identity is created.\n * @internal\n */\n REQUIRE_REGISTRATION_FACTOR = 'REQUIRE_REGISTRATION_FACTOR',\n /**\n * Identity logging in must enter the code sent to their email before the login continues.\n * @internal\n */\n REQUIRE_LOGIN_CHALLENGE = 'REQUIRE_LOGIN_CHALLENGE',\n}\n\n/** @enumType */\nexport type StateTypeWithLiterals =\n | StateType\n | 'UNKNOWN_STATE'\n | 'SUCCESS'\n | 'REQUIRE_OWNER_APPROVAL'\n | 'REQUIRE_EMAIL_VERIFICATION'\n | 'STATUS_CHECK'\n | 'REQUIRE_MISSING_FIELDS';\n\nexport interface Identity {\n /**\n * Identity ID.\n * @format GUID\n */\n _id?: string | null;\n /**\n * Revision number, which increments by 1 each time the identity is updated.\n * To prevent conflicting changes,\n * the current revision must be passed when updating the identity.\n *\n * Ignored when creating an identity.\n */\n revision?: string | null;\n /**\n * Date and time the identity was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the identity was updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /** The identity configured connections to authenticate with. */\n connections?: Connection[];\n /** Identity profile. */\n identityProfile?: IdentityProfile;\n /**\n * Additional information about the identity that can impact user access.\n * This data cannot be set.\n */\n metadata?: Metadata;\n /** Identity email address. */\n email?: Email;\n /** Identity's current status. */\n status?: StatusV2;\n /**\n * Custom attributes.\n * @internal\n */\n customAttributes?: Record<string, any> | null;\n /**\n * Identity verification factors.\n * @maxSize 10\n * @readonly\n */\n factors?: Factor[];\n}\n\nexport interface Connection extends ConnectionTypeOneOf {\n /** IDP connection. */\n idpConnection?: IdpConnection;\n /** Authenticator connection. */\n authenticatorConnection?: AuthenticatorConnection;\n}\n\n/** @oneof */\nexport interface ConnectionTypeOneOf {\n /** IDP connection. */\n idpConnection?: IdpConnection;\n /** Authenticator connection. */\n authenticatorConnection?: AuthenticatorConnection;\n}\n\nexport interface IdpConnection {\n /**\n * IDP connection ID.\n * @format GUID\n */\n idpConnectionId?: string;\n /** IDP user ID. */\n idpUserId?: string;\n}\n\nexport interface AuthenticatorConnection {\n /**\n * Authenticator connection ID.\n * @format GUID\n */\n authenticatorConnectionId?: string;\n /** Whether re-enrollment is required. */\n reEnrollmentRequired?: boolean;\n}\n\nexport interface Metadata {\n /**\n * General tags. For example, `\"isOwner\"`.\n * @internal\n * @readonly\n */\n tags?: string[];\n}\n\nexport interface Email {\n /**\n * Email address.\n * @format EMAIL\n */\n address?: string;\n /** Whether the email address is verified. */\n isVerified?: boolean;\n}\n\nexport interface StatusV2 {\n /** Descriptive name of the identity status. */\n name?: StatusNameWithLiterals;\n /** Reasons for the current identity status. */\n reasons?: V1ReasonWithLiterals[];\n}\n\nexport enum StatusName {\n /** Unknown status. This value isn't used. */\n UNKNOWN_STATUS = 'UNKNOWN_STATUS',\n /** Identity is pending verification, owner approval, or both. */\n PENDING = 'PENDING',\n /** Identity is active and can log in. */\n ACTIVE = 'ACTIVE',\n /** Identity is deleted. This identity can't log in. */\n DELETED = 'DELETED',\n /** Identity is blocked. This identity can't log in. */\n BLOCKED = 'BLOCKED',\n /** Identity is offline. This identity can't log in. */\n OFFLINE = 'OFFLINE',\n}\n\n/** @enumType */\nexport type StatusNameWithLiterals =\n | StatusName\n | 'UNKNOWN_STATUS'\n | 'PENDING'\n | 'ACTIVE'\n | 'DELETED'\n | 'BLOCKED'\n | 'OFFLINE';\n\nexport enum V1Reason {\n /** Unknown reason. This value isn't used. */\n UNKNOWN_REASON = 'UNKNOWN_REASON',\n /** The identity is waiting for admin approval. After the approval, the identity has an `ACTIVE` status. */\n PENDING_ADMIN_APPROVAL_REQUIRED = 'PENDING_ADMIN_APPROVAL_REQUIRED',\n /** The identity has to verify the email. After the verification, the identity has an `ACTIVE` status. */\n PENDING_EMAIL_VERIFICATION_REQUIRED = 'PENDING_EMAIL_VERIFICATION_REQUIRED',\n /** The identity is missing fields that are marked as required on the site's signup form. After completing them, the identity has an `ACTIVE` status. */\n PENDING_REQUIRED_FIELDS_MISSING = 'PENDING_REQUIRED_FIELDS_MISSING',\n}\n\n/** @enumType */\nexport type V1ReasonWithLiterals =\n | V1Reason\n | 'UNKNOWN_REASON'\n | 'PENDING_ADMIN_APPROVAL_REQUIRED'\n | 'PENDING_EMAIL_VERIFICATION_REQUIRED'\n | 'PENDING_REQUIRED_FIELDS_MISSING';\n\nexport interface Factor {\n /**\n * Factor ID.\n * @format GUID\n */\n factorId?: string;\n /** Factor type. */\n type?: FactorTypeWithLiterals;\n /** Factor status. */\n status?: StatusWithLiterals;\n}\n\nexport enum Status {\n /** Factor requires activation. */\n INACTIVE = 'INACTIVE',\n /** Factor is active and can be used for authentication. */\n ACTIVE = 'ACTIVE',\n /** Factor is blocked and cannot be used for authentication. The user should reenroll the factor. */\n REQUIRE_REENROLL = 'REQUIRE_REENROLL',\n}\n\n/** @enumType */\nexport type StatusWithLiterals =\n | Status\n | 'INACTIVE'\n | 'ACTIVE'\n | 'REQUIRE_REENROLL';\n\nexport interface CustomValue extends CustomValueValueOneOf {\n /** String value. */\n strValue?: string;\n /** Number value. */\n numValue?: number;\n /** Date value. */\n dateValue?: Date | null;\n /** List value. */\n listValue?: ListValue;\n /** Map value. */\n mapValue?: MapValue;\n}\n\n/** @oneof */\nexport interface CustomValueValueOneOf {\n /** String value. */\n strValue?: string;\n /** Number value. */\n numValue?: number;\n /** Date value. */\n dateValue?: Date | null;\n /** List value. */\n listValue?: ListValue;\n /** Map value. */\n mapValue?: MapValue;\n}\n\nexport interface ListValue {\n /** Custom value. */\n value?: CustomValue[];\n}\n\nexport interface MapValue {\n /** Mapped custom value. */\n value?: Record<string, CustomValue>;\n}\n\nexport interface RequireMfaData {\n /**\n * The factors available for the user to perform the required MFA.\n * @maxSize 100\n */\n availableFactors?: V1Factor[];\n /** The reason the user is required to perform MFA. */\n reason?: MfaReasonWithLiterals;\n}\n\nexport interface V1Factor {\n /** Type of verification factor. */\n factorType?: FactorTypeWithLiterals;\n /** Availability status for second factor */\n factorStatus?: FactorStatusWithLiterals;\n}\n\nexport enum FactorStatus {\n ENABLED = 'ENABLED',\n REQUIRE_ACTIVATION = 'REQUIRE_ACTIVATION',\n REQUIRE_REENROLL = 'REQUIRE_REENROLL',\n ENABLED_BY_RULE = 'ENABLED_BY_RULE',\n DISABLED_BY_RULE = 'DISABLED_BY_RULE',\n}\n\n/** @enumType */\nexport type FactorStatusWithLiterals =\n | FactorStatus\n | 'ENABLED'\n | 'REQUIRE_ACTIVATION'\n | 'REQUIRE_REENROLL'\n | 'ENABLED_BY_RULE'\n | 'DISABLED_BY_RULE';\n\nexport enum MfaReason {\n /** Mfa is required due to user settings */\n USER_SETTINGS = 'USER_SETTINGS',\n /** Mfa is required due to high risk login */\n HIGH_RISK_LOGIN = 'HIGH_RISK_LOGIN',\n}\n\n/** @enumType */\nexport type MfaReasonWithLiterals =\n | MfaReason\n | 'USER_SETTINGS'\n | 'HIGH_RISK_LOGIN';\n\nexport interface MfaChallengeData {\n /** Type of verifation factor. */\n factorType?: FactorTypeWithLiterals;\n verificationChallengeData?: VerificationChallenge;\n /**\n * Factors types the user can choose from to verify themselves.\n * @maxSize 100\n */\n availableFactors?: V1Factor[];\n /** The reason the user is required for verification. */\n reason?: MfaReasonWithLiterals;\n}\n\nexport interface VerificationChallenge\n extends VerificationChallengeFactorChallengeDataOneOf {\n pushData?: PushChallengeData;\n webauthnData?: WebAuthnChallengeData;\n /** @maxLength 200 */\n hint?: string | null;\n}\n\n/** @oneof */\nexport interface VerificationChallengeFactorChallengeDataOneOf {\n pushData?: PushChallengeData;\n webauthnData?: WebAuthnChallengeData;\n}\n\nexport interface PushChallengeData {\n /**\n * This should be tied to a specific push notification.\n * It will be sent in subsequent requests to verify the factor.\n * @maxLength 36\n */\n transactionId?: string;\n}\n\nexport interface WebAuthnChallengeData {\n /**\n * A unique identifier for this challenge that will be used to correlate\n * the authentication response with this challenge.\n * This should be a cryptographically random GUID to prevent guessing attacks.\n * @format GUID\n */\n challengeId?: string;\n /**\n * A PublicKeyCredentialRequestOptions JSON as defined in the WebAuthn spec (https://www.w3.org/TR/webauthn-3/#dictdef-publickeycredentialrequestoptions).\n * @maxLength 40000\n */\n publicKeyCredentialRequestOptionsJson?: string;\n}\n\nexport interface ValidateEmailRequest {\n /** @maxLength 254 */\n email: string;\n}\n\nexport interface ValidateEmailResponse {\n valid?: boolean;\n failure?: EmailValidationFailure;\n formatInvalid?: boolean;\n}\n\nexport interface EmailValidationFailure {\n reason?: ReasonWithLiterals;\n}\n\nexport enum Reason {\n UNKNOWN_REASON = 'UNKNOWN_REASON',\n EMAIL_ADDRESS_BOUNCED = 'EMAIL_ADDRESS_BOUNCED',\n EMAIL_DOMAIN_MISSING_DNS_RECORDS = 'EMAIL_DOMAIN_MISSING_DNS_RECORDS',\n EMAIL_DOMAIN_FORMAT_INVALID = 'EMAIL_DOMAIN_FORMAT_INVALID',\n EMAIL_DOMAIN_PERMANENTLY_BLACKLISTED = 'EMAIL_DOMAIN_PERMANENTLY_BLACKLISTED',\n}\n\n/** @enumType */\nexport type ReasonWithLiterals =\n | Reason\n | 'UNKNOWN_REASON'\n | 'EMAIL_ADDRESS_BOUNCED'\n | 'EMAIL_DOMAIN_MISSING_DNS_RECORDS'\n | 'EMAIL_DOMAIN_FORMAT_INVALID'\n | 'EMAIL_DOMAIN_PERMANENTLY_BLACKLISTED';\n\nexport interface LoginV2Request {\n /** Identifier of identity logging in. */\n loginId: LoginId;\n /** Password of the identity logging in. */\n password?: string | null;\n /** CAPTCHA tokens, when CAPTCHA setting is on. */\n captchaTokens?: CaptchaToken[];\n /** Additional data that's relevant for the flow. */\n clientMetaData?: Record<string, any> | null;\n /**\n * webAuthn data:\n * 1. When the login_id is an email:\n * 1.a. if password is provided, this field should not be provided.\n * 1.b. if password is not provided, this field should contain a webauthn credential to attempt login.\n * 2. When the login_id is empty, this field should contain a WebAuthn credential. password is not applicable in this case.\n * @internal\n */\n webauthn?: WebAuthnVerifyData;\n /**\n * email OTP data:\n * 1. When the login_id is an email:\n * 1.a. if password or webauthn is provided, this field should not be provided.\n * 1.b. if password and webauthn are not provided, this field should contain an email OTP to attempt login.\n * @internal\n */\n emailOtp?: ExternalEmailVerifyData;\n /**\n * State token from a login flow that was started beforehand.\n *\n * When provided, this request continues an in-progress login flow rather than starting a new one.\n * @maxLength 1000\n */\n stateToken?: string | null;\n}\n\nexport interface WebAuthnVerifyData {\n /**\n * The challenge_id from the WebAuthnChallengeData that was returned in the previous\n * verification response. This will always be present when completing the WebAuthn authentication\n * ceremony with the credential data from the client.\n * @format GUID\n */\n challengeId?: string | null;\n /**\n * If this field is present, this is a request to complete the WebAuthn authentication\n * with the credential data from the client.\n *\n * The credential contains a JSON string representation of a WebAuthn PublicKeyCredential\n * object returned by the browser during authentication, serialized as per the WebAuthn specification.\n * The SPI implementation should use this to verify the authentication assertion.\n *\n * Any standards-compliant WebAuthn server library should be able to process this serialized format.\n * For details on the serialization format, refer to the W3C WebAuthn specification:\n * https://www.w3.org/TR/webauthn-3/#dom-publickeycredential-tojson\n * @maxLength 3000\n */\n credential?: string | null;\n}\n\nexport interface ExternalEmailVerifyData {\n /**\n * @minLength 1\n * @maxLength 100\n */\n code?: string | null;\n}\n\nexport interface ChangePasswordRequest {\n /**\n * New password to set for the logged-in member.\n *\n * The password must meet the site's configured password requirements for length and complexity.\n */\n newPassword: string;\n}\n\nexport interface ChangePasswordResponse {}\n\nexport interface LoginWithIdpConnectionRequest {\n /**\n * The id of the connection id (can be fetched by calling connection-service.listEnabledConnectionsClientData\n * @format GUID\n */\n idpConnectionId?: string;\n /**\n * The id of the tenant the caller wants to login into\n * @format GUID\n */\n tenantId?: string;\n /** The type of the tenant the caller wants to login into */\n tenantType?: TenantTypeWithLiterals;\n customPayload?: Record<string, string>;\n /**\n * This flow ultimately returns an HTML page that asynchronously posts the LoginResponse via the BroadcastChannel API.\n * The message will be posted to a channel named `wix-idp-$session_id`, and encrypted with the `encryption_key`.\n * Encryption key should be base64 encoded. Encryption is done using AES-GCM with a random IV that's sent alongside the payload\n *\n * Optional at the proto level: required for the BroadcastChannel response mode only, and may be omitted\n * when `authorization_url` is provided (redirect response mode). Enforced in code.\n */\n sessionId?: string;\n /**\n * Base64-encoded encryption key for securing the authentication response.\n *\n * Used to encrypt the authentication response sent via BroadcastChannel API.\n * Encryption uses AES-GCM with a random IV.\n *\n * Optional at the proto level: required for the BroadcastChannel response mode only, and may be omitted\n * when `authorization_url` is provided (redirect response mode). Enforced in code.\n */\n encryptionKey?: string;\n /**\n * Visitor ID for tracking purposes.\n *\n * Optional identifier for analytics and tracking the authentication flow.\n */\n visitorId?: string | null;\n /**\n * Browser session identifier.\n *\n * Optional identifier for correlating the authentication request with browser session data.\n */\n bsi?: string | null;\n /**\n * Redirect response mode: when set, the SSO callback responds with a 302 to this URL carrying the\n * member session cookie (smSession) via Set-Cookie, instead of the BroadcastChannel HTML page.\n * Intended for OIDC-broker flows where Wix acts as the IdP: this URL is the outer authorization\n * endpoint to resume once the member session is established.\n * Must be on the same registrable domain as the host serving this login request (which is also the\n * domain the session cookie is set on). When set, `session_id` and `encryption_key` are not required.\n * @format WEB_URL\n */\n authorizationUrl?: string | null;\n}\n\nexport enum TenantType {\n /** Unknown tenant type. This value isn't used. */\n UNKNOWN_TENANT_TYPE = 'UNKNOWN_TENANT_TYPE',\n /** The identity is a Wix user. */\n ACCOUNT = 'ACCOUNT',\n /** The identity is a member. */\n SITE = 'SITE',\n /**\n * Tenant is root.\n * @internal\n */\n ROOT = 'ROOT',\n}\n\n/** @enumType */\nexport type TenantTypeWithLiterals =\n | TenantType\n | 'UNKNOWN_TENANT_TYPE'\n | 'ACCOUNT'\n | 'SITE';\n\nexport interface RawHttpResponse {\n body?: Uint8Array;\n statusCode?: number | null;\n headers?: HeadersEntry[];\n}\n\nexport interface HeadersEntry {\n key?: string;\n value?: string;\n}\n\nexport interface RawHttpRequest {\n body?: Uint8Array;\n pathParams?: PathParametersEntry[];\n queryParams?: QueryParametersEntry[];\n headers?: HeadersEntry[];\n method?: string;\n rawPath?: string;\n rawQuery?: string;\n}\n\nexport interface PathParametersEntry {\n key?: string;\n value?: string;\n}\n\nexport interface QueryParametersEntry {\n key?: string;\n value?: string;\n}\n\n/**\n * Request for LoginWithIdpConnectionRedirect - OAuth redirect flow.\n * Uses redirect_uri/client_id instead of session_id/encryption_key.\n */\nexport interface LoginWithIdpConnectionRedirectRequest {\n /**\n * The id of the connection id (can be fetched by calling connection-service.listEnabledConnectionsClientData\n * @format GUID\n */\n idpConnectionId?: string;\n /**\n * The id of the tenant the caller wants to login into\n * @format GUID\n */\n tenantId?: string;\n /** The type of the tenant the caller wants to login into */\n tenantType?: TenantTypeWithLiterals;\n customPayload?: Record<string, string>;\n /**\n * OAuth app redirect URI for the callback.\n *\n * After successful authentication, the flow redirects to this URI with the `sessionToken`\n * as a query parameter. Must be a registered callback URL for the specified `client_id`.\n * @format WEB_URL\n */\n redirectUri?: string;\n /**\n * OAuth client ID for redirect flow validation.\n *\n * Used to validate that the redirect URI is a permitted callback URL for this OAuth client.\n * @format GUID\n */\n clientId?: string;\n /**\n * Visitor ID for tracking purposes.\n *\n * Optional identifier for analytics and tracking the authentication flow.\n */\n visitorId?: string | null;\n /**\n * Browser session identifier.\n *\n * Optional identifier for correlating the authentication request with browser session data.\n */\n bsi?: string | null;\n}\n\nexport interface ConnectIdpRequest {\n /**\n * The id of the connection id (can be fetched by calling connection-service.listEnabledConnectionsClientData\n * @format GUID\n */\n idpConnectionId?: string;\n customPayload?: Record<string, string>;\n /**\n * This flow ultimately returns an HTML page that asynchronously posts the LoginResponse via the BroadcastChannel API.\n * The message will be posted to a channel named `wix-idp-$session_id`, and encrypted with the `encryption_key`.\n * Encryption key should be base64 encoded. Encryption is done using AES-GCM with a random IV that's sent alongside the payload\n */\n sessionId?: string;\n /**\n * Base64-encoded encryption key for securing the authentication response.\n *\n * Used to encrypt the authentication response sent via BroadcastChannel API.\n * Encryption uses AES-GCM with a random IV.\n */\n encryptionKey?: string;\n}\n\nexport interface LoginCallbackRequest {\n /** state that that received on the redirect */\n state?: string;\n /** session token */\n sessionToken?: string;\n}\n\nexport interface LoginWithIdpConnectionTokenParamsRequest {\n /**\n * The id of the connection id (can be fetched by calling connection-service.listEnabledConnectionsClientData)\n * @format GUID\n */\n idpConnectionId?: string;\n /** A set of fields that are required for the connection to be able to identify and authenticate the user */\n tokenParams?: Record<string, string>;\n}\n\nexport interface SignOnRequest {\n /**\n * Member identifier for authentication.\n *\n * Currently only email addresses are supported.\n */\n loginId: LoginId;\n /**\n * Member profile information.\n *\n * Profile data such as first name, last name, and other member details.\n * If the member already exists, provided profile information will update the existing member's profile.\n * If the member doesn't exist, this profile information is used to create the new member.\n */\n profile?: IdentityProfile;\n /**\n * Whether to mark the member's email as verified without requiring verification.\n *\n * When `true`, marks the email as verified without requiring verification.\n * Use with caution in production as this bypasses security verification.\n *\n * Default: `false`\n */\n verifyEmail?: boolean;\n /**\n * Whether to merge with an existing contact with the same email address.\n *\n * When `true`, links the member to an existing contact record with the same email\n * and inherits contact data. When `false`, creates a new contact record.\n *\n * Default: `true`\n */\n mergeExistingContact?: boolean;\n}\n\nexport interface SignOnResponse {\n /**\n * Session token for the authenticated member.\n *\n * Use this token to obtain access and refresh tokens for subsequent API calls.\n */\n sessionToken?: string;\n /**\n * Member identity information.\n *\n * Contains the member's identity details after successful authentication.\n */\n identity?: Identity;\n}\n\n/** logout request payload */\nexport interface LogoutRequest {\n /**\n * URL to redirect to after logout.\n *\n * Optional redirect destination after the logout process completes.\n * @format WEB_URL\n */\n postLogoutRedirectUri?: string | null;\n /**\n * Client identifier for the logout request.\n *\n * Identifies the application or client initiating the logout.\n * @format GUID\n */\n clientId?: string | null;\n}\n\nexport interface VerifyRequest extends VerifyRequestFactorDataOneOf {\n /** SMS verification code sent to the member's phone number. */\n smsData?: SmsVerifyData;\n /** Voice call verification code received by the member. */\n callData?: CallVerifyData;\n /** Email verification code sent to the member's email address. */\n emailData?: ExternalEmailVerifyData;\n /** TOTP code from the member's authenticator app. */\n totpData?: TotpVerifyData;\n /** Push notification authentication response from the member's device. */\n pushData?: PushVerifyData;\n /** WebAuthn response from biometric or security key authentication. */\n webauthnData?: WebAuthnVerifyData;\n /** RecoveryCode response from a one-time code. */\n recoveryCodeData?: RecoveryCodeVerifyData;\n /** Password for first factor verification. */\n passwordData?: PasswordVerifyData;\n /**\n * State token from the initial authentication response.\n *\n * Required to continue the multi-step authentication process.\n * @maxLength 1000\n */\n stateToken?: string;\n /**\n * Type of authentication factor being verified.\n *\n * Specifies which verification method is being used (SMS, email, TOTP, etc.).\n */\n factorType?: FactorTypeWithLiterals;\n /**\n * Whether to remember this device for future authentication.\n *\n * When `true`, reduces future authentication requirements for this device.\n * Only applicable for second factor authentication.\n */\n rememberThisDevice?: boolean;\n}\n\n/** @oneof */\nexport interface VerifyRequestFactorDataOneOf {\n /** SMS verification code sent to the member's phone number. */\n smsData?: SmsVerifyData;\n /** Voice call verification code received by the member. */\n callData?: CallVerifyData;\n /** Email verification code sent to the member's email address. */\n emailData?: ExternalEmailVerifyData;\n /** TOTP code from the member's authenticator app. */\n totpData?: TotpVerifyData;\n /** Push notification authentication response from the member's device. */\n pushData?: PushVerifyData;\n /** WebAuthn response from biometric or security key authentication. */\n webauthnData?: WebAuthnVerifyData;\n /** RecoveryCode response from a one-time code. */\n recoveryCodeData?: RecoveryCodeVerifyData;\n /** Password for first factor verification. */\n passwordData?: PasswordVerifyData;\n}\n\nexport interface SmsVerifyData {\n /**\n * @minLength 1\n * @maxLength 100\n */\n code?: string | null;\n deliveryMethod?: DeliveryMethodWithLiterals;\n /**\n * The template ID to use for the SMS notification.\n * @minLength 1\n * @maxLength 100\n */\n templateId?: string | null;\n}\n\nexport enum DeliveryMethod {\n SMS = 'SMS',\n WHATSAPP = 'WHATSAPP',\n}\n\n/** @enumType */\nexport type DeliveryMethodWithLiterals = DeliveryMethod | 'SMS' | 'WHATSAPP';\n\nexport interface CallVerifyData {\n /**\n * @minLength 1\n * @maxLength 100\n */\n code?: string | null;\n}\n\nexport interface TotpVerifyData {\n /**\n * @minLength 1\n * @maxLength 100\n */\n code?: string | null;\n}\n\nexport interface PushVerifyData {\n /** @maxLength 36 */\n transactionId?: string | null;\n}\n\nexport interface RecoveryCodeVerifyData {\n /**\n * @minLength 1\n * @maxLength 100\n */\n code?: string | null;\n}\n\nexport interface PasswordVerifyData {\n /**\n * @minLength 1\n * @maxLength 100\n */\n password?: string;\n}\n\nexport interface GetWebauthnChallengeRequest {\n /**\n * Identifier of the member requesting the WebAuthn challenge.\n *\n * If not provided, returns an anonymous WebAuthn challenge for usernameless authentication.\n */\n loginId?: LoginId;\n}\n\nexport interface GetWebauthnChallengeResponse {\n /** The challenge that will be used for a WebAuthn authentication ceremony. */\n webauthn?: WebAuthnChallengeData;\n}\n\n/** @docsIgnore */\nexport type RegisterV2ApplicationErrors =\n | {\n code?: 'UNIMPLEMENTED_FEATURE';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'THROTTLED_FEATURE';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'INVALID_CAPTCHA_TOKEN';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'CAPTCHA_TOKEN_REQUIRED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'IP_ADDRESS_FILTERED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'RECAPTCHA_FAILED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'RECAPTCHA_REQUIRED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'MISSING_CAPTCHA_TOKEN';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'USER_EMAIL_OFAC_ADDRESS';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'UNSUPPORTED_FIELD';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'ATTRIBUTE_NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'CLIENT_METADATA_NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'INVALID_LD_SESSION';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'DUPLICATE_EMAIL';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'COULD_NOT_CREATE_SET_ACCOUNT_USER';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'INVALID_USER_TYPE';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'REGISTRATION_TO_EDITORX_NOT_ALLOWED';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type RegisterV2ValidationErrors =\n | {\n ruleName?: 'PROVIDE_TENANT_ID';\n }\n | {\n ruleName?: 'INVALID_AUTHENTICATOR_ID';\n }\n | {\n ruleName?: 'VALUEֹֹ_TOO_SHORT';\n }\n | {\n ruleName?: 'VALUEֹֹ_TOO_LONG';\n }\n | {\n ruleName?: 'VALUE_DID_NOT_MATCH';\n };\n/** @docsIgnore */\nexport type LoginV2ApplicationErrors =\n | {\n code?: 'THROTTLED_FEATURE';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'INVALID_CAPTCHA_TOKEN';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'CAPTCHA_TOKEN_REQUIRED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'REENROLLMENT_REQUIRED_BY_ADMIN';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'TRUSTED_CLIENTS_ONLY';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'WIX_EMPLOYEE_PASSWORD_LOGIN_NOT_ALLOWED';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type LoginV2ValidationErrors =\n | {\n ruleName?: 'PROVIDE_TENANT_ID';\n }\n | {\n ruleName?: 'INVALID_AUTHENTICATOR_ID';\n };\n\n/**\n * Registers a new member.\n *\n * Typically, after a successful registration, you generate and use member tokens for the\n * registered member so that subsequent API calls are called as part of a member session.\n * Use the `sessionToken` in the response to [get the site member's access and refresh tokens](https://dev.wix.com/docs/go-headless/coding/rest-api/visitors-and-members/handle-members-with-custom-login#get-the-site-members-access-and-refresh-tokens).\n *\n * If the email used to register the member already exists as a contact email, the registering\n * member need to verify the email address using a code that is sent to the address.\n * @param loginId - Identifier of the registering member.\n * @public\n * @requiredField loginId\n * @fqn wix.iam.authentication.v1.AuthenticationService.RegisterV2\n */\nexport async function registerV2(\n loginId: LoginId,\n options?: RegisterV2Options\n): Promise<\n NonNullablePaths<\n StateMachineResponse,\n | `state`\n | `identity.connections`\n | `identity.connections.${number}.idpConnection.idpConnectionId`\n | `identity.connections.${number}.idpConnection.idpUserId`\n | `identity.connections.${number}.authenticatorConnection.authenticatorConnectionId`\n | `identity.connections.${number}.authenticatorConnection.reEnrollmentRequired`\n | `identity.identityProfile.emails`\n | `identity.identityProfile.phones`\n | `identity.identityProfile.labels`\n | `identity.identityProfile.privacyStatus`\n | `identity.identityProfile.customFields`\n | `identity.identityProfile.customFields.${number}.name`\n | `identity.identityProfile.customFields.${number}.value.strValue`\n | `identity.identityProfile.customFields.${number}.value.numValue`\n | `identity.identityProfile.customFields.${number}.value.boolValue`\n | `identity.identityProfile.secondaryEmails`\n | `identity.identityProfile.secondaryEmails.${number}.email`\n | `identity.identityProfile.secondaryEmails.${number}.tag`\n | `identity.identityProfile.phonesV2`\n | `identity.identityProfile.phonesV2.${number}.phone`\n | `identity.identityProfile.phonesV2.${number}.tag`\n | `identity.identityProfile.addresses`\n | `identity.identityProfile.addresses.${number}.tag`\n | `identity.email.address`\n | `identity.email.isVerified`\n | `identity.status.name`\n | `identity.status.reasons`\n | `identity.factors`\n | `identity.factors.${number}.factorId`\n | `identity.factors.${number}.type`\n | `identity.factors.${number}.status`,\n 5\n > & {\n __applicationErrorsType?: RegisterV2ApplicationErrors;\n __validationErrorsType?: RegisterV2ValidationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = transformPaths(\n renameKeysFromSDKRequestToRESTRequest({\n loginId: loginId,\n password: options?.password,\n profile: options?.profile,\n captchaTokens: options?.captchaTokens,\n clientMetaData: options?.clientMetaData,\n factorType: options?.factorType,\n organizationId: options?.organizationId,\n }),\n [\n {\n transformFn: transformSDKAddressToRESTAddress,\n paths: TRANSFORM_PATHS_0,\n },\n ]\n );\n\n const reqOpts =\n ambassadorWixIamAuthenticationV1Authentication.registerV2(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: TRANSFORM_PATHS_1,\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n loginId: '$[0]',\n password: '$[1].password',\n profile: '$[1].profile',\n captchaTokens: '$[1].captchaTokens',\n clientMetaData: '$[1].clientMetaData',\n factorType: '$[1].factorType',\n organizationId: '$[1].organizationId',\n },\n singleArgumentUnchanged: false,\n },\n ['loginId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface RegisterV2Options {\n /** Password of the registering member. */\n password?: string;\n /** Profile information of registering member. */\n profile?: IdentityProfile;\n /** CAPTCHA tokens, when CAPTCHA setting is on. */\n captchaTokens?: CaptchaToken[];\n /** Additional data that's relevant for the flow. */\n clientMetaData?: Record<string, any> | null;\n /**\n * The factor to register with: `PASSWORD`, the default, or `EMAIL`, which sends a code and returns\n * `REQUIRE_REGISTRATION_FACTOR` until the code is submitted to `Verify`.\n */\n factorType?: FactorTypeWithLiterals;\n /**\n * ID of the organization the user registers into. The new user's account is created as a sub-account of this organization.\n * @format GUID\n */\n organizationId?: string | null;\n}\n\n/** @public\n * @requiredField email\n * @fqn wix.iam.authentication.v1.AuthenticationService.ValidateEmail\n */\nexport async function validateEmail(\n email: string\n): Promise<\n NonNullablePaths<\n ValidateEmailResponse,\n `valid` | `failure.reason` | `formatInvalid`,\n 1\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ email: email });\n\n const reqOpts =\n ambassadorWixIamAuthenticationV1Authentication.validateEmail(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { email: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['email']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Logs in an existing member.\n *\n * Typically, after a successful login, you generate and use member tokens for the\n * logged-in member so that subsequent API calls are called as part of a member session.\n * Use the `sessionToken` in the response to [get the site member's access and refresh tokens](https://dev.wix.com/docs/go-headless/coding/rest-api/visitors-and-members/handle-members-with-custom-login#get-the-site-members-access-and-refresh-tokens).\n * @param loginId - Identifier of identity logging in.\n * @public\n * @requiredField loginId\n * @fqn wix.iam.authentication.v1.AuthenticationService.LoginV2\n */\nexport async function loginV2(\n loginId: LoginId,\n options?: LoginV2Options\n): Promise<\n NonNullablePaths<\n StateMachineResponse,\n | `state`\n | `identity.connections`\n | `identity.connections.${number}.idpConnection.idpConnectionId`\n | `identity.connections.${number}.idpConnection.idpUserId`\n | `identity.connections.${number}.authenticatorConnection.authenticatorConnectionId`\n | `identity.connections.${number}.authenticatorConnection.reEnrollmentRequired`\n | `identity.identityProfile.emails`\n | `identity.identityProfile.phones`\n | `identity.identityProfile.labels`\n | `identity.identityProfile.privacyStatus`\n | `identity.identityProfile.customFields`\n | `identity.identityProfile.customFields.${number}.name`\n | `identity.identityProfile.customFields.${number}.value.strValue`\n | `identity.identityProfile.customFields.${number}.value.numValue`\n | `identity.identityProfile.customFields.${number}.value.boolValue`\n | `identity.identityProfile.secondaryEmails`\n | `identity.identityProfile.secondaryEmails.${number}.email`\n | `identity.identityProfile.secondaryEmails.${number}.tag`\n | `identity.identityProfile.phonesV2`\n | `identity.identityProfile.phonesV2.${number}.phone`\n | `identity.identityProfile.phonesV2.${number}.tag`\n | `identity.identityProfile.addresses`\n | `identity.identityProfile.addresses.${number}.tag`\n | `identity.email.address`\n | `identity.email.isVerified`\n | `identity.status.name`\n | `identity.status.reasons`\n | `identity.factors`\n | `identity.factors.${number}.factorId`\n | `identity.factors.${number}.type`\n | `identity.factors.${number}.status`,\n 5\n > & {\n __applicationErrorsType?: LoginV2ApplicationErrors;\n __validationErrorsType?: LoginV2ValidationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n loginId: loginId,\n password: options?.password,\n captchaTokens: options?.captchaTokens,\n clientMetaData: options?.clientMetaData,\n stateToken: options?.stateToken,\n });\n\n const reqOpts =\n ambassadorWixIamAuthenticationV1Authentication.loginV2(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: TRANSFORM_PATHS_1,\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n loginId: '$[0]',\n password: '$[1].password',\n captchaTokens: '$[1].captchaTokens',\n clientMetaData: '$[1].clientMetaData',\n stateToken: '$[1].stateToken',\n },\n singleArgumentUnchanged: false,\n },\n ['loginId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface LoginV2Options {\n /** Password of the identity logging in. */\n password?: string | null;\n /** CAPTCHA tokens, when CAPTCHA setting is on. */\n captchaTokens?: CaptchaToken[];\n /** Additional data that's relevant for the flow. */\n clientMetaData?: Record<string, any> | null;\n /**\n * State token from a login flow that was started beforehand.\n *\n * When provided, this request continues an in-progress login flow rather than starting a new one.\n * @maxLength 1000\n */\n stateToken?: string | null;\n}\n\n/**\n * Changes the password of a logged-in member. The member must have a valid session to use this method.\n *\n * The member's session remains valid after password change.\n *\n * The new password must meet the site's configured password requirements for length\n * and complexity. These requirements are enforced automatically when processing the request.\n * @param newPassword - New password to set for the logged-in member.\n *\n * The password must meet the site's configured password requirements for length and complexity.\n * @public\n * @documentationMaturity preview\n * @requiredField newPassword\n * @permissionId IAM.CHANGE_PASSWORD\n * @fqn wix.iam.authentication.v1.AuthenticationService.ChangePassword\n */\nexport async function changePassword(newPassword: string): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n newPassword: newPassword,\n });\n\n const reqOpts =\n ambassadorWixIamAuthenticationV1Authentication.changePassword(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { newPassword: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['newPassword']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Authenticates a member without credentials and returns a session token.\n *\n * This method provides authentication that automatically creates or updates\n * member accounts as needed during the authentication process.\n * Use this only for trusted integrations and scenarios where you already have verified user information.\n * @param loginId - Member identifier for authentication.\n *\n * Currently only email addresses are supported.\n * @public\n * @documentationMaturity preview\n * @requiredField loginId\n * @permissionId IAM.AUTHENTICAITON_SIGN_ON\n * @applicableIdentity APP\n * @fqn wix.iam.authentication.v1.AuthenticationService.SignOn\n */\nexport async function signOn(\n loginId: LoginId,\n options?: SignOnOptions\n): Promise<\n NonNullablePaths<\n SignOnResponse,\n | `sessionToken`\n | `identity.connections`\n | `identity.connections.${number}.idpConnection.idpConnectionId`\n | `identity.connections.${number}.idpConnection.idpUserId`\n | `identity.connections.${number}.authenticatorConnection.authenticatorConnectionId`\n | `identity.connections.${number}.authenticatorConnection.reEnrollmentRequired`\n | `identity.identityProfile.emails`\n | `identity.identityProfile.phones`\n | `identity.identityProfile.labels`\n | `identity.identityProfile.privacyStatus`\n | `identity.identityProfile.customFields`\n | `identity.identityProfile.customFields.${number}.name`\n | `identity.identityProfile.customFields.${number}.value.strValue`\n | `identity.identityProfile.customFields.${number}.value.numValue`\n | `identity.identityProfile.customFields.${number}.value.boolValue`\n | `identity.identityProfile.secondaryEmails`\n | `identity.identityProfile.secondaryEmails.${number}.email`\n | `identity.identityProfile.secondaryEmails.${number}.tag`\n | `identity.identityProfile.phonesV2`\n | `identity.identityProfile.phonesV2.${number}.phone`\n | `identity.identityProfile.phonesV2.${number}.tag`\n | `identity.identityProfile.addresses`\n | `identity.identityProfile.addresses.${number}.tag`\n | `identity.email.address`\n | `identity.email.isVerified`\n | `identity.status.name`\n | `identity.status.reasons`\n | `identity.factors`\n | `identity.factors.${number}.factorId`\n | `identity.factors.${number}.type`\n | `identity.factors.${number}.status`,\n 5\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = transformPaths(\n renameKeysFromSDKRequestToRESTRequest({\n loginId: loginId,\n profile: options?.profile,\n verifyEmail: options?.verifyEmail,\n mergeExistingContact: options?.mergeExistingContact,\n }),\n [\n {\n transformFn: transformSDKAddressToRESTAddress,\n paths: TRANSFORM_PATHS_0,\n },\n ]\n );\n\n const reqOpts =\n ambassadorWixIamAuthenticationV1Authentication.signOn(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: TRANSFORM_PATHS_1,\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n loginId: '$[0]',\n profile: '$[1].profile',\n verifyEmail: '$[1].verifyEmail',\n mergeExistingContact: '$[1].mergeExistingContact',\n },\n singleArgumentUnchanged: false,\n },\n ['loginId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface SignOnOptions {\n /**\n * Member profile information.\n *\n * Profile data such as first name, last name, and other member details.\n * If the member already exists, provided profile information will update the existing member's profile.\n * If the member doesn't exist, this profile information is used to create the new member.\n */\n profile?: IdentityProfile;\n /**\n * Whether to mark the member's email as verified without requiring verification.\n *\n * When `true`, marks the email as verified without requiring verification.\n * Use with caution in production as this bypasses security verification.\n *\n * Default: `false`\n */\n verifyEmail?: boolean;\n /**\n * Whether to merge with an existing contact with the same email address.\n *\n * When `true`, links the member to an existing contact record with the same email\n * and inherits contact data. When `false`, creates a new contact record.\n *\n * Default: `true`\n */\n mergeExistingContact?: boolean;\n}\n\n/**\n * Terminates the member's session and clears authentication cookies.\n *\n * Returns the following:\n * - `body`: HTML content for the logout response\n * - `statusCode`: HTTP status code (200 for success, 302 for redirect)\n * - `headers`: Array of key-value pairs including:\n * - `Set-Cookie` headers to remove all session cookies\n * - `Location` header (when `postLogoutRedirectUri` is provided, with 302 status)\n * @public\n * @documentationMaturity preview\n * @fqn wix.iam.authentication.v1.AuthenticationService.Logout\n */\nexport async function logout(\n options?: LogoutOptions\n): Promise<\n NonNullablePaths<\n RawHttpResponse,\n `body` | `headers` | `headers.${number}.key` | `headers.${number}.value`,\n 2\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n postLogoutRedirectUri: options?.postLogoutRedirectUri,\n clientId: options?.clientId,\n });\n\n const reqOpts =\n ambassadorWixIamAuthenticationV1Authentication.logout(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n postLogoutRedirectUri: '$[0].postLogoutRedirectUri',\n clientId: '$[0].clientId',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface LogoutOptions {\n /**\n * URL to redirect to after logout.\n *\n * Optional redirect destination after the logout process completes.\n * @format WEB_URL\n */\n postLogoutRedirectUri?: string | null;\n /**\n * Client identifier for the logout request.\n *\n * Identifies the application or client initiating the logout.\n * @format GUID\n */\n clientId?: string | null;\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKFloatToRESTFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformRESTBytesToSDKBytes } from '@wix/sdk-runtime/transformations/bytes';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nconst TRANSFORM_PATHS_0 = [{ path: 'profile.customFields.value.numValue' }];\nconst TRANSFORM_PATHS_1 = [{ path: 'profile.customFields.value.dateValue' }];\nconst TRANSFORM_PATHS_2 = [\n { path: 'identity.createdDate' },\n { path: 'identity.updatedDate' },\n { path: 'identity.identityProfile.customFields.value.dateValue' },\n { path: 'additionalData.*.dateValue' },\n];\nconst TRANSFORM_PATHS_3 = [\n { path: 'identity.identityProfile.customFields.value.numValue' },\n { path: 'additionalData.*.numValue' },\n];\nconst TRANSFORM_PATHS_4 = [\n { path: 'identity.createdDate' },\n { path: 'identity.updatedDate' },\n { path: 'identity.identityProfile.customFields.value.dateValue' },\n];\nconst TRANSFORM_PATHS_5 = [\n { path: 'identity.identityProfile.customFields.value.numValue' },\n];\nconst TRANSFORM_PATHS_6 = [{ path: 'body' }];\n\nfunction resolveWixIamAuthenticationV1AuthenticationServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n _: [\n {\n srcPath: '/_api/iam/authentication',\n destPath: '',\n },\n ],\n 'users._base_domain_': [\n {\n srcPath: '/iam/wix/google',\n destPath: '/v1/sso/callback/root/0e6a50f5-b523-4e29-990d-f37fa2ffdd69',\n },\n {\n srcPath: '/authentication',\n destPath: '',\n },\n {\n srcPath: '/_api/iam/authentication/v1/sso/callback',\n destPath: '/v1/sso/callback',\n },\n {\n srcPath: '/_api/iam/authentication',\n destPath: '',\n },\n {\n srcPath:\n '/_api/iam/authentication/v1/sso/login-with-token-params-redirect/',\n destPath: '/v1/sso/login-with-token-params-redirect',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/_api/iam/authentication',\n destPath: '',\n },\n {\n srcPath: '/iam/authentication',\n destPath: '',\n },\n ],\n 'bo._base_domain_': [\n {\n srcPath: '/_api/iam/authentication',\n destPath: '',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/_api/iam/authentication',\n destPath: '',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/_api/iam/authentication',\n destPath: '',\n },\n ],\n 'dev._base_domain_': [\n {\n srcPath: '/_api/iam/authentication',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/authentication',\n destPath: '',\n },\n {\n srcPath: '/_api/iam/authentication',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/iam/authentication',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/iam/authentication/v2/sign-on',\n destPath: '/v2/sign-on',\n },\n {\n srcPath: '/iam/authentication/v1/logout',\n destPath: '/v1/logout',\n },\n {\n srcPath: '/iam/authentication/v2/change-password',\n destPath: '/v2/change-password',\n },\n {\n srcPath: '/iam/authentication/v2/verify',\n destPath: '/v2/verify',\n },\n {\n srcPath: '/iam/authentication/v2/login',\n destPath: '/v2/login',\n },\n {\n srcPath: '/iam/authentication/v2/register',\n destPath: '/v2/register',\n },\n {\n srcPath: '/iam/authentication/v2',\n destPath: '/v2',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_identity_authentication';\n\n/**\n * Registers a new member.\n *\n * Typically, after a successful registration, you generate and use member tokens for the\n * registered member so that subsequent API calls are called as part of a member session.\n * Use the `sessionToken` in the response to [get the site member's access and refresh tokens](https://dev.wix.com/docs/go-headless/coding/rest-api/visitors-and-members/handle-members-with-custom-login#get-the-site-members-access-and-refresh-tokens).\n *\n * If the email used to register the member already exists as a contact email, the registering\n * member need to verify the email address using a code that is sent to the address.\n */\nexport function registerV2(payload: object): RequestOptionsFactory<any> {\n function __registerV2({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: TRANSFORM_PATHS_0,\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: TRANSFORM_PATHS_1,\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.iam.authentication.v1.authentication',\n method: 'POST' as any,\n methodFqn: 'wix.iam.authentication.v1.AuthenticationService.RegisterV2',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixIamAuthenticationV1AuthenticationServiceUrl({\n protoPath: '/v2/register',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: TRANSFORM_PATHS_2,\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: TRANSFORM_PATHS_3,\n },\n ]),\n };\n\n return metadata;\n }\n\n return __registerV2;\n}\n\nexport function validateEmail(payload: object): RequestOptionsFactory<any> {\n function __validateEmail({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.iam.authentication.v1.authentication',\n method: 'POST' as any,\n methodFqn:\n 'wix.iam.authentication.v1.AuthenticationService.ValidateEmail',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixIamAuthenticationV1AuthenticationServiceUrl({\n protoPath: '/v2/validate-email',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __validateEmail;\n}\n\n/**\n * Logs in an existing member.\n *\n * Typically, after a successful login, you generate and use member tokens for the\n * logged-in member so that subsequent API calls are called as part of a member session.\n * Use the `sessionToken` in the response to [get the site member's access and refresh tokens](https://dev.wix.com/docs/go-headless/coding/rest-api/visitors-and-members/handle-members-with-custom-login#get-the-site-members-access-and-refresh-tokens).\n */\nexport function loginV2(payload: object): RequestOptionsFactory<any> {\n function __loginV2({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.iam.authentication.v1.authentication',\n method: 'POST' as any,\n methodFqn: 'wix.iam.authentication.v1.AuthenticationService.LoginV2',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixIamAuthenticationV1AuthenticationServiceUrl({\n protoPath: '/v2/login',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: TRANSFORM_PATHS_2,\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: TRANSFORM_PATHS_3,\n },\n ]),\n };\n\n return metadata;\n }\n\n return __loginV2;\n}\n\n/**\n * Changes the password of a logged-in member. The member must have a valid session to use this method.\n *\n * The member's session remains valid after password change.\n *\n * The new password must meet the site's configured password requirements for length\n * and complexity. These requirements are enforced automatically when processing the request.\n */\nexport function changePassword(payload: object): RequestOptionsFactory<any> {\n function __changePassword({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.iam.authentication.v1.authentication',\n method: 'POST' as any,\n methodFqn:\n 'wix.iam.authentication.v1.AuthenticationService.ChangePassword',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixIamAuthenticationV1AuthenticationServiceUrl({\n protoPath: '/v2/change-password',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __changePassword;\n}\n\n/**\n * Authenticates a member without credentials and returns a session token.\n *\n * This method provides authentication that automatically creates or updates\n * member accounts as needed during the authentication process.\n * Use this only for trusted integrations and scenarios where you already have verified user information.\n */\nexport function signOn(payload: object): RequestOptionsFactory<any> {\n function __signOn({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: TRANSFORM_PATHS_0,\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: TRANSFORM_PATHS_1,\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.iam.authentication.v1.authentication',\n method: 'POST' as any,\n methodFqn: 'wix.iam.authentication.v1.AuthenticationService.SignOn',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixIamAuthenticationV1AuthenticationServiceUrl({\n protoPath: '/v2/sign-on',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: TRANSFORM_PATHS_4,\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: TRANSFORM_PATHS_5,\n },\n ]),\n };\n\n return metadata;\n }\n\n return __signOn;\n}\n\n/**\n * Terminates the member's session and clears authentication cookies.\n *\n * Returns the following:\n * - `body`: HTML content for the logout response\n * - `statusCode`: HTTP status code (200 for success, 302 for redirect)\n * - `headers`: Array of key-value pairs including:\n * - `Set-Cookie` headers to remove all session cookies\n * - `Location` header (when `postLogoutRedirectUri` is provided, with 302 status)\n */\nexport function logout(payload: object): RequestOptionsFactory<any> {\n function __logout({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.iam.authentication.v1.authentication',\n method: 'GET' as any,\n methodFqn: 'wix.iam.authentication.v1.AuthenticationService.Logout',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixIamAuthenticationV1AuthenticationServiceUrl({\n protoPath: '/v1/logout',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTBytesToSDKBytes,\n paths: TRANSFORM_PATHS_6,\n },\n ]),\n };\n\n return metadata;\n }\n\n return __logout;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n LoginId,\n LoginV2ApplicationErrors,\n LoginV2Options,\n LoginV2ValidationErrors,\n LogoutOptions,\n RawHttpResponse,\n RegisterV2ApplicationErrors,\n RegisterV2Options,\n RegisterV2ValidationErrors,\n SignOnOptions,\n SignOnResponse,\n StateMachineResponse,\n ValidateEmailResponse,\n changePassword as universalChangePassword,\n loginV2 as universalLoginV2,\n logout as universalLogout,\n registerV2 as universalRegisterV2,\n signOn as universalSignOn,\n validateEmail as universalValidateEmail,\n} from './iam-authentication-v1-authentication-authentication.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/identity' };\n\nexport function registerV2(httpClient: HttpClient): RegisterV2Signature {\n return (loginId: LoginId, options?: RegisterV2Options) =>\n universalRegisterV2(\n loginId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface RegisterV2Signature {\n /**\n * Registers a new member.\n *\n * Typically, after a successful registration, you generate and use member tokens for the\n * registered member so that subsequent API calls are called as part of a member session.\n * Use the `sessionToken` in the response to [get the site member's access and refresh tokens](https://dev.wix.com/docs/go-headless/coding/rest-api/visitors-and-members/handle-members-with-custom-login#get-the-site-members-access-and-refresh-tokens).\n *\n * If the email used to register the member already exists as a contact email, the registering\n * member need to verify the email address using a code that is sent to the address.\n * @param - Identifier of the registering member.\n */\n (loginId: LoginId, options?: RegisterV2Options): Promise<\n NonNullablePaths<\n StateMachineResponse,\n | `state`\n | `identity.connections`\n | `identity.connections.${number}.idpConnection.idpConnectionId`\n | `identity.connections.${number}.idpConnection.idpUserId`\n | `identity.connections.${number}.authenticatorConnection.authenticatorConnectionId`\n | `identity.connections.${number}.authenticatorConnection.reEnrollmentRequired`\n | `identity.identityProfile.emails`\n | `identity.identityProfile.phones`\n | `identity.identityProfile.labels`\n | `identity.identityProfile.privacyStatus`\n | `identity.identityProfile.customFields`\n | `identity.identityProfile.customFields.${number}.name`\n | `identity.identityProfile.customFields.${number}.value.strValue`\n | `identity.identityProfile.customFields.${number}.value.numValue`\n | `identity.identityProfile.customFields.${number}.value.boolValue`\n | `identity.identityProfile.secondaryEmails`\n | `identity.identityProfile.secondaryEmails.${number}.email`\n | `identity.identityProfile.secondaryEmails.${number}.tag`\n | `identity.identityProfile.phonesV2`\n | `identity.identityProfile.phonesV2.${number}.phone`\n | `identity.identityProfile.phonesV2.${number}.tag`\n | `identity.identityProfile.addresses`\n | `identity.identityProfile.addresses.${number}.tag`\n | `identity.email.address`\n | `identity.email.isVerified`\n | `identity.status.name`\n | `identity.status.reasons`\n | `identity.factors`\n | `identity.factors.${number}.factorId`\n | `identity.factors.${number}.type`\n | `identity.factors.${number}.status`,\n 5\n > & {\n __applicationErrorsType?: RegisterV2ApplicationErrors;\n __validationErrorsType?: RegisterV2ValidationErrors;\n }\n >;\n}\n\nexport function validateEmail(httpClient: HttpClient): ValidateEmailSignature {\n return (email: string) =>\n universalValidateEmail(\n email,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ValidateEmailSignature {\n /** */\n (email: string): Promise<\n NonNullablePaths<\n ValidateEmailResponse,\n `valid` | `failure.reason` | `formatInvalid`,\n 1\n >\n >;\n}\n\nexport function loginV2(httpClient: HttpClient): LoginV2Signature {\n return (loginId: LoginId, options?: LoginV2Options) =>\n universalLoginV2(\n loginId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface LoginV2Signature {\n /**\n * Logs in an existing member.\n *\n * Typically, after a successful login, you generate and use member tokens for the\n * logged-in member so that subsequent API calls are called as part of a member session.\n * Use the `sessionToken` in the response to [get the site member's access and refresh tokens](https://dev.wix.com/docs/go-headless/coding/rest-api/visitors-and-members/handle-members-with-custom-login#get-the-site-members-access-and-refresh-tokens).\n * @param - Identifier of identity logging in.\n */\n (loginId: LoginId, options?: LoginV2Options): Promise<\n NonNullablePaths<\n StateMachineResponse,\n | `state`\n | `identity.connections`\n | `identity.connections.${number}.idpConnection.idpConnectionId`\n | `identity.connections.${number}.idpConnection.idpUserId`\n | `identity.connections.${number}.authenticatorConnection.authenticatorConnectionId`\n | `identity.connections.${number}.authenticatorConnection.reEnrollmentRequired`\n | `identity.identityProfile.emails`\n | `identity.identityProfile.phones`\n | `identity.identityProfile.labels`\n | `identity.identityProfile.privacyStatus`\n | `identity.identityProfile.customFields`\n | `identity.identityProfile.customFields.${number}.name`\n | `identity.identityProfile.customFields.${number}.value.strValue`\n | `identity.identityProfile.customFields.${number}.value.numValue`\n | `identity.identityProfile.customFields.${number}.value.boolValue`\n | `identity.identityProfile.secondaryEmails`\n | `identity.identityProfile.secondaryEmails.${number}.email`\n | `identity.identityProfile.secondaryEmails.${number}.tag`\n | `identity.identityProfile.phonesV2`\n | `identity.identityProfile.phonesV2.${number}.phone`\n | `identity.identityProfile.phonesV2.${number}.tag`\n | `identity.identityProfile.addresses`\n | `identity.identityProfile.addresses.${number}.tag`\n | `identity.email.address`\n | `identity.email.isVerified`\n | `identity.status.name`\n | `identity.status.reasons`\n | `identity.factors`\n | `identity.factors.${number}.factorId`\n | `identity.factors.${number}.type`\n | `identity.factors.${number}.status`,\n 5\n > & {\n __applicationErrorsType?: LoginV2ApplicationErrors;\n __validationErrorsType?: LoginV2ValidationErrors;\n }\n >;\n}\n\nexport function changePassword(\n httpClient: HttpClient\n): ChangePasswordSignature {\n return (newPassword: string) =>\n universalChangePassword(\n newPassword,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ChangePasswordSignature {\n /**\n * Changes the password of a logged-in member. The member must have a valid session to use this method.\n *\n * The member's session remains valid after password change.\n *\n * The new password must meet the site's configured password requirements for length\n * and complexity. These requirements are enforced automatically when processing the request.\n * @param - New password to set for the logged-in member.\n *\n * The password must meet the site's configured password requirements for length and complexity.\n */\n (newPassword: string): Promise<void>;\n}\n\nexport function signOn(httpClient: HttpClient): SignOnSignature {\n return (loginId: LoginId, options?: SignOnOptions) =>\n universalSignOn(\n loginId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface SignOnSignature {\n /**\n * Authenticates a member without credentials and returns a session token.\n *\n * This method provides authentication that automatically creates or updates\n * member accounts as needed during the authentication process.\n * Use this only for trusted integrations and scenarios where you already have verified user information.\n * @param - Member identifier for authentication.\n *\n * Currently only email addresses are supported.\n */\n (loginId: LoginId, options?: SignOnOptions): Promise<\n NonNullablePaths<\n SignOnResponse,\n | `sessionToken`\n | `identity.connections`\n | `identity.connections.${number}.idpConnection.idpConnectionId`\n | `identity.connections.${number}.idpConnection.idpUserId`\n | `identity.connections.${number}.authenticatorConnection.authenticatorConnectionId`\n | `identity.connections.${number}.authenticatorConnection.reEnrollmentRequired`\n | `identity.identityProfile.emails`\n | `identity.identityProfile.phones`\n | `identity.identityProfile.labels`\n | `identity.identityProfile.privacyStatus`\n | `identity.identityProfile.customFields`\n | `identity.identityProfile.customFields.${number}.name`\n | `identity.identityProfile.customFields.${number}.value.strValue`\n | `identity.identityProfile.customFields.${number}.value.numValue`\n | `identity.identityProfile.customFields.${number}.value.boolValue`\n | `identity.identityProfile.secondaryEmails`\n | `identity.identityProfile.secondaryEmails.${number}.email`\n | `identity.identityProfile.secondaryEmails.${number}.tag`\n | `identity.identityProfile.phonesV2`\n | `identity.identityProfile.phonesV2.${number}.phone`\n | `identity.identityProfile.phonesV2.${number}.tag`\n | `identity.identityProfile.addresses`\n | `identity.identityProfile.addresses.${number}.tag`\n | `identity.email.address`\n | `identity.email.isVerified`\n | `identity.status.name`\n | `identity.status.reasons`\n | `identity.factors`\n | `identity.factors.${number}.factorId`\n | `identity.factors.${number}.type`\n | `identity.factors.${number}.status`,\n 5\n >\n >;\n}\n\nexport function logout(httpClient: HttpClient): LogoutSignature {\n return (options?: LogoutOptions) =>\n universalLogout(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface LogoutSignature {\n /**\n * Terminates the member's session and clears authentication cookies.\n *\n * Returns the following:\n * - `body`: HTML content for the logout response\n * - `statusCode`: HTTP status code (200 for success, 302 for redirect)\n * - `headers`: Array of key-value pairs including:\n * - `Set-Cookie` headers to remove all session cookies\n * - `Location` header (when `postLogoutRedirectUri` is provided, with 302 status)\n */\n (options?: LogoutOptions): Promise<\n NonNullablePaths<\n RawHttpResponse,\n `body` | `headers` | `headers.${number}.key` | `headers.${number}.value`,\n 2\n >\n >;\n}\n\nexport {\n Address,\n AddressTag,\n AddressWrapper,\n Authentication,\n AuthenticatorConnection,\n CallVerifyData,\n CaptchaToken,\n CaptchaTokenTokenOneOf,\n ChangePasswordRequest,\n ChangePasswordResponse,\n ConnectIdpRequest,\n Connection,\n ConnectionTypeOneOf,\n CustomField,\n CustomValue,\n CustomValueValueOneOf,\n DeliveryMethod,\n Email,\n EmailTag,\n EmailValidationFailure,\n ExternalEmailVerifyData,\n Factor,\n FactorStatus,\n FactorType,\n GetWebauthnChallengeRequest,\n GetWebauthnChallengeResponse,\n HeadersEntry,\n Identity,\n IdentityProfile,\n IdpConnection,\n ListValue,\n LoginCallbackRequest,\n LoginId,\n LoginIdTypeOneOf,\n LoginV2Options,\n LoginV2Request,\n LoginWithIdpConnectionRedirectRequest,\n LoginWithIdpConnectionRequest,\n LoginWithIdpConnectionTokenParamsRequest,\n LogoutOptions,\n LogoutRequest,\n MapValue,\n Metadata,\n MfaChallengeData,\n MfaReason,\n PasswordVerifyData,\n PathParametersEntry,\n Phone,\n PhoneTag,\n PrivacyStatus,\n PushChallengeData,\n PushVerifyData,\n QueryParametersEntry,\n RawHttpRequest,\n RawHttpResponse,\n Reason,\n RecaptchaForClientSiteKey,\n RecoveryCodeVerifyData,\n RegisterV2Options,\n RegisterV2Request,\n RequireMfaData,\n SecondaryEmail,\n SignOnOptions,\n SignOnRequest,\n SignOnResponse,\n SmsVerifyData,\n StateMachineResponse,\n StateMachineResponseStateDataOneOf,\n StateType,\n Status,\n StatusName,\n StatusV2,\n TenantType,\n TotpVerifyData,\n V1CustomValue,\n V1CustomValueValueOneOf,\n V1Factor,\n V1ListValue,\n V1MapValue,\n V1Reason,\n ValidateEmailRequest,\n ValidateEmailResponse,\n VerificationChallenge,\n VerificationChallengeFactorChallengeDataOneOf,\n VerifyRequest,\n VerifyRequestFactorDataOneOf,\n WebAuthnChallengeData,\n WebAuthnVerifyData,\n} from './iam-authentication-v1-authentication-authentication.universal.js';\n","import {\n registerV2 as publicRegisterV2,\n validateEmail as publicValidateEmail,\n loginV2 as publicLoginV2,\n changePassword as publicChangePassword,\n signOn as publicSignOn,\n logout as publicLogout,\n} from './iam-authentication-v1-authentication-authentication.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const registerV2: MaybeContext<\n BuildRESTFunction<typeof publicRegisterV2> & typeof publicRegisterV2\n> = /*#__PURE__*/ createRESTModule(publicRegisterV2);\nexport const validateEmail: MaybeContext<\n BuildRESTFunction<typeof publicValidateEmail> & typeof publicValidateEmail\n> = /*#__PURE__*/ createRESTModule(publicValidateEmail);\nexport const loginV2: MaybeContext<\n BuildRESTFunction<typeof publicLoginV2> & typeof publicLoginV2\n> = /*#__PURE__*/ createRESTModule(publicLoginV2);\nexport const changePassword: MaybeContext<\n BuildRESTFunction<typeof publicChangePassword> & typeof publicChangePassword\n> = /*#__PURE__*/ createRESTModule(publicChangePassword);\nexport const signOn: MaybeContext<\n BuildRESTFunction<typeof publicSignOn> & typeof publicSignOn\n> = /*#__PURE__*/ createRESTModule(publicSignOn);\nexport const logout: MaybeContext<\n BuildRESTFunction<typeof publicLogout> & typeof publicLogout\n> = /*#__PURE__*/ createRESTModule(publicLogout);\n\nexport {\n PrivacyStatus,\n EmailTag,\n PhoneTag,\n AddressTag,\n FactorType,\n StateType,\n StatusName,\n V1Reason,\n Status,\n FactorStatus,\n MfaReason,\n Reason,\n TenantType,\n DeliveryMethod,\n} from './iam-authentication-v1-authentication-authentication.universal.js';\nexport {\n Authentication,\n RegisterV2Request,\n LoginId,\n LoginIdTypeOneOf,\n IdentityProfile,\n CustomField,\n V1CustomValue,\n V1CustomValueValueOneOf,\n V1ListValue,\n V1MapValue,\n SecondaryEmail,\n Phone,\n AddressWrapper,\n Address,\n CaptchaToken,\n CaptchaTokenTokenOneOf,\n RecaptchaForClientSiteKey,\n StateMachineResponse,\n StateMachineResponseStateDataOneOf,\n Identity,\n Connection,\n ConnectionTypeOneOf,\n IdpConnection,\n AuthenticatorConnection,\n Metadata,\n Email,\n StatusV2,\n Factor,\n CustomValue,\n CustomValueValueOneOf,\n ListValue,\n MapValue,\n RequireMfaData,\n V1Factor,\n MfaChallengeData,\n VerificationChallenge,\n VerificationChallengeFactorChallengeDataOneOf,\n PushChallengeData,\n WebAuthnChallengeData,\n ValidateEmailRequest,\n ValidateEmailResponse,\n EmailValidationFailure,\n LoginV2Request,\n WebAuthnVerifyData,\n ExternalEmailVerifyData,\n ChangePasswordRequest,\n ChangePasswordResponse,\n LoginWithIdpConnectionRequest,\n RawHttpResponse,\n HeadersEntry,\n RawHttpRequest,\n PathParametersEntry,\n QueryParametersEntry,\n LoginWithIdpConnectionRedirectRequest,\n ConnectIdpRequest,\n LoginCallbackRequest,\n LoginWithIdpConnectionTokenParamsRequest,\n SignOnRequest,\n SignOnResponse,\n LogoutRequest,\n VerifyRequest,\n VerifyRequestFactorDataOneOf,\n SmsVerifyData,\n CallVerifyData,\n TotpVerifyData,\n PushVerifyData,\n RecoveryCodeVerifyData,\n PasswordVerifyData,\n GetWebauthnChallengeRequest,\n GetWebauthnChallengeResponse,\n RegisterV2Options,\n LoginV2Options,\n SignOnOptions,\n LogoutOptions,\n} from './iam-authentication-v1-authentication-authentication.universal.js';\nexport {\n PrivacyStatusWithLiterals,\n EmailTagWithLiterals,\n PhoneTagWithLiterals,\n AddressTagWithLiterals,\n FactorTypeWithLiterals,\n StateTypeWithLiterals,\n StatusNameWithLiterals,\n V1ReasonWithLiterals,\n StatusWithLiterals,\n FactorStatusWithLiterals,\n MfaReasonWithLiterals,\n ReasonWithLiterals,\n TenantTypeWithLiterals,\n DeliveryMethodWithLiterals,\n RegisterV2ApplicationErrors,\n RegisterV2ValidationErrors,\n LoginV2ApplicationErrors,\n LoginV2ValidationErrors,\n} from './iam-authentication-v1-authentication-authentication.universal.js';\n"],"mappings":";AAAA,SAAS,kBAAkB,yBAAyB;AACpD;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACJP,SAAS,yBAAyB;AAClC,SAAS,oCAAoC;AAC7C,SAAS,oCAAoC;AAC7C,SAAS,oCAAoC;AAC7C,SAAS,4CAA4C;AACrD,SAAS,4CAA4C;AACrD,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAI3B,IAAM,oBAAoB,CAAC,EAAE,MAAM,sCAAsC,CAAC;AAC1E,IAAM,oBAAoB,CAAC,EAAE,MAAM,uCAAuC,CAAC;AAC3E,IAAM,oBAAoB;AAAA,EACxB,EAAE,MAAM,uBAAuB;AAAA,EAC/B,EAAE,MAAM,uBAAuB;AAAA,EAC/B,EAAE,MAAM,wDAAwD;AAAA,EAChE,EAAE,MAAM,6BAA6B;AACvC;AACA,IAAM,oBAAoB;AAAA,EACxB,EAAE,MAAM,uDAAuD;AAAA,EAC/D,EAAE,MAAM,4BAA4B;AACtC;AACA,IAAM,oBAAoB;AAAA,EACxB,EAAE,MAAM,uBAAuB;AAAA,EAC/B,EAAE,MAAM,uBAAuB;AAAA,EAC/B,EAAE,MAAM,wDAAwD;AAClE;AACA,IAAM,oBAAoB;AAAA,EACxB,EAAE,MAAM,uDAAuD;AACjE;AACA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AA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAaO,SAASC,SAAQ,YAA0C;AAChE,SAAO,CAAC,SAAkB,YACxBA;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAqDO,SAASC,gBACd,YACyB;AACzB,SAAO,CAAC,gBACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAiBO,SAASC,QAAO,YAAyC;AAC9D,SAAO,CAAC,SAAkB,YACxBA;AAAA,IACE;AAAA,IACA;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAoDO,SAASC,QAAO,YAAyC;AAC9D,SAAO,CAAC,YACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;AC/PA,SAAS,wBAAwB;AAG1B,IAAMC,cAEK,iCAAiBA,WAAgB;AAC5C,IAAMC,iBAEK,iCAAiBA,cAAmB;AAC/C,IAAMC,WAEK,iCAAiBA,QAAa;AACzC,IAAMC,kBAEK,iCAAiBA,eAAoB;AAChD,IAAMC,UAEK,iCAAiBA,OAAY;AACxC,IAAMC,UAEK,iCAAiBA,OAAY;","names":["payload","transformPaths","TRANSFORM_PATHS_0","TRANSFORM_PATHS_1","PrivacyStatus","EmailTag","PhoneTag","AddressTag","FactorType","StateType","StatusName","V1Reason","Status","FactorStatus","MfaReason","Reason","TenantType","DeliveryMethod","registerV2","validateEmail","loginV2","changePassword","signOn","logout","registerV2","validateEmail","loginV2","changePassword","signOn","logout","registerV2","validateEmail","loginV2","changePassword","signOn","logout"]}
1
+ {"version":3,"sources":["../../src/iam-authentication-v1-authentication-authentication.universal.ts","../../src/iam-authentication-v1-authentication-authentication.http.ts","../../src/iam-authentication-v1-authentication-authentication.public.ts","../../src/iam-authentication-v1-authentication-authentication.context.ts"],"sourcesContent":["import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixIamAuthenticationV1Authentication from './iam-authentication-v1-authentication-authentication.http.js';\nimport { transformSDKAddressToRESTAddress } from '@wix/sdk-runtime/transformations/address';\nimport { transformRESTAddressToSDKAddress } from '@wix/sdk-runtime/transformations/address';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\n\nconst TRANSFORM_PATHS_0 = [{ path: 'profile.addresses.address' }];\nconst TRANSFORM_PATHS_1 = [\n { path: 'identity.identityProfile.addresses.address' },\n];\n\nexport interface Authentication {}\n\nexport interface RegisterV2Request {\n /** Identifier of the registering member. */\n loginId: LoginId;\n /** Password of the registering member. */\n password?: string;\n /** Profile information of registering member. */\n profile?: IdentityProfile;\n /** CAPTCHA tokens, when CAPTCHA setting is on. */\n captchaTokens?: CaptchaToken[];\n /** Additional data that's relevant for the flow. */\n clientMetaData?: Record<string, any> | null;\n /**\n * The factor to register with: `PASSWORD`, the default, or `EMAIL`, which sends a code and returns\n * `REQUIRE_REGISTER_CHALLENGE` until the code is submitted to `Verify`.\n */\n factorType?: FactorTypeWithLiterals;\n /**\n * ID of the organization the user registers into. The new user's account is created as a sub-account of this organization.\n * @format GUID\n */\n organizationId?: string | null;\n}\n\nexport interface LoginId extends LoginIdTypeOneOf {\n /**\n * Login email address.\n * @format EMAIL\n */\n email?: string;\n}\n\n/** @oneof */\nexport interface LoginIdTypeOneOf {\n /**\n * Login email address.\n * @format EMAIL\n */\n email?: string;\n}\n\nexport interface IdentityProfile {\n /** Member's first name. */\n firstName?: string | null;\n /** Member's last name. */\n lastName?: string | null;\n /** Member's display nickname. */\n nickname?: string | null;\n /** URL to member's profile picture. */\n picture?: string | null;\n /**\n * Deprecated. Use `secondaryEmails` instead.\n * @deprecated Deprecated. Use `secondaryEmails` instead.\n * @replacedBy secondary_emails\n * @targetRemovalDate 2023-11-01\n */\n emails?: string[];\n /**\n * Deprecated. Use `phonesV2` instead.\n * @deprecated Deprecated. Use `phonesV2` instead.\n * @replacedBy phones_v2\n * @targetRemovalDate 2023-11-01\n */\n phones?: string[];\n /**\n * Labels associated with the member.\n * @maxSize 2000\n */\n labels?: string[];\n /**\n * Member's preferred language code.\n * @format LANGUAGE\n */\n language?: string | null;\n /** Member's profile visibility setting. */\n privacyStatus?: PrivacyStatusWithLiterals;\n /**\n * Any number of custom fields. [Custom fields](https://support.wix.com/en/article/adding-custom-fields-to-contacts)\n * are used to store additional information about your site or app's contacts.\n */\n customFields?: CustomField[];\n /** Additional email addresses for the member. */\n secondaryEmails?: SecondaryEmail[];\n /** Phone numbers associated with the member. */\n phonesV2?: Phone[];\n /** Physical addresses for the member. */\n addresses?: AddressWrapper[];\n /**\n * Company name.\n * @maxLength 1000\n */\n company?: string | null;\n /**\n * Position within company.\n * @maxLength 1000\n */\n position?: string | null;\n /**\n * Member's birth date in `YYYY-MM-DD` format.\n * @format LOCAL_DATE\n */\n birthdate?: string | null;\n /**\n * URL-friendly slug for the member's profile.\n * @maxLength 255\n */\n slug?: string | null;\n /** Whether the member consents to receive marketing communications. */\n subscription?: boolean | null;\n /**\n * Tax ID or VAT number for personal or corporate use.\n * @maxLength 1000\n */\n vatId?: string | null;\n}\n\nexport enum PrivacyStatus {\n /** No privacy status defined. */\n UNDEFINED = 'UNDEFINED',\n /** Profile details are visible to other members. */\n PUBLIC = 'PUBLIC',\n /** Profile details are hidden from other members. */\n PRIVATE = 'PRIVATE',\n}\n\n/** @enumType */\nexport type PrivacyStatusWithLiterals =\n | PrivacyStatus\n | 'UNDEFINED'\n | 'PUBLIC'\n | 'PRIVATE';\n\nexport interface CustomField {\n /**\n * Custom field name matching an extended field key (without `custom.` prefix).\n *\n * Must match a key from [`List Extended Fields`](https://dev.wix.com/docs/rest/api-reference/contacts/extended-fields/list-extended-fields).\n */\n name?: string;\n /** Value for the custom field. */\n value?: V1CustomValue;\n}\n\nexport interface V1CustomValue extends V1CustomValueValueOneOf {\n /** Text value. */\n strValue?: string;\n /** Numeric value. */\n numValue?: number;\n /** Date/time value. */\n dateValue?: Date | null;\n /** List of values. */\n listValue?: V1ListValue;\n /** Key-value pairs. */\n mapValue?: V1MapValue;\n /** Bool value */\n boolValue?: boolean;\n}\n\n/** @oneof */\nexport interface V1CustomValueValueOneOf {\n /** Text value. */\n strValue?: string;\n /** Numeric value. */\n numValue?: number;\n /** Date/time value. */\n dateValue?: Date | null;\n /** List of values. */\n listValue?: V1ListValue;\n /** Key-value pairs. */\n mapValue?: V1MapValue;\n /** Bool value */\n boolValue?: boolean;\n}\n\nexport interface V1ListValue {\n /** List of custom values. */\n value?: V1CustomValue[];\n}\n\nexport interface V1MapValue {\n /** Map of custom field values. */\n value?: Record<string, V1CustomValue>;\n}\n\nexport interface SecondaryEmail {\n /**\n * Secondary email address.\n * @format EMAIL\n */\n email?: string;\n /** Email tag. */\n tag?: EmailTagWithLiterals;\n}\n\nexport enum EmailTag {\n UNTAGGED = 'UNTAGGED',\n MAIN = 'MAIN',\n HOME = 'HOME',\n WORK = 'WORK',\n}\n\n/** @enumType */\nexport type EmailTagWithLiterals =\n | EmailTag\n | 'UNTAGGED'\n | 'MAIN'\n | 'HOME'\n | 'WORK';\n\nexport interface Phone {\n /**\n * Country code for the phone number.\n * @format COUNTRY\n */\n countryCode?: string | null;\n /**\n * Phone number without country code.\n * @format PHONE\n */\n phone?: string;\n /** Phone tag. */\n tag?: PhoneTagWithLiterals;\n}\n\nexport enum PhoneTag {\n UNTAGGED = 'UNTAGGED',\n MAIN = 'MAIN',\n HOME = 'HOME',\n MOBILE = 'MOBILE',\n WORK = 'WORK',\n FAX = 'FAX',\n}\n\n/** @enumType */\nexport type PhoneTagWithLiterals =\n | PhoneTag\n | 'UNTAGGED'\n | 'MAIN'\n | 'HOME'\n | 'MOBILE'\n | 'WORK'\n | 'FAX';\n\nexport interface AddressWrapper {\n /** Physical address details. */\n address?: Address;\n /** Address tag. */\n tag?: AddressTagWithLiterals;\n}\n\n/** Physical address */\nexport interface Address {\n /**\n * Country code.\n * @format COUNTRY\n */\n country?: string | null;\n /** Subdivision. Usually a state, region, prefecture, or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2). */\n subdivision?: string | null;\n /** City name. */\n city?: string | null;\n /** Zip/postal code. */\n postalCode?: string | null;\n /** Main address line, usually street and number as free text. */\n addressLine1?: string | null;\n /** Free text providing more detailed address info. Usually contains apartment, suite, and floor. */\n addressLine2?: string | null;\n /**\n * A string containing the full address of this location.\n * @internal\n */\n formatted?: string | null;\n}\n\nexport enum AddressTag {\n UNTAGGED = 'UNTAGGED',\n HOME = 'HOME',\n WORK = 'WORK',\n BILLING = 'BILLING',\n SHIPPING = 'SHIPPING',\n}\n\n/** @enumType */\nexport type AddressTagWithLiterals =\n | AddressTag\n | 'UNTAGGED'\n | 'HOME'\n | 'WORK'\n | 'BILLING'\n | 'SHIPPING';\n\nexport interface CaptchaToken extends CaptchaTokenTokenOneOf {\n /** @maxLength 5000 */\n Recaptcha?: string;\n /** @maxLength 5000 */\n InvisibleRecaptcha?: string;\n /** @maxLength 5000 */\n NoCaptcha?: string;\n /** Use this when the client has registered their own reCAPTCHA site key (e.g., branded apps, headless apps). */\n recaptchaForClientSiteKey?: RecaptchaForClientSiteKey;\n}\n\n/** @oneof */\nexport interface CaptchaTokenTokenOneOf {\n /** @maxLength 5000 */\n Recaptcha?: string;\n /** @maxLength 5000 */\n InvisibleRecaptcha?: string;\n /** @maxLength 5000 */\n NoCaptcha?: string;\n /** Use this when the client has registered their own reCAPTCHA site key (e.g., branded apps, headless apps). */\n recaptchaForClientSiteKey?: RecaptchaForClientSiteKey;\n}\n\n/** reCAPTCHA token with a client-provided site key ID. */\nexport interface RecaptchaForClientSiteKey {\n /**\n * The reCAPTCHA token obtained from the client-side reCAPTCHA widget.\n * @maxLength 5000\n */\n token?: string;\n /**\n * The site key ID registered in ReCAPTCHA service SDL for this client's reCAPTCHA configuration.\n * @format GUID\n */\n siteKeyId?: string;\n}\n\nexport enum FactorType {\n /** Requires a password. */\n PASSWORD = 'PASSWORD',\n /** Requires a code sent via SMS. */\n SMS = 'SMS',\n /** Requires a code sent by phone call. */\n CALL = 'CALL',\n /** Requires a code sent by email. */\n EMAIL = 'EMAIL',\n /** Requires authentication via an authenticator app. */\n TOTP = 'TOTP',\n /** Requires authentication via a push notification. */\n PUSH = 'PUSH',\n /** Requires authentication via WebAuthn/passkey. */\n WEBAUTHN = 'WEBAUTHN',\n /** Requires a recovery code. */\n RECOVERY_CODE = 'RECOVERY_CODE',\n}\n\n/** @enumType */\nexport type FactorTypeWithLiterals =\n | FactorType\n | 'PASSWORD'\n | 'SMS'\n | 'CALL'\n | 'EMAIL'\n | 'TOTP'\n | 'PUSH'\n | 'WEBAUTHN'\n | 'RECOVERY_CODE';\n\nexport interface StateMachineResponse\n extends StateMachineResponseStateDataOneOf {\n /** @internal */\n requireMfaData?: RequireMfaData;\n /**\n * User needs to solve an MFA challenge, such as providing the code that sent to them by SMS.\n * @internal\n */\n mfaChallengeData?: MfaChallengeData;\n /** Current state of the login or registration process. */\n state?: StateTypeWithLiterals;\n /** Session token. If `state` is not `SUCCESS`, this field is undefined. */\n sessionToken?: string | null;\n /** Token that represents the current state of the login or registration process. */\n stateToken?: string | null;\n /** Identity of the current member. */\n identity?: Identity;\n /** Additional data relevant to the login or registration process. */\n additionalData?: Record<string, CustomValue>;\n}\n\n/** @oneof */\nexport interface StateMachineResponseStateDataOneOf {\n /** @internal */\n requireMfaData?: RequireMfaData;\n /**\n * User needs to solve an MFA challenge, such as providing the code that sent to them by SMS.\n * @internal\n */\n mfaChallengeData?: MfaChallengeData;\n}\n\nexport enum StateType {\n /** Initial unknown state. */\n UNKNOWN_STATE = 'UNKNOWN_STATE',\n /** Login completed successfully. */\n SUCCESS = 'SUCCESS',\n /** Member needs the owner to approve their registration. */\n REQUIRE_OWNER_APPROVAL = 'REQUIRE_OWNER_APPROVAL',\n /** Member needs to verify their email. */\n REQUIRE_EMAIL_VERIFICATION = 'REQUIRE_EMAIL_VERIFICATION',\n /** The `status` is not one that prevents the member logging in, meaning it's not `OFFLINE`, `BLOCKED`, or `DELETED`. */\n STATUS_CHECK = 'STATUS_CHECK',\n /**\n * Multi-factor authentication is required to complete login.\n * @internal\n */\n REQUIRE_MFA = 'REQUIRE_MFA',\n /**\n * Indicates that the member needs to verify themselves using the selected verication factor type.\n * @internal\n */\n MFA_CHALLENGE = 'MFA_CHALLENGE',\n /**\n * User needs to provide the first factor authentication (e.g., password, webAuthN).\n * @internal\n */\n REQUIRE_FIRST_FACTOR = 'REQUIRE_FIRST_FACTOR',\n /** Member must submit the profile-completion form to continue registration. */\n REQUIRE_PROFILE_COMPLETION = 'REQUIRE_PROFILE_COMPLETION',\n /**\n * Registering identity must prove their sign-up factor (e.g. an emailed code) before the identity is created.\n * @internal\n */\n REQUIRE_REGISTER_CHALLENGE = 'REQUIRE_REGISTER_CHALLENGE',\n /**\n * Identity logging in must enter the code sent to their email before the login continues.\n * @internal\n */\n REQUIRE_LOGIN_CHALLENGE = 'REQUIRE_LOGIN_CHALLENGE',\n}\n\n/** @enumType */\nexport type StateTypeWithLiterals =\n | StateType\n | 'UNKNOWN_STATE'\n | 'SUCCESS'\n | 'REQUIRE_OWNER_APPROVAL'\n | 'REQUIRE_EMAIL_VERIFICATION'\n | 'STATUS_CHECK'\n | 'REQUIRE_PROFILE_COMPLETION';\n\nexport interface Identity {\n /**\n * Identity ID.\n * @format GUID\n */\n _id?: string | null;\n /**\n * Revision number, which increments by 1 each time the identity is updated.\n * To prevent conflicting changes,\n * the current revision must be passed when updating the identity.\n *\n * Ignored when creating an identity.\n */\n revision?: string | null;\n /**\n * Date and time the identity was created.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the identity was updated.\n * @readonly\n */\n _updatedDate?: Date | null;\n /** The identity configured connections to authenticate with. */\n connections?: Connection[];\n /** Identity profile. */\n identityProfile?: IdentityProfile;\n /**\n * Additional information about the identity that can impact user access.\n * This data cannot be set.\n */\n metadata?: Metadata;\n /** Identity email address. */\n email?: Email;\n /** Identity's current status. */\n status?: StatusV2;\n /**\n * Custom attributes.\n * @internal\n */\n customAttributes?: Record<string, any> | null;\n /**\n * Identity verification factors.\n * @maxSize 10\n * @readonly\n */\n factors?: Factor[];\n}\n\nexport interface Connection extends ConnectionTypeOneOf {\n /** IDP connection. */\n idpConnection?: IdpConnection;\n /** Authenticator connection. */\n authenticatorConnection?: AuthenticatorConnection;\n}\n\n/** @oneof */\nexport interface ConnectionTypeOneOf {\n /** IDP connection. */\n idpConnection?: IdpConnection;\n /** Authenticator connection. */\n authenticatorConnection?: AuthenticatorConnection;\n}\n\nexport interface IdpConnection {\n /**\n * IDP connection ID.\n * @format GUID\n */\n idpConnectionId?: string;\n /** IDP user ID. */\n idpUserId?: string;\n}\n\nexport interface AuthenticatorConnection {\n /**\n * Authenticator connection ID.\n * @format GUID\n */\n authenticatorConnectionId?: string;\n /** Whether re-enrollment is required. */\n reEnrollmentRequired?: boolean;\n}\n\nexport interface Metadata {\n /**\n * General tags. For example, `\"isOwner\"`.\n * @internal\n * @readonly\n */\n tags?: string[];\n}\n\nexport interface Email {\n /**\n * Email address.\n * @format EMAIL\n */\n address?: string;\n /** Whether the email address is verified. */\n isVerified?: boolean;\n}\n\nexport interface StatusV2 {\n /** Descriptive name of the identity status. */\n name?: StatusNameWithLiterals;\n /** Reasons for the current identity status. */\n reasons?: V1ReasonWithLiterals[];\n}\n\nexport enum StatusName {\n /** Unknown status. This value isn't used. */\n UNKNOWN_STATUS = 'UNKNOWN_STATUS',\n /** Identity is pending verification, owner approval, or both. */\n PENDING = 'PENDING',\n /** Identity is active and can log in. */\n ACTIVE = 'ACTIVE',\n /** Identity is deleted. This identity can't log in. */\n DELETED = 'DELETED',\n /** Identity is blocked. This identity can't log in. */\n BLOCKED = 'BLOCKED',\n /** Identity is offline. This identity can't log in. */\n OFFLINE = 'OFFLINE',\n}\n\n/** @enumType */\nexport type StatusNameWithLiterals =\n | StatusName\n | 'UNKNOWN_STATUS'\n | 'PENDING'\n | 'ACTIVE'\n | 'DELETED'\n | 'BLOCKED'\n | 'OFFLINE';\n\nexport enum V1Reason {\n /** Unknown reason. This value isn't used. */\n UNKNOWN_REASON = 'UNKNOWN_REASON',\n /** The identity is waiting for admin approval. After the approval, the identity has an `ACTIVE` status. */\n PENDING_ADMIN_APPROVAL_REQUIRED = 'PENDING_ADMIN_APPROVAL_REQUIRED',\n /** The identity has to verify the email. After the verification, the identity has an `ACTIVE` status. */\n PENDING_EMAIL_VERIFICATION_REQUIRED = 'PENDING_EMAIL_VERIFICATION_REQUIRED',\n /** The identity must complete the site's profile-completion form. Other pending requirements may remain after completion. */\n PENDING_PROFILE_COMPLETION_REQUIRED = 'PENDING_PROFILE_COMPLETION_REQUIRED',\n}\n\n/** @enumType */\nexport type V1ReasonWithLiterals =\n | V1Reason\n | 'UNKNOWN_REASON'\n | 'PENDING_ADMIN_APPROVAL_REQUIRED'\n | 'PENDING_EMAIL_VERIFICATION_REQUIRED'\n | 'PENDING_PROFILE_COMPLETION_REQUIRED';\n\nexport interface Factor {\n /**\n * Factor ID.\n * @format GUID\n */\n factorId?: string;\n /** Factor type. */\n type?: FactorTypeWithLiterals;\n /** Factor status. */\n status?: StatusWithLiterals;\n}\n\nexport enum Status {\n /** Factor requires activation. */\n INACTIVE = 'INACTIVE',\n /** Factor is active and can be used for authentication. */\n ACTIVE = 'ACTIVE',\n /** Factor is blocked and cannot be used for authentication. The user should reenroll the factor. */\n REQUIRE_REENROLL = 'REQUIRE_REENROLL',\n}\n\n/** @enumType */\nexport type StatusWithLiterals =\n | Status\n | 'INACTIVE'\n | 'ACTIVE'\n | 'REQUIRE_REENROLL';\n\nexport interface CustomValue extends CustomValueValueOneOf {\n /** String value. */\n strValue?: string;\n /** Number value. */\n numValue?: number;\n /** Date value. */\n dateValue?: Date | null;\n /** List value. */\n listValue?: ListValue;\n /** Map value. */\n mapValue?: MapValue;\n}\n\n/** @oneof */\nexport interface CustomValueValueOneOf {\n /** String value. */\n strValue?: string;\n /** Number value. */\n numValue?: number;\n /** Date value. */\n dateValue?: Date | null;\n /** List value. */\n listValue?: ListValue;\n /** Map value. */\n mapValue?: MapValue;\n}\n\nexport interface ListValue {\n /** Custom value. */\n value?: CustomValue[];\n}\n\nexport interface MapValue {\n /** Mapped custom value. */\n value?: Record<string, CustomValue>;\n}\n\nexport interface RequireMfaData {\n /**\n * The factors available for the user to perform the required MFA.\n * @maxSize 100\n */\n availableFactors?: V1Factor[];\n /** The reason the user is required to perform MFA. */\n reason?: MfaReasonWithLiterals;\n}\n\nexport interface V1Factor {\n /** Type of verification factor. */\n factorType?: FactorTypeWithLiterals;\n /** Availability status for second factor */\n factorStatus?: FactorStatusWithLiterals;\n}\n\nexport enum FactorStatus {\n ENABLED = 'ENABLED',\n REQUIRE_ACTIVATION = 'REQUIRE_ACTIVATION',\n REQUIRE_REENROLL = 'REQUIRE_REENROLL',\n ENABLED_BY_RULE = 'ENABLED_BY_RULE',\n DISABLED_BY_RULE = 'DISABLED_BY_RULE',\n}\n\n/** @enumType */\nexport type FactorStatusWithLiterals =\n | FactorStatus\n | 'ENABLED'\n | 'REQUIRE_ACTIVATION'\n | 'REQUIRE_REENROLL'\n | 'ENABLED_BY_RULE'\n | 'DISABLED_BY_RULE';\n\nexport enum MfaReason {\n /** Mfa is required due to user settings */\n USER_SETTINGS = 'USER_SETTINGS',\n /** Mfa is required due to high risk login */\n HIGH_RISK_LOGIN = 'HIGH_RISK_LOGIN',\n}\n\n/** @enumType */\nexport type MfaReasonWithLiterals =\n | MfaReason\n | 'USER_SETTINGS'\n | 'HIGH_RISK_LOGIN';\n\nexport interface MfaChallengeData {\n /** Type of verifation factor. */\n factorType?: FactorTypeWithLiterals;\n verificationChallengeData?: VerificationChallenge;\n /**\n * Factors types the user can choose from to verify themselves.\n * @maxSize 100\n */\n availableFactors?: V1Factor[];\n /** The reason the user is required for verification. */\n reason?: MfaReasonWithLiterals;\n}\n\nexport interface VerificationChallenge\n extends VerificationChallengeFactorChallengeDataOneOf {\n pushData?: PushChallengeData;\n webauthnData?: WebAuthnChallengeData;\n /** @maxLength 200 */\n hint?: string | null;\n}\n\n/** @oneof */\nexport interface VerificationChallengeFactorChallengeDataOneOf {\n pushData?: PushChallengeData;\n webauthnData?: WebAuthnChallengeData;\n}\n\nexport interface PushChallengeData {\n /**\n * This should be tied to a specific push notification.\n * It will be sent in subsequent requests to verify the factor.\n * @maxLength 36\n */\n transactionId?: string;\n}\n\nexport interface WebAuthnChallengeData {\n /**\n * A unique identifier for this challenge that will be used to correlate\n * the authentication response with this challenge.\n * This should be a cryptographically random GUID to prevent guessing attacks.\n * @format GUID\n */\n challengeId?: string;\n /**\n * A PublicKeyCredentialRequestOptions JSON as defined in the WebAuthn spec (https://www.w3.org/TR/webauthn-3/#dictdef-publickeycredentialrequestoptions).\n * @maxLength 40000\n */\n publicKeyCredentialRequestOptionsJson?: string;\n}\n\nexport interface ValidateEmailRequest {\n /** @maxLength 254 */\n email: string;\n}\n\nexport interface ValidateEmailResponse {\n valid?: boolean;\n failure?: EmailValidationFailure;\n formatInvalid?: boolean;\n}\n\nexport interface EmailValidationFailure {\n reason?: ReasonWithLiterals;\n}\n\nexport enum Reason {\n UNKNOWN_REASON = 'UNKNOWN_REASON',\n EMAIL_ADDRESS_BOUNCED = 'EMAIL_ADDRESS_BOUNCED',\n EMAIL_DOMAIN_MISSING_DNS_RECORDS = 'EMAIL_DOMAIN_MISSING_DNS_RECORDS',\n EMAIL_DOMAIN_FORMAT_INVALID = 'EMAIL_DOMAIN_FORMAT_INVALID',\n EMAIL_DOMAIN_PERMANENTLY_BLACKLISTED = 'EMAIL_DOMAIN_PERMANENTLY_BLACKLISTED',\n}\n\n/** @enumType */\nexport type ReasonWithLiterals =\n | Reason\n | 'UNKNOWN_REASON'\n | 'EMAIL_ADDRESS_BOUNCED'\n | 'EMAIL_DOMAIN_MISSING_DNS_RECORDS'\n | 'EMAIL_DOMAIN_FORMAT_INVALID'\n | 'EMAIL_DOMAIN_PERMANENTLY_BLACKLISTED';\n\nexport interface LoginV2Request {\n /** Identifier of identity logging in. */\n loginId: LoginId;\n /** Password of the identity logging in. */\n password?: string | null;\n /** CAPTCHA tokens, when CAPTCHA setting is on. */\n captchaTokens?: CaptchaToken[];\n /** Additional data that's relevant for the flow. */\n clientMetaData?: Record<string, any> | null;\n /**\n * webAuthn data:\n * 1. When the login_id is an email:\n * 1.a. if password is provided, this field should not be provided.\n * 1.b. if password is not provided, this field should contain a webauthn credential to attempt login.\n * 2. When the login_id is empty, this field should contain a WebAuthn credential. password is not applicable in this case.\n * @internal\n */\n webauthn?: WebAuthnVerifyData;\n /**\n * email OTP data:\n * 1. When the login_id is an email:\n * 1.a. if password or webauthn is provided, this field should not be provided.\n * 1.b. if password and webauthn are not provided, this field should contain an email OTP to attempt login.\n * @internal\n */\n emailOtp?: ExternalEmailVerifyData;\n /**\n * State token from a login flow that was started beforehand.\n *\n * When provided, this request continues an in-progress login flow rather than starting a new one.\n * @maxLength 1000\n */\n stateToken?: string | null;\n}\n\nexport interface WebAuthnVerifyData {\n /**\n * The challenge_id from the WebAuthnChallengeData that was returned in the previous\n * verification response. This will always be present when completing the WebAuthn authentication\n * ceremony with the credential data from the client.\n * @format GUID\n */\n challengeId?: string | null;\n /**\n * If this field is present, this is a request to complete the WebAuthn authentication\n * with the credential data from the client.\n *\n * The credential contains a JSON string representation of a WebAuthn PublicKeyCredential\n * object returned by the browser during authentication, serialized as per the WebAuthn specification.\n * The SPI implementation should use this to verify the authentication assertion.\n *\n * Any standards-compliant WebAuthn server library should be able to process this serialized format.\n * For details on the serialization format, refer to the W3C WebAuthn specification:\n * https://www.w3.org/TR/webauthn-3/#dom-publickeycredential-tojson\n * @maxLength 3000\n */\n credential?: string | null;\n}\n\nexport interface ExternalEmailVerifyData {\n /**\n * @minLength 1\n * @maxLength 100\n */\n code?: string | null;\n}\n\nexport interface ChangePasswordRequest {\n /**\n * New password to set for the logged-in member.\n *\n * The password must meet the site's configured password requirements for length and complexity.\n */\n newPassword: string;\n}\n\nexport interface ChangePasswordResponse {}\n\nexport interface LoginWithIdpConnectionRequest {\n /**\n * The id of the connection id (can be fetched by calling connection-service.listEnabledConnectionsClientData\n * @format GUID\n */\n idpConnectionId?: string;\n /**\n * The id of the tenant the caller wants to login into\n * @format GUID\n */\n tenantId?: string;\n /** The type of the tenant the caller wants to login into */\n tenantType?: TenantTypeWithLiterals;\n customPayload?: Record<string, string>;\n /**\n * This flow ultimately returns an HTML page that asynchronously posts the LoginResponse via the BroadcastChannel API.\n * The message will be posted to a channel named `wix-idp-$session_id`, and encrypted with the `encryption_key`.\n * Encryption key should be base64 encoded. Encryption is done using AES-GCM with a random IV that's sent alongside the payload\n *\n * Optional at the proto level: required for the BroadcastChannel response mode only, and may be omitted\n * when `authorization_url` is provided (redirect response mode). Enforced in code.\n */\n sessionId?: string;\n /**\n * Base64-encoded encryption key for securing the authentication response.\n *\n * Used to encrypt the authentication response sent via BroadcastChannel API.\n * Encryption uses AES-GCM with a random IV.\n *\n * Optional at the proto level: required for the BroadcastChannel response mode only, and may be omitted\n * when `authorization_url` is provided (redirect response mode). Enforced in code.\n */\n encryptionKey?: string;\n /**\n * Visitor ID for tracking purposes.\n *\n * Optional identifier for analytics and tracking the authentication flow.\n */\n visitorId?: string | null;\n /**\n * Browser session identifier.\n *\n * Optional identifier for correlating the authentication request with browser session data.\n */\n bsi?: string | null;\n /**\n * Redirect response mode: when set, the SSO callback responds with a 302 to this URL carrying the\n * member session cookie (smSession) via Set-Cookie, instead of the BroadcastChannel HTML page.\n * Intended for OIDC-broker flows where Wix acts as the IdP: this URL is the outer authorization\n * endpoint to resume once the member session is established.\n * Must be on the same registrable domain as the host serving this login request (which is also the\n * domain the session cookie is set on). When set, `session_id` and `encryption_key` are not required.\n * @format WEB_URL\n */\n authorizationUrl?: string | null;\n}\n\nexport enum TenantType {\n /** Unknown tenant type. This value isn't used. */\n UNKNOWN_TENANT_TYPE = 'UNKNOWN_TENANT_TYPE',\n /** The identity is a Wix user. */\n ACCOUNT = 'ACCOUNT',\n /** The identity is a member. */\n SITE = 'SITE',\n /**\n * Tenant is root.\n * @internal\n */\n ROOT = 'ROOT',\n}\n\n/** @enumType */\nexport type TenantTypeWithLiterals =\n | TenantType\n | 'UNKNOWN_TENANT_TYPE'\n | 'ACCOUNT'\n | 'SITE';\n\nexport interface RawHttpResponse {\n body?: Uint8Array;\n statusCode?: number | null;\n headers?: HeadersEntry[];\n}\n\nexport interface HeadersEntry {\n key?: string;\n value?: string;\n}\n\nexport interface RawHttpRequest {\n body?: Uint8Array;\n pathParams?: PathParametersEntry[];\n queryParams?: QueryParametersEntry[];\n headers?: HeadersEntry[];\n method?: string;\n rawPath?: string;\n rawQuery?: string;\n}\n\nexport interface PathParametersEntry {\n key?: string;\n value?: string;\n}\n\nexport interface QueryParametersEntry {\n key?: string;\n value?: string;\n}\n\n/**\n * Request for LoginWithIdpConnectionRedirect - OAuth redirect flow.\n * Uses redirect_uri/client_id instead of session_id/encryption_key.\n */\nexport interface LoginWithIdpConnectionRedirectRequest {\n /**\n * The id of the connection id (can be fetched by calling connection-service.listEnabledConnectionsClientData\n * @format GUID\n */\n idpConnectionId?: string;\n /**\n * The id of the tenant the caller wants to login into\n * @format GUID\n */\n tenantId?: string;\n /** The type of the tenant the caller wants to login into */\n tenantType?: TenantTypeWithLiterals;\n customPayload?: Record<string, string>;\n /**\n * OAuth app redirect URI for the callback.\n *\n * After successful authentication, the flow redirects to this URI with the `sessionToken`\n * as a query parameter. Must be a registered callback URL for the specified `client_id`.\n * @format WEB_URL\n */\n redirectUri?: string;\n /**\n * OAuth client ID for redirect flow validation.\n *\n * Used to validate that the redirect URI is a permitted callback URL for this OAuth client.\n * @format GUID\n */\n clientId?: string;\n /**\n * Visitor ID for tracking purposes.\n *\n * Optional identifier for analytics and tracking the authentication flow.\n */\n visitorId?: string | null;\n /**\n * Browser session identifier.\n *\n * Optional identifier for correlating the authentication request with browser session data.\n */\n bsi?: string | null;\n}\n\nexport interface ConnectIdpRequest {\n /**\n * The id of the connection id (can be fetched by calling connection-service.listEnabledConnectionsClientData\n * @format GUID\n */\n idpConnectionId?: string;\n customPayload?: Record<string, string>;\n /**\n * This flow ultimately returns an HTML page that asynchronously posts the LoginResponse via the BroadcastChannel API.\n * The message will be posted to a channel named `wix-idp-$session_id`, and encrypted with the `encryption_key`.\n * Encryption key should be base64 encoded. Encryption is done using AES-GCM with a random IV that's sent alongside the payload\n */\n sessionId?: string;\n /**\n * Base64-encoded encryption key for securing the authentication response.\n *\n * Used to encrypt the authentication response sent via BroadcastChannel API.\n * Encryption uses AES-GCM with a random IV.\n */\n encryptionKey?: string;\n}\n\nexport interface LoginCallbackRequest {\n /** state that that received on the redirect */\n state?: string;\n /** session token */\n sessionToken?: string;\n}\n\nexport interface LoginWithIdpConnectionTokenParamsRequest {\n /**\n * The id of the connection id (can be fetched by calling connection-service.listEnabledConnectionsClientData)\n * @format GUID\n */\n idpConnectionId?: string;\n /** A set of fields that are required for the connection to be able to identify and authenticate the user */\n tokenParams?: Record<string, string>;\n}\n\nexport interface SignOnRequest {\n /**\n * Member identifier for authentication.\n *\n * Currently only email addresses are supported.\n */\n loginId: LoginId;\n /**\n * Member profile information.\n *\n * Profile data such as first name, last name, and other member details.\n * If the member already exists, provided profile information will update the existing member's profile.\n * If the member doesn't exist, this profile information is used to create the new member.\n */\n profile?: IdentityProfile;\n /**\n * Whether to mark the member's email as verified without requiring verification.\n *\n * When `true`, marks the email as verified without requiring verification.\n * Use with caution in production as this bypasses security verification.\n *\n * Default: `false`\n */\n verifyEmail?: boolean;\n /**\n * Whether to merge with an existing contact with the same email address.\n *\n * When `true`, links the member to an existing contact record with the same email\n * and inherits contact data. When `false`, creates a new contact record.\n *\n * Default: `true`\n */\n mergeExistingContact?: boolean;\n}\n\nexport interface SignOnResponse {\n /**\n * Session token for the authenticated member.\n *\n * Use this token to obtain access and refresh tokens for subsequent API calls.\n */\n sessionToken?: string;\n /**\n * Member identity information.\n *\n * Contains the member's identity details after successful authentication.\n */\n identity?: Identity;\n}\n\n/** logout request payload */\nexport interface LogoutRequest {\n /**\n * URL to redirect to after logout.\n *\n * Optional redirect destination after the logout process completes.\n * @format WEB_URL\n */\n postLogoutRedirectUri?: string | null;\n /**\n * Client identifier for the logout request.\n *\n * Identifies the application or client initiating the logout.\n * @format GUID\n */\n clientId?: string | null;\n}\n\nexport interface VerifyRequest extends VerifyRequestFactorDataOneOf {\n /** SMS verification code sent to the member's phone number. */\n smsData?: SmsVerifyData;\n /** Voice call verification code received by the member. */\n callData?: CallVerifyData;\n /** Email verification code sent to the member's email address. */\n emailData?: ExternalEmailVerifyData;\n /** TOTP code from the member's authenticator app. */\n totpData?: TotpVerifyData;\n /** Push notification authentication response from the member's device. */\n pushData?: PushVerifyData;\n /** WebAuthn response from biometric or security key authentication. */\n webauthnData?: WebAuthnVerifyData;\n /** RecoveryCode response from a one-time code. */\n recoveryCodeData?: RecoveryCodeVerifyData;\n /** Password for first factor verification. */\n passwordData?: PasswordVerifyData;\n /**\n * State token from the initial authentication response.\n *\n * Required to continue the multi-step authentication process.\n * @maxLength 1000\n */\n stateToken?: string;\n /**\n * Type of authentication factor being verified.\n *\n * Specifies which verification method is being used (SMS, email, TOTP, etc.).\n */\n factorType?: FactorTypeWithLiterals;\n /**\n * Whether to remember this device for future authentication.\n *\n * When `true`, reduces future authentication requirements for this device.\n * Only applicable for second factor authentication.\n */\n rememberThisDevice?: boolean;\n}\n\n/** @oneof */\nexport interface VerifyRequestFactorDataOneOf {\n /** SMS verification code sent to the member's phone number. */\n smsData?: SmsVerifyData;\n /** Voice call verification code received by the member. */\n callData?: CallVerifyData;\n /** Email verification code sent to the member's email address. */\n emailData?: ExternalEmailVerifyData;\n /** TOTP code from the member's authenticator app. */\n totpData?: TotpVerifyData;\n /** Push notification authentication response from the member's device. */\n pushData?: PushVerifyData;\n /** WebAuthn response from biometric or security key authentication. */\n webauthnData?: WebAuthnVerifyData;\n /** RecoveryCode response from a one-time code. */\n recoveryCodeData?: RecoveryCodeVerifyData;\n /** Password for first factor verification. */\n passwordData?: PasswordVerifyData;\n}\n\nexport interface SmsVerifyData {\n /**\n * @minLength 1\n * @maxLength 100\n */\n code?: string | null;\n deliveryMethod?: DeliveryMethodWithLiterals;\n /**\n * The template ID to use for the SMS notification.\n * @minLength 1\n * @maxLength 100\n */\n templateId?: string | null;\n}\n\nexport enum DeliveryMethod {\n SMS = 'SMS',\n WHATSAPP = 'WHATSAPP',\n}\n\n/** @enumType */\nexport type DeliveryMethodWithLiterals = DeliveryMethod | 'SMS' | 'WHATSAPP';\n\nexport interface CallVerifyData {\n /**\n * @minLength 1\n * @maxLength 100\n */\n code?: string | null;\n}\n\nexport interface TotpVerifyData {\n /**\n * @minLength 1\n * @maxLength 100\n */\n code?: string | null;\n}\n\nexport interface PushVerifyData {\n /** @maxLength 36 */\n transactionId?: string | null;\n}\n\nexport interface RecoveryCodeVerifyData {\n /**\n * @minLength 1\n * @maxLength 100\n */\n code?: string | null;\n}\n\nexport interface PasswordVerifyData {\n /**\n * @minLength 1\n * @maxLength 100\n */\n password?: string;\n}\n\nexport interface GetWebauthnChallengeRequest {\n /**\n * Identifier of the member requesting the WebAuthn challenge.\n *\n * If not provided, returns an anonymous WebAuthn challenge for usernameless authentication.\n */\n loginId?: LoginId;\n}\n\nexport interface GetWebauthnChallengeResponse {\n /** The challenge that will be used for a WebAuthn authentication ceremony. */\n webauthn?: WebAuthnChallengeData;\n}\n\n/** @docsIgnore */\nexport type RegisterV2ApplicationErrors =\n | {\n code?: 'UNIMPLEMENTED_FEATURE';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'THROTTLED_FEATURE';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'INVALID_CAPTCHA_TOKEN';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'CAPTCHA_TOKEN_REQUIRED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'IP_ADDRESS_FILTERED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'RECAPTCHA_FAILED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'RECAPTCHA_REQUIRED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'MISSING_CAPTCHA_TOKEN';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'USER_EMAIL_OFAC_ADDRESS';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'UNSUPPORTED_FIELD';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'ATTRIBUTE_NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'CLIENT_METADATA_NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'INVALID_LD_SESSION';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'DUPLICATE_EMAIL';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'COULD_NOT_CREATE_SET_ACCOUNT_USER';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'INVALID_USER_TYPE';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'REGISTRATION_TO_EDITORX_NOT_ALLOWED';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type RegisterV2ValidationErrors =\n | {\n ruleName?: 'PROVIDE_TENANT_ID';\n }\n | {\n ruleName?: 'INVALID_AUTHENTICATOR_ID';\n }\n | {\n ruleName?: 'VALUEֹֹ_TOO_SHORT';\n }\n | {\n ruleName?: 'VALUEֹֹ_TOO_LONG';\n }\n | {\n ruleName?: 'VALUE_DID_NOT_MATCH';\n };\n/** @docsIgnore */\nexport type LoginV2ApplicationErrors =\n | {\n code?: 'THROTTLED_FEATURE';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'INVALID_CAPTCHA_TOKEN';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'CAPTCHA_TOKEN_REQUIRED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'REENROLLMENT_REQUIRED_BY_ADMIN';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'TRUSTED_CLIENTS_ONLY';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'WIX_EMPLOYEE_PASSWORD_LOGIN_NOT_ALLOWED';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type LoginV2ValidationErrors =\n | {\n ruleName?: 'PROVIDE_TENANT_ID';\n }\n | {\n ruleName?: 'INVALID_AUTHENTICATOR_ID';\n };\n\n/**\n * Registers a new member.\n *\n * Typically, after a successful registration, you generate and use member tokens for the\n * registered member so that subsequent API calls are called as part of a member session.\n * Use the `sessionToken` in the response to [get the site member's access and refresh tokens](https://dev.wix.com/docs/go-headless/coding/rest-api/visitors-and-members/handle-members-with-custom-login#get-the-site-members-access-and-refresh-tokens).\n *\n * If the email used to register the member already exists as a contact email, the registering\n * member need to verify the email address using a code that is sent to the address.\n * @param loginId - Identifier of the registering member.\n * @public\n * @requiredField loginId\n * @fqn wix.iam.authentication.v1.AuthenticationService.RegisterV2\n */\nexport async function registerV2(\n loginId: LoginId,\n options?: RegisterV2Options\n): Promise<\n NonNullablePaths<\n StateMachineResponse,\n | `state`\n | `identity.connections`\n | `identity.connections.${number}.idpConnection.idpConnectionId`\n | `identity.connections.${number}.idpConnection.idpUserId`\n | `identity.connections.${number}.authenticatorConnection.authenticatorConnectionId`\n | `identity.connections.${number}.authenticatorConnection.reEnrollmentRequired`\n | `identity.identityProfile.emails`\n | `identity.identityProfile.phones`\n | `identity.identityProfile.labels`\n | `identity.identityProfile.privacyStatus`\n | `identity.identityProfile.customFields`\n | `identity.identityProfile.customFields.${number}.name`\n | `identity.identityProfile.customFields.${number}.value.strValue`\n | `identity.identityProfile.customFields.${number}.value.numValue`\n | `identity.identityProfile.customFields.${number}.value.boolValue`\n | `identity.identityProfile.secondaryEmails`\n | `identity.identityProfile.secondaryEmails.${number}.email`\n | `identity.identityProfile.secondaryEmails.${number}.tag`\n | `identity.identityProfile.phonesV2`\n | `identity.identityProfile.phonesV2.${number}.phone`\n | `identity.identityProfile.phonesV2.${number}.tag`\n | `identity.identityProfile.addresses`\n | `identity.identityProfile.addresses.${number}.tag`\n | `identity.email.address`\n | `identity.email.isVerified`\n | `identity.status.name`\n | `identity.status.reasons`\n | `identity.factors`\n | `identity.factors.${number}.factorId`\n | `identity.factors.${number}.type`\n | `identity.factors.${number}.status`,\n 5\n > & {\n __applicationErrorsType?: RegisterV2ApplicationErrors;\n __validationErrorsType?: RegisterV2ValidationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = transformPaths(\n renameKeysFromSDKRequestToRESTRequest({\n loginId: loginId,\n password: options?.password,\n profile: options?.profile,\n captchaTokens: options?.captchaTokens,\n clientMetaData: options?.clientMetaData,\n factorType: options?.factorType,\n organizationId: options?.organizationId,\n }),\n [\n {\n transformFn: transformSDKAddressToRESTAddress,\n paths: TRANSFORM_PATHS_0,\n },\n ]\n );\n\n const reqOpts =\n ambassadorWixIamAuthenticationV1Authentication.registerV2(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: TRANSFORM_PATHS_1,\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n loginId: '$[0]',\n password: '$[1].password',\n profile: '$[1].profile',\n captchaTokens: '$[1].captchaTokens',\n clientMetaData: '$[1].clientMetaData',\n factorType: '$[1].factorType',\n organizationId: '$[1].organizationId',\n },\n singleArgumentUnchanged: false,\n },\n ['loginId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface RegisterV2Options {\n /** Password of the registering member. */\n password?: string;\n /** Profile information of registering member. */\n profile?: IdentityProfile;\n /** CAPTCHA tokens, when CAPTCHA setting is on. */\n captchaTokens?: CaptchaToken[];\n /** Additional data that's relevant for the flow. */\n clientMetaData?: Record<string, any> | null;\n /**\n * The factor to register with: `PASSWORD`, the default, or `EMAIL`, which sends a code and returns\n * `REQUIRE_REGISTER_CHALLENGE` until the code is submitted to `Verify`.\n */\n factorType?: FactorTypeWithLiterals;\n /**\n * ID of the organization the user registers into. The new user's account is created as a sub-account of this organization.\n * @format GUID\n */\n organizationId?: string | null;\n}\n\n/** @public\n * @requiredField email\n * @fqn wix.iam.authentication.v1.AuthenticationService.ValidateEmail\n */\nexport async function validateEmail(\n email: string\n): Promise<\n NonNullablePaths<\n ValidateEmailResponse,\n `valid` | `failure.reason` | `formatInvalid`,\n 1\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ email: email });\n\n const reqOpts =\n ambassadorWixIamAuthenticationV1Authentication.validateEmail(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { email: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['email']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Logs in an existing member.\n *\n * Typically, after a successful login, you generate and use member tokens for the\n * logged-in member so that subsequent API calls are called as part of a member session.\n * Use the `sessionToken` in the response to [get the site member's access and refresh tokens](https://dev.wix.com/docs/go-headless/coding/rest-api/visitors-and-members/handle-members-with-custom-login#get-the-site-members-access-and-refresh-tokens).\n * @param loginId - Identifier of identity logging in.\n * @public\n * @requiredField loginId\n * @fqn wix.iam.authentication.v1.AuthenticationService.LoginV2\n */\nexport async function loginV2(\n loginId: LoginId,\n options?: LoginV2Options\n): Promise<\n NonNullablePaths<\n StateMachineResponse,\n | `state`\n | `identity.connections`\n | `identity.connections.${number}.idpConnection.idpConnectionId`\n | `identity.connections.${number}.idpConnection.idpUserId`\n | `identity.connections.${number}.authenticatorConnection.authenticatorConnectionId`\n | `identity.connections.${number}.authenticatorConnection.reEnrollmentRequired`\n | `identity.identityProfile.emails`\n | `identity.identityProfile.phones`\n | `identity.identityProfile.labels`\n | `identity.identityProfile.privacyStatus`\n | `identity.identityProfile.customFields`\n | `identity.identityProfile.customFields.${number}.name`\n | `identity.identityProfile.customFields.${number}.value.strValue`\n | `identity.identityProfile.customFields.${number}.value.numValue`\n | `identity.identityProfile.customFields.${number}.value.boolValue`\n | `identity.identityProfile.secondaryEmails`\n | `identity.identityProfile.secondaryEmails.${number}.email`\n | `identity.identityProfile.secondaryEmails.${number}.tag`\n | `identity.identityProfile.phonesV2`\n | `identity.identityProfile.phonesV2.${number}.phone`\n | `identity.identityProfile.phonesV2.${number}.tag`\n | `identity.identityProfile.addresses`\n | `identity.identityProfile.addresses.${number}.tag`\n | `identity.email.address`\n | `identity.email.isVerified`\n | `identity.status.name`\n | `identity.status.reasons`\n | `identity.factors`\n | `identity.factors.${number}.factorId`\n | `identity.factors.${number}.type`\n | `identity.factors.${number}.status`,\n 5\n > & {\n __applicationErrorsType?: LoginV2ApplicationErrors;\n __validationErrorsType?: LoginV2ValidationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n loginId: loginId,\n password: options?.password,\n captchaTokens: options?.captchaTokens,\n clientMetaData: options?.clientMetaData,\n stateToken: options?.stateToken,\n });\n\n const reqOpts =\n ambassadorWixIamAuthenticationV1Authentication.loginV2(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: TRANSFORM_PATHS_1,\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n loginId: '$[0]',\n password: '$[1].password',\n captchaTokens: '$[1].captchaTokens',\n clientMetaData: '$[1].clientMetaData',\n stateToken: '$[1].stateToken',\n },\n singleArgumentUnchanged: false,\n },\n ['loginId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface LoginV2Options {\n /** Password of the identity logging in. */\n password?: string | null;\n /** CAPTCHA tokens, when CAPTCHA setting is on. */\n captchaTokens?: CaptchaToken[];\n /** Additional data that's relevant for the flow. */\n clientMetaData?: Record<string, any> | null;\n /**\n * State token from a login flow that was started beforehand.\n *\n * When provided, this request continues an in-progress login flow rather than starting a new one.\n * @maxLength 1000\n */\n stateToken?: string | null;\n}\n\n/**\n * Changes the password of a logged-in member. The member must have a valid session to use this method.\n *\n * The member's session remains valid after password change.\n *\n * The new password must meet the site's configured password requirements for length\n * and complexity. These requirements are enforced automatically when processing the request.\n * @param newPassword - New password to set for the logged-in member.\n *\n * The password must meet the site's configured password requirements for length and complexity.\n * @public\n * @documentationMaturity preview\n * @requiredField newPassword\n * @permissionId IAM.CHANGE_PASSWORD\n * @fqn wix.iam.authentication.v1.AuthenticationService.ChangePassword\n */\nexport async function changePassword(newPassword: string): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n newPassword: newPassword,\n });\n\n const reqOpts =\n ambassadorWixIamAuthenticationV1Authentication.changePassword(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { newPassword: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['newPassword']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Authenticates a member without credentials and returns a session token.\n *\n * This method provides authentication that automatically creates or updates\n * member accounts as needed during the authentication process.\n * Use this only for trusted integrations and scenarios where you already have verified user information.\n * @param loginId - Member identifier for authentication.\n *\n * Currently only email addresses are supported.\n * @public\n * @documentationMaturity preview\n * @requiredField loginId\n * @permissionId IAM.AUTHENTICAITON_SIGN_ON\n * @applicableIdentity APP\n * @fqn wix.iam.authentication.v1.AuthenticationService.SignOn\n */\nexport async function signOn(\n loginId: LoginId,\n options?: SignOnOptions\n): Promise<\n NonNullablePaths<\n SignOnResponse,\n | `sessionToken`\n | `identity.connections`\n | `identity.connections.${number}.idpConnection.idpConnectionId`\n | `identity.connections.${number}.idpConnection.idpUserId`\n | `identity.connections.${number}.authenticatorConnection.authenticatorConnectionId`\n | `identity.connections.${number}.authenticatorConnection.reEnrollmentRequired`\n | `identity.identityProfile.emails`\n | `identity.identityProfile.phones`\n | `identity.identityProfile.labels`\n | `identity.identityProfile.privacyStatus`\n | `identity.identityProfile.customFields`\n | `identity.identityProfile.customFields.${number}.name`\n | `identity.identityProfile.customFields.${number}.value.strValue`\n | `identity.identityProfile.customFields.${number}.value.numValue`\n | `identity.identityProfile.customFields.${number}.value.boolValue`\n | `identity.identityProfile.secondaryEmails`\n | `identity.identityProfile.secondaryEmails.${number}.email`\n | `identity.identityProfile.secondaryEmails.${number}.tag`\n | `identity.identityProfile.phonesV2`\n | `identity.identityProfile.phonesV2.${number}.phone`\n | `identity.identityProfile.phonesV2.${number}.tag`\n | `identity.identityProfile.addresses`\n | `identity.identityProfile.addresses.${number}.tag`\n | `identity.email.address`\n | `identity.email.isVerified`\n | `identity.status.name`\n | `identity.status.reasons`\n | `identity.factors`\n | `identity.factors.${number}.factorId`\n | `identity.factors.${number}.type`\n | `identity.factors.${number}.status`,\n 5\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = transformPaths(\n renameKeysFromSDKRequestToRESTRequest({\n loginId: loginId,\n profile: options?.profile,\n verifyEmail: options?.verifyEmail,\n mergeExistingContact: options?.mergeExistingContact,\n }),\n [\n {\n transformFn: transformSDKAddressToRESTAddress,\n paths: TRANSFORM_PATHS_0,\n },\n ]\n );\n\n const reqOpts =\n ambassadorWixIamAuthenticationV1Authentication.signOn(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(\n transformPaths(result.data, [\n {\n transformFn: transformRESTAddressToSDKAddress,\n paths: TRANSFORM_PATHS_1,\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n loginId: '$[0]',\n profile: '$[1].profile',\n verifyEmail: '$[1].verifyEmail',\n mergeExistingContact: '$[1].mergeExistingContact',\n },\n singleArgumentUnchanged: false,\n },\n ['loginId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface SignOnOptions {\n /**\n * Member profile information.\n *\n * Profile data such as first name, last name, and other member details.\n * If the member already exists, provided profile information will update the existing member's profile.\n * If the member doesn't exist, this profile information is used to create the new member.\n */\n profile?: IdentityProfile;\n /**\n * Whether to mark the member's email as verified without requiring verification.\n *\n * When `true`, marks the email as verified without requiring verification.\n * Use with caution in production as this bypasses security verification.\n *\n * Default: `false`\n */\n verifyEmail?: boolean;\n /**\n * Whether to merge with an existing contact with the same email address.\n *\n * When `true`, links the member to an existing contact record with the same email\n * and inherits contact data. When `false`, creates a new contact record.\n *\n * Default: `true`\n */\n mergeExistingContact?: boolean;\n}\n\n/**\n * Terminates the member's session and clears authentication cookies.\n *\n * Returns the following:\n * - `body`: HTML content for the logout response\n * - `statusCode`: HTTP status code (200 for success, 302 for redirect)\n * - `headers`: Array of key-value pairs including:\n * - `Set-Cookie` headers to remove all session cookies\n * - `Location` header (when `postLogoutRedirectUri` is provided, with 302 status)\n * @public\n * @documentationMaturity preview\n * @fqn wix.iam.authentication.v1.AuthenticationService.Logout\n */\nexport async function logout(\n options?: LogoutOptions\n): Promise<\n NonNullablePaths<\n RawHttpResponse,\n `body` | `headers` | `headers.${number}.key` | `headers.${number}.value`,\n 2\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n postLogoutRedirectUri: options?.postLogoutRedirectUri,\n clientId: options?.clientId,\n });\n\n const reqOpts =\n ambassadorWixIamAuthenticationV1Authentication.logout(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n postLogoutRedirectUri: '$[0].postLogoutRedirectUri',\n clientId: '$[0].clientId',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface LogoutOptions {\n /**\n * URL to redirect to after logout.\n *\n * Optional redirect destination after the logout process completes.\n * @format WEB_URL\n */\n postLogoutRedirectUri?: string | null;\n /**\n * Client identifier for the logout request.\n *\n * Identifies the application or client initiating the logout.\n * @format GUID\n */\n clientId?: string | null;\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKFloatToRESTFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformRESTBytesToSDKBytes } from '@wix/sdk-runtime/transformations/bytes';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nconst TRANSFORM_PATHS_0 = [{ path: 'profile.customFields.value.numValue' }];\nconst TRANSFORM_PATHS_1 = [{ path: 'profile.customFields.value.dateValue' }];\nconst TRANSFORM_PATHS_2 = [\n { path: 'identity.createdDate' },\n { path: 'identity.updatedDate' },\n { path: 'identity.identityProfile.customFields.value.dateValue' },\n { path: 'additionalData.*.dateValue' },\n];\nconst TRANSFORM_PATHS_3 = [\n { path: 'identity.identityProfile.customFields.value.numValue' },\n { path: 'additionalData.*.numValue' },\n];\nconst TRANSFORM_PATHS_4 = [\n { path: 'identity.createdDate' },\n { path: 'identity.updatedDate' },\n { path: 'identity.identityProfile.customFields.value.dateValue' },\n];\nconst TRANSFORM_PATHS_5 = [\n { path: 'identity.identityProfile.customFields.value.numValue' },\n];\nconst TRANSFORM_PATHS_6 = [{ path: 'body' }];\n\nfunction resolveWixIamAuthenticationV1AuthenticationServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n _: [\n {\n srcPath: '/_api/iam/authentication',\n destPath: '',\n },\n ],\n 'users._base_domain_': [\n {\n srcPath: '/iam/wix/google',\n destPath: '/v1/sso/callback/root/0e6a50f5-b523-4e29-990d-f37fa2ffdd69',\n },\n {\n srcPath: '/authentication',\n destPath: '',\n },\n {\n srcPath: '/_api/iam/authentication/v1/sso/callback',\n destPath: '/v1/sso/callback',\n },\n {\n srcPath: '/_api/iam/authentication',\n destPath: '',\n },\n {\n srcPath:\n '/_api/iam/authentication/v1/sso/login-with-token-params-redirect/',\n destPath: '/v1/sso/login-with-token-params-redirect',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/_api/iam/authentication',\n destPath: '',\n },\n {\n srcPath: '/iam/authentication',\n destPath: '',\n },\n ],\n 'bo._base_domain_': [\n {\n srcPath: '/_api/iam/authentication',\n destPath: '',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/_api/iam/authentication',\n destPath: '',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/_api/iam/authentication',\n destPath: '',\n },\n ],\n 'dev._base_domain_': [\n {\n srcPath: '/_api/iam/authentication',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/authentication',\n destPath: '',\n },\n {\n srcPath: '/_api/iam/authentication',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/iam/authentication',\n destPath: '',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/iam/authentication/v2/sign-on',\n destPath: '/v2/sign-on',\n },\n {\n srcPath: '/iam/authentication/v1/logout',\n destPath: '/v1/logout',\n },\n {\n srcPath: '/iam/authentication/v2/change-password',\n destPath: '/v2/change-password',\n },\n {\n srcPath: '/iam/authentication/v2/verify',\n destPath: '/v2/verify',\n },\n {\n srcPath: '/iam/authentication/v2/login',\n destPath: '/v2/login',\n },\n {\n srcPath: '/iam/authentication/v2/register',\n destPath: '/v2/register',\n },\n {\n srcPath: '/iam/authentication/v2',\n destPath: '/v2',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_identity_authentication';\n\n/**\n * Registers a new member.\n *\n * Typically, after a successful registration, you generate and use member tokens for the\n * registered member so that subsequent API calls are called as part of a member session.\n * Use the `sessionToken` in the response to [get the site member's access and refresh tokens](https://dev.wix.com/docs/go-headless/coding/rest-api/visitors-and-members/handle-members-with-custom-login#get-the-site-members-access-and-refresh-tokens).\n *\n * If the email used to register the member already exists as a contact email, the registering\n * member need to verify the email address using a code that is sent to the address.\n */\nexport function registerV2(payload: object): RequestOptionsFactory<any> {\n function __registerV2({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: TRANSFORM_PATHS_0,\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: TRANSFORM_PATHS_1,\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.iam.authentication.v1.authentication',\n method: 'POST' as any,\n methodFqn: 'wix.iam.authentication.v1.AuthenticationService.RegisterV2',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixIamAuthenticationV1AuthenticationServiceUrl({\n protoPath: '/v2/register',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: TRANSFORM_PATHS_2,\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: TRANSFORM_PATHS_3,\n },\n ]),\n };\n\n return metadata;\n }\n\n return __registerV2;\n}\n\nexport function validateEmail(payload: object): RequestOptionsFactory<any> {\n function __validateEmail({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.iam.authentication.v1.authentication',\n method: 'POST' as any,\n methodFqn:\n 'wix.iam.authentication.v1.AuthenticationService.ValidateEmail',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixIamAuthenticationV1AuthenticationServiceUrl({\n protoPath: '/v2/validate-email',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __validateEmail;\n}\n\n/**\n * Logs in an existing member.\n *\n * Typically, after a successful login, you generate and use member tokens for the\n * logged-in member so that subsequent API calls are called as part of a member session.\n * Use the `sessionToken` in the response to [get the site member's access and refresh tokens](https://dev.wix.com/docs/go-headless/coding/rest-api/visitors-and-members/handle-members-with-custom-login#get-the-site-members-access-and-refresh-tokens).\n */\nexport function loginV2(payload: object): RequestOptionsFactory<any> {\n function __loginV2({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.iam.authentication.v1.authentication',\n method: 'POST' as any,\n methodFqn: 'wix.iam.authentication.v1.AuthenticationService.LoginV2',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixIamAuthenticationV1AuthenticationServiceUrl({\n protoPath: '/v2/login',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: TRANSFORM_PATHS_2,\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: TRANSFORM_PATHS_3,\n },\n ]),\n };\n\n return metadata;\n }\n\n return __loginV2;\n}\n\n/**\n * Changes the password of a logged-in member. The member must have a valid session to use this method.\n *\n * The member's session remains valid after password change.\n *\n * The new password must meet the site's configured password requirements for length\n * and complexity. These requirements are enforced automatically when processing the request.\n */\nexport function changePassword(payload: object): RequestOptionsFactory<any> {\n function __changePassword({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.iam.authentication.v1.authentication',\n method: 'POST' as any,\n methodFqn:\n 'wix.iam.authentication.v1.AuthenticationService.ChangePassword',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixIamAuthenticationV1AuthenticationServiceUrl({\n protoPath: '/v2/change-password',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __changePassword;\n}\n\n/**\n * Authenticates a member without credentials and returns a session token.\n *\n * This method provides authentication that automatically creates or updates\n * member accounts as needed during the authentication process.\n * Use this only for trusted integrations and scenarios where you already have verified user information.\n */\nexport function signOn(payload: object): RequestOptionsFactory<any> {\n function __signOn({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: TRANSFORM_PATHS_0,\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: TRANSFORM_PATHS_1,\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.iam.authentication.v1.authentication',\n method: 'POST' as any,\n methodFqn: 'wix.iam.authentication.v1.AuthenticationService.SignOn',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixIamAuthenticationV1AuthenticationServiceUrl({\n protoPath: '/v2/sign-on',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: TRANSFORM_PATHS_4,\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: TRANSFORM_PATHS_5,\n },\n ]),\n };\n\n return metadata;\n }\n\n return __signOn;\n}\n\n/**\n * Terminates the member's session and clears authentication cookies.\n *\n * Returns the following:\n * - `body`: HTML content for the logout response\n * - `statusCode`: HTTP status code (200 for success, 302 for redirect)\n * - `headers`: Array of key-value pairs including:\n * - `Set-Cookie` headers to remove all session cookies\n * - `Location` header (when `postLogoutRedirectUri` is provided, with 302 status)\n */\nexport function logout(payload: object): RequestOptionsFactory<any> {\n function __logout({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.iam.authentication.v1.authentication',\n method: 'GET' as any,\n methodFqn: 'wix.iam.authentication.v1.AuthenticationService.Logout',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixIamAuthenticationV1AuthenticationServiceUrl({\n protoPath: '/v1/logout',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTBytesToSDKBytes,\n paths: TRANSFORM_PATHS_6,\n },\n ]),\n };\n\n return metadata;\n }\n\n return __logout;\n}\n","import { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n LoginId,\n LoginV2ApplicationErrors,\n LoginV2Options,\n LoginV2ValidationErrors,\n LogoutOptions,\n RawHttpResponse,\n RegisterV2ApplicationErrors,\n RegisterV2Options,\n RegisterV2ValidationErrors,\n SignOnOptions,\n SignOnResponse,\n StateMachineResponse,\n ValidateEmailResponse,\n changePassword as universalChangePassword,\n loginV2 as universalLoginV2,\n logout as universalLogout,\n registerV2 as universalRegisterV2,\n signOn as universalSignOn,\n validateEmail as universalValidateEmail,\n} from './iam-authentication-v1-authentication-authentication.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/identity' };\n\nexport function registerV2(httpClient: HttpClient): RegisterV2Signature {\n return (loginId: LoginId, options?: RegisterV2Options) =>\n universalRegisterV2(\n loginId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface RegisterV2Signature {\n /**\n * Registers a new member.\n *\n * Typically, after a successful registration, you generate and use member tokens for the\n * registered member so that subsequent API calls are called as part of a member session.\n * Use the `sessionToken` in the response to [get the site member's access and refresh tokens](https://dev.wix.com/docs/go-headless/coding/rest-api/visitors-and-members/handle-members-with-custom-login#get-the-site-members-access-and-refresh-tokens).\n *\n * If the email used to register the member already exists as a contact email, the registering\n * member need to verify the email address using a code that is sent to the address.\n * @param - Identifier of the registering member.\n */\n (loginId: LoginId, options?: RegisterV2Options): Promise<\n NonNullablePaths<\n StateMachineResponse,\n | `state`\n | `identity.connections`\n | `identity.connections.${number}.idpConnection.idpConnectionId`\n | `identity.connections.${number}.idpConnection.idpUserId`\n | `identity.connections.${number}.authenticatorConnection.authenticatorConnectionId`\n | `identity.connections.${number}.authenticatorConnection.reEnrollmentRequired`\n | `identity.identityProfile.emails`\n | `identity.identityProfile.phones`\n | `identity.identityProfile.labels`\n | `identity.identityProfile.privacyStatus`\n | `identity.identityProfile.customFields`\n | `identity.identityProfile.customFields.${number}.name`\n | `identity.identityProfile.customFields.${number}.value.strValue`\n | `identity.identityProfile.customFields.${number}.value.numValue`\n | `identity.identityProfile.customFields.${number}.value.boolValue`\n | `identity.identityProfile.secondaryEmails`\n | `identity.identityProfile.secondaryEmails.${number}.email`\n | `identity.identityProfile.secondaryEmails.${number}.tag`\n | `identity.identityProfile.phonesV2`\n | `identity.identityProfile.phonesV2.${number}.phone`\n | `identity.identityProfile.phonesV2.${number}.tag`\n | `identity.identityProfile.addresses`\n | `identity.identityProfile.addresses.${number}.tag`\n | `identity.email.address`\n | `identity.email.isVerified`\n | `identity.status.name`\n | `identity.status.reasons`\n | `identity.factors`\n | `identity.factors.${number}.factorId`\n | `identity.factors.${number}.type`\n | `identity.factors.${number}.status`,\n 5\n > & {\n __applicationErrorsType?: RegisterV2ApplicationErrors;\n __validationErrorsType?: RegisterV2ValidationErrors;\n }\n >;\n}\n\nexport function validateEmail(httpClient: HttpClient): ValidateEmailSignature {\n return (email: string) =>\n universalValidateEmail(\n email,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ValidateEmailSignature {\n /** */\n (email: string): Promise<\n NonNullablePaths<\n ValidateEmailResponse,\n `valid` | `failure.reason` | `formatInvalid`,\n 1\n >\n >;\n}\n\nexport function loginV2(httpClient: HttpClient): LoginV2Signature {\n return (loginId: LoginId, options?: LoginV2Options) =>\n universalLoginV2(\n loginId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface LoginV2Signature {\n /**\n * Logs in an existing member.\n *\n * Typically, after a successful login, you generate and use member tokens for the\n * logged-in member so that subsequent API calls are called as part of a member session.\n * Use the `sessionToken` in the response to [get the site member's access and refresh tokens](https://dev.wix.com/docs/go-headless/coding/rest-api/visitors-and-members/handle-members-with-custom-login#get-the-site-members-access-and-refresh-tokens).\n * @param - Identifier of identity logging in.\n */\n (loginId: LoginId, options?: LoginV2Options): Promise<\n NonNullablePaths<\n StateMachineResponse,\n | `state`\n | `identity.connections`\n | `identity.connections.${number}.idpConnection.idpConnectionId`\n | `identity.connections.${number}.idpConnection.idpUserId`\n | `identity.connections.${number}.authenticatorConnection.authenticatorConnectionId`\n | `identity.connections.${number}.authenticatorConnection.reEnrollmentRequired`\n | `identity.identityProfile.emails`\n | `identity.identityProfile.phones`\n | `identity.identityProfile.labels`\n | `identity.identityProfile.privacyStatus`\n | `identity.identityProfile.customFields`\n | `identity.identityProfile.customFields.${number}.name`\n | `identity.identityProfile.customFields.${number}.value.strValue`\n | `identity.identityProfile.customFields.${number}.value.numValue`\n | `identity.identityProfile.customFields.${number}.value.boolValue`\n | `identity.identityProfile.secondaryEmails`\n | `identity.identityProfile.secondaryEmails.${number}.email`\n | `identity.identityProfile.secondaryEmails.${number}.tag`\n | `identity.identityProfile.phonesV2`\n | `identity.identityProfile.phonesV2.${number}.phone`\n | `identity.identityProfile.phonesV2.${number}.tag`\n | `identity.identityProfile.addresses`\n | `identity.identityProfile.addresses.${number}.tag`\n | `identity.email.address`\n | `identity.email.isVerified`\n | `identity.status.name`\n | `identity.status.reasons`\n | `identity.factors`\n | `identity.factors.${number}.factorId`\n | `identity.factors.${number}.type`\n | `identity.factors.${number}.status`,\n 5\n > & {\n __applicationErrorsType?: LoginV2ApplicationErrors;\n __validationErrorsType?: LoginV2ValidationErrors;\n }\n >;\n}\n\nexport function changePassword(\n httpClient: HttpClient\n): ChangePasswordSignature {\n return (newPassword: string) =>\n universalChangePassword(\n newPassword,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ChangePasswordSignature {\n /**\n * Changes the password of a logged-in member. The member must have a valid session to use this method.\n *\n * The member's session remains valid after password change.\n *\n * The new password must meet the site's configured password requirements for length\n * and complexity. These requirements are enforced automatically when processing the request.\n * @param - New password to set for the logged-in member.\n *\n * The password must meet the site's configured password requirements for length and complexity.\n */\n (newPassword: string): Promise<void>;\n}\n\nexport function signOn(httpClient: HttpClient): SignOnSignature {\n return (loginId: LoginId, options?: SignOnOptions) =>\n universalSignOn(\n loginId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface SignOnSignature {\n /**\n * Authenticates a member without credentials and returns a session token.\n *\n * This method provides authentication that automatically creates or updates\n * member accounts as needed during the authentication process.\n * Use this only for trusted integrations and scenarios where you already have verified user information.\n * @param - Member identifier for authentication.\n *\n * Currently only email addresses are supported.\n */\n (loginId: LoginId, options?: SignOnOptions): Promise<\n NonNullablePaths<\n SignOnResponse,\n | `sessionToken`\n | `identity.connections`\n | `identity.connections.${number}.idpConnection.idpConnectionId`\n | `identity.connections.${number}.idpConnection.idpUserId`\n | `identity.connections.${number}.authenticatorConnection.authenticatorConnectionId`\n | `identity.connections.${number}.authenticatorConnection.reEnrollmentRequired`\n | `identity.identityProfile.emails`\n | `identity.identityProfile.phones`\n | `identity.identityProfile.labels`\n | `identity.identityProfile.privacyStatus`\n | `identity.identityProfile.customFields`\n | `identity.identityProfile.customFields.${number}.name`\n | `identity.identityProfile.customFields.${number}.value.strValue`\n | `identity.identityProfile.customFields.${number}.value.numValue`\n | `identity.identityProfile.customFields.${number}.value.boolValue`\n | `identity.identityProfile.secondaryEmails`\n | `identity.identityProfile.secondaryEmails.${number}.email`\n | `identity.identityProfile.secondaryEmails.${number}.tag`\n | `identity.identityProfile.phonesV2`\n | `identity.identityProfile.phonesV2.${number}.phone`\n | `identity.identityProfile.phonesV2.${number}.tag`\n | `identity.identityProfile.addresses`\n | `identity.identityProfile.addresses.${number}.tag`\n | `identity.email.address`\n | `identity.email.isVerified`\n | `identity.status.name`\n | `identity.status.reasons`\n | `identity.factors`\n | `identity.factors.${number}.factorId`\n | `identity.factors.${number}.type`\n | `identity.factors.${number}.status`,\n 5\n >\n >;\n}\n\nexport function logout(httpClient: HttpClient): LogoutSignature {\n return (options?: LogoutOptions) =>\n universalLogout(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface LogoutSignature {\n /**\n * Terminates the member's session and clears authentication cookies.\n *\n * Returns the following:\n * - `body`: HTML content for the logout response\n * - `statusCode`: HTTP status code (200 for success, 302 for redirect)\n * - `headers`: Array of key-value pairs including:\n * - `Set-Cookie` headers to remove all session cookies\n * - `Location` header (when `postLogoutRedirectUri` is provided, with 302 status)\n */\n (options?: LogoutOptions): Promise<\n NonNullablePaths<\n RawHttpResponse,\n `body` | `headers` | `headers.${number}.key` | `headers.${number}.value`,\n 2\n >\n >;\n}\n\nexport {\n Address,\n AddressTag,\n AddressWrapper,\n Authentication,\n AuthenticatorConnection,\n CallVerifyData,\n CaptchaToken,\n CaptchaTokenTokenOneOf,\n ChangePasswordRequest,\n ChangePasswordResponse,\n ConnectIdpRequest,\n Connection,\n ConnectionTypeOneOf,\n CustomField,\n CustomValue,\n CustomValueValueOneOf,\n DeliveryMethod,\n Email,\n EmailTag,\n EmailValidationFailure,\n ExternalEmailVerifyData,\n Factor,\n FactorStatus,\n FactorType,\n GetWebauthnChallengeRequest,\n GetWebauthnChallengeResponse,\n HeadersEntry,\n Identity,\n IdentityProfile,\n IdpConnection,\n ListValue,\n LoginCallbackRequest,\n LoginId,\n LoginIdTypeOneOf,\n LoginV2Options,\n LoginV2Request,\n LoginWithIdpConnectionRedirectRequest,\n LoginWithIdpConnectionRequest,\n LoginWithIdpConnectionTokenParamsRequest,\n LogoutOptions,\n LogoutRequest,\n MapValue,\n Metadata,\n MfaChallengeData,\n MfaReason,\n PasswordVerifyData,\n PathParametersEntry,\n Phone,\n PhoneTag,\n PrivacyStatus,\n PushChallengeData,\n PushVerifyData,\n QueryParametersEntry,\n RawHttpRequest,\n RawHttpResponse,\n Reason,\n RecaptchaForClientSiteKey,\n RecoveryCodeVerifyData,\n RegisterV2Options,\n RegisterV2Request,\n RequireMfaData,\n SecondaryEmail,\n SignOnOptions,\n SignOnRequest,\n SignOnResponse,\n SmsVerifyData,\n StateMachineResponse,\n StateMachineResponseStateDataOneOf,\n StateType,\n Status,\n StatusName,\n StatusV2,\n TenantType,\n TotpVerifyData,\n V1CustomValue,\n V1CustomValueValueOneOf,\n V1Factor,\n V1ListValue,\n V1MapValue,\n V1Reason,\n ValidateEmailRequest,\n ValidateEmailResponse,\n VerificationChallenge,\n VerificationChallengeFactorChallengeDataOneOf,\n VerifyRequest,\n VerifyRequestFactorDataOneOf,\n WebAuthnChallengeData,\n WebAuthnVerifyData,\n} from './iam-authentication-v1-authentication-authentication.universal.js';\n","import {\n registerV2 as publicRegisterV2,\n validateEmail as publicValidateEmail,\n loginV2 as publicLoginV2,\n changePassword as publicChangePassword,\n signOn as publicSignOn,\n logout as publicLogout,\n} from './iam-authentication-v1-authentication-authentication.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { BuildRESTFunction, MaybeContext } from '@wix/sdk-types';\n\nexport const registerV2: MaybeContext<\n BuildRESTFunction<typeof publicRegisterV2> & typeof publicRegisterV2\n> = /*#__PURE__*/ createRESTModule(publicRegisterV2);\nexport const validateEmail: MaybeContext<\n BuildRESTFunction<typeof publicValidateEmail> & typeof publicValidateEmail\n> = /*#__PURE__*/ createRESTModule(publicValidateEmail);\nexport const loginV2: MaybeContext<\n BuildRESTFunction<typeof publicLoginV2> & typeof publicLoginV2\n> = /*#__PURE__*/ createRESTModule(publicLoginV2);\nexport const changePassword: MaybeContext<\n BuildRESTFunction<typeof publicChangePassword> & typeof publicChangePassword\n> = /*#__PURE__*/ createRESTModule(publicChangePassword);\nexport const signOn: MaybeContext<\n BuildRESTFunction<typeof publicSignOn> & typeof publicSignOn\n> = /*#__PURE__*/ createRESTModule(publicSignOn);\nexport const logout: MaybeContext<\n BuildRESTFunction<typeof publicLogout> & typeof publicLogout\n> = /*#__PURE__*/ createRESTModule(publicLogout);\n\nexport {\n PrivacyStatus,\n EmailTag,\n PhoneTag,\n AddressTag,\n FactorType,\n StateType,\n StatusName,\n V1Reason,\n Status,\n FactorStatus,\n MfaReason,\n Reason,\n TenantType,\n DeliveryMethod,\n} from './iam-authentication-v1-authentication-authentication.universal.js';\nexport {\n Authentication,\n RegisterV2Request,\n LoginId,\n LoginIdTypeOneOf,\n IdentityProfile,\n CustomField,\n V1CustomValue,\n V1CustomValueValueOneOf,\n V1ListValue,\n V1MapValue,\n SecondaryEmail,\n Phone,\n AddressWrapper,\n Address,\n CaptchaToken,\n CaptchaTokenTokenOneOf,\n RecaptchaForClientSiteKey,\n StateMachineResponse,\n StateMachineResponseStateDataOneOf,\n Identity,\n Connection,\n ConnectionTypeOneOf,\n IdpConnection,\n AuthenticatorConnection,\n Metadata,\n Email,\n StatusV2,\n Factor,\n CustomValue,\n CustomValueValueOneOf,\n ListValue,\n MapValue,\n RequireMfaData,\n V1Factor,\n MfaChallengeData,\n VerificationChallenge,\n VerificationChallengeFactorChallengeDataOneOf,\n PushChallengeData,\n WebAuthnChallengeData,\n ValidateEmailRequest,\n ValidateEmailResponse,\n EmailValidationFailure,\n LoginV2Request,\n WebAuthnVerifyData,\n ExternalEmailVerifyData,\n ChangePasswordRequest,\n ChangePasswordResponse,\n LoginWithIdpConnectionRequest,\n RawHttpResponse,\n HeadersEntry,\n RawHttpRequest,\n PathParametersEntry,\n QueryParametersEntry,\n LoginWithIdpConnectionRedirectRequest,\n ConnectIdpRequest,\n LoginCallbackRequest,\n LoginWithIdpConnectionTokenParamsRequest,\n SignOnRequest,\n SignOnResponse,\n LogoutRequest,\n VerifyRequest,\n VerifyRequestFactorDataOneOf,\n SmsVerifyData,\n CallVerifyData,\n TotpVerifyData,\n PushVerifyData,\n RecoveryCodeVerifyData,\n PasswordVerifyData,\n GetWebauthnChallengeRequest,\n GetWebauthnChallengeResponse,\n RegisterV2Options,\n LoginV2Options,\n SignOnOptions,\n LogoutOptions,\n} from './iam-authentication-v1-authentication-authentication.universal.js';\nexport {\n PrivacyStatusWithLiterals,\n EmailTagWithLiterals,\n PhoneTagWithLiterals,\n AddressTagWithLiterals,\n FactorTypeWithLiterals,\n StateTypeWithLiterals,\n StatusNameWithLiterals,\n V1ReasonWithLiterals,\n StatusWithLiterals,\n FactorStatusWithLiterals,\n MfaReasonWithLiterals,\n ReasonWithLiterals,\n TenantTypeWithLiterals,\n DeliveryMethodWithLiterals,\n RegisterV2ApplicationErrors,\n RegisterV2ValidationErrors,\n LoginV2ApplicationErrors,\n LoginV2ValidationErrors,\n} from './iam-authentication-v1-authentication-authentication.universal.js';\n"],"mappings":";AAAA,SAAS,kBAAkB,yBAAyB;AACpD;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACJP,SAAS,yBAAyB;AAClC,SAAS,oCAAoC;AAC7C,SAAS,oCAAoC;AAC7C,SAAS,oCAAoC;AAC7C,SAAS,4CAA4C;AACrD,SAAS,4CAA4C;AACrD,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAI3B,IAAM,oBAAoB,CAAC,EAAE,MAAM,sCAAsC,CAAC;AAC1E,IAAM,oBAAoB,CAAC,EAAE,MAAM,uCAAuC,CAAC;AAC3E,IAAM,oBAAoB;AAAA,EACxB,EAAE,MAAM,uBAAuB;AAAA,EAC/B,EAAE,MAAM,uBAAuB;AAAA,EAC/B,EAAE,MAAM,wDAAwD;AAAA,EAChE,EAAE,MAAM,6BAA6B;AACvC;AACA,IAAM,oBAAoB;AAAA,EACxB,EAAE,MAAM,uDAAuD;AAAA,EAC/D,EAAE,MAAM,4BAA4B;AACtC;AACA,IAAM,oBAAoB;AAAA,EACxB,EAAE,MAAM,uBAAuB;AAAA,EAC/B,EAAE,MAAM,uBAAuB;AAAA,EAC/B,EAAE,MAAM,wDAAwD;AAClE;AACA,IAAM,oBAAoB;AAAA,EACxB,EAAE,MAAM,uDAAuD;AACjE;AACA,IAAM,oBAAoB,CAAC,EAAE,MAAM,OAAO,CAAC;AAE3C,SAAS,sDACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,GAAG;AAAA,MACD;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,uBAAuB;AAAA,MACrB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA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AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;AAoDO,SAASC,QAAO,YAAyC;AAC9D,SAAO,CAAC,YACNA;AAAA,IACE;AAAA;AAAA,IAEA,EAAE,WAAW;AAAA,EACf;AACJ;;;AC/PA,SAAS,wBAAwB;AAG1B,IAAMC,cAEK,iCAAiBA,WAAgB;AAC5C,IAAMC,iBAEK,iCAAiBA,cAAmB;AAC/C,IAAMC,WAEK,iCAAiBA,QAAa;AACzC,IAAMC,kBAEK,iCAAiBA,eAAoB;AAChD,IAAMC,UAEK,iCAAiBA,OAAY;AACxC,IAAMC,UAEK,iCAAiBA,OAAY;","names":["payload","transformPaths","TRANSFORM_PATHS_0","TRANSFORM_PATHS_1","PrivacyStatus","EmailTag","PhoneTag","AddressTag","FactorType","StateType","StatusName","V1Reason","Status","FactorStatus","MfaReason","Reason","TenantType","DeliveryMethod","registerV2","validateEmail","loginV2","changePassword","signOn","logout","registerV2","validateEmail","loginV2","changePassword","signOn","logout","registerV2","validateEmail","loginV2","changePassword","signOn","logout"]}
@@ -15,7 +15,7 @@ interface RegisterV2Request {
15
15
  clientMetaData?: Record<string, any> | null;
16
16
  /**
17
17
  * The factor to register with: `PASSWORD`, the default, or `EMAIL`, which sends a code and returns
18
- * `REQUIRE_REGISTRATION_FACTOR` until the code is submitted to `Verify`.
18
+ * `REQUIRE_REGISTER_CHALLENGE` until the code is submitted to `Verify`.
19
19
  */
20
20
  factorType?: FactorTypeWithLiterals;
21
21
  /**
@@ -324,11 +324,11 @@ declare enum StateType {
324
324
  REQUIRE_EMAIL_VERIFICATION = "REQUIRE_EMAIL_VERIFICATION",
325
325
  /** The `status` is not one that prevents the member logging in, meaning it's not `OFFLINE`, `BLOCKED`, or `DELETED`. */
326
326
  STATUS_CHECK = "STATUS_CHECK",
327
- /** Member is missing fields that are marked as required on the site's signup form, and needs to complete them to finish registration. */
328
- REQUIRE_MISSING_FIELDS = "REQUIRE_MISSING_FIELDS"
327
+ /** Member must submit the profile-completion form to continue registration. */
328
+ REQUIRE_PROFILE_COMPLETION = "REQUIRE_PROFILE_COMPLETION"
329
329
  }
330
330
  /** @enumType */
331
- type StateTypeWithLiterals = StateType | 'UNKNOWN_STATE' | 'SUCCESS' | 'REQUIRE_OWNER_APPROVAL' | 'REQUIRE_EMAIL_VERIFICATION' | 'STATUS_CHECK' | 'REQUIRE_MISSING_FIELDS';
331
+ type StateTypeWithLiterals = StateType | 'UNKNOWN_STATE' | 'SUCCESS' | 'REQUIRE_OWNER_APPROVAL' | 'REQUIRE_EMAIL_VERIFICATION' | 'STATUS_CHECK' | 'REQUIRE_PROFILE_COMPLETION';
332
332
  interface Identity {
333
333
  /**
334
334
  * Identity ID.
@@ -444,11 +444,11 @@ declare enum V1Reason {
444
444
  PENDING_ADMIN_APPROVAL_REQUIRED = "PENDING_ADMIN_APPROVAL_REQUIRED",
445
445
  /** The identity has to verify the email. After the verification, the identity has an `ACTIVE` status. */
446
446
  PENDING_EMAIL_VERIFICATION_REQUIRED = "PENDING_EMAIL_VERIFICATION_REQUIRED",
447
- /** The identity is missing fields that are marked as required on the site's signup form. After completing them, the identity has an `ACTIVE` status. */
448
- PENDING_REQUIRED_FIELDS_MISSING = "PENDING_REQUIRED_FIELDS_MISSING"
447
+ /** The identity must complete the site's profile-completion form. Other pending requirements may remain after completion. */
448
+ PENDING_PROFILE_COMPLETION_REQUIRED = "PENDING_PROFILE_COMPLETION_REQUIRED"
449
449
  }
450
450
  /** @enumType */
451
- type V1ReasonWithLiterals = V1Reason | 'UNKNOWN_REASON' | 'PENDING_ADMIN_APPROVAL_REQUIRED' | 'PENDING_EMAIL_VERIFICATION_REQUIRED' | 'PENDING_REQUIRED_FIELDS_MISSING';
451
+ type V1ReasonWithLiterals = V1Reason | 'UNKNOWN_REASON' | 'PENDING_ADMIN_APPROVAL_REQUIRED' | 'PENDING_EMAIL_VERIFICATION_REQUIRED' | 'PENDING_PROFILE_COMPLETION_REQUIRED';
452
452
  interface Factor {
453
453
  /**
454
454
  * Factor ID.
@@ -1161,7 +1161,7 @@ interface RegisterV2Options {
1161
1161
  clientMetaData?: Record<string, any> | null;
1162
1162
  /**
1163
1163
  * The factor to register with: `PASSWORD`, the default, or `EMAIL`, which sends a code and returns
1164
- * `REQUIRE_REGISTRATION_FACTOR` until the code is submitted to `Verify`.
1164
+ * `REQUIRE_REGISTER_CHALLENGE` until the code is submitted to `Verify`.
1165
1165
  */
1166
1166
  factorType?: FactorTypeWithLiterals;
1167
1167
  /**
@@ -390,8 +390,8 @@ var StateType = /* @__PURE__ */ ((StateType2) => {
390
390
  StateType2["REQUIRE_MFA"] = "REQUIRE_MFA";
391
391
  StateType2["MFA_CHALLENGE"] = "MFA_CHALLENGE";
392
392
  StateType2["REQUIRE_FIRST_FACTOR"] = "REQUIRE_FIRST_FACTOR";
393
- StateType2["REQUIRE_MISSING_FIELDS"] = "REQUIRE_MISSING_FIELDS";
394
- StateType2["REQUIRE_REGISTRATION_FACTOR"] = "REQUIRE_REGISTRATION_FACTOR";
393
+ StateType2["REQUIRE_PROFILE_COMPLETION"] = "REQUIRE_PROFILE_COMPLETION";
394
+ StateType2["REQUIRE_REGISTER_CHALLENGE"] = "REQUIRE_REGISTER_CHALLENGE";
395
395
  StateType2["REQUIRE_LOGIN_CHALLENGE"] = "REQUIRE_LOGIN_CHALLENGE";
396
396
  return StateType2;
397
397
  })(StateType || {});
@@ -408,7 +408,7 @@ var V1Reason = /* @__PURE__ */ ((V1Reason2) => {
408
408
  V1Reason2["UNKNOWN_REASON"] = "UNKNOWN_REASON";
409
409
  V1Reason2["PENDING_ADMIN_APPROVAL_REQUIRED"] = "PENDING_ADMIN_APPROVAL_REQUIRED";
410
410
  V1Reason2["PENDING_EMAIL_VERIFICATION_REQUIRED"] = "PENDING_EMAIL_VERIFICATION_REQUIRED";
411
- V1Reason2["PENDING_REQUIRED_FIELDS_MISSING"] = "PENDING_REQUIRED_FIELDS_MISSING";
411
+ V1Reason2["PENDING_PROFILE_COMPLETION_REQUIRED"] = "PENDING_PROFILE_COMPLETION_REQUIRED";
412
412
  return V1Reason2;
413
413
  })(V1Reason || {});
414
414
  var Status = /* @__PURE__ */ ((Status2) => {