@xapp/ovai-lib 1.18.91

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md ADDED
@@ -0,0 +1,8 @@
1
+ # Change Log
2
+
3
+ All notable changes to this project will be documented in this file.
4
+ See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
+
6
+ ## [1.18.91](https://github.com/XappMedia/stentor-core/compare/v1.18.90...v1.18.91) (2020-03-13)
7
+
8
+ **Note:** Version bump only for package @xapp/ovai-lib
package/README.md ADDED
@@ -0,0 +1,3 @@
1
+ ## @xapp/ovai-lib
2
+
3
+ Shared library of models, constants, and utilities for OVAI
@@ -0,0 +1,12 @@
1
+ /*! Copyright (c) 2020, XAPPmedia */
2
+ import { App, TemplateType } from "stentor-models";
3
+ export interface OVAIApp extends App {
4
+ /**
5
+ * Type of App
6
+ */
7
+ templateType?: TemplateType;
8
+ /**
9
+ * The subscription ID linked to the App
10
+ */
11
+ stripeSubscriptionId?: string;
12
+ }
package/lib/OVAIApp.js ADDED
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=OVAIApp.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OVAIApp.js","sourceRoot":"","sources":["../src/OVAIApp.ts"],"names":[],"mappings":""}
@@ -0,0 +1,75 @@
1
+ /*! Copyright (c) 2020, XAPPmedia */
2
+ import { OVAIApp } from "./OVAIApp";
3
+ export declare function isLegacyRadioApp(app: OVAIApp): app is LegacyRadioApp;
4
+ export declare function isRadioApp(app: OVAIApp): app is RadioApp;
5
+ export interface LegacyRadioApp extends OVAIApp {
6
+ /**
7
+ * Legacy radio apps may not have a `templateType` at all.
8
+ *
9
+ * They certainly don't have a `radio` attribute.
10
+ *
11
+ * @type {"RADIO_TEMPLATE"}
12
+ * @memberof RadioApp
13
+ */
14
+ templateType?: "RADIO_TEMPLATE";
15
+ }
16
+ export interface RadioApp extends OVAIApp {
17
+ templateType: "RADIO_TEMPLATE";
18
+ /**
19
+ * Attributes specifically for the radio station that the app represents.
20
+ *
21
+ * @type {RadioAttributes}
22
+ * @memberof RadioApp
23
+ */
24
+ radio: RadioAttributes;
25
+ }
26
+ export interface RadioAttributes {
27
+ /**
28
+ * The official government-issued call sign of the radio station.
29
+ *
30
+ * @type {string}
31
+ * @memberof RadioAttributes
32
+ */
33
+ callSign?: string;
34
+ /**
35
+ * The display name for the radio station.
36
+ *
37
+ * If this is omitted then the name of the app will be used.
38
+ *
39
+ * @type {string}
40
+ * @memberof RadioAttributes
41
+ */
42
+ displayName?: string;
43
+ /**
44
+ * The URL to the website of the radio show. (This is not the URL to the stream.)
45
+ *
46
+ * @type {string}
47
+ * @memberof RadioAttributes
48
+ */
49
+ radioUrl: string;
50
+ /**
51
+ * Slogan for the radio station. Example: "Stentor's number
52
+ * one made up station"
53
+ *
54
+ * @type {string}
55
+ * @memberof RadioAttributes
56
+ */
57
+ slogan: string;
58
+ broadcast: {
59
+ frequency: string;
60
+ signalModulation: string;
61
+ subChannel: string;
62
+ };
63
+ /**
64
+ * The organization that the radio station is affiliated with.
65
+ * If not provided, the organization linked to the app will be used.
66
+ *
67
+ * @type {{
68
+ * name: string;
69
+ * }}
70
+ * @memberof RadioAttributes
71
+ */
72
+ affiliation?: {
73
+ name: string;
74
+ };
75
+ }
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ // tslint:disable:no-null-keyword
4
+ function isLegacyRadioApp(app) {
5
+ return (app.templateType == null || app.templateType === "RADIO_TEMPLATE") && !app.radio;
6
+ }
7
+ exports.isLegacyRadioApp = isLegacyRadioApp;
8
+ function isRadioApp(app) {
9
+ return app.templateType === "RADIO_TEMPLATE" && !!app.radio;
10
+ }
11
+ exports.isRadioApp = isRadioApp;
12
+ //# sourceMappingURL=RadioApp.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RadioApp.js","sourceRoot":"","sources":["../src/RadioApp.ts"],"names":[],"mappings":";;AAGA,iCAAiC;AACjC,SAAgB,gBAAgB,CAAC,GAAY;IACzC,OAAO,CAAC,GAAG,CAAC,YAAY,IAAI,IAAI,IAAI,GAAG,CAAC,YAAY,KAAK,gBAAgB,CAAC,IAAI,CAAE,GAAgB,CAAC,KAAK,CAAC;AAC3G,CAAC;AAFD,4CAEC;AAED,SAAgB,UAAU,CAAC,GAAY;IACnC,OAAO,GAAG,CAAC,YAAY,KAAK,gBAAgB,IAAI,CAAC,CAAE,GAAgB,CAAC,KAAK,CAAC;AAC9E,CAAC;AAFD,gCAEC"}
package/lib/index.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ /*! Copyright (c) 2020, XAPPmedia */
2
+ export * from "./OVAIApp";
3
+ export * from "./RadioApp";
package/lib/index.js ADDED
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ function __export(m) {
3
+ for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
4
+ }
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ __export(require("./RadioApp"));
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;AAEA,gCAA2B"}
package/package.json ADDED
@@ -0,0 +1,33 @@
1
+ {
2
+ "name": "@xapp/ovai-lib",
3
+ "license": "UNLICENSED",
4
+ "publishConfig": {
5
+ "access": "restricted"
6
+ },
7
+ "version": "1.18.91",
8
+ "description": "Shared library for OVAI",
9
+ "types": "lib/index",
10
+ "main": "lib/index",
11
+ "files": [
12
+ "lib"
13
+ ],
14
+ "engines": {
15
+ "node": "10.x"
16
+ },
17
+ "devDependencies": {
18
+ "@types/chai": "4.2.10",
19
+ "chai": "4.2.0",
20
+ "stentor-models": "1.23.4",
21
+ "ts-node": "8.6.2",
22
+ "typescript": "3.8.3"
23
+ },
24
+ "peerDependencies": {
25
+ "stentor-models": "1.x"
26
+ },
27
+ "scripts": {
28
+ "build": "tsc -d true -p .",
29
+ "clean": "rm -rf ./lib/*",
30
+ "test": "mocha --recursive -r ts-node/register \"./src/**/*.test.ts\""
31
+ },
32
+ "gitHead": "39855e84a78679328409ca09cffcea114bfbf68a"
33
+ }