@wix/auto_sdk_identity_authentication 1.0.30 → 1.0.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/build/cjs/index.d.ts +33 -13
  2. package/build/cjs/index.js +2 -153
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/index.typings.d.ts +208 -180
  5. package/build/cjs/index.typings.js +2 -144
  6. package/build/cjs/index.typings.js.map +1 -1
  7. package/build/cjs/meta.d.ts +414 -59
  8. package/build/cjs/meta.js +120 -103
  9. package/build/cjs/meta.js.map +1 -1
  10. package/build/es/index.d.mts +33 -13
  11. package/build/es/index.mjs +1 -150
  12. package/build/es/index.mjs.map +1 -1
  13. package/build/es/index.typings.d.mts +208 -180
  14. package/build/es/index.typings.mjs +1 -141
  15. package/build/es/index.typings.mjs.map +1 -1
  16. package/build/es/meta.d.mts +414 -59
  17. package/build/es/meta.mjs +107 -101
  18. package/build/es/meta.mjs.map +1 -1
  19. package/build/internal/cjs/index.d.ts +33 -13
  20. package/build/internal/cjs/index.js +2 -153
  21. package/build/internal/cjs/index.js.map +1 -1
  22. package/build/internal/cjs/index.typings.d.ts +208 -180
  23. package/build/internal/cjs/index.typings.js +2 -144
  24. package/build/internal/cjs/index.typings.js.map +1 -1
  25. package/build/internal/cjs/meta.d.ts +414 -59
  26. package/build/internal/cjs/meta.js +120 -103
  27. package/build/internal/cjs/meta.js.map +1 -1
  28. package/build/internal/es/index.d.mts +33 -13
  29. package/build/internal/es/index.mjs +1 -150
  30. package/build/internal/es/index.mjs.map +1 -1
  31. package/build/internal/es/index.typings.d.mts +208 -180
  32. package/build/internal/es/index.typings.mjs +1 -141
  33. package/build/internal/es/index.typings.mjs.map +1 -1
  34. package/build/internal/es/meta.d.mts +414 -59
  35. package/build/internal/es/meta.mjs +107 -101
  36. package/build/internal/es/meta.mjs.map +1 -1
  37. package/package.json +3 -3
@@ -139,20 +139,6 @@ function registerV2(payload) {
139
139
  }),
140
140
  data: serializedData,
