@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.
Files changed (71) hide show
  1. package/actions/add-attachment-to-card/add-attachment-to-card.mjs +131 -0
  2. package/actions/add-checklist/add-checklist.mjs +50 -42
  3. package/actions/add-comment/add-comment.mjs +44 -35
  4. package/actions/add-existing-label-to-card/add-existing-label-to-card.mjs +19 -14
  5. package/actions/add-member-to-card/add-member-to-card.mjs +19 -14
  6. package/actions/archive-card/archive-card.mjs +15 -10
  7. package/actions/{common.mjs → common/common.mjs} +2 -2
  8. package/actions/complete-checklist-item/complete-checklist-item.mjs +51 -31
  9. package/actions/create-board/create-board.mjs +86 -88
  10. package/actions/create-card/create-card.mjs +102 -53
  11. package/actions/create-checklist-item/create-checklist-item.mjs +54 -39
  12. package/actions/create-label/create-label.mjs +38 -50
  13. package/actions/create-list/create-list.mjs +43 -42
  14. package/actions/delete-checklist/delete-checklist.mjs +17 -14
  15. package/actions/find-labels/find-labels.mjs +14 -12
  16. package/actions/find-list/find-list.mjs +13 -10
  17. package/actions/get-card/get-card.mjs +13 -9
  18. package/actions/get-list/get-list.mjs +29 -15
  19. package/actions/move-card-to-list/move-card-to-list.mjs +17 -13
  20. package/actions/remove-label-from-card/remove-label-from-card.mjs +20 -13
  21. package/actions/rename-list/rename-list.mjs +24 -10
  22. package/actions/search-boards/search-boards.mjs +22 -18
  23. package/actions/search-cards/search-cards.mjs +23 -18
  24. package/actions/search-checklists/search-checklists.mjs +96 -59
  25. package/actions/search-members/search-members.mjs +44 -34
  26. package/actions/update-card/update-card.mjs +68 -50
  27. package/common/constants.mjs +128 -0
  28. package/common/fields.mjs +1 -0
  29. package/package.json +5 -3
  30. package/sources/card-archived/card-archived.mjs +22 -18
  31. package/sources/card-archived/test-event.mjs +64 -0
  32. package/sources/card-due-date-reminder/card-due-date-reminder.mjs +118 -39
  33. package/sources/card-due-date-reminder/test-event.mjs +75 -0
  34. package/sources/card-moved/card-moved.mjs +30 -27
  35. package/sources/card-moved/test-event.mjs +78 -0
  36. package/sources/card-updates/card-updates.mjs +29 -27
  37. package/sources/card-updates/test-event.mjs +86 -0
  38. package/sources/common/actions.mjs +206 -0
  39. package/sources/common/common-board-based.mjs +16 -9
  40. package/sources/common/common-webhook.mjs +86 -32
  41. package/sources/common/common.mjs +7 -4
  42. package/sources/custom-webhook-events/custom-webhook-events.mjs +37 -49
  43. package/sources/new-activity/new-activity.mjs +25 -32
  44. package/sources/new-attachment/new-attachment.mjs +42 -35
  45. package/sources/new-attachment/test-event.mjs +69 -0
  46. package/sources/new-board/new-board.mjs +21 -12
  47. package/sources/new-board/test-event.mjs +100 -0
  48. package/sources/new-card/new-card.mjs +29 -27
  49. package/sources/new-card/test-event.mjs +79 -0
  50. package/sources/new-checklist/new-checklist.mjs +42 -13
  51. package/sources/new-checklist/test-event.mjs +22 -0
  52. package/sources/new-comment-added-to-card/new-comment-added-to-card.mjs +49 -34
  53. package/sources/new-comment-added-to-card/test-event.mjs +298 -0
  54. package/sources/new-label/new-label.mjs +17 -14
  55. package/sources/new-label/test-event.mjs +7 -0
  56. package/sources/new-label-added-to-card/new-label-added-to-card.mjs +38 -29
  57. package/sources/new-label-added-to-card/test-event.mjs +85 -0
  58. package/sources/new-member-on-card/new-member-on-card.mjs +21 -18
  59. package/sources/new-member-on-card/test-event.mjs +83 -0
  60. package/sources/new-notification/new-notification.mjs +8 -7
  61. package/trello.app.mjs +454 -494
  62. package/actions/add-attachment-to-card-via-url/add-attachment-to-card-via-url.mjs +0 -73
  63. package/actions/add-file-as-attachment-via-url/add-file-as-attachment-via-url.mjs +0 -72
  64. package/actions/add-image-attachment/add-image-attachment.mjs +0 -75
  65. package/actions/add-label-to-card/add-label-to-card.mjs +0 -55
  66. package/actions/close-board/close-board.mjs +0 -25
  67. package/actions/copy-board/copy-board.mjs +0 -174
  68. package/actions/create-checklist/create-checklist.mjs +0 -66
  69. package/actions/create-comment-on-card/create-comment-on-card.mjs +0 -42
  70. package/sources/new-list/new-list.mjs +0 -29
  71. /package/{common → sources/common}/events.mjs +0 -0
