Skip to content

Commit 9c75ce5

Browse files
authored
Merging pull request #18714
* Implement 'Get Board Items Page' action and update version to 0.9.0 - Added a new action to retrieve items from a specified board page. - Introduced GraphQL query for fetching board items with pagination support. - Updated package version to 0.9.0. * Update action and source versions across multiple components - Bumped version numbers for various actions including Create Board, Create Column, Create Group, Create Item, Create Subitem, Create Update, Get Column Values, Get Items By Column Value, Update Column Values, and Update Item Name. - Updated version numbers for sources such as Column Value Updated, Name Updated, New Board Created, New Item Created, New Sub-Item Created, New Sub-Item Update, New User Created, Specific Column Updated, Sub-Item Column Value Updated, and Sub-Item Name Updated. * Update 'Get Board Items Page' action description for clarity - Changed the action description to specify that it retrieves all items from a board, enhancing clarity for users. Updated the documentation link accordingly. * pnpm update
1 parent 49cdc06 commit 9c75ce5

File tree

25 files changed

+113
-123
lines changed

25 files changed

+113
-123
lines changed

components/monday/actions/create-board/create-board.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export default {
66
name: "Create Board",
77
description: "Creates a new board. [See the documentation](https://developer.monday.com/api-reference/reference/boards#create-a-board)",
88
type: "action",
9-
version: "0.0.10",
9+
version: "0.0.11",
1010
annotations: {
1111
destructiveHint: false,
1212
openWorldHint: true,

components/monday/actions/create-column/create-column.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export default {
77
name: "Create Column",
88
description: "Creates a column. [See the documentation](https://developer.monday.com/api-reference/reference/columns#create-a-column)",
99
type: "action",
10-
version: "0.1.2",
10+
version: "0.1.3",
1111
annotations: {
1212
destructiveHint: false,
1313
openWorldHint: true,

components/monday/actions/create-group/create-group.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export default {
55
name: "Create Group",
66
description: "Creates a new group in a specific board. [See the documentation](https://developer.monday.com/api-reference/reference/groups#create-a-group)",
77
type: "action",
8-
version: "0.0.11",
8+
version: "0.0.12",
99
annotations: {
1010
destructiveHint: false,
1111
openWorldHint: true,

components/monday/actions/create-item/create-item.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export default {
88
name: "Create Item",
99
description: "Creates an item. [See the documentation](https://developer.monday.com/api-reference/reference/items#create-an-item)",
1010
type: "action",
11-
version: "0.1.2",
11+
version: "0.1.3",
1212
annotations: {
1313
destructiveHint: false,
1414
openWorldHint: true,

components/monday/actions/create-subitem/create-subitem.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export default {
88
name: "Create Subitem",
99
description: "Creates a subitem. [See the documentation](https://developer.monday.com/api-reference/reference/subitems#create-a-subitem)",
1010
type: "action",
11-
version: "0.1.2",
11+
version: "0.1.3",
1212
annotations: {
1313
destructiveHint: false,
1414
openWorldHint: true,

components/monday/actions/create-update/create-update.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export default {
66
name: "Create an Update",
77
description: "Creates a new update. [See the documentation](https://developer.monday.com/api-reference/reference/updates#create-an-update)",
88
type: "action",
9-
version: "0.0.13",
9+
version: "0.0.14",
1010
annotations: {
1111
destructiveHint: true,
1212
openWorldHint: true,
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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+
};

components/monday/actions/get-column-values/get-column-values.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export default {
55
key: "monday-get-column-values",
66
name: "Get Column Values",
77
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.8",
8+
version: "0.0.9",
99
annotations: {
1010
destructiveHint: false,
1111
openWorldHint: true,

components/monday/actions/get-items-by-column-value/get-items-by-column-value.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export default {
66
key: "monday-get-items-by-column-value",
77
name: "Get Items By Column Value",
88
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.2",
9+
version: "0.1.3",
1010
annotations: {
1111
destructiveHint: false,
1212
openWorldHint: true,

components/monday/actions/update-column-values/update-column-values.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export default {
1212
key: "monday-update-column-values",
1313
name: "Update Column Values",
1414
description: "Update multiple column values of an item. [See the documentation](https://developer.monday.com/api-reference/reference/columns#change-multiple-column-values)",
15-
version: "0.2.3",
15+
version: "0.2.4",
1616
annotations: {
1717
destructiveHint: true,
1818
openWorldHint: true,

0 commit comments

Comments
 (0)