@pipedream/twitter 1.0.0 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (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
@@ -2,7 +2,6 @@ import app from "../../app/twitter.app.mjs";
2
2
  import { defineSource } from "@pipedream/types";
3
3
  import common from "../common/base.mjs";
4
4
  import { getTweetSummary as getItemSummary } from "../common/getItemSummary.mjs";
5
- import { tweetFieldProps } from "../../common/propGroups.mjs";
6
5
  import { getTweetFields } from "../../common/methods.mjs";
7
6
  import { DOCS_LINK, MAX_RESULTS_PER_PAGE, } from "../../actions/simple-search/simple-search.mjs";
8
7
  export default defineSource({
@@ -10,7 +9,7 @@ export default defineSource({
10
9
  key: "twitter-new-tweet-posted-matching-query",
11
10
  name: "New Tweet Posted Matching Query",
12
11
  description: `Emit new event when a new tweet matching the specified query is posted [See docs here](${DOCS_LINK})`,
13
- version: "0.0.1",
12
+ version: "0.1.1",
14
13
  type: "source",
15
14
  props: {
16
15
  ...common.props,
@@ -20,7 +19,6 @@ export default defineSource({
20
19
  "query",
21
20
  ],
22
21
  },
23
- ...tweetFieldProps,
24
22
  },
25
23
  methods: {
26
24
  ...common.methods,
@@ -29,21 +27,16 @@ export default defineSource({
29
27
  return "Tweet";
30
28
  },
31
29
  getItemSummary,
32
- async getResources(customize) {
30
+ async getResources(maxResults) {
33
31
  const params = {
34
32
  $: this,
35
33
  maxPerPage: MAX_RESULTS_PER_PAGE,
36
- maxResults: MAX_RESULTS_PER_PAGE,
34
+ maxResults: maxResults ?? MAX_RESULTS_PER_PAGE,
37
35
  params: {
38
36
  query: this.query,
37
+ ...this.getTweetFields(),
39
38
  },
40
39
  };
41
- if (customize) {
42
- params.params = {
43
- ...params.params,
44
- ...this.getTweetFields(),
45
- };
46
- }
47
40
  const { data } = await this.app.searchTweets(params);
48
41
  return data;
49
42
  },
@@ -26,6 +26,7 @@ declare const _default: import("@pipedream/types").Source<{
26
26
  followUser(args: import("../../common/types/requestParams.js").FollowUserParams): Promise<object>;
27
27
  getListTweets({ listId, ...args }: import("../../common/types/requestParams.js").GetListTweetsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
28
28
  getTweet({ tweetId, ...args }: import("../../common/types/requestParams.js").GetTweetParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").Tweet>>;
29
+ getAuthenticatedUser(args: import("../../common/types/requestParams.js").GetAuthenticatedUserParams): Promise<import("../../common/types/responseSchemas").ResponseObject<User>>;
29
30
  getAuthenticatedUserId(): Promise<string>;
30
31
  getUserLikedTweets({ userId, ...args }: import("../../common/types/requestParams.js").GetUserLikedTweetParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
31
32
  getUserOwnedLists({ userId, ...args }: import("../../common/types/requestParams.js").GetUserOwnedListsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").List>>;
@@ -74,69 +75,6 @@ declare const _default: import("@pipedream/types").Source<{
74
75
  label: string;
75
76
  description: string;
76
77
  };
77
- listExpansions: {
78
- type: string;
79
- label: string;
80
- optional: boolean;
81
- description: string;
82
- options: string[];
83
- };
84
- tweetExpansions: {
85
- type: string;
86
- label: string;
87
- optional: boolean;
88
- description: string;
89
- options: string[];
90
- };
91
- userExpansions: {
92
- type: string;
93
- label: string;
94
- optional: boolean;
95
- description: string;
96
- options: string[];
97
- };
98
- listFields: {
99
- type: string;
100
- label: string;
101
- description: string;
102
- optional: boolean;
103
- options: string[];
104
- };
105
- mediaFields: {
106
- type: string;
107
- label: string;
108
- description: string;
109
- optional: boolean;
110
- options: string[];
111
- };
112
- placeFields: {
113
- type: string;
114
- label: string;
115
- description: string;
116
- optional: boolean;
117
- options: string[];
118
- };
119
- pollFields: {
120
- type: string;
121
- label: string;
122
- description: string;
123
- optional: boolean;
124
- options: string[];
125
- };
126
- tweetFields: {
127
- type: string;
128
- label: string;
129
- description: string;
130
- optional: boolean;
131
- options: string[];
132
- };
133
- userFields: {
134
- type: string;
135
- label: string;
136
- description: string;
137
- optional: boolean;
138
- options: string[];
139
- };
140
78
  }>)[];
141
79
  };
142
80
  app: import("@pipedream/types").App<{
@@ -150,6 +88,7 @@ declare const _default: import("@pipedream/types").Source<{
150
88
  followUser(args: import("../../common/types/requestParams.js").FollowUserParams): Promise<object>;
151
89
  getListTweets({ listId, ...args }: import("../../common/types/requestParams.js").GetListTweetsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
152
90
  getTweet({ tweetId, ...args }: import("../../common/types/requestParams.js").GetTweetParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").Tweet>>;
91
+ getAuthenticatedUser(args: import("../../common/types/requestParams.js").GetAuthenticatedUserParams): Promise<import("../../common/types/responseSchemas").ResponseObject<User>>;
153
92
  getAuthenticatedUserId(): Promise<string>;
154
93
  getUserLikedTweets({ userId, ...args }: import("../../common/types/requestParams.js").GetUserLikedTweetParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
155
94
  getUserOwnedLists({ userId, ...args }: import("../../common/types/requestParams.js").GetUserOwnedListsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").List>>;
@@ -198,69 +137,6 @@ declare const _default: import("@pipedream/types").Source<{
198
137
  label: string;
199
138
  description: string;
200
139
  };
201
- listExpansions: {
202
- type: string;
203
- label: string;
204
- optional: boolean;
205
- description: string;
206
- options: string[];
207
- };
208
- tweetExpansions: {
209
- type: string;
210
- label: string;
211
- optional: boolean;
212
- description: string;
213
- options: string[];
214
- };
215
- userExpansions: {
216
- type: string;
217
- label: string;
218
- optional: boolean;
219
- description: string;
220
- options: string[];
221
- };
222
- listFields: {
223
- type: string;
224
- label: string;
225
- description: string;
226
- optional: boolean;
227
- options: string[];
228
- };
229
- mediaFields: {
230
- type: string;
231
- label: string;
232
- description: string;
233
- optional: boolean;
234
- options: string[];
235
- };
236
- placeFields: {
237
- type: string;
238
- label: string;
239
- description: string;
240
- optional: boolean;
241
- options: string[];
242
- };
243
- pollFields: {
244
- type: string;
245
- label: string;
246
- description: string;
247
- optional: boolean;
248
- options: string[];
249
- };
250
- tweetFields: {
251
- type: string;
252
- label: string;
253
- description: string;
254
- optional: boolean;
255
- options: string[];
256
- };
257
- userFields: {
258
- type: string;
259
- label: string;
260
- description: string;
261
- optional: boolean;
262
- options: string[];
263
- };
264
140
  }>;
265
141
  db: string;
266
142
  timer: {
@@ -9,7 +9,7 @@ export default defineSource({
9
9
  key: "twitter-new-unfollower-of-user",
10
10
  name: "New Unfollower of User",
11
11
  description: `Emit new event when the specified User loses a Follower [See docs here](${DOCS_LINK})`,
12
- version: "1.0.0",
12
+ version: "1.0.2",
13
13
  type: "source",
14
14
  props: {
15
15
  ...common.props,