1
Fork 0
mirror of https://github.com/thegeneralist01/twitter-openapi synced 2026-01-11 23:50:26 +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

@ -3,22 +3,31 @@ components:
InstructionType: InstructionType:
enum: enum:
- TimelineAddEntries - TimelineAddEntries
- TimelineAddToModule
- TimelineClearCache - TimelineClearCache
- TimelinePinEntry - TimelinePinEntry
- TimelineReplaceEntry
- TimelineShowAlert
- TimelineTerminateTimeline - TimelineTerminateTimeline
type: string type: string
InstructionUnion: InstructionUnion:
discriminator: discriminator:
mapping": mapping":
TimelineAddEntries: '#/components/schemas/TimelineAddEntries' TimelineAddEntries: '#/components/schemas/TimelineAddEntries'
TimelineAddToModule: '#/components/schemas/TimelineAddToModule'
TimelineClearCache: '#/components/schemas/TimelineClearCache' TimelineClearCache: '#/components/schemas/TimelineClearCache'
TimelinePinEntry: '#/components/schemas/TimelinePinEntry' TimelinePinEntry: '#/components/schemas/TimelinePinEntry'
TimelineReplaceEntry: '#/components/schemas/TimelineReplaceEntry'
TimelineShowAlert: '#/components/schemas/TimelineShowAlert'
TimelineTerminateTimeline: '#/components/schemas/TimelineTerminateTimeline' TimelineTerminateTimeline: '#/components/schemas/TimelineTerminateTimeline'
propertyName: type propertyName: type
oneOf: oneOf:
- $ref: '#/components/schemas/TimelineAddEntries' - $ref: '#/components/schemas/TimelineAddEntries'
- $ref: '#/components/schemas/TimelineAddToModule'
- $ref: '#/components/schemas/TimelineClearCache' - $ref: '#/components/schemas/TimelineClearCache'
- $ref: '#/components/schemas/TimelinePinEntry' - $ref: '#/components/schemas/TimelinePinEntry'
- $ref: '#/components/schemas/TimelineReplaceEntry'
- $ref: '#/components/schemas/TimelineShowAlert'
- $ref: '#/components/schemas/TimelineTerminateTimeline' - $ref: '#/components/schemas/TimelineTerminateTimeline'
TimelineAddEntries: TimelineAddEntries:
properties: properties:
@ -46,6 +55,23 @@ components:
- content - content
- entryId - entryId
- sortIndex - sortIndex
TimelineAddToModule:
properties:
moduleEntryId:
type: string
moduleItems:
items:
$ref: ./content.yaml#/components/schemas/ModuleItem
type: array
prepend:
type: boolean
type:
$ref: '#/components/schemas/InstructionType'
type: string
required:
- type
- moduleItems
- moduleEntryId
TimelineClearCache: TimelineClearCache:
properties: properties:
type: type:
@ -63,6 +89,56 @@ components:
required: required:
- type - type
- entry - entry
TimelineReplaceEntry:
properties:
entry:
$ref: '#/components/schemas/TimelineAddEntry'
type: object
entry_id_to_replace:
type: string
type:
$ref: '#/components/schemas/InstructionType'
type: string
required:
- type
- entry_id_to_replace
- entry
TimelineShowAlert:
properties:
alertType:
enum:
- NewTweets
type: string
colorConfig:
type: object
displayDurationMs:
type: integer
displayLocation:
enum:
- Top
type: string
iconDisplayInfo:
type: object
richText:
properties:
entities:
type: array
text:
type: string
type: object
triggerDelayMs:
type: integer
type:
$ref: '#/components/schemas/InstructionType'
type: string
usersResults:
items:
$ref: ./user.yaml#/components/schemas/UserResults
type: array
required:
- type
- usersResults
- richText
TimelineTerminateTimeline: TimelineTerminateTimeline:
properties: properties:
direction: direction:

View file

