@pipedream/twitter 1.0.0 → 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 (63) hide show
  1. package/README.md +1 -3
  2. package/dist/actions/add-user-to-list/add-user-to-list.d.ts +3 -189
  3. package/dist/actions/add-user-to-list/add-user-to-list.mjs +4 -2
  4. package/dist/actions/create-tweet/create-tweet.d.ts +1 -63
  5. package/dist/actions/create-tweet/create-tweet.mjs +2 -2
  6. package/dist/actions/delete-tweet/delete-tweet.d.ts +2 -126
  7. package/dist/actions/delete-tweet/delete-tweet.mjs +4 -3
  8. package/dist/actions/follow-user/follow-user.d.ts +2 -126
  9. package/dist/actions/follow-user/follow-user.mjs +2 -2
  10. package/dist/actions/get-tweet/get-tweet.d.ts +2 -876
  11. package/dist/actions/get-tweet/get-tweet.mjs +4 -5
  12. package/dist/actions/get-user/get-user.d.ts +2 -503
  13. package/dist/actions/get-user/get-user.mjs +10 -7
  14. package/dist/actions/like-tweet/like-tweet.d.ts +2 -126
  15. package/dist/actions/like-tweet/like-tweet.mjs +4 -3
  16. package/dist/actions/list-favorites/list-favorites.d.ts +46 -982
  17. package/dist/actions/list-favorites/list-favorites.mjs +1 -3
  18. package/dist/actions/list-followers/list-followers.d.ts +46 -609
  19. package/dist/actions/list-followers/list-followers.mjs +1 -3
  20. package/dist/actions/list-lists/list-lists.d.ts +46 -608
  21. package/dist/actions/list-lists/list-lists.mjs +1 -3
  22. package/dist/actions/list-mentions/list-mentions.d.ts +46 -982
  23. package/dist/actions/list-mentions/list-mentions.mjs +1 -3
  24. package/dist/actions/list-user-tweets/list-user-tweets.d.ts +46 -982
  25. package/dist/actions/list-user-tweets/list-user-tweets.mjs +1 -3
  26. package/dist/actions/retweet/retweet.d.ts +2 -126
  27. package/dist/actions/retweet/retweet.mjs +6 -3
  28. package/dist/actions/simple-search/simple-search.d.ts +46 -982
  29. package/dist/actions/simple-search/simple-search.mjs +2 -3
  30. package/dist/actions/simple-search-in-list/simple-search-in-list.d.ts +51 -987
  31. package/dist/actions/simple-search-in-list/simple-search-in-list.mjs +1 -3
  32. package/dist/actions/unfollow-user/unfollow-user.d.ts +2 -126
  33. package/dist/actions/unfollow-user/unfollow-user.mjs +1 -1
  34. package/dist/actions/unlike-tweet/unlike-tweet.d.ts +2 -126
  35. package/dist/actions/unlike-tweet/unlike-tweet.mjs +4 -3
  36. package/dist/app/twitter.app.d.ts +2 -64
  37. package/dist/app/twitter.app.mjs +19 -69
  38. package/dist/common/additionalProps.d.ts +0 -0
  39. package/dist/common/additionalProps.mjs +138 -0
  40. package/dist/common/methods.mjs +36 -15
  41. package/dist/common/types/requestParams.d.ts +3 -1
  42. package/dist/sources/common/base.d.ts +2 -64
  43. package/dist/sources/common/base.mjs +5 -7
  44. package/dist/sources/new-follower-of-user/new-follower-of-user.d.ts +4 -505
  45. package/dist/sources/new-follower-of-user/new-follower-of-user.mjs +4 -8
  46. package/dist/sources/new-list-followed/new-list-followed.d.ts +4 -504
  47. package/dist/sources/new-list-followed/new-list-followed.mjs +4 -8
  48. package/dist/sources/new-tweet-in-list/new-tweet-in-list.d.ts +4 -878
  49. package/dist/sources/new-tweet-in-list/new-tweet-in-list.mjs +4 -8
  50. package/dist/sources/new-tweet-liked-by-user/new-tweet-liked-by-user.d.ts +4 -878
  51. package/dist/sources/new-tweet-liked-by-user/new-tweet-liked-by-user.mjs +4 -8
  52. package/dist/sources/new-tweet-posted-by-user/new-tweet-posted-by-user.d.ts +4 -878
  53. package/dist/sources/new-tweet-posted-by-user/new-tweet-posted-by-user.mjs +4 -8
  54. package/dist/sources/new-tweet-posted-matching-query/new-tweet-posted-matching-query.d.ts +4 -878
  55. package/dist/sources/new-tweet-posted-matching-query/new-tweet-posted-matching-query.mjs +4 -11
  56. package/dist/sources/new-unfollower-of-user/new-unfollower-of-user.d.ts +2 -126
  57. package/dist/sources/new-unfollower-of-user/new-unfollower-of-user.mjs +1 -1
  58. package/dist/sources/new-user-followed/new-user-followed.d.ts +4 -505
  59. package/dist/sources/new-user-followed/new-user-followed.mjs +4 -8
  60. package/dist/tsconfig.tsbuildinfo +1 -1
  61. package/package.json +1 -1
  62. package/dist/common/propGroups.d.ts +0 -1509
  63. package/dist/common/propGroups.mjs +0 -82
