@coveo/quantic 3.31.3 → 3.31.4-pre.d713796c1c

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 (14) hide show
  1. package/force-app/main/default/staticresources/coveoheadless/case-assist/headless.js +3 -3
  2. package/force-app/main/default/staticresources/coveoheadless/definitions/api/knowledge/stream-answer-api-state.d.ts +2 -2
  3. package/force-app/main/default/staticresources/coveoheadless/definitions/api/service/insight/query/query-request.d.ts +2 -1
  4. package/force-app/main/default/staticresources/coveoheadless/definitions/features/generated-answer/generated-answer-mocks.d.ts +0 -2
  5. package/force-app/main/default/staticresources/coveoheadless/definitions/features/generated-answer/generated-answer-request.d.ts +1 -2
  6. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/types/fetch-static-state.d.ts +3 -0
  7. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/types/from-build-result.d.ts +6 -0
  8. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/types/hydrate-static-state.d.ts +3 -0
  9. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/common/types/fetch-static-state.d.ts +3 -0
  10. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/common/types/hydrate-static-state.d.ts +3 -0
  11. package/force-app/main/default/staticresources/coveoheadless/headless.js +3 -3
  12. package/force-app/main/default/staticresources/coveoheadless/insight/headless.js +3 -3
  13. package/force-app/main/default/staticresources/coveoheadless/recommendation/headless.js +3 -3
  14. package/package.json +2 -2
@@ -1,6 +1,6 @@
1
1
  import type { SearchAppState } from '../../state/search-app-state.js';
