@snowplow/react-native-tracker 4.0.2-dev.1 → 4.1.1-dev.0

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.
Files changed (94) hide show
  1. package/README.md +38 -30
  2. package/dist/commonjs/constants.js +20 -0
  3. package/dist/commonjs/constants.js.map +1 -0
  4. package/dist/commonjs/plugins/app_context/index.js +47 -0
  5. package/dist/commonjs/plugins/app_context/index.js.map +1 -0
  6. package/dist/commonjs/plugins/app_install/index.js +60 -0
  7. package/dist/commonjs/plugins/app_install/index.js.map +1 -0
  8. package/dist/commonjs/plugins/app_lifecycle/index.js +126 -0
  9. package/dist/commonjs/plugins/app_lifecycle/index.js.map +1 -0
  10. package/dist/commonjs/plugins/deep_links/index.js +64 -0
  11. package/dist/commonjs/plugins/deep_links/index.js.map +1 -0
  12. package/dist/commonjs/plugins/platform_context/index.js +749 -0
  13. package/dist/commonjs/plugins/platform_context/index.js.map +1 -0
  14. package/dist/commonjs/plugins/session/index.js +197 -0
  15. package/dist/commonjs/plugins/session/index.js.map +1 -0
  16. package/dist/commonjs/plugins.js +147 -0
  17. package/dist/commonjs/plugins.js.map +1 -0
  18. package/dist/commonjs/subject.js.map +1 -1
  19. package/dist/commonjs/tracker.js +118 -7
  20. package/dist/commonjs/tracker.js.map +1 -1
  21. package/dist/commonjs/types.js +90 -0
  22. package/dist/commonjs/types.js.map +1 -1
  23. package/dist/commonjs/utils.js +35 -0
  24. package/dist/commonjs/utils.js.map +1 -0
  25. package/dist/module/constants.js +16 -0
  26. package/dist/module/constants.js.map +1 -0
  27. package/dist/module/plugins/app_context/index.js +44 -0
  28. package/dist/module/plugins/app_context/index.js.map +1 -0
  29. package/dist/module/plugins/app_install/index.js +56 -0
  30. package/dist/module/plugins/app_install/index.js.map +1 -0
  31. package/dist/module/plugins/app_lifecycle/index.js +122 -0
  32. package/dist/module/plugins/app_lifecycle/index.js.map +1 -0
  33. package/dist/module/plugins/deep_links/index.js +60 -0
  34. package/dist/module/plugins/deep_links/index.js.map +1 -0
  35. package/dist/module/plugins/platform_context/index.js +745 -0
  36. package/dist/module/plugins/platform_context/index.js.map +1 -0
  37. package/dist/module/plugins/session/index.js +192 -0
  38. package/dist/module/plugins/session/index.js.map +1 -0
  39. package/dist/module/plugins.js +143 -0
  40. package/dist/module/plugins.js.map +1 -0
  41. package/dist/module/subject.js.map +1 -1
  42. package/dist/module/tracker.js +116 -7
  43. package/dist/module/tracker.js.map +1 -1
  44. package/dist/module/types.js +40 -0
  45. package/dist/module/types.js.map +1 -1
  46. package/dist/module/utils.js +31 -0
  47. package/dist/module/utils.js.map +1 -0
  48. package/dist/typescript/commonjs/src/constants.d.ts +14 -0
  49. package/dist/typescript/commonjs/src/constants.d.ts.map +1 -0
  50. package/dist/typescript/commonjs/src/plugins/app_context/index.d.ts +11 -0
  51. package/dist/typescript/commonjs/src/plugins/app_context/index.d.ts.map +1 -0
  52. package/dist/typescript/commonjs/src/plugins/app_install/index.d.ts +10 -0
  53. package/dist/typescript/commonjs/src/plugins/app_install/index.d.ts.map +1 -0
  54. package/dist/typescript/commonjs/src/plugins/app_lifecycle/index.d.ts +13 -0
  55. package/dist/typescript/commonjs/src/plugins/app_lifecycle/index.d.ts.map +1 -0
  56. package/dist/typescript/commonjs/src/plugins/deep_links/index.d.ts +8 -0
  57. package/dist/typescript/commonjs/src/plugins/deep_links/index.d.ts.map +1 -0
  58. package/dist/typescript/commonjs/src/plugins/platform_context/index.d.ts +12 -0
  59. package/dist/typescript/commonjs/src/plugins/platform_context/index.d.ts.map +1 -0
  60. package/dist/typescript/commonjs/src/plugins/session/index.d.ts +19 -0
  61. package/dist/typescript/commonjs/src/plugins/session/index.d.ts.map +1 -0
  62. package/dist/typescript/commonjs/src/plugins.d.ts +6 -0
  63. package/dist/typescript/commonjs/src/plugins.d.ts.map +1 -0
  64. package/dist/typescript/commonjs/src/subject.d.ts.map +1 -1
  65. package/dist/typescript/commonjs/src/tracker.d.ts +21 -2
  66. package/dist/typescript/commonjs/src/tracker.d.ts.map +1 -1
  67. package/dist/typescript/commonjs/src/types.d.ts +334 -2
  68. package/dist/typescript/commonjs/src/types.d.ts.map +1 -1
  69. package/dist/typescript/commonjs/src/utils.d.ts +3 -0
  70. package/dist/typescript/commonjs/src/utils.d.ts.map +1 -0
  71. package/dist/typescript/module/src/constants.d.ts +14 -0
  72. package/dist/typescript/module/src/constants.d.ts.map +1 -0
  73. package/dist/typescript/module/src/plugins/app_context/index.d.ts +11 -0
  74. package/dist/typescript/module/src/plugins/app_context/index.d.ts.map +1 -0
  75. package/dist/typescript/module/src/plugins/app_install/index.d.ts +10 -0
  76. package/dist/typescript/module/src/plugins/app_install/index.d.ts.map +1 -0
  77. package/dist/typescript/module/src/plugins/app_lifecycle/index.d.ts +13 -0
  78. package/dist/typescript/module/src/plugins/app_lifecycle/index.d.ts.map +1 -0
  79. package/dist/typescript/module/src/plugins/deep_links/index.d.ts +8 -0
  80. package/dist/typescript/module/src/plugins/deep_links/index.d.ts.map +1 -0
  81. package/dist/typescript/module/src/plugins/platform_context/index.d.ts +12 -0
  82. package/dist/typescript/module/src/plugins/platform_context/index.d.ts.map +1 -0
  83. package/dist/typescript/module/src/plugins/session/index.d.ts +19 -0
  84. package/dist/typescript/module/src/plugins/session/index.d.ts.map +1 -0
  85. package/dist/typescript/module/src/plugins.d.ts +6 -0
  86. package/dist/typescript/module/src/plugins.d.ts.map +1 -0
  87. package/dist/typescript/module/src/subject.d.ts.map +1 -1
  88. package/dist/typescript/module/src/tracker.d.ts +21 -2
  89. package/dist/typescript/module/src/tracker.d.ts.map +1 -1
  90. package/dist/typescript/module/src/types.d.ts +334 -2
  91. package/dist/typescript/module/src/types.d.ts.map +1 -1
  92. package/dist/typescript/module/src/utils.d.ts +3 -0
  93. package/dist/typescript/module/src/utils.d.ts.map +1 -0
  94. package/package.json +8 -3
