@onfido/api 4.6.0 → 5.0.0
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/README.md +1 -1
- package/dist/api.d.ts +135 -179
- package/dist/api.js +88 -38
- package/dist/configuration.js +1 -1
- package/dist/esm/api.d.ts +135 -179
- package/dist/esm/api.js +86 -36
- package/dist/esm/configuration.js +1 -1
- package/package.json +1 -1
package/dist/esm/api.js
CHANGED
|
@@ -368,13 +368,6 @@ export const DeviceIntelligenceBreakdownPropertiesDeviceBiometricCaptureEnum = {
|
|
|
368
368
|
UnknownMethod: 'unknown_method',
|
|
369
369
|
UnknownDefaultOpenApi: '11184809'
|
|
370
370
|
};
|
|
371
|
-
export const DocumentFileTypeEnum = {
|
|
372
|
-
Jpg: 'jpg',
|
|
373
|
-
Jpeg: 'jpeg',
|
|
374
|
-
Png: 'png',
|
|
375
|
-
Pdf: 'pdf',
|
|
376
|
-
UnknownDefaultOpenApi: '11184809'
|
|
377
|
-
};
|
|
378
371
|
export const DocumentSideEnum = {
|
|
379
372
|
Front: 'front',
|
|
380
373
|
Back: 'back',
|
|
@@ -404,13 +397,6 @@ export const DocumentPropertiesSecurityTierEnum = {
|
|
|
404
397
|
UnspecifiedSecurityTier: 'unspecified_security_tier',
|
|
405
398
|
UnknownDefaultOpenApi: '11184809'
|
|
406
399
|
};
|
|
407
|
-
export const DocumentSharedFileTypeEnum = {
|
|
408
|
-
Jpg: 'jpg',
|
|
409
|
-
Jpeg: 'jpeg',
|
|
410
|
-
Png: 'png',
|
|
411
|
-
Pdf: 'pdf',
|
|
412
|
-
UnknownDefaultOpenApi: '11184809'
|
|
413
|
-
};
|
|
414
400
|
export const DocumentSharedSideEnum = {
|
|
415
401
|
Front: 'front',
|
|
416
402
|
Back: 'back',
|
|
@@ -773,7 +759,6 @@ export const WebhookEventType = {
|
|
|
773
759
|
ReportAwaitingApproval: 'report.awaiting_approval',
|
|
774
760
|
ReportCompleted: 'report.completed',
|
|
775
761
|
WorkflowTimelineFileCreated: 'workflow_timeline_file.created',
|
|
776
|
-
WorkflowSignedEvidenceFileCreated: 'workflow_signed_evidence_file.created',
|
|
777
762
|
WorkflowRunEvidenceFolderCreated: 'workflow_run_evidence_folder.created',
|
|
778
763
|
UnknownDefaultOpenApi: '11184809'
|
|
779
764
|
};
|
|
@@ -1474,6 +1459,37 @@ export const DefaultApiAxiosParamCreator = function (configuration) {
|
|
|
1474
1459
|
options: localVarRequestOptions,
|
|
1475
1460
|
};
|
|
1476
1461
|
}),
|
|
1462
|
+
/**
|
|
1463
|
+
* Downloads digital photos extracted from specific documents belonging to an applicant. If successful, the response will be the binary data representing the image.
|
|
1464
|
+
* @summary Download NFC face
|
|
1465
|
+
* @param {string} documentId
|
|
1466
|
+
* @param {*} [options] Override http request option.
|
|
1467
|
+
* @throws {RequiredError}
|
|
1468
|
+
*/
|
|
1469
|
+
downloadNfcFace: (documentId, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
1470
|
+
// verify required parameter 'documentId' is not null or undefined
|
|
1471
|
+
assertParamExists('downloadNfcFace', 'documentId', documentId);
|
|
1472
|
+
const localVarPath = `/documents/{document_id}/nfc_face`
|
|
1473
|
+
.replace(`{${"document_id"}}`, encodeURIComponent(String(documentId)));
|
|
1474
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1475
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1476
|
+
let baseOptions;
|
|
1477
|
+
if (configuration) {
|
|
1478
|
+
baseOptions = configuration.baseOptions;
|
|
1479
|
+
}
|
|
1480
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
1481
|
+
const localVarHeaderParameter = {};
|
|
1482
|
+
const localVarQueryParameter = {};
|
|
1483
|
+
// authentication Token required
|
|
1484
|
+
yield setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration);
|
|
1485
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1486
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1487
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1488
|
+
return {
|
|
1489
|
+
url: toPathString(localVarUrlObj),
|
|
1490
|
+
options: localVarRequestOptions,
|
|
1491
|
+
};
|
|
1492
|
+
}),
|
|
1477
1493
|
/**
|
|
1478
1494
|
* Retrieves the signed document or application form depending on the file_id provided.
|
|
1479
1495
|
* @summary Retrieves the signed document or application form
|
|
@@ -2518,10 +2534,11 @@ export const DefaultApiAxiosParamCreator = function (configuration) {
|
|
|
2518
2534
|
* @param {string} [createdAtGt] A ISO-8601 date to filter results with a created date greater than (after) the one provided.
|
|
2519
2535
|
* @param {string} [createdAtLt] A ISO-8601 date to filter results with a created date less than (before) the one provided.
|
|
2520
2536
|
* @param {ListWorkflowRunsSortEnum} [sort] A string with the value \'desc\' or \'asc\' that allows to sort the returned list by the completed datetime either descending or ascending, respectively. If not specified, defaults to \'desc\'.
|
|
2537
|
+
* @param {string} [applicantId] the applicant\'s id.
|
|
2521
2538
|
* @param {*} [options] Override http request option.
|
|
2522
2539
|
* @throws {RequiredError}
|
|
2523
2540
|
*/
|
|
2524
|
-
listWorkflowRuns: (page, status, createdAtGt, createdAtLt, sort, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
2541
|
+
listWorkflowRuns: (page, status, createdAtGt, createdAtLt, sort, applicantId, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
2525
2542
|
const localVarPath = `/workflow_runs`;
|
|
2526
2543
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2527
2544
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
@@ -2553,6 +2570,9 @@ export const DefaultApiAxiosParamCreator = function (configuration) {
|
|
|
2553
2570
|
if (sort !== undefined) {
|
|
2554
2571
|
localVarQueryParameter['sort'] = sort;
|
|
2555
2572
|
}
|
|
2573
|
+
if (applicantId !== undefined) {
|
|
2574
|
+
localVarQueryParameter['applicant_id'] = applicantId;
|
|
2575
|
+
}
|
|
2556
2576
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
2557
2577
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2558
2578
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
@@ -2859,7 +2879,7 @@ export const DefaultApiAxiosParamCreator = function (configuration) {
|
|
|
2859
2879
|
* @param {DocumentTypes} type The type of document
|
|
2860
2880
|
* @param {string} applicantId The ID of the applicant whose document is being uploaded.
|
|
2861
2881
|
* @param {FileTransfer} file The file to be uploaded.
|
|
2862
|
-
* @param {
|
|
2882
|
+
* @param {string} [fileType] The file type of the uploaded file
|
|
2863
2883
|
* @param {UploadDocumentSideEnum} [side] The side of the document, if applicable. The possible values are front and back
|
|
2864
2884
|
* @param {CountryCodes} [issuingCountry] The issuing country of the document, a 3-letter ISO code.
|
|
2865
2885
|
* @param {boolean} [validateImageQuality] Defaults to false. When true the submitted image will undergo an image quality validation which may take up to 5 seconds.
|
|
@@ -3348,6 +3368,22 @@ export const DefaultApiFp = function (configuration) {
|
|
|
3348
3368
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
3349
3369
|
});
|
|
3350
3370
|
},
|
|
3371
|
+
/**
|
|
3372
|
+
* Downloads digital photos extracted from specific documents belonging to an applicant. If successful, the response will be the binary data representing the image.
|
|
3373
|
+
* @summary Download NFC face
|
|
3374
|
+
* @param {string} documentId
|
|
3375
|
+
* @param {*} [options] Override http request option.
|
|
3376
|
+
* @throws {RequiredError}
|
|
3377
|
+
*/
|
|
3378
|
+
downloadNfcFace(documentId, options) {
|
|
3379
|
+
var _a, _b, _c;
|
|
3380
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3381
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.downloadNfcFace(documentId, options);
|
|
3382
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
3383
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['DefaultApi.downloadNfcFace']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
3384
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
3385
|
+
});
|
|
3386
|
+
},
|
|
3351
3387
|
/**
|
|
3352
3388
|
* Retrieves the signed document or application form depending on the file_id provided.
|
|
3353
3389
|
* @summary Retrieves the signed document or application form
|
|
@@ -3873,13 +3909,14 @@ export const DefaultApiFp = function (configuration) {
|
|
|
3873
3909
|
* @param {string} [createdAtGt] A ISO-8601 date to filter results with a created date greater than (after) the one provided.
|
|
3874
3910
|
* @param {string} [createdAtLt] A ISO-8601 date to filter results with a created date less than (before) the one provided.
|
|
3875
3911
|
* @param {ListWorkflowRunsSortEnum} [sort] A string with the value \'desc\' or \'asc\' that allows to sort the returned list by the completed datetime either descending or ascending, respectively. If not specified, defaults to \'desc\'.
|
|
3912
|
+
* @param {string} [applicantId] the applicant\'s id.
|
|
3876
3913
|
* @param {*} [options] Override http request option.
|
|
3877
3914
|
* @throws {RequiredError}
|
|
3878
3915
|
*/
|
|
3879
|
-
listWorkflowRuns(page, status, createdAtGt, createdAtLt, sort, options) {
|
|
3916
|
+
listWorkflowRuns(page, status, createdAtGt, createdAtLt, sort, applicantId, options) {
|
|
3880
3917
|
var _a, _b, _c;
|
|
3881
3918
|
return __awaiter(this, void 0, void 0, function* () {
|
|
3882
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.listWorkflowRuns(page, status, createdAtGt, createdAtLt, sort, options);
|
|
3919
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.listWorkflowRuns(page, status, createdAtGt, createdAtLt, sort, applicantId, options);
|
|
3883
3920
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
3884
3921
|
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['DefaultApi.listWorkflowRuns']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
3885
3922
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
@@ -4037,7 +4074,7 @@ export const DefaultApiFp = function (configuration) {
|
|
|
4037
4074
|
* @param {DocumentTypes} type The type of document
|
|
4038
4075
|
* @param {string} applicantId The ID of the applicant whose document is being uploaded.
|
|
4039
4076
|
* @param {FileTransfer} file The file to be uploaded.
|
|
4040
|
-
* @param {
|
|
4077
|
+
* @param {string} [fileType] The file type of the uploaded file
|
|
4041
4078
|
* @param {UploadDocumentSideEnum} [side] The side of the document, if applicable. The possible values are front and back
|
|
4042
4079
|
* @param {CountryCodes} [issuingCountry] The issuing country of the document, a 3-letter ISO code.
|
|
4043
4080
|
* @param {boolean} [validateImageQuality] Defaults to false. When true the submitted image will undergo an image quality validation which may take up to 5 seconds.
|
|
@@ -4310,6 +4347,16 @@ export const DefaultApiFactory = function (configuration, basePath, axios) {
|
|
|
4310
4347
|
downloadMotionCaptureFrame(motionCaptureId, options) {
|
|
4311
4348
|
return localVarFp.downloadMotionCaptureFrame(motionCaptureId, options).then((request) => request(axios, basePath));
|
|
4312
4349
|
},
|
|
4350
|
+
/**
|
|
4351
|
+
* Downloads digital photos extracted from specific documents belonging to an applicant. If successful, the response will be the binary data representing the image.
|
|
4352
|
+
* @summary Download NFC face
|
|
4353
|
+
* @param {string} documentId
|
|
4354
|
+
* @param {*} [options] Override http request option.
|
|
4355
|
+
* @throws {RequiredError}
|
|
4356
|
+
*/
|
|
4357
|
+
downloadNfcFace(documentId, options) {
|
|
4358
|
+
return localVarFp.downloadNfcFace(documentId, options).then((request) => request(axios, basePath));
|
|
4359
|
+
},
|
|
4313
4360
|
/**
|
|
4314
4361
|
* Retrieves the signed document or application form depending on the file_id provided.
|
|
4315
4362
|
* @summary Retrieves the signed document or application form
|
|
@@ -4643,11 +4690,12 @@ export const DefaultApiFactory = function (configuration, basePath, axios) {
|
|
|
4643
4690
|
* @param {string} [createdAtGt] A ISO-8601 date to filter results with a created date greater than (after) the one provided.
|
|
4644
4691
|
* @param {string} [createdAtLt] A ISO-8601 date to filter results with a created date less than (before) the one provided.
|
|
4645
4692
|
* @param {ListWorkflowRunsSortEnum} [sort] A string with the value \'desc\' or \'asc\' that allows to sort the returned list by the completed datetime either descending or ascending, respectively. If not specified, defaults to \'desc\'.
|
|
4693
|
+
* @param {string} [applicantId] the applicant\'s id.
|
|
4646
4694
|
* @param {*} [options] Override http request option.
|
|
4647
4695
|
* @throws {RequiredError}
|
|
4648
4696
|
*/
|
|
4649
|
-
listWorkflowRuns(page, status, createdAtGt, createdAtLt, sort, options) {
|
|
4650
|
-
return localVarFp.listWorkflowRuns(page, status, createdAtGt, createdAtLt, sort, options).then((request) => request(axios, basePath));
|
|
4697
|
+
listWorkflowRuns(page, status, createdAtGt, createdAtLt, sort, applicantId, options) {
|
|
4698
|
+
return localVarFp.listWorkflowRuns(page, status, createdAtGt, createdAtLt, sort, applicantId, options).then((request) => request(axios, basePath));
|
|
4651
4699
|
},
|
|
4652
4700
|
/**
|
|
4653
4701
|
* Run a health check on the Onfido API
|
|
@@ -4747,7 +4795,7 @@ export const DefaultApiFactory = function (configuration, basePath, axios) {
|
|
|
4747
4795
|
* @param {DocumentTypes} type The type of document
|
|
4748
4796
|
* @param {string} applicantId The ID of the applicant whose document is being uploaded.
|
|
4749
4797
|
* @param {FileTransfer} file The file to be uploaded.
|
|
4750
|
-
* @param {
|
|
4798
|
+
* @param {string} [fileType] The file type of the uploaded file
|
|
4751
4799
|
* @param {UploadDocumentSideEnum} [side] The side of the document, if applicable. The possible values are front and back
|
|
4752
4800
|
* @param {CountryCodes} [issuingCountry] The issuing country of the document, a 3-letter ISO code.
|
|
4753
4801
|
* @param {boolean} [validateImageQuality] Defaults to false. When true the submitted image will undergo an image quality validation which may take up to 5 seconds.
|
|
@@ -5023,6 +5071,17 @@ export class DefaultApi extends BaseAPI {
|
|
|
5023
5071
|
downloadMotionCaptureFrame(motionCaptureId, options) {
|
|
5024
5072
|
return DefaultApiFp(this.configuration).downloadMotionCaptureFrame(motionCaptureId, options).then((request) => request(this.axios, this.basePath));
|
|
5025
5073
|
}
|
|
5074
|
+
/**
|
|
5075
|
+
* Downloads digital photos extracted from specific documents belonging to an applicant. If successful, the response will be the binary data representing the image.
|
|
5076
|
+
* @summary Download NFC face
|
|
5077
|
+
* @param {string} documentId
|
|
5078
|
+
* @param {*} [options] Override http request option.
|
|
5079
|
+
* @throws {RequiredError}
|
|
5080
|
+
* @memberof DefaultApi
|
|
5081
|
+
*/
|
|
5082
|
+
downloadNfcFace(documentId, options) {
|
|
5083
|
+
return DefaultApiFp(this.configuration).downloadNfcFace(documentId, options).then((request) => request(this.axios, this.basePath));
|
|
5084
|
+
}
|
|
5026
5085
|
/**
|
|
5027
5086
|
* Retrieves the signed document or application form depending on the file_id provided.
|
|
5028
5087
|
* @summary Retrieves the signed document or application form
|
|
@@ -5388,12 +5447,13 @@ export class DefaultApi extends BaseAPI {
|
|
|
5388
5447
|
* @param {string} [createdAtGt] A ISO-8601 date to filter results with a created date greater than (after) the one provided.
|
|
5389
5448
|
* @param {string} [createdAtLt] A ISO-8601 date to filter results with a created date less than (before) the one provided.
|
|
5390
5449
|
* @param {ListWorkflowRunsSortEnum} [sort] A string with the value \'desc\' or \'asc\' that allows to sort the returned list by the completed datetime either descending or ascending, respectively. If not specified, defaults to \'desc\'.
|
|
5450
|
+
* @param {string} [applicantId] the applicant\'s id.
|
|
5391
5451
|
* @param {*} [options] Override http request option.
|
|
5392
5452
|
* @throws {RequiredError}
|
|
5393
5453
|
* @memberof DefaultApi
|
|
5394
5454
|
*/
|
|
5395
|
-
listWorkflowRuns(page, status, createdAtGt, createdAtLt, sort, options) {
|
|
5396
|
-
return DefaultApiFp(this.configuration).listWorkflowRuns(page, status, createdAtGt, createdAtLt, sort, options).then((request) => request(this.axios, this.basePath));
|
|
5455
|
+
listWorkflowRuns(page, status, createdAtGt, createdAtLt, sort, applicantId, options) {
|
|
5456
|
+
return DefaultApiFp(this.configuration).listWorkflowRuns(page, status, createdAtGt, createdAtLt, sort, applicantId, options).then((request) => request(this.axios, this.basePath));
|
|
5397
5457
|
}
|
|
5398
5458
|
/**
|
|
5399
5459
|
* Run a health check on the Onfido API
|
|
@@ -5502,7 +5562,7 @@ export class DefaultApi extends BaseAPI {
|
|
|
5502
5562
|
* @param {DocumentTypes} type The type of document
|
|
5503
5563
|
* @param {string} applicantId The ID of the applicant whose document is being uploaded.
|
|
5504
5564
|
* @param {FileTransfer} file The file to be uploaded.
|
|
5505
|
-
* @param {
|
|
5565
|
+
* @param {string} [fileType] The file type of the uploaded file
|
|
5506
5566
|
* @param {UploadDocumentSideEnum} [side] The side of the document, if applicable. The possible values are front and back
|
|
5507
5567
|
* @param {CountryCodes} [issuingCountry] The issuing country of the document, a 3-letter ISO code.
|
|
5508
5568
|
* @param {boolean} [validateImageQuality] Defaults to false. When true the submitted image will undergo an image quality validation which may take up to 5 seconds.
|
|
@@ -5548,16 +5608,6 @@ export const ListWorkflowRunsSortEnum = {
|
|
|
5548
5608
|
Asc: 'asc',
|
|
5549
5609
|
UnknownDefaultOpenApi: '11184809'
|
|
5550
5610
|
};
|
|
5551
|
-
/**
|
|
5552
|
-
* @export
|
|
5553
|
-
*/
|
|
5554
|
-
export const UploadDocumentFileTypeEnum = {
|
|
5555
|
-
Jpg: 'jpg',
|
|
5556
|
-
Jpeg: 'jpeg',
|
|
5557
|
-
Png: 'png',
|
|
5558
|
-
Pdf: 'pdf',
|
|
5559
|
-
UnknownDefaultOpenApi: '11184809'
|
|
5560
|
-
};
|
|
5561
5611
|
/**
|
|
5562
5612
|
* @export
|
|
5563
5613
|
*/
|
|
@@ -29,7 +29,7 @@ export class Configuration {
|
|
|
29
29
|
}
|
|
30
30
|
this.apiKey = 'Token token=' + param.apiToken;
|
|
31
31
|
this.basePath = param.basePath || BASE_PATH.replace('.eu.', `.${Region[param.region || Region.EU].toLowerCase()}.`);
|
|
32
|
-
this.baseOptions = Object.assign(Object.assign({ timeout: 30000 }, param.baseOptions), { headers: Object.assign(Object.assign({}, (_a = param.baseOptions) === null || _a === void 0 ? void 0 : _a.headers), { 'User-Agent':
|
|
32
|
+
this.baseOptions = Object.assign(Object.assign({ timeout: 30000 }, param.baseOptions), { headers: Object.assign(Object.assign({}, (_a = param.baseOptions) === null || _a === void 0 ? void 0 : _a.headers), { 'User-Agent': "onfido-node/5.0.0" }) });
|
|
33
33
|
this.formDataCtor = param.formDataCtor || require('form-data'); // Injiect form data constructor (if needed)
|
|
34
34
|
}
|
|
35
35
|
/**
|