@onfido/api 5.0.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/api.d.ts CHANGED
@@ -410,6 +410,31 @@ export interface ApplicantBuilder {
410
410
  */
411
411
  'last_name': string;
412
412
  }
413
+ /**
414
+ *
415
+ * @export
416
+ * @interface ApplicantConsent
417
+ */
418
+ export interface ApplicantConsent {
419
+ /**
420
+ *
421
+ * @type {ApplicantConsentName}
422
+ * @memberof ApplicantConsent
423
+ */
424
+ 'name': ApplicantConsentName;
425
+ /**
426
+ *
427
+ * @type {boolean}
428
+ * @memberof ApplicantConsent
429
+ */
430
+ 'granted': boolean;
431
+ /**
432
+ * The date and time when this applicant consent was granted, if not granted the value is nil.
433
+ * @type {string}
434
+ * @memberof ApplicantConsent
435
+ */
436
+ 'granted_at': string | null;
437
+ }
413
438
  /**
414
439
  *
415
440
  * @export
@@ -1359,16 +1384,24 @@ export type CountryCodes = typeof CountryCodes[keyof typeof CountryCodes];
1359
1384
  * @interface DeviceIntelligenceBreakdown
1360
1385
  */
1361
1386
  export interface DeviceIntelligenceBreakdown {
1387
+ /**
1388
+ *
1389
+ * @type {DeviceIntelligenceBreakdownDevice}
1390
+ * @memberof DeviceIntelligenceBreakdown
1391
+ */
1392
+ 'device'?: DeviceIntelligenceBreakdownDevice;
1362
1393
  /**
1363
1394
  *
1364
1395
  * @type {DeviceIntelligenceBreakdownBreakdown}
1365
1396
  * @memberof DeviceIntelligenceBreakdown
1397
+ * @deprecated
1366
1398
  */
1367
1399
  'breakdown'?: DeviceIntelligenceBreakdownBreakdown;
1368
1400
  /**
1369
1401
  *
1370
1402
  * @type {DeviceIntelligenceBreakdownProperties}
1371
1403
  * @memberof DeviceIntelligenceBreakdown
1404
+ * @deprecated
1372
1405
  */
1373
1406
  'properties'?: DeviceIntelligenceBreakdownProperties;
1374
1407
  }
