@pipedream/twitter 0.3.10 → 1.0.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 +20 -71
  2. package/dist/actions/add-user-to-list/add-user-to-list.d.ts +380 -0
  3. package/dist/actions/add-user-to-list/add-user-to-list.mjs +42 -0
  4. package/dist/actions/create-tweet/create-tweet.d.ts +163 -0
  5. package/dist/actions/create-tweet/create-tweet.mjs +78 -0
  6. package/dist/actions/delete-tweet/delete-tweet.d.ts +252 -0
  7. package/dist/actions/delete-tweet/delete-tweet.mjs +28 -0
  8. package/dist/actions/follow-user/follow-user.d.ts +255 -0
  9. package/dist/actions/follow-user/follow-user.mjs +37 -0
  10. package/dist/actions/get-tweet/get-tweet.d.ts +1006 -0
  11. package/dist/actions/get-tweet/get-tweet.mjs +35 -0
  12. package/dist/actions/get-user/get-user.d.ts +634 -0
  13. package/dist/actions/get-user/get-user.mjs +37 -0
  14. package/dist/actions/like-tweet/like-tweet.d.ts +252 -0
  15. package/dist/actions/like-tweet/like-tweet.mjs +30 -0
  16. package/dist/actions/list-favorites/list-favorites.d.ts +1138 -0
  17. package/dist/actions/list-favorites/list-favorites.mjs +52 -0
  18. package/dist/actions/list-followers/list-followers.d.ts +765 -0
  19. package/dist/actions/list-followers/list-followers.mjs +52 -0
  20. package/dist/actions/list-lists/list-lists.d.ts +762 -0
  21. package/dist/actions/list-lists/list-lists.mjs +52 -0
  22. package/dist/actions/list-mentions/list-mentions.d.ts +1136 -0
  23. package/dist/actions/list-mentions/list-mentions.mjs +52 -0
  24. package/dist/actions/list-user-tweets/list-user-tweets.d.ts +1138 -0
  25. package/dist/actions/list-user-tweets/list-user-tweets.mjs +52 -0
  26. package/dist/actions/retweet/retweet.d.ts +252 -0
  27. package/dist/actions/retweet/retweet.mjs +31 -0
  28. package/dist/actions/simple-search/simple-search.d.ts +1137 -0
  29. package/dist/actions/simple-search/simple-search.mjs +51 -0
  30. package/dist/actions/simple-search-in-list/simple-search-in-list.d.ts +1142 -0
  31. package/dist/actions/simple-search-in-list/simple-search-in-list.mjs +60 -0
  32. package/dist/actions/unfollow-user/unfollow-user.d.ts +255 -0
  33. package/dist/actions/unfollow-user/unfollow-user.mjs +33 -0
  34. package/dist/actions/unlike-tweet/unlike-tweet.d.ts +252 -0
  35. package/dist/actions/unlike-tweet/unlike-tweet.mjs +28 -0
  36. package/dist/app/twitter.app.d.ts +127 -0
  37. package/dist/app/twitter.app.mjs +341 -0
  38. package/dist/common/dataFields.d.ts +6 -0
  39. package/dist/common/dataFields.mjs +80 -0
  40. package/dist/common/expansions.d.ts +3 -0
  41. package/dist/common/expansions.mjs +17 -0
  42. package/dist/common/methods.d.ts +20 -0
  43. package/dist/common/methods.mjs +48 -0
  44. package/dist/common/propGroups.d.ts +1509 -0
  45. package/dist/common/propGroups.mjs +82 -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 +103 -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 +149 -0
  53. package/dist/sources/common/base.mjs +62 -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 +650 -0
  59. package/dist/sources/new-follower-of-user/new-follower-of-user.mjs +49 -0
  60. package/dist/sources/new-list-followed/new-list-followed.d.ts +649 -0
  61. package/dist/sources/new-list-followed/new-list-followed.mjs +50 -0
  62. package/dist/sources/new-tweet-in-list/new-tweet-in-list.d.ts +1021 -0
  63. package/dist/sources/new-tweet-in-list/new-tweet-in-list.mjs +46 -0
  64. package/dist/sources/new-tweet-liked-by-user/new-tweet-liked-by-user.d.ts +1023 -0
  65. package/dist/sources/new-tweet-liked-by-user/new-tweet-liked-by-user.mjs +49 -0
  66. package/dist/sources/new-tweet-posted-by-user/new-tweet-posted-by-user.d.ts +1023 -0
  67. package/dist/sources/new-tweet-posted-by-user/new-tweet-posted-by-user.mjs +49 -0
  68. package/dist/sources/new-tweet-posted-matching-query/new-tweet-posted-matching-query.d.ts +1021 -0
  69. package/dist/sources/new-tweet-posted-matching-query/new-tweet-posted-matching-query.mjs +51 -0
  70. package/dist/sources/new-unfollower-of-user/new-unfollower-of-user.d.ts +273 -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 +649 -0
  73. package/dist/sources/new-user-followed/new-user-followed.mjs +50 -0
  74. package/dist/tsconfig.tsbuildinfo +1 -0
  75. package/package.json +10 -13
  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 -114
  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
