From 2d3d1475abb45b97b6be98efa993ed6be11cf22f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=B5=E3=81=81?= Date: Mon, 30 Sep 2024 11:09:35 +0900 Subject: [PATCH] add ConversationControl MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: ふぁ --- dist/compatible/openapi-3.0.yaml | 34 +++++++++++++++++-- .../compatible_discriminator/openapi-3.0.yaml | 34 +++++++++++++++++-- dist/docs/openapi-3.0.yaml | 34 +++++++++++++++++-- src/config/placeholder.json | 26 ++++++++++++-- src/openapi/schemas/tweet.yaml | 10 +++++- 5 files changed, 129 insertions(+), 9 deletions(-) diff --git a/dist/compatible/openapi-3.0.yaml b/dist/compatible/openapi-3.0.yaml index db8955c..e004aab 100644 --- a/dist/compatible/openapi-3.0.yaml +++ b/dist/compatible/openapi-3.0.yaml @@ -522,6 +522,16 @@ components: - $ref: '#/components/schemas/TimelineTimelineItem' - $ref: '#/components/schemas/TimelineTimelineModule' - $ref: '#/components/schemas/TimelineTimelineCursor' + ConversationControl: + properties: + mode: + enum: + - Community + - Verified + - ByInvitation + type: string + required: + - mode CoverCta: properties: Text: @@ -2310,7 +2320,7 @@ components: bookmarked: type: boolean conversation_control: - additionalProperties: true + $ref: '#/components/schemas/ConversationControl' conversation_id_str: pattern: ^[0-9]+$ type: string @@ -4357,6 +4367,24 @@ paths: type: string variables: properties: + attachment_url: + default: https://x.com/elonmusk/status/1349129669258448897 + example: https://x.com/elonmusk/status/1349129669258448897 + type: string + conversation_control: + properties: + conversation_control: + properties: + mode: + default: Community + example: Community + type: string + required: + - mode + type: object + required: + - conversation_control + type: object dark_request: default: false example: false @@ -4375,7 +4403,9 @@ paths: type: string tagged_users: items: - type: object + default: '44196397' + example: '44196397' + type: string type: array required: - media_id diff --git a/dist/compatible_discriminator/openapi-3.0.yaml b/dist/compatible_discriminator/openapi-3.0.yaml index da44afe..6f54b5e 100644 --- a/dist/compatible_discriminator/openapi-3.0.yaml +++ b/dist/compatible_discriminator/openapi-3.0.yaml @@ -522,6 +522,16 @@ components: - $ref: '#/components/schemas/TimelineTimelineItem' - $ref: '#/components/schemas/TimelineTimelineModule' - $ref: '#/components/schemas/TimelineTimelineCursor' + ConversationControl: + properties: + mode: + enum: + - Community + - Verified + - ByInvitation + type: string + required: + - mode CoverCta: properties: Text: @@ -2310,7 +2320,7 @@ components: bookmarked: type: boolean conversation_control: - additionalProperties: true + $ref: '#/components/schemas/ConversationControl' conversation_id_str: pattern: ^[0-9]+$ type: string @@ -4351,6 +4361,24 @@ paths: type: string variables: properties: + attachment_url: + default: https://x.com/elonmusk/status/1349129669258448897 + example: https://x.com/elonmusk/status/1349129669258448897 + type: string + conversation_control: + properties: + conversation_control: + properties: + mode: + default: Community + example: Community + type: string + required: + - mode + type: object + required: + - conversation_control + type: object dark_request: default: false example: false @@ -4369,7 +4397,9 @@ paths: type: string tagged_users: items: - type: object + default: '44196397' + example: '44196397' + type: string type: array required: - media_id diff --git a/dist/docs/openapi-3.0.yaml b/dist/docs/openapi-3.0.yaml index 542c00a..799e822 100644 --- a/dist/docs/openapi-3.0.yaml +++ b/dist/docs/openapi-3.0.yaml @@ -522,6 +522,16 @@ components: - $ref: '#/components/schemas/TimelineTimelineItem' - $ref: '#/components/schemas/TimelineTimelineModule' - $ref: '#/components/schemas/TimelineTimelineCursor' + ConversationControl: + properties: + mode: + enum: + - Community + - Verified + - ByInvitation + type: string + required: + - mode CoverCta: properties: Text: @@ -2310,7 +2320,7 @@ components: bookmarked: type: boolean conversation_control: - additionalProperties: true + $ref: '#/components/schemas/ConversationControl' conversation_id_str: pattern: ^[0-9]+$ type: string @@ -4463,6 +4473,24 @@ paths: type: string variables: properties: + attachment_url: + default: https://x.com/elonmusk/status/1349129669258448897 + example: https://x.com/elonmusk/status/1349129669258448897 + type: string + conversation_control: + properties: + conversation_control: + properties: + mode: + default: Community + example: Community + type: string + required: + - mode + type: object + required: + - conversation_control + type: object dark_request: default: false example: false @@ -4481,7 +4509,9 @@ paths: type: string tagged_users: items: - type: object + default: '44196397' + example: '44196397' + type: string type: array required: - media_id diff --git a/src/config/placeholder.json b/src/config/placeholder.json index 0d30da1..a3afda5 100644 --- a/src/config/placeholder.json +++ b/src/config/placeholder.json @@ -698,7 +698,7 @@ "media_entities": [ { "media_id": "1111111111111111111", - "tagged_users": [] + "tagged_users": ["44196397"] } ], "possibly_sensitive": false @@ -709,7 +709,13 @@ "exclude_reply_user_ids": [] }, "dark_request": false, - "disallowed_reply_options?": {} + "disallowed_reply_options?": {}, + "conversation_control?": { + "conversation_control": { + "mode": "Community" + } + }, + "attachment_url?": "https://x.com/elonmusk/status/1349129669258448897" }, "features": { "communities_web_enable_tweet_community_results_fetch": true, @@ -1046,5 +1052,21 @@ "features": { "responsive_web_graphql_timeline_navigation_enabled": true } + }, + "CreateDraftTweet": { + "queryId": "cH9HZWz_EW9gnswvA4ZRiQ", + "variables": { + "post_tweet_request": { + "attachment_url": "https://x.com/elonmusk/status/1349129669258448897", + "auto_populate_reply_metadata": false, + "status": "test", + "exclude_reply_user_ids": [], + "media_ids": [] + } + } + }, + "FetchDraftTweets": { + "queryId": "fMp3izG_gCZKVk3Aa1vVKw", + "ascending": false } } diff --git a/src/openapi/schemas/tweet.yaml b/src/openapi/schemas/tweet.yaml index 93f381a..ae69e65 100644 --- a/src/openapi/schemas/tweet.yaml +++ b/src/openapi/schemas/tweet.yaml @@ -932,7 +932,7 @@ components: type: string pattern: "^[0-9]+$" conversation_control: - additionalProperties: true # todo + $ref: "#/components/schemas/ConversationControl" limited_actions: type: string enum: @@ -1332,6 +1332,14 @@ components: type: string enum: [crop, fit] + ConversationControl: + required: + - "mode" + properties: + mode: + type: string + enum: [Community, Verified, ByInvitation] + Timestamp: required: - "indices"