@trinsic/api 0.6.0 → 0.6.2
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/dist/apis/AttachmentsApi.d.ts +53 -0
- package/dist/apis/AttachmentsApi.js +68 -0
- package/dist/apis/NetworkApi.d.ts +76 -0
- package/dist/apis/NetworkApi.js +104 -0
- package/dist/apis/SessionsApi.d.ts +193 -0
- package/dist/apis/SessionsApi.js +262 -0
- package/dist/apis/index.d.ts +3 -0
- package/dist/apis/index.js +21 -0
- package/dist/esm/apis/AttachmentsApi.d.ts +53 -0
- package/dist/esm/apis/AttachmentsApi.js +64 -0
- package/dist/esm/apis/NetworkApi.d.ts +76 -0
- package/dist/esm/apis/NetworkApi.js +100 -0
- package/dist/esm/apis/SessionsApi.d.ts +193 -0
- package/dist/esm/apis/SessionsApi.js +258 -0
- package/dist/esm/apis/index.d.ts +3 -0
- package/dist/esm/apis/index.js +5 -0
- package/dist/esm/index.d.ts +3 -0
- package/dist/esm/index.js +5 -0
- package/dist/esm/models/Address.d.ts +73 -0
- package/dist/esm/models/Address.js +52 -0
- package/dist/esm/models/Attachments.d.ts +51 -0
- package/dist/esm/models/Attachments.js +44 -0
- package/dist/esm/models/CancelSessionResponse.d.ts +32 -0
- package/dist/esm/models/CancelSessionResponse.js +41 -0
- package/dist/esm/models/CreateSessionRequest.d.ts +52 -0
- package/dist/esm/models/CreateSessionRequest.js +43 -0
- package/dist/esm/models/CreateSessionResponse.d.ts +43 -0
- package/dist/esm/models/CreateSessionResponse.js +43 -0
- package/dist/esm/models/DisclosedFields.d.ts +97 -0
- package/dist/esm/models/DisclosedFields.js +84 -0
- package/dist/esm/models/DisclosedFieldsRequest.d.ts +97 -0
- package/dist/esm/models/DisclosedFieldsRequest.js +60 -0
- package/dist/esm/models/DocumentData.d.ts +61 -0
- package/dist/esm/models/DocumentData.js +48 -0
- package/dist/esm/models/FailureMessage.d.ts +31 -0
- package/dist/esm/models/FailureMessage.js +40 -0
- package/dist/esm/models/GetAttachmentRequest.d.ts +31 -0
- package/dist/esm/models/GetAttachmentRequest.js +40 -0
- package/dist/esm/models/GetSessionResponse.d.ts +32 -0
- package/dist/esm/models/GetSessionResponse.js +41 -0
- package/dist/esm/models/GetSessionResultRequest.d.ts +31 -0
- package/dist/esm/models/GetSessionResultRequest.js +40 -0
- package/dist/esm/models/GetSessionResultResponse.d.ts +39 -0
- package/dist/esm/models/GetSessionResultResponse.js +44 -0
- package/dist/esm/models/IdentityData.d.ts +52 -0
- package/dist/esm/models/IdentityData.js +47 -0
- package/dist/esm/models/IdentityLookupResponse.d.ts +31 -0
- package/dist/esm/models/IdentityLookupResponse.js +40 -0
- package/dist/esm/models/ListProvidersResponse.d.ts +32 -0
- package/dist/esm/models/ListProvidersResponse.js +41 -0
- package/dist/esm/models/ListSessionsResponse.d.ts +44 -0
- package/dist/esm/models/ListSessionsResponse.js +49 -0
- package/dist/esm/models/OrderDirection.d.ts +24 -0
- package/dist/esm/models/OrderDirection.js +40 -0
- package/dist/esm/models/PersonData.d.ts +82 -0
- package/dist/esm/models/PersonData.js +55 -0
- package/dist/esm/models/ProviderInfo.d.ts +43 -0
- package/dist/esm/models/ProviderInfo.js +48 -0
- package/dist/esm/models/Session.d.ts +71 -0
- package/dist/esm/models/Session.js +66 -0
- package/dist/esm/models/SessionFailCode.d.ts +29 -0
- package/dist/esm/models/SessionFailCode.js +45 -0
- package/dist/esm/models/SessionOrdering.d.ts +25 -0
- package/dist/esm/models/SessionOrdering.js +41 -0
- package/dist/esm/models/SessionState.d.ts +28 -0
- package/dist/esm/models/SessionState.js +44 -0
- package/dist/esm/models/ValidationResult.d.ts +37 -0
- package/dist/esm/models/ValidationResult.js +41 -0
- package/dist/esm/models/Verification.d.ts +38 -0
- package/dist/esm/models/Verification.js +41 -0
- package/dist/esm/models/VerificationFailCode.d.ts +27 -0
- package/dist/esm/models/VerificationFailCode.js +43 -0
- package/dist/esm/models/index.d.ts +27 -0
- package/dist/esm/models/index.js +29 -0
- package/dist/esm/runtime.d.ts +181 -0
- package/dist/esm/runtime.js +326 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +21 -0
- package/dist/models/Address.d.ts +73 -0
- package/dist/models/Address.js +58 -0
- package/dist/models/Attachments.d.ts +51 -0
- package/dist/models/Attachments.js +50 -0
- package/dist/models/CancelSessionResponse.d.ts +32 -0
- package/dist/models/CancelSessionResponse.js +47 -0
- package/dist/models/CreateSessionRequest.d.ts +52 -0
- package/dist/models/CreateSessionRequest.js +49 -0
- package/dist/models/CreateSessionResponse.d.ts +43 -0
- package/dist/models/CreateSessionResponse.js +49 -0
- package/dist/models/DisclosedFields.d.ts +97 -0
- package/dist/models/DisclosedFields.js +90 -0
- package/dist/models/DisclosedFieldsRequest.d.ts +97 -0
- package/dist/models/DisclosedFieldsRequest.js +66 -0
- package/dist/models/DocumentData.d.ts +61 -0
- package/dist/models/DocumentData.js +54 -0
- package/dist/models/FailureMessage.d.ts +31 -0
- package/dist/models/FailureMessage.js +46 -0
- package/dist/models/GetAttachmentRequest.d.ts +31 -0
- package/dist/models/GetAttachmentRequest.js +46 -0
- package/dist/models/GetSessionResponse.d.ts +32 -0
- package/dist/models/GetSessionResponse.js +47 -0
- package/dist/models/GetSessionResultRequest.d.ts +31 -0
- package/dist/models/GetSessionResultRequest.js +46 -0
- package/dist/models/GetSessionResultResponse.d.ts +39 -0
- package/dist/models/GetSessionResultResponse.js +50 -0
- package/dist/models/IdentityData.d.ts +52 -0
- package/dist/models/IdentityData.js +53 -0
- package/dist/models/IdentityLookupResponse.d.ts +31 -0
- package/dist/models/IdentityLookupResponse.js +46 -0
- package/dist/models/ListProvidersResponse.d.ts +32 -0
- package/dist/models/ListProvidersResponse.js +47 -0
- package/dist/models/ListSessionsResponse.d.ts +44 -0
- package/dist/models/ListSessionsResponse.js +55 -0
- package/dist/models/OrderDirection.d.ts +24 -0
- package/dist/models/OrderDirection.js +47 -0
- package/dist/models/PersonData.d.ts +82 -0
- package/dist/models/PersonData.js +61 -0
- package/dist/models/ProviderInfo.d.ts +43 -0
- package/dist/models/ProviderInfo.js +54 -0
- package/dist/models/Session.d.ts +71 -0
- package/dist/models/Session.js +72 -0
- package/dist/models/SessionFailCode.d.ts +29 -0
- package/dist/models/SessionFailCode.js +52 -0
- package/dist/models/SessionOrdering.d.ts +25 -0
- package/dist/models/SessionOrdering.js +48 -0
- package/dist/models/SessionState.d.ts +28 -0
- package/dist/models/SessionState.js +51 -0
- package/dist/models/ValidationResult.d.ts +37 -0
- package/dist/models/ValidationResult.js +47 -0
- package/dist/models/Verification.d.ts +38 -0
- package/dist/models/Verification.js +47 -0
- package/dist/models/VerificationFailCode.d.ts +27 -0
- package/dist/models/VerificationFailCode.js +50 -0
- package/dist/models/index.d.ts +27 -0
- package/dist/models/index.js +45 -0
- package/dist/runtime.d.ts +181 -0
- package/dist/runtime.js +341 -0
- package/package.json +1 -1
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Connect API
|
|
6
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: v1
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
16
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
17
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
18
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
19
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
20
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
21
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.SessionsApi = void 0;
|
|
26
|
+
const runtime = require("../runtime");
|
|
27
|
+
const index_1 = require("../models/index");
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
31
|
+
class SessionsApi extends runtime.BaseAPI {
|
|
32
|
+
/**
|
|
33
|
+
* Cancel a Session by its ID
|
|
34
|
+
* Cancel Session
|
|
35
|
+
*/
|
|
36
|
+
cancelSessionRaw(requestParameters, initOverrides) {
|
|
37
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
+
if (requestParameters['sessionId'] == null) {
|
|
39
|
+
throw new runtime.RequiredError('sessionId', 'Required parameter "sessionId" was null or undefined when calling cancelSession().');
|
|
40
|
+
}
|
|
41
|
+
const queryParameters = {};
|
|
42
|
+
const headerParameters = {};
|
|
43
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
44
|
+
const token = this.configuration.accessToken;
|
|
45
|
+
const tokenString = yield token("Bearer", []);
|
|
46
|
+
if (tokenString) {
|
|
47
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
const response = yield this.request({
|
|
51
|
+
path: `/api/v1/sessions/{sessionId}/cancel`.replace(`{${"sessionId"}}`, encodeURIComponent(String(requestParameters['sessionId']))),
|
|
52
|
+
method: 'POST',
|
|
53
|
+
headers: headerParameters,
|
|
54
|
+
query: queryParameters,
|
|
55
|
+
}, initOverrides);
|
|
56
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.CancelSessionResponseFromJSON)(jsonValue));
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Cancel a Session by its ID
|
|
61
|
+
* Cancel Session
|
|
62
|
+
*/
|
|
63
|
+
cancelSession(sessionId, initOverrides) {
|
|
64
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
65
|
+
const response = yield this.cancelSessionRaw({ sessionId: sessionId }, initOverrides);
|
|
66
|
+
return yield response.value();
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Create a Session to verify a user\'s identity
|
|
71
|
+
* Create Session
|
|
72
|
+
*/
|
|
73
|
+
createSessionRaw(requestParameters, initOverrides) {
|
|
74
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
75
|
+
const queryParameters = {};
|
|
76
|
+
const headerParameters = {};
|
|
77
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
78
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
79
|
+
const token = this.configuration.accessToken;
|
|
80
|
+
const tokenString = yield token("Bearer", []);
|
|
81
|
+
if (tokenString) {
|
|
82
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
const response = yield this.request({
|
|
86
|
+
path: `/api/v1/sessions`,
|
|
87
|
+
method: 'POST',
|
|
88
|
+
headers: headerParameters,
|
|
89
|
+
query: queryParameters,
|
|
90
|
+
body: (0, index_1.CreateSessionRequestToJSON)(requestParameters['createSessionRequest']),
|
|
91
|
+
}, initOverrides);
|
|
92
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.CreateSessionResponseFromJSON)(jsonValue));
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Create a Session to verify a user\'s identity
|
|
97
|
+
* Create Session
|
|
98
|
+
*/
|
|
99
|
+
createSession(createSessionRequest, initOverrides) {
|
|
100
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
101
|
+
const response = yield this.createSessionRaw({ createSessionRequest: createSessionRequest }, initOverrides);
|
|
102
|
+
return yield response.value();
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Get a Session by its ID
|
|
107
|
+
* Get Session
|
|
108
|
+
*/
|
|
109
|
+
getSessionRaw(requestParameters, initOverrides) {
|
|
110
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
111
|
+
if (requestParameters['sessionId'] == null) {
|
|
112
|
+
throw new runtime.RequiredError('sessionId', 'Required parameter "sessionId" was null or undefined when calling getSession().');
|
|
113
|
+
}
|
|
114
|
+
const queryParameters = {};
|
|
115
|
+
const headerParameters = {};
|
|
116
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
117
|
+
const token = this.configuration.accessToken;
|
|
118
|
+
const tokenString = yield token("Bearer", []);
|
|
119
|
+
if (tokenString) {
|
|
120
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
const response = yield this.request({
|
|
124
|
+
path: `/api/v1/sessions/{sessionId}`.replace(`{${"sessionId"}}`, encodeURIComponent(String(requestParameters['sessionId']))),
|
|
125
|
+
method: 'GET',
|
|
126
|
+
headers: headerParameters,
|
|
127
|
+
query: queryParameters,
|
|
128
|
+
}, initOverrides);
|
|
129
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetSessionResponseFromJSON)(jsonValue));
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Get a Session by its ID
|
|
134
|
+
* Get Session
|
|
135
|
+
*/
|
|
136
|
+
getSession(sessionId, initOverrides) {
|
|
137
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
138
|
+
const response = yield this.getSessionRaw({ sessionId: sessionId }, initOverrides);
|
|
139
|
+
return yield response.value();
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Get Session Results
|
|
144
|
+
*/
|
|
145
|
+
getSessionResultRaw(requestParameters, initOverrides) {
|
|
146
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
147
|
+
if (requestParameters['sessionId'] == null) {
|
|
148
|
+
throw new runtime.RequiredError('sessionId', 'Required parameter "sessionId" was null or undefined when calling getSessionResult().');
|
|
149
|
+
}
|
|
150
|
+
const queryParameters = {};
|
|
151
|
+
const headerParameters = {};
|
|
152
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
153
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
154
|
+
const token = this.configuration.accessToken;
|
|
155
|
+
const tokenString = yield token("Bearer", []);
|
|
156
|
+
if (tokenString) {
|
|
157
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
const response = yield this.request({
|
|
161
|
+
path: `/api/v1/sessions/{sessionId}/results`.replace(`{${"sessionId"}}`, encodeURIComponent(String(requestParameters['sessionId']))),
|
|
162
|
+
method: 'POST',
|
|
163
|
+
headers: headerParameters,
|
|
164
|
+
query: queryParameters,
|
|
165
|
+
body: (0, index_1.GetSessionResultRequestToJSON)(requestParameters['getSessionResultRequest']),
|
|
166
|
+
}, initOverrides);
|
|
167
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.GetSessionResultResponseFromJSON)(jsonValue));
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Get Session Results
|
|
172
|
+
*/
|
|
173
|
+
getSessionResult(sessionId, getSessionResultRequest, initOverrides) {
|
|
174
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
175
|
+
const response = yield this.getSessionResultRaw({ sessionId: sessionId, getSessionResultRequest: getSessionResultRequest }, initOverrides);
|
|
176
|
+
return yield response.value();
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* List Sessions created by your account
|
|
181
|
+
* List Sessions
|
|
182
|
+
*/
|
|
183
|
+
listSessionsRaw(requestParameters, initOverrides) {
|
|
184
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
185
|
+
const queryParameters = {};
|
|
186
|
+
if (requestParameters['orderBy'] != null) {
|
|
187
|
+
queryParameters['OrderBy'] = requestParameters['orderBy'];
|
|
188
|
+
}
|
|
189
|
+
if (requestParameters['orderDirection'] != null) {
|
|
190
|
+
queryParameters['OrderDirection'] = requestParameters['orderDirection'];
|
|
191
|
+
}
|
|
192
|
+
if (requestParameters['pageSize'] != null) {
|
|
193
|
+
queryParameters['PageSize'] = requestParameters['pageSize'];
|
|
194
|
+
}
|
|
195
|
+
if (requestParameters['page'] != null) {
|
|
196
|
+
queryParameters['Page'] = requestParameters['page'];
|
|
197
|
+
}
|
|
198
|
+
const headerParameters = {};
|
|
199
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
200
|
+
const token = this.configuration.accessToken;
|
|
201
|
+
const tokenString = yield token("Bearer", []);
|
|
202
|
+
if (tokenString) {
|
|
203
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
const response = yield this.request({
|
|
207
|
+
path: `/api/v1/sessions`,
|
|
208
|
+
method: 'GET',
|
|
209
|
+
headers: headerParameters,
|
|
210
|
+
query: queryParameters,
|
|
211
|
+
}, initOverrides);
|
|
212
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ListSessionsResponseFromJSON)(jsonValue));
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* List Sessions created by your account
|
|
217
|
+
* List Sessions
|
|
218
|
+
*/
|
|
219
|
+
listSessions(orderBy, orderDirection, pageSize, page, initOverrides) {
|
|
220
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
221
|
+
const response = yield this.listSessionsRaw({ orderBy: orderBy, orderDirection: orderDirection, pageSize: pageSize, page: page }, initOverrides);
|
|
222
|
+
return yield response.value();
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* Redact a Session, removing all identity data from Trinsic\'s servers. Every application has a redaction period that dictates how long we will hold on to your users\' PII data. Once a session falls outside the redaction cutoff date, all PII will automatically be removed from that session. You can utilize this endpoint to redact a session immediately. Identity data that a user has chosen to save in their passkey-protected wallet will not be deleted.
|
|
227
|
+
* Redact Session
|
|
228
|
+
*/
|
|
229
|
+
redactSessionRaw(requestParameters, initOverrides) {
|
|
230
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
231
|
+
if (requestParameters['sessionId'] == null) {
|
|
232
|
+
throw new runtime.RequiredError('sessionId', 'Required parameter "sessionId" was null or undefined when calling redactSession().');
|
|
233
|
+
}
|
|
234
|
+
const queryParameters = {};
|
|
235
|
+
const headerParameters = {};
|
|
236
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
237
|
+
const token = this.configuration.accessToken;
|
|
238
|
+
const tokenString = yield token("Bearer", []);
|
|
239
|
+
if (tokenString) {
|
|
240
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
const response = yield this.request({
|
|
244
|
+
path: `/api/v1/sessions/{sessionId}/redact`.replace(`{${"sessionId"}}`, encodeURIComponent(String(requestParameters['sessionId']))),
|
|
245
|
+
method: 'POST',
|
|
246
|
+
headers: headerParameters,
|
|
247
|
+
query: queryParameters,
|
|
248
|
+
}, initOverrides);
|
|
249
|
+
return new runtime.VoidApiResponse(response);
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
/**
|
|
253
|
+
* Redact a Session, removing all identity data from Trinsic\'s servers. Every application has a redaction period that dictates how long we will hold on to your users\' PII data. Once a session falls outside the redaction cutoff date, all PII will automatically be removed from that session. You can utilize this endpoint to redact a session immediately. Identity data that a user has chosen to save in their passkey-protected wallet will not be deleted.
|
|
254
|
+
* Redact Session
|
|
255
|
+
*/
|
|
256
|
+
redactSession(sessionId, initOverrides) {
|
|
257
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
258
|
+
yield this.redactSessionRaw({ sessionId: sessionId }, initOverrides);
|
|
259
|
+
});
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
exports.SessionsApi = SessionsApi;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
/* tslint:disable */
|
|
18
|
+
/* eslint-disable */
|
|
19
|
+
__exportStar(require("./AttachmentsApi"), exports);
|
|
20
|
+
__exportStar(require("./NetworkApi"), exports);
|
|
21
|
+
__exportStar(require("./SessionsApi"), exports);
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Connect API
|
|
3
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: v1
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import * as runtime from '../runtime';
|
|
13
|
+
import type { GetAttachmentRequest } from '../models/index';
|
|
14
|
+
export interface GetAttachmentOperationRequest {
|
|
15
|
+
getAttachmentRequest?: GetAttachmentRequest;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* AttachmentsApi - interface
|
|
19
|
+
*
|
|
20
|
+
* @export
|
|
21
|
+
* @interface AttachmentsApiInterface
|
|
22
|
+
*/
|
|
23
|
+
export interface AttachmentsApiInterface {
|
|
24
|
+
/**
|
|
25
|
+
* Exchange an Attachment Access Key (from `IdentityData.Attachments`) for the raw contents of the attachment. Use this API to fetch document (front, back, portrait) or other (selfie) images from a verification, if relevant. In some cases, attachments may not be immediately available after a verification is completed. If so, this endpoint will return an HTTP 202 code, and you should try again later.
|
|
26
|
+
* @summary Get Attachment
|
|
27
|
+
* @param {GetAttachmentRequest} [getAttachmentRequest]
|
|
28
|
+
* @param {*} [options] Override http request option.
|
|
29
|
+
* @throws {RequiredError}
|
|
30
|
+
* @memberof AttachmentsApiInterface
|
|
31
|
+
*/
|
|
32
|
+
getAttachmentRaw(requestParameters: GetAttachmentOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
33
|
+
/**
|
|
34
|
+
* Exchange an Attachment Access Key (from `IdentityData.Attachments`) for the raw contents of the attachment. Use this API to fetch document (front, back, portrait) or other (selfie) images from a verification, if relevant. In some cases, attachments may not be immediately available after a verification is completed. If so, this endpoint will return an HTTP 202 code, and you should try again later.
|
|
35
|
+
* Get Attachment
|
|
36
|
+
*/
|
|
37
|
+
getAttachment(getAttachmentRequest?: GetAttachmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
*
|
|
41
|
+
*/
|
|
42
|
+
export declare class AttachmentsApi extends runtime.BaseAPI implements AttachmentsApiInterface {
|
|
43
|
+
/**
|
|
44
|
+
* Exchange an Attachment Access Key (from `IdentityData.Attachments`) for the raw contents of the attachment. Use this API to fetch document (front, back, portrait) or other (selfie) images from a verification, if relevant. In some cases, attachments may not be immediately available after a verification is completed. If so, this endpoint will return an HTTP 202 code, and you should try again later.
|
|
45
|
+
* Get Attachment
|
|
46
|
+
*/
|
|
47
|
+
getAttachmentRaw(requestParameters: GetAttachmentOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
48
|
+
/**
|
|
49
|
+
* Exchange an Attachment Access Key (from `IdentityData.Attachments`) for the raw contents of the attachment. Use this API to fetch document (front, back, portrait) or other (selfie) images from a verification, if relevant. In some cases, attachments may not be immediately available after a verification is completed. If so, this endpoint will return an HTTP 202 code, and you should try again later.
|
|
50
|
+
* Get Attachment
|
|
51
|
+
*/
|
|
52
|
+
getAttachment(getAttachmentRequest?: GetAttachmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
53
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Connect API
|
|
5
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: v1
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
15
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
16
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
17
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
18
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
19
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
20
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
import * as runtime from '../runtime';
|
|
24
|
+
import { GetAttachmentRequestToJSON, } from '../models/index';
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
export class AttachmentsApi extends runtime.BaseAPI {
|
|
29
|
+
/**
|
|
30
|
+
* Exchange an Attachment Access Key (from `IdentityData.Attachments`) for the raw contents of the attachment. Use this API to fetch document (front, back, portrait) or other (selfie) images from a verification, if relevant. In some cases, attachments may not be immediately available after a verification is completed. If so, this endpoint will return an HTTP 202 code, and you should try again later.
|
|
31
|
+
* Get Attachment
|
|
32
|
+
*/
|
|
33
|
+
getAttachmentRaw(requestParameters, initOverrides) {
|
|
34
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
35
|
+
const queryParameters = {};
|
|
36
|
+
const headerParameters = {};
|
|
37
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
38
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
39
|
+
const token = this.configuration.accessToken;
|
|
40
|
+
const tokenString = yield token("Bearer", []);
|
|
41
|
+
if (tokenString) {
|
|
42
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
const response = yield this.request({
|
|
46
|
+
path: `/api/v1/attachments/attachment`,
|
|
47
|
+
method: 'POST',
|
|
48
|
+
headers: headerParameters,
|
|
49
|
+
query: queryParameters,
|
|
50
|
+
body: GetAttachmentRequestToJSON(requestParameters['getAttachmentRequest']),
|
|
51
|
+
}, initOverrides);
|
|
52
|
+
return new runtime.VoidApiResponse(response);
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Exchange an Attachment Access Key (from `IdentityData.Attachments`) for the raw contents of the attachment. Use this API to fetch document (front, back, portrait) or other (selfie) images from a verification, if relevant. In some cases, attachments may not be immediately available after a verification is completed. If so, this endpoint will return an HTTP 202 code, and you should try again later.
|
|
57
|
+
* Get Attachment
|
|
58
|
+
*/
|
|
59
|
+
getAttachment(getAttachmentRequest, initOverrides) {
|
|
60
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
61
|
+
yield this.getAttachmentRaw({ getAttachmentRequest: getAttachmentRequest }, initOverrides);
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Connect API
|
|
3
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: v1
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import * as runtime from '../runtime';
|
|
13
|
+
import type { IdentityLookupResponse, ListProvidersResponse } from '../models/index';
|
|
14
|
+
export interface IdentityLookupRequest {
|
|
15
|
+
phoneNumber: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* NetworkApi - interface
|
|
19
|
+
*
|
|
20
|
+
* @export
|
|
21
|
+
* @interface NetworkApiInterface
|
|
22
|
+
*/
|
|
23
|
+
export interface NetworkApiInterface {
|
|
24
|
+
/**
|
|
25
|
+
* Query the availability of an identity in the Trinsic Network by phone number
|
|
26
|
+
* @summary Lookup Identity
|
|
27
|
+
* @param {string} phoneNumber
|
|
28
|
+
* @param {*} [options] Override http request option.
|
|
29
|
+
* @throws {RequiredError}
|
|
30
|
+
* @memberof NetworkApiInterface
|
|
31
|
+
*/
|
|
32
|
+
identityLookupRaw(requestParameters: IdentityLookupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<IdentityLookupResponse>>;
|
|
33
|
+
/**
|
|
34
|
+
* Query the availability of an identity in the Trinsic Network by phone number
|
|
35
|
+
* Lookup Identity
|
|
36
|
+
*/
|
|
37
|
+
identityLookup(phoneNumber: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IdentityLookupResponse>;
|
|
38
|
+
/**
|
|
39
|
+
* List all identity providers available for use
|
|
40
|
+
* @summary List Identity Providers
|
|
41
|
+
* @param {*} [options] Override http request option.
|
|
42
|
+
* @throws {RequiredError}
|
|
43
|
+
* @memberof NetworkApiInterface
|
|
44
|
+
*/
|
|
45
|
+
listProvidersRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListProvidersResponse>>;
|
|
46
|
+
/**
|
|
47
|
+
* List all identity providers available for use
|
|
48
|
+
* List Identity Providers
|
|
49
|
+
*/
|
|
50
|
+
listProviders(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListProvidersResponse>;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
*/
|
|
55
|
+
export declare class NetworkApi extends runtime.BaseAPI implements NetworkApiInterface {
|
|
56
|
+
/**
|
|
57
|
+
* Query the availability of an identity in the Trinsic Network by phone number
|
|
58
|
+
* Lookup Identity
|
|
59
|
+
*/
|
|
60
|
+
identityLookupRaw(requestParameters: IdentityLookupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<IdentityLookupResponse>>;
|
|
61
|
+
/**
|
|
62
|
+
* Query the availability of an identity in the Trinsic Network by phone number
|
|
63
|
+
* Lookup Identity
|
|
64
|
+
*/
|
|
65
|
+
identityLookup(phoneNumber: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IdentityLookupResponse>;
|
|
66
|
+
/**
|
|
67
|
+
* List all identity providers available for use
|
|
68
|
+
* List Identity Providers
|
|
69
|
+
*/
|
|
70
|
+
listProvidersRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListProvidersResponse>>;
|
|
71
|
+
/**
|
|
72
|
+
* List all identity providers available for use
|
|
73
|
+
* List Identity Providers
|
|
74
|
+
*/
|
|
75
|
+
listProviders(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListProvidersResponse>;
|
|
76
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Connect API
|
|
5
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: v1
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
15
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
16
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
17
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
18
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
19
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
20
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
import * as runtime from '../runtime';
|
|
24
|
+
import { IdentityLookupResponseFromJSON, ListProvidersResponseFromJSON, } from '../models/index';
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
export class NetworkApi extends runtime.BaseAPI {
|
|
29
|
+
/**
|
|
30
|
+
* Query the availability of an identity in the Trinsic Network by phone number
|
|
31
|
+
* Lookup Identity
|
|
32
|
+
*/
|
|
33
|
+
identityLookupRaw(requestParameters, initOverrides) {
|
|
34
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
35
|
+
if (requestParameters['phoneNumber'] == null) {
|
|
36
|
+
throw new runtime.RequiredError('phoneNumber', 'Required parameter "phoneNumber" was null or undefined when calling identityLookup().');
|
|
37
|
+
}
|
|
38
|
+
const queryParameters = {};
|
|
39
|
+
const headerParameters = {};
|
|
40
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
41
|
+
const token = this.configuration.accessToken;
|
|
42
|
+
const tokenString = yield token("Bearer", []);
|
|
43
|
+
if (tokenString) {
|
|
44
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
const response = yield this.request({
|
|
48
|
+
path: `/api/v1/network/identities/{phoneNumber}`.replace(`{${"phoneNumber"}}`, encodeURIComponent(String(requestParameters['phoneNumber']))),
|
|
49
|
+
method: 'GET',
|
|
50
|
+
headers: headerParameters,
|
|
51
|
+
query: queryParameters,
|
|
52
|
+
}, initOverrides);
|
|
53
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => IdentityLookupResponseFromJSON(jsonValue));
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Query the availability of an identity in the Trinsic Network by phone number
|
|
58
|
+
* Lookup Identity
|
|
59
|
+
*/
|
|
60
|
+
identityLookup(phoneNumber, initOverrides) {
|
|
61
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
62
|
+
const response = yield this.identityLookupRaw({ phoneNumber: phoneNumber }, initOverrides);
|
|
63
|
+
return yield response.value();
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* List all identity providers available for use
|
|
68
|
+
* List Identity Providers
|
|
69
|
+
*/
|
|
70
|
+
listProvidersRaw(initOverrides) {
|
|
71
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
72
|
+
const queryParameters = {};
|
|
73
|
+
const headerParameters = {};
|
|
74
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
75
|
+
const token = this.configuration.accessToken;
|
|
76
|
+
const tokenString = yield token("Bearer", []);
|
|
77
|
+
if (tokenString) {
|
|
78
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
const response = yield this.request({
|
|
82
|
+
path: `/api/v1/network/providers`,
|
|
83
|
+
method: 'GET',
|
|
84
|
+
headers: headerParameters,
|
|
85
|
+
query: queryParameters,
|
|
86
|
+
}, initOverrides);
|
|
87
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ListProvidersResponseFromJSON(jsonValue));
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* List all identity providers available for use
|
|
92
|
+
* List Identity Providers
|
|
93
|
+
*/
|
|
94
|
+
listProviders(initOverrides) {
|
|
95
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
96
|
+
const response = yield this.listProvidersRaw(initOverrides);
|
|
97
|
+
return yield response.value();
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
}
|