Skip to content

feat: ListEmailTemplates for SES v2 #59

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

Merged
merged 6 commits into from
Aug 10, 2025

Conversation

eggplants
Copy link
Contributor

@eggplants eggplants commented Aug 9, 2025

Resolves: #58 / Fixes: #51

In addition, I've set up Dev Container to facilitate development.

Demo
npm run dev

> aws-ses-v2-local@2.7.0 dev
> npm run build:watch && npm run start


> aws-ses-v2-local@2.7.0 build:watch
> npm run build --watch


> aws-ses-v2-local@2.7.0 build
> tsc --project tsconfig.build.json


> aws-ses-v2-local@2.7.0 start
> nodemon ./dist/cli.js

[nodemon] 3.1.10
[nodemon] to restart at any time, enter `rs`
[nodemon] watching path(s): *.*
[nodemon] watching extensions: js,mjs,cjs,json
[nodemon] starting `node ./dist/cli.js`
aws-ses-v2-local: starting server...
aws-ses-v2-local: server running at http://localhost:8005
for i in {1..10};do aws sesv2 create-email-template --template-name "$RANDOM" --template-content '{"Subject":"a","Text":"a"}';doneaws sesv2 list-email-templates --page-size 1 --no-cli-pager
{
    "TemplatesMetadata": [
        {
            "TemplateName": "22608",
            "CreatedTimestamp": "2025-08-09T21:09:28.192000+00:00"
        }
    ],
    "NextToken": "aws-ses-v2-local-mocked-22608"
}aws sesv2 list-email-templates --page-size 1 --next-token aws-ses-v2-local-mocked-22608 --no-cli-pager
{
    "TemplatesMetadata": [
        {
            "TemplateName": "12866",
            "CreatedTimestamp": "2025-08-09T21:09:28.519000+00:00"
        }
    ],
    "NextToken": "aws-ses-v2-local-mocked-12866"
}aws sesv2 list-email-templates --no-cli-pager                                                         
{
    "TemplatesMetadata": [
        {
            "TemplateName": "22608",
            "CreatedTimestamp": "2025-08-09T21:09:28.192000+00:00"
        },
        {
            "TemplateName": "12866",
            "CreatedTimestamp": "2025-08-09T21:09:28.519000+00:00"
        },
        {
            "TemplateName": "226",
            "CreatedTimestamp": "2025-08-09T21:09:28.862000+00:00"
        },
        {
            "TemplateName": "13892",
            "CreatedTimestamp": "2025-08-09T21:09:29.203000+00:00"
        },
        {
            "TemplateName": "980",
            "CreatedTimestamp": "2025-08-09T21:09:29.541000+00:00"
        },
        {
            "TemplateName": "28759",
            "CreatedTimestamp": "2025-08-09T21:09:29.878000+00:00"
        },
        {
            "TemplateName": "10069",
            "CreatedTimestamp": "2025-08-09T21:09:30.218000+00:00"
        },
        {
            "TemplateName": "10791",
            "CreatedTimestamp": "2025-08-09T21:09:30.558000+00:00"
        },
        {
            "TemplateName": "27629",
            "CreatedTimestamp": "2025-08-09T21:09:30.895000+00:00"
        },
        {
            "TemplateName": "22706",
            "CreatedTimestamp": "2025-08-09T21:09:31.233000+00:00"
        }
    ]
}

Copy link
Owner

@domdomegg domdomegg left a comment

Choose a reason for hiding this comment

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

Thank you! I'm happy to approve:

  • Adding the list templates endpoint
  • Changing the start script to use nodemon, although I'd probably keep npm start (with nodemon) as the recommended path in README

I think I'm less sold on devcontainers after using them a bit more for some other projects. While they're nice for some setup, they can also cause lag/slowness, and pain about port forwarding on different systems. Maybe we can spin that out as a separate PR that we can discuss more there?

@eggplants eggplants force-pushed the list-email-templates branch from c7ae195 to 1c9dbca Compare August 10, 2025 13:23
@eggplants eggplants requested a review from domdomegg August 10, 2025 13:23
@eggplants
Copy link
Contributor Author

Dropped: bffb870

Copy link
Owner

@domdomegg domdomegg left a comment

Choose a reason for hiding this comment

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

LGTM, thanks 🙌

@domdomegg domdomegg merged commit dd80a57 into domdomegg:master Aug 10, 2025
5 checks passed
@domdomegg
Copy link
Owner

Releasd in v2.8.0

@eggplants eggplants deleted the list-email-templates branch August 10, 2025 16:56
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.

feat: ListEmailTemplates for SES v2 templates is empty after creating template in /store
2 participants