@livetiles/reach-plugin-types 0.4.81 → 0.4.82
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 +11 -7
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -2886,25 +2886,29 @@ declare module "libs/reach/util/common/src/analytics/AnalyticsModuleContextProvi
|
|
|
2886
2886
|
}
|
|
2887
2887
|
declare module "libs/reach/util/common/src/analytics/AnalyticsContextProvider" {
|
|
2888
2888
|
import { Dispatch, FC, SetStateAction } from 'react';
|
|
2889
|
-
import { Analytics, EventModule, InteractionProperties, EventSearch } from '@livetiles/analytics';
|
|
2889
|
+
import { Analytics, EventModule, InteractionProperties, EventSearch, EventItem } from '@livetiles/analytics';
|
|
2890
2890
|
export interface SearchAnalytics {
|
|
2891
2891
|
data: EventSearch[];
|
|
2892
2892
|
onSearchTermChange: (newData: EventSearch) => Promise<unknown>;
|
|
2893
2893
|
onItemRead: (itemId: string) => void;
|
|
2894
2894
|
}
|
|
2895
|
-
export interface
|
|
2896
|
-
|
|
2897
|
-
|
|
2895
|
+
export interface ContextualProperties {
|
|
2896
|
+
item?: EventItem | null;
|
|
2897
|
+
module: EventModule | null;
|
|
2898
|
+
}
|
|
2899
|
+
export interface ContextualPropertiesAnalytics {
|
|
2900
|
+
contextualProperties: ContextualProperties;
|
|
2901
|
+
setContextualProperties: Dispatch<SetStateAction<ContextualProperties>>;
|
|
2898
2902
|
}
|
|
2899
|
-
export type ReachAnalytics = Analytics &
|
|
2903
|
+
export type ReachAnalytics = Analytics & ContextualPropertiesAnalytics & SearchAnalytics;
|
|
2900
2904
|
export const AnalyticsContext: import("react").Context<ReachAnalytics>;
|
|
2901
2905
|
export function useAnalyticsContext(): {
|
|
2902
2906
|
interaction: (payload: Omit<InteractionProperties, 'module'>) => Promise<void>;
|
|
2903
2907
|
getUser: () => import("@segment/analytics-next").User;
|
|
2904
2908
|
identify: (userId: string, traits?: Record<string, unknown>) => void;
|
|
2905
2909
|
activity: (payload: import("@livetiles/analytics").ActivityProperties) => import("@livetiles/analytics").Activity;
|
|
2906
|
-
|
|
2907
|
-
|
|
2910
|
+
contextualProperties: ContextualProperties;
|
|
2911
|
+
setContextualProperties: Dispatch<SetStateAction<ContextualProperties>>;
|
|
2908
2912
|
data: EventSearch[];
|
|
2909
2913
|
onSearchTermChange: (newData: EventSearch) => Promise<unknown>;
|
|
2910
2914
|
onItemRead: (itemId: string) => void;
|