@@ -1,4 +1,5 @@
1
- import { ConditionalContextProvider, ContextPrimitive, CorePluginConfiguration, PageViewEvent, SelfDescribingJson, StructuredEvent } from '@snowplow/tracker-core';
1
+ import { BrowserPlugin, BrowserPluginConfiguration } from '@snowplow/browser-tracker-core';
2
+ import { ConditionalContextProvider, ContextPrimitive, PageViewEvent, SelfDescribingJson, StructuredEvent } from '@snowplow/tracker-core';
2
3
  /**
3
4
  * Configuration for the event store
4
5
  */
@@ -31,6 +32,43 @@ export interface SessionConfiguration {
31
32
  */
32
33
  backgroundSessionTimeout?: number;
33
34
  }
35
+ /**
36
+ * Configuration for app lifecycle tracking
37
+ */
38
+ export interface AppLifecycleConfiguration {
39
+ /**
40
+ * Whether to automatically track app lifecycle events (app foreground and background events).
41
+ * Also adds a lifecycle context entity to all events.
42
+ *
43
+ * Foreground event schema: `iglu:com.snowplowanalytics.snowplow/application_foreground/jsonschema/1-0-0`
44
+ * Background event schema: `iglu:com.snowplowanalytics.snowplow/application_background/jsonschema/1-0-0`
45
+ * Context entity schema: `iglu:com.snowplowanalytics.mobile/application_lifecycle/jsonschema/1-0-0`
46
+ *
47
+ * @defaultValue true
48
+ */
49
+ lifecycleAutotracking?: boolean;
50
+ /**
51
+ * Whether to automatically track app install event on first run.
52
+ *
53
+ * Schema: `iglu:com.snowplowanalytics.mobile/application_install/jsonschema/1-0-0`
54
+ *
55
+ * @defaultValue false
56
+ */
57
+ installAutotracking?: boolean;
58
+ /**
59
+ * Version number of the application e.g 1.1.0 (semver or git commit hash).
60
+ *
61
+ * Entity schema if `appBuild` property is set: `iglu:com.snowplowanalytics.mobile/application/jsonschema/1-0-0`
62
+ * Entity schema if `appBuild` property is not set: `iglu:com.snowplowanalytics.snowplow/application/jsonschema/1-0-0`
63
+ */
64
+ appVersion?: string;
65
+ /**
66
+ * Build name of the application e.g s9f2k2d or 1.1.0 beta
67
+ *
68
+ * Entity schema: `iglu:com.snowplowanalytics.mobile/application/jsonschema/1-0-0`
69
+ */
70
+ appBuild?: string;
71
+ }
34
72
  /**
35
73
  * The configuration object for initialising the tracker
36
74
  */
