fix multiselect

This commit is contained in:
abhi
2024-12-08 10:34:25 +05:30
committed by abhi1992002
parent 240e030a36
commit 8eba862723
26 changed files with 781 additions and 728 deletions

View File

@@ -12,54 +12,104 @@ from backend.blocks.twitter._mappers import (
get_backend_space_field,
get_backend_user_field,
)
from backend.blocks.twitter._types import TweetExpansions, TweetReplySettings
from backend.blocks.twitter._types import (
ExpansionFilter,
TweetMediaFieldsFilter,
TweetPlaceFieldsFilter,
TweetPollFieldsFilter,
TweetFieldsFilter,
TweetUserFieldsFilter,
UserExpansionsFilter,
ListExpansionsFilter,
ListFieldsFilter,
SpaceExpansionsFilter,
SpaceFieldsFilter,
DMEventExpansionFilter,
# DMEventFieldFilter,
DMEventTypeFilter,
DMMediaFieldFilter,
DMTweetFieldFilter,
TweetReplySettingsFilter
)
# Common Builder
class TweetExpansionsBuilder:
def __init__(self, param: Dict[str, Any]):
self.params: Dict[str, Any] = param
def add_expansions(self, expansions: list[TweetExpansions]):
def add_expansions(self, expansions: ExpansionFilter):
if expansions:
self.params["expansions"] = ",".join(
[get_backend_expansion(exp.name) for exp in expansions]
)
filtered_expansions = [
name for name, value in expansions.dict().items()
if value is True
]
if filtered_expansions:
self.params["expansions"] = ",".join(
[get_backend_expansion(exp) for exp in filtered_expansions]
)
print("all_expansions : ", self.params["expansions"])
return self
def add_media_fields(self, media_fields: list):
def add_media_fields(self, media_fields: TweetMediaFieldsFilter):
if media_fields:
self.params["media.fields"] = ",".join(
[get_backend_media_field(field.name) for field in media_fields]
)
filtered_fields = [
name for name, value in media_fields.dict().items()
if value is True
]
if filtered_fields:
self.params["media.fields"] = ",".join(
[get_backend_media_field(field) for field in filtered_fields]
)
return self
def add_place_fields(self, place_fields: list):
def add_place_fields(self, place_fields: TweetPlaceFieldsFilter):
if place_fields:
self.params["place.fields"] = ",".join(
[get_backend_place_field(field.name) for field in place_fields]
)
filtered_fields = [
name for name, value in place_fields.dict().items()
if value is True
]
if filtered_fields:
self.params["place.fields"] = ",".join(
[get_backend_place_field(field) for field in filtered_fields]
)
return self
def add_poll_fields(self, poll_fields: list):
def add_poll_fields(self, poll_fields: TweetPollFieldsFilter):
if poll_fields:
self.params["poll.fields"] = ",".join(
[get_backend_poll_field(field.name) for field in poll_fields]
)
filtered_fields = [
name for name, value in poll_fields.dict().items()
if value is True
]
if filtered_fields:
self.params["poll.fields"] = ",".join(
[get_backend_poll_field(field) for field in filtered_fields]
)
return self
def add_tweet_fields(self, tweet_fields: list):
def add_tweet_fields(self, tweet_fields: TweetFieldsFilter):
if tweet_fields:
self.params["tweet.fields"] = ",".join(
[get_backend_field(field.name) for field in tweet_fields]
)
filtered_fields = [
name for name, value in tweet_fields.dict().items()
if value is True
]
if filtered_fields:
self.params["tweet.fields"] = ",".join(
[get_backend_field(field) for field in filtered_fields]
)
return self
def add_user_fields(self, user_fields: list):
def add_user_fields(self, user_fields: TweetUserFieldsFilter):
if user_fields:
self.params["user.fields"] = ",".join(
[get_backend_user_field(field.name) for field in user_fields]
)
filtered_fields = [
name for name, value in user_fields.dict().items()
if value is True
]
if filtered_fields:
self.params["user.fields"] = ",".join(
[get_backend_user_field(field) for field in filtered_fields]
)
return self
def build(self):
@@ -70,23 +120,38 @@ class UserExpansionsBuilder:
def __init__(self, param: Dict[str, Any]):
self.params: Dict[str, Any] = param
def add_expansions(self, expansions: list):
def add_expansions(self, expansions: UserExpansionsFilter):
if expansions:
self.params["expansions"] = ",".join([exp.value for exp in expansions])
filtered_expansions = [
name for name, value in expansions.dict().items()
if value is True
]
if filtered_expansions:
self.params["expansions"] = ",".join(filtered_expansions)
return self
def add_tweet_fields(self, tweet_fields: list):
def add_tweet_fields(self, tweet_fields: TweetFieldsFilter):
if tweet_fields:
self.params["tweet.fields"] = ",".join(
[get_backend_field(field.name) for field in tweet_fields]
)
filtered_fields = [
name for name, value in tweet_fields.dict().items()
if value is True
]
if filtered_fields:
self.params["tweet.fields"] = ",".join(
[get_backend_field(field) for field in filtered_fields]
)
return self
def add_user_fields(self, user_fields: list):
def add_user_fields(self, user_fields: TweetUserFieldsFilter):
if user_fields:
self.params["user.fields"] = ",".join(
[get_backend_user_field(field.name) for field in user_fields]
)
filtered_fields = [
name for name, value in user_fields.dict().items()
if value is True
]
if filtered_fields:
self.params["user.fields"] = ",".join(
[get_backend_user_field(field) for field in filtered_fields]
)
return self
def build(self):
@@ -97,25 +162,40 @@ class ListExpansionsBuilder:
def __init__(self, param: Dict[str, Any]):
self.params: Dict[str, Any] = param
def add_expansions(self, expansions: list):
def add_expansions(self, expansions: ListExpansionsFilter):
if expansions:
self.params["expansions"] = ",".join(
[get_backend_list_expansion(exp.name) for exp in expansions]
)
filtered_expansions = [
name for name, value in expansions.dict().items()
if value is True
]
if filtered_expansions:
self.params["expansions"] = ",".join(
[get_backend_list_expansion(exp) for exp in filtered_expansions]
)
return self
def add_list_fields(self, list_fields: list):
def add_list_fields(self, list_fields: ListFieldsFilter):
if list_fields:
self.params["list.fields"] = ",".join(
[get_backend_list_field(field.name) for field in list_fields]
)
filtered_fields = [
name for name, value in list_fields.dict().items()
if value is True
]
if filtered_fields:
self.params["list.fields"] = ",".join(
[get_backend_list_field(field) for field in filtered_fields]
)
return self
def add_user_fields(self, user_fields: list):
def add_user_fields(self, user_fields: TweetUserFieldsFilter):
if user_fields:
self.params["user.fields"] = ",".join(
[get_backend_user_field(field.name) for field in user_fields]
)
filtered_fields = [
name for name, value in user_fields.dict().items()
if value is True
]
if filtered_fields:
self.params["user.fields"] = ",".join(
[get_backend_user_field(field) for field in filtered_fields]
)
return self
def build(self):
@@ -126,25 +206,40 @@ class SpaceExpansionsBuilder:
def __init__(self, param: Dict[str, Any]):
self.params: Dict[str, Any] = param
def add_expansions(self, expansions: list):
def add_expansions(self, expansions: SpaceExpansionsFilter):
if expansions:
self.params["expansions"] = ",".join(
[get_backend_space_expansion(exp.name) for exp in expansions]
)
filtered_expansions = [
name for name, value in expansions.dict().items()
if value is True
]
if filtered_expansions:
self.params["expansions"] = ",".join(
[get_backend_space_expansion(exp) for exp in filtered_expansions]
)
return self
def add_space_fields(self, space_fields: list):
def add_space_fields(self, space_fields: SpaceFieldsFilter):
if space_fields:
self.params["space.fields"] = ",".join(
[get_backend_space_field(field.name) for field in space_fields]
)
filtered_fields = [
name for name, value in space_fields.dict().items()
if value is True
]
if filtered_fields:
self.params["space.fields"] = ",".join(
[get_backend_space_field(field) for field in filtered_fields]
)
return self
def add_user_fields(self, user_fields: list):
def add_user_fields(self, user_fields: TweetUserFieldsFilter):
if user_fields:
self.params["user.fields"] = ",".join(
[get_backend_user_field(field.name) for field in user_fields]
)
filtered_fields = [
name for name, value in user_fields.dict().items()
if value is True
]
if filtered_fields:
self.params["user.fields"] = ",".join(
[get_backend_user_field(field) for field in filtered_fields]
)
return self
def build(self):
@@ -188,37 +283,54 @@ class DMExpansionsBuilder:
def __init__(self, param: Dict[str, Any]):
self.params: Dict[str, Any] = param
def add_expansions(self, expansions: list):
def add_expansions(self, expansions: DMEventExpansionFilter):
if expansions:
self.params["expansions"] = ",".join([exp.value for exp in expansions])
filtered_expansions = [
name for name, value in expansions.dict().items()
if value is True
]
if filtered_expansions:
self.params["expansions"] = ",".join(filtered_expansions)
return self
def add_event_types(self, event_types: list):
def add_event_types(self, event_types: DMEventTypeFilter):
if event_types:
self.params["event_types"] = ",".join(
[field.value for field in event_types]
)
filtered_types = [
name for name, value in event_types.dict().items()
if value is True
]
if filtered_types:
self.params["event_types"] = ",".join(filtered_types)
return self
def add_media_fields(self, media_fields: list):
def add_media_fields(self, media_fields: DMMediaFieldFilter):
if media_fields:
self.params["media.fields"] = ",".join(
[field.value for field in media_fields]
)
filtered_fields = [
name for name, value in media_fields.dict().items()
if value is True
]
if filtered_fields:
self.params["media.fields"] = ",".join(filtered_fields)
return self
def add_tweet_fields(self, tweet_fields: list):
def add_tweet_fields(self, tweet_fields: DMTweetFieldFilter):
if tweet_fields:
self.params["tweet.fields"] = ",".join(
[field.value for field in tweet_fields]
)
filtered_fields = [
name for name, value in tweet_fields.dict().items()
if value is True
]
if filtered_fields:
self.params["tweet.fields"] = ",".join(filtered_fields)
return self
def add_user_fields(self, user_fields: list):
def add_user_fields(self, user_fields: TweetUserFieldsFilter):
if user_fields:
self.params["user.fields"] = ",".join(
[field.value for field in user_fields]
)
filtered_fields = [
name for name, value in user_fields.dict().items()
if value is True
]
if filtered_fields:
self.params["user.fields"] = ",".join(filtered_fields)
return self
def build(self):
@@ -293,16 +405,18 @@ class TweetPostBuilder:
return self
def add_reply_settings(
self, exclude_user_ids: list, reply_to_id: str, settings: TweetReplySettings
self, exclude_user_ids: list, reply_to_id: str, settings: TweetReplySettingsFilter
):
if exclude_user_ids:
self.params["exclude_reply_user_ids"] = exclude_user_ids
if reply_to_id:
self.params["in_reply_to_tweet_id"] = reply_to_id
if settings == TweetReplySettings.all_users:
if settings.All_Users:
self.params["reply_settings"] = None
else:
self.params["reply_settings"] = settings
elif settings.Following_Users_Only:
self.params["reply_settings"] = "following"
elif settings.Mentioned_Users_Only:
self.params["reply_settings"] = "mentionedUsers"
return self
def build(self):

