@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
package/build/cjs/index.d.ts
CHANGED
package/build/cjs/index.js
CHANGED
|
@@ -19,7 +19,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
19
19
|
return result;
|
|
20
20
|
};
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.oauth = exports.authentication = void 0;
|
|
22
|
+
exports.oauth = exports.verification = exports.authentication = void 0;
|
|
23
23
|
exports.authentication = __importStar(require("./src/iam-authentication-v1-authentication.public"));
|
|
24
|
+
exports.verification = __importStar(require("./src/iam-verification-v1-start-response.public"));
|
|
24
25
|
exports.oauth = __importStar(require("./src/identity-oauth-v1-refresh-token.public"));
|
|
25
26
|
//# sourceMappingURL=index.js.map
|
package/build/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,oGAAoF;AACpF,sFAAsE"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,oGAAoF;AACpF,gGAAgF;AAChF,sFAAsE"}
|
|
@@ -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,91 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.verifyDuringAuthentication = exports.start = void 0;
|
|
4
|
+
const ambassador_1 = require("@wix/metro-runtime/ambassador");
|
|
5
|
+
const metro_runtime_1 = require("@wix/metro-runtime");
|
|
6
|
+
const _customField = { value: '_customValue' };
|
|
7
|
+
const _customValue = {
|
|
8
|
+
numValue: 'DOUBLE',
|
|
9
|
+
dateValue: 'google.protobuf.Timestamp',
|
|
10
|
+
listValue: '_listValue',
|
|
11
|
+
mapValue: '_mapValue',
|
|
12
|
+
};
|
|
13
|
+
const _identity = {
|
|
14
|
+
createdDate: 'google.protobuf.Timestamp',
|
|
15
|
+
updatedDate: 'google.protobuf.Timestamp',
|
|
16
|
+
identityProfile: '_identityProfile',
|
|
17
|
+
};
|
|
18
|
+
const _identityProfile = { customFields: '_customField' };
|
|
19
|
+
const _listValue = { value: '_customValue' };
|
|
20
|
+
const _mapValue = { value: 'Map#_customValue' };
|
|
21
|
+
const _startRequest = {};
|
|
22
|
+
const _startResponse = {};
|
|
23
|
+
const _stateMachineResponse = { identity: '_identity' };
|
|
24
|
+
const _verifyDuringAuthenticationRequest = {};
|
|
25
|
+
function resolveWixIamVerificationV1VerificationServiceUrl(opts) {
|
|
26
|
+
const domainToMappings = {};
|
|
27
|
+
return (0, metro_runtime_1.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* starts a verification process
|
|
31
|
+
* example: sends a code to the identity's email
|
|
32
|
+
*/
|
|
33
|
+
function start(payload) {
|
|
34
|
+
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_startRequest, {});
|
|
35
|
+
const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_startResponse, {});
|
|
36
|
+
function __start({ host }) {
|
|
37
|
+
const serializedData = toReq(payload);
|
|
38
|
+
const metadata = {
|
|
39
|
+
entityFqdn: 'wix.iam.verification.v1.start_response',
|
|
40
|
+
method: 'POST',
|
|
41
|
+
methodFqn: 'wix.iam.verification.v1.VerificationService.Start',
|
|
42
|
+
url: resolveWixIamVerificationV1VerificationServiceUrl({
|
|
43
|
+
protoPath: '/v1/Start',
|
|
44
|
+
data: serializedData,
|
|
45
|
+
host,
|
|
46
|
+
}),
|
|
47
|
+
data: serializedData,
|
|
48
|
+
transformResponse: fromRes,
|
|
49
|
+
};
|
|
50
|
+
return metadata;
|
|
51
|
+
}
|
|
52
|
+
__start.fromReq = fromReq;
|
|
53
|
+
return __start;
|
|
54
|
+
}
|
|
55
|
+
exports.start = start;
|
|
56
|
+
/**
|
|
57
|
+
* verifies the code in the request.
|
|
58
|
+
* this endpoint is meant to be called during the authentication process only, thus it requires a stateToken.
|
|
59
|
+
* the identity_id and the verification_id are extracted from the stateToken
|
|
60
|
+
*/
|
|
61
|
+
function verifyDuringAuthentication(payload) {
|
|
62
|
+
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_verifyDuringAuthenticationRequest, {});
|
|
63
|
+
const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_stateMachineResponse, {
|
|
64
|
+
_customField,
|
|
65
|
+
_customValue,
|
|
66
|
+
_identity,
|
|
67
|
+
_identityProfile,
|
|
68
|
+
_listValue,
|
|
69
|
+
_mapValue,
|
|
70
|
+
});
|
|
71
|
+
function __verifyDuringAuthentication({ host }) {
|
|
72
|
+
const serializedData = toReq(payload);
|
|
73
|
+
const metadata = {
|
|
74
|
+
entityFqdn: 'wix.iam.verification.v1.start_response',
|
|
75
|
+
method: 'POST',
|
|
76
|
+
methodFqn: 'wix.iam.verification.v1.VerificationService.VerifyDuringAuthentication',
|
|
77
|
+
url: resolveWixIamVerificationV1VerificationServiceUrl({
|
|
78
|
+
protoPath: '/v1/auth/verify',
|
|
79
|
+
data: serializedData,
|
|
80
|
+
host,
|
|
81
|
+
}),
|
|
82
|
+
data: serializedData,
|
|
83
|
+
transformResponse: fromRes,
|
|
84
|
+
};
|
|
85
|
+
return metadata;
|
|
86
|
+
}
|
|
87
|
+
__verifyDuringAuthentication.fromReq = fromReq;
|
|
88
|
+
return __verifyDuringAuthentication;
|
|
89
|
+
}
|
|
90
|
+
exports.verifyDuringAuthentication = verifyDuringAuthentication;
|
|
91
|
+
//# 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":"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"}
|
|
@@ -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,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Reason = exports.StatusName = exports.PrivacyStatus = exports.Status = exports.StateType = exports.Target = exports.verifyDuringAuthentication = exports.start = exports.__metadata = void 0;
|
|
4
|
+
const iam_verification_v1_start_response_universal_1 = require("./iam-verification-v1-start-response.universal");
|
|
5
|
+
exports.__metadata = { PACKAGE_NAME: '@wix/identity' };
|
|
6
|
+
function start(httpClient) {
|
|
7
|
+
return (options) => (0, iam_verification_v1_start_response_universal_1.start)(options,
|
|
8
|
+
// @ts-ignore
|
|
9
|
+
{ httpClient });
|
|
10
|
+
}
|
|
11
|
+
exports.start = start;
|
|
12
|
+
function verifyDuringAuthentication(httpClient) {
|
|
13
|
+
return (code, options) => (0, iam_verification_v1_start_response_universal_1.verifyDuringAuthentication)(code, options,
|
|
14
|
+
// @ts-ignore
|
|
15
|
+
{ httpClient });
|
|
16
|
+
}
|
|
17
|
+
exports.verifyDuringAuthentication = verifyDuringAuthentication;
|
|
18
|
+
var iam_verification_v1_start_response_universal_2 = require("./iam-verification-v1-start-response.universal");
|
|
19
|
+
Object.defineProperty(exports, "Target", { enumerable: true, get: function () { return iam_verification_v1_start_response_universal_2.Target; } });
|
|
20
|
+
Object.defineProperty(exports, "StateType", { enumerable: true, get: function () { return iam_verification_v1_start_response_universal_2.StateType; } });
|
|
21
|
+
Object.defineProperty(exports, "Status", { enumerable: true, get: function () { return iam_verification_v1_start_response_universal_2.Status; } });
|
|
22
|
+
Object.defineProperty(exports, "PrivacyStatus", { enumerable: true, get: function () { return iam_verification_v1_start_response_universal_2.PrivacyStatus; } });
|
|
23
|
+
Object.defineProperty(exports, "StatusName", { enumerable: true, get: function () { return iam_verification_v1_start_response_universal_2.StatusName; } });
|
|
24
|
+
Object.defineProperty(exports, "Reason", { enumerable: true, get: function () { return iam_verification_v1_start_response_universal_2.Reason; } });
|
|
25
|
+
//# 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,iHAKwD;AAE3C,QAAA,UAAU,GAAG,EAAE,YAAY,EAAE,eAAe,EAAE,CAAC;AAE5D,SAAgB,KAAK,CAAC,UAAsB;IAC1C,OAAO,CAAC,OAAsB,EAAE,EAAE,CAChC,IAAA,oDAAc,EACZ,OAAO;IACP,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAPD,sBAOC;AAED,SAAgB,0BAA0B,CAAC,UAAsB;IAC/D,OAAO,CAAC,IAAY,EAAE,OAA0C,EAAE,EAAE,CAClE,IAAA,yEAAmC,EACjC,IAAI,EACJ,OAAO;IACP,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AARD,gEAQC;AAED,+GAOwD;AANtD,sIAAA,MAAM,OAAA;AACN,yIAAA,SAAS,OAAA;AACT,sIAAA,MAAM,OAAA;AACN,6IAAA,aAAa,OAAA;AACb,0IAAA,UAAU,OAAA;AACV,sIAAA,MAAM,OAAA"}
|
|
@@ -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,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Reason = exports.StatusName = exports.PrivacyStatus = exports.Status = exports.StateType = exports.Target = void 0;
|
|
4
|
+
var Target;
|
|
5
|
+
(function (Target) {
|
|
6
|
+
Target["UNKNOWN_TARGET"] = "UNKNOWN_TARGET";
|
|
7
|
+
Target["EMAIL"] = "EMAIL";
|
|
8
|
+
})(Target = exports.Target || (exports.Target = {}));
|
|
9
|
+
var StateType;
|
|
10
|
+
(function (StateType) {
|
|
11
|
+
StateType["UNKNOWN_STATE"] = "UNKNOWN_STATE";
|
|
12
|
+
StateType["SUCCESS"] = "SUCCESS";
|
|
13
|
+
StateType["REQUIRE_OWNER_APPROVAL"] = "REQUIRE_OWNER_APPROVAL";
|
|
14
|
+
StateType["REQUIRE_EMAIL_VERIFICATION"] = "REQUIRE_EMAIL_VERIFICATION";
|
|
15
|
+
StateType["STATUS_CHECK"] = "STATUS_CHECK";
|
|
16
|
+
})(StateType = exports.StateType || (exports.StateType = {}));
|
|
17
|
+
var Status;
|
|
18
|
+
(function (Status) {
|
|
19
|
+
Status["UNKNOWN_STATUS"] = "UNKNOWN_STATUS";
|
|
20
|
+
Status["BLOCKED"] = "BLOCKED";
|
|
21
|
+
Status["ACTIVE"] = "ACTIVE";
|
|
22
|
+
Status["PROVISIONED"] = "PROVISIONED";
|
|
23
|
+
Status["DELETED"] = "DELETED";
|
|
24
|
+
Status["UNPROVISIONED"] = "UNPROVISIONED";
|
|
25
|
+
})(Status = exports.Status || (exports.Status = {}));
|
|
26
|
+
var PrivacyStatus;
|
|
27
|
+
(function (PrivacyStatus) {
|
|
28
|
+
PrivacyStatus["UNDEFINED"] = "UNDEFINED";
|
|
29
|
+
PrivacyStatus["PUBLIC"] = "PUBLIC";
|
|
30
|
+
PrivacyStatus["PRIVATE"] = "PRIVATE";
|
|
31
|
+
})(PrivacyStatus = exports.PrivacyStatus || (exports.PrivacyStatus = {}));
|
|
32
|
+
var StatusName;
|
|
33
|
+
(function (StatusName) {
|
|
34
|
+
StatusName["UNKNOWN_STATUS"] = "UNKNOWN_STATUS";
|
|
35
|
+
StatusName["PENDING"] = "PENDING";
|
|
36
|
+
StatusName["ACTIVE"] = "ACTIVE";
|
|
37
|
+
StatusName["DELETED"] = "DELETED";
|
|
38
|
+
StatusName["BLOCKED"] = "BLOCKED";
|
|
39
|
+
})(StatusName = exports.StatusName || (exports.StatusName = {}));
|
|
40
|
+
var Reason;
|
|
41
|
+
(function (Reason) {
|
|
42
|
+
Reason["UNKNOWN_REASON"] = "UNKNOWN_REASON";
|
|
43
|
+
Reason["PENDING_ADMIN_APPROVAL_REQUIRED"] = "PENDING_ADMIN_APPROVAL_REQUIRED";
|
|
44
|
+
Reason["PENDING_EMAIL_VERIFICATION_REQUIRED"] = "PENDING_EMAIL_VERIFICATION_REQUIRED";
|
|
45
|
+
})(Reason = exports.Reason || (exports.Reason = {}));
|
|
46
|
+
//# 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,IAAY,MAGX;AAHD,WAAY,MAAM;IAChB,2CAAiC,CAAA;IACjC,yBAAe,CAAA;AACjB,CAAC,EAHW,MAAM,GAAN,cAAM,KAAN,cAAM,QAGjB;AAyBD,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;AAwCD,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"}
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
export declare const __debug: {
|
|
2
|
+
verboseLogging: {
|
|
3
|
+
on: () => boolean;
|
|
4
|
+
off: () => boolean;
|
|
5
|
+
};
|
|
6
|
+
};
|
|
7
|
+
export interface StartResponse {
|
|
8
|
+
/** the identifier of the verification process */
|
|
9
|
+
verificationId?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface StartRequest {
|
|
12
|
+
/**
|
|
13
|
+
* an identity_Id.
|
|
14
|
+
* If not provided - currently, an exception is thrown. In the future the identity from identity response will be taken.
|
|
15
|
+
*/
|
|
16
|
+
identityId?: string | null;
|
|
17
|
+
/** the delivery target */
|
|
18
|
+
target?: Target;
|
|
19
|
+
}
|
|
20
|
+
export declare enum Target {
|
|
21
|
+
UNKNOWN_TARGET = "UNKNOWN_TARGET",
|
|
22
|
+
EMAIL = "EMAIL"
|
|
23
|
+
}
|
|
24
|
+
export interface VerifyRequest {
|
|
25
|
+
/** the code to verify */
|
|
26
|
+
code?: string;
|
|
27
|
+
/** the identifier of the verification process */
|
|
28
|
+
verificationId?: string;
|
|
29
|
+
}
|
|
30
|
+
export interface VerifyResponse {
|
|
31
|
+
}
|
|
32
|
+
export interface VerifyDuringAuthenticationRequest {
|
|
33
|
+
/** the code to verify */
|
|
34
|
+
code: string;
|
|
35
|
+
/** a state token with a REQUIRE_EMAIL_VERIFICATION state */
|
|
36
|
+
stateToken: string;
|
|
37
|
+
}
|
|
38
|
+
export interface StateMachineResponse {
|
|
39
|
+
state?: StateType;
|
|
40
|
+
sessionToken?: string | null;
|
|
41
|
+
stateToken?: string | null;
|
|
42
|
+
identity?: Identity;
|
|
43
|
+
}
|
|
44
|
+
export declare enum StateType {
|
|
45
|
+
UNKNOWN_STATE = "UNKNOWN_STATE",
|
|
46
|
+
SUCCESS = "SUCCESS",
|
|
47
|
+
REQUIRE_OWNER_APPROVAL = "REQUIRE_OWNER_APPROVAL",
|
|
48
|
+
REQUIRE_EMAIL_VERIFICATION = "REQUIRE_EMAIL_VERIFICATION",
|
|
49
|
+
STATUS_CHECK = "STATUS_CHECK"
|
|
50
|
+
}
|
|
51
|
+
export interface Identity {
|
|
52
|
+
/** Identity ID */
|
|
53
|
+
_id?: string | null;
|
|
54
|
+
identifiers?: Identifier[];
|
|
55
|
+
/** @readonly */
|
|
56
|
+
status?: Status;
|
|
57
|
+
/** 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 */
|
|
58
|
+
revision?: string | null;
|
|
59
|
+
/**
|
|
60
|
+
* Represents the time this Identity was created
|
|
61
|
+
* @readonly
|
|
62
|
+
*/
|
|
63
|
+
_createdDate?: Date;
|
|
64
|
+
/**
|
|
65
|
+
* Represents the time this Identity was last updated
|
|
66
|
+
* @readonly
|
|
67
|
+
*/
|
|
68
|
+
_updatedDate?: Date;
|
|
69
|
+
/** All the identity configured connections to authenticate with */
|
|
70
|
+
connections?: Connection[];
|
|
71
|
+
identityProfile?: IdentityProfile;
|
|
72
|
+
/** Stores additional information about the identity that can impact user access. This data can't be set by users. */
|
|
73
|
+
metadata?: Metadata;
|
|
74
|
+
email?: Email;
|
|
75
|
+
statusV2?: StatusV2;
|
|
76
|
+
}
|
|
77
|
+
export interface Identifier extends IdentifierValueOneOf {
|
|
78
|
+
email?: string;
|
|
79
|
+
userName?: string;
|
|
80
|
+
}
|
|
81
|
+
/** @oneof */
|
|
82
|
+
export interface IdentifierValueOneOf {
|
|
83
|
+
email?: string;
|
|
84
|
+
userName?: string;
|
|
85
|
+
}
|
|
86
|
+
export declare enum Status {
|
|
87
|
+
UNKNOWN_STATUS = "UNKNOWN_STATUS",
|
|
88
|
+
BLOCKED = "BLOCKED",
|
|
89
|
+
ACTIVE = "ACTIVE",
|
|
90
|
+
PROVISIONED = "PROVISIONED",
|
|
91
|
+
DELETED = "DELETED",
|
|
92
|
+
UNPROVISIONED = "UNPROVISIONED"
|
|
93
|
+
}
|
|
94
|
+
export interface Connection extends ConnectionTypeOneOf {
|
|
95
|
+
idpConnection?: IdpConnection;
|
|
96
|
+
authenticatorConnection?: AuthenticatorConnection;
|
|
97
|
+
}
|
|
98
|
+
/** @oneof */
|
|
99
|
+
export interface ConnectionTypeOneOf {
|
|
100
|
+
idpConnection?: IdpConnection;
|
|
101
|
+
authenticatorConnection?: AuthenticatorConnection;
|
|
102
|
+
}
|
|
103
|
+
export interface IdpConnection {
|
|
104
|
+
idpConnectionId?: string;
|
|
105
|
+
idpUserId?: string;
|
|
106
|
+
}
|
|
107
|
+
export interface AuthenticatorConnection {
|
|
108
|
+
authenticatorConnectionId?: string;
|
|
109
|
+
}
|
|
110
|
+
export interface IdentityProfile {
|
|
111
|
+
firstName?: string | null;
|
|
112
|
+
lastName?: string | null;
|
|
113
|
+
nickname?: string | null;
|
|
114
|
+
picture?: string | null;
|
|
115
|
+
emails?: string[];
|
|
116
|
+
phones?: string[];
|
|
117
|
+
labels?: string[];
|
|
118
|
+
language?: string | null;
|
|
119
|
+
privacyStatus?: PrivacyStatus;
|
|
120
|
+
/** custom profile fields */
|
|
121
|
+
customFields?: CustomField[];
|
|
122
|
+
}
|
|
123
|
+
export declare enum PrivacyStatus {
|
|
124
|
+
UNDEFINED = "UNDEFINED",
|
|
125
|
+
PUBLIC = "PUBLIC",
|
|
126
|
+
PRIVATE = "PRIVATE"
|
|
127
|
+
}
|
|
128
|
+
export interface CustomField {
|
|
129
|
+
name?: string;
|
|
130
|
+
value?: CustomValue;
|
|
131
|
+
}
|
|
132
|
+
export interface CustomValue extends CustomValueValueOneOf {
|
|
133
|
+
strValue?: string;
|
|
134
|
+
numValue?: number;
|
|
135
|
+
dateValue?: Date;
|
|
136
|
+
listValue?: ListValue;
|
|
137
|
+
mapValue?: MapValue;
|
|
138
|
+
}
|
|
139
|
+
/** @oneof */
|
|
140
|
+
export interface CustomValueValueOneOf {
|
|
141
|
+
strValue?: string;
|
|
142
|
+
numValue?: number;
|
|
143
|
+
dateValue?: Date;
|
|
144
|
+
listValue?: ListValue;
|
|
145
|
+
mapValue?: MapValue;
|
|
146
|
+
}
|
|
147
|
+
export interface ListValue {
|
|
148
|
+
value?: CustomValue[];
|
|
149
|
+
}
|
|
150
|
+
export interface MapValue {
|
|
151
|
+
value?: Record<string, CustomValue>;
|
|
152
|
+
}
|
|
153
|
+
export interface Metadata {
|
|
154
|
+
/**
|
|
155
|
+
* represents general tags such as "isOwner", "isContributor"
|
|
156
|
+
* @readonly
|
|
157
|
+
*/
|
|
158
|
+
tags?: string[];
|
|
159
|
+
}
|
|
160
|
+
export interface Email {
|
|
161
|
+
address?: string;
|
|
162
|
+
isVerified?: boolean;
|
|
163
|
+
}
|
|
164
|
+
export interface StatusV2 {
|
|
165
|
+
name?: StatusName;
|
|
166
|
+
reasons?: Reason[];
|
|
167
|
+
}
|
|
168
|
+
export declare enum StatusName {
|
|
169
|
+
UNKNOWN_STATUS = "UNKNOWN_STATUS",
|
|
170
|
+
PENDING = "PENDING",
|
|
171
|
+
ACTIVE = "ACTIVE",
|
|
172
|
+
DELETED = "DELETED",
|
|
173
|
+
BLOCKED = "BLOCKED"
|
|
174
|
+
}
|
|
175
|
+
export declare enum Reason {
|
|
176
|
+
UNKNOWN_REASON = "UNKNOWN_REASON",
|
|
177
|
+
PENDING_ADMIN_APPROVAL_REQUIRED = "PENDING_ADMIN_APPROVAL_REQUIRED",
|
|
178
|
+
PENDING_EMAIL_VERIFICATION_REQUIRED = "PENDING_EMAIL_VERIFICATION_REQUIRED"
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* starts a verification process
|
|
182
|
+
* example: sends a code to the identity's email
|
|
183
|
+
* @public
|
|
184
|
+
* @documentationMaturity preview
|
|
185
|
+
*/
|
|
186
|
+
export declare function start(options?: StartOptions): Promise<StartResponse>;
|
|
187
|
+
export interface StartOptions {
|
|
188
|
+
/**
|
|
189
|
+
* an identity_Id.
|
|
190
|
+
* If not provided - currently, an exception is thrown. In the future the identity from identity response will be taken.
|
|
191
|
+
*/
|
|
192
|
+
identityId?: string | null;
|
|
193
|
+
/** the delivery target */
|
|
194
|
+
target?: Target;
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* verifies the code in the request.
|
|
198
|
+
* this endpoint is meant to be called during the authentication process only, thus it requires a stateToken.
|
|
199
|
+
* the identity_id and the verification_id are extracted from the stateToken
|
|
200
|
+
* @param code - the code to verify
|
|
201
|
+
* @public
|
|
202
|
+
* @documentationMaturity preview
|
|
203
|
+
* @requiredField code
|
|
204
|
+
* @requiredField options
|
|
205
|
+
* @requiredField options.stateToken
|
|
206
|
+
*/
|
|
207
|
+
export declare function verifyDuringAuthentication(code: string, options: VerifyDuringAuthenticationOptions): Promise<StateMachineResponse>;
|
|
208
|
+
export interface VerifyDuringAuthenticationOptions {
|
|
209
|
+
/** a state token with a REQUIRE_EMAIL_VERIFICATION state */
|
|
210
|
+
stateToken: string;
|
|
211
|
+
}
|