slack_resources 0.0.0 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (256) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +1 -66
  3. data/.circleci/preparation.rb +11 -0
  4. data/.rubocop.yml +2 -10
  5. data/Gemfile +1 -0
  6. data/Gemfile.lock +8 -8
  7. data/lib/{slack_resources/generator/event_api → event_api}/fetch.rb +0 -0
  8. data/lib/event_api/write.rb +364 -0
  9. data/lib/{slack_resources/raw_data/event_api/preset_schemas.json → schema.json} +0 -7
  10. data/lib/slack_resources/{raw_data → resources}/event_api/_added_examples/event_callback.json +0 -0
  11. data/lib/slack_resources/resources/event_api/details/app_mention.json +46 -67
  12. data/lib/slack_resources/resources/event_api/details/app_rate_limited.json +41 -59
  13. data/lib/slack_resources/resources/event_api/details/app_uninstalled.json +16 -22
  14. data/lib/slack_resources/resources/event_api/details/channel_archive.json +30 -42
  15. data/lib/slack_resources/resources/event_api/details/channel_created.json +54 -63
  16. data/lib/slack_resources/resources/event_api/details/channel_deleted.json +23 -32
  17. data/lib/slack_resources/resources/event_api/details/channel_history_changed.json +33 -48
  18. data/lib/slack_resources/resources/event_api/details/channel_left.json +23 -32
  19. data/lib/slack_resources/resources/event_api/details/channel_rename.json +49 -58
  20. data/lib/slack_resources/resources/event_api/details/channel_unarchive.json +30 -42
  21. data/lib/slack_resources/resources/event_api/details/dnd_updated.json +54 -66
  22. data/lib/slack_resources/resources/event_api/details/dnd_updated_user.json +50 -62
  23. data/lib/slack_resources/resources/event_api/details/email_domain_changed.json +27 -39
  24. data/lib/slack_resources/resources/event_api/details/emoji_changed.json +44 -85
  25. data/lib/slack_resources/resources/event_api/details/event_callback.json +72 -102
  26. data/lib/slack_resources/resources/event_api/details/file_change.json +37 -49
  27. data/lib/slack_resources/resources/event_api/details/file_comment_added.json +46 -61
  28. data/lib/slack_resources/resources/event_api/details/file_comment_deleted.json +44 -59
  29. data/lib/slack_resources/resources/event_api/details/file_comment_edited.json +46 -61
  30. data/lib/slack_resources/resources/event_api/details/file_created.json +37 -49
  31. data/lib/slack_resources/resources/event_api/details/file_deleted.json +29 -41
  32. data/lib/slack_resources/resources/event_api/details/file_public.json +37 -49
  33. data/lib/slack_resources/resources/event_api/details/file_shared.json +37 -49
  34. data/lib/slack_resources/resources/event_api/details/file_unshared.json +37 -49
  35. data/lib/slack_resources/resources/event_api/details/grid_migration_finished.json +22 -31
  36. data/lib/slack_resources/resources/event_api/details/grid_migration_started.json +22 -31
  37. data/lib/slack_resources/resources/event_api/details/group_archive.json +23 -32
  38. data/lib/slack_resources/resources/event_api/details/group_close.json +30 -42
  39. data/lib/slack_resources/resources/event_api/details/group_deleted.json +23 -32
  40. data/lib/slack_resources/resources/event_api/details/group_history_changed.json +33 -48
  41. data/lib/slack_resources/resources/event_api/details/group_left.json +23 -32
  42. data/lib/slack_resources/resources/event_api/details/group_open.json +30 -42
  43. data/lib/slack_resources/resources/event_api/details/group_rename.json +49 -58
  44. data/lib/slack_resources/resources/event_api/details/group_unarchive.json +23 -32
  45. data/lib/slack_resources/resources/event_api/details/im_close.json +30 -42
  46. data/lib/slack_resources/resources/event_api/details/im_created.json +41 -53
  47. data/lib/slack_resources/resources/event_api/details/im_history_changed.json +33 -48
  48. data/lib/slack_resources/resources/event_api/details/im_open.json +30 -42
  49. data/lib/slack_resources/resources/event_api/details/link_shared.json +83 -107
  50. data/lib/slack_resources/resources/event_api/details/member_joined_channel.json +48 -66
  51. data/lib/slack_resources/resources/event_api/details/member_left_channel.json +43 -58
  52. data/lib/slack_resources/resources/event_api/details/message.app_home.json +53 -74
  53. data/lib/slack_resources/resources/event_api/details/message.channels.json +56 -74
  54. data/lib/slack_resources/resources/event_api/details/message.groups.json +56 -74
  55. data/lib/slack_resources/resources/event_api/details/message.im.json +56 -74
  56. data/lib/slack_resources/resources/event_api/details/message.json +60 -106
  57. data/lib/slack_resources/resources/event_api/details/message.mpim.json +56 -74
  58. data/lib/slack_resources/resources/event_api/details/pin_added.json +47 -65
  59. data/lib/slack_resources/resources/event_api/details/pin_removed.json +52 -73
  60. data/lib/slack_resources/resources/event_api/details/reaction_added.json +73 -94
  61. data/lib/slack_resources/resources/event_api/details/reaction_removed.json +73 -94
  62. data/lib/slack_resources/resources/event_api/details/resources_added.json +115 -127
  63. data/lib/slack_resources/resources/event_api/details/resources_removed.json +115 -127
  64. data/lib/slack_resources/resources/event_api/details/scope_denied.json +59 -74
  65. data/lib/slack_resources/resources/event_api/details/scope_granted.json +59 -74
  66. data/lib/slack_resources/resources/event_api/details/star_added.json +41 -56
  67. data/lib/slack_resources/resources/event_api/details/star_removed.json +41 -56
  68. data/lib/slack_resources/resources/event_api/details/subteam_created.json +168 -177
  69. data/lib/slack_resources/resources/event_api/details/subteam_members_changed.json +82 -118
  70. data/lib/slack_resources/resources/event_api/details/subteam_self_added.json +22 -31
  71. data/lib/slack_resources/resources/event_api/details/subteam_self_removed.json +22 -31
  72. data/lib/slack_resources/resources/event_api/details/subteam_updated.json +180 -189
  73. data/lib/slack_resources/resources/event_api/details/team_domain_change.json +26 -38
  74. data/lib/slack_resources/resources/event_api/details/team_join.json +26 -35
  75. data/lib/slack_resources/resources/event_api/details/team_rename.json +23 -32
  76. data/lib/slack_resources/resources/event_api/details/tokens_revoked.json +49 -58
  77. data/lib/slack_resources/resources/event_api/details/url_verification.json +26 -32
  78. data/lib/slack_resources/resources/event_api/details/user_change.json +26 -35
  79. data/lib/slack_resources/resources/event_api/details/user_resource_denied.json +64 -82
  80. data/lib/slack_resources/resources/event_api/details/user_resource_granted.json +64 -82
  81. data/lib/slack_resources/resources/event_api/details/user_resource_removed.json +29 -41
  82. data/lib/slack_resources/resources/event_api/examples/app_mention.json +4 -4
  83. data/lib/slack_resources/resources/event_api/examples/app_rate_limited.json +4 -4
  84. data/lib/slack_resources/resources/event_api/examples/app_uninstalled.json +9 -1
  85. data/lib/slack_resources/resources/event_api/examples/channel_archive.json +1 -1
  86. data/lib/slack_resources/resources/event_api/examples/channel_created.json +2 -2
  87. data/lib/slack_resources/resources/event_api/examples/channel_deleted.json +2 -2
  88. data/lib/slack_resources/resources/event_api/examples/channel_history_changed.json +2 -2
  89. data/lib/slack_resources/resources/event_api/examples/channel_left.json +2 -2
  90. data/lib/slack_resources/resources/event_api/examples/channel_rename.json +2 -2
  91. data/lib/slack_resources/resources/event_api/examples/channel_unarchive.json +1 -1
  92. data/lib/slack_resources/resources/event_api/examples/dnd_updated.json +3 -3
  93. data/lib/slack_resources/resources/event_api/examples/dnd_updated_user.json +3 -3
  94. data/lib/slack_resources/resources/event_api/examples/email_domain_changed.json +2 -2
  95. data/lib/slack_resources/resources/event_api/examples/emoji_changed.json +5 -4
  96. data/lib/slack_resources/resources/event_api/examples/event_callback.json +6 -7
  97. data/lib/slack_resources/resources/event_api/examples/file_change.json +3 -3
  98. data/lib/slack_resources/resources/event_api/examples/file_comment_added.json +3 -3
  99. data/lib/slack_resources/resources/event_api/examples/file_comment_deleted.json +3 -3
  100. data/lib/slack_resources/resources/event_api/examples/file_comment_edited.json +3 -3
  101. data/lib/slack_resources/resources/event_api/examples/file_created.json +3 -3
  102. data/lib/slack_resources/resources/event_api/examples/file_deleted.json +2 -2
  103. data/lib/slack_resources/resources/event_api/examples/file_public.json +3 -3
  104. data/lib/slack_resources/resources/event_api/examples/file_shared.json +3 -3
  105. data/lib/slack_resources/resources/event_api/examples/file_unshared.json +3 -3
  106. data/lib/slack_resources/resources/event_api/examples/grid_migration_finished.json +10 -2
  107. data/lib/slack_resources/resources/event_api/examples/grid_migration_started.json +10 -2
  108. data/lib/slack_resources/resources/event_api/examples/group_archive.json +2 -2
  109. data/lib/slack_resources/resources/event_api/examples/group_close.json +2 -2
  110. data/lib/slack_resources/resources/event_api/examples/group_deleted.json +2 -2
  111. data/lib/slack_resources/resources/event_api/examples/group_history_changed.json +2 -2
  112. data/lib/slack_resources/resources/event_api/examples/group_left.json +2 -2
  113. data/lib/slack_resources/resources/event_api/examples/group_open.json +2 -2
  114. data/lib/slack_resources/resources/event_api/examples/group_rename.json +2 -2
  115. data/lib/slack_resources/resources/event_api/examples/group_unarchive.json +2 -2
  116. data/lib/slack_resources/resources/event_api/examples/im_close.json +2 -2
  117. data/lib/slack_resources/resources/event_api/examples/im_created.json +3 -3
  118. data/lib/slack_resources/resources/event_api/examples/im_history_changed.json +2 -2
  119. data/lib/slack_resources/resources/event_api/examples/im_open.json +2 -2
  120. data/lib/slack_resources/resources/event_api/examples/link_shared.json +30 -18
  121. data/lib/slack_resources/resources/event_api/examples/member_joined_channel.json +3 -3
  122. data/lib/slack_resources/resources/event_api/examples/member_left_channel.json +3 -3
  123. data/lib/slack_resources/resources/event_api/examples/message.app_home.json +18 -7
  124. data/lib/slack_resources/resources/event_api/examples/message.channels.json +18 -7
  125. data/lib/slack_resources/resources/event_api/examples/message.groups.json +18 -7
  126. data/lib/slack_resources/resources/event_api/examples/message.im.json +18 -7
  127. data/lib/slack_resources/resources/event_api/examples/message.json +4 -6
  128. data/lib/slack_resources/resources/event_api/examples/message.mpim.json +18 -7
  129. data/lib/slack_resources/resources/event_api/examples/pin_added.json +3 -3
  130. data/lib/slack_resources/resources/event_api/examples/pin_removed.json +4 -4
  131. data/lib/slack_resources/resources/event_api/examples/reaction_added.json +5 -5
  132. data/lib/slack_resources/resources/event_api/examples/reaction_removed.json +5 -5
  133. data/lib/slack_resources/resources/event_api/examples/resources_added.json +28 -17
  134. data/lib/slack_resources/resources/event_api/examples/resources_removed.json +28 -17
  135. data/lib/slack_resources/resources/event_api/examples/scope_denied.json +17 -6
  136. data/lib/slack_resources/resources/event_api/examples/scope_granted.json +17 -6
  137. data/lib/slack_resources/resources/event_api/examples/star_added.json +3 -3
  138. data/lib/slack_resources/resources/event_api/examples/star_removed.json +3 -3
  139. data/lib/slack_resources/resources/event_api/examples/subteam_created.json +2 -2
  140. data/lib/slack_resources/resources/event_api/examples/subteam_members_changed.json +6 -6
  141. data/lib/slack_resources/resources/event_api/examples/subteam_self_added.json +2 -2
  142. data/lib/slack_resources/resources/event_api/examples/subteam_self_removed.json +2 -2
  143. data/lib/slack_resources/resources/event_api/examples/subteam_updated.json +2 -2
  144. data/lib/slack_resources/resources/event_api/examples/team_domain_change.json +2 -2
  145. data/lib/slack_resources/resources/event_api/examples/team_rename.json +2 -2
  146. data/lib/slack_resources/resources/event_api/examples/tokens_revoked.json +16 -8
  147. data/lib/slack_resources/resources/event_api/examples/url_verification.json +1 -1
  148. data/lib/slack_resources/resources/event_api/examples/user_resource_denied.json +17 -6
  149. data/lib/slack_resources/resources/event_api/examples/user_resource_granted.json +17 -6
  150. data/lib/slack_resources/resources/event_api/examples/user_resource_removed.json +14 -3
  151. data/lib/slack_resources/{raw_data → resources}/event_api/meta.json +72 -0
  152. data/lib/slack_resources/resources/event_api/schema.json +105 -257
  153. data/lib/slack_resources/resources/event_api/schemas/emoji_changed.json +9 -27
  154. data/lib/slack_resources/resources/event_api/schemas/member_joined_channel.json +4 -1
  155. data/lib/slack_resources/resources/event_api/schemas/member_left_channel.json +4 -1
  156. data/lib/slack_resources/resources/event_api/schemas/message.app_home.json +4 -1
  157. data/lib/slack_resources/resources/event_api/schemas/message.channels.json +7 -1
  158. data/lib/slack_resources/resources/event_api/schemas/message.groups.json +7 -1
  159. data/lib/slack_resources/resources/event_api/schemas/message.im.json +7 -1
  160. data/lib/slack_resources/resources/event_api/schemas/message.json +17 -39
  161. data/lib/slack_resources/resources/event_api/schemas/message.mpim.json +7 -1
  162. data/lib/slack_resources/resources/event_api/schemas/resources_added.json +15 -15
  163. data/lib/slack_resources/resources/event_api/schemas/resources_removed.json +15 -15
  164. data/lib/slack_resources/resources/event_api/schemas/team_rename.json +2 -2
  165. data/lib/slack_resources/resources/event_api/schemas/url_verification.json +6 -0
  166. data/lib/slack_resources/resources/event_api/summary.json +3397 -4884
  167. data/lib/slack_resources/version.rb +3 -0
  168. data/lib/slack_resources.rb +1 -9
  169. data/slack_resources.gemspec +2 -4
  170. metadata +10 -93
  171. data/.circleci/gem_deployment.rb +0 -53
  172. data/lib/generate_event_api_resources.rb +0 -8
  173. data/lib/slack_resources/generator/event_api/examples_preparation.rb +0 -71
  174. data/lib/slack_resources/generator/event_api/strong_hash.rb +0 -25
  175. data/lib/slack_resources/generator/event_api/to_schema.rb +0 -200
  176. data/lib/slack_resources/generator/event_api/type_detection.rb +0 -272
  177. data/lib/slack_resources/generator/event_api/write.rb +0 -123
  178. data/lib/slack_resources/raw_data/event_api/_added_examples/emoji_changed.add.json +0 -7
  179. data/lib/slack_resources/raw_data/event_api/_added_examples/emoji_changed.remove.json +0 -6
  180. data/lib/slack_resources/raw_data/event_api/examples/app_mention.json +0 -8
  181. data/lib/slack_resources/raw_data/event_api/examples/app_rate_limited.json +0 -7
  182. data/lib/slack_resources/raw_data/event_api/examples/app_uninstalled.json +0 -11
  183. data/lib/slack_resources/raw_data/event_api/examples/channel_archive.json +0 -5
  184. data/lib/slack_resources/raw_data/event_api/examples/channel_created.json +0 -9
  185. data/lib/slack_resources/raw_data/event_api/examples/channel_deleted.json +0 -4
  186. data/lib/slack_resources/raw_data/event_api/examples/channel_history_changed.json +0 -6
  187. data/lib/slack_resources/raw_data/event_api/examples/channel_left.json +0 -4
  188. data/lib/slack_resources/raw_data/event_api/examples/channel_rename.json +0 -8
  189. data/lib/slack_resources/raw_data/event_api/examples/channel_unarchive.json +0 -5
  190. data/lib/slack_resources/raw_data/event_api/examples/dnd_updated.json +0 -11
  191. data/lib/slack_resources/raw_data/event_api/examples/dnd_updated_user.json +0 -9
  192. data/lib/slack_resources/raw_data/event_api/examples/email_domain_changed.json +0 -5
  193. data/lib/slack_resources/raw_data/event_api/examples/emoji_changed.json +0 -8
  194. data/lib/slack_resources/raw_data/event_api/examples/file_change.json +0 -7
  195. data/lib/slack_resources/raw_data/event_api/examples/file_comment_added.json +0 -9
  196. data/lib/slack_resources/raw_data/event_api/examples/file_comment_deleted.json +0 -8
  197. data/lib/slack_resources/raw_data/event_api/examples/file_comment_edited.json +0 -9
  198. data/lib/slack_resources/raw_data/event_api/examples/file_created.json +0 -7
  199. data/lib/slack_resources/raw_data/event_api/examples/file_deleted.json +0 -5
  200. data/lib/slack_resources/raw_data/event_api/examples/file_public.json +0 -7
  201. data/lib/slack_resources/raw_data/event_api/examples/file_shared.json +0 -7
  202. data/lib/slack_resources/raw_data/event_api/examples/file_unshared.json +0 -7
  203. data/lib/slack_resources/raw_data/event_api/examples/grid_migration_finished.json +0 -12
  204. data/lib/slack_resources/raw_data/event_api/examples/grid_migration_started.json +0 -12
  205. data/lib/slack_resources/raw_data/event_api/examples/group_archive.json +0 -4
  206. data/lib/slack_resources/raw_data/event_api/examples/group_close.json +0 -5
  207. data/lib/slack_resources/raw_data/event_api/examples/group_deleted.json +0 -4
  208. data/lib/slack_resources/raw_data/event_api/examples/group_history_changed.json +0 -6
  209. data/lib/slack_resources/raw_data/event_api/examples/group_left.json +0 -4
  210. data/lib/slack_resources/raw_data/event_api/examples/group_open.json +0 -5
  211. data/lib/slack_resources/raw_data/event_api/examples/group_rename.json +0 -8
  212. data/lib/slack_resources/raw_data/event_api/examples/group_unarchive.json +0 -4
  213. data/lib/slack_resources/raw_data/event_api/examples/im_close.json +0 -5
  214. data/lib/slack_resources/raw_data/event_api/examples/im_created.json +0 -6
  215. data/lib/slack_resources/raw_data/event_api/examples/im_history_changed.json +0 -6
  216. data/lib/slack_resources/raw_data/event_api/examples/im_open.json +0 -5
  217. data/lib/slack_resources/raw_data/event_api/examples/link_shared.json +0 -33
  218. data/lib/slack_resources/raw_data/event_api/examples/member_joined_channel.json +0 -8
  219. data/lib/slack_resources/raw_data/event_api/examples/member_left_channel.json +0 -7
  220. data/lib/slack_resources/raw_data/event_api/examples/message.app_home.json +0 -20
  221. data/lib/slack_resources/raw_data/event_api/examples/message.channels.json +0 -20
  222. data/lib/slack_resources/raw_data/event_api/examples/message.groups.json +0 -20
  223. data/lib/slack_resources/raw_data/event_api/examples/message.im.json +0 -20
  224. data/lib/slack_resources/raw_data/event_api/examples/message.json +0 -7
  225. data/lib/slack_resources/raw_data/event_api/examples/message.mpim.json +0 -20
  226. data/lib/slack_resources/raw_data/event_api/examples/pin_added.json +0 -8
  227. data/lib/slack_resources/raw_data/event_api/examples/pin_removed.json +0 -9
  228. data/lib/slack_resources/raw_data/event_api/examples/reaction_added.json +0 -12
  229. data/lib/slack_resources/raw_data/event_api/examples/reaction_removed.json +0 -12
  230. data/lib/slack_resources/raw_data/event_api/examples/resources_added.json +0 -31
  231. data/lib/slack_resources/raw_data/event_api/examples/resources_removed.json +0 -31
  232. data/lib/slack_resources/raw_data/event_api/examples/scope_denied.json +0 -20
  233. data/lib/slack_resources/raw_data/event_api/examples/scope_granted.json +0 -20
  234. data/lib/slack_resources/raw_data/event_api/examples/star_added.json +0 -7
  235. data/lib/slack_resources/raw_data/event_api/examples/star_removed.json +0 -7
  236. data/lib/slack_resources/raw_data/event_api/examples/subteam_created.json +0 -28
  237. data/lib/slack_resources/raw_data/event_api/examples/subteam_members_changed.json +0 -17
  238. data/lib/slack_resources/raw_data/event_api/examples/subteam_self_added.json +0 -4
  239. data/lib/slack_resources/raw_data/event_api/examples/subteam_self_removed.json +0 -4
  240. data/lib/slack_resources/raw_data/event_api/examples/subteam_updated.json +0 -34
  241. data/lib/slack_resources/raw_data/event_api/examples/team_domain_change.json +0 -5
  242. data/lib/slack_resources/raw_data/event_api/examples/team_join.json +0 -5
  243. data/lib/slack_resources/raw_data/event_api/examples/team_rename.json +0 -4
  244. data/lib/slack_resources/raw_data/event_api/examples/tokens_revoked.json +0 -19
  245. data/lib/slack_resources/raw_data/event_api/examples/url_verification.json +0 -5
  246. data/lib/slack_resources/raw_data/event_api/examples/user_change.json +0 -5
  247. data/lib/slack_resources/raw_data/event_api/examples/user_resource_denied.json +0 -20
  248. data/lib/slack_resources/raw_data/event_api/examples/user_resource_granted.json +0 -20
  249. data/lib/slack_resources/raw_data/event_api/examples/user_resource_removed.json +0 -16
  250. data/lib/slack_resources/resources/event_api/details/emoji_changed.add.json +0 -78
  251. data/lib/slack_resources/resources/event_api/details/emoji_changed.remove.json +0 -77
  252. data/lib/slack_resources/resources/event_api/examples/emoji_changed.add.json +0 -7
  253. data/lib/slack_resources/resources/event_api/examples/emoji_changed.remove.json +0 -8
  254. data/lib/slack_resources/resources/event_api/schemas/emoji_changed.add.json +0 -42
  255. data/lib/slack_resources/resources/event_api/schemas/emoji_changed.remove.json +0 -40
  256. data/lib/slack_resources/resources/event_api.rb +0 -38