@@ -1,13 +1,12 @@
1
1
  import app from "../../app/twitter.app.mjs";
2
2
  import { defineAction } from "@pipedream/types";
3
- import { tweetFieldProps } from "../../common/propGroups.mjs";
4
3
  import { getTweetFields } from "../../common/methods.mjs";
5
4
  const DOCS_LINK = "https://developer.twitter.com/en/docs/twitter-api/tweets/lookup/api-reference/get-tweets-id";
6
5
  export default defineAction({
7
6
  key: "twitter-get-tweet",
8
7
  name: "Get Tweet",
9
8
  description: `Return a single tweet specified by ID. [See docs here](${DOCS_LINK})`,
10
- version: "1.0.0",
9
+ version: "1.1.0",
11
10
  type: "action",
12
11
  props: {
13
12
  app,
@@ -17,19 +16,19 @@ export default defineAction({
17
16
  "tweetId",
18
17
  ],
19
18
  },
20
- ...tweetFieldProps,
21
19
  },
22
20
  methods: {
23
21
  getTweetFields,
24
22
  },
25
23
  async run({ $ }) {
24
+ const { tweetId } = this;
26
25
  const params = {
27
26
  $,
28
27
  params: this.getTweetFields(),
29
- tweetId: this.tweetId,
28
+ tweetId,
30
29
  };
31
30
  const response = await this.app.getTweet(params);
32
- $.export("$summary", "Successfully retrieved tweet");
31
+ $.export("$summary", `Successfully retrieved tweet (ID ${tweetId})`);
33
32
  return response;
34
33
  },
35
34
  });