@@ -44,6 +82,190 @@ export interface TrackerConfiguration {
44
82
  * @defaultValue false
45
83
  **/
46
84
  encodeBase64?: boolean;
85
+ /**
86
+ * Inject plugins which will be evaluated for each event
87
+ * @defaultValue []
88
+ */
89
+ plugins?: BrowserPlugin[];
90
+ }
91
+ export declare enum PlatformContextProperty {
92
+ /**
93
+ * The carrier of the SIM inserted in the device.
94
+ * Note: this property is not automatically assigned but can be assigned using the PlatformContextRetriever.
95
+ */
96
+ Carrier = "carrier",
97
+ /**
98
+ * Type of network the device is connected to.
99
+ * Note: this property is not automatically assigned but can be assigned using the PlatformContextRetriever.
100
+ */
101
+ NetworkType = "networkType",
102
+ /**
103
+ * Radio access technology that the device is using.
104
+ * Note: this property is not automatically assigned but can be assigned using the PlatformContextRetriever.
105
+ */
106
+ NetworkTechnology = "networkTechnology",
107
+ /**
108
+ * Advertising identifier on iOS.
109
+ * Note: this property is not automatically assigned but can be assigned using the PlatformContextRetriever.
110
+ */
111
+ AppleIdfa = "appleIdfa",
112
+ /**
113
+ * UUID identifier for vendors on iOS.
114
+ * Note: this property is not automatically assigned but can be assigned using the PlatformContextRetriever.
115
+ */
116
+ AppleIdfv = "appleIdfv",
117
+ /**
118
+ * Total physical system memory in bytes.
119
+ * Note: this property is not automatically assigned but can be assigned using the PlatformContextRetriever.
120
+ */
121
+ PhysicalMemory = "physicalMemory",
122
+ /**
123
+ * Amount of memory in bytes available to the current app.
124
+ * The property is not tracked in the current version of the tracker due to the tracker not being able to access the API, see the issue here: https://github.com/snowplow/snowplow-ios-tracker/issues/772
125
+ * Note: this property is not automatically assigned but can be assigned using the PlatformContextRetriever.
126
+ */
127
+ AppAvailableMemory = "appAvailableMemory",
128
+ /**
129
+ * Remaining battery level as an integer percentage of total battery capacity.
130
+ * Note: this property is not automatically assigned but can be assigned using the PlatformContextRetriever.
131
+ */
132
+ BatteryLevel = "batteryLevel",
133
+ /**
134
+ * Battery state for the device.
135
+ * Note: this property is not automatically assigned but can be assigned using the PlatformContextRetriever.
136
+ */
137
+ BatteryState = "batteryState",
138
+ /** A Boolean indicating whether Low Power Mode is enabled. */
139
+ LowPowerMode = "lowPowerMode",
140
+ /**
141
+ * Bytes of storage remaining.
142
+ * Note: This is not automatically assigned by the tracker as it may be considered as fingerprinting. You can assign it using the PlatformContextRetriever.
143
+ */
144
+ AvailableStorage = "availableStorage",
145
+ /**
146
+ * Total size of storage in bytes.
147
+ * Note: This is not automatically assigned by the tracker as it may be considered as fingerprinting. You can assign it using the PlatformContextRetriever.
148
+ */
149
+ TotalStorage = "totalStorage",
150
+ /**
151
+ * A Boolean indicating whether the device orientation is portrait (either upright or upside down).
152
+ * Note: This is not automatically assigned by the tracker as it may be considered as fingerprinting. You can assign it using the PlatformContextRetriever.
153
+ */
154
+ IsPortrait = "isPortrait",
155
+ /**
156
+ * Screen resolution in pixels. Arrives in the form of WIDTHxHEIGHT (e.g., 1200x900). Doesn't change when device orientation changes.
157
+ * Note: This is not automatically assigned by the tracker as it may be considered as fingerprinting. You can assign it using the PlatformContextRetriever.
158
+ */
159
+ Resolution = "resolution",
160
+ /**
161
+ * Scale factor used to convert logical coordinates to device coordinates of the screen (uses UIScreen.scale on iOS).
162
+ */
163
+ Scale = "scale",
164
+ /**
165
+ * System language currently used on the device (ISO 639).
166
+ */
167
+ Language = "language",
168
+ /**
169
+ * Advertising identifier on Android.
170
+ * Note: This is not automatically assigned by the tracker as it may be considered as fingerprinting. You can assign it using the PlatformContextRetriever.
171
+ */
172
+ AndroidIdfa = "androidIdfa",
173
+ /**
174
+ * Available memory on the system in bytes (Android only).
175
+ * Note: This is not automatically assigned by the tracker as it may be considered as fingerprinting. You can assign it using the PlatformContextRetriever.
176
+ */
177
+ SystemAvailableMemory = "systemAvailableMemory",
178
+ /**
179
+ * Android vendor ID scoped to the set of apps published under the same Google Play developer account (see https://developer.android.com/training/articles/app-set-id).
180
+ * Note: This is not automatically assigned by the tracker as it may be considered as fingerprinting. You can assign it using the PlatformContextRetriever.
181
+ */
182
+ AppSetId = "appSetId",
183
+ /**
184
+ * Scope of the `appSetId`. Can be scoped to the app or to a developer account on an app store (all apps from the same developer on the same device will have the same ID).
185
+ * Note: This is not automatically assigned by the tracker as it may be considered as fingerprinting. You can assign it using the PlatformContextRetriever.
186
+ */
187
+ AppSetIdScope = "appSetIdScope"
188
+ }
189
+ /**
190
+ * Overrides for the values for properties of the platform context.
191
+ */
192
+ export interface PlatformContextRetriever {
193
+ /** Operating system type (e.g., ios, tvos, watchos, osx, android) */
194
+ getOsType?: () => Promise<string>;
195
+ /** The current version of the operating system */
196
+ getOsVersion?: () => Promise<string>;
197
+ /** The end-user-visible name for the end product */
198
+ getDeviceModel?: () => Promise<string>;
199
+ /** The manufacturer of the product/hardware */
200
+ getDeviceManufacturer?: () => Promise<string>;
201
+ /** The carrier of the SIM inserted in the device */
202
+ getCarrier?: () => Promise<string | undefined>;
203
+ /** Type of network the device is connected to */
204
+ getNetworkType?: () => Promise<'mobile' | 'wifi' | 'offline' | undefined>;
205
+ /** Radio access technology that the device is using */
206
+ getNetworkTechnology?: () => Promise<string | undefined>;
207
+ /** Advertising identifier on iOS (UUID formatted string) */
208
+ getAppleIdfa?: () => Promise<string | undefined>;
209
+ /** UUID identifier for vendors on iOS */
210
+ getAppleIdfv?: () => Promise<string | undefined>;
211
+ /** Bytes of storage remaining */
212
+ getAvailableStorage?: () => Promise<number | undefined>;
213
+ /** Total size of storage in bytes */
214
+ getTotalStorage?: () => Promise<number | undefined>;
215
+ /** Total physical system memory in bytes */
216
+ getPhysicalMemory?: () => Promise<number | undefined>;
217
+ /** Amount of memory in bytes available to the current app */
218
+ getAppAvailableMemory?: () => Promise<number | undefined>;
219
+ /** Remaining battery level as an integer percentage of total battery capacity */
220
+ getBatteryLevel?: () => Promise<number | undefined>;
221
+ /** Battery state for the device */
222
+ getBatteryState?: () => Promise<'unplugged' | 'charging' | 'full' | undefined>;
223
+ /** A Boolean indicating whether Low Power Mode is enabled */
224
+ getLowPowerMode?: () => Promise<boolean | undefined>;
225
+ /** A Boolean indicating whether the device orientation is portrait (either upright or upside down) */
226
+ isPortrait?: () => Promise<boolean | undefined>;
227
+ /** Screen resolution in pixels. Arrives in the form of WIDTHxHEIGHT (e.g., 1200x900). Doesn't change when device orientation changes */
228
+ getResolution?: () => Promise<string | undefined>;
229
+ /** Scale factor used to convert logical coordinates to device coordinates of the screen (uses UIScreen.scale on iOS) */
230
+ getScale?: () => Promise<number | undefined>;
231
+ /** System language currently used on the device (ISO 639) */
232
+ getLanguage?: () => Promise<string | undefined>;
233
+ /** Advertising identifier on Android. */
234
+ getAndroidIdfa?: () => Promise<string | undefined>;
235
+ /** Available memory on the system in bytes (Android only). */
236
+ getSystemAvailableMemory?: () => Promise<number | undefined>;
237
+ /** Android vendor ID scoped to the set of apps published under the same Google Play developer account (see https://developer.android.com/training/articles/app-set-id). */
238
+ getAppSetId?: () => Promise<string | undefined>;
239
+ /** Scope of the `appSetId`. Can be scoped to the app or to a developer account on an app store (all apps from the same developer on the same device will have the same ID). */
240
+ getAppSetIdScope?: () => Promise<string | undefined>;
241
+ }
242
+ export interface PlatformContextConfiguration {
243
+ /**
244
+ * Whether to track the mobile context with information about the device.
245
+ * Note: Only some properties (osType, osVersion, deviceManufacturer, deviceModel, resolution, language, scale) will be tracked by default. Other properties can be assigned using the PlatformContextRetriever.
246
+ * @defaultValue true
247
+ */
248
+ platformContext?: boolean;
249
+ /**
250
+ * List of properties of the platform context to track. If not passed and `platformContext` is enabled, all available properties will be tracked.
251
+ * The required `osType`, `osVersion`, `deviceManufacturer`, and `deviceModel` properties will be tracked in the entity regardless of this setting.
252
+ */
253
+ platformContextProperties?: PlatformContextProperty[];
254
+ /**
255
+ * Set of callbacks to be used to retrieve properties of the platform context.
256
+ * Overrides the tracker implementation for setting the properties.
257
+ */
258
+ platformContextRetriever?: PlatformContextRetriever;
259
+ }
260
+ /**
261
+ * Configuration for deep link tracking
262
+ */
263
+ export interface DeepLinkConfiguration {
264
+ /**
265
+ * Whether to track the deep link context entity with information from the deep link received event on the first screen view event.
266
+ * @defaultValue true
267
+ */
268
+ deepLinkContext?: boolean;
47
269
  }
