generated from slack-samples/deno-starter-template
-
Notifications
You must be signed in to change notification settings - Fork 2
/
manifest.ts
105 lines (99 loc) · 2.36 KB
/
manifest.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
import { DefineDatastore, Manifest, Schema } from "deno-slack-sdk/mod.ts";
import HelpWorkflow from "./workflows/help_workflow.ts";
import ManageConfigurationWorkflow from "./workflows/manage_configuration_workflow.ts";
import PostScheduledMessagesWorkflow from "./workflows/post_scheduled_messages_workflow.ts";
import PrivateReportWorkflow from "./workflows/private_report_workflow.ts";
import PublicReportWorkflow from "./workflows/public_report_workflow.ts";
import TriageByDaysWorkflow from "./workflows/triage_by_days_workflow.ts";
export const ConfDatastore = DefineDatastore({
name: "conf",
primary_key: "channel_id",
attributes: {
channel_id: {
type: Schema.types.string,
},
lookback_days: {
type: Schema.types.string,
},
schedule: {
type: Schema.types.string,
},
},
});
export const UrlDatastore = DefineDatastore({
name: "url",
primary_key: "name",
attributes: {
name: {
type: Schema.types.string,
},
url: {
type: Schema.types.string,
},
},
});
export const DoneEmojisDatastore = DefineDatastore({
name: "done_emojis",
primary_key: "name",
attributes: {
name: {
type: Schema.types.string,
},
},
});
export const UrgencyEmojisDatastore = DefineDatastore({
name: "urgency_emojis",
primary_key: "name",
attributes: {
name: {
type: Schema.types.string,
},
urgency: {
type: Schema.types.number,
},
},
});
export const inProgressEmojisDatastore = DefineDatastore({
name: "in_progress_emojis",
primary_key: "name",
attributes: {
name: {
type: Schema.types.string,
},
url: {
type: Schema.types.string,
},
},
});
export default Manifest({
name: "triagebot",
description: "Triagebot on Platform 2.0",
icon: "assets/icon.png",
workflows: [
HelpWorkflow,
ManageConfigurationWorkflow,
PostScheduledMessagesWorkflow,
PrivateReportWorkflow,
PublicReportWorkflow,
TriageByDaysWorkflow,
],
datastores: [
ConfDatastore,
UrlDatastore,
DoneEmojisDatastore,
UrgencyEmojisDatastore,
inProgressEmojisDatastore,
],
outgoingDomains: ["hooks.slack.com", "hooks.dev.slack.com"],
botScopes: [
"channels:history",
"channels:join",
"channels:read",
"chat:write.public",
"chat:write",
"commands",
"datastore:read",
"datastore:write",
"team:read",
],
});