@@ -85,6 +85,9 @@
85
85
  null
86
86
  ]
87
87
  },
88
+ "challenge": {
89
+ "type": "string"
90
+ },
88
91
  "channel": {
89
92
  "type": "object",
90
93
  "description": "(defined by script)",
@@ -224,18 +227,7 @@
224
227
  }
225
228
  },
226
229
  "channel_type": {
227
- "type": [
228
- "null",
229
- "string"
230
- ],
231
- "enum": [
232
- null,
233
- "app_home",
234
- "channel",
235
- "group",
236
- "im",
237
- "mpim"
238
- ]
230
+ "type": "string"
239
231
  },
240
232
  "channel_unarchive": {
241
233
  "type": "object",
@@ -358,9 +350,6 @@
358
350
  "event_ts": {
359
351
  "$ref": "#/definitions/timestamp"
360
352
  },
361
- "name": {
362
- "$ref": "#/definitions/emoji_name"
363
- },
364
353
  "names": {
365
354
  "type": "array",
366
355
  "items": {
@@ -368,66 +357,7 @@
368
357
  }
369
358
  },
370
359
  "subtype": {
371
- "$ref": "#/definitions/emoji_subtype"
372
- },
373
- "type": {
374
- "const": "emoji_changed"
375
- },
376
- "value": {
377
- "$ref": "#/definitions/emoji_value"
378
- }
379
- },
380
- "example": {
381
- "event_ts": "1361482916.000004",
382
- "name": "picard_facepalm",
383
- "subtype": "add",
384
- "type": "emoji_changed",
385
- "value": "https://my.slack.com/emoji/picard_facepalm/db8e287430eaa459.gif"
386
- }
387
- },
388
- "emoji_changed.add": {
389
- "type": "object",
390
- "description": "learn more: https://api.slack.com/events/emoji_changed",
391
- "properties": {
392
- "event_ts": {
393
- "$ref": "#/definitions/timestamp"
394
- },
395
- "name": {
396
- "$ref": "#/definitions/emoji_name"
397
- },
398
- "subtype": {
399
- "const": "add"
400
- },
401
- "type": {
402
- "const": "emoji_changed"
403
- },
404
- "value": {
405
- "$ref": "#/definitions/emoji_value"
406
- }
407
- },
408
- "example": {
409
- "event_ts": "1361482916.000004",
410
- "name": "picard_facepalm",
411
- "subtype": "add",
412
- "type": "emoji_changed",
413
- "value": "https://my.slack.com/emoji/picard_facepalm/db8e287430eaa459.gif"
414
- }
415
- },
416
- "emoji_changed.remove": {
417
- "type": "object",
418
- "description": "learn more: https://api.slack.com/events/emoji_changed",
419
- "properties": {
420
- "event_ts": {
421
- "$ref": "#/definitions/timestamp"
422
- },
423
- "names": {
424
- "type": "array",
425
- "items": {
426
- "$ref": "#/definitions/emoji_name"
427
- }
428
- },
429
- "subtype": {
430
- "const": "remove"
360
+ "$ref": "#/definitions/subscription_subtype"
431
361
  },
432
362
  "type": {
433
363
  "const": "emoji_changed"
@@ -442,31 +372,8 @@
442
372
  "type": "emoji_changed"
443
373
  }
444
374
  },
445
- "emoji_changed_subtype": {
446
- "type": "string",
447
- "enum": [
448
- "add",
449
- "remove"
450
- ]
451
- },
452
375
  "emoji_name": {
453
- "type": [
454
- "null",
455
- "string"
456
- ]
457
- },
458
- "emoji_subtype": {
459
- "type": "string",
460
- "enum": [
461
- "add",
462
- "remove"
463
- ]
464
- },
465
- "emoji_value": {
466
- "type": [
467
- "null",
468
- "string"
469
- ]
376
+ "type": "string"
470
377
  },
471
378
  "enterprise_id": {
472
379
  "type": "string"
@@ -1100,7 +1007,7 @@
1100
1007
  "$ref": "#/definitions/channel_id"
1101
1008
  },
1102
1009
  "channel_type": {
1103
- "const": "C"
1010
+ "$ref": "#/definitions/channel_type"
1104
1011
  },
1105
1012
  "inviter": {
1106
1013
  "$ref": "#/definitions/user_id"
@@ -1132,7 +1039,7 @@
1132
1039
  "$ref": "#/definitions/channel_id"
1133
1040
  },
1134
1041
  "channel_type": {
1135
- "const": "C"
1042
+ "$ref": "#/definitions/channel_type"
1136
1043
  },
1137
1044
  "team": {
1138
1045
  "$ref": "#/definitions/team_id"
@@ -1157,10 +1064,10 @@
1157
1064
  "description": "learn more: https://api.slack.com/events/message",
1158
1065
  "properties": {
1159
1066
  "channel": {
1160
- "$ref": "#/definitions/channel"
1067
+ "$ref": "#/definitions/channel_id"
1161
1068
  },
1162
1069
  "channel_type": {
1163
- "$ref": "#/definitions/channel_type"
1070
+ "$ref": "#/definitions/message_channel_type"
1164
1071
  },
1165
1072
  "event_ts": {
1166
1073
  "$ref": "#/definitions/timestamp"
@@ -1169,18 +1076,18 @@
1169
1076
  "type": "string"
1170
1077
  },
1171
1078
  "ts": {
1172
- "$ref": "#/definitions/ts"
1079
+ "$ref": "#/definitions/timestamp"
1173
1080
  },
1174
1081
  "type": {
1175
1082
  "const": "message"
1176
1083
  },
1177
1084
  "user": {
1178
- "$ref": "#/definitions/user"
1085
+ "$ref": "#/definitions/user_id"
1179
1086
  }
1180
1087
  },
1181
1088
  "example": {
1182
1089
  "channel": "D0PNCRP9N",
1183
- "channel_type": "app_home",
1090
+ "channel_type": "app_home|channel|group|mpim|null",
1184
1091
  "event_ts": "1525215129.000001",
1185
1092
  "text": "How many cats did we herd yesterday?",
1186
1093
  "ts": "1525215129.000001",
@@ -1196,7 +1103,7 @@
1196
1103
  "$ref": "#/definitions/channel_id"
1197
1104
  },
1198
1105
  "channel_type": {
1199
- "const": "app_home"
1106
+ "type": "string"
1200
1107
  },
1201
1108
  "event_ts": {
1202
1109
  "$ref": "#/definitions/timestamp"
@@ -1224,149 +1131,15 @@
1224
1131
  "user": "U061F7AUR"
1225
1132
  }
1226
1133
  },
1227
- "message.channels": {
1228
- "type": "object",
1229
- "description": "learn more: https://api.slack.com/events/message.channels",
1230
- "properties": {
1231
- "channel": {
1232
- "$ref": "#/definitions/channel_id"
1233
- },
1234
- "channel_type": {
1235
- "const": "channel"
1236
- },
1237
- "event_ts": {
1238
- "$ref": "#/definitions/timestamp"
1239
- },
1240
- "text": {
1241
- "type": "string"
1242
- },
1243
- "ts": {
1244
- "$ref": "#/definitions/timestamp"
1245
- },
1246
- "type": {
1247
- "const": "message"
1248
- },
1249
- "user": {
1250
- "$ref": "#/definitions/user_id"
1251
- }
1252
- },
1253
- "example": {
1254
- "channel": "C024BE91L",
1255
- "channel_type": "channel",
1256
- "event_ts": "1355517523.000005",
1257
- "text": "Live long and prospect.",
1258
- "ts": "1355517523.000005",
1259
- "type": "message",
1260
- "user": "U2147483697"
1261
- }
1262
- },
1263
- "message.groups": {
1264
- "type": "object",
1265
- "description": "learn more: https://api.slack.com/events/message.groups",
1266
- "properties": {
1267
- "channel": {
1268
- "$ref": "#/definitions/channel_id"
1269
- },
1270
- "channel_type": {
1271
- "const": "group"
1272
- },
1273
- "event_ts": {
1274
- "$ref": "#/definitions/timestamp"
1275
- },
1276
- "text": {
1277
- "type": "string"
1278
- },
1279
- "ts": {
1280
- "$ref": "#/definitions/timestamp"
1281
- },
1282
- "type": {
1283
- "const": "message"
1284
- },
1285
- "user": {
1286
- "$ref": "#/definitions/user_id"
1287
- }
1288
- },
1289
- "example": {
1290
- "channel": "G024BE91L",
1291
- "channel_type": "group",
1292
- "event_ts": "1355517523.000005",
1293
- "text": "One cannot programmatically detect the difference between `message.mpim` and `message.groups`.",
1294
- "ts": "1355517523.000005",
1295
- "type": "message",
1296
- "user": "U2147483697"
1297
- }
1298
- },
1299
- "message.im": {
1300
- "type": "object",
1301
- "description": "learn more: https://api.slack.com/events/message.im",
1302
- "properties": {
1303
- "channel": {
1304
- "$ref": "#/definitions/channel_id"
1305
- },
1306
- "channel_type": {
1307
- "const": "im"
1308
- },
1309
- "event_ts": {
1310
- "$ref": "#/definitions/timestamp"
1311
- },
1312
- "text": {
1313
- "type": "string"
1314
- },
1315
- "ts": {
1316
- "$ref": "#/definitions/timestamp"
1317
- },
1318
- "type": {
1319
- "const": "message"
1320
- },
1321
- "user": {
1322
- "$ref": "#/definitions/user_id"
1323
- }
1324
- },
1325
- "example": {
1326
- "channel": "D024BE91L",
1327
- "channel_type": "im",
1328
- "event_ts": "1355517523.000005",
1329
- "text": "Hello hello can you hear me?",
1330
- "ts": "1355517523.000005",
1331
- "type": "message",
1332
- "user": "U2147483697"
1333
- }
1334
- },
1335
- "message.mpim": {
1336
- "type": "object",
1337
- "description": "learn more: https://api.slack.com/events/message.mpim",
1338
- "properties": {
1339
- "channel": {
1340
- "$ref": "#/definitions/channel_id"
1341
- },
1342
- "channel_type": {
1343
- "const": "mpim"
1344
- },
1345
- "event_ts": {
1346
- "$ref": "#/definitions/timestamp"
1347
- },
1348
- "text": {
1349
- "type": "string"
1350
- },
1351
- "ts": {
1352
- "$ref": "#/definitions/timestamp"
1353
- },
1354
- "type": {
1355
- "const": "message"
1356
- },
1357
- "user": {
1358
- "$ref": "#/definitions/user_id"
1359
- }
1360
- },
1361
- "example": {
1362
- "channel": "G024BE91L",
1363
- "channel_type": "mpim",
1364
- "event_ts": "1355517523.000005",
1365
- "text": "Let's make a pact.",
1366
- "ts": "1355517523.000005",
1367
- "type": "message",
1368
- "user": "U2147483697"
1369
- }
1134
+ "message_channel_type": {
1135
+ "type": "string",
1136
+ "enum": [
1137
+ "app_home",
1138
+ "channel",
1139
+ "group",
1140
+ "mpim",
1141
+ null
1142
+ ]
1370
1143
  },
1371
1144
  "pin_added": {
1372
1145
  "type": "object",
@@ -1647,6 +1420,9 @@
1647
1420
  "type": "resources_removed"
1648
1421
  }
1649
1422
  },
1423
+ "root_name": {
1424
+ "type": "string"
1425
+ },
1650
1426
  "scope": {
1651
1427
  "type": "string",
1652
1428
  "enum": [
@@ -1779,6 +1555,84 @@
1779
1555
  "user": "U024BE7LH"
1780
1556
  }
1781
1557
  },
1558
+ "subscription_subtype": {
1559
+ "type": "string"
1560
+ },
1561
+ "subscription_type": {
1562
+ "type": "string",
1563
+ "enum": [
1564
+ "app_mention",
1565
+ "app_rate_limited",
1566
+ "app_uninstalled",
1567
+ "channel_archive",
1568
+ "channel_created",
1569
+ "channel_deleted",
1570
+ "channel_history_changed",
1571
+ "channel_left",
1572
+ "channel_rename",
1573
+ "channel_unarchive",
1574
+ "dnd_updated",
1575
+ "dnd_updated_user",
1576
+ "email_domain_changed",
1577
+ "emoji_changed",
1578
+ "file_change",
1579
+ "file_comment_added",
1580
+ "file_comment_deleted",
1581
+ "file_comment_edited",
1582
+ "file_created",
1583
+ "file_deleted",
1584
+ "file_public",
1585
+ "file_shared",
1586
+ "file_unshared",
1587
+ "grid_migration_finished",
1588
+ "grid_migration_started",
1589
+ "group_archive",
1590
+ "group_close",
1591
+ "group_deleted",
1592
+ "group_history_changed",
1593
+ "group_left",
1594
+ "group_open",
1595
+ "group_rename",
1596
+ "group_unarchive",
1597
+ "im_close",
1598
+ "im_created",
1599
+ "im_history_changed",
1600
+ "im_open",
1601
+ "link_shared",
1602
+ "member_joined_channel",
1603
+ "member_left_channel",
1604
+ "message",
1605
+ "message.app_home",
1606
+ "message.channels",
1607
+ "message.groups",
1608
+ "message.im",
1609
+ "message.mpim",
1610
+ "pin_added",
1611
+ "pin_removed",
1612
+ "reaction_added",
1613
+ "reaction_removed",
1614
+ "resources_added",
1615
+ "resources_removed",
1616
+ "scope_denied",
1617
+ "scope_granted",
1618
+ "star_added",
1619
+ "star_removed",
1620
+ "subteam_created",
1621
+ "subteam_members_changed",
1622
+ "subteam_self_added",
1623
+ "subteam_self_removed",
1624
+ "subteam_updated",
1625
+ "team_domain_change",
1626
+ "team_join",
1627
+ "team_rename",
1628
+ "tokens_revoked",
1629
+ "url_verification",
1630
+ "user_change",
1631
+ "user_resource_denied",
1632
+ "user_resource_granted",
1633
+ "user_resource_removed"
1634
+ ]
1635
+ },
1782
1636
  "subteam": {
1783
1637
  "type": "object",
1784
1638
  "description": "(defined by script)",
@@ -2053,15 +1907,12 @@
2053
1907
  }
2054
1908
  }
