@coveo/quantic 3.16.0-pre.a563c2456e → 3.16.0

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.
@@ -1,15 +1,11 @@
1
- import { SearchPageClientProvider } from 'coveo.analytics';
2
- import { SearchEventRequest } from 'coveo.analytics/dist/definitions/events.js';
3
1
  import { ConfigurationSection, ContextSection, PipelineSection, QuerySection, SearchHubSection } from '../../state/state-sections.js';
4
2
  export declare const getLanguage: (state: ConfigurationSection) => string;
5
3
  export type StateNeededByBaseAnalyticsProvider = ConfigurationSection & Partial<SearchHubSection & PipelineSection & QuerySection & ContextSection>;
6
- export declare abstract class BaseAnalyticsProvider<T extends StateNeededByBaseAnalyticsProvider> implements SearchPageClientProvider {
4
+ export declare abstract class BaseAnalyticsProvider<T extends StateNeededByBaseAnalyticsProvider> {
7
5
  protected getState: () => T;
8
6
  protected readonly state: T;
9
7
  constructor(getState: () => T);
10
8
  abstract getSearchUID(): string;
11
- abstract getPipeline(): string;
12
- abstract getSearchEventRequestPayload(): Omit<SearchEventRequest, 'actionCause' | 'searchQueryUid'>;
13
9
  getLanguage(): string;
14
10
  getBaseMetadata(): Record<string, string | string[]>;
15
11
  getOriginContext(): string;
@@ -2,12 +2,10 @@ import { AnalyticsClientSendEventHook, CaseAssistClient, CaseAssistClientProvide
2
2
  import { Logger } from 'pino';
3
3
  import { CaseAssistConfigurationSection, CaseFieldSection, CaseInputSection, ConfigurationSection, DocumentSuggestionSection, SearchHubSection } from '../../state/state-sections.js';
4
4
  import { PreprocessRequest } from '../preprocess-request.js';
5
+ import { BaseAnalyticsProvider } from './base-analytics.js';
5
6
  export type StateNeededByCaseAssistAnalytics = ConfigurationSection & Partial<CaseAssistConfigurationSection> & Partial<SearchHubSection> & Partial<CaseFieldSection> & Partial<CaseInputSection> & Partial<DocumentSuggestionSection>;
6
- export declare class CaseAssistAnalyticsProvider implements CaseAssistClientProvider {
7
- private state;
8
- constructor(getState: () => StateNeededByCaseAssistAnalytics);
7
+ export declare class CaseAssistAnalyticsProvider extends BaseAnalyticsProvider<StateNeededByCaseAssistAnalytics> implements CaseAssistClientProvider {
9
8
  getSearchUID(): string;
10
- getOriginLevel1(): string;
11
9
  }
12
10
  interface ConfigureCaseAssistAnalyticsOptions {
13
11
  getState: () => StateNeededByCaseAssistAnalytics;
@@ -4,7 +4,12 @@
4
4
  export interface DocumentSuggestionResponse {
5
5
  clickUri: string;
6
6
  excerpt: string;
7
- fields: Record<string, string | number | boolean | string[]>;
7
+ fields: {
8
+ permanentid: string;
9
+ source: string;
10
+ uri: string;
11
+ urihash: string;
12
+ } & Record<string, string | number | boolean | string[]>;
8
13
  hasHtmlVersion: boolean;
9
14
  title: string;
10
15
  uniqueId: string;
@@ -38,6 +38,7 @@ export declare const caseAssistCaseClassificationSelector: (state: Partial<CaseA
38
38
  };
39
39
  export declare const caseAssistDocumentSuggestionSelector: (state: Partial<CaseAssistAppState>, suggestionId: string, fromQuickview?: boolean, openDocument?: boolean) => {
40
40
  suggestionId: string;
41
+ permanentId: string;
41
42
  responseId: string;
42
43
  suggestion: {
43
44
  documentUri: string;
@@ -45,10 +46,12 @@ export declare const caseAssistDocumentSuggestionSelector: (state: Partial<CaseA
45
46
  documentTitle: string;
46
47
  documentUrl: string;
47
48
  documentPosition: number;
49
+ sourceName: string;
48
50
  };
49
51
  } | {
50
52
  fromQuickview: true;
51
53
  suggestionId: string;
54
+ permanentId: string;
52
55
  responseId: string;
53
56
  suggestion: {
54
57
  documentUri: string;
@@ -56,10 +59,12 @@ export declare const caseAssistDocumentSuggestionSelector: (state: Partial<CaseA
56
59
  documentTitle: string;
57
60
  documentUrl: string;
58
61
  documentPosition: number;
62
+ sourceName: string;
59
63
  };
60
64
  } | {
61
65
  openDocument: true;
62
66
  suggestionId: string;
67
+ permanentId: string;
63
68
  responseId: string;
64
69
  suggestion: {
65
70
  documentUri: string;
@@ -67,5 +72,6 @@ export declare const caseAssistDocumentSuggestionSelector: (state: Partial<CaseA
67
72
  documentTitle: string;
68
73
  documentUrl: string;
69
74
  documentPosition: number;
75
+ sourceName: string;
70
76
  };
71
77
  };