Skip to content

Commit bd23573

Browse files
Merge branch 'master' into pr-18782
2 parents e2962a1 + 134b7b4 commit bd23573

File tree

13 files changed

+110
-33
lines changed

13 files changed

+110
-33
lines changed

components/microsoft_outlook_calendar/actions/create-calendar-event/create-calendar-event.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import microsoftOutlook from "../../microsoft_outlook_calendar.app.mjs";
33
export default {
44
type: "action",
55
key: "microsoft_outlook_calendar-create-calendar-event",
6-
version: "0.0.7",
6+
version: "0.0.8",
77
annotations: {
88
destructiveHint: false,
99
openWorldHint: true,

components/microsoft_outlook_calendar/actions/delete-calendar-event/delete-calendar-event.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import microsoftOutlook from "../../microsoft_outlook_calendar.app.mjs";
33
export default {
44
type: "action",
55
key: "microsoft_outlook_calendar-delete-calendar-event",
6-
version: "0.0.2",
6+
version: "0.0.3",
77
annotations: {
88
destructiveHint: true,
99
openWorldHint: true,

components/microsoft_outlook_calendar/actions/get-schedule/get-schedule.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export default {
66
key: "microsoft_outlook_calendar-get-schedule",
77
name: "Get Free/Busy Schedule",
88
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)",
9-
version: "0.0.4",
9+
version: "0.0.5",
1010
annotations: {
1111
destructiveHint: false,
1212
openWorldHint: true,

components/microsoft_outlook_calendar/actions/list-events/list-events.mjs

Lines changed: 50 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
key: "microsoft_outlook_calendar-list-events",
55
name: "List Events",
66
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)",
7-
version: "0.0.3",
7+
version: "0.0.4",
88
annotations: {
99
destructiveHint: false,
1010
openWorldHint: true,
@@ -32,21 +32,60 @@ export default {
3232
description: "The maximum number of results to return",
3333
optional: true,
3434
},
35+
includeRecurring: {
36+
type: "boolean",
37+
label: "Include Recurring",
38+
description: "Whether to include recurring events",
39+
optional: true,
40+
reloadProps: true,
41+
},
3542
},
36-
async run({ $ }) {
37-
const { value = [] } = await this.microsoftOutlook.listCalendarEvents({
38-
$,
39-
params: {
40-
"$orderby": this.orderBy,
41-
"$filter": this.filter,
42-
"$top": this.maxResults,
43+
additionalProps() {
44+
if (!this.includeRecurring) {
45+
return {};
46+
}
47+
return {
48+
startDateTime: {
49+
type: "string",
50+
label: "Start Date Time",
51+
description: "The start date and time of the time range, represented in ISO 8601 format. For example, `2019-11-08T19:00:00-08:00`",
52+
},
53+
endDateTime: {
54+
type: "string",
55+
label: "End Date Time",
56+
description: "The end date and time of the time range, represented in ISO 8601 format. For example, `2019-11-08T20:00:00-08:00`",
4357
},
44-
});
58+
};
59+
},
60+
async run({ $ }) {
61+
const params = {
62+
"$orderby": this.orderBy,
63+
"$filter": this.filter,
64+
"$top": this.maxResults,
65+
};
66+
67+
const { value = [] } = !this.includeRecurring
68+
? await this.microsoftOutlook.listCalendarEvents({
69+
$,
70+
params,
71+
})
72+
: await this.microsoftOutlook.listCalendarView({
73+
$,
74+
params: {
75+
...params,
76+
startDateTime: this.startDateTime,
77+
endDateTime: this.endDateTime,
78+
},
79+
});
80+
81+
const events = !this.includeRecurring
82+
? value.filter((event) => !event.recurrence)
83+
: value;
4584

46-
$.export("$summary", `Successfully retrieved ${value.length} event${value.length === 1
85+
$.export("$summary", `Successfully retrieved ${events.length} event${events.length === 1
4786
? ""
4887
: "s"}`);
4988

50-
return value;
89+
return events;
5190
},
5291
};

components/microsoft_outlook_calendar/actions/update-calendar-event/update-calendar-event.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import microsoftOutlook from "../../microsoft_outlook_calendar.app.mjs";
33
export default {
44
type: "action",
55
key: "microsoft_outlook_calendar-update-calendar-event",
6-
version: "0.0.2",
6+
version: "0.0.3",
77
annotations: {
88
destructiveHint: true,
99
openWorldHint: true,

components/microsoft_outlook_calendar/microsoft_outlook_calendar.app.mjs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,5 +180,12 @@ export default {
180180
...args,
181181
});
182182
},
183+
async listCalendarView(args = {}) {
184+
return this._makeRequest({
185+
method: "GET",
186+
path: "/me/calendar/calendarView",
187+
...args,
188+
});
189+
},
183190
},
184191
};

components/microsoft_outlook_calendar/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pipedream/microsoft_outlook_calendar",
3-
"version": "0.3.2",
3+
"version": "0.3.3",
44
"description": "Pipedream Microsoft Outlook Calendar Components",
55
"main": "microsoft_outlook_calendar.app.mjs",
66
"keywords": [
@@ -15,6 +15,8 @@
1515
"access": "public"
1616
},
1717
"dependencies": {
18+
"@pipedream/microsoft_outlook": "^1.7.3",
19+
"@pipedream/pipedream": "^0.4.2",
1820
"@pipedream/platform": "^3.0.3"
1921
}
2022
}

components/microsoft_outlook_calendar/sources/common.mjs

Lines changed: 0 additions & 10 deletions
This file was deleted.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import microsoftOutlook from "../../microsoft_outlook_calendar.app.mjs";
2+
import common from "@pipedream/microsoft_outlook/sources/common/common.mjs";
3+
4+
export default {
5+
...common,
6+
props: {
7+
...common.props,
8+
microsoftOutlook,
9+
},
10+
};

components/microsoft_outlook_calendar/sources/new-calendar-event/new-calendar-event.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import common from "../common.mjs";
1+
import common from "../common/common.mjs";
22

33
export default {
44
...common,
55
key: "microsoft_outlook_calendar-new-calendar-event",
66
name: "New Calendar Event (Instant)",
77
description: "Emit new event when a new Calendar event is created",
8-
version: "0.0.7",
8+
version: "0.0.8",
99
type: "source",
1010
hooks: {
1111
...common.hooks,

0 commit comments

Comments
 (0)