@pipedream/microsoft_outlook_calendar 8.1.0 → 8.2.0
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.
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import microsoftOutlook from "../../microsoft_outlook_calendar.app.mjs";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
type: "action",
|
|
5
|
+
key: "microsoft_outlook_calendar-get-event",
|
|
6
|
+
name: "Get Event",
|
|
7
|
+
description: "Retrieve a calendar event by its Microsoft Graph event ID. Pass the `id` from **List Events** when you need full details (for example `body`, `attendees`, or `recurrence`) that list responses may omit or truncate. [See the documentation](https://learn.microsoft.com/en-us/graph/api/event-get?view=graph-rest-1.0&tabs=http)",
|
|
8
|
+
version: "0.0.1",
|
|
9
|
+
annotations: {
|
|
10
|
+
destructiveHint: false,
|
|
11
|
+
openWorldHint: true,
|
|
12
|
+
readOnlyHint: true,
|
|
13
|
+
},
|
|
14
|
+
props: {
|
|
15
|
+
microsoftOutlook,
|
|
16
|
+
eventId: {
|
|
17
|
+
propDefinition: [
|
|
18
|
+
microsoftOutlook,
|
|
19
|
+
"eventId",
|
|
20
|
+
],
|
|
21
|
+
description: "The Microsoft Graph event ID — the `id` field on each object returned by **List Events** (including occurrences from calendar view when **Include Recurring** is enabled).",
|
|
22
|
+
},
|
|
23
|
+
select: {
|
|
24
|
+
type: "string",
|
|
25
|
+
label: "Properties to return ($select)",
|
|
26
|
+
description: "Optional. Comma-separated Microsoft Graph [event](https://learn.microsoft.com/en-us/graph/api/resources/event) property names (for example `subject,body,bodyPreview,start,end,attendees,organizer,location`). When empty, the API returns its default property set.",
|
|
27
|
+
optional: true,
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
async run({ $ }) {
|
|
31
|
+
const normalizedSelect = this.select?.trim()
|
|
32
|
+
? this.select.split(",")
|
|
33
|
+
.map((p) => p.trim())
|
|
34
|
+
.filter(Boolean)
|
|
35
|
+
.join(",")
|
|
36
|
+
: "";
|
|
37
|
+
|
|
38
|
+
const params = normalizedSelect
|
|
39
|
+
? {
|
|
40
|
+
$select: normalizedSelect,
|
|
41
|
+
}
|
|
42
|
+
: {};
|
|
43
|
+
|
|
44
|
+
const event = await this.microsoftOutlook.getCalendarEvent({
|
|
45
|
+
$,
|
|
46
|
+
eventId: this.eventId,
|
|
47
|
+
params,
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
const label = event?.subject ?? this.eventId;
|
|
51
|
+
$.export("$summary", `Successfully retrieved event "${label}"`);
|
|
52
|
+
return event;
|
|
53
|
+
},
|
|
54
|
+
};
|