@wix/auto_sdk_identity_authentication 1.0.54 → 1.0.56
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.
- package/build/cjs/index.d.ts +9 -3
- package/build/cjs/index.js +73 -9
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +30 -4
- package/build/cjs/index.typings.js +65 -9
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +27 -5
- package/build/cjs/meta.js +60 -9
- package/build/cjs/meta.js.map +1 -1
- package/build/cjs/schemas.d.ts +17 -1
- package/build/cjs/schemas.js +20 -2
- package/build/cjs/schemas.js.map +1 -1
- package/build/es/index.d.mts +9 -3
- package/build/es/index.mjs +70 -8
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +30 -4
- package/build/es/index.typings.mjs +62 -8
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +27 -5
- package/build/es/meta.mjs +57 -8
- package/build/es/meta.mjs.map +1 -1
- package/build/es/schemas.d.mts +17 -1
- package/build/es/schemas.mjs +17 -1
- package/build/es/schemas.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +9 -3
- package/build/internal/cjs/index.js +73 -9
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +30 -4
- package/build/internal/cjs/index.typings.js +65 -9
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +27 -5
- package/build/internal/cjs/meta.js +60 -9
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/cjs/schemas.d.ts +17 -1
- package/build/internal/cjs/schemas.js +20 -2
- package/build/internal/cjs/schemas.js.map +1 -1
- package/build/internal/es/index.d.mts +9 -3
- package/build/internal/es/index.mjs +70 -8
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +30 -4
- package/build/internal/es/index.typings.mjs +62 -8
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +27 -5
- package/build/internal/es/meta.mjs +57 -8
- package/build/internal/es/meta.mjs.map +1 -1
- package/build/internal/es/schemas.d.mts +17 -1
- package/build/internal/es/schemas.mjs +17 -1
- package/build/internal/es/schemas.mjs.map +1 -1
- package/package.json +2 -2
package/build/cjs/index.d.ts
CHANGED
|
@@ -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 } from './index.typings.js';
|
|
3
|
-
export { Address, AddressTag, AddressTagWithLiterals, AddressWrapper, Authentication, AuthenticatorConnection, CallVerifyData, CaptchaToken, CaptchaTokenTokenOneOf, ChangePasswordRequest, ChangePasswordResponse, CompleteProfileRequest, ConnectIdpRequest, Connection, ConnectionTypeOneOf, CustomField, CustomValue, CustomValueValueOneOf, DeliveryMethod, DeliveryMethodWithLiterals, Email, EmailTag, EmailTagWithLiterals, ExternalEmailVerifyData, Factor, FactorStatus, FactorStatusWithLiterals, FactorType, FactorTypeWithLiterals, GetWebauthnChallengeRequest, GetWebauthnChallengeResponse, HeadersEntry, Identity, IdentityProfile, IdpConnection, ListValue, LoginCallbackRequest, LoginIdTypeOneOf, LoginV2Request, LoginWithIdpConnectionRedirectRequest, LoginWithIdpConnectionRequest, LoginWithIdpConnectionTokenParamsRequest, LogoutRequest, MapValue, Metadata, MfaChallengeData, MfaReason, MfaReasonWithLiterals, PasswordVerifyData, PathParametersEntry, Phone, PhoneTag, PhoneTagWithLiterals, PrivacyStatus, PrivacyStatusWithLiterals, PushChallengeData, PushVerifyData, QueryParametersEntry, RawHttpRequest, Reason, ReasonWithLiterals, RecaptchaForClientSiteKey, 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';
|
|
2
|
+
import { LoginId, RegisterV2Options, StateMachineResponse, RegisterV2ApplicationErrors, RegisterV2ValidationErrors, ValidateEmailResponse, LoginV2Options, LoginV2ApplicationErrors, LoginV2ValidationErrors, SignOnOptions, SignOnResponse, LogoutOptions, RawHttpResponse } from './index.typings.js';
|
|
3
|
+
export { Address, AddressTag, AddressTagWithLiterals, AddressWrapper, Authentication, AuthenticatorConnection, CallVerifyData, CaptchaToken, CaptchaTokenTokenOneOf, ChangePasswordRequest, ChangePasswordResponse, CompleteProfileRequest, ConnectIdpRequest, Connection, ConnectionTypeOneOf, CustomField, CustomValue, CustomValueValueOneOf, DeliveryMethod, DeliveryMethodWithLiterals, Email, EmailTag, EmailTagWithLiterals, EmailValidationFailure, ExternalEmailVerifyData, Factor, FactorStatus, FactorStatusWithLiterals, FactorType, FactorTypeWithLiterals, GetWebauthnChallengeRequest, GetWebauthnChallengeResponse, HeadersEntry, Identity, IdentityProfile, IdpConnection, ListValue, LoginCallbackRequest, LoginIdTypeOneOf, LoginV2Request, LoginWithIdpConnectionRedirectRequest, LoginWithIdpConnectionRequest, LoginWithIdpConnectionTokenParamsRequest, LogoutRequest, MapValue, Metadata, MfaChallengeData, MfaReason, MfaReasonWithLiterals, PasswordVerifyData, PathParametersEntry, Phone, PhoneTag, PhoneTagWithLiterals, PrivacyStatus, PrivacyStatusWithLiterals, PushChallengeData, PushVerifyData, QueryParametersEntry, RawHttpRequest, Reason, ReasonWithLiterals, RecaptchaForClientSiteKey, RecoveryCodeVerifyData, RegisterV2Request, RequireMfaData, SecondaryEmail, SignOnRequest, SmsVerifyData, StateMachineResponseStateDataOneOf, StateType, StateTypeWithLiterals, Status, StatusName, StatusNameWithLiterals, StatusV2, StatusWithLiterals, TenantType, TenantTypeWithLiterals, TotpVerifyData, V1CustomValue, V1CustomValueValueOneOf, V1Factor, V1ListValue, V1MapValue, V1Reason, V1ReasonWithLiterals, ValidateEmailRequest, 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 {
|
|
@@ -20,6 +20,11 @@ interface RegisterV2Signature {
|
|
|
20
20
|
__validationErrorsType?: RegisterV2ValidationErrors;
|
|
21
21
|
}>;
|
|
22
22
|
}
|
|
23
|
+
declare function validateEmail$1(httpClient: HttpClient): ValidateEmailSignature;
|
|
24
|
+
interface ValidateEmailSignature {
|
|
25
|
+
/** */
|
|
26
|
+
(email: string): Promise<NonNullablePaths<ValidateEmailResponse, `valid` | `failure.reason` | `formatInvalid`, 3>>;
|
|
27
|
+
}
|
|
23
28
|
declare function loginV2$1(httpClient: HttpClient): LoginV2Signature;
|
|
24
29
|
interface LoginV2Signature {
|
|
25
30
|
/**
|
|
@@ -80,9 +85,10 @@ interface LogoutSignature {
|
|
|
80
85
|
}
|
|
81
86
|
|
|
82
87
|
declare const registerV2: MaybeContext<BuildRESTFunction<typeof registerV2$1> & typeof registerV2$1>;
|
|
88
|
+
declare const validateEmail: MaybeContext<BuildRESTFunction<typeof validateEmail$1> & typeof validateEmail$1>;
|
|
83
89
|
declare const loginV2: MaybeContext<BuildRESTFunction<typeof loginV2$1> & typeof loginV2$1>;
|
|
84
90
|
declare const changePassword: MaybeContext<BuildRESTFunction<typeof changePassword$1> & typeof changePassword$1>;
|
|
85
91
|
declare const signOn: MaybeContext<BuildRESTFunction<typeof signOn$1> & typeof signOn$1>;
|
|
86
92
|
declare const logout: MaybeContext<BuildRESTFunction<typeof logout$1> & typeof logout$1>;
|
|
87
93
|
|
|
88
|
-
export { LoginId, LoginV2ApplicationErrors, LoginV2Options, LoginV2ValidationErrors, LogoutOptions, RawHttpResponse, RegisterV2ApplicationErrors, RegisterV2Options, RegisterV2ValidationErrors, SignOnOptions, SignOnResponse, StateMachineResponse, changePassword, loginV2, logout, registerV2, signOn };
|
|
94
|
+
export { LoginId, LoginV2ApplicationErrors, LoginV2Options, LoginV2ValidationErrors, LogoutOptions, RawHttpResponse, RegisterV2ApplicationErrors, RegisterV2Options, RegisterV2ValidationErrors, SignOnOptions, SignOnResponse, StateMachineResponse, ValidateEmailResponse, changePassword, loginV2, logout, registerV2, signOn, validateEmail };
|
package/build/cjs/index.js
CHANGED
|
@@ -33,11 +33,13 @@ __export(index_exports, {
|
|
|
33
33
|
Status: () => Status,
|
|
34
34
|
StatusName: () => StatusName,
|
|
35
35
|
TenantType: () => TenantType,
|
|
36
|
+
V1Reason: () => V1Reason,
|
|
36
37
|
changePassword: () => changePassword4,
|
|
37
38
|
loginV2: () => loginV24,
|
|
38
39
|
logout: () => logout4,
|
|
39
40
|
registerV2: () => registerV24,
|
|
40
|
-
signOn: () => signOn4
|
|
41
|
+
signOn: () => signOn4,
|
|
42
|
+
validateEmail: () => validateEmail4
|
|
41
43
|
});
|
|
42
44
|
module.exports = __toCommonJS(index_exports);
|
|
43
45
|
|
|
@@ -217,6 +219,27 @@ function registerV2(payload) {
|
|
|
217
219
|
}
|
|
218
220
|
return __registerV2;
|
|
219
221
|
}
|
|
222
|
+
function validateEmail(payload) {
|
|
223
|
+
function __validateEmail({ host }) {
|
|
224
|
+
const metadata = {
|
|
225
|
+
entityFqdn: "wix.iam.authentication.v1.authentication",
|
|
226
|
+
method: "POST",
|
|
227
|
+
methodFqn: "wix.iam.authentication.v1.AuthenticationService.ValidateEmail",
|
|
228
|
+
packageName: PACKAGE_NAME,
|
|
229
|
+
migrationOptions: {
|
|
230
|
+
optInTransformResponse: true
|
|
231
|
+
},
|
|
232
|
+
url: resolveWixIamAuthenticationV1AuthenticationServiceUrl({
|
|
233
|
+
protoPath: "/v2/validate-email",
|
|
234
|
+
data: payload,
|
|
235
|
+
host
|
|
236
|
+
}),
|
|
237
|
+
data: payload
|
|
238
|
+
};
|
|
239
|
+
return metadata;
|
|
240
|
+
}
|
|
241
|
+
return __validateEmail;
|
|
242
|
+
}
|
|
220
243
|
function loginV2(payload) {
|
|
221
244
|
function __loginV2({ host }) {
|
|
222
245
|
const metadata = {
|
|
@@ -407,13 +430,13 @@ var StatusName = /* @__PURE__ */ ((StatusName2) => {
|
|
|
407
430
|
StatusName2["OFFLINE"] = "OFFLINE";
|
|
408
431
|
return StatusName2;
|
|
409
432
|
})(StatusName || {});
|
|
410
|
-
var
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
return
|
|
416
|
-
})(
|
|
433
|
+
var V1Reason = /* @__PURE__ */ ((V1Reason2) => {
|
|
434
|
+
V1Reason2["UNKNOWN_REASON"] = "UNKNOWN_REASON";
|
|
435
|
+
V1Reason2["PENDING_ADMIN_APPROVAL_REQUIRED"] = "PENDING_ADMIN_APPROVAL_REQUIRED";
|
|
436
|
+
V1Reason2["PENDING_EMAIL_VERIFICATION_REQUIRED"] = "PENDING_EMAIL_VERIFICATION_REQUIRED";
|
|
437
|
+
V1Reason2["PENDING_REQUIRED_FIELDS_MISSING"] = "PENDING_REQUIRED_FIELDS_MISSING";
|
|
438
|
+
return V1Reason2;
|
|
439
|
+
})(V1Reason || {});
|
|
417
440
|
var FactorType = /* @__PURE__ */ ((FactorType2) => {
|
|
418
441
|
FactorType2["PASSWORD"] = "PASSWORD";
|
|
419
442
|
FactorType2["SMS"] = "SMS";
|
|
@@ -444,6 +467,14 @@ var MfaReason = /* @__PURE__ */ ((MfaReason2) => {
|
|
|
444
467
|
MfaReason2["HIGH_RISK_LOGIN"] = "HIGH_RISK_LOGIN";
|
|
445
468
|
return MfaReason2;
|
|
446
469
|
})(MfaReason || {});
|
|
470
|
+
var Reason = /* @__PURE__ */ ((Reason2) => {
|
|
471
|
+
Reason2["UNKNOWN_REASON"] = "UNKNOWN_REASON";
|
|
472
|
+
Reason2["EMAIL_ADDRESS_BOUNCED"] = "EMAIL_ADDRESS_BOUNCED";
|
|
473
|
+
Reason2["EMAIL_DOMAIN_MISSING_DNS_RECORDS"] = "EMAIL_DOMAIN_MISSING_DNS_RECORDS";
|
|
474
|
+
Reason2["EMAIL_DOMAIN_FORMAT_INVALID"] = "EMAIL_DOMAIN_FORMAT_INVALID";
|
|
475
|
+
Reason2["EMAIL_DOMAIN_PERMANENTLY_BLACKLISTED"] = "EMAIL_DOMAIN_PERMANENTLY_BLACKLISTED";
|
|
476
|
+
return Reason2;
|
|
477
|
+
})(Reason || {});
|
|
447
478
|
var TenantType = /* @__PURE__ */ ((TenantType2) => {
|
|
448
479
|
TenantType2["UNKNOWN_TENANT_TYPE"] = "UNKNOWN_TENANT_TYPE";
|
|
449
480
|
TenantType2["ACCOUNT"] = "ACCOUNT";
|
|
@@ -506,6 +537,29 @@ async function registerV22(loginId, options) {
|
|
|
506
537
|
throw transformedError;
|
|
507
538
|
}
|
|
508
539
|
}
|
|
540
|
+
async function validateEmail2(email) {
|
|
541
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
542
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({ email });
|
|
543
|
+
const reqOpts = validateEmail(payload);
|
|
544
|
+
sideEffects?.onSiteCall?.();
|
|
545
|
+
try {
|
|
546
|
+
const result = await httpClient.request(reqOpts);
|
|
547
|
+
sideEffects?.onSuccess?.(result);
|
|
548
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
549
|
+
} catch (err) {
|
|
550
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
551
|
+
err,
|
|
552
|
+
{
|
|
553
|
+
spreadPathsToArguments: {},
|
|
554
|
+
explicitPathsToArguments: { email: "$[0]" },
|
|
555
|
+
singleArgumentUnchanged: false
|
|
556
|
+
},
|
|
557
|
+
["email"]
|
|
558
|
+
);
|
|
559
|
+
sideEffects?.onError?.(err);
|
|
560
|
+
throw transformedError;
|
|
561
|
+
}
|
|
562
|
+
}
|
|
509
563
|
async function loginV22(loginId, options) {
|
|
510
564
|
const { httpClient, sideEffects } = arguments[2];
|
|
511
565
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
@@ -659,6 +713,13 @@ function registerV23(httpClient) {
|
|
|
659
713
|
{ httpClient }
|
|
660
714
|
);
|
|
661
715
|
}
|
|
716
|
+
function validateEmail3(httpClient) {
|
|
717
|
+
return (email) => validateEmail2(
|
|
718
|
+
email,
|
|
719
|
+
// @ts-ignore
|
|
720
|
+
{ httpClient }
|
|
721
|
+
);
|
|
722
|
+
}
|
|
662
723
|
function loginV23(httpClient) {
|
|
663
724
|
return (loginId, options) => loginV22(
|
|
664
725
|
loginId,
|
|
@@ -693,6 +754,7 @@ function logout3(httpClient) {
|
|
|
693
754
|
// src/iam-authentication-v1-authentication-authentication.context.ts
|
|
694
755
|
var import_rest_modules3 = require("@wix/sdk-runtime/rest-modules");
|
|
695
756
|
var registerV24 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(registerV23);
|
|
757
|
+
var validateEmail4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(validateEmail3);
|
|
696
758
|
var loginV24 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(loginV23);
|
|
697
759
|
var changePassword4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(changePassword3);
|
|
698
760
|
var signOn4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(signOn3);
|
|
@@ -712,10 +774,12 @@ var logout4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(logout3
|
|
|
712
774
|
Status,
|
|
713
775
|
StatusName,
|
|
714
776
|
TenantType,
|
|
777
|
+
V1Reason,
|
|
715
778
|
changePassword,
|
|
716
779
|
loginV2,
|
|
717
780
|
logout,
|
|
718
781
|
registerV2,
|
|
719
|
-
signOn
|
|
782
|
+
signOn,
|
|
783
|
+
validateEmail
|
|
720
784
|
});
|
|
721
785
|
//# sourceMappingURL=index.js.map
|