@coveo/quantic 3.37.1 → 3.37.2

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 (20) hide show
  1. package/force-app/main/default/staticresources/coveoheadless/case-assist/headless.js +12 -12
  2. package/force-app/main/default/staticresources/coveoheadless/definitions/api/knowledge/post-answer-evaluation.d.ts +4 -4
  3. package/force-app/main/default/staticresources/coveoheadless/definitions/api/knowledge/stream-answer-api.d.ts +2 -2
  4. package/force-app/main/default/staticresources/coveoheadless/definitions/api/search/plan/plan-request.d.ts +2 -2
  5. package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/core/generated-answer/headless-core-generated-answer.d.ts +0 -12
  6. package/force-app/main/default/staticresources/coveoheadless/definitions/features/analytics/analytics-utils.d.ts +0 -1
  7. package/force-app/main/default/staticresources/coveoheadless/definitions/features/generated-answer/generated-answer-mocks.d.ts +0 -1
  8. package/force-app/main/default/staticresources/coveoheadless/definitions/features/generated-answer/generated-answer-selectors.d.ts +26 -7
  9. package/force-app/main/default/staticresources/coveoheadless/definitions/features/insight-search/insight-search-actions-thunk-processor.d.ts +1 -1
  10. package/force-app/main/default/staticresources/coveoheadless/definitions/features/insight-search/insight-search-actions.d.ts +1 -1
  11. package/force-app/main/default/staticresources/coveoheadless/definitions/features/search/legacy/search-actions-thunk-processor.d.ts +1 -1
  12. package/force-app/main/default/staticresources/coveoheadless/definitions/features/search/search-actions-thunk-processor.d.ts +1 -1
  13. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-commerce-next.index.d.ts +1 -1
  14. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-commerce.index.d.ts +1 -1
  15. package/force-app/main/default/staticresources/coveoheadless/definitions/utils/fetch-event-source/fetch.d.ts +0 -1
  16. package/force-app/main/default/staticresources/coveoheadless/definitions/utils/fetch-event-source/parse.d.ts +0 -1
  17. package/force-app/main/default/staticresources/coveoheadless/headless.js +13 -13
  18. package/force-app/main/default/staticresources/coveoheadless/insight/headless.js +12 -12
  19. package/force-app/main/default/staticresources/coveoheadless/recommendation/headless.js +11 -11
  20. package/package.json +4 -3
@@ -7,10 +7,10 @@ export interface AnswerEvaluationPOSTParams {
7
7
  format: string;
8
8
  };
9
9
  details: {
10
- readable: Boolean | null;
11
- documented: Boolean | null;
12
- correctTopic: Boolean | null;
13
- hallucinationFree: Boolean | null;
10
+ readable: boolean | null;
11
+ documented: boolean | null;
12
+ correctTopic: boolean | null;
13
+ hallucinationFree: boolean | null;
14
14
  };
15
15
  correctAnswerUrl: string | null;
16
16
  additionalNotes: string | null;
