@stacksjs/email 0.58.72 → 0.59.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 +0 -1
- package/dist/drivers/index.d.ts +1 -0
- package/dist/drivers/ses.d.ts +1 -0
- package/dist/email.d.ts +19 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +66 -274
- package/dist/template.d.ts +6 -0
- package/dist/types.d.ts +41 -0
- package/package.json +4 -31
- package/src/drivers/index.ts +2 -8
- package/src/drivers/mailgun.ts +21 -21
- package/src/drivers/nodemailer.ts +23 -23
- package/src/drivers/ses.ts +18 -17
- package/src/email.ts +84 -0
- package/src/index.ts +2 -0
- package/src/send.ts +22 -25
- package/src/server/converter.ts +305 -305
- package/src/server/inbound.ts +406 -406
- package/src/server/outbound.ts +296 -296
- package/src/template.ts +18 -0
- package/src/types.ts +39 -0
- package/src/drivers/emailjs.ts +0 -23
- package/src/drivers/mailjet.ts +0 -21
- package/src/drivers/mandrill.ts +0 -19
- package/src/drivers/netcore.ts +0 -19
- package/src/drivers/postmark.ts +0 -19
- package/src/drivers/sendgrid.ts +0 -20
- package/src/tailwind.config.ts +0 -39
- package/src/utils/template.html +0 -8
package/src/drivers/emailjs.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { EmailJsProvider } from '@novu/emailjs'
|
|
2
|
-
import type { EmailOptions } from '@stacksjs/types'
|
|
3
|
-
import type { ResultAsync } from '@stacksjs/error-handling'
|
|
4
|
-
import { notification } from '@stacksjs/config'
|
|
5
|
-
import { send as sendEmail } from '../send'
|
|
6
|
-
|
|
7
|
-
const env = notification.email
|
|
8
|
-
const service = notification.email?.drivers.emailjs
|
|
9
|
-
|
|
10
|
-
const provider = new EmailJsProvider({
|
|
11
|
-
from: env?.from.address || '',
|
|
12
|
-
host: service?.host || '',
|
|
13
|
-
user: service?.user,
|
|
14
|
-
password: service?.password,
|
|
15
|
-
port: service?.port || 587,
|
|
16
|
-
secure: service?.secure,
|
|
17
|
-
})
|
|
18
|
-
|
|
19
|
-
async function send(options: EmailOptions, css?: string): Promise<ResultAsync<any, Error>> {
|
|
20
|
-
return sendEmail(options, provider, 'EmailJS', css)
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export { send as Send, send }
|
package/src/drivers/mailjet.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { MailjetEmailProvider } from '@novu/mailjet'
|
|
2
|
-
import type { EmailOptions } from '@stacksjs/types'
|
|
3
|
-
import type { ResultAsync } from '@stacksjs/error-handling'
|
|
4
|
-
import { notification } from '@stacksjs/config'
|
|
5
|
-
import { send as sendEmail } from '../send'
|
|
6
|
-
|
|
7
|
-
const env = notification.email
|
|
8
|
-
const service = notification.email?.drivers.mailjet
|
|
9
|
-
|
|
10
|
-
const provider = new MailjetEmailProvider({
|
|
11
|
-
apiKey: service?.key || '',
|
|
12
|
-
apiSecret: service?.secret || '',
|
|
13
|
-
from: env?.from.address || '',
|
|
14
|
-
senderName: env?.from.name || '', // look into what exactly this stands for
|
|
15
|
-
})
|
|
16
|
-
|
|
17
|
-
async function send(options: EmailOptions, css?: string): Promise<ResultAsync<any, Error>> {
|
|
18
|
-
return sendEmail(options, provider, 'Mailjet', css)
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export { send as Send, send }
|
package/src/drivers/mandrill.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
// import { MandrillProvider } from '@novu/mandrill'
|
|
2
|
-
// import type { EmailOptions } from '@stacksjs/types'
|
|
3
|
-
// import { notification } from '@stacksjs/config'
|
|
4
|
-
// import type { ResultAsync } from '@stacksjs/error-handling'
|
|
5
|
-
// import { send as sendEmail } from '../actions/send'
|
|
6
|
-
|
|
7
|
-
// const env = notification.email
|
|
8
|
-
// const service = notification.email?.drivers.mandrill
|
|
9
|
-
|
|
10
|
-
// const provider = new MandrillProvider({
|
|
11
|
-
// apiKey: service?.key || '',
|
|
12
|
-
// from: env?.from.address || '',
|
|
13
|
-
// })
|
|
14
|
-
|
|
15
|
-
// async function send(options: EmailOptions, css?: string): Promise<ResultAsync<any, Error>> {
|
|
16
|
-
// return sendEmail(options, provider, 'Mandrill', css)
|
|
17
|
-
// }
|
|
18
|
-
|
|
19
|
-
// export { send as Send, send }
|
package/src/drivers/netcore.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { NetCoreProvider } from '@novu/netcore'
|
|
2
|
-
import type { EmailOptions } from '@stacksjs/types'
|
|
3
|
-
import type { ResultAsync } from '@stacksjs/error-handling'
|
|
4
|
-
import { notification } from '@stacksjs/config'
|
|
5
|
-
import { send as sendEmail } from '../send'
|
|
6
|
-
|
|
7
|
-
const env = notification.email
|
|
8
|
-
const service = notification.email?.drivers.netcore
|
|
9
|
-
|
|
10
|
-
const provider = new NetCoreProvider({
|
|
11
|
-
apiKey: service?.key || '',
|
|
12
|
-
from: env?.from.address || '',
|
|
13
|
-
})
|
|
14
|
-
|
|
15
|
-
async function send(options: EmailOptions, css?: string): Promise<ResultAsync<any, Error>> {
|
|
16
|
-
return sendEmail(options, provider, 'Netcore', css)
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export { send as Send, send }
|
package/src/drivers/postmark.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { PostmarkEmailProvider } from '@novu/postmark'
|
|
2
|
-
import type { EmailOptions } from '@stacksjs/types'
|
|
3
|
-
import type { ResultAsync } from '@stacksjs/error-handling'
|
|
4
|
-
import { notification } from '@stacksjs/config'
|
|
5
|
-
import { send as sendEmail } from '../send'
|
|
6
|
-
|
|
7
|
-
const env = notification.email
|
|
8
|
-
const service = notification.email?.drivers.postmark
|
|
9
|
-
|
|
10
|
-
const provider = new PostmarkEmailProvider({
|
|
11
|
-
apiKey: service?.key || '',
|
|
12
|
-
from: env?.from.address || '',
|
|
13
|
-
})
|
|
14
|
-
|
|
15
|
-
async function send(options: EmailOptions, css?: string): Promise<ResultAsync<any, Error>> {
|
|
16
|
-
return sendEmail(options, provider, 'Postmark', css)
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export { send as Send, send }
|
package/src/drivers/sendgrid.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { SendgridEmailProvider } from '@novu/sendgrid'
|
|
2
|
-
import type { EmailOptions } from '@stacksjs/types'
|
|
3
|
-
import type { ResultAsync } from '@stacksjs/error-handling'
|
|
4
|
-
import { notification } from '@stacksjs/config'
|
|
5
|
-
import { send as sendEmail } from '../send'
|
|
6
|
-
|
|
7
|
-
const env = notification.email
|
|
8
|
-
const service = notification.email?.drivers.sendgrid
|
|
9
|
-
|
|
10
|
-
const driver = new SendgridEmailProvider({
|
|
11
|
-
apiKey: service?.key || '',
|
|
12
|
-
from: env?.from.address || '',
|
|
13
|
-
senderName: service?.senderName || '',
|
|
14
|
-
})
|
|
15
|
-
|
|
16
|
-
async function send(options: EmailOptions, css?: string): Promise<ResultAsync<any, Error>> {
|
|
17
|
-
return sendEmail(options, driver, 'Sendgrid', css)
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export { send as Send, send }
|
package/src/tailwind.config.ts
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
// import { notification } from '@stacksjs/config'
|
|
2
|
-
|
|
3
|
-
// const email = notification.email
|
|
4
|
-
|
|
5
|
-
export const config = {
|
|
6
|
-
// ...email?.build,
|
|
7
|
-
theme: {
|
|
8
|
-
screens: {
|
|
9
|
-
sm: '480px',
|
|
10
|
-
md: '768px',
|
|
11
|
-
lg: '976px',
|
|
12
|
-
xl: '1440px',
|
|
13
|
-
},
|
|
14
|
-
colors: {
|
|
15
|
-
'blue': '#1fb6ff',
|
|
16
|
-
'purple': '#7e5bef',
|
|
17
|
-
'pink': '#ff49db',
|
|
18
|
-
'orange': '#ff7849',
|
|
19
|
-
'green': '#13ce66',
|
|
20
|
-
'yellow': '#ffc82c',
|
|
21
|
-
'gray-dark': '#273444',
|
|
22
|
-
'gray': '#8492a6',
|
|
23
|
-
'gray-light': '#d3dce6',
|
|
24
|
-
},
|
|
25
|
-
fontFamily: {
|
|
26
|
-
sans: ['Graphik', 'sans-serif'],
|
|
27
|
-
serif: ['Merriweather', 'serif'],
|
|
28
|
-
},
|
|
29
|
-
extend: {
|
|
30
|
-
spacing: {
|
|
31
|
-
128: '32rem',
|
|
32
|
-
144: '36rem',
|
|
33
|
-
},
|
|
34
|
-
borderRadius: {
|
|
35
|
-
'4xl': '2rem',
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
}
|