@monterosa/sdk-interact-kit 0.19.0-rc.6 → 2.0.0-rc.2

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.
@@ -10,18 +10,18 @@ import { Emitter } from '@monterosa/sdk-util';
10
10
  import { EventHistory } from './types';
11
11
  import { EventContext } from './context';
12
12
  /**
13
- * Describes the event state.
13
+ * Describes the Event state.
14
14
  */
15
15
  export declare enum EventState {
16
16
  /**
17
- * The event is in the `upcoming` state when its {@link InteractEvent.startAt | start time}
18
- * less than the {@link now | current time}.
17
+ * The Event is in the `upcoming` state when its {@link InteractEvent | startAt}
18
+ * less than the {@link @monterosa/sdk-util#now | current time}.
19
19
  */
20
20
  Upcoming = "upcoming",
21
21
  /**
22
- * The event is in the `active` state when its {@link InteractEvent.startAt | start time}
23
- * equal or more than the {@link now | current time} and less than the
24
- * {@link InteractEvent.endAt | end time}.
22
+ * The Event is in the `active` state when its {@link InteractEvent | startAt}
23
+ * equal or more than the {@link @monterosa/sdk-util#now | current time} and less than the
24
+ * {@link InteractEvent | endAt}.
25
25
  */
26
26
  Active = "active",
27
27
  /**
@@ -29,8 +29,8 @@ export declare enum EventState {
29
29
  */
30
30
  Prolonged = "prolonged",
31
31
  /**
32
- * The event is in the `finished` state when its {@link InteractEvent.endAt | end time}
33
- * equal or more than the {@link now | current time}.
32
+ * The Event is in the `finished` state when its {@link InteractEvent | endAt}
33
+ * equal or more than the {@link @monterosa/sdk-util#now | current time}.
34
34
  */
35
35
  Finished = "finished"
36
36
  }
@@ -40,15 +40,19 @@ export declare enum InitState {
40
40
  Initialised = "initialised"
41
41
  }
42
42
  /**
43
- * An instance of
44
- * {@link https://products.monterosa.co/mic/core-concepts/schedule-and-events | Monterosa / Interaction Cloud Event}
45
- * that holds all of its information.
43
+ * Represents an Event, a time-bound period of
44
+ * interactivity. Obtain via {@link getEvent} or
45
+ * {@link getEvents}.
46
46
  *
47
- * Event represent either a sports game, TV show or simply a period of time in
48
- * which you want to push out interactivity to users. When you create an event
49
- * you can specify: duration, start time, start mode and
47
+ * @remarks
48
+ * Events represent a sports game, TV show, or any period of time in which you
49
+ * want to push interactivity to users. Each Event has a duration, start time,
50
+ * start mode, and
50
51
  * {@link https://products.monterosa.co/mic/developer-guides/app-spec/event-settings-spec | custom fields}
51
- * that can be confgured by a developers
52
+ * that can be configured by developers.
53
+ *
54
+ * See {@link https://products.monterosa.co/mic/core-concepts/schedule-and-events | Events} in
55
+ * the platform documentation for more details.
52
56
  */
