@stacksjs/chat 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 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
- ## 💪🏼 Contributing
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
- import { ResultAsync } from '@stacksjs/error-handling';
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 };
@@ -1,4 +1 @@
1
- import type { ChatOptions } from '@stacksjs/types';
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 {};
@@ -1,17 +1 @@
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
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
package/dist/index.d.ts CHANGED
@@ -1,2 +1,3 @@
1
1
  export * as discord from './drivers/discord';
2
+ export * as teams from './drivers/teams';
2
3
  export * as slack from './drivers/slack';
package/dist/index.mjs CHANGED
@@ -1,2 +1,3 @@
1
1
  export * as discord from "./drivers/discord.mjs";
2
+ export * as teams from "./drivers/teams.mjs";
2
3
  export * as slack from "./drivers/slack.mjs";
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@stacksjs/chat",
3
3
  "type": "module",
4
- "version": "0.51.0",
5
- "packageManager": "pnpm@7.26.3",
4
+ "version": "0.52.1",
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
- "main": "dist/index.mjs",
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.14.0",
37
- "pnpm": ">=7.26.3"
38
- },
39
40
  "peerDependencies": {
40
- "@novu/discord": "^0.11.0",
41
- "@novu/node": "^0.11.0",
42
- "@novu/slack": "^0.11.0",
43
- "@novu/stateless": "^0.11.0",
44
- "@stacksjs/cli": "0.51.0",
45
- "@stacksjs/config": "0.51.0",
46
- "@stacksjs/error-handling": "0.51.0",
47
- "@stacksjs/types": "0.51.0"
41
+ "@novu/discord": "^0.15.0",
42
+ "@novu/ms-teams": "^0.15.0",
43
+ "@novu/node": "^0.15.0",
44
+ "@novu/slack": "^0.15.0",
45
+ "@novu/stateless": "^0.15.0",
46
+ "@stacksjs/cli": "0.52.1",
47
+ "@stacksjs/config": "0.52.1",
48
+ "@stacksjs/error-handling": "0.52.1",
49
+ "@stacksjs/types": "0.52.1"
48
50
  },
49
51
  "devDependencies": {
50
- "mkdist": "^1.1.0",
51
- "typescript": "^4.9.5",
52
- "@stacksjs/testing": "0.51.0"
52
+ "@stacksjs/development": "0.52.1"
53
53
  },
54
54
  "scripts": {
55
- "build": "mkdist -d",
56
- "dev": "mkdist -d",
55
+ "build": "unbuild",
56
+ "dev": "unbuild --stub",
57
57
  "typecheck": "tsc --noEmit"
58
58
  }
59
59
  }