/* 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 { CompressionFormat } from '../ee-api-models';
// @ts-ignore
import type { EventType } from '../ee-api-models';
// @ts-ignore
import type { EventsOrderBy } from '../ee-api-models';
// @ts-ignore
import type { ExportFileFormats } from '../ee-api-models';
// @ts-ignore
import type { ExportLink } from '../ee-api-models';
// @ts-ignore
import type { ExportStatus } from '../ee-api-models';
// @ts-ignore
import type { RecipientEvent } from '../ee-api-models';
/**
* EventsApi - axios parameter creator
* @export
*/
export const EventsApiAxiosParamCreator = function (configuration?: Configuration) {
return {
/**
* Returns a log of delivery events for the specific transaction ID. Required Access Level: ViewReports
* @summary Load Email Events
* @param {string} transactionid ID number of transaction
* @param {string | null} [from] Starting date for search in YYYY-MM-DDThh:mm:ss format.
* @param {string | null} [to] Ending date for search in YYYY-MM-DDThh:mm:ss format.
* @param {EventsOrderBy} [orderBy]
* @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}
*/
eventsByTransactionidGet: async (transactionid: string, from?: string | null, to?: string | null, orderBy?: EventsOrderBy, limit?: number, offset?: number, options: RawAxiosRequestConfig = {}): Promise => {
// verify required parameter 'transactionid' is not null or undefined
assertParamExists('eventsByTransactionidGet', 'transactionid', transactionid)
const localVarPath = `/events/{transactionid}`
.replace(`{${"transactionid"}}`, encodeURIComponent(String(transactionid)));
// 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 (from !== undefined) {
localVarQueryParameter['from'] = (from as any instanceof Date) ?
(from as any).toISOString() :
from;
}
if (to !== undefined) {
localVarQueryParameter['to'] = (to as any instanceof Date) ?
(to as any).toISOString() :
to;
}
if (orderBy !== undefined) {
localVarQueryParameter['orderBy'] = orderBy;
}
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,
};
},
/**
* Export delivery events log information to the specified file format. Required Access Level: Export
* @summary Export Channel Events
* @param {string} name Name of selected channel.
* @param {Array} [eventTypes] Types of Events to return
* @param {string | null} [from] Starting date for search in YYYY-MM-DDThh:mm:ss format.
* @param {string | null} [to] Ending date for search in YYYY-MM-DDThh:mm:ss format.
* @param {ExportFileFormats} [fileFormat] Format of the exported file
* @param {CompressionFormat} [compressionFormat] FileResponse compression format. None or Zip.
* @param {string} [fileName] Name of your file including extension.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
eventsChannelsByNameExportPost: async (name: string, eventTypes?: Array, from?: string | null, to?: string | null, fileFormat?: ExportFileFormats, compressionFormat?: CompressionFormat, fileName?: string, options: RawAxiosRequestConfig = {}): Promise => {
// verify required parameter 'name' is not null or undefined
assertParamExists('eventsChannelsByNameExportPost', 'name', name)
const localVarPath = `/events/channels/{name}/export`
.replace(`{${"name"}}`, encodeURIComponent(String(name)));
// 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)
if (eventTypes) {
localVarQueryParameter['eventTypes'] = eventTypes;
}
if (from !== undefined) {
localVarQueryParameter['from'] = (from as any instanceof Date) ?
(from as any).toISOString() :
from;
}
if (to !== undefined) {
localVarQueryParameter['to'] = (to as any instanceof Date) ?
(to as any).toISOString() :
to;
}
if (fileFormat !== undefined) {
localVarQueryParameter['fileFormat'] = fileFormat;
}
if (compressionFormat !== undefined) {
localVarQueryParameter['compressionFormat'] = compressionFormat;
}
if (fileName !== undefined) {
localVarQueryParameter['fileName'] = fileName;
}
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Returns a log of delivery events filtered by specified parameters. Required Access Level: ViewReports
* @summary Load Channel Events
* @param {string} name Name of selected channel.
* @param {Array} [eventTypes] Types of Events to return
* @param {string | null} [from] Starting date for search in YYYY-MM-DDThh:mm:ss format.
* @param {string | null} [to] Ending date for search in YYYY-MM-DDThh:mm:ss format.
* @param {EventsOrderBy} [orderBy]
* @param {number} [limit] How many items to load. Maximum for this request is 1000 items
* @param {number} [offset] How many items should be returned ahead.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
eventsChannelsByNameGet: async (name: string, eventTypes?: Array, from?: string | null, to?: string | null, orderBy?: EventsOrderBy, limit?: number, offset?: number, options: RawAxiosRequestConfig = {}): Promise => {
// verify required parameter 'name' is not null or undefined
assertParamExists('eventsChannelsByNameGet', 'name', name)
const localVarPath = `/events/channels/{name}`
.replace(`{${"name"}}`, encodeURIComponent(String(name)));
// 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 (eventTypes) {
localVarQueryParameter['eventTypes'] = eventTypes;
}
if (from !== undefined) {
localVarQueryParameter['from'] = (from as any instanceof Date) ?
(from as any).toISOString() :
from;
}
if (to !== undefined) {
localVarQueryParameter['to'] = (to as any instanceof Date) ?
(to as any).toISOString() :
to;
}
if (orderBy !== undefined) {
localVarQueryParameter['orderBy'] = orderBy;
}
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,
};
},
/**
* Check the current status of the channel export. Required Access Level: Export
* @summary Check Channel Export Status
* @param {string} id ID of the exported file
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
eventsChannelsExportByIdStatusGet: async (id: string, options: RawAxiosRequestConfig = {}): Promise => {
// verify required parameter 'id' is not null or undefined
assertParamExists('eventsChannelsExportByIdStatusGet', 'id', id)
const localVarPath = `/events/channels/export/{id}/status`
.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,
};
},
/**
* Check the current status of the export. Required Access Level: Export
* @summary Check Export Status
* @param {string} id ID of the exported file
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
eventsExportByIdStatusGet: async (id: string, options: RawAxiosRequestConfig = {}): Promise => {
// verify required parameter 'id' is not null or undefined
assertParamExists('eventsExportByIdStatusGet', 'id', id)
const localVarPath = `/events/export/{id}/status`
.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,
};
},
/**
* Export delivery events log information to the specified file format. Required Access Level: Export
* @summary Export Events
* @param {Array} [eventTypes] Types of Events to return
* @param {string | null} [from] Starting date for search in YYYY-MM-DDThh:mm:ss format.
* @param {string | null} [to] Ending date for search in YYYY-MM-DDThh:mm:ss format.
* @param {ExportFileFormats} [fileFormat] Format of the exported file
* @param {CompressionFormat} [compressionFormat] FileResponse compression format. None or Zip.
* @param {string} [fileName] Name of your file including extension.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
eventsExportPost: async (eventTypes?: Array, from?: string | null, to?: string | null, fileFormat?: ExportFileFormats, compressionFormat?: CompressionFormat, fileName?: string, options: RawAxiosRequestConfig = {}): Promise => {
const localVarPath = `/events/export`;
// 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)
if (eventTypes) {
localVarQueryParameter['eventTypes'] = eventTypes;
}
if (from !== undefined) {
localVarQueryParameter['from'] = (from as any instanceof Date) ?
(from as any).toISOString() :
from;
}
if (to !== undefined) {
localVarQueryParameter['to'] = (to as any instanceof Date) ?
(to as any).toISOString() :
to;
}
if (fileFormat !== undefined) {
localVarQueryParameter['fileFormat'] = fileFormat;
}
if (compressionFormat !== undefined) {
localVarQueryParameter['compressionFormat'] = compressionFormat;
}
if (fileName !== undefined) {
localVarQueryParameter['fileName'] = fileName;
}
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Returns a log of delivery events filtered by specified parameters. Required Access Level: ViewReports
* @summary Load Events
* @param {Array} [eventTypes] Types of Events to return
* @param {string | null} [from] Starting date for search in YYYY-MM-DDThh:mm:ss format.
* @param {string | null} [to] Ending date for search in YYYY-MM-DDThh:mm:ss format.
* @param {EventsOrderBy} [orderBy]
* @param {number} [limit] How many items to load. Maximum for this request is 1000 items
* @param {number} [offset] How many items should be returned ahead.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
eventsGet: async (eventTypes?: Array, from?: string | null, to?: string | null, orderBy?: EventsOrderBy, limit?: number, offset?: number, options: RawAxiosRequestConfig = {}): Promise => {
const localVarPath = `/events`;
// 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 (eventTypes) {
localVarQueryParameter['eventTypes'] = eventTypes;
}
if (from !== undefined) {
localVarQueryParameter['from'] = (from as any instanceof Date) ?
(from as any).toISOString() :
from;
}
if (to !== undefined) {
localVarQueryParameter['to'] = (to as any instanceof Date) ?
(to as any).toISOString() :
to;
}
if (orderBy !== undefined) {
localVarQueryParameter['orderBy'] = orderBy;
}
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,
};
},
}
};
/**
* EventsApi - functional programming interface
* @export
*/
export const EventsApiFp = function(configuration?: Configuration) {
const localVarAxiosParamCreator = EventsApiAxiosParamCreator(configuration)
return {
/**
* Returns a log of delivery events for the specific transaction ID. Required Access Level: ViewReports
* @summary Load Email Events
* @param {string} transactionid ID number of transaction
* @param {string | null} [from] Starting date for search in YYYY-MM-DDThh:mm:ss format.
* @param {string | null} [to] Ending date for search in YYYY-MM-DDThh:mm:ss format.
* @param {EventsOrderBy} [orderBy]
* @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 eventsByTransactionidGet(transactionid: string, from?: string | null, to?: string | null, orderBy?: EventsOrderBy, limit?: number, offset?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.eventsByTransactionidGet(transactionid, from, to, orderBy, limit, offset, options);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath = operationServerMap['EventsApi.eventsByTransactionidGet']?.[localVarOperationServerIndex]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
},
/**
* Export delivery events log information to the specified file format. Required Access Level: Export
* @summary Export Channel Events
* @param {string} name Name of selected channel.
* @param {Array} [eventTypes] Types of Events to return
* @param {string | null} [from] Starting date for search in YYYY-MM-DDThh:mm:ss format.
* @param {string | null} [to] Ending date for search in YYYY-MM-DDThh:mm:ss format.
* @param {ExportFileFormats} [fileFormat] Format of the exported file
* @param {CompressionFormat} [compressionFormat] FileResponse compression format. None or Zip.
* @param {string} [fileName] Name of your file including extension.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async eventsChannelsByNameExportPost(name: string, eventTypes?: Array, from?: string | null, to?: string | null, fileFormat?: ExportFileFormats, compressionFormat?: CompressionFormat, fileName?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> {
const localVarAxiosArgs = await localVarAxiosParamCreator.eventsChannelsByNameExportPost(name, eventTypes, from, to, fileFormat, compressionFormat, fileName, options);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath = operationServerMap['EventsApi.eventsChannelsByNameExportPost']?.[localVarOperationServerIndex]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
},
/**
* Returns a log of delivery events filtered by specified parameters. Required Access Level: ViewReports
* @summary Load Channel Events
* @param {string} name Name of selected channel.
* @param {Array} [eventTypes] Types of Events to return
* @param {string | null} [from] Starting date for search in YYYY-MM-DDThh:mm:ss format.
* @param {string | null} [to] Ending date for search in YYYY-MM-DDThh:mm:ss format.
* @param {EventsOrderBy} [orderBy]
* @param {number} [limit] How many items to load. Maximum for this request is 1000 items
* @param {number} [offset] How many items should be returned ahead.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async eventsChannelsByNameGet(name: string, eventTypes?: Array, from?: string | null, to?: string | null, orderBy?: EventsOrderBy, limit?: number, offset?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.eventsChannelsByNameGet(name, eventTypes, from, to, orderBy, limit, offset, options);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath = operationServerMap['EventsApi.eventsChannelsByNameGet']?.[localVarOperationServerIndex]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
},
/**
* Check the current status of the channel export. Required Access Level: Export
* @summary Check Channel Export Status
* @param {string} id ID of the exported file
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async eventsChannelsExportByIdStatusGet(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> {
const localVarAxiosArgs = await localVarAxiosParamCreator.eventsChannelsExportByIdStatusGet(id, options);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath = operationServerMap['EventsApi.eventsChannelsExportByIdStatusGet']?.[localVarOperationServerIndex]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
},
/**
* Check the current status of the export. Required Access Level: Export
* @summary Check Export Status
* @param {string} id ID of the exported file
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async eventsExportByIdStatusGet(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> {
const localVarAxiosArgs = await localVarAxiosParamCreator.eventsExportByIdStatusGet(id, options);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath = operationServerMap['EventsApi.eventsExportByIdStatusGet']?.[localVarOperationServerIndex]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
},
/**
* Export delivery events log information to the specified file format. Required Access Level: Export
* @summary Export Events
* @param {Array} [eventTypes] Types of Events to return
* @param {string | null} [from] Starting date for search in YYYY-MM-DDThh:mm:ss format.
* @param {string | null} [to] Ending date for search in YYYY-MM-DDThh:mm:ss format.
* @param {ExportFileFormats} [fileFormat] Format of the exported file
* @param {CompressionFormat} [compressionFormat] FileResponse compression format. None or Zip.
* @param {string} [fileName] Name of your file including extension.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async eventsExportPost(eventTypes?: Array, from?: string | null, to?: string | null, fileFormat?: ExportFileFormats, compressionFormat?: CompressionFormat, fileName?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> {
const localVarAxiosArgs = await localVarAxiosParamCreator.eventsExportPost(eventTypes, from, to, fileFormat, compressionFormat, fileName, options);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath = operationServerMap['EventsApi.eventsExportPost']?.[localVarOperationServerIndex]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
},
/**
* Returns a log of delivery events filtered by specified parameters. Required Access Level: ViewReports
* @summary Load Events
* @param {Array} [eventTypes] Types of Events to return
* @param {string | null} [from] Starting date for search in YYYY-MM-DDThh:mm:ss format.
* @param {string | null} [to] Ending date for search in YYYY-MM-DDThh:mm:ss format.
* @param {EventsOrderBy} [orderBy]
* @param {number} [limit] How many items to load. Maximum for this request is 1000 items
* @param {number} [offset] How many items should be returned ahead.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async eventsGet(eventTypes?: Array, from?: string | null, to?: string | null, orderBy?: EventsOrderBy, limit?: number, offset?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.eventsGet(eventTypes, from, to, orderBy, limit, offset, options);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath = operationServerMap['EventsApi.eventsGet']?.[localVarOperationServerIndex]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
},
}
};
/**
* EventsApi - factory interface
* @export
*/
export const EventsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
const localVarFp = EventsApiFp(configuration)
return {
/**
* Returns a log of delivery events for the specific transaction ID. Required Access Level: ViewReports
* @summary Load Email Events
* @param {string} transactionid ID number of transaction
* @param {string | null} [from] Starting date for search in YYYY-MM-DDThh:mm:ss format.
* @param {string | null} [to] Ending date for search in YYYY-MM-DDThh:mm:ss format.
* @param {EventsOrderBy} [orderBy]
* @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}
*/
eventsByTransactionidGet(transactionid: string, from?: string | null, to?: string | null, orderBy?: EventsOrderBy, limit?: number, offset?: number, options?: RawAxiosRequestConfig): AxiosPromise> {
return localVarFp.eventsByTransactionidGet(transactionid, from, to, orderBy, limit, offset, options).then((request) => request(axios, basePath));
},
/**
* Export delivery events log information to the specified file format. Required Access Level: Export
* @summary Export Channel Events
* @param {string} name Name of selected channel.
* @param {Array} [eventTypes] Types of Events to return
* @param {string | null} [from] Starting date for search in YYYY-MM-DDThh:mm:ss format.
* @param {string | null} [to] Ending date for search in YYYY-MM-DDThh:mm:ss format.
* @param {ExportFileFormats} [fileFormat] Format of the exported file
* @param {CompressionFormat} [compressionFormat] FileResponse compression format. None or Zip.
* @param {string} [fileName] Name of your file including extension.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
eventsChannelsByNameExportPost(name: string, eventTypes?: Array, from?: string | null, to?: string | null, fileFormat?: ExportFileFormats, compressionFormat?: CompressionFormat, fileName?: string, options?: RawAxiosRequestConfig): AxiosPromise {
return localVarFp.eventsChannelsByNameExportPost(name, eventTypes, from, to, fileFormat, compressionFormat, fileName, options).then((request) => request(axios, basePath));
},
/**
* Returns a log of delivery events filtered by specified parameters. Required Access Level: ViewReports
* @summary Load Channel Events
* @param {string} name Name of selected channel.
* @param {Array} [eventTypes] Types of Events to return
* @param {string | null} [from] Starting date for search in YYYY-MM-DDThh:mm:ss format.
* @param {string | null} [to] Ending date for search in YYYY-MM-DDThh:mm:ss format.
* @param {EventsOrderBy} [orderBy]
* @param {number} [limit] How many items to load. Maximum for this request is 1000 items
* @param {number} [offset] How many items should be returned ahead.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
eventsChannelsByNameGet(name: string, eventTypes?: Array, from?: string | null, to?: string | null, orderBy?: EventsOrderBy, limit?: number, offset?: number, options?: RawAxiosRequestConfig): AxiosPromise> {
return localVarFp.eventsChannelsByNameGet(name, eventTypes, from, to, orderBy, limit, offset, options).then((request) => request(axios, basePath));
},
/**
* Check the current status of the channel export. Required Access Level: Export
* @summary Check Channel Export Status
* @param {string} id ID of the exported file
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
eventsChannelsExportByIdStatusGet(id: string, options?: RawAxiosRequestConfig): AxiosPromise {
return localVarFp.eventsChannelsExportByIdStatusGet(id, options).then((request) => request(axios, basePath));
},
/**
* Check the current status of the export. Required Access Level: Export
* @summary Check Export Status
* @param {string} id ID of the exported file
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
eventsExportByIdStatusGet(id: string, options?: RawAxiosRequestConfig): AxiosPromise {
return localVarFp.eventsExportByIdStatusGet(id, options).then((request) => request(axios, basePath));
},
/**
* Export delivery events log information to the specified file format. Required Access Level: Export
* @summary Export Events
* @param {Array} [eventTypes] Types of Events to return
* @param {string | null} [from] Starting date for search in YYYY-MM-DDThh:mm:ss format.
* @param {string | null} [to] Ending date for search in YYYY-MM-DDThh:mm:ss format.
* @param {ExportFileFormats} [fileFormat] Format of the exported file
* @param {CompressionFormat} [compressionFormat] FileResponse compression format. None or Zip.
* @param {string} [fileName] Name of your file including extension.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
eventsExportPost(eventTypes?: Array, from?: string | null, to?: string | null, fileFormat?: ExportFileFormats, compressionFormat?: CompressionFormat, fileName?: string, options?: RawAxiosRequestConfig): AxiosPromise {
return localVarFp.eventsExportPost(eventTypes, from, to, fileFormat, compressionFormat, fileName, options).then((request) => request(axios, basePath));
},
/**
* Returns a log of delivery events filtered by specified parameters. Required Access Level: ViewReports
* @summary Load Events
* @param {Array} [eventTypes] Types of Events to return
* @param {string | null} [from] Starting date for search in YYYY-MM-DDThh:mm:ss format.
* @param {string | null} [to] Ending date for search in YYYY-MM-DDThh:mm:ss format.
* @param {EventsOrderBy} [orderBy]
* @param {number} [limit] How many items to load. Maximum for this request is 1000 items
* @param {number} [offset] How many items should be returned ahead.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
eventsGet(eventTypes?: Array, from?: string | null, to?: string | null, orderBy?: EventsOrderBy, limit?: number, offset?: number, options?: RawAxiosRequestConfig): AxiosPromise> {
return localVarFp.eventsGet(eventTypes, from, to, orderBy, limit, offset, options).then((request) => request(axios, basePath));
},
};
};
/**
* EventsApi - interface
* @export
* @interface EventsApi
*/
export interface EventsApiInterface {
/**
* Returns a log of delivery events for the specific transaction ID. Required Access Level: ViewReports
* @summary Load Email Events
* @param {string} transactionid ID number of transaction
* @param {string | null} [from] Starting date for search in YYYY-MM-DDThh:mm:ss format.
* @param {string | null} [to] Ending date for search in YYYY-MM-DDThh:mm:ss format.
* @param {EventsOrderBy} [orderBy]
* @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 EventsApiInterface
*/
eventsByTransactionidGet(transactionid: string, from?: string | null, to?: string | null, orderBy?: EventsOrderBy, limit?: number, offset?: number, options?: RawAxiosRequestConfig): AxiosPromise>;
/**
* Export delivery events log information to the specified file format. Required Access Level: Export
* @summary Export Channel Events
* @param {string} name Name of selected channel.
* @param {Array} [eventTypes] Types of Events to return
* @param {string | null} [from] Starting date for search in YYYY-MM-DDThh:mm:ss format.
* @param {string | null} [to] Ending date for search in YYYY-MM-DDThh:mm:ss format.
* @param {ExportFileFormats} [fileFormat] Format of the exported file
* @param {CompressionFormat} [compressionFormat] FileResponse compression format. None or Zip.
* @param {string} [fileName] Name of your file including extension.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof EventsApiInterface
*/
eventsChannelsByNameExportPost(name: string, eventTypes?: Array, from?: string | null, to?: string | null, fileFormat?: ExportFileFormats, compressionFormat?: CompressionFormat, fileName?: string, options?: RawAxiosRequestConfig): AxiosPromise;
/**
* Returns a log of delivery events filtered by specified parameters. Required Access Level: ViewReports
* @summary Load Channel Events
* @param {string} name Name of selected channel.
* @param {Array} [eventTypes] Types of Events to return
* @param {string | null} [from] Starting date for search in YYYY-MM-DDThh:mm:ss format.
* @param {string | null} [to] Ending date for search in YYYY-MM-DDThh:mm:ss format.
* @param {EventsOrderBy} [orderBy]
* @param {number} [limit] How many items to load. Maximum for this request is 1000 items
* @param {number} [offset] How many items should be returned ahead.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof EventsApiInterface
*/
eventsChannelsByNameGet(name: string, eventTypes?: Array, from?: string | null, to?: string | null, orderBy?: EventsOrderBy, limit?: number, offset?: number, options?: RawAxiosRequestConfig): AxiosPromise>;
/**
* Check the current status of the channel export. Required Access Level: Export
* @summary Check Channel Export Status
* @param {string} id ID of the exported file
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof EventsApiInterface
*/
eventsChannelsExportByIdStatusGet(id: string, options?: RawAxiosRequestConfig): AxiosPromise;
/**
* Check the current status of the export. Required Access Level: Export
* @summary Check Export Status
* @param {string} id ID of the exported file
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof EventsApiInterface
*/
eventsExportByIdStatusGet(id: string, options?: RawAxiosRequestConfig): AxiosPromise;
/**
* Export delivery events log information to the specified file format. Required Access Level: Export
* @summary Export Events
* @param {Array} [eventTypes] Types of Events to return
* @param {string | null} [from] Starting date for search in YYYY-MM-DDThh:mm:ss format.
* @param {string | null} [to] Ending date for search in YYYY-MM-DDThh:mm:ss format.
* @param {ExportFileFormats} [fileFormat] Format of the exported file
* @param {CompressionFormat} [compressionFormat] FileResponse compression format. None or Zip.
* @param {string} [fileName] Name of your file including extension.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof EventsApiInterface
*/
eventsExportPost(eventTypes?: Array, from?: string | null, to?: string | null, fileFormat?: ExportFileFormats, compressionFormat?: CompressionFormat, fileName?: string, options?: RawAxiosRequestConfig): AxiosPromise;
/**
* Returns a log of delivery events filtered by specified parameters. Required Access Level: ViewReports
* @summary Load Events
* @param {Array} [eventTypes] Types of Events to return
* @param {string | null} [from] Starting date for search in YYYY-MM-DDThh:mm:ss format.
* @param {string | null} [to] Ending date for search in YYYY-MM-DDThh:mm:ss format.
* @param {EventsOrderBy} [orderBy]
* @param {number} [limit] How many items to load. Maximum for this request is 1000 items
* @param {number} [offset] How many items should be returned ahead.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof EventsApiInterface
*/
eventsGet(eventTypes?: Array, from?: string | null, to?: string | null, orderBy?: EventsOrderBy, limit?: number, offset?: number, options?: RawAxiosRequestConfig): AxiosPromise>;
}
/**
* EventsApi - object-oriented interface
* @export
* @class EventsApi
* @extends {BaseAPI}
*/
export class EventsApi extends BaseAPI implements EventsApiInterface {
/**
* Returns a log of delivery events for the specific transaction ID. Required Access Level: ViewReports
* @summary Load Email Events
* @param {string} transactionid ID number of transaction
* @param {string | null} [from] Starting date for search in YYYY-MM-DDThh:mm:ss format.
* @param {string | null} [to] Ending date for search in YYYY-MM-DDThh:mm:ss format.
* @param {EventsOrderBy} [orderBy]
* @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 EventsApi
*/
public eventsByTransactionidGet(transactionid: string, from?: string | null, to?: string | null, orderBy?: EventsOrderBy, limit?: number, offset?: number, options?: RawAxiosRequestConfig) {
return EventsApiFp(this.configuration).eventsByTransactionidGet(transactionid, from, to, orderBy, limit, offset, options).then((request) => request(this.axios, this.basePath));
}
/**
* Export delivery events log information to the specified file format. Required Access Level: Export
* @summary Export Channel Events
* @param {string} name Name of selected channel.
* @param {Array} [eventTypes] Types of Events to return
* @param {string | null} [from] Starting date for search in YYYY-MM-DDThh:mm:ss format.
* @param {string | null} [to] Ending date for search in YYYY-MM-DDThh:mm:ss format.
* @param {ExportFileFormats} [fileFormat] Format of the exported file
* @param {CompressionFormat} [compressionFormat] FileResponse compression format. None or Zip.
* @param {string} [fileName] Name of your file including extension.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof EventsApi
*/
public eventsChannelsByNameExportPost(name: string, eventTypes?: Array, from?: string | null, to?: string | null, fileFormat?: ExportFileFormats, compressionFormat?: CompressionFormat, fileName?: string, options?: RawAxiosRequestConfig) {
return EventsApiFp(this.configuration).eventsChannelsByNameExportPost(name, eventTypes, from, to, fileFormat, compressionFormat, fileName, options).then((request) => request(this.axios, this.basePath));
}
/**
* Returns a log of delivery events filtered by specified parameters. Required Access Level: ViewReports
* @summary Load Channel Events
* @param {string} name Name of selected channel.
* @param {Array} [eventTypes] Types of Events to return
* @param {string | null} [from] Starting date for search in YYYY-MM-DDThh:mm:ss format.
* @param {string | null} [to] Ending date for search in YYYY-MM-DDThh:mm:ss format.
* @param {EventsOrderBy} [orderBy]
* @param {number} [limit] How many items to load. Maximum for this request is 1000 items
* @param {number} [offset] How many items should be returned ahead.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof EventsApi
*/
public eventsChannelsByNameGet(name: string, eventTypes?: Array, from?: string | null, to?: string | null, orderBy?: EventsOrderBy, limit?: number, offset?: number, options?: RawAxiosRequestConfig) {
return EventsApiFp(this.configuration).eventsChannelsByNameGet(name, eventTypes, from, to, orderBy, limit, offset, options).then((request) => request(this.axios, this.basePath));
}
/**
* Check the current status of the channel export. Required Access Level: Export
* @summary Check Channel Export Status
* @param {string} id ID of the exported file
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof EventsApi
*/
public eventsChannelsExportByIdStatusGet(id: string, options?: RawAxiosRequestConfig) {
return EventsApiFp(this.configuration).eventsChannelsExportByIdStatusGet(id, options).then((request) => request(this.axios, this.basePath));
}
/**
* Check the current status of the export. Required Access Level: Export
* @summary Check Export Status
* @param {string} id ID of the exported file
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof EventsApi
*/
public eventsExportByIdStatusGet(id: string, options?: RawAxiosRequestConfig) {
return EventsApiFp(this.configuration).eventsExportByIdStatusGet(id, options).then((request) => request(this.axios, this.basePath));
}
/**
* Export delivery events log information to the specified file format. Required Access Level: Export
* @summary Export Events
* @param {Array} [eventTypes] Types of Events to return
* @param {string | null} [from] Starting date for search in YYYY-MM-DDThh:mm:ss format.
* @param {string | null} [to] Ending date for search in YYYY-MM-DDThh:mm:ss format.
* @param {ExportFileFormats} [fileFormat] Format of the exported file
* @param {CompressionFormat} [compressionFormat] FileResponse compression format. None or Zip.
* @param {string} [fileName] Name of your file including extension.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof EventsApi
*/
public eventsExportPost(eventTypes?: Array, from?: string | null, to?: string | null, fileFormat?: ExportFileFormats, compressionFormat?: CompressionFormat, fileName?: string, options?: RawAxiosRequestConfig) {
return EventsApiFp(this.configuration).eventsExportPost(eventTypes, from, to, fileFormat, compressionFormat, fileName, options).then((request) => request(this.axios, this.basePath));
}
/**
* Returns a log of delivery events filtered by specified parameters. Required Access Level: ViewReports
* @summary Load Events
* @param {Array} [eventTypes] Types of Events to return
* @param {string | null} [from] Starting date for search in YYYY-MM-DDThh:mm:ss format.
* @param {string | null} [to] Ending date for search in YYYY-MM-DDThh:mm:ss format.
* @param {EventsOrderBy} [orderBy]
* @param {number} [limit] How many items to load. Maximum for this request is 1000 items
* @param {number} [offset] How many items should be returned ahead.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof EventsApi
*/
public eventsGet(eventTypes?: Array, from?: string | null, to?: string | null, orderBy?: EventsOrderBy, limit?: number, offset?: number, options?: RawAxiosRequestConfig) {
return EventsApiFp(this.configuration).eventsGet(eventTypes, from, to, orderBy, limit, offset, options).then((request) => request(this.axios, this.basePath));
}
}