@seekora-ai/search-sdk 0.2.15 → 0.2.17
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 +4 -17
- package/dist/client.js +21 -136
- package/dist/generated/api.d.ts +1679 -11946
- package/dist/generated/api.js +1020 -2217
- package/dist/generated/base.d.ts +1 -1
- package/dist/generated/base.js +1 -1
- package/dist/generated/common.d.ts +1 -1
- package/dist/generated/common.js +1 -1
- package/dist/generated/configuration.d.ts +1 -1
- package/dist/generated/configuration.js +1 -1
- package/dist/generated/index.d.ts +1 -1
- package/dist/generated/index.js +1 -1
- package/package.json +1 -1
package/dist/generated/api.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/* eslint-disable */
|
|
4
4
|
/**
|
|
5
5
|
* Seekora APIs
|
|
6
|
-
* Seekora provides search, suggestions, and store management APIs.
|
|
6
|
+
* Seekora provides search, suggestions, and store management APIs.
|
|
7
7
|
*
|
|
8
8
|
* The version of the OpenAPI document: 1.0
|
|
9
9
|
*
|
|
@@ -16,205 +16,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
16
16
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
17
17
|
};
|
|
18
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
-
exports.
|
|
20
|
-
exports.SearchApi = exports.SearchApiFactory = exports.SearchApiFp = exports.SearchApiAxiosParamCreator = exports.SDKStoreInfoApi = exports.SDKStoreInfoApiFactory = exports.SDKStoreInfoApiFp = exports.SDKStoreInfoApiAxiosParamCreator = exports.SDKStoreCreationApi = exports.SDKStoreCreationApiFactory = exports.SDKStoreCreationApiFp = exports.SDKStoreCreationApiAxiosParamCreator = exports.SDKStoreConfigApi = exports.SDKStoreConfigApiFactory = exports.SDKStoreConfigApiFp = exports.SDKStoreConfigApiAxiosParamCreator = exports.SDKSchemaApi = exports.SDKSchemaApiFactory = exports.SDKSchemaApiFp = exports.SDKSchemaApiAxiosParamCreator = exports.SDKQuerySuggestionsConfigApi = exports.SDKQuerySuggestionsConfigApiFactory = exports.SDKQuerySuggestionsConfigApiFp = exports.SDKQuerySuggestionsConfigApiAxiosParamCreator = exports.SDKExperimentsApi = exports.SDKExperimentsApiFactory = exports.SDKExperimentsApiFp = exports.SDKExperimentsApiAxiosParamCreator = exports.SDKDocumentsApi = exports.SDKDocumentsApiFactory = exports.SDKDocumentsApiFp = exports.SDKDocumentsApiAxiosParamCreator = exports.V1SuggestionsQueriesGetTimeRangeEnum = exports.V1SuggestionsQueriesGetTagsMatchModeEnum = exports.QuerySuggestionsApi = exports.QuerySuggestionsApiFactory = exports.QuerySuggestionsApiFp = exports.QuerySuggestionsApiAxiosParamCreator = exports.FiltersApi = exports.FiltersApiFactory = exports.FiltersApiFp = exports.FiltersApiAxiosParamCreator = exports.AnalyticsEventsApi = exports.AnalyticsEventsApiFactory = void 0;
|
|
19
|
+
exports.StoreManagementApi = exports.StoreManagementApiFactory = exports.StoreManagementApiFp = exports.StoreManagementApiAxiosParamCreator = exports.SearchApi = exports.SearchApiFactory = exports.SearchApiFp = exports.SearchApiAxiosParamCreator = exports.V1SuggestionsQueriesGetTimeRangeEnum = exports.V1SuggestionsQueriesGetTagsMatchModeEnum = exports.QuerySuggestionsApi = exports.QuerySuggestionsApiFactory = exports.QuerySuggestionsApiFp = exports.QuerySuggestionsApiAxiosParamCreator = exports.FiltersApi = exports.FiltersApiFactory = exports.FiltersApiFp = exports.FiltersApiAxiosParamCreator = exports.AnalyticsEventsApi = exports.AnalyticsEventsApiFactory = exports.AnalyticsEventsApiFp = exports.AnalyticsEventsApiAxiosParamCreator = exports.QuerySuggestionsServiceRuleType = exports.QuerySuggestionsServiceBannedMatchType = void 0;
|
|
21
20
|
const axios_1 = __importDefault(require("axios"));
|
|
22
21
|
// Some imports not used depending on template conditions
|
|
23
22
|
// @ts-ignore
|
|
24
23
|
const common_1 = require("./common");
|
|
25
24
|
// @ts-ignore
|
|
26
25
|
const base_1 = require("./base");
|
|
27
|
-
exports.AnalyticsRuleType = {
|
|
28
|
-
RuleTypeFreshness: 'freshness',
|
|
29
|
-
RuleTypeVolume: 'volume',
|
|
30
|
-
RuleTypeSchema: 'schema',
|
|
31
|
-
RuleTypeAnomaly: 'anomaly',
|
|
32
|
-
RuleTypeCardinality: 'cardinality',
|
|
33
|
-
RuleTypeCompleteness: 'completeness',
|
|
34
|
-
RuleTypeCustom: 'custom'
|
|
35
|
-
};
|
|
36
|
-
exports.AnalyticsThresholdType = {
|
|
37
|
-
ThresholdMin: 'min',
|
|
38
|
-
ThresholdMax: 'max',
|
|
39
|
-
ThresholdRange: 'range',
|
|
40
|
-
ThresholdStdDev: 'stddev'
|
|
41
|
-
};
|
|
42
|
-
exports.ConnectorsCreateConnectorRequestConnectorTypeEnum = {
|
|
43
|
-
Import: 'import',
|
|
44
|
-
Export: 'export'
|
|
45
|
-
};
|
|
46
|
-
exports.DataTypesAcceptInvitationWithOAuthRequestTypeEnum = {
|
|
47
|
-
Google: 'google',
|
|
48
|
-
Github: 'github'
|
|
49
|
-
};
|
|
50
|
-
exports.DataTypesBillingAlertRequestAlertTypeEnum = {
|
|
51
|
-
LowBalance: 'low_balance',
|
|
52
|
-
DaysRemaining: 'days_remaining'
|
|
53
|
-
};
|
|
54
|
-
exports.DataTypesBillingAlertRequestThresholdUnitEnum = {
|
|
55
|
-
Credits: 'credits',
|
|
56
|
-
Days: 'days',
|
|
57
|
-
Percentage: 'percentage'
|
|
58
|
-
};
|
|
59
|
-
exports.DataTypesCreateCustomWordListRequestTypeEnum = {
|
|
60
|
-
Stopwords: 'stopwords',
|
|
61
|
-
Synonyms: 'synonyms'
|
|
62
|
-
};
|
|
63
|
-
exports.DataTypesCreatePaymentOrderRequestPaymentTypeEnum = {
|
|
64
|
-
Generic: 'generic',
|
|
65
|
-
Subscription: 'subscription',
|
|
66
|
-
CreditTopup: 'credit_topup'
|
|
67
|
-
};
|
|
68
|
-
exports.DataTypesCreatePluralDeclensionRequestTypeEnum = {
|
|
69
|
-
Custom: 'custom',
|
|
70
|
-
Default: 'default'
|
|
71
|
-
};
|
|
72
|
-
exports.DataTypesCreateRefundRequestDtoRefundTypeEnum = {
|
|
73
|
-
Full: 'full',
|
|
74
|
-
Partial: 'partial',
|
|
75
|
-
CreditOnly: 'credit_only'
|
|
76
|
-
};
|
|
77
|
-
exports.DataTypesCreateTaskRequestFrequencyEnum = {
|
|
78
|
-
Once: 'once',
|
|
79
|
-
Hourly: 'hourly',
|
|
80
|
-
Daily: 'daily',
|
|
81
|
-
Weekly: 'weekly'
|
|
82
|
-
};
|
|
83
|
-
exports.DataTypesCreateTaskRequestIndexingStrategyEnum = {
|
|
84
|
-
Replace: 'replace',
|
|
85
|
-
Upsert: 'upsert',
|
|
86
|
-
InsertOnly: 'insert_only',
|
|
87
|
-
UpdateOnly: 'update_only'
|
|
88
|
-
};
|
|
89
|
-
exports.DataTypesCreateTaskRequestTypeEnum = {
|
|
90
|
-
UrlCsv: 'url_csv',
|
|
91
|
-
Webhook: 'webhook',
|
|
92
|
-
Manual: 'manual',
|
|
93
|
-
PluginConnector: 'plugin_connector'
|
|
94
|
-
};
|
|
95
|
-
exports.DataTypesExperimentStatus = {
|
|
96
|
-
ExperimentStatusDraft: 'draft',
|
|
97
|
-
ExperimentStatusScheduled: 'scheduled',
|
|
98
|
-
ExperimentStatusRunning: 'running',
|
|
99
|
-
ExperimentStatusPaused: 'paused',
|
|
100
|
-
ExperimentStatusCompleted: 'completed',
|
|
101
|
-
ExperimentStatusArchived: 'archived'
|
|
102
|
-
};
|
|
103
|
-
exports.DataTypesExperimentType = {
|
|
104
|
-
ExperimentTypeSearchRanking: 'search_ranking',
|
|
105
|
-
ExperimentTypeRecommendation: 'recommendation',
|
|
106
|
-
ExperimentTypePersonalization: 'personalization',
|
|
107
|
-
ExperimentTypeUI: 'ui',
|
|
108
|
-
ExperimentTypePricing: 'pricing',
|
|
109
|
-
ExperimentTypeOther: 'other'
|
|
110
|
-
};
|
|
111
|
-
exports.DataTypesGrantStoreAccessRequestAccessLevelEnum = {
|
|
112
|
-
Read: 'read',
|
|
113
|
-
Write: 'write',
|
|
114
|
-
Admin: 'admin'
|
|
115
|
-
};
|
|
116
|
-
exports.DataTypesNotificationChannel = {
|
|
117
|
-
ChannelEmail: 'email',
|
|
118
|
-
ChannelSMS: 'sms',
|
|
119
|
-
ChannelPush: 'push',
|
|
120
|
-
ChannelWebSocket: 'websocket',
|
|
121
|
-
ChannelWhatsApp: 'whatsapp'
|
|
122
|
-
};
|
|
123
|
-
exports.DataTypesNotificationPriority = {
|
|
124
|
-
PriorityLow: 'low',
|
|
125
|
-
PriorityNormal: 'normal',
|
|
126
|
-
PriorityHigh: 'high',
|
|
127
|
-
PriorityCritical: 'critical'
|
|
128
|
-
};
|
|
129
|
-
exports.DataTypesNotificationStatus = {
|
|
130
|
-
StatusPending: 'pending',
|
|
131
|
-
StatusProcessing: 'processing',
|
|
132
|
-
StatusSent: 'sent',
|
|
133
|
-
StatusDelivered: 'delivered',
|
|
134
|
-
StatusFailed: 'failed',
|
|
135
|
-
StatusRead: 'read',
|
|
136
|
-
StatusScheduled: 'scheduled',
|
|
137
|
-
StatusCancelled: 'cancelled'
|
|
138
|
-
};
|
|
139
|
-
exports.DataTypesNotificationType = {
|
|
140
|
-
TypeSystem: 'system',
|
|
141
|
-
TypeAlert: 'alert',
|
|
142
|
-
TypeInfo: 'info',
|
|
143
|
-
TypeWarning: 'warning',
|
|
144
|
-
TypeError: 'error',
|
|
145
|
-
TypeSuccess: 'success',
|
|
146
|
-
TypeMarketing: 'marketing',
|
|
147
|
-
TypeTransactional: 'transactional',
|
|
148
|
-
TypeSecurity: 'security',
|
|
149
|
-
TypeBilling: 'billing',
|
|
150
|
-
TypeOrder: 'order',
|
|
151
|
-
TypeProduct: 'product',
|
|
152
|
-
TypeCustom: 'custom'
|
|
153
|
-
};
|
|
154
|
-
exports.DataTypesProcessRefundRequestDtoRefundTypeEnum = {
|
|
155
|
-
Full: 'full',
|
|
156
|
-
Partial: 'partial',
|
|
157
|
-
RemainingCredits: 'remaining_credits'
|
|
158
|
-
};
|
|
159
|
-
exports.DataTypesRefundApprovalDtoActionEnum = {
|
|
160
|
-
Approve: 'approve',
|
|
161
|
-
Reject: 'reject'
|
|
162
|
-
};
|
|
163
|
-
exports.DataTypesRefundCalculationRequestDtoRefundTypeEnum = {
|
|
164
|
-
Full: 'full',
|
|
165
|
-
Partial: 'partial',
|
|
166
|
-
RemainingCredits: 'remaining_credits'
|
|
167
|
-
};
|
|
168
|
-
exports.DataTypesStoreAccessRequestAccessLevelEnum = {
|
|
169
|
-
Read: 'read',
|
|
170
|
-
Write: 'write',
|
|
171
|
-
Admin: 'admin'
|
|
172
|
-
};
|
|
173
|
-
exports.DataTypesStoreLevelMenuRightAccessLevelEnum = {
|
|
174
|
-
Read: 'read',
|
|
175
|
-
Write: 'write',
|
|
176
|
-
Admin: 'admin'
|
|
177
|
-
};
|
|
178
|
-
exports.DataTypesUpdateMemberRoleRequestMemberRoleEnum = {
|
|
179
|
-
Owner: 'owner',
|
|
180
|
-
Admin: 'admin',
|
|
181
|
-
Member: 'member'
|
|
182
|
-
};
|
|
183
|
-
exports.DataTypesUpdatePluralDeclensionRequestTypeEnum = {
|
|
184
|
-
Custom: 'custom',
|
|
185
|
-
Default: 'default'
|
|
186
|
-
};
|
|
187
|
-
exports.DataTypesUpdateStoreAccessRequestAccessLevelEnum = {
|
|
188
|
-
Read: 'read',
|
|
189
|
-
Write: 'write',
|
|
190
|
-
Admin: 'admin'
|
|
191
|
-
};
|
|
192
|
-
exports.DataTypesUpdateWordStatusRequestWordTypeEnum = {
|
|
193
|
-
Default: 'default',
|
|
194
|
-
StoreLanguage: 'store_language',
|
|
195
|
-
Custom: 'custom'
|
|
196
|
-
};
|
|
197
|
-
exports.MenuRoutesAddMenuRequestMenuLevelEnum = {
|
|
198
|
-
Org: 'org',
|
|
199
|
-
Store: 'store'
|
|
200
|
-
};
|
|
201
|
-
exports.MenuRoutesAddMenuRequestMenuLocationEnum = {
|
|
202
|
-
Navbar: 'navbar',
|
|
203
|
-
ProfileDropdown: 'profile_dropdown'
|
|
204
|
-
};
|
|
205
|
-
exports.MenuRoutesAddMenuRequestModuleTypeEnum = {
|
|
206
|
-
Admin: 'Admin',
|
|
207
|
-
Search: 'Search',
|
|
208
|
-
Billing: 'Billing'
|
|
209
|
-
};
|
|
210
|
-
exports.ModelsCreateCustomEventFieldRequestFieldTypeEnum = {
|
|
211
|
-
String: 'string',
|
|
212
|
-
Number: 'number',
|
|
213
|
-
Boolean: 'boolean',
|
|
214
|
-
Datetime: 'datetime',
|
|
215
|
-
Array: 'array',
|
|
216
|
-
Object: 'object'
|
|
217
|
-
};
|
|
218
26
|
exports.QuerySuggestionsServiceBannedMatchType = {
|
|
219
27
|
BannedMatchIs: 'is',
|
|
220
28
|
BannedMatchContains: 'contains',
|
|
@@ -222,416 +30,12 @@ exports.QuerySuggestionsServiceBannedMatchType = {
|
|
|
222
30
|
BannedMatchEndsWith: 'endsWith',
|
|
223
31
|
BannedMatchCustom: 'custom'
|
|
224
32
|
};
|
|
225
|
-
exports.QuerySuggestionsServiceBulkOperation = {
|
|
226
|
-
BulkEnable: 'enable',
|
|
227
|
-
BulkDisable: 'disable',
|
|
228
|
-
BulkDelete: 'delete',
|
|
229
|
-
BulkUpdatePriority: 'update_priority'
|
|
230
|
-
};
|
|
231
|
-
exports.QuerySuggestionsServiceQuerySuggestionSource = {
|
|
232
|
-
SourceAutoGenerated: 'auto_generated',
|
|
233
|
-
SourceManual: 'manual',
|
|
234
|
-
SourceImported: 'imported'
|
|
235
|
-
};
|
|
236
|
-
exports.QuerySuggestionsServiceQuerySuggestionStatus = {
|
|
237
|
-
StatusEnabled: 'enabled',
|
|
238
|
-
StatusDisabled: 'disabled'
|
|
239
|
-
};
|
|
240
33
|
exports.QuerySuggestionsServiceRuleType = {
|
|
241
34
|
RuleTypePromote: 'promote',
|
|
242
35
|
RuleTypeHide: 'hide',
|
|
243
36
|
RuleTypeRedirect: 'redirect',
|
|
244
37
|
RuleTypeBanner: 'banner'
|
|
245
38
|
};
|
|
246
|
-
exports.RefundRefundPreviewRequestDtoRefundTypeEnum = {
|
|
247
|
-
Full: 'full',
|
|
248
|
-
Partial: 'partial',
|
|
249
|
-
RemainingCredits: 'remaining_credits'
|
|
250
|
-
};
|
|
251
|
-
/**
|
|
252
|
-
* ActivityLogsApi - axios parameter creator
|
|
253
|
-
*/
|
|
254
|
-
const ActivityLogsApiAxiosParamCreator = function (configuration) {
|
|
255
|
-
return {
|
|
256
|
-
/**
|
|
257
|
-
* Retrieve user activity logs from ClickHouse fact_events table with full filtering, search, and pagination.
|
|
258
|
-
* @summary Get Activity Logs
|
|
259
|
-
* @param {string} [startDate] Start date (ISO 8601 format)
|
|
260
|
-
* @param {string} [endDate] End date (ISO 8601 format)
|
|
261
|
-
* @param {string} [search] Search text (matches description, username, email, resource_type, resource_id)
|
|
262
|
-
* @param {AnalyticsActivityLogsGetActionEnum} [action] Action filter
|
|
263
|
-
* @param {string} [entity] Entity type filter
|
|
264
|
-
* @param {number} [page] Page number (default: 1)
|
|
265
|
-
* @param {number} [perPage] Results per page (default: 50, max: 1000)
|
|
266
|
-
* @param {*} [options] Override http request option.
|
|
267
|
-
* @throws {RequiredError}
|
|
268
|
-
*/
|
|
269
|
-
analyticsActivityLogsGet: async (startDate, endDate, search, action, entity, page, perPage, options = {}) => {
|
|
270
|
-
const localVarPath = `/analytics/activity-logs`;
|
|
271
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
272
|
-
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
273
|
-
let baseOptions;
|
|
274
|
-
if (configuration) {
|
|
275
|
-
baseOptions = configuration.baseOptions;
|
|
276
|
-
}
|
|
277
|
-
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
278
|
-
const localVarHeaderParameter = {};
|
|
279
|
-
const localVarQueryParameter = {};
|
|
280
|
-
// authentication BearerAuth required
|
|
281
|
-
await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
|
|
282
|
-
if (startDate !== undefined) {
|
|
283
|
-
localVarQueryParameter['start_date'] = startDate;
|
|
284
|
-
}
|
|
285
|
-
if (endDate !== undefined) {
|
|
286
|
-
localVarQueryParameter['end_date'] = endDate;
|
|
287
|
-
}
|
|
288
|
-
if (search !== undefined) {
|
|
289
|
-
localVarQueryParameter['search'] = search;
|
|
290
|
-
}
|
|
291
|
-
if (action !== undefined) {
|
|
292
|
-
localVarQueryParameter['action'] = action;
|
|
293
|
-
}
|
|
294
|
-
if (entity !== undefined) {
|
|
295
|
-
localVarQueryParameter['entity'] = entity;
|
|
296
|
-
}
|
|
297
|
-
if (page !== undefined) {
|
|
298
|
-
localVarQueryParameter['page'] = page;
|
|
299
|
-
}
|
|
300
|
-
if (perPage !== undefined) {
|
|
301
|
-
localVarQueryParameter['per_page'] = perPage;
|
|
302
|
-
}
|
|
303
|
-
localVarHeaderParameter['Accept'] = 'application/json';
|
|
304
|
-
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
305
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
306
|
-
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
307
|
-
return {
|
|
308
|
-
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
309
|
-
options: localVarRequestOptions,
|
|
310
|
-
};
|
|
311
|
-
},
|
|
312
|
-
};
|
|
313
|
-
};
|
|
314
|
-
exports.ActivityLogsApiAxiosParamCreator = ActivityLogsApiAxiosParamCreator;
|
|
315
|
-
/**
|
|
316
|
-
* ActivityLogsApi - functional programming interface
|
|
317
|
-
*/
|
|
318
|
-
const ActivityLogsApiFp = function (configuration) {
|
|
319
|
-
const localVarAxiosParamCreator = (0, exports.ActivityLogsApiAxiosParamCreator)(configuration);
|
|
320
|
-
return {
|
|
321
|
-
/**
|
|
322
|
-
* Retrieve user activity logs from ClickHouse fact_events table with full filtering, search, and pagination.
|
|
323
|
-
* @summary Get Activity Logs
|
|
324
|
-
* @param {string} [startDate] Start date (ISO 8601 format)
|
|
325
|
-
* @param {string} [endDate] End date (ISO 8601 format)
|
|
326
|
-
* @param {string} [search] Search text (matches description, username, email, resource_type, resource_id)
|
|
327
|
-
* @param {AnalyticsActivityLogsGetActionEnum} [action] Action filter
|
|
328
|
-
* @param {string} [entity] Entity type filter
|
|
329
|
-
* @param {number} [page] Page number (default: 1)
|
|
330
|
-
* @param {number} [perPage] Results per page (default: 50, max: 1000)
|
|
331
|
-
* @param {*} [options] Override http request option.
|
|
332
|
-
* @throws {RequiredError}
|
|
333
|
-
*/
|
|
334
|
-
async analyticsActivityLogsGet(startDate, endDate, search, action, entity, page, perPage, options) {
|
|
335
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.analyticsActivityLogsGet(startDate, endDate, search, action, entity, page, perPage, options);
|
|
336
|
-
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
337
|
-
const localVarOperationServerBasePath = base_1.operationServerMap['ActivityLogsApi.analyticsActivityLogsGet']?.[localVarOperationServerIndex]?.url;
|
|
338
|
-
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
339
|
-
},
|
|
340
|
-
};
|
|
341
|
-
};
|
|
342
|
-
exports.ActivityLogsApiFp = ActivityLogsApiFp;
|
|
343
|
-
/**
|
|
344
|
-
* ActivityLogsApi - factory interface
|
|
345
|
-
*/
|
|
346
|
-
const ActivityLogsApiFactory = function (configuration, basePath, axios) {
|
|
347
|
-
const localVarFp = (0, exports.ActivityLogsApiFp)(configuration);
|
|
348
|
-
return {
|
|
349
|
-
/**
|
|
350
|
-
* Retrieve user activity logs from ClickHouse fact_events table with full filtering, search, and pagination.
|
|
351
|
-
* @summary Get Activity Logs
|
|
352
|
-
* @param {string} [startDate] Start date (ISO 8601 format)
|
|
353
|
-
* @param {string} [endDate] End date (ISO 8601 format)
|
|
354
|
-
* @param {string} [search] Search text (matches description, username, email, resource_type, resource_id)
|
|
355
|
-
* @param {AnalyticsActivityLogsGetActionEnum} [action] Action filter
|
|
356
|
-
* @param {string} [entity] Entity type filter
|
|
357
|
-
* @param {number} [page] Page number (default: 1)
|
|
358
|
-
* @param {number} [perPage] Results per page (default: 50, max: 1000)
|
|
359
|
-
* @param {*} [options] Override http request option.
|
|
360
|
-
* @throws {RequiredError}
|
|
361
|
-
*/
|
|
362
|
-
analyticsActivityLogsGet(startDate, endDate, search, action, entity, page, perPage, options) {
|
|
363
|
-
return localVarFp.analyticsActivityLogsGet(startDate, endDate, search, action, entity, page, perPage, options).then((request) => request(axios, basePath));
|
|
364
|
-
},
|
|
365
|
-
};
|
|
366
|
-
};
|
|
367
|
-
exports.ActivityLogsApiFactory = ActivityLogsApiFactory;
|
|
368
|
-
/**
|
|
369
|
-
* ActivityLogsApi - object-oriented interface
|
|
370
|
-
*/
|
|
371
|
-
class ActivityLogsApi extends base_1.BaseAPI {
|
|
372
|
-
/**
|
|
373
|
-
* Retrieve user activity logs from ClickHouse fact_events table with full filtering, search, and pagination.
|
|
374
|
-
* @summary Get Activity Logs
|
|
375
|
-
* @param {string} [startDate] Start date (ISO 8601 format)
|
|
376
|
-
* @param {string} [endDate] End date (ISO 8601 format)
|
|
377
|
-
* @param {string} [search] Search text (matches description, username, email, resource_type, resource_id)
|
|
378
|
-
* @param {AnalyticsActivityLogsGetActionEnum} [action] Action filter
|
|
379
|
-
* @param {string} [entity] Entity type filter
|
|
380
|
-
* @param {number} [page] Page number (default: 1)
|
|
381
|
-
* @param {number} [perPage] Results per page (default: 50, max: 1000)
|
|
382
|
-
* @param {*} [options] Override http request option.
|
|
383
|
-
* @throws {RequiredError}
|
|
384
|
-
*/
|
|
385
|
-
analyticsActivityLogsGet(startDate, endDate, search, action, entity, page, perPage, options) {
|
|
386
|
-
return (0, exports.ActivityLogsApiFp)(this.configuration).analyticsActivityLogsGet(startDate, endDate, search, action, entity, page, perPage, options).then((request) => request(this.axios, this.basePath));
|
|
387
|
-
}
|
|
388
|
-
}
|
|
389
|
-
exports.ActivityLogsApi = ActivityLogsApi;
|
|
390
|
-
exports.AnalyticsActivityLogsGetActionEnum = {
|
|
391
|
-
Create: 'create',
|
|
392
|
-
Update: 'update',
|
|
393
|
-
Delete: 'delete',
|
|
394
|
-
Upload: 'upload'
|
|
395
|
-
};
|
|
396
|
-
/**
|
|
397
|
-
* AnalyticsApi - axios parameter creator
|
|
398
|
-
*/
|
|
399
|
-
const AnalyticsApiAxiosParamCreator = function (configuration) {
|
|
400
|
-
return {
|
|
401
|
-
/**
|
|
402
|
-
* Retrieve API usage logs from ClickHouse fact_events table with filtering and pagination
|
|
403
|
-
* @summary Get API Usage Logs
|
|
404
|
-
* @param {string} [startDate] Start date (ISO 8601 format)
|
|
405
|
-
* @param {string} [endDate] End date (ISO 8601 format)
|
|
406
|
-
* @param {string} [method] HTTP method filter
|
|
407
|
-
* @param {string} [path] Path filter (partial match)
|
|
408
|
-
* @param {string} [storeId] Store ID filter
|
|
409
|
-
* @param {number} [page] Page number (default: 1)
|
|
410
|
-
* @param {number} [perPage] Results per page (default: 100, max: 1000)
|
|
411
|
-
* @param {*} [options] Override http request option.
|
|
412
|
-
* @throws {RequiredError}
|
|
413
|
-
*/
|
|
414
|
-
analyticsApiUsageGet: async (startDate, endDate, method, path, storeId, page, perPage, options = {}) => {
|
|
415
|
-
const localVarPath = `/analytics/api-usage`;
|
|
416
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
417
|
-
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
418
|
-
let baseOptions;
|
|
419
|
-
if (configuration) {
|
|
420
|
-
baseOptions = configuration.baseOptions;
|
|
421
|
-
}
|
|
422
|
-
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
423
|
-
const localVarHeaderParameter = {};
|
|
424
|
-
const localVarQueryParameter = {};
|
|
425
|
-
// authentication BearerAuth required
|
|
426
|
-
await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
|
|
427
|
-
if (startDate !== undefined) {
|
|
428
|
-
localVarQueryParameter['start_date'] = startDate;
|
|
429
|
-
}
|
|
430
|
-
if (endDate !== undefined) {
|
|
431
|
-
localVarQueryParameter['end_date'] = endDate;
|
|
432
|
-
}
|
|
433
|
-
if (method !== undefined) {
|
|
434
|
-
localVarQueryParameter['method'] = method;
|
|
435
|
-
}
|
|
436
|
-
if (path !== undefined) {
|
|
437
|
-
localVarQueryParameter['path'] = path;
|
|
438
|
-
}
|
|
439
|
-
if (storeId !== undefined) {
|
|
440
|
-
localVarQueryParameter['store_id'] = storeId;
|
|
441
|
-
}
|
|
442
|
-
if (page !== undefined) {
|
|
443
|
-
localVarQueryParameter['page'] = page;
|
|
444
|
-
}
|
|
445
|
-
if (perPage !== undefined) {
|
|
446
|
-
localVarQueryParameter['per_page'] = perPage;
|
|
447
|
-
}
|
|
448
|
-
localVarHeaderParameter['Accept'] = 'application/json';
|
|
449
|
-
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
450
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
451
|
-
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
452
|
-
return {
|
|
453
|
-
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
454
|
-
options: localVarRequestOptions,
|
|
455
|
-
};
|
|
456
|
-
},
|
|
457
|
-
/**
|
|
458
|
-
* Retrieve API usage logs for a specific store from ClickHouse
|
|
459
|
-
* @summary Get Store API Usage Logs
|
|
460
|
-
* @param {string} storeId Store ID
|
|
461
|
-
* @param {string} [startDate] Start date (ISO 8601 format)
|
|
462
|
-
* @param {string} [endDate] End date (ISO 8601 format)
|
|
463
|
-
* @param {string} [method] HTTP method filter
|
|
464
|
-
* @param {number} [page] Page number (default: 1)
|
|
465
|
-
* @param {number} [perPage] Results per page (default: 100, max: 1000)
|
|
466
|
-
* @param {*} [options] Override http request option.
|
|
467
|
-
* @throws {RequiredError}
|
|
468
|
-
*/
|
|
469
|
-
analyticsApiUsageStoreStoreIdGet: async (storeId, startDate, endDate, method, page, perPage, options = {}) => {
|
|
470
|
-
// verify required parameter 'storeId' is not null or undefined
|
|
471
|
-
(0, common_1.assertParamExists)('analyticsApiUsageStoreStoreIdGet', 'storeId', storeId);
|
|
472
|
-
const localVarPath = `/analytics/api-usage/store/{storeId}`
|
|
473
|
-
.replace(`{${"storeId"}}`, encodeURIComponent(String(storeId)));
|
|
474
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
475
|
-
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
476
|
-
let baseOptions;
|
|
477
|
-
if (configuration) {
|
|
478
|
-
baseOptions = configuration.baseOptions;
|
|
479
|
-
}
|
|
480
|
-
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
481
|
-
const localVarHeaderParameter = {};
|
|
482
|
-
const localVarQueryParameter = {};
|
|
483
|
-
// authentication BearerAuth required
|
|
484
|
-
await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
|
|
485
|
-
if (startDate !== undefined) {
|
|
486
|
-
localVarQueryParameter['start_date'] = startDate;
|
|
487
|
-
}
|
|
488
|
-
if (endDate !== undefined) {
|
|
489
|
-
localVarQueryParameter['end_date'] = endDate;
|
|
490
|
-
}
|
|
491
|
-
if (method !== undefined) {
|
|
492
|
-
localVarQueryParameter['method'] = method;
|
|
493
|
-
}
|
|
494
|
-
if (page !== undefined) {
|
|
495
|
-
localVarQueryParameter['page'] = page;
|
|
496
|
-
}
|
|
497
|
-
if (perPage !== undefined) {
|
|
498
|
-
localVarQueryParameter['per_page'] = perPage;
|
|
499
|
-
}
|
|
500
|
-
localVarHeaderParameter['Accept'] = 'application/json';
|
|
501
|
-
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
502
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
503
|
-
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
504
|
-
return {
|
|
505
|
-
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
506
|
-
options: localVarRequestOptions,
|
|
507
|
-
};
|
|
508
|
-
},
|
|
509
|
-
};
|
|
510
|
-
};
|
|
511
|
-
exports.AnalyticsApiAxiosParamCreator = AnalyticsApiAxiosParamCreator;
|
|
512
|
-
/**
|
|
513
|
-
* AnalyticsApi - functional programming interface
|
|
514
|
-
*/
|
|
515
|
-
const AnalyticsApiFp = function (configuration) {
|
|
516
|
-
const localVarAxiosParamCreator = (0, exports.AnalyticsApiAxiosParamCreator)(configuration);
|
|
517
|
-
return {
|
|
518
|
-
/**
|
|
519
|
-
* Retrieve API usage logs from ClickHouse fact_events table with filtering and pagination
|
|
520
|
-
* @summary Get API Usage Logs
|
|
521
|
-
* @param {string} [startDate] Start date (ISO 8601 format)
|
|
522
|
-
* @param {string} [endDate] End date (ISO 8601 format)
|
|
523
|
-
* @param {string} [method] HTTP method filter
|
|
524
|
-
* @param {string} [path] Path filter (partial match)
|
|
525
|
-
* @param {string} [storeId] Store ID filter
|
|
526
|
-
* @param {number} [page] Page number (default: 1)
|
|
527
|
-
* @param {number} [perPage] Results per page (default: 100, max: 1000)
|
|
528
|
-
* @param {*} [options] Override http request option.
|
|
529
|
-
* @throws {RequiredError}
|
|
530
|
-
*/
|
|
531
|
-
async analyticsApiUsageGet(startDate, endDate, method, path, storeId, page, perPage, options) {
|
|
532
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.analyticsApiUsageGet(startDate, endDate, method, path, storeId, page, perPage, options);
|
|
533
|
-
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
534
|
-
const localVarOperationServerBasePath = base_1.operationServerMap['AnalyticsApi.analyticsApiUsageGet']?.[localVarOperationServerIndex]?.url;
|
|
535
|
-
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
536
|
-
},
|
|
537
|
-
/**
|
|
538
|
-
* Retrieve API usage logs for a specific store from ClickHouse
|
|
539
|
-
* @summary Get Store API Usage Logs
|
|
540
|
-
* @param {string} storeId Store ID
|
|
541
|
-
* @param {string} [startDate] Start date (ISO 8601 format)
|
|
542
|
-
* @param {string} [endDate] End date (ISO 8601 format)
|
|
543
|
-
* @param {string} [method] HTTP method filter
|
|
544
|
-
* @param {number} [page] Page number (default: 1)
|
|
545
|
-
* @param {number} [perPage] Results per page (default: 100, max: 1000)
|
|
546
|
-
* @param {*} [options] Override http request option.
|
|
547
|
-
* @throws {RequiredError}
|
|
548
|
-
*/
|
|
549
|
-
async analyticsApiUsageStoreStoreIdGet(storeId, startDate, endDate, method, page, perPage, options) {
|
|
550
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.analyticsApiUsageStoreStoreIdGet(storeId, startDate, endDate, method, page, perPage, options);
|
|
551
|
-
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
552
|
-
const localVarOperationServerBasePath = base_1.operationServerMap['AnalyticsApi.analyticsApiUsageStoreStoreIdGet']?.[localVarOperationServerIndex]?.url;
|
|
553
|
-
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
554
|
-
},
|
|
555
|
-
};
|
|
556
|
-
};
|
|
557
|
-
exports.AnalyticsApiFp = AnalyticsApiFp;
|
|
558
|
-
/**
|
|
559
|
-
* AnalyticsApi - factory interface
|
|
560
|
-
*/
|
|
561
|
-
const AnalyticsApiFactory = function (configuration, basePath, axios) {
|
|
562
|
-
const localVarFp = (0, exports.AnalyticsApiFp)(configuration);
|
|
563
|
-
return {
|
|
564
|
-
/**
|
|
565
|
-
* Retrieve API usage logs from ClickHouse fact_events table with filtering and pagination
|
|
566
|
-
* @summary Get API Usage Logs
|
|
567
|
-
* @param {string} [startDate] Start date (ISO 8601 format)
|
|
568
|
-
* @param {string} [endDate] End date (ISO 8601 format)
|
|
569
|
-
* @param {string} [method] HTTP method filter
|
|
570
|
-
* @param {string} [path] Path filter (partial match)
|
|
571
|
-
* @param {string} [storeId] Store ID filter
|
|
572
|
-
* @param {number} [page] Page number (default: 1)
|
|
573
|
-
* @param {number} [perPage] Results per page (default: 100, max: 1000)
|
|
574
|
-
* @param {*} [options] Override http request option.
|
|
575
|
-
* @throws {RequiredError}
|
|
576
|
-
*/
|
|
577
|
-
analyticsApiUsageGet(startDate, endDate, method, path, storeId, page, perPage, options) {
|
|
578
|
-
return localVarFp.analyticsApiUsageGet(startDate, endDate, method, path, storeId, page, perPage, options).then((request) => request(axios, basePath));
|
|
579
|
-
},
|
|
580
|
-
/**
|
|
581
|
-
* Retrieve API usage logs for a specific store from ClickHouse
|
|
582
|
-
* @summary Get Store API Usage Logs
|
|
583
|
-
* @param {string} storeId Store ID
|
|
584
|
-
* @param {string} [startDate] Start date (ISO 8601 format)
|
|
585
|
-
* @param {string} [endDate] End date (ISO 8601 format)
|
|
586
|
-
* @param {string} [method] HTTP method filter
|
|
587
|
-
* @param {number} [page] Page number (default: 1)
|
|
588
|
-
* @param {number} [perPage] Results per page (default: 100, max: 1000)
|
|
589
|
-
* @param {*} [options] Override http request option.
|
|
590
|
-
* @throws {RequiredError}
|
|
591
|
-
*/
|
|
592
|
-
analyticsApiUsageStoreStoreIdGet(storeId, startDate, endDate, method, page, perPage, options) {
|
|
593
|
-
return localVarFp.analyticsApiUsageStoreStoreIdGet(storeId, startDate, endDate, method, page, perPage, options).then((request) => request(axios, basePath));
|
|
594
|
-
},
|
|
595
|
-
};
|
|
596
|
-
};
|
|
597
|
-
exports.AnalyticsApiFactory = AnalyticsApiFactory;
|
|
598
|
-
/**
|
|
599
|
-
* AnalyticsApi - object-oriented interface
|
|
600
|
-
*/
|
|
601
|
-
class AnalyticsApi extends base_1.BaseAPI {
|
|
602
|
-
/**
|
|
603
|
-
* Retrieve API usage logs from ClickHouse fact_events table with filtering and pagination
|
|
604
|
-
* @summary Get API Usage Logs
|
|
605
|
-
* @param {string} [startDate] Start date (ISO 8601 format)
|
|
606
|
-
* @param {string} [endDate] End date (ISO 8601 format)
|
|
607
|
-
* @param {string} [method] HTTP method filter
|
|
608
|
-
* @param {string} [path] Path filter (partial match)
|
|
609
|
-
* @param {string} [storeId] Store ID filter
|
|
610
|
-
* @param {number} [page] Page number (default: 1)
|
|
611
|
-
* @param {number} [perPage] Results per page (default: 100, max: 1000)
|
|
612
|
-
* @param {*} [options] Override http request option.
|
|
613
|
-
* @throws {RequiredError}
|
|
614
|
-
*/
|
|
615
|
-
analyticsApiUsageGet(startDate, endDate, method, path, storeId, page, perPage, options) {
|
|
616
|
-
return (0, exports.AnalyticsApiFp)(this.configuration).analyticsApiUsageGet(startDate, endDate, method, path, storeId, page, perPage, options).then((request) => request(this.axios, this.basePath));
|
|
617
|
-
}
|
|
618
|
-
/**
|
|
619
|
-
* Retrieve API usage logs for a specific store from ClickHouse
|
|
620
|
-
* @summary Get Store API Usage Logs
|
|
621
|
-
* @param {string} storeId Store ID
|
|
622
|
-
* @param {string} [startDate] Start date (ISO 8601 format)
|
|
623
|
-
* @param {string} [endDate] End date (ISO 8601 format)
|
|
624
|
-
* @param {string} [method] HTTP method filter
|
|
625
|
-
* @param {number} [page] Page number (default: 1)
|
|
626
|
-
* @param {number} [perPage] Results per page (default: 100, max: 1000)
|
|
627
|
-
* @param {*} [options] Override http request option.
|
|
628
|
-
* @throws {RequiredError}
|
|
629
|
-
*/
|
|
630
|
-
analyticsApiUsageStoreStoreIdGet(storeId, startDate, endDate, method, page, perPage, options) {
|
|
631
|
-
return (0, exports.AnalyticsApiFp)(this.configuration).analyticsApiUsageStoreStoreIdGet(storeId, startDate, endDate, method, page, perPage, options).then((request) => request(this.axios, this.basePath));
|
|
632
|
-
}
|
|
633
|
-
}
|
|
634
|
-
exports.AnalyticsApi = AnalyticsApi;
|
|
635
39
|
/**
|
|
636
40
|
* AnalyticsEventsApi - axios parameter creator
|
|
637
41
|
*/
|
|
@@ -1079,19 +483,22 @@ const FiltersApiAxiosParamCreator = function (configuration) {
|
|
|
1079
483
|
* @param {string} xStoreid Store ID (from dashboard)
|
|
1080
484
|
* @param {string} xStoresecret Store read secret (from dashboard)
|
|
1081
485
|
* @param {string} facetName Facet field name (e.g., brand, category)
|
|
1082
|
-
* @param {
|
|
486
|
+
* @param {string} facetQuery Prefix to search within the facet values
|
|
487
|
+
* @param {string} [q] Search query to scope results
|
|
488
|
+
* @param {string} [filter] Filter expression to scope results
|
|
489
|
+
* @param {number} [maxValues] Maximum number of facet values to return
|
|
1083
490
|
* @param {*} [options] Override http request option.
|
|
1084
491
|
* @throws {RequiredError}
|
|
1085
492
|
*/
|
|
1086
|
-
|
|
493
|
+
v1FiltersFacetNameValuesGet: async (xStoreid, xStoresecret, facetName, facetQuery, q, filter, maxValues, options = {}) => {
|
|
1087
494
|
// verify required parameter 'xStoreid' is not null or undefined
|
|
1088
|
-
(0, common_1.assertParamExists)('
|
|
495
|
+
(0, common_1.assertParamExists)('v1FiltersFacetNameValuesGet', 'xStoreid', xStoreid);
|
|
1089
496
|
// verify required parameter 'xStoresecret' is not null or undefined
|
|
1090
|
-
(0, common_1.assertParamExists)('
|
|
497
|
+
(0, common_1.assertParamExists)('v1FiltersFacetNameValuesGet', 'xStoresecret', xStoresecret);
|
|
1091
498
|
// verify required parameter 'facetName' is not null or undefined
|
|
1092
|
-
(0, common_1.assertParamExists)('
|
|
1093
|
-
// verify required parameter '
|
|
1094
|
-
(0, common_1.assertParamExists)('
|
|
499
|
+
(0, common_1.assertParamExists)('v1FiltersFacetNameValuesGet', 'facetName', facetName);
|
|
500
|
+
// verify required parameter 'facetQuery' is not null or undefined
|
|
501
|
+
(0, common_1.assertParamExists)('v1FiltersFacetNameValuesGet', 'facetQuery', facetQuery);
|
|
1095
502
|
const localVarPath = `/v1/filters/{facetName}/values`
|
|
1096
503
|
.replace(`{${"facetName"}}`, encodeURIComponent(String(facetName)));
|
|
1097
504
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
@@ -1100,10 +507,21 @@ const FiltersApiAxiosParamCreator = function (configuration) {
|
|
|
1100
507
|
if (configuration) {
|
|
1101
508
|
baseOptions = configuration.baseOptions;
|
|
1102
509
|
}
|
|
1103
|
-
const localVarRequestOptions = { method: '
|
|
510
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
1104
511
|
const localVarHeaderParameter = {};
|
|
1105
512
|
const localVarQueryParameter = {};
|
|
1106
|
-
|
|
513
|
+
if (facetQuery !== undefined) {
|
|
514
|
+
localVarQueryParameter['facet_query'] = facetQuery;
|
|
515
|
+
}
|
|
516
|
+
if (q !== undefined) {
|
|
517
|
+
localVarQueryParameter['q'] = q;
|
|
518
|
+
}
|
|
519
|
+
if (filter !== undefined) {
|
|
520
|
+
localVarQueryParameter['filter'] = filter;
|
|
521
|
+
}
|
|
522
|
+
if (maxValues !== undefined) {
|
|
523
|
+
localVarQueryParameter['max_values'] = maxValues;
|
|
524
|
+
}
|
|
1107
525
|
localVarHeaderParameter['Accept'] = 'application/json';
|
|
1108
526
|
if (xStoreid != null) {
|
|
1109
527
|
localVarHeaderParameter['x-storeid'] = String(xStoreid);
|
|
@@ -1114,7 +532,6 @@ const FiltersApiAxiosParamCreator = function (configuration) {
|
|
|
1114
532
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1115
533
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1116
534
|
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
1117
|
-
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(dataTypesFacetValuesSearchRequest, localVarRequestOptions, configuration);
|
|
1118
535
|
return {
|
|
1119
536
|
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1120
537
|
options: localVarRequestOptions,
|
|
@@ -1125,15 +542,19 @@ const FiltersApiAxiosParamCreator = function (configuration) {
|
|
|
1125
542
|
* @summary Get Filters
|
|
1126
543
|
* @param {string} xStoreid Store ID (from dashboard)
|
|
1127
544
|
* @param {string} xStoresecret Store read secret (from dashboard)
|
|
1128
|
-
* @param {
|
|
545
|
+
* @param {string} [q] Search query to scope filter counts
|
|
546
|
+
* @param {string} [filter] Filter expression (e.g. brand:=Nike)
|
|
547
|
+
* @param {string} [facetBy] Comma-separated list of facet fields to return
|
|
548
|
+
* @param {number} [maxFacetValues] Maximum number of values per facet
|
|
549
|
+
* @param {string} [disjunctiveFacets] Comma-separated facet fields to treat as disjunctive (OR)
|
|
1129
550
|
* @param {*} [options] Override http request option.
|
|
1130
551
|
* @throws {RequiredError}
|
|
1131
552
|
*/
|
|
1132
|
-
|
|
553
|
+
v1FiltersGet: async (xStoreid, xStoresecret, q, filter, facetBy, maxFacetValues, disjunctiveFacets, options = {}) => {
|
|
1133
554
|
// verify required parameter 'xStoreid' is not null or undefined
|
|
1134
|
-
(0, common_1.assertParamExists)('
|
|
555
|
+
(0, common_1.assertParamExists)('v1FiltersGet', 'xStoreid', xStoreid);
|
|
1135
556
|
// verify required parameter 'xStoresecret' is not null or undefined
|
|
1136
|
-
(0, common_1.assertParamExists)('
|
|
557
|
+
(0, common_1.assertParamExists)('v1FiltersGet', 'xStoresecret', xStoresecret);
|
|
1137
558
|
const localVarPath = `/v1/filters`;
|
|
1138
559
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1139
560
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
@@ -1141,21 +562,34 @@ const FiltersApiAxiosParamCreator = function (configuration) {
|
|
|
1141
562
|
if (configuration) {
|
|
1142
563
|
baseOptions = configuration.baseOptions;
|
|
1143
564
|
}
|
|
1144
|
-
const localVarRequestOptions = { method: '
|
|
565
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
1145
566
|
const localVarHeaderParameter = {};
|
|
1146
567
|
const localVarQueryParameter = {};
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
if (xStoreid != null) {
|
|
1150
|
-
localVarHeaderParameter['x-storeid'] = String(xStoreid);
|
|
568
|
+
if (q !== undefined) {
|
|
569
|
+
localVarQueryParameter['q'] = q;
|
|
1151
570
|
}
|
|
1152
|
-
if (
|
|
1153
|
-
|
|
571
|
+
if (filter !== undefined) {
|
|
572
|
+
localVarQueryParameter['filter'] = filter;
|
|
1154
573
|
}
|
|
1155
|
-
(
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
574
|
+
if (facetBy !== undefined) {
|
|
575
|
+
localVarQueryParameter['facet_by'] = facetBy;
|
|
576
|
+
}
|
|
577
|
+
if (maxFacetValues !== undefined) {
|
|
578
|
+
localVarQueryParameter['max_facet_values'] = maxFacetValues;
|
|
579
|
+
}
|
|
580
|
+
if (disjunctiveFacets !== undefined) {
|
|
581
|
+
localVarQueryParameter['disjunctive_facets'] = disjunctiveFacets;
|
|
582
|
+
}
|
|
583
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
584
|
+
if (xStoreid != null) {
|
|
585
|
+
localVarHeaderParameter['x-storeid'] = String(xStoreid);
|
|
586
|
+
}
|
|
587
|
+
if (xStoresecret != null) {
|
|
588
|
+
localVarHeaderParameter['x-storesecret'] = String(xStoresecret);
|
|
589
|
+
}
|
|
590
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
591
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
592
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
1159
593
|
return {
|
|
1160
594
|
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1161
595
|
options: localVarRequestOptions,
|
|
@@ -1214,14 +648,17 @@ const FiltersApiFp = function (configuration) {
|
|
|
1214
648
|
* @param {string} xStoreid Store ID (from dashboard)
|
|
1215
649
|
* @param {string} xStoresecret Store read secret (from dashboard)
|
|
1216
650
|
* @param {string} facetName Facet field name (e.g., brand, category)
|
|
1217
|
-
* @param {
|
|
651
|
+
* @param {string} facetQuery Prefix to search within the facet values
|
|
652
|
+
* @param {string} [q] Search query to scope results
|
|
653
|
+
* @param {string} [filter] Filter expression to scope results
|
|
654
|
+
* @param {number} [maxValues] Maximum number of facet values to return
|
|
1218
655
|
* @param {*} [options] Override http request option.
|
|
1219
656
|
* @throws {RequiredError}
|
|
1220
657
|
*/
|
|
1221
|
-
async
|
|
1222
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.
|
|
658
|
+
async v1FiltersFacetNameValuesGet(xStoreid, xStoresecret, facetName, facetQuery, q, filter, maxValues, options) {
|
|
659
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.v1FiltersFacetNameValuesGet(xStoreid, xStoresecret, facetName, facetQuery, q, filter, maxValues, options);
|
|
1223
660
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1224
|
-
const localVarOperationServerBasePath = base_1.operationServerMap['FiltersApi.
|
|
661
|
+
const localVarOperationServerBasePath = base_1.operationServerMap['FiltersApi.v1FiltersFacetNameValuesGet']?.[localVarOperationServerIndex]?.url;
|
|
1225
662
|
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1226
663
|
},
|
|
1227
664
|
/**
|
|
@@ -1229,14 +666,18 @@ const FiltersApiFp = function (configuration) {
|
|
|
1229
666
|
* @summary Get Filters
|
|
1230
667
|
* @param {string} xStoreid Store ID (from dashboard)
|
|
1231
668
|
* @param {string} xStoresecret Store read secret (from dashboard)
|
|
1232
|
-
* @param {
|
|
669
|
+
* @param {string} [q] Search query to scope filter counts
|
|
670
|
+
* @param {string} [filter] Filter expression (e.g. brand:=Nike)
|
|
671
|
+
* @param {string} [facetBy] Comma-separated list of facet fields to return
|
|
672
|
+
* @param {number} [maxFacetValues] Maximum number of values per facet
|
|
673
|
+
* @param {string} [disjunctiveFacets] Comma-separated facet fields to treat as disjunctive (OR)
|
|
1233
674
|
* @param {*} [options] Override http request option.
|
|
1234
675
|
* @throws {RequiredError}
|
|
1235
676
|
*/
|
|
1236
|
-
async
|
|
1237
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.
|
|
677
|
+
async v1FiltersGet(xStoreid, xStoresecret, q, filter, facetBy, maxFacetValues, disjunctiveFacets, options) {
|
|
678
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.v1FiltersGet(xStoreid, xStoresecret, q, filter, facetBy, maxFacetValues, disjunctiveFacets, options);
|
|
1238
679
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1239
|
-
const localVarOperationServerBasePath = base_1.operationServerMap['FiltersApi.
|
|
680
|
+
const localVarOperationServerBasePath = base_1.operationServerMap['FiltersApi.v1FiltersGet']?.[localVarOperationServerIndex]?.url;
|
|
1240
681
|
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1241
682
|
},
|
|
1242
683
|
/**
|
|
@@ -1268,24 +709,31 @@ const FiltersApiFactory = function (configuration, basePath, axios) {
|
|
|
1268
709
|
* @param {string} xStoreid Store ID (from dashboard)
|
|
1269
710
|
* @param {string} xStoresecret Store read secret (from dashboard)
|
|
1270
711
|
* @param {string} facetName Facet field name (e.g., brand, category)
|
|
1271
|
-
* @param {
|
|
712
|
+
* @param {string} facetQuery Prefix to search within the facet values
|
|
713
|
+
* @param {string} [q] Search query to scope results
|
|
714
|
+
* @param {string} [filter] Filter expression to scope results
|
|
715
|
+
* @param {number} [maxValues] Maximum number of facet values to return
|
|
1272
716
|
* @param {*} [options] Override http request option.
|
|
1273
717
|
* @throws {RequiredError}
|
|
1274
718
|
*/
|
|
1275
|
-
|
|
1276
|
-
return localVarFp.
|
|
719
|
+
v1FiltersFacetNameValuesGet(xStoreid, xStoresecret, facetName, facetQuery, q, filter, maxValues, options) {
|
|
720
|
+
return localVarFp.v1FiltersFacetNameValuesGet(xStoreid, xStoresecret, facetName, facetQuery, q, filter, maxValues, options).then((request) => request(axios, basePath));
|
|
1277
721
|
},
|
|
1278
722
|
/**
|
|
1279
723
|
* Get filter values and counts for configured facets. Use this to build faceted navigation UIs. Supports disjunctive faceting for OR-based filter combinations.
|
|
1280
724
|
* @summary Get Filters
|
|
1281
725
|
* @param {string} xStoreid Store ID (from dashboard)
|
|
1282
726
|
* @param {string} xStoresecret Store read secret (from dashboard)
|
|
1283
|
-
* @param {
|
|
727
|
+
* @param {string} [q] Search query to scope filter counts
|
|
728
|
+
* @param {string} [filter] Filter expression (e.g. brand:=Nike)
|
|
729
|
+
* @param {string} [facetBy] Comma-separated list of facet fields to return
|
|
730
|
+
* @param {number} [maxFacetValues] Maximum number of values per facet
|
|
731
|
+
* @param {string} [disjunctiveFacets] Comma-separated facet fields to treat as disjunctive (OR)
|
|
1284
732
|
* @param {*} [options] Override http request option.
|
|
1285
733
|
* @throws {RequiredError}
|
|
1286
734
|
*/
|
|
1287
|
-
|
|
1288
|
-
return localVarFp.
|
|
735
|
+
v1FiltersGet(xStoreid, xStoresecret, q, filter, facetBy, maxFacetValues, disjunctiveFacets, options) {
|
|
736
|
+
return localVarFp.v1FiltersGet(xStoreid, xStoresecret, q, filter, facetBy, maxFacetValues, disjunctiveFacets, options).then((request) => request(axios, basePath));
|
|
1289
737
|
},
|
|
1290
738
|
/**
|
|
1291
739
|
* Get available filter field metadata including types, sortability, and configured ranges. Useful for dynamically building filter UIs.
|
|
@@ -1311,24 +759,31 @@ class FiltersApi extends base_1.BaseAPI {
|
|
|
1311
759
|
* @param {string} xStoreid Store ID (from dashboard)
|
|
1312
760
|
* @param {string} xStoresecret Store read secret (from dashboard)
|
|
1313
761
|
* @param {string} facetName Facet field name (e.g., brand, category)
|
|
1314
|
-
* @param {
|
|
762
|
+
* @param {string} facetQuery Prefix to search within the facet values
|
|
763
|
+
* @param {string} [q] Search query to scope results
|
|
764
|
+
* @param {string} [filter] Filter expression to scope results
|
|
765
|
+
* @param {number} [maxValues] Maximum number of facet values to return
|
|
1315
766
|
* @param {*} [options] Override http request option.
|
|
1316
767
|
* @throws {RequiredError}
|
|
1317
768
|
*/
|
|
1318
|
-
|
|
1319
|
-
return (0, exports.FiltersApiFp)(this.configuration).
|
|
769
|
+
v1FiltersFacetNameValuesGet(xStoreid, xStoresecret, facetName, facetQuery, q, filter, maxValues, options) {
|
|
770
|
+
return (0, exports.FiltersApiFp)(this.configuration).v1FiltersFacetNameValuesGet(xStoreid, xStoresecret, facetName, facetQuery, q, filter, maxValues, options).then((request) => request(this.axios, this.basePath));
|
|
1320
771
|
}
|
|
1321
772
|
/**
|
|
1322
773
|
* Get filter values and counts for configured facets. Use this to build faceted navigation UIs. Supports disjunctive faceting for OR-based filter combinations.
|
|
1323
774
|
* @summary Get Filters
|
|
1324
775
|
* @param {string} xStoreid Store ID (from dashboard)
|
|
1325
776
|
* @param {string} xStoresecret Store read secret (from dashboard)
|
|
1326
|
-
* @param {
|
|
777
|
+
* @param {string} [q] Search query to scope filter counts
|
|
778
|
+
* @param {string} [filter] Filter expression (e.g. brand:=Nike)
|
|
779
|
+
* @param {string} [facetBy] Comma-separated list of facet fields to return
|
|
780
|
+
* @param {number} [maxFacetValues] Maximum number of values per facet
|
|
781
|
+
* @param {string} [disjunctiveFacets] Comma-separated facet fields to treat as disjunctive (OR)
|
|
1327
782
|
* @param {*} [options] Override http request option.
|
|
1328
783
|
* @throws {RequiredError}
|
|
1329
784
|
*/
|
|
1330
|
-
|
|
1331
|
-
return (0, exports.FiltersApiFp)(this.configuration).
|
|
785
|
+
v1FiltersGet(xStoreid, xStoresecret, q, filter, facetBy, maxFacetValues, disjunctiveFacets, options) {
|
|
786
|
+
return (0, exports.FiltersApiFp)(this.configuration).v1FiltersGet(xStoreid, xStoresecret, q, filter, facetBy, maxFacetValues, disjunctiveFacets, options).then((request) => request(this.axios, this.basePath));
|
|
1332
787
|
}
|
|
1333
788
|
/**
|
|
1334
789
|
* Get available filter field metadata including types, sortability, and configured ranges. Useful for dynamically building filter UIs.
|
|
@@ -1520,59 +975,6 @@ const QuerySuggestionsApiAxiosParamCreator = function (configuration) {
|
|
|
1520
975
|
options: localVarRequestOptions,
|
|
1521
976
|
};
|
|
1522
977
|
},
|
|
1523
|
-
/**
|
|
1524
|
-
* 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.
|
|
1525
|
-
* @summary Get query suggestions (POST)
|
|
1526
|
-
* @param {string} xStoreid Store ID (from dashboard)
|
|
1527
|
-
* @param {string} xStoresecret Store read secret
|
|
1528
|
-
* @param {string} [xUserId] User ID for personalization
|
|
1529
|
-
* @param {string} [xAnonId] Anonymous user ID for personalization
|
|
1530
|
-
* @param {string} [xSessionId] Session ID for personalization
|
|
1531
|
-
* @param {QuerySuggestionsServiceQuerySuggestionsRequest} [querySuggestionsServiceQuerySuggestionsRequest] Request (query, hitsPerPage, analytics_tags, filtered_tabs, etc.)
|
|
1532
|
-
* @param {*} [options] Override http request option.
|
|
1533
|
-
* @throws {RequiredError}
|
|
1534
|
-
*/
|
|
1535
|
-
v1SuggestionsQueriesPost: async (xStoreid, xStoresecret, xUserId, xAnonId, xSessionId, querySuggestionsServiceQuerySuggestionsRequest, options = {}) => {
|
|
1536
|
-
// verify required parameter 'xStoreid' is not null or undefined
|
|
1537
|
-
(0, common_1.assertParamExists)('v1SuggestionsQueriesPost', 'xStoreid', xStoreid);
|
|
1538
|
-
// verify required parameter 'xStoresecret' is not null or undefined
|
|
1539
|
-
(0, common_1.assertParamExists)('v1SuggestionsQueriesPost', 'xStoresecret', xStoresecret);
|
|
1540
|
-
const localVarPath = `/v1/suggestions/queries`;
|
|
1541
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1542
|
-
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1543
|
-
let baseOptions;
|
|
1544
|
-
if (configuration) {
|
|
1545
|
-
baseOptions = configuration.baseOptions;
|
|
1546
|
-
}
|
|
1547
|
-
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
|
|
1548
|
-
const localVarHeaderParameter = {};
|
|
1549
|
-
const localVarQueryParameter = {};
|
|
1550
|
-
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1551
|
-
localVarHeaderParameter['Accept'] = 'application/json';
|
|
1552
|
-
if (xStoreid != null) {
|
|
1553
|
-
localVarHeaderParameter['x-storeid'] = String(xStoreid);
|
|
1554
|
-
}
|
|
1555
|
-
if (xStoresecret != null) {
|
|
1556
|
-
localVarHeaderParameter['x-storesecret'] = String(xStoresecret);
|
|
1557
|
-
}
|
|
1558
|
-
if (xUserId != null) {
|
|
1559
|
-
localVarHeaderParameter['x-user-id'] = String(xUserId);
|
|
1560
|
-
}
|
|
1561
|
-
if (xAnonId != null) {
|
|
1562
|
-
localVarHeaderParameter['x-anon-id'] = String(xAnonId);
|
|
1563
|
-
}
|
|
1564
|
-
if (xSessionId != null) {
|
|
1565
|
-
localVarHeaderParameter['x-session-id'] = String(xSessionId);
|
|
1566
|
-
}
|
|
1567
|
-
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1568
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1569
|
-
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
1570
|
-
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(querySuggestionsServiceQuerySuggestionsRequest, localVarRequestOptions, configuration);
|
|
1571
|
-
return {
|
|
1572
|
-
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1573
|
-
options: localVarRequestOptions,
|
|
1574
|
-
};
|
|
1575
|
-
},
|
|
1576
978
|
};
|
|
1577
979
|
};
|
|
1578
980
|
exports.QuerySuggestionsApiAxiosParamCreator = QuerySuggestionsApiAxiosParamCreator;
|
|
@@ -1634,24 +1036,6 @@ const QuerySuggestionsApiFp = function (configuration) {
|
|
|
1634
1036
|
const localVarOperationServerBasePath = base_1.operationServerMap['QuerySuggestionsApi.v1SuggestionsQueriesGet']?.[localVarOperationServerIndex]?.url;
|
|
1635
1037
|
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1636
1038
|
},
|
|
1637
|
-
/**
|
|
1638
|
-
* 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.
|
|
1639
|
-
* @summary Get query suggestions (POST)
|
|
1640
|
-
* @param {string} xStoreid Store ID (from dashboard)
|
|
1641
|
-
* @param {string} xStoresecret Store read secret
|
|
1642
|
-
* @param {string} [xUserId] User ID for personalization
|
|
1643
|
-
* @param {string} [xAnonId] Anonymous user ID for personalization
|
|
1644
|
-
* @param {string} [xSessionId] Session ID for personalization
|
|
1645
|
-
* @param {QuerySuggestionsServiceQuerySuggestionsRequest} [querySuggestionsServiceQuerySuggestionsRequest] Request (query, hitsPerPage, analytics_tags, filtered_tabs, etc.)
|
|
1646
|
-
* @param {*} [options] Override http request option.
|
|
1647
|
-
* @throws {RequiredError}
|
|
1648
|
-
*/
|
|
1649
|
-
async v1SuggestionsQueriesPost(xStoreid, xStoresecret, xUserId, xAnonId, xSessionId, querySuggestionsServiceQuerySuggestionsRequest, options) {
|
|
1650
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.v1SuggestionsQueriesPost(xStoreid, xStoresecret, xUserId, xAnonId, xSessionId, querySuggestionsServiceQuerySuggestionsRequest, options);
|
|
1651
|
-
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1652
|
-
const localVarOperationServerBasePath = base_1.operationServerMap['QuerySuggestionsApi.v1SuggestionsQueriesPost']?.[localVarOperationServerIndex]?.url;
|
|
1653
|
-
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1654
|
-
},
|
|
1655
1039
|
};
|
|
1656
1040
|
};
|
|
1657
1041
|
exports.QuerySuggestionsApiFp = QuerySuggestionsApiFp;
|
|
@@ -1707,21 +1091,6 @@ const QuerySuggestionsApiFactory = function (configuration, basePath, axios) {
|
|
|
1707
1091
|
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) {
|
|
1708
1092
|
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));
|
|
1709
1093
|
},
|
|
1710
|
-
/**
|
|
1711
|
-
* 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.
|
|
1712
|
-
* @summary Get query suggestions (POST)
|
|
1713
|
-
* @param {string} xStoreid Store ID (from dashboard)
|
|
1714
|
-
* @param {string} xStoresecret Store read secret
|
|
1715
|
-
* @param {string} [xUserId] User ID for personalization
|
|
1716
|
-
* @param {string} [xAnonId] Anonymous user ID for personalization
|
|
1717
|
-
* @param {string} [xSessionId] Session ID for personalization
|
|
1718
|
-
* @param {QuerySuggestionsServiceQuerySuggestionsRequest} [querySuggestionsServiceQuerySuggestionsRequest] Request (query, hitsPerPage, analytics_tags, filtered_tabs, etc.)
|
|
1719
|
-
* @param {*} [options] Override http request option.
|
|
1720
|
-
* @throws {RequiredError}
|
|
1721
|
-
*/
|
|
1722
|
-
v1SuggestionsQueriesPost(xStoreid, xStoresecret, xUserId, xAnonId, xSessionId, querySuggestionsServiceQuerySuggestionsRequest, options) {
|
|
1723
|
-
return localVarFp.v1SuggestionsQueriesPost(xStoreid, xStoresecret, xUserId, xAnonId, xSessionId, querySuggestionsServiceQuerySuggestionsRequest, options).then((request) => request(axios, basePath));
|
|
1724
|
-
},
|
|
1725
1094
|
};
|
|
1726
1095
|
};
|
|
1727
1096
|
exports.QuerySuggestionsApiFactory = QuerySuggestionsApiFactory;
|
|
@@ -1775,21 +1144,6 @@ class QuerySuggestionsApi extends base_1.BaseAPI {
|
|
|
1775
1144
|
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) {
|
|
1776
1145
|
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));
|
|
1777
1146
|
}
|
|
1778
|
-
/**
|
|
1779
|
-
* 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.
|
|
1780
|
-
* @summary Get query suggestions (POST)
|
|
1781
|
-
* @param {string} xStoreid Store ID (from dashboard)
|
|
1782
|
-
* @param {string} xStoresecret Store read secret
|
|
1783
|
-
* @param {string} [xUserId] User ID for personalization
|
|
1784
|
-
* @param {string} [xAnonId] Anonymous user ID for personalization
|
|
1785
|
-
* @param {string} [xSessionId] Session ID for personalization
|
|
1786
|
-
* @param {QuerySuggestionsServiceQuerySuggestionsRequest} [querySuggestionsServiceQuerySuggestionsRequest] Request (query, hitsPerPage, analytics_tags, filtered_tabs, etc.)
|
|
1787
|
-
* @param {*} [options] Override http request option.
|
|
1788
|
-
* @throws {RequiredError}
|
|
1789
|
-
*/
|
|
1790
|
-
v1SuggestionsQueriesPost(xStoreid, xStoresecret, xUserId, xAnonId, xSessionId, querySuggestionsServiceQuerySuggestionsRequest, options) {
|
|
1791
|
-
return (0, exports.QuerySuggestionsApiFp)(this.configuration).v1SuggestionsQueriesPost(xStoreid, xStoresecret, xUserId, xAnonId, xSessionId, querySuggestionsServiceQuerySuggestionsRequest, options).then((request) => request(this.axios, this.basePath));
|
|
1792
|
-
}
|
|
1793
1147
|
}
|
|
1794
1148
|
exports.QuerySuggestionsApi = QuerySuggestionsApi;
|
|
1795
1149
|
exports.V1SuggestionsQueriesGetTagsMatchModeEnum = {
|
|
@@ -1802,199 +1156,209 @@ exports.V1SuggestionsQueriesGetTimeRangeEnum = {
|
|
|
1802
1156
|
_90d: '90d'
|
|
1803
1157
|
};
|
|
1804
1158
|
/**
|
|
1805
|
-
*
|
|
1159
|
+
* SearchApi - axios parameter creator
|
|
1806
1160
|
*/
|
|
1807
|
-
const
|
|
1161
|
+
const SearchApiAxiosParamCreator = function (configuration) {
|
|
1808
1162
|
return {
|
|
1809
1163
|
/**
|
|
1810
|
-
*
|
|
1811
|
-
* @summary
|
|
1164
|
+
* 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
|
+
* @summary Search (GET)
|
|
1812
1166
|
* @param {string} xStoreid Store ID (from dashboard)
|
|
1813
|
-
* @param {string}
|
|
1814
|
-
* @param {string}
|
|
1815
|
-
* @param {
|
|
1167
|
+
* @param {string} xStoresecret Store read secret (from dashboard)
|
|
1168
|
+
* @param {string} q Search query
|
|
1169
|
+
* @param {string} [xUserId] User ID for personalization
|
|
1170
|
+
* @param {string} [xAnonId] Anonymous user ID for personalization
|
|
1171
|
+
* @param {string} [xSessionId] Session ID for personalization
|
|
1172
|
+
* @param {number} [page] Page number (default: 1)
|
|
1173
|
+
* @param {number} [perPage] Items per page (default: 10)
|
|
1174
|
+
* @param {string} [sortBy] Sort option (e.g., price:asc, created_at:desc)
|
|
1175
|
+
* @param {string} [filterBy] Filter string (e.g., category:shirts)
|
|
1176
|
+
* @param {string} [facetBy] Facet fields (comma-separated)
|
|
1177
|
+
* @param {number} [maxFacetValues] Maximum facet values to return
|
|
1178
|
+
* @param {boolean} [widgetMode] Return widget-formatted results
|
|
1179
|
+
* @param {boolean} [includeSuggestions] Include autocomplete suggestions
|
|
1180
|
+
* @param {number} [suggestionsLimit] Number of suggestions to return
|
|
1181
|
+
* @param {string} [analyticsTags] Analytics tags (comma-separated)
|
|
1182
|
+
* @param {string} [stopwordSets] Stopword set IDs (comma-separated)
|
|
1183
|
+
* @param {string} [synonymSets] Synonym set IDs (comma-separated)
|
|
1184
|
+
* @param {string} [searchFields] Fields to search in (comma-separated)
|
|
1185
|
+
* @param {string} [returnFields] Fields to return (comma-separated)
|
|
1186
|
+
* @param {string} [omitFields] Fields to omit (comma-separated)
|
|
1187
|
+
* @param {string} [snippetFields] Fields to generate snippets for (comma-separated)
|
|
1188
|
+
* @param {string} [fullSnippetFields] Fields to include full snippet (comma-separated)
|
|
1189
|
+
* @param {string} [fieldWeights] Field weights as comma-separated integers (e.g., 3,2,1)
|
|
1190
|
+
* @param {string} [groupField] Field to group results by
|
|
1191
|
+
* @param {number} [groupSize] Number of results per group
|
|
1192
|
+
* @param {string} [snippetPrefix] Prefix for highlighted snippets
|
|
1193
|
+
* @param {string} [snippetSuffix] Suffix for highlighted snippets
|
|
1194
|
+
* @param {number} [snippetTokenLimit] Maximum tokens in snippet
|
|
1195
|
+
* @param {number} [snippetMinLen] Minimum snippet length
|
|
1196
|
+
* @param {boolean} [includeSnippets] Include snippets in results
|
|
1197
|
+
* @param {string} [prefixMode] Prefix matching mode (e.g., always, fallback, off)
|
|
1198
|
+
* @param {string} [infixMode] Infix matching mode (e.g., always, fallback, off)
|
|
1199
|
+
* @param {number} [typoMax] Maximum typo tolerance
|
|
1200
|
+
* @param {number} [typoMinLen1] Min word length for 1 typo
|
|
1201
|
+
* @param {number} [typoMinLen2] Min word length for 2 typos
|
|
1202
|
+
* @param {number} [searchTimeoutMs] Search timeout in milliseconds
|
|
1203
|
+
* @param {boolean} [requireAllTerms] Require all search terms to match
|
|
1204
|
+
* @param {boolean} [exactMatchBoost] Boost exact matches
|
|
1205
|
+
* @param {boolean} [cacheResults] Cache search results
|
|
1206
|
+
* @param {boolean} [applyRules] Apply search rules
|
|
1207
|
+
* @param {string} [presetName] Search preset name to use
|
|
1208
|
+
* @param {string} [facetSearchText] Text to filter facet values
|
|
1816
1209
|
* @param {*} [options] Override http request option.
|
|
1817
1210
|
* @throws {RequiredError}
|
|
1818
1211
|
*/
|
|
1819
|
-
|
|
1212
|
+
v1SearchGet: async (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 = {}) => {
|
|
1820
1213
|
// verify required parameter 'xStoreid' is not null or undefined
|
|
1821
|
-
(0, common_1.assertParamExists)('
|
|
1822
|
-
// verify required parameter '
|
|
1823
|
-
(0, common_1.assertParamExists)('
|
|
1824
|
-
// verify required parameter '
|
|
1825
|
-
(0, common_1.assertParamExists)('
|
|
1826
|
-
|
|
1827
|
-
(0, common_1.assertParamExists)('apiV1StoresXStoreIDDocumentsBulkPost', 'dataTypesBulkDocumentRequest', dataTypesBulkDocumentRequest);
|
|
1828
|
-
const localVarPath = `/api/v1/stores/{xStoreID}/documents/bulk`
|
|
1829
|
-
.replace(`{${"xStoreID"}}`, encodeURIComponent(String(xStoreID)));
|
|
1214
|
+
(0, common_1.assertParamExists)('v1SearchGet', 'xStoreid', xStoreid);
|
|
1215
|
+
// verify required parameter 'xStoresecret' is not null or undefined
|
|
1216
|
+
(0, common_1.assertParamExists)('v1SearchGet', 'xStoresecret', xStoresecret);
|
|
1217
|
+
// verify required parameter 'q' is not null or undefined
|
|
1218
|
+
(0, common_1.assertParamExists)('v1SearchGet', 'q', q);
|
|
1219
|
+
const localVarPath = `/v1/search`;
|
|
1830
1220
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1831
1221
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1832
1222
|
let baseOptions;
|
|
1833
1223
|
if (configuration) {
|
|
1834
1224
|
baseOptions = configuration.baseOptions;
|
|
1835
1225
|
}
|
|
1836
|
-
const localVarRequestOptions = { method: '
|
|
1226
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
1837
1227
|
const localVarHeaderParameter = {};
|
|
1838
1228
|
const localVarQueryParameter = {};
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1842
|
-
localVarHeaderParameter['Accept'] = 'application/json';
|
|
1843
|
-
if (xStoreid != null) {
|
|
1844
|
-
localVarHeaderParameter['x-storeid'] = String(xStoreid);
|
|
1229
|
+
if (q !== undefined) {
|
|
1230
|
+
localVarQueryParameter['q'] = q;
|
|
1845
1231
|
}
|
|
1846
|
-
if (
|
|
1847
|
-
|
|
1232
|
+
if (page !== undefined) {
|
|
1233
|
+
localVarQueryParameter['page'] = page;
|
|
1848
1234
|
}
|
|
1849
|
-
(
|
|
1850
|
-
|
|
1851
|
-
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
1852
|
-
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(dataTypesBulkDocumentRequest, localVarRequestOptions, configuration);
|
|
1853
|
-
return {
|
|
1854
|
-
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1855
|
-
options: localVarRequestOptions,
|
|
1856
|
-
};
|
|
1857
|
-
},
|
|
1858
|
-
/**
|
|
1859
|
-
* Remove a document from the store\'s search index by ID. **Auth:** `x-storeid` and `x-store-write-secret`. Path `xStoreID` must match the `x-storeid` header.
|
|
1860
|
-
* @summary Delete a document
|
|
1861
|
-
* @param {string} xStoreid Store ID (from dashboard)
|
|
1862
|
-
* @param {string} xStoreWriteSecret Store write secret
|
|
1863
|
-
* @param {string} xStoreID Store ID (must match x-storeid header)
|
|
1864
|
-
* @param {string} documentID Document ID to delete
|
|
1865
|
-
* @param {*} [options] Override http request option.
|
|
1866
|
-
* @throws {RequiredError}
|
|
1867
|
-
*/
|
|
1868
|
-
apiV1StoresXStoreIDDocumentsDocumentIDDelete: async (xStoreid, xStoreWriteSecret, xStoreID, documentID, options = {}) => {
|
|
1869
|
-
// verify required parameter 'xStoreid' is not null or undefined
|
|
1870
|
-
(0, common_1.assertParamExists)('apiV1StoresXStoreIDDocumentsDocumentIDDelete', 'xStoreid', xStoreid);
|
|
1871
|
-
// verify required parameter 'xStoreWriteSecret' is not null or undefined
|
|
1872
|
-
(0, common_1.assertParamExists)('apiV1StoresXStoreIDDocumentsDocumentIDDelete', 'xStoreWriteSecret', xStoreWriteSecret);
|
|
1873
|
-
// verify required parameter 'xStoreID' is not null or undefined
|
|
1874
|
-
(0, common_1.assertParamExists)('apiV1StoresXStoreIDDocumentsDocumentIDDelete', 'xStoreID', xStoreID);
|
|
1875
|
-
// verify required parameter 'documentID' is not null or undefined
|
|
1876
|
-
(0, common_1.assertParamExists)('apiV1StoresXStoreIDDocumentsDocumentIDDelete', 'documentID', documentID);
|
|
1877
|
-
const localVarPath = `/api/v1/stores/{xStoreID}/documents/{documentID}`
|
|
1878
|
-
.replace(`{${"xStoreID"}}`, encodeURIComponent(String(xStoreID)))
|
|
1879
|
-
.replace(`{${"documentID"}}`, encodeURIComponent(String(documentID)));
|
|
1880
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1881
|
-
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1882
|
-
let baseOptions;
|
|
1883
|
-
if (configuration) {
|
|
1884
|
-
baseOptions = configuration.baseOptions;
|
|
1235
|
+
if (perPage !== undefined) {
|
|
1236
|
+
localVarQueryParameter['per_page'] = perPage;
|
|
1885
1237
|
}
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
const localVarQueryParameter = {};
|
|
1889
|
-
// authentication ApiKeyAuth required
|
|
1890
|
-
await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-storesecret", configuration);
|
|
1891
|
-
localVarHeaderParameter['Accept'] = 'application/json';
|
|
1892
|
-
if (xStoreid != null) {
|
|
1893
|
-
localVarHeaderParameter['x-storeid'] = String(xStoreid);
|
|
1238
|
+
if (sortBy !== undefined) {
|
|
1239
|
+
localVarQueryParameter['sort_by'] = sortBy;
|
|
1894
1240
|
}
|
|
1895
|
-
if (
|
|
1896
|
-
|
|
1241
|
+
if (filterBy !== undefined) {
|
|
1242
|
+
localVarQueryParameter['filter_by'] = filterBy;
|
|
1897
1243
|
}
|
|
1898
|
-
(
|
|
1899
|
-
|
|
1900
|
-
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
1901
|
-
return {
|
|
1902
|
-
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1903
|
-
options: localVarRequestOptions,
|
|
1904
|
-
};
|
|
1905
|
-
},
|
|
1906
|
-
/**
|
|
1907
|
-
* Retrieve a single document from the store\'s search index by ID. **Auth:** `x-storeid` and `x-storesecret` (read secret). Path `xStoreID` must match the `x-storeid` header. Used by product pages and PDP.
|
|
1908
|
-
* @summary Get a document by ID
|
|
1909
|
-
* @param {string} xStoreid Store ID (from dashboard)
|
|
1910
|
-
* @param {string} xStoresecret Store read secret
|
|
1911
|
-
* @param {string} xStoreID Store ID (must match x-storeid header)
|
|
1912
|
-
* @param {string} documentID Document ID to retrieve
|
|
1913
|
-
* @param {*} [options] Override http request option.
|
|
1914
|
-
* @throws {RequiredError}
|
|
1915
|
-
*/
|
|
1916
|
-
apiV1StoresXStoreIDDocumentsDocumentIDGet: async (xStoreid, xStoresecret, xStoreID, documentID, options = {}) => {
|
|
1917
|
-
// verify required parameter 'xStoreid' is not null or undefined
|
|
1918
|
-
(0, common_1.assertParamExists)('apiV1StoresXStoreIDDocumentsDocumentIDGet', 'xStoreid', xStoreid);
|
|
1919
|
-
// verify required parameter 'xStoresecret' is not null or undefined
|
|
1920
|
-
(0, common_1.assertParamExists)('apiV1StoresXStoreIDDocumentsDocumentIDGet', 'xStoresecret', xStoresecret);
|
|
1921
|
-
// verify required parameter 'xStoreID' is not null or undefined
|
|
1922
|
-
(0, common_1.assertParamExists)('apiV1StoresXStoreIDDocumentsDocumentIDGet', 'xStoreID', xStoreID);
|
|
1923
|
-
// verify required parameter 'documentID' is not null or undefined
|
|
1924
|
-
(0, common_1.assertParamExists)('apiV1StoresXStoreIDDocumentsDocumentIDGet', 'documentID', documentID);
|
|
1925
|
-
const localVarPath = `/api/v1/stores/{xStoreID}/documents/{documentID}`
|
|
1926
|
-
.replace(`{${"xStoreID"}}`, encodeURIComponent(String(xStoreID)))
|
|
1927
|
-
.replace(`{${"documentID"}}`, encodeURIComponent(String(documentID)));
|
|
1928
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1929
|
-
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1930
|
-
let baseOptions;
|
|
1931
|
-
if (configuration) {
|
|
1932
|
-
baseOptions = configuration.baseOptions;
|
|
1244
|
+
if (facetBy !== undefined) {
|
|
1245
|
+
localVarQueryParameter['facet_by'] = facetBy;
|
|
1933
1246
|
}
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
const localVarQueryParameter = {};
|
|
1937
|
-
// authentication ApiKeyAuth required
|
|
1938
|
-
await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-storesecret", configuration);
|
|
1939
|
-
localVarHeaderParameter['Accept'] = 'application/json';
|
|
1940
|
-
if (xStoreid != null) {
|
|
1941
|
-
localVarHeaderParameter['x-storeid'] = String(xStoreid);
|
|
1247
|
+
if (maxFacetValues !== undefined) {
|
|
1248
|
+
localVarQueryParameter['max_facet_values'] = maxFacetValues;
|
|
1942
1249
|
}
|
|
1943
|
-
if (
|
|
1944
|
-
|
|
1250
|
+
if (widgetMode !== undefined) {
|
|
1251
|
+
localVarQueryParameter['widget_mode'] = widgetMode;
|
|
1945
1252
|
}
|
|
1946
|
-
(
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1253
|
+
if (includeSuggestions !== undefined) {
|
|
1254
|
+
localVarQueryParameter['include_suggestions'] = includeSuggestions;
|
|
1255
|
+
}
|
|
1256
|
+
if (suggestionsLimit !== undefined) {
|
|
1257
|
+
localVarQueryParameter['suggestions_limit'] = suggestionsLimit;
|
|
1258
|
+
}
|
|
1259
|
+
if (analyticsTags !== undefined) {
|
|
1260
|
+
localVarQueryParameter['analytics_tags'] = analyticsTags;
|
|
1261
|
+
}
|
|
1262
|
+
if (stopwordSets !== undefined) {
|
|
1263
|
+
localVarQueryParameter['stopword_sets'] = stopwordSets;
|
|
1264
|
+
}
|
|
1265
|
+
if (synonymSets !== undefined) {
|
|
1266
|
+
localVarQueryParameter['synonym_sets'] = synonymSets;
|
|
1267
|
+
}
|
|
1268
|
+
if (searchFields !== undefined) {
|
|
1269
|
+
localVarQueryParameter['search_fields'] = searchFields;
|
|
1270
|
+
}
|
|
1271
|
+
if (returnFields !== undefined) {
|
|
1272
|
+
localVarQueryParameter['return_fields'] = returnFields;
|
|
1273
|
+
}
|
|
1274
|
+
if (omitFields !== undefined) {
|
|
1275
|
+
localVarQueryParameter['omit_fields'] = omitFields;
|
|
1276
|
+
}
|
|
1277
|
+
if (snippetFields !== undefined) {
|
|
1278
|
+
localVarQueryParameter['snippet_fields'] = snippetFields;
|
|
1279
|
+
}
|
|
1280
|
+
if (fullSnippetFields !== undefined) {
|
|
1281
|
+
localVarQueryParameter['full_snippet_fields'] = fullSnippetFields;
|
|
1282
|
+
}
|
|
1283
|
+
if (fieldWeights !== undefined) {
|
|
1284
|
+
localVarQueryParameter['field_weights'] = fieldWeights;
|
|
1285
|
+
}
|
|
1286
|
+
if (groupField !== undefined) {
|
|
1287
|
+
localVarQueryParameter['group_field'] = groupField;
|
|
1288
|
+
}
|
|
1289
|
+
if (groupSize !== undefined) {
|
|
1290
|
+
localVarQueryParameter['group_size'] = groupSize;
|
|
1291
|
+
}
|
|
1292
|
+
if (snippetPrefix !== undefined) {
|
|
1293
|
+
localVarQueryParameter['snippet_prefix'] = snippetPrefix;
|
|
1294
|
+
}
|
|
1295
|
+
if (snippetSuffix !== undefined) {
|
|
1296
|
+
localVarQueryParameter['snippet_suffix'] = snippetSuffix;
|
|
1297
|
+
}
|
|
1298
|
+
if (snippetTokenLimit !== undefined) {
|
|
1299
|
+
localVarQueryParameter['snippet_token_limit'] = snippetTokenLimit;
|
|
1300
|
+
}
|
|
1301
|
+
if (snippetMinLen !== undefined) {
|
|
1302
|
+
localVarQueryParameter['snippet_min_len'] = snippetMinLen;
|
|
1303
|
+
}
|
|
1304
|
+
if (includeSnippets !== undefined) {
|
|
1305
|
+
localVarQueryParameter['include_snippets'] = includeSnippets;
|
|
1306
|
+
}
|
|
1307
|
+
if (prefixMode !== undefined) {
|
|
1308
|
+
localVarQueryParameter['prefix_mode'] = prefixMode;
|
|
1309
|
+
}
|
|
1310
|
+
if (infixMode !== undefined) {
|
|
1311
|
+
localVarQueryParameter['infix_mode'] = infixMode;
|
|
1312
|
+
}
|
|
1313
|
+
if (typoMax !== undefined) {
|
|
1314
|
+
localVarQueryParameter['typo_max'] = typoMax;
|
|
1315
|
+
}
|
|
1316
|
+
if (typoMinLen1 !== undefined) {
|
|
1317
|
+
localVarQueryParameter['typo_min_len_1'] = typoMinLen1;
|
|
1318
|
+
}
|
|
1319
|
+
if (typoMinLen2 !== undefined) {
|
|
1320
|
+
localVarQueryParameter['typo_min_len_2'] = typoMinLen2;
|
|
1321
|
+
}
|
|
1322
|
+
if (searchTimeoutMs !== undefined) {
|
|
1323
|
+
localVarQueryParameter['search_timeout_ms'] = searchTimeoutMs;
|
|
1324
|
+
}
|
|
1325
|
+
if (requireAllTerms !== undefined) {
|
|
1326
|
+
localVarQueryParameter['require_all_terms'] = requireAllTerms;
|
|
1327
|
+
}
|
|
1328
|
+
if (exactMatchBoost !== undefined) {
|
|
1329
|
+
localVarQueryParameter['exact_match_boost'] = exactMatchBoost;
|
|
1330
|
+
}
|
|
1331
|
+
if (cacheResults !== undefined) {
|
|
1332
|
+
localVarQueryParameter['cache_results'] = cacheResults;
|
|
1333
|
+
}
|
|
1334
|
+
if (applyRules !== undefined) {
|
|
1335
|
+
localVarQueryParameter['apply_rules'] = applyRules;
|
|
1336
|
+
}
|
|
1337
|
+
if (presetName !== undefined) {
|
|
1338
|
+
localVarQueryParameter['preset_name'] = presetName;
|
|
1339
|
+
}
|
|
1340
|
+
if (facetSearchText !== undefined) {
|
|
1341
|
+
localVarQueryParameter['facet_search_text'] = facetSearchText;
|
|
1980
1342
|
}
|
|
1981
|
-
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
|
|
1982
|
-
const localVarHeaderParameter = {};
|
|
1983
|
-
const localVarQueryParameter = {};
|
|
1984
|
-
// authentication ApiKeyAuth required
|
|
1985
|
-
await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-storesecret", configuration);
|
|
1986
|
-
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1987
1343
|
localVarHeaderParameter['Accept'] = 'application/json';
|
|
1988
1344
|
if (xStoreid != null) {
|
|
1989
1345
|
localVarHeaderParameter['x-storeid'] = String(xStoreid);
|
|
1990
1346
|
}
|
|
1991
|
-
if (
|
|
1992
|
-
localVarHeaderParameter['x-
|
|
1347
|
+
if (xStoresecret != null) {
|
|
1348
|
+
localVarHeaderParameter['x-storesecret'] = String(xStoresecret);
|
|
1349
|
+
}
|
|
1350
|
+
if (xUserId != null) {
|
|
1351
|
+
localVarHeaderParameter['x-user-id'] = String(xUserId);
|
|
1352
|
+
}
|
|
1353
|
+
if (xAnonId != null) {
|
|
1354
|
+
localVarHeaderParameter['x-anon-id'] = String(xAnonId);
|
|
1355
|
+
}
|
|
1356
|
+
if (xSessionId != null) {
|
|
1357
|
+
localVarHeaderParameter['x-session-id'] = String(xSessionId);
|
|
1993
1358
|
}
|
|
1994
1359
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1995
1360
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1996
1361
|
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
1997
|
-
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(dataTypesDocumentRequest, localVarRequestOptions, configuration);
|
|
1998
1362
|
return {
|
|
1999
1363
|
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
2000
1364
|
options: localVarRequestOptions,
|
|
@@ -2002,220 +1366,209 @@ const SDKDocumentsApiAxiosParamCreator = function (configuration) {
|
|
|
2002
1366
|
},
|
|
2003
1367
|
};
|
|
2004
1368
|
};
|
|
2005
|
-
exports.
|
|
1369
|
+
exports.SearchApiAxiosParamCreator = SearchApiAxiosParamCreator;
|
|
2006
1370
|
/**
|
|
2007
|
-
*
|
|
1371
|
+
* SearchApi - functional programming interface
|
|
2008
1372
|
*/
|
|
2009
|
-
const
|
|
2010
|
-
const localVarAxiosParamCreator = (0, exports.
|
|
1373
|
+
const SearchApiFp = function (configuration) {
|
|
1374
|
+
const localVarAxiosParamCreator = (0, exports.SearchApiAxiosParamCreator)(configuration);
|
|
2011
1375
|
return {
|
|
2012
1376
|
/**
|
|
2013
|
-
*
|
|
2014
|
-
* @summary
|
|
2015
|
-
* @param {string} xStoreid Store ID (from dashboard)
|
|
2016
|
-
* @param {string} xStoreWriteSecret Store write secret
|
|
2017
|
-
* @param {string} xStoreID Store ID (must match x-storeid header)
|
|
2018
|
-
* @param {DataTypesBulkDocumentRequest} dataTypesBulkDocumentRequest List of operations
|
|
2019
|
-
* @param {*} [options] Override http request option.
|
|
2020
|
-
* @throws {RequiredError}
|
|
2021
|
-
*/
|
|
2022
|
-
async apiV1StoresXStoreIDDocumentsBulkPost(xStoreid, xStoreWriteSecret, xStoreID, dataTypesBulkDocumentRequest, options) {
|
|
2023
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1StoresXStoreIDDocumentsBulkPost(xStoreid, xStoreWriteSecret, xStoreID, dataTypesBulkDocumentRequest, options);
|
|
2024
|
-
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2025
|
-
const localVarOperationServerBasePath = base_1.operationServerMap['SDKDocumentsApi.apiV1StoresXStoreIDDocumentsBulkPost']?.[localVarOperationServerIndex]?.url;
|
|
2026
|
-
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2027
|
-
},
|
|
2028
|
-
/**
|
|
2029
|
-
* Remove a document from the store\'s search index by ID. **Auth:** `x-storeid` and `x-store-write-secret`. Path `xStoreID` must match the `x-storeid` header.
|
|
2030
|
-
* @summary Delete a document
|
|
2031
|
-
* @param {string} xStoreid Store ID (from dashboard)
|
|
2032
|
-
* @param {string} xStoreWriteSecret Store write secret
|
|
2033
|
-
* @param {string} xStoreID Store ID (must match x-storeid header)
|
|
2034
|
-
* @param {string} documentID Document ID to delete
|
|
2035
|
-
* @param {*} [options] Override http request option.
|
|
2036
|
-
* @throws {RequiredError}
|
|
2037
|
-
*/
|
|
2038
|
-
async apiV1StoresXStoreIDDocumentsDocumentIDDelete(xStoreid, xStoreWriteSecret, xStoreID, documentID, options) {
|
|
2039
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1StoresXStoreIDDocumentsDocumentIDDelete(xStoreid, xStoreWriteSecret, xStoreID, documentID, options);
|
|
2040
|
-
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2041
|
-
const localVarOperationServerBasePath = base_1.operationServerMap['SDKDocumentsApi.apiV1StoresXStoreIDDocumentsDocumentIDDelete']?.[localVarOperationServerIndex]?.url;
|
|
2042
|
-
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2043
|
-
},
|
|
2044
|
-
/**
|
|
2045
|
-
* Retrieve a single document from the store\'s search index by ID. **Auth:** `x-storeid` and `x-storesecret` (read secret). Path `xStoreID` must match the `x-storeid` header. Used by product pages and PDP.
|
|
2046
|
-
* @summary Get a document by ID
|
|
2047
|
-
* @param {string} xStoreid Store ID (from dashboard)
|
|
2048
|
-
* @param {string} xStoresecret Store read secret
|
|
2049
|
-
* @param {string} xStoreID Store ID (must match x-storeid header)
|
|
2050
|
-
* @param {string} documentID Document ID to retrieve
|
|
2051
|
-
* @param {*} [options] Override http request option.
|
|
2052
|
-
* @throws {RequiredError}
|
|
2053
|
-
*/
|
|
2054
|
-
async apiV1StoresXStoreIDDocumentsDocumentIDGet(xStoreid, xStoresecret, xStoreID, documentID, options) {
|
|
2055
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1StoresXStoreIDDocumentsDocumentIDGet(xStoreid, xStoresecret, xStoreID, documentID, options);
|
|
2056
|
-
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2057
|
-
const localVarOperationServerBasePath = base_1.operationServerMap['SDKDocumentsApi.apiV1StoresXStoreIDDocumentsDocumentIDGet']?.[localVarOperationServerIndex]?.url;
|
|
2058
|
-
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2059
|
-
},
|
|
2060
|
-
/**
|
|
2061
|
-
* Add or update one document in the store\'s search index. **Auth:** `x-storeid` and `x-store-write-secret`. Path `xStoreID` must match the `x-storeid` header. If you omit document ID, one is generated; existing documents with the same ID are updated.
|
|
2062
|
-
* @summary Index a single document
|
|
1377
|
+
* 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
|
+
* @summary Search (GET)
|
|
2063
1379
|
* @param {string} xStoreid Store ID (from dashboard)
|
|
2064
|
-
* @param {string}
|
|
2065
|
-
* @param {string}
|
|
2066
|
-
* @param {
|
|
1380
|
+
* @param {string} xStoresecret Store read secret (from dashboard)
|
|
1381
|
+
* @param {string} q Search query
|
|
1382
|
+
* @param {string} [xUserId] User ID for personalization
|
|
1383
|
+
* @param {string} [xAnonId] Anonymous user ID for personalization
|
|
1384
|
+
* @param {string} [xSessionId] Session ID for personalization
|
|
1385
|
+
* @param {number} [page] Page number (default: 1)
|
|
1386
|
+
* @param {number} [perPage] Items per page (default: 10)
|
|
1387
|
+
* @param {string} [sortBy] Sort option (e.g., price:asc, created_at:desc)
|
|
1388
|
+
* @param {string} [filterBy] Filter string (e.g., category:shirts)
|
|
1389
|
+
* @param {string} [facetBy] Facet fields (comma-separated)
|
|
1390
|
+
* @param {number} [maxFacetValues] Maximum facet values to return
|
|
1391
|
+
* @param {boolean} [widgetMode] Return widget-formatted results
|
|
1392
|
+
* @param {boolean} [includeSuggestions] Include autocomplete suggestions
|
|
1393
|
+
* @param {number} [suggestionsLimit] Number of suggestions to return
|
|
1394
|
+
* @param {string} [analyticsTags] Analytics tags (comma-separated)
|
|
1395
|
+
* @param {string} [stopwordSets] Stopword set IDs (comma-separated)
|
|
1396
|
+
* @param {string} [synonymSets] Synonym set IDs (comma-separated)
|
|
1397
|
+
* @param {string} [searchFields] Fields to search in (comma-separated)
|
|
1398
|
+
* @param {string} [returnFields] Fields to return (comma-separated)
|
|
1399
|
+
* @param {string} [omitFields] Fields to omit (comma-separated)
|
|
1400
|
+
* @param {string} [snippetFields] Fields to generate snippets for (comma-separated)
|
|
1401
|
+
* @param {string} [fullSnippetFields] Fields to include full snippet (comma-separated)
|
|
1402
|
+
* @param {string} [fieldWeights] Field weights as comma-separated integers (e.g., 3,2,1)
|
|
1403
|
+
* @param {string} [groupField] Field to group results by
|
|
1404
|
+
* @param {number} [groupSize] Number of results per group
|
|
1405
|
+
* @param {string} [snippetPrefix] Prefix for highlighted snippets
|
|
1406
|
+
* @param {string} [snippetSuffix] Suffix for highlighted snippets
|
|
1407
|
+
* @param {number} [snippetTokenLimit] Maximum tokens in snippet
|
|
1408
|
+
* @param {number} [snippetMinLen] Minimum snippet length
|
|
1409
|
+
* @param {boolean} [includeSnippets] Include snippets in results
|
|
1410
|
+
* @param {string} [prefixMode] Prefix matching mode (e.g., always, fallback, off)
|
|
1411
|
+
* @param {string} [infixMode] Infix matching mode (e.g., always, fallback, off)
|
|
1412
|
+
* @param {number} [typoMax] Maximum typo tolerance
|
|
1413
|
+
* @param {number} [typoMinLen1] Min word length for 1 typo
|
|
1414
|
+
* @param {number} [typoMinLen2] Min word length for 2 typos
|
|
1415
|
+
* @param {number} [searchTimeoutMs] Search timeout in milliseconds
|
|
1416
|
+
* @param {boolean} [requireAllTerms] Require all search terms to match
|
|
1417
|
+
* @param {boolean} [exactMatchBoost] Boost exact matches
|
|
1418
|
+
* @param {boolean} [cacheResults] Cache search results
|
|
1419
|
+
* @param {boolean} [applyRules] Apply search rules
|
|
1420
|
+
* @param {string} [presetName] Search preset name to use
|
|
1421
|
+
* @param {string} [facetSearchText] Text to filter facet values
|
|
2067
1422
|
* @param {*} [options] Override http request option.
|
|
2068
1423
|
* @throws {RequiredError}
|
|
2069
1424
|
*/
|
|
2070
|
-
async
|
|
2071
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.
|
|
1425
|
+
async 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) {
|
|
1426
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.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);
|
|
2072
1427
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2073
|
-
const localVarOperationServerBasePath = base_1.operationServerMap['
|
|
1428
|
+
const localVarOperationServerBasePath = base_1.operationServerMap['SearchApi.v1SearchGet']?.[localVarOperationServerIndex]?.url;
|
|
2074
1429
|
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2075
1430
|
},
|
|
2076
1431
|
};
|
|
2077
1432
|
};
|
|
2078
|
-
exports.
|
|
1433
|
+
exports.SearchApiFp = SearchApiFp;
|
|
2079
1434
|
/**
|
|
2080
|
-
*
|
|
1435
|
+
* SearchApi - factory interface
|
|
2081
1436
|
*/
|
|
2082
|
-
const
|
|
2083
|
-
const localVarFp = (0, exports.
|
|
1437
|
+
const SearchApiFactory = function (configuration, basePath, axios) {
|
|
1438
|
+
const localVarFp = (0, exports.SearchApiFp)(configuration);
|
|
2084
1439
|
return {
|
|
2085
1440
|
/**
|
|
2086
|
-
*
|
|
2087
|
-
* @summary
|
|
2088
|
-
* @param {string} xStoreid Store ID (from dashboard)
|
|
2089
|
-
* @param {string} xStoreWriteSecret Store write secret
|
|
2090
|
-
* @param {string} xStoreID Store ID (must match x-storeid header)
|
|
2091
|
-
* @param {DataTypesBulkDocumentRequest} dataTypesBulkDocumentRequest List of operations
|
|
2092
|
-
* @param {*} [options] Override http request option.
|
|
2093
|
-
* @throws {RequiredError}
|
|
2094
|
-
*/
|
|
2095
|
-
apiV1StoresXStoreIDDocumentsBulkPost(xStoreid, xStoreWriteSecret, xStoreID, dataTypesBulkDocumentRequest, options) {
|
|
2096
|
-
return localVarFp.apiV1StoresXStoreIDDocumentsBulkPost(xStoreid, xStoreWriteSecret, xStoreID, dataTypesBulkDocumentRequest, options).then((request) => request(axios, basePath));
|
|
2097
|
-
},
|
|
2098
|
-
/**
|
|
2099
|
-
* Remove a document from the store\'s search index by ID. **Auth:** `x-storeid` and `x-store-write-secret`. Path `xStoreID` must match the `x-storeid` header.
|
|
2100
|
-
* @summary Delete a document
|
|
2101
|
-
* @param {string} xStoreid Store ID (from dashboard)
|
|
2102
|
-
* @param {string} xStoreWriteSecret Store write secret
|
|
2103
|
-
* @param {string} xStoreID Store ID (must match x-storeid header)
|
|
2104
|
-
* @param {string} documentID Document ID to delete
|
|
2105
|
-
* @param {*} [options] Override http request option.
|
|
2106
|
-
* @throws {RequiredError}
|
|
2107
|
-
*/
|
|
2108
|
-
apiV1StoresXStoreIDDocumentsDocumentIDDelete(xStoreid, xStoreWriteSecret, xStoreID, documentID, options) {
|
|
2109
|
-
return localVarFp.apiV1StoresXStoreIDDocumentsDocumentIDDelete(xStoreid, xStoreWriteSecret, xStoreID, documentID, options).then((request) => request(axios, basePath));
|
|
2110
|
-
},
|
|
2111
|
-
/**
|
|
2112
|
-
* Retrieve a single document from the store\'s search index by ID. **Auth:** `x-storeid` and `x-storesecret` (read secret). Path `xStoreID` must match the `x-storeid` header. Used by product pages and PDP.
|
|
2113
|
-
* @summary Get a document by ID
|
|
2114
|
-
* @param {string} xStoreid Store ID (from dashboard)
|
|
2115
|
-
* @param {string} xStoresecret Store read secret
|
|
2116
|
-
* @param {string} xStoreID Store ID (must match x-storeid header)
|
|
2117
|
-
* @param {string} documentID Document ID to retrieve
|
|
2118
|
-
* @param {*} [options] Override http request option.
|
|
2119
|
-
* @throws {RequiredError}
|
|
2120
|
-
*/
|
|
2121
|
-
apiV1StoresXStoreIDDocumentsDocumentIDGet(xStoreid, xStoresecret, xStoreID, documentID, options) {
|
|
2122
|
-
return localVarFp.apiV1StoresXStoreIDDocumentsDocumentIDGet(xStoreid, xStoresecret, xStoreID, documentID, options).then((request) => request(axios, basePath));
|
|
2123
|
-
},
|
|
2124
|
-
/**
|
|
2125
|
-
* Add or update one document in the store\'s search index. **Auth:** `x-storeid` and `x-store-write-secret`. Path `xStoreID` must match the `x-storeid` header. If you omit document ID, one is generated; existing documents with the same ID are updated.
|
|
2126
|
-
* @summary Index a single document
|
|
1441
|
+
* 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
|
+
* @summary Search (GET)
|
|
2127
1443
|
* @param {string} xStoreid Store ID (from dashboard)
|
|
2128
|
-
* @param {string}
|
|
2129
|
-
* @param {string}
|
|
2130
|
-
* @param {
|
|
2131
|
-
* @param {
|
|
2132
|
-
* @
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
}
|
|
2139
|
-
|
|
1444
|
+
* @param {string} xStoresecret Store read secret (from dashboard)
|
|
1445
|
+
* @param {string} q Search query
|
|
1446
|
+
* @param {string} [xUserId] User ID for personalization
|
|
1447
|
+
* @param {string} [xAnonId] Anonymous user ID for personalization
|
|
1448
|
+
* @param {string} [xSessionId] Session ID for personalization
|
|
1449
|
+
* @param {number} [page] Page number (default: 1)
|
|
1450
|
+
* @param {number} [perPage] Items per page (default: 10)
|
|
1451
|
+
* @param {string} [sortBy] Sort option (e.g., price:asc, created_at:desc)
|
|
1452
|
+
* @param {string} [filterBy] Filter string (e.g., category:shirts)
|
|
1453
|
+
* @param {string} [facetBy] Facet fields (comma-separated)
|
|
1454
|
+
* @param {number} [maxFacetValues] Maximum facet values to return
|
|
1455
|
+
* @param {boolean} [widgetMode] Return widget-formatted results
|
|
1456
|
+
* @param {boolean} [includeSuggestions] Include autocomplete suggestions
|
|
1457
|
+
* @param {number} [suggestionsLimit] Number of suggestions to return
|
|
1458
|
+
* @param {string} [analyticsTags] Analytics tags (comma-separated)
|
|
1459
|
+
* @param {string} [stopwordSets] Stopword set IDs (comma-separated)
|
|
1460
|
+
* @param {string} [synonymSets] Synonym set IDs (comma-separated)
|
|
1461
|
+
* @param {string} [searchFields] Fields to search in (comma-separated)
|
|
1462
|
+
* @param {string} [returnFields] Fields to return (comma-separated)
|
|
1463
|
+
* @param {string} [omitFields] Fields to omit (comma-separated)
|
|
1464
|
+
* @param {string} [snippetFields] Fields to generate snippets for (comma-separated)
|
|
1465
|
+
* @param {string} [fullSnippetFields] Fields to include full snippet (comma-separated)
|
|
1466
|
+
* @param {string} [fieldWeights] Field weights as comma-separated integers (e.g., 3,2,1)
|
|
1467
|
+
* @param {string} [groupField] Field to group results by
|
|
1468
|
+
* @param {number} [groupSize] Number of results per group
|
|
1469
|
+
* @param {string} [snippetPrefix] Prefix for highlighted snippets
|
|
1470
|
+
* @param {string} [snippetSuffix] Suffix for highlighted snippets
|
|
1471
|
+
* @param {number} [snippetTokenLimit] Maximum tokens in snippet
|
|
1472
|
+
* @param {number} [snippetMinLen] Minimum snippet length
|
|
1473
|
+
* @param {boolean} [includeSnippets] Include snippets in results
|
|
1474
|
+
* @param {string} [prefixMode] Prefix matching mode (e.g., always, fallback, off)
|
|
1475
|
+
* @param {string} [infixMode] Infix matching mode (e.g., always, fallback, off)
|
|
1476
|
+
* @param {number} [typoMax] Maximum typo tolerance
|
|
1477
|
+
* @param {number} [typoMinLen1] Min word length for 1 typo
|
|
1478
|
+
* @param {number} [typoMinLen2] Min word length for 2 typos
|
|
1479
|
+
* @param {number} [searchTimeoutMs] Search timeout in milliseconds
|
|
1480
|
+
* @param {boolean} [requireAllTerms] Require all search terms to match
|
|
1481
|
+
* @param {boolean} [exactMatchBoost] Boost exact matches
|
|
1482
|
+
* @param {boolean} [cacheResults] Cache search results
|
|
1483
|
+
* @param {boolean} [applyRules] Apply search rules
|
|
1484
|
+
* @param {string} [presetName] Search preset name to use
|
|
1485
|
+
* @param {string} [facetSearchText] Text to filter facet values
|
|
1486
|
+
* @param {*} [options] Override http request option.
|
|
1487
|
+
* @throws {RequiredError}
|
|
1488
|
+
*/
|
|
1489
|
+
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
|
+
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
|
+
},
|
|
1492
|
+
};
|
|
1493
|
+
};
|
|
1494
|
+
exports.SearchApiFactory = SearchApiFactory;
|
|
2140
1495
|
/**
|
|
2141
|
-
*
|
|
1496
|
+
* SearchApi - object-oriented interface
|
|
2142
1497
|
*/
|
|
2143
|
-
class
|
|
2144
|
-
/**
|
|
2145
|
-
* Run multiple document operations in one request (insert, update, upsert, delete). **Auth:** `x-storeid` and `x-store-write-secret`. Path `xStoreID` must match the `x-storeid` header. Each item can specify its own action.
|
|
2146
|
-
* @summary Bulk index documents
|
|
2147
|
-
* @param {string} xStoreid Store ID (from dashboard)
|
|
2148
|
-
* @param {string} xStoreWriteSecret Store write secret
|
|
2149
|
-
* @param {string} xStoreID Store ID (must match x-storeid header)
|
|
2150
|
-
* @param {DataTypesBulkDocumentRequest} dataTypesBulkDocumentRequest List of operations
|
|
2151
|
-
* @param {*} [options] Override http request option.
|
|
2152
|
-
* @throws {RequiredError}
|
|
2153
|
-
*/
|
|
2154
|
-
apiV1StoresXStoreIDDocumentsBulkPost(xStoreid, xStoreWriteSecret, xStoreID, dataTypesBulkDocumentRequest, options) {
|
|
2155
|
-
return (0, exports.SDKDocumentsApiFp)(this.configuration).apiV1StoresXStoreIDDocumentsBulkPost(xStoreid, xStoreWriteSecret, xStoreID, dataTypesBulkDocumentRequest, options).then((request) => request(this.axios, this.basePath));
|
|
2156
|
-
}
|
|
2157
|
-
/**
|
|
2158
|
-
* Remove a document from the store\'s search index by ID. **Auth:** `x-storeid` and `x-store-write-secret`. Path `xStoreID` must match the `x-storeid` header.
|
|
2159
|
-
* @summary Delete a document
|
|
2160
|
-
* @param {string} xStoreid Store ID (from dashboard)
|
|
2161
|
-
* @param {string} xStoreWriteSecret Store write secret
|
|
2162
|
-
* @param {string} xStoreID Store ID (must match x-storeid header)
|
|
2163
|
-
* @param {string} documentID Document ID to delete
|
|
2164
|
-
* @param {*} [options] Override http request option.
|
|
2165
|
-
* @throws {RequiredError}
|
|
2166
|
-
*/
|
|
2167
|
-
apiV1StoresXStoreIDDocumentsDocumentIDDelete(xStoreid, xStoreWriteSecret, xStoreID, documentID, options) {
|
|
2168
|
-
return (0, exports.SDKDocumentsApiFp)(this.configuration).apiV1StoresXStoreIDDocumentsDocumentIDDelete(xStoreid, xStoreWriteSecret, xStoreID, documentID, options).then((request) => request(this.axios, this.basePath));
|
|
2169
|
-
}
|
|
2170
|
-
/**
|
|
2171
|
-
* Retrieve a single document from the store\'s search index by ID. **Auth:** `x-storeid` and `x-storesecret` (read secret). Path `xStoreID` must match the `x-storeid` header. Used by product pages and PDP.
|
|
2172
|
-
* @summary Get a document by ID
|
|
2173
|
-
* @param {string} xStoreid Store ID (from dashboard)
|
|
2174
|
-
* @param {string} xStoresecret Store read secret
|
|
2175
|
-
* @param {string} xStoreID Store ID (must match x-storeid header)
|
|
2176
|
-
* @param {string} documentID Document ID to retrieve
|
|
2177
|
-
* @param {*} [options] Override http request option.
|
|
2178
|
-
* @throws {RequiredError}
|
|
2179
|
-
*/
|
|
2180
|
-
apiV1StoresXStoreIDDocumentsDocumentIDGet(xStoreid, xStoresecret, xStoreID, documentID, options) {
|
|
2181
|
-
return (0, exports.SDKDocumentsApiFp)(this.configuration).apiV1StoresXStoreIDDocumentsDocumentIDGet(xStoreid, xStoresecret, xStoreID, documentID, options).then((request) => request(this.axios, this.basePath));
|
|
2182
|
-
}
|
|
1498
|
+
class SearchApi extends base_1.BaseAPI {
|
|
2183
1499
|
/**
|
|
2184
|
-
*
|
|
2185
|
-
* @summary
|
|
1500
|
+
* 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
|
+
* @summary Search (GET)
|
|
2186
1502
|
* @param {string} xStoreid Store ID (from dashboard)
|
|
2187
|
-
* @param {string}
|
|
2188
|
-
* @param {string}
|
|
2189
|
-
* @param {
|
|
1503
|
+
* @param {string} xStoresecret Store read secret (from dashboard)
|
|
1504
|
+
* @param {string} q Search query
|
|
1505
|
+
* @param {string} [xUserId] User ID for personalization
|
|
1506
|
+
* @param {string} [xAnonId] Anonymous user ID for personalization
|
|
1507
|
+
* @param {string} [xSessionId] Session ID for personalization
|
|
1508
|
+
* @param {number} [page] Page number (default: 1)
|
|
1509
|
+
* @param {number} [perPage] Items per page (default: 10)
|
|
1510
|
+
* @param {string} [sortBy] Sort option (e.g., price:asc, created_at:desc)
|
|
1511
|
+
* @param {string} [filterBy] Filter string (e.g., category:shirts)
|
|
1512
|
+
* @param {string} [facetBy] Facet fields (comma-separated)
|
|
1513
|
+
* @param {number} [maxFacetValues] Maximum facet values to return
|
|
1514
|
+
* @param {boolean} [widgetMode] Return widget-formatted results
|
|
1515
|
+
* @param {boolean} [includeSuggestions] Include autocomplete suggestions
|
|
1516
|
+
* @param {number} [suggestionsLimit] Number of suggestions to return
|
|
1517
|
+
* @param {string} [analyticsTags] Analytics tags (comma-separated)
|
|
1518
|
+
* @param {string} [stopwordSets] Stopword set IDs (comma-separated)
|
|
1519
|
+
* @param {string} [synonymSets] Synonym set IDs (comma-separated)
|
|
1520
|
+
* @param {string} [searchFields] Fields to search in (comma-separated)
|
|
1521
|
+
* @param {string} [returnFields] Fields to return (comma-separated)
|
|
1522
|
+
* @param {string} [omitFields] Fields to omit (comma-separated)
|
|
1523
|
+
* @param {string} [snippetFields] Fields to generate snippets for (comma-separated)
|
|
1524
|
+
* @param {string} [fullSnippetFields] Fields to include full snippet (comma-separated)
|
|
1525
|
+
* @param {string} [fieldWeights] Field weights as comma-separated integers (e.g., 3,2,1)
|
|
1526
|
+
* @param {string} [groupField] Field to group results by
|
|
1527
|
+
* @param {number} [groupSize] Number of results per group
|
|
1528
|
+
* @param {string} [snippetPrefix] Prefix for highlighted snippets
|
|
1529
|
+
* @param {string} [snippetSuffix] Suffix for highlighted snippets
|
|
1530
|
+
* @param {number} [snippetTokenLimit] Maximum tokens in snippet
|
|
1531
|
+
* @param {number} [snippetMinLen] Minimum snippet length
|
|
1532
|
+
* @param {boolean} [includeSnippets] Include snippets in results
|
|
1533
|
+
* @param {string} [prefixMode] Prefix matching mode (e.g., always, fallback, off)
|
|
1534
|
+
* @param {string} [infixMode] Infix matching mode (e.g., always, fallback, off)
|
|
1535
|
+
* @param {number} [typoMax] Maximum typo tolerance
|
|
1536
|
+
* @param {number} [typoMinLen1] Min word length for 1 typo
|
|
1537
|
+
* @param {number} [typoMinLen2] Min word length for 2 typos
|
|
1538
|
+
* @param {number} [searchTimeoutMs] Search timeout in milliseconds
|
|
1539
|
+
* @param {boolean} [requireAllTerms] Require all search terms to match
|
|
1540
|
+
* @param {boolean} [exactMatchBoost] Boost exact matches
|
|
1541
|
+
* @param {boolean} [cacheResults] Cache search results
|
|
1542
|
+
* @param {boolean} [applyRules] Apply search rules
|
|
1543
|
+
* @param {string} [presetName] Search preset name to use
|
|
1544
|
+
* @param {string} [facetSearchText] Text to filter facet values
|
|
2190
1545
|
* @param {*} [options] Override http request option.
|
|
2191
1546
|
* @throws {RequiredError}
|
|
2192
1547
|
*/
|
|
2193
|
-
|
|
2194
|
-
return (0, exports.
|
|
1548
|
+
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
|
+
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));
|
|
2195
1550
|
}
|
|
2196
1551
|
}
|
|
2197
|
-
exports.
|
|
1552
|
+
exports.SearchApi = SearchApi;
|
|
2198
1553
|
/**
|
|
2199
|
-
*
|
|
1554
|
+
* StoreManagementApi - axios parameter creator
|
|
2200
1555
|
*/
|
|
2201
|
-
const
|
|
1556
|
+
const StoreManagementApiAxiosParamCreator = function (configuration) {
|
|
2202
1557
|
return {
|
|
2203
1558
|
/**
|
|
2204
|
-
* Returns
|
|
2205
|
-
* @summary Get
|
|
2206
|
-
* @param {string} xStoreid Store ID
|
|
1559
|
+
* Returns search and query-suggestions configuration for the store. **Auth:** `x-storeid` and `x-storesecret`.
|
|
1560
|
+
* @summary Get store configuration
|
|
1561
|
+
* @param {string} xStoreid Store ID (from dashboard)
|
|
2207
1562
|
* @param {string} xStoresecret Store read secret
|
|
2208
|
-
* @param {string} [xUserId] User ID (provide either x-user-id or x-anon-id)
|
|
2209
|
-
* @param {string} [xAnonId] Anonymous ID (provide either x-user-id or x-anon-id)
|
|
2210
1563
|
* @param {*} [options] Override http request option.
|
|
2211
1564
|
* @throws {RequiredError}
|
|
2212
1565
|
*/
|
|
2213
|
-
|
|
1566
|
+
apiV1StoresConfigGet: async (xStoreid, xStoresecret, options = {}) => {
|
|
2214
1567
|
// verify required parameter 'xStoreid' is not null or undefined
|
|
2215
|
-
(0, common_1.assertParamExists)('
|
|
1568
|
+
(0, common_1.assertParamExists)('apiV1StoresConfigGet', 'xStoreid', xStoreid);
|
|
2216
1569
|
// verify required parameter 'xStoresecret' is not null or undefined
|
|
2217
|
-
(0, common_1.assertParamExists)('
|
|
2218
|
-
const localVarPath = `/v1/
|
|
1570
|
+
(0, common_1.assertParamExists)('apiV1StoresConfigGet', 'xStoresecret', xStoresecret);
|
|
1571
|
+
const localVarPath = `/api/v1/stores/config`;
|
|
2219
1572
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2220
1573
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
2221
1574
|
let baseOptions;
|
|
@@ -2234,12 +1587,6 @@ const SDKExperimentsApiAxiosParamCreator = function (configuration) {
|
|
|
2234
1587
|
if (xStoresecret != null) {
|
|
2235
1588
|
localVarHeaderParameter['x-storesecret'] = String(xStoresecret);
|
|
2236
1589
|
}
|
|
2237
|
-
if (xUserId != null) {
|
|
2238
|
-
localVarHeaderParameter['x-user-id'] = String(xUserId);
|
|
2239
|
-
}
|
|
2240
|
-
if (xAnonId != null) {
|
|
2241
|
-
localVarHeaderParameter['x-anon-id'] = String(xAnonId);
|
|
2242
|
-
}
|
|
2243
1590
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
2244
1591
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2245
1592
|
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
@@ -2248,98 +1595,65 @@ const SDKExperimentsApiAxiosParamCreator = function (configuration) {
|
|
|
2248
1595
|
options: localVarRequestOptions,
|
|
2249
1596
|
};
|
|
2250
1597
|
},
|
|
2251
|
-
};
|
|
2252
|
-
};
|
|
2253
|
-
exports.SDKExperimentsApiAxiosParamCreator = SDKExperimentsApiAxiosParamCreator;
|
|
2254
|
-
/**
|
|
2255
|
-
* SDKExperimentsApi - functional programming interface
|
|
2256
|
-
*/
|
|
2257
|
-
const SDKExperimentsApiFp = function (configuration) {
|
|
2258
|
-
const localVarAxiosParamCreator = (0, exports.SDKExperimentsApiAxiosParamCreator)(configuration);
|
|
2259
|
-
return {
|
|
2260
|
-
/**
|
|
2261
|
-
* Returns variant assignments for all running experiments for the requesting user. Uses hash-based consistent assignment.
|
|
2262
|
-
* @summary Get experiment assignments for a user
|
|
2263
|
-
* @param {string} xStoreid Store ID
|
|
2264
|
-
* @param {string} xStoresecret Store read secret
|
|
2265
|
-
* @param {string} [xUserId] User ID (provide either x-user-id or x-anon-id)
|
|
2266
|
-
* @param {string} [xAnonId] Anonymous ID (provide either x-user-id or x-anon-id)
|
|
2267
|
-
* @param {*} [options] Override http request option.
|
|
2268
|
-
* @throws {RequiredError}
|
|
2269
|
-
*/
|
|
2270
|
-
async v1ExperimentsAssignmentGet(xStoreid, xStoresecret, xUserId, xAnonId, options) {
|
|
2271
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.v1ExperimentsAssignmentGet(xStoreid, xStoresecret, xUserId, xAnonId, options);
|
|
2272
|
-
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2273
|
-
const localVarOperationServerBasePath = base_1.operationServerMap['SDKExperimentsApi.v1ExperimentsAssignmentGet']?.[localVarOperationServerIndex]?.url;
|
|
2274
|
-
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2275
|
-
},
|
|
2276
|
-
};
|
|
2277
|
-
};
|
|
2278
|
-
exports.SDKExperimentsApiFp = SDKExperimentsApiFp;
|
|
2279
|
-
/**
|
|
2280
|
-
* SDKExperimentsApi - factory interface
|
|
2281
|
-
*/
|
|
2282
|
-
const SDKExperimentsApiFactory = function (configuration, basePath, axios) {
|
|
2283
|
-
const localVarFp = (0, exports.SDKExperimentsApiFp)(configuration);
|
|
2284
|
-
return {
|
|
2285
1598
|
/**
|
|
2286
|
-
*
|
|
2287
|
-
* @summary
|
|
2288
|
-
* @param {string} xStoreid Store ID
|
|
2289
|
-
* @param {string}
|
|
2290
|
-
* @param {
|
|
2291
|
-
* @param {string} [xAnonId] Anonymous ID (provide either x-user-id or x-anon-id)
|
|
1599
|
+
* Update search and store settings. Partial updates supported. **Auth:** `x-storeid` and `x-store-write-secret`.
|
|
1600
|
+
* @summary Update store configuration
|
|
1601
|
+
* @param {string} xStoreid Store ID (from dashboard)
|
|
1602
|
+
* @param {string} xStoreWriteSecret Store write secret
|
|
1603
|
+
* @param {DataTypesStoreConfigUpdateRequest} dataTypesStoreConfigUpdateRequest Fields to update (partial, includes allow_public_search)
|
|
2292
1604
|
* @param {*} [options] Override http request option.
|
|
2293
1605
|
* @throws {RequiredError}
|
|
2294
1606
|
*/
|
|
2295
|
-
|
|
2296
|
-
|
|
1607
|
+
apiV1StoresConfigPut: async (xStoreid, xStoreWriteSecret, dataTypesStoreConfigUpdateRequest, options = {}) => {
|
|
1608
|
+
// verify required parameter 'xStoreid' is not null or undefined
|
|
1609
|
+
(0, common_1.assertParamExists)('apiV1StoresConfigPut', 'xStoreid', xStoreid);
|
|
1610
|
+
// verify required parameter 'xStoreWriteSecret' is not null or undefined
|
|
1611
|
+
(0, common_1.assertParamExists)('apiV1StoresConfigPut', 'xStoreWriteSecret', xStoreWriteSecret);
|
|
1612
|
+
// verify required parameter 'dataTypesStoreConfigUpdateRequest' is not null or undefined
|
|
1613
|
+
(0, common_1.assertParamExists)('apiV1StoresConfigPut', 'dataTypesStoreConfigUpdateRequest', dataTypesStoreConfigUpdateRequest);
|
|
1614
|
+
const localVarPath = `/api/v1/stores/config`;
|
|
1615
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1616
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1617
|
+
let baseOptions;
|
|
1618
|
+
if (configuration) {
|
|
1619
|
+
baseOptions = configuration.baseOptions;
|
|
1620
|
+
}
|
|
1621
|
+
const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options };
|
|
1622
|
+
const localVarHeaderParameter = {};
|
|
1623
|
+
const localVarQueryParameter = {};
|
|
1624
|
+
// authentication ApiKeyAuth required
|
|
1625
|
+
await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-storesecret", configuration);
|
|
1626
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1627
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
1628
|
+
if (xStoreid != null) {
|
|
1629
|
+
localVarHeaderParameter['x-storeid'] = String(xStoreid);
|
|
1630
|
+
}
|
|
1631
|
+
if (xStoreWriteSecret != null) {
|
|
1632
|
+
localVarHeaderParameter['x-store-write-secret'] = String(xStoreWriteSecret);
|
|
1633
|
+
}
|
|
1634
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1635
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1636
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
1637
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(dataTypesStoreConfigUpdateRequest, localVarRequestOptions, configuration);
|
|
1638
|
+
return {
|
|
1639
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1640
|
+
options: localVarRequestOptions,
|
|
1641
|
+
};
|
|
2297
1642
|
},
|
|
2298
|
-
};
|
|
2299
|
-
};
|
|
2300
|
-
exports.SDKExperimentsApiFactory = SDKExperimentsApiFactory;
|
|
2301
|
-
/**
|
|
2302
|
-
* SDKExperimentsApi - object-oriented interface
|
|
2303
|
-
*/
|
|
2304
|
-
class SDKExperimentsApi extends base_1.BaseAPI {
|
|
2305
|
-
/**
|
|
2306
|
-
* Returns variant assignments for all running experiments for the requesting user. Uses hash-based consistent assignment.
|
|
2307
|
-
* @summary Get experiment assignments for a user
|
|
2308
|
-
* @param {string} xStoreid Store ID
|
|
2309
|
-
* @param {string} xStoresecret Store read secret
|
|
2310
|
-
* @param {string} [xUserId] User ID (provide either x-user-id or x-anon-id)
|
|
2311
|
-
* @param {string} [xAnonId] Anonymous ID (provide either x-user-id or x-anon-id)
|
|
2312
|
-
* @param {*} [options] Override http request option.
|
|
2313
|
-
* @throws {RequiredError}
|
|
2314
|
-
*/
|
|
2315
|
-
v1ExperimentsAssignmentGet(xStoreid, xStoresecret, xUserId, xAnonId, options) {
|
|
2316
|
-
return (0, exports.SDKExperimentsApiFp)(this.configuration).v1ExperimentsAssignmentGet(xStoreid, xStoresecret, xUserId, xAnonId, options).then((request) => request(this.axios, this.basePath));
|
|
2317
|
-
}
|
|
2318
|
-
}
|
|
2319
|
-
exports.SDKExperimentsApi = SDKExperimentsApi;
|
|
2320
|
-
/**
|
|
2321
|
-
* SDKQuerySuggestionsConfigApi - axios parameter creator
|
|
2322
|
-
*/
|
|
2323
|
-
const SDKQuerySuggestionsConfigApiAxiosParamCreator = function (configuration) {
|
|
2324
|
-
return {
|
|
2325
1643
|
/**
|
|
2326
|
-
* Returns
|
|
2327
|
-
* @summary Get
|
|
1644
|
+
* Returns metadata for all configurable store fields (types, defaults, validation). **Auth:** `x-storeid` and `x-storesecret`.
|
|
1645
|
+
* @summary Get store config schema
|
|
2328
1646
|
* @param {string} xStoreid Store ID (from dashboard)
|
|
2329
1647
|
* @param {string} xStoresecret Store read secret
|
|
2330
|
-
* @param {string} xStoreID Store ID (must match x-storeid header)
|
|
2331
1648
|
* @param {*} [options] Override http request option.
|
|
2332
1649
|
* @throws {RequiredError}
|
|
2333
1650
|
*/
|
|
2334
|
-
|
|
1651
|
+
apiV1StoresConfigSchemaGet: async (xStoreid, xStoresecret, options = {}) => {
|
|
2335
1652
|
// verify required parameter 'xStoreid' is not null or undefined
|
|
2336
|
-
(0, common_1.assertParamExists)('
|
|
1653
|
+
(0, common_1.assertParamExists)('apiV1StoresConfigSchemaGet', 'xStoreid', xStoreid);
|
|
2337
1654
|
// verify required parameter 'xStoresecret' is not null or undefined
|
|
2338
|
-
(0, common_1.assertParamExists)('
|
|
2339
|
-
|
|
2340
|
-
(0, common_1.assertParamExists)('apiV1StoresXStoreIDQuerySuggestionsConfigGet', 'xStoreID', xStoreID);
|
|
2341
|
-
const localVarPath = `/api/v1/stores/{xStoreID}/query-suggestions/config`
|
|
2342
|
-
.replace(`{${"xStoreID"}}`, encodeURIComponent(String(xStoreID)));
|
|
1655
|
+
(0, common_1.assertParamExists)('apiV1StoresConfigSchemaGet', 'xStoresecret', xStoresecret);
|
|
1656
|
+
const localVarPath = `/api/v1/stores/config-schema`;
|
|
2343
1657
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2344
1658
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
2345
1659
|
let baseOptions;
|
|
@@ -2367,33 +1681,29 @@ const SDKQuerySuggestionsConfigApiAxiosParamCreator = function (configuration) {
|
|
|
2367
1681
|
};
|
|
2368
1682
|
},
|
|
2369
1683
|
/**
|
|
2370
|
-
*
|
|
2371
|
-
* @summary
|
|
1684
|
+
* Run multiple document operations in one request (insert, update, upsert, delete). **Auth:** `x-storeid` and `x-store-write-secret`. Each item can specify its own action.
|
|
1685
|
+
* @summary Bulk index documents
|
|
2372
1686
|
* @param {string} xStoreid Store ID (from dashboard)
|
|
2373
1687
|
* @param {string} xStoreWriteSecret Store write secret
|
|
2374
|
-
* @param {
|
|
2375
|
-
* @param {QuerySuggestionsServiceUpdateSuggestionConfigRequest} querySuggestionsServiceUpdateSuggestionConfigRequest Fields to update (partial)
|
|
1688
|
+
* @param {DataTypesBulkDocumentRequest} dataTypesBulkDocumentRequest List of operations
|
|
2376
1689
|
* @param {*} [options] Override http request option.
|
|
2377
1690
|
* @throws {RequiredError}
|
|
2378
1691
|
*/
|
|
2379
|
-
|
|
1692
|
+
apiV1StoresDocumentsBulkPost: async (xStoreid, xStoreWriteSecret, dataTypesBulkDocumentRequest, options = {}) => {
|
|
2380
1693
|
// verify required parameter 'xStoreid' is not null or undefined
|
|
2381
|
-
(0, common_1.assertParamExists)('
|
|
1694
|
+
(0, common_1.assertParamExists)('apiV1StoresDocumentsBulkPost', 'xStoreid', xStoreid);
|
|
2382
1695
|
// verify required parameter 'xStoreWriteSecret' is not null or undefined
|
|
2383
|
-
(0, common_1.assertParamExists)('
|
|
2384
|
-
// verify required parameter '
|
|
2385
|
-
(0, common_1.assertParamExists)('
|
|
2386
|
-
|
|
2387
|
-
(0, common_1.assertParamExists)('apiV1StoresXStoreIDQuerySuggestionsConfigPut', 'querySuggestionsServiceUpdateSuggestionConfigRequest', querySuggestionsServiceUpdateSuggestionConfigRequest);
|
|
2388
|
-
const localVarPath = `/api/v1/stores/{xStoreID}/query-suggestions/config`
|
|
2389
|
-
.replace(`{${"xStoreID"}}`, encodeURIComponent(String(xStoreID)));
|
|
1696
|
+
(0, common_1.assertParamExists)('apiV1StoresDocumentsBulkPost', 'xStoreWriteSecret', xStoreWriteSecret);
|
|
1697
|
+
// verify required parameter 'dataTypesBulkDocumentRequest' is not null or undefined
|
|
1698
|
+
(0, common_1.assertParamExists)('apiV1StoresDocumentsBulkPost', 'dataTypesBulkDocumentRequest', dataTypesBulkDocumentRequest);
|
|
1699
|
+
const localVarPath = `/api/v1/stores/documents/bulk`;
|
|
2390
1700
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2391
1701
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
2392
1702
|
let baseOptions;
|
|
2393
1703
|
if (configuration) {
|
|
2394
1704
|
baseOptions = configuration.baseOptions;
|
|
2395
1705
|
}
|
|
2396
|
-
const localVarRequestOptions = { method: '
|
|
1706
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
|
|
2397
1707
|
const localVarHeaderParameter = {};
|
|
2398
1708
|
const localVarQueryParameter = {};
|
|
2399
1709
|
// authentication ApiKeyAuth required
|
|
@@ -2409,143 +1719,70 @@ const SDKQuerySuggestionsConfigApiAxiosParamCreator = function (configuration) {
|
|
|
2409
1719
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
2410
1720
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2411
1721
|
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
2412
|
-
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(
|
|
1722
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(dataTypesBulkDocumentRequest, localVarRequestOptions, configuration);
|
|
2413
1723
|
return {
|
|
2414
1724
|
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
2415
1725
|
options: localVarRequestOptions,
|
|
2416
1726
|
};
|
|
2417
1727
|
},
|
|
2418
|
-
};
|
|
2419
|
-
};
|
|
2420
|
-
exports.SDKQuerySuggestionsConfigApiAxiosParamCreator = SDKQuerySuggestionsConfigApiAxiosParamCreator;
|
|
2421
|
-
/**
|
|
2422
|
-
* SDKQuerySuggestionsConfigApi - functional programming interface
|
|
2423
|
-
*/
|
|
2424
|
-
const SDKQuerySuggestionsConfigApiFp = function (configuration) {
|
|
2425
|
-
const localVarAxiosParamCreator = (0, exports.SDKQuerySuggestionsConfigApiAxiosParamCreator)(configuration);
|
|
2426
|
-
return {
|
|
2427
1728
|
/**
|
|
2428
|
-
*
|
|
2429
|
-
* @summary
|
|
1729
|
+
* Removes all documents from the store\'s search index; schema is preserved. **Auth:** `x-storeid` and `x-store-write-secret`.
|
|
1730
|
+
* @summary Clear all documents
|
|
2430
1731
|
* @param {string} xStoreid Store ID (from dashboard)
|
|
2431
|
-
* @param {string}
|
|
2432
|
-
* @param {string} xStoreID Store ID (must match x-storeid header)
|
|
1732
|
+
* @param {string} xStoreWriteSecret Store write secret
|
|
2433
1733
|
* @param {*} [options] Override http request option.
|
|
2434
1734
|
* @throws {RequiredError}
|
|
2435
1735
|
*/
|
|
2436
|
-
async
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
1736
|
+
apiV1StoresDocumentsDelete: async (xStoreid, xStoreWriteSecret, options = {}) => {
|
|
1737
|
+
// verify required parameter 'xStoreid' is not null or undefined
|
|
1738
|
+
(0, common_1.assertParamExists)('apiV1StoresDocumentsDelete', 'xStoreid', xStoreid);
|
|
1739
|
+
// verify required parameter 'xStoreWriteSecret' is not null or undefined
|
|
1740
|
+
(0, common_1.assertParamExists)('apiV1StoresDocumentsDelete', 'xStoreWriteSecret', xStoreWriteSecret);
|
|
1741
|
+
const localVarPath = `/api/v1/stores/documents`;
|
|
1742
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1743
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1744
|
+
let baseOptions;
|
|
1745
|
+
if (configuration) {
|
|
1746
|
+
baseOptions = configuration.baseOptions;
|
|
1747
|
+
}
|
|
1748
|
+
const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options };
|
|
1749
|
+
const localVarHeaderParameter = {};
|
|
1750
|
+
const localVarQueryParameter = {};
|
|
1751
|
+
// authentication ApiKeyAuth required
|
|
1752
|
+
await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-storesecret", configuration);
|
|
1753
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
1754
|
+
if (xStoreid != null) {
|
|
1755
|
+
localVarHeaderParameter['x-storeid'] = String(xStoreid);
|
|
1756
|
+
}
|
|
1757
|
+
if (xStoreWriteSecret != null) {
|
|
1758
|
+
localVarHeaderParameter['x-store-write-secret'] = String(xStoreWriteSecret);
|
|
1759
|
+
}
|
|
1760
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1761
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1762
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
1763
|
+
return {
|
|
1764
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1765
|
+
options: localVarRequestOptions,
|
|
1766
|
+
};
|
|
2441
1767
|
},
|
|
2442
1768
|
/**
|
|
2443
|
-
*
|
|
2444
|
-
* @summary
|
|
1769
|
+
* Remove a document from the store\'s search index by ID. **Auth:** `x-storeid` and `x-store-write-secret`.
|
|
1770
|
+
* @summary Delete a document
|
|
2445
1771
|
* @param {string} xStoreid Store ID (from dashboard)
|
|
2446
1772
|
* @param {string} xStoreWriteSecret Store write secret
|
|
2447
|
-
* @param {string}
|
|
2448
|
-
* @param {QuerySuggestionsServiceUpdateSuggestionConfigRequest} querySuggestionsServiceUpdateSuggestionConfigRequest Fields to update (partial)
|
|
1773
|
+
* @param {string} documentID Document ID to delete
|
|
2449
1774
|
* @param {*} [options] Override http request option.
|
|
2450
1775
|
* @throws {RequiredError}
|
|
2451
1776
|
*/
|
|
2452
|
-
async
|
|
2453
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1StoresXStoreIDQuerySuggestionsConfigPut(xStoreid, xStoreWriteSecret, xStoreID, querySuggestionsServiceUpdateSuggestionConfigRequest, options);
|
|
2454
|
-
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2455
|
-
const localVarOperationServerBasePath = base_1.operationServerMap['SDKQuerySuggestionsConfigApi.apiV1StoresXStoreIDQuerySuggestionsConfigPut']?.[localVarOperationServerIndex]?.url;
|
|
2456
|
-
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2457
|
-
},
|
|
2458
|
-
};
|
|
2459
|
-
};
|
|
2460
|
-
exports.SDKQuerySuggestionsConfigApiFp = SDKQuerySuggestionsConfigApiFp;
|
|
2461
|
-
/**
|
|
2462
|
-
* SDKQuerySuggestionsConfigApi - factory interface
|
|
2463
|
-
*/
|
|
2464
|
-
const SDKQuerySuggestionsConfigApiFactory = function (configuration, basePath, axios) {
|
|
2465
|
-
const localVarFp = (0, exports.SDKQuerySuggestionsConfigApiFp)(configuration);
|
|
2466
|
-
return {
|
|
2467
|
-
/**
|
|
2468
|
-
* Returns autocomplete/suggestions configuration for the store. **Auth:** `x-storeid` and `x-storesecret`. Path `xStoreID` must match the `x-storeid` header.
|
|
2469
|
-
* @summary Get query suggestions configuration
|
|
2470
|
-
* @param {string} xStoreid Store ID (from dashboard)
|
|
2471
|
-
* @param {string} xStoresecret Store read secret
|
|
2472
|
-
* @param {string} xStoreID Store ID (must match x-storeid header)
|
|
2473
|
-
* @param {*} [options] Override http request option.
|
|
2474
|
-
* @throws {RequiredError}
|
|
2475
|
-
*/
|
|
2476
|
-
apiV1StoresXStoreIDQuerySuggestionsConfigGet(xStoreid, xStoresecret, xStoreID, options) {
|
|
2477
|
-
return localVarFp.apiV1StoresXStoreIDQuerySuggestionsConfigGet(xStoreid, xStoresecret, xStoreID, options).then((request) => request(axios, basePath));
|
|
2478
|
-
},
|
|
2479
|
-
/**
|
|
2480
|
-
* Update autocomplete/suggestions settings for the store. Partial updates supported. **Auth:** `x-storeid` and `x-store-write-secret`. Path `xStoreID` must match the `x-storeid` header.
|
|
2481
|
-
* @summary Update query suggestions configuration
|
|
2482
|
-
* @param {string} xStoreid Store ID (from dashboard)
|
|
2483
|
-
* @param {string} xStoreWriteSecret Store write secret
|
|
2484
|
-
* @param {string} xStoreID Store ID (must match x-storeid header)
|
|
2485
|
-
* @param {QuerySuggestionsServiceUpdateSuggestionConfigRequest} querySuggestionsServiceUpdateSuggestionConfigRequest Fields to update (partial)
|
|
2486
|
-
* @param {*} [options] Override http request option.
|
|
2487
|
-
* @throws {RequiredError}
|
|
2488
|
-
*/
|
|
2489
|
-
apiV1StoresXStoreIDQuerySuggestionsConfigPut(xStoreid, xStoreWriteSecret, xStoreID, querySuggestionsServiceUpdateSuggestionConfigRequest, options) {
|
|
2490
|
-
return localVarFp.apiV1StoresXStoreIDQuerySuggestionsConfigPut(xStoreid, xStoreWriteSecret, xStoreID, querySuggestionsServiceUpdateSuggestionConfigRequest, options).then((request) => request(axios, basePath));
|
|
2491
|
-
},
|
|
2492
|
-
};
|
|
2493
|
-
};
|
|
2494
|
-
exports.SDKQuerySuggestionsConfigApiFactory = SDKQuerySuggestionsConfigApiFactory;
|
|
2495
|
-
/**
|
|
2496
|
-
* SDKQuerySuggestionsConfigApi - object-oriented interface
|
|
2497
|
-
*/
|
|
2498
|
-
class SDKQuerySuggestionsConfigApi extends base_1.BaseAPI {
|
|
2499
|
-
/**
|
|
2500
|
-
* Returns autocomplete/suggestions configuration for the store. **Auth:** `x-storeid` and `x-storesecret`. Path `xStoreID` must match the `x-storeid` header.
|
|
2501
|
-
* @summary Get query suggestions configuration
|
|
2502
|
-
* @param {string} xStoreid Store ID (from dashboard)
|
|
2503
|
-
* @param {string} xStoresecret Store read secret
|
|
2504
|
-
* @param {string} xStoreID Store ID (must match x-storeid header)
|
|
2505
|
-
* @param {*} [options] Override http request option.
|
|
2506
|
-
* @throws {RequiredError}
|
|
2507
|
-
*/
|
|
2508
|
-
apiV1StoresXStoreIDQuerySuggestionsConfigGet(xStoreid, xStoresecret, xStoreID, options) {
|
|
2509
|
-
return (0, exports.SDKQuerySuggestionsConfigApiFp)(this.configuration).apiV1StoresXStoreIDQuerySuggestionsConfigGet(xStoreid, xStoresecret, xStoreID, options).then((request) => request(this.axios, this.basePath));
|
|
2510
|
-
}
|
|
2511
|
-
/**
|
|
2512
|
-
* Update autocomplete/suggestions settings for the store. Partial updates supported. **Auth:** `x-storeid` and `x-store-write-secret`. Path `xStoreID` must match the `x-storeid` header.
|
|
2513
|
-
* @summary Update query suggestions configuration
|
|
2514
|
-
* @param {string} xStoreid Store ID (from dashboard)
|
|
2515
|
-
* @param {string} xStoreWriteSecret Store write secret
|
|
2516
|
-
* @param {string} xStoreID Store ID (must match x-storeid header)
|
|
2517
|
-
* @param {QuerySuggestionsServiceUpdateSuggestionConfigRequest} querySuggestionsServiceUpdateSuggestionConfigRequest Fields to update (partial)
|
|
2518
|
-
* @param {*} [options] Override http request option.
|
|
2519
|
-
* @throws {RequiredError}
|
|
2520
|
-
*/
|
|
2521
|
-
apiV1StoresXStoreIDQuerySuggestionsConfigPut(xStoreid, xStoreWriteSecret, xStoreID, querySuggestionsServiceUpdateSuggestionConfigRequest, options) {
|
|
2522
|
-
return (0, exports.SDKQuerySuggestionsConfigApiFp)(this.configuration).apiV1StoresXStoreIDQuerySuggestionsConfigPut(xStoreid, xStoreWriteSecret, xStoreID, querySuggestionsServiceUpdateSuggestionConfigRequest, options).then((request) => request(this.axios, this.basePath));
|
|
2523
|
-
}
|
|
2524
|
-
}
|
|
2525
|
-
exports.SDKQuerySuggestionsConfigApi = SDKQuerySuggestionsConfigApi;
|
|
2526
|
-
/**
|
|
2527
|
-
* SDKSchemaApi - axios parameter creator
|
|
2528
|
-
*/
|
|
2529
|
-
const SDKSchemaApiAxiosParamCreator = function (configuration) {
|
|
2530
|
-
return {
|
|
2531
|
-
/**
|
|
2532
|
-
* Removes all documents from the store\'s search index; schema is preserved. **Auth:** `x-storeid` and `x-store-write-secret`. Path `xStoreID` must match the `x-storeid` header.
|
|
2533
|
-
* @summary Clear all documents
|
|
2534
|
-
* @param {string} xStoreid Store ID (from dashboard)
|
|
2535
|
-
* @param {string} xStoreWriteSecret Store write secret
|
|
2536
|
-
* @param {string} xStoreID Store ID (must match x-storeid header)
|
|
2537
|
-
* @param {*} [options] Override http request option.
|
|
2538
|
-
* @throws {RequiredError}
|
|
2539
|
-
*/
|
|
2540
|
-
apiV1StoresXStoreIDDocumentsDelete: async (xStoreid, xStoreWriteSecret, xStoreID, options = {}) => {
|
|
1777
|
+
apiV1StoresDocumentsDocumentIDDelete: async (xStoreid, xStoreWriteSecret, documentID, options = {}) => {
|
|
2541
1778
|
// verify required parameter 'xStoreid' is not null or undefined
|
|
2542
|
-
(0, common_1.assertParamExists)('
|
|
1779
|
+
(0, common_1.assertParamExists)('apiV1StoresDocumentsDocumentIDDelete', 'xStoreid', xStoreid);
|
|
2543
1780
|
// verify required parameter 'xStoreWriteSecret' is not null or undefined
|
|
2544
|
-
(0, common_1.assertParamExists)('
|
|
2545
|
-
// verify required parameter '
|
|
2546
|
-
(0, common_1.assertParamExists)('
|
|
2547
|
-
const localVarPath = `/api/v1/stores/{
|
|
2548
|
-
.replace(`{${"
|
|
1781
|
+
(0, common_1.assertParamExists)('apiV1StoresDocumentsDocumentIDDelete', 'xStoreWriteSecret', xStoreWriteSecret);
|
|
1782
|
+
// verify required parameter 'documentID' is not null or undefined
|
|
1783
|
+
(0, common_1.assertParamExists)('apiV1StoresDocumentsDocumentIDDelete', 'documentID', documentID);
|
|
1784
|
+
const localVarPath = `/api/v1/stores/documents/{documentID}`
|
|
1785
|
+
.replace(`{${"documentID"}}`, encodeURIComponent(String(documentID)));
|
|
2549
1786
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2550
1787
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
2551
1788
|
let baseOptions;
|
|
@@ -2573,23 +1810,23 @@ const SDKSchemaApiAxiosParamCreator = function (configuration) {
|
|
|
2573
1810
|
};
|
|
2574
1811
|
},
|
|
2575
1812
|
/**
|
|
2576
|
-
*
|
|
2577
|
-
* @summary Get
|
|
1813
|
+
* Retrieve a single document from the store\'s search index by ID. **Auth:** `x-storeid` and `x-storesecret`. Used by product pages and PDP.
|
|
1814
|
+
* @summary Get a document by ID
|
|
2578
1815
|
* @param {string} xStoreid Store ID (from dashboard)
|
|
2579
1816
|
* @param {string} xStoresecret Store read secret
|
|
2580
|
-
* @param {string}
|
|
1817
|
+
* @param {string} documentID Document ID to retrieve
|
|
2581
1818
|
* @param {*} [options] Override http request option.
|
|
2582
1819
|
* @throws {RequiredError}
|
|
2583
1820
|
*/
|
|
2584
|
-
|
|
1821
|
+
apiV1StoresDocumentsDocumentIDGet: async (xStoreid, xStoresecret, documentID, options = {}) => {
|
|
2585
1822
|
// verify required parameter 'xStoreid' is not null or undefined
|
|
2586
|
-
(0, common_1.assertParamExists)('
|
|
1823
|
+
(0, common_1.assertParamExists)('apiV1StoresDocumentsDocumentIDGet', 'xStoreid', xStoreid);
|
|
2587
1824
|
// verify required parameter 'xStoresecret' is not null or undefined
|
|
2588
|
-
(0, common_1.assertParamExists)('
|
|
2589
|
-
// verify required parameter '
|
|
2590
|
-
(0, common_1.assertParamExists)('
|
|
2591
|
-
const localVarPath = `/api/v1/stores/{
|
|
2592
|
-
.replace(`{${"
|
|
1825
|
+
(0, common_1.assertParamExists)('apiV1StoresDocumentsDocumentIDGet', 'xStoresecret', xStoresecret);
|
|
1826
|
+
// verify required parameter 'documentID' is not null or undefined
|
|
1827
|
+
(0, common_1.assertParamExists)('apiV1StoresDocumentsDocumentIDGet', 'documentID', documentID);
|
|
1828
|
+
const localVarPath = `/api/v1/stores/documents/{documentID}`
|
|
1829
|
+
.replace(`{${"documentID"}}`, encodeURIComponent(String(documentID)));
|
|
2593
1830
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2594
1831
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
2595
1832
|
let baseOptions;
|
|
@@ -2617,26 +1854,22 @@ const SDKSchemaApiAxiosParamCreator = function (configuration) {
|
|
|
2617
1854
|
};
|
|
2618
1855
|
},
|
|
2619
1856
|
/**
|
|
2620
|
-
*
|
|
2621
|
-
* @summary
|
|
1857
|
+
* Add or update one document in the store\'s search index. **Auth:** `x-storeid` and `x-store-write-secret`. If you omit document ID, one is generated; existing documents with the same ID are updated.
|
|
1858
|
+
* @summary Index a single document
|
|
2622
1859
|
* @param {string} xStoreid Store ID (from dashboard)
|
|
2623
1860
|
* @param {string} xStoreWriteSecret Store write secret
|
|
2624
|
-
* @param {
|
|
2625
|
-
* @param {DataTypesCollectionSchemaRequest} dataTypesCollectionSchemaRequest Schema definition and mode
|
|
1861
|
+
* @param {DataTypesDocumentRequest} dataTypesDocumentRequest Document fields to index
|
|
2626
1862
|
* @param {*} [options] Override http request option.
|
|
2627
1863
|
* @throws {RequiredError}
|
|
2628
1864
|
*/
|
|
2629
|
-
|
|
1865
|
+
apiV1StoresDocumentsPost: async (xStoreid, xStoreWriteSecret, dataTypesDocumentRequest, options = {}) => {
|
|
2630
1866
|
// verify required parameter 'xStoreid' is not null or undefined
|
|
2631
|
-
(0, common_1.assertParamExists)('
|
|
1867
|
+
(0, common_1.assertParamExists)('apiV1StoresDocumentsPost', 'xStoreid', xStoreid);
|
|
2632
1868
|
// verify required parameter 'xStoreWriteSecret' is not null or undefined
|
|
2633
|
-
(0, common_1.assertParamExists)('
|
|
2634
|
-
// verify required parameter '
|
|
2635
|
-
(0, common_1.assertParamExists)('
|
|
2636
|
-
|
|
2637
|
-
(0, common_1.assertParamExists)('apiV1StoresXStoreIDSchemaPost', 'dataTypesCollectionSchemaRequest', dataTypesCollectionSchemaRequest);
|
|
2638
|
-
const localVarPath = `/api/v1/stores/{xStoreID}/schema`
|
|
2639
|
-
.replace(`{${"xStoreID"}}`, encodeURIComponent(String(xStoreID)));
|
|
1869
|
+
(0, common_1.assertParamExists)('apiV1StoresDocumentsPost', 'xStoreWriteSecret', xStoreWriteSecret);
|
|
1870
|
+
// verify required parameter 'dataTypesDocumentRequest' is not null or undefined
|
|
1871
|
+
(0, common_1.assertParamExists)('apiV1StoresDocumentsPost', 'dataTypesDocumentRequest', dataTypesDocumentRequest);
|
|
1872
|
+
const localVarPath = `/api/v1/stores/documents`;
|
|
2640
1873
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2641
1874
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
2642
1875
|
let baseOptions;
|
|
@@ -2659,182 +1892,66 @@ const SDKSchemaApiAxiosParamCreator = function (configuration) {
|
|
|
2659
1892
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
2660
1893
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2661
1894
|
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
2662
|
-
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(
|
|
1895
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(dataTypesDocumentRequest, localVarRequestOptions, configuration);
|
|
2663
1896
|
return {
|
|
2664
1897
|
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
2665
1898
|
options: localVarRequestOptions,
|
|
2666
1899
|
};
|
|
2667
1900
|
},
|
|
2668
|
-
};
|
|
2669
|
-
};
|
|
2670
|
-
exports.SDKSchemaApiAxiosParamCreator = SDKSchemaApiAxiosParamCreator;
|
|
2671
|
-
/**
|
|
2672
|
-
* SDKSchemaApi - functional programming interface
|
|
2673
|
-
*/
|
|
2674
|
-
const SDKSchemaApiFp = function (configuration) {
|
|
2675
|
-
const localVarAxiosParamCreator = (0, exports.SDKSchemaApiAxiosParamCreator)(configuration);
|
|
2676
|
-
return {
|
|
2677
|
-
/**
|
|
2678
|
-
* Removes all documents from the store\'s search index; schema is preserved. **Auth:** `x-storeid` and `x-store-write-secret`. Path `xStoreID` must match the `x-storeid` header.
|
|
2679
|
-
* @summary Clear all documents
|
|
2680
|
-
* @param {string} xStoreid Store ID (from dashboard)
|
|
2681
|
-
* @param {string} xStoreWriteSecret Store write secret
|
|
2682
|
-
* @param {string} xStoreID Store ID (must match x-storeid header)
|
|
2683
|
-
* @param {*} [options] Override http request option.
|
|
2684
|
-
* @throws {RequiredError}
|
|
2685
|
-
*/
|
|
2686
|
-
async apiV1StoresXStoreIDDocumentsDelete(xStoreid, xStoreWriteSecret, xStoreID, options) {
|
|
2687
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1StoresXStoreIDDocumentsDelete(xStoreid, xStoreWriteSecret, xStoreID, options);
|
|
2688
|
-
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2689
|
-
const localVarOperationServerBasePath = base_1.operationServerMap['SDKSchemaApi.apiV1StoresXStoreIDDocumentsDelete']?.[localVarOperationServerIndex]?.url;
|
|
2690
|
-
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2691
|
-
},
|
|
2692
|
-
/**
|
|
2693
|
-
* Returns the current search index schema (fields and options) for the store. **Auth:** `x-storeid` and `x-storesecret`. Path `xStoreID` must match the `x-storeid` header.
|
|
2694
|
-
* @summary Get index schema
|
|
2695
|
-
* @param {string} xStoreid Store ID (from dashboard)
|
|
2696
|
-
* @param {string} xStoresecret Store read secret
|
|
2697
|
-
* @param {string} xStoreID Store ID (must match x-storeid header)
|
|
2698
|
-
* @param {*} [options] Override http request option.
|
|
2699
|
-
* @throws {RequiredError}
|
|
2700
|
-
*/
|
|
2701
|
-
async apiV1StoresXStoreIDSchemaGet(xStoreid, xStoresecret, xStoreID, options) {
|
|
2702
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1StoresXStoreIDSchemaGet(xStoreid, xStoresecret, xStoreID, options);
|
|
2703
|
-
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2704
|
-
const localVarOperationServerBasePath = base_1.operationServerMap['SDKSchemaApi.apiV1StoresXStoreIDSchemaGet']?.[localVarOperationServerIndex]?.url;
|
|
2705
|
-
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2706
|
-
},
|
|
2707
|
-
/**
|
|
2708
|
-
* Define or update the search index schema (field names, types, searchable/facet options). Mode: `additive` (add fields, keep data) or `replace` (recreate index). **Auth:** `x-storeid` and `x-store-write-secret`. Path `xStoreID` must match the `x-storeid` header.
|
|
2709
|
-
* @summary Create or update index schema
|
|
2710
|
-
* @param {string} xStoreid Store ID (from dashboard)
|
|
2711
|
-
* @param {string} xStoreWriteSecret Store write secret
|
|
2712
|
-
* @param {string} xStoreID Store ID (must match x-storeid header)
|
|
2713
|
-
* @param {DataTypesCollectionSchemaRequest} dataTypesCollectionSchemaRequest Schema definition and mode
|
|
2714
|
-
* @param {*} [options] Override http request option.
|
|
2715
|
-
* @throws {RequiredError}
|
|
2716
|
-
*/
|
|
2717
|
-
async apiV1StoresXStoreIDSchemaPost(xStoreid, xStoreWriteSecret, xStoreID, dataTypesCollectionSchemaRequest, options) {
|
|
2718
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1StoresXStoreIDSchemaPost(xStoreid, xStoreWriteSecret, xStoreID, dataTypesCollectionSchemaRequest, options);
|
|
2719
|
-
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2720
|
-
const localVarOperationServerBasePath = base_1.operationServerMap['SDKSchemaApi.apiV1StoresXStoreIDSchemaPost']?.[localVarOperationServerIndex]?.url;
|
|
2721
|
-
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2722
|
-
},
|
|
2723
|
-
};
|
|
2724
|
-
};
|
|
2725
|
-
exports.SDKSchemaApiFp = SDKSchemaApiFp;
|
|
2726
|
-
/**
|
|
2727
|
-
* SDKSchemaApi - factory interface
|
|
2728
|
-
*/
|
|
2729
|
-
const SDKSchemaApiFactory = function (configuration, basePath, axios) {
|
|
2730
|
-
const localVarFp = (0, exports.SDKSchemaApiFp)(configuration);
|
|
2731
|
-
return {
|
|
2732
|
-
/**
|
|
2733
|
-
* Removes all documents from the store\'s search index; schema is preserved. **Auth:** `x-storeid` and `x-store-write-secret`. Path `xStoreID` must match the `x-storeid` header.
|
|
2734
|
-
* @summary Clear all documents
|
|
2735
|
-
* @param {string} xStoreid Store ID (from dashboard)
|
|
2736
|
-
* @param {string} xStoreWriteSecret Store write secret
|
|
2737
|
-
* @param {string} xStoreID Store ID (must match x-storeid header)
|
|
2738
|
-
* @param {*} [options] Override http request option.
|
|
2739
|
-
* @throws {RequiredError}
|
|
2740
|
-
*/
|
|
2741
|
-
apiV1StoresXStoreIDDocumentsDelete(xStoreid, xStoreWriteSecret, xStoreID, options) {
|
|
2742
|
-
return localVarFp.apiV1StoresXStoreIDDocumentsDelete(xStoreid, xStoreWriteSecret, xStoreID, options).then((request) => request(axios, basePath));
|
|
2743
|
-
},
|
|
2744
1901
|
/**
|
|
2745
|
-
* Returns
|
|
2746
|
-
* @summary Get
|
|
1902
|
+
* Returns basic store details (name, location, status). **Auth:** `x-storeid` and `x-storesecret`.
|
|
1903
|
+
* @summary Get store info
|
|
2747
1904
|
* @param {string} xStoreid Store ID (from dashboard)
|
|
2748
1905
|
* @param {string} xStoresecret Store read secret
|
|
2749
|
-
* @param {string} xStoreID Store ID (must match x-storeid header)
|
|
2750
|
-
* @param {*} [options] Override http request option.
|
|
2751
|
-
* @throws {RequiredError}
|
|
2752
|
-
*/
|
|
2753
|
-
apiV1StoresXStoreIDSchemaGet(xStoreid, xStoresecret, xStoreID, options) {
|
|
2754
|
-
return localVarFp.apiV1StoresXStoreIDSchemaGet(xStoreid, xStoresecret, xStoreID, options).then((request) => request(axios, basePath));
|
|
2755
|
-
},
|
|
2756
|
-
/**
|
|
2757
|
-
* Define or update the search index schema (field names, types, searchable/facet options). Mode: `additive` (add fields, keep data) or `replace` (recreate index). **Auth:** `x-storeid` and `x-store-write-secret`. Path `xStoreID` must match the `x-storeid` header.
|
|
2758
|
-
* @summary Create or update index schema
|
|
2759
|
-
* @param {string} xStoreid Store ID (from dashboard)
|
|
2760
|
-
* @param {string} xStoreWriteSecret Store write secret
|
|
2761
|
-
* @param {string} xStoreID Store ID (must match x-storeid header)
|
|
2762
|
-
* @param {DataTypesCollectionSchemaRequest} dataTypesCollectionSchemaRequest Schema definition and mode
|
|
2763
1906
|
* @param {*} [options] Override http request option.
|
|
2764
1907
|
* @throws {RequiredError}
|
|
2765
1908
|
*/
|
|
2766
|
-
|
|
2767
|
-
|
|
1909
|
+
apiV1StoresGet: async (xStoreid, xStoresecret, options = {}) => {
|
|
1910
|
+
// verify required parameter 'xStoreid' is not null or undefined
|
|
1911
|
+
(0, common_1.assertParamExists)('apiV1StoresGet', 'xStoreid', xStoreid);
|
|
1912
|
+
// verify required parameter 'xStoresecret' is not null or undefined
|
|
1913
|
+
(0, common_1.assertParamExists)('apiV1StoresGet', 'xStoresecret', xStoresecret);
|
|
1914
|
+
const localVarPath = `/api/v1/stores`;
|
|
1915
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1916
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1917
|
+
let baseOptions;
|
|
1918
|
+
if (configuration) {
|
|
1919
|
+
baseOptions = configuration.baseOptions;
|
|
1920
|
+
}
|
|
1921
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
1922
|
+
const localVarHeaderParameter = {};
|
|
1923
|
+
const localVarQueryParameter = {};
|
|
1924
|
+
// authentication ApiKeyAuth required
|
|
1925
|
+
await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-storesecret", configuration);
|
|
1926
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
1927
|
+
if (xStoreid != null) {
|
|
1928
|
+
localVarHeaderParameter['x-storeid'] = String(xStoreid);
|
|
1929
|
+
}
|
|
1930
|
+
if (xStoresecret != null) {
|
|
1931
|
+
localVarHeaderParameter['x-storesecret'] = String(xStoresecret);
|
|
1932
|
+
}
|
|
1933
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1934
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1935
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
1936
|
+
return {
|
|
1937
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1938
|
+
options: localVarRequestOptions,
|
|
1939
|
+
};
|
|
2768
1940
|
},
|
|
2769
|
-
};
|
|
2770
|
-
};
|
|
2771
|
-
exports.SDKSchemaApiFactory = SDKSchemaApiFactory;
|
|
2772
|
-
/**
|
|
2773
|
-
* SDKSchemaApi - object-oriented interface
|
|
2774
|
-
*/
|
|
2775
|
-
class SDKSchemaApi extends base_1.BaseAPI {
|
|
2776
|
-
/**
|
|
2777
|
-
* Removes all documents from the store\'s search index; schema is preserved. **Auth:** `x-storeid` and `x-store-write-secret`. Path `xStoreID` must match the `x-storeid` header.
|
|
2778
|
-
* @summary Clear all documents
|
|
2779
|
-
* @param {string} xStoreid Store ID (from dashboard)
|
|
2780
|
-
* @param {string} xStoreWriteSecret Store write secret
|
|
2781
|
-
* @param {string} xStoreID Store ID (must match x-storeid header)
|
|
2782
|
-
* @param {*} [options] Override http request option.
|
|
2783
|
-
* @throws {RequiredError}
|
|
2784
|
-
*/
|
|
2785
|
-
apiV1StoresXStoreIDDocumentsDelete(xStoreid, xStoreWriteSecret, xStoreID, options) {
|
|
2786
|
-
return (0, exports.SDKSchemaApiFp)(this.configuration).apiV1StoresXStoreIDDocumentsDelete(xStoreid, xStoreWriteSecret, xStoreID, options).then((request) => request(this.axios, this.basePath));
|
|
2787
|
-
}
|
|
2788
|
-
/**
|
|
2789
|
-
* Returns the current search index schema (fields and options) for the store. **Auth:** `x-storeid` and `x-storesecret`. Path `xStoreID` must match the `x-storeid` header.
|
|
2790
|
-
* @summary Get index schema
|
|
2791
|
-
* @param {string} xStoreid Store ID (from dashboard)
|
|
2792
|
-
* @param {string} xStoresecret Store read secret
|
|
2793
|
-
* @param {string} xStoreID Store ID (must match x-storeid header)
|
|
2794
|
-
* @param {*} [options] Override http request option.
|
|
2795
|
-
* @throws {RequiredError}
|
|
2796
|
-
*/
|
|
2797
|
-
apiV1StoresXStoreIDSchemaGet(xStoreid, xStoresecret, xStoreID, options) {
|
|
2798
|
-
return (0, exports.SDKSchemaApiFp)(this.configuration).apiV1StoresXStoreIDSchemaGet(xStoreid, xStoresecret, xStoreID, options).then((request) => request(this.axios, this.basePath));
|
|
2799
|
-
}
|
|
2800
|
-
/**
|
|
2801
|
-
* Define or update the search index schema (field names, types, searchable/facet options). Mode: `additive` (add fields, keep data) or `replace` (recreate index). **Auth:** `x-storeid` and `x-store-write-secret`. Path `xStoreID` must match the `x-storeid` header.
|
|
2802
|
-
* @summary Create or update index schema
|
|
2803
|
-
* @param {string} xStoreid Store ID (from dashboard)
|
|
2804
|
-
* @param {string} xStoreWriteSecret Store write secret
|
|
2805
|
-
* @param {string} xStoreID Store ID (must match x-storeid header)
|
|
2806
|
-
* @param {DataTypesCollectionSchemaRequest} dataTypesCollectionSchemaRequest Schema definition and mode
|
|
2807
|
-
* @param {*} [options] Override http request option.
|
|
2808
|
-
* @throws {RequiredError}
|
|
2809
|
-
*/
|
|
2810
|
-
apiV1StoresXStoreIDSchemaPost(xStoreid, xStoreWriteSecret, xStoreID, dataTypesCollectionSchemaRequest, options) {
|
|
2811
|
-
return (0, exports.SDKSchemaApiFp)(this.configuration).apiV1StoresXStoreIDSchemaPost(xStoreid, xStoreWriteSecret, xStoreID, dataTypesCollectionSchemaRequest, options).then((request) => request(this.axios, this.basePath));
|
|
2812
|
-
}
|
|
2813
|
-
}
|
|
2814
|
-
exports.SDKSchemaApi = SDKSchemaApi;
|
|
2815
|
-
/**
|
|
2816
|
-
* SDKStoreConfigApi - axios parameter creator
|
|
2817
|
-
*/
|
|
2818
|
-
const SDKStoreConfigApiAxiosParamCreator = function (configuration) {
|
|
2819
|
-
return {
|
|
2820
1941
|
/**
|
|
2821
|
-
* Returns
|
|
2822
|
-
* @summary Get
|
|
1942
|
+
* Returns autocomplete/suggestions configuration for the store. **Auth:** `x-storeid` and `x-storesecret`.
|
|
1943
|
+
* @summary Get query suggestions configuration
|
|
2823
1944
|
* @param {string} xStoreid Store ID (from dashboard)
|
|
2824
1945
|
* @param {string} xStoresecret Store read secret
|
|
2825
|
-
* @param {string} xStoreID Store ID (must match x-storeid header)
|
|
2826
1946
|
* @param {*} [options] Override http request option.
|
|
2827
1947
|
* @throws {RequiredError}
|
|
2828
1948
|
*/
|
|
2829
|
-
|
|
1949
|
+
apiV1StoresQuerySuggestionsConfigGet: async (xStoreid, xStoresecret, options = {}) => {
|
|
2830
1950
|
// verify required parameter 'xStoreid' is not null or undefined
|
|
2831
|
-
(0, common_1.assertParamExists)('
|
|
1951
|
+
(0, common_1.assertParamExists)('apiV1StoresQuerySuggestionsConfigGet', 'xStoreid', xStoreid);
|
|
2832
1952
|
// verify required parameter 'xStoresecret' is not null or undefined
|
|
2833
|
-
(0, common_1.assertParamExists)('
|
|
2834
|
-
|
|
2835
|
-
(0, common_1.assertParamExists)('apiV1StoresXStoreIDConfigGet', 'xStoreID', xStoreID);
|
|
2836
|
-
const localVarPath = `/api/v1/stores/{xStoreID}/config`
|
|
2837
|
-
.replace(`{${"xStoreID"}}`, encodeURIComponent(String(xStoreID)));
|
|
1953
|
+
(0, common_1.assertParamExists)('apiV1StoresQuerySuggestionsConfigGet', 'xStoresecret', xStoresecret);
|
|
1954
|
+
const localVarPath = `/api/v1/stores/query-suggestions/config`;
|
|
2838
1955
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2839
1956
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
2840
1957
|
let baseOptions;
|
|
@@ -2862,26 +1979,22 @@ const SDKStoreConfigApiAxiosParamCreator = function (configuration) {
|
|
|
2862
1979
|
};
|
|
2863
1980
|
},
|
|
2864
1981
|
/**
|
|
2865
|
-
* Update
|
|
2866
|
-
* @summary Update
|
|
1982
|
+
* Update autocomplete/suggestions settings for the store. Partial updates supported. **Auth:** `x-storeid` and `x-store-write-secret`.
|
|
1983
|
+
* @summary Update query suggestions configuration
|
|
2867
1984
|
* @param {string} xStoreid Store ID (from dashboard)
|
|
2868
1985
|
* @param {string} xStoreWriteSecret Store write secret
|
|
2869
|
-
* @param {
|
|
2870
|
-
* @param {DataTypesIndexConfig} dataTypesIndexConfig Fields to update (partial)
|
|
1986
|
+
* @param {QuerySuggestionsServiceUpdateSuggestionConfigRequest} querySuggestionsServiceUpdateSuggestionConfigRequest Fields to update (partial)
|
|
2871
1987
|
* @param {*} [options] Override http request option.
|
|
2872
1988
|
* @throws {RequiredError}
|
|
2873
1989
|
*/
|
|
2874
|
-
|
|
1990
|
+
apiV1StoresQuerySuggestionsConfigPut: async (xStoreid, xStoreWriteSecret, querySuggestionsServiceUpdateSuggestionConfigRequest, options = {}) => {
|
|
2875
1991
|
// verify required parameter 'xStoreid' is not null or undefined
|
|
2876
|
-
(0, common_1.assertParamExists)('
|
|
1992
|
+
(0, common_1.assertParamExists)('apiV1StoresQuerySuggestionsConfigPut', 'xStoreid', xStoreid);
|
|
2877
1993
|
// verify required parameter 'xStoreWriteSecret' is not null or undefined
|
|
2878
|
-
(0, common_1.assertParamExists)('
|
|
2879
|
-
// verify required parameter '
|
|
2880
|
-
(0, common_1.assertParamExists)('
|
|
2881
|
-
|
|
2882
|
-
(0, common_1.assertParamExists)('apiV1StoresXStoreIDConfigPut', 'dataTypesIndexConfig', dataTypesIndexConfig);
|
|
2883
|
-
const localVarPath = `/api/v1/stores/{xStoreID}/config`
|
|
2884
|
-
.replace(`{${"xStoreID"}}`, encodeURIComponent(String(xStoreID)));
|
|
1994
|
+
(0, common_1.assertParamExists)('apiV1StoresQuerySuggestionsConfigPut', 'xStoreWriteSecret', xStoreWriteSecret);
|
|
1995
|
+
// verify required parameter 'querySuggestionsServiceUpdateSuggestionConfigRequest' is not null or undefined
|
|
1996
|
+
(0, common_1.assertParamExists)('apiV1StoresQuerySuggestionsConfigPut', 'querySuggestionsServiceUpdateSuggestionConfigRequest', querySuggestionsServiceUpdateSuggestionConfigRequest);
|
|
1997
|
+
const localVarPath = `/api/v1/stores/query-suggestions/config`;
|
|
2885
1998
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2886
1999
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
2887
2000
|
let baseOptions;
|
|
@@ -2904,30 +2017,26 @@ const SDKStoreConfigApiAxiosParamCreator = function (configuration) {
|
|
|
2904
2017
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
2905
2018
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2906
2019
|
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
2907
|
-
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(
|
|
2020
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(querySuggestionsServiceUpdateSuggestionConfigRequest, localVarRequestOptions, configuration);
|
|
2908
2021
|
return {
|
|
2909
2022
|
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
2910
2023
|
options: localVarRequestOptions,
|
|
2911
2024
|
};
|
|
2912
2025
|
},
|
|
2913
2026
|
/**
|
|
2914
|
-
* Returns
|
|
2915
|
-
* @summary Get
|
|
2027
|
+
* Returns the current search index schema (fields and options) for the store. **Auth:** `x-storeid` and `x-storesecret`.
|
|
2028
|
+
* @summary Get index schema
|
|
2916
2029
|
* @param {string} xStoreid Store ID (from dashboard)
|
|
2917
2030
|
* @param {string} xStoresecret Store read secret
|
|
2918
|
-
* @param {string} xStoreID Store ID (must match x-storeid header)
|
|
2919
2031
|
* @param {*} [options] Override http request option.
|
|
2920
2032
|
* @throws {RequiredError}
|
|
2921
2033
|
*/
|
|
2922
|
-
|
|
2034
|
+
apiV1StoresSchemaGet: async (xStoreid, xStoresecret, options = {}) => {
|
|
2923
2035
|
// verify required parameter 'xStoreid' is not null or undefined
|
|
2924
|
-
(0, common_1.assertParamExists)('
|
|
2036
|
+
(0, common_1.assertParamExists)('apiV1StoresSchemaGet', 'xStoreid', xStoreid);
|
|
2925
2037
|
// verify required parameter 'xStoresecret' is not null or undefined
|
|
2926
|
-
(0, common_1.assertParamExists)('
|
|
2927
|
-
|
|
2928
|
-
(0, common_1.assertParamExists)('apiV1StoresXStoreIDConfigSchemaGet', 'xStoreID', xStoreID);
|
|
2929
|
-
const localVarPath = `/api/v1/stores/{xStoreID}/config-schema`
|
|
2930
|
-
.replace(`{${"xStoreID"}}`, encodeURIComponent(String(xStoreID)));
|
|
2038
|
+
(0, common_1.assertParamExists)('apiV1StoresSchemaGet', 'xStoresecret', xStoresecret);
|
|
2039
|
+
const localVarPath = `/api/v1/stores/schema`;
|
|
2931
2040
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2932
2041
|
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
2933
2042
|
let baseOptions;
|
|
@@ -2954,870 +2063,564 @@ const SDKStoreConfigApiAxiosParamCreator = function (configuration) {
|
|
|
2954
2063
|
options: localVarRequestOptions,
|
|
2955
2064
|
};
|
|
2956
2065
|
},
|
|
2066
|
+
/**
|
|
2067
|
+
* Define or update the search index schema (field names, types, searchable/facet options). Mode: `additive` (add fields, keep data) or `replace` (recreate index). **Auth:** `x-storeid` and `x-store-write-secret`.
|
|
2068
|
+
* @summary Create or update index schema
|
|
2069
|
+
* @param {string} xStoreid Store ID (from dashboard)
|
|
2070
|
+
* @param {string} xStoreWriteSecret Store write secret
|
|
2071
|
+
* @param {DataTypesCollectionSchemaRequest} dataTypesCollectionSchemaRequest Schema definition and mode
|
|
2072
|
+
* @param {*} [options] Override http request option.
|
|
2073
|
+
* @throws {RequiredError}
|
|
2074
|
+
*/
|
|
2075
|
+
apiV1StoresSchemaPost: async (xStoreid, xStoreWriteSecret, dataTypesCollectionSchemaRequest, options = {}) => {
|
|
2076
|
+
// verify required parameter 'xStoreid' is not null or undefined
|
|
2077
|
+
(0, common_1.assertParamExists)('apiV1StoresSchemaPost', 'xStoreid', xStoreid);
|
|
2078
|
+
// verify required parameter 'xStoreWriteSecret' is not null or undefined
|
|
2079
|
+
(0, common_1.assertParamExists)('apiV1StoresSchemaPost', 'xStoreWriteSecret', xStoreWriteSecret);
|
|
2080
|
+
// verify required parameter 'dataTypesCollectionSchemaRequest' is not null or undefined
|
|
2081
|
+
(0, common_1.assertParamExists)('apiV1StoresSchemaPost', 'dataTypesCollectionSchemaRequest', dataTypesCollectionSchemaRequest);
|
|
2082
|
+
const localVarPath = `/api/v1/stores/schema`;
|
|
2083
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2084
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
2085
|
+
let baseOptions;
|
|
2086
|
+
if (configuration) {
|
|
2087
|
+
baseOptions = configuration.baseOptions;
|
|
2088
|
+
}
|
|
2089
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
|
|
2090
|
+
const localVarHeaderParameter = {};
|
|
2091
|
+
const localVarQueryParameter = {};
|
|
2092
|
+
// authentication ApiKeyAuth required
|
|
2093
|
+
await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-storesecret", configuration);
|
|
2094
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
2095
|
+
localVarHeaderParameter['Accept'] = 'application/json';
|
|
2096
|
+
if (xStoreid != null) {
|
|
2097
|
+
localVarHeaderParameter['x-storeid'] = String(xStoreid);
|
|
2098
|
+
}
|
|
2099
|
+
if (xStoreWriteSecret != null) {
|
|
2100
|
+
localVarHeaderParameter['x-store-write-secret'] = String(xStoreWriteSecret);
|
|
2101
|
+
}
|
|
2102
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
2103
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2104
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
2105
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(dataTypesCollectionSchemaRequest, localVarRequestOptions, configuration);
|
|
2106
|
+
return {
|
|
2107
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
2108
|
+
options: localVarRequestOptions,
|
|
2109
|
+
};
|
|
2110
|
+
},
|
|
2957
2111
|
};
|
|
2958
2112
|
};
|
|
2959
|
-
exports.
|
|
2113
|
+
exports.StoreManagementApiAxiosParamCreator = StoreManagementApiAxiosParamCreator;
|
|
2960
2114
|
/**
|
|
2961
|
-
*
|
|
2115
|
+
* StoreManagementApi - functional programming interface
|
|
2962
2116
|
*/
|
|
2963
|
-
const
|
|
2964
|
-
const localVarAxiosParamCreator = (0, exports.
|
|
2117
|
+
const StoreManagementApiFp = function (configuration) {
|
|
2118
|
+
const localVarAxiosParamCreator = (0, exports.StoreManagementApiAxiosParamCreator)(configuration);
|
|
2965
2119
|
return {
|
|
2966
2120
|
/**
|
|
2967
|
-
* Returns search and query-suggestions configuration for the store. **Auth:** `x-storeid` and `x-storesecret`.
|
|
2121
|
+
* Returns search and query-suggestions configuration for the store. **Auth:** `x-storeid` and `x-storesecret`.
|
|
2968
2122
|
* @summary Get store configuration
|
|
2969
2123
|
* @param {string} xStoreid Store ID (from dashboard)
|
|
2970
2124
|
* @param {string} xStoresecret Store read secret
|
|
2971
|
-
* @param {string} xStoreID Store ID (must match x-storeid header)
|
|
2972
2125
|
* @param {*} [options] Override http request option.
|
|
2973
2126
|
* @throws {RequiredError}
|
|
2974
2127
|
*/
|
|
2975
|
-
async
|
|
2976
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.
|
|
2128
|
+
async apiV1StoresConfigGet(xStoreid, xStoresecret, options) {
|
|
2129
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1StoresConfigGet(xStoreid, xStoresecret, options);
|
|
2977
2130
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2978
|
-
const localVarOperationServerBasePath = base_1.operationServerMap['
|
|
2131
|
+
const localVarOperationServerBasePath = base_1.operationServerMap['StoreManagementApi.apiV1StoresConfigGet']?.[localVarOperationServerIndex]?.url;
|
|
2979
2132
|
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2980
2133
|
},
|
|
2981
2134
|
/**
|
|
2982
|
-
* Update search and store settings. Partial updates supported. **Auth:** `x-storeid` and `x-store-write-secret`.
|
|
2135
|
+
* Update search and store settings. Partial updates supported. **Auth:** `x-storeid` and `x-store-write-secret`.
|
|
2983
2136
|
* @summary Update store configuration
|
|
2984
2137
|
* @param {string} xStoreid Store ID (from dashboard)
|
|
2985
2138
|
* @param {string} xStoreWriteSecret Store write secret
|
|
2986
|
-
* @param {
|
|
2987
|
-
* @param {DataTypesIndexConfig} dataTypesIndexConfig Fields to update (partial)
|
|
2139
|
+
* @param {DataTypesStoreConfigUpdateRequest} dataTypesStoreConfigUpdateRequest Fields to update (partial, includes allow_public_search)
|
|
2988
2140
|
* @param {*} [options] Override http request option.
|
|
2989
2141
|
* @throws {RequiredError}
|
|
2990
2142
|
*/
|
|
2991
|
-
async
|
|
2992
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.
|
|
2143
|
+
async apiV1StoresConfigPut(xStoreid, xStoreWriteSecret, dataTypesStoreConfigUpdateRequest, options) {
|
|
2144
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1StoresConfigPut(xStoreid, xStoreWriteSecret, dataTypesStoreConfigUpdateRequest, options);
|
|
2993
2145
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2994
|
-
const localVarOperationServerBasePath = base_1.operationServerMap['
|
|
2146
|
+
const localVarOperationServerBasePath = base_1.operationServerMap['StoreManagementApi.apiV1StoresConfigPut']?.[localVarOperationServerIndex]?.url;
|
|
2995
2147
|
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2996
2148
|
},
|
|
2997
2149
|
/**
|
|
2998
|
-
* Returns metadata for all configurable store fields (types, defaults, validation). **Auth:** `x-storeid` and `x-storesecret`.
|
|
2150
|
+
* Returns metadata for all configurable store fields (types, defaults, validation). **Auth:** `x-storeid` and `x-storesecret`.
|
|
2999
2151
|
* @summary Get store config schema
|
|
3000
2152
|
* @param {string} xStoreid Store ID (from dashboard)
|
|
3001
2153
|
* @param {string} xStoresecret Store read secret
|
|
3002
|
-
* @param {string} xStoreID Store ID (must match x-storeid header)
|
|
3003
2154
|
* @param {*} [options] Override http request option.
|
|
3004
2155
|
* @throws {RequiredError}
|
|
3005
2156
|
*/
|
|
3006
|
-
async
|
|
3007
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.
|
|
2157
|
+
async apiV1StoresConfigSchemaGet(xStoreid, xStoresecret, options) {
|
|
2158
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1StoresConfigSchemaGet(xStoreid, xStoresecret, options);
|
|
3008
2159
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3009
|
-
const localVarOperationServerBasePath = base_1.operationServerMap['
|
|
2160
|
+
const localVarOperationServerBasePath = base_1.operationServerMap['StoreManagementApi.apiV1StoresConfigSchemaGet']?.[localVarOperationServerIndex]?.url;
|
|
3010
2161
|
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
3011
2162
|
},
|
|
3012
|
-
};
|
|
3013
|
-
};
|
|
3014
|
-
exports.SDKStoreConfigApiFp = SDKStoreConfigApiFp;
|
|
3015
|
-
/**
|
|
3016
|
-
* SDKStoreConfigApi - factory interface
|
|
3017
|
-
*/
|
|
3018
|
-
const SDKStoreConfigApiFactory = function (configuration, basePath, axios) {
|
|
3019
|
-
const localVarFp = (0, exports.SDKStoreConfigApiFp)(configuration);
|
|
3020
|
-
return {
|
|
3021
2163
|
/**
|
|
3022
|
-
*
|
|
3023
|
-
* @summary
|
|
2164
|
+
* Run multiple document operations in one request (insert, update, upsert, delete). **Auth:** `x-storeid` and `x-store-write-secret`. Each item can specify its own action.
|
|
2165
|
+
* @summary Bulk index documents
|
|
3024
2166
|
* @param {string} xStoreid Store ID (from dashboard)
|
|
3025
|
-
* @param {string}
|
|
3026
|
-
* @param {
|
|
2167
|
+
* @param {string} xStoreWriteSecret Store write secret
|
|
2168
|
+
* @param {DataTypesBulkDocumentRequest} dataTypesBulkDocumentRequest List of operations
|
|
3027
2169
|
* @param {*} [options] Override http request option.
|
|
3028
2170
|
* @throws {RequiredError}
|
|
3029
2171
|
*/
|
|
3030
|
-
|
|
3031
|
-
|
|
2172
|
+
async apiV1StoresDocumentsBulkPost(xStoreid, xStoreWriteSecret, dataTypesBulkDocumentRequest, options) {
|
|
2173
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1StoresDocumentsBulkPost(xStoreid, xStoreWriteSecret, dataTypesBulkDocumentRequest, options);
|
|
2174
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2175
|
+
const localVarOperationServerBasePath = base_1.operationServerMap['StoreManagementApi.apiV1StoresDocumentsBulkPost']?.[localVarOperationServerIndex]?.url;
|
|
2176
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
3032
2177
|
},
|
|
3033
2178
|
/**
|
|
3034
|
-
*
|
|
3035
|
-
* @summary
|
|
2179
|
+
* Removes all documents from the store\'s search index; schema is preserved. **Auth:** `x-storeid` and `x-store-write-secret`.
|
|
2180
|
+
* @summary Clear all documents
|
|
3036
2181
|
* @param {string} xStoreid Store ID (from dashboard)
|
|
3037
2182
|
* @param {string} xStoreWriteSecret Store write secret
|
|
3038
|
-
* @param {string} xStoreID Store ID (must match x-storeid header)
|
|
3039
|
-
* @param {DataTypesIndexConfig} dataTypesIndexConfig Fields to update (partial)
|
|
3040
2183
|
* @param {*} [options] Override http request option.
|
|
3041
2184
|
* @throws {RequiredError}
|
|
3042
2185
|
*/
|
|
3043
|
-
|
|
3044
|
-
|
|
3045
|
-
|
|
2186
|
+
async apiV1StoresDocumentsDelete(xStoreid, xStoreWriteSecret, options) {
|
|
2187
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1StoresDocumentsDelete(xStoreid, xStoreWriteSecret, options);
|
|
2188
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2189
|
+
const localVarOperationServerBasePath = base_1.operationServerMap['StoreManagementApi.apiV1StoresDocumentsDelete']?.[localVarOperationServerIndex]?.url;
|
|
2190
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2191
|
+
},
|
|
3046
2192
|
/**
|
|
3047
|
-
*
|
|
3048
|
-
* @summary
|
|
2193
|
+
* Remove a document from the store\'s search index by ID. **Auth:** `x-storeid` and `x-store-write-secret`.
|
|
2194
|
+
* @summary Delete a document
|
|
3049
2195
|
* @param {string} xStoreid Store ID (from dashboard)
|
|
3050
|
-
* @param {string}
|
|
3051
|
-
* @param {string}
|
|
2196
|
+
* @param {string} xStoreWriteSecret Store write secret
|
|
2197
|
+
* @param {string} documentID Document ID to delete
|
|
3052
2198
|
* @param {*} [options] Override http request option.
|
|
3053
2199
|
* @throws {RequiredError}
|
|
3054
2200
|
*/
|
|
3055
|
-
|
|
3056
|
-
|
|
2201
|
+
async apiV1StoresDocumentsDocumentIDDelete(xStoreid, xStoreWriteSecret, documentID, options) {
|
|
2202
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1StoresDocumentsDocumentIDDelete(xStoreid, xStoreWriteSecret, documentID, options);
|
|
2203
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2204
|
+
const localVarOperationServerBasePath = base_1.operationServerMap['StoreManagementApi.apiV1StoresDocumentsDocumentIDDelete']?.[localVarOperationServerIndex]?.url;
|
|
2205
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
3057
2206
|
},
|
|
3058
|
-
};
|
|
3059
|
-
};
|
|
3060
|
-
exports.SDKStoreConfigApiFactory = SDKStoreConfigApiFactory;
|
|
3061
|
-
/**
|
|
3062
|
-
* SDKStoreConfigApi - object-oriented interface
|
|
3063
|
-
*/
|
|
3064
|
-
class SDKStoreConfigApi extends base_1.BaseAPI {
|
|
3065
|
-
/**
|
|
3066
|
-
* Returns search and query-suggestions configuration for the store. **Auth:** `x-storeid` and `x-storesecret`. Path `xStoreID` must match the `x-storeid` header.
|
|
3067
|
-
* @summary Get store configuration
|
|
3068
|
-
* @param {string} xStoreid Store ID (from dashboard)
|
|
3069
|
-
* @param {string} xStoresecret Store read secret
|
|
3070
|
-
* @param {string} xStoreID Store ID (must match x-storeid header)
|
|
3071
|
-
* @param {*} [options] Override http request option.
|
|
3072
|
-
* @throws {RequiredError}
|
|
3073
|
-
*/
|
|
3074
|
-
apiV1StoresXStoreIDConfigGet(xStoreid, xStoresecret, xStoreID, options) {
|
|
3075
|
-
return (0, exports.SDKStoreConfigApiFp)(this.configuration).apiV1StoresXStoreIDConfigGet(xStoreid, xStoresecret, xStoreID, options).then((request) => request(this.axios, this.basePath));
|
|
3076
|
-
}
|
|
3077
|
-
/**
|
|
3078
|
-
* Update search and store settings. Partial updates supported. **Auth:** `x-storeid` and `x-store-write-secret`. Path `xStoreID` must match the `x-storeid` header.
|
|
3079
|
-
* @summary Update store configuration
|
|
3080
|
-
* @param {string} xStoreid Store ID (from dashboard)
|
|
3081
|
-
* @param {string} xStoreWriteSecret Store write secret
|
|
3082
|
-
* @param {string} xStoreID Store ID (must match x-storeid header)
|
|
3083
|
-
* @param {DataTypesIndexConfig} dataTypesIndexConfig Fields to update (partial)
|
|
3084
|
-
* @param {*} [options] Override http request option.
|
|
3085
|
-
* @throws {RequiredError}
|
|
3086
|
-
*/
|
|
3087
|
-
apiV1StoresXStoreIDConfigPut(xStoreid, xStoreWriteSecret, xStoreID, dataTypesIndexConfig, options) {
|
|
3088
|
-
return (0, exports.SDKStoreConfigApiFp)(this.configuration).apiV1StoresXStoreIDConfigPut(xStoreid, xStoreWriteSecret, xStoreID, dataTypesIndexConfig, options).then((request) => request(this.axios, this.basePath));
|
|
3089
|
-
}
|
|
3090
|
-
/**
|
|
3091
|
-
* Returns metadata for all configurable store fields (types, defaults, validation). **Auth:** `x-storeid` and `x-storesecret`. Path `xStoreID` must match the `x-storeid` header.
|
|
3092
|
-
* @summary Get store config schema
|
|
3093
|
-
* @param {string} xStoreid Store ID (from dashboard)
|
|
3094
|
-
* @param {string} xStoresecret Store read secret
|
|
3095
|
-
* @param {string} xStoreID Store ID (must match x-storeid header)
|
|
3096
|
-
* @param {*} [options] Override http request option.
|
|
3097
|
-
* @throws {RequiredError}
|
|
3098
|
-
*/
|
|
3099
|
-
apiV1StoresXStoreIDConfigSchemaGet(xStoreid, xStoresecret, xStoreID, options) {
|
|
3100
|
-
return (0, exports.SDKStoreConfigApiFp)(this.configuration).apiV1StoresXStoreIDConfigSchemaGet(xStoreid, xStoresecret, xStoreID, options).then((request) => request(this.axios, this.basePath));
|
|
3101
|
-
}
|
|
3102
|
-
}
|
|
3103
|
-
exports.SDKStoreConfigApi = SDKStoreConfigApi;
|
|
3104
|
-
/**
|
|
3105
|
-
* SDKStoreCreationApi - axios parameter creator
|
|
3106
|
-
*/
|
|
3107
|
-
const SDKStoreCreationApiAxiosParamCreator = function (configuration) {
|
|
3108
|
-
return {
|
|
3109
2207
|
/**
|
|
3110
|
-
*
|
|
3111
|
-
* @summary
|
|
3112
|
-
* @param {string}
|
|
3113
|
-
* @param {
|
|
2208
|
+
* Retrieve a single document from the store\'s search index by ID. **Auth:** `x-storeid` and `x-storesecret`. Used by product pages and PDP.
|
|
2209
|
+
* @summary Get a document by ID
|
|
2210
|
+
* @param {string} xStoreid Store ID (from dashboard)
|
|
2211
|
+
* @param {string} xStoresecret Store read secret
|
|
2212
|
+
* @param {string} documentID Document ID to retrieve
|
|
3114
2213
|
* @param {*} [options] Override http request option.
|
|
3115
2214
|
* @throws {RequiredError}
|
|
3116
2215
|
*/
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
|
|
3121
|
-
(0, common_1.
|
|
3122
|
-
const localVarPath = `/api/v1/stores`;
|
|
3123
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3124
|
-
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
3125
|
-
let baseOptions;
|
|
3126
|
-
if (configuration) {
|
|
3127
|
-
baseOptions = configuration.baseOptions;
|
|
3128
|
-
}
|
|
3129
|
-
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
|
|
3130
|
-
const localVarHeaderParameter = {};
|
|
3131
|
-
const localVarQueryParameter = {};
|
|
3132
|
-
// authentication BearerAuth required
|
|
3133
|
-
await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
|
|
3134
|
-
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
3135
|
-
localVarHeaderParameter['Accept'] = 'application/json';
|
|
3136
|
-
if (authorization != null) {
|
|
3137
|
-
localVarHeaderParameter['Authorization'] = String(authorization);
|
|
3138
|
-
}
|
|
3139
|
-
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
3140
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3141
|
-
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
3142
|
-
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(dataTypesPublicCreateStoreRequest, localVarRequestOptions, configuration);
|
|
3143
|
-
return {
|
|
3144
|
-
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
3145
|
-
options: localVarRequestOptions,
|
|
3146
|
-
};
|
|
2216
|
+
async apiV1StoresDocumentsDocumentIDGet(xStoreid, xStoresecret, documentID, options) {
|
|
2217
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1StoresDocumentsDocumentIDGet(xStoreid, xStoresecret, documentID, options);
|
|
2218
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2219
|
+
const localVarOperationServerBasePath = base_1.operationServerMap['StoreManagementApi.apiV1StoresDocumentsDocumentIDGet']?.[localVarOperationServerIndex]?.url;
|
|
2220
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
3147
2221
|
},
|
|
3148
|
-
};
|
|
3149
|
-
};
|
|
3150
|
-
exports.SDKStoreCreationApiAxiosParamCreator = SDKStoreCreationApiAxiosParamCreator;
|
|
3151
|
-
/**
|
|
3152
|
-
* SDKStoreCreationApi - functional programming interface
|
|
3153
|
-
*/
|
|
3154
|
-
const SDKStoreCreationApiFp = function (configuration) {
|
|
3155
|
-
const localVarAxiosParamCreator = (0, exports.SDKStoreCreationApiAxiosParamCreator)(configuration);
|
|
3156
|
-
return {
|
|
3157
2222
|
/**
|
|
3158
|
-
*
|
|
3159
|
-
* @summary
|
|
3160
|
-
* @param {string}
|
|
3161
|
-
* @param {
|
|
2223
|
+
* Add or update one document in the store\'s search index. **Auth:** `x-storeid` and `x-store-write-secret`. If you omit document ID, one is generated; existing documents with the same ID are updated.
|
|
2224
|
+
* @summary Index a single document
|
|
2225
|
+
* @param {string} xStoreid Store ID (from dashboard)
|
|
2226
|
+
* @param {string} xStoreWriteSecret Store write secret
|
|
2227
|
+
* @param {DataTypesDocumentRequest} dataTypesDocumentRequest Document fields to index
|
|
3162
2228
|
* @param {*} [options] Override http request option.
|
|
3163
2229
|
* @throws {RequiredError}
|
|
3164
2230
|
*/
|
|
3165
|
-
async
|
|
3166
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.
|
|
2231
|
+
async apiV1StoresDocumentsPost(xStoreid, xStoreWriteSecret, dataTypesDocumentRequest, options) {
|
|
2232
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1StoresDocumentsPost(xStoreid, xStoreWriteSecret, dataTypesDocumentRequest, options);
|
|
3167
2233
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3168
|
-
const localVarOperationServerBasePath = base_1.operationServerMap['
|
|
2234
|
+
const localVarOperationServerBasePath = base_1.operationServerMap['StoreManagementApi.apiV1StoresDocumentsPost']?.[localVarOperationServerIndex]?.url;
|
|
3169
2235
|
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
3170
2236
|
},
|
|
3171
|
-
};
|
|
3172
|
-
};
|
|
3173
|
-
exports.SDKStoreCreationApiFp = SDKStoreCreationApiFp;
|
|
3174
|
-
/**
|
|
3175
|
-
* SDKStoreCreationApi - factory interface
|
|
3176
|
-
*/
|
|
3177
|
-
const SDKStoreCreationApiFactory = function (configuration, basePath, axios) {
|
|
3178
|
-
const localVarFp = (0, exports.SDKStoreCreationApiFp)(configuration);
|
|
3179
|
-
return {
|
|
3180
2237
|
/**
|
|
3181
|
-
*
|
|
3182
|
-
* @summary
|
|
3183
|
-
* @param {string}
|
|
3184
|
-
* @param {
|
|
2238
|
+
* Returns basic store details (name, location, status). **Auth:** `x-storeid` and `x-storesecret`.
|
|
2239
|
+
* @summary Get store info
|
|
2240
|
+
* @param {string} xStoreid Store ID (from dashboard)
|
|
2241
|
+
* @param {string} xStoresecret Store read secret
|
|
3185
2242
|
* @param {*} [options] Override http request option.
|
|
3186
2243
|
* @throws {RequiredError}
|
|
3187
2244
|
*/
|
|
3188
|
-
|
|
3189
|
-
|
|
2245
|
+
async apiV1StoresGet(xStoreid, xStoresecret, options) {
|
|
2246
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1StoresGet(xStoreid, xStoresecret, options);
|
|
2247
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2248
|
+
const localVarOperationServerBasePath = base_1.operationServerMap['StoreManagementApi.apiV1StoresGet']?.[localVarOperationServerIndex]?.url;
|
|
2249
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
3190
2250
|
},
|
|
3191
|
-
};
|
|
3192
|
-
};
|
|
3193
|
-
exports.SDKStoreCreationApiFactory = SDKStoreCreationApiFactory;
|
|
3194
|
-
/**
|
|
3195
|
-
* SDKStoreCreationApi - object-oriented interface
|
|
3196
|
-
*/
|
|
3197
|
-
class SDKStoreCreationApi extends base_1.BaseAPI {
|
|
3198
|
-
/**
|
|
3199
|
-
* Creates a new store with minimal information. Returns store credentials (xStoreID, xStoreSecret, xStoreWriteSecret) immediately. This is a public API for SDK integration. Requires JWT authentication.
|
|
3200
|
-
* @summary Create Store (Public SDK API)
|
|
3201
|
-
* @param {string} authorization Bearer JWT Token
|
|
3202
|
-
* @param {DataTypesPublicCreateStoreRequest} dataTypesPublicCreateStoreRequest Store creation request
|
|
3203
|
-
* @param {*} [options] Override http request option.
|
|
3204
|
-
* @throws {RequiredError}
|
|
3205
|
-
*/
|
|
3206
|
-
apiV1StoresPost(authorization, dataTypesPublicCreateStoreRequest, options) {
|
|
3207
|
-
return (0, exports.SDKStoreCreationApiFp)(this.configuration).apiV1StoresPost(authorization, dataTypesPublicCreateStoreRequest, options).then((request) => request(this.axios, this.basePath));
|
|
3208
|
-
}
|
|
3209
|
-
}
|
|
3210
|
-
exports.SDKStoreCreationApi = SDKStoreCreationApi;
|
|
3211
|
-
/**
|
|
3212
|
-
* SDKStoreInfoApi - axios parameter creator
|
|
3213
|
-
*/
|
|
3214
|
-
const SDKStoreInfoApiAxiosParamCreator = function (configuration) {
|
|
3215
|
-
return {
|
|
3216
2251
|
/**
|
|
3217
|
-
* Returns
|
|
3218
|
-
* @summary Get
|
|
2252
|
+
* Returns autocomplete/suggestions configuration for the store. **Auth:** `x-storeid` and `x-storesecret`.
|
|
2253
|
+
* @summary Get query suggestions configuration
|
|
3219
2254
|
* @param {string} xStoreid Store ID (from dashboard)
|
|
3220
2255
|
* @param {string} xStoresecret Store read secret
|
|
3221
|
-
* @param {string} xStoreID Store ID (must match x-storeid header)
|
|
3222
2256
|
* @param {*} [options] Override http request option.
|
|
3223
2257
|
* @throws {RequiredError}
|
|
3224
2258
|
*/
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
(0, common_1.
|
|
3230
|
-
// verify required parameter 'xStoreID' is not null or undefined
|
|
3231
|
-
(0, common_1.assertParamExists)('apiV1StoresXStoreIDGet', 'xStoreID', xStoreID);
|
|
3232
|
-
const localVarPath = `/api/v1/stores/{xStoreID}`
|
|
3233
|
-
.replace(`{${"xStoreID"}}`, encodeURIComponent(String(xStoreID)));
|
|
3234
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3235
|
-
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
3236
|
-
let baseOptions;
|
|
3237
|
-
if (configuration) {
|
|
3238
|
-
baseOptions = configuration.baseOptions;
|
|
3239
|
-
}
|
|
3240
|
-
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
3241
|
-
const localVarHeaderParameter = {};
|
|
3242
|
-
const localVarQueryParameter = {};
|
|
3243
|
-
// authentication ApiKeyAuth required
|
|
3244
|
-
await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-storesecret", configuration);
|
|
3245
|
-
localVarHeaderParameter['Accept'] = 'application/json';
|
|
3246
|
-
if (xStoreid != null) {
|
|
3247
|
-
localVarHeaderParameter['x-storeid'] = String(xStoreid);
|
|
3248
|
-
}
|
|
3249
|
-
if (xStoresecret != null) {
|
|
3250
|
-
localVarHeaderParameter['x-storesecret'] = String(xStoresecret);
|
|
3251
|
-
}
|
|
3252
|
-
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
3253
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3254
|
-
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
3255
|
-
return {
|
|
3256
|
-
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
3257
|
-
options: localVarRequestOptions,
|
|
3258
|
-
};
|
|
2259
|
+
async apiV1StoresQuerySuggestionsConfigGet(xStoreid, xStoresecret, options) {
|
|
2260
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1StoresQuerySuggestionsConfigGet(xStoreid, xStoresecret, options);
|
|
2261
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2262
|
+
const localVarOperationServerBasePath = base_1.operationServerMap['StoreManagementApi.apiV1StoresQuerySuggestionsConfigGet']?.[localVarOperationServerIndex]?.url;
|
|
2263
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
3259
2264
|
},
|
|
3260
|
-
};
|
|
3261
|
-
};
|
|
3262
|
-
exports.SDKStoreInfoApiAxiosParamCreator = SDKStoreInfoApiAxiosParamCreator;
|
|
3263
|
-
/**
|
|
3264
|
-
* SDKStoreInfoApi - functional programming interface
|
|
3265
|
-
*/
|
|
3266
|
-
const SDKStoreInfoApiFp = function (configuration) {
|
|
3267
|
-
const localVarAxiosParamCreator = (0, exports.SDKStoreInfoApiAxiosParamCreator)(configuration);
|
|
3268
|
-
return {
|
|
3269
2265
|
/**
|
|
3270
|
-
*
|
|
3271
|
-
* @summary
|
|
2266
|
+
* Update autocomplete/suggestions settings for the store. Partial updates supported. **Auth:** `x-storeid` and `x-store-write-secret`.
|
|
2267
|
+
* @summary Update query suggestions configuration
|
|
2268
|
+
* @param {string} xStoreid Store ID (from dashboard)
|
|
2269
|
+
* @param {string} xStoreWriteSecret Store write secret
|
|
2270
|
+
* @param {QuerySuggestionsServiceUpdateSuggestionConfigRequest} querySuggestionsServiceUpdateSuggestionConfigRequest Fields to update (partial)
|
|
2271
|
+
* @param {*} [options] Override http request option.
|
|
2272
|
+
* @throws {RequiredError}
|
|
2273
|
+
*/
|
|
2274
|
+
async apiV1StoresQuerySuggestionsConfigPut(xStoreid, xStoreWriteSecret, querySuggestionsServiceUpdateSuggestionConfigRequest, options) {
|
|
2275
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1StoresQuerySuggestionsConfigPut(xStoreid, xStoreWriteSecret, querySuggestionsServiceUpdateSuggestionConfigRequest, options);
|
|
2276
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2277
|
+
const localVarOperationServerBasePath = base_1.operationServerMap['StoreManagementApi.apiV1StoresQuerySuggestionsConfigPut']?.[localVarOperationServerIndex]?.url;
|
|
2278
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2279
|
+
},
|
|
2280
|
+
/**
|
|
2281
|
+
* Returns the current search index schema (fields and options) for the store. **Auth:** `x-storeid` and `x-storesecret`.
|
|
2282
|
+
* @summary Get index schema
|
|
3272
2283
|
* @param {string} xStoreid Store ID (from dashboard)
|
|
3273
2284
|
* @param {string} xStoresecret Store read secret
|
|
3274
|
-
* @param {string} xStoreID Store ID (must match x-storeid header)
|
|
3275
2285
|
* @param {*} [options] Override http request option.
|
|
3276
2286
|
* @throws {RequiredError}
|
|
3277
2287
|
*/
|
|
3278
|
-
async
|
|
3279
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.
|
|
2288
|
+
async apiV1StoresSchemaGet(xStoreid, xStoresecret, options) {
|
|
2289
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1StoresSchemaGet(xStoreid, xStoresecret, options);
|
|
3280
2290
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3281
|
-
const localVarOperationServerBasePath = base_1.operationServerMap['
|
|
2291
|
+
const localVarOperationServerBasePath = base_1.operationServerMap['StoreManagementApi.apiV1StoresSchemaGet']?.[localVarOperationServerIndex]?.url;
|
|
2292
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2293
|
+
},
|
|
2294
|
+
/**
|
|
2295
|
+
* Define or update the search index schema (field names, types, searchable/facet options). Mode: `additive` (add fields, keep data) or `replace` (recreate index). **Auth:** `x-storeid` and `x-store-write-secret`.
|
|
2296
|
+
* @summary Create or update index schema
|
|
2297
|
+
* @param {string} xStoreid Store ID (from dashboard)
|
|
2298
|
+
* @param {string} xStoreWriteSecret Store write secret
|
|
2299
|
+
* @param {DataTypesCollectionSchemaRequest} dataTypesCollectionSchemaRequest Schema definition and mode
|
|
2300
|
+
* @param {*} [options] Override http request option.
|
|
2301
|
+
* @throws {RequiredError}
|
|
2302
|
+
*/
|
|
2303
|
+
async apiV1StoresSchemaPost(xStoreid, xStoreWriteSecret, dataTypesCollectionSchemaRequest, options) {
|
|
2304
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1StoresSchemaPost(xStoreid, xStoreWriteSecret, dataTypesCollectionSchemaRequest, options);
|
|
2305
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2306
|
+
const localVarOperationServerBasePath = base_1.operationServerMap['StoreManagementApi.apiV1StoresSchemaPost']?.[localVarOperationServerIndex]?.url;
|
|
3282
2307
|
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
3283
2308
|
},
|
|
3284
2309
|
};
|
|
3285
2310
|
};
|
|
3286
|
-
exports.
|
|
2311
|
+
exports.StoreManagementApiFp = StoreManagementApiFp;
|
|
3287
2312
|
/**
|
|
3288
|
-
*
|
|
2313
|
+
* StoreManagementApi - factory interface
|
|
3289
2314
|
*/
|
|
3290
|
-
const
|
|
3291
|
-
const localVarFp = (0, exports.
|
|
2315
|
+
const StoreManagementApiFactory = function (configuration, basePath, axios) {
|
|
2316
|
+
const localVarFp = (0, exports.StoreManagementApiFp)(configuration);
|
|
3292
2317
|
return {
|
|
3293
2318
|
/**
|
|
3294
|
-
* Returns
|
|
3295
|
-
* @summary Get store
|
|
2319
|
+
* Returns search and query-suggestions configuration for the store. **Auth:** `x-storeid` and `x-storesecret`.
|
|
2320
|
+
* @summary Get store configuration
|
|
3296
2321
|
* @param {string} xStoreid Store ID (from dashboard)
|
|
3297
2322
|
* @param {string} xStoresecret Store read secret
|
|
3298
|
-
* @param {string} xStoreID Store ID (must match x-storeid header)
|
|
3299
2323
|
* @param {*} [options] Override http request option.
|
|
3300
2324
|
* @throws {RequiredError}
|
|
3301
2325
|
*/
|
|
3302
|
-
|
|
3303
|
-
return localVarFp.
|
|
2326
|
+
apiV1StoresConfigGet(xStoreid, xStoresecret, options) {
|
|
2327
|
+
return localVarFp.apiV1StoresConfigGet(xStoreid, xStoresecret, options).then((request) => request(axios, basePath));
|
|
3304
2328
|
},
|
|
3305
|
-
};
|
|
3306
|
-
};
|
|
3307
|
-
exports.SDKStoreInfoApiFactory = SDKStoreInfoApiFactory;
|
|
3308
|
-
/**
|
|
3309
|
-
* SDKStoreInfoApi - object-oriented interface
|
|
3310
|
-
*/
|
|
3311
|
-
class SDKStoreInfoApi extends base_1.BaseAPI {
|
|
3312
|
-
/**
|
|
3313
|
-
* Returns basic store details (name, location, status). **Auth:** `x-storeid` and `x-storesecret`. Path `xStoreID` must match the `x-storeid` header.
|
|
3314
|
-
* @summary Get store info
|
|
3315
|
-
* @param {string} xStoreid Store ID (from dashboard)
|
|
3316
|
-
* @param {string} xStoresecret Store read secret
|
|
3317
|
-
* @param {string} xStoreID Store ID (must match x-storeid header)
|
|
3318
|
-
* @param {*} [options] Override http request option.
|
|
3319
|
-
* @throws {RequiredError}
|
|
3320
|
-
*/
|
|
3321
|
-
apiV1StoresXStoreIDGet(xStoreid, xStoresecret, xStoreID, options) {
|
|
3322
|
-
return (0, exports.SDKStoreInfoApiFp)(this.configuration).apiV1StoresXStoreIDGet(xStoreid, xStoresecret, xStoreID, options).then((request) => request(this.axios, this.basePath));
|
|
3323
|
-
}
|
|
3324
|
-
}
|
|
3325
|
-
exports.SDKStoreInfoApi = SDKStoreInfoApi;
|
|
3326
|
-
/**
|
|
3327
|
-
* SearchApi - axios parameter creator
|
|
3328
|
-
*/
|
|
3329
|
-
const SearchApiAxiosParamCreator = function (configuration) {
|
|
3330
|
-
return {
|
|
3331
2329
|
/**
|
|
3332
|
-
*
|
|
3333
|
-
* @summary
|
|
2330
|
+
* Update search and store settings. Partial updates supported. **Auth:** `x-storeid` and `x-store-write-secret`.
|
|
2331
|
+
* @summary Update store configuration
|
|
3334
2332
|
* @param {string} xStoreid Store ID (from dashboard)
|
|
3335
|
-
* @param {string}
|
|
3336
|
-
* @param {
|
|
3337
|
-
* @param {string} [xUserId] User ID for personalization
|
|
3338
|
-
* @param {string} [xAnonId] Anonymous user ID for personalization
|
|
3339
|
-
* @param {string} [xSessionId] Session ID for personalization
|
|
3340
|
-
* @param {number} [page] Page number (default: 1)
|
|
3341
|
-
* @param {number} [perPage] Items per page (default: 10)
|
|
3342
|
-
* @param {string} [sortBy] Sort option (e.g., price:asc, created_at:desc)
|
|
3343
|
-
* @param {string} [filterBy] Filter string (e.g., category:shirts)
|
|
3344
|
-
* @param {string} [facetBy] Facet fields (comma-separated)
|
|
3345
|
-
* @param {number} [maxFacetValues] Maximum facet values to return
|
|
3346
|
-
* @param {boolean} [widgetMode] Return widget-formatted results
|
|
3347
|
-
* @param {boolean} [includeSuggestions] Include autocomplete suggestions
|
|
3348
|
-
* @param {number} [suggestionsLimit] Number of suggestions to return
|
|
3349
|
-
* @param {string} [analyticsTags] Analytics tags (comma-separated)
|
|
3350
|
-
* @param {string} [stopwordSets] Stopword set IDs (comma-separated)
|
|
3351
|
-
* @param {string} [synonymSets] Synonym set IDs (comma-separated)
|
|
3352
|
-
* @param {string} [searchFields] Fields to search in (comma-separated)
|
|
3353
|
-
* @param {string} [returnFields] Fields to return (comma-separated)
|
|
3354
|
-
* @param {string} [omitFields] Fields to omit (comma-separated)
|
|
3355
|
-
* @param {string} [snippetFields] Fields to generate snippets for (comma-separated)
|
|
3356
|
-
* @param {string} [fullSnippetFields] Fields to include full snippet (comma-separated)
|
|
3357
|
-
* @param {string} [fieldWeights] Field weights as comma-separated integers (e.g., 3,2,1)
|
|
3358
|
-
* @param {string} [groupField] Field to group results by
|
|
3359
|
-
* @param {number} [groupSize] Number of results per group
|
|
3360
|
-
* @param {string} [snippetPrefix] Prefix for highlighted snippets
|
|
3361
|
-
* @param {string} [snippetSuffix] Suffix for highlighted snippets
|
|
3362
|
-
* @param {number} [snippetTokenLimit] Maximum tokens in snippet
|
|
3363
|
-
* @param {number} [snippetMinLen] Minimum snippet length
|
|
3364
|
-
* @param {boolean} [includeSnippets] Include snippets in results
|
|
3365
|
-
* @param {string} [prefixMode] Prefix matching mode (e.g., always, fallback, off)
|
|
3366
|
-
* @param {string} [infixMode] Infix matching mode (e.g., always, fallback, off)
|
|
3367
|
-
* @param {number} [typoMax] Maximum typo tolerance
|
|
3368
|
-
* @param {number} [typoMinLen1] Min word length for 1 typo
|
|
3369
|
-
* @param {number} [typoMinLen2] Min word length for 2 typos
|
|
3370
|
-
* @param {number} [searchTimeoutMs] Search timeout in milliseconds
|
|
3371
|
-
* @param {boolean} [requireAllTerms] Require all search terms to match
|
|
3372
|
-
* @param {boolean} [exactMatchBoost] Boost exact matches
|
|
3373
|
-
* @param {boolean} [cacheResults] Cache search results
|
|
3374
|
-
* @param {boolean} [applyRules] Apply search rules
|
|
3375
|
-
* @param {string} [presetName] Search preset name to use
|
|
3376
|
-
* @param {string} [facetSearchText] Text to filter facet values
|
|
2333
|
+
* @param {string} xStoreWriteSecret Store write secret
|
|
2334
|
+
* @param {DataTypesStoreConfigUpdateRequest} dataTypesStoreConfigUpdateRequest Fields to update (partial, includes allow_public_search)
|
|
3377
2335
|
* @param {*} [options] Override http request option.
|
|
3378
2336
|
* @throws {RequiredError}
|
|
3379
2337
|
*/
|
|
3380
|
-
|
|
3381
|
-
|
|
3382
|
-
(0, common_1.assertParamExists)('v1SearchGet', 'xStoreid', xStoreid);
|
|
3383
|
-
// verify required parameter 'xStoresecret' is not null or undefined
|
|
3384
|
-
(0, common_1.assertParamExists)('v1SearchGet', 'xStoresecret', xStoresecret);
|
|
3385
|
-
// verify required parameter 'q' is not null or undefined
|
|
3386
|
-
(0, common_1.assertParamExists)('v1SearchGet', 'q', q);
|
|
3387
|
-
const localVarPath = `/v1/search`;
|
|
3388
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3389
|
-
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
3390
|
-
let baseOptions;
|
|
3391
|
-
if (configuration) {
|
|
3392
|
-
baseOptions = configuration.baseOptions;
|
|
3393
|
-
}
|
|
3394
|
-
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
3395
|
-
const localVarHeaderParameter = {};
|
|
3396
|
-
const localVarQueryParameter = {};
|
|
3397
|
-
if (q !== undefined) {
|
|
3398
|
-
localVarQueryParameter['q'] = q;
|
|
3399
|
-
}
|
|
3400
|
-
if (page !== undefined) {
|
|
3401
|
-
localVarQueryParameter['page'] = page;
|
|
3402
|
-
}
|
|
3403
|
-
if (perPage !== undefined) {
|
|
3404
|
-
localVarQueryParameter['per_page'] = perPage;
|
|
3405
|
-
}
|
|
3406
|
-
if (sortBy !== undefined) {
|
|
3407
|
-
localVarQueryParameter['sort_by'] = sortBy;
|
|
3408
|
-
}
|
|
3409
|
-
if (filterBy !== undefined) {
|
|
3410
|
-
localVarQueryParameter['filter_by'] = filterBy;
|
|
3411
|
-
}
|
|
3412
|
-
if (facetBy !== undefined) {
|
|
3413
|
-
localVarQueryParameter['facet_by'] = facetBy;
|
|
3414
|
-
}
|
|
3415
|
-
if (maxFacetValues !== undefined) {
|
|
3416
|
-
localVarQueryParameter['max_facet_values'] = maxFacetValues;
|
|
3417
|
-
}
|
|
3418
|
-
if (widgetMode !== undefined) {
|
|
3419
|
-
localVarQueryParameter['widget_mode'] = widgetMode;
|
|
3420
|
-
}
|
|
3421
|
-
if (includeSuggestions !== undefined) {
|
|
3422
|
-
localVarQueryParameter['include_suggestions'] = includeSuggestions;
|
|
3423
|
-
}
|
|
3424
|
-
if (suggestionsLimit !== undefined) {
|
|
3425
|
-
localVarQueryParameter['suggestions_limit'] = suggestionsLimit;
|
|
3426
|
-
}
|
|
3427
|
-
if (analyticsTags !== undefined) {
|
|
3428
|
-
localVarQueryParameter['analytics_tags'] = analyticsTags;
|
|
3429
|
-
}
|
|
3430
|
-
if (stopwordSets !== undefined) {
|
|
3431
|
-
localVarQueryParameter['stopword_sets'] = stopwordSets;
|
|
3432
|
-
}
|
|
3433
|
-
if (synonymSets !== undefined) {
|
|
3434
|
-
localVarQueryParameter['synonym_sets'] = synonymSets;
|
|
3435
|
-
}
|
|
3436
|
-
if (searchFields !== undefined) {
|
|
3437
|
-
localVarQueryParameter['search_fields'] = searchFields;
|
|
3438
|
-
}
|
|
3439
|
-
if (returnFields !== undefined) {
|
|
3440
|
-
localVarQueryParameter['return_fields'] = returnFields;
|
|
3441
|
-
}
|
|
3442
|
-
if (omitFields !== undefined) {
|
|
3443
|
-
localVarQueryParameter['omit_fields'] = omitFields;
|
|
3444
|
-
}
|
|
3445
|
-
if (snippetFields !== undefined) {
|
|
3446
|
-
localVarQueryParameter['snippet_fields'] = snippetFields;
|
|
3447
|
-
}
|
|
3448
|
-
if (fullSnippetFields !== undefined) {
|
|
3449
|
-
localVarQueryParameter['full_snippet_fields'] = fullSnippetFields;
|
|
3450
|
-
}
|
|
3451
|
-
if (fieldWeights !== undefined) {
|
|
3452
|
-
localVarQueryParameter['field_weights'] = fieldWeights;
|
|
3453
|
-
}
|
|
3454
|
-
if (groupField !== undefined) {
|
|
3455
|
-
localVarQueryParameter['group_field'] = groupField;
|
|
3456
|
-
}
|
|
3457
|
-
if (groupSize !== undefined) {
|
|
3458
|
-
localVarQueryParameter['group_size'] = groupSize;
|
|
3459
|
-
}
|
|
3460
|
-
if (snippetPrefix !== undefined) {
|
|
3461
|
-
localVarQueryParameter['snippet_prefix'] = snippetPrefix;
|
|
3462
|
-
}
|
|
3463
|
-
if (snippetSuffix !== undefined) {
|
|
3464
|
-
localVarQueryParameter['snippet_suffix'] = snippetSuffix;
|
|
3465
|
-
}
|
|
3466
|
-
if (snippetTokenLimit !== undefined) {
|
|
3467
|
-
localVarQueryParameter['snippet_token_limit'] = snippetTokenLimit;
|
|
3468
|
-
}
|
|
3469
|
-
if (snippetMinLen !== undefined) {
|
|
3470
|
-
localVarQueryParameter['snippet_min_len'] = snippetMinLen;
|
|
3471
|
-
}
|
|
3472
|
-
if (includeSnippets !== undefined) {
|
|
3473
|
-
localVarQueryParameter['include_snippets'] = includeSnippets;
|
|
3474
|
-
}
|
|
3475
|
-
if (prefixMode !== undefined) {
|
|
3476
|
-
localVarQueryParameter['prefix_mode'] = prefixMode;
|
|
3477
|
-
}
|
|
3478
|
-
if (infixMode !== undefined) {
|
|
3479
|
-
localVarQueryParameter['infix_mode'] = infixMode;
|
|
3480
|
-
}
|
|
3481
|
-
if (typoMax !== undefined) {
|
|
3482
|
-
localVarQueryParameter['typo_max'] = typoMax;
|
|
3483
|
-
}
|
|
3484
|
-
if (typoMinLen1 !== undefined) {
|
|
3485
|
-
localVarQueryParameter['typo_min_len_1'] = typoMinLen1;
|
|
3486
|
-
}
|
|
3487
|
-
if (typoMinLen2 !== undefined) {
|
|
3488
|
-
localVarQueryParameter['typo_min_len_2'] = typoMinLen2;
|
|
3489
|
-
}
|
|
3490
|
-
if (searchTimeoutMs !== undefined) {
|
|
3491
|
-
localVarQueryParameter['search_timeout_ms'] = searchTimeoutMs;
|
|
3492
|
-
}
|
|
3493
|
-
if (requireAllTerms !== undefined) {
|
|
3494
|
-
localVarQueryParameter['require_all_terms'] = requireAllTerms;
|
|
3495
|
-
}
|
|
3496
|
-
if (exactMatchBoost !== undefined) {
|
|
3497
|
-
localVarQueryParameter['exact_match_boost'] = exactMatchBoost;
|
|
3498
|
-
}
|
|
3499
|
-
if (cacheResults !== undefined) {
|
|
3500
|
-
localVarQueryParameter['cache_results'] = cacheResults;
|
|
3501
|
-
}
|
|
3502
|
-
if (applyRules !== undefined) {
|
|
3503
|
-
localVarQueryParameter['apply_rules'] = applyRules;
|
|
3504
|
-
}
|
|
3505
|
-
if (presetName !== undefined) {
|
|
3506
|
-
localVarQueryParameter['preset_name'] = presetName;
|
|
3507
|
-
}
|
|
3508
|
-
if (facetSearchText !== undefined) {
|
|
3509
|
-
localVarQueryParameter['facet_search_text'] = facetSearchText;
|
|
3510
|
-
}
|
|
3511
|
-
localVarHeaderParameter['Accept'] = 'application/json';
|
|
3512
|
-
if (xStoreid != null) {
|
|
3513
|
-
localVarHeaderParameter['x-storeid'] = String(xStoreid);
|
|
3514
|
-
}
|
|
3515
|
-
if (xStoresecret != null) {
|
|
3516
|
-
localVarHeaderParameter['x-storesecret'] = String(xStoresecret);
|
|
3517
|
-
}
|
|
3518
|
-
if (xUserId != null) {
|
|
3519
|
-
localVarHeaderParameter['x-user-id'] = String(xUserId);
|
|
3520
|
-
}
|
|
3521
|
-
if (xAnonId != null) {
|
|
3522
|
-
localVarHeaderParameter['x-anon-id'] = String(xAnonId);
|
|
3523
|
-
}
|
|
3524
|
-
if (xSessionId != null) {
|
|
3525
|
-
localVarHeaderParameter['x-session-id'] = String(xSessionId);
|
|
3526
|
-
}
|
|
3527
|
-
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
3528
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3529
|
-
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
3530
|
-
return {
|
|
3531
|
-
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
3532
|
-
options: localVarRequestOptions,
|
|
3533
|
-
};
|
|
2338
|
+
apiV1StoresConfigPut(xStoreid, xStoreWriteSecret, dataTypesStoreConfigUpdateRequest, options) {
|
|
2339
|
+
return localVarFp.apiV1StoresConfigPut(xStoreid, xStoreWriteSecret, dataTypesStoreConfigUpdateRequest, options).then((request) => request(axios, basePath));
|
|
3534
2340
|
},
|
|
3535
2341
|
/**
|
|
3536
|
-
*
|
|
3537
|
-
* @summary
|
|
2342
|
+
* Returns metadata for all configurable store fields (types, defaults, validation). **Auth:** `x-storeid` and `x-storesecret`.
|
|
2343
|
+
* @summary Get store config schema
|
|
3538
2344
|
* @param {string} xStoreid Store ID (from dashboard)
|
|
3539
|
-
* @param {string} xStoresecret Store read secret
|
|
3540
|
-
* @param {DataTypesPublicSearchRequest} dataTypesPublicSearchRequest Search query, filters, pagination, and options
|
|
3541
|
-
* @param {string} [xUserId] User ID for personalization
|
|
3542
|
-
* @param {string} [xAnonId] Anonymous user ID for personalization
|
|
3543
|
-
* @param {string} [xSessionId] Session ID for personalization
|
|
2345
|
+
* @param {string} xStoresecret Store read secret
|
|
3544
2346
|
* @param {*} [options] Override http request option.
|
|
3545
2347
|
* @throws {RequiredError}
|
|
3546
2348
|
*/
|
|
3547
|
-
|
|
3548
|
-
|
|
3549
|
-
(0, common_1.assertParamExists)('v1SearchPost', 'xStoreid', xStoreid);
|
|
3550
|
-
// verify required parameter 'xStoresecret' is not null or undefined
|
|
3551
|
-
(0, common_1.assertParamExists)('v1SearchPost', 'xStoresecret', xStoresecret);
|
|
3552
|
-
// verify required parameter 'dataTypesPublicSearchRequest' is not null or undefined
|
|
3553
|
-
(0, common_1.assertParamExists)('v1SearchPost', 'dataTypesPublicSearchRequest', dataTypesPublicSearchRequest);
|
|
3554
|
-
const localVarPath = `/v1/search`;
|
|
3555
|
-
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
3556
|
-
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
3557
|
-
let baseOptions;
|
|
3558
|
-
if (configuration) {
|
|
3559
|
-
baseOptions = configuration.baseOptions;
|
|
3560
|
-
}
|
|
3561
|
-
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
|
|
3562
|
-
const localVarHeaderParameter = {};
|
|
3563
|
-
const localVarQueryParameter = {};
|
|
3564
|
-
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
3565
|
-
localVarHeaderParameter['Accept'] = 'application/json';
|
|
3566
|
-
if (xStoreid != null) {
|
|
3567
|
-
localVarHeaderParameter['x-storeid'] = String(xStoreid);
|
|
3568
|
-
}
|
|
3569
|
-
if (xStoresecret != null) {
|
|
3570
|
-
localVarHeaderParameter['x-storesecret'] = String(xStoresecret);
|
|
3571
|
-
}
|
|
3572
|
-
if (xUserId != null) {
|
|
3573
|
-
localVarHeaderParameter['x-user-id'] = String(xUserId);
|
|
3574
|
-
}
|
|
3575
|
-
if (xAnonId != null) {
|
|
3576
|
-
localVarHeaderParameter['x-anon-id'] = String(xAnonId);
|
|
3577
|
-
}
|
|
3578
|
-
if (xSessionId != null) {
|
|
3579
|
-
localVarHeaderParameter['x-session-id'] = String(xSessionId);
|
|
3580
|
-
}
|
|
3581
|
-
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
3582
|
-
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3583
|
-
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
3584
|
-
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(dataTypesPublicSearchRequest, localVarRequestOptions, configuration);
|
|
3585
|
-
return {
|
|
3586
|
-
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
3587
|
-
options: localVarRequestOptions,
|
|
3588
|
-
};
|
|
2349
|
+
apiV1StoresConfigSchemaGet(xStoreid, xStoresecret, options) {
|
|
2350
|
+
return localVarFp.apiV1StoresConfigSchemaGet(xStoreid, xStoresecret, options).then((request) => request(axios, basePath));
|
|
3589
2351
|
},
|
|
3590
|
-
};
|
|
3591
|
-
};
|
|
3592
|
-
exports.SearchApiAxiosParamCreator = SearchApiAxiosParamCreator;
|
|
3593
|
-
/**
|
|
3594
|
-
* SearchApi - functional programming interface
|
|
3595
|
-
*/
|
|
3596
|
-
const SearchApiFp = function (configuration) {
|
|
3597
|
-
const localVarAxiosParamCreator = (0, exports.SearchApiAxiosParamCreator)(configuration);
|
|
3598
|
-
return {
|
|
3599
2352
|
/**
|
|
3600
|
-
*
|
|
3601
|
-
* @summary
|
|
2353
|
+
* Run multiple document operations in one request (insert, update, upsert, delete). **Auth:** `x-storeid` and `x-store-write-secret`. Each item can specify its own action.
|
|
2354
|
+
* @summary Bulk index documents
|
|
3602
2355
|
* @param {string} xStoreid Store ID (from dashboard)
|
|
3603
|
-
* @param {string}
|
|
3604
|
-
* @param {
|
|
3605
|
-
* @param {
|
|
3606
|
-
* @
|
|
3607
|
-
|
|
3608
|
-
|
|
3609
|
-
|
|
3610
|
-
|
|
3611
|
-
|
|
3612
|
-
*
|
|
3613
|
-
* @
|
|
3614
|
-
* @param {
|
|
3615
|
-
* @param {
|
|
3616
|
-
* @param {
|
|
3617
|
-
* @
|
|
3618
|
-
|
|
3619
|
-
|
|
3620
|
-
|
|
3621
|
-
|
|
3622
|
-
|
|
3623
|
-
*
|
|
3624
|
-
* @
|
|
3625
|
-
* @param {string}
|
|
3626
|
-
* @param {string}
|
|
3627
|
-
* @param {
|
|
3628
|
-
* @param {
|
|
3629
|
-
* @
|
|
3630
|
-
|
|
3631
|
-
|
|
3632
|
-
|
|
3633
|
-
|
|
3634
|
-
|
|
3635
|
-
*
|
|
3636
|
-
* @
|
|
3637
|
-
* @param {
|
|
3638
|
-
* @param {
|
|
3639
|
-
* @param {
|
|
3640
|
-
* @param {boolean} [exactMatchBoost] Boost exact matches
|
|
3641
|
-
* @param {boolean} [cacheResults] Cache search results
|
|
3642
|
-
* @param {boolean} [applyRules] Apply search rules
|
|
3643
|
-
* @param {string} [presetName] Search preset name to use
|
|
3644
|
-
* @param {string} [facetSearchText] Text to filter facet values
|
|
2356
|
+
* @param {string} xStoreWriteSecret Store write secret
|
|
2357
|
+
* @param {DataTypesBulkDocumentRequest} dataTypesBulkDocumentRequest List of operations
|
|
2358
|
+
* @param {*} [options] Override http request option.
|
|
2359
|
+
* @throws {RequiredError}
|
|
2360
|
+
*/
|
|
2361
|
+
apiV1StoresDocumentsBulkPost(xStoreid, xStoreWriteSecret, dataTypesBulkDocumentRequest, options) {
|
|
2362
|
+
return localVarFp.apiV1StoresDocumentsBulkPost(xStoreid, xStoreWriteSecret, dataTypesBulkDocumentRequest, options).then((request) => request(axios, basePath));
|
|
2363
|
+
},
|
|
2364
|
+
/**
|
|
2365
|
+
* Removes all documents from the store\'s search index; schema is preserved. **Auth:** `x-storeid` and `x-store-write-secret`.
|
|
2366
|
+
* @summary Clear all documents
|
|
2367
|
+
* @param {string} xStoreid Store ID (from dashboard)
|
|
2368
|
+
* @param {string} xStoreWriteSecret Store write secret
|
|
2369
|
+
* @param {*} [options] Override http request option.
|
|
2370
|
+
* @throws {RequiredError}
|
|
2371
|
+
*/
|
|
2372
|
+
apiV1StoresDocumentsDelete(xStoreid, xStoreWriteSecret, options) {
|
|
2373
|
+
return localVarFp.apiV1StoresDocumentsDelete(xStoreid, xStoreWriteSecret, options).then((request) => request(axios, basePath));
|
|
2374
|
+
},
|
|
2375
|
+
/**
|
|
2376
|
+
* Remove a document from the store\'s search index by ID. **Auth:** `x-storeid` and `x-store-write-secret`.
|
|
2377
|
+
* @summary Delete a document
|
|
2378
|
+
* @param {string} xStoreid Store ID (from dashboard)
|
|
2379
|
+
* @param {string} xStoreWriteSecret Store write secret
|
|
2380
|
+
* @param {string} documentID Document ID to delete
|
|
2381
|
+
* @param {*} [options] Override http request option.
|
|
2382
|
+
* @throws {RequiredError}
|
|
2383
|
+
*/
|
|
2384
|
+
apiV1StoresDocumentsDocumentIDDelete(xStoreid, xStoreWriteSecret, documentID, options) {
|
|
2385
|
+
return localVarFp.apiV1StoresDocumentsDocumentIDDelete(xStoreid, xStoreWriteSecret, documentID, options).then((request) => request(axios, basePath));
|
|
2386
|
+
},
|
|
2387
|
+
/**
|
|
2388
|
+
* Retrieve a single document from the store\'s search index by ID. **Auth:** `x-storeid` and `x-storesecret`. Used by product pages and PDP.
|
|
2389
|
+
* @summary Get a document by ID
|
|
2390
|
+
* @param {string} xStoreid Store ID (from dashboard)
|
|
2391
|
+
* @param {string} xStoresecret Store read secret
|
|
2392
|
+
* @param {string} documentID Document ID to retrieve
|
|
3645
2393
|
* @param {*} [options] Override http request option.
|
|
3646
2394
|
* @throws {RequiredError}
|
|
3647
2395
|
*/
|
|
3648
|
-
|
|
3649
|
-
|
|
3650
|
-
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3651
|
-
const localVarOperationServerBasePath = base_1.operationServerMap['SearchApi.v1SearchGet']?.[localVarOperationServerIndex]?.url;
|
|
3652
|
-
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2396
|
+
apiV1StoresDocumentsDocumentIDGet(xStoreid, xStoresecret, documentID, options) {
|
|
2397
|
+
return localVarFp.apiV1StoresDocumentsDocumentIDGet(xStoreid, xStoresecret, documentID, options).then((request) => request(axios, basePath));
|
|
3653
2398
|
},
|
|
3654
2399
|
/**
|
|
3655
|
-
*
|
|
3656
|
-
* @summary
|
|
2400
|
+
* Add or update one document in the store\'s search index. **Auth:** `x-storeid` and `x-store-write-secret`. If you omit document ID, one is generated; existing documents with the same ID are updated.
|
|
2401
|
+
* @summary Index a single document
|
|
3657
2402
|
* @param {string} xStoreid Store ID (from dashboard)
|
|
3658
|
-
* @param {string}
|
|
3659
|
-
* @param {
|
|
3660
|
-
* @param {string} [xUserId] User ID for personalization
|
|
3661
|
-
* @param {string} [xAnonId] Anonymous user ID for personalization
|
|
3662
|
-
* @param {string} [xSessionId] Session ID for personalization
|
|
2403
|
+
* @param {string} xStoreWriteSecret Store write secret
|
|
2404
|
+
* @param {DataTypesDocumentRequest} dataTypesDocumentRequest Document fields to index
|
|
3663
2405
|
* @param {*} [options] Override http request option.
|
|
3664
2406
|
* @throws {RequiredError}
|
|
3665
2407
|
*/
|
|
3666
|
-
|
|
3667
|
-
|
|
3668
|
-
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3669
|
-
const localVarOperationServerBasePath = base_1.operationServerMap['SearchApi.v1SearchPost']?.[localVarOperationServerIndex]?.url;
|
|
3670
|
-
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
2408
|
+
apiV1StoresDocumentsPost(xStoreid, xStoreWriteSecret, dataTypesDocumentRequest, options) {
|
|
2409
|
+
return localVarFp.apiV1StoresDocumentsPost(xStoreid, xStoreWriteSecret, dataTypesDocumentRequest, options).then((request) => request(axios, basePath));
|
|
3671
2410
|
},
|
|
3672
|
-
};
|
|
3673
|
-
};
|
|
3674
|
-
exports.SearchApiFp = SearchApiFp;
|
|
3675
|
-
/**
|
|
3676
|
-
* SearchApi - factory interface
|
|
3677
|
-
*/
|
|
3678
|
-
const SearchApiFactory = function (configuration, basePath, axios) {
|
|
3679
|
-
const localVarFp = (0, exports.SearchApiFp)(configuration);
|
|
3680
|
-
return {
|
|
3681
2411
|
/**
|
|
3682
|
-
*
|
|
3683
|
-
* @summary
|
|
2412
|
+
* Returns basic store details (name, location, status). **Auth:** `x-storeid` and `x-storesecret`.
|
|
2413
|
+
* @summary Get store info
|
|
3684
2414
|
* @param {string} xStoreid Store ID (from dashboard)
|
|
3685
|
-
* @param {string} xStoresecret Store read secret
|
|
3686
|
-
* @param {string} q Search query
|
|
3687
|
-
* @param {string} [xUserId] User ID for personalization
|
|
3688
|
-
* @param {string} [xAnonId] Anonymous user ID for personalization
|
|
3689
|
-
* @param {string} [xSessionId] Session ID for personalization
|
|
3690
|
-
* @param {number} [page] Page number (default: 1)
|
|
3691
|
-
* @param {number} [perPage] Items per page (default: 10)
|
|
3692
|
-
* @param {string} [sortBy] Sort option (e.g., price:asc, created_at:desc)
|
|
3693
|
-
* @param {string} [filterBy] Filter string (e.g., category:shirts)
|
|
3694
|
-
* @param {string} [facetBy] Facet fields (comma-separated)
|
|
3695
|
-
* @param {number} [maxFacetValues] Maximum facet values to return
|
|
3696
|
-
* @param {boolean} [widgetMode] Return widget-formatted results
|
|
3697
|
-
* @param {boolean} [includeSuggestions] Include autocomplete suggestions
|
|
3698
|
-
* @param {number} [suggestionsLimit] Number of suggestions to return
|
|
3699
|
-
* @param {string} [analyticsTags] Analytics tags (comma-separated)
|
|
3700
|
-
* @param {string} [stopwordSets] Stopword set IDs (comma-separated)
|
|
3701
|
-
* @param {string} [synonymSets] Synonym set IDs (comma-separated)
|
|
3702
|
-
* @param {string} [searchFields] Fields to search in (comma-separated)
|
|
3703
|
-
* @param {string} [returnFields] Fields to return (comma-separated)
|
|
3704
|
-
* @param {string} [omitFields] Fields to omit (comma-separated)
|
|
3705
|
-
* @param {string} [snippetFields] Fields to generate snippets for (comma-separated)
|
|
3706
|
-
* @param {string} [fullSnippetFields] Fields to include full snippet (comma-separated)
|
|
3707
|
-
* @param {string} [fieldWeights] Field weights as comma-separated integers (e.g., 3,2,1)
|
|
3708
|
-
* @param {string} [groupField] Field to group results by
|
|
3709
|
-
* @param {number} [groupSize] Number of results per group
|
|
3710
|
-
* @param {string} [snippetPrefix] Prefix for highlighted snippets
|
|
3711
|
-
* @param {string} [snippetSuffix] Suffix for highlighted snippets
|
|
3712
|
-
* @param {number} [snippetTokenLimit] Maximum tokens in snippet
|
|
3713
|
-
* @param {number} [snippetMinLen] Minimum snippet length
|
|
3714
|
-
* @param {boolean} [includeSnippets] Include snippets in results
|
|
3715
|
-
* @param {string} [prefixMode] Prefix matching mode (e.g., always, fallback, off)
|
|
3716
|
-
* @param {string} [infixMode] Infix matching mode (e.g., always, fallback, off)
|
|
3717
|
-
* @param {number} [typoMax] Maximum typo tolerance
|
|
3718
|
-
* @param {number} [typoMinLen1] Min word length for 1 typo
|
|
3719
|
-
* @param {number} [typoMinLen2] Min word length for 2 typos
|
|
3720
|
-
* @param {number} [searchTimeoutMs] Search timeout in milliseconds
|
|
3721
|
-
* @param {boolean} [requireAllTerms] Require all search terms to match
|
|
3722
|
-
* @param {boolean} [exactMatchBoost] Boost exact matches
|
|
3723
|
-
* @param {boolean} [cacheResults] Cache search results
|
|
3724
|
-
* @param {boolean} [applyRules] Apply search rules
|
|
3725
|
-
* @param {string} [presetName] Search preset name to use
|
|
3726
|
-
* @param {string} [facetSearchText] Text to filter facet values
|
|
2415
|
+
* @param {string} xStoresecret Store read secret
|
|
3727
2416
|
* @param {*} [options] Override http request option.
|
|
3728
2417
|
* @throws {RequiredError}
|
|
3729
2418
|
*/
|
|
3730
|
-
|
|
3731
|
-
return localVarFp.
|
|
2419
|
+
apiV1StoresGet(xStoreid, xStoresecret, options) {
|
|
2420
|
+
return localVarFp.apiV1StoresGet(xStoreid, xStoresecret, options).then((request) => request(axios, basePath));
|
|
3732
2421
|
},
|
|
3733
2422
|
/**
|
|
3734
|
-
*
|
|
3735
|
-
* @summary
|
|
2423
|
+
* Returns autocomplete/suggestions configuration for the store. **Auth:** `x-storeid` and `x-storesecret`.
|
|
2424
|
+
* @summary Get query suggestions configuration
|
|
3736
2425
|
* @param {string} xStoreid Store ID (from dashboard)
|
|
3737
|
-
* @param {string} xStoresecret Store read secret
|
|
3738
|
-
* @param {
|
|
3739
|
-
* @
|
|
3740
|
-
|
|
3741
|
-
|
|
2426
|
+
* @param {string} xStoresecret Store read secret
|
|
2427
|
+
* @param {*} [options] Override http request option.
|
|
2428
|
+
* @throws {RequiredError}
|
|
2429
|
+
*/
|
|
2430
|
+
apiV1StoresQuerySuggestionsConfigGet(xStoreid, xStoresecret, options) {
|
|
2431
|
+
return localVarFp.apiV1StoresQuerySuggestionsConfigGet(xStoreid, xStoresecret, options).then((request) => request(axios, basePath));
|
|
2432
|
+
},
|
|
2433
|
+
/**
|
|
2434
|
+
* Update autocomplete/suggestions settings for the store. Partial updates supported. **Auth:** `x-storeid` and `x-store-write-secret`.
|
|
2435
|
+
* @summary Update query suggestions configuration
|
|
2436
|
+
* @param {string} xStoreid Store ID (from dashboard)
|
|
2437
|
+
* @param {string} xStoreWriteSecret Store write secret
|
|
2438
|
+
* @param {QuerySuggestionsServiceUpdateSuggestionConfigRequest} querySuggestionsServiceUpdateSuggestionConfigRequest Fields to update (partial)
|
|
2439
|
+
* @param {*} [options] Override http request option.
|
|
2440
|
+
* @throws {RequiredError}
|
|
2441
|
+
*/
|
|
2442
|
+
apiV1StoresQuerySuggestionsConfigPut(xStoreid, xStoreWriteSecret, querySuggestionsServiceUpdateSuggestionConfigRequest, options) {
|
|
2443
|
+
return localVarFp.apiV1StoresQuerySuggestionsConfigPut(xStoreid, xStoreWriteSecret, querySuggestionsServiceUpdateSuggestionConfigRequest, options).then((request) => request(axios, basePath));
|
|
2444
|
+
},
|
|
2445
|
+
/**
|
|
2446
|
+
* Returns the current search index schema (fields and options) for the store. **Auth:** `x-storeid` and `x-storesecret`.
|
|
2447
|
+
* @summary Get index schema
|
|
2448
|
+
* @param {string} xStoreid Store ID (from dashboard)
|
|
2449
|
+
* @param {string} xStoresecret Store read secret
|
|
2450
|
+
* @param {*} [options] Override http request option.
|
|
2451
|
+
* @throws {RequiredError}
|
|
2452
|
+
*/
|
|
2453
|
+
apiV1StoresSchemaGet(xStoreid, xStoresecret, options) {
|
|
2454
|
+
return localVarFp.apiV1StoresSchemaGet(xStoreid, xStoresecret, options).then((request) => request(axios, basePath));
|
|
2455
|
+
},
|
|
2456
|
+
/**
|
|
2457
|
+
* Define or update the search index schema (field names, types, searchable/facet options). Mode: `additive` (add fields, keep data) or `replace` (recreate index). **Auth:** `x-storeid` and `x-store-write-secret`.
|
|
2458
|
+
* @summary Create or update index schema
|
|
2459
|
+
* @param {string} xStoreid Store ID (from dashboard)
|
|
2460
|
+
* @param {string} xStoreWriteSecret Store write secret
|
|
2461
|
+
* @param {DataTypesCollectionSchemaRequest} dataTypesCollectionSchemaRequest Schema definition and mode
|
|
3742
2462
|
* @param {*} [options] Override http request option.
|
|
3743
2463
|
* @throws {RequiredError}
|
|
3744
2464
|
*/
|
|
3745
|
-
|
|
3746
|
-
return localVarFp.
|
|
2465
|
+
apiV1StoresSchemaPost(xStoreid, xStoreWriteSecret, dataTypesCollectionSchemaRequest, options) {
|
|
2466
|
+
return localVarFp.apiV1StoresSchemaPost(xStoreid, xStoreWriteSecret, dataTypesCollectionSchemaRequest, options).then((request) => request(axios, basePath));
|
|
3747
2467
|
},
|
|
3748
2468
|
};
|
|
3749
2469
|
};
|
|
3750
|
-
exports.
|
|
2470
|
+
exports.StoreManagementApiFactory = StoreManagementApiFactory;
|
|
3751
2471
|
/**
|
|
3752
|
-
*
|
|
2472
|
+
* StoreManagementApi - object-oriented interface
|
|
3753
2473
|
*/
|
|
3754
|
-
class
|
|
2474
|
+
class StoreManagementApi extends base_1.BaseAPI {
|
|
3755
2475
|
/**
|
|
3756
|
-
*
|
|
3757
|
-
* @summary
|
|
2476
|
+
* Returns search and query-suggestions configuration for the store. **Auth:** `x-storeid` and `x-storesecret`.
|
|
2477
|
+
* @summary Get store configuration
|
|
3758
2478
|
* @param {string} xStoreid Store ID (from dashboard)
|
|
3759
|
-
* @param {string} xStoresecret Store read secret
|
|
3760
|
-
* @param {string} q Search query
|
|
3761
|
-
* @param {string} [xUserId] User ID for personalization
|
|
3762
|
-
* @param {string} [xAnonId] Anonymous user ID for personalization
|
|
3763
|
-
* @param {string} [xSessionId] Session ID for personalization
|
|
3764
|
-
* @param {number} [page] Page number (default: 1)
|
|
3765
|
-
* @param {number} [perPage] Items per page (default: 10)
|
|
3766
|
-
* @param {string} [sortBy] Sort option (e.g., price:asc, created_at:desc)
|
|
3767
|
-
* @param {string} [filterBy] Filter string (e.g., category:shirts)
|
|
3768
|
-
* @param {string} [facetBy] Facet fields (comma-separated)
|
|
3769
|
-
* @param {number} [maxFacetValues] Maximum facet values to return
|
|
3770
|
-
* @param {boolean} [widgetMode] Return widget-formatted results
|
|
3771
|
-
* @param {boolean} [includeSuggestions] Include autocomplete suggestions
|
|
3772
|
-
* @param {number} [suggestionsLimit] Number of suggestions to return
|
|
3773
|
-
* @param {string} [analyticsTags] Analytics tags (comma-separated)
|
|
3774
|
-
* @param {string} [stopwordSets] Stopword set IDs (comma-separated)
|
|
3775
|
-
* @param {string} [synonymSets] Synonym set IDs (comma-separated)
|
|
3776
|
-
* @param {string} [searchFields] Fields to search in (comma-separated)
|
|
3777
|
-
* @param {string} [returnFields] Fields to return (comma-separated)
|
|
3778
|
-
* @param {string} [omitFields] Fields to omit (comma-separated)
|
|
3779
|
-
* @param {string} [snippetFields] Fields to generate snippets for (comma-separated)
|
|
3780
|
-
* @param {string} [fullSnippetFields] Fields to include full snippet (comma-separated)
|
|
3781
|
-
* @param {string} [fieldWeights] Field weights as comma-separated integers (e.g., 3,2,1)
|
|
3782
|
-
* @param {string} [groupField] Field to group results by
|
|
3783
|
-
* @param {number} [groupSize] Number of results per group
|
|
3784
|
-
* @param {string} [snippetPrefix] Prefix for highlighted snippets
|
|
3785
|
-
* @param {string} [snippetSuffix] Suffix for highlighted snippets
|
|
3786
|
-
* @param {number} [snippetTokenLimit] Maximum tokens in snippet
|
|
3787
|
-
* @param {number} [snippetMinLen] Minimum snippet length
|
|
3788
|
-
* @param {boolean} [includeSnippets] Include snippets in results
|
|
3789
|
-
* @param {string} [prefixMode] Prefix matching mode (e.g., always, fallback, off)
|
|
3790
|
-
* @param {string} [infixMode] Infix matching mode (e.g., always, fallback, off)
|
|
3791
|
-
* @param {number} [typoMax] Maximum typo tolerance
|
|
3792
|
-
* @param {number} [typoMinLen1] Min word length for 1 typo
|
|
3793
|
-
* @param {number} [typoMinLen2] Min word length for 2 typos
|
|
3794
|
-
* @param {number} [searchTimeoutMs] Search timeout in milliseconds
|
|
3795
|
-
* @param {boolean} [requireAllTerms] Require all search terms to match
|
|
3796
|
-
* @param {boolean} [exactMatchBoost] Boost exact matches
|
|
3797
|
-
* @param {boolean} [cacheResults] Cache search results
|
|
3798
|
-
* @param {boolean} [applyRules] Apply search rules
|
|
3799
|
-
* @param {string} [presetName] Search preset name to use
|
|
3800
|
-
* @param {string} [facetSearchText] Text to filter facet values
|
|
2479
|
+
* @param {string} xStoresecret Store read secret
|
|
3801
2480
|
* @param {*} [options] Override http request option.
|
|
3802
2481
|
* @throws {RequiredError}
|
|
3803
2482
|
*/
|
|
3804
|
-
|
|
3805
|
-
return (0, exports.
|
|
2483
|
+
apiV1StoresConfigGet(xStoreid, xStoresecret, options) {
|
|
2484
|
+
return (0, exports.StoreManagementApiFp)(this.configuration).apiV1StoresConfigGet(xStoreid, xStoresecret, options).then((request) => request(this.axios, this.basePath));
|
|
3806
2485
|
}
|
|
3807
2486
|
/**
|
|
3808
|
-
*
|
|
3809
|
-
* @summary
|
|
2487
|
+
* Update search and store settings. Partial updates supported. **Auth:** `x-storeid` and `x-store-write-secret`.
|
|
2488
|
+
* @summary Update store configuration
|
|
3810
2489
|
* @param {string} xStoreid Store ID (from dashboard)
|
|
3811
|
-
* @param {string}
|
|
3812
|
-
* @param {
|
|
3813
|
-
* @param {
|
|
3814
|
-
* @
|
|
3815
|
-
|
|
2490
|
+
* @param {string} xStoreWriteSecret Store write secret
|
|
2491
|
+
* @param {DataTypesStoreConfigUpdateRequest} dataTypesStoreConfigUpdateRequest Fields to update (partial, includes allow_public_search)
|
|
2492
|
+
* @param {*} [options] Override http request option.
|
|
2493
|
+
* @throws {RequiredError}
|
|
2494
|
+
*/
|
|
2495
|
+
apiV1StoresConfigPut(xStoreid, xStoreWriteSecret, dataTypesStoreConfigUpdateRequest, options) {
|
|
2496
|
+
return (0, exports.StoreManagementApiFp)(this.configuration).apiV1StoresConfigPut(xStoreid, xStoreWriteSecret, dataTypesStoreConfigUpdateRequest, options).then((request) => request(this.axios, this.basePath));
|
|
2497
|
+
}
|
|
2498
|
+
/**
|
|
2499
|
+
* Returns metadata for all configurable store fields (types, defaults, validation). **Auth:** `x-storeid` and `x-storesecret`.
|
|
2500
|
+
* @summary Get store config schema
|
|
2501
|
+
* @param {string} xStoreid Store ID (from dashboard)
|
|
2502
|
+
* @param {string} xStoresecret Store read secret
|
|
2503
|
+
* @param {*} [options] Override http request option.
|
|
2504
|
+
* @throws {RequiredError}
|
|
2505
|
+
*/
|
|
2506
|
+
apiV1StoresConfigSchemaGet(xStoreid, xStoresecret, options) {
|
|
2507
|
+
return (0, exports.StoreManagementApiFp)(this.configuration).apiV1StoresConfigSchemaGet(xStoreid, xStoresecret, options).then((request) => request(this.axios, this.basePath));
|
|
2508
|
+
}
|
|
2509
|
+
/**
|
|
2510
|
+
* Run multiple document operations in one request (insert, update, upsert, delete). **Auth:** `x-storeid` and `x-store-write-secret`. Each item can specify its own action.
|
|
2511
|
+
* @summary Bulk index documents
|
|
2512
|
+
* @param {string} xStoreid Store ID (from dashboard)
|
|
2513
|
+
* @param {string} xStoreWriteSecret Store write secret
|
|
2514
|
+
* @param {DataTypesBulkDocumentRequest} dataTypesBulkDocumentRequest List of operations
|
|
2515
|
+
* @param {*} [options] Override http request option.
|
|
2516
|
+
* @throws {RequiredError}
|
|
2517
|
+
*/
|
|
2518
|
+
apiV1StoresDocumentsBulkPost(xStoreid, xStoreWriteSecret, dataTypesBulkDocumentRequest, options) {
|
|
2519
|
+
return (0, exports.StoreManagementApiFp)(this.configuration).apiV1StoresDocumentsBulkPost(xStoreid, xStoreWriteSecret, dataTypesBulkDocumentRequest, options).then((request) => request(this.axios, this.basePath));
|
|
2520
|
+
}
|
|
2521
|
+
/**
|
|
2522
|
+
* Removes all documents from the store\'s search index; schema is preserved. **Auth:** `x-storeid` and `x-store-write-secret`.
|
|
2523
|
+
* @summary Clear all documents
|
|
2524
|
+
* @param {string} xStoreid Store ID (from dashboard)
|
|
2525
|
+
* @param {string} xStoreWriteSecret Store write secret
|
|
2526
|
+
* @param {*} [options] Override http request option.
|
|
2527
|
+
* @throws {RequiredError}
|
|
2528
|
+
*/
|
|
2529
|
+
apiV1StoresDocumentsDelete(xStoreid, xStoreWriteSecret, options) {
|
|
2530
|
+
return (0, exports.StoreManagementApiFp)(this.configuration).apiV1StoresDocumentsDelete(xStoreid, xStoreWriteSecret, options).then((request) => request(this.axios, this.basePath));
|
|
2531
|
+
}
|
|
2532
|
+
/**
|
|
2533
|
+
* Remove a document from the store\'s search index by ID. **Auth:** `x-storeid` and `x-store-write-secret`.
|
|
2534
|
+
* @summary Delete a document
|
|
2535
|
+
* @param {string} xStoreid Store ID (from dashboard)
|
|
2536
|
+
* @param {string} xStoreWriteSecret Store write secret
|
|
2537
|
+
* @param {string} documentID Document ID to delete
|
|
2538
|
+
* @param {*} [options] Override http request option.
|
|
2539
|
+
* @throws {RequiredError}
|
|
2540
|
+
*/
|
|
2541
|
+
apiV1StoresDocumentsDocumentIDDelete(xStoreid, xStoreWriteSecret, documentID, options) {
|
|
2542
|
+
return (0, exports.StoreManagementApiFp)(this.configuration).apiV1StoresDocumentsDocumentIDDelete(xStoreid, xStoreWriteSecret, documentID, options).then((request) => request(this.axios, this.basePath));
|
|
2543
|
+
}
|
|
2544
|
+
/**
|
|
2545
|
+
* Retrieve a single document from the store\'s search index by ID. **Auth:** `x-storeid` and `x-storesecret`. Used by product pages and PDP.
|
|
2546
|
+
* @summary Get a document by ID
|
|
2547
|
+
* @param {string} xStoreid Store ID (from dashboard)
|
|
2548
|
+
* @param {string} xStoresecret Store read secret
|
|
2549
|
+
* @param {string} documentID Document ID to retrieve
|
|
2550
|
+
* @param {*} [options] Override http request option.
|
|
2551
|
+
* @throws {RequiredError}
|
|
2552
|
+
*/
|
|
2553
|
+
apiV1StoresDocumentsDocumentIDGet(xStoreid, xStoresecret, documentID, options) {
|
|
2554
|
+
return (0, exports.StoreManagementApiFp)(this.configuration).apiV1StoresDocumentsDocumentIDGet(xStoreid, xStoresecret, documentID, options).then((request) => request(this.axios, this.basePath));
|
|
2555
|
+
}
|
|
2556
|
+
/**
|
|
2557
|
+
* Add or update one document in the store\'s search index. **Auth:** `x-storeid` and `x-store-write-secret`. If you omit document ID, one is generated; existing documents with the same ID are updated.
|
|
2558
|
+
* @summary Index a single document
|
|
2559
|
+
* @param {string} xStoreid Store ID (from dashboard)
|
|
2560
|
+
* @param {string} xStoreWriteSecret Store write secret
|
|
2561
|
+
* @param {DataTypesDocumentRequest} dataTypesDocumentRequest Document fields to index
|
|
2562
|
+
* @param {*} [options] Override http request option.
|
|
2563
|
+
* @throws {RequiredError}
|
|
2564
|
+
*/
|
|
2565
|
+
apiV1StoresDocumentsPost(xStoreid, xStoreWriteSecret, dataTypesDocumentRequest, options) {
|
|
2566
|
+
return (0, exports.StoreManagementApiFp)(this.configuration).apiV1StoresDocumentsPost(xStoreid, xStoreWriteSecret, dataTypesDocumentRequest, options).then((request) => request(this.axios, this.basePath));
|
|
2567
|
+
}
|
|
2568
|
+
/**
|
|
2569
|
+
* Returns basic store details (name, location, status). **Auth:** `x-storeid` and `x-storesecret`.
|
|
2570
|
+
* @summary Get store info
|
|
2571
|
+
* @param {string} xStoreid Store ID (from dashboard)
|
|
2572
|
+
* @param {string} xStoresecret Store read secret
|
|
2573
|
+
* @param {*} [options] Override http request option.
|
|
2574
|
+
* @throws {RequiredError}
|
|
2575
|
+
*/
|
|
2576
|
+
apiV1StoresGet(xStoreid, xStoresecret, options) {
|
|
2577
|
+
return (0, exports.StoreManagementApiFp)(this.configuration).apiV1StoresGet(xStoreid, xStoresecret, options).then((request) => request(this.axios, this.basePath));
|
|
2578
|
+
}
|
|
2579
|
+
/**
|
|
2580
|
+
* Returns autocomplete/suggestions configuration for the store. **Auth:** `x-storeid` and `x-storesecret`.
|
|
2581
|
+
* @summary Get query suggestions configuration
|
|
2582
|
+
* @param {string} xStoreid Store ID (from dashboard)
|
|
2583
|
+
* @param {string} xStoresecret Store read secret
|
|
2584
|
+
* @param {*} [options] Override http request option.
|
|
2585
|
+
* @throws {RequiredError}
|
|
2586
|
+
*/
|
|
2587
|
+
apiV1StoresQuerySuggestionsConfigGet(xStoreid, xStoresecret, options) {
|
|
2588
|
+
return (0, exports.StoreManagementApiFp)(this.configuration).apiV1StoresQuerySuggestionsConfigGet(xStoreid, xStoresecret, options).then((request) => request(this.axios, this.basePath));
|
|
2589
|
+
}
|
|
2590
|
+
/**
|
|
2591
|
+
* Update autocomplete/suggestions settings for the store. Partial updates supported. **Auth:** `x-storeid` and `x-store-write-secret`.
|
|
2592
|
+
* @summary Update query suggestions configuration
|
|
2593
|
+
* @param {string} xStoreid Store ID (from dashboard)
|
|
2594
|
+
* @param {string} xStoreWriteSecret Store write secret
|
|
2595
|
+
* @param {QuerySuggestionsServiceUpdateSuggestionConfigRequest} querySuggestionsServiceUpdateSuggestionConfigRequest Fields to update (partial)
|
|
2596
|
+
* @param {*} [options] Override http request option.
|
|
2597
|
+
* @throws {RequiredError}
|
|
2598
|
+
*/
|
|
2599
|
+
apiV1StoresQuerySuggestionsConfigPut(xStoreid, xStoreWriteSecret, querySuggestionsServiceUpdateSuggestionConfigRequest, options) {
|
|
2600
|
+
return (0, exports.StoreManagementApiFp)(this.configuration).apiV1StoresQuerySuggestionsConfigPut(xStoreid, xStoreWriteSecret, querySuggestionsServiceUpdateSuggestionConfigRequest, options).then((request) => request(this.axios, this.basePath));
|
|
2601
|
+
}
|
|
2602
|
+
/**
|
|
2603
|
+
* Returns the current search index schema (fields and options) for the store. **Auth:** `x-storeid` and `x-storesecret`.
|
|
2604
|
+
* @summary Get index schema
|
|
2605
|
+
* @param {string} xStoreid Store ID (from dashboard)
|
|
2606
|
+
* @param {string} xStoresecret Store read secret
|
|
2607
|
+
* @param {*} [options] Override http request option.
|
|
2608
|
+
* @throws {RequiredError}
|
|
2609
|
+
*/
|
|
2610
|
+
apiV1StoresSchemaGet(xStoreid, xStoresecret, options) {
|
|
2611
|
+
return (0, exports.StoreManagementApiFp)(this.configuration).apiV1StoresSchemaGet(xStoreid, xStoresecret, options).then((request) => request(this.axios, this.basePath));
|
|
2612
|
+
}
|
|
2613
|
+
/**
|
|
2614
|
+
* Define or update the search index schema (field names, types, searchable/facet options). Mode: `additive` (add fields, keep data) or `replace` (recreate index). **Auth:** `x-storeid` and `x-store-write-secret`.
|
|
2615
|
+
* @summary Create or update index schema
|
|
2616
|
+
* @param {string} xStoreid Store ID (from dashboard)
|
|
2617
|
+
* @param {string} xStoreWriteSecret Store write secret
|
|
2618
|
+
* @param {DataTypesCollectionSchemaRequest} dataTypesCollectionSchemaRequest Schema definition and mode
|
|
3816
2619
|
* @param {*} [options] Override http request option.
|
|
3817
2620
|
* @throws {RequiredError}
|
|
3818
2621
|
*/
|
|
3819
|
-
|
|
3820
|
-
return (0, exports.
|
|
2622
|
+
apiV1StoresSchemaPost(xStoreid, xStoreWriteSecret, dataTypesCollectionSchemaRequest, options) {
|
|
2623
|
+
return (0, exports.StoreManagementApiFp)(this.configuration).apiV1StoresSchemaPost(xStoreid, xStoreWriteSecret, dataTypesCollectionSchemaRequest, options).then((request) => request(this.axios, this.basePath));
|
|
3821
2624
|
}
|
|
3822
2625
|
}
|
|
3823
|
-
exports.
|
|
2626
|
+
exports.StoreManagementApi = StoreManagementApi;
|