@pipedream/trello 0.3.6 → 0.3.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pipedream/trello",
3
- "version": "0.3.6",
3
+ "version": "0.3.7",
4
4
  "description": "Pipedream Trello Components",
5
5
  "main": "trello.app.js",
6
6
  "keywords": [
@@ -1,11 +1,11 @@
1
- import common from "../common-webhook.mjs";
1
+ import common from "../common/common-webhook.mjs";
2
2
 
3
3
  export default {
4
4
  ...common,
5
5
  key: "trello-card-archived",
6
6
  name: "Card Archived (Instant)",
7
7
  description: "Emit new event for each card archived.",
8
- version: "0.0.9",
8
+ version: "0.0.10",
9
9
  type: "source",
10
10
  props: {
11
11
  ...common.props,
@@ -1,11 +1,11 @@
1
- import common from "../common-polling.mjs";
1
+ import common from "../common/common-polling.mjs";
2
2
 
3
3
  export default {
4
4
  ...common,
5
5
  key: "trello-card-due-date-reminder",
6
6
  name: "Card Due Date Reminder",
7
7
  description: "Emit new event at a specified time before a card is due.",
8
- version: "0.0.5",
8
+ version: "0.0.6",
9
9
  type: "source",
10
10
  dedupe: "unique",
11
11
  props: {
@@ -1,11 +1,11 @@
1
- import common from "../common-webhook.mjs";
1
+ import common from "../common/common-webhook.mjs";
2
2
 
3
3
  export default {
4
4
  ...common,
5
5
  key: "trello-card-moved",
6
6
  name: "Card Moved (Instant)",
7
7
  description: "Emit new event each time a card is moved to a list.",
8
- version: "0.0.8",
8
+ version: "0.0.9",
9
9
  type: "source",
10
10
  props: {
11
11
  ...common.props,
@@ -1,11 +1,11 @@
1
- import common from "../common-webhook.mjs";
1
+ import common from "../common/common-webhook.mjs";
2
2
 
3
3
  export default {
4
4
  ...common,
5
5
  key: "trello-card-updates",
6
6
  name: "Card Updates (Instant)",
7
7
  description: "Emit new event for each update to a Trello card.",
8
- version: "0.0.8",
8
+ version: "0.0.9",
9
9
  type: "source",
10
10
  props: {
11
11
  ...common.props,
@@ -0,0 +1,48 @@
1
+ /* eslint-disable pipedream/required-properties-key, pipedream/required-properties-name,
2
+ pipedream/required-properties-version, pipedream/required-properties-description,
3
+ pipedream/required-properties-type */
4
+ import base from "./common/common-webhook.mjs";
5
+
6
+ export default {
7
+ ...base,
8
+ props: {
9
+ ...base.props,
10
+ board: {
11
+ propDefinition: [
12
+ base.props.trello,
13
+ "board",
14
+ ],
15
+ },
16
+ onlyEventsRelatedWithAuthenticatedUser: {
17
+ label: "Only Events Related With Me",
18
+ description: "Only will emit events from the cards related with the authenticated user",
19
+ type: "boolean",
20
+ default: false,
21
+ optional: true,
22
+ },
23
+ },
24
+ methods: {
25
+ ...base.methods,
26
+ /**
27
+ * Default isRelevant for components that only filter the results by a specified board.
28
+ * @param {object} result - The result item obtained by the component.
29
+ */
30
+ async isRelevant({ result }) {
31
+ if (!this.board || this.board !== result.idBoard) {
32
+ return false;
33
+ }
34
+
35
+ const member = await this.trello.getMember("me");
36
+
37
+ if (
38
+ this.onlyEventsRelatedWithAuthenticatedUser &&
39
+ result?.idMembers?.length &&
40
+ !result.idMembers.includes(member.id)
41
+ ) {
42
+ return false;
43
+ }
44
+
45
+ return true;
46
+ },
47
+ },
48
+ };
@@ -1,4 +1,4 @@
1
- const trello = require("../trello.app.js");
1
+ const trello = require("../../trello.app");
2
2
 
3
3
  module.exports = {
4
4
  props: {
@@ -1,11 +1,11 @@
1
- import common from "../common-webhook.mjs";
1
+ import common from "../common/common-webhook.mjs";
2
2
 
3
3
  export default {
4
4
  ...common,
5
5
  key: "trello-custom-webhook-events",
6
6
  name: "Custom Webhook Events (Instant)",
7
7
  description: "Emit new events for activity matching a board, event types, lists and/or cards.",
8
- version: "0.0.7",
8
+ version: "0.0.8",
9
9
  type: "source",
10
10
  props: {
11
11
  ...common.props,
@@ -1,11 +1,11 @@
1
- import common from "../common-webhook.mjs";
1
+ import common from "../common/common-webhook.mjs";
2
2
 
3
3
  export default {
4
4
  ...common,
5
5
  key: "trello-new-activity",
6
6
  name: "New Activity (Instant)",
7
7
  description: "Emit new event for new activity on a board.",
8
- version: "0.0.5",
8
+ version: "0.0.6",
9
9
  type: "source",
10
10
  props: {
11
11
  ...common.props,
@@ -1,11 +1,11 @@
1
- import common from "../common-webhook.mjs";
1
+ import common from "../common/common-webhook.mjs";
2
2
 
3
3
  export default {
4
4
  ...common,
5
5
  key: "trello-new-attachment",
6
6
  name: "New Attachment (Instant)",
7
7
  description: "Emit new event for new attachment on a board.",
8
- version: "0.0.5",
8
+ version: "0.0.6",
9
9
  type: "source",
10
10
  props: {
11
11
  ...common.props,
@@ -1,11 +1,11 @@
1
- import common from "../common-webhook.mjs";
1
+ import common from "../common/common-webhook.mjs";
2
2
 
3
3
  export default {
4
4
  ...common,
5
5
  key: "trello-new-board",
6
6
  name: "New Board (Instant)",
7
7
  description: "Emit new event for each new board added.",
8
- version: "0.0.9",
8
+ version: "0.0.10",
9
9
  type: "source",
10
10
  dedupe: "unique",
11
11
  methods: {
@@ -1,11 +1,11 @@
1
- import common from "../common-webhook.mjs";
1
+ import common from "../common/common-webhook.mjs";
2
2
 
3
3
  export default {
4
4
  ...common,
5
5
  key: "trello-new-card",
6
6
  name: "New Card (Instant)",
7
7
  description: "Emit new event for each new Trello card on a board.",
8
- version: "0.0.8",
8
+ version: "0.0.9",
9
9
  type: "source",
10
10
  dedupe: "unique",
11
11
  props: {
@@ -1,11 +1,11 @@
1
- import common from "../board-based.mjs";
1
+ import common from "../common/common-board-based.mjs";
2
2
 
3
3
  export default {
4
4
  ...common,
5
5
  key: "trello-new-checklist",
6
6
  name: "New Checklist (Instant)",
7
7
  description: "Emit new event for each new checklist added to a board.",
8
- version: "0.0.8",
8
+ version: "0.0.10",
9
9
  type: "source",
10
10
  dedupe: "unique",
11
11
  methods: {
@@ -1,11 +1,11 @@
1
- import common from "../common-webhook.mjs";
1
+ import common from "../common/common-webhook.mjs";
2
2
 
3
3
  export default {
4
4
  ...common,
5
5
  key: "trello-new-comment-added-to-card",
6
6
  name: "New Comment Added to Card (Instant)",
7
7
  description: "Emit new event for each new comment added to a card.",
8
- version: "0.0.8",
8
+ version: "0.0.9",
9
9
  type: "source",
10
10
  dedupe: "unique",
11
11
  props: {
@@ -1,11 +1,11 @@
1
- import common from "../board-based.mjs";
1
+ import common from "../common/common-board-based.mjs";
2
2
 
3
3
  export default {
4
4
  ...common,
5
5
  key: "trello-new-label",
6
6
  name: "New Label (Instant)",
7
7
  description: "Emit new event for each new label added to a board.",
8
- version: "0.0.8",
8
+ version: "0.0.10",
9
9
  type: "source",
10
10
  dedupe: "unique",
11
11
  methods: {
@@ -1,11 +1,11 @@
1
- import common from "../common-webhook.mjs";
1
+ import common from "../common/common-webhook.mjs";
2
2
 
3
3
  export default {
4
4
  ...common,
5
5
  key: "trello-new-label-added-to-card",
6
6
  name: "New Label Added To Card (Instant)",
7
7
  description: "Emit new event for each label added to a card.",
8
- version: "0.0.8",
8
+ version: "0.0.9",
9
9
  type: "source",
10
10
  props: {
11
11
  ...common.props,
@@ -1,11 +1,11 @@
1
- import common from "../board-based.mjs";
1
+ import common from "../common/common-board-based.mjs";
2
2
 
3
3
  export default {
4
4
  ...common,
5
5
  key: "trello-new-list",
6
6
  name: "New List (Instant)",
7
7
  description: "Emit new event for each new list added to a board.",
8
- version: "0.0.8",
8
+ version: "0.0.10",
9
9
  type: "source",
10
10
  dedupe: "unique",
11
11
  methods: {
@@ -1,11 +1,11 @@
1
- import common from "../board-based.mjs";
1
+ import common from "../common/common-board-based.mjs";
2
2
 
3
3
  export default {
4
4
  ...common,
5
5
  key: "trello-new-member-on-card",
6
6
  name: "New Member on Card (Instant)",
7
- description: "Emit new event for each card joined by the authenticated Trello user.",
8
- version: "0.0.9",
7
+ description: "Emit new event for each member that join in a card.",
8
+ version: "0.0.11",
9
9
  type: "source",
10
10
  dedupe: "unique",
11
11
  methods: {
@@ -29,7 +29,9 @@ export default {
29
29
  id, name: summary, dateLastActivity,
30
30
  }) {
31
31
  return {
32
- id: `${id}${dateLastActivity}`,
32
+ id: this.onlyEventsRelatedWithAuthenticatedUser ?
33
+ id :
34
+ `${id}${dateLastActivity}`,
33
35
  summary,
34
36
  ts: Date.now(),
35
37
  };
@@ -1,4 +1,4 @@
1
- import common from "../common-polling.mjs";
1
+ import common from "../common/common-polling.mjs";
2
2
 
3
3
  export default {
4
4
  ...common,
@@ -6,7 +6,7 @@ export default {
6
6
  name: "New Notification",
7
7
  description:
8
8
  "Emit new event for each new Trello notification for the authenticated user.",
9
- version: "0.0.6",
9
+ version: "0.0.7",
10
10
  type: "source",
11
11
  dedupe: "unique",
12
12
  methods: {
@@ -1,27 +0,0 @@
1
- /* eslint-disable pipedream/required-properties-key, pipedream/required-properties-name,
2
- pipedream/required-properties-version, pipedream/required-properties-description,
3
- pipedream/required-properties-type */
4
- import base from "./common-webhook.mjs";
5
-
6
- export default {
7
- ...base,
8
- props: {
9
- ...base.props,
10
- board: {
11
- propDefinition: [
12
- base.props.trello,
13
- "board",
14
- ],
15
- },
16
- },
17
- methods: {
18
- ...base.methods,
19
- /**
20
- * Default isRelevant for components that only filter the results by a specified board.
21
- * @param {object} result - The result item obtained by the component.
22
- */
23
- isRelevant({ result }) {
24
- return !this.board || this.board === result.idBoard;
25
- },
26
- },
27
- };