@wix/auto_sdk_identity_authentication 1.0.69 → 1.0.71

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,102 @@ 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
+ /**
21
+ * Legacy combined outcome. Use result and decision_reason instead.
22
+ * @deprecated Legacy combined outcome. Use result and decision_reason instead.
23
+ * @replacedBy result
24
+ * @targetRemovalDate 2027-04-18
25
+ */
26
+ outcome?: CaptchaOutcomeWithLiterals;
27
+ captchaKind?: CaptchaKindWithLiterals;
28
+ /**
29
+ * How far the assessment landed from the minimum it was judged against, positive for a pass. A
30
+ * margin rather than a raw score because that minimum differs by surface and OS, so raw scores are
31
+ * not comparable across channels.
32
+ *
33
+ * Absent when no score decided the outcome - an inauthentic token, no token at all, or a
34
+ * PerimeterX escalation where reCAPTCHA itself passed.
35
+ * @min -1
36
+ * @max 1
37
+ */
38
+ minScoreMargin?: number | null;
39
+ /**
40
+ * Google's reasons for the score: AUTOMATION, UNEXPECTED_ENVIRONMENT, TOO_MUCH_TRAFFIC, ...
41
+ * @maxLength 100
42
+ * @maxSize 100
43
+ */
44
+ reasons?: string[];
45
+ /** What happened after verification, independently of why. */
46
+ result?: CaptchaResultWithLiterals;
47
+ /** The deciding cause of rejection or escalation. Unspecified for a pass. */
48
+ decisionReason?: CaptchaDecisionReasonWithLiterals;
49
+ }
50
+ declare enum CaptchaFlow {
51
+ REGISTER = "REGISTER",
52
+ /** Not published yet. */
53
+ LOGIN = "LOGIN"
54
+ }
55
+ /** @enumType */
56
+ type CaptchaFlowWithLiterals = CaptchaFlow | 'REGISTER' | 'LOGIN';
57
+ declare enum CaptchaIdentityType {
58
+ USER = "USER",
59
+ /** Not published yet. */
60
+ MEMBER = "MEMBER"
61
+ }
62
+ /** @enumType */
63
+ type CaptchaIdentityTypeWithLiterals = CaptchaIdentityType | 'USER' | 'MEMBER';
64
+ declare enum CaptchaOutcome {
65
+ PASSED = "PASSED",
66
+ LOW_SCORE = "LOW_SCORE",
67
+ /** Rejected as inauthentic, which is independent of the score. */
68
+ INVALID_TOKEN = "INVALID_TOKEN",
69
+ MISSING_TOKEN = "MISSING_TOKEN",
70
+ /**
71
+ * Escalated to a visible challenge. PerimeterX can cause this while reCAPTCHA itself passed, so it
72
+ * does not on its own mean the captcha scored badly - `reasons` distinguishes them.
73
+ */
74
+ VISIBLE_REQUIRED = "VISIBLE_REQUIRED"
75
+ }
76
+ /** @enumType */
77
+ type CaptchaOutcomeWithLiterals = CaptchaOutcome | 'PASSED' | 'LOW_SCORE' | 'INVALID_TOKEN' | 'MISSING_TOKEN' | 'VISIBLE_REQUIRED';
78
+ declare enum CaptchaKind {
79
+ INVISIBLE = "INVISIBLE",
80
+ VISIBLE = "VISIBLE",
81
+ /** Verified against a site key the client registered itself (branded and headless apps). */
82
+ CLIENT_SITE_KEY = "CLIENT_SITE_KEY"
83
+ }
84
+ /** @enumType */
85
+ type CaptchaKindWithLiterals = CaptchaKind | 'INVISIBLE' | 'VISIBLE' | 'CLIENT_SITE_KEY';
86
+ declare enum CaptchaResult {
87
+ VERIFICATION_PASSED = "VERIFICATION_PASSED",
88
+ VERIFICATION_REJECTED = "VERIFICATION_REJECTED",
89
+ CHALLENGE_REQUIRED = "CHALLENGE_REQUIRED"
90
+ }
91
+ /** @enumType */
92
+ type CaptchaResultWithLiterals = CaptchaResult | 'VERIFICATION_PASSED' | 'VERIFICATION_REJECTED' | 'CHALLENGE_REQUIRED';
93
+ declare enum CaptchaDecisionReason {
94
+ SCORE_BELOW_THRESHOLD = "SCORE_BELOW_THRESHOLD",
95
+ TOKEN_INVALID = "TOKEN_INVALID",
96
+ TOKEN_MISSING = "TOKEN_MISSING",
97
+ PERIMETERX_REJECTED = "PERIMETERX_REJECTED"
98
+ }
99
+ /** @enumType */
100
+ type CaptchaDecisionReasonWithLiterals = CaptchaDecisionReason | 'SCORE_BELOW_THRESHOLD' | 'TOKEN_INVALID' | 'TOKEN_MISSING' | 'PERIMETERX_REJECTED';
5
101
  interface RegisterV2Request {
6
102
  /** Identifier of the registering member. */
7
103
  loginId: LoginId;
@@ -1007,6 +1103,97 @@ interface GetWebauthnChallengeResponse {
1007
1103
  /** The challenge that will be used for a WebAuthn authentication ceremony. */
1008
1104
  webauthn?: WebAuthnChallengeData;
1009
1105
  }
1106
+ interface MessageEnvelope {
1107
+ /**
1108
+ * App instance ID.
1109
+ * @format GUID
1110
+ */
1111
+ instanceId?: string | null;
1112
+ /**
1113
+ * Event type.
1114
+ * @maxLength 150
1115
+ */
1116
+ eventType?: string;
1117
+ /** The identification type and identity data. */
1118
+ identity?: IdentificationData;
1119
+ /** Stringify payload. */
1120
+ data?: string;
1121
+ /** Details related to the account */
1122
+ accountInfo?: AccountInfo;
1123
+ }
1124
+ interface IdentificationData extends 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
+ /** @readonly */
1146
+ identityType?: WebhookIdentityTypeWithLiterals;
1147
+ }
1148
+ /** @oneof */
1149
+ interface IdentificationDataIdOneOf {
1150
+ /**
1151
+ * ID of a site visitor that has not logged in to the site.
1152
+ * @format GUID
1153
+ */
1154
+ anonymousVisitorId?: string;
1155
+ /**
1156
+ * ID of a site visitor that has logged in to the site.
1157
+ * @format GUID
1158
+ */
1159
+ memberId?: string;
1160
+ /**
1161
+ * ID of a Wix user (site owner, contributor, etc.).
1162
+ * @format GUID
1163
+ */
1164
+ wixUserId?: string;
1165
+ /**
1166
+ * ID of an app.
1167
+ * @format GUID
1168
+ */
1169
+ appId?: string;
1170
+ }
1171
+ declare enum WebhookIdentityType {
1172
+ UNKNOWN = "UNKNOWN",
1173
+ ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
1174
+ MEMBER = "MEMBER",
1175
+ WIX_USER = "WIX_USER",
1176
+ APP = "APP"
1177
+ }
1178
+ /** @enumType */
1179
+ type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
1180
+ interface AccountInfo {
1181
+ /**
1182
+ * ID of the Wix account associated with the event.
1183
+ * @format GUID
1184
+ */
1185
+ accountId?: string | null;
1186
+ /**
1187
+ * ID of the parent Wix account. Only included when accountId belongs to a child account.
1188
+ * @format GUID
1189
+ */
1190
+ parentAccountId?: string | null;
1191
+ /**
1192
+ * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.
1193
+ * @format GUID
1194
+ */
1195
+ siteId?: string | null;
1196
+ }
1010
1197
  /** @docsIgnore */
