diff --git a/.vscode/launch.json b/.vscode/launch.json index 8803a22..15a4bcc 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -28,7 +28,7 @@ "env": { "ERROR_UNCATCHED": "True", "STRICT_MODE": "True", - "MULTI_THREAD": "False" + "MULTI_THREAD": "True" } } ] diff --git a/src/openapi/schemas/content.yaml b/src/openapi/schemas/content.yaml index edc31f5..9efe424 100644 --- a/src/openapi/schemas/content.yaml +++ b/src/openapi/schemas/content.yaml @@ -77,6 +77,8 @@ components: metadata: type: object additionalProperties: true # todo + feedbackInfo: + $ref: "#/components/schemas/FeedbackInfo" TimelineTimelineCursor: required: @@ -131,6 +133,15 @@ components: itemContent: $ref: "#/components/schemas/ItemContentUnion" + FeedbackInfo: + required: + - "feedbackType" + properties: + feedbackKeys: + type: array + items: + type: string + # ================= ContentItem ================= ItemContentUnion: @@ -218,7 +229,7 @@ components: properties: contextType: type: string # enum - enum: ["Follow"] + enum: ["Follow", "Pin"] text: type: string type: diff --git a/src/openapi/schemas/tweet.yaml b/src/openapi/schemas/tweet.yaml index 4d84b53..9f55f00 100644 --- a/src/openapi/schemas/tweet.yaml +++ b/src/openapi/schemas/tweet.yaml @@ -32,6 +32,85 @@ components: limitedActionResults: type: object additionalProperties: true # todo + tweetInterstitial: + $ref: "#/components/schemas/TweetInterstitial" + + # {'__typename': 'ContextualTweetInterstitial', 'displayType': 'NonCompliant', 'text': {'rtl': False, 'text': 'This Post violated the X Rules. However, X has determined that it may be in the public’s interest for the Post to remain accessible. Learn more', 'entities': [{'fromIndex': 133, 'toIndex': 143, 'ref': {'type': 'TimelineUrl', 'url': 'https://help.twitter.com/rules-and-policies/public-interest', 'urlType': 'ExternalUrl'}}]}, 'revealText': {'rtl': False, 'text': 'View', 'entities': []}} + TweetInterstitial: + required: + - "__typename" + - "displayType" + - "text" + - "revealText" + properties: + __typename: + $ref: "./typename.yaml#/components/schemas/TypeName" # ContextualTweetInterstitial + displayType: + type: string + enum: [NonCompliant] + text: + $ref: "#/components/schemas/TweetInterstitialText" + revealText: + $ref: "#/components/schemas/TweetInterstitialRevealText" + + TweetInterstitialText: + required: + - "rtl" + - "text" + - "entities" + properties: + rtl: + type: boolean + text: + type: string + entities: + type: array + items: + $ref: "#/components/schemas/TweetInterstitialTextEntity" + + TweetInterstitialTextEntity: + required: + - "fromIndex" + - "toIndex" + - "ref" + properties: + fromIndex: + type: integer + toIndex: + type: integer + ref: + $ref: "#/components/schemas/TweetInterstitialTextEntityRef" + + TweetInterstitialTextEntityRef: + required: + - "type" + - "url" + - "urlType" + properties: + type: + type: string + enum: [TimelineUrl] + url: + type: string + format: uri + urlType: + type: string + enum: [ExternalUrl] + + TweetInterstitialRevealText: + required: + - "rtl" + - "text" + - "entities" + properties: + rtl: + type: boolean + text: + type: string + entities: + type: array + items: + $ref: "#/components/schemas/TweetInterstitialTextEntity" TweetTombstone: #remove tweet properties: @@ -557,6 +636,8 @@ components: iconType: type: string enum: [BirdwatchV1Icon] + callToAction: + $ref: "#/components/schemas/BirdwatchPivotCallToAction" BirdwatchPivotFooter: required: @@ -619,6 +700,21 @@ components: items: $ref: "#/components/schemas/BirdwatchEntity" + BirdwatchPivotCallToAction: + # {'prompt': 'Do you find this helpful?', 'title': 'Rate it', 'destinationUrl': 'https://twitter.com/i/birdwatch/n/1710821689636934115'} + required: + - "prompt" + - "title" + - "destinationUrl" + properties: + prompt: + type: string + title: + type: string + destinationUrl: + type: string + format: uri + TweetCard: properties: rest_id: @@ -833,6 +929,7 @@ components: - "limited_replies" - "community_tweet_non_member_public_community" - "non_compliant" + - "dynamic_product_ad" place: additionalProperties: true # todo diff --git a/src/openapi/schemas/typename.yaml b/src/openapi/schemas/typename.yaml index 78b66d3..c5a15c7 100644 --- a/src/openapi/schemas/typename.yaml +++ b/src/openapi/schemas/typename.yaml @@ -14,6 +14,7 @@ components: TimelineUser, TimelineTimelineCursor, TweetWithVisibilityResults, + ContextualTweetInterstitial, TimelineTimelineModule, TweetTombstone, TimelinePrompt, diff --git a/src/openapi/schemas/user.yaml b/src/openapi/schemas/user.yaml index d43d695..e2003b1 100644 --- a/src/openapi/schemas/user.yaml +++ b/src/openapi/schemas/user.yaml @@ -89,6 +89,8 @@ components: type: integer verification_info: $ref: "#/components/schemas/UserVerificationInfo" + is_profile_translatable: + type: boolean UserProfessional: required: @@ -133,8 +135,6 @@ components: UserVerificationInfo: required: - "is_identity_verified" - - "reason" - properties: is_identity_verified: type: boolean