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

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 (58) hide show
  1. package/dist/commonjs/event_store.js +150 -0
  2. package/dist/commonjs/event_store.js.map +1 -0
  3. package/dist/commonjs/events.js +42 -0
  4. package/dist/commonjs/events.js.map +1 -0
  5. package/dist/commonjs/index.js +29 -0
  6. package/dist/commonjs/index.js.map +1 -0
  7. package/dist/commonjs/subject.js +82 -0
  8. package/dist/commonjs/subject.js.map +1 -0
  9. package/dist/commonjs/tracker.js +77 -0
  10. package/dist/commonjs/tracker.js.map +1 -0
  11. package/dist/commonjs/types.js +223 -0
  12. package/dist/commonjs/types.js.map +1 -0
  13. package/dist/module/event_store.js +145 -0
  14. package/dist/module/event_store.js.map +1 -0
  15. package/dist/module/events.js +38 -0
  16. package/dist/module/events.js.map +1 -0
  17. package/dist/module/index.js +7 -0
  18. package/dist/module/index.js.map +1 -0
  19. package/dist/module/subject.js +78 -0
  20. package/dist/module/subject.js.map +1 -0
  21. package/dist/module/tracker.js +74 -0
  22. package/dist/module/tracker.js.map +1 -0
  23. package/dist/module/types.js +73 -0
  24. package/dist/module/types.js.map +1 -0
  25. package/dist/typescript/commonjs/package.json +1 -0
  26. package/dist/typescript/commonjs/src/event_store.d.ts +4 -0
  27. package/dist/typescript/commonjs/src/event_store.d.ts.map +1 -0
  28. package/dist/typescript/commonjs/src/events.d.ts +10 -0
  29. package/dist/typescript/commonjs/src/events.d.ts.map +1 -0
  30. package/dist/typescript/commonjs/src/index.d.ts +4 -0
  31. package/dist/typescript/commonjs/src/index.d.ts.map +1 -0
  32. package/dist/typescript/commonjs/src/subject.d.ts +19 -0
  33. package/dist/typescript/commonjs/src/subject.d.ts.map +1 -0
  34. package/dist/typescript/commonjs/src/tracker.d.ts +9 -0
  35. package/dist/typescript/commonjs/src/tracker.d.ts.map +1 -0
  36. package/dist/{index.cjs.d.ts → typescript/commonjs/src/types.d.ts} +18 -65
  37. package/dist/typescript/commonjs/src/types.d.ts.map +1 -0
  38. package/dist/typescript/module/package.json +1 -0
  39. package/dist/typescript/module/src/event_store.d.ts +4 -0
  40. package/dist/typescript/module/src/event_store.d.ts.map +1 -0
  41. package/dist/typescript/module/src/events.d.ts +10 -0
  42. package/dist/typescript/module/src/events.d.ts.map +1 -0
  43. package/dist/typescript/module/src/index.d.ts +4 -0
  44. package/dist/typescript/module/src/index.d.ts.map +1 -0
  45. package/dist/typescript/module/src/subject.d.ts +19 -0
  46. package/dist/typescript/module/src/subject.d.ts.map +1 -0
  47. package/dist/typescript/module/src/tracker.d.ts +9 -0
  48. package/dist/typescript/module/src/tracker.d.ts.map +1 -0
  49. package/dist/{index.module.d.ts → typescript/module/src/types.d.ts} +18 -65
  50. package/dist/typescript/module/src/types.d.ts.map +1 -0
  51. package/package.json +52 -14
  52. package/dist/index.cjs.js +0 -2656
  53. package/dist/index.cjs.js.map +0 -1
  54. package/dist/index.cjs.min.d.ts +0 -499
  55. package/dist/index.cjs.min.js +0 -63
  56. package/dist/index.cjs.min.js.map +0 -1
  57. package/dist/index.module.js +0 -250
  58. package/dist/index.module.js.map +0 -1
@@ -1,8 +1,8 @@
1
- import { ConditionalContextProvider, ContextPrimitive, CorePluginConfiguration, PageViewEvent, SelfDescribingJson, StructuredEvent, EmitterConfiguration } from "@snowplow/tracker-core";
1
+ import { ConditionalContextProvider, ContextPrimitive, CorePluginConfiguration, PageViewEvent, SelfDescribingJson, StructuredEvent } from '@snowplow/tracker-core';
2
2
  /**
3
3
  * Configuration for the event store
4
4
  */
