@pipedream/trello 0.3.14 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/actions/add-attachment-to-card/add-attachment-to-card.mjs +131 -0
- package/actions/add-checklist/add-checklist.mjs +50 -42
- package/actions/add-comment/add-comment.mjs +44 -35
- package/actions/add-existing-label-to-card/add-existing-label-to-card.mjs +19 -14
- package/actions/add-member-to-card/add-member-to-card.mjs +19 -14
- package/actions/archive-card/archive-card.mjs +15 -10
- package/actions/{common.mjs → common/common.mjs} +2 -2
- package/actions/complete-checklist-item/complete-checklist-item.mjs +51 -31
- package/actions/create-board/create-board.mjs +86 -88
- package/actions/create-card/create-card.mjs +102 -53
- package/actions/create-checklist-item/create-checklist-item.mjs +54 -39
- package/actions/create-label/create-label.mjs +38 -50
- package/actions/create-list/create-list.mjs +43 -42
- package/actions/delete-checklist/delete-checklist.mjs +17 -14
- package/actions/find-labels/find-labels.mjs +14 -12
- package/actions/find-list/find-list.mjs +13 -10
- package/actions/get-card/get-card.mjs +13 -9
- package/actions/get-list/get-list.mjs +29 -15
- package/actions/move-card-to-list/move-card-to-list.mjs +17 -13
- package/actions/remove-label-from-card/remove-label-from-card.mjs +20 -13
- package/actions/rename-list/rename-list.mjs +24 -10
- package/actions/search-boards/search-boards.mjs +22 -18
- package/actions/search-cards/search-cards.mjs +23 -18
- package/actions/search-checklists/search-checklists.mjs +96 -59
- package/actions/search-members/search-members.mjs +44 -34
- package/actions/update-card/update-card.mjs +68 -50
- package/common/constants.mjs +128 -0
- package/common/fields.mjs +1 -0
- package/package.json +5 -3
- package/sources/card-archived/card-archived.mjs +22 -18
- package/sources/card-archived/test-event.mjs +64 -0
- package/sources/card-due-date-reminder/card-due-date-reminder.mjs +118 -39
- package/sources/card-due-date-reminder/test-event.mjs +75 -0
- package/sources/card-moved/card-moved.mjs +30 -27
- package/sources/card-moved/test-event.mjs +78 -0
- package/sources/card-updates/card-updates.mjs +29 -27
- package/sources/card-updates/test-event.mjs +86 -0
- package/sources/common/actions.mjs +206 -0
- package/sources/common/common-board-based.mjs +16 -9
- package/sources/common/common-webhook.mjs +86 -32
- package/sources/common/common.mjs +7 -4
- package/sources/custom-webhook-events/custom-webhook-events.mjs +37 -49
- package/sources/new-activity/new-activity.mjs +25 -32
- package/sources/new-attachment/new-attachment.mjs +42 -35
- package/sources/new-attachment/test-event.mjs +69 -0
- package/sources/new-board/new-board.mjs +21 -12
- package/sources/new-board/test-event.mjs +100 -0
- package/sources/new-card/new-card.mjs +29 -27
- package/sources/new-card/test-event.mjs +79 -0
- package/sources/new-checklist/new-checklist.mjs +42 -13
- package/sources/new-checklist/test-event.mjs +22 -0
- package/sources/new-comment-added-to-card/new-comment-added-to-card.mjs +49 -34
- package/sources/new-comment-added-to-card/test-event.mjs +298 -0
- package/sources/new-label/new-label.mjs +17 -14
- package/sources/new-label/test-event.mjs +7 -0
- package/sources/new-label-added-to-card/new-label-added-to-card.mjs +38 -29
- package/sources/new-label-added-to-card/test-event.mjs +85 -0
- package/sources/new-member-on-card/new-member-on-card.mjs +21 -18
- package/sources/new-member-on-card/test-event.mjs +83 -0
- package/sources/new-notification/new-notification.mjs +8 -7
- package/trello.app.mjs +454 -494
- package/actions/add-attachment-to-card-via-url/add-attachment-to-card-via-url.mjs +0 -73
- package/actions/add-file-as-attachment-via-url/add-file-as-attachment-via-url.mjs +0 -72
- package/actions/add-image-attachment/add-image-attachment.mjs +0 -75
- package/actions/add-label-to-card/add-label-to-card.mjs +0 -55
- package/actions/close-board/close-board.mjs +0 -25
- package/actions/copy-board/copy-board.mjs +0 -174
- package/actions/create-checklist/create-checklist.mjs +0 -66
- package/actions/create-comment-on-card/create-comment-on-card.mjs +0 -42
- package/sources/new-list/new-list.mjs +0 -29
- /package/{common → sources/common}/events.mjs +0 -0
@@ -0,0 +1,85 @@
|
|
1
|
+
export default {
|
2
|
+
"id": "620eb14ebda9570d72fddead",
|
3
|
+
"badges": {
|
4
|
+
"attachmentsByType": {
|
5
|
+
"trello": {
|
6
|
+
"board": 0,
|
7
|
+
"card": 0
|
8
|
+
}
|
9
|
+
},
|
10
|
+
"externalSource": null,
|
11
|
+
"location": false,
|
12
|
+
"votes": 0,
|
13
|
+
"viewingMemberVoted": false,
|
14
|
+
"subscribed": false,
|
15
|
+
"fogbugz": "",
|
16
|
+
"checkItems": 1,
|
17
|
+
"checkItemsChecked": 1,
|
18
|
+
"checkItemsEarliestDue": null,
|
19
|
+
"comments": 3,
|
20
|
+
"attachments": 1,
|
21
|
+
"description": false,
|
22
|
+
"due": "2021-05-10T21:50:00.000Z",
|
23
|
+
"dueComplete": false,
|
24
|
+
"start": null,
|
25
|
+
"lastUpdatedByAi": false
|
26
|
+
},
|
27
|
+
"checkItemStates": [
|
28
|
+
{
|
29
|
+
"idCheckItem": "620eb14fbda9570d72fde031",
|
30
|
+
"state": "complete"
|
31
|
+
}
|
32
|
+
],
|
33
|
+
"closed": false,
|
34
|
+
"dueComplete": false,
|
35
|
+
"dateLastActivity": "2024-09-30T16:31:35.215Z",
|
36
|
+
"desc": "",
|
37
|
+
"descData": {
|
38
|
+
"emoji": {}
|
39
|
+
},
|
40
|
+
"due": "2021-05-10T21:50:00.000Z",
|
41
|
+
"dueReminder": null,
|
42
|
+
"email": null,
|
43
|
+
"idBoard": "5f4d7be6c45c22583f75fa02",
|
44
|
+
"idChecklists": [
|
45
|
+
"620eb14fbda9570d72fde030"
|
46
|
+
],
|
47
|
+
"idList": "5f4d7f78bdd7ce4d2d25fdda",
|
48
|
+
"idMembers": [],
|
49
|
+
"idMembersVoted": [],
|
50
|
+
"idShort": 85,
|
51
|
+
"idAttachmentCover": "620eb14ebda9570d72fdded7",
|
52
|
+
"labels": [
|
53
|
+
{
|
54
|
+
"id": "5f4d7be6cdabcf46c027c792",
|
55
|
+
"idBoard": "5f4d7be6c45c22583f75fa02",
|
56
|
+
"idOrganization": "6047c17c2f558003144e04d7",
|
57
|
+
"name": "green label",
|
58
|
+
"nodeId": "ari:cloud:trello::label/workspace/6047c17c2f558003144e04d7/5f4d7be6cdabcf46c027c792",
|
59
|
+
"color": "green",
|
60
|
+
"uses": 9
|
61
|
+
},
|
62
|
+
],
|
63
|
+
"idLabels": [
|
64
|
+
"5f4d7be6cdabcf46c027c792",
|
65
|
+
],
|
66
|
+
"manualCoverAttachment": false,
|
67
|
+
"name": "new card",
|
68
|
+
"pinned": false,
|
69
|
+
"pos": 360447,
|
70
|
+
"shortLink": "dho6bOdR",
|
71
|
+
"shortUrl": "https://trello.com/c/dho6bOdR",
|
72
|
+
"start": null,
|
73
|
+
"subscribed": false,
|
74
|
+
"url": "https://trello.com/c/dho6bOdR/85-new-card",
|
75
|
+
"cover": {
|
76
|
+
"idAttachment": "620eb14ebda9570d72fdded7",
|
77
|
+
"color": null,
|
78
|
+
"idUploadedBackground": null,
|
79
|
+
"size": "normal",
|
80
|
+
"brightness": "dark",
|
81
|
+
"idPlugin": null
|
82
|
+
},
|
83
|
+
"isTemplate": false,
|
84
|
+
"cardRole": null
|
85
|
+
}
|
@@ -1,40 +1,43 @@
|
|
1
1
|
import common from "../common/common-board-based.mjs";
|
2
|
+
import sampleEmit from "./test-event.mjs";
|
2
3
|
|
3
4
|
export default {
|
4
5
|
...common,
|
5
6
|
key: "trello-new-member-on-card",
|
6
7
|
name: "New Member on Card (Instant)",
|
7
8
|
description: "Emit new event for each member that join in a card.",
|
8
|
-
version: "0.
|
9
|
+
version: "0.1.1",
|
9
10
|
type: "source",
|
10
11
|
dedupe: "unique",
|
11
12
|
methods: {
|
12
13
|
...common.methods,
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
14
|
+
getSampleEvents() {
|
15
|
+
return this.app.getMemberCards({
|
16
|
+
userId: "me",
|
17
|
+
});
|
18
|
+
},
|
19
|
+
getSortField() {
|
20
|
+
return "dateLastActivity";
|
19
21
|
},
|
20
|
-
isCorrectEventType(
|
21
|
-
|
22
|
-
return eventType === "addMemberToCard";
|
22
|
+
isCorrectEventType({ type }) {
|
23
|
+
return type === "addMemberToCard";
|
23
24
|
},
|
24
|
-
|
25
|
-
|
26
|
-
|
25
|
+
getResult({ data }) {
|
26
|
+
return this.app.getCard({
|
27
|
+
cardId: data?.card?.id,
|
28
|
+
});
|
27
29
|
},
|
28
30
|
generateMeta({
|
29
|
-
id, name
|
31
|
+
id, name, dateLastActivity,
|
30
32
|
}) {
|
31
33
|
return {
|
32
|
-
id: this.onlyEventsRelatedWithAuthenticatedUser
|
33
|
-
id
|
34
|
-
`${id}${dateLastActivity}`,
|
35
|
-
summary,
|
34
|
+
id: this.onlyEventsRelatedWithAuthenticatedUser
|
35
|
+
? id
|
36
|
+
: `${id}${dateLastActivity}`,
|
37
|
+
summary: name || id,
|
36
38
|
ts: Date.now(),
|
37
39
|
};
|
38
40
|
},
|
39
41
|
},
|
42
|
+
sampleEmit,
|
40
43
|
};
|
@@ -0,0 +1,83 @@
|
|
1
|
+
export default {
|
2
|
+
"id": "66f5aef006f1cca76bb3250f",
|
3
|
+
"badges": {
|
4
|
+
"attachmentsByType": {
|
5
|
+
"trello": {
|
6
|
+
"board": 0,
|
7
|
+
"card": 0
|
8
|
+
}
|
9
|
+
},
|
10
|
+
"externalSource": null,
|
11
|
+
"location": false,
|
12
|
+
"votes": 0,
|
13
|
+
"viewingMemberVoted": false,
|
14
|
+
"subscribed": true,
|
15
|
+
"attachments": 0,
|
16
|
+
"fogbugz": "",
|
17
|
+
"checkItems": 0,
|
18
|
+
"checkItemsChecked": 0,
|
19
|
+
"checkItemsEarliestDue": null,
|
20
|
+
"comments": 2,
|
21
|
+
"description": false,
|
22
|
+
"due": null,
|
23
|
+
"dueComplete": false,
|
24
|
+
"lastUpdatedByAi": false,
|
25
|
+
"start": null
|
26
|
+
},
|
27
|
+
"checkItemStates": [],
|
28
|
+
"closed": false,
|
29
|
+
"dueComplete": false,
|
30
|
+
"dateLastActivity": "2024-09-30T16:22:46.307Z",
|
31
|
+
"desc": "",
|
32
|
+
"descData": {
|
33
|
+
"emoji": {}
|
34
|
+
},
|
35
|
+
"due": null,
|
36
|
+
"dueReminder": null,
|
37
|
+
"email": null,
|
38
|
+
"idBoard": "5f4d7be6c45c22583f75fa02",
|
39
|
+
"idChecklists": [
|
40
|
+
"66f5b2296cb1ec0c66c5a119",
|
41
|
+
"66f6f798f4c23c2020f2bbad"
|
42
|
+
],
|
43
|
+
"idList": "5f4d7f78bdd7ce4d2d25fdda",
|
44
|
+
"idMembers": [
|
45
|
+
"5df149d4fa80be39e64c9a43"
|
46
|
+
],
|
47
|
+
"idMembersVoted": [],
|
48
|
+
"idShort": 98,
|
49
|
+
"idAttachmentCover": null,
|
50
|
+
"labels": [
|
51
|
+
{
|
52
|
+
"id": "66f5c1fd51d74d4e66aa26e0",
|
53
|
+
"idBoard": "5f4d7be6c45c22583f75fa02",
|
54
|
+
"idOrganization": "6047c17c2f558003144e04d7",
|
55
|
+
"name": "subtle sky label",
|
56
|
+
"nodeId": "ari:cloud:trello::label/workspace/6047c17c2f558003144e04d7/66f5c1fd51d74d4e66aa26e0",
|
57
|
+
"color": "sky_light",
|
58
|
+
"uses": 1
|
59
|
+
},
|
60
|
+
],
|
61
|
+
"idLabels": [
|
62
|
+
"66f5c1fd51d74d4e66aa26e0",
|
63
|
+
],
|
64
|
+
"manualCoverAttachment": false,
|
65
|
+
"name": "hello world",
|
66
|
+
"pinned": false,
|
67
|
+
"pos": 393215,
|
68
|
+
"shortLink": "bRoOO9Bh",
|
69
|
+
"shortUrl": "https://trello.com/c/bRoOO9Bh",
|
70
|
+
"start": null,
|
71
|
+
"subscribed": true,
|
72
|
+
"url": "https://trello.com/c/bRoOO9Bh/98-hello-world",
|
73
|
+
"cover": {
|
74
|
+
"idAttachment": null,
|
75
|
+
"color": null,
|
76
|
+
"idUploadedBackground": null,
|
77
|
+
"size": "normal",
|
78
|
+
"brightness": "dark",
|
79
|
+
"idPlugin": null
|
80
|
+
},
|
81
|
+
"isTemplate": false,
|
82
|
+
"cardRole": null
|
83
|
+
}
|
@@ -4,9 +4,8 @@ export default {
|
|
4
4
|
...common,
|
5
5
|
key: "trello-new-notification",
|
6
6
|
name: "New Notification",
|
7
|
-
description:
|
8
|
-
|
9
|
-
version: "0.0.11",
|
7
|
+
description: "Emit new event for each new Trello notification for the authenticated user.",
|
8
|
+
version: "0.1.1",
|
10
9
|
type: "source",
|
11
10
|
dedupe: "unique",
|
12
11
|
methods: {
|
@@ -29,11 +28,13 @@ export default {
|
|
29
28
|
},
|
30
29
|
async run() {
|
31
30
|
const since = this._getLastNotificationId();
|
32
|
-
const params = {
|
33
|
-
since,
|
34
|
-
};
|
35
31
|
|
36
|
-
const notifications = await this.
|
32
|
+
const notifications = await this.app.getNotifications({
|
33
|
+
notificationId: "me",
|
34
|
+
params: {
|
35
|
+
since,
|
36
|
+
},
|
37
|
+
});
|
37
38
|
|
38
39
|
const { length: notificationCount = 0 } = notifications;
|
39
40
|
if (notificationCount <= 0) {
|