@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.
366 lines (365 loc) • 18 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 { ContactsList } from '../ee-api-models';
import { EmailsPayload } from '../ee-api-models';
import { ListPayload } from '../ee-api-models';
import { ListUpdatePayload } from '../ee-api-models';
/**
* ListsApi - axios parameter creator
* @export
*/
export declare const ListsApiAxiosParamCreator: (configuration?: Configuration) => {
/**
* Add existing Contacts to specified list. Required Access Level: ModifyContacts
* @summary Add Contacts to List
* @param {string} name Name of your list.
* @param {EmailsPayload} emailsPayload Provide either rule or a list of emails, not both.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listsByNameContactsPost: (name: string, emailsPayload: EmailsPayload, options?: AxiosRequestConfig) => Promise<RequestArgs>;
/**
* Remove specified Contacts from your list. Required Access Level: ModifyContacts
* @summary Remove Contacts from List
* @param {string} name Name of your list.
* @param {EmailsPayload} emailsPayload Provide either rule or a list of emails, not both.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listsByNameContactsRemovePost: (name: string, emailsPayload: EmailsPayload, options?: AxiosRequestConfig) => Promise<RequestArgs>;
/**
* Deletes List and removes all the Contacts from it (does not delete Contacts). Required Access Level: ModifyContacts
* @summary Delete List
* @param {string} name Name of your list.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listsByNameDelete: (name: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
/**
* Returns detailed information about specified list. Required Access Level: ViewContacts
* @summary Load List
* @param {string} name Name of your list.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listsByNameGet: (name: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
/**
* Update existing list. Required Access Level: ModifyContacts
* @summary Update List
* @param {string} name Name of your list.
* @param {ListUpdatePayload} listUpdatePayload
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listsByNamePut: (name: string, listUpdatePayload: ListUpdatePayload, options?: AxiosRequestConfig) => Promise<RequestArgs>;
/**
* Returns all your existing lists. Required Access Level: ViewContacts
* @summary Load Lists
* @param {number} [limit] Maximum number of returned items.
* @param {number} [offset] How many items should be returned ahead.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listsGet: (limit?: number, offset?: number, options?: AxiosRequestConfig) => Promise<RequestArgs>;
/**
* Add a new list. Required Access Level: ModifyContacts
* @summary Add List
* @param {ListPayload} listPayload
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listsPost: (listPayload: ListPayload, options?: AxiosRequestConfig) => Promise<RequestArgs>;
};
/**
* ListsApi - functional programming interface
* @export
*/
export declare const ListsApiFp: (configuration?: Configuration) => {
/**
* Add existing Contacts to specified list. Required Access Level: ModifyContacts
* @summary Add Contacts to List
* @param {string} name Name of your list.
* @param {EmailsPayload} emailsPayload Provide either rule or a list of emails, not both.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listsByNameContactsPost(name: string, emailsPayload: EmailsPayload, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ContactsList>>;
/**
* Remove specified Contacts from your list. Required Access Level: ModifyContacts
* @summary Remove Contacts from List
* @param {string} name Name of your list.
* @param {EmailsPayload} emailsPayload Provide either rule or a list of emails, not both.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listsByNameContactsRemovePost(name: string, emailsPayload: EmailsPayload, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
/**
* Deletes List and removes all the Contacts from it (does not delete Contacts). Required Access Level: ModifyContacts
* @summary Delete List
* @param {string} name Name of your list.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listsByNameDelete(name: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
/**
* Returns detailed information about specified list. Required Access Level: ViewContacts
* @summary Load List
* @param {string} name Name of your list.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listsByNameGet(name: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ContactsList>>;
/**
* Update existing list. Required Access Level: ModifyContacts
* @summary Update List
* @param {string} name Name of your list.
* @param {ListUpdatePayload} listUpdatePayload
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listsByNamePut(name: string, listUpdatePayload: ListUpdatePayload, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ContactsList>>;
/**
* Returns all your existing lists. Required Access Level: ViewContacts
* @summary Load Lists
* @param {number} [limit] Maximum number of returned items.
* @param {number} [offset] How many items should be returned ahead.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listsGet(limit?: number, offset?: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<ContactsList>>>;
/**
* Add a new list. Required Access Level: ModifyContacts
* @summary Add List
* @param {ListPayload} listPayload
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listsPost(listPayload: ListPayload, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ContactsList>>;
};
/**
* ListsApi - factory interface
* @export
*/
export declare const ListsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
/**
* Add existing Contacts to specified list. Required Access Level: ModifyContacts
* @summary Add Contacts to List
* @param {string} name Name of your list.
* @param {EmailsPayload} emailsPayload Provide either rule or a list of emails, not both.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listsByNameContactsPost(name: string, emailsPayload: EmailsPayload, options?: any): AxiosPromise<ContactsList>;
/**
* Remove specified Contacts from your list. Required Access Level: ModifyContacts
* @summary Remove Contacts from List
* @param {string} name Name of your list.
* @param {EmailsPayload} emailsPayload Provide either rule or a list of emails, not both.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listsByNameContactsRemovePost(name: string, emailsPayload: EmailsPayload, options?: any): AxiosPromise<void>;
/**
* Deletes List and removes all the Contacts from it (does not delete Contacts). Required Access Level: ModifyContacts
* @summary Delete List
* @param {string} name Name of your list.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listsByNameDelete(name: string, options?: any): AxiosPromise<void>;
/**
* Returns detailed information about specified list. Required Access Level: ViewContacts
* @summary Load List
* @param {string} name Name of your list.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listsByNameGet(name: string, options?: any): AxiosPromise<ContactsList>;
/**
* Update existing list. Required Access Level: ModifyContacts
* @summary Update List
* @param {string} name Name of your list.
* @param {ListUpdatePayload} listUpdatePayload
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listsByNamePut(name: string, listUpdatePayload: ListUpdatePayload, options?: any): AxiosPromise<ContactsList>;
/**
* Returns all your existing lists. Required Access Level: ViewContacts
* @summary Load Lists
* @param {number} [limit] Maximum number of returned items.
* @param {number} [offset] How many items should be returned ahead.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listsGet(limit?: number, offset?: number, options?: any): AxiosPromise<Array<ContactsList>>;
/**
* Add a new list. Required Access Level: ModifyContacts
* @summary Add List
* @param {ListPayload} listPayload
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listsPost(listPayload: ListPayload, options?: any): AxiosPromise<ContactsList>;
};
/**
* ListsApi - interface
* @export
* @interface ListsApi
*/
export interface ListsApiInterface {
/**
* Add existing Contacts to specified list. Required Access Level: ModifyContacts
* @summary Add Contacts to List
* @param {string} name Name of your list.
* @param {EmailsPayload} emailsPayload Provide either rule or a list of emails, not both.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ListsApiInterface
*/
listsByNameContactsPost(name: string, emailsPayload: EmailsPayload, options?: AxiosRequestConfig): AxiosPromise<ContactsList>;
/**
* Remove specified Contacts from your list. Required Access Level: ModifyContacts
* @summary Remove Contacts from List
* @param {string} name Name of your list.
* @param {EmailsPayload} emailsPayload Provide either rule or a list of emails, not both.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ListsApiInterface
*/
listsByNameContactsRemovePost(name: string, emailsPayload: EmailsPayload, options?: AxiosRequestConfig): AxiosPromise<void>;
/**
* Deletes List and removes all the Contacts from it (does not delete Contacts). Required Access Level: ModifyContacts
* @summary Delete List
* @param {string} name Name of your list.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ListsApiInterface
*/
listsByNameDelete(name: string, options?: AxiosRequestConfig): AxiosPromise<void>;
/**
* Returns detailed information about specified list. Required Access Level: ViewContacts
* @summary Load List
* @param {string} name Name of your list.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ListsApiInterface
*/
listsByNameGet(name: string, options?: AxiosRequestConfig): AxiosPromise<ContactsList>;
/**
* Update existing list. Required Access Level: ModifyContacts
* @summary Update List
* @param {string} name Name of your list.
* @param {ListUpdatePayload} listUpdatePayload
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ListsApiInterface
*/
listsByNamePut(name: string, listUpdatePayload: ListUpdatePayload, options?: AxiosRequestConfig): AxiosPromise<ContactsList>;
/**
* Returns all your existing lists. Required Access Level: ViewContacts
* @summary Load Lists
* @param {number} [limit] Maximum number of returned items.
* @param {number} [offset] How many items should be returned ahead.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ListsApiInterface
*/
listsGet(limit?: number, offset?: number, options?: AxiosRequestConfig): AxiosPromise<Array<ContactsList>>;
/**
* Add a new list. Required Access Level: ModifyContacts
* @summary Add List
* @param {ListPayload} listPayload
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ListsApiInterface
*/
listsPost(listPayload: ListPayload, options?: AxiosRequestConfig): AxiosPromise<ContactsList>;
}
/**
* ListsApi - object-oriented interface
* @export
* @class ListsApi
* @extends {BaseAPI}
*/
export declare class ListsApi extends BaseAPI implements ListsApiInterface {
/**
* Add existing Contacts to specified list. Required Access Level: ModifyContacts
* @summary Add Contacts to List
* @param {string} name Name of your list.
* @param {EmailsPayload} emailsPayload Provide either rule or a list of emails, not both.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ListsApi
*/
listsByNameContactsPost(name: string, emailsPayload: EmailsPayload, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ContactsList>>;
/**
* Remove specified Contacts from your list. Required Access Level: ModifyContacts
* @summary Remove Contacts from List
* @param {string} name Name of your list.
* @param {EmailsPayload} emailsPayload Provide either rule or a list of emails, not both.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ListsApi
*/
listsByNameContactsRemovePost(name: string, emailsPayload: EmailsPayload, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<void>>;
/**
* Deletes List and removes all the Contacts from it (does not delete Contacts). Required Access Level: ModifyContacts
* @summary Delete List
* @param {string} name Name of your list.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ListsApi
*/
listsByNameDelete(name: string, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<void>>;
/**
* Returns detailed information about specified list. Required Access Level: ViewContacts
* @summary Load List
* @param {string} name Name of your list.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ListsApi
*/
listsByNameGet(name: string, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ContactsList>>;
/**
* Update existing list. Required Access Level: ModifyContacts
* @summary Update List
* @param {string} name Name of your list.
* @param {ListUpdatePayload} listUpdatePayload
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ListsApi
*/
listsByNamePut(name: string, listUpdatePayload: ListUpdatePayload, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ContactsList>>;
/**
* Returns all your existing lists. Required Access Level: ViewContacts
* @summary Load Lists
* @param {number} [limit] Maximum number of returned items.
* @param {number} [offset] How many items should be returned ahead.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ListsApi
*/
listsGet(limit?: number, offset?: number, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ContactsList[]>>;
/**
* Add a new list. Required Access Level: ModifyContacts
* @summary Add List
* @param {ListPayload} listPayload
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof ListsApi
*/
listsPost(listPayload: ListPayload, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ContactsList>>;
}