@pipedream/twitter 0.3.11 → 1.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.
Files changed (119) hide show
  1. package/README.md +18 -71
  2. package/dist/actions/add-user-to-list/add-user-to-list.d.ts +194 -0
  3. package/dist/actions/add-user-to-list/add-user-to-list.mjs +44 -0
  4. package/dist/actions/create-tweet/create-tweet.d.ts +101 -0
  5. package/dist/actions/create-tweet/create-tweet.mjs +78 -0
  6. package/dist/actions/delete-tweet/delete-tweet.d.ts +128 -0
  7. package/dist/actions/delete-tweet/delete-tweet.mjs +29 -0
  8. package/dist/actions/follow-user/follow-user.d.ts +131 -0
  9. package/dist/actions/follow-user/follow-user.mjs +37 -0
  10. package/dist/actions/get-tweet/get-tweet.d.ts +132 -0
  11. package/dist/actions/get-tweet/get-tweet.mjs +34 -0
  12. package/dist/actions/get-user/get-user.d.ts +133 -0
  13. package/dist/actions/get-user/get-user.mjs +40 -0
  14. package/dist/actions/like-tweet/like-tweet.d.ts +128 -0
  15. package/dist/actions/like-tweet/like-tweet.mjs +31 -0
  16. package/dist/actions/list-favorites/list-favorites.d.ts +202 -0
  17. package/dist/actions/list-favorites/list-favorites.mjs +50 -0
  18. package/dist/actions/list-followers/list-followers.d.ts +202 -0
  19. package/dist/actions/list-followers/list-followers.mjs +50 -0
  20. package/dist/actions/list-lists/list-lists.d.ts +200 -0
  21. package/dist/actions/list-lists/list-lists.mjs +50 -0
  22. package/dist/actions/list-mentions/list-mentions.d.ts +200 -0
  23. package/dist/actions/list-mentions/list-mentions.mjs +50 -0
  24. package/dist/actions/list-user-tweets/list-user-tweets.d.ts +202 -0
  25. package/dist/actions/list-user-tweets/list-user-tweets.mjs +50 -0
  26. package/dist/actions/retweet/retweet.d.ts +128 -0
  27. package/dist/actions/retweet/retweet.mjs +34 -0
  28. package/dist/actions/simple-search/simple-search.d.ts +201 -0
  29. package/dist/actions/simple-search/simple-search.mjs +50 -0
  30. package/dist/actions/simple-search-in-list/simple-search-in-list.d.ts +206 -0
  31. package/dist/actions/simple-search-in-list/simple-search-in-list.mjs +58 -0
  32. package/dist/actions/unfollow-user/unfollow-user.d.ts +131 -0
  33. package/dist/actions/unfollow-user/unfollow-user.mjs +33 -0
  34. package/dist/actions/unlike-tweet/unlike-tweet.d.ts +128 -0
  35. package/dist/actions/unlike-tweet/unlike-tweet.mjs +29 -0
  36. package/dist/app/twitter.app.d.ts +65 -0
  37. package/dist/app/twitter.app.mjs +291 -0
  38. package/dist/common/additionalProps.d.ts +0 -0
  39. package/dist/common/additionalProps.mjs +138 -0
  40. package/dist/common/dataFields.d.ts +6 -0
  41. package/dist/common/dataFields.mjs +80 -0
  42. package/dist/common/expansions.d.ts +3 -0
  43. package/dist/common/expansions.mjs +17 -0
  44. package/dist/common/methods.d.ts +20 -0
  45. package/dist/common/methods.mjs +69 -0
  46. package/dist/common/types/fields.d.ts +18 -0
  47. package/dist/common/types/fields.mjs +1 -0
  48. package/dist/common/types/requestParams.d.ts +105 -0
  49. package/dist/common/types/requestParams.mjs +1 -0
  50. package/dist/common/types/responseSchemas.d.ts +42 -0
  51. package/dist/common/types/responseSchemas.mjs +1 -0
  52. package/dist/sources/common/base.d.ts +87 -0
  53. package/dist/sources/common/base.mjs +60 -0
  54. package/dist/sources/common/cacheUserId.d.ts +7 -0
  55. package/dist/sources/common/cacheUserId.mjs +18 -0
  56. package/dist/sources/common/getItemSummary.d.ts +4 -0
  57. package/dist/sources/common/getItemSummary.mjs +12 -0
  58. package/dist/sources/new-follower-of-user/new-follower-of-user.d.ts +149 -0
  59. package/dist/sources/new-follower-of-user/new-follower-of-user.mjs +45 -0
  60. package/dist/sources/new-list-followed/new-list-followed.d.ts +149 -0
  61. package/dist/sources/new-list-followed/new-list-followed.mjs +46 -0
  62. package/dist/sources/new-tweet-in-list/new-tweet-in-list.d.ts +147 -0
  63. package/dist/sources/new-tweet-in-list/new-tweet-in-list.mjs +42 -0
  64. package/dist/sources/new-tweet-liked-by-user/new-tweet-liked-by-user.d.ts +149 -0
  65. package/dist/sources/new-tweet-liked-by-user/new-tweet-liked-by-user.mjs +45 -0
  66. package/dist/sources/new-tweet-posted-by-user/new-tweet-posted-by-user.d.ts +149 -0
  67. package/dist/sources/new-tweet-posted-by-user/new-tweet-posted-by-user.mjs +45 -0
  68. package/dist/sources/new-tweet-posted-matching-query/new-tweet-posted-matching-query.d.ts +147 -0
  69. package/dist/sources/new-tweet-posted-matching-query/new-tweet-posted-matching-query.mjs +44 -0
  70. package/dist/sources/new-unfollower-of-user/new-unfollower-of-user.d.ts +149 -0
  71. package/dist/sources/new-unfollower-of-user/new-unfollower-of-user.mjs +75 -0
  72. package/dist/sources/new-user-followed/new-user-followed.d.ts +148 -0
  73. package/dist/sources/new-user-followed/new-user-followed.mjs +46 -0
  74. package/dist/tsconfig.tsbuildinfo +1 -0
  75. package/package.json +10 -14
  76. package/actions/add-user-to-list/add-user-to-list.mjs +0 -62
  77. package/actions/advanced-search/advanced-search.mjs +0 -113
  78. package/actions/common.mjs +0 -29
  79. package/actions/create-tweet/create-tweet.mjs +0 -146
  80. package/actions/delete-tweet/delete-tweet.mjs +0 -42
  81. package/actions/follow-user/follow-user.mjs +0 -48
  82. package/actions/get-tweet/get-tweet.mjs +0 -42
  83. package/actions/get-user/get-user.mjs +0 -50
  84. package/actions/like-tweet/like-tweet.mjs +0 -42
  85. package/actions/list-favorites/list-favorites.mjs +0 -63
  86. package/actions/list-followers/list-followers.mjs +0 -67
  87. package/actions/list-lists/list-lists.mjs +0 -69
  88. package/actions/list-mentions/list-mentions.mjs +0 -55
  89. package/actions/list-pending-followers/list-pending-followers.mjs +0 -32
  90. package/actions/list-retweets/list-retweets.mjs +0 -54
  91. package/actions/list-user-tweets/list-user-tweets.mjs +0 -80
  92. package/actions/retweet/retweet.mjs +0 -27
  93. package/actions/simple-search/simple-search.mjs +0 -62
  94. package/actions/simple-search-in-list/simple-search-in-list.mjs +0 -48
  95. package/actions/unfollow-user/unfollow-user.mjs +0 -48
  96. package/actions/unlike-tweet/unlike-tweet.mjs +0 -40
  97. package/actions/upload-media/upload-media.mjs +0 -122
  98. package/old.md +0 -169
  99. package/sources/common/followed.mjs +0 -38
  100. package/sources/common/followers.mjs +0 -159
  101. package/sources/common/tweets.mjs +0 -155
  102. package/sources/language-codes.mjs +0 -742
  103. package/sources/my-liked-tweets/my-liked-tweets.mjs +0 -30
  104. package/sources/my-tweets/my-tweets.mjs +0 -48
  105. package/sources/new-follower-of-me/new-follower-of-me.mjs +0 -69
  106. package/sources/new-follower-of-user/new-follower-of-user.mjs +0 -25
  107. package/sources/new-list-followed/new-list-followed.mjs +0 -24
  108. package/sources/new-trends-by-geo/new-trends-by-geo.mjs +0 -40
  109. package/sources/new-tweet-in-list/new-tweet-in-list.mjs +0 -49
  110. package/sources/new-unfollower-of-me/new-unfollower-of-me.mjs +0 -16
  111. package/sources/new-unfollower-of-user/new-unfollower-of-user.mjs +0 -25
  112. package/sources/new-user-followed/new-user-followed.mjs +0 -25
  113. package/sources/search-mentions/search-mentions.mjs +0 -144
  114. package/sources/tweets-liked-by-user/tweets-liked-by-user.mjs +0 -38
  115. package/sources/user-tweets/user-tweets.mjs +0 -49
  116. package/sources/watch-retweets-of-me/watch-retweets-of-me.mjs +0 -36
  117. package/sources/watch-retweets-of-my-tweet/watch-retweets-of-my-tweet.mjs +0 -44
  118. package/sources/watch-retweets-of-user-tweet/watch-retweets-of-user-tweet.mjs +0 -34
  119. package/twitter.app.mjs +0 -1161
