@pipedream/microsoft_outlook_calendar 8.5.0 → 8.5.2
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.
- package/actions/accept-event/accept-event.mjs +2 -1
- package/actions/decline-event/decline-event.mjs +2 -1
- package/actions/get-current-user/get-current-user.mjs +2 -1
- package/actions/get-event/get-event.mjs +2 -1
- package/actions/list-events/list-events.mjs +2 -1
- package/actions/search-people/search-people.mjs +2 -1
- package/actions/tentatively-accept-event/tentatively-accept-event.mjs +2 -1
- package/package.json +1 -1
- package/sources/new-upcoming-event-polling/new-upcoming-event-polling.mjs +2 -3
- package/sources/new-upcoming-event/new-upcoming-event.mjs +0 -92
|
@@ -7,8 +7,9 @@ export default {
|
|
|
7
7
|
"Accept a calendar event invitation and optionally send a response to the organizer."
|
|
8
8
|
+ " Use **List Events** or **Get Event** to find the event ID."
|
|
9
9
|
+ " [See the documentation](https://learn.microsoft.com/en-us/graph/api/event-accept?view=graph-rest-1.0&tabs=http)",
|
|
10
|
-
version: "0.0.
|
|
10
|
+
version: "0.0.2",
|
|
11
11
|
type: "action",
|
|
12
|
+
ai: "optimized",
|
|
12
13
|
annotations: {
|
|
13
14
|
destructiveHint: false,
|
|
14
15
|
openWorldHint: true,
|
|
@@ -9,8 +9,9 @@ export default {
|
|
|
9
9
|
+ " Use **List Events** or **Get Event** to find the event ID."
|
|
10
10
|
+ " To propose a new time, pass `proposedNewTime` as a JSON string with `start` and `end` objects (each with `dateTime` in ISO 8601 format and `timeZone` as a Windows timezone name, e.g. `\"Pacific Standard Time\"`). Alternate-time proposals are only valid when the event has `allowNewTimeProposals: true` and `sendResponse` is `true`."
|
|
11
11
|
+ " [See the documentation](https://learn.microsoft.com/en-us/graph/api/event-decline?view=graph-rest-1.0&tabs=http)",
|
|
12
|
-
version: "0.0.
|
|
12
|
+
version: "0.0.2",
|
|
13
13
|
type: "action",
|
|
14
|
+
ai: "optimized",
|
|
14
15
|
annotations: {
|
|
15
16
|
destructiveHint: false,
|
|
16
17
|
openWorldHint: true,
|
|
@@ -4,8 +4,9 @@ export default {
|
|
|
4
4
|
key: "microsoft_outlook_calendar-get-current-user",
|
|
5
5
|
name: "Get Current User",
|
|
6
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.
|
|
7
|
+
version: "0.0.5",
|
|
8
8
|
type: "action",
|
|
9
|
+
ai: "optimized",
|
|
9
10
|
annotations: {
|
|
10
11
|
destructiveHint: false,
|
|
11
12
|
openWorldHint: true,
|
|
@@ -2,10 +2,11 @@ import microsoftOutlook from "../../microsoft_outlook_calendar.app.mjs";
|
|
|
2
2
|
|
|
3
3
|
export default {
|
|
4
4
|
type: "action",
|
|
5
|
+
ai: "optimized",
|
|
5
6
|
key: "microsoft_outlook_calendar-get-event",
|
|
6
7
|
name: "Get Event",
|
|
7
8
|
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.
|
|
9
|
+
version: "0.0.4",
|
|
9
10
|
annotations: {
|
|
10
11
|
destructiveHint: false,
|
|
11
12
|
openWorldHint: true,
|
|
@@ -7,13 +7,14 @@ export default {
|
|
|
7
7
|
key: "microsoft_outlook_calendar-list-events",
|
|
8
8
|
name: "List Events",
|
|
9
9
|
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)",
|
|
10
|
-
version: "0.1.
|
|
10
|
+
version: "0.1.2",
|
|
11
11
|
annotations: {
|
|
12
12
|
destructiveHint: false,
|
|
13
13
|
openWorldHint: true,
|
|
14
14
|
readOnlyHint: true,
|
|
15
15
|
},
|
|
16
16
|
type: "action",
|
|
17
|
+
ai: "optimized",
|
|
17
18
|
props: {
|
|
18
19
|
microsoftOutlook,
|
|
19
20
|
filter: {
|
|
@@ -4,8 +4,9 @@ export default {
|
|
|
4
4
|
key: "microsoft_outlook_calendar-search-people",
|
|
5
5
|
name: "Search People",
|
|
6
6
|
description: "Retrieve a collection of person objects ordered by their relevance to the user, based on communication and collaboration patterns and business relationships. [See the documentation](https://learn.microsoft.com/en-us/graph/api/user-list-people)",
|
|
7
|
-
version: "0.0.
|
|
7
|
+
version: "0.0.8",
|
|
8
8
|
type: "action",
|
|
9
|
+
ai: "optimized",
|
|
9
10
|
annotations: {
|
|
10
11
|
destructiveHint: false,
|
|
11
12
|
openWorldHint: true,
|
|
@@ -9,8 +9,9 @@ export default {
|
|
|
9
9
|
+ " Use **List Events** or **Get Event** to find the event ID."
|
|
10
10
|
+ " To propose a new time, pass `proposedNewTime` as a JSON string with `start` and `end` objects (each with `dateTime` in ISO 8601 format and `timeZone` as a Windows timezone name, e.g. `\"Pacific Standard Time\"`). Alternate-time proposals are only valid when the event has `allowNewTimeProposals: true` and `sendResponse` is `true`."
|
|
11
11
|
+ " [See the documentation](https://learn.microsoft.com/en-us/graph/api/event-tentativelyaccept?view=graph-rest-1.0&tabs=http)",
|
|
12
|
-
version: "0.0.
|
|
12
|
+
version: "0.0.2",
|
|
13
13
|
type: "action",
|
|
14
|
+
ai: "optimized",
|
|
14
15
|
annotations: {
|
|
15
16
|
destructiveHint: false,
|
|
16
17
|
openWorldHint: true,
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@ export default {
|
|
|
5
5
|
key: "microsoft_outlook_calendar-new-upcoming-event-polling",
|
|
6
6
|
name: "New Upcoming Calendar Event (Polling)",
|
|
7
7
|
description: "Emit new event based on a time interval before an upcoming calendar event. [See the documentation](https://docs.microsoft.com/en-us/graph/api/user-list-events)",
|
|
8
|
-
version: "0.0.
|
|
8
|
+
version: "0.0.9",
|
|
9
9
|
type: "source",
|
|
10
10
|
dedupe: "unique",
|
|
11
11
|
props: {
|
|
@@ -20,7 +20,7 @@ export default {
|
|
|
20
20
|
pollingInfo: {
|
|
21
21
|
type: "alert",
|
|
22
22
|
alertType: "info",
|
|
23
|
-
content: "Since this source executes based on a timer, event emission may be slightly delayed. For example, if the source runs every 5 minutes, the delay may be up to 5 minutes.
|
|
23
|
+
content: "Since this source executes based on a timer, event emission may be slightly delayed. For example, if the source runs every 5 minutes, the delay may be up to 5 minutes.",
|
|
24
24
|
},
|
|
25
25
|
minutesBefore: {
|
|
26
26
|
type: "integer",
|
|
@@ -134,4 +134,3 @@ export default {
|
|
|
134
134
|
this._setEmittedEvents(emittedEvents);
|
|
135
135
|
},
|
|
136
136
|
};
|
|
137
|
-
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import common from "../common/common.mjs";
|
|
2
|
-
import taskScheduler from "@pipedream/pipedream/sources/new-scheduled-tasks/new-scheduled-tasks.mjs";
|
|
3
|
-
|
|
4
|
-
export default {
|
|
5
|
-
...common,
|
|
6
|
-
key: "microsoft_outlook_calendar-new-upcoming-event",
|
|
7
|
-
name: "New Upcoming Calendar Event",
|
|
8
|
-
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.",
|
|
9
|
-
version: "0.0.12",
|
|
10
|
-
type: "source",
|
|
11
|
-
props: {
|
|
12
|
-
...common.props,
|
|
13
|
-
pipedream: taskScheduler.props.pipedream,
|
|
14
|
-
},
|
|
15
|
-
hooks: {
|
|
16
|
-
...common.hooks,
|
|
17
|
-
async activate() {
|
|
18
|
-
await this.activate({
|
|
19
|
-
changeType: "updated",
|
|
20
|
-
resource: "/me/events",
|
|
21
|
-
});
|
|
22
|
-
},
|
|
23
|
-
async deactivate() {
|
|
24
|
-
await this.deactivate();
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
methods: {
|
|
28
|
-
...taskScheduler.methods,
|
|
29
|
-
...common.methods,
|
|
30
|
-
_hasDeployed() {
|
|
31
|
-
const result = this.db.get("hasDeployed");
|
|
32
|
-
this.db.set("hasDeployed", true);
|
|
33
|
-
return result;
|
|
34
|
-
},
|
|
35
|
-
subtractMinutes(date, minutes) {
|
|
36
|
-
return date.getTime() - minutes * 60000;
|
|
37
|
-
},
|
|
38
|
-
async getSampleEvents({ pageSize }) {
|
|
39
|
-
return this.microsoftOutlook.listCalendarEvents({
|
|
40
|
-
params: {
|
|
41
|
-
$top: pageSize,
|
|
42
|
-
$orderby: "lastModifiedDateTime desc",
|
|
43
|
-
},
|
|
44
|
-
});
|
|
45
|
-
},
|
|
46
|
-
emitEvent(item) {
|
|
47
|
-
this.$emit({
|
|
48
|
-
message: item,
|
|
49
|
-
}, this.generateMeta(item));
|
|
50
|
-
},
|
|
51
|
-
generateMeta(item) {
|
|
52
|
-
return {
|
|
53
|
-
id: item.id,
|
|
54
|
-
summary: `Upcoming event - ${item.subject}`,
|
|
55
|
-
ts: +Date.parse(item.createdDateTime),
|
|
56
|
-
};
|
|
57
|
-
},
|
|
58
|
-
},
|
|
59
|
-
async run(event) {
|
|
60
|
-
if (event.$channel === this.selfChannel()) {
|
|
61
|
-
const item = await this.microsoftOutlook.getCalendarEvent({
|
|
62
|
-
eventId: event.eventId,
|
|
63
|
-
});
|
|
64
|
-
// checking if the event was modified after this scheduling
|
|
65
|
-
if (item.lastModifiedDateTime === event.lastModifiedControl) {
|
|
66
|
-
this.emitEvent(item);
|
|
67
|
-
}
|
|
68
|
-
return;
|
|
69
|
-
}
|
|
70
|
-
await this.run({
|
|
71
|
-
event,
|
|
72
|
-
emitFn: async ({ resourceId } = {}) => {
|
|
73
|
-
if (!this._hasDeployed()) {
|
|
74
|
-
await this.selfSubscribe();
|
|
75
|
-
}
|
|
76
|
-
const item = await this.microsoftOutlook.getCalendarEvent({
|
|
77
|
-
eventId: resourceId,
|
|
78
|
-
});
|
|
79
|
-
if (event.$channel !== this.selfChannel()) {
|
|
80
|
-
const startTime = new Date(item.start.dateTime || item.start.date);
|
|
81
|
-
const reminderMinutesBeforeStart = item.reminderMinutesBeforeStart || 15;
|
|
82
|
-
const later = new Date(this.subtractMinutes(startTime, reminderMinutesBeforeStart));
|
|
83
|
-
const newEvent = {
|
|
84
|
-
lastModifiedControl: item.lastModifiedDateTime,
|
|
85
|
-
eventId: resourceId,
|
|
86
|
-
};
|
|
87
|
-
this.emitScheduleEvent(newEvent, later);
|
|
88
|
-
}
|
|
89
|
-
},
|
|
90
|
-
});
|
|
91
|
-
},
|
|
92
|
-
};
|