@wix/auto_sdk_identity_authentication 1.0.19 → 1.0.20

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.
@@ -354,11 +354,6 @@ interface AuthenticatorConnection {
354
354
  reEnrollmentRequired?: boolean;
355
355
  }
356
356
  interface Metadata {
357
- /**
358
- * General tags. For example, `"isOwner"`.
359
- * @readonly
360
- */
361
- tags?: string[];
362
357
  }
363
358
  interface Email {
364
359
  /**
@@ -370,22 +365,33 @@ interface Email {
370
365
  isVerified?: boolean;
371
366
  }
372
367
  interface StatusV2 {
368
+ /** Descriptive name of the identity status. */
373
369
  name?: StatusNameWithLiterals;
370
+ /** Reasons for the current identity status. */
374
371
  reasons?: ReasonWithLiterals[];
375
372
  }
376
373
  declare enum StatusName {
374
+ /** Unknown status. This value isn't used. */
377
375
  UNKNOWN_STATUS = "UNKNOWN_STATUS",
376
+ /** Identity is pending verification, owner approval, or both. */
378
377
  PENDING = "PENDING",
378
+ /** Identity is active and can log in. */
379
379
  ACTIVE = "ACTIVE",
380
+ /** Identity is deleted. This identity can't log in. */
380
381
  DELETED = "DELETED",
382
+ /** Identity is blocked. This identity can't log in. */
381
383
  BLOCKED = "BLOCKED",
384
+ /** Identity is offline. This identity can't log in. */
382
385
  OFFLINE = "OFFLINE"
383
386
  }
384
387
  /** @enumType */
385
388
  type StatusNameWithLiterals = StatusName | 'UNKNOWN_STATUS' | 'PENDING' | 'ACTIVE' | 'DELETED' | 'BLOCKED' | 'OFFLINE';
386
389
  declare enum Reason {
390
+ /** Unknown reason. This value isn't used. */
387
391
  UNKNOWN_REASON = "UNKNOWN_REASON",
392
+ /** The identity is waiting for admin approval. After the approval, the identity has an `ACTIVE` status. */
388
393
  PENDING_ADMIN_APPROVAL_REQUIRED = "PENDING_ADMIN_APPROVAL_REQUIRED",
394
+ /** The identity has to verify the email. After the verification, the identity has an `ACTIVE` status. */
389
395
  PENDING_EMAIL_VERIFICATION_REQUIRED = "PENDING_EMAIL_VERIFICATION_REQUIRED"
390
396
  }
391
397
  /** @enumType */
@@ -688,13 +694,15 @@ interface LoginWithIdpConnectionRequest {
688
694
  bsi?: string | null;
689
695
  }
690
696
  declare enum TenantType {
697
+ /** Unknown tenant type. This value isn't used. */
691
698
  UNKNOWN_TENANT_TYPE = "UNKNOWN_TENANT_TYPE",
699
+ /** The identity is a Wix user. */
692
700
  ACCOUNT = "ACCOUNT",
693
- SITE = "SITE",
694
- ROOT = "ROOT"
701
+ /** The identity is a member. */
702
+ SITE = "SITE"
695
703
  }
696
704
  /** @enumType */
