@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.
504 lines (503 loc) • 25.7 kB
TypeScript
/**
* Elastic Email REST API
* This API is based on the REST API architecture, allowing the user to easily manage their data with this resource-based approach. Every API call is established on which specific request type (GET, POST, PUT, DELETE) will be used. The API has a limit of 20 concurrent connections and a hard timeout of 600 seconds per request. To start using this API, you will need your Access Token (available <a target=\"_blank\" href=\"https://app.elasticemail.com/marketing/settings/new/manage-api\">here</a>). Remember to keep it safe. Required access levels are listed in the given request’s description. Downloadable library clients can be found in our Github repository <a target=\"_blank\" href=\"https://github.com/ElasticEmail?tab=repositories&q=%22rest+api%22+in%3Areadme\">here</a>
*
* The version of the OpenAPI document: 4.0.0
* Contact: support@elasticemail.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import type { Configuration } from '../configuration';
import type { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
import { RequestArgs, BaseAPI } from '../base';
import { ApiKey } from '../ee-api-models';
import { ApiKeyPayload } from '../ee-api-models';
import { NewApiKey } from '../ee-api-models';
import { NewSmtpCredentials } from '../ee-api-models';
import { SmtpCredentials } from '../ee-api-models';
import { SmtpCredentialsPayload } from '../ee-api-models';
/**
* SecurityApi - axios parameter creator
* @export
*/
export declare const SecurityApiAxiosParamCreator: (configuration?: Configuration) => {
/**
* 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: string, subaccount?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
/**
* 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: string, subaccount?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
/**
* 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: string, apiKeyPayload: ApiKeyPayload, options?: AxiosRequestConfig) => Promise<RequestArgs>;
/**
* 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?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
/**
* Add a new ApiKey. Required Access Level: Security
* @summary Add ApiKey
* @param {ApiKeyPayload} apiKeyPayload
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
securityApikeysPost: (apiKeyPayload: ApiKeyPayload, options?: AxiosRequestConfig) => Promise<RequestArgs>;
/**
* 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: string, subaccount?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
/**
* 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: string, subaccount?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
/**
* 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: string, smtpCredentialsPayload: SmtpCredentialsPayload, options?: AxiosRequestConfig) => Promise<RequestArgs>;
/**
* 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?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
/**
* 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: SmtpCredentialsPayload, options?: AxiosRequestConfig) => Promise<RequestArgs>;
};
/**
* SecurityApi - functional programming interface
* @export
*/
export declare const SecurityApiFp: (configuration?: Configuration) => {
/**
* 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: string, subaccount?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
/**
* 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: string, subaccount?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApiKey>>;
/**
* 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: string, apiKeyPayload: ApiKeyPayload, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ApiKey>>;
/**
* 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?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<ApiKey>>>;
/**
* Add a new ApiKey. Required Access Level: Security
* @summary Add ApiKey
* @param {ApiKeyPayload} apiKeyPayload
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
securityApikeysPost(apiKeyPayload: ApiKeyPayload, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<NewApiKey>>;
/**
* 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: string, subaccount?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
/**
* 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: string, subaccount?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SmtpCredentials>>;
/**
* 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: string, smtpCredentialsPayload: SmtpCredentialsPayload, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SmtpCredentials>>;
/**
* 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?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<SmtpCredentials>>>;
/**
* 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: SmtpCredentialsPayload, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<NewSmtpCredentials>>;
};
/**
* SecurityApi - factory interface
* @export
*/
export declare const SecurityApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
/**
* 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: string, subaccount?: string, options?: any): AxiosPromise<void>;
/**
* 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: string, subaccount?: string, options?: any): AxiosPromise<ApiKey>;
/**
* 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: string, apiKeyPayload: ApiKeyPayload, options?: any): AxiosPromise<ApiKey>;
/**
* 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?: string, options?: any): AxiosPromise<Array<ApiKey>>;
/**
* Add a new ApiKey. Required Access Level: Security
* @summary Add ApiKey
* @param {ApiKeyPayload} apiKeyPayload
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
securityApikeysPost(apiKeyPayload: ApiKeyPayload, options?: any): AxiosPromise<NewApiKey>;
/**
* 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: string, subaccount?: string, options?: any): AxiosPromise<void>;
/**
* 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: string, subaccount?: string, options?: any): AxiosPromise<SmtpCredentials>;
/**
* 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: string, smtpCredentialsPayload: SmtpCredentialsPayload, options?: any): AxiosPromise<SmtpCredentials>;
/**
* 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?: string, options?: any): AxiosPromise<Array<SmtpCredentials>>;
/**
* 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: SmtpCredentialsPayload, options?: any): AxiosPromise<NewSmtpCredentials>;
};
/**
* SecurityApi - interface
* @export
* @interface SecurityApi
*/
export interface SecurityApiInterface {
/**
* 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 SecurityApiInterface
*/
securityApikeysByNameDelete(name: string, subaccount?: string, options?: AxiosRequestConfig): AxiosPromise<void>;
/**
* 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 SecurityApiInterface
*/
securityApikeysByNameGet(name: string, subaccount?: string, options?: AxiosRequestConfig): AxiosPromise<ApiKey>;
/**
* 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 SecurityApiInterface
*/
securityApikeysByNamePut(name: string, apiKeyPayload: ApiKeyPayload, options?: AxiosRequestConfig): AxiosPromise<ApiKey>;
/**
* 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 SecurityApiInterface
*/
securityApikeysGet(subaccount?: string, options?: AxiosRequestConfig): AxiosPromise<Array<ApiKey>>;
/**
* Add a new ApiKey. Required Access Level: Security
* @summary Add ApiKey
* @param {ApiKeyPayload} apiKeyPayload
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SecurityApiInterface
*/
securityApikeysPost(apiKeyPayload: ApiKeyPayload, options?: AxiosRequestConfig): AxiosPromise<NewApiKey>;
/**
* 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 SecurityApiInterface
*/
securitySmtpByNameDelete(name: string, subaccount?: string, options?: AxiosRequestConfig): AxiosPromise<void>;
/**
* 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 SecurityApiInterface
*/
securitySmtpByNameGet(name: string, subaccount?: string, options?: AxiosRequestConfig): AxiosPromise<SmtpCredentials>;
/**
* 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 SecurityApiInterface
*/
securitySmtpByNamePut(name: string, smtpCredentialsPayload: SmtpCredentialsPayload, options?: AxiosRequestConfig): AxiosPromise<SmtpCredentials>;
/**
* 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 SecurityApiInterface
*/
securitySmtpGet(subaccount?: string, options?: AxiosRequestConfig): AxiosPromise<Array<SmtpCredentials>>;
/**
* Add new SMTP Credential. Required Access Level: Security
* @summary Add SMTP Credential
* @param {SmtpCredentialsPayload} smtpCredentialsPayload
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof SecurityApiInterface
*/
securitySmtpPost(smtpCredentialsPayload: SmtpCredentialsPayload, options?: AxiosRequestConfig): AxiosPromise<NewSmtpCredentials>;
}
/**
* SecurityApi - object-oriented interface
* @export
* @class SecurityApi
* @extends {BaseAPI}
*/
export declare class SecurityApi extends BaseAPI implements SecurityApiInterface {
/**
* 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: string, subaccount?: string, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<void>>;
/**
* 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: string, subaccount?: string, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ApiKey>>;
/**
* 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: string, apiKeyPayload: ApiKeyPayload, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ApiKey>>;
/**
* 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?: string, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ApiKey[]>>;
/**
* 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: ApiKeyPayload, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<NewApiKey>>;
/**
* 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: string, subaccount?: string, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<void>>;
/**
* 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: string, subaccount?: string, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<SmtpCredentials>>;
/**
* 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: string, smtpCredentialsPayload: SmtpCredentialsPayload, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<SmtpCredentials>>;
/**
* 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?: string, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<SmtpCredentials[]>>;
/**
* 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: SmtpCredentialsPayload, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<NewSmtpCredentials>>;
}