@storecraft/mailer-providers-http 1.0.0 → 1.0.1

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 CHANGED
@@ -1,5 +1,10 @@
1
1
  # `storecraft` Official serverless http email providers
2
2
 
3
+ <div style="text-align:center">
4
+ <img src='https://storecraft.app/storecraft-color.svg'
5
+ width='90%'' />
6
+ </div><hr/><br/>
7
+
3
8
  Supports wellknown http-based `serverless` friendly `email` providers,
4
9
 
5
10
  - [Sendgrid](https://docs.sendgrid.com/api-reference/mail-send/mail-send)
@@ -9,6 +14,10 @@ Supports wellknown http-based `serverless` friendly `email` providers,
9
14
 
10
15
  > TODO: confirm tests
11
16
 
17
+ ```bash
18
+ npm i @storecraft/mailer-providers-http
19
+ ```
20
+
12
21
  ## Howto
13
22
 
14
23
  ### Sendgrid
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- export * as mailchimp from './mailchimp/index.js'
2
- export * as mailgun from './mailgun/index.js'
3
- export * as resend from './resend/index.js'
4
- export * as sendgrid from './sendgrid/index.js'
1
+ export * as mailchimp from './mailchimp/adapter.js'
2
+ export * as mailgun from './mailgun/adapter.js'
3
+ export * as resend from './resend/adapter.js'
4
+ export * as sendgrid from './sendgrid/adapter.js'
@@ -1,7 +1,7 @@
1
1
  import { convert_to_base64 } from "./adapter.utils.js";
2
2
 
3
3
  /**
4
- * @typedef {import("./types.public.js").Config} Config
4
+ * @typedef {import("./types.public.d.ts").Config} Config
5
5
  * @typedef {import('@storecraft/core/v-mailer').mailer<Config>} mailer
6
6
  * @implements {mailer}
7
7
  *
@@ -1,11 +1,8 @@
1
1
  {
2
- "compileOnSave": false,
3
2
  "compilerOptions": {
4
- "noEmit": true,
5
- "allowJs": true,
6
3
  "checkJs": true,
4
+ "maxNodeModuleJsDepth": 10,
7
5
  "target": "ESNext",
8
- "resolveJsonModule": true,
9
6
  "moduleResolution": "NodeNext",
10
7
  "module": "NodeNext",
11
8
  "composite": true,
@@ -1,9 +1,13 @@
1
- export * from './index.js';
1
+ export { MailerMailChimp } from './adapter.js';
2
2
 
3
3
  /**
4
- * config
4
+ * @description `Mailchimp` config
5
5
  */
6
6
  export type Config = {
7
+
8
+ /**
9
+ * @description Your API Key
10
+ */
7
11
  apikey: string,
8
12
 
9
13
  };
@@ -2,7 +2,7 @@ import { base64 } from "@storecraft/core/v-crypto";
2
2
  import { address_to_friendly_name, convert_attachment_to_blob } from "./adapter.utils.js";
3
3
 
4
4
  /**
5
- * @typedef {import("./types.public.js").Config} Config
5
+ * @typedef {import("./types.public.d.ts").Config} Config
6
6
  * @typedef {import('@storecraft/core/v-mailer').mailer<Config>} mailer
7
7
  * @implements {mailer}
8
8
  *
@@ -1,11 +1,8 @@
1
1
  {
2
- "compileOnSave": false,
3
2
  "compilerOptions": {
4
- "noEmit": true,
5
- "allowJs": true,
6
3
  "checkJs": true,
4
+ "maxNodeModuleJsDepth": 10,
7
5
  "target": "ESNext",
8
- "resolveJsonModule": true,
9
6
  "moduleResolution": "NodeNext",
10
7
  "module": "NodeNext",
11
8
  "composite": true,
@@ -1,12 +1,17 @@
1
- export * from './index.js';
1
+ export { MailerMailgun } from './adapter.js';
2
2
 
3
3
  /**
4
- * config
4
+ * @description `mailgun` config
5
5
  */
6
6
  export type Config = {
7
- /** your mailgun api key */
7
+ /**
8
+ * @description your mailgun api key
9
+ */
8
10
  apikey: string,
9
- /** your registered domain name at mailgun */
11
+
12
+ /**
13
+ * @description your registered domain name at `mailgun`
14
+ */
10
15
  domain_name: string;
11
16
  };
12
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storecraft/mailer-providers-http",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Official Serverless Friendly e-mail adapters for storecraft",
5
5
  "license": "MIT",
6
6
  "author": "Tomer Shalev (https://github.com/store-craft)",
@@ -29,19 +29,19 @@
29
29
  },
