/* tslint:disable */
/* eslint-disable */
/**
* Elastic Email REST API
* This API is based on the REST API architecture, allowing the user to easily manage their data with this resource-based approach. Every API call is established on which specific request type (GET, POST, PUT, DELETE) will be used. The API has a limit of 20 concurrent connections and a hard timeout of 600 seconds per request. To start using this API, you will need your Access Token (available here). Remember to keep it safe. Required access levels are listed in the given request’s description. Downloadable library clients can be found in our Github repository here
*
* The version of the OpenAPI document: 4.0.0
* Contact: support@elasticemail.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import type { Configuration } from '../configuration';
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
import globalAxios from 'axios';
// Some imports not used depending on template conditions
// @ts-ignore
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base';
// @ts-ignore
import type { ApiKey } from '../ee-api-models';
// @ts-ignore
import type { ApiKeyPayload } from '../ee-api-models';
// @ts-ignore
import type { NewApiKey } from '../ee-api-models';
// @ts-ignore
import type { NewSmtpCredentials } from '../ee-api-models';
// @ts-ignore
import type { SmtpCredentials } from '../ee-api-models';
// @ts-ignore
import type { SmtpCredentialsPayload } from '../ee-api-models';
/**
* SecurityApi - axios parameter creator
* @export
*/
export const SecurityApiAxiosParamCreator = function (configuration?: Configuration) {
return {
/**
* Delete your existing ApiKey. Required Access Level: ModifyAccessTokens
* @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: async (name: string, subaccount?: string, options: RawAxiosRequestConfig = {}): Promise => {
// verify required parameter 'name' is not null or undefined
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, DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication apikey required
await setApiKeyToObject(localVarHeaderParameter, "X-ElasticEmail-ApiKey", configuration)
if (subaccount !== undefined) {
localVarQueryParameter['subaccount'] = subaccount;
}
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Load your existing ApiKey info. Required Access Level: ViewAccessTokens
* @summary Load ApiKey
* @param {string} name Name of the ApiKey
* @param {string} [subaccount] Email of the subaccount of which ApiKey should be loaded. The default API key created for the subaccount has a 48-hour expiration period.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
securityApikeysByNameGet: async (name: string, subaccount?: string, options: RawAxiosRequestConfig = {}): Promise => {
// verify required parameter 'name' is not null or undefined
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, 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 (subaccount !== undefined) {
localVarQueryParameter['subaccount'] = subaccount;
}
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Update your existing ApiKey. Required Access Level: ModifyAccessTokens
* @summary Update ApiKey
* @param {string} name Name of the ApiKey
* @param {ApiKeyPayload} apiKeyPayload
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
securityApikeysByNamePut: async (name: string, apiKeyPayload: ApiKeyPayload, options: RawAxiosRequestConfig = {}): Promise => {
// verify required parameter 'name' is not null or undefined
assertParamExists('securityApikeysByNamePut', 'name', name)
// verify required parameter 'apiKeyPayload' is not null or undefined
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, DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication apikey required
await setApiKeyToObject(localVarHeaderParameter, "X-ElasticEmail-ApiKey", configuration)
localVarHeaderParameter['Content-Type'] = 'application/json';
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
localVarRequestOptions.data = serializeDataIfNeeded(apiKeyPayload, localVarRequestOptions, configuration)
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* List all your existing ApiKeys. Required Access Level: ViewAccessTokens
* @summary List ApiKeys
* @param {string} [subaccount] Email of the subaccount of which ApiKeys should be loaded. The default API key created for the subaccount has a 48-hour expiration period.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
securityApikeysGet: async (subaccount?: string, options: RawAxiosRequestConfig = {}): Promise => {
const localVarPath = `/security/apikeys`;
// 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 (subaccount !== undefined) {
localVarQueryParameter['subaccount'] = subaccount;
}
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Add a new ApiKey. Required Access Level: ModifyAccessTokens
* @summary Add ApiKey
* @param {ApiKeyPayload} apiKeyPayload
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
securityApikeysPost: async (apiKeyPayload: ApiKeyPayload, options: RawAxiosRequestConfig = {}): Promise => {
// verify required parameter 'apiKeyPayload' is not null or undefined
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, 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)
localVarHeaderParameter['Content-Type'] = 'application/json';
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
localVarRequestOptions.data = serializeDataIfNeeded(apiKeyPayload, localVarRequestOptions, configuration)
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Delete your existing SMTP Credentials. Required Access Level: ModifyAccessTokens
* @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: async (name: string, subaccount?: string, options: RawAxiosRequestConfig = {}): Promise => {
// verify required parameter 'name' is not null or undefined
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, DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication apikey required
await setApiKeyToObject(localVarHeaderParameter, "X-ElasticEmail-ApiKey", configuration)
if (subaccount !== undefined) {
localVarQueryParameter['subaccount'] = subaccount;
}
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Load your existing SMTP Credential info. Required Access Level: ViewAccessTokens
* @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: async (name: string, subaccount?: string, options: RawAxiosRequestConfig = {}): Promise => {
// verify required parameter 'name' is not null or undefined
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, 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 (subaccount !== undefined) {
localVarQueryParameter['subaccount'] = subaccount;
}
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Update your existing SMTP Credentials. Required Access Level: ModifyAccessTokens
* @summary Update SMTP Credential
* @param {string} name Name of the SMTP Credential
* @param {SmtpCredentialsPayload} smtpCredentialsPayload
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
securitySmtpByNamePut: async (name: string, smtpCredentialsPayload: SmtpCredentialsPayload, options: RawAxiosRequestConfig = {}): Promise => {
// verify required parameter 'name' is not null or undefined
assertParamExists('securitySmtpByNamePut', 'name', name)
// verify required parameter 'smtpCredentialsPayload' is not null or undefined
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, DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication apikey required
await setApiKeyToObject(localVarHeaderParameter, "X-ElasticEmail-ApiKey", configuration)
localVarHeaderParameter['Content-Type'] = 'application/json';
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
localVarRequestOptions.data = serializeDataIfNeeded(smtpCredentialsPayload, localVarRequestOptions, configuration)
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* List all your existing SMTP Credentials. Required Access Level: ViewAccessTokens
* @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: async (subaccount?: string, options: RawAxiosRequestConfig = {}): Promise => {
const localVarPath = `/security/smtp`;
// 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 (subaccount !== undefined) {
localVarQueryParameter['subaccount'] = subaccount;
}
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Add new SMTP Credential. Required Access Level: ModifyAccessTokens
* @summary Add SMTP Credential
* @param {SmtpCredentialsPayload} smtpCredentialsPayload
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
securitySmtpPost: async (smtpCredentialsPayload: SmtpCredentialsPayload, options: RawAxiosRequestConfig = {}): Promise => {
// verify required parameter 'smtpCredentialsPayload' is not null or undefined
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, 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)
localVarHeaderParameter['Content-Type'] = 'application/json';
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
localVarRequestOptions.data = serializeDataIfNeeded(smtpCredentialsPayload, localVarRequestOptions, configuration)
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
}
};
/**
* SecurityApi - functional programming interface
* @export
*/
export const SecurityApiFp = function(configuration?: Configuration) {
const localVarAxiosParamCreator = SecurityApiAxiosParamCreator(configuration)
return {
/**
* Delete your existing ApiKey. Required Access Level: ModifyAccessTokens
* @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}
*/
async securityApikeysByNameDelete(name: string, subaccount?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> {
const localVarAxiosArgs = await localVarAxiosParamCreator.securityApikeysByNameDelete(name, subaccount, options);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath = operationServerMap['SecurityApi.securityApikeysByNameDelete']?.[localVarOperationServerIndex]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
},
/**
* Load your existing ApiKey info. Required Access Level: ViewAccessTokens
* @summary Load ApiKey
* @param {string} name Name of the ApiKey
* @param {string} [subaccount] Email of the subaccount of which ApiKey should be loaded. The default API key created for the subaccount has a 48-hour expiration period.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async securityApikeysByNameGet(name: string, subaccount?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> {
const localVarAxiosArgs = await localVarAxiosParamCreator.securityApikeysByNameGet(name, subaccount, options);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath = operationServerMap['SecurityApi.securityApikeysByNameGet']?.[localVarOperationServerIndex]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
},
/**
* Update your existing ApiKey. Required Access Level: ModifyAccessTokens
* @summary Update ApiKey
* @param {string} name Name of the ApiKey
* @param {ApiKeyPayload} apiKeyPayload
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async securityApikeysByNamePut(name: string, apiKeyPayload: ApiKeyPayload, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> {
const localVarAxiosArgs = await localVarAxiosParamCreator.securityApikeysByNamePut(name, apiKeyPayload, options);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath = operationServerMap['SecurityApi.securityApikeysByNamePut']?.[localVarOperationServerIndex]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
},
/**
* List all your existing ApiKeys. Required Access Level: ViewAccessTokens
* @summary List ApiKeys
* @param {string} [subaccount] Email of the subaccount of which ApiKeys should be loaded. The default API key created for the subaccount has a 48-hour expiration period.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async securityApikeysGet(subaccount?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.securityApikeysGet(subaccount, options);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath = operationServerMap['SecurityApi.securityApikeysGet']?.[localVarOperationServerIndex]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
},
/**
* Add a new ApiKey. Required Access Level: ModifyAccessTokens
* @summary Add ApiKey
* @param {ApiKeyPayload} apiKeyPayload
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async securityApikeysPost(apiKeyPayload: ApiKeyPayload, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> {
const localVarAxiosArgs = await localVarAxiosParamCreator.securityApikeysPost(apiKeyPayload, options);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath = operationServerMap['SecurityApi.securityApikeysPost']?.[localVarOperationServerIndex]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
},
/**
* Delete your existing SMTP Credentials. Required Access Level: ModifyAccessTokens
* @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}
*/
async securitySmtpByNameDelete(name: string, subaccount?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> {
const localVarAxiosArgs = await localVarAxiosParamCreator.securitySmtpByNameDelete(name, subaccount, options);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath = operationServerMap['SecurityApi.securitySmtpByNameDelete']?.[localVarOperationServerIndex]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
},
/**
* Load your existing SMTP Credential info. Required Access Level: ViewAccessTokens
* @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}
*/
async securitySmtpByNameGet(name: string, subaccount?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> {
const localVarAxiosArgs = await localVarAxiosParamCreator.securitySmtpByNameGet(name, subaccount, options);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath = operationServerMap['SecurityApi.securitySmtpByNameGet']?.[localVarOperationServerIndex]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
},
/**
* Update your existing SMTP Credentials. Required Access Level: ModifyAccessTokens
* @summary Update SMTP Credential
* @param {string} name Name of the SMTP Credential
* @param {SmtpCredentialsPayload} smtpCredentialsPayload
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async securitySmtpByNamePut(name: string, smtpCredentialsPayload: SmtpCredentialsPayload, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> {
const localVarAxiosArgs = await localVarAxiosParamCreator.securitySmtpByNamePut(name, smtpCredentialsPayload, options);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath = operationServerMap['SecurityApi.securitySmtpByNamePut']?.[localVarOperationServerIndex]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
},
/**
* List all your existing SMTP Credentials. Required Access Level: ViewAccessTokens
* @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}
*/
async securitySmtpGet(subaccount?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.securitySmtpGet(subaccount, options);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath = operationServerMap['SecurityApi.securitySmtpGet']?.[localVarOperationServerIndex]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
},
/**
* Add new SMTP Credential. Required Access Level: ModifyAccessTokens
* @summary Add SMTP Credential
* @param {SmtpCredentialsPayload} smtpCredentialsPayload
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async securitySmtpPost(smtpCredentialsPayload: SmtpCredentialsPayload, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> {
const localVarAxiosArgs = await localVarAxiosParamCreator.securitySmtpPost(smtpCredentialsPayload, options);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath = operationServerMap['SecurityApi.securitySmtpPost']?.[localVarOperationServerIndex]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
},
}
};
/**
* SecurityApi - factory interface
* @export
*/
export const SecurityApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
const localVarFp = SecurityApiFp(configuration)
return {
/**
* Delete your existing ApiKey. Required Access Level: ModifyAccessTokens
* @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: string, subaccount?: string, options?: RawAxiosRequestConfig): AxiosPromise {
return localVarFp.securityApikeysByNameDelete(name, subaccount, options).then((request) => request(axios, basePath));
},
/**
* Load your existing ApiKey info. Required Access Level: ViewAccessTokens
* @summary Load ApiKey
* @param {string} name Name of the ApiKey
* @param {string} [subaccount] Email of the subaccount of which ApiKey should be loaded. The default API key created for the subaccount has a 48-hour expiration period.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
securityApikeysByNameGet(name: string, subaccount?: string, options?: RawAxiosRequestConfig): AxiosPromise {
return localVarFp.securityApikeysByNameGet(name, subaccount, options).then((request) => request(axios, basePath));
},
/**
* Update your existing ApiKey. Required Access Level: ModifyAccessTokens
* @summary Update ApiKey
* @param {string} name Name of the ApiKey
* @param {ApiKeyPayload} apiKeyPayload
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
securityApikeysByNamePut(name: string, apiKeyPayload: ApiKeyPayload, options?: RawAxiosRequestConfig): AxiosPromise {
return localVarFp.securityApikeysByNamePut(name, apiKeyPayload, options).then((request) => request(axios, basePath));
},
/**
* List all your existing ApiKeys. Required Access Level: ViewAccessTokens
* @summary List ApiKeys
* @param {string} [subaccount] Email of the subaccount of which ApiKeys should be loaded. The default API key created for the subaccount has a 48-hour expiration period.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
securityApikeysGet(subaccount?: string, options?: RawAxiosRequestConfig): AxiosPromise> {
return localVarFp.securityApikeysGet(subaccount, options).then((request) => request(axios, basePath));
},
/**
* Add a new ApiKey. Required Access Level: ModifyAccessTokens
* @summary Add ApiKey
* @param {ApiKeyPayload} apiKeyPayload
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
securityApikeysPost(apiKeyPayload: ApiKeyPayload, options?: RawAxiosRequestConfig): AxiosPromise {
return localVarFp.securityApikeysPost(apiKeyPayload, options).then((request) => request(axios, basePath));
},
/**
* Delete your existing SMTP Credentials. Required Access Level: ModifyAccessTokens
* @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: string, subaccount?: string, options?: RawAxiosRequestConfig): AxiosPromise {
return localVarFp.securitySmtpByNameDelete(name, subaccount, options).then((request) => request(axios, basePath));
},
/**
* Load your existing SMTP Credential info. Required Access Level: ViewAccessTokens
* @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: string, subaccount?: string, options?: RawAxiosRequestConfig): AxiosPromise {
return localVarFp.securitySmtpByNameGet(name, subaccount, options).then((request) => request(axios, basePath));
},
/**
* Update your existing SMTP Credentials. Required Access Level: ModifyAccessTokens
* @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: string, smtpCredentialsPayload: SmtpCredentialsPayload, options?: RawAxiosRequestConfig): AxiosPromise {
return localVarFp.securitySmtpByNamePut(name, smtpCredentialsPayload, options).then((request) => request(axios, basePath));
},
/**
* List all your existing SMTP Credentials. Required Access Level: ViewAccessTokens
* @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?: string, options?: RawAxiosRequestConfig): AxiosPromise> {
return localVarFp.securitySmtpGet(subaccount, options).then((request) => request(axios, basePath));
},
/**
* Add new SMTP Credential. Required Access Level: ModifyAccessTokens
* @summary Add SMTP Credential
* @param {SmtpCredentialsPayload} smtpCredentialsPayload
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
securitySmtpPost(smtpCredentialsPayload: SmtpCredentialsPayload, options?: RawAxiosRequestConfig): AxiosPromise {
return localVarFp.securitySmtpPost(smtpCredentialsPayload, options).then((request) => request(axios, basePath));
},
};
};
/**
* SecurityApi - interface
* @export
* @interface SecurityApi
*/
export interface SecurityApiInterface {
/**
* Delete your existing ApiKey. Required Access Level: ModifyAccessTokens
* @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 SecurityApiInterface
*/
securityApikeysByNameDelete(name: string, subaccount?: string, options?: RawAxiosRequestConfig): AxiosPromise;
/**
* Load your existing ApiKey info. Required Access Level: ViewAccessTokens
* @summary Load ApiKey
* @param {string} name Name of the ApiKey
* @param {string} [subaccount] Email of the subaccount of which ApiKey should be loaded. The default API key created for the subaccount has a 48-hour expiration period.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SecurityApiInterface
*/
securityApikeysByNameGet(name: string, subaccount?: string, options?: RawAxiosRequestConfig): AxiosPromise;
/**
* Update your existing ApiKey. Required Access Level: ModifyAccessTokens
* @summary Update ApiKey
* @param {string} name Name of the ApiKey
* @param {ApiKeyPayload} apiKeyPayload
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SecurityApiInterface
*/
securityApikeysByNamePut(name: string, apiKeyPayload: ApiKeyPayload, options?: RawAxiosRequestConfig): AxiosPromise;
/**
* List all your existing ApiKeys. Required Access Level: ViewAccessTokens
* @summary List ApiKeys
* @param {string} [subaccount] Email of the subaccount of which ApiKeys should be loaded. The default API key created for the subaccount has a 48-hour expiration period.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SecurityApiInterface
*/
securityApikeysGet(subaccount?: string, options?: RawAxiosRequestConfig): AxiosPromise>;
/**
* Add a new ApiKey. Required Access Level: ModifyAccessTokens
* @summary Add ApiKey
* @param {ApiKeyPayload} apiKeyPayload
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SecurityApiInterface
*/
securityApikeysPost(apiKeyPayload: ApiKeyPayload, options?: RawAxiosRequestConfig): AxiosPromise;
/**
* Delete your existing SMTP Credentials. Required Access Level: ModifyAccessTokens
* @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 SecurityApiInterface
*/
securitySmtpByNameDelete(name: string, subaccount?: string, options?: RawAxiosRequestConfig): AxiosPromise;
/**
* Load your existing SMTP Credential info. Required Access Level: ViewAccessTokens
* @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 SecurityApiInterface
*/
securitySmtpByNameGet(name: string, subaccount?: string, options?: RawAxiosRequestConfig): AxiosPromise;
/**
* Update your existing SMTP Credentials. Required Access Level: ModifyAccessTokens
* @summary Update SMTP Credential
* @param {string} name Name of the SMTP Credential
* @param {SmtpCredentialsPayload} smtpCredentialsPayload
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SecurityApiInterface
*/
securitySmtpByNamePut(name: string, smtpCredentialsPayload: SmtpCredentialsPayload, options?: RawAxiosRequestConfig): AxiosPromise;
/**
* List all your existing SMTP Credentials. Required Access Level: ViewAccessTokens
* @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 SecurityApiInterface
*/
securitySmtpGet(subaccount?: string, options?: RawAxiosRequestConfig): AxiosPromise>;
/**
* Add new SMTP Credential. Required Access Level: ModifyAccessTokens
* @summary Add SMTP Credential
* @param {SmtpCredentialsPayload} smtpCredentialsPayload
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SecurityApiInterface
*/
securitySmtpPost(smtpCredentialsPayload: SmtpCredentialsPayload, options?: RawAxiosRequestConfig): AxiosPromise;
}
/**
* SecurityApi - object-oriented interface
* @export
* @class SecurityApi
* @extends {BaseAPI}
*/
export class SecurityApi extends BaseAPI implements SecurityApiInterface {
/**
* Delete your existing ApiKey. Required Access Level: ModifyAccessTokens
* @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
*/
public securityApikeysByNameDelete(name: string, subaccount?: string, options?: RawAxiosRequestConfig) {
return SecurityApiFp(this.configuration).securityApikeysByNameDelete(name, subaccount, options).then((request) => request(this.axios, this.basePath));
}
/**
* Load your existing ApiKey info. Required Access Level: ViewAccessTokens
* @summary Load ApiKey
* @param {string} name Name of the ApiKey
* @param {string} [subaccount] Email of the subaccount of which ApiKey should be loaded. The default API key created for the subaccount has a 48-hour expiration period.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SecurityApi
*/
public securityApikeysByNameGet(name: string, subaccount?: string, options?: RawAxiosRequestConfig) {
return SecurityApiFp(this.configuration).securityApikeysByNameGet(name, subaccount, options).then((request) => request(this.axios, this.basePath));
}
/**
* Update your existing ApiKey. Required Access Level: ModifyAccessTokens
* @summary Update ApiKey
* @param {string} name Name of the ApiKey
* @param {ApiKeyPayload} apiKeyPayload
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SecurityApi
*/
public securityApikeysByNamePut(name: string, apiKeyPayload: ApiKeyPayload, options?: RawAxiosRequestConfig) {
return SecurityApiFp(this.configuration).securityApikeysByNamePut(name, apiKeyPayload, options).then((request) => request(this.axios, this.basePath));
}
/**
* List all your existing ApiKeys. Required Access Level: ViewAccessTokens
* @summary List ApiKeys
* @param {string} [subaccount] Email of the subaccount of which ApiKeys should be loaded. The default API key created for the subaccount has a 48-hour expiration period.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SecurityApi
*/
public securityApikeysGet(subaccount?: string, options?: RawAxiosRequestConfig) {
return SecurityApiFp(this.configuration).securityApikeysGet(subaccount, options).then((request) => request(this.axios, this.basePath));
}
/**
* Add a new ApiKey. Required Access Level: ModifyAccessTokens
* @summary Add ApiKey
* @param {ApiKeyPayload} apiKeyPayload
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SecurityApi
*/
public securityApikeysPost(apiKeyPayload: ApiKeyPayload, options?: RawAxiosRequestConfig) {
return SecurityApiFp(this.configuration).securityApikeysPost(apiKeyPayload, options).then((request) => request(this.axios, this.basePath));
}
/**
* Delete your existing SMTP Credentials. Required Access Level: ModifyAccessTokens
* @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
*/
public securitySmtpByNameDelete(name: string, subaccount?: string, options?: RawAxiosRequestConfig) {
return SecurityApiFp(this.configuration).securitySmtpByNameDelete(name, subaccount, options).then((request) => request(this.axios, this.basePath));
}
/**
* Load your existing SMTP Credential info. Required Access Level: ViewAccessTokens
* @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
*/
public securitySmtpByNameGet(name: string, subaccount?: string, options?: RawAxiosRequestConfig) {
return SecurityApiFp(this.configuration).securitySmtpByNameGet(name, subaccount, options).then((request) => request(this.axios, this.basePath));
}
/**
* Update your existing SMTP Credentials. Required Access Level: ModifyAccessTokens
* @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
*/
public securitySmtpByNamePut(name: string, smtpCredentialsPayload: SmtpCredentialsPayload, options?: RawAxiosRequestConfig) {
return SecurityApiFp(this.configuration).securitySmtpByNamePut(name, smtpCredentialsPayload, options).then((request) => request(this.axios, this.basePath));
}
/**
* List all your existing SMTP Credentials. Required Access Level: ViewAccessTokens
* @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
*/
public securitySmtpGet(subaccount?: string, options?: RawAxiosRequestConfig) {
return SecurityApiFp(this.configuration).securitySmtpGet(subaccount, options).then((request) => request(this.axios, this.basePath));
}
/**
* Add new SMTP Credential. Required Access Level: ModifyAccessTokens
* @summary Add SMTP Credential
* @param {SmtpCredentialsPayload} smtpCredentialsPayload
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SecurityApi
*/
public securitySmtpPost(smtpCredentialsPayload: SmtpCredentialsPayload, options?: RawAxiosRequestConfig) {
return SecurityApiFp(this.configuration).securitySmtpPost(smtpCredentialsPayload, options).then((request) => request(this.axios, this.basePath));
}
}