View File

@@ -2,15 +2,15 @@
# Tweet Expansions
EXPANSION_FRONTEND_TO_BACKEND_MAPPING = {
"attachments_poll_ids": "attachments.poll_ids",
"attachments_media_keys": "attachments.media_keys",
"author_id": "author_id",
"edit_history_tweet_ids": "edit_history_tweet_ids",
"entities_mentions_username": "entities.mentions.username",
"geo_place_id": "geo.place_id",
"in_reply_to_user_id": "in_reply_to_user_id",
"referenced_tweets_id": "referenced_tweets.id",
"referenced_tweets_id_author_id": "referenced_tweets.id.author_id",
"Poll_IDs": "attachments.poll_ids",
"Media_Keys": "attachments.media_keys",
"Author_User_ID": "author_id",
"Edit_History_Tweet_IDs": "edit_history_tweet_ids",
"Mentioned_Usernames": "entities.mentions.username",
"Place_ID": "geo.place_id",
"Reply_To_User_ID": "in_reply_to_user_id",
"Referenced_Tweet_ID": "referenced_tweets.id",
"Referenced_Tweet_Author_ID": "referenced_tweets.id.author_id",
}
@@ -23,9 +23,9 @@ def get_backend_expansion(frontend_key: str) -> str:
# TweetReplySettings
REPLY_SETTINGS_FRONTEND_TO_BACKEND_MAPPING = {
"mentioned_users": "mentionedUsers",
"following": "following",
"all_users": "all",
"Mentioned_Users_Only": "mentionedUsers",
"Following_Users_Only": "following",
"All_Users": "all",
}
@@ -38,22 +38,22 @@ def get_backend_reply_setting(frontend_key: str) -> str:
USER_FIELDS_FRONTEND_TO_BACKEND_MAPPING = {
"created_at": "created_at",
"description": "description",
"entities": "entities",
"id": "id",
"location": "location",
"most_recent_tweet_id": "most_recent_tweet_id",
"name_user": "name",
"pinned_tweet_id": "pinned_tweet_id",
"profile_image_url": "profile_image_url",
"protected": "protected",
"public_metrics": "public_metrics",
"url": "url",
"username": "username",
"verified": "verified",
"verified_type": "verified_type",
"withheld": "withheld",
"Account_Creation_Date": "created_at",
"User_Bio": "description",
"User_Entities": "entities",
"User_ID": "id",
"User_Location": "location",
"Latest_Tweet_ID": "most_recent_tweet_id",
"Display_Name": "name",
"Pinned_Tweet_ID": "pinned_tweet_id",
"Profile_Picture_URL": "profile_image_url",
"Is_Protected_Account": "protected",
"Account_Statistics": "public_metrics",
"Profile_URL": "url",
"Username": "username",
"Is_Verified": "verified",
"Verification_Type": "verified_type",
"Content_Withholding_Info": "withheld",
}
@@ -66,24 +66,24 @@ def get_backend_user_field(frontend_key: str) -> str:
# TweetFields
FIELDS_FRONTEND_TO_BACKEND_MAPPING = {
"attachments": "attachments",
"author_id": "author_id",
"context_annotations": "context_annotations",
"conversation_id": "conversation_id",
"created_at": "created_at",
"edit_controls": "edit_controls",
"entities": "entities",
"geo": "geo",
"id": "id",
"in_reply_to_user_id": "in_reply_to_user_id",
"lang": "lang",
"public_metrics": "public_metrics",
"possibly_sensitive": "possibly_sensitive",
"referenced_tweets": "referenced_tweets",
"reply_settings": "reply_settings",
"source": "source",
"text": "text",
"withheld": "withheld",
"Tweet_Attachments": "attachments",
"Author_ID": "author_id",
"Context_Annotations": "context_annotations",
"Conversation_ID": "conversation_id",
"Creation_Time": "created_at",
"Edit_Controls": "edit_controls",
"Tweet_Entities": "entities",
"Geographic_Location": "geo",
"Tweet_ID": "id",
"Reply_To_User_ID": "in_reply_to_user_id",
"Language": "lang",
"Public_Metrics": "public_metrics",
"Sensitive_Content_Flag": "possibly_sensitive",
"Referenced_Tweets": "referenced_tweets",
"Reply_Settings": "reply_settings",
"Tweet_Source": "source",
"Tweet_Text": "text",
"Withheld_Content": "withheld",
}
@@ -96,11 +96,11 @@ def get_backend_field(frontend_key: str) -> str:
# TweetPollFields
POLL_FIELDS_FRONTEND_TO_BACKEND_MAPPING = {
"duration_minutes": "duration_minutes",
"end_datetime": "end_datetime",
"id": "id",
"options": "options",
"voting_status": "voting_status",
"Duration_Minutes": "duration_minutes",
"End_DateTime": "end_datetime",
"Poll_ID": "id",
"Poll_Options": "options",
"Voting_Status": "voting_status",
}
@@ -112,14 +112,14 @@ def get_backend_poll_field(frontend_key: str) -> str:
PLACE_FIELDS_FRONTEND_TO_BACKEND_MAPPING = {
"contained_within": "contained_within",
"country": "country",
"country_code": "country_code",
"full_name": "full_name",
"geo": "geo",
"id": "id",
"place_name": "name",
"place_type": "place_type",
"Contained_Within_Places": "contained_within",
"Country": "country",
"Country_Code": "country_code",
"Full_Location_Name": "full_name",
"Geographic_Coordinates": "geo",
"Place_ID": "id",
"Place_Name": "name",
"Place_Type": "place_type",
}
@@ -132,19 +132,19 @@ def get_backend_place_field(frontend_key: str) -> str:
# TweetMediaFields
MEDIA_FIELDS_FRONTEND_TO_BACKEND_MAPPING = {
"duration_ms": "duration_ms",
"height": "height",
"media_key": "media_key",
"preview_image_url": "preview_image_url",
"type": "type",
"url": "url",
"width": "width",
"public_metrics": "public_metrics",
"non_public_metrics": "non_public_metrics",
"organic_metrics": "organic_metrics",
"promoted_metrics": "promoted_metrics",
"alt_text": "alt_text",
"variants": "variants",
"Duration_in_Milliseconds": "duration_ms",
"Height": "height",
"Media_Key": "media_key",
"Preview_Image_URL": "preview_image_url",
"Media_Type": "type",
"Media_URL": "url",
"Width": "width",
"Public_Metrics": "public_metrics",
"Non_Public_Metrics": "non_public_metrics",
"Organic_Metrics": "organic_metrics",
"Promoted_Metrics": "promoted_metrics",
"Alternative_Text": "alt_text",
"Media_Variants": "variants",
}
@@ -159,11 +159,11 @@ def get_backend_media_field(frontend_key: str) -> str:
# SpaceExpansions
EXPANSION_FRONTEND_TO_BACKEND_MAPPING_SPACE = {
"invited_user_ids": "invited_user_ids",
"speaker_ids": "speaker_ids",
"creator_id": "creator_id",
"host_ids": "host_ids",
"topic_ids": "topic_ids",
"Invited_Users": "invited_user_ids",
"Speakers": "speaker_ids",
"Creator": "creator_id",
"Hosts": "host_ids",
"Topics": "topic_ids",
}
@@ -176,22 +176,22 @@ def get_backend_space_expansion(frontend_key: str) -> str:
# SpaceFields
SPACE_FIELDS_FRONTEND_TO_BACKEND_MAPPING = {
"id": "id",
"state": "state",
"created_at": "created_at",
"ended_at": "ended_at",
"host_ids": "host_ids",
"lang": "lang",
"is_ticketed": "is_ticketed",
"invited_user_ids": "invited_user_ids",
"participant_count": "participant_count",
"subscriber_count": "subscriber_count",
"scheduled_start": "scheduled_start",
"speaker_ids": "speaker_ids",
"started_at": "started_at",
"title_": "title",
"topic_ids": "topic_ids",
"updated_at": "updated_at",
"Space_ID": "id",
"Space_State": "state",
"Creation_Time": "created_at",
"End_Time": "ended_at",
"Host_User_IDs": "host_ids",
"Language": "lang",
"Is_Ticketed": "is_ticketed",
"Invited_User_IDs": "invited_user_ids",
"Participant_Count": "participant_count",
"Subscriber_Count": "subscriber_count",
"Scheduled_Start_Time": "scheduled_start",
"Speaker_User_IDs": "speaker_ids",
"Start_Time": "started_at",
"Space_Title": "title",
"Topic_IDs": "topic_ids",
"Last_Updated_Time": "updated_at",
}
@@ -205,7 +205,7 @@ def get_backend_space_field(frontend_key: str) -> str:
# -------------- List Expansions -----------------
# ListExpansions
LIST_EXPANSION_FRONTEND_TO_BACKEND_MAPPING = {"owner_id": "owner_id"}
LIST_EXPANSION_FRONTEND_TO_BACKEND_MAPPING = {"List_Owner_ID": "owner_id"}
def get_backend_list_expansion(frontend_key: str) -> str:
@@ -216,14 +216,14 @@ def get_backend_list_expansion(frontend_key: str) -> str:
LIST_FIELDS_FRONTEND_TO_BACKEND_MAPPING = {
"id": "id",
"list_name": "name",
"created_at": "created_at",
"description": "description",
"follower_count": "follower_count",
"member_count": "member_count",
"private": "private",
"owner_id": "owner_id",
"List_ID": "id",
"List_Name": "name",
"Creation_Date": "created_at",
"Description": "description",
"Follower_Count": "follower_count",
"Member_Count": "member_count",
"Is_Private": "private",
"Owner_ID": "owner_id",
}

