diff --git a/components/google_calendar/actions/add-attendees-to-event/add-attendees-to-event.mjs b/components/google_calendar/actions/add-attendees-to-event/add-attendees-to-event.mjs index 7c4e455c853c3..e6353d9c822a1 100644 --- a/components/google_calendar/actions/add-attendees-to-event/add-attendees-to-event.mjs +++ b/components/google_calendar/actions/add-attendees-to-event/add-attendees-to-event.mjs @@ -5,7 +5,7 @@ export default { key: "google_calendar-add-attendees-to-event", name: "Add Attendees To Event", description: "Add attendees to an existing event. [See the documentation](https://googleapis.dev/nodejs/googleapis/latest/calendar/classes/Resource$Events.html#update)", - version: "0.0.2", + version: "0.0.3", type: "action", props: { googleCalendar, diff --git a/components/google_calendar/actions/create-event/create-event.mjs b/components/google_calendar/actions/create-event/create-event.mjs index 6470edf1f05e0..5339d76c08e3f 100644 --- a/components/google_calendar/actions/create-event/create-event.mjs +++ b/components/google_calendar/actions/create-event/create-event.mjs @@ -7,7 +7,7 @@ export default { key: "google_calendar-create-event", name: "Create Event", description: "Create an event in a Google Calendar. [See the documentation](https://developers.google.com/calendar/api/v3/reference/events/insert)", - version: "0.2.4", + version: "0.2.5", type: "action", props: { googleCalendar, diff --git a/components/google_calendar/actions/delete-event/delete-event.mjs b/components/google_calendar/actions/delete-event/delete-event.mjs index c5887e5f79205..09422178480b8 100644 --- a/components/google_calendar/actions/delete-event/delete-event.mjs +++ b/components/google_calendar/actions/delete-event/delete-event.mjs @@ -4,7 +4,7 @@ export default { key: "google_calendar-delete-event", name: "Delete an Event", description: "Delete an event from a Google Calendar. [See the documentation](https://googleapis.dev/nodejs/googleapis/latest/calendar/classes/Resource$Events.html#delete)", - version: "0.1.6", + version: "0.1.7", type: "action", props: { googleCalendar, diff --git a/components/google_calendar/actions/get-calendar/get-calendar.mjs b/components/google_calendar/actions/get-calendar/get-calendar.mjs index 76c70d6596fb5..299e28b41b9ee 100644 --- a/components/google_calendar/actions/get-calendar/get-calendar.mjs +++ b/components/google_calendar/actions/get-calendar/get-calendar.mjs @@ -4,7 +4,7 @@ export default { key: "google_calendar-get-calendar", name: "Retrieve Calendar Details", description: "Retrieve calendar details of a Google Calendar. [See the documentation](https://googleapis.dev/nodejs/googleapis/latest/calendar/classes/Resource$Calendars.html#get)", - version: "0.1.7", + version: "0.1.8", type: "action", props: { googleCalendar, diff --git a/components/google_calendar/actions/get-event/get-event.mjs b/components/google_calendar/actions/get-event/get-event.mjs index 6c944d0d7af1e..c0cf52970332d 100644 --- a/components/google_calendar/actions/get-event/get-event.mjs +++ b/components/google_calendar/actions/get-event/get-event.mjs @@ -4,7 +4,7 @@ export default { key: "google_calendar-get-event", name: "Retrieve Event Details", description: "Retrieve event details from Google Calendar. [See the documentation](https://googleapis.dev/nodejs/googleapis/latest/calendar/classes/Resource$Events.html#get)", - version: "0.1.7", + version: "0.1.8", type: "action", props: { googleCalendar, diff --git a/components/google_calendar/actions/list-calendars/list-calendars.mjs b/components/google_calendar/actions/list-calendars/list-calendars.mjs index c9e07b17073d7..587bba366e1a6 100644 --- a/components/google_calendar/actions/list-calendars/list-calendars.mjs +++ b/components/google_calendar/actions/list-calendars/list-calendars.mjs @@ -4,7 +4,7 @@ export default { key: "google_calendar-list-calendars", name: "List Calendars", description: "Retrieve a list of calendars from Google Calendar. [See the documentation](https://googleapis.dev/nodejs/googleapis/latest/calendar/classes/Resource$Calendarlist.html#list)", - version: "0.1.7", + version: "0.1.8", type: "action", props: { googleCalendar, diff --git a/components/google_calendar/actions/list-events/list-events.mjs b/components/google_calendar/actions/list-events/list-events.mjs index 6c1796aebd35e..f7d341baa223f 100644 --- a/components/google_calendar/actions/list-events/list-events.mjs +++ b/components/google_calendar/actions/list-events/list-events.mjs @@ -6,7 +6,7 @@ export default { key: "google_calendar-list-events", name: "List Events", description: "Retrieve a list of event from the Google Calendar. [See the documentation](https://developers.google.com/calendar/api/v3/reference/events/list)", - version: "0.0.7", + version: "0.0.8", type: "action", props: { googleCalendar, diff --git a/components/google_calendar/actions/query-free-busy-calendars/query-free-busy-calendars.mjs b/components/google_calendar/actions/query-free-busy-calendars/query-free-busy-calendars.mjs index 5ecdfddc5244f..17200b38ffc71 100644 --- a/components/google_calendar/actions/query-free-busy-calendars/query-free-busy-calendars.mjs +++ b/components/google_calendar/actions/query-free-busy-calendars/query-free-busy-calendars.mjs @@ -4,7 +4,7 @@ export default { key: "google_calendar-query-free-busy-calendars", name: "Retrieve Free/Busy Calendar Details", description: "Retrieve free/busy calendar details from Google Calendar. [See the documentation](https://googleapis.dev/nodejs/googleapis/latest/calendar/classes/Resource$Freebusy.html#query)", - version: "0.1.7", + version: "0.1.8", type: "action", props: { googleCalendar, diff --git a/components/google_calendar/actions/quick-add-event/quick-add-event.mjs b/components/google_calendar/actions/quick-add-event/quick-add-event.mjs index bdacef99c7e2b..61ca10131f42f 100644 --- a/components/google_calendar/actions/quick-add-event/quick-add-event.mjs +++ b/components/google_calendar/actions/quick-add-event/quick-add-event.mjs @@ -5,7 +5,7 @@ export default { key: "google_calendar-quick-add-event", name: "Add Quick Event", description: "Create a quick event to the Google Calendar. [See the documentation](https://googleapis.dev/nodejs/googleapis/latest/calendar/classes/Resource$Events.html#quickAdd)", - version: "0.1.6", + version: "0.1.7", type: "action", props: { googleCalendar, diff --git a/components/google_calendar/actions/update-event/update-event.mjs b/components/google_calendar/actions/update-event/update-event.mjs index b8583faa1f5a1..3f08018e6cb57 100644 --- a/components/google_calendar/actions/update-event/update-event.mjs +++ b/components/google_calendar/actions/update-event/update-event.mjs @@ -6,7 +6,7 @@ export default { key: "google_calendar-update-event", name: "Update Event", description: "Update an event from Google Calendar. [See the documentation](https://googleapis.dev/nodejs/googleapis/latest/calendar/classes/Resource$Events.html#update)", - version: "0.0.9", + version: "0.0.10", type: "action", props: { googleCalendar, diff --git a/components/google_calendar/common/constants.mjs b/components/google_calendar/common/constants.mjs index 4cf4e1e5d0c79..10c62b04093ce 100644 --- a/components/google_calendar/common/constants.mjs +++ b/components/google_calendar/common/constants.mjs @@ -85,7 +85,12 @@ const REPEAT_FREQUENCIES = { YEARLY: "year", }; +const WEBHOOK_SUBSCRIPTION_EXPIRATION_TIME_MILLISECONDS = 24 * 60 * 60 * 1000; +const WEBHOOK_SUBSCRIPTION_RENEWAL_SECONDS = + (WEBHOOK_SUBSCRIPTION_EXPIRATION_TIME_MILLISECONDS * 0.95) / 1000; + export default { API, REPEAT_FREQUENCIES, + WEBHOOK_SUBSCRIPTION_RENEWAL_SECONDS, }; diff --git a/components/google_calendar/package.json b/components/google_calendar/package.json index c63b99a82c8be..204ac83591865 100644 --- a/components/google_calendar/package.json +++ b/components/google_calendar/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/google_calendar", - "version": "0.5.7", + "version": "0.5.8", "description": "Pipedream Google_calendar Components", "main": "google_calendar.app.mjs", "keywords": [ diff --git a/components/google_calendar/sources/event-cancelled/event-cancelled.mjs b/components/google_calendar/sources/event-cancelled/event-cancelled.mjs index 2793f18236110..fd27de11d96b2 100644 --- a/components/google_calendar/sources/event-cancelled/event-cancelled.mjs +++ b/components/google_calendar/sources/event-cancelled/event-cancelled.mjs @@ -6,7 +6,7 @@ export default { key: "google_calendar-event-cancelled", name: "New Cancelled Event", description: "Emit new event when a Google Calendar event is cancelled or deleted", - version: "0.1.10", + version: "0.1.11", type: "source", dedupe: "unique", props: { diff --git a/components/google_calendar/sources/event-ended/event-ended.mjs b/components/google_calendar/sources/event-ended/event-ended.mjs index 61649f1cb7ffe..4c77e00cb02c6 100644 --- a/components/google_calendar/sources/event-ended/event-ended.mjs +++ b/components/google_calendar/sources/event-ended/event-ended.mjs @@ -6,7 +6,7 @@ export default { key: "google_calendar-event-ended", name: "New Ended Event", description: "Emit new event when a Google Calendar event ends", - version: "0.1.10", + version: "0.1.11", type: "source", dedupe: "unique", props: { diff --git a/components/google_calendar/sources/new-calendar/new-calendar.mjs b/components/google_calendar/sources/new-calendar/new-calendar.mjs index e68ba327e018c..247b91285d061 100644 --- a/components/google_calendar/sources/new-calendar/new-calendar.mjs +++ b/components/google_calendar/sources/new-calendar/new-calendar.mjs @@ -5,7 +5,7 @@ export default { key: "google_calendar-new-calendar", name: "New Calendar Created", description: "Emit new event when a calendar is created.", - version: "0.1.10", + version: "0.1.11", type: "source", dedupe: "unique", props: { diff --git a/components/google_calendar/sources/new-event-search/new-event-search.mjs b/components/google_calendar/sources/new-event-search/new-event-search.mjs index 374ababff2691..91a368a66c329 100644 --- a/components/google_calendar/sources/new-event-search/new-event-search.mjs +++ b/components/google_calendar/sources/new-event-search/new-event-search.mjs @@ -5,7 +5,7 @@ export default { key: "google_calendar-new-event-search", name: "New Event Matching a Search", description: "Emit new event when a Google Calendar event is created that matches a search", - version: "0.1.10", + version: "0.1.11", type: "source", dedupe: "unique", props: { diff --git a/components/google_calendar/sources/new-or-updated-event-instant/new-or-updated-event-instant.mjs b/components/google_calendar/sources/new-or-updated-event-instant/new-or-updated-event-instant.mjs index 1ca4ecb79b0bd..4b51079c11376 100644 --- a/components/google_calendar/sources/new-or-updated-event-instant/new-or-updated-event-instant.mjs +++ b/components/google_calendar/sources/new-or-updated-event-instant/new-or-updated-event-instant.mjs @@ -1,14 +1,14 @@ import { v4 as uuid } from "uuid"; import sampleEmit from "./test-event.mjs"; import googleCalendar from "../../google_calendar.app.mjs"; -import { DEFAULT_POLLING_SOURCE_TIMER_INTERVAL } from "@pipedream/platform"; +import constants from "../../common/constants.mjs"; export default { key: "google_calendar-new-or-updated-event-instant", type: "source", name: "New Created or Updated Event (Instant)", description: "Emit new event when a Google Calendar events is created or updated (does not emit cancelled events)", - version: "0.1.14", + version: "0.1.15", dedupe: "unique", props: { googleCalendar, @@ -38,7 +38,7 @@ export default { 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**.", type: "$.interface.timer", static: { - intervalSeconds: DEFAULT_POLLING_SOURCE_TIMER_INTERVAL, + intervalSeconds: constants.WEBHOOK_SUBSCRIPTION_RENEWAL_SECONDS, }, }, }, @@ -66,7 +66,11 @@ export default { await this.makeWatchRequest(); }, async deactivate() { - await this.stopWatchRequest(); + try { + await this.stopWatchRequest(); + } catch (e) { + console.log(`Error deactivating webhook. ${e}`); + } }, }, methods: { diff --git a/components/google_calendar/sources/upcoming-event-alert/upcoming-event-alert.mjs b/components/google_calendar/sources/upcoming-event-alert/upcoming-event-alert.mjs index 7ed35921fd97d..b89045ce3d124 100644 --- a/components/google_calendar/sources/upcoming-event-alert/upcoming-event-alert.mjs +++ b/components/google_calendar/sources/upcoming-event-alert/upcoming-event-alert.mjs @@ -8,7 +8,7 @@ export default { description: `Emit new event based on a time interval before an upcoming event in the calendar. This source uses Pipedream's Task Scheduler. [See the documentation](https://pipedream.com/docs/examples/waiting-to-execute-next-step-of-workflow/#step-1-create-a-task-scheduler-event-source) for more information and instructions for connecting your Pipedream account.`, - version: "0.0.9", + version: "0.0.10", type: "source", props: { pipedream: taskScheduler.props.pipedream, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8574e518e7559..1992fa577117b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -6660,8 +6660,7 @@ importers: specifier: ^1.5.1 version: 1.6.6 - components/kindo: - specifiers: {} + components/kindo: {} components/kingsumo: dependencies: @@ -7871,8 +7870,7 @@ importers: components/mindmeister: {} - components/mindstudio: - specifiers: {} + components/mindstudio: {} components/minio: {} @@ -12295,8 +12293,7 @@ importers: components/synthflow: {} - components/systeme_io: - specifiers: {} + components/systeme_io: {} components/t2m_url_shortener: {}