From 4708fdaa6a0879ad91e1102eaaf8c9b5cf6a026e Mon Sep 17 00:00:00 2001 From: michelle0927 Date: Tue, 25 Feb 2025 14:14:15 -0500 Subject: [PATCH 1/5] webhook source updates --- components/google_calendar/common/constants.mjs | 5 +++++ components/google_calendar/package.json | 2 +- .../new-or-updated-event-instant.mjs | 12 ++++++++---- 3 files changed, 14 insertions(+), 5 deletions(-) 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/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: { From 626fab7b87f3bf81cef605eb4563bb0905f6a106 Mon Sep 17 00:00:00 2001 From: michelle0927 Date: Tue, 25 Feb 2025 14:17:44 -0500 Subject: [PATCH 2/5] versions --- .../actions/add-attendees-to-event/add-attendees-to-event.mjs | 2 +- .../google_calendar/actions/create-event/create-event.mjs | 2 +- .../google_calendar/actions/delete-event/delete-event.mjs | 2 +- .../google_calendar/actions/get-calendar/get-calendar.mjs | 2 +- components/google_calendar/actions/get-event/get-event.mjs | 2 +- .../google_calendar/actions/list-calendars/list-calendars.mjs | 2 +- components/google_calendar/actions/list-events/list-events.mjs | 2 +- .../query-free-busy-calendars/query-free-busy-calendars.mjs | 2 +- .../google_calendar/actions/quick-add-event/quick-add-event.mjs | 2 +- .../google_calendar/actions/update-event/update-event.mjs | 2 +- .../google_calendar/sources/event-cancelled/event-cancelled.mjs | 2 +- components/google_calendar/sources/event-ended/event-ended.mjs | 2 +- .../google_calendar/sources/new-calendar/new-calendar.mjs | 2 +- .../sources/new-event-search/new-event-search.mjs | 2 +- .../sources/upcoming-event-alert/upcoming-event-alert.mjs | 2 +- 15 files changed, 15 insertions(+), 15 deletions(-) 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/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/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, From 38a7bdd4f775ecdd2006631101bed97884a16e7f Mon Sep 17 00:00:00 2001 From: michelle0927 Date: Tue, 25 Feb 2025 14:19:23 -0500 Subject: [PATCH 3/5] pnpm-lock.yaml --- pnpm-lock.yaml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) 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: {} From c42c87bf772d05030d97b28d730f6caa7befff26 Mon Sep 17 00:00:00 2001 From: michelle0927 Date: Tue, 25 Feb 2025 14:21:28 -0500 Subject: [PATCH 4/5] pnpm-lock.yaml --- pnpm-lock.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1992fa577117b..cb48dad84179d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -14750,7 +14750,7 @@ importers: version: 3.1.7 ts-jest: specifier: ^29.2.5 - version: 29.2.5(@babel/core@7.26.0)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.0))(esbuild@0.24.2)(jest@29.7.0(@types/node@20.17.6)(babel-plugin-macros@3.1.0))(typescript@5.7.2) + version: 29.2.5(@babel/core@8.0.0-alpha.13)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@8.0.0-alpha.13))(esbuild@0.24.2)(jest@29.7.0(@types/node@20.17.6)(babel-plugin-macros@3.1.0))(typescript@5.7.2) tsup: specifier: ^8.3.6 version: 8.3.6(@microsoft/api-extractor@7.47.12(@types/node@20.17.6))(jiti@1.21.6)(postcss@8.4.49)(typescript@5.7.2)(yaml@2.6.1) @@ -46810,7 +46810,7 @@ snapshots: ts-interface-checker@0.1.13: {} - ts-jest@29.2.5(@babel/core@7.26.0)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.0))(esbuild@0.24.2)(jest@29.7.0(@types/node@20.17.6)(babel-plugin-macros@3.1.0))(typescript@5.7.2): + ts-jest@29.2.5(@babel/core@8.0.0-alpha.13)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@8.0.0-alpha.13))(esbuild@0.24.2)(jest@29.7.0(@types/node@20.17.6)(babel-plugin-macros@3.1.0))(typescript@5.7.2): dependencies: bs-logger: 0.2.6 ejs: 3.1.10 @@ -46824,10 +46824,10 @@ snapshots: typescript: 5.7.2 yargs-parser: 21.1.1 optionalDependencies: - '@babel/core': 7.26.0 + '@babel/core': 8.0.0-alpha.13 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - babel-jest: 29.7.0(@babel/core@7.26.0) + babel-jest: 29.7.0(@babel/core@8.0.0-alpha.13) esbuild: 0.24.2 ts-jest@29.2.5(@babel/core@8.0.0-alpha.13)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@8.0.0-alpha.13))(jest@29.7.0(@types/node@20.17.6)(babel-plugin-macros@3.1.0))(typescript@5.6.3): From 759a569a50e7673f04eb447768631d04c99f1d1e Mon Sep 17 00:00:00 2001 From: michelle0927 Date: Tue, 25 Feb 2025 14:28:13 -0500 Subject: [PATCH 5/5] pnpm-lock.yaml --- pnpm-lock.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index cb48dad84179d..1992fa577117b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -14750,7 +14750,7 @@ importers: version: 3.1.7 ts-jest: specifier: ^29.2.5 - version: 29.2.5(@babel/core@8.0.0-alpha.13)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@8.0.0-alpha.13))(esbuild@0.24.2)(jest@29.7.0(@types/node@20.17.6)(babel-plugin-macros@3.1.0))(typescript@5.7.2) + version: 29.2.5(@babel/core@7.26.0)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.0))(esbuild@0.24.2)(jest@29.7.0(@types/node@20.17.6)(babel-plugin-macros@3.1.0))(typescript@5.7.2) tsup: specifier: ^8.3.6 version: 8.3.6(@microsoft/api-extractor@7.47.12(@types/node@20.17.6))(jiti@1.21.6)(postcss@8.4.49)(typescript@5.7.2)(yaml@2.6.1) @@ -46810,7 +46810,7 @@ snapshots: ts-interface-checker@0.1.13: {} - ts-jest@29.2.5(@babel/core@8.0.0-alpha.13)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@8.0.0-alpha.13))(esbuild@0.24.2)(jest@29.7.0(@types/node@20.17.6)(babel-plugin-macros@3.1.0))(typescript@5.7.2): + ts-jest@29.2.5(@babel/core@7.26.0)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.0))(esbuild@0.24.2)(jest@29.7.0(@types/node@20.17.6)(babel-plugin-macros@3.1.0))(typescript@5.7.2): dependencies: bs-logger: 0.2.6 ejs: 3.1.10 @@ -46824,10 +46824,10 @@ snapshots: typescript: 5.7.2 yargs-parser: 21.1.1 optionalDependencies: - '@babel/core': 8.0.0-alpha.13 + '@babel/core': 7.26.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - babel-jest: 29.7.0(@babel/core@8.0.0-alpha.13) + babel-jest: 29.7.0(@babel/core@7.26.0) esbuild: 0.24.2 ts-jest@29.2.5(@babel/core@8.0.0-alpha.13)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@8.0.0-alpha.13))(jest@29.7.0(@types/node@20.17.6)(babel-plugin-macros@3.1.0))(typescript@5.6.3):