@ -3,22 +3,31 @@ components:
InstructionType: InstructionType:
enum: enum:
- TimelineAddEntries - TimelineAddEntries
- TimelineAddToModule
- TimelineClearCache - TimelineClearCache
- TimelinePinEntry - TimelinePinEntry
- TimelineReplaceEntry
- TimelineShowAlert
- TimelineTerminateTimeline - TimelineTerminateTimeline
type: string type: string
InstructionUnion: InstructionUnion:
discriminator: discriminator:
mapping": mapping":
TimelineAddEntries: '#/components/schemas/TimelineAddEntries' TimelineAddEntries: '#/components/schemas/TimelineAddEntries'
TimelineAddToModule: '#/components/schemas/TimelineAddToModule'
TimelineClearCache: '#/components/schemas/TimelineClearCache' TimelineClearCache: '#/components/schemas/TimelineClearCache'
TimelinePinEntry: '#/components/schemas/TimelinePinEntry' TimelinePinEntry: '#/components/schemas/TimelinePinEntry'
TimelineReplaceEntry: '#/components/schemas/TimelineReplaceEntry'
TimelineShowAlert: '#/components/schemas/TimelineShowAlert'
TimelineTerminateTimeline: '#/components/schemas/TimelineTerminateTimeline' TimelineTerminateTimeline: '#/components/schemas/TimelineTerminateTimeline'
propertyName: type propertyName: type
oneOf: oneOf:
- $ref: '#/components/schemas/TimelineAddEntries' - $ref: '#/components/schemas/TimelineAddEntries'
- $ref: '#/components/schemas/TimelineAddToModule'
- $ref: '#/components/schemas/TimelineClearCache' - $ref: '#/components/schemas/TimelineClearCache'
- $ref: '#/components/schemas/TimelinePinEntry' - $ref: '#/components/schemas/TimelinePinEntry'
- $ref: '#/components/schemas/TimelineReplaceEntry'
- $ref: '#/components/schemas/TimelineShowAlert'
- $ref: '#/components/schemas/TimelineTerminateTimeline' - $ref: '#/components/schemas/TimelineTerminateTimeline'
TimelineAddEntries: TimelineAddEntries:
properties: properties:
@ -46,6 +55,23 @@ components:
- content - content
- entryId - entryId
- sortIndex - sortIndex
TimelineAddToModule:
properties:
moduleEntryId:
type: string
moduleItems:
items:
$ref: ./content.yaml#/components/schemas/ModuleItem
type: array
prepend:
type: boolean
type:
$ref: '#/components/schemas/InstructionType'
type: string
required:
- type
- moduleItems
- moduleEntryId
TimelineClearCache: TimelineClearCache:
properties: properties:
type: type:
@ -63,6 +89,56 @@ components:
required: required:
- type - type
- entry - entry
TimelineReplaceEntry:
properties:
entry:
$ref: '#/components/schemas/TimelineAddEntry'
type: object
entry_id_to_replace:
type: string
type:
$ref: '#/components/schemas/InstructionType'
type: string
required:
- type
- entry_id_to_replace
- entry
TimelineShowAlert:
properties:
alertType:
enum:
- NewTweets
type: string
colorConfig:
type: object
displayDurationMs:
type: integer
displayLocation:
enum:
- Top
type: string
iconDisplayInfo:
type: object
richText:
properties:
entities:
type: array
text:
type: string
type: object
triggerDelayMs:
type: integer
type:
$ref: '#/components/schemas/InstructionType'
type: string
usersResults:
items:
$ref: ./user.yaml#/components/schemas/UserResults
type: array
required:
- type
- usersResults
- richText
TimelineTerminateTimeline: TimelineTerminateTimeline:
properties: properties:
direction: direction:

View file

@ -9,15 +9,21 @@ components:
InstructionUnion: InstructionUnion:
oneOf: oneOf:
- $ref: "#/components/schemas/TimelineAddEntries" - $ref: "#/components/schemas/TimelineAddEntries"
- $ref: "#/components/schemas/TimelineAddToModule"
- $ref: "#/components/schemas/TimelineClearCache" - $ref: "#/components/schemas/TimelineClearCache"
- $ref: "#/components/schemas/TimelinePinEntry" - $ref: "#/components/schemas/TimelinePinEntry"
- $ref: "#/components/schemas/TimelineReplaceEntry"
- $ref: "#/components/schemas/TimelineShowAlert"
- $ref: "#/components/schemas/TimelineTerminateTimeline" - $ref: "#/components/schemas/TimelineTerminateTimeline"
discriminator: discriminator:
propertyName: type propertyName: type
mapping": # deprecated mapping": # deprecated
TimelineAddEntries: "#/components/schemas/TimelineAddEntries" TimelineAddEntries: "#/components/schemas/TimelineAddEntries"
TimelineAddToModule: "#/components/schemas/TimelineAddToModule"
TimelineClearCache: "#/components/schemas/TimelineClearCache" TimelineClearCache: "#/components/schemas/TimelineClearCache"
TimelinePinEntry: "#/components/schemas/TimelinePinEntry" TimelinePinEntry: "#/components/schemas/TimelinePinEntry"
TimelineReplaceEntry: "#/components/schemas/TimelineReplaceEntry"
TimelineShowAlert: "#/components/schemas/TimelineShowAlert"
TimelineTerminateTimeline: "#/components/schemas/TimelineTerminateTimeline" TimelineTerminateTimeline: "#/components/schemas/TimelineTerminateTimeline"
InstructionType: InstructionType:
@ -25,8 +31,11 @@ components:
enum: enum:
[ [
TimelineAddEntries, TimelineAddEntries,
TimelineAddToModule,
TimelineClearCache, TimelineClearCache,
TimelinePinEntry, TimelinePinEntry,
TimelineReplaceEntry,
TimelineShowAlert,
TimelineTerminateTimeline, TimelineTerminateTimeline,
] ]
@ -43,6 +52,24 @@ components:
items: items:
$ref: "#/components/schemas/TimelineAddEntry" $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: TimelineClearCache:
required: required:
- type - type
@ -62,6 +89,56 @@ components:
entry: entry:
$ref: "#/components/schemas/TimelineAddEntry" $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: TimelineTerminateTimeline:
required: required:
- type - type