From f18b2c6c27f73d495ebae725d385a11825b07c71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matu=CC=81s=CC=8C=20Tomlein?= Date: Thu, 7 Nov 2024 09:58:23 +0100 Subject: [PATCH] Fix api-extractor config --- ...ct-native-tracker.deeplinkreceivedprops.md | 2 +- .../react-native-tracker.eventcontext.md | 2 +- ...-native-tracker.eventstoreconfiguration.md | 2 +- .../react-native-tracker.listitemviewprops.md | 2 +- ...cker.messagenotificationattachmentprops.md | 2 +- ...native-tracker.messagenotificationprops.md | 10 ++-- .../react-native-tracker.newtracker.md | 6 +-- ...react-native-tracker.reactnativetracker.md | 36 ++------------ .../react-native-tracker.screensize.md | 5 +- .../react-native-tracker.screenviewprops.md | 2 +- ...react-native-tracker.scrollchangedprops.md | 2 +- ...act-native-tracker.sessionconfiguration.md | 2 +- ...act-native-tracker.subjectconfiguration.md | 6 +-- .../react-native-tracker.timingprops.md | 2 +- ...act-native-tracker.trackerconfiguration.md | 2 +- .../markdown/react-native-tracker.trigger.md | 2 +- .../react-native-tracker.api.md | 49 ++----------------- .../react-native-tracker/api-extractor.json | 2 +- trackers/react-native-tracker/tsconfig.json | 2 +- 19 files changed, 30 insertions(+), 108 deletions(-) diff --git a/api-docs/docs/react-native-tracker/markdown/react-native-tracker.deeplinkreceivedprops.md b/api-docs/docs/react-native-tracker/markdown/react-native-tracker.deeplinkreceivedprops.md index 086cfca01..1edfc692e 100644 --- a/api-docs/docs/react-native-tracker/markdown/react-native-tracker.deeplinkreceivedprops.md +++ b/api-docs/docs/react-native-tracker/markdown/react-native-tracker.deeplinkreceivedprops.md @@ -9,7 +9,7 @@ DeepLinkReceived event properties schema: iglu:com.snowplowanalytics.mobile/deep Signature: ```typescript -type DeepLinkReceivedProps = { +export declare type DeepLinkReceivedProps = { url: string; referrer?: string; }; diff --git a/api-docs/docs/react-native-tracker/markdown/react-native-tracker.eventcontext.md b/api-docs/docs/react-native-tracker/markdown/react-native-tracker.eventcontext.md index 05b8a1384..f30c91eb3 100644 --- a/api-docs/docs/react-native-tracker/markdown/react-native-tracker.eventcontext.md +++ b/api-docs/docs/react-native-tracker/markdown/react-native-tracker.eventcontext.md @@ -9,5 +9,5 @@ EventContext type Signature: ```typescript -type EventContext = SelfDescribingJson; +export declare type EventContext = SelfDescribingJson; ``` diff --git a/api-docs/docs/react-native-tracker/markdown/react-native-tracker.eventstoreconfiguration.md b/api-docs/docs/react-native-tracker/markdown/react-native-tracker.eventstoreconfiguration.md index 097afd568..3fd590041 100644 --- a/api-docs/docs/react-native-tracker/markdown/react-native-tracker.eventstoreconfiguration.md +++ b/api-docs/docs/react-native-tracker/markdown/react-native-tracker.eventstoreconfiguration.md @@ -9,7 +9,7 @@ Configuration for the event store Signature: ```typescript -interface EventStoreConfiguration +export interface EventStoreConfiguration ``` ## Properties diff --git a/api-docs/docs/react-native-tracker/markdown/react-native-tracker.listitemviewprops.md b/api-docs/docs/react-native-tracker/markdown/react-native-tracker.listitemviewprops.md index 11c13982a..dfa8a2d47 100644 --- a/api-docs/docs/react-native-tracker/markdown/react-native-tracker.listitemviewprops.md +++ b/api-docs/docs/react-native-tracker/markdown/react-native-tracker.listitemviewprops.md @@ -11,7 +11,7 @@ Schema: `iglu:com.snowplowanalytics.mobile/list_item_view/jsonschema/1-0-0` Signature: ```typescript -type ListItemViewProps = { +export declare type ListItemViewProps = { index: number; itemsCount?: number; }; diff --git a/api-docs/docs/react-native-tracker/markdown/react-native-tracker.messagenotificationattachmentprops.md b/api-docs/docs/react-native-tracker/markdown/react-native-tracker.messagenotificationattachmentprops.md index 1327cc346..927347ead 100644 --- a/api-docs/docs/react-native-tracker/markdown/react-native-tracker.messagenotificationattachmentprops.md +++ b/api-docs/docs/react-native-tracker/markdown/react-native-tracker.messagenotificationattachmentprops.md @@ -9,7 +9,7 @@ Attachment object that identify an attachment in the MessageNotification. Signature: ```typescript -type MessageNotificationAttachmentProps = { +export declare type MessageNotificationAttachmentProps = { identifier: string; type: string; url: string; diff --git a/api-docs/docs/react-native-tracker/markdown/react-native-tracker.messagenotificationprops.md b/api-docs/docs/react-native-tracker/markdown/react-native-tracker.messagenotificationprops.md index d931898c4..f8abb2ea7 100644 --- a/api-docs/docs/react-native-tracker/markdown/react-native-tracker.messagenotificationprops.md +++ b/api-docs/docs/react-native-tracker/markdown/react-native-tracker.messagenotificationprops.md @@ -9,16 +9,10 @@ MessageNotification event properties schema: iglu:com.snowplowanalytics.mobile/m Signature: ```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; @@ -37,3 +31,5 @@ type MessageNotificationProps = { trigger: Trigger; }; ``` +References: [MessageNotificationAttachmentProps](./react-native-tracker.messagenotificationattachmentprops.md), [Trigger](./react-native-tracker.trigger.md) + diff --git a/api-docs/docs/react-native-tracker/markdown/react-native-tracker.newtracker.md b/api-docs/docs/react-native-tracker/markdown/react-native-tracker.newtracker.md index b4d0870c8..da09aff2a 100644 --- a/api-docs/docs/react-native-tracker/markdown/react-native-tracker.newtracker.md +++ b/api-docs/docs/react-native-tracker/markdown/react-native-tracker.newtracker.md @@ -9,18 +9,18 @@ Creates a new tracker instance with the given configuration Signature: ```typescript -declare function newTracker(configuration: TrackerConfiguration & EmitterConfiguration & SessionConfiguration & SubjectConfiguration & EventStoreConfiguration): Promise; +export declare function newTracker(configuration: TrackerConfiguration & EmitterConfiguration & SessionConfiguration & SubjectConfiguration & EventStoreConfiguration): Promise; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | -| configuration | TrackerConfiguration & EmitterConfiguration & SessionConfiguration & SubjectConfiguration & EventStoreConfiguration | Configuration for the tracker | +| configuration | [TrackerConfiguration](./react-native-tracker.trackerconfiguration.md) & EmitterConfiguration & [SessionConfiguration](./react-native-tracker.sessionconfiguration.md) & [SubjectConfiguration](./react-native-tracker.subjectconfiguration.md) & [EventStoreConfiguration](./react-native-tracker.eventstoreconfiguration.md) | Configuration for the tracker | Returns: -Promise<ReactNativeTracker> +Promise<[ReactNativeTracker](./react-native-tracker.reactnativetracker.md)> Tracker instance diff --git a/api-docs/docs/react-native-tracker/markdown/react-native-tracker.reactnativetracker.md b/api-docs/docs/react-native-tracker/markdown/react-native-tracker.reactnativetracker.md index 082b4b53f..00f678ae0 100644 --- a/api-docs/docs/react-native-tracker/markdown/react-native-tracker.reactnativetracker.md +++ b/api-docs/docs/react-native-tracker/markdown/react-native-tracker.reactnativetracker.md @@ -9,43 +9,11 @@ The ReactNativeTracker type Signature: ```typescript -type ReactNativeTracker = { +export declare type ReactNativeTracker = { readonly trackSelfDescribingEvent: = Record>(argmap: SelfDescribingJson, 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 | Record): void; clearGlobalContexts(): void; @@ -67,3 +35,5 @@ type ReactNativeTracker = { readonly setSubjectData: (config: SubjectConfiguration) => void; }; ``` +References: [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) + diff --git a/api-docs/docs/react-native-tracker/markdown/react-native-tracker.screensize.md b/api-docs/docs/react-native-tracker/markdown/react-native-tracker.screensize.md index b4c862051..3e5783854 100644 --- a/api-docs/docs/react-native-tracker/markdown/react-native-tracker.screensize.md +++ b/api-docs/docs/react-native-tracker/markdown/react-native-tracker.screensize.md @@ -9,8 +9,5 @@ Screen size in pixels Signature: ```typescript -type ScreenSize = [ - number, - number -]; +export declare type ScreenSize = [number, number]; ``` diff --git a/api-docs/docs/react-native-tracker/markdown/react-native-tracker.screenviewprops.md b/api-docs/docs/react-native-tracker/markdown/react-native-tracker.screenviewprops.md index 2d9848d7d..e40a349f6 100644 --- a/api-docs/docs/react-native-tracker/markdown/react-native-tracker.screenviewprops.md +++ b/api-docs/docs/react-native-tracker/markdown/react-native-tracker.screenviewprops.md @@ -9,7 +9,7 @@ ScreenView event properties schema: iglu:com.snowplowanalytics.mobile/screen\_vi Signature: ```typescript -type ScreenViewProps = { +export declare type ScreenViewProps = { name: string; id?: string; type?: string; diff --git a/api-docs/docs/react-native-tracker/markdown/react-native-tracker.scrollchangedprops.md b/api-docs/docs/react-native-tracker/markdown/react-native-tracker.scrollchangedprops.md index 5f84665f0..4eedd8e4b 100644 --- a/api-docs/docs/react-native-tracker/markdown/react-native-tracker.scrollchangedprops.md +++ b/api-docs/docs/react-native-tracker/markdown/react-native-tracker.scrollchangedprops.md @@ -11,7 +11,7 @@ Schema: `iglu:com.snowplowanalytics.mobile/scroll_changed/jsonschema/1-0-0` Signature: ```typescript -type ScrollChangedProps = { +export declare type ScrollChangedProps = { yOffset?: number; xOffset?: number; viewHeight?: number; diff --git a/api-docs/docs/react-native-tracker/markdown/react-native-tracker.sessionconfiguration.md b/api-docs/docs/react-native-tracker/markdown/react-native-tracker.sessionconfiguration.md index ab09c84a7..3dc56ce35 100644 --- a/api-docs/docs/react-native-tracker/markdown/react-native-tracker.sessionconfiguration.md +++ b/api-docs/docs/react-native-tracker/markdown/react-native-tracker.sessionconfiguration.md @@ -9,7 +9,7 @@ Configuration for session tracking Signature: ```typescript -interface SessionConfiguration +export interface SessionConfiguration ``` ## Properties diff --git a/api-docs/docs/react-native-tracker/markdown/react-native-tracker.subjectconfiguration.md b/api-docs/docs/react-native-tracker/markdown/react-native-tracker.subjectconfiguration.md index 35e990f6a..b2ffb8023 100644 --- a/api-docs/docs/react-native-tracker/markdown/react-native-tracker.subjectconfiguration.md +++ b/api-docs/docs/react-native-tracker/markdown/react-native-tracker.subjectconfiguration.md @@ -9,7 +9,7 @@ Configuration of subject properties tracked with events Signature: ```typescript -interface SubjectConfiguration +export interface SubjectConfiguration ``` ## Properties @@ -21,8 +21,8 @@ interface SubjectConfiguration | [ipAddress?](./react-native-tracker.subjectconfiguration.ipaddress.md) | string | (Optional) Override the IP address of the device | | [language?](./react-native-tracker.subjectconfiguration.language.md) | string | (Optional) The language set in the device | | [networkUserId?](./react-native-tracker.subjectconfiguration.networkuserid.md) | string | (Optional) Override the network user id (UUIDv4) that is assigned by the collector and stored in cookies | -| [screenResolution?](./react-native-tracker.subjectconfiguration.screenresolution.md) | ScreenSize | (Optional) The screen resolution | -| [screenViewport?](./react-native-tracker.subjectconfiguration.screenviewport.md) | ScreenSize | (Optional) The screen viewport size | +| [screenResolution?](./react-native-tracker.subjectconfiguration.screenresolution.md) | [ScreenSize](./react-native-tracker.screensize.md) | (Optional) The screen resolution | +| [screenViewport?](./react-native-tracker.subjectconfiguration.screenviewport.md) | [ScreenSize](./react-native-tracker.screensize.md) | (Optional) The screen viewport size | | [timezone?](./react-native-tracker.subjectconfiguration.timezone.md) | string | (Optional) The timezone label | | [useragent?](./react-native-tracker.subjectconfiguration.useragent.md) | string | (Optional) The custom user-agent. It overrides the user-agent used by default. | | [userId?](./react-native-tracker.subjectconfiguration.userid.md) | string | (Optional) Business-defined user ID for this user | diff --git a/api-docs/docs/react-native-tracker/markdown/react-native-tracker.timingprops.md b/api-docs/docs/react-native-tracker/markdown/react-native-tracker.timingprops.md index ba74944ba..282ca2e29 100644 --- a/api-docs/docs/react-native-tracker/markdown/react-native-tracker.timingprops.md +++ b/api-docs/docs/react-native-tracker/markdown/react-native-tracker.timingprops.md @@ -9,7 +9,7 @@ Timing event properties Signature: ```typescript -type TimingProps = { +export declare type TimingProps = { category: string; variable: string; timing: number; diff --git a/api-docs/docs/react-native-tracker/markdown/react-native-tracker.trackerconfiguration.md b/api-docs/docs/react-native-tracker/markdown/react-native-tracker.trackerconfiguration.md index e9cfae964..d4ccd1cce 100644 --- a/api-docs/docs/react-native-tracker/markdown/react-native-tracker.trackerconfiguration.md +++ b/api-docs/docs/react-native-tracker/markdown/react-native-tracker.trackerconfiguration.md @@ -9,7 +9,7 @@ The configuration object for initialising the tracker Signature: ```typescript -interface TrackerConfiguration +export interface TrackerConfiguration ``` ## Properties diff --git a/api-docs/docs/react-native-tracker/markdown/react-native-tracker.trigger.md b/api-docs/docs/react-native-tracker/markdown/react-native-tracker.trigger.md index 0f0d4d7fb..d9fc36aed 100644 --- a/api-docs/docs/react-native-tracker/markdown/react-native-tracker.trigger.md +++ b/api-docs/docs/react-native-tracker/markdown/react-native-tracker.trigger.md @@ -9,5 +9,5 @@ Trigger for MessageNotification event Signature: ```typescript -type Trigger = "push" | "location" | "calendar" | "timeInterval" | "other"; +export declare type Trigger = 'push' | 'location' | 'calendar' | 'timeInterval' | 'other'; ``` diff --git a/api-docs/docs/react-native-tracker/react-native-tracker.api.md b/api-docs/docs/react-native-tracker/react-native-tracker.api.md index acb88bef3..8d268ff60 100644 --- a/api-docs/docs/react-native-tracker/react-native-tracker.api.md +++ b/api-docs/docs/react-native-tracker/react-native-tracker.api.md @@ -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; @@ -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; } @@ -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; @@ -280,41 +274,9 @@ export interface PayloadBuilder { // @public export type ReactNativeTracker = { readonly trackSelfDescribingEvent: = Record>(argmap: SelfDescribingJson, 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 | Record): void; clearGlobalContexts(): void; @@ -359,10 +321,7 @@ Array | ContextPrimitive ]; // @public -export type ScreenSize = [ -number, -number -]; +export type ScreenSize = [number, number]; // @public export type ScreenViewProps = { @@ -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 { diff --git a/trackers/react-native-tracker/api-extractor.json b/trackers/react-native-tracker/api-extractor.json index 4a2710c7d..30d2e44b2 100644 --- a/trackers/react-native-tracker/api-extractor.json +++ b/trackers/react-native-tracker/api-extractor.json @@ -45,7 +45,7 @@ * * SUPPORTED TOKENS: , , */ - "mainEntryPointFilePath": "/dist/index.module.d.ts", + "mainEntryPointFilePath": "/dist/typescript/module/src/index.d.ts", /** * A list of NPM package names whose exports should be treated as part of this package. diff --git a/trackers/react-native-tracker/tsconfig.json b/trackers/react-native-tracker/tsconfig.json index d2d42f7dc..346146e71 100644 --- a/trackers/react-native-tracker/tsconfig.json +++ b/trackers/react-native-tracker/tsconfig.json @@ -9,7 +9,7 @@ "esModuleInterop": true, "forceConsistentCasingInFileNames": true, "jsx": "react-jsx", - "lib": ["ESNext"], + "lib": ["ESNext", "DOM"], "module": "ESNext", "moduleResolution": "node", "noEmit": true,