@pipedream/google_calendar 0.5.9 → 0.5.11
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.
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import googleCalendar from "../../google_calendar.app.mjs";
|
|
2
2
|
import createEventCommon from "../common/create-event-common.mjs";
|
|
3
|
+
import { ConfigurationError } from "@pipedream/platform";
|
|
3
4
|
|
|
4
5
|
export default {
|
|
5
6
|
key: "google_calendar-quick-add-event",
|
|
6
7
|
name: "Add Quick Event",
|
|
7
8
|
description: "Create a quick event to the Google Calendar. [See the documentation](https://googleapis.dev/nodejs/googleapis/latest/calendar/classes/Resource$Events.html#quickAdd)",
|
|
8
|
-
version: "0.1.
|
|
9
|
+
version: "0.1.8",
|
|
9
10
|
type: "action",
|
|
10
11
|
props: {
|
|
11
12
|
googleCalendar,
|
|
@@ -28,6 +29,10 @@ export default {
|
|
|
28
29
|
},
|
|
29
30
|
},
|
|
30
31
|
async run({ $ }) {
|
|
32
|
+
if (!this.calendarId) {
|
|
33
|
+
throw new ConfigurationError("Calendar ID prop is missing or empty. Please provide a valid string representing the calendar's identifier. For example, 'primary' or an email address such as 'user@example.com'");
|
|
34
|
+
}
|
|
35
|
+
|
|
31
36
|
const response = await this.googleCalendar.quickAddEvent({
|
|
32
37
|
calendarId: this.calendarId,
|
|
33
38
|
text: this.text,
|
package/package.json
CHANGED
|
@@ -8,7 +8,7 @@ export default {
|
|
|
8
8
|
type: "source",
|
|
9
9
|
name: "New Created or Updated Event (Instant)",
|
|
10
10
|
description: "Emit new event when a Google Calendar events is created or updated (does not emit cancelled events)",
|
|
11
|
-
version: "0.1.
|
|
11
|
+
version: "0.1.16",
|
|
12
12
|
dedupe: "unique",
|
|
13
13
|
props: {
|
|
14
14
|
googleCalendar,
|
|
@@ -48,6 +48,7 @@ export default {
|
|
|
48
48
|
const params = {
|
|
49
49
|
maxResults: 25,
|
|
50
50
|
orderBy: "updated",
|
|
51
|
+
timeMin: new Date(new Date().setMonth(new Date().getMonth() - 1)).toISOString(), // 1 month ago
|
|
51
52
|
};
|
|
52
53
|
for (const calendarId of this.calendarIds) {
|
|
53
54
|
params.calendarId = calendarId;
|