@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/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
@@ -1640,6 +1656,37 @@ export const DefaultApiAxiosParamCreator = function (configuration) {
1640
1656
  options: localVarRequestOptions,
1641
1657
  };
1642
1658
  }),
1659
+ /**
1660
+ * Retrieves consents for single applicant.
1661
+ * @summary Retrieve Applicant Consents
1662
+ * @param {string} applicantId
1663
+ * @param {*} [options] Override http request option.
1664
+ * @throws {RequiredError}
1665
+ */
1666
+ findApplicantConsents: (applicantId, options = {}) => __awaiter(this, void 0, void 0, function* () {
1667
+ // verify required parameter 'applicantId' is not null or undefined
1668
+ assertParamExists('findApplicantConsents', 'applicantId', applicantId);
1669
+ const localVarPath = `/applicants/{applicant_id}/consents`
1670
+ .replace(`{${"applicant_id"}}`, encodeURIComponent(String(applicantId)));
1671
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1672
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1673
+ let baseOptions;
1674
+ if (configuration) {
1675
+ baseOptions = configuration.baseOptions;
1676
+ }
1677
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1678
+ const localVarHeaderParameter = {};
1679
+ const localVarQueryParameter = {};
1680
+ // authentication Token required
1681
+ yield setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration);
1682
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1683
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1684
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1685
+ return {
1686
+ url: toPathString(localVarUrlObj),
1687
+ options: localVarRequestOptions,
1688
+ };
1689
+ }),
1643
1690
  /**
1644
1691
  * Retrieves a single check. Returns a check object.
1645
1692
  * @summary Retrieve a Check
@@ -2518,10 +2565,11 @@ export const DefaultApiAxiosParamCreator = function (configuration) {
2518
2565
  * @param {string} [createdAtGt] A ISO-8601 date to filter results with a created date greater than (after) the one provided.
2519
2566
  * @param {string} [createdAtLt] A ISO-8601 date to filter results with a created date less than (before) the one provided.
2520
2567
  * @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\'.
2568
+ * @param {string} [applicantId] the applicant\'s id.
2521
2569
  * @param {*} [options] Override http request option.
2522
2570
  * @throws {RequiredError}
2523
2571
  */
