@pipedream/google_calendar 0.5.4 → 0.5.6
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.
- package/actions/add-attendees-to-event/add-attendees-to-event.mjs +1 -1
- package/actions/create-event/create-event.mjs +1 -1
- package/actions/delete-event/delete-event.mjs +1 -1
- package/actions/get-calendar/get-calendar.mjs +1 -1
- package/actions/get-event/get-event.mjs +1 -1
- package/actions/list-calendars/list-calendars.mjs +1 -1
- package/actions/list-events/list-events.mjs +1 -1
- package/actions/query-free-busy-calendars/query-free-busy-calendars.mjs +1 -1
- package/actions/quick-add-event/quick-add-event.mjs +1 -1
- package/actions/update-event/update-event.mjs +1 -1
- package/google_calendar.app.mjs +28 -1
- package/package.json +1 -1
- package/sources/event-cancelled/event-cancelled.mjs +1 -1
- package/sources/event-ended/event-ended.mjs +1 -1
- package/sources/new-calendar/new-calendar.mjs +1 -1
- package/sources/new-event-search/new-event-search.mjs +1 -1
- package/sources/new-or-updated-event-instant/new-or-updated-event-instant.mjs +2 -1
- package/sources/upcoming-event-alert/upcoming-event-alert.mjs +2 -1
|
@@ -5,7 +5,7 @@ export default {
|
|
|
5
5
|
key: "google_calendar-add-attendees-to-event",
|
|
6
6
|
name: "Add Attendees To Event",
|
|
7
7
|
description: "Add attendees to an existing event. [See the documentation](https://googleapis.dev/nodejs/googleapis/latest/calendar/classes/Resource$Events.html#update)",
|
|
8
|
-
version: "0.0.
|
|
8
|
+
version: "0.0.2",
|
|
9
9
|
type: "action",
|
|
10
10
|
props: {
|
|
11
11
|
googleCalendar,
|
|
@@ -7,7 +7,7 @@ export default {
|
|
|
7
7
|
key: "google_calendar-create-event",
|
|
8
8
|
name: "Create Event",
|
|
9
9
|
description: "Create an event in a Google Calendar. [See the documentation](https://developers.google.com/calendar/api/v3/reference/events/insert)",
|
|
10
|
-
version: "0.2.
|
|
10
|
+
version: "0.2.4",
|
|
11
11
|
type: "action",
|
|
12
12
|
props: {
|
|
13
13
|
googleCalendar,
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "google_calendar-delete-event",
|
|
5
5
|
name: "Delete an Event",
|
|
6
6
|
description: "Delete an event from a Google Calendar. [See the documentation](https://googleapis.dev/nodejs/googleapis/latest/calendar/classes/Resource$Events.html#delete)",
|
|
7
|
-
version: "0.1.
|
|
7
|
+
version: "0.1.6",
|
|
8
8
|
type: "action",
|
|
9
9
|
props: {
|
|
10
10
|
googleCalendar,
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "google_calendar-get-calendar",
|
|
5
5
|
name: "Retrieve Calendar Details",
|
|
6
6
|
description: "Retrieve calendar details of a Google Calendar. [See the documentation](https://googleapis.dev/nodejs/googleapis/latest/calendar/classes/Resource$Calendars.html#get)",
|
|
7
|
-
version: "0.1.
|
|
7
|
+
version: "0.1.7",
|
|
8
8
|
type: "action",
|
|
9
9
|
props: {
|
|
10
10
|
googleCalendar,
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "google_calendar-get-event",
|
|
5
5
|
name: "Retrieve Event Details",
|
|
6
6
|
description: "Retrieve event details from Google Calendar. [See the documentation](https://googleapis.dev/nodejs/googleapis/latest/calendar/classes/Resource$Events.html#get)",
|
|
7
|
-
version: "0.1.
|
|
7
|
+
version: "0.1.7",
|
|
8
8
|
type: "action",
|
|
9
9
|
props: {
|
|
10
10
|
googleCalendar,
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "google_calendar-list-calendars",
|
|
5
5
|
name: "List Calendars",
|
|
6
6
|
description: "Retrieve a list of calendars from Google Calendar. [See the documentation](https://googleapis.dev/nodejs/googleapis/latest/calendar/classes/Resource$Calendarlist.html#list)",
|
|
7
|
-
version: "0.1.
|
|
7
|
+
version: "0.1.7",
|
|
8
8
|
type: "action",
|
|
9
9
|
props: {
|
|
10
10
|
googleCalendar,
|
|
@@ -6,7 +6,7 @@ export default {
|
|
|
6
6
|
key: "google_calendar-list-events",
|
|
7
7
|
name: "List Events",
|
|
8
8
|
description: "Retrieve a list of event from the Google Calendar. [See the documentation](https://developers.google.com/calendar/api/v3/reference/events/list)",
|
|
9
|
-
version: "0.0.
|
|
9
|
+
version: "0.0.7",
|
|
10
10
|
type: "action",
|
|
11
11
|
props: {
|
|
12
12
|
googleCalendar,
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "google_calendar-query-free-busy-calendars",
|
|
5
5
|
name: "Retrieve Free/Busy Calendar Details",
|
|
6
6
|
description: "Retrieve free/busy calendar details from Google Calendar. [See the documentation](https://googleapis.dev/nodejs/googleapis/latest/calendar/classes/Resource$Freebusy.html#query)",
|
|
7
|
-
version: "0.1.
|
|
7
|
+
version: "0.1.7",
|
|
8
8
|
type: "action",
|
|
9
9
|
props: {
|
|
10
10
|
googleCalendar,
|
|
@@ -5,7 +5,7 @@ export default {
|
|
|
5
5
|
key: "google_calendar-quick-add-event",
|
|
6
6
|
name: "Add Quick Event",
|
|
7
7
|
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.
|
|
8
|
+
version: "0.1.6",
|
|
9
9
|
type: "action",
|
|
10
10
|
props: {
|
|
11
11
|
googleCalendar,
|
|
@@ -6,7 +6,7 @@ export default {
|
|
|
6
6
|
key: "google_calendar-update-event",
|
|
7
7
|
name: "Update Event",
|
|
8
8
|
description: "Update an event from Google Calendar. [See the documentation](https://googleapis.dev/nodejs/googleapis/latest/calendar/classes/Resource$Events.html#update)",
|
|
9
|
-
version: "0.0.
|
|
9
|
+
version: "0.0.9",
|
|
10
10
|
type: "action",
|
|
11
11
|
props: {
|
|
12
12
|
googleCalendar,
|
package/google_calendar.app.mjs
CHANGED
|
@@ -296,6 +296,27 @@ export default {
|
|
|
296
296
|
auth,
|
|
297
297
|
});
|
|
298
298
|
},
|
|
299
|
+
retryWithExponentialBackoff(func, maxAttempts = 3, baseDelayS = 2) {
|
|
300
|
+
let attempt = 0;
|
|
301
|
+
|
|
302
|
+
const execute = async () => {
|
|
303
|
+
try {
|
|
304
|
+
return await func();
|
|
305
|
+
} catch (error) {
|
|
306
|
+
if (attempt >= maxAttempts) {
|
|
307
|
+
throw error;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
const delayMs = Math.pow(baseDelayS, attempt) * 1000;
|
|
311
|
+
await new Promise((resolve) => setTimeout(resolve, delayMs));
|
|
312
|
+
|
|
313
|
+
attempt++;
|
|
314
|
+
return execute();
|
|
315
|
+
}
|
|
316
|
+
};
|
|
317
|
+
|
|
318
|
+
return execute();
|
|
319
|
+
},
|
|
299
320
|
async requestHandler({
|
|
300
321
|
api, method, args = {},
|
|
301
322
|
}) {
|
|
@@ -305,7 +326,8 @@ export default {
|
|
|
305
326
|
} = args;
|
|
306
327
|
try {
|
|
307
328
|
const calendar = this.client();
|
|
308
|
-
const
|
|
329
|
+
const fn = () => calendar[api][method](otherArgs);
|
|
330
|
+
const response = await this.retryWithExponentialBackoff(fn);
|
|
309
331
|
return returnOnlyData
|
|
310
332
|
? response.data
|
|
311
333
|
: response;
|
|
@@ -454,6 +476,9 @@ export default {
|
|
|
454
476
|
args,
|
|
455
477
|
});
|
|
456
478
|
},
|
|
479
|
+
// Used to get the nextSyncToken. Since we don't need
|
|
480
|
+
// to actually retrieve any events, we set "updatedMin"
|
|
481
|
+
// to the current timestamp
|
|
457
482
|
async fullSync(calendarId) {
|
|
458
483
|
let nextSyncToken = null;
|
|
459
484
|
let nextPageToken = null;
|
|
@@ -462,6 +487,8 @@ export default {
|
|
|
462
487
|
await this.listEvents({
|
|
463
488
|
calendarId,
|
|
464
489
|
pageToken: nextPageToken,
|
|
490
|
+
orderBy: "updated",
|
|
491
|
+
updatedMin: new Date().toISOString(),
|
|
465
492
|
});
|
|
466
493
|
nextPageToken = syncResp?.nextPageToken;
|
|
467
494
|
nextSyncToken = syncResp?.nextSyncToken;
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@ export default {
|
|
|
6
6
|
key: "google_calendar-event-cancelled",
|
|
7
7
|
name: "New Cancelled Event",
|
|
8
8
|
description: "Emit new event when a Google Calendar event is cancelled or deleted",
|
|
9
|
-
version: "0.1.
|
|
9
|
+
version: "0.1.10",
|
|
10
10
|
type: "source",
|
|
11
11
|
dedupe: "unique",
|
|
12
12
|
props: {
|
|
@@ -5,7 +5,7 @@ export default {
|
|
|
5
5
|
key: "google_calendar-new-event-search",
|
|
6
6
|
name: "New Event Matching a Search",
|
|
7
7
|
description: "Emit new event when a Google Calendar event is created that matches a search",
|
|
8
|
-
version: "0.1.
|
|
8
|
+
version: "0.1.10",
|
|
9
9
|
type: "source",
|
|
10
10
|
dedupe: "unique",
|
|
11
11
|
props: {
|
|
@@ -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.13",
|
|
12
12
|
dedupe: "unique",
|
|
13
13
|
props: {
|
|
14
14
|
googleCalendar,
|
|
@@ -265,6 +265,7 @@ export default {
|
|
|
265
265
|
calendarId,
|
|
266
266
|
syncToken,
|
|
267
267
|
pageToken: nextPageToken,
|
|
268
|
+
maxResults: 2500,
|
|
268
269
|
});
|
|
269
270
|
if (syncStatus === 410) {
|
|
270
271
|
console.log("Sync token invalid, resyncing");
|
|
@@ -8,7 +8,7 @@ export default {
|
|
|
8
8
|
description: `Emit new event based on a time interval before an upcoming event in the calendar. This source uses Pipedream's Task Scheduler.
|
|
9
9
|
[See the documentation](https://pipedream.com/docs/examples/waiting-to-execute-next-step-of-workflow/#step-1-create-a-task-scheduler-event-source)
|
|
10
10
|
for more information and instructions for connecting your Pipedream account.`,
|
|
11
|
-
version: "0.0.
|
|
11
|
+
version: "0.0.9",
|
|
12
12
|
type: "source",
|
|
13
13
|
props: {
|
|
14
14
|
pipedream: taskScheduler.props.pipedream,
|
|
@@ -91,6 +91,7 @@ export default {
|
|
|
91
91
|
async getCalendarEvents() {
|
|
92
92
|
const calendarEvents = [];
|
|
93
93
|
const params = {
|
|
94
|
+
returnOnlyData: false,
|
|
94
95
|
calendarId: this.calendarId,
|
|
95
96
|
eventTypes: this.eventTypes,
|
|
96
97
|
};
|