Closed ColinFrick closed 1 year ago
@vcampitelli did you have a chance to look at this?
@vcampitelli can you take another look, please?
I pushed f1a38d94278af88ec41b8592a03947faa5ae761b to remove an export
because the script was trying to add it as a command and it's just a helper function.
src/index.ts:23:63 - error TS2345: Argument of type 'Command<[], { output: string; locales: [] | string[]; }> | Command<[string | undefined], { output: string; }> | Command<[string | undefined], { output: string; key: string; host: string; clean: boolean; }> | ... 8 more ... | Command<...>' is not assignable to parameter of type 'CommandUnknownOpts'.
Type '(emailTemplate: EmailTemplate) => string[]' is not assignable to type 'Command<unknown[], OptionValues>'.
23 Object.values(commands).forEach(command => program.addCommand(command));
``` ~~~~~~~
This PR adds the following email commands:
fusionauth email:create
- Create a new email template locally.fusionauth email:download
- Download a specific template or all email templates from a FusionAuth server.fusionauth email:duplicate
- Duplicate an email template locally.fusionauth email:html-to-text
- Convert HTML email templates to text, where the text template is missing.fusionauth email:upload
- Upload a specific template or all email templates to a FusionAuth server.fusionauth email:watch
- Watch the email template directory and upload changes to a FusionAuth server.The email directory is as follows:
So we have a directory for each template containing the base properties and default templates. Locales are subdirectory containing the localized templates.
Closes #2