diff --git a/components/microsoft_outlook_calendar/actions/create-calendar-event/create-calendar-event.mjs b/components/microsoft_outlook_calendar/actions/create-calendar-event/create-calendar-event.mjs index 585169c76036c..da0d801503613 100644 --- a/components/microsoft_outlook_calendar/actions/create-calendar-event/create-calendar-event.mjs +++ b/components/microsoft_outlook_calendar/actions/create-calendar-event/create-calendar-event.mjs @@ -3,7 +3,7 @@ import microsoftOutlook from "../../microsoft_outlook_calendar.app.mjs"; export default { type: "action", key: "microsoft_outlook_calendar-create-calendar-event", - version: "0.0.7", + version: "0.0.8", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/microsoft_outlook_calendar/actions/delete-calendar-event/delete-calendar-event.mjs b/components/microsoft_outlook_calendar/actions/delete-calendar-event/delete-calendar-event.mjs index 7d84da8bf9328..e19fe94956405 100644 --- a/components/microsoft_outlook_calendar/actions/delete-calendar-event/delete-calendar-event.mjs +++ b/components/microsoft_outlook_calendar/actions/delete-calendar-event/delete-calendar-event.mjs @@ -3,7 +3,7 @@ import microsoftOutlook from "../../microsoft_outlook_calendar.app.mjs"; export default { type: "action", key: "microsoft_outlook_calendar-delete-calendar-event", - version: "0.0.2", + version: "0.0.3", annotations: { destructiveHint: true, openWorldHint: true, diff --git a/components/microsoft_outlook_calendar/actions/get-schedule/get-schedule.mjs b/components/microsoft_outlook_calendar/actions/get-schedule/get-schedule.mjs index 3c0de5910d0e9..81ad68eb2f6c3 100644 --- a/components/microsoft_outlook_calendar/actions/get-schedule/get-schedule.mjs +++ b/components/microsoft_outlook_calendar/actions/get-schedule/get-schedule.mjs @@ -6,7 +6,7 @@ export default { key: "microsoft_outlook_calendar-get-schedule", name: "Get Free/Busy Schedule", description: "Get the free/busy availability information for a collection of users, distributions lists, or resources (rooms or equipment) for a specified time period. [See the documentation](https://learn.microsoft.com/en-us/graph/api/calendar-getschedule)", - version: "0.0.4", + version: "0.0.5", annotations: { destructiveHint: false, openWorldHint: true, diff --git a/components/microsoft_outlook_calendar/actions/list-events/list-events.mjs b/components/microsoft_outlook_calendar/actions/list-events/list-events.mjs index 508a75cc501b8..7b597209e6727 100644 --- a/components/microsoft_outlook_calendar/actions/list-events/list-events.mjs +++ b/components/microsoft_outlook_calendar/actions/list-events/list-events.mjs @@ -4,7 +4,7 @@ export default { key: "microsoft_outlook_calendar-list-events", name: "List Events", description: "Get a list of event objects in the user's mailbox. [See the documentation](https://learn.microsoft.com/en-us/graph/api/user-list-events)", - version: "0.0.3", + version: "0.0.4", annotations: { destructiveHint: false, openWorldHint: true, @@ -32,21 +32,60 @@ export default { description: "The maximum number of results to return", optional: true, }, + includeRecurring: { + type: "boolean", + label: "Include Recurring", + description: "Whether to include recurring events", + optional: true, + reloadProps: true, + }, }, - async run({ $ }) { - const { value = [] } = await this.microsoftOutlook.listCalendarEvents({ - $, - params: { - "$orderby": this.orderBy, - "$filter": this.filter, - "$top": this.maxResults, + additionalProps() { + if (!this.includeRecurring) { + return {}; + } + return { + startDateTime: { + type: "string", + label: "Start Date Time", + description: "The start date and time of the time range, represented in ISO 8601 format. For example, `2019-11-08T19:00:00-08:00`", + }, + endDateTime: { + type: "string", + label: "End Date Time", + description: "The end date and time of the time range, represented in ISO 8601 format. For example, `2019-11-08T20:00:00-08:00`", }, - }); + }; + }, + async run({ $ }) { + const params = { + "$orderby": this.orderBy, + "$filter": this.filter, + "$top": this.maxResults, + }; + + const { value = [] } = !this.includeRecurring + ? await this.microsoftOutlook.listCalendarEvents({ + $, + params, + }) + : await this.microsoftOutlook.listCalendarView({ + $, + params: { + ...params, + startDateTime: this.startDateTime, + endDateTime: this.endDateTime, + }, + }); + + const events = !this.includeRecurring + ? value.filter((event) => !event.recurrence) + : value; - $.export("$summary", `Successfully retrieved ${value.length} event${value.length === 1 + $.export("$summary", `Successfully retrieved ${events.length} event${events.length === 1 ? "" : "s"}`); - return value; + return events; }, }; diff --git a/components/microsoft_outlook_calendar/actions/update-calendar-event/update-calendar-event.mjs b/components/microsoft_outlook_calendar/actions/update-calendar-event/update-calendar-event.mjs index a15c07c680ea4..8d612da23650d 100644 --- a/components/microsoft_outlook_calendar/actions/update-calendar-event/update-calendar-event.mjs +++ b/components/microsoft_outlook_calendar/actions/update-calendar-event/update-calendar-event.mjs @@ -3,7 +3,7 @@ import microsoftOutlook from "../../microsoft_outlook_calendar.app.mjs"; export default { type: "action", key: "microsoft_outlook_calendar-update-calendar-event", - version: "0.0.2", + version: "0.0.3", annotations: { destructiveHint: true, openWorldHint: true, diff --git a/components/microsoft_outlook_calendar/microsoft_outlook_calendar.app.mjs b/components/microsoft_outlook_calendar/microsoft_outlook_calendar.app.mjs index 2e8d81c1d6d12..1677a6e55e48c 100644 --- a/components/microsoft_outlook_calendar/microsoft_outlook_calendar.app.mjs +++ b/components/microsoft_outlook_calendar/microsoft_outlook_calendar.app.mjs @@ -180,5 +180,12 @@ export default { ...args, }); }, + async listCalendarView(args = {}) { + return this._makeRequest({ + method: "GET", + path: "/me/calendar/calendarView", + ...args, + }); + }, }, }; diff --git a/components/microsoft_outlook_calendar/package.json b/components/microsoft_outlook_calendar/package.json index 3b8593bd5e0fb..33ae1972d5f5e 100644 --- a/components/microsoft_outlook_calendar/package.json +++ b/components/microsoft_outlook_calendar/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/microsoft_outlook_calendar", - "version": "0.3.2", + "version": "0.3.3", "description": "Pipedream Microsoft Outlook Calendar Components", "main": "microsoft_outlook_calendar.app.mjs", "keywords": [ @@ -15,6 +15,8 @@ "access": "public" }, "dependencies": { + "@pipedream/microsoft_outlook": "^1.7.3", + "@pipedream/pipedream": "^0.4.2", "@pipedream/platform": "^3.0.3" } } diff --git a/components/microsoft_outlook_calendar/sources/common.mjs b/components/microsoft_outlook_calendar/sources/common.mjs deleted file mode 100644 index 1afbee9a2dc4a..0000000000000 --- a/components/microsoft_outlook_calendar/sources/common.mjs +++ /dev/null @@ -1,10 +0,0 @@ -import microsoftOutlook from "../microsoft_outlook_calendar.app.mjs"; -import common from "../../microsoft_outlook/sources/common.mjs"; - -export default { - ...common, - props: { - ...common.props, - microsoftOutlook, - }, -}; diff --git a/components/microsoft_outlook_calendar/sources/common/common.mjs b/components/microsoft_outlook_calendar/sources/common/common.mjs new file mode 100644 index 0000000000000..3fbb352c6d4b8 --- /dev/null +++ b/components/microsoft_outlook_calendar/sources/common/common.mjs @@ -0,0 +1,10 @@ +import microsoftOutlook from "../../microsoft_outlook_calendar.app.mjs"; +import common from "@pipedream/microsoft_outlook/sources/common/common.mjs"; + +export default { + ...common, + props: { + ...common.props, + microsoftOutlook, + }, +}; diff --git a/components/microsoft_outlook_calendar/sources/new-calendar-event/new-calendar-event.mjs b/components/microsoft_outlook_calendar/sources/new-calendar-event/new-calendar-event.mjs index 033a72c2c409e..a8ed1510f7210 100644 --- a/components/microsoft_outlook_calendar/sources/new-calendar-event/new-calendar-event.mjs +++ b/components/microsoft_outlook_calendar/sources/new-calendar-event/new-calendar-event.mjs @@ -1,11 +1,11 @@ -import common from "../common.mjs"; +import common from "../common/common.mjs"; export default { ...common, key: "microsoft_outlook_calendar-new-calendar-event", name: "New Calendar Event (Instant)", description: "Emit new event when a new Calendar event is created", - version: "0.0.7", + version: "0.0.8", type: "source", hooks: { ...common.hooks, diff --git a/components/microsoft_outlook_calendar/sources/new-upcoming-event/new-upcoming-event.mjs b/components/microsoft_outlook_calendar/sources/new-upcoming-event/new-upcoming-event.mjs index c51de06d7e154..674fb631d2c21 100644 --- a/components/microsoft_outlook_calendar/sources/new-upcoming-event/new-upcoming-event.mjs +++ b/components/microsoft_outlook_calendar/sources/new-upcoming-event/new-upcoming-event.mjs @@ -1,12 +1,12 @@ -import common from "../common.mjs"; -import taskScheduler from "../../../pipedream/sources/new-scheduled-tasks/new-scheduled-tasks.mjs"; +import common from "../common/common.mjs"; +import taskScheduler from "@pipedream/pipedream/sources/new-scheduled-tasks/new-scheduled-tasks.mjs"; export default { ...common, key: "microsoft_outlook_calendar-new-upcoming-event", name: "New Upcoming Calendar Event", description: "Emit new event when a Calendar event is upcoming, this source is using `reminderMinutesBeforeStart` property of the event to determine the time it should emit.", - version: "0.0.3", + version: "0.0.4", type: "source", props: { ...common.props, diff --git a/components/microsoft_outlook_calendar/sources/updated-calendar-event/updated-calendar-event.mjs b/components/microsoft_outlook_calendar/sources/updated-calendar-event/updated-calendar-event.mjs index 54b5e874d81cb..a60cfb0a5eb76 100644 --- a/components/microsoft_outlook_calendar/sources/updated-calendar-event/updated-calendar-event.mjs +++ b/components/microsoft_outlook_calendar/sources/updated-calendar-event/updated-calendar-event.mjs @@ -1,11 +1,11 @@ -import common from "../common.mjs"; +import common from "../common/common.mjs"; export default { ...common, key: "microsoft_outlook_calendar-updated-calendar-event", name: "New Calendar Event Update (Instant)", description: "Emit new event when a Calendar event is updated", - version: "0.0.7", + version: "0.0.8", type: "source", hooks: { ...common.hooks, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index cd763d88a4859..836d6cff3b401 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8957,6 +8957,12 @@ importers: components/microsoft_outlook_calendar: dependencies: + '@pipedream/microsoft_outlook': + specifier: ^1.7.3 + version: 1.7.3 + '@pipedream/pipedream': + specifier: ^0.4.2 + version: 0.4.2 '@pipedream/platform': specifier: ^3.0.3 version: 3.0.3 @@ -20527,6 +20533,9 @@ packages: '@pipedream/linkedin@0.1.1': resolution: {integrity: sha512-9pFjaohz/wnJMIRpPmDPqHeWiXUIJVWIPvQudE8TkUjaBbyieDpscy8reWMp96UK9aXz1Z2J2yiNh0msILAX9Q==} + '@pipedream/microsoft_outlook@1.7.3': + resolution: {integrity: sha512-lJvKB6fvnHh9h9hk/z3zWQ3UsGY4U6NcZKpqSX+uEFdslSJI1GU9vY9UmntgPpTt0IuWz8EN5o6XJGb8/twl2w==} + '@pipedream/monday@0.7.0': resolution: {integrity: sha512-ovVtLhKMJpOTSoc7JcVLrbVrJxW4BT96eW79TiiPc+DgMSM7ouRmCk5lHL2xCAtrqDForXSrXXGjHOAzhJsytA==} @@ -20536,6 +20545,9 @@ packages: '@pipedream/notion@1.0.2': resolution: {integrity: sha512-qVMpoUOus3E4oYtrPoHq0jciipxY4Y9bOxqaiv6uyUbxOKC5QaVvOIRgge5E++uR7Bf46NepwwTcW7wujktUrw==} + '@pipedream/pipedream@0.4.2': + resolution: {integrity: sha512-BQkSnuXWU8VQvBDVyLrCrs2kGP3vwgyi8t02ONbIF85ZPkuIIhC25QhIMCXL+bWe5eGb3oDQh0PVXwpEi160fQ==} + '@pipedream/platform@0.10.0': resolution: {integrity: sha512-N3F/xVfBZQXc9wl+2/4E8U9Zma1rxpvylK6Gtw8Ofmiwjnmnvs+2SNjEpIXBPUeL+wxEkofSGOq7bkqt1hqwDg==} @@ -39249,6 +39261,16 @@ snapshots: transitivePeerDependencies: - debug + '@pipedream/microsoft_outlook@1.7.3': + dependencies: + '@pipedream/platform': 3.1.0 + axios: 0.21.4 + js-base64: 3.7.7 + md5: 2.3.0 + mime-types: 2.1.35 + transitivePeerDependencies: + - debug + '@pipedream/monday@0.7.0': dependencies: '@pipedream/platform': 3.1.0 @@ -39279,6 +39301,13 @@ snapshots: - encoding - supports-color + '@pipedream/pipedream@0.4.2': + dependencies: + '@pipedream/platform': 1.6.6 + uuidv4: 6.2.13 + transitivePeerDependencies: + - debug + '@pipedream/platform@0.10.0': dependencies: axios: 0.19.2