@livetiles/reach-plugin-types 0.5.0-preview.261 → 0.5.0-preview.263
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/lib/index.d.ts +37 -11
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -225,6 +225,9 @@ declare module "libs/shared/util/environment/src/AnalyticsConfig" {
|
|
|
225
225
|
}
|
|
226
226
|
export interface AnalyticsConfig {
|
|
227
227
|
hostName: string;
|
|
228
|
+
regions?: {
|
|
229
|
+
[key: string]: string;
|
|
230
|
+
};
|
|
228
231
|
dashboards: DashboardConfig[];
|
|
229
232
|
}
|
|
230
233
|
}
|
|
@@ -2868,22 +2871,32 @@ declare module "libs/reach/util/common/src/analytics/analyticsUtils" {
|
|
|
2868
2871
|
SelfRegistration = "selfRegistration",
|
|
2869
2872
|
TargetAudience = "targetAudience",
|
|
2870
2873
|
UpcomingEvents = "upcoming",
|
|
2874
|
+
BookedEvents = "booked",
|
|
2875
|
+
PastEvents = "past",
|
|
2871
2876
|
Users = "users",
|
|
2872
|
-
WebHooks = "webHooks"
|
|
2877
|
+
WebHooks = "webHooks",
|
|
2878
|
+
Editor = "editor"
|
|
2873
2879
|
}
|
|
2874
2880
|
}
|
|
2875
2881
|
declare module "libs/reach/util/common/src/analytics/useLinkInteraction" {
|
|
2876
|
-
|
|
2877
|
-
export function useLinkInteraction(analyticsInstance: ReachAnalytics): void;
|
|
2882
|
+
export function useLinkInteraction(): void;
|
|
2878
2883
|
}
|
|
2879
2884
|
declare module "libs/reach/util/common/src/analytics/useIframeInteraction" {
|
|
2880
|
-
|
|
2881
|
-
|
|
2885
|
+
export function useIframeInteraction(): void;
|
|
2886
|
+
}
|
|
2887
|
+
declare module "libs/reach/util/common/src/analytics/AnalyticsModuleContextProvider" {
|
|
2888
|
+
import { FC } from 'react';
|
|
2889
|
+
import { Module } from "libs/reach/util/common/src/index";
|
|
2890
|
+
export const AnalyticsModuleContext: import("react").Context<Module>;
|
|
2891
|
+
export const AnalyticsModuleContextProvider: FC<{
|
|
2892
|
+
module: Module;
|
|
2893
|
+
}>;
|
|
2882
2894
|
}
|
|
2883
2895
|
declare module "libs/reach/util/common/src/analytics/AnalyticsContextProvider" {
|
|
2884
2896
|
import { Dispatch, FC, SetStateAction } from 'react';
|
|
2885
|
-
import { Analytics } from '@livetiles/analytics';
|
|
2897
|
+
import { Activity, Analytics } from '@livetiles/analytics';
|
|
2886
2898
|
import { ItemResourceTypes } from "libs/reach/util/common/src/content/index";
|
|
2899
|
+
import { InteractionProperties } from "node_modules/@livetiles/analytics/src/models/event";
|
|
2887
2900
|
export interface AnalyticsSearchData {
|
|
2888
2901
|
searchTerm: string;
|
|
2889
2902
|
results: {
|
|
@@ -2903,21 +2916,33 @@ declare module "libs/reach/util/common/src/analytics/AnalyticsContextProvider" {
|
|
|
2903
2916
|
trackSearchSession: () => Promise<unknown>;
|
|
2904
2917
|
onItemRead: (itemId: string) => void;
|
|
2905
2918
|
}
|
|
2906
|
-
interface Module {
|
|
2919
|
+
export interface Module {
|
|
2907
2920
|
type: string;
|
|
2908
2921
|
subtype?: string;
|
|
2909
2922
|
value?: string;
|
|
2910
2923
|
}
|
|
2911
|
-
export interface
|
|
2924
|
+
export interface ModuleAnalytics {
|
|
2912
2925
|
module: Module;
|
|
2913
2926
|
setModule: Dispatch<SetStateAction<Module>>;
|
|
2914
2927
|
}
|
|
2915
2928
|
interface ActivityAnalytics {
|
|
2916
|
-
trackActivity: (scrollContainer?: HTMLElement) => void;
|
|
2929
|
+
trackActivity: (scrollContainer?: HTMLElement, moduleOverride?: Module) => void;
|
|
2917
2930
|
}
|
|
2918
|
-
export type ReachAnalytics = Analytics &
|
|
2931
|
+
export type ReachAnalytics = Analytics & ModuleAnalytics & SearchAnalytics & ActivityAnalytics;
|
|
2919
2932
|
export const AnalyticsContext: import("react").Context<ReachAnalytics>;
|
|
2920
|
-
export function useAnalyticsContext():
|
|
2933
|
+
export function useAnalyticsContext(): {
|
|
2934
|
+
interaction: (payload: Omit<InteractionProperties, 'module'>) => Promise<void>;
|
|
2935
|
+
trackActivity: (scrollContainer?: HTMLElement) => void;
|
|
2936
|
+
getUser: () => import("@segment/analytics-next").User;
|
|
2937
|
+
identify: (userId: string, traits?: Record<string, unknown>) => Promise<void>;
|
|
2938
|
+
activity: (payload: import("@livetiles/analytics/lib/models/event").ActivityProperties) => Activity;
|
|
2939
|
+
module: Module;
|
|
2940
|
+
setModule: Dispatch<SetStateAction<Module>>;
|
|
2941
|
+
data: AnalyticsSearchData[];
|
|
2942
|
+
onSearchTermChange: (newData: AnalyticsSearchData) => Promise<unknown>;
|
|
2943
|
+
trackSearchSession: () => Promise<unknown>;
|
|
2944
|
+
onItemRead: (itemId: string) => void;
|
|
2945
|
+
};
|
|
2921
2946
|
export const AnalyticsLibraryContextProvider: FC<{
|
|
2922
2947
|
appName?: string;
|
|
2923
2948
|
}>;
|
|
@@ -2939,6 +2964,7 @@ declare module "libs/reach/util/common/src/analytics/index" {
|
|
|
2939
2964
|
export * from "libs/reach/util/common/src/analytics/useAnalyticsViewTrack";
|
|
2940
2965
|
export * from "libs/reach/util/common/src/analytics/useAnalyticsActivityTrack";
|
|
2941
2966
|
export * from "libs/reach/util/common/src/analytics/useAnalyticsNavigateTrack";
|
|
2967
|
+
export * from "libs/reach/util/common/src/analytics/AnalyticsModuleContextProvider";
|
|
2942
2968
|
}
|
|
2943
2969
|
declare module "libs/reach/util/common/src/user/useManageCurrentUserApi" {
|
|
2944
2970
|
import { CurrentUser, GroupNotificationSettings, NotificationTypeSettings, UserContact } from "libs/reach/util/common/src/user/User";
|