@pipedream/trello 0.3.14 → 0.4.0
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 +124 -0
- package/actions/add-checklist/add-checklist.mjs +56 -38
- package/actions/add-comment/add-comment.mjs +44 -34
- package/actions/add-existing-label-to-card/add-existing-label-to-card.mjs +26 -11
- package/actions/add-member-to-card/add-member-to-card.mjs +26 -11
- package/actions/archive-card/archive-card.mjs +13 -7
- package/actions/close-board/close-board.mjs +10 -4
- package/actions/common.mjs +2 -2
- package/actions/complete-checklist-item/complete-checklist-item.mjs +61 -31
- package/actions/create-board/create-board.mjs +96 -61
- package/actions/create-card/create-card.mjs +83 -39
- package/actions/create-checklist/create-checklist.mjs +26 -14
- package/actions/create-checklist-item/create-checklist-item.mjs +64 -39
- package/actions/create-comment-on-card/create-comment-on-card.mjs +26 -9
- package/actions/create-label/create-label.mjs +37 -36
- package/actions/create-list/create-list.mjs +51 -42
- package/actions/delete-checklist/delete-checklist.mjs +24 -11
- package/actions/find-labels/find-labels.mjs +13 -10
- package/actions/find-list/find-list.mjs +12 -9
- package/actions/get-card/get-card.mjs +12 -8
- package/actions/get-list/get-list.mjs +29 -15
- package/actions/move-card-to-list/move-card-to-list.mjs +16 -12
- package/actions/remove-label-from-card/remove-label-from-card.mjs +26 -10
- package/actions/rename-list/rename-list.mjs +23 -9
- package/actions/search-boards/search-boards.mjs +17 -15
- package/actions/search-cards/search-cards.mjs +17 -15
- package/actions/search-checklists/search-checklists.mjs +102 -46
- package/actions/search-members/search-members.mjs +48 -28
- package/actions/update-card/update-card.mjs +62 -45
- package/package.json +4 -3
- package/sources/card-archived/card-archived.mjs +21 -5
- package/sources/card-due-date-reminder/card-due-date-reminder.mjs +31 -30
- package/sources/card-moved/card-moved.mjs +12 -6
- package/sources/card-updates/card-updates.mjs +19 -10
- package/sources/common/common-board-based.mjs +4 -2
- package/sources/common/common-webhook.mjs +63 -20
- package/sources/common/common.mjs +2 -2
- package/sources/custom-webhook-events/custom-webhook-events.mjs +30 -11
- package/sources/new-activity/new-activity.mjs +5 -3
- package/sources/new-attachment/new-attachment.mjs +20 -4
- package/sources/new-board/new-board.mjs +5 -3
- package/sources/new-card/new-card.mjs +19 -10
- package/sources/new-checklist/new-checklist.mjs +15 -3
- package/sources/new-comment-added-to-card/new-comment-added-to-card.mjs +30 -9
- package/sources/new-label/new-label.mjs +7 -3
- package/sources/new-label-added-to-card/new-label-added-to-card.mjs +20 -10
- package/sources/new-list/new-list.mjs +7 -3
- package/sources/new-member-on-card/new-member-on-card.mjs +15 -3
- package/sources/new-notification/new-notification.mjs +15 -5
- package/trello.app.mjs +269 -487
- 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/copy-board/copy-board.mjs +0 -174
- /package/{common → sources/common}/events.mjs +0 -0
@@ -1,73 +0,0 @@
|
|
1
|
-
import common from "../common.mjs";
|
2
|
-
|
3
|
-
export default {
|
4
|
-
...common,
|
5
|
-
key: "trello-add-attachment-to-card-via-url",
|
6
|
-
name: "Add Attachment to Card via URL",
|
7
|
-
description: "Adds a file attachment on a card by referencing a public URL. [See the docs here](https://developer.atlassian.com/cloud/trello/rest/api-group-cards/#api-cards-id-attachments-post)",
|
8
|
-
version: "0.0.3",
|
9
|
-
type: "action",
|
10
|
-
props: {
|
11
|
-
...common.props,
|
12
|
-
board: {
|
13
|
-
propDefinition: [
|
14
|
-
common.props.trello,
|
15
|
-
"board",
|
16
|
-
],
|
17
|
-
},
|
18
|
-
idCard: {
|
19
|
-
propDefinition: [
|
20
|
-
common.props.trello,
|
21
|
-
"cards",
|
22
|
-
(c) => ({
|
23
|
-
board: c.board,
|
24
|
-
}),
|
25
|
-
],
|
26
|
-
type: "string",
|
27
|
-
label: "Card",
|
28
|
-
description: "The ID of the Card to add the Attachment to",
|
29
|
-
optional: false,
|
30
|
-
},
|
31
|
-
name: {
|
32
|
-
propDefinition: [
|
33
|
-
common.props.trello,
|
34
|
-
"name",
|
35
|
-
],
|
36
|
-
},
|
37
|
-
url: {
|
38
|
-
propDefinition: [
|
39
|
-
common.props.trello,
|
40
|
-
"url",
|
41
|
-
],
|
42
|
-
},
|
43
|
-
mimeType: {
|
44
|
-
propDefinition: [
|
45
|
-
common.props.trello,
|
46
|
-
"mimeType",
|
47
|
-
],
|
48
|
-
},
|
49
|
-
setCover: {
|
50
|
-
type: "boolean",
|
51
|
-
label: "Set Cover?",
|
52
|
-
description: "Determines whether to use the new attachment as a cover for the Card",
|
53
|
-
default: false,
|
54
|
-
},
|
55
|
-
},
|
56
|
-
async run({ $ }) {
|
57
|
-
const {
|
58
|
-
idCard,
|
59
|
-
name,
|
60
|
-
url,
|
61
|
-
mimeType,
|
62
|
-
setCover,
|
63
|
-
} = this;
|
64
|
-
const res = await this.trello.addAttachmentToCardViaUrl(idCard, {
|
65
|
-
name,
|
66
|
-
url,
|
67
|
-
mimeType,
|
68
|
-
setCover,
|
69
|
-
}, $);
|
70
|
-
$.export("$summary", `Successfully added attachement to card ${idCard}`);
|
71
|
-
return res;
|
72
|
-
},
|
73
|
-
};
|
@@ -1,72 +0,0 @@
|
|
1
|
-
// legacy_hash_id: a_elirYr
|
2
|
-
import { axios } from "@pipedream/platform";
|
3
|
-
|
4
|
-
export default {
|
5
|
-
key: "trello-add-file-as-attachment-via-url",
|
6
|
-
name: "Add Attachment to Card via URL",
|
7
|
-
description: "Create a file attachment on a card by referencing a public URL",
|
8
|
-
version: "0.1.3",
|
9
|
-
type: "action",
|
10
|
-
props: {
|
11
|
-
trello: {
|
12
|
-
type: "app",
|
13
|
-
app: "trello",
|
14
|
-
},
|
15
|
-
name: {
|
16
|
-
type: "string",
|
17
|
-
label: "Name",
|
18
|
-
description: "The name of the attachment. Max length 256.",
|
19
|
-
optional: true,
|
20
|
-
},
|
21
|
-
mimeType: {
|
22
|
-
type: "string",
|
23
|
-
label: "MIME Type",
|
24
|
-
description: "The mimeType of the attachment. Max length 256.",
|
25
|
-
optional: true,
|
26
|
-
},
|
27
|
-
url: {
|
28
|
-
type: "string",
|
29
|
-
label: "File URL",
|
30
|
-
description: "A URL to a file you'd like to attach. Must start with http:// or https://",
|
31
|
-
},
|
32
|
-
id: {
|
33
|
-
type: "string",
|
34
|
-
label: "ID",
|
35
|
-
description: "The ID of your Trello card",
|
36
|
-
},
|
37
|
-
},
|
38
|
-
async run({ $ }) {
|
39
|
-
const oauthSignerUri = this.trello.$auth.oauth_signer_uri;
|
40
|
-
|
41
|
-
const trelloParams = [
|
42
|
-
"name",
|
43
|
-
"mimeType",
|
44
|
-
"url",
|
45
|
-
];
|
46
|
-
let p = this;
|
47
|
-
|
48
|
-
const queryString = trelloParams.filter((param) => p[param]).map((param) => `${param}=${encodeURIComponent(p[param])}`)
|
49
|
-
.join("&");
|
50
|
-
|
51
|
-
const config = {
|
52
|
-
url: `https://api.trello.com/1/cards/${this.id}/attachments?${queryString}`,
|
53
|
-
method: "POST",
|
54
|
-
headers: {
|
55
|
-
"Content-Type": "application/json",
|
56
|
-
},
|
57
|
-
};
|
58
|
-
|
59
|
-
const token = {
|
60
|
-
key: this.trello.$auth.oauth_access_token,
|
61
|
-
secret: this.trello.$auth.oauth_refresh_token,
|
62
|
-
};
|
63
|
-
|
64
|
-
const signConfig = {
|
65
|
-
token,
|
66
|
-
oauthSignerUri,
|
67
|
-
};
|
68
|
-
|
69
|
-
const resp = await axios($, config, signConfig);
|
70
|
-
return resp;
|
71
|
-
},
|
72
|
-
};
|
@@ -1,75 +0,0 @@
|
|
1
|
-
// legacy_hash_id: a_B0im8k
|
2
|
-
import { axios } from "@pipedream/platform";
|
3
|
-
|
4
|
-
export default {
|
5
|
-
key: "trello-add-image-attachment",
|
6
|
-
name: "Add Image Attachment to Card",
|
7
|
-
description: "Adds image to card",
|
8
|
-
version: "0.1.4",
|
9
|
-
type: "action",
|
10
|
-
props: {
|
11
|
-
trello: {
|
12
|
-
type: "app",
|
13
|
-
app: "trello",
|
14
|
-
},
|
15
|
-
id: {
|
16
|
-
type: "string",
|
17
|
-
description: "The ID of the card.",
|
18
|
-
},
|
19
|
-
name: {
|
20
|
-
type: "string",
|
21
|
-
description: "The name of the attachment. Max length 256.",
|
22
|
-
optional: true,
|
23
|
-
},
|
24
|
-
file: {
|
25
|
-
type: "string",
|
26
|
-
description: "The file to attach, as multipart/form-data",
|
27
|
-
optional: true,
|
28
|
-
},
|
29
|
-
mimeType: {
|
30
|
-
type: "string",
|
31
|
-
description: "The mimeType of the attachment. Max length 256.",
|
32
|
-
optional: true,
|
33
|
-
},
|
34
|
-
url: {
|
35
|
-
type: "string",
|
36
|
-
description: "A URL to attach. Must start with http:// or https://",
|
37
|
-
},
|
38
|
-
},
|
39
|
-
async run({ $ }) {
|
40
|
-
const oauthSignerUri = this.trello.$auth.oauth_signer_uri;
|
41
|
-
|
42
|
-
let id = this.id;
|
43
|
-
const trelloParams = [
|
44
|
-
"name",
|
45
|
-
"file",
|
46
|
-
"mimeType",
|
47
|
-
"url",
|
48
|
-
];
|
49
|
-
let p = this;
|
50
|
-
|
51
|
-
const queryString = trelloParams.filter((param) => p[param]).map((param) => `${param}=${p[param]}`)
|
52
|
-
.join("&");
|
53
|
-
|
54
|
-
const config = {
|
55
|
-
url: `https://api.trello.com/1/cards/${id}/attachments?${queryString}`,
|
56
|
-
method: "POST",
|
57
|
-
headers: {
|
58
|
-
"Content-Type": "application/json",
|
59
|
-
},
|
60
|
-
};
|
61
|
-
|
62
|
-
const token = {
|
63
|
-
key: this.trello.$auth.oauth_access_token,
|
64
|
-
secret: this.trello.$auth.oauth_refresh_token,
|
65
|
-
};
|
66
|
-
|
67
|
-
const signConfig = {
|
68
|
-
token,
|
69
|
-
oauthSignerUri,
|
70
|
-
};
|
71
|
-
|
72
|
-
const resp = await axios($, config, signConfig);
|
73
|
-
return resp;
|
74
|
-
},
|
75
|
-
};
|
@@ -1,55 +0,0 @@
|
|
1
|
-
// legacy_hash_id: a_xqi4E7
|
2
|
-
import { axios } from "@pipedream/platform";
|
3
|
-
|
4
|
-
export default {
|
5
|
-
key: "trello-add-label-to-card",
|
6
|
-
name: "Add Existing Label to Card",
|
7
|
-
description: "Add an existing label to a card.",
|
8
|
-
version: "0.1.3",
|
9
|
-
type: "action",
|
10
|
-
props: {
|
11
|
-
trello: {
|
12
|
-
type: "app",
|
13
|
-
app: "trello",
|
14
|
-
},
|
15
|
-
id: {
|
16
|
-
type: "string",
|
17
|
-
description: "The ID of the card.",
|
18
|
-
},
|
19
|
-
value: {
|
20
|
-
type: "string",
|
21
|
-
description: "The ID of the label to add",
|
22
|
-
},
|
23
|
-
},
|
24
|
-
async run({ $ }) {
|
25
|
-
const oauthSignerUri = this.trello.$auth.oauth_signer_uri;
|
26
|
-
|
27
|
-
let id = this.id;
|
28
|
-
const trelloParams = [
|
29
|
-
"value",
|
30
|
-
];
|
31
|
-
let p = this;
|
32
|
-
|
33
|
-
const queryString = trelloParams.filter((param) => p[param]).map((param) => `${param}=${p[param]}`)
|
34
|
-
.join("&");
|
35
|
-
|
36
|
-
const config = {
|
37
|
-
url: `https://api.trello.com/1/cards/${id}/idLabels?${queryString}`,
|
38
|
-
method: "POST",
|
39
|
-
data: "",
|
40
|
-
};
|
41
|
-
|
42
|
-
const token = {
|
43
|
-
key: this.trello.$auth.oauth_access_token,
|
44
|
-
secret: this.trello.$auth.oauth_refresh_token,
|
45
|
-
};
|
46
|
-
|
47
|
-
const signConfig = {
|
48
|
-
token,
|
49
|
-
oauthSignerUri,
|
50
|
-
};
|
51
|
-
|
52
|
-
const resp = await axios($, config, signConfig);
|
53
|
-
return resp;
|
54
|
-
},
|
55
|
-
};
|
@@ -1,174 +0,0 @@
|
|
1
|
-
// legacy_hash_id: a_B0izQg
|
2
|
-
import { axios } from "@pipedream/platform";
|
3
|
-
|
4
|
-
export default {
|
5
|
-
key: "trello-copy-board",
|
6
|
-
name: "Copy a Board",
|
7
|
-
description: "Creates a copy of an existing board.",
|
8
|
-
version: "0.1.3",
|
9
|
-
type: "action",
|
10
|
-
props: {
|
11
|
-
trello: {
|
12
|
-
type: "app",
|
13
|
-
app: "trello",
|
14
|
-
},
|
15
|
-
name: {
|
16
|
-
type: "string",
|
17
|
-
description: "The new name for the board. 1 to 16384 characters long.",
|
18
|
-
},
|
19
|
-
defaultLabels: {
|
20
|
-
type: "boolean",
|
21
|
-
description: "Determines whether to use the default set of labels.",
|
22
|
-
optional: true,
|
23
|
-
},
|
24
|
-
defaultLists: {
|
25
|
-
type: "boolean",
|
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.",
|
27
|
-
optional: true,
|
28
|
-
},
|
29
|
-
desc: {
|
30
|
-
type: "string",
|
31
|
-
description: "A new description for the board, 0 to 16384 characters long.",
|
32
|
-
optional: true,
|
33
|
-
},
|
34
|
-
idOrganization: {
|
35
|
-
type: "string",
|
36
|
-
description: "The id or name of the team the board should belong to.",
|
37
|
-
optional: true,
|
38
|
-
},
|
39
|
-
idBoardSource: {
|
40
|
-
type: "string",
|
41
|
-
description: "The id of a board to copy into the new board.",
|
42
|
-
},
|
43
|
-
keepFromSource: {
|
44
|
-
type: "string",
|
45
|
-
description: "To keep cards from the original board pass in the value \"cards\".",
|
46
|
-
optional: true,
|
47
|
-
options: [
|
48
|
-
"none",
|
49
|
-
"cards",
|
50
|
-
],
|
51
|
-
},
|
52
|
-
powerUps: {
|
53
|
-
type: "string",
|
54
|
-
description: "The Power-Ups that should be enabled on the new board. One of: all, calendar, cardAging, recap, voting.",
|
55
|
-
optional: true,
|
56
|
-
},
|
57
|
-
prefs_permissionLevel: {
|
58
|
-
type: "string",
|
59
|
-
description: "The permissions level of the board. One of: org, private, public.",
|
60
|
-
optional: true,
|
61
|
-
options: [
|
62
|
-
"org",
|
63
|
-
"private",
|
64
|
-
"public",
|
65
|
-
],
|
66
|
-
},
|
67
|
-
prefs_voting: {
|
68
|
-
type: "string",
|
69
|
-
label: "Prefs Voting",
|
70
|
-
description: "Who can vote on this board. One of disabled, members, observers, org, public.",
|
71
|
-
optional: true,
|
72
|
-
options: [
|
73
|
-
"disabled",
|
74
|
-
"members",
|
75
|
-
"observers",
|
76
|
-
"org",
|
77
|
-
"public",
|
78
|
-
],
|
79
|
-
},
|
80
|
-
prefs_comments: {
|
81
|
-
type: "string",
|
82
|
-
label: "Prefs Comments",
|
83
|
-
description: "Who can comment on cards on this board. One of: disabled, members, observers, org, public.",
|
84
|
-
optional: true,
|
85
|
-
options: [
|
86
|
-
"disabled",
|
87
|
-
"members",
|
88
|
-
"observers",
|
89
|
-
"org",
|
90
|
-
"public",
|
91
|
-
],
|
92
|
-
},
|
93
|
-
prefs_invitations: {
|
94
|
-
type: "string",
|
95
|
-
label: "Prefs Invitations",
|
96
|
-
description: "Determines what types of members can invite users to join. One of: admins, members.",
|
97
|
-
optional: true,
|
98
|
-
options: [
|
99
|
-
"admins",
|
100
|
-
"members",
|
101
|
-
],
|
102
|
-
},
|
103
|
-
prefs_selfJoin: {
|
104
|
-
type: "boolean",
|
105
|
-
description: "Determines whether users can join the boards themselves or whether they have to be invited.",
|
106
|
-
optional: true,
|
107
|
-
},
|
108
|
-
prefs_cardCovers: {
|
109
|
-
type: "string",
|
110
|
-
description: "Determines whether card covers are enabled.",
|
111
|
-
optional: true,
|
112
|
-
},
|
113
|
-
prefs_background: {
|
114
|
-
type: "string",
|
115
|
-
label: "Prefs Background",
|
116
|
-
description: "The id of a custom background or one of: blue, orange, green, red, purple, pink, lime, sky, grey.",
|
117
|
-
optional: true,
|
118
|
-
},
|
119
|
-
prefs_cardAging: {
|
120
|
-
type: "string",
|
121
|
-
description: "Determines the type of card aging that should take place on the board if card aging is enabled. One of: pirate, regular.",
|
122
|
-
optional: true,
|
123
|
-
options: [
|
124
|
-
"pirate",
|
125
|
-
"regular",
|
126
|
-
],
|
127
|
-
},
|
128
|
-
},
|
129
|
-
async run({ $ }) {
|
130
|
-
const oauthSignerUri = this.trello.$auth.oauth_signer_uri;
|
131
|
-
|
132
|
-
const trelloParams = [
|
133
|
-
"name",
|
134
|
-
"defaultLabels",
|
135
|
-
"defaultLists",
|
136
|
-
"desc",
|
137
|
-
"idOrganization",
|
138
|
-
"idBoardSource",
|
139
|
-
"keepFromSource",
|
140
|
-
"powerUps",
|
141
|
-
"prefs_permissionLevel",
|
142
|
-
"prefs_voting",
|
143
|
-
"prefs_comments",
|
144
|
-
"prefs_invitations",
|
145
|
-
"prefs_selfJoin",
|
146
|
-
"prefs_cardCovers",
|
147
|
-
"prefs_background",
|
148
|
-
"prefs_cardAging",
|
149
|
-
];
|
150
|
-
let p = this;
|
151
|
-
|
152
|
-
const queryString = trelloParams.filter((param) => p[param]).map((param) => `${param}=${p[param]}`)
|
153
|
-
.join("&");
|
154
|
-
|
155
|
-
const config = {
|
156
|
-
url: `https://api.trello.com/1/boards?${queryString}`,
|
157
|
-
method: "POST",
|
158
|
-
data: "",
|
159
|
-
};
|
160
|
-
|
161
|
-
const token = {
|
162
|
-
key: this.trello.$auth.oauth_access_token,
|
163
|
-
secret: this.trello.$auth.oauth_refresh_token,
|
164
|
-
};
|
165
|
-
|
166
|
-
const signConfig = {
|
167
|
-
token,
|
168
|
-
oauthSignerUri,
|
169
|
-
};
|
170
|
-
|
171
|
-
const resp = await axios($, config, signConfig);
|
172
|
-
return resp;
|
173
|
-
},
|
174
|
-
};
|
File without changes
|