@livetiles/reach-plugin-types 0.5.0-preview.291 → 0.5.0-preview.293

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 +6 -5
  2. package/package.json +1 -1
package/lib/index.d.ts CHANGED
@@ -2898,9 +2898,8 @@ declare module "libs/reach/util/common/src/analytics/AnalyticsModuleContextProvi
2898
2898
  }
2899
2899
  declare module "libs/reach/util/common/src/analytics/AnalyticsContextProvider" {
2900
2900
  import { Dispatch, FC, SetStateAction } from 'react';
2901
- import { Activity, Analytics } from '@livetiles/analytics';
2901
+ import { Activity, Analytics, InteractionProperties } from '@livetiles/analytics';
2902
2902
  import { ItemResourceTypes } from "libs/reach/util/common/src/content/index";
2903
- import { InteractionProperties } from "node_modules/@livetiles/analytics/src/models/event";
2904
2903
  export interface AnalyticsSearchData {
2905
2904
  searchTerm: string;
2906
2905
  results: {
@@ -2930,22 +2929,24 @@ declare module "libs/reach/util/common/src/analytics/AnalyticsContextProvider" {
2930
2929
  setModule: Dispatch<SetStateAction<Module>>;
2931
2930
  }
2932
2931
  interface ActivityAnalytics {
2933
- trackActivity: (scrollContainer?: HTMLElement, moduleOverride?: Module) => void;
2932
+ trackActivity: (scrollContainer?: HTMLElement, moduleOverride?: Module) => Activity | undefined;
2933
+ sendActivity: () => void;
2934
2934
  }
2935
2935
  export type ReachAnalytics = Analytics & ModuleAnalytics & SearchAnalytics & ActivityAnalytics;
2936
2936
  export const AnalyticsContext: import("react").Context<ReachAnalytics>;
2937
2937
  export function useAnalyticsContext(): {
2938
2938
  interaction: (payload: Omit<InteractionProperties, 'module'>) => Promise<void>;
2939
- trackActivity: (scrollContainer?: HTMLElement) => void;
2939
+ trackActivity: (scrollContainer?: HTMLElement) => Activity;
2940
2940
  getUser: () => import("@segment/analytics-next").User;
2941
2941
  identify: (userId: string, traits?: Record<string, unknown>) => Promise<void>;
2942
- activity: (payload: import("@livetiles/analytics/lib/models/event").ActivityProperties) => Activity;
2942
+ activity: (payload: import("@livetiles/analytics").ActivityProperties) => Activity;
2943
2943
  module: Module;
2944
2944
  setModule: Dispatch<SetStateAction<Module>>;
2945
2945
  data: AnalyticsSearchData[];
2946
2946
  onSearchTermChange: (newData: AnalyticsSearchData) => Promise<unknown>;
2947
2947
  trackSearchSession: () => Promise<unknown>;
2948
2948
  onItemRead: (itemId: string) => void;
2949
+ sendActivity: () => void;
2949
2950
  };
2950
2951
  export const AnalyticsLibraryContextProvider: FC<{
2951
2952
  appName?: string;
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.291",
7
+ "version": "0.5.0-preview.293",
8
8
  "dependencies": {}
9
9
  }