Skip to content

Commit

Permalink
Upgrade after onfido-openapi-spec change a6d9ac1
Browse files Browse the repository at this point in the history
  • Loading branch information
dvacca-onfido authored and github-actions[bot] committed Sep 4, 2024
1 parent 4b3a2ae commit 6487834
Show file tree
Hide file tree
Showing 6 changed files with 162 additions and 162 deletions.
8 changes: 4 additions & 4 deletions .release.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"source": {
"repo_url": "https://github.com/onfido/onfido-openapi-spec",
"short_sha": "f941ec8",
"long_sha": "f941ec84c3aeb0d3fcceea537991ba7e1ac96414",
"version": "v3.3.0"
"short_sha": "a6d9ac1",
"long_sha": "a6d9ac1aedd1d3b9432627568b73161560732919",
"version": "v3.3.2"
},
"release": "v3.4.0"
"release": "v3.5.0"
}
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,23 +132,23 @@ onfido
### File download
File downloads, for example `onfido.downloadDocument(documentId, {responseType: 'arraybuffer'})`, will return an instance of a specific object for this endpoint.
File downloads, for example `onfido.downloadDocument(documentId)`, will return an instance of a `FileTransfer` object.
These objects will have a content type, e.g. `image/png`.
This object will have a content type, e.g. `image/png`.
```js
download.headers["content-type"];
```
Call `slice()` to get a `Blob` of the download:
Call `slice()` to get a `Buffer` of the download:
```js
const blob = download.data.slice();
```
### File upload
File upload should use the provided FileTransfer class, e.g.:
File upload should make use of the provided `FileTransfer` class, e.g.:
```js
onfido.uploadDocument(
Expand All @@ -158,6 +158,8 @@ onfido.uploadDocument(
);
```
`FileTransfer` object can also be created from an existing file, e.g. `new FileTransfer("path/to/passport.png")`.
### Webhook event verification
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:
Expand Down
2 changes: 1 addition & 1 deletion api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12731,7 +12731,7 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati
}

if (location !== undefined) {
localVarFormParams.append('location', new Blob([JSON.stringify(location)], { type: "application/json", }));
localVarFormParams.append('location', JSON.stringify(location));
}


Expand Down
2 changes: 1 addition & 1 deletion configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ export class Configuration {
this.baseOptions = {...{ timeout: 30_000 },
...param.baseOptions,
...{ headers: {...param.baseOptions?.headers,
...{'User-Agent': 'onfido-node/3.4.0'}}}};
...{'User-Agent': 'onfido-node/3.5.0'}}}};
this.formDataCtor = param.formDataCtor || require('form-data'); // Injiect form data constructor (if needed)
}

Expand Down
Loading

0 comments on commit 6487834

Please sign in to comment.