@wix/auto_sdk_identity_authentication 1.0.55 → 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 +56 -2
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +7 -2
- package/build/cjs/index.typings.js +48 -2
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +4 -3
- package/build/cjs/meta.js +43 -2
- 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 +54 -1
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +7 -2
- package/build/es/index.typings.mjs +46 -1
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +4 -3
- package/build/es/meta.mjs +41 -1
- 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 +56 -2
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +7 -2
- package/build/internal/cjs/index.typings.js +48 -2
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +4 -3
- package/build/internal/cjs/meta.js +43 -2
- 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 +54 -1
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +7 -2
- package/build/internal/es/index.typings.mjs +46 -1
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +4 -3
- package/build/internal/es/meta.mjs +41 -1
- 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, 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,
|
|
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
|
@@ -38,7 +38,8 @@ __export(index_exports, {
|
|
|
38
38
|
loginV2: () => loginV24,
|
|
39
39
|
logout: () => logout4,
|
|
40
40
|
registerV2: () => registerV24,
|
|
41
|
-
signOn: () => signOn4
|
|
41
|
+
signOn: () => signOn4,
|
|
42
|
+
validateEmail: () => validateEmail4
|
|
42
43
|
});
|
|
43
44
|
module.exports = __toCommonJS(index_exports);
|
|
44
45
|
|
|
@@ -218,6 +219,27 @@ function registerV2(payload) {
|
|
|
218
219
|
}
|
|
219
220
|
return __registerV2;
|
|
220
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
|
+
}
|
|
221
243
|
function loginV2(payload) {
|
|
222
244
|
function __loginV2({ host }) {
|
|
223
245
|
const metadata = {
|
|
@@ -515,6 +537,29 @@ async function registerV22(loginId, options) {
|
|
|
515
537
|
throw transformedError;
|
|
516
538
|
}
|
|
517
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
|
+
}
|
|
518
563
|
async function loginV22(loginId, options) {
|
|
519
564
|
const { httpClient, sideEffects } = arguments[2];
|
|
520
565
|
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
@@ -668,6 +713,13 @@ function registerV23(httpClient) {
|
|
|
668
713
|
{ httpClient }
|
|
669
714
|
);
|
|
670
715
|
}
|
|
716
|
+
function validateEmail3(httpClient) {
|
|
717
|
+
return (email) => validateEmail2(
|
|
718
|
+
email,
|
|
719
|
+
// @ts-ignore
|
|
720
|
+
{ httpClient }
|
|
721
|
+
);
|
|
722
|
+
}
|
|
671
723
|
function loginV23(httpClient) {
|
|
672
724
|
return (loginId, options) => loginV22(
|
|
673
725
|
loginId,
|
|
@@ -702,6 +754,7 @@ function logout3(httpClient) {
|
|
|
702
754
|
// src/iam-authentication-v1-authentication-authentication.context.ts
|
|
703
755
|
var import_rest_modules3 = require("@wix/sdk-runtime/rest-modules");
|
|
704
756
|
var registerV24 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(registerV23);
|
|
757
|
+
var validateEmail4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(validateEmail3);
|
|
705
758
|
var loginV24 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(loginV23);
|
|
706
759
|
var changePassword4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(changePassword3);
|
|
707
760
|
var signOn4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(signOn3);
|
|
@@ -726,6 +779,7 @@ var logout4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(logout3
|
|
|
726
779
|
loginV2,
|
|
727
780
|
logout,
|
|
728
781
|
registerV2,
|
|
729
|
-
signOn
|
|
782
|
+
signOn,
|
|
783
|
+
validateEmail
|
|
730
784
|
});
|
|
731
785
|
//# sourceMappingURL=index.js.map
|