2524
- listWorkflowRuns: (page, status, createdAtGt, createdAtLt, sort, options = {}) => __awaiter(this, void 0, void 0, function* () {
2572
+ listWorkflowRuns: (page, status, createdAtGt, createdAtLt, sort, applicantId, options = {}) => __awaiter(this, void 0, void 0, function* () {
2525
2573
  const localVarPath = `/workflow_runs`;
2526
2574
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
2527
2575
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -2553,6 +2601,9 @@ export const DefaultApiAxiosParamCreator = function (configuration) {
2553
2601
  if (sort !== undefined) {
2554
2602
  localVarQueryParameter['sort'] = sort;
2555
2603
  }
2604
+ if (applicantId !== undefined) {
2605
+ localVarQueryParameter['applicant_id'] = applicantId;
2606
+ }
2556
2607
  setSearchParams(localVarUrlObj, localVarQueryParameter);
2557
2608
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2558
2609
  localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
@@ -2859,7 +2910,7 @@ export const DefaultApiAxiosParamCreator = function (configuration) {
2859
2910
  * @param {DocumentTypes} type The type of document
2860
2911
  * @param {string} applicantId The ID of the applicant whose document is being uploaded.
2861
2912
  * @param {FileTransfer} file The file to be uploaded.
2862
- * @param {UploadDocumentFileTypeEnum} [fileType] The file type of the uploaded file
2913
+ * @param {string} [fileType] The file type of the uploaded file
2863
2914
  * @param {UploadDocumentSideEnum} [side] The side of the document, if applicable. The possible values are front and back
2864
2915
  * @param {CountryCodes} [issuingCountry] The issuing country of the document, a 3-letter ISO code.
2865
2916
  * @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 +3399,22 @@ export const DefaultApiFp = function (configuration) {
3348
3399
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3349
3400
  });
3350
3401
  },
3402
+ /**
3403
+ * Downloads digital photos extracted from specific documents belonging to an applicant. If successful, the response will be the binary data representing the image.
3404
+ * @summary Download NFC face
3405
+ * @param {string} documentId
3406
+ * @param {*} [options] Override http request option.
3407
+ * @throws {RequiredError}
3408
+ */
3409
+ downloadNfcFace(documentId, options) {
3410
+ var _a, _b, _c;
3411
+ return __awaiter(this, void 0, void 0, function* () {
3412
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.downloadNfcFace(documentId, options);
3413
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
3414
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['DefaultApi.downloadNfcFace']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
3415
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3416
+ });
3417
+ },
3351
3418
  /**
3352
3419
  * Retrieves the signed document or application form depending on the file_id provided.
3353
3420
  * @summary Retrieves the signed document or application form
@@ -3429,6 +3496,22 @@ export const DefaultApiFp = function (configuration) {
3429
3496
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3430
3497
  });
3431
3498
  },
3499
+ /**
3500
+ * Retrieves consents for single applicant.
3501
+ * @summary Retrieve Applicant Consents
3502
+ * @param {string} applicantId
3503
+ * @param {*} [options] Override http request option.
3504
+ * @throws {RequiredError}
3505
+ */
3506
+ findApplicantConsents(applicantId, options) {
3507
+ var _a, _b, _c;
3508
+ return __awaiter(this, void 0, void 0, function* () {
3509
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.findApplicantConsents(applicantId, options);
3510
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
3511
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['DefaultApi.findApplicantConsents']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
3512
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3513
+ });
3514
+ },
3432
3515
  /**
3433
3516
  * Retrieves a single check. Returns a check object.
3434
3517
  * @summary Retrieve a Check
@@ -3873,13 +3956,14 @@ export const DefaultApiFp = function (configuration) {
3873
3956
  * @param {string} [createdAtGt] A ISO-8601 date to filter results with a created date greater than (after) the one provided.
3874
3957
  * @param {string} [createdAtLt] A ISO-8601 date to filter results with a created date less than (before) the one provided.
3875
3958
  * @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\'.
3959
+ * @param {string} [applicantId] the applicant\'s id.
3876
3960
  * @param {*} [options] Override http request option.
3877
3961
  * @throws {RequiredError}
3878
3962
  */
3879
- listWorkflowRuns(page, status, createdAtGt, createdAtLt, sort, options) {
3963
+ listWorkflowRuns(page, status, createdAtGt, createdAtLt, sort, applicantId, options) {
3880
3964
  var _a, _b, _c;
3881
3965
  return __awaiter(this, void 0, void 0, function* () {
3882
- const localVarAxiosArgs = yield localVarAxiosParamCreator.listWorkflowRuns(page, status, createdAtGt, createdAtLt, sort, options);
3966
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listWorkflowRuns(page, status, createdAtGt, createdAtLt, sort, applicantId, options);
3883
3967
  const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
3884
3968
  const localVarOperationServerBasePath = (_c = (_b = operationServerMap['DefaultApi.listWorkflowRuns']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
3885
3969
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
@@ -4037,7 +4121,7 @@ export const DefaultApiFp = function (configuration) {
4037
4121
  * @param {DocumentTypes} type The type of document
4038
4122
  * @param {string} applicantId The ID of the applicant whose document is being uploaded.
4039
4123
  * @param {FileTransfer} file The file to be uploaded.
4040
- * @param {UploadDocumentFileTypeEnum} [fileType] The file type of the uploaded file
4124
+ * @param {string} [fileType] The file type of the uploaded file
4041
4125
  * @param {UploadDocumentSideEnum} [side] The side of the document, if applicable. The possible values are front and back
4042
4126
  * @param {CountryCodes} [issuingCountry] The issuing country of the document, a 3-letter ISO code.
4043
4127
  * @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 +4394,16 @@ export const DefaultApiFactory = function (configuration, basePath, axios) {
4310
4394
  downloadMotionCaptureFrame(motionCaptureId, options) {
4311
4395
  return localVarFp.downloadMotionCaptureFrame(motionCaptureId, options).then((request) => request(axios, basePath));
4312
4396
  },
4397
+ /**
4398
+ * Downloads digital photos extracted from specific documents belonging to an applicant. If successful, the response will be the binary data representing the image.
4399
+ * @summary Download NFC face
4400
+ * @param {string} documentId
4401
+ * @param {*} [options] Override http request option.
4402
+ * @throws {RequiredError}
4403
+ */
4404
+ downloadNfcFace(documentId, options) {
4405
+ return localVarFp.downloadNfcFace(documentId, options).then((request) => request(axios, basePath));
4406
+ },
4313
4407
  /**
4314
4408
  * Retrieves the signed document or application form depending on the file_id provided.
4315
4409
  * @summary Retrieves the signed document or application form
@@ -4361,6 +4455,16 @@ export const DefaultApiFactory = function (configuration, basePath, axios) {
4361
4455
  findApplicant(applicantId, options) {
4362
4456
  return localVarFp.findApplicant(applicantId, options).then((request) => request(axios, basePath));
4363
4457
  },
4458
+ /**
4459
+ * Retrieves consents for single applicant.
4460
+ * @summary Retrieve Applicant Consents
4461
+ * @param {string} applicantId
4462
+ * @param {*} [options] Override http request option.
4463
+ * @throws {RequiredError}
4464
+ */
4465
+ findApplicantConsents(applicantId, options) {
4466
+ return localVarFp.findApplicantConsents(applicantId, options).then((request) => request(axios, basePath));
4467
+ },
4364
4468
  /**
4365
4469
  * Retrieves a single check. Returns a check object.
4366
4470
  * @summary Retrieve a Check
@@ -4643,11 +4747,12 @@ export const DefaultApiFactory = function (configuration, basePath, axios) {
4643
4747
  * @param {string} [createdAtGt] A ISO-8601 date to filter results with a created date greater than (after) the one provided.
4644
4748
  * @param {string} [createdAtLt] A ISO-8601 date to filter results with a created date less than (before) the one provided.
4645
4749
  * @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\'.
4750
+ * @param {string} [applicantId] the applicant\'s id.
4646
4751
  * @param {*} [options] Override http request option.
4647
4752
  * @throws {RequiredError}
4648
4753
  */
4649
- listWorkflowRuns(page, status, createdAtGt, createdAtLt, sort, options) {
4650
- return localVarFp.listWorkflowRuns(page, status, createdAtGt, createdAtLt, sort, options).then((request) => request(axios, basePath));
4754
+ listWorkflowRuns(page, status, createdAtGt, createdAtLt, sort, applicantId, options) {
4755
+ return localVarFp.listWorkflowRuns(page, status, createdAtGt, createdAtLt, sort, applicantId, options).then((request) => request(axios, basePath));
4651
4756
  },
4652
4757
  /**
4653
4758
  * Run a health check on the Onfido API
@@ -4747,7 +4852,7 @@ export const DefaultApiFactory = function (configuration, basePath, axios) {
4747
4852
  * @param {DocumentTypes} type The type of document
4748
4853
  * @param {string} applicantId The ID of the applicant whose document is being uploaded.
4749
4854
  * @param {FileTransfer} file The file to be uploaded.
4750
- * @param {UploadDocumentFileTypeEnum} [fileType] The file type of the uploaded file
4855
+ * @param {string} [fileType] The file type of the uploaded file
4751
4856
  * @param {UploadDocumentSideEnum} [side] The side of the document, if applicable. The possible values are front and back
4752
4857
  * @param {CountryCodes} [issuingCountry] The issuing country of the document, a 3-letter ISO code.
4753
4858
  * @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 +5128,17 @@ export class DefaultApi extends BaseAPI {
5023
5128
  downloadMotionCaptureFrame(motionCaptureId, options) {
5024
5129
  return DefaultApiFp(this.configuration).downloadMotionCaptureFrame(motionCaptureId, options).then((request) => request(this.axios, this.basePath));
5025
5130
  }
5131
+ /**
5132
+ * Downloads digital photos extracted from specific documents belonging to an applicant. If successful, the response will be the binary data representing the image.
5133
+ * @summary Download NFC face
5134
+ * @param {string} documentId
5135
+ * @param {*} [options] Override http request option.
5136
+ * @throws {RequiredError}
5137
+ * @memberof DefaultApi
5138
+ */
5139
+ downloadNfcFace(documentId, options) {
5140
+ return DefaultApiFp(this.configuration).downloadNfcFace(documentId, options).then((request) => request(this.axios, this.basePath));
5141
+ }
5026
5142
  /**
5027
5143
  * Retrieves the signed document or application form depending on the file_id provided.
5028
5144
  * @summary Retrieves the signed document or application form
@@ -5079,6 +5195,17 @@ export class DefaultApi extends BaseAPI {
5079
5195
  findApplicant(applicantId, options) {
5080
5196
  return DefaultApiFp(this.configuration).findApplicant(applicantId, options).then((request) => request(this.axios, this.basePath));
5081
5197
  }
5198
+ /**
5199
+ * Retrieves consents for single applicant.
5200
+ * @summary Retrieve Applicant Consents
5201
+ * @param {string} applicantId
5202
+ * @param {*} [options] Override http request option.
5203
+ * @throws {RequiredError}
5204
+ * @memberof DefaultApi
5205
+ */
5206
+ findApplicantConsents(applicantId, options) {
5207
+ return DefaultApiFp(this.configuration).findApplicantConsents(applicantId, options).then((request) => request(this.axios, this.basePath));
5208
+ }
5082
5209
  /**
5083
5210
  * Retrieves a single check. Returns a check object.
5084
5211
  * @summary Retrieve a Check
@@ -5388,12 +5515,13 @@ export class DefaultApi extends BaseAPI {
5388
5515
  * @param {string} [createdAtGt] A ISO-8601 date to filter results with a created date greater than (after) the one provided.
5389
5516
  * @param {string} [createdAtLt] A ISO-8601 date to filter results with a created date less than (before) the one provided.
5390
5517
  * @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\'.
5518
+ * @param {string} [applicantId] the applicant\'s id.
5391
5519
  * @param {*} [options] Override http request option.
5392
5520
  * @throws {RequiredError}
5393
5521
  * @memberof DefaultApi
5394
5522
  */
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));
5523
+ listWorkflowRuns(page, status, createdAtGt, createdAtLt, sort, applicantId, options) {
5524
+ return DefaultApiFp(this.configuration).listWorkflowRuns(page, status, createdAtGt, createdAtLt, sort, applicantId, options).then((request) => request(this.axios, this.basePath));
5397
5525
  }
5398
5526
  /**
5399
5527
  * Run a health check on the Onfido API
@@ -5502,7 +5630,7 @@ export class DefaultApi extends BaseAPI {
5502
5630
  * @param {DocumentTypes} type The type of document
5503
5631
  * @param {string} applicantId The ID of the applicant whose document is being uploaded.
5504
5632
  * @param {FileTransfer} file The file to be uploaded.
5505
- * @param {UploadDocumentFileTypeEnum} [fileType] The file type of the uploaded file
5633
+ * @param {string} [fileType] The file type of the uploaded file
5506
5634
  * @param {UploadDocumentSideEnum} [side] The side of the document, if applicable. The possible values are front and back
5507
5635
  * @param {CountryCodes} [issuingCountry] The issuing country of the document, a 3-letter ISO code.
5508
5636
  * @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 +5676,6 @@ export const ListWorkflowRunsSortEnum = {
5548
5676
  Asc: 'asc',
5549
5677
  UnknownDefaultOpenApi: '11184809'
5550
5678
  };
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
5679
  /**
5562
5680
  * @export
5563
5681
  */
@@ -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': 'onfido-node/4.6.0' }) });
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.1.0" }) });
33
33
  this.formDataCtor = param.formDataCtor || require('form-data'); // Injiect form data constructor (if needed)
34
34
  }
35
35
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onfido/api",
3
- "version": "4.6.0",
3
+ "version": "5.1.0",
4
4
  "description": "Node.js library for the Onfido API",
5
5
  "author": "OpenAPI-Generator Contributors",
6
6
  "repository": {