@pipedream/trello 0.4.0 → 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 +34 -27
- package/actions/add-checklist/add-checklist.mjs +9 -19
- package/actions/add-comment/add-comment.mjs +4 -5
- package/actions/add-existing-label-to-card/add-existing-label-to-card.mjs +9 -19
- package/actions/add-member-to-card/add-member-to-card.mjs +9 -19
- package/actions/archive-card/archive-card.mjs +5 -6
- package/actions/{common.mjs → common/common.mjs} +1 -1
- package/actions/complete-checklist-item/complete-checklist-item.mjs +4 -14
- package/actions/create-board/create-board.mjs +10 -47
- package/actions/create-card/create-card.mjs +52 -47
- package/actions/create-checklist-item/create-checklist-item.mjs +4 -14
- package/actions/create-label/create-label.mjs +5 -18
- package/actions/create-list/create-list.mjs +4 -12
- package/actions/delete-checklist/delete-checklist.mjs +8 -18
- package/actions/find-labels/find-labels.mjs +2 -3
- package/actions/find-list/find-list.mjs +2 -2
- package/actions/get-card/get-card.mjs +2 -2
- package/actions/get-list/get-list.mjs +1 -1
- package/actions/move-card-to-list/move-card-to-list.mjs +2 -2
- package/actions/remove-label-from-card/remove-label-from-card.mjs +9 -18
- package/actions/rename-list/rename-list.mjs +2 -2
- package/actions/search-boards/search-boards.mjs +10 -8
- package/actions/search-cards/search-cards.mjs +11 -8
- package/actions/search-checklists/search-checklists.mjs +56 -75
- package/actions/search-members/search-members.mjs +13 -23
- package/actions/update-card/update-card.mjs +22 -21
- package/common/constants.mjs +128 -0
- package/common/fields.mjs +1 -0
- package/package.json +2 -1
- package/sources/card-archived/card-archived.mjs +16 -28
- package/sources/card-archived/test-event.mjs +64 -0
- package/sources/card-due-date-reminder/card-due-date-reminder.mjs +111 -33
- package/sources/card-due-date-reminder/test-event.mjs +75 -0
- package/sources/card-moved/card-moved.mjs +20 -23
- package/sources/card-moved/test-event.mjs +78 -0
- package/sources/card-updates/card-updates.mjs +20 -27
- package/sources/card-updates/test-event.mjs +86 -0
- package/sources/common/actions.mjs +206 -0
- package/sources/common/common-board-based.mjs +12 -7
- package/sources/common/common-webhook.mjs +27 -16
- package/sources/common/common.mjs +5 -2
- package/sources/custom-webhook-events/custom-webhook-events.mjs +17 -48
- package/sources/new-activity/new-activity.mjs +22 -31
- package/sources/new-attachment/new-attachment.mjs +40 -49
- package/sources/new-attachment/test-event.mjs +69 -0
- package/sources/new-board/new-board.mjs +18 -11
- package/sources/new-board/test-event.mjs +100 -0
- package/sources/new-card/new-card.mjs +20 -27
- package/sources/new-card/test-event.mjs +79 -0
- package/sources/new-checklist/new-checklist.mjs +39 -22
- package/sources/new-checklist/test-event.mjs +22 -0
- package/sources/new-comment-added-to-card/new-comment-added-to-card.mjs +38 -44
- package/sources/new-comment-added-to-card/test-event.mjs +298 -0
- package/sources/new-label/new-label.mjs +13 -14
- package/sources/new-label/test-event.mjs +7 -0
- package/sources/new-label-added-to-card/new-label-added-to-card.mjs +23 -24
- package/sources/new-label-added-to-card/test-event.mjs +85 -0
- package/sources/new-member-on-card/new-member-on-card.mjs +17 -26
- package/sources/new-member-on-card/test-event.mjs +83 -0
- package/sources/new-notification/new-notification.mjs +3 -12
- package/trello.app.mjs +211 -33
- package/actions/close-board/close-board.mjs +0 -31
- package/actions/create-checklist/create-checklist.mjs +0 -78
- package/actions/create-comment-on-card/create-comment-on-card.mjs +0 -59
- package/sources/new-list/new-list.mjs +0 -33
@@ -1,59 +0,0 @@
|
|
1
|
-
import common from "../common.mjs";
|
2
|
-
|
3
|
-
export default {
|
4
|
-
...common,
|
5
|
-
key: "trello-create-comment-on-card",
|
6
|
-
name: "Create Comment on Card",
|
7
|
-
description: "Creates a new comment on a card. [See the documentation](https://developer.atlassian.com/cloud/trello/rest/api-group-cards/#api-cards-id-actions-comments-post).",
|
8
|
-
version: "0.1.0",
|
9
|
-
type: "action",
|
10
|
-
props: {
|
11
|
-
...common.props,
|
12
|
-
board: {
|
13
|
-
propDefinition: [
|
14
|
-
common.props.app,
|
15
|
-
"board",
|
16
|
-
],
|
17
|
-
},
|
18
|
-
cardId: {
|
19
|
-
propDefinition: [
|
20
|
-
common.props.app,
|
21
|
-
"cards",
|
22
|
-
({ board }) => ({
|
23
|
-
board,
|
24
|
-
}),
|
25
|
-
],
|
26
|
-
type: "string",
|
27
|
-
label: "Card",
|
28
|
-
description: "The ID of the card to create a new comment on",
|
29
|
-
optional: false,
|
30
|
-
},
|
31
|
-
comment: {
|
32
|
-
type: "string",
|
33
|
-
label: "Comment",
|
34
|
-
description: "Text for the comment to be created.",
|
35
|
-
},
|
36
|
-
},
|
37
|
-
methods: {
|
38
|
-
...common.methods,
|
39
|
-
createCommentOnCard({
|
40
|
-
cardId, ...args
|
41
|
-
} = {}) {
|
42
|
-
return this.app.post({
|
43
|
-
path: `/cards/${cardId}/actions/comments`,
|
44
|
-
...args,
|
45
|
-
});
|
46
|
-
},
|
47
|
-
},
|
48
|
-
async run({ $ }) {
|
49
|
-
const res = await this.createCommentOnCard({
|
50
|
-
$,
|
51
|
-
cardId: this.cardId,
|
52
|
-
params: {
|
53
|
-
text: this.comment,
|
54
|
-
},
|
55
|
-
});
|
56
|
-
$.export("$summary", `Successfully added comment to card ${this.cardId}`);
|
57
|
-
return res;
|
58
|
-
},
|
59
|
-
};
|
@@ -1,33 +0,0 @@
|
|
1
|
-
import common from "../common/common-board-based.mjs";
|
2
|
-
|
3
|
-
export default {
|
4
|
-
...common,
|
5
|
-
key: "trello-new-list",
|
6
|
-
name: "New List (Instant)",
|
7
|
-
description: "Emit new event for each new list added to a board.",
|
8
|
-
version: "0.1.0",
|
9
|
-
type: "source",
|
10
|
-
dedupe: "unique",
|
11
|
-
methods: {
|
12
|
-
...common.methods,
|
13
|
-
async getSampleEvents() {
|
14
|
-
const lists = await this.app.getLists({
|
15
|
-
boardId: this.board,
|
16
|
-
});
|
17
|
-
return {
|
18
|
-
sampleEvents: lists,
|
19
|
-
sortField: "id",
|
20
|
-
};
|
21
|
-
},
|
22
|
-
isCorrectEventType(event) {
|
23
|
-
const eventType = event.body?.action?.type;
|
24
|
-
return eventType === "createList";
|
25
|
-
},
|
26
|
-
async getResult(event) {
|
27
|
-
const listId = event.body?.action?.data?.list?.id;
|
28
|
-
return await this.app.getList({
|
29
|
-
listId,
|
30
|
-
});
|
31
|
-
},
|
32
|
-
},
|
33
|
-
};
|