@stacksjs/notifications 0.43.0 → 0.44.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/dist/config.cjs +9 -0
- package/dist/config.d.ts +7 -0
- package/dist/config.mjs +7 -0
- package/package.json +16 -12
- package/dist/drivers/chat/discord.d.ts +0 -4
- package/dist/drivers/chat/discord.mjs +0 -11
- package/dist/drivers/chat/index.d.ts +0 -2
- package/dist/drivers/chat/index.mjs +0 -2
- package/dist/drivers/chat/slack.d.ts +0 -4
- package/dist/drivers/chat/slack.mjs +0 -17
- package/dist/drivers/email/emailjs.d.ts +0 -4
- package/dist/drivers/email/emailjs.mjs +0 -20
- package/dist/drivers/email/index.d.ts +0 -9
- package/dist/drivers/email/index.mjs +0 -9
- package/dist/drivers/email/mailgun.d.ts +0 -4
- package/dist/drivers/email/mailgun.mjs +0 -18
- package/dist/drivers/email/mailjet.d.ts +0 -4
- package/dist/drivers/email/mailjet.mjs +0 -17
- package/dist/drivers/email/mandrill.d.ts +0 -4
- package/dist/drivers/email/mandrill.mjs +0 -16
- package/dist/drivers/email/netcore.d.ts +0 -4
- package/dist/drivers/email/netcore.mjs +0 -16
- package/dist/drivers/email/nodemailer.d.ts +0 -4
- package/dist/drivers/email/nodemailer.mjs +0 -20
- package/dist/drivers/email/postmark.d.ts +0 -4
- package/dist/drivers/email/postmark.mjs +0 -16
- package/dist/drivers/email/sendgrid.d.ts +0 -4
- package/dist/drivers/email/sendgrid.mjs +0 -17
- package/dist/drivers/email/ses.d.ts +0 -4
- package/dist/drivers/email/ses.mjs +0 -18
- package/dist/drivers/sms/gupshup.d.ts +0 -4
- package/dist/drivers/sms/gupshup.mjs +0 -16
- package/dist/drivers/sms/index.d.ts +0 -8
- package/dist/drivers/sms/index.mjs +0 -8
- package/dist/drivers/sms/nexmo.d.ts +0 -4
- package/dist/drivers/sms/nexmo.mjs +0 -17
- package/dist/drivers/sms/plivo.d.ts +0 -4
- package/dist/drivers/sms/plivo.mjs +0 -17
- package/dist/drivers/sms/sms77.d.ts +0 -4
- package/dist/drivers/sms/sms77.mjs +0 -16
- package/dist/drivers/sms/sns.d.ts +0 -4
- package/dist/drivers/sms/sns.mjs +0 -17
- package/dist/drivers/sms/telnyx.d.ts +0 -4
- package/dist/drivers/sms/telnyx.mjs +0 -17
- package/dist/drivers/sms/termii.d.ts +0 -4
- package/dist/drivers/sms/termii.mjs +0 -16
- package/dist/drivers/sms/twilio.d.ts +0 -4
- package/dist/drivers/sms/twilio.mjs +0 -17
- package/dist/index.d.ts +0 -3
- package/dist/index.mjs +0 -3
package/dist/config.cjs
ADDED
package/dist/config.d.ts
ADDED
package/dist/config.mjs
ADDED
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacksjs/notifications",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
5
|
-
"packageManager": "pnpm@7.
|
|
4
|
+
"version": "0.44.6",
|
|
5
|
+
"packageManager": "pnpm@7.18.2",
|
|
6
6
|
"description": "The Stacks notifications integration.",
|
|
7
7
|
"author": "Chris Breuer",
|
|
8
8
|
"license": "MIT",
|
|
@@ -27,7 +27,9 @@
|
|
|
27
27
|
"slack",
|
|
28
28
|
"discord",
|
|
29
29
|
"webhooks",
|
|
30
|
-
"stacks"
|
|
30
|
+
"stacks",
|
|
31
|
+
"Maizzle",
|
|
32
|
+
"maizzle"
|
|
31
33
|
],
|
|
32
34
|
"main": "dist/index.mjs",
|
|
33
35
|
"module": "dist/index.mjs",
|
|
@@ -41,9 +43,10 @@
|
|
|
41
43
|
],
|
|
42
44
|
"engines": {
|
|
43
45
|
"node": ">=v18.12.1",
|
|
44
|
-
"pnpm": ">=7.
|
|
46
|
+
"pnpm": ">=7.18.2"
|
|
45
47
|
},
|
|
46
48
|
"peerDependencies": {
|
|
49
|
+
"@maizzle/framework": "latest",
|
|
47
50
|
"@novu/discord": "^0.9.0",
|
|
48
51
|
"@novu/emailjs": "^0.9.0",
|
|
49
52
|
"@novu/gupshup": "^0.9.0",
|
|
@@ -65,19 +68,20 @@
|
|
|
65
68
|
"@novu/telnyx": "^0.9.0",
|
|
66
69
|
"@novu/termii": "^0.9.0",
|
|
67
70
|
"@novu/twilio": "^0.9.0",
|
|
68
|
-
"@stacksjs/cli": "0.
|
|
69
|
-
"@stacksjs/config": "0.
|
|
70
|
-
"@stacksjs/error-handling": "0.
|
|
71
|
-
"@stacksjs/types": "0.
|
|
71
|
+
"@stacksjs/cli": "0.44.6",
|
|
72
|
+
"@stacksjs/config": "0.44.6",
|
|
73
|
+
"@stacksjs/error-handling": "0.44.6",
|
|
74
|
+
"@stacksjs/types": "0.44.6"
|
|
72
75
|
},
|
|
73
76
|
"devDependencies": {
|
|
74
77
|
"mkdist": "^1.0.0",
|
|
75
|
-
"typescript": "^4.9.
|
|
76
|
-
"
|
|
78
|
+
"typescript": "^4.9.4",
|
|
79
|
+
"unbuild": "^1.0.2",
|
|
80
|
+
"@stacksjs/testing": "0.44.6"
|
|
77
81
|
},
|
|
78
82
|
"scripts": {
|
|
79
|
-
"build": "
|
|
80
|
-
"dev": "
|
|
83
|
+
"build": "unbuild",
|
|
84
|
+
"dev": "unbuild --stub",
|
|
81
85
|
"typecheck": "tsc --noEmit"
|
|
82
86
|
}
|
|
83
87
|
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { DiscordProvider } from "@novu/discord";
|
|
2
|
-
import { italic } from "@stacksjs/cli";
|
|
3
|
-
import { ResultAsync } from "@stacksjs/error-handling";
|
|
4
|
-
const provider = new DiscordProvider({});
|
|
5
|
-
function send(options) {
|
|
6
|
-
return ResultAsync.fromPromise(
|
|
7
|
-
provider.sendMessage(options),
|
|
8
|
-
() => new Error(`Failed to send message using provider: ${italic("Discord")}`)
|
|
9
|
-
);
|
|
10
|
-
}
|
|
11
|
-
export { send as Send, send };
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { SlackProvider } from "@novu/slack";
|
|
2
|
-
import { italic } from "@stacksjs/cli";
|
|
3
|
-
import { ResultAsync } from "@stacksjs/error-handling";
|
|
4
|
-
import { notification } from "@stacksjs/config";
|
|
5
|
-
const env = notification.chat.slack;
|
|
6
|
-
const provider = new SlackProvider({
|
|
7
|
-
applicationId: env.appId,
|
|
8
|
-
clientId: env.clientID,
|
|
9
|
-
secretKey: env.secret
|
|
10
|
-
});
|
|
11
|
-
function send(options) {
|
|
12
|
-
return ResultAsync.fromPromise(
|
|
13
|
-
provider.sendMessage(options),
|
|
14
|
-
() => new Error(`Failed to send message using provider: ${italic("Slack")}`)
|
|
15
|
-
);
|
|
16
|
-
}
|
|
17
|
-
export { send as Send, send };
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { EmailJsProvider } from "@novu/emailjs";
|
|
2
|
-
import { italic } from "@stacksjs/cli";
|
|
3
|
-
import { ResultAsync } from "@stacksjs/error-handling";
|
|
4
|
-
import { notification } from "@stacksjs/config";
|
|
5
|
-
const env = notification.email.emailjs;
|
|
6
|
-
const provider = new EmailJsProvider({
|
|
7
|
-
from: env.from,
|
|
8
|
-
host: env.host,
|
|
9
|
-
user: env.user,
|
|
10
|
-
password: env.password,
|
|
11
|
-
port: env.port,
|
|
12
|
-
secure: env.secure
|
|
13
|
-
});
|
|
14
|
-
function send(options) {
|
|
15
|
-
return ResultAsync.fromPromise(
|
|
16
|
-
provider.sendMessage(options),
|
|
17
|
-
() => new Error(`Failed to send message using provider: ${italic("EmailJS")}`)
|
|
18
|
-
);
|
|
19
|
-
}
|
|
20
|
-
export { send as Send, send };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export * as sendgrid from './sendgrid';
|
|
2
|
-
export * as mailgun from './mailgun';
|
|
3
|
-
export * as mailjet from './mailjet';
|
|
4
|
-
export * as mandrill from './mandrill';
|
|
5
|
-
export * as netcore from './netcore';
|
|
6
|
-
export * as nodemailer from './nodemailer';
|
|
7
|
-
export * as postmark from './postmark';
|
|
8
|
-
export * as ses from './ses';
|
|
9
|
-
export * as emailjs from './emailjs';
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export * as sendgrid from "./sendgrid.mjs";
|
|
2
|
-
export * as mailgun from "./mailgun.mjs";
|
|
3
|
-
export * as mailjet from "./mailjet.mjs";
|
|
4
|
-
export * as mandrill from "./mandrill.mjs";
|
|
5
|
-
export * as netcore from "./netcore.mjs";
|
|
6
|
-
export * as nodemailer from "./nodemailer.mjs";
|
|
7
|
-
export * as postmark from "./postmark.mjs";
|
|
8
|
-
export * as ses from "./ses.mjs";
|
|
9
|
-
export * as emailjs from "./emailjs.mjs";
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { MailgunEmailProvider } from "@novu/mailgun";
|
|
2
|
-
import { italic } from "@stacksjs/cli";
|
|
3
|
-
import { ResultAsync } from "@stacksjs/error-handling";
|
|
4
|
-
import { notification } from "@stacksjs/config";
|
|
5
|
-
const env = notification.email.mailgun;
|
|
6
|
-
const provider = new MailgunEmailProvider({
|
|
7
|
-
apiKey: env.key,
|
|
8
|
-
domain: env.domain,
|
|
9
|
-
username: env.username,
|
|
10
|
-
from: env.from
|
|
11
|
-
});
|
|
12
|
-
function send(options) {
|
|
13
|
-
return ResultAsync.fromPromise(
|
|
14
|
-
provider.sendMessage(options),
|
|
15
|
-
() => new Error(`Failed to send message using provider: ${italic("Mailgun")}`)
|
|
16
|
-
);
|
|
17
|
-
}
|
|
18
|
-
export { send as Send, send };
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { MailjetEmailProvider } from "@novu/mailjet";
|
|
2
|
-
import { italic } from "@stacksjs/cli";
|
|
3
|
-
import { ResultAsync } from "@stacksjs/error-handling";
|
|
4
|
-
import { notification } from "@stacksjs/config";
|
|
5
|
-
const env = notification.email.mailjet;
|
|
6
|
-
const provider = new MailjetEmailProvider({
|
|
7
|
-
apiKey: env.key,
|
|
8
|
-
apiSecret: env.secret,
|
|
9
|
-
from: env.from
|
|
10
|
-
});
|
|
11
|
-
function send(options) {
|
|
12
|
-
return ResultAsync.fromPromise(
|
|
13
|
-
provider.sendMessage(options),
|
|
14
|
-
() => new Error(`Failed to send message using provider: ${italic("Mailjet")}`)
|
|
15
|
-
);
|
|
16
|
-
}
|
|
17
|
-
export { send as Send, send };
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { MandrillProvider } from "@novu/mandrill";
|
|
2
|
-
import { italic } from "@stacksjs/cli";
|
|
3
|
-
import { ResultAsync } from "@stacksjs/error-handling";
|
|
4
|
-
import { notification } from "@stacksjs/config";
|
|
5
|
-
const env = notification.email.mandrill;
|
|
6
|
-
const provider = new MandrillProvider({
|
|
7
|
-
apiKey: env.key,
|
|
8
|
-
from: env.from
|
|
9
|
-
});
|
|
10
|
-
function send(options) {
|
|
11
|
-
return ResultAsync.fromPromise(
|
|
12
|
-
provider.sendMessage(options),
|
|
13
|
-
() => new Error(`Failed to send message using provider: ${italic("Mandrill")}`)
|
|
14
|
-
);
|
|
15
|
-
}
|
|
16
|
-
export { send as Send, send };
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { NetCoreProvider } from "@novu/netcore";
|
|
2
|
-
import { italic } from "@stacksjs/cli";
|
|
3
|
-
import { ResultAsync } from "@stacksjs/error-handling";
|
|
4
|
-
import { notification } from "@stacksjs/config";
|
|
5
|
-
const env = notification.email.netcore;
|
|
6
|
-
const provider = new NetCoreProvider({
|
|
7
|
-
apiKey: env.key,
|
|
8
|
-
from: env.from
|
|
9
|
-
});
|
|
10
|
-
function send(options) {
|
|
11
|
-
return ResultAsync.fromPromise(
|
|
12
|
-
provider.sendMessage(options),
|
|
13
|
-
() => new Error(`Failed to send message using provider: ${italic("Netcore")}`)
|
|
14
|
-
);
|
|
15
|
-
}
|
|
16
|
-
export { send as Send, send };
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { NodemailerProvider } from "@novu/nodemailer";
|
|
2
|
-
import { italic } from "@stacksjs/cli";
|
|
3
|
-
import { ResultAsync } from "@stacksjs/error-handling";
|
|
4
|
-
import { notification } from "@stacksjs/config";
|
|
5
|
-
const env = notification.email.nodemailer;
|
|
6
|
-
const provider = new NodemailerProvider({
|
|
7
|
-
from: env.from,
|
|
8
|
-
host: env.host,
|
|
9
|
-
user: env.user,
|
|
10
|
-
password: env.password,
|
|
11
|
-
port: env.port,
|
|
12
|
-
secure: env.secure
|
|
13
|
-
});
|
|
14
|
-
function send(options) {
|
|
15
|
-
return ResultAsync.fromPromise(
|
|
16
|
-
provider.sendMessage(options),
|
|
17
|
-
() => new Error(`Failed to send message using provider: ${italic("Nodemailer")}`)
|
|
18
|
-
);
|
|
19
|
-
}
|
|
20
|
-
export { send as Send, send };
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { PostmarkEmailProvider } from "@novu/postmark";
|
|
2
|
-
import { italic } from "@stacksjs/cli";
|
|
3
|
-
import { ResultAsync } from "@stacksjs/error-handling";
|
|
4
|
-
import { notification } from "@stacksjs/config";
|
|
5
|
-
const env = notification.email.postmark;
|
|
6
|
-
const provider = new PostmarkEmailProvider({
|
|
7
|
-
apiKey: env.key,
|
|
8
|
-
from: env.from
|
|
9
|
-
});
|
|
10
|
-
function send(options) {
|
|
11
|
-
return ResultAsync.fromPromise(
|
|
12
|
-
provider.sendMessage(options),
|
|
13
|
-
() => new Error(`Failed to send message using provider: ${italic("PostMark")}`)
|
|
14
|
-
);
|
|
15
|
-
}
|
|
16
|
-
export { send as Send, send };
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { SendgridEmailProvider } from "@novu/sendgrid";
|
|
2
|
-
import { italic } from "@stacksjs/cli";
|
|
3
|
-
import { ResultAsync } from "@stacksjs/error-handling";
|
|
4
|
-
import { notification } from "@stacksjs/config";
|
|
5
|
-
const env = notification.email.sendgrid;
|
|
6
|
-
const provider = new SendgridEmailProvider({
|
|
7
|
-
apiKey: env.key,
|
|
8
|
-
from: env.from,
|
|
9
|
-
senderName: env.senderName
|
|
10
|
-
});
|
|
11
|
-
function send(options) {
|
|
12
|
-
return ResultAsync.fromPromise(
|
|
13
|
-
provider.sendMessage(options),
|
|
14
|
-
() => new Error(`Failed to send message using provider: ${italic("Sendgrid")}`)
|
|
15
|
-
);
|
|
16
|
-
}
|
|
17
|
-
export { send as Send, send };
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { SESEmailProvider } from "@novu/ses";
|
|
2
|
-
import { italic } from "@stacksjs/cli";
|
|
3
|
-
import { ResultAsync } from "@stacksjs/error-handling";
|
|
4
|
-
import { notification } from "@stacksjs/config";
|
|
5
|
-
const env = notification.email.ses;
|
|
6
|
-
const provider = new SESEmailProvider({
|
|
7
|
-
region: env.region,
|
|
8
|
-
accessKeyId: env.key,
|
|
9
|
-
secretAccessKey: env.secret,
|
|
10
|
-
from: env.from
|
|
11
|
-
});
|
|
12
|
-
function send(options) {
|
|
13
|
-
return ResultAsync.fromPromise(
|
|
14
|
-
provider.sendMessage(options),
|
|
15
|
-
() => new Error(`Failed to send message using provider: ${italic("SES")}`)
|
|
16
|
-
);
|
|
17
|
-
}
|
|
18
|
-
export { send as Send, send };
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { GupshupSmsProvider } from "@novu/gupshup";
|
|
2
|
-
import { italic } from "@stacksjs/cli";
|
|
3
|
-
import { ResultAsync } from "@stacksjs/error-handling";
|
|
4
|
-
import { notification } from "@stacksjs/config";
|
|
5
|
-
const env = notification.sms.gupshup;
|
|
6
|
-
const provider = new GupshupSmsProvider({
|
|
7
|
-
userId: env.user,
|
|
8
|
-
password: env.password
|
|
9
|
-
});
|
|
10
|
-
function send(options) {
|
|
11
|
-
return ResultAsync.fromPromise(
|
|
12
|
-
provider.sendMessage(options),
|
|
13
|
-
() => new Error(`Failed to send message using provider: ${italic("Gupshup")}`)
|
|
14
|
-
);
|
|
15
|
-
}
|
|
16
|
-
export { send as Send, send };
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export * as twilio from './twilio';
|
|
2
|
-
export * as plivo from './plivo';
|
|
3
|
-
export * as nexmo from './nexmo';
|
|
4
|
-
export * as sms77 from './sms77';
|
|
5
|
-
export * as sns from './sns';
|
|
6
|
-
export * as gupshup from './gupshup';
|
|
7
|
-
export * as telnyx from './telnyx';
|
|
8
|
-
export * as termii from './termii';
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export * as twilio from "./twilio.mjs";
|
|
2
|
-
export * as plivo from "./plivo.mjs";
|
|
3
|
-
export * as nexmo from "./nexmo.mjs";
|
|
4
|
-
export * as sms77 from "./sms77.mjs";
|
|
5
|
-
export * as sns from "./sns.mjs";
|
|
6
|
-
export * as gupshup from "./gupshup.mjs";
|
|
7
|
-
export * as telnyx from "./telnyx.mjs";
|
|
8
|
-
export * as termii from "./termii.mjs";
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { NexmoSmsProvider } from "@novu/nexmo";
|
|
2
|
-
import { italic } from "@stacksjs/cli";
|
|
3
|
-
import { ResultAsync } from "@stacksjs/error-handling";
|
|
4
|
-
import { notification } from "@stacksjs/config";
|
|
5
|
-
const env = notification.sms.nexmo;
|
|
6
|
-
const provider = new NexmoSmsProvider({
|
|
7
|
-
apiKey: env.key,
|
|
8
|
-
apiSecret: env.secret,
|
|
9
|
-
from: env.from
|
|
10
|
-
});
|
|
11
|
-
function send(options) {
|
|
12
|
-
return ResultAsync.fromPromise(
|
|
13
|
-
provider.sendMessage(options),
|
|
14
|
-
() => new Error(`Failed to send message using provider: ${italic("Nexmo")}`)
|
|
15
|
-
);
|
|
16
|
-
}
|
|
17
|
-
export { send as Send, send };
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { PlivoSmsProvider } from "@novu/plivo";
|
|
2
|
-
import { italic } from "@stacksjs/cli";
|
|
3
|
-
import { ResultAsync } from "@stacksjs/error-handling";
|
|
4
|
-
import { notification } from "@stacksjs/config";
|
|
5
|
-
const env = notification.sms.plivo;
|
|
6
|
-
const provider = new PlivoSmsProvider({
|
|
7
|
-
accountSid: env.sid,
|
|
8
|
-
authToken: env.authToken,
|
|
9
|
-
from: env.from
|
|
10
|
-
});
|
|
11
|
-
function send(options) {
|
|
12
|
-
return ResultAsync.fromPromise(
|
|
13
|
-
provider.sendMessage(options),
|
|
14
|
-
() => new Error(`Failed to send message using provider: ${italic("Plivo")}`)
|
|
15
|
-
);
|
|
16
|
-
}
|
|
17
|
-
export { send as Send, send };
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Sms77SmsProvider } from "@novu/sms77";
|
|
2
|
-
import { italic } from "@stacksjs/cli";
|
|
3
|
-
import { ResultAsync } from "@stacksjs/error-handling";
|
|
4
|
-
import { notification } from "@stacksjs/config";
|
|
5
|
-
const env = notification.sms.sms77;
|
|
6
|
-
const provider = new Sms77SmsProvider({
|
|
7
|
-
apiKey: env.key,
|
|
8
|
-
from: env.from
|
|
9
|
-
});
|
|
10
|
-
function send(options) {
|
|
11
|
-
return ResultAsync.fromPromise(
|
|
12
|
-
provider.sendMessage(options),
|
|
13
|
-
() => new Error(`Failed to send message using provider: ${italic("Sms77")}`)
|
|
14
|
-
);
|
|
15
|
-
}
|
|
16
|
-
export { send as Send, send };
|
package/dist/drivers/sms/sns.mjs
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { SNSSmsProvider } from "@novu/sns";
|
|
2
|
-
import { italic } from "@stacksjs/cli";
|
|
3
|
-
import { ResultAsync } from "@stacksjs/error-handling";
|
|
4
|
-
import { notification } from "@stacksjs/config";
|
|
5
|
-
const env = notification.sms.sns;
|
|
6
|
-
const provider = new SNSSmsProvider({
|
|
7
|
-
region: env.region,
|
|
8
|
-
accessKeyId: env.key,
|
|
9
|
-
secretAccessKey: env.secret
|
|
10
|
-
});
|
|
11
|
-
function send(options) {
|
|
12
|
-
return ResultAsync.fromPromise(
|
|
13
|
-
provider.sendMessage(options),
|
|
14
|
-
() => new Error(`Failed to send message using provider: ${italic("SNS")}`)
|
|
15
|
-
);
|
|
16
|
-
}
|
|
17
|
-
export { send as Send, send };
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { TelnyxSmsProvider } from "@novu/telnyx";
|
|
2
|
-
import { italic } from "@stacksjs/cli";
|
|
3
|
-
import { ResultAsync } from "@stacksjs/error-handling";
|
|
4
|
-
import { notification } from "@stacksjs/config";
|
|
5
|
-
const env = notification.sms.telnyx;
|
|
6
|
-
const provider = new TelnyxSmsProvider({
|
|
7
|
-
apiKey: env.key,
|
|
8
|
-
messageProfileId: env.messageProfileId,
|
|
9
|
-
from: env.from
|
|
10
|
-
});
|
|
11
|
-
function send(options) {
|
|
12
|
-
return ResultAsync.fromPromise(
|
|
13
|
-
provider.sendMessage(options),
|
|
14
|
-
() => new Error(`Failed to send message using provider: ${italic("Telnyx")}`)
|
|
15
|
-
);
|
|
16
|
-
}
|
|
17
|
-
export { send as Send, send };
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { TermiiSmsProvider } from "@novu/termii";
|
|
2
|
-
import { italic } from "@stacksjs/cli";
|
|
3
|
-
import { ResultAsync } from "@stacksjs/error-handling";
|
|
4
|
-
import { notification } from "@stacksjs/config";
|
|
5
|
-
const env = notification.sms.termii;
|
|
6
|
-
const provider = new TermiiSmsProvider({
|
|
7
|
-
apiKey: env.key,
|
|
8
|
-
from: env.from
|
|
9
|
-
});
|
|
10
|
-
function send(options) {
|
|
11
|
-
return ResultAsync.fromPromise(
|
|
12
|
-
provider.sendMessage(options),
|
|
13
|
-
() => new Error(`Failed to send message using provider: ${italic("Termii")}`)
|
|
14
|
-
);
|
|
15
|
-
}
|
|
16
|
-
export { send as Send, send };
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { TwilioSmsProvider } from "@novu/twilio";
|
|
2
|
-
import { italic } from "@stacksjs/cli";
|
|
3
|
-
import { ResultAsync } from "@stacksjs/error-handling";
|
|
4
|
-
import { notification } from "@stacksjs/config";
|
|
5
|
-
const env = notification.sms.twilio;
|
|
6
|
-
const provider = new TwilioSmsProvider({
|
|
7
|
-
accountSid: env.sid,
|
|
8
|
-
authToken: env.authToken,
|
|
9
|
-
from: env.from
|
|
10
|
-
});
|
|
11
|
-
function send(options) {
|
|
12
|
-
return ResultAsync.fromPromise(
|
|
13
|
-
provider.sendMessage(options),
|
|
14
|
-
() => new Error(`Failed to send message using provider: ${italic("Twilio")}`)
|
|
15
|
-
);
|
|
16
|
-
}
|
|
17
|
-
export { send as Send, send };
|
package/dist/index.d.ts
DELETED
package/dist/index.mjs
DELETED