@wix/identity 1.0.23 → 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-authentication-v1-authentication.public.d.ts +2 -2
- package/build/cjs/src/iam-authentication-v1-authentication.public.js +3 -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 +22 -0
- package/build/cjs/src/iam-authentication-v1-authentication.types.js +15 -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 +22 -0
- package/build/cjs/src/iam-authentication-v1-authentication.universal.js +15 -1
- package/build/cjs/src/iam-authentication-v1-authentication.universal.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-authentication-v1-authentication.public.d.ts +2 -2
- package/build/es/src/iam-authentication-v1-authentication.public.js +1 -1
- package/build/es/src/iam-authentication-v1-authentication.public.js.map +1 -1
- package/build/es/src/iam-authentication-v1-authentication.types.d.ts +22 -0
- package/build/es/src/iam-authentication-v1-authentication.types.js +14 -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 +22 -0
- package/build/es/src/iam-authentication-v1-authentication.universal.js +14 -0
- package/build/es/src/iam-authentication-v1-authentication.universal.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,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":"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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,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"}
|
|
@@ -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
|
+
}
|