Skip to content

Commit

Permalink
Fix api-extractor config
Browse files Browse the repository at this point in the history
  • Loading branch information
matus-tomlein committed Nov 7, 2024
1 parent e1f7b97 commit f18b2c6
Show file tree
Hide file tree
Showing 19 changed files with 30 additions and 108 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ DeepLinkReceived event properties schema: iglu:com.snowplowanalytics.mobile/deep
<b>Signature:</b>

```typescript
type DeepLinkReceivedProps = {
export declare type DeepLinkReceivedProps = {
url: string;
referrer?: string;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ EventContext type
<b>Signature:</b>

```typescript
type EventContext = SelfDescribingJson;
export declare type EventContext = SelfDescribingJson;
```
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Configuration for the event store
<b>Signature:</b>

```typescript
interface EventStoreConfiguration
export interface EventStoreConfiguration
```

## Properties
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Schema: `iglu:com.snowplowanalytics.mobile/list_item_view/jsonschema/1-0-0`
<b>Signature:</b>

```typescript
type ListItemViewProps = {
export declare type ListItemViewProps = {
index: number;
itemsCount?: number;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Attachment object that identify an attachment in the MessageNotification.
<b>Signature:</b>

```typescript
type MessageNotificationAttachmentProps = {
export declare type MessageNotificationAttachmentProps = {
identifier: string;
type: string;
url: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,10 @@ MessageNotification event properties schema: iglu:com.snowplowanalytics.mobile/m
<b>Signature:</b>

```typescript
type MessageNotificationProps = {
export declare type MessageNotificationProps = {
action?: string;
/*
* Attachments added to the notification (they can be part of the data object).
*/
attachments?: MessageNotificationAttachmentProps[];
body: string;
/*
* 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.
*/
bodyLocArgs?: string[];
bodyLocKey?: string;
category?: string;
Expand All @@ -37,3 +31,5 @@ type MessageNotificationProps = {
trigger: Trigger;
};
```
<b>References:</b> [MessageNotificationAttachmentProps](./react-native-tracker.messagenotificationattachmentprops.md)<!-- -->, [Trigger](./react-native-tracker.trigger.md)

Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@ Creates a new tracker instance with the given configuration
<b>Signature:</b>

```typescript
declare function newTracker(configuration: TrackerConfiguration & EmitterConfiguration & SessionConfiguration & SubjectConfiguration & EventStoreConfiguration): Promise<ReactNativeTracker>;
export declare function newTracker(configuration: TrackerConfiguration & EmitterConfiguration & SessionConfiguration & SubjectConfiguration & EventStoreConfiguration): Promise<ReactNativeTracker>;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| configuration | TrackerConfiguration &amp; EmitterConfiguration &amp; SessionConfiguration &amp; SubjectConfiguration &amp; EventStoreConfiguration | Configuration for the tracker |
| 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) | Configuration for the tracker |

<b>Returns:</b>

Promise&lt;ReactNativeTracker&gt;
Promise&lt;[ReactNativeTracker](./react-native-tracker.reactnativetracker.md)<!-- -->&gt;

Tracker instance

Original file line number Diff line number Diff line change
Expand Up @@ -9,43 +9,11 @@ The ReactNativeTracker type
<b>Signature:</b>

```typescript
type ReactNativeTracker = {
export declare type ReactNativeTracker = {
readonly trackSelfDescribingEvent: <T extends Record<string, unknown> = Record<string, unknown>>(argmap: SelfDescribingJson<T>, contexts?: EventContext[]) => void;
// TODO:
// /**
// * Tracks a screen-view event
// *
// * @param argmap - The screen-view event's properties
// * @param contexts - The array of event contexts
// */
// readonly trackScreenViewEvent: (argmap: ScreenViewProps, contexts?: EventContext[]) => string | undefined;
// TODO:
// /**
// * Tracks a scroll changed event
// *
// * @param argmap - The scroll changed event's properties
// * @param contexts - The array of event contexts
// */
// readonly trackScrollChangedEvent: (argmap: ScrollChangedProps, contexts?: EventContext[]) => string | undefined;
// TODO:
// /**
// * Tracks a list item view event
// *
// * @param argmap - The list item view event's properties
// * @param contexts - The array of event contexts
// */
// readonly trackListItemViewEvent: (argmap: ListItemViewProps, contexts?: EventContext[]) => string | undefined;
readonly trackStructuredEvent: (argmap: StructuredEvent, contexts?: EventContext[]) => void;
readonly trackPageViewEvent: (argmap: PageViewEvent, contexts?: EventContext[]) => void;
readonly trackTimingEvent: (argmap: TimingProps, contexts?: EventContext[]) => void;
// TODO:
// /**
// * Tracks a deep link received event
// *
// * @param argmap - The deep link received event properties
// * @param contexts - The array of event contexts
// */
// readonly trackDeepLinkReceivedEvent: (argmap: DeepLinkReceivedProps, contexts?: EventContext[]) => void;
readonly trackMessageNotificationEvent: (argmap: MessageNotificationProps, contexts?: EventContext[]) => void;
addGlobalContexts(contexts: Array<ConditionalContextProvider | ContextPrimitive> | Record<string, ConditionalContextProvider | ContextPrimitive>): void;
clearGlobalContexts(): void;
Expand All @@ -67,3 +35,5 @@ type ReactNativeTracker = {
readonly setSubjectData: (config: SubjectConfiguration) => void;
};
```
<b>References:</b> [EventContext](./react-native-tracker.eventcontext.md)<!-- -->, [TimingProps](./react-native-tracker.timingprops.md)<!-- -->, [MessageNotificationProps](./react-native-tracker.messagenotificationprops.md)<!-- -->, [ScreenSize](./react-native-tracker.screensize.md)<!-- -->, [SubjectConfiguration](./react-native-tracker.subjectconfiguration.md)

Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,5 @@ Screen size in pixels
<b>Signature:</b>

```typescript
type ScreenSize = [
number,
number
];
export declare type ScreenSize = [number, number];
```
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ ScreenView event properties schema: iglu:com.snowplowanalytics.mobile/screen\_vi
<b>Signature:</b>

```typescript
type ScreenViewProps = {
export declare type ScreenViewProps = {
name: string;
id?: string;
type?: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Schema: `iglu:com.snowplowanalytics.mobile/scroll_changed/jsonschema/1-0-0`
<b>Signature:</b>

```typescript
type ScrollChangedProps = {
export declare type ScrollChangedProps = {
yOffset?: number;
xOffset?: number;
viewHeight?: number;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Configuration for session tracking
<b>Signature:</b>

```typescript
interface SessionConfiguration
export interface SessionConfiguration
```

## Properties
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Configuration of subject properties tracked with events
<b>Signature:</b>

```typescript
interface SubjectConfiguration
export interface SubjectConfiguration
```

## Properties
Expand All @@ -21,8 +21,8 @@ interface SubjectConfiguration
| [ipAddress?](./react-native-tracker.subjectconfiguration.ipaddress.md) | string | <i>(Optional)</i> Override the IP address of the device |
| [language?](./react-native-tracker.subjectconfiguration.language.md) | string | <i>(Optional)</i> The language set in the device |
| [networkUserId?](./react-native-tracker.subjectconfiguration.networkuserid.md) | string | <i>(Optional)</i> Override the network user id (UUIDv4) that is assigned by the collector and stored in cookies |
| [screenResolution?](./react-native-tracker.subjectconfiguration.screenresolution.md) | ScreenSize | <i>(Optional)</i> The screen resolution |
| [screenViewport?](./react-native-tracker.subjectconfiguration.screenviewport.md) | ScreenSize | <i>(Optional)</i> The screen viewport size |
| [screenResolution?](./react-native-tracker.subjectconfiguration.screenresolution.md) | [ScreenSize](./react-native-tracker.screensize.md) | <i>(Optional)</i> The screen resolution |
| [screenViewport?](./react-native-tracker.subjectconfiguration.screenviewport.md) | [ScreenSize](./react-native-tracker.screensize.md) | <i>(Optional)</i> The screen viewport size |
| [timezone?](./react-native-tracker.subjectconfiguration.timezone.md) | string | <i>(Optional)</i> The timezone label |
| [useragent?](./react-native-tracker.subjectconfiguration.useragent.md) | string | <i>(Optional)</i> The custom user-agent. It overrides the user-agent used by default. |
| [userId?](./react-native-tracker.subjectconfiguration.userid.md) | string | <i>(Optional)</i> Business-defined user ID for this user |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Timing event properties
<b>Signature:</b>

```typescript
type TimingProps = {
export declare type TimingProps = {
category: string;
variable: string;
timing: number;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The configuration object for initialising the tracker
<b>Signature:</b>

```typescript
interface TrackerConfiguration
export interface TrackerConfiguration
```

## Properties
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ Trigger for MessageNotification event
<b>Signature:</b>

```typescript
type Trigger = "push" | "location" | "calendar" | "timeInterval" | "other";
export declare type Trigger = 'push' | 'location' | 'calendar' | 'timeInterval' | 'other';
```
49 changes: 4 additions & 45 deletions api-docs/docs/react-native-tracker/react-native-tracker.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
// @public
export type ConditionalContextProvider = FilterProvider | RuleSetProvider;

// Warning: (ae-forgotten-export) The symbol "ContextEvent" needs to be exported by the entry point index.module.d.ts
// Warning: (ae-forgotten-export) The symbol "ContextEvent" needs to be exported by the entry point index.d.ts
//
// @public
export type ContextFilter = (args?: ContextEvent) => boolean;
Expand Down Expand Up @@ -152,7 +152,7 @@ export interface EventStoreConfiguration {

// @public
export interface EventStoreIterator {
// Warning: (ae-forgotten-export) The symbol "EventStoreIteratorNextResult" needs to be exported by the entry point index.module.d.ts
// Warning: (ae-forgotten-export) The symbol "EventStoreIteratorNextResult" needs to be exported by the entry point index.d.ts
next: () => Promise<EventStoreIteratorNextResult>;
}

Expand Down Expand Up @@ -226,14 +226,8 @@ export type MessageNotificationAttachmentProps = {
// @public
export type MessageNotificationProps = {
action?: string;
/*
* Attachments added to the notification (they can be part of the data object).
*/
attachments?: MessageNotificationAttachmentProps[];
body: string;
/*
* 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.
*/
bodyLocArgs?: string[];
bodyLocKey?: string;
category?: string;
Expand Down Expand Up @@ -280,41 +274,9 @@ export interface PayloadBuilder {
// @public
export type ReactNativeTracker = {
readonly trackSelfDescribingEvent: <T extends Record<string, unknown> = Record<string, unknown>>(argmap: SelfDescribingJson<T>, contexts?: EventContext[]) => void;
// TODO:
// /**
// * Tracks a screen-view event
// *
// * @param argmap - The screen-view event's properties
// * @param contexts - The array of event contexts
// */
// readonly trackScreenViewEvent: (argmap: ScreenViewProps, contexts?: EventContext[]) => string | undefined;
// TODO:
// /**
// * Tracks a scroll changed event
// *
// * @param argmap - The scroll changed event's properties
// * @param contexts - The array of event contexts
// */
// readonly trackScrollChangedEvent: (argmap: ScrollChangedProps, contexts?: EventContext[]) => string | undefined;
// TODO:
// /**
// * Tracks a list item view event
// *
// * @param argmap - The list item view event's properties
// * @param contexts - The array of event contexts
// */
// readonly trackListItemViewEvent: (argmap: ListItemViewProps, contexts?: EventContext[]) => string | undefined;
readonly trackStructuredEvent: (argmap: StructuredEvent, contexts?: EventContext[]) => void;
readonly trackPageViewEvent: (argmap: PageViewEvent, contexts?: EventContext[]) => void;
readonly trackTimingEvent: (argmap: TimingProps, contexts?: EventContext[]) => void;
// TODO:
// /**
// * Tracks a deep link received event
// *
// * @param argmap - The deep link received event properties
// * @param contexts - The array of event contexts
// */
// readonly trackDeepLinkReceivedEvent: (argmap: DeepLinkReceivedProps, contexts?: EventContext[]) => void;
readonly trackMessageNotificationEvent: (argmap: MessageNotificationProps, contexts?: EventContext[]) => void;
addGlobalContexts(contexts: Array<ConditionalContextProvider | ContextPrimitive> | Record<string, ConditionalContextProvider | ContextPrimitive>): void;
clearGlobalContexts(): void;
Expand Down Expand Up @@ -359,10 +321,7 @@ Array<ContextPrimitive> | ContextPrimitive
];

// @public
export type ScreenSize = [
number,
number
];
export type ScreenSize = [number, number];

// @public
export type ScreenViewProps = {
Expand Down Expand Up @@ -470,7 +429,7 @@ export interface TrackerCore {
}

// @public
export type Trigger = "push" | "location" | "calendar" | "timeInterval" | "other";
export type Trigger = 'push' | 'location' | 'calendar' | 'timeInterval' | 'other';

// @public
export interface TrueTimestamp {
Expand Down
2 changes: 1 addition & 1 deletion trackers/react-native-tracker/api-extractor.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
*
* SUPPORTED TOKENS: <projectFolder>, <packageName>, <unscopedPackageName>
*/
"mainEntryPointFilePath": "<projectFolder>/dist/index.module.d.ts",
"mainEntryPointFilePath": "<projectFolder>/dist/typescript/module/src/index.d.ts",

/**
* A list of NPM package names whose exports should be treated as part of this package.
Expand Down
2 changes: 1 addition & 1 deletion trackers/react-native-tracker/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"jsx": "react-jsx",
"lib": ["ESNext"],
"lib": ["ESNext", "DOM"],
"module": "ESNext",
"moduleResolution": "node",
"noEmit": true,
Expand Down

0 comments on commit f18b2c6

Please sign in to comment.