@seekora-ai/search-sdk 0.1.1 → 0.2.1

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.
@@ -0,0 +1,2837 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Seekora APIs
6
+ * This is an API with JWT authentication.
7
+ *
8
+ * The version of the OpenAPI document: 1.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ var __importDefault = (this && this.__importDefault) || function (mod) {
16
+ return (mod && mod.__esModule) ? mod : { "default": mod };
17
+ };
18
+ Object.defineProperty(exports, "__esModule", { value: true });
19
+ exports.QuerySuggestionsApi = exports.QuerySuggestionsApiFactory = exports.QuerySuggestionsApiFp = exports.QuerySuggestionsApiAxiosParamCreator = exports.AnalyticsEventsApi = exports.AnalyticsEventsApiFactory = exports.AnalyticsEventsApiFp = exports.AnalyticsEventsApiAxiosParamCreator = exports.AnalyticsApi = exports.AnalyticsApiFactory = exports.AnalyticsApiFp = exports.AnalyticsApiAxiosParamCreator = exports.AnalyticsActivityLogsGetActionEnum = exports.ActivityLogsApi = exports.ActivityLogsApiFactory = exports.ActivityLogsApiFp = exports.ActivityLogsApiAxiosParamCreator = exports.RefundRefundPreviewRequestDtoRefundTypeEnum = exports.QuerySuggestionsServiceRuleType = exports.QuerySuggestionsServiceQuerySuggestionStatus = exports.QuerySuggestionsServiceQuerySuggestionSource = exports.QuerySuggestionsServiceBulkOperation = exports.QuerySuggestionsServiceBannedMatchType = exports.MenuRoutesAddMenuRequestModuleTypeEnum = exports.MenuRoutesAddMenuRequestMenuLocationEnum = exports.MenuRoutesAddMenuRequestMenuLevelEnum = exports.DataTypesUpdateWordStatusRequestWordTypeEnum = exports.DataTypesUpdateStoreAccessRequestAccessLevelEnum = exports.DataTypesUpdatePluralDeclensionRequestTypeEnum = exports.DataTypesUpdateMemberRoleRequestMemberRoleEnum = exports.DataTypesStoreLevelMenuRightAccessLevelEnum = exports.DataTypesStoreAccessRequestAccessLevelEnum = exports.DataTypesRefundCalculationRequestDtoRefundTypeEnum = exports.DataTypesRefundApprovalDtoActionEnum = exports.DataTypesProcessRefundRequestDtoRefundTypeEnum = exports.DataTypesNotificationType = exports.DataTypesNotificationStatus = exports.DataTypesNotificationPriority = exports.DataTypesNotificationChannel = exports.DataTypesGrantStoreAccessRequestAccessLevelEnum = exports.DataTypesCreateTaskRequestTypeEnum = exports.DataTypesCreateTaskRequestIndexingStrategyEnum = exports.DataTypesCreateTaskRequestFrequencyEnum = exports.DataTypesCreateRefundRequestDtoRefundTypeEnum = exports.DataTypesCreatePluralDeclensionRequestTypeEnum = exports.DataTypesCreatePaymentOrderRequestPaymentTypeEnum = exports.DataTypesCreateCustomWordListRequestTypeEnum = exports.DataTypesBillingAlertRequestThresholdUnitEnum = exports.DataTypesBillingAlertRequestAlertTypeEnum = exports.DataTypesAcceptInvitationWithOAuthRequestTypeEnum = void 0;
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.SDKDocumentsApi = exports.SDKDocumentsApiFactory = exports.SDKDocumentsApiFp = exports.SDKDocumentsApiAxiosParamCreator = exports.V1SuggestionsQueriesGetTimeRangeEnum = exports.V1SuggestionsQueriesGetTagsMatchModeEnum = void 0;
21
+ const axios_1 = __importDefault(require("axios"));
22
+ // URLSearchParams not necessarily used
23
+ // @ts-ignore
24
+ const url_1 = require("url");
25
+ // Some imports not used depending on template conditions
26
+ // @ts-ignore
27
+ const common_1 = require("./common");
28
+ // @ts-ignore
29
+ const base_1 = require("./base");
30
+ exports.DataTypesAcceptInvitationWithOAuthRequestTypeEnum = {
31
+ google: 'google',
32
+ github: 'github'
33
+ };
34
+ exports.DataTypesBillingAlertRequestAlertTypeEnum = {
35
+ low_balance: 'low_balance',
36
+ expiring_credits: 'expiring_credits',
37
+ days_remaining: 'days_remaining'
38
+ };
39
+ exports.DataTypesBillingAlertRequestThresholdUnitEnum = {
40
+ credits: 'credits',
41
+ days: 'days',
42
+ percentage: 'percentage'
43
+ };
44
+ exports.DataTypesCreateCustomWordListRequestTypeEnum = {
45
+ stopwords: 'stopwords',
46
+ synonyms: 'synonyms'
47
+ };
48
+ exports.DataTypesCreatePaymentOrderRequestPaymentTypeEnum = {
49
+ generic: 'generic',
50
+ subscription: 'subscription',
51
+ credit_topup: 'credit_topup'
52
+ };
53
+ exports.DataTypesCreatePluralDeclensionRequestTypeEnum = {
54
+ custom: 'custom',
55
+ default: 'default'
56
+ };
57
+ exports.DataTypesCreateRefundRequestDtoRefundTypeEnum = {
58
+ full: 'full',
59
+ partial: 'partial',
60
+ credit_only: 'credit_only'
61
+ };
62
+ exports.DataTypesCreateTaskRequestFrequencyEnum = {
63
+ once: 'once',
64
+ hourly: 'hourly',
65
+ daily: 'daily',
66
+ weekly: 'weekly'
67
+ };
68
+ exports.DataTypesCreateTaskRequestIndexingStrategyEnum = {
69
+ replace: 'replace',
70
+ upsert: 'upsert',
71
+ insert_only: 'insert_only',
72
+ update_only: 'update_only'
73
+ };
74
+ exports.DataTypesCreateTaskRequestTypeEnum = {
75
+ url_csv: 'url_csv',
76
+ webhook: 'webhook',
77
+ manual: 'manual',
78
+ plugin_connector: 'plugin_connector'
79
+ };
80
+ exports.DataTypesGrantStoreAccessRequestAccessLevelEnum = {
81
+ read: 'read',
82
+ write: 'write',
83
+ admin: 'admin'
84
+ };
85
+ exports.DataTypesNotificationChannel = {
86
+ ChannelEmail: 'email',
87
+ ChannelSMS: 'sms',
88
+ ChannelPush: 'push',
89
+ ChannelWebSocket: 'websocket',
90
+ ChannelWhatsApp: 'whatsapp'
91
+ };
92
+ exports.DataTypesNotificationPriority = {
93
+ PriorityLow: 'low',
94
+ PriorityNormal: 'normal',
95
+ PriorityHigh: 'high',
96
+ PriorityCritical: 'critical'
97
+ };
98
+ exports.DataTypesNotificationStatus = {
99
+ StatusPending: 'pending',
100
+ StatusProcessing: 'processing',
101
+ StatusSent: 'sent',
102
+ StatusDelivered: 'delivered',
103
+ StatusFailed: 'failed',
104
+ StatusRead: 'read',
105
+ StatusScheduled: 'scheduled',
106
+ StatusCancelled: 'cancelled'
107
+ };
108
+ exports.DataTypesNotificationType = {
109
+ TypeSystem: 'system',
110
+ TypeAlert: 'alert',
111
+ TypeInfo: 'info',
112
+ TypeWarning: 'warning',
113
+ TypeError: 'error',
114
+ TypeSuccess: 'success',
115
+ TypeMarketing: 'marketing',
116
+ TypeTransactional: 'transactional',
117
+ TypeSecurity: 'security',
118
+ TypeBilling: 'billing',
119
+ TypeOrder: 'order',
120
+ TypeProduct: 'product',
121
+ TypeCustom: 'custom'
122
+ };
123
+ exports.DataTypesProcessRefundRequestDtoRefundTypeEnum = {
124
+ full: 'full',
125
+ partial: 'partial',
126
+ remaining_credits: 'remaining_credits'
127
+ };
128
+ exports.DataTypesRefundApprovalDtoActionEnum = {
129
+ approve: 'approve',
130
+ reject: 'reject'
131
+ };
132
+ exports.DataTypesRefundCalculationRequestDtoRefundTypeEnum = {
133
+ full: 'full',
134
+ partial: 'partial',
135
+ remaining_credits: 'remaining_credits'
136
+ };
137
+ exports.DataTypesStoreAccessRequestAccessLevelEnum = {
138
+ read: 'read',
139
+ write: 'write',
140
+ admin: 'admin'
141
+ };
142
+ exports.DataTypesStoreLevelMenuRightAccessLevelEnum = {
143
+ read: 'read',
144
+ write: 'write',
145
+ admin: 'admin'
146
+ };
147
+ exports.DataTypesUpdateMemberRoleRequestMemberRoleEnum = {
148
+ owner: 'owner',
149
+ admin: 'admin',
150
+ member: 'member'
151
+ };
152
+ exports.DataTypesUpdatePluralDeclensionRequestTypeEnum = {
153
+ custom: 'custom',
154
+ default: 'default'
155
+ };
156
+ exports.DataTypesUpdateStoreAccessRequestAccessLevelEnum = {
157
+ read: 'read',
158
+ write: 'write',
159
+ admin: 'admin'
160
+ };
161
+ exports.DataTypesUpdateWordStatusRequestWordTypeEnum = {
162
+ default: 'default',
163
+ store_language: 'store_language',
164
+ custom: 'custom'
165
+ };
166
+ exports.MenuRoutesAddMenuRequestMenuLevelEnum = {
167
+ org: 'org',
168
+ store: 'store'
169
+ };
170
+ exports.MenuRoutesAddMenuRequestMenuLocationEnum = {
171
+ navbar: 'navbar',
172
+ profile_dropdown: 'profile_dropdown'
173
+ };
174
+ exports.MenuRoutesAddMenuRequestModuleTypeEnum = {
175
+ Admin: 'Admin',
176
+ Search: 'Search',
177
+ Billing: 'Billing'
178
+ };
179
+ exports.QuerySuggestionsServiceBannedMatchType = {
180
+ BannedMatchIs: 'is',
181
+ BannedMatchContains: 'contains',
182
+ BannedMatchStartsWith: 'startsWith',
183
+ BannedMatchEndsWith: 'endsWith',
184
+ BannedMatchCustom: 'custom'
185
+ };
186
+ exports.QuerySuggestionsServiceBulkOperation = {
187
+ BulkEnable: 'enable',
188
+ BulkDisable: 'disable',
189
+ BulkDelete: 'delete',
190
+ BulkUpdatePriority: 'update_priority'
191
+ };
192
+ exports.QuerySuggestionsServiceQuerySuggestionSource = {
193
+ SourceAutoGenerated: 'auto_generated',
194
+ SourceManual: 'manual',
195
+ SourceImported: 'imported'
196
+ };
197
+ exports.QuerySuggestionsServiceQuerySuggestionStatus = {
198
+ StatusEnabled: 'enabled',
199
+ StatusDisabled: 'disabled'
200
+ };
201
+ exports.QuerySuggestionsServiceRuleType = {
202
+ RuleTypePromote: 'promote',
203
+ RuleTypeHide: 'hide',
204
+ RuleTypeRedirect: 'redirect',
205
+ RuleTypeBanner: 'banner'
206
+ };
207
+ exports.RefundRefundPreviewRequestDtoRefundTypeEnum = {
208
+ full: 'full',
209
+ partial: 'partial',
210
+ remaining_credits: 'remaining_credits'
211
+ };
212
+ /**
213
+ * ActivityLogsApi - axios parameter creator
214
+ */
215
+ const ActivityLogsApiAxiosParamCreator = function (configuration) {
216
+ return {
217
+ /**
218
+ * Retrieve user activity logs from ClickHouse fact_events table with full filtering, search, and pagination.
219
+ * @summary Get Activity Logs
220
+ * @param {string} [startDate] Start date (ISO 8601 format)
221
+ * @param {string} [endDate] End date (ISO 8601 format)
222
+ * @param {string} [search] Search text (matches description, username, email, resource_type, resource_id)
223
+ * @param {AnalyticsActivityLogsGetActionEnum} [action] Action filter
224
+ * @param {string} [entity] Entity type filter
225
+ * @param {number} [page] Page number (default: 1)
226
+ * @param {number} [perPage] Results per page (default: 50, max: 1000)
227
+ * @param {*} [options] Override http request option.
228
+ * @throws {RequiredError}
229
+ */
230
+ analyticsActivityLogsGet: async (startDate, endDate, search, action, entity, page, perPage, options = {}) => {
231
+ const localVarPath = `/analytics/activity-logs`;
232
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
233
+ const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
234
+ let baseOptions;
235
+ if (configuration) {
236
+ baseOptions = configuration.baseOptions;
237
+ }
238
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
239
+ const localVarHeaderParameter = {};
240
+ const localVarQueryParameter = {};
241
+ // authentication BearerAuth required
242
+ await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
243
+ if (startDate !== undefined) {
244
+ localVarQueryParameter['start_date'] = startDate;
245
+ }
246
+ if (endDate !== undefined) {
247
+ localVarQueryParameter['end_date'] = endDate;
248
+ }
249
+ if (search !== undefined) {
250
+ localVarQueryParameter['search'] = search;
251
+ }
252
+ if (action !== undefined) {
253
+ localVarQueryParameter['action'] = action;
254
+ }
255
+ if (entity !== undefined) {
256
+ localVarQueryParameter['entity'] = entity;
257
+ }
258
+ if (page !== undefined) {
259
+ localVarQueryParameter['page'] = page;
260
+ }
261
+ if (perPage !== undefined) {
262
+ localVarQueryParameter['per_page'] = perPage;
263
+ }
264
+ localVarHeaderParameter['Accept'] = 'application/json';
265
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
266
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
267
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
268
+ return {
269
+ url: (0, common_1.toPathString)(localVarUrlObj),
270
+ options: localVarRequestOptions,
271
+ };
272
+ },
273
+ };
274
+ };
275
+ exports.ActivityLogsApiAxiosParamCreator = ActivityLogsApiAxiosParamCreator;
276
+ /**
277
+ * ActivityLogsApi - functional programming interface
278
+ */
279
+ const ActivityLogsApiFp = function (configuration) {
280
+ const localVarAxiosParamCreator = (0, exports.ActivityLogsApiAxiosParamCreator)(configuration);
281
+ return {
282
+ /**
283
+ * Retrieve user activity logs from ClickHouse fact_events table with full filtering, search, and pagination.
284
+ * @summary Get Activity Logs
285
+ * @param {string} [startDate] Start date (ISO 8601 format)
286
+ * @param {string} [endDate] End date (ISO 8601 format)
287
+ * @param {string} [search] Search text (matches description, username, email, resource_type, resource_id)
288
+ * @param {AnalyticsActivityLogsGetActionEnum} [action] Action filter
289
+ * @param {string} [entity] Entity type filter
290
+ * @param {number} [page] Page number (default: 1)
291
+ * @param {number} [perPage] Results per page (default: 50, max: 1000)
292
+ * @param {*} [options] Override http request option.
293
+ * @throws {RequiredError}
294
+ */
295
+ async analyticsActivityLogsGet(startDate, endDate, search, action, entity, page, perPage, options) {
296
+ const localVarAxiosArgs = await localVarAxiosParamCreator.analyticsActivityLogsGet(startDate, endDate, search, action, entity, page, perPage, options);
297
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
298
+ const localVarOperationServerBasePath = base_1.operationServerMap['ActivityLogsApi.analyticsActivityLogsGet']?.[localVarOperationServerIndex]?.url;
299
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
300
+ },
301
+ };
302
+ };
303
+ exports.ActivityLogsApiFp = ActivityLogsApiFp;
304
+ /**
305
+ * ActivityLogsApi - factory interface
306
+ */
307
+ const ActivityLogsApiFactory = function (configuration, basePath, axios) {
308
+ const localVarFp = (0, exports.ActivityLogsApiFp)(configuration);
309
+ return {
310
+ /**
311
+ * Retrieve user activity logs from ClickHouse fact_events table with full filtering, search, and pagination.
312
+ * @summary Get Activity Logs
313
+ * @param {string} [startDate] Start date (ISO 8601 format)
314
+ * @param {string} [endDate] End date (ISO 8601 format)
315
+ * @param {string} [search] Search text (matches description, username, email, resource_type, resource_id)
316
+ * @param {AnalyticsActivityLogsGetActionEnum} [action] Action filter
317
+ * @param {string} [entity] Entity type filter
318
+ * @param {number} [page] Page number (default: 1)
319
+ * @param {number} [perPage] Results per page (default: 50, max: 1000)
320
+ * @param {*} [options] Override http request option.
321
+ * @throws {RequiredError}
322
+ */
323
+ analyticsActivityLogsGet(startDate, endDate, search, action, entity, page, perPage, options) {
324
+ return localVarFp.analyticsActivityLogsGet(startDate, endDate, search, action, entity, page, perPage, options).then((request) => request(axios, basePath));
325
+ },
326
+ };
327
+ };
328
+ exports.ActivityLogsApiFactory = ActivityLogsApiFactory;
329
+ /**
330
+ * ActivityLogsApi - object-oriented interface
331
+ */
332
+ class ActivityLogsApi extends base_1.BaseAPI {
333
+ /**
334
+ * Retrieve user activity logs from ClickHouse fact_events table with full filtering, search, and pagination.
335
+ * @summary Get Activity Logs
336
+ * @param {string} [startDate] Start date (ISO 8601 format)
337
+ * @param {string} [endDate] End date (ISO 8601 format)
338
+ * @param {string} [search] Search text (matches description, username, email, resource_type, resource_id)
339
+ * @param {AnalyticsActivityLogsGetActionEnum} [action] Action filter
340
+ * @param {string} [entity] Entity type filter
341
+ * @param {number} [page] Page number (default: 1)
342
+ * @param {number} [perPage] Results per page (default: 50, max: 1000)
343
+ * @param {*} [options] Override http request option.
344
+ * @throws {RequiredError}
345
+ */
346
+ analyticsActivityLogsGet(startDate, endDate, search, action, entity, page, perPage, options) {
347
+ return (0, exports.ActivityLogsApiFp)(this.configuration).analyticsActivityLogsGet(startDate, endDate, search, action, entity, page, perPage, options).then((request) => request(this.axios, this.basePath));
348
+ }
349
+ }
350
+ exports.ActivityLogsApi = ActivityLogsApi;
351
+ exports.AnalyticsActivityLogsGetActionEnum = {
352
+ create: 'create',
353
+ update: 'update',
354
+ delete: 'delete',
355
+ upload: 'upload'
356
+ };
357
+ /**
358
+ * AnalyticsApi - axios parameter creator
359
+ */
360
+ const AnalyticsApiAxiosParamCreator = function (configuration) {
361
+ return {
362
+ /**
363
+ * Retrieve API usage logs from ClickHouse fact_events table with filtering and pagination
364
+ * @summary Get API Usage Logs
365
+ * @param {string} [startDate] Start date (ISO 8601 format)
366
+ * @param {string} [endDate] End date (ISO 8601 format)
367
+ * @param {string} [method] HTTP method filter
368
+ * @param {string} [path] Path filter (partial match)
369
+ * @param {string} [storeId] Store ID filter
370
+ * @param {number} [page] Page number (default: 1)
371
+ * @param {number} [perPage] Results per page (default: 100, max: 1000)
372
+ * @param {*} [options] Override http request option.
373
+ * @throws {RequiredError}
374
+ */
375
+ analyticsApiUsageGet: async (startDate, endDate, method, path, storeId, page, perPage, options = {}) => {
376
+ const localVarPath = `/analytics/api-usage`;
377
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
378
+ const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
379
+ let baseOptions;
380
+ if (configuration) {
381
+ baseOptions = configuration.baseOptions;
382
+ }
383
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
384
+ const localVarHeaderParameter = {};
385
+ const localVarQueryParameter = {};
386
+ // authentication BearerAuth required
387
+ await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
388
+ if (startDate !== undefined) {
389
+ localVarQueryParameter['start_date'] = startDate;
390
+ }
391
+ if (endDate !== undefined) {
392
+ localVarQueryParameter['end_date'] = endDate;
393
+ }
394
+ if (method !== undefined) {
395
+ localVarQueryParameter['method'] = method;
396
+ }
397
+ if (path !== undefined) {
398
+ localVarQueryParameter['path'] = path;
399
+ }
400
+ if (storeId !== undefined) {
401
+ localVarQueryParameter['store_id'] = storeId;
402
+ }
403
+ if (page !== undefined) {
404
+ localVarQueryParameter['page'] = page;
405
+ }
406
+ if (perPage !== undefined) {
407
+ localVarQueryParameter['per_page'] = perPage;
408
+ }
409
+ localVarHeaderParameter['Accept'] = 'application/json';
410
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
411
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
412
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
413
+ return {
414
+ url: (0, common_1.toPathString)(localVarUrlObj),
415
+ options: localVarRequestOptions,
416
+ };
417
+ },
418
+ /**
419
+ * Retrieve API usage logs for a specific store from ClickHouse
420
+ * @summary Get Store API Usage Logs
421
+ * @param {string} storeId Store ID
422
+ * @param {string} [startDate] Start date (ISO 8601 format)
423
+ * @param {string} [endDate] End date (ISO 8601 format)
424
+ * @param {string} [method] HTTP method filter
425
+ * @param {number} [page] Page number (default: 1)
426
+ * @param {number} [perPage] Results per page (default: 100, max: 1000)
427
+ * @param {*} [options] Override http request option.
428
+ * @throws {RequiredError}
429
+ */
430
+ analyticsApiUsageStoreStoreIdGet: async (storeId, startDate, endDate, method, page, perPage, options = {}) => {
431
+ // verify required parameter 'storeId' is not null or undefined
432
+ (0, common_1.assertParamExists)('analyticsApiUsageStoreStoreIdGet', 'storeId', storeId);
433
+ const localVarPath = `/analytics/api-usage/store/{storeId}`
434
+ .replace(`{${"storeId"}}`, encodeURIComponent(String(storeId)));
435
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
436
+ const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
437
+ let baseOptions;
438
+ if (configuration) {
439
+ baseOptions = configuration.baseOptions;
440
+ }
441
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
442
+ const localVarHeaderParameter = {};
443
+ const localVarQueryParameter = {};
444
+ // authentication BearerAuth required
445
+ await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
446
+ if (startDate !== undefined) {
447
+ localVarQueryParameter['start_date'] = startDate;
448
+ }
449
+ if (endDate !== undefined) {
450
+ localVarQueryParameter['end_date'] = endDate;
451
+ }
452
+ if (method !== undefined) {
453
+ localVarQueryParameter['method'] = method;
454
+ }
455
+ if (page !== undefined) {
456
+ localVarQueryParameter['page'] = page;
457
+ }
458
+ if (perPage !== undefined) {
459
+ localVarQueryParameter['per_page'] = perPage;
460
+ }
461
+ localVarHeaderParameter['Accept'] = 'application/json';
462
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
463
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
464
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
465
+ return {
466
+ url: (0, common_1.toPathString)(localVarUrlObj),
467
+ options: localVarRequestOptions,
468
+ };
469
+ },
470
+ };
471
+ };
472
+ exports.AnalyticsApiAxiosParamCreator = AnalyticsApiAxiosParamCreator;
473
+ /**
474
+ * AnalyticsApi - functional programming interface
475
+ */
476
+ const AnalyticsApiFp = function (configuration) {
477
+ const localVarAxiosParamCreator = (0, exports.AnalyticsApiAxiosParamCreator)(configuration);
478
+ return {
479
+ /**
480
+ * Retrieve API usage logs from ClickHouse fact_events table with filtering and pagination
481
+ * @summary Get API Usage Logs
482
+ * @param {string} [startDate] Start date (ISO 8601 format)
483
+ * @param {string} [endDate] End date (ISO 8601 format)
484
+ * @param {string} [method] HTTP method filter
485
+ * @param {string} [path] Path filter (partial match)
486
+ * @param {string} [storeId] Store ID filter
487
+ * @param {number} [page] Page number (default: 1)
488
+ * @param {number} [perPage] Results per page (default: 100, max: 1000)
489
+ * @param {*} [options] Override http request option.
490
+ * @throws {RequiredError}
491
+ */
492
+ async analyticsApiUsageGet(startDate, endDate, method, path, storeId, page, perPage, options) {
493
+ const localVarAxiosArgs = await localVarAxiosParamCreator.analyticsApiUsageGet(startDate, endDate, method, path, storeId, page, perPage, options);
494
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
495
+ const localVarOperationServerBasePath = base_1.operationServerMap['AnalyticsApi.analyticsApiUsageGet']?.[localVarOperationServerIndex]?.url;
496
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
497
+ },
498
+ /**
499
+ * Retrieve API usage logs for a specific store from ClickHouse
500
+ * @summary Get Store API Usage Logs
501
+ * @param {string} storeId Store ID
502
+ * @param {string} [startDate] Start date (ISO 8601 format)
503
+ * @param {string} [endDate] End date (ISO 8601 format)
504
+ * @param {string} [method] HTTP method filter
505
+ * @param {number} [page] Page number (default: 1)
506
+ * @param {number} [perPage] Results per page (default: 100, max: 1000)
507
+ * @param {*} [options] Override http request option.
508
+ * @throws {RequiredError}
509
+ */
510
+ async analyticsApiUsageStoreStoreIdGet(storeId, startDate, endDate, method, page, perPage, options) {
511
+ const localVarAxiosArgs = await localVarAxiosParamCreator.analyticsApiUsageStoreStoreIdGet(storeId, startDate, endDate, method, page, perPage, options);
512
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
513
+ const localVarOperationServerBasePath = base_1.operationServerMap['AnalyticsApi.analyticsApiUsageStoreStoreIdGet']?.[localVarOperationServerIndex]?.url;
514
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
515
+ },
516
+ };
517
+ };
518
+ exports.AnalyticsApiFp = AnalyticsApiFp;
519
+ /**
520
+ * AnalyticsApi - factory interface
521
+ */
522
+ const AnalyticsApiFactory = function (configuration, basePath, axios) {
523
+ const localVarFp = (0, exports.AnalyticsApiFp)(configuration);
524
+ return {
525
+ /**
526
+ * Retrieve API usage logs from ClickHouse fact_events table with filtering and pagination
527
+ * @summary Get API Usage Logs
528
+ * @param {string} [startDate] Start date (ISO 8601 format)
529
+ * @param {string} [endDate] End date (ISO 8601 format)
530
+ * @param {string} [method] HTTP method filter
531
+ * @param {string} [path] Path filter (partial match)
532
+ * @param {string} [storeId] Store ID filter
533
+ * @param {number} [page] Page number (default: 1)
534
+ * @param {number} [perPage] Results per page (default: 100, max: 1000)
535
+ * @param {*} [options] Override http request option.
536
+ * @throws {RequiredError}
537
+ */
538
+ analyticsApiUsageGet(startDate, endDate, method, path, storeId, page, perPage, options) {
539
+ return localVarFp.analyticsApiUsageGet(startDate, endDate, method, path, storeId, page, perPage, options).then((request) => request(axios, basePath));
540
+ },
541
+ /**
542
+ * Retrieve API usage logs for a specific store from ClickHouse
543
+ * @summary Get Store API Usage Logs
544
+ * @param {string} storeId Store ID
545
+ * @param {string} [startDate] Start date (ISO 8601 format)
546
+ * @param {string} [endDate] End date (ISO 8601 format)
547
+ * @param {string} [method] HTTP method filter
548
+ * @param {number} [page] Page number (default: 1)
549
+ * @param {number} [perPage] Results per page (default: 100, max: 1000)
550
+ * @param {*} [options] Override http request option.
551
+ * @throws {RequiredError}
552
+ */
553
+ analyticsApiUsageStoreStoreIdGet(storeId, startDate, endDate, method, page, perPage, options) {
554
+ return localVarFp.analyticsApiUsageStoreStoreIdGet(storeId, startDate, endDate, method, page, perPage, options).then((request) => request(axios, basePath));
555
+ },
556
+ };
557
+ };
558
+ exports.AnalyticsApiFactory = AnalyticsApiFactory;
559
+ /**
560
+ * AnalyticsApi - object-oriented interface
561
+ */
562
+ class AnalyticsApi extends base_1.BaseAPI {
563
+ /**
564
+ * Retrieve API usage logs from ClickHouse fact_events table with filtering and pagination
565
+ * @summary Get API Usage Logs
566
+ * @param {string} [startDate] Start date (ISO 8601 format)
567
+ * @param {string} [endDate] End date (ISO 8601 format)
568
+ * @param {string} [method] HTTP method filter
569
+ * @param {string} [path] Path filter (partial match)
570
+ * @param {string} [storeId] Store ID filter
571
+ * @param {number} [page] Page number (default: 1)
572
+ * @param {number} [perPage] Results per page (default: 100, max: 1000)
573
+ * @param {*} [options] Override http request option.
574
+ * @throws {RequiredError}
575
+ */
576
+ analyticsApiUsageGet(startDate, endDate, method, path, storeId, page, perPage, options) {
577
+ return (0, exports.AnalyticsApiFp)(this.configuration).analyticsApiUsageGet(startDate, endDate, method, path, storeId, page, perPage, options).then((request) => request(this.axios, this.basePath));
578
+ }
579
+ /**
580
+ * Retrieve API usage logs for a specific store from ClickHouse
581
+ * @summary Get Store API Usage Logs
582
+ * @param {string} storeId Store ID
583
+ * @param {string} [startDate] Start date (ISO 8601 format)
584
+ * @param {string} [endDate] End date (ISO 8601 format)
585
+ * @param {string} [method] HTTP method filter
586
+ * @param {number} [page] Page number (default: 1)
587
+ * @param {number} [perPage] Results per page (default: 100, max: 1000)
588
+ * @param {*} [options] Override http request option.
589
+ * @throws {RequiredError}
590
+ */
591
+ analyticsApiUsageStoreStoreIdGet(storeId, startDate, endDate, method, page, perPage, options) {
592
+ return (0, exports.AnalyticsApiFp)(this.configuration).analyticsApiUsageStoreStoreIdGet(storeId, startDate, endDate, method, page, perPage, options).then((request) => request(this.axios, this.basePath));
593
+ }
594
+ }
595
+ exports.AnalyticsApi = AnalyticsApi;
596
+ /**
597
+ * AnalyticsEventsApi - axios parameter creator
598
+ */
599
+ const AnalyticsEventsApiAxiosParamCreator = function (configuration) {
600
+ return {
601
+ /**
602
+ * Submit multiple analytics events in a single request for improved performance (max 100 events per batch)
603
+ * @summary Submit Batch Analytics Events
604
+ * @param {string} xStoreid Store ID for analytics tracking
605
+ * @param {string} xStoresecret Store secret for authentication
606
+ * @param {AnalyticsBatchPostRequest} analyticsBatchPostRequest Batch event request with array of events
607
+ * @param {*} [options] Override http request option.
608
+ * @throws {RequiredError}
609
+ */
610
+ analyticsBatchPost: async (xStoreid, xStoresecret, analyticsBatchPostRequest, options = {}) => {
611
+ // verify required parameter 'xStoreid' is not null or undefined
612
+ (0, common_1.assertParamExists)('analyticsBatchPost', 'xStoreid', xStoreid);
613
+ // verify required parameter 'xStoresecret' is not null or undefined
614
+ (0, common_1.assertParamExists)('analyticsBatchPost', 'xStoresecret', xStoresecret);
615
+ // verify required parameter 'analyticsBatchPostRequest' is not null or undefined
616
+ (0, common_1.assertParamExists)('analyticsBatchPost', 'analyticsBatchPostRequest', analyticsBatchPostRequest);
617
+ const localVarPath = `/analytics/batch`;
618
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
619
+ const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
620
+ let baseOptions;
621
+ if (configuration) {
622
+ baseOptions = configuration.baseOptions;
623
+ }
624
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
625
+ const localVarHeaderParameter = {};
626
+ const localVarQueryParameter = {};
627
+ localVarHeaderParameter['Content-Type'] = 'application/json';
628
+ localVarHeaderParameter['Accept'] = 'application/json';
629
+ if (xStoreid != null) {
630
+ localVarHeaderParameter['x-storeid'] = String(xStoreid);
631
+ }
632
+ if (xStoresecret != null) {
633
+ localVarHeaderParameter['x-storesecret'] = String(xStoresecret);
634
+ }
635
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
636
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
637
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
638
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(analyticsBatchPostRequest, localVarRequestOptions, configuration);
639
+ return {
640
+ url: (0, common_1.toPathString)(localVarUrlObj),
641
+ options: localVarRequestOptions,
642
+ };
643
+ },
644
+ /**
645
+ * Retrieve analytics configuration including supported event types, batch limits, and funnel stages for client integration
646
+ * @summary Get Analytics Configuration
647
+ * @param {string} xStoreid Store ID for analytics tracking
648
+ * @param {string} xStoresecret Store secret for authentication
649
+ * @param {*} [options] Override http request option.
650
+ * @throws {RequiredError}
651
+ */
652
+ analyticsConfigGet: async (xStoreid, xStoresecret, options = {}) => {
653
+ // verify required parameter 'xStoreid' is not null or undefined
654
+ (0, common_1.assertParamExists)('analyticsConfigGet', 'xStoreid', xStoreid);
655
+ // verify required parameter 'xStoresecret' is not null or undefined
656
+ (0, common_1.assertParamExists)('analyticsConfigGet', 'xStoresecret', xStoresecret);
657
+ const localVarPath = `/analytics/config`;
658
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
659
+ const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
660
+ let baseOptions;
661
+ if (configuration) {
662
+ baseOptions = configuration.baseOptions;
663
+ }
664
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
665
+ const localVarHeaderParameter = {};
666
+ const localVarQueryParameter = {};
667
+ localVarHeaderParameter['Accept'] = 'application/json';
668
+ if (xStoreid != null) {
669
+ localVarHeaderParameter['x-storeid'] = String(xStoreid);
670
+ }
671
+ if (xStoresecret != null) {
672
+ localVarHeaderParameter['x-storesecret'] = String(xStoresecret);
673
+ }
674
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
675
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
676
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
677
+ return {
678
+ url: (0, common_1.toPathString)(localVarUrlObj),
679
+ options: localVarRequestOptions,
680
+ };
681
+ },
682
+ /**
683
+ * Submit a single analytics event for tracking user interactions, search behavior, and conversions
684
+ * @summary Submit Analytics Event
685
+ * @param {string} xStoreid Store ID for analytics tracking
686
+ * @param {string} xStoresecret Store secret for authentication
687
+ * @param {DataTypesEventPayload} dataTypesEventPayload Event payload with user interaction data
688
+ * @param {*} [options] Override http request option.
689
+ * @throws {RequiredError}
690
+ */
691
+ analyticsEventPost: async (xStoreid, xStoresecret, dataTypesEventPayload, options = {}) => {
692
+ // verify required parameter 'xStoreid' is not null or undefined
693
+ (0, common_1.assertParamExists)('analyticsEventPost', 'xStoreid', xStoreid);
694
+ // verify required parameter 'xStoresecret' is not null or undefined
695
+ (0, common_1.assertParamExists)('analyticsEventPost', 'xStoresecret', xStoresecret);
696
+ // verify required parameter 'dataTypesEventPayload' is not null or undefined
697
+ (0, common_1.assertParamExists)('analyticsEventPost', 'dataTypesEventPayload', dataTypesEventPayload);
698
+ const localVarPath = `/analytics/event`;
699
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
700
+ const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
701
+ let baseOptions;
702
+ if (configuration) {
703
+ baseOptions = configuration.baseOptions;
704
+ }
705
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
706
+ const localVarHeaderParameter = {};
707
+ const localVarQueryParameter = {};
708
+ localVarHeaderParameter['Content-Type'] = 'application/json';
709
+ localVarHeaderParameter['Accept'] = 'application/json';
710
+ if (xStoreid != null) {
711
+ localVarHeaderParameter['x-storeid'] = String(xStoreid);
712
+ }
713
+ if (xStoresecret != null) {
714
+ localVarHeaderParameter['x-storesecret'] = String(xStoresecret);
715
+ }
716
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
717
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
718
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
719
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(dataTypesEventPayload, localVarRequestOptions, configuration);
720
+ return {
721
+ url: (0, common_1.toPathString)(localVarUrlObj),
722
+ options: localVarRequestOptions,
723
+ };
724
+ },
725
+ /**
726
+ * Retrieve the complete event schema including required and optional fields, data types, and validation rules
727
+ * @summary Get Event Schema
728
+ * @param {string} xStoreid Store ID for analytics tracking
729
+ * @param {string} xStoresecret Store secret for authentication
730
+ * @param {*} [options] Override http request option.
731
+ * @throws {RequiredError}
732
+ */
733
+ analyticsSchemaGet: async (xStoreid, xStoresecret, options = {}) => {
734
+ // verify required parameter 'xStoreid' is not null or undefined
735
+ (0, common_1.assertParamExists)('analyticsSchemaGet', 'xStoreid', xStoreid);
736
+ // verify required parameter 'xStoresecret' is not null or undefined
737
+ (0, common_1.assertParamExists)('analyticsSchemaGet', 'xStoresecret', xStoresecret);
738
+ const localVarPath = `/analytics/schema`;
739
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
740
+ const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
741
+ let baseOptions;
742
+ if (configuration) {
743
+ baseOptions = configuration.baseOptions;
744
+ }
745
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
746
+ const localVarHeaderParameter = {};
747
+ const localVarQueryParameter = {};
748
+ localVarHeaderParameter['Accept'] = 'application/json';
749
+ if (xStoreid != null) {
750
+ localVarHeaderParameter['x-storeid'] = String(xStoreid);
751
+ }
752
+ if (xStoresecret != null) {
753
+ localVarHeaderParameter['x-storesecret'] = String(xStoresecret);
754
+ }
755
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
756
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
757
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
758
+ return {
759
+ url: (0, common_1.toPathString)(localVarUrlObj),
760
+ options: localVarRequestOptions,
761
+ };
762
+ },
763
+ /**
764
+ * Validate an analytics event payload without actually processing or storing it
765
+ * @summary Validate Analytics Event
766
+ * @param {string} xStoreid Store ID for analytics tracking
767
+ * @param {string} xStoresecret Store secret for authentication
768
+ * @param {DataTypesEventPayload} dataTypesEventPayload Event payload to validate
769
+ * @param {*} [options] Override http request option.
770
+ * @throws {RequiredError}
771
+ */
772
+ analyticsValidatePost: async (xStoreid, xStoresecret, dataTypesEventPayload, options = {}) => {
773
+ // verify required parameter 'xStoreid' is not null or undefined
774
+ (0, common_1.assertParamExists)('analyticsValidatePost', 'xStoreid', xStoreid);
775
+ // verify required parameter 'xStoresecret' is not null or undefined
776
+ (0, common_1.assertParamExists)('analyticsValidatePost', 'xStoresecret', xStoresecret);
777
+ // verify required parameter 'dataTypesEventPayload' is not null or undefined
778
+ (0, common_1.assertParamExists)('analyticsValidatePost', 'dataTypesEventPayload', dataTypesEventPayload);
779
+ const localVarPath = `/analytics/validate`;
780
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
781
+ const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
782
+ let baseOptions;
783
+ if (configuration) {
784
+ baseOptions = configuration.baseOptions;
785
+ }
786
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
787
+ const localVarHeaderParameter = {};
788
+ const localVarQueryParameter = {};
789
+ localVarHeaderParameter['Content-Type'] = 'application/json';
790
+ localVarHeaderParameter['Accept'] = 'application/json';
791
+ if (xStoreid != null) {
792
+ localVarHeaderParameter['x-storeid'] = String(xStoreid);
793
+ }
794
+ if (xStoresecret != null) {
795
+ localVarHeaderParameter['x-storesecret'] = String(xStoresecret);
796
+ }
797
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
798
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
799
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
800
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(dataTypesEventPayload, localVarRequestOptions, configuration);
801
+ return {
802
+ url: (0, common_1.toPathString)(localVarUrlObj),
803
+ options: localVarRequestOptions,
804
+ };
805
+ },
806
+ };
807
+ };
808
+ exports.AnalyticsEventsApiAxiosParamCreator = AnalyticsEventsApiAxiosParamCreator;
809
+ /**
810
+ * AnalyticsEventsApi - functional programming interface
811
+ */
812
+ const AnalyticsEventsApiFp = function (configuration) {
813
+ const localVarAxiosParamCreator = (0, exports.AnalyticsEventsApiAxiosParamCreator)(configuration);
814
+ return {
815
+ /**
816
+ * Submit multiple analytics events in a single request for improved performance (max 100 events per batch)
817
+ * @summary Submit Batch Analytics Events
818
+ * @param {string} xStoreid Store ID for analytics tracking
819
+ * @param {string} xStoresecret Store secret for authentication
820
+ * @param {AnalyticsBatchPostRequest} analyticsBatchPostRequest Batch event request with array of events
821
+ * @param {*} [options] Override http request option.
822
+ * @throws {RequiredError}
823
+ */
824
+ async analyticsBatchPost(xStoreid, xStoresecret, analyticsBatchPostRequest, options) {
825
+ const localVarAxiosArgs = await localVarAxiosParamCreator.analyticsBatchPost(xStoreid, xStoresecret, analyticsBatchPostRequest, options);
826
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
827
+ const localVarOperationServerBasePath = base_1.operationServerMap['AnalyticsEventsApi.analyticsBatchPost']?.[localVarOperationServerIndex]?.url;
828
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
829
+ },
830
+ /**
831
+ * Retrieve analytics configuration including supported event types, batch limits, and funnel stages for client integration
832
+ * @summary Get Analytics Configuration
833
+ * @param {string} xStoreid Store ID for analytics tracking
834
+ * @param {string} xStoresecret Store secret for authentication
835
+ * @param {*} [options] Override http request option.
836
+ * @throws {RequiredError}
837
+ */
838
+ async analyticsConfigGet(xStoreid, xStoresecret, options) {
839
+ const localVarAxiosArgs = await localVarAxiosParamCreator.analyticsConfigGet(xStoreid, xStoresecret, options);
840
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
841
+ const localVarOperationServerBasePath = base_1.operationServerMap['AnalyticsEventsApi.analyticsConfigGet']?.[localVarOperationServerIndex]?.url;
842
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
843
+ },
844
+ /**
845
+ * Submit a single analytics event for tracking user interactions, search behavior, and conversions
846
+ * @summary Submit Analytics Event
847
+ * @param {string} xStoreid Store ID for analytics tracking
848
+ * @param {string} xStoresecret Store secret for authentication
849
+ * @param {DataTypesEventPayload} dataTypesEventPayload Event payload with user interaction data
850
+ * @param {*} [options] Override http request option.
851
+ * @throws {RequiredError}
852
+ */
853
+ async analyticsEventPost(xStoreid, xStoresecret, dataTypesEventPayload, options) {
854
+ const localVarAxiosArgs = await localVarAxiosParamCreator.analyticsEventPost(xStoreid, xStoresecret, dataTypesEventPayload, options);
855
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
856
+ const localVarOperationServerBasePath = base_1.operationServerMap['AnalyticsEventsApi.analyticsEventPost']?.[localVarOperationServerIndex]?.url;
857
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
858
+ },
859
+ /**
860
+ * Retrieve the complete event schema including required and optional fields, data types, and validation rules
861
+ * @summary Get Event Schema
862
+ * @param {string} xStoreid Store ID for analytics tracking
863
+ * @param {string} xStoresecret Store secret for authentication
864
+ * @param {*} [options] Override http request option.
865
+ * @throws {RequiredError}
866
+ */
867
+ async analyticsSchemaGet(xStoreid, xStoresecret, options) {
868
+ const localVarAxiosArgs = await localVarAxiosParamCreator.analyticsSchemaGet(xStoreid, xStoresecret, options);
869
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
870
+ const localVarOperationServerBasePath = base_1.operationServerMap['AnalyticsEventsApi.analyticsSchemaGet']?.[localVarOperationServerIndex]?.url;
871
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
872
+ },
873
+ /**
874
+ * Validate an analytics event payload without actually processing or storing it
875
+ * @summary Validate Analytics Event
876
+ * @param {string} xStoreid Store ID for analytics tracking
877
+ * @param {string} xStoresecret Store secret for authentication
878
+ * @param {DataTypesEventPayload} dataTypesEventPayload Event payload to validate
879
+ * @param {*} [options] Override http request option.
880
+ * @throws {RequiredError}
881
+ */
882
+ async analyticsValidatePost(xStoreid, xStoresecret, dataTypesEventPayload, options) {
883
+ const localVarAxiosArgs = await localVarAxiosParamCreator.analyticsValidatePost(xStoreid, xStoresecret, dataTypesEventPayload, options);
884
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
885
+ const localVarOperationServerBasePath = base_1.operationServerMap['AnalyticsEventsApi.analyticsValidatePost']?.[localVarOperationServerIndex]?.url;
886
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
887
+ },
888
+ };
889
+ };
890
+ exports.AnalyticsEventsApiFp = AnalyticsEventsApiFp;
891
+ /**
892
+ * AnalyticsEventsApi - factory interface
893
+ */
894
+ const AnalyticsEventsApiFactory = function (configuration, basePath, axios) {
895
+ const localVarFp = (0, exports.AnalyticsEventsApiFp)(configuration);
896
+ return {
897
+ /**
898
+ * Submit multiple analytics events in a single request for improved performance (max 100 events per batch)
899
+ * @summary Submit Batch Analytics Events
900
+ * @param {string} xStoreid Store ID for analytics tracking
901
+ * @param {string} xStoresecret Store secret for authentication
902
+ * @param {AnalyticsBatchPostRequest} analyticsBatchPostRequest Batch event request with array of events
903
+ * @param {*} [options] Override http request option.
904
+ * @throws {RequiredError}
905
+ */
906
+ analyticsBatchPost(xStoreid, xStoresecret, analyticsBatchPostRequest, options) {
907
+ return localVarFp.analyticsBatchPost(xStoreid, xStoresecret, analyticsBatchPostRequest, options).then((request) => request(axios, basePath));
908
+ },
909
+ /**
910
+ * Retrieve analytics configuration including supported event types, batch limits, and funnel stages for client integration
911
+ * @summary Get Analytics Configuration
912
+ * @param {string} xStoreid Store ID for analytics tracking
913
+ * @param {string} xStoresecret Store secret for authentication
914
+ * @param {*} [options] Override http request option.
915
+ * @throws {RequiredError}
916
+ */
917
+ analyticsConfigGet(xStoreid, xStoresecret, options) {
918
+ return localVarFp.analyticsConfigGet(xStoreid, xStoresecret, options).then((request) => request(axios, basePath));
919
+ },
920
+ /**
921
+ * Submit a single analytics event for tracking user interactions, search behavior, and conversions
922
+ * @summary Submit Analytics Event
923
+ * @param {string} xStoreid Store ID for analytics tracking
924
+ * @param {string} xStoresecret Store secret for authentication
925
+ * @param {DataTypesEventPayload} dataTypesEventPayload Event payload with user interaction data
926
+ * @param {*} [options] Override http request option.
927
+ * @throws {RequiredError}
928
+ */
929
+ analyticsEventPost(xStoreid, xStoresecret, dataTypesEventPayload, options) {
930
+ return localVarFp.analyticsEventPost(xStoreid, xStoresecret, dataTypesEventPayload, options).then((request) => request(axios, basePath));
931
+ },
932
+ /**
933
+ * Retrieve the complete event schema including required and optional fields, data types, and validation rules
934
+ * @summary Get Event Schema
935
+ * @param {string} xStoreid Store ID for analytics tracking
936
+ * @param {string} xStoresecret Store secret for authentication
937
+ * @param {*} [options] Override http request option.
938
+ * @throws {RequiredError}
939
+ */
940
+ analyticsSchemaGet(xStoreid, xStoresecret, options) {
941
+ return localVarFp.analyticsSchemaGet(xStoreid, xStoresecret, options).then((request) => request(axios, basePath));
942
+ },
943
+ /**
944
+ * Validate an analytics event payload without actually processing or storing it
945
+ * @summary Validate Analytics Event
946
+ * @param {string} xStoreid Store ID for analytics tracking
947
+ * @param {string} xStoresecret Store secret for authentication
948
+ * @param {DataTypesEventPayload} dataTypesEventPayload Event payload to validate
949
+ * @param {*} [options] Override http request option.
950
+ * @throws {RequiredError}
951
+ */
952
+ analyticsValidatePost(xStoreid, xStoresecret, dataTypesEventPayload, options) {
953
+ return localVarFp.analyticsValidatePost(xStoreid, xStoresecret, dataTypesEventPayload, options).then((request) => request(axios, basePath));
954
+ },
955
+ };
956
+ };
957
+ exports.AnalyticsEventsApiFactory = AnalyticsEventsApiFactory;
958
+ /**
959
+ * AnalyticsEventsApi - object-oriented interface
960
+ */
961
+ class AnalyticsEventsApi extends base_1.BaseAPI {
962
+ /**
963
+ * Submit multiple analytics events in a single request for improved performance (max 100 events per batch)
964
+ * @summary Submit Batch Analytics Events
965
+ * @param {string} xStoreid Store ID for analytics tracking
966
+ * @param {string} xStoresecret Store secret for authentication
967
+ * @param {AnalyticsBatchPostRequest} analyticsBatchPostRequest Batch event request with array of events
968
+ * @param {*} [options] Override http request option.
969
+ * @throws {RequiredError}
970
+ */
971
+ analyticsBatchPost(xStoreid, xStoresecret, analyticsBatchPostRequest, options) {
972
+ return (0, exports.AnalyticsEventsApiFp)(this.configuration).analyticsBatchPost(xStoreid, xStoresecret, analyticsBatchPostRequest, options).then((request) => request(this.axios, this.basePath));
973
+ }
974
+ /**
975
+ * Retrieve analytics configuration including supported event types, batch limits, and funnel stages for client integration
976
+ * @summary Get Analytics Configuration
977
+ * @param {string} xStoreid Store ID for analytics tracking
978
+ * @param {string} xStoresecret Store secret for authentication
979
+ * @param {*} [options] Override http request option.
980
+ * @throws {RequiredError}
981
+ */
982
+ analyticsConfigGet(xStoreid, xStoresecret, options) {
983
+ return (0, exports.AnalyticsEventsApiFp)(this.configuration).analyticsConfigGet(xStoreid, xStoresecret, options).then((request) => request(this.axios, this.basePath));
984
+ }
985
+ /**
986
+ * Submit a single analytics event for tracking user interactions, search behavior, and conversions
987
+ * @summary Submit Analytics Event
988
+ * @param {string} xStoreid Store ID for analytics tracking
989
+ * @param {string} xStoresecret Store secret for authentication
990
+ * @param {DataTypesEventPayload} dataTypesEventPayload Event payload with user interaction data
991
+ * @param {*} [options] Override http request option.
992
+ * @throws {RequiredError}
993
+ */
994
+ analyticsEventPost(xStoreid, xStoresecret, dataTypesEventPayload, options) {
995
+ return (0, exports.AnalyticsEventsApiFp)(this.configuration).analyticsEventPost(xStoreid, xStoresecret, dataTypesEventPayload, options).then((request) => request(this.axios, this.basePath));
996
+ }
997
+ /**
998
+ * Retrieve the complete event schema including required and optional fields, data types, and validation rules
999
+ * @summary Get Event Schema
1000
+ * @param {string} xStoreid Store ID for analytics tracking
1001
+ * @param {string} xStoresecret Store secret for authentication
1002
+ * @param {*} [options] Override http request option.
1003
+ * @throws {RequiredError}
1004
+ */
1005
+ analyticsSchemaGet(xStoreid, xStoresecret, options) {
1006
+ return (0, exports.AnalyticsEventsApiFp)(this.configuration).analyticsSchemaGet(xStoreid, xStoresecret, options).then((request) => request(this.axios, this.basePath));
1007
+ }
1008
+ /**
1009
+ * Validate an analytics event payload without actually processing or storing it
1010
+ * @summary Validate Analytics Event
1011
+ * @param {string} xStoreid Store ID for analytics tracking
1012
+ * @param {string} xStoresecret Store secret for authentication
1013
+ * @param {DataTypesEventPayload} dataTypesEventPayload Event payload to validate
1014
+ * @param {*} [options] Override http request option.
1015
+ * @throws {RequiredError}
1016
+ */
1017
+ analyticsValidatePost(xStoreid, xStoresecret, dataTypesEventPayload, options) {
1018
+ return (0, exports.AnalyticsEventsApiFp)(this.configuration).analyticsValidatePost(xStoreid, xStoresecret, dataTypesEventPayload, options).then((request) => request(this.axios, this.basePath));
1019
+ }
1020
+ }
1021
+ exports.AnalyticsEventsApi = AnalyticsEventsApi;
1022
+ /**
1023
+ * QuerySuggestionsApi - axios parameter creator
1024
+ */
1025
+ const QuerySuggestionsApiAxiosParamCreator = function (configuration) {
1026
+ return {
1027
+ /**
1028
+ * Retrieve configuration settings for query suggestions API including limits, supported time ranges, and default values
1029
+ * @summary Get Query Suggestions Configuration
1030
+ * @param {string} xStoreid Store ID
1031
+ * @param {string} xStoresecret Store Secret
1032
+ * @param {*} [options] Override http request option.
1033
+ * @throws {RequiredError}
1034
+ */
1035
+ v1SuggestionsConfigGet: async (xStoreid, xStoresecret, options = {}) => {
1036
+ // verify required parameter 'xStoreid' is not null or undefined
1037
+ (0, common_1.assertParamExists)('v1SuggestionsConfigGet', 'xStoreid', xStoreid);
1038
+ // verify required parameter 'xStoresecret' is not null or undefined
1039
+ (0, common_1.assertParamExists)('v1SuggestionsConfigGet', 'xStoresecret', xStoresecret);
1040
+ const localVarPath = `/v1/suggestions/config`;
1041
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1042
+ const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
1043
+ let baseOptions;
1044
+ if (configuration) {
1045
+ baseOptions = configuration.baseOptions;
1046
+ }
1047
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
1048
+ const localVarHeaderParameter = {};
1049
+ const localVarQueryParameter = {};
1050
+ localVarHeaderParameter['Accept'] = 'application/json';
1051
+ if (xStoreid != null) {
1052
+ localVarHeaderParameter['x-storeid'] = String(xStoreid);
1053
+ }
1054
+ if (xStoresecret != null) {
1055
+ localVarHeaderParameter['x-storesecret'] = String(xStoresecret);
1056
+ }
1057
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1058
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1059
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
1060
+ return {
1061
+ url: (0, common_1.toPathString)(localVarUrlObj),
1062
+ options: localVarRequestOptions,
1063
+ };
1064
+ },
1065
+ /**
1066
+ * Retrieve query suggestions based on search analytics data with popularity ranking and optional category/facet enrichment. Supports partial query matching, analytics tags filtering, and configurable time ranges. Supports personalization via x-user-id, x-anon-id, x-session-id headers.
1067
+ * @summary Get Query Suggestions
1068
+ * @param {string} xStoreid Store ID
1069
+ * @param {string} xStoresecret Store Secret
1070
+ * @param {string} [xUserId] User ID for personalization (logged-in user)
1071
+ * @param {string} [xAnonId] Anonymous ID for personalization (cookie/device ID)
1072
+ * @param {string} [xSessionId] Session ID for personalization
1073
+ * @param {string} [query] Partial query to get suggestions for
1074
+ * @param {number} [hitsPerPage] Number of suggestions to return
1075
+ * @param {number} [page] Page number for pagination
1076
+ * @param {string} [analyticsTags] Comma-separated analytics tags to filter suggestions
1077
+ * @param {V1SuggestionsQueriesGetTagsMatchModeEnum} [tagsMatchMode] How to match analytics tags
1078
+ * @param {boolean} [includeCategories] Include category information in suggestions
1079
+ * @param {boolean} [includeFacets] Include popular facets/filters information
1080
+ * @param {number} [maxCategories] Maximum categories per suggestion
1081
+ * @param {number} [maxFacets] Maximum facets per suggestion
1082
+ * @param {number} [minPopularity] Minimum popularity threshold
1083
+ * @param {V1SuggestionsQueriesGetTimeRangeEnum} [timeRange] Time range for analytics data
1084
+ * @param {boolean} [disableTypoTolerance] Disable fuzzy/typo-tolerant matching
1085
+ * @param {*} [options] Override http request option.
1086
+ * @throws {RequiredError}
1087
+ */
1088
+ v1SuggestionsQueriesGet: async (xStoreid, xStoresecret, xUserId, xAnonId, xSessionId, query, hitsPerPage, page, analyticsTags, tagsMatchMode, includeCategories, includeFacets, maxCategories, maxFacets, minPopularity, timeRange, disableTypoTolerance, options = {}) => {
1089
+ // verify required parameter 'xStoreid' is not null or undefined
1090
+ (0, common_1.assertParamExists)('v1SuggestionsQueriesGet', 'xStoreid', xStoreid);
1091
+ // verify required parameter 'xStoresecret' is not null or undefined
1092
+ (0, common_1.assertParamExists)('v1SuggestionsQueriesGet', 'xStoresecret', xStoresecret);
1093
+ const localVarPath = `/v1/suggestions/queries`;
1094
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1095
+ const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
1096
+ let baseOptions;
1097
+ if (configuration) {
1098
+ baseOptions = configuration.baseOptions;
1099
+ }
1100
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
1101
+ const localVarHeaderParameter = {};
1102
+ const localVarQueryParameter = {};
1103
+ if (query !== undefined) {
1104
+ localVarQueryParameter['query'] = query;
1105
+ }
1106
+ if (hitsPerPage !== undefined) {
1107
+ localVarQueryParameter['hitsPerPage'] = hitsPerPage;
1108
+ }
1109
+ if (page !== undefined) {
1110
+ localVarQueryParameter['page'] = page;
1111
+ }
1112
+ if (analyticsTags !== undefined) {
1113
+ localVarQueryParameter['analytics_tags'] = analyticsTags;
1114
+ }
1115
+ if (tagsMatchMode !== undefined) {
1116
+ localVarQueryParameter['tags_match_mode'] = tagsMatchMode;
1117
+ }
1118
+ if (includeCategories !== undefined) {
1119
+ localVarQueryParameter['include_categories'] = includeCategories;
1120
+ }
1121
+ if (includeFacets !== undefined) {
1122
+ localVarQueryParameter['include_facets'] = includeFacets;
1123
+ }
1124
+ if (maxCategories !== undefined) {
1125
+ localVarQueryParameter['max_categories'] = maxCategories;
1126
+ }
1127
+ if (maxFacets !== undefined) {
1128
+ localVarQueryParameter['max_facets'] = maxFacets;
1129
+ }
1130
+ if (minPopularity !== undefined) {
1131
+ localVarQueryParameter['min_popularity'] = minPopularity;
1132
+ }
1133
+ if (timeRange !== undefined) {
1134
+ localVarQueryParameter['time_range'] = timeRange;
1135
+ }
1136
+ if (disableTypoTolerance !== undefined) {
1137
+ localVarQueryParameter['disable_typo_tolerance'] = disableTypoTolerance;
1138
+ }
1139
+ localVarHeaderParameter['Accept'] = 'application/json';
1140
+ if (xStoreid != null) {
1141
+ localVarHeaderParameter['x-storeid'] = String(xStoreid);
1142
+ }
1143
+ if (xStoresecret != null) {
1144
+ localVarHeaderParameter['x-storesecret'] = String(xStoresecret);
1145
+ }
1146
+ if (xUserId != null) {
1147
+ localVarHeaderParameter['x-user-id'] = String(xUserId);
1148
+ }
1149
+ if (xAnonId != null) {
1150
+ localVarHeaderParameter['x-anon-id'] = String(xAnonId);
1151
+ }
1152
+ if (xSessionId != null) {
1153
+ localVarHeaderParameter['x-session-id'] = String(xSessionId);
1154
+ }
1155
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1156
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1157
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
1158
+ return {
1159
+ url: (0, common_1.toPathString)(localVarUrlObj),
1160
+ options: localVarRequestOptions,
1161
+ };
1162
+ },
1163
+ /**
1164
+ * Same as GET: retrieve query suggestions with optional body (query, hitsPerPage, analytics_tags, filtered_tabs, etc.). Use POST when sending filtered_tabs or larger payloads. Supports personalization via x-user-id, x-anon-id, x-session-id headers.
1165
+ * @summary Post Query Suggestions
1166
+ * @param {string} xStoreid Store ID
1167
+ * @param {string} xStoresecret Store Secret
1168
+ * @param {string} [xUserId] User ID for personalization (logged-in user)
1169
+ * @param {string} [xAnonId] Anonymous ID for personalization (cookie/device ID)
1170
+ * @param {string} [xSessionId] Session ID for personalization
1171
+ * @param {QuerySuggestionsServiceQuerySuggestionsRequest} [querySuggestionsServiceQuerySuggestionsRequest] Query suggestions request (query, hitsPerPage, page, analytics_tags, include_categories, include_facets, filtered_tabs, etc.)
1172
+ * @param {*} [options] Override http request option.
1173
+ * @throws {RequiredError}
1174
+ */
1175
+ v1SuggestionsQueriesPost: async (xStoreid, xStoresecret, xUserId, xAnonId, xSessionId, querySuggestionsServiceQuerySuggestionsRequest, options = {}) => {
1176
+ // verify required parameter 'xStoreid' is not null or undefined
1177
+ (0, common_1.assertParamExists)('v1SuggestionsQueriesPost', 'xStoreid', xStoreid);
1178
+ // verify required parameter 'xStoresecret' is not null or undefined
1179
+ (0, common_1.assertParamExists)('v1SuggestionsQueriesPost', 'xStoresecret', xStoresecret);
1180
+ const localVarPath = `/v1/suggestions/queries`;
1181
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1182
+ const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
1183
+ let baseOptions;
1184
+ if (configuration) {
1185
+ baseOptions = configuration.baseOptions;
1186
+ }
1187
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
1188
+ const localVarHeaderParameter = {};
1189
+ const localVarQueryParameter = {};
1190
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1191
+ localVarHeaderParameter['Accept'] = 'application/json';
1192
+ if (xStoreid != null) {
1193
+ localVarHeaderParameter['x-storeid'] = String(xStoreid);
1194
+ }
1195
+ if (xStoresecret != null) {
1196
+ localVarHeaderParameter['x-storesecret'] = String(xStoresecret);
1197
+ }
1198
+ if (xUserId != null) {
1199
+ localVarHeaderParameter['x-user-id'] = String(xUserId);
1200
+ }
1201
+ if (xAnonId != null) {
1202
+ localVarHeaderParameter['x-anon-id'] = String(xAnonId);
1203
+ }
1204
+ if (xSessionId != null) {
1205
+ localVarHeaderParameter['x-session-id'] = String(xSessionId);
1206
+ }
1207
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1208
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1209
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
1210
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(querySuggestionsServiceQuerySuggestionsRequest, localVarRequestOptions, configuration);
1211
+ return {
1212
+ url: (0, common_1.toPathString)(localVarUrlObj),
1213
+ options: localVarRequestOptions,
1214
+ };
1215
+ },
1216
+ };
1217
+ };
1218
+ exports.QuerySuggestionsApiAxiosParamCreator = QuerySuggestionsApiAxiosParamCreator;
1219
+ /**
1220
+ * QuerySuggestionsApi - functional programming interface
1221
+ */
1222
+ const QuerySuggestionsApiFp = function (configuration) {
1223
+ const localVarAxiosParamCreator = (0, exports.QuerySuggestionsApiAxiosParamCreator)(configuration);
1224
+ return {
1225
+ /**
1226
+ * Retrieve configuration settings for query suggestions API including limits, supported time ranges, and default values
1227
+ * @summary Get Query Suggestions Configuration
1228
+ * @param {string} xStoreid Store ID
1229
+ * @param {string} xStoresecret Store Secret
1230
+ * @param {*} [options] Override http request option.
1231
+ * @throws {RequiredError}
1232
+ */
1233
+ async v1SuggestionsConfigGet(xStoreid, xStoresecret, options) {
1234
+ const localVarAxiosArgs = await localVarAxiosParamCreator.v1SuggestionsConfigGet(xStoreid, xStoresecret, options);
1235
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1236
+ const localVarOperationServerBasePath = base_1.operationServerMap['QuerySuggestionsApi.v1SuggestionsConfigGet']?.[localVarOperationServerIndex]?.url;
1237
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1238
+ },
1239
+ /**
1240
+ * Retrieve query suggestions based on search analytics data with popularity ranking and optional category/facet enrichment. Supports partial query matching, analytics tags filtering, and configurable time ranges. Supports personalization via x-user-id, x-anon-id, x-session-id headers.
1241
+ * @summary Get Query Suggestions
1242
+ * @param {string} xStoreid Store ID
1243
+ * @param {string} xStoresecret Store Secret
1244
+ * @param {string} [xUserId] User ID for personalization (logged-in user)
1245
+ * @param {string} [xAnonId] Anonymous ID for personalization (cookie/device ID)
1246
+ * @param {string} [xSessionId] Session ID for personalization
1247
+ * @param {string} [query] Partial query to get suggestions for
1248
+ * @param {number} [hitsPerPage] Number of suggestions to return
1249
+ * @param {number} [page] Page number for pagination
1250
+ * @param {string} [analyticsTags] Comma-separated analytics tags to filter suggestions
1251
+ * @param {V1SuggestionsQueriesGetTagsMatchModeEnum} [tagsMatchMode] How to match analytics tags
1252
+ * @param {boolean} [includeCategories] Include category information in suggestions
1253
+ * @param {boolean} [includeFacets] Include popular facets/filters information
1254
+ * @param {number} [maxCategories] Maximum categories per suggestion
1255
+ * @param {number} [maxFacets] Maximum facets per suggestion
1256
+ * @param {number} [minPopularity] Minimum popularity threshold
1257
+ * @param {V1SuggestionsQueriesGetTimeRangeEnum} [timeRange] Time range for analytics data
1258
+ * @param {boolean} [disableTypoTolerance] Disable fuzzy/typo-tolerant matching
1259
+ * @param {*} [options] Override http request option.
1260
+ * @throws {RequiredError}
1261
+ */
1262
+ async v1SuggestionsQueriesGet(xStoreid, xStoresecret, xUserId, xAnonId, xSessionId, query, hitsPerPage, page, analyticsTags, tagsMatchMode, includeCategories, includeFacets, maxCategories, maxFacets, minPopularity, timeRange, disableTypoTolerance, options) {
1263
+ const localVarAxiosArgs = await localVarAxiosParamCreator.v1SuggestionsQueriesGet(xStoreid, xStoresecret, xUserId, xAnonId, xSessionId, query, hitsPerPage, page, analyticsTags, tagsMatchMode, includeCategories, includeFacets, maxCategories, maxFacets, minPopularity, timeRange, disableTypoTolerance, options);
1264
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1265
+ const localVarOperationServerBasePath = base_1.operationServerMap['QuerySuggestionsApi.v1SuggestionsQueriesGet']?.[localVarOperationServerIndex]?.url;
1266
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1267
+ },
1268
+ /**
1269
+ * Same as GET: retrieve query suggestions with optional body (query, hitsPerPage, analytics_tags, filtered_tabs, etc.). Use POST when sending filtered_tabs or larger payloads. Supports personalization via x-user-id, x-anon-id, x-session-id headers.
1270
+ * @summary Post Query Suggestions
1271
+ * @param {string} xStoreid Store ID
1272
+ * @param {string} xStoresecret Store Secret
1273
+ * @param {string} [xUserId] User ID for personalization (logged-in user)
1274
+ * @param {string} [xAnonId] Anonymous ID for personalization (cookie/device ID)
1275
+ * @param {string} [xSessionId] Session ID for personalization
1276
+ * @param {QuerySuggestionsServiceQuerySuggestionsRequest} [querySuggestionsServiceQuerySuggestionsRequest] Query suggestions request (query, hitsPerPage, page, analytics_tags, include_categories, include_facets, filtered_tabs, etc.)
1277
+ * @param {*} [options] Override http request option.
1278
+ * @throws {RequiredError}
1279
+ */
1280
+ async v1SuggestionsQueriesPost(xStoreid, xStoresecret, xUserId, xAnonId, xSessionId, querySuggestionsServiceQuerySuggestionsRequest, options) {
1281
+ const localVarAxiosArgs = await localVarAxiosParamCreator.v1SuggestionsQueriesPost(xStoreid, xStoresecret, xUserId, xAnonId, xSessionId, querySuggestionsServiceQuerySuggestionsRequest, options);
1282
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1283
+ const localVarOperationServerBasePath = base_1.operationServerMap['QuerySuggestionsApi.v1SuggestionsQueriesPost']?.[localVarOperationServerIndex]?.url;
1284
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1285
+ },
1286
+ };
1287
+ };
1288
+ exports.QuerySuggestionsApiFp = QuerySuggestionsApiFp;
1289
+ /**
1290
+ * QuerySuggestionsApi - factory interface
1291
+ */
1292
+ const QuerySuggestionsApiFactory = function (configuration, basePath, axios) {
1293
+ const localVarFp = (0, exports.QuerySuggestionsApiFp)(configuration);
1294
+ return {
1295
+ /**
1296
+ * Retrieve configuration settings for query suggestions API including limits, supported time ranges, and default values
1297
+ * @summary Get Query Suggestions Configuration
1298
+ * @param {string} xStoreid Store ID
1299
+ * @param {string} xStoresecret Store Secret
1300
+ * @param {*} [options] Override http request option.
1301
+ * @throws {RequiredError}
1302
+ */
1303
+ v1SuggestionsConfigGet(xStoreid, xStoresecret, options) {
1304
+ return localVarFp.v1SuggestionsConfigGet(xStoreid, xStoresecret, options).then((request) => request(axios, basePath));
1305
+ },
1306
+ /**
1307
+ * Retrieve query suggestions based on search analytics data with popularity ranking and optional category/facet enrichment. Supports partial query matching, analytics tags filtering, and configurable time ranges. Supports personalization via x-user-id, x-anon-id, x-session-id headers.
1308
+ * @summary Get Query Suggestions
1309
+ * @param {string} xStoreid Store ID
1310
+ * @param {string} xStoresecret Store Secret
1311
+ * @param {string} [xUserId] User ID for personalization (logged-in user)
1312
+ * @param {string} [xAnonId] Anonymous ID for personalization (cookie/device ID)
1313
+ * @param {string} [xSessionId] Session ID for personalization
1314
+ * @param {string} [query] Partial query to get suggestions for
1315
+ * @param {number} [hitsPerPage] Number of suggestions to return
1316
+ * @param {number} [page] Page number for pagination
1317
+ * @param {string} [analyticsTags] Comma-separated analytics tags to filter suggestions
1318
+ * @param {V1SuggestionsQueriesGetTagsMatchModeEnum} [tagsMatchMode] How to match analytics tags
1319
+ * @param {boolean} [includeCategories] Include category information in suggestions
1320
+ * @param {boolean} [includeFacets] Include popular facets/filters information
1321
+ * @param {number} [maxCategories] Maximum categories per suggestion
1322
+ * @param {number} [maxFacets] Maximum facets per suggestion
1323
+ * @param {number} [minPopularity] Minimum popularity threshold
1324
+ * @param {V1SuggestionsQueriesGetTimeRangeEnum} [timeRange] Time range for analytics data
1325
+ * @param {boolean} [disableTypoTolerance] Disable fuzzy/typo-tolerant matching
1326
+ * @param {*} [options] Override http request option.
1327
+ * @throws {RequiredError}
1328
+ */
1329
+ v1SuggestionsQueriesGet(xStoreid, xStoresecret, xUserId, xAnonId, xSessionId, query, hitsPerPage, page, analyticsTags, tagsMatchMode, includeCategories, includeFacets, maxCategories, maxFacets, minPopularity, timeRange, disableTypoTolerance, options) {
1330
+ return localVarFp.v1SuggestionsQueriesGet(xStoreid, xStoresecret, xUserId, xAnonId, xSessionId, query, hitsPerPage, page, analyticsTags, tagsMatchMode, includeCategories, includeFacets, maxCategories, maxFacets, minPopularity, timeRange, disableTypoTolerance, options).then((request) => request(axios, basePath));
1331
+ },
1332
+ /**
1333
+ * Same as GET: retrieve query suggestions with optional body (query, hitsPerPage, analytics_tags, filtered_tabs, etc.). Use POST when sending filtered_tabs or larger payloads. Supports personalization via x-user-id, x-anon-id, x-session-id headers.
1334
+ * @summary Post Query Suggestions
1335
+ * @param {string} xStoreid Store ID
1336
+ * @param {string} xStoresecret Store Secret
1337
+ * @param {string} [xUserId] User ID for personalization (logged-in user)
1338
+ * @param {string} [xAnonId] Anonymous ID for personalization (cookie/device ID)
1339
+ * @param {string} [xSessionId] Session ID for personalization
1340
+ * @param {QuerySuggestionsServiceQuerySuggestionsRequest} [querySuggestionsServiceQuerySuggestionsRequest] Query suggestions request (query, hitsPerPage, page, analytics_tags, include_categories, include_facets, filtered_tabs, etc.)
1341
+ * @param {*} [options] Override http request option.
1342
+ * @throws {RequiredError}
1343
+ */
1344
+ v1SuggestionsQueriesPost(xStoreid, xStoresecret, xUserId, xAnonId, xSessionId, querySuggestionsServiceQuerySuggestionsRequest, options) {
1345
+ return localVarFp.v1SuggestionsQueriesPost(xStoreid, xStoresecret, xUserId, xAnonId, xSessionId, querySuggestionsServiceQuerySuggestionsRequest, options).then((request) => request(axios, basePath));
1346
+ },
1347
+ };
1348
+ };
1349
+ exports.QuerySuggestionsApiFactory = QuerySuggestionsApiFactory;
1350
+ /**
1351
+ * QuerySuggestionsApi - object-oriented interface
1352
+ */
1353
+ class QuerySuggestionsApi extends base_1.BaseAPI {
1354
+ /**
1355
+ * Retrieve configuration settings for query suggestions API including limits, supported time ranges, and default values
1356
+ * @summary Get Query Suggestions Configuration
1357
+ * @param {string} xStoreid Store ID
1358
+ * @param {string} xStoresecret Store Secret
1359
+ * @param {*} [options] Override http request option.
1360
+ * @throws {RequiredError}
1361
+ */
1362
+ v1SuggestionsConfigGet(xStoreid, xStoresecret, options) {
1363
+ return (0, exports.QuerySuggestionsApiFp)(this.configuration).v1SuggestionsConfigGet(xStoreid, xStoresecret, options).then((request) => request(this.axios, this.basePath));
1364
+ }
1365
+ /**
1366
+ * Retrieve query suggestions based on search analytics data with popularity ranking and optional category/facet enrichment. Supports partial query matching, analytics tags filtering, and configurable time ranges. Supports personalization via x-user-id, x-anon-id, x-session-id headers.
1367
+ * @summary Get Query Suggestions
1368
+ * @param {string} xStoreid Store ID
1369
+ * @param {string} xStoresecret Store Secret
1370
+ * @param {string} [xUserId] User ID for personalization (logged-in user)
1371
+ * @param {string} [xAnonId] Anonymous ID for personalization (cookie/device ID)
1372
+ * @param {string} [xSessionId] Session ID for personalization
1373
+ * @param {string} [query] Partial query to get suggestions for
1374
+ * @param {number} [hitsPerPage] Number of suggestions to return
1375
+ * @param {number} [page] Page number for pagination
1376
+ * @param {string} [analyticsTags] Comma-separated analytics tags to filter suggestions
1377
+ * @param {V1SuggestionsQueriesGetTagsMatchModeEnum} [tagsMatchMode] How to match analytics tags
1378
+ * @param {boolean} [includeCategories] Include category information in suggestions
1379
+ * @param {boolean} [includeFacets] Include popular facets/filters information
1380
+ * @param {number} [maxCategories] Maximum categories per suggestion
1381
+ * @param {number} [maxFacets] Maximum facets per suggestion
1382
+ * @param {number} [minPopularity] Minimum popularity threshold
1383
+ * @param {V1SuggestionsQueriesGetTimeRangeEnum} [timeRange] Time range for analytics data
1384
+ * @param {boolean} [disableTypoTolerance] Disable fuzzy/typo-tolerant matching
1385
+ * @param {*} [options] Override http request option.
1386
+ * @throws {RequiredError}
1387
+ */
1388
+ v1SuggestionsQueriesGet(xStoreid, xStoresecret, xUserId, xAnonId, xSessionId, query, hitsPerPage, page, analyticsTags, tagsMatchMode, includeCategories, includeFacets, maxCategories, maxFacets, minPopularity, timeRange, disableTypoTolerance, options) {
1389
+ return (0, exports.QuerySuggestionsApiFp)(this.configuration).v1SuggestionsQueriesGet(xStoreid, xStoresecret, xUserId, xAnonId, xSessionId, query, hitsPerPage, page, analyticsTags, tagsMatchMode, includeCategories, includeFacets, maxCategories, maxFacets, minPopularity, timeRange, disableTypoTolerance, options).then((request) => request(this.axios, this.basePath));
1390
+ }
1391
+ /**
1392
+ * Same as GET: retrieve query suggestions with optional body (query, hitsPerPage, analytics_tags, filtered_tabs, etc.). Use POST when sending filtered_tabs or larger payloads. Supports personalization via x-user-id, x-anon-id, x-session-id headers.
1393
+ * @summary Post Query Suggestions
1394
+ * @param {string} xStoreid Store ID
1395
+ * @param {string} xStoresecret Store Secret
1396
+ * @param {string} [xUserId] User ID for personalization (logged-in user)
1397
+ * @param {string} [xAnonId] Anonymous ID for personalization (cookie/device ID)
1398
+ * @param {string} [xSessionId] Session ID for personalization
1399
+ * @param {QuerySuggestionsServiceQuerySuggestionsRequest} [querySuggestionsServiceQuerySuggestionsRequest] Query suggestions request (query, hitsPerPage, page, analytics_tags, include_categories, include_facets, filtered_tabs, etc.)
1400
+ * @param {*} [options] Override http request option.
1401
+ * @throws {RequiredError}
1402
+ */
1403
+ v1SuggestionsQueriesPost(xStoreid, xStoresecret, xUserId, xAnonId, xSessionId, querySuggestionsServiceQuerySuggestionsRequest, options) {
1404
+ return (0, exports.QuerySuggestionsApiFp)(this.configuration).v1SuggestionsQueriesPost(xStoreid, xStoresecret, xUserId, xAnonId, xSessionId, querySuggestionsServiceQuerySuggestionsRequest, options).then((request) => request(this.axios, this.basePath));
1405
+ }
1406
+ }
1407
+ exports.QuerySuggestionsApi = QuerySuggestionsApi;
1408
+ exports.V1SuggestionsQueriesGetTagsMatchModeEnum = {
1409
+ any: 'any',
1410
+ all: 'all'
1411
+ };
1412
+ exports.V1SuggestionsQueriesGetTimeRangeEnum = {
1413
+ _7d: '7d',
1414
+ _30d: '30d',
1415
+ _90d: '90d'
1416
+ };
1417
+ /**
1418
+ * SDKDocumentsApi - axios parameter creator
1419
+ */
1420
+ const SDKDocumentsApiAxiosParamCreator = function (configuration) {
1421
+ return {
1422
+ /**
1423
+ * Performs bulk insert, update, upsert, or delete operations on documents using the public SDK API. Requires x-store-write-secret for authentication. Each document may specify its own action (insert, update, upsert, delete).
1424
+ * @summary Bulk index documents (Public SDK API)
1425
+ * @param {string} xStoreid Store ID
1426
+ * @param {string} xStoreWriteSecret Store Write Secret (required for write operations)
1427
+ * @param {string} xStoreID X-Store ID (must match x-storeid header)
1428
+ * @param {DataTypesBulkDocumentRequest} dataTypesBulkDocumentRequest Bulk operation data
1429
+ * @param {*} [options] Override http request option.
1430
+ * @throws {RequiredError}
1431
+ */
1432
+ apiV1StoresXStoreIDDocumentsBulkPost: async (xStoreid, xStoreWriteSecret, xStoreID, dataTypesBulkDocumentRequest, options = {}) => {
1433
+ // verify required parameter 'xStoreid' is not null or undefined
1434
+ (0, common_1.assertParamExists)('apiV1StoresXStoreIDDocumentsBulkPost', 'xStoreid', xStoreid);
1435
+ // verify required parameter 'xStoreWriteSecret' is not null or undefined
1436
+ (0, common_1.assertParamExists)('apiV1StoresXStoreIDDocumentsBulkPost', 'xStoreWriteSecret', xStoreWriteSecret);
1437
+ // verify required parameter 'xStoreID' is not null or undefined
1438
+ (0, common_1.assertParamExists)('apiV1StoresXStoreIDDocumentsBulkPost', 'xStoreID', xStoreID);
1439
+ // verify required parameter 'dataTypesBulkDocumentRequest' is not null or undefined
1440
+ (0, common_1.assertParamExists)('apiV1StoresXStoreIDDocumentsBulkPost', 'dataTypesBulkDocumentRequest', dataTypesBulkDocumentRequest);
1441
+ const localVarPath = `/api/v1/stores/{xStoreID}/documents/bulk`
1442
+ .replace(`{${"xStoreID"}}`, encodeURIComponent(String(xStoreID)));
1443
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1444
+ const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
1445
+ let baseOptions;
1446
+ if (configuration) {
1447
+ baseOptions = configuration.baseOptions;
1448
+ }
1449
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
1450
+ const localVarHeaderParameter = {};
1451
+ const localVarQueryParameter = {};
1452
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1453
+ localVarHeaderParameter['Accept'] = 'application/json';
1454
+ if (xStoreid != null) {
1455
+ localVarHeaderParameter['x-storeid'] = String(xStoreid);
1456
+ }
1457
+ if (xStoreWriteSecret != null) {
1458
+ localVarHeaderParameter['x-store-write-secret'] = String(xStoreWriteSecret);
1459
+ }
1460
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1461
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1462
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
1463
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(dataTypesBulkDocumentRequest, localVarRequestOptions, configuration);
1464
+ return {
1465
+ url: (0, common_1.toPathString)(localVarUrlObj),
1466
+ options: localVarRequestOptions,
1467
+ };
1468
+ },
1469
+ /**
1470
+ * Deletes a document by ID from a store using the public SDK API. Requires x-store-write-secret for authentication.
1471
+ * @summary Delete a document (Public SDK API)
1472
+ * @param {string} xStoreid Store ID
1473
+ * @param {string} xStoreWriteSecret Store Write Secret (required for write operations)
1474
+ * @param {string} xStoreID X-Store ID (must match x-storeid header)
1475
+ * @param {string} documentID Document ID to delete
1476
+ * @param {*} [options] Override http request option.
1477
+ * @throws {RequiredError}
1478
+ */
1479
+ apiV1StoresXStoreIDDocumentsDocumentIDDelete: async (xStoreid, xStoreWriteSecret, xStoreID, documentID, options = {}) => {
1480
+ // verify required parameter 'xStoreid' is not null or undefined
1481
+ (0, common_1.assertParamExists)('apiV1StoresXStoreIDDocumentsDocumentIDDelete', 'xStoreid', xStoreid);
1482
+ // verify required parameter 'xStoreWriteSecret' is not null or undefined
1483
+ (0, common_1.assertParamExists)('apiV1StoresXStoreIDDocumentsDocumentIDDelete', 'xStoreWriteSecret', xStoreWriteSecret);
1484
+ // verify required parameter 'xStoreID' is not null or undefined
1485
+ (0, common_1.assertParamExists)('apiV1StoresXStoreIDDocumentsDocumentIDDelete', 'xStoreID', xStoreID);
1486
+ // verify required parameter 'documentID' is not null or undefined
1487
+ (0, common_1.assertParamExists)('apiV1StoresXStoreIDDocumentsDocumentIDDelete', 'documentID', documentID);
1488
+ const localVarPath = `/api/v1/stores/{xStoreID}/documents/{documentID}`
1489
+ .replace(`{${"xStoreID"}}`, encodeURIComponent(String(xStoreID)))
1490
+ .replace(`{${"documentID"}}`, encodeURIComponent(String(documentID)));
1491
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1492
+ const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
1493
+ let baseOptions;
1494
+ if (configuration) {
1495
+ baseOptions = configuration.baseOptions;
1496
+ }
1497
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options };
1498
+ const localVarHeaderParameter = {};
1499
+ const localVarQueryParameter = {};
1500
+ localVarHeaderParameter['Accept'] = 'application/json';
1501
+ if (xStoreid != null) {
1502
+ localVarHeaderParameter['x-storeid'] = String(xStoreid);
1503
+ }
1504
+ if (xStoreWriteSecret != null) {
1505
+ localVarHeaderParameter['x-store-write-secret'] = String(xStoreWriteSecret);
1506
+ }
1507
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1508
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1509
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
1510
+ return {
1511
+ url: (0, common_1.toPathString)(localVarUrlObj),
1512
+ options: localVarRequestOptions,
1513
+ };
1514
+ },
1515
+ /**
1516
+ * Indexes a new document into a store using the public SDK API. Requires x-store-write-secret for authentication. If ID is provided, it will be used; otherwise, a hash-based ID will be generated. If a document with the same hash already exists, it will be updated.
1517
+ * @summary Index a single document (Public SDK API)
1518
+ * @param {string} xStoreid Store ID
1519
+ * @param {string} xStoreWriteSecret Store Write Secret (required for write operations)
1520
+ * @param {string} xStoreID X-Store ID (must match x-storeid header)
1521
+ * @param {DataTypesDocumentRequest} dataTypesDocumentRequest Document data
1522
+ * @param {*} [options] Override http request option.
1523
+ * @throws {RequiredError}
1524
+ */
1525
+ apiV1StoresXStoreIDDocumentsPost: async (xStoreid, xStoreWriteSecret, xStoreID, dataTypesDocumentRequest, options = {}) => {
1526
+ // verify required parameter 'xStoreid' is not null or undefined
1527
+ (0, common_1.assertParamExists)('apiV1StoresXStoreIDDocumentsPost', 'xStoreid', xStoreid);
1528
+ // verify required parameter 'xStoreWriteSecret' is not null or undefined
1529
+ (0, common_1.assertParamExists)('apiV1StoresXStoreIDDocumentsPost', 'xStoreWriteSecret', xStoreWriteSecret);
1530
+ // verify required parameter 'xStoreID' is not null or undefined
1531
+ (0, common_1.assertParamExists)('apiV1StoresXStoreIDDocumentsPost', 'xStoreID', xStoreID);
1532
+ // verify required parameter 'dataTypesDocumentRequest' is not null or undefined
1533
+ (0, common_1.assertParamExists)('apiV1StoresXStoreIDDocumentsPost', 'dataTypesDocumentRequest', dataTypesDocumentRequest);
1534
+ const localVarPath = `/api/v1/stores/{xStoreID}/documents`
1535
+ .replace(`{${"xStoreID"}}`, encodeURIComponent(String(xStoreID)));
1536
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1537
+ const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
1538
+ let baseOptions;
1539
+ if (configuration) {
1540
+ baseOptions = configuration.baseOptions;
1541
+ }
1542
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
1543
+ const localVarHeaderParameter = {};
1544
+ const localVarQueryParameter = {};
1545
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1546
+ localVarHeaderParameter['Accept'] = 'application/json';
1547
+ if (xStoreid != null) {
1548
+ localVarHeaderParameter['x-storeid'] = String(xStoreid);
1549
+ }
1550
+ if (xStoreWriteSecret != null) {
1551
+ localVarHeaderParameter['x-store-write-secret'] = String(xStoreWriteSecret);
1552
+ }
1553
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1554
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1555
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
1556
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(dataTypesDocumentRequest, localVarRequestOptions, configuration);
1557
+ return {
1558
+ url: (0, common_1.toPathString)(localVarUrlObj),
1559
+ options: localVarRequestOptions,
1560
+ };
1561
+ },
1562
+ };
1563
+ };
1564
+ exports.SDKDocumentsApiAxiosParamCreator = SDKDocumentsApiAxiosParamCreator;
1565
+ /**
1566
+ * SDKDocumentsApi - functional programming interface
1567
+ */
1568
+ const SDKDocumentsApiFp = function (configuration) {
1569
+ const localVarAxiosParamCreator = (0, exports.SDKDocumentsApiAxiosParamCreator)(configuration);
1570
+ return {
1571
+ /**
1572
+ * Performs bulk insert, update, upsert, or delete operations on documents using the public SDK API. Requires x-store-write-secret for authentication. Each document may specify its own action (insert, update, upsert, delete).
1573
+ * @summary Bulk index documents (Public SDK API)
1574
+ * @param {string} xStoreid Store ID
1575
+ * @param {string} xStoreWriteSecret Store Write Secret (required for write operations)
1576
+ * @param {string} xStoreID X-Store ID (must match x-storeid header)
1577
+ * @param {DataTypesBulkDocumentRequest} dataTypesBulkDocumentRequest Bulk operation data
1578
+ * @param {*} [options] Override http request option.
1579
+ * @throws {RequiredError}
1580
+ */
1581
+ async apiV1StoresXStoreIDDocumentsBulkPost(xStoreid, xStoreWriteSecret, xStoreID, dataTypesBulkDocumentRequest, options) {
1582
+ const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1StoresXStoreIDDocumentsBulkPost(xStoreid, xStoreWriteSecret, xStoreID, dataTypesBulkDocumentRequest, options);
1583
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1584
+ const localVarOperationServerBasePath = base_1.operationServerMap['SDKDocumentsApi.apiV1StoresXStoreIDDocumentsBulkPost']?.[localVarOperationServerIndex]?.url;
1585
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1586
+ },
1587
+ /**
1588
+ * Deletes a document by ID from a store using the public SDK API. Requires x-store-write-secret for authentication.
1589
+ * @summary Delete a document (Public SDK API)
1590
+ * @param {string} xStoreid Store ID
1591
+ * @param {string} xStoreWriteSecret Store Write Secret (required for write operations)
1592
+ * @param {string} xStoreID X-Store ID (must match x-storeid header)
1593
+ * @param {string} documentID Document ID to delete
1594
+ * @param {*} [options] Override http request option.
1595
+ * @throws {RequiredError}
1596
+ */
1597
+ async apiV1StoresXStoreIDDocumentsDocumentIDDelete(xStoreid, xStoreWriteSecret, xStoreID, documentID, options) {
1598
+ const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1StoresXStoreIDDocumentsDocumentIDDelete(xStoreid, xStoreWriteSecret, xStoreID, documentID, options);
1599
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1600
+ const localVarOperationServerBasePath = base_1.operationServerMap['SDKDocumentsApi.apiV1StoresXStoreIDDocumentsDocumentIDDelete']?.[localVarOperationServerIndex]?.url;
1601
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1602
+ },
1603
+ /**
1604
+ * Indexes a new document into a store using the public SDK API. Requires x-store-write-secret for authentication. If ID is provided, it will be used; otherwise, a hash-based ID will be generated. If a document with the same hash already exists, it will be updated.
1605
+ * @summary Index a single document (Public SDK API)
1606
+ * @param {string} xStoreid Store ID
1607
+ * @param {string} xStoreWriteSecret Store Write Secret (required for write operations)
1608
+ * @param {string} xStoreID X-Store ID (must match x-storeid header)
1609
+ * @param {DataTypesDocumentRequest} dataTypesDocumentRequest Document data
1610
+ * @param {*} [options] Override http request option.
1611
+ * @throws {RequiredError}
1612
+ */
1613
+ async apiV1StoresXStoreIDDocumentsPost(xStoreid, xStoreWriteSecret, xStoreID, dataTypesDocumentRequest, options) {
1614
+ const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1StoresXStoreIDDocumentsPost(xStoreid, xStoreWriteSecret, xStoreID, dataTypesDocumentRequest, options);
1615
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1616
+ const localVarOperationServerBasePath = base_1.operationServerMap['SDKDocumentsApi.apiV1StoresXStoreIDDocumentsPost']?.[localVarOperationServerIndex]?.url;
1617
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1618
+ },
1619
+ };
1620
+ };
1621
+ exports.SDKDocumentsApiFp = SDKDocumentsApiFp;
1622
+ /**
1623
+ * SDKDocumentsApi - factory interface
1624
+ */
1625
+ const SDKDocumentsApiFactory = function (configuration, basePath, axios) {
1626
+ const localVarFp = (0, exports.SDKDocumentsApiFp)(configuration);
1627
+ return {
1628
+ /**
1629
+ * Performs bulk insert, update, upsert, or delete operations on documents using the public SDK API. Requires x-store-write-secret for authentication. Each document may specify its own action (insert, update, upsert, delete).
1630
+ * @summary Bulk index documents (Public SDK API)
1631
+ * @param {string} xStoreid Store ID
1632
+ * @param {string} xStoreWriteSecret Store Write Secret (required for write operations)
1633
+ * @param {string} xStoreID X-Store ID (must match x-storeid header)
1634
+ * @param {DataTypesBulkDocumentRequest} dataTypesBulkDocumentRequest Bulk operation data
1635
+ * @param {*} [options] Override http request option.
1636
+ * @throws {RequiredError}
1637
+ */
1638
+ apiV1StoresXStoreIDDocumentsBulkPost(xStoreid, xStoreWriteSecret, xStoreID, dataTypesBulkDocumentRequest, options) {
1639
+ return localVarFp.apiV1StoresXStoreIDDocumentsBulkPost(xStoreid, xStoreWriteSecret, xStoreID, dataTypesBulkDocumentRequest, options).then((request) => request(axios, basePath));
1640
+ },
1641
+ /**
1642
+ * Deletes a document by ID from a store using the public SDK API. Requires x-store-write-secret for authentication.
1643
+ * @summary Delete a document (Public SDK API)
1644
+ * @param {string} xStoreid Store ID
1645
+ * @param {string} xStoreWriteSecret Store Write Secret (required for write operations)
1646
+ * @param {string} xStoreID X-Store ID (must match x-storeid header)
1647
+ * @param {string} documentID Document ID to delete
1648
+ * @param {*} [options] Override http request option.
1649
+ * @throws {RequiredError}
1650
+ */
1651
+ apiV1StoresXStoreIDDocumentsDocumentIDDelete(xStoreid, xStoreWriteSecret, xStoreID, documentID, options) {
1652
+ return localVarFp.apiV1StoresXStoreIDDocumentsDocumentIDDelete(xStoreid, xStoreWriteSecret, xStoreID, documentID, options).then((request) => request(axios, basePath));
1653
+ },
1654
+ /**
1655
+ * Indexes a new document into a store using the public SDK API. Requires x-store-write-secret for authentication. If ID is provided, it will be used; otherwise, a hash-based ID will be generated. If a document with the same hash already exists, it will be updated.
1656
+ * @summary Index a single document (Public SDK API)
1657
+ * @param {string} xStoreid Store ID
1658
+ * @param {string} xStoreWriteSecret Store Write Secret (required for write operations)
1659
+ * @param {string} xStoreID X-Store ID (must match x-storeid header)
1660
+ * @param {DataTypesDocumentRequest} dataTypesDocumentRequest Document data
1661
+ * @param {*} [options] Override http request option.
1662
+ * @throws {RequiredError}
1663
+ */
1664
+ apiV1StoresXStoreIDDocumentsPost(xStoreid, xStoreWriteSecret, xStoreID, dataTypesDocumentRequest, options) {
1665
+ return localVarFp.apiV1StoresXStoreIDDocumentsPost(xStoreid, xStoreWriteSecret, xStoreID, dataTypesDocumentRequest, options).then((request) => request(axios, basePath));
1666
+ },
1667
+ };
1668
+ };
1669
+ exports.SDKDocumentsApiFactory = SDKDocumentsApiFactory;
1670
+ /**
1671
+ * SDKDocumentsApi - object-oriented interface
1672
+ */
1673
+ class SDKDocumentsApi extends base_1.BaseAPI {
1674
+ /**
1675
+ * Performs bulk insert, update, upsert, or delete operations on documents using the public SDK API. Requires x-store-write-secret for authentication. Each document may specify its own action (insert, update, upsert, delete).
1676
+ * @summary Bulk index documents (Public SDK API)
1677
+ * @param {string} xStoreid Store ID
1678
+ * @param {string} xStoreWriteSecret Store Write Secret (required for write operations)
1679
+ * @param {string} xStoreID X-Store ID (must match x-storeid header)
1680
+ * @param {DataTypesBulkDocumentRequest} dataTypesBulkDocumentRequest Bulk operation data
1681
+ * @param {*} [options] Override http request option.
1682
+ * @throws {RequiredError}
1683
+ */
1684
+ apiV1StoresXStoreIDDocumentsBulkPost(xStoreid, xStoreWriteSecret, xStoreID, dataTypesBulkDocumentRequest, options) {
1685
+ return (0, exports.SDKDocumentsApiFp)(this.configuration).apiV1StoresXStoreIDDocumentsBulkPost(xStoreid, xStoreWriteSecret, xStoreID, dataTypesBulkDocumentRequest, options).then((request) => request(this.axios, this.basePath));
1686
+ }
1687
+ /**
1688
+ * Deletes a document by ID from a store using the public SDK API. Requires x-store-write-secret for authentication.
1689
+ * @summary Delete a document (Public SDK API)
1690
+ * @param {string} xStoreid Store ID
1691
+ * @param {string} xStoreWriteSecret Store Write Secret (required for write operations)
1692
+ * @param {string} xStoreID X-Store ID (must match x-storeid header)
1693
+ * @param {string} documentID Document ID to delete
1694
+ * @param {*} [options] Override http request option.
1695
+ * @throws {RequiredError}
1696
+ */
1697
+ apiV1StoresXStoreIDDocumentsDocumentIDDelete(xStoreid, xStoreWriteSecret, xStoreID, documentID, options) {
1698
+ return (0, exports.SDKDocumentsApiFp)(this.configuration).apiV1StoresXStoreIDDocumentsDocumentIDDelete(xStoreid, xStoreWriteSecret, xStoreID, documentID, options).then((request) => request(this.axios, this.basePath));
1699
+ }
1700
+ /**
1701
+ * Indexes a new document into a store using the public SDK API. Requires x-store-write-secret for authentication. If ID is provided, it will be used; otherwise, a hash-based ID will be generated. If a document with the same hash already exists, it will be updated.
1702
+ * @summary Index a single document (Public SDK API)
1703
+ * @param {string} xStoreid Store ID
1704
+ * @param {string} xStoreWriteSecret Store Write Secret (required for write operations)
1705
+ * @param {string} xStoreID X-Store ID (must match x-storeid header)
1706
+ * @param {DataTypesDocumentRequest} dataTypesDocumentRequest Document data
1707
+ * @param {*} [options] Override http request option.
1708
+ * @throws {RequiredError}
1709
+ */
1710
+ apiV1StoresXStoreIDDocumentsPost(xStoreid, xStoreWriteSecret, xStoreID, dataTypesDocumentRequest, options) {
1711
+ return (0, exports.SDKDocumentsApiFp)(this.configuration).apiV1StoresXStoreIDDocumentsPost(xStoreid, xStoreWriteSecret, xStoreID, dataTypesDocumentRequest, options).then((request) => request(this.axios, this.basePath));
1712
+ }
1713
+ }
1714
+ exports.SDKDocumentsApi = SDKDocumentsApi;
1715
+ /**
1716
+ * SDKQuerySuggestionsConfigApi - axios parameter creator
1717
+ */
1718
+ const SDKQuerySuggestionsConfigApiAxiosParamCreator = function (configuration) {
1719
+ return {
1720
+ /**
1721
+ * Retrieves the store-specific query suggestions configuration using x-store ID and read secret. This is a public API for SDK integration, similar to Algolia\'s GET /1/configs/{configID} endpoint. Uses read secret (x-storesecret).
1722
+ * @summary Get Query Suggestions Config (Public SDK API)
1723
+ * @param {string} xStoreid Store ID
1724
+ * @param {string} xStoresecret Store Read Secret (for read operations)
1725
+ * @param {string} xStoreID X-Store ID (must match x-storeid header)
1726
+ * @param {*} [options] Override http request option.
1727
+ * @throws {RequiredError}
1728
+ */
1729
+ apiV1StoresXStoreIDQuerySuggestionsConfigGet: async (xStoreid, xStoresecret, xStoreID, options = {}) => {
1730
+ // verify required parameter 'xStoreid' is not null or undefined
1731
+ (0, common_1.assertParamExists)('apiV1StoresXStoreIDQuerySuggestionsConfigGet', 'xStoreid', xStoreid);
1732
+ // verify required parameter 'xStoresecret' is not null or undefined
1733
+ (0, common_1.assertParamExists)('apiV1StoresXStoreIDQuerySuggestionsConfigGet', 'xStoresecret', xStoresecret);
1734
+ // verify required parameter 'xStoreID' is not null or undefined
1735
+ (0, common_1.assertParamExists)('apiV1StoresXStoreIDQuerySuggestionsConfigGet', 'xStoreID', xStoreID);
1736
+ const localVarPath = `/api/v1/stores/{xStoreID}/query-suggestions/config`
1737
+ .replace(`{${"xStoreID"}}`, encodeURIComponent(String(xStoreID)));
1738
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1739
+ const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
1740
+ let baseOptions;
1741
+ if (configuration) {
1742
+ baseOptions = configuration.baseOptions;
1743
+ }
1744
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
1745
+ const localVarHeaderParameter = {};
1746
+ const localVarQueryParameter = {};
1747
+ localVarHeaderParameter['Accept'] = 'application/json';
1748
+ if (xStoreid != null) {
1749
+ localVarHeaderParameter['x-storeid'] = String(xStoreid);
1750
+ }
1751
+ if (xStoresecret != null) {
1752
+ localVarHeaderParameter['x-storesecret'] = String(xStoresecret);
1753
+ }
1754
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1755
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1756
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
1757
+ return {
1758
+ url: (0, common_1.toPathString)(localVarUrlObj),
1759
+ options: localVarRequestOptions,
1760
+ };
1761
+ },
1762
+ /**
1763
+ * Updates the store-specific query suggestions configuration using x-store ID and write secret. Supports partial updates. This is a public API for SDK integration, similar to Algolia\'s PUT /1/configs/{configID} endpoint. Requires write secret (x-store-write-secret).
1764
+ * @summary Update Query Suggestions Config (Public SDK API)
1765
+ * @param {string} xStoreid Store ID
1766
+ * @param {string} xStoreWriteSecret Store Write Secret (required for write operations)
1767
+ * @param {string} xStoreID X-Store ID (must match x-storeid header)
1768
+ * @param {QuerySuggestionsServiceUpdateSuggestionConfigRequest} querySuggestionsServiceUpdateSuggestionConfigRequest Query suggestions configuration (partial updates supported)
1769
+ * @param {*} [options] Override http request option.
1770
+ * @throws {RequiredError}
1771
+ */
1772
+ apiV1StoresXStoreIDQuerySuggestionsConfigPut: async (xStoreid, xStoreWriteSecret, xStoreID, querySuggestionsServiceUpdateSuggestionConfigRequest, options = {}) => {
1773
+ // verify required parameter 'xStoreid' is not null or undefined
1774
+ (0, common_1.assertParamExists)('apiV1StoresXStoreIDQuerySuggestionsConfigPut', 'xStoreid', xStoreid);
1775
+ // verify required parameter 'xStoreWriteSecret' is not null or undefined
1776
+ (0, common_1.assertParamExists)('apiV1StoresXStoreIDQuerySuggestionsConfigPut', 'xStoreWriteSecret', xStoreWriteSecret);
1777
+ // verify required parameter 'xStoreID' is not null or undefined
1778
+ (0, common_1.assertParamExists)('apiV1StoresXStoreIDQuerySuggestionsConfigPut', 'xStoreID', xStoreID);
1779
+ // verify required parameter 'querySuggestionsServiceUpdateSuggestionConfigRequest' is not null or undefined
1780
+ (0, common_1.assertParamExists)('apiV1StoresXStoreIDQuerySuggestionsConfigPut', 'querySuggestionsServiceUpdateSuggestionConfigRequest', querySuggestionsServiceUpdateSuggestionConfigRequest);
1781
+ const localVarPath = `/api/v1/stores/{xStoreID}/query-suggestions/config`
1782
+ .replace(`{${"xStoreID"}}`, encodeURIComponent(String(xStoreID)));
1783
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1784
+ const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
1785
+ let baseOptions;
1786
+ if (configuration) {
1787
+ baseOptions = configuration.baseOptions;
1788
+ }
1789
+ const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options };
1790
+ const localVarHeaderParameter = {};
1791
+ const localVarQueryParameter = {};
1792
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1793
+ localVarHeaderParameter['Accept'] = 'application/json';
1794
+ if (xStoreid != null) {
1795
+ localVarHeaderParameter['x-storeid'] = String(xStoreid);
1796
+ }
1797
+ if (xStoreWriteSecret != null) {
1798
+ localVarHeaderParameter['x-store-write-secret'] = String(xStoreWriteSecret);
1799
+ }
1800
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1801
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1802
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
1803
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(querySuggestionsServiceUpdateSuggestionConfigRequest, localVarRequestOptions, configuration);
1804
+ return {
1805
+ url: (0, common_1.toPathString)(localVarUrlObj),
1806
+ options: localVarRequestOptions,
1807
+ };
1808
+ },
1809
+ };
1810
+ };
1811
+ exports.SDKQuerySuggestionsConfigApiAxiosParamCreator = SDKQuerySuggestionsConfigApiAxiosParamCreator;
1812
+ /**
1813
+ * SDKQuerySuggestionsConfigApi - functional programming interface
1814
+ */
1815
+ const SDKQuerySuggestionsConfigApiFp = function (configuration) {
1816
+ const localVarAxiosParamCreator = (0, exports.SDKQuerySuggestionsConfigApiAxiosParamCreator)(configuration);
1817
+ return {
1818
+ /**
1819
+ * Retrieves the store-specific query suggestions configuration using x-store ID and read secret. This is a public API for SDK integration, similar to Algolia\'s GET /1/configs/{configID} endpoint. Uses read secret (x-storesecret).
1820
+ * @summary Get Query Suggestions Config (Public SDK API)
1821
+ * @param {string} xStoreid Store ID
1822
+ * @param {string} xStoresecret Store Read Secret (for read operations)
1823
+ * @param {string} xStoreID X-Store ID (must match x-storeid header)
1824
+ * @param {*} [options] Override http request option.
1825
+ * @throws {RequiredError}
1826
+ */
1827
+ async apiV1StoresXStoreIDQuerySuggestionsConfigGet(xStoreid, xStoresecret, xStoreID, options) {
1828
+ const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1StoresXStoreIDQuerySuggestionsConfigGet(xStoreid, xStoresecret, xStoreID, options);
1829
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1830
+ const localVarOperationServerBasePath = base_1.operationServerMap['SDKQuerySuggestionsConfigApi.apiV1StoresXStoreIDQuerySuggestionsConfigGet']?.[localVarOperationServerIndex]?.url;
1831
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1832
+ },
1833
+ /**
1834
+ * Updates the store-specific query suggestions configuration using x-store ID and write secret. Supports partial updates. This is a public API for SDK integration, similar to Algolia\'s PUT /1/configs/{configID} endpoint. Requires write secret (x-store-write-secret).
1835
+ * @summary Update Query Suggestions Config (Public SDK API)
1836
+ * @param {string} xStoreid Store ID
1837
+ * @param {string} xStoreWriteSecret Store Write Secret (required for write operations)
1838
+ * @param {string} xStoreID X-Store ID (must match x-storeid header)
1839
+ * @param {QuerySuggestionsServiceUpdateSuggestionConfigRequest} querySuggestionsServiceUpdateSuggestionConfigRequest Query suggestions configuration (partial updates supported)
1840
+ * @param {*} [options] Override http request option.
1841
+ * @throws {RequiredError}
1842
+ */
1843
+ async apiV1StoresXStoreIDQuerySuggestionsConfigPut(xStoreid, xStoreWriteSecret, xStoreID, querySuggestionsServiceUpdateSuggestionConfigRequest, options) {
1844
+ const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1StoresXStoreIDQuerySuggestionsConfigPut(xStoreid, xStoreWriteSecret, xStoreID, querySuggestionsServiceUpdateSuggestionConfigRequest, options);
1845
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1846
+ const localVarOperationServerBasePath = base_1.operationServerMap['SDKQuerySuggestionsConfigApi.apiV1StoresXStoreIDQuerySuggestionsConfigPut']?.[localVarOperationServerIndex]?.url;
1847
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1848
+ },
1849
+ };
1850
+ };
1851
+ exports.SDKQuerySuggestionsConfigApiFp = SDKQuerySuggestionsConfigApiFp;
1852
+ /**
1853
+ * SDKQuerySuggestionsConfigApi - factory interface
1854
+ */
1855
+ const SDKQuerySuggestionsConfigApiFactory = function (configuration, basePath, axios) {
1856
+ const localVarFp = (0, exports.SDKQuerySuggestionsConfigApiFp)(configuration);
1857
+ return {
1858
+ /**
1859
+ * Retrieves the store-specific query suggestions configuration using x-store ID and read secret. This is a public API for SDK integration, similar to Algolia\'s GET /1/configs/{configID} endpoint. Uses read secret (x-storesecret).
1860
+ * @summary Get Query Suggestions Config (Public SDK API)
1861
+ * @param {string} xStoreid Store ID
1862
+ * @param {string} xStoresecret Store Read Secret (for read operations)
1863
+ * @param {string} xStoreID X-Store ID (must match x-storeid header)
1864
+ * @param {*} [options] Override http request option.
1865
+ * @throws {RequiredError}
1866
+ */
1867
+ apiV1StoresXStoreIDQuerySuggestionsConfigGet(xStoreid, xStoresecret, xStoreID, options) {
1868
+ return localVarFp.apiV1StoresXStoreIDQuerySuggestionsConfigGet(xStoreid, xStoresecret, xStoreID, options).then((request) => request(axios, basePath));
1869
+ },
1870
+ /**
1871
+ * Updates the store-specific query suggestions configuration using x-store ID and write secret. Supports partial updates. This is a public API for SDK integration, similar to Algolia\'s PUT /1/configs/{configID} endpoint. Requires write secret (x-store-write-secret).
1872
+ * @summary Update Query Suggestions Config (Public SDK API)
1873
+ * @param {string} xStoreid Store ID
1874
+ * @param {string} xStoreWriteSecret Store Write Secret (required for write operations)
1875
+ * @param {string} xStoreID X-Store ID (must match x-storeid header)
1876
+ * @param {QuerySuggestionsServiceUpdateSuggestionConfigRequest} querySuggestionsServiceUpdateSuggestionConfigRequest Query suggestions configuration (partial updates supported)
1877
+ * @param {*} [options] Override http request option.
1878
+ * @throws {RequiredError}
1879
+ */
1880
+ apiV1StoresXStoreIDQuerySuggestionsConfigPut(xStoreid, xStoreWriteSecret, xStoreID, querySuggestionsServiceUpdateSuggestionConfigRequest, options) {
1881
+ return localVarFp.apiV1StoresXStoreIDQuerySuggestionsConfigPut(xStoreid, xStoreWriteSecret, xStoreID, querySuggestionsServiceUpdateSuggestionConfigRequest, options).then((request) => request(axios, basePath));
1882
+ },
1883
+ };
1884
+ };
1885
+ exports.SDKQuerySuggestionsConfigApiFactory = SDKQuerySuggestionsConfigApiFactory;
1886
+ /**
1887
+ * SDKQuerySuggestionsConfigApi - object-oriented interface
1888
+ */
1889
+ class SDKQuerySuggestionsConfigApi extends base_1.BaseAPI {
1890
+ /**
1891
+ * Retrieves the store-specific query suggestions configuration using x-store ID and read secret. This is a public API for SDK integration, similar to Algolia\'s GET /1/configs/{configID} endpoint. Uses read secret (x-storesecret).
1892
+ * @summary Get Query Suggestions Config (Public SDK API)
1893
+ * @param {string} xStoreid Store ID
1894
+ * @param {string} xStoresecret Store Read Secret (for read operations)
1895
+ * @param {string} xStoreID X-Store ID (must match x-storeid header)
1896
+ * @param {*} [options] Override http request option.
1897
+ * @throws {RequiredError}
1898
+ */
1899
+ apiV1StoresXStoreIDQuerySuggestionsConfigGet(xStoreid, xStoresecret, xStoreID, options) {
1900
+ return (0, exports.SDKQuerySuggestionsConfigApiFp)(this.configuration).apiV1StoresXStoreIDQuerySuggestionsConfigGet(xStoreid, xStoresecret, xStoreID, options).then((request) => request(this.axios, this.basePath));
1901
+ }
1902
+ /**
1903
+ * Updates the store-specific query suggestions configuration using x-store ID and write secret. Supports partial updates. This is a public API for SDK integration, similar to Algolia\'s PUT /1/configs/{configID} endpoint. Requires write secret (x-store-write-secret).
1904
+ * @summary Update Query Suggestions Config (Public SDK API)
1905
+ * @param {string} xStoreid Store ID
1906
+ * @param {string} xStoreWriteSecret Store Write Secret (required for write operations)
1907
+ * @param {string} xStoreID X-Store ID (must match x-storeid header)
1908
+ * @param {QuerySuggestionsServiceUpdateSuggestionConfigRequest} querySuggestionsServiceUpdateSuggestionConfigRequest Query suggestions configuration (partial updates supported)
1909
+ * @param {*} [options] Override http request option.
1910
+ * @throws {RequiredError}
1911
+ */
1912
+ apiV1StoresXStoreIDQuerySuggestionsConfigPut(xStoreid, xStoreWriteSecret, xStoreID, querySuggestionsServiceUpdateSuggestionConfigRequest, options) {
1913
+ return (0, exports.SDKQuerySuggestionsConfigApiFp)(this.configuration).apiV1StoresXStoreIDQuerySuggestionsConfigPut(xStoreid, xStoreWriteSecret, xStoreID, querySuggestionsServiceUpdateSuggestionConfigRequest, options).then((request) => request(this.axios, this.basePath));
1914
+ }
1915
+ }
1916
+ exports.SDKQuerySuggestionsConfigApi = SDKQuerySuggestionsConfigApi;
1917
+ /**
1918
+ * SDKSchemaApi - axios parameter creator
1919
+ */
1920
+ const SDKSchemaApiAxiosParamCreator = function (configuration) {
1921
+ return {
1922
+ /**
1923
+ * Deletes all documents from a store\'s collection without deleting the collection itself. Requires x-store-write-secret for authentication.
1924
+ * @summary Clear All Documents (Public SDK API)
1925
+ * @param {string} xStoreid Store ID
1926
+ * @param {string} xStoreWriteSecret Store Write Secret
1927
+ * @param {string} xStoreID X-Store ID (must match x-storeid header)
1928
+ * @param {*} [options] Override http request option.
1929
+ * @throws {RequiredError}
1930
+ */
1931
+ apiV1StoresXStoreIDDocumentsDelete: async (xStoreid, xStoreWriteSecret, xStoreID, options = {}) => {
1932
+ // verify required parameter 'xStoreid' is not null or undefined
1933
+ (0, common_1.assertParamExists)('apiV1StoresXStoreIDDocumentsDelete', 'xStoreid', xStoreid);
1934
+ // verify required parameter 'xStoreWriteSecret' is not null or undefined
1935
+ (0, common_1.assertParamExists)('apiV1StoresXStoreIDDocumentsDelete', 'xStoreWriteSecret', xStoreWriteSecret);
1936
+ // verify required parameter 'xStoreID' is not null or undefined
1937
+ (0, common_1.assertParamExists)('apiV1StoresXStoreIDDocumentsDelete', 'xStoreID', xStoreID);
1938
+ const localVarPath = `/api/v1/stores/{xStoreID}/documents`
1939
+ .replace(`{${"xStoreID"}}`, encodeURIComponent(String(xStoreID)));
1940
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1941
+ const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
1942
+ let baseOptions;
1943
+ if (configuration) {
1944
+ baseOptions = configuration.baseOptions;
1945
+ }
1946
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options };
1947
+ const localVarHeaderParameter = {};
1948
+ const localVarQueryParameter = {};
1949
+ localVarHeaderParameter['Accept'] = 'application/json';
1950
+ if (xStoreid != null) {
1951
+ localVarHeaderParameter['x-storeid'] = String(xStoreid);
1952
+ }
1953
+ if (xStoreWriteSecret != null) {
1954
+ localVarHeaderParameter['x-store-write-secret'] = String(xStoreWriteSecret);
1955
+ }
1956
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1957
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1958
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
1959
+ return {
1960
+ url: (0, common_1.toPathString)(localVarUrlObj),
1961
+ options: localVarRequestOptions,
1962
+ };
1963
+ },
1964
+ /**
1965
+ * Retrieves the current collection schema for a store. Requires x-storesecret (read secret) for authentication.
1966
+ * @summary Get Collection Schema (Public SDK API)
1967
+ * @param {string} xStoreid Store ID
1968
+ * @param {string} xStoresecret Store Read Secret
1969
+ * @param {string} xStoreID X-Store ID (must match x-storeid header)
1970
+ * @param {*} [options] Override http request option.
1971
+ * @throws {RequiredError}
1972
+ */
1973
+ apiV1StoresXStoreIDSchemaGet: async (xStoreid, xStoresecret, xStoreID, options = {}) => {
1974
+ // verify required parameter 'xStoreid' is not null or undefined
1975
+ (0, common_1.assertParamExists)('apiV1StoresXStoreIDSchemaGet', 'xStoreid', xStoreid);
1976
+ // verify required parameter 'xStoresecret' is not null or undefined
1977
+ (0, common_1.assertParamExists)('apiV1StoresXStoreIDSchemaGet', 'xStoresecret', xStoresecret);
1978
+ // verify required parameter 'xStoreID' is not null or undefined
1979
+ (0, common_1.assertParamExists)('apiV1StoresXStoreIDSchemaGet', 'xStoreID', xStoreID);
1980
+ const localVarPath = `/api/v1/stores/{xStoreID}/schema`
1981
+ .replace(`{${"xStoreID"}}`, encodeURIComponent(String(xStoreID)));
1982
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1983
+ const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
1984
+ let baseOptions;
1985
+ if (configuration) {
1986
+ baseOptions = configuration.baseOptions;
1987
+ }
1988
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
1989
+ const localVarHeaderParameter = {};
1990
+ const localVarQueryParameter = {};
1991
+ localVarHeaderParameter['Accept'] = 'application/json';
1992
+ if (xStoreid != null) {
1993
+ localVarHeaderParameter['x-storeid'] = String(xStoreid);
1994
+ }
1995
+ if (xStoresecret != null) {
1996
+ localVarHeaderParameter['x-storesecret'] = String(xStoresecret);
1997
+ }
1998
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1999
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2000
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
2001
+ return {
2002
+ url: (0, common_1.toPathString)(localVarUrlObj),
2003
+ options: localVarRequestOptions,
2004
+ };
2005
+ },
2006
+ /**
2007
+ * Creates a new collection schema or updates an existing one. Mode can be \'additive\' (add new fields, preserve data) or \'replace\' (delete and recreate collection). Requires x-store-write-secret for authentication.
2008
+ * @summary Create or Update Collection Schema (Public SDK API)
2009
+ * @param {string} xStoreid Store ID
2010
+ * @param {string} xStoreWriteSecret Store Write Secret
2011
+ * @param {string} xStoreID X-Store ID (must match x-storeid header)
2012
+ * @param {DataTypesCollectionSchemaRequest} dataTypesCollectionSchemaRequest Schema request
2013
+ * @param {*} [options] Override http request option.
2014
+ * @throws {RequiredError}
2015
+ */
2016
+ apiV1StoresXStoreIDSchemaPost: async (xStoreid, xStoreWriteSecret, xStoreID, dataTypesCollectionSchemaRequest, options = {}) => {
2017
+ // verify required parameter 'xStoreid' is not null or undefined
2018
+ (0, common_1.assertParamExists)('apiV1StoresXStoreIDSchemaPost', 'xStoreid', xStoreid);
2019
+ // verify required parameter 'xStoreWriteSecret' is not null or undefined
2020
+ (0, common_1.assertParamExists)('apiV1StoresXStoreIDSchemaPost', 'xStoreWriteSecret', xStoreWriteSecret);
2021
+ // verify required parameter 'xStoreID' is not null or undefined
2022
+ (0, common_1.assertParamExists)('apiV1StoresXStoreIDSchemaPost', 'xStoreID', xStoreID);
2023
+ // verify required parameter 'dataTypesCollectionSchemaRequest' is not null or undefined
2024
+ (0, common_1.assertParamExists)('apiV1StoresXStoreIDSchemaPost', 'dataTypesCollectionSchemaRequest', dataTypesCollectionSchemaRequest);
2025
+ const localVarPath = `/api/v1/stores/{xStoreID}/schema`
2026
+ .replace(`{${"xStoreID"}}`, encodeURIComponent(String(xStoreID)));
2027
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2028
+ const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
2029
+ let baseOptions;
2030
+ if (configuration) {
2031
+ baseOptions = configuration.baseOptions;
2032
+ }
2033
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
2034
+ const localVarHeaderParameter = {};
2035
+ const localVarQueryParameter = {};
2036
+ localVarHeaderParameter['Content-Type'] = 'application/json';
2037
+ localVarHeaderParameter['Accept'] = 'application/json';
2038
+ if (xStoreid != null) {
2039
+ localVarHeaderParameter['x-storeid'] = String(xStoreid);
2040
+ }
2041
+ if (xStoreWriteSecret != null) {
2042
+ localVarHeaderParameter['x-store-write-secret'] = String(xStoreWriteSecret);
2043
+ }
2044
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2045
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2046
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
2047
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(dataTypesCollectionSchemaRequest, localVarRequestOptions, configuration);
2048
+ return {
2049
+ url: (0, common_1.toPathString)(localVarUrlObj),
2050
+ options: localVarRequestOptions,
2051
+ };
2052
+ },
2053
+ };
2054
+ };
2055
+ exports.SDKSchemaApiAxiosParamCreator = SDKSchemaApiAxiosParamCreator;
2056
+ /**
2057
+ * SDKSchemaApi - functional programming interface
2058
+ */
2059
+ const SDKSchemaApiFp = function (configuration) {
2060
+ const localVarAxiosParamCreator = (0, exports.SDKSchemaApiAxiosParamCreator)(configuration);
2061
+ return {
2062
+ /**
2063
+ * Deletes all documents from a store\'s collection without deleting the collection itself. Requires x-store-write-secret for authentication.
2064
+ * @summary Clear All Documents (Public SDK API)
2065
+ * @param {string} xStoreid Store ID
2066
+ * @param {string} xStoreWriteSecret Store Write Secret
2067
+ * @param {string} xStoreID X-Store ID (must match x-storeid header)
2068
+ * @param {*} [options] Override http request option.
2069
+ * @throws {RequiredError}
2070
+ */
2071
+ async apiV1StoresXStoreIDDocumentsDelete(xStoreid, xStoreWriteSecret, xStoreID, options) {
2072
+ const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1StoresXStoreIDDocumentsDelete(xStoreid, xStoreWriteSecret, xStoreID, options);
2073
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2074
+ const localVarOperationServerBasePath = base_1.operationServerMap['SDKSchemaApi.apiV1StoresXStoreIDDocumentsDelete']?.[localVarOperationServerIndex]?.url;
2075
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2076
+ },
2077
+ /**
2078
+ * Retrieves the current collection schema for a store. Requires x-storesecret (read secret) for authentication.
2079
+ * @summary Get Collection Schema (Public SDK API)
2080
+ * @param {string} xStoreid Store ID
2081
+ * @param {string} xStoresecret Store Read Secret
2082
+ * @param {string} xStoreID X-Store ID (must match x-storeid header)
2083
+ * @param {*} [options] Override http request option.
2084
+ * @throws {RequiredError}
2085
+ */
2086
+ async apiV1StoresXStoreIDSchemaGet(xStoreid, xStoresecret, xStoreID, options) {
2087
+ const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1StoresXStoreIDSchemaGet(xStoreid, xStoresecret, xStoreID, options);
2088
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2089
+ const localVarOperationServerBasePath = base_1.operationServerMap['SDKSchemaApi.apiV1StoresXStoreIDSchemaGet']?.[localVarOperationServerIndex]?.url;
2090
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2091
+ },
2092
+ /**
2093
+ * Creates a new collection schema or updates an existing one. Mode can be \'additive\' (add new fields, preserve data) or \'replace\' (delete and recreate collection). Requires x-store-write-secret for authentication.
2094
+ * @summary Create or Update Collection Schema (Public SDK API)
2095
+ * @param {string} xStoreid Store ID
2096
+ * @param {string} xStoreWriteSecret Store Write Secret
2097
+ * @param {string} xStoreID X-Store ID (must match x-storeid header)
2098
+ * @param {DataTypesCollectionSchemaRequest} dataTypesCollectionSchemaRequest Schema request
2099
+ * @param {*} [options] Override http request option.
2100
+ * @throws {RequiredError}
2101
+ */
2102
+ async apiV1StoresXStoreIDSchemaPost(xStoreid, xStoreWriteSecret, xStoreID, dataTypesCollectionSchemaRequest, options) {
2103
+ const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1StoresXStoreIDSchemaPost(xStoreid, xStoreWriteSecret, xStoreID, dataTypesCollectionSchemaRequest, options);
2104
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2105
+ const localVarOperationServerBasePath = base_1.operationServerMap['SDKSchemaApi.apiV1StoresXStoreIDSchemaPost']?.[localVarOperationServerIndex]?.url;
2106
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2107
+ },
2108
+ };
2109
+ };
2110
+ exports.SDKSchemaApiFp = SDKSchemaApiFp;
2111
+ /**
2112
+ * SDKSchemaApi - factory interface
2113
+ */
2114
+ const SDKSchemaApiFactory = function (configuration, basePath, axios) {
2115
+ const localVarFp = (0, exports.SDKSchemaApiFp)(configuration);
2116
+ return {
2117
+ /**
2118
+ * Deletes all documents from a store\'s collection without deleting the collection itself. Requires x-store-write-secret for authentication.
2119
+ * @summary Clear All Documents (Public SDK API)
2120
+ * @param {string} xStoreid Store ID
2121
+ * @param {string} xStoreWriteSecret Store Write Secret
2122
+ * @param {string} xStoreID X-Store ID (must match x-storeid header)
2123
+ * @param {*} [options] Override http request option.
2124
+ * @throws {RequiredError}
2125
+ */
2126
+ apiV1StoresXStoreIDDocumentsDelete(xStoreid, xStoreWriteSecret, xStoreID, options) {
2127
+ return localVarFp.apiV1StoresXStoreIDDocumentsDelete(xStoreid, xStoreWriteSecret, xStoreID, options).then((request) => request(axios, basePath));
2128
+ },
2129
+ /**
2130
+ * Retrieves the current collection schema for a store. Requires x-storesecret (read secret) for authentication.
2131
+ * @summary Get Collection Schema (Public SDK API)
2132
+ * @param {string} xStoreid Store ID
2133
+ * @param {string} xStoresecret Store Read Secret
2134
+ * @param {string} xStoreID X-Store ID (must match x-storeid header)
2135
+ * @param {*} [options] Override http request option.
2136
+ * @throws {RequiredError}
2137
+ */
2138
+ apiV1StoresXStoreIDSchemaGet(xStoreid, xStoresecret, xStoreID, options) {
2139
+ return localVarFp.apiV1StoresXStoreIDSchemaGet(xStoreid, xStoresecret, xStoreID, options).then((request) => request(axios, basePath));
2140
+ },
2141
+ /**
2142
+ * Creates a new collection schema or updates an existing one. Mode can be \'additive\' (add new fields, preserve data) or \'replace\' (delete and recreate collection). Requires x-store-write-secret for authentication.
2143
+ * @summary Create or Update Collection Schema (Public SDK API)
2144
+ * @param {string} xStoreid Store ID
2145
+ * @param {string} xStoreWriteSecret Store Write Secret
2146
+ * @param {string} xStoreID X-Store ID (must match x-storeid header)
2147
+ * @param {DataTypesCollectionSchemaRequest} dataTypesCollectionSchemaRequest Schema request
2148
+ * @param {*} [options] Override http request option.
2149
+ * @throws {RequiredError}
2150
+ */
2151
+ apiV1StoresXStoreIDSchemaPost(xStoreid, xStoreWriteSecret, xStoreID, dataTypesCollectionSchemaRequest, options) {
2152
+ return localVarFp.apiV1StoresXStoreIDSchemaPost(xStoreid, xStoreWriteSecret, xStoreID, dataTypesCollectionSchemaRequest, options).then((request) => request(axios, basePath));
2153
+ },
2154
+ };
2155
+ };
2156
+ exports.SDKSchemaApiFactory = SDKSchemaApiFactory;
2157
+ /**
2158
+ * SDKSchemaApi - object-oriented interface
2159
+ */
2160
+ class SDKSchemaApi extends base_1.BaseAPI {
2161
+ /**
2162
+ * Deletes all documents from a store\'s collection without deleting the collection itself. Requires x-store-write-secret for authentication.
2163
+ * @summary Clear All Documents (Public SDK API)
2164
+ * @param {string} xStoreid Store ID
2165
+ * @param {string} xStoreWriteSecret Store Write Secret
2166
+ * @param {string} xStoreID X-Store ID (must match x-storeid header)
2167
+ * @param {*} [options] Override http request option.
2168
+ * @throws {RequiredError}
2169
+ */
2170
+ apiV1StoresXStoreIDDocumentsDelete(xStoreid, xStoreWriteSecret, xStoreID, options) {
2171
+ return (0, exports.SDKSchemaApiFp)(this.configuration).apiV1StoresXStoreIDDocumentsDelete(xStoreid, xStoreWriteSecret, xStoreID, options).then((request) => request(this.axios, this.basePath));
2172
+ }
2173
+ /**
2174
+ * Retrieves the current collection schema for a store. Requires x-storesecret (read secret) for authentication.
2175
+ * @summary Get Collection Schema (Public SDK API)
2176
+ * @param {string} xStoreid Store ID
2177
+ * @param {string} xStoresecret Store Read Secret
2178
+ * @param {string} xStoreID X-Store ID (must match x-storeid header)
2179
+ * @param {*} [options] Override http request option.
2180
+ * @throws {RequiredError}
2181
+ */
2182
+ apiV1StoresXStoreIDSchemaGet(xStoreid, xStoresecret, xStoreID, options) {
2183
+ return (0, exports.SDKSchemaApiFp)(this.configuration).apiV1StoresXStoreIDSchemaGet(xStoreid, xStoresecret, xStoreID, options).then((request) => request(this.axios, this.basePath));
2184
+ }
2185
+ /**
2186
+ * Creates a new collection schema or updates an existing one. Mode can be \'additive\' (add new fields, preserve data) or \'replace\' (delete and recreate collection). Requires x-store-write-secret for authentication.
2187
+ * @summary Create or Update Collection Schema (Public SDK API)
2188
+ * @param {string} xStoreid Store ID
2189
+ * @param {string} xStoreWriteSecret Store Write Secret
2190
+ * @param {string} xStoreID X-Store ID (must match x-storeid header)
2191
+ * @param {DataTypesCollectionSchemaRequest} dataTypesCollectionSchemaRequest Schema request
2192
+ * @param {*} [options] Override http request option.
2193
+ * @throws {RequiredError}
2194
+ */
2195
+ apiV1StoresXStoreIDSchemaPost(xStoreid, xStoreWriteSecret, xStoreID, dataTypesCollectionSchemaRequest, options) {
2196
+ return (0, exports.SDKSchemaApiFp)(this.configuration).apiV1StoresXStoreIDSchemaPost(xStoreid, xStoreWriteSecret, xStoreID, dataTypesCollectionSchemaRequest, options).then((request) => request(this.axios, this.basePath));
2197
+ }
2198
+ }
2199
+ exports.SDKSchemaApi = SDKSchemaApi;
2200
+ /**
2201
+ * SDKStoreConfigApi - axios parameter creator
2202
+ */
2203
+ const SDKStoreConfigApiAxiosParamCreator = function (configuration) {
2204
+ return {
2205
+ /**
2206
+ * Retrieves the store configuration (search config and query suggestions config) using x-store ID and read secret. This is a public API for SDK integration. Uses read secret (x-storesecret). Includes both search configuration and query suggestions configuration in a single response.
2207
+ * @summary Get Store Config (Public SDK API)
2208
+ * @param {string} xStoreid Store ID
2209
+ * @param {string} xStoresecret Store Read Secret (for read operations)
2210
+ * @param {string} xStoreID X-Store ID (must match x-storeid header)
2211
+ * @param {*} [options] Override http request option.
2212
+ * @throws {RequiredError}
2213
+ */
2214
+ apiV1StoresXStoreIDConfigGet: async (xStoreid, xStoresecret, xStoreID, options = {}) => {
2215
+ // verify required parameter 'xStoreid' is not null or undefined
2216
+ (0, common_1.assertParamExists)('apiV1StoresXStoreIDConfigGet', 'xStoreid', xStoreid);
2217
+ // verify required parameter 'xStoresecret' is not null or undefined
2218
+ (0, common_1.assertParamExists)('apiV1StoresXStoreIDConfigGet', 'xStoresecret', xStoresecret);
2219
+ // verify required parameter 'xStoreID' is not null or undefined
2220
+ (0, common_1.assertParamExists)('apiV1StoresXStoreIDConfigGet', 'xStoreID', xStoreID);
2221
+ const localVarPath = `/api/v1/stores/{xStoreID}/config`
2222
+ .replace(`{${"xStoreID"}}`, encodeURIComponent(String(xStoreID)));
2223
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2224
+ const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
2225
+ let baseOptions;
2226
+ if (configuration) {
2227
+ baseOptions = configuration.baseOptions;
2228
+ }
2229
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
2230
+ const localVarHeaderParameter = {};
2231
+ const localVarQueryParameter = {};
2232
+ localVarHeaderParameter['Accept'] = 'application/json';
2233
+ if (xStoreid != null) {
2234
+ localVarHeaderParameter['x-storeid'] = String(xStoreid);
2235
+ }
2236
+ if (xStoresecret != null) {
2237
+ localVarHeaderParameter['x-storesecret'] = String(xStoresecret);
2238
+ }
2239
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2240
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2241
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
2242
+ return {
2243
+ url: (0, common_1.toPathString)(localVarUrlObj),
2244
+ options: localVarRequestOptions,
2245
+ };
2246
+ },
2247
+ /**
2248
+ * Updates the store configuration using x-store ID and write secret. Supports partial updates. This is a public API for SDK integration. Requires write secret for security.
2249
+ * @summary Update Store Config (Public SDK API)
2250
+ * @param {string} xStoreid Store ID
2251
+ * @param {string} xStoreWriteSecret Store Write Secret (required for write operations)
2252
+ * @param {string} xStoreID X-Store ID (must match x-storeid header)
2253
+ * @param {DataTypesIndexConfig} dataTypesIndexConfig Store configuration (partial updates supported)
2254
+ * @param {*} [options] Override http request option.
2255
+ * @throws {RequiredError}
2256
+ */
2257
+ apiV1StoresXStoreIDConfigPut: async (xStoreid, xStoreWriteSecret, xStoreID, dataTypesIndexConfig, options = {}) => {
2258
+ // verify required parameter 'xStoreid' is not null or undefined
2259
+ (0, common_1.assertParamExists)('apiV1StoresXStoreIDConfigPut', 'xStoreid', xStoreid);
2260
+ // verify required parameter 'xStoreWriteSecret' is not null or undefined
2261
+ (0, common_1.assertParamExists)('apiV1StoresXStoreIDConfigPut', 'xStoreWriteSecret', xStoreWriteSecret);
2262
+ // verify required parameter 'xStoreID' is not null or undefined
2263
+ (0, common_1.assertParamExists)('apiV1StoresXStoreIDConfigPut', 'xStoreID', xStoreID);
2264
+ // verify required parameter 'dataTypesIndexConfig' is not null or undefined
2265
+ (0, common_1.assertParamExists)('apiV1StoresXStoreIDConfigPut', 'dataTypesIndexConfig', dataTypesIndexConfig);
2266
+ const localVarPath = `/api/v1/stores/{xStoreID}/config`
2267
+ .replace(`{${"xStoreID"}}`, encodeURIComponent(String(xStoreID)));
2268
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2269
+ const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
2270
+ let baseOptions;
2271
+ if (configuration) {
2272
+ baseOptions = configuration.baseOptions;
2273
+ }
2274
+ const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options };
2275
+ const localVarHeaderParameter = {};
2276
+ const localVarQueryParameter = {};
2277
+ localVarHeaderParameter['Content-Type'] = 'application/json';
2278
+ localVarHeaderParameter['Accept'] = 'application/json';
2279
+ if (xStoreid != null) {
2280
+ localVarHeaderParameter['x-storeid'] = String(xStoreid);
2281
+ }
2282
+ if (xStoreWriteSecret != null) {
2283
+ localVarHeaderParameter['x-store-write-secret'] = String(xStoreWriteSecret);
2284
+ }
2285
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2286
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2287
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
2288
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(dataTypesIndexConfig, localVarRequestOptions, configuration);
2289
+ return {
2290
+ url: (0, common_1.toPathString)(localVarUrlObj),
2291
+ options: localVarRequestOptions,
2292
+ };
2293
+ },
2294
+ /**
2295
+ * Get metadata about all configurable fields for store configuration. This is a public API for SDK integration.
2296
+ * @summary Get Store Config Schema (Public SDK API)
2297
+ * @param {string} xStoreid Store ID
2298
+ * @param {string} xStoresecret Store Secret
2299
+ * @param {string} xStoreID X-Store ID (must match x-storeid header)
2300
+ * @param {*} [options] Override http request option.
2301
+ * @throws {RequiredError}
2302
+ */
2303
+ apiV1StoresXStoreIDConfigSchemaGet: async (xStoreid, xStoresecret, xStoreID, options = {}) => {
2304
+ // verify required parameter 'xStoreid' is not null or undefined
2305
+ (0, common_1.assertParamExists)('apiV1StoresXStoreIDConfigSchemaGet', 'xStoreid', xStoreid);
2306
+ // verify required parameter 'xStoresecret' is not null or undefined
2307
+ (0, common_1.assertParamExists)('apiV1StoresXStoreIDConfigSchemaGet', 'xStoresecret', xStoresecret);
2308
+ // verify required parameter 'xStoreID' is not null or undefined
2309
+ (0, common_1.assertParamExists)('apiV1StoresXStoreIDConfigSchemaGet', 'xStoreID', xStoreID);
2310
+ const localVarPath = `/api/v1/stores/{xStoreID}/config-schema`
2311
+ .replace(`{${"xStoreID"}}`, encodeURIComponent(String(xStoreID)));
2312
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2313
+ const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
2314
+ let baseOptions;
2315
+ if (configuration) {
2316
+ baseOptions = configuration.baseOptions;
2317
+ }
2318
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
2319
+ const localVarHeaderParameter = {};
2320
+ const localVarQueryParameter = {};
2321
+ localVarHeaderParameter['Accept'] = 'application/json';
2322
+ if (xStoreid != null) {
2323
+ localVarHeaderParameter['x-storeid'] = String(xStoreid);
2324
+ }
2325
+ if (xStoresecret != null) {
2326
+ localVarHeaderParameter['x-storesecret'] = String(xStoresecret);
2327
+ }
2328
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2329
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2330
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
2331
+ return {
2332
+ url: (0, common_1.toPathString)(localVarUrlObj),
2333
+ options: localVarRequestOptions,
2334
+ };
2335
+ },
2336
+ };
2337
+ };
2338
+ exports.SDKStoreConfigApiAxiosParamCreator = SDKStoreConfigApiAxiosParamCreator;
2339
+ /**
2340
+ * SDKStoreConfigApi - functional programming interface
2341
+ */
2342
+ const SDKStoreConfigApiFp = function (configuration) {
2343
+ const localVarAxiosParamCreator = (0, exports.SDKStoreConfigApiAxiosParamCreator)(configuration);
2344
+ return {
2345
+ /**
2346
+ * Retrieves the store configuration (search config and query suggestions config) using x-store ID and read secret. This is a public API for SDK integration. Uses read secret (x-storesecret). Includes both search configuration and query suggestions configuration in a single response.
2347
+ * @summary Get Store Config (Public SDK API)
2348
+ * @param {string} xStoreid Store ID
2349
+ * @param {string} xStoresecret Store Read Secret (for read operations)
2350
+ * @param {string} xStoreID X-Store ID (must match x-storeid header)
2351
+ * @param {*} [options] Override http request option.
2352
+ * @throws {RequiredError}
2353
+ */
2354
+ async apiV1StoresXStoreIDConfigGet(xStoreid, xStoresecret, xStoreID, options) {
2355
+ const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1StoresXStoreIDConfigGet(xStoreid, xStoresecret, xStoreID, options);
2356
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2357
+ const localVarOperationServerBasePath = base_1.operationServerMap['SDKStoreConfigApi.apiV1StoresXStoreIDConfigGet']?.[localVarOperationServerIndex]?.url;
2358
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2359
+ },
2360
+ /**
2361
+ * Updates the store configuration using x-store ID and write secret. Supports partial updates. This is a public API for SDK integration. Requires write secret for security.
2362
+ * @summary Update Store Config (Public SDK API)
2363
+ * @param {string} xStoreid Store ID
2364
+ * @param {string} xStoreWriteSecret Store Write Secret (required for write operations)
2365
+ * @param {string} xStoreID X-Store ID (must match x-storeid header)
2366
+ * @param {DataTypesIndexConfig} dataTypesIndexConfig Store configuration (partial updates supported)
2367
+ * @param {*} [options] Override http request option.
2368
+ * @throws {RequiredError}
2369
+ */
2370
+ async apiV1StoresXStoreIDConfigPut(xStoreid, xStoreWriteSecret, xStoreID, dataTypesIndexConfig, options) {
2371
+ const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1StoresXStoreIDConfigPut(xStoreid, xStoreWriteSecret, xStoreID, dataTypesIndexConfig, options);
2372
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2373
+ const localVarOperationServerBasePath = base_1.operationServerMap['SDKStoreConfigApi.apiV1StoresXStoreIDConfigPut']?.[localVarOperationServerIndex]?.url;
2374
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2375
+ },
2376
+ /**
2377
+ * Get metadata about all configurable fields for store configuration. This is a public API for SDK integration.
2378
+ * @summary Get Store Config Schema (Public SDK API)
2379
+ * @param {string} xStoreid Store ID
2380
+ * @param {string} xStoresecret Store Secret
2381
+ * @param {string} xStoreID X-Store ID (must match x-storeid header)
2382
+ * @param {*} [options] Override http request option.
2383
+ * @throws {RequiredError}
2384
+ */
2385
+ async apiV1StoresXStoreIDConfigSchemaGet(xStoreid, xStoresecret, xStoreID, options) {
2386
+ const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1StoresXStoreIDConfigSchemaGet(xStoreid, xStoresecret, xStoreID, options);
2387
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2388
+ const localVarOperationServerBasePath = base_1.operationServerMap['SDKStoreConfigApi.apiV1StoresXStoreIDConfigSchemaGet']?.[localVarOperationServerIndex]?.url;
2389
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2390
+ },
2391
+ };
2392
+ };
2393
+ exports.SDKStoreConfigApiFp = SDKStoreConfigApiFp;
2394
+ /**
2395
+ * SDKStoreConfigApi - factory interface
2396
+ */
2397
+ const SDKStoreConfigApiFactory = function (configuration, basePath, axios) {
2398
+ const localVarFp = (0, exports.SDKStoreConfigApiFp)(configuration);
2399
+ return {
2400
+ /**
2401
+ * Retrieves the store configuration (search config and query suggestions config) using x-store ID and read secret. This is a public API for SDK integration. Uses read secret (x-storesecret). Includes both search configuration and query suggestions configuration in a single response.
2402
+ * @summary Get Store Config (Public SDK API)
2403
+ * @param {string} xStoreid Store ID
2404
+ * @param {string} xStoresecret Store Read Secret (for read operations)
2405
+ * @param {string} xStoreID X-Store ID (must match x-storeid header)
2406
+ * @param {*} [options] Override http request option.
2407
+ * @throws {RequiredError}
2408
+ */
2409
+ apiV1StoresXStoreIDConfigGet(xStoreid, xStoresecret, xStoreID, options) {
2410
+ return localVarFp.apiV1StoresXStoreIDConfigGet(xStoreid, xStoresecret, xStoreID, options).then((request) => request(axios, basePath));
2411
+ },
2412
+ /**
2413
+ * Updates the store configuration using x-store ID and write secret. Supports partial updates. This is a public API for SDK integration. Requires write secret for security.
2414
+ * @summary Update Store Config (Public SDK API)
2415
+ * @param {string} xStoreid Store ID
2416
+ * @param {string} xStoreWriteSecret Store Write Secret (required for write operations)
2417
+ * @param {string} xStoreID X-Store ID (must match x-storeid header)
2418
+ * @param {DataTypesIndexConfig} dataTypesIndexConfig Store configuration (partial updates supported)
2419
+ * @param {*} [options] Override http request option.
2420
+ * @throws {RequiredError}
2421
+ */
2422
+ apiV1StoresXStoreIDConfigPut(xStoreid, xStoreWriteSecret, xStoreID, dataTypesIndexConfig, options) {
2423
+ return localVarFp.apiV1StoresXStoreIDConfigPut(xStoreid, xStoreWriteSecret, xStoreID, dataTypesIndexConfig, options).then((request) => request(axios, basePath));
2424
+ },
2425
+ /**
2426
+ * Get metadata about all configurable fields for store configuration. This is a public API for SDK integration.
2427
+ * @summary Get Store Config Schema (Public SDK API)
2428
+ * @param {string} xStoreid Store ID
2429
+ * @param {string} xStoresecret Store Secret
2430
+ * @param {string} xStoreID X-Store ID (must match x-storeid header)
2431
+ * @param {*} [options] Override http request option.
2432
+ * @throws {RequiredError}
2433
+ */
2434
+ apiV1StoresXStoreIDConfigSchemaGet(xStoreid, xStoresecret, xStoreID, options) {
2435
+ return localVarFp.apiV1StoresXStoreIDConfigSchemaGet(xStoreid, xStoresecret, xStoreID, options).then((request) => request(axios, basePath));
2436
+ },
2437
+ };
2438
+ };
2439
+ exports.SDKStoreConfigApiFactory = SDKStoreConfigApiFactory;
2440
+ /**
2441
+ * SDKStoreConfigApi - object-oriented interface
2442
+ */
2443
+ class SDKStoreConfigApi extends base_1.BaseAPI {
2444
+ /**
2445
+ * Retrieves the store configuration (search config and query suggestions config) using x-store ID and read secret. This is a public API for SDK integration. Uses read secret (x-storesecret). Includes both search configuration and query suggestions configuration in a single response.
2446
+ * @summary Get Store Config (Public SDK API)
2447
+ * @param {string} xStoreid Store ID
2448
+ * @param {string} xStoresecret Store Read Secret (for read operations)
2449
+ * @param {string} xStoreID X-Store ID (must match x-storeid header)
2450
+ * @param {*} [options] Override http request option.
2451
+ * @throws {RequiredError}
2452
+ */
2453
+ apiV1StoresXStoreIDConfigGet(xStoreid, xStoresecret, xStoreID, options) {
2454
+ return (0, exports.SDKStoreConfigApiFp)(this.configuration).apiV1StoresXStoreIDConfigGet(xStoreid, xStoresecret, xStoreID, options).then((request) => request(this.axios, this.basePath));
2455
+ }
2456
+ /**
2457
+ * Updates the store configuration using x-store ID and write secret. Supports partial updates. This is a public API for SDK integration. Requires write secret for security.
2458
+ * @summary Update Store Config (Public SDK API)
2459
+ * @param {string} xStoreid Store ID
2460
+ * @param {string} xStoreWriteSecret Store Write Secret (required for write operations)
2461
+ * @param {string} xStoreID X-Store ID (must match x-storeid header)
2462
+ * @param {DataTypesIndexConfig} dataTypesIndexConfig Store configuration (partial updates supported)
2463
+ * @param {*} [options] Override http request option.
2464
+ * @throws {RequiredError}
2465
+ */
2466
+ apiV1StoresXStoreIDConfigPut(xStoreid, xStoreWriteSecret, xStoreID, dataTypesIndexConfig, options) {
2467
+ return (0, exports.SDKStoreConfigApiFp)(this.configuration).apiV1StoresXStoreIDConfigPut(xStoreid, xStoreWriteSecret, xStoreID, dataTypesIndexConfig, options).then((request) => request(this.axios, this.basePath));
2468
+ }
2469
+ /**
2470
+ * Get metadata about all configurable fields for store configuration. This is a public API for SDK integration.
2471
+ * @summary Get Store Config Schema (Public SDK API)
2472
+ * @param {string} xStoreid Store ID
2473
+ * @param {string} xStoresecret Store Secret
2474
+ * @param {string} xStoreID X-Store ID (must match x-storeid header)
2475
+ * @param {*} [options] Override http request option.
2476
+ * @throws {RequiredError}
2477
+ */
2478
+ apiV1StoresXStoreIDConfigSchemaGet(xStoreid, xStoresecret, xStoreID, options) {
2479
+ return (0, exports.SDKStoreConfigApiFp)(this.configuration).apiV1StoresXStoreIDConfigSchemaGet(xStoreid, xStoresecret, xStoreID, options).then((request) => request(this.axios, this.basePath));
2480
+ }
2481
+ }
2482
+ exports.SDKStoreConfigApi = SDKStoreConfigApi;
2483
+ /**
2484
+ * SDKStoreCreationApi - axios parameter creator
2485
+ */
2486
+ const SDKStoreCreationApiAxiosParamCreator = function (configuration) {
2487
+ return {
2488
+ /**
2489
+ * 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.
2490
+ * @summary Create Store (Public SDK API)
2491
+ * @param {string} authorization Bearer JWT Token
2492
+ * @param {DataTypesPublicCreateStoreRequest} dataTypesPublicCreateStoreRequest Store creation request
2493
+ * @param {*} [options] Override http request option.
2494
+ * @throws {RequiredError}
2495
+ */
2496
+ apiV1StoresPost: async (authorization, dataTypesPublicCreateStoreRequest, options = {}) => {
2497
+ // verify required parameter 'authorization' is not null or undefined
2498
+ (0, common_1.assertParamExists)('apiV1StoresPost', 'authorization', authorization);
2499
+ // verify required parameter 'dataTypesPublicCreateStoreRequest' is not null or undefined
2500
+ (0, common_1.assertParamExists)('apiV1StoresPost', 'dataTypesPublicCreateStoreRequest', dataTypesPublicCreateStoreRequest);
2501
+ const localVarPath = `/api/v1/stores`;
2502
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2503
+ const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
2504
+ let baseOptions;
2505
+ if (configuration) {
2506
+ baseOptions = configuration.baseOptions;
2507
+ }
2508
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
2509
+ const localVarHeaderParameter = {};
2510
+ const localVarQueryParameter = {};
2511
+ // authentication BearerAuth required
2512
+ await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
2513
+ localVarHeaderParameter['Content-Type'] = 'application/json';
2514
+ localVarHeaderParameter['Accept'] = 'application/json';
2515
+ if (authorization != null) {
2516
+ localVarHeaderParameter['Authorization'] = String(authorization);
2517
+ }
2518
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2519
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2520
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
2521
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(dataTypesPublicCreateStoreRequest, localVarRequestOptions, configuration);
2522
+ return {
2523
+ url: (0, common_1.toPathString)(localVarUrlObj),
2524
+ options: localVarRequestOptions,
2525
+ };
2526
+ },
2527
+ };
2528
+ };
2529
+ exports.SDKStoreCreationApiAxiosParamCreator = SDKStoreCreationApiAxiosParamCreator;
2530
+ /**
2531
+ * SDKStoreCreationApi - functional programming interface
2532
+ */
2533
+ const SDKStoreCreationApiFp = function (configuration) {
2534
+ const localVarAxiosParamCreator = (0, exports.SDKStoreCreationApiAxiosParamCreator)(configuration);
2535
+ return {
2536
+ /**
2537
+ * 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.
2538
+ * @summary Create Store (Public SDK API)
2539
+ * @param {string} authorization Bearer JWT Token
2540
+ * @param {DataTypesPublicCreateStoreRequest} dataTypesPublicCreateStoreRequest Store creation request
2541
+ * @param {*} [options] Override http request option.
2542
+ * @throws {RequiredError}
2543
+ */
2544
+ async apiV1StoresPost(authorization, dataTypesPublicCreateStoreRequest, options) {
2545
+ const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1StoresPost(authorization, dataTypesPublicCreateStoreRequest, options);
2546
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2547
+ const localVarOperationServerBasePath = base_1.operationServerMap['SDKStoreCreationApi.apiV1StoresPost']?.[localVarOperationServerIndex]?.url;
2548
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2549
+ },
2550
+ };
2551
+ };
2552
+ exports.SDKStoreCreationApiFp = SDKStoreCreationApiFp;
2553
+ /**
2554
+ * SDKStoreCreationApi - factory interface
2555
+ */
2556
+ const SDKStoreCreationApiFactory = function (configuration, basePath, axios) {
2557
+ const localVarFp = (0, exports.SDKStoreCreationApiFp)(configuration);
2558
+ return {
2559
+ /**
2560
+ * 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.
2561
+ * @summary Create Store (Public SDK API)
2562
+ * @param {string} authorization Bearer JWT Token
2563
+ * @param {DataTypesPublicCreateStoreRequest} dataTypesPublicCreateStoreRequest Store creation request
2564
+ * @param {*} [options] Override http request option.
2565
+ * @throws {RequiredError}
2566
+ */
2567
+ apiV1StoresPost(authorization, dataTypesPublicCreateStoreRequest, options) {
2568
+ return localVarFp.apiV1StoresPost(authorization, dataTypesPublicCreateStoreRequest, options).then((request) => request(axios, basePath));
2569
+ },
2570
+ };
2571
+ };
2572
+ exports.SDKStoreCreationApiFactory = SDKStoreCreationApiFactory;
2573
+ /**
2574
+ * SDKStoreCreationApi - object-oriented interface
2575
+ */
2576
+ class SDKStoreCreationApi extends base_1.BaseAPI {
2577
+ /**
2578
+ * 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.
2579
+ * @summary Create Store (Public SDK API)
2580
+ * @param {string} authorization Bearer JWT Token
2581
+ * @param {DataTypesPublicCreateStoreRequest} dataTypesPublicCreateStoreRequest Store creation request
2582
+ * @param {*} [options] Override http request option.
2583
+ * @throws {RequiredError}
2584
+ */
2585
+ apiV1StoresPost(authorization, dataTypesPublicCreateStoreRequest, options) {
2586
+ return (0, exports.SDKStoreCreationApiFp)(this.configuration).apiV1StoresPost(authorization, dataTypesPublicCreateStoreRequest, options).then((request) => request(this.axios, this.basePath));
2587
+ }
2588
+ }
2589
+ exports.SDKStoreCreationApi = SDKStoreCreationApi;
2590
+ /**
2591
+ * SDKStoreInfoApi - axios parameter creator
2592
+ */
2593
+ const SDKStoreInfoApiAxiosParamCreator = function (configuration) {
2594
+ return {
2595
+ /**
2596
+ * Retrieves basic store information (name, location, status) using x-store ID and read secret. This is a public API for SDK integration. Uses read secret (x-storesecret).
2597
+ * @summary Get Store Info (Public SDK API)
2598
+ * @param {string} xStoreid Store ID
2599
+ * @param {string} xStoresecret Store Read Secret (for read operations)
2600
+ * @param {string} xStoreID X-Store ID (must match x-storeid header)
2601
+ * @param {*} [options] Override http request option.
2602
+ * @throws {RequiredError}
2603
+ */
2604
+ apiV1StoresXStoreIDGet: async (xStoreid, xStoresecret, xStoreID, options = {}) => {
2605
+ // verify required parameter 'xStoreid' is not null or undefined
2606
+ (0, common_1.assertParamExists)('apiV1StoresXStoreIDGet', 'xStoreid', xStoreid);
2607
+ // verify required parameter 'xStoresecret' is not null or undefined
2608
+ (0, common_1.assertParamExists)('apiV1StoresXStoreIDGet', 'xStoresecret', xStoresecret);
2609
+ // verify required parameter 'xStoreID' is not null or undefined
2610
+ (0, common_1.assertParamExists)('apiV1StoresXStoreIDGet', 'xStoreID', xStoreID);
2611
+ const localVarPath = `/api/v1/stores/{xStoreID}`
2612
+ .replace(`{${"xStoreID"}}`, encodeURIComponent(String(xStoreID)));
2613
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2614
+ const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
2615
+ let baseOptions;
2616
+ if (configuration) {
2617
+ baseOptions = configuration.baseOptions;
2618
+ }
2619
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
2620
+ const localVarHeaderParameter = {};
2621
+ const localVarQueryParameter = {};
2622
+ localVarHeaderParameter['Accept'] = 'application/json';
2623
+ if (xStoreid != null) {
2624
+ localVarHeaderParameter['x-storeid'] = String(xStoreid);
2625
+ }
2626
+ if (xStoresecret != null) {
2627
+ localVarHeaderParameter['x-storesecret'] = String(xStoresecret);
2628
+ }
2629
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2630
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2631
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
2632
+ return {
2633
+ url: (0, common_1.toPathString)(localVarUrlObj),
2634
+ options: localVarRequestOptions,
2635
+ };
2636
+ },
2637
+ };
2638
+ };
2639
+ exports.SDKStoreInfoApiAxiosParamCreator = SDKStoreInfoApiAxiosParamCreator;
2640
+ /**
2641
+ * SDKStoreInfoApi - functional programming interface
2642
+ */
2643
+ const SDKStoreInfoApiFp = function (configuration) {
2644
+ const localVarAxiosParamCreator = (0, exports.SDKStoreInfoApiAxiosParamCreator)(configuration);
2645
+ return {
2646
+ /**
2647
+ * Retrieves basic store information (name, location, status) using x-store ID and read secret. This is a public API for SDK integration. Uses read secret (x-storesecret).
2648
+ * @summary Get Store Info (Public SDK API)
2649
+ * @param {string} xStoreid Store ID
2650
+ * @param {string} xStoresecret Store Read Secret (for read operations)
2651
+ * @param {string} xStoreID X-Store ID (must match x-storeid header)
2652
+ * @param {*} [options] Override http request option.
2653
+ * @throws {RequiredError}
2654
+ */
2655
+ async apiV1StoresXStoreIDGet(xStoreid, xStoresecret, xStoreID, options) {
2656
+ const localVarAxiosArgs = await localVarAxiosParamCreator.apiV1StoresXStoreIDGet(xStoreid, xStoresecret, xStoreID, options);
2657
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2658
+ const localVarOperationServerBasePath = base_1.operationServerMap['SDKStoreInfoApi.apiV1StoresXStoreIDGet']?.[localVarOperationServerIndex]?.url;
2659
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2660
+ },
2661
+ };
2662
+ };
2663
+ exports.SDKStoreInfoApiFp = SDKStoreInfoApiFp;
2664
+ /**
2665
+ * SDKStoreInfoApi - factory interface
2666
+ */
2667
+ const SDKStoreInfoApiFactory = function (configuration, basePath, axios) {
2668
+ const localVarFp = (0, exports.SDKStoreInfoApiFp)(configuration);
2669
+ return {
2670
+ /**
2671
+ * Retrieves basic store information (name, location, status) using x-store ID and read secret. This is a public API for SDK integration. Uses read secret (x-storesecret).
2672
+ * @summary Get Store Info (Public SDK API)
2673
+ * @param {string} xStoreid Store ID
2674
+ * @param {string} xStoresecret Store Read Secret (for read operations)
2675
+ * @param {string} xStoreID X-Store ID (must match x-storeid header)
2676
+ * @param {*} [options] Override http request option.
2677
+ * @throws {RequiredError}
2678
+ */
2679
+ apiV1StoresXStoreIDGet(xStoreid, xStoresecret, xStoreID, options) {
2680
+ return localVarFp.apiV1StoresXStoreIDGet(xStoreid, xStoresecret, xStoreID, options).then((request) => request(axios, basePath));
2681
+ },
2682
+ };
2683
+ };
2684
+ exports.SDKStoreInfoApiFactory = SDKStoreInfoApiFactory;
2685
+ /**
2686
+ * SDKStoreInfoApi - object-oriented interface
2687
+ */
2688
+ class SDKStoreInfoApi extends base_1.BaseAPI {
2689
+ /**
2690
+ * Retrieves basic store information (name, location, status) using x-store ID and read secret. This is a public API for SDK integration. Uses read secret (x-storesecret).
2691
+ * @summary Get Store Info (Public SDK API)
2692
+ * @param {string} xStoreid Store ID
2693
+ * @param {string} xStoresecret Store Read Secret (for read operations)
2694
+ * @param {string} xStoreID X-Store ID (must match x-storeid header)
2695
+ * @param {*} [options] Override http request option.
2696
+ * @throws {RequiredError}
2697
+ */
2698
+ apiV1StoresXStoreIDGet(xStoreid, xStoresecret, xStoreID, options) {
2699
+ return (0, exports.SDKStoreInfoApiFp)(this.configuration).apiV1StoresXStoreIDGet(xStoreid, xStoresecret, xStoreID, options).then((request) => request(this.axios, this.basePath));
2700
+ }
2701
+ }
2702
+ exports.SDKStoreInfoApi = SDKStoreInfoApi;
2703
+ /**
2704
+ * SearchApi - axios parameter creator
2705
+ */
2706
+ const SearchApiAxiosParamCreator = function (configuration) {
2707
+ return {
2708
+ /**
2709
+ * Search documents using store credentials with optional autocomplete suggestions and configurable stopwords/synonyms. Supports personalization via x-user-id, x-anon-id, x-session-id headers.
2710
+ * @summary Public Search API
2711
+ * @param {string} xStoreid Store ID
2712
+ * @param {string} xStoresecret Store Secret
2713
+ * @param {DataTypesPublicSearchRequest} dataTypesPublicSearchRequest Search request with optional stopword_sets and synonym_sets for granular control
2714
+ * @param {string} [xUserId] User ID for personalization (logged-in user)
2715
+ * @param {string} [xAnonId] Anonymous ID for personalization (cookie/device ID)
2716
+ * @param {string} [xSessionId] Session ID for personalization
2717
+ * @param {*} [options] Override http request option.
2718
+ * @throws {RequiredError}
2719
+ */
2720
+ v1SearchPost: async (xStoreid, xStoresecret, dataTypesPublicSearchRequest, xUserId, xAnonId, xSessionId, options = {}) => {
2721
+ // verify required parameter 'xStoreid' is not null or undefined
2722
+ (0, common_1.assertParamExists)('v1SearchPost', 'xStoreid', xStoreid);
2723
+ // verify required parameter 'xStoresecret' is not null or undefined
2724
+ (0, common_1.assertParamExists)('v1SearchPost', 'xStoresecret', xStoresecret);
2725
+ // verify required parameter 'dataTypesPublicSearchRequest' is not null or undefined
2726
+ (0, common_1.assertParamExists)('v1SearchPost', 'dataTypesPublicSearchRequest', dataTypesPublicSearchRequest);
2727
+ const localVarPath = `/v1/search`;
2728
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2729
+ const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
2730
+ let baseOptions;
2731
+ if (configuration) {
2732
+ baseOptions = configuration.baseOptions;
2733
+ }
2734
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
2735
+ const localVarHeaderParameter = {};
2736
+ const localVarQueryParameter = {};
2737
+ localVarHeaderParameter['Content-Type'] = 'application/json';
2738
+ localVarHeaderParameter['Accept'] = 'application/json';
2739
+ if (xStoreid != null) {
2740
+ localVarHeaderParameter['x-storeid'] = String(xStoreid);
2741
+ }
2742
+ if (xStoresecret != null) {
2743
+ localVarHeaderParameter['x-storesecret'] = String(xStoresecret);
2744
+ }
2745
+ if (xUserId != null) {
2746
+ localVarHeaderParameter['x-user-id'] = String(xUserId);
2747
+ }
2748
+ if (xAnonId != null) {
2749
+ localVarHeaderParameter['x-anon-id'] = String(xAnonId);
2750
+ }
2751
+ if (xSessionId != null) {
2752
+ localVarHeaderParameter['x-session-id'] = String(xSessionId);
2753
+ }
2754
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2755
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2756
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
2757
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(dataTypesPublicSearchRequest, localVarRequestOptions, configuration);
2758
+ return {
2759
+ url: (0, common_1.toPathString)(localVarUrlObj),
2760
+ options: localVarRequestOptions,
2761
+ };
2762
+ },
2763
+ };
2764
+ };
2765
+ exports.SearchApiAxiosParamCreator = SearchApiAxiosParamCreator;
2766
+ /**
2767
+ * SearchApi - functional programming interface
2768
+ */
2769
+ const SearchApiFp = function (configuration) {
2770
+ const localVarAxiosParamCreator = (0, exports.SearchApiAxiosParamCreator)(configuration);
2771
+ return {
2772
+ /**
2773
+ * Search documents using store credentials with optional autocomplete suggestions and configurable stopwords/synonyms. Supports personalization via x-user-id, x-anon-id, x-session-id headers.
2774
+ * @summary Public Search API
2775
+ * @param {string} xStoreid Store ID
2776
+ * @param {string} xStoresecret Store Secret
2777
+ * @param {DataTypesPublicSearchRequest} dataTypesPublicSearchRequest Search request with optional stopword_sets and synonym_sets for granular control
2778
+ * @param {string} [xUserId] User ID for personalization (logged-in user)
2779
+ * @param {string} [xAnonId] Anonymous ID for personalization (cookie/device ID)
2780
+ * @param {string} [xSessionId] Session ID for personalization
2781
+ * @param {*} [options] Override http request option.
2782
+ * @throws {RequiredError}
2783
+ */
2784
+ async v1SearchPost(xStoreid, xStoresecret, dataTypesPublicSearchRequest, xUserId, xAnonId, xSessionId, options) {
2785
+ const localVarAxiosArgs = await localVarAxiosParamCreator.v1SearchPost(xStoreid, xStoresecret, dataTypesPublicSearchRequest, xUserId, xAnonId, xSessionId, options);
2786
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2787
+ const localVarOperationServerBasePath = base_1.operationServerMap['SearchApi.v1SearchPost']?.[localVarOperationServerIndex]?.url;
2788
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2789
+ },
2790
+ };
2791
+ };
2792
+ exports.SearchApiFp = SearchApiFp;
2793
+ /**
2794
+ * SearchApi - factory interface
2795
+ */
2796
+ const SearchApiFactory = function (configuration, basePath, axios) {
2797
+ const localVarFp = (0, exports.SearchApiFp)(configuration);
2798
+ return {
2799
+ /**
2800
+ * Search documents using store credentials with optional autocomplete suggestions and configurable stopwords/synonyms. Supports personalization via x-user-id, x-anon-id, x-session-id headers.
2801
+ * @summary Public Search API
2802
+ * @param {string} xStoreid Store ID
2803
+ * @param {string} xStoresecret Store Secret
2804
+ * @param {DataTypesPublicSearchRequest} dataTypesPublicSearchRequest Search request with optional stopword_sets and synonym_sets for granular control
2805
+ * @param {string} [xUserId] User ID for personalization (logged-in user)
2806
+ * @param {string} [xAnonId] Anonymous ID for personalization (cookie/device ID)
2807
+ * @param {string} [xSessionId] Session ID for personalization
2808
+ * @param {*} [options] Override http request option.
2809
+ * @throws {RequiredError}
2810
+ */
2811
+ v1SearchPost(xStoreid, xStoresecret, dataTypesPublicSearchRequest, xUserId, xAnonId, xSessionId, options) {
2812
+ return localVarFp.v1SearchPost(xStoreid, xStoresecret, dataTypesPublicSearchRequest, xUserId, xAnonId, xSessionId, options).then((request) => request(axios, basePath));
2813
+ },
2814
+ };
2815
+ };
2816
+ exports.SearchApiFactory = SearchApiFactory;
2817
+ /**
2818
+ * SearchApi - object-oriented interface
2819
+ */
2820
+ class SearchApi extends base_1.BaseAPI {
2821
+ /**
2822
+ * Search documents using store credentials with optional autocomplete suggestions and configurable stopwords/synonyms. Supports personalization via x-user-id, x-anon-id, x-session-id headers.
2823
+ * @summary Public Search API
2824
+ * @param {string} xStoreid Store ID
2825
+ * @param {string} xStoresecret Store Secret
2826
+ * @param {DataTypesPublicSearchRequest} dataTypesPublicSearchRequest Search request with optional stopword_sets and synonym_sets for granular control
2827
+ * @param {string} [xUserId] User ID for personalization (logged-in user)
2828
+ * @param {string} [xAnonId] Anonymous ID for personalization (cookie/device ID)
2829
+ * @param {string} [xSessionId] Session ID for personalization
2830
+ * @param {*} [options] Override http request option.
2831
+ * @throws {RequiredError}
2832
+ */
2833
+ v1SearchPost(xStoreid, xStoresecret, dataTypesPublicSearchRequest, xUserId, xAnonId, xSessionId, options) {
2834
+ return (0, exports.SearchApiFp)(this.configuration).v1SearchPost(xStoreid, xStoresecret, dataTypesPublicSearchRequest, xUserId, xAnonId, xSessionId, options).then((request) => request(this.axios, this.basePath));
2835
+ }
2836
+ }
2837
+ exports.SearchApi = SearchApi;