hey-pharmacist-ecommerce 1.1.43 → 1.1.44
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +2341 -888
- package/dist/index.d.ts +2341 -888
- package/dist/index.js +539 -393
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +538 -393
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/AccountReviewsTab.tsx +4 -4
- package/src/components/Header.tsx +1 -1
- package/src/components/OrderCard.tsx +1 -1
- package/src/components/ProductCard.tsx +1 -1
- package/src/components/RatingDistribution.tsx +2 -2
- package/src/components/ReviewForm.tsx +3 -3
- package/src/components/ReviewPromptBanner.tsx +4 -4
- package/src/components/ReviewsList.tsx +9 -11
- package/src/components/StarRating.tsx +3 -3
- package/src/hooks/useProducts.ts +0 -1
- package/src/hooks/useSmartSearch.ts +68 -0
- package/src/lib/Apis/api.ts +1 -0
- package/src/lib/Apis/apis/analytics-api.ts +809 -0
- package/src/lib/Apis/apis/notifications-api.ts +8 -6
- package/src/lib/Apis/apis/products-api.ts +390 -15
- package/src/lib/Apis/apis/stores-api.ts +26 -149
- package/src/lib/Apis/apis/web-hooks-api.ts +8 -17
- package/src/lib/Apis/models/analytics-period-dto.ts +45 -0
- package/src/lib/Apis/models/appointment-overview-dto.ts +71 -0
- package/src/lib/Apis/models/{api-key-info-dto.ts → category-sales-dto.ts} +24 -22
- package/src/lib/Apis/models/create-store-dto.ts +12 -0
- package/src/lib/Apis/models/customer-overview-dto.ts +96 -0
- package/src/lib/Apis/models/customer-segment-dto.ts +39 -0
- package/src/lib/Apis/models/dashboard-overview-dto.ts +70 -0
- package/src/lib/Apis/models/discount-overview-dto.ts +71 -0
- package/src/lib/Apis/models/index.ts +29 -3
- package/src/lib/Apis/models/inline-response200.ts +34 -0
- package/src/lib/Apis/models/{store-api-keys-response-dto.ts → inline-response2001.ts} +14 -9
- package/src/lib/Apis/models/inventory-alert-dto.ts +67 -0
- package/src/lib/Apis/models/notification-dto.ts +107 -0
- package/src/lib/Apis/models/notifications-paginated-response-dto.ts +58 -0
- package/src/lib/Apis/models/order-overview-dto.ts +89 -0
- package/src/lib/Apis/models/{update-api-keys-dto.ts → order-status-count-dto.ts} +13 -13
- package/src/lib/Apis/models/payout-history-item-dto.ts +45 -0
- package/src/lib/Apis/models/popular-time-slot-dto.ts +39 -0
- package/src/lib/Apis/models/product-overview-dto.ts +90 -0
- package/src/lib/Apis/models/product.ts +6 -0
- package/src/lib/Apis/models/products-aidraft-body.ts +27 -0
- package/src/lib/Apis/models/products-processimage-body.ts +27 -0
- package/src/lib/Apis/models/rating-distribution-dto.ts +39 -0
- package/src/lib/Apis/models/recent-review-dto.ts +63 -0
- package/src/lib/Apis/models/review-overview-dto.ts +65 -0
- package/src/lib/Apis/models/store-balance-dto.ts +39 -0
- package/src/lib/Apis/models/store-entity.ts +12 -0
- package/src/lib/Apis/models/store-finance-overview-dto.ts +35 -0
- package/src/lib/Apis/models/store.ts +12 -0
- package/src/lib/Apis/models/time-series-point-dto.ts +33 -0
- package/src/lib/Apis/models/top-customer-dto.ts +57 -0
- package/src/lib/Apis/models/top-discount-dto.ts +51 -0
- package/src/lib/Apis/models/top-product-dto.ts +51 -0
- package/src/lib/Apis/models/unread-count-dto.ts +27 -0
- package/src/lib/Apis/models/update-store-dto.ts +12 -0
- package/src/screens/OrderReviewsScreen.tsx +6 -6
- package/src/screens/ProductDetailScreen.tsx +1 -1
- package/src/screens/SearchResultsScreen.tsx +17 -21
- package/src/screens/ShopScreen.tsx +0 -62
|
@@ -0,0 +1,809 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Hey Pharamcist API
|
|
5
|
+
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
|
6
|
+
*
|
|
7
|
+
* OpenAPI spec version: 1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by the swagger code generator program.
|
|
11
|
+
* https://github.com/swagger-api/swagger-codegen.git
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
import globalAxios, { AxiosResponse, AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
15
|
+
import { Configuration } from '../configuration';
|
|
16
|
+
// Some imports not used depending on template conditions
|
|
17
|
+
// @ts-ignore
|
|
18
|
+
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
|
|
19
|
+
import { AppointmentOverviewDto } from '../models';
|
|
20
|
+
import { CustomerOverviewDto } from '../models';
|
|
21
|
+
import { DashboardOverviewDto } from '../models';
|
|
22
|
+
import { DiscountOverviewDto } from '../models';
|
|
23
|
+
import { OrderOverviewDto } from '../models';
|
|
24
|
+
import { ProductOverviewDto } from '../models';
|
|
25
|
+
import { ReviewOverviewDto } from '../models';
|
|
26
|
+
/**
|
|
27
|
+
* AnalyticsApi - axios parameter creator
|
|
28
|
+
* @export
|
|
29
|
+
*/
|
|
30
|
+
export const AnalyticsApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
31
|
+
return {
|
|
32
|
+
/**
|
|
33
|
+
* Booking stats, popular time slots, and cancellation rates.
|
|
34
|
+
* @summary Get appointment analytics
|
|
35
|
+
* @param {string} [startDate] Start date (ISO 8601)
|
|
36
|
+
* @param {string} [endDate] End date (ISO 8601)
|
|
37
|
+
* @param {boolean} [compareWithPrevious] Enable comparison with previous period
|
|
38
|
+
* @param {*} [options] Override http request option.
|
|
39
|
+
* @throws {RequiredError}
|
|
40
|
+
*/
|
|
41
|
+
getAppointmentAnalytics: async (startDate?: string, endDate?: string, compareWithPrevious?: boolean, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
42
|
+
const localVarPath = `/analytics/appointments`;
|
|
43
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
44
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
45
|
+
let baseOptions;
|
|
46
|
+
if (configuration) {
|
|
47
|
+
baseOptions = configuration.baseOptions;
|
|
48
|
+
}
|
|
49
|
+
const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
|
|
50
|
+
const localVarHeaderParameter = {} as any;
|
|
51
|
+
const localVarQueryParameter = {} as any;
|
|
52
|
+
|
|
53
|
+
// authentication bearer required
|
|
54
|
+
// http bearer authentication required
|
|
55
|
+
if (configuration && configuration.accessToken) {
|
|
56
|
+
const accessToken = typeof configuration.accessToken === 'function'
|
|
57
|
+
? await configuration.accessToken()
|
|
58
|
+
: await configuration.accessToken;
|
|
59
|
+
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// authentication x-store-key required
|
|
63
|
+
if (configuration && configuration.apiKey) {
|
|
64
|
+
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
65
|
+
? await configuration.apiKey("x-store-key")
|
|
66
|
+
: await configuration.apiKey;
|
|
67
|
+
localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
if (startDate !== undefined) {
|
|
71
|
+
localVarQueryParameter['startDate'] = startDate;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
if (endDate !== undefined) {
|
|
75
|
+
localVarQueryParameter['endDate'] = endDate;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
if (compareWithPrevious !== undefined) {
|
|
79
|
+
localVarQueryParameter['compareWithPrevious'] = compareWithPrevious;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
83
|
+
for (const key in localVarQueryParameter) {
|
|
84
|
+
query.set(key, localVarQueryParameter[key]);
|
|
85
|
+
}
|
|
86
|
+
for (const key in options.params) {
|
|
87
|
+
query.set(key, options.params[key]);
|
|
88
|
+
}
|
|
89
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
90
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
91
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
92
|
+
|
|
93
|
+
return {
|
|
94
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
95
|
+
options: localVarRequestOptions,
|
|
96
|
+
};
|
|
97
|
+
},
|
|
98
|
+
/**
|
|
99
|
+
* Customer segmentation, acquisition trends, LTV, and top spenders.
|
|
100
|
+
* @summary Get customer analytics
|
|
101
|
+
* @param {string} [startDate] Start date (ISO 8601)
|
|
102
|
+
* @param {string} [endDate] End date (ISO 8601)
|
|
103
|
+
* @param {boolean} [compareWithPrevious] Enable comparison with previous period
|
|
104
|
+
* @param {*} [options] Override http request option.
|
|
105
|
+
* @throws {RequiredError}
|
|
106
|
+
*/
|
|
107
|
+
getCustomerAnalytics: async (startDate?: string, endDate?: string, compareWithPrevious?: boolean, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
108
|
+
const localVarPath = `/analytics/customers`;
|
|
109
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
110
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
111
|
+
let baseOptions;
|
|
112
|
+
if (configuration) {
|
|
113
|
+
baseOptions = configuration.baseOptions;
|
|
114
|
+
}
|
|
115
|
+
const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
|
|
116
|
+
const localVarHeaderParameter = {} as any;
|
|
117
|
+
const localVarQueryParameter = {} as any;
|
|
118
|
+
|
|
119
|
+
// authentication bearer required
|
|
120
|
+
// http bearer authentication required
|
|
121
|
+
if (configuration && configuration.accessToken) {
|
|
122
|
+
const accessToken = typeof configuration.accessToken === 'function'
|
|
123
|
+
? await configuration.accessToken()
|
|
124
|
+
: await configuration.accessToken;
|
|
125
|
+
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
// authentication x-store-key required
|
|
129
|
+
if (configuration && configuration.apiKey) {
|
|
130
|
+
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
131
|
+
? await configuration.apiKey("x-store-key")
|
|
132
|
+
: await configuration.apiKey;
|
|
133
|
+
localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
if (startDate !== undefined) {
|
|
137
|
+
localVarQueryParameter['startDate'] = startDate;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
if (endDate !== undefined) {
|
|
141
|
+
localVarQueryParameter['endDate'] = endDate;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
if (compareWithPrevious !== undefined) {
|
|
145
|
+
localVarQueryParameter['compareWithPrevious'] = compareWithPrevious;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
149
|
+
for (const key in localVarQueryParameter) {
|
|
150
|
+
query.set(key, localVarQueryParameter[key]);
|
|
151
|
+
}
|
|
152
|
+
for (const key in options.params) {
|
|
153
|
+
query.set(key, options.params[key]);
|
|
154
|
+
}
|
|
155
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
156
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
157
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
158
|
+
|
|
159
|
+
return {
|
|
160
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
161
|
+
options: localVarRequestOptions,
|
|
162
|
+
};
|
|
163
|
+
},
|
|
164
|
+
/**
|
|
165
|
+
* Returns comprehensive analytics overview including orders, customers, products, appointments, discounts, and reviews.
|
|
166
|
+
* @summary Get complete dashboard analytics
|
|
167
|
+
* @param {string} [startDate] Start date (ISO 8601)
|
|
168
|
+
* @param {string} [endDate] End date (ISO 8601)
|
|
169
|
+
* @param {boolean} [compareWithPrevious] Enable comparison with previous period
|
|
170
|
+
* @param {*} [options] Override http request option.
|
|
171
|
+
* @throws {RequiredError}
|
|
172
|
+
*/
|
|
173
|
+
getDashboardOverview: async (startDate?: string, endDate?: string, compareWithPrevious?: boolean, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
174
|
+
const localVarPath = `/analytics/dashboard`;
|
|
175
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
176
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
177
|
+
let baseOptions;
|
|
178
|
+
if (configuration) {
|
|
179
|
+
baseOptions = configuration.baseOptions;
|
|
180
|
+
}
|
|
181
|
+
const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
|
|
182
|
+
const localVarHeaderParameter = {} as any;
|
|
183
|
+
const localVarQueryParameter = {} as any;
|
|
184
|
+
|
|
185
|
+
// authentication bearer required
|
|
186
|
+
// http bearer authentication required
|
|
187
|
+
if (configuration && configuration.accessToken) {
|
|
188
|
+
const accessToken = typeof configuration.accessToken === 'function'
|
|
189
|
+
? await configuration.accessToken()
|
|
190
|
+
: await configuration.accessToken;
|
|
191
|
+
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
// authentication x-store-key required
|
|
195
|
+
if (configuration && configuration.apiKey) {
|
|
196
|
+
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
197
|
+
? await configuration.apiKey("x-store-key")
|
|
198
|
+
: await configuration.apiKey;
|
|
199
|
+
localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
if (startDate !== undefined) {
|
|
203
|
+
localVarQueryParameter['startDate'] = startDate;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
if (endDate !== undefined) {
|
|
207
|
+
localVarQueryParameter['endDate'] = endDate;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
if (compareWithPrevious !== undefined) {
|
|
211
|
+
localVarQueryParameter['compareWithPrevious'] = compareWithPrevious;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
215
|
+
for (const key in localVarQueryParameter) {
|
|
216
|
+
query.set(key, localVarQueryParameter[key]);
|
|
217
|
+
}
|
|
218
|
+
for (const key in options.params) {
|
|
219
|
+
query.set(key, options.params[key]);
|
|
220
|
+
}
|
|
221
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
222
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
223
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
224
|
+
|
|
225
|
+
return {
|
|
226
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
227
|
+
options: localVarRequestOptions,
|
|
228
|
+
};
|
|
229
|
+
},
|
|
230
|
+
/**
|
|
231
|
+
* Discount usage, top codes, and redemption trends.
|
|
232
|
+
* @summary Get discount analytics
|
|
233
|
+
* @param {string} [startDate] Start date (ISO 8601)
|
|
234
|
+
* @param {string} [endDate] End date (ISO 8601)
|
|
235
|
+
* @param {boolean} [compareWithPrevious] Enable comparison with previous period
|
|
236
|
+
* @param {*} [options] Override http request option.
|
|
237
|
+
* @throws {RequiredError}
|
|
238
|
+
*/
|
|
239
|
+
getDiscountAnalytics: async (startDate?: string, endDate?: string, compareWithPrevious?: boolean, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
240
|
+
const localVarPath = `/analytics/discounts`;
|
|
241
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
242
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
243
|
+
let baseOptions;
|
|
244
|
+
if (configuration) {
|
|
245
|
+
baseOptions = configuration.baseOptions;
|
|
246
|
+
}
|
|
247
|
+
const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
|
|
248
|
+
const localVarHeaderParameter = {} as any;
|
|
249
|
+
const localVarQueryParameter = {} as any;
|
|
250
|
+
|
|
251
|
+
// authentication bearer required
|
|
252
|
+
// http bearer authentication required
|
|
253
|
+
if (configuration && configuration.accessToken) {
|
|
254
|
+
const accessToken = typeof configuration.accessToken === 'function'
|
|
255
|
+
? await configuration.accessToken()
|
|
256
|
+
: await configuration.accessToken;
|
|
257
|
+
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
// authentication x-store-key required
|
|
261
|
+
if (configuration && configuration.apiKey) {
|
|
262
|
+
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
263
|
+
? await configuration.apiKey("x-store-key")
|
|
264
|
+
: await configuration.apiKey;
|
|
265
|
+
localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
if (startDate !== undefined) {
|
|
269
|
+
localVarQueryParameter['startDate'] = startDate;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
if (endDate !== undefined) {
|
|
273
|
+
localVarQueryParameter['endDate'] = endDate;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
if (compareWithPrevious !== undefined) {
|
|
277
|
+
localVarQueryParameter['compareWithPrevious'] = compareWithPrevious;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
281
|
+
for (const key in localVarQueryParameter) {
|
|
282
|
+
query.set(key, localVarQueryParameter[key]);
|
|
283
|
+
}
|
|
284
|
+
for (const key in options.params) {
|
|
285
|
+
query.set(key, options.params[key]);
|
|
286
|
+
}
|
|
287
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
288
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
289
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
290
|
+
|
|
291
|
+
return {
|
|
292
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
293
|
+
options: localVarRequestOptions,
|
|
294
|
+
};
|
|
295
|
+
},
|
|
296
|
+
/**
|
|
297
|
+
* Order status breakdown, fulfillment times, and order trends.
|
|
298
|
+
* @summary Get order analytics
|
|
299
|
+
* @param {string} [startDate] Start date (ISO 8601)
|
|
300
|
+
* @param {string} [endDate] End date (ISO 8601)
|
|
301
|
+
* @param {boolean} [compareWithPrevious] Enable comparison with previous period
|
|
302
|
+
* @param {*} [options] Override http request option.
|
|
303
|
+
* @throws {RequiredError}
|
|
304
|
+
*/
|
|
305
|
+
getOrderAnalytics: async (startDate?: string, endDate?: string, compareWithPrevious?: boolean, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
306
|
+
const localVarPath = `/analytics/orders`;
|
|
307
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
308
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
309
|
+
let baseOptions;
|
|
310
|
+
if (configuration) {
|
|
311
|
+
baseOptions = configuration.baseOptions;
|
|
312
|
+
}
|
|
313
|
+
const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
|
|
314
|
+
const localVarHeaderParameter = {} as any;
|
|
315
|
+
const localVarQueryParameter = {} as any;
|
|
316
|
+
|
|
317
|
+
// authentication bearer required
|
|
318
|
+
// http bearer authentication required
|
|
319
|
+
if (configuration && configuration.accessToken) {
|
|
320
|
+
const accessToken = typeof configuration.accessToken === 'function'
|
|
321
|
+
? await configuration.accessToken()
|
|
322
|
+
: await configuration.accessToken;
|
|
323
|
+
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
// authentication x-store-key required
|
|
327
|
+
if (configuration && configuration.apiKey) {
|
|
328
|
+
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
329
|
+
? await configuration.apiKey("x-store-key")
|
|
330
|
+
: await configuration.apiKey;
|
|
331
|
+
localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
if (startDate !== undefined) {
|
|
335
|
+
localVarQueryParameter['startDate'] = startDate;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
if (endDate !== undefined) {
|
|
339
|
+
localVarQueryParameter['endDate'] = endDate;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
if (compareWithPrevious !== undefined) {
|
|
343
|
+
localVarQueryParameter['compareWithPrevious'] = compareWithPrevious;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
347
|
+
for (const key in localVarQueryParameter) {
|
|
348
|
+
query.set(key, localVarQueryParameter[key]);
|
|
349
|
+
}
|
|
350
|
+
for (const key in options.params) {
|
|
351
|
+
query.set(key, options.params[key]);
|
|
352
|
+
}
|
|
353
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
354
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
355
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
356
|
+
|
|
357
|
+
return {
|
|
358
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
359
|
+
options: localVarRequestOptions,
|
|
360
|
+
};
|
|
361
|
+
},
|
|
362
|
+
/**
|
|
363
|
+
* Top sellers, inventory alerts, and category breakdown.
|
|
364
|
+
* @summary Get product analytics
|
|
365
|
+
* @param {string} [startDate] Start date (ISO 8601)
|
|
366
|
+
* @param {string} [endDate] End date (ISO 8601)
|
|
367
|
+
* @param {boolean} [compareWithPrevious] Enable comparison with previous period
|
|
368
|
+
* @param {*} [options] Override http request option.
|
|
369
|
+
* @throws {RequiredError}
|
|
370
|
+
*/
|
|
371
|
+
getProductAnalytics: async (startDate?: string, endDate?: string, compareWithPrevious?: boolean, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
372
|
+
const localVarPath = `/analytics/products`;
|
|
373
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
374
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
375
|
+
let baseOptions;
|
|
376
|
+
if (configuration) {
|
|
377
|
+
baseOptions = configuration.baseOptions;
|
|
378
|
+
}
|
|
379
|
+
const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
|
|
380
|
+
const localVarHeaderParameter = {} as any;
|
|
381
|
+
const localVarQueryParameter = {} as any;
|
|
382
|
+
|
|
383
|
+
// authentication bearer required
|
|
384
|
+
// http bearer authentication required
|
|
385
|
+
if (configuration && configuration.accessToken) {
|
|
386
|
+
const accessToken = typeof configuration.accessToken === 'function'
|
|
387
|
+
? await configuration.accessToken()
|
|
388
|
+
: await configuration.accessToken;
|
|
389
|
+
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
// authentication x-store-key required
|
|
393
|
+
if (configuration && configuration.apiKey) {
|
|
394
|
+
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
395
|
+
? await configuration.apiKey("x-store-key")
|
|
396
|
+
: await configuration.apiKey;
|
|
397
|
+
localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
if (startDate !== undefined) {
|
|
401
|
+
localVarQueryParameter['startDate'] = startDate;
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
if (endDate !== undefined) {
|
|
405
|
+
localVarQueryParameter['endDate'] = endDate;
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
if (compareWithPrevious !== undefined) {
|
|
409
|
+
localVarQueryParameter['compareWithPrevious'] = compareWithPrevious;
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
413
|
+
for (const key in localVarQueryParameter) {
|
|
414
|
+
query.set(key, localVarQueryParameter[key]);
|
|
415
|
+
}
|
|
416
|
+
for (const key in options.params) {
|
|
417
|
+
query.set(key, options.params[key]);
|
|
418
|
+
}
|
|
419
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
420
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
421
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
422
|
+
|
|
423
|
+
return {
|
|
424
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
425
|
+
options: localVarRequestOptions,
|
|
426
|
+
};
|
|
427
|
+
},
|
|
428
|
+
/**
|
|
429
|
+
* Rating distribution, recent reviews, and review trends.
|
|
430
|
+
* @summary Get review analytics
|
|
431
|
+
* @param {string} [startDate] Start date (ISO 8601)
|
|
432
|
+
* @param {string} [endDate] End date (ISO 8601)
|
|
433
|
+
* @param {boolean} [compareWithPrevious] Enable comparison with previous period
|
|
434
|
+
* @param {*} [options] Override http request option.
|
|
435
|
+
* @throws {RequiredError}
|
|
436
|
+
*/
|
|
437
|
+
getReviewAnalytics: async (startDate?: string, endDate?: string, compareWithPrevious?: boolean, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
438
|
+
const localVarPath = `/analytics/reviews`;
|
|
439
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
440
|
+
const localVarUrlObj = new URL(localVarPath, 'https://example.com');
|
|
441
|
+
let baseOptions;
|
|
442
|
+
if (configuration) {
|
|
443
|
+
baseOptions = configuration.baseOptions;
|
|
444
|
+
}
|
|
445
|
+
const localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
|
|
446
|
+
const localVarHeaderParameter = {} as any;
|
|
447
|
+
const localVarQueryParameter = {} as any;
|
|
448
|
+
|
|
449
|
+
// authentication bearer required
|
|
450
|
+
// http bearer authentication required
|
|
451
|
+
if (configuration && configuration.accessToken) {
|
|
452
|
+
const accessToken = typeof configuration.accessToken === 'function'
|
|
453
|
+
? await configuration.accessToken()
|
|
454
|
+
: await configuration.accessToken;
|
|
455
|
+
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
// authentication x-store-key required
|
|
459
|
+
if (configuration && configuration.apiKey) {
|
|
460
|
+
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
461
|
+
? await configuration.apiKey("x-store-key")
|
|
462
|
+
: await configuration.apiKey;
|
|
463
|
+
localVarHeaderParameter["x-store-key"] = localVarApiKeyValue;
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
if (startDate !== undefined) {
|
|
467
|
+
localVarQueryParameter['startDate'] = startDate;
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
if (endDate !== undefined) {
|
|
471
|
+
localVarQueryParameter['endDate'] = endDate;
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
if (compareWithPrevious !== undefined) {
|
|
475
|
+
localVarQueryParameter['compareWithPrevious'] = compareWithPrevious;
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
const query = new URLSearchParams(localVarUrlObj.search);
|
|
479
|
+
for (const key in localVarQueryParameter) {
|
|
480
|
+
query.set(key, localVarQueryParameter[key]);
|
|
481
|
+
}
|
|
482
|
+
for (const key in options.params) {
|
|
483
|
+
query.set(key, options.params[key]);
|
|
484
|
+
}
|
|
485
|
+
localVarUrlObj.search = (new URLSearchParams(query)).toString();
|
|
486
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
487
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
488
|
+
|
|
489
|
+
return {
|
|
490
|
+
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
|
491
|
+
options: localVarRequestOptions,
|
|
492
|
+
};
|
|
493
|
+
},
|
|
494
|
+
}
|
|
495
|
+
};
|
|
496
|
+
|
|
497
|
+
/**
|
|
498
|
+
* AnalyticsApi - functional programming interface
|
|
499
|
+
* @export
|
|
500
|
+
*/
|
|
501
|
+
export const AnalyticsApiFp = function(configuration?: Configuration) {
|
|
502
|
+
return {
|
|
503
|
+
/**
|
|
504
|
+
* Booking stats, popular time slots, and cancellation rates.
|
|
505
|
+
* @summary Get appointment analytics
|
|
506
|
+
* @param {string} [startDate] Start date (ISO 8601)
|
|
507
|
+
* @param {string} [endDate] End date (ISO 8601)
|
|
508
|
+
* @param {boolean} [compareWithPrevious] Enable comparison with previous period
|
|
509
|
+
* @param {*} [options] Override http request option.
|
|
510
|
+
* @throws {RequiredError}
|
|
511
|
+
*/
|
|
512
|
+
async getAppointmentAnalytics(startDate?: string, endDate?: string, compareWithPrevious?: boolean, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AppointmentOverviewDto>>> {
|
|
513
|
+
const localVarAxiosArgs = await AnalyticsApiAxiosParamCreator(configuration).getAppointmentAnalytics(startDate, endDate, compareWithPrevious, options);
|
|
514
|
+
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
515
|
+
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
|
516
|
+
return axios.request(axiosRequestArgs);
|
|
517
|
+
};
|
|
518
|
+
},
|
|
519
|
+
/**
|
|
520
|
+
* Customer segmentation, acquisition trends, LTV, and top spenders.
|
|
521
|
+
* @summary Get customer analytics
|
|
522
|
+
* @param {string} [startDate] Start date (ISO 8601)
|
|
523
|
+
* @param {string} [endDate] End date (ISO 8601)
|
|
524
|
+
* @param {boolean} [compareWithPrevious] Enable comparison with previous period
|
|
525
|
+
* @param {*} [options] Override http request option.
|
|
526
|
+
* @throws {RequiredError}
|
|
527
|
+
*/
|
|
528
|
+
async getCustomerAnalytics(startDate?: string, endDate?: string, compareWithPrevious?: boolean, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<CustomerOverviewDto>>> {
|
|
529
|
+
const localVarAxiosArgs = await AnalyticsApiAxiosParamCreator(configuration).getCustomerAnalytics(startDate, endDate, compareWithPrevious, options);
|
|
530
|
+
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
531
|
+
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
|
532
|
+
return axios.request(axiosRequestArgs);
|
|
533
|
+
};
|
|
534
|
+
},
|
|
535
|
+
/**
|
|
536
|
+
* Returns comprehensive analytics overview including orders, customers, products, appointments, discounts, and reviews.
|
|
537
|
+
* @summary Get complete dashboard analytics
|
|
538
|
+
* @param {string} [startDate] Start date (ISO 8601)
|
|
539
|
+
* @param {string} [endDate] End date (ISO 8601)
|
|
540
|
+
* @param {boolean} [compareWithPrevious] Enable comparison with previous period
|
|
541
|
+
* @param {*} [options] Override http request option.
|
|
542
|
+
* @throws {RequiredError}
|
|
543
|
+
*/
|
|
544
|
+
async getDashboardOverview(startDate?: string, endDate?: string, compareWithPrevious?: boolean, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<DashboardOverviewDto>>> {
|
|
545
|
+
const localVarAxiosArgs = await AnalyticsApiAxiosParamCreator(configuration).getDashboardOverview(startDate, endDate, compareWithPrevious, options);
|
|
546
|
+
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
547
|
+
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
|
548
|
+
return axios.request(axiosRequestArgs);
|
|
549
|
+
};
|
|
550
|
+
},
|
|
551
|
+
/**
|
|
552
|
+
* Discount usage, top codes, and redemption trends.
|
|
553
|
+
* @summary Get discount analytics
|
|
554
|
+
* @param {string} [startDate] Start date (ISO 8601)
|
|
555
|
+
* @param {string} [endDate] End date (ISO 8601)
|
|
556
|
+
* @param {boolean} [compareWithPrevious] Enable comparison with previous period
|
|
557
|
+
* @param {*} [options] Override http request option.
|
|
558
|
+
* @throws {RequiredError}
|
|
559
|
+
*/
|
|
560
|
+
async getDiscountAnalytics(startDate?: string, endDate?: string, compareWithPrevious?: boolean, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<DiscountOverviewDto>>> {
|
|
561
|
+
const localVarAxiosArgs = await AnalyticsApiAxiosParamCreator(configuration).getDiscountAnalytics(startDate, endDate, compareWithPrevious, options);
|
|
562
|
+
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
563
|
+
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
|
564
|
+
return axios.request(axiosRequestArgs);
|
|
565
|
+
};
|
|
566
|
+
},
|
|
567
|
+
/**
|
|
568
|
+
* Order status breakdown, fulfillment times, and order trends.
|
|
569
|
+
* @summary Get order analytics
|
|
570
|
+
* @param {string} [startDate] Start date (ISO 8601)
|
|
571
|
+
* @param {string} [endDate] End date (ISO 8601)
|
|
572
|
+
* @param {boolean} [compareWithPrevious] Enable comparison with previous period
|
|
573
|
+
* @param {*} [options] Override http request option.
|
|
574
|
+
* @throws {RequiredError}
|
|
575
|
+
*/
|
|
576
|
+
async getOrderAnalytics(startDate?: string, endDate?: string, compareWithPrevious?: boolean, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<OrderOverviewDto>>> {
|
|
577
|
+
const localVarAxiosArgs = await AnalyticsApiAxiosParamCreator(configuration).getOrderAnalytics(startDate, endDate, compareWithPrevious, options);
|
|
578
|
+
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
579
|
+
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
|
580
|
+
return axios.request(axiosRequestArgs);
|
|
581
|
+
};
|
|
582
|
+
},
|
|
583
|
+
/**
|
|
584
|
+
* Top sellers, inventory alerts, and category breakdown.
|
|
585
|
+
* @summary Get product analytics
|
|
586
|
+
* @param {string} [startDate] Start date (ISO 8601)
|
|
587
|
+
* @param {string} [endDate] End date (ISO 8601)
|
|
588
|
+
* @param {boolean} [compareWithPrevious] Enable comparison with previous period
|
|
589
|
+
* @param {*} [options] Override http request option.
|
|
590
|
+
* @throws {RequiredError}
|
|
591
|
+
*/
|
|
592
|
+
async getProductAnalytics(startDate?: string, endDate?: string, compareWithPrevious?: boolean, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<ProductOverviewDto>>> {
|
|
593
|
+
const localVarAxiosArgs = await AnalyticsApiAxiosParamCreator(configuration).getProductAnalytics(startDate, endDate, compareWithPrevious, options);
|
|
594
|
+
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
595
|
+
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
|
596
|
+
return axios.request(axiosRequestArgs);
|
|
597
|
+
};
|
|
598
|
+
},
|
|
599
|
+
/**
|
|
600
|
+
* Rating distribution, recent reviews, and review trends.
|
|
601
|
+
* @summary Get review analytics
|
|
602
|
+
* @param {string} [startDate] Start date (ISO 8601)
|
|
603
|
+
* @param {string} [endDate] End date (ISO 8601)
|
|
604
|
+
* @param {boolean} [compareWithPrevious] Enable comparison with previous period
|
|
605
|
+
* @param {*} [options] Override http request option.
|
|
606
|
+
* @throws {RequiredError}
|
|
607
|
+
*/
|
|
608
|
+
async getReviewAnalytics(startDate?: string, endDate?: string, compareWithPrevious?: boolean, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<ReviewOverviewDto>>> {
|
|
609
|
+
const localVarAxiosArgs = await AnalyticsApiAxiosParamCreator(configuration).getReviewAnalytics(startDate, endDate, compareWithPrevious, options);
|
|
610
|
+
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
|
611
|
+
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
|
612
|
+
return axios.request(axiosRequestArgs);
|
|
613
|
+
};
|
|
614
|
+
},
|
|
615
|
+
}
|
|
616
|
+
};
|
|
617
|
+
|
|
618
|
+
/**
|
|
619
|
+
* AnalyticsApi - factory interface
|
|
620
|
+
* @export
|
|
621
|
+
*/
|
|
622
|
+
export const AnalyticsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
623
|
+
return {
|
|
624
|
+
/**
|
|
625
|
+
* Booking stats, popular time slots, and cancellation rates.
|
|
626
|
+
* @summary Get appointment analytics
|
|
627
|
+
* @param {string} [startDate] Start date (ISO 8601)
|
|
628
|
+
* @param {string} [endDate] End date (ISO 8601)
|
|
629
|
+
* @param {boolean} [compareWithPrevious] Enable comparison with previous period
|
|
630
|
+
* @param {*} [options] Override http request option.
|
|
631
|
+
* @throws {RequiredError}
|
|
632
|
+
*/
|
|
633
|
+
async getAppointmentAnalytics(startDate?: string, endDate?: string, compareWithPrevious?: boolean, options?: AxiosRequestConfig): Promise<AxiosResponse<AppointmentOverviewDto>> {
|
|
634
|
+
return AnalyticsApiFp(configuration).getAppointmentAnalytics(startDate, endDate, compareWithPrevious, options).then((request) => request(axios, basePath));
|
|
635
|
+
},
|
|
636
|
+
/**
|
|
637
|
+
* Customer segmentation, acquisition trends, LTV, and top spenders.
|
|
638
|
+
* @summary Get customer analytics
|
|
639
|
+
* @param {string} [startDate] Start date (ISO 8601)
|
|
640
|
+
* @param {string} [endDate] End date (ISO 8601)
|
|
641
|
+
* @param {boolean} [compareWithPrevious] Enable comparison with previous period
|
|
642
|
+
* @param {*} [options] Override http request option.
|
|
643
|
+
* @throws {RequiredError}
|
|
644
|
+
*/
|
|
645
|
+
async getCustomerAnalytics(startDate?: string, endDate?: string, compareWithPrevious?: boolean, options?: AxiosRequestConfig): Promise<AxiosResponse<CustomerOverviewDto>> {
|
|
646
|
+
return AnalyticsApiFp(configuration).getCustomerAnalytics(startDate, endDate, compareWithPrevious, options).then((request) => request(axios, basePath));
|
|
647
|
+
},
|
|
648
|
+
/**
|
|
649
|
+
* Returns comprehensive analytics overview including orders, customers, products, appointments, discounts, and reviews.
|
|
650
|
+
* @summary Get complete dashboard analytics
|
|
651
|
+
* @param {string} [startDate] Start date (ISO 8601)
|
|
652
|
+
* @param {string} [endDate] End date (ISO 8601)
|
|
653
|
+
* @param {boolean} [compareWithPrevious] Enable comparison with previous period
|
|
654
|
+
* @param {*} [options] Override http request option.
|
|
655
|
+
* @throws {RequiredError}
|
|
656
|
+
*/
|
|
657
|
+
async getDashboardOverview(startDate?: string, endDate?: string, compareWithPrevious?: boolean, options?: AxiosRequestConfig): Promise<AxiosResponse<DashboardOverviewDto>> {
|
|
658
|
+
return AnalyticsApiFp(configuration).getDashboardOverview(startDate, endDate, compareWithPrevious, options).then((request) => request(axios, basePath));
|
|
659
|
+
},
|
|
660
|
+
/**
|
|
661
|
+
* Discount usage, top codes, and redemption trends.
|
|
662
|
+
* @summary Get discount analytics
|
|
663
|
+
* @param {string} [startDate] Start date (ISO 8601)
|
|
664
|
+
* @param {string} [endDate] End date (ISO 8601)
|
|
665
|
+
* @param {boolean} [compareWithPrevious] Enable comparison with previous period
|
|
666
|
+
* @param {*} [options] Override http request option.
|
|
667
|
+
* @throws {RequiredError}
|
|
668
|
+
*/
|
|
669
|
+
async getDiscountAnalytics(startDate?: string, endDate?: string, compareWithPrevious?: boolean, options?: AxiosRequestConfig): Promise<AxiosResponse<DiscountOverviewDto>> {
|
|
670
|
+
return AnalyticsApiFp(configuration).getDiscountAnalytics(startDate, endDate, compareWithPrevious, options).then((request) => request(axios, basePath));
|
|
671
|
+
},
|
|
672
|
+
/**
|
|
673
|
+
* Order status breakdown, fulfillment times, and order trends.
|
|
674
|
+
* @summary Get order analytics
|
|
675
|
+
* @param {string} [startDate] Start date (ISO 8601)
|
|
676
|
+
* @param {string} [endDate] End date (ISO 8601)
|
|
677
|
+
* @param {boolean} [compareWithPrevious] Enable comparison with previous period
|
|
678
|
+
* @param {*} [options] Override http request option.
|
|
679
|
+
* @throws {RequiredError}
|
|
680
|
+
*/
|
|
681
|
+
async getOrderAnalytics(startDate?: string, endDate?: string, compareWithPrevious?: boolean, options?: AxiosRequestConfig): Promise<AxiosResponse<OrderOverviewDto>> {
|
|
682
|
+
return AnalyticsApiFp(configuration).getOrderAnalytics(startDate, endDate, compareWithPrevious, options).then((request) => request(axios, basePath));
|
|
683
|
+
},
|
|
684
|
+
/**
|
|
685
|
+
* Top sellers, inventory alerts, and category breakdown.
|
|
686
|
+
* @summary Get product analytics
|
|
687
|
+
* @param {string} [startDate] Start date (ISO 8601)
|
|
688
|
+
* @param {string} [endDate] End date (ISO 8601)
|
|
689
|
+
* @param {boolean} [compareWithPrevious] Enable comparison with previous period
|
|
690
|
+
* @param {*} [options] Override http request option.
|
|
691
|
+
* @throws {RequiredError}
|
|
692
|
+
*/
|
|
693
|
+
async getProductAnalytics(startDate?: string, endDate?: string, compareWithPrevious?: boolean, options?: AxiosRequestConfig): Promise<AxiosResponse<ProductOverviewDto>> {
|
|
694
|
+
return AnalyticsApiFp(configuration).getProductAnalytics(startDate, endDate, compareWithPrevious, options).then((request) => request(axios, basePath));
|
|
695
|
+
},
|
|
696
|
+
/**
|
|
697
|
+
* Rating distribution, recent reviews, and review trends.
|
|
698
|
+
* @summary Get review analytics
|
|
699
|
+
* @param {string} [startDate] Start date (ISO 8601)
|
|
700
|
+
* @param {string} [endDate] End date (ISO 8601)
|
|
701
|
+
* @param {boolean} [compareWithPrevious] Enable comparison with previous period
|
|
702
|
+
* @param {*} [options] Override http request option.
|
|
703
|
+
* @throws {RequiredError}
|
|
704
|
+
*/
|
|
705
|
+
async getReviewAnalytics(startDate?: string, endDate?: string, compareWithPrevious?: boolean, options?: AxiosRequestConfig): Promise<AxiosResponse<ReviewOverviewDto>> {
|
|
706
|
+
return AnalyticsApiFp(configuration).getReviewAnalytics(startDate, endDate, compareWithPrevious, options).then((request) => request(axios, basePath));
|
|
707
|
+
},
|
|
708
|
+
};
|
|
709
|
+
};
|
|
710
|
+
|
|
711
|
+
/**
|
|
712
|
+
* AnalyticsApi - object-oriented interface
|
|
713
|
+
* @export
|
|
714
|
+
* @class AnalyticsApi
|
|
715
|
+
* @extends {BaseAPI}
|
|
716
|
+
*/
|
|
717
|
+
export class AnalyticsApi extends BaseAPI {
|
|
718
|
+
/**
|
|
719
|
+
* Booking stats, popular time slots, and cancellation rates.
|
|
720
|
+
* @summary Get appointment analytics
|
|
721
|
+
* @param {string} [startDate] Start date (ISO 8601)
|
|
722
|
+
* @param {string} [endDate] End date (ISO 8601)
|
|
723
|
+
* @param {boolean} [compareWithPrevious] Enable comparison with previous period
|
|
724
|
+
* @param {*} [options] Override http request option.
|
|
725
|
+
* @throws {RequiredError}
|
|
726
|
+
* @memberof AnalyticsApi
|
|
727
|
+
*/
|
|
728
|
+
public async getAppointmentAnalytics(startDate?: string, endDate?: string, compareWithPrevious?: boolean, options?: AxiosRequestConfig) : Promise<AxiosResponse<AppointmentOverviewDto>> {
|
|
729
|
+
return AnalyticsApiFp(this.configuration).getAppointmentAnalytics(startDate, endDate, compareWithPrevious, options).then((request) => request(this.axios, this.basePath));
|
|
730
|
+
}
|
|
731
|
+
/**
|
|
732
|
+
* Customer segmentation, acquisition trends, LTV, and top spenders.
|
|
733
|
+
* @summary Get customer analytics
|
|
734
|
+
* @param {string} [startDate] Start date (ISO 8601)
|
|
735
|
+
* @param {string} [endDate] End date (ISO 8601)
|
|
736
|
+
* @param {boolean} [compareWithPrevious] Enable comparison with previous period
|
|
737
|
+
* @param {*} [options] Override http request option.
|
|
738
|
+
* @throws {RequiredError}
|
|
739
|
+
* @memberof AnalyticsApi
|
|
740
|
+
*/
|
|
741
|
+
public async getCustomerAnalytics(startDate?: string, endDate?: string, compareWithPrevious?: boolean, options?: AxiosRequestConfig) : Promise<AxiosResponse<CustomerOverviewDto>> {
|
|
742
|
+
return AnalyticsApiFp(this.configuration).getCustomerAnalytics(startDate, endDate, compareWithPrevious, options).then((request) => request(this.axios, this.basePath));
|
|
743
|
+
}
|
|
744
|
+
/**
|
|
745
|
+
* Returns comprehensive analytics overview including orders, customers, products, appointments, discounts, and reviews.
|
|
746
|
+
* @summary Get complete dashboard analytics
|
|
747
|
+
* @param {string} [startDate] Start date (ISO 8601)
|
|
748
|
+
* @param {string} [endDate] End date (ISO 8601)
|
|
749
|
+
* @param {boolean} [compareWithPrevious] Enable comparison with previous period
|
|
750
|
+
* @param {*} [options] Override http request option.
|
|
751
|
+
* @throws {RequiredError}
|
|
752
|
+
* @memberof AnalyticsApi
|
|
753
|
+
*/
|
|
754
|
+
public async getDashboardOverview(startDate?: string, endDate?: string, compareWithPrevious?: boolean, options?: AxiosRequestConfig) : Promise<AxiosResponse<DashboardOverviewDto>> {
|
|
755
|
+
return AnalyticsApiFp(this.configuration).getDashboardOverview(startDate, endDate, compareWithPrevious, options).then((request) => request(this.axios, this.basePath));
|
|
756
|
+
}
|
|
757
|
+
/**
|
|
758
|
+
* Discount usage, top codes, and redemption trends.
|
|
759
|
+
* @summary Get discount analytics
|
|
760
|
+
* @param {string} [startDate] Start date (ISO 8601)
|
|
761
|
+
* @param {string} [endDate] End date (ISO 8601)
|
|
762
|
+
* @param {boolean} [compareWithPrevious] Enable comparison with previous period
|
|
763
|
+
* @param {*} [options] Override http request option.
|
|
764
|
+
* @throws {RequiredError}
|
|
765
|
+
* @memberof AnalyticsApi
|
|
766
|
+
*/
|
|
767
|
+
public async getDiscountAnalytics(startDate?: string, endDate?: string, compareWithPrevious?: boolean, options?: AxiosRequestConfig) : Promise<AxiosResponse<DiscountOverviewDto>> {
|
|
768
|
+
return AnalyticsApiFp(this.configuration).getDiscountAnalytics(startDate, endDate, compareWithPrevious, options).then((request) => request(this.axios, this.basePath));
|
|
769
|
+
}
|
|
770
|
+
/**
|
|
771
|
+
* Order status breakdown, fulfillment times, and order trends.
|
|
772
|
+
* @summary Get order analytics
|
|
773
|
+
* @param {string} [startDate] Start date (ISO 8601)
|
|
774
|
+
* @param {string} [endDate] End date (ISO 8601)
|
|
775
|
+
* @param {boolean} [compareWithPrevious] Enable comparison with previous period
|
|
776
|
+
* @param {*} [options] Override http request option.
|
|
777
|
+
* @throws {RequiredError}
|
|
778
|
+
* @memberof AnalyticsApi
|
|
779
|
+
*/
|
|
780
|
+
public async getOrderAnalytics(startDate?: string, endDate?: string, compareWithPrevious?: boolean, options?: AxiosRequestConfig) : Promise<AxiosResponse<OrderOverviewDto>> {
|
|
781
|
+
return AnalyticsApiFp(this.configuration).getOrderAnalytics(startDate, endDate, compareWithPrevious, options).then((request) => request(this.axios, this.basePath));
|
|
782
|
+
}
|
|
783
|
+
/**
|
|
784
|
+
* Top sellers, inventory alerts, and category breakdown.
|
|
785
|
+
* @summary Get product analytics
|
|
786
|
+
* @param {string} [startDate] Start date (ISO 8601)
|
|
787
|
+
* @param {string} [endDate] End date (ISO 8601)
|
|
788
|
+
* @param {boolean} [compareWithPrevious] Enable comparison with previous period
|
|
789
|
+
* @param {*} [options] Override http request option.
|
|
790
|
+
* @throws {RequiredError}
|
|
791
|
+
* @memberof AnalyticsApi
|
|
792
|
+
*/
|
|
793
|
+
public async getProductAnalytics(startDate?: string, endDate?: string, compareWithPrevious?: boolean, options?: AxiosRequestConfig) : Promise<AxiosResponse<ProductOverviewDto>> {
|
|
794
|
+
return AnalyticsApiFp(this.configuration).getProductAnalytics(startDate, endDate, compareWithPrevious, options).then((request) => request(this.axios, this.basePath));
|
|
795
|
+
}
|
|
796
|
+
/**
|
|
797
|
+
* Rating distribution, recent reviews, and review trends.
|
|
798
|
+
* @summary Get review analytics
|
|
799
|
+
* @param {string} [startDate] Start date (ISO 8601)
|
|
800
|
+
* @param {string} [endDate] End date (ISO 8601)
|
|
801
|
+
* @param {boolean} [compareWithPrevious] Enable comparison with previous period
|
|
802
|
+
* @param {*} [options] Override http request option.
|
|
803
|
+
* @throws {RequiredError}
|
|
804
|
+
* @memberof AnalyticsApi
|
|
805
|
+
*/
|
|
806
|
+
public async getReviewAnalytics(startDate?: string, endDate?: string, compareWithPrevious?: boolean, options?: AxiosRequestConfig) : Promise<AxiosResponse<ReviewOverviewDto>> {
|
|
807
|
+
return AnalyticsApiFp(this.configuration).getReviewAnalytics(startDate, endDate, compareWithPrevious, options).then((request) => request(this.axios, this.basePath));
|
|
808
|
+
}
|
|
809
|
+
}
|