@wix/auto_sdk_identity_authentication 1.0.68 → 1.0.70

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.
@@ -2,6 +2,77 @@ import { NonNullablePaths } from '@wix/sdk-types';
2
2
 
3
3
  interface Authentication {
4
4
  }
5
+ /**
6
+ * Published for a passed check as well as a rejected one, so a consumer can tell a rejection rate
7
+ * from a rejection count.
8
+ *
9
+ * The caller's IP, geo and user agent are deliberately not fields: they travel as call-scope aspects
10
+ * in the message headers, which only reach a single-record subscription - a batch handler runs on an
11
+ * orphan CallScope and loses them.
12
+ */
13
+ interface CaptchaVerification {
14
+ /** @format GUID */
15
+ eventId?: string;
16
+ /** When the check happened, not when this was published. */
17
+ eventTime?: Date | null;
18
+ flow?: CaptchaFlowWithLiterals;
19
+ identityType?: CaptchaIdentityTypeWithLiterals;
20
+ outcome?: CaptchaOutcomeWithLiterals;
21
+ captchaKind?: CaptchaKindWithLiterals;
22
+ /**
23
+ * How far the assessment landed from the minimum it was judged against, positive for a pass. A
24
+ * margin rather than a raw score because that minimum differs by surface and OS, so raw scores are
25
+ * not comparable across channels.
26
+ *
27
+ * Absent when no score decided the outcome - an inauthentic token, no token at all, or a
28
+ * PerimeterX escalation where reCAPTCHA itself passed.
29
+ * @min -1
30
+ * @max 1
31
+ */
32
+ minScoreMargin?: number | null;
33
+ /**
34
+ * Google's reasons for the score: AUTOMATION, UNEXPECTED_ENVIRONMENT, TOO_MUCH_TRAFFIC, ...
35
+ * @maxLength 100
36
+ * @maxSize 100
37
+ */
38
+ reasons?: string[];
39
+ }
40
+ declare enum CaptchaFlow {
41
+ REGISTER = "REGISTER",
42
+ /** Not published yet. */
43
+ LOGIN = "LOGIN"
44
+ }
45
+ /** @enumType */
46
+ type CaptchaFlowWithLiterals = CaptchaFlow | 'REGISTER' | 'LOGIN';
47
+ declare enum CaptchaIdentityType {
48
+ USER = "USER",
49
+ /** Not published yet. */
50
+ MEMBER = "MEMBER"
51
+ }
52
+ /** @enumType */
53
+ type CaptchaIdentityTypeWithLiterals = CaptchaIdentityType | 'USER' | 'MEMBER';
54
+ declare enum CaptchaOutcome {
55
+ PASSED = "PASSED",
56
+ LOW_SCORE = "LOW_SCORE",
57
+ /** Rejected as inauthentic, which is independent of the score. */
58
+ INVALID_TOKEN = "INVALID_TOKEN",
59
+ MISSING_TOKEN = "MISSING_TOKEN",
60
+ /**
61
+ * Escalated to a visible challenge. PerimeterX can cause this while reCAPTCHA itself passed, so it
62
+ * does not on its own mean the captcha scored badly - `reasons` distinguishes them.
63
+ */
64
+ VISIBLE_REQUIRED = "VISIBLE_REQUIRED"
65
+ }
66
+ /** @enumType */
67
+ type CaptchaOutcomeWithLiterals = CaptchaOutcome | 'PASSED' | 'LOW_SCORE' | 'INVALID_TOKEN' | 'MISSING_TOKEN' | 'VISIBLE_REQUIRED';
68
+ declare enum CaptchaKind {
69
+ INVISIBLE = "INVISIBLE",
70
+ VISIBLE = "VISIBLE",
71
+ /** Verified against a site key the client registered itself (branded and headless apps). */
72
+ CLIENT_SITE_KEY = "CLIENT_SITE_KEY"
73
+ }
74
+ /** @enumType */
75
+ type CaptchaKindWithLiterals = CaptchaKind | 'INVISIBLE' | 'VISIBLE' | 'CLIENT_SITE_KEY';
5
76
  interface RegisterV2Request {
6
77
  /** Identifier of the registering member. */
7
78
  loginId: LoginId;
@@ -905,8 +976,6 @@ interface VerifyRequest extends VerifyRequestFactorDataOneOf {
905
976
  webauthnData?: WebAuthnVerifyData;
906
977
  /** RecoveryCode response from a one-time code. */
907
978
  recoveryCodeData?: RecoveryCodeVerifyData;
908
- /** Password for first factor verification. */
909
- passwordData?: PasswordVerifyData;
910
979
  /**
911
980
  * State token from the initial authentication response.
912
981
  *
@@ -944,8 +1013,6 @@ interface VerifyRequestFactorDataOneOf {
944
1013
  webauthnData?: WebAuthnVerifyData;
945
1014
  /** RecoveryCode response from a one-time code. */
946
1015
  recoveryCodeData?: RecoveryCodeVerifyData;
947
- /** Password for first factor verification. */
948
- passwordData?: PasswordVerifyData;
949
1016
  }
950
1017
  interface SmsVerifyData {
951
1018
  /**
@@ -999,13 +1066,6 @@ interface RecoveryCodeVerifyData {
999
1066
  */
1000
1067
  code?: string | null;
1001
1068
  }
1002
- interface PasswordVerifyData {
1003
- /**
1004
- * @minLength 1
1005
- * @maxLength 100
1006
- */
1007
- password?: string;
1008
- }
1009
1069
  interface GetWebauthnChallengeRequest {
1010
1070
  /**
1011
1071
  * Identifier of the member requesting the WebAuthn challenge.
@@ -1018,6 +1078,97 @@ interface GetWebauthnChallengeResponse {
1018
1078
  /** The challenge that will be used for a WebAuthn authentication ceremony. */
1019
1079
  webauthn?: WebAuthnChallengeData;
1020
1080
  }
1081
+ interface MessageEnvelope {
1082
+ /**
1083
+ * App instance ID.
1084
+ * @format GUID
1085
+ */
1086
+ instanceId?: string | null;
1087
+ /**
1088
+ * Event type.
1089
+ * @maxLength 150
1090
+ */
1091
+ eventType?: string;
1092
+ /** The identification type and identity data. */
1093
+ identity?: IdentificationData;
1094
+ /** Stringify payload. */
1095
+ data?: string;
1096
+ /** Details related to the account */
1097
+ accountInfo?: AccountInfo;
1098
+ }
1099
+ interface IdentificationData extends IdentificationDataIdOneOf {
1100
+ /**
1101
+ * ID of a site visitor that has not logged in to the site.
1102
+ * @format GUID
1103
+ */
1104
+ anonymousVisitorId?: string;
1105
+ /**
1106
+ * ID of a site visitor that has logged in to the site.
1107
+ * @format GUID
1108
+ */
1109
+ memberId?: string;
1110
+ /**
1111
+ * ID of a Wix user (site owner, contributor, etc.).
1112
+ * @format GUID
1113
+ */
1114
+ wixUserId?: string;
1115
+ /**
1116
+ * ID of an app.
1117
+ * @format GUID
1118
+ */
1119
+ appId?: string;
1120
+ /** @readonly */
1121
+ identityType?: WebhookIdentityTypeWithLiterals;
1122
+ }
1123
+ /** @oneof */
1124
+ interface IdentificationDataIdOneOf {
1125
+ /**
1126
+ * ID of a site visitor that has not logged in to the site.
1127
+ * @format GUID
1128
+ */
1129
+ anonymousVisitorId?: string;
1130
+ /**
1131
+ * ID of a site visitor that has logged in to the site.
1132
+ * @format GUID
1133
+ */
1134
+ memberId?: string;
1135
+ /**
1136
+ * ID of a Wix user (site owner, contributor, etc.).
1137
+ * @format GUID
1138
+ */
1139
+ wixUserId?: string;
1140
+ /**
1141
+ * ID of an app.
1142
+ * @format GUID
1143
+ */
1144
+ appId?: string;
1145
+ }
1146
+ declare enum WebhookIdentityType {
1147
+ UNKNOWN = "UNKNOWN",
1148
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
1149
+ MEMBER = "MEMBER",
1150
+ WIX_USER = "WIX_USER",
1151
+ APP = "APP"
1152
+ }
1153
+ /** @enumType */
1154
+ type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
1155
+ interface AccountInfo {
1156
+ /**
1157
+ * ID of the Wix account associated with the event.
1158
+ * @format GUID
1159
+ */
1160
+ accountId?: string | null;
1161
+ /**
1162
+ * ID of the parent Wix account. Only included when accountId belongs to a child account.
1163
+ * @format GUID
1164
+ */
1165
+ parentAccountId?: string | null;
1166
+ /**
1167
+ * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.
1168
+ * @format GUID
1169
+ */
1170
+ siteId?: string | null;
1171
+ }
1021
1172
  /** @docsIgnore */
1022
1173
  type RegisterV2ApplicationErrors = {
1023
1174
  code?: 'UNIMPLEMENTED_FEATURE';
@@ -1298,4 +1449,4 @@ interface LogoutOptions {
1298
1449
  clientId?: string | null;
1299
1450
  }
1300
1451
 
1301
- export { type Address, AddressTag, type AddressTagWithLiterals, type AddressWrapper, type Authentication, type AuthenticatorConnection, type CallVerifyData, type CaptchaToken, type CaptchaTokenTokenOneOf, type ChangePasswordRequest, type ChangePasswordResponse, type ConnectIdpRequest, type Connection, type ConnectionTypeOneOf, type CustomField, type CustomValue, type CustomValueValueOneOf, DeliveryMethod, type DeliveryMethodWithLiterals, type Email, EmailTag, type EmailTagWithLiterals, type EmailValidationFailure, type ExternalEmailVerifyData, type Factor, FactorStatus, type FactorStatusWithLiterals, FactorType, type FactorTypeWithLiterals, type GetWebauthnChallengeRequest, type GetWebauthnChallengeResponse, type HeadersEntry, type Identity, type IdentityProfile, type IdpConnection, type ListValue, type LoginCallbackRequest, type LoginId, type LoginIdTypeOneOf, type LoginV2ApplicationErrors, type LoginV2Options, type LoginV2Request, type LoginV2ValidationErrors, type LoginWithIdpConnectionRedirectRequest, type LoginWithIdpConnectionRequest, type LoginWithIdpConnectionTokenParamsRequest, type LogoutOptions, type LogoutRequest, type MapValue, type Metadata, type MfaChallengeData, MfaReason, type MfaReasonWithLiterals, type PasswordVerifyData, type PathParametersEntry, type Phone, PhoneTag, type PhoneTagWithLiterals, PrivacyStatus, type PrivacyStatusWithLiterals, type PushChallengeData, type PushVerifyData, type QueryParametersEntry, type RawHttpRequest, type RawHttpResponse, Reason, type ReasonWithLiterals, type RecaptchaForClientSiteKey, type RecoveryCodeVerifyData, type RegisterV2ApplicationErrors, type RegisterV2Options, type RegisterV2Request, type RegisterV2ValidationErrors, type RequireMfaData, type SecondaryEmail, type SignOnOptions, type SignOnRequest, type SignOnResponse, type SmsVerifyData, type StateMachineResponse, type StateMachineResponseStateDataOneOf, StateType, type StateTypeWithLiterals, Status, StatusName, type StatusNameWithLiterals, type StatusV2, type StatusWithLiterals, TenantType, type TenantTypeWithLiterals, type TotpVerifyData, type V1CustomValue, type V1CustomValueValueOneOf, type V1Factor, type V1ListValue, type V1MapValue, V1Reason, type V1ReasonWithLiterals, type ValidateEmailRequest, type ValidateEmailResponse, type VerificationChallenge, type VerificationChallengeFactorChallengeDataOneOf, type VerifyRequest, type VerifyRequestFactorDataOneOf, type WebAuthnChallengeData, type WebAuthnVerifyData, changePassword, loginV2, logout, registerV2, signOn, validateEmail };
1452
+ export { type AccountInfo, type Address, AddressTag, type AddressTagWithLiterals, type AddressWrapper, type Authentication, type AuthenticatorConnection, type CallVerifyData, CaptchaFlow, type CaptchaFlowWithLiterals, CaptchaIdentityType, type CaptchaIdentityTypeWithLiterals, CaptchaKind, type CaptchaKindWithLiterals, CaptchaOutcome, type CaptchaOutcomeWithLiterals, type CaptchaToken, type CaptchaTokenTokenOneOf, type CaptchaVerification, type ChangePasswordRequest, type ChangePasswordResponse, type ConnectIdpRequest, type Connection, type ConnectionTypeOneOf, type CustomField, type CustomValue, type CustomValueValueOneOf, DeliveryMethod, type DeliveryMethodWithLiterals, type Email, EmailTag, type EmailTagWithLiterals, type EmailValidationFailure, type ExternalEmailVerifyData, type Factor, FactorStatus, type FactorStatusWithLiterals, FactorType, type FactorTypeWithLiterals, type GetWebauthnChallengeRequest, type GetWebauthnChallengeResponse, type HeadersEntry, type IdentificationData, type IdentificationDataIdOneOf, type Identity, type IdentityProfile, type IdpConnection, type ListValue, type LoginCallbackRequest, type LoginId, type LoginIdTypeOneOf, type LoginV2ApplicationErrors, type LoginV2Options, type LoginV2Request, type LoginV2ValidationErrors, type LoginWithIdpConnectionRedirectRequest, type LoginWithIdpConnectionRequest, type LoginWithIdpConnectionTokenParamsRequest, type LogoutOptions, type LogoutRequest, type MapValue, type MessageEnvelope, type Metadata, type MfaChallengeData, MfaReason, type MfaReasonWithLiterals, type PathParametersEntry, type Phone, PhoneTag, type PhoneTagWithLiterals, PrivacyStatus, type PrivacyStatusWithLiterals, type PushChallengeData, type PushVerifyData, type QueryParametersEntry, type RawHttpRequest, type RawHttpResponse, Reason, type ReasonWithLiterals, type RecaptchaForClientSiteKey, type RecoveryCodeVerifyData, type RegisterV2ApplicationErrors, type RegisterV2Options, type RegisterV2Request, type RegisterV2ValidationErrors, type RequireMfaData, type SecondaryEmail, type SignOnOptions, type SignOnRequest, type SignOnResponse, type SmsVerifyData, type StateMachineResponse, type StateMachineResponseStateDataOneOf, StateType, type StateTypeWithLiterals, Status, StatusName, type StatusNameWithLiterals, type StatusV2, type StatusWithLiterals, TenantType, type TenantTypeWithLiterals, type TotpVerifyData, type V1CustomValue, type V1CustomValueValueOneOf, type V1Factor, type V1ListValue, type V1MapValue, V1Reason, type V1ReasonWithLiterals, type ValidateEmailRequest, type ValidateEmailResponse, type VerificationChallenge, type VerificationChallengeFactorChallengeDataOneOf, type VerifyRequest, type VerifyRequestFactorDataOneOf, type WebAuthnChallengeData, type WebAuthnVerifyData, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, changePassword, loginV2, logout, registerV2, signOn, validateEmail };
@@ -340,6 +340,30 @@ var TRANSFORM_PATHS_02 = [{ path: "profile.addresses.address" }];
340
340
  var TRANSFORM_PATHS_12 = [
341
341
  { path: "identity.identityProfile.addresses.address" }
342
342
  ];
343
+ var CaptchaFlow = /* @__PURE__ */ ((CaptchaFlow2) => {
344
+ CaptchaFlow2["REGISTER"] = "REGISTER";
345
+ CaptchaFlow2["LOGIN"] = "LOGIN";
346
+ return CaptchaFlow2;
347
+ })(CaptchaFlow || {});
348
+ var CaptchaIdentityType = /* @__PURE__ */ ((CaptchaIdentityType2) => {
349
+ CaptchaIdentityType2["USER"] = "USER";
350
+ CaptchaIdentityType2["MEMBER"] = "MEMBER";
351
+ return CaptchaIdentityType2;
352
+ })(CaptchaIdentityType || {});
353
+ var CaptchaOutcome = /* @__PURE__ */ ((CaptchaOutcome2) => {
354
+ CaptchaOutcome2["PASSED"] = "PASSED";
355
+ CaptchaOutcome2["LOW_SCORE"] = "LOW_SCORE";
356
+ CaptchaOutcome2["INVALID_TOKEN"] = "INVALID_TOKEN";
357
+ CaptchaOutcome2["MISSING_TOKEN"] = "MISSING_TOKEN";
358
+ CaptchaOutcome2["VISIBLE_REQUIRED"] = "VISIBLE_REQUIRED";
359
+ return CaptchaOutcome2;
360
+ })(CaptchaOutcome || {});
361
+ var CaptchaKind = /* @__PURE__ */ ((CaptchaKind2) => {
362
+ CaptchaKind2["INVISIBLE"] = "INVISIBLE";
363
+ CaptchaKind2["VISIBLE"] = "VISIBLE";
364
+ CaptchaKind2["CLIENT_SITE_KEY"] = "CLIENT_SITE_KEY";
365
+ return CaptchaKind2;
366
+ })(CaptchaKind || {});
343
367
  var PrivacyStatus = /* @__PURE__ */ ((PrivacyStatus2) => {
344
368
  PrivacyStatus2["UNDEFINED"] = "UNDEFINED";
345
369
  PrivacyStatus2["PUBLIC"] = "PUBLIC";
@@ -450,6 +474,14 @@ var DeliveryMethod = /* @__PURE__ */ ((DeliveryMethod2) => {
450
474
  DeliveryMethod2["WHATSAPP"] = "WHATSAPP";
451
475
  return DeliveryMethod2;
452
476
  })(DeliveryMethod || {});
477
+ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
478
+ WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
479
+ WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
480
+ WebhookIdentityType2["MEMBER"] = "MEMBER";
481
+ WebhookIdentityType2["WIX_USER"] = "WIX_USER";
482
+ WebhookIdentityType2["APP"] = "APP";
483
+ return WebhookIdentityType2;
484
+ })(WebhookIdentityType || {});
453
485
  async function registerV22(loginId, options) {
454
486
  const { httpClient, sideEffects } = arguments[2];
455
487
  const payload = transformPaths2(
@@ -672,6 +704,10 @@ async function logout2(options) {
672
704
  }
673
705
  export {
674
706
  AddressTag,
707
+ CaptchaFlow,
708
+ CaptchaIdentityType,
709
+ CaptchaKind,
710
+ CaptchaOutcome,
675
711
  DeliveryMethod,
676
712
  EmailTag,
677
713
  FactorStatus,
@@ -685,6 +721,7 @@ export {
685
721
  StatusName,
686
722
  TenantType,
687
723
  V1Reason,
724
+ WebhookIdentityType,
688
725
  changePassword2 as changePassword,
689
726
  loginV22 as loginV2,
690
727
  logout2 as logout,