@pipedream/microsoft_teams 0.0.7 → 0.1.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.
- package/actions/create-channel/create-channel.mjs +1 -1
- package/actions/list-channels/list-channels.mjs +1 -1
- package/actions/list-shifts/list-shifts.mjs +34 -0
- package/actions/send-channel-message/send-channel-message.mjs +1 -1
- package/actions/send-chat-message/send-chat-message.mjs +1 -1
- package/microsoft_teams.app.mjs +6 -1
- package/package.json +1 -1
- package/sources/new-channel/new-channel.mjs +1 -1
- package/sources/new-channel-message/new-channel-message.mjs +1 -1
- package/sources/new-chat/new-chat.mjs +1 -1
- package/sources/new-chat-message/new-chat-message.mjs +1 -1
- package/sources/new-team/new-team.mjs +1 -1
- package/sources/new-team-member/new-team-member.mjs +1 -1
|
@@ -5,7 +5,7 @@ export default {
|
|
|
5
5
|
name: "Create Channel",
|
|
6
6
|
description: "Create a new channel in Microsoft Teams. [See the docs here](https://docs.microsoft.com/en-us/graph/api/channel-post?view=graph-rest-1.0&tabs=http)",
|
|
7
7
|
type: "action",
|
|
8
|
-
version: "0.0.
|
|
8
|
+
version: "0.0.4",
|
|
9
9
|
props: {
|
|
10
10
|
microsoftTeams,
|
|
11
11
|
teamId: {
|
|
@@ -5,7 +5,7 @@ export default {
|
|
|
5
5
|
name: "List Channels",
|
|
6
6
|
description: "Lists all channels in a Microsoft Team. [See the docs here](https://docs.microsoft.com/en-us/graph/api/channel-list?view=graph-rest-1.0&tabs=http)",
|
|
7
7
|
type: "action",
|
|
8
|
-
version: "0.0.
|
|
8
|
+
version: "0.0.4",
|
|
9
9
|
props: {
|
|
10
10
|
microsoftTeams,
|
|
11
11
|
teamId: {
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import microsoftTeams from "../../microsoft_teams.app.mjs";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
key: "microsoft_teams-list-shifts",
|
|
5
|
+
name: "List Shifts",
|
|
6
|
+
description: "Get the list of shift instances for a team. [See the documentation](https://learn.microsoft.com/en-us/graph/api/schedule-list-shifts?view=graph-rest-1.0&tabs=http)",
|
|
7
|
+
type: "action",
|
|
8
|
+
version: "0.0.1",
|
|
9
|
+
props: {
|
|
10
|
+
microsoftTeams,
|
|
11
|
+
teamId: {
|
|
12
|
+
propDefinition: [
|
|
13
|
+
microsoftTeams,
|
|
14
|
+
"team",
|
|
15
|
+
],
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
async run({ $ }) {
|
|
19
|
+
const paginator = this.microsoftTeams.paginate(this.microsoftTeams.listShifts, {
|
|
20
|
+
teamId: this.teamId,
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
const shifts = [];
|
|
24
|
+
for await (const shift of paginator) {
|
|
25
|
+
shifts.push(shift);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
$.export("$summary", `Successfully fetched ${shifts?.length} shift${shifts?.length === 1
|
|
29
|
+
? ""
|
|
30
|
+
: "s"}.`);
|
|
31
|
+
|
|
32
|
+
return shifts;
|
|
33
|
+
},
|
|
34
|
+
};
|
|
@@ -5,7 +5,7 @@ export default {
|
|
|
5
5
|
name: "Send Channel Message",
|
|
6
6
|
description: "Send a message to a team's channel. [See the docs here](https://docs.microsoft.com/en-us/graph/api/channel-post-messages?view=graph-rest-1.0&tabs=http)",
|
|
7
7
|
type: "action",
|
|
8
|
-
version: "0.0.
|
|
8
|
+
version: "0.0.4",
|
|
9
9
|
props: {
|
|
10
10
|
microsoftTeams,
|
|
11
11
|
teamId: {
|
|
@@ -5,7 +5,7 @@ export default {
|
|
|
5
5
|
name: "Send Chat Message",
|
|
6
6
|
description: "Send a message to a team's chat. [See the docs here](https://docs.microsoft.com/en-us/graph/api/chat-post-messages?view=graph-rest-1.0&tabs=http)",
|
|
7
7
|
type: "action",
|
|
8
|
-
version: "0.0.
|
|
8
|
+
version: "0.0.4",
|
|
9
9
|
props: {
|
|
10
10
|
microsoftTeams,
|
|
11
11
|
chatId: {
|
package/microsoft_teams.app.mjs
CHANGED
|
@@ -149,7 +149,7 @@ export default {
|
|
|
149
149
|
async listTeams() {
|
|
150
150
|
const id = await this.authenticatedUserId();
|
|
151
151
|
return this.makeRequest({
|
|
152
|
-
path: `/users/${id}/joinedTeams
|
|
152
|
+
path: `/users/${id}/joinedTeams`,
|
|
153
153
|
});
|
|
154
154
|
},
|
|
155
155
|
async listChannels({ teamId }) {
|
|
@@ -227,5 +227,10 @@ export default {
|
|
|
227
227
|
path: `/chats/${chatId}/messages?${constants.ORDER_BY_CREATED_DESC}`,
|
|
228
228
|
});
|
|
229
229
|
},
|
|
230
|
+
async listShifts({ teamId }) {
|
|
231
|
+
return this.makeRequest({
|
|
232
|
+
path: `/teams/${teamId}/schedule/shifts`,
|
|
233
|
+
});
|
|
234
|
+
},
|
|
230
235
|
},
|
|
231
236
|
};
|
package/package.json
CHANGED