@@ -21,6 +21,20 @@ export type EmailStatus =
2121 | 'failed'
2222 | 'canceled'
2323
24+ export type ListEmailsRequestOrderBy =
25+ | 'created_at_desc'
26+ | 'created_at_asc'
27+ | 'updated_at_desc'
28+ | 'updated_at_asc'
29+ | 'status_desc'
30+ | 'status_asc'
31+ | 'mail_from_desc'
32+ | 'mail_from_asc'
33+ | 'mail_rcpt_desc'
34+ | 'mail_rcpt_asc'
35+ | 'subject_desc'
36+ | 'subject_asc'
37+
2438/** Create email request. address. */
2539export interface CreateEmailRequestAddress {
2640 /** Email address. */
@@ -93,8 +107,10 @@ export interface Email {
93107 projectId : string
94108 /** Email address of the sender. */
95109 mailFrom : string
110+ /** @deprecated (Deprecated) Email address of the recipient. */
111+ rcptTo ?: string
96112 /** Email address of the recipient. */
97- rcptTo : string
113+ mailRcpt : string
98114 /** Type of recipient. */
99115 rcptType : EmailRcptType
100116 /** Subject of the email. */
@@ -140,7 +156,7 @@ export interface ListDomainsResponse {
140156
141157/** List emails response. */
142158export interface ListEmailsResponse {
143- /** Count of all emails matching the requested criteria. */
159+ /** Number of emails matching the requested criteria. */
144160 totalCount : number
145161 /** Single page of emails matching the requested criteria. */
146162 emails : Email [ ]
@@ -223,24 +239,41 @@ export type ListEmailsRequest = {
223239 region ?: Region
224240 page ?: number
225241 pageSize ?: number
226- /** ID of the Project in which to list the emails (optional) . */
242+ /** (Optional) ID of the Project in which to list the emails. */
227243 projectId ?: string
228- /** ID of the domain for which to list the emails (optional) . */
244+ /** (Optional) ID of the domain for which to list the emails. */
229245 domainId ?: string
230- /** ID of the message for which to list the emails (optional) . */
246+ /** (Optional) ID of the message for which to list the emails. */
231247 messageId ?: string
232- /** Subject of the email. */
233- subject ?: string
234- /** List emails created after this date (optional). */
248+ /** (Optional) List emails created after this date. */
235249 since ?: Date
236- /** List emails created before this date (optional) . */
250+ /** (Optional) List emails created before this date. */
237251 until ?: Date
238- /** List emails sent with this `mail_from` sender's address (optional) . */
252+ /** (Optional) List emails sent with this sender's email address . */
239253 mailFrom ?: string
240- /** List emails sent with this `mail_to` recipient's address (optional). */
254+ /**
255+ * @deprecated (Deprecated) List emails sent to this recipient's email
256+ * address.
257+ */
241258 mailTo ?: string
242- /** List emails having any of this status (optional). */
259+ /** (Optional) List emails sent to this recipient's email address. */
260+ mailRcpt ?: string
261+ /** (Optional) List emails with any of these statuses. */
243262 statuses ?: EmailStatus [ ]
263+ /** (Optional) List emails with this subject. */
264+ subject ?: string
265+ /**
266+ * (Optional) List emails corresponding to specific criteria. You can filter
267+ * your emails in ascending or descending order using:
268+ *
269+ * - Created_at
270+ * - Updated_at
271+ * - Status
272+ * - Mail_from
273+ * - Mail_rcpt
274+ * - Subject.
275+ */
276+ orderBy ?: ListEmailsRequestOrderBy
244277}
245278
246279export type GetStatisticsRequest = {
@@ -249,18 +282,18 @@ export type GetStatisticsRequest = {
249282 * config.
250283 */
251284 region ?: Region
252- /** Number of emails for this Project (optional) . */
285+ /** (Optional) Number of emails for this Project. */
253286 projectId ?: string
254287 /**
255- * Number of emails sent from this domain (must be coherent with the
256- * `project_id` and the `organization_id`) (optional ).
288+ * (Optional) Number of emails sent from this domain (must be coherent with
289+ * the `project_id` and the `organization_id`).
257290 */
258291 domainId ?: string
259- /** Number of emails created after this date (optional) . */
292+ /** (Optional) Number of emails created after this date. */
260293 since ?: Date
261- /** Number of emails created before this date (optional) . */
294+ /** (Optional) Number of emails created before this date. */
262295 until ?: Date
263- /** Number of emails sent with this `mail_from` sender's address (optional) . */
296+ /** (Optional) Number of emails sent with this sender's email address . */
264297 mailFrom ?: string
265298}
266299
0 commit comments