@pipedream/slack 0.9.1 → 0.9.3

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.
Files changed (47) hide show
  1. package/actions/add-emoji-reaction/add-emoji-reaction.mjs +2 -2
  2. package/actions/approve-workflow/approve-workflow.mjs +2 -2
  3. package/actions/archive-channel/archive-channel.mjs +2 -2
  4. package/actions/common/send-message.mjs +6 -4
  5. package/actions/create-channel/create-channel.mjs +2 -2
  6. package/actions/create-reminder/create-reminder.mjs +2 -2
  7. package/actions/delete-file/delete-file.mjs +11 -2
  8. package/actions/delete-message/delete-message.mjs +2 -2
  9. package/actions/find-message/find-message.mjs +37 -1
  10. package/actions/find-user-by-email/find-user-by-email.mjs +2 -2
  11. package/actions/get-file/get-file.mjs +11 -2
  12. package/actions/invite-user-to-channel/invite-user-to-channel.mjs +15 -7
  13. package/actions/kick-user/kick-user.mjs +15 -7
  14. package/actions/list-channels/list-channels.mjs +32 -4
  15. package/actions/list-files/list-files.mjs +16 -3
  16. package/actions/list-group-members/list-group-members.mjs +33 -12
  17. package/actions/list-members-in-channel/list-members-in-channel.mjs +30 -5
  18. package/actions/list-replies/list-replies.mjs +32 -5
  19. package/actions/list-users/list-users.mjs +32 -5
  20. package/actions/reply-to-a-message/reply-to-a-message.mjs +1 -1
  21. package/actions/send-block-kit-message/send-block-kit-message.mjs +1 -1
  22. package/actions/send-large-message/send-large-message.mjs +8 -5
  23. package/actions/send-message/send-message.mjs +1 -1
  24. package/actions/send-message-advanced/send-message-advanced.mjs +1 -1
  25. package/actions/send-message-to-channel/send-message-to-channel.mjs +1 -1
  26. package/actions/send-message-to-user-or-group/send-message-to-user-or-group.mjs +1 -1
  27. package/actions/set-channel-description/set-channel-description.mjs +2 -2
  28. package/actions/set-channel-topic/set-channel-topic.mjs +2 -2
  29. package/actions/set-status/set-status.mjs +2 -2
  30. package/actions/update-group-members/update-group-members.mjs +3 -3
  31. package/actions/update-message/update-message.mjs +2 -2
  32. package/actions/update-profile/update-profile.mjs +2 -2
  33. package/actions/upload-file/upload-file.mjs +51 -7
  34. package/actions/verify-slack-signature/verify-slack-signature.mjs +1 -1
  35. package/common/constants.mjs +1 -1
  36. package/package.json +2 -2
  37. package/slack.app.mjs +267 -56
  38. package/sources/common/base.mjs +6 -6
  39. package/sources/new-channel-created/new-channel-created.mjs +1 -1
  40. package/sources/new-direct-message/new-direct-message.mjs +1 -1
  41. package/sources/new-interaction-event-received/new-interaction-event-received.mjs +1 -1
  42. package/sources/new-keyword-mention/new-keyword-mention.mjs +1 -1
  43. package/sources/new-message-in-channels/new-message-in-channels.mjs +1 -1
  44. package/sources/new-reaction-added/new-reaction-added.mjs +1 -1
  45. package/sources/new-saved-message/new-saved-message.mjs +1 -1
  46. package/sources/new-user-added/new-user-added.mjs +1 -1
  47. package/sources/new-user-mention/new-user-mention.mjs +1 -1
