@pipedream/twitter 2.0.2 → 2.1.1

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 (74) hide show
  1. package/dist/actions/add-user-to-list/add-user-to-list.d.ts +12 -6
  2. package/dist/actions/add-user-to-list/add-user-to-list.mjs +2 -2
  3. package/dist/actions/create-tweet/create-tweet.d.ts +4 -2
  4. package/dist/actions/create-tweet/create-tweet.mjs +2 -2
  5. package/dist/actions/delete-tweet/delete-tweet.d.ts +8 -4
  6. package/dist/actions/delete-tweet/delete-tweet.mjs +2 -2
  7. package/dist/actions/follow-user/follow-user.d.ts +8 -4
  8. package/dist/actions/follow-user/follow-user.mjs +2 -2
  9. package/dist/actions/get-tweet/get-tweet.d.ts +8 -4
  10. package/dist/actions/get-tweet/get-tweet.mjs +2 -2
  11. package/dist/actions/get-user/get-user.d.ts +8 -4
  12. package/dist/actions/get-user/get-user.mjs +2 -2
  13. package/dist/actions/like-tweet/like-tweet.d.ts +8 -4
  14. package/dist/actions/like-tweet/like-tweet.mjs +2 -2
  15. package/dist/actions/list-favorites/list-favorites.d.ts +12 -6
  16. package/dist/actions/list-favorites/list-favorites.mjs +2 -2
  17. package/dist/actions/list-followers/list-followers.d.ts +12 -6
  18. package/dist/actions/list-followers/list-followers.mjs +2 -2
  19. package/dist/actions/list-lists/list-lists.d.ts +12 -6
  20. package/dist/actions/list-lists/list-lists.mjs +2 -2
  21. package/dist/actions/list-mentions/list-mentions.d.ts +12 -6
  22. package/dist/actions/list-mentions/list-mentions.mjs +2 -2
  23. package/dist/actions/list-user-tweets/list-user-tweets.d.ts +12 -6
  24. package/dist/actions/list-user-tweets/list-user-tweets.mjs +2 -2
  25. package/dist/actions/retweet/retweet.d.ts +8 -4
  26. package/dist/actions/retweet/retweet.mjs +2 -2
  27. package/dist/actions/send-dm/send-dm.d.ts +144 -0
  28. package/dist/actions/send-dm/send-dm.mjs +50 -0
  29. package/dist/actions/simple-search/simple-search.d.ts +12 -6
  30. package/dist/actions/simple-search/simple-search.mjs +2 -2
  31. package/dist/actions/simple-search-in-list/simple-search-in-list.d.ts +12 -6
  32. package/dist/actions/simple-search-in-list/simple-search-in-list.mjs +2 -2
  33. package/dist/actions/unfollow-user/unfollow-user.d.ts +8 -4
  34. package/dist/actions/unfollow-user/unfollow-user.mjs +2 -2
  35. package/dist/actions/unlike-tweet/unlike-tweet.d.ts +8 -4
  36. package/dist/actions/unlike-tweet/unlike-tweet.mjs +2 -2
  37. package/dist/actions/upload-media/upload-media.d.ts +4 -2
  38. package/dist/actions/upload-media/upload-media.mjs +13 -10
  39. package/dist/app/twitter.app.d.ts +6 -4
  40. package/dist/app/twitter.app.mjs +38 -8
  41. package/dist/common/dataFields.d.ts +2 -0
  42. package/dist/common/dataFields.mjs +17 -0
  43. package/dist/common/expansions.d.ts +1 -0
  44. package/dist/common/expansions.mjs +6 -0
  45. package/dist/common/methods.d.ts +7 -0
  46. package/dist/common/methods.mjs +21 -2
  47. package/dist/common/types/fields.d.ts +7 -0
  48. package/dist/common/types/requestParams.d.ts +16 -3
  49. package/dist/common/types/responseSchemas.d.ts +11 -1
  50. package/dist/sources/common/base.d.ts +4 -2
  51. package/dist/sources/common/getItemSummary.d.ts +2 -2
  52. package/dist/sources/common/getItemSummary.mjs +3 -3
  53. package/dist/sources/new-follower-of-user/new-follower-of-user.d.ts +8 -4
  54. package/dist/sources/new-follower-of-user/new-follower-of-user.mjs +2 -2
  55. package/dist/sources/new-list-followed/new-list-followed.d.ts +8 -4
  56. package/dist/sources/new-list-followed/new-list-followed.mjs +2 -2
  57. package/dist/sources/new-message/new-message.d.ts +87 -0
  58. package/dist/sources/new-message/new-message.mjs +35 -0
  59. package/dist/sources/new-tweet-in-list/new-tweet-in-list.d.ts +8 -4
  60. package/dist/sources/new-tweet-in-list/new-tweet-in-list.mjs +2 -2
  61. package/dist/sources/new-tweet-liked-by-user/new-tweet-liked-by-user.d.ts +8 -4
  62. package/dist/sources/new-tweet-liked-by-user/new-tweet-liked-by-user.mjs +2 -2
  63. package/dist/sources/new-tweet-metrics/new-tweet-metrics.d.ts +158 -0
  64. package/dist/sources/new-tweet-metrics/new-tweet-metrics.mjs +66 -0
  65. package/dist/sources/new-tweet-posted-by-user/new-tweet-posted-by-user.d.ts +8 -4
  66. package/dist/sources/new-tweet-posted-by-user/new-tweet-posted-by-user.mjs +2 -2
  67. package/dist/sources/new-tweet-posted-matching-query/new-tweet-posted-matching-query.d.ts +8 -4
  68. package/dist/sources/new-tweet-posted-matching-query/new-tweet-posted-matching-query.mjs +2 -2
  69. package/dist/sources/new-unfollower-of-user/new-unfollower-of-user.d.ts +8 -4
  70. package/dist/sources/new-unfollower-of-user/new-unfollower-of-user.mjs +2 -2
  71. package/dist/sources/new-user-followed/new-user-followed.d.ts +8 -4
  72. package/dist/sources/new-user-followed/new-user-followed.mjs +2 -2
  73. package/dist/tsconfig.tsbuildinfo +1 -1
  74. package/package.json +2 -1
