mailersend / mailersend-nodejs

The official MailerSend Node.js SDK
https://developers.mailersend.com
MIT License
125 stars 17 forks source link

Filtering activity by Recipient #64

Closed Erikasc closed 1 year ago

Erikasc commented 1 year ago

Example from docs

const queryParams = {
  limit: 10, // Min: 10, Max: 100, Default: 25
  page: 2,
  date_from: 1443651141, // Unix timestamp
  date_to: 1443651141, // Unix timestamp
  event: [ActivityEventType.SENT, ActivityEventType.SOFT_BOUNCED]
}
mailerSend.email.activity.domain("domain_id", queryParams)
  .then((response) => console.log(response.body))
  .catch((error) => console.log(error));

possibilities of filtering

export interface ActivityQueryParams extends Pagination {
  date_from?: number;
  date_to?: number;
  event?: ActivityEventType[];
}
export interface Pagination {
  page?: number;
  limit?: number;
}

Would it be possible to filter through the api according to "Recipient" ?

opheus2 commented 1 year ago

Hey @Erikasc recipient filtering isn't available via the api.