@onfido/api 4.4.0 → 4.6.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 CHANGED
@@ -2,9 +2,16 @@
2
2
 
3
3
  The official Node.js library for integrating with the Onfido API.
4
4
 
5
- Documentation can be found at <https://documentation.onfido.com>.
5
+ Documentation is available at <https://documentation.onfido.com>.
6
6
 
7
- This library is only for use on the backend, as it uses Onfido API tokens which must be kept secret. If you do need to collect applicant data in the frontend of your application, we recommend that you use the Onfido SDKs: [iOS](https://github.com/onfido/onfido-ios-sdk), [Android](https://github.com/onfido/onfido-android-sdk), [Web](https://github.com/onfido/onfido-sdk-ui), and [React Native](https://github.com/onfido/react-native-sdk).
7
+ This library is for backend use only, as it requires secret Onfido API tokens and should not be used in the frontend due to security reasons.
8
+
9
+ If you need to collect applicant data in the frontend of your application, we recommend that you use the Onfido SDKs:
10
+
11
+ - [iOS](https://github.com/onfido/onfido-ios-sdk)
12
+ - [Android](https://github.com/onfido/onfido-android-sdk)
13
+ - [Web](https://github.com/onfido/onfido-sdk-ui)
14
+ - [React Native](https://github.com/onfido/react-native-sdk)
8
15
 
9
16
  This version uses Onfido API v3.6. Refer to our [API versioning guide](https://developers.onfido.com/guide/api-versioning-policy#client-libraries) for details of which client library versions use which versions of the API.
10
17
 
@@ -58,7 +65,7 @@ Configure with your API token and region:
58
65
  const onfido = new DefaultApi(
59
66
  new Configuration({
60
67
  apiToken: process.env.ONFIDO_API_TOKEN,
61
- region: Region.EU, // Supports Region.EU, Region.US and Region.CA
68
+ region: Region.EU, // Supports Region.EU (Europe), Region.US (United States), and Region.CA (Canada)
62
69
  baseOptions: { timeout: 60_000 } // Additional Axios options (timeout, etc.)
63
70
  })
64
71
  );
@@ -162,7 +169,7 @@ onfido.uploadDocument(
162
169
 
163
170
  ### Webhook event verification
164
171
 
165
- Webhook events payload needs to be verified before it can be accessed. Library allows to easily decode the payload and verify its signature before returning it as an object for user convenience:
172
+ Webhook events payload needs to be verified before it can be accessed. Verifying webhook payloads is crucial for security reasons, as it ensures that the payloads are indeed from Onfido and have not been tampered with. The library allows you to easily decode the payload and verify its signature before returning it as an object for user convenience:
166
173
 
167
174
  ```js
168
175
  (async () => {
@@ -184,41 +191,43 @@ Webhook events payload needs to be verified before it can be accessed. Library a
184
191
 
185
192
  #### Do not use square bracket syntax
186
193
 
187
- Except for accessing Task object's outputs, retain from using the square bracket syntax (i.e. `[]`) to access not defined properties to avoid breaking changes when these fields will appear.
194
+ Except for accessing Task object's outputs, avoid using the square bracket syntax (i.e. `[]`) to access undefined properties to prevent breaking changes when these fields appear.
188
195
 
189
196
  ## Contributing
190
197
 
191
- This library is automatically generated using [OpenAPI Generator](https://openapi-generator.tech) (version: 7.9.0); therefore all the contributions, except tests files, should target [Onfido OpenAPI specification repository](https://github.com/onfido/onfido-openapi-spec/tree/master) instead of this repository.
198
+ This library is automatically generated using [OpenAPI Generator](https://openapi-generator.tech) (version: 7.9.0); therefore, all contributions (except test files) should target the [Onfido OpenAPI specification repository](https://github.com/onfido/onfido-openapi-spec/tree/master) instead of this repository. Please follow the contribution guidelines provided in the OpenAPI specification repository.
192
199
 
193
200
  For contributions to the tests instead, please follow the steps below:
194
201
 
195
- 1. [Fork](https://github.com/onfido/onfido-node/fork) repository
202
+ 1. Fork the [repository](https://github.com/onfido/onfido-node/fork)
196
203
  2. Create your feature branch (`git checkout -b my-new-feature`)
197
204
  3. Make your changes
198
- 4. Commit your changes (`git commit -am 'Add some feature'`)
205
+ 4. Commit your changes (`git commit -am 'Add detailed description of the feature'`)
199
206
  5. Push to the branch (`git push origin my-new-feature`)
200
207
  6. Create a new Pull Request
201
208
 
202
209
  ## Versioning policy
203
210
 
204
- [Semantic Versioning](https://semver.org) policy is used for library versioning, following guidelines and limitations below:
211
+ Versioning helps manage changes and ensures compatibility across different versions of the library.
212
+
213
+ [Semantic Versioning](https://semver.org) policy is used for library versioning, following the guidelines and limitations outlined below:
205
214
 
206
- - MAJOR versions (x.0.0) might:
215
+ - MAJOR versions (x.0.0) may:
207
216
  - target a new API version
208
217
  - include non-backward compatible change
209
- - MINOR versions (0.x.0) might:
218
+ - MINOR versions (0.x.0) may:
210
219
  - add a new functionality, non-mandatory parameter or property
211
220
  - deprecate an old functionality
212
221
  - include non-backward compatible change to a functionality which is:
213
222
  - labelled as alpha or beta
214
223
  - completely broken and not usable
215
- - PATCH version (0.0.x) might:
224
+ - PATCH version (0.0.x) will:
216
225
  - fix a bug
217
226
  - include backward compatible changes only
218
227
 
219
228
  ## More documentation
220
229
 
221
- More documentation and code examples can be found at <https://documentation.onfido.com>.
230
+ Additional documentation and code examples can be found at <https://documentation.onfido.com>.
222
231
 
223
232
  ## Support
224
233
 
package/dist/api.d.ts CHANGED
@@ -6081,6 +6081,7 @@ export declare const IdNumberTypeEnum: {
6081
6081
  readonly SocialInsurance: "social_insurance";
6082
6082
  readonly TaxId: "tax_id";
6083
6083
  readonly IdentityCard: "identity_card";
6084
+ readonly DrivingLicense: "driving_license";
6084
6085
  readonly DrivingLicence: "driving_licence";
6085
6086
  readonly ShareCode: "share_code";
6086
6087
  readonly VoterId: "voter_id";
@@ -10112,6 +10113,12 @@ export interface WebhookEventPayloadResource {
10112
10113
  * @memberof WebhookEventPayloadResource
10113
10114
  */
10114
10115
  'error'?: WorkflowRunError;
10116
+ /**
10117
+ * Customer-provided user identifier.
10118
+ * @type {string}
10119
+ * @memberof WebhookEventPayloadResource
10120
+ */
10121
+ 'customer_user_id'?: string;
10115
10122
  }
10116
10123
  /**
10117
10124
  *
@@ -10790,6 +10797,14 @@ export declare const DefaultApiAxiosParamCreator: (configuration?: Configuration
10790
10797
  * @throws {RequiredError}
10791
10798
  */
10792
10799
  downloadDocumentVideo: (documentId: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
10800
+ /**
10801
+ * Retrieves the evidence folder for the designated Workflow Run
10802
+ * @summary Retrieve Workflow Run Evidence Folder
10803
+ * @param {string} workflowRunId Workflow Run ID
10804
+ * @param {*} [options] Override http request option.
10805
+ * @throws {RequiredError}
10806
+ */
10807
+ downloadEvidenceFolder: (workflowRunId: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
10793
10808
  /**
10794
10809
  * ID photos are downloaded using this endpoint.
10795
10810
  * @summary Download ID photo
@@ -11339,6 +11354,14 @@ export declare const DefaultApiFp: (configuration?: Configuration) => {
11339
11354
  * @throws {RequiredError}
11340
11355
  */
11341
11356
  downloadDocumentVideo(documentId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<FileTransfer>>;
11357
+ /**
11358
+ * Retrieves the evidence folder for the designated Workflow Run
11359
+ * @summary Retrieve Workflow Run Evidence Folder
11360
+ * @param {string} workflowRunId Workflow Run ID
11361
+ * @param {*} [options] Override http request option.
11362
+ * @throws {RequiredError}
11363
+ */
11364
+ downloadEvidenceFolder(workflowRunId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<FileTransfer>>;
11342
11365
  /**
11343
11366
  * ID photos are downloaded using this endpoint.
11344
11367
  * @summary Download ID photo
@@ -11888,6 +11911,14 @@ export declare const DefaultApiFactory: (configuration?: Configuration, basePath
11888
11911
  * @throws {RequiredError}
11889
11912
  */
11890
11913
  downloadDocumentVideo(documentId: string, options?: RawAxiosRequestConfig): AxiosPromise<FileTransfer>;
11914
+ /**
11915
+ * Retrieves the evidence folder for the designated Workflow Run
11916
+ * @summary Retrieve Workflow Run Evidence Folder
11917
+ * @param {string} workflowRunId Workflow Run ID
11918
+ * @param {*} [options] Override http request option.
11919
+ * @throws {RequiredError}
11920
+ */
11921
+ downloadEvidenceFolder(workflowRunId: string, options?: RawAxiosRequestConfig): AxiosPromise<FileTransfer>;
11891
11922
  /**
11892
11923
  * ID photos are downloaded using this endpoint.
11893
11924
  * @summary Download ID photo
@@ -12453,6 +12484,15 @@ export declare class DefaultApi extends BaseAPI {
12453
12484
  * @memberof DefaultApi
12454
12485
  */
12455
12486
  downloadDocumentVideo(documentId: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<FileTransfer, any>>;
12487
+ /**
12488
+ * Retrieves the evidence folder for the designated Workflow Run
12489
+ * @summary Retrieve Workflow Run Evidence Folder
12490
+ * @param {string} workflowRunId Workflow Run ID
12491
+ * @param {*} [options] Override http request option.
12492
+ * @throws {RequiredError}
12493
+ * @memberof DefaultApi
12494
+ */
12495
+ downloadEvidenceFolder(workflowRunId: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<FileTransfer, any>>;
12456
12496
  /**
12457
12497
  * ID photos are downloaded using this endpoint.
12458
12498
  * @summary Download ID photo
package/dist/api.js CHANGED
@@ -544,6 +544,7 @@ exports.IdNumberTypeEnum = {
544
544
  SocialInsurance: 'social_insurance',
545
545
  TaxId: 'tax_id',
546
546
  IdentityCard: 'identity_card',
547
+ DrivingLicense: 'driving_license',
547
548
  DrivingLicence: 'driving_licence',
548
549
  ShareCode: 'share_code',
549
550
  VoterId: 'voter_id',
@@ -1260,6 +1261,37 @@ const DefaultApiAxiosParamCreator = function (configuration) {
1260
1261
  options: localVarRequestOptions,
1261
1262
  };
1262
1263
  }),
1264
+ /**
1265
+ * Retrieves the evidence folder for the designated Workflow Run
1266
+ * @summary Retrieve Workflow Run Evidence Folder
1267
+ * @param {string} workflowRunId Workflow Run ID
1268
+ * @param {*} [options] Override http request option.
1269
+ * @throws {RequiredError}
1270
+ */
1271
+ downloadEvidenceFolder: (workflowRunId, options = {}) => __awaiter(this, void 0, void 0, function* () {
1272
+ // verify required parameter 'workflowRunId' is not null or undefined
1273
+ (0, common_1.assertParamExists)('downloadEvidenceFolder', 'workflowRunId', workflowRunId);
1274
+ const localVarPath = `/workflow_runs/{workflow_run_id}/evidence_folder`
1275
+ .replace(`{${"workflow_run_id"}}`, encodeURIComponent(String(workflowRunId)));
1276
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1277
+ const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
1278
+ let baseOptions;
1279
+ if (configuration) {
1280
+ baseOptions = configuration.baseOptions;
1281
+ }
1282
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1283
+ const localVarHeaderParameter = {};
1284
+ const localVarQueryParameter = {};
1285
+ // authentication Token required
1286
+ yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
1287
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1288
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1289
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1290
+ return {
1291
+ url: (0, common_1.toPathString)(localVarUrlObj),
1292
+ options: localVarRequestOptions,
1293
+ };
1294
+ }),
1263
1295
  /**
1264
1296
  * ID photos are downloaded using this endpoint.
1265
1297
  * @summary Download ID photo
@@ -3209,6 +3241,22 @@ const DefaultApiFp = function (configuration) {
3209
3241
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3210
3242
  });
3211
3243
  },
3244
+ /**
3245
+ * Retrieves the evidence folder for the designated Workflow Run
3246
+ * @summary Retrieve Workflow Run Evidence Folder
3247
+ * @param {string} workflowRunId Workflow Run ID
3248
+ * @param {*} [options] Override http request option.
3249
+ * @throws {RequiredError}
3250
+ */
3251
+ downloadEvidenceFolder(workflowRunId, options) {
3252
+ var _a, _b, _c;
3253
+ return __awaiter(this, void 0, void 0, function* () {
3254
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.downloadEvidenceFolder(workflowRunId, options);
3255
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
3256
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['DefaultApi.downloadEvidenceFolder']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
3257
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3258
+ });
3259
+ },
3212
3260
  /**
3213
3261
  * ID photos are downloaded using this endpoint.
3214
3262
  * @summary Download ID photo
@@ -4198,6 +4246,16 @@ const DefaultApiFactory = function (configuration, basePath, axios) {
4198
4246
  downloadDocumentVideo(documentId, options) {
4199
4247
  return localVarFp.downloadDocumentVideo(documentId, options).then((request) => request(axios, basePath));
4200
4248
  },
4249
+ /**
4250
+ * Retrieves the evidence folder for the designated Workflow Run
4251
+ * @summary Retrieve Workflow Run Evidence Folder
4252
+ * @param {string} workflowRunId Workflow Run ID
4253
+ * @param {*} [options] Override http request option.
4254
+ * @throws {RequiredError}
4255
+ */
4256
+ downloadEvidenceFolder(workflowRunId, options) {
4257
+ return localVarFp.downloadEvidenceFolder(workflowRunId, options).then((request) => request(axios, basePath));
4258
+ },
4201
4259
  /**
4202
4260
  * ID photos are downloaded using this endpoint.
4203
4261
  * @summary Download ID photo
@@ -4895,6 +4953,17 @@ class DefaultApi extends base_1.BaseAPI {
4895
4953
  downloadDocumentVideo(documentId, options) {
4896
4954
  return (0, exports.DefaultApiFp)(this.configuration).downloadDocumentVideo(documentId, options).then((request) => request(this.axios, this.basePath));
4897
4955
  }
4956
+ /**
4957
+ * Retrieves the evidence folder for the designated Workflow Run
4958
+ * @summary Retrieve Workflow Run Evidence Folder
4959
+ * @param {string} workflowRunId Workflow Run ID
4960
+ * @param {*} [options] Override http request option.
4961
+ * @throws {RequiredError}
4962
+ * @memberof DefaultApi
4963
+ */
4964
+ downloadEvidenceFolder(workflowRunId, options) {
4965
+ return (0, exports.DefaultApiFp)(this.configuration).downloadEvidenceFolder(workflowRunId, options).then((request) => request(this.axios, this.basePath));
4966
+ }
4898
4967
  /**
4899
4968
  * ID photos are downloaded using this endpoint.
4900
4969
  * @summary Download ID photo
@@ -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/4.4.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/4.6.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
@@ -6081,6 +6081,7 @@ export declare const IdNumberTypeEnum: {
6081
6081
  readonly SocialInsurance: "social_insurance";
6082
6082
  readonly TaxId: "tax_id";
6083
6083
  readonly IdentityCard: "identity_card";
6084
+ readonly DrivingLicense: "driving_license";
6084
6085
  readonly DrivingLicence: "driving_licence";
6085
6086
  readonly ShareCode: "share_code";
6086
6087
  readonly VoterId: "voter_id";
@@ -10112,6 +10113,12 @@ export interface WebhookEventPayloadResource {
10112
10113
  * @memberof WebhookEventPayloadResource
10113
10114
  */
10114
10115
  'error'?: WorkflowRunError;
10116
+ /**
10117
+ * Customer-provided user identifier.
10118
+ * @type {string}
10119
+ * @memberof WebhookEventPayloadResource
10120
+ */
10121
+ 'customer_user_id'?: string;
10115
10122
  }
10116
10123
  /**
10117
10124
  *
@@ -10790,6 +10797,14 @@ export declare const DefaultApiAxiosParamCreator: (configuration?: Configuration
10790
10797
  * @throws {RequiredError}
10791
10798
  */
10792
10799
  downloadDocumentVideo: (documentId: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
10800
+ /**
10801
+ * Retrieves the evidence folder for the designated Workflow Run
10802
+ * @summary Retrieve Workflow Run Evidence Folder
10803
+ * @param {string} workflowRunId Workflow Run ID
10804
+ * @param {*} [options] Override http request option.
10805
+ * @throws {RequiredError}
10806
+ */
10807
+ downloadEvidenceFolder: (workflowRunId: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
10793
10808
  /**
10794
10809
  * ID photos are downloaded using this endpoint.
10795
10810
  * @summary Download ID photo
@@ -11339,6 +11354,14 @@ export declare const DefaultApiFp: (configuration?: Configuration) => {
11339
11354
  * @throws {RequiredError}
11340
11355
  */
11341
11356
  downloadDocumentVideo(documentId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<FileTransfer>>;
11357
+ /**
11358
+ * Retrieves the evidence folder for the designated Workflow Run
11359
+ * @summary Retrieve Workflow Run Evidence Folder
11360
+ * @param {string} workflowRunId Workflow Run ID
11361
+ * @param {*} [options] Override http request option.
11362
+ * @throws {RequiredError}
11363
+ */
11364
+ downloadEvidenceFolder(workflowRunId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<FileTransfer>>;
11342
11365
  /**
11343
11366
  * ID photos are downloaded using this endpoint.
11344
11367
  * @summary Download ID photo
@@ -11888,6 +11911,14 @@ export declare const DefaultApiFactory: (configuration?: Configuration, basePath
11888
11911
  * @throws {RequiredError}
11889
11912
  */
11890
11913
  downloadDocumentVideo(documentId: string, options?: RawAxiosRequestConfig): AxiosPromise<FileTransfer>;
11914
+ /**
11915
+ * Retrieves the evidence folder for the designated Workflow Run
11916
+ * @summary Retrieve Workflow Run Evidence Folder
11917
+ * @param {string} workflowRunId Workflow Run ID
11918
+ * @param {*} [options] Override http request option.
11919
+ * @throws {RequiredError}
11920
+ */
11921
+ downloadEvidenceFolder(workflowRunId: string, options?: RawAxiosRequestConfig): AxiosPromise<FileTransfer>;
11891
11922
  /**
11892
11923
  * ID photos are downloaded using this endpoint.
11893
11924
  * @summary Download ID photo
@@ -12453,6 +12484,15 @@ export declare class DefaultApi extends BaseAPI {
12453
12484
  * @memberof DefaultApi
12454
12485
  */
12455
12486
  downloadDocumentVideo(documentId: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<FileTransfer, any>>;
12487
+ /**
12488
+ * Retrieves the evidence folder for the designated Workflow Run
12489
+ * @summary Retrieve Workflow Run Evidence Folder
12490
+ * @param {string} workflowRunId Workflow Run ID
12491
+ * @param {*} [options] Override http request option.
12492
+ * @throws {RequiredError}
12493
+ * @memberof DefaultApi
12494
+ */
12495
+ downloadEvidenceFolder(workflowRunId: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<FileTransfer, any>>;
12456
12496
  /**
12457
12497
  * ID photos are downloaded using this endpoint.
12458
12498
  * @summary Download ID photo
package/dist/esm/api.js CHANGED
@@ -540,6 +540,7 @@ export const IdNumberTypeEnum = {
540
540
  SocialInsurance: 'social_insurance',
541
541
  TaxId: 'tax_id',
542
542
  IdentityCard: 'identity_card',
543
+ DrivingLicense: 'driving_license',
543
544
  DrivingLicence: 'driving_licence',
544
545
  ShareCode: 'share_code',
545
546
  VoterId: 'voter_id',
@@ -1256,6 +1257,37 @@ export const DefaultApiAxiosParamCreator = function (configuration) {
1256
1257
  options: localVarRequestOptions,
1257
1258
  };
1258
1259
  }),
1260
+ /**
1261
+ * Retrieves the evidence folder for the designated Workflow Run
1262
+ * @summary Retrieve Workflow Run Evidence Folder
1263
+ * @param {string} workflowRunId Workflow Run ID
1264
+ * @param {*} [options] Override http request option.
1265
+ * @throws {RequiredError}
1266
+ */
1267
+ downloadEvidenceFolder: (workflowRunId, options = {}) => __awaiter(this, void 0, void 0, function* () {
1268
+ // verify required parameter 'workflowRunId' is not null or undefined
1269
+ assertParamExists('downloadEvidenceFolder', 'workflowRunId', workflowRunId);
1270
+ const localVarPath = `/workflow_runs/{workflow_run_id}/evidence_folder`
1271
+ .replace(`{${"workflow_run_id"}}`, encodeURIComponent(String(workflowRunId)));
1272
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1273
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1274
+ let baseOptions;
1275
+ if (configuration) {
1276
+ baseOptions = configuration.baseOptions;
1277
+ }
1278
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1279
+ const localVarHeaderParameter = {};
1280
+ const localVarQueryParameter = {};
1281
+ // authentication Token required
1282
+ yield setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration);
1283
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1284
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1285
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1286
+ return {
1287
+ url: toPathString(localVarUrlObj),
1288
+ options: localVarRequestOptions,
1289
+ };
1290
+ }),
1259
1291
  /**
1260
1292
  * ID photos are downloaded using this endpoint.
1261
1293
  * @summary Download ID photo
@@ -3204,6 +3236,22 @@ export const DefaultApiFp = function (configuration) {
3204
3236
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3205
3237
  });
3206
3238
  },
3239
+ /**
3240
+ * Retrieves the evidence folder for the designated Workflow Run
3241
+ * @summary Retrieve Workflow Run Evidence Folder
3242
+ * @param {string} workflowRunId Workflow Run ID
3243
+ * @param {*} [options] Override http request option.
3244
+ * @throws {RequiredError}
3245
+ */
3246
+ downloadEvidenceFolder(workflowRunId, options) {
3247
+ var _a, _b, _c;
3248
+ return __awaiter(this, void 0, void 0, function* () {
3249
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.downloadEvidenceFolder(workflowRunId, options);
3250
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
3251
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['DefaultApi.downloadEvidenceFolder']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
3252
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3253
+ });
3254
+ },
3207
3255
  /**
3208
3256
  * ID photos are downloaded using this endpoint.
3209
3257
  * @summary Download ID photo
@@ -4192,6 +4240,16 @@ export const DefaultApiFactory = function (configuration, basePath, axios) {
4192
4240
  downloadDocumentVideo(documentId, options) {
4193
4241
  return localVarFp.downloadDocumentVideo(documentId, options).then((request) => request(axios, basePath));
4194
4242
  },
4243
+ /**
4244
+ * Retrieves the evidence folder for the designated Workflow Run
4245
+ * @summary Retrieve Workflow Run Evidence Folder
4246
+ * @param {string} workflowRunId Workflow Run ID
4247
+ * @param {*} [options] Override http request option.
4248
+ * @throws {RequiredError}
4249
+ */
4250
+ downloadEvidenceFolder(workflowRunId, options) {
4251
+ return localVarFp.downloadEvidenceFolder(workflowRunId, options).then((request) => request(axios, basePath));
4252
+ },
4195
4253
  /**
4196
4254
  * ID photos are downloaded using this endpoint.
4197
4255
  * @summary Download ID photo
@@ -4888,6 +4946,17 @@ export class DefaultApi extends BaseAPI {
4888
4946
  downloadDocumentVideo(documentId, options) {
4889
4947
  return DefaultApiFp(this.configuration).downloadDocumentVideo(documentId, options).then((request) => request(this.axios, this.basePath));
4890
4948
  }
4949
+ /**
4950
+ * Retrieves the evidence folder for the designated Workflow Run
4951
+ * @summary Retrieve Workflow Run Evidence Folder
4952
+ * @param {string} workflowRunId Workflow Run ID
4953
+ * @param {*} [options] Override http request option.
4954
+ * @throws {RequiredError}
4955
+ * @memberof DefaultApi
4956
+ */
4957
+ downloadEvidenceFolder(workflowRunId, options) {
4958
+ return DefaultApiFp(this.configuration).downloadEvidenceFolder(workflowRunId, options).then((request) => request(this.axios, this.basePath));
4959
+ }
4891
4960
  /**
4892
4961
  * ID photos are downloaded using this endpoint.
4893
4962
  * @summary Download ID photo
@@ -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.4.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/4.6.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.4.0",
3
+ "version": "4.6.0",
4
4
  "description": "Node.js library for the Onfido API",
5
5
  "author": "OpenAPI-Generator Contributors",
6
6
  "repository": {