Skip to content

Commit 79484d4

Browse files
types: refactor BatchSendResponse to use an interface with detailed success responses and optional message_ids and errors
1 parent 8289f60 commit 79484d4

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

src/types/mailtrap.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,14 @@ export type MailtrapClientConfig = {
7171

7272
export type BatchMail = Mail[];
7373

74-
export type BatchSendResponse = {
75-
success: true;
76-
message_ids: string[];
77-
};
74+
export interface BatchSendResponse {
75+
success: boolean;
76+
responses: Array<{
77+
success: boolean;
78+
message_ids?: string[];
79+
errors?: string[];
80+
}>;
81+
}
7882

7983
interface BaseAddress {
8084
email: string;

0 commit comments

Comments
 (0)