Skip to content

Commit e281395

Browse files
authored
New Components - miro_custom_app (#17385)
* new components * pnpm-lock.yaml * versions
1 parent 14499d8 commit e281395

File tree

23 files changed

+548
-36
lines changed

23 files changed

+548
-36
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import app from "../../miro_custom_app.app.mjs";
22

33
export default {
44
name: "Create Board",
5-
version: "0.0.1",
5+
version: "0.0.2",
66
key: "miro_custom_app-create-board",
77
description: "Creates a Miro board. [See the docs](https://developers.miro.com/reference/create-board).",
88
type: "action",
Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
import common from "../common/base.mjs";
2+
3+
export default {
4+
key: "miro_custom_app-create-card-item",
5+
name: "Create Card Item",
6+
description: "Creates a card item on a Miro board. [See the documentation](https://developers.miro.com/reference/create-card-item).",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
...common.props,
11+
title: {
12+
propDefinition: [
13+
common.props.app,
14+
"cardTitle",
15+
],
16+
},
17+
assigneeId: {
18+
propDefinition: [
19+
common.props.app,
20+
"userId",
21+
(c) => ({
22+
boardId: c.boardId,
23+
}),
24+
],
25+
label: "Assignee ID",
26+
description: "The ID of the user to assign the card to",
27+
optional: true,
28+
},
29+
description: {
30+
propDefinition: [
31+
common.props.app,
32+
"cardDescription",
33+
],
34+
},
35+
dueDate: {
36+
propDefinition: [
37+
common.props.app,
38+
"dueDate",
39+
],
40+
},
41+
cardTheme: {
42+
propDefinition: [
43+
common.props.app,
44+
"cardTheme",
45+
],
46+
},
47+
x: {
48+
propDefinition: [
49+
common.props.app,
50+
"x",
51+
],
52+
optional: true,
53+
},
54+
y: {
55+
propDefinition: [
56+
common.props.app,
57+
"y",
58+
],
59+
optional: true,
60+
},
61+
height: {
62+
propDefinition: [
63+
common.props.app,
64+
"height",
65+
],
66+
},
67+
rotation: {
68+
propDefinition: [
69+
common.props.app,
70+
"rotation",
71+
],
72+
},
73+
width: {
74+
propDefinition: [
75+
common.props.app,
76+
"width",
77+
],
78+
},
79+
parent: {
80+
propDefinition: [
81+
common.props.app,
82+
"itemId",
83+
(c) => ({
84+
boardId: c.boardId,
85+
type: "frame",
86+
}),
87+
],
88+
label: "Parent ID",
89+
description: "The ID of the parent frame for the item",
90+
optional: true,
91+
},
92+
},
93+
async run({ $: step }) {
94+
const response = await this.app.createCardItem({
95+
step,
96+
boardId: this.boardId,
97+
data: {
98+
data: {
99+
title: this.title,
100+
assigneeId: this.assigneeId,
101+
description: this.description,
102+
dueDate: this.dueDate,
103+
},
104+
style: {
105+
cardTheme: this.cardTheme,
106+
},
107+
position: {
108+
x: this.x,
109+
y: this.y,
110+
},
111+
geometry: {
112+
height: this.height,
113+
rotation: this.rotation,
114+
width: this.width,
115+
},
116+
parent: {
117+
id: this.parent,
118+
},
119+
},
120+
});
121+
step.export("$summary", `Successfully created card item with ID \`${response.id}\``);
122+
return response;
123+
},
124+
};

components/miro_custom_app/actions/create-shape/create-shape.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const { app } = common.props;
44

55
export default {
66
name: "Create Shape",
7-
version: "0.0.1",
7+
version: "0.0.2",
88
key: "miro_custom_app-create-shape",
99
description: "Creates a shape on a Miro board. [See the docs](https://developers.miro.com/reference/create-shape-item).",
1010
type: "action",

components/miro_custom_app/actions/create-sticky-note/create-sticky-note.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const { app } = common.props;
55

66
export default {
77
name: "Create Sticky Note",
8-
version: "0.0.1",
8+
version: "0.0.2",
99
key: "miro_custom_app-create-sticky-note",
1010
description: "Creates a sticky note on a Miro board. [See the docs](https://developers.miro.com/reference/create-sticky-note-item).",
1111
type: "action",

components/miro_custom_app/actions/delete-board/delete-board.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import common from "../common/base.mjs";
33
export default {
44
...common,
55
name: "Delete Board",
6-
version: "0.0.1",
6+
version: "0.0.2",
77
key: "miro_custom_app-delete-board",
88
description: "Deletes a Miro board. [See the docs](https://developers.miro.com/reference/delete-board).",
99
type: "action",

components/miro_custom_app/actions/delete-item/delete-item.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const { app } = common.props;
44

55
export default {
66
name: "Delete Item",
7-
version: "0.0.1",
7+
version: "0.0.2",
88
key: "miro_custom_app-delete-item",
99
description: "Deletes an item from a Miro board. [See the docs](https://developers.miro.com/reference/delete-item).",
1010
type: "action",

components/miro_custom_app/actions/get-board/get-board.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import common from "../common/base.mjs";
33
export default {
44
...common,
55
name: "Get Board",
6-
version: "0.0.1",
6+
version: "0.0.2",
77
key: "miro_custom_app-get-board",
88
description: "Returns a Miro board. [See the docs](https://developers.miro.com/reference/get-specific-board).",
99
type: "action",

components/miro_custom_app/actions/get-items/get-items.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import utils from "../../common/utils.mjs";
44

55
export default {
66
name: "Get Items",
7-
version: "0.0.1",
7+
version: "0.0.2",
88
key: "miro_custom_app-get-items",
99
description: "Returns items on a Miro board. [See the docs](https://developers.miro.com/reference/get-items).",
1010
type: "action",

components/miro_custom_app/actions/get-specific-item/get-specific-item.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const { app } = common.props;
44

55
export default {
66
name: "Get Specific Item",
7-
version: "0.0.1",
7+
version: "0.0.2",
88
key: "miro_custom_app-get-specific-item",
99
description: "Returns a specific item on a Miro board. [See the docs](https://developers.miro.com/reference/get-specific-item).",
1010
type: "action",

components/miro_custom_app/actions/list-boards/list-boards.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import utils from "../../common/utils.mjs";
44

55
export default {
66
name: "List Boards",
7-
version: "0.0.2",
7+
version: "0.0.3",
88
key: "miro_custom_app-list-boards",
99
description: "Returns a user's Miro boards. [See the docs](https://developers.miro.com/reference/get-boards).",
1010
type: "action",

0 commit comments

Comments
 (0)