48
270
  /**
49
271
  * Configuration of subject properties tracked with events
@@ -304,10 +526,51 @@ export declare type DeepLinkReceivedProps = {
304
526
  */
305
527
  referrer?: string;
306
528
  };
529
+ /**
530
+ * Current session state that is tracked in events.
531
+ */
532
+ export interface SessionState {
533
+ /**
534
+ * An identifier for the user of the session
535
+ */
536
+ userId: string;
537
+ /**
538
+ * An identifier for the session
539
+ */
540
+ sessionId: string;
541
+ /**
542
+ * The index of the current session for this user
543
+ */
544
+ sessionIndex: number;
545
+ /**
546
+ * Optional index of the current event in the session
547
+ */
548
+ eventIndex?: number;
549
+ /**
550
+ * The previous session identifier for this user
551
+ */
552
+ previousSessionId?: string;
553
+ /**
554
+ * The mechanism that the session information has been stored on the device
555
+ */
556
+ storageMechanism: string;
557
+ /**
558
+ * The optional identifier of the first event for this session
559
+ */
560
+ firstEventId?: string;
561
+ /**
562
+ * Optional date-time timestamp of when the first event in the session was tracked
563
+ */
564
+ firstEventTimestamp?: string;
565
+ }
307
566
  /**
308
567
  * The ReactNativeTracker type
309
568
  */