@@ -1,73 +1,61 @@
1
- // legacy_hash_id: a_l0iLRL
2
- import { axios } from "@pipedream/platform";
1
+ import app from "../../trello.app.mjs";
2
+ import constants from "../../common/constants.mjs";
3
3
 
4
4
  export default {
5
5
  key: "trello-create-label",
6
6
  name: "Create Label",
7
- description: "Creates a new label on the specified board.",
8
- version: "0.1.3",
7
+ description: "Creates a new label on the specified board. [See the documentation](https://developer.atlassian.com/cloud/trello/rest/api-group-labels/#api-labels-post).",
8
+ version: "0.2.1",
9
9
  type: "action",
10
10
  props: {
11
- trello: {
12
- type: "app",
13
- app: "trello",
11
+ app,
12
+ idBoard: {
13
+ type: "string",
14
+ label: "Board ID",
15
+ description: "The ID of the board to create the label on.",
16
+ propDefinition: [
17
+ app,
18
+ "board",
19
+ ],
14
20
  },
15
21
  name: {
16
22
  type: "string",
23
+ label: "Name",
17
24
  description: "Name for the label.",
18
25
  },
19
26
  color: {
20
27
  type: "string",
28
+ label: "Color",
21
29
  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
- ],
30
+ options: constants.LABEL_COLORS,
35
31
  },
36
- idBoard: {
37
- type: "string",
38
- description: "The ID of the board to create the label on.",
32
+ },
33
+ methods: {
34
+ createLabel(args = {}) {
35
+ return this.app.post({
36
+ path: "/labels",
37
+ ...args,
38
+ });
39
39
  },
40
40
  },
41
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
- };
42
+ const {
43
+ idBoard,
44
+ name,
45
+ color,
46
+ } = this;
59
47
 
60
- const token = {
61
- key: this.trello.$auth.oauth_access_token,
62
- secret: this.trello.$auth.oauth_refresh_token,
63
- };
48
+ const response = await this.app.createLabel({
49
+ $,
50
+ params: {
51
+ idBoard,
52
+ name,
53
+ color,
54
+ },
55
+ });
64
56
 
65
- const signConfig = {
66
- token,
67
- oauthSignerUri,
68
- };
57
+ $.export("$summary", `Successfully created label ${this.name}`);
69
58
 
70
- const resp = await axios($, config, signConfig);
71
- return resp;
59
+ return response;
72
60
  },
73
61
  };
@@ -1,67 +1,68 @@
1
- // legacy_hash_id: a_G1iBG7
2
- import { axios } from "@pipedream/platform";
1
+ import app from "../../trello.app.mjs";
3
2
 
4
3
  export default {
5
4
  key: "trello-create-list",
6
5
  name: "Create a List",
7
- description: "Creates a new list on a board",
8
- version: "0.1.3",
6
+ description: "Creates a new list. [See the documentation](https://developer.atlassian.com/cloud/trello/rest/api-group-lists/#api-lists-post).",
7
+ version: "0.2.1",
9
8
  type: "action",
10
9
  props: {
11
- trello: {
12
- type: "app",
13
- app: "trello",
10
+ app,
11
+ idBoard: {
12
+ type: "string",
13
+ label: "Board ID",
14
+ description: "The long ID of the board the list should be created on.",
15
+ propDefinition: [
16
+ app,
17
+ "board",
18
+ ],
14
19
  },
15
20
  name: {
16
21
  type: "string",
22
+ label: "Name",
17
23
  description: "Name for the list.",
18
24
  },
19
- idBoard: {
20
- type: "string",
21
- description: "The long ID of the board the list should be created on.",
22
- },
23
25
  idListSource: {
24
26
  type: "string",
27
+ label: "List Source ID",
25
28
  description: "ID of the list to copy into the new list.",
26
29
  optional: true,
30
+ propDefinition: [
31
+ app,
32
+ "lists",
33
+ ({ idBoard }) => ({
34
+ board: idBoard,
35
+ }),
36
+ ],
27
37
  },
28
38
  pos: {
29
- type: "string",
30
- description: "Position of the list. top, bottom, or a positive floating point number.",
31
- optional: true,
39
+ propDefinition: [
40
+ app,
41
+ "pos",
42
+ ],
43
+ description: "Position of the list. `top`, `bottom`, or a positive floating point number",
32
44
  },
33
45
  },
34
46
  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
- };
47
+ const {
48
+ name,
49
+ idBoard,
50
+ idListSource,
51
+ pos,
52
+ } = this;
53
53
 
54
- const token = {
55
- key: this.trello.$auth.oauth_access_token,
56
- secret: this.trello.$auth.oauth_refresh_token,
57
- };
54
+ const response = await this.app.createList({
55
+ $,
56
+ params: {
57
+ name,
58
+ idBoard,
59
+ idListSource,
60
+ pos,
61
+ },
62
+ });
58
63
 
59
- const signConfig = {
60
- token,
61
- oauthSignerUri,
62
- };
64
+ $.export("$summary", `Successfully created list ${this.name}`);
63
65
 
64
- const resp = await axios($, config, signConfig);
65
- return resp;
66
+ return response;
66
67
  },
