UNPKG

13.6 kBJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3var Config = /** @class */ (function () {
4 function Config() {
5 }
6 Config.schema = {
7 "version": "1.0.1",
8 "bot-framework": {
9 "type": "object",
10 "properties": {
11 "id": { "type": "string" },
12 "serviceUrl": { "type": "string" },
13 "channelId": {
14 "type": "string"
15 },
16 "from": {
17 "type": "object",
18 "properties": {
19 "id": { "type": "string" },
20 "name": {
21 "type": "string"
22 }
23 }
24 },
25 "conversation": {
26 "type": "object",
27 "properties": {
28 "id": { "type": "string" }
29 }
30 },
31 "recipient": {
32 "type": "object",
33 "properties": {
34 "id": { "type": "string" },
35 "name": { "type": "string" }
36 }
37 }
38 },
39 "required": ["id", "from", "conversation", "recipient"]
40 },
41 "facebook": {
42 "type": "object",
43 "properties": {
44 "object": { "type": "string", "default": "page" },
45 "entry": {
46 "type": "array",
47 "items": [
48 {
49 "type": "object",
50 "properties": {
51 "id": { "type": "string" },
52 "time": { "type": "number" },
53 "messaging": {
54 "type": "array",
55 "items": [{
56 "type": "object",
57 "properties": {
58 "timestamp": { "type": "number" },
59 "sender": {
60 "type": "object",
61 "properties": {
62 "id": { "type": "string" },
63 }
64 },
65 "recipient": {
66 "type": "object",
67 "properties": {
68 "id": { "type": "string" },
69 }
70 }
71 }
72 }]
73 },
74 "standby": {
75 "type": "array",
76 "items": [{
77 "type": "object",
78 "properties": {
79 "timestamp": { "type": "number" },
80 "sender": {
81 "type": "object",
82 "properties": {
83 "id": { "type": "string" },
84 }
85 },
86 "recipient": {
87 "type": "object",
88 "properties": {
89 "id": { "type": "string" },
90 }
91 }
92 }
93 }]
94 }
95 },
96 "required": ["id", "time"]
97 }
98 ]
99 }
100 },
101 "required": ["object", "entry"]
102 },
103 "slack": {
104 "type": "object",
105 "properties": {
106 "type": { "type": "string" },
107 "token": { "type": "string" },
108 "challenge": { "type": "string" }
109 },
110 "required": ["type", "token", "challenge"]
111 },
112 "slack-command": {
113 "type": "object",
114 "properties": {
115 "ssl_check": { "type": "string" },
116 "token": { "type": "string" },
117 },
118 "required": ["ssl_check", "token"]
119 },
120 "slack-event": {
121 "type": "object",
122 "properties": {
123 "token": { "type": "string" },
124 "team_id": { "type": "string" },
125 "api_app_id": { "type": "string" },
126 "event": {
127 "type": "object",
128 "properties": {
129 "type": { "type": "string" },
130 "user": { "type": "string" },
131 "event_ts": { "type": "string" }
132 }
133 },
134 "type": { "type": "string" },
135 "event_id": { "type": "string" },
136 "event_time": { "type": "number" }
137 },
138 "required": ["token", "team_id", "api_app_id", "type", "event", "event_id", "event_time"]
139 },
140 "sendbird": {
141 "type": "object",
142 "properties": {
143 "app_id": { "type": "string" },
144 "category": { "type": "string" },
145 "ts": { "type": "number" },
146 "sender": {
147 "type": "object",
148 "properties": {
149 "nickname": { "type": "string" },
150 "user_id": { "type": "string" },
151 "profile_url": { "type": "string" }
152 }
153 },
154 "bot": {
155 "type": "object",
156 "properties": {
157 "bot_token": { "type": "string" },
158 "bot_profile_url": { "type": "string" },
159 "bot_nickname": { "type": "string" },
160 "bot_userid": { "type": "string" }
161 }
162 },
163 "message": {
164 "type": "object",
165 "properties": {
166 "text": { "type": "string" }
167 },
168 "required": ["text"]
169 },
170 "channel": {
171 "type": "object",
172 "properties": {
173 "channel_type": { "type": "string" },
174 "channel_url": { "type": "string" },
175 "name": { "type": "string" },
176 "cover_url": { "type": "string" }
177 },
178 "required": ["channel_url"]
179 }
180 },
181 "required": ["app_id", "sender", "message", "channel"]
182 },
183 "telegram-callback": {
184 "type": "object",
185 "properties": {
186 "update_id": { "type": "integer" },
187 "callback_query": {
188 "type": "object",
189 "properties": {
190 "id": { "type": "string" },
191 "from": {
192 "type": "object",
193 "properties": {
194 "id": { "type": "number" },
195 "is_bot": { "type": "boolean" },
196 "first_name": { "type": "string" },
197 "last_name": { "type": "string" },
198 "username": { "type": "string" },
199 "language_code": { "type": "string" }
200 }
201 },
202 "message": {
203 "type": "object",
204 "properties": {
205 "message_id": { "type": "number" },
206 "date": { "type": "number" },
207 "text": { "type": "string" }
208 },
209 "required": ["message_id"]
210 }
211 }
212 }
213 },
214 "required": ["update_id", "callback_query"]
215 },
216 "telegram": {
217 "type": "object",
218 "properties": {
219 "update_id": { "type": "integer" },
220 "message": {
221 "type": "object",
222 "properties": {
223 "message_id": { "type": "integer" },
224 "from": {
225 "type": "object",
226 "properties": {
227 "id": { "type": "number" },
228 "is_bot": { "type": "boolean" },
229 "first_name": { "type": "string" },
230 "last_name": { "type": "string" },
231 "username": { "type": "string" },
232 "language_code": { "type": "string" }
233 }
234 },
235 "chat": {
236 "type": "object",
237 "properties": {
238 "id": { "type": "number" },
239 "first_name": { "type": "string" },
240 "last_name": { "type": "string" },
241 "username": { "type": "string" },
242 "type": { "type": "string" }
243 },
244 "required": ["id"]
245 },
246 "date": { "type": "number" },
247 "text": { "type": "string" }
248 },
249 "required": ["message_id", "from", "chat"]
250 }
251 },
252 "required": ["update_id", "message"]
253 },
254 "twilio": {
255 "type": "object",
256 "properties": {
257 "Body": { "type": "string" },
258 "SmsMessageSid": { "type": "string" },
259 "MessageSid": { "type": "string" },
260 "AccountSid": { "type": "string" },
261 "From": { "type": "string" },
262 "SmsSid": { "type": "string" }
263 },
264 "required": ["Body", "SmsMessageSid", "MessageSid", "AccountSid", "From", "SmsSid"]
265 },
266 "wechat": {
267 "type": "object",
268 "properties": {
269 "ToUserName": { "type": "string" },
270 "FromUserName": { "type": "string" },
271 "CreateTime": { "type": "string" },
272 "MsgType": { "type": "string" },
273 "Content": { "type": "string" },
274 "MsgId": { "type": "string" }
275 },
276 "required": ["ToUserName", "FromUserName", "MsgType"]
277 },
278 "viber": {
279 "type": "object",
280 "properties": {
281 "event": { "type": "string" },
282 "timestamp": { "type": "number" },
283 "message_token": { "type": "number" },
284 "sender": {
285 "type": "object",
286 "properties": {
287 "id": { "type": "string" },
288 "name": { "type": "string" },
289 "avatar": { "type": "string" },
290 "language": { "type": "string" },
291 "country": { "type": "string" },
292 "api_version": { "type": "number" }
293 }
294 },
295 "message": {
296 "type": "object",
297 "properties": {
298 "text": { "type": "string" },
299 "type": { "type": "string" }
300 }
301 }
302 },
303 "required": ["event", "timestamp", "message_token"]
304 },
305 "kik": {
306 "type": "object",
307 "properties": {
308 "entry": {
309 "type": "array",
310 "items": [
311 {
312 "type": "object",
313 "properties": {
314 "chatId": { "type": "string" },
315 "id": { "type": "string" },
316 "from": { "type": "string" },
317 "type": { "type": "string" },
318 "body": { "type": "string" },
319 "timestamp": { "type": "number" },
320 "chatType": { "type": "string" }
321 }
322 }
323 ]
324 }
325 }
326 }
327 };
328 return Config;
329}());
330exports.Config = Config;