@pipedream/google_calendar 0.3.14 → 0.3.16
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 { v4 as uuidv4 } from "uuid";
|
|
3
4
|
|
|
4
5
|
export default {
|
|
5
6
|
key: "google_calendar-create-event",
|
|
6
7
|
name: "Create Event",
|
|
7
8
|
description: "Create an event to the Google Calendar. [See the documentation](https://googleapis.dev/nodejs/googleapis/latest/calendar/classes/Resource$Events.html#insert)",
|
|
8
|
-
version: "0.1.
|
|
9
|
+
version: "0.1.7",
|
|
9
10
|
type: "action",
|
|
10
11
|
props: {
|
|
11
12
|
googleCalendar,
|
|
@@ -15,6 +16,12 @@ export default {
|
|
|
15
16
|
"calendarId",
|
|
16
17
|
],
|
|
17
18
|
},
|
|
19
|
+
createMeetRoom: {
|
|
20
|
+
label: "Create Meet Room",
|
|
21
|
+
description: "Create a Google Meet room for this event.",
|
|
22
|
+
type: "boolean",
|
|
23
|
+
optional: true,
|
|
24
|
+
},
|
|
18
25
|
...createEventCommon.props({
|
|
19
26
|
isUpdate: false,
|
|
20
27
|
}),
|
|
@@ -26,7 +33,7 @@ export default {
|
|
|
26
33
|
const timeZone = this.getTimeZone(this.timeZone);
|
|
27
34
|
const attendees = this.formatAttendees(this.attendees);
|
|
28
35
|
|
|
29
|
-
const
|
|
36
|
+
const data = {
|
|
30
37
|
calendarId: this.calendarId,
|
|
31
38
|
sendUpdates: this.sendUpdates,
|
|
32
39
|
sendNotifications: this.sendNotifications,
|
|
@@ -44,7 +51,21 @@ export default {
|
|
|
44
51
|
}),
|
|
45
52
|
attendees,
|
|
46
53
|
},
|
|
47
|
-
}
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
if (this.createMeetRoom) {
|
|
57
|
+
data.conferenceDataVersion = 1;
|
|
58
|
+
data.resource.conferenceData = {
|
|
59
|
+
createRequest: {
|
|
60
|
+
requestId: uuidv4(),
|
|
61
|
+
conferenceSolutionKey: {
|
|
62
|
+
type: "hangoutsMeet",
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
const response = await this.googleCalendar.createEvent(data);
|
|
48
69
|
|
|
49
70
|
$.export("$summary", `Successfully created event: "${response.id}"`);
|
|
50
71
|
|
package/package.json
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { v4 as uuid } from "uuid";
|
|
2
|
+
import sampleEmit from "./test-event.mjs";
|
|
2
3
|
import googleCalendar from "../../google_calendar.app.mjs";
|
|
3
4
|
import { DEFAULT_POLLING_SOURCE_TIMER_INTERVAL } from "@pipedream/platform";
|
|
4
5
|
|
|
@@ -7,7 +8,7 @@ export default {
|
|
|
7
8
|
type: "source",
|
|
8
9
|
name: "New Created or Updated Event (Instant)",
|
|
9
10
|
description: "Emit new event when a Google Calendar events is created or updated (does not emit cancelled events)",
|
|
10
|
-
version: "0.1.
|
|
11
|
+
version: "0.1.9",
|
|
11
12
|
dedupe: "unique",
|
|
12
13
|
props: {
|
|
13
14
|
googleCalendar,
|
|
@@ -290,4 +291,5 @@ export default {
|
|
|
290
291
|
this.setNextSyncToken(calendarId, nextSyncToken);
|
|
291
292
|
}
|
|
292
293
|
},
|
|
294
|
+
sampleEmit,
|
|
293
295
|
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
"kind": "calendar#meeting",
|
|
3
|
+
"etag": "\"9999999999999999\"",
|
|
4
|
+
"id": "8y34t6tbxyzp4er98bnby34gfq",
|
|
5
|
+
"status": "pending",
|
|
6
|
+
"htmlLink": "https://www.google.com/calendar/event?eid=MTFhMnMzY3BuNmI0NGVuM21tczg0NnNpc3EgbXlrZS52QHR1cmluZy5jb20",
|
|
7
|
+
"created": "2030-12-15T10:15:45.000Z",
|
|
8
|
+
"updated": "2030-12-15T10:15:45.764Z",
|
|
9
|
+
"summary": "Test Meeting 3401",
|
|
10
|
+
"creator": {
|
|
11
|
+
"email": "mike.v@turing.com",
|
|
12
|
+
"self": true
|
|
13
|
+
},
|
|
14
|
+
"organizer": {
|
|
15
|
+
"email": "mike.v@turing.com",
|
|
16
|
+
"self": true
|
|
17
|
+
},
|
|
18
|
+
"start": {
|
|
19
|
+
"dateTime": "2030-12-15T18:30:00+07:00",
|
|
20
|
+
"timeZone": "America/New_York"
|
|
21
|
+
},
|
|
22
|
+
"end": {
|
|
23
|
+
"dateTime": "2030-12-15T19:30:00+07:00",
|
|
24
|
+
"timeZone": "America/New_York"
|
|
25
|
+
},
|
|
26
|
+
"iCalUID": "8y34t6tbxyzp4er98bnby34gfq@google.com",
|
|
27
|
+
"sequence": 1,
|
|
28
|
+
"reminders": {
|
|
29
|
+
"useDefault": true
|
|
30
|
+
},
|
|
31
|
+
"eventType": "custom"
|
|
32
|
+
}
|