UNPKG

mailersend

Version:

Node.js helper module for MailerSend API

15 lines (14 loc) 1.36 kB
import { RequestService, APIResponse } from "../../services/request.service"; import { BlockListQueryParams, BlockListRecipients, BlockListRecipientsPost, BlockListType, OnHoldListQueryParams, RecipientsQueryParams } from "../../models"; export declare class RecipientModule extends RequestService { constructor(apiKey: string, baseUrl: string); list(queryParams?: RecipientsQueryParams): Promise<APIResponse>; single(recipientId: string): Promise<APIResponse>; delete(recipientId: string): Promise<APIResponse>; blockList(queryParams?: BlockListQueryParams, type?: BlockListType.BLOCK_LIST | BlockListType.HARD_BOUNCES_LIST | BlockListType.SPAM_COMPLAINTS_LIST | BlockListType.UNSUBSCRIBES_LIST): Promise<APIResponse>; blockList(queryParams?: OnHoldListQueryParams, type?: BlockListType.ON_HOLD_LIST): Promise<APIResponse>; blockRecipients(blockRecipients: BlockListRecipients, type?: BlockListType.BLOCK_LIST): Promise<APIResponse>; blockRecipients(blockRecipients: BlockListRecipientsPost, type: BlockListType.HARD_BOUNCES_LIST | BlockListType.SPAM_COMPLAINTS_LIST | BlockListType.UNSUBSCRIBES_LIST): Promise<APIResponse>; delBlockListRecipients(ids: string[], type?: BlockListType, domainId?: string): Promise<APIResponse>; delAllBlockListRecipients(type?: BlockListType, domainId?: string): Promise<APIResponse>; }