@snowplow/react-native-tracker 0.2.0 → 1.1.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.
package/dist/index.d.ts CHANGED
@@ -3,62 +3,280 @@
3
3
  */
4
4
  declare type HttpMethod = 'post' | 'get';
5
5
  /**
6
- * HttpProtocol type
6
+ * DevicePlatform type
7
7
  */
8
- declare type HttpProtocol = 'https' | 'http';
8
+ declare type DevicePlatform = 'web' | 'mob' | 'pc' | 'srv' | 'app' | 'tv' | 'cnsl' | 'iot';
9
9
  /**
10
- * The Subject Data
10
+ * LogLevel type
11
11
  */
12
- declare type SubjectData = {
12
+ declare type LogLevel = 'off' | 'error' | 'debug' | 'verbose';
13
+ /**
14
+ * BasisForProsessing
15
+ */
16
+ declare type Basis = 'consent' | 'contract' | 'legal_obligation' | 'legitimate_interests' | 'public_task' | 'vital_interests';
17
+ /**
18
+ * BufferOption
19
+ */
20
+ declare type BufferOption = 'single' | 'default' | 'large';
21
+ /**
22
+ * Trigger for MessageNotification event
23
+ */
24
+ declare type Trigger = 'push' | 'location' | 'calendar' | 'timeInterval' | 'other';
25
+ /**
26
+ * ScreenSize
27
+ */
28
+ declare type ScreenSize = [number, number];
29
+ /**
30
+ * SelfDescribing type
31
+ */
32
+ declare type SelfDescribing = {
13
33
  /**
14
- * user id
34
+ * Schema
15
35
  */
16
- userId?: string;
36
+ schema: string;
17
37
  /**
18
- * screen width (integer)
38
+ * Data
19
39
  */
20
- screenWidth?: number;
40
+ data: Record<string, unknown>;
41
+ };
42
+ /**
43
+ * EventContext type
44
+ */
45
+ declare type EventContext = SelfDescribing;
46
+ /**
47
+ * NetworkConfiguration
48
+ */
49
+ interface NetworkConfiguration {
21
50
  /**
22
- * screen height (integer)
51
+ * The collector endpoint
52
+ * - if the protocol is not included it defaults to https
23
53
  */
24
- screenHeight?: number;
54
+ endpoint: string;
25
55
  /**
26
- * color depth (integer)
56
+ * The Http Method to use when sending events to the collector
57
+ * @defaultValue 'post'
58
+ */
59
+ method?: HttpMethod;
60
+ }
61
+ /**
62
+ * TrackerConfiguration
63
+ */
64
+ interface TrackerConfiguration {
65
+ /**
66
+ * Identifier of the app.
27
67
  */
28
- colorDepth?: number;
68
+ appId?: string;
29
69
  /**
30
- * timezone
70
+ * The device platform the tracker runs on.
71
+ * @defaultValue 'mob'
31
72
  */
32
- timezone?: string;
73
+ devicePlatform?: DevicePlatform;
33
74
  /**
34
- * language
75
+ * Whether payload JSON data should be base64 encoded.
76
+ * @defaultValue true
35
77
  */
36
- language?: string;
78
+ base64Encoding?: boolean;
37
79
  /**
38
- * IP address
80
+ * The log level of tracker logs.
81
+ * @defaultValue 'off'
82
+ */
83
+ logLevel?: LogLevel;
84
+ /**
85
+ * Whether application context is attached to tracked events.
86
+ * @defaultValue true
87
+ */
88
+ applicationContext?: boolean;
89
+ /**
90
+ * Whether platform context is attached to tracked events.
91
+ * @defaultValue true
92
+ */
93
+ platformContext?: boolean;
94
+ /**
95
+ * Whether geo-location context is attached to tracked events.
96
+ * @defaultValue false
97
+ */
98
+ geoLocationContext?: boolean;
99
+ /**
100
+ * Whether session context is attached to tracked events.
101
+ * @defaultValue true
102
+ */
103
+ sessionContext?: boolean;
104
+ /**
105
+ * Whether to attach a Deep Link entity to the first ScreenView tracked in the tracker after DeepLinkReceived event.
106
+ * @defaultValue true
107
+ */
108
+ deepLinkContext?: boolean;
109
+ /**
110
+ * Whether screen context is attached to tracked events.
111
+ * @defaultValue true
112
+ */
113
+ screenContext?: boolean;
114
+ /**
115
+ * Whether enable automatic tracking of ScreenView events.
116
+ * @defaultValue true
117
+ */
118
+ screenViewAutotracking?: boolean;
119
+ /**
120
+ * Whether enable automatic tracking of background and foreground transitions.
121
+ * @defaultValue false
122
+ */
123
+ lifecycleAutotracking?: boolean;
124
+ /**
125
+ * Whether enable automatic tracking of install event.
126
+ * @defaultValue true
127
+ */
128
+ installAutotracking?: boolean;
129
+ /**
130
+ * Whether enable crash reporting.
131
+ * @defaultValue true
132
+ */
133
+ exceptionAutotracking?: boolean;
134
+ /**
135
+ * Whether enable diagnostic reporting.
136
+ * @defaultValue false
137
+ */
138
+ diagnosticAutotracking?: boolean;
139
+ }
140
+ /**
141
+ * SessionConfiguration
142
+ */
143
+ interface SessionConfiguration {
144
+ /**
145
+ * The amount of time in seconds before the session id is updated while the app is in the foreground
146
+ * @defaultValue 1800
147
+ */
148
+ foregroundTimeout: number;
149
+ /**
150
+ * The amount of time in seconds before the session id is updated while the app is in the background
151
+ * @defaultValue 1800
152
+ */
153
+ backgroundTimeout: number;
154
+ }
155
+ /**
156
+ * EmitterConfiguration
157
+ */
158
+ interface EmitterConfiguration {
159
+ /**
160
+ * The buffer option for post requests.
161
+ * @defaultValue 'single'
162
+ */
163
+ bufferOption?: BufferOption;
164
+ /**
165
+ * Maximum number of events collected from the EventStore to be sent in a request.
166
+ * @defaultValue 150
167
+ */
168
+ emitRange?: number;
169
+ /**
170
+ *Maximum number of threads working in parallel in the tracker to send requests.
171
+ * @defaultValue 15
172
+ */
173
+ threadPoolSize?: number;
174
+ /**
175
+ * Maximum amount of bytes allowed to be sent in a payload in a POST request.
176
+ * @defaultValue 40000
177
+ */
178
+ byteLimitPost?: number;
179
+ /**
180
+ * Maximum amount of bytes allowed to be sent in a payload in a GET request.
181
+ * @defaultValue 40000
39
182
  */
40
- ipAddress?: string;
183
+ byteLimitGet?: number;
184
+ }
185
+ /**
186
+ * SubjectConfiguration
187
+ */
188
+ interface SubjectConfiguration {
189
+ [index: string]: unknown;
41
190
  /**
42
- * user agent
191
+ * user id
43
192
  */
44
- useragent?: string;
193
+ userId?: string | null;
45
194
  /**
46
195
  * network user id (UUIDv4)
47
196
  */
48
- networkUserId?: string;
197
+ networkUserId?: string | null;
49
198
  /**
50
199
  * domain user id
51
200
  */
52
- domainUserId?: string;
201
+ domainUserId?: string | null;
53
202
  /**
54
- * viewport width (integer)
203
+ * The custom user-agent. It overrides the user-agent used by default.
55
204
  */
56
- viewportWidth?: number;
205
+ useragent?: string | null;
57
206
  /**
58
- * viewport height (integer)
207
+ * IP address
59
208
  */
60
- viewportHeight?: number;
61
- };
209
+ ipAddress?: string | null;
210
+ /**
211
+ * The timezone label
212
+ */
213
+ timezone?: string | null;
214
+ /**
215
+ * The language set in the device
216
+ */
217
+ language?: string | null;
218
+ /**
219
+ * The screen resolution
220
+ */
221
+ screenResolution?: ScreenSize | null;
222
+ /**
223
+ * The screen viewport size
224
+ */
225
+ screenViewport?: ScreenSize | null;
226
+ /**
227
+ * color depth (integer)
228
+ */
229
+ colorDepth?: number | null;
230
+ }
231
+ /**
232
+ * GdprConfiguration
233
+ */
234
+ interface GdprConfiguration {
235
+ /**
236
+ * Basis for processing
237
+ */
238
+ basisForProcessing: Basis;
239
+ /**
240
+ * ID of a GDPR basis document.
241
+ */
242
+ documentId: string;
243
+ /**
244
+ * Version of the document.
245
+ */
246
+ documentVersion: string;
247
+ /**
248
+ * Description of the document.
249
+ */
250
+ documentDescription: string;
251
+ }
252
+ /**
253
+ * Global Context
254
+ */
255
+ interface GlobalContext {
256
+ /**
257
+ * tag
258
+ */
259
+ tag: string;
260
+ /**
261
+ * contexts
262
+ */
263
+ globalContexts: SelfDescribing[];
264
+ }
265
+ /**
266
+ * Global Contexts configuration
267
+ */
268
+ declare type GCConfiguration = GlobalContext[];
269
+ /**
270
+ * The TrackerControllerConfiguration
271
+ */
272
+ interface TrackerControllerConfiguration {
273
+ trackerConfig?: TrackerConfiguration;
274
+ sessionConfig?: SessionConfiguration;
275
+ emitterConfig?: EmitterConfiguration;
276
+ subjectConfig?: SubjectConfiguration;
277
+ gdprConfig?: GdprConfiguration;
278
+ gcConfig?: GCConfiguration;
279
+ }
62
280
  /**
63
281
  * ScreenView event properties
64
282
  * schema: iglu:com.snowplowanalytics.mobile/screen_view/jsonschema/1-0-0
@@ -67,28 +285,31 @@ declare type ScreenViewProps = {
67
285
  /**
68
286
  * The name of the screen viewed
69
287
  */