@@ -5,383 +5,6 @@ declare const _default: import("@pipedream/types").Action<{
5
5
  getUserId: typeof getUserId;
6
6
  getUserFields: typeof getUserFields;
7
7
  }, {
8
- expansions: {
9
- propDefinition: (string | import("@pipedream/types").App<{
10
- _getAuthHeader(config: import("../../common/types/requestParams.js").HttpRequestParams): Promise<import("oauth-1.0a").Header>;
11
- _getBaseUrl(): "https://api.twitter.com/2";
12
- _httpRequest({ $, ...args }: import("../../common/types/requestParams.js").HttpRequestParams): Promise<ResponseObject<import("../../common/types/responseSchemas").TwitterEntity>>;
13
- _paginatedRequest({ maxResults, maxPerPage, params, ...args }: import("../../common/types/requestParams.js").PaginatedRequestParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").TwitterEntity>>;
14
- addUserToList({ listId, ...args }: import("../../common/types/requestParams.js").AddUserToListParams): Promise<object>;
15
- createTweet(args: import("../../common/types/requestParams.js").CreateTweetParams): Promise<object>;
16
- deleteTweet({ tweetId, ...args }: import("../../common/types/requestParams.js").DeleteTweetParams): Promise<object>;
17
- followUser(args: import("../../common/types/requestParams.js").FollowUserParams): Promise<object>;
18
- getListTweets({ listId, ...args }: import("../../common/types/requestParams.js").GetListTweetsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
19
- getTweet({ tweetId, ...args }: import("../../common/types/requestParams.js").GetTweetParams): Promise<ResponseObject<import("../../common/types/responseSchemas").Tweet>>;
20
- getAuthenticatedUserId(): Promise<string>;
21
- getUserLikedTweets({ userId, ...args }: import("../../common/types/requestParams.js").GetUserLikedTweetParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
22
- getUserOwnedLists({ userId, ...args }: import("../../common/types/requestParams.js").GetUserOwnedListsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").List>>;
23
- getUserFollowedLists({ userId, ...args }: import("../../common/types/requestParams.js").GetUserFollowedListsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").List>>;
24
- getUserMentions({ userId, ...args }: import("../../common/types/requestParams.js").GetUserMentionsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
25
- getUserTweets({ userId, ...args }: import("../../common/types/requestParams.js").GetUserTweetsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
26
- getUserByUsername(username: string): Promise<ResponseObject<User>>;
27
- getUser({ userId, ...args }: GetUserParams): Promise<ResponseObject<User>>;
28
- likeTweet(args: import("../../common/types/requestParams.js").LikeTweetParams): Promise<object>;
29
- getUserFollowers({ userId, ...args }: import("../../common/types/requestParams.js").GetUserFollowersParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<User>>;
30
- getUserFollowing({ userId, ...args }: import("../../common/types/requestParams.js").GetUserFollowersParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<User>>;
31
- retweet(args: import("../../common/types/requestParams.js").LikeTweetParams): Promise<object>;
32
- searchTweets(args: import("../../common/types/requestParams.js").SearchTweetsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
33
- unfollowUser({ userId, ...args }: import("../../common/types/requestParams.js").UnfollowUserParams): Promise<object>;
34
- unlikeTweet({ tweetId, ...args }: import("../../common/types/requestParams.js").UnlikeTweetParams): Promise<object>;
35
- }, {
36
- maxResults: {
37
- type: string;
38
- label: string;
39
- description: string;
40
- optional: boolean;
41
- };
42
- listId: {
43
- type: string;
44
- label: string;
45
- description: string;
46
- options(): Promise<{
47
- label: string;
48
- value: string;
49
- }[]>;
50
- };
51
- userNameOrId: {
52
- type: string;
53
- label: string;
54
- description: string;
55
- optional: boolean;
56
- default: string;
57
- };
58
- tweetId: {
59
- type: string;
60
- label: string;
61
- description: string;
62
- };
63
- query: {
64
- type: string;
65
- label: string;
66
- description: string;
67
- };
68
- listExpansions: {
69
- type: string;
70
- label: string;
71
- optional: boolean;
72
- description: string;
73
- options: string[];
74
- };
75
- tweetExpansions: {
76
- type: string;
77
- label: string;
78
- optional: boolean;
79
- description: string;
80
- options: string[];
81
- };
82
- userExpansions: {
83
- type: string;
84
- label: string;
85
- optional: boolean;
86
- description: string;
87
- options: string[];
88
- };
89
- listFields: {
90
- type: string;
91
- label: string;
92
- description: string;
93
- optional: boolean;
94
- options: string[];
95
- };
96
- mediaFields: {
97
- type: string;
98
- label: string;
99
- description: string;
100
- optional: boolean;
101
- options: string[];
102
- };
103
- placeFields: {
104
- type: string;
105
- label: string;
106
- description: string;
107
- optional: boolean;
108
- options: string[];
109
- };
110
- pollFields: {
111
- type: string;
112
- label: string;
113
- description: string;
114
- optional: boolean;
115
- options: string[];
116
- };
117
- tweetFields: {
118
- type: string;
119
- label: string;
120
- description: string;
121
- optional: boolean;
122
- options: string[];
123
- };
124
- userFields: {
125
- type: string;
126
- label: string;
127
- description: string;
128
- optional: boolean;
129
- options: string[];
130
- };
131
- }>)[];
132
- };
133
- tweetFields: {
134
- propDefinition: (string | import("@pipedream/types").App<{
135
- _getAuthHeader(config: import("../../common/types/requestParams.js").HttpRequestParams): Promise<import("oauth-1.0a").Header>;
136
- _getBaseUrl(): "https://api.twitter.com/2";
137
- _httpRequest({ $, ...args }: import("../../common/types/requestParams.js").HttpRequestParams): Promise<ResponseObject<import("../../common/types/responseSchemas").TwitterEntity>>;
138
- _paginatedRequest({ maxResults, maxPerPage, params, ...args }: import("../../common/types/requestParams.js").PaginatedRequestParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").TwitterEntity>>;
139
- addUserToList({ listId, ...args }: import("../../common/types/requestParams.js").AddUserToListParams): Promise<object>;
140
- createTweet(args: import("../../common/types/requestParams.js").CreateTweetParams): Promise<object>;
141
- deleteTweet({ tweetId, ...args }: import("../../common/types/requestParams.js").DeleteTweetParams): Promise<object>;
142
- followUser(args: import("../../common/types/requestParams.js").FollowUserParams): Promise<object>;
143
- getListTweets({ listId, ...args }: import("../../common/types/requestParams.js").GetListTweetsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
144
- getTweet({ tweetId, ...args }: import("../../common/types/requestParams.js").GetTweetParams): Promise<ResponseObject<import("../../common/types/responseSchemas").Tweet>>;
145
- getAuthenticatedUserId(): Promise<string>;
146
- getUserLikedTweets({ userId, ...args }: import("../../common/types/requestParams.js").GetUserLikedTweetParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
147
- getUserOwnedLists({ userId, ...args }: import("../../common/types/requestParams.js").GetUserOwnedListsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").List>>;
148
- getUserFollowedLists({ userId, ...args }: import("../../common/types/requestParams.js").GetUserFollowedListsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").List>>;
149
- getUserMentions({ userId, ...args }: import("../../common/types/requestParams.js").GetUserMentionsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
150
- getUserTweets({ userId, ...args }: import("../../common/types/requestParams.js").GetUserTweetsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
151
- getUserByUsername(username: string): Promise<ResponseObject<User>>;
152
- getUser({ userId, ...args }: GetUserParams): Promise<ResponseObject<User>>;
153
- likeTweet(args: import("../../common/types/requestParams.js").LikeTweetParams): Promise<object>;
154
- getUserFollowers({ userId, ...args }: import("../../common/types/requestParams.js").GetUserFollowersParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<User>>;
155
- getUserFollowing({ userId, ...args }: import("../../common/types/requestParams.js").GetUserFollowersParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<User>>;
156
- retweet(args: import("../../common/types/requestParams.js").LikeTweetParams): Promise<object>;
157
- searchTweets(args: import("../../common/types/requestParams.js").SearchTweetsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
158
- unfollowUser({ userId, ...args }: import("../../common/types/requestParams.js").UnfollowUserParams): Promise<object>;
159
- unlikeTweet({ tweetId, ...args }: import("../../common/types/requestParams.js").UnlikeTweetParams): Promise<object>;
160
- }, {
161
- maxResults: {
162
- type: string;
163
- label: string;
164
- description: string;
165
- optional: boolean;
166
- };
167
- listId: {
168
- type: string;
169
- label: string;
170
- description: string;
171
- options(): Promise<{
172
- label: string;
173
- value: string;
174
- }[]>;
175
- };
176
- userNameOrId: {
177
- type: string;
178
- label: string;
179
- description: string;
180
- optional: boolean;
181
- default: string;
182
- };
183
- tweetId: {
184
- type: string;
185
- label: string;
186
- description: string;
187
- };
188
- query: {
189
- type: string;
190
- label: string;
191
- description: string;
192
- };
193
- listExpansions: {
194
- type: string;
195
- label: string;
196
- optional: boolean;
197
- description: string;
198
- options: string[];
199
- };
200
- tweetExpansions: {
201
- type: string;
202
- label: string;
203
- optional: boolean;
204
- description: string;
205
- options: string[];
206
- };
207
- userExpansions: {
208
- type: string;
209
- label: string;
210
- optional: boolean;
211
- description: string;
212
- options: string[];
213
- };
214
- listFields: {
215
- type: string;
216
- label: string;
217
- description: string;
218
- optional: boolean;
219
- options: string[];
220
- };
221
- mediaFields: {
222
- type: string;
223
- label: string;
224
- description: string;
225
- optional: boolean;
226
- options: string[];
227
- };
228
- placeFields: {
229
- type: string;
230
- label: string;
231
- description: string;
232
- optional: boolean;
233
- options: string[];
234
- };
235
- pollFields: {
236
- type: string;
237
- label: string;
238
- description: string;
239
- optional: boolean;
240
- options: string[];
241
- };
242
- tweetFields: {
243
- type: string;
244
- label: string;
245
- description: string;
246
- optional: boolean;
247
- options: string[];
248
- };
249
- userFields: {
250
- type: string;
251
- label: string;
252
- description: string;
253
- optional: boolean;
254
- options: string[];
255
- };
256
- }>)[];
257
- description: string;
258
- };
259
- userFields: {
260
- propDefinition: (string | import("@pipedream/types").App<{
261
- _getAuthHeader(config: import("../../common/types/requestParams.js").HttpRequestParams): Promise<import("oauth-1.0a").Header>;
262
- _getBaseUrl(): "https://api.twitter.com/2";
263
- _httpRequest({ $, ...args }: import("../../common/types/requestParams.js").HttpRequestParams): Promise<ResponseObject<import("../../common/types/responseSchemas").TwitterEntity>>;
264
- _paginatedRequest({ maxResults, maxPerPage, params, ...args }: import("../../common/types/requestParams.js").PaginatedRequestParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").TwitterEntity>>;
265
- addUserToList({ listId, ...args }: import("../../common/types/requestParams.js").AddUserToListParams): Promise<object>;
266
- createTweet(args: import("../../common/types/requestParams.js").CreateTweetParams): Promise<object>;
267
- deleteTweet({ tweetId, ...args }: import("../../common/types/requestParams.js").DeleteTweetParams): Promise<object>;
268
- followUser(args: import("../../common/types/requestParams.js").FollowUserParams): Promise<object>;
269
- getListTweets({ listId, ...args }: import("../../common/types/requestParams.js").GetListTweetsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
270
- getTweet({ tweetId, ...args }: import("../../common/types/requestParams.js").GetTweetParams): Promise<ResponseObject<import("../../common/types/responseSchemas").Tweet>>;
271
- getAuthenticatedUserId(): Promise<string>;
272
- getUserLikedTweets({ userId, ...args }: import("../../common/types/requestParams.js").GetUserLikedTweetParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
273
- getUserOwnedLists({ userId, ...args }: import("../../common/types/requestParams.js").GetUserOwnedListsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").List>>;
274
- getUserFollowedLists({ userId, ...args }: import("../../common/types/requestParams.js").GetUserFollowedListsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").List>>;
275
- getUserMentions({ userId, ...args }: import("../../common/types/requestParams.js").GetUserMentionsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
276
- getUserTweets({ userId, ...args }: import("../../common/types/requestParams.js").GetUserTweetsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
277
- getUserByUsername(username: string): Promise<ResponseObject<User>>;
278
- getUser({ userId, ...args }: GetUserParams): Promise<ResponseObject<User>>;
279
- likeTweet(args: import("../../common/types/requestParams.js").LikeTweetParams): Promise<object>;
280
- getUserFollowers({ userId, ...args }: import("../../common/types/requestParams.js").GetUserFollowersParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<User>>;
281
- getUserFollowing({ userId, ...args }: import("../../common/types/requestParams.js").GetUserFollowersParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<User>>;
282
- retweet(args: import("../../common/types/requestParams.js").LikeTweetParams): Promise<object>;
283
- searchTweets(args: import("../../common/types/requestParams.js").SearchTweetsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
284
- unfollowUser({ userId, ...args }: import("../../common/types/requestParams.js").UnfollowUserParams): Promise<object>;
285
- unlikeTweet({ tweetId, ...args }: import("../../common/types/requestParams.js").UnlikeTweetParams): Promise<object>;
286
- }, {
287
- maxResults: {
288
- type: string;
289
- label: string;
290
- description: string;
291
- optional: boolean;
292
- };
293
- listId: {
294
- type: string;
295
- label: string;
296
- description: string;
297
- options(): Promise<{
298
- label: string;
299
- value: string;
300
- }[]>;
301
- };
302
- userNameOrId: {
303
- type: string;
304
- label: string;
305
- description: string;
306
- optional: boolean;
307
- default: string;
308
- };
309
- tweetId: {
310
- type: string;
311
- label: string;
312
- description: string;
313
- };
314
- query: {
315
- type: string;
316
- label: string;
317
- description: string;
318
- };
319
- listExpansions: {
320
- type: string;
321
- label: string;
322
- optional: boolean;
323
- description: string;
324
- options: string[];
325
- };
326
- tweetExpansions: {
327
- type: string;
328
- label: string;
329
- optional: boolean;
330
- description: string;
331
- options: string[];
332
- };
333
- userExpansions: {
334
- type: string;
335
- label: string;
336
- optional: boolean;
337
- description: string;
338
- options: string[];
339
- };
340
- listFields: {
341
- type: string;
342
- label: string;
343
- description: string;
344
- optional: boolean;
345
- options: string[];
346
- };
347
- mediaFields: {
348
- type: string;
349
- label: string;
350
- description: string;
351
- optional: boolean;
352
- options: string[];
353
- };
354
- placeFields: {
355
- type: string;
356
- label: string;
357
- description: string;
358
- optional: boolean;
359
- options: string[];
360
- };
361
- pollFields: {
362
- type: string;
363
- label: string;
364
- description: string;
365
- optional: boolean;
366
- options: string[];
367
- };
368
- tweetFields: {
369
- type: string;
370
- label: string;
371
- description: string;
372
- optional: boolean;
373
- options: string[];
374
- };
375
- userFields: {
376
- type: string;
377
- label: string;
378
- description: string;
379
- optional: boolean;
380
- options: string[];
381
- };
382
- }>)[];
383
- description: string;
384
- };
385
8
  app: import("@pipedream/types").App<{
386
9
  _getAuthHeader(config: import("../../common/types/requestParams.js").HttpRequestParams): Promise<import("oauth-1.0a").Header>;
387
10
  _getBaseUrl(): "https://api.twitter.com/2";
@@ -393,6 +16,7 @@ declare const _default: import("@pipedream/types").Action<{
393
16
  followUser(args: import("../../common/types/requestParams.js").FollowUserParams): Promise<object>;
394
17
  getListTweets({ listId, ...args }: import("../../common/types/requestParams.js").GetListTweetsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
395
18
  getTweet({ tweetId, ...args }: import("../../common/types/requestParams.js").GetTweetParams): Promise<ResponseObject<import("../../common/types/responseSchemas").Tweet>>;
19
+ getAuthenticatedUser(args: import("../../common/types/requestParams.js").GetAuthenticatedUserParams): Promise<ResponseObject<User>>;
396
20
  getAuthenticatedUserId(): Promise<string>;
397
21
  getUserLikedTweets({ userId, ...args }: import("../../common/types/requestParams.js").GetUserLikedTweetParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
398
22
  getUserOwnedLists({ userId, ...args }: import("../../common/types/requestParams.js").GetUserOwnedListsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").List>>;
@@ -441,69 +65,6 @@ declare const _default: import("@pipedream/types").Action<{
441
65
  label: string;
442
66
  description: string;
443
67
  };
444
- listExpansions: {
445
- type: string;
446
- label: string;
447
- optional: boolean;
448
- description: string;
449
- options: string[];
450
- };
451
- tweetExpansions: {
452
- type: string;
453
- label: string;
454
- optional: boolean;
455
- description: string;
456
- options: string[];
457
- };
458
- userExpansions: {
459
- type: string;
460
- label: string;
461
- optional: boolean;
462
- description: string;
463
- options: string[];
464
- };
465
- listFields: {
466
- type: string;
467
- label: string;
468
- description: string;
469
- optional: boolean;
470
- options: string[];
471
- };
472
- mediaFields: {
473
- type: string;
474
- label: string;
475
- description: string;
476
- optional: boolean;
477
- options: string[];
478
- };
479
- placeFields: {
480
- type: string;
481
- label: string;
482
- description: string;
483
- optional: boolean;
484
- options: string[];
485
- };
486
- pollFields: {
487
- type: string;
488
- label: string;
489
- description: string;
490
- optional: boolean;
491
- options: string[];
492
- };
493
- tweetFields: {
494
- type: string;
495
- label: string;
496
- description: string;
497
- optional: boolean;
498
- options: string[];
499
- };
500
- userFields: {
501
- type: string;
502
- label: string;
503
- description: string;
504
- optional: boolean;
505
- options: string[];
506
- };
507
68
  }>;
508
69
  userNameOrId: {
509
70
  propDefinition: (string | import("@pipedream/types").App<{
@@ -517,6 +78,7 @@ declare const _default: import("@pipedream/types").Action<{
517
78
  followUser(args: import("../../common/types/requestParams.js").FollowUserParams): Promise<object>;
518
79
  getListTweets({ listId, ...args }: import("../../common/types/requestParams.js").GetListTweetsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
519
80
  getTweet({ tweetId, ...args }: import("../../common/types/requestParams.js").GetTweetParams): Promise<ResponseObject<import("../../common/types/responseSchemas").Tweet>>;
81
+ getAuthenticatedUser(args: import("../../common/types/requestParams.js").GetAuthenticatedUserParams): Promise<ResponseObject<User>>;
520
82
  getAuthenticatedUserId(): Promise<string>;
521
83
  getUserLikedTweets({ userId, ...args }: import("../../common/types/requestParams.js").GetUserLikedTweetParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
522
84
  getUserOwnedLists({ userId, ...args }: import("../../common/types/requestParams.js").GetUserOwnedListsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").List>>;
@@ -565,69 +127,6 @@ declare const _default: import("@pipedream/types").Action<{
565
127
  label: string;
566
128
  description: string;
567
129
  };
568
- listExpansions: {
569
- type: string;
570
- label: string;
571
- optional: boolean;
572
- description: string;
573
- options: string[];
574
- };
575
- tweetExpansions: {
576
- type: string;
577
- label: string;
578
- optional: boolean;
579
- description: string;
580
- options: string[];
581
- };
582
- userExpansions: {
583
- type: string;
584
- label: string;
585
- optional: boolean;
586
- description: string;
587
- options: string[];
588
- };
589
- listFields: {
590
- type: string;
591
- label: string;
592
- description: string;
593
- optional: boolean;
594
- options: string[];
595
- };
596
- mediaFields: {
597
- type: string;
598
- label: string;
599
- description: string;
600
- optional: boolean;
601
- options: string[];
602
- };
603
- placeFields: {
604
- type: string;
605
- label: string;
606
- description: string;
607
- optional: boolean;
608
- options: string[];
609
- };
610
- pollFields: {
611
- type: string;
612
- label: string;
613
- description: string;
614
- optional: boolean;
615
- options: string[];
616
- };
617
- tweetFields: {
618
- type: string;
619
- label: string;
620
- description: string;
621
- optional: boolean;
622
- options: string[];
623
- };
624
- userFields: {
625
- type: string;
626
- label: string;
627
- description: string;
628
- optional: boolean;
629
- options: string[];
630
- };
631
130
  }>)[];
632
131
  };
633
132
  }>;
@@ -1,13 +1,12 @@
1
1
  import app from "../../app/twitter.app.mjs";
2
2
  import { defineAction } from "@pipedream/types";
3
3
  import { getUserId, getUserFields, } from "../../common/methods.mjs";
4
- import { userFieldProps } from "../../common/propGroups.mjs";
5
4
  const DOCS_LINK = "https://developer.twitter.com/en/docs/twitter-api/users/lookup/api-reference/get-users-id";
6
5
  export default defineAction({
7
6
  key: "twitter-get-user",
8
7
  name: "Get User",
9
8
  description: `Get information about a user. [See docs here](${DOCS_LINK})`,
10
- version: "1.0.0",
9
+ version: "1.1.0",
11
10
  type: "action",
12
11
  props: {
13
12
  app,
@@ -17,21 +16,25 @@ export default defineAction({
17
16
  "userNameOrId",
18
17
  ],
19
18
  },
20
- ...userFieldProps,
21
19
  },
22
20
  methods: {
23
21
  getUserId,
24
22
  getUserFields,
25
23
  },
26
24
  async run({ $ }) {
27
- const userId = await this.getUserId();
25
+ let response;
28
26
  const params = {
29
27
  $,
30
28
  params: this.getUserFields(),
31
- userId,
32
29
  };
33
- const response = await this.app.getUser(params);
34
- $.export("$summary", "Successfully retrieved user");
30
+ if (this.userNameOrId === "me") {
31
+ response = await this.app.getAuthenticatedUser(params);
32
+ }
33
+ else {
34
+ params.userId = await this.getUserId();
35
+ response = await this.app.getUser(params);
36
+ }
37
+ $.export("$summary", `Successfully retrieved user "${response.data?.username}"`);
35
38
  return response;
36
39
  },
37
40
  });