Skip to content

Commit 8c192a1

Browse files
committed
Reusing common props
1 parent 74f2de7 commit 8c192a1

File tree

7 files changed

+41
-103
lines changed

7 files changed

+41
-103
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import app from "../../basecamp.app.mjs";
2+
3+
export default {
4+
props: {
5+
app,
6+
accountId: {
7+
propDefinition: [
8+
app,
9+
"accountId",
10+
],
11+
},
12+
projectId: {
13+
propDefinition: [
14+
app,
15+
"projectId",
16+
({ accountId }) => ({
17+
accountId,
18+
}),
19+
],
20+
},
21+
},
22+
};

components/basecamp/actions/create-campfire-chatbot-message/create-campfire-chatbot-message.mjs

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,14 @@
11
import app from "../../basecamp.app.mjs";
2+
import common from "../common/common.mjs";
23

34
export default {
45
key: "basecamp-create-campfire-chatbot-message",
56
name: "Create Campfire Chatbot Message",
67
description: "Creates a line in the Campfire for a Basecamp Chatbot. [See the documentation](https://github.com/basecamp/bc3-api/blob/master/sections/chatbots.md#create-a-line)",
78
type: "action",
8-
version: "0.0.3",
9+
version: "0.0.4",
910
props: {
10-
app,
11-
accountId: {
12-
propDefinition: [
13-
app,
14-
"accountId",
15-
],
16-
},
17-
projectId: {
18-
propDefinition: [
19-
app,
20-
"projectId",
21-
({ accountId }) => ({
22-
accountId,
23-
}),
24-
],
25-
},
11+
...common.props,
2612
campfireId: {
2713
propDefinition: [
2814
app,

components/basecamp/actions/create-campfire-message/create-campfire-message.mjs

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,14 @@
11
import app from "../../basecamp.app.mjs";
2+
import common from "../common/common.mjs";
23

34
export default {
45
key: "basecamp-create-campfire-message",
56
name: "Create Campfire Message",
67
description: "Creates a line in the Campfire for the selected project. [See the docs here](https://github.com/basecamp/bc3-api/blob/master/sections/campfires.md#create-a-campfire-line)",
78
type: "action",
8-
version: "0.0.7",
9+
version: "0.0.8",
910
props: {
10-
app,
11-
accountId: {
12-
propDefinition: [
13-
app,
14-
"accountId",
15-
],
16-
},
17-
projectId: {
18-
propDefinition: [
19-
app,
20-
"projectId",
21-
({ accountId }) => ({
22-
accountId,
23-
}),
24-
],
25-
},
11+
...common.props,
2612
campfireId: {
2713
propDefinition: [
2814
app,

components/basecamp/actions/create-card/create-card.mjs

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,14 @@
11
import app from "../../basecamp.app.mjs";
2+
import common from "../common/common.mjs";
23

34
export default {
45
key: "basecamp-create-card",
56
name: "Create a Card",
67
description: "Creates a card in a selected column. [See the documentation](https://github.com/basecamp/bc3-api/blob/master/sections/card_table_cards.md#create-a-card)",
78
type: "action",
8-
version: "0.1.0",
9+
version: "0.1.1",
910
props: {
10-
app,
11-
accountId: {
12-
propDefinition: [
13-
app,
14-
"accountId",
15-
],
16-
},
17-
projectId: {
18-
propDefinition: [
19-
app,
20-
"projectId",
21-
({ accountId }) => ({
22-
accountId,
23-
}),
24-
],
25-
},
11+
...common.props,
2612
cardTableId: {
2713
propDefinition: [
2814
app,

components/basecamp/actions/create-comment/create-comment.mjs

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,14 @@
11
import app from "../../basecamp.app.mjs";
2+
import common from "../common/common.mjs";
23

34
export default {
45
key: "basecamp-create-comment",
56
name: "Create a Comment",
6-
description: "Publishes a comment to the select recording. [See the docs here](https://github.com/basecamp/bc3-api/blob/master/sections/comments.md#create-a-comment)",
7+
description: "Publishes a comment to the select recording. [See the documentation](https://github.com/basecamp/bc3-api/blob/master/sections/comments.md#create-a-comment)",
78
type: "action",
8-
version: "0.0.7",
9+
version: "0.0.8",
910
props: {
10-
app,
11-
accountId: {
12-
propDefinition: [
13-
app,
14-
"accountId",
15-
],
16-
},
17-
projectId: {
18-
propDefinition: [
19-
app,
20-
"projectId",
21-
({ accountId }) => ({
22-
accountId,
23-
}),
24-
],
25-
},
11+
...common.props,
2612
recordingType: {
2713
propDefinition: [
2814
app,

components/basecamp/actions/create-message/create-message.mjs

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,14 @@
11
import app from "../../basecamp.app.mjs";
2+
import common from "../common/common.mjs";
23

34
export default {
45
key: "basecamp-create-message",
56
name: "Create Message",
67
description: "Publishes a message in the project and message board selected. [See the docs here](https://github.com/basecamp/bc3-api/blob/master/sections/messages.md#create-a-message)",
78
type: "action",
8-
version: "0.0.7",
9+
version: "0.0.8",
910
props: {
10-
app,
11-
accountId: {
12-
propDefinition: [
13-
app,
14-
"accountId",
15-
],
16-
},
17-
projectId: {
18-
propDefinition: [
19-
app,
20-
"projectId",
21-
({ accountId }) => ({
22-
accountId,
23-
}),
24-
],
25-
},
11+
...common.props,
2612
messageBoardId: {
2713
propDefinition: [
2814
app,

components/basecamp/actions/create-todo-item/create-todo-item.mjs

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,14 @@
11
import app from "../../basecamp.app.mjs";
2+
import common from "../common/common.mjs";
23

34
export default {
45
key: "basecamp-create-todo-item",
56
name: "Create Todo Item",
67
description: "Creates a todo in the project and message board selected. [See the docs here](https://github.com/basecamp/bc3-api/blob/master/sections/todos.md#create-a-to-do)",
78
type: "action",
8-
version: "0.0.7",
9+
version: "0.0.8",
910
props: {
10-
app,
11-
accountId: {
12-
propDefinition: [
13-
app,
14-
"accountId",
15-
],
16-
},
17-
projectId: {
18-
propDefinition: [
19-
app,
20-
"projectId",
21-
({ accountId }) => ({
22-
accountId,
23-
}),
24-
],
25-
},
11+
...common.props,
2612
todoSetId: {
2713
propDefinition: [
2814
app,

0 commit comments

Comments
 (0)