@pipedream/microsoft_outlook_calendar 0.7.0 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import { ConfigurationError } from "@pipedream/platform";
|
|
1
2
|
import microsoftOutlook from "../../microsoft_outlook_calendar.app.mjs";
|
|
2
3
|
|
|
3
4
|
export default {
|
|
4
5
|
key: "microsoft_outlook_calendar-list-events",
|
|
5
6
|
name: "List Events",
|
|
6
7
|
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.
|
|
8
|
+
version: "0.0.9",
|
|
8
9
|
annotations: {
|
|
9
10
|
destructiveHint: false,
|
|
10
11
|
openWorldHint: true,
|
|
@@ -37,25 +38,19 @@ export default {
|
|
|
37
38
|
label: "Include Recurring",
|
|
38
39
|
description: "Whether to include recurring events",
|
|
39
40
|
optional: true,
|
|
40
|
-
reloadProps: true,
|
|
41
41
|
},
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
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`",
|
|
57
|
-
},
|
|
58
|
-
};
|
|
42
|
+
startDateTime: {
|
|
43
|
+
type: "string",
|
|
44
|
+
label: "Start Date Time",
|
|
45
|
+
description: "If `Include Recurring` is true, this is the start date and time of the time range, represented in ISO 8601 format. For example, `2019-11-08T19:00:00-08:00`.",
|
|
46
|
+
optional: true,
|
|
47
|
+
},
|
|
48
|
+
endDateTime: {
|
|
49
|
+
type: "string",
|
|
50
|
+
label: "End Date Time",
|
|
51
|
+
description: "If `Include Recurring` is true, this is the end date and time of the time range, represented in ISO 8601 format. For example, `2019-11-08T20:00:00-08:00`.",
|
|
52
|
+
optional: true,
|
|
53
|
+
},
|
|
59
54
|
},
|
|
60
55
|
async run({ $ }) {
|
|
61
56
|
const params = {
|
|
@@ -64,7 +59,12 @@ export default {
|
|
|
64
59
|
"$top": this.maxResults,
|
|
65
60
|
};
|
|
66
61
|
|
|
67
|
-
const {
|
|
62
|
+
const { includeRecurring } = this;
|
|
63
|
+
if (includeRecurring && (!this.startDateTime || !this.endDateTime)) {
|
|
64
|
+
throw new ConfigurationError("`Start Date Time` and `End Date Time` are required when `Include Recurring` is true");
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
const { value = [] } = !includeRecurring
|
|
68
68
|
? await this.microsoftOutlook.listCalendarEvents({
|
|
69
69
|
$,
|
|
70
70
|
params,
|
|
@@ -78,7 +78,7 @@ export default {
|
|
|
78
78
|
},
|
|
79
79
|
});
|
|
80
80
|
|
|
81
|
-
const events = !
|
|
81
|
+
const events = !includeRecurring
|
|
82
82
|
? value.filter((event) => !event.recurrence)
|
|
83
83
|
: value;
|
|
84
84
|
|