@marketing-sdk/slack 0.1.1-experimental.0 → 0.1.1-experimental.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 +36 -0
- package/package.json +29 -6
package/README.md
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# @marketing-sdk/slack
|
|
2
|
+
|
|
3
|
+
Slack provider client for messages, direct messages, scheduled messages, webhooks, channels, and users.
|
|
4
|
+
|
|
5
|
+
> Status: experimental. APIs may change before a stable 1.0.0 release.
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
pnpm add @marketing-sdk/core @marketing-sdk/slack
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
import { SlackClient } from '@marketing-sdk/slack';
|
|
17
|
+
|
|
18
|
+
const slack = new SlackClient({
|
|
19
|
+
token: process.env.SLACK_BOT_TOKEN,
|
|
20
|
+
webhookUrl: process.env.SLACK_WEBHOOK_URL,
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
const { data, error } = await slack.sendMessage({
|
|
24
|
+
channel: '#marketing',
|
|
25
|
+
text: 'New campaign launched.',
|
|
26
|
+
});
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Documentation
|
|
30
|
+
|
|
31
|
+
- [Provider docs](https://github.com/cody9swann/marketing-sdk/blob/main/docs/slack.md)
|
|
32
|
+
- [Repository README](https://github.com/cody9swann/marketing-sdk#readme)
|
|
33
|
+
|
|
34
|
+
## License
|
|
35
|
+
|
|
36
|
+
MIT.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@marketing-sdk/slack",
|
|
3
|
-
"version": "0.1.1-experimental.
|
|
4
|
-
"description": "Slack provider for marketing-sdk",
|
|
3
|
+
"version": "0.1.1-experimental.1",
|
|
4
|
+
"description": "Slack provider for @marketing-sdk",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"exports": {
|
|
@@ -18,11 +18,11 @@
|
|
|
18
18
|
"access": "public"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@
|
|
22
|
-
"@
|
|
21
|
+
"@marketing-sdk/core": "0.1.1-experimental.1",
|
|
22
|
+
"@slack/web-api": "^7.0.0"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
|
-
"@marketing-sdk/core": ">=0.1.
|
|
25
|
+
"@marketing-sdk/core": ">=0.1.1-experimental.1"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"typescript": "^5.3.0",
|
|
@@ -31,10 +31,33 @@
|
|
|
31
31
|
"@types/jest": "^29.5.0",
|
|
32
32
|
"@types/node": "^20.0.0"
|
|
33
33
|
},
|
|
34
|
+
"license": "MIT",
|
|
35
|
+
"repository": {
|
|
36
|
+
"type": "git",
|
|
37
|
+
"url": "git+https://github.com/cody9swann/marketing-sdk.git",
|
|
38
|
+
"directory": "packages/slack"
|
|
39
|
+
},
|
|
40
|
+
"bugs": {
|
|
41
|
+
"url": "https://github.com/cody9swann/marketing-sdk/issues"
|
|
42
|
+
},
|
|
43
|
+
"homepage": "https://github.com/cody9swann/marketing-sdk#readme",
|
|
44
|
+
"engines": {
|
|
45
|
+
"node": ">=18"
|
|
46
|
+
},
|
|
47
|
+
"sideEffects": false,
|
|
48
|
+
"keywords": [
|
|
49
|
+
"marketing",
|
|
50
|
+
"sdk",
|
|
51
|
+
"typescript",
|
|
52
|
+
"slack"
|
|
53
|
+
],
|
|
34
54
|
"scripts": {
|
|
35
55
|
"build": "tsc",
|
|
56
|
+
"dev": "tsc -w",
|
|
36
57
|
"test": "jest",
|
|
58
|
+
"test:watch": "jest --watch",
|
|
37
59
|
"test:coverage": "jest --coverage",
|
|
38
|
-
"typecheck": "tsc --noEmit"
|
|
60
|
+
"typecheck": "tsc --noEmit",
|
|
61
|
+
"clean": "rm -rf dist"
|
|
39
62
|
}
|
|
40
63
|
}
|