Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@onfido/api

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@onfido/api - npm Package Compare versions

Comparing version 2.2.0 to 2.3.0

dist/resources/ConsentsRequest.d.ts

18

CHANGELOG.md
# Changelog
## v2.3.0, 10 May 2022
- Updated to use API v3.4. For more details please see our [release notes](https://developers.onfido.com/release-notes#api-v34)
- Added `location` to applicant request, applicant response and documents request. `location` is a mandatory parameter for all applicants in order to create a check using API v3.4
- Added `consents` to applicant request. `consents` is a mandatory parameter for any applicant located in the United States in order to create a check using API v3.4
- Added `phoneNumber` to applicant request and response
- Removed `privacy_notices_read_consent_given` from check request and response
## v2.2.0, 02 March 2022

@@ -9,7 +17,7 @@

- Fix `advancedValidation` flag when uploading live photo
- Fixed `advancedValidation` flag when uploading live photo
## v2.1.1, 6 Jan 2022
- Add `validate_image_quality` to document upload request
- Added `validate_image_quality` to document upload request

@@ -22,8 +30,8 @@ ## v2.1.0, 24 June 2021

- Add `environments` to Webhook object
- Added `environments` to Webhook object
## v2.0.1, 17 May 2021
- Add `sub_result` to trigger sandbox pre-determined responses for Document report sub-results
- Add `consider` array functionality for sandbox pre-determined responses
- Added `sub_result` to trigger sandbox pre-determined responses for Document report sub-results
- Added `consider` array functionality for sandbox pre-determined responses

@@ -30,0 +38,0 @@ ## v2.0.0, 9 April 2021

import axios from 'axios';
import { PassThrough, Readable } from 'stream';
var version = "2.2.0";
var version = "2.3.0";

@@ -98,3 +98,10 @@ class OnfidoError extends Error {

else if (value !== undefined && value !== null) {
formData.append(snakeCase(key), value);
if (value instanceof Object) {
for (const [elementKey, elementValue] of Object.entries(value)) {
formData.append(snakeCase(key + "[" + elementKey + "]"), elementValue);
}
}
else {
formData.append(snakeCase(key), value);
}
}

@@ -426,3 +433,3 @@ return formData;

}
const regionUrl = `https://api.${region.toLowerCase()}.onfido.com/v3.3/`;
const regionUrl = `https://api.${region.toLowerCase()}.onfido.com/v3.4/`;
this.axiosInstance = axios.create({

@@ -429,0 +436,0 @@ baseURL: unknownApiUrl || regionUrl,

@@ -10,3 +10,3 @@ 'use strict';

var version = "2.2.0";
var version = "2.3.0";

@@ -105,3 +105,10 @@ class OnfidoError extends Error {

else if (value !== undefined && value !== null) {
formData.append(snakeCase(key), value);
if (value instanceof Object) {
for (const [elementKey, elementValue] of Object.entries(value)) {
formData.append(snakeCase(key + "[" + elementKey + "]"), elementValue);
}
}
else {
formData.append(snakeCase(key), value);
}
}

@@ -432,3 +439,3 @@ return formData;

}
const regionUrl = `https://api.${region.toLowerCase()}.onfido.com/v3.3/`;
const regionUrl = `https://api.${region.toLowerCase()}.onfido.com/v3.4/`;
this.axiosInstance = axios.create({

@@ -435,0 +442,0 @@ baseURL: unknownApiUrl || regionUrl,

@@ -5,2 +5,4 @@ import { AxiosInstance } from "axios";

import { IdNumber, IdNumberRequest } from "./IdNumbers";
import { Location, LocationRequest } from "./Location";
import { ConsentsRequest } from "./ConsentsRequest";
export declare type ApplicantRequest = {

@@ -13,2 +15,5 @@ firstName?: string | null;

idNumbers?: IdNumberRequest[] | null;
phoneNumber?: string | null;
location?: LocationRequest | null;
consents?: ConsentsRequest[] | null;
};

@@ -26,2 +31,4 @@ export declare type Applicant = {

idNumbers: IdNumber[] | null;
phoneNumber: string | null;
location: Location | null;
};

@@ -28,0 +35,0 @@ export declare class Applicants extends Resource<ApplicantRequest> {

@@ -13,3 +13,2 @@ import { AxiosInstance } from "axios";

redirectUri?: string | null;
privacyNoticesReadConsentGiven?: boolean;
webhookIds?: string[] | null;

@@ -32,3 +31,2 @@ subResult?: string;

resultsUri: string;
privacyNoticesReadConsentGiven: boolean;
webhookIds: string[] | null;

@@ -35,0 +33,0 @@ };

@@ -5,2 +5,3 @@ import { AxiosInstance } from "axios";

import { Resource } from "../Resource";
import { LocationRequest } from "./Location";
export declare type DocumentRequest = {

@@ -13,2 +14,3 @@ applicantId?: string | null;

validateImageQuality?: boolean | null;
location?: LocationRequest | null;
};

@@ -15,0 +17,0 @@ export declare type Document = {

{
"name": "@onfido/api",
"version": "2.2.0",
"version": "2.3.0",
"description": "Node.js library for the Onfido API",

@@ -5,0 +5,0 @@ "keywords": [

@@ -9,3 +9,3 @@ # Onfido Node.js Library

This version uses Onfido API v3.3. 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.
This version uses Onfido API v3.4. 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.

@@ -56,3 +56,7 @@ ## Installation

firstName: "Jane",
lastName: "Doe"
lastName: "Doe",
location: {
ipAddress: "127.0.0.1",
countryOfResidence: "GBR"
}
});

@@ -85,3 +89,7 @@

firstName: "Jane",
lastName: "Doe"
lastName: "Doe",
location: {
ipAddress: "127.0.0.1",
countryOfResidence: "GBR"
}
})

@@ -114,2 +122,6 @@ .then(applicant =>

country: "GBR",
},
location: {
ipAddress: "127.0.0.1",
countryOfResidence: "GBR",
}

@@ -142,3 +154,8 @@ });

},
idNumbers: []
idNumbers: [],
phoneNumber: null,
location: {
ipAddress: "127.0.0.1",
countryOfResidence: "GBR"
}
}

@@ -145,0 +162,0 @@ ```

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc