@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.
763 lines (762 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.SecurityApi = exports.SecurityApiFactory = exports.SecurityApiFp = exports.SecurityApiAxiosParamCreator = 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");
/**
* SecurityApi - axios parameter creator
* @export
*/
exports.SecurityApiAxiosParamCreator = function (configuration) {
return {
/**
* Delete your existing ApiKey. Required Access Level: Security
* @summary Delete ApiKey
* @param {string} name Name of the ApiKey
* @param {string} [subaccount] Email of the subaccount of which ApiKey should be deleted
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
securityApikeysByNameDelete: (name, subaccount, options = {}) => __awaiter(this, void 0, void 0, function* () {
// verify required parameter 'name' is not null or undefined
common_1.assertParamExists('securityApikeysByNameDelete', 'name', name);
const localVarPath = `/security/apikeys/{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: 'DELETE' }, baseOptions), options);
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
// authentication apikey required
yield common_1.setApiKeyToObject(localVarHeaderParameter, "X-ElasticEmail-ApiKey", configuration);
if (subaccount !== undefined) {
localVarQueryParameter['subaccount'] = subaccount;
}
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,
};
}),
/**
* Load your existing ApiKey info. Required Access Level: Security
* @summary Load ApiKey
* @param {string} name Name of the ApiKey
* @param {string} [subaccount] Email of the subaccount of which ApiKey should be loaded
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
securityApikeysByNameGet: (name, subaccount, options = {}) => __awaiter(this, void 0, void 0, function* () {
// verify required parameter 'name' is not null or undefined
common_1.assertParamExists('securityApikeysByNameGet', 'name', name);
const localVarPath = `/security/apikeys/{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 (subaccount !== undefined) {
localVarQueryParameter['subaccount'] = subaccount;
}
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,
};
}),
/**
* Update your existing ApiKey. Required Access Level: Security
* @summary Update ApiKey
* @param {string} name Name of the ApiKey
* @param {ApiKeyPayload} apiKeyPayload
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
securityApikeysByNamePut: (name, apiKeyPayload, options = {}) => __awaiter(this, void 0, void 0, function* () {
// verify required parameter 'name' is not null or undefined
common_1.assertParamExists('securityApikeysByNamePut', 'name', name);
// verify required parameter 'apiKeyPayload' is not null or undefined
common_1.assertParamExists('securityApikeysByNamePut', 'apiKeyPayload', apiKeyPayload);
const localVarPath = `/security/apikeys/{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: 'PUT' }, baseOptions), options);
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
// authentication apikey required
yield common_1.setApiKeyToObject(localVarHeaderParameter, "X-ElasticEmail-ApiKey", configuration);
localVarHeaderParameter['Content-Type'] = 'application/json';
common_1.setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
localVarRequestOptions.data = common_1.serializeDataIfNeeded(apiKeyPayload, localVarRequestOptions, configuration);
return {
url: common_1.toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
}),
/**
* List all your existing ApiKeys. Required Access Level: Security
* @summary List ApiKeys
* @param {string} [subaccount] Email of the subaccount of which ApiKeys should be loaded
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
securityApikeysGet: (subaccount, options = {}) => __awaiter(this, void 0, void 0, function* () {
const localVarPath = `/security/apikeys`;
// 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 (subaccount !== undefined) {
localVarQueryParameter['subaccount'] = subaccount;
}
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,
};
}),
/**
* Add a new ApiKey. Required Access Level: Security
* @summary Add ApiKey
* @param {ApiKeyPayload} apiKeyPayload
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
securityApikeysPost: (apiKeyPayload, options = {}) => __awaiter(this, void 0, void 0, function* () {
// verify required parameter 'apiKeyPayload' is not null or undefined
common_1.assertParamExists('securityApikeysPost', 'apiKeyPayload', apiKeyPayload);
const localVarPath = `/security/apikeys`;
// 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);
localVarHeaderParameter['Content-Type'] = 'application/json';
common_1.setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
localVarRequestOptions.data = common_1.serializeDataIfNeeded(apiKeyPayload, localVarRequestOptions, configuration);
return {
url: common_1.toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
}),
/**
* Delete your existing SMTP Credentials. Required Access Level: Security
* @summary Delete SMTP Credential
* @param {string} name Name of the SMTP Credential
* @param {string} [subaccount] Email of the subaccount of which credential should be deleted
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
securitySmtpByNameDelete: (name, subaccount, options = {}) => __awaiter(this, void 0, void 0, function* () {
// verify required parameter 'name' is not null or undefined
common_1.assertParamExists('securitySmtpByNameDelete', 'name', name);
const localVarPath = `/security/smtp/{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: 'DELETE' }, baseOptions), options);
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
// authentication apikey required
yield common_1.setApiKeyToObject(localVarHeaderParameter, "X-ElasticEmail-ApiKey", configuration);
if (subaccount !== undefined) {
localVarQueryParameter['subaccount'] = subaccount;
}
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,
};
}),
/**
* Load your existing SMTP Credential info. Required Access Level: Security
* @summary Load SMTP Credential
* @param {string} name Name of the SMTP Credential
* @param {string} [subaccount] Email of the subaccount of which credential should be loaded
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
securitySmtpByNameGet: (name, subaccount, options = {}) => __awaiter(this, void 0, void 0, function* () {
// verify required parameter 'name' is not null or undefined
common_1.assertParamExists('securitySmtpByNameGet', 'name', name);
const localVarPath = `/security/smtp/{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 (subaccount !== undefined) {
localVarQueryParameter['subaccount'] = subaccount;
}
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,
};
}),
/**
* Update your existing SMTP Credentials. Required Access Level: Security
* @summary Update SMTP Credential
* @param {string} name Name of the SMTP Credential
* @param {SmtpCredentialsPayload} smtpCredentialsPayload
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
securitySmtpByNamePut: (name, smtpCredentialsPayload, options = {}) => __awaiter(this, void 0, void 0, function* () {
// verify required parameter 'name' is not null or undefined
common_1.assertParamExists('securitySmtpByNamePut', 'name', name);
// verify required parameter 'smtpCredentialsPayload' is not null or undefined
common_1.assertParamExists('securitySmtpByNamePut', 'smtpCredentialsPayload', smtpCredentialsPayload);
const localVarPath = `/security/smtp/{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: 'PUT' }, baseOptions), options);
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
// authentication apikey required
yield common_1.setApiKeyToObject(localVarHeaderParameter, "X-ElasticEmail-ApiKey", configuration);
localVarHeaderParameter['Content-Type'] = 'application/json';
common_1.setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
localVarRequestOptions.data = common_1.serializeDataIfNeeded(smtpCredentialsPayload, localVarRequestOptions, configuration);
return {
url: common_1.toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
}),
/**
* List all your existing SMTP Credentials. Required Access Level: Security
* @summary List SMTP Credentials
* @param {string} [subaccount] Email of the subaccount of which credentials should be listed
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
securitySmtpGet: (subaccount, options = {}) => __awaiter(this, void 0, void 0, function* () {
const localVarPath = `/security/smtp`;
// 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 (subaccount !== undefined) {
localVarQueryParameter['subaccount'] = subaccount;
}
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,
};
}),
/**
* Add new SMTP Credential. Required Access Level: Security
* @summary Add SMTP Credential
* @param {SmtpCredentialsPayload} smtpCredentialsPayload
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
securitySmtpPost: (smtpCredentialsPayload, options = {}) => __awaiter(this, void 0, void 0, function* () {
// verify required parameter 'smtpCredentialsPayload' is not null or undefined
common_1.assertParamExists('securitySmtpPost', 'smtpCredentialsPayload', smtpCredentialsPayload);
const localVarPath = `/security/smtp`;
// 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);
localVarHeaderParameter['Content-Type'] = 'application/json';
common_1.setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
localVarRequestOptions.data = common_1.serializeDataIfNeeded(smtpCredentialsPayload, localVarRequestOptions, configuration);
return {
url: common_1.toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
}),
};
};
/**
* SecurityApi - functional programming interface
* @export
*/
exports.SecurityApiFp = function (configuration) {
const localVarAxiosParamCreator = exports.SecurityApiAxiosParamCreator(configuration);
return {
/**
* Delete your existing ApiKey. Required Access Level: Security
* @summary Delete ApiKey
* @param {string} name Name of the ApiKey
* @param {string} [subaccount] Email of the subaccount of which ApiKey should be deleted
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
securityApikeysByNameDelete(name, subaccount, options) {
return __awaiter(this, void 0, void 0, function* () {
const localVarAxiosArgs = yield localVarAxiosParamCreator.securityApikeysByNameDelete(name, subaccount, options);
return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
});
},
/**
* Load your existing ApiKey info. Required Access Level: Security
* @summary Load ApiKey
* @param {string} name Name of the ApiKey
* @param {string} [subaccount] Email of the subaccount of which ApiKey should be loaded
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
securityApikeysByNameGet(name, subaccount, options) {
return __awaiter(this, void 0, void 0, function* () {
const localVarAxiosArgs = yield localVarAxiosParamCreator.securityApikeysByNameGet(name, subaccount, options);
return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
});
},
/**
* Update your existing ApiKey. Required Access Level: Security
* @summary Update ApiKey
* @param {string} name Name of the ApiKey
* @param {ApiKeyPayload} apiKeyPayload
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
securityApikeysByNamePut(name, apiKeyPayload, options) {
return __awaiter(this, void 0, void 0, function* () {
const localVarAxiosArgs = yield localVarAxiosParamCreator.securityApikeysByNamePut(name, apiKeyPayload, options);
return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
});
},
/**
* List all your existing ApiKeys. Required Access Level: Security
* @summary List ApiKeys
* @param {string} [subaccount] Email of the subaccount of which ApiKeys should be loaded
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
securityApikeysGet(subaccount, options) {
return __awaiter(this, void 0, void 0, function* () {
const localVarAxiosArgs = yield localVarAxiosParamCreator.securityApikeysGet(subaccount, options);
return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
});
},
/**
* Add a new ApiKey. Required Access Level: Security
* @summary Add ApiKey
* @param {ApiKeyPayload} apiKeyPayload
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
securityApikeysPost(apiKeyPayload, options) {
return __awaiter(this, void 0, void 0, function* () {
const localVarAxiosArgs = yield localVarAxiosParamCreator.securityApikeysPost(apiKeyPayload, options);
return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
});
},
/**
* Delete your existing SMTP Credentials. Required Access Level: Security
* @summary Delete SMTP Credential
* @param {string} name Name of the SMTP Credential
* @param {string} [subaccount] Email of the subaccount of which credential should be deleted
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
securitySmtpByNameDelete(name, subaccount, options) {
return __awaiter(this, void 0, void 0, function* () {
const localVarAxiosArgs = yield localVarAxiosParamCreator.securitySmtpByNameDelete(name, subaccount, options);
return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
});
},
/**
* Load your existing SMTP Credential info. Required Access Level: Security
* @summary Load SMTP Credential
* @param {string} name Name of the SMTP Credential
* @param {string} [subaccount] Email of the subaccount of which credential should be loaded
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
securitySmtpByNameGet(name, subaccount, options) {
return __awaiter(this, void 0, void 0, function* () {
const localVarAxiosArgs = yield localVarAxiosParamCreator.securitySmtpByNameGet(name, subaccount, options);
return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
});
},
/**
* Update your existing SMTP Credentials. Required Access Level: Security
* @summary Update SMTP Credential
* @param {string} name Name of the SMTP Credential
* @param {SmtpCredentialsPayload} smtpCredentialsPayload
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
securitySmtpByNamePut(name, smtpCredentialsPayload, options) {
return __awaiter(this, void 0, void 0, function* () {
const localVarAxiosArgs = yield localVarAxiosParamCreator.securitySmtpByNamePut(name, smtpCredentialsPayload, options);
return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
});
},
/**
* List all your existing SMTP Credentials. Required Access Level: Security
* @summary List SMTP Credentials
* @param {string} [subaccount] Email of the subaccount of which credentials should be listed
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
securitySmtpGet(subaccount, options) {
return __awaiter(this, void 0, void 0, function* () {
const localVarAxiosArgs = yield localVarAxiosParamCreator.securitySmtpGet(subaccount, options);
return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
});
},
/**
* Add new SMTP Credential. Required Access Level: Security
* @summary Add SMTP Credential
* @param {SmtpCredentialsPayload} smtpCredentialsPayload
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
securitySmtpPost(smtpCredentialsPayload, options) {
return __awaiter(this, void 0, void 0, function* () {
const localVarAxiosArgs = yield localVarAxiosParamCreator.securitySmtpPost(smtpCredentialsPayload, options);
return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
});
},
};
};
/**
* SecurityApi - factory interface
* @export
*/
exports.SecurityApiFactory = function (configuration, basePath, axios) {
const localVarFp = exports.SecurityApiFp(configuration);
return {
/**
* Delete your existing ApiKey. Required Access Level: Security
* @summary Delete ApiKey
* @param {string} name Name of the ApiKey
* @param {string} [subaccount] Email of the subaccount of which ApiKey should be deleted
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
securityApikeysByNameDelete(name, subaccount, options) {
return localVarFp.securityApikeysByNameDelete(name, subaccount, options).then((request) => request(axios, basePath));
},
/**
* Load your existing ApiKey info. Required Access Level: Security
* @summary Load ApiKey
* @param {string} name Name of the ApiKey
* @param {string} [subaccount] Email of the subaccount of which ApiKey should be loaded
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
securityApikeysByNameGet(name, subaccount, options) {
return localVarFp.securityApikeysByNameGet(name, subaccount, options).then((request) => request(axios, basePath));
},
/**
* Update your existing ApiKey. Required Access Level: Security
* @summary Update ApiKey
* @param {string} name Name of the ApiKey
* @param {ApiKeyPayload} apiKeyPayload
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
securityApikeysByNamePut(name, apiKeyPayload, options) {
return localVarFp.securityApikeysByNamePut(name, apiKeyPayload, options).then((request) => request(axios, basePath));
},
/**
* List all your existing ApiKeys. Required Access Level: Security
* @summary List ApiKeys
* @param {string} [subaccount] Email of the subaccount of which ApiKeys should be loaded
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
securityApikeysGet(subaccount, options) {
return localVarFp.securityApikeysGet(subaccount, options).then((request) => request(axios, basePath));
},
/**
* Add a new ApiKey. Required Access Level: Security
* @summary Add ApiKey
* @param {ApiKeyPayload} apiKeyPayload
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
securityApikeysPost(apiKeyPayload, options) {
return localVarFp.securityApikeysPost(apiKeyPayload, options).then((request) => request(axios, basePath));
},
/**
* Delete your existing SMTP Credentials. Required Access Level: Security
* @summary Delete SMTP Credential
* @param {string} name Name of the SMTP Credential
* @param {string} [subaccount] Email of the subaccount of which credential should be deleted
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
securitySmtpByNameDelete(name, subaccount, options) {
return localVarFp.securitySmtpByNameDelete(name, subaccount, options).then((request) => request(axios, basePath));
},
/**
* Load your existing SMTP Credential info. Required Access Level: Security
* @summary Load SMTP Credential
* @param {string} name Name of the SMTP Credential
* @param {string} [subaccount] Email of the subaccount of which credential should be loaded
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
securitySmtpByNameGet(name, subaccount, options) {
return localVarFp.securitySmtpByNameGet(name, subaccount, options).then((request) => request(axios, basePath));
},
/**
* Update your existing SMTP Credentials. Required Access Level: Security
* @summary Update SMTP Credential
* @param {string} name Name of the SMTP Credential
* @param {SmtpCredentialsPayload} smtpCredentialsPayload
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
securitySmtpByNamePut(name, smtpCredentialsPayload, options) {
return localVarFp.securitySmtpByNamePut(name, smtpCredentialsPayload, options).then((request) => request(axios, basePath));
},
/**
* List all your existing SMTP Credentials. Required Access Level: Security
* @summary List SMTP Credentials
* @param {string} [subaccount] Email of the subaccount of which credentials should be listed
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
securitySmtpGet(subaccount, options) {
return localVarFp.securitySmtpGet(subaccount, options).then((request) => request(axios, basePath));
},
/**
* Add new SMTP Credential. Required Access Level: Security
* @summary Add SMTP Credential
* @param {SmtpCredentialsPayload} smtpCredentialsPayload
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
securitySmtpPost(smtpCredentialsPayload, options) {
return localVarFp.securitySmtpPost(smtpCredentialsPayload, options).then((request) => request(axios, basePath));
},
};
};
/**
* SecurityApi - object-oriented interface
* @export
* @class SecurityApi
* @extends {BaseAPI}
*/
class SecurityApi extends base_1.BaseAPI {
/**
* Delete your existing ApiKey. Required Access Level: Security
* @summary Delete ApiKey
* @param {string} name Name of the ApiKey
* @param {string} [subaccount] Email of the subaccount of which ApiKey should be deleted
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SecurityApi
*/
securityApikeysByNameDelete(name, subaccount, options) {
return exports.SecurityApiFp(this.configuration).securityApikeysByNameDelete(name, subaccount, options).then((request) => request(this.axios, this.basePath));
}
/**
* Load your existing ApiKey info. Required Access Level: Security
* @summary Load ApiKey
* @param {string} name Name of the ApiKey
* @param {string} [subaccount] Email of the subaccount of which ApiKey should be loaded
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SecurityApi
*/
securityApikeysByNameGet(name, subaccount, options) {
return exports.SecurityApiFp(this.configuration).securityApikeysByNameGet(name, subaccount, options).then((request) => request(this.axios, this.basePath));
}
/**
* Update your existing ApiKey. Required Access Level: Security
* @summary Update ApiKey
* @param {string} name Name of the ApiKey
* @param {ApiKeyPayload} apiKeyPayload
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SecurityApi
*/
securityApikeysByNamePut(name, apiKeyPayload, options) {
return exports.SecurityApiFp(this.configuration).securityApikeysByNamePut(name, apiKeyPayload, options).then((request) => request(this.axios, this.basePath));
}
/**
* List all your existing ApiKeys. Required Access Level: Security
* @summary List ApiKeys
* @param {string} [subaccount] Email of the subaccount of which ApiKeys should be loaded
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SecurityApi
*/
securityApikeysGet(subaccount, options) {
return exports.SecurityApiFp(this.configuration).securityApikeysGet(subaccount, options).then((request) => request(this.axios, this.basePath));
}
/**
* Add a new ApiKey. Required Access Level: Security
* @summary Add ApiKey
* @param {ApiKeyPayload} apiKeyPayload
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SecurityApi
*/
securityApikeysPost(apiKeyPayload, options) {
return exports.SecurityApiFp(this.configuration).securityApikeysPost(apiKeyPayload, options).then((request) => request(this.axios, this.basePath));
}
/**
* Delete your existing SMTP Credentials. Required Access Level: Security
* @summary Delete SMTP Credential
* @param {string} name Name of the SMTP Credential
* @param {string} [subaccount] Email of the subaccount of which credential should be deleted
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SecurityApi
*/
securitySmtpByNameDelete(name, subaccount, options) {
return exports.SecurityApiFp(this.configuration).securitySmtpByNameDelete(name, subaccount, options).then((request) => request(this.axios, this.basePath));
}
/**
* Load your existing SMTP Credential info. Required Access Level: Security
* @summary Load SMTP Credential
* @param {string} name Name of the SMTP Credential
* @param {string} [subaccount] Email of the subaccount of which credential should be loaded
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SecurityApi
*/
securitySmtpByNameGet(name, subaccount, options) {
return exports.SecurityApiFp(this.configuration).securitySmtpByNameGet(name, subaccount, options).then((request) => request(this.axios, this.basePath));
}
/**
* Update your existing SMTP Credentials. Required Access Level: Security
* @summary Update SMTP Credential
* @param {string} name Name of the SMTP Credential
* @param {SmtpCredentialsPayload} smtpCredentialsPayload
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SecurityApi
*/
securitySmtpByNamePut(name, smtpCredentialsPayload, options) {
return exports.SecurityApiFp(this.configuration).securitySmtpByNamePut(name, smtpCredentialsPayload, options).then((request) => request(this.axios, this.basePath));
}
/**
* List all your existing SMTP Credentials. Required Access Level: Security
* @summary List SMTP Credentials
* @param {string} [subaccount] Email of the subaccount of which credentials should be listed
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SecurityApi
*/
securitySmtpGet(subaccount, options) {
return exports.SecurityApiFp(this.configuration).securitySmtpGet(subaccount, options).then((request) => request(this.axios, this.basePath));
}
/**
* Add new SMTP Credential. Required Access Level: Security
* @summary Add SMTP Credential
* @param {SmtpCredentialsPayload} smtpCredentialsPayload
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SecurityApi
*/
securitySmtpPost(smtpCredentialsPayload, options) {
return exports.SecurityApiFp(this.configuration).securitySmtpPost(smtpCredentialsPayload, options).then((request) => request(this.axios, this.basePath));
}
}
exports.SecurityApi = SecurityApi;