import { SendRecoveryEmailRequest as SendRecoveryEmailRequest$1, SendRecoveryEmailResponse as SendRecoveryEmailResponse$1, SendActivationEmailRequest as SendActivationEmailRequest$1, SendActivationEmailResponse as SendActivationEmailResponse$1, RecoverRequest as RecoverRequest$1, StateMachineResponse as StateMachineResponse$1 } from './index.typings.js'; import '@wix/sdk-types'; /** Recovery token proto is the saved data on the recovery token. */ interface RecoveryToken { /** * Recovery token ID * @format GUID * @readonly */ id?: string | null; /** * Represents the time this SessionToken was created * @readonly */ createdDate?: Date | null; /** * tenantId * @format GUID * @readonly */ tenantId?: string; /** * TenantType * @readonly */ tenantType?: TenantTypeWithLiterals; /** * identity id * @format GUID * @readonly */ identityId?: string; } 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 SendRecoveryEmailRequest { /** * Email address associated with the account to recover. * @format EMAIL */ email: string; /** * 2-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format of the email to be sent. * * If no language is specified, the language specified in the member's profile is used. * @format LANGUAGE */ language?: string | null; /** Where to redirect to after successfully resetting the password. */ redirect?: Redirect; } interface Redirect { /** * URL to redirect to after successfully resetting the password. * @maxLength 1000 */ url?: string; /** * Client ID of the [OAuth app](https://dev.wix.com/docs/go-headless/getting-started/setup/authentication/create-an-oauth-app-for-visitors-and-members) your Headless project is using. * @format GUID */ clientId?: string | null; } interface SendRecoveryEmailResponse { } interface SendActivationEmailRequest { /** * Id of the activating user * @format GUID */ identityId: string; /** Options for the activation email */ emailOptions?: EmailOptions; } interface EmailOptions { /** * language of the email - if not received will fallback to the identity language * @format LANGUAGE */ language?: string | null; /** Where to redirect after a successful activation process */ redirect?: Redirect; } interface SendActivationEmailResponse { } interface RecoverRequest { /** recovery token */ recoveryToken: string; /** new password to set for the identity */ password?: 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" } /** @enumType */ type StateTypeWithLiterals = StateType | 'UNKNOWN_STATE' | 'SUCCESS' | 'REQUIRE_OWNER_APPROVAL' | 'REQUIRE_EMAIL_VERIFICATION' | 'STATUS_CHECK'; 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 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 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?: ReasonWithLiterals[]; } 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 Reason { /** 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" } /** @enumType */ type ReasonWithLiterals = Reason | 'UNKNOWN_REASON' | 'PENDING_ADMIN_APPROVAL_REQUIRED' | 'PENDING_EMAIL_VERIFICATION_REQUIRED'; interface Factor { /** * Factor ID. * @format GUID */ factorId?: string; /** Factor type. */ type?: FactorTypeWithLiterals; /** Factor status. */ status?: StatusWithLiterals; } 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'; 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 CreateRecoveryTokenRequest { /** @format EMAIL */ email?: string; } interface CreateRecoveryTokenResponse { /** @maxLength 1000 */ token?: string; } type __PublicMethodMetaInfo = { getUrl: (context: any) => string; httpMethod: K; path: string; pathParams: M; __requestType: T; __originalRequestType: S; __responseType: Q; __originalResponseType: R; }; declare function sendRecoveryEmail(): __PublicMethodMetaInfo<'POST', {}, SendRecoveryEmailRequest$1, SendRecoveryEmailRequest, SendRecoveryEmailResponse$1, SendRecoveryEmailResponse>; declare function sendActivationEmail(): __PublicMethodMetaInfo<'POST', {}, SendActivationEmailRequest$1, SendActivationEmailRequest, SendActivationEmailResponse$1, SendActivationEmailResponse>; declare function recover(): __PublicMethodMetaInfo<'POST', {}, RecoverRequest$1, RecoverRequest, StateMachineResponse$1, StateMachineResponse>; export { type Address as AddressOriginal, AddressTag as AddressTagOriginal, type AddressTagWithLiterals as AddressTagWithLiteralsOriginal, type AddressWrapper as AddressWrapperOriginal, type AuthenticatorConnection as AuthenticatorConnectionOriginal, type Connection as ConnectionOriginal, type ConnectionTypeOneOf as ConnectionTypeOneOfOriginal, type CreateRecoveryTokenRequest as CreateRecoveryTokenRequestOriginal, type CreateRecoveryTokenResponse as CreateRecoveryTokenResponseOriginal, type CustomField as CustomFieldOriginal, type CustomValue as CustomValueOriginal, type CustomValueValueOneOf as CustomValueValueOneOfOriginal, type EmailOptions as EmailOptionsOriginal, type Email as EmailOriginal, EmailTag as EmailTagOriginal, type EmailTagWithLiterals as EmailTagWithLiteralsOriginal, type Factor as FactorOriginal, FactorStatus as FactorStatusOriginal, type FactorStatusWithLiterals as FactorStatusWithLiteralsOriginal, FactorType as FactorTypeOriginal, type FactorTypeWithLiterals as FactorTypeWithLiteralsOriginal, type Identity as IdentityOriginal, type IdentityProfile as IdentityProfileOriginal, type IdpConnection as IdpConnectionOriginal, type ListValue as ListValueOriginal, type MapValue as MapValueOriginal, type Metadata as MetadataOriginal, type MfaChallengeData as MfaChallengeDataOriginal, MfaReason as MfaReasonOriginal, type MfaReasonWithLiterals as MfaReasonWithLiteralsOriginal, type Phone as PhoneOriginal, PhoneTag as PhoneTagOriginal, type PhoneTagWithLiterals as PhoneTagWithLiteralsOriginal, PrivacyStatus as PrivacyStatusOriginal, type PrivacyStatusWithLiterals as PrivacyStatusWithLiteralsOriginal, type PushChallengeData as PushChallengeDataOriginal, Reason as ReasonOriginal, type ReasonWithLiterals as ReasonWithLiteralsOriginal, type RecoverRequest as RecoverRequestOriginal, type RecoveryToken as RecoveryTokenOriginal, type Redirect as RedirectOriginal, type RequireMfaData as RequireMfaDataOriginal, type SecondaryEmail as SecondaryEmailOriginal, type SendActivationEmailRequest as SendActivationEmailRequestOriginal, type SendActivationEmailResponse as SendActivationEmailResponseOriginal, type SendRecoveryEmailRequest as SendRecoveryEmailRequestOriginal, type SendRecoveryEmailResponse as SendRecoveryEmailResponseOriginal, 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 V1CustomValue as V1CustomValueOriginal, type V1CustomValueValueOneOf as V1CustomValueValueOneOfOriginal, type V1Factor as V1FactorOriginal, type V1ListValue as V1ListValueOriginal, type V1MapValue as V1MapValueOriginal, type VerificationChallengeFactorChallengeDataOneOf as VerificationChallengeFactorChallengeDataOneOfOriginal, type VerificationChallenge as VerificationChallengeOriginal, type WebAuthnChallengeData as WebAuthnChallengeDataOriginal, type __PublicMethodMetaInfo, recover, sendActivationEmail, sendRecoveryEmail };