310
569
  export declare type ReactNativeTracker = {
570
+ /**
571
+ * The namespace of the tracker
572
+ */
573
+ namespace: string;
311
574
  /**
312
575
  * Tracks a self-describing event
313
576
  *
@@ -316,6 +579,27 @@ export declare type ReactNativeTracker = {
316
579
  * @typeParam TData - The type of the data object within the SelfDescribing object
317
580
  */
318
581
  readonly trackSelfDescribingEvent: <T extends Record<string, unknown> = Record<string, unknown>>(argmap: SelfDescribingJson<T>, contexts?: EventContext[]) => void;
582
+ /**
583
+ * Tracks a screen-view event
584
+ *
585
+ * @param argmap - The screen-view event's properties
586
+ * @param contexts - The array of event contexts
587
+ */
588
+ readonly trackScreenViewEvent: (argmap: ScreenViewProps, contexts?: EventContext[]) => void;
589
+ /**
590
+ * Tracks a scroll changed event
591
+ *
592
+ * @param argmap - The scroll changed event's properties
593
+ * @param contexts - The array of event contexts
594
+ */
595
+ readonly trackScrollChangedEvent: (argmap: ScrollChangedProps, contexts?: EventContext[]) => void;
596
+ /**
597
+ * Tracks a list item view event
598
+ *
599
+ * @param argmap - The list item view event's properties
600
+ * @param contexts - The array of event contexts
601
+ */
602
+ readonly trackListItemViewEvent: (argmap: ListItemViewProps, contexts?: EventContext[]) => void;
319
603
  /**
320
604
  * Tracks a structured event
321
605
  *
@@ -337,6 +621,13 @@ export declare type ReactNativeTracker = {
337
621
  * @param contexts - The array of event contexts
338
622
  */
339
623
  readonly trackTimingEvent: (argmap: TimingProps, contexts?: EventContext[]) => void;
624
+ /**
625
+ * Tracks a deep link received event
626
+ *
627
+ * @param argmap - The deep link received event properties
628
+ * @param contexts - The array of event contexts
629
+ */
630
+ readonly trackDeepLinkReceivedEvent: (argmap: DeepLinkReceivedProps, contexts?: EventContext[]) => void;
340
631
  /**
341
632
  * Tracks a message notification event
342
633
  *
@@ -362,7 +653,7 @@ export declare type ReactNativeTracker = {
362
653
  * Add a plugin into the plugin collection after Core has already been initialised
363
654
  * @param configuration - The plugin to add
364
655
  */
365
- addPlugin(configuration: CorePluginConfiguration): void;
656
+ addPlugin(configuration: BrowserPluginConfiguration): void;
366
657
  /**
367
658
  * Calls flush on all emitters in order to send all queued events to the collector
368
659
  * @returns Promise<void> - Promise that resolves when all emitters have flushed
@@ -447,6 +738,47 @@ export declare type ReactNativeTracker = {
447
738
  * @param config - The new subject data
448
739
  */
449
740
  readonly setSubjectData: (config: SubjectConfiguration) => void;
741
+ /**
742
+ * Gets the identifier for the user of the session
743
+ */
744
+ readonly getSessionUserId: () => Promise<string | undefined>;
745
+ /**
746
+ * Gets the identifier for the session
747
+ */
748
+ readonly getSessionId: () => Promise<string | undefined>;
749
+ /**
750
+ * Gets the index of the current session for this user
751
+ */
752
+ readonly getSessionIndex: () => Promise<number | undefined>;
753
+ /**
754
+ * Gets the current session state
755
+ */
756
+ readonly getSessionState: () => Promise<SessionState | undefined>;
757
+ /**
758
+ * Gets whether the app is currently in background state
759
+ */
760
+ readonly getIsInBackground: () => boolean | undefined;
761
+ /**
762
+ * Gets the number of background transitions in the current session
763
+ */
764
+ readonly getBackgroundIndex: () => number | undefined;
765
+ /**
766
+ * Gets the number of foreground transitions in the current session.
767
+ */
768
+ readonly getForegroundIndex: () => number | undefined;
769
+ /**
770
+ * Enables tracking the platform context with information about the device.
771
+ * Note: Only some properties (osType, osVersion, deviceManufacturer, deviceModel, resolution, language, scale) will be tracked by default. Other properties can be assigned using the PlatformContextRetriever.
772
+ */
773
+ readonly enablePlatformContext: () => Promise<void>;
774
+ /**
775
+ * Disables tracking the platform context with information about the device.
776
+ */
777
+ readonly disablePlatformContext: () => void;
778
+ /**
779
+ * Refreshes the platform context with the latest values.
780
+ */
781
+ readonly refreshPlatformContext: () => Promise<void>;
450
782
  };