53
57
  export interface InteractEvent extends Emitter {
54
58
  /**
@@ -60,23 +64,23 @@ export interface InteractEvent extends Emitter {
60
64
  */
61
65
  name: string;
62
66
  /**
63
- * Returns the event start time as UNIX time in seconds.
67
+ * Returns the Event start time as UNIX time in seconds.
64
68
  */
65
69
  startAt: number;
66
70
  /**
67
- * Returns the event start time as ISO string.
71
+ * Returns the Event start time as ISO string.
68
72
  */
69
73
  startAtIso: string;
70
74
  /**
71
- * Returns the event end time as UNIX time in seconds.
75
+ * Returns the Event end time as UNIX time in seconds.
72
76
  */
73
77
  endAt: number;
74
78
  /**
75
- * Returns the event end time as ISO string.
79
+ * Returns the Event end time as ISO string.
76
80
  */
77
81
  endAtIso: string;
78
82
  /**
79
- * Studio supports custom fields within Event. This returns an object
83
+ * Studio supports custom fields within an Event. This returns an object
80
84
  * populated with the custom fields. Object property names will match keys
81
85
  * as provided as part of custom fields definition in the feed and values
82
86
  * will be as collected by Studio.
@@ -97,7 +101,7 @@ export interface InteractEvent extends Emitter {
97
101
  */
98
102
  state: EventState;
99
103
  /**
100
- * Returns the total duration in seconds of the event.
104
+ * Returns the total duration in seconds of the Event.
101
105
  */
102
106
  duration: number;
103
107
  /** @internal */
@@ -8,30 +8,26 @@
8
8
  */
9
9
  import { MonterosaSdk } from '@monterosa/sdk-core';
10
10
  import { Unsubscribe } from '@monterosa/sdk-util';
11
- import { InteractProject, Listings } from './public-types';
11
+ import { InteractProject } from './public-types';
12
12
  /**
13
13
  * @internal
14
14
  */
15
15
  declare const getProjectMemoized: (...args: any[]) => Promise<InteractProject>;
16
16
  /**
17
- * Returns {@link InteractProject | project instance} associated
18
- * with the {@link @monterosa/sdk-core#MonterosaSdk | configured sdk}
17
+ * Returns {@link InteractProject | Project instance} associated
18
+ * with the
19
+ * {@link @monterosa/sdk-core#MonterosaSdk | configured SDK}
20
+ *
21
+ * @param sdk - The SDK instance. Defaults to the default SDK.
22
+ * @returns The Project instance.
19
23
  */
20
24
  declare function getProject(sdk?: MonterosaSdk): Promise<InteractProject>;
21
25
  /**
22
- * @internal
23
- */
24
- export declare function fetchListings(host: string, projectId: string): Promise<Listings>;
25
- /**
26
- * Adds an observer for when {@link InteractProject.fields | project fields}
27
- * are updated
28
- */
29
- declare function onProjectFieldsUpdated(project: InteractProject, callback: () => void): Unsubscribe;
30
- /**
31
- * Adds an observer that is called when the project listings are updated.
26
+ * Adds an observer for when
27
+ * {@link InteractProject | Project fields} are updated
32
28
  *
33
- * @deprecated Use {@link onEventAdded()}, {@link onEventUpdated()} and
34
- * {@link onEventRemoved()} instead
29
+ * @param project - The Project to observe
30
+ * @param callback - Called when Project fields change
35
31
  */
36
- declare function onProjectListingsUpdated(project: InteractProject, callback: () => void): Unsubscribe;
37
- export { getProject, getProjectMemoized, onProjectFieldsUpdated, onProjectListingsUpdated, };
32
+ declare function onProjectFieldsUpdated(project: InteractProject, callback: () => void): Unsubscribe;
33
+ export { getProject, getProjectMemoized, onProjectFieldsUpdated };
@@ -11,19 +11,21 @@ import { MonterosaKit } from '@monterosa/sdk-core';
11
11
  import { ProjectContext } from './context';
12
12
  import { EventOptions } from '../event/types';
13
13
  /**
14
- * An instance of
15
- * {@link https://products.monterosa.co/mic/core-concepts | Monterosa / Interaction Cloud Project}
16
- * that holds all of its information.
14
+ * Represents a Project, a container for configuration,
15
+ * theming, and Events. Obtain via {@link getProject}.
17
16
  *
18
- * Every Project in Studio has id, host, embedUrl and a set of fields
17
+ * @remarks
18
+ * Every Project in Studio has an id, host, embedUrl, and a set of fields
19
19
  * associated with an
20
20
  * {@link https://products.monterosa.co/mic/developer-guides/whats-an-app | App}.
21
- * Project fields a set of
21
+ * Project fields are
22
22
  * {@link https://products.monterosa.co/mic/producer-guide/studio/app-setup | configuration options}
23
- * that are created by the
23
+ * created by the
24
24
  * {@link https://products.monterosa.co/mic/developer-guides/app-spec/project-settings-spec | app developer}
25
25
  * and vary from App to App.
26
26
  *
27
+ * See {@link https://products.monterosa.co/mic/core-concepts | Projects} in
28
+ * the platform documentation for more details.
27
29
  */
28
30
  export interface InteractProject extends MonterosaKit, Emitter {
29
31
  /**
@@ -39,7 +41,7 @@ export interface InteractProject extends MonterosaKit, Emitter {
39
41
  */
40
42
  embedUrl: string;
41
43
  /**
42
- * Returns `true` if the project supports localisation.
44
+ * Returns `true` if the Project supports localisation.
43
45
  */
44
46
  isLocalisationSupported: boolean;
45
47
  /**
@@ -51,7 +53,7 @@ export interface InteractProject extends MonterosaKit, Emitter {
51
53
  */
52
54
  locale: string;
53
55
  /**
54
- * Monterosa / Interaction Cloud supports custom fields within Project.
56
+ * Monterosa / Interaction Cloud supports custom fields within a Project.
55
57
  * This returns an object populated with the custom fields. Object property
56
58
  * names will match keys as provided as part of custom fields definition in
57
59
  * the feed and values will be as collected by Studio.
package/dist/index.d.ts CHANGED
@@ -1,3 +1,8 @@
1
+ /**
2
+ * Manages interactive elements such as polls, votes, and leaderboards.
3
+ *
4
+ * @packageDocumentation
5
+ */
1
6
  /**
2
7
  * @license
3
8
  * @monterosa/sdk-interact-kit
@@ -6,10 +11,4 @@
6
11
  *
7
12
  * More details on the license can be found at https://www.monterosa.co/sdk/license
8
13
  */
9
- /**
10
- * Monterosa SDK / Interact Kit
11
- *
12
- * @packageDocumentation
13
- */
14
- export * from './api';
15
14
  export * from './core';