postmark-cli icon indicating copy to clipboard operation
postmark-cli copied to clipboard

feat: add support for `templates delete` command

Open rlueder opened this issue 2 years ago • 1 comments

This is an implementation of a postmark templates delete command, allowing users to delete by id or alias (one or multiple) or all templates from their server.

$ postmark templates delete

> postmark templates delete
? Please enter your server token ••••••••••••••••••••••••••••••••••••
? Choose how you want to delete templates: Delete templates by id
? Enter template id(s) - separated by commas if multiple: 33336536, 33336535, 33336549
All finished! 3 templates have been deleted.
> postmark templates delete
? Please enter your server token ••••••••••••••••••••••••••••••••••••
? Choose how you want to delete templates: Delete all templates
? Which template type do you want to delete? Templates
? Delete ALL templates? Are you sure? yes
? Enter "delete all templates" to confirm: delete all templates
All finished! 80 templates have been deleted.
> postmark templates delete
? Please enter your server token ••••••••••••••••••••••••••••••••••••
? Choose how you want to delete templates: Delete all templates
? Which template type do you want to delete? Layouts
? Delete ALL templates? Are you sure? yes
? Enter "delete all templates" to confirm: delete all templates
All finished! 4 templates have been deleted.

rlueder avatar Sep 30 '23 06:09 rlueder

@derekrushforth @tomek-ac just checking in on this PR, I used it again a couple of weeks ago and it worked pretty well. Would love to have this be part of the library instead of having to run my own fork. Let me know if you need anything else to get this merged. Thanks!

rlueder avatar Jan 23 '24 20:01 rlueder