@pipedream/microsoft_outlook_calendar 8.0.0 → 8.0.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.
@@ -0,0 +1,33 @@
1
+ import microsoftOutlookCalendar from "../../microsoft_outlook_calendar.app.mjs";
2
+
3
+ export default {
4
+ key: "microsoft_outlook_calendar-get-current-user",
5
+ name: "Get Current User",
6
+ description: "Returns the authenticated Microsoft user's ID, display name, email, and principal name via Microsoft Graph. Call this first when the user says 'my calendar', 'my events', or needs to identify themselves as organizer/attendee. Use `id` or `mail` to filter results from **List Events** or set the organizer in **Create Calendar Event**. [See the documentation](https://learn.microsoft.com/en-us/graph/api/user-get).",
7
+ version: "0.0.1",
8
+ type: "action",
9
+ annotations: {
10
+ destructiveHint: false,
11
+ openWorldHint: true,
12
+ readOnlyHint: true,
13
+ },
14
+ props: {
15
+ microsoftOutlookCalendar,
16
+ },
17
+ async run({ $ }) {
18
+ const user = await this.microsoftOutlookCalendar.client()
19
+ .api("/me")
20
+ .select("id,displayName,mail,userPrincipalName")
21
+ .get();
22
+
23
+ const summaryName = user.displayName || user.mail || user.id;
24
+ $.export("$summary", `Retrieved user ${summaryName}`);
25
+
26
+ return {
27
+ id: user.id,
28
+ displayName: user.displayName,
29
+ mail: user.mail,
30
+ userPrincipalName: user.userPrincipalName,
31
+ };
32
+ },
33
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pipedream/microsoft_outlook_calendar",
3
- "version": "8.0.0",
3
+ "version": "8.0.1",
4
4
  "description": "Pipedream Microsoft Outlook Calendar Components",
5
5
  "main": "microsoft_outlook_calendar.app.mjs",
6
6
  "keywords": [