Skip to content

Commit ce00ce9

Browse files
authored
feat(tem): add flags field on email getting methods (#771)
1 parent bdf3d69 commit ce00ce9

File tree

4 files changed

+12
-0
lines changed

4 files changed

+12
-0
lines changed

packages/clients/src/api/tem/v1alpha1/api.gen.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ export class API extends ParentAPI {
127127
)}/emails`,
128128
urlParams: urlParams(
129129
['domain_id', request.domainId],
130+
['flags', request.flags],
130131
['mail_from', request.mailFrom],
131132
['mail_rcpt', request.mailRcpt],
132133
['mail_to', request.mailTo],

packages/clients/src/api/tem/v1alpha1/index.gen.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ export type {
1818
DomainStatistics,
1919
DomainStatus,
2020
Email,
21+
EmailFlag,
2122
EmailRcptType,
2223
EmailStatus,
2324
EmailTry,

packages/clients/src/api/tem/v1alpha1/marshalling.gen.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ export const unmarshalEmail = (data: unknown) => {
118118

119119
return {
120120
createdAt: unmarshalDate(data.created_at),
121+
flags: data.flags,
121122
id: data.id,
122123
lastTries: unmarshalArrayOfObject(data.last_tries, unmarshalEmailTry),
123124
mailFrom: data.mail_from,

packages/clients/src/api/tem/v1alpha1/types.gen.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ export type DomainStatus =
1717
| 'revoked'
1818
| 'pending'
1919

20+
export type EmailFlag = 'unknown_flag' | 'soft_bounce' | 'hard_bounce'
21+
2022
export type EmailRcptType = 'unknown_rcpt_type' | 'to' | 'cc' | 'bcc'
2123

2224
export type EmailStatus =
@@ -165,6 +167,11 @@ export interface Email {
165167
tryCount: number
166168
/** Information about the last three attempts to send the email. */
167169
lastTries: EmailTry[]
170+
/**
171+
* Flags categorize emails. They allow you to obtain more information about
172+
* recurring errors, for example.
173+
*/
174+
flags: EmailFlag[]
168175
}
169176

170177
/** Email. try. */
@@ -301,6 +308,8 @@ export type ListEmailsRequest = {
301308
search?: string
302309
/** (Optional) List emails corresponding to specific criteria. */
303310
orderBy?: ListEmailsRequestOrderBy
311+
/** (Optional) List emails containing only specific flags. */
312+
flags?: EmailFlag[]
304313
}
305314

306315
export type GetStatisticsRequest = {

0 commit comments

Comments
 (0)