@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.
907 lines (816 loc) • 50 kB
text/typescript
/* 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.
*/
import type { Configuration } from '../configuration';
import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } 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, RequestArgs, BaseAPI, RequiredError } from '../base';
// @ts-ignore
import { CompressionFormat } from '../ee-api-models';
// @ts-ignore
import { EventType } from '../ee-api-models';
// @ts-ignore
import { EventsOrderBy } from '../ee-api-models';
// @ts-ignore
import { ExportFileFormats } from '../ee-api-models';
// @ts-ignore
import { ExportLink } from '../ee-api-models';
// @ts-ignore
import { ExportStatus } from '../ee-api-models';
// @ts-ignore
import { 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} [from] Starting date for search in YYYY-MM-DDThh:mm:ss format.
* @param {string} [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, to?: string, orderBy?: EventsOrderBy, limit?: number, offset?: number, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
// 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<EventType>} [eventTypes] Types of Events to return
* @param {string} [from] Starting date for search in YYYY-MM-DDThh:mm:ss format.
* @param {string} [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<EventType>, from?: string, to?: string, fileFormat?: ExportFileFormats, compressionFormat?: CompressionFormat, fileName?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
// 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<EventType>} [eventTypes] Types of Events to return
* @param {string} [from] Starting date for search in YYYY-MM-DDThh:mm:ss format.
* @param {string} [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<EventType>, from?: string, to?: string, orderBy?: EventsOrderBy, limit?: number, offset?: number, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
// 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: AxiosRequestConfig = {}): Promise<RequestArgs> => {
// 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: AxiosRequestConfig = {}): Promise<RequestArgs> => {
// 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<EventType>} [eventTypes] Types of Events to return
* @param {string} [from] Starting date for search in YYYY-MM-DDThh:mm:ss format.
* @param {string} [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<EventType>, from?: string, to?: string, fileFormat?: ExportFileFormats, compressionFormat?: CompressionFormat, fileName?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
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<EventType>} [eventTypes] Types of Events to return
* @param {string} [from] Starting date for search in YYYY-MM-DDThh:mm:ss format.
* @param {string} [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<EventType>, from?: string, to?: string, orderBy?: EventsOrderBy, limit?: number, offset?: number, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
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} [from] Starting date for search in YYYY-MM-DDThh:mm:ss format.
* @param {string} [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, to?: string, orderBy?: EventsOrderBy, limit?: number, offset?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<RecipientEvent>>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.eventsByTransactionidGet(transactionid, from, to, orderBy, limit, offset, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
* 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<EventType>} [eventTypes] Types of Events to return
* @param {string} [from] Starting date for search in YYYY-MM-DDThh:mm:ss format.
* @param {string} [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<EventType>, from?: string, to?: string, fileFormat?: ExportFileFormats, compressionFormat?: CompressionFormat, fileName?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ExportLink>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.eventsChannelsByNameExportPost(name, eventTypes, from, to, fileFormat, compressionFormat, fileName, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
* 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<EventType>} [eventTypes] Types of Events to return
* @param {string} [from] Starting date for search in YYYY-MM-DDThh:mm:ss format.
* @param {string} [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<EventType>, from?: string, to?: string, orderBy?: EventsOrderBy, limit?: number, offset?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<RecipientEvent>>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.eventsChannelsByNameGet(name, eventTypes, from, to, orderBy, limit, offset, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
* 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?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ExportStatus>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.eventsChannelsExportByIdStatusGet(id, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
* 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?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ExportStatus>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.eventsExportByIdStatusGet(id, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
* Export delivery events log information to the specified file format. Required Access Level: Export
* @summary Export Events
* @param {Array<EventType>} [eventTypes] Types of Events to return
* @param {string} [from] Starting date for search in YYYY-MM-DDThh:mm:ss format.
* @param {string} [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<EventType>, from?: string, to?: string, fileFormat?: ExportFileFormats, compressionFormat?: CompressionFormat, fileName?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ExportLink>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.eventsExportPost(eventTypes, from, to, fileFormat, compressionFormat, fileName, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
* Returns a log of delivery events filtered by specified parameters. Required Access Level: ViewReports
* @summary Load Events
* @param {Array<EventType>} [eventTypes] Types of Events to return
* @param {string} [from] Starting date for search in YYYY-MM-DDThh:mm:ss format.
* @param {string} [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<EventType>, from?: string, to?: string, orderBy?: EventsOrderBy, limit?: number, offset?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<RecipientEvent>>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.eventsGet(eventTypes, from, to, orderBy, limit, offset, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
}
};
/**
* 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} [from] Starting date for search in YYYY-MM-DDThh:mm:ss format.
* @param {string} [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, to?: string, orderBy?: EventsOrderBy, limit?: number, offset?: number, options?: any): AxiosPromise<Array<RecipientEvent>> {
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<EventType>} [eventTypes] Types of Events to return
* @param {string} [from] Starting date for search in YYYY-MM-DDThh:mm:ss format.
* @param {string} [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<EventType>, from?: string, to?: string, fileFormat?: ExportFileFormats, compressionFormat?: CompressionFormat, fileName?: string, options?: any): AxiosPromise<ExportLink> {
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<EventType>} [eventTypes] Types of Events to return
* @param {string} [from] Starting date for search in YYYY-MM-DDThh:mm:ss format.
* @param {string} [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<EventType>, from?: string, to?: string, orderBy?: EventsOrderBy, limit?: number, offset?: number, options?: any): AxiosPromise<Array<RecipientEvent>> {
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?: any): AxiosPromise<ExportStatus> {
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?: any): AxiosPromise<ExportStatus> {
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<EventType>} [eventTypes] Types of Events to return
* @param {string} [from] Starting date for search in YYYY-MM-DDThh:mm:ss format.
* @param {string} [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<EventType>, from?: string, to?: string, fileFormat?: ExportFileFormats, compressionFormat?: CompressionFormat, fileName?: string, options?: any): AxiosPromise<ExportLink> {
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<EventType>} [eventTypes] Types of Events to return
* @param {string} [from] Starting date for search in YYYY-MM-DDThh:mm:ss format.
* @param {string} [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<EventType>, from?: string, to?: string, orderBy?: EventsOrderBy, limit?: number, offset?: number, options?: any): AxiosPromise<Array<RecipientEvent>> {
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} [from] Starting date for search in YYYY-MM-DDThh:mm:ss format.
* @param {string} [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, to?: string, orderBy?: EventsOrderBy, limit?: number, offset?: number, options?: AxiosRequestConfig): AxiosPromise<Array<RecipientEvent>>;
/**
* 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<EventType>} [eventTypes] Types of Events to return
* @param {string} [from] Starting date for search in YYYY-MM-DDThh:mm:ss format.
* @param {string} [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<EventType>, from?: string, to?: string, fileFormat?: ExportFileFormats, compressionFormat?: CompressionFormat, fileName?: string, options?: AxiosRequestConfig): AxiosPromise<ExportLink>;
/**
* 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<EventType>} [eventTypes] Types of Events to return
* @param {string} [from] Starting date for search in YYYY-MM-DDThh:mm:ss format.
* @param {string} [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<EventType>, from?: string, to?: string, orderBy?: EventsOrderBy, limit?: number, offset?: number, options?: AxiosRequestConfig): AxiosPromise<Array<RecipientEvent>>;
/**
* 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?: AxiosRequestConfig): AxiosPromise<ExportStatus>;
/**
* 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?: AxiosRequestConfig): AxiosPromise<ExportStatus>;
/**
* Export delivery events log information to the specified file format. Required Access Level: Export
* @summary Export Events
* @param {Array<EventType>} [eventTypes] Types of Events to return
* @param {string} [from] Starting date for search in YYYY-MM-DDThh:mm:ss format.
* @param {string} [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<EventType>, from?: string, to?: string, fileFormat?: ExportFileFormats, compressionFormat?: CompressionFormat, fileName?: string, options?: AxiosRequestConfig): AxiosPromise<ExportLink>;
/**
* Returns a log of delivery events filtered by specified parameters. Required Access Level: ViewReports
* @summary Load Events
* @param {Array<EventType>} [eventTypes] Types of Events to return
* @param {string} [from] Starting date for search in YYYY-MM-DDThh:mm:ss format.
* @param {string} [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<EventType>, from?: string, to?: string, orderBy?: EventsOrderBy, limit?: number, offset?: number, options?: AxiosRequestConfig): AxiosPromise<Array<RecipientEvent>>;
}
/**
* 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} [from] Starting date for search in YYYY-MM-DDThh:mm:ss format.
* @param {string} [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, to?: string, orderBy?: EventsOrderBy, limit?: number, offset?: number, options?: AxiosRequestConfig) {
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<EventType>} [eventTypes] Types of Events to return
* @param {string} [from] Starting date for search in YYYY-MM-DDThh:mm:ss format.
* @param {string} [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<EventType>, from?: string, to?: string, fileFormat?: ExportFileFormats, compressionFormat?: CompressionFormat, fileName?: string, options?: AxiosRequestConfig) {
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<EventType>} [eventTypes] Types of Events to return
* @param {string} [from] Starting date for search in YYYY-MM-DDThh:mm:ss format.
* @param {string} [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<EventType>, from?: string, to?: string, orderBy?: EventsOrderBy, limit?: number, offset?: number, options?: AxiosRequestConfig) {
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?: AxiosRequestConfig) {
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?: AxiosRequestConfig) {
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<EventType>} [eventTypes] Types of Events to return
* @param {string} [from] Starting date for search in YYYY-MM-DDThh:mm:ss format.
* @param {string} [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<EventType>, from?: string, to?: string, fileFormat?: ExportFileFormats, compressionFormat?: CompressionFormat, fileName?: string, options?: AxiosRequestConfig) {
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<EventType>} [eventTypes] Types of Events to return
* @param {string} [from] Starting date for search in YYYY-MM-DDThh:mm:ss format.
* @param {string} [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<EventType>, from?: string, to?: string, orderBy?: EventsOrderBy, limit?: number, offset?: number, options?: AxiosRequestConfig) {
return EventsApiFp(this.configuration).eventsGet(eventTypes, from, to, orderBy, limit, offset, options).then((request) => request(this.axios, this.basePath));
}
}