@coveo/quantic 3.31.1 → 3.31.3

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,6 +1,6 @@
1
1
  import type { SearchAppState } from '../../state/search-app-state.js';
2
- import type { ConfigurationSection, GeneratedAnswerSection, GetAnswerQuerySection, InsightConfigurationSection, TabSection } from '../../state/state-sections.js';
2
+ import type { ConfigurationSection, GeneratedAnswerSection, GetAnswerQuerySection, InsightCaseContextSection, InsightConfigurationSection, TabSection } from '../../state/state-sections.js';
3
3
  export type StreamAnswerAPIState = {
4
4
  searchHub: string;
5
5
  pipeline: string;
6
- } & GetAnswerQuerySection & ConfigurationSection & Partial<SearchAppState> & Partial<InsightConfigurationSection> & GeneratedAnswerSection & Partial<TabSection>;
6
+ } & GetAnswerQuerySection & ConfigurationSection & Partial<SearchAppState> & Partial<InsightConfigurationSection> & GeneratedAnswerSection & Partial<TabSection> & Partial<InsightCaseContextSection>;
@@ -3,7 +3,7 @@ import type { AnalyticsParam, ConstantQueryParam, EnableDidYouMeanParam, FacetsP
3
3
  import { type InsightParam } from '../insight-params.js';
4
4
  import type { InsightQuerySuggestRequest } from '../query-suggest/query-suggest-request.js';
5
5
  export type InsightQueryRequest = InsightParam & AnalyticsParam & CaseContextParam & FacetsParam & QueryParam & FirstResultParam & NumberOfResultsParam & SortCriteriaParam & FieldsToIncludeParam & EnableDidYouMeanParam & QueryCorrectionParam & ConstantQueryParam & TabParam & FoldingParam & ContextParam & LocaleParam & PipelineRuleParams;
6
- interface CaseContextParam {
6
+ export interface CaseContextParam {
7
7
  caseContext?: Record<string, string>;
8
8
  }
9
9
  export declare const buildInsightQueryRequest: (req: InsightQueryRequest) => {
@@ -22,4 +22,3 @@ export declare const buildInsightQuerySuggestRequest: (req: InsightQuerySuggestR
22
22
  origin: import("../../../preprocess-request.js").PlatformClientOrigin;
23
23
  contentType: import("../../../platform-client.js").HTTPContentType;
24
24
  };
25
- export {};
@@ -65,6 +65,7 @@ export declare const streamAnswerAPIStateMockWithStaticFiltersAndTabExpressionWi
65
65
  generatedAnswer: import("./generated-answer-state.js").GeneratedAnswerState;
66
66
  instantResults?: import("../instant-results/instant-results-state.js").InstantResultsState | undefined;
67
67
  insightConfiguration?: import("../insight-configuration/insight-configuration-state.js").InsightConfigurationState | undefined;
68
+ insightCaseContext?: import("../case-context/case-context-state.js").CaseContextState | undefined;
68
69
  };
69
70
  export declare const streamAnswerAPIStateMockWithoutSearchAction: StreamAnswerAPIState;
70
71
  export declare const streamAnswerAPIStateMockWithAnalyticsEnabled: StreamAnswerAPIState;
@@ -73,6 +74,7 @@ export declare const streamAnswerAPIStateMockWithFoldingEnabled: StreamAnswerAPI
73
74
  export declare const streamAnswerAPIStateMockWithDictionaryFieldContext: StreamAnswerAPIState;
74
75
  export declare const streamAnswerAPIStateMockWithExcerptLength: StreamAnswerAPIState;
75
76
  export declare const streamAnswerAPIStateMockWithQuerySyntaxEnabled: StreamAnswerAPIState;
77
+ export declare const streamAnswerAPIStateMockWithCaseContextIncluded: StreamAnswerAPIState;
76
78
  export declare const expectedStreamAnswerAPIParam: {
77
79
  q: string;
78
80
  aq: string;
@@ -3,10 +3,11 @@ import type { StreamAnswerAPIState } from '../../api/knowledge/stream-answer-api
3
3
  import type { BaseParam } from '../../api/platform-service-params.js';
4
4
  import type { SearchRequest } from '../../api/search/search/search-request.js';
5
5
  import type { AuthenticationParam, AutomaticFacetsParams } from '../../api/search/search-api-params.js';
6
+ import type { CaseContextParam } from '../../api/service/insight/query/query-request.js';
6
7
  import type { NavigatorContext } from '../../app/navigator-context-provider.js';
7
8
  import type { ConfigurationSection, GeneratedAnswerSection, SearchSection } from '../../state/state-sections.js';
8
9
  type StateNeededByGeneratedAnswerStream = ConfigurationSection & SearchSection & GeneratedAnswerSection;
9
- export interface AnswerApiQueryParams extends Omit<SearchRequest, keyof (BaseParam & AuthenticationParam & AutomaticFacetsParams)> {
10
+ export interface AnswerApiQueryParams extends Omit<SearchRequest, keyof (BaseParam & AuthenticationParam & AutomaticFacetsParams)>, CaseContextParam {
10
11
  }
11
12
  export declare const buildStreamingRequest: (state: StateNeededByGeneratedAnswerStream) => Promise<GeneratedAnswerStreamRequest>;
12
13
  export declare const constructAnswerAPIQueryParams: (state: StreamAnswerAPIState, navigatorContext: NavigatorContext) => AnswerApiQueryParams;