@pipedream/trello 0.3.13 → 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.
Files changed (57) hide show
  1. package/README.md +9 -10
  2. package/actions/add-attachment-to-card/add-attachment-to-card.mjs +124 -0
  3. package/actions/add-checklist/add-checklist.mjs +56 -38
  4. package/actions/add-comment/add-comment.mjs +44 -34
  5. package/actions/add-existing-label-to-card/add-existing-label-to-card.mjs +26 -11
  6. package/actions/add-member-to-card/add-member-to-card.mjs +26 -11
  7. package/actions/archive-card/archive-card.mjs +13 -7
  8. package/actions/close-board/close-board.mjs +10 -4
  9. package/actions/common.mjs +2 -2
  10. package/actions/complete-checklist-item/complete-checklist-item.mjs +61 -31
  11. package/actions/create-board/create-board.mjs +96 -61
  12. package/actions/create-card/create-card.mjs +83 -39
  13. package/actions/create-checklist/create-checklist.mjs +26 -14
  14. package/actions/create-checklist-item/create-checklist-item.mjs +64 -39
  15. package/actions/create-comment-on-card/create-comment-on-card.mjs +26 -9
  16. package/actions/create-label/create-label.mjs +37 -36
  17. package/actions/create-list/create-list.mjs +51 -42
  18. package/actions/delete-checklist/delete-checklist.mjs +24 -11
  19. package/actions/find-labels/find-labels.mjs +13 -10
  20. package/actions/find-list/find-list.mjs +12 -9
  21. package/actions/get-card/get-card.mjs +12 -8
  22. package/actions/get-list/get-list.mjs +29 -15
  23. package/actions/move-card-to-list/move-card-to-list.mjs +16 -12
  24. package/actions/remove-label-from-card/remove-label-from-card.mjs +26 -10
  25. package/actions/rename-list/rename-list.mjs +23 -9
  26. package/actions/search-boards/search-boards.mjs +17 -15
  27. package/actions/search-cards/search-cards.mjs +17 -15
  28. package/actions/search-checklists/search-checklists.mjs +102 -46
  29. package/actions/search-members/search-members.mjs +48 -28
  30. package/actions/update-card/update-card.mjs +64 -47
  31. package/package.json +5 -5
  32. package/sources/card-archived/card-archived.mjs +21 -5
  33. package/sources/card-due-date-reminder/card-due-date-reminder.mjs +31 -30
  34. package/sources/card-moved/card-moved.mjs +12 -6
  35. package/sources/card-updates/card-updates.mjs +19 -10
  36. package/sources/common/common-board-based.mjs +4 -2
  37. package/sources/common/common-webhook.mjs +63 -20
  38. package/sources/common/common.mjs +2 -2
  39. package/sources/custom-webhook-events/custom-webhook-events.mjs +30 -11
  40. package/sources/new-activity/new-activity.mjs +5 -3
  41. package/sources/new-attachment/new-attachment.mjs +20 -4
  42. package/sources/new-board/new-board.mjs +5 -3
  43. package/sources/new-card/new-card.mjs +19 -10
  44. package/sources/new-checklist/new-checklist.mjs +15 -3
  45. package/sources/new-comment-added-to-card/new-comment-added-to-card.mjs +30 -9
  46. package/sources/new-label/new-label.mjs +7 -3
  47. package/sources/new-label-added-to-card/new-label-added-to-card.mjs +20 -10
  48. package/sources/new-list/new-list.mjs +7 -3
  49. package/sources/new-member-on-card/new-member-on-card.mjs +15 -3
  50. package/sources/new-notification/new-notification.mjs +15 -5
  51. package/trello.app.mjs +269 -487
  52. package/actions/add-attachment-to-card-via-url/add-attachment-to-card-via-url.mjs +0 -73
  53. package/actions/add-file-as-attachment-via-url/add-file-as-attachment-via-url.mjs +0 -72
  54. package/actions/add-image-attachment/add-image-attachment.mjs +0 -75
  55. package/actions/add-label-to-card/add-label-to-card.mjs +0 -55
  56. package/actions/copy-board/copy-board.mjs +0 -174
  57. /package/{common → sources/common}/events.mjs +0 -0
@@ -4,20 +4,20 @@ 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.0",
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.0",
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
  };
@@ -4,20 +4,20 @@ 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.0",
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
  };