@@ -18,7 +18,7 @@ declare const _default: import("@pipedream/types").Source<{
18
18
  propDefinition: (string | import("@pipedream/types").App<{
19
19
  _getAuthHeader(config: import("../../common/types/requestParams.js").HttpRequestParams): import("oauth-1.0a").Header;
20
20
  _getBaseUrl(): "https://api.twitter.com/2";
21
- _httpRequest({ $, ...args }: import("../../common/types/requestParams.js").HttpRequestParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").TwitterEntity>>;
21
+ _httpRequest({ $, specialAuth, ...args }: import("../../common/types/requestParams.js").HttpRequestParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").TwitterEntity>>;
22
22
  _paginatedRequest({ maxResults, maxPerPage, params, ...args }: import("../../common/types/requestParams.js").PaginatedRequestParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").TwitterEntity>>;
23
23
  addUserToList({ listId, ...args }: import("../../common/types/requestParams.js").AddUserToListParams): Promise<object>;
24
24
  createTweet(args: import("../../common/types/requestParams.js").CreateTweetParams): Promise<object>;
@@ -28,6 +28,7 @@ declare const _default: import("@pipedream/types").Source<{
28
28
  getTweet({ tweetId, ...args }: import("../../common/types/requestParams.js").GetTweetParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").Tweet>>;
29
29
  getAuthenticatedUser(args: import("../../common/types/requestParams.js").GetAuthenticatedUserParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").User>>;
30
30
  getAuthenticatedUserId(): Promise<string>;
31
+ getDirectMessages(args: import("../../common/types/requestParams.js").GetDirectMessagesParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").DirectMessage>>;
31
32
  getUserLikedTweets({ userId, ...args }: import("../../common/types/requestParams.js").GetUserLikedTweetParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
32
33
  getUserOwnedLists({ userId, ...args }: import("../../common/types/requestParams.js").GetUserOwnedListsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<List>>;
33
34
  getUserFollowedLists({ userId, ...args }: GetUserFollowedListsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<List>>;
@@ -40,9 +41,10 @@ declare const _default: import("@pipedream/types").Source<{
40
41
  getUserFollowing({ userId, ...args }: import("../../common/types/requestParams.js").GetUserFollowersParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").User>>;
41
42
  retweet(args: import("../../common/types/requestParams.js").LikeTweetParams): Promise<object>;
42
43
  searchTweets(args: import("../../common/types/requestParams.js").SearchTweetsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
44
+ sendMessage({ userId, ...args }: import("../../common/types/requestParams.js").SendMessageParams): Promise<object>;
43
45
  unfollowUser({ userId, ...args }: import("../../common/types/requestParams.js").UnfollowUserParams): Promise<object>;
44
46
  unlikeTweet({ tweetId, ...args }: import("../../common/types/requestParams.js").UnlikeTweetParams): Promise<object>;
45
- uploadMedia({ ...args }: import("../../common/types/requestParams.js").UploadMediaParams): Promise<object>;
47
+ uploadMedia(args: import("../../common/types/requestParams.js").UploadMediaParams): Promise<object>;
46
48
  }, {
47
49
  maxResults: {
48
50
  type: string;
@@ -81,7 +83,7 @@ declare const _default: import("@pipedream/types").Source<{
81
83
  app: import("@pipedream/types").App<{
82
84
  _getAuthHeader(config: import("../../common/types/requestParams.js").HttpRequestParams): import("oauth-1.0a").Header;
83
85
  _getBaseUrl(): "https://api.twitter.com/2";
84
- _httpRequest({ $, ...args }: import("../../common/types/requestParams.js").HttpRequestParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").TwitterEntity>>;
86
+ _httpRequest({ $, specialAuth, ...args }: import("../../common/types/requestParams.js").HttpRequestParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").TwitterEntity>>;
85
87
  _paginatedRequest({ maxResults, maxPerPage, params, ...args }: import("../../common/types/requestParams.js").PaginatedRequestParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").TwitterEntity>>;
86
88
  addUserToList({ listId, ...args }: import("../../common/types/requestParams.js").AddUserToListParams): Promise<object>;
87
89
  createTweet(args: import("../../common/types/requestParams.js").CreateTweetParams): Promise<object>;
@@ -91,6 +93,7 @@ declare const _default: import("@pipedream/types").Source<{
91
93
  getTweet({ tweetId, ...args }: import("../../common/types/requestParams.js").GetTweetParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").Tweet>>;
92
94
  getAuthenticatedUser(args: import("../../common/types/requestParams.js").GetAuthenticatedUserParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").User>>;
93
95
  getAuthenticatedUserId(): Promise<string>;
96
+ getDirectMessages(args: import("../../common/types/requestParams.js").GetDirectMessagesParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").DirectMessage>>;
94
97
  getUserLikedTweets({ userId, ...args }: import("../../common/types/requestParams.js").GetUserLikedTweetParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
95
98
  getUserOwnedLists({ userId, ...args }: import("../../common/types/requestParams.js").GetUserOwnedListsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<List>>;
96
99
  getUserFollowedLists({ userId, ...args }: GetUserFollowedListsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<List>>;
@@ -103,9 +106,10 @@ declare const _default: import("@pipedream/types").Source<{
103
106
  getUserFollowing({ userId, ...args }: import("../../common/types/requestParams.js").GetUserFollowersParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").User>>;
104
107
  retweet(args: import("../../common/types/requestParams.js").LikeTweetParams): Promise<object>;
105
108
  searchTweets(args: import("../../common/types/requestParams.js").SearchTweetsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
109
+ sendMessage({ userId, ...args }: import("../../common/types/requestParams.js").SendMessageParams): Promise<object>;
106
110
  unfollowUser({ userId, ...args }: import("../../common/types/requestParams.js").UnfollowUserParams): Promise<object>;
107
111
  unlikeTweet({ tweetId, ...args }: import("../../common/types/requestParams.js").UnlikeTweetParams): Promise<object>;
108
- uploadMedia({ ...args }: import("../../common/types/requestParams.js").UploadMediaParams): Promise<object>;
112
+ uploadMedia(args: import("../../common/types/requestParams.js").UploadMediaParams): Promise<object>;
109
113
  }, {
110
114
  maxResults: {
111
115
  type: string;
@@ -10,8 +10,8 @@ export default defineSource({
10
10
  ...common,
11
11
  key: "twitter-new-list-followed",
12
12
  name: "New List Followed by User",
13
- description: `Emit new event when the specified User follows a List [See docs here](${DOCS_LINK})`,
14
- version: "2.0.1",
13
+ description: `Emit new event when the specified User follows a List [See the documentation](${DOCS_LINK})`,
14
+ version: "2.0.3",
15
15
  type: "source",
16
16
  props: {
17
17
  ...common.props,
@@ -0,0 +1,87 @@
1
+ import { getTweetSummary as getItemSummary } from "../common/getItemSummary.js";
2
+ import { getMessageFields } from "../../common/methods.js";
3
+ import { GetDirectMessagesParams } from "../../common/types/requestParams.js";
4
+ import { DirectMessage } from "../../common/types/responseSchemas.js";
5
+ declare const _default: import("@pipedream/types").Source<{
6
+ getMessageFields: typeof getMessageFields;
7
+ getEntityName(): "DM Received";
8
+ getItemSummary: typeof getItemSummary;
9
+ getResources(maxResults?: number): Promise<DirectMessage[]>;
10
+ getSavedIds(): string[];
11
+ setSavedIds(data: string[]): void;
12
+ getAndProcessData(maxResults?: number): Promise<void>;
13
+ emitEvent(data: import("../../common/types/responseSchemas.js").TwitterEntity): void;
14
+ }, {
15
+ app: import("@pipedream/types").App<{
16
+ _getAuthHeader(config: import("../../common/types/requestParams.js").HttpRequestParams): import("oauth-1.0a").Header;
17
+ _getBaseUrl(): "https://api.twitter.com/2";
18
+ _httpRequest({ $, specialAuth, ...args }: import("../../common/types/requestParams.js").HttpRequestParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").TwitterEntity>>;
19
+ _paginatedRequest({ maxResults, maxPerPage, params, ...args }: import("../../common/types/requestParams.js").PaginatedRequestParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").TwitterEntity>>;
20
+ addUserToList({ listId, ...args }: import("../../common/types/requestParams.js").AddUserToListParams): Promise<object>;
21
+ createTweet(args: import("../../common/types/requestParams.js").CreateTweetParams): Promise<object>;
22
+ deleteTweet({ tweetId, ...args }: import("../../common/types/requestParams.js").DeleteTweetParams): Promise<object>;
23
+ followUser(args: import("../../common/types/requestParams.js").FollowUserParams): Promise<object>;
24
+ getListTweets({ listId, ...args }: import("../../common/types/requestParams.js").GetListTweetsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
25
+ getTweet({ tweetId, ...args }: import("../../common/types/requestParams.js").GetTweetParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").Tweet>>;
26
+ getAuthenticatedUser(args: import("../../common/types/requestParams.js").GetAuthenticatedUserParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").User>>;
27
+ getAuthenticatedUserId(): Promise<string>;
28
+ getDirectMessages(args: GetDirectMessagesParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<DirectMessage>>;
29
+ getUserLikedTweets({ userId, ...args }: import("../../common/types/requestParams.js").GetUserLikedTweetParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
30
+ getUserOwnedLists({ userId, ...args }: import("../../common/types/requestParams.js").GetUserOwnedListsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").List>>;
31
+ getUserFollowedLists({ userId, ...args }: import("../../common/types/requestParams.js").GetUserFollowedListsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").List>>;
32
+ getUserMentions({ userId, ...args }: import("../../common/types/requestParams.js").GetUserMentionsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
33
+ getUserTweets({ userId, ...args }: import("../../common/types/requestParams.js").GetUserTweetsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
34
+ getUserByUsername(username: string): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").User>>;
35
+ getUser({ userId, ...args }: import("../../common/types/requestParams.js").GetUserParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").User>>;
36
+ likeTweet(args: import("../../common/types/requestParams.js").LikeTweetParams): Promise<object>;
37
+ getUserFollowers({ userId, ...args }: import("../../common/types/requestParams.js").GetUserFollowersParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").User>>;
38
+ getUserFollowing({ userId, ...args }: import("../../common/types/requestParams.js").GetUserFollowersParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").User>>;
39
+ retweet(args: import("../../common/types/requestParams.js").LikeTweetParams): Promise<object>;
40
+ searchTweets(args: import("../../common/types/requestParams.js").SearchTweetsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
41
+ sendMessage({ userId, ...args }: import("../../common/types/requestParams.js").SendMessageParams): Promise<object>;
42
+ unfollowUser({ userId, ...args }: import("../../common/types/requestParams.js").UnfollowUserParams): Promise<object>;
43
+ unlikeTweet({ tweetId, ...args }: import("../../common/types/requestParams.js").UnlikeTweetParams): Promise<object>;
44
+ uploadMedia(args: import("../../common/types/requestParams.js").UploadMediaParams): Promise<object>;
45
+ }, {
46
+ maxResults: {
47
+ type: string;
48
+ label: string;
49
+ description: string;
50
+ optional: boolean;
51
+ };
52
+ listId: {
53
+ type: string;
54
+ label: string;
55
+ description: string;
56
+ options(): Promise<{
57
+ label: string;
58
+ value: string;
59
+ }[]>;
60
+ };
61
+ userNameOrId: {
62
+ type: string;
63
+ label: string;
64
+ description: string;
65
+ optional: boolean;
66
+ default: string;
67
+ };
68
+ tweetId: {
69
+ type: string;
70
+ label: string;
71
+ description: string;
72
+ };
73
+ query: {
74
+ type: string;
75
+ label: string;
76
+ description: string;
77
+ };
78
+ }>;
79
+ db: string;
80
+ timer: {
81
+ type: string;
82
+ default: {
83
+ intervalSeconds: number;
84
+ };
85
+ };
86
+ }>;
87
+ export default _default;
@@ -0,0 +1,35 @@
1
+ import { defineSource } from "@pipedream/types";
2
+ import common from "../common/base.mjs";
3
+ import { getTweetSummary as getItemSummary } from "../common/getItemSummary.mjs";
4
+ import { getMessageFields } from "../../common/methods.mjs";
5
+ const DOCS_LINK = "https://developer.twitter.com/en/docs/twitter-api/direct-messages/lookup/api-reference/get-dm_events";
6
+ const MAX_RESULTS_PER_PAGE = 100;
7
+ export default defineSource({
8
+ ...common,
9
+ key: "twitter-new-message",
10
+ name: "New Message Received",
11
+ description: `Emit new event when a new Direct Message (DM) is received [See the documentation](${DOCS_LINK})`,
12
+ version: "1.0.1",
13
+ type: "source",
14
+ methods: {
15
+ ...common.methods,
16
+ getMessageFields,
17
+ getEntityName() {
18
+ return "DM Received";
19
+ },
20
+ getItemSummary,
21
+ async getResources(maxResults) {
22
+ const params = {
23
+ $: this,
24
+ maxPerPage: MAX_RESULTS_PER_PAGE,
25
+ maxResults: maxResults ?? MAX_RESULTS_PER_PAGE,
26
+ params: {
27
+ ...this.getMessageFields(),
28
+ event_types: "MessageCreate",
29
+ },
30
+ };
31
+ const { data } = await this.app.getDirectMessages(params);
32
+ return data;
33
+ },
34
+ },
35
+ });
@@ -16,7 +16,7 @@ declare const _default: import("@pipedream/types").Source<{
16
16
  propDefinition: (string | import("@pipedream/types").App<{
17
17
  _getAuthHeader(config: import("../../common/types/requestParams.js").HttpRequestParams): import("oauth-1.0a").Header;
18
18
  _getBaseUrl(): "https://api.twitter.com/2";
19
- _httpRequest({ $, ...args }: import("../../common/types/requestParams.js").HttpRequestParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").TwitterEntity>>;
19
+ _httpRequest({ $, specialAuth, ...args }: import("../../common/types/requestParams.js").HttpRequestParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").TwitterEntity>>;
20
20
  _paginatedRequest({ maxResults, maxPerPage, params, ...args }: import("../../common/types/requestParams.js").PaginatedRequestParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").TwitterEntity>>;
21
21
  addUserToList({ listId, ...args }: import("../../common/types/requestParams.js").AddUserToListParams): Promise<object>;
22
22
  createTweet(args: import("../../common/types/requestParams.js").CreateTweetParams): Promise<object>;
@@ -26,6 +26,7 @@ declare const _default: import("@pipedream/types").Source<{
26
26
  getTweet({ tweetId, ...args }: import("../../common/types/requestParams.js").GetTweetParams): Promise<import("../../common/types/responseSchemas").ResponseObject<Tweet>>;
27
27
  getAuthenticatedUser(args: import("../../common/types/requestParams.js").GetAuthenticatedUserParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").User>>;
28
28
  getAuthenticatedUserId(): Promise<string>;
29
+ getDirectMessages(args: import("../../common/types/requestParams.js").GetDirectMessagesParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").DirectMessage>>;
29
30
  getUserLikedTweets({ userId, ...args }: import("../../common/types/requestParams.js").GetUserLikedTweetParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<Tweet>>;
30
31
  getUserOwnedLists({ userId, ...args }: import("../../common/types/requestParams.js").GetUserOwnedListsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").List>>;
31
32
  getUserFollowedLists({ userId, ...args }: import("../../common/types/requestParams.js").GetUserFollowedListsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").List>>;
@@ -38,9 +39,10 @@ declare const _default: import("@pipedream/types").Source<{
38
39
  getUserFollowing({ userId, ...args }: import("../../common/types/requestParams.js").GetUserFollowersParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").User>>;
39
40
  retweet(args: import("../../common/types/requestParams.js").LikeTweetParams): Promise<object>;
40
41
  searchTweets(args: import("../../common/types/requestParams.js").SearchTweetsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<Tweet>>;
42
+ sendMessage({ userId, ...args }: import("../../common/types/requestParams.js").SendMessageParams): Promise<object>;
41
43
  unfollowUser({ userId, ...args }: import("../../common/types/requestParams.js").UnfollowUserParams): Promise<object>;
42
44
  unlikeTweet({ tweetId, ...args }: import("../../common/types/requestParams.js").UnlikeTweetParams): Promise<object>;
43
- uploadMedia({ ...args }: import("../../common/types/requestParams.js").UploadMediaParams): Promise<object>;
45
+ uploadMedia(args: import("../../common/types/requestParams.js").UploadMediaParams): Promise<object>;
44
46
  }, {
45
47
  maxResults: {
46
48
  type: string;
@@ -79,7 +81,7 @@ declare const _default: import("@pipedream/types").Source<{
79
81
  app: import("@pipedream/types").App<{
80
82
  _getAuthHeader(config: import("../../common/types/requestParams.js").HttpRequestParams): import("oauth-1.0a").Header;
81
83
  _getBaseUrl(): "https://api.twitter.com/2";
82
- _httpRequest({ $, ...args }: import("../../common/types/requestParams.js").HttpRequestParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").TwitterEntity>>;
84
+ _httpRequest({ $, specialAuth, ...args }: import("../../common/types/requestParams.js").HttpRequestParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").TwitterEntity>>;
83
85
  _paginatedRequest({ maxResults, maxPerPage, params, ...args }: import("../../common/types/requestParams.js").PaginatedRequestParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").TwitterEntity>>;
84
86
  addUserToList({ listId, ...args }: import("../../common/types/requestParams.js").AddUserToListParams): Promise<object>;
85
87
  createTweet(args: import("../../common/types/requestParams.js").CreateTweetParams): Promise<object>;
@@ -89,6 +91,7 @@ declare const _default: import("@pipedream/types").Source<{
89
91
  getTweet({ tweetId, ...args }: import("../../common/types/requestParams.js").GetTweetParams): Promise<import("../../common/types/responseSchemas").ResponseObject<Tweet>>;
90
92
  getAuthenticatedUser(args: import("../../common/types/requestParams.js").GetAuthenticatedUserParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").User>>;
91
93
  getAuthenticatedUserId(): Promise<string>;
94
+ getDirectMessages(args: import("../../common/types/requestParams.js").GetDirectMessagesParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").DirectMessage>>;
92
95
  getUserLikedTweets({ userId, ...args }: import("../../common/types/requestParams.js").GetUserLikedTweetParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<Tweet>>;
93
96
  getUserOwnedLists({ userId, ...args }: import("../../common/types/requestParams.js").GetUserOwnedListsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").List>>;
94
97
  getUserFollowedLists({ userId, ...args }: import("../../common/types/requestParams.js").GetUserFollowedListsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").List>>;
@@ -101,9 +104,10 @@ declare const _default: import("@pipedream/types").Source<{
101
104
  getUserFollowing({ userId, ...args }: import("../../common/types/requestParams.js").GetUserFollowersParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").User>>;
102
105
  retweet(args: import("../../common/types/requestParams.js").LikeTweetParams): Promise<object>;
103
106
  searchTweets(args: import("../../common/types/requestParams.js").SearchTweetsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<Tweet>>;
107
+ sendMessage({ userId, ...args }: import("../../common/types/requestParams.js").SendMessageParams): Promise<object>;
104
108
  unfollowUser({ userId, ...args }: import("../../common/types/requestParams.js").UnfollowUserParams): Promise<object>;
105
109
  unlikeTweet({ tweetId, ...args }: import("../../common/types/requestParams.js").UnlikeTweetParams): Promise<object>;
106
- uploadMedia({ ...args }: import("../../common/types/requestParams.js").UploadMediaParams): Promise<object>;
110
+ uploadMedia(args: import("../../common/types/requestParams.js").UploadMediaParams): Promise<object>;
107
111
  }, {
108
112
  maxResults: {
109
113
  type: string;
@@ -8,8 +8,8 @@ export default defineSource({
8
8
  ...common,
9
9
  key: "twitter-new-tweet-in-list",
10
10
  name: "New Tweet Posted in List",
11
- description: `Emit new event when a Tweet is posted in the specified list [See docs here](${DOCS_LINK})`,
12
- version: "2.0.1",
11
+ description: `Emit new event when a Tweet is posted in the specified list [See the documentation](${DOCS_LINK})`,
12
+ version: "2.0.3",
13
13
  type: "source",
14
14
  props: {
15
15
  ...common.props,
@@ -18,7 +18,7 @@ declare const _default: import("@pipedream/types").Source<{
18
18
  propDefinition: (string | import("@pipedream/types").App<{
19
19
  _getAuthHeader(config: import("../../common/types/requestParams.js").HttpRequestParams): import("oauth-1.0a").Header;
20
20
  _getBaseUrl(): "https://api.twitter.com/2";
21
- _httpRequest({ $, ...args }: import("../../common/types/requestParams.js").HttpRequestParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").TwitterEntity>>;
21
+ _httpRequest({ $, specialAuth, ...args }: import("../../common/types/requestParams.js").HttpRequestParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").TwitterEntity>>;
22
22
  _paginatedRequest({ maxResults, maxPerPage, params, ...args }: import("../../common/types/requestParams.js").PaginatedRequestParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").TwitterEntity>>;
23
23
  addUserToList({ listId, ...args }: import("../../common/types/requestParams.js").AddUserToListParams): Promise<object>;
24
24
  createTweet(args: import("../../common/types/requestParams.js").CreateTweetParams): Promise<object>;
@@ -28,6 +28,7 @@ declare const _default: import("@pipedream/types").Source<{
28
28
  getTweet({ tweetId, ...args }: import("../../common/types/requestParams.js").GetTweetParams): Promise<import("../../common/types/responseSchemas").ResponseObject<Tweet>>;
29
29
  getAuthenticatedUser(args: import("../../common/types/requestParams.js").GetAuthenticatedUserParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").User>>;
30
30
  getAuthenticatedUserId(): Promise<string>;
31
+ getDirectMessages(args: import("../../common/types/requestParams.js").GetDirectMessagesParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").DirectMessage>>;
31
32
  getUserLikedTweets({ userId, ...args }: GetUserLikedTweetParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<Tweet>>;
32
33
  getUserOwnedLists({ userId, ...args }: import("../../common/types/requestParams.js").GetUserOwnedListsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").List>>;
33
34
  getUserFollowedLists({ userId, ...args }: import("../../common/types/requestParams.js").GetUserFollowedListsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").List>>;
@@ -40,9 +41,10 @@ declare const _default: import("@pipedream/types").Source<{
40
41
  getUserFollowing({ userId, ...args }: import("../../common/types/requestParams.js").GetUserFollowersParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").User>>;
41
42
  retweet(args: import("../../common/types/requestParams.js").LikeTweetParams): Promise<object>;
42
43
  searchTweets(args: import("../../common/types/requestParams.js").SearchTweetsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<Tweet>>;
44
+ sendMessage({ userId, ...args }: import("../../common/types/requestParams.js").SendMessageParams): Promise<object>;
43
45
  unfollowUser({ userId, ...args }: import("../../common/types/requestParams.js").UnfollowUserParams): Promise<object>;
44
46
  unlikeTweet({ tweetId, ...args }: import("../../common/types/requestParams.js").UnlikeTweetParams): Promise<object>;
45
- uploadMedia({ ...args }: import("../../common/types/requestParams.js").UploadMediaParams): Promise<object>;
47
+ uploadMedia(args: import("../../common/types/requestParams.js").UploadMediaParams): Promise<object>;
46
48
  }, {
47
49
  maxResults: {
48
50
  type: string;
@@ -81,7 +83,7 @@ declare const _default: import("@pipedream/types").Source<{
81
83
  app: import("@pipedream/types").App<{
82
84
  _getAuthHeader(config: import("../../common/types/requestParams.js").HttpRequestParams): import("oauth-1.0a").Header;
83
85
  _getBaseUrl(): "https://api.twitter.com/2";
84
- _httpRequest({ $, ...args }: import("../../common/types/requestParams.js").HttpRequestParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").TwitterEntity>>;
86
+ _httpRequest({ $, specialAuth, ...args }: import("../../common/types/requestParams.js").HttpRequestParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").TwitterEntity>>;
85
87
  _paginatedRequest({ maxResults, maxPerPage, params, ...args }: import("../../common/types/requestParams.js").PaginatedRequestParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").TwitterEntity>>;
86
88
  addUserToList({ listId, ...args }: import("../../common/types/requestParams.js").AddUserToListParams): Promise<object>;
87
89
  createTweet(args: import("../../common/types/requestParams.js").CreateTweetParams): Promise<object>;
@@ -91,6 +93,7 @@ declare const _default: import("@pipedream/types").Source<{
91
93
  getTweet({ tweetId, ...args }: import("../../common/types/requestParams.js").GetTweetParams): Promise<import("../../common/types/responseSchemas").ResponseObject<Tweet>>;
92
94
  getAuthenticatedUser(args: import("../../common/types/requestParams.js").GetAuthenticatedUserParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").User>>;
93
95
  getAuthenticatedUserId(): Promise<string>;
96
+ getDirectMessages(args: import("../../common/types/requestParams.js").GetDirectMessagesParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").DirectMessage>>;
94
97
  getUserLikedTweets({ userId, ...args }: GetUserLikedTweetParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<Tweet>>;
95
98
  getUserOwnedLists({ userId, ...args }: import("../../common/types/requestParams.js").GetUserOwnedListsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").List>>;
96
99
  getUserFollowedLists({ userId, ...args }: import("../../common/types/requestParams.js").GetUserFollowedListsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").List>>;
@@ -103,9 +106,10 @@ declare const _default: import("@pipedream/types").Source<{
103
106
  getUserFollowing({ userId, ...args }: import("../../common/types/requestParams.js").GetUserFollowersParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").User>>;
104
107
  retweet(args: import("../../common/types/requestParams.js").LikeTweetParams): Promise<object>;
105
108
  searchTweets(args: import("../../common/types/requestParams.js").SearchTweetsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<Tweet>>;
109
+ sendMessage({ userId, ...args }: import("../../common/types/requestParams.js").SendMessageParams): Promise<object>;
106
110
  unfollowUser({ userId, ...args }: import("../../common/types/requestParams.js").UnfollowUserParams): Promise<object>;
107
111
  unlikeTweet({ tweetId, ...args }: import("../../common/types/requestParams.js").UnlikeTweetParams): Promise<object>;
108
- uploadMedia({ ...args }: import("../../common/types/requestParams.js").UploadMediaParams): Promise<object>;
112
+ uploadMedia(args: import("../../common/types/requestParams.js").UploadMediaParams): Promise<object>;
109
113
  }, {
110
114
  maxResults: {
111
115
  type: string;
@@ -9,8 +9,8 @@ export default defineSource({
9
9
  ...common,
10
10
  key: "twitter-new-tweet-liked-by-user",
11
11
  name: "New Tweet Liked by User",
12
- description: `Emit new event when a Tweet is liked by the specified User [See docs here](${DOCS_LINK})`,
13
- version: "2.0.1",
12
+ description: `Emit new event when a Tweet is liked by the specified User [See the documentation](${DOCS_LINK})`,
13
+ version: "2.0.3",
14
14
  type: "source",
15
15
  props: {
16
16
  ...common.props,
@@ -0,0 +1,158 @@
1
+ import { GetTweetParams } from "../../common/types/requestParams.js";
2
+ import { Tweet } from "../../common/types/responseSchemas.js";
3
+ declare const _default: import("@pipedream/types").Source<{
4
+ getSavedMetrics(): string;
5
+ setSavedMetrics(data: string): void;
6
+ getAndProcessData(): Promise<void>;
7
+ getEntityName(): string;
8
+ getItemSummary(): string;
9
+ getResources(): Promise<import("../../common/types/responseSchemas").TwitterEntity[]>;
10
+ getSavedIds(): string[];
11
+ setSavedIds(data: string[]): void;
12
+ emitEvent(data: import("../../common/types/responseSchemas.js").TwitterEntity): void;
13
+ }, {
14
+ tweetId: {
15
+ propDefinition: (string | import("@pipedream/types").App<{
16
+ _getAuthHeader(config: import("../../common/types/requestParams.js").HttpRequestParams): import("oauth-1.0a").Header;
17
+ _getBaseUrl(): "https://api.twitter.com/2";
18
+ _httpRequest({ $, specialAuth, ...args }: import("../../common/types/requestParams.js").HttpRequestParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").TwitterEntity>>;
19
+ _paginatedRequest({ maxResults, maxPerPage, params, ...args }: import("../../common/types/requestParams.js").PaginatedRequestParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").TwitterEntity>>;
20
+ addUserToList({ listId, ...args }: import("../../common/types/requestParams.js").AddUserToListParams): Promise<object>;
21
+ createTweet(args: import("../../common/types/requestParams.js").CreateTweetParams): Promise<object>;
22
+ deleteTweet({ tweetId, ...args }: import("../../common/types/requestParams.js").DeleteTweetParams): Promise<object>;
23
+ followUser(args: import("../../common/types/requestParams.js").FollowUserParams): Promise<object>;
24
+ getListTweets({ listId, ...args }: import("../../common/types/requestParams.js").GetListTweetsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<Tweet>>;
25
+ getTweet({ tweetId, ...args }: GetTweetParams): Promise<import("../../common/types/responseSchemas").ResponseObject<Tweet>>;
26
+ getAuthenticatedUser(args: import("../../common/types/requestParams.js").GetAuthenticatedUserParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").User>>;
27
+ getAuthenticatedUserId(): Promise<string>;
28
+ getDirectMessages(args: import("../../common/types/requestParams.js").GetDirectMessagesParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").DirectMessage>>;
29
+ getUserLikedTweets({ userId, ...args }: import("../../common/types/requestParams.js").GetUserLikedTweetParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<Tweet>>;
30
+ getUserOwnedLists({ userId, ...args }: import("../../common/types/requestParams.js").GetUserOwnedListsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").List>>;
31
+ getUserFollowedLists({ userId, ...args }: import("../../common/types/requestParams.js").GetUserFollowedListsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").List>>;
32
+ getUserMentions({ userId, ...args }: import("../../common/types/requestParams.js").GetUserMentionsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<Tweet>>;
33
+ getUserTweets({ userId, ...args }: import("../../common/types/requestParams.js").GetUserTweetsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<Tweet>>;
34
+ getUserByUsername(username: string): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").User>>;
35
+ getUser({ userId, ...args }: import("../../common/types/requestParams.js").GetUserParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").User>>;
36
+ likeTweet(args: import("../../common/types/requestParams.js").LikeTweetParams): Promise<object>;
37
+ getUserFollowers({ userId, ...args }: import("../../common/types/requestParams.js").GetUserFollowersParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").User>>;
38
+ getUserFollowing({ userId, ...args }: import("../../common/types/requestParams.js").GetUserFollowersParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").User>>;
39
+ retweet(args: import("../../common/types/requestParams.js").LikeTweetParams): Promise<object>;
40
+ searchTweets(args: import("../../common/types/requestParams.js").SearchTweetsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<Tweet>>;
41
+ sendMessage({ userId, ...args }: import("../../common/types/requestParams.js").SendMessageParams): Promise<object>;
42
+ unfollowUser({ userId, ...args }: import("../../common/types/requestParams.js").UnfollowUserParams): Promise<object>;
43
+ unlikeTweet({ tweetId, ...args }: import("../../common/types/requestParams.js").UnlikeTweetParams): Promise<object>;
44
+ uploadMedia(args: import("../../common/types/requestParams.js").UploadMediaParams): Promise<object>;
45
+ }, {
46
+ maxResults: {
47
+ type: string;
48
+ label: string;
49
+ description: string;
50
+ optional: boolean;
51
+ };
52
+ listId: {
53
+ type: string;
54
+ label: string;
55
+ description: string;
56
+ options(): Promise<{
57
+ label: string;
58
+ value: string;
59
+ }[]>;
60
+ };
61
+ userNameOrId: {
62
+ type: string;
63
+ label: string;
64
+ description: string;
65
+ optional: boolean;
66
+ default: string;
67
+ };
68
+ tweetId: {
69
+ type: string;
70
+ label: string;
71
+ description: string;
72
+ };
73
+ query: {
74
+ type: string;
75
+ label: string;
76
+ description: string;
77
+ };
78
+ }>)[];
79
+ };
80
+ metricsFields: {
81
+ type: string;
82
+ label: string;
83
+ description: string;
84
+ options: string[];
85
+ };
86
+ app: import("@pipedream/types").App<{
87
+ _getAuthHeader(config: import("../../common/types/requestParams.js").HttpRequestParams): import("oauth-1.0a").Header;
88
+ _getBaseUrl(): "https://api.twitter.com/2";
89
+ _httpRequest({ $, specialAuth, ...args }: import("../../common/types/requestParams.js").HttpRequestParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").TwitterEntity>>;
90
+ _paginatedRequest({ maxResults, maxPerPage, params, ...args }: import("../../common/types/requestParams.js").PaginatedRequestParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").TwitterEntity>>;
91
+ addUserToList({ listId, ...args }: import("../../common/types/requestParams.js").AddUserToListParams): Promise<object>;
92
+ createTweet(args: import("../../common/types/requestParams.js").CreateTweetParams): Promise<object>;
93
+ deleteTweet({ tweetId, ...args }: import("../../common/types/requestParams.js").DeleteTweetParams): Promise<object>;
94
+ followUser(args: import("../../common/types/requestParams.js").FollowUserParams): Promise<object>;
95
+ getListTweets({ listId, ...args }: import("../../common/types/requestParams.js").GetListTweetsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<Tweet>>;
96
+ getTweet({ tweetId, ...args }: GetTweetParams): Promise<import("../../common/types/responseSchemas").ResponseObject<Tweet>>;
97
+ getAuthenticatedUser(args: import("../../common/types/requestParams.js").GetAuthenticatedUserParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").User>>;
98
+ getAuthenticatedUserId(): Promise<string>;
99
+ getDirectMessages(args: import("../../common/types/requestParams.js").GetDirectMessagesParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").DirectMessage>>;
100
+ getUserLikedTweets({ userId, ...args }: import("../../common/types/requestParams.js").GetUserLikedTweetParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<Tweet>>;
101
+ getUserOwnedLists({ userId, ...args }: import("../../common/types/requestParams.js").GetUserOwnedListsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").List>>;
102
+ getUserFollowedLists({ userId, ...args }: import("../../common/types/requestParams.js").GetUserFollowedListsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").List>>;
103
+ getUserMentions({ userId, ...args }: import("../../common/types/requestParams.js").GetUserMentionsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<Tweet>>;
104
+ getUserTweets({ userId, ...args }: import("../../common/types/requestParams.js").GetUserTweetsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<Tweet>>;
105
+ getUserByUsername(username: string): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").User>>;
106
+ getUser({ userId, ...args }: import("../../common/types/requestParams.js").GetUserParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").User>>;
107
+ likeTweet(args: import("../../common/types/requestParams.js").LikeTweetParams): Promise<object>;
108
+ getUserFollowers({ userId, ...args }: import("../../common/types/requestParams.js").GetUserFollowersParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").User>>;
109
+ getUserFollowing({ userId, ...args }: import("../../common/types/requestParams.js").GetUserFollowersParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").User>>;
110
+ retweet(args: import("../../common/types/requestParams.js").LikeTweetParams): Promise<object>;
111
+ searchTweets(args: import("../../common/types/requestParams.js").SearchTweetsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<Tweet>>;
112
+ sendMessage({ userId, ...args }: import("../../common/types/requestParams.js").SendMessageParams): Promise<object>;
113
+ unfollowUser({ userId, ...args }: import("../../common/types/requestParams.js").UnfollowUserParams): Promise<object>;
114
+ unlikeTweet({ tweetId, ...args }: import("../../common/types/requestParams.js").UnlikeTweetParams): Promise<object>;
115
+ uploadMedia(args: import("../../common/types/requestParams.js").UploadMediaParams): Promise<object>;
116
+ }, {
117
+ maxResults: {
118
+ type: string;
119
+ label: string;
120
+ description: string;
121
+ optional: boolean;
122
+ };
123
+ listId: {
124
+ type: string;
125
+ label: string;
126
+ description: string;
127
+ options(): Promise<{
128
+ label: string;
129
+ value: string;
130
+ }[]>;
131
+ };
132
+ userNameOrId: {
133
+ type: string;
134
+ label: string;
135
+ description: string;
136
+ optional: boolean;
137
+ default: string;
138
+ };
139
+ tweetId: {
140
+ type: string;
141
+ label: string;
142
+ description: string;
143
+ };
144
+ query: {
145
+ type: string;
146
+ label: string;
147
+ description: string;
148
+ };
149
+ }>;
150
+ db: string;
151
+ timer: {
152
+ type: string;
153
+ default: {
154
+ intervalSeconds: number;
155
+ };
156
+ };
157
+ }>;
158
+ export default _default;
@@ -0,0 +1,66 @@
1
+ import app from "../../app/twitter.app.mjs";
2
+ import { defineSource } from "@pipedream/types";
3
+ import common from "../common/base.mjs";
4
+ import { METRICS_FIELDS } from "../../common/dataFields.mjs";
5
+ const DOCS_LINK = "https://developer.twitter.com/en/docs/twitter-api/metrics";
6
+ export default defineSource({
7
+ ...common,
8
+ key: "twitter-new-tweet-metrics",
9
+ name: "New Tweet Metrics",
10
+ description: `Emit new event when a Tweet has new metrics [See the documentation](${DOCS_LINK})`,
11
+ version: "1.0.1",
12
+ type: "source",
13
+ props: {
14
+ ...common.props,
15
+ tweetId: {
16
+ propDefinition: [
17
+ app,
18
+ "tweetId",
19
+ ],
20
+ },
21
+ metricsFields: {
22
+ type: "string[]",
23
+ label: "Metrics Fields",
24
+ description: "The types of metrics to request for the specified Tweet.",
25
+ options: METRICS_FIELDS,
26
+ },
27
+ },
28
+ methods: {
29
+ ...common.methods,
30
+ getSavedMetrics() {
31
+ return this.db.get("savedMetrics");
32
+ },
33
+ setSavedMetrics(data) {
34
+ this.db.set("savedMetrics", data);
35
+ },
36
+ async getAndProcessData() {
37
+ const params = {
38
+ $: this,
39
+ tweetId: this.tweetId,
40
+ params: {
41
+ "tweet.fields": this.metricsFields?.join(),
42
+ },
43
+ };
44
+ const data = (await this.app.getTweet(params))?.data;
45
+ if (data) {
46
+ const { non_public_metrics, organic_metrics, promoted_metrics, public_metrics, } = data;
47
+ const stringifiedObj = JSON.stringify({
48
+ non_public_metrics,
49
+ organic_metrics,
50
+ promoted_metrics,
51
+ public_metrics,
52
+ });
53
+ const savedMetrics = this.getSavedMetrics();
54
+ if (savedMetrics !== stringifiedObj) {
55
+ const ts = Date.now();
56
+ this.$emit(data, {
57
+ id: ts,
58
+ summary: "New Metrics",
59
+ ts,
60
+ });
61
+ this.setSavedMetrics(stringifiedObj);
62
+ }
63
+ }
64
+ },
65
+ },
66
+ });