Skip to content

Conversation

TyMick
Copy link

@TyMick TyMick commented Sep 29, 2025

I added these tools for my Resend MCP Hackathon entry. It would probably be easiest to review one commit at a time.

Note that this PR depends on #19 (and currently includes all of its commits).

Everything in the previous "Unreleased" section was actually released in
v1.1.0, so I merged its contents with the 1.1.0 section and added a new
Unreleased section at the top for future changes.
Not crucial, since this isn't an npm package, but we may as well.
I'm planning on adding several more after this.
Comment on lines +187 to +197
text: [
`ID: ${id}`,
`Name: ${name}`,
audience_id !== null && `Audience ID: ${audience_id}`,
`Status: ${status}`,
`Created at: ${created_at}`,
scheduled_at !== null && `Scheduled at: ${scheduled_at}`,
sent_at !== null && `Sent at: ${sent_at}`,
]
.filter(Boolean)
.join('\n'),
Copy link
Author

@TyMick TyMick Sep 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've got grand plans to replace this with a fancy tagged template function that could be called like

text: lines`
  ID: ${id}
  Name: ${name}
  ${audience_id !== null && `Audience ID: ${audience_id}`}
  Status: ${status}
  Created at: ${created_at}
  ${scheduled_at !== null && `Scheduled at: ${scheduled_at}`}
  ${sent_at !== null && `Sent at: ${sent_at}`}
`,

But we'll see if I get around to it. This isn't too bad as-is, I think.

Comment on lines +153 to +156
// TODO: Fix `first_name` type in SDK. It's actually returning `string | null`, not `string | undefined`.
contact.first_name != null && `First name: ${contact.first_name}`,
// TODO: Fix `last_name` type in SDK. It's actually returning `string | null`, not `string | undefined`.
contact.last_name != null && `Last name: ${contact.last_name}`,
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines +201 to +203
// TODO: Fix `firstName` and `lastName` types in SDK. Passing `null` to one of these is the only way to remove a contact's first or last name.
firstName: firstName as string | undefined,
lastName: lastName as string | undefined,
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant