@pagopa/io-app-email-templates 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,51 @@
1
+ # io-app-email-templates
2
+
3
+ This repo contains the mail template(s) sent on behalf of IO App and its services. Templates are created using [MJML](https://mjml.io/) markup language along with typescript files.
4
+
5
+ ## How to apply changes
6
+
7
+ To edit them, you can choose among these following options:
8
+
9
+ - [Online editor](https://mjml.io/try-it-live)
10
+ - [Local installation](https://mjml.io/download)
11
+ - [Visual Studio Code plugin](https://marketplace.visualstudio.com/items?itemName=mjmlio.vscode-mjml)
12
+
13
+ To generate the HTML output you need to install the following CLI tool:
14
+
15
+ 1. [MJML](https://www.npmjs.com/package/mjml) package:
16
+
17
+ ```shell
18
+ $ npm install -g mjml && mjml <MJML_INPUT_FILE> -o <OUTPUT_FILE>
19
+ ```
20
+
21
+ ## Add a new template
22
+ Steps:
23
+ 1. Create a directory on the root of the project with a name of your choice.
24
+ 2. Put an `apply` method in a typescript file named `applier.template.ts` inside your template directory.
25
+ 3. Put a generation step inside `package.json`(follow the other scripts as example). This will generate an `index.ts` file with the template inside.
26
+ Make sure to put `{{TEMPLATE}}` in the method that is going to be replaced with the HTML generated from the mjml file.
27
+ 4. Generate a snapshot test to make sure the content doesn't change unexpectedly
28
+
29
+ ## Compatibility
30
+
31
+ Templates are compatible with the following clients:
32
+
33
+ - Apple Mail 13+ (dark mode included)
34
+ - Gmail Web app
35
+ - OL Office 365 (dark mode included, partially supported on Windows)
36
+ - Outlook 2013, 2016, 2019, 2021 (dark mode included, partially supported on Windows)
37
+ - Windows 10 Mail (dark mode partially supported)
38
+ - Windows 11 Mail
39
+ - Gmail App (Android 6+, dark mode partially supported)
40
+ - Gmail App (iOS 13.1+, dark mode partially supported)
41
+ - iPad (iOS 13.1+)
42
+ - iPhone (iOS 13.1+)
43
+ - AOL Mail
44
+ - Outlook.com Mail (dark mode partially supported)
45
+ - Yahoo! Mail
46
+
47
+ ### Related mail templates
48
+
49
+ - [Area Riservata (former SelfCare)](https://github.com/pagopa/selfcare-email-templates)
50
+ - [Piattaforma Notifiche](https://github.com/pagopa/pn-email-templates)
51
+ - [pagoPA](https://github.com/pagopa/pagopa-email-templates)
@@ -0,0 +1,4 @@
1
+ import { NonEmptyString } from "@pagopa/ts-commons/lib/strings";
2
+ import { DateFromTimestamp } from "@pagopa/ts-commons/lib/dates";
3
+ import { ValidUrl } from "@pagopa/ts-commons/lib/url";
4
+ export declare const apply: (name: NonEmptyString, identityProvider: NonEmptyString, dateTime: DateFromTimestamp, ipAddress: NonEmptyString, accessRefUrl: ValidUrl) => string;