@pipedream/monday 0.3.7 → 0.3.8

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.
@@ -6,7 +6,7 @@ export default {
6
6
  name: "Create Board",
7
7
  description: "Creates a new board. [See the docs here](https://api.developer.monday.com/docs/boards#create-a-board)",
8
8
  type: "action",
9
- version: "0.0.2",
9
+ version: "0.0.3",
10
10
  props: {
11
11
  monday,
12
12
  boardName: {
@@ -6,7 +6,7 @@ export default {
6
6
  name: "Create Column",
7
7
  description: "Creates a column. [See the docs here](https://developer.monday.com/api-reference/docs/columns-queries-1)",
8
8
  type: "action",
9
- version: "0.0.2",
9
+ version: "0.0.3",
10
10
  props: {
11
11
  monday,
12
12
  boardId: {
@@ -5,7 +5,7 @@ export default {
5
5
  name: "Create Group",
6
6
  description: "Creates a new group in a specific board. [See the docs here](https://api.developer.monday.com/docs/groups-queries#create-a-group)",
7
7
  type: "action",
8
- version: "0.0.3",
8
+ version: "0.0.4",
9
9
  props: {
10
10
  monday,
11
11
  boardId: {
@@ -6,7 +6,7 @@ export default {
6
6
  name: "Create Item",
7
7
  description: "Creates an item. [See the docs here](https://api.developer.monday.com/docs/items-queries#create-an-item)",
8
8
  type: "action",
9
- version: "0.0.4",
9
+ version: "0.0.5",
10
10
  props: {
11
11
  monday,
12
12
  boardId: {
@@ -6,7 +6,7 @@ export default {
6
6
  name: "Create an Update",
7
7
  description: "Creates a new update. [See the docs here](https://api.developer.monday.com/docs/updates-queries#create-an-update)",
8
8
  type: "action",
9
- version: "0.0.4",
9
+ version: "0.0.5",
10
10
  props: {
11
11
  monday,
12
12
  updateBody: {
@@ -5,7 +5,7 @@ export default {
5
5
  name: "Update Item Name",
6
6
  description: "Update an item's name. [See the docs here](https://api.developer.monday.com/docs/item-name)",
7
7
  type: "action",
8
- version: "0.0.4",
8
+ version: "0.0.5",
9
9
  props: {
10
10
  monday,
11
11
  boardId: {
@@ -136,7 +136,13 @@ const COLUMN_TYPE_OPTIONS = [
136
136
  },
137
137
  ];
138
138
 
139
+ const BOARD_TYPE = {
140
+ BOARD: "board",
141
+ SUB_ITEMS_BOARD: "sub_items_board",
142
+ };
143
+
139
144
  export default {
140
145
  BOARD_KIND_OPTIONS,
141
146
  COLUMN_TYPE_OPTIONS,
147
+ BOARD_TYPE,
142
148
  };
package/monday.app.mjs CHANGED
@@ -303,9 +303,7 @@ export default {
303
303
 
304
304
  const { boards } = data;
305
305
  return boards
306
- .filter((board) => {
307
- return (board.type != "sub_items_board");
308
- })
306
+ .filter(({ type }) => type !== constants.BOARD_TYPE.SUB_ITEMS_BOARD)
309
307
  .map(({
310
308
  id, name,
311
309
  }) => ({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pipedream/monday",
3
- "version": "0.3.7",
3
+ "version": "0.3.8",
4
4
  "description": "Pipedream Monday Components",
5
5
  "main": "monday.app.mjs",
6
6
  "keywords": [
@@ -6,7 +6,7 @@ export default {
6
6
  name: "New Column Value Updated (Instant)",
7
7
  description: "Emit new event when a column value is updated on a board in Monday. For changes to Name, use the Name Updated Trigger.",
8
8
  type: "source",
9
- version: "0.0.2",
9
+ version: "0.0.3",
10
10
  dedupe: "unique",
11
11
  hooks: {
12
12
  ...common.hooks,
@@ -25,7 +25,7 @@ export default {
25
25
  });
26
26
  const hookId = data?.create_webhook?.id;
27
27
  if (!hookId) {
28
- throw new Error ("Failed to establish webhook");
28
+ throw new Error (this.getWebhookCreationError());
29
29
  }
30
30
  this._setHookId(data.create_webhook.id);
31
31
  },
@@ -37,6 +37,9 @@ export default {
37
37
  },
38
38
  },
39
39
  methods: {
40
+ getWebhookCreationError() {
41
+ return "Failed to establish webhook";
42
+ },
40
43
  _getHookId() {
41
44
  return this.db.get("hookId");
42
45
  },
@@ -82,11 +85,10 @@ export default {
82
85
 
83
86
  // verify the webhook
84
87
  if (body?.challenge) {
85
- await this.http.respond({
88
+ return this.http.respond({
86
89
  status: 200,
87
90
  body,
88
91
  });
89
- return;
90
92
  }
91
93
 
92
94
  const itemId = body?.event?.pulseId;
@@ -6,7 +6,7 @@ export default {
6
6
  name: "New Name Updated (Instant)",
7
7
  description: "Emit new event when an item's Name is updated on a board in Monday.",
8
8
  type: "source",
9
- version: "0.0.2",
9
+ version: "0.0.3",
10
10
  dedupe: "unique",
11
11
  hooks: {
12
12
  ...common.hooks,
@@ -6,7 +6,7 @@ export default {
6
6
  name: "New Board",
7
7
  description: "Emit new event when a new board is created in Monday.",
8
8
  type: "source",
9
- version: "0.0.3",
9
+ version: "0.0.4",
10
10
  dedupe: "unique",
11
11
  props: {
12
12
  ...common.props,
@@ -6,7 +6,7 @@ export default {
6
6
  name: "New Item (Instant)",
7
7
  description: "Emit new event when a new item is added to a board in Monday.",
8
8
  type: "source",
9
- version: "0.0.2",
9
+ version: "0.0.3",
10
10
  dedupe: "unique",
11
11
  hooks: {
12
12
  ...common.hooks,
@@ -6,7 +6,7 @@ export default {
6
6
  name: "New Sub-Item (Instant)",
7
7
  description: "Emit new event when a sub-item is created. To create this trigger, you need to have at least one subitem previously created on your board.",
8
8
  type: "source",
9
- version: "0.0.1",
9
+ version: "0.0.2",
10
10
  dedupe: "unique",
11
11
  props: {
12
12
  ...common.props,
@@ -19,6 +19,9 @@ export default {
19
19
  },
20
20
  methods: {
21
21
  ...common.methods,
22
+ getWebhookCreationError() {
23
+ return "Failed to establish webhook. To create this trigger, you need to have at least one subitem previously created on your board.";
24
+ },
22
25
  getWebhookArgs() {
23
26
  return {
24
27
  event: "create_subitem",
@@ -6,7 +6,7 @@ export default {
6
6
  name: "New Sub-Item Update (Instant)",
7
7
  description: "Emit new event when an update is posted in sub-items. To create this trigger, you need to have at least one subitem previously created on your board.",
8
8
  type: "source",
9
- version: "0.0.1",
9
+ version: "0.0.2",
10
10
  dedupe: "unique",
11
11
  props: {
12
12
  ...common.props,
@@ -19,6 +19,9 @@ export default {
19
19
  },
20
20
  methods: {
21
21
  ...common.methods,
22
+ getWebhookCreationError() {
23
+ return "Failed to establish webhook. To create this trigger, you need to have at least one subitem previously created on your board.";
24
+ },
22
25
  getWebhookArgs() {
23
26
  return {
24
27
  event: "create_subitem_update",
@@ -6,7 +6,7 @@ export default {
6
6
  name: "New User",
7
7
  description: "Emit new event when a new user is created in Monday.",
8
8
  type: "source",
9
- version: "0.0.3",
9
+ version: "0.0.4",
10
10
  dedupe: "unique",
11
11
  methods: {
12
12
  ...common.methods,
@@ -6,7 +6,7 @@ export default {
6
6
  name: "New Specific Column Updated (Instant)",
7
7
  description: "Emit new event when a value in the specified column is updated on a board in Monday. For changes to Name, use the Name Updated Trigger.",
8
8
  type: "source",
9
- version: "0.0.2",
9
+ version: "0.0.3",
10
10
  dedupe: "unique",
11
11
  hooks: {
12
12
  ...common.hooks,
@@ -6,7 +6,7 @@ export default {
6
6
  name: "New Sub-Item Column Value Updated (Instant)",
7
7
  description: "Emit new event when any sub-item column changes. To create this trigger, you need to have at least one subitem previously created on your board.",
8
8
  type: "source",
9
- version: "0.0.1",
9
+ version: "0.0.2",
10
10
  dedupe: "unique",
11
11
  props: {
12
12
  ...common.props,
@@ -19,6 +19,9 @@ export default {
19
19
  },
20
20
  methods: {
21
21
  ...common.methods,
22
+ getWebhookCreationError() {
23
+ return "Failed to establish webhook. To create this trigger, you need to have at least one subitem previously created on your board.";
24
+ },
22
25
  getWebhookArgs() {
23
26
  return {
24
27
  event: "change_subitem_column_value",
@@ -6,7 +6,7 @@ export default {
6
6
  name: "New Sub-Item Name Updated (Instant)",
7
7
  description: "Emit new event when a sub-item name changes. To create this trigger, you need to have at least one subitem previously created on your board.",
8
8
  type: "source",
9
- version: "0.0.1",
9
+ version: "0.0.2",
10
10
  dedupe: "unique",
11
11
  props: {
12
12
  ...common.props,
@@ -19,6 +19,9 @@ export default {
19
19
  },
20
20
  methods: {
21
21
  ...common.methods,
22
+ getWebhookCreationError() {
23
+ return "Failed to establish webhook. To create this trigger, you need to have at least one subitem previously created on your board.";
24
+ },
22
25
  getWebhookArgs() {
23
26
  return {
24
27
  event: "change_subitem_name",