@reveldigital/player-client 1.0.13 → 1.0.15

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.
Files changed (33) hide show
  1. package/README.md +236 -3
  2. package/esm2020/lib/interfaces/client.interface.mjs +1 -1
  3. package/esm2020/lib/interfaces/command.interface.mjs +1 -1
  4. package/esm2020/lib/interfaces/config.interface.mjs +45 -1
  5. package/esm2020/lib/interfaces/device.interface.mjs +1 -1
  6. package/esm2020/lib/interfaces/event-properties.interface.mjs +1 -1
  7. package/esm2020/lib/interfaces/location.interface.mjs +1 -1
  8. package/esm2020/lib/player-client.service.mjs +506 -76
  9. package/esm2020/lib/safe-style.pipe.mjs +3 -2
  10. package/esm2020/lib/version.mjs +2 -2
  11. package/fesm2015/reveldigital-player-client.mjs +509 -80
  12. package/fesm2015/reveldigital-player-client.mjs.map +1 -1
  13. package/fesm2020/reveldigital-player-client.mjs +509 -79
  14. package/fesm2020/reveldigital-player-client.mjs.map +1 -1
  15. package/lib/interfaces/client.interface.d.ts +318 -76
  16. package/lib/interfaces/client.interface.d.ts.map +1 -1
  17. package/lib/interfaces/command.interface.d.ts +66 -6
  18. package/lib/interfaces/command.interface.d.ts.map +1 -1
  19. package/lib/interfaces/config.interface.d.ts +127 -9
  20. package/lib/interfaces/config.interface.d.ts.map +1 -1
  21. package/lib/interfaces/device.interface.d.ts +104 -16
  22. package/lib/interfaces/device.interface.d.ts.map +1 -1
  23. package/lib/interfaces/event-properties.interface.d.ts +127 -3
  24. package/lib/interfaces/event-properties.interface.d.ts.map +1 -1
  25. package/lib/interfaces/location.interface.d.ts +150 -21
  26. package/lib/interfaces/location.interface.d.ts.map +1 -1
  27. package/lib/player-client.service.d.ts +491 -71
  28. package/lib/player-client.service.d.ts.map +1 -1
  29. package/lib/safe-style.pipe.d.ts +2 -1
  30. package/lib/safe-style.pipe.d.ts.map +1 -1
  31. package/lib/version.d.ts +1 -1
  32. package/package.json +3 -2
  33. package/schematics/ng-add/utils/yml2xml.js +2 -1
@@ -1,34 +1,152 @@
1
+ /**
2
+ * Interface representing configuration settings and events for the Revel Digital system.
3
+ *
4
+ * This interface defines the structure for configuration-related communication
5
+ * between gadgets and the player, particularly during design-time configuration
6
+ * and preference management operations.
7
+ *
8
+ * Configuration events are typically used when:
9
+ * - Opening configuration dialogs in the CMS
10
+ * - Applying preference changes from configuration UI
11
+ * - Communicating between parent and child windows during config operations
12
+ *
13
+ * ```typescript
14
+ * // Handle configuration events
15
+ * this.client.onPostMessage$.subscribe((config: IConfig) => {
16
+ * if (config.type === ConfigType.ApplyConfig) {
17
+ * this.applyPreferences(config.prefs);
18
+ * }
19
+ * });
20
+ * ```
21
+ *
22
+ * @export
23
+ * @interface IConfig
24
+ * @since 1.0.0
25
+ */
1
26
  export interface IConfig {
2
27
  /**
3
- * Preferences
28
+ * Dictionary of preference key-value pairs containing configuration settings.
4
29
  *
5
- * @type {any}
30
+ * This object contains all the preference values that have been configured
31
+ * for the gadget. The keys correspond to preference names defined in the
32
+ * gadget's configuration schema, and values can be of any type.
6
33
  *
7
- * @memberof IConfig
34
+ * ```typescript
35
+ * const config: IConfig = {
36
+ * prefs: {
37
+ * 'title': 'My Gadget Title',
38
+ * 'backgroundColor': '#ff0000',
39
+ * 'refreshInterval': 30,
40
+ * 'showBorder': true,
41
+ * 'apiEndpoint': 'https://api.example.com/data'
42
+ * },
43
+ * type: ConfigType.ApplyConfig,
44
+ * isOpener: false
45
+ * };
46
+ * ```
8
47
  */
9
48
  prefs: IDictionary<any>;
10
49
  /**
11
- * Config type
50
+ * The type of configuration operation being performed.
12
51
  *
13
- * @type {ConfigType}
52
+ * Indicates whether this is a request to open configuration UI
53
+ * or an instruction to apply new configuration values.
14
54
  *
15
- * @memberof IConfig
55
+ * @see ConfigType enum for available values
16
56
  */
17
57
  type: ConfigType;
18
58
  /**
19
- * Is this event triggered by the opener
59
+ * Indicates if this configuration event originated from a popup window opener.
20
60
  *
21
- * @type {boolean}
61
+ * When true, this suggests the configuration change originated from a popup
62
+ * configuration window and may need to be propagated to the parent window.
63
+ * This is used internally for handling window communication during config operations.
22
64
  *
23
- * @memberof IConfig
65
+ * ```typescript
66
+ * if (config.isOpener) {
67
+ * // Propagate config changes from popup to parent window
68
+ * window.parent.postMessage(configData, '*');
69
+ * }
70
+ * ```
24
71
  */
25
72
  isOpener: boolean;
26
73
  }
