diff --git a/dist/compatible/schemas/instruction.yaml b/dist/compatible/schemas/instruction.yaml index 9f73553..8f2717e 100644 --- a/dist/compatible/schemas/instruction.yaml +++ b/dist/compatible/schemas/instruction.yaml @@ -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: diff --git a/dist/docs/schemas/instruction.yaml b/dist/docs/schemas/instruction.yaml index 9f73553..8f2717e 100644 --- a/dist/docs/schemas/instruction.yaml +++ b/dist/docs/schemas/instruction.yaml @@ -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: diff --git a/src/openapi/schemas/instruction.yaml b/src/openapi/schemas/instruction.yaml index 4224b17..a2c3232 100644 --- a/src/openapi/schemas/instruction.yaml +++ b/src/openapi/schemas/instruction.yaml @@ -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