Skip to content

Commit 6c0dfa0

Browse files
committed
Update API docs for the React Native tracker
1 parent f1b242f commit 6c0dfa0

15 files changed

+71
-117
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[Home](./index.md) &gt; [@snowplow/react-native-tracker](./react-native-tracker.md) &gt; [AsyncStorage](./react-native-tracker.asyncstorage.md) &gt; [getItem](./react-native-tracker.asyncstorage.getitem.md)
4+
5+
## AsyncStorage.getItem property
6+
7+
<b>Signature:</b>
8+
9+
```typescript
10+
getItem: (key: string) => Promise<string | null>;
11+
```
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[Home](./index.md) &gt; [@snowplow/react-native-tracker](./react-native-tracker.md) &gt; [AsyncStorage](./react-native-tracker.asyncstorage.md)
4+
5+
## AsyncStorage interface
6+
7+
<b>Signature:</b>
8+
9+
```typescript
10+
export interface AsyncStorage
11+
```
12+
13+
## Properties
14+
15+
| Property | Type | Description |
16+
| --- | --- | --- |
17+
| [getItem](./react-native-tracker.asyncstorage.getitem.md) | (key: string) =&gt; Promise&lt;string \| null&gt; | |
18+
| [setItem](./react-native-tracker.asyncstorage.setitem.md) | (key: string, value: string) =&gt; Promise&lt;void&gt; | |
19+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[Home](./index.md) &gt; [@snowplow/react-native-tracker](./react-native-tracker.md) &gt; [AsyncStorage](./react-native-tracker.asyncstorage.md) &gt; [setItem](./react-native-tracker.asyncstorage.setitem.md)
4+
5+
## AsyncStorage.setItem property
6+
7+
<b>Signature:</b>
8+
9+
```typescript
10+
setItem: (key: string, value: string) => Promise<void>;
11+
```

Diff for: api-docs/docs/react-native-tracker/markdown/react-native-tracker.eventstore.add.md

-13
This file was deleted.

Diff for: api-docs/docs/react-native-tracker/markdown/react-native-tracker.eventstore.count.md

-13
This file was deleted.

Diff for: api-docs/docs/react-native-tracker/markdown/react-native-tracker.eventstore.getall.md

-13
This file was deleted.

Diff for: api-docs/docs/react-native-tracker/markdown/react-native-tracker.eventstore.getallpayloads.md

-13
This file was deleted.

Diff for: api-docs/docs/react-native-tracker/markdown/react-native-tracker.eventstore.iterator.md

-13
This file was deleted.

Diff for: api-docs/docs/react-native-tracker/markdown/react-native-tracker.eventstore.md

-25
This file was deleted.

Diff for: api-docs/docs/react-native-tracker/markdown/react-native-tracker.eventstore.removehead.md

-13
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
2+
3+
[Home](./index.md) &gt; [@snowplow/react-native-tracker](./react-native-tracker.md) &gt; [EventStoreConfiguration](./react-native-tracker.eventstoreconfiguration.md) &gt; [asyncStorage](./react-native-tracker.eventstoreconfiguration.asyncstorage.md)
4+
5+
## EventStoreConfiguration.asyncStorage property
6+
7+
The Async storage implementation. In environments where AsyncStorage is not available or where another kind of storage is used, you can provide a custom implementation.
8+
9+
<b>Signature:</b>
10+
11+
```typescript
12+
asyncStorage?: AsyncStorage;
13+
```

Diff for: api-docs/docs/react-native-tracker/markdown/react-native-tracker.eventstoreconfiguration.md

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export interface EventStoreConfiguration
1616

1717
| Property | Type | Description |
1818
| --- | --- | --- |
19+
| [asyncStorage?](./react-native-tracker.eventstoreconfiguration.asyncstorage.md) | [AsyncStorage](./react-native-tracker.asyncstorage.md) | <i>(Optional)</i> The Async storage implementation. In environments where AsyncStorage is not available or where another kind of storage is used, you can provide a custom implementation. |
1920
| [maxEventStoreSize?](./react-native-tracker.eventstoreconfiguration.maxeventstoresize.md) | number | <i>(Optional)</i> The maximum amount of events that will be buffered in the event store<!-- -->Will drop events once the limit is hit |
2021
| [useAsyncStorageForEventStore?](./react-native-tracker.eventstoreconfiguration.useasyncstorageforeventstore.md) | boolean | <i>(Optional)</i> Whether to use the AsyncStorage library as the persistent event store for the event store |
2122

