@stacksjs/sms 0.51.0 → 0.52.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 +2 -1
- package/dist/drivers/gupshup.d.ts +1 -1
- package/dist/drivers/gupshup.mjs +3 -3
- package/dist/drivers/nexmo.d.ts +1 -1
- package/dist/drivers/nexmo.mjs +4 -4
- package/dist/drivers/plivo.d.ts +1 -1
- package/dist/drivers/plivo.mjs +4 -4
- package/dist/drivers/sms77.d.ts +1 -1
- package/dist/drivers/sms77.mjs +3 -3
- package/dist/drivers/sns.d.ts +1 -1
- package/dist/drivers/sns.mjs +4 -4
- package/dist/drivers/telnyx.d.ts +1 -1
- package/dist/drivers/telnyx.mjs +4 -4
- package/dist/drivers/termii.d.ts +1 -1
- package/dist/drivers/termii.mjs +3 -3
- package/dist/drivers/twilio.d.ts +1 -1
- package/dist/drivers/twilio.mjs +4 -4
- package/package.json +26 -26
package/README.md
CHANGED
|
@@ -16,6 +16,7 @@ You may now use it in your project:
|
|
|
16
16
|
|
|
17
17
|
```ts
|
|
18
18
|
import * as sms from '@stacksjs/sms'
|
|
19
|
+
|
|
19
20
|
/* Then choose a driver. E.g for twilio */
|
|
20
21
|
const notification = sms.twilio
|
|
21
22
|
|
|
@@ -107,7 +108,7 @@ pnpm test
|
|
|
107
108
|
|
|
108
109
|
Please see our [releases](https://github.com/stacksjs/stacks/releases) page for more information on what has changed recently.
|
|
109
110
|
|
|
110
|
-
##
|
|
111
|
+
## 🚜 Contributing
|
|
111
112
|
|
|
112
113
|
Please review the [Contributing Guide](https://github.com/stacksjs/contributing) for details.
|
|
113
114
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { SmsOptions } from '@stacksjs/types';
|
|
2
2
|
import { ResultAsync } from '@stacksjs/error-handling';
|
|
3
|
-
declare function send(options: SmsOptions): ResultAsync<import("@
|
|
3
|
+
declare function send(options: SmsOptions): ResultAsync<import("@stacksjs/types").SendMessageSuccessResponse, Error>;
|
|
4
4
|
export { send as Send, send };
|
package/dist/drivers/gupshup.mjs
CHANGED
|
@@ -2,10 +2,10 @@ import { GupshupSmsProvider } from "@novu/gupshup";
|
|
|
2
2
|
import { italic } from "@stacksjs/cli";
|
|
3
3
|
import { ResultAsync } from "@stacksjs/error-handling";
|
|
4
4
|
import { notification } from "@stacksjs/config";
|
|
5
|
-
const env = notification.sms
|
|
5
|
+
const env = notification.sms?.gupshup;
|
|
6
6
|
const provider = new GupshupSmsProvider({
|
|
7
|
-
userId: env
|
|
8
|
-
password: env
|
|
7
|
+
userId: env?.user || "",
|
|
8
|
+
password: env?.password || ""
|
|
9
9
|
});
|
|
10
10
|
function send(options) {
|
|
11
11
|
return ResultAsync.fromPromise(
|
package/dist/drivers/nexmo.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { SmsOptions } from '@stacksjs/types';
|
|
2
2
|
import { ResultAsync } from '@stacksjs/error-handling';
|
|
3
|
-
declare function send(options: SmsOptions): ResultAsync<import("@
|
|
3
|
+
declare function send(options: SmsOptions): ResultAsync<import("@stacksjs/types").SendMessageSuccessResponse, Error>;
|
|
4
4
|
export { send as Send, send };
|
package/dist/drivers/nexmo.mjs
CHANGED
|
@@ -2,11 +2,11 @@ import { NexmoSmsProvider } from "@novu/nexmo";
|
|
|
2
2
|
import { italic } from "@stacksjs/cli";
|
|
3
3
|
import { ResultAsync } from "@stacksjs/error-handling";
|
|
4
4
|
import { notification } from "@stacksjs/config";
|
|
5
|
-
const env = notification.sms
|
|
5
|
+
const env = notification.sms?.nexmo;
|
|
6
6
|
const provider = new NexmoSmsProvider({
|
|
7
|
-
apiKey: env
|
|
8
|
-
apiSecret: env
|
|
9
|
-
from: env
|
|
7
|
+
apiKey: env?.key || "",
|
|
8
|
+
apiSecret: env?.secret || "",
|
|
9
|
+
from: env?.from || ""
|
|
10
10
|
});
|
|
11
11
|
function send(options) {
|
|
12
12
|
return ResultAsync.fromPromise(
|
package/dist/drivers/plivo.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { SmsOptions } from '@stacksjs/types';
|
|
2
2
|
import { ResultAsync } from '@stacksjs/error-handling';
|
|
3
|
-
declare function send(options: SmsOptions): ResultAsync<import("@
|
|
3
|
+
declare function send(options: SmsOptions): ResultAsync<import("@stacksjs/types").SendMessageSuccessResponse, Error>;
|
|
4
4
|
export { send as Send, send };
|
package/dist/drivers/plivo.mjs
CHANGED
|
@@ -2,11 +2,11 @@ import { PlivoSmsProvider } from "@novu/plivo";
|
|
|
2
2
|
import { italic } from "@stacksjs/cli";
|
|
3
3
|
import { ResultAsync } from "@stacksjs/error-handling";
|
|
4
4
|
import { notification } from "@stacksjs/config";
|
|
5
|
-
const env = notification.sms
|
|
5
|
+
const env = notification.sms?.plivo;
|
|
6
6
|
const provider = new PlivoSmsProvider({
|
|
7
|
-
accountSid: env
|
|
8
|
-
authToken: env
|
|
9
|
-
from: env
|
|
7
|
+
accountSid: env?.sid,
|
|
8
|
+
authToken: env?.authToken,
|
|
9
|
+
from: env?.from
|
|
10
10
|
});
|
|
11
11
|
function send(options) {
|
|
12
12
|
return ResultAsync.fromPromise(
|
package/dist/drivers/sms77.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { SmsOptions } from '@stacksjs/types';
|
|
2
2
|
import { ResultAsync } from '@stacksjs/error-handling';
|
|
3
|
-
declare function send(options: SmsOptions): ResultAsync<import("@
|
|
3
|
+
declare function send(options: SmsOptions): ResultAsync<import("@stacksjs/types").SendMessageSuccessResponse, Error>;
|
|
4
4
|
export { send as Send, send };
|
package/dist/drivers/sms77.mjs
CHANGED
|
@@ -2,10 +2,10 @@ import { Sms77SmsProvider } from "@novu/sms77";
|
|
|
2
2
|
import { italic } from "@stacksjs/cli";
|
|
3
3
|
import { ResultAsync } from "@stacksjs/error-handling";
|
|
4
4
|
import { notification } from "@stacksjs/config";
|
|
5
|
-
const env = notification.sms
|
|
5
|
+
const env = notification.sms?.sms77;
|
|
6
6
|
const provider = new Sms77SmsProvider({
|
|
7
|
-
apiKey: env
|
|
8
|
-
from: env
|
|
7
|
+
apiKey: env?.key,
|
|
8
|
+
from: env?.from
|
|
9
9
|
});
|
|
10
10
|
function send(options) {
|
|
11
11
|
return ResultAsync.fromPromise(
|
package/dist/drivers/sns.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { SmsOptions } from '@stacksjs/types';
|
|
2
2
|
import { ResultAsync } from '@stacksjs/error-handling';
|
|
3
|
-
declare function send(options: SmsOptions): ResultAsync<import("@
|
|
3
|
+
declare function send(options: SmsOptions): ResultAsync<import("@stacksjs/types").SendMessageSuccessResponse, Error>;
|
|
4
4
|
export { send as Send, send };
|
package/dist/drivers/sns.mjs
CHANGED
|
@@ -2,11 +2,11 @@ import { SNSSmsProvider } from "@novu/sns";
|
|
|
2
2
|
import { italic } from "@stacksjs/cli";
|
|
3
3
|
import { ResultAsync } from "@stacksjs/error-handling";
|
|
4
4
|
import { notification } from "@stacksjs/config";
|
|
5
|
-
const env = notification.sms
|
|
5
|
+
const env = notification.sms?.sns;
|
|
6
6
|
const provider = new SNSSmsProvider({
|
|
7
|
-
region: env
|
|
8
|
-
accessKeyId: env
|
|
9
|
-
secretAccessKey: env
|
|
7
|
+
region: env?.region,
|
|
8
|
+
accessKeyId: env?.key,
|
|
9
|
+
secretAccessKey: env?.secret
|
|
10
10
|
});
|
|
11
11
|
function send(options) {
|
|
12
12
|
return ResultAsync.fromPromise(
|
package/dist/drivers/telnyx.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { SmsOptions } from '@stacksjs/types';
|
|
2
2
|
import { ResultAsync } from '@stacksjs/error-handling';
|
|
3
|
-
declare function send(options: SmsOptions): ResultAsync<import("@
|
|
3
|
+
declare function send(options: SmsOptions): ResultAsync<import("@stacksjs/types").SendMessageSuccessResponse, Error>;
|
|
4
4
|
export { send as Send, send };
|
package/dist/drivers/telnyx.mjs
CHANGED
|
@@ -2,11 +2,11 @@ import { TelnyxSmsProvider } from "@novu/telnyx";
|
|
|
2
2
|
import { italic } from "@stacksjs/cli";
|
|
3
3
|
import { ResultAsync } from "@stacksjs/error-handling";
|
|
4
4
|
import { notification } from "@stacksjs/config";
|
|
5
|
-
const env = notification.sms
|
|
5
|
+
const env = notification.sms?.telnyx;
|
|
6
6
|
const provider = new TelnyxSmsProvider({
|
|
7
|
-
apiKey: env
|
|
8
|
-
messageProfileId: env
|
|
9
|
-
from: env
|
|
7
|
+
apiKey: env?.key,
|
|
8
|
+
messageProfileId: env?.messageProfileId,
|
|
9
|
+
from: env?.from
|
|
10
10
|
});
|
|
11
11
|
function send(options) {
|
|
12
12
|
return ResultAsync.fromPromise(
|
package/dist/drivers/termii.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { SmsOptions } from '@stacksjs/types';
|
|
2
2
|
import { ResultAsync } from '@stacksjs/error-handling';
|
|
3
|
-
declare function send(options: SmsOptions): ResultAsync<import("@
|
|
3
|
+
declare function send(options: SmsOptions): ResultAsync<import("@stacksjs/types").SendMessageSuccessResponse, Error>;
|
|
4
4
|
export { send as Send, send };
|
package/dist/drivers/termii.mjs
CHANGED
|
@@ -2,10 +2,10 @@ import { TermiiSmsProvider } from "@novu/termii";
|
|
|
2
2
|
import { italic } from "@stacksjs/cli";
|
|
3
3
|
import { ResultAsync } from "@stacksjs/error-handling";
|
|
4
4
|
import { notification } from "@stacksjs/config";
|
|
5
|
-
const env = notification.sms
|
|
5
|
+
const env = notification.sms?.termii;
|
|
6
6
|
const provider = new TermiiSmsProvider({
|
|
7
|
-
apiKey: env
|
|
8
|
-
from: env
|
|
7
|
+
apiKey: env?.key,
|
|
8
|
+
from: env?.from
|
|
9
9
|
});
|
|
10
10
|
function send(options) {
|
|
11
11
|
return ResultAsync.fromPromise(
|
package/dist/drivers/twilio.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { SmsOptions } from '@stacksjs/types';
|
|
2
2
|
import { ResultAsync } from '@stacksjs/error-handling';
|
|
3
|
-
declare function send(options: SmsOptions): ResultAsync<import("@
|
|
3
|
+
declare function send(options: SmsOptions): ResultAsync<import("@stacksjs/types").SendMessageSuccessResponse, Error>;
|
|
4
4
|
export { send as Send, send };
|
package/dist/drivers/twilio.mjs
CHANGED
|
@@ -2,11 +2,11 @@ import { TwilioSmsProvider } from "@novu/twilio";
|
|
|
2
2
|
import { italic } from "@stacksjs/cli";
|
|
3
3
|
import { ResultAsync } from "@stacksjs/error-handling";
|
|
4
4
|
import { notification } from "@stacksjs/config";
|
|
5
|
-
const env = notification.sms
|
|
5
|
+
const env = notification.sms?.twilio;
|
|
6
6
|
const provider = new TwilioSmsProvider({
|
|
7
|
-
accountSid: env
|
|
8
|
-
authToken: env
|
|
9
|
-
from: env
|
|
7
|
+
accountSid: env?.sid,
|
|
8
|
+
authToken: env?.authToken,
|
|
9
|
+
from: env?.from
|
|
10
10
|
});
|
|
11
11
|
function send(options) {
|
|
12
12
|
return ResultAsync.fromPromise(
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacksjs/sms",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
5
|
-
"packageManager": "pnpm@
|
|
4
|
+
"version": "0.52.1",
|
|
5
|
+
"packageManager": "pnpm@8.5.1",
|
|
6
6
|
"description": "The Stacks SMS integration. Painlessly create & manage your inboxes, templates, and send sms.",
|
|
7
7
|
"author": "Chris Breuer",
|
|
8
8
|
"license": "MIT",
|
|
@@ -28,7 +28,12 @@
|
|
|
28
28
|
"termii",
|
|
29
29
|
"twilio"
|
|
30
30
|
],
|
|
31
|
-
"
|
|
31
|
+
"exports": {
|
|
32
|
+
".": {
|
|
33
|
+
"types": "./dist/index.d.ts",
|
|
34
|
+
"import": "./dist/index.mjs"
|
|
35
|
+
}
|
|
36
|
+
},
|
|
32
37
|
"module": "dist/index.mjs",
|
|
33
38
|
"types": "dist/index.d.ts",
|
|
34
39
|
"contributors": [
|
|
@@ -38,34 +43,29 @@
|
|
|
38
43
|
"dist",
|
|
39
44
|
"README.md"
|
|
40
45
|
],
|
|
41
|
-
"engines": {
|
|
42
|
-
"node": ">=v18.14.0",
|
|
43
|
-
"pnpm": ">=7.26.3"
|
|
44
|
-
},
|
|
45
46
|
"peerDependencies": {
|
|
46
|
-
"@novu/gupshup": "^0.
|
|
47
|
-
"@novu/nexmo": "^0.
|
|
48
|
-
"@novu/node": "^0.
|
|
49
|
-
"@novu/plivo": "^0.
|
|
50
|
-
"@novu/sms77": "^0.
|
|
51
|
-
"@novu/sns": "^0.
|
|
52
|
-
"@novu/stateless": "^0.
|
|
53
|
-
"@novu/telnyx": "^0.
|
|
54
|
-
"@novu/termii": "^0.
|
|
55
|
-
"@novu/twilio": "^0.
|
|
56
|
-
"@stacksjs/cli": "0.
|
|
57
|
-
"@stacksjs/config": "0.
|
|
58
|
-
"@stacksjs/error-handling": "0.
|
|
59
|
-
"@stacksjs/types": "0.
|
|
47
|
+
"@novu/gupshup": "^0.15.0",
|
|
48
|
+
"@novu/nexmo": "^0.15.0",
|
|
49
|
+
"@novu/node": "^0.15.0",
|
|
50
|
+
"@novu/plivo": "^0.15.0",
|
|
51
|
+
"@novu/sms77": "^0.15.0",
|
|
52
|
+
"@novu/sns": "^0.15.0",
|
|
53
|
+
"@novu/stateless": "^0.15.0",
|
|
54
|
+
"@novu/telnyx": "^0.15.0",
|
|
55
|
+
"@novu/termii": "^0.15.0",
|
|
56
|
+
"@novu/twilio": "^0.15.0",
|
|
57
|
+
"@stacksjs/cli": "0.52.1",
|
|
58
|
+
"@stacksjs/config": "0.52.1",
|
|
59
|
+
"@stacksjs/error-handling": "0.52.1",
|
|
60
|
+
"@stacksjs/types": "0.52.1"
|
|
60
61
|
},
|
|
61
62
|
"devDependencies": {
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"@stacksjs/testing": "0.51.0"
|
|
63
|
+
"@stacksjs/config": "0.52.1",
|
|
64
|
+
"@stacksjs/development": "0.52.1"
|
|
65
65
|
},
|
|
66
66
|
"scripts": {
|
|
67
|
-
"build": "
|
|
68
|
-
"dev": "
|
|
67
|
+
"build": "unbuild",
|
|
68
|
+
"dev": "unbuild --stub",
|
|
69
69
|
"typecheck": "tsc --noEmit"
|
|
70
70
|
}
|
|
71
71
|
}
|