@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
@@ -1,6 +1,6 @@
1
1
  import { HttpClient, NonNullablePaths, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
2
- import { LoginId, RegisterV2Options, StateMachineResponse, RegisterV2ApplicationErrors, RegisterV2ValidationErrors, LoginV2Options, LoginV2ApplicationErrors, LoginV2ValidationErrors, SignOnOptions, SignOnResponse, LogoutOptions, RawHttpResponse, FactorTypeWithLiterals, VerifyOptions } from './index.typings.js';
3
- export { Address, AddressTag, AddressTagWithLiterals, AddressWrapper, Authentication, AuthenticationExtensionInputs, AuthenticationExtensionInputsLargeBlobOperationOneOf, AuthenticatorConnection, CallVerifyData, CaptchaToken, CaptchaTokenTokenOneOf, ChangePasswordRequest, ChangePasswordResponse, Connection, ConnectionTypeOneOf, CustomField, CustomValue, CustomValueValueOneOf, Email, EmailTag, EmailTagWithLiterals, ExternalEmailVerifyData, Factor, FactorStatus, FactorStatusWithLiterals, FactorType, GetWebauthnChallengeRequest, GetWebauthnChallengeResponse, HeadersEntry, Identity, IdentityProfile, IdpConnection, ListValue, LoginCallbackRequest, LoginIdTypeOneOf, LoginV2Request, LoginWithIdpConnectionRequest, LoginWithIdpConnectionTokenParamsRequest, LogoutRequest, MapValue, Metadata, MfaChallengeData, MfaReason, MfaReasonWithLiterals, PathParametersEntry, Phone, PhoneTag, PhoneTagWithLiterals, PrivacyStatus, PrivacyStatusWithLiterals, PublicKeyCredentialDescriptor, PushChallengeData, PushVerifyData, QueryParametersEntry, RawHttpRequest, Reason, ReasonWithLiterals, RegisterV2Request, RequireMfaData, SecondaryEmail, SignOnRequest, SmsVerifyData, StateMachineResponseStateDataOneOf, StateType, StateTypeWithLiterals, Status, StatusName, StatusNameWithLiterals, StatusV2, StatusWithLiterals, TenantType, TenantTypeWithLiterals, TotpVerifyData, UserVerificationRequirement, UserVerificationRequirementWithLiterals, V1CustomValue, V1CustomValueValueOneOf, V1Factor, V1ListValue, V1MapValue, VerificationChallenge, VerificationChallengeFactorChallengeDataOneOf, VerifyOptionsFactorDataOneOf, VerifyRequest, VerifyRequestFactorDataOneOf, WebAuthnChallengeData, WebAuthnVerifyData } from './index.typings.js';
2
+ import { LoginId, RegisterV2Options, StateMachineResponse, RegisterV2ApplicationErrors, RegisterV2ValidationErrors, LoginV2Options, LoginV2ApplicationErrors, LoginV2ValidationErrors, SignOnOptions, SignOnResponse, LogoutOptions, RawHttpResponse } from './index.typings.js';
3
+ export { Address, AddressTag, AddressTagWithLiterals, AddressWrapper, Authentication, AuthenticatorConnection, CallVerifyData, CaptchaToken, CaptchaTokenTokenOneOf, ChangePasswordRequest, ChangePasswordResponse, Connection, ConnectionTypeOneOf, CustomField, CustomValue, CustomValueValueOneOf, Email, EmailTag, EmailTagWithLiterals, ExternalEmailVerifyData, Factor, FactorStatus, FactorStatusWithLiterals, FactorType, FactorTypeWithLiterals, GetWebauthnChallengeRequest, GetWebauthnChallengeResponse, HeadersEntry, Identity, IdentityProfile, IdpConnection, ListValue, LoginCallbackRequest, LoginIdTypeOneOf, LoginV2Request, LoginWithIdpConnectionRequest, LoginWithIdpConnectionTokenParamsRequest, LogoutRequest, MapValue, Metadata, MfaChallengeData, MfaReason, MfaReasonWithLiterals, PathParametersEntry, Phone, PhoneTag, PhoneTagWithLiterals, PrivacyStatus, PrivacyStatusWithLiterals, PushChallengeData, PushVerifyData, QueryParametersEntry, RawHttpRequest, Reason, ReasonWithLiterals, RecoveryCodeVerifyData, RegisterV2Request, RequireMfaData, SecondaryEmail, SignOnRequest, SmsVerifyData, StateMachineResponseStateDataOneOf, StateType, StateTypeWithLiterals, Status, StatusName, StatusNameWithLiterals, StatusV2, StatusWithLiterals, TenantType, TenantTypeWithLiterals, TotpVerifyData, V1CustomValue, V1CustomValueValueOneOf, V1Factor, V1ListValue, V1MapValue, VerificationChallenge, VerificationChallengeFactorChallengeDataOneOf, VerifyRequest, VerifyRequestFactorDataOneOf, WebAuthnChallengeData, WebAuthnVerifyData } from './index.typings.js';
4
4
 
5
5
  declare function registerV2$1(httpClient: HttpClient): RegisterV2Signature;
6
6
  interface RegisterV2Signature {
@@ -38,34 +38,54 @@ interface LoginV2Signature {
38
38
  declare function changePassword$1(httpClient: HttpClient): ChangePasswordSignature;
39
39
  interface ChangePasswordSignature {
40
40
  /**
41
- * Changes the password of a logged in user.
42
- * @param - The new password to set for the logged in user
41
+ * Changes the password of a logged-in member.
42
+ *
43
+ * Updates the password for an authenticated member. The member must have a valid session
44
+ * to use this method.
45
+ *
46
+ * The member's session remains valid after password change.
47
+ *
48
+ * The new password must meet the site's configured password requirements for length
49
+ * and complexity. These requirements are enforced automatically when processing the request.
50
+ * @param - New password to set for the logged-in member.
51
+ *
52
+ * The password must meet the site's configured password requirements for length and complexity.
43
53
  */
44
54
  (newPassword: string): Promise<void>;
45
55
  }
46
56
  declare function signOn$1(httpClient: HttpClient): SignOnSignature;
47
57
  interface SignOnSignature {
48
- /** @param - the identifier of the identity */
58
+ /**
59
+ * Authenticates a member without credentials and returns a session token.
60
+ *
61
+ * This method provides authentication that automatically creates or updates
62
+ * member accounts as needed during the authentication process.
63
+ * Use this for trusted integrations and scenarios where you already have verified user information.
64
+ * @param - Member identifier for authentication.
65
+ *
66
+ * Currently only email addresses are supported.
67
+ */
49
68
  (loginId: LoginId, options?: SignOnOptions): Promise<NonNullablePaths<SignOnResponse, `sessionToken` | `identity.connections` | `identity.connections.${number}.idpConnection.idpConnectionId` | `identity.connections.${number}.idpConnection.idpUserId` | `identity.connections.${number}.authenticatorConnection.authenticatorConnectionId` | `identity.connections.${number}.authenticatorConnection.reEnrollmentRequired` | `identity.identityProfile.emails` | `identity.identityProfile.phones` | `identity.identityProfile.labels` | `identity.identityProfile.privacyStatus` | `identity.identityProfile.customFields` | `identity.identityProfile.customFields.${number}.name` | `identity.identityProfile.customFields.${number}.value.strValue` | `identity.identityProfile.customFields.${number}.value.numValue` | `identity.identityProfile.secondaryEmails` | `identity.identityProfile.secondaryEmails.${number}.email` | `identity.identityProfile.secondaryEmails.${number}.tag` | `identity.identityProfile.phonesV2` | `identity.identityProfile.phonesV2.${number}.phone` | `identity.identityProfile.phonesV2.${number}.tag` | `identity.identityProfile.addresses` | `identity.identityProfile.addresses.${number}.tag` | `identity.email.address` | `identity.email.isVerified` | `identity.status.name` | `identity.status.reasons` | `identity.factors` | `identity.factors.${number}.factorId` | `identity.factors.${number}.type` | `identity.factors.${number}.status`, 7>>;
50
69
  }
51
70
  declare function logout$1(httpClient: HttpClient): LogoutSignature;
52
71
  interface LogoutSignature {
53
72
  /**
54
- * Logs out a member.
73
+ * Terminates the member's session and clears authentication cookies.
74
+ *
75
+ * Returns the following:
76
+ * - `body`: HTML content for the logout response
77
+ * - `statusCode`: HTTP status code (200 for success, 302 for redirect)
78
+ * - `headers`: Array of key-value pairs including:
79
+ * - `Set-Cookie` headers to remove all session cookies
80
+ * - `Location` header (when `postLogoutRedirectUri` is provided, with 302 status)
55
81
  */
56
82
  (options?: LogoutOptions): Promise<NonNullablePaths<RawHttpResponse, `body` | `headers` | `headers.${number}.key` | `headers.${number}.value`, 4>>;
57
83
  }
58
- declare function verify$1(httpClient: HttpClient): VerifySignature;
59
- interface VerifySignature {
60
- /** */
61
- (factorType: FactorTypeWithLiterals, options?: VerifyOptions): Promise<NonNullablePaths<StateMachineResponse, `state` | `identity.connections` | `identity.connections.${number}.idpConnection.idpConnectionId` | `identity.connections.${number}.idpConnection.idpUserId` | `identity.connections.${number}.authenticatorConnection.authenticatorConnectionId` | `identity.connections.${number}.authenticatorConnection.reEnrollmentRequired` | `identity.identityProfile.emails` | `identity.identityProfile.phones` | `identity.identityProfile.labels` | `identity.identityProfile.privacyStatus` | `identity.identityProfile.customFields` | `identity.identityProfile.customFields.${number}.name` | `identity.identityProfile.customFields.${number}.value.strValue` | `identity.identityProfile.customFields.${number}.value.numValue` | `identity.identityProfile.secondaryEmails` | `identity.identityProfile.secondaryEmails.${number}.email` | `identity.identityProfile.secondaryEmails.${number}.tag` | `identity.identityProfile.phonesV2` | `identity.identityProfile.phonesV2.${number}.phone` | `identity.identityProfile.phonesV2.${number}.tag` | `identity.identityProfile.addresses` | `identity.identityProfile.addresses.${number}.tag` | `identity.email.address` | `identity.email.isVerified` | `identity.status.name` | `identity.status.reasons` | `identity.factors` | `identity.factors.${number}.factorId` | `identity.factors.${number}.type` | `identity.factors.${number}.status`, 7>>;
62
- }
63
84
 
64
85
  declare const registerV2: MaybeContext<BuildRESTFunction<typeof registerV2$1> & typeof registerV2$1>;
65
86
  declare const loginV2: MaybeContext<BuildRESTFunction<typeof loginV2$1> & typeof loginV2$1>;
66
87
  declare const changePassword: MaybeContext<BuildRESTFunction<typeof changePassword$1> & typeof changePassword$1>;
67
88
  declare const signOn: MaybeContext<BuildRESTFunction<typeof signOn$1> & typeof signOn$1>;
68
89
  declare const logout: MaybeContext<BuildRESTFunction<typeof logout$1> & typeof logout$1>;
69
- declare const verify: MaybeContext<BuildRESTFunction<typeof verify$1> & typeof verify$1>;
70
90
 
71
- export { FactorTypeWithLiterals, LoginId, LoginV2ApplicationErrors, LoginV2Options, LoginV2ValidationErrors, LogoutOptions, RawHttpResponse, RegisterV2ApplicationErrors, RegisterV2Options, RegisterV2ValidationErrors, SignOnOptions, SignOnResponse, StateMachineResponse, VerifyOptions, changePassword, loginV2, logout, registerV2, signOn, verify };
91
+ export { LoginId, LoginV2ApplicationErrors, LoginV2Options, LoginV2ValidationErrors, LogoutOptions, RawHttpResponse, RegisterV2ApplicationErrors, RegisterV2Options, RegisterV2ValidationErrors, SignOnOptions, SignOnResponse, StateMachineResponse, changePassword, loginV2, logout, registerV2, signOn };
@@ -32,13 +32,11 @@ __export(index_exports, {
32
32
  Status: () => Status,
33
33
  StatusName: () => StatusName,
34
34
  TenantType: () => TenantType,
35
- UserVerificationRequirement: () => UserVerificationRequirement,
36
35
  changePassword: () => changePassword4,
37
36
  loginV2: () => loginV24,
38
37
  logout: () => logout4,
39
38
  registerV2: () => registerV24,
40
- signOn: () => signOn4,
41
- verify: () => verify4
39
+ signOn: () => signOn4
42
40
  });
43
41
  module.exports = __toCommonJS(index_exports);
44
42
 
@@ -180,20 +178,6 @@ function registerV2(payload) {
180
178
  }),
181
179
  data: serializedData,
182
180
  transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
183
- {
184
- transformFn: import_bytes.transformRESTBytesToSDKBytes,
185
- paths: [
186
- {
187
- path: "mfaChallengeData.verificationChallengeData.webauthnData.challenge"
188
- },
189
- {
190
- path: "mfaChallengeData.verificationChallengeData.webauthnData.allowCredentials.id"
191
- },
192
- {
193
- path: "mfaChallengeData.verificationChallengeData.webauthnData.extensions.largeBlobWrite"
194
- }
195
- ]
196
- },
197
181
  {
198
182
  transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
199
183
  paths: [
@@ -233,20 +217,6 @@ function loginV2(payload) {
233
217
  }),
234
218
  data: payload,
235
219
  transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
236
- {
237
- transformFn: import_bytes.transformRESTBytesToSDKBytes,
238
- paths: [
239
- {
240
- path: "mfaChallengeData.verificationChallengeData.webauthnData.challenge"
241
- },
242
- {
243
- path: "mfaChallengeData.verificationChallengeData.webauthnData.allowCredentials.id"
244
- },
245
- {
246
- path: "mfaChallengeData.verificationChallengeData.webauthnData.extensions.largeBlobWrite"
247
- }
248
- ]
249
- },
250
220
  {
251
221
  transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
252
222
  paths: [
@@ -364,59 +334,6 @@ function logout(payload) {
364
334
  }
365
335
  return __logout;
366
336
  }
367
- function verify(payload) {
368
- function __verify({ host }) {
369
- const metadata = {
370
- entityFqdn: "wix.iam.authentication.v1.authentication",
371
- method: "POST",
372
- methodFqn: "wix.iam.authentication.v1.AuthenticationService.Verify",
373
- packageName: PACKAGE_NAME,
374
- migrationOptions: {
375
- optInTransformResponse: true
376
- },
377
- url: resolveWixIamAuthenticationV1AuthenticationServiceUrl({
378
- protoPath: "/v2/{factorType}/verify",
379
- data: payload,
380
- host
381
- }),
382
- data: payload,
383
- transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
384
- {
385
- transformFn: import_bytes.transformRESTBytesToSDKBytes,
386
- paths: [
387
- {
388
- path: "mfaChallengeData.verificationChallengeData.webauthnData.challenge"
389
- },
390
- {
391
- path: "mfaChallengeData.verificationChallengeData.webauthnData.allowCredentials.id"
392
- },
393
- {
394
- path: "mfaChallengeData.verificationChallengeData.webauthnData.extensions.largeBlobWrite"
395
- }
396
- ]
397
- },
398
- {
399
- transformFn: import_timestamp2.transformRESTTimestampToSDKTimestamp,
400
- paths: [
401
- { path: "identity.createdDate" },
402
- { path: "identity.updatedDate" },
403
- { path: "identity.identityProfile.customFields.value.dateValue" },
404
- { path: "additionalData.*.dateValue" }
405
- ]
406
- },
407
- {
408
- transformFn: import_float2.transformRESTFloatToSDKFloat,
409
- paths: [
410
- { path: "identity.identityProfile.customFields.value.numValue" },
411
- { path: "additionalData.*.numValue" }
412
- ]
413
- }
414
- ])
415
- };
416
- return metadata;
417
- }
418
- return __verify;
419
- }
420
337
 
421
338
  // src/iam-authentication-v1-authentication-authentication.universal.ts
422
339
  var import_address = require("@wix/sdk-runtime/transformations/address");
@@ -508,13 +425,6 @@ var MfaReason = /* @__PURE__ */ ((MfaReason2) => {
508
425
  MfaReason2["HIGH_RISK_LOGIN"] = "HIGH_RISK_LOGIN";
509
426
  return MfaReason2;
510
427
  })(MfaReason || {});
511
- var UserVerificationRequirement = /* @__PURE__ */ ((UserVerificationRequirement2) => {
512
- UserVerificationRequirement2["USER_VERIFICATION_UNSPECIFIED"] = "USER_VERIFICATION_UNSPECIFIED";
513
- UserVerificationRequirement2["USER_VERIFICATION_REQUIRED"] = "USER_VERIFICATION_REQUIRED";
514
- UserVerificationRequirement2["USER_VERIFICATION_PREFERRED"] = "USER_VERIFICATION_PREFERRED";
515
- UserVerificationRequirement2["USER_VERIFICATION_DISCOURAGED"] = "USER_VERIFICATION_DISCOURAGED";
516
- return UserVerificationRequirement2;
517
- })(UserVerificationRequirement || {});
518
428
  var TenantType = /* @__PURE__ */ ((TenantType2) => {
519
429
  TenantType2["UNKNOWN_TENANT_TYPE"] = "UNKNOWN_TENANT_TYPE";
520
430
  TenantType2["ACCOUNT"] = "ACCOUNT";
@@ -712,56 +622,6 @@ async function logout2(options) {
712
622
  throw transformedError;
713
623
  }
714
624
  }
715
- async function verify2(factorType, options) {
716
- const { httpClient, sideEffects } = arguments[2];
717
- const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
718
- factorType,
719
- stateToken: options?.stateToken,
720
- rememberThisDevice: options?.rememberThisDevice,
721
- smsData: options?.smsData,
722
- callData: options?.callData,
723
- emailData: options?.emailData,
724
- totpData: options?.totpData,
725
- pushData: options?.pushData,
726
- webauthnData: options?.webauthnData
727
- });
728
- const reqOpts = verify(payload);
729
- sideEffects?.onSiteCall?.();
730
- try {
731
- const result = await httpClient.request(reqOpts);
732
- sideEffects?.onSuccess?.(result);
733
- return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
734
- (0, import_transform_paths2.transformPaths)(result.data, [
735
- {
736
- transformFn: import_address2.transformRESTAddressToSDKAddress,
737
- paths: [{ path: "identity.identityProfile.addresses.address" }]
738
- }
739
- ])
740
- );
741
- } catch (err) {
742
- const transformedError = (0, import_transform_error.transformError)(
743
- err,
744
- {
745
- spreadPathsToArguments: {},
746
- explicitPathsToArguments: {
747
- factorType: "$[0]",
748
- stateToken: "$[1].stateToken",
749
- rememberThisDevice: "$[1].rememberThisDevice",
750
- smsData: "$[1].smsData",
751
- callData: "$[1].callData",
752
- emailData: "$[1].emailData",
753
- totpData: "$[1].totpData",
754
- pushData: "$[1].pushData",
755
- webauthnData: "$[1].webauthnData"
756
- },
757
- singleArgumentUnchanged: false
758
- },
759
- ["factorType", "options"]
760
- );
761
- sideEffects?.onError?.(err);
762
- throw transformedError;
763
- }
764
- }
765
625
 
