@wix/auto_sdk_identity_authentication 1.0.16 → 1.0.17
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 +2 -8
- package/build/cjs/index.js +6 -63
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +1 -12
- package/build/cjs/index.typings.js +6 -55
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +2 -9
- package/build/cjs/meta.js +6 -44
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +2 -8
- package/build/es/index.mjs +6 -62
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +1 -12
- package/build/es/index.typings.mjs +6 -54
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +2 -9
- package/build/es/meta.mjs +6 -43
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +2 -8
- package/build/internal/cjs/index.js +6 -63
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +1 -12
- package/build/internal/cjs/index.typings.js +6 -55
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +2 -9
- package/build/internal/cjs/meta.js +6 -44
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +2 -8
- package/build/internal/es/index.mjs +6 -62
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +1 -12
- package/build/internal/es/index.typings.mjs +6 -54
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +2 -9
- package/build/internal/es/meta.mjs +6 -43
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
package/build/cjs/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HttpClient, NonNullablePaths, MaybeContext, BuildRESTFunction } from '@wix/sdk-types';
|
|
2
|
-
import { LoginId, RegisterV2Options, StateMachineResponse, RegisterV2ApplicationErrors, RegisterV2ValidationErrors, LoginV2Options, LoginV2ApplicationErrors, LoginV2ValidationErrors,
|
|
2
|
+
import { LoginId, RegisterV2Options, StateMachineResponse, RegisterV2ApplicationErrors, RegisterV2ValidationErrors, LoginV2Options, LoginV2ApplicationErrors, LoginV2ValidationErrors, SignOnOptions, SignOnResponse, LogoutOptions, RawHttpResponse, FactorTypeWithLiterals, VerifyOptions } from './index.typings.js';
|
|
3
3
|
export { Address, AddressTag, AddressWrapper, Authentication, AuthenticationExtensionInputs, AuthenticationExtensionInputsLargeBlobOperationOneOf, AuthenticatorConnection, CallVerifyData, CaptchaToken, CaptchaTokenTokenOneOf, ChangePasswordRequest, ChangePasswordResponse, Connection, ConnectionTypeOneOf, CustomField, CustomValue, CustomValueValueOneOf, Email, EmailTag, ExternalEmailVerifyData, Factor, FactorStatus, FactorType, HeadersEntry, Identity, IdentityProfile, IdpConnection, ListValue, LoginCallbackRequest, LoginIdTypeOneOf, LoginV2Request, LoginWithIdpConnectionRequest, LoginWithIdpConnectionTokenParamsRequest, LogoutRequest, MapValue, Metadata, MfaChallengeData, MfaReason, PathParametersEntry, Phone, PhoneTag, PrivacyStatus, PublicKeyCredentialDescriptor, PushChallengeData, PushVerifyData, QueryParametersEntry, RawHttpRequest, Reason, RegisterV2Request, RequireMfaData, SecondaryEmail, SignOnRequest, SmsVerifyData, StateMachineResponseStateDataOneOf, StateType, Status, StatusName, StatusV2, TenantType, TotpVerifyData, UserVerificationRequirement, V1CustomValue, V1CustomValueValueOneOf, V1Factor, V1ListValue, V1MapValue, VerificationChallenge, VerificationChallengeFactorChallengeDataOneOf, VerifyOptionsFactorDataOneOf, VerifyRequest, VerifyRequestFactorDataOneOf, WebAuthnChallengeData, WebAuthnVerifyData } from './index.typings.js';
|
|
4
4
|
|
|
5
5
|
declare function registerV2$1(httpClient: HttpClient): RegisterV2Signature;
|
|
@@ -43,11 +43,6 @@ interface ChangePasswordSignature {
|
|
|
43
43
|
*/
|
|
44
44
|
(newPassword: string): Promise<void>;
|
|
45
45
|
}
|
|
46
|
-
declare function loginCallback$1(httpClient: HttpClient): LoginCallbackSignature;
|
|
47
|
-
interface LoginCallbackSignature {
|
|
48
|
-
/** */
|
|
49
|
-
(options?: LoginCallbackOptions): Promise<NonNullablePaths<RawHttpResponse, `body` | `headers` | `headers.${number}.key` | `headers.${number}.value`>>;
|
|
50
|
-
}
|
|
51
46
|
declare function signOn$1(httpClient: HttpClient): SignOnSignature;
|
|
52
47
|
interface SignOnSignature {
|
|
53
48
|
/** @param - the identifier of the identity */
|
|
@@ -69,9 +64,8 @@ interface VerifySignature {
|
|
|
69
64
|
declare const registerV2: MaybeContext<BuildRESTFunction<typeof registerV2$1> & typeof registerV2$1>;
|
|
70
65
|
declare const loginV2: MaybeContext<BuildRESTFunction<typeof loginV2$1> & typeof loginV2$1>;
|
|
71
66
|
declare const changePassword: MaybeContext<BuildRESTFunction<typeof changePassword$1> & typeof changePassword$1>;
|
|
72
|
-
declare const loginCallback: MaybeContext<BuildRESTFunction<typeof loginCallback$1> & typeof loginCallback$1>;
|
|
73
67
|
declare const signOn: MaybeContext<BuildRESTFunction<typeof signOn$1> & typeof signOn$1>;
|
|
74
68
|
declare const logout: MaybeContext<BuildRESTFunction<typeof logout$1> & typeof logout$1>;
|
|
75
69
|
declare const verify: MaybeContext<BuildRESTFunction<typeof verify$1> & typeof verify$1>;
|
|
76
70
|
|
|
77
|
-
export {
|
|
71
|
+
export { LoginId, LoginV2Options, LogoutOptions, RawHttpResponse, RegisterV2Options, SignOnOptions, SignOnResponse, StateMachineResponse, VerifyOptions, changePassword, loginV2, logout, registerV2, signOn, verify };
|
package/build/cjs/index.js
CHANGED
|
@@ -34,7 +34,6 @@ __export(index_exports, {
|
|
|
34
34
|
TenantType: () => TenantType,
|
|
35
35
|
UserVerificationRequirement: () => UserVerificationRequirement,
|
|
36
36
|
changePassword: () => changePassword4,
|
|
37
|
-
loginCallback: () => loginCallback4,
|
|
38
37
|
loginV2: () => loginV24,
|
|
39
38
|
logout: () => logout4,
|
|
40
39
|
registerV2: () => registerV24,
|
|
@@ -119,6 +118,12 @@ function resolveWixIamAuthenticationV1AuthenticationServiceUrl(opts) {
|
|
|
119
118
|
srcPath: "/_api/iam/authentication",
|
|
120
119
|
destPath: ""
|
|
121
120
|
}
|
|
121
|
+
],
|
|
122
|
+
"*.dev.wix-code.com": [
|
|
123
|
+
{
|
|
124
|
+
srcPath: "/iam/authentication/v2/sign-on",
|
|
125
|
+
destPath: "/v2/sign-on"
|
|
126
|
+
}
|
|
122
127
|
]
|
|
123
128
|
};
|
|
124
129
|
return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
@@ -252,30 +257,6 @@ function changePassword(payload) {
|
|
|
252
257
|
}
|
|
253
258
|
return __changePassword;
|
|
254
259
|
}
|
|
255
|
-
function loginCallback(payload) {
|
|
256
|
-
function __loginCallback({ host }) {
|
|
257
|
-
const metadata = {
|
|
258
|
-
entityFqdn: "wix.iam.authentication.v1.authentication",
|
|
259
|
-
method: "GET",
|
|
260
|
-
methodFqn: "wix.iam.authentication.v1.AuthenticationService.LoginCallback",
|
|
261
|
-
packageName: PACKAGE_NAME,
|
|
262
|
-
url: resolveWixIamAuthenticationV1AuthenticationServiceUrl({
|
|
263
|
-
protoPath: "/v1/callback",
|
|
264
|
-
data: payload,
|
|
265
|
-
host
|
|
266
|
-
}),
|
|
267
|
-
params: (0, import_rest_modules.toURLSearchParams)(payload),
|
|
268
|
-
transformResponse: (payload2) => (0, import_transform_paths.transformPaths)(payload2, [
|
|
269
|
-
{
|
|
270
|
-
transformFn: import_bytes.transformRESTBytesToSDKBytes,
|
|
271
|
-
paths: [{ path: "body" }]
|
|
272
|
-
}
|
|
273
|
-
])
|
|
274
|
-
};
|
|
275
|
-
return metadata;
|
|
276
|
-
}
|
|
277
|
-
return __loginCallback;
|
|
278
|
-
}
|
|
279
260
|
function signOn(payload) {
|
|
280
261
|
function __signOn({ host }) {
|
|
281
262
|
const serializedData = (0, import_transform_paths.transformPaths)(payload, [
|
|
@@ -612,35 +593,6 @@ async function changePassword2(newPassword) {
|
|
|
612
593
|
throw transformedError;
|
|
613
594
|
}
|
|
614
595
|
}
|
|
615
|
-
async function loginCallback2(options) {
|
|
616
|
-
const { httpClient, sideEffects } = arguments[1];
|
|
617
|
-
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
618
|
-
state: options?.state,
|
|
619
|
-
sessionToken: options?.sessionToken
|
|
620
|
-
});
|
|
621
|
-
const reqOpts = loginCallback(payload);
|
|
622
|
-
sideEffects?.onSiteCall?.();
|
|
623
|
-
try {
|
|
624
|
-
const result = await httpClient.request(reqOpts);
|
|
625
|
-
sideEffects?.onSuccess?.(result);
|
|
626
|
-
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(result.data);
|
|
627
|
-
} catch (err) {
|
|
628
|
-
const transformedError = (0, import_transform_error.transformError)(
|
|
629
|
-
err,
|
|
630
|
-
{
|
|
631
|
-
spreadPathsToArguments: {},
|
|
632
|
-
explicitPathsToArguments: {
|
|
633
|
-
state: "$[0].state",
|
|
634
|
-
sessionToken: "$[0].sessionToken"
|
|
635
|
-
},
|
|
636
|
-
singleArgumentUnchanged: false
|
|
637
|
-
},
|
|
638
|
-
["options"]
|
|
639
|
-
);
|
|
640
|
-
sideEffects?.onError?.(err);
|
|
641
|
-
throw transformedError;
|
|
642
|
-
}
|
|
643
|
-
}
|
|
644
596
|
async function signOn2(loginId, options) {
|
|
645
597
|
const { httpClient, sideEffects } = arguments[2];
|
|
646
598
|
const payload = (0, import_transform_paths2.transformPaths)(
|
|
@@ -793,13 +745,6 @@ function changePassword3(httpClient) {
|
|
|
793
745
|
{ httpClient }
|
|
794
746
|
);
|
|
795
747
|
}
|
|
796
|
-
function loginCallback3(httpClient) {
|
|
797
|
-
return (options) => loginCallback2(
|
|
798
|
-
options,
|
|
799
|
-
// @ts-ignore
|
|
800
|
-
{ httpClient }
|
|
801
|
-
);
|
|
802
|
-
}
|
|
803
748
|
function signOn3(httpClient) {
|
|
804
749
|
return (loginId, options) => signOn2(
|
|
805
750
|
loginId,
|
|
@@ -829,7 +774,6 @@ var import_rest_modules3 = require("@wix/sdk-runtime/rest-modules");
|
|
|
829
774
|
var registerV24 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(registerV23);
|
|
830
775
|
var loginV24 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(loginV23);
|
|
831
776
|
var changePassword4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(changePassword3);
|
|
832
|
-
var loginCallback4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(loginCallback3);
|
|
833
777
|
var signOn4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(signOn3);
|
|
834
778
|
var logout4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(logout3);
|
|
835
779
|
var verify4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(verify3);
|
|
@@ -849,7 +793,6 @@ var verify4 = /* @__PURE__ */ (0, import_rest_modules3.createRESTModule)(verify3
|
|
|
849
793
|
TenantType,
|
|
850
794
|
UserVerificationRequirement,
|
|
851
795
|
changePassword,
|
|
852
|
-
loginCallback,
|
|
853
796
|
loginV2,
|
|
854
797
|
logout,
|
|
855
798
|
registerV2,
|