1011
1198
  type RegisterV2ApplicationErrors = {
1012
1199
  code?: 'UNIMPLEMENTED_FEATURE';
@@ -1287,4 +1474,4 @@ interface LogoutOptions {
1287
1474
  clientId?: string | null;
1288
1475
  }
1289
1476
 
1290
- 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 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 };
1477
+ export { type AccountInfo, type Address, AddressTag, type AddressTagWithLiterals, type AddressWrapper, type Authentication, type AuthenticatorConnection, type CallVerifyData, CaptchaDecisionReason, type CaptchaDecisionReasonWithLiterals, CaptchaFlow, type CaptchaFlowWithLiterals, CaptchaIdentityType, type CaptchaIdentityTypeWithLiterals, CaptchaKind, type CaptchaKindWithLiterals, CaptchaOutcome, type CaptchaOutcomeWithLiterals, CaptchaResult, type CaptchaResultWithLiterals, 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 };
@@ -21,6 +21,12 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
21
21
  var index_typings_exports = {};
22
22
  __export(index_typings_exports, {
23
23
  AddressTag: () => AddressTag,
24
+ CaptchaDecisionReason: () => CaptchaDecisionReason,
25
+ CaptchaFlow: () => CaptchaFlow,
26
+ CaptchaIdentityType: () => CaptchaIdentityType,
27
+ CaptchaKind: () => CaptchaKind,
28
+ CaptchaOutcome: () => CaptchaOutcome,
29
+ CaptchaResult: () => CaptchaResult,
24
30
  DeliveryMethod: () => DeliveryMethod,
25
31
  EmailTag: () => EmailTag,
26
32
  FactorStatus: () => FactorStatus,
@@ -34,6 +40,7 @@ __export(index_typings_exports, {
34
40
  StatusName: () => StatusName,
35
41
  TenantType: () => TenantType,
36
42
  V1Reason: () => V1Reason,
43
+ WebhookIdentityType: () => WebhookIdentityType,
37
44
  changePassword: () => changePassword2,
38
45
  loginV2: () => loginV22,
39
46
  logout: () => logout2,
@@ -382,6 +389,43 @@ var TRANSFORM_PATHS_02 = [{ path: "profile.addresses.address" }];
382
389
  var TRANSFORM_PATHS_12 = [
383
390
  { path: "identity.identityProfile.addresses.address" }
384
391
  ];
392
+ var CaptchaFlow = /* @__PURE__ */ ((CaptchaFlow2) => {
393
+ CaptchaFlow2["REGISTER"] = "REGISTER";
394
+ CaptchaFlow2["LOGIN"] = "LOGIN";
395
+ return CaptchaFlow2;
396
+ })(CaptchaFlow || {});
397
+ var CaptchaIdentityType = /* @__PURE__ */ ((CaptchaIdentityType2) => {
398
+ CaptchaIdentityType2["USER"] = "USER";
399
+ CaptchaIdentityType2["MEMBER"] = "MEMBER";
400
+ return CaptchaIdentityType2;
401
+ })(CaptchaIdentityType || {});
402
+ var CaptchaOutcome = /* @__PURE__ */ ((CaptchaOutcome2) => {
403
+ CaptchaOutcome2["PASSED"] = "PASSED";
404
+ CaptchaOutcome2["LOW_SCORE"] = "LOW_SCORE";
405
+ CaptchaOutcome2["INVALID_TOKEN"] = "INVALID_TOKEN";
406
+ CaptchaOutcome2["MISSING_TOKEN"] = "MISSING_TOKEN";
407
+ CaptchaOutcome2["VISIBLE_REQUIRED"] = "VISIBLE_REQUIRED";
408
+ return CaptchaOutcome2;
409
+ })(CaptchaOutcome || {});
410
+ var CaptchaKind = /* @__PURE__ */ ((CaptchaKind2) => {
411
+ CaptchaKind2["INVISIBLE"] = "INVISIBLE";
412
+ CaptchaKind2["VISIBLE"] = "VISIBLE";
413
+ CaptchaKind2["CLIENT_SITE_KEY"] = "CLIENT_SITE_KEY";
414
+ return CaptchaKind2;
415
+ })(CaptchaKind || {});
416
+ var CaptchaResult = /* @__PURE__ */ ((CaptchaResult2) => {
417
+ CaptchaResult2["VERIFICATION_PASSED"] = "VERIFICATION_PASSED";
418
+ CaptchaResult2["VERIFICATION_REJECTED"] = "VERIFICATION_REJECTED";
419
+ CaptchaResult2["CHALLENGE_REQUIRED"] = "CHALLENGE_REQUIRED";
420
+ return CaptchaResult2;
421
+ })(CaptchaResult || {});
422
+ var CaptchaDecisionReason = /* @__PURE__ */ ((CaptchaDecisionReason2) => {
423
+ CaptchaDecisionReason2["SCORE_BELOW_THRESHOLD"] = "SCORE_BELOW_THRESHOLD";
424
+ CaptchaDecisionReason2["TOKEN_INVALID"] = "TOKEN_INVALID";
425
+ CaptchaDecisionReason2["TOKEN_MISSING"] = "TOKEN_MISSING";
426
+ CaptchaDecisionReason2["PERIMETERX_REJECTED"] = "PERIMETERX_REJECTED";
427
+ return CaptchaDecisionReason2;
428
+ })(CaptchaDecisionReason || {});
385
429
  var PrivacyStatus = /* @__PURE__ */ ((PrivacyStatus2) => {
386
430
  PrivacyStatus2["UNDEFINED"] = "UNDEFINED";
387
431
  PrivacyStatus2["PUBLIC"] = "PUBLIC";
@@ -492,6 +536,14 @@ var DeliveryMethod = /* @__PURE__ */ ((DeliveryMethod2) => {
492
536
  DeliveryMethod2["WHATSAPP"] = "WHATSAPP";
493
537
  return DeliveryMethod2;
494
538
  })(DeliveryMethod || {});
539
+ var WebhookIdentityType = /* @__PURE__ */ ((WebhookIdentityType2) => {
540
+ WebhookIdentityType2["UNKNOWN"] = "UNKNOWN";
541
+ WebhookIdentityType2["ANONYMOUS_VISITOR"] = "ANONYMOUS_VISITOR";
542
+ WebhookIdentityType2["MEMBER"] = "MEMBER";
543
+ WebhookIdentityType2["WIX_USER"] = "WIX_USER";
544
+ WebhookIdentityType2["APP"] = "APP";
545
+ return WebhookIdentityType2;
546
+ })(WebhookIdentityType || {});
495
547
  async function registerV22(loginId, options) {
496
548
  const { httpClient, sideEffects } = arguments[2];
497
549
  const payload = (0, import_transform_paths2.transformPaths)(
@@ -715,6 +767,12 @@ async function logout2(options) {
715
767
  // Annotate the CommonJS export names for ESM import in node:
716
768
  0 && (module.exports = {
717
769
  AddressTag,
770
+ CaptchaDecisionReason,
771
+ CaptchaFlow,
772
+ CaptchaIdentityType,
773
+ CaptchaKind,
774
+ CaptchaOutcome,
775
+ CaptchaResult,
718
776
  DeliveryMethod,
719
777
  EmailTag,
720
778
  FactorStatus,
@@ -728,6 +786,7 @@ async function logout2(options) {
728
786
  StatusName,
729
787
  TenantType,
730
788
  V1Reason,
789
+ WebhookIdentityType,
731
790
  changePassword,
732
791
  loginV2,
733
792
  logout,