@onfido/api 5.5.0 → 5.7.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 +7 -7
- package/dist/api.d.ts +604 -0
- package/dist/api.js +775 -2
- package/dist/configuration.js +1 -1
- package/dist/esm/api.d.ts +604 -0
- package/dist/esm/api.js +773 -0
- package/dist/esm/configuration.js +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -42,7 +42,7 @@ Require the package:
|
|
|
42
42
|
const {
|
|
43
43
|
DefaultApi,
|
|
44
44
|
Configuration,
|
|
45
|
-
WebhookEventVerifier
|
|
45
|
+
WebhookEventVerifier,
|
|
46
46
|
} = require("@onfido/api");
|
|
47
47
|
const { isAxiosError } = require("axios");
|
|
48
48
|
```
|
|
@@ -54,7 +54,7 @@ import {
|
|
|
54
54
|
DefaultApi,
|
|
55
55
|
Configuration,
|
|
56
56
|
Region,
|
|
57
|
-
WebhookEventVerifier
|
|
57
|
+
WebhookEventVerifier,
|
|
58
58
|
} from "@onfido/api";
|
|
59
59
|
import { isAxiosError } from "axios";
|
|
60
60
|
```
|
|
@@ -66,8 +66,8 @@ const onfido = new DefaultApi(
|
|
|
66
66
|
new Configuration({
|
|
67
67
|
apiToken: process.env.ONFIDO_API_TOKEN,
|
|
68
68
|
region: Region.EU, // Supports Region.EU (Europe), Region.US (United States), and Region.CA (Canada)
|
|
69
|
-
baseOptions: { timeout: 60_000 } // Additional Axios options (timeout, etc.)
|
|
70
|
-
})
|
|
69
|
+
baseOptions: { timeout: 60_000 }, // Additional Axios options (timeout, etc.)
|
|
70
|
+
}),
|
|
71
71
|
);
|
|
72
72
|
```
|
|
73
73
|
|
|
@@ -85,8 +85,8 @@ Using `async`/`await` (in an `async function`):
|
|
|
85
85
|
last_name: "Doe",
|
|
86
86
|
location: {
|
|
87
87
|
ip_address: "127.0.0.1",
|
|
88
|
-
country_of_residence: "GBR"
|
|
89
|
-
}
|
|
88
|
+
country_of_residence: "GBR",
|
|
89
|
+
},
|
|
90
90
|
});
|
|
91
91
|
|
|
92
92
|
// ...
|
|
@@ -161,7 +161,7 @@ File upload should make use of the provided `FileTransfer` class, e.g.:
|
|
|
161
161
|
onfido.uploadDocument(
|
|
162
162
|
"passport",
|
|
163
163
|
"<APPLICANT_ID>",
|
|
164
|
-
new FileTransfer(Buffer.from(document.buffer), document.filename)
|
|
164
|
+
new FileTransfer(Buffer.from(document.buffer), document.filename),
|
|
165
165
|
);
|
|
166
166
|
```
|
|
167
167
|
|