451
783
  export { version, PageViewEvent, StructuredEvent, FormFocusOrChangeEvent, SelfDescribingJson, Timestamp, PayloadBuilder, Payload, CorePlugin, CoreConfiguration, ContextGenerator, ContextFilter, EventPayloadAndContext, EventStore, EventStoreIterator, EventStorePayload, TrackerCore, Logger, EmitterConfiguration, EmitterConfigurationBase, EventJson, JsonProcessor, TrueTimestamp, DeviceTimestamp, EventMethod, RequestFailure, EventBatch, EventJsonWithKeys, LOG_LEVEL, ConditionalContextProvider, ContextPrimitive, CorePluginConfiguration, Emitter, FilterProvider, RuleSetProvider, RuleSet, } from '@snowplow/tracker-core';
452
784
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,0BAA0B,EAC1B,gBAAgB,EAChB,uBAAuB,EACvB,aAAa,EACb,kBAAkB,EAClB,eAAe,EAChB,MAAM,wBAAwB,CAAC;AAEhC;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B;;;OAGG;IACH,4BAA4B,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AAW,EACX,MAAM,EACN,oBAAoB,EACpB,wBAAwB,EACxB,SAAS,EACT,aAAa,EACb,aAAa,EACb,eAAe,EACf,WAAW,EACX,cAAc,EACd,UAAU,EACV,iBAAiB,EACjB,SAAS,EACT,0BAA0B,EAC1B,gBAAgB,EAChB,uBAAuB,EACvB,OAAO,EACP,cAAc,EACd,eAAe,EACf,OAAO,GACR,MAAM,wBAAwB,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AAC3F,OAAO,EACL,0BAA0B,EAC1B,gBAAgB,EAChB,aAAa,EACb,kBAAkB,EAClB,eAAe,EAChB,MAAM,wBAAwB,CAAC;AAEhC;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B;;;OAGG;IACH,4BAA4B,CAAC,EAAE,OAAO,CAAC;CACxC;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC;;;OAGG;IACH,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC;;;OAGG;IACH,wBAAwB,CAAC,EAAE,MAAM,CAAC;CACnC;AAED;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC;;;;;;;;;OASG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC;;;;;;OAMG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B;;;;;OAKG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,mCAAmC;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB,yBAAyB;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;QAGI;IACJ,YAAY,CAAC,EAAE,O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AAM,wBAAwB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { PayloadBuilder } from '@snowplow/tracker-core';
2
+ export declare function getUsefulSchema(sb: PayloadBuilder): string;
3
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAKxD,wBAAgB,eAAe,CAAC,EAAE,EAAE,cAAc,GAAG,MAAM,CAW1D"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@snowplow/react-native-tracker",
3
- "version": "4.0.2-dev.1",
3
+ "version": "4.1.1-dev.0",
4
4
  "description": "React Native tracker for Snowplow",
