ts-mailcow-api
Version:
TypeScript wrapper for the mailcow API.
30 lines (29 loc) • 1.18 kB
TypeScript
import { AddAppPasswordRequest, AppPassword, DeleteAppPasswordRequest, MailcowResponse } from '../types';
import MailcowClient from '../index';
/**
* Interface for all App Password endpoints related to email handling in Mailcow.
*/
export interface AppPasswordEndpoints {
/**
* Adds a new app password.
* @param payload - Object containing the app password details.
*/
add(payload: AddAppPasswordRequest): Promise<MailcowResponse>;
/**
* Deletes specified app passwords.
* @param payload - Object containing a list of app password IDs to delete.
*/
delete(payload: DeleteAppPasswordRequest): Promise<MailcowResponse>;
/**
* Retrieves app passwords for a specific mailbox.
* @param mailbox - The mailbox for which to retrieve app passwords.
* @returns A promise that resolves to an array of `AppPassword` objects.
*/
get(mailbox: string): Promise<AppPassword[]>;
}
/**
* Binder function between the MailcowClient class and the AppPasswordEndpoints.
* @param bind - The MailcowClient instance to bind.
* @internal
*/
export declare function appPasswordEndpoints(bind: MailcowClient): AppPasswordEndpoints;