@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,7 +1,6 @@
1
1
  import app from "../../app/twitter.app.mjs";
2
2
  import { defineAction } from "@pipedream/types";
3
3
  import { getMultiItemSummary, getUserId, getTweetFields, } from "../../common/methods.mjs";
4
- import { tweetFieldProps } from "../../common/propGroups.mjs";
5
4
  export const DOCS_LINK = "https://developer.twitter.com/en/docs/twitter-api/tweets/timelines/api-reference/get-users-id-tweets";
6
5
  const MIN_RESULTS = 5;
7
6
  const DEFAULT_RESULTS = 10;
@@ -10,7 +9,7 @@ export default defineAction({
10
9
  key: "twitter-list-user-tweets",
11
10
  name: "List User Tweets",
12
11
  description: `Return a collection of the most recent tweets posted by a user. [See docs here](${DOCS_LINK})`,
13
- version: "1.0.0",
12
+ version: "1.1.0",
14
13
  type: "action",
15
14
  props: {
16
15
  app,
@@ -20,7 +19,6 @@ export default defineAction({
20
19
  "userNameOrId",
21
20
  ],
22
21
  },
23
- ...tweetFieldProps,
24
22
  maxResults: {
25
23
  propDefinition: [
26
24
  app,
@@ -10,6 +10,7 @@ declare const _default: import("@pipedream/types").Action<unknown, {
10
10
  followUser(args: import("../../common/types/requestParams.js").FollowUserParams): Promise<object>;
11
11
  getListTweets({ listId, ...args }: import("../../common/types/requestParams.js").GetListTweetsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
12
12
  getTweet({ tweetId, ...args }: import("../../common/types/requestParams.js").GetTweetParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").Tweet>>;
13
+ getAuthenticatedUser(args: import("../../common/types/requestParams.js").GetAuthenticatedUserParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").User>>;
13
14
  getAuthenticatedUserId(): Promise<string>;
14
15
  getUserLikedTweets({ userId, ...args }: import("../../common/types/requestParams.js").GetUserLikedTweetParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
15
16
  getUserOwnedLists({ userId, ...args }: import("../../common/types/requestParams.js").GetUserOwnedListsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").List>>;
@@ -58,69 +59,6 @@ declare const _default: import("@pipedream/types").Action<unknown, {
58
59
  label: string;
59
60
  description: string;
60
61
  };
61
- listExpansions: {
62
- type: string;
63
- label: string;
64
- optional: boolean;
65
- description: string;
66
- options: string[];
67
- };
68
- tweetExpansions: {
69
- type: string;
70
- label: string;
71
- optional: boolean;
72
- description: string;
73
- options: string[];
74
- };
75
- userExpansions: {
76
- type: string;
77
- label: string;
78
- optional: boolean;
79
- description: string;
80
- options: string[];
81
- };
82
- listFields: {
83
- type: string;
84
- label: string;
85
- description: string;
86
- optional: boolean;
87
- options: string[];
88
- };
89
- mediaFields: {
90
- type: string;
91
- label: string;
92
- description: string;
93
- optional: boolean;
94
- options: string[];
95
- };
96
- placeFields: {
97
- type: string;
98
- label: string;
99
- description: string;
100
- optional: boolean;
101
- options: string[];
102
- };
103
- pollFields: {
104
- type: string;
105
- label: string;
106
- description: string;
107
- optional: boolean;
108
- options: string[];
109
- };
110
- tweetFields: {
111
- type: string;
112
- label: string;
113
- description: string;
114
- optional: boolean;
115
- options: string[];
116
- };
117
- userFields: {
118
- type: string;
119
- label: string;
120
- description: string;
121
- optional: boolean;
122
- options: string[];
123
- };
124
62
  }>;
125
63
  tweetId: {
126
64
  propDefinition: (string | import("@pipedream/types").App<{
@@ -134,6 +72,7 @@ declare const _default: import("@pipedream/types").Action<unknown, {
134
72
  followUser(args: import("../../common/types/requestParams.js").FollowUserParams): Promise<object>;
135
73
  getListTweets({ listId, ...args }: import("../../common/types/requestParams.js").GetListTweetsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
136
74
  getTweet({ tweetId, ...args }: import("../../common/types/requestParams.js").GetTweetParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").Tweet>>;
75
+ getAuthenticatedUser(args: import("../../common/types/requestParams.js").GetAuthenticatedUserParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").User>>;
137
76
  getAuthenticatedUserId(): Promise<string>;
138
77
  getUserLikedTweets({ userId, ...args }: import("../../common/types/requestParams.js").GetUserLikedTweetParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
139
78
  getUserOwnedLists({ userId, ...args }: import("../../common/types/requestParams.js").GetUserOwnedListsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").List>>;
@@ -182,69 +121,6 @@ declare const _default: import("@pipedream/types").Action<unknown, {
182
121
  label: string;
183
122
  description: string;
184
123
  };
185
- listExpansions: {
186
- type: string;
187
- label: string;
188
- optional: boolean;
189
- description: string;
190
- options: string[];
191
- };
192
- tweetExpansions: {
193
- type: string;
194
- label: string;
195
- optional: boolean;
196
- description: string;
197
- options: string[];
198
- };
199
- userExpansions: {
200
- type: string;
201
- label: string;
202
- optional: boolean;
203
- description: string;
204
- options: string[];
205
- };
206
- listFields: {
207
- type: string;
208
- label: string;
209
- description: string;
210
- optional: boolean;
211
- options: string[];
212
- };
213
- mediaFields: {
214
- type: string;
215
- label: string;
216
- description: string;
217
- optional: boolean;
218
- options: string[];
219
- };
220
- placeFields: {
221
- type: string;
222
- label: string;
223
- description: string;
224
- optional: boolean;
225
- options: string[];
226
- };
227
- pollFields: {
228
- type: string;
229
- label: string;
230
- description: string;
231
- optional: boolean;
232
- options: string[];
233
- };
234
- tweetFields: {
235
- type: string;
236
- label: string;
237
- description: string;
238
- optional: boolean;
239
- options: string[];
240
- };
241
- userFields: {
242
- type: string;
243
- label: string;
244
- description: string;
245
- optional: boolean;
246
- options: string[];
247
- };
248
124
  }>)[];
249
125
  description: string;
250
126
  };
@@ -5,7 +5,7 @@ export default defineAction({
5
5
  key: "twitter-retweet",
6
6
  name: "Retweet a tweet",
7
7
  description: `Retweet a tweet specified by ID. [See docs here](${DOCS_LINK})`,
8
- version: "1.0.0",
8
+ version: "1.0.1",
9
9
  type: "action",
10
10
  props: {
11
11
  app,
@@ -18,14 +18,17 @@ export default defineAction({
18
18
  },
19
19
  },
20
20
  async run({ $ }) {
21
+ const { tweetId } = this;
21
22
  const params = {
22
23
  $,
23
24
  data: {
24
- tweet_id: this.tweetId,
25
+ tweet_id: tweetId,
25
26
  },
26
27
  };
27
28
  const response = await this.app.retweet(params);
28
- $.export("$summary", "Tweet successfully retweeted");
29
+ $.export("$summary", response.data?.retweeted !== true
30
+ ? "Retweet failed"
31
+ : "Tweet successfully retweeted");
29
32
  return response;
30
33
  },
31
34
  });