1
Fork 0
mirror of https://github.com/thegeneralist01/twitter-openapi synced 2026-01-11 15:40:26 +01:00
twitter-openapi/dist/compatible/schemas/instruction.yaml
ふぁ b95b73080e
build
Signed-off-by: ふぁ <yuki@yuki0311.com>
2023-07-09 03:49:52 +09:00

160 lines
4.2 KiB
YAML

components:
schemas:
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:
entries:
items:
$ref: '#/components/schemas/TimelineAddEntry'
type: array
type:
$ref: '#/components/schemas/InstructionType'
type: string
required:
- type
- entries
TimelineAddEntry:
properties:
content:
$ref: ./content.yaml#/components/schemas/ContentUnion
entryId:
pattern: ^[a-z\-]+[0-9]+$
type: string
sortIndex:
pattern: '[0-9]+$'
type: string
required:
- 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:
$ref: '#/components/schemas/InstructionType'
type: string
required:
- type
TimelinePinEntry:
properties:
entry:
$ref: '#/components/schemas/TimelineAddEntry'
type:
$ref: '#/components/schemas/InstructionType'
type: string
required:
- type
- entry
TimelineReplaceEntry:
properties:
entry:
$ref: '#/components/schemas/TimelineAddEntry'
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:
items:
type: object
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:
enum:
- Top
- Bottom
type: string
type:
$ref: '#/components/schemas/InstructionType'
type: string
required:
- type
- direction
info:
title: Twitter OpenAPI
version: 0.0.1
openapi: 3.0.3
paths: {}