@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.
@@ -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.3",
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.3",
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.3",
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.3",
8
+ version: "0.0.4",
9
9
  props: {
10
10
  microsoftTeams,
11
11
  chatId: {
@@ -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?${constants.ORDER_BY_CREATED_DESC}`,
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pipedream/microsoft_teams",
3
- "version": "0.0.7",
3
+ "version": "0.1.0",
4
4
  "description": "Pipedream Microsoft Teams Components",
5
5
  "main": "microsoft_teams.app.mjs",
6
6
  "keywords": [
@@ -5,7 +5,7 @@ export default {
5
5
  key: "microsoft_teams-new-channel",
6
6
  name: "New Channel",
7
7
  description: "Emit new event when a new channel is created within a team",
8
- version: "0.0.4",
8
+ version: "0.0.5",
9
9
  type: "source",
10
10
  dedupe: "unique",
11
11
  props: {
@@ -5,7 +5,7 @@ export default {
5
5
  key: "microsoft_teams-new-channel-message",
6
6
  name: "New Channel Message",
7
7
  description: "Emit new event when a new message is posted in a channel",
8
- version: "0.0.4",
8
+ version: "0.0.5",
9
9
  type: "source",
10
10
  dedupe: "unique",
11
11
  props: {
@@ -5,7 +5,7 @@ export default {
5
5
  key: "microsoft_teams-new-chat",
6
6
  name: "New Chat",
7
7
  description: "Emit new event when a new chat is created",
8
- version: "0.0.4",
8
+ version: "0.0.5",
9
9
  type: "source",
10
10
  dedupe: "unique",
11
11
  props: {
@@ -5,7 +5,7 @@ export default {
5
5
  key: "microsoft_teams-new-chat-message",
6
6
  name: "New Chat Message",
7
7
  description: "Emit new event when a new message is received in a chat",
8
- version: "0.0.4",
8
+ version: "0.0.5",
9
9
  type: "source",
10
10
  dedupe: "unique",
11
11
  props: {
@@ -5,7 +5,7 @@ export default {
5
5
  key: "microsoft_teams-new-team",
6
6
  name: "New Team",
7
7
  description: "Emit new event when a new team is joined by the authenticated user",
8
- version: "0.0.4",
8
+ version: "0.0.5",
9
9
  type: "source",
10
10
  dedupe: "unique",
11
11
  props: {
@@ -5,7 +5,7 @@ export default {
5
5
  key: "microsoft_teams-new-team-member",
6
6
  name: "New Team Member",
7
7
  description: "Emit new event when a new member is added to a team",
8
- version: "0.0.4",
8
+ version: "0.0.5",
9
9
  type: "source",
10
10
  dedupe: "unique",
11
11
  props: {