Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tighter type for message data #290

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions lib/interfaces/Messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,14 +187,12 @@ export type MailgunMessageData = MailgunMessageContent & {
* to the message ('X-My-Header' in this case).
* For example, `h:Reply-To` to specify Reply-To address.
*/
'h:X-My-Header'?: string;
[key: `h:${string}`]: string;

/**
* `v:` prefix followed by an arbitrary name allows to attach a custom JSON data to the message. See [Attaching Data to Messages](https://documentation.mailgun.com/en/latest/user_manual.html#manual-customdata) for more information.
*/
'v:my-var'?: string;

[key: string]: any;
[key: `v:${string}`]: string;
}

export interface MessagesSendAPIResponse {
Expand Down