@@ -1380,46 +1413,46 @@ export interface DeviceIntelligenceBreakdown {
1380
1413
  export interface DeviceIntelligenceBreakdownBreakdown {
1381
1414
  /**
1382
1415
  *
1383
- * @type {DeviceIntelligenceBreakdownBreakdownDevice}
1416
+ * @type {DeviceIntelligenceBreakdownDevice}
1384
1417
  * @memberof DeviceIntelligenceBreakdownBreakdown
1385
1418
  */
1386
- 'device'?: DeviceIntelligenceBreakdownBreakdownDevice;
1419
+ 'device'?: DeviceIntelligenceBreakdownDevice;
1387
1420
  }
1388
1421
  /**
1389
1422
  * Asserts whether the device used to upload the media is trustworthy, i.e. it is a real, physical device.
1390
1423
  * @export
1391
- * @interface DeviceIntelligenceBreakdownBreakdownDevice
1424
+ * @interface DeviceIntelligenceBreakdownDevice
1392
1425
  */
1393
- export interface DeviceIntelligenceBreakdownBreakdownDevice {
1426
+ export interface DeviceIntelligenceBreakdownDevice {
1394
1427
  /**
1395
1428
  *
1396
- * @type {DeviceIntelligenceBreakdownBreakdownDeviceBreakdown}
1397
- * @memberof DeviceIntelligenceBreakdownBreakdownDevice
1429
+ * @type {DeviceIntelligenceBreakdownDeviceBreakdown}
1430
+ * @memberof DeviceIntelligenceBreakdownDevice
1398
1431
  */
1399
- 'breakdown'?: DeviceIntelligenceBreakdownBreakdownDeviceBreakdown;
1432
+ 'breakdown'?: DeviceIntelligenceBreakdownDeviceBreakdown;
1400
1433
  }
1401
1434
  /**
1402
1435
  *
1403
1436
  * @export
1404
- * @interface DeviceIntelligenceBreakdownBreakdownDeviceBreakdown
1437
+ * @interface DeviceIntelligenceBreakdownDeviceBreakdown
1405
1438
  */
1406
- export interface DeviceIntelligenceBreakdownBreakdownDeviceBreakdown {
1439
+ export interface DeviceIntelligenceBreakdownDeviceBreakdown {
1407
1440
  /**
1408
1441
  *
1409
1442
  * @type {DocumentBreakdownDataComparisonBreakdownIssuingCountry}
1410
- * @memberof DeviceIntelligenceBreakdownBreakdownDeviceBreakdown
1443
+ * @memberof DeviceIntelligenceBreakdownDeviceBreakdown
1411
1444
  */
1412
1445
  'application_authenticity'?: DocumentBreakdownDataComparisonBreakdownIssuingCountry;
1413
1446
  /**
1414
1447
  *
1415
1448
  * @type {DocumentBreakdownDataComparisonBreakdownIssuingCountry}
1416
- * @memberof DeviceIntelligenceBreakdownBreakdownDeviceBreakdown
1449
+ * @memberof DeviceIntelligenceBreakdownDeviceBreakdown
1417
1450
  */
1418
1451
  'device_integrity'?: DocumentBreakdownDataComparisonBreakdownIssuingCountry;
1419
1452
  /**
1420
1453
  *
1421
1454
  * @type {DocumentBreakdownDataComparisonBreakdownIssuingCountry}
1422
- * @memberof DeviceIntelligenceBreakdownBreakdownDeviceBreakdown
1455
+ * @memberof DeviceIntelligenceBreakdownDeviceBreakdown
1423
1456
  */
1424
1457
  'device_reputation'?: DocumentBreakdownDataComparisonBreakdownIssuingCountry;
1425
1458
  }
@@ -1610,6 +1643,31 @@ export interface DeviceIntelligenceBreakdownPropertiesIp {
1610
1643
  */
1611
1644
  'address'?: string;
1612
1645
  }
1646
+ /**
1647
+ *
1648
+ * @export
1649
+ * @interface DeviceIntelligenceProperties
1650
+ */
1651
+ export interface DeviceIntelligenceProperties {
1652
+ /**
1653
+ *
1654
+ * @type {DeviceIntelligenceBreakdownPropertiesDevice}
1655
+ * @memberof DeviceIntelligenceProperties
1656
+ */
1657
+ 'device'?: DeviceIntelligenceBreakdownPropertiesDevice;
1658
+ /**
1659
+ *
1660
+ * @type {DeviceIntelligenceBreakdownPropertiesIp}
1661
+ * @memberof DeviceIntelligenceProperties
1662
+ */
1663
+ 'ip'?: DeviceIntelligenceBreakdownPropertiesIp;
1664
+ /**
1665
+ *
1666
+ * @type {DeviceIntelligenceBreakdownPropertiesGeolocation}
1667
+ * @memberof DeviceIntelligenceProperties
1668
+ */
1669
+ 'geolocation'?: DeviceIntelligenceBreakdownPropertiesGeolocation;
1670
+ }
1613
1671
  /**
1614
1672
  *
1615
1673
  * @export
@@ -1670,6 +1728,12 @@ export interface DeviceIntelligenceReport {
1670
1728
  * @memberof DeviceIntelligenceReport
1671
1729
  */
1672
1730
  'breakdown'?: DeviceIntelligenceBreakdown;
1731
+ /**
1732
+ *
1733
+ * @type {DeviceIntelligenceProperties}
1734
+ * @memberof DeviceIntelligenceReport
1735
+ */
1736
+ 'properties'?: DeviceIntelligenceProperties;
1673
1737
  }
1674
1738
  /**
1675
1739
  *
@@ -3020,10 +3084,10 @@ export interface DocumentProperties {
3020
3084
  'nfc'?: DocumentPropertiesNfc;
3021
3085
  /**
3022
3086
  *
3023
- * @type {DocumentPropertiesDrivingLicenceInformation}
3087
+ * @type {Array<DocumentPropertiesDrivingLicenceInformationItem>}
3024
3088
  * @memberof DocumentProperties
3025
3089
  */
3026
- 'driving_licence_information'?: DocumentPropertiesDrivingLicenceInformation;
3090
+ 'driving_licence_information'?: Array<DocumentPropertiesDrivingLicenceInformationItem>;
3027
3091
  /**
3028
3092
  *
3029
3093
  * @type {DocumentPropertiesDocumentClassification}
@@ -3269,31 +3333,31 @@ export interface DocumentPropertiesDocumentNumbersInner {
3269
3333
  /**
3270
3334
  *
3271
3335
  * @export
3272
- * @interface DocumentPropertiesDrivingLicenceInformation
3336
+ * @interface DocumentPropertiesDrivingLicenceInformationItem
3273
3337
  */
3274
- export interface DocumentPropertiesDrivingLicenceInformation {
3338
+ export interface DocumentPropertiesDrivingLicenceInformationItem {
3275
3339
  /**
3276
3340
  *
3277
3341
  * @type {string}
3278
- * @memberof DocumentPropertiesDrivingLicenceInformation
3342
+ * @memberof DocumentPropertiesDrivingLicenceInformationItem
3279
3343
  */
3280
3344
  'category'?: string;
3281
3345
  /**
3282
3346
  *
3283
3347
  * @type {string}
3284
- * @memberof DocumentPropertiesDrivingLicenceInformation
3348
+ * @memberof DocumentPropertiesDrivingLicenceInformationItem
3285
3349
  */
3286
3350
  'obtainment_date'?: string;
3287
3351
  /**
3288
3352
  *
3289
3353
  * @type {string}
3290
- * @memberof DocumentPropertiesDrivingLicenceInformation
3354
+ * @memberof DocumentPropertiesDrivingLicenceInformationItem
3291
3355
  */
3292
3356
  'expiry_date'?: string;
3293
3357
  /**
3294
3358
  *
3295
3359
  * @type {string}
3296
- * @memberof DocumentPropertiesDrivingLicenceInformation
3360
+ * @memberof DocumentPropertiesDrivingLicenceInformationItem
3297
3361
  */
3298
3362
  'codes'?: string;
3299
3363
  }
@@ -4324,10 +4388,10 @@ export interface DocumentWithDriverVerificationReportAllOfProperties {
4324
4388
  'nfc'?: DocumentPropertiesNfc;
4325
4389
  /**
4326
4390
  *
4327
- * @type {DocumentPropertiesDrivingLicenceInformation}
4391
+ * @type {Array<DocumentPropertiesDrivingLicenceInformationItem>}
4328
4392
  * @memberof DocumentWithDriverVerificationReportAllOfProperties
4329
4393
  */
4330
- 'driving_licence_information'?: DocumentPropertiesDrivingLicenceInformation;
4394
+ 'driving_licence_information'?: Array<DocumentPropertiesDrivingLicenceInformationItem>;
4331
4395
  /**
4332
4396
  *
4333
4397
  * @type {DocumentPropertiesDocumentClassification}
@@ -9764,6 +9828,36 @@ export interface Webhook {
9764
9828
  * @memberof Webhook
9765
9829
  */
9766
9830
  'payload_version'?: number;
9831
+ /**
9832
+ * Determines if the webhook will fetch OAuth access tokens to send in the Authorization header.
9833
+ * @type {boolean}
9834
+ * @memberof Webhook
9835
+ */
9836
+ 'oauth_enabled'?: boolean;
9837
+ /**
9838
+ * The url to fetch the OAuth access token using client credentials grant.
9839
+ * @type {string}
9840
+ * @memberof Webhook
9841
+ */
9842
+ 'oauth_server_url'?: string;
9843
+ /**
9844
+ * The client id to authenticate the client credentials grant.
9845
+ * @type {string}
9846
+ * @memberof Webhook
9847
+ */
9848
+ 'oauth_server_client_id'?: string;
9849
+ /**
9850
+ * The client secret to authenticate the client credentials grant.
9851
+ * @type {string}
9852
+ * @memberof Webhook
9853
+ */
9854
+ 'oauth_server_client_secret'?: string;
9855
+ /**
9856
+ * The scopes to be sent when requesting the access token.
9857
+ * @type {string}
9858
+ * @memberof Webhook
9859
+ */
9860
+ 'oauth_server_scope'?: string;
9767
9861
  /**
9768
9862
  * The unique identifier of the webhook.
9769
9863
  * @type {string}
@@ -9819,6 +9913,36 @@ export interface WebhookBuilder {
9819
9913
  * @memberof WebhookBuilder
9820
9914
  */
9821
9915
  'payload_version'?: number;
9916
+ /**
9917
+ * Determines if the webhook will fetch OAuth access tokens to send in the Authorization header.
9918
+ * @type {boolean}
9919
+ * @memberof WebhookBuilder
9920
+ */
9921
+ 'oauth_enabled'?: boolean;
9922
+ /**
9923
+ * The url to fetch the OAuth access token using client credentials grant.
9924
+ * @type {string}
9925
+ * @memberof WebhookBuilder
9926
+ */
9927
+ 'oauth_server_url'?: string;
9928
+ /**
9929
+ * The client id to authenticate the client credentials grant.
9930
+ * @type {string}
9931
+ * @memberof WebhookBuilder
9932
+ */
9933
+ 'oauth_server_client_id'?: string;
9934
+ /**
9935
+ * The client secret to authenticate the client credentials grant.
9936
+ * @type {string}
9937
+ * @memberof WebhookBuilder
9938
+ */
9939
+ 'oauth_server_client_secret'?: string;
9940
+ /**
9941
+ * The scopes to be sent when requesting the access token.
9942
+ * @type {string}
9943
+ * @memberof WebhookBuilder
9944
+ */
9945
+ 'oauth_server_scope'?: string;
9822
9946
  /**
9823
9947
  * The url that will listen to notifications (must be https).
9824
9948
  * @type {string}
@@ -10168,6 +10292,36 @@ export interface WebhookShared {
10168
10292
  * @memberof WebhookShared
10169
10293
  */
10170
10294
  'payload_version'?: number;
10295
+ /**
10296
+ * Determines if the webhook will fetch OAuth access tokens to send in the Authorization header.
10297
+ * @type {boolean}
10298
+ * @memberof WebhookShared
10299
+ */
10300
+ 'oauth_enabled'?: boolean;
10301
+ /**
10302
+ * The url to fetch the OAuth access token using client credentials grant.
10303
+ * @type {string}
10304
+ * @memberof WebhookShared
10305
+ */
10306
+ 'oauth_server_url'?: string;
10307
+ /**
10308
+ * The client id to authenticate the client credentials grant.
10309
+ * @type {string}
10310
+ * @memberof WebhookShared
10311
+ */
10312
+ 'oauth_server_client_id'?: string;
10313
+ /**
10314
+ * The client secret to authenticate the client credentials grant.
10315
+ * @type {string}
10316
+ * @memberof WebhookShared
10317
+ */
10318
+ 'oauth_server_client_secret'?: string;
10319
+ /**
10320
+ * The scopes to be sent when requesting the access token.
10321
+ * @type {string}
10322
+ * @memberof WebhookShared
10323
+ */
10324
+ 'oauth_server_scope'?: string;
10171
10325
  }
10172
10326
  /**
10173
10327
  *
@@ -10212,6 +10366,36 @@ export interface WebhookUpdater {
10212
10366
  * @memberof WebhookUpdater
10213
10367
  */
10214
10368
  'payload_version'?: number;
10369
+ /**
10370
+ * Determines if the webhook will fetch OAuth access tokens to send in the Authorization header.
10371
+ * @type {boolean}
10372
+ * @memberof WebhookUpdater
10373
+ */
10374
+ 'oauth_enabled'?: boolean;
10375
+ /**
10376
+ * The url to fetch the OAuth access token using client credentials grant.
10377
+ * @type {string}
10378
+ * @memberof WebhookUpdater
10379
+ */
10380
+ 'oauth_server_url'?: string;
10381
+ /**
10382
+ * The client id to authenticate the client credentials grant.
10383
+ * @type {string}
10384
+ * @memberof WebhookUpdater
10385
+ */
10386
+ 'oauth_server_client_id'?: string;
10387
+ /**
10388
+ * The client secret to authenticate the client credentials grant.
10389
+ * @type {string}
10390
+ * @memberof WebhookUpdater
10391
+ */
10392
+ 'oauth_server_client_secret'?: string;
10393
+ /**
10394
+ * The scopes to be sent when requesting the access token.
10395
+ * @type {string}
10396
+ * @memberof WebhookUpdater
10397
+ */
10398
+ 'oauth_server_scope'?: string;
10215
10399
  /**
10216
10400
  * The url that will listen to notifications (must be https).
10217
10401
  * @type {string}
@@ -10832,6 +11016,14 @@ export declare const DefaultApiAxiosParamCreator: (configuration?: Configuration
10832
11016
  * @throws {RequiredError}
10833
11017
  */
10834
11018
  findApplicant: (applicantId: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
11019
+ /**
11020
+ * Retrieves consents for single applicant.
11021
+ * @summary Retrieve Applicant Consents
11022
+ * @param {string} applicantId
11023
+ * @param {*} [options] Override http request option.
11024
+ * @throws {RequiredError}
11025
+ */
11026
+ findApplicantConsents: (applicantId: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
10835
11027
  /**
10836
11028
  * Retrieves a single check. Returns a check object.
10837
11029
  * @summary Retrieve a Check
@@ -11398,6 +11590,14 @@ export declare const DefaultApiFp: (configuration?: Configuration) => {
11398
11590
  * @throws {RequiredError}
11399
11591
  */
11400
11592
  findApplicant(applicantId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Applicant>>;
11593
+ /**
11594
+ * Retrieves consents for single applicant.
11595
+ * @summary Retrieve Applicant Consents
11596
+ * @param {string} applicantId
11597
+ * @param {*} [options] Override http request option.
11598
+ * @throws {RequiredError}
11599
+ */
11600
+ findApplicantConsents(applicantId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<ApplicantConsent>>>;
11401
11601
  /**
11402
11602
  * Retrieves a single check. Returns a check object.
11403
11603
  * @summary Retrieve a Check
@@ -11964,6 +12164,14 @@ export declare const DefaultApiFactory: (configuration?: Configuration, basePath
11964
12164
  * @throws {RequiredError}
11965
12165
  */
11966
12166
  findApplicant(applicantId: string, options?: RawAxiosRequestConfig): AxiosPromise<Applicant>;
12167
+ /**
12168
+ * Retrieves consents for single applicant.
12169
+ * @summary Retrieve Applicant Consents
12170
+ * @param {string} applicantId
12171
+ * @param {*} [options] Override http request option.
12172
+ * @throws {RequiredError}
12173
+ */
12174
+ findApplicantConsents(applicantId: string, options?: RawAxiosRequestConfig): AxiosPromise<Array<ApplicantConsent>>;
11967
12175
  /**
11968
12176
  * Retrieves a single check. Returns a check object.
11969
12177
  * @summary Retrieve a Check
@@ -12559,6 +12767,15 @@ export declare class DefaultApi extends BaseAPI {
12559
12767
  * @memberof DefaultApi
12560
12768
  */
12561
12769
  findApplicant(applicantId: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<Applicant, any>>;
12770
+ /**
12771
+ * Retrieves consents for single applicant.
12772
+ * @summary Retrieve Applicant Consents
12773
+ * @param {string} applicantId
12774
+ * @param {*} [options] Override http request option.
12775
+ * @throws {RequiredError}
12776
+ * @memberof DefaultApi
12777
+ */
12778
+ findApplicantConsents(applicantId: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<ApplicantConsent[], any>>;
12562
12779
  /**
12563
12780
  * Retrieves a single check. Returns a check object.
12564
12781
  * @summary Retrieve a Check
package/dist/api.js CHANGED
@@ -1660,6 +1660,37 @@ const DefaultApiAxiosParamCreator = function (configuration) {
1660
1660
  options: localVarRequestOptions,
1661
1661
  };
1662
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
+ }),
1663
1694
  /**
1664
1695
  * Retrieves a single check. Returns a check object.
1665
1696
  * @summary Retrieve a Check
@@ -3470,6 +3501,22 @@ const DefaultApiFp = function (configuration) {
3470
3501
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3471
3502
  });
3472
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
+ },
3473
3520
  /**
3474
3521
  * Retrieves a single check. Returns a check object.
3475
3522
  * @summary Retrieve a Check
@@ -4414,6 +4461,16 @@ const DefaultApiFactory = function (configuration, basePath, axios) {
4414
4461
  findApplicant(applicantId, options) {
4415
4462
  return localVarFp.findApplicant(applicantId, options).then((request) => request(axios, basePath));
4416
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
+ },
4417
4474
  /**
4418
4475
  * Retrieves a single check. Returns a check object.
4419
4476
  * @summary Retrieve a Check
@@ -5145,6 +5202,17 @@ class DefaultApi extends base_1.BaseAPI {
5145
5202
  findApplicant(applicantId, options) {
5146
5203
  return (0, exports.DefaultApiFp)(this.configuration).findApplicant(applicantId, options).then((request) => request(this.axios, this.basePath));
5147
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
+ }
5148
5216
  /**
5149
5217
  * Retrieves a single check. Returns a check object.
5150
5218
  * @summary Retrieve a Check
@@ -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': "onfido-node/5.0.0" }) });
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
  /**
package/dist/esm/api.d.ts CHANGED
@@ -410,6 +410,31 @@ export interface ApplicantBuilder {
410
410
  */
411
411
  'last_name': string;
412
412
  }
413
+ /**
414
+ *
415
+ * @export
416
+ * @interface ApplicantConsent
417
+ */
418
+ export interface ApplicantConsent {
419
+ /**
420
+ *
421
+ * @type {ApplicantConsentName}
422
+ * @memberof ApplicantConsent
423
+ */
424
+ 'name': ApplicantConsentName;
425
+ /**
426
+ *
427
+ * @type {boolean}
428
+ * @memberof ApplicantConsent
429
+ */
430
+ 'granted': boolean;
431
+ /**
432
+ * The date and time when this applicant consent was granted, if not granted the value is nil.
433
+ * @type {string}
434
+ * @memberof ApplicantConsent
435
+ */
436
+ 'granted_at': string | null;
437
+ }
413
438
  /**
414
439
  *
415
440
  * @export
@@ -1359,16 +1384,24 @@ export type CountryCodes = typeof CountryCodes[keyof typeof CountryCodes];
1359
1384
  * @interface DeviceIntelligenceBreakdown
1360
1385
  */
1361
1386
  export interface DeviceIntelligenceBreakdown {
1387
+ /**
1388
+ *
1389
+ * @type {DeviceIntelligenceBreakdownDevice}
1390
+ * @memberof DeviceIntelligenceBreakdown
1391
+ */
1392
+ 'device'?: DeviceIntelligenceBreakdownDevice;
1362
1393
  /**
1363
1394
  *
1364
1395
  * @type {DeviceIntelligenceBreakdownBreakdown}
1365
1396
  * @memberof DeviceIntelligenceBreakdown
1397
+ * @deprecated
1366
1398
  */
1367
1399
  'breakdown'?: DeviceIntelligenceBreakdownBreakdown;
1368
1400
  /**
1369
1401
  *
1370
1402
  * @type {DeviceIntelligenceBreakdownProperties}
1371
1403
  * @memberof DeviceIntelligenceBreakdown
1404
+ * @deprecated
1372
1405
  */
1373
1406
  'properties'?: DeviceIntelligenceBreakdownProperties;
1374
1407
  }
@@ -1380,46 +1413,46 @@ export interface DeviceIntelligenceBreakdown {
1380
1413
  export interface DeviceIntelligenceBreakdownBreakdown {
1381
1414
  /**
1382
1415
  *
1383
- * @type {DeviceIntelligenceBreakdownBreakdownDevice}
1416
+ * @type {DeviceIntelligenceBreakdownDevice}
1384
1417
  * @memberof DeviceIntelligenceBreakdownBreakdown
1385
1418
  */
1386
- 'device'?: DeviceIntelligenceBreakdownBreakdownDevice;
1419
+ 'device'?: DeviceIntelligenceBreakdownDevice;
1387
1420
  }
1388
1421
  /**
1389
1422
  * Asserts whether the device used to upload the media is trustworthy, i.e. it is a real, physical device.
1390
1423
  * @export
1391
- * @interface DeviceIntelligenceBreakdownBreakdownDevice
1424
+ * @interface DeviceIntelligenceBreakdownDevice
1392
1425
  */
1393
- export interface DeviceIntelligenceBreakdownBreakdownDevice {
1426
+ export interface DeviceIntelligenceBreakdownDevice {
1394
1427
  /**
1395
1428
  *
1396
- * @type {DeviceIntelligenceBreakdownBreakdownDeviceBreakdown}
1397
- * @memberof DeviceIntelligenceBreakdownBreakdownDevice
1429
+ * @type {DeviceIntelligenceBreakdownDeviceBreakdown}
1430
+ * @memberof DeviceIntelligenceBreakdownDevice
1398
1431
  */
1399
- 'breakdown'?: DeviceIntelligenceBreakdownBreakdownDeviceBreakdown;
1432
+ 'breakdown'?: DeviceIntelligenceBreakdownDeviceBreakdown;
1400
1433
  }
1401
1434
  /**
1402
1435
  *
1403
1436
  * @export
1404
- * @interface DeviceIntelligenceBreakdownBreakdownDeviceBreakdown
1437
+ * @interface DeviceIntelligenceBreakdownDeviceBreakdown
1405
1438
  */
1406
- export interface DeviceIntelligenceBreakdownBreakdownDeviceBreakdown {
1439
+ export interface DeviceIntelligenceBreakdownDeviceBreakdown {
1407
1440
  /**
1408
1441
  *
1409
1442
  * @type {DocumentBreakdownDataComparisonBreakdownIssuingCountry}
1410
- * @memberof DeviceIntelligenceBreakdownBreakdownDeviceBreakdown
1443
+ * @memberof DeviceIntelligenceBreakdownDeviceBreakdown
1411
1444
  */
1412
1445
  'application_authenticity'?: DocumentBreakdownDataComparisonBreakdownIssuingCountry;
1413
1446
  /**
1414
1447
  *
1415
1448
  * @type {DocumentBreakdownDataComparisonBreakdownIssuingCountry}
1416
- * @memberof DeviceIntelligenceBreakdownBreakdownDeviceBreakdown
1449
+ * @memberof DeviceIntelligenceBreakdownDeviceBreakdown
1417
1450
  */
1418
1451
  'device_integrity'?: DocumentBreakdownDataComparisonBreakdownIssuingCountry;
1419
1452
  /**
1420
1453
  *
1421
1454
  * @type {DocumentBreakdownDataComparisonBreakdownIssuingCountry}
1422
- * @memberof DeviceIntelligenceBreakdownBreakdownDeviceBreakdown
1455
+ * @memberof DeviceIntelligenceBreakdownDeviceBreakdown
1423
1456
  */
1424
1457
  'device_reputation'?: DocumentBreakdownDataComparisonBreakdownIssuingCountry;
1425
1458
  }
@@ -1610,6 +1643,31 @@ export interface DeviceIntelligenceBreakdownPropertiesIp {
1610
1643
  */
1611
1644
  'address'?: string;
1612
1645
  }
1646
+ /**
1647
+ *
1648
+ * @export
1649
+ * @interface DeviceIntelligenceProperties
1650
+ */
1651
+ export interface DeviceIntelligenceProperties {
1652
+ /**
1653
+ *
1654
+ * @type {DeviceIntelligenceBreakdownPropertiesDevice}
1655
+ * @memberof DeviceIntelligenceProperties
1656
+ */
1657
+ 'device'?: DeviceIntelligenceBreakdownPropertiesDevice;
1658
+ /**
1659
+ *
1660
+ * @type {DeviceIntelligenceBreakdownPropertiesIp}
1661
+ * @memberof DeviceIntelligenceProperties
1662
+ */
1663
+ 'ip'?: DeviceIntelligenceBreakdownPropertiesIp;
1664
+ /**
1665
+ *
1666
+ * @type {DeviceIntelligenceBreakdownPropertiesGeolocation}
1667
+ * @memberof DeviceIntelligenceProperties
1668
+ */
1669
+ 'geolocation'?: DeviceIntelligenceBreakdownPropertiesGeolocation;
1670
+ }
1613
1671
  /**
1614
1672
  *
1615
1673
  * @export
@@ -1670,6 +1728,12 @@ export interface DeviceIntelligenceReport {
1670
1728
  * @memberof DeviceIntelligenceReport
1671
1729
  */
1672
1730
  'breakdown'?: DeviceIntelligenceBreakdown;
1731
+ /**
1732
+ *
1733
+ * @type {DeviceIntelligenceProperties}
1734
+ * @memberof DeviceIntelligenceReport
1735
+ */
1736
+ 'properties'?: DeviceIntelligenceProperties;
1673
1737
  }
1674
1738
  /**
1675
1739
  *
@@ -3020,10 +3084,10 @@ export interface DocumentProperties {
3020
3084
  'nfc'?: DocumentPropertiesNfc;
3021
3085
  /**
3022
3086
  *
3023
- * @type {DocumentPropertiesDrivingLicenceInformation}
3087
+ * @type {Array<DocumentPropertiesDrivingLicenceInformationItem>}
3024
3088
  * @memberof DocumentProperties
3025
3089
  */
3026
- 'driving_licence_information'?: DocumentPropertiesDrivingLicenceInformation;
3090
+ 'driving_licence_information'?: Array<DocumentPropertiesDrivingLicenceInformationItem>;
3027
3091
  /**
3028
3092
  *
3029
3093
  * @type {DocumentPropertiesDocumentClassification}
@@ -3269,31 +3333,31 @@ export interface DocumentPropertiesDocumentNumbersInner {
3269
3333
  /**
3270
3334
  *
3271
3335
  * @export
3272
- * @interface DocumentPropertiesDrivingLicenceInformation
3336
+ * @interface DocumentPropertiesDrivingLicenceInformationItem
3273
3337
  */
3274
- export interface DocumentPropertiesDrivingLicenceInformation {
3338
+ export interface DocumentPropertiesDrivingLicenceInformationItem {
3275
3339
  /**
3276
3340
  *
3277
3341
  * @type {string}
3278
- * @memberof DocumentPropertiesDrivingLicenceInformation
3342
+ * @memberof DocumentPropertiesDrivingLicenceInformationItem
3279
3343
  */
3280
3344
  'category'?: string;
3281
3345
  /**
3282
3346
  *
3283
3347
  * @type {string}
3284
- * @memberof DocumentPropertiesDrivingLicenceInformation
3348
+ * @memberof DocumentPropertiesDrivingLicenceInformationItem
3285
3349
  */
3286
3350
  'obtainment_date'?: string;
3287
3351
  /**
3288
3352
  *
3289
3353
  * @type {string}
3290
- * @memberof DocumentPropertiesDrivingLicenceInformation
3354
+ * @memberof DocumentPropertiesDrivingLicenceInformationItem
3291
3355
  */
3292
3356
  'expiry_date'?: string;
3293
3357
  /**
3294
3358
  *
3295
3359
  * @type {string}
3296
- * @memberof DocumentPropertiesDrivingLicenceInformation
3360
+ * @memberof DocumentPropertiesDrivingLicenceInformationItem
3297
3361
  */
3298
3362
  'codes'?: string;
3299
3363
  }
@@ -4324,10 +4388,10 @@ export interface DocumentWithDriverVerificationReportAllOfProperties {
4324
4388
  'nfc'?: DocumentPropertiesNfc;
4325
4389
  /**
4326
4390
  *
4327
- * @type {DocumentPropertiesDrivingLicenceInformation}
4391
+ * @type {Array<DocumentPropertiesDrivingLicenceInformationItem>}
4328
4392
  * @memberof DocumentWithDriverVerificationReportAllOfProperties
4329
4393
  */
4330
- 'driving_licence_information'?: DocumentPropertiesDrivingLicenceInformation;
4394
+ 'driving_licence_information'?: Array<DocumentPropertiesDrivingLicenceInformationItem>;
4331
4395
  /**
4332
4396
  *
4333
4397
  * @type {DocumentPropertiesDocumentClassification}
@@ -9764,6 +9828,36 @@ export interface Webhook {
9764
9828
  * @memberof Webhook
9765
9829
  */
9766
9830
  'payload_version'?: number;
9831
+ /**
9832
+ * Determines if the webhook will fetch OAuth access tokens to send in the Authorization header.
9833
+ * @type {boolean}
9834
+ * @memberof Webhook
9835
+ */
9836
+ 'oauth_enabled'?: boolean;
9837
+ /**
9838
+ * The url to fetch the OAuth access token using client credentials grant.
9839
+ * @type {string}
9840
+ * @memberof Webhook
9841
+ */
9842
+ 'oauth_server_url'?: string;
9843
+ /**
9844
+ * The client id to authenticate the client credentials grant.
9845
+ * @type {string}
9846
+ * @memberof Webhook
9847
+ */
9848
+ 'oauth_server_client_id'?: string;
9849
+ /**
9850
+ * The client secret to authenticate the client credentials grant.
9851
+ * @type {string}
9852
+ * @memberof Webhook
9853
+ */
9854
+ 'oauth_server_client_secret'?: string;
9855
+ /**
9856
+ * The scopes to be sent when requesting the access token.
9857
+ * @type {string}
9858
+ * @memberof Webhook
9859
+ */
9860
+ 'oauth_server_scope'?: string;
9767
9861
  /**
9768
9862
  * The unique identifier of the webhook.
9769
9863
  * @type {string}
@@ -9819,6 +9913,36 @@ export interface WebhookBuilder {
9819
9913
  * @memberof WebhookBuilder
9820
9914
  */
9821
9915
  'payload_version'?: number;
9916
+ /**
9917
+ * Determines if the webhook will fetch OAuth access tokens to send in the Authorization header.
9918
+ * @type {boolean}
9919
+ * @memberof WebhookBuilder
9920
+ */
9921
+ 'oauth_enabled'?: boolean;
9922
+ /**
9923
+ * The url to fetch the OAuth access token using client credentials grant.
9924
+ * @type {string}
9925
+ * @memberof WebhookBuilder
9926
+ */
9927
+ 'oauth_server_url'?: string;
9928
+ /**
9929
+ * The client id to authenticate the client credentials grant.
9930
+ * @type {string}
9931
+ * @memberof WebhookBuilder
9932
+ */
9933
+ 'oauth_server_client_id'?: string;
9934
+ /**
9935
+ * The client secret to authenticate the client credentials grant.
9936
+ * @type {string}
9937
+ * @memberof WebhookBuilder
9938
+ */
9939
+ 'oauth_server_client_secret'?: string;
9940
+ /**
9941
+ * The scopes to be sent when requesting the access token.
9942
+ * @type {string}
9943
+ * @memberof WebhookBuilder
9944
+ */
9945
+ 'oauth_server_scope'?: string;
9822
9946
  /**
9823
9947
  * The url that will listen to notifications (must be https).
9824
9948
  * @type {string}
@@ -10168,6 +10292,36 @@ export interface WebhookShared {
10168
10292
  * @memberof WebhookShared
10169
10293
  */
10170
10294
  'payload_version'?: number;
10295
+ /**
10296
+ * Determines if the webhook will fetch OAuth access tokens to send in the Authorization header.
10297
+ * @type {boolean}
10298
+ * @memberof WebhookShared
10299
+ */
10300
+ 'oauth_enabled'?: boolean;
10301
+ /**
10302
+ * The url to fetch the OAuth access token using client credentials grant.
10303
+ * @type {string}
10304
+ * @memberof WebhookShared
10305
+ */
10306
+ 'oauth_server_url'?: string;
10307
+ /**
10308
+ * The client id to authenticate the client credentials grant.
10309
+ * @type {string}
10310
+ * @memberof WebhookShared
10311
+ */
10312
+ 'oauth_server_client_id'?: string;
10313
+ /**
10314
+ * The client secret to authenticate the client credentials grant.
10315
+ * @type {string}
10316
+ * @memberof WebhookShared
10317
+ */
10318
+ 'oauth_server_client_secret'?: string;
10319
+ /**
10320
+ * The scopes to be sent when requesting the access token.
10321
+ * @type {string}
10322
+ * @memberof WebhookShared
10323
+ */
10324
+ 'oauth_server_scope'?: string;
10171
10325
  }
10172
10326
  /**
10173
10327
  *
@@ -10212,6 +10366,36 @@ export interface WebhookUpdater {
10212
10366
  * @memberof WebhookUpdater
10213
10367
  */
10214
10368
  'payload_version'?: number;
10369
+ /**
10370
+ * Determines if the webhook will fetch OAuth access tokens to send in the Authorization header.
10371
+ * @type {boolean}
10372
+ * @memberof WebhookUpdater
10373
+ */
10374
+ 'oauth_enabled'?: boolean;
10375
+ /**
10376
+ * The url to fetch the OAuth access token using client credentials grant.
10377
+ * @type {string}
10378
+ * @memberof WebhookUpdater
10379
+ */
10380
+ 'oauth_server_url'?: string;
10381
+ /**
10382
+ * The client id to authenticate the client credentials grant.
10383
+ * @type {string}
10384
+ * @memberof WebhookUpdater
10385
+ */
10386
+ 'oauth_server_client_id'?: string;
10387
+ /**
10388
+ * The client secret to authenticate the client credentials grant.
10389
+ * @type {string}
10390
+ * @memberof WebhookUpdater
10391
+ */
10392
+ 'oauth_server_client_secret'?: string;
10393
+ /**
10394
+ * The scopes to be sent when requesting the access token.
10395
+ * @type {string}
10396
+ * @memberof WebhookUpdater
10397
+ */
10398
+ 'oauth_server_scope'?: string;
10215
10399
  /**
10216
10400
  * The url that will listen to notifications (must be https).
10217
10401
  * @type {string}
@@ -10832,6 +11016,14 @@ export declare const DefaultApiAxiosParamCreator: (configuration?: Configuration
10832
11016
  * @throws {RequiredError}
10833
11017
  */
10834
11018
  findApplicant: (applicantId: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
11019
+ /**
11020
+ * Retrieves consents for single applicant.
11021
+ * @summary Retrieve Applicant Consents
11022
+ * @param {string} applicantId
11023
+ * @param {*} [options] Override http request option.
11024
+ * @throws {RequiredError}
11025
+ */
11026
+ findApplicantConsents: (applicantId: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
10835
11027
  /**
10836
11028
  * Retrieves a single check. Returns a check object.
10837
11029
  * @summary Retrieve a Check
@@ -11398,6 +11590,14 @@ export declare const DefaultApiFp: (configuration?: Configuration) => {
11398
11590
  * @throws {RequiredError}
11399
11591
  */
11400
11592
  findApplicant(applicantId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Applicant>>;
11593
+ /**
11594
+ * Retrieves consents for single applicant.
11595
+ * @summary Retrieve Applicant Consents
11596
+ * @param {string} applicantId
11597
+ * @param {*} [options] Override http request option.
11598
+ * @throws {RequiredError}
11599
+ */
11600
+ findApplicantConsents(applicantId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<ApplicantConsent>>>;
11401
11601
  /**
11402
11602
  * Retrieves a single check. Returns a check object.
11403
11603
  * @summary Retrieve a Check
@@ -11964,6 +12164,14 @@ export declare const DefaultApiFactory: (configuration?: Configuration, basePath
11964
12164
  * @throws {RequiredError}
11965
12165
  */
11966
12166
  findApplicant(applicantId: string, options?: RawAxiosRequestConfig): AxiosPromise<Applicant>;
12167
+ /**
12168
+ * Retrieves consents for single applicant.
12169
+ * @summary Retrieve Applicant Consents
12170
+ * @param {string} applicantId
12171
+ * @param {*} [options] Override http request option.
12172
+ * @throws {RequiredError}
12173
+ */
12174
+ findApplicantConsents(applicantId: string, options?: RawAxiosRequestConfig): AxiosPromise<Array<ApplicantConsent>>;
11967
12175
  /**
11968
12176
  * Retrieves a single check. Returns a check object.
11969
12177
  * @summary Retrieve a Check
@@ -12559,6 +12767,15 @@ export declare class DefaultApi extends BaseAPI {
12559
12767
  * @memberof DefaultApi
12560
12768
  */
12561
12769
  findApplicant(applicantId: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<Applicant, any>>;
12770
+ /**
12771
+ * Retrieves consents for single applicant.
12772
+ * @summary Retrieve Applicant Consents
12773
+ * @param {string} applicantId
12774
+ * @param {*} [options] Override http request option.
12775
+ * @throws {RequiredError}
12776
+ * @memberof DefaultApi
12777
+ */
12778
+ findApplicantConsents(applicantId: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<ApplicantConsent[], any>>;
12562
12779
  /**
12563
12780
  * Retrieves a single check. Returns a check object.
12564
12781
  * @summary Retrieve a Check
package/dist/esm/api.js CHANGED
@@ -1656,6 +1656,37 @@ export const DefaultApiAxiosParamCreator = function (configuration) {
1656
1656
  options: localVarRequestOptions,
1657
1657
  };
1658
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
+ }),
1659
1690
  /**
1660
1691
  * Retrieves a single check. Returns a check object.
1661
1692
  * @summary Retrieve a Check
@@ -3465,6 +3496,22 @@ export const DefaultApiFp = function (configuration) {
3465
3496
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3466
3497
  });
3467
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
+ },
3468
3515
  /**
3469
3516
  * Retrieves a single check. Returns a check object.
3470
3517
  * @summary Retrieve a Check
@@ -4408,6 +4455,16 @@ export const DefaultApiFactory = function (configuration, basePath, axios) {
4408
4455
  findApplicant(applicantId, options) {
4409
4456
  return localVarFp.findApplicant(applicantId, options).then((request) => request(axios, basePath));
4410
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
+ },
4411
4468
  /**
4412
4469
  * Retrieves a single check. Returns a check object.
4413
4470
  * @summary Retrieve a Check
@@ -5138,6 +5195,17 @@ export class DefaultApi extends BaseAPI {
5138
5195
  findApplicant(applicantId, options) {
5139
5196
  return DefaultApiFp(this.configuration).findApplicant(applicantId, options).then((request) => request(this.axios, this.basePath));
5140
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
+ }
5141
5209
  /**
5142
5210
  * Retrieves a single check. Returns a check object.
5143
5211
  * @summary Retrieve a Check
@@ -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/5.0.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": "5.0.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": {