67
68
  };
@@ -1,26 +1,26 @@
1
- import common from "../common.mjs";
1
+ import app from "../../trello.app.mjs";
2
2
 
3
3
  export default {
4
- ...common,
5
4
  key: "trello-delete-checklist",
6
5
  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.4",
6
+ description: "Deletes the specified checklist. [See the documentation](https://developer.atlassian.com/cloud/trello/rest/api-group-checklists/#api-checklists-id-delete).",
7
+ version: "0.2.1",
9
8
  type: "action",
10
9
  props: {
11
- ...common.props,
10
+ app,
12
11
  board: {
13
12
  propDefinition: [
14
- common.props.trello,
13
+ app,
15
14
  "board",
16
15
  ],
17
16
  },
18
- idCard: {
17
+ carId: {
19
18
  propDefinition: [
20
- common.props.trello,
19
+ app,
21
20
  "cards",
22
21
  (c) => ({
23
22
  board: c.board,
23
+ checklistCardsOnly: true,
24
24
  }),
25
25
  ],
26
26
  type: "string",
@@ -28,19 +28,22 @@ export default {
28
28
  description: "The ID of the card containing the checklist do delete",
29
29
  optional: false,
30
30
  },
31
- idChecklist: {
31
+ checklistId: {
32
32
  propDefinition: [
33
- common.props.trello,
33
+ app,
34
34
  "checklist",
35
- (c) => ({
36
- card: c.idCard,
35
+ ({ carId }) => ({
36
+ card: carId,
37
37
  }),
38
38
  ],
39
39
  description: "The ID of the checklist to delete",
40
40
  },
41
41
  },
42
42
  async run({ $ }) {
43
- await this.trello.deleteChecklist(this.idChecklist, $);
44
- $.export("$summary", `Successfully deleted checklist ${this.idChecklist}`);
43
+ await this.app.deleteChecklist({
44
+ $,
45
+ checklistId: this.checklistId,
46
+ });
47
+ $.export("$summary", `Successfully deleted checklist ${this.checklistId}`);
45
48
  },
46
49
  };
@@ -1,42 +1,44 @@
1
- import common from "../common.mjs";
1
+ import common from "../common/common.mjs";
2
2
 
3
3
  export default {
4
4
  ...common,
5
5
  key: "trello-find-labels",
6
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.4",
7
+ description: "Finds a label on a specific board by name. [See the documentation](https://developer.atlassian.com/cloud/trello/rest/api-group-boards/#api-boards-id-labels-get)",
8
+ version: "0.2.1",
9
9
  type: "action",
10
10
  props: {
11
11
  ...common.props,
12
12
  board: {
13
13
  propDefinition: [
14
- common.props.trello,
14
+ common.props.app,
15
15
  "board",
16
16
  ],
17
17
  description: "Unique identifier of the board to search for labels",
18
18
  },
19
19
  name: {
20
20
  propDefinition: [
21
- common.props.trello,
21
+ common.props.app,
22
22
  "name",
23
23
  ],
24
24
  label: "Label Name",
25
25
  description: "Name of the label to find.",
26
- optional: false,
27
26
  },
28
- labelLimit: {
27
+ limit: {
29
28
  type: "integer",
30
- label: "Results",
29
+ label: "Limit",
31
30
  description: "The number of labels to be returned (up to 1000)",
32
31
  default: 50,
33
32
  },
34
33
  },
35
34
  async run({ $ }) {
36
- const opts = {
37
- limit: this.labelLimit,
38
- };
39
- const labels = await this.trello.findLabel(this.board, opts, $);
35
+ const labels = await this.app.findLabel({
36
+ $,
37
+ boardId: this.board,
38
+ params: {
39
+ limit: this.limit,
40
+ },
41
+ });
40
42
  const res = this.getMatches(labels, this.name);
41
43
  $.export("$summary", `Successfully retrieved ${res.length} label(s) with name ${this.name}`);
42
44
  return res;
@@ -1,24 +1,24 @@
1
- import common from "../common.mjs";
1
+ import common from "../common/common.mjs";
2
2
 
3
3
  export default {
4
4
  ...common,
5
5
  key: "trello-find-list",
6
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.4",
7
+ description: "Finds a list on a specific board by name. [See the documentation](https://developer.atlassian.com/cloud/trello/rest/api-group-boards/#api-boards-id-lists-get).",
8
+ version: "0.2.1",
9
9
  type: "action",
10
10
  props: {
11
11
  ...common.props,
12
12
  board: {
13
13
  propDefinition: [
14
- common.props.trello,
14
+ common.props.app,
15
15
  "board",
16
16
  ],
17
17
  description: "Specify the board to search for lists",
18
18
  },
19
19
  name: {
20
20
  propDefinition: [
21
- common.props.trello,
21
+ common.props.app,
22
22
  "name",
23
23
  ],
24
24
  label: "List Name",
@@ -27,7 +27,7 @@ export default {
27
27
  },
28
28
  listFilter: {
29
29
  propDefinition: [
30
- common.props.trello,
30
+ common.props.app,
31
31
  "listFilter",
32
32
  ],
33
33
  },
@@ -38,10 +38,13 @@ export default {
38
38
  name,
39
39
  listFilter,
40
40
  } = this;
41
- const opts = {
42
- filter: listFilter,
43
- };
44
- const lists = await this.trello.findList(board, opts, $);
41
+ const lists = await this.app.getLists({
42
+ $,
43
+ boardId: board,
44
+ params: {
45
+ filter: listFilter,
46
+ },
47
+ });
45
48
  const res = this.getMatches(lists, name);
46
49
  $.export("$summary", `Successfully retrieved ${res.length} list(s) with name ${name}`);
47
50
  return res;
@@ -1,23 +1,23 @@
1
- import common from "../common.mjs";
1
+ import common from "../common/common.mjs";
2
2
 
3
3
  export default {
4
4
  ...common,
5
5
  key: "trello-get-card",
6
6
  name: "Get Card",
7
- description: "Gets a card by its ID. [See the documentation](https://developer.atlassian.com/cloud/trello/rest/api-group-cards/#api-cards-id-get)",
8
- version: "0.1.7",
7
+ description: "Gets a card by its ID. [See the documentation](https://developer.atlassian.com/cloud/trello/rest/api-group-cards/#api-cards-id-get).",
8
+ version: "0.2.1",
9
9
  type: "action",
10
10
  props: {
11
11
  ...common.props,
12
12
  board: {
13
13
  propDefinition: [
14
- common.props.trello,
14
+ common.props.app,
15
15
  "board",
16
16
  ],
17
17
  },
18
18
  cardId: {
19
19
  propDefinition: [
20
- common.props.trello,
20
+ common.props.app,
21
21
  "cards",
22
22
  (c) => ({
23
23
  board: c.board,
@@ -30,15 +30,19 @@ export default {
30
30
  },
31
31
  customFieldItems: {
32
32
  propDefinition: [
33
- common.props.trello,
33
+ common.props.app,
34
34
  "customFieldItems",
35
35
  ],
36
36
  },
37
37
  },
38
38
  async run({ $ }) {
39
- const res = await this.trello.getCard(this.cardId, {
40
- customFieldItems: this.customFieldItems,
41
- }, $);
39
+ const res = await this.app.getCard({
40
+ $,
41
+ cardId: this.cardId,
42
+ params: {
43
+ customFieldItems: this.customFieldItems,
44
+ },
45
+ });
42
46
  $.export("$summary", `Successfully retrieved card ${this.cardId}`);
43
47
  return res;
44
48
  },
@@ -1,32 +1,46 @@
1
- import { axios } from "@pipedream/platform";
1
+ import app from "../../trello.app.mjs";
2
2
 
3
3
  export default {
4
4
  key: "trello-get-list",
5
5
  name: "Get List",
6
- description: "Get information about a List",
7
- version: "0.0.4",
6
+ description: "Get information about a List. [See the documentation](https://developer.atlassian.com/cloud/trello/rest/api-group-lists/#api-lists-id-get).",
7
+ version: "0.1.1",
8
8
  type: "action",
9
9
  props: {
10
- // eslint-disable-next-line pipedream/props-label, pipedream/props-description
11
- trello: {
12
- type: "app",
13
- app: "trello",
10
+ app,
11
+ boardId: {
12
+ propDefinition: [
13
+ app,
14
+ "board",
15
+ ],
14
16
  },
15
17
  listId: {
16
18
  type: "string",
17
19
  label: "List ID",
18
20
  description: "The ID of the Trello list",
21
+ optional: false,
22
+ propDefinition: [
23
+ app,
24
+ "lists",
25
+ ({ boardId }) => ({
26
+ board: boardId,
27
+ }),
28
+ ],
19
29
  },
20
30
  },
21
31
  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,
32
+ const {
33
+ app,
34
+ listId,
35
+ } = this;
36
+
37
+ const response = await app.getList({
38
+ $,
39
+ listId,
30
40
  });
41
+
42
+ $.export("$summary", `Successfully retrieved list ${listId}.`);
43
+
44
+ return response;
31
45
  },
32
46
  };
@@ -1,23 +1,23 @@
1
- import common from "../common.mjs";
1
+ import common from "../common/common.mjs";
2
2
 
3
3
  export default {
4
4
  ...common,
5
5
  key: "trello-move-card-to-list",
6
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.4",
7
+ description: "Moves a card to the specified board/list pair. [See the documentation](https://developer.atlassian.com/cloud/trello/rest/api-group-cards/#api-cards-id-put).",
8
+ version: "0.2.1",
9
9
  type: "action",
10
10
  props: {
11
11
  ...common.props,
12
12
  board: {
13
13
  propDefinition: [
14
- common.props.trello,
14
+ common.props.app,
15
15
  "board",
16
16
  ],
17
17
  },
18
- idCard: {
18
+ cardId: {
19
19
  propDefinition: [
20
- common.props.trello,
20
+ common.props.app,
21
21
  "cards",
22
22
  (c) => ({
23
23
  board: c.board,
@@ -28,9 +28,9 @@ export default {
28
28
  description: "The ID of the card to move",
29
29
  optional: false,
30
30
  },
31
- toIdList: {
31
+ idList: {
32
32
  propDefinition: [
33
- common.props.trello,
33
+ common.props.app,
34
34
  "lists",
35
35
  (c) => ({
36
36
  board: c.board,
@@ -43,11 +43,15 @@ export default {
43
43
  },
44
44
  },
45
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}`);
46
+ const res = await this.app.updateCard({
47
+ $,
48
+ cardId: this.cardId,
49
+ data: {
50
+ idBoard: this.board,
51
+ idList: this.idList,
52
+ },
53
+ });
54
+ $.export("$summary", `Successfully moved card ${this.cardId} to list ${this.idList}`);
51
55
  return res;
52
56
  },
53
57
  };
@@ -1,23 +1,22 @@
1
- import common from "../common.mjs";
1
+ import app from "../../trello.app.mjs";
2
2
 
3
3
  export default {
4
- ...common,
5
4
  key: "trello-remove-label-from-card",
6
5
  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.4",
6
+ description: "Removes label from card. [See the documentation](https://developer.atlassian.com/cloud/trello/rest/api-group-cards/#api-cards-id-idlabels-idlabel-delete).",
7
+ version: "0.2.1",
9
8
  type: "action",
10
9
  props: {
11
- ...common.props,
10
+ app,
12
11
  board: {
13
12
  propDefinition: [
14
- common.props.trello,
13
+ app,
15
14
  "board",
16
15
  ],
17
16
  },
18
- idCard: {
17
+ cardId: {
19
18
  propDefinition: [
20
- common.props.trello,
19
+ app,
21
20
  "cards",
22
21
  (c) => ({
23
22
  board: c.board,
@@ -28,20 +27,28 @@ export default {
28
27
  description: "The ID of the Card to remove the Label from",
29
28
  optional: false,
30
29
  },
31
- idLabel: {
30
+ labelId: {
32
31
  propDefinition: [
33
- common.props.trello,
32
+ app,
34
33
  "label",
35
34
  (c) => ({
36
35
  board: c.board,
36
+ card: c.cardId,
37
+ cardLabelsOnly: true,
37
38
  }),
38
39
  ],
39
40
  description: "The ID of the Label to be removed from the card.",
40
41
  },
41
42
  },
42
43
  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;
44
+ await this.app.removeLabelFromCard({
45
+ $,
46
+ cardId: this.cardId,
47
+ labelId: this.labelId,
48
+ });
49
+ $.export("$summary", "Successfully sent request to remove label from card.");
50
+ return {
51
+ success: true,
52
+ };
46
53
  },
47
54
  };