2
- import type { ConfigurationSection, GeneratedAnswerSection, GetAnswerQuerySection, InsightCaseContextSection, InsightConfigurationSection, TabSection } from '../../state/state-sections.js';
2
+ import type { ConfigurationSection, GeneratedAnswerSection, GetAnswerQuerySection, 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> & Partial<InsightCaseContextSection>;
6
+ } & GetAnswerQuerySection & ConfigurationSection & Partial<SearchAppState> & Partial<InsightConfigurationSection> & GeneratedAnswerSection & Partial<TabSection>;
@@ -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
- export interface CaseContextParam {
6
+ interface CaseContextParam {
7
7
  caseContext?: Record<string, string>;
8
8
  }
9
9
  export declare const buildInsightQueryRequest: (req: InsightQueryRequest) => {
@@ -22,3 +22,4 @@ 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,7 +65,6 @@ 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;
69
68
  };
70
69
  export declare const streamAnswerAPIStateMockWithoutSearchAction: StreamAnswerAPIState;
71
70
  export declare const streamAnswerAPIStateMockWithAnalyticsEnabled: StreamAnswerAPIState;
@@ -74,7 +73,6 @@ export declare const streamAnswerAPIStateMockWithFoldingEnabled: StreamAnswerAPI
74
73
  export declare const streamAnswerAPIStateMockWithDictionaryFieldContext: StreamAnswerAPIState;
75
74
  export declare const streamAnswerAPIStateMockWithExcerptLength: StreamAnswerAPIState;
76
75
  export declare const streamAnswerAPIStateMockWithQuerySyntaxEnabled: StreamAnswerAPIState;
77
- export declare const streamAnswerAPIStateMockWithCaseContextIncluded: StreamAnswerAPIState;
78
76
  export declare const expectedStreamAnswerAPIParam: {
79
77
  q: string;
80
78
  aq: string;
@@ -3,11 +3,10 @@ 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';
7
6
  import type { NavigatorContext } from '../../app/navigator-context-provider.js';
8
7
  import type { ConfigurationSection, GeneratedAnswerSection, SearchSection } from '../../state/state-sections.js';
9
8
  type StateNeededByGeneratedAnswerStream = ConfigurationSection & SearchSection & GeneratedAnswerSection;
10
- export interface AnswerApiQueryParams extends Omit<SearchRequest, keyof (BaseParam & AuthenticationParam & AutomaticFacetsParams)>, CaseContextParam {
9
+ export interface AnswerApiQueryParams extends Omit<SearchRequest, keyof (BaseParam & AuthenticationParam & AutomaticFacetsParams)> {
11
10
  }
12
11
  export declare const buildStreamingRequest: (state: StateNeededByGeneratedAnswerStream) => Promise<GeneratedAnswerStreamRequest>;
13
12
  export declare const constructAnswerAPIQueryParams: (state: StreamAnswerAPIState, navigatorContext: NavigatorContext) => AnswerApiQueryParams;
@@ -17,5 +17,8 @@ export type FetchStaticState<TControllers extends ControllersMap, TSearchAction
17
17
  * Useful for static generation and server-side rendering.
18
18
  */
19
19
  (...params: OptionsTuple<FetchStaticStateOptions & EngineDefinitionControllersPropsOption<TControllersDefinitionsMap, TControllersProps, TSolutionType>>): Promise<EngineStaticState<TSearchAction, TControllersStaticState>>;
20
+ /**
21
+ * @deprecated Use the fetchStaticState() method instead
22
+ */
20
23
  fromBuildResult: FromBuildResult<TControllers, FetchStaticStateOptions, EngineStaticState<TSearchAction, TControllersStaticState>>;
21
24
  };
@@ -1,6 +1,9 @@
1
1
  import type { ControllersMap } from '../../common/types/controllers.js';
2
2
  import type { SSRCommerceEngine } from '../factories/build-factory.js';
3
3
  import type { EngineDefinitionBuildResult } from './controller-definitions.js';
4
+ /**
5
+ * @deprecated This type is deprecated and will be removed in future major version.
6
+ */
4
7
  interface FromBuildResultOptions<TControllers extends ControllersMap> {
5
8
  /**
6
9
  * The build result of the engine
@@ -15,5 +18,8 @@ interface FromBuildResultOptions<TControllers extends ControllersMap> {
15
18
  */
16
19
  allowedRecommendationKeys?: string[];
17
20
  }
21
+ /**
22
+ * @deprecated This type is deprecated and will be removed in future major version.
23
+ */
18
24
  export type FromBuildResult<TControllers extends ControllersMap, TOptions, TReturn> = (options: FromBuildResultOptions<TControllers> & TOptions) => Promise<TReturn>;
19
25
  export {};
@@ -16,5 +16,8 @@ export type HydrateStaticState<TControllers extends ControllersMap, TSearchActio
16
16
  * Useful when hydrating a server-side-rendered engine.
17
17
  */
18
18
  (...params: OptionsTuple<HydrateStaticStateOptions<TSearchAction> & EngineDefinitionControllersPropsOption<TControllersDefinitionsMap, TControllersProps, TSolutionType>>): Promise<HydratedState<SSRCommerceEngine, TControllers>>;
19
+ /**
20
+ * @deprecated Use the hydrateStaticState() method instead
21
+ */
19
22
  fromBuildResult: FromBuildResult<TControllers, HydrateStaticStateOptions<TSearchAction>, HydratedState<SSRCommerceEngine, TControllers>>;
20
23
  };
@@ -12,6 +12,9 @@ export type FetchStaticState<TEngine extends CoreEngine | CoreEngineNext, TContr
12
12
  * Useful for static generation and server-side rendering.
13
13
  */
14
14
  (...params: OptionsTuple<FetchStaticStateOptions & EngineDefinitionControllersPropsOption<TControllersProps>>): Promise<EngineStaticState<TSearchAction, TControllersStaticState>>;
15
+ /**
16
+ * @deprecated Use the fetchStaticState() method instead
17
+ */
15
18
  fromBuildResult: FromBuildResult<TEngine, TControllers, FetchStaticStateOptions, EngineStaticState<TSearchAction, TControllersStaticState>>;
16
19
  };
17
20
  export {};
@@ -20,6 +20,9 @@ export type HydrateStaticState<TEngine extends CoreEngine | CoreEngineNext, TCon
20
20
  * Useful when hydrating a server-side-rendered engine.
21
21
  */
22
22
  (...params: OptionsTuple<HydrateStaticStateOptions<TSearchAction> & EngineDefinitionControllersPropsOption<TControllersProps>>): Promise<HydratedState<TEngine, TControllers>>;
23
+ /**
24
+ * @deprecated Use the hydrateStaticState() method instead
25
+ */
23
26
  fromBuildResult: FromBuildResult<TEngine, TControllers, HydrateStaticStateOptions<TSearchAction>, HydratedState<TEngine, TControllers>>;
24
27
  };
25
28
  export {};