-
Notifications
You must be signed in to change notification settings - Fork 119
/
Events.php
427 lines (363 loc) · 14.5 KB
/
Events.php
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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
<?php
namespace Trello;
/**
* Trello API events
* @link https://trello.com/docs/api/card/#get-1-cards-card-id-or-shortlink-actions
*/
final class Events
{
/**************************************************************************************
* Board Events *
**************************************************************************************/
/**
* When a board is created
* The event listener method receives a Trello\Event\BoardEvent instance.
*/
const BOARD_CREATE = 'createBoard';
/**
* When a board is updated
* The event listener method receives a Trello\Event\BoardEvent instance.
*/
const BOARD_UPDATE = 'updateBoard';
/**
* When a board is copied
* The event listener method receives a Trello\Event\BoardEvent instance.
*/
const BOARD_COPY = 'copyBoard';
/**
* When a card is moved from a board
* The event listener method receives a Trello\Event\CardMoveEvent instance.
*/
const BOARD_MOVE_CARD_FROM = 'moveCardFromBoard';
/**
* When a card is moved to a board
* The event listener method receives a Trello\Event\CardMoveEvent instance.
*/
const BOARD_MOVE_CARD_TO = 'moveCardToBoard';
/**
* When a card is moved from a board
* The event listener method receives a Trello\Event\ListMoveEvent instance.
*/
const BOARD_MOVE_LIST_FROM = 'moveListFromBoard';
/**
* When a card is moved to a board
* The event listener method receives a Trello\Event\ListMoveEvent instance.
*/
const BOARD_MOVE_LIST_TO = 'moveListToBoard';
/**
* When a member is added to a board
* The event listener method receives a Trello\Event\BoardMemberEvent instance.
*/
const BOARD_ADD_MEMBER = 'addMemberToBoard';
/**
* When a member becomes admin of a board
* The event listener method receives a Trello\Event\BoardMemberEvent instance.
*/
const BOARD_MAKE_ADMIN = 'makeAdminOfBoard';
/**
* When a member becomes normal member of a board
* The event listener method receives a Trello\Event\BoardMemberEvent instance.
*/
const BOARD_MAKE_NORMAL_MEMBER = 'makeNormalMemberOfBoard';
/**
* When a member becomes observer of a board
* The event listener method receives a Trello\Event\BoardMemberEvent instance.
*/
const BOARD_MAKE_OBSERVER = 'makeObserverOfBoard';
/**
* When a member looses admin rights on a board
* The event listener method receives a Trello\Event\BoardMemberEvent instance.
*/
const BOARD_REMOVE_ADMIN = 'removeAdminFromBoard';
/**
* When an invitation is deleted
* The event listener method receives a Trello\Event\BoardMemberEvent instance.
*/
const BOARD_DELETE_INVITATION = 'deleteBoardInvitation';
/**
* When an invitation is in unconfirmed state
* The event listener method receives a Trello\Event\BoardMemberEvent instance.
*/
const BOARD_UNCONFIRMED_INVITATION = 'unconfirmedBoardInvitation';
/**
* When a board is added to an organization
* The event listener method receives a Trello\Event\BoardOrganizationEvent instance.
*/
const BOARD_ADD_TO_ORGANIZATION = 'addToOrganizationBoard';
/**
* When a board is removed from an organization
* The event listener method receives a Trello\Event\BoardOrganizationEvent instance.
*/
const BOARD_REMOVE_FROM_ORGANIZATION = 'removeFromOrganizationBoard';
/**************************************************************************************
* List Events *
**************************************************************************************/
/**
* When a list is created
* The event listener method receives a Trello\Event\ListEvent instance.
*/
const LIST_CREATE = 'createList';
/**
* When a list is updated
* The event listener method receives a Trello\Event\ListEvent instance.
*/
const LIST_UPDATE = 'updateList';
/**
* When a list's closed state changes
* The event listener method receives a Trello\Event\ListEvent instance.
*/
const LIST_UPDATE_CLOSED = 'updateList:closed';
/**
* When a list's name changes
* The event listener method receives a Trello\Event\ListEvent instance.
*/
const LIST_UPDATE_NAME = 'updateList:name';
/**************************************************************************************
* Card Events *
**************************************************************************************/
/**
* When a card is created
* The event listener method receives a Trello\Event\CardEvent instance.
*/
const CARD_CREATE = 'createCard';
/**
* When a card is updated
* The event listener method receives a Trello\Event\CardEvent instance.
*/
const CARD_UPDATE = 'updateCard';
/**
* When a card is moved to an other list
* The event listener method receives a Trello\Event\CardMoveEvent instance.
*/
const CARD_UPDATE_LIST = 'updateCard:idList';
/**
* When a card's name is updated
* The event listener method receives a Trello\Event\CardEvent instance.
*/
const CARD_UPDATE_NAME = 'updateCard:name';
/**
* When a card's description is updated
* The event listener method receives a Trello\Event\CardEvent instance.
*/
const CARD_UPDATE_DESC = 'updateCard:desc';
/**
* When a card's closed state changes
* The event listener method receives a Trello\Event\CardEvent instance.
*/
const CARD_UPDATE_CLOSED = 'updateCard:closed';
/**
* When a card is deleted
* The event listener method receives a Trello\Event\CardEvent instance.
*/
const CARD_DELETE = 'deleteCard';
/**
* When a card is copied
* The event listener method receives a Trello\Event\CardCopyEvent instance.
*/
const CARD_COPY = 'copyCard';
/**
* When a new member is added to a card
* The event listener method receives a Trello\Event\CardMemberEvent instance.
*/
const CARD_ADD_MEMBER = 'addMemberToCard';
/**
* When a new member is removed from a card
* The event listener method receives a Trello\Event\CardMemberEvent instance.
*/
const CARD_REMOVE_MEMBER = 'removeMemberFromCard';
/**
* When a new label is added to a card
* The event listener method receives a Trello\Event\CardEvent instance.
*/
const CARD_ADD_LABEL = 'addLabelToCard';
/**
* When a new label is removed from a card
* The event listener method receives a Trello\Event\CardEvent instance.
*/
const CARD_REMOVE_LABEL = 'removeLabelFromCard';
/**
* When a comment is added to a card
* The event listener method receives a Trello\Event\CardCommentEvent instance.
*/
const CARD_COMMENT = 'commentCard';
/**
* When a card's comment is copied
* The event listener method receives a Trello\Event\CardCommentEvent instance.
*/
const CARD_COPY_COMMENT = 'copyCommentCard';
/**
* When a card is created from a check item
* The event listener method receives a Trello\Event\CardFromCheckItemEvent instance.
*/
const CARD_FROM_CHECKITEM = 'convertToCardFromCheckItem';
/**
* When an attachment is added to a card
* The event listener method receives a Trello\Event\CardAttachmentEvent instance.
*/
const CARD_ADD_ATTACHMENT = 'addAttachmentToCard';
/**
* When an attachment is deleted from a card
* The event listener method receives a Trello\Event\CardAttachmentEvent instance.
*/
const CARD_DELETE_ATTACHMENT = 'deleteAttachmentFromCard';
/**
* When a card is shared by email
* The event listener method receives a Trello\Event\CardEvent instance.
*/
const CARD_EMAIL = 'emailCard';
/**************************************************************************************
* Checklist Events *
**************************************************************************************/
/**
* When a checklist is added to a card
* The event listener method receives a Trello\Event\CardChecklistEvent instance.
*/
const CARD_ADD_CHECKLIST = 'addChecklistToCard';
/**
* When a checklist is updated on a card
* The event listener method receives a Trello\Event\CardChecklistEvent instance.
*/
const CARD_CREATE_CHECKLIST = 'createChecklist';
/**
* When a checklist is updated on a card
* The event listener method receives a Trello\Event\CardChecklistEvent instance.
*/
const CARD_UPDATE_CHECKLIST = 'updateChecklist';
/**
* When a checklist is removed from a card
* The event listener method receives a Trello\Event\CardChecklistEvent instance.
*/
const CARD_REMOVE_CHECKLIST = 'removeChecklistFromCard';
/**
* When an item is added to a checklist
* The event listener method receives a Trello\Event\CardChecklistEvent instance.
*/
const CARD_CREATE_CHECKLIST_ITEM = 'createCheckItem';
/**
* When a checklist is removed from a card
* The event listener method receives a Trello\Event\CardChecklistEvent instance.
*/
const CARD_UPDATE_CHECKLIST_ITEM_STATE = 'updateCheckItemStateOnCard';
/**************************************************************************************
* Organization Events *
**************************************************************************************/
/**
* When an organization is created
* The event listener method receives a Trello\Event\OrganizationEvent instance.
*/
const ORGANIZATION_CREATE = 'createOrganization';
/**
* When an organization is updated
* The event listener method receives a Trello\Event\OrganizationEvent instance.
*/
const ORGANIZATION_UPDATE = 'updateOrganization';
/**
* When a member is added to an organization
* The event listener method receives a Trello\Event\OrganizationMemberEvent instance.
*/
const ORGANIZATION_ADD_MEMBER = 'addMemberToOrganization';
/**
* When a member is made normal member of an organization
* The event listener method receives a Trello\Event\OrganizationMemberEvent instance.
*/
const ORGANIZATION_MAKE_NORMAL_MEMBER = 'makeNormalMemberOfOrganization';
/**
* When a member looses admin rights of an organization
* The event listener method receives a Trello\Event\OrganizationMemberEvent instance.
*/
const ORGANIZATION_REMOVE_ADMIN = 'removeAdminFromOrganization';
/**
* When an invitation to join an organization is deleted
* The event listener method receives a Trello\Event\OrganizationMemberEvent instance.
*/
const ORGANIZATION_DELETE_INVITATION = 'deleteOrganizationInvitation';
/**
* When a member is invited to an organization
* The event listener method receives a Trello\Event\OrganizationMemberEvent instance.
*/
const ORGANIZATION_UNCONFIRMED_INVITATION = 'unconfirmedOrganizationInvitation';
/**************************************************************************************
* Member Events *
**************************************************************************************/
/**
* When a member joins
* The event listener method receives a Trello\Event\MemberEvent instance.
*/
const MEMBER_JOINED = 'memberJoinedTrello';
/**
* When a member is updated
* The event listener method receives a Trello\Event\MemberEvent instance.
*/
const MEMBER_UPDATE = 'updateMember';
/**************************************************************************************
* PowerUp Events *
**************************************************************************************/
/**
* When a power up is enabled
* The event listener method receives a Trello\Event\PowerUpEvent instance.
*/
const POWERUP_ENABLE = 'enablePowerUp';
/**
* When a power up is disabled
* The event listener method receives a Trello\Event\PowerUpEvent instance.
*/
const POWERUP_DISABLE = 'disablePowerUp';
public static function all()
{
return [
self::BOARD_CREATE,
self::BOARD_UPDATE,
self::BOARD_COPY,
self::BOARD_MOVE_CARD_FROM,
self::BOARD_MOVE_CARD_TO,
self::BOARD_MOVE_LIST_FROM,
self::BOARD_MOVE_LIST_TO,
self::BOARD_ADD_MEMBER,
self::BOARD_MAKE_ADMIN,
self::BOARD_MAKE_NORMAL_MEMBER,
self::BOARD_MAKE_OBSERVER,
self::BOARD_REMOVE_ADMIN,
self::BOARD_DELETE_INVITATION,
self::BOARD_UNCONFIRMED_INVITATION,
self::BOARD_ADD_TO_ORGANIZATION,
self::BOARD_REMOVE_FROM_ORGANIZATION,
self::LIST_CREATE,
self::LIST_UPDATE,
self::LIST_UPDATE_CLOSED,
self::LIST_UPDATE_NAME,
self::CARD_CREATE,
self::CARD_UPDATE,
self::CARD_UPDATE_LIST,
self::CARD_UPDATE_NAME,
self::CARD_UPDATE_DESC,
self::CARD_UPDATE_CLOSED,
self::CARD_DELETE,
self::CARD_COPY,
self::CARD_ADD_MEMBER,
self::CARD_REMOVE_MEMBER,
self::CARD_COMMENT,
self::CARD_COPY_COMMENT,
self::CARD_FROM_CHECKITEM,
self::CARD_ADD_ATTACHMENT,
self::CARD_DELETE_ATTACHMENT,
self::CARD_EMAIL,
self::CARD_ADD_LABEL,
self::CARD_REMOVE_LABEL,
self::CARD_ADD_CHECKLIST,
self::CARD_UPDATE_CHECKLIST,
self::CARD_REMOVE_CHECKLIST,
self::CARD_UPDATE_CHECKLIST_ITEM_STATE,
self::ORGANIZATION_CREATE,
self::ORGANIZATION_UPDATE,
self::ORGANIZATION_ADD_MEMBER,
self::ORGANIZATION_MAKE_NORMAL_MEMBER,
self::ORGANIZATION_REMOVE_ADMIN,
self::ORGANIZATION_DELETE_INVITATION,
self::ORGANIZATION_UNCONFIRMED_INVITATION,
self::MEMBER_JOINED,
self::MEMBER_UPDATE,
self::POWERUP_ENABLE,
self::POWERUP_DISABLE,
];
}
}