@pipedream/google_calendar 0.5.7 → 0.5.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.
@@ -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.2",
8
+ version: "0.0.3",
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.4",
10
+ version: "0.2.6",
11
11
  type: "action",
12
12
  props: {
13
13
  googleCalendar,
@@ -144,14 +144,24 @@ export default {
144
144
  summary: this.summary,
145
145
  location: this.location,
146
146
  description: this.description,
147
- start: this.getDateParam({
148
- date: this.eventStartDate,
147
+ start: {
148
+ date: this.eventStartDate?.length <= 10
149
+ ? this.eventStartDate
150
+ : undefined,
151
+ dateTime: this.eventStartDate?.length > 10
152
+ ? this.eventStartDate
153
+ : undefined,
149
154
  timeZone,
150
- }),
151
- end: this.getDateParam({
152
- date: this.eventEndDate,
155
+ },
156
+ end: {
157
+ date: this.eventEndDate?.length <= 10
158
+ ? this.eventEndDate
159
+ : undefined,
160
+ dateTime: this.eventEndDate?.length > 10
161
+ ? this.eventEndDate
162
+ : undefined,
153
163
  timeZone,
154
- }),
164
+ },
155
165
  recurrence,
156
166
  attendees,
157
167
  colorId: this.colorId,
@@ -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.6",
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-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",
7
+ version: "0.1.8",
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",
7
+ version: "0.1.8",
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",
7
+ version: "0.1.8",
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.7",
9
+ version: "0.0.8",
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",
7
+ version: "0.1.8",
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.6",
8
+ version: "0.1.7",
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",
9
+ version: "0.0.10",
10
10
  type: "action",
11
11
  props: {
12
12
  googleCalendar,
@@ -85,7 +85,12 @@ const REPEAT_FREQUENCIES = {
85
85
  YEARLY: "year",
86
86
  };
87
87
 
88
+ const WEBHOOK_SUBSCRIPTION_EXPIRATION_TIME_MILLISECONDS = 24 * 60 * 60 * 1000;
89
+ const WEBHOOK_SUBSCRIPTION_RENEWAL_SECONDS =
90
+ (WEBHOOK_SUBSCRIPTION_EXPIRATION_TIME_MILLISECONDS * 0.95) / 1000;
91
+
88
92
  export default {
89
93
  API,
90
94
  REPEAT_FREQUENCIES,
95
+ WEBHOOK_SUBSCRIPTION_RENEWAL_SECONDS,
91
96
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pipedream/google_calendar",
3
- "version": "0.5.7",
3
+ "version": "0.5.9",
4
4
  "description": "Pipedream Google_calendar Components",
5
5
  "main": "google_calendar.app.mjs",
6
6
  "keywords": [
@@ -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.10",
9
+ version: "0.1.11",
10
10
  type: "source",
11
11
  dedupe: "unique",
12
12
  props: {
@@ -6,7 +6,7 @@ export default {
6
6
  key: "google_calendar-event-ended",
7
7
  name: "New Ended Event",
8
8
  description: "Emit new event when a Google Calendar event ends",
9
- version: "0.1.10",
9
+ version: "0.1.11",
10
10
  type: "source",
11
11
  dedupe: "unique",
12
12
  props: {
@@ -5,7 +5,7 @@ export default {
5
5
  key: "google_calendar-new-calendar",
6
6
  name: "New Calendar Created",
7
7
  description: "Emit new event when a calendar is created.",
8
- version: "0.1.10",
8
+ version: "0.1.11",
9
9
  type: "source",
10
10
  dedupe: "unique",
11
11
  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.10",
8
+ version: "0.1.11",
9
9
  type: "source",
10
10
  dedupe: "unique",
11
11
  props: {
@@ -1,14 +1,14 @@
1
1
  import { v4 as uuid } from "uuid";
2
2
  import sampleEmit from "./test-event.mjs";
3
3
  import googleCalendar from "../../google_calendar.app.mjs";
4
- import { DEFAULT_POLLING_SOURCE_TIMER_INTERVAL } from "@pipedream/platform";
4
+ import constants from "../../common/constants.mjs";
5
5
 
6
6
  export default {
7
7
  key: "google_calendar-new-or-updated-event-instant",
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.14",
11
+ version: "0.1.15",
12
12
  dedupe: "unique",
13
13
  props: {
14
14
  googleCalendar,
@@ -38,7 +38,7 @@ export default {
38
38
  description: "The Google Calendar API requires occasional renewal of push notification subscriptions. **This runs in the background, so you should not need to modify this schedule**.",
39
39
  type: "$.interface.timer",
40
40
  static: {
41
- intervalSeconds: DEFAULT_POLLING_SOURCE_TIMER_INTERVAL,
41
+ intervalSeconds: constants.WEBHOOK_SUBSCRIPTION_RENEWAL_SECONDS,
42
42
  },
43
43
  },
44
44
  },
@@ -66,7 +66,11 @@ export default {
66
66
  await this.makeWatchRequest();
67
67
  },
68
68
  async deactivate() {
69
- await this.stopWatchRequest();
69
+ try {
70
+ await this.stopWatchRequest();
71
+ } catch (e) {
72
+ console.log(`Error deactivating webhook. ${e}`);
73
+ }
70
74
  },
71
75
  },
72
76
  methods: {
@@ -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.9",
11
+ version: "0.0.10",
12
12
  type: "source",
13
13
  props: {
14
14
  pipedream: taskScheduler.props.pipedream,