-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(EAV-487): add buckets topic to LSG
currently only featuring adLibs and actions valid for all variants (showStyleVariantId === null)
- Loading branch information
Showing
29 changed files
with
468 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ges/meteor-lib/src/collections/Buckets.ts → packages/corelib/src/dataModel/Bucket.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
title: Buckets | ||
description: Buckets schema for websocket subscriptions | ||
$defs: | ||
buckets: | ||
type: object | ||
properties: | ||
event: | ||
type: string | ||
const: buckets | ||
buckets: | ||
description: Buckets available in the Studio | ||
type: array | ||
items: | ||
$ref: '#/$defs/bucket' | ||
required: [event, buckets] | ||
additionalProperties: false | ||
examples: | ||
- event: buckets | ||
buckets: | ||
$ref: '#/$defs/bucket/examples' | ||
bucket: | ||
type: object | ||
properties: | ||
id: | ||
description: Unique id of the bucket | ||
type: string | ||
name: | ||
description: The user defined bucket name | ||
type: string | ||
adLibs: | ||
description: The AdLibs in this bucket | ||
type: array | ||
items: | ||
$ref: './adLibs.yaml#/$defs/adLib' | ||
examples: | ||
- id: 'C6K_yIMuGFUk8X_L9A9_jRT6aq4_' | ||
name: My Bucket | ||
adLibs: | ||
$ref: './adLibs.yaml#/$defs/adLib/examples' |
31 changes: 31 additions & 0 deletions
31
packages/live-status-gateway/src/collections/bucketAdLibActionsHandler.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { Logger } from 'winston' | ||
import { CoreHandler } from '../coreHandler' | ||
import { Collection, PublicationCollection } from '../wsHandler' | ||
import { CollectionName } from '@sofie-automation/corelib/dist/dataModel/Collections' | ||
import { BucketAdLibAction } from '@sofie-automation/corelib/dist/dataModel/BucketAdLibAction' | ||
import { CorelibPubSub } from '@sofie-automation/corelib/dist/pubsub' | ||
import { CollectionHandlers } from '../liveStatusServer' | ||
|
||
export class BucketAdLibActionsHandler | ||
extends PublicationCollection< | ||
BucketAdLibAction[], | ||
CorelibPubSub.bucketAdLibActions, | ||
CollectionName.BucketAdLibActions | ||
> | ||
implements Collection<BucketAdLibAction[]> | ||
{ | ||
constructor(logger: Logger, coreHandler: CoreHandler) { | ||
super(CollectionName.BucketAdLibActions, CorelibPubSub.bucketAdLibActions, logger, coreHandler) | ||
} | ||
|
||
changed(): void { | ||
const collection = this.getCollectionOrFail() | ||
this._collectionData = collection.find(undefined) | ||
this.notify(this._collectionData) | ||
} | ||
|
||
init(handlers: CollectionHandlers): void { | ||
super.init(handlers) | ||
this.setupSubscription(this._studioId, null, []) // This only matches adLibs avilable to all variants | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
packages/live-status-gateway/src/collections/bucketAdLibsHandler.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { Logger } from 'winston' | ||
import { CoreHandler } from '../coreHandler' | ||
import { Collection, PublicationCollection } from '../wsHandler' | ||
import { CollectionName } from '@sofie-automation/corelib/dist/dataModel/Collections' | ||
import { BucketAdLib } from '@sofie-automation/corelib/dist/dataModel/BucketAdLibPiece' | ||
import { CorelibPubSub } from '@sofie-automation/corelib/dist/pubsub' | ||
import { CollectionHandlers } from '../liveStatusServer' | ||
|
||
export class BucketAdLibsHandler | ||
extends PublicationCollection<BucketAdLib[], CorelibPubSub.bucketAdLibPieces, CollectionName.BucketAdLibPieces> | ||
implements Collection<BucketAdLib[]> | ||
{ | ||
constructor(logger: Logger, coreHandler: CoreHandler) { | ||
super(CollectionName.BucketAdLibPieces, CorelibPubSub.bucketAdLibPieces, logger, coreHandler) | ||
} | ||
|
||
changed(): void { | ||
const collection = this.getCollectionOrFail() | ||
this._collectionData = collection.find(undefined) | ||
this.notify(this._collectionData) | ||
} | ||
|
||
init(handlers: CollectionHandlers): void { | ||
super.init(handlers) | ||
this.setupSubscription(this._studioId, null, []) // This only matches adLibs avilable to all variants | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
packages/live-status-gateway/src/collections/bucketsHandler.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { Logger } from 'winston' | ||
import { CoreHandler } from '../coreHandler' | ||
import { Collection, PublicationCollection } from '../wsHandler' | ||
import { CollectionName } from '@sofie-automation/corelib/dist/dataModel/Collections' | ||
import { Bucket } from '@sofie-automation/corelib/dist/dataModel/Bucket' | ||
import { CorelibPubSub } from '@sofie-automation/corelib/dist/pubsub' | ||
import { CollectionHandlers } from '../liveStatusServer' | ||
|
||
export class BucketsHandler | ||
extends PublicationCollection<Bucket[], CorelibPubSub.buckets, CollectionName.Buckets> | ||
implements Collection<Bucket[]> | ||
{ | ||
constructor(logger: Logger, coreHandler: CoreHandler) { | ||
super(CollectionName.Buckets, CorelibPubSub.buckets, logger, coreHandler) | ||
} | ||
|
||
changed(): void { | ||
const collection = this.getCollectionOrFail() | ||
this._collectionData = collection.find(undefined) | ||
this.notify(this._collectionData) | ||
} | ||
|
||
init(handlers: CollectionHandlers): void { | ||
super.init(handlers) | ||
this.setupSubscription(this._studioId, null) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.