1
Fork 0
mirror of https://github.com/thegeneralist01/twitter-openapi synced 2026-01-12 08:00:27 +01:00

add TimelineAddToModule, TimelineReplaceEntry and TimelineShowAlert

This commit is contained in:
Erika 2023-07-07 20:26:02 +01:00
parent 3dbdd17fbb
commit 075002d350
3 changed files with 229 additions and 0 deletions

View file

@ -9,15 +9,21 @@ components:
InstructionUnion:
oneOf:
- $ref: "#/components/schemas/TimelineAddEntries"
- $ref: "#/components/schemas/TimelineAddToModule"
- $ref: "#/components/schemas/TimelineClearCache"
- $ref: "#/components/schemas/TimelinePinEntry"
- $ref: "#/components/schemas/TimelineReplaceEntry"
- $ref: "#/components/schemas/TimelineShowAlert"
- $ref: "#/components/schemas/TimelineTerminateTimeline"
discriminator:
propertyName: type
mapping": # deprecated
TimelineAddEntries: "#/components/schemas/TimelineAddEntries"
TimelineAddToModule: "#/components/schemas/TimelineAddToModule"
TimelineClearCache: "#/components/schemas/TimelineClearCache"
TimelinePinEntry: "#/components/schemas/TimelinePinEntry"
TimelineReplaceEntry: "#/components/schemas/TimelineReplaceEntry"
TimelineShowAlert: "#/components/schemas/TimelineShowAlert"
TimelineTerminateTimeline: "#/components/schemas/TimelineTerminateTimeline"
InstructionType:
@ -25,8 +31,11 @@ components:
enum:
[
TimelineAddEntries,
TimelineAddToModule,
TimelineClearCache,
TimelinePinEntry,
TimelineReplaceEntry,
TimelineShowAlert,
TimelineTerminateTimeline,
]
@ -43,6 +52,24 @@ components:
items:
$ref: "#/components/schemas/TimelineAddEntry"
TimelineAddToModule:
required:
- type
- moduleItems
- moduleEntryId
properties:
type:
type: string
$ref: "#/components/schemas/InstructionType" # TimelineAddToModule
moduleItems:
type: array
items:
$ref: "./content.yaml#/components/schemas/ModuleItem"
moduleEntryId:
type: string
prepend:
type: boolean
TimelineClearCache:
required:
- type
@ -62,6 +89,56 @@ components:
entry:
$ref: "#/components/schemas/TimelineAddEntry"
TimelineReplaceEntry:
required:
- type
- entry_id_to_replace
- entry
properties:
type:
type: string
$ref: "#/components/schemas/InstructionType" # TimelineReplaceEntry
entry_id_to_replace:
type: string
entry:
type: object
$ref: "#/components/schemas/TimelineAddEntry"
TimelineShowAlert:
required:
- type
- usersResults
- richText
properties:
type:
type: string
$ref: "#/components/schemas/InstructionType" # TimelineShowAlert
alertType:
type: string
enum: [NewTweets] # which else?
triggerDelayMs:
type: integer
displayDurationMs:
type: integer
usersResults:
type: array
items:
$ref: "./user.yaml#/components/schemas/UserResults"
richText:
type: object
properties:
text:
type: string
entities:
type: array
iconDisplayInfo:
type: object # todo
colorConfig:
type: object # todo
displayLocation:
type: string
enum: [Top] # which else?
TimelineTerminateTimeline:
required:
- type