@mx-cartographer/experiences 3.9.0-alpha.bb1 → 3.9.0-alpha.sms1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,4 @@
1
1
  import { analyticsSession } from '../common';
2
2
  export type AnalyticSession = Awaited<ReturnType<typeof analyticsSession>>;
3
- export declare const onAnalyticEvent: (event: string, session: AnalyticSession | null) => Promise<any>;
4
- export declare const onAnalyticPageView: (page: string, session: AnalyticSession | null) => Promise<any>;
3
+ export declare const onAnalyticEvent: (event: string, session: AnalyticSession) => Promise<any>;
4
+ export declare const onAnalyticPageView: (page: string, session: AnalyticSession) => Promise<any>;
@@ -5,6 +5,7 @@ export interface InsightsMicroWidgetProps extends MicroWidgetProps {
5
5
  areBeatsLoading: boolean;
6
6
  beats: Beat[];
7
7
  endpoint: string;
8
+ logOutUser: () => void;
8
9
  onEvent?: (event?: string | undefined) => void;
9
10
  onPageview?: (event?: string | undefined) => void;
10
11
  token: string;
@@ -9,5 +9,5 @@ export declare class AppStore {
9
9
  token: string;
10
10
  isInitialized: boolean;
11
11
  constructor();
12
- initialize: (endpoint: string, token: string) => Promise<void>;
12
+ initialize: (endpoint: string, token: string, logOutUser: () => void) => Promise<void>;
13
13
  }
@@ -1,9 +1,15 @@
1
+ import { AnalyticSession } from '../analytics';
1
2
  import { BeatApi } from '../../common/api/BeatApi';
2
3
  import { Beat } from '../../common';
4
+ export interface ErrPromise<TSuccess, TError = unknown> {
5
+ then<TResult1 = TSuccess, TResult2 = never>(onfulfilled?: ((value: TSuccess) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: TError) => TResult2 | PromiseLike<TResult2>) | undefined | null): Promise<TResult1 | TResult2>;
6
+ catch<TResult = never>(onrejected?: ((reason: TError) => TResult | PromiseLike<TResult>) | undefined | null): Promise<TSuccess | TResult>;
7
+ }
3
8
  export declare class InsightsMicroWidgetStore {
4
- onAnalyticEvent: (event: string, session: import('../analytics').AnalyticSession | null) => Promise<any>;
5
- onAnalyticPageView: (page: string, session: import('../analytics').AnalyticSession | null) => Promise<any>;
9
+ onAnalyticEvent: (event: string, session: AnalyticSession) => ErrPromise<string, AnalyticSession>;
10
+ onAnalyticPageView: (event: string, session: AnalyticSession) => ErrPromise<string, AnalyticSession>;
6
11
  beatApi: BeatApi;
7
- initialize: (endpoint: string, token: string) => Promise<void>;
12
+ constructor();
13
+ initialize: (endpoint: string, token: string, logOutUser: () => void) => Promise<void>;
8
14
  updateBeat: (beat: Beat) => Promise<void>;
9
15
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mx-cartographer/experiences",
3
- "version": "3.9.0-alpha.bb1",
3
+ "version": "3.9.0-alpha.sms1",
4
4
  "description": "Library containing experience widgets",
5
5
  "main": "dist/index.es.js",
6
6
  "types": "dist/index.d.ts",
@@ -1,3 +0,0 @@
1
- import { default as React } from 'react';
2
- import { WidgetProps } from '../common';
3
- export declare const BubbleBudgetsWidget: React.FC<WidgetProps>;
@@ -1,7 +0,0 @@
1
- import { default as React } from 'react';
2
- import { DetailedBudget } from '../../common/types/Budget';
3
- interface BudgetDetailsProps {
4
- budget: DetailedBudget;
5
- }
6
- export declare const BudgetDetails: React.FC<BudgetDetailsProps>;
7
- export {};
@@ -1,7 +0,0 @@
1
- import { default as React } from 'react';
2
- import { DetailedBudget } from '../../common/types/Budget';
3
- interface BudgetListProps {
4
- onClick?: (budget: DetailedBudget) => void;
5
- }
6
- export declare const BudgetList: React.FC<BudgetListProps>;
7
- export {};
@@ -1,3 +0,0 @@
1
- export declare const Overview: (() => import("react/jsx-runtime").JSX.Element) & {
2
- displayName: string;
3
- };
@@ -1,8 +0,0 @@
1
- import { default as React } from 'react';
2
- import { DetailedBudget } from '../../../common/types/Budget';
3
- interface BudgetRowProps {
4
- budget: DetailedBudget;
5
- onClick?: (budget: DetailedBudget) => void;
6
- }
7
- export declare const BudgetRow: React.FC<BudgetRowProps>;
8
- export {};
@@ -1,7 +0,0 @@
1
- import { default as React } from 'react';
2
- import { DetailedBudget } from '../../../common/types/Budget';
3
- interface SubBudgetRowProps {
4
- budget: DetailedBudget;
5
- }
6
- export declare const SubBudgetRow: React.FC<SubBudgetRowProps>;
7
- export {};
@@ -1 +0,0 @@
1
- export declare const SubBudgetZeroState: () => import("react/jsx-runtime").JSX.Element;