70
- screenName: string;
288
+ name: string;
289
+ /**
290
+ * The id(UUID) of screen that was viewed
291
+ */
292
+ id?: string;
71
293
  /**
72
294
  * The type of screen that was viewed
73
295
  */
74
- screenType?: string;
296
+ type?: string;
75
297
  /**
76
- * The type of transition that led to the screen being viewed
298
+ * The name of the previous screen that was viewed
77
299
  */
78
- transitionType?: string;
79
- };
80
- /**
81
- * SelfDescribing event properties
82
- */
83
- declare type SelfDescribingProps = {
300
+ previousName?: string;
301
+ /**
302
+ * The id(UUID) of the previous screen that was viewed
303
+ */
304
+ previousId?: string;
84
305
  /**
85
- * The schema of the event
306
+ * The type of the previous screen that was viewed
86
307
  */
87
- schema: string;
308
+ previousType?: string;
88
309
  /**
89
- * The event data
310
+ * The type of transition that led to the screen being viewed
90
311
  */
91
- data: Record<string, unknown>;
312
+ transitionType?: string;
92
313
  };
93
314
  /**
94
315
  * Structured event properties
@@ -130,139 +351,403 @@ declare type PageViewProps = {
130
351
  /**
131
352
  * The referrer URL
132
353
  */
