-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added support for new completion callback options Added support for parked mail exchangers detection Added support for specifying a custom wait time while submitting and retrieving email verification jobs Breaking change: renamed WaitingStrategy into WaitOptions and refactored the latter so that it now allows to adjust the underlying polling wait times Breaking change: the default job submission and retrieval behavior is now to wait for the completion of jobs (but it is possible to change that through the new WaitOptions class)
- Loading branch information
Showing
216 changed files
with
3,117 additions
and
1,587 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
* https://verifalia.com/ | ||
* [email protected] | ||
* | ||
* Copyright (c) 2005-2021 Cobisi Research | ||
* Copyright (c) 2005-2023 Cobisi Research | ||
* | ||
* Cobisi Research | ||
* Via Della Costituzione, 31 | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
* https://verifalia.com/ | ||
* [email protected] | ||
* | ||
* Copyright (c) 2005-2021 Cobisi Research | ||
* Copyright (c) 2005-2023 Cobisi Research | ||
* | ||
* Cobisi Research | ||
* Via Della Costituzione, 31 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
* https://verifalia.com/ | ||
* [email protected] | ||
* | ||
* Copyright (c) 2005-2021 Cobisi Research | ||
* Copyright (c) 2005-2023 Cobisi Research | ||
* | ||
* Cobisi Research | ||
* Via Della Costituzione, 31 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
* https://verifalia.com/ | ||
* [email protected] | ||
* | ||
* Copyright (c) 2005-2021 Cobisi Research | ||
* Copyright (c) 2005-2023 Cobisi Research | ||
* | ||
* Cobisi Research | ||
* Via Della Costituzione, 31 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
* https://verifalia.com/ | ||
* [email protected] | ||
* | ||
* Copyright (c) 2005-2021 Cobisi Research | ||
* Copyright (c) 2005-2023 Cobisi Research | ||
* | ||
* Cobisi Research | ||
* Via Della Costituzione, 31 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
* https://verifalia.com/ | ||
* [email protected] | ||
* | ||
* Copyright (c) 2005-2021 Cobisi Research | ||
* Copyright (c) 2005-2023 Cobisi Research | ||
* | ||
* Cobisi Research | ||
* Via Della Costituzione, 31 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
* https://verifalia.com/ | ||
* [email protected] | ||
* | ||
* Copyright (c) 2005-2021 Cobisi Research | ||
* Copyright (c) 2005-2023 Cobisi Research | ||
* | ||
* Cobisi Research | ||
* Via Della Costituzione, 31 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
* https://verifalia.com/ | ||
* [email protected] | ||
* | ||
* Copyright (c) 2005-2021 Cobisi Research | ||
* Copyright (c) 2005-2023 Cobisi Research | ||
* | ||
* Cobisi Research | ||
* Via Della Costituzione, 31 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
* https://verifalia.com/ | ||
* [email protected] | ||
* | ||
* Copyright (c) 2005-2021 Cobisi Research | ||
* Copyright (c) 2005-2023 Cobisi Research | ||
* | ||
* Cobisi Research | ||
* Via Della Costituzione, 31 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
* https://verifalia.com/ | ||
* [email protected] | ||
* | ||
* Copyright (c) 2005-2021 Cobisi Research | ||
* Copyright (c) 2005-2023 Cobisi Research | ||
* | ||
* Cobisi Research | ||
* Via Della Costituzione, 31 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
* https://verifalia.com/ | ||
* [email protected] | ||
* | ||
* Copyright (c) 2005-2021 Cobisi Research | ||
* Copyright (c) 2005-2023 Cobisi Research | ||
* | ||
* Cobisi Research | ||
* Via Della Costituzione, 31 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
* https://verifalia.com/ | ||
* [email protected] | ||
* | ||
* Copyright (c) 2005-2021 Cobisi Research | ||
* Copyright (c) 2005-2023 Cobisi Research | ||
* | ||
* Cobisi Research | ||
* Via Della Costituzione, 31 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
* https://verifalia.com/ | ||
* [email protected] | ||
* | ||
* Copyright (c) 2005-2021 Cobisi Research | ||
* Copyright (c) 2005-2023 Cobisi Research | ||
* | ||
* Cobisi Research | ||
* Via Della Costituzione, 31 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
* https://verifalia.com/ | ||
* [email protected] | ||
* | ||
* Copyright (c) 2005-2021 Cobisi Research | ||
* Copyright (c) 2005-2023 Cobisi Research | ||
* | ||
* Cobisi Research | ||
* Via Della Costituzione, 31 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ import { __awaiter, __asyncGenerator, __await } from 'tslib'; | |
* https://verifalia.com/ | ||
* [email protected] | ||
* | ||
* Copyright (c) 2005-2021 Cobisi Research | ||
* Copyright (c) 2005-2023 Cobisi Research | ||
* | ||
* Cobisi Research | ||
* Via Della Costituzione, 31 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
* https://verifalia.com/ | ||
* [email protected] | ||
* | ||
* Copyright (c) 2005-2021 Cobisi Research | ||
* Copyright (c) 2005-2023 Cobisi Research | ||
* | ||
* Cobisi Research | ||
* Via Della Costituzione, 31 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
* https://verifalia.com/ | ||
* [email protected] | ||
* | ||
* Copyright (c) 2005-2021 Cobisi Research | ||
* Copyright (c) 2005-2023 Cobisi Research | ||
* | ||
* Cobisi Research | ||
* Via Della Costituzione, 31 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
* https://verifalia.com/ | ||
* [email protected] | ||
* | ||
* Copyright (c) 2005-2021 Cobisi Research | ||
* Copyright (c) 2005-2023 Cobisi Research | ||
* | ||
* Cobisi Research | ||
* Via Della Costituzione, 31 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
* https://verifalia.com/ | ||
* [email protected] | ||
* | ||
* Copyright (c) 2005-2021 Cobisi Research | ||
* Copyright (c) 2005-2023 Cobisi Research | ||
* | ||
* Cobisi Research | ||
* Via Della Costituzione, 31 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
* https://verifalia.com/ | ||
* [email protected] | ||
* | ||
* Copyright (c) 2005-2021 Cobisi Research | ||
* Copyright (c) 2005-2023 Cobisi Research | ||
* | ||
* Cobisi Research | ||
* Via Della Costituzione, 31 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
* https://verifalia.com/ | ||
* [email protected] | ||
* | ||
* Copyright (c) 2005-2021 Cobisi Research | ||
* Copyright (c) 2005-2023 Cobisi Research | ||
* | ||
* Cobisi Research | ||
* Via Della Costituzione, 31 | ||
|
@@ -30,6 +30,7 @@ | |
* THE SOFTWARE. | ||
*/ | ||
export declare class Logger { | ||
private _debugger; | ||
constructor(namespace: string); | ||
log(formatter: any, ...args: any[]): void; | ||
} | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
* https://verifalia.com/ | ||
* [email protected] | ||
* | ||
* Copyright (c) 2005-2021 Cobisi Research | ||
* Copyright (c) 2005-2023 Cobisi Research | ||
* | ||
* Cobisi Research | ||
* Via Della Costituzione, 31 | ||
|
@@ -35,7 +35,7 @@ import { RestClientFactory } from "../rest/RestClientFactory"; | |
import { Validation } from "./models/Validation"; | ||
import { ValidationRequestEntry } from "./models/ValidationRequestEntry"; | ||
import { ValidationRequest } from "./models/ValidationRequest"; | ||
import { WaitingStrategy } from "./WaitingStrategy"; | ||
import { WaitOptions } from "./WaitOptions"; | ||
import { CancellationToken } from "../common/CancellationToken"; | ||
import { FileValidationRequest } from "./models/FileValidationRequest"; | ||
import { ValidationOverviewListingOptions } from "./models/ValidationOverviewListingOptions"; | ||
|
@@ -45,23 +45,23 @@ export declare class EmailValidationsRestClient { | |
private readonly _restClientFactory; | ||
constructor(restClientFactory: RestClientFactory); | ||
/** | ||
* Submits one or more email addresses for validation. By default, this method does not wait for | ||
* the completion of the email validation job: pass a `WaitingStrategy` (or `true`, to wait | ||
* until the job is completed) to request a different waiting behavior. | ||
* Submits one or more email addresses for validation. | ||
* By default, this method waits for the completion of the email validation job: pass a `WaitOptions` | ||
* to request a different waiting behavior. | ||
* This method accepts a wide range of input types, including: | ||
* - `string` and `string[]` | ||
* - `ValidationRequestEntry` and `ValidationRequestEntry[]` | ||
* - `ValidationRequest` | ||
* - `FileValidationRequest` | ||
* | ||
* Here is the simplest case, showing how to validate one email address: | ||
* Here is the simplest case, showing how to verify an email address: | ||
* ```ts | ||
* // Option 1 - async/await | ||
* | ||
* const verifalia = new VerifaliaRestClient(...); | ||
* const result = await verifalia | ||
* .emailValidations | ||
* .submit('[email protected]', true); | ||
* .submit('[email protected]'); | ||
* | ||
* console.log(result.entries[0].classification); // 'Deliverable' | ||
* | ||
|
@@ -70,7 +70,7 @@ export declare class EmailValidationsRestClient { | |
* const verifalia = new VerifaliaRestClient(...); | ||
* verifalia | ||
* .emailValidations | ||
* .submit('[email protected]', true) | ||
* .submit('[email protected]') | ||
* .then(result => { | ||
* console.log(result.entries[0].classification); // 'Deliverable' | ||
* }); | ||
|
@@ -83,7 +83,7 @@ export declare class EmailValidationsRestClient { | |
* const verifalia = new VerifaliaRestClient(...); | ||
* const result = await verifalia | ||
* .emailValidations | ||
* .submit([ '[email protected]', '[email protected]' ], true); | ||
* .submit([ '[email protected]', '[email protected]' ]); | ||
* | ||
* result.entries.forEach((item) => { | ||
* console.log(`${item.inputData}: ${item.classification}`); | ||
|
@@ -94,7 +94,7 @@ export declare class EmailValidationsRestClient { | |
* const verifalia = new VerifaliaRestClient(...); | ||
* verifalia | ||
* .emailValidations | ||
* .submit([ '[email protected]', '[email protected]' ], true); | ||
* .submit([ '[email protected]', '[email protected]' ]); | ||
* .then(result => { | ||
* result.entries.forEach((item) => { | ||
* console.log(`${item.inputData}: ${item.classification}`); | ||
|
@@ -106,15 +106,15 @@ export declare class EmailValidationsRestClient { | |
* | ||
* @param request An object with one or more email addresses to validate. Can be of type `string`, `string[]`, | ||
* `ValidationRequestEntry`, `ValidationRequestEntry[]`, `ValidationRequest`, `FileValidationRequest`. | ||
* @param waitingStrategy The strategy which rules out how to wait for the completion of the | ||
* email validation. Can be `true` to wait for the completion or an instance of `WaitingStrategy` for | ||
* advanced scenarios and progress tracking. | ||
* @param waitOptions Optional configuration settings for waiting on the completion of an email validation job. | ||
* Can be `undefined` (or `null`) to wait for the completion using the default settings, `WaitOptions.noWait` to | ||
* avoid waiting or an instance of `WaitOptions` for advanced scenarios and progress tracking. | ||
*/ | ||
submit(request: FileValidationRequest | NonFileValidationRequest, waitingStrategy?: WaitingStrategy | boolean, cancellationToken?: CancellationToken): Promise<Validation | null>; | ||
submit(request: FileValidationRequest | NonFileValidationRequest, waitOptions?: WaitOptions | null, cancellationToken?: CancellationToken): Promise<Validation | null>; | ||
/** | ||
* Returns an email validation job previously submitted for processing. By default, this method does | ||
* not wait for the eventual completion of the email validation job: pass a `WaitingStrategy` (or `true`, | ||
* to wait until the job is completed) to request a different waiting behavior. | ||
* Returns an email validation job previously submitted for processing. | ||
* By default, this method waits for the completion of the email validation job: pass a `WaitOptions` | ||
* to request a different waiting behavior. | ||
* | ||
* Here is how to retrieve an email validation job, given its ID: | ||
* ```ts | ||
|
@@ -127,10 +127,11 @@ export declare class EmailValidationsRestClient { | |
* This method returns a `Promise` which can be awaited and can be cancelled through a `CancellationToken`. | ||
* | ||
* @param id The ID of the email validation job to retrieve. | ||
* @param waitingStrategy The strategy which rules out how to wait for the completion of the email | ||
* validation. | ||
* @param waitOptions Optional configuration settings for waiting on the completion of an email validation job. | ||
* Can be `undefined` (or `null`) to wait for the completion using the default settings, `WaitOptions.noWait` to | ||
* avoid waiting or an instance of `WaitOptions` for advanced scenarios and progress tracking. | ||
*/ | ||
get(id: string, waitingStrategy?: WaitingStrategy | boolean, cancellationToken?: CancellationToken): Promise<Validation | null>; | ||
get(id: string, waitOptions?: WaitOptions | null, cancellationToken?: CancellationToken): Promise<Validation | null>; | ||
/** | ||
* Deletes an email validation job previously submitted for processing. | ||
* | ||
|
2 changes: 1 addition & 1 deletion
2
browser/esm/email-validations/EmailValidationsRestClient.d.ts.map
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
* https://verifalia.com/ | ||
* [email protected] | ||
* | ||
* Copyright (c) 2005-2021 Cobisi Research | ||
* Copyright (c) 2005-2023 Cobisi Research | ||
* | ||
* Cobisi Research | ||
* Via Della Costituzione, 31 | ||
|
@@ -33,13 +33,39 @@ import { ValidationOverview } from "./models/ValidationOverview"; | |
import { CancellationToken } from "../common/CancellationToken"; | ||
declare type ProgressCallback = (value: ValidationOverview) => void; | ||
/** | ||
* Defines a strategy used to wait for the completion of an email verification job in Verifalia. | ||
* Provides optional configuration settings for waiting on the completion of an email validation job. | ||
*/ | ||
export declare class WaitingStrategy { | ||
waitForCompletion: boolean; | ||
export declare class WaitOptions { | ||
/** | ||
* Indicates that the library should automatically wait for the email validation to complete, using | ||
* the default wait times. | ||
*/ | ||
static default: WaitOptions; | ||
/** | ||
* Indicates that the library should not wait for the email validation to complete. | ||
*/ | ||
static noWait: WaitOptions; | ||
/** | ||
* If set, defines a function which receives completion progress updates for an email validation job. | ||
*/ | ||
progress: ProgressCallback | null; | ||
constructor(waitForCompletion: boolean, progress?: ProgressCallback | null); | ||
/** | ||
* Defines how much time to ask the Verifalia API to wait for the completion of the job on the server side, | ||
* during the initial job submission request. Expressed in milliseconds, with a default of 30 seconds. | ||
*/ | ||
submissionWaitTime: number; | ||
/** | ||
* Defines how much time to ask the Verifalia API to wait for the completion of the job on the server side, | ||
* during any of the polling requests. Expressed in milliseconds, with a default of 30 seconds. | ||
*/ | ||
pollWaitTime: number; | ||
/** | ||
* Waits for the next polling interval of the specified validationOverview. | ||
* | ||
* @param validationOverview The validation overview to wait against. | ||
* @param cancellationToken The eventual cancellation token for the waiting. | ||
*/ | ||
waitForNextPoll(validationOverview: ValidationOverview, cancellationToken?: CancellationToken): Promise<void>; | ||
} | ||
export {}; | ||
//# sourceMappingURL=WaitingStrategy.d.ts.map | ||
//# sourceMappingURL=WaitOptions.d.ts.map |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.