@coveo/quantic 3.30.0 → 3.30.1-pre.cc2819b982
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/force-app/main/default/staticresources/coveoheadless/case-assist/headless.js +10 -8
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/api-client-utils.d.ts +1 -1
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/commerce/common/request.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/commerce/recommendations/recommendations-request.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/commerce/search/query-suggest/query-suggest-request.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/knowledge/stream-answer-actions.d.ts +15 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/knowledge/stream-answer-api.d.ts +9 -97
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/service/case-assist/get-case-classifications/get-case-classifications-request.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/service/case-assist/get-document-suggestions/get-document-suggestions-request.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/service/insight/get-interface/get-interface-config-request.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/service/insight/query/query-request.d.ts +4 -4
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/service/insight/user-actions/user-actions-request.d.ts +2 -2
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/knowledge/generated-answer/headless-answerapi-generated-answer-mocks.d.ts +2003 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/controllers/knowledge/generated-answer/utils/testingUtils.d.ts +8 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/generated-answer/answer-api-selectors.d.ts +72 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/generated-answer/generated-answer-actions-loader.d.ts +0 -9
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/generated-answer/generated-answer-actions.d.ts +2 -25
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/generated-answer/generated-answer-request.d.ts +2005 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/generated-answer/generated-answer-state.d.ts +5 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/search/search-request.d.ts +2 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/insight.index.d.ts +0 -1
- package/force-app/main/default/staticresources/coveoheadless/headless.js +12 -10
- package/force-app/main/default/staticresources/coveoheadless/insight/headless.js +11 -9
- package/force-app/main/default/staticresources/coveoheadless/recommendation/headless.js +9 -7
- package/package.json +2 -2
- package/docs/out/quantic-docs.json +0 -6440
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/knowledge/tests/stream-answer-api-state-mock.d.ts +0 -1051
package/force-app/main/default/staticresources/coveoheadless/definitions/api/api-client-utils.d.ts
CHANGED
|
@@ -3,5 +3,5 @@ import type { BaseParam } from './platform-service-params.js';
|
|
|
3
3
|
import type { AllSearchAPIResponse } from './search/search-api-client.js';
|
|
4
4
|
import type { SearchAPIErrorWithStatusCode } from './search/search-api-error-response.js';
|
|
5
5
|
import type { AuthenticationParam } from './search/search-api-params.js';
|
|
6
|
-
export declare function pickNonBaseParams<Params extends BaseParam & AuthenticationParam>(req: Params): Omit<Params, "
|
|
6
|
+
export declare function pickNonBaseParams<Params extends BaseParam & AuthenticationParam>(req: Params): Omit<Params, "url" | "accessToken" | "organizationId" | "authentication">;
|
|
7
7
|
export declare const unwrapError: (payload: PlatformResponse<AllSearchAPIResponse>) => SearchAPIErrorWithStatusCode;
|
|
@@ -28,10 +28,10 @@ export declare const getRequestOptions: (req: FilterableCommerceAPIRequest, path
|
|
|
28
28
|
facets: import("../../../features/commerce/facets/facet-set/interfaces/request.js").AnyFacetRequest[] | undefined;
|
|
29
29
|
sort: import("./sort.js").SortOption | undefined;
|
|
30
30
|
};
|
|
31
|
-
accessToken: string;
|
|
32
31
|
url: string;
|
|
33
|
-
method: import("../../platform-client.js").HttpMethods;
|
|
34
32
|
origin: import("../../preprocess-request.js").PlatformClientOrigin;
|
|
33
|
+
accessToken: string;
|
|
34
|
+
method: import("../../platform-client.js").HttpMethods;
|
|
35
35
|
contentType: import("../../platform-client.js").HTTPContentType;
|
|
36
36
|
requestMetadata?: import("../../preprocess-request.js").RequestMetadata | undefined;
|
|
37
37
|
};
|
|
@@ -24,10 +24,10 @@ export declare const buildRecommendationsRequest: (req: CommerceRecommendationsR
|
|
|
24
24
|
page: number | undefined;
|
|
25
25
|
perPage: number | undefined;
|
|
26
26
|
};
|
|
27
|
-
accessToken: string;
|
|
28
27
|
url: string;
|
|
29
|
-
method: import("../../platform-client.js").HttpMethods;
|
|
30
28
|
origin: import("../../preprocess-request.js").PlatformClientOrigin;
|
|
29
|
+
accessToken: string;
|
|
30
|
+
method: import("../../platform-client.js").HttpMethods;
|
|
31
31
|
contentType: import("../../platform-client.js").HTTPContentType;
|
|
32
32
|
requestMetadata?: import("../../preprocess-request.js").RequestMetadata | undefined;
|
|
33
33
|
};
|
|
@@ -21,10 +21,10 @@ export declare const getQuerySuggestRequestOptions: (req: QuerySuggestRequest) =
|
|
|
21
21
|
country: string;
|
|
22
22
|
currency: string;
|
|
23
23
|
};
|
|
24
|
-
accessToken: string;
|
|
25
24
|
url: string;
|
|
26
|
-
method: import("../../../platform-client.js").HttpMethods;
|
|
27
25
|
origin: import("../../../preprocess-request.js").PlatformClientOrigin;
|
|
26
|
+
accessToken: string;
|
|
27
|
+
method: import("../../../platform-client.js").HttpMethods;
|
|
28
28
|
contentType: import("../../../platform-client.js").HTTPContentType;
|
|
29
29
|
requestMetadata?: import("../../../preprocess-request.js").RequestMetadata | undefined;
|
|
30
30
|
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { NavigatorContext } from '../../app/navigator-context-provider.js';
|
|
2
|
+
import type { StreamAnswerAPIState } from './stream-answer-api-state.js';
|
|
3
|
+
export declare const triggerSearchRequest: import("@reduxjs/toolkit").AsyncThunk<void, {
|
|
4
|
+
state: StreamAnswerAPIState;
|
|
5
|
+
navigatorContext: NavigatorContext;
|
|
6
|
+
}, {
|
|
7
|
+
state?: unknown;
|
|
8
|
+
dispatch?: import("redux-thunk").ThunkDispatch<unknown, unknown, import("redux").UnknownAction>;
|
|
9
|
+
extra?: unknown;
|
|
10
|
+
rejectValue?: unknown;
|
|
11
|
+
serializedErrorType?: unknown;
|
|
12
|
+
pendingMeta?: unknown;
|
|
13
|
+
fulfilledMeta?: unknown;
|
|
14
|
+
rejectedMeta?: unknown;
|
|
15
|
+
}>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { type NavigatorContext } from '../../app/navigator-context-provider.js';
|
|
1
|
+
import type { ThunkDispatch, UnknownAction } from '@reduxjs/toolkit';
|
|
3
2
|
import type { EventSourceMessage } from '../../utils/fetch-event-source/parse.js';
|
|
4
3
|
import type { SearchRequest } from '../search/search/search-request.js';
|
|
5
4
|
import type { GeneratedAnswerStream } from './generated-answer-stream.js';
|
|
@@ -8,97 +7,10 @@ export declare const updateCacheWithEvent: (event: EventSourceMessage, draft: Ge
|
|
|
8
7
|
export declare const answerApi: import("@reduxjs/toolkit/query").Api<import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {} & import("@reduxjs/toolkit/query").RetryOptions, {}>, {
|
|
9
8
|
getAnswer: import("@reduxjs/toolkit/query").QueryDefinition<Partial<SearchRequest>, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {} & import("@reduxjs/toolkit/query").RetryOptions, {}>, never, GeneratedAnswerStream, "answer">;
|
|
10
9
|
}, "answer", never, typeof import("@reduxjs/toolkit/query").coreModuleName>;
|
|
11
|
-
export declare const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
analyticsMode: any;
|
|
16
|
-
actionCause: any;
|
|
17
|
-
}) & {
|
|
18
|
-
clearCache: () => void;
|
|
19
|
-
resultsCount: () => number;
|
|
20
|
-
resetResultsCount: () => void;
|
|
21
|
-
} & {
|
|
22
|
-
resultFunc: (...resultFuncArgs: readonly any[]) => {
|
|
23
|
-
q: any;
|
|
24
|
-
requestId: any;
|
|
25
|
-
cannotAnswer: any;
|
|
26
|
-
analyticsMode: any;
|
|
27
|
-
actionCause: any;
|
|
28
|
-
};
|
|
29
|
-
memoizedResultFunc: ((...resultFuncArgs: readonly any[]) => {
|
|
30
|
-
q: any;
|
|
31
|
-
requestId: any;
|
|
32
|
-
cannotAnswer: any;
|
|
33
|
-
analyticsMode: any;
|
|
34
|
-
actionCause: any;
|
|
35
|
-
}) & {
|
|
36
|
-
clearCache: () => void;
|
|
37
|
-
resultsCount: () => number;
|
|
38
|
-
resetResultsCount: () => void;
|
|
39
|
-
};
|
|
40
|
-
lastResult: () => {
|
|
41
|
-
q: any;
|
|
42
|
-
requestId: any;
|
|
43
|
-
cannotAnswer: any;
|
|
44
|
-
analyticsMode: any;
|
|
45
|
-
actionCause: any;
|
|
46
|
-
};
|
|
47
|
-
dependencies: import("reselect").SelectorArray<any>;
|
|
48
|
-
recomputations: () => number;
|
|
49
|
-
resetRecomputations: () => void;
|
|
50
|
-
dependencyRecomputations: () => number;
|
|
51
|
-
resetDependencyRecomputations: () => void;
|
|
52
|
-
} & {
|
|
53
|
-
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
54
|
-
memoize: typeof import("reselect").weakMapMemoize;
|
|
55
|
-
};
|
|
56
|
-
export declare const constructAnswerQueryParams: (state: StreamAnswerAPIState, usage: "fetch" | "select", navigatorContext: NavigatorContext) => {
|
|
57
|
-
analytics?: {
|
|
58
|
-
actionCause?: string;
|
|
59
|
-
customData?: object;
|
|
60
|
-
clientId: string;
|
|
61
|
-
deviceId?: string;
|
|
62
|
-
pageId?: string;
|
|
63
|
-
clientTimestamp: string;
|
|
64
|
-
documentReferrer: string | null;
|
|
65
|
-
originContext: string;
|
|
66
|
-
userDisplayName?: string;
|
|
67
|
-
documentLocation?: string | null;
|
|
68
|
-
trackingId?: string;
|
|
69
|
-
capture?: boolean;
|
|
70
|
-
source?: string[];
|
|
71
|
-
};
|
|
72
|
-
tab: string;
|
|
73
|
-
numberOfResults?: number | undefined;
|
|
74
|
-
firstResult?: number | undefined;
|
|
75
|
-
queryCorrection?: {
|
|
76
|
-
enabled: boolean;
|
|
77
|
-
options: {
|
|
78
|
-
automaticallyCorrect: "whenNoResults" | "never";
|
|
79
|
-
};
|
|
80
|
-
} | undefined;
|
|
81
|
-
enableDidYouMean?: boolean | undefined;
|
|
82
|
-
fieldsToInclude?: string[] | undefined;
|
|
83
|
-
facets?: (import("../../features/facets/facet-set/interfaces/request.js").FacetRequest | import("../../features/facets/category-facet-set/interfaces/request.js").CategoryFacetRequest | import("../../features/facets/range-facets/date-facet-set/interfaces/request.js").DateFacetRequest | import("../../features/facets/range-facets/numeric-facet-set/interfaces/request.js").NumericFacetRequest)[] | undefined;
|
|
84
|
-
pipeline?: string | undefined;
|
|
85
|
-
searchHub?: string | undefined;
|
|
86
|
-
pipelineRuleParameters: {
|
|
87
|
-
mlGenerativeQuestionAnswering: {
|
|
88
|
-
responseFormat: import("../../index.js").GeneratedResponseFormat;
|
|
89
|
-
citationsFieldToInclude: string[];
|
|
90
|
-
};
|
|
91
|
-
};
|
|
92
|
-
context?: import("../../ssr.index.js").ContextPayload | undefined;
|
|
93
|
-
enableQuerySyntax?: boolean | undefined;
|
|
94
|
-
lq?: string | undefined;
|
|
95
|
-
dq?: string | undefined;
|
|
96
|
-
cq?: string | undefined;
|
|
97
|
-
aq?: string | undefined;
|
|
98
|
-
q: string | undefined;
|
|
99
|
-
};
|
|
100
|
-
export declare const fetchAnswer: (state: StreamAnswerAPIState, navigatorContext: NavigatorContext) => import("redux-thunk").ThunkAction<import("@reduxjs/toolkit/query").QueryActionCreatorResult<import("@reduxjs/toolkit/query").QueryDefinition<Partial<SearchRequest>, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {} & import("@reduxjs/toolkit/query").RetryOptions, {}>, never, GeneratedAnswerStream, "answer">>, any, any, UnknownAction>;
|
|
101
|
-
export declare const selectAnswer: (state: StreamAnswerAPIState, navigatorContext?: NavigatorContext) => ({
|
|
10
|
+
export declare const fetchAnswer: (fetchAnswerParams: Partial<SearchRequest>) => import("redux-thunk").ThunkAction<import("@reduxjs/toolkit/query").QueryActionCreatorResult<import("@reduxjs/toolkit/query").QueryDefinition<Partial<SearchRequest>, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {} & import("@reduxjs/toolkit/query").RetryOptions, {}>, never, GeneratedAnswerStream, "answer">>, any, any, UnknownAction>;
|
|
11
|
+
export declare const selectAnswer: (params: Partial<SearchRequest>) => (state: import("@reduxjs/toolkit/query").RootState<{
|
|
12
|
+
getAnswer: import("@reduxjs/toolkit/query").QueryDefinition<Partial<SearchRequest>, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {} & import("@reduxjs/toolkit/query").RetryOptions, {}>, never, GeneratedAnswerStream, "answer">;
|
|
13
|
+
}, never, "answer">) => ({
|
|
102
14
|
status: import("@reduxjs/toolkit/query").QueryStatus.uninitialized;
|
|
103
15
|
originalArgs?: undefined | undefined;
|
|
104
16
|
data?: undefined | undefined;
|
|
@@ -116,9 +28,9 @@ export declare const selectAnswer: (state: StreamAnswerAPIState, navigatorContex
|
|
|
116
28
|
}) | ({
|
|
117
29
|
status: import("@reduxjs/toolkit/query").QueryStatus.fulfilled;
|
|
118
30
|
error: undefined;
|
|
119
|
-
endpointName: string;
|
|
120
|
-
originalArgs: Partial<SearchRequest>;
|
|
121
31
|
requestId: string;
|
|
32
|
+
originalArgs: Partial<SearchRequest>;
|
|
33
|
+
endpointName: string;
|
|
122
34
|
startedTimeStamp: number;
|
|
123
35
|
data: GeneratedAnswerStream;
|
|
124
36
|
fulfilledTimeStamp: number;
|
|
@@ -145,11 +57,11 @@ export declare const selectAnswer: (state: StreamAnswerAPIState, navigatorContex
|
|
|
145
57
|
isError: false;
|
|
146
58
|
}) | ({
|
|
147
59
|
status: import("@reduxjs/toolkit/query").QueryStatus.rejected;
|
|
60
|
+
requestId: string;
|
|
148
61
|
data?: GeneratedAnswerStream | undefined;
|
|
149
|
-
endpointName: string;
|
|
150
62
|
fulfilledTimeStamp?: number | undefined;
|
|
151
63
|
originalArgs: Partial<SearchRequest>;
|
|
152
|
-
|
|
64
|
+
endpointName: string;
|
|
153
65
|
startedTimeStamp: number;
|
|
154
66
|
error: import("@reduxjs/toolkit").SerializedError | import("@reduxjs/toolkit/query").FetchBaseQueryError;
|
|
155
67
|
} & {
|
|
@@ -11,9 +11,9 @@ export declare const buildGetCaseClassificationsRequest: (req: GetCaseClassifica
|
|
|
11
11
|
};
|
|
12
12
|
};
|
|
13
13
|
};
|
|
14
|
-
accessToken: string;
|
|
15
14
|
url: string;
|
|
16
|
-
method: import("../../../platform-client.js").HttpMethods;
|
|
17
15
|
origin: import("../../../preprocess-request.js").PlatformClientOrigin;
|
|
16
|
+
accessToken: string;
|
|
17
|
+
method: import("../../../platform-client.js").HttpMethods;
|
|
18
18
|
contentType: import("../../../platform-client.js").HTTPContentType;
|
|
19
19
|
};
|
|
@@ -28,9 +28,9 @@ export declare const buildGetDocumentSuggestionsRequest: (req: GetDocumentSugges
|
|
|
28
28
|
source?: string[];
|
|
29
29
|
} | undefined;
|
|
30
30
|
};
|
|
31
|
-
accessToken: string;
|
|
32
31
|
url: string;
|
|
33
|
-
method: import("../../../platform-client.js").HttpMethods;
|
|
34
32
|
origin: import("../../../preprocess-request.js").PlatformClientOrigin;
|
|
33
|
+
accessToken: string;
|
|
34
|
+
method: import("../../../platform-client.js").HttpMethods;
|
|
35
35
|
contentType: import("../../../platform-client.js").HTTPContentType;
|
|
36
36
|
};
|
|
@@ -3,9 +3,9 @@ import { type InsightIdParam } from '../insight-params.js';
|
|
|
3
3
|
export type GetInsightInterfaceConfigRequest = BaseParam & InsightIdParam;
|
|
4
4
|
export declare const buildGetInsightInterfaceConfigRequest: (req: GetInsightInterfaceConfigRequest) => {
|
|
5
5
|
requestParams: {};
|
|
6
|
-
accessToken: string;
|
|
7
6
|
url: string;
|
|
8
|
-
method: import("../../../platform-client.js").HttpMethods;
|
|
9
7
|
origin: import("../../../preprocess-request.js").PlatformClientOrigin;
|
|
8
|
+
accessToken: string;
|
|
9
|
+
method: import("../../../platform-client.js").HttpMethods;
|
|
10
10
|
contentType: import("../../../platform-client.js").HTTPContentType;
|
|
11
11
|
};
|
|
@@ -8,18 +8,18 @@ interface CaseContextParam {
|
|
|
8
8
|
}
|
|
9
9
|
export declare const buildInsightQueryRequest: (req: InsightQueryRequest) => {
|
|
10
10
|
requestParams: {};
|
|
11
|
-
accessToken: string;
|
|
12
11
|
url: string;
|
|
13
|
-
method: import("../../../platform-client.js").HttpMethods;
|
|
14
12
|
origin: import("../../../preprocess-request.js").PlatformClientOrigin;
|
|
13
|
+
accessToken: string;
|
|
14
|
+
method: import("../../../platform-client.js").HttpMethods;
|
|
15
15
|
contentType: import("../../../platform-client.js").HTTPContentType;
|
|
16
16
|
};
|
|
17
17
|
export declare const buildInsightQuerySuggestRequest: (req: InsightQuerySuggestRequest) => {
|
|
18
18
|
requestParams: {};
|
|
19
|
-
accessToken: string;
|
|
20
19
|
url: string;
|
|
21
|
-
method: import("../../../platform-client.js").HttpMethods;
|
|
22
20
|
origin: import("../../../preprocess-request.js").PlatformClientOrigin;
|
|
21
|
+
accessToken: string;
|
|
22
|
+
method: import("../../../platform-client.js").HttpMethods;
|
|
23
23
|
contentType: import("../../../platform-client.js").HTTPContentType;
|
|
24
24
|
};
|
|
25
25
|
export {};
|
|
@@ -10,10 +10,10 @@ export declare const buildInsightUserActionsRequest: (req: InsightUserActionsReq
|
|
|
10
10
|
requestParams: {
|
|
11
11
|
objectId: string;
|
|
12
12
|
};
|
|
13
|
-
accessToken: string;
|
|
14
13
|
url: string;
|
|
15
|
-
method: import("../../../platform-client.js").HttpMethods;
|
|
16
14
|
origin: import("../../../preprocess-request.js").PlatformClientOrigin;
|
|
15
|
+
accessToken: string;
|
|
16
|
+
method: import("../../../platform-client.js").HttpMethods;
|
|
17
17
|
contentType: import("../../../platform-client.js").HTTPContentType;
|
|
18
18
|
};
|
|
19
19
|
export {};
|