@livetiles/reach-plugin-types 0.5.0-preview.494 → 0.5.0-preview.498

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.
Files changed (2) hide show
  1. package/lib/index.d.ts +11 -7
  2. package/package.json +1 -1
package/lib/index.d.ts CHANGED
@@ -2920,25 +2920,29 @@ declare module "libs/reach/util/common/src/analytics/AnalyticsModuleContextProvi
2920
2920
  }
2921
2921
  declare module "libs/reach/util/common/src/analytics/AnalyticsContextProvider" {
2922
2922
  import { Dispatch, FC, SetStateAction } from 'react';
2923
- import { Analytics, EventModule, InteractionProperties, EventSearch } from '@livetiles/analytics';
2923
+ import { Analytics, EventModule, InteractionProperties, EventSearch, EventItem } from '@livetiles/analytics';
2924
2924
  export interface SearchAnalytics {
2925
2925
  data: EventSearch[];
2926
2926
  onSearchTermChange: (newData: EventSearch) => Promise<unknown>;
2927
2927
  onItemRead: (itemId: string) => void;
2928
2928
  }
2929
- export interface ModuleAnalytics {
2930
- module: EventModule;
2931
- setModule: Dispatch<SetStateAction<EventModule>>;
2929
+ export interface ContextualProperties {
2930
+ item?: EventItem | null;
2931
+ module: EventModule | null;
2932
+ }
2933
+ export interface ContextualPropertiesAnalytics {
2934
+ contextualProperties: ContextualProperties;
2935
+ setContextualProperties: Dispatch<SetStateAction<ContextualProperties>>;
2932
2936
  }
2933
- export type ReachAnalytics = Analytics & ModuleAnalytics & SearchAnalytics;
2937
+ export type ReachAnalytics = Analytics & ContextualPropertiesAnalytics & SearchAnalytics;
2934
2938
  export const AnalyticsContext: import("react").Context<ReachAnalytics>;
2935
2939
  export function useAnalyticsContext(): {
2936
2940
  interaction: (payload: Omit<InteractionProperties, 'module'>) => Promise<void>;
2937
2941
  getUser: () => import("@segment/analytics-next").User;
2938
2942
  identify: (userId: string, traits?: Record<string, unknown>) => void;
2939
2943
  activity: (payload: import("@livetiles/analytics").ActivityProperties) => import("@livetiles/analytics").Activity;
2940
- module: EventModule;
2941
- setModule: Dispatch<SetStateAction<EventModule>>;
2944
+ contextualProperties: ContextualProperties;
2945
+ setContextualProperties: Dispatch<SetStateAction<ContextualProperties>>;
2942
2946
  data: EventSearch[];
2943
2947
  onSearchTermChange: (newData: EventSearch) => Promise<unknown>;
2944
2948
  onItemRead: (itemId: string) => void;
package/package.json CHANGED
@@ -4,6 +4,6 @@
4
4
  "main": "",
5
5
  "types": "./index.d.ts",
6
6
  "license": "ISC",
7
- "version": "0.5.0-preview.494",
7
+ "version": "0.5.0-preview.498",
8
8
  "dependencies": {}
9
9
  }