Skip to content

Commit 7f3d622

Browse files
committed
actions updates
1 parent 910f3b9 commit 7f3d622

File tree

24 files changed

+282
-392
lines changed

24 files changed

+282
-392
lines changed

components/trello/actions/add-attachment-to-card/add-attachment-to-card.mjs

Lines changed: 32 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,25 @@
11
import { ConfigurationError } from "@pipedream/platform";
22
import fs from "fs";
33
import FormData from "form-data";
4-
import common from "../common/common.mjs";
4+
import app from "../../trello.app.mjs";
55

66
export default {
7-
...common,
87
key: "trello-add-attachment-to-card",
98
name: "Add Attachment To Card",
109
description: "Adds a file attachment on a card. [See the documentation](https://developer.atlassian.com/cloud/trello/rest/api-group-cards/#api-cards-id-attachments-post)",
1110
version: "0.0.1",
1211
type: "action",
1312
props: {
14-
...common.props,
13+
app,
1514
board: {
1615
propDefinition: [
17-
common.props.app,
16+
app,
1817
"board",
1918
],
2019
},
2120
cardId: {
2221
propDefinition: [
23-
common.props.app,
22+
app,
2423
"cards",
2524
(c) => ({
2625
board: c.board,
@@ -33,35 +32,55 @@ export default {
3332
},
3433
name: {
3534
propDefinition: [
36-
common.props.app,
35+
app,
3736
"name",
3837
],
3938
},
40-
url: {
39+
fileType: {
4140
propDefinition: [
42-
common.props.app,
43-
"url",
41+
app,
42+
"fileType",
4443
],
44+
reloadProps: true,
4545
},
46-
mimeType: {
46+
url: {
4747
propDefinition: [
48-
common.props.app,
49-
"mimeType",
48+
app,
49+
"url",
5050
],
51+
hidden: true,
5152
},
5253
file: {
5354
propDefinition: [
54-
common.props.app,
55+
app,
5556
"file",
5657
],
58+
hidden: true,
59+
},
60+
mimeType: {
61+
propDefinition: [
62+
app,
63+
"mimeType",
64+
],
65+
hidden: true,
5766
},
5867
setCover: {
5968
type: "boolean",
6069
label: "Set Cover?",
6170
description: "Determines whether to use the new attachment as a cover for the Card",
6271
default: false,
72+
optional: true,
6373
},
6474
},
75+
async additionalProps(props) {
76+
const attachmentIsPath = this.fileType === "path";
77+
const attachmentIsUrl = this.fileType === "url";
78+
props.file.hidden = !attachmentIsPath;
79+
props.mimeType.hidden = !attachmentIsPath;
80+
props.url.hidden = !attachmentIsUrl;
81+
82+
return {};
83+
},
6584
async run({ $ }) {
6685
const {
6786
cardId,

components/trello/actions/add-checklist/add-checklist.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ export default {
4242
board: boardId,
4343
}),
4444
],
45+
label: "Copy from Checklist",
4546
},
4647
pos: {
4748
propDefinition: [

components/trello/actions/add-existing-label-to-card/add-existing-label-to-card.mjs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,22 @@
1-
import common from "../common/common.mjs";
1+
import app from "../../trello.app.mjs";
22

33
export default {
4-
...common,
54
key: "trello-add-existing-label-to-card",
65
name: "Add Existing Label to Card",
76
description: "Adds an existing label to the specified card. [See the documentation](https://developer.atlassian.com/cloud/trello/rest/api-group-cards/#api-cards-id-idlabels-post).",
87
version: "0.1.0",
98
type: "action",
109
props: {
11-
...common.props,
10+
app,
1211
board: {
1312
propDefinition: [
14-
common.props.app,
13+
app,
1514
"board",
1615
],
1716
},
1817
cardId: {
1918
propDefinition: [
20-
common.props.app,
19+
app,
2120
"cards",
2221
(c) => ({
2322
board: c.board,
@@ -30,10 +29,12 @@ export default {
3029
},
3130
value: {
3231
propDefinition: [
33-
common.props.app,
32+
app,
3433
"label",
3534
(c) => ({
3635
board: c.board,
36+
card: c.cardId,
37+
excludeCardLabels: true,
3738
}),
3839
],
3940
},

components/trello/actions/add-member-to-card/add-member-to-card.mjs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,21 @@
1-
import common from "../common/common.mjs";
1+
import app from "../../trello.app.mjs";
22

33
export default {
4-
...common,
54
key: "trello-add-member-to-card",
65
name: "Add Member to Card",
76
description: "Adds a member to the specified card. [See the documentation](https://developer.atlassian.com/cloud/trello/rest/api-group-cards/#api-cards-id-idmembers-post).",
87
version: "0.2.0",
98
type: "action",
109
props: {
11-
...common.props,
1210
board: {
1311
propDefinition: [
14-
common.props.app,
12+
app,
1513
"board",
1614
],
1715
},
1816
cardId: {
1917
propDefinition: [
20-
common.props.app,
18+
app,
2119
"cards",
2220
(c) => ({
2321
board: c.board,
@@ -30,10 +28,12 @@ export default {
3028
},
3129
value: {
3230
propDefinition: [
33-
common.props.app,
31+
app,
3432
"member",
3533
(c) => ({
3634
board: c.board,
35+
card: c.cardId,
36+
excludeCardMembers: true,
3737
}),
3838
],
3939
},

components/trello/actions/archive-card/archive-card.mjs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,22 @@
1-
import common from "../common/common.mjs";
1+
import app from "../../trello.app.mjs";
22

33
export default {
4-
...common,
54
key: "trello-archive-card",
65
name: "Archive Card",
76
description: "Archives a card. [See the documentation](https://developer.atlassian.com/cloud/trello/rest/api-group-cards/#api-cards-id-put).",
87
version: "0.2.0",
98
type: "action",
109
props: {
11-
...common.props,
10+
app,
1211
board: {
1312
propDefinition: [
14-
common.props.app,
13+
app,
1514
"board",
1615
],
1716
},
1817
cardId: {
1918
propDefinition: [
20-
common.props.app,
19+
app,
2120
"cards",
2221
(c) => ({
2322
board: c.board,

components/trello/actions/close-board/close-board.mjs

Lines changed: 0 additions & 31 deletions
This file was deleted.

components/trello/actions/complete-checklist-item/complete-checklist-item.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ export default {
2020
"cards",
2121
(c) => ({
2222
board: c.board,
23+
checklistCardsOnly: true,
2324
}),
2425
],
2526
type: "string",

components/trello/actions/create-board/create-board.mjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import constants from "../../common/constants.mjs";
44
export default {
55
key: "trello-create-board",
66
name: "Create a Board",
7-
description: "Creates a new Trello board. [See the documentation](https://developer.atlassian.com/cloud/trello/rest/api-group-boards/#api-boards-post).",
7+
description: "Create a new Trello board or copy from an existing one. [See the documentation](https://developer.atlassian.com/cloud/trello/rest/api-group-boards/#api-boards-post).",
88
version: "0.2.0",
99
type: "action",
1010
props: {
@@ -23,7 +23,7 @@ export default {
2323
defaultLists: {
2424
type: "boolean",
2525
label: "Default Lists",
26-
description: "Determines whether to add the default set of lists to a board (To Do, Doing, Done). It is ignored if ***Board Source ID*** is provided.",
26+
description: "Determines whether to add the default set of lists to a board (To Do, Doing, Done). It is ignored if idBoardSource is provided.",
2727
optional: true,
2828
},
2929
desc: {
@@ -54,7 +54,7 @@ export default {
5454
keepFromSource: {
5555
type: "string",
5656
label: "Keep From Source",
57-
description: "To keep cards from the original board, pass in the value `cards`.",
57+
description: "To keep cards from the original board pass in the value `cards`.",
5858
optional: true,
5959
options: [
6060
"none",

0 commit comments

Comments
 (0)