766
626
  // src/iam-authentication-v1-authentication-authentication.public.ts
767
627
  function registerV23(httpClient) {
@@ -802,14 +662,6 @@ function logout3(httpClient) {
802
662
  { httpClient }
803
663
  );
804
664
  }
805
- function verify3(httpClient) {
806
- return (factorType, options) => verify2(
807
- factorType,
808
- options,
809
- // @ts-ignore
810
- { httpClient }
811
- );
812
- }
813
665
 
814
666
  // src/iam-authentication-v1-authentication-authentication.context.ts
815
667
  var import_rest_modules3 = require("@wix/sdk-runtime/rest-modules");
@@ -818,7 +670,6 @@ var loginV24 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(loginV
818
670
  var changePassword4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(changePassword3);
819
671
  var signOn4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(signOn3);
820
672
  var logout4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(logout3);
821
- var verify4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(verify3);
822
673
  // Annotate the CommonJS export names for ESM import in node:
823
674
  0 && (module.exports = {
824
675
  AddressTag,
@@ -833,12 +684,10 @@ var verify4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(verify3
833
684
  Status,
834
685
  StatusName,
835
686
  TenantType,
836
- UserVerificationRequirement,
837
687
  changePassword,
838
688
  loginV2,
839
689
  logout,
840
690
  registerV2,
841
- signOn,
842
- verify
691
+ signOn
843
692
  });
844
693
  //# sourceMappingURL=index.js.map