@wix/identity 1.0.22 → 1.0.24
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/src/iam-authentication-v1-authentication.http.d.ts +3 -1
- package/build/cjs/src/iam-authentication-v1-authentication.http.js +78 -1
- package/build/cjs/src/iam-authentication-v1-authentication.http.js.map +1 -1
- package/build/cjs/src/iam-authentication-v1-authentication.public.d.ts +8 -3
- package/build/cjs/src/iam-authentication-v1-authentication.public.js +17 -1
- package/build/cjs/src/iam-authentication-v1-authentication.public.js.map +1 -1
- package/build/cjs/src/iam-authentication-v1-authentication.types.d.ts +53 -0
- package/build/cjs/src/iam-authentication-v1-authentication.types.js +23 -1
- package/build/cjs/src/iam-authentication-v1-authentication.types.js.map +1 -1
- package/build/cjs/src/iam-authentication-v1-authentication.universal.d.ts +72 -0
- package/build/cjs/src/iam-authentication-v1-authentication.universal.js +153 -1
- package/build/cjs/src/iam-authentication-v1-authentication.universal.js.map +1 -1
- package/build/cjs/src/identity-oauth-v1-refresh-token.http.js +10 -0
- package/build/cjs/src/identity-oauth-v1-refresh-token.http.js.map +1 -1
- package/build/cjs/src/identity-oauth-v1-refresh-token.public.d.ts +3 -0
- package/build/cjs/src/identity-oauth-v1-refresh-token.public.js +2 -1
- package/build/cjs/src/identity-oauth-v1-refresh-token.public.js.map +1 -1
- package/build/cjs/src/identity-oauth-v1-refresh-token.universal.d.ts +1 -1
- package/build/es/src/iam-authentication-v1-authentication.http.d.ts +3 -1
- package/build/es/src/iam-authentication-v1-authentication.http.js +75 -0
- package/build/es/src/iam-authentication-v1-authentication.http.js.map +1 -1
- package/build/es/src/iam-authentication-v1-authentication.public.d.ts +8 -3
- package/build/es/src/iam-authentication-v1-authentication.public.js +13 -2
- package/build/es/src/iam-authentication-v1-authentication.public.js.map +1 -1
- package/build/es/src/iam-authentication-v1-authentication.types.d.ts +53 -0
- package/build/es/src/iam-authentication-v1-authentication.types.js +22 -0
- package/build/es/src/iam-authentication-v1-authentication.types.js.map +1 -1
- package/build/es/src/iam-authentication-v1-authentication.universal.d.ts +72 -0
- package/build/es/src/iam-authentication-v1-authentication.universal.js +150 -0
- package/build/es/src/iam-authentication-v1-authentication.universal.js.map +1 -1
- package/build/es/src/identity-oauth-v1-refresh-token.http.js +10 -0
- package/build/es/src/identity-oauth-v1-refresh-token.http.js.map +1 -1
- package/build/es/src/identity-oauth-v1-refresh-token.public.d.ts +3 -0
- package/build/es/src/identity-oauth-v1-refresh-token.public.js +1 -0
- package/build/es/src/identity-oauth-v1-refresh-token.public.js.map +1 -1
- package/build/es/src/identity-oauth-v1-refresh-token.universal.d.ts +1 -1
- package/package.json +2 -2
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { RequestOptionsFactory } from '@wix/sdk-types';
|
|
2
|
-
import { RawHttpResponse, LoginRequest, LoginResponse, ProceedToNextStateRequest, RegisterRequest, LogoutRequest } from './iam-authentication-v1-authentication.types';
|
|
2
|
+
import { RawHttpResponse, LoginRequest, LoginResponse, ProceedToNextStateRequest, RegisterRequest, LogoutRequest, LoginV2Request, RegisterV2Request, StateMachineResponse } from './iam-authentication-v1-authentication.types';
|
|
3
3
|
export declare function register(payload: RegisterRequest): RequestOptionsFactory<LoginResponse>;
|
|
4
4
|
export declare function login(payload: LoginRequest): RequestOptionsFactory<LoginResponse>;
|
|
5
|
+
export declare function registerV2(payload: RegisterV2Request): RequestOptionsFactory<StateMachineResponse>;
|
|
6
|
+
export declare function loginV2(payload: LoginV2Request): RequestOptionsFactory<StateMachineResponse>;
|
|
5
7
|
export declare function proceedToNextState(payload: ProceedToNextStateRequest): RequestOptionsFactory<LoginResponse>;
|
|
6
8
|
/** called for logged in member/ user to cleanup its auth session */
|
|
7
9
|
export declare function logout(payload: LogoutRequest): RequestOptionsFactory<RawHttpResponse>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.logout = exports.proceedToNextState = exports.login = exports.register = void 0;
|
|
3
|
+
exports.logout = exports.proceedToNextState = exports.loginV2 = exports.registerV2 = exports.login = exports.register = void 0;
|
|
4
4
|
const metro_runtime_1 = require("@wix/metro-runtime");
|
|
5
5
|
const ambassador_1 = require("@wix/metro-runtime/ambassador");
|
|
6
6
|
const metro_runtime_2 = require("@wix/metro-runtime");
|
|
@@ -23,11 +23,14 @@ const _loginResponse = {
|
|
|
23
23
|
identity: '_identity',
|
|
24
24
|
additionalData: 'Map#_customValue',
|
|
25
25
|
};
|
|
26
|
+
const _loginV2Request = {};
|
|
26
27
|
const _logoutRequest = {};
|
|
27
28
|
const _mapValue = { value: 'Map#_customValue' };
|
|
28
29
|
const _proceedToNextStateRequest = {};
|
|
29
30
|
const _rawHttpResponse = { body: 'BYTES' };
|
|
30
31
|
const _registerRequest = { identity: '_identity' };
|
|
32
|
+
const _registerV2Request = { profile: '_identityProfile' };
|
|
33
|
+
const _stateMachineResponse = { identity: '_identity' };
|
|
31
34
|
function resolveWixIamAuthenticationV1AuthenticationServiceUrl(opts) {
|
|
32
35
|
const domainToMappings = {
|
|
33
36
|
_: [
|
|
@@ -81,7 +84,9 @@ function register(payload) {
|
|
|
81
84
|
function __register({ host }) {
|
|
82
85
|
const serializedData = toReq(payload);
|
|
83
86
|
const metadata = {
|
|
87
|
+
entityFqdn: 'wix.iam.authentication.v1.authentication',
|
|
84
88
|
method: 'POST',
|
|
89
|
+
methodFqn: 'wix.iam.authentication.v1.AuthenticationService.Register',
|
|
85
90
|
url: resolveWixIamAuthenticationV1AuthenticationServiceUrl({
|
|
86
91
|
protoPath: '/v1/register',
|
|
87
92
|
data: serializedData,
|
|
@@ -109,7 +114,9 @@ function login(payload) {
|
|
|
109
114
|
function __login({ host }) {
|
|
110
115
|
const serializedData = toReq(payload);
|
|
111
116
|
const metadata = {
|
|
117
|
+
entityFqdn: 'wix.iam.authentication.v1.authentication',
|
|
112
118
|
method: 'POST',
|
|
119
|
+
methodFqn: 'wix.iam.authentication.v1.AuthenticationService.Login',
|
|
113
120
|
url: resolveWixIamAuthenticationV1AuthenticationServiceUrl({
|
|
114
121
|
protoPath: '/v1/login',
|
|
115
122
|
data: serializedData,
|
|
@@ -124,6 +131,72 @@ function login(payload) {
|
|
|
124
131
|
return __login;
|
|
125
132
|
}
|
|
126
133
|
exports.login = login;
|
|
134
|
+
function registerV2(payload) {
|
|
135
|
+
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_registerV2Request, {
|
|
136
|
+
_customField,
|
|
137
|
+
_customValue,
|
|
138
|
+
_identityProfile,
|
|
139
|
+
_listValue,
|
|
140
|
+
_mapValue,
|
|
141
|
+
});
|
|
142
|
+
const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_stateMachineResponse, {
|
|
143
|
+
_customField,
|
|
144
|
+
_customValue,
|
|
145
|
+
_identity,
|
|
146
|
+
_identityProfile,
|
|
147
|
+
_listValue,
|
|
148
|
+
_mapValue,
|
|
149
|
+
});
|
|
150
|
+
function __registerV2({ host }) {
|
|
151
|
+
const serializedData = toReq(payload);
|
|
152
|
+
const metadata = {
|
|
153
|
+
entityFqdn: 'wix.iam.authentication.v1.authentication',
|
|
154
|
+
method: 'POST',
|
|
155
|
+
methodFqn: 'wix.iam.authentication.v1.AuthenticationService.RegisterV2',
|
|
156
|
+
url: resolveWixIamAuthenticationV1AuthenticationServiceUrl({
|
|
157
|
+
protoPath: '/v2/register',
|
|
158
|
+
data: serializedData,
|
|
159
|
+
host,
|
|
160
|
+
}),
|
|
161
|
+
data: serializedData,
|
|
162
|
+
transformResponse: fromRes,
|
|
163
|
+
};
|
|
164
|
+
return metadata;
|
|
165
|
+
}
|
|
166
|
+
__registerV2.fromReq = fromReq;
|
|
167
|
+
return __registerV2;
|
|
168
|
+
}
|
|
169
|
+
exports.registerV2 = registerV2;
|
|
170
|
+
function loginV2(payload) {
|
|
171
|
+
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_loginV2Request, {});
|
|
172
|
+
const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_stateMachineResponse, {
|
|
173
|
+
_customField,
|
|
174
|
+
_customValue,
|
|
175
|
+
_identity,
|
|
176
|
+
_identityProfile,
|
|
177
|
+
_listValue,
|
|
178
|
+
_mapValue,
|
|
179
|
+
});
|
|
180
|
+
function __loginV2({ host }) {
|
|
181
|
+
const serializedData = toReq(payload);
|
|
182
|
+
const metadata = {
|
|
183
|
+
entityFqdn: 'wix.iam.authentication.v1.authentication',
|
|
184
|
+
method: 'POST',
|
|
185
|
+
methodFqn: 'wix.iam.authentication.v1.AuthenticationService.LoginV2',
|
|
186
|
+
url: resolveWixIamAuthenticationV1AuthenticationServiceUrl({
|
|
187
|
+
protoPath: '/v2/login',
|
|
188
|
+
data: serializedData,
|
|
189
|
+
host,
|
|
190
|
+
}),
|
|
191
|
+
data: serializedData,
|
|
192
|
+
transformResponse: fromRes,
|
|
193
|
+
};
|
|
194
|
+
return metadata;
|
|
195
|
+
}
|
|
196
|
+
__loginV2.fromReq = fromReq;
|
|
197
|
+
return __loginV2;
|
|
198
|
+
}
|
|
199
|
+
exports.loginV2 = loginV2;
|
|
127
200
|
function proceedToNextState(payload) {
|
|
128
201
|
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_proceedToNextStateRequest, {});
|
|
129
202
|
const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_loginResponse, {
|
|
@@ -137,7 +210,9 @@ function proceedToNextState(payload) {
|
|
|
137
210
|
function __proceedToNextState({ host }) {
|
|
138
211
|
const serializedData = toReq(payload);
|
|
139
212
|
const metadata = {
|
|
213
|
+
entityFqdn: 'wix.iam.authentication.v1.authentication',
|
|
140
214
|
method: 'POST',
|
|
215
|
+
methodFqn: 'wix.iam.authentication.v1.AuthenticationService.ProceedToNextState',
|
|
141
216
|
url: resolveWixIamAuthenticationV1AuthenticationServiceUrl({
|
|
142
217
|
protoPath: '/v1/state/proceed',
|
|
143
218
|
data: serializedData,
|
|
@@ -159,7 +234,9 @@ function logout(payload) {
|
|
|
159
234
|
function __logout({ host }) {
|
|
160
235
|
const serializedData = toReq(payload);
|
|
161
236
|
const metadata = {
|
|
237
|
+
entityFqdn: 'wix.iam.authentication.v1.authentication',
|
|
162
238
|
method: 'GET',
|
|
239
|
+
methodFqn: 'wix.iam.authentication.v1.AuthenticationService.Logout',
|
|
163
240
|
url: resolveWixIamAuthenticationV1AuthenticationServiceUrl({
|
|
164
241
|
protoPath: '/v1/logout',
|
|
165
242
|
data: serializedData,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"iam-authentication-v1-authentication.http.js","sourceRoot":"","sources":["../../../src/iam-authentication-v1-authentication.http.ts"],"names":[],"mappings":";;;AAAA,sDAAuD;AACvD,8DAA2D;AAC3D,sDAAgD;
|
|
1
|
+
{"version":3,"file":"iam-authentication-v1-authentication.http.js","sourceRoot":"","sources":["../../../src/iam-authentication-v1-authentication.http.ts"],"names":[],"mappings":";;;AAAA,sDAAuD;AACvD,8DAA2D;AAC3D,sDAAgD;AAehD,MAAM,YAAY,GAAG,EAAE,KAAK,EAAE,cAAc,EAAE,CAAC;AAC/C,MAAM,YAAY,GAAG;IACnB,QAAQ,EAAE,QAAQ;IAClB,SAAS,EAAE,2BAA2B;IACtC,SAAS,EAAE,YAAY;IACvB,QAAQ,EAAE,WAAW;CACtB,CAAC;AACF,MAAM,SAAS,GAAG;IAChB,WAAW,EAAE,2BAA2B;IACxC,WAAW,EAAE,2BAA2B;IACxC,eAAe,EAAE,kBAAkB;CACpC,CAAC;AACF,MAAM,gBAAgB,GAAG,EAAE,YAAY,EAAE,cAAc,EAAE,CAAC;AAC1D,MAAM,UAAU,GAAG,EAAE,KAAK,EAAE,cAAc,EAAE,CAAC;AAC7C,MAAM,aAAa,GAAG,EAAE,CAAC;AACzB,MAAM,cAAc,GAAG;IACrB,QAAQ,EAAE,WAAW;IACrB,cAAc,EAAE,kBAAkB;CACnC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
1
1
|
import { HttpClient } from '@wix/sdk-types';
|
|
2
|
-
import { Identity, Identifier, LoginOptions, LogoutOptions, ProceedToNextStateOptions, RegisterOptions } from './iam-authentication-v1-authentication.universal';
|
|
2
|
+
import { Identity, Identifier, LoginId, LoginOptions, LoginV2Options, LogoutOptions, ProceedToNextStateOptions, RegisterOptions, RegisterV2Options } from './iam-authentication-v1-authentication.universal';
|
|
3
|
+
export declare const __metadata: {
|
|
4
|
+
PACKAGE_NAME: string;
|
|
5
|
+
};
|
|
3
6
|
export declare function register(httpClient: HttpClient): (identity: Identity, options?: RegisterOptions | undefined) => Promise<import("./iam-authentication-v1-authentication.universal").LoginResponse>;
|
|
4
7
|
export declare function login(httpClient: HttpClient): (identifier: Identifier, options?: LoginOptions | undefined) => Promise<import("./iam-authentication-v1-authentication.universal").LoginResponse>;
|
|
8
|
+
export declare function registerV2(httpClient: HttpClient): (loginId: LoginId, options?: RegisterV2Options | undefined) => Promise<import("./iam-authentication-v1-authentication.universal").StateMachineResponse>;
|
|
9
|
+
export declare function loginV2(httpClient: HttpClient): (loginId: LoginId, options?: LoginV2Options | undefined) => Promise<import("./iam-authentication-v1-authentication.universal").StateMachineResponse>;
|
|
5
10
|
export declare function proceedToNextState(httpClient: HttpClient): (options?: ProceedToNextStateOptions | undefined) => Promise<import("./iam-authentication-v1-authentication.universal").LoginResponse>;
|
|
6
11
|
export declare function logout(httpClient: HttpClient): (options?: LogoutOptions | undefined) => Promise<import("./iam-authentication-v1-authentication.universal").RawHttpResponse>;
|
|
7
|
-
export { Status, PrivacyStatus, StateStatus, TenantType, } from './iam-authentication-v1-authentication.universal';
|
|
8
|
-
export { Authentication, RegisterRequest, Identity, Identifier, IdentifierValueOneOf, Connection, ConnectionTypeOneOf, IdpConnection, AuthenticatorConnection, IdentityProfile, CustomField, CustomValue, CustomValueValueOneOf, ListValue, MapValue, Metadata, CaptchaToken, CaptchaTokenTokenOneOf, LoginResponse, State, LoginRequest, SuccessfulLoginEvent, LoginWithIdpConnectionRequest, RawHttpResponse, HeadersEntry, RawHttpRequest, PathParametersEntry, QueryParametersEntry, ProceedToNextStateRequest, LogoutRequest, RegisterOptions, LoginOptions, ProceedToNextStateOptions, LogoutOptions, } from './iam-authentication-v1-authentication.universal';
|
|
12
|
+
export { Status, PrivacyStatus, StatusName, Reason, StateStatus, StateType, TenantType, } from './iam-authentication-v1-authentication.universal';
|
|
13
|
+
export { Authentication, RegisterRequest, Identity, Identifier, IdentifierValueOneOf, Connection, ConnectionTypeOneOf, IdpConnection, AuthenticatorConnection, IdentityProfile, CustomField, CustomValue, CustomValueValueOneOf, ListValue, MapValue, Metadata, Email, StatusV2, CaptchaToken, CaptchaTokenTokenOneOf, LoginResponse, State, LoginRequest, SuccessfulLoginEvent, RegisterV2Request, LoginId, LoginIdTypeOneOf, StateMachineResponse, LoginV2Request, LoginWithIdpConnectionRequest, RawHttpResponse, HeadersEntry, RawHttpRequest, PathParametersEntry, QueryParametersEntry, ProceedToNextStateRequest, LogoutRequest, RegisterOptions, LoginOptions, RegisterV2Options, LoginV2Options, ProceedToNextStateOptions, LogoutOptions, } from './iam-authentication-v1-authentication.universal';
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TenantType = exports.StateStatus = exports.PrivacyStatus = exports.Status = exports.logout = exports.proceedToNextState = exports.login = exports.register = void 0;
|
|
3
|
+
exports.TenantType = exports.StateType = exports.StateStatus = exports.Reason = exports.StatusName = exports.PrivacyStatus = exports.Status = exports.logout = exports.proceedToNextState = exports.loginV2 = exports.registerV2 = exports.login = exports.register = exports.__metadata = void 0;
|
|
4
4
|
const iam_authentication_v1_authentication_universal_1 = require("./iam-authentication-v1-authentication.universal");
|
|
5
|
+
exports.__metadata = { PACKAGE_NAME: '@wix/identity' };
|
|
5
6
|
function register(httpClient) {
|
|
6
7
|
return (identity, options) => (0, iam_authentication_v1_authentication_universal_1.register)(identity, options,
|
|
7
8
|
// @ts-ignore
|
|
@@ -14,6 +15,18 @@ function login(httpClient) {
|
|
|
14
15
|
{ httpClient });
|
|
15
16
|
}
|
|
16
17
|
exports.login = login;
|
|
18
|
+
function registerV2(httpClient) {
|
|
19
|
+
return (loginId, options) => (0, iam_authentication_v1_authentication_universal_1.registerV2)(loginId, options,
|
|
20
|
+
// @ts-ignore
|
|
21
|
+
{ httpClient });
|
|
22
|
+
}
|
|
23
|
+
exports.registerV2 = registerV2;
|
|
24
|
+
function loginV2(httpClient) {
|
|
25
|
+
return (loginId, options) => (0, iam_authentication_v1_authentication_universal_1.loginV2)(loginId, options,
|
|
26
|
+
// @ts-ignore
|
|
27
|
+
{ httpClient });
|
|
28
|
+
}
|
|
29
|
+
exports.loginV2 = loginV2;
|
|
17
30
|
function proceedToNextState(httpClient) {
|
|
18
31
|
return (options) => (0, iam_authentication_v1_authentication_universal_1.proceedToNextState)(options,
|
|
19
32
|
// @ts-ignore
|
|
@@ -29,6 +42,9 @@ exports.logout = logout;
|
|
|
29
42
|
var iam_authentication_v1_authentication_universal_2 = require("./iam-authentication-v1-authentication.universal");
|
|
30
43
|
Object.defineProperty(exports, "Status", { enumerable: true, get: function () { return iam_authentication_v1_authentication_universal_2.Status; } });
|
|
31
44
|
Object.defineProperty(exports, "PrivacyStatus", { enumerable: true, get: function () { return iam_authentication_v1_authentication_universal_2.PrivacyStatus; } });
|
|
45
|
+
Object.defineProperty(exports, "StatusName", { enumerable: true, get: function () { return iam_authentication_v1_authentication_universal_2.StatusName; } });
|
|
46
|
+
Object.defineProperty(exports, "Reason", { enumerable: true, get: function () { return iam_authentication_v1_authentication_universal_2.Reason; } });
|
|
32
47
|
Object.defineProperty(exports, "StateStatus", { enumerable: true, get: function () { return iam_authentication_v1_authentication_universal_2.StateStatus; } });
|
|
48
|
+
Object.defineProperty(exports, "StateType", { enumerable: true, get: function () { return iam_authentication_v1_authentication_universal_2.StateType; } });
|
|
33
49
|
Object.defineProperty(exports, "TenantType", { enumerable: true, get: function () { return iam_authentication_v1_authentication_universal_2.TenantType; } });
|
|
34
50
|
//# sourceMappingURL=iam-authentication-v1-authentication.public.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"iam-authentication-v1-authentication.public.js","sourceRoot":"","sources":["../../../src/iam-authentication-v1-authentication.public.ts"],"names":[],"mappings":";;;AACA,
|
|
1
|
+
{"version":3,"file":"iam-authentication-v1-authentication.public.js","sourceRoot":"","sources":["../../../src/iam-authentication-v1-authentication.public.ts"],"names":[],"mappings":";;;AACA,qHAgB0D;AAE7C,QAAA,UAAU,GAAG,EAAE,YAAY,EAAE,eAAe,EAAE,CAAC;AAE5D,SAAgB,QAAQ,CAAC,UAAsB;IAC7C,OAAO,CAAC,QAAkB,EAAE,OAAyB,EAAE,EAAE,CACvD,IAAA,yDAAiB,EACf,QAAQ,EACR,OAAO;IACP,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AARD,4BAQC;AAED,SAAgB,KAAK,CAAC,UAAsB;IAC1C,OAAO,CAAC,UAAsB,EAAE,OAAsB,EAAE,EAAE,CACxD,IAAA,sDAAc,EACZ,UAAU,EACV,OAAO;IACP,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AARD,sBAQC;AAED,SAAgB,UAAU,CAAC,UAAsB;IAC/C,OAAO,CAAC,OAAgB,EAAE,OAA2B,EAAE,EAAE,CACvD,IAAA,2DAAmB,EACjB,OAAO,EACP,OAAO;IACP,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AARD,gCAQC;AAED,SAAgB,OAAO,CAAC,UAAsB;IAC5C,OAAO,CAAC,OAAgB,EAAE,OAAwB,EAAE,EAAE,CACpD,IAAA,wDAAgB,EACd,OAAO,EACP,OAAO;IACP,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AARD,0BAQC;AAED,SAAgB,kBAAkB,CAAC,UAAsB;IACvD,OAAO,CAAC,OAAmC,EAAE,EAAE,CAC7C,IAAA,mEAA2B,EACzB,OAAO;IACP,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAPD,gDAOC;AAED,SAAgB,MAAM,CAAC,UAAsB;IAC3C,OAAO,CAAC,OAAuB,EAAE,EAAE,CACjC,IAAA,uDAAe,EACb,OAAO;IACP,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAPD,wBAOC;AAED,mHAQ0D;AAPxD,wIAAA,MAAM,OAAA;AACN,+IAAA,aAAa,OAAA;AACb,4IAAA,UAAU,OAAA;AACV,wIAAA,MAAM,OAAA;AACN,6IAAA,WAAW,OAAA;AACX,2IAAA,SAAS,OAAA;AACT,4IAAA,UAAU,OAAA"}
|
|
@@ -30,6 +30,8 @@ export interface Identity {
|
|
|
30
30
|
identityProfile?: IdentityProfile;
|
|
31
31
|
/** Stores additional information about the identity that can impact user access. This data can't be set by users. */
|
|
32
32
|
metadata?: Metadata;
|
|
33
|
+
email?: Email;
|
|
34
|
+
statusV2?: StatusV2;
|
|
33
35
|
}
|
|
34
36
|
export interface Identifier extends IdentifierValueOneOf {
|
|
35
37
|
email?: string;
|
|
@@ -114,6 +116,26 @@ export interface Metadata {
|
|
|
114
116
|
*/
|
|
115
117
|
tags?: string[];
|
|
116
118
|
}
|
|
119
|
+
export interface Email {
|
|
120
|
+
address?: string;
|
|
121
|
+
isVerified?: boolean;
|
|
122
|
+
}
|
|
123
|
+
export interface StatusV2 {
|
|
124
|
+
name?: StatusName;
|
|
125
|
+
reasons?: Reason[];
|
|
126
|
+
}
|
|
127
|
+
export declare enum StatusName {
|
|
128
|
+
UNKNOWN_STATUS = "UNKNOWN_STATUS",
|
|
129
|
+
PENDING = "PENDING",
|
|
130
|
+
ACTIVE = "ACTIVE",
|
|
131
|
+
DELETED = "DELETED",
|
|
132
|
+
BLOCKED = "BLOCKED"
|
|
133
|
+
}
|
|
134
|
+
export declare enum Reason {
|
|
135
|
+
UNKNOWN_REASON = "UNKNOWN_REASON",
|
|
136
|
+
PENDING_ADMIN_APPROVAL_REQUIRED = "PENDING_ADMIN_APPROVAL_REQUIRED",
|
|
137
|
+
PENDING_EMAIL_VERIFICATION_REQUIRED = "PENDING_EMAIL_VERIFICATION_REQUIRED"
|
|
138
|
+
}
|
|
117
139
|
export interface CaptchaToken extends CaptchaTokenTokenOneOf {
|
|
118
140
|
Recaptcha?: string;
|
|
119
141
|
InvisibleRecaptcha?: string;
|
|
@@ -149,6 +171,37 @@ export interface LoginRequest {
|
|
|
149
171
|
export interface SuccessfulLoginEvent {
|
|
150
172
|
identity?: Identity;
|
|
151
173
|
}
|
|
174
|
+
export interface RegisterV2Request {
|
|
175
|
+
loginId: LoginId;
|
|
176
|
+
password?: string;
|
|
177
|
+
profile?: IdentityProfile;
|
|
178
|
+
captchaTokens?: CaptchaToken[];
|
|
179
|
+
}
|
|
180
|
+
export interface LoginId extends LoginIdTypeOneOf {
|
|
181
|
+
email?: string;
|
|
182
|
+
}
|
|
183
|
+
/** @oneof */
|
|
184
|
+
export interface LoginIdTypeOneOf {
|
|
185
|
+
email?: string;
|
|
186
|
+
}
|
|
187
|
+
export interface StateMachineResponse {
|
|
188
|
+
state?: StateType;
|
|
189
|
+
sessionToken?: string | null;
|
|
190
|
+
stateToken?: string | null;
|
|
191
|
+
identity?: Identity;
|
|
192
|
+
}
|
|
193
|
+
export declare enum StateType {
|
|
194
|
+
UNKNOWN_STATE = "UNKNOWN_STATE",
|
|
195
|
+
SUCCESS = "SUCCESS",
|
|
196
|
+
REQUIRE_OWNER_APPROVAL = "REQUIRE_OWNER_APPROVAL",
|
|
197
|
+
REQUIRE_EMAIL_VERIFICATION = "REQUIRE_EMAIL_VERIFICATION",
|
|
198
|
+
STATUS_CHECK = "STATUS_CHECK"
|
|
199
|
+
}
|
|
200
|
+
export interface LoginV2Request {
|
|
201
|
+
loginId: LoginId;
|
|
202
|
+
password?: string;
|
|
203
|
+
captchaTokens?: CaptchaToken[];
|
|
204
|
+
}
|
|
152
205
|
export interface LoginWithIdpConnectionRequest {
|
|
153
206
|
idpConnectionId?: string;
|
|
154
207
|
tenantId?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TenantType = exports.StateStatus = exports.PrivacyStatus = exports.Status = void 0;
|
|
3
|
+
exports.TenantType = exports.StateType = exports.StateStatus = exports.Reason = exports.StatusName = exports.PrivacyStatus = exports.Status = void 0;
|
|
4
4
|
var Status;
|
|
5
5
|
(function (Status) {
|
|
6
6
|
Status["UNKNOWN_STATUS"] = "UNKNOWN_STATUS";
|
|
@@ -16,12 +16,34 @@ var PrivacyStatus;
|
|
|
16
16
|
PrivacyStatus["PUBLIC"] = "PUBLIC";
|
|
17
17
|
PrivacyStatus["PRIVATE"] = "PRIVATE";
|
|
18
18
|
})(PrivacyStatus = exports.PrivacyStatus || (exports.PrivacyStatus = {}));
|
|
19
|
+
var StatusName;
|
|
20
|
+
(function (StatusName) {
|
|
21
|
+
StatusName["UNKNOWN_STATUS"] = "UNKNOWN_STATUS";
|
|
22
|
+
StatusName["PENDING"] = "PENDING";
|
|
23
|
+
StatusName["ACTIVE"] = "ACTIVE";
|
|
24
|
+
StatusName["DELETED"] = "DELETED";
|
|
25
|
+
StatusName["BLOCKED"] = "BLOCKED";
|
|
26
|
+
})(StatusName = exports.StatusName || (exports.StatusName = {}));
|
|
27
|
+
var Reason;
|
|
28
|
+
(function (Reason) {
|
|
29
|
+
Reason["UNKNOWN_REASON"] = "UNKNOWN_REASON";
|
|
30
|
+
Reason["PENDING_ADMIN_APPROVAL_REQUIRED"] = "PENDING_ADMIN_APPROVAL_REQUIRED";
|
|
31
|
+
Reason["PENDING_EMAIL_VERIFICATION_REQUIRED"] = "PENDING_EMAIL_VERIFICATION_REQUIRED";
|
|
32
|
+
})(Reason = exports.Reason || (exports.Reason = {}));
|
|
19
33
|
var StateStatus;
|
|
20
34
|
(function (StateStatus) {
|
|
21
35
|
StateStatus["DONE"] = "DONE";
|
|
22
36
|
StateStatus["REQUIRE_OWNER_APPROVAL"] = "REQUIRE_OWNER_APPROVAL";
|
|
23
37
|
StateStatus["STATUS_CHECK"] = "STATUS_CHECK";
|
|
24
38
|
})(StateStatus = exports.StateStatus || (exports.StateStatus = {}));
|
|
39
|
+
var StateType;
|
|
40
|
+
(function (StateType) {
|
|
41
|
+
StateType["UNKNOWN_STATE"] = "UNKNOWN_STATE";
|
|
42
|
+
StateType["SUCCESS"] = "SUCCESS";
|
|
43
|
+
StateType["REQUIRE_OWNER_APPROVAL"] = "REQUIRE_OWNER_APPROVAL";
|
|
44
|
+
StateType["REQUIRE_EMAIL_VERIFICATION"] = "REQUIRE_EMAIL_VERIFICATION";
|
|
45
|
+
StateType["STATUS_CHECK"] = "STATUS_CHECK";
|
|
46
|
+
})(StateType = exports.StateType || (exports.StateType = {}));
|
|
25
47
|
var TenantType;
|
|
26
48
|
(function (TenantType) {
|
|
27
49
|
TenantType["UNKNOWN_TENANT_TYPE"] = "UNKNOWN_TENANT_TYPE";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"iam-authentication-v1-authentication.types.js","sourceRoot":"","sources":["../../../src/iam-authentication-v1-authentication.types.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"iam-authentication-v1-authentication.types.js","sourceRoot":"","sources":["../../../src/iam-authentication-v1-authentication.types.ts"],"names":[],"mappings":";;;AAgDA,IAAY,MAOX;AAPD,WAAY,MAAM;IAChB,2CAAiC,CAAA;IACjC,6BAAmB,CAAA;IACnB,2BAAiB,CAAA;IACjB,qCAA2B,CAAA;IAC3B,6BAAmB,CAAA;IACnB,yCAA+B,CAAA;AACjC,CAAC,EAPW,MAAM,GAAN,cAAM,KAAN,cAAM,QAOjB;AAoCD,IAAY,aAIX;AAJD,WAAY,aAAa;IACvB,wCAAuB,CAAA;IACvB,kCAAiB,CAAA;IACjB,oCAAmB,CAAA;AACrB,CAAC,EAJW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAIxB;AAkDD,IAAY,UAMX;AAND,WAAY,UAAU;IACpB,+CAAiC,CAAA;IACjC,iCAAmB,CAAA;IACnB,+BAAiB,CAAA;IACjB,iCAAmB,CAAA;IACnB,iCAAmB,CAAA;AACrB,CAAC,EANW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAMrB;AAED,IAAY,MAIX;AAJD,WAAY,MAAM;IAChB,2CAAiC,CAAA;IACjC,6EAAmE,CAAA;IACnE,qFAA2E,CAAA;AAC7E,CAAC,EAJW,MAAM,GAAN,cAAM,KAAN,cAAM,QAIjB;AA0BD,IAAY,WAIX;AAJD,WAAY,WAAW;IACrB,4BAAa,CAAA;IACb,gEAAiD,CAAA;IACjD,4CAA6B,CAAA;AAC/B,CAAC,EAJW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAItB;AAqCD,IAAY,SAMX;AAND,WAAY,SAAS;IACnB,4CAA+B,CAAA;IAC/B,gCAAmB,CAAA;IACnB,8DAAiD,CAAA;IACjD,sEAAyD,CAAA;IACzD,0CAA6B,CAAA;AAC/B,CAAC,EANW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAMpB;AAsBD,IAAY,UAKX;AALD,WAAY,UAAU;IACpB,yDAA2C,CAAA;IAC3C,iCAAmB,CAAA;IACnB,2BAAa,CAAA;IACb,2BAAa,CAAA;AACf,CAAC,EALW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAKrB"}
|
|
@@ -36,6 +36,8 @@ export interface Identity {
|
|
|
36
36
|
identityProfile?: IdentityProfile;
|
|
37
37
|
/** Stores additional information about the identity that can impact user access. This data can't be set by users. */
|
|
38
38
|
metadata?: Metadata;
|
|
39
|
+
email?: Email;
|
|
40
|
+
statusV2?: StatusV2;
|
|
39
41
|
}
|
|
40
42
|
export interface Identifier extends IdentifierValueOneOf {
|
|
41
43
|
email?: string;
|
|
@@ -120,6 +122,26 @@ export interface Metadata {
|
|
|
120
122
|
*/
|
|
121
123
|
tags?: string[];
|
|
122
124
|
}
|
|
125
|
+
export interface Email {
|
|
126
|
+
address?: string;
|
|
127
|
+
isVerified?: boolean;
|
|
128
|
+
}
|
|
129
|
+
export interface StatusV2 {
|
|
130
|
+
name?: StatusName;
|
|
131
|
+
reasons?: Reason[];
|
|
132
|
+
}
|
|
133
|
+
export declare enum StatusName {
|
|
134
|
+
UNKNOWN_STATUS = "UNKNOWN_STATUS",
|
|
135
|
+
PENDING = "PENDING",
|
|
136
|
+
ACTIVE = "ACTIVE",
|
|
137
|
+
DELETED = "DELETED",
|
|
138
|
+
BLOCKED = "BLOCKED"
|
|
139
|
+
}
|
|
140
|
+
export declare enum Reason {
|
|
141
|
+
UNKNOWN_REASON = "UNKNOWN_REASON",
|
|
142
|
+
PENDING_ADMIN_APPROVAL_REQUIRED = "PENDING_ADMIN_APPROVAL_REQUIRED",
|
|
143
|
+
PENDING_EMAIL_VERIFICATION_REQUIRED = "PENDING_EMAIL_VERIFICATION_REQUIRED"
|
|
144
|
+
}
|
|
123
145
|
export interface CaptchaToken extends CaptchaTokenTokenOneOf {
|
|
124
146
|
Recaptcha?: string;
|
|
125
147
|
InvisibleRecaptcha?: string;
|
|
@@ -155,6 +177,37 @@ export interface LoginRequest {
|
|
|
155
177
|
export interface SuccessfulLoginEvent {
|
|
156
178
|
identity?: Identity;
|
|
157
179
|
}
|
|
180
|
+
export interface RegisterV2Request {
|
|
181
|
+
loginId: LoginId;
|
|
182
|
+
password?: string;
|
|
183
|
+
profile?: IdentityProfile;
|
|
184
|
+
captchaTokens?: CaptchaToken[];
|
|
185
|
+
}
|
|
186
|
+
export interface LoginId extends LoginIdTypeOneOf {
|
|
187
|
+
email?: string;
|
|
188
|
+
}
|
|
189
|
+
/** @oneof */
|
|
190
|
+
export interface LoginIdTypeOneOf {
|
|
191
|
+
email?: string;
|
|
192
|
+
}
|
|
193
|
+
export interface StateMachineResponse {
|
|
194
|
+
state?: StateType;
|
|
195
|
+
sessionToken?: string | null;
|
|
196
|
+
stateToken?: string | null;
|
|
197
|
+
identity?: Identity;
|
|
198
|
+
}
|
|
199
|
+
export declare enum StateType {
|
|
200
|
+
UNKNOWN_STATE = "UNKNOWN_STATE",
|
|
201
|
+
SUCCESS = "SUCCESS",
|
|
202
|
+
REQUIRE_OWNER_APPROVAL = "REQUIRE_OWNER_APPROVAL",
|
|
203
|
+
REQUIRE_EMAIL_VERIFICATION = "REQUIRE_EMAIL_VERIFICATION",
|
|
204
|
+
STATUS_CHECK = "STATUS_CHECK"
|
|
205
|
+
}
|
|
206
|
+
export interface LoginV2Request {
|
|
207
|
+
loginId: LoginId;
|
|
208
|
+
password?: string;
|
|
209
|
+
captchaTokens?: CaptchaToken[];
|
|
210
|
+
}
|
|
158
211
|
export interface LoginWithIdpConnectionRequest {
|
|
159
212
|
idpConnectionId?: string;
|
|
160
213
|
tenantId?: string;
|
|
@@ -232,6 +285,25 @@ export interface LoginOptions {
|
|
|
232
285
|
inputs?: Record<string, string>;
|
|
233
286
|
captchaTokens?: CaptchaToken[];
|
|
234
287
|
}
|
|
288
|
+
/** @public
|
|
289
|
+
* @documentationMaturity preview
|
|
290
|
+
* @requiredField loginId
|
|
291
|
+
*/
|
|
292
|
+
export declare function registerV2(loginId: LoginId, options?: RegisterV2Options): Promise<StateMachineResponse>;
|
|
293
|
+
export interface RegisterV2Options {
|
|
294
|
+
password?: string;
|
|
295
|
+
profile?: IdentityProfile;
|
|
296
|
+
captchaTokens?: CaptchaToken[];
|
|
297
|
+
}
|
|
298
|
+
/** @public
|
|
299
|
+
* @documentationMaturity preview
|
|
300
|
+
* @requiredField loginId
|
|
301
|
+
*/
|
|
302
|
+
export declare function loginV2(loginId: LoginId, options?: LoginV2Options): Promise<StateMachineResponse>;
|
|
303
|
+
export interface LoginV2Options {
|
|
304
|
+
password?: string;
|
|
305
|
+
captchaTokens?: CaptchaToken[];
|
|
306
|
+
}
|
|
235
307
|
/** @public
|
|
236
308
|
* @documentationMaturity preview
|
|
237
309
|
*/
|
|
@@ -28,7 +28,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
28
28
|
});
|
|
29
29
|
};
|
|
30
30
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31
|
-
exports.logout = exports.proceedToNextState = exports.login = exports.register = exports.TenantType = exports.StateStatus = exports.PrivacyStatus = exports.Status = exports.__debug = void 0;
|
|
31
|
+
exports.logout = exports.proceedToNextState = exports.loginV2 = exports.registerV2 = exports.login = exports.register = exports.TenantType = exports.StateType = exports.StateStatus = exports.Reason = exports.StatusName = exports.PrivacyStatus = exports.Status = exports.__debug = void 0;
|
|
32
32
|
const velo_1 = require("@wix/metro-runtime/velo");
|
|
33
33
|
const ambassadorWixIamAuthenticationV1Authentication = __importStar(require("./iam-authentication-v1-authentication.http"));
|
|
34
34
|
let __verbose = false;
|
|
@@ -61,12 +61,34 @@ var PrivacyStatus;
|
|
|
61
61
|
PrivacyStatus["PUBLIC"] = "PUBLIC";
|
|
62
62
|
PrivacyStatus["PRIVATE"] = "PRIVATE";
|
|
63
63
|
})(PrivacyStatus = exports.PrivacyStatus || (exports.PrivacyStatus = {}));
|
|
64
|
+
var StatusName;
|
|
65
|
+
(function (StatusName) {
|
|
66
|
+
StatusName["UNKNOWN_STATUS"] = "UNKNOWN_STATUS";
|
|
67
|
+
StatusName["PENDING"] = "PENDING";
|
|
68
|
+
StatusName["ACTIVE"] = "ACTIVE";
|
|
69
|
+
StatusName["DELETED"] = "DELETED";
|
|
70
|
+
StatusName["BLOCKED"] = "BLOCKED";
|
|
71
|
+
})(StatusName = exports.StatusName || (exports.StatusName = {}));
|
|
72
|
+
var Reason;
|
|
73
|
+
(function (Reason) {
|
|
74
|
+
Reason["UNKNOWN_REASON"] = "UNKNOWN_REASON";
|
|
75
|
+
Reason["PENDING_ADMIN_APPROVAL_REQUIRED"] = "PENDING_ADMIN_APPROVAL_REQUIRED";
|
|
76
|
+
Reason["PENDING_EMAIL_VERIFICATION_REQUIRED"] = "PENDING_EMAIL_VERIFICATION_REQUIRED";
|
|
77
|
+
})(Reason = exports.Reason || (exports.Reason = {}));
|
|
64
78
|
var StateStatus;
|
|
65
79
|
(function (StateStatus) {
|
|
66
80
|
StateStatus["DONE"] = "DONE";
|
|
67
81
|
StateStatus["REQUIRE_OWNER_APPROVAL"] = "REQUIRE_OWNER_APPROVAL";
|
|
68
82
|
StateStatus["STATUS_CHECK"] = "STATUS_CHECK";
|
|
69
83
|
})(StateStatus = exports.StateStatus || (exports.StateStatus = {}));
|
|
84
|
+
var StateType;
|
|
85
|
+
(function (StateType) {
|
|
86
|
+
StateType["UNKNOWN_STATE"] = "UNKNOWN_STATE";
|
|
87
|
+
StateType["SUCCESS"] = "SUCCESS";
|
|
88
|
+
StateType["REQUIRE_OWNER_APPROVAL"] = "REQUIRE_OWNER_APPROVAL";
|
|
89
|
+
StateType["REQUIRE_EMAIL_VERIFICATION"] = "REQUIRE_EMAIL_VERIFICATION";
|
|
90
|
+
StateType["STATUS_CHECK"] = "STATUS_CHECK";
|
|
91
|
+
})(StateType = exports.StateType || (exports.StateType = {}));
|
|
70
92
|
var TenantType;
|
|
71
93
|
(function (TenantType) {
|
|
72
94
|
TenantType["UNKNOWN_TENANT_TYPE"] = "UNKNOWN_TENANT_TYPE";
|
|
@@ -84,11 +106,14 @@ const _loginResponse = {
|
|
|
84
106
|
identity: '_identity',
|
|
85
107
|
additionalData: 'Map#_customValue',
|
|
86
108
|
};
|
|
109
|
+
const _loginV2Request = {};
|
|
87
110
|
const _logoutRequest = {};
|
|
88
111
|
const _mapValue = { value: 'Map#_customValue' };
|
|
89
112
|
const _proceedToNextStateRequest = {};
|
|
90
113
|
const _rawHttpResponse = {};
|
|
91
114
|
const _registerRequest = { identity: '_identity' };
|
|
115
|
+
const _registerV2Request = { profile: '_identityProfile' };
|
|
116
|
+
const _stateMachineResponse = { identity: '_identity' };
|
|
92
117
|
/** @public
|
|
93
118
|
* @documentationMaturity preview
|
|
94
119
|
* @requiredField identity
|
|
@@ -218,6 +243,133 @@ function login(identifier, options) {
|
|
|
218
243
|
});
|
|
219
244
|
}
|
|
220
245
|
exports.login = login;
|
|
246
|
+
/** @public
|
|
247
|
+
* @documentationMaturity preview
|
|
248
|
+
* @requiredField loginId
|
|
249
|
+
*/
|
|
250
|
+
function registerV2(loginId, options) {
|
|
251
|
+
var _a, _b, _c;
|
|
252
|
+
return __awaiter(this, arguments, void 0, function* () {
|
|
253
|
+
const requestTransformation = {
|
|
254
|
+
loginId: '$[0]',
|
|
255
|
+
password: '$[1].password',
|
|
256
|
+
profile: '$[1].profile',
|
|
257
|
+
captchaTokens: '$[1].captchaTokens',
|
|
258
|
+
};
|
|
259
|
+
const responseTransformation = '$';
|
|
260
|
+
// @ts-ignore
|
|
261
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
262
|
+
const { toAmbassadorRequest } = (0, velo_1.serializer)({
|
|
263
|
+
rootSchema: _registerV2Request,
|
|
264
|
+
depSchemas: {
|
|
265
|
+
_customField,
|
|
266
|
+
_customValue,
|
|
267
|
+
_identityProfile,
|
|
268
|
+
_listValue,
|
|
269
|
+
_mapValue,
|
|
270
|
+
},
|
|
271
|
+
fqdnTransformation: {
|
|
272
|
+
paths: [],
|
|
273
|
+
transformation: _fromVeloEntity,
|
|
274
|
+
},
|
|
275
|
+
customTransformation: requestTransformation,
|
|
276
|
+
});
|
|
277
|
+
const { fromJSON } = (0, velo_1.serializer)({
|
|
278
|
+
rootSchema: _stateMachineResponse,
|
|
279
|
+
depSchemas: {
|
|
280
|
+
_customField,
|
|
281
|
+
_customValue,
|
|
282
|
+
_identity,
|
|
283
|
+
_identityProfile,
|
|
284
|
+
_listValue,
|
|
285
|
+
_mapValue,
|
|
286
|
+
},
|
|
287
|
+
fqdnTransformation: {
|
|
288
|
+
paths: [],
|
|
289
|
+
transformation: _toVeloEntity,
|
|
290
|
+
},
|
|
291
|
+
customTransformation: responseTransformation,
|
|
292
|
+
});
|
|
293
|
+
const payload = toAmbassadorRequest([loginId, options]);
|
|
294
|
+
const reqOpts = ambassadorWixIamAuthenticationV1Authentication.registerV2(payload);
|
|
295
|
+
__log(`"RegisterV2" sending request with: ${__inspect(reqOpts)}`);
|
|
296
|
+
(_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
|
|
297
|
+
try {
|
|
298
|
+
const result = yield httpClient.request(reqOpts);
|
|
299
|
+
(_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
|
|
300
|
+
return fromJSON(result.data);
|
|
301
|
+
}
|
|
302
|
+
catch (err) {
|
|
303
|
+
const transformedError = (0, velo_1.transformError)(err, requestTransformation, [
|
|
304
|
+
'loginId',
|
|
305
|
+
'options',
|
|
306
|
+
]);
|
|
307
|
+
(_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
|
|
308
|
+
throw transformedError;
|
|
309
|
+
}
|
|
310
|
+
});
|
|
311
|
+
}
|
|
312
|
+
exports.registerV2 = registerV2;
|
|
313
|
+
/** @public
|
|
314
|
+
* @documentationMaturity preview
|
|
315
|
+
* @requiredField loginId
|
|
316
|
+
*/
|
|
317
|
+
function loginV2(loginId, options) {
|
|
318
|
+
var _a, _b, _c;
|
|
319
|
+
return __awaiter(this, arguments, void 0, function* () {
|
|
320
|
+
const requestTransformation = {
|
|
321
|
+
loginId: '$[0]',
|
|
322
|
+
password: '$[1].password',
|
|
323
|
+
captchaTokens: '$[1].captchaTokens',
|
|
324
|
+
};
|
|
325
|
+
const responseTransformation = '$';
|
|
326
|
+
// @ts-ignore
|
|
327
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
328
|
+
const { toAmbassadorRequest } = (0, velo_1.serializer)({
|
|
329
|
+
rootSchema: _loginV2Request,
|
|
330
|
+
depSchemas: {},
|
|
331
|
+
fqdnTransformation: {
|
|
332
|
+
paths: [],
|
|
333
|
+
transformation: _fromVeloEntity,
|
|
334
|
+
},
|
|
335
|
+
customTransformation: requestTransformation,
|
|
336
|
+
});
|
|
337
|
+
const { fromJSON } = (0, velo_1.serializer)({
|
|
338
|
+
rootSchema: _stateMachineResponse,
|
|
339
|
+
depSchemas: {
|
|
340
|
+
_customField,
|
|
341
|
+
_customValue,
|
|
342
|
+
_identity,
|
|
343
|
+
_identityProfile,
|
|
344
|
+
_listValue,
|
|
345
|
+
_mapValue,
|
|
346
|
+
},
|
|
347
|
+
fqdnTransformation: {
|
|
348
|
+
paths: [],
|
|
349
|
+
transformation: _toVeloEntity,
|
|
350
|
+
},
|
|
351
|
+
customTransformation: responseTransformation,
|
|
352
|
+
});
|
|
353
|
+
const payload = toAmbassadorRequest([loginId, options]);
|
|
354
|
+
const reqOpts = ambassadorWixIamAuthenticationV1Authentication.loginV2(payload);
|
|
355
|
+
__log(`"LoginV2" sending request with: ${__inspect(reqOpts)}`);
|
|
356
|
+
(_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
|
|
357
|
+
try {
|
|
358
|
+
const result = yield httpClient.request(reqOpts);
|
|
359
|
+
(_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
|
|
360
|
+
return fromJSON(result.data);
|
|
361
|
+
}
|
|
362
|
+
catch (err) {
|
|
363
|
+
const transformedError = (0, velo_1.transformError)(err, requestTransformation, [
|
|
364
|
+
'loginId',
|
|
365
|
+
'options',
|
|
366
|
+
]);
|
|
367
|
+
(_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
|
|
368
|
+
throw transformedError;
|
|
369
|
+
}
|
|
370
|
+
});
|
|
371
|
+
}
|
|
372
|
+
exports.loginV2 = loginV2;
|
|
221
373
|
/** @public
|
|
222
374
|
* @documentationMaturity preview
|
|
223
375
|
*/
|