Skip to content
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -32,16 +32,51 @@ 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,
},
});

$.export("$summary", `Successfully retrieved ${value.length} event${value.length === 1
? ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,5 +180,12 @@ export default {
...args,
});
},
async listCalendarView(args = {}) {
return this._makeRequest({
method: "GET",
path: "/me/calendar/calendarView",
...args,
});
},
},
};
4 changes: 3 additions & 1 deletion components/microsoft_outlook_calendar/package.json
Original file line number Diff line number Diff line change
@@ -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": [
Expand All @@ -15,6 +15,8 @@
"access": "public"
},
"dependencies": {
"@pipedream/microsoft_outlook": "^1.7.3",
"@pipedream/pipedream": "^0.4.2",
"@pipedream/platform": "^3.0.3"
}
}
10 changes: 0 additions & 10 deletions components/microsoft_outlook_calendar/sources/common.mjs

This file was deleted.

10 changes: 10 additions & 0 deletions components/microsoft_outlook_calendar/sources/common/common.mjs
Original file line number Diff line number Diff line change
@@ -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,
},
};
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
Loading
Loading