74
+ /**
75
+ * Generic dictionary interface for key-value pairs.
76
+ *
77
+ * This interface provides a flexible way to represent objects with
78
+ * string keys and values of any type. It's commonly used for configuration
79
+ * preferences, command arguments, and other dynamic data structures.
80
+ *
81
+ * @template T - The type of values stored in the dictionary
82
+ *
83
+ * ```typescript
84
+ * // String dictionary
85
+ * const stringPrefs: IDictionary<string> = {
86
+ * 'title': 'My Title',
87
+ * 'description': 'My Description'
88
+ * };
89
+ *
90
+ * // Mixed type dictionary
91
+ * const mixedPrefs: IDictionary<any> = {
92
+ * 'title': 'My Title',
93
+ * 'count': 42,
94
+ * 'enabled': true
95
+ * };
96
+ * ```
97
+ *
98
+ * @export
99
+ * @interface IDictionary
100
+ */
27
101
  export interface IDictionary<T> {
28
102
  [Key: string]: T;
29
103
  }
104
+ /**
105
+ * Enumeration of configuration operation types.
106
+ *
107
+ * Defines the different types of configuration-related operations
108
+ * that can be performed between gadgets and the player environment.
109
+ *
110
+ * @export
111
+ * @enum ConfigType
112
+ * @since 1.0.0
113
+ */
30
114
  export declare enum ConfigType {
115
+ /**
116
+ * Request to open the configuration interface.
117
+ *
118
+ * This type indicates that the configuration UI should be displayed,
119
+ * typically in response to a user action or system event.
120
+ *
121
+ * ```typescript
122
+ * // Trigger config UI opening
123
+ * const openConfigEvent: IConfig = {
124
+ * prefs: {},
125
+ * type: ConfigType.OpenConfig,
126
+ * isOpener: false
127
+ * };
128
+ * ```
129
+ */
31
130
  OpenConfig = "openConfig",
131
+ /**
132
+ * Instruction to apply new configuration values.
133
+ *
134
+ * This type indicates that the provided preferences should be
135
+ * applied to the gadget's configuration, typically after the
136
+ * user has made changes in the configuration UI.
137
+ *
138
+ * ```typescript
139
+ * // Apply new configuration
140
+ * const applyConfigEvent: IConfig = {
141
+ * prefs: {
142
+ * 'title': 'Updated Title',
143
+ * 'interval': 60
144
+ * },
145
+ * type: ConfigType.ApplyConfig,
146
+ * isOpener: true
147
+ * };
148
+ * ```
149
+ */
32
150
  ApplyConfig = "applyConfig"
33
151
  }
34
152
  //# sourceMappingURL=config.interface.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"config.interface.d.ts","sourceRoot":"","sources":["../../../../../projects/reveldigital/player-client/src/lib/interfaces/config.interface.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,OAAO;IAEpB;;;;;;OAMG;IACH,KAAK,EAAE,WAAW,CAAC,GAAG,CAAC,CAAC;IAExB;;;;;;OAMG;IACH,IAAI,EAAE,UAAU,CAAC;IAEjB;;;;;;OAMG;IACH,QAAQ,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,WAAW,CAAC,CAAC;IAC1B,CAAC,GAAG,EAAE,MAAM,GAAG,CAAC,CAAC;CACpB;AAED,oBAAY,UAAU;IAClB,UAAU,eAAe;IACzB,WAAW,gBAAgB;CAC9B"}
