Skip to content

Commit 851ccaa

Browse files
committed
chore: clean up structure for part components
1 parent 6b3d40d commit 851ccaa

File tree

8 files changed

+63
-53
lines changed

8 files changed

+63
-53
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
$ref: '../partStatus/partStatus-example.yaml'
2+
timing:
3+
$ref: '../../timing/currentPartTiming/currentPartTiming-example.yaml'
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
$defs:
2+
currentPartStatus:
3+
title: CurrentPartStatus
4+
allOf:
5+
- $ref: '../partStatus/partStatus.yaml#/$defs/partStatus'
6+
- type: object
7+
title: CurrentPartStatus
8+
properties:
9+
timing:
10+
$ref: '../../timing/currentPartTiming/currentPartTiming.yaml#/$defs/currentPartTiming'
11+
required: [timing]
12+
examples:
13+
- $ref: './currentPartStatus-example.yaml'

packages/live-status-gateway-api/api/refactor/components/part/part.yaml

Lines changed: 0 additions & 51 deletions
This file was deleted.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
id: 'H5CBGYjThrMSmaYvRaa5FVKJIzk_'
2+
name: 'Intro'
3+
segmentId: 'n1mOVd5_K5tt4sfk6HYfTuwumGQ_'
4+
autoNext: false
5+
pieces:
6+
- $ref: '../../piece/piece.yaml#/$defs/piece/examples/0'
7+
publicData:
8+
partType: 'intro'
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
$defs:
2+
partStatus:
3+
type: object
4+
title: PartStatus
5+
properties:
6+
id:
7+
description: Unique id of the part
8+
type: string
9+
name:
10+
description: User name of the part
11+
type: string
12+
segmentId:
13+
description: Unique id of the segment this part belongs to
14+
type: string
15+
autoNext:
16+
description: If this part will progress to the next automatically
17+
type: boolean
18+
default: false
19+
pieces:
20+
description: All pieces in this part
21+
type: array
22+
items:
23+
$ref: '../../piece/piece.yaml#/$defs/piece'
24+
publicData:
25+
description: Optional arbitrary data
26+
required: [id, name, segmentId, pieces]
27+
examples:
28+
- $ref: './partStatus-example.yaml'

packages/live-status-gateway-api/api/refactor/components/playlist/activePlaylist.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,17 @@ $defs:
2727
items:
2828
type: string
2929
currentPart:
30-
$ref: '../part/part.yaml#/$defs/currentPart'
30+
oneOf:
31+
- $ref: '../part/currentPart/currentPartStatus.yaml#/$defs/currentPartStatus'
32+
- type: 'null'
3133
currentSegment:
3234
oneOf:
3335
- $ref: '../segment/segment.yaml#/$defs/currentSegment'
3436
- type: 'null'
3537
nextPart:
36-
$ref: '../part/part.yaml#/$defs/part'
38+
oneOf:
39+
- $ref: '../part/partStatus/partStatus.yaml#/$defs/partStatus'
40+
- type: 'null'
3741
publicData:
3842
description: Optional arbitrary data
3943
timing:
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
startTime: 1600000060000
2+
expectedDurationMs: 15000
3+
projectedEndTime: 1600000075000

packages/live-status-gateway-api/api/refactor/components/timing/currentPartTiming.yaml renamed to packages/live-status-gateway-api/api/refactor/components/timing/currentPartTiming/currentPartTiming.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,5 @@ $defs:
1414
description: Unix timestamp of when the part is projected to end (milliseconds). A sum of `startTime` and `expectedDurationMs`.
1515
type: number
1616
required: [startTime, expectedDurationMs, projectedEndTime]
17+
examples:
18+
- $ref: './currentPartTiming-example.yaml'

0 commit comments

Comments
 (0)