react-native-test-adx 0.1.11 → 0.1.12
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/lib/module/sdkVersion.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
import { DEFAULT_EVENT_TYPE } from "../../config/ApiConstants.js";
|
|
3
4
|
import { createUuid } from "../../utils/uuid.js";
|
|
4
5
|
export class EventBuilder {
|
|
5
6
|
sessionId = createUuid();
|
|
@@ -18,9 +19,10 @@ export class EventBuilder {
|
|
|
18
19
|
const user = {
|
|
19
20
|
anonymous_id: await deviceInfo.getUniqueId()
|
|
20
21
|
};
|
|
21
|
-
|
|
22
|
+
return {
|
|
22
23
|
event_id: input.eventId ?? createUuid(),
|
|
23
24
|
event_name: input.eventName,
|
|
25
|
+
event_type: input.eventType || DEFAULT_EVENT_TYPE,
|
|
24
26
|
event_time: input.eventTime ?? new Date().toISOString(),
|
|
25
27
|
app_id: appId,
|
|
26
28
|
properties: input.properties ?? {},
|
|
@@ -32,9 +34,5 @@ export class EventBuilder {
|
|
|
32
34
|
},
|
|
33
35
|
network: await networkInfo.getNetworkInfo()
|
|
34
36
|
};
|
|
35
|
-
if (input.eventType) {
|
|
36
|
-
payload.event_type = input.eventType;
|
|
37
|
-
}
|
|
38
|
-
return payload;
|
|
39
37
|
}
|
|
40
38
|
}
|
package/package.json
CHANGED