@pipedream/microsoft_teams 0.2.0 → 0.3.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,31 @@
1
+ import microsoftTeams from "../../microsoft_teams.app.mjs";
2
+
3
+ export default {
4
+ key: "microsoft_teams-list-chats",
5
+ name: "List Chats",
6
+ description: "Lists all chat conversations for the authenticated user. [See the documentation](https://learn.microsoft.com/en-us/graph/api/chat-list)",
7
+ type: "action",
8
+ version: "0.0.1",
9
+ annotations: {
10
+ destructiveHint: false,
11
+ openWorldHint: true,
12
+ readOnlyHint: true,
13
+ },
14
+ props: {
15
+ microsoftTeams,
16
+ },
17
+ async run({ $ }) {
18
+ const chats = [];
19
+ const paginator = this.microsoftTeams.paginate(this.microsoftTeams.listChats);
20
+
21
+ for await (const chat of paginator) {
22
+ chats.push(chat);
23
+ }
24
+
25
+ $.export("$summary", `Successfully fetched ${chats.length} ${chats.length === 1
26
+ ? "chat"
27
+ : "chats"}`);
28
+
29
+ return chats;
30
+ },
31
+ };
@@ -0,0 +1,31 @@
1
+ import microsoftTeams from "../../microsoft_teams.app.mjs";
2
+
3
+ export default {
4
+ key: "microsoft_teams-list-teams",
5
+ name: "List Teams",
6
+ description: "Lists all teams the authenticated user has joined. [See the documentation](https://learn.microsoft.com/en-us/graph/api/user-list-joinedteams)",
7
+ type: "action",
8
+ version: "0.0.1",
9
+ annotations: {
10
+ destructiveHint: false,
11
+ openWorldHint: true,
12
+ readOnlyHint: true,
13
+ },
14
+ props: {
15
+ microsoftTeams,
16
+ },
17
+ async run({ $ }) {
18
+ const teams = [];
19
+ const paginator = this.microsoftTeams.paginate(this.microsoftTeams.listTeams);
20
+
21
+ for await (const team of paginator) {
22
+ teams.push(team);
23
+ }
24
+
25
+ $.export("$summary", `Successfully fetched ${teams.length} ${teams.length === 1
26
+ ? "team"
27
+ : "teams"}`);
28
+
29
+ return teams;
30
+ },
31
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pipedream/microsoft_teams",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "Pipedream Microsoft Teams Components",
5
5
  "main": "microsoft_teams.app.mjs",
6
6
  "keywords": [