5
5
  "keywords": [
6
6
  "snowplow",
@@ -46,7 +46,10 @@
46
46
  "@react-native-async-storage/async-storage": "~2.0.0",
47
47
  "react-native-get-random-values": "~1.11.0",
48
48
  "tslib": "^2.3.1",
49
- "@snowplow/tracker-core": "4.0.2-dev.1"
49
+ "uuid": "^10.0.0",
50
+ "@snowplow/tracker-core": "4.1.1-dev.0",
51
+ "@snowplow/browser-tracker-core": "4.1.1-dev.0",
52
+ "@snowplow/browser-plugin-screen-tracking": "4.1.1-dev.0"
50
53
  },
51
54
  "devDependencies": {
52
55
  "@typescript-eslint/eslint-plugin": "~5.15.0",
@@ -55,13 +58,15 @@
55
58
  "typescript": "~4.6.2",
56
59
  "@types/jest": "~28.1.1",
57
60
  "@types/node": "~14.6.0",
61
+ "@types/uuid": "^10.0.0",
58
62
  "jest": "~28.1.3",
59
63
  "react": "18.2.0",
60
64
  "ts-jest": "~28.0.8",
61
65
  "@types/react": "^18.2.44",
62
66
  "react-native": "0.74.5",
63
67
  "node-fetch": "~3.3.2",
64
- "react-native-builder-bob": "^0.30.3"
68
+ "react-native-builder-bob": "^0.30.3",
69
+ "@snowplow/browser-plugin-snowplow-ecommerce": "4.1.1-dev.0"
65
70
  },
66
71
  "resolutions": {
67
72
  "@types/react": "^18.2.44"