mirror of
https://github.com/thegeneralist01/twitter-openapi
synced 2026-01-11 15:40:26 +01:00
wip add TimelineShowCover
Signed-off-by: ふぁ <yuki@yuki0311.com>
This commit is contained in:
parent
bc54262db6
commit
f8e4191936
2 changed files with 144 additions and 0 deletions
|
|
@ -219,3 +219,14 @@ components:
|
|||
__typename:
|
||||
$ref: "./typename.yaml#/components/schemas/TypeName" # TimelineMessagePrompt
|
||||
additionalProperties: true # todo
|
||||
|
||||
ClientEventInfo:
|
||||
required:
|
||||
- component
|
||||
- elemen
|
||||
properties:
|
||||
component:
|
||||
type: string # enum half_cover
|
||||
element:
|
||||
type: string
|
||||
pattern: "^(january|february|march|april|may|june|july|august|september|october|november|december)-[0-9]{4}-([a-z]-)+[a-z]+$" # august-2023-privacy-prompt-candidate
|
||||
|
|
|
|||
|
|
@ -15,6 +15,8 @@ components:
|
|||
- $ref: "#/components/schemas/TimelineReplaceEntry"
|
||||
- $ref: "#/components/schemas/TimelineShowAlert"
|
||||
- $ref: "#/components/schemas/TimelineTerminateTimeline"
|
||||
- $ref: "#/components/schemas/TimelineShowCover"
|
||||
|
||||
discriminator:
|
||||
propertyName: type
|
||||
mapping": # deprecated
|
||||
|
|
@ -25,6 +27,7 @@ components:
|
|||
TimelineReplaceEntry: "#/components/schemas/TimelineReplaceEntry"
|
||||
TimelineShowAlert: "#/components/schemas/TimelineShowAlert"
|
||||
TimelineTerminateTimeline: "#/components/schemas/TimelineTerminateTimeline"
|
||||
TimelineShowCover: "#/components/schemas/TimelineShowCover"
|
||||
|
||||
InstructionType:
|
||||
type: string
|
||||
|
|
@ -37,6 +40,7 @@ components:
|
|||
TimelineReplaceEntry,
|
||||
TimelineShowAlert,
|
||||
TimelineTerminateTimeline,
|
||||
TimelineShowCover,
|
||||
]
|
||||
|
||||
TimelineAddEntries:
|
||||
|
|
@ -162,3 +166,132 @@ components:
|
|||
sortIndex:
|
||||
type: string
|
||||
pattern: "[0-9]+$"
|
||||
|
||||
TimelineShowCover:
|
||||
required:
|
||||
- type
|
||||
- clientEventInfo
|
||||
- cover
|
||||
properties:
|
||||
type:
|
||||
$ref: "#/components/schemas/InstructionType" # TimelineShowCover
|
||||
clientEventInfo:
|
||||
$ref: "./content.yaml#/components/schemas/ClientEventInfo"
|
||||
cover:
|
||||
$ref: "#/components/schemas/TimelineHalfCover"
|
||||
|
||||
TimelineHalfCover:
|
||||
required:
|
||||
- type
|
||||
- halfCoverDisplayType
|
||||
- primaryText
|
||||
- primaryCoverCta
|
||||
- secondaryText
|
||||
- impressionCallbacks
|
||||
- dismissible
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
enum: [TimelineHalfCover]
|
||||
halfCoverDisplayType:
|
||||
type: string
|
||||
enum: [Cover]
|
||||
primaryText:
|
||||
$ref: "#/components/schemas/Text"
|
||||
secondaryText:
|
||||
$ref: "#/components/schemas/Text"
|
||||
primaryCoverCta:
|
||||
$ref: "#/components/schemas/CoverCta"
|
||||
impressionCallbacks:
|
||||
type: array
|
||||
items:
|
||||
$ref: "#/components/schemas/Callback"
|
||||
dismissible:
|
||||
type: boolean
|
||||
|
||||
Text:
|
||||
required:
|
||||
- text
|
||||
- entities
|
||||
properties:
|
||||
text:
|
||||
type: string
|
||||
entities:
|
||||
type: array
|
||||
items:
|
||||
$ref: "#/components/schemas/TextEntity"
|
||||
|
||||
TextEntity:
|
||||
required:
|
||||
- fromIndex
|
||||
- toIndex
|
||||
- ref
|
||||
properties:
|
||||
fromIndex:
|
||||
type: integer
|
||||
toIndex:
|
||||
type: integer
|
||||
ref:
|
||||
$ref: "#/components/schemas/TextEntityRef"
|
||||
|
||||
TextEntityRef:
|
||||
required:
|
||||
- type
|
||||
- url
|
||||
- urlType
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
enum: [TimelineUrl]
|
||||
url:
|
||||
type: string
|
||||
format: uri
|
||||
urlType:
|
||||
type: string
|
||||
enum: [ExternalUrl]
|
||||
|
||||
CoverCta:
|
||||
required:
|
||||
- text
|
||||
- ctaBehavior
|
||||
- callbacks
|
||||
- clientEventInfo
|
||||
- buttonStyle
|
||||
properties:
|
||||
Text:
|
||||
type: string
|
||||
ctaBehavior:
|
||||
$ref: "#/components/schemas/TimelineCoverBehavior"
|
||||
callbacks:
|
||||
type: array
|
||||
items:
|
||||
$ref: "#/components/schemas/Callback"
|
||||
clientEventInfo:
|
||||
$ref: "#/components/schemas/ClientEventInfo"
|
||||
buttonStyle:
|
||||
type: string
|
||||
enum: ["Primary"]
|
||||
|
||||
TimelineCoverBehavior:
|
||||
required:
|
||||
- type
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
enum: [TimelineCoverBehaviorDismiss]
|
||||
|
||||
Callback:
|
||||
required:
|
||||
- endpoint
|
||||
properties:
|
||||
endpoint:
|
||||
type: string
|
||||
# pattern: '^/1\.1/[a-z]+/[a-z]+\.json\?[a-z_]+=[a-z0-9-]+(&[a-z_]+=[a-z0-9-]+)+?$' #/1.1/onboarding/fatigue.json?{params}
|
||||
|
||||
ClientEventInfo:
|
||||
required:
|
||||
- action
|
||||
properties:
|
||||
action:
|
||||
type: string
|
||||
enum: [primary_cta]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue