Skip to content

Commit f1c86b7

Browse files
committed
Merge branch 'master' into connect-react-preview
2 parents c64f35d + cd85641 commit f1c86b7

File tree

27 files changed

+506
-34
lines changed

27 files changed

+506
-34
lines changed

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

+30-9
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ import monday from "../../monday.app.mjs";
44
export default {
55
key: "monday-create-column",
66
name: "Create Column",
7-
description: "Creates a column. [See the documentation](https://developer.monday.com/api-reference/docs/columns-queries-1)",
7+
description: "Creates a column. [See the documentation](https://developer.monday.com/api-reference/reference/columns#create-a-column)",
88
type: "action",
9-
version: "0.0.7",
9+
version: "0.0.8",
1010
props: {
1111
monday,
1212
boardId: {
@@ -25,12 +25,7 @@ export default {
2525
label: "Column Type",
2626
description: "The new column's title",
2727
options: constants.COLUMN_TYPE_OPTIONS,
28-
},
29-
defaults: {
30-
type: "object",
31-
label: "Defaults",
32-
description: "The new column's defaults.",
33-
optional: true,
28+
reloadProps: true,
3429
},
3530
description: {
3631
type: "string",
@@ -39,6 +34,28 @@ export default {
3934
optional: true,
4035
},
4136
},
37+
async additionalProps() {
38+
const props = {};
39+
const defaults = {
40+
type: "string",
41+
label: "Defaults",
42+
description: "The new column's defaults. For use with column types `status` or `dropdown`. [See the documentation](https://developer.monday.com/api-reference/reference/columns#create-a-status-or-dropdown-column-with-custom-labels) for additional information.",
43+
optional: true,
44+
};
45+
if (this.columnType === "status") {
46+
props.defaults = {
47+
...defaults,
48+
default: "{\"labels\":{\"1\":\"Option1\",\"2\":\"Option2\",\"3\":\"Option3\",\"4\": \"Option4\"}}",
49+
};
50+
}
51+
if (this.columnType === "dropdown") {
52+
props.defaults = {
53+
...defaults,
54+
default: "{\"settings\":{\"labels\":[{\"id\":1,\"name\":\"Option1\"}, {\"id\":2,\"name\":\"Option2\"}, {\"id\":3,\"name\":\"Option3\"}]}}",
55+
};
56+
}
57+
return props;
58+
},
4259
async run({ $ }) {
4360
const {
4461
data,
@@ -49,7 +66,11 @@ export default {
4966
boardId: +this.boardId,
5067
title: this.title,
5168
columnType: this.columnType,
52-
defaults: this.defaults,
69+
defaults: this.defaults
70+
? typeof this.defaults !== "string"
71+
? JSON.stringify(this.defaults)
72+
: this.defaults
73+
: undefined,
5374
description: this.description,
5475
});
5576

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

+2-9
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ export default {
66
...commonCreateItem,
77
key: "monday-create-subitem",
88
name: "Create Subitem",
9-
description: "Creates a subitem. [See the documentation](https://developer.monday.com/api-reference/docs/introduction-to-graphql#mondaycom-schema)",
9+
description: "Creates a subitem. [See the documentation](https://developer.monday.com/api-reference/reference/subitems#create-a-subitem)",
1010
type: "action",
11-
version: "0.0.2",
11+
version: "0.0.3",
1212
props: {
1313
monday,
1414
boardId: {
@@ -35,12 +35,6 @@ export default {
3535
],
3636
description: "The new subitem's name",
3737
},
38-
createLabels: {
39-
propDefinition: [
40-
monday,
41-
"itemCreateLabels",
42-
],
43-
},
4438
...commonCreateItem.props,
4539
},
4640
methods: {
@@ -50,7 +44,6 @@ export default {
5044
parentItemId: utils.emptyStrToUndefined(this.parentItemId),
5145
itemName: utils.emptyStrToUndefined(this.itemName),
5246
columnValues: utils.strinfied(columnValues),
53-
createLabels: utils.emptyStrToUndefined(this.createLabels),
5447
});
5548
},
5649
getItemId(data) {

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ import monday from "../../monday.app.mjs";
44
export default {
55
key: "monday-create-update",
66
name: "Create an Update",
7-
description: "Creates a new update. [See the documentation](https://api.developer.monday.com/docs/updates-queries#create-an-update)",
7+
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.9",
9+
version: "0.0.10",
1010
props: {
1111
monday,
1212
updateBody: {

components/monday/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pipedream/monday",
3-
"version": "0.6.2",
3+
"version": "0.6.3",
44
"description": "Pipedream Monday Components",
55
"main": "monday.app.mjs",
66
"keywords": [
@@ -14,7 +14,7 @@
1414
"access": "public"
1515
},
1616
"dependencies": {
17-
"@pipedream/platform": "^1.6.0",
17+
"@pipedream/platform": "^3.0.3",
1818
"form-data": "^4.0.0",
1919
"lodash.flatmap": "^4.5.0",
2020
"lodash.map": "^4.6.0",
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import app from "../../monday_oauth.app.mjs";
2+
import common from "../../../monday/actions/create-board/create-board.mjs";
3+
4+
import { adjustPropDefinitions } from "../../common/utils.mjs";
5+
6+
const {
7+
name, description, type, ...others
8+
} = common;
9+
const props = adjustPropDefinitions(others.props, app);
10+
11+
export default {
12+
...others,
13+
key: "monday_oauth-create-board",
14+
version: "0.0.1",
15+
name,
16+
description,
17+
type,
18+
props: {
19+
monday: app,
20+
...props,
21+
},
22+
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import app from "../../monday_oauth.app.mjs";
2+
import common from "../../../monday/actions/create-column/create-column.mjs";
3+
4+
import { adjustPropDefinitions } from "../../common/utils.mjs";
5+
6+
const {
7+
name, description, type, ...others
8+
} = common;
9+
const props = adjustPropDefinitions(others.props, app);
10+
11+
export default {
12+
...others,
13+
key: "monday_oauth-create-column",
14+
version: "0.0.1",
15+
name,
16+
description,
17+
type,
18+
props: {
19+
monday: app,
20+
...props,
21+
},
22+
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import app from "../../monday_oauth.app.mjs";
2+
import common from "../../../monday/actions/create-group/create-group.mjs";
3+
4+
import { adjustPropDefinitions } from "../../common/utils.mjs";
5+
6+
const {
7+
name, description, type, ...others
8+
} = common;
9+
const props = adjustPropDefinitions(others.props, app);
10+
11+
export default {
12+
...others,
13+
key: "monday_oauth-create-group",
14+
version: "0.0.1",
15+
name,
16+
description,
17+
type,
18+
props: {
19+
monday: app,
20+
...props,
21+
},
22+
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import app from "../../monday_oauth.app.mjs";
2+
import common from "../../../monday/actions/create-item/create-item.mjs";
3+
4+
import { adjustPropDefinitions } from "../../common/utils.mjs";
5+
6+
const {
7+
name, description, type, ...others
8+
} = common;
9+
const props = adjustPropDefinitions(others.props, app);
10+
11+
export default {
12+
...others,
13+
key: "monday_oauth-create-item",
14+
version: "0.0.1",
15+
name,
16+
description,
17+
type,
18+
props: {
19+
monday: app,
20+
...props,
21+
},
22+
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import app from "../../monday_oauth.app.mjs";
2+
import common from "../../../monday/actions/create-subitem/create-subitem.mjs";
3+
4+
import { adjustPropDefinitions } from "../../common/utils.mjs";
5+
6+
const {
7+
name, description, type, ...others
8+
} = common;
9+
const props = adjustPropDefinitions(others.props, app);
10+
11+
export default {
12+
...others,
13+
key: "monday_oauth-create-subitem",
14+
version: "0.0.1",
15+
name,
16+
description,
17+
type,
18+
props: {
19+
monday: app,
20+
...props,
21+
},
22+
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import app from "../../monday_oauth.app.mjs";
2+
import common from "../../../monday/actions/create-update/create-update.mjs";
3+
4+
import { adjustPropDefinitions } from "../../common/utils.mjs";
5+
6+
const {
7+
name, description, type, ...others
8+
} = common;
9+
const props = adjustPropDefinitions(others.props, app);
10+
11+
export default {
12+
...others,
13+
key: "monday_oauth-create-update",
14+
version: "0.0.1",
15+
name,
16+
description,
17+
type,
18+
props: {
19+
monday: app,
20+
...props,
21+
},
22+
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import app from "../../monday_oauth.app.mjs";
2+
import common from "../../../monday/actions/get-column-values/get-column-values.mjs";
3+
4+
import { adjustPropDefinitions } from "../../common/utils.mjs";
5+
6+
const {
7+
name, description, type, ...others
8+
} = common;
9+
const props = adjustPropDefinitions(others.props, app);
10+
11+
export default {
12+
...others,
13+
key: "monday_oauth-get-column-values",
14+
version: "0.0.1",
15+
name,
16+
description,
17+
type,
18+
props: {
19+
monday: app,
20+
...props,
21+
},
22+
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import app from "../../monday_oauth.app.mjs";
2+
import common from "../../../monday/actions/get-items-by-column-value/get-items-by-column-value.mjs";
3+
4+
import { adjustPropDefinitions } from "../../common/utils.mjs";
5+
6+
const {
7+
name, description, type, ...others
8+
} = common;
9+
const props = adjustPropDefinitions(others.props, app);
10+
11+
export default {
12+
...others,
13+
key: "monday_oauth-get-items-by-column-value",
14+
version: "0.0.1",
15+
name,
16+
description,
17+
type,
18+
props: {
19+
monday: app,
20+
...props,
21+
},
22+
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import app from "../../monday_oauth.app.mjs";
2+
import common from "../../../monday/actions/update-column-values/update-column-values.mjs";
3+
4+
import { adjustPropDefinitions } from "../../common/utils.mjs";
5+
6+
const {
7+
name, description, type, ...others
8+
} = common;
9+
const props = adjustPropDefinitions(others.props, app);
10+
11+
export default {
12+
...others,
13+
key: "monday_oauth-update-column-values",
14+
version: "0.0.1",
15+
name,
16+
description,
17+
type,
18+
props: {
19+
monday: app,
20+
...props,
21+
},
22+
};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import app from "../../monday_oauth.app.mjs";
2+
import common from "../../../monday/actions/update-item-name/update-item-name.mjs";
3+
4+
import { adjustPropDefinitions } from "../../common/utils.mjs";
5+
6+
const {
7+
name, description, type, ...others
8+
} = common;
9+
const props = adjustPropDefinitions(others.props, app);
10+
11+
export default {
12+
...others,
13+
key: "monday_oauth-update-item-name",
14+
version: "0.0.1",
15+
name,
16+
description,
17+
type,
18+
props: {
19+
monday: app,
20+
...props,
21+
},
22+
};

0 commit comments

Comments
 (0)