diff --git a/src/openrpc/discovery.json b/src/openrpc/discovery.json index 25326c0d7..cc00d08f6 100644 --- a/src/openrpc/discovery.json +++ b/src/openrpc/discovery.json @@ -71,7 +71,7 @@ "name": "result", "required": true, "schema": { - "$ref": "#/components/schemas/EntityInfoResult" + "$ref": "https://meta.comcast.com/firebolt/discovery#/definitions/EntityInfoResult" }, "summary": "The entityInfo data." } @@ -442,7 +442,7 @@ "name": "result", "required": true, "schema": { - "$ref": "#/components/schemas/PurchasedContentResult" + "$ref": "https://meta.comcast.com/firebolt/discovery#/definitions/PurchasedContentResult" }, "summary": "The data for the purachasedContent" } @@ -635,7 +635,7 @@ "name": "identifiers", "summary": "A set of content identifiers for this call to action", "schema": { - "$ref": "#/components/schemas/ContentIdentifiers" + "$ref": "https://meta.comcast.com/firebolt/entertainment#/definitions/ContentIdentifiers" } }, { @@ -1389,213 +1389,6 @@ } } }, - "EntityInfo": { - "title": "EntityInfo", - "description": { - "$ref": "file:../descriptions/modules/discovery/EntityInfo.md" - }, - "type": "object", - "required": [ - "identifiers", - "entityType", - "programType", - "title" - ], - "properties": { - "identifiers": { - "$ref": "#/components/schemas/ContentIdentifiers" - }, - "title": { - "type": "string", - "description": "Title of the entity." - }, - "entityType": { - "const": "program", - "description": "The type of the entity. If `program`, then `programType` must be provided." - }, - "programType": { - "$ref": "https://meta.comcast.com/firebolt/entertainment#/definitions/ProgramType" - }, - "synopsis": { - "type": "string", - "description": "Short description of the entity." - }, - "seasonNumber": { - "type": "number", - "description": "For TV seasons, the season number. For TV episodes, the season that the episode belongs to." - }, - "episodeNumber": { - "type": "number", - "description": "For TV episodes, the episode number." - }, - "releaseDate": { - "type": "string", - "format": "date-time", - "description": "The date that the program or entity was released or first aired." - }, - "contentRatings": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ContentRating" - }, - "description": "A list of ContentRating objects, describing the entity's ratings in various rating schemes." - }, - "waysToWatch": { - "type": "array", - "items": { - "$ref": "#/components/schemas/WayToWatch" - }, - "description": "An array of ways a user is might watch this entity, regardless of entitlements." - } - } - }, - "WayToWatch": { - "title": "WayToWatch", - "type": "object", - "required": [ - "identifiers" - ], - "properties": { - "identifiers": { - "$ref": "#/components/schemas/ContentIdentifiers" - }, - "expires": { - "type": "string", - "format": "date-time", - "description": "Time when the WayToWatch is no longer available." - }, - "entitled": { - "type": "boolean", - "description": "Specify if the user is entitled to watch the entity." - }, - "entitledExpires": { - "type": "string", - "format": "date-time", - "description": "Time when the entity is no longer entitled." - }, - "offeringType": { - "$ref": "https://meta.comcast.com/firebolt/entertainment#/definitions/OfferingType" - }, - "hasAds": { - "type": "boolean", - "description": "True if the streamable asset contains ads." - }, - "price": { - "type": "number", - "description": "For \"buy\" and \"rent\" WayToWatch, the price to buy or rent in the user's preferred currency." - }, - "videoQuality": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "SD", - "HD", - "UHD" - ] - }, - "description": "List of the video qualities available via the WayToWatch." - }, - "audioProfile": { - "type": "array", - "items": { - "$ref": "https://meta.comcast.com/firebolt/types#/definitions/AudioProfile" - }, - "description": "List of the audio types available via the WayToWatch." - }, - "audioLanguages": { - "type": "array", - "items": { - "type": "string" - }, - "description": "List of audio track languages available on the WayToWatch. The first is considered the primary language. Languages are expressed as ISO 639 1/2 codes." - }, - "closedCaptions": { - "type": "array", - "items": { - "type": "string" - }, - "description": "List of languages for which closed captions are available on the WayToWatch. Languages are expressed as ISO 639 1/2 codes." - }, - "subtitles": { - "type": "array", - "items": { - "type": "string" - }, - "description": "List of languages for which subtitles are available on the WayToWatch. Languages are expressed as ISO 639 1/2 codes." - }, - "audioDescriptions": { - "type": "array", - "items": { - "type": "string" - }, - "description": "List of languages for which audio descriptions (DVS) are available on the WayToWatch. Languages are expressed as ISO 639 1/2 codes." - } - }, - "description": "A WayToWatch describes a way to watch a video program. It may describe a single\nstreamable asset or a set of streamable assets. For example, an app provider may\ndescribe HD, SD, and UHD assets as individual WayToWatch objects or rolled into\na single WayToWatch.\n\nIf the WayToWatch represents a single streamable asset, the provided\nContentIdentifiers must be sufficient to play back the specific asset when sent\nvia a playback intent or deep link. If the WayToWatch represents multiple\nstreamable assets, the provided ContentIdentifiers must be sufficient to\nplayback one of the assets represented with no user action. In this scenario,\nthe app SHOULD choose the best asset for the user based on their device and\nsettings. The ContentIdentifiers MUST also be sufficient for navigating the user\nto the appropriate entity or detail screen via an entity intent.\n\nThe app should set the `entitled` property to indicate if the user can watch, or\nnot watch, the asset without making a purchase. If the entitlement is known to\nexpire at a certain time (e.g., a rental), the app should also provide the\n`entitledExpires` property. If the entitlement is not expired, the UI will use\nthe `entitled` property to display watchable assets to the user, adjust how\nassets are presented to the user, and how intents into the app are generated.\nFor example, the Aggregated Experience could render a \"Watch\" button for an\nentitled asset versus a \"Subscribe\" button for an non-entitled asset.\n\nThe app should set the `offeringType` to define how the content may be\nauthorized. The UI will use this to adjust how content is presented to the user.\n\nA single WayToWatch cannot represent streamable assets available via multiple\npurchase paths. If, for example, an asset has both Buy, Rent and Subscription\navailability, the three different entitlement paths MUST be represented as\nmultiple WayToWatch objects.\n\n`price` should be populated for WayToWatch objects with `buy` or `rent`\n`offeringType`. If the WayToWatch represents a set of assets with various price\npoints, the `price` provided must be the lowest available price." - }, - "ContentRating": { - "title": "ContentRating", - "type": "object", - "required": [ - "scheme", - "rating" - ], - "properties": { - "scheme": { - "type": "string", - "enum": [ - "CA-Movie", - "CA-TV", - "CA-Movie-Fr", - "CA-TV-Fr", - "US-Movie", - "US-TV" - ], - "description": "The rating scheme." - }, - "rating": { - "type": "string", - "description": "The content rating." - }, - "advisories": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Optional list of subratings or content advisories." - } - }, - "description": "A ContentRating represents an age or content based of an entity. Supported rating schemes and associated types are below.\n\n#### United States\n\n`US-Movie` (MPAA):\n\nRatings: `NR`, `G`, `PG`, `PG13`, `R`, `NC17`\n\nAdvisories: `AT`, `BN`, `SL`, `SS`, `N`, `V`\n\n`US-TV` (Vchip):\n\nRatings: `TVY`, `TVY7`, `TVG`, `TVPG`, `TV14`, `TVMA`\n\nAdvisories: `FV`, `D`, `L`, `S`, `V`\n\n#### Canada\n\n`CA-Movie` (OFRB):\n\nRatings: `G`, `PG`, `14A`, `18A`, `R`, `E`\n\n`CA-TV` (AGVOT)\n\nRatings: `E`, `C`, `C8`, `G`, `PG`, `14+`, `18+`\n\nAdvisories: `C`, `C8`, `G`, `PG`, `14+`, `18+`\n\n`CA-Movie-Fr` (Canadian French language movies):\n\nRatings: `G`, `8+`, `13+`, `16+`, `18+`\n\n`CA-TV-Fr` (Canadian French language TV):\n\nRatings: `G`, `8+`, `13+`, `16+`, `18+`\n" - }, - "ContentIdentifiers": { - "title": "ContentIdentifiers", - "type": "object", - "properties": { - "assetId": { - "type": "string", - "description": "Identifies a particular playable asset. For example, the HD version of a particular movie separate from the UHD version." - }, - "entityId": { - "type": "string", - "description": "Identifies an entity, such as a Movie, TV Series or TV Episode." - }, - "seasonId": { - "type": "string", - "description": "The TV Season for a TV Episode." - }, - "seriesId": { - "type": "string", - "description": "The TV Series for a TV Episode or TV Season." - }, - "appContentData": { - "type": "string", - "description": "App-specific content identifiers.", - "maxLength": 1024 - } - }, - "description": "The ContentIdentifiers object is how the app identifies an entity or asset to\nthe Firebolt platform. These ids are used to look up metadata and deep link into\nthe app.\n\nApps do not need to provide all ids. They only need to provide the minimum\nrequired to target a playable stream or an entity detail screen via a deep link.\nIf an id isn't needed to get to those pages, it doesn't need to be included." - }, "FederatedRequest": { "title": "FederatedRequest", "type": "object", @@ -1702,7 +1495,7 @@ "type": "object", "properties": { "result": { - "$ref": "#/components/schemas/EntityInfoResult" + "$ref": "https://meta.comcast.com/firebolt/discovery#/definitions/EntityInfoResult" } } } @@ -1718,12 +1511,12 @@ "format": "date-time" }, "entity": { - "$ref": "#/components/schemas/EntityInfo" + "$ref": "https://meta.comcast.com/firebolt/entertainment#/definitions/EntityInfo" }, "related": { "type": "array", "items": { - "$ref": "#/components/schemas/EntityInfo" + "$ref": "https://meta.comcast.com/firebolt/entertainment#/definitions/EntityInfo" } } }, @@ -1796,7 +1589,7 @@ "type": "object", "properties": { "result": { - "$ref": "#/components/schemas/PurchasedContentResult" + "$ref": "https://meta.comcast.com/firebolt/discovery#/definitions/PurchasedContentResult" } } } @@ -1817,7 +1610,7 @@ "entries": { "type": "array", "items": { - "$ref": "#/components/schemas/EntityInfo" + "$ref": "https://meta.comcast.com/firebolt/entertainment#/definitions/EntityInfo" } } }, diff --git a/src/sdks/core/package.json b/src/sdks/core/package.json index 9c650fee7..4d94f1425 100644 --- a/src/sdks/core/package.json +++ b/src/sdks/core/package.json @@ -13,7 +13,7 @@ "slice": "npx firebolt-openrpc slice -i ../../../dist/firebolt-open-rpc.json --sdk ./sdk.config.json -o ./dist/firebolt-core-open-rpc.json", "docs": "npx firebolt-openrpc docs --input ./dist/firebolt-core-open-rpc.json --output build/docs/markdown --as-path", "wiki": "npx firebolt-openrpc docs --input ./dist/firebolt-core-open-rpc.json --output build/docs/markdown", - "dist:notest": "npm run clean && npm run slice && npm run sdk && npm run docs && mkdir -p ./dist && cp -R build/javascript/src dist/lib && cp -R build/docs/markdown dist/docs && echo 'Firebolt Manage SDK /dist/ is ready.\n'", + "dist:notest": "npm run clean && npm run slice && npm run validate && npm run sdk && npm run docs && mkdir -p ./dist && cp -R build/javascript/src dist/lib && cp -R build/docs/markdown dist/docs && echo 'Firebolt Manage SDK /dist/ is ready.\n'", "dist": "npm run dist:notest && npm run test", "clean": "rm -rf ./build && rm -rf ./dist", "test:setup": "rm -rf test/transpiled-suite && npx tsc --target es6 --moduleResolution node --outDir test/transpiled-suite",