@pipedream/trello 0.3.2 → 0.3.5
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-via-url/add-attachment-to-card-via-url.mjs +73 -0
- package/actions/add-checklist/add-checklist.mjs +68 -0
- package/actions/add-comment/add-comment.mjs +55 -0
- package/actions/add-existing-label-to-card/add-existing-label-to-card.mjs +48 -0
- package/actions/add-file-as-attachment-via-url/add-file-as-attachment-via-url.mjs +72 -0
- package/actions/add-image-attachment/add-image-attachment.mjs +75 -0
- package/actions/add-label-to-card/add-label-to-card.mjs +55 -0
- package/actions/add-member-to-card/add-member-to-card.mjs +48 -0
- package/actions/archive-card/archive-card.mjs +37 -0
- package/actions/close-board/close-board.mjs +25 -0
- package/actions/common.js +21 -0
- package/actions/complete-checklist-item/complete-checklist-item.mjs +49 -0
- package/actions/copy-board/copy-board.mjs +174 -0
- package/actions/create-board/create-board.mjs +175 -0
- package/actions/create-card/create-card.mjs +195 -0
- package/actions/create-checklist/create-checklist.mjs +66 -0
- package/actions/create-checklist-item/create-checklist-item.mjs +67 -0
- package/actions/create-comment-on-card/create-comment-on-card.mjs +42 -0
- package/actions/create-label/create-label.mjs +73 -0
- package/actions/create-list/create-list.mjs +67 -0
- package/actions/delete-checklist/delete-checklist.mjs +46 -0
- package/actions/find-labels/find-labels.mjs +44 -0
- package/actions/find-list/find-list.mjs +49 -0
- package/actions/get-card/get-card.mjs +37 -0
- package/actions/get-list/get-list.mjs +32 -0
- package/actions/move-card-to-list/move-card-to-list.mjs +53 -0
- package/actions/remove-label-from-card/remove-label-from-card.mjs +47 -0
- package/actions/rename-list/rename-list.mjs +47 -0
- package/actions/search-boards/search-boards.mjs +57 -0
- package/actions/search-cards/search-cards.mjs +59 -0
- package/actions/search-checklists/search-checklists.mjs +110 -0
- package/actions/search-members/search-members.mjs +61 -0
- package/actions/update-card/update-card.mjs +165 -0
- package/common/events.js +138 -0
- package/common/fields.js +50 -0
- package/package.json +23 -19
- package/sources/board-based.mjs +27 -0
- package/sources/card-archived/card-archived.mjs +54 -0
- package/sources/card-due-date-reminder/card-due-date-reminder.mjs +80 -0
- package/sources/card-moved/card-moved.mjs +84 -0
- package/sources/card-updates/card-updates.mjs +60 -0
- package/sources/common-polling.mjs +16 -0
- package/sources/common-webhook.mjs +90 -0
- package/sources/common.js +34 -0
- package/sources/custom-webhook-events/custom-webhook-events.mjs +110 -0
- package/sources/new-activity/new-activity.mjs +64 -0
- package/sources/new-attachment/new-attachment.mjs +60 -0
- package/sources/new-board/new-board.mjs +29 -0
- package/sources/new-card/new-card.mjs +58 -0
- package/sources/new-checklist/new-checklist.mjs +29 -0
- package/sources/new-comment-added-to-card/new-comment-added-to-card.mjs +94 -0
- package/sources/new-label/new-label.mjs +41 -0
- package/sources/new-label-added-to-card/new-label-added-to-card.mjs +138 -0
- package/sources/new-list/new-list.mjs +29 -0
- package/sources/new-member-on-card/new-member-on-card.mjs +38 -0
- package/sources/new-notification/new-notification.mjs +50 -0
- package/trello.app.js +647 -145
- package/sources/card-archived/card-archived.js +0 -75
- package/sources/card-due-date-reminder/card-due-date-reminder.js +0 -65
- package/sources/card-moved/card-moved.js +0 -84
- package/sources/card-updates/card-updates.js +0 -77
- package/sources/custom-webhook-events/custom-webhook-events.js +0 -72
- package/sources/new-board/new-board.js +0 -62
- package/sources/new-card/new-card.js +0 -77
- package/sources/new-checklist/new-checklist.js +0 -74
- package/sources/new-comment-added-to-card/new-comment-added-to-card.js +0 -86
- package/sources/new-label/new-label.js +0 -73
- package/sources/new-label-added-to-card/new-labels-added-to-card.js +0 -85
- package/sources/new-list/new-list.js +0 -74
- package/sources/new-member-on-card/new-member-on-card.js +0 -75
- package/sources/new-notification/new-notification.js +0 -45
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import common from "../common.js";
|
|
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 docs here](https://developer.atlassian.com/cloud/trello/rest/api-group-cards/#api-cards-id-actions-comments-post)",
|
|
8
|
+
version: "0.0.1",
|
|
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 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
|
+
async run({ $ }) {
|
|
38
|
+
const res = await this.trello.createCommentOnCard(this.idCard, this.comment, $);
|
|
39
|
+
$.export("$summary", `Successfully added comment to card ${this.idCard}`);
|
|
40
|
+
return res;
|
|
41
|
+
},
|
|
42
|
+
};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
// legacy_hash_id: a_l0iLRL
|
|
2
|
+
import { axios } from "@pipedream/platform";
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
key: "trello-create-label",
|
|
6
|
+
name: "Create Label",
|
|
7
|
+
description: "Creates a new label on the specified board.",
|
|
8
|
+
version: "0.1.1",
|
|
9
|
+
type: "action",
|
|
10
|
+
props: {
|
|
11
|
+
trello: {
|
|
12
|
+
type: "app",
|
|
13
|
+
app: "trello",
|
|
14
|
+
},
|
|
15
|
+
name: {
|
|
16
|
+
type: "string",
|
|
17
|
+
description: "Name for the label.",
|
|
18
|
+
},
|
|
19
|
+
color: {
|
|
20
|
+
type: "string",
|
|
21
|
+
description: "The color for the label. One of: yellow, purple, blue, red, green, orange, black, sky, pink, lime, null (null means no color, and the label will not show on the front of cards)",
|
|
22
|
+
options: [
|
|
23
|
+
"yellow",
|
|
24
|
+
"purple",
|
|
25
|
+
"blue",
|
|
26
|
+
"red",
|
|
27
|
+
"green",
|
|
28
|
+
"orange",
|
|
29
|
+
"black",
|
|
30
|
+
"sky",
|
|
31
|
+
"pink",
|
|
32
|
+
"lime",
|
|
33
|
+
"null",
|
|
34
|
+
],
|
|
35
|
+
},
|
|
36
|
+
idBoard: {
|
|
37
|
+
type: "string",
|
|
38
|
+
description: "The ID of the board to create the label on.",
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
async run({ $ }) {
|
|
42
|
+
const oauthSignerUri = this.trello.$auth.oauth_signer_uri;
|
|
43
|
+
|
|
44
|
+
const trelloParams = [
|
|
45
|
+
"name",
|
|
46
|
+
"color",
|
|
47
|
+
"idBoard",
|
|
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/labels?${queryString}`,
|
|
56
|
+
method: "POST",
|
|
57
|
+
data: "",
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
const token = {
|
|
61
|
+
key: this.trello.$auth.oauth_access_token,
|
|
62
|
+
secret: this.trello.$auth.oauth_refresh_token,
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
const signConfig = {
|
|
66
|
+
token,
|
|
67
|
+
oauthSignerUri,
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
const resp = await axios($, config, signConfig);
|
|
71
|
+
return resp;
|
|
72
|
+
},
|
|
73
|
+
};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
// legacy_hash_id: a_G1iBG7
|
|
2
|
+
import { axios } from "@pipedream/platform";
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
key: "trello-create-list",
|
|
6
|
+
name: "Create a List",
|
|
7
|
+
description: "Creates a new list on a board",
|
|
8
|
+
version: "0.1.1",
|
|
9
|
+
type: "action",
|
|
10
|
+
props: {
|
|
11
|
+
trello: {
|
|
12
|
+
type: "app",
|
|
13
|
+
app: "trello",
|
|
14
|
+
},
|
|
15
|
+
name: {
|
|
16
|
+
type: "string",
|
|
17
|
+
description: "Name for the list.",
|
|
18
|
+
},
|
|
19
|
+
idBoard: {
|
|
20
|
+
type: "string",
|
|
21
|
+
description: "The long ID of the board the list should be created on.",
|
|
22
|
+
},
|
|
23
|
+
idListSource: {
|
|
24
|
+
type: "string",
|
|
25
|
+
description: "ID of the list to copy into the new list.",
|
|
26
|
+
optional: true,
|
|
27
|
+
},
|
|
28
|
+
pos: {
|
|
29
|
+
type: "string",
|
|
30
|
+
description: "Position of the list. top, bottom, or a positive floating point number.",
|
|
31
|
+
optional: true,
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
async run({ $ }) {
|
|
35
|
+
const oauthSignerUri = this.trello.$auth.oauth_signer_uri;
|
|
36
|
+
|
|
37
|
+
const trelloParams = [
|
|
38
|
+
"name",
|
|
39
|
+
"idBoard",
|
|
40
|
+
"idListSource",
|
|
41
|
+
"pos",
|
|
42
|
+
];
|
|
43
|
+
let p = this;
|
|
44
|
+
|
|
45
|
+
const queryString = trelloParams.filter((param) => p[param]).map((param) => `${param}=${p[param]}`)
|
|
46
|
+
.join("&");
|
|
47
|
+
|
|
48
|
+
const config = {
|
|
49
|
+
url: `https://api.trello.com/1/lists?${queryString}`,
|
|
50
|
+
method: "POST",
|
|
51
|
+
data: "",
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
const token = {
|
|
55
|
+
key: this.trello.$auth.oauth_access_token,
|
|
56
|
+
secret: this.trello.$auth.oauth_refresh_token,
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
const signConfig = {
|
|
60
|
+
token,
|
|
61
|
+
oauthSignerUri,
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
const resp = await axios($, config, signConfig);
|
|
65
|
+
return resp;
|
|
66
|
+
},
|
|
67
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import common from "../common.js";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
...common,
|
|
5
|
+
key: "trello-delete-checklist",
|
|
6
|
+
name: "Delete Checklist",
|
|
7
|
+
description: "Deletes the specified checklist. [See the docs here](https://developer.atlassian.com/cloud/trello/rest/api-group-checklists/#api-checklists-id-delete)",
|
|
8
|
+
version: "0.1.2",
|
|
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 containing the checklist do delete",
|
|
29
|
+
optional: false,
|
|
30
|
+
},
|
|
31
|
+
idChecklist: {
|
|
32
|
+
propDefinition: [
|
|
33
|
+
common.props.trello,
|
|
34
|
+
"checklist",
|
|
35
|
+
(c) => ({
|
|
36
|
+
card: c.idCard,
|
|
37
|
+
}),
|
|
38
|
+
],
|
|
39
|
+
description: "The ID of the checklist to delete",
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
async run({ $ }) {
|
|
43
|
+
await this.trello.deleteChecklist(this.idChecklist, $);
|
|
44
|
+
$.export("$summary", `Successfully deleted checklist ${this.idChecklist}`);
|
|
45
|
+
},
|
|
46
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import common from "../common.js";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
...common,
|
|
5
|
+
key: "trello-find-labels",
|
|
6
|
+
name: "Find a Label",
|
|
7
|
+
description: "Finds a label on a specific board by name. [See the docs here](https://developer.atlassian.com/cloud/trello/rest/api-group-boards/#api-boards-id-labels-get)",
|
|
8
|
+
version: "0.1.2",
|
|
9
|
+
type: "action",
|
|
10
|
+
props: {
|
|
11
|
+
...common.props,
|
|
12
|
+
board: {
|
|
13
|
+
propDefinition: [
|
|
14
|
+
common.props.trello,
|
|
15
|
+
"board",
|
|
16
|
+
],
|
|
17
|
+
description: "Unique identifier of the board to search for labels",
|
|
18
|
+
},
|
|
19
|
+
name: {
|
|
20
|
+
propDefinition: [
|
|
21
|
+
common.props.trello,
|
|
22
|
+
"name",
|
|
23
|
+
],
|
|
24
|
+
label: "Label Name",
|
|
25
|
+
description: "Name of the label to find.",
|
|
26
|
+
optional: false,
|
|
27
|
+
},
|
|
28
|
+
labelLimit: {
|
|
29
|
+
type: "integer",
|
|
30
|
+
label: "Results",
|
|
31
|
+
description: "The number of labels to be returned (up to 1000)",
|
|
32
|
+
default: 50,
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
async run({ $ }) {
|
|
36
|
+
const opts = {
|
|
37
|
+
limit: this.labelLimit,
|
|
38
|
+
};
|
|
39
|
+
const labels = await this.trello.findLabel(this.board, opts, $);
|
|
40
|
+
const res = this.getMatches(labels, this.name);
|
|
41
|
+
$.export("$summary", `Successfully retrieved ${res.length} label(s) with name ${this.name}`);
|
|
42
|
+
return res;
|
|
43
|
+
},
|
|
44
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import common from "../common.js";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
...common,
|
|
5
|
+
key: "trello-find-list",
|
|
6
|
+
name: "Find a List",
|
|
7
|
+
description: "Finds a list on a specific board by name. [See the docs here](https://developer.atlassian.com/cloud/trello/rest/api-group-boards/#api-boards-id-lists-get)",
|
|
8
|
+
version: "0.1.2",
|
|
9
|
+
type: "action",
|
|
10
|
+
props: {
|
|
11
|
+
...common.props,
|
|
12
|
+
board: {
|
|
13
|
+
propDefinition: [
|
|
14
|
+
common.props.trello,
|
|
15
|
+
"board",
|
|
16
|
+
],
|
|
17
|
+
description: "Specify the board to search for lists",
|
|
18
|
+
},
|
|
19
|
+
name: {
|
|
20
|
+
propDefinition: [
|
|
21
|
+
common.props.trello,
|
|
22
|
+
"name",
|
|
23
|
+
],
|
|
24
|
+
label: "List Name",
|
|
25
|
+
description: "Name of the list to find.",
|
|
26
|
+
optional: false,
|
|
27
|
+
},
|
|
28
|
+
listFilter: {
|
|
29
|
+
propDefinition: [
|
|
30
|
+
common.props.trello,
|
|
31
|
+
"listFilter",
|
|
32
|
+
],
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
async run({ $ }) {
|
|
36
|
+
const {
|
|
37
|
+
board,
|
|
38
|
+
name,
|
|
39
|
+
listFilter,
|
|
40
|
+
} = this;
|
|
41
|
+
const opts = {
|
|
42
|
+
filter: listFilter,
|
|
43
|
+
};
|
|
44
|
+
const lists = await this.trello.findList(board, opts, $);
|
|
45
|
+
const res = this.getMatches(lists, name);
|
|
46
|
+
$.export("$summary", `Successfully retrieved ${res.length} list(s) with name ${name}`);
|
|
47
|
+
return res;
|
|
48
|
+
},
|
|
49
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import common from "../common.js";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
...common,
|
|
5
|
+
key: "trello-get-a-card",
|
|
6
|
+
name: "Get Card",
|
|
7
|
+
description: "Gets a card by its ID. [See the docs here](https://developer.atlassian.com/cloud/trello/rest/api-group-cards/#api-cards-id-get)",
|
|
8
|
+
version: "0.1.4",
|
|
9
|
+
type: "action",
|
|
10
|
+
props: {
|
|
11
|
+
...common.props,
|
|
12
|
+
board: {
|
|
13
|
+
propDefinition: [
|
|
14
|
+
common.props.trello,
|
|
15
|
+
"board",
|
|
16
|
+
],
|
|
17
|
+
},
|
|
18
|
+
cardId: {
|
|
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 get details of",
|
|
29
|
+
optional: false,
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
async run({ $ }) {
|
|
33
|
+
const res = await this.trello.getCard(this.cardId, $);
|
|
34
|
+
$.export("$summary", `Successfully retrieved card ${this.cardId}`);
|
|
35
|
+
return res;
|
|
36
|
+
},
|
|
37
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { axios } from "@pipedream/platform";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
key: "trello-get-list",
|
|
5
|
+
name: "Trello Get List",
|
|
6
|
+
description: "Get information about a List",
|
|
7
|
+
version: "0.0.1",
|
|
8
|
+
type: "action",
|
|
9
|
+
props: {
|
|
10
|
+
// eslint-disable-next-line pipedream/props-label, pipedream/props-description
|
|
11
|
+
trello: {
|
|
12
|
+
type: "app",
|
|
13
|
+
app: "trello",
|
|
14
|
+
},
|
|
15
|
+
listId: {
|
|
16
|
+
type: "string",
|
|
17
|
+
label: "List ID",
|
|
18
|
+
description: "The ID of the Trello list",
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
async run({ $ }) {
|
|
22
|
+
return await axios($, {
|
|
23
|
+
url: `https://api.trello.com/1/lists/${this.listId}`,
|
|
24
|
+
}, {
|
|
25
|
+
token: {
|
|
26
|
+
key: this.trello.$auth.oauth_access_token,
|
|
27
|
+
secret: this.trello.$auth.oauth_refresh_token,
|
|
28
|
+
},
|
|
29
|
+
oauthSignerUri: this.trello.$auth.oauth_signer_uri,
|
|
30
|
+
});
|
|
31
|
+
},
|
|
32
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import common from "../common.js";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
...common,
|
|
5
|
+
key: "trello-move-card-to-list",
|
|
6
|
+
name: "Move Card to List",
|
|
7
|
+
description: "Moves a card to the specified board/list pair. [See the docs here](https://developer.atlassian.com/cloud/trello/rest/api-group-cards/#api-cards-id-put)",
|
|
8
|
+
version: "0.1.2",
|
|
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 move",
|
|
29
|
+
optional: false,
|
|
30
|
+
},
|
|
31
|
+
toIdList: {
|
|
32
|
+
propDefinition: [
|
|
33
|
+
common.props.trello,
|
|
34
|
+
"lists",
|
|
35
|
+
(c) => ({
|
|
36
|
+
board: c.board,
|
|
37
|
+
}),
|
|
38
|
+
],
|
|
39
|
+
type: "string",
|
|
40
|
+
label: "List",
|
|
41
|
+
description: "The ID of the list that the card should be moved to.",
|
|
42
|
+
optional: false,
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
async run({ $ }) {
|
|
46
|
+
const res = await this.trello.moveCardToList(this.idCard, {
|
|
47
|
+
idBoard: this.board,
|
|
48
|
+
idList: this.toIdList,
|
|
49
|
+
}, $);
|
|
50
|
+
$.export("$summary", `Successfully moved card ${this.idCard} to list ${this.toIdList}`);
|
|
51
|
+
return res;
|
|
52
|
+
},
|
|
53
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import common from "../common.js";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
...common,
|
|
5
|
+
key: "trello-remove-label-from-card",
|
|
6
|
+
name: "Remove Card Label",
|
|
7
|
+
description: "Removes label from card. [See the docs here](https://developer.atlassian.com/cloud/trello/rest/api-group-cards/#api-cards-id-idlabels-idlabel-delete)",
|
|
8
|
+
version: "0.1.2",
|
|
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 remove the Label from",
|
|
29
|
+
optional: false,
|
|
30
|
+
},
|
|
31
|
+
idLabel: {
|
|
32
|
+
propDefinition: [
|
|
33
|
+
common.props.trello,
|
|
34
|
+
"label",
|
|
35
|
+
(c) => ({
|
|
36
|
+
board: c.board,
|
|
37
|
+
}),
|
|
38
|
+
],
|
|
39
|
+
description: "The ID of the Label to be removed from the card.",
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
async run({ $ }) {
|
|
43
|
+
const res = await this.trello.removeLabelFromCard(this.idCard, this.idLabel, $);
|
|
44
|
+
$.export("$summary", `Successfully removed label ${this.idLabel} from card ${this.idCard}`);
|
|
45
|
+
return res;
|
|
46
|
+
},
|
|
47
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import common from "../common.js";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
...common,
|
|
5
|
+
key: "trello-rename-list",
|
|
6
|
+
name: "Rename List",
|
|
7
|
+
description: "Renames an existing list. [See the docs here](https://developer.atlassian.com/cloud/trello/rest/api-group-lists/#api-lists-id-put)",
|
|
8
|
+
version: "0.0.1",
|
|
9
|
+
type: "action",
|
|
10
|
+
props: {
|
|
11
|
+
...common.props,
|
|
12
|
+
board: {
|
|
13
|
+
propDefinition: [
|
|
14
|
+
common.props.trello,
|
|
15
|
+
"board",
|
|
16
|
+
],
|
|
17
|
+
},
|
|
18
|
+
listId: {
|
|
19
|
+
propDefinition: [
|
|
20
|
+
common.props.trello,
|
|
21
|
+
"lists",
|
|
22
|
+
(c) => ({
|
|
23
|
+
board: c.board,
|
|
24
|
+
}),
|
|
25
|
+
],
|
|
26
|
+
type: "string",
|
|
27
|
+
label: "List",
|
|
28
|
+
description: "The ID of the List to rename",
|
|
29
|
+
optional: false,
|
|
30
|
+
},
|
|
31
|
+
name: {
|
|
32
|
+
propDefinition: [
|
|
33
|
+
common.props.trello,
|
|
34
|
+
"name",
|
|
35
|
+
],
|
|
36
|
+
description: "The new name of the list",
|
|
37
|
+
optional: false,
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
async run({ $ }) {
|
|
41
|
+
const res = await this.trello.renameList(this.listId, {
|
|
42
|
+
name: this.name,
|
|
43
|
+
}, $);
|
|
44
|
+
$.export("$summary", `Successfully renamed list to ${this.name}`);
|
|
45
|
+
return res;
|
|
46
|
+
},
|
|
47
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import common from "../common.js";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
...common,
|
|
5
|
+
key: "trello-search-boards",
|
|
6
|
+
name: "Search Boards",
|
|
7
|
+
description: "Searches for boards matching the specified query. [See the docs here](https://developer.atlassian.com/cloud/trello/rest/api-group-search/#api-search-get)",
|
|
8
|
+
version: "0.2.2",
|
|
9
|
+
type: "action",
|
|
10
|
+
props: {
|
|
11
|
+
...common.props,
|
|
12
|
+
query: {
|
|
13
|
+
propDefinition: [
|
|
14
|
+
common.props.trello,
|
|
15
|
+
"query",
|
|
16
|
+
],
|
|
17
|
+
},
|
|
18
|
+
idOrganizations: {
|
|
19
|
+
propDefinition: [
|
|
20
|
+
common.props.trello,
|
|
21
|
+
"idOrganizations",
|
|
22
|
+
],
|
|
23
|
+
description: "Specify the organizations to search for boards in",
|
|
24
|
+
},
|
|
25
|
+
partial: {
|
|
26
|
+
propDefinition: [
|
|
27
|
+
common.props.trello,
|
|
28
|
+
"partial",
|
|
29
|
+
],
|
|
30
|
+
},
|
|
31
|
+
boardFields: {
|
|
32
|
+
propDefinition: [
|
|
33
|
+
common.props.trello,
|
|
34
|
+
"boardFields",
|
|
35
|
+
],
|
|
36
|
+
},
|
|
37
|
+
boardsLimit: {
|
|
38
|
+
type: "integer",
|
|
39
|
+
label: "Boards Limit",
|
|
40
|
+
description: "The maximum number of boards to return.",
|
|
41
|
+
default: 10,
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
async run({ $ }) {
|
|
45
|
+
const opts = {
|
|
46
|
+
query: this.query,
|
|
47
|
+
idOrganizations: this.idOrganizations,
|
|
48
|
+
modelTypes: "boards",
|
|
49
|
+
board_fields: this.boardFields.join(","),
|
|
50
|
+
boards_limit: this.boardsLimit,
|
|
51
|
+
partial: this.partial,
|
|
52
|
+
};
|
|
53
|
+
const { boards } = await this.trello.searchBoards(opts, $);
|
|
54
|
+
$.export("$summary", `Successfully retrieved ${boards.length} board(s)`);
|
|
55
|
+
return boards;
|
|
56
|
+
},
|
|
57
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import common from "../common.js";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
...common,
|
|
5
|
+
key: "trello-search-cards",
|
|
6
|
+
name: "Search Cards",
|
|
7
|
+
description: "Searches for cards matching the specified query. [See the docs here](https://developer.atlassian.com/cloud/trello/rest/api-group-search/#api-search-get)",
|
|
8
|
+
version: "0.1.2",
|
|
9
|
+
type: "action",
|
|
10
|
+
props: {
|
|
11
|
+
...common.props,
|
|
12
|
+
query: {
|
|
13
|
+
propDefinition: [
|
|
14
|
+
common.props.trello,
|
|
15
|
+
"query",
|
|
16
|
+
],
|
|
17
|
+
},
|
|
18
|
+
idBoards: {
|
|
19
|
+
propDefinition: [
|
|
20
|
+
common.props.trello,
|
|
21
|
+
"board",
|
|
22
|
+
],
|
|
23
|
+
type: "string[]",
|
|
24
|
+
label: "Boards",
|
|
25
|
+
description: "The IDs of boards to search for cards in",
|
|
26
|
+
},
|
|
27
|
+
partial: {
|
|
28
|
+
propDefinition: [
|
|
29
|
+
common.props.trello,
|
|
30
|
+
"partial",
|
|
31
|
+
],
|
|
32
|
+
},
|
|
33
|
+
cardFields: {
|
|
34
|
+
propDefinition: [
|
|
35
|
+
common.props.trello,
|
|
36
|
+
"cardFields",
|
|
37
|
+
],
|
|
38
|
+
},
|
|
39
|
+
cardsLimit: {
|
|
40
|
+
type: "integer",
|
|
41
|
+
label: "Cards Limit",
|
|
42
|
+
description: "The maximum number of cards to return.",
|
|
43
|
+
default: 10,
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
async run({ $ }) {
|
|
47
|
+
const opts = {
|
|
48
|
+
query: this.query,
|
|
49
|
+
idBoards: this.idBoards,
|
|
50
|
+
modelTypes: "cards",
|
|
51
|
+
card_fields: this.cardFields,
|
|
52
|
+
cards_limit: this.cardsLimit,
|
|
53
|
+
partial: this.partial,
|
|
54
|
+
};
|
|
55
|
+
const { cards } = await this.trello.searchCards(opts, $);
|
|
56
|
+
$.export("$summary", `Successfully retrieved ${cards.length} card(s)`);
|
|
57
|
+
return cards;
|
|
58
|
+
},
|
|
59
|
+
};
|