package/README.md CHANGED
@@ -1,71 +1,20 @@
1
- # Twitter API Integration Platform
2
-
3
- ### Pipedream is a low code, integration platform built for Node.js developers
4
-
5
- ---
6
-
7
- Integrate Twitter + 1000s of apps, remarkably fast. Connect apps and develop, execute and maintain event-driven workflows.
8
-
9
- **Key Features**:
10
-
11
- - [Workflows](#workflows) - A sequence of linear steps - just Node.js code - triggered by a Twitter event
12
- - [Twitter API Event Sources](#twitter-api-event-sources) - Open source [components](https://github.com/PipedreamHQ/pipedream/tree/master/components) that emit events from Twitter
13
- - Serverless - No server or cloud resources to manage
14
- - [Free](#pricing) - No fees for individual developers (see [limits](https://docs.pipedream.com/limits/))
15
-
16
- <a href="https://pipedream.com/new"><img src="https://i.ibb.co/n38r3KV/github.png" alt="github" border="0" height="50" /></a>
17
-
18
- ## Twitter API Event Sources
19
-
20
- - [Search Twitter](https://pipedream.com/sources/new?app=twitter) - Triggers when a new tweet matches your search ([code](https://github.com/PipedreamHQ/pipedream/blob/master/components/twitter/search-twitter.js))
21
- - [My Tweets](https://pipedream.com/sources/new?app=twitter) - Triggered when a you tweet a new tweet ([code](https://github.com/PipedreamHQ/pipedream/blob/master/components/twitter/my-tweets.js))
22
- - [My Likes](https://pipedream.com/sources/new?app=twitter) - Triggered when like a tweet ([code](https://github.com/PipedreamHQ/pipedream/blob/master/components/twitter/my-liked-tweets.js))
23
- - [New Followers](https://pipedream.com/sources/new?app=twitter) - Triggered when you get a new follower ([code](https://github.com/PipedreamHQ/pipedream/blob/master/components/twitter/new-follower-of-me.js))
24
- - [New Followers of User](https://pipedream.com/sources/new?app=twitter) - Triggered when a specific user gets a new follower ([code](https://github.com/PipedreamHQ/pipedream/blob/master/components/twitter/new-follower-of-user.js))
25
- - [New Trends by Geo](https://pipedream.com/sources/new?app=twitter) - Triggered when there is a new trend in a specific geo ([code](https://github.com/PipedreamHQ/pipedream/blob/master/components/twitter/new-trends-by-geo.js))
26
- - [New Likes by User](https://pipedream.com/sources/new?app=twitter) - Triggered when there is a new like from a specific user ([code](https://github.com/PipedreamHQ/pipedream/blob/master/components/twitter/tweets-liked-by-user.js))
27
- - [New Tweets by User](https://pipedream.com/sources/new?app=twitter) - Triggered when there is a new tweet from a specific user ([code](https://github.com/PipedreamHQ/pipedream/blob/master/components/twitter/user-tweets.js))
28
-
29
- Event sources can also be deployed via the [Pipedream CLI](https://docs.pipedream.com/cli/reference/). Once installed, you can deploy an event source by running:
30
-
31
- ```bash
32
- pd deploy # prompts you to select a component and pass required options
33
- ```
34
-
35
- ## Workflows
36
-
37
- Workflows are a sequence of linear [steps](https://docs.pipedream.com/workflows/steps) - just Node.js code - triggered by an event (via event source, HTTP endpoint, or timer). Workflows make it easy to transform data and integrate with 300+ APIs from various apps and services.
38
-
39
- - Trigger your workflow on any [
40
-
41
- event](https://pipedream.com/sources/new?app=twitter), a different event (e.g. [HTTP requests](https://docs.pipedream.com/workflows/steps/triggers/#http) or a [schedule](https://docs.pipedream.com/workflows/steps/triggers/#cron-scheduler)).
42
-
43
- - Add steps to run [Node.js code](https://docs.pipedream.com/workflows/steps/code/) (using virtually any npm package) and [pre-built actions](https://docs.pipedream.com/workflows/steps/actions/).
44
- - Steps are executed in the order they appear in your workflow.
45
- - Data is shared between steps via [step exports](https://docs.pipedream.com/workflows/steps/#step-exports).
46
-
47
- Workflow code is [public by default](https://docs.pipedream.com/public-workflows/) so the community can discover and [copy them](https://docs.pipedream.com/workflows/copy/). Your workflow execution and event data is private.
48
-
49
- You can copy [this example workflow](https://pipedream.com/@tod/use-http-requests-to-trigger-a-workflow-p_6lCy5y/readme) to get started, or review some [community-developed workflows](https://pipedream.com/explore) to see what others are building.
50
-
51
- ## Other Popular API Integrations
52
-
53
- - [Airtable](https://github.com/PipedreamHQ/pipedream/tree/master/components/airtable) ([deploy](https://pipedream.com/sources/new?app=airtable))
54
- - [AWS](https://github.com/PipedreamHQ/pipedream/tree/master/components/aws) ([deploy](https://pipedream.com/sources/new?app=aws))
55
- - [Dropbox](https://github.com/PipedreamHQ/pipedream/tree/master/components/dropbox) ([deploy](https://pipedream.com/sources/new?app=dropbox))
56
- - [Github](https://github.com/PipedreamHQ/pipedream/tree/master/components/github) ([deploy](https://pipedream.com/sources/new?app=github))
57
- - [Google Calendar](https://github.com/PipedreamHQ/pipedream/tree/master/components/google-calendar) ([deploy](https://pipedream.com/sources/new?app=google-calendar))
58
- - [Google Drive](https://github.com/PipedreamHQ/pipedream/tree/master/components/google-drive) ([deploy](https://pipedream.com/sources/new?app=google-drive))
59
- - [RSS](https://github.com/PipedreamHQ/pipedream/tree/master/components/rss) ([deploy](https://pipedream.com/sources/new?app=rss))
60
-
61
- ## Pricing
62
-
63
- Pipedream is currently free, subject to the [limits noted below](https://docs.pipedream.com/limits/). Paid tiers for higher volumes are coming soon.
64
-
65
- If you exceed any of these limits, please [reach out](https://docs.pipedream.com/support/).
66
-
67
- ## Found a Bug? Have a Feature to suggest?
68
-
69
- Before adding an issue, please search the [existing issues](https://github.com/PipedreamHQ/pipedream/issues) or [reach out to our team](https://docs.pipedream.com/support/) to see if a similar request already exists.
70
-
71
- If an issue exists, please [add a reaction](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/about-conversations-on-github) or comment on your specific use case.
1
+ # Overview
2
+ In order to connect your Twitter account to Pipedream, you'll need to create a developer project and app.
3
+
4
+ # Getting Started
5
+ 1. First, visit Twitter's [developer dashboard](https://developer.twitter.com/en/portal/dashboard) and sign in
6
+ 2. Next, [create a new project](https://developer.twitter.com/en/portal/projects/new) and give it a name, select a use case, and provide a description
7
+
8
+ ## Creating a Project and App
9
+ 1. Provide a name for your app
10
+ 2. Note the API Key and API Key Secret that are displayed (the setup isn't done yet, but note these down)
11
+ 3. Click "App settings" at the bottom right of the screen
12
+
13
+ ## Configuring Authentication Settings
14
+ 1. In the bottom of your app's settings, in the "User Authentication Settings", choose "Set Up"
15
+ 2. Select the appropriate app permissions based on your use case
16
+ 3. Select "**Web App, Automated App or Bot** (Confidential client)" in the "Type of App" section
17
+ 4. Enter this URI in the "Callback URI / Redirect URI": `https://api.pipedream.com/connect/oauth/oa_gk6iBa/callback`
18
+ 5. Enter a website URL
19
+ 6. Click "Done" (the Client ID and Client Secret that are shown on the next page are not required for this setup)
20
+ 7. Enter the API Key and API Key Secret when prompted in Pipedream (if you lose them and need to regenerate new keys, you can do so from the "Keys and tokens" tab in your app's settings in Twitter's developer dashboard, in the "Consume Keys" section)
@@ -0,0 +1,380 @@
1
+ import { getUserId } from "../../common/methods.js";
2
+ import { AddUserToListParams } 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 }: 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
+ getAuthenticatedUserId(): Promise<string>;
18
+ getUserLikedTweets({ userId, ...args }: import("../../common/types/requestParams.js").GetUserLikedTweetParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
19
+ getUserOwnedLists({ userId, ...args }: import("../../common/types/requestParams.js").GetUserOwnedListsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").List>>;
20
+ getUserFollowedLists({ userId, ...args }: import("../../common/types/requestParams.js").GetUserFollowedListsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").List>>;
21
+ getUserMentions({ userId, ...args }: import("../../common/types/requestParams.js").GetUserMentionsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
22
+ getUserTweets({ userId, ...args }: import("../../common/types/requestParams.js").GetUserTweetsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
23
+ getUserByUsername(username: string): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").User>>;
24
+ getUser({ userId, ...args }: import("../../common/types/requestParams.js").GetUserParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").User>>;
25
+ likeTweet(args: import("../../common/types/requestParams.js").LikeTweetParams): Promise<object>;
26
+ getUserFollowers({ userId, ...args }: import("../../common/types/requestParams.js").GetUserFollowersParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").User>>;
27
+ getUserFollowing({ userId, ...args }: import("../../common/types/requestParams.js").GetUserFollowersParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").User>>;
28
+ retweet(args: import("../../common/types/requestParams.js").LikeTweetParams): Promise<object>;
29
+ searchTweets(args: import("../../common/types/requestParams.js").SearchTweetsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
30
+ unfollowUser({ userId, ...args }: import("../../common/types/requestParams.js").UnfollowUserParams): Promise<object>;
31
+ unlikeTweet({ tweetId, ...args }: import("../../common/types/requestParams.js").UnlikeTweetParams): Promise<object>;
32
+ }, {
33
+ maxResults: {
34
+ type: string;
35
+ label: string;
36
+ description: string;
37
+ optional: boolean;
38
+ };
39
+ listId: {
40
+ type: string;
41
+ label: string;
42
+ description: string;
43
+ options(): Promise<{
44
+ label: string;
45
+ value: string;
46
+ }[]>;
47
+ };
48
+ userNameOrId: {
49
+ type: string;
50
+ label: string;
51
+ description: string;
52
+ optional: boolean;
53
+ default: string;
54
+ };
55
+ tweetId: {
56
+ type: string;
57
+ label: string;
58
+ description: string;
59
+ };
60
+ query: {
61
+ type: string;
62
+ label: string;
63
+ description: string;
64
+ };
65
+ listExpansions: {
66
+ type: string;
67
+ label: string;
68
+ optional: boolean;
69
+ description: string;
70
+ options: string[];
71
+ };
72
+ tweetExpansions: {
73
+ type: string;
74
+ label: string;
75
+ optional: boolean;
76
+ description: string;
77
+ options: string[];
78
+ };
79
+ userExpansions: {
80
+ type: string;
81
+ label: string;
82
+ optional: boolean;
83
+ description: string;
84
+ options: string[];
85
+ };
86
+ listFields: {
87
+ type: string;
88
+ label: string;
89
+ description: string;
90
+ optional: boolean;
91
+ options: string[];
92
+ };
93
+ mediaFields: {
94
+ type: string;
95
+ label: string;
96
+ description: string;
97
+ optional: boolean;
98
+ options: string[];
99
+ };
100
+ placeFields: {
101
+ type: string;
102
+ label: string;
103
+ description: string;
104
+ optional: boolean;
105
+ options: string[];
106
+ };
107
+ pollFields: {
108
+ type: string;
109
+ label: string;
110
+ description: string;
111
+ optional: boolean;
112
+ options: string[];
113
+ };
114
+ tweetFields: {
115
+ type: string;
116
+ label: string;
117
+ description: string;
118
+ optional: boolean;
119
+ options: string[];
120
+ };
121
+ userFields: {
122
+ type: string;
123
+ label: string;
124
+ description: string;
125
+ optional: boolean;
126
+ options: string[];
127
+ };
128
+ }>;
129
+ listId: {
130
+ propDefinition: (string | import("@pipedream/types").App<{
131
+ _getAuthHeader(config: import("../../common/types/requestParams.js").HttpRequestParams): Promise<import("oauth-1.0a").Header>;
132
+ _getBaseUrl(): "https://api.twitter.com/2";
133
+ _httpRequest({ $, ...args }: import("../../common/types/requestParams.js").HttpRequestParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").TwitterEntity>>;
134
+ _paginatedRequest({ maxResults, maxPerPage, params, ...args }: import("../../common/types/requestParams.js").PaginatedRequestParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").TwitterEntity>>;
135
+ addUserToList({ listId, ...args }: AddUserToListParams): Promise<object>;
136
+ createTweet(args: import("../../common/types/requestParams.js").CreateTweetParams): Promise<object>;
137
+ deleteTweet({ tweetId, ...args }: import("../../common/types/requestParams.js").DeleteTweetParams): Promise<object>;
138
+ followUser(args: import("../../common/types/requestParams.js").FollowUserParams): Promise<object>;
139
+ getListTweets({ listId, ...args }: import("../../common/types/requestParams.js").GetListTweetsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
140
+ getTweet({ tweetId, ...args }: import("../../common/types/requestParams.js").GetTweetParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").Tweet>>;
141
+ getAuthenticatedUserId(): Promise<string>;
142
+ getUserLikedTweets({ userId, ...args }: import("../../common/types/requestParams.js").GetUserLikedTweetParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
143
+ getUserOwnedLists({ userId, ...args }: import("../../common/types/requestParams.js").GetUserOwnedListsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").List>>;
144
+ getUserFollowedLists({ userId, ...args }: import("../../common/types/requestParams.js").GetUserFollowedListsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").List>>;
145
+ getUserMentions({ userId, ...args }: import("../../common/types/requestParams.js").GetUserMentionsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
146
+ getUserTweets({ userId, ...args }: import("../../common/types/requestParams.js").GetUserTweetsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
147
+ getUserByUsername(username: string): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").User>>;
148
+ getUser({ userId, ...args }: import("../../common/types/requestParams.js").GetUserParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").User>>;
149
+ likeTweet(args: import("../../common/types/requestParams.js").LikeTweetParams): Promise<object>;
150
+ getUserFollowers({ userId, ...args }: import("../../common/types/requestParams.js").GetUserFollowersParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").User>>;
151
+ getUserFollowing({ userId, ...args }: import("../../common/types/requestParams.js").GetUserFollowersParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").User>>;
152
+ retweet(args: import("../../common/types/requestParams.js").LikeTweetParams): Promise<object>;
153
+ searchTweets(args: import("../../common/types/requestParams.js").SearchTweetsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
154
+ unfollowUser({ userId, ...args }: import("../../common/types/requestParams.js").UnfollowUserParams): Promise<object>;
155
+ unlikeTweet({ tweetId, ...args }: import("../../common/types/requestParams.js").UnlikeTweetParams): Promise<object>;
156
+ }, {
157
+ maxResults: {
158
+ type: string;
159
+ label: string;
160
+ description: string;
161
+ optional: boolean;
162
+ };
163
+ listId: {
164
+ type: string;
165
+ label: string;
166
+ description: string;
167
+ options(): Promise<{
168
+ label: string;
169
+ value: string;
170
+ }[]>;
171
+ };
172
+ userNameOrId: {
173
+ type: string;
174
+ label: string;
175
+ description: string;
176
+ optional: boolean;
177
+ default: string;
178
+ };
179
+ tweetId: {
180
+ type: string;
181
+ label: string;
182
+ description: string;
183
+ };
184
+ query: {
185
+ type: string;
186
+ label: string;
187
+ description: string;
188
+ };
189
+ listExpansions: {
190
+ type: string;
191
+ label: string;
192
+ optional: boolean;
193
+ description: string;
194
+ options: string[];
195
+ };
196
+ tweetExpansions: {
197
+ type: string;
198
+ label: string;
199
+ optional: boolean;
200
+ description: string;
201
+ options: string[];
202
+ };
203
+ userExpansions: {
204
+ type: string;
205
+ label: string;
206
+ optional: boolean;
207
+ description: string;
208
+ options: string[];
209
+ };
210
+ listFields: {
211
+ type: string;
212
+ label: string;
213
+ description: string;
214
+ optional: boolean;
215
+ options: string[];
216
+ };
217
+ mediaFields: {
218
+ type: string;
219
+ label: string;
220
+ description: string;
221
+ optional: boolean;
222
+ options: string[];
223
+ };
224
+ placeFields: {
225
+ type: string;
226
+ label: string;
227
+ description: string;
228
+ optional: boolean;
229
+ options: string[];
230
+ };
231
+ pollFields: {
232
+ type: string;
233
+ label: string;
234
+ description: string;
235
+ optional: boolean;
236
+ options: string[];
237
+ };
238
+ tweetFields: {
239
+ type: string;
240
+ label: string;
241
+ description: string;
242
+ optional: boolean;
243
+ options: string[];
244
+ };
245
+ userFields: {
246
+ type: string;
247
+ label: string;
248
+ description: string;
249
+ optional: boolean;
250
+ options: string[];
251
+ };
252
+ }>)[];
253
+ };
254
+ userNameOrId: {
255
+ propDefinition: (string | import("@pipedream/types").App<{
256
+ _getAuthHeader(config: import("../../common/types/requestParams.js").HttpRequestParams): Promise<import("oauth-1.0a").Header>;
257
+ _getBaseUrl(): "https://api.twitter.com/2";
258
+ _httpRequest({ $, ...args }: import("../../common/types/requestParams.js").HttpRequestParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").TwitterEntity>>;
259
+ _paginatedRequest({ maxResults, maxPerPage, params, ...args }: import("../../common/types/requestParams.js").PaginatedRequestParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").TwitterEntity>>;
260
+ addUserToList({ listId, ...args }: AddUserToListParams): Promise<object>;
261
+ createTweet(args: import("../../common/types/requestParams.js").CreateTweetParams): Promise<object>;
262
+ deleteTweet({ tweetId, ...args }: import("../../common/types/requestParams.js").DeleteTweetParams): Promise<object>;
263
+ followUser(args: import("../../common/types/requestParams.js").FollowUserParams): Promise<object>;
264
+ getListTweets({ listId, ...args }: import("../../common/types/requestParams.js").GetListTweetsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
265
+ getTweet({ tweetId, ...args }: import("../../common/types/requestParams.js").GetTweetParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").Tweet>>;
266
+ getAuthenticatedUserId(): Promise<string>;
267
+ getUserLikedTweets({ userId, ...args }: import("../../common/types/requestParams.js").GetUserLikedTweetParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
268
+ getUserOwnedLists({ userId, ...args }: import("../../common/types/requestParams.js").GetUserOwnedListsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").List>>;
269
+ getUserFollowedLists({ userId, ...args }: import("../../common/types/requestParams.js").GetUserFollowedListsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").List>>;
270
+ getUserMentions({ userId, ...args }: import("../../common/types/requestParams.js").GetUserMentionsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
271
+ getUserTweets({ userId, ...args }: import("../../common/types/requestParams.js").GetUserTweetsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
272
+ getUserByUsername(username: string): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").User>>;
273
+ getUser({ userId, ...args }: import("../../common/types/requestParams.js").GetUserParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").User>>;
274
+ likeTweet(args: import("../../common/types/requestParams.js").LikeTweetParams): Promise<object>;
275
+ getUserFollowers({ userId, ...args }: import("../../common/types/requestParams.js").GetUserFollowersParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").User>>;
276
+ getUserFollowing({ userId, ...args }: import("../../common/types/requestParams.js").GetUserFollowersParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").User>>;
277
+ retweet(args: import("../../common/types/requestParams.js").LikeTweetParams): Promise<object>;
278
+ searchTweets(args: import("../../common/types/requestParams.js").SearchTweetsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
279
+ unfollowUser({ userId, ...args }: import("../../common/types/requestParams.js").UnfollowUserParams): Promise<object>;
280
+ unlikeTweet({ tweetId, ...args }: import("../../common/types/requestParams.js").UnlikeTweetParams): Promise<object>;
281
+ }, {
282
+ maxResults: {
283
+ type: string;
284
+ label: string;
285
+ description: string;
286
+ optional: boolean;
287
+ };
288
+ listId: {
289
+ type: string;
290
+ label: string;
291
+ description: string;
292
+ options(): Promise<{
293
+ label: string;
294
+ value: string;
295
+ }[]>;
296
+ };
297
+ userNameOrId: {
298
+ type: string;
299
+ label: string;
300
+ description: string;
301
+ optional: boolean;
302
+ default: string;
303
+ };
304
+ tweetId: {
305
+ type: string;
306
+ label: string;
307
+ description: string;
308
+ };
309
+ query: {
310
+ type: string;
311
+ label: string;
312
+ description: string;
313
+ };
314
+ listExpansions: {
315
+ type: string;
316
+ label: string;
317
+ optional: boolean;
318
+ description: string;
319
+ options: string[];
320
+ };
321
+ tweetExpansions: {
322
+ type: string;
323
+ label: string;
324
+ optional: boolean;
325
+ description: string;
326
+ options: string[];
327
+ };
328
+ userExpansions: {
329
+ type: string;
330
+ label: string;
331
+ optional: boolean;
332
+ description: string;
333
+ options: string[];
334
+ };
335
+ listFields: {
336
+ type: string;
337
+ label: string;
338
+ description: string;
339
+ optional: boolean;
340
+ options: string[];
341
+ };
342
+ mediaFields: {
343
+ type: string;
344
+ label: string;
345
+ description: string;
346
+ optional: boolean;
347
+ options: string[];
348
+ };
349
+ placeFields: {
350
+ type: string;
351
+ label: string;
352
+ description: string;
353
+ optional: boolean;
354
+ options: string[];
355
+ };
356
+ pollFields: {
357
+ type: string;
358
+ label: string;
359
+ description: string;
360
+ optional: boolean;
361
+ options: string[];
362
+ };
363
+ tweetFields: {
364
+ type: string;
365
+ label: string;
366
+ description: string;
367
+ optional: boolean;
368
+ options: string[];
369
+ };
370
+ userFields: {
371
+ type: string;
372
+ label: string;
373
+ description: string;
374
+ optional: boolean;
375
+ options: string[];
376
+ };
377
+ }>)[];
378
+ };
379
+ }>;
380
+ export default _default;
@@ -0,0 +1,42 @@
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/lists/list-members/api-reference/post-lists-id-members";
5
+ export default defineAction({
6
+ key: "twitter-add-user-to-list",
7
+ name: "Add User To List",
8
+ description: `Add a member to a list owned by the user. [See docs here](${DOCS_LINK})`,
9
+ version: "1.0.0",
10
+ type: "action",
11
+ props: {
12
+ app,
13
+ listId: {
14
+ propDefinition: [
15
+ app,
16
+ "listId",
17
+ ],
18
+ },
19
+ userNameOrId: {
20
+ propDefinition: [
21
+ app,
22
+ "userNameOrId",
23
+ ],
24
+ },
25
+ },
26
+ methods: {
27
+ getUserId,
28
+ },
29
+ async run({ $ }) {
30
+ const userId = await this.getUserId();
31
+ const params = {
32
+ $,
33
+ data: {
34
+ user_id: userId,
35
+ },
36
+ listId: this.listId,
37
+ };
38
+ const response = await this.app.addUserToList(params);
39
+ $.export("$summary", "Successfully added user to list");
40
+ return response;
41
+ },
42
+ });