@@ -0,0 +1,206 @@
1
+ import { getMultiItemSummary, getTweetFields } from "../../common/methods.js";
2
+ import { GetListTweetsParams } from "../../common/types/requestParams.js";
3
+ import { PaginatedResponseObject, Tweet } from "../../common/types/responseSchemas.js";
4
+ export declare const DOCS_LINK = "https://developer.twitter.com/en/docs/twitter-api/lists/list-tweets/api-reference/get-lists-id-tweets";
5
+ export declare const MAX_RESULTS_PER_PAGE = 100;
6
+ declare const _default: import("@pipedream/types").Action<{
7
+ getMultiItemSummary: typeof getMultiItemSummary;
8
+ getTweetFields: typeof getTweetFields;
9
+ }, {
10
+ app: import("@pipedream/types").App<{
11
+ _getAuthHeader(config: import("../../common/types/requestParams.js").HttpRequestParams): Promise<import("oauth-1.0a").Header>;
12
+ _getBaseUrl(): "https://api.twitter.com/2";
13
+ _httpRequest({ $, ...args }: import("../../common/types/requestParams.js").HttpRequestParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").TwitterEntity>>;
14
+ _paginatedRequest({ maxResults, maxPerPage, params, ...args }: import("../../common/types/requestParams.js").PaginatedRequestParams): Promise<PaginatedResponseObject<import("../../common/types/responseSchemas").TwitterEntity>>;
15
+ addUserToList({ listId, ...args }: import("../../common/types/requestParams.js").AddUserToListParams): Promise<object>;
16
+ createTweet(args: import("../../common/types/requestParams.js").CreateTweetParams): Promise<object>;
17
+ deleteTweet({ tweetId, ...args }: import("../../common/types/requestParams.js").DeleteTweetParams): Promise<object>;
18
+ followUser(args: import("../../common/types/requestParams.js").FollowUserParams): Promise<object>;
19
+ getListTweets({ listId, ...args }: GetListTweetsParams): Promise<PaginatedResponseObject<Tweet>>;
20
+ getTweet({ tweetId, ...args }: import("../../common/types/requestParams.js").GetTweetParams): Promise<import("../../common/types/responseSchemas").ResponseObject<Tweet>>;
21
+ getAuthenticatedUser(args: import("../../common/types/requestParams.js").GetAuthenticatedUserParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").User>>;
22
+ getAuthenticatedUserId(): Promise<string>;
23
+ getUserLikedTweets({ userId, ...args }: import("../../common/types/requestParams.js").GetUserLikedTweetParams): Promise<PaginatedResponseObject<Tweet>>;
24
+ getUserOwnedLists({ userId, ...args }: import("../../common/types/requestParams.js").GetUserOwnedListsParams): Promise<PaginatedResponseObject<import("../../common/types/responseSchemas").List>>;
25
+ getUserFollowedLists({ userId, ...args }: import("../../common/types/requestParams.js").GetUserFollowedListsParams): Promise<PaginatedResponseObject<import("../../common/types/responseSchemas").List>>;
26
+ getUserMentions({ userId, ...args }: import("../../common/types/requestParams.js").GetUserMentionsParams): Promise<PaginatedResponseObject<Tweet>>;
27
+ getUserTweets({ userId, ...args }: import("../../common/types/requestParams.js").GetUserTweetsParams): Promise<PaginatedResponseObject<Tweet>>;
28
+ getUserByUsername(username: string): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").User>>;
29
+ getUser({ userId, ...args }: import("../../common/types/requestParams.js").GetUserParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").User>>;
30
+ likeTweet(args: import("../../common/types/requestParams.js").LikeTweetParams): Promise<object>;
31
+ getUserFollowers({ userId, ...args }: import("../../common/types/requestParams.js").GetUserFollowersParams): Promise<PaginatedResponseObject<import("../../common/types/responseSchemas").User>>;
32
+ getUserFollowing({ userId, ...args }: import("../../common/types/requestParams.js").GetUserFollowersParams): Promise<PaginatedResponseObject<import("../../common/types/responseSchemas").User>>;
33
+ retweet(args: import("../../common/types/requestParams.js").LikeTweetParams): Promise<object>;
34
+ searchTweets(args: import("../../common/types/requestParams.js").SearchTweetsParams): Promise<PaginatedResponseObject<Tweet>>;
35
+ unfollowUser({ userId, ...args }: import("../../common/types/requestParams.js").UnfollowUserParams): Promise<object>;
36
+ unlikeTweet({ tweetId, ...args }: import("../../common/types/requestParams.js").UnlikeTweetParams): Promise<object>;
37
+ }, {
38
+ maxResults: {
39
+ type: string;
40
+ label: string;
41
+ description: string;
42
+ optional: boolean;
43
+ };
44
+ listId: {
45
+ type: string;
46
+ label: string;
47
+ description: string;
48
+ options(): Promise<{
49
+ label: string;
50
+ value: string;
51
+ }[]>;
52
+ };
53
+ userNameOrId: {
54
+ type: string;
55
+ label: string;
56
+ description: string;
57
+ optional: boolean;
58
+ default: string;
59
+ };
60
+ tweetId: {
61
+ type: string;
62
+ label: string;
63
+ description: string;
64
+ };
65
+ query: {
66
+ type: string;
67
+ label: string;
68
+ description: string;
69
+ };
70
+ }>;
71
+ listId: {
72
+ propDefinition: (string | import("@pipedream/types").App<{
73
+ _getAuthHeader(config: import("../../common/types/requestParams.js").HttpRequestParams): Promise<import("oauth-1.0a").Header>;
74
+ _getBaseUrl(): "https://api.twitter.com/2";
75
+ _httpRequest({ $, ...args }: import("../../common/types/requestParams.js").HttpRequestParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").TwitterEntity>>;
76
+ _paginatedRequest({ maxResults, maxPerPage, params, ...args }: import("../../common/types/requestParams.js").PaginatedRequestParams): Promise<PaginatedResponseObject<import("../../common/types/responseSchemas").TwitterEntity>>;
77
+ addUserToList({ listId, ...args }: import("../../common/types/requestParams.js").AddUserToListParams): Promise<object>;
78
+ createTweet(args: import("../../common/types/requestParams.js").CreateTweetParams): Promise<object>;
79
+ deleteTweet({ tweetId, ...args }: import("../../common/types/requestParams.js").DeleteTweetParams): Promise<object>;
80
+ followUser(args: import("../../common/types/requestParams.js").FollowUserParams): Promise<object>;
81
+ getListTweets({ listId, ...args }: GetListTweetsParams): Promise<PaginatedResponseObject<Tweet>>;
82
+ getTweet({ tweetId, ...args }: import("../../common/types/requestParams.js").GetTweetParams): Promise<import("../../common/types/responseSchemas").ResponseObject<Tweet>>;
83
+ getAuthenticatedUser(args: import("../../common/types/requestParams.js").GetAuthenticatedUserParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").User>>;
84
+ getAuthenticatedUserId(): Promise<string>;
85
+ getUserLikedTweets({ userId, ...args }: import("../../common/types/requestParams.js").GetUserLikedTweetParams): Promise<PaginatedResponseObject<Tweet>>;
86
+ getUserOwnedLists({ userId, ...args }: import("../../common/types/requestParams.js").GetUserOwnedListsParams): Promise<PaginatedResponseObject<import("../../common/types/responseSchemas").List>>;
87
+ getUserFollowedLists({ userId, ...args }: import("../../common/types/requestParams.js").GetUserFollowedListsParams): Promise<PaginatedResponseObject<import("../../common/types/responseSchemas").List>>;
88
+ getUserMentions({ userId, ...args }: import("../../common/types/requestParams.js").GetUserMentionsParams): Promise<PaginatedResponseObject<Tweet>>;
89
+ getUserTweets({ userId, ...args }: import("../../common/types/requestParams.js").GetUserTweetsParams): Promise<PaginatedResponseObject<Tweet>>;
90
+ getUserByUsername(username: string): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").User>>;
91
+ getUser({ userId, ...args }: import("../../common/types/requestParams.js").GetUserParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").User>>;
92
+ likeTweet(args: import("../../common/types/requestParams.js").LikeTweetParams): Promise<object>;
93
+ getUserFollowers({ userId, ...args }: import("../../common/types/requestParams.js").GetUserFollowersParams): Promise<PaginatedResponseObject<import("../../common/types/responseSchemas").User>>;
94
+ getUserFollowing({ userId, ...args }: import("../../common/types/requestParams.js").GetUserFollowersParams): Promise<PaginatedResponseObject<import("../../common/types/responseSchemas").User>>;
95
+ retweet(args: import("../../common/types/requestParams.js").LikeTweetParams): Promise<object>;
96
+ searchTweets(args: import("../../common/types/requestParams.js").SearchTweetsParams): Promise<PaginatedResponseObject<Tweet>>;
97
+ unfollowUser({ userId, ...args }: import("../../common/types/requestParams.js").UnfollowUserParams): Promise<object>;
98
+ unlikeTweet({ tweetId, ...args }: import("../../common/types/requestParams.js").UnlikeTweetParams): Promise<object>;
99
+ }, {
100
+ maxResults: {
101
+ type: string;
102
+ label: string;
103
+ description: string;
104
+ optional: boolean;
105
+ };
106
+ listId: {
107
+ type: string;
108
+ label: string;
109
+ description: string;
110
+ options(): Promise<{
111
+ label: string;
112
+ value: string;
113
+ }[]>;
114
+ };
115
+ userNameOrId: {
116
+ type: string;
117
+ label: string;
118
+ description: string;
119
+ optional: boolean;
120
+ default: string;
121
+ };
122
+ tweetId: {
123
+ type: string;
124
+ label: string;
125
+ description: string;
126
+ };
127
+ query: {
128
+ type: string;
129
+ label: string;
130
+ description: string;
131
+ };
132
+ }>)[];
133
+ };
134
+ searchTerms: {
135
+ label: string;
136
+ type: string;
137
+ description: string;
138
+ };
139
+ maxResults: {
140
+ propDefinition: (string | import("@pipedream/types").App<{
141
+ _getAuthHeader(config: import("../../common/types/requestParams.js").HttpRequestParams): Promise<import("oauth-1.0a").Header>;
142
+ _getBaseUrl(): "https://api.twitter.com/2";
143
+ _httpRequest({ $, ...args }: import("../../common/types/requestParams.js").HttpRequestParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").TwitterEntity>>;
144
+ _paginatedRequest({ maxResults, maxPerPage, params, ...args }: import("../../common/types/requestParams.js").PaginatedRequestParams): Promise<PaginatedResponseObject<import("../../common/types/responseSchemas").TwitterEntity>>;
145
+ addUserToList({ listId, ...args }: import("../../common/types/requestParams.js").AddUserToListParams): Promise<object>;
146
+ createTweet(args: import("../../common/types/requestParams.js").CreateTweetParams): Promise<object>;
147
+ deleteTweet({ tweetId, ...args }: import("../../common/types/requestParams.js").DeleteTweetParams): Promise<object>;
148
+ followUser(args: import("../../common/types/requestParams.js").FollowUserParams): Promise<object>;
149
+ getListTweets({ listId, ...args }: GetListTweetsParams): Promise<PaginatedResponseObject<Tweet>>;
150
+ getTweet({ tweetId, ...args }: import("../../common/types/requestParams.js").GetTweetParams): Promise<import("../../common/types/responseSchemas").ResponseObject<Tweet>>;
151
+ getAuthenticatedUser(args: import("../../common/types/requestParams.js").GetAuthenticatedUserParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").User>>;
152
+ getAuthenticatedUserId(): Promise<string>;
153
+ getUserLikedTweets({ userId, ...args }: import("../../common/types/requestParams.js").GetUserLikedTweetParams): Promise<PaginatedResponseObject<Tweet>>;
154
+ getUserOwnedLists({ userId, ...args }: import("../../common/types/requestParams.js").GetUserOwnedListsParams): Promise<PaginatedResponseObject<import("../../common/types/responseSchemas").List>>;
155
+ getUserFollowedLists({ userId, ...args }: import("../../common/types/requestParams.js").GetUserFollowedListsParams): Promise<PaginatedResponseObject<import("../../common/types/responseSchemas").List>>;
156
+ getUserMentions({ userId, ...args }: import("../../common/types/requestParams.js").GetUserMentionsParams): Promise<PaginatedResponseObject<Tweet>>;
157
+ getUserTweets({ userId, ...args }: import("../../common/types/requestParams.js").GetUserTweetsParams): Promise<PaginatedResponseObject<Tweet>>;
158
+ getUserByUsername(username: string): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").User>>;
159
+ getUser({ userId, ...args }: import("../../common/types/requestParams.js").GetUserParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").User>>;
160
+ likeTweet(args: import("../../common/types/requestParams.js").LikeTweetParams): Promise<object>;
161
+ getUserFollowers({ userId, ...args }: import("../../common/types/requestParams.js").GetUserFollowersParams): Promise<PaginatedResponseObject<import("../../common/types/responseSchemas").User>>;
162
+ getUserFollowing({ userId, ...args }: import("../../common/types/requestParams.js").GetUserFollowersParams): Promise<PaginatedResponseObject<import("../../common/types/responseSchemas").User>>;
163
+ retweet(args: import("../../common/types/requestParams.js").LikeTweetParams): Promise<object>;
164
+ searchTweets(args: import("../../common/types/requestParams.js").SearchTweetsParams): Promise<PaginatedResponseObject<Tweet>>;
165
+ unfollowUser({ userId, ...args }: import("../../common/types/requestParams.js").UnfollowUserParams): Promise<object>;
166
+ unlikeTweet({ tweetId, ...args }: import("../../common/types/requestParams.js").UnlikeTweetParams): Promise<object>;
167
+ }, {
168
+ maxResults: {
169
+ type: string;
170
+ label: string;
171
+ description: string;
172
+ optional: boolean;
173
+ };
174
+ listId: {
175
+ type: string;
176
+ label: string;
177
+ description: string;
178
+ options(): Promise<{
179
+ label: string;
180
+ value: string;
181
+ }[]>;
182
+ };
183
+ userNameOrId: {
184
+ type: string;
185
+ label: string;
186
+ description: string;
187
+ optional: boolean;
188
+ default: string;
189
+ };
190
+ tweetId: {
191
+ type: string;
192
+ label: string;
193
+ description: string;
194
+ };
195
+ query: {
196
+ type: string;
197
+ label: string;
198
+ description: string;
199
+ };
200
+ }>)[];
201
+ min: number;
202
+ max: number;
203
+ default: number;
204
+ };
205
+ }>;
206
+ export default _default;
@@ -0,0 +1,58 @@
1
+ import app from "../../app/twitter.app.mjs";
2
+ import { defineAction } from "@pipedream/types";
3
+ import { getMultiItemSummary, getTweetFields, } from "../../common/methods.mjs";
4
+ export const DOCS_LINK = "https://developer.twitter.com/en/docs/twitter-api/lists/list-tweets/api-reference/get-lists-id-tweets";
5
+ const MIN_RESULTS = 1;
6
+ const DEFAULT_RESULTS = 100;
7
+ export const MAX_RESULTS_PER_PAGE = 100;
8
+ export default defineAction({
9
+ key: "twitter-simple-search-in-list",
10
+ name: "Search Tweets in List",
11
+ description: `Search Tweets by text in a list. [See docs here](${DOCS_LINK})`,
12
+ version: "1.1.0",
13
+ type: "action",
14
+ props: {
15
+ app,
16
+ listId: {
17
+ propDefinition: [
18
+ app,
19
+ "listId",
20
+ ],
21
+ },
22
+ searchTerms: {
23
+ label: "Search Term(s)",
24
+ type: "string[]",
25
+ description: "Text to filter tweets by. If you include more than one item in this array, only tweets that match all items will be returned. You can use the pipe character `|` to define multiple strings within an item, and it will be considered a match if the tweet contains any of them.",
26
+ },
27
+ maxResults: {
28
+ propDefinition: [
29
+ app,
30
+ "maxResults",
31
+ ],
32
+ min: MIN_RESULTS,
33
+ max: MAX_RESULTS_PER_PAGE * 5,
34
+ default: DEFAULT_RESULTS,
35
+ },
36
+ },
37
+ methods: {
38
+ getMultiItemSummary,
39
+ getTweetFields,
40
+ },
41
+ async run({ $ }) {
42
+ const { listId, searchTerms, } = this;
43
+ const params = {
44
+ $,
45
+ listId,
46
+ maxPerPage: MAX_RESULTS_PER_PAGE,
47
+ maxResults: this.maxResults,
48
+ params: this.getTweetFields(),
49
+ };
50
+ const response = await this.app.getListTweets(params);
51
+ const { data } = response;
52
+ const filteredTweets = data.filter(({ text }) => searchTerms.every((term) => term.split("|").some((splitTerm) => text.includes(splitTerm))));
53
+ $.export("$summary", this.getMultiItemSummary("tweet", filteredTweets.length));
54
+ return {
55
+ data: filteredTweets,
56
+ };
57
+ },
58
+ });
@@ -0,0 +1,131 @@
1
+ import { getUserId } from "../../common/methods.js";
2
+ import { UnfollowUserParams } from "../../common/types/requestParams.js";
3
+ declare const _default: import("@pipedream/types").Action<{
4
+ getUserId: typeof getUserId;
5
+ }, {
6
+ app: import("@pipedream/types").App<{
7
+ _getAuthHeader(config: import("../../common/types/requestParams.js").HttpRequestParams): Promise<import("oauth-1.0a").Header>;
8
+ _getBaseUrl(): "https://api.twitter.com/2";
9
+ _httpRequest({ $, ...args }: import("../../common/types/requestParams.js").HttpRequestParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").TwitterEntity>>;
10
+ _paginatedRequest({ maxResults, maxPerPage, params, ...args }: import("../../common/types/requestParams.js").PaginatedRequestParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").TwitterEntity>>;
11
+ addUserToList({ listId, ...args }: import("../../common/types/requestParams.js").AddUserToListParams): Promise<object>;
12
+ createTweet(args: import("../../common/types/requestParams.js").CreateTweetParams): Promise<object>;
13
+ deleteTweet({ tweetId, ...args }: import("../../common/types/requestParams.js").DeleteTweetParams): Promise<object>;
14
+ followUser(args: import("../../common/types/requestParams.js").FollowUserParams): Promise<object>;
15
+ getListTweets({ listId, ...args }: import("../../common/types/requestParams.js").GetListTweetsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
16
+ getTweet({ tweetId, ...args }: import("../../common/types/requestParams.js").GetTweetParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").Tweet>>;
17
+ getAuthenticatedUser(args: import("../../common/types/requestParams.js").GetAuthenticatedUserParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").User>>;
18
+ getAuthenticatedUserId(): Promise<string>;
19
+ getUserLikedTweets({ userId, ...args }: import("../../common/types/requestParams.js").GetUserLikedTweetParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
20
+ getUserOwnedLists({ userId, ...args }: import("../../common/types/requestParams.js").GetUserOwnedListsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").List>>;
21
+ getUserFollowedLists({ userId, ...args }: import("../../common/types/requestParams.js").GetUserFollowedListsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").List>>;
22
+ getUserMentions({ userId, ...args }: import("../../common/types/requestParams.js").GetUserMentionsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
23
+ getUserTweets({ userId, ...args }: import("../../common/types/requestParams.js").GetUserTweetsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
24
+ getUserByUsername(username: string): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").User>>;
25
+ getUser({ userId, ...args }: import("../../common/types/requestParams.js").GetUserParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").User>>;
26
+ likeTweet(args: import("../../common/types/requestParams.js").LikeTweetParams): Promise<object>;
27
+ getUserFollowers({ userId, ...args }: import("../../common/types/requestParams.js").GetUserFollowersParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").User>>;
28
+ getUserFollowing({ userId, ...args }: import("../../common/types/requestParams.js").GetUserFollowersParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").User>>;
29
+ retweet(args: import("../../common/types/requestParams.js").LikeTweetParams): Promise<object>;
30
+ searchTweets(args: import("../../common/types/requestParams.js").SearchTweetsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
31
+ unfollowUser({ userId, ...args }: UnfollowUserParams): Promise<object>;
32
+ unlikeTweet({ tweetId, ...args }: import("../../common/types/requestParams.js").UnlikeTweetParams): Promise<object>;
33
+ }, {
34
+ maxResults: {
35
+ type: string;
36
+ label: string;
37
+ description: string;
38
+ optional: boolean;
39
+ };
40
+ listId: {
41
+ type: string;
42
+ label: string;
43
+ description: string;
44
+ options(): Promise<{
45
+ label: string;
46
+ value: string;
47
+ }[]>;
48
+ };
49
+ userNameOrId: {
50
+ type: string;
51
+ label: string;
52
+ description: string;
53
+ optional: boolean;
54
+ default: string;
55
+ };
56
+ tweetId: {
57
+ type: string;
58
+ label: string;
59
+ description: string;
60
+ };
61
+ query: {
62
+ type: string;
63
+ label: string;
64
+ description: string;
65
+ };
66
+ }>;
67
+ userNameOrId: {
68
+ propDefinition: (string | import("@pipedream/types").App<{
69
+ _getAuthHeader(config: import("../../common/types/requestParams.js").HttpRequestParams): Promise<import("oauth-1.0a").Header>;
70
+ _getBaseUrl(): "https://api.twitter.com/2";
71
+ _httpRequest({ $, ...args }: import("../../common/types/requestParams.js").HttpRequestParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").TwitterEntity>>;
72
+ _paginatedRequest({ maxResults, maxPerPage, params, ...args }: import("../../common/types/requestParams.js").PaginatedRequestParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").TwitterEntity>>;
73
+ addUserToList({ listId, ...args }: import("../../common/types/requestParams.js").AddUserToListParams): Promise<object>;
74
+ createTweet(args: import("../../common/types/requestParams.js").CreateTweetParams): Promise<object>;
75
+ deleteTweet({ tweetId, ...args }: import("../../common/types/requestParams.js").DeleteTweetParams): Promise<object>;
76
+ followUser(args: import("../../common/types/requestParams.js").FollowUserParams): Promise<object>;
77
+ getListTweets({ listId, ...args }: import("../../common/types/requestParams.js").GetListTweetsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
78
+ getTweet({ tweetId, ...args }: import("../../common/types/requestParams.js").GetTweetParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").Tweet>>;
79
+ getAuthenticatedUser(args: import("../../common/types/requestParams.js").GetAuthenticatedUserParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").User>>;
80
+ getAuthenticatedUserId(): Promise<string>;
81
+ getUserLikedTweets({ userId, ...args }: import("../../common/types/requestParams.js").GetUserLikedTweetParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
82
+ getUserOwnedLists({ userId, ...args }: import("../../common/types/requestParams.js").GetUserOwnedListsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").List>>;
83
+ getUserFollowedLists({ userId, ...args }: import("../../common/types/requestParams.js").GetUserFollowedListsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").List>>;
84
+ getUserMentions({ userId, ...args }: import("../../common/types/requestParams.js").GetUserMentionsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
85
+ getUserTweets({ userId, ...args }: import("../../common/types/requestParams.js").GetUserTweetsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
86
+ getUserByUsername(username: string): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").User>>;
87
+ getUser({ userId, ...args }: import("../../common/types/requestParams.js").GetUserParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").User>>;
88
+ likeTweet(args: import("../../common/types/requestParams.js").LikeTweetParams): Promise<object>;
89
+ getUserFollowers({ userId, ...args }: import("../../common/types/requestParams.js").GetUserFollowersParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").User>>;
90
+ getUserFollowing({ userId, ...args }: import("../../common/types/requestParams.js").GetUserFollowersParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").User>>;
91
+ retweet(args: import("../../common/types/requestParams.js").LikeTweetParams): Promise<object>;
92
+ searchTweets(args: import("../../common/types/requestParams.js").SearchTweetsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
93
+ unfollowUser({ userId, ...args }: UnfollowUserParams): Promise<object>;
94
+ unlikeTweet({ tweetId, ...args }: import("../../common/types/requestParams.js").UnlikeTweetParams): Promise<object>;
95
+ }, {
96
+ maxResults: {
97
+ type: string;
98
+ label: string;
99
+ description: string;
100
+ optional: boolean;
101
+ };
102
+ listId: {
103
+ type: string;
104
+ label: string;
105
+ description: string;
106
+ options(): Promise<{
107
+ label: string;
108
+ value: string;
109
+ }[]>;
110
+ };
111
+ userNameOrId: {
112
+ type: string;
113
+ label: string;
114
+ description: string;
115
+ optional: boolean;
116
+ default: string;
117
+ };
118
+ tweetId: {
119
+ type: string;
120
+ label: string;
121
+ description: string;
122
+ };
123
+ query: {
124
+ type: string;
125
+ label: string;
126
+ description: string;
127
+ };
128
+ }>)[];
129
+ };
130
+ }>;
131
+ export default _default;
@@ -0,0 +1,33 @@
1
+ import app from "../../app/twitter.app.mjs";
2
+ import { defineAction } from "@pipedream/types";
3
+ import { getUserId } from "../../common/methods.mjs";
4
+ const DOCS_LINK = "https://developer.twitter.com/en/docs/twitter-api/users/follows/api-reference/delete-users-source_id-following";
5
+ export default defineAction({
6
+ key: "twitter-unfollow-user",
7
+ name: "Unfollow User",
8
+ description: `Unfollow a user. [See docs here](${DOCS_LINK})`,
9
+ version: "1.0.1",
10
+ type: "action",
11
+ props: {
12
+ app,
13
+ userNameOrId: {
14
+ propDefinition: [
15
+ app,
16
+ "userNameOrId",
17
+ ],
18
+ },
19
+ },
20
+ methods: {
21
+ getUserId,
22
+ },
23
+ async run({ $ }) {
24
+ const userId = await this.getUserId();
25
+ const params = {
26
+ $,
27
+ userId,
28
+ };
29
+ const response = await this.app.unfollowUser(params);
30
+ $.export("$summary", "Successfully unfollowed user");
31
+ return response;
32
+ },
33
+ });
@@ -0,0 +1,128 @@
1
+ import { UnlikeTweetParams } from "../../common/types/requestParams.js";
2
+ declare const _default: import("@pipedream/types").Action<unknown, {
3
+ app: import("@pipedream/types").App<{
4
+ _getAuthHeader(config: import("../../common/types/requestParams.js").HttpRequestParams): Promise<import("oauth-1.0a").Header>;
5
+ _getBaseUrl(): "https://api.twitter.com/2";
6
+ _httpRequest({ $, ...args }: import("../../common/types/requestParams.js").HttpRequestParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").TwitterEntity>>;
7
+ _paginatedRequest({ maxResults, maxPerPage, params, ...args }: import("../../common/types/requestParams.js").PaginatedRequestParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").TwitterEntity>>;
8
+ addUserToList({ listId, ...args }: import("../../common/types/requestParams.js").AddUserToListParams): Promise<object>;
9
+ createTweet(args: import("../../common/types/requestParams.js").CreateTweetParams): Promise<object>;
10
+ deleteTweet({ tweetId, ...args }: import("../../common/types/requestParams.js").DeleteTweetParams): Promise<object>;
11
+ followUser(args: import("../../common/types/requestParams.js").FollowUserParams): Promise<object>;
12
+ getListTweets({ listId, ...args }: import("../../common/types/requestParams.js").GetListTweetsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
13
+ getTweet({ tweetId, ...args }: import("../../common/types/requestParams.js").GetTweetParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").Tweet>>;
14
+ getAuthenticatedUser(args: import("../../common/types/requestParams.js").GetAuthenticatedUserParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").User>>;
15
+ getAuthenticatedUserId(): Promise<string>;
16
+ getUserLikedTweets({ userId, ...args }: import("../../common/types/requestParams.js").GetUserLikedTweetParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
17
+ getUserOwnedLists({ userId, ...args }: import("../../common/types/requestParams.js").GetUserOwnedListsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").List>>;
18
+ getUserFollowedLists({ userId, ...args }: import("../../common/types/requestParams.js").GetUserFollowedListsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").List>>;
19
+ getUserMentions({ userId, ...args }: import("../../common/types/requestParams.js").GetUserMentionsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
20
+ getUserTweets({ userId, ...args }: import("../../common/types/requestParams.js").GetUserTweetsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
21
+ getUserByUsername(username: string): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").User>>;
22
+ getUser({ userId, ...args }: import("../../common/types/requestParams.js").GetUserParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").User>>;
23
+ likeTweet(args: import("../../common/types/requestParams.js").LikeTweetParams): Promise<object>;
24
+ getUserFollowers({ userId, ...args }: import("../../common/types/requestParams.js").GetUserFollowersParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").User>>;
25
+ getUserFollowing({ userId, ...args }: import("../../common/types/requestParams.js").GetUserFollowersParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").User>>;
26
+ retweet(args: import("../../common/types/requestParams.js").LikeTweetParams): Promise<object>;
27
+ searchTweets(args: import("../../common/types/requestParams.js").SearchTweetsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
28
+ unfollowUser({ userId, ...args }: import("../../common/types/requestParams.js").UnfollowUserParams): Promise<object>;
29
+ unlikeTweet({ tweetId, ...args }: UnlikeTweetParams): Promise<object>;
30
+ }, {
31
+ maxResults: {
32
+ type: string;
33
+ label: string;
34
+ description: string;
35
+ optional: boolean;
36
+ };
37
+ listId: {
38
+ type: string;
39
+ label: string;
40
+ description: string;
41
+ options(): Promise<{
42
+ label: string;
43
+ value: string;
44
+ }[]>;
45
+ };
46
+ userNameOrId: {
47
+ type: string;
48
+ label: string;
49
+ description: string;
50
+ optional: boolean;
51
+ default: string;
52
+ };
53
+ tweetId: {
54
+ type: string;
55
+ label: string;
56
+ description: string;
57
+ };
58
+ query: {
59
+ type: string;
60
+ label: string;
61
+ description: string;
62
+ };
63
+ }>;
64
+ tweetId: {
65
+ propDefinition: (string | import("@pipedream/types").App<{
66
+ _getAuthHeader(config: import("../../common/types/requestParams.js").HttpRequestParams): Promise<import("oauth-1.0a").Header>;
67
+ _getBaseUrl(): "https://api.twitter.com/2";
68
+ _httpRequest({ $, ...args }: import("../../common/types/requestParams.js").HttpRequestParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").TwitterEntity>>;
69
+ _paginatedRequest({ maxResults, maxPerPage, params, ...args }: import("../../common/types/requestParams.js").PaginatedRequestParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").TwitterEntity>>;
70
+ addUserToList({ listId, ...args }: import("../../common/types/requestParams.js").AddUserToListParams): Promise<object>;
71
+ createTweet(args: import("../../common/types/requestParams.js").CreateTweetParams): Promise<object>;
72
+ deleteTweet({ tweetId, ...args }: import("../../common/types/requestParams.js").DeleteTweetParams): Promise<object>;
73
+ followUser(args: import("../../common/types/requestParams.js").FollowUserParams): Promise<object>;
74
+ getListTweets({ listId, ...args }: import("../../common/types/requestParams.js").GetListTweetsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
75
+ getTweet({ tweetId, ...args }: import("../../common/types/requestParams.js").GetTweetParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").Tweet>>;
76
+ getAuthenticatedUser(args: import("../../common/types/requestParams.js").GetAuthenticatedUserParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").User>>;
77
+ getAuthenticatedUserId(): Promise<string>;
78
+ getUserLikedTweets({ userId, ...args }: import("../../common/types/requestParams.js").GetUserLikedTweetParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
79
+ getUserOwnedLists({ userId, ...args }: import("../../common/types/requestParams.js").GetUserOwnedListsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").List>>;
80
+ getUserFollowedLists({ userId, ...args }: import("../../common/types/requestParams.js").GetUserFollowedListsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").List>>;
81
+ getUserMentions({ userId, ...args }: import("../../common/types/requestParams.js").GetUserMentionsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
82
+ getUserTweets({ userId, ...args }: import("../../common/types/requestParams.js").GetUserTweetsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
83
+ getUserByUsername(username: string): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").User>>;
84
+ getUser({ userId, ...args }: import("../../common/types/requestParams.js").GetUserParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").User>>;
85
+ likeTweet(args: import("../../common/types/requestParams.js").LikeTweetParams): Promise<object>;
86
+ getUserFollowers({ userId, ...args }: import("../../common/types/requestParams.js").GetUserFollowersParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").User>>;
87
+ getUserFollowing({ userId, ...args }: import("../../common/types/requestParams.js").GetUserFollowersParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").User>>;
88
+ retweet(args: import("../../common/types/requestParams.js").LikeTweetParams): Promise<object>;
89
+ searchTweets(args: import("../../common/types/requestParams.js").SearchTweetsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
90
+ unfollowUser({ userId, ...args }: import("../../common/types/requestParams.js").UnfollowUserParams): Promise<object>;
91
+ unlikeTweet({ tweetId, ...args }: UnlikeTweetParams): Promise<object>;
92
+ }, {
93
+ maxResults: {
94
+ type: string;
95
+ label: string;
96
+ description: string;
97
+ optional: boolean;
98
+ };
99
+ listId: {
100
+ type: string;
101
+ label: string;
102
+ description: string;
103
+ options(): Promise<{
104
+ label: string;
105
+ value: string;
106
+ }[]>;
107
+ };
108
+ userNameOrId: {
109
+ type: string;
110
+ label: string;
111
+ description: string;
112
+ optional: boolean;
113
+ default: string;
114
+ };
115
+ tweetId: {
116
+ type: string;
117
+ label: string;
118
+ description: string;
119
+ };
120
+ query: {
121
+ type: string;
122
+ label: string;
123
+ description: string;
124
+ };
125
+ }>)[];
126
+ };
127
+ }>;
128
+ export default _default;
@@ -0,0 +1,29 @@
1
+ import app from "../../app/twitter.app.mjs";
2
+ import { defineAction } from "@pipedream/types";
3
+ const DOCS_LINK = "https://developer.twitter.com/en/docs/twitter-api/tweets/likes/api-reference/delete-users-id-likes-tweet_id";
4
+ export default defineAction({
5
+ key: "twitter-unlike-tweet",
6
+ name: "Unlike Tweet",
7
+ description: `Unlike a tweet specified by its ID. [See docs here](${DOCS_LINK})`,
8
+ version: "1.0.1",
9
+ type: "action",
10
+ props: {
11
+ app,
12
+ tweetId: {
13
+ propDefinition: [
14
+ app,
15
+ "tweetId",
16
+ ],
17
+ },
18
+ },
19
+ async run({ $ }) {
20
+ const { tweetId } = this;
21
+ const params = {
22
+ $,
23
+ tweetId,
24
+ };
25
+ const response = await this.app.unlikeTweet(params);
26
+ $.export("$summary", `Successfully unliked tweet ${tweetId}`);
27
+ return response;
28
+ },
29
+ });