@mpgd/analytics 0.3.4 → 0.3.5
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.js +12 -12
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as
|
|
3
|
-
const __typia_transform__accessExpressionAsString =
|
|
1
|
+
import * as _assertGuard_1 from "typia/lib/internal/_assertGuard";
|
|
2
|
+
import * as _accessExpressionAsString_1 from "typia/lib/internal/_accessExpressionAsString";
|
|
3
|
+
const __typia_transform__accessExpressionAsString = _accessExpressionAsString_1._accessExpressionAsString;
|
|
4
4
|
import typia from 'typia';
|
|
5
5
|
export const assertAnalyticsEvent = (() => {
|
|
6
6
|
const _iv0 = new Set(["game_started", "leaderboard_recorded", "leaderboard_submitted", "purchase_completed", "purchase_granted", "purchase_rejected", "purchase_started", "rewarded_ad_completed", "rewarded_ad_granted", "rewarded_ad_rejected", "stage_finished"]);
|
|
7
7
|
const _av0 = new Set(["game_started", "leaderboard_recorded", "leaderboard_submitted", "purchase_completed", "purchase_granted", "purchase_rejected", "purchase_started", "rewarded_ad_completed", "rewarded_ad_granted", "rewarded_ad_rejected", "stage_finished"]);
|
|
8
8
|
const _ae0 = "(\"game_started\" | \"leaderboard_recorded\" | \"leaderboard_submitted\" | \"purchase_completed\" | \"purchase_granted\" | \"purchase_rejected\" | \"purchase_started\" | \"rewarded_ad_completed\" | \"rewarded_ad_granted\" | \"rewarded_ad_rejected\" | \"stage_finished\")";
|
|
9
|
-
const _ao0 = (input, _path, _exceptionable = true) => (true === _av0.has(input.name) ||
|
|
9
|
+
const _ao0 = (input, _path, _exceptionable = true) => (true === _av0.has(input.name) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
10
10
|
method: "typia.createAssert",
|
|
11
11
|
path: _path + ".name",
|
|
12
12
|
expected: _ae0,
|
|
13
13
|
value: input.name
|
|
14
|
-
}, _errorFactory)) && ("ait" === input.target || "android" === input.target || "browser" === input.target || "ios" === input.target || "reddit" === input.target || "server" === input.target || "tauri" === input.target || "telegram" === input.target ||
|
|
14
|
+
}, _errorFactory)) && ("ait" === input.target || "android" === input.target || "browser" === input.target || "ios" === input.target || "reddit" === input.target || "server" === input.target || "tauri" === input.target || "telegram" === input.target || _assertGuard_1._assertGuard(_exceptionable, {
|
|
15
15
|
method: "typia.createAssert",
|
|
16
16
|
path: _path + ".target",
|
|
17
17
|
expected: "(\"ait\" | \"android\" | \"browser\" | \"ios\" | \"reddit\" | \"server\" | \"tauri\" | \"telegram\")",
|
|
18
18
|
value: input.target
|
|
19
|
-
}, _errorFactory)) && ("string" === typeof input.sessionId ||
|
|
19
|
+
}, _errorFactory)) && ("string" === typeof input.sessionId || _assertGuard_1._assertGuard(_exceptionable, {
|
|
20
20
|
method: "typia.createAssert",
|
|
21
21
|
path: _path + ".sessionId",
|
|
22
22
|
expected: "string",
|
|
23
23
|
value: input.sessionId
|
|
24
|
-
}, _errorFactory)) && ("string" === typeof input.occurredAt ||
|
|
24
|
+
}, _errorFactory)) && ("string" === typeof input.occurredAt || _assertGuard_1._assertGuard(_exceptionable, {
|
|
25
25
|
method: "typia.createAssert",
|
|
26
26
|
path: _path + ".occurredAt",
|
|
27
27
|
expected: "string",
|
|
28
28
|
value: input.occurredAt
|
|
29
|
-
}, _errorFactory)) && (("object" === typeof input.properties && null !== input.properties && false === Array.isArray(input.properties) ||
|
|
29
|
+
}, _errorFactory)) && (("object" === typeof input.properties && null !== input.properties && false === Array.isArray(input.properties) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
30
30
|
method: "typia.createAssert",
|
|
31
31
|
path: _path + ".properties",
|
|
32
32
|
expected: "Record<string, AnalyticsPropertyValue>",
|
|
33
33
|
value: input.properties
|
|
34
|
-
}, _errorFactory)) && _ao1(input.properties, _path + ".properties", true && _exceptionable) ||
|
|
34
|
+
}, _errorFactory)) && _ao1(input.properties, _path + ".properties", true && _exceptionable) || _assertGuard_1._assertGuard(_exceptionable, {
|
|
35
35
|
method: "typia.createAssert",
|
|
36
36
|
path: _path + ".properties",
|
|
37
37
|
expected: "Record<string, AnalyticsPropertyValue>",
|
|
@@ -41,7 +41,7 @@ export const assertAnalyticsEvent = (() => {
|
|
|
41
41
|
const value = input[key];
|
|
42
42
|
if (undefined === value)
|
|
43
43
|
return true;
|
|
44
|
-
return "string" === typeof value || "number" === typeof value || "boolean" === typeof value ||
|
|
44
|
+
return "string" === typeof value || "number" === typeof value || "boolean" === typeof value || _assertGuard_1._assertGuard(_exceptionable, {
|
|
45
45
|
method: "typia.createAssert",
|
|
46
46
|
path: _path + __typia_transform__accessExpressionAsString(key),
|
|
47
47
|
expected: "(boolean | number | string)",
|
|
@@ -60,12 +60,12 @@ export const assertAnalyticsEvent = (() => {
|
|
|
60
60
|
return (input, errorFactory) => {
|
|
61
61
|
if (false === __is(input)) {
|
|
62
62
|
_errorFactory = errorFactory;
|
|
63
|
-
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input ||
|
|
63
|
+
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _assertGuard_1._assertGuard(true, {
|
|
64
64
|
method: "typia.createAssert",
|
|
65
65
|
path: _path + "",
|
|
66
66
|
expected: "AnalyticsEvent",
|
|
67
67
|
value: input
|
|
68
|
-
}, _errorFactory)) && _ao0(input, _path + "", true) ||
|
|
68
|
+
}, _errorFactory)) && _ao0(input, _path + "", true) || _assertGuard_1._assertGuard(true, {
|
|
69
69
|
method: "typia.createAssert",
|
|
70
70
|
path: _path + "",
|
|
71
71
|
expected: "AnalyticsEvent",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mpgd/analytics",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.5",
|
|
4
4
|
"description": "Typed analytics event schema and sink helpers for mpgd platform integrations.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -34,12 +34,12 @@
|
|
|
34
34
|
"dist"
|
|
35
35
|
],
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"typia": "
|
|
38
|
-
"@mpgd/platform": "0.5.
|
|
37
|
+
"typia": "13.0.2",
|
|
38
|
+
"@mpgd/platform": "0.5.1"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"ttsc": "0.
|
|
42
|
-
"typescript": "7.0.
|
|
41
|
+
"ttsc": "0.18.4",
|
|
42
|
+
"typescript": "7.0.2"
|
|
43
43
|
},
|
|
44
44
|
"main": "./dist/index.js",
|
|
45
45
|
"types": "./dist/index.d.ts",
|