@@ -4,7 +4,7 @@ export default {
4
4
  key: "slack-add-emoji-reaction",
5
5
  name: "Add Emoji Reaction",
6
6
  description: "Add an emoji reaction to a message. [See the documentation](https://api.slack.com/methods/reactions.add)",
7
- version: "0.0.13",
7
+ version: "0.0.15",
8
8
  type: "action",
9
9
  props: {
10
10
  slack,
@@ -32,7 +32,7 @@ export default {
32
32
  },
33
33
  },
34
34
  async run({ $ }) {
35
- const response = await this.slack.sdk().reactions.add({
35
+ const response = await this.slack.addReactions({
36
36
  channel: this.conversation,
37
37
  timestamp: this.timestamp,
38
38
  name: this.icon_emoji,
@@ -5,7 +5,7 @@ export default {
5
5
  key: "slack-approve-workflow",
6
6
  name: "Approve Workflow",
7
7
  description: "Suspend the workflow until approved by a Slack message. [See the documentation](https://pipedream.com/docs/code/nodejs/rerun#flowsuspend)",
8
- version: "0.0.2",
8
+ version: "0.0.4",
9
9
  type: "action",
10
10
  props: {
11
11
  slack,
@@ -44,7 +44,7 @@ export default {
44
44
  resume_url, cancel_url,
45
45
  } = $.flow.suspend();
46
46
 
47
- const response = await this.slack.sdk().chat.postMessage({
47
+ const response = await this.slack.postChatMessage({
48
48
  text: "Click here to approve or cancel workflow",
49
49
  blocks: [
50
50
  {
@@ -5,7 +5,7 @@ export default {
5
5
  key: "slack-archive-channel",
6
6
  name: "Archive Channel",
7
7
  description: "Archive a channel. [See the documentation](https://api.slack.com/methods/conversations.archive)",
8
- version: "0.0.21",
8
+ version: "0.0.23",
9
9
  type: "action",
10
10
  props: {
11
11
  slack,
@@ -24,7 +24,7 @@ export default {
24
24
  },
25
25
  },
26
26
  async run({ $ }) {
27
- const response = await this.slack.sdk().conversations.archive({
27
+ const response = await this.slack.archiveConversations({
28
28
  channel: this.conversation,
29
29
  });
30
30
  $.export("$summary", "Successfully archived channel.");
@@ -235,16 +235,18 @@ export default {
235
235
 
236
236
  if (this.post_at) {
237
237
  obj.post_at = Math.floor(new Date(this.post_at).getTime() / 1000);
238
- return await this.slack.sdk().chat.scheduleMessage(obj);
238
+ return await this.slack.scheduleMessage(obj);
239
239
  }
240
- const resp = await this.slack.sdk().chat.postMessage(obj);
240
+ const resp = await this.slack.postChatMessage(obj);
241
241
  const { channel } = await this.slack.conversationsInfo({
242
242
  channel: resp.channel,
243
243
  });
244
244
  let channelName = `#${channel?.name}`;
245
245
  if (channel.is_im) {
246
- const usernames = await this.slack.userNames();
247
- channelName = `@${usernames[channel.user]}`;
246
+ const { profile } = await this.slack.getUserProfile({
247
+ user: channel.user,
248
+ });
249
+ channelName = `@${profile.real_name}`;
248
250
  } else if (channel.is_mpim) {
249
251
  channelName = `@${channel.purpose.value}`;
250
252
  }
@@ -4,7 +4,7 @@ export default {
4
4
  key: "slack-create-channel",
5
5
  name: "Create a Channel",
6
6
  description: "Create a new channel. [See the documentation](https://api.slack.com/methods/conversations.create)",
7
- version: "0.0.22",
7
+ version: "0.0.24",
8
8
  type: "action",
9
9
  props: {
10
10
  slack,
@@ -25,7 +25,7 @@ export default {
25
25
  // parse name
26
26
  const name = this.channelName.replace(/\s+/g, "-").toLowerCase();
27
27
 
28
- const response = await this.slack.sdk().conversations.create({
28
+ const response = await this.slack.createConversations({
29
29
  name,
30
30
  is_private: this.isPrivate,
31
31
  });
@@ -4,7 +4,7 @@ export default {
4
4
  key: "slack-create-reminder",
5
5
  name: "Create Reminder",
6
6
  description: "Create a reminder. [See the documentation](https://api.slack.com/methods/reminders.add)",
7
- version: "0.0.22",
7
+ version: "0.0.24",
8
8
  type: "action",
9
9
  props: {
10
10
  slack,
@@ -35,7 +35,7 @@ export default {
35
35
  },
36
36
  },
37
37
  async run({ $ }) {
38
- const response = await this.slack.sdk().reminders.add({
38
+ const response = await this.slack.addReminders({
39
39
  text: this.text,
40
40
  team_id: this.team_id,
41
41
  time: this.timestamp,
@@ -4,19 +4,28 @@ export default {
4
4
  key: "slack-delete-file",
5
5
  name: "Delete File",
6
6
  description: "Delete a file. [See the documentation](https://api.slack.com/methods/files.delete)",
7
- version: "0.0.21",
7
+ version: "0.0.23",
8
8
  type: "action",
9
9
  props: {
10
10
  slack,
11
+ conversation: {
12
+ propDefinition: [
13
+ slack,
14
+ "conversation",
15
+ ],
16
+ },
11
17
  file: {
12
18
  propDefinition: [
13
19
  slack,
14
20
  "file",
21
+ (c) => ({
22
+ channel: c.conversation,
23
+ }),
15
24
  ],
16
25
  },
17
26
  },
18
27
  async run({ $ }) {
19
- const response = await this.slack.sdk().files.delete({
28
+ const response = await this.slack.deleteFiles({
20
29
  file: this.file,
21
30
  });
22
31
  $.export("$summary", `Successfully deleted file with ID ${this.file}`);
@@ -4,7 +4,7 @@ export default {
4
4
  key: "slack-delete-message",
5
5
  name: "Delete Message",
6
6
  description: "Delete a message. [See the documentation](https://api.slack.com/methods/chat.delete)",
7
- version: "0.0.21",
7
+ version: "0.0.23",
8
8
  type: "action",
9
9
  props: {
10
10
  slack,
@@ -29,7 +29,7 @@ export default {
29
29
  },
30
30
  },
31
31
  async run({ $ }) {
32
- const response = await this.slack.sdk().chat.delete({
32
+ const response = await this.slack.deleteMessage({
33
33
  channel: this.conversation,
34
34
  ts: this.timestamp,
35
35
  as_user: this.as_user,
@@ -4,7 +4,7 @@ export default {
4
4
  key: "slack-find-message",
5
5
  name: "Find Message",
6
6
  description: "Find a Slack message. [See the documentation](https://api.slack.com/methods/search.messages)",
7
- version: "0.0.21",
7
+ version: "0.0.24",
8
8
  type: "action",
9
9
  props: {
10
10
  slack,
@@ -21,12 +21,41 @@ export default {
21
21
  ],
22
22
  optional: true,
23
23
  },
24
+ maxResults: {
25
+ type: "integer",
26
+ label: "Max Results",
27
+ description: "The maximum number of messages to return",
28
+ default: 100,
29
+ optional: true,
30
+ },
31
+ sort: {
32
+ type: "string",
33
+ label: "Sort",
34
+ description: "Return matches sorted by either `score` or `timestamp`",
35
+ options: [
36
+ "score",
37
+ "timestamp",
38
+ ],
39
+ optional: true,
40
+ },
41
+ sortDirection: {
42
+ type: "string",
43
+ label: "Sort Direction",
44
+ description: "Sort ascending (asc) or descending (desc)`",
45
+ options: [
46
+ "desc",
47
+ "asc",
48
+ ],
49
+ optional: true,
50
+ },
24
51
  },
25
52
  async run({ $ }) {
26
53
  const matches = [];
27
54
  const params = {
28
55
  query: this.query,
29
56
  team_id: this.teamId,
57
+ sort: this.sort,
58
+ sort_dir: this.sortDirection,
30
59
  page: 1,
31
60
  };
32
61
  let hasMore;
@@ -34,10 +63,17 @@ export default {
34
63
  do {
35
64
  const { messages } = await this.slack.searchMessages(params);
36
65
  matches.push(...messages.matches);
66
+ if (matches.length >= this.maxResults) {
67
+ break;
68
+ }
37
69
  hasMore = messages?.length;
38
70
  params.page++;
39
71
  } while (hasMore);
40
72
 
73
+ if (matches.length > this.maxResults) {
74
+ matches.length = this.maxResults;
75
+ }
76
+
41
77
  $.export("$summary", `Found ${matches.length} matching message${matches.length === 1
42
78
  ? ""
43
79
  : "s"}`);
@@ -4,7 +4,7 @@ export default {
4
4
  key: "slack-find-user-by-email",
5
5
  name: "Find User by Email",
6
6
  description: "Find a user by matching against their email. [See the documentation](https://api.slack.com/methods/users.lookupByEmail)",
7
- version: "0.0.21",
7
+ version: "0.0.23",
8
8
  type: "action",
9
9
  props: {
10
10
  slack,
@@ -16,7 +16,7 @@ export default {
16
16
  },
17
17
  },
18
18
  async run({ $ }) {
19
- const response = await this.slack.sdk().users.lookupByEmail({
19
+ const response = await this.slack.lookupUserByEmail({
20
20
  email: this.email,
21
21
  });
22
22
  if (response.ok) {
@@ -4,19 +4,28 @@ export default {
4
4
  key: "slack-get-file",
5
5
  name: "Get File",
6
6
  description: "Return information about a file. [See the documentation](https://api.slack.com/methods/files.info)",
7
- version: "0.0.21",
7
+ version: "0.0.23",
8
8
  type: "action",
9
9
  props: {
10
10
  slack,
11
+ conversation: {
12
+ propDefinition: [
13
+ slack,
14
+ "conversation",
15
+ ],
16
+ },
11
17
  file: {
12
18
  propDefinition: [
13
19
  slack,
14
20
  "file",
21
+ (c) => ({
22
+ channel: c.conversation,
23
+ }),
15
24
  ],
16
25
  },
17
26
  },
18
27
  async run({ $ }) {
19
- const response = await this.slack.sdk().files.info({
28
+ const response = await this.slack.getFileInfo({
20
29
  file: this.file,
21
30
  });
22
31
  $.export("$summary", `Successfully retrieved file with ID ${this.file}`);
@@ -4,7 +4,7 @@ export default {
4
4
  key: "slack-invite-user-to-channel",
5
5
  name: "Invite User to Channel",
6
6
  description: "Invite a user to an existing channel. [See the documentation](https://api.slack.com/methods/conversations.invite)",
7
- version: "0.0.21",
7
+ version: "0.0.23",
8
8
  type: "action",
9
9
  props: {
10
10
  slack,
@@ -22,11 +22,19 @@ export default {
22
22
  },
23
23
  },
24
24
  async run({ $ }) {
25
- const response = await this.slack.sdk().conversations.invite({
26
- channel: this.conversation,
27
- users: this.user,
28
- });
29
- $.export("$summary", `Successfully invited user ${this.user} to channel with ID ${this.conversation}`);
30
- return response;
25
+ try {
26
+ const response = await this.slack.inviteToConversation({
27
+ channel: this.conversation,
28
+ users: this.user,
29
+ });
30
+ $.export("$summary", `Successfully invited user ${this.user} to channel with ID ${this.conversation}`);
31
+ return response;
32
+ } catch (error) {
33
+ if (error.includes("already_in_channel")) {
34
+ $.export("$summary", `The user ${this.user} is already in the channel`);
35
+ return;
36
+ }
37
+ throw error;
38
+ }
31
39
  },
32
40
  };
@@ -5,7 +5,7 @@ export default {
5
5
  key: "slack-kick-user",
6
6
  name: "Kick User",
7
7
  description: "Remove a user from a conversation. [See the documentation](https://api.slack.com/methods/conversations.kick)",
8
- version: "0.0.21",
8
+ version: "0.0.23",
9
9
  type: "action",
10
10
  props: {
11
11
  slack,
@@ -33,11 +33,19 @@ export default {
33
33
  },
34
34
  },
35
35
  async run({ $ }) {
36
- const response = await this.slack.sdk().conversations.kick({
37
- channel: this.conversation,
38
- user: this.user,
39
- });
40
- $.export("$summary", `Successfully kicked user ${this.user} from channel with ID ${this.conversation}`);
41
- return response;
36
+ try {
37
+ const response = await this.slack.kickUserFromConversation({
38
+ channel: this.conversation,
39
+ user: this.user,
40
+ });
41
+ $.export("$summary", `Successfully kicked user ${this.user} from channel with ID ${this.conversation}`);
42
+ return response;
43
+ } catch (error) {
44
+ if (error.includes("not_in_channel")) {
45
+ $.export("$summary", `The user ${this.user} is not in the channel`);
46
+ return;
47
+ }
48
+ throw error;
49
+ }
42
50
  },
43
51
  };
@@ -4,16 +4,44 @@ export default {
4
4
  key: "slack-list-channels",
5
5
  name: "List Channels",
6
6
  description: "Return a list of all channels in a workspace. [See the documentation](https://api.slack.com/methods/conversations.list)",
7
- version: "0.0.21",
7
+ version: "0.0.23",
8
8
  type: "action",
9
9
  props: {
10
10
  slack,
11
+ pageSize: {
12
+ propDefinition: [
13
+ slack,
14
+ "pageSize",
15
+ ],
16
+ },
17
+ numPages: {
18
+ propDefinition: [
19
+ slack,
20
+ "numPages",
21
+ ],
22
+ },
11
23
  },
12
24
  async run({ $ }) {
13
- const response = await this.slack.sdk().conversations.list();
14
- $.export("$summary", `Successfully found ${response.length} channel${response.length === 1
25
+ const allChannels = [];
26
+ const params = {
27
+ limit: this.pageSize,
28
+ };
29
+ let page = 0;
30
+
31
+ do {
32
+ const {
33
+ channels, response_metadata: { next_cursor: nextCursor },
34
+ } = await this.slack.conversationsList(params);
35
+ allChannels.push(...channels);
36
+ params.cursor = nextCursor;
37
+ page++;
38
+ } while (params.cursor && page < this.numPages);
39
+
40
+ $.export("$summary", `Successfully found ${allChannels.length} channel${allChannels.length === 1
15
41
  ? ""
16
42
  : "s"}`);
17
- return response;
43
+ return {
44
+ channels: allChannels,
45
+ };
18
46
  },
19
47
  };
@@ -4,7 +4,7 @@ export default {
4
4
  key: "slack-list-files",
5
5
  name: "List Files",
6
6
  description: "Return a list of files within a team. [See the documentation](https://api.slack.com/methods/files.list)",
7
- version: "0.0.49",
7
+ version: "0.0.51",
8
8
  type: "action",
9
9
  props: {
10
10
  slack,
@@ -28,6 +28,18 @@ export default {
28
28
  ],
29
29
  optional: true,
30
30
  },
31
+ pageSize: {
32
+ propDefinition: [
33
+ slack,
34
+ "pageSize",
35
+ ],
36
+ },
37
+ numPages: {
38
+ propDefinition: [
39
+ slack,
40
+ "numPages",
41
+ ],
42
+ },
31
43
  },
32
44
  async run({ $ }) {
33
45
  const allFiles = [];
@@ -36,15 +48,16 @@ export default {
36
48
  user: this.user,
37
49
  team_id: this.team_id,
38
50
  page: 1,
51
+ count: this.pageSize,
39
52
  };
40
53
  let hasMore;
41
54
 
42
55
  do {
43
- const { files } = await this.slack.sdk().files.list(params);
56
+ const { files } = await this.slack.listFiles(params);
44
57
  allFiles.push(...files);
45
58
  hasMore = files.length;
46
59
  params.page++;
47
- } while (hasMore);
60
+ } while (hasMore && params.page <= this.numPages);
48
61
 
49
62
  $.export("$summary", `Successfully retrieved ${allFiles.length} file${allFiles.length === 1
50
63
  ? ""
@@ -4,7 +4,7 @@ export default {
4
4
  key: "slack-list-group-members",
5
5
  name: "List Group Members",
6
6
  description: "List all users in a User Group. [See the documentation](https://api.slack.com/methods/usergroups.users.list)",
7
- version: "0.0.6",
7
+ version: "0.0.8",
8
8
  type: "action",
9
9
  props: {
10
10
  slack,
@@ -22,21 +22,42 @@ export default {
22
22
  optional: true,
23
23
  description: "Encoded team id where the user group exists, required if org token is used.",
24
24
  },
25
+ pageSize: {
26
+ propDefinition: [
27
+ slack,
28
+ "pageSize",
29
+ ],
30
+ },
31
+ numPages: {
32
+ propDefinition: [
33
+ slack,
34
+ "numPages",
35
+ ],
36
+ },
25
37
  },
26
38
  async run({ $ }) {
27
- const {
28
- userGroup,
29
- team,
30
- } = this;
31
- const response = await this.slack.sdk().usergroups.users.list({
32
- usergroup: userGroup,
33
- team_id: team,
34
- });
35
- if (response.users?.length) {
36
- $.export("$summary", `Successfully retrieved ${response.users.length} user${response.users.length === 1
39
+ const members = [];
40
+ const params = {
41
+ usergroup: this.userGroup,
42
+ team_id: this.team,
43
+ limit: this.pageSize,
44
+ };
45
+ let page = 0;
46
+
47
+ do {
48
+ const {
49
+ users, response_metadata: { next_cursor: nextCursor },
50
+ } = await this.slack.listGroupMembers(params);
51
+ members.push(...users);
52
+ params.cursor = nextCursor;
53
+ page++;
54
+ } while (params.cursor && page < this.numPages);
55
+
56
+ if (members?.length) {
57
+ $.export("$summary", `Successfully retrieved ${members.length} user${members.length === 1
37
58
  ? ""
38
59
  : "s"}`);
39
60
  }
40
- return response;
61
+ return members;
41
62
  },
42
63
  };
@@ -4,7 +4,7 @@ export default {
4
4
  key: "slack-list-members-in-channel",
5
5
  name: "List Members in Channel",
6
6
  description: "Retrieve members of a channel. [See the documentation](https://api.slack.com/methods/conversations.members)",
7
- version: "0.0.21",
7
+ version: "0.0.23",
8
8
  type: "action",
9
9
  props: {
10
10
  slack,
@@ -20,19 +20,44 @@ export default {
20
20
  description: "Optionally, return usernames in addition to IDs",
21
21
  optional: true,
22
22
  },
23
+ pageSize: {
24
+ propDefinition: [
25
+ slack,
26
+ "pageSize",
27
+ ],
28
+ },
29
+ numPages: {
30
+ propDefinition: [
31
+ slack,
32
+ "numPages",
33
+ ],
34
+ },
23
35
  },
24
36
  async run({ $ }) {
25
- const { members } = await this.slack.sdk().conversations.members({
37
+ let channelMembers = [];
38
+ const params = {
26
39
  channel: this.conversation,
27
- });
28
- let channelMembers = members;
40
+ limit: this.pageSize,
41
+ };
42
+ let page = 0;
43
+
44
+ do {
45
+ const {
46
+ members, response_metadata: { next_cursor: nextCursor },
47
+ } = await this.slack.listChannelMembers(params);
48
+ channelMembers.push(...members);
49
+ params.cursor = nextCursor;
50
+ page++;
51
+ } while (params.cursor && page < this.numPages);
52
+
29
53
  if (this.returnUsernames) {
30
- const usernames = await this.slack.userNames();
54
+ const usernames = await this.slack.userNameLookup(channelMembers);
31
55
  channelMembers = channelMembers?.map((id) => ({
32
56
  id,
33
57
  username: usernames[id],
34
58
  })) || [];
35
59
  }
60
+
36
61
  $.export("$summary", `Successfully retrieved ${channelMembers.length} member${channelMembers.length === 1
37
62
  ? ""
38
63
  : "s"}`);
@@ -4,7 +4,7 @@ export default {
4
4
  key: "slack-list-replies",
5
5
  name: "List Replies",
6
6
  description: "Retrieve a thread of messages posted to a conversation. [See the documentation](https://api.slack.com/methods/conversations.replies)",
7
- version: "0.0.21",
7
+ version: "0.0.23",
8
8
  type: "action",
9
9
  props: {
10
10
  slack,
@@ -20,15 +20,42 @@ export default {
20
20
  "messageTs",
21
21
  ],
22
22
  },
23
+ pageSize: {
24
+ propDefinition: [
25
+ slack,
26
+ "pageSize",
27
+ ],
28
+ },
29
+ numPages: {
30
+ propDefinition: [
31
+ slack,
32
+ "numPages",
33
+ ],
34
+ },
23
35
  },
24
36
  async run({ $ }) {
25
- const response = await this.slack.sdk().conversations.replies({
37
+ const replies = [];
38
+ const params = {
26
39
  channel: this.conversation,
27
40
  ts: this.timestamp,
28
- });
29
- $.export("$summary", `Successfully retrieved ${response.messages.length} reply message${response.messages.length === 1
41
+ limit: this.pageSize,
42
+ };
43
+ let page = 0;
44
+
45
+ do {
46
+ const {
47
+ messages, response_metadata: { next_cursor: nextCursor },
48
+ } = await this.slack.getConversationReplies(params);
49
+ replies.push(...messages);
50
+ params.cursor = nextCursor;
51
+ page++;
52
+ } while (params.cursor && page < this.numPages);
53
+
54
+ $.export("$summary", `Successfully retrieved ${replies.length} reply message${replies.length === 1
30
55
  ? ""
31
56
  : "s"}`);
32
- return response;
57
+ return {
58
+ messages: replies,
59
+ };
33
60
  },
34
61
  };