Skip to content

Commit 1df6c34

Browse files
Merge pull request #156 from onfido/release-upgrade
Refresh onfido-node after onfido-openapi-spec update (be823e7)
2 parents 6c52cda + 94dfc6e commit 1df6c34

File tree

6 files changed

+81
-65
lines changed

6 files changed

+81
-65
lines changed

.release.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"source": {
33
"repo_url": "https://github.com/onfido/onfido-openapi-spec",
4-
"short_sha": "54ce45f",
5-
"long_sha": "54ce45f2138f044cc5cb40f6904dc7bc1a675be6",
6-
"version": "v4.5.0"
4+
"short_sha": "be823e7",
5+
"long_sha": "be823e7815c93bfbfc3fb764c0548f57cb851fe9",
6+
"version": "v4.6.0"
77
},
8-
"release": "v4.5.0"
8+
"release": "v4.6.0"
99
}

README.md

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,16 @@
22

33
The official Node.js library for integrating with the Onfido API.
44

5-
Documentation can be found at <https://documentation.onfido.com>.
5+
Documentation is available at <https://documentation.onfido.com>.
66

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)
815

916
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.
1017

@@ -58,7 +65,7 @@ Configure with your API token and region:
5865
const onfido = new DefaultApi(
5966
new Configuration({
6067
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)
6269
baseOptions: { timeout: 60_000 } // Additional Axios options (timeout, etc.)
6370
})
6471
);
@@ -162,7 +169,7 @@ onfido.uploadDocument(
162169
163170
### Webhook event verification
164171
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:
166173
167174
```js
168175
(async () => {
@@ -184,41 +191,43 @@ Webhook events payload needs to be verified before it can be accessed. Library a
184191
185192
#### Do not use square bracket syntax
186193
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.
188195
189196
## Contributing
190197
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.
192199
193200
For contributions to the tests instead, please follow the steps below:
194201
195-
1. [Fork](https://github.com/onfido/onfido-node/fork) repository
202+
1. Fork the [repository](https://github.com/onfido/onfido-node/fork)
196203
2. Create your feature branch (`git checkout -b my-new-feature`)
197204
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'`)
199206
5. Push to the branch (`git push origin my-new-feature`)
200207
6. Create a new Pull Request
201208
202209
## Versioning policy
203210
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:
205214
206-
- MAJOR versions (x.0.0) might:
215+
- MAJOR versions (x.0.0) may:
207216
- target a new API version
208217
- include non-backward compatible change
209-
- MINOR versions (0.x.0) might:
218+
- MINOR versions (0.x.0) may:
210219
- add a new functionality, non-mandatory parameter or property
211220
- deprecate an old functionality
212221
- include non-backward compatible change to a functionality which is:
213222
- labelled as alpha or beta
214223
- completely broken and not usable
215-
- PATCH version (0.0.x) might:
224+
- PATCH version (0.0.x) will:
216225
- fix a bug
217226
- include backward compatible changes only
218227
219228
## More documentation
220229
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>.
222231
223232
## Support
224233

api.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6203,6 +6203,7 @@ export const IdNumberTypeEnum = {
62036203
SocialInsurance: 'social_insurance',
62046204
TaxId: 'tax_id',
62056205
IdentityCard: 'identity_card',
6206+
DrivingLicense: 'driving_license',
62066207
DrivingLicence: 'driving_licence',
62076208
ShareCode: 'share_code',
62086209
VoterId: 'voter_id',
@@ -10277,6 +10278,12 @@ export interface WebhookEventPayloadResource {
1027710278
* @memberof WebhookEventPayloadResource
1027810279
*/
1027910280
'error'?: WorkflowRunError;
10281+
/**
10282+
* Customer-provided user identifier.
10283+
* @type {string}
10284+
* @memberof WebhookEventPayloadResource
10285+
*/
10286+
'customer_user_id'?: string;
1028010287
}
1028110288
/**
1028210289
*

configuration.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ export class Configuration {
101101
this.baseOptions = {...{ timeout: 30_000 },
102102
...param.baseOptions,
103103
...{ headers: {...param.baseOptions?.headers,
104-
...{'User-Agent': 'onfido-node/4.5.0'}}}};
104+
...{'User-Agent': 'onfido-node/4.6.0'}}}};
105105
this.formDataCtor = param.formDataCtor || require('form-data'); // Injiect form data constructor (if needed)
106106
}
107107

package-lock.json

Lines changed: 46 additions & 46 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@onfido/api",
3-
"version": "4.5.0",
3+
"version": "4.6.0",
44
"description": "Node.js library for the Onfido API",
55
"author": "OpenAPI-Generator Contributors",
66
"repository": {

0 commit comments

Comments
 (0)