@pipedream/monday 0.8.1 → 0.9.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.
@@ -6,7 +6,12 @@ export default {
6
6
  name: "Create Board",
7
7
  description: "Creates a new board. [See the documentation](https://developer.monday.com/api-reference/reference/boards#create-a-board)",
8
8
  type: "action",
9
- version: "0.0.8",
9
+ version: "0.0.11",
10
+ annotations: {
11
+ destructiveHint: false,
12
+ openWorldHint: true,
13
+ readOnlyHint: false,
14
+ },
10
15
  props: {
11
16
  monday,
12
17
  boardName: {
@@ -7,7 +7,12 @@ export default {
7
7
  name: "Create Column",
8
8
  description: "Creates a column. [See the documentation](https://developer.monday.com/api-reference/reference/columns#create-a-column)",
9
9
  type: "action",
10
- version: "0.1.0",
10
+ version: "0.1.3",
11
+ annotations: {
12
+ destructiveHint: false,
13
+ openWorldHint: true,
14
+ readOnlyHint: false,
15
+ },
11
16
  props: {
12
17
  monday,
13
18
  boardId: {
@@ -5,7 +5,12 @@ export default {
5
5
  name: "Create Group",
6
6
  description: "Creates a new group in a specific board. [See the documentation](https://developer.monday.com/api-reference/reference/groups#create-a-group)",
7
7
  type: "action",
8
- version: "0.0.9",
8
+ version: "0.0.12",
9
+ annotations: {
10
+ destructiveHint: false,
11
+ openWorldHint: true,
12
+ readOnlyHint: false,
13
+ },
9
14
  props: {
10
15
  monday,
11
16
  boardId: {
@@ -8,7 +8,12 @@ export default {
8
8
  name: "Create Item",
9
9
  description: "Creates an item. [See the documentation](https://developer.monday.com/api-reference/reference/items#create-an-item)",
10
10
  type: "action",
11
- version: "0.1.0",
11
+ version: "0.1.3",
12
+ annotations: {
13
+ destructiveHint: false,
14
+ openWorldHint: true,
15
+ readOnlyHint: false,
16
+ },
12
17
  props: {
13
18
  monday,
14
19
  boardId: {
@@ -8,7 +8,12 @@ export default {
8
8
  name: "Create Subitem",
9
9
  description: "Creates a subitem. [See the documentation](https://developer.monday.com/api-reference/reference/subitems#create-a-subitem)",
10
10
  type: "action",
11
- version: "0.1.0",
11
+ version: "0.1.3",
12
+ annotations: {
13
+ destructiveHint: false,
14
+ openWorldHint: true,
15
+ readOnlyHint: false,
16
+ },
12
17
  props: {
13
18
  monday,
14
19
  boardId: {
@@ -6,7 +6,12 @@ export default {
6
6
  name: "Create an Update",
7
7
  description: "Creates a new update. [See the documentation](https://developer.monday.com/api-reference/reference/updates#create-an-update)",
8
8
  type: "action",
9
- version: "0.0.11",
9
+ version: "0.0.14",
10
+ annotations: {
11
+ destructiveHint: true,
12
+ openWorldHint: true,
13
+ readOnlyHint: false,
14
+ },
10
15
  props: {
11
16
  monday,
12
17
  updateBody: {
@@ -0,0 +1,59 @@
1
+ import common from "../common/column-values.mjs";
2
+
3
+ export default {
4
+ ...common,
5
+ key: "monday-get-board-items-page",
6
+ name: "Get Board Items Page",
7
+ description: "Retrieves all items from a board. [See the documentation](https://developer.monday.com/api-reference/reference/items-page)",
8
+ version: "0.0.1",
9
+ annotations: {
10
+ destructiveHint: false,
11
+ openWorldHint: true,
12
+ readOnlyHint: true,
13
+ },
14
+ type: "action",
15
+ props: {
16
+ ...common.props,
17
+ },
18
+ async run({ $ }) {
19
+ const response = await this.monday.listBoardItemsPage({
20
+ boardId: +this.boardId,
21
+ });
22
+
23
+ if (response.errors) {
24
+ throw new Error(response.errors[0].message);
25
+ }
26
+
27
+ const {
28
+ data: {
29
+ boards: [
30
+ { items_page: pageItems },
31
+ ],
32
+ },
33
+ } = response;
34
+ const { items } = pageItems;
35
+ let cursor = pageItems?.cursor;
36
+ while (cursor) {
37
+ const {
38
+ data: {
39
+ boards: {
40
+ items_page: {
41
+ cursor: nextCursor, items: nextItems,
42
+ },
43
+ },
44
+ },
45
+ } = await this.monday.listBoardItemsPage({
46
+ boardId: +this.boardId,
47
+ cursor,
48
+ });
49
+ items.push(...nextItems);
50
+ cursor = nextCursor;
51
+ }
52
+
53
+ $.export("$summary", `Successfully retrieved ${items.length} item${items.length === 1
54
+ ? ""
55
+ : "s"}.`);
56
+
57
+ return items;
58
+ },
59
+ };
@@ -5,7 +5,12 @@ export default {
5
5
  key: "monday-get-column-values",
6
6
  name: "Get Column Values",
7
7
  description: "Return values of specific column(s) for a board item. [See the documentation](https://developer.monday.com/api-reference/reference/column-values-v2)",
8
- version: "0.0.6",
8
+ version: "0.0.9",
9
+ annotations: {
10
+ destructiveHint: false,
11
+ openWorldHint: true,
12
+ readOnlyHint: true,
13
+ },
9
14
  type: "action",
10
15
  props: {
11
16
  ...common.props,
@@ -6,7 +6,12 @@ export default {
6
6
  key: "monday-get-items-by-column-value",
7
7
  name: "Get Items By Column Value",
8
8
  description: "Searches a column for items matching a value. [See the documentation](https://developer.monday.com/api-reference/reference/items-page-by-column-values)",
9
- version: "0.1.0",
9
+ version: "0.1.3",
10
+ annotations: {
11
+ destructiveHint: false,
12
+ openWorldHint: true,
13
+ readOnlyHint: true,
14
+ },
10
15
  type: "action",
11
16
  props: {
12
17
  ...common.props,
@@ -1,16 +1,23 @@
1
- import common from "../common/column-values.mjs";
2
1
  import {
3
- axios, getFileStreamAndMetadata,
2
+ axios,
3
+ ConfigurationError,
4
+ getFileStreamAndMetadata,
4
5
  } from "@pipedream/platform";
5
6
  import FormData from "form-data";
6
7
  import { getColumnOptions } from "../../common/utils.mjs";
8
+ import common from "../common/column-values.mjs";
7
9
 
8
10
  export default {
9
11
  ...common,
10
12
  key: "monday-update-column-values",
11
13
  name: "Update Column Values",
12
14
  description: "Update multiple column values of an item. [See the documentation](https://developer.monday.com/api-reference/reference/columns#change-multiple-column-values)",
13
- version: "0.2.1",
15
+ version: "0.2.4",
16
+ annotations: {
17
+ destructiveHint: true,
18
+ openWorldHint: true,
19
+ readOnlyHint: false,
20
+ },
14
21
  type: "action",
15
22
  props: {
16
23
  ...common.props,
@@ -116,6 +123,10 @@ export default {
116
123
  columnValues: JSON.stringify(columnValues),
117
124
  });
118
125
 
126
+ if (response.errors) {
127
+ throw new ConfigurationError(JSON.stringify(response.errors[0]));
128
+ }
129
+
119
130
  if (response.error_message) {
120
131
  throw new Error(`${response.error_message} ${JSON.stringify(response.error_data)}`);
121
132
  }
@@ -5,7 +5,12 @@ export default {
5
5
  name: "Update Item Name",
6
6
  description: "Update an item's name. [See the documentation](https://developer.monday.com/api-reference/reference/columns#change-multiple-column-values)",
7
7
  type: "action",
8
- version: "0.0.10",
8
+ version: "0.0.13",
9
+ annotations: {
10
+ destructiveHint: true,
11
+ openWorldHint: true,
12
+ readOnlyHint: false,
13
+ },
9
14
  props: {
10
15
  monday,
11
16
  boardId: {
@@ -105,6 +105,19 @@ export default {
105
105
  }
106
106
  }
107
107
  `,
108
+ listBoardItemsPage: `
109
+ query listBoardItemsPage ($boardId: ID!, $cursor: String) {
110
+ boards (ids: [$boardId]){
111
+ items_page (cursor: $cursor) {
112
+ cursor
113
+ items {
114
+ id
115
+ name
116
+ }
117
+ }
118
+ }
119
+ }
120
+ `,
108
121
  listColumnOptions: `
109
122
  query listColumnOptions ($boardId: ID!) {
110
123
  boards (ids: [$boardId]) {
package/monday.app.mjs CHANGED
@@ -325,6 +325,14 @@ export default {
325
325
  });
326
326
  return data?.boards[0]?.columns;
327
327
  },
328
+ listBoardItemsPage(variables) {
329
+ return this.makeRequest({
330
+ query: queries.listBoardItemsPage,
331
+ options: {
332
+ variables,
333
+ },
334
+ });
335
+ },
328
336
  async listUsers(variables) {
329
337
  const { data } = await this.makeRequest({
330
338
  query: queries.listUsers,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pipedream/monday",
3
- "version": "0.8.1",
3
+ "version": "0.9.0",
4
4
  "description": "Pipedream Monday Components",
5
5
  "main": "monday.app.mjs",
6
6
  "keywords": [
@@ -6,7 +6,7 @@ export default {
6
6
  name: "Column Value Updated (Instant)",
7
7
  description: "Emit new event when a column value is updated on a board. [See the documentation](https://developer.monday.com/api-reference/reference/webhooks#sample-payload-for-webhook-events)",
8
8
  type: "source",
9
- version: "0.0.8",
9
+ version: "0.0.10",
10
10
  dedupe: "unique",
11
11
  hooks: {
12
12
  ...common.hooks,
@@ -6,7 +6,7 @@ export default {
6
6
  name: "Name Updated (Instant)",
7
7
  description: "Emit new event when an item's name is updated. [See the documentation](https://developer.monday.com/api-reference/reference/webhooks#sample-payload-for-webhook-events)",
8
8
  type: "source",
9
- version: "0.0.8",
9
+ version: "0.0.10",
10
10
  dedupe: "unique",
11
11
  hooks: {
12
12
  ...common.hooks,
@@ -6,7 +6,7 @@ export default {
6
6
  name: "New Board Created",
7
7
  description: "Emit new event when a board is created in Monday. [See the documentation](https://developer.monday.com/api-reference/reference/webhooks#sample-payload-for-webhook-events)",
8
8
  type: "source",
9
- version: "0.0.9",
9
+ version: "0.0.11",
10
10
  dedupe: "unique",
11
11
  props: {
12
12
  ...common.props,
@@ -6,7 +6,7 @@ export default {
6
6
  name: "New Item Created (Instant)",
7
7
  description: "Emit new event when a new item is added to a board. [See the documentation](https://developer.monday.com/api-reference/reference/webhooks#sample-payload-for-webhook-events)",
8
8
  type: "source",
9
- version: "0.0.8",
9
+ version: "0.0.10",
10
10
  dedupe: "unique",
11
11
  hooks: {
12
12
  ...common.hooks,
@@ -6,7 +6,7 @@ export default {
6
6
  name: "New Sub-Item Created (Instant)",
7
7
  description: "Emit new event when a sub-item is created. [See the documentation](https://developer.monday.com/api-reference/reference/webhooks#sample-payload-for-webhook-events)",
8
8
  type: "source",
9
- version: "0.0.7",
9
+ version: "0.0.9",
10
10
  dedupe: "unique",
11
11
  props: {
12
12
  ...common.props,
@@ -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. [See the documentation](https://developer.monday.com/api-reference/reference/webhooks#sample-payload-for-webhook-events)",
8
8
  type: "source",
9
- version: "0.0.7",
9
+ version: "0.0.9",
10
10
  dedupe: "unique",
11
11
  props: {
12
12
  ...common.props,
@@ -6,7 +6,7 @@ export default {
6
6
  name: "New User Created",
7
7
  description: "Emit new event when a new user is created in Monday. [See the documentation](https://developer.monday.com/api-reference/reference/webhooks#sample-payload-for-webhook-events)",
8
8
  type: "source",
9
- version: "0.0.9",
9
+ version: "0.0.11",
10
10
  dedupe: "unique",
11
11
  methods: {
12
12
  ...common.methods,
@@ -6,7 +6,7 @@ export default {
6
6
  name: "Specific Column Updated (Instant)",
7
7
  description: "Emit new event when a value in the specified column is updated. [See the documentation](https://developer.monday.com/api-reference/reference/webhooks#sample-payload-for-webhook-events)",
8
8
  type: "source",
9
- version: "0.0.8",
9
+ version: "0.0.10",
10
10
  dedupe: "unique",
11
11
  hooks: {
12
12
  ...common.hooks,
@@ -6,7 +6,7 @@ export default {
6
6
  name: "Sub-Item Column Value Updated (Instant)",
7
7
  description: "Emit new event when any sub-item column changes. [See the documentation](https://developer.monday.com/api-reference/reference/webhooks#sample-payload-for-webhook-events)",
8
8
  type: "source",
9
- version: "0.0.8",
9
+ version: "0.0.10",
10
10
  dedupe: "unique",
11
11
  props: {
12
12
  ...common.props,
@@ -6,7 +6,7 @@ export default {
6
6
  name: "Sub-Item Name Updated (Instant)",
7
7
  description: "Emit new event when a sub-item name changes. [See the documentation](https://developer.monday.com/api-reference/reference/webhooks#sample-payload-for-webhook-events)",
8
8
  type: "source",
9
- version: "0.0.7",
9
+ version: "0.0.9",
10
10
  dedupe: "unique",
11
11
  props: {
12
12
  ...common.props,