2055
1909
  },
2056
- "team_name": {
2057
- "type": "string"
2058
- },
2059
1910
  "team_rename": {
2060
1911
  "type": "object",
2061
1912
  "description": "learn more: https://api.slack.com/events/team_rename",
2062
1913
  "properties": {
2063
1914
  "name": {
2064
- "$ref": "#/definitions/team_name"
1915
+ "$ref": "#/definitions/root_name"
2065
1916
  },
2066
1917
  "type": {
2067
1918
  "const": "team_rename"
@@ -2125,9 +1976,6 @@
2125
1976
  "trigger_id": {
2126
1977
  "type": "string"
2127
1978
  },
2128
- "ts": {
2129
- "type": "string"
2130
- },
2131
1979
  "url_verification": {
2132
1980
  "type": "object",
2133
1981
  "description": "learn more: https://api.slack.com/events/url_verification",
@@ -5,23 +5,10 @@
5
5
  "type": "string"
6
6
  },
7
7
  "emoji_name": {
8
- "type": [
9
- "null",
10
- "string"
11
- ]
12
- },
13
- "emoji_subtype": {
14
- "type": "string",
15
- "enum": [
16
- "add",
17
- "remove"
18
- ]
8
+ "type": "string"
19
9
  },
20
- "emoji_value": {
21
- "type": [
22
- "null",
23
- "string"
24
- ]
10
+ "subscription_subtype": {
11
+ "type": "string"
25
12
  },
26
13
  "emoji_changed": {
27
14
  "type": "object",
@@ -30,9 +17,6 @@
30
17
  "event_ts": {
31
18
  "$ref": "#/definitions/timestamp"
32
19
  },
33
- "name": {
34
- "$ref": "#/definitions/emoji_name"
35
- },
36
20
  "names": {
37
21
  "type": "array",
38
22
  "items": {
@@ -40,21 +24,19 @@
40
24
  }
41
25
  },
42
26
  "subtype": {
43
- "$ref": "#/definitions/emoji_subtype"
27
+ "$ref": "#/definitions/subscription_subtype"
44
28
  },
45
29
  "type": {
46
30
  "const": "emoji_changed"
47
- },
48
- "value": {
49
- "$ref": "#/definitions/emoji_value"
50
31
  }
51
32
  },
52
33
  "example": {
53
34
  "event_ts": "1361482916.000004",
54
- "name": "picard_facepalm",
55
- "subtype": "add",
56
- "type": "emoji_changed",
57
- "value": "https://my.slack.com/emoji/picard_facepalm/db8e287430eaa459.gif"
35
+ "names": [
36
+ "picard_facepalm"
37
+ ],
38
+ "subtype": "remove",
39
+ "type": "emoji_changed"
58
40
  }
59
41
  }
60
42
  }
@@ -4,6 +4,9 @@
4
4
  "channel_id": {
5
5
  "type": "string"
6
6
  },
7
+ "channel_type": {
8
+ "type": "string"
9
+ },
7
10
  "user_id": {
8
11
  "type": "string"
9
12
  },
@@ -18,7 +21,7 @@
18
21
  "$ref": "#/definitions/channel_id"
19
22
  },
20
23
  "channel_type": {
21
- "const": "C"
24
+ "$ref": "#/definitions/channel_type"
22
25
  },
23
26
  "inviter": {
24
27
  "$ref": "#/definitions/user_id"
@@ -4,6 +4,9 @@
4
4
  "channel_id": {
5
5
  "type": "string"
6
6
  },
7
+ "channel_type": {
8
+ "type": "string"
9
+ },
7
10
  "team_id": {
8
11
  "type": "string"
9
12
  },
@@ -18,7 +21,7 @@
18
21
  "$ref": "#/definitions/channel_id"
19
22
  },
20
23
  "channel_type": {
21
- "const": "C"
24
+ "$ref": "#/definitions/channel_type"
22
25
  },
23
26
  "team": {
24
27
  "$ref": "#/definitions/team_id"
@@ -10,6 +10,9 @@
10
10
  "user_id": {
11
11
  "type": "string"
12
12
  },
13
+ "channel_type": {
14
+ "type": "string"
15
+ },
13
16
  "message.app_home": {
14
17
  "type": "object",
15
18
  "description": "learn more: https://api.slack.com/events/message.app_home",
@@ -18,7 +21,7 @@
18
21
  "$ref": "#/definitions/channel_id"
19
22
  },
20
23
  "channel_type": {
21
- "const": "app_home"
24
+ "type": "string"
22
25
  },
23
26
  "event_ts": {
24
27
  "$ref": "#/definitions/timestamp"
@@ -10,6 +10,12 @@
10
10
  "user_id": {
11
11
  "type": "string"
12
12
  },
13
+ "message_channel_type": {
14
+ "type": "string",
15
+ "enum": [
16
+ "channel"
17
+ ]
18
+ },
13
19
  "message.channels": {
14
20
  "type": "object",
15
21
  "description": "learn more: https://api.slack.com/events/message.channels",
@@ -18,7 +24,7 @@
18
24
  "$ref": "#/definitions/channel_id"
19
25
  },
20
26
  "channel_type": {
21
- "const": "channel"
27
+ "$ref": "#/definitions/message_channel_type"
22
28
  },
23
29
  "event_ts": {
24
30
  "$ref": "#/definitions/timestamp"
@@ -10,6 +10,12 @@
10
10
  "user_id": {
11
11
  "type": "string"
12
12
  },
13
+ "message_channel_type": {
14
+ "type": "string",
15
+ "enum": [
16
+ "group"
17
+ ]
18
+ },
13
19
  "message.groups": {
14
20
  "type": "object",
15
21
  "description": "learn more: https://api.slack.com/events/message.groups",
@@ -18,7 +24,7 @@
18
24
  "$ref": "#/definitions/channel_id"
19
25
  },
20
26
  "channel_type": {
21
- "const": "group"
27
+ "$ref": "#/definitions/message_channel_type"
22
28
  },
23
29
  "event_ts": {
24
30
  "$ref": "#/definitions/timestamp"
@@ -10,6 +10,12 @@
10
10
  "user_id": {
11
11
  "type": "string"
12
12
  },
13
+ "message_channel_type": {
14
+ "type": "string",
15
+ "enum": [
16
+ "im"
17
+ ]
18
+ },
13
19
  "message.im": {
14
20
  "type": "object",
15
21
  "description": "learn more: https://api.slack.com/events/message.im",
@@ -18,7 +24,7 @@
18
24
  "$ref": "#/definitions/channel_id"
19
25
  },
20
26
  "channel_type": {
21
- "const": "im"
27
+ "$ref": "#/definitions/message_channel_type"
22
28
  },
23
29
  "event_ts": {
24
30
  "$ref": "#/definitions/timestamp"