@hyve-sdk/js 2.11.1 → 2.11.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.
package/dist/index.d.mts CHANGED
@@ -21,8 +21,8 @@ interface TelemetryEvent {
21
21
  game_id: string;
22
22
  /** Unique session identifier (required) */
23
23
  session_id: string;
24
- /** Platform/user identifier (optional) */
25
- platform_id?: string | null;
24
+ /** Platform identifier always set, defaults to "web" */
25
+ platform_id?: string;
26
26
  /** Location where the event occurred (required) */
27
27
  event_location: string;
28
28
  /** Main category of the event (required) */
package/dist/index.d.ts CHANGED
@@ -21,8 +21,8 @@ interface TelemetryEvent {
21
21
  game_id: string;
22
22
  /** Unique session identifier (required) */
23
23
  session_id: string;
24
- /** Platform/user identifier (optional) */
25
- platform_id?: string | null;
24
+ /** Platform identifier always set, defaults to "web" */
25
+ platform_id?: string;
26
26
  /** Location where the event occurred (required) */
27
27
  event_location: string;
28
28
  /** Main category of the event (required) */
package/dist/index.js CHANGED
@@ -621,7 +621,7 @@ var AttributionManager = class _AttributionManager {
621
621
  return { platform: platformParam, isEmbedded: true };
622
622
  }
623
623
  if (!referrerUrl || this.isCdnUrl(referrerUrl)) {
624
- return { platform: "unknown", isEmbedded: true };
624
+ return { platform: "web", isEmbedded: true };
625
625
  }
626
626
  const normalizedRef = referrerUrl.toLowerCase();
627
627
  for (const [platform, patterns] of Object.entries(EMBEDDING_PLATFORM_PATTERNS)) {
@@ -642,7 +642,7 @@ var AttributionManager = class _AttributionManager {
642
642
  }
643
643
  } catch {
644
644
  }
645
- return { platform: "unknown", isEmbedded: true };
645
+ return { platform: "web", isEmbedded: true };
646
646
  }
647
647
  categorizeReferrer(referrerUrl) {
648
648
  if (!referrerUrl) return "direct";
@@ -2087,7 +2087,7 @@ var HyveClient = class {
2087
2087
  const telemetryEvent = {
2088
2088
  game_id: this.gameId,
2089
2089
  session_id: this.sessionId,
2090
- platform_id: platformId || attribution.platform_id || null,
2090
+ platform_id: platformId || attribution.platform_id,
2091
2091
  event_location: eventLocation,
2092
2092
  event_category: eventCategory,
2093
2093
  event_action: eventAction,
package/dist/index.mjs CHANGED
@@ -581,7 +581,7 @@ var AttributionManager = class _AttributionManager {
581
581
  return { platform: platformParam, isEmbedded: true };
582
582
  }
583
583
  if (!referrerUrl || this.isCdnUrl(referrerUrl)) {
584
- return { platform: "unknown", isEmbedded: true };
584
+ return { platform: "web", isEmbedded: true };
585
585
  }
586
586
  const normalizedRef = referrerUrl.toLowerCase();
587
587
  for (const [platform, patterns] of Object.entries(EMBEDDING_PLATFORM_PATTERNS)) {
@@ -602,7 +602,7 @@ var AttributionManager = class _AttributionManager {
602
602
  }
603
603
  } catch {
604
604
  }
605
- return { platform: "unknown", isEmbedded: true };
605
+ return { platform: "web", isEmbedded: true };
606
606
  }
607
607
  categorizeReferrer(referrerUrl) {
608
608
  if (!referrerUrl) return "direct";
@@ -2047,7 +2047,7 @@ var HyveClient = class {
2047
2047
  const telemetryEvent = {
2048
2048
  game_id: this.gameId,
2049
2049
  session_id: this.sessionId,
2050
- platform_id: platformId || attribution.platform_id || null,
2050
+ platform_id: platformId || attribution.platform_id,
2051
2051
  event_location: eventLocation,
2052
2052
  event_category: eventCategory,
2053
2053
  event_action: eventAction,
package/dist/react.js CHANGED
@@ -582,7 +582,7 @@ var AttributionManager = class _AttributionManager {
582
582
  return { platform: platformParam, isEmbedded: true };
583
583
  }
584
584
  if (!referrerUrl || this.isCdnUrl(referrerUrl)) {
585
- return { platform: "unknown", isEmbedded: true };
585
+ return { platform: "web", isEmbedded: true };
586
586
  }
587
587
  const normalizedRef = referrerUrl.toLowerCase();
588
588
  for (const [platform, patterns] of Object.entries(EMBEDDING_PLATFORM_PATTERNS)) {
@@ -603,7 +603,7 @@ var AttributionManager = class _AttributionManager {
603
603
  }
604
604
  } catch {
605
605
  }
606
- return { platform: "unknown", isEmbedded: true };
606
+ return { platform: "web", isEmbedded: true };
607
607
  }
608
608
  categorizeReferrer(referrerUrl) {
609
609
  if (!referrerUrl) return "direct";
@@ -2042,7 +2042,7 @@ var HyveClient = class {
2042
2042
  const telemetryEvent = {
2043
2043
  game_id: this.gameId,
2044
2044
  session_id: this.sessionId,
2045
- platform_id: platformId || attribution.platform_id || null,
2045
+ platform_id: platformId || attribution.platform_id,
2046
2046
  event_location: eventLocation,
2047
2047
  event_category: eventCategory,
2048
2048
  event_action: eventAction,
package/dist/react.mjs CHANGED
@@ -560,7 +560,7 @@ var AttributionManager = class _AttributionManager {
560
560
  return { platform: platformParam, isEmbedded: true };
561
561
  }
562
562
  if (!referrerUrl || this.isCdnUrl(referrerUrl)) {
563
- return { platform: "unknown", isEmbedded: true };
563
+ return { platform: "web", isEmbedded: true };
564
564
  }
565
565
  const normalizedRef = referrerUrl.toLowerCase();
566
566
  for (const [platform, patterns] of Object.entries(EMBEDDING_PLATFORM_PATTERNS)) {
@@ -581,7 +581,7 @@ var AttributionManager = class _AttributionManager {
581
581
  }
582
582
  } catch {
583
583
  }
584
- return { platform: "unknown", isEmbedded: true };
584
+ return { platform: "web", isEmbedded: true };
585
585
  }
586
586
  categorizeReferrer(referrerUrl) {
587
587
  if (!referrerUrl) return "direct";
@@ -2020,7 +2020,7 @@ var HyveClient = class {
2020
2020
  const telemetryEvent = {
2021
2021
  game_id: this.gameId,
2022
2022
  session_id: this.sessionId,
2023
- platform_id: platformId || attribution.platform_id || null,
2023
+ platform_id: platformId || attribution.platform_id,
2024
2024
  event_location: eventLocation,
2025
2025
  event_category: eventCategory,
2026
2026
  event_action: eventAction,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hyve-sdk/js",
3
- "version": "2.11.1",
3
+ "version": "2.11.2",
4
4
  "description": "Hyve SDK - TypeScript wrapper for Hyve game server integration",
5
5
  "private": false,
6
6
  "publishConfig": {