@@ -4,20 +4,20 @@ export default {
4
4
  ...common,
5
5
  key: "trello-remove-label-from-card",
6
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.4",
7
+ description: "Removes label from card. [See the documentation](https://developer.atlassian.com/cloud/trello/rest/api-group-cards/#api-cards-id-idlabels-idlabel-delete).",
8
+ version: "0.2.0",
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 remove the Label from",
29
29
  optional: false,
30
30
  },
31
- idLabel: {
31
+ labelId: {
32
32
  propDefinition: [
33
- common.props.trello,
33
+ common.props.app,
34
34
  "label",
35
35
  (c) => ({
36
36
  board: c.board,
@@ -39,9 +39,25 @@ export default {
39
39
  description: "The ID of the Label to be removed from the card.",
40
40
  },
41
41
  },
42
+ methods: {
43
+ removeLabelFromCard({
44
+ cardId, labelId, ...args
45
+ } = {}) {
46
+ return this.app.delete({
47
+ path: `/cards/${cardId}/idLabels/${labelId}`,
48
+ ...args,
49
+ });
50
+ },
51
+ },
42
52
  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;
53
+ await this.removeLabelFromCard({
54
+ $,
55
+ cardId: this.cardId,
56
+ labelId: this.labelId,
57
+ });
58
+ $.export("$summary", "Successfully sent request to remove label from card.");
59
+ return {
60
+ success: true,
61
+ };
46
62
  },
47
63
  };
@@ -4,20 +4,20 @@ export default {
4
4
  ...common,
5
5
  key: "trello-rename-list",
6
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.3",
7
+ description: "Renames an existing list. [See the documentation](https://developer.atlassian.com/cloud/trello/rest/api-group-lists/#api-lists-id-put).",
8
+ version: "0.1.0",
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
  listId: {
19
19
  propDefinition: [
20
- common.props.trello,
20
+ common.props.app,
21
21
  "lists",
22
22
  (c) => ({
23
23
  board: c.board,
@@ -30,18 +30,32 @@ export default {
30
30
  },
31
31
  name: {
32
32
  propDefinition: [
33
- common.props.trello,
33
+ common.props.app,
34
34
  "name",
35
35
  ],
36
36
  description: "The new name of the list",
37
37
  optional: false,
38
38
  },
39
39
  },
40
+ methods: {
41
+ renameList({
42
+ listId, ...args
43
+ } = {}) {
44
+ return this.app.put({
45
+ path: `/lists/${listId}`,
46
+ ...args,
47
+ });
48
+ },
49
+ },
40
50
  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}`);
51
+ const res = await this.renameList({
52
+ $,
53
+ listId: this.listId,
54
+ data: {
55
+ name: this.name,
56
+ },
57
+ });
58
+ $.export("$summary", `Successfully renamed list to \`${this.name}\`.`);
45
59
  return res;
46
60
  },
47
61
  };
@@ -4,33 +4,33 @@ export default {
4
4
  ...common,
5
5
  key: "trello-search-boards",
6
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.4",
7
+ description: "Searches for boards matching the specified query. [See the documentation](https://developer.atlassian.com/cloud/trello/rest/api-group-search/#api-search-get).",
8
+ version: "0.3.0",
9
9
  type: "action",
10
10
  props: {
11
11
  ...common.props,
12
12
  query: {
13
13
  propDefinition: [
14
- common.props.trello,
14
+ common.props.app,
15
15
  "query",
16
16
  ],
17
17
  },
18
18
  idOrganizations: {
19
19
  propDefinition: [
20
- common.props.trello,
20
+ common.props.app,
21
21
  "idOrganizations",
22
22
  ],
23
23
  description: "Specify the organizations to search for boards in",
24
24
  },
25
25
  partial: {
26
26
  propDefinition: [
27
- common.props.trello,
27
+ common.props.app,
28
28
  "partial",
29
29
  ],
30
30
  },
31
31
  boardFields: {
32
32
  propDefinition: [
33
- common.props.trello,
33
+ common.props.app,
34
34
  "boardFields",
35
35
  ],
36
36
  },
@@ -42,15 +42,17 @@ export default {
42
42
  },
43
43
  },
44
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, $);
45
+ const { boards } = await this.app.search({
46
+ $,
47
+ params: {
48
+ query: this.query,
49
+ idOrganizations: this.idOrganizations?.join(","),
50
+ modelTypes: "boards",
51
+ board_fields: this.boardFields.join(","),
52
+ boards_limit: this.boardsLimit,
53
+ partial: this.partial,
54
+ },
55
+ });
54
56
  $.export("$summary", `Successfully retrieved ${boards.length} board(s)`);
55
57
  return boards;
56
58
  },
@@ -4,20 +4,20 @@ export default {
4
4
  ...common,
5
5
  key: "trello-search-cards",
6
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.4",
7
+ description: "Searches for cards matching the specified query. [See the documentation](https://developer.atlassian.com/cloud/trello/rest/api-group-search/#api-search-get).",
8
+ version: "0.2.0",
9
9
  type: "action",
10
10
  props: {
11
11
  ...common.props,
12
12
  query: {
13
13
  propDefinition: [
14
- common.props.trello,
14
+ common.props.app,
15
15
  "query",
16
16
  ],
17
17
  },
18
18
  idBoards: {
19
19
  propDefinition: [
20
- common.props.trello,
20
+ common.props.app,
21
21
  "board",
22
22
  ],
23
23
  type: "string[]",
@@ -26,13 +26,13 @@ export default {
26
26
  },
27
27
  partial: {
28
28
  propDefinition: [
29
- common.props.trello,
29
+ common.props.app,
30
30
  "partial",
31
31
  ],
32
32
  },
33
33
  cardFields: {
34
34
  propDefinition: [
35
- common.props.trello,
35
+ common.props.app,
36
36
  "cardFields",
37
37
  ],
38
38
  },
@@ -44,15 +44,17 @@ export default {
44
44
  },
45
45
  },
46
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, $);
47
+ const { cards } = await this.app.search({
48
+ $,
49
+ params: {
50
+ query: this.query,
51
+ idBoards: this.idBoards,
52
+ modelTypes: "cards",
53
+ card_fields: this.cardFields,
54
+ cards_limit: this.cardsLimit,
55
+ partial: this.partial,
56
+ },
57
+ });
56
58
  $.export("$summary", `Successfully retrieved ${cards.length} card(s)`);
57
59
  return cards;
58
60
  },
@@ -1,35 +1,43 @@
1
- // legacy_hash_id: a_1WiqM5
2
- import { axios } from "@pipedream/platform";
1
+ import app from "../../trello.app.mjs";
3
2
 
4
3
  export default {
5
4
  key: "trello-search-checklists",
6
5
  name: "Find Checklist",
7
- description: "Find a checklist on a particular board or card by name.",
8
- version: "0.1.3",
6
+ description: "Find a checklist on a particular board or card by name. [See the documentation here](https://developer.atlassian.com/cloud/trello/rest/api-group-boards/#api-boards-id-checklists-get) and [here](https://developer.atlassian.com/cloud/trello/rest/api-group-cards/#api-cards-id-checklists-get).",
7
+ version: "0.2.0",
9
8
  type: "action",
10
9
  props: {
11
- trello: {
12
- type: "app",
13
- app: "trello",
14
- },
10
+ app,
15
11
  type: {
16
12
  type: "string",
13
+ label: "Type",
17
14
  description: "Whether to search boards or cards for the checklist.",
18
15
  options: [
19
16
  "board",
20
17
  "card",
21
18
  ],
19
+ reloadProps: true,
20
+ },
21
+ boardId: {
22
+ type: "string",
23
+ label: "Board ID",
24
+ description: "The ID of the board.",
25
+ hidden: true,
22
26
  },
23
- id: {
27
+ cardId: {
24
28
  type: "string",
25
- description: "The ID of the board or card.",
29
+ label: "Card ID",
30
+ description: "The ID of the card.",
31
+ hidden: true,
26
32
  },
27
33
  query: {
28
34
  type: "string",
35
+ label: "Query",
29
36
  description: "The query to search for.",
30
37
  },
31
38
  checkItems: {
32
39
  type: "string",
40
+ label: "Check Items",
33
41
  description: "all or none",
34
42
  optional: true,
35
43
  options: [
@@ -37,7 +45,7 @@ export default {
37
45
  "none",
38
46
  ],
39
47
  },
40
- checkItem_fields: {
48
+ checkItemFields: {
41
49
  type: "string",
42
50
  label: "CheckItem Fields",
43
51
  description: "all or a comma-separated list of: name, nameData, pos, state, type",
@@ -45,6 +53,7 @@ export default {
45
53
  },
46
54
  filter: {
47
55
  type: "string",
56
+ label: "Filter",
48
57
  description: "all or none",
49
58
  optional: true,
50
59
  options: [
@@ -54,53 +63,100 @@ export default {
54
63
  },
55
64
  fields: {
56
65
  type: "string",
57
- description: "all or a comma-separated list of: idBoard, idCard, name, pos",
66
+ label: "Fields",
67
+ description: "`all` or a comma-separated list of: `idBoard`, `idCard`, `name`, `pos`. Eg: `idBoard,idCard,name,pos`. Eg: `all`.",
58
68
  optional: true,
59
69
  },
60
70
  },
71
+ additionalProps() {
72
+ const { type } = this;
73
+
74
+ const defaultProps = {
75
+ boardId: {
76
+ type: "string",
77
+ label: "Board ID",
78
+ description: "The ID of the board.",
79
+ hidden: false,
80
+ options: async () => {
81
+ const boards = await this.app.getBoards();
82
+ return boards
83
+ .filter(({ closed }) => closed === false)
84
+ .map(({
85
+ id: value, name: label,
86
+ }) => ({
87
+ label,
88
+ value,
89
+ }));
90
+ },
91
+ },
92
+ };
93
+
94
+ if (type === "card") {
95
+ return {
96
+ ...defaultProps,
97
+ cardId: {
98
+ type: "string",
99
+ label: "Card ID",
100
+ description: "The ID of the card.",
101
+ hidden: false,
102
+ options: async () => {
103
+ const cards = await this.app.getCards({
104
+ boardId: this.boardId,
105
+ });
106
+ return cards.map(({
107
+ id: value, name: label,
108
+ }) => ({
109
+ label,
110
+ value,
111
+ }));
112
+ },
113
+ },
114
+ };
115
+ }
116
+
117
+ return defaultProps;
118
+ },
61
119
  async run({ $ }) {
62
- let type = this.type;
63
- let id = this.id;
64
- let query = this.query;
65
- const trelloParams = [
66
- "checkItems",
67
- "checkItem_fields",
68
- "filter",
69
- "fields",
70
- ];
71
- let p = this;
120
+ const {
121
+ app,
122
+ type,
123
+ boardId,
124
+ cardId,
125
+ query,
126
+ checkItems,
127
+ checkItemFields,
128
+ filter,
129
+ fields,
130
+ } = this;
131
+
72
132
  let checklists = null;
73
133
  let matches = [];
74
134
 
75
- const queryString = trelloParams.filter((param) => p[param]).map((param) => `${param}=${p[param]}`)
76
- .join("&");
135
+ const params = {
136
+ checkItems,
137
+ checkItem_fields: checkItemFields,
138
+ filter,
139
+ fields,
140
+ };
77
141
 
78
- if (type == "board") {
79
- checklists = await axios($, {
80
- url: `https://api.trello.com/1/boards/${id}/checklists?${queryString}`,
81
- method: "GET",
82
- }, {
83
- token: {
84
- key: this.trello.$auth.oauth_access_token,
85
- secret: this.trello.$auth.oauth_refresh_token,
86
- },
87
- oauthSignerUri: this.trello.$auth.oauth_signer_uri,
142
+ if (type === "board") {
143
+ checklists = await app.listBoardChecklists({
144
+ $,
145
+ boardId,
146
+ params,
88
147
  });
89
- } else if (type == "card") {
90
- checklists = await axios($, {
91
- url: `https://api.trello.com/1/cards/${id}/checklists?${queryString}`,
92
- method: "GET",
93
- }, {
94
- token: {
95
- key: this.trello.$auth.oauth_access_token,
96
- secret: this.trello.$auth.oauth_refresh_token,
97
- },
98
- oauthSignerUri: this.trello.$auth.oauth_signer_uri,
148
+
149
+ } else if (type === "card") {
150
+ checklists = await app.listCardChecklists({
151
+ $,
152
+ cardId,
153
+ params,
99
154
  });
100
155
  }
156
+
101
157
  if (checklists) {
102
- checklists.forEach(function(checklist) {
103
- if (checklist.name.includes(query))
158
+ checklists.forEach((checklist) => {
159
+ if (checklist.name?.toLowerCase().includes(query.toLowerCase()))
104
160
  matches.push(checklist);
105
161
  });
106
162
  }