mirror of
https://github.com/thegeneralist01/twitter-openapi
synced 2026-01-11 15:40:26 +01:00
add TimelineAddToModule, TimelineReplaceEntry and TimelineShowAlert
This commit is contained in:
parent
3dbdd17fbb
commit
075002d350
3 changed files with 229 additions and 0 deletions
76
dist/compatible/schemas/instruction.yaml
vendored
76
dist/compatible/schemas/instruction.yaml
vendored
|
|
@ -3,22 +3,31 @@ components:
|
|||
InstructionType:
|
||||
enum:
|
||||
- TimelineAddEntries
|
||||
- TimelineAddToModule
|
||||
- TimelineClearCache
|
||||
- TimelinePinEntry
|
||||
- TimelineReplaceEntry
|
||||
- TimelineShowAlert
|
||||
- TimelineTerminateTimeline
|
||||
type: string
|
||||
InstructionUnion:
|
||||
discriminator:
|
||||
mapping":
|
||||
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'
|
||||
propertyName: type
|
||||
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'
|
||||
TimelineAddEntries:
|
||||
properties:
|
||||
|
|
@ -46,6 +55,23 @@ components:
|
|||
- content
|
||||
- entryId
|
||||
- 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:
|
||||
properties:
|
||||
type:
|
||||
|
|
@ -63,6 +89,56 @@ components:
|
|||
required:
|
||||
- type
|
||||
- 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:
|
||||
properties:
|
||||
direction:
|
||||
|
|
|
|||
76
dist/docs/schemas/instruction.yaml
vendored
76
dist/docs/schemas/instruction.yaml
vendored
|
|
@ -3,22 +3,31 @@ components:
|
|||
InstructionType:
|
||||
enum:
|
||||
- TimelineAddEntries
|
||||
- TimelineAddToModule
|
||||
- TimelineClearCache
|
||||
- TimelinePinEntry
|
||||
- TimelineReplaceEntry
|
||||
- TimelineShowAlert
|
||||
- TimelineTerminateTimeline
|
||||
type: string
|
||||
InstructionUnion:
|
||||
discriminator:
|
||||
mapping":
|
||||
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'
|
||||
propertyName: type
|
||||
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'
|
||||
TimelineAddEntries:
|
||||
properties:
|
||||
|
|
@ -46,6 +55,23 @@ components:
|
|||
- content
|
||||
- entryId
|
||||
- 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:
|
||||
properties:
|
||||
type:
|
||||
|
|
@ -63,6 +89,56 @@ components:
|
|||
required:
|
||||
- type
|
||||
- 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:
|
||||
properties:
|
||||
direction:
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue