@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.
731 lines (730 loc) • 42.4 kB
JavaScript
;
/* tslint:disable */
/* eslint-disable */
/**
* Elastic Email REST API
* This API is based on the REST API architecture, allowing the user to easily manage their data with this resource-based approach. Every API call is established on which specific request type (GET, POST, PUT, DELETE) will be used. The API has a limit of 20 concurrent connections and a hard timeout of 600 seconds per request. To start using this API, you will need your Access Token (available <a target=\"_blank\" href=\"https://app.elasticemail.com/marketing/settings/new/manage-api\">here</a>). Remember to keep it safe. Required access levels are listed in the given request’s description. Downloadable library clients can be found in our Github repository <a target=\"_blank\" href=\"https://github.com/ElasticEmail?tab=repositories&q=%22rest+api%22+in%3Areadme\">here</a>
*
* The version of the OpenAPI document: 4.0.0
* Contact: support@elasticemail.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.EventsApi = exports.EventsApiFactory = exports.EventsApiFp = exports.EventsApiAxiosParamCreator = void 0;
const axios_1 = require("axios");
// Some imports not used depending on template conditions
// @ts-ignore
const common_1 = require("../common");
// @ts-ignore
const base_1 = require("../base");
/**
* EventsApi - axios parameter creator
* @export
*/
exports.EventsApiAxiosParamCreator = function (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, from, to, orderBy, limit, offset, options = {}) => __awaiter(this, void 0, void 0, function* () {
// verify required parameter 'transactionid' is not null or undefined
common_1.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, common_1.DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
// authentication apikey required
yield common_1.setApiKeyToObject(localVarHeaderParameter, "X-ElasticEmail-ApiKey", configuration);
if (from !== undefined) {
localVarQueryParameter['from'] = (from instanceof Date) ?
from.toISOString() :
from;
}
if (to !== undefined) {
localVarQueryParameter['to'] = (to instanceof Date) ?
to.toISOString() :
to;
}
if (orderBy !== undefined) {
localVarQueryParameter['orderBy'] = orderBy;
}
if (limit !== undefined) {
localVarQueryParameter['limit'] = limit;
}
if (offset !== undefined) {
localVarQueryParameter['offset'] = offset;
}
common_1.setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
return {
url: common_1.toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
}),
/**
* 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, eventTypes, from, to, fileFormat, compressionFormat, fileName, options = {}) => __awaiter(this, void 0, void 0, function* () {
// verify required parameter 'name' is not null or undefined
common_1.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, common_1.DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
// authentication apikey required
yield common_1.setApiKeyToObject(localVarHeaderParameter, "X-ElasticEmail-ApiKey", configuration);
if (eventTypes) {
localVarQueryParameter['eventTypes'] = eventTypes;
}
if (from !== undefined) {
localVarQueryParameter['from'] = (from instanceof Date) ?
from.toISOString() :
from;
}
if (to !== undefined) {
localVarQueryParameter['to'] = (to instanceof Date) ?
to.toISOString() :
to;
}
if (fileFormat !== undefined) {
localVarQueryParameter['fileFormat'] = fileFormat;
}
if (compressionFormat !== undefined) {
localVarQueryParameter['compressionFormat'] = compressionFormat;
}
if (fileName !== undefined) {
localVarQueryParameter['fileName'] = fileName;
}
common_1.setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
return {
url: common_1.toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
}),
/**
* Returns a 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, eventTypes, from, to, orderBy, limit, offset, options = {}) => __awaiter(this, void 0, void 0, function* () {
// verify required parameter 'name' is not null or undefined
common_1.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, common_1.DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
// authentication apikey required
yield common_1.setApiKeyToObject(localVarHeaderParameter, "X-ElasticEmail-ApiKey", configuration);
if (eventTypes) {
localVarQueryParameter['eventTypes'] = eventTypes;
}
if (from !== undefined) {
localVarQueryParameter['from'] = (from instanceof Date) ?
from.toISOString() :
from;
}
if (to !== undefined) {
localVarQueryParameter['to'] = (to instanceof Date) ?
to.toISOString() :
to;
}
if (orderBy !== undefined) {
localVarQueryParameter['orderBy'] = orderBy;
}
if (limit !== undefined) {
localVarQueryParameter['limit'] = limit;
}
if (offset !== undefined) {
localVarQueryParameter['offset'] = offset;
}
common_1.setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
return {
url: common_1.toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
}),
/**
* 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, options = {}) => __awaiter(this, void 0, void 0, function* () {
// verify required parameter 'id' is not null or undefined
common_1.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, common_1.DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
// authentication apikey required
yield common_1.setApiKeyToObject(localVarHeaderParameter, "X-ElasticEmail-ApiKey", configuration);
common_1.setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
return {
url: common_1.toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
}),
/**
* 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, options = {}) => __awaiter(this, void 0, void 0, function* () {
// verify required parameter 'id' is not null or undefined
common_1.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, common_1.DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
// authentication apikey required
yield common_1.setApiKeyToObject(localVarHeaderParameter, "X-ElasticEmail-ApiKey", configuration);
common_1.setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
return {
url: common_1.toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
}),
/**
* 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, from, to, fileFormat, compressionFormat, fileName, options = {}) => __awaiter(this, void 0, void 0, function* () {
const localVarPath = `/events/export`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
// authentication apikey required
yield common_1.setApiKeyToObject(localVarHeaderParameter, "X-ElasticEmail-ApiKey", configuration);
if (eventTypes) {
localVarQueryParameter['eventTypes'] = eventTypes;
}
if (from !== undefined) {
localVarQueryParameter['from'] = (from instanceof Date) ?
from.toISOString() :
from;
}
if (to !== undefined) {
localVarQueryParameter['to'] = (to instanceof Date) ?
to.toISOString() :
to;
}
if (fileFormat !== undefined) {
localVarQueryParameter['fileFormat'] = fileFormat;
}
if (compressionFormat !== undefined) {
localVarQueryParameter['compressionFormat'] = compressionFormat;
}
if (fileName !== undefined) {
localVarQueryParameter['fileName'] = fileName;
}
common_1.setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
return {
url: common_1.toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
}),
/**
* Returns a 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, from, to, orderBy, limit, offset, options = {}) => __awaiter(this, void 0, void 0, function* () {
const localVarPath = `/events`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
// authentication apikey required
yield common_1.setApiKeyToObject(localVarHeaderParameter, "X-ElasticEmail-ApiKey", configuration);
if (eventTypes) {
localVarQueryParameter['eventTypes'] = eventTypes;
}
if (from !== undefined) {
localVarQueryParameter['from'] = (from instanceof Date) ?
from.toISOString() :
from;
}
if (to !== undefined) {
localVarQueryParameter['to'] = (to instanceof Date) ?
to.toISOString() :
to;
}
if (orderBy !== undefined) {
localVarQueryParameter['orderBy'] = orderBy;
}
if (limit !== undefined) {
localVarQueryParameter['limit'] = limit;
}
if (offset !== undefined) {
localVarQueryParameter['offset'] = offset;
}
common_1.setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
return {
url: common_1.toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
}),
};
};
/**
* EventsApi - functional programming interface
* @export
*/
exports.EventsApiFp = function (configuration) {
const localVarAxiosParamCreator = exports.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}
*/
eventsByTransactionidGet(transactionid, from, to, orderBy, limit, offset, options) {
return __awaiter(this, void 0, void 0, function* () {
const localVarAxiosArgs = yield localVarAxiosParamCreator.eventsByTransactionidGet(transactionid, from, to, orderBy, limit, offset, options);
return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.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}
*/
eventsChannelsByNameExportPost(name, eventTypes, from, to, fileFormat, compressionFormat, fileName, options) {
return __awaiter(this, void 0, void 0, function* () {
const localVarAxiosArgs = yield localVarAxiosParamCreator.eventsChannelsByNameExportPost(name, eventTypes, from, to, fileFormat, compressionFormat, fileName, options);
return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.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}
*/
eventsChannelsByNameGet(name, eventTypes, from, to, orderBy, limit, offset, options) {
return __awaiter(this, void 0, void 0, function* () {
const localVarAxiosArgs = yield localVarAxiosParamCreator.eventsChannelsByNameGet(name, eventTypes, from, to, orderBy, limit, offset, options);
return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.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}
*/
eventsChannelsExportByIdStatusGet(id, options) {
return __awaiter(this, void 0, void 0, function* () {
const localVarAxiosArgs = yield localVarAxiosParamCreator.eventsChannelsExportByIdStatusGet(id, options);
return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.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}
*/
eventsExportByIdStatusGet(id, options) {
return __awaiter(this, void 0, void 0, function* () {
const localVarAxiosArgs = yield localVarAxiosParamCreator.eventsExportByIdStatusGet(id, options);
return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.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}
*/
eventsExportPost(eventTypes, from, to, fileFormat, compressionFormat, fileName, options) {
return __awaiter(this, void 0, void 0, function* () {
const localVarAxiosArgs = yield localVarAxiosParamCreator.eventsExportPost(eventTypes, from, to, fileFormat, compressionFormat, fileName, options);
return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.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}
*/
eventsGet(eventTypes, from, to, orderBy, limit, offset, options) {
return __awaiter(this, void 0, void 0, function* () {
const localVarAxiosArgs = yield localVarAxiosParamCreator.eventsGet(eventTypes, from, to, orderBy, limit, offset, options);
return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
});
},
};
};
/**
* EventsApi - factory interface
* @export
*/
exports.EventsApiFactory = function (configuration, basePath, axios) {
const localVarFp = exports.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, from, to, orderBy, limit, offset, options) {
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, eventTypes, from, to, fileFormat, compressionFormat, fileName, options) {
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, eventTypes, from, to, orderBy, limit, offset, options) {
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, options) {
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, options) {
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, from, to, fileFormat, compressionFormat, fileName, options) {
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, from, to, orderBy, limit, offset, options) {
return localVarFp.eventsGet(eventTypes, from, to, orderBy, limit, offset, options).then((request) => request(axios, basePath));
},
};
};
/**
* EventsApi - object-oriented interface
* @export
* @class EventsApi
* @extends {BaseAPI}
*/
class EventsApi extends base_1.BaseAPI {
/**
* 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
*/
eventsByTransactionidGet(transactionid, from, to, orderBy, limit, offset, options) {
return exports.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
*/
eventsChannelsByNameExportPost(name, eventTypes, from, to, fileFormat, compressionFormat, fileName, options) {
return exports.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
*/
eventsChannelsByNameGet(name, eventTypes, from, to, orderBy, limit, offset, options) {
return exports.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
*/
eventsChannelsExportByIdStatusGet(id, options) {
return exports.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
*/
eventsExportByIdStatusGet(id, options) {
return exports.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
*/
eventsExportPost(eventTypes, from, to, fileFormat, compressionFormat, fileName, options) {
return exports.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
*/
eventsGet(eventTypes, from, to, orderBy, limit, offset, options) {
return exports.EventsApiFp(this.configuration).eventsGet(eventTypes, from, to, orderBy, limit, offset, options).then((request) => request(this.axios, this.basePath));
}
}
exports.EventsApi = EventsApi;