697
- type TenantTypeWithLiterals = TenantType | 'UNKNOWN_TENANT_TYPE' | 'ACCOUNT' | 'SITE' | 'ROOT';
705
+ type TenantTypeWithLiterals = TenantType | 'UNKNOWN_TENANT_TYPE' | 'ACCOUNT' | 'SITE';
698
706
  interface RawHttpResponse {
699
707
  body?: Uint8Array;
700
708
  statusCode?: number | null;
@@ -942,7 +950,7 @@ type LoginV2ValidationErrors = {
942
950
  * @requiredField loginId
943
951
  * @fqn wix.iam.authentication.v1.AuthenticationService.RegisterV2
944
952
  */
945
- declare function registerV2(loginId: LoginId, options?: RegisterV2Options): Promise<NonNullablePaths<StateMachineResponse, `state` | `identity.connections` | `identity.connections.${number}.idpConnection.idpConnectionId` | `identity.connections.${number}.idpConnection.idpUserId` | `identity.connections.${number}.authenticatorConnection.authenticatorConnectionId` | `identity.connections.${number}.authenticatorConnection.reEnrollmentRequired` | `identity.identityProfile.emails` | `identity.identityProfile.phones` | `identity.identityProfile.labels` | `identity.identityProfile.privacyStatus` | `identity.identityProfile.customFields` | `identity.identityProfile.customFields.${number}.name` | `identity.identityProfile.customFields.${number}.value.strValue` | `identity.identityProfile.customFields.${number}.value.numValue` | `identity.identityProfile.secondaryEmails` | `identity.identityProfile.secondaryEmails.${number}.email` | `identity.identityProfile.secondaryEmails.${number}.tag` | `identity.identityProfile.phonesV2` | `identity.identityProfile.phonesV2.${number}.phone` | `identity.identityProfile.phonesV2.${number}.tag` | `identity.identityProfile.addresses` | `identity.identityProfile.addresses.${number}.tag` | `identity.metadata.tags` | `identity.email.address` | `identity.email.isVerified` | `identity.status.name` | `identity.status.reasons` | `identity.factors` | `identity.factors.${number}.factorId` | `identity.factors.${number}.type` | `identity.factors.${number}.status`> & {
953
+ declare function registerV2(loginId: LoginId, options?: RegisterV2Options): Promise<NonNullablePaths<StateMachineResponse, `state` | `identity.connections` | `identity.connections.${number}.idpConnection.idpConnectionId` | `identity.connections.${number}.idpConnection.idpUserId` | `identity.connections.${number}.authenticatorConnection.authenticatorConnectionId` | `identity.connections.${number}.authenticatorConnection.reEnrollmentRequired` | `identity.identityProfile.emails` | `identity.identityProfile.phones` | `identity.identityProfile.labels` | `identity.identityProfile.privacyStatus` | `identity.identityProfile.customFields` | `identity.identityProfile.customFields.${number}.name` | `identity.identityProfile.customFields.${number}.value.strValue` | `identity.identityProfile.customFields.${number}.value.numValue` | `identity.identityProfile.secondaryEmails` | `identity.identityProfile.secondaryEmails.${number}.email` | `identity.identityProfile.secondaryEmails.${number}.tag` | `identity.identityProfile.phonesV2` | `identity.identityProfile.phonesV2.${number}.phone` | `identity.identityProfile.phonesV2.${number}.tag` | `identity.identityProfile.addresses` | `identity.identityProfile.addresses.${number}.tag` | `identity.email.address` | `identity.email.isVerified` | `identity.status.name` | `identity.status.reasons` | `identity.factors` | `identity.factors.${number}.factorId` | `identity.factors.${number}.type` | `identity.factors.${number}.status`> & {
946
954
  __applicationErrorsType?: RegisterV2ApplicationErrors;
947
955
  __validationErrorsType?: RegisterV2ValidationErrors;
948
956
  }>;
@@ -967,7 +975,7 @@ interface RegisterV2Options {
967
975
  * @requiredField loginId
968
976
  * @fqn wix.iam.authentication.v1.AuthenticationService.LoginV2
969
977
  */
970
- declare function loginV2(loginId: LoginId, options?: LoginV2Options): Promise<NonNullablePaths<StateMachineResponse, `state` | `identity.connections` | `identity.connections.${number}.idpConnection.idpConnectionId` | `identity.connections.${number}.idpConnection.idpUserId` | `identity.connections.${number}.authenticatorConnection.authenticatorConnectionId` | `identity.connections.${number}.authenticatorConnection.reEnrollmentRequired` | `identity.identityProfile.emails` | `identity.identityProfile.phones` | `identity.identityProfile.labels` | `identity.identityProfile.privacyStatus` | `identity.identityProfile.customFields` | `identity.identityProfile.customFields.${number}.name` | `identity.identityProfile.customFields.${number}.value.strValue` | `identity.identityProfile.customFields.${number}.value.numValue` | `identity.identityProfile.secondaryEmails` | `identity.identityProfile.secondaryEmails.${number}.email` | `identity.identityProfile.secondaryEmails.${number}.tag` | `identity.identityProfile.phonesV2` | `identity.identityProfile.phonesV2.${number}.phone` | `identity.identityProfile.phonesV2.${number}.tag` | `identity.identityProfile.addresses` | `identity.identityProfile.addresses.${number}.tag` | `identity.metadata.tags` | `identity.email.address` | `identity.email.isVerified` | `identity.status.name` | `identity.status.reasons` | `identity.factors` | `identity.factors.${number}.factorId` | `identity.factors.${number}.type` | `identity.factors.${number}.status`> & {
978
+ declare function loginV2(loginId: LoginId, options?: LoginV2Options): Promise<NonNullablePaths<StateMachineResponse, `state` | `identity.connections` | `identity.connections.${number}.idpConnection.idpConnectionId` | `identity.connections.${number}.idpConnection.idpUserId` | `identity.connections.${number}.authenticatorConnection.authenticatorConnectionId` | `identity.connections.${number}.authenticatorConnection.reEnrollmentRequired` | `identity.identityProfile.emails` | `identity.identityProfile.phones` | `identity.identityProfile.labels` | `identity.identityProfile.privacyStatus` | `identity.identityProfile.customFields` | `identity.identityProfile.customFields.${number}.name` | `identity.identityProfile.customFields.${number}.value.strValue` | `identity.identityProfile.customFields.${number}.value.numValue` | `identity.identityProfile.secondaryEmails` | `identity.identityProfile.secondaryEmails.${number}.email` | `identity.identityProfile.secondaryEmails.${number}.tag` | `identity.identityProfile.phonesV2` | `identity.identityProfile.phonesV2.${number}.phone` | `identity.identityProfile.phonesV2.${number}.tag` | `identity.identityProfile.addresses` | `identity.identityProfile.addresses.${number}.tag` | `identity.email.address` | `identity.email.isVerified` | `identity.status.name` | `identity.status.reasons` | `identity.factors` | `identity.factors.${number}.factorId` | `identity.factors.${number}.type` | `identity.factors.${number}.status`> & {
971
979
  __applicationErrorsType?: LoginV2ApplicationErrors;
972
980
  __validationErrorsType?: LoginV2ValidationErrors;
973
981
  }>;
@@ -997,7 +1005,7 @@ declare function changePassword(newPassword: string): Promise<void>;
997
1005
  * @applicableIdentity APP
998
1006
  * @fqn wix.iam.authentication.v1.AuthenticationService.SignOn
999
1007
  */
1000
- declare function signOn(loginId: LoginId, options?: SignOnOptions): Promise<NonNullablePaths<SignOnResponse, `sessionToken` | `identity.connections` | `identity.connections.${number}.idpConnection.idpConnectionId` | `identity.connections.${number}.idpConnection.idpUserId` | `identity.connections.${number}.authenticatorConnection.authenticatorConnectionId` | `identity.connections.${number}.authenticatorConnection.reEnrollmentRequired` | `identity.identityProfile.emails` | `identity.identityProfile.phones` | `identity.identityProfile.labels` | `identity.identityProfile.privacyStatus` | `identity.identityProfile.customFields` | `identity.identityProfile.customFields.${number}.name` | `identity.identityProfile.customFields.${number}.value.strValue` | `identity.identityProfile.customFields.${number}.value.numValue` | `identity.identityProfile.secondaryEmails` | `identity.identityProfile.secondaryEmails.${number}.email` | `identity.identityProfile.secondaryEmails.${number}.tag` | `identity.identityProfile.phonesV2` | `identity.identityProfile.phonesV2.${number}.phone` | `identity.identityProfile.phonesV2.${number}.tag` | `identity.identityProfile.addresses` | `identity.identityProfile.addresses.${number}.tag` | `identity.metadata.tags` | `identity.email.address` | `identity.email.isVerified` | `identity.status.name` | `identity.status.reasons` | `identity.factors` | `identity.factors.${number}.factorId` | `identity.factors.${number}.type` | `identity.factors.${number}.status`>>;
1008
+ declare function signOn(loginId: LoginId, options?: SignOnOptions): Promise<NonNullablePaths<SignOnResponse, `sessionToken` | `identity.connections` | `identity.connections.${number}.idpConnection.idpConnectionId` | `identity.connections.${number}.idpConnection.idpUserId` | `identity.connections.${number}.authenticatorConnection.authenticatorConnectionId` | `identity.connections.${number}.authenticatorConnection.reEnrollmentRequired` | `identity.identityProfile.emails` | `identity.identityProfile.phones` | `identity.identityProfile.labels` | `identity.identityProfile.privacyStatus` | `identity.identityProfile.customFields` | `identity.identityProfile.customFields.${number}.name` | `identity.identityProfile.customFields.${number}.value.strValue` | `identity.identityProfile.customFields.${number}.value.numValue` | `identity.identityProfile.secondaryEmails` | `identity.identityProfile.secondaryEmails.${number}.email` | `identity.identityProfile.secondaryEmails.${number}.tag` | `identity.identityProfile.phonesV2` | `identity.identityProfile.phonesV2.${number}.phone` | `identity.identityProfile.phonesV2.${number}.tag` | `identity.identityProfile.addresses` | `identity.identityProfile.addresses.${number}.tag` | `identity.email.address` | `identity.email.isVerified` | `identity.status.name` | `identity.status.reasons` | `identity.factors` | `identity.factors.${number}.factorId` | `identity.factors.${number}.type` | `identity.factors.${number}.status`>>;
1001
1009
  interface SignOnOptions {
1002
1010
  /** profile of the identity */
1003
1011
  profile?: IdentityProfile;
@@ -1030,7 +1038,7 @@ interface LogoutOptions {
1030
1038
  * @requiredField factorType
1031
1039
  * @fqn wix.iam.authentication.v1.AuthenticationService.Verify
1032
1040
  */
1033
- declare function verify(factorType: FactorTypeWithLiterals, options?: VerifyOptions): Promise<NonNullablePaths<StateMachineResponse, `state` | `identity.connections` | `identity.connections.${number}.idpConnection.idpConnectionId` | `identity.connections.${number}.idpConnection.idpUserId` | `identity.connections.${number}.authenticatorConnection.authenticatorConnectionId` | `identity.connections.${number}.authenticatorConnection.reEnrollmentRequired` | `identity.identityProfile.emails` | `identity.identityProfile.phones` | `identity.identityProfile.labels` | `identity.identityProfile.privacyStatus` | `identity.identityProfile.customFields` | `identity.identityProfile.customFields.${number}.name` | `identity.identityProfile.customFields.${number}.value.strValue` | `identity.identityProfile.customFields.${number}.value.numValue` | `identity.identityProfile.secondaryEmails` | `identity.identityProfile.secondaryEmails.${number}.email` | `identity.identityProfile.secondaryEmails.${number}.tag` | `identity.identityProfile.phonesV2` | `identity.identityProfile.phonesV2.${number}.phone` | `identity.identityProfile.phonesV2.${number}.tag` | `identity.identityProfile.addresses` | `identity.identityProfile.addresses.${number}.tag` | `identity.metadata.tags` | `identity.email.address` | `identity.email.isVerified` | `identity.status.name` | `identity.status.reasons` | `identity.factors` | `identity.factors.${number}.factorId` | `identity.factors.${number}.type` | `identity.factors.${number}.status`>>;
1041
+ declare function verify(factorType: FactorTypeWithLiterals, options?: VerifyOptions): Promise<NonNullablePaths<StateMachineResponse, `state` | `identity.connections` | `identity.connections.${number}.idpConnection.idpConnectionId` | `identity.connections.${number}.idpConnection.idpUserId` | `identity.connections.${number}.authenticatorConnection.authenticatorConnectionId` | `identity.connections.${number}.authenticatorConnection.reEnrollmentRequired` | `identity.identityProfile.emails` | `identity.identityProfile.phones` | `identity.identityProfile.labels` | `identity.identityProfile.privacyStatus` | `identity.identityProfile.customFields` | `identity.identityProfile.customFields.${number}.name` | `identity.identityProfile.customFields.${number}.value.strValue` | `identity.identityProfile.customFields.${number}.value.numValue` | `identity.identityProfile.secondaryEmails` | `identity.identityProfile.secondaryEmails.${number}.email` | `identity.identityProfile.secondaryEmails.${number}.tag` | `identity.identityProfile.phonesV2` | `identity.identityProfile.phonesV2.${number}.phone` | `identity.identityProfile.phonesV2.${number}.tag` | `identity.identityProfile.addresses` | `identity.identityProfile.addresses.${number}.tag` | `identity.email.address` | `identity.email.isVerified` | `identity.status.name` | `identity.status.reasons` | `identity.factors` | `identity.factors.${number}.factorId` | `identity.factors.${number}.type` | `identity.factors.${number}.status`>>;
1034
1042
  interface VerifyOptions extends VerifyOptionsFactorDataOneOf {
1035
1043
  /**
1036
1044
  * TODO: is this a reasonable maxLength?
@@ -480,7 +480,6 @@ var TenantType = /* @__PURE__ */ ((TenantType2) => {
480
480
  TenantType2["UNKNOWN_TENANT_TYPE"] = "UNKNOWN_TENANT_TYPE";
481
481
  TenantType2["ACCOUNT"] = "ACCOUNT";
482
482
  TenantType2["SITE"] = "SITE";
483
- TenantType2["ROOT"] = "ROOT";
484
483
  return TenantType2;
485
484
  })(TenantType || {});
486
485
  async function registerV22(loginId, options) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../index.typings.ts","../../src/iam-authentication-v1-authentication-authentication.universal.ts","../../src/iam-authentication-v1-authentication-authentication.http.ts"],"sourcesContent":["export * from './src/iam-authentication-v1-authentication-authentication.universal.js';\n","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\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\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 /** Profile first name. */\n firstName?: string | null;\n /** Profile last name. */\n lastName?: string | null;\n /** Profile nickname. */\n nickname?: string | null;\n /** Profile picture URL. */\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 * List of profile labels.\n * @maxSize 2000\n */\n labels?: string[];\n /**\n * Profile language.\n * @format LANGUAGE\n */\n language?: string | null;\n /** Profile privacy status. */\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 /** List of profile email addresses. */\n secondaryEmails?: SecondaryEmail[];\n /** List of profile phone numbers. */\n phonesV2?: Phone[];\n /** List of profile physical addresses. */\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 * Profile birthdate in `YYYY-MM-DD` format.\n * @format LOCAL_DATE\n */\n birthdate?: string | null;\n /**\n * Profile slug.\n * @maxLength 255\n */\n slug?: string | null;\n /** Consent to be added to mailing list */\n subscription?: boolean | null;\n /**\n * Government id for personal/corporate (Vat ID).\n * @maxLength 1000\n */\n vatId?: string | null;\n}\n\nexport enum PrivacyStatus {\n /** No defined privacy status. */\n UNDEFINED = 'UNDEFINED',\n /** Profile details, such as profile name and profile picture, are visible to other members. */\n PUBLIC = 'PUBLIC',\n /** Profile details aren't visible to 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. The name must match one of the key properties of the objects returned by\n * [`List Extended Fields`](https://dev.wix.com/docs/rest/api-reference/contacts/extended-fields/list-extended-fields)\n * with the `custom.` prefix removed.\n */\n name?: string;\n /** Custom field value. */\n value?: V1CustomValue;\n}\n\nexport interface V1CustomValue extends V1CustomValueValueOneOf {\n /** String value. */\n strValue?: string;\n /** Number value. */\n numValue?: number;\n /** Date value. */\n dateValue?: Date | null;\n /** Array of values. */\n listValue?: V1ListValue;\n /** Map of values. */\n mapValue?: V1MapValue;\n}\n\n/** @oneof */\nexport interface V1CustomValueValueOneOf {\n /** String value. */\n strValue?: string;\n /** Number value. */\n numValue?: number;\n /** Date value. */\n dateValue?: Date | null;\n /** Array of values. */\n listValue?: V1ListValue;\n /** Map of values. */\n mapValue?: V1MapValue;\n}\n\nexport interface V1ListValue {\n /** Custom value. */\n value?: V1CustomValue[];\n}\n\nexport interface V1MapValue {\n /** Mapped custom value. */\n value?: Record<string, V1CustomValue>;\n}\n\nexport interface SecondaryEmail {\n /**\n * 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 * Phone country code.\n * @format COUNTRY\n */\n countryCode?: string | null;\n /**\n * Phone number.\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 /** Address. */\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\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}\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}\n\nexport interface StateMachineResponse\n extends StateMachineResponseStateDataOneOf {\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\nexport enum StateType {\n /** Initial unknown state. */\n UNKNOWN_STATE = 'UNKNOWN_STATE',\n /** Login completed successfully. */\n SUCCESS = 'SUCCESS',\n /** Indicates that the member needs the owner to approve their registration. */\n REQUIRE_OWNER_APPROVAL = 'REQUIRE_OWNER_APPROVAL',\n /** Indicates that the member needs to verify their email. */\n REQUIRE_EMAIL_VERIFICATION = 'REQUIRE_EMAIL_VERIFICATION',\n /** Indicates that 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\n/** @enumType */\nexport type StateTypeWithLiterals =\n | StateType\n | 'UNKNOWN_STATE'\n | 'SUCCESS'\n | 'REQUIRE_OWNER_APPROVAL'\n | 'REQUIRE_EMAIL_VERIFICATION'\n | 'STATUS_CHECK';\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 /** Custom attributes. */\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 * @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 name?: StatusNameWithLiterals;\n reasons?: ReasonWithLiterals[];\n}\n\nexport enum StatusName {\n UNKNOWN_STATUS = 'UNKNOWN_STATUS',\n PENDING = 'PENDING',\n ACTIVE = 'ACTIVE',\n DELETED = 'DELETED',\n BLOCKED = 'BLOCKED',\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 Reason {\n UNKNOWN_REASON = 'UNKNOWN_REASON',\n PENDING_ADMIN_APPROVAL_REQUIRED = 'PENDING_ADMIN_APPROVAL_REQUIRED',\n PENDING_EMAIL_VERIFICATION_REQUIRED = 'PENDING_EMAIL_VERIFICATION_REQUIRED',\n}\n\n/** @enumType */\nexport type ReasonWithLiterals =\n | Reason\n | 'UNKNOWN_REASON'\n | 'PENDING_ADMIN_APPROVAL_REQUIRED'\n | 'PENDING_EMAIL_VERIFICATION_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 FactorType {\n /** Unknown factor type. */\n UNKNOWN_FACTOR_TYPE = 'UNKNOWN_FACTOR_TYPE',\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}\n\n/** @enumType */\nexport type FactorTypeWithLiterals =\n | FactorType\n | 'UNKNOWN_FACTOR_TYPE'\n | 'PASSWORD'\n | 'SMS'\n | 'CALL'\n | 'EMAIL'\n | 'TOTP'\n | 'PUSH'\n | 'WEBAUTHN';\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 UNKNOWN_FACTOR_STATUS = 'UNKNOWN_FACTOR_STATUS',\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 | 'UNKNOWN_FACTOR_STATUS'\n | 'ENABLED'\n | 'REQUIRE_ACTIVATION'\n | 'REQUIRE_REENROLL'\n | 'ENABLED_BY_RULE'\n | 'DISABLED_BY_RULE';\n\nexport enum MfaReason {\n UNKNOWN_MFA_REASON = 'UNKNOWN_MFA_REASON',\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 | 'UNKNOWN_MFA_REASON'\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 * The challenge that will be signed by the authenticator during the WebAuthn authentication ceremony.\n * This should be a cryptographically secure random value with at least 16 bytes of entropy.\n * The value is used to prevent replay attacks and MUST be randomly generated by the implementer.\n */\n challenge?: Uint8Array;\n /**\n * The timeout in milliseconds for the WebAuthn authentication ceremony.\n * After this time, the challenge will be considered expired and the authentication will need to be restarted.\n * This is optional and may be overridden by the client if provided.\n * The WebAuthn spec recommends a timeout of at least 1 minute (60000ms).\n */\n timeoutMs?: number | null;\n /**\n * Optional list of credentials that are acceptable for this authentication ceremony.\n * If empty, all credentials associated with the user will be considered.\n * @maxSize 10\n */\n allowCredentials?: PublicKeyCredentialDescriptor[];\n /** Specifies the requirement for user verification during the authentication ceremony. */\n userVerification?: UserVerificationRequirementWithLiterals;\n /**\n * Optional hints to guide the client UI\n * Examples include \"security-key\" to emphasize external authenticators\n * or \"client-device\" to emphasize built-in authenticators\n * @maxLength 50\n * @maxSize 10\n */\n hints?: string[];\n /**\n * Optional extensions for the authentication ceremony\n * Provides additional parameters for specialized WebAuthn functionality\n */\n extensions?: AuthenticationExtensionInputs;\n}\n\nexport interface PublicKeyCredentialDescriptor {\n /** The credential ID */\n _id?: Uint8Array;\n /**\n * An optional hint as to the transports used by the credential\n * Examples include \"usb\", \"nfc\", \"ble\", \"internal\", \"hybrid\"\n * @maxLength 50\n * @maxSize 10\n */\n transports?: string[];\n}\n\nexport enum UserVerificationRequirement {\n /** Default unspecified value */\n USER_VERIFICATION_UNSPECIFIED = 'USER_VERIFICATION_UNSPECIFIED',\n /**\n * The Relying Party requires user verification and will fail the operation if the response doesn't have the UV flag\n * set\n */\n USER_VERIFICATION_REQUIRED = 'USER_VERIFICATION_REQUIRED',\n /** The Relying Party prefers user verification but will not fail the operation if unavailable */\n USER_VERIFICATION_PREFERRED = 'USER_VERIFICATION_PREFERRED',\n /** The Relying Party does not want user verification employed (e.g., to minimize disruption to the user experience) */\n USER_VERIFICATION_DISCOURAGED = 'USER_VERIFICATION_DISCOURAGED',\n}\n\n/** @enumType */\nexport type UserVerificationRequirementWithLiterals =\n | UserVerificationRequirement\n | 'USER_VERIFICATION_UNSPECIFIED'\n | 'USER_VERIFICATION_REQUIRED'\n | 'USER_VERIFICATION_PREFERRED'\n | 'USER_VERIFICATION_DISCOURAGED';\n\nexport interface AuthenticationExtensionInputs\n extends AuthenticationExtensionInputsLargeBlobOperationOneOf {\n /** Read existing large blob data from the authenticator */\n largeBlobRead?: boolean;\n /** Write data to the authenticator's large blob storage */\n largeBlobWrite?: Uint8Array;\n /**\n * FIDO AppID Extension (appid)\n * An AppID that was used for previously registered U2F authenticators\n * This makes already-registered U2F credentials forward-compatible with the WebAuthn API\n * @maxLength 256\n */\n appid?: string;\n /**\n * User Verification Method Extension (uvm)\n * Requests the authenticator to report which verification methods were used\n * Examples include fingerprint, PIN, or facial recognition\n */\n uvm?: boolean;\n}\n\n/** @oneof */\nexport interface AuthenticationExtensionInputsLargeBlobOperationOneOf {\n /** Read existing large blob data from the authenticator */\n largeBlobRead?: boolean;\n /** Write data to the authenticator's large blob storage */\n largeBlobWrite?: Uint8Array;\n}\n\nexport interface LoginV2Request {\n /** Identifier of identity logging in. */\n loginId: LoginId;\n /** Password of the identity logging in. */\n password?: string;\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\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 ChangePasswordRequest {\n /** The new password to set for the logged in user */\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 sessionId?: string;\n encryptionKey?: string;\n visitorId?: string | null;\n bsi?: string | null;\n}\n\nexport enum TenantType {\n UNKNOWN_TENANT_TYPE = 'UNKNOWN_TENANT_TYPE',\n ACCOUNT = 'ACCOUNT',\n SITE = 'SITE',\n ROOT = 'ROOT',\n}\n\n/** @enumType */\nexport type TenantTypeWithLiterals =\n | TenantType\n | 'UNKNOWN_TENANT_TYPE'\n | 'ACCOUNT'\n | 'SITE'\n | 'ROOT';\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\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 /** the identifier of the identity */\n loginId: LoginId;\n /** profile of the identity */\n profile?: IdentityProfile;\n /** when true will mark the email of the identity as verified */\n verifyEmail?: boolean;\n /** when false will create a new contact instead of merging the existing contact into the identity */\n mergeExistingContact?: boolean;\n}\n\nexport interface SignOnResponse {\n /** session token for the requested identity */\n sessionToken?: string;\n /** The Identity of the provided login_id */\n identity?: Identity;\n}\n\n/** logout request payload */\nexport interface LogoutRequest {\n /**\n * redirect after logout\n * @format WEB_URL\n */\n postLogoutRedirectUri?: string | null;\n /**\n * caller identifier\n * @format GUID\n */\n clientId?: string | null;\n}\n\nexport interface VerifyRequest extends VerifyRequestFactorDataOneOf {\n smsData?: SmsVerifyData;\n callData?: CallVerifyData;\n emailData?: ExternalEmailVerifyData;\n totpData?: TotpVerifyData;\n pushData?: PushVerifyData;\n webauthnData?: WebAuthnVerifyData;\n /**\n * TODO: is this a reasonable maxLength?\n * @maxLength 1000\n */\n stateToken?: string;\n factorType: FactorTypeWithLiterals;\n /** Relevant for second factors only. */\n rememberThisDevice?: boolean;\n}\n\n/** @oneof */\nexport interface VerifyRequestFactorDataOneOf {\n smsData?: SmsVerifyData;\n callData?: CallVerifyData;\n emailData?: ExternalEmailVerifyData;\n totpData?: TotpVerifyData;\n pushData?: PushVerifyData;\n webauthnData?: WebAuthnVerifyData;\n}\n\nexport interface SmsVerifyData {\n /**\n * @minLength 1\n * @maxLength 100\n */\n code?: string | null;\n}\n\nexport interface CallVerifyData {\n /**\n * @minLength 1\n * @maxLength 100\n */\n code?: string | null;\n}\n\nexport interface ExternalEmailVerifyData {\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 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 };\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 };\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 };\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.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.metadata.tags`\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 > & {\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 }),\n [\n {\n transformFn: transformSDKAddressToRESTAddress,\n paths: [{ path: 'profile.addresses.address' }],\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: [{ path: 'identity.identityProfile.addresses.address' }],\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 },\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\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.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.metadata.tags`\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 > & {\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 });\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: [{ path: 'identity.identityProfile.addresses.address' }],\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 },\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;\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\n/**\n * Changes the password of a logged in user.\n * @param newPassword - The new password to set for the logged in user\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/** @param loginId - the identifier of the identity\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.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.metadata.tags`\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 >\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: [{ path: 'profile.addresses.address' }],\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: [{ path: 'identity.identityProfile.addresses.address' }],\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 /** profile of the identity */\n profile?: IdentityProfile;\n /** when true will mark the email of the identity as verified */\n verifyEmail?: boolean;\n /** when false will create a new contact instead of merging the existing contact into the identity */\n mergeExistingContact?: boolean;\n}\n\n/**\n * Logs out a member.\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 >\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 * redirect after logout\n * @format WEB_URL\n */\n postLogoutRedirectUri?: string | null;\n /**\n * caller identifier\n * @format GUID\n */\n clientId?: string | null;\n}\n\n/** @public\n * @documentationMaturity preview\n * @requiredField factorType\n * @fqn wix.iam.authentication.v1.AuthenticationService.Verify\n */\nexport async function verify(\n factorType: FactorTypeWithLiterals,\n options?: VerifyOptions\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.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.metadata.tags`\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 >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n factorType: factorType,\n stateToken: options?.stateToken,\n rememberThisDevice: options?.rememberThisDevice,\n smsData: options?.smsData,\n callData: options?.callData,\n emailData: options?.emailData,\n totpData: options?.totpData,\n pushData: options?.pushData,\n webauthnData: options?.webauthnData,\n });\n\n const reqOpts =\n ambassadorWixIamAuthenticationV1Authentication.verify(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: [{ path: 'identity.identityProfile.addresses.address' }],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n factorType: '$[0]',\n stateToken: '$[1].stateToken',\n rememberThisDevice: '$[1].rememberThisDevice',\n smsData: '$[1].smsData',\n callData: '$[1].callData',\n emailData: '$[1].emailData',\n totpData: '$[1].totpData',\n pushData: '$[1].pushData',\n webauthnData: '$[1].webauthnData',\n },\n singleArgumentUnchanged: false,\n },\n ['factorType', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface VerifyOptions extends VerifyOptionsFactorDataOneOf {\n /**\n * TODO: is this a reasonable maxLength?\n * @maxLength 1000\n */\n stateToken?: string;\n /** Relevant for second factors only. */\n rememberThisDevice?: boolean;\n smsData?: SmsVerifyData;\n callData?: CallVerifyData;\n emailData?: ExternalEmailVerifyData;\n totpData?: TotpVerifyData;\n pushData?: PushVerifyData;\n webauthnData?: WebAuthnVerifyData;\n}\n\n/** @oneof */\nexport interface VerifyOptionsFactorDataOneOf {\n smsData?: SmsVerifyData;\n callData?: CallVerifyData;\n emailData?: ExternalEmailVerifyData;\n totpData?: TotpVerifyData;\n pushData?: PushVerifyData;\n webauthnData?: WebAuthnVerifyData;\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\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 '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 '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 };\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: [{ path: 'profile.customFields.value.numValue' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'profile.customFields.value.dateValue' }],\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 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: transformRESTBytesToSDKBytes,\n paths: [\n {\n path: 'mfaChallengeData.verificationChallengeData.webauthnData.challenge',\n },\n {\n path: 'mfaChallengeData.verificationChallengeData.webauthnData.allowCredentials.id',\n },\n {\n path: 'mfaChallengeData.verificationChallengeData.webauthnData.extensions.largeBlobWrite',\n },\n ],\n },\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'identity.createdDate' },\n { path: 'identity.updatedDate' },\n { path: 'identity.identityProfile.customFields.value.dateValue' },\n { path: 'additionalData.*.dateValue' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'identity.identityProfile.customFields.value.numValue' },\n { path: 'additionalData.*.numValue' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __registerV2;\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 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: transformRESTBytesToSDKBytes,\n paths: [\n {\n path: 'mfaChallengeData.verificationChallengeData.webauthnData.challenge',\n },\n {\n path: 'mfaChallengeData.verificationChallengeData.webauthnData.allowCredentials.id',\n },\n {\n path: 'mfaChallengeData.verificationChallengeData.webauthnData.extensions.largeBlobWrite',\n },\n ],\n },\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'identity.createdDate' },\n { path: 'identity.updatedDate' },\n { path: 'identity.identityProfile.customFields.value.dateValue' },\n { path: 'additionalData.*.dateValue' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'identity.identityProfile.customFields.value.numValue' },\n { path: 'additionalData.*.numValue' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __loginV2;\n}\n\n/** Changes the password of a logged in user. */\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 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\nexport function signOn(payload: object): RequestOptionsFactory<any> {\n function __signOn({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [{ path: 'profile.customFields.value.numValue' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'profile.customFields.value.dateValue' }],\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 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: [\n { path: 'identity.createdDate' },\n { path: 'identity.updatedDate' },\n { path: 'identity.identityProfile.customFields.value.dateValue' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'identity.identityProfile.customFields.value.numValue' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __signOn;\n}\n\n/** Logs out a member. */\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 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: [{ path: 'body' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __logout;\n}\n\nexport function verify(payload: object): RequestOptionsFactory<any> {\n function __verify({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.iam.authentication.v1.authentication',\n method: 'POST' as any,\n methodFqn: 'wix.iam.authentication.v1.AuthenticationService.Verify',\n packageName: PACKAGE_NAME,\n url: resolveWixIamAuthenticationV1AuthenticationServiceUrl({\n protoPath: '/v2/{factorType}/verify',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTBytesToSDKBytes,\n paths: [\n {\n path: 'mfaChallengeData.verificationChallengeData.webauthnData.challenge',\n },\n {\n path: 'mfaChallengeData.verificationChallengeData.webauthnData.allowCredentials.id',\n },\n {\n path: 'mfaChallengeData.verificationChallengeData.webauthnData.extensions.largeBlobWrite',\n },\n ],\n },\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'identity.createdDate' },\n { path: 'identity.updatedDate' },\n { path: 'identity.identityProfile.customFields.value.dateValue' },\n { path: 'additionalData.*.dateValue' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'identity.identityProfile.customFields.value.numValue' },\n { path: 'additionalData.*.numValue' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __verify;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAAAA;AAAA,EAAA,eAAAC;AAAA,EAAA,cAAAC;AAAA,EAAA,kBAAAC;AAAA,EAAA,cAAAC;AAAA,EAAA,cAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,mBAA6C;AAC7C,IAAAC,gBAA6C;AAC7C,mBAA6C;AAC7C,uBAAqD;AACrD,IAAAC,oBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,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,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,oBAAoB;AAAA,MAClB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAA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CAAC;AAAA,QACzB,0BAA0B;AAAA,UACxB,YAAY;AAAA,UACZ,YAAY;AAAA,UACZ,oBAAoB;AAAA,UACpB,SAAS;AAAA,UACT,UAAU;AAAA,UACV,WAAW;AAAA,UACX,UAAU;AAAA,UACV,UAAU;AAAA,UACV,cAAc;AAAA,QAChB;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,cAAc,SAAS;AAAA,IAC1B;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["changePassword","loginV2","logout","registerV2","signOn","verify","import_float","import_timestamp","import_rest_modules","payload","import_address","import_transform_paths","PrivacyStatus","EmailTag","PhoneTag","AddressTag","StateType","StatusName","Reason","FactorType","Status","FactorStatus","MfaReason","UserVerificationRequirement","TenantType","registerV2","sdkTransformError","loginV2","changePassword","signOn","logout","verify"]}
1
+ {"version":3,"sources":["../../index.typings.ts","../../src/iam-authentication-v1-authentication-authentication.universal.ts","../../src/iam-authentication-v1-authentication-authentication.http.ts"],"sourcesContent":["export * from './src/iam-authentication-v1-authentication-authentication.universal.js';\n","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\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\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 /** Profile first name. */\n firstName?: string | null;\n /** Profile last name. */\n lastName?: string | null;\n /** Profile nickname. */\n nickname?: string | null;\n /** Profile picture URL. */\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 * List of profile labels.\n * @maxSize 2000\n */\n labels?: string[];\n /**\n * Profile language.\n * @format LANGUAGE\n */\n language?: string | null;\n /** Profile privacy status. */\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 /** List of profile email addresses. */\n secondaryEmails?: SecondaryEmail[];\n /** List of profile phone numbers. */\n phonesV2?: Phone[];\n /** List of profile physical addresses. */\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 * Profile birthdate in `YYYY-MM-DD` format.\n * @format LOCAL_DATE\n */\n birthdate?: string | null;\n /**\n * Profile slug.\n * @maxLength 255\n */\n slug?: string | null;\n /** Consent to be added to mailing list */\n subscription?: boolean | null;\n /**\n * Government id for personal/corporate (Vat ID).\n * @maxLength 1000\n */\n vatId?: string | null;\n}\n\nexport enum PrivacyStatus {\n /** No defined privacy status. */\n UNDEFINED = 'UNDEFINED',\n /** Profile details, such as profile name and profile picture, are visible to other members. */\n PUBLIC = 'PUBLIC',\n /** Profile details aren't visible to 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. The name must match one of the key properties of the objects returned by\n * [`List Extended Fields`](https://dev.wix.com/docs/rest/api-reference/contacts/extended-fields/list-extended-fields)\n * with the `custom.` prefix removed.\n */\n name?: string;\n /** Custom field value. */\n value?: V1CustomValue;\n}\n\nexport interface V1CustomValue extends V1CustomValueValueOneOf {\n /** String value. */\n strValue?: string;\n /** Number value. */\n numValue?: number;\n /** Date value. */\n dateValue?: Date | null;\n /** Array of values. */\n listValue?: V1ListValue;\n /** Map of values. */\n mapValue?: V1MapValue;\n}\n\n/** @oneof */\nexport interface V1CustomValueValueOneOf {\n /** String value. */\n strValue?: string;\n /** Number value. */\n numValue?: number;\n /** Date value. */\n dateValue?: Date | null;\n /** Array of values. */\n listValue?: V1ListValue;\n /** Map of values. */\n mapValue?: V1MapValue;\n}\n\nexport interface V1ListValue {\n /** Custom value. */\n value?: V1CustomValue[];\n}\n\nexport interface V1MapValue {\n /** Mapped custom value. */\n value?: Record<string, V1CustomValue>;\n}\n\nexport interface SecondaryEmail {\n /**\n * 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 * Phone country code.\n * @format COUNTRY\n */\n countryCode?: string | null;\n /**\n * Phone number.\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 /** Address. */\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\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}\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}\n\nexport interface StateMachineResponse\n extends StateMachineResponseStateDataOneOf {\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\nexport enum StateType {\n /** Initial unknown state. */\n UNKNOWN_STATE = 'UNKNOWN_STATE',\n /** Login completed successfully. */\n SUCCESS = 'SUCCESS',\n /** Indicates that the member needs the owner to approve their registration. */\n REQUIRE_OWNER_APPROVAL = 'REQUIRE_OWNER_APPROVAL',\n /** Indicates that the member needs to verify their email. */\n REQUIRE_EMAIL_VERIFICATION = 'REQUIRE_EMAIL_VERIFICATION',\n /** Indicates that 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\n/** @enumType */\nexport type StateTypeWithLiterals =\n | StateType\n | 'UNKNOWN_STATE'\n | 'SUCCESS'\n | 'REQUIRE_OWNER_APPROVAL'\n | 'REQUIRE_EMAIL_VERIFICATION'\n | 'STATUS_CHECK';\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 /** Custom attributes. */\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\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?: ReasonWithLiterals[];\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 Reason {\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}\n\n/** @enumType */\nexport type ReasonWithLiterals =\n | Reason\n | 'UNKNOWN_REASON'\n | 'PENDING_ADMIN_APPROVAL_REQUIRED'\n | 'PENDING_EMAIL_VERIFICATION_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 FactorType {\n /** Unknown factor type. */\n UNKNOWN_FACTOR_TYPE = 'UNKNOWN_FACTOR_TYPE',\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}\n\n/** @enumType */\nexport type FactorTypeWithLiterals =\n | FactorType\n | 'UNKNOWN_FACTOR_TYPE'\n | 'PASSWORD'\n | 'SMS'\n | 'CALL'\n | 'EMAIL'\n | 'TOTP'\n | 'PUSH'\n | 'WEBAUTHN';\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 UNKNOWN_FACTOR_STATUS = 'UNKNOWN_FACTOR_STATUS',\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 | 'UNKNOWN_FACTOR_STATUS'\n | 'ENABLED'\n | 'REQUIRE_ACTIVATION'\n | 'REQUIRE_REENROLL'\n | 'ENABLED_BY_RULE'\n | 'DISABLED_BY_RULE';\n\nexport enum MfaReason {\n UNKNOWN_MFA_REASON = 'UNKNOWN_MFA_REASON',\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 | 'UNKNOWN_MFA_REASON'\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 * The challenge that will be signed by the authenticator during the WebAuthn authentication ceremony.\n * This should be a cryptographically secure random value with at least 16 bytes of entropy.\n * The value is used to prevent replay attacks and MUST be randomly generated by the implementer.\n */\n challenge?: Uint8Array;\n /**\n * The timeout in milliseconds for the WebAuthn authentication ceremony.\n * After this time, the challenge will be considered expired and the authentication will need to be restarted.\n * This is optional and may be overridden by the client if provided.\n * The WebAuthn spec recommends a timeout of at least 1 minute (60000ms).\n */\n timeoutMs?: number | null;\n /**\n * Optional list of credentials that are acceptable for this authentication ceremony.\n * If empty, all credentials associated with the user will be considered.\n * @maxSize 10\n */\n allowCredentials?: PublicKeyCredentialDescriptor[];\n /** Specifies the requirement for user verification during the authentication ceremony. */\n userVerification?: UserVerificationRequirementWithLiterals;\n /**\n * Optional hints to guide the client UI\n * Examples include \"security-key\" to emphasize external authenticators\n * or \"client-device\" to emphasize built-in authenticators\n * @maxLength 50\n * @maxSize 10\n */\n hints?: string[];\n /**\n * Optional extensions for the authentication ceremony\n * Provides additional parameters for specialized WebAuthn functionality\n */\n extensions?: AuthenticationExtensionInputs;\n}\n\nexport interface PublicKeyCredentialDescriptor {\n /** The credential ID */\n _id?: Uint8Array;\n /**\n * An optional hint as to the transports used by the credential\n * Examples include \"usb\", \"nfc\", \"ble\", \"internal\", \"hybrid\"\n * @maxLength 50\n * @maxSize 10\n */\n transports?: string[];\n}\n\nexport enum UserVerificationRequirement {\n /** Default unspecified value */\n USER_VERIFICATION_UNSPECIFIED = 'USER_VERIFICATION_UNSPECIFIED',\n /**\n * The Relying Party requires user verification and will fail the operation if the response doesn't have the UV flag\n * set\n */\n USER_VERIFICATION_REQUIRED = 'USER_VERIFICATION_REQUIRED',\n /** The Relying Party prefers user verification but will not fail the operation if unavailable */\n USER_VERIFICATION_PREFERRED = 'USER_VERIFICATION_PREFERRED',\n /** The Relying Party does not want user verification employed (e.g., to minimize disruption to the user experience) */\n USER_VERIFICATION_DISCOURAGED = 'USER_VERIFICATION_DISCOURAGED',\n}\n\n/** @enumType */\nexport type UserVerificationRequirementWithLiterals =\n | UserVerificationRequirement\n | 'USER_VERIFICATION_UNSPECIFIED'\n | 'USER_VERIFICATION_REQUIRED'\n | 'USER_VERIFICATION_PREFERRED'\n | 'USER_VERIFICATION_DISCOURAGED';\n\nexport interface AuthenticationExtensionInputs\n extends AuthenticationExtensionInputsLargeBlobOperationOneOf {\n /** Read existing large blob data from the authenticator */\n largeBlobRead?: boolean;\n /** Write data to the authenticator's large blob storage */\n largeBlobWrite?: Uint8Array;\n /**\n * FIDO AppID Extension (appid)\n * An AppID that was used for previously registered U2F authenticators\n * This makes already-registered U2F credentials forward-compatible with the WebAuthn API\n * @maxLength 256\n */\n appid?: string;\n /**\n * User Verification Method Extension (uvm)\n * Requests the authenticator to report which verification methods were used\n * Examples include fingerprint, PIN, or facial recognition\n */\n uvm?: boolean;\n}\n\n/** @oneof */\nexport interface AuthenticationExtensionInputsLargeBlobOperationOneOf {\n /** Read existing large blob data from the authenticator */\n largeBlobRead?: boolean;\n /** Write data to the authenticator's large blob storage */\n largeBlobWrite?: Uint8Array;\n}\n\nexport interface LoginV2Request {\n /** Identifier of identity logging in. */\n loginId: LoginId;\n /** Password of the identity logging in. */\n password?: string;\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\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 ChangePasswordRequest {\n /** The new password to set for the logged in user */\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 sessionId?: string;\n encryptionKey?: string;\n visitorId?: string | null;\n bsi?: 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\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\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 /** the identifier of the identity */\n loginId: LoginId;\n /** profile of the identity */\n profile?: IdentityProfile;\n /** when true will mark the email of the identity as verified */\n verifyEmail?: boolean;\n /** when false will create a new contact instead of merging the existing contact into the identity */\n mergeExistingContact?: boolean;\n}\n\nexport interface SignOnResponse {\n /** session token for the requested identity */\n sessionToken?: string;\n /** The Identity of the provided login_id */\n identity?: Identity;\n}\n\n/** logout request payload */\nexport interface LogoutRequest {\n /**\n * redirect after logout\n * @format WEB_URL\n */\n postLogoutRedirectUri?: string | null;\n /**\n * caller identifier\n * @format GUID\n */\n clientId?: string | null;\n}\n\nexport interface VerifyRequest extends VerifyRequestFactorDataOneOf {\n smsData?: SmsVerifyData;\n callData?: CallVerifyData;\n emailData?: ExternalEmailVerifyData;\n totpData?: TotpVerifyData;\n pushData?: PushVerifyData;\n webauthnData?: WebAuthnVerifyData;\n /**\n * TODO: is this a reasonable maxLength?\n * @maxLength 1000\n */\n stateToken?: string;\n factorType: FactorTypeWithLiterals;\n /** Relevant for second factors only. */\n rememberThisDevice?: boolean;\n}\n\n/** @oneof */\nexport interface VerifyRequestFactorDataOneOf {\n smsData?: SmsVerifyData;\n callData?: CallVerifyData;\n emailData?: ExternalEmailVerifyData;\n totpData?: TotpVerifyData;\n pushData?: PushVerifyData;\n webauthnData?: WebAuthnVerifyData;\n}\n\nexport interface SmsVerifyData {\n /**\n * @minLength 1\n * @maxLength 100\n */\n code?: string | null;\n}\n\nexport interface CallVerifyData {\n /**\n * @minLength 1\n * @maxLength 100\n */\n code?: string | null;\n}\n\nexport interface ExternalEmailVerifyData {\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 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 };\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 };\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 };\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.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 > & {\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 }),\n [\n {\n transformFn: transformSDKAddressToRESTAddress,\n paths: [{ path: 'profile.addresses.address' }],\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: [{ path: 'identity.identityProfile.addresses.address' }],\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 },\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\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.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 > & {\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 });\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: [{ path: 'identity.identityProfile.addresses.address' }],\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 },\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;\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\n/**\n * Changes the password of a logged in user.\n * @param newPassword - The new password to set for the logged in user\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/** @param loginId - the identifier of the identity\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.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 >\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: [{ path: 'profile.addresses.address' }],\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: [{ path: 'identity.identityProfile.addresses.address' }],\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 /** profile of the identity */\n profile?: IdentityProfile;\n /** when true will mark the email of the identity as verified */\n verifyEmail?: boolean;\n /** when false will create a new contact instead of merging the existing contact into the identity */\n mergeExistingContact?: boolean;\n}\n\n/**\n * Logs out a member.\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 >\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 * redirect after logout\n * @format WEB_URL\n */\n postLogoutRedirectUri?: string | null;\n /**\n * caller identifier\n * @format GUID\n */\n clientId?: string | null;\n}\n\n/** @public\n * @documentationMaturity preview\n * @requiredField factorType\n * @fqn wix.iam.authentication.v1.AuthenticationService.Verify\n */\nexport async function verify(\n factorType: FactorTypeWithLiterals,\n options?: VerifyOptions\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.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 >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n factorType: factorType,\n stateToken: options?.stateToken,\n rememberThisDevice: options?.rememberThisDevice,\n smsData: options?.smsData,\n callData: options?.callData,\n emailData: options?.emailData,\n totpData: options?.totpData,\n pushData: options?.pushData,\n webauthnData: options?.webauthnData,\n });\n\n const reqOpts =\n ambassadorWixIamAuthenticationV1Authentication.verify(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: [{ path: 'identity.identityProfile.addresses.address' }],\n },\n ])\n )!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n factorType: '$[0]',\n stateToken: '$[1].stateToken',\n rememberThisDevice: '$[1].rememberThisDevice',\n smsData: '$[1].smsData',\n callData: '$[1].callData',\n emailData: '$[1].emailData',\n totpData: '$[1].totpData',\n pushData: '$[1].pushData',\n webauthnData: '$[1].webauthnData',\n },\n singleArgumentUnchanged: false,\n },\n ['factorType', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface VerifyOptions extends VerifyOptionsFactorDataOneOf {\n /**\n * TODO: is this a reasonable maxLength?\n * @maxLength 1000\n */\n stateToken?: string;\n /** Relevant for second factors only. */\n rememberThisDevice?: boolean;\n smsData?: SmsVerifyData;\n callData?: CallVerifyData;\n emailData?: ExternalEmailVerifyData;\n totpData?: TotpVerifyData;\n pushData?: PushVerifyData;\n webauthnData?: WebAuthnVerifyData;\n}\n\n/** @oneof */\nexport interface VerifyOptionsFactorDataOneOf {\n smsData?: SmsVerifyData;\n callData?: CallVerifyData;\n emailData?: ExternalEmailVerifyData;\n totpData?: TotpVerifyData;\n pushData?: PushVerifyData;\n webauthnData?: WebAuthnVerifyData;\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\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 '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 '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 };\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: [{ path: 'profile.customFields.value.numValue' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'profile.customFields.value.dateValue' }],\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 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: transformRESTBytesToSDKBytes,\n paths: [\n {\n path: 'mfaChallengeData.verificationChallengeData.webauthnData.challenge',\n },\n {\n path: 'mfaChallengeData.verificationChallengeData.webauthnData.allowCredentials.id',\n },\n {\n path: 'mfaChallengeData.verificationChallengeData.webauthnData.extensions.largeBlobWrite',\n },\n ],\n },\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'identity.createdDate' },\n { path: 'identity.updatedDate' },\n { path: 'identity.identityProfile.customFields.value.dateValue' },\n { path: 'additionalData.*.dateValue' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'identity.identityProfile.customFields.value.numValue' },\n { path: 'additionalData.*.numValue' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __registerV2;\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 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: transformRESTBytesToSDKBytes,\n paths: [\n {\n path: 'mfaChallengeData.verificationChallengeData.webauthnData.challenge',\n },\n {\n path: 'mfaChallengeData.verificationChallengeData.webauthnData.allowCredentials.id',\n },\n {\n path: 'mfaChallengeData.verificationChallengeData.webauthnData.extensions.largeBlobWrite',\n },\n ],\n },\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'identity.createdDate' },\n { path: 'identity.updatedDate' },\n { path: 'identity.identityProfile.customFields.value.dateValue' },\n { path: 'additionalData.*.dateValue' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'identity.identityProfile.customFields.value.numValue' },\n { path: 'additionalData.*.numValue' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __loginV2;\n}\n\n/** Changes the password of a logged in user. */\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 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\nexport function signOn(payload: object): RequestOptionsFactory<any> {\n function __signOn({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [{ path: 'profile.customFields.value.numValue' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [{ path: 'profile.customFields.value.dateValue' }],\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 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: [\n { path: 'identity.createdDate' },\n { path: 'identity.updatedDate' },\n { path: 'identity.identityProfile.customFields.value.dateValue' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'identity.identityProfile.customFields.value.numValue' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __signOn;\n}\n\n/** Logs out a member. */\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 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: [{ path: 'body' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __logout;\n}\n\nexport function verify(payload: object): RequestOptionsFactory<any> {\n function __verify({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.iam.authentication.v1.authentication',\n method: 'POST' as any,\n methodFqn: 'wix.iam.authentication.v1.AuthenticationService.Verify',\n packageName: PACKAGE_NAME,\n url: resolveWixIamAuthenticationV1AuthenticationServiceUrl({\n protoPath: '/v2/{factorType}/verify',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTBytesToSDKBytes,\n paths: [\n {\n path: 'mfaChallengeData.verificationChallengeData.webauthnData.challenge',\n },\n {\n path: 'mfaChallengeData.verificationChallengeData.webauthnData.allowCredentials.id',\n },\n {\n path: 'mfaChallengeData.verificationChallengeData.webauthnData.extensions.largeBlobWrite',\n },\n ],\n },\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'identity.createdDate' },\n { path: 'identity.updatedDate' },\n { path: 'identity.identityProfile.customFields.value.dateValue' },\n { path: 'additionalData.*.dateValue' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'identity.identityProfile.customFields.value.numValue' },\n { path: 'additionalData.*.numValue' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __verify;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAAAA;AAAA,EAAA,eAAAC;AAAA,EAAA,cAAAC;AAAA,EAAA,kBAAAC;AAAA,EA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A;AAEA,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,cAAU,qEAAsC;AAAA,IACpD;AAAA,IACA,YAAY,SAAS;AAAA,IACrB,oBAAoB,SAAS;AAAA,IAC7B,SAAS,SAAS;AAAA,IAClB,UAAU,SAAS;AAAA,IACnB,WAAW,SAAS;AAAA,IACpB,UAAU,SAAS;AAAA,IACnB,UAAU,SAAS;AAAA,IACnB,cAAc,SAAS;AAAA,EACzB,CAAC;AAED,QAAM,UAC2C,OAAO,OAAO;AAE/D,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,eAAO;AAAA,UACL,wCAAe,OAAO,MAAM;AAAA,QAC1B;AAAA,UACE,aAAa;AAAA,UACb,OAAO,CAAC,EAAE,MAAM,6CAA6C,CAAC;AAAA,QAChE;AAAA,MACF,CAAC;AAAA,IACH;AAAA,EACF,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAL;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B;AAAA,UACxB,YAAY;AAAA,UACZ,YAAY;AAAA,UACZ,oBAAoB;AAAA,UACpB,SAAS;AAAA,UACT,UAAU;AAAA,UACV,WAAW;AAAA,UACX,UAAU;AAAA,UACV,UAAU;AAAA,UACV,cAAc;AAAA,QAChB;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,cAAc,SAAS;AAAA,IAC1B;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["changePassword","loginV2","logout","registerV2","signOn","verify","import_float","import_timestamp","import_rest_modules","payload","import_address","import_transform_paths","PrivacyStatus","EmailTag","PhoneTag","AddressTag","StateType","StatusName","Reason","FactorType","Status","FactorStatus","MfaReason","UserVerificationRequirement","TenantType","registerV2","sdkTransformError","loginV2","changePassword","signOn","logout","verify"]}
@@ -363,11 +363,6 @@ interface AuthenticatorConnection {
363
363
  reEnrollmentRequired?: boolean;
364
364
  }
365
365
  interface Metadata {
366
- /**
367
- * General tags. For example, `"isOwner"`.
368
- * @readonly
369
- */
370
- tags?: string[];
371
366
  }
372
367
  interface Email {
373
368
  /**
@@ -379,22 +374,33 @@ interface Email {
379
374
  isVerified?: boolean;
380
375
  }
381
376
  interface StatusV2 {
377
+ /** Descriptive name of the identity status. */
382
378
  name?: StatusNameWithLiterals;
379
+ /** Reasons for the current identity status. */
383
380
  reasons?: ReasonWithLiterals[];
384
381
  }
385
382
  declare enum StatusName {
383
+ /** Unknown status. This value isn't used. */
386
384
  UNKNOWN_STATUS = "UNKNOWN_STATUS",
385
+ /** Identity is pending verification, owner approval, or both. */
387
386
  PENDING = "PENDING",
387
+ /** Identity is active and can log in. */
388
388
  ACTIVE = "ACTIVE",
389
+ /** Identity is deleted. This identity can't log in. */
389
390
  DELETED = "DELETED",
391
+ /** Identity is blocked. This identity can't log in. */
390
392
  BLOCKED = "BLOCKED",
393
+ /** Identity is offline. This identity can't log in. */
391
394
  OFFLINE = "OFFLINE"
392
395
  }
393
396
  /** @enumType */
394
397
  type StatusNameWithLiterals = StatusName | 'UNKNOWN_STATUS' | 'PENDING' | 'ACTIVE' | 'DELETED' | 'BLOCKED' | 'OFFLINE';
395
398
  declare enum Reason {
399
+ /** Unknown reason. This value isn't used. */
396
400
  UNKNOWN_REASON = "UNKNOWN_REASON",
401
+ /** The identity is waiting for admin approval. After the approval, the identity has an `ACTIVE` status. */
397
402
  PENDING_ADMIN_APPROVAL_REQUIRED = "PENDING_ADMIN_APPROVAL_REQUIRED",
403
+ /** The identity has to verify the email. After the verification, the identity has an `ACTIVE` status. */
398
404
  PENDING_EMAIL_VERIFICATION_REQUIRED = "PENDING_EMAIL_VERIFICATION_REQUIRED"
399
405
  }
400
406
  /** @enumType */