@stacksjs/chat 0.53.0 → 0.56.3

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/index.d.ts CHANGED
@@ -1,3 +1,25 @@
1
- export * as discord from './drivers/discord';
2
- export * as teams from './drivers/teams';
3
- export * as slack from './drivers/slack';
1
+ import * as _stacksjs_types from '@stacksjs/types';
2
+ import { ChatOptions } from '@stacksjs/types';
3
+ import { ResultAsync } from '@stacksjs/error-handling';
4
+
5
+ declare function send(options: ChatOptions): ResultAsync<_stacksjs_types.SendMessageSuccessResponse, Error>;
6
+
7
+ declare const discord_send: typeof send;
8
+ declare namespace discord {
9
+ export {
10
+ send as Send,
11
+ discord_send as send,
12
+ };
13
+ }
14
+
15
+ declare namespace teams {
16
+ export {
17
+ };
18
+ }
19
+
20
+ declare namespace slack {
21
+ export {
22
+ };
23
+ }
24
+
25
+ export { discord, slack, teams };
package/dist/index.mjs CHANGED
@@ -1,3 +1,27 @@
1
- export * as discord from "./drivers/discord.mjs";
2
- export * as teams from "./drivers/teams.mjs";
3
- export * as slack from "./drivers/slack.mjs";
1
+ import { DiscordProvider } from '@novu/discord';
2
+ import { italic } from '@stacksjs/cli';
3
+ import { ResultAsync } from '@stacksjs/error-handling';
4
+
5
+ const provider = new DiscordProvider({});
6
+ function send(options) {
7
+ return ResultAsync.fromPromise(
8
+ provider.sendMessage(options),
9
+ () => new Error(`Failed to send message using provider: ${italic("Discord")}`)
10
+ );
11
+ }
12
+
13
+ const discord = {
14
+ __proto__: null,
15
+ Send: send,
16
+ send: send
17
+ };
18
+
19
+ const teams = {
20
+ __proto__: null
21
+ };
22
+
23
+ const slack = {
24
+ __proto__: null
25
+ };
26
+
27
+ export { discord, slack, teams };
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@stacksjs/chat",
3
3
  "type": "module",
4
- "version": "0.53.0",
5
- "packageManager": "pnpm@8.5.1",
4
+ "version": "0.56.3",
5
+ "packageManager": "pnpm@8.6.5",
6
6
  "description": "The Stacks Chat Integration. Easy sending of messages for chat services",
7
7
  "author": "Chris Breuer",
8
8
  "license": "MIT",
@@ -38,18 +38,18 @@
38
38
  "README.md"
39
39
  ],
40
40
  "peerDependencies": {
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.53.0",
47
- "@stacksjs/config": "0.53.0",
48
- "@stacksjs/error-handling": "0.53.0",
49
- "@stacksjs/types": "0.53.0"
41
+ "@novu/discord": "^0.16.1",
42
+ "@novu/ms-teams": "^0.16.1",
43
+ "@novu/node": "^0.16.1",
44
+ "@novu/slack": "^0.16.1",
45
+ "@novu/stateless": "^0.16.1",
46
+ "@stacksjs/config": "0.56.3",
47
+ "@stacksjs/cli": "0.56.3",
48
+ "@stacksjs/error-handling": "0.56.3",
49
+ "@stacksjs/types": "0.56.3"
50
50
  },
51
51
  "devDependencies": {
52
- "@stacksjs/development": "0.53.0"
52
+ "@stacksjs/development": "0.56.3"
53
53
  },
54
54
  "scripts": {
55
55
  "build": "unbuild",
@@ -1,3 +0,0 @@
1
- import type { ChatOptions } from '@stacksjs/types';
2
- declare function send(options: ChatOptions): any;
3
- export { send as Send, send };
@@ -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 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};