@onfido/api 4.6.0 → 5.1.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 +374 -201
- package/dist/api.js +156 -38
- package/dist/configuration.js +1 -1
- package/dist/esm/api.d.ts +374 -201
- package/dist/esm/api.js +154 -36
- package/dist/esm/configuration.js +1 -1
- package/package.json +1 -1
package/dist/api.js
CHANGED
|
@@ -22,8 +22,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
22
22
|
});
|
|
23
23
|
};
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
-
exports.DefaultApiFactory = exports.DefaultApiFp = exports.DefaultApiAxiosParamCreator = exports.WorkflowRunStatus = exports.WorkflowRunLinkLanguageEnum = exports.WebhookEventType = exports.WebhookEventResourceType = exports.WebhookEventObjectStatus = exports.WatchlistMonitorSharedReportNameEnum = exports.WatchlistMonitorBuilderReportNameEnum = exports.WatchlistMonitorReportNameEnum = exports.UsDrivingLicenceSharedGenderEnum = exports.UsDrivingLicenceSharedEyeColorCodeEnum = exports.UsDrivingLicenceSharedDocumentCategoryEnum = exports.UsDrivingLicenceBuilderGenderEnum = exports.UsDrivingLicenceBuilderEyeColorCodeEnum = exports.UsDrivingLicenceBuilderDocumentCategoryEnum = exports.ResultsFeedbackExpectedResultEnum = exports.ReportSubResult = exports.ReportStatus = exports.ReportResult = exports.ReportName = exports.RepeatAttemptsListRepeatAttemptsInnerResultEnum = exports.RepeatAttemptsListRepeatAttemptsInnerNamesEnum = exports.RepeatAttemptsListRepeatAttemptsInnerDateOfBirthEnum = exports.ProofOfAddressPropertiesDocumentTypeEnum = exports.IdNumberTypeEnum = exports.ExtractionExtractedDataGenderEnum = exports.ExtractionDocumentClassificationSubtypeEnum = exports.DocumentWithDriverVerificationReportAllOfPropertiesSecurityTierEnum = exports.DocumentWithDriverVerificationReportAllOfPropertiesHasIssuanceConfirmationEnum = exports.DocumentWithDriverVerificationReportAllOfPropertiesNistIdentityEvidenceStrengthEnum = exports.DocumentTypes = exports.DocumentSharedSideEnum = exports.
|
|
26
|
-
exports.UploadDocumentSideEnum =
|
|
25
|
+
exports.ListWorkflowRunsSortEnum = exports.DefaultApi = exports.DefaultApiFactory = exports.DefaultApiFp = exports.DefaultApiAxiosParamCreator = exports.WorkflowRunStatus = exports.WorkflowRunLinkLanguageEnum = exports.WebhookEventType = exports.WebhookEventResourceType = exports.WebhookEventObjectStatus = exports.WatchlistMonitorSharedReportNameEnum = exports.WatchlistMonitorBuilderReportNameEnum = exports.WatchlistMonitorReportNameEnum = exports.UsDrivingLicenceSharedGenderEnum = exports.UsDrivingLicenceSharedEyeColorCodeEnum = exports.UsDrivingLicenceSharedDocumentCategoryEnum = exports.UsDrivingLicenceBuilderGenderEnum = exports.UsDrivingLicenceBuilderEyeColorCodeEnum = exports.UsDrivingLicenceBuilderDocumentCategoryEnum = exports.ResultsFeedbackExpectedResultEnum = exports.ReportSubResult = exports.ReportStatus = exports.ReportResult = exports.ReportName = exports.RepeatAttemptsListRepeatAttemptsInnerResultEnum = exports.RepeatAttemptsListRepeatAttemptsInnerNamesEnum = exports.RepeatAttemptsListRepeatAttemptsInnerDateOfBirthEnum = exports.ProofOfAddressPropertiesDocumentTypeEnum = exports.IdNumberTypeEnum = exports.ExtractionExtractedDataGenderEnum = exports.ExtractionDocumentClassificationSubtypeEnum = exports.DocumentWithDriverVerificationReportAllOfPropertiesSecurityTierEnum = exports.DocumentWithDriverVerificationReportAllOfPropertiesHasIssuanceConfirmationEnum = exports.DocumentWithDriverVerificationReportAllOfPropertiesNistIdentityEvidenceStrengthEnum = exports.DocumentTypes = exports.DocumentSharedSideEnum = exports.DocumentPropertiesSecurityTierEnum = exports.DocumentPropertiesHasIssuanceConfirmationEnum = exports.DocumentPropertiesNistIdentityEvidenceStrengthEnum = exports.DocumentSideEnum = exports.DeviceIntelligenceBreakdownPropertiesDeviceBiometricCaptureEnum = exports.DeviceIntelligenceBreakdownPropertiesDeviceDocumentCaptureEnum = exports.DeviceIntelligenceBreakdownPropertiesDeviceIpReputationEnum = exports.DeviceIntelligenceBreakdownPropertiesDeviceAuthenticationTypeEnum = exports.DeviceIntelligenceBreakdownPropertiesDeviceSdkSourceEnum = exports.CountryCodes = exports.CheckStatus = exports.CheckResponseResultEnum = exports.CheckResultEnum = exports.ApplicantConsentName = void 0;
|
|
26
|
+
exports.UploadDocumentSideEnum = void 0;
|
|
27
27
|
const axios_1 = require("axios");
|
|
28
28
|
// URLSearchParams not necessarily used
|
|
29
29
|
// @ts-ignore
|
|
@@ -372,13 +372,6 @@ exports.DeviceIntelligenceBreakdownPropertiesDeviceBiometricCaptureEnum = {
|
|
|
372
372
|
UnknownMethod: 'unknown_method',
|
|
373
373
|
UnknownDefaultOpenApi: '11184809'
|
|
374
374
|
};
|
|
375
|
-
exports.DocumentFileTypeEnum = {
|
|
376
|
-
Jpg: 'jpg',
|
|
377
|
-
Jpeg: 'jpeg',
|
|
378
|
-
Png: 'png',
|
|
379
|
-
Pdf: 'pdf',
|
|
380
|
-
UnknownDefaultOpenApi: '11184809'
|
|
381
|
-
};
|
|
382
375
|
exports.DocumentSideEnum = {
|
|
383
376
|
Front: 'front',
|
|
384
377
|
Back: 'back',
|
|
@@ -408,13 +401,6 @@ exports.DocumentPropertiesSecurityTierEnum = {
|
|
|
408
401
|
UnspecifiedSecurityTier: 'unspecified_security_tier',
|
|
409
402
|
UnknownDefaultOpenApi: '11184809'
|
|
410
403
|
};
|
|
411
|
-
exports.DocumentSharedFileTypeEnum = {
|
|
412
|
-
Jpg: 'jpg',
|
|
413
|
-
Jpeg: 'jpeg',
|
|
414
|
-
Png: 'png',
|
|
415
|
-
Pdf: 'pdf',
|
|
416
|
-
UnknownDefaultOpenApi: '11184809'
|
|
417
|
-
};
|
|
418
404
|
exports.DocumentSharedSideEnum = {
|
|
419
405
|
Front: 'front',
|
|
420
406
|
Back: 'back',
|
|
@@ -777,7 +763,6 @@ exports.WebhookEventType = {
|
|
|
777
763
|
ReportAwaitingApproval: 'report.awaiting_approval',
|
|
778
764
|
ReportCompleted: 'report.completed',
|
|
779
765
|
WorkflowTimelineFileCreated: 'workflow_timeline_file.created',
|
|
780
|
-
WorkflowSignedEvidenceFileCreated: 'workflow_signed_evidence_file.created',
|
|
781
766
|
WorkflowRunEvidenceFolderCreated: 'workflow_run_evidence_folder.created',
|
|
782
767
|
UnknownDefaultOpenApi: '11184809'
|
|
783
768
|
};
|
|
@@ -1478,6 +1463,37 @@ const DefaultApiAxiosParamCreator = function (configuration) {
|
|
|
1478
1463
|
options: localVarRequestOptions,
|
|
1479
1464
|
};
|
|
1480
1465
|
}),
|
|
1466
|
+
/**
|
|
1467
|
+
* Downloads digital photos extracted from specific documents belonging to an applicant. If successful, the response will be the binary data representing the image.
|
|
1468
|
+
* @summary Download NFC face
|
|
1469
|
+
* @param {string} documentId
|
|
1470
|
+
* @param {*} [options] Override http request option.
|
|
1471
|
+
* @throws {RequiredError}
|
|
1472
|
+
*/
|
|
1473
|
+
downloadNfcFace: (documentId, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
1474
|
+
// verify required parameter 'documentId' is not null or undefined
|
|
1475
|
+
(0, common_1.assertParamExists)('downloadNfcFace', 'documentId', documentId);
|
|
1476
|
+
const localVarPath = `/documents/{document_id}/nfc_face`
|
|
1477
|
+
.replace(`{${"document_id"}}`, encodeURIComponent(String(documentId)));
|
|
1478
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1479
|
+
const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1480
|
+
let baseOptions;
|
|
1481
|
+
if (configuration) {
|
|
1482
|
+
baseOptions = configuration.baseOptions;
|
|
1483
|
+
}
|
|
1484
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
1485
|
+
const localVarHeaderParameter = {};
|
|
1486
|
+
const localVarQueryParameter = {};
|
|
1487
|
+
// authentication Token required
|
|
1488
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
|
|
1489
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1490
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1491
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1492
|
+
return {
|
|
1493
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1494
|
+
options: localVarRequestOptions,
|
|
1495
|
+
};
|
|
1496
|
+
}),
|
|
1481
1497
|
/**
|
|
1482
1498
|
* Retrieves the signed document or application form depending on the file_id provided.
|
|
1483
1499
|
* @summary Retrieves the signed document or application form
|
|
@@ -1644,6 +1660,37 @@ const DefaultApiAxiosParamCreator = function (configuration) {
|
|
|
1644
1660
|
options: localVarRequestOptions,
|
|
1645
1661
|
};
|
|
1646
1662
|
}),
|
|
1663
|
+
/**
|
|
1664
|
+
* Retrieves consents for single applicant.
|
|
1665
|
+
* @summary Retrieve Applicant Consents
|
|
1666
|
+
* @param {string} applicantId
|
|
1667
|
+
* @param {*} [options] Override http request option.
|
|
1668
|
+
* @throws {RequiredError}
|
|
1669
|
+
*/
|
|
1670
|
+
findApplicantConsents: (applicantId, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
1671
|
+
// verify required parameter 'applicantId' is not null or undefined
|
|
1672
|
+
(0, common_1.assertParamExists)('findApplicantConsents', 'applicantId', applicantId);
|
|
1673
|
+
const localVarPath = `/applicants/{applicant_id}/consents`
|
|
1674
|
+
.replace(`{${"applicant_id"}}`, encodeURIComponent(String(applicantId)));
|
|
1675
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1676
|
+
const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1677
|
+
let baseOptions;
|
|
1678
|
+
if (configuration) {
|
|
1679
|
+
baseOptions = configuration.baseOptions;
|
|
1680
|
+
}
|
|
1681
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
1682
|
+
const localVarHeaderParameter = {};
|
|
1683
|
+
const localVarQueryParameter = {};
|
|
1684
|
+
// authentication Token required
|
|
1685
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
|
|
1686
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1687
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1688
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1689
|
+
return {
|
|
1690
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1691
|
+
options: localVarRequestOptions,
|
|
1692
|
+
};
|
|
1693
|
+
}),
|
|
1647
1694
|
/**
|
|
1648
1695
|
* Retrieves a single check. Returns a check object.
|
|
1649
1696
|
* @summary Retrieve a Check
|
|
@@ -2522,10 +2569,11 @@ const DefaultApiAxiosParamCreator = function (configuration) {
|
|
|
2522
2569
|
* @param {string} [createdAtGt] A ISO-8601 date to filter results with a created date greater than (after) the one provided.
|
|
2523
2570
|
* @param {string} [createdAtLt] A ISO-8601 date to filter results with a created date less than (before) the one provided.
|
|
2524
2571
|
* @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\'.
|
|
2572
|
+
* @param {string} [applicantId] the applicant\'s id.
|
|
2525
2573
|
* @param {*} [options] Override http request option.
|
|
2526
2574
|
* @throws {RequiredError}
|
|
2527
2575
|
*/
|
|
2528
|
-
listWorkflowRuns: (page, status, createdAtGt, createdAtLt, sort, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
2576
|
+
listWorkflowRuns: (page, status, createdAtGt, createdAtLt, sort, applicantId, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
2529
2577
|
const localVarPath = `/workflow_runs`;
|
|
2530
2578
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2531
2579
|
const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
@@ -2557,6 +2605,9 @@ const DefaultApiAxiosParamCreator = function (configuration) {
|
|
|
2557
2605
|
if (sort !== undefined) {
|
|
2558
2606
|
localVarQueryParameter['sort'] = sort;
|
|
2559
2607
|
}
|
|
2608
|
+
if (applicantId !== undefined) {
|
|
2609
|
+
localVarQueryParameter['applicant_id'] = applicantId;
|
|
2610
|
+
}
|
|
2560
2611
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
2561
2612
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2562
2613
|
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
@@ -2863,7 +2914,7 @@ const DefaultApiAxiosParamCreator = function (configuration) {
|
|
|
2863
2914
|
* @param {DocumentTypes} type The type of document
|
|
2864
2915
|
* @param {string} applicantId The ID of the applicant whose document is being uploaded.
|
|
2865
2916
|
* @param {FileTransfer} file The file to be uploaded.
|
|
2866
|
-
* @param {
|
|
2917
|
+
* @param {string} [fileType] The file type of the uploaded file
|
|
2867
2918
|
* @param {UploadDocumentSideEnum} [side] The side of the document, if applicable. The possible values are front and back
|
|
2868
2919
|
* @param {CountryCodes} [issuingCountry] The issuing country of the document, a 3-letter ISO code.
|
|
2869
2920
|
* @param {boolean} [validateImageQuality] Defaults to false. When true the submitted image will undergo an image quality validation which may take up to 5 seconds.
|
|
@@ -3353,6 +3404,22 @@ const DefaultApiFp = function (configuration) {
|
|
|
3353
3404
|
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
3354
3405
|
});
|
|
3355
3406
|
},
|
|
3407
|
+
/**
|
|
3408
|
+
* Downloads digital photos extracted from specific documents belonging to an applicant. If successful, the response will be the binary data representing the image.
|
|
3409
|
+
* @summary Download NFC face
|
|
3410
|
+
* @param {string} documentId
|
|
3411
|
+
* @param {*} [options] Override http request option.
|
|
3412
|
+
* @throws {RequiredError}
|
|
3413
|
+
*/
|
|
3414
|
+
downloadNfcFace(documentId, options) {
|
|
3415
|
+
var _a, _b, _c;
|
|
3416
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3417
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.downloadNfcFace(documentId, options);
|
|
3418
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
3419
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['DefaultApi.downloadNfcFace']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
3420
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
3421
|
+
});
|
|
3422
|
+
},
|
|
3356
3423
|
/**
|
|
3357
3424
|
* Retrieves the signed document or application form depending on the file_id provided.
|
|
3358
3425
|
* @summary Retrieves the signed document or application form
|
|
@@ -3434,6 +3501,22 @@ const DefaultApiFp = function (configuration) {
|
|
|
3434
3501
|
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
3435
3502
|
});
|
|
3436
3503
|
},
|
|
3504
|
+
/**
|
|
3505
|
+
* Retrieves consents for single applicant.
|
|
3506
|
+
* @summary Retrieve Applicant Consents
|
|
3507
|
+
* @param {string} applicantId
|
|
3508
|
+
* @param {*} [options] Override http request option.
|
|
3509
|
+
* @throws {RequiredError}
|
|
3510
|
+
*/
|
|
3511
|
+
findApplicantConsents(applicantId, options) {
|
|
3512
|
+
var _a, _b, _c;
|
|
3513
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3514
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.findApplicantConsents(applicantId, options);
|
|
3515
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
3516
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['DefaultApi.findApplicantConsents']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
3517
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
3518
|
+
});
|
|
3519
|
+
},
|
|
3437
3520
|
/**
|
|
3438
3521
|
* Retrieves a single check. Returns a check object.
|
|
3439
3522
|
* @summary Retrieve a Check
|
|
@@ -3878,13 +3961,14 @@ const DefaultApiFp = function (configuration) {
|
|
|
3878
3961
|
* @param {string} [createdAtGt] A ISO-8601 date to filter results with a created date greater than (after) the one provided.
|
|
3879
3962
|
* @param {string} [createdAtLt] A ISO-8601 date to filter results with a created date less than (before) the one provided.
|
|
3880
3963
|
* @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\'.
|
|
3964
|
+
* @param {string} [applicantId] the applicant\'s id.
|
|
3881
3965
|
* @param {*} [options] Override http request option.
|
|
3882
3966
|
* @throws {RequiredError}
|
|
3883
3967
|
*/
|
|
3884
|
-
listWorkflowRuns(page, status, createdAtGt, createdAtLt, sort, options) {
|
|
3968
|
+
listWorkflowRuns(page, status, createdAtGt, createdAtLt, sort, applicantId, options) {
|
|
3885
3969
|
var _a, _b, _c;
|
|
3886
3970
|
return __awaiter(this, void 0, void 0, function* () {
|
|
3887
|
-
const localVarAxiosArgs = yield localVarAxiosParamCreator.listWorkflowRuns(page, status, createdAtGt, createdAtLt, sort, options);
|
|
3971
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.listWorkflowRuns(page, status, createdAtGt, createdAtLt, sort, applicantId, options);
|
|
3888
3972
|
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
3889
3973
|
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['DefaultApi.listWorkflowRuns']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
3890
3974
|
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
@@ -4042,7 +4126,7 @@ const DefaultApiFp = function (configuration) {
|
|
|
4042
4126
|
* @param {DocumentTypes} type The type of document
|
|
4043
4127
|
* @param {string} applicantId The ID of the applicant whose document is being uploaded.
|
|
4044
4128
|
* @param {FileTransfer} file The file to be uploaded.
|
|
4045
|
-
* @param {
|
|
4129
|
+
* @param {string} [fileType] The file type of the uploaded file
|
|
4046
4130
|
* @param {UploadDocumentSideEnum} [side] The side of the document, if applicable. The possible values are front and back
|
|
4047
4131
|
* @param {CountryCodes} [issuingCountry] The issuing country of the document, a 3-letter ISO code.
|
|
4048
4132
|
* @param {boolean} [validateImageQuality] Defaults to false. When true the submitted image will undergo an image quality validation which may take up to 5 seconds.
|
|
@@ -4316,6 +4400,16 @@ const DefaultApiFactory = function (configuration, basePath, axios) {
|
|
|
4316
4400
|
downloadMotionCaptureFrame(motionCaptureId, options) {
|
|
4317
4401
|
return localVarFp.downloadMotionCaptureFrame(motionCaptureId, options).then((request) => request(axios, basePath));
|
|
4318
4402
|
},
|
|
4403
|
+
/**
|
|
4404
|
+
* Downloads digital photos extracted from specific documents belonging to an applicant. If successful, the response will be the binary data representing the image.
|
|
4405
|
+
* @summary Download NFC face
|
|
4406
|
+
* @param {string} documentId
|
|
4407
|
+
* @param {*} [options] Override http request option.
|
|
4408
|
+
* @throws {RequiredError}
|
|
4409
|
+
*/
|
|
4410
|
+
downloadNfcFace(documentId, options) {
|
|
4411
|
+
return localVarFp.downloadNfcFace(documentId, options).then((request) => request(axios, basePath));
|
|
4412
|
+
},
|
|
4319
4413
|
/**
|
|
4320
4414
|
* Retrieves the signed document or application form depending on the file_id provided.
|
|
4321
4415
|
* @summary Retrieves the signed document or application form
|
|
@@ -4367,6 +4461,16 @@ const DefaultApiFactory = function (configuration, basePath, axios) {
|
|
|
4367
4461
|
findApplicant(applicantId, options) {
|
|
4368
4462
|
return localVarFp.findApplicant(applicantId, options).then((request) => request(axios, basePath));
|
|
4369
4463
|
},
|
|
4464
|
+
/**
|
|
4465
|
+
* Retrieves consents for single applicant.
|
|
4466
|
+
* @summary Retrieve Applicant Consents
|
|
4467
|
+
* @param {string} applicantId
|
|
4468
|
+
* @param {*} [options] Override http request option.
|
|
4469
|
+
* @throws {RequiredError}
|
|
4470
|
+
*/
|
|
4471
|
+
findApplicantConsents(applicantId, options) {
|
|
4472
|
+
return localVarFp.findApplicantConsents(applicantId, options).then((request) => request(axios, basePath));
|
|
4473
|
+
},
|
|
4370
4474
|
/**
|
|
4371
4475
|
* Retrieves a single check. Returns a check object.
|
|
4372
4476
|
* @summary Retrieve a Check
|
|
@@ -4649,11 +4753,12 @@ const DefaultApiFactory = function (configuration, basePath, axios) {
|
|
|
4649
4753
|
* @param {string} [createdAtGt] A ISO-8601 date to filter results with a created date greater than (after) the one provided.
|
|
4650
4754
|
* @param {string} [createdAtLt] A ISO-8601 date to filter results with a created date less than (before) the one provided.
|
|
4651
4755
|
* @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\'.
|
|
4756
|
+
* @param {string} [applicantId] the applicant\'s id.
|
|
4652
4757
|
* @param {*} [options] Override http request option.
|
|
4653
4758
|
* @throws {RequiredError}
|
|
4654
4759
|
*/
|
|
4655
|
-
listWorkflowRuns(page, status, createdAtGt, createdAtLt, sort, options) {
|
|
4656
|
-
return localVarFp.listWorkflowRuns(page, status, createdAtGt, createdAtLt, sort, options).then((request) => request(axios, basePath));
|
|
4760
|
+
listWorkflowRuns(page, status, createdAtGt, createdAtLt, sort, applicantId, options) {
|
|
4761
|
+
return localVarFp.listWorkflowRuns(page, status, createdAtGt, createdAtLt, sort, applicantId, options).then((request) => request(axios, basePath));
|
|
4657
4762
|
},
|
|
4658
4763
|
/**
|
|
4659
4764
|
* Run a health check on the Onfido API
|
|
@@ -4753,7 +4858,7 @@ const DefaultApiFactory = function (configuration, basePath, axios) {
|
|
|
4753
4858
|
* @param {DocumentTypes} type The type of document
|
|
4754
4859
|
* @param {string} applicantId The ID of the applicant whose document is being uploaded.
|
|
4755
4860
|
* @param {FileTransfer} file The file to be uploaded.
|
|
4756
|
-
* @param {
|
|
4861
|
+
* @param {string} [fileType] The file type of the uploaded file
|
|
4757
4862
|
* @param {UploadDocumentSideEnum} [side] The side of the document, if applicable. The possible values are front and back
|
|
4758
4863
|
* @param {CountryCodes} [issuingCountry] The issuing country of the document, a 3-letter ISO code.
|
|
4759
4864
|
* @param {boolean} [validateImageQuality] Defaults to false. When true the submitted image will undergo an image quality validation which may take up to 5 seconds.
|
|
@@ -5030,6 +5135,17 @@ class DefaultApi extends base_1.BaseAPI {
|
|
|
5030
5135
|
downloadMotionCaptureFrame(motionCaptureId, options) {
|
|
5031
5136
|
return (0, exports.DefaultApiFp)(this.configuration).downloadMotionCaptureFrame(motionCaptureId, options).then((request) => request(this.axios, this.basePath));
|
|
5032
5137
|
}
|
|
5138
|
+
/**
|
|
5139
|
+
* Downloads digital photos extracted from specific documents belonging to an applicant. If successful, the response will be the binary data representing the image.
|
|
5140
|
+
* @summary Download NFC face
|
|
5141
|
+
* @param {string} documentId
|
|
5142
|
+
* @param {*} [options] Override http request option.
|
|
5143
|
+
* @throws {RequiredError}
|
|
5144
|
+
* @memberof DefaultApi
|
|
5145
|
+
*/
|
|
5146
|
+
downloadNfcFace(documentId, options) {
|
|
5147
|
+
return (0, exports.DefaultApiFp)(this.configuration).downloadNfcFace(documentId, options).then((request) => request(this.axios, this.basePath));
|
|
5148
|
+
}
|
|
5033
5149
|
/**
|
|
5034
5150
|
* Retrieves the signed document or application form depending on the file_id provided.
|
|
5035
5151
|
* @summary Retrieves the signed document or application form
|
|
@@ -5086,6 +5202,17 @@ class DefaultApi extends base_1.BaseAPI {
|
|
|
5086
5202
|
findApplicant(applicantId, options) {
|
|
5087
5203
|
return (0, exports.DefaultApiFp)(this.configuration).findApplicant(applicantId, options).then((request) => request(this.axios, this.basePath));
|
|
5088
5204
|
}
|
|
5205
|
+
/**
|
|
5206
|
+
* Retrieves consents for single applicant.
|
|
5207
|
+
* @summary Retrieve Applicant Consents
|
|
5208
|
+
* @param {string} applicantId
|
|
5209
|
+
* @param {*} [options] Override http request option.
|
|
5210
|
+
* @throws {RequiredError}
|
|
5211
|
+
* @memberof DefaultApi
|
|
5212
|
+
*/
|
|
5213
|
+
findApplicantConsents(applicantId, options) {
|
|
5214
|
+
return (0, exports.DefaultApiFp)(this.configuration).findApplicantConsents(applicantId, options).then((request) => request(this.axios, this.basePath));
|
|
5215
|
+
}
|
|
5089
5216
|
/**
|
|
5090
5217
|
* Retrieves a single check. Returns a check object.
|
|
5091
5218
|
* @summary Retrieve a Check
|
|
@@ -5395,12 +5522,13 @@ class DefaultApi extends base_1.BaseAPI {
|
|
|
5395
5522
|
* @param {string} [createdAtGt] A ISO-8601 date to filter results with a created date greater than (after) the one provided.
|
|
5396
5523
|
* @param {string} [createdAtLt] A ISO-8601 date to filter results with a created date less than (before) the one provided.
|
|
5397
5524
|
* @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\'.
|
|
5525
|
+
* @param {string} [applicantId] the applicant\'s id.
|
|
5398
5526
|
* @param {*} [options] Override http request option.
|
|
5399
5527
|
* @throws {RequiredError}
|
|
5400
5528
|
* @memberof DefaultApi
|
|
5401
5529
|
*/
|
|
5402
|
-
listWorkflowRuns(page, status, createdAtGt, createdAtLt, sort, options) {
|
|
5403
|
-
return (0, exports.DefaultApiFp)(this.configuration).listWorkflowRuns(page, status, createdAtGt, createdAtLt, sort, options).then((request) => request(this.axios, this.basePath));
|
|
5530
|
+
listWorkflowRuns(page, status, createdAtGt, createdAtLt, sort, applicantId, options) {
|
|
5531
|
+
return (0, exports.DefaultApiFp)(this.configuration).listWorkflowRuns(page, status, createdAtGt, createdAtLt, sort, applicantId, options).then((request) => request(this.axios, this.basePath));
|
|
5404
5532
|
}
|
|
5405
5533
|
/**
|
|
5406
5534
|
* Run a health check on the Onfido API
|
|
@@ -5509,7 +5637,7 @@ class DefaultApi extends base_1.BaseAPI {
|
|
|
5509
5637
|
* @param {DocumentTypes} type The type of document
|
|
5510
5638
|
* @param {string} applicantId The ID of the applicant whose document is being uploaded.
|
|
5511
5639
|
* @param {FileTransfer} file The file to be uploaded.
|
|
5512
|
-
* @param {
|
|
5640
|
+
* @param {string} [fileType] The file type of the uploaded file
|
|
5513
5641
|
* @param {UploadDocumentSideEnum} [side] The side of the document, if applicable. The possible values are front and back
|
|
5514
5642
|
* @param {CountryCodes} [issuingCountry] The issuing country of the document, a 3-letter ISO code.
|
|
5515
5643
|
* @param {boolean} [validateImageQuality] Defaults to false. When true the submitted image will undergo an image quality validation which may take up to 5 seconds.
|
|
@@ -5556,16 +5684,6 @@ exports.ListWorkflowRunsSortEnum = {
|
|
|
5556
5684
|
Asc: 'asc',
|
|
5557
5685
|
UnknownDefaultOpenApi: '11184809'
|
|
5558
5686
|
};
|
|
5559
|
-
/**
|
|
5560
|
-
* @export
|
|
5561
|
-
*/
|
|
5562
|
-
exports.UploadDocumentFileTypeEnum = {
|
|
5563
|
-
Jpg: 'jpg',
|
|
5564
|
-
Jpeg: 'jpeg',
|
|
5565
|
-
Png: 'png',
|
|
5566
|
-
Pdf: 'pdf',
|
|
5567
|
-
UnknownDefaultOpenApi: '11184809'
|
|
5568
|
-
};
|
|
5569
5687
|
/**
|
|
5570
5688
|
* @export
|
|
5571
5689
|
*/
|
package/dist/configuration.js
CHANGED
|
@@ -32,7 +32,7 @@ class Configuration {
|
|
|
32
32
|
}
|
|
33
33
|
this.apiKey = 'Token token=' + param.apiToken;
|
|
34
34
|
this.basePath = param.basePath || base_1.BASE_PATH.replace('.eu.', `.${Region[param.region || Region.EU].toLowerCase()}.`);
|
|
35
|
-
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':
|
|
35
|
+
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.1.0" }) });
|
|
36
36
|
this.formDataCtor = param.formDataCtor || require('form-data'); // Injiect form data constructor (if needed)
|
|
37
37
|
}
|
|
38
38
|
/**
|