/** * 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 { type RequestArgs, BaseAPI } from '../base'; import type { CompressionFormat } from '../ee-api-models'; import type { Contact } from '../ee-api-models'; import type { ContactPayload } from '../ee-api-models'; import type { ContactUpdatePayload } from '../ee-api-models'; import type { EmailsPayload } from '../ee-api-models'; import type { ExportFileFormats } from '../ee-api-models'; import type { ExportLink } from '../ee-api-models'; import type { ExportStatus } from '../ee-api-models'; /** * ContactsApi - axios parameter creator * @export */ export declare const ContactsApiAxiosParamCreator: (configuration?: Configuration) => { /** * Deletes the provided contact. Required Access Level: ModifyContacts * @summary Delete Contact * @param {string} email Proper email address. * @param {*} [options] Override http request option. * @throws {RequiredError} */ contactsByEmailDelete: (email: string, options?: RawAxiosRequestConfig) => Promise; /** * Load detailed contact information for specified email. Required Access Level: ViewContacts * @summary Load Contact * @param {string} email Proper email address. * @param {*} [options] Override http request option. * @throws {RequiredError} */ contactsByEmailGet: (email: string, options?: RawAxiosRequestConfig) => Promise; /** * Update selected contact. Omitted contact\'s fields will not be changed. Required Access Level: ModifyContacts * @summary Update Contact * @param {string} email Proper email address. * @param {ContactUpdatePayload} contactUpdatePayload * @param {*} [options] Override http request option. * @throws {RequiredError} */ contactsByEmailPut: (email: string, contactUpdatePayload: ContactUpdatePayload, options?: RawAxiosRequestConfig) => Promise; /** * Deletes provided contacts in bulk. Required Access Level: ModifyContacts * @summary Delete Contacts Bulk * @param {EmailsPayload} emailsPayload Provide either rule or a list of emails, not both. * @param {*} [options] Override http request option. * @throws {RequiredError} */ contactsDeletePost: (emailsPayload: EmailsPayload, options?: RawAxiosRequestConfig) => Promise; /** * Check the current status of the export. Required Access Level: Export * @summary Check Export Status * @param {string} id ID of the exported file * @param {*} [options] Override http request option. * @throws {RequiredError} */ contactsExportByIdStatusGet: (id: string, options?: RawAxiosRequestConfig) => Promise; /** * Request an Export of specified Contacts. Required Access Level: Export * @summary Export Contacts * @param {ExportFileFormats} [fileFormat] Format of the exported file * @param {string} [rule] Query used for filtering. * @param {Array} [emails] Comma delimited list of contact emails * @param {CompressionFormat} [compressionFormat] FileResponse compression format. None or Zip. * @param {string} [fileName] Name of your file including extension. * @param {*} [options] Override http request option. * @throws {RequiredError} */ contactsExportPost: (fileFormat?: ExportFileFormats, rule?: string, emails?: Array, compressionFormat?: CompressionFormat, fileName?: string, options?: RawAxiosRequestConfig) => Promise; /** * Returns a list of contacts. Required Access Level: ViewContacts * @summary Load Contacts * @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} */ contactsGet: (limit?: number, offset?: number, options?: RawAxiosRequestConfig) => Promise; /** * Upload contacts from a file. Required Access Level: ModifyContacts * @summary Upload Contacts * @param {string} [listName] Name of an existing list to add these contacts to * @param {string} [encodingName] In what encoding the file is uploaded * @param {string} [fileUrl] Optional url of csv to import * @param {File} [file] * @param {*} [options] Override http request option. * @throws {RequiredError} */ contactsImportPost: (listName?: string, encodingName?: string, fileUrl?: string, file?: File, options?: RawAxiosRequestConfig) => Promise; /** * Add new Contacts to your Lists. Up to 1000 can be added (for more please refer to the import request). Required Access Level: ModifyContacts * @summary Add Contact * @param {Array} contactPayload * @param {Array} [listnames] Names of lists to which the uploaded contacts should be added to * @param {*} [options] Override http request option. * @throws {RequiredError} */ contactsPost: (contactPayload: Array, listnames?: Array, options?: RawAxiosRequestConfig) => Promise; }; /** * ContactsApi - functional programming interface * @export */ export declare const ContactsApiFp: (configuration?: Configuration) => { /** * Deletes the provided contact. Required Access Level: ModifyContacts * @summary Delete Contact * @param {string} email Proper email address. * @param {*} [options] Override http request option. * @throws {RequiredError} */ contactsByEmailDelete(email: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Load detailed contact information for specified email. Required Access Level: ViewContacts * @summary Load Contact * @param {string} email Proper email address. * @param {*} [options] Override http request option. * @throws {RequiredError} */ contactsByEmailGet(email: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Update selected contact. Omitted contact\'s fields will not be changed. Required Access Level: ModifyContacts * @summary Update Contact * @param {string} email Proper email address. * @param {ContactUpdatePayload} contactUpdatePayload * @param {*} [options] Override http request option. * @throws {RequiredError} */ contactsByEmailPut(email: string, contactUpdatePayload: ContactUpdatePayload, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Deletes provided contacts in bulk. Required Access Level: ModifyContacts * @summary Delete Contacts Bulk * @param {EmailsPayload} emailsPayload Provide either rule or a list of emails, not both. * @param {*} [options] Override http request option. * @throws {RequiredError} */ contactsDeletePost(emailsPayload: EmailsPayload, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Check the current status of the export. Required Access Level: Export * @summary Check Export Status * @param {string} id ID of the exported file * @param {*} [options] Override http request option. * @throws {RequiredError} */ contactsExportByIdStatusGet(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Request an Export of specified Contacts. Required Access Level: Export * @summary Export Contacts * @param {ExportFileFormats} [fileFormat] Format of the exported file * @param {string} [rule] Query used for filtering. * @param {Array} [emails] Comma delimited list of contact emails * @param {CompressionFormat} [compressionFormat] FileResponse compression format. None or Zip. * @param {string} [fileName] Name of your file including extension. * @param {*} [options] Override http request option. * @throws {RequiredError} */ contactsExportPost(fileFormat?: ExportFileFormats, rule?: string, emails?: Array, compressionFormat?: CompressionFormat, fileName?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Returns a list of contacts. Required Access Level: ViewContacts * @summary Load Contacts * @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} */ contactsGet(limit?: number, offset?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>>; /** * Upload contacts from a file. Required Access Level: ModifyContacts * @summary Upload Contacts * @param {string} [listName] Name of an existing list to add these contacts to * @param {string} [encodingName] In what encoding the file is uploaded * @param {string} [fileUrl] Optional url of csv to import * @param {File} [file] * @param {*} [options] Override http request option. * @throws {RequiredError} */ contactsImportPost(listName?: string, encodingName?: string, fileUrl?: string, file?: File, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>; /** * Add new Contacts to your Lists. Up to 1000 can be added (for more please refer to the import request). Required Access Level: ModifyContacts * @summary Add Contact * @param {Array} contactPayload * @param {Array} [listnames] Names of lists to which the uploaded contacts should be added to * @param {*} [options] Override http request option. * @throws {RequiredError} */ contactsPost(contactPayload: Array, listnames?: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>>; }; /** * ContactsApi - factory interface * @export */ export declare const ContactsApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => { /** * Deletes the provided contact. Required Access Level: ModifyContacts * @summary Delete Contact * @param {string} email Proper email address. * @param {*} [options] Override http request option. * @throws {RequiredError} */ contactsByEmailDelete(email: string, options?: RawAxiosRequestConfig): AxiosPromise; /** * Load detailed contact information for specified email. Required Access Level: ViewContacts * @summary Load Contact * @param {string} email Proper email address. * @param {*} [options] Override http request option. * @throws {RequiredError} */ contactsByEmailGet(email: string, options?: RawAxiosRequestConfig): AxiosPromise; /** * Update selected contact. Omitted contact\'s fields will not be changed. Required Access Level: ModifyContacts * @summary Update Contact * @param {string} email Proper email address. * @param {ContactUpdatePayload} contactUpdatePayload * @param {*} [options] Override http request option. * @throws {RequiredError} */ contactsByEmailPut(email: string, contactUpdatePayload: ContactUpdatePayload, options?: RawAxiosRequestConfig): AxiosPromise; /** * Deletes provided contacts in bulk. Required Access Level: ModifyContacts * @summary Delete Contacts Bulk * @param {EmailsPayload} emailsPayload Provide either rule or a list of emails, not both. * @param {*} [options] Override http request option. * @throws {RequiredError} */ contactsDeletePost(emailsPayload: EmailsPayload, options?: RawAxiosRequestConfig): AxiosPromise; /** * Check the current status of the export. Required Access Level: Export * @summary Check Export Status * @param {string} id ID of the exported file * @param {*} [options] Override http request option. * @throws {RequiredError} */ contactsExportByIdStatusGet(id: string, options?: RawAxiosRequestConfig): AxiosPromise; /** * Request an Export of specified Contacts. Required Access Level: Export * @summary Export Contacts * @param {ExportFileFormats} [fileFormat] Format of the exported file * @param {string} [rule] Query used for filtering. * @param {Array} [emails] Comma delimited list of contact emails * @param {CompressionFormat} [compressionFormat] FileResponse compression format. None or Zip. * @param {string} [fileName] Name of your file including extension. * @param {*} [options] Override http request option. * @throws {RequiredError} */ contactsExportPost(fileFormat?: ExportFileFormats, rule?: string, emails?: Array, compressionFormat?: CompressionFormat, fileName?: string, options?: RawAxiosRequestConfig): AxiosPromise; /** * Returns a list of contacts. Required Access Level: ViewContacts * @summary Load Contacts * @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} */ contactsGet(limit?: number, offset?: number, options?: RawAxiosRequestConfig): AxiosPromise>; /** * Upload contacts from a file. Required Access Level: ModifyContacts * @summary Upload Contacts * @param {string} [listName] Name of an existing list to add these contacts to * @param {string} [encodingName] In what encoding the file is uploaded * @param {string} [fileUrl] Optional url of csv to import * @param {File} [file] * @param {*} [options] Override http request option. * @throws {RequiredError} */ contactsImportPost(listName?: string, encodingName?: string, fileUrl?: string, file?: File, options?: RawAxiosRequestConfig): AxiosPromise; /** * Add new Contacts to your Lists. Up to 1000 can be added (for more please refer to the import request). Required Access Level: ModifyContacts * @summary Add Contact * @param {Array} contactPayload * @param {Array} [listnames] Names of lists to which the uploaded contacts should be added to * @param {*} [options] Override http request option. * @throws {RequiredError} */ contactsPost(contactPayload: Array, listnames?: Array, options?: RawAxiosRequestConfig): AxiosPromise>; }; /** * ContactsApi - interface * @export * @interface ContactsApi */ export interface ContactsApiInterface { /** * Deletes the provided contact. Required Access Level: ModifyContacts * @summary Delete Contact * @param {string} email Proper email address. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ContactsApiInterface */ contactsByEmailDelete(email: string, options?: RawAxiosRequestConfig): AxiosPromise; /** * Load detailed contact information for specified email. Required Access Level: ViewContacts * @summary Load Contact * @param {string} email Proper email address. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ContactsApiInterface */ contactsByEmailGet(email: string, options?: RawAxiosRequestConfig): AxiosPromise; /** * Update selected contact. Omitted contact\'s fields will not be changed. Required Access Level: ModifyContacts * @summary Update Contact * @param {string} email Proper email address. * @param {ContactUpdatePayload} contactUpdatePayload * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ContactsApiInterface */ contactsByEmailPut(email: string, contactUpdatePayload: ContactUpdatePayload, options?: RawAxiosRequestConfig): AxiosPromise; /** * Deletes provided contacts in bulk. Required Access Level: ModifyContacts * @summary Delete Contacts Bulk * @param {EmailsPayload} emailsPayload Provide either rule or a list of emails, not both. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ContactsApiInterface */ contactsDeletePost(emailsPayload: EmailsPayload, options?: RawAxiosRequestConfig): AxiosPromise; /** * Check the current status of the export. Required Access Level: Export * @summary Check Export Status * @param {string} id ID of the exported file * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ContactsApiInterface */ contactsExportByIdStatusGet(id: string, options?: RawAxiosRequestConfig): AxiosPromise; /** * Request an Export of specified Contacts. Required Access Level: Export * @summary Export Contacts * @param {ExportFileFormats} [fileFormat] Format of the exported file * @param {string} [rule] Query used for filtering. * @param {Array} [emails] Comma delimited list of contact emails * @param {CompressionFormat} [compressionFormat] FileResponse compression format. None or Zip. * @param {string} [fileName] Name of your file including extension. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ContactsApiInterface */ contactsExportPost(fileFormat?: ExportFileFormats, rule?: string, emails?: Array, compressionFormat?: CompressionFormat, fileName?: string, options?: RawAxiosRequestConfig): AxiosPromise; /** * Returns a list of contacts. Required Access Level: ViewContacts * @summary Load Contacts * @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 ContactsApiInterface */ contactsGet(limit?: number, offset?: number, options?: RawAxiosRequestConfig): AxiosPromise>; /** * Upload contacts from a file. Required Access Level: ModifyContacts * @summary Upload Contacts * @param {string} [listName] Name of an existing list to add these contacts to * @param {string} [encodingName] In what encoding the file is uploaded * @param {string} [fileUrl] Optional url of csv to import * @param {File} [file] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ContactsApiInterface */ contactsImportPost(listName?: string, encodingName?: string, fileUrl?: string, file?: File, options?: RawAxiosRequestConfig): AxiosPromise; /** * Add new Contacts to your Lists. Up to 1000 can be added (for more please refer to the import request). Required Access Level: ModifyContacts * @summary Add Contact * @param {Array} contactPayload * @param {Array} [listnames] Names of lists to which the uploaded contacts should be added to * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ContactsApiInterface */ contactsPost(contactPayload: Array, listnames?: Array, options?: RawAxiosRequestConfig): AxiosPromise>; } /** * ContactsApi - object-oriented interface * @export * @class ContactsApi * @extends {BaseAPI} */ export declare class ContactsApi extends BaseAPI implements ContactsApiInterface { /** * Deletes the provided contact. Required Access Level: ModifyContacts * @summary Delete Contact * @param {string} email Proper email address. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ContactsApi */ contactsByEmailDelete(email: string, options?: RawAxiosRequestConfig): Promise>; /** * Load detailed contact information for specified email. Required Access Level: ViewContacts * @summary Load Contact * @param {string} email Proper email address. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ContactsApi */ contactsByEmailGet(email: string, options?: RawAxiosRequestConfig): Promise>; /** * Update selected contact. Omitted contact\'s fields will not be changed. Required Access Level: ModifyContacts * @summary Update Contact * @param {string} email Proper email address. * @param {ContactUpdatePayload} contactUpdatePayload * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ContactsApi */ contactsByEmailPut(email: string, contactUpdatePayload: ContactUpdatePayload, options?: RawAxiosRequestConfig): Promise>; /** * Deletes provided contacts in bulk. Required Access Level: ModifyContacts * @summary Delete Contacts Bulk * @param {EmailsPayload} emailsPayload Provide either rule or a list of emails, not both. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ContactsApi */ contactsDeletePost(emailsPayload: EmailsPayload, options?: RawAxiosRequestConfig): Promise>; /** * Check the current status of the export. Required Access Level: Export * @summary Check Export Status * @param {string} id ID of the exported file * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ContactsApi */ contactsExportByIdStatusGet(id: string, options?: RawAxiosRequestConfig): Promise>; /** * Request an Export of specified Contacts. Required Access Level: Export * @summary Export Contacts * @param {ExportFileFormats} [fileFormat] Format of the exported file * @param {string} [rule] Query used for filtering. * @param {Array} [emails] Comma delimited list of contact emails * @param {CompressionFormat} [compressionFormat] FileResponse compression format. None or Zip. * @param {string} [fileName] Name of your file including extension. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ContactsApi */ contactsExportPost(fileFormat?: ExportFileFormats, rule?: string, emails?: Array, compressionFormat?: CompressionFormat, fileName?: string, options?: RawAxiosRequestConfig): Promise>; /** * Returns a list of contacts. Required Access Level: ViewContacts * @summary Load Contacts * @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 ContactsApi */ contactsGet(limit?: number, offset?: number, options?: RawAxiosRequestConfig): Promise>; /** * Upload contacts from a file. Required Access Level: ModifyContacts * @summary Upload Contacts * @param {string} [listName] Name of an existing list to add these contacts to * @param {string} [encodingName] In what encoding the file is uploaded * @param {string} [fileUrl] Optional url of csv to import * @param {File} [file] * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ContactsApi */ contactsImportPost(listName?: string, encodingName?: string, fileUrl?: string, file?: File, options?: RawAxiosRequestConfig): Promise>; /** * Add new Contacts to your Lists. Up to 1000 can be added (for more please refer to the import request). Required Access Level: ModifyContacts * @summary Add Contact * @param {Array} contactPayload * @param {Array} [listnames] Names of lists to which the uploaded contacts should be added to * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof ContactsApi */ contactsPost(contactPayload: Array, listnames?: Array, options?: RawAxiosRequestConfig): Promise>; }