@onfido/api
Advanced tools
Comparing version 2.7.0 to 2.7.1
# Changelog | ||
## v2.7.1, 30 May 2023 | ||
- Fix bug when uploading documents with `validateImageQuality`. | ||
## v2.7.0, 24 January 2023 | ||
@@ -4,0 +8,0 @@ |
import axios from 'axios'; | ||
import { PassThrough, Readable } from 'stream'; | ||
var version = "2.7.0"; | ||
var version = "2.7.1"; | ||
@@ -68,2 +68,10 @@ class OnfidoError extends Error { | ||
const snakeCase = (camelCaseString) => camelCaseString.replace(/[A-Z]/g, char => `_${char.toLowerCase()}`); | ||
const formatValue = (value) => { | ||
if (typeof value === 'boolean') { | ||
return String(value); | ||
} | ||
else { | ||
return value; | ||
} | ||
}; | ||
const camelCase = (snakeCaseString) => snakeCaseString | ||
@@ -105,3 +113,3 @@ .replace(/_[0-9]/g, underscoreDigit => underscoreDigit[1]) | ||
else { | ||
formData.append(snakeCase(key), value); | ||
formData.append(snakeCase(key), formatValue(value)); | ||
} | ||
@@ -108,0 +116,0 @@ } |
@@ -10,3 +10,3 @@ 'use strict'; | ||
var version = "2.7.0"; | ||
var version = "2.7.1"; | ||
@@ -75,2 +75,10 @@ class OnfidoError extends Error { | ||
const snakeCase = (camelCaseString) => camelCaseString.replace(/[A-Z]/g, char => `_${char.toLowerCase()}`); | ||
const formatValue = (value) => { | ||
if (typeof value === 'boolean') { | ||
return String(value); | ||
} | ||
else { | ||
return value; | ||
} | ||
}; | ||
const camelCase = (snakeCaseString) => snakeCaseString | ||
@@ -112,3 +120,3 @@ .replace(/_[0-9]/g, underscoreDigit => underscoreDigit[1]) | ||
else { | ||
formData.append(snakeCase(key), value); | ||
formData.append(snakeCase(key), formatValue(value)); | ||
} | ||
@@ -115,0 +123,0 @@ } |
@@ -12,3 +12,3 @@ import { AxiosInstance } from "axios"; | ||
issuingCountry?: string | null; | ||
validateImageQuality?: boolean | null; | ||
validateImageQuality?: boolean | null | string; | ||
location?: LocationRequest | null; | ||
@@ -15,0 +15,0 @@ }; |
{ | ||
"name": "@onfido/api", | ||
"version": "2.7.0", | ||
"version": "2.7.1", | ||
"description": "Node.js library for the Onfido API", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
155102
1575