react-native-test-adx 0.1.11 → 0.1.13

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.
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
 
3
3
  /** Keep in sync with package.json "version" (published npm packages ship lib/ only). */
4
- export const SDK_VERSION = '0.1.11';
4
+ export const SDK_VERSION = '0.1.13';
@@ -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
- const payload = {
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
  }
@@ -1,3 +1,3 @@
1
1
  /** Keep in sync with package.json "version" (published npm packages ship lib/ only). */
2
- export declare const SDK_VERSION = "0.1.11";
2
+ export declare const SDK_VERSION = "0.1.13";
3
3
  //# sourceMappingURL=sdkVersion.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-test-adx",
3
- "version": "0.1.11",
3
+ "version": "0.1.13",
4
4
  "description": "Adaxon React Native / Expo SDK for event tracking and offer recommendations.",
5
5
  "main": "./lib/module/index.js",
6
6
  "types": "./lib/typescript/src/index.d.ts",