@trackunit/iris-app-runtime-core 0.3.38 → 0.3.40

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/index.cjs CHANGED
@@ -57,6 +57,25 @@ const getHostConnector = () => {
57
57
  return hostConnector.promise;
58
58
  };
59
59
 
60
+ const AnalyticsContextRuntime = {
61
+ logPageView: (details) => __awaiter(void 0, void 0, void 0, function* () {
62
+ const api = yield getHostConnector();
63
+ api.logPageView(details);
64
+ }),
65
+ logError: (details) => __awaiter(void 0, void 0, void 0, function* () {
66
+ const api = yield getHostConnector();
67
+ api.logError(details);
68
+ }),
69
+ logEvent: (eventName, details, nameSupplement) => __awaiter(void 0, void 0, void 0, function* () {
70
+ const api = yield getHostConnector();
71
+ api.logEvent(eventName, details, nameSupplement);
72
+ }),
73
+ setUserProperty: (name, data) => __awaiter(void 0, void 0, void 0, function* () {
74
+ const api = yield getHostConnector();
75
+ api.setUserProperty(name, data);
76
+ }),
77
+ };
78
+
60
79
  const AssetRuntime = {
61
80
  getAssetInfo: () => __awaiter(void 0, void 0, void 0, function* () {
62
81
  const api = yield getHostConnector();
@@ -317,6 +336,7 @@ const UserSubscriptionRuntime = {
317
336
  }),
318
337
  };
319
338
 
339
+ exports.AnalyticsContextRuntime = AnalyticsContextRuntime;
320
340
  exports.AssetRuntime = AssetRuntime;
321
341
  exports.AssetSortingRuntime = AssetSortingRuntime;
322
342
  exports.CurrentUserRuntime = CurrentUserRuntime;
package/index.js CHANGED
@@ -54,6 +54,25 @@ const getHostConnector = () => {
54
54
  return hostConnector.promise;
55
55
  };
56
56
 
57
+ const AnalyticsContextRuntime = {
58
+ logPageView: (details) => __awaiter(void 0, void 0, void 0, function* () {
59
+ const api = yield getHostConnector();
60
+ api.logPageView(details);
61
+ }),
62
+ logError: (details) => __awaiter(void 0, void 0, void 0, function* () {
63
+ const api = yield getHostConnector();
64
+ api.logError(details);
65
+ }),
66
+ logEvent: (eventName, details, nameSupplement) => __awaiter(void 0, void 0, void 0, function* () {
67
+ const api = yield getHostConnector();
68
+ api.logEvent(eventName, details, nameSupplement);
69
+ }),
70
+ setUserProperty: (name, data) => __awaiter(void 0, void 0, void 0, function* () {
71
+ const api = yield getHostConnector();
72
+ api.setUserProperty(name, data);
73
+ }),
74
+ };
75
+
57
76
  const AssetRuntime = {
58
77
  getAssetInfo: () => __awaiter(void 0, void 0, void 0, function* () {
59
78
  const api = yield getHostConnector();
@@ -314,4 +333,4 @@ const UserSubscriptionRuntime = {
314
333
  }),
315
334
  };
316
335
 
317
- export { AssetRuntime, AssetSortingRuntime, CurrentUserRuntime, CustomFieldRuntime, EnvironmentRuntime, GlobalSelectionRuntime, NavigationRuntime, ParamsRuntime, RestRuntime, SiteRuntime, ToastRuntime, TokenRuntime, UserSubscriptionRuntime, getCustomFieldValueFromRawValue, getDateValue, getHostConnector, getStringValue, setupHostConnector };
336
+ export { AnalyticsContextRuntime, AssetRuntime, AssetSortingRuntime, CurrentUserRuntime, CustomFieldRuntime, EnvironmentRuntime, GlobalSelectionRuntime, NavigationRuntime, ParamsRuntime, RestRuntime, SiteRuntime, ToastRuntime, TokenRuntime, UserSubscriptionRuntime, getCustomFieldValueFromRawValue, getDateValue, getHostConnector, getStringValue, setupHostConnector };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/iris-app-runtime-core",
3
- "version": "0.3.38",
3
+ "version": "0.3.40",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "module": "./index.js",
@@ -8,8 +8,8 @@
8
8
  "type": "module",
9
9
  "types": "./src/index.d.ts",
10
10
  "dependencies": {
11
- "@trackunit/iris-app-runtime-core-api": "0.3.32",
12
- "@trackunit/react-core-contexts-api": "0.2.29"
11
+ "@trackunit/iris-app-runtime-core-api": "0.3.34",
12
+ "@trackunit/react-core-contexts-api": "0.2.31"
13
13
  },
14
14
  "peerDependencies": {}
15
15
  }
@@ -0,0 +1,2 @@
1
+ import { IAnalyticsContextAsync } from "@trackunit/react-core-contexts-api";
2
+ export declare const AnalyticsContextRuntime: IAnalyticsContextAsync<{}>;
package/src/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export * from "@trackunit/iris-app-runtime-core-api";
2
+ export * from "./AnalyticsRuntime";
2
3
  export * from "./AssetRuntime";
3
4
  export * from "./AssetSortingRuntime";
4
5
  export * from "./CurrentUserRuntime";