UNPKG

@elasticemail/elasticemail-client-ts-axios

Version:

Official ElasticEmail SDK. This API is based on the REST API architecture, allowing the user to easily manage their data with this resource-based approach.

734 lines (733 loc) 41.2 kB
"use strict"; /* tslint:disable */ /* eslint-disable */ /** * Elastic Email REST API * This API is based on the REST API architecture, allowing the user to easily manage their data with this resource-based approach. Every API call is established on which specific request type (GET, POST, PUT, DELETE) will be used. The API has a limit of 20 concurrent connections and a hard timeout of 600 seconds per request. To start using this API, you will need your Access Token (available <a target=\"_blank\" href=\"https://app.elasticemail.com/marketing/settings/new/manage-api\">here</a>). Remember to keep it safe. Required access levels are listed in the given request’s description. Downloadable library clients can be found in our Github repository <a target=\"_blank\" href=\"https://github.com/ElasticEmail?tab=repositories&q=%22rest+api%22+in%3Areadme\">here</a> * * The version of the OpenAPI document: 4.0.0 * Contact: support@elasticemail.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; Object.defineProperty(exports, "__esModule", { value: true }); exports.VerificationsApi = exports.VerificationsApiFactory = exports.VerificationsApiFp = exports.VerificationsApiAxiosParamCreator = void 0; const axios_1 = require("axios"); // Some imports not used depending on template conditions // @ts-ignore const common_1 = require("../common"); // @ts-ignore const base_1 = require("../base"); /** * VerificationsApi - axios parameter creator * @export */ exports.VerificationsApiAxiosParamCreator = function (configuration) { return { /** * Delete a result with given email if exists. Required Access Level: VerifyEmails * @summary Delete Email Verification Result * @param {string} email Email address to verification * @param {*} [options] Override http request option. * @throws {RequiredError} */ verificationsByEmailDelete: (email, options = {}) => __awaiter(this, void 0, void 0, function* () { // verify required parameter 'email' is not null or undefined common_1.assertParamExists('verificationsByEmailDelete', 'email', email); const localVarPath = `/verifications/{email}` .replace(`{${"email"}}`, encodeURIComponent(String(email))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; // authentication apikey required yield common_1.setApiKeyToObject(localVarHeaderParameter, "X-ElasticEmail-ApiKey", configuration); common_1.setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers); return { url: common_1.toPathString(localVarUrlObj), options: localVarRequestOptions, }; }), /** * Returns a result of verified email. Required Access Level: VerifyEmails * @summary Get Email Verification Result * @param {string} email Email address to view verification result of * @param {*} [options] Override http request option. * @throws {RequiredError} */ verificationsByEmailGet: (email, options = {}) => __awaiter(this, void 0, void 0, function* () { // verify required parameter 'email' is not null or undefined common_1.assertParamExists('verificationsByEmailGet', 'email', email); const localVarPath = `/verifications/{email}` .replace(`{${"email"}}`, encodeURIComponent(String(email))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; // authentication apikey required yield common_1.setApiKeyToObject(localVarHeaderParameter, "X-ElasticEmail-ApiKey", configuration); common_1.setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers); return { url: common_1.toPathString(localVarUrlObj), options: localVarRequestOptions, }; }), /** * Verify single email address and returns result of verification. Required Access Level: VerifyEmails * @summary Verify Email * @param {string} email Email address to verify * @param {*} [options] Override http request option. * @throws {RequiredError} */ verificationsByEmailPost: (email, options = {}) => __awaiter(this, void 0, void 0, function* () { // verify required parameter 'email' is not null or undefined common_1.assertParamExists('verificationsByEmailPost', 'email', email); const localVarPath = `/verifications/{email}` .replace(`{${"email"}}`, encodeURIComponent(String(email))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; // authentication apikey required yield common_1.setApiKeyToObject(localVarHeaderParameter, "X-ElasticEmail-ApiKey", configuration); common_1.setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers); return { url: common_1.toPathString(localVarUrlObj), options: localVarRequestOptions, }; }), /** * Delete Verification Results if they exist. Required Access Level: VerifyEmails * @summary Delete File Verification Result * @param {string} id ID of the exported file * @param {*} [options] Override http request option. * @throws {RequiredError} */ verificationsFilesByIdDelete: (id, options = {}) => __awaiter(this, void 0, void 0, function* () { // verify required parameter 'id' is not null or undefined common_1.assertParamExists('verificationsFilesByIdDelete', 'id', id); const localVarPath = `/verifications/files/{id}` .replace(`{${"id"}}`, encodeURIComponent(String(id))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; // authentication apikey required yield common_1.setApiKeyToObject(localVarHeaderParameter, "X-ElasticEmail-ApiKey", configuration); common_1.setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers); return { url: common_1.toPathString(localVarUrlObj), options: localVarRequestOptions, }; }), /** * Download verification results as a ZIP file. Required Access Level: VerifyEmails * @summary Download File Verification Result * @param {string} id Verification ID to download * @param {*} [options] Override http request option. * @throws {RequiredError} */ verificationsFilesByIdResultDownloadGet: (id, options = {}) => __awaiter(this, void 0, void 0, function* () { // verify required parameter 'id' is not null or undefined common_1.assertParamExists('verificationsFilesByIdResultDownloadGet', 'id', id); const localVarPath = `/verifications/files/{id}/result/download` .replace(`{${"id"}}`, encodeURIComponent(String(id))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; // authentication apikey required yield common_1.setApiKeyToObject(localVarHeaderParameter, "X-ElasticEmail-ApiKey", configuration); common_1.setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers); return { url: common_1.toPathString(localVarUrlObj), options: localVarRequestOptions, }; }), /** * Returns status and results (if verified) of file with given ID. Required Access Level: VerifyEmails * @summary Get Detailed File Verification Result * @param {string} id ID of the Verification to display status of * @param {number} [limit] Maximum number of returned email verification results * @param {number} [offset] How many result items should be returned ahead * @param {*} [options] Override http request option. * @throws {RequiredError} */ verificationsFilesByIdResultGet: (id, limit, offset, options = {}) => __awaiter(this, void 0, void 0, function* () { // verify required parameter 'id' is not null or undefined common_1.assertParamExists('verificationsFilesByIdResultGet', 'id', id); const localVarPath = `/verifications/files/{id}/result` .replace(`{${"id"}}`, encodeURIComponent(String(id))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; // authentication apikey required yield common_1.setApiKeyToObject(localVarHeaderParameter, "X-ElasticEmail-ApiKey", configuration); if (limit !== undefined) { localVarQueryParameter['limit'] = limit; } if (offset !== undefined) { localVarQueryParameter['offset'] = offset; } common_1.setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers); return { url: common_1.toPathString(localVarUrlObj), options: localVarRequestOptions, }; }), /** * Start a verification of the previously uploaded file with emails. Required Access Level: VerifyEmails * @summary Start verification * @param {string} id File ID to start verification * @param {*} [options] Override http request option. * @throws {RequiredError} */ verificationsFilesByIdVerificationPost: (id, options = {}) => __awaiter(this, void 0, void 0, function* () { // verify required parameter 'id' is not null or undefined common_1.assertParamExists('verificationsFilesByIdVerificationPost', 'id', id); const localVarPath = `/verifications/files/{id}/verification` .replace(`{${"id"}}`, encodeURIComponent(String(id))); // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; // authentication apikey required yield common_1.setApiKeyToObject(localVarHeaderParameter, "X-ElasticEmail-ApiKey", configuration); common_1.setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers); return { url: common_1.toPathString(localVarUrlObj), options: localVarRequestOptions, }; }), /** * Uploads a CSV file with list of emails that can then be triggered for verification. An \'email\' column is required. Required Access Level: VerifyEmails * @summary Upload File with Emails * @param {File} [file] * @param {*} [options] Override http request option. * @throws {RequiredError} */ verificationsFilesPost: (file, options = {}) => __awaiter(this, void 0, void 0, function* () { const localVarPath = `/verifications/files`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)(); // authentication apikey required yield common_1.setApiKeyToObject(localVarHeaderParameter, "X-ElasticEmail-ApiKey", configuration); if (file !== undefined) { localVarFormParams.append('file', file); } localVarHeaderParameter['Content-Type'] = 'multipart/form-data'; common_1.setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers); localVarRequestOptions.data = localVarFormParams; return { url: common_1.toPathString(localVarUrlObj), options: localVarRequestOptions, }; }), /** * Returns a list of uploaded files, their statuses and results. Required Access Level: VerifyEmails * @summary Get Files Verification Results * @param {*} [options] Override http request option. * @throws {RequiredError} */ verificationsFilesResultGet: (options = {}) => __awaiter(this, void 0, void 0, function* () { const localVarPath = `/verifications/files/result`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; // authentication apikey required yield common_1.setApiKeyToObject(localVarHeaderParameter, "X-ElasticEmail-ApiKey", configuration); common_1.setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers); return { url: common_1.toPathString(localVarUrlObj), options: localVarRequestOptions, }; }), /** * Returns a results of all verified single emails. Required Access Level: VerifyEmails * @summary Get Emails Verification Results * @param {number} [limit] Maximum number of returned items. * @param {number} [offset] How many items should be returned ahead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ verificationsGet: (limit, offset, options = {}) => __awaiter(this, void 0, void 0, function* () { const localVarPath = `/verifications`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options); const localVarHeaderParameter = {}; const localVarQueryParameter = {}; // authentication apikey required yield common_1.setApiKeyToObject(localVarHeaderParameter, "X-ElasticEmail-ApiKey", configuration); if (limit !== undefined) { localVarQueryParameter['limit'] = limit; } if (offset !== undefined) { localVarQueryParameter['offset'] = offset; } common_1.setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers); return { url: common_1.toPathString(localVarUrlObj), options: localVarRequestOptions, }; }), }; }; /** * VerificationsApi - functional programming interface * @export */ exports.VerificationsApiFp = function (configuration) { const localVarAxiosParamCreator = exports.VerificationsApiAxiosParamCreator(configuration); return { /** * Delete a result with given email if exists. Required Access Level: VerifyEmails * @summary Delete Email Verification Result * @param {string} email Email address to verification * @param {*} [options] Override http request option. * @throws {RequiredError} */ verificationsByEmailDelete(email, options) { return __awaiter(this, void 0, void 0, function* () { const localVarAxiosArgs = yield localVarAxiosParamCreator.verificationsByEmailDelete(email, options); return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }); }, /** * Returns a result of verified email. Required Access Level: VerifyEmails * @summary Get Email Verification Result * @param {string} email Email address to view verification result of * @param {*} [options] Override http request option. * @throws {RequiredError} */ verificationsByEmailGet(email, options) { return __awaiter(this, void 0, void 0, function* () { const localVarAxiosArgs = yield localVarAxiosParamCreator.verificationsByEmailGet(email, options); return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }); }, /** * Verify single email address and returns result of verification. Required Access Level: VerifyEmails * @summary Verify Email * @param {string} email Email address to verify * @param {*} [options] Override http request option. * @throws {RequiredError} */ verificationsByEmailPost(email, options) { return __awaiter(this, void 0, void 0, function* () { const localVarAxiosArgs = yield localVarAxiosParamCreator.verificationsByEmailPost(email, options); return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }); }, /** * Delete Verification Results if they exist. Required Access Level: VerifyEmails * @summary Delete File Verification Result * @param {string} id ID of the exported file * @param {*} [options] Override http request option. * @throws {RequiredError} */ verificationsFilesByIdDelete(id, options) { return __awaiter(this, void 0, void 0, function* () { const localVarAxiosArgs = yield localVarAxiosParamCreator.verificationsFilesByIdDelete(id, options); return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }); }, /** * Download verification results as a ZIP file. Required Access Level: VerifyEmails * @summary Download File Verification Result * @param {string} id Verification ID to download * @param {*} [options] Override http request option. * @throws {RequiredError} */ verificationsFilesByIdResultDownloadGet(id, options) { return __awaiter(this, void 0, void 0, function* () { const localVarAxiosArgs = yield localVarAxiosParamCreator.verificationsFilesByIdResultDownloadGet(id, options); return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }); }, /** * Returns status and results (if verified) of file with given ID. Required Access Level: VerifyEmails * @summary Get Detailed File Verification Result * @param {string} id ID of the Verification to display status of * @param {number} [limit] Maximum number of returned email verification results * @param {number} [offset] How many result items should be returned ahead * @param {*} [options] Override http request option. * @throws {RequiredError} */ verificationsFilesByIdResultGet(id, limit, offset, options) { return __awaiter(this, void 0, void 0, function* () { const localVarAxiosArgs = yield localVarAxiosParamCreator.verificationsFilesByIdResultGet(id, limit, offset, options); return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }); }, /** * Start a verification of the previously uploaded file with emails. Required Access Level: VerifyEmails * @summary Start verification * @param {string} id File ID to start verification * @param {*} [options] Override http request option. * @throws {RequiredError} */ verificationsFilesByIdVerificationPost(id, options) { return __awaiter(this, void 0, void 0, function* () { const localVarAxiosArgs = yield localVarAxiosParamCreator.verificationsFilesByIdVerificationPost(id, options); return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }); }, /** * Uploads a CSV file with list of emails that can then be triggered for verification. An \'email\' column is required. Required Access Level: VerifyEmails * @summary Upload File with Emails * @param {File} [file] * @param {*} [options] Override http request option. * @throws {RequiredError} */ verificationsFilesPost(file, options) { return __awaiter(this, void 0, void 0, function* () { const localVarAxiosArgs = yield localVarAxiosParamCreator.verificationsFilesPost(file, options); return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }); }, /** * Returns a list of uploaded files, their statuses and results. Required Access Level: VerifyEmails * @summary Get Files Verification Results * @param {*} [options] Override http request option. * @throws {RequiredError} */ verificationsFilesResultGet(options) { return __awaiter(this, void 0, void 0, function* () { const localVarAxiosArgs = yield localVarAxiosParamCreator.verificationsFilesResultGet(options); return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }); }, /** * Returns a results of all verified single emails. Required Access Level: VerifyEmails * @summary Get Emails Verification Results * @param {number} [limit] Maximum number of returned items. * @param {number} [offset] How many items should be returned ahead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ verificationsGet(limit, offset, options) { return __awaiter(this, void 0, void 0, function* () { const localVarAxiosArgs = yield localVarAxiosParamCreator.verificationsGet(limit, offset, options); return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration); }); }, }; }; /** * VerificationsApi - factory interface * @export */ exports.VerificationsApiFactory = function (configuration, basePath, axios) { const localVarFp = exports.VerificationsApiFp(configuration); return { /** * Delete a result with given email if exists. Required Access Level: VerifyEmails * @summary Delete Email Verification Result * @param {string} email Email address to verification * @param {*} [options] Override http request option. * @throws {RequiredError} */ verificationsByEmailDelete(email, options) { return localVarFp.verificationsByEmailDelete(email, options).then((request) => request(axios, basePath)); }, /** * Returns a result of verified email. Required Access Level: VerifyEmails * @summary Get Email Verification Result * @param {string} email Email address to view verification result of * @param {*} [options] Override http request option. * @throws {RequiredError} */ verificationsByEmailGet(email, options) { return localVarFp.verificationsByEmailGet(email, options).then((request) => request(axios, basePath)); }, /** * Verify single email address and returns result of verification. Required Access Level: VerifyEmails * @summary Verify Email * @param {string} email Email address to verify * @param {*} [options] Override http request option. * @throws {RequiredError} */ verificationsByEmailPost(email, options) { return localVarFp.verificationsByEmailPost(email, options).then((request) => request(axios, basePath)); }, /** * Delete Verification Results if they exist. Required Access Level: VerifyEmails * @summary Delete File Verification Result * @param {string} id ID of the exported file * @param {*} [options] Override http request option. * @throws {RequiredError} */ verificationsFilesByIdDelete(id, options) { return localVarFp.verificationsFilesByIdDelete(id, options).then((request) => request(axios, basePath)); }, /** * Download verification results as a ZIP file. Required Access Level: VerifyEmails * @summary Download File Verification Result * @param {string} id Verification ID to download * @param {*} [options] Override http request option. * @throws {RequiredError} */ verificationsFilesByIdResultDownloadGet(id, options) { return localVarFp.verificationsFilesByIdResultDownloadGet(id, options).then((request) => request(axios, basePath)); }, /** * Returns status and results (if verified) of file with given ID. Required Access Level: VerifyEmails * @summary Get Detailed File Verification Result * @param {string} id ID of the Verification to display status of * @param {number} [limit] Maximum number of returned email verification results * @param {number} [offset] How many result items should be returned ahead * @param {*} [options] Override http request option. * @throws {RequiredError} */ verificationsFilesByIdResultGet(id, limit, offset, options) { return localVarFp.verificationsFilesByIdResultGet(id, limit, offset, options).then((request) => request(axios, basePath)); }, /** * Start a verification of the previously uploaded file with emails. Required Access Level: VerifyEmails * @summary Start verification * @param {string} id File ID to start verification * @param {*} [options] Override http request option. * @throws {RequiredError} */ verificationsFilesByIdVerificationPost(id, options) { return localVarFp.verificationsFilesByIdVerificationPost(id, options).then((request) => request(axios, basePath)); }, /** * Uploads a CSV file with list of emails that can then be triggered for verification. An \'email\' column is required. Required Access Level: VerifyEmails * @summary Upload File with Emails * @param {File} [file] * @param {*} [options] Override http request option. * @throws {RequiredError} */ verificationsFilesPost(file, options) { return localVarFp.verificationsFilesPost(file, options).then((request) => request(axios, basePath)); }, /** * Returns a list of uploaded files, their statuses and results. Required Access Level: VerifyEmails * @summary Get Files Verification Results * @param {*} [options] Override http request option. * @throws {RequiredError} */ verificationsFilesResultGet(options) { return localVarFp.verificationsFilesResultGet(options).then((request) => request(axios, basePath)); }, /** * Returns a results of all verified single emails. Required Access Level: VerifyEmails * @summary Get Emails Verification Results * @param {number} [limit] Maximum number of returned items. * @param {number} [offset] How many items should be returned ahead. * @param {*} [options] Override http request option. * @throws {RequiredError} */ verificationsGet(limit, offset, options) { return localVarFp.verificationsGet(limit, offset, options).then((request) => request(axios, basePath)); }, }; }; /** * VerificationsApi - object-oriented interface * @export * @class VerificationsApi * @extends {BaseAPI} */ class VerificationsApi extends base_1.BaseAPI { /** * Delete a result with given email if exists. Required Access Level: VerifyEmails * @summary Delete Email Verification Result * @param {string} email Email address to verification * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof VerificationsApi */ verificationsByEmailDelete(email, options) { return exports.VerificationsApiFp(this.configuration).verificationsByEmailDelete(email, options).then((request) => request(this.axios, this.basePath)); } /** * Returns a result of verified email. Required Access Level: VerifyEmails * @summary Get Email Verification Result * @param {string} email Email address to view verification result of * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof VerificationsApi */ verificationsByEmailGet(email, options) { return exports.VerificationsApiFp(this.configuration).verificationsByEmailGet(email, options).then((request) => request(this.axios, this.basePath)); } /** * Verify single email address and returns result of verification. Required Access Level: VerifyEmails * @summary Verify Email * @param {string} email Email address to verify * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof VerificationsApi */ verificationsByEmailPost(email, options) { return exports.VerificationsApiFp(this.configuration).verificationsByEmailPost(email, options).then((request) => request(this.axios, this.basePath)); } /** * Delete Verification Results if they exist. Required Access Level: VerifyEmails * @summary Delete File Verification Result * @param {string} id ID of the exported file * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof VerificationsApi */ verificationsFilesByIdDelete(id, options) { return exports.VerificationsApiFp(this.configuration).verificationsFilesByIdDelete(id, options).then((request) => request(this.axios, this.basePath)); } /** * Download verification results as a ZIP file. Required Access Level: VerifyEmails * @summary Download File Verification Result * @param {string} id Verification ID to download * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof VerificationsApi */ verificationsFilesByIdResultDownloadGet(id, options) { return exports.VerificationsApiFp(this.configuration).verificationsFilesByIdResultDownloadGet(id, options).then((request) => request(this.axios, this.basePath)); } /** * Returns status and results (if verified) of file with given ID. Required Access Level: VerifyEmails * @summary Get Detailed File Verification Result * @param {string} id ID of the Verification to display status of * @param {number} [limit] Maximum number of returned email verification results * @param {number} [offset] How many result items should be returned ahead * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof VerificationsApi */ verificationsFilesByIdResultGet(id, limit, offset, options) { return exports.VerificationsApiFp(this.configuration).verificationsFilesByIdResultGet(id, limit, offset, options).then((request) => request(this.axios, this.basePath)); } /** * Start a verification of the previously uploaded file with emails. Required Access Level: VerifyEmails * @summary Start verification * @param {string} id File ID to start verification * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof VerificationsApi */ verificationsFilesByIdVerificationPost(id, options) { return exports.VerificationsApiFp(this.configuration).verificationsFilesByIdVerificationPost(id, options).then((request) => request(this.axios, this.basePath)); } /** * Uploads a CSV file with list of emails that can then be triggered for verification. An \'email\' column is required. Required Access Level: VerifyEmails * @summary Upload File with Emails * @param {File} [file] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof VerificationsApi */ verificationsFilesPost(file, options) { return exports.VerificationsApiFp(this.configuration).verificationsFilesPost(file, options).then((request) => request(this.axios, this.basePath)); } /** * Returns a list of uploaded files, their statuses and results. Required Access Level: VerifyEmails * @summary Get Files Verification Results * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof VerificationsApi */ verificationsFilesResultGet(options) { return exports.VerificationsApiFp(this.configuration).verificationsFilesResultGet(options).then((request) => request(this.axios, this.basePath)); } /** * Returns a results of all verified single emails. Required Access Level: VerifyEmails * @summary Get Emails Verification Results * @param {number} [limit] Maximum number of returned items. * @param {number} [offset] How many items should be returned ahead. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof VerificationsApi */ verificationsGet(limit, offset, options) { return exports.VerificationsApiFp(this.configuration).verificationsGet(limit, offset, options).then((request) => request(this.axios, this.basePath)); } } exports.VerificationsApi = VerificationsApi;