30
30
  "./package.json": "./package.json",
31
31
  "./mailchimp": {
32
- "import": "./mailchimp/index.js",
32
+ "import": "./mailchimp/adapter.js",
33
33
  "types": "./mailchimp/types.public.d.ts"
34
34
  },
35
35
  "./mailgun": {
36
- "import": "./mailgun/index.js",
36
+ "import": "./mailgun/adapter.js",
37
37
  "types": "./mailgun/types.public.d.ts"
38
38
  },
39
39
  "./resend": {
40
- "import": "./resend/index.js",
40
+ "import": "./resend/adapter.js",
41
41
  "types": "./resend/types.public.d.ts"
42
42
  },
43
43
  "./sendgrid": {
44
- "import": "./sendgrid/index.js",
44
+ "import": "./sendgrid/adapter.js",
45
45
  "types": "./sendgrid/types.public.d.ts"
46
46
  }
47
47
  },
package/resend/adapter.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { address_to_friendly_name, convert_to_base64 } from "./adapter.utils.js";
2
2
 
3
3
  /**
4
- * @typedef {import("./types.public.js").Config} Config
4
+ * @typedef {import("./types.public.d.ts").Config} Config
5
5
  * @typedef {import('@storecraft/core/v-mailer').mailer<Config>} mailer
6
6
  * @implements {mailer}
7
7
  *
@@ -1,11 +1,8 @@
1
1
  {
2
- "compileOnSave": false,
3
2
  "compilerOptions": {
4
- "noEmit": true,
5
- "allowJs": true,
6
3
  "checkJs": true,
4
+ "maxNodeModuleJsDepth": 10,
7
5
  "target": "ESNext",
8
- "resolveJsonModule": true,
9
6
  "moduleResolution": "NodeNext",
10
7
  "module": "NodeNext",
11
8
  "composite": true,
@@ -1,9 +1,12 @@
1
- export * from './index.js';
1
+ export { MailerResend } from './adapter.js';
2
2
 
3
3
  /**
4
- * config
4
+ * @description `Resend` config
5
5
  */
6
6
  export type Config = {
7
+ /**
8
+ * @description Your API Key
9
+ */
7
10
  apikey: string,
8
11
  };
9
12
 
@@ -1,7 +1,7 @@
1
1
  import { convert_to_base64 } from "./adapter.utils.js";
2
2
 
3
3
  /**
4
- * @typedef {import("./types.public.js").Config} Config
4
+ * @typedef {import("./types.public.d.ts").Config} Config
5
5
  * @typedef {import('@storecraft/core/v-mailer').mailer<Config>} mailer
6
6
  * @implements {mailer}
7
7
  *
@@ -1,11 +1,8 @@
1
1
  {
2
- "compileOnSave": false,
3
2
  "compilerOptions": {
4
- "noEmit": true,
5
- "allowJs": true,
6
3
  "checkJs": true,
4
+ "maxNodeModuleJsDepth": 10,
7
5
  "target": "ESNext",
8
- "resolveJsonModule": true,
9
6
  "moduleResolution": "NodeNext",
10
7
  "module": "NodeNext",
11
8
  "composite": true,
@@ -1,9 +1,13 @@
1
- export * from './index.js';
1
+ export { MailerSendGrid } from './adapter.js';
2
2
 
3
3
  /**
4
- * config
4
+ * @description `sendgrid` config
5
5
  */
6
6
  export type Config = {
7
+
8
+ /**
9
+ * @description Your API Key
10
+ */
7
11
  apikey: string,
8
12
 
9
13
  };
@@ -1 +0,0 @@
1
- export * from './adapter.js'
package/mailgun/index.js DELETED
@@ -1 +0,0 @@
1
- export * from './adapter.js'
package/resend/index.js DELETED
@@ -1 +0,0 @@
1
- export * from './adapter.js'
package/sendgrid/index.js DELETED
@@ -1 +0,0 @@
1
- export * from './adapter.js'