Skip to content

Commit

Permalink
Support for API v2.1:
Browse files Browse the repository at this point in the history
- configurable data retention period
- "Relaxed" deduplication algorithm
- DomainHasNullMx status code
Updated dependencies
  • Loading branch information
verifalia authored and ecobisi committed Feb 21, 2020
1 parent e53fa30 commit f0735e9
Show file tree
Hide file tree
Showing 10 changed files with 47 additions and 21 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Verifalia - Email list cleaning and real-time email verification service
https://verifalia.com/
[email protected]

Copyright (c) 2005-2019 Cobisi Research
Copyright (c) 2005-2020 Cobisi Research

Cobisi Research
Via Prima Strada, 35
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
![Verifalia API](https://img.shields.io/badge/Verifalia%20API-v2.0-green)
![Verifalia API](https://img.shields.io/badge/Verifalia%20API-v2.1-green)
[![NPM](https://img.shields.io/npm/v/verifalia.svg)](https://www.npmjs.com/package/verifalia)

Verifalia REST API - SDK and helper library for Javascript
Expand Down
23 changes: 11 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "verifalia",
"version": "2.3.0",
"version": "2.4.0",
"description": "Verifalia email validation library for Javascript",
"homepage": "https://verifalia.com",
"main": "dist/umd/verifalia.js",
Expand All @@ -12,7 +12,6 @@
"build:definitions": "tsc -p tsconfig.definitions.json",
"build": "npm run build:genversion && rollup -c && npm run build:definitions",
"build:production": "cross-env NODE_ENV=production npm run build",
"lint": "tslint",
"version": "npm run build:production",
"test": "echo \"No test specified\""
},
Expand Down Expand Up @@ -40,7 +39,8 @@
},
"dependencies": {
"axios": "^0.19.0",
"debug": "^4.1.1"
"debug": "^4.1.1",
"tslib": "^1.10.0"
},
"bugs": {
"url": "https://github.com/verifalia/verifalia-js-sdk/issues"
Expand All @@ -50,23 +50,22 @@
"node": ">= 0.8.0"
},
"devDependencies": {
"@rollup/plugin-commonjs": "^11.0.2",
"@rollup/plugin-json": "^4.0.2",
"@rollup/plugin-node-resolve": "^7.1.1",
"@rollup/plugin-replace": "^2.3.1",
"@types/debug": "^4.1.5",
"@types/node": "^12.6.9",
"cross-env": "^5.2.0",
"@types/node": "^13.7.4",
"cross-env": "^7.0.0",
"dts-bundle-generator": "^3.2.0",
"genversion": "^2.2.0",
"rollup": "^1.19.4",
"rollup-plugin-commonjs": "^10.0.2",
"rollup-plugin-json": "^4.0.0",
"rollup": "^1.31.1",
"rollup-plugin-node-builtins": "^2.1.2",
"rollup-plugin-node-globals": "^1.4.0",
"rollup-plugin-node-resolve": "^5.2.0",
"rollup-plugin-replace": "^2.2.0",
"rollup-plugin-terser": "^5.1.1",
"rollup-plugin-typescript2": "^0.22.1",
"rollup-plugin-typescript2": "^0.26.0",
"rollup-plugin-uglify": "^6.0.2",
"ts-loader": "^6.0.4",
"tslint": "^5.18.0",
"typescript": "^3.5.3"
},
"files": [
Expand Down
8 changes: 4 additions & 4 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import resolve from 'rollup-plugin-node-resolve';
import commonjs from 'rollup-plugin-commonjs';
import resolve from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';
import typescript from 'rollup-plugin-typescript2';
import json from 'rollup-plugin-json';
import json from '@rollup/plugin-json';
import { terser } from "rollup-plugin-terser";
import builtins from 'rollup-plugin-node-builtins';
import globals from 'rollup-plugin-node-globals';
import replace from 'rollup-plugin-replace';
import replace from '@rollup/plugin-replace';
import pkg from './package.json';

export default [
Expand Down
2 changes: 1 addition & 1 deletion src/VerifaliaRestClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export class VerifaliaRestClient implements RestClientFactory {
* Gets or sets the version of the Verifalia API to use when making requests; defaults to the latest API
* version supported by this SDK. Warning: changing this value may affect the stability of the SDK itself.
*/
public apiVersion: string = 'v2.0';
public apiVersion: string = 'v2.1';

/**
* Allows to manage the credits for the Verifalia account.
Expand Down
9 changes: 8 additions & 1 deletion src/email-validations/models/DeduplicationMode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,12 @@ export enum DeduplicationMode {
* Identifies duplicates using an algorithm with safe rules-only, which guarantee no
* false duplicates.
*/
Safe = 'Safe'
Safe = 'Safe',

/**
* Identifies duplicates using a set of relaxed rules which assume the target email
* service providers are configured with modern settings only (instead of the broader
* options the RFCs from the '80s allow).
*/
Relaxed = 'Relaxed'
}
4 changes: 4 additions & 0 deletions src/email-validations/models/ValidationEntryStatus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ export enum ValidationEntryStatus {
*/
DomainIsMisconfigured = 'DomainIsMisconfigured',

/** The domain has a NULL MX (RFC 7505) resource record and can't thus accept email messages.
*/
DomainHasNullMx = 'DomainHasNullMx',

/** The email address is provided by a well-known disposable email address provider (DEA).
*/
DomainIsWellKnownDea = 'DomainIsWellKnownDea',
Expand Down
5 changes: 5 additions & 0 deletions src/email-validations/models/ValidationOverview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ export interface ValidationOverview {
*/
deduplication: DeduplicationMode;

/**
* The maximum data retention period for this verification job, in the format [dd.]hh.mm.ss.
*/
retention: string;

/**
* The processing status for the validation job.
*/
Expand Down
11 changes: 11 additions & 0 deletions src/email-validations/models/ValidationRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,15 @@ export interface ValidationRequest {
* will be returned on subsequent API calls and shown on the Verifalia clients area.
*/
name?: string;

/**
* An optional maximum data retention period Verifalia observes for this verification job,
* after which the job will be automatically deleted, in the format: [dd.]hh.mm.ss.
* If unset, forces the service to fall back to the default retention period for the user
* or browser app which is submitting the job.
* A verification job can be deleted anytime prior to its retention period through the
* delete() method; if set, the retention period must have a value between 5 minutes and 30
* days.
*/
retention?: string;
}
2 changes: 1 addition & 1 deletion src/version.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// generated by genversion
export const version = '2.3.0'
export const version = '2.4.0'

0 comments on commit f0735e9

Please sign in to comment.