@coveo/quantic 3.20.1 → 3.20.2-pre.6a91e0c32b
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/knowledge/stream-answer-api.d.ts +7 -3
- package/force-app/main/default/staticresources/coveoheadless/definitions/api/knowledge/tests/stream-answer-api-state-mock.d.ts +226 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/advanced-search-queries/advanced-search-query-selectors.d.ts +46 -0
- package/force-app/main/default/staticresources/coveoheadless/definitions/features/tab-set/tab-set-selectors.d.ts +21 -0
- 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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ThunkDispatch, UnknownAction } from '@reduxjs/toolkit';
|
|
2
2
|
import { GeneratedContentFormat } from '../../features/generated-answer/generated-response-format.js';
|
|
3
3
|
import { SearchAppState } from '../../state/search-app-state.js';
|
|
4
|
-
import { ConfigurationSection, GeneratedAnswerSection, InsightConfigurationSection } from '../../state/state-sections.js';
|
|
4
|
+
import { ConfigurationSection, GeneratedAnswerSection, InsightConfigurationSection, TabSection } from '../../state/state-sections.js';
|
|
5
5
|
import { EventSourceMessage } from '../../utils/fetch-event-source/parse.js';
|
|
6
6
|
import { GeneratedAnswerCitation } from '../generated-answer/generated-answer-event-payload.js';
|
|
7
7
|
import { SearchRequest } from '../search/search/search-request.js';
|
|
@@ -9,7 +9,7 @@ export type StateNeededByAnswerAPI = {
|
|
|
9
9
|
searchHub: string;
|
|
10
10
|
pipeline: string;
|
|
11
11
|
answer: ReturnType<typeof answerApi.reducer>;
|
|
12
|
-
} & ConfigurationSection & Partial<SearchAppState> & Partial<InsightConfigurationSection> & GeneratedAnswerSection
|
|
12
|
+
} & ConfigurationSection & Partial<SearchAppState> & Partial<InsightConfigurationSection> & GeneratedAnswerSection & Partial<TabSection>;
|
|
13
13
|
export interface GeneratedAnswerStream {
|
|
14
14
|
answerId?: string;
|
|
15
15
|
contentFormat?: GeneratedContentFormat;
|
|
@@ -75,13 +75,17 @@ export declare const constructAnswerQueryParams: (state: StateNeededByAnswerAPI,
|
|
|
75
75
|
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;
|
|
76
76
|
pipeline?: string | undefined;
|
|
77
77
|
searchHub?: string | undefined;
|
|
78
|
-
q: string | undefined;
|
|
79
78
|
pipelineRuleParameters: {
|
|
80
79
|
mlGenerativeQuestionAnswering: {
|
|
81
80
|
responseFormat: import("../../features/generated-answer/generated-response-format.js").GeneratedResponseFormat;
|
|
82
81
|
citationsFieldToInclude: string[];
|
|
83
82
|
};
|
|
84
83
|
};
|
|
84
|
+
lq?: string | undefined;
|
|
85
|
+
dq?: string | undefined;
|
|
86
|
+
cq?: string | undefined;
|
|
87
|
+
aq?: string | undefined;
|
|
88
|
+
q: string | undefined;
|
|
85
89
|
};
|
|
86
90
|
export declare const fetchAnswer: (state: StateNeededByAnswerAPI) => 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>;
|
|
87
91
|
export declare const selectAnswer: (state: StateNeededByAnswerAPI) => ({
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import { StateNeededByAnswerAPI } from '../stream-answer-api.js';
|
|
2
2
|
export declare const streamAnswerAPIStateMock: StateNeededByAnswerAPI;
|
|
3
|
+
export declare const streamAnswerAPIStateMockWithATabWithAnExpression: StateNeededByAnswerAPI;
|
|
4
|
+
export declare const streamAnswerAPIStateMockWithoutAnyTab: StateNeededByAnswerAPI;
|
|
3
5
|
export declare const expectedStreamAnswerAPIParam: {
|
|
4
6
|
q: string;
|
|
7
|
+
aq: string;
|
|
8
|
+
cq: string;
|
|
9
|
+
dq: string;
|
|
10
|
+
lq: string;
|
|
5
11
|
pipelineRuleParameters: {
|
|
6
12
|
mlGenerativeQuestionAnswering: {
|
|
7
13
|
responseFormat: {
|
|
@@ -106,3 +112,223 @@ export declare const expectedStreamAnswerAPIParam: {
|
|
|
106
112
|
firstResult: number;
|
|
107
113
|
tab: string;
|
|
108
114
|
};
|
|
115
|
+
export declare const expectedStreamAnswerAPIParamWithATabWithAnExpression: {
|
|
116
|
+
cq: string;
|
|
117
|
+
tab: string;
|
|
118
|
+
q: string;
|
|
119
|
+
aq: string;
|
|
120
|
+
dq: string;
|
|
121
|
+
lq: string;
|
|
122
|
+
pipelineRuleParameters: {
|
|
123
|
+
mlGenerativeQuestionAnswering: {
|
|
124
|
+
responseFormat: {
|
|
125
|
+
contentFormat: string[];
|
|
126
|
+
};
|
|
127
|
+
citationsFieldToInclude: never[];
|
|
128
|
+
};
|
|
129
|
+
};
|
|
130
|
+
searchHub: string;
|
|
131
|
+
facets: ({
|
|
132
|
+
filterFacetCount: boolean;
|
|
133
|
+
injectionDepth: number;
|
|
134
|
+
numberOfValues: number;
|
|
135
|
+
sortCriteria: string;
|
|
136
|
+
resultsMustMatch: string;
|
|
137
|
+
type: string;
|
|
138
|
+
currentValues: never[];
|
|
139
|
+
freezeCurrentValues: boolean;
|
|
140
|
+
isFieldExpanded: boolean;
|
|
141
|
+
preventAutoSelect: boolean;
|
|
142
|
+
facetId: string;
|
|
143
|
+
field: string;
|
|
144
|
+
rangeAlgorithm?: undefined;
|
|
145
|
+
generateAutomaticRanges?: undefined;
|
|
146
|
+
delimitingCharacter?: undefined;
|
|
147
|
+
basePath?: undefined;
|
|
148
|
+
filterByBasePath?: undefined;
|
|
149
|
+
} | {
|
|
150
|
+
filterFacetCount: boolean;
|
|
151
|
+
injectionDepth: number;
|
|
152
|
+
numberOfValues: number;
|
|
153
|
+
sortCriteria: string;
|
|
154
|
+
rangeAlgorithm: string;
|
|
155
|
+
resultsMustMatch: string;
|
|
156
|
+
currentValues: {
|
|
157
|
+
start: string;
|
|
158
|
+
end: string;
|
|
159
|
+
endInclusive: boolean;
|
|
160
|
+
state: string;
|
|
161
|
+
}[];
|
|
162
|
+
preventAutoSelect: boolean;
|
|
163
|
+
type: string;
|
|
164
|
+
facetId: string;
|
|
165
|
+
field: string;
|
|
166
|
+
generateAutomaticRanges: boolean;
|
|
167
|
+
freezeCurrentValues?: undefined;
|
|
168
|
+
isFieldExpanded?: undefined;
|
|
169
|
+
delimitingCharacter?: undefined;
|
|
170
|
+
basePath?: undefined;
|
|
171
|
+
filterByBasePath?: undefined;
|
|
172
|
+
} | {
|
|
173
|
+
delimitingCharacter: string;
|
|
174
|
+
filterFacetCount: boolean;
|
|
175
|
+
injectionDepth: number;
|
|
176
|
+
numberOfValues: number;
|
|
177
|
+
sortCriteria: string;
|
|
178
|
+
basePath: never[];
|
|
179
|
+
filterByBasePath: boolean;
|
|
180
|
+
resultsMustMatch: string;
|
|
181
|
+
currentValues: never[];
|
|
182
|
+
preventAutoSelect: boolean;
|
|
183
|
+
type: string;
|
|
184
|
+
facetId: string;
|
|
185
|
+
field: string;
|
|
186
|
+
freezeCurrentValues?: undefined;
|
|
187
|
+
isFieldExpanded?: undefined;
|
|
188
|
+
rangeAlgorithm?: undefined;
|
|
189
|
+
generateAutomaticRanges?: undefined;
|
|
190
|
+
} | {
|
|
191
|
+
filterFacetCount: boolean;
|
|
192
|
+
injectionDepth: number;
|
|
193
|
+
numberOfValues: number;
|
|
194
|
+
sortCriteria: string;
|
|
195
|
+
rangeAlgorithm: string;
|
|
196
|
+
resultsMustMatch: string;
|
|
197
|
+
currentValues: {
|
|
198
|
+
endInclusive: boolean;
|
|
199
|
+
state: string;
|
|
200
|
+
start: number;
|
|
201
|
+
end: number;
|
|
202
|
+
}[];
|
|
203
|
+
preventAutoSelect: boolean;
|
|
204
|
+
type: string;
|
|
205
|
+
facetId: string;
|
|
206
|
+
field: string;
|
|
207
|
+
generateAutomaticRanges: boolean;
|
|
208
|
+
freezeCurrentValues?: undefined;
|
|
209
|
+
isFieldExpanded?: undefined;
|
|
210
|
+
delimitingCharacter?: undefined;
|
|
211
|
+
basePath?: undefined;
|
|
212
|
+
filterByBasePath?: undefined;
|
|
213
|
+
})[];
|
|
214
|
+
fieldsToInclude: string[];
|
|
215
|
+
queryCorrection: {
|
|
216
|
+
enabled: boolean;
|
|
217
|
+
options: {
|
|
218
|
+
automaticallyCorrect: string;
|
|
219
|
+
};
|
|
220
|
+
};
|
|
221
|
+
enableDidYouMean: boolean;
|
|
222
|
+
numberOfResults: number;
|
|
223
|
+
firstResult: number;
|
|
224
|
+
};
|
|
225
|
+
export declare const expectedStreamAnswerAPIParamWithoutAnyTab: {
|
|
226
|
+
tab: string;
|
|
227
|
+
q: string;
|
|
228
|
+
aq: string;
|
|
229
|
+
cq: string;
|
|
230
|
+
dq: string;
|
|
231
|
+
lq: string;
|
|
232
|
+
pipelineRuleParameters: {
|
|
233
|
+
mlGenerativeQuestionAnswering: {
|
|
234
|
+
responseFormat: {
|
|
235
|
+
contentFormat: string[];
|
|
236
|
+
};
|
|
237
|
+
citationsFieldToInclude: never[];
|
|
238
|
+
};
|
|
239
|
+
};
|
|
240
|
+
searchHub: string;
|
|
241
|
+
facets: ({
|
|
242
|
+
filterFacetCount: boolean;
|
|
243
|
+
injectionDepth: number;
|
|
244
|
+
numberOfValues: number;
|
|
245
|
+
sortCriteria: string;
|
|
246
|
+
resultsMustMatch: string;
|
|
247
|
+
type: string;
|
|
248
|
+
currentValues: never[];
|
|
249
|
+
freezeCurrentValues: boolean;
|
|
250
|
+
isFieldExpanded: boolean;
|
|
251
|
+
preventAutoSelect: boolean;
|
|
252
|
+
facetId: string;
|
|
253
|
+
field: string;
|
|
254
|
+
rangeAlgorithm?: undefined;
|
|
255
|
+
generateAutomaticRanges?: undefined;
|
|
256
|
+
delimitingCharacter?: undefined;
|
|
257
|
+
basePath?: undefined;
|
|
258
|
+
filterByBasePath?: undefined;
|
|
259
|
+
} | {
|
|
260
|
+
filterFacetCount: boolean;
|
|
261
|
+
injectionDepth: number;
|
|
262
|
+
numberOfValues: number;
|
|
263
|
+
sortCriteria: string;
|
|
264
|
+
rangeAlgorithm: string;
|
|
265
|
+
resultsMustMatch: string;
|
|
266
|
+
currentValues: {
|
|
267
|
+
start: string;
|
|
268
|
+
end: string;
|
|
269
|
+
endInclusive: boolean;
|
|
270
|
+
state: string;
|
|
271
|
+
}[];
|
|
272
|
+
preventAutoSelect: boolean;
|
|
273
|
+
type: string;
|
|
274
|
+
facetId: string;
|
|
275
|
+
field: string;
|
|
276
|
+
generateAutomaticRanges: boolean;
|
|
277
|
+
freezeCurrentValues?: undefined;
|
|
278
|
+
isFieldExpanded?: undefined;
|
|
279
|
+
delimitingCharacter?: undefined;
|
|
280
|
+
basePath?: undefined;
|
|
281
|
+
filterByBasePath?: undefined;
|
|
282
|
+
} | {
|
|
283
|
+
delimitingCharacter: string;
|
|
284
|
+
filterFacetCount: boolean;
|
|
285
|
+
injectionDepth: number;
|
|
286
|
+
numberOfValues: number;
|
|
287
|
+
sortCriteria: string;
|
|
288
|
+
basePath: never[];
|
|
289
|
+
filterByBasePath: boolean;
|
|
290
|
+
resultsMustMatch: string;
|
|
291
|
+
currentValues: never[];
|
|
292
|
+
preventAutoSelect: boolean;
|
|
293
|
+
type: string;
|
|
294
|
+
facetId: string;
|
|
295
|
+
field: string;
|
|
296
|
+
freezeCurrentValues?: undefined;
|
|
297
|
+
isFieldExpanded?: undefined;
|
|
298
|
+
rangeAlgorithm?: undefined;
|
|
299
|
+
generateAutomaticRanges?: undefined;
|
|
300
|
+
} | {
|
|
301
|
+
filterFacetCount: boolean;
|
|
302
|
+
injectionDepth: number;
|
|
303
|
+
numberOfValues: number;
|
|
304
|
+
sortCriteria: string;
|
|
305
|
+
rangeAlgorithm: string;
|
|
306
|
+
resultsMustMatch: string;
|
|
307
|
+
currentValues: {
|
|
308
|
+
endInclusive: boolean;
|
|
309
|
+
state: string;
|
|
310
|
+
start: number;
|
|
311
|
+
end: number;
|
|
312
|
+
}[];
|
|
313
|
+
preventAutoSelect: boolean;
|
|
314
|
+
type: string;
|
|
315
|
+
facetId: string;
|
|
316
|
+
field: string;
|
|
317
|
+
generateAutomaticRanges: boolean;
|
|
318
|
+
freezeCurrentValues?: undefined;
|
|
319
|
+
isFieldExpanded?: undefined;
|
|
320
|
+
delimitingCharacter?: undefined;
|
|
321
|
+
basePath?: undefined;
|
|
322
|
+
filterByBasePath?: undefined;
|
|
323
|
+
})[];
|
|
324
|
+
fieldsToInclude: string[];
|
|
325
|
+
queryCorrection: {
|
|
326
|
+
enabled: boolean;
|
|
327
|
+
options: {
|
|
328
|
+
automaticallyCorrect: string;
|
|
329
|
+
};
|
|
330
|
+
};
|
|
331
|
+
enableDidYouMean: boolean;
|
|
332
|
+
numberOfResults: number;
|
|
333
|
+
firstResult: number;
|
|
334
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { AdvancedSearchQueriesState } from './advanced-search-queries-state.js';
|
|
2
|
+
export declare const selectAdvancedSearchQueries: ((state: {
|
|
3
|
+
advancedSearchQueries?: AdvancedSearchQueriesState;
|
|
4
|
+
}) => {
|
|
5
|
+
lq?: string | undefined;
|
|
6
|
+
dq?: string | undefined;
|
|
7
|
+
cq?: string | undefined;
|
|
8
|
+
aq?: string | undefined;
|
|
9
|
+
}) & {
|
|
10
|
+
clearCache: () => void;
|
|
11
|
+
resultsCount: () => number;
|
|
12
|
+
resetResultsCount: () => void;
|
|
13
|
+
} & {
|
|
14
|
+
resultFunc: (resultFuncArgs_0: AdvancedSearchQueriesState | undefined) => {
|
|
15
|
+
lq?: string | undefined;
|
|
16
|
+
dq?: string | undefined;
|
|
17
|
+
cq?: string | undefined;
|
|
18
|
+
aq?: string | undefined;
|
|
19
|
+
};
|
|
20
|
+
memoizedResultFunc: ((resultFuncArgs_0: AdvancedSearchQueriesState | undefined) => {
|
|
21
|
+
lq?: string | undefined;
|
|
22
|
+
dq?: string | undefined;
|
|
23
|
+
cq?: string | undefined;
|
|
24
|
+
aq?: string | undefined;
|
|
25
|
+
}) & {
|
|
26
|
+
clearCache: () => void;
|
|
27
|
+
resultsCount: () => number;
|
|
28
|
+
resetResultsCount: () => void;
|
|
29
|
+
};
|
|
30
|
+
lastResult: () => {
|
|
31
|
+
lq?: string | undefined;
|
|
32
|
+
dq?: string | undefined;
|
|
33
|
+
cq?: string | undefined;
|
|
34
|
+
aq?: string | undefined;
|
|
35
|
+
};
|
|
36
|
+
dependencies: [(state: {
|
|
37
|
+
advancedSearchQueries?: AdvancedSearchQueriesState;
|
|
38
|
+
}) => AdvancedSearchQueriesState | undefined];
|
|
39
|
+
recomputations: () => number;
|
|
40
|
+
resetRecomputations: () => void;
|
|
41
|
+
dependencyRecomputations: () => number;
|
|
42
|
+
resetDependencyRecomputations: () => void;
|
|
43
|
+
} & {
|
|
44
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
45
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
46
|
+
};
|
|
@@ -20,3 +20,24 @@ export declare const selectActiveTab: ((state: TabSetState | undefined) => strin
|
|
|
20
20
|
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
21
21
|
memoize: typeof import("reselect").weakMapMemoize;
|
|
22
22
|
};
|
|
23
|
+
export declare const selectActiveTabExpression: ((state: TabSetState | undefined) => string) & {
|
|
24
|
+
clearCache: () => void;
|
|
25
|
+
resultsCount: () => number;
|
|
26
|
+
resetResultsCount: () => void;
|
|
27
|
+
} & {
|
|
28
|
+
resultFunc: (resultFuncArgs_0: TabSetState | undefined) => string;
|
|
29
|
+
memoizedResultFunc: ((resultFuncArgs_0: TabSetState | undefined) => string) & {
|
|
30
|
+
clearCache: () => void;
|
|
31
|
+
resultsCount: () => number;
|
|
32
|
+
resetResultsCount: () => void;
|
|
33
|
+
};
|
|
34
|
+
lastResult: () => string;
|
|
35
|
+
dependencies: [(state?: TabSetState) => TabSetState | undefined];
|
|
36
|
+
recomputations: () => number;
|
|
37
|
+
resetRecomputations: () => void;
|
|
38
|
+
dependencyRecomputations: () => number;
|
|
39
|
+
resetDependencyRecomputations: () => void;
|
|
40
|
+
} & {
|
|
41
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
42
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
43
|
+
};
|