/* 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 here). 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 here * * 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. */ import type { Configuration } from '../configuration'; import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; import globalAxios from 'axios'; // Some imports not used depending on template conditions // @ts-ignore import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common'; // @ts-ignore import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base'; // @ts-ignore import type { EmailValidationResult } from '../ee-api-models'; // @ts-ignore import type { VerificationFileResult } from '../ee-api-models'; // @ts-ignore import type { VerificationFileResultDetails } from '../ee-api-models'; /** * VerificationsApi - axios parameter creator * @export */ export const VerificationsApiAxiosParamCreator = function (configuration?: 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: async (email: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'email' is not null or undefined 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, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication apikey required await setApiKeyToObject(localVarHeaderParameter, "X-ElasticEmail-ApiKey", configuration) setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Returns a result of verified email. Required Access Level: ViewVerifyEmails * @summary Get Email Verification Result * @param {string} email Email address to view verification result of * @param {*} [options] Override http request option. * @throws {RequiredError} */ verificationsByEmailGet: async (email: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'email' is not null or undefined 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, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication apikey required await setApiKeyToObject(localVarHeaderParameter, "X-ElasticEmail-ApiKey", configuration) setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: 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: async (email: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'email' is not null or undefined 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, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication apikey required await setApiKeyToObject(localVarHeaderParameter, "X-ElasticEmail-ApiKey", configuration) setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: 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: async (id: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'id' is not null or undefined 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, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication apikey required await setApiKeyToObject(localVarHeaderParameter, "X-ElasticEmail-ApiKey", configuration) setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Download verification results as a ZIP file. Required Access Level: ViewVerifyEmails * @summary Download File Verification Result * @param {string} id Verification ID to download * @param {*} [options] Override http request option. * @throws {RequiredError} */ verificationsFilesByIdResultDownloadGet: async (id: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'id' is not null or undefined 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, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication apikey required await setApiKeyToObject(localVarHeaderParameter, "X-ElasticEmail-ApiKey", configuration) setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Returns status and results (if verified) of file with given ID. Required Access Level: ViewVerifyEmails * @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: async (id: string, limit?: number, offset?: number, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'id' is not null or undefined 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, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication apikey required await setApiKeyToObject(localVarHeaderParameter, "X-ElasticEmail-ApiKey", configuration) if (limit !== undefined) { localVarQueryParameter['limit'] = limit; } if (offset !== undefined) { localVarQueryParameter['offset'] = offset; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: 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: async (id: string, options: RawAxiosRequestConfig = {}): Promise => { // verify required parameter 'id' is not null or undefined 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, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication apikey required await setApiKeyToObject(localVarHeaderParameter, "X-ElasticEmail-ApiKey", configuration) setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: 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: async (file?: File, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/verifications/files`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)(); // authentication apikey required await setApiKeyToObject(localVarHeaderParameter, "X-ElasticEmail-ApiKey", configuration) if (file !== undefined) { localVarFormParams.append('file', file as any); } localVarHeaderParameter['Content-Type'] = 'multipart/form-data'; setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; localVarRequestOptions.data = localVarFormParams; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Returns a list of uploaded files, their statuses and results. Required Access Level: ViewVerifyEmails * @summary Get Files Verification Results * @param {*} [options] Override http request option. * @throws {RequiredError} */ verificationsFilesResultGet: async (options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/verifications/files/result`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication apikey required await setApiKeyToObject(localVarHeaderParameter, "X-ElasticEmail-ApiKey", configuration) setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Returns a results of all verified single emails. Required Access Level: ViewVerifyEmails * @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: async (limit?: number, offset?: number, options: RawAxiosRequestConfig = {}): Promise => { const localVarPath = `/verifications`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; const localVarHeaderParameter = {} as any; const localVarQueryParameter = {} as any; // authentication apikey required await setApiKeyToObject(localVarHeaderParameter, "X-ElasticEmail-ApiKey", configuration) if (limit !== undefined) { localVarQueryParameter['limit'] = limit; } if (offset !== undefined) { localVarQueryParameter['offset'] = offset; } setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; return { url: toPathString(localVarUrlObj), options: localVarRequestOptions, }; }, } }; /** * VerificationsApi - functional programming interface * @export */ export const VerificationsApiFp = function(configuration?: Configuration) { const localVarAxiosParamCreator = 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} */ async verificationsByEmailDelete(email: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.verificationsByEmailDelete(email, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['VerificationsApi.verificationsByEmailDelete']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Returns a result of verified email. Required Access Level: ViewVerifyEmails * @summary Get Email Verification Result * @param {string} email Email address to view verification result of * @param {*} [options] Override http request option. * @throws {RequiredError} */ async verificationsByEmailGet(email: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.verificationsByEmailGet(email, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['VerificationsApi.verificationsByEmailGet']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || 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} */ async verificationsByEmailPost(email: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.verificationsByEmailPost(email, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['VerificationsApi.verificationsByEmailPost']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || 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} */ async verificationsFilesByIdDelete(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.verificationsFilesByIdDelete(id, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['VerificationsApi.verificationsFilesByIdDelete']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Download verification results as a ZIP file. Required Access Level: ViewVerifyEmails * @summary Download File Verification Result * @param {string} id Verification ID to download * @param {*} [options] Override http request option. * @throws {RequiredError} */ async verificationsFilesByIdResultDownloadGet(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.verificationsFilesByIdResultDownloadGet(id, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['VerificationsApi.verificationsFilesByIdResultDownloadGet']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Returns status and results (if verified) of file with given ID. Required Access Level: ViewVerifyEmails * @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} */ async verificationsFilesByIdResultGet(id: string, limit?: number, offset?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.verificationsFilesByIdResultGet(id, limit, offset, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['VerificationsApi.verificationsFilesByIdResultGet']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || 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} */ async verificationsFilesByIdVerificationPost(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.verificationsFilesByIdVerificationPost(id, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['VerificationsApi.verificationsFilesByIdVerificationPost']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || 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} */ async verificationsFilesPost(file?: File, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { const localVarAxiosArgs = await localVarAxiosParamCreator.verificationsFilesPost(file, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['VerificationsApi.verificationsFilesPost']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Returns a list of uploaded files, their statuses and results. Required Access Level: ViewVerifyEmails * @summary Get Files Verification Results * @param {*} [options] Override http request option. * @throws {RequiredError} */ async verificationsFilesResultGet(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.verificationsFilesResultGet(options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['VerificationsApi.verificationsFilesResultGet']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Returns a results of all verified single emails. Required Access Level: ViewVerifyEmails * @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} */ async verificationsGet(limit?: number, offset?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { const localVarAxiosArgs = await localVarAxiosParamCreator.verificationsGet(limit, offset, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['VerificationsApi.verificationsGet']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } }; /** * VerificationsApi - factory interface * @export */ export const VerificationsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { const localVarFp = 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: string, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.verificationsByEmailDelete(email, options).then((request) => request(axios, basePath)); }, /** * Returns a result of verified email. Required Access Level: ViewVerifyEmails * @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: string, options?: RawAxiosRequestConfig): AxiosPromise { 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: string, options?: RawAxiosRequestConfig): AxiosPromise { 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: string, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.verificationsFilesByIdDelete(id, options).then((request) => request(axios, basePath)); }, /** * Download verification results as a ZIP file. Required Access Level: ViewVerifyEmails * @summary Download File Verification Result * @param {string} id Verification ID to download * @param {*} [options] Override http request option. * @throws {RequiredError} */ verificationsFilesByIdResultDownloadGet(id: string, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.verificationsFilesByIdResultDownloadGet(id, options).then((request) => request(axios, basePath)); }, /** * Returns status and results (if verified) of file with given ID. Required Access Level: ViewVerifyEmails * @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: string, limit?: number, offset?: number, options?: RawAxiosRequestConfig): AxiosPromise { 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: string, options?: RawAxiosRequestConfig): AxiosPromise { 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?: File, options?: RawAxiosRequestConfig): AxiosPromise { return localVarFp.verificationsFilesPost(file, options).then((request) => request(axios, basePath)); }, /** * Returns a list of uploaded files, their statuses and results. Required Access Level: ViewVerifyEmails * @summary Get Files Verification Results * @param {*} [options] Override http request option. * @throws {RequiredError} */ verificationsFilesResultGet(options?: RawAxiosRequestConfig): AxiosPromise> { return localVarFp.verificationsFilesResultGet(options).then((request) => request(axios, basePath)); }, /** * Returns a results of all verified single emails. Required Access Level: ViewVerifyEmails * @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?: number, offset?: number, options?: RawAxiosRequestConfig): AxiosPromise> { return localVarFp.verificationsGet(limit, offset, options).then((request) => request(axios, basePath)); }, }; }; /** * VerificationsApi - interface * @export * @interface VerificationsApi */ export interface VerificationsApiInterface { /** * 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 VerificationsApiInterface */ verificationsByEmailDelete(email: string, options?: RawAxiosRequestConfig): AxiosPromise; /** * Returns a result of verified email. Required Access Level: ViewVerifyEmails * @summary Get Email Verification Result * @param {string} email Email address to view verification result of * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof VerificationsApiInterface */ verificationsByEmailGet(email: string, options?: RawAxiosRequestConfig): AxiosPromise; /** * 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 VerificationsApiInterface */ verificationsByEmailPost(email: string, options?: RawAxiosRequestConfig): AxiosPromise; /** * 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 VerificationsApiInterface */ verificationsFilesByIdDelete(id: string, options?: RawAxiosRequestConfig): AxiosPromise; /** * Download verification results as a ZIP file. Required Access Level: ViewVerifyEmails * @summary Download File Verification Result * @param {string} id Verification ID to download * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof VerificationsApiInterface */ verificationsFilesByIdResultDownloadGet(id: string, options?: RawAxiosRequestConfig): AxiosPromise; /** * Returns status and results (if verified) of file with given ID. Required Access Level: ViewVerifyEmails * @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 VerificationsApiInterface */ verificationsFilesByIdResultGet(id: string, limit?: number, offset?: number, options?: RawAxiosRequestConfig): AxiosPromise; /** * 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 VerificationsApiInterface */ verificationsFilesByIdVerificationPost(id: string, options?: RawAxiosRequestConfig): AxiosPromise; /** * 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 VerificationsApiInterface */ verificationsFilesPost(file?: File, options?: RawAxiosRequestConfig): AxiosPromise; /** * Returns a list of uploaded files, their statuses and results. Required Access Level: ViewVerifyEmails * @summary Get Files Verification Results * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof VerificationsApiInterface */ verificationsFilesResultGet(options?: RawAxiosRequestConfig): AxiosPromise>; /** * Returns a results of all verified single emails. Required Access Level: ViewVerifyEmails * @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 VerificationsApiInterface */ verificationsGet(limit?: number, offset?: number, options?: RawAxiosRequestConfig): AxiosPromise>; } /** * VerificationsApi - object-oriented interface * @export * @class VerificationsApi * @extends {BaseAPI} */ export class VerificationsApi extends BaseAPI implements VerificationsApiInterface { /** * 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 */ public verificationsByEmailDelete(email: string, options?: RawAxiosRequestConfig) { return VerificationsApiFp(this.configuration).verificationsByEmailDelete(email, options).then((request) => request(this.axios, this.basePath)); } /** * Returns a result of verified email. Required Access Level: ViewVerifyEmails * @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 */ public verificationsByEmailGet(email: string, options?: RawAxiosRequestConfig) { return 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 */ public verificationsByEmailPost(email: string, options?: RawAxiosRequestConfig) { return 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 */ public verificationsFilesByIdDelete(id: string, options?: RawAxiosRequestConfig) { return VerificationsApiFp(this.configuration).verificationsFilesByIdDelete(id, options).then((request) => request(this.axios, this.basePath)); } /** * Download verification results as a ZIP file. Required Access Level: ViewVerifyEmails * @summary Download File Verification Result * @param {string} id Verification ID to download * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof VerificationsApi */ public verificationsFilesByIdResultDownloadGet(id: string, options?: RawAxiosRequestConfig) { return 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: ViewVerifyEmails * @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 */ public verificationsFilesByIdResultGet(id: string, limit?: number, offset?: number, options?: RawAxiosRequestConfig) { return 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 */ public verificationsFilesByIdVerificationPost(id: string, options?: RawAxiosRequestConfig) { return 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 */ public verificationsFilesPost(file?: File, options?: RawAxiosRequestConfig) { return 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: ViewVerifyEmails * @summary Get Files Verification Results * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof VerificationsApi */ public verificationsFilesResultGet(options?: RawAxiosRequestConfig) { return VerificationsApiFp(this.configuration).verificationsFilesResultGet(options).then((request) => request(this.axios, this.basePath)); } /** * Returns a results of all verified single emails. Required Access Level: ViewVerifyEmails * @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 */ public verificationsGet(limit?: number, offset?: number, options?: RawAxiosRequestConfig) { return VerificationsApiFp(this.configuration).verificationsGet(limit, offset, options).then((request) => request(this.axios, this.basePath)); } }