@pipedream/twitter 0.3.11 → 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.
- package/README.md +20 -71
- package/dist/actions/add-user-to-list/add-user-to-list.d.ts +380 -0
- package/dist/actions/add-user-to-list/add-user-to-list.mjs +42 -0
- package/dist/actions/create-tweet/create-tweet.d.ts +163 -0
- package/dist/actions/create-tweet/create-tweet.mjs +78 -0
- package/dist/actions/delete-tweet/delete-tweet.d.ts +252 -0
- package/dist/actions/delete-tweet/delete-tweet.mjs +28 -0
- package/dist/actions/follow-user/follow-user.d.ts +255 -0
- package/dist/actions/follow-user/follow-user.mjs +37 -0
- package/dist/actions/get-tweet/get-tweet.d.ts +1006 -0
- package/dist/actions/get-tweet/get-tweet.mjs +35 -0
- package/dist/actions/get-user/get-user.d.ts +634 -0
- package/dist/actions/get-user/get-user.mjs +37 -0
- package/dist/actions/like-tweet/like-tweet.d.ts +252 -0
- package/dist/actions/like-tweet/like-tweet.mjs +30 -0
- package/dist/actions/list-favorites/list-favorites.d.ts +1138 -0
- package/dist/actions/list-favorites/list-favorites.mjs +52 -0
- package/dist/actions/list-followers/list-followers.d.ts +765 -0
- package/dist/actions/list-followers/list-followers.mjs +52 -0
- package/dist/actions/list-lists/list-lists.d.ts +762 -0
- package/dist/actions/list-lists/list-lists.mjs +52 -0
- package/dist/actions/list-mentions/list-mentions.d.ts +1136 -0
- package/dist/actions/list-mentions/list-mentions.mjs +52 -0
- package/dist/actions/list-user-tweets/list-user-tweets.d.ts +1138 -0
- package/dist/actions/list-user-tweets/list-user-tweets.mjs +52 -0
- package/dist/actions/retweet/retweet.d.ts +252 -0
- package/dist/actions/retweet/retweet.mjs +31 -0
- package/dist/actions/simple-search/simple-search.d.ts +1137 -0
- package/dist/actions/simple-search/simple-search.mjs +51 -0
- package/dist/actions/simple-search-in-list/simple-search-in-list.d.ts +1142 -0
- package/dist/actions/simple-search-in-list/simple-search-in-list.mjs +60 -0
- package/dist/actions/unfollow-user/unfollow-user.d.ts +255 -0
- package/dist/actions/unfollow-user/unfollow-user.mjs +33 -0
- package/dist/actions/unlike-tweet/unlike-tweet.d.ts +252 -0
- package/dist/actions/unlike-tweet/unlike-tweet.mjs +28 -0
- package/dist/app/twitter.app.d.ts +127 -0
- package/dist/app/twitter.app.mjs +341 -0
- package/dist/common/dataFields.d.ts +6 -0
- package/dist/common/dataFields.mjs +80 -0
- package/dist/common/expansions.d.ts +3 -0
- package/dist/common/expansions.mjs +17 -0
- package/dist/common/methods.d.ts +20 -0
- package/dist/common/methods.mjs +48 -0
- package/dist/common/propGroups.d.ts +1509 -0
- package/dist/common/propGroups.mjs +82 -0
- package/dist/common/types/fields.d.ts +18 -0
- package/dist/common/types/fields.mjs +1 -0
- package/dist/common/types/requestParams.d.ts +103 -0
- package/dist/common/types/requestParams.mjs +1 -0
- package/dist/common/types/responseSchemas.d.ts +42 -0
- package/dist/common/types/responseSchemas.mjs +1 -0
- package/dist/sources/common/base.d.ts +149 -0
- package/dist/sources/common/base.mjs +62 -0
- package/dist/sources/common/cacheUserId.d.ts +7 -0
- package/dist/sources/common/cacheUserId.mjs +18 -0
- package/dist/sources/common/getItemSummary.d.ts +4 -0
- package/dist/sources/common/getItemSummary.mjs +12 -0
- package/dist/sources/new-follower-of-user/new-follower-of-user.d.ts +650 -0
- package/dist/sources/new-follower-of-user/new-follower-of-user.mjs +49 -0
- package/dist/sources/new-list-followed/new-list-followed.d.ts +649 -0
- package/dist/sources/new-list-followed/new-list-followed.mjs +50 -0
- package/dist/sources/new-tweet-in-list/new-tweet-in-list.d.ts +1021 -0
- package/dist/sources/new-tweet-in-list/new-tweet-in-list.mjs +46 -0
- package/dist/sources/new-tweet-liked-by-user/new-tweet-liked-by-user.d.ts +1023 -0
- package/dist/sources/new-tweet-liked-by-user/new-tweet-liked-by-user.mjs +49 -0
- package/dist/sources/new-tweet-posted-by-user/new-tweet-posted-by-user.d.ts +1023 -0
- package/dist/sources/new-tweet-posted-by-user/new-tweet-posted-by-user.mjs +49 -0
- package/dist/sources/new-tweet-posted-matching-query/new-tweet-posted-matching-query.d.ts +1021 -0
- package/dist/sources/new-tweet-posted-matching-query/new-tweet-posted-matching-query.mjs +51 -0
- package/dist/sources/new-unfollower-of-user/new-unfollower-of-user.d.ts +273 -0
- package/dist/sources/new-unfollower-of-user/new-unfollower-of-user.mjs +75 -0
- package/dist/sources/new-user-followed/new-user-followed.d.ts +649 -0
- package/dist/sources/new-user-followed/new-user-followed.mjs +50 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +10 -14
- package/actions/add-user-to-list/add-user-to-list.mjs +0 -62
- package/actions/advanced-search/advanced-search.mjs +0 -113
- package/actions/common.mjs +0 -29
- package/actions/create-tweet/create-tweet.mjs +0 -146
- package/actions/delete-tweet/delete-tweet.mjs +0 -42
- package/actions/follow-user/follow-user.mjs +0 -48
- package/actions/get-tweet/get-tweet.mjs +0 -42
- package/actions/get-user/get-user.mjs +0 -50
- package/actions/like-tweet/like-tweet.mjs +0 -42
- package/actions/list-favorites/list-favorites.mjs +0 -63
- package/actions/list-followers/list-followers.mjs +0 -67
- package/actions/list-lists/list-lists.mjs +0 -69
- package/actions/list-mentions/list-mentions.mjs +0 -55
- package/actions/list-pending-followers/list-pending-followers.mjs +0 -32
- package/actions/list-retweets/list-retweets.mjs +0 -54
- package/actions/list-user-tweets/list-user-tweets.mjs +0 -80
- package/actions/retweet/retweet.mjs +0 -27
- package/actions/simple-search/simple-search.mjs +0 -62
- package/actions/simple-search-in-list/simple-search-in-list.mjs +0 -48
- package/actions/unfollow-user/unfollow-user.mjs +0 -48
- package/actions/unlike-tweet/unlike-tweet.mjs +0 -40
- package/actions/upload-media/upload-media.mjs +0 -122
- package/old.md +0 -169
- package/sources/common/followed.mjs +0 -38
- package/sources/common/followers.mjs +0 -159
- package/sources/common/tweets.mjs +0 -155
- package/sources/language-codes.mjs +0 -742
- package/sources/my-liked-tweets/my-liked-tweets.mjs +0 -30
- package/sources/my-tweets/my-tweets.mjs +0 -48
- package/sources/new-follower-of-me/new-follower-of-me.mjs +0 -69
- package/sources/new-follower-of-user/new-follower-of-user.mjs +0 -25
- package/sources/new-list-followed/new-list-followed.mjs +0 -24
- package/sources/new-trends-by-geo/new-trends-by-geo.mjs +0 -40
- package/sources/new-tweet-in-list/new-tweet-in-list.mjs +0 -49
- package/sources/new-unfollower-of-me/new-unfollower-of-me.mjs +0 -16
- package/sources/new-unfollower-of-user/new-unfollower-of-user.mjs +0 -25
- package/sources/new-user-followed/new-user-followed.mjs +0 -25
- package/sources/search-mentions/search-mentions.mjs +0 -144
- package/sources/tweets-liked-by-user/tweets-liked-by-user.mjs +0 -38
- package/sources/user-tweets/user-tweets.mjs +0 -49
- package/sources/watch-retweets-of-me/watch-retweets-of-me.mjs +0 -36
- package/sources/watch-retweets-of-my-tweet/watch-retweets-of-my-tweet.mjs +0 -44
- package/sources/watch-retweets-of-user-tweet/watch-retweets-of-user-tweet.mjs +0 -34
- package/twitter.app.mjs +0 -1161
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
import { CreateTweetParams } from "../../common/types/requestParams.js";
|
|
2
|
+
declare const _default: import("@pipedream/types").Action<unknown, {
|
|
3
|
+
app: import("@pipedream/types").App<{
|
|
4
|
+
_getAuthHeader(config: import("../../common/types/requestParams.js").HttpRequestParams): Promise<import("oauth-1.0a").Header>;
|
|
5
|
+
_getBaseUrl(): "https://api.twitter.com/2";
|
|
6
|
+
_httpRequest({ $, ...args }: import("../../common/types/requestParams.js").HttpRequestParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").TwitterEntity>>;
|
|
7
|
+
_paginatedRequest({ maxResults, maxPerPage, params, ...args }: import("../../common/types/requestParams.js").PaginatedRequestParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").TwitterEntity>>;
|
|
8
|
+
addUserToList({ listId, ...args }: import("../../common/types/requestParams.js").AddUserToListParams): Promise<object>;
|
|
9
|
+
createTweet(args: CreateTweetParams): Promise<object>;
|
|
10
|
+
deleteTweet({ tweetId, ...args }: import("../../common/types/requestParams.js").DeleteTweetParams): Promise<object>;
|
|
11
|
+
followUser(args: import("../../common/types/requestParams.js").FollowUserParams): Promise<object>;
|
|
12
|
+
getListTweets({ listId, ...args }: import("../../common/types/requestParams.js").GetListTweetsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
|
|
13
|
+
getTweet({ tweetId, ...args }: import("../../common/types/requestParams.js").GetTweetParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").Tweet>>;
|
|
14
|
+
getAuthenticatedUserId(): Promise<string>;
|
|
15
|
+
getUserLikedTweets({ userId, ...args }: import("../../common/types/requestParams.js").GetUserLikedTweetParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
|
|
16
|
+
getUserOwnedLists({ userId, ...args }: import("../../common/types/requestParams.js").GetUserOwnedListsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").List>>;
|
|
17
|
+
getUserFollowedLists({ userId, ...args }: import("../../common/types/requestParams.js").GetUserFollowedListsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").List>>;
|
|
18
|
+
getUserMentions({ userId, ...args }: import("../../common/types/requestParams.js").GetUserMentionsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
|
|
19
|
+
getUserTweets({ userId, ...args }: import("../../common/types/requestParams.js").GetUserTweetsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
|
|
20
|
+
getUserByUsername(username: string): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").User>>;
|
|
21
|
+
getUser({ userId, ...args }: import("../../common/types/requestParams.js").GetUserParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").User>>;
|
|
22
|
+
likeTweet(args: import("../../common/types/requestParams.js").LikeTweetParams): Promise<object>;
|
|
23
|
+
getUserFollowers({ userId, ...args }: import("../../common/types/requestParams.js").GetUserFollowersParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").User>>;
|
|
24
|
+
getUserFollowing({ userId, ...args }: import("../../common/types/requestParams.js").GetUserFollowersParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").User>>;
|
|
25
|
+
retweet(args: import("../../common/types/requestParams.js").LikeTweetParams): Promise<object>;
|
|
26
|
+
searchTweets(args: import("../../common/types/requestParams.js").SearchTweetsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
|
|
27
|
+
unfollowUser({ userId, ...args }: import("../../common/types/requestParams.js").UnfollowUserParams): Promise<object>;
|
|
28
|
+
unlikeTweet({ tweetId, ...args }: import("../../common/types/requestParams.js").UnlikeTweetParams): Promise<object>;
|
|
29
|
+
}, {
|
|
30
|
+
maxResults: {
|
|
31
|
+
type: string;
|
|
32
|
+
label: string;
|
|
33
|
+
description: string;
|
|
34
|
+
optional: boolean;
|
|
35
|
+
};
|
|
36
|
+
listId: {
|
|
37
|
+
type: string;
|
|
38
|
+
label: string;
|
|
39
|
+
description: string;
|
|
40
|
+
options(): Promise<{
|
|
41
|
+
label: string;
|
|
42
|
+
value: string;
|
|
43
|
+
}[]>;
|
|
44
|
+
};
|
|
45
|
+
userNameOrId: {
|
|
46
|
+
type: string;
|
|
47
|
+
label: string;
|
|
48
|
+
description: string;
|
|
49
|
+
optional: boolean;
|
|
50
|
+
default: string;
|
|
51
|
+
};
|
|
52
|
+
tweetId: {
|
|
53
|
+
type: string;
|
|
54
|
+
label: string;
|
|
55
|
+
description: string;
|
|
56
|
+
};
|
|
57
|
+
query: {
|
|
58
|
+
type: string;
|
|
59
|
+
label: string;
|
|
60
|
+
description: string;
|
|
61
|
+
};
|
|
62
|
+
listExpansions: {
|
|
63
|
+
type: string;
|
|
64
|
+
label: string;
|
|
65
|
+
optional: boolean;
|
|
66
|
+
description: string;
|
|
67
|
+
options: string[];
|
|
68
|
+
};
|
|
69
|
+
tweetExpansions: {
|
|
70
|
+
type: string;
|
|
71
|
+
label: string;
|
|
72
|
+
optional: boolean;
|
|
73
|
+
description: string;
|
|
74
|
+
options: string[];
|
|
75
|
+
};
|
|
76
|
+
userExpansions: {
|
|
77
|
+
type: string;
|
|
78
|
+
label: string;
|
|
79
|
+
optional: boolean;
|
|
80
|
+
description: string;
|
|
81
|
+
options: string[];
|
|
82
|
+
};
|
|
83
|
+
listFields: {
|
|
84
|
+
type: string;
|
|
85
|
+
label: string;
|
|
86
|
+
description: string;
|
|
87
|
+
optional: boolean;
|
|
88
|
+
options: string[];
|
|
89
|
+
};
|
|
90
|
+
mediaFields: {
|
|
91
|
+
type: string;
|
|
92
|
+
label: string;
|
|
93
|
+
description: string;
|
|
94
|
+
optional: boolean;
|
|
95
|
+
options: string[];
|
|
96
|
+
};
|
|
97
|
+
placeFields: {
|
|
98
|
+
type: string;
|
|
99
|
+
label: string;
|
|
100
|
+
description: string;
|
|
101
|
+
optional: boolean;
|
|
102
|
+
options: string[];
|
|
103
|
+
};
|
|
104
|
+
pollFields: {
|
|
105
|
+
type: string;
|
|
106
|
+
label: string;
|
|
107
|
+
description: string;
|
|
108
|
+
optional: boolean;
|
|
109
|
+
options: string[];
|
|
110
|
+
};
|
|
111
|
+
tweetFields: {
|
|
112
|
+
type: string;
|
|
113
|
+
label: string;
|
|
114
|
+
description: string;
|
|
115
|
+
optional: boolean;
|
|
116
|
+
options: string[];
|
|
117
|
+
};
|
|
118
|
+
userFields: {
|
|
119
|
+
type: string;
|
|
120
|
+
label: string;
|
|
121
|
+
description: string;
|
|
122
|
+
optional: boolean;
|
|
123
|
+
options: string[];
|
|
124
|
+
};
|
|
125
|
+
}>;
|
|
126
|
+
text: {
|
|
127
|
+
type: string;
|
|
128
|
+
label: string;
|
|
129
|
+
description: string;
|
|
130
|
+
optional: boolean;
|
|
131
|
+
};
|
|
132
|
+
inReplyToTweetId: {
|
|
133
|
+
type: string;
|
|
134
|
+
label: string;
|
|
135
|
+
description: string;
|
|
136
|
+
optional: boolean;
|
|
137
|
+
};
|
|
138
|
+
excludeReplyUserIds: {
|
|
139
|
+
type: string;
|
|
140
|
+
label: string;
|
|
141
|
+
description: string;
|
|
142
|
+
optional: boolean;
|
|
143
|
+
};
|
|
144
|
+
mediaIds: {
|
|
145
|
+
type: string;
|
|
146
|
+
label: string;
|
|
147
|
+
description: string;
|
|
148
|
+
optional: boolean;
|
|
149
|
+
};
|
|
150
|
+
taggedUserIds: {
|
|
151
|
+
type: string;
|
|
152
|
+
label: string;
|
|
153
|
+
description: string;
|
|
154
|
+
optional: boolean;
|
|
155
|
+
};
|
|
156
|
+
placeId: {
|
|
157
|
+
type: string;
|
|
158
|
+
label: string;
|
|
159
|
+
description: string;
|
|
160
|
+
optional: boolean;
|
|
161
|
+
};
|
|
162
|
+
}>;
|
|
163
|
+
export default _default;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import app from "../../app/twitter.app.mjs";
|
|
2
|
+
import { defineAction } from "@pipedream/types";
|
|
3
|
+
const DOCS_LINK = "https://developer.twitter.com/en/docs/twitter-api/tweets/manage-tweets/api-reference/post-tweets";
|
|
4
|
+
export default defineAction({
|
|
5
|
+
key: "twitter-create-tweet",
|
|
6
|
+
name: "Create Tweet",
|
|
7
|
+
description: `Create a new tweet. [See docs here](${DOCS_LINK})`,
|
|
8
|
+
version: "1.0.0",
|
|
9
|
+
type: "action",
|
|
10
|
+
props: {
|
|
11
|
+
app,
|
|
12
|
+
text: {
|
|
13
|
+
type: "string",
|
|
14
|
+
label: "Text",
|
|
15
|
+
description: "Text of the Tweet being created. Required if `Media IDs` is not set.",
|
|
16
|
+
optional: true,
|
|
17
|
+
},
|
|
18
|
+
inReplyToTweetId: {
|
|
19
|
+
type: "string",
|
|
20
|
+
label: "In Reply To Tweet (ID)",
|
|
21
|
+
description: "Tweet ID of the Tweet being replied to. Please note that this prop needs to be set if `Exclude Reply User IDs` is also set.",
|
|
22
|
+
optional: true,
|
|
23
|
+
},
|
|
24
|
+
excludeReplyUserIds: {
|
|
25
|
+
type: "string[]",
|
|
26
|
+
label: "Exclude Reply User IDs",
|
|
27
|
+
description: "A list of User IDs to be excluded from the reply Tweet thus removing a user from a thread.",
|
|
28
|
+
optional: true,
|
|
29
|
+
},
|
|
30
|
+
mediaIds: {
|
|
31
|
+
type: "string[]",
|
|
32
|
+
label: "Media IDs",
|
|
33
|
+
description: "A list of Media IDs being attached to the Tweet. This is only required if `Tagged User IDs` is set.",
|
|
34
|
+
optional: true,
|
|
35
|
+
},
|
|
36
|
+
taggedUserIds: {
|
|
37
|
+
type: "string[]",
|
|
38
|
+
label: "Tagged User IDs",
|
|
39
|
+
description: "A list of User IDs being tagged in the Tweet with Media. If the user you're tagging doesn't have photo-tagging enabled, their names won't show up in the list of tagged users even though the Tweet is successfully created.",
|
|
40
|
+
optional: true,
|
|
41
|
+
},
|
|
42
|
+
placeId: {
|
|
43
|
+
type: "string",
|
|
44
|
+
label: "Place ID",
|
|
45
|
+
description: "Place ID being attached to the Tweet for geo location.",
|
|
46
|
+
optional: true,
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
async run({ $ }) {
|
|
50
|
+
const { text, inReplyToTweetId, excludeReplyUserIds, mediaIds, placeId, taggedUserIds, } = this;
|
|
51
|
+
const params = {
|
|
52
|
+
$,
|
|
53
|
+
data: {
|
|
54
|
+
text,
|
|
55
|
+
...((inReplyToTweetId || excludeReplyUserIds) && {
|
|
56
|
+
reply: {
|
|
57
|
+
exclude_reply_user_ids: excludeReplyUserIds,
|
|
58
|
+
in_reply_to_tweet_id: inReplyToTweetId,
|
|
59
|
+
},
|
|
60
|
+
}),
|
|
61
|
+
...((mediaIds || taggedUserIds) && {
|
|
62
|
+
media: {
|
|
63
|
+
media_ids: mediaIds,
|
|
64
|
+
tagged_user_ids: taggedUserIds,
|
|
65
|
+
},
|
|
66
|
+
}),
|
|
67
|
+
...(placeId && {
|
|
68
|
+
geo: {
|
|
69
|
+
place_id: placeId,
|
|
70
|
+
},
|
|
71
|
+
}),
|
|
72
|
+
},
|
|
73
|
+
};
|
|
74
|
+
const response = await this.app.createTweet(params);
|
|
75
|
+
$.export("$summary", "Successfully posted tweet");
|
|
76
|
+
return response;
|
|
77
|
+
},
|
|
78
|
+
});
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
import { DeleteTweetParams } from "../../common/types/requestParams.js";
|
|
2
|
+
declare const _default: import("@pipedream/types").Action<unknown, {
|
|
3
|
+
app: import("@pipedream/types").App<{
|
|
4
|
+
_getAuthHeader(config: import("../../common/types/requestParams.js").HttpRequestParams): Promise<import("oauth-1.0a").Header>;
|
|
5
|
+
_getBaseUrl(): "https://api.twitter.com/2";
|
|
6
|
+
_httpRequest({ $, ...args }: import("../../common/types/requestParams.js").HttpRequestParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").TwitterEntity>>;
|
|
7
|
+
_paginatedRequest({ maxResults, maxPerPage, params, ...args }: import("../../common/types/requestParams.js").PaginatedRequestParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").TwitterEntity>>;
|
|
8
|
+
addUserToList({ listId, ...args }: import("../../common/types/requestParams.js").AddUserToListParams): Promise<object>;
|
|
9
|
+
createTweet(args: import("../../common/types/requestParams.js").CreateTweetParams): Promise<object>;
|
|
10
|
+
deleteTweet({ tweetId, ...args }: DeleteTweetParams): Promise<object>;
|
|
11
|
+
followUser(args: import("../../common/types/requestParams.js").FollowUserParams): Promise<object>;
|
|
12
|
+
getListTweets({ listId, ...args }: import("../../common/types/requestParams.js").GetListTweetsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
|
|
13
|
+
getTweet({ tweetId, ...args }: import("../../common/types/requestParams.js").GetTweetParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").Tweet>>;
|
|
14
|
+
getAuthenticatedUserId(): Promise<string>;
|
|
15
|
+
getUserLikedTweets({ userId, ...args }: import("../../common/types/requestParams.js").GetUserLikedTweetParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
|
|
16
|
+
getUserOwnedLists({ userId, ...args }: import("../../common/types/requestParams.js").GetUserOwnedListsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").List>>;
|
|
17
|
+
getUserFollowedLists({ userId, ...args }: import("../../common/types/requestParams.js").GetUserFollowedListsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").List>>;
|
|
18
|
+
getUserMentions({ userId, ...args }: import("../../common/types/requestParams.js").GetUserMentionsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
|
|
19
|
+
getUserTweets({ userId, ...args }: import("../../common/types/requestParams.js").GetUserTweetsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
|
|
20
|
+
getUserByUsername(username: string): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").User>>;
|
|
21
|
+
getUser({ userId, ...args }: import("../../common/types/requestParams.js").GetUserParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").User>>;
|
|
22
|
+
likeTweet(args: import("../../common/types/requestParams.js").LikeTweetParams): Promise<object>;
|
|
23
|
+
getUserFollowers({ userId, ...args }: import("../../common/types/requestParams.js").GetUserFollowersParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").User>>;
|
|
24
|
+
getUserFollowing({ userId, ...args }: import("../../common/types/requestParams.js").GetUserFollowersParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").User>>;
|
|
25
|
+
retweet(args: import("../../common/types/requestParams.js").LikeTweetParams): Promise<object>;
|
|
26
|
+
searchTweets(args: import("../../common/types/requestParams.js").SearchTweetsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
|
|
27
|
+
unfollowUser({ userId, ...args }: import("../../common/types/requestParams.js").UnfollowUserParams): Promise<object>;
|
|
28
|
+
unlikeTweet({ tweetId, ...args }: import("../../common/types/requestParams.js").UnlikeTweetParams): Promise<object>;
|
|
29
|
+
}, {
|
|
30
|
+
maxResults: {
|
|
31
|
+
type: string;
|
|
32
|
+
label: string;
|
|
33
|
+
description: string;
|
|
34
|
+
optional: boolean;
|
|
35
|
+
};
|
|
36
|
+
listId: {
|
|
37
|
+
type: string;
|
|
38
|
+
label: string;
|
|
39
|
+
description: string;
|
|
40
|
+
options(): Promise<{
|
|
41
|
+
label: string;
|
|
42
|
+
value: string;
|
|
43
|
+
}[]>;
|
|
44
|
+
};
|
|
45
|
+
userNameOrId: {
|
|
46
|
+
type: string;
|
|
47
|
+
label: string;
|
|
48
|
+
description: string;
|
|
49
|
+
optional: boolean;
|
|
50
|
+
default: string;
|
|
51
|
+
};
|
|
52
|
+
tweetId: {
|
|
53
|
+
type: string;
|
|
54
|
+
label: string;
|
|
55
|
+
description: string;
|
|
56
|
+
};
|
|
57
|
+
query: {
|
|
58
|
+
type: string;
|
|
59
|
+
label: string;
|
|
60
|
+
description: string;
|
|
61
|
+
};
|
|
62
|
+
listExpansions: {
|
|
63
|
+
type: string;
|
|
64
|
+
label: string;
|
|
65
|
+
optional: boolean;
|
|
66
|
+
description: string;
|
|
67
|
+
options: string[];
|
|
68
|
+
};
|
|
69
|
+
tweetExpansions: {
|
|
70
|
+
type: string;
|
|
71
|
+
label: string;
|
|
72
|
+
optional: boolean;
|
|
73
|
+
description: string;
|
|
74
|
+
options: string[];
|
|
75
|
+
};
|
|
76
|
+
userExpansions: {
|
|
77
|
+
type: string;
|
|
78
|
+
label: string;
|
|
79
|
+
optional: boolean;
|
|
80
|
+
description: string;
|
|
81
|
+
options: string[];
|
|
82
|
+
};
|
|
83
|
+
listFields: {
|
|
84
|
+
type: string;
|
|
85
|
+
label: string;
|
|
86
|
+
description: string;
|
|
87
|
+
optional: boolean;
|
|
88
|
+
options: string[];
|
|
89
|
+
};
|
|
90
|
+
mediaFields: {
|
|
91
|
+
type: string;
|
|
92
|
+
label: string;
|
|
93
|
+
description: string;
|
|
94
|
+
optional: boolean;
|
|
95
|
+
options: string[];
|
|
96
|
+
};
|
|
97
|
+
placeFields: {
|
|
98
|
+
type: string;
|
|
99
|
+
label: string;
|
|
100
|
+
description: string;
|
|
101
|
+
optional: boolean;
|
|
102
|
+
options: string[];
|
|
103
|
+
};
|
|
104
|
+
pollFields: {
|
|
105
|
+
type: string;
|
|
106
|
+
label: string;
|
|
107
|
+
description: string;
|
|
108
|
+
optional: boolean;
|
|
109
|
+
options: string[];
|
|
110
|
+
};
|
|
111
|
+
tweetFields: {
|
|
112
|
+
type: string;
|
|
113
|
+
label: string;
|
|
114
|
+
description: string;
|
|
115
|
+
optional: boolean;
|
|
116
|
+
options: string[];
|
|
117
|
+
};
|
|
118
|
+
userFields: {
|
|
119
|
+
type: string;
|
|
120
|
+
label: string;
|
|
121
|
+
description: string;
|
|
122
|
+
optional: boolean;
|
|
123
|
+
options: string[];
|
|
124
|
+
};
|
|
125
|
+
}>;
|
|
126
|
+
tweetId: {
|
|
127
|
+
propDefinition: (string | import("@pipedream/types").App<{
|
|
128
|
+
_getAuthHeader(config: import("../../common/types/requestParams.js").HttpRequestParams): Promise<import("oauth-1.0a").Header>;
|
|
129
|
+
_getBaseUrl(): "https://api.twitter.com/2";
|
|
130
|
+
_httpRequest({ $, ...args }: import("../../common/types/requestParams.js").HttpRequestParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").TwitterEntity>>;
|
|
131
|
+
_paginatedRequest({ maxResults, maxPerPage, params, ...args }: import("../../common/types/requestParams.js").PaginatedRequestParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").TwitterEntity>>;
|
|
132
|
+
addUserToList({ listId, ...args }: import("../../common/types/requestParams.js").AddUserToListParams): Promise<object>;
|
|
133
|
+
createTweet(args: import("../../common/types/requestParams.js").CreateTweetParams): Promise<object>;
|
|
134
|
+
deleteTweet({ tweetId, ...args }: DeleteTweetParams): Promise<object>;
|
|
135
|
+
followUser(args: import("../../common/types/requestParams.js").FollowUserParams): Promise<object>;
|
|
136
|
+
getListTweets({ listId, ...args }: import("../../common/types/requestParams.js").GetListTweetsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
|
|
137
|
+
getTweet({ tweetId, ...args }: import("../../common/types/requestParams.js").GetTweetParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").Tweet>>;
|
|
138
|
+
getAuthenticatedUserId(): Promise<string>;
|
|
139
|
+
getUserLikedTweets({ userId, ...args }: import("../../common/types/requestParams.js").GetUserLikedTweetParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
|
|
140
|
+
getUserOwnedLists({ userId, ...args }: import("../../common/types/requestParams.js").GetUserOwnedListsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").List>>;
|
|
141
|
+
getUserFollowedLists({ userId, ...args }: import("../../common/types/requestParams.js").GetUserFollowedListsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").List>>;
|
|
142
|
+
getUserMentions({ userId, ...args }: import("../../common/types/requestParams.js").GetUserMentionsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
|
|
143
|
+
getUserTweets({ userId, ...args }: import("../../common/types/requestParams.js").GetUserTweetsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
|
|
144
|
+
getUserByUsername(username: string): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").User>>;
|
|
145
|
+
getUser({ userId, ...args }: import("../../common/types/requestParams.js").GetUserParams): Promise<import("../../common/types/responseSchemas").ResponseObject<import("../../common/types/responseSchemas").User>>;
|
|
146
|
+
likeTweet(args: import("../../common/types/requestParams.js").LikeTweetParams): Promise<object>;
|
|
147
|
+
getUserFollowers({ userId, ...args }: import("../../common/types/requestParams.js").GetUserFollowersParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").User>>;
|
|
148
|
+
getUserFollowing({ userId, ...args }: import("../../common/types/requestParams.js").GetUserFollowersParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").User>>;
|
|
149
|
+
retweet(args: import("../../common/types/requestParams.js").LikeTweetParams): Promise<object>;
|
|
150
|
+
searchTweets(args: import("../../common/types/requestParams.js").SearchTweetsParams): Promise<import("../../common/types/responseSchemas").PaginatedResponseObject<import("../../common/types/responseSchemas").Tweet>>;
|
|
151
|
+
unfollowUser({ userId, ...args }: import("../../common/types/requestParams.js").UnfollowUserParams): Promise<object>;
|
|
152
|
+
unlikeTweet({ tweetId, ...args }: import("../../common/types/requestParams.js").UnlikeTweetParams): Promise<object>;
|
|
153
|
+
}, {
|
|
154
|
+
maxResults: {
|
|
155
|
+
type: string;
|
|
156
|
+
label: string;
|
|
157
|
+
description: string;
|
|
158
|
+
optional: boolean;
|
|
159
|
+
};
|
|
160
|
+
listId: {
|
|
161
|
+
type: string;
|
|
162
|
+
label: string;
|
|
163
|
+
description: string;
|
|
164
|
+
options(): Promise<{
|
|
165
|
+
label: string;
|
|
166
|
+
value: string;
|
|
167
|
+
}[]>;
|
|
168
|
+
};
|
|
169
|
+
userNameOrId: {
|
|
170
|
+
type: string;
|
|
171
|
+
label: string;
|
|
172
|
+
description: string;
|
|
173
|
+
optional: boolean;
|
|
174
|
+
default: string;
|
|
175
|
+
};
|
|
176
|
+
tweetId: {
|
|
177
|
+
type: string;
|
|
178
|
+
label: string;
|
|
179
|
+
description: string;
|
|
180
|
+
};
|
|
181
|
+
query: {
|
|
182
|
+
type: string;
|
|
183
|
+
label: string;
|
|
184
|
+
description: string;
|
|
185
|
+
};
|
|
186
|
+
listExpansions: {
|
|
187
|
+
type: string;
|
|
188
|
+
label: string;
|
|
189
|
+
optional: boolean;
|
|
190
|
+
description: string;
|
|
191
|
+
options: string[];
|
|
192
|
+
};
|
|
193
|
+
tweetExpansions: {
|
|
194
|
+
type: string;
|
|
195
|
+
label: string;
|
|
196
|
+
optional: boolean;
|
|
197
|
+
description: string;
|
|
198
|
+
options: string[];
|
|
199
|
+
};
|
|
200
|
+
userExpansions: {
|
|
201
|
+
type: string;
|
|
202
|
+
label: string;
|
|
203
|
+
optional: boolean;
|
|
204
|
+
description: string;
|
|
205
|
+
options: string[];
|
|
206
|
+
};
|
|
207
|
+
listFields: {
|
|
208
|
+
type: string;
|
|
209
|
+
label: string;
|
|
210
|
+
description: string;
|
|
211
|
+
optional: boolean;
|
|
212
|
+
options: string[];
|
|
213
|
+
};
|
|
214
|
+
mediaFields: {
|
|
215
|
+
type: string;
|
|
216
|
+
label: string;
|
|
217
|
+
description: string;
|
|
218
|
+
optional: boolean;
|
|
219
|
+
options: string[];
|
|
220
|
+
};
|
|
221
|
+
placeFields: {
|
|
222
|
+
type: string;
|
|
223
|
+
label: string;
|
|
224
|
+
description: string;
|
|
225
|
+
optional: boolean;
|
|
226
|
+
options: string[];
|
|
227
|
+
};
|
|
228
|
+
pollFields: {
|
|
229
|
+
type: string;
|
|
230
|
+
label: string;
|
|
231
|
+
description: string;
|
|
232
|
+
optional: boolean;
|
|
233
|
+
options: string[];
|
|
234
|
+
};
|
|
235
|
+
tweetFields: {
|
|
236
|
+
type: string;
|
|
237
|
+
label: string;
|
|
238
|
+
description: string;
|
|
239
|
+
optional: boolean;
|
|
240
|
+
options: string[];
|
|
241
|
+
};
|
|
242
|
+
userFields: {
|
|
243
|
+
type: string;
|
|
244
|
+
label: string;
|
|
245
|
+
description: string;
|
|
246
|
+
optional: boolean;
|
|
247
|
+
options: string[];
|
|
248
|
+
};
|
|
249
|
+
}>)[];
|
|
250
|
+
};
|
|
251
|
+
}>;
|
|
252
|
+
export default _default;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import app from "../../app/twitter.app.mjs";
|
|
2
|
+
import { defineAction } from "@pipedream/types";
|
|
3
|
+
const DOCS_LINK = "https://developer.twitter.com/en/docs/twitter-api/tweets/manage-tweets/api-reference/delete-tweets-id";
|
|
4
|
+
export default defineAction({
|
|
5
|
+
key: "twitter-delete-tweet",
|
|
6
|
+
name: "Delete Tweet",
|
|
7
|
+
description: `Remove a posted tweet. [See docs here](${DOCS_LINK})`,
|
|
8
|
+
version: "1.0.0",
|
|
9
|
+
type: "action",
|
|
10
|
+
props: {
|
|
11
|
+
app,
|
|
12
|
+
tweetId: {
|
|
13
|
+
propDefinition: [
|
|
14
|
+
app,
|
|
15
|
+
"tweetId",
|
|
16
|
+
],
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
async run({ $ }) {
|
|
20
|
+
const params = {
|
|
21
|
+
$,
|
|
22
|
+
tweetId: this.tweetId,
|
|
23
|
+
};
|
|
24
|
+
const response = await this.app.deleteTweet(params);
|
|
25
|
+
$.export("$summary", "Successfully deleted tweet");
|
|
26
|
+
return response;
|
|
27
|
+
},
|
|
28
|
+
});
|