@pipedream/monday 0.3.8 → 0.3.9

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,7 @@ export default {
6
6
  name: "Create Item",
7
7
  description: "Creates an item. [See the docs here](https://api.developer.monday.com/docs/items-queries#create-an-item)",
8
8
  type: "action",
9
- version: "0.0.5",
9
+ version: "0.0.6",
10
10
  props: {
11
11
  monday,
12
12
  boardId: {
@@ -63,7 +63,7 @@ export default {
63
63
  } else if (column === "date4") {
64
64
  description = "Enter date of item in YYYY-MM-DD format. Eg. `2022-09-02`";
65
65
  } else {
66
- description = `Value for column ${column}`;
66
+ description = `Value for column ${column}. See the [Column Type Reference](https://developer.monday.com/api-reference/docs/column-types-reference) to learn more about entering column type values.`;
67
67
  }
68
68
  props[column] = {
69
69
  type: "string",
@@ -73,10 +73,30 @@ export default {
73
73
  }
74
74
  return props;
75
75
  },
76
+ methods: {
77
+ getEmailValue(value) {
78
+ let email = value;
79
+ if (typeof value === "string") {
80
+ try {
81
+ email = JSON.parse(value);
82
+ } catch {
83
+ email = {
84
+ text: value,
85
+ email: value,
86
+ };
87
+ }
88
+ }
89
+ return email;
90
+ },
91
+ },
76
92
  async run({ $ }) {
77
93
  const columnValues = {};
78
94
  if (this.columns?.length > 0) {
79
95
  for (const column of this.columns) {
96
+ if (column === "email") {
97
+ columnValues[column] = this.getEmailValue(this[column]);
98
+ continue;
99
+ }
80
100
  columnValues[column] = this[column];
81
101
  }
82
102
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pipedream/monday",
3
- "version": "0.3.8",
3
+ "version": "0.3.9",
4
4
  "description": "Pipedream Monday Components",
5
5
  "main": "monday.app.mjs",
6
6
  "keywords": [