5
- interface EventStoreConfiguration {
5
+ export interface EventStoreConfiguration {
6
6
  /**
7
7
  * The maximum amount of events that will be buffered in the event store
8
8
  *
@@ -19,7 +19,7 @@ interface EventStoreConfiguration {
19
19
  /**
20
20
  * Configuration for session tracking
21
21
  */
22
- interface SessionConfiguration {
22
+ export interface SessionConfiguration {
23
23
  /**
24
24
  * The amount of time in seconds before the session id is updated while the app is in the foreground
25
25
  * @defaultValue 1800
@@ -34,7 +34,7 @@ interface SessionConfiguration {
34
34
  /**
35
35
  * The configuration object for initialising the tracker
36
36
  */
37
- interface TrackerConfiguration {
37
+ export interface TrackerConfiguration {
38
38
  /** The namespace of the tracker */
39
39
  namespace: string;
40
40
  /** The application ID */
@@ -48,7 +48,7 @@ interface TrackerConfiguration {
48
48
  /**
49
49
  * Configuration of subject properties tracked with events
50
50
  */
51
- interface SubjectConfiguration {
51
+ export interface SubjectConfiguration {
52
52
  /**
53
53
  * Business-defined user ID for this user
54
54
  */
@@ -94,18 +94,15 @@ interface SubjectConfiguration {
94
94
  /**
95
95
  * Screen size in pixels
96
96
  */
97
- type ScreenSize = [
98
- number,
99
- number
100
- ];
97
+ export declare type ScreenSize = [number, number];
101
98
  /**
102
99
  * Trigger for MessageNotification event
103
100
  */
104
- type Trigger = "push" | "location" | "calendar" | "timeInterval" | "other";
101
+ export declare type Trigger = 'push' | 'location' | 'calendar' | 'timeInterval' | 'other';
105
102
  /**
106
103
  * Attachment object that identify an attachment in the MessageNotification.
107
104
  */
108
- type MessageNotificationAttachmentProps = {
105
+ export declare type MessageNotificationAttachmentProps = {
109
106
  identifier: string;
110
107
  type: string;
111
108
  url: string;
@@ -114,22 +111,16 @@ type MessageNotificationAttachmentProps = {
114
111
  * MessageNotification event properties
115
112
  * schema: iglu:com.snowplowanalytics.mobile/message_notification/jsonschema/1-0-0
116
113
  */
117
- type MessageNotificationProps = {
114
+ export declare type MessageNotificationProps = {
118
115
  /**
119
116
  * The action associated with the notification.
120
117
  */
121
118
  action?: string;
122
- /*
123
- * Attachments added to the notification (they can be part of the data object).
124
- */
125
119
  attachments?: MessageNotificationAttachmentProps[];
126
120
  /**
127
121
  * The notification's body.
128
122
  */
129
123
  body: string;
130
- /*
131
- * Variable string values to be used in place of the format specifiers in bodyLocArgs to use to localize the body text to the user's current localization.
132
- */
133
124
  bodyLocArgs?: string[];
134
125
  /**
135
126
  * 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.
@@ -195,12 +186,12 @@ type MessageNotificationProps = {
195
186
  /**
196
187
  * EventContext type
197
188
  */
198
- type EventContext = SelfDescribingJson;
189
+ export declare type EventContext = SelfDescribingJson;
199
190
  /**
200
191
  * ScreenView event properties
201
192
  * schema: iglu:com.snowplowanalytics.mobile/screen_view/jsonschema/1-0-0
202
193
  */
203
- type ScreenViewProps = {
194
+ export declare type ScreenViewProps = {
204
195
  /**
205
196
  * The name of the screen viewed
206
197
  */
@@ -236,7 +227,7 @@ type ScreenViewProps = {
236
227
  *
237
228
  * Schema: `iglu:com.snowplowanalytics.mobile/scroll_changed/jsonschema/1-0-0`
238
229
  */
239
- type ScrollChangedProps = {
230
+ export declare type ScrollChangedProps = {
240
231
  /**
241
232
  * Vertical scroll offset in pixels
242
233
  */
@@ -268,7 +259,7 @@ type ScrollChangedProps = {
268
259
  *
269
260
  * Schema: `iglu:com.snowplowanalytics.mobile/list_item_view/jsonschema/1-0-0`
270
261
  */
271
- type ListItemViewProps = {
262
+ export declare type ListItemViewProps = {
272
263
  /**
273
264
  * Index of the item in the list
274
265
  */
@@ -281,7 +272,7 @@ type ListItemViewProps = {
281
272
  /**
282
273
  * Timing event properties
283
274
  */
284
- type TimingProps = {
275
+ export declare type TimingProps = {
285
276
  /**
286
277
  * The timing category
287
278
  */
@@ -303,7 +294,7 @@ type TimingProps = {
303
294
  * DeepLinkReceived event properties
304
295
  * schema: iglu:com.snowplowanalytics.mobile/deep_link_received/jsonschema/1-0-0
305
296
  */
306
- type DeepLinkReceivedProps = {
297
+ export declare type DeepLinkReceivedProps = {
307
298
  /**
308
299
  * URL in the received deep-link.
309
300
  */
@@ -316,7 +307,7 @@ type DeepLinkReceivedProps = {
316
307
  /**
317
308
  * The ReactNativeTracker type
318
309
  */
319
- type ReactNativeTracker = {
310
+ export declare type ReactNativeTracker = {
320
311
  /**
321
312
  * Tracks a self-describing event
322
313
  *
@@ -325,30 +316,6 @@ type ReactNativeTracker = {
325
316
  * @typeParam TData - The type of the data object within the SelfDescribing object
326
317
  */
327
318
  readonly trackSelfDescribingEvent: <T extends Record<string, unknown> = Record<string, unknown>>(argmap: SelfDescribingJson<T>, contexts?: EventContext[]) => void;
328
- // TODO:
329
- // /**
330
- // * Tracks a screen-view event
331
- // *
332
- // * @param argmap - The screen-view event's properties
333
- // * @param contexts - The array of event contexts
334
- // */
335
- // readonly trackScreenViewEvent: (argmap: ScreenViewProps, contexts?: EventContext[]) => string | undefined;
336
- // TODO:
337
- // /**
338
- // * Tracks a scroll changed event
339
- // *
340
- // * @param argmap - The scroll changed event's properties
341
- // * @param contexts - The array of event contexts
342
- // */
343
- // readonly trackScrollChangedEvent: (argmap: ScrollChangedProps, contexts?: EventContext[]) => string | undefined;
344
- // TODO:
345
- // /**
346
- // * Tracks a list item view event
347
- // *
348
- // * @param argmap - The list item view event's properties
349
- // * @param contexts - The array of event contexts
350
- // */
351
- // readonly trackListItemViewEvent: (argmap: ListItemViewProps, contexts?: EventContext[]) => string | undefined;
352
319
  /**
353
320
  * Tracks a structured event
354
321
  *
@@ -370,14 +337,6 @@ type ReactNativeTracker = {
370
337
  * @param contexts - The array of event contexts
371
338
  */
372
339
  readonly trackTimingEvent: (argmap: TimingProps, contexts?: EventContext[]) => void;
373
- // TODO:
374
- // /**
375
- // * Tracks a deep link received event
376
- // *
377
- // * @param argmap - The deep link received event properties
378
- // * @param contexts - The array of event contexts
379
- // */
380
- // readonly trackDeepLinkReceivedEvent: (argmap: DeepLinkReceivedProps, contexts?: EventContext[]) => void;
381
340
  /**
382
341
  * Tracks a message notification event
383
342
  *
@@ -489,11 +448,5 @@ type ReactNativeTracker = {
489
448
  */
490
449
  readonly setSubjectData: (config: SubjectConfiguration) => void;
491
450
  };
492
- /**
493
- * Creates a new tracker instance with the given configuration
494
- * @param configuration - Configuration for the tracker
495
- * @returns Tracker instance
496
- */
497
- declare function newTracker(configuration: TrackerConfiguration & EmitterConfiguration & SessionConfiguration & SubjectConfiguration & EventStoreConfiguration): Promise<ReactNativeTracker>;
498
- export { EventStoreConfiguration, SessionConfiguration, TrackerConfiguration, SubjectConfiguration, ScreenSize, Trigger, MessageNotificationAttachmentProps, MessageNotificationProps, EventContext, ScreenViewProps, ScrollChangedProps, ListItemViewProps, TimingProps, DeepLinkReceivedProps, ReactNativeTracker, newTracker };
499
- 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";
451
+ 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
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +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,WAA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BAAiB,EACjB,gBAAgB,EAChB,aAAa,EACb,sBAAsB,EACtB,UAAU,EACV,kBAAkB,EAClB,iBAAiB,EACjB,WAAW,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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@snowplow/react-native-tracker",
3
- "version": "4.0.2-dev.0",
3
+ "version": "4.0.2-dev.1",
4
4
  "description": "React Native tracker for Snowplow",
5
5
  "keywords": [
6
6
  "snowplow",
@@ -20,9 +20,21 @@
20
20
  "Snowplow"
21
21
  ],
22
22
  "sideEffects": false,
23
- "main": "./dist/index.cjs.js",
24
- "module": "./dist/index.module.js",
25
- "types": "./dist/index.module.d.ts",
23
+ "source": "./src/index.tsx",
24
+ "main": "./dist/commonjs/index.js",
25
+ "module": "./dist/module/index.js",
26
+ "exports": {
27
+ ".": {
28
+ "import": {
29
+ "types": "./dist/typescript/module/src/index.d.ts",
30
+ "default": "./dist/module/index.js"
31
+ },
32
+ "require": {
33
+ "types": "./dist/typescript/commonjs/src/index.d.ts",
34
+ "default": "./dist/commonjs/index.js"
35
+ }
36
+ }
37
+ },
26
38
  "files": [
27
39
  "dist"
28
40
  ],
@@ -31,31 +43,57 @@
31
43
  "react-native": "*"
32
44
  },
33
45
  "dependencies": {
34
- "tslib": "^2.3.1",
35
46
  "@react-native-async-storage/async-storage": "~2.0.0",
36
- "@snowplow/tracker-core": "4.0.2-dev.0"
47
+ "react-native-get-random-values": "~1.11.0",
48
+ "tslib": "^2.3.1",
49
+ "@snowplow/tracker-core": "4.0.2-dev.1"
37
50
  },
38
51
  "devDependencies": {
39
- "@rollup/plugin-json": "~4.1.0",
40
52
  "@typescript-eslint/eslint-plugin": "~5.15.0",
41
53
  "@typescript-eslint/parser": "~5.15.0",
42
- "@react-native/eslint-config": "^0.73.1",
43
54
  "eslint": "~8.11.0",
44
- "rollup": "~2.70.1",
45
- "rollup-plugin-license": "~2.6.1",
46
- "rollup-plugin-ts": "~2.0.5",
47
55
  "typescript": "~4.6.2",
48
56
  "@types/jest": "~28.1.1",
57
+ "@types/node": "~14.6.0",
49
58
  "jest": "~28.1.3",
50
59
  "react": "18.2.0",
51
60
  "ts-jest": "~28.0.8",
52
61
  "@types/react": "^18.2.44",
53
62
  "react-native": "0.74.5",
54
- "@react-native/babel-preset": "~0.76.1",
55
- "node-fetch": "~3.3.2"
63
+ "node-fetch": "~3.3.2",
64
+ "react-native-builder-bob": "^0.30.3"
65
+ },
66
+ "resolutions": {
67
+ "@types/react": "^18.2.44"
68
+ },
69
+ "browserslist": {},
70
+ "react-native-builder-bob": {
71
+ "source": "src",
72
+ "output": "dist",
73
+ "targets": [
74
+ [
75
+ "commonjs",
76
+ {
77
+ "esm": true
78
+ }
79
+ ],
80
+ [
81
+ "module",
82
+ {
83
+ "esm": true
84
+ }
85
+ ],
86
+ [
87
+ "typescript",
88
+ {
89
+ "project": "tsconfig.build.json",
90
+ "esm": true
91
+ }
92
+ ]
93
+ ]
56
94
  },
57
95
  "scripts": {
58
- "build": "rollup -c --silent --failAfterWarnings",
96
+ "build": "bob build",
59
97
  "test": "jest"
60
98
  }
61
99
  }