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