@seekora-ai/search-sdk 0.2.17 → 0.2.19
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/dist/client.d.ts +45 -0
- package/dist/client.js +167 -2
- package/dist/config.d.ts +3 -3
- package/dist/config.js +9 -4
- package/dist/generated/api.d.ts +299 -0
- package/dist/generated/api.js +286 -0
- package/dist/index.d.ts +1 -1
- package/package.json +1 -1
package/dist/client.d.ts
CHANGED
|
@@ -217,6 +217,40 @@ export interface SearchResponse {
|
|
|
217
217
|
context: SearchContext;
|
|
218
218
|
[key: string]: any;
|
|
219
219
|
}
|
|
220
|
+
/**
|
|
221
|
+
* Options for a single query within a multi-search request.
|
|
222
|
+
* Mirrors SearchOptions but all fields are optional (q is required at call site).
|
|
223
|
+
*/
|
|
224
|
+
export interface MultiSearchQuery {
|
|
225
|
+
/** Search query string */
|
|
226
|
+
q: string;
|
|
227
|
+
per_page?: number;
|
|
228
|
+
page?: number;
|
|
229
|
+
filter?: string;
|
|
230
|
+
filter_by?: string;
|
|
231
|
+
facet_by?: string;
|
|
232
|
+
sort?: string;
|
|
233
|
+
sort_by?: string;
|
|
234
|
+
analytics_tags?: string[];
|
|
235
|
+
widget_mode?: boolean;
|
|
236
|
+
search_fields?: string[];
|
|
237
|
+
field_weights?: number[];
|
|
238
|
+
return_fields?: string[];
|
|
239
|
+
omit_fields?: string[];
|
|
240
|
+
snippet_fields?: string[];
|
|
241
|
+
group_field?: string;
|
|
242
|
+
group_size?: number;
|
|
243
|
+
include_suggestions?: boolean;
|
|
244
|
+
suggestions_limit?: number;
|
|
245
|
+
max_facet_values?: number;
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* Response from multiSearch() — an array of per-query results,
|
|
249
|
+
* each with its own SearchContext for independent analytics tracking.
|
|
250
|
+
*/
|
|
251
|
+
export interface MultiSearchResponse {
|
|
252
|
+
results: Array<SearchResponse>;
|
|
253
|
+
}
|
|
220
254
|
/**
|
|
221
255
|
* Full query suggestions API response when returnFullResponse is true.
|
|
222
256
|
* Includes suggestion hits plus dropdown recommendations (trending_searches, top_searches,
|
|
@@ -355,6 +389,17 @@ export declare class SeekoraClient {
|
|
|
355
389
|
* @returns SearchResponse with results and SearchContext
|
|
356
390
|
*/
|
|
357
391
|
search(query: string, options?: Partial<SearchOptions>): Promise<SearchResponse>;
|
|
392
|
+
/**
|
|
393
|
+
* Execute multiple search queries in a single request.
|
|
394
|
+
*
|
|
395
|
+
* Batches up to 10 queries into one API call for efficiency.
|
|
396
|
+
* Each result gets its own SearchContext for independent analytics tracking
|
|
397
|
+
* (clicks, conversions, impressions are linked per sub-query).
|
|
398
|
+
*
|
|
399
|
+
* @param queries - Array of search queries (1-10)
|
|
400
|
+
* @returns MultiSearchResponse with per-query results and contexts
|
|
401
|
+
*/
|
|
402
|
+
multiSearch(queries: MultiSearchQuery[]): Promise<MultiSearchResponse>;
|
|
358
403
|
/**
|
|
359
404
|
* Get query suggestions
|
|
360
405
|
*
|
package/dist/client.js
CHANGED
|
@@ -171,7 +171,7 @@ class SeekoraClient {
|
|
|
171
171
|
// Log API request start
|
|
172
172
|
this.logger.verbose('Sending search API request', {
|
|
173
173
|
endpoint: '/api/v1/search',
|
|
174
|
-
method: '
|
|
174
|
+
method: 'POST',
|
|
175
175
|
storeId: this.storeId
|
|
176
176
|
});
|
|
177
177
|
// Build headers with personalization support
|
|
@@ -189,7 +189,47 @@ class SeekoraClient {
|
|
|
189
189
|
if (this.sessionId) {
|
|
190
190
|
headers['x-session-id'] = this.sessionId;
|
|
191
191
|
}
|
|
192
|
-
|
|
192
|
+
// Use POST to avoid URL length limits with complex filters/facets
|
|
193
|
+
const response = await this.searchApi.v1SearchPost(this.storeId, this.readSecret, {
|
|
194
|
+
q: searchRequest.q,
|
|
195
|
+
page: searchRequest.page,
|
|
196
|
+
per_page: searchRequest.per_page,
|
|
197
|
+
sort: searchRequest.sort,
|
|
198
|
+
filter: searchRequest.filter,
|
|
199
|
+
facet_by: searchRequest.facet_by,
|
|
200
|
+
max_facet_values: searchRequest.max_facet_values,
|
|
201
|
+
widget_mode: searchRequest.widget_mode,
|
|
202
|
+
include_suggestions: searchRequest.include_suggestions,
|
|
203
|
+
suggestions_limit: searchRequest.suggestions_limit,
|
|
204
|
+
analytics_tags: Array.isArray(searchRequest.analytics_tags) ? searchRequest.analytics_tags : undefined,
|
|
205
|
+
stopword_sets: Array.isArray(searchRequest.stopword_sets) ? searchRequest.stopword_sets : undefined,
|
|
206
|
+
synonym_sets: Array.isArray(searchRequest.synonym_sets) ? searchRequest.synonym_sets : undefined,
|
|
207
|
+
search_fields: searchRequest.search_fields,
|
|
208
|
+
return_fields: searchRequest.return_fields,
|
|
209
|
+
omit_fields: searchRequest.omit_fields,
|
|
210
|
+
snippet_fields: searchRequest.snippet_fields,
|
|
211
|
+
full_snippet_fields: searchRequest.full_snippet_fields,
|
|
212
|
+
field_weights: searchRequest.field_weights,
|
|
213
|
+
group_field: searchRequest.group_field,
|
|
214
|
+
group_size: searchRequest.group_size,
|
|
215
|
+
snippet_prefix: searchRequest.snippet_prefix,
|
|
216
|
+
snippet_suffix: searchRequest.snippet_suffix,
|
|
217
|
+
snippet_token_limit: searchRequest.snippet_token_limit,
|
|
218
|
+
snippet_min_len: searchRequest.snippet_min_len,
|
|
219
|
+
include_snippets: searchRequest.include_snippets,
|
|
220
|
+
prefix_mode: searchRequest.prefix_mode,
|
|
221
|
+
infix_mode: searchRequest.infix_mode,
|
|
222
|
+
typo_max: searchRequest.typo_max,
|
|
223
|
+
typo_min_len_1: searchRequest.typo_min_len_1,
|
|
224
|
+
typo_min_len_2: searchRequest.typo_min_len_2,
|
|
225
|
+
search_timeout_ms: searchRequest.search_timeout_ms,
|
|
226
|
+
require_all_terms: searchRequest.require_all_terms,
|
|
227
|
+
exact_match_boost: searchRequest.exact_match_boost,
|
|
228
|
+
cache_results: searchRequest.cache_results,
|
|
229
|
+
apply_rules: searchRequest.apply_rules,
|
|
230
|
+
preset_name: searchRequest.preset_name,
|
|
231
|
+
facet_search_text: searchRequest.facet_search_text,
|
|
232
|
+
}, this.userId, this.anonId, this.sessionId, { headers });
|
|
193
233
|
// Log API response received
|
|
194
234
|
this.logger.verbose('Search API response received', {
|
|
195
235
|
status: response.status,
|
|
@@ -320,6 +360,131 @@ class SeekoraClient {
|
|
|
320
360
|
throw this.handleError(error, 'search');
|
|
321
361
|
}
|
|
322
362
|
}
|
|
363
|
+
/**
|
|
364
|
+
* Execute multiple search queries in a single request.
|
|
365
|
+
*
|
|
366
|
+
* Batches up to 10 queries into one API call for efficiency.
|
|
367
|
+
* Each result gets its own SearchContext for independent analytics tracking
|
|
368
|
+
* (clicks, conversions, impressions are linked per sub-query).
|
|
369
|
+
*
|
|
370
|
+
* @param queries - Array of search queries (1-10)
|
|
371
|
+
* @returns MultiSearchResponse with per-query results and contexts
|
|
372
|
+
*/
|
|
373
|
+
async multiSearch(queries) {
|
|
374
|
+
if (!queries || queries.length === 0) {
|
|
375
|
+
throw new Error('At least one search query is required');
|
|
376
|
+
}
|
|
377
|
+
if (queries.length > 10) {
|
|
378
|
+
throw new Error('Maximum 10 search queries per request');
|
|
379
|
+
}
|
|
380
|
+
this.logger.verbose('Executing multi-search', {
|
|
381
|
+
queryCount: queries.length,
|
|
382
|
+
queries: queries.map(q => q.q),
|
|
383
|
+
});
|
|
384
|
+
// Build request body matching DataTypes.MultiSearchRequest
|
|
385
|
+
const searches = queries.map(q => ({
|
|
386
|
+
q: q.q.trim() || '*',
|
|
387
|
+
per_page: q.per_page || 10,
|
|
388
|
+
page: q.page || 1,
|
|
389
|
+
filter: q.filter || q.filter_by,
|
|
390
|
+
facet_by: q.facet_by,
|
|
391
|
+
sort: q.sort || q.sort_by,
|
|
392
|
+
analytics_tags: q.analytics_tags,
|
|
393
|
+
widget_mode: q.widget_mode || false,
|
|
394
|
+
search_fields: q.search_fields,
|
|
395
|
+
field_weights: q.field_weights,
|
|
396
|
+
return_fields: q.return_fields,
|
|
397
|
+
omit_fields: q.omit_fields,
|
|
398
|
+
snippet_fields: q.snippet_fields,
|
|
399
|
+
group_field: q.group_field,
|
|
400
|
+
group_size: q.group_size,
|
|
401
|
+
include_suggestions: q.include_suggestions,
|
|
402
|
+
suggestions_limit: q.suggestions_limit,
|
|
403
|
+
max_facet_values: q.max_facet_values,
|
|
404
|
+
}));
|
|
405
|
+
const headers = {
|
|
406
|
+
'x-storeid': this.storeId,
|
|
407
|
+
'x-storesecret': this.readSecret,
|
|
408
|
+
};
|
|
409
|
+
if (this.userId)
|
|
410
|
+
headers['x-user-id'] = this.userId;
|
|
411
|
+
if (this.anonId)
|
|
412
|
+
headers['x-anon-id'] = this.anonId;
|
|
413
|
+
if (this.sessionId)
|
|
414
|
+
headers['x-session-id'] = this.sessionId;
|
|
415
|
+
try {
|
|
416
|
+
const response = await this.searchApi.v1MultiSearchPost(this.storeId, this.readSecret, { searches }, { headers });
|
|
417
|
+
const data = response.data;
|
|
418
|
+
const resultsList = [];
|
|
419
|
+
// Process each sub-result with its own SearchContext
|
|
420
|
+
const subResults = data?.data || [];
|
|
421
|
+
for (let i = 0; i < subResults.length; i++) {
|
|
422
|
+
const sub = subResults[i];
|
|
423
|
+
const correlationId = (0, utils_1.generateUUID)();
|
|
424
|
+
const searchId = sub?.search_id;
|
|
425
|
+
const context = {
|
|
426
|
+
correlationId,
|
|
427
|
+
searchId,
|
|
428
|
+
userId: this.userId,
|
|
429
|
+
anonId: this.anonId,
|
|
430
|
+
sessionId: this.sessionId,
|
|
431
|
+
};
|
|
432
|
+
// Process facets (same logic as single search)
|
|
433
|
+
const facets = sub?.facets || [];
|
|
434
|
+
const facetsMap = {};
|
|
435
|
+
if (Array.isArray(facets)) {
|
|
436
|
+
facets.forEach((facet, index) => {
|
|
437
|
+
const fieldName = facet?.field_name || facet?.fieldName || facet?.name || `facet_${index}`;
|
|
438
|
+
if (fieldName && (facet?.counts || facet?.values || Array.isArray(facet))) {
|
|
439
|
+
facetsMap[fieldName] = {
|
|
440
|
+
field_name: fieldName,
|
|
441
|
+
counts: facet.counts || facet.values || [],
|
|
442
|
+
stats: facet.stats || {},
|
|
443
|
+
};
|
|
444
|
+
}
|
|
445
|
+
});
|
|
446
|
+
}
|
|
447
|
+
const result = {
|
|
448
|
+
results: sub?.results || [],
|
|
449
|
+
totalResults: sub?.total_results || 0,
|
|
450
|
+
searchId,
|
|
451
|
+
context,
|
|
452
|
+
facets: facetsMap,
|
|
453
|
+
facet_counts: facetsMap,
|
|
454
|
+
};
|
|
455
|
+
resultsList.push(result);
|
|
456
|
+
// Auto-track search event per sub-query
|
|
457
|
+
if (this.autoTrackSearch) {
|
|
458
|
+
this.trackSearch({
|
|
459
|
+
query: queries[i]?.q || '*',
|
|
460
|
+
resultsCount: result.totalResults,
|
|
461
|
+
context,
|
|
462
|
+
}).catch((err) => {
|
|
463
|
+
this.logger.warn('Failed to auto-track multi-search event', { index: i, error: err.message });
|
|
464
|
+
});
|
|
465
|
+
}
|
|
466
|
+
// Auto-track impressions per sub-query
|
|
467
|
+
if (this.clientConfig.autoTrackImpressions !== false && result.results.length > 0) {
|
|
468
|
+
this.autoTrackSearchImpressions(result, context).catch((err) => {
|
|
469
|
+
this.logger.warn('Failed to auto-track multi-search impressions', { index: i, error: err.message });
|
|
470
|
+
});
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
this.logger.info('Multi-search completed', {
|
|
474
|
+
queryCount: queries.length,
|
|
475
|
+
totalResults: resultsList.map(r => r.totalResults),
|
|
476
|
+
});
|
|
477
|
+
return { results: resultsList };
|
|
478
|
+
}
|
|
479
|
+
catch (error) {
|
|
480
|
+
this.logger.error('Multi-search failed', {
|
|
481
|
+
queryCount: queries.length,
|
|
482
|
+
error: error.message,
|
|
483
|
+
status: error.response?.status,
|
|
484
|
+
});
|
|
485
|
+
throw this.handleError(error, 'multiSearch');
|
|
486
|
+
}
|
|
487
|
+
}
|
|
323
488
|
/**
|
|
324
489
|
* Get query suggestions
|
|
325
490
|
*
|
package/dist/config.d.ts
CHANGED
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Production API only. Use baseUrl for custom endpoints.
|
|
5
5
|
*/
|
|
6
|
-
export type SeekoraEnvironment = 'production';
|
|
6
|
+
export type SeekoraEnvironment = 'production' | 'staging';
|
|
7
7
|
export interface EnvironmentConfig {
|
|
8
8
|
baseUrl: string;
|
|
9
9
|
name: string;
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
|
-
* Environment configurations
|
|
12
|
+
* Environment configurations
|
|
13
13
|
*/
|
|
14
14
|
export declare const ENVIRONMENTS: Record<SeekoraEnvironment, EnvironmentConfig>;
|
|
15
15
|
/**
|
|
@@ -17,6 +17,6 @@ export declare const ENVIRONMENTS: Record<SeekoraEnvironment, EnvironmentConfig>
|
|
|
17
17
|
*/
|
|
18
18
|
export declare function getBaseUrl(environment?: SeekoraEnvironment, customBaseUrl?: string): string;
|
|
19
19
|
/**
|
|
20
|
-
* Get current environment
|
|
20
|
+
* Get current environment
|
|
21
21
|
*/
|
|
22
22
|
export declare function getEnvironment(environment?: SeekoraEnvironment): SeekoraEnvironment;
|
package/dist/config.js
CHANGED
|
@@ -9,13 +9,17 @@ exports.ENVIRONMENTS = void 0;
|
|
|
9
9
|
exports.getBaseUrl = getBaseUrl;
|
|
10
10
|
exports.getEnvironment = getEnvironment;
|
|
11
11
|
/**
|
|
12
|
-
* Environment configurations
|
|
12
|
+
* Environment configurations
|
|
13
13
|
*/
|
|
14
14
|
exports.ENVIRONMENTS = {
|
|
15
15
|
production: {
|
|
16
16
|
baseUrl: 'https://api.seekora.com/api',
|
|
17
17
|
name: 'Production',
|
|
18
18
|
},
|
|
19
|
+
staging: {
|
|
20
|
+
baseUrl: 'https://stage-api.seekora.ai/api',
|
|
21
|
+
name: 'Staging',
|
|
22
|
+
},
|
|
19
23
|
};
|
|
20
24
|
/**
|
|
21
25
|
* Get base URL. Use customBaseUrl for custom endpoints.
|
|
@@ -24,11 +28,12 @@ function getBaseUrl(environment, customBaseUrl) {
|
|
|
24
28
|
if (customBaseUrl) {
|
|
25
29
|
return customBaseUrl;
|
|
26
30
|
}
|
|
27
|
-
|
|
31
|
+
const env = environment || 'production';
|
|
32
|
+
return exports.ENVIRONMENTS[env]?.baseUrl || exports.ENVIRONMENTS.production.baseUrl;
|
|
28
33
|
}
|
|
29
34
|
/**
|
|
30
|
-
* Get current environment
|
|
35
|
+
* Get current environment
|
|
31
36
|
*/
|
|
32
37
|
function getEnvironment(environment) {
|
|
33
|
-
return 'production';
|
|
38
|
+
return environment || 'production';
|
|
34
39
|
}
|
package/dist/generated/api.d.ts
CHANGED
|
@@ -839,6 +839,14 @@ export interface DataTypesIndexField {
|
|
|
839
839
|
'stats'?: DataTypesNumericFieldStats;
|
|
840
840
|
'type'?: string;
|
|
841
841
|
}
|
|
842
|
+
export interface DataTypesMultiSearchRequest {
|
|
843
|
+
'searches': Array<DataTypesSearchRequest>;
|
|
844
|
+
}
|
|
845
|
+
export interface DataTypesMultiSearchResponseWrapper {
|
|
846
|
+
'data'?: Array<DataTypesSearchResponse>;
|
|
847
|
+
'message'?: string;
|
|
848
|
+
'status'?: number;
|
|
849
|
+
}
|
|
842
850
|
export interface DataTypesNumericFieldStats {
|
|
843
851
|
/**
|
|
844
852
|
* Number of documents with this field
|
|
@@ -967,6 +975,70 @@ export interface DataTypesSchemaResponseWrapper {
|
|
|
967
975
|
'message'?: string;
|
|
968
976
|
'status'?: number;
|
|
969
977
|
}
|
|
978
|
+
export interface DataTypesSearchRequest {
|
|
979
|
+
'analytics_tags'?: Array<string>;
|
|
980
|
+
/**
|
|
981
|
+
* Anonymous/cookie ID for personalization
|
|
982
|
+
*/
|
|
983
|
+
'anon_id'?: string;
|
|
984
|
+
'apply_rules'?: boolean;
|
|
985
|
+
'cache_results'?: boolean;
|
|
986
|
+
'exact_match_boost'?: boolean;
|
|
987
|
+
'facet_by'?: string;
|
|
988
|
+
'facet_search_text'?: string;
|
|
989
|
+
'field_weights'?: Array<number>;
|
|
990
|
+
'filter'?: string;
|
|
991
|
+
'full_snippet_fields'?: Array<string>;
|
|
992
|
+
'group_field'?: string;
|
|
993
|
+
'group_size'?: number;
|
|
994
|
+
'include_snippets'?: boolean;
|
|
995
|
+
'include_suggestions'?: boolean;
|
|
996
|
+
'infix_mode'?: string;
|
|
997
|
+
'max_facet_values'?: number;
|
|
998
|
+
'omit_fields'?: Array<string>;
|
|
999
|
+
'page'?: number;
|
|
1000
|
+
'per_page'?: number;
|
|
1001
|
+
'prefix_mode'?: string;
|
|
1002
|
+
'preset_name'?: string;
|
|
1003
|
+
'q': string;
|
|
1004
|
+
'require_all_terms'?: boolean;
|
|
1005
|
+
'return_fields'?: Array<string>;
|
|
1006
|
+
/**
|
|
1007
|
+
* Advanced query controls (public-friendly field names)
|
|
1008
|
+
*/
|
|
1009
|
+
'search_fields'?: Array<string>;
|
|
1010
|
+
'search_timeout_ms'?: number;
|
|
1011
|
+
/**
|
|
1012
|
+
* Session ID for session-based personalization
|
|
1013
|
+
*/
|
|
1014
|
+
'session_id'?: string;
|
|
1015
|
+
'snippet_fields'?: Array<string>;
|
|
1016
|
+
'snippet_min_len'?: number;
|
|
1017
|
+
'snippet_prefix'?: string;
|
|
1018
|
+
'snippet_suffix'?: string;
|
|
1019
|
+
'snippet_token_limit'?: number;
|
|
1020
|
+
'sort'?: string;
|
|
1021
|
+
/**
|
|
1022
|
+
* IDs of stopword sets to use
|
|
1023
|
+
*/
|
|
1024
|
+
'stopword_sets'?: Array<string>;
|
|
1025
|
+
'suggestions_limit'?: number;
|
|
1026
|
+
/**
|
|
1027
|
+
* IDs of synonym sets to use
|
|
1028
|
+
*/
|
|
1029
|
+
'synonym_sets'?: Array<string>;
|
|
1030
|
+
'typo_max'?: number;
|
|
1031
|
+
'typo_min_len_1'?: number;
|
|
1032
|
+
'typo_min_len_2'?: number;
|
|
1033
|
+
/**
|
|
1034
|
+
* Personalization fields (optional, backward compatible)
|
|
1035
|
+
*/
|
|
1036
|
+
'user_id'?: string;
|
|
1037
|
+
/**
|
|
1038
|
+
* If true, returns only display fields instead of full document (used in public API only)
|
|
1039
|
+
*/
|
|
1040
|
+
'widget_mode'?: boolean;
|
|
1041
|
+
}
|
|
970
1042
|
export interface DataTypesSearchResponse {
|
|
971
1043
|
'facets'?: any;
|
|
972
1044
|
'page'?: number;
|
|
@@ -992,6 +1064,7 @@ export interface DataTypesSearchResult {
|
|
|
992
1064
|
'document'?: {
|
|
993
1065
|
[key: string]: any;
|
|
994
1066
|
};
|
|
1067
|
+
'group_key'?: Array<any>;
|
|
995
1068
|
'highlight'?: {
|
|
996
1069
|
[key: string]: any;
|
|
997
1070
|
};
|
|
@@ -1562,6 +1635,88 @@ export interface QuerySuggestionsServiceQuerySuggestionsConfig {
|
|
|
1562
1635
|
*/
|
|
1563
1636
|
'supported_time_ranges'?: Array<string>;
|
|
1564
1637
|
}
|
|
1638
|
+
export interface QuerySuggestionsServiceQuerySuggestionsRequest {
|
|
1639
|
+
/**
|
|
1640
|
+
* Filter suggestions by analytics tags
|
|
1641
|
+
*/
|
|
1642
|
+
'analytics_tags'?: Array<string>;
|
|
1643
|
+
/**
|
|
1644
|
+
* Anonymous/cookie ID for personalization
|
|
1645
|
+
*/
|
|
1646
|
+
'anon_id'?: string;
|
|
1647
|
+
/**
|
|
1648
|
+
* Disable fuzzy matching
|
|
1649
|
+
*/
|
|
1650
|
+
'disable_typo_tolerance'?: boolean;
|
|
1651
|
+
/**
|
|
1652
|
+
* Filtered tabs (optional, overrides config if provided)
|
|
1653
|
+
*/
|
|
1654
|
+
'filtered_tabs'?: Array<DataTypesFilteredTabConfig>;
|
|
1655
|
+
/**
|
|
1656
|
+
* Number of suggestions to return (default: 5)
|
|
1657
|
+
*/
|
|
1658
|
+
'hitsPerPage'?: number;
|
|
1659
|
+
/**
|
|
1660
|
+
* Include category information
|
|
1661
|
+
*/
|
|
1662
|
+
'include_categories'?: boolean;
|
|
1663
|
+
/**
|
|
1664
|
+
* Optional: disable parts of dropdown when include_dropdown_recommendations=true (default true = include)
|
|
1665
|
+
*/
|
|
1666
|
+
'include_dropdown_product_list'?: boolean;
|
|
1667
|
+
/**
|
|
1668
|
+
* Rich dropdown recommendations (optional, data-agnostic)
|
|
1669
|
+
*/
|
|
1670
|
+
'include_dropdown_recommendations'?: boolean;
|
|
1671
|
+
/**
|
|
1672
|
+
* Empty query recommendations - show meaningful suggestions when no query is entered When true and query is empty, returns popular/trending suggestions instead of an empty array
|
|
1673
|
+
*/
|
|
1674
|
+
'include_empty_query_recommendations'?: boolean;
|
|
1675
|
+
/**
|
|
1676
|
+
* Include facet information
|
|
1677
|
+
*/
|
|
1678
|
+
'include_facets'?: boolean;
|
|
1679
|
+
/**
|
|
1680
|
+
* When false, omit filtered_tabs from dropdown extensions (default true)
|
|
1681
|
+
*/
|
|
1682
|
+
'include_filtered_tabs'?: boolean;
|
|
1683
|
+
/**
|
|
1684
|
+
* Max categories per suggestion (default: 3)
|
|
1685
|
+
*/
|
|
1686
|
+
'max_categories'?: number;
|
|
1687
|
+
/**
|
|
1688
|
+
* Max facets per suggestion (default: 5)
|
|
1689
|
+
*/
|
|
1690
|
+
'max_facets'?: number;
|
|
1691
|
+
/**
|
|
1692
|
+
* Minimum popularity threshold
|
|
1693
|
+
*/
|
|
1694
|
+
'min_popularity'?: number;
|
|
1695
|
+
/**
|
|
1696
|
+
* Page number for pagination (default: 0)
|
|
1697
|
+
*/
|
|
1698
|
+
'page'?: number;
|
|
1699
|
+
/**
|
|
1700
|
+
* Partial query to get suggestions for
|
|
1701
|
+
*/
|
|
1702
|
+
'query'?: string;
|
|
1703
|
+
/**
|
|
1704
|
+
* Session ID for session-based personalization
|
|
1705
|
+
*/
|
|
1706
|
+
'session_id'?: string;
|
|
1707
|
+
/**
|
|
1708
|
+
* \"any\" or \"all\" for analytics tags
|
|
1709
|
+
*/
|
|
1710
|
+
'tags_match_mode'?: string;
|
|
1711
|
+
/**
|
|
1712
|
+
* \"7d\", \"30d\", \"90d\" (default: \"30d\")
|
|
1713
|
+
*/
|
|
1714
|
+
'time_range'?: string;
|
|
1715
|
+
/**
|
|
1716
|
+
* Personalization fields (optional, backward compatible)
|
|
1717
|
+
*/
|
|
1718
|
+
'user_id'?: string;
|
|
1719
|
+
}
|
|
1565
1720
|
export interface QuerySuggestionsServiceQuerySuggestionsResponse {
|
|
1566
1721
|
/**
|
|
1567
1722
|
* Rich dropdown recommendations (optional, only when include_dropdown_recommendations=true)
|
|
@@ -2286,6 +2441,19 @@ export declare const QuerySuggestionsApiAxiosParamCreator: (configuration?: Conf
|
|
|
2286
2441
|
* @throws {RequiredError}
|
|
2287
2442
|
*/
|
|
2288
2443
|
v1SuggestionsQueriesGet: (xStoreid: string, xStoresecret: string, xUserId?: string, xAnonId?: string, xSessionId?: string, query?: string, q?: string, hitsPerPage?: number, page?: number, analyticsTags?: string, tagsMatchMode?: V1SuggestionsQueriesGetTagsMatchModeEnum, includeCategories?: boolean, includeFacets?: boolean, includeDropdownRecommendations?: boolean, includeDropdownProductList?: boolean, includeFilteredTabs?: boolean, includeEmptyQueryRecommendations?: boolean, maxCategories?: number, maxFacets?: number, minPopularity?: number, timeRange?: V1SuggestionsQueriesGetTimeRangeEnum, disableTypoTolerance?: boolean, filteredTabs?: string, userId?: string, anonId?: string, sessionId?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
2444
|
+
/**
|
|
2445
|
+
* Same as GET; use POST to send a JSON body (e.g. complex filtered_tabs). **Auth:** `x-storeid` and `x-storesecret`. Optional personalization headers: `x-user-id`, `x-anon-id`, `x-session-id`. Request body can include query, hitsPerPage, analytics_tags, include_categories, include_facets, filtered_tabs, etc.
|
|
2446
|
+
* @summary Get query suggestions (POST)
|
|
2447
|
+
* @param {string} xStoreid Store ID (from dashboard)
|
|
2448
|
+
* @param {string} xStoresecret Store read secret
|
|
2449
|
+
* @param {string} [xUserId] User ID for personalization
|
|
2450
|
+
* @param {string} [xAnonId] Anonymous user ID for personalization
|
|
2451
|
+
* @param {string} [xSessionId] Session ID for personalization
|
|
2452
|
+
* @param {QuerySuggestionsServiceQuerySuggestionsRequest} [querySuggestionsServiceQuerySuggestionsRequest] Request (query, hitsPerPage, analytics_tags, filtered_tabs, etc.)
|
|
2453
|
+
* @param {*} [options] Override http request option.
|
|
2454
|
+
* @throws {RequiredError}
|
|
2455
|
+
*/
|
|
2456
|
+
v1SuggestionsQueriesPost: (xStoreid: string, xStoresecret: string, xUserId?: string, xAnonId?: string, xSessionId?: string, querySuggestionsServiceQuerySuggestionsRequest?: QuerySuggestionsServiceQuerySuggestionsRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
2289
2457
|
};
|
|
2290
2458
|
/**
|
|
2291
2459
|
* QuerySuggestionsApi - functional programming interface
|
|
@@ -2333,6 +2501,19 @@ export declare const QuerySuggestionsApiFp: (configuration?: Configuration) => {
|
|
|
2333
2501
|
* @throws {RequiredError}
|
|
2334
2502
|
*/
|
|
2335
2503
|
v1SuggestionsQueriesGet(xStoreid: string, xStoresecret: string, xUserId?: string, xAnonId?: string, xSessionId?: string, query?: string, q?: string, hitsPerPage?: number, page?: number, analyticsTags?: string, tagsMatchMode?: V1SuggestionsQueriesGetTagsMatchModeEnum, includeCategories?: boolean, includeFacets?: boolean, includeDropdownRecommendations?: boolean, includeDropdownProductList?: boolean, includeFilteredTabs?: boolean, includeEmptyQueryRecommendations?: boolean, maxCategories?: number, maxFacets?: number, minPopularity?: number, timeRange?: V1SuggestionsQueriesGetTimeRangeEnum, disableTypoTolerance?: boolean, filteredTabs?: string, userId?: string, anonId?: string, sessionId?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<QuerySuggestionsServiceQuerySuggestionsAPIResponse>>;
|
|
2504
|
+
/**
|
|
2505
|
+
* Same as GET; use POST to send a JSON body (e.g. complex filtered_tabs). **Auth:** `x-storeid` and `x-storesecret`. Optional personalization headers: `x-user-id`, `x-anon-id`, `x-session-id`. Request body can include query, hitsPerPage, analytics_tags, include_categories, include_facets, filtered_tabs, etc.
|
|
2506
|
+
* @summary Get query suggestions (POST)
|
|
2507
|
+
* @param {string} xStoreid Store ID (from dashboard)
|
|
2508
|
+
* @param {string} xStoresecret Store read secret
|
|
2509
|
+
* @param {string} [xUserId] User ID for personalization
|
|
2510
|
+
* @param {string} [xAnonId] Anonymous user ID for personalization
|
|
2511
|
+
* @param {string} [xSessionId] Session ID for personalization
|
|
2512
|
+
* @param {QuerySuggestionsServiceQuerySuggestionsRequest} [querySuggestionsServiceQuerySuggestionsRequest] Request (query, hitsPerPage, analytics_tags, filtered_tabs, etc.)
|
|
2513
|
+
* @param {*} [options] Override http request option.
|
|
2514
|
+
* @throws {RequiredError}
|
|
2515
|
+
*/
|
|
2516
|
+
v1SuggestionsQueriesPost(xStoreid: string, xStoresecret: string, xUserId?: string, xAnonId?: string, xSessionId?: string, querySuggestionsServiceQuerySuggestionsRequest?: QuerySuggestionsServiceQuerySuggestionsRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<QuerySuggestionsServiceQuerySuggestionsAPIResponse>>;
|
|
2336
2517
|
};
|
|
2337
2518
|
/**
|
|
2338
2519
|
* QuerySuggestionsApi - factory interface
|
|
@@ -2380,6 +2561,19 @@ export declare const QuerySuggestionsApiFactory: (configuration?: Configuration,
|
|
|
2380
2561
|
* @throws {RequiredError}
|
|
2381
2562
|
*/
|
|
2382
2563
|
v1SuggestionsQueriesGet(xStoreid: string, xStoresecret: string, xUserId?: string, xAnonId?: string, xSessionId?: string, query?: string, q?: string, hitsPerPage?: number, page?: number, analyticsTags?: string, tagsMatchMode?: V1SuggestionsQueriesGetTagsMatchModeEnum, includeCategories?: boolean, includeFacets?: boolean, includeDropdownRecommendations?: boolean, includeDropdownProductList?: boolean, includeFilteredTabs?: boolean, includeEmptyQueryRecommendations?: boolean, maxCategories?: number, maxFacets?: number, minPopularity?: number, timeRange?: V1SuggestionsQueriesGetTimeRangeEnum, disableTypoTolerance?: boolean, filteredTabs?: string, userId?: string, anonId?: string, sessionId?: string, options?: RawAxiosRequestConfig): AxiosPromise<QuerySuggestionsServiceQuerySuggestionsAPIResponse>;
|
|
2564
|
+
/**
|
|
2565
|
+
* Same as GET; use POST to send a JSON body (e.g. complex filtered_tabs). **Auth:** `x-storeid` and `x-storesecret`. Optional personalization headers: `x-user-id`, `x-anon-id`, `x-session-id`. Request body can include query, hitsPerPage, analytics_tags, include_categories, include_facets, filtered_tabs, etc.
|
|
2566
|
+
* @summary Get query suggestions (POST)
|
|
2567
|
+
* @param {string} xStoreid Store ID (from dashboard)
|
|
2568
|
+
* @param {string} xStoresecret Store read secret
|
|
2569
|
+
* @param {string} [xUserId] User ID for personalization
|
|
2570
|
+
* @param {string} [xAnonId] Anonymous user ID for personalization
|
|
2571
|
+
* @param {string} [xSessionId] Session ID for personalization
|
|
2572
|
+
* @param {QuerySuggestionsServiceQuerySuggestionsRequest} [querySuggestionsServiceQuerySuggestionsRequest] Request (query, hitsPerPage, analytics_tags, filtered_tabs, etc.)
|
|
2573
|
+
* @param {*} [options] Override http request option.
|
|
2574
|
+
* @throws {RequiredError}
|
|
2575
|
+
*/
|
|
2576
|
+
v1SuggestionsQueriesPost(xStoreid: string, xStoresecret: string, xUserId?: string, xAnonId?: string, xSessionId?: string, querySuggestionsServiceQuerySuggestionsRequest?: QuerySuggestionsServiceQuerySuggestionsRequest, options?: RawAxiosRequestConfig): AxiosPromise<QuerySuggestionsServiceQuerySuggestionsAPIResponse>;
|
|
2383
2577
|
};
|
|
2384
2578
|
/**
|
|
2385
2579
|
* QuerySuggestionsApi - object-oriented interface
|
|
@@ -2427,6 +2621,19 @@ export declare class QuerySuggestionsApi extends BaseAPI {
|
|
|
2427
2621
|
* @throws {RequiredError}
|
|
2428
2622
|
*/
|
|
2429
2623
|
v1SuggestionsQueriesGet(xStoreid: string, xStoresecret: string, xUserId?: string, xAnonId?: string, xSessionId?: string, query?: string, q?: string, hitsPerPage?: number, page?: number, analyticsTags?: string, tagsMatchMode?: V1SuggestionsQueriesGetTagsMatchModeEnum, includeCategories?: boolean, includeFacets?: boolean, includeDropdownRecommendations?: boolean, includeDropdownProductList?: boolean, includeFilteredTabs?: boolean, includeEmptyQueryRecommendations?: boolean, maxCategories?: number, maxFacets?: number, minPopularity?: number, timeRange?: V1SuggestionsQueriesGetTimeRangeEnum, disableTypoTolerance?: boolean, filteredTabs?: string, userId?: string, anonId?: string, sessionId?: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<QuerySuggestionsServiceQuerySuggestionsAPIResponse, any, {}>>;
|
|
2624
|
+
/**
|
|
2625
|
+
* Same as GET; use POST to send a JSON body (e.g. complex filtered_tabs). **Auth:** `x-storeid` and `x-storesecret`. Optional personalization headers: `x-user-id`, `x-anon-id`, `x-session-id`. Request body can include query, hitsPerPage, analytics_tags, include_categories, include_facets, filtered_tabs, etc.
|
|
2626
|
+
* @summary Get query suggestions (POST)
|
|
2627
|
+
* @param {string} xStoreid Store ID (from dashboard)
|
|
2628
|
+
* @param {string} xStoresecret Store read secret
|
|
2629
|
+
* @param {string} [xUserId] User ID for personalization
|
|
2630
|
+
* @param {string} [xAnonId] Anonymous user ID for personalization
|
|
2631
|
+
* @param {string} [xSessionId] Session ID for personalization
|
|
2632
|
+
* @param {QuerySuggestionsServiceQuerySuggestionsRequest} [querySuggestionsServiceQuerySuggestionsRequest] Request (query, hitsPerPage, analytics_tags, filtered_tabs, etc.)
|
|
2633
|
+
* @param {*} [options] Override http request option.
|
|
2634
|
+
* @throws {RequiredError}
|
|
2635
|
+
*/
|
|
2636
|
+
v1SuggestionsQueriesPost(xStoreid: string, xStoresecret: string, xUserId?: string, xAnonId?: string, xSessionId?: string, querySuggestionsServiceQuerySuggestionsRequest?: QuerySuggestionsServiceQuerySuggestionsRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<QuerySuggestionsServiceQuerySuggestionsAPIResponse, any, {}>>;
|
|
2430
2637
|
}
|
|
2431
2638
|
export declare const V1SuggestionsQueriesGetTagsMatchModeEnum: {
|
|
2432
2639
|
readonly Any: "any";
|
|
@@ -2443,6 +2650,16 @@ export type V1SuggestionsQueriesGetTimeRangeEnum = typeof V1SuggestionsQueriesGe
|
|
|
2443
2650
|
* SearchApi - axios parameter creator
|
|
2444
2651
|
*/
|
|
2445
2652
|
export declare const SearchApiAxiosParamCreator: (configuration?: Configuration) => {
|
|
2653
|
+
/**
|
|
2654
|
+
* Execute multiple search queries in a single request. Each query is independent and can have its own filters, pagination, and sorting. Maximum 10 queries per request. **Authentication:** Send `x-storeid` and `x-storesecret` headers.
|
|
2655
|
+
* @summary Multi-Search (POST)
|
|
2656
|
+
* @param {string} xStoreid Store ID (from dashboard)
|
|
2657
|
+
* @param {string} xStoresecret Store read secret (from dashboard)
|
|
2658
|
+
* @param {DataTypesMultiSearchRequest} dataTypesMultiSearchRequest Array of search queries
|
|
2659
|
+
* @param {*} [options] Override http request option.
|
|
2660
|
+
* @throws {RequiredError}
|
|
2661
|
+
*/
|
|
2662
|
+
v1MultiSearchPost: (xStoreid: string, xStoresecret: string, dataTypesMultiSearchRequest: DataTypesMultiSearchRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
2446
2663
|
/**
|
|
2447
2664
|
* Same as POST search; all parameters are passed as query params. **Authentication:** `x-storeid` and `x-storesecret` headers. Use `q` for the search query; optional params: `page`, `per_page`, `filter_by`, `sort_by`, `facet_by`, `widget_mode`, `include_suggestions`, etc.
|
|
2448
2665
|
* @summary Search (GET)
|
|
@@ -2493,11 +2710,34 @@ export declare const SearchApiAxiosParamCreator: (configuration?: Configuration)
|
|
|
2493
2710
|
* @throws {RequiredError}
|
|
2494
2711
|
*/
|
|
2495
2712
|
v1SearchGet: (xStoreid: string, xStoresecret: string, q: string, xUserId?: string, xAnonId?: string, xSessionId?: string, page?: number, perPage?: number, sortBy?: string, filterBy?: string, facetBy?: string, maxFacetValues?: number, widgetMode?: boolean, includeSuggestions?: boolean, suggestionsLimit?: number, analyticsTags?: string, stopwordSets?: string, synonymSets?: string, searchFields?: string, returnFields?: string, omitFields?: string, snippetFields?: string, fullSnippetFields?: string, fieldWeights?: string, groupField?: string, groupSize?: number, snippetPrefix?: string, snippetSuffix?: string, snippetTokenLimit?: number, snippetMinLen?: number, includeSnippets?: boolean, prefixMode?: string, infixMode?: string, typoMax?: number, typoMinLen1?: number, typoMinLen2?: number, searchTimeoutMs?: number, requireAllTerms?: boolean, exactMatchBoost?: boolean, cacheResults?: boolean, applyRules?: boolean, presetName?: string, facetSearchText?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
2713
|
+
/**
|
|
2714
|
+
* Run a full-text search for your store. **Authentication:** Send `x-storeid` and `x-storesecret` (from Seekora dashboard). Optional: `x-user-id`, `x-anon-id`, `x-session-id` for personalization. Supports pagination, filters, facets, sorting, snippets, and autocomplete suggestions. Use `widget_mode: true` for lightweight widget results.
|
|
2715
|
+
* @summary Search (POST)
|
|
2716
|
+
* @param {string} xStoreid Store ID (from dashboard)
|
|
2717
|
+
* @param {string} xStoresecret Store read secret (from dashboard)
|
|
2718
|
+
* @param {DataTypesSearchRequest} dataTypesSearchRequest Search query, filters, pagination, and options
|
|
2719
|
+
* @param {string} [xUserId] User ID for personalization
|
|
2720
|
+
* @param {string} [xAnonId] Anonymous user ID for personalization
|
|
2721
|
+
* @param {string} [xSessionId] Session ID for personalization
|
|
2722
|
+
* @param {*} [options] Override http request option.
|
|
2723
|
+
* @throws {RequiredError}
|
|
2724
|
+
*/
|
|
2725
|
+
v1SearchPost: (xStoreid: string, xStoresecret: string, dataTypesSearchRequest: DataTypesSearchRequest, xUserId?: string, xAnonId?: string, xSessionId?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
2496
2726
|
};
|
|
2497
2727
|
/**
|
|
2498
2728
|
* SearchApi - functional programming interface
|
|
2499
2729
|
*/
|
|
2500
2730
|
export declare const SearchApiFp: (configuration?: Configuration) => {
|
|
2731
|
+
/**
|
|
2732
|
+
* Execute multiple search queries in a single request. Each query is independent and can have its own filters, pagination, and sorting. Maximum 10 queries per request. **Authentication:** Send `x-storeid` and `x-storesecret` headers.
|
|
2733
|
+
* @summary Multi-Search (POST)
|
|
2734
|
+
* @param {string} xStoreid Store ID (from dashboard)
|
|
2735
|
+
* @param {string} xStoresecret Store read secret (from dashboard)
|
|
2736
|
+
* @param {DataTypesMultiSearchRequest} dataTypesMultiSearchRequest Array of search queries
|
|
2737
|
+
* @param {*} [options] Override http request option.
|
|
2738
|
+
* @throws {RequiredError}
|
|
2739
|
+
*/
|
|
2740
|
+
v1MultiSearchPost(xStoreid: string, xStoresecret: string, dataTypesMultiSearchRequest: DataTypesMultiSearchRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DataTypesMultiSearchResponseWrapper>>;
|
|
2501
2741
|
/**
|
|
2502
2742
|
* Same as POST search; all parameters are passed as query params. **Authentication:** `x-storeid` and `x-storesecret` headers. Use `q` for the search query; optional params: `page`, `per_page`, `filter_by`, `sort_by`, `facet_by`, `widget_mode`, `include_suggestions`, etc.
|
|
2503
2743
|
* @summary Search (GET)
|
|
@@ -2548,11 +2788,34 @@ export declare const SearchApiFp: (configuration?: Configuration) => {
|
|
|
2548
2788
|
* @throws {RequiredError}
|
|
2549
2789
|
*/
|
|
2550
2790
|
v1SearchGet(xStoreid: string, xStoresecret: string, q: string, xUserId?: string, xAnonId?: string, xSessionId?: string, page?: number, perPage?: number, sortBy?: string, filterBy?: string, facetBy?: string, maxFacetValues?: number, widgetMode?: boolean, includeSuggestions?: boolean, suggestionsLimit?: number, analyticsTags?: string, stopwordSets?: string, synonymSets?: string, searchFields?: string, returnFields?: string, omitFields?: string, snippetFields?: string, fullSnippetFields?: string, fieldWeights?: string, groupField?: string, groupSize?: number, snippetPrefix?: string, snippetSuffix?: string, snippetTokenLimit?: number, snippetMinLen?: number, includeSnippets?: boolean, prefixMode?: string, infixMode?: string, typoMax?: number, typoMinLen1?: number, typoMinLen2?: number, searchTimeoutMs?: number, requireAllTerms?: boolean, exactMatchBoost?: boolean, cacheResults?: boolean, applyRules?: boolean, presetName?: string, facetSearchText?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DataTypesSearchResponseWrapper>>;
|
|
2791
|
+
/**
|
|
2792
|
+
* Run a full-text search for your store. **Authentication:** Send `x-storeid` and `x-storesecret` (from Seekora dashboard). Optional: `x-user-id`, `x-anon-id`, `x-session-id` for personalization. Supports pagination, filters, facets, sorting, snippets, and autocomplete suggestions. Use `widget_mode: true` for lightweight widget results.
|
|
2793
|
+
* @summary Search (POST)
|
|
2794
|
+
* @param {string} xStoreid Store ID (from dashboard)
|
|
2795
|
+
* @param {string} xStoresecret Store read secret (from dashboard)
|
|
2796
|
+
* @param {DataTypesSearchRequest} dataTypesSearchRequest Search query, filters, pagination, and options
|
|
2797
|
+
* @param {string} [xUserId] User ID for personalization
|
|
2798
|
+
* @param {string} [xAnonId] Anonymous user ID for personalization
|
|
2799
|
+
* @param {string} [xSessionId] Session ID for personalization
|
|
2800
|
+
* @param {*} [options] Override http request option.
|
|
2801
|
+
* @throws {RequiredError}
|
|
2802
|
+
*/
|
|
2803
|
+
v1SearchPost(xStoreid: string, xStoresecret: string, dataTypesSearchRequest: DataTypesSearchRequest, xUserId?: string, xAnonId?: string, xSessionId?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DataTypesSearchResponseWrapper>>;
|
|
2551
2804
|
};
|
|
2552
2805
|
/**
|
|
2553
2806
|
* SearchApi - factory interface
|
|
2554
2807
|
*/
|
|
2555
2808
|
export declare const SearchApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
|
|
2809
|
+
/**
|
|
2810
|
+
* Execute multiple search queries in a single request. Each query is independent and can have its own filters, pagination, and sorting. Maximum 10 queries per request. **Authentication:** Send `x-storeid` and `x-storesecret` headers.
|
|
2811
|
+
* @summary Multi-Search (POST)
|
|
2812
|
+
* @param {string} xStoreid Store ID (from dashboard)
|
|
2813
|
+
* @param {string} xStoresecret Store read secret (from dashboard)
|
|
2814
|
+
* @param {DataTypesMultiSearchRequest} dataTypesMultiSearchRequest Array of search queries
|
|
2815
|
+
* @param {*} [options] Override http request option.
|
|
2816
|
+
* @throws {RequiredError}
|
|
2817
|
+
*/
|
|
2818
|
+
v1MultiSearchPost(xStoreid: string, xStoresecret: string, dataTypesMultiSearchRequest: DataTypesMultiSearchRequest, options?: RawAxiosRequestConfig): AxiosPromise<DataTypesMultiSearchResponseWrapper>;
|
|
2556
2819
|
/**
|
|
2557
2820
|
* Same as POST search; all parameters are passed as query params. **Authentication:** `x-storeid` and `x-storesecret` headers. Use `q` for the search query; optional params: `page`, `per_page`, `filter_by`, `sort_by`, `facet_by`, `widget_mode`, `include_suggestions`, etc.
|
|
2558
2821
|
* @summary Search (GET)
|
|
@@ -2603,11 +2866,34 @@ export declare const SearchApiFactory: (configuration?: Configuration, basePath?
|
|
|
2603
2866
|
* @throws {RequiredError}
|
|
2604
2867
|
*/
|
|
2605
2868
|
v1SearchGet(xStoreid: string, xStoresecret: string, q: string, xUserId?: string, xAnonId?: string, xSessionId?: string, page?: number, perPage?: number, sortBy?: string, filterBy?: string, facetBy?: string, maxFacetValues?: number, widgetMode?: boolean, includeSuggestions?: boolean, suggestionsLimit?: number, analyticsTags?: string, stopwordSets?: string, synonymSets?: string, searchFields?: string, returnFields?: string, omitFields?: string, snippetFields?: string, fullSnippetFields?: string, fieldWeights?: string, groupField?: string, groupSize?: number, snippetPrefix?: string, snippetSuffix?: string, snippetTokenLimit?: number, snippetMinLen?: number, includeSnippets?: boolean, prefixMode?: string, infixMode?: string, typoMax?: number, typoMinLen1?: number, typoMinLen2?: number, searchTimeoutMs?: number, requireAllTerms?: boolean, exactMatchBoost?: boolean, cacheResults?: boolean, applyRules?: boolean, presetName?: string, facetSearchText?: string, options?: RawAxiosRequestConfig): AxiosPromise<DataTypesSearchResponseWrapper>;
|
|
2869
|
+
/**
|
|
2870
|
+
* Run a full-text search for your store. **Authentication:** Send `x-storeid` and `x-storesecret` (from Seekora dashboard). Optional: `x-user-id`, `x-anon-id`, `x-session-id` for personalization. Supports pagination, filters, facets, sorting, snippets, and autocomplete suggestions. Use `widget_mode: true` for lightweight widget results.
|
|
2871
|
+
* @summary Search (POST)
|
|
2872
|
+
* @param {string} xStoreid Store ID (from dashboard)
|
|
2873
|
+
* @param {string} xStoresecret Store read secret (from dashboard)
|
|
2874
|
+
* @param {DataTypesSearchRequest} dataTypesSearchRequest Search query, filters, pagination, and options
|
|
2875
|
+
* @param {string} [xUserId] User ID for personalization
|
|
2876
|
+
* @param {string} [xAnonId] Anonymous user ID for personalization
|
|
2877
|
+
* @param {string} [xSessionId] Session ID for personalization
|
|
2878
|
+
* @param {*} [options] Override http request option.
|
|
2879
|
+
* @throws {RequiredError}
|
|
2880
|
+
*/
|
|
2881
|
+
v1SearchPost(xStoreid: string, xStoresecret: string, dataTypesSearchRequest: DataTypesSearchRequest, xUserId?: string, xAnonId?: string, xSessionId?: string, options?: RawAxiosRequestConfig): AxiosPromise<DataTypesSearchResponseWrapper>;
|
|
2606
2882
|
};
|
|
2607
2883
|
/**
|
|
2608
2884
|
* SearchApi - object-oriented interface
|
|
2609
2885
|
*/
|
|
2610
2886
|
export declare class SearchApi extends BaseAPI {
|
|
2887
|
+
/**
|
|
2888
|
+
* Execute multiple search queries in a single request. Each query is independent and can have its own filters, pagination, and sorting. Maximum 10 queries per request. **Authentication:** Send `x-storeid` and `x-storesecret` headers.
|
|
2889
|
+
* @summary Multi-Search (POST)
|
|
2890
|
+
* @param {string} xStoreid Store ID (from dashboard)
|
|
2891
|
+
* @param {string} xStoresecret Store read secret (from dashboard)
|
|
2892
|
+
* @param {DataTypesMultiSearchRequest} dataTypesMultiSearchRequest Array of search queries
|
|
2893
|
+
* @param {*} [options] Override http request option.
|
|
2894
|
+
* @throws {RequiredError}
|
|
2895
|
+
*/
|
|
2896
|
+
v1MultiSearchPost(xStoreid: string, xStoresecret: string, dataTypesMultiSearchRequest: DataTypesMultiSearchRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<DataTypesMultiSearchResponseWrapper, any, {}>>;
|
|
2611
2897
|
/**
|
|
2612
2898
|
* Same as POST search; all parameters are passed as query params. **Authentication:** `x-storeid` and `x-storesecret` headers. Use `q` for the search query; optional params: `page`, `per_page`, `filter_by`, `sort_by`, `facet_by`, `widget_mode`, `include_suggestions`, etc.
|
|
2613
2899
|
* @summary Search (GET)
|
|
@@ -2658,6 +2944,19 @@ export declare class SearchApi extends BaseAPI {
|
|
|
2658
2944
|
* @throws {RequiredError}
|
|
2659
2945
|
*/
|
|
2660
2946
|
v1SearchGet(xStoreid: string, xStoresecret: string, q: string, xUserId?: string, xAnonId?: string, xSessionId?: string, page?: number, perPage?: number, sortBy?: string, filterBy?: string, facetBy?: string, maxFacetValues?: number, widgetMode?: boolean, includeSuggestions?: boolean, suggestionsLimit?: number, analyticsTags?: string, stopwordSets?: string, synonymSets?: string, searchFields?: string, returnFields?: string, omitFields?: string, snippetFields?: string, fullSnippetFields?: string, fieldWeights?: string, groupField?: string, groupSize?: number, snippetPrefix?: string, snippetSuffix?: string, snippetTokenLimit?: number, snippetMinLen?: number, includeSnippets?: boolean, prefixMode?: string, infixMode?: string, typoMax?: number, typoMinLen1?: number, typoMinLen2?: number, searchTimeoutMs?: number, requireAllTerms?: boolean, exactMatchBoost?: boolean, cacheResults?: boolean, applyRules?: boolean, presetName?: string, facetSearchText?: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<DataTypesSearchResponseWrapper, any, {}>>;
|
|
2947
|
+
/**
|
|
2948
|
+
* Run a full-text search for your store. **Authentication:** Send `x-storeid` and `x-storesecret` (from Seekora dashboard). Optional: `x-user-id`, `x-anon-id`, `x-session-id` for personalization. Supports pagination, filters, facets, sorting, snippets, and autocomplete suggestions. Use `widget_mode: true` for lightweight widget results.
|
|
2949
|
+
* @summary Search (POST)
|
|
2950
|
+
* @param {string} xStoreid Store ID (from dashboard)
|
|
2951
|
+
* @param {string} xStoresecret Store read secret (from dashboard)
|
|
2952
|
+
* @param {DataTypesSearchRequest} dataTypesSearchRequest Search query, filters, pagination, and options
|
|
2953
|
+
* @param {string} [xUserId] User ID for personalization
|
|
2954
|
+
* @param {string} [xAnonId] Anonymous user ID for personalization
|
|
2955
|
+
* @param {string} [xSessionId] Session ID for personalization
|
|
2956
|
+
* @param {*} [options] Override http request option.
|
|
2957
|
+
* @throws {RequiredError}
|
|
2958
|
+
*/
|
|
2959
|
+
v1SearchPost(xStoreid: string, xStoresecret: string, dataTypesSearchRequest: DataTypesSearchRequest, xUserId?: string, xAnonId?: string, xSessionId?: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<DataTypesSearchResponseWrapper, any, {}>>;
|
|
2661
2960
|
}
|
|
2662
2961
|
/**
|
|
2663
2962
|
* StoreManagementApi - axios parameter creator
|
package/dist/generated/api.js
CHANGED
|
@@ -975,6 +975,59 @@ const QuerySuggestionsApiAxiosParamCreator = function (configuration) {
|
|
|
975
975
|
options: localVarRequestOptions,
|
|
976
976
|
};
|
|
977
977
|
},
|
|
978
|
+
/**
|
|
979
|
+
* Same as GET; use POST to send a JSON body (e.g. complex filtered_tabs). **Auth:** `x-storeid` and `x-storesecret`. Optional personalization headers: `x-user-id`, `x-anon-id`, `x-session-id`. Request body can include query, hitsPerPage, analytics_tags, include_categories, include_facets, filtered_tabs, etc.
|
|
980
|
+
* @summary Get query suggestions (POST)
|
|
981
|
+
* @param {string} xStoreid Store ID (from dashboard)
|
|
982
|
+
* @param {string} xStoresecret Store read secret
|
|
983
|
+
* @param {string} [xUserId] User ID for personalization
|
|
984
|
+
* @param {string} [xAnonId] Anonymous user ID for personalization
|
|
985
|
+
* @param {string} [xSessionId] Session ID for personalization
|
|
986
|
+
* @param {QuerySuggestionsServiceQuerySuggestionsRequest} [querySuggestionsServiceQuerySuggestionsRequest] Request (query, hitsPerPage, analytics_tags, filtered_tabs, etc.)
|
|
987
|
+
* @param {*} [options] Override http request option.
|
|
988
|
+
* @throws {RequiredError}
|
|
989
|
+
*/
|
|
990
|
+
v1SuggestionsQueriesPost: async (xStoreid, xStoresecret, xUserId, xAnonId, xSessionId, querySuggestionsServiceQuerySuggestionsRequest, options = {}) => {
|
|
991
|
+
// verify required parameter 'xStoreid' is not null or undefined
|
|
992
|
+
(0, common_1.assertParamExists)('v1SuggestionsQueriesPost', 'xStoreid', xStoreid);
|
|
993
|
+
// verify required parameter 'xStoresecret' is not null or undefined
|
|
994
|
+
(0, common_1.assertParamExists)('v1SuggestionsQueriesPost', 'xStoresecret', xStoresecret);
|
|
995
|
+
const localVarPath = `/v1/suggestions/queries`;
|
|
996
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
997
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
998
|
+
let baseOptions;
|
|
999
|
+
if (configuration) {
|
|
1000
|
+
baseOptions = configuration.baseOptions;
|
|
1001
|
+
}
|
|
1002
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
|
|
1003
|
+
const localVarHeaderParameter = {};
|
|
1004
|
+
const localVarQueryParameter = {};
|
|
1005
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1006
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
1007
|
+
if (xStoreid != null) {
|
|
1008
|
+
localVarHeaderParameter['x-storeid'] = String(xStoreid);
|
|
1009
|
+
}
|
|
1010
|
+
if (xStoresecret != null) {
|
|
1011
|
+
localVarHeaderParameter['x-storesecret'] = String(xStoresecret);
|
|
1012
|
+
}
|
|
1013
|
+
if (xUserId != null) {
|
|
1014
|
+
localVarHeaderParameter['x-user-id'] = String(xUserId);
|
|
1015
|
+
}
|
|
1016
|
+
if (xAnonId != null) {
|
|
1017
|
+
localVarHeaderParameter['x-anon-id'] = String(xAnonId);
|
|
1018
|
+
}
|
|
1019
|
+
if (xSessionId != null) {
|
|
1020
|
+
localVarHeaderParameter['x-session-id'] = String(xSessionId);
|
|
1021
|
+
}
|
|
1022
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1023
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1024
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
1025
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(querySuggestionsServiceQuerySuggestionsRequest, localVarRequestOptions, configuration);
|
|
1026
|
+
return {
|
|
1027
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1028
|
+
options: localVarRequestOptions,
|
|
1029
|
+
};
|
|
1030
|
+
},
|
|
978
1031
|
};
|
|
979
1032
|
};
|
|
980
1033
|
exports.QuerySuggestionsApiAxiosParamCreator = QuerySuggestionsApiAxiosParamCreator;
|
|
@@ -1036,6 +1089,24 @@ const QuerySuggestionsApiFp = function (configuration) {
|
|
|
1036
1089
|
const localVarOperationServerBasePath = base_1.operationServerMap['QuerySuggestionsApi.v1SuggestionsQueriesGet']?.[localVarOperationServerIndex]?.url;
|
|
1037
1090
|
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1038
1091
|
},
|
|
1092
|
+
/**
|
|
1093
|
+
* Same as GET; use POST to send a JSON body (e.g. complex filtered_tabs). **Auth:** `x-storeid` and `x-storesecret`. Optional personalization headers: `x-user-id`, `x-anon-id`, `x-session-id`. Request body can include query, hitsPerPage, analytics_tags, include_categories, include_facets, filtered_tabs, etc.
|
|
1094
|
+
* @summary Get query suggestions (POST)
|
|
1095
|
+
* @param {string} xStoreid Store ID (from dashboard)
|
|
1096
|
+
* @param {string} xStoresecret Store read secret
|
|
1097
|
+
* @param {string} [xUserId] User ID for personalization
|
|
1098
|
+
* @param {string} [xAnonId] Anonymous user ID for personalization
|
|
1099
|
+
* @param {string} [xSessionId] Session ID for personalization
|
|
1100
|
+
* @param {QuerySuggestionsServiceQuerySuggestionsRequest} [querySuggestionsServiceQuerySuggestionsRequest] Request (query, hitsPerPage, analytics_tags, filtered_tabs, etc.)
|
|
1101
|
+
* @param {*} [options] Override http request option.
|
|
1102
|
+
* @throws {RequiredError}
|
|
1103
|
+
*/
|
|
1104
|
+
async v1SuggestionsQueriesPost(xStoreid, xStoresecret, xUserId, xAnonId, xSessionId, querySuggestionsServiceQuerySuggestionsRequest, options) {
|
|
1105
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.v1SuggestionsQueriesPost(xStoreid, xStoresecret, xUserId, xAnonId, xSessionId, querySuggestionsServiceQuerySuggestionsRequest, options);
|
|
1106
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1107
|
+
const localVarOperationServerBasePath = base_1.operationServerMap['QuerySuggestionsApi.v1SuggestionsQueriesPost']?.[localVarOperationServerIndex]?.url;
|
|
1108
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1109
|
+
},
|
|
1039
1110
|
};
|
|
1040
1111
|
};
|
|
1041
1112
|
exports.QuerySuggestionsApiFp = QuerySuggestionsApiFp;
|
|
@@ -1091,6 +1162,21 @@ const QuerySuggestionsApiFactory = function (configuration, basePath, axios) {
|
|
|
1091
1162
|
v1SuggestionsQueriesGet(xStoreid, xStoresecret, xUserId, xAnonId, xSessionId, query, q, hitsPerPage, page, analyticsTags, tagsMatchMode, includeCategories, includeFacets, includeDropdownRecommendations, includeDropdownProductList, includeFilteredTabs, includeEmptyQueryRecommendations, maxCategories, maxFacets, minPopularity, timeRange, disableTypoTolerance, filteredTabs, userId, anonId, sessionId, options) {
|
|
1092
1163
|
return localVarFp.v1SuggestionsQueriesGet(xStoreid, xStoresecret, xUserId, xAnonId, xSessionId, query, q, hitsPerPage, page, analyticsTags, tagsMatchMode, includeCategories, includeFacets, includeDropdownRecommendations, includeDropdownProductList, includeFilteredTabs, includeEmptyQueryRecommendations, maxCategories, maxFacets, minPopularity, timeRange, disableTypoTolerance, filteredTabs, userId, anonId, sessionId, options).then((request) => request(axios, basePath));
|
|
1093
1164
|
},
|
|
1165
|
+
/**
|
|
1166
|
+
* Same as GET; use POST to send a JSON body (e.g. complex filtered_tabs). **Auth:** `x-storeid` and `x-storesecret`. Optional personalization headers: `x-user-id`, `x-anon-id`, `x-session-id`. Request body can include query, hitsPerPage, analytics_tags, include_categories, include_facets, filtered_tabs, etc.
|
|
1167
|
+
* @summary Get query suggestions (POST)
|
|
1168
|
+
* @param {string} xStoreid Store ID (from dashboard)
|
|
1169
|
+
* @param {string} xStoresecret Store read secret
|
|
1170
|
+
* @param {string} [xUserId] User ID for personalization
|
|
1171
|
+
* @param {string} [xAnonId] Anonymous user ID for personalization
|
|
1172
|
+
* @param {string} [xSessionId] Session ID for personalization
|
|
1173
|
+
* @param {QuerySuggestionsServiceQuerySuggestionsRequest} [querySuggestionsServiceQuerySuggestionsRequest] Request (query, hitsPerPage, analytics_tags, filtered_tabs, etc.)
|
|
1174
|
+
* @param {*} [options] Override http request option.
|
|
1175
|
+
* @throws {RequiredError}
|
|
1176
|
+
*/
|
|
1177
|
+
v1SuggestionsQueriesPost(xStoreid, xStoresecret, xUserId, xAnonId, xSessionId, querySuggestionsServiceQuerySuggestionsRequest, options) {
|
|
1178
|
+
return localVarFp.v1SuggestionsQueriesPost(xStoreid, xStoresecret, xUserId, xAnonId, xSessionId, querySuggestionsServiceQuerySuggestionsRequest, options).then((request) => request(axios, basePath));
|
|
1179
|
+
},
|
|
1094
1180
|
};
|
|
1095
1181
|
};
|
|
1096
1182
|
exports.QuerySuggestionsApiFactory = QuerySuggestionsApiFactory;
|
|
@@ -1144,6 +1230,21 @@ class QuerySuggestionsApi extends base_1.BaseAPI {
|
|
|
1144
1230
|
v1SuggestionsQueriesGet(xStoreid, xStoresecret, xUserId, xAnonId, xSessionId, query, q, hitsPerPage, page, analyticsTags, tagsMatchMode, includeCategories, includeFacets, includeDropdownRecommendations, includeDropdownProductList, includeFilteredTabs, includeEmptyQueryRecommendations, maxCategories, maxFacets, minPopularity, timeRange, disableTypoTolerance, filteredTabs, userId, anonId, sessionId, options) {
|
|
1145
1231
|
return (0, exports.QuerySuggestionsApiFp)(this.configuration).v1SuggestionsQueriesGet(xStoreid, xStoresecret, xUserId, xAnonId, xSessionId, query, q, hitsPerPage, page, analyticsTags, tagsMatchMode, includeCategories, includeFacets, includeDropdownRecommendations, includeDropdownProductList, includeFilteredTabs, includeEmptyQueryRecommendations, maxCategories, maxFacets, minPopularity, timeRange, disableTypoTolerance, filteredTabs, userId, anonId, sessionId, options).then((request) => request(this.axios, this.basePath));
|
|
1146
1232
|
}
|
|
1233
|
+
/**
|
|
1234
|
+
* Same as GET; use POST to send a JSON body (e.g. complex filtered_tabs). **Auth:** `x-storeid` and `x-storesecret`. Optional personalization headers: `x-user-id`, `x-anon-id`, `x-session-id`. Request body can include query, hitsPerPage, analytics_tags, include_categories, include_facets, filtered_tabs, etc.
|
|
1235
|
+
* @summary Get query suggestions (POST)
|
|
1236
|
+
* @param {string} xStoreid Store ID (from dashboard)
|
|
1237
|
+
* @param {string} xStoresecret Store read secret
|
|
1238
|
+
* @param {string} [xUserId] User ID for personalization
|
|
1239
|
+
* @param {string} [xAnonId] Anonymous user ID for personalization
|
|
1240
|
+
* @param {string} [xSessionId] Session ID for personalization
|
|
1241
|
+
* @param {QuerySuggestionsServiceQuerySuggestionsRequest} [querySuggestionsServiceQuerySuggestionsRequest] Request (query, hitsPerPage, analytics_tags, filtered_tabs, etc.)
|
|
1242
|
+
* @param {*} [options] Override http request option.
|
|
1243
|
+
* @throws {RequiredError}
|
|
1244
|
+
*/
|
|
1245
|
+
v1SuggestionsQueriesPost(xStoreid, xStoresecret, xUserId, xAnonId, xSessionId, querySuggestionsServiceQuerySuggestionsRequest, options) {
|
|
1246
|
+
return (0, exports.QuerySuggestionsApiFp)(this.configuration).v1SuggestionsQueriesPost(xStoreid, xStoresecret, xUserId, xAnonId, xSessionId, querySuggestionsServiceQuerySuggestionsRequest, options).then((request) => request(this.axios, this.basePath));
|
|
1247
|
+
}
|
|
1147
1248
|
}
|
|
1148
1249
|
exports.QuerySuggestionsApi = QuerySuggestionsApi;
|
|
1149
1250
|
exports.V1SuggestionsQueriesGetTagsMatchModeEnum = {
|
|
@@ -1160,6 +1261,49 @@ exports.V1SuggestionsQueriesGetTimeRangeEnum = {
|
|
|
1160
1261
|
*/
|
|
1161
1262
|
const SearchApiAxiosParamCreator = function (configuration) {
|
|
1162
1263
|
return {
|
|
1264
|
+
/**
|
|
1265
|
+
* Execute multiple search queries in a single request. Each query is independent and can have its own filters, pagination, and sorting. Maximum 10 queries per request. **Authentication:** Send `x-storeid` and `x-storesecret` headers.
|
|
1266
|
+
* @summary Multi-Search (POST)
|
|
1267
|
+
* @param {string} xStoreid Store ID (from dashboard)
|
|
1268
|
+
* @param {string} xStoresecret Store read secret (from dashboard)
|
|
1269
|
+
* @param {DataTypesMultiSearchRequest} dataTypesMultiSearchRequest Array of search queries
|
|
1270
|
+
* @param {*} [options] Override http request option.
|
|
1271
|
+
* @throws {RequiredError}
|
|
1272
|
+
*/
|
|
1273
|
+
v1MultiSearchPost: async (xStoreid, xStoresecret, dataTypesMultiSearchRequest, options = {}) => {
|
|
1274
|
+
// verify required parameter 'xStoreid' is not null or undefined
|
|
1275
|
+
(0, common_1.assertParamExists)('v1MultiSearchPost', 'xStoreid', xStoreid);
|
|
1276
|
+
// verify required parameter 'xStoresecret' is not null or undefined
|
|
1277
|
+
(0, common_1.assertParamExists)('v1MultiSearchPost', 'xStoresecret', xStoresecret);
|
|
1278
|
+
// verify required parameter 'dataTypesMultiSearchRequest' is not null or undefined
|
|
1279
|
+
(0, common_1.assertParamExists)('v1MultiSearchPost', 'dataTypesMultiSearchRequest', dataTypesMultiSearchRequest);
|
|
1280
|
+
const localVarPath = `/v1/multi-search`;
|
|
1281
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1282
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1283
|
+
let baseOptions;
|
|
1284
|
+
if (configuration) {
|
|
1285
|
+
baseOptions = configuration.baseOptions;
|
|
1286
|
+
}
|
|
1287
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
|
|
1288
|
+
const localVarHeaderParameter = {};
|
|
1289
|
+
const localVarQueryParameter = {};
|
|
1290
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1291
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
1292
|
+
if (xStoreid != null) {
|
|
1293
|
+
localVarHeaderParameter['x-storeid'] = String(xStoreid);
|
|
1294
|
+
}
|
|
1295
|
+
if (xStoresecret != null) {
|
|
1296
|
+
localVarHeaderParameter['x-storesecret'] = String(xStoresecret);
|
|
1297
|
+
}
|
|
1298
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1299
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1300
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
1301
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(dataTypesMultiSearchRequest, localVarRequestOptions, configuration);
|
|
1302
|
+
return {
|
|
1303
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1304
|
+
options: localVarRequestOptions,
|
|
1305
|
+
};
|
|
1306
|
+
},
|
|
1163
1307
|
/**
|
|
1164
1308
|
* Same as POST search; all parameters are passed as query params. **Authentication:** `x-storeid` and `x-storesecret` headers. Use `q` for the search query; optional params: `page`, `per_page`, `filter_by`, `sort_by`, `facet_by`, `widget_mode`, `include_suggestions`, etc.
|
|
1165
1309
|
* @summary Search (GET)
|
|
@@ -1364,6 +1508,61 @@ const SearchApiAxiosParamCreator = function (configuration) {
|
|
|
1364
1508
|
options: localVarRequestOptions,
|
|
1365
1509
|
};
|
|
1366
1510
|
},
|
|
1511
|
+
/**
|
|
1512
|
+
* Run a full-text search for your store. **Authentication:** Send `x-storeid` and `x-storesecret` (from Seekora dashboard). Optional: `x-user-id`, `x-anon-id`, `x-session-id` for personalization. Supports pagination, filters, facets, sorting, snippets, and autocomplete suggestions. Use `widget_mode: true` for lightweight widget results.
|
|
1513
|
+
* @summary Search (POST)
|
|
1514
|
+
* @param {string} xStoreid Store ID (from dashboard)
|
|
1515
|
+
* @param {string} xStoresecret Store read secret (from dashboard)
|
|
1516
|
+
* @param {DataTypesSearchRequest} dataTypesSearchRequest Search query, filters, pagination, and options
|
|
1517
|
+
* @param {string} [xUserId] User ID for personalization
|
|
1518
|
+
* @param {string} [xAnonId] Anonymous user ID for personalization
|
|
1519
|
+
* @param {string} [xSessionId] Session ID for personalization
|
|
1520
|
+
* @param {*} [options] Override http request option.
|
|
1521
|
+
* @throws {RequiredError}
|
|
1522
|
+
*/
|
|
1523
|
+
v1SearchPost: async (xStoreid, xStoresecret, dataTypesSearchRequest, xUserId, xAnonId, xSessionId, options = {}) => {
|
|
1524
|
+
// verify required parameter 'xStoreid' is not null or undefined
|
|
1525
|
+
(0, common_1.assertParamExists)('v1SearchPost', 'xStoreid', xStoreid);
|
|
1526
|
+
// verify required parameter 'xStoresecret' is not null or undefined
|
|
1527
|
+
(0, common_1.assertParamExists)('v1SearchPost', 'xStoresecret', xStoresecret);
|
|
1528
|
+
// verify required parameter 'dataTypesSearchRequest' is not null or undefined
|
|
1529
|
+
(0, common_1.assertParamExists)('v1SearchPost', 'dataTypesSearchRequest', dataTypesSearchRequest);
|
|
1530
|
+
const localVarPath = `/v1/search`;
|
|
1531
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1532
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1533
|
+
let baseOptions;
|
|
1534
|
+
if (configuration) {
|
|
1535
|
+
baseOptions = configuration.baseOptions;
|
|
1536
|
+
}
|
|
1537
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
|
|
1538
|
+
const localVarHeaderParameter = {};
|
|
1539
|
+
const localVarQueryParameter = {};
|
|
1540
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1541
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
1542
|
+
if (xStoreid != null) {
|
|
1543
|
+
localVarHeaderParameter['x-storeid'] = String(xStoreid);
|
|
1544
|
+
}
|
|
1545
|
+
if (xStoresecret != null) {
|
|
1546
|
+
localVarHeaderParameter['x-storesecret'] = String(xStoresecret);
|
|
1547
|
+
}
|
|
1548
|
+
if (xUserId != null) {
|
|
1549
|
+
localVarHeaderParameter['x-user-id'] = String(xUserId);
|
|
1550
|
+
}
|
|
1551
|
+
if (xAnonId != null) {
|
|
1552
|
+
localVarHeaderParameter['x-anon-id'] = String(xAnonId);
|
|
1553
|
+
}
|
|
1554
|
+
if (xSessionId != null) {
|
|
1555
|
+
localVarHeaderParameter['x-session-id'] = String(xSessionId);
|
|
1556
|
+
}
|
|
1557
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1558
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1559
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
1560
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(dataTypesSearchRequest, localVarRequestOptions, configuration);
|
|
1561
|
+
return {
|
|
1562
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1563
|
+
options: localVarRequestOptions,
|
|
1564
|
+
};
|
|
1565
|
+
},
|
|
1367
1566
|
};
|
|
1368
1567
|
};
|
|
1369
1568
|
exports.SearchApiAxiosParamCreator = SearchApiAxiosParamCreator;
|
|
@@ -1373,6 +1572,21 @@ exports.SearchApiAxiosParamCreator = SearchApiAxiosParamCreator;
|
|
|
1373
1572
|
const SearchApiFp = function (configuration) {
|
|
1374
1573
|
const localVarAxiosParamCreator = (0, exports.SearchApiAxiosParamCreator)(configuration);
|
|
1375
1574
|
return {
|
|
1575
|
+
/**
|
|
1576
|
+
* Execute multiple search queries in a single request. Each query is independent and can have its own filters, pagination, and sorting. Maximum 10 queries per request. **Authentication:** Send `x-storeid` and `x-storesecret` headers.
|
|
1577
|
+
* @summary Multi-Search (POST)
|
|
1578
|
+
* @param {string} xStoreid Store ID (from dashboard)
|
|
1579
|
+
* @param {string} xStoresecret Store read secret (from dashboard)
|
|
1580
|
+
* @param {DataTypesMultiSearchRequest} dataTypesMultiSearchRequest Array of search queries
|
|
1581
|
+
* @param {*} [options] Override http request option.
|
|
1582
|
+
* @throws {RequiredError}
|
|
1583
|
+
*/
|
|
1584
|
+
async v1MultiSearchPost(xStoreid, xStoresecret, dataTypesMultiSearchRequest, options) {
|
|
1585
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.v1MultiSearchPost(xStoreid, xStoresecret, dataTypesMultiSearchRequest, options);
|
|
1586
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1587
|
+
const localVarOperationServerBasePath = base_1.operationServerMap['SearchApi.v1MultiSearchPost']?.[localVarOperationServerIndex]?.url;
|
|
1588
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1589
|
+
},
|
|
1376
1590
|
/**
|
|
1377
1591
|
* Same as POST search; all parameters are passed as query params. **Authentication:** `x-storeid` and `x-storesecret` headers. Use `q` for the search query; optional params: `page`, `per_page`, `filter_by`, `sort_by`, `facet_by`, `widget_mode`, `include_suggestions`, etc.
|
|
1378
1592
|
* @summary Search (GET)
|
|
@@ -1428,6 +1642,24 @@ const SearchApiFp = function (configuration) {
|
|
|
1428
1642
|
const localVarOperationServerBasePath = base_1.operationServerMap['SearchApi.v1SearchGet']?.[localVarOperationServerIndex]?.url;
|
|
1429
1643
|
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1430
1644
|
},
|
|
1645
|
+
/**
|
|
1646
|
+
* Run a full-text search for your store. **Authentication:** Send `x-storeid` and `x-storesecret` (from Seekora dashboard). Optional: `x-user-id`, `x-anon-id`, `x-session-id` for personalization. Supports pagination, filters, facets, sorting, snippets, and autocomplete suggestions. Use `widget_mode: true` for lightweight widget results.
|
|
1647
|
+
* @summary Search (POST)
|
|
1648
|
+
* @param {string} xStoreid Store ID (from dashboard)
|
|
1649
|
+
* @param {string} xStoresecret Store read secret (from dashboard)
|
|
1650
|
+
* @param {DataTypesSearchRequest} dataTypesSearchRequest Search query, filters, pagination, and options
|
|
1651
|
+
* @param {string} [xUserId] User ID for personalization
|
|
1652
|
+
* @param {string} [xAnonId] Anonymous user ID for personalization
|
|
1653
|
+
* @param {string} [xSessionId] Session ID for personalization
|
|
1654
|
+
* @param {*} [options] Override http request option.
|
|
1655
|
+
* @throws {RequiredError}
|
|
1656
|
+
*/
|
|
1657
|
+
async v1SearchPost(xStoreid, xStoresecret, dataTypesSearchRequest, xUserId, xAnonId, xSessionId, options) {
|
|
1658
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.v1SearchPost(xStoreid, xStoresecret, dataTypesSearchRequest, xUserId, xAnonId, xSessionId, options);
|
|
1659
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1660
|
+
const localVarOperationServerBasePath = base_1.operationServerMap['SearchApi.v1SearchPost']?.[localVarOperationServerIndex]?.url;
|
|
1661
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1662
|
+
},
|
|
1431
1663
|
};
|
|
1432
1664
|
};
|
|
1433
1665
|
exports.SearchApiFp = SearchApiFp;
|
|
@@ -1437,6 +1669,18 @@ exports.SearchApiFp = SearchApiFp;
|
|
|
1437
1669
|
const SearchApiFactory = function (configuration, basePath, axios) {
|
|
1438
1670
|
const localVarFp = (0, exports.SearchApiFp)(configuration);
|
|
1439
1671
|
return {
|
|
1672
|
+
/**
|
|
1673
|
+
* Execute multiple search queries in a single request. Each query is independent and can have its own filters, pagination, and sorting. Maximum 10 queries per request. **Authentication:** Send `x-storeid` and `x-storesecret` headers.
|
|
1674
|
+
* @summary Multi-Search (POST)
|
|
1675
|
+
* @param {string} xStoreid Store ID (from dashboard)
|
|
1676
|
+
* @param {string} xStoresecret Store read secret (from dashboard)
|
|
1677
|
+
* @param {DataTypesMultiSearchRequest} dataTypesMultiSearchRequest Array of search queries
|
|
1678
|
+
* @param {*} [options] Override http request option.
|
|
1679
|
+
* @throws {RequiredError}
|
|
1680
|
+
*/
|
|
1681
|
+
v1MultiSearchPost(xStoreid, xStoresecret, dataTypesMultiSearchRequest, options) {
|
|
1682
|
+
return localVarFp.v1MultiSearchPost(xStoreid, xStoresecret, dataTypesMultiSearchRequest, options).then((request) => request(axios, basePath));
|
|
1683
|
+
},
|
|
1440
1684
|
/**
|
|
1441
1685
|
* Same as POST search; all parameters are passed as query params. **Authentication:** `x-storeid` and `x-storesecret` headers. Use `q` for the search query; optional params: `page`, `per_page`, `filter_by`, `sort_by`, `facet_by`, `widget_mode`, `include_suggestions`, etc.
|
|
1442
1686
|
* @summary Search (GET)
|
|
@@ -1489,6 +1733,21 @@ const SearchApiFactory = function (configuration, basePath, axios) {
|
|
|
1489
1733
|
v1SearchGet(xStoreid, xStoresecret, q, xUserId, xAnonId, xSessionId, page, perPage, sortBy, filterBy, facetBy, maxFacetValues, widgetMode, includeSuggestions, suggestionsLimit, analyticsTags, stopwordSets, synonymSets, searchFields, returnFields, omitFields, snippetFields, fullSnippetFields, fieldWeights, groupField, groupSize, snippetPrefix, snippetSuffix, snippetTokenLimit, snippetMinLen, includeSnippets, prefixMode, infixMode, typoMax, typoMinLen1, typoMinLen2, searchTimeoutMs, requireAllTerms, exactMatchBoost, cacheResults, applyRules, presetName, facetSearchText, options) {
|
|
1490
1734
|
return localVarFp.v1SearchGet(xStoreid, xStoresecret, q, xUserId, xAnonId, xSessionId, page, perPage, sortBy, filterBy, facetBy, maxFacetValues, widgetMode, includeSuggestions, suggestionsLimit, analyticsTags, stopwordSets, synonymSets, searchFields, returnFields, omitFields, snippetFields, fullSnippetFields, fieldWeights, groupField, groupSize, snippetPrefix, snippetSuffix, snippetTokenLimit, snippetMinLen, includeSnippets, prefixMode, infixMode, typoMax, typoMinLen1, typoMinLen2, searchTimeoutMs, requireAllTerms, exactMatchBoost, cacheResults, applyRules, presetName, facetSearchText, options).then((request) => request(axios, basePath));
|
|
1491
1735
|
},
|
|
1736
|
+
/**
|
|
1737
|
+
* Run a full-text search for your store. **Authentication:** Send `x-storeid` and `x-storesecret` (from Seekora dashboard). Optional: `x-user-id`, `x-anon-id`, `x-session-id` for personalization. Supports pagination, filters, facets, sorting, snippets, and autocomplete suggestions. Use `widget_mode: true` for lightweight widget results.
|
|
1738
|
+
* @summary Search (POST)
|
|
1739
|
+
* @param {string} xStoreid Store ID (from dashboard)
|
|
1740
|
+
* @param {string} xStoresecret Store read secret (from dashboard)
|
|
1741
|
+
* @param {DataTypesSearchRequest} dataTypesSearchRequest Search query, filters, pagination, and options
|
|
1742
|
+
* @param {string} [xUserId] User ID for personalization
|
|
1743
|
+
* @param {string} [xAnonId] Anonymous user ID for personalization
|
|
1744
|
+
* @param {string} [xSessionId] Session ID for personalization
|
|
1745
|
+
* @param {*} [options] Override http request option.
|
|
1746
|
+
* @throws {RequiredError}
|
|
1747
|
+
*/
|
|
1748
|
+
v1SearchPost(xStoreid, xStoresecret, dataTypesSearchRequest, xUserId, xAnonId, xSessionId, options) {
|
|
1749
|
+
return localVarFp.v1SearchPost(xStoreid, xStoresecret, dataTypesSearchRequest, xUserId, xAnonId, xSessionId, options).then((request) => request(axios, basePath));
|
|
1750
|
+
},
|
|
1492
1751
|
};
|
|
1493
1752
|
};
|
|
1494
1753
|
exports.SearchApiFactory = SearchApiFactory;
|
|
@@ -1496,6 +1755,18 @@ exports.SearchApiFactory = SearchApiFactory;
|
|
|
1496
1755
|
* SearchApi - object-oriented interface
|
|
1497
1756
|
*/
|
|
1498
1757
|
class SearchApi extends base_1.BaseAPI {
|
|
1758
|
+
/**
|
|
1759
|
+
* Execute multiple search queries in a single request. Each query is independent and can have its own filters, pagination, and sorting. Maximum 10 queries per request. **Authentication:** Send `x-storeid` and `x-storesecret` headers.
|
|
1760
|
+
* @summary Multi-Search (POST)
|
|
1761
|
+
* @param {string} xStoreid Store ID (from dashboard)
|
|
1762
|
+
* @param {string} xStoresecret Store read secret (from dashboard)
|
|
1763
|
+
* @param {DataTypesMultiSearchRequest} dataTypesMultiSearchRequest Array of search queries
|
|
1764
|
+
* @param {*} [options] Override http request option.
|
|
1765
|
+
* @throws {RequiredError}
|
|
1766
|
+
*/
|
|
1767
|
+
v1MultiSearchPost(xStoreid, xStoresecret, dataTypesMultiSearchRequest, options) {
|
|
1768
|
+
return (0, exports.SearchApiFp)(this.configuration).v1MultiSearchPost(xStoreid, xStoresecret, dataTypesMultiSearchRequest, options).then((request) => request(this.axios, this.basePath));
|
|
1769
|
+
}
|
|
1499
1770
|
/**
|
|
1500
1771
|
* Same as POST search; all parameters are passed as query params. **Authentication:** `x-storeid` and `x-storesecret` headers. Use `q` for the search query; optional params: `page`, `per_page`, `filter_by`, `sort_by`, `facet_by`, `widget_mode`, `include_suggestions`, etc.
|
|
1501
1772
|
* @summary Search (GET)
|
|
@@ -1548,6 +1819,21 @@ class SearchApi extends base_1.BaseAPI {
|
|
|
1548
1819
|
v1SearchGet(xStoreid, xStoresecret, q, xUserId, xAnonId, xSessionId, page, perPage, sortBy, filterBy, facetBy, maxFacetValues, widgetMode, includeSuggestions, suggestionsLimit, analyticsTags, stopwordSets, synonymSets, searchFields, returnFields, omitFields, snippetFields, fullSnippetFields, fieldWeights, groupField, groupSize, snippetPrefix, snippetSuffix, snippetTokenLimit, snippetMinLen, includeSnippets, prefixMode, infixMode, typoMax, typoMinLen1, typoMinLen2, searchTimeoutMs, requireAllTerms, exactMatchBoost, cacheResults, applyRules, presetName, facetSearchText, options) {
|
|
1549
1820
|
return (0, exports.SearchApiFp)(this.configuration).v1SearchGet(xStoreid, xStoresecret, q, xUserId, xAnonId, xSessionId, page, perPage, sortBy, filterBy, facetBy, maxFacetValues, widgetMode, includeSuggestions, suggestionsLimit, analyticsTags, stopwordSets, synonymSets, searchFields, returnFields, omitFields, snippetFields, fullSnippetFields, fieldWeights, groupField, groupSize, snippetPrefix, snippetSuffix, snippetTokenLimit, snippetMinLen, includeSnippets, prefixMode, infixMode, typoMax, typoMinLen1, typoMinLen2, searchTimeoutMs, requireAllTerms, exactMatchBoost, cacheResults, applyRules, presetName, facetSearchText, options).then((request) => request(this.axios, this.basePath));
|
|
1550
1821
|
}
|
|
1822
|
+
/**
|
|
1823
|
+
* Run a full-text search for your store. **Authentication:** Send `x-storeid` and `x-storesecret` (from Seekora dashboard). Optional: `x-user-id`, `x-anon-id`, `x-session-id` for personalization. Supports pagination, filters, facets, sorting, snippets, and autocomplete suggestions. Use `widget_mode: true` for lightweight widget results.
|
|
1824
|
+
* @summary Search (POST)
|
|
1825
|
+
* @param {string} xStoreid Store ID (from dashboard)
|
|
1826
|
+
* @param {string} xStoresecret Store read secret (from dashboard)
|
|
1827
|
+
* @param {DataTypesSearchRequest} dataTypesSearchRequest Search query, filters, pagination, and options
|
|
1828
|
+
* @param {string} [xUserId] User ID for personalization
|
|
1829
|
+
* @param {string} [xAnonId] Anonymous user ID for personalization
|
|
1830
|
+
* @param {string} [xSessionId] Session ID for personalization
|
|
1831
|
+
* @param {*} [options] Override http request option.
|
|
1832
|
+
* @throws {RequiredError}
|
|
1833
|
+
*/
|
|
1834
|
+
v1SearchPost(xStoreid, xStoresecret, dataTypesSearchRequest, xUserId, xAnonId, xSessionId, options) {
|
|
1835
|
+
return (0, exports.SearchApiFp)(this.configuration).v1SearchPost(xStoreid, xStoresecret, dataTypesSearchRequest, xUserId, xAnonId, xSessionId, options).then((request) => request(this.axios, this.basePath));
|
|
1836
|
+
}
|
|
1551
1837
|
}
|
|
1552
1838
|
exports.SearchApi = SearchApi;
|
|
1553
1839
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Main entry point for the SDK
|
|
5
5
|
*/
|
|
6
|
-
export { SeekoraClient, type SeekoraClientConfig, type SearchOptions, type SearchResponse, type SearchContext, type ExtendedEventPayload, type QuerySuggestionsFullResponse, type FilterOptions, type FacetSearchOptions, type FilterValue, type FilterStats, type FilterField, type FiltersResponse, type FacetValuesSearchResponse, type FilterSchemaField, type FiltersSchemaResponse } from './client';
|
|
6
|
+
export { SeekoraClient, type SeekoraClientConfig, type SearchOptions, type SearchResponse, type SearchContext, type MultiSearchQuery, type MultiSearchResponse, type ExtendedEventPayload, type QuerySuggestionsFullResponse, type FilterOptions, type FacetSearchOptions, type FilterValue, type FilterStats, type FilterField, type FiltersResponse, type FacetValuesSearchResponse, type FilterSchemaField, type FiltersSchemaResponse } from './client';
|
|
7
7
|
export type { SeekoraEnvironment } from './config';
|
|
8
8
|
export { ENVIRONMENTS, getBaseUrl, getEnvironment, type EnvironmentConfig } from './config';
|
|
9
9
|
export { Logger, createLogger, getLogLevelFromEnv, type LogLevel, type LoggerConfig } from './logger';
|