@wix/identity 1.0.24 → 1.0.25
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 +1 -0
- package/build/cjs/index.js +2 -1
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/src/iam-verification-v1-start-response.http.d.ts +13 -0
- package/build/cjs/src/iam-verification-v1-start-response.http.js +91 -0
- package/build/cjs/src/iam-verification-v1-start-response.http.js.map +1 -0
- package/build/cjs/src/iam-verification-v1-start-response.public.d.ts +9 -0
- package/build/cjs/src/iam-verification-v1-start-response.public.js +25 -0
- package/build/cjs/src/iam-verification-v1-start-response.public.js.map +1 -0
- package/build/cjs/src/iam-verification-v1-start-response.types.d.ts +173 -0
- package/build/cjs/src/iam-verification-v1-start-response.types.js +46 -0
- package/build/cjs/src/iam-verification-v1-start-response.types.js.map +1 -0
- package/build/cjs/src/iam-verification-v1-start-response.universal.d.ts +211 -0
- package/build/cjs/src/iam-verification-v1-start-response.universal.js +217 -0
- package/build/cjs/src/iam-verification-v1-start-response.universal.js.map +1 -0
- package/build/es/index.d.ts +1 -0
- package/build/es/index.js +1 -0
- package/build/es/index.js.map +1 -1
- package/build/es/src/iam-verification-v1-start-response.http.d.ts +13 -0
- package/build/es/src/iam-verification-v1-start-response.http.js +86 -0
- package/build/es/src/iam-verification-v1-start-response.http.js.map +1 -0
- package/build/es/src/iam-verification-v1-start-response.public.d.ts +9 -0
- package/build/es/src/iam-verification-v1-start-response.public.js +14 -0
- package/build/es/src/iam-verification-v1-start-response.public.js.map +1 -0
- package/build/es/src/iam-verification-v1-start-response.types.d.ts +173 -0
- package/build/es/src/iam-verification-v1-start-response.types.js +43 -0
- package/build/es/src/iam-verification-v1-start-response.types.js.map +1 -0
- package/build/es/src/iam-verification-v1-start-response.universal.d.ts +211 -0
- package/build/es/src/iam-verification-v1-start-response.universal.js +193 -0
- package/build/es/src/iam-verification-v1-start-response.universal.js.map +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
+
}) : function(o, v) {
|
|
12
|
+
o["default"] = v;
|
|
13
|
+
});
|
|
14
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
+
if (mod && mod.__esModule) return mod;
|
|
16
|
+
var result = {};
|
|
17
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
+
__setModuleDefault(result, mod);
|
|
19
|
+
return result;
|
|
20
|
+
};
|
|
21
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
22
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
23
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
24
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
25
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
26
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
27
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
28
|
+
});
|
|
29
|
+
};
|
|
30
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31
|
+
exports.verifyDuringAuthentication = exports.start = exports.Reason = exports.StatusName = exports.PrivacyStatus = exports.Status = exports.StateType = exports.Target = exports.__debug = void 0;
|
|
32
|
+
const velo_1 = require("@wix/metro-runtime/velo");
|
|
33
|
+
const ambassadorWixIamVerificationV1StartResponse = __importStar(require("./iam-verification-v1-start-response.http"));
|
|
34
|
+
let __verbose = false;
|
|
35
|
+
function __log(...args) {
|
|
36
|
+
__verbose && console.log(...args);
|
|
37
|
+
}
|
|
38
|
+
function __inspect(obj) {
|
|
39
|
+
return obj;
|
|
40
|
+
}
|
|
41
|
+
exports.__debug = {
|
|
42
|
+
verboseLogging: {
|
|
43
|
+
on: () => (__verbose = true),
|
|
44
|
+
off: () => (__verbose = false),
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
const _toVeloEntity = '$';
|
|
48
|
+
const _fromVeloEntity = '$';
|
|
49
|
+
var Target;
|
|
50
|
+
(function (Target) {
|
|
51
|
+
Target["UNKNOWN_TARGET"] = "UNKNOWN_TARGET";
|
|
52
|
+
Target["EMAIL"] = "EMAIL";
|
|
53
|
+
})(Target = exports.Target || (exports.Target = {}));
|
|
54
|
+
var StateType;
|
|
55
|
+
(function (StateType) {
|
|
56
|
+
StateType["UNKNOWN_STATE"] = "UNKNOWN_STATE";
|
|
57
|
+
StateType["SUCCESS"] = "SUCCESS";
|
|
58
|
+
StateType["REQUIRE_OWNER_APPROVAL"] = "REQUIRE_OWNER_APPROVAL";
|
|
59
|
+
StateType["REQUIRE_EMAIL_VERIFICATION"] = "REQUIRE_EMAIL_VERIFICATION";
|
|
60
|
+
StateType["STATUS_CHECK"] = "STATUS_CHECK";
|
|
61
|
+
})(StateType = exports.StateType || (exports.StateType = {}));
|
|
62
|
+
var Status;
|
|
63
|
+
(function (Status) {
|
|
64
|
+
Status["UNKNOWN_STATUS"] = "UNKNOWN_STATUS";
|
|
65
|
+
Status["BLOCKED"] = "BLOCKED";
|
|
66
|
+
Status["ACTIVE"] = "ACTIVE";
|
|
67
|
+
Status["PROVISIONED"] = "PROVISIONED";
|
|
68
|
+
Status["DELETED"] = "DELETED";
|
|
69
|
+
Status["UNPROVISIONED"] = "UNPROVISIONED";
|
|
70
|
+
})(Status = exports.Status || (exports.Status = {}));
|
|
71
|
+
var PrivacyStatus;
|
|
72
|
+
(function (PrivacyStatus) {
|
|
73
|
+
PrivacyStatus["UNDEFINED"] = "UNDEFINED";
|
|
74
|
+
PrivacyStatus["PUBLIC"] = "PUBLIC";
|
|
75
|
+
PrivacyStatus["PRIVATE"] = "PRIVATE";
|
|
76
|
+
})(PrivacyStatus = exports.PrivacyStatus || (exports.PrivacyStatus = {}));
|
|
77
|
+
var StatusName;
|
|
78
|
+
(function (StatusName) {
|
|
79
|
+
StatusName["UNKNOWN_STATUS"] = "UNKNOWN_STATUS";
|
|
80
|
+
StatusName["PENDING"] = "PENDING";
|
|
81
|
+
StatusName["ACTIVE"] = "ACTIVE";
|
|
82
|
+
StatusName["DELETED"] = "DELETED";
|
|
83
|
+
StatusName["BLOCKED"] = "BLOCKED";
|
|
84
|
+
})(StatusName = exports.StatusName || (exports.StatusName = {}));
|
|
85
|
+
var Reason;
|
|
86
|
+
(function (Reason) {
|
|
87
|
+
Reason["UNKNOWN_REASON"] = "UNKNOWN_REASON";
|
|
88
|
+
Reason["PENDING_ADMIN_APPROVAL_REQUIRED"] = "PENDING_ADMIN_APPROVAL_REQUIRED";
|
|
89
|
+
Reason["PENDING_EMAIL_VERIFICATION_REQUIRED"] = "PENDING_EMAIL_VERIFICATION_REQUIRED";
|
|
90
|
+
})(Reason = exports.Reason || (exports.Reason = {}));
|
|
91
|
+
const _customField = { value: '_customValue' };
|
|
92
|
+
const _customValue = { listValue: '_listValue', mapValue: '_mapValue' };
|
|
93
|
+
const _identity = { identityProfile: '_identityProfile' };
|
|
94
|
+
const _identityProfile = { customFields: '_customField' };
|
|
95
|
+
const _listValue = { value: '_customValue' };
|
|
96
|
+
const _mapValue = { value: 'Map#_customValue' };
|
|
97
|
+
const _startRequest = {};
|
|
98
|
+
const _startResponse = {};
|
|
99
|
+
const _stateMachineResponse = { identity: '_identity' };
|
|
100
|
+
const _verifyDuringAuthenticationRequest = {};
|
|
101
|
+
/**
|
|
102
|
+
* starts a verification process
|
|
103
|
+
* example: sends a code to the identity's email
|
|
104
|
+
* @public
|
|
105
|
+
* @documentationMaturity preview
|
|
106
|
+
*/
|
|
107
|
+
function start(options) {
|
|
108
|
+
var _a, _b, _c;
|
|
109
|
+
return __awaiter(this, arguments, void 0, function* () {
|
|
110
|
+
const requestTransformation = {
|
|
111
|
+
identityId: '$[0].identityId',
|
|
112
|
+
target: '$[0].target',
|
|
113
|
+
};
|
|
114
|
+
const responseTransformation = '$';
|
|
115
|
+
// @ts-ignore
|
|
116
|
+
const { httpClient, sideEffects } = arguments[1];
|
|
117
|
+
const { toAmbassadorRequest } = (0, velo_1.serializer)({
|
|
118
|
+
rootSchema: _startRequest,
|
|
119
|
+
depSchemas: {},
|
|
120
|
+
fqdnTransformation: {
|
|
121
|
+
paths: [],
|
|
122
|
+
transformation: _fromVeloEntity,
|
|
123
|
+
},
|
|
124
|
+
customTransformation: requestTransformation,
|
|
125
|
+
});
|
|
126
|
+
const { fromJSON } = (0, velo_1.serializer)({
|
|
127
|
+
rootSchema: _startResponse,
|
|
128
|
+
depSchemas: {},
|
|
129
|
+
fqdnTransformation: {
|
|
130
|
+
paths: [velo_1.RootPath],
|
|
131
|
+
transformation: _toVeloEntity,
|
|
132
|
+
},
|
|
133
|
+
customTransformation: responseTransformation,
|
|
134
|
+
});
|
|
135
|
+
const payload = toAmbassadorRequest([options]);
|
|
136
|
+
const reqOpts = ambassadorWixIamVerificationV1StartResponse.start(payload);
|
|
137
|
+
__log(`"Start" sending request with: ${__inspect(reqOpts)}`);
|
|
138
|
+
(_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
|
|
139
|
+
try {
|
|
140
|
+
const result = yield httpClient.request(reqOpts);
|
|
141
|
+
(_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
|
|
142
|
+
return fromJSON(result.data);
|
|
143
|
+
}
|
|
144
|
+
catch (err) {
|
|
145
|
+
const transformedError = (0, velo_1.transformError)(err, requestTransformation, [
|
|
146
|
+
'options',
|
|
147
|
+
]);
|
|
148
|
+
(_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
|
|
149
|
+
throw transformedError;
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
exports.start = start;
|
|
154
|
+
/**
|
|
155
|
+
* verifies the code in the request.
|
|
156
|
+
* this endpoint is meant to be called during the authentication process only, thus it requires a stateToken.
|
|
157
|
+
* the identity_id and the verification_id are extracted from the stateToken
|
|
158
|
+
* @param code - the code to verify
|
|
159
|
+
* @public
|
|
160
|
+
* @documentationMaturity preview
|
|
161
|
+
* @requiredField code
|
|
162
|
+
* @requiredField options
|
|
163
|
+
* @requiredField options.stateToken
|
|
164
|
+
*/
|
|
165
|
+
function verifyDuringAuthentication(code, options) {
|
|
166
|
+
var _a, _b, _c;
|
|
167
|
+
return __awaiter(this, arguments, void 0, function* () {
|
|
168
|
+
const requestTransformation = { code: '$[0]', stateToken: '$[1].stateToken' };
|
|
169
|
+
const responseTransformation = '$';
|
|
170
|
+
// @ts-ignore
|
|
171
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
172
|
+
const { toAmbassadorRequest } = (0, velo_1.serializer)({
|
|
173
|
+
rootSchema: _verifyDuringAuthenticationRequest,
|
|
174
|
+
depSchemas: {},
|
|
175
|
+
fqdnTransformation: {
|
|
176
|
+
paths: [],
|
|
177
|
+
transformation: _fromVeloEntity,
|
|
178
|
+
},
|
|
179
|
+
customTransformation: requestTransformation,
|
|
180
|
+
});
|
|
181
|
+
const { fromJSON } = (0, velo_1.serializer)({
|
|
182
|
+
rootSchema: _stateMachineResponse,
|
|
183
|
+
depSchemas: {
|
|
184
|
+
_customField,
|
|
185
|
+
_customValue,
|
|
186
|
+
_identity,
|
|
187
|
+
_identityProfile,
|
|
188
|
+
_listValue,
|
|
189
|
+
_mapValue,
|
|
190
|
+
},
|
|
191
|
+
fqdnTransformation: {
|
|
192
|
+
paths: [],
|
|
193
|
+
transformation: _toVeloEntity,
|
|
194
|
+
},
|
|
195
|
+
customTransformation: responseTransformation,
|
|
196
|
+
});
|
|
197
|
+
const payload = toAmbassadorRequest([code, options]);
|
|
198
|
+
const reqOpts = ambassadorWixIamVerificationV1StartResponse.verifyDuringAuthentication(payload);
|
|
199
|
+
__log(`"VerifyDuringAuthentication" sending request with: ${__inspect(reqOpts)}`);
|
|
200
|
+
(_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
|
|
201
|
+
try {
|
|
202
|
+
const result = yield httpClient.request(reqOpts);
|
|
203
|
+
(_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
|
|
204
|
+
return fromJSON(result.data);
|
|
205
|
+
}
|
|
206
|
+
catch (err) {
|
|
207
|
+
const transformedError = (0, velo_1.transformError)(err, requestTransformation, [
|
|
208
|
+
'code',
|
|
209
|
+
'options',
|
|
210
|
+
]);
|
|
211
|
+
(_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
|
|
212
|
+
throw transformedError;
|
|
213
|
+
}
|
|
214
|
+
});
|
|
215
|
+
}
|
|
216
|
+
exports.verifyDuringAuthentication = verifyDuringAuthentication;
|
|
217
|
+
//# sourceMappingURL=iam-verification-v1-start-response.universal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"iam-verification-v1-start-response.universal.js","sourceRoot":"","sources":["../../../src/iam-verification-v1-start-response.universal.ts"],"names":[],"mappings":";;;;;;;;;;;;;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;YACjD,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,SAAS,+CAAtB,WAAW,EAAc,MAAM,CAAC,CAAC;YAEjC,OAAO,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAQ,CAAC;SACrC;QAAC,OAAO,GAAQ,EAAE;YACjB,MAAM,gBAAgB,GAAG,IAAA,qBAAc,EAAC,GAAG,EAAE,qBAAqB,EAAE;gBAClE,MAAM;gBACN,SAAS;aACV,CAAC,CAAC;YACH,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,OAAO,+CAApB,WAAW,EAAY,GAAG,CAAC,CAAC;YAE5B,MAAM,gBAAgB,CAAC;SACxB;;CACF;AAlED,gEAkEC"}
|
package/build/es/index.d.ts
CHANGED
package/build/es/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export * as authentication from './src/iam-authentication-v1-authentication.public';
|
|
2
|
+
export * as verification from './src/iam-verification-v1-start-response.public';
|
|
2
3
|
export * as oauth from './src/identity-oauth-v1-refresh-token.public';
|
|
3
4
|
//# sourceMappingURL=index.js.map
|
package/build/es/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,cAAc,MAAM,mDAAmD,CAAC;AACpF,OAAO,KAAK,KAAK,MAAM,8CAA8C,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,cAAc,MAAM,mDAAmD,CAAC;AACpF,OAAO,KAAK,YAAY,MAAM,iDAAiD,CAAC;AAChF,OAAO,KAAK,KAAK,MAAM,8CAA8C,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { RequestOptionsFactory } from '@wix/sdk-types';
|
|
2
|
+
import { StateMachineResponse, StartRequest, StartResponse, VerifyDuringAuthenticationRequest } from './iam-verification-v1-start-response.types';
|
|
3
|
+
/**
|
|
4
|
+
* starts a verification process
|
|
5
|
+
* example: sends a code to the identity's email
|
|
6
|
+
*/
|
|
7
|
+
export declare function start(payload: StartRequest): RequestOptionsFactory<StartResponse>;
|
|
8
|
+
/**
|
|
9
|
+
* verifies the code in the request.
|
|
10
|
+
* this endpoint is meant to be called during the authentication process only, thus it requires a stateToken.
|
|
11
|
+
* the identity_id and the verification_id are extracted from the stateToken
|
|
12
|
+
*/
|
|
13
|
+
export declare function verifyDuringAuthentication(payload: VerifyDuringAuthenticationRequest): RequestOptionsFactory<StateMachineResponse>;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { serializer } from '@wix/metro-runtime/ambassador';
|
|
2
|
+
import { resolveUrl } from '@wix/metro-runtime';
|
|
3
|
+
const _customField = { value: '_customValue' };
|
|
4
|
+
const _customValue = {
|
|
5
|
+
numValue: 'DOUBLE',
|
|
6
|
+
dateValue: 'google.protobuf.Timestamp',
|
|
7
|
+
listValue: '_listValue',
|
|
8
|
+
mapValue: '_mapValue',
|
|
9
|
+
};
|
|
10
|
+
const _identity = {
|
|
11
|
+
createdDate: 'google.protobuf.Timestamp',
|
|
12
|
+
updatedDate: 'google.protobuf.Timestamp',
|
|
13
|
+
identityProfile: '_identityProfile',
|
|
14
|
+
};
|
|
15
|
+
const _identityProfile = { customFields: '_customField' };
|
|
16
|
+
const _listValue = { value: '_customValue' };
|
|
17
|
+
const _mapValue = { value: 'Map#_customValue' };
|
|
18
|
+
const _startRequest = {};
|
|
19
|
+
const _startResponse = {};
|
|
20
|
+
const _stateMachineResponse = { identity: '_identity' };
|
|
21
|
+
const _verifyDuringAuthenticationRequest = {};
|
|
22
|
+
function resolveWixIamVerificationV1VerificationServiceUrl(opts) {
|
|
23
|
+
const domainToMappings = {};
|
|
24
|
+
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* starts a verification process
|
|
28
|
+
* example: sends a code to the identity's email
|
|
29
|
+
*/
|
|
30
|
+
export function start(payload) {
|
|
31
|
+
const { toJSON: toReq, fromJSON: fromReq } = serializer(_startRequest, {});
|
|
32
|
+
const { fromJSON: fromRes } = serializer(_startResponse, {});
|
|
33
|
+
function __start({ host }) {
|
|
34
|
+
const serializedData = toReq(payload);
|
|
35
|
+
const metadata = {
|
|
36
|
+
entityFqdn: 'wix.iam.verification.v1.start_response',
|
|
37
|
+
method: 'POST',
|
|
38
|
+
methodFqn: 'wix.iam.verification.v1.VerificationService.Start',
|
|
39
|
+
url: resolveWixIamVerificationV1VerificationServiceUrl({
|
|
40
|
+
protoPath: '/v1/Start',
|
|
41
|
+
data: serializedData,
|
|
42
|
+
host,
|
|
43
|
+
}),
|
|
44
|
+
data: serializedData,
|
|
45
|
+
transformResponse: fromRes,
|
|
46
|
+
};
|
|
47
|
+
return metadata;
|
|
48
|
+
}
|
|
49
|
+
__start.fromReq = fromReq;
|
|
50
|
+
return __start;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* verifies the code in the request.
|
|
54
|
+
* this endpoint is meant to be called during the authentication process only, thus it requires a stateToken.
|
|
55
|
+
* the identity_id and the verification_id are extracted from the stateToken
|
|
56
|
+
*/
|
|
57
|
+
export function verifyDuringAuthentication(payload) {
|
|
58
|
+
const { toJSON: toReq, fromJSON: fromReq } = serializer(_verifyDuringAuthenticationRequest, {});
|
|
59
|
+
const { fromJSON: fromRes } = serializer(_stateMachineResponse, {
|
|
60
|
+
_customField,
|
|
61
|
+
_customValue,
|
|
62
|
+
_identity,
|
|
63
|
+
_identityProfile,
|
|
64
|
+
_listValue,
|
|
65
|
+
_mapValue,
|
|
66
|
+
});
|
|
67
|
+
function __verifyDuringAuthentication({ host }) {
|
|
68
|
+
const serializedData = toReq(payload);
|
|
69
|
+
const metadata = {
|
|
70
|
+
entityFqdn: 'wix.iam.verification.v1.start_response',
|
|
71
|
+
method: 'POST',
|
|
72
|
+
methodFqn: 'wix.iam.verification.v1.VerificationService.VerifyDuringAuthentication',
|
|
73
|
+
url: resolveWixIamVerificationV1VerificationServiceUrl({
|
|
74
|
+
protoPath: '/v1/auth/verify',
|
|
75
|
+
data: serializedData,
|
|
76
|
+
host,
|
|
77
|
+
}),
|
|
78
|
+
data: serializedData,
|
|
79
|
+
transformResponse: fromRes,
|
|
80
|
+
};
|
|
81
|
+
return metadata;
|
|
82
|
+
}
|
|
83
|
+
__verifyDuringAuthentication.fromReq = fromReq;
|
|
84
|
+
return __verifyDuringAuthentication;
|
|
85
|
+
}
|
|
86
|
+
//# sourceMappingURL=iam-verification-v1-start-response.http.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"iam-verification-v1-start-response.http.js","sourceRoot":"","sources":["../../../src/iam-verification-v1-start-response.http.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAUhD,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,SAAS,GAAG,EAAE,KAAK,EAAE,kBAAkB,EAAE,CAAC;AAChD,MAAM,aAAa,GAAG,EAAE,CAAC;AACzB,MAAM,cAAc,GAAG,EAAE,CAAC;AAC1B,MAAM,qBAAqB,GAAG,EAAE,QAAQ,EAAE,WAA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C9D,YAAY;QACZ,YAAY;QACZ,SAAS;QACT,gBAAgB;QAChB,UAAU;QACV,SAAS;KACV,CAAC,CAAC;IAEH,SAAS,4BAA4B,CAAC,EAAE,IAAI,EAAO;QACjD,MAAM,cAAc,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC;QACtC,MAAM,QAAQ,GAAG;YACf,UAAU,EAAE,wCAAwC;YACpD,MAAM,EAAE,MAAa;YACrB,SAAS,EACP,wEAAwE;YAC1E,GAAG,EAAE,iDAAiD,CAAC;gBACrD,SAAS,EAAE,iBAAiB;gBAC5B,IAAI,EAAE,cAAc;gBACpB,IAAI;aACL,CAAC;YACF,IAAI,EAAE,cAAc;YACpB,iBAAiB,EAAE,OAAO;SAC3B,CAAC;QAEF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,4BAA4B,CAAC,OAAO,GAAG,OAAO,CAAC;IAE/C,OAAO,4BAA4B,CAAC;AACtC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { HttpClient } from '@wix/sdk-types';
|
|
2
|
+
import { StartOptions, VerifyDuringAuthenticationOptions } from './iam-verification-v1-start-response.universal';
|
|
3
|
+
export declare const __metadata: {
|
|
4
|
+
PACKAGE_NAME: string;
|
|
5
|
+
};
|
|
6
|
+
export declare function start(httpClient: HttpClient): (options?: StartOptions | undefined) => Promise<import("./iam-verification-v1-start-response.universal").StartResponse>;
|
|
7
|
+
export declare function verifyDuringAuthentication(httpClient: HttpClient): (code: string, options: VerifyDuringAuthenticationOptions) => Promise<import("./iam-verification-v1-start-response.universal").StateMachineResponse>;
|
|
8
|
+
export { Target, StateType, Status, PrivacyStatus, StatusName, Reason, } from './iam-verification-v1-start-response.universal';
|
|
9
|
+
export { StartResponse, StartRequest, VerifyRequest, VerifyResponse, VerifyDuringAuthenticationRequest, StateMachineResponse, Identity, Identifier, IdentifierValueOneOf, Connection, ConnectionTypeOneOf, IdpConnection, AuthenticatorConnection, IdentityProfile, CustomField, CustomValue, CustomValueValueOneOf, ListValue, MapValue, Metadata, Email, StatusV2, StartOptions, VerifyDuringAuthenticationOptions, } from './iam-verification-v1-start-response.universal';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { start as universalStart, verifyDuringAuthentication as universalVerifyDuringAuthentication, } from './iam-verification-v1-start-response.universal';
|
|
2
|
+
export const __metadata = { PACKAGE_NAME: '@wix/identity' };
|
|
3
|
+
export function start(httpClient) {
|
|
4
|
+
return (options) => universalStart(options,
|
|
5
|
+
// @ts-ignore
|
|
6
|
+
{ httpClient });
|
|
7
|
+
}
|
|
8
|
+
export function verifyDuringAuthentication(httpClient) {
|
|
9
|
+
return (code, options) => universalVerifyDuringAuthentication(code, options,
|
|
10
|
+
// @ts-ignore
|
|
11
|
+
{ httpClient });
|
|
12
|
+
}
|
|
13
|
+
export { Target, StateType, Status, PrivacyStatus, StatusName, Reason, } from './iam-verification-v1-start-response.universal';
|
|
14
|
+
//# sourceMappingURL=iam-verification-v1-start-response.public.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"iam-verification-v1-start-response.public.js","sourceRoot":"","sources":["../../../src/iam-verification-v1-start-response.public.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,IAAI,cAAc,EAEvB,0BAA0B,IAAI,mCAAmC,GAElE,MAAM,gDAAgD,CAAC;AAExD,MAAM,CAAC,MAAM,UAAU,GAAG,EAAE,YAAY,EAAE,eAAe,EAAE,CAAC;AAE5D,MAAM,UAAU,KAAK,CAAC,UAAsB;IAC1C,OAAO,CAAC,OAAsB,EAAE,EAAE,CAChC,cAAc,CACZ,OAAO;IACP,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAED,MAAM,UAAU,0BAA0B,CAAC,UAAsB;IAC/D,OAAO,CAAC,IAAY,EAAE,OAA0C,EAAE,EAAE,CAClE,mCAAmC,CACjC,IAAI,EACJ,OAAO;IACP,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAED,OAAO,EACL,MAAM,EACN,SAAS,EACT,MAAM,EACN,aAAa,EACb,UAAU,EACV,MAAM,GACP,MAAM,gDAAgD,CAAC"}
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
export interface StartResponse {
|
|
2
|
+
/** the identifier of the verification process */
|
|
3
|
+
verificationId?: string;
|
|
4
|
+
}
|
|
5
|
+
export interface StartRequest {
|
|
6
|
+
/**
|
|
7
|
+
* an identity_Id.
|
|
8
|
+
* If not provided - currently, an exception is thrown. In the future the identity from identity response will be taken.
|
|
9
|
+
*/
|
|
10
|
+
identityId?: string | null;
|
|
11
|
+
/** the delivery target */
|
|
12
|
+
target?: Target;
|
|
13
|
+
}
|
|
14
|
+
export declare enum Target {
|
|
15
|
+
UNKNOWN_TARGET = "UNKNOWN_TARGET",
|
|
16
|
+
EMAIL = "EMAIL"
|
|
17
|
+
}
|
|
18
|
+
export interface VerifyRequest {
|
|
19
|
+
/** the code to verify */
|
|
20
|
+
code?: string;
|
|
21
|
+
/** the identifier of the verification process */
|
|
22
|
+
verificationId?: string;
|
|
23
|
+
}
|
|
24
|
+
export interface VerifyResponse {
|
|
25
|
+
}
|
|
26
|
+
export interface VerifyDuringAuthenticationRequest {
|
|
27
|
+
/** the code to verify */
|
|
28
|
+
code: string;
|
|
29
|
+
/** a state token with a REQUIRE_EMAIL_VERIFICATION state */
|
|
30
|
+
stateToken: string;
|
|
31
|
+
}
|
|
32
|
+
export interface StateMachineResponse {
|
|
33
|
+
state?: StateType;
|
|
34
|
+
sessionToken?: string | null;
|
|
35
|
+
stateToken?: string | null;
|
|
36
|
+
identity?: Identity;
|
|
37
|
+
}
|
|
38
|
+
export declare enum StateType {
|
|
39
|
+
UNKNOWN_STATE = "UNKNOWN_STATE",
|
|
40
|
+
SUCCESS = "SUCCESS",
|
|
41
|
+
REQUIRE_OWNER_APPROVAL = "REQUIRE_OWNER_APPROVAL",
|
|
42
|
+
REQUIRE_EMAIL_VERIFICATION = "REQUIRE_EMAIL_VERIFICATION",
|
|
43
|
+
STATUS_CHECK = "STATUS_CHECK"
|
|
44
|
+
}
|
|
45
|
+
export interface Identity {
|
|
46
|
+
/** Identity ID */
|
|
47
|
+
id?: string | null;
|
|
48
|
+
identifiers?: Identifier[];
|
|
49
|
+
/** @readonly */
|
|
50
|
+
status?: Status;
|
|
51
|
+
/** Represents the current state of an item. Each time the item is modified, its `revision` changes. for an update operation to succeed, you MUST pass the latest revision */
|
|
52
|
+
revision?: string | null;
|
|
53
|
+
/**
|
|
54
|
+
* Represents the time this Identity was created
|
|
55
|
+
* @readonly
|
|
56
|
+
*/
|
|
57
|
+
createdDate?: Date;
|
|
58
|
+
/**
|
|
59
|
+
* Represents the time this Identity was last updated
|
|
60
|
+
* @readonly
|
|
61
|
+
*/
|
|
62
|
+
updatedDate?: Date;
|
|
63
|
+
/** All the identity configured connections to authenticate with */
|
|
64
|
+
connections?: Connection[];
|
|
65
|
+
identityProfile?: IdentityProfile;
|
|
66
|
+
/** Stores additional information about the identity that can impact user access. This data can't be set by users. */
|
|
67
|
+
metadata?: Metadata;
|
|
68
|
+
email?: Email;
|
|
69
|
+
statusV2?: StatusV2;
|
|
70
|
+
}
|
|
71
|
+
export interface Identifier extends IdentifierValueOneOf {
|
|
72
|
+
email?: string;
|
|
73
|
+
userName?: string;
|
|
74
|
+
}
|
|
75
|
+
/** @oneof */
|
|
76
|
+
export interface IdentifierValueOneOf {
|
|
77
|
+
email?: string;
|
|
78
|
+
userName?: string;
|
|
79
|
+
}
|
|
80
|
+
export declare enum Status {
|
|
81
|
+
UNKNOWN_STATUS = "UNKNOWN_STATUS",
|
|
82
|
+
BLOCKED = "BLOCKED",
|
|
83
|
+
ACTIVE = "ACTIVE",
|
|
84
|
+
PROVISIONED = "PROVISIONED",
|
|
85
|
+
DELETED = "DELETED",
|
|
86
|
+
UNPROVISIONED = "UNPROVISIONED"
|
|
87
|
+
}
|
|
88
|
+
export interface Connection extends ConnectionTypeOneOf {
|
|
89
|
+
idpConnection?: IdpConnection;
|
|
90
|
+
authenticatorConnection?: AuthenticatorConnection;
|
|
91
|
+
}
|
|
92
|
+
/** @oneof */
|
|
93
|
+
export interface ConnectionTypeOneOf {
|
|
94
|
+
idpConnection?: IdpConnection;
|
|
95
|
+
authenticatorConnection?: AuthenticatorConnection;
|
|
96
|
+
}
|
|
97
|
+
export interface IdpConnection {
|
|
98
|
+
idpConnectionId?: string;
|
|
99
|
+
idpUserId?: string;
|
|
100
|
+
}
|
|
101
|
+
export interface AuthenticatorConnection {
|
|
102
|
+
authenticatorConnectionId?: string;
|
|
103
|
+
}
|
|
104
|
+
export interface IdentityProfile {
|
|
105
|
+
firstName?: string | null;
|
|
106
|
+
lastName?: string | null;
|
|
107
|
+
nickname?: string | null;
|
|
108
|
+
picture?: string | null;
|
|
109
|
+
emails?: string[];
|
|
110
|
+
phones?: string[];
|
|
111
|
+
labels?: string[];
|
|
112
|
+
language?: string | null;
|
|
113
|
+
privacyStatus?: PrivacyStatus;
|
|
114
|
+
/** custom profile fields */
|
|
115
|
+
customFields?: CustomField[];
|
|
116
|
+
}
|
|
117
|
+
export declare enum PrivacyStatus {
|
|
118
|
+
UNDEFINED = "UNDEFINED",
|
|
119
|
+
PUBLIC = "PUBLIC",
|
|
120
|
+
PRIVATE = "PRIVATE"
|
|
121
|
+
}
|
|
122
|
+
export interface CustomField {
|
|
123
|
+
name?: string;
|
|
124
|
+
value?: CustomValue;
|
|
125
|
+
}
|
|
126
|
+
export interface CustomValue extends CustomValueValueOneOf {
|
|
127
|
+
strValue?: string;
|
|
128
|
+
numValue?: number;
|
|
129
|
+
dateValue?: Date;
|
|
130
|
+
listValue?: ListValue;
|
|
131
|
+
mapValue?: MapValue;
|
|
132
|
+
}
|
|
133
|
+
/** @oneof */
|
|
134
|
+
export interface CustomValueValueOneOf {
|
|
135
|
+
strValue?: string;
|
|
136
|
+
numValue?: number;
|
|
137
|
+
dateValue?: Date;
|
|
138
|
+
listValue?: ListValue;
|
|
139
|
+
mapValue?: MapValue;
|
|
140
|
+
}
|
|
141
|
+
export interface ListValue {
|
|
142
|
+
value?: CustomValue[];
|
|
143
|
+
}
|
|
144
|
+
export interface MapValue {
|
|
145
|
+
value?: Record<string, CustomValue>;
|
|
146
|
+
}
|
|
147
|
+
export interface Metadata {
|
|
148
|
+
/**
|
|
149
|
+
* represents general tags such as "isOwner", "isContributor"
|
|
150
|
+
* @readonly
|
|
151
|
+
*/
|
|
152
|
+
tags?: string[];
|
|
153
|
+
}
|
|
154
|
+
export interface Email {
|
|
155
|
+
address?: string;
|
|
156
|
+
isVerified?: boolean;
|
|
157
|
+
}
|
|
158
|
+
export interface StatusV2 {
|
|
159
|
+
name?: StatusName;
|
|
160
|
+
reasons?: Reason[];
|
|
161
|
+
}
|
|
162
|
+
export declare enum StatusName {
|
|
163
|
+
UNKNOWN_STATUS = "UNKNOWN_STATUS",
|
|
164
|
+
PENDING = "PENDING",
|
|
165
|
+
ACTIVE = "ACTIVE",
|
|
166
|
+
DELETED = "DELETED",
|
|
167
|
+
BLOCKED = "BLOCKED"
|
|
168
|
+
}
|
|
169
|
+
export declare enum Reason {
|
|
170
|
+
UNKNOWN_REASON = "UNKNOWN_REASON",
|
|
171
|
+
PENDING_ADMIN_APPROVAL_REQUIRED = "PENDING_ADMIN_APPROVAL_REQUIRED",
|
|
172
|
+
PENDING_EMAIL_VERIFICATION_REQUIRED = "PENDING_EMAIL_VERIFICATION_REQUIRED"
|
|
173
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export var Target;
|
|
2
|
+
(function (Target) {
|
|
3
|
+
Target["UNKNOWN_TARGET"] = "UNKNOWN_TARGET";
|
|
4
|
+
Target["EMAIL"] = "EMAIL";
|
|
5
|
+
})(Target || (Target = {}));
|
|
6
|
+
export var StateType;
|
|
7
|
+
(function (StateType) {
|
|
8
|
+
StateType["UNKNOWN_STATE"] = "UNKNOWN_STATE";
|
|
9
|
+
StateType["SUCCESS"] = "SUCCESS";
|
|
10
|
+
StateType["REQUIRE_OWNER_APPROVAL"] = "REQUIRE_OWNER_APPROVAL";
|
|
11
|
+
StateType["REQUIRE_EMAIL_VERIFICATION"] = "REQUIRE_EMAIL_VERIFICATION";
|
|
12
|
+
StateType["STATUS_CHECK"] = "STATUS_CHECK";
|
|
13
|
+
})(StateType || (StateType = {}));
|
|
14
|
+
export var Status;
|
|
15
|
+
(function (Status) {
|
|
16
|
+
Status["UNKNOWN_STATUS"] = "UNKNOWN_STATUS";
|
|
17
|
+
Status["BLOCKED"] = "BLOCKED";
|
|
18
|
+
Status["ACTIVE"] = "ACTIVE";
|
|
19
|
+
Status["PROVISIONED"] = "PROVISIONED";
|
|
20
|
+
Status["DELETED"] = "DELETED";
|
|
21
|
+
Status["UNPROVISIONED"] = "UNPROVISIONED";
|
|
22
|
+
})(Status || (Status = {}));
|
|
23
|
+
export var PrivacyStatus;
|
|
24
|
+
(function (PrivacyStatus) {
|
|
25
|
+
PrivacyStatus["UNDEFINED"] = "UNDEFINED";
|
|
26
|
+
PrivacyStatus["PUBLIC"] = "PUBLIC";
|
|
27
|
+
PrivacyStatus["PRIVATE"] = "PRIVATE";
|
|
28
|
+
})(PrivacyStatus || (PrivacyStatus = {}));
|
|
29
|
+
export var StatusName;
|
|
30
|
+
(function (StatusName) {
|
|
31
|
+
StatusName["UNKNOWN_STATUS"] = "UNKNOWN_STATUS";
|
|
32
|
+
StatusName["PENDING"] = "PENDING";
|
|
33
|
+
StatusName["ACTIVE"] = "ACTIVE";
|
|
34
|
+
StatusName["DELETED"] = "DELETED";
|
|
35
|
+
StatusName["BLOCKED"] = "BLOCKED";
|
|
36
|
+
})(StatusName || (StatusName = {}));
|
|
37
|
+
export var Reason;
|
|
38
|
+
(function (Reason) {
|
|
39
|
+
Reason["UNKNOWN_REASON"] = "UNKNOWN_REASON";
|
|
40
|
+
Reason["PENDING_ADMIN_APPROVAL_REQUIRED"] = "PENDING_ADMIN_APPROVAL_REQUIRED";
|
|
41
|
+
Reason["PENDING_EMAIL_VERIFICATION_REQUIRED"] = "PENDING_EMAIL_VERIFICATION_REQUIRED";
|
|
42
|
+
})(Reason || (Reason = {}));
|
|
43
|
+
//# sourceMappingURL=iam-verification-v1-start-response.types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"iam-verification-v1-start-response.types.js","sourceRoot":"","sources":["../../../src/iam-verification-v1-start-response.types.ts"],"names":[],"mappings":"AAeA,MAAM,CAAN,IAAY,MAGX;AAHD,WAAY,MAAM;IAChB,2CAAiC,CAAA;IACjC,yBAAe,CAAA;AACjB,CAAC,EAHW,MAAM,KAAN,MAAM,QAGjB;AAyBD,MAAM,CAAN,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,KAAT,SAAS,QAMpB;AAwCD,MAAM,CAAN,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,KAAN,MAAM,QAOjB;AAoCD,MAAM,CAAN,IAAY,aAIX;AAJD,WAAY,aAAa;IACvB,wCAAuB,CAAA;IACvB,kCAAiB,CAAA;IACjB,oCAAmB,CAAA;AACrB,CAAC,EAJW,aAAa,KAAb,aAAa,QAIxB;AAkDD,MAAM,CAAN,IAAY,UAMX;AAND,WAAY,UAAU;IACpB,+CAAiC,CAAA;IACjC,iCAAmB,CAAA;IACnB,+BAAiB,CAAA;IACjB,iCAAmB,CAAA;IACnB,iCAAmB,CAAA;AACrB,CAAC,EANW,UAAU,KAAV,UAAU,QAMrB;AAED,MAAM,CAAN,IAAY,MAIX;AAJD,WAAY,MAAM;IAChB,2CAAiC,CAAA;IACjC,6EAAmE,CAAA;IACnE,qFAA2E,CAAA;AAC7E,CAAC,EAJW,MAAM,KAAN,MAAM,QAIjB"}
|