This repository has been archived by the owner on Mar 27, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 64
/
slack_common_event_wrapper_schema.json
150 lines (150 loc) · 3.87 KB
/
slack_common_event_wrapper_schema.json
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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Standard event wrapper for the Events API",
"description": "Adapted from auto-generated content",
"type": "object",
"additionalProperties": true,
"required": [
"token",
"team_id",
"api_app_id",
"event",
"type",
"event_id",
"event_time",
"authed_users"
],
"properties": {
"token": {
"title": "A verification token to validate the event originated from Slack",
"type": "string"
},
"team_id": {
"title": "The unique identifier of the workspace where the event occurred",
"type": "string",
"examples": [
"T1H9RESGL"
]
},
"api_app_id": {
"title": "The unique identifier your installed Slack application.",
"description": " Use this to distinguish which app the event belongs to if you use multiple apps with the same Request URL.",
"type": "string",
"examples": [
"A2H9RFS1A"
]
},
"event": {
"title": "The actual event, an object, that happened",
"type": "object",
"additionalProperties": true,
"required": [
"type",
"event_ts"
],
"properties": {
"type": {
"title": "The specific name of the event",
"type": "string"
},
"event_ts": {
"title": "When the event was dispatched",
"type": "string"
}
},
"examples": [
{
"type": "message",
"user": "U061F7AUR",
"text": "How many cats did we herd yesterday?",
"ts": "1525215129.000001",
"channel": "D0PNCRP9N",
"event_ts": "1525215129.000001",
"channel_type": "app_home"
}
]
},
"type": {
"title": "Indicates which kind of event dispatch this is, usually `event_callback`",
"type": "string",
"examples": [
"event_callback"
]
},
"event_id": {
"title": "A unique identifier for this specific event, globally unique across all workspaces.",
"type": "string",
"examples": [
"Ev0PV52K25"
]
},
"event_time": {
"title": "The epoch timestamp in seconds indicating when this event was dispatched.",
"type": "integer",
"examples": [
1525215129
]
},
"authed_users": {
"title": "An array of string-based User IDs. Each member of the collection represents a user that has installed your application/bot and indicates the described event would be visible to those users.",
"type": "array",
"minItems": 1,
"uniqueItems": true,
"items": {
"type": "string"
}
}
},
"examples": [
{
"token": "XXYYZZ",
"team_id": "TXXXXXXXX",
"api_app_id": "AXXXXXXXXX",
"event": {
"type": "resources_added",
"resources": [
{
"resource": {
"type": "im",
"grant": {
"type": "specific",
"resource_id": "DXXXXXXXX"
}
},
"scopes": [
"chat:write:user",
"im:read",
"im:history",
"commands"
]
}
]
},
"type": "event_callback",
"authed_teams": [],
"event_id": "EvXXXXXXXX",
"event_time": 1234567890
},
{
"token": "XXYYZZ",
"team_id": "TXXXXXXXX",
"api_app_id": "AXXXXXXXXX",
"event": {
"type": "reaction_added",
"user": "U024BE7LH",
"reaction": "thumbsup",
"item_user": "U0G9QF9C6",
"item": {
"type": "message",
"channel": "C0G9QF9GZ",
"ts": "1360782400.498405"
},
"event_ts": "1360782804.083113"
},
"type": "event_callback",
"authed_teams": [],
"event_id": "EvXXXXXXXX",
"event_time": 1234567890
}
]
}