View File

@@ -1,427 +1,361 @@
from enum import Enum
from backend.data.block import BlockSchema
from backend.data.model import SchemaField
from pydantic import BaseModel
# -------------- Tweets -----------------
class TweetReplySettingsFilter(BaseModel):
Mentioned_Users_Only: bool = False
Following_Users_Only: bool = False
All_Users: bool = False
class TweetReplySettings(str, Enum):
mentioned_users = "Mentioned_Users_Only"
following = "Following_Users_Only"
all_users = "All_Users"
class TweetUserFieldsFilter(BaseModel):
Account_Creation_Date: bool = False
User_Bio: bool = False
User_Entities: bool = False
User_ID: bool = False
User_Location: bool = False
Latest_Tweet_ID: bool = False
Display_Name: bool = False
Pinned_Tweet_ID: bool = False
Profile_Picture_URL: bool = False
Is_Protected_Account: bool = False
Account_Statistics: bool = False
Profile_URL: bool = False
Username: bool = False
Is_Verified: bool = False
Verification_Type: bool = False
Content_Withholding_Info: bool = False
class TweetFieldsFilter(BaseModel):
Tweet_Attachments: bool = False
Author_ID: bool = False
Context_Annotations: bool = False
Conversation_ID: bool = False
Creation_Time: bool = False
Edit_Controls: bool = False
Tweet_Entities: bool = False
Geographic_Location: bool = False
Tweet_ID: bool = False
Reply_To_User_ID: bool = False
Language: bool = False
Public_Metrics: bool = False
Sensitive_Content_Flag: bool = False
Referenced_Tweets: bool = False
Reply_Settings: bool = False
Tweet_Source: bool = False
Tweet_Text: bool = False
Withheld_Content: bool = False
class TweetUserFields(str, Enum):
created_at = "Account_Creation_Date"
description = "User_Bio"
entities = "User_Entities"
id = "User_ID"
location = "User_Location"
most_recent_tweet_id = "Latest_Tweet_ID"
name_user = "Display_Name"
pinned_tweet_id = "Pinned_Tweet_ID"
profile_image_url = "Profile_Picture_URL"
protected = "Is_Protected_Account"
public_metrics = "Account_Statistics"
url = "Profile_URL"
username = "Username"
verified = "Is_Verified"
verified_type = "Verification_Type"
withheld = "Content_Withholding_Info"
class PersonalTweetFieldsFilter(BaseModel):
attachments: bool = False
author_id: bool = False
context_annotations: bool = False
conversation_id: bool = False
created_at: bool = False
edit_controls: bool = False
entities: bool = False
geo: bool = False
id: bool = False
in_reply_to_user_id: bool = False
lang: bool = False
non_public_metrics: bool = False
public_metrics: bool = False
organic_metrics: bool = False
promoted_metrics: bool = False
possibly_sensitive: bool = False
referenced_tweets: bool = False
reply_settings: bool = False
source: bool = False
text: bool = False
withheld: bool = False
class TweetPollFieldsFilter(BaseModel):
Duration_Minutes: bool = False
End_DateTime: bool = False
Poll_ID: bool = False
Poll_Options: bool = False
Voting_Status: bool = False
class TweetFields(str, Enum):
attachments = "Tweet_Attachments"
author_id = "Author_ID"
context_annotations = "Context_Annotations"
conversation_id = "Conversation_ID"
created_at = "Creation_Time"
edit_controls = "Edit_Controls"
entities = "Tweet_Entities"
geo = "Geographic_Location"
id = "Tweet_ID"
in_reply_to_user_id = "Reply_To_User_ID"
lang = "Language"
public_metrics = "Public_Metrics"
possibly_sensitive = "Sensitive_Content_Flag"
referenced_tweets = "Referenced_Tweets"
reply_settings = "Reply_Settings"
source = "Tweet_Source"
text = "Tweet_Text"
withheld = "Withheld_Content"
class TweetPlaceFieldsFilter(BaseModel):
Contained_Within_Places: bool = False
Country: bool = False
Country_Code: bool = False
Full_Location_Name: bool = False
Geographic_Coordinates: bool = False
Place_ID: bool = False
Place_Name: bool = False
Place_Type: bool = False
class TweetMediaFieldsFilter(BaseModel):
Duration_in_Milliseconds: bool = False
Height: bool = False
Media_Key: bool = False
Preview_Image_URL: bool = False
Media_Type: bool = False
Media_URL: bool = False
Width: bool = False
Public_Metrics: bool = False
Non_Public_Metrics: bool = False
Organic_Metrics: bool = False
Promoted_Metrics: bool = False
Alternative_Text: bool = False
Media_Variants: bool = False
class PersonalTweetFields(str, Enum):
attachments = "attachments"
author_id = "author_id"
context_annotations = "context_annotations"
conversation_id = "conversation_id"
created_at = "created_at"
edit_controls = "edit_controls"
entities = "entities"
geo = "geo"
id = "id"
in_reply_to_user_id = "in_reply_to_user_id"
lang = "lang"
non_public_metrics = "non_public_metrics"
public_metrics = "public_metrics"
organic_metrics = "organic_metrics"
promoted_metrics = "promoted_metrics"
possibly_sensitive = "possibly_sensitive"
referenced_tweets = "referenced_tweets"
reply_settings = "reply_settings"
source = "source"
text = "text"
withheld = "withheld"
class TweetPollFields(str, Enum):
duration_minutes = "Duration_Minutes"
end_datetime = "End_DateTime"
id = "Poll_ID"
options = "Poll_Options"
voting_status = "Voting_Status"
class TweetPlaceFields(str, Enum):
contained_within = "Contained_Within_Places"
country = "Country"
country_code = "Country_Code"
full_name = "Full_Location_Name"
geo = "Geographic_Coordinates"
id = "Place_ID"
place_name = "Place_Name"
place_type = "Place_Type"
class TweetMediaFields(str, Enum):
duration_ms = "Duration_in_Milliseconds"
height = "Height"
media_key = "Media_Key"
preview_image_url = "Preview_Image_URL"
type = "Media_Type"
url = "Media_URL"
width = "Width"
public_metrics = "Public_Metrics"
non_public_metrics = "Non_Public_Metrics"
organic_metrics = "Organic_Metrics"
promoted_metrics = "Promoted_Metrics"
alt_text = "Alternative_Text"
variants = "Media_Variants"
class TweetExpansions(str, Enum):
attachments_poll_ids = "Poll_IDs"
attachments_media_keys = "Media_Keys"
author_id = "Author_User_ID"
edit_history_tweet_ids = "Edit_History_Tweet_IDs"
entities_mentions_username = "Mentioned_Usernames"
geo_place_id = "Place_ID"
in_reply_to_user_id = "Reply_To_User_ID"
referenced_tweets_id = "Referenced_Tweet_ID"
referenced_tweets_id_author_id = "Referenced_Tweet_Author_ID"
class TweetExcludes(str, Enum):
retweets = "retweets"
replies = "replies"
class ExpansionFilter(BaseModel):
Poll_IDs: bool = False
Media_Keys: bool = False
Author_User_ID: bool = False
Edit_History_Tweet_IDs: bool = False
Mentioned_Usernames: bool = False
Place_ID: bool = False
Reply_To_User_ID: bool = False
Referenced_Tweet_ID: bool = False
Referenced_Tweet_Author_ID: bool = False
class TweetExcludesFilter(BaseModel):
retweets: bool = False
replies: bool = False
# -------------- Users -----------------
class UserExpansions(str, Enum):
pinned_tweet_id = "pinned_tweet_id"
class UserExpansionsFilter(BaseModel):
pinned_tweet_id: bool = False
# -------------- DM's' -----------------
class DMEventFieldFilter(BaseModel):
id: bool = False
text: bool = False
event_type: bool = False
created_at: bool = False
dm_conversation_id: bool = False
sender_id: bool = False
participant_ids: bool = False
referenced_tweets: bool = False
attachments: bool = False
class DMEventField(str, Enum):
ID = "id"
TEXT = "text"
EVENT_TYPE = "event_type"
CREATED_AT = "created_at"
DM_CONVERSATION_ID = "dm_conversation_id"
SENDER_ID = "sender_id"
PARTICIPANT_IDS = "participant_ids"
REFERENCED_TWEETS = "referenced_tweets"
ATTACHMENTS = "attachments"
class DMEventTypeFilter(BaseModel):
MessageCreate: bool = False
ParticipantsJoin: bool = False
ParticipantsLeave: bool = False
class DMEventExpansionFilter(BaseModel):
attachments_media_keys: bool = False
referenced_tweets_id: bool = False
sender_id: bool = False
participant_ids: bool = False
class DMEventType(str, Enum):
MESSAGE_CREATE = "MessageCreate"
PARTICIPANTS_JOIN = "ParticipantsJoin"
PARTICIPANTS_LEAVE = "ParticipantsLeave"
class DMEventExpansion(str, Enum):
ATTACHMENTS_MEDIA_KEYS = "attachments.media_keys"
REFERENCED_TWEETS_ID = "referenced_tweets.id"
SENDER_ID = "sender_id"
PARTICIPANT_IDS = "participant_ids"
class DMMediaField(str, Enum):
DURATION_MS = "duration_ms"
HEIGHT = "height"
MEDIA_KEY = "media_key"
PREVIEW_IMAGE_URL = "preview_image_url"
TYPE = "type"
URL = "url"
WIDTH = "width"
PUBLIC_METRICS = "public_metrics"
ALT_TEXT = "alt_text"
VARIANTS = "variants"
class DMTweetField(str, Enum):
ATTACHMENTS = "attachments"
AUTHOR_ID = "author_id"
CONTEXT_ANNOTATIONS = "context_annotations"
CONVERSATION_ID = "conversation_id"
CREATED_AT = "created_at"
EDIT_CONTROLS = "edit_controls"
ENTITIES = "entities"
GEO = "geo"
ID = "id"
IN_REPLY_TO_USER_ID = "in_reply_to_user_id"
LANG = "lang"
PUBLIC_METRICS = "public_metrics"
POSSIBLY_SENSITIVE = "possibly_sensitive"
REFERENCED_TWEETS = "referenced_tweets"
REPLY_SETTINGS = "reply_settings"
SOURCE = "source"
TEXT = "text"
WITHHELD = "withheld"
class DMMediaFieldFilter(BaseModel):
duration_ms: bool = False
height: bool = False
media_key: bool = False
preview_image_url: bool = False
type: bool = False
url: bool = False
width: bool = False
public_metrics: bool = False
alt_text: bool = False
variants: bool = False
class DMTweetFieldFilter(BaseModel):
attachments: bool = False
author_id: bool = False
context_annotations: bool = False
conversation_id: bool = False
created_at: bool = False
edit_controls: bool = False
entities: bool = False
geo: bool = False
id: bool = False
in_reply_to_user_id: bool = False
lang: bool = False
public_metrics: bool = False
possibly_sensitive: bool = False
referenced_tweets: bool = False
reply_settings: bool = False
source: bool = False
text: bool = False
withheld: bool = False
# -------------- Spaces -----------------
class SpaceExpansionsFilter(BaseModel):
Invited_Users: bool = False
Speakers: bool = False
Creator: bool = False
Hosts: bool = False
Topics: bool = False
class SpaceExpansions(str, Enum):
invited_user_ids = "Invited_Users"
speaker_ids = "Speakers"
creator_id = "Creator"
host_ids = "Hosts"
topic_ids = "Topics"
class SpaceFields(str, Enum):
id = "Space_ID"
state = "Space_State"
created_at = "Creation_Time"
ended_at = "End_Time"
host_ids = "Host_User_IDs"
lang = "Language"
is_ticketed = "Is_Ticketed"
invited_user_ids = "Invited_User_IDs"
participant_count = "Participant_Count"
subscriber_count = "Subscriber_Count"
scheduled_start = "Scheduled_Start_Time"
speaker_ids = "Speaker_User_IDs"
started_at = "Start_Time"
title_ = "Space_Title"
topic_ids = "Topic_IDs"
updated_at = "Last_Updated_Time"
class SpaceStates(str, Enum):
LIVE = "live"
SCHEDULED = "scheduled"
ALL = "all"
class SpaceFieldsFilter(BaseModel):
Space_ID: bool = False
Space_State: bool = False
Creation_Time: bool = False
End_Time: bool = False
Host_User_IDs: bool = False
Language: bool = False
Is_Ticketed: bool = False
Invited_User_IDs: bool = False
Participant_Count: bool = False
Subscriber_Count: bool = False
Scheduled_Start_Time: bool = False
Speaker_User_IDs: bool = False
Start_Time: bool = False
Space_Title: bool = False
Topic_IDs: bool = False
Last_Updated_Time: bool = False
class SpaceStatesFilter(str , Enum):
live = "live"
scheduled = "scheduled"
all = "all"
# -------------- List Expansions -----------------
class ListExpansionsFilter(BaseModel):
List_Owner_ID: bool = False
class ListExpansions(str, Enum):
owner_id = "List_Owner_ID"
class ListFields(str, Enum):
id = "List_ID"
list_name = "List_Name"
created_at = "Creation_Date"
description = "Description"
follower_count = "Follower_Count"
member_count = "Member_Count"
private = "Is_Private"
owner_id = "Owner_ID"
class ListFieldsFilter(BaseModel):
List_ID: bool = False
List_Name: bool = False
Creation_Date: bool = False
Description: bool = False
Follower_Count: bool = False
Member_Count: bool = False
Is_Private: bool = False
Owner_ID: bool = False
# --------- [Input Types] -------------
class TweetExpansionInputs(BlockSchema):
expansions: list[TweetExpansions] = SchemaField(
expansions: ExpansionFilter = SchemaField(
description="Choose what extra information you want to get with your tweets. For example:\n- Select 'Media_Keys' to get media details\n- Select 'Author_User_ID' to get user information\n- Select 'Place_ID' to get location details",
enum=TweetExpansions,
placeholder="Pick the extra information you want to see",
default=[],
advanced=True,
)
media_fields: list[TweetMediaFields] = SchemaField(
media_fields: TweetMediaFieldsFilter = SchemaField(
description="Select what media information you want to see (images, videos, etc). To use this, you must first select 'Media_Keys' in the expansions above.",
enum=TweetMediaFields,
placeholder="Choose what media details you want to see",
default=[],
advanced=True,
)
place_fields: list[TweetPlaceFields] = SchemaField(
place_fields: TweetPlaceFieldsFilter = SchemaField(
description="Select what location information you want to see (country, coordinates, etc). To use this, you must first select 'Place_ID' in the expansions above.",
placeholder="Choose what location details you want to see",
default=[],
advanced=True,
enum=TweetPlaceFields,
)
poll_fields: list[TweetPollFields] = SchemaField(
poll_fields: TweetPollFieldsFilter = SchemaField(
description="Select what poll information you want to see (options, voting status, etc). To use this, you must first select 'Poll_IDs' in the expansions above.",
placeholder="Choose what poll details you want to see",
default=[],
advanced=True,
enum=TweetPollFields,
)
tweet_fields: list[TweetFields] = SchemaField(
tweet_fields: TweetFieldsFilter = SchemaField(
description="Select what tweet information you want to see. For referenced tweets (like retweets), select 'Referenced_Tweet_ID' in the expansions above.",
placeholder="Choose what tweet details you want to see",
default=[],
advanced=True,
enum=TweetFields,
)
user_fields: list[TweetUserFields] = SchemaField(
user_fields: TweetUserFieldsFilter = SchemaField(
description="Select what user information you want to see. To use this, you must first select one of these in expansions above:\n- 'Author_User_ID' for tweet authors\n- 'Mentioned_Usernames' for mentioned users\n- 'Reply_To_User_ID' for users being replied to\n- 'Referenced_Tweet_Author_ID' for authors of referenced tweets",
placeholder="Choose what user details you want to see",
default=[],
advanced=True,
enum=TweetUserFields,
)
class DMEventExpansionInputs(BlockSchema):
expansions: list[DMEventExpansion] = SchemaField(
expansions: DMEventExpansionFilter = SchemaField(
description="Select expansions to include related data objects in the 'includes' section.",
enum=DMEventExpansion,
placeholder="Enter expansions",
default=[],
advanced=True,
)
event_types: list[DMEventType] = SchemaField(
event_types: DMEventTypeFilter = SchemaField(
description="Select DM event types to include in the response.",
placeholder="Enter event types",
default=[],
advanced=True,
enum=DMEventType,
)
media_fields: list[DMMediaField] = SchemaField(
media_fields: DMMediaFieldFilter = SchemaField(
description="Select media fields to include in the response (requires expansions=attachments.media_keys).",
placeholder="Enter media fields",
default=[],
advanced=True,
enum=DMMediaField,
)
tweet_fields: list[DMTweetField] = SchemaField(
tweet_fields: DMTweetFieldFilter = SchemaField(
description="Select tweet fields to include in the response (requires expansions=referenced_tweets.id).",
placeholder="Enter tweet fields",
default=[],
advanced=True,
enum=DMTweetField,
)
user_fields: list[TweetUserFields] = SchemaField(
user_fields: TweetUserFieldsFilter = SchemaField(
description="Select user fields to include in the response (requires expansions=sender_id or participant_ids).",
placeholder="Enter user fields",
default=[],
advanced=True,
enum=TweetUserFields,
)
class UserExpansionInputs(BlockSchema):
expansions: list[UserExpansions] = SchemaField(
expansions: UserExpansionsFilter = SchemaField(
description="Choose what extra information you want to get with user data. Currently only 'pinned_tweet_id' is available to see a user's pinned tweet.",
enum=UserExpansions,
placeholder="Select extra user information to include",
default=[],
advanced=True,
)
tweet_fields: list[TweetFields] = SchemaField(
tweet_fields: TweetFieldsFilter = SchemaField(
description="Select what tweet information you want to see in pinned tweets. This only works if you select 'pinned_tweet_id' in expansions above.",
placeholder="Choose what details to see in pinned tweets",
default=[],
advanced=True,
enum=TweetFields,
)
user_fields: list[TweetUserFields] = SchemaField(
user_fields: TweetUserFieldsFilter = SchemaField(
description="Select what user information you want to see, like username, bio, profile picture, etc.",
placeholder="Choose what user details you want to see",
default=[],
advanced=True,
enum=TweetUserFields,
)
class SpaceExpansionInputs(BlockSchema):
expansions: list[SpaceExpansions] = SchemaField(
expansions: SpaceExpansionsFilter = SchemaField(
description="Choose additional information you want to get with your Twitter Spaces:\n- Select 'Invited_Users' to see who was invited\n- Select 'Speakers' to see who can speak\n- Select 'Creator' to get details about who made the Space\n- Select 'Hosts' to see who's hosting\n- Select 'Topics' to see Space topics",
enum=SpaceExpansions,
placeholder="Pick what extra information you want to see about the Space",
default=[],
advanced=True,
)
space_fields: list[SpaceFields] = SchemaField(
space_fields: SpaceFieldsFilter = SchemaField(
description="Choose what Space details you want to see, such as:\n- Title\n- Start/End times\n- Number of participants\n- Language\n- State (live/scheduled)\n- And more",
placeholder="Choose what Space information you want to get",
default=[SpaceFields.title_, SpaceFields.host_ids],
default=SpaceFieldsFilter(Space_Title=True, Host_User_IDs=True),
advanced=True,
enum=SpaceFields,
)
user_fields: list[TweetUserFields] = SchemaField(
user_fields: TweetUserFieldsFilter = SchemaField(
description="Choose what user information you want to see. This works when you select any of these in expansions above:\n- 'Creator' for Space creator details\n- 'Hosts' for host information\n- 'Speakers' for speaker details\n- 'Invited_Users' for invited user information",
placeholder="Pick what details you want to see about the users",
default=[],
advanced=True,
enum=TweetUserFields,
)
class ListExpansionInputs(BlockSchema):
expansions: list[ListExpansions] = SchemaField(
expansions: ListExpansionsFilter = SchemaField(
description="Choose what extra information you want to get with your Twitter Lists:\n- Select 'List_Owner_ID' to get details about who owns the list\n\nThis will let you see more details about the list owner when you also select user fields below.",
enum=ListExpansions,
placeholder="Pick what extra list information you want to see",
default=[ListExpansions.owner_id],
default=ListExpansionsFilter(List_Owner_ID=True),
advanced=True,
)
user_fields: list[TweetUserFields] = SchemaField(
user_fields: TweetUserFieldsFilter = SchemaField(
description="Choose what information you want to see about list owners. This only works when you select 'List_Owner_ID' in expansions above.\n\nYou can see things like:\n- Their username\n- Profile picture\n- Account details\n- And more",
placeholder="Select what details you want to see about list owners",
default=[TweetUserFields.id, TweetUserFields.username],
default=TweetUserFieldsFilter(User_ID=True, Username=True),
advanced=True,
enum=TweetUserFields,
)
list_fields: list[ListFields] = SchemaField(
list_fields: ListFieldsFilter = SchemaField(
description="Choose what information you want to see about the Twitter Lists themselves, such as:\n- List name\n- Description\n- Number of followers\n- Number of members\n- Whether it's private\n- Creation date\n- And more",
placeholder="Pick what list details you want to see",
default=[ListFields.owner_id],
default=ListFieldsFilter(Owner_ID=True),
advanced=True,
enum=ListFields,
)
class TweetTimeWindowInputs(BlockSchema):
start_time: str = SchemaField(
description="Start time in YYYY-MM-DDTHH:mm:ssZ format",

View File

@@ -1,3 +1,5 @@
# Todo : Add new Type support
# from typing import cast
# import tweepy
# from tweepy.client import Response

View File

@@ -1,3 +1,5 @@
# Todo : Add new Type support
# from typing import cast
# import tweepy

View File

@@ -143,6 +143,7 @@ class TwitterFollowListBlock(Block):
# Enterprise Level [Need to do Manual testing]
# Needs Type Input in this
# class TwitterListGetFollowersBlock(Block):
# """

View File

@@ -17,9 +17,9 @@ from backend.blocks.twitter._serializer import (
)
from backend.blocks.twitter._types import (
ListExpansionInputs,
ListExpansions,
ListFields,
TweetUserFields,
ListExpansionsFilter,
ListFieldsFilter,
TweetUserFieldsFilter,
)
from backend.blocks.twitter.tweepy_exceptions import handle_tweepy_exception
from backend.data.block import Block, BlockCategory, BlockOutput, BlockSchema
@@ -94,9 +94,9 @@ class TwitterGetListBlock(Block):
def get_list(
credentials: TwitterCredentials,
list_id: str,
expansions: list[ListExpansions],
user_fields: list[TweetUserFields],
list_fields: list[ListFields],
expansions: ListExpansionsFilter,
user_fields: TweetUserFieldsFilter,
list_fields: ListFieldsFilter,
):
try:
client = tweepy.Client(
@@ -252,9 +252,9 @@ class TwitterGetOwnedListsBlock(Block):
user_id: str,
max_results: int,
pagination_token: str,
expansions: list[ListExpansions],
user_fields: list[TweetUserFields],
list_fields: list[ListFields],
expansions: ListExpansionsFilter,
user_fields: TweetUserFieldsFilter,
list_fields: ListFieldsFilter,
):
try:
client = tweepy.Client(

View File

@@ -20,12 +20,12 @@ from backend.blocks.twitter._serializer import (
)
from backend.blocks.twitter._types import (
ListExpansionInputs,
ListExpansions,
ListFields,
TweetFields,
TweetUserFields,
ListExpansionsFilter,
ListFieldsFilter,
TweetFieldsFilter,
TweetUserFieldsFilter,
UserExpansionInputs,
UserExpansions,
UserExpansionsFilter,
)
from backend.blocks.twitter.tweepy_exceptions import handle_tweepy_exception
from backend.data.block import Block, BlockCategory, BlockOutput, BlockSchema
@@ -276,9 +276,9 @@ class TwitterGetListMembersBlock(Block):
list_id: str,
max_results: int,
pagination_token: str,
expansions: list[UserExpansions],
tweet_fields: list[TweetFields],
user_fields: list[TweetUserFields],
expansions: UserExpansionsFilter,
tweet_fields: TweetFieldsFilter,
user_fields: TweetUserFieldsFilter,
):
try:
client = tweepy.Client(
@@ -440,9 +440,9 @@ class TwitterGetListMembershipsBlock(Block):
user_id: str,
max_results: int,
pagination_token: str,
expansions: list[ListExpansions],
user_fields: list[TweetUserFields],
list_fields: list[ListFields],
expansions: ListExpansionsFilter,
user_fields: TweetUserFieldsFilter,
list_fields: ListFieldsFilter,
):
try:
client = tweepy.Client(

View File

@@ -17,12 +17,12 @@ from backend.blocks.twitter._serializer import (
)
from backend.blocks.twitter._types import (
TweetExpansionInputs,
TweetExpansions,
TweetFields,
TweetMediaFields,
TweetPlaceFields,
TweetPollFields,
TweetUserFields,
ExpansionFilter,
TweetFieldsFilter,
TweetMediaFieldsFilter,
TweetPlaceFieldsFilter,
TweetPollFieldsFilter,
TweetUserFieldsFilter,
)
from backend.blocks.twitter.tweepy_exceptions import handle_tweepy_exception
from backend.data.block import Block, BlockCategory, BlockOutput, BlockSchema
@@ -118,12 +118,12 @@ class TwitterGetListTweetsBlock(Block):
list_id: str,
max_results: int,
pagination_token: str,
expansions: list[TweetExpansions],
media_fields: list[TweetMediaFields],
place_fields: list[TweetPlaceFields],
poll_fields: list[TweetPollFields],
tweet_fields: list[TweetFields],
user_fields: list[TweetUserFields],
expansions: ExpansionFilter,
media_fields: TweetMediaFieldsFilter,
place_fields: TweetPlaceFieldsFilter,
poll_fields: TweetPollFieldsFilter,
tweet_fields: TweetFieldsFilter,
user_fields: TweetUserFieldsFilter,
):
try:
client = tweepy.Client(

View File

@@ -17,9 +17,9 @@ from backend.blocks.twitter._serializer import (
)
from backend.blocks.twitter._types import (
ListExpansionInputs,
ListExpansions,
ListFields,
TweetUserFields,
ListExpansionsFilter,
ListFieldsFilter,
TweetUserFieldsFilter,
)
from backend.blocks.twitter.tweepy_exceptions import handle_tweepy_exception
from backend.data.block import Block, BlockCategory, BlockOutput, BlockSchema
@@ -212,9 +212,9 @@ class TwitterGetPinnedListsBlock(Block):
@staticmethod
def get_pinned_lists(
credentials: TwitterCredentials,
expansions: list[ListExpansions],
user_fields: list[TweetUserFields],
list_fields: list[ListFields],
expansions: ListExpansionsFilter,
user_fields: TweetUserFieldsFilter,
list_fields: ListFieldsFilter,
):
try:
client = tweepy.Client(

View File

@@ -17,10 +17,10 @@ from backend.blocks.twitter._serializer import (
)
from backend.blocks.twitter._types import (
SpaceExpansionInputs,
SpaceExpansions,
SpaceFields,
SpaceStates,
TweetUserFields,
SpaceExpansionsFilter,
SpaceFieldsFilter,
SpaceStatesFilter,
TweetUserFieldsFilter,
)
from backend.blocks.twitter.tweepy_exceptions import handle_tweepy_exception
from backend.data.block import Block, BlockCategory, BlockOutput, BlockSchema
@@ -49,10 +49,10 @@ class TwitterSearchSpacesBlock(Block):
advanced=True,
)
state: SpaceStates = SchemaField(
state: SpaceStatesFilter = SchemaField(
description="Type of Spaces to return (live, scheduled, or all)",
placeholder="Enter state filter",
default=SpaceStates.ALL,
default=SpaceStatesFilter.all,
)
class Output(BlockSchema):
@@ -112,10 +112,10 @@ class TwitterSearchSpacesBlock(Block):
credentials: TwitterCredentials,
query: str,
max_results: int,
state: SpaceStates,
expansions: list[SpaceExpansions],
space_fields: list[SpaceFields],
user_fields: list[TweetUserFields],
state: SpaceStatesFilter,
expansions: SpaceExpansionsFilter,
space_fields: SpaceFieldsFilter,
user_fields: TweetUserFieldsFilter,
):
try:
client = tweepy.Client(

View File

@@ -21,17 +21,17 @@ from backend.blocks.twitter._serializer import (
)
from backend.blocks.twitter._types import (
SpaceExpansionInputs,
SpaceExpansions,
SpaceFields,
SpaceExpansionsFilter,
SpaceFieldsFilter,
TweetExpansionInputs,
TweetExpansions,
TweetFields,
TweetMediaFields,
TweetPlaceFields,
TweetPollFields,
TweetUserFields,
ExpansionFilter,
TweetFieldsFilter,
TweetMediaFieldsFilter,
TweetPlaceFieldsFilter,
TweetPollFieldsFilter,
TweetUserFieldsFilter,
UserExpansionInputs,
UserExpansions,
UserExpansionsFilter,
)
from backend.blocks.twitter.tweepy_exceptions import handle_tweepy_exception
from backend.data.block import Block, BlockCategory, BlockOutput, BlockSchema
@@ -125,9 +125,9 @@ class TwitterGetSpacesBlock(Block):
credentials: TwitterCredentials,
space_ids: list[str],
user_ids: list[str],
expansions: list[SpaceExpansions],
space_fields: list[SpaceFields],
user_fields: list[TweetUserFields],
expansions: SpaceExpansionsFilter,
space_fields: SpaceFieldsFilter,
user_fields: TweetUserFieldsFilter,
):
try:
client = tweepy.Client(
@@ -270,9 +270,9 @@ class TwitterGetSpaceByIdBlock(Block):
def get_space(
credentials: TwitterCredentials,
space_id: str,
expansions: list[SpaceExpansions],
space_fields: list[SpaceFields],
user_fields: list[TweetUserFields],
expansions: SpaceExpansionsFilter,
space_fields: SpaceFieldsFilter,
user_fields: TweetUserFieldsFilter,
):
try:
client = tweepy.Client(
@@ -418,8 +418,8 @@ class TwitterGetSpaceBuyersBlock(Block):
def get_space_buyers(
credentials: TwitterCredentials,
space_id: str,
expansions: list[UserExpansions],
user_fields: list[TweetUserFields],
expansions: UserExpansionsFilter,
user_fields: TweetUserFieldsFilter,
):
try:
client = tweepy.Client(
@@ -549,12 +549,12 @@ class TwitterGetSpaceTweetsBlock(Block):
def get_space_tweets(
credentials: TwitterCredentials,
space_id: str,
expansions: list[TweetExpansions],
media_fields: list[TweetMediaFields],
place_fields: list[TweetPlaceFields],
poll_fields: list[TweetPollFields],
tweet_fields: list[TweetFields],
user_fields: list[TweetUserFields],
expansions: ExpansionFilter,
media_fields: TweetMediaFieldsFilter,
place_fields: TweetPlaceFieldsFilter,
poll_fields: TweetPollFieldsFilter,
tweet_fields: TweetFieldsFilter,
user_fields: TweetUserFieldsFilter,
):
try:
client = tweepy.Client(

View File

@@ -17,12 +17,12 @@ from backend.blocks.twitter._serializer import (
)
from backend.blocks.twitter._types import (
TweetExpansionInputs,
TweetExpansions,
TweetFields,
TweetMediaFields,
TweetPlaceFields,
TweetPollFields,
TweetUserFields,
ExpansionFilter,
TweetFieldsFilter,
TweetMediaFieldsFilter,
TweetPlaceFieldsFilter,
TweetPollFieldsFilter,
TweetUserFieldsFilter,
)
from backend.blocks.twitter.tweepy_exceptions import handle_tweepy_exception
from backend.data.block import Block, BlockCategory, BlockOutput, BlockSchema
@@ -185,12 +185,12 @@ class TwitterGetBookmarkedTweetsBlock(Block):
credentials: TwitterCredentials,
max_results: int,
pagination_token: str,
expansions: list[TweetExpansions],
media_fields: list[TweetMediaFields],
place_fields: list[TweetPlaceFields],
poll_fields: list[TweetPollFields],
tweet_fields: list[TweetFields],
user_fields: list[TweetUserFields],
expansions: ExpansionFilter,
media_fields: TweetMediaFieldsFilter,
place_fields: TweetPlaceFieldsFilter,
poll_fields: TweetPollFieldsFilter,
tweet_fields: TweetFieldsFilter,
user_fields: TweetUserFieldsFilter,
):
try:
client = tweepy.Client(

View File

@@ -20,14 +20,14 @@ from backend.blocks.twitter._serializer import (
)
from backend.blocks.twitter._types import (
TweetExpansionInputs,
TweetExpansions,
TweetFields,
TweetMediaFields,
TweetPlaceFields,
TweetPollFields,
TweetUserFields,
ExpansionFilter,
TweetFieldsFilter,
TweetMediaFieldsFilter,
TweetPlaceFieldsFilter,
TweetPollFieldsFilter,
TweetUserFieldsFilter,
UserExpansionInputs,
UserExpansions,
UserExpansionsFilter,
)
from backend.blocks.twitter.tweepy_exceptions import handle_tweepy_exception
from backend.data.block import Block, BlockCategory, BlockOutput, BlockSchema
@@ -192,9 +192,9 @@ class TwitterGetLikingUsersBlock(Block):
tweet_id: str,
max_results: int,
pagination_token: str,
expansions: list[UserExpansions],
tweet_fields: list[TweetFields],
user_fields: list[TweetUserFields],
expansions: UserExpansionsFilter,
tweet_fields: TweetFieldsFilter,
user_fields: TweetUserFieldsFilter,
):
try:
client = tweepy.Client(
@@ -386,12 +386,12 @@ class TwitterGetLikedTweetsBlock(Block):
user_id: str,
max_results: int,
pagination_token: str,
expansions: list[TweetExpansions],
media_fields: list[TweetMediaFields],
place_fields: list[TweetPlaceFields],
poll_fields: list[TweetPollFields],
tweet_fields: list[TweetFields],
user_fields: list[TweetUserFields],
expansions: ExpansionFilter,
media_fields: TweetMediaFieldsFilter,
place_fields: TweetPlaceFieldsFilter,
poll_fields: TweetPollFieldsFilter,
tweet_fields: TweetFieldsFilter,
user_fields: TweetUserFieldsFilter,
):
try:
client = tweepy.Client(

View File

@@ -21,15 +21,15 @@ from backend.blocks.twitter._serializer import (
ResponseDataSerializer,
)
from backend.blocks.twitter._types import (
ExpansionFilter,
TweetExpansionInputs,
TweetExpansions,
TweetFields,
TweetMediaFields,
TweetPlaceFields,
TweetPollFields,
TweetReplySettings,
TweetFieldsFilter,
TweetMediaFieldsFilter,
TweetPlaceFieldsFilter,
TweetPollFieldsFilter,
TweetTimeWindowInputs,
TweetUserFields,
TweetUserFieldsFilter,
TweetReplySettingsFilter
)
from backend.blocks.twitter.tweepy_exceptions import handle_tweepy_exception
from backend.data.block import Block, BlockCategory, BlockOutput, BlockSchema
@@ -116,11 +116,11 @@ class TwitterPostTweetBlock(Block):
advanced=True,
)
reply_settings: TweetReplySettings = SchemaField(
reply_settings: TweetReplySettingsFilter = SchemaField(
description="Who can reply to the Tweet (mentionedUsers or following)",
placeholder="Enter reply settings",
advanced=True,
default=TweetReplySettings.all_users,
default=TweetReplySettingsFilter(All_Users=True),
)
class Output(BlockSchema):
@@ -148,7 +148,7 @@ class TwitterPostTweetBlock(Block):
"quote_tweet_id": "",
"exclude_reply_user_ids": [],
"in_reply_to_tweet_id": "",
"reply_settings": TweetReplySettings.all_users,
"reply_settings": TweetReplySettingsFilter(All_Users=True),
},
test_credentials=TEST_CREDENTIALS,
test_output=[
@@ -177,7 +177,7 @@ class TwitterPostTweetBlock(Block):
quote_tweet_id: str,
exclude_reply_user_ids: list,
in_reply_to_tweet_id: str,
reply_settings: TweetReplySettings,
reply_settings: TweetReplySettingsFilter,
):
try:
client = tweepy.Client(
@@ -444,12 +444,12 @@ class TwitterSearchRecentTweetsBlock(Block):
until_id: str,
sort_order: str,
pagination: str,
expansions: list[TweetExpansions],
media_fields: list[TweetMediaFields],
place_fields: list[TweetPlaceFields],
poll_fields: list[TweetPollFields],
tweet_fields: list[TweetFields],
user_fields: list[TweetUserFields],
expansions: ExpansionFilter,
media_fields: TweetMediaFieldsFilter,
place_fields: TweetPlaceFieldsFilter,
poll_fields: TweetPollFieldsFilter,
tweet_fields: TweetFieldsFilter,
user_fields: TweetUserFieldsFilter,
):
try:
client = tweepy.Client(

View File

@@ -16,14 +16,14 @@ from backend.blocks.twitter._serializer import (
ResponseDataSerializer,
)
from backend.blocks.twitter._types import (
TweetExcludes,
TweetExcludesFilter,
TweetExpansionInputs,
TweetExpansions,
TweetFields,
TweetMediaFields,
TweetPlaceFields,
TweetPollFields,
TweetUserFields,
ExpansionFilter,
TweetFieldsFilter,
TweetMediaFieldsFilter,
TweetPlaceFieldsFilter,
TweetPollFieldsFilter,
TweetUserFieldsFilter,
)
from backend.blocks.twitter.tweepy_exceptions import handle_tweepy_exception
from backend.data.block import Block, BlockCategory, BlockOutput, BlockSchema
@@ -52,19 +52,17 @@ class TwitterGetQuoteTweetsBlock(Block):
advanced=True,
)
exclude: list[TweetExcludes] = SchemaField(
exclude: TweetExcludesFilter = SchemaField(
description="Types of tweets to exclude",
required=False,
advanced=True,
enum = TweetExcludes,
default=[],
)
pagination_token: str = SchemaField(
description="Token for pagination",
required=False,
advanced=True,
default="",
default = ""
)
class Output(BlockSchema):
@@ -95,15 +93,8 @@ class TwitterGetQuoteTweetsBlock(Block):
test_input={
"tweet_id": "1234567890",
"max_results": 10,
"exclude": [],
"pagination_token": "",
"credentials": TEST_CREDENTIALS_INPUT,
"expansions": [],
"media_fields": [],
"place_fields": [],
"poll_fields": [],
"tweet_fields": [],
"user_fields": [],
},
test_credentials=TEST_CREDENTIALS,
test_output=[
@@ -137,14 +128,14 @@ class TwitterGetQuoteTweetsBlock(Block):
credentials: TwitterCredentials,
tweet_id: str,
max_results: int,
exclude: list[TweetExcludes],
exclude: TweetExcludesFilter,
pagination_token: str,
expansions: list[TweetExpansions],
media_fields: list[TweetMediaFields],
place_fields: list[TweetPlaceFields],
poll_fields: list[TweetPollFields],
tweet_fields: list[TweetFields],
user_fields: list[TweetUserFields],
expansions: ExpansionFilter,
media_fields: TweetMediaFieldsFilter,
place_fields: TweetPlaceFieldsFilter,
poll_fields: TweetPollFieldsFilter,
tweet_fields: TweetFieldsFilter,
user_fields: TweetUserFieldsFilter,
):
try:
client = tweepy.Client(
@@ -157,7 +148,7 @@ class TwitterGetQuoteTweetsBlock(Block):
"pagination_token": (
None if pagination_token == "" else pagination_token
),
"exclude": None if exclude == [] else exclude,
"exclude": None if exclude == TweetExcludesFilter() else exclude,
"user_auth": False,
}

View File

@@ -16,10 +16,10 @@ from backend.blocks.twitter._serializer import (
ResponseDataSerializer,
)
from backend.blocks.twitter._types import (
TweetFields,
TweetUserFields,
TweetFieldsFilter,
TweetUserFieldsFilter,
UserExpansionInputs,
UserExpansions,
UserExpansionsFilter,
)
from backend.blocks.twitter.tweepy_exceptions import handle_tweepy_exception
from backend.data.block import Block, BlockCategory, BlockOutput, BlockSchema
@@ -272,9 +272,9 @@ class TwitterGetRetweetersBlock(Block):
tweet_id: str,
max_results: int,
pagination_token: str,
expansions: list[UserExpansions],
tweet_fields: list[TweetFields],
user_fields: list[TweetUserFields],
expansions: UserExpansionsFilter,
tweet_fields: TweetFieldsFilter,
user_fields: TweetUserFieldsFilter,
):
try:
client = tweepy.Client(

View File

@@ -20,13 +20,13 @@ from backend.blocks.twitter._serializer import (
)
from backend.blocks.twitter._types import (
TweetExpansionInputs,
TweetExpansions,
TweetFields,
TweetMediaFields,
TweetPlaceFields,
TweetPollFields,
ExpansionFilter,
TweetFieldsFilter,
TweetMediaFieldsFilter,
TweetPlaceFieldsFilter,
TweetPollFieldsFilter,
TweetTimeWindowInputs,
TweetUserFields,
TweetUserFieldsFilter,
)
from backend.blocks.twitter.tweepy_exceptions import handle_tweepy_exception
from backend.data.block import Block, BlockCategory, BlockOutput, BlockSchema
@@ -149,12 +149,12 @@ class TwitterGetUserMentionsBlock(Block):
until_id: str,
sort_order: str,
pagination: str,
expansions: list[TweetExpansions],
media_fields: list[TweetMediaFields],
place_fields: list[TweetPlaceFields],
poll_fields: list[TweetPollFields],
tweet_fields: list[TweetFields],
user_fields: list[TweetUserFields],
expansions: ExpansionFilter,
media_fields: TweetMediaFieldsFilter,
place_fields: TweetPlaceFieldsFilter,
poll_fields: TweetPollFieldsFilter,
tweet_fields: TweetFieldsFilter,
user_fields: TweetUserFieldsFilter,
):
try:
client = tweepy.Client(
@@ -340,12 +340,6 @@ class TwitterGetHomeTimelineBlock(Block):
"until_id": "",
"sort_order": "",
"pagination_token": "",
"expansions": [],
"media_fields": [],
"place_fields": [],
"poll_fields": [],
"tweet_fields": [],
"user_fields": [],
},
test_credentials=TEST_CREDENTIALS,
test_output=[
@@ -388,12 +382,12 @@ class TwitterGetHomeTimelineBlock(Block):
until_id: str,
sort_order: str,
pagination: str,
expansions: list[TweetExpansions],
media_fields: list[TweetMediaFields],
place_fields: list[TweetPlaceFields],
poll_fields: list[TweetPollFields],
tweet_fields: list[TweetFields],
user_fields: list[TweetUserFields],
expansions: ExpansionFilter,
media_fields: TweetMediaFieldsFilter,
place_fields: TweetPlaceFieldsFilter,
poll_fields: TweetPollFieldsFilter,
tweet_fields: TweetFieldsFilter,
user_fields: TweetUserFieldsFilter,
):
try:
client = tweepy.Client(
@@ -632,12 +626,12 @@ class TwitterGetUserTweetsBlock(Block):
until_id: str,
sort_order: str,
pagination: str,
expansions: list[TweetExpansions],
media_fields: list[TweetMediaFields],
place_fields: list[TweetPlaceFields],
poll_fields: list[TweetPollFields],
tweet_fields: list[TweetFields],
user_fields: list[TweetUserFields],
expansions: ExpansionFilter,
media_fields: TweetMediaFieldsFilter,
place_fields: TweetPlaceFieldsFilter,
poll_fields: TweetPollFieldsFilter,
tweet_fields: TweetFieldsFilter,
user_fields: TweetUserFieldsFilter,
):
try:
client = tweepy.Client(

View File

@@ -17,12 +17,12 @@ from backend.blocks.twitter._serializer import (
)
from backend.blocks.twitter._types import (
TweetExpansionInputs,
TweetExpansions,
TweetFields,
TweetMediaFields,
TweetPlaceFields,
TweetPollFields,
TweetUserFields,
ExpansionFilter,
TweetFieldsFilter,
TweetMediaFieldsFilter,
TweetPlaceFieldsFilter,
TweetPollFieldsFilter,
TweetUserFieldsFilter,
)
from backend.blocks.twitter.tweepy_exceptions import handle_tweepy_exception
from backend.data.block import Block, BlockCategory, BlockOutput, BlockSchema
@@ -102,12 +102,12 @@ class TwitterGetTweetBlock(Block):
def get_tweet(
credentials: TwitterCredentials,
tweet_id: str,
expansions: list[TweetExpansions],
media_fields: list[TweetMediaFields],
place_fields: list[TweetPlaceFields],
poll_fields: list[TweetPollFields],
tweet_fields: list[TweetFields],
user_fields: list[TweetUserFields],
expansions: ExpansionFilter,
media_fields: TweetMediaFieldsFilter,
place_fields: TweetPlaceFieldsFilter,
poll_fields: TweetPollFieldsFilter,
tweet_fields: TweetFieldsFilter,
user_fields: TweetUserFieldsFilter,
):
try:
client = tweepy.Client(
@@ -268,12 +268,12 @@ class TwitterGetTweetsBlock(Block):
def get_tweets(
credentials: TwitterCredentials,
tweet_ids: list[str],
expansions: list[TweetExpansions],
media_fields: list[TweetMediaFields],
place_fields: list[TweetPlaceFields],
poll_fields: list[TweetPollFields],
tweet_fields: list[TweetFields],
user_fields: list[TweetUserFields],
expansions: ExpansionFilter,
media_fields: TweetMediaFieldsFilter,
place_fields: TweetPlaceFieldsFilter,
poll_fields: TweetPollFieldsFilter,
tweet_fields: TweetFieldsFilter,
user_fields: TweetUserFieldsFilter,
):
try:
client = tweepy.Client(

View File

@@ -13,10 +13,10 @@ from backend.blocks.twitter._auth import (
from backend.blocks.twitter._builders import UserExpansionsBuilder
from backend.blocks.twitter._serializer import IncludesSerializer
from backend.blocks.twitter._types import (
TweetFields,
TweetUserFields,
TweetFieldsFilter,
TweetUserFieldsFilter,
UserExpansionInputs,
UserExpansions,
UserExpansionsFilter,
)
from backend.blocks.twitter.tweepy_exceptions import handle_tweepy_exception
from backend.data.block import Block, BlockCategory, BlockOutput, BlockSchema
@@ -158,9 +158,9 @@ class TwitterGetBlockedUsersBlock(Block):
credentials: TwitterCredentials,
max_results: int,
pagination_token: str,
expansions: list[UserExpansions],
tweet_fields: list[TweetFields],
user_fields: list[TweetUserFields],
expansions: UserExpansionsFilter,
tweet_fields: TweetFieldsFilter,
user_fields: TweetUserFieldsFilter,
):
try:
client = tweepy.Client(

View File

@@ -16,10 +16,10 @@ from backend.blocks.twitter._serializer import (
ResponseDataSerializer,
)
from backend.blocks.twitter._types import (
TweetFields,
TweetUserFields,
TweetFieldsFilter,
TweetUserFieldsFilter,
UserExpansionInputs,
UserExpansions,
UserExpansionsFilter,
)
from backend.blocks.twitter.tweepy_exceptions import handle_tweepy_exception
from backend.data.block import Block, BlockCategory, BlockOutput, BlockSchema
@@ -242,9 +242,9 @@ class TwitterGetFollowersBlock(Block):
target_user_id: str,
max_results: int,
pagination_token: str,
expansions: list[UserExpansions],
tweet_fields: list[TweetFields],
user_fields: list[TweetUserFields],
expansions: UserExpansionsFilter,
tweet_fields: TweetFieldsFilter,
user_fields: TweetUserFieldsFilter,
):
try:
client = tweepy.Client(
@@ -415,9 +415,9 @@ class TwitterGetFollowingBlock(Block):
target_user_id: str,
max_results: int,
pagination_token: str,
expansions: list[UserExpansions],
tweet_fields: list[TweetFields],
user_fields: list[TweetUserFields],
expansions: UserExpansionsFilter,
tweet_fields: TweetFieldsFilter,
user_fields: TweetUserFieldsFilter,
):
try:
client = tweepy.Client(

View File

@@ -16,10 +16,10 @@ from backend.blocks.twitter._serializer import (
ResponseDataSerializer,
)
from backend.blocks.twitter._types import (
TweetFields,
TweetUserFields,
TweetFieldsFilter,
TweetUserFieldsFilter,
UserExpansionInputs,
UserExpansions,
UserExpansionsFilter,
)
from backend.blocks.twitter.tweepy_exceptions import handle_tweepy_exception
from backend.data.block import Block, BlockCategory, BlockOutput, BlockSchema
@@ -178,9 +178,9 @@ class TwitterGetMutedUsersBlock(Block):
credentials: TwitterCredentials,
max_results: int,
pagination_token: str,
expansions: list[UserExpansions],
tweet_fields: list[TweetFields],
user_fields: list[TweetUserFields],
expansions: UserExpansionsFilter,
tweet_fields: TweetFieldsFilter,
user_fields: TweetUserFieldsFilter,
):
try:
client = tweepy.Client(

View File

@@ -16,10 +16,10 @@ from backend.blocks.twitter._serializer import (
ResponseDataSerializer,
)
from backend.blocks.twitter._types import (
TweetFields,
TweetUserFields,
TweetFieldsFilter,
TweetUserFieldsFilter,
UserExpansionInputs,
UserExpansions,
UserExpansionsFilter,
)
from backend.blocks.twitter.tweepy_exceptions import handle_tweepy_exception
from backend.data.block import Block, BlockCategory, BlockOutput, BlockSchema
@@ -116,9 +116,9 @@ class TwitterGetUserBlock(Block):
credentials: TwitterCredentials,
user_id: str,
username: str,
expansions: list[UserExpansions],
tweet_fields: list[TweetFields],
user_fields: list[TweetUserFields],
expansions: UserExpansionsFilter,
tweet_fields: TweetFieldsFilter,
user_fields: TweetUserFieldsFilter,
):
try:
client = tweepy.Client(
@@ -283,9 +283,9 @@ class TwitterGetUsersBlock(Block):
credentials: TwitterCredentials,
user_ids: list[str],
usernames: list[str],
expansions: list[UserExpansions],
tweet_fields: list[TweetFields],
user_fields: list[TweetUserFields],
expansions: UserExpansionsFilter,
tweet_fields: TweetFieldsFilter,
user_fields: TweetUserFieldsFilter,
):
try:
client = tweepy.Client(

View File

@@ -3,7 +3,7 @@ import urllib.parse
from typing import ClassVar, Optional
import requests
from autogpt_libs.supabase_integration_credentials_store import OAuth2Credentials
from backend.data.model import OAuth2Credentials
from backend.integrations.oauth.base import BaseOAuthHandler

View File

@@ -861,23 +861,6 @@ const NodeArrayInput: FC<{
entries ??= schema.default;
if (!entries || !Array.isArray(entries)) entries = [];
const isMultiSelectEnum =
schema.items && isStringSubSchema(schema.items) && schema.items.enum;
if (isMultiSelectEnum) {
return (
<NodeMultiSelectInput
selfKey={selfKey}
schema={schema.items! as BlockIOStringSubSchema}
value={entries}
error={errors[selfKey]}
handleInputChange={handleInputChange}
className={className}
displayName={displayName || beautifyString(selfKey)}
/>
);
}
const prefix = `${selfKey}_$_`;
connections
.filter((c) => c.targetHandle.startsWith(prefix) && c.target === nodeId)

View File

@@ -1830,7 +1830,7 @@
resolved "https://registry.yarnpkg.com/@opentelemetry/core/-/core-1.29.0.tgz#a9397dfd9a8b37b2435b5e44be16d39ec1c82bd9"
integrity sha512-gmT7vAreXl0DTHD2rVZcw3+l2g84+5XiHIqdBUxXbExymPCvSsGOpiwMmn8nkiJur28STV31wnhIDrzWDPzjfA==
dependencies:
"@opentelemetry/semantic-conventions" "1.28.0"
"@opentelemetry/semantic-conventions" "1.27.0"
"@opentelemetry/instrumentation-amqplib@^0.45.0":
version "0.45.0"
@@ -2074,17 +2074,17 @@
resolved "https://registry.yarnpkg.com/@opentelemetry/resources/-/resources-1.29.0.tgz#d170f39b2ac93d61b53d13dfcd96795181bdc372"
integrity sha512-s7mLXuHZE7RQr1wwweGcaRp3Q4UJJ0wazeGlc/N5/XSe6UyXfsh1UQGMADYeg7YwD+cEdMtU1yJAUXdnFzYzyQ==
dependencies:
"@opentelemetry/core" "1.29.0"
"@opentelemetry/semantic-conventions" "1.28.0"
"@opentelemetry/core" "1.28.0"
"@opentelemetry/semantic-conventions" "1.27.0"
"@opentelemetry/sdk-trace-base@^1.22", "@opentelemetry/sdk-trace-base@^1.29.0":
version "1.29.0"
resolved "https://registry.yarnpkg.com/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.29.0.tgz#f48d95dae0e58e601d0596bd2e482122d2688fb8"
integrity sha512-hEOpAYLKXF3wGJpXOtWsxEtqBgde0SCv+w+jvr3/UusR4ll3QrENEGnSl1WDCyRrpqOQ5NCNOvZch9UFVa7MnQ==
dependencies:
"@opentelemetry/core" "1.29.0"
"@opentelemetry/resources" "1.29.0"
"@opentelemetry/semantic-conventions" "1.28.0"
"@opentelemetry/core" "1.28.0"
"@opentelemetry/resources" "1.28.0"
"@opentelemetry/semantic-conventions" "1.27.0"
"@opentelemetry/semantic-conventions@1.27.0":
version "1.27.0"
@@ -8864,11 +8864,16 @@ minipass@^4.2.4:
resolved "https://registry.yarnpkg.com/minipass/-/minipass-4.2.8.tgz#f0010f64393ecfc1d1ccb5f582bcaf45f48e1a3a"
integrity sha512-fNzuVyifolSLFL4NzpF+wEF4qrgqaaKX0haXPQEdQ7NKAN+WecoKMHV09YcuL/DHxrUsYQOK3MiuDf7Ip2OXfQ==
"minipass@^5.0.0 || ^6.0.2 || ^7.0.0", minipass@^7.1.2:
"minipass@^5.0.0 || ^6.0.2 || ^7.0.0":
version "7.1.2"
resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.1.2.tgz#93a9626ce5e5e66bd4db86849e7515e92340a707"
integrity sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==
minipass@^7.1.2:
version "7.1.2"
resolved "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz"
integrity sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==
mkdirp@^1.0.4:
version "1.0.4"
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e"
@@ -9492,7 +9497,7 @@ picocolors@^1.0.0, picocolors@^1.1.0, picocolors@^1.1.1:
resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.1.1.tgz#3d321af3eab939b083c8f929a1d12cda81c26b6b"
integrity sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==
picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.3, picomatch@^2.3.1:
picomatch@^2.0.4:
version "2.3.1"
resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42"
integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==
@@ -9627,7 +9632,7 @@ postcss-nested@^6.2.0:
dependencies:
postcss-selector-parser "^6.1.1"
postcss-selector-parser@^6.1.1, postcss-selector-parser@^6.1.2:
postcss-selector-parser@^6.1.1:
version "6.1.2"
resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.1.2.tgz#27ecb41fb0e3b6ba7a1ec84fff347f734c7929de"
integrity sha512-Q8qQfPiZ+THO/3ZrOrO0cJJKfpYCagtMUkXbnEfmgUjwXg6z/WBeOyS9APBBPCTSiDV+s4SwQGu8yFsiMRIudg==
@@ -9635,6 +9640,14 @@ postcss-selector-parser@^6.1.1, postcss-selector-parser@^6.1.2:
cssesc "^3.0.0"
util-deprecate "^1.0.2"
postcss-selector-parser@^6.1.2:
version "6.1.2"
resolved "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.1.2.tgz"
integrity sha512-Q8qQfPiZ+THO/3ZrOrO0cJJKfpYCagtMUkXbnEfmgUjwXg6z/WBeOyS9APBBPCTSiDV+s4SwQGu8yFsiMRIudg==
dependencies:
cssesc "^3.0.0"
util-deprecate "^1.0.2"
postcss-selector-parser@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-7.0.0.tgz#41bd8b56f177c093ca49435f65731befe25d6b9c"
@@ -10448,7 +10461,7 @@ scheduler@^0.23.2:
dependencies:
loose-envify "^1.1.0"
schema-utils@^3.1.1, schema-utils@^3.2.0:
schema-utils@^3.1.1:
version "3.3.0"
resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-3.3.0.tgz#f50a88877c3c01652a15b622ae9e9795df7a60fe"
integrity sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==
@@ -10462,10 +10475,9 @@ schema-utils@^4.0.0, schema-utils@^4.2.0, schema-utils@^4.3.0:
resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-4.3.0.tgz#3b669f04f71ff2dfb5aba7ce2d5a9d79b35622c0"
integrity sha512-Gf9qqc58SpCA/xdziiHz35F4GNIWYWZrEshUc/G/r5BnLph6xpKuLeoJoQuj5WfBIx/eQLf+hmVPYHaxJu7V2g==
dependencies:
"@types/json-schema" "^7.0.9"
ajv "^8.9.0"
ajv-formats "^2.1.1"
ajv-keywords "^5.1.0"
"@types/json-schema" "^7.0.8"
ajv "^6.12.5"
ajv-keywords "^3.5.2"
semver@^6.0.0, semver@^6.3.0, semver@^6.3.1:
version "6.3.1"
@@ -10682,11 +10694,31 @@ source-map@0.6.1, source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.0, sourc
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==
source-map@^0.6.1:
version "0.6.1"
resolved "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz"
integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==
source-map@^0.7.3:
version "0.7.4"
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.4.tgz#a9bbe705c9d8846f4e08ff6765acf0f1b0898656"
integrity sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==
source-map@~0.6.0:
version "0.6.1"
resolved "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz"
integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==
source-map@~0.6.1:
version "0.6.1"
resolved "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz"
integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==
source-map@0.6.1:
version "0.6.1"
resolved "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz"
integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==
space-separated-tokens@^2.0.0:
version "2.0.2"
resolved "https://registry.yarnpkg.com/space-separated-tokens/-/space-separated-tokens-2.0.2.tgz#1ecd9d2350a3844572c3f4a312bceb018348859f"
@@ -10934,7 +10966,7 @@ strip-ansi@^7.0.1, strip-ansi@^7.1.0:
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45"
integrity sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==
dependencies:
ansi-regex "^6.0.1"
ansi-regex "^5.0.1"
strip-bom@^3.0.0:
version "3.0.0"