@hyve-sdk/js 2.4.1 → 2.4.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 +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +1 -18
- package/dist/index.mjs +1 -18
- package/dist/react.d.mts +1 -1
- package/dist/react.d.ts +1 -1
- package/dist/react.js +1 -18
- package/dist/react.mjs +1 -18
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -33,8 +33,8 @@ interface TelemetryEvent {
|
|
|
33
33
|
event_action: string;
|
|
34
34
|
/** Sub-action for detailed tracking (optional) */
|
|
35
35
|
event_sub_action?: string | null;
|
|
36
|
-
/** Event details as
|
|
37
|
-
event_details?: Record<string,
|
|
36
|
+
/** Event details as object (optional) */
|
|
37
|
+
event_details?: Record<string, unknown> | null;
|
|
38
38
|
/** Mapping details as JSON string or object (optional) */
|
|
39
39
|
mapping_details?: Record<string, any> | string | null;
|
|
40
40
|
}
|
|
@@ -42,7 +42,7 @@ interface TelemetryEvent {
|
|
|
42
42
|
* Additional telemetry data that can be passed with events
|
|
43
43
|
*/
|
|
44
44
|
interface TelemetryAdditionalData {
|
|
45
|
-
/** Optional additional data object
|
|
45
|
+
/** Optional additional data object passed as event_details */
|
|
46
46
|
[key: string]: any;
|
|
47
47
|
}
|
|
48
48
|
/**
|
|
@@ -506,7 +506,7 @@ declare class HyveClient {
|
|
|
506
506
|
* @param platformId Optional platform identifier
|
|
507
507
|
* @returns Promise resolving to boolean indicating success
|
|
508
508
|
*/
|
|
509
|
-
sendTelemetry(eventLocation: string, eventCategory: string, eventAction: string, eventSubCategory?: string | null, eventSubAction?: string | null, eventDetails?: Record<string,
|
|
509
|
+
sendTelemetry(eventLocation: string, eventCategory: string, eventAction: string, eventSubCategory?: string | null, eventSubAction?: string | null, eventDetails?: Record<string, unknown> | null, platformId?: string | null): Promise<boolean>;
|
|
510
510
|
/**
|
|
511
511
|
* Makes an authenticated API call using the JWT token
|
|
512
512
|
* @param endpoint API endpoint path (will be appended to base URL)
|
package/dist/index.d.ts
CHANGED
|
@@ -33,8 +33,8 @@ interface TelemetryEvent {
|
|
|
33
33
|
event_action: string;
|
|
34
34
|
/** Sub-action for detailed tracking (optional) */
|
|
35
35
|
event_sub_action?: string | null;
|
|
36
|
-
/** Event details as
|
|
37
|
-
event_details?: Record<string,
|
|
36
|
+
/** Event details as object (optional) */
|
|
37
|
+
event_details?: Record<string, unknown> | null;
|
|
38
38
|
/** Mapping details as JSON string or object (optional) */
|
|
39
39
|
mapping_details?: Record<string, any> | string | null;
|
|
40
40
|
}
|
|
@@ -42,7 +42,7 @@ interface TelemetryEvent {
|
|
|
42
42
|
* Additional telemetry data that can be passed with events
|
|
43
43
|
*/
|
|
44
44
|
interface TelemetryAdditionalData {
|
|
45
|
-
/** Optional additional data object
|
|
45
|
+
/** Optional additional data object passed as event_details */
|
|
46
46
|
[key: string]: any;
|
|
47
47
|
}
|
|
48
48
|
/**
|
|
@@ -506,7 +506,7 @@ declare class HyveClient {
|
|
|
506
506
|
* @param platformId Optional platform identifier
|
|
507
507
|
* @returns Promise resolving to boolean indicating success
|
|
508
508
|
*/
|
|
509
|
-
sendTelemetry(eventLocation: string, eventCategory: string, eventAction: string, eventSubCategory?: string | null, eventSubAction?: string | null, eventDetails?: Record<string,
|
|
509
|
+
sendTelemetry(eventLocation: string, eventCategory: string, eventAction: string, eventSubCategory?: string | null, eventSubAction?: string | null, eventDetails?: Record<string, unknown> | null, platformId?: string | null): Promise<boolean>;
|
|
510
510
|
/**
|
|
511
511
|
* Makes an authenticated API call using the JWT token
|
|
512
512
|
* @param endpoint API endpoint path (will be appended to base URL)
|
package/dist/index.js
CHANGED
|
@@ -1740,23 +1740,6 @@ var HyveClient = class {
|
|
|
1740
1740
|
return false;
|
|
1741
1741
|
}
|
|
1742
1742
|
try {
|
|
1743
|
-
if (eventDetails) {
|
|
1744
|
-
try {
|
|
1745
|
-
if (typeof eventDetails === "string") {
|
|
1746
|
-
JSON.parse(eventDetails);
|
|
1747
|
-
} else if (typeof eventDetails === "object") {
|
|
1748
|
-
JSON.stringify(eventDetails);
|
|
1749
|
-
}
|
|
1750
|
-
} catch (validationError) {
|
|
1751
|
-
logger.error("Invalid JSON in eventDetails:", validationError);
|
|
1752
|
-
logger.error("eventDetails value:", eventDetails);
|
|
1753
|
-
return false;
|
|
1754
|
-
}
|
|
1755
|
-
}
|
|
1756
|
-
const toJsonString = (data) => {
|
|
1757
|
-
if (!data) return null;
|
|
1758
|
-
return typeof data === "string" ? data : JSON.stringify(data);
|
|
1759
|
-
};
|
|
1760
1743
|
const telemetryEvent = {
|
|
1761
1744
|
game_id: this.gameId,
|
|
1762
1745
|
session_id: this.sessionId,
|
|
@@ -1766,7 +1749,7 @@ var HyveClient = class {
|
|
|
1766
1749
|
event_action: eventAction,
|
|
1767
1750
|
event_sub_category: eventSubCategory || null,
|
|
1768
1751
|
event_sub_action: eventSubAction || null,
|
|
1769
|
-
event_details:
|
|
1752
|
+
event_details: eventDetails || null
|
|
1770
1753
|
};
|
|
1771
1754
|
logger.debug("Sending telemetry event:", telemetryEvent);
|
|
1772
1755
|
const telemetryUrl = `${this.apiBaseUrl}/api/v1/analytics/send`;
|
package/dist/index.mjs
CHANGED
|
@@ -1700,23 +1700,6 @@ var HyveClient = class {
|
|
|
1700
1700
|
return false;
|
|
1701
1701
|
}
|
|
1702
1702
|
try {
|
|
1703
|
-
if (eventDetails) {
|
|
1704
|
-
try {
|
|
1705
|
-
if (typeof eventDetails === "string") {
|
|
1706
|
-
JSON.parse(eventDetails);
|
|
1707
|
-
} else if (typeof eventDetails === "object") {
|
|
1708
|
-
JSON.stringify(eventDetails);
|
|
1709
|
-
}
|
|
1710
|
-
} catch (validationError) {
|
|
1711
|
-
logger.error("Invalid JSON in eventDetails:", validationError);
|
|
1712
|
-
logger.error("eventDetails value:", eventDetails);
|
|
1713
|
-
return false;
|
|
1714
|
-
}
|
|
1715
|
-
}
|
|
1716
|
-
const toJsonString = (data) => {
|
|
1717
|
-
if (!data) return null;
|
|
1718
|
-
return typeof data === "string" ? data : JSON.stringify(data);
|
|
1719
|
-
};
|
|
1720
1703
|
const telemetryEvent = {
|
|
1721
1704
|
game_id: this.gameId,
|
|
1722
1705
|
session_id: this.sessionId,
|
|
@@ -1726,7 +1709,7 @@ var HyveClient = class {
|
|
|
1726
1709
|
event_action: eventAction,
|
|
1727
1710
|
event_sub_category: eventSubCategory || null,
|
|
1728
1711
|
event_sub_action: eventSubAction || null,
|
|
1729
|
-
event_details:
|
|
1712
|
+
event_details: eventDetails || null
|
|
1730
1713
|
};
|
|
1731
1714
|
logger.debug("Sending telemetry event:", telemetryEvent);
|
|
1732
1715
|
const telemetryUrl = `${this.apiBaseUrl}/api/v1/analytics/send`;
|
package/dist/react.d.mts
CHANGED
|
@@ -281,7 +281,7 @@ declare class HyveClient {
|
|
|
281
281
|
* @param platformId Optional platform identifier
|
|
282
282
|
* @returns Promise resolving to boolean indicating success
|
|
283
283
|
*/
|
|
284
|
-
sendTelemetry(eventLocation: string, eventCategory: string, eventAction: string, eventSubCategory?: string | null, eventSubAction?: string | null, eventDetails?: Record<string,
|
|
284
|
+
sendTelemetry(eventLocation: string, eventCategory: string, eventAction: string, eventSubCategory?: string | null, eventSubAction?: string | null, eventDetails?: Record<string, unknown> | null, platformId?: string | null): Promise<boolean>;
|
|
285
285
|
/**
|
|
286
286
|
* Makes an authenticated API call using the JWT token
|
|
287
287
|
* @param endpoint API endpoint path (will be appended to base URL)
|
package/dist/react.d.ts
CHANGED
|
@@ -281,7 +281,7 @@ declare class HyveClient {
|
|
|
281
281
|
* @param platformId Optional platform identifier
|
|
282
282
|
* @returns Promise resolving to boolean indicating success
|
|
283
283
|
*/
|
|
284
|
-
sendTelemetry(eventLocation: string, eventCategory: string, eventAction: string, eventSubCategory?: string | null, eventSubAction?: string | null, eventDetails?: Record<string,
|
|
284
|
+
sendTelemetry(eventLocation: string, eventCategory: string, eventAction: string, eventSubCategory?: string | null, eventSubAction?: string | null, eventDetails?: Record<string, unknown> | null, platformId?: string | null): Promise<boolean>;
|
|
285
285
|
/**
|
|
286
286
|
* Makes an authenticated API call using the JWT token
|
|
287
287
|
* @param endpoint API endpoint path (will be appended to base URL)
|
package/dist/react.js
CHANGED
|
@@ -1691,23 +1691,6 @@ var HyveClient = class {
|
|
|
1691
1691
|
return false;
|
|
1692
1692
|
}
|
|
1693
1693
|
try {
|
|
1694
|
-
if (eventDetails) {
|
|
1695
|
-
try {
|
|
1696
|
-
if (typeof eventDetails === "string") {
|
|
1697
|
-
JSON.parse(eventDetails);
|
|
1698
|
-
} else if (typeof eventDetails === "object") {
|
|
1699
|
-
JSON.stringify(eventDetails);
|
|
1700
|
-
}
|
|
1701
|
-
} catch (validationError) {
|
|
1702
|
-
logger.error("Invalid JSON in eventDetails:", validationError);
|
|
1703
|
-
logger.error("eventDetails value:", eventDetails);
|
|
1704
|
-
return false;
|
|
1705
|
-
}
|
|
1706
|
-
}
|
|
1707
|
-
const toJsonString = (data) => {
|
|
1708
|
-
if (!data) return null;
|
|
1709
|
-
return typeof data === "string" ? data : JSON.stringify(data);
|
|
1710
|
-
};
|
|
1711
1694
|
const telemetryEvent = {
|
|
1712
1695
|
game_id: this.gameId,
|
|
1713
1696
|
session_id: this.sessionId,
|
|
@@ -1717,7 +1700,7 @@ var HyveClient = class {
|
|
|
1717
1700
|
event_action: eventAction,
|
|
1718
1701
|
event_sub_category: eventSubCategory || null,
|
|
1719
1702
|
event_sub_action: eventSubAction || null,
|
|
1720
|
-
event_details:
|
|
1703
|
+
event_details: eventDetails || null
|
|
1721
1704
|
};
|
|
1722
1705
|
logger.debug("Sending telemetry event:", telemetryEvent);
|
|
1723
1706
|
const telemetryUrl = `${this.apiBaseUrl}/api/v1/analytics/send`;
|
package/dist/react.mjs
CHANGED
|
@@ -1670,23 +1670,6 @@ var HyveClient = class {
|
|
|
1670
1670
|
return false;
|
|
1671
1671
|
}
|
|
1672
1672
|
try {
|
|
1673
|
-
if (eventDetails) {
|
|
1674
|
-
try {
|
|
1675
|
-
if (typeof eventDetails === "string") {
|
|
1676
|
-
JSON.parse(eventDetails);
|
|
1677
|
-
} else if (typeof eventDetails === "object") {
|
|
1678
|
-
JSON.stringify(eventDetails);
|
|
1679
|
-
}
|
|
1680
|
-
} catch (validationError) {
|
|
1681
|
-
logger.error("Invalid JSON in eventDetails:", validationError);
|
|
1682
|
-
logger.error("eventDetails value:", eventDetails);
|
|
1683
|
-
return false;
|
|
1684
|
-
}
|
|
1685
|
-
}
|
|
1686
|
-
const toJsonString = (data) => {
|
|
1687
|
-
if (!data) return null;
|
|
1688
|
-
return typeof data === "string" ? data : JSON.stringify(data);
|
|
1689
|
-
};
|
|
1690
1673
|
const telemetryEvent = {
|
|
1691
1674
|
game_id: this.gameId,
|
|
1692
1675
|
session_id: this.sessionId,
|
|
@@ -1696,7 +1679,7 @@ var HyveClient = class {
|
|
|
1696
1679
|
event_action: eventAction,
|
|
1697
1680
|
event_sub_category: eventSubCategory || null,
|
|
1698
1681
|
event_sub_action: eventSubAction || null,
|
|
1699
|
-
event_details:
|
|
1682
|
+
event_details: eventDetails || null
|
|
1700
1683
|
};
|
|
1701
1684
|
logger.debug("Sending telemetry event:", telemetryEvent);
|
|
1702
1685
|
const telemetryUrl = `${this.apiBaseUrl}/api/v1/analytics/send`;
|