UNPKG

emailengine-client

Version:

A TypeScript client for the EmailEngine API

52 lines (51 loc) 2.6 kB
import { EmailEngineClient } from "../../../client"; import { GetAccountsOptions } from "./models/GetAccountsOptions"; import { RemoveAccountOptions } from "./models/RemoveAccountsOptions"; import { GetAccountInfoOptions } from "./models/GetAccountInfoOptions"; import { GetAccountOAuth2TokenOptions } from "./models/GetAccountOAuth2TokenOptions"; import { CreateAccountOptions } from "./models/CreateAccountOptions"; import { VerifyAccountOptions } from "./models/VerifyAccountOptions"; import { RequestAuthForm } from "./models/RequestAuthForm"; import { UpdateAccountOptions } from "./models/UpdateAccountOptions"; import { ReconnectAccountOptions } from "./models/ReconnectAccountOptions"; import { FlushAccountOptions } from "./models/FlushAccountOptions"; import { SyncAccountOptions } from "./models/SyncAccountOptions"; export declare class AccountsApi { private axiosInstance; constructor(client: EmailEngineClient); /** * Removes an account. * @param options - The options for removing the account. * @returns A Promise that resolves with the response data. */ removeAccount(options: Partial<RemoveAccountOptions>): Promise<any>; /** * Retrieves a list of accounts based on the specified options. * @param options - The options for retrieving accounts. * @returns A promise that resolves to the retrieved accounts. */ getAccounts(options: Partial<GetAccountsOptions>): Promise<any>; getAccountInfo(options: Partial<GetAccountInfoOptions>): Promise<any>; getOAuth2Token(options: Partial<GetAccountOAuth2TokenOptions>): Promise<any>; createAccount(options: Partial<CreateAccountOptions>): Promise<any>; verifyAccount(options: Partial<VerifyAccountOptions>): Promise<any>; requestAuthenticationForm(options: Partial<RequestAuthForm>): Promise<any>; updateAccount(options: Partial<UpdateAccountOptions>): Promise<any>; /** * Deletes all email indexes from Redis and ElasticSearch and re-creates the index for that account. You can only run a single flush operation at a time, so you must wait until the previous flush has finished before initiating a new one. * @param options */ flush(options: Partial<FlushAccountOptions>): Promise<any>; /** * Requests connection to be reconnected * @param options * @returns */ reconnect(options: Partial<ReconnectAccountOptions>): Promise<any>; /** * Requests account syncing to be run immediatelly * @param options * @returns */ sync(options: Partial<SyncAccountOptions>): Promise<any>; }