@onfido/api 4.5.0 → 5.0.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.11.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