@telemetryos/sdk 1.2.0 → 1.4.0

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.
@@ -1,7 +1,46 @@
1
1
  import { Client } from './client.js';
2
+ /**
3
+ * Provides control methods for managing content overrides.
4
+ *
5
+ * Overrides allow applications to temporarily modify device behavior or content
6
+ * display. Applications can set named overrides to trigger specific behaviors
7
+ * and clear them when no longer needed.
8
+ */
2
9
  export declare class Overrides {
3
10
  _client: Client;
4
11
  constructor(client: Client);
12
+ /**
13
+ * Activates a named override on the device.
14
+ *
15
+ * Overrides can be used to temporarily change device behavior, such as
16
+ * displaying special content, triggering alerts, or modifying the playback schedule.
17
+ *
18
+ * @param name The name/identifier of the override to activate
19
+ * @returns A promise that resolves to true if successful
20
+ * @example
21
+ * // Activate an emergency alert override
22
+ * await overrides().setOverride('emergency-alert');
23
+ *
24
+ * @example
25
+ * // Activate a promotional content override
26
+ * await overrides().setOverride('promo-mode');
27
+ */
5
28
  setOverride(name: string): Promise<boolean>;
29
+ /**
30
+ * Deactivates a named override on the device.
31
+ *
32
+ * This removes a previously set override, returning the device to normal operation
33
+ * or allowing other overrides to take effect.
34
+ *
35
+ * @param name The name/identifier of the override to deactivate
36
+ * @returns A promise that resolves to true if successful
37
+ * @example
38
+ * // Clear an emergency alert override
39
+ * await overrides().clearOverride('emergency-alert');
40
+ *
41
+ * @example
42
+ * // Clear promotional mode when no longer needed
43
+ * await overrides().clearOverride('promo-mode');
44
+ */
6
45
  clearOverride(name: string): Promise<boolean>;
7
46
  }
@@ -1,8 +1,49 @@
1
1
  import { Client } from './client.js';
2
+ /**
3
+ * Provides control methods for applications embedded within playlists.
4
+ *
5
+ * This API allows embedded applications to control the playlist they are running in,
6
+ * such as advancing to the next page, returning to the previous page, or changing
7
+ * the current page's display duration.
8
+ */
2
9
  export declare class Playlist {
3
10
  _client: Client;
4
11
  constructor(client: Client);
12
+ /**
13
+ * Advances to the next page in the current playlist.
14
+ *
15
+ * @returns A promise that resolves to true if successful
16
+ * @example
17
+ * // Move to the next page
18
+ * await playlist().nextPage();
19
+ */
5
20
  nextPage(): Promise<boolean>;
21
+ /**
22
+ * Returns to the previous page in the current playlist.
23
+ *
24
+ * @returns A promise that resolves to true if successful
25
+ * @example
26
+ * // Move to the previous page
27
+ * await playlist().previousPage();
28
+ */
6
29
  previousPage(): Promise<boolean>;
30
+ /**
31
+ * Sets the display duration for the current page.
32
+ *
33
+ * This allows the embedded application to dynamically adjust how long
34
+ * the current page is displayed before advancing to the next page.
35
+ *
36
+ * @param duration The duration in milliseconds
37
+ * @returns A promise that resolves to true if successful
38
+ * @example
39
+ * // Set page duration to 10 seconds
40
+ * await playlist().setDuration(10000);
41
+ *
42
+ * @example
43
+ * // Extend duration based on content
44
+ * if (hasMoreContent) {
45
+ * await playlist().setDuration(30000); // 30 seconds
46
+ * }
47
+ */
7
48
  setDuration(duration: number): Promise<boolean>;
8
49
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@telemetryos/sdk",
3
- "version": "1.2.0",
3
+ "version": "1.4.0",
4
4
  "description": "The official TelemetryOS application API package. Use it to build applications that run on the TelemetryOS platform",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",
@@ -35,7 +35,7 @@
35
35
  "license": "",
36
36
  "repository": "github:TelemetryTV/Application-API",
37
37
  "dependencies": {
38
- "@telemetryos/root-sdk": "^1.2.0",
38
+ "@telemetryos/root-sdk": "^1.4.0",
39
39
  "zod": "^3.24.4"
40
40
  },
41
41
  "devDependencies": {