@stacksjs/chat 0.50.0 → 0.52.0
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/discord.d.ts +1 -2
- package/dist/drivers/slack.d.ts +1 -4
- package/dist/drivers/slack.mjs +1 -17
- package/dist/drivers/teams.d.ts +1 -0
- package/dist/drivers/teams.mjs +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.mjs +1 -0
- package/package.json +20 -20
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 chat from '@stacksjs/chat'
|
|
19
|
+
|
|
19
20
|
/* Then choose a driver. E.g for Slack */
|
|
20
21
|
const notification = chat.slack
|
|
21
22
|
|
|
@@ -53,7 +54,7 @@ pnpm test
|
|
|
53
54
|
|
|
54
55
|
Please see our [releases](https://github.com/stacksjs/stacks/releases) page for more information on what has changed recently.
|
|
55
56
|
|
|
56
|
-
##
|
|
57
|
+
## 🚜 Contributing
|
|
57
58
|
|
|
58
59
|
Please review the [Contributing Guide](https://github.com/stacksjs/contributing) for details.
|
|
59
60
|
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import type { ChatOptions } from '@stacksjs/types';
|
|
2
|
-
|
|
3
|
-
declare function send(options: ChatOptions): ResultAsync<import("@novu/stateless").ISendMessageSuccessResponse, Error>;
|
|
2
|
+
declare function send(options: ChatOptions): any;
|
|
4
3
|
export { send as Send, send };
|
package/dist/drivers/slack.d.ts
CHANGED
|
@@ -1,4 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { ResultAsync } from '@stacksjs/error-handling';
|
|
3
|
-
declare function send(options: ChatOptions): ResultAsync<import("@novu/stateless").ISendMessageSuccessResponse, Error>;
|
|
4
|
-
export { send as Send, send };
|
|
1
|
+
export {};
|
package/dist/drivers/slack.mjs
CHANGED
|
@@ -1,17 +1 @@
|
|
|
1
|
-
|
|
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
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/index.d.ts
CHANGED
package/dist/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacksjs/chat",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
5
|
-
"packageManager": "pnpm@
|
|
4
|
+
"version": "0.52.0",
|
|
5
|
+
"packageManager": "pnpm@8.5.1",
|
|
6
6
|
"description": "The Stacks Chat Integration. Easy sending of messages for chat services",
|
|
7
7
|
"author": "Chris Breuer",
|
|
8
8
|
"license": "MIT",
|
|
@@ -22,7 +22,12 @@
|
|
|
22
22
|
"discord",
|
|
23
23
|
"slack"
|
|
24
24
|
],
|
|
25
|
-
"
|
|
25
|
+
"exports": {
|
|
26
|
+
".": {
|
|
27
|
+
"types": "./dist/index.d.ts",
|
|
28
|
+
"import": "./dist/index.mjs"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
26
31
|
"module": "dist/index.mjs",
|
|
27
32
|
"types": "dist/index.d.ts",
|
|
28
33
|
"contributors": [
|
|
@@ -32,28 +37,23 @@
|
|
|
32
37
|
"dist",
|
|
33
38
|
"README.md"
|
|
34
39
|
],
|
|
35
|
-
"engines": {
|
|
36
|
-
"node": ">=v18.13.0",
|
|
37
|
-
"pnpm": ">=7.25.1"
|
|
38
|
-
},
|
|
39
40
|
"peerDependencies": {
|
|
40
|
-
"@novu/discord": "^0.
|
|
41
|
-
"@novu/
|
|
42
|
-
"@novu/
|
|
43
|
-
"@novu/
|
|
44
|
-
"@
|
|
45
|
-
"@stacksjs/
|
|
46
|
-
"@stacksjs/config": "0.
|
|
47
|
-
"@stacksjs/
|
|
41
|
+
"@novu/discord": "^0.14.0",
|
|
42
|
+
"@novu/ms-teams": "^0.14.0",
|
|
43
|
+
"@novu/node": "^0.14.0",
|
|
44
|
+
"@novu/slack": "^0.14.0",
|
|
45
|
+
"@novu/stateless": "^0.14.0",
|
|
46
|
+
"@stacksjs/cli": "0.52.0",
|
|
47
|
+
"@stacksjs/config": "0.52.0",
|
|
48
|
+
"@stacksjs/error-handling": "0.52.0",
|
|
49
|
+
"@stacksjs/types": "0.52.0"
|
|
48
50
|
},
|
|
49
51
|
"devDependencies": {
|
|
50
|
-
"
|
|
51
|
-
"typescript": "^4.9.4",
|
|
52
|
-
"@stacksjs/testing": "0.50.0"
|
|
52
|
+
"@stacksjs/development": "0.52.0"
|
|
53
53
|
},
|
|
54
54
|
"scripts": {
|
|
55
|
-
"build": "
|
|
56
|
-
"dev": "
|
|
55
|
+
"build": "unbuild",
|
|
56
|
+
"dev": "unbuild --stub",
|
|
57
57
|
"typecheck": "tsc --noEmit"
|
|
58
58
|
}
|
|
59
59
|
}
|