@@ -28,8 +28,8 @@ export declare const selectAnswer: (state: StreamAnswerAPIState) => ({
28
28
  status: import("@reduxjs/toolkit/query").QueryStatus.fulfilled;
29
29
  requestId: string;
30
30
  error: undefined;
31
- originalArgs: AnswerApiQueryParams;
32
31
  endpointName: string;
32
+ originalArgs: AnswerApiQueryParams;
33
33
  startedTimeStamp: number;
34
34
  data: GeneratedAnswerStream;
35
35
  fulfilledTimeStamp: number;
@@ -58,9 +58,9 @@ export declare const selectAnswer: (state: StreamAnswerAPIState) => ({
58
58
  status: import("@reduxjs/toolkit/query").QueryStatus.rejected;
59
59
  requestId: string;
60
60
  data?: GeneratedAnswerStream | undefined;
61
+ endpointName: string;
61
62
  fulfilledTimeStamp?: number | undefined;
62
63
  originalArgs: AnswerApiQueryParams;
63
- endpointName: string;
64
64
  startedTimeStamp: number;
65
65
  error: import("@reduxjs/toolkit").SerializedError | import("@reduxjs/toolkit/query").FetchBaseQueryError;
66
66
  } & {
@@ -1,3 +1,3 @@
1
1
  import type { BaseParam, ContextParam, LocaleParam } from '../../platform-service-params.js';
2
- import type { AnalyticsParam, AuthenticationParam, PipelineParam, QueryParam, SearchHubParam, TimezoneParam } from '../search-api-params.js';
3
- export type PlanRequest = BaseParam & SearchHubParam & ContextParam & QueryParam & PipelineParam & LocaleParam & TimezoneParam & AnalyticsParam & AuthenticationParam;
2
+ import type { AnalyticsParam, AuthenticationParam, EnableQuerySyntaxParam, PipelineParam, QueryParam, SearchHubParam, TimezoneParam } from '../search-api-params.js';
3
+ export type PlanRequest = BaseParam & SearchHubParam & ContextParam & QueryParam & PipelineParam & LocaleParam & TimezoneParam & AnalyticsParam & AuthenticationParam & EnableQuerySyntaxParam;
@@ -21,24 +21,12 @@ export interface GeneratedAnswer extends Controller {
21
21
  retry(): void;
22
22
  /**
23
23
  * Indicates that the generated answer met the user expectations.
24
- * @deprecated The no-argument `like` method is deprecated and will be removed in a future major version. The method will now take a required `answerId` parameter to specify which answer is being liked, and will log the like action with the provided `answerId` for analytics.
25
24
  */
26
25
  like(): void;
27
- /**
28
- * Indicates that the generated answer met the user expectations.
29
- * @param answerId - Answer Id of the liked answer.
30
- */
31
- like(answerId: string): void;
32
26
  /**
33
27
  * Marks the generated answer as not relevant to the end user.
34
- * @deprecated The no-argument `dislike` method is deprecated and will be removed in a future major version. The method will now take a required `answerId` parameter to specify which answer is being disliked, and will log the dislike action with the provided `answerId` for analytics.
35
28
  */
36
29
  dislike(): void;
37
- /**
38
- * Marks the generated answer as not relevant to the end user.
39
- * @param answerId - Answer Id of the disliked answer.
40
- */
41
- dislike(answerId: string): void;
42
30
  /**
43
31
  * Opens the modal to provide feedback about why the generated answer was not relevant.
44
32
  */
@@ -1,4 +1,3 @@
1
- /** biome-ignore-all lint/suspicious/noConfusingVoidType: <> */
2
1
  import { RecordValue, StringValue } from '@coveo/bueno';
3
2
  import type { ItemMetaData } from '@coveo/relay-event-types';
4
3
  import { type AsyncThunk, type UnknownAction } from '@reduxjs/toolkit';
@@ -1,4 +1,3 @@
1
- /** biome-ignore-all lint/suspicious/noExplicitAny: <mock> */
2
1
  import type { StreamAnswerAPIState } from '../../api/knowledge/stream-answer-api-state.js';
3
2
  export declare const streamAnswerAPIStateMock: StreamAnswerAPIState;
4
3
  export declare const streamAnswerAPIStateMockWithATabWithAnExpression: StreamAnswerAPIState;
@@ -1,23 +1,42 @@
1
1
  import type { StreamAnswerAPIState } from '../../api/knowledge/stream-answer-api-state.js';
2
- import type { GeneratedAnswerCitation } from '../../controllers/generated-answer/headless-generated-answer.js';
3
2
  import type { SearchAppState } from '../../state/search-app-state.js';
4
- import type { GeneratedAnswerSection } from '../../state/state-sections.js';
3
+ import type { FollowUpAnswersSection, GeneratedAnswerSection } from '../../state/state-sections.js';
5
4
  export declare const generativeQuestionAnsweringIdSelector: (state: Partial<SearchAppState>) => string | undefined;
6
5
  export declare const isGeneratedAnswerFeatureEnabledWithAgentAPI: (state: Partial<SearchAppState>) => state is StreamAnswerAPIState;
7
6
  export declare const selectFieldsToIncludeInCitation: (state: Partial<GeneratedAnswerSection>) => string[] | undefined;
8
- export declare const citationSourceSelector: ((state: Partial<GeneratedAnswerSection>, citationId: string) => GeneratedAnswerCitation | undefined) & {
7
+ export declare const citationSourceSelector: ((state: Partial<GeneratedAnswerSection & FollowUpAnswersSection>, citationId: string) => import("../../index.js").GeneratedAnswerCitation | undefined) & {
9
8
  clearCache: () => void;
10
9
  resultsCount: () => number;
11
10
  resetResultsCount: () => void;
12
11
  } & {
13
- resultFunc: (resultFuncArgs_0: GeneratedAnswerCitation[] | undefined, resultFuncArgs_1: string) => GeneratedAnswerCitation | undefined;
14
- memoizedResultFunc: ((resultFuncArgs_0: GeneratedAnswerCitation[] | undefined, resultFuncArgs_1: string) => GeneratedAnswerCitation | undefined) & {
12
+ resultFunc: (resultFuncArgs_0: import("../../index.js").GeneratedAnswerCitation[] | undefined, resultFuncArgs_1: import("../../index.js").GeneratedAnswerCitation[] | undefined, resultFuncArgs_2: string) => import("../../index.js").GeneratedAnswerCitation | undefined;
13
+ memoizedResultFunc: ((resultFuncArgs_0: import("../../index.js").GeneratedAnswerCitation[] | undefined, resultFuncArgs_1: import("../../index.js").GeneratedAnswerCitation[] | undefined, resultFuncArgs_2: string) => import("../../index.js").GeneratedAnswerCitation | undefined) & {
15
14
  clearCache: () => void;
16
15
  resultsCount: () => number;
17
16
  resetResultsCount: () => void;
18
17
  };
19
- lastResult: () => GeneratedAnswerCitation | undefined;
20
- dependencies: [(state: Partial<GeneratedAnswerSection>) => GeneratedAnswerCitation[] | undefined, (_state: Partial<GeneratedAnswerSection>, citationId: string) => string];
18
+ lastResult: () => import("../../index.js").GeneratedAnswerCitation | undefined;
19
+ dependencies: [(state: Partial<GeneratedAnswerSection & FollowUpAnswersSection>) => import("../../index.js").GeneratedAnswerCitation[] | undefined, ((state: Partial<GeneratedAnswerSection & FollowUpAnswersSection>) => import("../../index.js").GeneratedAnswerCitation[] | undefined) & {
20
+ clearCache: () => void;
21
+ resultsCount: () => number;
22
+ resetResultsCount: () => void;
23
+ } & {
24
+ resultFunc: (resultFuncArgs_0: import("../follow-up-answers/follow-up-answers-state.js").FollowUpAnswer[] | undefined) => import("../../index.js").GeneratedAnswerCitation[] | undefined;
25
+ memoizedResultFunc: ((resultFuncArgs_0: import("../follow-up-answers/follow-up-answers-state.js").FollowUpAnswer[] | undefined) => import("../../index.js").GeneratedAnswerCitation[] | undefined) & {
26
+ clearCache: () => void;
27
+ resultsCount: () => number;
28
+ resetResultsCount: () => void;
29
+ };
30
+ lastResult: () => import("../../index.js").GeneratedAnswerCitation[] | undefined;
31
+ dependencies: [(state: Partial<GeneratedAnswerSection & FollowUpAnswersSection>) => import("../follow-up-answers/follow-up-answers-state.js").FollowUpAnswer[] | undefined];
32
+ recomputations: () => number;
33
+ resetRecomputations: () => void;
34
+ dependencyRecomputations: () => number;
35
+ resetDependencyRecomputations: () => void;
36
+ } & {
37
+ argsMemoize: typeof import("reselect").weakMapMemoize;
38
+ memoize: typeof import("reselect").weakMapMemoize;
39
+ }, (_state: Partial<GeneratedAnswerSection & FollowUpAnswersSection>, citationId: string) => string];
21
40
  recomputations: () => number;
22
41
  resetRecomputations: () => void;
23
42
  dependencyRecomputations: () => number;
@@ -25,7 +25,7 @@ export declare class AsyncInsightSearchThunkProcessor<RejectionType> {
25
25
  private onUpdateQueryForCorrection;
26
26
  constructor(config: AsyncThunkConfig, onUpdateQueryForCorrection?: QueryCorrectionCallback);
27
27
  fetchFromAPI({ request, mappings }: MappedSearchRequest<InsightQueryRequest>, options?: SearchOptions): Promise<{
28
- response: SuccessResponse | ErrorResponse;
28
+ response: ErrorResponse | SuccessResponse;
29
29
  duration: number;
30
30
  queryExecuted: string;
31
31
  requestExecuted: InsightQueryRequest;
@@ -8,7 +8,7 @@ import type { ExecuteSearchThunkReturn, SearchAction } from '../search/search-ac
8
8
  import { type MappedSearchRequest } from '../search/search-mappings.js';
9
9
  export type StateNeededByExecuteSearch = ConfigurationSection & InsightConfigurationSection & Partial<InsightCaseContextSection & SearchSection & QuerySection & FacetSection & NumericFacetSection & DateFacetSection & CategoryFacetSection & PaginationSection & TabSection & FieldsSection & DidYouMeanSection & SortSection & FoldingSection & ContextSection>;
10
10
  export declare const fetchFromAPI: (client: InsightAPIClient, state: StateNeededByExecuteSearch, { request, mappings }: MappedSearchRequest<InsightQueryRequest>, options?: SearchOptions) => Promise<{
11
- response: import("../search/search-mappings.js").SuccessResponse | import("../search/search-mappings.js").ErrorResponse;
11
+ response: import("../search/search-mappings.js").ErrorResponse | import("../search/search-mappings.js").SuccessResponse;
12
12
  duration: number;
13
13
  queryExecuted: string;
14
14
  requestExecuted: InsightQueryRequest;
@@ -36,7 +36,7 @@ export declare class AsyncSearchThunkProcessor<RejectionType> {
36
36
  private onUpdateQueryForCorrection;
37
37
  constructor(config: AsyncThunkConfig, onUpdateQueryForCorrection?: QueryCorrectionCallback);
38
38
  fetchFromAPI({ mappings, request }: MappedSearchRequest, options: FetchFromAPIOptions): Promise<{
39
- response: SuccessResponse | ErrorResponse;
39
+ response: ErrorResponse | SuccessResponse;
40
40
  duration: number;
41
41
  queryExecuted: string;
42
42
  requestExecuted: SearchRequest;
@@ -38,7 +38,7 @@ export declare class AsyncSearchThunkProcessor<RejectionType> {
38
38
  private onUpdateQueryForCorrection;
39
39
  constructor(config: AsyncThunkConfig, onUpdateQueryForCorrection?: QueryCorrectionCallback);
40
40
  fetchFromAPI({ mappings, request }: MappedSearchRequest, options: FetchFromAPIOptions): Promise<{
41
- response: SuccessResponse | ErrorResponse;
41
+ response: ErrorResponse | SuccessResponse;
42
42
  duration: number;
43
43
  queryExecuted: string;
44
44
  requestExecuted: SearchRequest;
@@ -158,7 +158,7 @@ export * from './features/commerce/triggers/triggers-actions-loader.js';
158
158
  export { buildResultTemplatesManager } from './features/result-templates/result-templates-manager.js';
159
159
  export { getCommerceApiBaseUrl } from './api/commerce/commerce-api-client.js';
160
160
  export type { BaseProduct, ChildProduct, Product, } from './api/commerce/common/product.js';
161
- export type { Result, SpotlightContent, } from './api/commerce/common/result.js';
161
+ export type { Result, SpotlightContent } from './api/commerce/common/result.js';
162
162
  export { ResultType } from './api/commerce/common/result.js';
163
163
  export { getAnalyticsNextApiBaseUrl, getOrganizationEndpoint, } from './api/platform-client.js';
164
164
  export type { RelativeDate, RelativeDatePeriod, RelativeDateUnit, } from './api/search/date/relative-date.js';
@@ -154,7 +154,7 @@ export * from './features/commerce/triggers/triggers-actions-loader.js';
154
154
  export { buildResultTemplatesManager } from './features/result-templates/result-templates-manager.js';
155
155
  export { getCommerceApiBaseUrl } from './api/commerce/commerce-api-client.js';
156
156
  export type { BaseProduct, ChildProduct, Product, } from './api/commerce/common/product.js';
157
- export type { Result, SpotlightContent, } from './api/commerce/common/result.js';
157
+ export type { Result, SpotlightContent } from './api/commerce/common/result.js';
158
158
  export { ResultType } from './api/commerce/common/result.js';
159
159
  export { getAnalyticsNextApiBaseUrl, getOrganizationEndpoint, } from './api/platform-client.js';
160
160
  export type { RelativeDate, RelativeDatePeriod, RelativeDateUnit, } from './api/search/date/relative-date.js';
@@ -1,4 +1,3 @@
1
- /** biome-ignore-all lint/suspicious/noConfusingVoidType: <> */
2
1
  import { type EventSourceMessage } from './parse.js';
3
2
  interface FetchEventSourceInit extends RequestInit {
4
3
  /**
@@ -2,7 +2,6 @@
2
2
  * Represents a message sent in an event stream
3
3
  * https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format
4
4
  */
5
- /** biome-ignore-all lint/suspicious/noAssignInExpressions: <> */
6
5
  export interface EventSourceMessage {
7
6
  /** The event ID to set the EventSource object's last event ID value. */
8
7
  id: string;