1
+ {"version":3,"file":"config.interface.d.ts","sourceRoot":"","sources":["../../../../../projects/reveldigital/player-client/src/lib/interfaces/config.interface.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,WAAW,OAAO;IAEpB;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,KAAK,EAAE,WAAW,CAAC,GAAG,CAAC,CAAC;IAExB;;;;;;;OAOG;IACH,IAAI,EAAE,UAAU,CAAC;IAEjB;;;;;;;;;;;;;OAaG;IACH,QAAQ,EAAE,OAAO,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,WAAW,WAAW,CAAC,CAAC;IAC1B,CAAC,GAAG,EAAE,MAAM,GAAG,CAAC,CAAC;CACpB;AAED;;;;;;;;;GASG;AACH,oBAAY,UAAU;IAClB;;;;;;;;;;;;;;OAcG;IACH,UAAU,eAAe;IAEzB;;;;;;;;;;;;;;;;;;OAkBG;IACH,WAAW,gBAAgB;CAC9B"}
@@ -1,51 +1,139 @@
1
1
  import { ILocation } from "./location.interface";
2
+ /**
3
+ * Interface representing a Revel Digital player device with comprehensive details.
4
+ *
5
+ * This interface defines the complete information available about a device
6
+ * running the Revel Digital player software. It includes identification,
7
+ * configuration, hardware details, and location information as configured
8
+ * in the Revel Digital CMS.
9
+ *
10
+ * Device information is used for:
11
+ * - Content customization based on device capabilities
12
+ * - Location-based content delivery
13
+ * - Analytics and reporting segmentation
14
+ * - Remote device management and targeting
15
+ * - Timezone and localization operations
16
+ *
17
+ * ```typescript
18
+ * // Get and use device information
19
+ * const device = await this.client.getDevice();
20
+ *
21
+ * if (device) {
22
+ * // Customize content based on device type
23
+ * if (device.deviceType === 'android') {
24
+ * this.enableTouchInteractions();
25
+ * }
26
+ *
27
+ * // Use location for content filtering
28
+ * if (device.location?.country === 'US') {
29
+ * this.loadUSContent();
30
+ * }
31
+ *
32
+ * // Check device tags for special configurations
33
+ * if (device.tags.includes('kiosk')) {
34
+ * this.enableKioskMode();
35
+ * }
36
+ * }
37
+ * ```
38
+ *
39
+ * @export
40
+ * @interface IDevice
41
+ * @since 1.0.0
42
+ */
2
43
  export interface IDevice {
3
44
  /**
4
- * Device name
45
+ * The human-readable name assigned to this device.
5
46
  *
6
- * @type {string}
47
+ * This is the display name configured in the Revel Digital CMS
48
+ * for easy identification and management of the device.
49
+ *
50
+ * "Lobby Display", "Conference Room Screen", "Kiosk #1"
7
51
  */
8
52
  name: string;
9
53
  /**
10
- * Device key
54
+ * The unique registration key identifying this device.
55
+ *
56
+ * This is the primary unique identifier for the device within
57
+ * the Revel Digital system. It's used for device authentication,
58
+ * remote command targeting, and system operations.
11
59
  *
12
- * @type {string}
60
+ * "ABCD-1234-EFGH-5678"
13
61
  */
14
62
  registrationKey: string;
15
63
  /**
16
- * Device type
64
+ * The type/platform of the device hardware.
65
+ *
66
+ * Indicates the operating system or platform type of the device,
67
+ * which can be used to enable platform-specific features or content.
17
68
  *
18
- * @type {string}
69
+ * "windows", "android", "linux", "chromeos"
19
70
  */
20
71
  deviceType: string;
21
72
  /**
22
- * Entered service date
73
+ * The date when this device was first registered and entered service.
23
74
  *
24
- * @type {Date}
75
+ * This timestamp indicates when the device was initially set up
76
+ * and began operating within the Revel Digital system.
25
77
  */
26
78
  enteredService: Date;
27
79
  /**
28
- * Language code
80
+ * The language/locale code configured for this device.
29
81
  *
30
- * @type {string}
82
+ * Used for internationalization and localization of content.
83
+ * May be undefined if not specifically configured.
84
+ *
85
+ * "en-US", "fr-FR", "de-DE", "ja-JP"
31
86
  */
32
87
  langCode?: string;
33
88
  /**
34
- * Time zone
89
+ * The timezone identifier assigned to this device.
90
+ *
91
+ * Defines the local timezone for time-sensitive operations
92
+ * and content scheduling. May be undefined if not configured.
35
93
  *
36
- * @type {string}
94
+ * "America/New_York", "Europe/London", "Asia/Tokyo"
37
95
  */
38
96
  timeZone?: string;
39
97
  /**
40
- * Device properties
98
+ * Array of descriptive tags associated with this device.
41
99
  *
42
- * @type {Array<string>}
100
+ * Tags provide a flexible way to categorize and group devices
101
+ * for management, content targeting, and operational purposes.
102
+ * Tags are typically derived from the device description field
103
+ * in the CMS (split by newlines).
104
+ *
105
+ * ```typescript
106
+ * // Common tag examples
107
+ * tags: ["kiosk", "lobby", "interactive"]
108
+ * tags: ["conference-room", "building-a", "floor-2"]
109
+ * tags: ["retail", "storefront", "promotional"]
110
+ *
111
+ * // Check for specific capabilities
112
+ * if (device.tags.includes('touch-enabled')) {
113
+ * this.enableTouchFeatures();
114
+ * }
115
+ * ```
43
116
  */
44
117
  tags: Array<string>;
45
118
  /**
46
- * Device location
119
+ * Geographic location information for this device.
120
+ *
121
+ * Contains detailed location data including coordinates, address,
122
+ * and administrative divisions. This information can be used for
123
+ * location-based content delivery, analytics, and regional customization.
124
+ * May be undefined if location information is not configured.
125
+ *
126
+ * @see ILocation interface for detailed location properties
127
+ *
128
+ * ```typescript
129
+ * if (device.location) {
130
+ * const { city, state, country } = device.location;
131
+ * console.log(`Device located in ${city}, ${state}, ${country}`);
47
132
  *
48
- * @type {ILocation}
133
+ * // Use for weather, news, or regional content
134
+ * this.loadLocalContent(device.location);
135
+ * }
136
+ * ```
49
137
  */
50
138
  location?: ILocation;
51
139
  }
@@ -1 +1 @@
1
- {"version":3,"file":"device.interface.d.ts","sourceRoot":"","sources":["../../../../../projects/reveldigital/player-client/src/lib/interfaces/device.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEjD,MAAM,WAAW,OAAO;IAEpB;;;;OAIG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;;OAIG;IACH,eAAe,EAAE,MAAM,CAAC;IAExB;;;;OAIG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;;;OAIG;IACH,cAAc,EAAE,IAAI,CAAC;IAErB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;;OAIG;IACH,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAEpB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACxB"}
1
+ {"version":3,"file":"device.interface.d.ts","sourceRoot":"","sources":["../../../../../projects/reveldigital/player-client/src/lib/interfaces/device.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,MAAM,WAAW,OAAO;IAEpB;;;;;;;OAOG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;;;;;;OAQG;IACH,eAAe,EAAE,MAAM,CAAC;IAExB;;;;;;;OAOG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;;;;OAKG;IACH,cAAc,EAAE,IAAI,CAAC;IAErB;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;;;;;;;;;;;;;;;;;OAmBG;IACH,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAEpB;;;;;;;;;;;;;;;;;;;OAmBG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACxB"}
@@ -1,10 +1,134 @@
1
+ /**
2
+ * Interface representing flexible properties for analytics events.
3
+ *
4
+ * This interface defines a flexible structure for attaching custom properties
5
+ * and metadata to analytics events. It allows gadgets to provide rich contextual
6
+ * information alongside event tracking for detailed analytics and reporting.
7
+ *
8
+ * Event properties are used to:
9
+ * - Provide context and metadata for analytics events
10
+ * - Enable detailed filtering and segmentation in reports
11
+ * - Track custom business metrics and KPIs
12
+ * - Debug and troubleshoot gadget behavior
13
+ * - Correlate events across user sessions and devices
14
+ *
15
+ * ```typescript
16
+ * // Simple properties
17
+ * const simpleProps: IEventProperties = {
18
+ * action: 'button_click',
19
+ * buttonId: 'submit'
20
+ * };
21
+ *
22
+ * // Rich event data
23
+ * const detailedProps: IEventProperties = {
24
+ * // User interaction details
25
+ * action: 'content_interaction',
26
+ * interactionType: 'swipe',
27
+ * direction: 'left',
28
+ *
29
+ * // Performance metrics
30
+ * loadTime: 1250,
31
+ * renderTime: 85,
32
+ *
33
+ * // Business context
34
+ * contentId: 'promo-2023-12',
35
+ * contentType: 'advertisement',
36
+ * campaign: 'holiday-sales',
37
+ *
38
+ * // Technical details
39
+ * deviceInfo: {
40
+ * screenWidth: 1920,
41
+ * screenHeight: 1080,
42
+ * userAgent: 'RevelDigital/1.0'
43
+ * },
44
+ *
45
+ * // Timestamps and session data
46
+ * timestamp: new Date().toISOString(),
47
+ * sessionId: 'sess-abc123',
48
+ * userId: 'user-456',
49
+ *
50
+ * // Custom business metrics
51
+ * conversionValue: 29.99,
52
+ * category: 'electronics',
53
+ * tags: ['featured', 'sale', 'popular']
54
+ * };
55
+ *
56
+ * // Track events with properties
57
+ * this.client.track('user_interaction', simpleProps);
58
+ * this.client.track('content_viewed', detailedProps);
59
+ * ```
60
+ *
61
+ * @export
62
+ * @interface IEventProperties
63
+ * @since 1.0.0
64
+ */
1
65
  export interface IEventProperties {
2
66
  /**
3
- * Event properties
67
+ * Flexible key-value pairs for event metadata and context.
4
68
  *
5
- * @type {any}
69
+ * This index signature allows any string key to be associated with
70
+ * any value type, providing maximum flexibility for event properties.
6
71
  *
7
- * @memberof IEventProperties
72
+ * ## Common Property Categories:
73
+ *
74
+ * **User Interaction Properties:**
75
+ * - `action`: Type of action performed (click, swipe, scroll, etc.)
76
+ * - `element`: UI element identifier
77
+ * - `coordinates`: Mouse/touch coordinates
78
+ * - `duration`: Time spent on action
79
+ *
80
+ * **Content Properties:**
81
+ * - `contentId`: Unique content identifier
82
+ * - `contentType`: Type of content (video, image, text, etc.)
83
+ * - `contentTitle`: Human-readable content title
84
+ * - `contentUrl`: Source URL if applicable
85
+ *
86
+ * **Performance Properties:**
87
+ * - `loadTime`: Time to load content (milliseconds)
88
+ * - `renderTime`: Time to render content (milliseconds)
89
+ * - `errorCount`: Number of errors encountered
90
+ * - `retryCount`: Number of retry attempts
91
+ *
92
+ * **Session Properties:**
93
+ * - `sessionId`: Current user session identifier
94
+ * - `userId`: User identifier if available
95
+ * - `deviceId`: Device identifier
96
+ * - `timestamp`: Event timestamp
97
+ *
98
+ * **Business Properties:**
99
+ * - `campaign`: Marketing campaign identifier
100
+ * - `category`: Business category or classification
101
+ * - `value`: Monetary or business value
102
+ * - `conversion`: Conversion tracking information
103
+ *
104
+ * ```typescript
105
+ * // User interaction tracking
106
+ * {
107
+ * action: 'video_play',
108
+ * videoId: 'vid-123',
109
+ * videoTitle: 'Product Demo',
110
+ * playPosition: 0,
111
+ * quality: 'HD'
112
+ * }
113
+ *
114
+ * // Performance monitoring
115
+ * {
116
+ * operation: 'api_call',
117
+ * endpoint: '/api/content',
118
+ * responseTime: 245,
119
+ * statusCode: 200,
120
+ * cacheHit: true
121
+ * }
122
+ *
123
+ * // Business metrics
124
+ * {
125
+ * event: 'conversion',
126
+ * conversionType: 'signup',
127
+ * value: 0,
128
+ * source: 'qr_code',
129
+ * campaign: 'spring2023'
130
+ * }
131
+ * ```
8
132
  */
9
133
  [key: string]: any;
10
134
  }
@@ -1 +1 @@
1
- {"version":3,"file":"event-properties.interface.d.ts","sourceRoot":"","sources":["../../../../../projects/reveldigital/player-client/src/lib/interfaces/event-properties.interface.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,gBAAgB;IAE7B;;;;;;OAMG;IACH,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACtB"}
1
+ {"version":3,"file":"event-properties.interface.d.ts","sourceRoot":"","sources":["../../../../../projects/reveldigital/player-client/src/lib/interfaces/event-properties.interface.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+DG;AACH,MAAM,WAAW,gBAAgB;IAC7B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAkEG;IACH,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACtB"}
@@ -1,58 +1,187 @@
1
+ /**
2
+ * Interface representing comprehensive geographical and address information for a device location.
3
+ *
4
+ * This interface defines the complete location data structure used throughout
5
+ * the Revel Digital system for device positioning, content localization,
6
+ * and geographic analytics. Location information enables:
7
+ *
8
+ * - **Geographic Content Targeting**: Deliver region-specific content
9
+ * - **Localization**: Adjust language, currency, and cultural content
10
+ * - **Analytics Segmentation**: Group and analyze by geographic regions
11
+ * - **Weather Integration**: Display local weather conditions
12
+ * - **Distance Calculations**: Proximity-based features and routing
13
+ * - **Compliance**: Regional regulatory and legal requirements
14
+ *
15
+ * ```typescript
16
+ * // Access device location information
17
+ * const device = await this.client.getDevice();
18
+ *
19
+ * if (device?.location) {
20
+ * const location = device.location;
21
+ *
22
+ * // Display local information
23
+ * console.log(`Device located at: ${location.address}`);
24
+ * console.log(`${location.city}, ${location.state} ${location.postalCode}`);
25
+ * console.log(`${location.country}`);
26
+ *
27
+ * // Use coordinates for mapping
28
+ * this.showOnMap(location.latitude, location.longitude);
29
+ *
30
+ * // Load region-specific content
31
+ * if (location.country === 'US') {
32
+ * this.loadUSContent();
33
+ * } else if (location.country === 'CA') {
34
+ * this.loadCanadianContent();
35
+ * }
36
+ *
37
+ * // City-specific customization
38
+ * switch (location.city) {
39
+ * case 'New York':
40
+ * this.enableSubwayAlerts();
41
+ * break;
42
+ * case 'London':
43
+ * this.showTubeStatus();
44
+ * break;
45
+ * }
46
+ * }
47
+ * ```
48
+ *
49
+ * @export
50
+ * @interface ILocation
51
+ * @since 1.0.0
52
+ */
1
53
  export interface ILocation {
2
54
  /**
3
- * Latitude
55
+ * Geographic latitude coordinate in decimal degrees.
4
56
  *
5
- * @type {number}
57
+ * Represents the north-south position on Earth's surface.
58
+ * Positive values indicate northern hemisphere, negative values
59
+ * indicate southern hemisphere.
6
60
  *
7
- * @memberof ILocation
61
+ * ```typescript
62
+ * // Examples of latitude values:
63
+ * // 40.7128 (New York City)
64
+ * // 51.5074 (London)
65
+ * // -33.8688 (Sydney)
66
+ * // 35.6762 (Tokyo)
67
+ *
68
+ * const lat = location.latitude;
69
+ * const hemisphere = lat >= 0 ? 'Northern' : 'Southern';
70
+ * console.log(`Location is in the ${hemisphere} hemisphere`);
71
+ * ```
8
72
  */
9
73
  latitude: number;
10
74
  /**
11
- * Longitude
75
+ * Geographic longitude coordinate in decimal degrees.
76
+ *
77
+ * Represents the east-west position on Earth's surface.
78
+ * Positive values indicate eastern hemisphere, negative values
79
+ * indicate western hemisphere.
12
80
  *
13
- * @type {number}
81
+ * ```typescript
82
+ * // Examples of longitude values:
83
+ * // -74.0060 (New York City)
84
+ * // -0.1278 (London)
85
+ * // 151.2093 (Sydney)
86
+ * // 139.6503 (Tokyo)
14
87
  *
15
- * @memberof ILocation
88
+ * const lng = location.longitude;
89
+ * const hemisphere = lng >= 0 ? 'Eastern' : 'Western';
90
+ * console.log(`Location is in the ${hemisphere} hemisphere`);
91
+ *
92
+ * // Calculate distance between two points
93
+ * const distance = this.calculateDistance(
94
+ * location.latitude, location.longitude,
95
+ * otherLat, otherLng
96
+ * );
97
+ * ```
16
98
  */
17
99
  longitude: number;
18
100
  /**
19
- * City
101
+ * City name where the device is located.
20
102
  *
21
- * @type {string}
103
+ * The municipal or city-level administrative division.
104
+ * Used for city-specific content, local services, and
105
+ * urban area customizations.
22
106
  *
23
- * @memberof ILocation
107
+ * "New York", "London", "Tokyo", "Sydney"
24
108
  */
25
109
  city: string;
26
110
  /**
27
- * State
111
+ * State, province, or regional administrative division.
28
112
  *
29
- * @type {string}
113
+ * The sub-national administrative unit such as state (US),
114
+ * province (Canada), or region (EU). Format varies by country.
30
115
  *
31
- * @memberof ILocation
116
+ * "California", "Ontario", "Bavaria", "New South Wales"
32
117
  */
33
118
  state: string;
34
119
  /**
35
- * Address
120
+ * Full street address of the device location.
121
+ *
122
+ * Complete physical address including street number, street name,
123
+ * and any additional address components. Used for precise location
124
+ * identification and delivery purposes.
36
125
  *
37
- * @type {string}
126
+ * ```typescript
127
+ * // Typical address formats:
128
+ * // "123 Main Street, Suite 456"
129
+ * // "1600 Pennsylvania Avenue NW"
130
+ * // "10 Downing Street"
131
+ * // "1-1-1 Chiyoda"
38
132
  *
39
- * @memberof ILocation
133
+ * if (location.address) {
134
+ * console.log(`Full address: ${location.address}`);
135
+ * this.displayAddressOnMap(location.address);
136
+ * }
137
+ * ```
40
138
  */
41
139
  address: string;
42
140
  /**
43
- * Country
141
+ * Country name or country code.
44
142
  *
45
- * @type {string}
143
+ * The nation-state where the device is located. May be provided
144
+ * as full country name or standardized country code (ISO 3166).
145
+ * Used for country-specific content, legal compliance, and
146
+ * international customizations.
46
147
  *
47
- * @memberof ILocation
148
+ * ```typescript
149
+ * // Country name formats:
150
+ * // "United States", "Canada", "United Kingdom", "Japan"
151
+ * // Or country codes:
152
+ * // "US", "CA", "GB", "JP"
153
+ *
154
+ * // Handle different formats
155
+ * const countryCode = location.country.length === 2
156
+ * ? location.country
157
+ * : this.getCountryCode(location.country);
158
+ *
159
+ * this.loadCountrySpecificContent(countryCode);
160
+ * ```
48
161
  */
49
162
  country: string;
50
163
  /**
51
- * Postal code
164
+ * Postal or ZIP code for the location.
165
+ *
166
+ * The postal delivery code used by the local postal service.
167
+ * Format varies by country (ZIP codes in US, postal codes in Canada/UK, etc.).
168
+ * Used for local delivery, regional targeting, and demographic analysis.
169
+ *
170
+ * ```typescript
171
+ * // Postal code formats by country:
172
+ * // US: "90210", "10001-1234"
173
+ * // Canada: "K1A 0A6", "M5V 3L9"
174
+ * // UK: "SW1A 1AA", "M1 1AA"
175
+ * // Germany: "10115", "80331"
52
176
  *
53
- * @type {string}
177
+ * // Use for regional content targeting
178
+ * if (location.postalCode.startsWith('90')) {
179
+ * this.loadLosAngelesContent();
180
+ * }
54
181
  *
55
- * @memberof ILocation
182
+ * // Validate postal code format
183
+ * const isValidUS = /^\d{5}(-\d{4})?$/.test(location.postalCode);
184
+ * ```
56
185
  */
57
186
  postalCode: string;
58
187
  }
@@ -1 +1 @@
1
- {"version":3,"file":"location.interface.d.ts","sourceRoot":"","sources":["../../../../../projects/reveldigital/player-client/src/lib/interfaces/location.interface.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,SAAS;IACtB;;;;;;OAMG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;;;;OAMG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;;;;OAMG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;;;;OAMG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;;;;OAMG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;;;;OAMG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;;;;OAMG;IACH,UAAU,EAAE,MAAM,CAAC;CACtB"}
1
+ {"version":3,"file":"location.interface.d.ts","sourceRoot":"","sources":["../../../../../projects/reveldigital/player-client/src/lib/interfaces/location.interface.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AACH,MAAM,WAAW,SAAS;IACtB;;;;;;;;;;;;;;;;;;OAkBG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;;;;;;OAQG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;;;;;OAOG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;;;;;;;;;;;;;;;;;OAmBG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,UAAU,EAAE,MAAM,CAAC;CACtB"}