133
- pageReferrer?: string;
354
+ referrer?: string;
134
355
  };
135
356
  /**
136
- * Context type
357
+ * Timing event properties
137
358
  */
138
- declare type EventContext = {
359
+ declare type TimingProps = {
139
360
  /**
140
- * The context schema
361
+ * The timing category
141
362
  */
142
- schema: string;
363
+ category: string;
143
364
  /**
144
- * The context data
365
+ * The timing variable
145
366
  */
146
- data: Record<string, unknown>;
367
+ variable: string;
368
+ /**
369
+ * The time
370
+ */
371
+ timing: number;
372
+ /**
373
+ * The timing label
374
+ */
375
+ label?: string;
376
+ };
377
+ /**
378
+ * ConsentDocument properties
379
+ */
380
+ interface ConsentDocument {
381
+ /**
382
+ * The consent document id
383
+ */
384
+ documentId: string;
385
+ /**
386
+ * The consent document version
387
+ */
388
+ version: string;
389
+ /**
390
+ * The consent document name
391
+ */
392
+ name?: string;
393
+ /**
394
+ * The consent document description
395
+ */
396
+ documentDescription?: string;
397
+ }
398
+ /**
399
+ * ConsentGranted event properties
400
+ */
401
+ interface ConsentGrantedProps extends ConsentDocument {
402
+ /**
403
+ * The expiry (date-time string, e.g.: '2022-01-01T00:00:00Z')
404
+ */
405
+ expiry: string;
406
+ }
407
+ /**
408
+ * ConsentWithdrawn event properties
409
+ */
410
+ interface ConsentWithdrawnProps extends ConsentDocument {
411
+ /**
412
+ * Whether user opts out of all data collection
413
+ */
414
+ all: boolean;
415
+ }
416
+ /**
417
+ * EcommerceItem
418
+ */
419
+ declare type EcommerceItem = {
420
+ sku: string;
421
+ price: number;
422
+ quantity: number;
423
+ name?: string;
424
+ category?: string;
425
+ currency?: string;
426
+ };
427
+ /**
428
+ * EcommerceTransaction event properties
429
+ */
430
+ declare type EcommerceTransactionProps = {
431
+ orderId: string;
432
+ totalValue: number;
433
+ items: EcommerceItem[];
434
+ affiliation?: string;
435
+ taxValue?: number;
436
+ shipping?: number;
437
+ city?: string;
438
+ state?: string;
439
+ country?: string;
440
+ currency?: string;
441
+ };
442
+ /**
443
+ * DeepLinkReceived event properties
444
+ * schema: iglu:com.snowplowanalytics.mobile/deep_link_received/jsonschema/1-0-0
445
+ */
446
+ declare type DeepLinkReceivedProps = {
447
+ /**
448
+ * URL in the received deep-link.
449
+ */
450
+ url: string;
451
+ /**
452
+ * Referrer URL, source of this deep-link.
453
+ */
454
+ referrer?: string;
455
+ };
456
+ /**
457
+ * Attachment object that identify an attachment in the MessageNotification.
458
+ */
459
+ declare type MessageNotificationAttachmentProps = {
460
+ identifier: string;
461
+ type: string;
462
+ url: string;
463
+ };
464
+ /**
465
+ * MessageNotification event properties
466
+ * schema: iglu:com.snowplowanalytics.mobile/message_notification/jsonschema/1-0-0
467
+ */
468
+ declare type MessageNotificationProps = {
469
+ /**
470
+ * The action associated with the notification.
471
+ */
472
+ action?: string;
473
+ attachments?: MessageNotificationAttachmentProps[];
474
+ /**
475
+ * The notification's body.
476
+ */
477
+ body: string;
478
+ bodyLocArgs?: string[];
479
+ /**
480
+ * The key to the body string in the app's string resources to use to localize the body text to the user's current localization.
481
+ */
482
+ bodyLocKey?: string;
483
+ /**
484
+ * The category associated to the notification.
485
+ */
486
+ category?: string;
487
+ /**
488
+ * The application is notified of the delivery of the notification if it's in the foreground or background, the app will be woken up (iOS only).
489
+ */
490
+ contentAvailable?: boolean;
491
+ /**
492
+ * The group which this notification is part of.
493
+ */
494
+ group?: string;
495
+ /**
496
+ * The icon associated to the notification (Android only).
497
+ */
498
+ icon?: string;
499
+ /**
500
+ * The number of items this notification represent.
501
+ */
502
+ notificationCount?: number;
503
+ /**
504
+ * The time when the event of the notification occurred.
505
+ */
506
+ notificationTimestamp?: string;
507
+ /**
508
+ * The sound played when the device receives the notification.
509
+ */
510
+ sound?: string;
511
+ /**
512
+ * The notification's subtitle. (iOS only)
513
+ */
514
+ subtitle?: string;
515
+ /**
516
+ * An identifier similar to 'group' but usable for different purposes (Android only).
517
+ */
518
+ tag?: string;
519
+ /**
520
+ * An identifier similar to 'group' but usable for different purposes (iOS only).
521
+ */
522
+ threadIdentifier?: string;
523
+ /**
524
+ * The notification's title.
525
+ */
526
+ title: string;
527
+ /**
528
+ * Variable string values to be used in place of the format specifiers in titleLocArgs to use to localize the title text to the user's current localization.
529
+ */
530
+ titleLocArgs?: string[];
531
+ /**
532
+ * The key to the title string in the app's string resources to use to localize the title text to the user's current localization.
533
+ */
534
+ titleLocKey?: string;
535
+ /**
536
+ * The trigger that raised the notification message. Must be one of: push, location, calendar, timeInterval, other
537
+ */
538
+ trigger: Trigger;
147
539
  };
148
540
  /**
149
541
  * The ReactNativeTracker type
150
542
  */
151
543
  declare type ReactNativeTracker = {
152
544
  /**
153
- * Sets or updates subject data
545
+ * Tracks a self-descibing event
154
546
  *
155
- * @param argmap - The subject data to be set or updated
547
+ * @param argmap - The self-describing event properties
548
+ * @param contexts - The array of event contexts
156
549
  */
157
- readonly setSubjectData: (argmap: SubjectData) => Promise<void>;
550
+ readonly trackSelfDescribingEvent: (argmap: SelfDescribing, contexts?: EventContext[]) => Promise<void>;
158
551
  /**
159
552
  * Tracks a screen-view event
160
553
  *
161
554
  * @param argmap - The screen-view event's properties
162
- * @param ctxt - The array of event contexts
555
+ * @param contexts - The array of event contexts
163
556
  */
164
- readonly trackScreenViewEvent: (argmap: ScreenViewProps, ctxt?: EventContext[]) => Promise<void>;
165
- /**
166
- * Tracks a self-descibing event
167
- *
168
- * @param argmap - The self-describing event properties
169
- * @param ctxt - The array of event contexts
170
- */
171
- readonly trackSelfDescribingEvent: (argmap: SelfDescribingProps, ctxt: EventContext[]) => Promise<void>;
557
+ readonly trackScreenViewEvent: (argmap: ScreenViewProps, contexts?: EventContext[]) => Promise<void>;
172
558
  /**
173
559
  * Tracks a structured event
174
560
  *
175
561
  * @param argmap - The structured event properties
176
- * @param ctxt - The array of event contexts
562
+ * @param contexts - The array of event contexts
177
563
  */
178
- readonly trackStructuredEvent: (argmap: StructuredProps, ctxt: EventContext[]) => Promise<void>;
564
+ readonly trackStructuredEvent: (argmap: StructuredProps, contexts?: EventContext[]) => Promise<void>;
179
565
  /**
180
566
  * Tracks a page-view event
181
567
  *
182
568
  * @param argmap - The page-view event properties
183
- * @param ctxt - The array of event contexts
569
+ * @param contexts - The array of event contexts
184
570
  */
185
- readonly trackPageViewEvent: (argmap: PageViewProps, ctxt: EventContext[]) => Promise<void>;
186
- };
187
- /**
188
- * The optional configuration parameters of the tracker
189
- */
190
- interface OptTrackerConfig {
571
+ readonly trackPageViewEvent: (argmap: PageViewProps, contexts?: EventContext[]) => Promise<void>;
191
572
  /**
192
- * The HTTP method used
193
- * @defaultValue 'post'
573
+ * Tracks a timing event
574
+ *
575
+ * @param argmap - The timing event properties
576
+ * @param contexts - The array of event contexts
194
577
  */
195
- method?: HttpMethod;
578
+ readonly trackTimingEvent: (argmap: TimingProps, contexts?: EventContext[]) => Promise<void>;
196
579
  /**
197
- * The HTTP protocol used
198
- * @defaultValue 'https'
580
+ * Tracks a consent-granted event
581
+ *
582
+ * @param argmap - The consent-granted event properties
583
+ * @param contexts - The array of event contexts
199
584
  */
200
- protocol?: HttpProtocol;
585
+ readonly trackConsentGrantedEvent: (argmap: ConsentGrantedProps, contexts?: EventContext[]) => Promise<void>;
201
586
  /**
202
- * Should event properties be base64 encoded where supported
203
- * @defaultValue true
587
+ * Tracks a consent-withdrawn event
588
+ *
589
+ * @param argmap - The consent-withdrawn event properties
590
+ * @param contexts - The array of event contexts
204
591
  */
205
- base64Encoded?: boolean;
592
+ readonly trackConsentWithdrawnEvent: (argmap: ConsentWithdrawnProps, contexts?: EventContext[]) => Promise<void>;
206
593
  /**
207
- * Whether platform context are sent with all events
208
- * @defaultValue true
594
+ * Tracks an ecommerce-transaction event
595
+ *
596
+ * @param argmap - The ecommerce-transaction event properties
597
+ * @param contexts - The array of event contexts
209
598
  */
210
- platformContext?: boolean;
599
+ readonly trackEcommerceTransactionEvent: (argmap: EcommerceTransactionProps, contexts?: EventContext[]) => Promise<void>;
211
600
  /**
212
- * Whether application context are sent with all events
213
- * @defaultValue false
601
+ * Tracks a deep link received event
602
+ *
603
+ * @param argmap - The deep link received event properties
604
+ * @param contexts - The array of event contexts
214
605
  */
215
- applicationContext?: boolean;
606
+ readonly trackDeepLinkReceivedEvent: (argmap: DeepLinkReceivedProps, contexts?: EventContext[]) => Promise<void>;
216
607
  /**
217
- * Whether to automatically track transition from foreground to background
218
- * @defaultValue false
608
+ * Tracks a message notification event
609
+ *
610
+ * @param argmap - The message notification event properties
611
+ * @param contexts - The array of event contexts
219
612
  */
220
- lifecycleEvents?: boolean;
613
+ readonly trackMessageNotificationEvent: (argmap: MessageNotificationProps, contexts?: EventContext[]) => Promise<void>;
221
614
  /**
222
- * Whether to send a screen context (info for current screen) to events
223
- * @defaultValue true
615
+ * Removes global contexts
616
+ *
617
+ * @param tag - The tag of the global contexts to remove
224
618
  */
225
- screenContext?: boolean;
619
+ readonly removeGlobalContexts: (tag: string) => Promise<void>;
226
620
  /**
227
- * whether to add a session context to events
228
- * @defaultValue true
621
+ * Adds global contexts
622
+ *
623
+ * @param gc - The global context to add
229
624
  */
230
- sessionContext?: boolean;
625
+ readonly addGlobalContexts: (gc: GlobalContext) => Promise<void>;
231
626
  /**
232
- * The session foreground timeout
233
- * @defaultValue 600
627
+ * Sets the userId of the tracker subject
628
+ *
629
+ * @param newUid - The new userId
234
630
  */
235
- foregroundTimeout?: number;
631
+ readonly setUserId: (newUid: string | null) => Promise<void>;
236
632
  /**
237
- * The session background timeout
238
- * @defaultValue 300
633
+ * Sets the networkUserId of the tracker subject
634
+ *
635
+ * @param newNuid - The new networkUserId
239
636
  */
240
- backgroundTimeout?: number;
637
+ readonly setNetworkUserId: (newNuid: string | null) => Promise<void>;
241
638
  /**
242
- * The session check interval
243
- * @defaultValue 15
639
+ * Sets the domainUserId of the tracker subject
640
+ *
641
+ * @param newDuid - The new domainUserId
244
642
  */
245
- checkInterval?: number;
643
+ readonly setDomainUserId: (newDuid: string | null) => Promise<void>;
246
644
  /**
247
- * Whether install events will be tracked
248
- * @defaultValue false
645
+ * Sets the ipAddress of the tracker subject
646
+ *
647
+ * @param newIp - The new ipAddress
249
648
  */
250
- installTracking?: boolean;
251
- }
252
- /**
253
- * The configuration used for creating the tracker
254
- */
255
- interface TrackerConfig extends OptTrackerConfig {
649
+ readonly setIpAddress: (newIp: string | null) => Promise<void>;
256
650
  /**
257
- * The collector endpoint
651
+ * Sets the useragent of the tracker subject
652
+ *
653
+ * @param newUagent - The new useragent
258
654
  */
259
- endpoint: string;
655
+ readonly setUseragent: (newUagent: string | null) => Promise<void>;
260
656
  /**
261
- * The app ID
657
+ * Sets the timezone of the tracker subject
658
+ *
659
+ * @param newTz - The new timezone
262
660
  */
263
- appId: string;
264
- }
661
+ readonly setTimezone: (newTz: string | null) => Promise<void>;
662
+ /**
663
+ * Sets the language of the tracker subject
664
+ *
665
+ * @param newLang - The new language
666
+ */
667
+ readonly setLanguage: (newLang: string | null) => Promise<void>;
668
+ /**
669
+ * Sets the screenResolution of the tracker subject
670
+ *
671
+ * @param newRes - The new screenResolution
672
+ */
673
+ readonly setScreenResolution: (newRes: ScreenSize | null) => Promise<void>;
674
+ /**
675
+ * Sets the screenViewport of the tracker subject
676
+ *
677
+ * @param newView - The new screenViewport
678
+ */
679
+ readonly setScreenViewport: (newView: ScreenSize | null) => Promise<void>;
680
+ /**
681
+ * Sets the colorDepth of the tracker subject
682
+ *
683
+ * @param newColorD - The new colorDepth
684
+ */
685
+ readonly setColorDepth: (newLang: number | null) => Promise<void>;
686
+ /**
687
+ * Sets subject data
688
+ *
689
+ * @param config - The new subject data
690
+ */
691
+ readonly setSubjectData: (config: SubjectConfiguration) => Promise<void>;
692
+ /**
693
+ * Gets the dentifier for the user of the session
694
+ *
695
+ * @returns {Promise<string | undefined>}
696
+ */
697
+ readonly getSessionUserId: () => Promise<string | undefined>;
698
+ /**
699
+ * Gets the identifier for the session
700
+ *
701
+ * @returns {Promise<string | undefined>}
702
+ */
703
+ readonly getSessionId: () => Promise<string | undefined>;
704
+ /**
705
+ * Gets the index of the current session for this user
706
+ *
707
+ * @returns {Promise<number | undefined>}
708
+ */
709
+ readonly getSessionIndex: () => Promise<number | undefined>;
710
+ /**
711
+ * Gets whether the app is currently in background state
712
+ *
713
+ * @returns {Promise<boolean | undefined>}
714
+ */
715
+ readonly getIsInBackground: () => Promise<boolean | undefined>;
716
+ /**
717
+ * Gets the number of background transitions in the current session
718
+ *
719
+ * @returns {Promise<number | undefined>}
720
+ */
721
+ readonly getBackgroundIndex: () => Promise<number | undefined>;
722
+ /**
723
+ * Gets the number of foreground transitions in the current session.
724
+ *
725
+ * @returns {Promise<number | undefined>}
726
+ */
727
+ readonly getForegroundIndex: () => Promise<number | undefined>;
728
+ };
265
729
 
