import { RegisterV2Request as RegisterV2Request$1, StateMachineResponse as StateMachineResponse$1, ValidateEmailRequest as ValidateEmailRequest$1, ValidateEmailResponse as ValidateEmailResponse$1, LoginV2Request as LoginV2Request$1, ChangePasswordRequest as ChangePasswordRequest$1, ChangePasswordResponse as ChangePasswordResponse$1, SignOnRequest as SignOnRequest$1, SignOnResponse as SignOnResponse$1, LogoutRequest as LogoutRequest$1, RawHttpResponse as RawHttpResponse$1 } from './index.typings.js'; import '@wix/sdk-types'; interface Authentication { } /** * Published for a passed check as well as a rejected one, so a consumer can tell a rejection rate * from a rejection count. * * The caller's IP, geo and user agent are deliberately not fields: they travel as call-scope aspects * in the message headers, which only reach a single-record subscription - a batch handler runs on an * orphan CallScope and loses them. */ interface CaptchaVerification { /** @format GUID */ eventId?: string; /** When the check happened, not when this was published. */ eventTime?: Date | null; flow?: CaptchaFlowWithLiterals; identityType?: CaptchaIdentityTypeWithLiterals; /** * Legacy combined outcome. Use result and decision_reason instead. * @deprecated Legacy combined outcome. Use result and decision_reason instead. * @replacedBy result * @targetRemovalDate 2027-04-18 */ outcome?: CaptchaOutcomeWithLiterals; captchaKind?: CaptchaKindWithLiterals; /** * Legacy derived value. New events carry score and threshold instead. * @min -1 * @max 1 * @deprecated * @replacedBy score * @targetRemovalDate 2027-04-19 */ minScoreMargin?: number | null; /** * Google's reasons for the score: AUTOMATION, UNEXPECTED_ENVIRONMENT, TOO_MUCH_TRAFFIC, ... * @maxLength 100 * @maxSize 100 */ reasons?: string[]; /** What happened after verification, independently of why. */ result?: CaptchaResultWithLiterals; /** The deciding cause of rejection or escalation. Unspecified for a pass. */ decisionReason?: CaptchaDecisionReasonWithLiterals; /** * Raw reCAPTCHA assessment score, when available. Zero is a score, not an absent assessment. * @max 1 */ score?: number | null; /** * Effective minimum used for this assessment, including surface and OS policy. * Passing requires score strictly greater than threshold. Result/reason remain authoritative. * @max 1 */ threshold?: number | null; } declare enum CaptchaFlow { REGISTER = "REGISTER", /** Not published yet. */ LOGIN = "LOGIN" } /** @enumType */ type CaptchaFlowWithLiterals = CaptchaFlow | 'REGISTER' | 'LOGIN'; declare enum CaptchaIdentityType { USER = "USER", /** Not published yet. */ MEMBER = "MEMBER" } /** @enumType */ type CaptchaIdentityTypeWithLiterals = CaptchaIdentityType | 'USER' | 'MEMBER'; declare enum CaptchaOutcome { PASSED = "PASSED", LOW_SCORE = "LOW_SCORE", /** Rejected as inauthentic, which is independent of the score. */ INVALID_TOKEN = "INVALID_TOKEN", MISSING_TOKEN = "MISSING_TOKEN", /** * Escalated to a visible challenge. PerimeterX can cause this while reCAPTCHA itself passed, so it * does not on its own mean the captcha scored badly - `reasons` distinguishes them. */ VISIBLE_REQUIRED = "VISIBLE_REQUIRED" } /** @enumType */ type CaptchaOutcomeWithLiterals = CaptchaOutcome | 'PASSED' | 'LOW_SCORE' | 'INVALID_TOKEN' | 'MISSING_TOKEN' | 'VISIBLE_REQUIRED'; declare enum CaptchaKind { INVISIBLE = "INVISIBLE", VISIBLE = "VISIBLE", /** Verified against a site key the client registered itself (branded and headless apps). */ CLIENT_SITE_KEY = "CLIENT_SITE_KEY" } /** @enumType */ type CaptchaKindWithLiterals = CaptchaKind | 'INVISIBLE' | 'VISIBLE' | 'CLIENT_SITE_KEY'; declare enum CaptchaResult { VERIFICATION_PASSED = "VERIFICATION_PASSED", VERIFICATION_REJECTED = "VERIFICATION_REJECTED", CHALLENGE_REQUIRED = "CHALLENGE_REQUIRED" } /** @enumType */ type CaptchaResultWithLiterals = CaptchaResult | 'VERIFICATION_PASSED' | 'VERIFICATION_REJECTED' | 'CHALLENGE_REQUIRED'; declare enum CaptchaDecisionReason { SCORE_BELOW_THRESHOLD = "SCORE_BELOW_THRESHOLD", TOKEN_INVALID = "TOKEN_INVALID", TOKEN_MISSING = "TOKEN_MISSING", PERIMETERX_REJECTED = "PERIMETERX_REJECTED" } /** @enumType */ type CaptchaDecisionReasonWithLiterals = CaptchaDecisionReason | 'SCORE_BELOW_THRESHOLD' | 'TOKEN_INVALID' | 'TOKEN_MISSING' | 'PERIMETERX_REJECTED'; interface RegisterV2Request { /** Identifier of the registering member. */ loginId: LoginId; /** Password of the registering member. */ password?: string; /** Profile information of registering member. */ profile?: IdentityProfile; /** CAPTCHA tokens, when CAPTCHA setting is on. */ captchaTokens?: CaptchaToken[]; /** Additional data that's relevant for the flow. */ clientMetaData?: Record | null; /** * The factor to register with: `PASSWORD`, the default, or `EMAIL`, which sends a code and returns * `REQUIRE_REGISTER_CHALLENGE` until the code is submitted to `Verify`. */ factorType?: FactorTypeWithLiterals; /** The organization the user registers into. The new user's account is created as a sub-account of this organization. */ organization?: Organization; } interface LoginId extends LoginIdTypeOneOf { /** * Login email address. * @format EMAIL */ email?: string; } /** @oneof */ interface LoginIdTypeOneOf { /** * Login email address. * @format EMAIL */ email?: string; } interface IdentityProfile { /** Member's first name. */ firstName?: string | null; /** Member's last name. */ lastName?: string | null; /** Member's display nickname. */ nickname?: string | null; /** URL to member's profile picture. */ picture?: string | null; /** * Deprecated. Use `secondaryEmails` instead. * @deprecated Deprecated. Use `secondaryEmails` instead. * @replacedBy secondary_emails * @targetRemovalDate 2023-11-01 */ emails?: string[]; /** * Deprecated. Use `phonesV2` instead. * @deprecated Deprecated. Use `phonesV2` instead. * @replacedBy phones_v2 * @targetRemovalDate 2023-11-01 */ phones?: string[]; /** * Labels associated with the member. * @maxSize 2000 */ labels?: string[]; /** * Member's preferred language code. * @format LANGUAGE */ language?: string | null; /** Member's profile visibility setting. */ privacyStatus?: PrivacyStatusWithLiterals; /** * Any number of custom fields. [Custom fields](https://support.wix.com/en/article/adding-custom-fields-to-contacts) * are used to store additional information about your site or app's contacts. */ customFields?: CustomField[]; /** Additional email addresses for the member. */ secondaryEmails?: SecondaryEmail[]; /** Phone numbers associated with the member. */ phonesV2?: Phone[]; /** Physical addresses for the member. */ addresses?: AddressWrapper[]; /** * Company name. * @maxLength 1000 */ company?: string | null; /** * Position within company. * @maxLength 1000 */ position?: string | null; /** * Member's birth date in `YYYY-MM-DD` format. * @format LOCAL_DATE */ birthdate?: string | null; /** * URL-friendly slug for the member's profile. * @maxLength 255 */ slug?: string | null; /** Whether the member consents to receive marketing communications. */ subscription?: boolean | null; /** * Tax ID or VAT number for personal or corporate use. * @maxLength 1000 */ vatId?: string | null; } declare enum PrivacyStatus { /** No privacy status defined. */ UNDEFINED = "UNDEFINED", /** Profile details are visible to other members. */ PUBLIC = "PUBLIC", /** Profile details are hidden from other members. */ PRIVATE = "PRIVATE" } /** @enumType */ type PrivacyStatusWithLiterals = PrivacyStatus | 'UNDEFINED' | 'PUBLIC' | 'PRIVATE'; interface CustomField { /** * Custom field name matching an extended field key (without `custom.` prefix). * * Must match a key from [`List Extended Fields`](https://dev.wix.com/docs/rest/api-reference/contacts/extended-fields/list-extended-fields). */ name?: string; /** Value for the custom field. */ value?: V1CustomValue; } interface V1CustomValue extends V1CustomValueValueOneOf { /** Text value. */ strValue?: string; /** Numeric value. */ numValue?: number; /** Date/time value. */ dateValue?: Date | null; /** List of values. */ listValue?: V1ListValue; /** Key-value pairs. */ mapValue?: V1MapValue; /** Bool value */ boolValue?: boolean; } /** @oneof */ interface V1CustomValueValueOneOf { /** Text value. */ strValue?: string; /** Numeric value. */ numValue?: number; /** Date/time value. */ dateValue?: Date | null; /** List of values. */ listValue?: V1ListValue; /** Key-value pairs. */ mapValue?: V1MapValue; /** Bool value */ boolValue?: boolean; } interface V1ListValue { /** List of custom values. */ value?: V1CustomValue[]; } interface V1MapValue { /** Map of custom field values. */ value?: Record; } interface SecondaryEmail { /** * Secondary email address. * @format EMAIL */ email?: string; /** Email tag. */ tag?: EmailTagWithLiterals; } declare enum EmailTag { UNTAGGED = "UNTAGGED", MAIN = "MAIN", HOME = "HOME", WORK = "WORK" } /** @enumType */ type EmailTagWithLiterals = EmailTag | 'UNTAGGED' | 'MAIN' | 'HOME' | 'WORK'; interface Phone { /** * Country code for the phone number. * @format COUNTRY */ countryCode?: string | null; /** * Phone number without country code. * @format PHONE */ phone?: string; /** Phone tag. */ tag?: PhoneTagWithLiterals; } declare enum PhoneTag { UNTAGGED = "UNTAGGED", MAIN = "MAIN", HOME = "HOME", MOBILE = "MOBILE", WORK = "WORK", FAX = "FAX" } /** @enumType */ type PhoneTagWithLiterals = PhoneTag | 'UNTAGGED' | 'MAIN' | 'HOME' | 'MOBILE' | 'WORK' | 'FAX'; interface AddressWrapper { /** Physical address details. */ address?: Address; /** Address tag. */ tag?: AddressTagWithLiterals; } /** Physical address */ interface Address { /** * Country code. * @format COUNTRY */ country?: string | null; /** Subdivision. Usually a state, region, prefecture, or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2). */ subdivision?: string | null; /** City name. */ city?: string | null; /** Zip/postal code. */ postalCode?: string | null; /** Main address line, usually street and number as free text. */ addressLine?: string | null; /** Free text providing more detailed address info. Usually contains apartment, suite, and floor. */ addressLine2?: string | null; /** * Street name. * @maxLength 1000 */ streetName?: string | null; /** * Street number. * @maxLength 1000 */ streetNumber?: string | null; } declare enum AddressTag { UNTAGGED = "UNTAGGED", HOME = "HOME", WORK = "WORK", BILLING = "BILLING", SHIPPING = "SHIPPING" } /** @enumType */ type AddressTagWithLiterals = AddressTag | 'UNTAGGED' | 'HOME' | 'WORK' | 'BILLING' | 'SHIPPING'; interface CaptchaToken extends CaptchaTokenTokenOneOf { /** @maxLength 5000 */ Recaptcha?: string; /** @maxLength 5000 */ InvisibleRecaptcha?: string; /** @maxLength 5000 */ NoCaptcha?: string; /** Use this when the client has registered their own reCAPTCHA site key (e.g., branded apps, headless apps). */ recaptchaForClientSiteKey?: RecaptchaForClientSiteKey; } /** @oneof */ interface CaptchaTokenTokenOneOf { /** @maxLength 5000 */ Recaptcha?: string; /** @maxLength 5000 */ InvisibleRecaptcha?: string; /** @maxLength 5000 */ NoCaptcha?: string; /** Use this when the client has registered their own reCAPTCHA site key (e.g., branded apps, headless apps). */ recaptchaForClientSiteKey?: RecaptchaForClientSiteKey; } /** reCAPTCHA token with a client-provided site key ID. */ interface RecaptchaForClientSiteKey { /** * The reCAPTCHA token obtained from the client-side reCAPTCHA widget. * @maxLength 5000 */ token?: string; /** * The site key ID registered in ReCAPTCHA service SDL for this client's reCAPTCHA configuration. * @format GUID */ siteKeyId?: string; } declare enum FactorType { /** Requires a password. */ PASSWORD = "PASSWORD", /** Requires a code sent via SMS. */ SMS = "SMS", /** Requires a code sent by phone call. */ CALL = "CALL", /** Requires a code sent by email. */ EMAIL = "EMAIL", /** Requires authentication via an authenticator app. */ TOTP = "TOTP", /** Requires authentication via a push notification. */ PUSH = "PUSH", /** Requires authentication via WebAuthn/passkey. */ WEBAUTHN = "WEBAUTHN", /** Requires a recovery code. */ RECOVERY_CODE = "RECOVERY_CODE" } /** @enumType */ type FactorTypeWithLiterals = FactorType | 'PASSWORD' | 'SMS' | 'CALL' | 'EMAIL' | 'TOTP' | 'PUSH' | 'WEBAUTHN' | 'RECOVERY_CODE'; interface Organization { /** * ID of the organization. Required whenever `organization` is set. * @format GUID */ id?: string; /** * One-time registration invite code for this organization. Optional. * @maxLength 64 */ inviteCode?: string | null; } interface StateMachineResponse extends StateMachineResponseStateDataOneOf { /** Current state of the login or registration process. */ state?: StateTypeWithLiterals; /** Session token. If `state` is not `SUCCESS`, this field is undefined. */ sessionToken?: string | null; /** Token that represents the current state of the login or registration process. */ stateToken?: string | null; /** Identity of the current member. */ identity?: Identity; /** Additional data relevant to the login or registration process. */ additionalData?: Record; } /** @oneof */ interface StateMachineResponseStateDataOneOf { } declare enum StateType { /** Initial unknown state. */ UNKNOWN_STATE = "UNKNOWN_STATE", /** Login completed successfully. */ SUCCESS = "SUCCESS", /** Member needs the owner to approve their registration. */ REQUIRE_OWNER_APPROVAL = "REQUIRE_OWNER_APPROVAL", /** Member needs to verify their email. */ REQUIRE_EMAIL_VERIFICATION = "REQUIRE_EMAIL_VERIFICATION", /** The `status` is not one that prevents the member logging in, meaning it's not `OFFLINE`, `BLOCKED`, or `DELETED`. */ STATUS_CHECK = "STATUS_CHECK", /** Member must submit the profile-completion form to continue registration. */ REQUIRE_PROFILE_COMPLETION = "REQUIRE_PROFILE_COMPLETION" } /** @enumType */ type StateTypeWithLiterals = StateType | 'UNKNOWN_STATE' | 'SUCCESS' | 'REQUIRE_OWNER_APPROVAL' | 'REQUIRE_EMAIL_VERIFICATION' | 'STATUS_CHECK' | 'REQUIRE_PROFILE_COMPLETION'; interface Identity { /** * Identity ID. * @format GUID */ id?: string | null; /** * Revision number, which increments by 1 each time the identity is updated. * To prevent conflicting changes, * the current revision must be passed when updating the identity. * * Ignored when creating an identity. */ revision?: string | null; /** * Date and time the identity was created. * @readonly */ createdDate?: Date | null; /** * Date and time the identity was updated. * @readonly */ updatedDate?: Date | null; /** The identity configured connections to authenticate with. */ connections?: Connection[]; /** Identity profile. */ identityProfile?: IdentityProfile; /** * Additional information about the identity that can impact user access. * This data cannot be set. */ metadata?: Metadata; /** Identity email address. */ email?: Email; /** Identity's current status. */ status?: StatusV2; /** * Identity verification factors. * @maxSize 10 * @readonly */ factors?: Factor[]; } interface Connection extends ConnectionTypeOneOf { /** IDP connection. */ idpConnection?: IdpConnection; /** Authenticator connection. */ authenticatorConnection?: AuthenticatorConnection; } /** @oneof */ interface ConnectionTypeOneOf { /** IDP connection. */ idpConnection?: IdpConnection; /** Authenticator connection. */ authenticatorConnection?: AuthenticatorConnection; } interface IdpConnection { /** * IDP connection ID. * @format GUID */ idpConnectionId?: string; /** IDP user ID. */ idpUserId?: string; } interface AuthenticatorConnection { /** * Authenticator connection ID. * @format GUID */ authenticatorConnectionId?: string; /** Whether re-enrollment is required. */ reEnrollmentRequired?: boolean; } interface Metadata { } interface Email { /** * Email address. * @format EMAIL */ address?: string; /** Whether the email address is verified. */ isVerified?: boolean; } interface StatusV2 { /** Descriptive name of the identity status. */ name?: StatusNameWithLiterals; /** Reasons for the current identity status. */ reasons?: V1ReasonWithLiterals[]; } declare enum StatusName { /** Unknown status. This value isn't used. */ UNKNOWN_STATUS = "UNKNOWN_STATUS", /** Identity is pending verification, owner approval, or both. */ PENDING = "PENDING", /** Identity is active and can log in. */ ACTIVE = "ACTIVE", /** Identity is deleted. This identity can't log in. */ DELETED = "DELETED", /** Identity is blocked. This identity can't log in. */ BLOCKED = "BLOCKED", /** Identity is offline. This identity can't log in. */ OFFLINE = "OFFLINE" } /** @enumType */ type StatusNameWithLiterals = StatusName | 'UNKNOWN_STATUS' | 'PENDING' | 'ACTIVE' | 'DELETED' | 'BLOCKED' | 'OFFLINE'; declare enum V1Reason { /** Unknown reason. This value isn't used. */ UNKNOWN_REASON = "UNKNOWN_REASON", /** The identity is waiting for admin approval. After the approval, the identity has an `ACTIVE` status. */ PENDING_ADMIN_APPROVAL_REQUIRED = "PENDING_ADMIN_APPROVAL_REQUIRED", /** The identity has to verify the email. After the verification, the identity has an `ACTIVE` status. */ PENDING_EMAIL_VERIFICATION_REQUIRED = "PENDING_EMAIL_VERIFICATION_REQUIRED", /** The identity must complete the site's profile-completion form. Other pending requirements may remain after completion. */ PENDING_PROFILE_COMPLETION_REQUIRED = "PENDING_PROFILE_COMPLETION_REQUIRED" } /** @enumType */ type V1ReasonWithLiterals = V1Reason | 'UNKNOWN_REASON' | 'PENDING_ADMIN_APPROVAL_REQUIRED' | 'PENDING_EMAIL_VERIFICATION_REQUIRED' | 'PENDING_PROFILE_COMPLETION_REQUIRED'; interface Factor { /** * Factor ID. * @format GUID */ factorId?: string; /** Factor type. */ type?: FactorTypeWithLiterals; /** Factor status. */ status?: StatusWithLiterals; } declare enum Status { /** Factor requires activation. */ INACTIVE = "INACTIVE", /** Factor is active and can be used for authentication. */ ACTIVE = "ACTIVE", /** Factor is blocked and cannot be used for authentication. The user should reenroll the factor. */ REQUIRE_REENROLL = "REQUIRE_REENROLL" } /** @enumType */ type StatusWithLiterals = Status | 'INACTIVE' | 'ACTIVE' | 'REQUIRE_REENROLL'; interface CustomValue extends CustomValueValueOneOf { /** String value. */ strValue?: string; /** Number value. */ numValue?: number; /** Date value. */ dateValue?: Date | null; /** List value. */ listValue?: ListValue; /** Map value. */ mapValue?: MapValue; } /** @oneof */ interface CustomValueValueOneOf { /** String value. */ strValue?: string; /** Number value. */ numValue?: number; /** Date value. */ dateValue?: Date | null; /** List value. */ listValue?: ListValue; /** Map value. */ mapValue?: MapValue; } interface ListValue { /** Custom value. */ value?: CustomValue[]; } interface MapValue { /** Mapped custom value. */ value?: Record; } interface RequireMfaData { /** * The factors available for the user to perform the required MFA. * @maxSize 100 */ availableFactors?: V1Factor[]; /** The reason the user is required to perform MFA. */ reason?: MfaReasonWithLiterals; } interface V1Factor { /** Type of verification factor. */ factorType?: FactorTypeWithLiterals; /** Availability status for second factor */ factorStatus?: FactorStatusWithLiterals; } declare enum FactorStatus { ENABLED = "ENABLED", REQUIRE_ACTIVATION = "REQUIRE_ACTIVATION", REQUIRE_REENROLL = "REQUIRE_REENROLL", ENABLED_BY_RULE = "ENABLED_BY_RULE", DISABLED_BY_RULE = "DISABLED_BY_RULE" } /** @enumType */ type FactorStatusWithLiterals = FactorStatus | 'ENABLED' | 'REQUIRE_ACTIVATION' | 'REQUIRE_REENROLL' | 'ENABLED_BY_RULE' | 'DISABLED_BY_RULE'; declare enum MfaReason { /** Mfa is required due to user settings */ USER_SETTINGS = "USER_SETTINGS", /** Mfa is required due to high risk login */ HIGH_RISK_LOGIN = "HIGH_RISK_LOGIN" } /** @enumType */ type MfaReasonWithLiterals = MfaReason | 'USER_SETTINGS' | 'HIGH_RISK_LOGIN'; interface MfaChallengeData { /** Type of verifation factor. */ factorType?: FactorTypeWithLiterals; verificationChallengeData?: VerificationChallenge; /** * Factors types the user can choose from to verify themselves. * @maxSize 100 */ availableFactors?: V1Factor[]; /** The reason the user is required for verification. */ reason?: MfaReasonWithLiterals; } interface VerificationChallenge extends VerificationChallengeFactorChallengeDataOneOf { pushData?: PushChallengeData; webauthnData?: WebAuthnChallengeData; /** @maxLength 200 */ hint?: string | null; } /** @oneof */ interface VerificationChallengeFactorChallengeDataOneOf { pushData?: PushChallengeData; webauthnData?: WebAuthnChallengeData; } interface PushChallengeData { /** * This should be tied to a specific push notification. * It will be sent in subsequent requests to verify the factor. * @maxLength 36 */ transactionId?: string; } interface WebAuthnChallengeData { /** * A unique identifier for this challenge that will be used to correlate * the authentication response with this challenge. * This should be a cryptographically random GUID to prevent guessing attacks. * @format GUID */ challengeId?: string; /** * A PublicKeyCredentialRequestOptions JSON as defined in the WebAuthn spec (https://www.w3.org/TR/webauthn-3/#dictdef-publickeycredentialrequestoptions). * @maxLength 40000 */ publicKeyCredentialRequestOptionsJson?: string; } interface RequireFirstFactorData { /** * Organization the identity is under. * @format GUID */ organizationId?: string; } interface ValidateEmailRequest { /** @maxLength 254 */ email: string; } interface ValidateEmailResponse { valid?: boolean; failure?: EmailValidationFailure; formatInvalid?: boolean; } interface EmailValidationFailure { reason?: ReasonWithLiterals; } declare enum Reason { UNKNOWN_REASON = "UNKNOWN_REASON", EMAIL_ADDRESS_BOUNCED = "EMAIL_ADDRESS_BOUNCED", EMAIL_DOMAIN_MISSING_DNS_RECORDS = "EMAIL_DOMAIN_MISSING_DNS_RECORDS", EMAIL_DOMAIN_FORMAT_INVALID = "EMAIL_DOMAIN_FORMAT_INVALID", EMAIL_DOMAIN_PERMANENTLY_BLACKLISTED = "EMAIL_DOMAIN_PERMANENTLY_BLACKLISTED" } /** @enumType */ type ReasonWithLiterals = Reason | 'UNKNOWN_REASON' | 'EMAIL_ADDRESS_BOUNCED' | 'EMAIL_DOMAIN_MISSING_DNS_RECORDS' | 'EMAIL_DOMAIN_FORMAT_INVALID' | 'EMAIL_DOMAIN_PERMANENTLY_BLACKLISTED'; interface LoginV2Request { /** Identifier of identity logging in. */ loginId: LoginId; /** Password of the identity logging in. */ password?: string | null; /** CAPTCHA tokens, when CAPTCHA setting is on. */ captchaTokens?: CaptchaToken[]; /** Additional data that's relevant for the flow. */ clientMetaData?: Record | null; /** * State token from a login flow that was started beforehand. * * When provided, this request continues an in-progress login flow rather than starting a new one. * @maxLength 1000 */ stateToken?: string | null; } interface WebAuthnVerifyData { /** * The challenge_id from the WebAuthnChallengeData that was returned in the previous * verification response. This will always be present when completing the WebAuthn authentication * ceremony with the credential data from the client. * @format GUID */ challengeId?: string | null; /** * If this field is present, this is a request to complete the WebAuthn authentication * with the credential data from the client. * * The credential contains a JSON string representation of a WebAuthn PublicKeyCredential * object returned by the browser during authentication, serialized as per the WebAuthn specification. * The SPI implementation should use this to verify the authentication assertion. * * Any standards-compliant WebAuthn server library should be able to process this serialized format. * For details on the serialization format, refer to the W3C WebAuthn specification: * https://www.w3.org/TR/webauthn-3/#dom-publickeycredential-tojson * @maxLength 3000 */ credential?: string | null; } interface ChangePasswordRequest { /** * New password to set for the logged-in member. * * The password must meet the site's configured password requirements for length and complexity. */ newPassword: string; } interface ChangePasswordResponse { } interface LoginWithIdpConnectionRequest { /** * The id of the connection id (can be fetched by calling connection-service.listEnabledConnectionsClientData * @format GUID */ idpConnectionId?: string; /** * The id of the tenant the caller wants to login into * @format GUID */ tenantId?: string; /** The type of the tenant the caller wants to login into */ tenantType?: TenantTypeWithLiterals; customPayload?: Record; /** * This flow ultimately returns an HTML page that asynchronously posts the LoginResponse via the BroadcastChannel API. * The message will be posted to a channel named `wix-idp-$session_id`, and encrypted with the `encryption_key`. * Encryption key should be base64 encoded. Encryption is done using AES-GCM with a random IV that's sent alongside the payload * * Optional at the proto level: required for the BroadcastChannel response mode only, and may be omitted * when `authorization_url` is provided (redirect response mode). Enforced in code. */ sessionId?: string; /** * Base64-encoded encryption key for securing the authentication response. * * Used to encrypt the authentication response sent via BroadcastChannel API. * Encryption uses AES-GCM with a random IV. * * Optional at the proto level: required for the BroadcastChannel response mode only, and may be omitted * when `authorization_url` is provided (redirect response mode). Enforced in code. */ encryptionKey?: string; /** * Visitor ID for tracking purposes. * * Optional identifier for analytics and tracking the authentication flow. */ visitorId?: string | null; /** * Browser session identifier. * * Optional identifier for correlating the authentication request with browser session data. */ bsi?: string | null; /** * Redirect response mode: when set, the SSO callback responds with a 302 to this URL carrying the * member session cookie (smSession) via Set-Cookie, instead of the BroadcastChannel HTML page. * Intended for OIDC-broker flows where Wix acts as the IdP: this URL is the outer authorization * endpoint to resume once the member session is established. * Must be on the same registrable domain as the host serving this login request (which is also the * domain the session cookie is set on). When set, `session_id` and `encryption_key` are not required. * @format WEB_URL */ authorizationUrl?: string | null; } declare enum TenantType { /** Unknown tenant type. This value isn't used. */ UNKNOWN_TENANT_TYPE = "UNKNOWN_TENANT_TYPE", /** The identity is a Wix user. */ ACCOUNT = "ACCOUNT", /** The identity is a member. */ SITE = "SITE" } /** @enumType */ type TenantTypeWithLiterals = TenantType | 'UNKNOWN_TENANT_TYPE' | 'ACCOUNT' | 'SITE'; interface RawHttpResponse { body?: Uint8Array; statusCode?: number | null; headers?: HeadersEntry[]; } interface HeadersEntry { key?: string; value?: string; } interface RawHttpRequest { body?: Uint8Array; pathParams?: PathParametersEntry[]; queryParams?: QueryParametersEntry[]; headers?: HeadersEntry[]; method?: string; rawPath?: string; rawQuery?: string; } interface PathParametersEntry { key?: string; value?: string; } interface QueryParametersEntry { key?: string; value?: string; } /** * Request for LoginWithIdpConnectionRedirect - OAuth redirect flow. * Uses redirect_uri/client_id instead of session_id/encryption_key. */ interface LoginWithIdpConnectionRedirectRequest { /** * The id of the connection id (can be fetched by calling connection-service.listEnabledConnectionsClientData * @format GUID */ idpConnectionId?: string; /** * The id of the tenant the caller wants to login into * @format GUID */ tenantId?: string; /** The type of the tenant the caller wants to login into */ tenantType?: TenantTypeWithLiterals; customPayload?: Record; /** * OAuth app redirect URI for the callback. * * After successful authentication, the flow redirects to this URI with the `sessionToken` * as a query parameter. Must be a registered callback URL for the specified `client_id`. * @format WEB_URL */ redirectUri?: string; /** * OAuth client ID for redirect flow validation. * * Used to validate that the redirect URI is a permitted callback URL for this OAuth client. * @format GUID */ clientId?: string; /** * Visitor ID for tracking purposes. * * Optional identifier for analytics and tracking the authentication flow. */ visitorId?: string | null; /** * Browser session identifier. * * Optional identifier for correlating the authentication request with browser session data. */ bsi?: string | null; } interface ConnectIdpRequest { /** * The id of the connection id (can be fetched by calling connection-service.listEnabledConnectionsClientData * @format GUID */ idpConnectionId?: string; customPayload?: Record; /** * This flow ultimately returns an HTML page that asynchronously posts the LoginResponse via the BroadcastChannel API. * The message will be posted to a channel named `wix-idp-$session_id`, and encrypted with the `encryption_key`. * Encryption key should be base64 encoded. Encryption is done using AES-GCM with a random IV that's sent alongside the payload */ sessionId?: string; /** * Base64-encoded encryption key for securing the authentication response. * * Used to encrypt the authentication response sent via BroadcastChannel API. * Encryption uses AES-GCM with a random IV. */ encryptionKey?: string; } interface LoginCallbackRequest { /** state that that received on the redirect */ state?: string; /** session token */ sessionToken?: string; } interface LoginWithIdpConnectionTokenParamsRequest { /** * The id of the connection id (can be fetched by calling connection-service.listEnabledConnectionsClientData) * @format GUID */ idpConnectionId?: string; /** A set of fields that are required for the connection to be able to identify and authenticate the user */ tokenParams?: Record; } interface SignOnRequest { /** * Member identifier for authentication. * * Currently only email addresses are supported. */ loginId: LoginId; /** * Member profile information. * * Profile data such as first name, last name, and other member details. * If the member already exists, provided profile information will update the existing member's profile. * If the member doesn't exist, this profile information is used to create the new member. */ profile?: IdentityProfile; /** * Whether to mark the member's email as verified without requiring verification. * * When `true`, marks the email as verified without requiring verification. * Use with caution in production as this bypasses security verification. * * Default: `false` */ verifyEmail?: boolean; /** * Whether to merge with an existing contact with the same email address. * * When `true`, links the member to an existing contact record with the same email * and inherits contact data. When `false`, creates a new contact record. * * Default: `true` */ mergeExistingContact?: boolean; } interface SignOnResponse { /** * Session token for the authenticated member. * * Use this token to obtain access and refresh tokens for subsequent API calls. */ sessionToken?: string; /** * Member identity information. * * Contains the member's identity details after successful authentication. */ identity?: Identity; } /** logout request payload */ interface LogoutRequest { /** * URL to redirect to after logout. * * Optional redirect destination after the logout process completes. * @format WEB_URL */ postLogoutRedirectUri?: string | null; /** * Client identifier for the logout request. * * Identifies the application or client initiating the logout. * @format GUID */ clientId?: string | null; } interface VerifyRequest extends VerifyRequestFactorDataOneOf { /** SMS verification code sent to the member's phone number. */ smsData?: SmsVerifyData; /** Voice call verification code received by the member. */ callData?: CallVerifyData; /** Email verification code sent to the member's email address. */ emailData?: ExternalEmailVerifyData; /** TOTP code from the member's authenticator app. */ totpData?: TotpVerifyData; /** Push notification authentication response from the member's device. */ pushData?: PushVerifyData; /** WebAuthn response from biometric or security key authentication. */ webauthnData?: WebAuthnVerifyData; /** RecoveryCode response from a one-time code. */ recoveryCodeData?: RecoveryCodeVerifyData; /** * State token from the initial authentication response. * * Required to continue the multi-step authentication process. * @maxLength 1000 */ stateToken?: string; /** * Type of authentication factor being verified. * * Specifies which verification method is being used (SMS, email, TOTP, etc.). */ factorType?: FactorTypeWithLiterals; /** * Whether to remember this device for future authentication. * * When `true`, reduces future authentication requirements for this device. * Only applicable for second factor authentication. */ rememberThisDevice?: boolean; } /** @oneof */ interface VerifyRequestFactorDataOneOf { /** SMS verification code sent to the member's phone number. */ smsData?: SmsVerifyData; /** Voice call verification code received by the member. */ callData?: CallVerifyData; /** Email verification code sent to the member's email address. */ emailData?: ExternalEmailVerifyData; /** TOTP code from the member's authenticator app. */ totpData?: TotpVerifyData; /** Push notification authentication response from the member's device. */ pushData?: PushVerifyData; /** WebAuthn response from biometric or security key authentication. */ webauthnData?: WebAuthnVerifyData; /** RecoveryCode response from a one-time code. */ recoveryCodeData?: RecoveryCodeVerifyData; } interface SmsVerifyData { /** * @minLength 1 * @maxLength 100 */ code?: string | null; deliveryMethod?: DeliveryMethodWithLiterals; /** * The template ID to use for the SMS notification. * @minLength 1 * @maxLength 100 */ templateId?: string | null; } declare enum DeliveryMethod { SMS = "SMS", WHATSAPP = "WHATSAPP" } /** @enumType */ type DeliveryMethodWithLiterals = DeliveryMethod | 'SMS' | 'WHATSAPP'; interface CallVerifyData { /** * @minLength 1 * @maxLength 100 */ code?: string | null; } interface ExternalEmailVerifyData { /** * @minLength 1 * @maxLength 100 */ code?: string | null; } interface TotpVerifyData { /** * @minLength 1 * @maxLength 100 */ code?: string | null; } interface PushVerifyData { /** @maxLength 36 */ transactionId?: string | null; } interface RecoveryCodeVerifyData { /** * @minLength 1 * @maxLength 100 */ code?: string | null; } interface GetWebauthnChallengeRequest { /** * Identifier of the member requesting the WebAuthn challenge. * * If not provided, returns an anonymous WebAuthn challenge for usernameless authentication. */ loginId?: LoginId; /** * ID of the organization whose account the member picked, when `login_id` is an email shared by several accounts. * The challenge is then issued for the email's account under this organization. * @format GUID */ organizationId?: string | null; } interface GetWebauthnChallengeResponse { /** The challenge that will be used for a WebAuthn authentication ceremony. */ webauthn?: WebAuthnChallengeData; } interface MessageEnvelope { /** * App instance ID. * @format GUID */ instanceId?: string | null; /** * Event type. * @maxLength 150 */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData; /** Stringify payload. */ data?: string; /** Details related to the account */ accountInfo?: AccountInfo; } interface IdentificationData extends IdentificationDataIdOneOf { /** * ID of a site visitor that has not logged in to the site. * @format GUID */ anonymousVisitorId?: string; /** * ID of a site visitor that has logged in to the site. * @format GUID */ memberId?: string; /** * ID of a Wix user (site owner, contributor, etc.). * @format GUID */ wixUserId?: string; /** * ID of an app. * @format GUID */ appId?: string; /** @readonly */ identityType?: WebhookIdentityTypeWithLiterals; } /** @oneof */ interface IdentificationDataIdOneOf { /** * ID of a site visitor that has not logged in to the site. * @format GUID */ anonymousVisitorId?: string; /** * ID of a site visitor that has logged in to the site. * @format GUID */ memberId?: string; /** * ID of a Wix user (site owner, contributor, etc.). * @format GUID */ wixUserId?: string; /** * ID of an app. * @format GUID */ appId?: string; } declare enum WebhookIdentityType { UNKNOWN = "UNKNOWN", ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR", MEMBER = "MEMBER", WIX_USER = "WIX_USER", APP = "APP" } /** @enumType */ type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP'; interface AccountInfo { /** * ID of the Wix account associated with the event. * @format GUID */ accountId?: string | null; /** * ID of the parent Wix account. Only included when accountId belongs to a child account. * @format GUID */ parentAccountId?: string | null; /** * ID of the Wix site associated with the event. Only included when the event is tied to a specific site. * @format GUID */ siteId?: string | null; } /** @docsIgnore */ type RegisterV2ApplicationErrors = { code?: 'UNIMPLEMENTED_FEATURE'; description?: string; data?: Record; } | { code?: 'THROTTLED_FEATURE'; description?: string; data?: Record; } | { code?: 'INVALID_CAPTCHA_TOKEN'; description?: string; data?: Record; } | { code?: 'CAPTCHA_TOKEN_REQUIRED'; description?: string; data?: Record; } | { code?: 'IP_ADDRESS_FILTERED'; description?: string; data?: Record; } | { code?: 'RECAPTCHA_FAILED'; description?: string; data?: Record; } | { code?: 'RECAPTCHA_REQUIRED'; description?: string; data?: Record; } | { code?: 'MISSING_CAPTCHA_TOKEN'; description?: string; data?: Record; } | { code?: 'USER_EMAIL_OFAC_ADDRESS'; description?: string; data?: Record; } | { code?: 'UNSUPPORTED_FIELD'; description?: string; data?: Record; } | { code?: 'ATTRIBUTE_NOT_FOUND'; description?: string; data?: Record; } | { code?: 'CLIENT_METADATA_NOT_FOUND'; description?: string; data?: Record; } | { code?: 'INVALID_LD_SESSION'; description?: string; data?: Record; } | { code?: 'DUPLICATE_EMAIL'; description?: string; data?: Record; } | { code?: 'COULD_NOT_CREATE_SET_ACCOUNT_USER'; description?: string; data?: Record; } | { code?: 'INVALID_USER_TYPE'; description?: string; data?: Record; } | { code?: 'REGISTRATION_TO_EDITORX_NOT_ALLOWED'; description?: string; data?: Record; }; /** @docsIgnore */ type RegisterV2ValidationErrors = { ruleName?: 'PROVIDE_TENANT_ID'; } | { ruleName?: 'INVALID_AUTHENTICATOR_ID'; } | { ruleName?: 'VALUEֹֹ_TOO_SHORT'; } | { ruleName?: 'VALUEֹֹ_TOO_LONG'; } | { ruleName?: 'VALUE_DID_NOT_MATCH'; }; /** @docsIgnore */ type LoginV2ApplicationErrors = { code?: 'THROTTLED_FEATURE'; description?: string; data?: Record; } | { code?: 'INVALID_CAPTCHA_TOKEN'; description?: string; data?: Record; } | { code?: 'CAPTCHA_TOKEN_REQUIRED'; description?: string; data?: Record; } | { code?: 'REENROLLMENT_REQUIRED_BY_ADMIN'; description?: string; data?: Record; } | { code?: 'TRUSTED_CLIENTS_ONLY'; description?: string; data?: Record; } | { code?: 'WIX_EMPLOYEE_PASSWORD_LOGIN_NOT_ALLOWED'; description?: string; data?: Record; }; /** @docsIgnore */ type LoginV2ValidationErrors = { ruleName?: 'PROVIDE_TENANT_ID'; } | { ruleName?: 'INVALID_AUTHENTICATOR_ID'; }; type __PublicMethodMetaInfo = { getUrl: (context: any) => string; httpMethod: K; path: string; pathParams: M; __requestType: T; __originalRequestType: S; __responseType: Q; __originalResponseType: R; }; declare function registerV2(): __PublicMethodMetaInfo<'POST', {}, RegisterV2Request$1, RegisterV2Request, StateMachineResponse$1, StateMachineResponse>; declare function validateEmail(): __PublicMethodMetaInfo<'POST', {}, ValidateEmailRequest$1, ValidateEmailRequest, ValidateEmailResponse$1, ValidateEmailResponse>; declare function loginV2(): __PublicMethodMetaInfo<'POST', {}, LoginV2Request$1, LoginV2Request, StateMachineResponse$1, StateMachineResponse>; declare function changePassword(): __PublicMethodMetaInfo<'POST', {}, ChangePasswordRequest$1, ChangePasswordRequest, ChangePasswordResponse$1, ChangePasswordResponse>; declare function signOn(): __PublicMethodMetaInfo<'POST', {}, SignOnRequest$1, SignOnRequest, SignOnResponse$1, SignOnResponse>; declare function logout(): __PublicMethodMetaInfo<'GET', {}, LogoutRequest$1, LogoutRequest, RawHttpResponse$1, RawHttpResponse>; export { type AccountInfo as AccountInfoOriginal, type Address as AddressOriginal, AddressTag as AddressTagOriginal, type AddressTagWithLiterals as AddressTagWithLiteralsOriginal, type AddressWrapper as AddressWrapperOriginal, type Authentication as AuthenticationOriginal, type AuthenticatorConnection as AuthenticatorConnectionOriginal, type CallVerifyData as CallVerifyDataOriginal, CaptchaDecisionReason as CaptchaDecisionReasonOriginal, type CaptchaDecisionReasonWithLiterals as CaptchaDecisionReasonWithLiteralsOriginal, CaptchaFlow as CaptchaFlowOriginal, type CaptchaFlowWithLiterals as CaptchaFlowWithLiteralsOriginal, CaptchaIdentityType as CaptchaIdentityTypeOriginal, type CaptchaIdentityTypeWithLiterals as CaptchaIdentityTypeWithLiteralsOriginal, CaptchaKind as CaptchaKindOriginal, type CaptchaKindWithLiterals as CaptchaKindWithLiteralsOriginal, CaptchaOutcome as CaptchaOutcomeOriginal, type CaptchaOutcomeWithLiterals as CaptchaOutcomeWithLiteralsOriginal, CaptchaResult as CaptchaResultOriginal, type CaptchaResultWithLiterals as CaptchaResultWithLiteralsOriginal, type CaptchaToken as CaptchaTokenOriginal, type CaptchaTokenTokenOneOf as CaptchaTokenTokenOneOfOriginal, type CaptchaVerification as CaptchaVerificationOriginal, type ChangePasswordRequest as ChangePasswordRequestOriginal, type ChangePasswordResponse as ChangePasswordResponseOriginal, type ConnectIdpRequest as ConnectIdpRequestOriginal, type Connection as ConnectionOriginal, type ConnectionTypeOneOf as ConnectionTypeOneOfOriginal, type CustomField as CustomFieldOriginal, type CustomValue as CustomValueOriginal, type CustomValueValueOneOf as CustomValueValueOneOfOriginal, DeliveryMethod as DeliveryMethodOriginal, type DeliveryMethodWithLiterals as DeliveryMethodWithLiteralsOriginal, type Email as EmailOriginal, EmailTag as EmailTagOriginal, type EmailTagWithLiterals as EmailTagWithLiteralsOriginal, type EmailValidationFailure as EmailValidationFailureOriginal, type ExternalEmailVerifyData as ExternalEmailVerifyDataOriginal, type Factor as FactorOriginal, FactorStatus as FactorStatusOriginal, type FactorStatusWithLiterals as FactorStatusWithLiteralsOriginal, FactorType as FactorTypeOriginal, type FactorTypeWithLiterals as FactorTypeWithLiteralsOriginal, type GetWebauthnChallengeRequest as GetWebauthnChallengeRequestOriginal, type GetWebauthnChallengeResponse as GetWebauthnChallengeResponseOriginal, type HeadersEntry as HeadersEntryOriginal, type IdentificationDataIdOneOf as IdentificationDataIdOneOfOriginal, type IdentificationData as IdentificationDataOriginal, type Identity as IdentityOriginal, type IdentityProfile as IdentityProfileOriginal, type IdpConnection as IdpConnectionOriginal, type ListValue as ListValueOriginal, type LoginCallbackRequest as LoginCallbackRequestOriginal, type LoginId as LoginIdOriginal, type LoginIdTypeOneOf as LoginIdTypeOneOfOriginal, type LoginV2ApplicationErrors as LoginV2ApplicationErrorsOriginal, type LoginV2Request as LoginV2RequestOriginal, type LoginV2ValidationErrors as LoginV2ValidationErrorsOriginal, type LoginWithIdpConnectionRedirectRequest as LoginWithIdpConnectionRedirectRequestOriginal, type LoginWithIdpConnectionRequest as LoginWithIdpConnectionRequestOriginal, type LoginWithIdpConnectionTokenParamsRequest as LoginWithIdpConnectionTokenParamsRequestOriginal, type LogoutRequest as LogoutRequestOriginal, type MapValue as MapValueOriginal, type MessageEnvelope as MessageEnvelopeOriginal, type Metadata as MetadataOriginal, type MfaChallengeData as MfaChallengeDataOriginal, MfaReason as MfaReasonOriginal, type MfaReasonWithLiterals as MfaReasonWithLiteralsOriginal, type Organization as OrganizationOriginal, type PathParametersEntry as PathParametersEntryOriginal, type Phone as PhoneOriginal, PhoneTag as PhoneTagOriginal, type PhoneTagWithLiterals as PhoneTagWithLiteralsOriginal, PrivacyStatus as PrivacyStatusOriginal, type PrivacyStatusWithLiterals as PrivacyStatusWithLiteralsOriginal, type PushChallengeData as PushChallengeDataOriginal, type PushVerifyData as PushVerifyDataOriginal, type QueryParametersEntry as QueryParametersEntryOriginal, type RawHttpRequest as RawHttpRequestOriginal, type RawHttpResponse as RawHttpResponseOriginal, Reason as ReasonOriginal, type ReasonWithLiterals as ReasonWithLiteralsOriginal, type RecaptchaForClientSiteKey as RecaptchaForClientSiteKeyOriginal, type RecoveryCodeVerifyData as RecoveryCodeVerifyDataOriginal, type RegisterV2ApplicationErrors as RegisterV2ApplicationErrorsOriginal, type RegisterV2Request as RegisterV2RequestOriginal, type RegisterV2ValidationErrors as RegisterV2ValidationErrorsOriginal, type RequireFirstFactorData as RequireFirstFactorDataOriginal, type RequireMfaData as RequireMfaDataOriginal, type SecondaryEmail as SecondaryEmailOriginal, type SignOnRequest as SignOnRequestOriginal, type SignOnResponse as SignOnResponseOriginal, type SmsVerifyData as SmsVerifyDataOriginal, type StateMachineResponse as StateMachineResponseOriginal, type StateMachineResponseStateDataOneOf as StateMachineResponseStateDataOneOfOriginal, StateType as StateTypeOriginal, type StateTypeWithLiterals as StateTypeWithLiteralsOriginal, StatusName as StatusNameOriginal, type StatusNameWithLiterals as StatusNameWithLiteralsOriginal, Status as StatusOriginal, type StatusV2 as StatusV2Original, type StatusWithLiterals as StatusWithLiteralsOriginal, TenantType as TenantTypeOriginal, type TenantTypeWithLiterals as TenantTypeWithLiteralsOriginal, type TotpVerifyData as TotpVerifyDataOriginal, type V1CustomValue as V1CustomValueOriginal, type V1CustomValueValueOneOf as V1CustomValueValueOneOfOriginal, type V1Factor as V1FactorOriginal, type V1ListValue as V1ListValueOriginal, type V1MapValue as V1MapValueOriginal, V1Reason as V1ReasonOriginal, type V1ReasonWithLiterals as V1ReasonWithLiteralsOriginal, type ValidateEmailRequest as ValidateEmailRequestOriginal, type ValidateEmailResponse as ValidateEmailResponseOriginal, type VerificationChallengeFactorChallengeDataOneOf as VerificationChallengeFactorChallengeDataOneOfOriginal, type VerificationChallenge as VerificationChallengeOriginal, type VerifyRequestFactorDataOneOf as VerifyRequestFactorDataOneOfOriginal, type VerifyRequest as VerifyRequestOriginal, type WebAuthnChallengeData as WebAuthnChallengeDataOriginal, type WebAuthnVerifyData as WebAuthnVerifyDataOriginal, WebhookIdentityType as WebhookIdentityTypeOriginal, type WebhookIdentityTypeWithLiterals as WebhookIdentityTypeWithLiteralsOriginal, type __PublicMethodMetaInfo, changePassword, loginV2, logout, registerV2, signOn, validateEmail };