141
141
  transformResponse: (payload2) => transformPaths(payload2, [
142
- {
143
- transformFn: transformRESTBytesToSDKBytes,
144
- paths: [
145
- {
146
- path: "mfaChallengeData.verificationChallengeData.webauthnData.challenge"
147
- },
148
- {
149
- path: "mfaChallengeData.verificationChallengeData.webauthnData.allowCredentials.id"
150
- },
151
- {
152
- path: "mfaChallengeData.verificationChallengeData.webauthnData.extensions.largeBlobWrite"
153
- }
154
- ]
155
- },
156
142
  {
157
143
  transformFn: transformRESTTimestampToSDKTimestamp,
158
144
  paths: [
@@ -192,20 +178,6 @@ function loginV2(payload) {
192
178
  }),
193
179
  data: payload,
194
180
  transformResponse: (payload2) => transformPaths(payload2, [
195
- {
196
- transformFn: transformRESTBytesToSDKBytes,
197
- paths: [
198
- {
199
- path: "mfaChallengeData.verificationChallengeData.webauthnData.challenge"
200
- },
201
- {
202
- path: "mfaChallengeData.verificationChallengeData.webauthnData.allowCredentials.id"
203
- },
204
- {
205
- path: "mfaChallengeData.verificationChallengeData.webauthnData.extensions.largeBlobWrite"
206
- }
207
- ]
208
- },
209
181
  {
210
182
  transformFn: transformRESTTimestampToSDKTimestamp,
211
183
  paths: [
@@ -323,59 +295,6 @@ function logout(payload) {
323
295
  }
324
296
  return __logout;
325
297
  }
326
- function verify(payload) {
327
- function __verify({ host }) {
328
- const metadata = {
329
- entityFqdn: "wix.iam.authentication.v1.authentication",
330
- method: "POST",
331
- methodFqn: "wix.iam.authentication.v1.AuthenticationService.Verify",
332
- packageName: PACKAGE_NAME,
333
- migrationOptions: {
334
- optInTransformResponse: true
335
- },
336
- url: resolveWixIamAuthenticationV1AuthenticationServiceUrl({
337
- protoPath: "/v2/{factorType}/verify",
338
- data: payload,
339
- host
340
- }),
341
- data: payload,
342
- transformResponse: (payload2) => transformPaths(payload2, [
343
- {
344
- transformFn: transformRESTBytesToSDKBytes,
345
- paths: [
346
- {
347
- path: "mfaChallengeData.verificationChallengeData.webauthnData.challenge"
348
- },
349
- {
350
- path: "mfaChallengeData.verificationChallengeData.webauthnData.allowCredentials.id"
351
- },
352
- {
353
- path: "mfaChallengeData.verificationChallengeData.webauthnData.extensions.largeBlobWrite"
354
- }
355
- ]
356
- },
357
- {
358
- transformFn: transformRESTTimestampToSDKTimestamp,
359
- paths: [
360
- { path: "identity.createdDate" },
361
- { path: "identity.updatedDate" },
362
- { path: "identity.identityProfile.customFields.value.dateValue" },
363
- { path: "additionalData.*.dateValue" }
364
- ]
365
- },
366
- {
367
- transformFn: transformRESTFloatToSDKFloat,
368
- paths: [
369
- { path: "identity.identityProfile.customFields.value.numValue" },
370
- { path: "additionalData.*.numValue" }
371
- ]
372
- }
373
- ])
374
- };
375
- return metadata;
376
- }
377
- return __verify;
378
- }
379
298
 
380
299
  // src/iam-authentication-v1-authentication-authentication.universal.ts
381
300
  import { transformSDKAddressToRESTAddress } from "@wix/sdk-runtime/transformations/address";
@@ -467,13 +386,6 @@ var MfaReason = /* @__PURE__ */ ((MfaReason2) => {
467
386
  MfaReason2["HIGH_RISK_LOGIN"] = "HIGH_RISK_LOGIN";
468
387
  return MfaReason2;
469
388
  })(MfaReason || {});
470
- var UserVerificationRequirement = /* @__PURE__ */ ((UserVerificationRequirement2) => {
471
- UserVerificationRequirement2["USER_VERIFICATION_UNSPECIFIED"] = "USER_VERIFICATION_UNSPECIFIED";
472
- UserVerificationRequirement2["USER_VERIFICATION_REQUIRED"] = "USER_VERIFICATION_REQUIRED";
473
- UserVerificationRequirement2["USER_VERIFICATION_PREFERRED"] = "USER_VERIFICATION_PREFERRED";
474
- UserVerificationRequirement2["USER_VERIFICATION_DISCOURAGED"] = "USER_VERIFICATION_DISCOURAGED";
475
- return UserVerificationRequirement2;
476
- })(UserVerificationRequirement || {});
477
389
  var TenantType = /* @__PURE__ */ ((TenantType2) => {
478
390
  TenantType2["UNKNOWN_TENANT_TYPE"] = "UNKNOWN_TENANT_TYPE";
479
391
  TenantType2["ACCOUNT"] = "ACCOUNT";
@@ -671,56 +583,6 @@ async function logout2(options) {
671
583
  throw transformedError;
672
584
  }
673
585
  }
674
- async function verify2(factorType, options) {
675
- const { httpClient, sideEffects } = arguments[2];
676
- const payload = renameKeysFromSDKRequestToRESTRequest({
677
- factorType,
678
- stateToken: options?.stateToken,
679
- rememberThisDevice: options?.rememberThisDevice,
680
- smsData: options?.smsData,
681
- callData: options?.callData,
682
- emailData: options?.emailData,
683
- totpData: options?.totpData,
684
- pushData: options?.pushData,
685
- webauthnData: options?.webauthnData
686
- });
687
- const reqOpts = verify(payload);
688
- sideEffects?.onSiteCall?.();
689
- try {
690
- const result = await httpClient.request(reqOpts);
691
- sideEffects?.onSuccess?.(result);
692
- return renameKeysFromRESTResponseToSDKResponse(
693
- transformPaths2(result.data, [
694
- {
695
- transformFn: transformRESTAddressToSDKAddress,
696
- paths: [{ path: "identity.identityProfile.addresses.address" }]
697
- }
698
- ])
699
- );
700
- } catch (err) {
701
- const transformedError = sdkTransformError(
702
- err,
703
- {
704
- spreadPathsToArguments: {},
705
- explicitPathsToArguments: {
706
- factorType: "$[0]",
707
- stateToken: "$[1].stateToken",
708
- rememberThisDevice: "$[1].rememberThisDevice",
709
- smsData: "$[1].smsData",
710
- callData: "$[1].callData",
711
- emailData: "$[1].emailData",
712
- totpData: "$[1].totpData",
713
- pushData: "$[1].pushData",
714
- webauthnData: "$[1].webauthnData"
715
- },
716
- singleArgumentUnchanged: false
717
- },
718
- ["factorType", "options"]
719
- );
720
- sideEffects?.onError?.(err);
721
- throw transformedError;
722
- }
723
- }
724
586
  export {
725
587
  AddressTag,
726
588
  EmailTag,
@@ -734,12 +596,10 @@ export {
734
596
  Status,
735
597
  StatusName,
736
598
  TenantType,
737
- UserVerificationRequirement,
738
599
  changePassword2 as changePassword,
739
600
  loginV22 as loginV2,
740
601
  logout2 as logout,
741
602
  registerV22 as registerV2,
742
- signOn2 as signOn,
743
- verify2 as verify
603
+ signOn2 as signOn
744
604
  };
745
605
  //# sourceMappingURL=index.typings.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/iam-authentication-v1-authentication-authentication.universal.ts","../../../src/iam-authentication-v1-authentication-authentication.http.ts"],"sourcesContent":["import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixIamAuthenticationV1Authentication from './iam-authentication-v1-authentication-authentication.http.js';\nimport { transformSDKAddressToRESTAddress } from '@wix/sdk-runtime/transformations/address';\nimport { transformRESTAddressToSDKAddress } from '@wix/sdk-runtime/transformations/address';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\n\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 /** Requires a recovery code. */\n RECOVERY_CODE = 'RECOVERY_CODE',\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 | 'RECOVERY_CODE';\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 50\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 | null;\n /** CAPTCHA tokens, when CAPTCHA setting is on. */\n captchaTokens?: CaptchaToken[];\n /** Additional data that's relevant for the flow. */\n clientMetaData?: Record<string, any> | null;\n}\n\nexport interface WebAuthnVerifyData {\n /**\n * The challenge_id from the WebAuthnChallengeData that was returned in the previous\n * verification response. This will always be present when completing the WebAuthn authentication\n * ceremony with the credential data from the client.\n * @format GUID\n */\n challengeId?: string | null;\n /**\n * If this field is present, this is a request to complete the WebAuthn authentication\n * with the credential data from the client.\n *\n * The credential contains a JSON string representation of a WebAuthn PublicKeyCredential\n * object returned by the browser during authentication, serialized as per the WebAuthn specification.\n * The SPI implementation should use this to verify the authentication assertion.\n *\n * Any standards-compliant WebAuthn server library should be able to process this serialized format.\n * For details on the serialization format, refer to the W3C WebAuthn specification:\n * https://www.w3.org/TR/webauthn-3/#dom-publickeycredential-tojson\n * @maxLength 3000\n */\n credential?: string | null;\n}\n\nexport interface ExternalEmailVerifyData {\n /**\n * @minLength 1\n * @maxLength 100\n */\n code?: string | null;\n}\n\nexport interface ChangePasswordRequest {\n /** 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 TotpVerifyData {\n /**\n * @minLength 1\n * @maxLength 100\n */\n code?: string | null;\n}\n\nexport interface PushVerifyData {\n /** @maxLength 36 */\n transactionId?: string | null;\n}\n\nexport interface GetWebauthnChallengeRequest {\n /**\n * Identifier of identity for which the WebAuthn challenge is requested for.\n * If not provided an anonymous webAuthn challenge will be returned.\n */\n loginId?: LoginId;\n}\n\nexport interface GetWebauthnChallengeResponse {\n /** The challenge that will be used for a WebAuthn authentication ceremony. */\n webauthn?: WebAuthnChallengeData;\n}\n\n/** @docsIgnore */\nexport type RegisterV2ApplicationErrors =\n | {\n code?: 'UNIMPLEMENTED_FEATURE';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'THROTTLED_FEATURE';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'INVALID_CAPTCHA_TOKEN';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'CAPTCHA_TOKEN_REQUIRED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'IP_ADDRESS_FILTERED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'RECAPTCHA_FAILED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'RECAPTCHA_REQUIRED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'MISSING_CAPTCHA_TOKEN';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'USER_EMAIL_OFAC_ADDRESS';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'UNSUPPORTED_FIELD';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'ATTRIBUTE_NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'CLIENT_METADATA_NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'INVALID_LD_SESSION';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'DUPLICATE_EMAIL';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'COULD_NOT_CREATE_SET_ACCOUNT_USER';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'INVALID_USER_TYPE';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'REGISTRATION_TO_EDITORX_NOT_ALLOWED';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type RegisterV2ValidationErrors =\n | {\n ruleName?: 'PROVIDE_TENANT_ID';\n }\n | {\n ruleName?: 'INVALID_AUTHENTICATOR_ID';\n }\n | {\n ruleName?: 'VALUEֹֹ_TOO_SHORT';\n }\n | {\n ruleName?: 'VALUEֹֹ_TOO_LONG';\n }\n | {\n ruleName?: 'VALUE_DID_NOT_MATCH';\n };\n/** @docsIgnore */\nexport type LoginV2ApplicationErrors =\n | {\n code?: 'THROTTLED_FEATURE';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'INVALID_CAPTCHA_TOKEN';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'CAPTCHA_TOKEN_REQUIRED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'REENROLLMENT_REQUIRED_BY_ADMIN';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'TRUSTED_CLIENTS_ONLY';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type LoginV2ValidationErrors =\n | {\n ruleName?: 'PROVIDE_TENANT_ID';\n }\n | {\n ruleName?: 'INVALID_AUTHENTICATOR_ID';\n };\n\n/**\n * Registers a new member.\n *\n * Typically, after a successful registration, you generate and use member tokens for the\n * registered member so that subsequent API calls are called as part of a member session.\n * Use the `sessionToken` in the response to [get the site member's access and refresh tokens](https://dev.wix.com/docs/go-headless/coding/rest-api/visitors-and-members/handle-members-with-custom-login#get-the-site-members-access-and-refresh-tokens).\n *\n * If the email used to register the member already exists as a contact email, the registering\n * member need to verify the email address using a code that is sent to the address.\n * @param loginId - Identifier of the registering member.\n * @public\n * @requiredField loginId\n * @fqn wix.iam.authentication.v1.AuthenticationService.RegisterV2\n */\nexport async function registerV2(\n loginId: LoginId,\n options?: RegisterV2Options\n): Promise<\n NonNullablePaths<\n StateMachineResponse,\n | `state`\n | `identity.connections`\n | `identity.connections.${number}.idpConnection.idpConnectionId`\n | `identity.connections.${number}.idpConnection.idpUserId`\n | `identity.connections.${number}.authenticatorConnection.authenticatorConnectionId`\n | `identity.connections.${number}.authenticatorConnection.reEnrollmentRequired`\n | `identity.identityProfile.emails`\n | `identity.identityProfile.phones`\n | `identity.identityProfile.labels`\n | `identity.identityProfile.privacyStatus`\n | `identity.identityProfile.customFields`\n | `identity.identityProfile.customFields.${number}.name`\n | `identity.identityProfile.customFields.${number}.value.strValue`\n | `identity.identityProfile.customFields.${number}.value.numValue`\n | `identity.identityProfile.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 7\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 7\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 | null;\n /** CAPTCHA tokens, when CAPTCHA setting is on. */\n captchaTokens?: CaptchaToken[];\n /** Additional data that's relevant for the flow. */\n clientMetaData?: Record<string, any> | null;\n}\n\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 7\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 4\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 7\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 srcPath: '/iam/authentication/v2/change-password',\n destPath: '/v2/change-password',\n },\n {\n srcPath: '/iam/authentication/v2/verify',\n destPath: '/v2/verify',\n },\n {\n srcPath: '/iam/authentication/v2/login',\n destPath: '/v2/login',\n },\n {\n srcPath: '/iam/authentication/v2/register',\n destPath: '/v2/register',\n },\n {\n srcPath: '/iam/authentication/v2',\n destPath: '/v2',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_identity_authentication';\n\n/**\n * Registers a new member.\n *\n * Typically, after a successful registration, you generate and use member tokens for the\n * registered member so that subsequent API calls are called as part of a member session.\n * Use the `sessionToken` in the response to [get the site member's access and refresh tokens](https://dev.wix.com/docs/go-headless/coding/rest-api/visitors-and-members/handle-members-with-custom-login#get-the-site-members-access-and-refresh-tokens).\n *\n * If the email used to register the member already exists as a contact email, the registering\n * member need to verify the email address using a code that is sent to the address.\n */\nexport function registerV2(payload: object): RequestOptionsFactory<any> {\n function __registerV2({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [{ 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 migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixIamAuthenticationV1AuthenticationServiceUrl({\n protoPath: '/v2/register',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: 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 migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixIamAuthenticationV1AuthenticationServiceUrl({\n protoPath: '/v2/login',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: 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 migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixIamAuthenticationV1AuthenticationServiceUrl({\n protoPath: '/v2/change-password',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __changePassword;\n}\n\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 migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixIamAuthenticationV1AuthenticationServiceUrl({\n protoPath: '/v2/sign-on',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\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 migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixIamAuthenticationV1AuthenticationServiceUrl({\n protoPath: '/v1/logout',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTBytesToSDKBytes,\n paths: [{ 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 migrationOptions: {\n optInTransformResponse: true,\n },\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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IACH;AAAA,EACF,SAAS,KAAU;AACjB,UAAM,mBAAmB;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":["payload","transformPaths","PrivacyStatus","EmailTag","PhoneTag","AddressTag","StateType","StatusName","Reason","FactorType","Status","FactorStatus","MfaReason","UserVerificationRequirement","TenantType","registerV2","loginV2","changePassword","signOn","logout","verify"]}
1
+ {"version":3,"sources":["../../../src/iam-authentication-v1-authentication-authentication.universal.ts","../../../src/iam-authentication-v1-authentication-authentication.http.ts"],"sourcesContent":["import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixIamAuthenticationV1Authentication from './iam-authentication-v1-authentication-authentication.http.js';\nimport { transformSDKAddressToRESTAddress } from '@wix/sdk-runtime/transformations/address';\nimport { transformRESTAddressToSDKAddress } from '@wix/sdk-runtime/transformations/address';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\n\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 /** Member's first name. */\n firstName?: string | null;\n /** Member's last name. */\n lastName?: string | null;\n /** Member's display nickname. */\n nickname?: string | null;\n /** URL to member's profile picture. */\n picture?: string | null;\n /**\n * Deprecated. Use `secondaryEmails` instead.\n * @deprecated Deprecated. Use `secondaryEmails` instead.\n * @replacedBy secondary_emails\n * @targetRemovalDate 2023-11-01\n */\n emails?: string[];\n /**\n * Deprecated. Use `phonesV2` instead.\n * @deprecated Deprecated. Use `phonesV2` instead.\n * @replacedBy phones_v2\n * @targetRemovalDate 2023-11-01\n */\n phones?: string[];\n /**\n * Labels associated with the member.\n * @maxSize 2000\n */\n labels?: string[];\n /**\n * Member's preferred language code.\n * @format LANGUAGE\n */\n language?: string | null;\n /** Member's profile visibility setting. */\n privacyStatus?: PrivacyStatusWithLiterals;\n /**\n * Any number of custom fields. [Custom fields](https://support.wix.com/en/article/adding-custom-fields-to-contacts)\n * are used to store additional information about your site or app's contacts.\n */\n customFields?: CustomField[];\n /** Additional email addresses for the member. */\n secondaryEmails?: SecondaryEmail[];\n /** Phone numbers associated with the member. */\n phonesV2?: Phone[];\n /** Physical addresses for the member. */\n addresses?: AddressWrapper[];\n /**\n * Company name.\n * @maxLength 1000\n */\n company?: string | null;\n /**\n * Position within company.\n * @maxLength 1000\n */\n position?: string | null;\n /**\n * Member's birth date in `YYYY-MM-DD` format.\n * @format LOCAL_DATE\n */\n birthdate?: string | null;\n /**\n * URL-friendly slug for the member's profile.\n * @maxLength 255\n */\n slug?: string | null;\n /** Whether the member consents to receive marketing communications. */\n subscription?: boolean | null;\n /**\n * Tax ID or VAT number for personal or corporate use.\n * @maxLength 1000\n */\n vatId?: string | null;\n}\n\nexport enum PrivacyStatus {\n /** No privacy status defined. */\n UNDEFINED = 'UNDEFINED',\n /** Profile details are visible to other members. */\n PUBLIC = 'PUBLIC',\n /** Profile details are hidden from other members. */\n PRIVATE = 'PRIVATE',\n}\n\n/** @enumType */\nexport type PrivacyStatusWithLiterals =\n | PrivacyStatus\n | 'UNDEFINED'\n | 'PUBLIC'\n | 'PRIVATE';\n\nexport interface CustomField {\n /**\n * Custom field name matching an extended field key (without `custom.` prefix).\n *\n * Must match a key from [`List Extended Fields`](https://dev.wix.com/docs/rest/api-reference/contacts/extended-fields/list-extended-fields).\n */\n name?: string;\n /** Value for the custom field. */\n value?: V1CustomValue;\n}\n\nexport interface V1CustomValue extends V1CustomValueValueOneOf {\n /** Text value. */\n strValue?: string;\n /** Numeric value. */\n numValue?: number;\n /** Date/time value. */\n dateValue?: Date | null;\n /** List of values. */\n listValue?: V1ListValue;\n /** Key-value pairs. */\n mapValue?: V1MapValue;\n}\n\n/** @oneof */\nexport interface V1CustomValueValueOneOf {\n /** Text value. */\n strValue?: string;\n /** Numeric value. */\n numValue?: number;\n /** Date/time value. */\n dateValue?: Date | null;\n /** List of values. */\n listValue?: V1ListValue;\n /** Key-value pairs. */\n mapValue?: V1MapValue;\n}\n\nexport interface V1ListValue {\n /** List of custom values. */\n value?: V1CustomValue[];\n}\n\nexport interface V1MapValue {\n /** Map of custom field values. */\n value?: Record<string, V1CustomValue>;\n}\n\nexport interface SecondaryEmail {\n /**\n * Secondary email address.\n * @format EMAIL\n */\n email?: string;\n /** Email tag. */\n tag?: EmailTagWithLiterals;\n}\n\nexport enum EmailTag {\n UNTAGGED = 'UNTAGGED',\n MAIN = 'MAIN',\n HOME = 'HOME',\n WORK = 'WORK',\n}\n\n/** @enumType */\nexport type EmailTagWithLiterals =\n | EmailTag\n | 'UNTAGGED'\n | 'MAIN'\n | 'HOME'\n | 'WORK';\n\nexport interface Phone {\n /**\n * Country code for the phone number.\n * @format COUNTRY\n */\n countryCode?: string | null;\n /**\n * Phone number without country code.\n * @format PHONE\n */\n phone?: string;\n /** Phone tag. */\n tag?: PhoneTagWithLiterals;\n}\n\nexport enum PhoneTag {\n UNTAGGED = 'UNTAGGED',\n MAIN = 'MAIN',\n HOME = 'HOME',\n MOBILE = 'MOBILE',\n WORK = 'WORK',\n FAX = 'FAX',\n}\n\n/** @enumType */\nexport type PhoneTagWithLiterals =\n | PhoneTag\n | 'UNTAGGED'\n | 'MAIN'\n | 'HOME'\n | 'MOBILE'\n | 'WORK'\n | 'FAX';\n\nexport interface AddressWrapper {\n /** Physical address details. */\n address?: Address;\n /** Address tag. */\n tag?: AddressTagWithLiterals;\n}\n\n/** Physical address */\nexport interface Address {\n /**\n * Country code.\n * @format COUNTRY\n */\n country?: string | null;\n /** Subdivision. Usually a state, region, prefecture, or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2). */\n subdivision?: string | null;\n /** City name. */\n city?: string | null;\n /** Zip/postal code. */\n postalCode?: string | null;\n /** Main address line, usually street and number as free text. */\n addressLine1?: string | null;\n /** Free text providing more detailed address info. Usually contains apartment, suite, and floor. */\n addressLine2?: string | null;\n}\n\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 /** Member needs the owner to approve their registration. */\n REQUIRE_OWNER_APPROVAL = 'REQUIRE_OWNER_APPROVAL',\n /** Member needs to verify their email. */\n REQUIRE_EMAIL_VERIFICATION = 'REQUIRE_EMAIL_VERIFICATION',\n /** The `status` is not one that prevents the member logging in, meaning it's not `OFFLINE`, `BLOCKED`, or `DELETED`. */\n STATUS_CHECK = 'STATUS_CHECK',\n}\n\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 /**\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 /** Requires a recovery code. */\n RECOVERY_CODE = 'RECOVERY_CODE',\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 | 'RECOVERY_CODE';\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 * A PublicKeyCredentialRequestOptions JSON as defined in the WebAuthn spec (https://www.w3.org/TR/webauthn-3/#dictdef-publickeycredentialrequestoptions).\n * @maxLength 40000\n */\n publicKeyCredentialRequestOptionsJson?: string;\n}\n\nexport interface LoginV2Request {\n /** Identifier of identity logging in. */\n loginId: LoginId;\n /** Password of the identity logging in. */\n password?: string | null;\n /** CAPTCHA tokens, when CAPTCHA setting is on. */\n captchaTokens?: CaptchaToken[];\n /** Additional data that's relevant for the flow. */\n clientMetaData?: Record<string, any> | null;\n}\n\nexport interface WebAuthnVerifyData {\n /**\n * The challenge_id from the WebAuthnChallengeData that was returned in the previous\n * verification response. This will always be present when completing the WebAuthn authentication\n * ceremony with the credential data from the client.\n * @format GUID\n */\n challengeId?: string | null;\n /**\n * If this field is present, this is a request to complete the WebAuthn authentication\n * with the credential data from the client.\n *\n * The credential contains a JSON string representation of a WebAuthn PublicKeyCredential\n * object returned by the browser during authentication, serialized as per the WebAuthn specification.\n * The SPI implementation should use this to verify the authentication assertion.\n *\n * Any standards-compliant WebAuthn server library should be able to process this serialized format.\n * For details on the serialization format, refer to the W3C WebAuthn specification:\n * https://www.w3.org/TR/webauthn-3/#dom-publickeycredential-tojson\n * @maxLength 3000\n */\n credential?: string | null;\n}\n\nexport interface ExternalEmailVerifyData {\n /**\n * @minLength 1\n * @maxLength 100\n */\n code?: string | null;\n}\n\nexport interface ChangePasswordRequest {\n /**\n * New password to set for the logged-in member.\n *\n * The password must meet the site's configured password requirements for length and complexity.\n */\n newPassword: string;\n}\n\nexport interface ChangePasswordResponse {}\n\nexport interface LoginWithIdpConnectionRequest {\n /**\n * The id of the connection id (can be fetched by calling connection-service.listEnabledConnectionsClientData\n * @format GUID\n */\n idpConnectionId?: string;\n /**\n * The id of the tenant the caller wants to login into\n * @format GUID\n */\n tenantId?: string;\n /** The type of the tenant the caller wants to login into */\n tenantType?: TenantTypeWithLiterals;\n customPayload?: Record<string, string>;\n /**\n * This flow ultimately returns an HTML page that asynchronously posts the LoginResponse via the BroadcastChannel API.\n * The message will be posted to a channel named `wix-idp-$session_id`, and encrypted with the `encryption_key`.\n * Encryption key should be base64 encoded. Encryption is done using AES-GCM with a random IV that's sent alongside the payload\n */\n sessionId?: string;\n /**\n * Base64-encoded encryption key for securing the authentication response.\n *\n * Used to encrypt the authentication response sent via BroadcastChannel API.\n * Encryption uses AES-GCM with a random IV.\n */\n encryptionKey?: string;\n /**\n * Visitor ID for tracking purposes.\n *\n * Optional identifier for analytics and tracking the authentication flow.\n */\n visitorId?: string | null;\n /**\n * Browser session identifier.\n *\n * Optional identifier for correlating the authentication request with browser session data.\n */\n bsi?: string | null;\n}\n\nexport 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 /**\n * Member identifier for authentication.\n *\n * Currently only email addresses are supported.\n */\n loginId: LoginId;\n /**\n * Member profile information.\n *\n * Profile data such as first name, last name, and other member details.\n * If the member already exists, provided profile information will update the existing member's profile.\n * If the member doesn't exist, this profile information is used to create the new member.\n */\n profile?: IdentityProfile;\n /**\n * Whether to mark the member's email as verified without requiring verification.\n *\n * When `true`, marks the email as verified without requiring verification.\n * Use with caution in production as this bypasses security verification.\n *\n * Default: `false`\n */\n verifyEmail?: boolean;\n /**\n * Whether to merge with an existing contact with the same email address.\n *\n * When `true`, links the member to an existing contact record with the same email\n * and inherits contact data. When `false`, creates a new contact record.\n *\n * Default: `true`\n */\n mergeExistingContact?: boolean;\n}\n\nexport interface SignOnResponse {\n /**\n * Session token for the authenticated member.\n *\n * Use this token to obtain access and refresh tokens for subsequent API calls.\n */\n sessionToken?: string;\n /**\n * Member identity information.\n *\n * Contains the member's identity details after successful authentication.\n */\n identity?: Identity;\n}\n\n/** logout request payload */\nexport interface LogoutRequest {\n /**\n * URL to redirect to after logout.\n *\n * Optional redirect destination after the logout process completes.\n * @format WEB_URL\n */\n postLogoutRedirectUri?: string | null;\n /**\n * Client identifier for the logout request.\n *\n * Identifies the application or client initiating the logout.\n * @format GUID\n */\n clientId?: string | null;\n}\n\nexport interface VerifyRequest extends VerifyRequestFactorDataOneOf {\n /** SMS verification code sent to the member's phone number. */\n smsData?: SmsVerifyData;\n /** Voice call verification code received by the member. */\n callData?: CallVerifyData;\n /** Email verification code sent to the member's email address. */\n emailData?: ExternalEmailVerifyData;\n /** TOTP code from the member's authenticator app. */\n totpData?: TotpVerifyData;\n /** Push notification authentication response from the member's device. */\n pushData?: PushVerifyData;\n /** WebAuthn response from biometric or security key authentication. */\n webauthnData?: WebAuthnVerifyData;\n /** RecoveryCode response from a one-time code. */\n recoveryCodeData?: RecoveryCodeVerifyData;\n /**\n * State token from the initial authentication response.\n *\n * Required to continue the multi-step authentication process.\n * @maxLength 1000\n */\n stateToken?: string;\n /**\n * Type of authentication factor being verified.\n *\n * Specifies which verification method is being used (SMS, email, TOTP, etc.).\n */\n factorType?: FactorTypeWithLiterals;\n /**\n * Whether to remember this device for future authentication.\n *\n * When `true`, reduces future authentication requirements for this device.\n * Only applicable for second factor authentication.\n */\n rememberThisDevice?: boolean;\n}\n\n/** @oneof */\nexport interface VerifyRequestFactorDataOneOf {\n /** SMS verification code sent to the member's phone number. */\n smsData?: SmsVerifyData;\n /** Voice call verification code received by the member. */\n callData?: CallVerifyData;\n /** Email verification code sent to the member's email address. */\n emailData?: ExternalEmailVerifyData;\n /** TOTP code from the member's authenticator app. */\n totpData?: TotpVerifyData;\n /** Push notification authentication response from the member's device. */\n pushData?: PushVerifyData;\n /** WebAuthn response from biometric or security key authentication. */\n webauthnData?: WebAuthnVerifyData;\n /** RecoveryCode response from a one-time code. */\n recoveryCodeData?: RecoveryCodeVerifyData;\n}\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 TotpVerifyData {\n /**\n * @minLength 1\n * @maxLength 100\n */\n code?: string | null;\n}\n\nexport interface PushVerifyData {\n /** @maxLength 36 */\n transactionId?: string | null;\n}\n\nexport interface RecoveryCodeVerifyData {\n /**\n * @minLength 1\n * @maxLength 100\n */\n code?: string | null;\n}\n\nexport interface GetWebauthnChallengeRequest {\n /**\n * Identifier of the member requesting the WebAuthn challenge.\n *\n * If not provided, returns an anonymous WebAuthn challenge for usernameless authentication.\n */\n loginId?: LoginId;\n}\n\nexport interface GetWebauthnChallengeResponse {\n /** The challenge that will be used for a WebAuthn authentication ceremony. */\n webauthn?: WebAuthnChallengeData;\n}\n\n/** @docsIgnore */\nexport type RegisterV2ApplicationErrors =\n | {\n code?: 'UNIMPLEMENTED_FEATURE';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'THROTTLED_FEATURE';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'INVALID_CAPTCHA_TOKEN';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'CAPTCHA_TOKEN_REQUIRED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'IP_ADDRESS_FILTERED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'RECAPTCHA_FAILED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'RECAPTCHA_REQUIRED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'MISSING_CAPTCHA_TOKEN';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'USER_EMAIL_OFAC_ADDRESS';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'UNSUPPORTED_FIELD';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'ATTRIBUTE_NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'CLIENT_METADATA_NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'INVALID_LD_SESSION';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'DUPLICATE_EMAIL';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'COULD_NOT_CREATE_SET_ACCOUNT_USER';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'INVALID_USER_TYPE';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'REGISTRATION_TO_EDITORX_NOT_ALLOWED';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type RegisterV2ValidationErrors =\n | {\n ruleName?: 'PROVIDE_TENANT_ID';\n }\n | {\n ruleName?: 'INVALID_AUTHENTICATOR_ID';\n }\n | {\n ruleName?: 'VALUEֹֹ_TOO_SHORT';\n }\n | {\n ruleName?: 'VALUEֹֹ_TOO_LONG';\n }\n | {\n ruleName?: 'VALUE_DID_NOT_MATCH';\n };\n/** @docsIgnore */\nexport type LoginV2ApplicationErrors =\n | {\n code?: 'THROTTLED_FEATURE';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'INVALID_CAPTCHA_TOKEN';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'CAPTCHA_TOKEN_REQUIRED';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'REENROLLMENT_REQUIRED_BY_ADMIN';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'TRUSTED_CLIENTS_ONLY';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type LoginV2ValidationErrors =\n | {\n ruleName?: 'PROVIDE_TENANT_ID';\n }\n | {\n ruleName?: 'INVALID_AUTHENTICATOR_ID';\n };\n\n/**\n * Registers a new member.\n *\n * Typically, after a successful registration, you generate and use member tokens for the\n * registered member so that subsequent API calls are called as part of a member session.\n * Use the `sessionToken` in the response to [get the site member's access and refresh tokens](https://dev.wix.com/docs/go-headless/coding/rest-api/visitors-and-members/handle-members-with-custom-login#get-the-site-members-access-and-refresh-tokens).\n *\n * If the email used to register the member already exists as a contact email, the registering\n * member need to verify the email address using a code that is sent to the address.\n * @param loginId - Identifier of the registering member.\n * @public\n * @requiredField loginId\n * @fqn wix.iam.authentication.v1.AuthenticationService.RegisterV2\n */\nexport async function registerV2(\n loginId: LoginId,\n options?: RegisterV2Options\n): Promise<\n NonNullablePaths<\n StateMachineResponse,\n | `state`\n | `identity.connections`\n | `identity.connections.${number}.idpConnection.idpConnectionId`\n | `identity.connections.${number}.idpConnection.idpUserId`\n | `identity.connections.${number}.authenticatorConnection.authenticatorConnectionId`\n | `identity.connections.${number}.authenticatorConnection.reEnrollmentRequired`\n | `identity.identityProfile.emails`\n | `identity.identityProfile.phones`\n | `identity.identityProfile.labels`\n | `identity.identityProfile.privacyStatus`\n | `identity.identityProfile.customFields`\n | `identity.identityProfile.customFields.${number}.name`\n | `identity.identityProfile.customFields.${number}.value.strValue`\n | `identity.identityProfile.customFields.${number}.value.numValue`\n | `identity.identityProfile.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 7\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 7\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 | null;\n /** CAPTCHA tokens, when CAPTCHA setting is on. */\n captchaTokens?: CaptchaToken[];\n /** Additional data that's relevant for the flow. */\n clientMetaData?: Record<string, any> | null;\n}\n\n/**\n * Changes the password of a logged-in member.\n *\n * Updates the password for an authenticated member. The member must have a valid session\n * to use this method.\n *\n * The member's session remains valid after password change.\n *\n * The new password must meet the site's configured password requirements for length\n * and complexity. These requirements are enforced automatically when processing the request.\n * @param newPassword - New password to set for the logged-in member.\n *\n * The password must meet the site's configured password requirements for length and complexity.\n * @public\n * @documentationMaturity preview\n * @requiredField newPassword\n * @permissionId IAM.CHANGE_PASSWORD\n * @fqn wix.iam.authentication.v1.AuthenticationService.ChangePassword\n */\nexport async function changePassword(newPassword: string): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n newPassword: newPassword,\n });\n\n const reqOpts =\n ambassadorWixIamAuthenticationV1Authentication.changePassword(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { newPassword: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['newPassword']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Authenticates a member without credentials and returns a session token.\n *\n * This method provides authentication that automatically creates or updates\n * member accounts as needed during the authentication process.\n * Use this for trusted integrations and scenarios where you already have verified user information.\n * @param loginId - Member identifier for authentication.\n *\n * Currently only email addresses are supported.\n * @public\n * @documentationMaturity preview\n * @requiredField loginId\n * @permissionId IAM.AUTHENTICAITON_SIGN_ON\n * @applicableIdentity APP\n * @fqn wix.iam.authentication.v1.AuthenticationService.SignOn\n */\nexport async function signOn(\n loginId: LoginId,\n options?: SignOnOptions\n): Promise<\n NonNullablePaths<\n SignOnResponse,\n | `sessionToken`\n | `identity.connections`\n | `identity.connections.${number}.idpConnection.idpConnectionId`\n | `identity.connections.${number}.idpConnection.idpUserId`\n | `identity.connections.${number}.authenticatorConnection.authenticatorConnectionId`\n | `identity.connections.${number}.authenticatorConnection.reEnrollmentRequired`\n | `identity.identityProfile.emails`\n | `identity.identityProfile.phones`\n | `identity.identityProfile.labels`\n | `identity.identityProfile.privacyStatus`\n | `identity.identityProfile.customFields`\n | `identity.identityProfile.customFields.${number}.name`\n | `identity.identityProfile.customFields.${number}.value.strValue`\n | `identity.identityProfile.customFields.${number}.value.numValue`\n | `identity.identityProfile.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 7\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 /**\n * Member profile information.\n *\n * Profile data such as first name, last name, and other member details.\n * If the member already exists, provided profile information will update the existing member's profile.\n * If the member doesn't exist, this profile information is used to create the new member.\n */\n profile?: IdentityProfile;\n /**\n * Whether to mark the member's email as verified without requiring verification.\n *\n * When `true`, marks the email as verified without requiring verification.\n * Use with caution in production as this bypasses security verification.\n *\n * Default: `false`\n */\n verifyEmail?: boolean;\n /**\n * Whether to merge with an existing contact with the same email address.\n *\n * When `true`, links the member to an existing contact record with the same email\n * and inherits contact data. When `false`, creates a new contact record.\n *\n * Default: `true`\n */\n mergeExistingContact?: boolean;\n}\n\n/**\n * Terminates the member's session and clears authentication cookies.\n *\n * Returns the following:\n * - `body`: HTML content for the logout response\n * - `statusCode`: HTTP status code (200 for success, 302 for redirect)\n * - `headers`: Array of key-value pairs including:\n * - `Set-Cookie` headers to remove all session cookies\n * - `Location` header (when `postLogoutRedirectUri` is provided, with 302 status)\n * @public\n * @documentationMaturity preview\n * @fqn wix.iam.authentication.v1.AuthenticationService.Logout\n */\nexport async function logout(\n options?: LogoutOptions\n): Promise<\n NonNullablePaths<\n RawHttpResponse,\n `body` | `headers` | `headers.${number}.key` | `headers.${number}.value`,\n 4\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n postLogoutRedirectUri: options?.postLogoutRedirectUri,\n clientId: options?.clientId,\n });\n\n const reqOpts =\n ambassadorWixIamAuthenticationV1Authentication.logout(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n postLogoutRedirectUri: '$[0].postLogoutRedirectUri',\n clientId: '$[0].clientId',\n },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface LogoutOptions {\n /**\n * URL to redirect to after logout.\n *\n * Optional redirect destination after the logout process completes.\n * @format WEB_URL\n */\n postLogoutRedirectUri?: string | null;\n /**\n * Client identifier for the logout request.\n *\n * Identifies the application or client initiating the logout.\n * @format GUID\n */\n clientId?: string | null;\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKFloatToRESTFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformRESTBytesToSDKBytes } from '@wix/sdk-runtime/transformations/bytes';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\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 srcPath: '/iam/authentication/v2/change-password',\n destPath: '/v2/change-password',\n },\n {\n srcPath: '/iam/authentication/v2/verify',\n destPath: '/v2/verify',\n },\n {\n srcPath: '/iam/authentication/v2/login',\n destPath: '/v2/login',\n },\n {\n srcPath: '/iam/authentication/v2/register',\n destPath: '/v2/register',\n },\n {\n srcPath: '/iam/authentication/v2',\n destPath: '/v2',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_identity_authentication';\n\n/**\n * Registers a new member.\n *\n * Typically, after a successful registration, you generate and use member tokens for the\n * registered member so that subsequent API calls are called as part of a member session.\n * Use the `sessionToken` in the response to [get the site member's access and refresh tokens](https://dev.wix.com/docs/go-headless/coding/rest-api/visitors-and-members/handle-members-with-custom-login#get-the-site-members-access-and-refresh-tokens).\n *\n * If the email used to register the member already exists as a contact email, the registering\n * member need to verify the email address using a code that is sent to the address.\n */\nexport function registerV2(payload: object): RequestOptionsFactory<any> {\n function __registerV2({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [{ 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 migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixIamAuthenticationV1AuthenticationServiceUrl({\n protoPath: '/v2/register',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\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 migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixIamAuthenticationV1AuthenticationServiceUrl({\n protoPath: '/v2/login',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\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/**\n * Changes the password of a logged-in member.\n *\n * Updates the password for an authenticated member. The member must have a valid session\n * to use this method.\n *\n * The member's session remains valid after password change.\n *\n * The new password must meet the site's configured password requirements for length\n * and complexity. These requirements are enforced automatically when processing the request.\n */\nexport function changePassword(payload: object): RequestOptionsFactory<any> {\n function __changePassword({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.iam.authentication.v1.authentication',\n method: 'POST' as any,\n methodFqn:\n 'wix.iam.authentication.v1.AuthenticationService.ChangePassword',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixIamAuthenticationV1AuthenticationServiceUrl({\n protoPath: '/v2/change-password',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __changePassword;\n}\n\n/**\n * Authenticates a member without credentials and returns a session token.\n *\n * This method provides authentication that automatically creates or updates\n * member accounts as needed during the authentication process.\n * Use this for trusted integrations and scenarios where you already have verified user information.\n */\nexport function signOn(payload: object): RequestOptionsFactory<any> {\n function __signOn({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [{ 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 migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixIamAuthenticationV1AuthenticationServiceUrl({\n protoPath: '/v2/sign-on',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\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/**\n * Terminates the member's session and clears authentication cookies.\n *\n * Returns the following:\n * - `body`: HTML content for the logout response\n * - `statusCode`: HTTP status code (200 for success, 302 for redirect)\n * - `headers`: Array of key-value pairs including:\n * - `Set-Cookie` headers to remove all session cookies\n * - `Location` header (when `postLogoutRedirectUri` is provided, with 302 status)\n */\nexport function logout(payload: object): RequestOptionsFactory<any> {\n function __logout({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.iam.authentication.v1.authentication',\n method: 'GET' as any,\n methodFqn: 'wix.iam.authentication.v1.AuthenticationService.Logout',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixIamAuthenticationV1AuthenticationServiceUrl({\n protoPath: '/v1/logout',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTBytesToSDKBytes,\n paths: [{ path: 'body' }],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __logout;\n}\n"],"mappings":";AAAA,SAAS,kBAAkB,yBAAyB;AACpD;AAAA,EACE;AAAA,EACA;AAAA,OACK;;;ACJP,SAAS,yBAAyB;AAClC,SAAS,oCAAoC;AAC7C,SAAS,oCAAoC;AAC7C,SAAS,oCAAoC;AAC7C,SAAS,4CAA4C;AACrD,SAAS,4CAA4C;AACrD,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAI3B,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;AAAA,MACZ;AAAA,IACF;AAAA,IACA,YAAY;AAAA,MACV;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,cAAc;AAAA,MACZ;AAAA,QACE,SAAS;AAAA,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A,IACvB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;AA4CA,eAAsBiB,QACpB,SAOA;AAEA,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,UAAU,sCAAsC;AAAA,IACpD,uBAAuB,SAAS;AAAA,IAChC,UAAU,SAAS;AAAA,EACrB,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,WAAO,wCAAwC,OAAO,IAAI;AAAA,EAC5D,SAAS,KAAU;AACjB,UAAM,mBAAmB;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B;AAAA,UACxB,uBAAuB;AAAA,UACvB,UAAU;AAAA,QACZ;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,SAAS;AAAA,IACZ;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["payload","transformPaths","PrivacyStatus","EmailTag","PhoneTag","AddressTag","StateType","StatusName","Reason","FactorType","Status","FactorStatus","MfaReason","TenantType","registerV2","loginV2","changePassword","signOn","logout"]}