266
- declare function createTracker(namespace: string, config: TrackerConfig): ReactNativeTracker;
730
+ /**
731
+ * Creates a React Native Tracker object
732
+ *
733
+ * @param namespace {string} - The tracker namespace
734
+ * @param networkConfig {Object} - The network configuration
735
+ * @param control {Array} - The tracker controller configuration
736
+ * @returns The tracker object
737
+ */
738
+ declare function createTracker(namespace: string, networkConfig: NetworkConfiguration, controllerConfig?: TrackerControllerConfiguration): ReactNativeTracker;
739
+ /**
740
+ * Removes a tracker given its namespace
741
+ *
742
+ * @param trackerNamespace {string}
743
+ * @returns - A boolean promise
744
+ */
745
+ declare function removeTracker(trackerNamespace: string): Promise<boolean>;
746
+ /**
747
+ * Removes all trackers
748
+ *
749
+ * @returns - A boolean promise
750
+ */
751
+ declare function removeAllTrackers(): Promise<boolean>;
267
752
 
268
- export { EventContext, HttpMethod, HttpProtocol, PageViewProps, ReactNativeTracker, ScreenViewProps, SelfDescribingProps, StructuredProps, SubjectData, TrackerConfig, createTracker };
753
+ export { Basis, BufferOption, ConsentDocument, ConsentGrantedProps, ConsentWithdrawnProps, DeepLinkReceivedProps, DevicePlatform, EcommerceItem, EcommerceTransactionProps, EmitterConfiguration, EventContext, GCConfiguration, GdprConfiguration, GlobalContext, HttpMethod, LogLevel, MessageNotificationProps, NetworkConfiguration, PageViewProps, ReactNativeTracker, ScreenSize, ScreenViewProps, SelfDescribing, SessionConfiguration, StructuredProps, SubjectConfiguration, TimingProps, TrackerConfiguration, TrackerControllerConfiguration, Trigger, createTracker, removeAllTrackers, removeTracker };