Diff for: api-docs/docs/react-native-tracker/markdown/react-native-tracker.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
| Interface | Description |
2828
| --- | --- |
2929
| [AppLifecycleConfiguration](./react-native-tracker.applifecycleconfiguration.md) | Configuration for app lifecycle tracking |
30+
| [AsyncStorage](./react-native-tracker.asyncstorage.md) | |
3031
| [CoreConfiguration](./react-native-tracker.coreconfiguration.md) | The configuration object for the tracker core library |
3132
| [CorePlugin](./react-native-tracker.coreplugin.md) | Interface which defines Core Plugins |
3233
| [CorePluginConfiguration](./react-native-tracker.corepluginconfiguration.md) | The configuration of the plugin to add |
@@ -36,7 +37,6 @@
3637
| [EmitterConfiguration](./react-native-tracker.emitterconfiguration.md) | |
3738
| [EmitterConfigurationBase](./react-native-tracker.emitterconfigurationbase.md) | |
3839
| [EventPayloadAndContext](./react-native-tracker.eventpayloadandcontext.md) | Interface for returning a built event (PayloadBuilder) and context (Array of SelfDescribingJson). |
39-
| [EventStore](./react-native-tracker.eventstore.md) | EventStore allows storing and retrieving events before they are sent to the collector |
4040
| [EventStoreConfiguration](./react-native-tracker.eventstoreconfiguration.md) | Configuration for the event store |
4141
| [EventStoreIterator](./react-native-tracker.eventstoreiterator.md) | EventStoreIterator allows iterating over all events in the store. |
4242
| [EventStorePayload](./react-native-tracker.eventstorepayload.md) | |

Diff for: api-docs/docs/react-native-tracker/markdown/react-native-tracker.newtracker.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ Creates a new tracker instance with the given configuration
99
<b>Signature:</b>
1010

1111
```typescript
12-
export declare function newTracker(configuration: TrackerConfiguration & EmitterConfiguration & SessionConfiguration & SubjectConfiguration & EventStoreConfiguration & ScreenTrackingConfiguration & PlatformContextConfiguration & DeepLinkConfiguration & AppLifecycleConfiguration): Promise<ReactNativeTracker>;
12+
export declare function newTracker(configuration: Configuration): Promise<ReactNativeTracker>;
1313
```
1414

1515
## Parameters
1616

1717
| Parameter | Type | Description |
1818
| --- | --- | --- |
19-
| configuration | [TrackerConfiguration](./react-native-tracker.trackerconfiguration.md) &amp; EmitterConfiguration &amp; [SessionConfiguration](./react-native-tracker.sessionconfiguration.md) &amp; [SubjectConfiguration](./react-native-tracker.subjectconfiguration.md) &amp; [EventStoreConfiguration](./react-native-tracker.eventstoreconfiguration.md) &amp; ScreenTrackingConfiguration &amp; [PlatformContextConfiguration](./react-native-tracker.platformcontextconfiguration.md) &amp; [DeepLinkConfiguration](./react-native-tracker.deeplinkconfiguration.md) &amp; [AppLifecycleConfiguration](./react-native-tracker.applifecycleconfiguration.md) | Configuration for the tracker |
19+
| configuration | Configuration | Configuration for the tracker |
2020

2121
<b>Returns:</b>
2222

Diff for: api-docs/docs/react-native-tracker/react-native-tracker.api.md

+13-11
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,14 @@ export interface AppLifecycleConfiguration {
1717
lifecycleAutotracking?: boolean;
1818
}
1919

20+
// @public (undocumented)
21+
export interface AsyncStorage {
22+
// (undocumented)
23+
getItem: (key: string) => Promise<string | null>;
24+
// (undocumented)
25+
setItem: (key: string, value: string) => Promise<void>;
26+
}
27+
2028
// @public
2129
export type ConditionalContextProvider = FilterProvider | RuleSetProvider;
2230

@@ -117,6 +125,7 @@ export interface EmitterConfigurationBase {
117125
customHeaders?: Record<string, string>;
118126
dontRetryStatusCodes?: number[];
119127
eventMethod?: EventMethod;
128+
// Warning: (ae-forgotten-export) The symbol "EventStore" needs to be exported by the entry point index.d.ts
120129
eventStore?: EventStore;
121130
idService?: string;
122131
keepalive?: boolean;
@@ -155,18 +164,9 @@ export interface EventPayloadAndContext {
155164
event: PayloadBuilder;
156165
}
157166

158-
// @public
159-
export interface EventStore {
160-
add: (payload: EventStorePayload) => Promise<number>;
161-
count: () => Promise<number>;
162-
getAll: () => Promise<readonly EventStorePayload[]>;
163-
getAllPayloads: () => Promise<readonly Payload[]>;
164-
iterator: () => EventStoreIterator;
165-
removeHead: (count: number) => Promise<void>;
166-
}
167-
168167
// @public
169168
export interface EventStoreConfiguration {
169+
asyncStorage?: AsyncStorage;
170170
maxEventStoreSize?: number;
171171
useAsyncStorageForEventStore?: boolean;
172172
}
@@ -280,8 +280,10 @@ export type MessageNotificationProps = {
280280
trigger: Trigger;
281281
};
282282

283+
// Warning: (ae-forgotten-export) The symbol "Configuration" needs to be exported by the entry point index.d.ts
284+
//
283285
// @public
284-
export function newTracker(configuration: TrackerConfiguration & EmitterConfiguration & SessionConfiguration & SubjectConfiguration & EventStoreConfiguration & ScreenTrackingConfiguration & PlatformContextConfiguration & DeepLinkConfiguration & AppLifecycleConfiguration): Promise<ReactNativeTracker>;
286+
export function newTracker(configuration: Configuration): Promise<ReactNativeTracker>;
285287

286288
// @public
287289
export interface PageViewEvent {

0 commit comments

Comments
 (0)