coveo.analytics 2.26.6 → 2.27.1
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/dist/coveoua.browser.js +1 -1
- package/dist/coveoua.browser.js.map +1 -1
- package/dist/coveoua.debug.js +4035 -4009
- package/dist/coveoua.debug.js.map +1 -1
- package/dist/coveoua.js +1 -1
- package/dist/coveoua.js.map +1 -1
- package/dist/definitions/bundle/browser-fetch.d.ts +1 -1
- package/dist/definitions/caseAssist/caseAssistActions.d.ts +76 -76
- package/dist/definitions/caseAssist/caseAssistClient.d.ts +28 -28
- package/dist/definitions/client/analytics.d.ts +116 -116
- package/dist/definitions/client/analyticsBeaconClient.d.ts +14 -14
- package/dist/definitions/client/analyticsFetchClient.d.ts +11 -11
- package/dist/definitions/client/analyticsRequestClient.d.ts +24 -24
- package/dist/definitions/client/location.d.ts +1 -1
- package/dist/definitions/client/measurementProtocolMapper.d.ts +7 -7
- package/dist/definitions/client/measurementProtocolMapping/baseMeasurementProtocolMapper.d.ts +3 -3
- package/dist/definitions/client/measurementProtocolMapping/commerceMeasurementProtocolMapper.d.ts +10 -10
- package/dist/definitions/client/measurementProtocolMapping/serviceMeasurementProtocolMapper.d.ts +6 -6
- package/dist/definitions/client/noopAnalytics.d.ts +25 -25
- package/dist/definitions/client/runtimeEnvironment.d.ts +23 -23
- package/dist/definitions/client/token.d.ts +1 -1
- package/dist/definitions/client/utils.d.ts +3 -2
- package/dist/definitions/cookieutils.d.ts +5 -5
- package/dist/definitions/coveoua/browser.d.ts +6 -6
- package/dist/definitions/coveoua/headless.d.ts +6 -6
- package/dist/definitions/coveoua/library.d.ts +17 -13
- package/dist/definitions/coveoua/plugins.d.ts +10 -10
- package/dist/definitions/coveoua/simpleanalytics.d.ts +31 -31
- package/dist/definitions/detector.d.ts +9 -9
- package/dist/definitions/donottrack.d.ts +2 -2
- package/dist/definitions/events.d.ts +113 -113
- package/dist/definitions/formatting/format-array-for-coveo-custom-data.d.ts +1 -1
- package/dist/definitions/formatting/format-omnibox-metadata.d.ts +2 -2
- package/dist/definitions/history.d.ts +33 -33
- package/dist/definitions/hook/addDefaultValues.d.ts +2 -2
- package/dist/definitions/hook/enhanceViewEvent.d.ts +2 -2
- package/dist/definitions/insight/insightClient.d.ts +81 -81
- package/dist/definitions/insight/insightEvents.d.ts +50 -50
- package/dist/definitions/plugins/BasePlugin.d.ts +58 -58
- package/dist/definitions/plugins/ec.d.ts +67 -66
- package/dist/definitions/plugins/link.d.ts +21 -21
- package/dist/definitions/plugins/svc.d.ts +32 -32
- package/dist/definitions/react-native/index.d.ts +3 -3
- package/dist/definitions/react-native/react-native-runtime.d.ts +18 -18
- package/dist/definitions/react-native/react-native-utils.d.ts +2 -2
- package/dist/definitions/searchPage/searchPageClient.d.ts +188 -188
- package/dist/definitions/searchPage/searchPageEvents.d.ts +181 -181
- package/dist/definitions/src/coveoua/browser.d.ts +6 -6
- package/dist/definitions/src/coveoua/headless.d.ts +6 -6
- package/dist/definitions/src/coveoua/library.d.ts +17 -13
- package/dist/definitions/src/coveoua/plugins.d.ts +10 -10
- package/dist/definitions/src/coveoua/simpleanalytics.d.ts +31 -31
- package/dist/definitions/src/react-native/index.d.ts +3 -3
- package/dist/definitions/src/react-native/react-native-runtime.d.ts +18 -18
- package/dist/definitions/storage.d.ts +24 -24
- package/dist/definitions/version.d.ts +1 -1
- package/dist/library.es.js +2629 -2629
- package/dist/library.js +6739 -6722
- package/dist/react-native.es.js +2644 -2644
- package/package.json +24 -25
- package/src/client/analyticsBeaconClient.spec.ts +3 -3
- package/src/client/utils.ts +11 -0
- package/src/coveoua/library.ts +5 -0
- package/src/coveoua/simpleanalytics.ts +3 -0
- package/src/plugins/ec.spec.ts +61 -19
- package/src/plugins/ec.ts +13 -1
- package/src/react-native/react-native.spec.ts +2 -2
- package/dist/definitions/src/plugins/ec.d.ts +0 -66
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { AnalyticsClient, PreparedEvent } from './analytics';
|
|
2
|
-
import { AnyEventResponse, SearchEventResponse, ClickEventResponse, CustomEventResponse, VisitResponse, HealthResponse, ViewEventResponse, EventType, PreparedSearchEventRequest, SearchEventRequest, ClickEventRequest, CustomEventRequest, PreparedClickEventRequest, PreparedCustomEventRequest, PreparedViewEventRequest, ViewEventRequest } from '../events';
|
|
3
|
-
import { NoopRuntime } from './runtimeEnvironment';
|
|
4
|
-
export declare class NoopAnalytics implements AnalyticsClient {
|
|
5
|
-
getPayload(): Promise<any>;
|
|
6
|
-
getParameters(): Promise<any>;
|
|
7
|
-
makeEvent<TPreparedRequest, TCompleteRequest, TResponse extends AnyEventResponse>(eventType: EventType | string): Promise<PreparedEvent<TPreparedRequest, TCompleteRequest, TResponse>>;
|
|
8
|
-
sendEvent(): Promise<AnyEventResponse | void>;
|
|
9
|
-
makeSearchEvent(): Promise<PreparedEvent<PreparedSearchEventRequest, SearchEventRequest, SearchEventResponse>>;
|
|
10
|
-
sendSearchEvent(): Promise<SearchEventResponse | void>;
|
|
11
|
-
makeClickEvent(): Promise<PreparedEvent<PreparedClickEventRequest, ClickEventRequest, ClickEventResponse>>;
|
|
12
|
-
sendClickEvent(): Promise<ClickEventResponse | void>;
|
|
13
|
-
makeCustomEvent(): Promise<PreparedEvent<PreparedCustomEventRequest, CustomEventRequest, CustomEventResponse>>;
|
|
14
|
-
sendCustomEvent(): Promise<CustomEventResponse | void>;
|
|
15
|
-
makeViewEvent(): Promise<PreparedEvent<PreparedViewEventRequest, ViewEventRequest, ViewEventResponse>>;
|
|
16
|
-
sendViewEvent(): Promise<ViewEventResponse | void>;
|
|
17
|
-
getVisit(): Promise<VisitResponse>;
|
|
18
|
-
getHealth(): Promise<HealthResponse>;
|
|
19
|
-
registerBeforeSendEventHook(): void;
|
|
20
|
-
registerAfterSendEventHook(): void;
|
|
21
|
-
addEventTypeMapping(): void;
|
|
22
|
-
runtime: NoopRuntime;
|
|
23
|
-
get version(): string;
|
|
24
|
-
currentVisitorId: string;
|
|
25
|
-
}
|
|
1
|
+
import { AnalyticsClient, PreparedEvent } from './analytics';
|
|
2
|
+
import { AnyEventResponse, SearchEventResponse, ClickEventResponse, CustomEventResponse, VisitResponse, HealthResponse, ViewEventResponse, EventType, PreparedSearchEventRequest, SearchEventRequest, ClickEventRequest, CustomEventRequest, PreparedClickEventRequest, PreparedCustomEventRequest, PreparedViewEventRequest, ViewEventRequest } from '../events';
|
|
3
|
+
import { NoopRuntime } from './runtimeEnvironment';
|
|
4
|
+
export declare class NoopAnalytics implements AnalyticsClient {
|
|
5
|
+
getPayload(): Promise<any>;
|
|
6
|
+
getParameters(): Promise<any>;
|
|
7
|
+
makeEvent<TPreparedRequest, TCompleteRequest, TResponse extends AnyEventResponse>(eventType: EventType | string): Promise<PreparedEvent<TPreparedRequest, TCompleteRequest, TResponse>>;
|
|
8
|
+
sendEvent(): Promise<AnyEventResponse | void>;
|
|
9
|
+
makeSearchEvent(): Promise<PreparedEvent<PreparedSearchEventRequest, SearchEventRequest, SearchEventResponse>>;
|
|
10
|
+
sendSearchEvent(): Promise<SearchEventResponse | void>;
|
|
11
|
+
makeClickEvent(): Promise<PreparedEvent<PreparedClickEventRequest, ClickEventRequest, ClickEventResponse>>;
|
|
12
|
+
sendClickEvent(): Promise<ClickEventResponse | void>;
|
|
13
|
+
makeCustomEvent(): Promise<PreparedEvent<PreparedCustomEventRequest, CustomEventRequest, CustomEventResponse>>;
|
|
14
|
+
sendCustomEvent(): Promise<CustomEventResponse | void>;
|
|
15
|
+
makeViewEvent(): Promise<PreparedEvent<PreparedViewEventRequest, ViewEventRequest, ViewEventResponse>>;
|
|
16
|
+
sendViewEvent(): Promise<ViewEventResponse | void>;
|
|
17
|
+
getVisit(): Promise<VisitResponse>;
|
|
18
|
+
getHealth(): Promise<HealthResponse>;
|
|
19
|
+
registerBeforeSendEventHook(): void;
|
|
20
|
+
registerAfterSendEventHook(): void;
|
|
21
|
+
addEventTypeMapping(): void;
|
|
22
|
+
runtime: NoopRuntime;
|
|
23
|
+
get version(): string;
|
|
24
|
+
currentVisitorId: string;
|
|
25
|
+
}
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { WebStorage, NullStorage } from '../storage';
|
|
2
|
-
import { AnalyticsRequestClient, IAnalyticsClientOptions, NoopAnalyticsClient } from './analyticsRequestClient';
|
|
3
|
-
import { AnalyticsFetchClient } from './analyticsFetchClient';
|
|
4
|
-
import { BufferedRequest } from './analytics';
|
|
5
|
-
export interface IRuntimeEnvironment {
|
|
6
|
-
storage: WebStorage;
|
|
7
|
-
client: AnalyticsRequestClient;
|
|
8
|
-
}
|
|
9
|
-
export declare class BrowserRuntime implements IRuntimeEnvironment {
|
|
10
|
-
storage: WebStorage;
|
|
11
|
-
client: AnalyticsFetchClient;
|
|
12
|
-
private beaconClient;
|
|
13
|
-
constructor(clientOptions: IAnalyticsClientOptions, getUnprocessedRequests: () => Array<BufferedRequest>);
|
|
14
|
-
}
|
|
15
|
-
export declare class NodeJSRuntime implements IRuntimeEnvironment {
|
|
16
|
-
storage: WebStorage;
|
|
17
|
-
client: AnalyticsFetchClient;
|
|
18
|
-
constructor(clientOptions: IAnalyticsClientOptions, storage?: WebStorage);
|
|
19
|
-
}
|
|
20
|
-
export declare class NoopRuntime implements IRuntimeEnvironment {
|
|
21
|
-
storage: NullStorage;
|
|
22
|
-
client: NoopAnalyticsClient;
|
|
23
|
-
}
|
|
1
|
+
import { WebStorage, NullStorage } from '../storage';
|
|
2
|
+
import { AnalyticsRequestClient, IAnalyticsClientOptions, NoopAnalyticsClient } from './analyticsRequestClient';
|
|
3
|
+
import { AnalyticsFetchClient } from './analyticsFetchClient';
|
|
4
|
+
import { BufferedRequest } from './analytics';
|
|
5
|
+
export interface IRuntimeEnvironment {
|
|
6
|
+
storage: WebStorage;
|
|
7
|
+
client: AnalyticsRequestClient;
|
|
8
|
+
}
|
|
9
|
+
export declare class BrowserRuntime implements IRuntimeEnvironment {
|
|
10
|
+
storage: WebStorage;
|
|
11
|
+
client: AnalyticsFetchClient;
|
|
12
|
+
private beaconClient;
|
|
13
|
+
constructor(clientOptions: IAnalyticsClientOptions, getUnprocessedRequests: () => Array<BufferedRequest>);
|
|
14
|
+
}
|
|
15
|
+
export declare class NodeJSRuntime implements IRuntimeEnvironment {
|
|
16
|
+
storage: WebStorage;
|
|
17
|
+
client: AnalyticsFetchClient;
|
|
18
|
+
constructor(clientOptions: IAnalyticsClientOptions, storage?: WebStorage);
|
|
19
|
+
}
|
|
20
|
+
export declare class NoopRuntime implements IRuntimeEnvironment {
|
|
21
|
+
storage: NullStorage;
|
|
22
|
+
client: NoopAnalyticsClient;
|
|
23
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const isApiKey: (token?: string
|
|
1
|
+
export declare const isApiKey: (token?: string) => boolean;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
export declare const keysOf: <T>(o: T) => Extract<keyof T, string>[];
|
|
2
|
-
export declare function isObject(o: any): boolean;
|
|
1
|
+
export declare const keysOf: <T>(o: T) => Extract<keyof T, string>[];
|
|
2
|
+
export declare function isObject(o: any): boolean;
|
|
3
|
+
export declare function coerceToNumber(input: any): any;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export declare class Cookie {
|
|
2
|
-
static set(name: string, value: string, expire?: number): void;
|
|
3
|
-
static get(name: string): string | null;
|
|
4
|
-
static erase(name: string): void;
|
|
5
|
-
}
|
|
1
|
+
export declare class Cookie {
|
|
2
|
+
static set(name: string, value: string, expire?: number): void;
|
|
3
|
+
static get(name: string): string | null;
|
|
4
|
+
static erase(name: string): void;
|
|
5
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export interface CoveoUAGlobal {
|
|
2
|
-
(action: string, ...params: any[]): void;
|
|
3
|
-
q?: [string, any[]][];
|
|
4
|
-
}
|
|
5
|
-
declare const _default: any;
|
|
6
|
-
export default _default;
|
|
1
|
+
export interface CoveoUAGlobal {
|
|
2
|
+
(action: string, ...params: any[]): void;
|
|
3
|
+
q?: [string, any[]][];
|
|
4
|
+
}
|
|
5
|
+
declare const _default: any;
|
|
6
|
+
export default _default;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { CoveoSearchPageClient, SearchPageClientProvider } from '../searchPage/searchPageClient';
|
|
2
|
-
export { CaseAssistClient, CaseAssistClientProvider } from '../caseAssist/caseAssistClient';
|
|
3
|
-
export { CoveoInsightClient, InsightClientProvider } from '../insight/insightClient';
|
|
4
|
-
export { CoveoAnalyticsClient, AnalyticsClientSendEventHook } from '../client/analytics';
|
|
5
|
-
export { PreprocessAnalyticsRequest } from '../client/analyticsRequestClient';
|
|
6
|
-
export * as history from '../history';
|
|
1
|
+
export { CoveoSearchPageClient, SearchPageClientProvider } from '../searchPage/searchPageClient';
|
|
2
|
+
export { CaseAssistClient, CaseAssistClientProvider } from '../caseAssist/caseAssistClient';
|
|
3
|
+
export { CoveoInsightClient, InsightClientProvider } from '../insight/insightClient';
|
|
4
|
+
export { CoveoAnalyticsClient, AnalyticsClientSendEventHook } from '../client/analytics';
|
|
5
|
+
export { PreprocessAnalyticsRequest } from '../client/analyticsRequestClient';
|
|
6
|
+
export * as history from '../history';
|
|
@@ -1,13 +1,17 @@
|
|
|
1
|
-
import * as analytics from '../client/analytics';
|
|
2
|
-
import * as donottrack from '../donottrack';
|
|
3
|
-
import * as history from '../history';
|
|
4
|
-
import * as SimpleAnalytics from './simpleanalytics';
|
|
5
|
-
import * as storage from '../storage';
|
|
6
|
-
export { CoveoAnalyticsClient, AnalyticsClientSendEventHook } from '../client/analytics';
|
|
7
|
-
export { PreprocessAnalyticsRequest } from '../client/analyticsRequestClient';
|
|
8
|
-
export { IRuntimeEnvironment } from '../client/runtimeEnvironment';
|
|
9
|
-
export { CoveoUA, getCurrentClient, handleOneAnalyticsEvent } from './simpleanalytics';
|
|
10
|
-
export { CoveoSearchPageClient, SearchPageClientProvider, EventDescription, EventBuilder, } from '../searchPage/searchPageClient';
|
|
11
|
-
export { CaseAssistClient, CaseAssistClientProvider } from '../caseAssist/caseAssistClient';
|
|
12
|
-
export { CoveoInsightClient, InsightClientProvider } from '../insight/insightClient';
|
|
13
|
-
export
|
|
1
|
+
import * as analytics from '../client/analytics';
|
|
2
|
+
import * as donottrack from '../donottrack';
|
|
3
|
+
import * as history from '../history';
|
|
4
|
+
import * as SimpleAnalytics from './simpleanalytics';
|
|
5
|
+
import * as storage from '../storage';
|
|
6
|
+
export { CoveoAnalyticsClient, AnalyticsClientSendEventHook } from '../client/analytics';
|
|
7
|
+
export { PreprocessAnalyticsRequest } from '../client/analyticsRequestClient';
|
|
8
|
+
export { IRuntimeEnvironment } from '../client/runtimeEnvironment';
|
|
9
|
+
export { CoveoUA, getCurrentClient, handleOneAnalyticsEvent } from './simpleanalytics';
|
|
10
|
+
export { CoveoSearchPageClient, SearchPageClientProvider, EventDescription, EventBuilder, } from '../searchPage/searchPageClient';
|
|
11
|
+
export { CaseAssistClient, CaseAssistClientProvider } from '../caseAssist/caseAssistClient';
|
|
12
|
+
export { CoveoInsightClient, InsightClientProvider } from '../insight/insightClient';
|
|
13
|
+
export * from '../searchPage/searchPageEvents';
|
|
14
|
+
export * from '../caseAssist/caseAssistActions';
|
|
15
|
+
export * from '../insight/insightEvents';
|
|
16
|
+
export * from '../events';
|
|
17
|
+
export { analytics, donottrack, history, SimpleAnalytics, storage };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { PluginClass, PluginOptions } from '../plugins/BasePlugin';
|
|
2
|
-
export declare class Plugins {
|
|
3
|
-
static readonly DefaultPlugins: string[];
|
|
4
|
-
private registeredPluginsMap;
|
|
5
|
-
private requiredPlugins;
|
|
6
|
-
require(name: string, options: PluginOptions): void;
|
|
7
|
-
provide(name: string, plugin: PluginClass): void;
|
|
8
|
-
clearRequired(): void;
|
|
9
|
-
execute(name: string, fn: string, ...args: any[]): any;
|
|
10
|
-
}
|
|
1
|
+
import { PluginClass, PluginOptions } from '../plugins/BasePlugin';
|
|
2
|
+
export declare class Plugins {
|
|
3
|
+
static readonly DefaultPlugins: string[];
|
|
4
|
+
private registeredPluginsMap;
|
|
5
|
+
private requiredPlugins;
|
|
6
|
+
require(name: string, options: PluginOptions): void;
|
|
7
|
+
provide(name: string, plugin: PluginClass): void;
|
|
8
|
+
clearRequired(): void;
|
|
9
|
+
execute(name: string, fn: string, ...args: any[]): any;
|
|
10
|
+
}
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { AnyEventResponse, SendEventArguments } from '../events';
|
|
2
|
-
import { AnalyticsClient } from '../client/analytics';
|
|
3
|
-
import { PluginOptions } from '../plugins/BasePlugin';
|
|
4
|
-
import { PluginClass } from '../plugins/BasePlugin';
|
|
5
|
-
export
|
|
6
|
-
export interface CoveoUAOptions {
|
|
7
|
-
endpoint?: string;
|
|
8
|
-
plugins?: string[];
|
|
9
|
-
}
|
|
10
|
-
export declare class CoveoUA {
|
|
11
|
-
client?: AnalyticsClient;
|
|
12
|
-
private plugins;
|
|
13
|
-
private params;
|
|
14
|
-
init(token: string | AnalyticsClient, optionsOrEndpoint: string | CoveoUAOptions): void;
|
|
15
|
-
private isAnalyticsClient;
|
|
16
|
-
private getPluginKeys;
|
|
17
|
-
private getEndpoint;
|
|
18
|
-
initForProxy(endpoint: string): void;
|
|
19
|
-
set(keyOrObject: string | any, value: string): void;
|
|
20
|
-
send(...[event, ...payload]: SendEventArguments): Promise<AnyEventResponse | void>;
|
|
21
|
-
onLoad(callback: Function): void;
|
|
22
|
-
provide(name: string, plugin: PluginClass): void;
|
|
23
|
-
require(name: string, options: Omit<PluginOptions, 'client'>): void;
|
|
24
|
-
callPlugin(pluginName: string, fn: string, ...args: any): any;
|
|
25
|
-
reset(): void;
|
|
26
|
-
version(): string;
|
|
27
|
-
}
|
|
28
|
-
export declare const coveoua: CoveoUA;
|
|
29
|
-
export declare const getCurrentClient: () => AnalyticsClient | undefined;
|
|
30
|
-
export declare const handleOneAnalyticsEvent: (command: string, ...params: any[]) => any;
|
|
31
|
-
export default handleOneAnalyticsEvent;
|
|
1
|
+
import { AnyEventResponse, SendEventArguments } from '../events';
|
|
2
|
+
import { AnalyticsClient } from '../client/analytics';
|
|
3
|
+
import { PluginOptions } from '../plugins/BasePlugin';
|
|
4
|
+
import { PluginClass } from '../plugins/BasePlugin';
|
|
5
|
+
export type AvailableActions = keyof CoveoUA;
|
|
6
|
+
export interface CoveoUAOptions {
|
|
7
|
+
endpoint?: string;
|
|
8
|
+
plugins?: string[];
|
|
9
|
+
}
|
|
10
|
+
export declare class CoveoUA {
|
|
11
|
+
client?: AnalyticsClient;
|
|
12
|
+
private plugins;
|
|
13
|
+
private params;
|
|
14
|
+
init(token: string | AnalyticsClient, optionsOrEndpoint: string | CoveoUAOptions): void;
|
|
15
|
+
private isAnalyticsClient;
|
|
16
|
+
private getPluginKeys;
|
|
17
|
+
private getEndpoint;
|
|
18
|
+
initForProxy(endpoint: string): void;
|
|
19
|
+
set(keyOrObject: string | any, value: string): void;
|
|
20
|
+
send(...[event, ...payload]: SendEventArguments): Promise<AnyEventResponse | void>;
|
|
21
|
+
onLoad(callback: Function): void;
|
|
22
|
+
provide(name: string, plugin: PluginClass): void;
|
|
23
|
+
require(name: string, options: Omit<PluginOptions, 'client'>): void;
|
|
24
|
+
callPlugin(pluginName: string, fn: string, ...args: any): any;
|
|
25
|
+
reset(): void;
|
|
26
|
+
version(): string;
|
|
27
|
+
}
|
|
28
|
+
export declare const coveoua: CoveoUA;
|
|
29
|
+
export declare const getCurrentClient: () => AnalyticsClient | undefined;
|
|
30
|
+
export declare const handleOneAnalyticsEvent: (command: string, ...params: any[]) => any;
|
|
31
|
+
export default handleOneAnalyticsEvent;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export declare function hasWindow(): boolean;
|
|
2
|
-
export declare function hasNavigator(): boolean;
|
|
3
|
-
export declare function hasDocument(): boolean;
|
|
4
|
-
export declare function hasLocalStorage(): boolean;
|
|
5
|
-
export declare function hasSessionStorage(): boolean;
|
|
6
|
-
export declare function hasCookieStorage(): boolean;
|
|
7
|
-
export declare function hasCrypto(): boolean;
|
|
8
|
-
export declare function hasCryptoRandomValues(): boolean;
|
|
9
|
-
export declare function hasLocation(): boolean;
|
|
1
|
+
export declare function hasWindow(): boolean;
|
|
2
|
+
export declare function hasNavigator(): boolean;
|
|
3
|
+
export declare function hasDocument(): boolean;
|
|
4
|
+
export declare function hasLocalStorage(): boolean;
|
|
5
|
+
export declare function hasSessionStorage(): boolean;
|
|
6
|
+
export declare function hasCookieStorage(): boolean;
|
|
7
|
+
export declare function hasCrypto(): boolean;
|
|
8
|
+
export declare function hasCryptoRandomValues(): boolean;
|
|
9
|
+
export declare function hasLocation(): boolean;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare function doNotTrack(): boolean;
|
|
2
|
-
export default doNotTrack;
|
|
1
|
+
export declare function doNotTrack(): boolean;
|
|
2
|
+
export default doNotTrack;
|
|
@@ -1,113 +1,113 @@
|
|
|
1
|
-
export
|
|
2
|
-
export declare enum EventType {
|
|
3
|
-
search = "search",
|
|
4
|
-
click = "click",
|
|
5
|
-
custom = "custom",
|
|
6
|
-
view = "view",
|
|
7
|
-
collect = "collect"
|
|
8
|
-
}
|
|
9
|
-
export interface SearchDocument {
|
|
10
|
-
documentUri: string;
|
|
11
|
-
documentUriHash: string;
|
|
12
|
-
}
|
|
13
|
-
export
|
|
14
|
-
export
|
|
15
|
-
export interface EventBaseRequest {
|
|
16
|
-
language?: string;
|
|
17
|
-
userAgent?: string;
|
|
18
|
-
customData?: Record<string, any>;
|
|
19
|
-
anonymous?: boolean;
|
|
20
|
-
username?: string;
|
|
21
|
-
userDisplayName?: any;
|
|
22
|
-
splitTestRunName?: string;
|
|
23
|
-
splitTestRunVersion?: string;
|
|
24
|
-
clientId?: string;
|
|
25
|
-
originContext?: string;
|
|
26
|
-
originLevel1?: string;
|
|
27
|
-
originLevel2?: string;
|
|
28
|
-
originLevel3?: string;
|
|
29
|
-
}
|
|
30
|
-
export interface FacetStateRequest {
|
|
31
|
-
field: string;
|
|
32
|
-
id: string;
|
|
33
|
-
value: string;
|
|
34
|
-
valuePosition: number;
|
|
35
|
-
displayValue: string;
|
|
36
|
-
facetType: 'specific' | 'dateRange' | 'numericalRange' | 'hierarchical';
|
|
37
|
-
state: 'selected' | 'idle';
|
|
38
|
-
facetPosition: number;
|
|
39
|
-
title: string;
|
|
40
|
-
start?: string;
|
|
41
|
-
end?: string;
|
|
42
|
-
endInclusive?: boolean;
|
|
43
|
-
}
|
|
44
|
-
export interface SearchEventRequest extends EventBaseRequest {
|
|
45
|
-
searchQueryUid: string;
|
|
46
|
-
queryText: string;
|
|
47
|
-
actionCause: string;
|
|
48
|
-
responseTime: number;
|
|
49
|
-
advancedQuery?: string;
|
|
50
|
-
numberOfResults?: number;
|
|
51
|
-
contextual?: boolean;
|
|
52
|
-
results?: SearchDocument[];
|
|
53
|
-
queryPipeline?: string;
|
|
54
|
-
userGroups?: string[];
|
|
55
|
-
facetState?: FacetStateRequest[];
|
|
56
|
-
}
|
|
57
|
-
export interface PreparedSearchEventRequest extends Omit<SearchEventRequest, 'searchQueryUid'> {
|
|
58
|
-
}
|
|
59
|
-
export interface DocumentInformation {
|
|
60
|
-
documentUri: string;
|
|
61
|
-
documentUriHash: string;
|
|
62
|
-
collectionName: string;
|
|
63
|
-
sourceName: string;
|
|
64
|
-
documentPosition: number;
|
|
65
|
-
actionCause: string;
|
|
66
|
-
searchQueryUid: string;
|
|
67
|
-
documentTitle: string;
|
|
68
|
-
documentUrl: string;
|
|
69
|
-
documentAuthor: string;
|
|
70
|
-
queryPipeline: string;
|
|
71
|
-
rankingModifier: string;
|
|
72
|
-
}
|
|
73
|
-
export interface ClickEventRequest extends EventBaseRequest, DocumentInformation {
|
|
74
|
-
}
|
|
75
|
-
export interface PreparedClickEventRequest extends Omit<ClickEventRequest, 'searchQueryUid'> {
|
|
76
|
-
}
|
|
77
|
-
export interface CustomEventRequest extends EventBaseRequest {
|
|
78
|
-
eventType: string;
|
|
79
|
-
eventValue: string;
|
|
80
|
-
lastSearchQueryUid?: string;
|
|
81
|
-
}
|
|
82
|
-
export interface PreparedCustomEventRequest extends Omit<CustomEventRequest, 'lastSearchQueryUid'> {
|
|
83
|
-
}
|
|
84
|
-
export interface ViewEventRequest extends EventBaseRequest {
|
|
85
|
-
location?: string;
|
|
86
|
-
referrer?: string;
|
|
87
|
-
title?: string;
|
|
88
|
-
contentIdKey: string;
|
|
89
|
-
contentIdValue: string;
|
|
90
|
-
contentType?: string;
|
|
91
|
-
}
|
|
92
|
-
export interface PreparedViewEventRequest extends ViewEventRequest {
|
|
93
|
-
}
|
|
94
|
-
export interface DefaultEventResponse {
|
|
95
|
-
visitId: string;
|
|
96
|
-
visitorId: string;
|
|
97
|
-
}
|
|
98
|
-
export interface SearchEventResponse extends DefaultEventResponse {
|
|
99
|
-
}
|
|
100
|
-
export interface ClickEventResponse extends DefaultEventResponse {
|
|
101
|
-
}
|
|
102
|
-
export interface CustomEventResponse extends DefaultEventResponse {
|
|
103
|
-
}
|
|
104
|
-
export interface ViewEventResponse extends DefaultEventResponse {
|
|
105
|
-
}
|
|
106
|
-
export
|
|
107
|
-
export interface VisitResponse {
|
|
108
|
-
id: string;
|
|
109
|
-
visitorId: string;
|
|
110
|
-
}
|
|
111
|
-
export interface HealthResponse {
|
|
112
|
-
status: string;
|
|
113
|
-
}
|
|
1
|
+
export type IRequestPayload = Record<string, any>;
|
|
2
|
+
export declare enum EventType {
|
|
3
|
+
search = "search",
|
|
4
|
+
click = "click",
|
|
5
|
+
custom = "custom",
|
|
6
|
+
view = "view",
|
|
7
|
+
collect = "collect"
|
|
8
|
+
}
|
|
9
|
+
export interface SearchDocument {
|
|
10
|
+
documentUri: string;
|
|
11
|
+
documentUriHash: string;
|
|
12
|
+
}
|
|
13
|
+
export type SendEventArguments = [EventType, ...any[]];
|
|
14
|
+
export type VariableArgumentsPayload = [] | [any] | [string, any] | [string, string, any] | [string, string, string, any] | [string, string, string, string, any];
|
|
15
|
+
export interface EventBaseRequest {
|
|
16
|
+
language?: string;
|
|
17
|
+
userAgent?: string;
|
|
18
|
+
customData?: Record<string, any>;
|
|
19
|
+
anonymous?: boolean;
|
|
20
|
+
username?: string;
|
|
21
|
+
userDisplayName?: any;
|
|
22
|
+
splitTestRunName?: string;
|
|
23
|
+
splitTestRunVersion?: string;
|
|
24
|
+
clientId?: string;
|
|
25
|
+
originContext?: string;
|
|
26
|
+
originLevel1?: string;
|
|
27
|
+
originLevel2?: string;
|
|
28
|
+
originLevel3?: string;
|
|
29
|
+
}
|
|
30
|
+
export interface FacetStateRequest {
|
|
31
|
+
field: string;
|
|
32
|
+
id: string;
|
|
33
|
+
value: string;
|
|
34
|
+
valuePosition: number;
|
|
35
|
+
displayValue: string;
|
|
36
|
+
facetType: 'specific' | 'dateRange' | 'numericalRange' | 'hierarchical';
|
|
37
|
+
state: 'selected' | 'idle';
|
|
38
|
+
facetPosition: number;
|
|
39
|
+
title: string;
|
|
40
|
+
start?: string;
|
|
41
|
+
end?: string;
|
|
42
|
+
endInclusive?: boolean;
|
|
43
|
+
}
|
|
44
|
+
export interface SearchEventRequest extends EventBaseRequest {
|
|
45
|
+
searchQueryUid: string;
|
|
46
|
+
queryText: string;
|
|
47
|
+
actionCause: string;
|
|
48
|
+
responseTime: number;
|
|
49
|
+
advancedQuery?: string;
|
|
50
|
+
numberOfResults?: number;
|
|
51
|
+
contextual?: boolean;
|
|
52
|
+
results?: SearchDocument[];
|
|
53
|
+
queryPipeline?: string;
|
|
54
|
+
userGroups?: string[];
|
|
55
|
+
facetState?: FacetStateRequest[];
|
|
56
|
+
}
|
|
57
|
+
export interface PreparedSearchEventRequest extends Omit<SearchEventRequest, 'searchQueryUid'> {
|
|
58
|
+
}
|
|
59
|
+
export interface DocumentInformation {
|
|
60
|
+
documentUri: string;
|
|
61
|
+
documentUriHash: string;
|
|
62
|
+
collectionName: string;
|
|
63
|
+
sourceName: string;
|
|
64
|
+
documentPosition: number;
|
|
65
|
+
actionCause: string;
|
|
66
|
+
searchQueryUid: string;
|
|
67
|
+
documentTitle: string;
|
|
68
|
+
documentUrl: string;
|
|
69
|
+
documentAuthor: string;
|
|
70
|
+
queryPipeline: string;
|
|
71
|
+
rankingModifier: string;
|
|
72
|
+
}
|
|
73
|
+
export interface ClickEventRequest extends EventBaseRequest, DocumentInformation {
|
|
74
|
+
}
|
|
75
|
+
export interface PreparedClickEventRequest extends Omit<ClickEventRequest, 'searchQueryUid'> {
|
|
76
|
+
}
|
|
77
|
+
export interface CustomEventRequest extends EventBaseRequest {
|
|
78
|
+
eventType: string;
|
|
79
|
+
eventValue: string;
|
|
80
|
+
lastSearchQueryUid?: string;
|
|
81
|
+
}
|
|
82
|
+
export interface PreparedCustomEventRequest extends Omit<CustomEventRequest, 'lastSearchQueryUid'> {
|
|
83
|
+
}
|
|
84
|
+
export interface ViewEventRequest extends EventBaseRequest {
|
|
85
|
+
location?: string;
|
|
86
|
+
referrer?: string;
|
|
87
|
+
title?: string;
|
|
88
|
+
contentIdKey: string;
|
|
89
|
+
contentIdValue: string;
|
|
90
|
+
contentType?: string;
|
|
91
|
+
}
|
|
92
|
+
export interface PreparedViewEventRequest extends ViewEventRequest {
|
|
93
|
+
}
|
|
94
|
+
export interface DefaultEventResponse {
|
|
95
|
+
visitId: string;
|
|
96
|
+
visitorId: string;
|
|
97
|
+
}
|
|
98
|
+
export interface SearchEventResponse extends DefaultEventResponse {
|
|
99
|
+
}
|
|
100
|
+
export interface ClickEventResponse extends DefaultEventResponse {
|
|
101
|
+
}
|
|
102
|
+
export interface CustomEventResponse extends DefaultEventResponse {
|
|
103
|
+
}
|
|
104
|
+
export interface ViewEventResponse extends DefaultEventResponse {
|
|
105
|
+
}
|
|
106
|
+
export type AnyEventResponse = SearchEventResponse | ClickEventResponse | CustomEventResponse | ViewEventResponse;
|
|
107
|
+
export interface VisitResponse {
|
|
108
|
+
id: string;
|
|
109
|
+
visitorId: string;
|
|
110
|
+
}
|
|
111
|
+
export interface HealthResponse {
|
|
112
|
+
status: string;
|
|
113
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const formatArrayForCoveoCustomData: (rawData: string[]) => string;
|
|
1
|
+
export declare const formatArrayForCoveoCustomData: (rawData: string[]) => string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { OmniboxSuggestionsMetadata } from '../searchPage/searchPageEvents';
|
|
2
|
-
export declare function formatOmniboxMetadata(meta: OmniboxSuggestionsMetadata): OmniboxSuggestionsMetadata;
|
|
1
|
+
import { OmniboxSuggestionsMetadata } from '../searchPage/searchPageEvents';
|
|
2
|
+
export declare function formatOmniboxMetadata(meta: OmniboxSuggestionsMetadata): OmniboxSuggestionsMetadata;
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import { WebStorage } from './storage';
|
|
2
|
-
export declare const STORE_KEY: string;
|
|
3
|
-
export declare const MAX_NUMBER_OF_HISTORY_ELEMENTS: number;
|
|
4
|
-
export declare const MIN_THRESHOLD_FOR_DUPLICATE_VALUE: number;
|
|
5
|
-
export declare const MAX_VALUE_SIZE = 75;
|
|
6
|
-
export declare class HistoryStore {
|
|
7
|
-
private store;
|
|
8
|
-
constructor(store?: WebStorage);
|
|
9
|
-
addElement(elem: HistoryElement): void;
|
|
10
|
-
addElementAsync(elem: HistoryElement): Promise<void>;
|
|
11
|
-
getHistory(): HistoryElement[];
|
|
12
|
-
getHistoryAsync(): Promise<HistoryElement[]>;
|
|
13
|
-
private getHistoryWithInternalTime;
|
|
14
|
-
private getHistoryWithInternalTimeAsync;
|
|
15
|
-
setHistory(history: HistoryElement[]): void;
|
|
16
|
-
clear(): void;
|
|
17
|
-
getMostRecentElement(): HistoryElement | null;
|
|
18
|
-
private cropQueryElement;
|
|
19
|
-
private isValidEntry;
|
|
20
|
-
private stripInternalTime;
|
|
21
|
-
private stripEmptyQuery;
|
|
22
|
-
private stripEmptyQueries;
|
|
23
|
-
}
|
|
24
|
-
export interface HistoryElement {
|
|
25
|
-
name: string;
|
|
26
|
-
value?: string;
|
|
27
|
-
time: string;
|
|
28
|
-
internalTime?: number;
|
|
29
|
-
}
|
|
30
|
-
export interface HistoryViewElement extends HistoryElement {
|
|
31
|
-
title?: string;
|
|
32
|
-
}
|
|
33
|
-
export default HistoryStore;
|
|
1
|
+
import { WebStorage } from './storage';
|
|
2
|
+
export declare const STORE_KEY: string;
|
|
3
|
+
export declare const MAX_NUMBER_OF_HISTORY_ELEMENTS: number;
|
|
4
|
+
export declare const MIN_THRESHOLD_FOR_DUPLICATE_VALUE: number;
|
|
5
|
+
export declare const MAX_VALUE_SIZE = 75;
|
|
6
|
+
export declare class HistoryStore {
|
|
7
|
+
private store;
|
|
8
|
+
constructor(store?: WebStorage);
|
|
9
|
+
addElement(elem: HistoryElement): void;
|
|
10
|
+
addElementAsync(elem: HistoryElement): Promise<void>;
|
|
11
|
+
getHistory(): HistoryElement[];
|
|
12
|
+
getHistoryAsync(): Promise<HistoryElement[]>;
|
|
13
|
+
private getHistoryWithInternalTime;
|
|
14
|
+
private getHistoryWithInternalTimeAsync;
|
|
15
|
+
setHistory(history: HistoryElement[]): void;
|
|
16
|
+
clear(): void;
|
|
17
|
+
getMostRecentElement(): HistoryElement | null;
|
|
18
|
+
private cropQueryElement;
|
|
19
|
+
private isValidEntry;
|
|
20
|
+
private stripInternalTime;
|
|
21
|
+
private stripEmptyQuery;
|
|
22
|
+
private stripEmptyQueries;
|
|
23
|
+
}
|
|
24
|
+
export interface HistoryElement {
|
|
25
|
+
name: string;
|
|
26
|
+
value?: string;
|
|
27
|
+
time: string;
|
|
28
|
+
internalTime?: number;
|
|
29
|
+
}
|
|
30
|
+
export interface HistoryViewElement extends HistoryElement {
|
|
31
|
+
title?: string;
|
|
32
|
+
}
|
|
33
|
+
export default HistoryStore;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { AnalyticsClientSendEventHook } from '../client/analytics';
|
|
2
|
-
export declare const addDefaultValues: AnalyticsClientSendEventHook;
|
|
1
|
+
import { AnalyticsClientSendEventHook } from '../client/analytics';
|
|
2
|
+
export declare const addDefaultValues: AnalyticsClientSendEventHook;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { AnalyticsClientSendEventHook } from '../client/analytics';
|
|
2
|
-
export declare const enhanceViewEvent: AnalyticsClientSendEventHook;
|
|
1
|
+
import { AnalyticsClientSendEventHook } from '../client/analytics';
|
|
2
|
+
export declare const enhanceViewEvent: AnalyticsClientSendEventHook;
|