@teez-sdk/teez-b2c-api 1.0.0
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/README.md +189 -0
- package/dist/index.cjs +1394 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +4494 -0
- package/dist/index.d.mts +4494 -0
- package/dist/index.mjs +1287 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +58 -0
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,1394 @@
|
|
|
1
|
+
//#region rolldown:runtime
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
+
for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
11
|
+
key = keys[i];
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except) {
|
|
13
|
+
__defProp(to, key, {
|
|
14
|
+
get: ((k) => from[k]).bind(null, key),
|
|
15
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
23
|
+
value: mod,
|
|
24
|
+
enumerable: true
|
|
25
|
+
}) : target, mod));
|
|
26
|
+
|
|
27
|
+
//#endregion
|
|
28
|
+
let zod_mini = require("zod/mini");
|
|
29
|
+
zod_mini = __toESM(zod_mini);
|
|
30
|
+
|
|
31
|
+
//#region src/api/banners/schemas.ts
|
|
32
|
+
/**
|
|
33
|
+
* Type literal for banner image resource type
|
|
34
|
+
*/
|
|
35
|
+
const BannerImageTypeSchema = zod_mini.literal("network");
|
|
36
|
+
/**
|
|
37
|
+
* Schema for a banner image.
|
|
38
|
+
*/
|
|
39
|
+
const BannersApiImageSchema = zod_mini.object({
|
|
40
|
+
type: BannerImageTypeSchema,
|
|
41
|
+
url: zod_mini.string()
|
|
42
|
+
});
|
|
43
|
+
/**
|
|
44
|
+
* Type union for banner action types
|
|
45
|
+
*/
|
|
46
|
+
const BannerActionTypesSchema = zod_mini.union([
|
|
47
|
+
zod_mini.literal("url"),
|
|
48
|
+
zod_mini.literal("path"),
|
|
49
|
+
zod_mini.literal("key")
|
|
50
|
+
]);
|
|
51
|
+
/**
|
|
52
|
+
* Schema for a banner action.
|
|
53
|
+
*/
|
|
54
|
+
const BannersApiActionSchema = zod_mini.object({
|
|
55
|
+
type: BannerActionTypesSchema,
|
|
56
|
+
value: zod_mini.string(),
|
|
57
|
+
analyticsKey: zod_mini.nullish(zod_mini.string())
|
|
58
|
+
});
|
|
59
|
+
/**
|
|
60
|
+
* Schema for a banner item containing an image and an action.
|
|
61
|
+
*/
|
|
62
|
+
const BannersApiBannerItemSchema = zod_mini.object({
|
|
63
|
+
image: BannersApiImageSchema,
|
|
64
|
+
action: BannersApiActionSchema
|
|
65
|
+
});
|
|
66
|
+
/**
|
|
67
|
+
* Response schema for the list of banners.
|
|
68
|
+
*/
|
|
69
|
+
const BannersApiListResponseSchema = zod_mini.array(BannersApiBannerItemSchema);
|
|
70
|
+
|
|
71
|
+
//#endregion
|
|
72
|
+
//#region src/api/banners/api.ts
|
|
73
|
+
/**
|
|
74
|
+
* API for retrieving promotional and informational banners.
|
|
75
|
+
*/
|
|
76
|
+
var BannersApi = class {
|
|
77
|
+
constructor(http) {
|
|
78
|
+
this.http = http;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Retrieves a list of active banners.
|
|
82
|
+
*/
|
|
83
|
+
async list(params = {}) {
|
|
84
|
+
return await this.http.get({
|
|
85
|
+
path: "/api/v3/banners",
|
|
86
|
+
params,
|
|
87
|
+
schema: BannersApiListResponseSchema
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
//#endregion
|
|
93
|
+
//#region src/api/categories/schemas.ts
|
|
94
|
+
/**
|
|
95
|
+
* Schema for a category list item.
|
|
96
|
+
*/
|
|
97
|
+
const CategoriesApiListResponseItemSchema = zod_mini.object({
|
|
98
|
+
id: zod_mini.number(),
|
|
99
|
+
name: zod_mini.string(),
|
|
100
|
+
level: zod_mini.number(),
|
|
101
|
+
parentId: zod_mini.number(),
|
|
102
|
+
hasSubcategories: zod_mini.boolean(),
|
|
103
|
+
isAdult: zod_mini.boolean()
|
|
104
|
+
});
|
|
105
|
+
/**
|
|
106
|
+
* Response schema for the list of categories.
|
|
107
|
+
*/
|
|
108
|
+
const CategoriesApiListResponseSchema = zod_mini.array(CategoriesApiListResponseItemSchema);
|
|
109
|
+
/**
|
|
110
|
+
* Response schema for getting a specific category by ID.
|
|
111
|
+
*/
|
|
112
|
+
const CategoriesApiGetResponseSchema = zod_mini.object({
|
|
113
|
+
id: zod_mini.number(),
|
|
114
|
+
name: zod_mini.string(),
|
|
115
|
+
level: zod_mini.number(),
|
|
116
|
+
parentId: zod_mini.number(),
|
|
117
|
+
hasSubcategories: zod_mini.boolean(),
|
|
118
|
+
isAdult: zod_mini.boolean(),
|
|
119
|
+
get subcategories() {
|
|
120
|
+
return zod_mini.nullish(zod_mini.array(CategoriesApiGetResponseSchema));
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
/**
|
|
124
|
+
* Schema for a parent category item with nesting.
|
|
125
|
+
*/
|
|
126
|
+
const CategoriesApiGetParentsResponseItemSchema = zod_mini.object({
|
|
127
|
+
id: zod_mini.number(),
|
|
128
|
+
name: zod_mini.string(),
|
|
129
|
+
level: zod_mini.number(),
|
|
130
|
+
hasSubcategories: zod_mini.boolean(),
|
|
131
|
+
get subcategories() {
|
|
132
|
+
return zod_mini.nullish(zod_mini.array(CategoriesApiGetParentsResponseItemSchema));
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
/**
|
|
136
|
+
* Response schema for getting parent categories.
|
|
137
|
+
*/
|
|
138
|
+
const CategoriesApiGetParentsResponseSchema = zod_mini.array(CategoriesApiGetParentsResponseItemSchema);
|
|
139
|
+
|
|
140
|
+
//#endregion
|
|
141
|
+
//#region src/api/categories/api.ts
|
|
142
|
+
/**
|
|
143
|
+
* API for retrieving product category information.
|
|
144
|
+
*/
|
|
145
|
+
var CategoriesApi = class {
|
|
146
|
+
constructor(http) {
|
|
147
|
+
this.http = http;
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Retrieves a list of all categories.
|
|
151
|
+
*/
|
|
152
|
+
async list(params = {}) {
|
|
153
|
+
return await this.http.get({
|
|
154
|
+
path: "/categories",
|
|
155
|
+
params,
|
|
156
|
+
schema: CategoriesApiListResponseSchema
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Retrieves detailed information about a specific category by its ID.
|
|
161
|
+
*/
|
|
162
|
+
async get(params) {
|
|
163
|
+
return await this.http.get({
|
|
164
|
+
path: `/categories/${params.categoryId}`,
|
|
165
|
+
params,
|
|
166
|
+
schema: CategoriesApiGetResponseSchema
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Retrieves parent categories for specific category IDs.
|
|
171
|
+
*/
|
|
172
|
+
async getParents(params) {
|
|
173
|
+
return await this.http.get({
|
|
174
|
+
path: "/api/v1/categories/parents",
|
|
175
|
+
params,
|
|
176
|
+
schema: CategoriesApiGetParentsResponseSchema
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
};
|
|
180
|
+
|
|
181
|
+
//#endregion
|
|
182
|
+
//#region src/common/schemas.ts
|
|
183
|
+
/**
|
|
184
|
+
* Schema for range filter options (e.g., price slider).
|
|
185
|
+
* Common schema used by multiple APIs.
|
|
186
|
+
*/
|
|
187
|
+
const RangeFilterOptionSchema = zod_mini.object({
|
|
188
|
+
min: zod_mini.number(),
|
|
189
|
+
max: zod_mini.number()
|
|
190
|
+
});
|
|
191
|
+
/**
|
|
192
|
+
* Type literal for range-based filters
|
|
193
|
+
*/
|
|
194
|
+
const RangeTypeSchema = zod_mini.literal("range");
|
|
195
|
+
/**
|
|
196
|
+
* Schema for range filters (e.g., price slider).
|
|
197
|
+
* Use this in discriminatedUnion-based filter schemas.
|
|
198
|
+
*/
|
|
199
|
+
const RangeFilterSchema = zod_mini.object({
|
|
200
|
+
type: RangeTypeSchema,
|
|
201
|
+
name: zod_mini.string(),
|
|
202
|
+
code: zod_mini.string(),
|
|
203
|
+
options: zod_mini.array(RangeFilterOptionSchema)
|
|
204
|
+
});
|
|
205
|
+
/**
|
|
206
|
+
* Schema for category/brand filter options.
|
|
207
|
+
* Common schema used by multiple APIs.
|
|
208
|
+
*/
|
|
209
|
+
const CategoryFilterOptionSchema = zod_mini.object({
|
|
210
|
+
label: zod_mini.string(),
|
|
211
|
+
value: zod_mini.number()
|
|
212
|
+
});
|
|
213
|
+
/**
|
|
214
|
+
* Type union for category filter types
|
|
215
|
+
*/
|
|
216
|
+
const CategoryFilterTypesSchema = zod_mini.union([zod_mini.literal("category"), zod_mini.literal("alphabetic_search_list")]);
|
|
217
|
+
/**
|
|
218
|
+
* Schema for category/brand filters.
|
|
219
|
+
* Use this in discriminatedUnion-based filter schemas.
|
|
220
|
+
*/
|
|
221
|
+
const CategoryFilterSchema = zod_mini.object({
|
|
222
|
+
type: CategoryFilterTypesSchema,
|
|
223
|
+
name: zod_mini.string(),
|
|
224
|
+
code: zod_mini.string(),
|
|
225
|
+
options: zod_mini.array(CategoryFilterOptionSchema)
|
|
226
|
+
});
|
|
227
|
+
/**
|
|
228
|
+
* Union filter schema that can be either range or category filter.
|
|
229
|
+
* This is the recommended pattern for type-safe filters.
|
|
230
|
+
*/
|
|
231
|
+
const FilterSchema = zod_mini.discriminatedUnion("type", [RangeFilterSchema, CategoryFilterSchema]);
|
|
232
|
+
|
|
233
|
+
//#endregion
|
|
234
|
+
//#region src/api/collections/schemas.ts
|
|
235
|
+
/**
|
|
236
|
+
* Type literal for collections stock availability type
|
|
237
|
+
*/
|
|
238
|
+
const CollectionsStockAvailabilityTypeSchema = zod_mini.literal("stock");
|
|
239
|
+
/**
|
|
240
|
+
* Schema for stock availability information.
|
|
241
|
+
*/
|
|
242
|
+
const CollectionsApiStockAvailabilitySchema = zod_mini.object({
|
|
243
|
+
type: CollectionsStockAvailabilityTypeSchema,
|
|
244
|
+
svg: zod_mini.nullish(zod_mini.string()),
|
|
245
|
+
text: zod_mini.string(),
|
|
246
|
+
maxQty: zod_mini.number(),
|
|
247
|
+
maxQtyReason: zod_mini.string()
|
|
248
|
+
});
|
|
249
|
+
/**
|
|
250
|
+
* Schema for a SKU item within a collection.
|
|
251
|
+
*/
|
|
252
|
+
const CollectionsApiSkuItemSchema = zod_mini.object({
|
|
253
|
+
productId: zod_mini.number(),
|
|
254
|
+
skuId: zod_mini.number(),
|
|
255
|
+
imageUrl: zod_mini.string(),
|
|
256
|
+
name: zod_mini.string(),
|
|
257
|
+
shortDescription: zod_mini.string(),
|
|
258
|
+
thumbnailUrl: zod_mini.string(),
|
|
259
|
+
originalPrice: zod_mini.number(),
|
|
260
|
+
price: zod_mini.number(),
|
|
261
|
+
qty: zod_mini.number(),
|
|
262
|
+
stockAvailability: zod_mini.nullish(CollectionsApiStockAvailabilitySchema),
|
|
263
|
+
isPromo: zod_mini.boolean(),
|
|
264
|
+
promoName: zod_mini.string(),
|
|
265
|
+
qtyPurchasedInfo: zod_mini.nullish(zod_mini.string()),
|
|
266
|
+
rating: zod_mini.nullish(zod_mini.number()),
|
|
267
|
+
scoreQuantity: zod_mini.nullish(zod_mini.number())
|
|
268
|
+
});
|
|
269
|
+
/**
|
|
270
|
+
* Response schema for getting SKUs from a collection.
|
|
271
|
+
*/
|
|
272
|
+
const CollectionsApiGetSkusResponseSchema = zod_mini.object({
|
|
273
|
+
filters: zod_mini.array(FilterSchema),
|
|
274
|
+
items: zod_mini.array(CollectionsApiSkuItemSchema),
|
|
275
|
+
pageNumber: zod_mini.number(),
|
|
276
|
+
totalPages: zod_mini.number(),
|
|
277
|
+
totalCount: zod_mini.number(),
|
|
278
|
+
hasPreviousPage: zod_mini.boolean(),
|
|
279
|
+
hasNextPage: zod_mini.boolean()
|
|
280
|
+
});
|
|
281
|
+
/**
|
|
282
|
+
* Schema for a collection list item.
|
|
283
|
+
*/
|
|
284
|
+
const CollectionsApiListItemSchema = zod_mini.object({
|
|
285
|
+
id: zod_mini.number(),
|
|
286
|
+
icon: zod_mini.nullish(zod_mini.string()),
|
|
287
|
+
name: zod_mini.string(),
|
|
288
|
+
priority: zod_mini.number()
|
|
289
|
+
});
|
|
290
|
+
/**
|
|
291
|
+
* Response schema for the list of collections.
|
|
292
|
+
*/
|
|
293
|
+
const CollectionsApiListResponseSchema = zod_mini.array(CollectionsApiListItemSchema);
|
|
294
|
+
/**
|
|
295
|
+
* Type literal for collection type identifier
|
|
296
|
+
*/
|
|
297
|
+
const CollectionTypeSchema = zod_mini.literal("Collection");
|
|
298
|
+
/**
|
|
299
|
+
* Response schema for getting a specific collection by ID.
|
|
300
|
+
*/
|
|
301
|
+
const CollectionsApiGetResponseSchema = zod_mini.object({
|
|
302
|
+
type: CollectionTypeSchema,
|
|
303
|
+
id: zod_mini.number(),
|
|
304
|
+
cover: zod_mini.string(),
|
|
305
|
+
description: zod_mini.string(),
|
|
306
|
+
name: zod_mini.string(),
|
|
307
|
+
priority: zod_mini.number()
|
|
308
|
+
});
|
|
309
|
+
|
|
310
|
+
//#endregion
|
|
311
|
+
//#region src/api/collections/api.ts
|
|
312
|
+
/**
|
|
313
|
+
* API for retrieving curated collections of products.
|
|
314
|
+
*/
|
|
315
|
+
var CollectionsApi = class {
|
|
316
|
+
constructor(http) {
|
|
317
|
+
this.http = http;
|
|
318
|
+
}
|
|
319
|
+
/**
|
|
320
|
+
* Retrieves a list of SKUs belonging to a specific collection with pagination and sorting.
|
|
321
|
+
*/
|
|
322
|
+
async getSkus(params) {
|
|
323
|
+
return await this.http.get({
|
|
324
|
+
path: "/api/v2/collections/skus",
|
|
325
|
+
params,
|
|
326
|
+
schema: CollectionsApiGetSkusResponseSchema
|
|
327
|
+
});
|
|
328
|
+
}
|
|
329
|
+
/**
|
|
330
|
+
* Retrieves a list of all collections.
|
|
331
|
+
*/
|
|
332
|
+
async list(params = {}) {
|
|
333
|
+
return await this.http.get({
|
|
334
|
+
path: "/collections",
|
|
335
|
+
params,
|
|
336
|
+
schema: CollectionsApiListResponseSchema
|
|
337
|
+
});
|
|
338
|
+
}
|
|
339
|
+
/**
|
|
340
|
+
* Retrieves detailed information about a specific collection by its ID.
|
|
341
|
+
*/
|
|
342
|
+
async get(params) {
|
|
343
|
+
return await this.http.get({
|
|
344
|
+
path: `/collections/${params.collectionId}`,
|
|
345
|
+
params,
|
|
346
|
+
schema: CollectionsApiGetResponseSchema
|
|
347
|
+
});
|
|
348
|
+
}
|
|
349
|
+
};
|
|
350
|
+
|
|
351
|
+
//#endregion
|
|
352
|
+
//#region src/api/feature-flags/schemas.ts
|
|
353
|
+
/**
|
|
354
|
+
* Schema for a feature flag item.
|
|
355
|
+
*/
|
|
356
|
+
const FeatureFlagsApiItemSchema = zod_mini.object({
|
|
357
|
+
name: zod_mini.string(),
|
|
358
|
+
isActive: zod_mini.boolean()
|
|
359
|
+
});
|
|
360
|
+
/**
|
|
361
|
+
* Response schema for the list of feature flags.
|
|
362
|
+
*/
|
|
363
|
+
const FeatureFlagsApiListResponseSchema = zod_mini.array(FeatureFlagsApiItemSchema);
|
|
364
|
+
|
|
365
|
+
//#endregion
|
|
366
|
+
//#region src/api/feature-flags/api.ts
|
|
367
|
+
/**
|
|
368
|
+
* API for retrieving feature flags configuration.
|
|
369
|
+
*/
|
|
370
|
+
var FeatureFlagsApi = class {
|
|
371
|
+
constructor(http) {
|
|
372
|
+
this.http = http;
|
|
373
|
+
}
|
|
374
|
+
/**
|
|
375
|
+
* Retrieves all active feature flags.
|
|
376
|
+
*/
|
|
377
|
+
async list(params = {}) {
|
|
378
|
+
return await this.http.get({
|
|
379
|
+
path: "/api/v1/feature-flags",
|
|
380
|
+
params,
|
|
381
|
+
schema: FeatureFlagsApiListResponseSchema
|
|
382
|
+
});
|
|
383
|
+
}
|
|
384
|
+
};
|
|
385
|
+
|
|
386
|
+
//#endregion
|
|
387
|
+
//#region src/api/products/schemas.ts
|
|
388
|
+
/**
|
|
389
|
+
* Type union for product sort keys
|
|
390
|
+
*/
|
|
391
|
+
const ProductSortKeySchema = zod_mini.union([
|
|
392
|
+
zod_mini.literal("popularity"),
|
|
393
|
+
zod_mini.literal("highestRated"),
|
|
394
|
+
zod_mini.literal("new"),
|
|
395
|
+
zod_mini.literal("price"),
|
|
396
|
+
zod_mini.literal("priceDesc")
|
|
397
|
+
]);
|
|
398
|
+
/**
|
|
399
|
+
* Schema for a sort option.
|
|
400
|
+
*/
|
|
401
|
+
const ProductsApiSortOptionSchema = zod_mini.object({
|
|
402
|
+
key: ProductSortKeySchema,
|
|
403
|
+
name: zod_mini.string()
|
|
404
|
+
});
|
|
405
|
+
/**
|
|
406
|
+
* Response schema for available sort options.
|
|
407
|
+
*/
|
|
408
|
+
const ProductsApiGetSortOptionsResponseSchema = zod_mini.array(ProductsApiSortOptionSchema);
|
|
409
|
+
/**
|
|
410
|
+
* Schema for a product review item.
|
|
411
|
+
*/
|
|
412
|
+
const ProductsApiReviewItemSchema = zod_mini.object({
|
|
413
|
+
author: zod_mini.string(),
|
|
414
|
+
reviewText: zod_mini.string(),
|
|
415
|
+
scoreValue: zod_mini.number(),
|
|
416
|
+
attributes: zod_mini.record(zod_mini.string(), zod_mini.string()),
|
|
417
|
+
createdAt: zod_mini.string()
|
|
418
|
+
});
|
|
419
|
+
/**
|
|
420
|
+
* Response schema for product reviews.
|
|
421
|
+
*/
|
|
422
|
+
const ProductsApiGetReviewsResponseSchema = zod_mini.object({
|
|
423
|
+
items: zod_mini.array(ProductsApiReviewItemSchema),
|
|
424
|
+
pageNumber: zod_mini.number(),
|
|
425
|
+
totalPages: zod_mini.number(),
|
|
426
|
+
totalCount: zod_mini.number(),
|
|
427
|
+
hasPreviousPage: zod_mini.boolean(),
|
|
428
|
+
hasNextPage: zod_mini.boolean()
|
|
429
|
+
});
|
|
430
|
+
/**
|
|
431
|
+
* Schema for a product badge.
|
|
432
|
+
*/
|
|
433
|
+
const ProductsApiBadgeSchema = zod_mini.object({
|
|
434
|
+
backgroundColor: zod_mini.number(),
|
|
435
|
+
label: zod_mini.string(),
|
|
436
|
+
textColor: zod_mini.number()
|
|
437
|
+
});
|
|
438
|
+
/**
|
|
439
|
+
* Type literal for products stock availability type
|
|
440
|
+
*/
|
|
441
|
+
const ProductsStockAvailabilityTypeSchema = zod_mini.literal("stock");
|
|
442
|
+
/**
|
|
443
|
+
* Schema for stock availability information.
|
|
444
|
+
*/
|
|
445
|
+
const ProductsApiStockAvailabilitySchema = zod_mini.object({
|
|
446
|
+
type: ProductsStockAvailabilityTypeSchema,
|
|
447
|
+
svg: zod_mini.nullish(zod_mini.string()),
|
|
448
|
+
text: zod_mini.string(),
|
|
449
|
+
maxQty: zod_mini.number(),
|
|
450
|
+
maxQtyReason: zod_mini.string()
|
|
451
|
+
});
|
|
452
|
+
/**
|
|
453
|
+
* Schema for a product item.
|
|
454
|
+
*/
|
|
455
|
+
const ProductsApiProductItemSchema = zod_mini.object({
|
|
456
|
+
productId: zod_mini.number(),
|
|
457
|
+
skuId: zod_mini.number(),
|
|
458
|
+
imageUrl: zod_mini.string(),
|
|
459
|
+
name: zod_mini.string(),
|
|
460
|
+
shortDescription: zod_mini.string(),
|
|
461
|
+
thumbnailUrl: zod_mini.string(),
|
|
462
|
+
originalPrice: zod_mini.number(),
|
|
463
|
+
price: zod_mini.number(),
|
|
464
|
+
qty: zod_mini.number(),
|
|
465
|
+
stockAvailability: zod_mini.nullish(ProductsApiStockAvailabilitySchema),
|
|
466
|
+
isPromo: zod_mini.boolean(),
|
|
467
|
+
promoName: zod_mini.string(),
|
|
468
|
+
promocodes: zod_mini.array(zod_mini.string()),
|
|
469
|
+
qtyPurchasedInfo: zod_mini.nullish(zod_mini.string()),
|
|
470
|
+
rating: zod_mini.nullish(zod_mini.number()),
|
|
471
|
+
scoreQuantity: zod_mini.nullish(zod_mini.number()),
|
|
472
|
+
badge: ProductsApiBadgeSchema,
|
|
473
|
+
moderationStatus: zod_mini.number()
|
|
474
|
+
});
|
|
475
|
+
/**
|
|
476
|
+
* Response schema for the product list.
|
|
477
|
+
*/
|
|
478
|
+
const ProductsApiListResponseSchema = zod_mini.object({
|
|
479
|
+
filters: zod_mini.array(FilterSchema),
|
|
480
|
+
items: zod_mini.array(ProductsApiProductItemSchema),
|
|
481
|
+
pageNumber: zod_mini.number(),
|
|
482
|
+
totalPages: zod_mini.number(),
|
|
483
|
+
totalCount: zod_mini.number(),
|
|
484
|
+
hasPreviousPage: zod_mini.boolean(),
|
|
485
|
+
hasNextPage: zod_mini.boolean()
|
|
486
|
+
});
|
|
487
|
+
|
|
488
|
+
//#endregion
|
|
489
|
+
//#region src/api/products/api.ts
|
|
490
|
+
/**
|
|
491
|
+
* API for retrieving product listings, details, and reviews.
|
|
492
|
+
*/
|
|
493
|
+
var ProductsApi = class {
|
|
494
|
+
constructor(http) {
|
|
495
|
+
this.http = http;
|
|
496
|
+
}
|
|
497
|
+
/**
|
|
498
|
+
* Retrieves available sorting options for product lists.
|
|
499
|
+
*/
|
|
500
|
+
async getSortOptions(params = {}) {
|
|
501
|
+
return await this.http.get({
|
|
502
|
+
path: "/api/product/sort-options",
|
|
503
|
+
params,
|
|
504
|
+
schema: ProductsApiGetSortOptionsResponseSchema
|
|
505
|
+
});
|
|
506
|
+
}
|
|
507
|
+
/**
|
|
508
|
+
* Retrieves a list of products with optional filtering and pagination.
|
|
509
|
+
*/
|
|
510
|
+
async list(params = {}) {
|
|
511
|
+
return await this.http.get({
|
|
512
|
+
path: "/api/v2/product",
|
|
513
|
+
params,
|
|
514
|
+
schema: ProductsApiListResponseSchema
|
|
515
|
+
});
|
|
516
|
+
}
|
|
517
|
+
/**
|
|
518
|
+
* Retrieves reviews for a specific product.
|
|
519
|
+
*/
|
|
520
|
+
async getReviews(params) {
|
|
521
|
+
return await this.http.get({
|
|
522
|
+
path: `/api/v1/product/${params.productId}/review`,
|
|
523
|
+
params,
|
|
524
|
+
schema: ProductsApiGetReviewsResponseSchema
|
|
525
|
+
});
|
|
526
|
+
}
|
|
527
|
+
};
|
|
528
|
+
|
|
529
|
+
//#endregion
|
|
530
|
+
//#region src/api/promo/schemas.ts
|
|
531
|
+
/**
|
|
532
|
+
* Schema for a promotion item.
|
|
533
|
+
*/
|
|
534
|
+
const PromoApiItemSchema = zod_mini.object({
|
|
535
|
+
id: zod_mini.number(),
|
|
536
|
+
name: zod_mini.string(),
|
|
537
|
+
description: zod_mini.nullish(zod_mini.string()),
|
|
538
|
+
svgUrl: zod_mini.nullish(zod_mini.string()),
|
|
539
|
+
startDate: zod_mini.string(),
|
|
540
|
+
endDate: zod_mini.string()
|
|
541
|
+
});
|
|
542
|
+
/**
|
|
543
|
+
* Response schema for the list of promotions.
|
|
544
|
+
*/
|
|
545
|
+
const PromoApiListResponseSchema = zod_mini.array(PromoApiItemSchema);
|
|
546
|
+
|
|
547
|
+
//#endregion
|
|
548
|
+
//#region src/api/promo/api.ts
|
|
549
|
+
/**
|
|
550
|
+
* API for retrieving active promotions.
|
|
551
|
+
*/
|
|
552
|
+
var PromoApi = class {
|
|
553
|
+
constructor(http) {
|
|
554
|
+
this.http = http;
|
|
555
|
+
}
|
|
556
|
+
/**
|
|
557
|
+
* Retrieves a list of all active promotions.
|
|
558
|
+
*/
|
|
559
|
+
async list(params = {}) {
|
|
560
|
+
return await this.http.get({
|
|
561
|
+
path: "/api/promo",
|
|
562
|
+
params,
|
|
563
|
+
schema: PromoApiListResponseSchema
|
|
564
|
+
});
|
|
565
|
+
}
|
|
566
|
+
};
|
|
567
|
+
|
|
568
|
+
//#endregion
|
|
569
|
+
//#region src/api/shops/schemas.ts
|
|
570
|
+
/**
|
|
571
|
+
* Schema for shop contact information.
|
|
572
|
+
*/
|
|
573
|
+
const ShopsApiContactInfoSchema = zod_mini.object({
|
|
574
|
+
bin: zod_mini.string(),
|
|
575
|
+
daysSinceRegistration: zod_mini.number(),
|
|
576
|
+
legalType: zod_mini.number()
|
|
577
|
+
});
|
|
578
|
+
/**
|
|
579
|
+
* Schema for a shop tag.
|
|
580
|
+
*/
|
|
581
|
+
const ShopsApiTagSchema = zod_mini.object({
|
|
582
|
+
description: zod_mini.string(),
|
|
583
|
+
icon: zod_mini.string(),
|
|
584
|
+
name: zod_mini.string(),
|
|
585
|
+
svg: zod_mini.string(),
|
|
586
|
+
code: zod_mini.string()
|
|
587
|
+
});
|
|
588
|
+
/**
|
|
589
|
+
* Response schema for getting a specific shop by ID.
|
|
590
|
+
*/
|
|
591
|
+
const ShopsApiGetResponseSchema = zod_mini.object({
|
|
592
|
+
id: zod_mini.number(),
|
|
593
|
+
banner: zod_mini.nullish(zod_mini.string()),
|
|
594
|
+
description: zod_mini.string(),
|
|
595
|
+
logo: zod_mini.nullish(zod_mini.string()),
|
|
596
|
+
name: zod_mini.string(),
|
|
597
|
+
qtyPurchasedInfo: zod_mini.nullish(zod_mini.string()),
|
|
598
|
+
rating: zod_mini.nullish(zod_mini.number()),
|
|
599
|
+
totalReviews: zod_mini.nullish(zod_mini.number()),
|
|
600
|
+
contactInfo: ShopsApiContactInfoSchema,
|
|
601
|
+
isMonobrand: zod_mini.boolean(),
|
|
602
|
+
tag: ShopsApiTagSchema
|
|
603
|
+
});
|
|
604
|
+
/**
|
|
605
|
+
* Schema for a shop item in a list.
|
|
606
|
+
*/
|
|
607
|
+
const ShopsApiShopItemSchema = zod_mini.object({
|
|
608
|
+
id: zod_mini.number(),
|
|
609
|
+
icon: zod_mini.string()
|
|
610
|
+
});
|
|
611
|
+
/**
|
|
612
|
+
* Response schema for the monobrand shop list.
|
|
613
|
+
*/
|
|
614
|
+
const ShopsApiGetMonobrandResponseSchema = zod_mini.object({
|
|
615
|
+
items: zod_mini.array(ShopsApiShopItemSchema),
|
|
616
|
+
pageNumber: zod_mini.number(),
|
|
617
|
+
totalPages: zod_mini.number(),
|
|
618
|
+
totalCount: zod_mini.number(),
|
|
619
|
+
hasPreviousPage: zod_mini.boolean(),
|
|
620
|
+
hasNextPage: zod_mini.boolean()
|
|
621
|
+
});
|
|
622
|
+
/**
|
|
623
|
+
* Type literal for shops stock availability type
|
|
624
|
+
*/
|
|
625
|
+
const ShopsStockAvailabilityTypeSchema = zod_mini.literal("stock");
|
|
626
|
+
/**
|
|
627
|
+
* Schema for stock availability information.
|
|
628
|
+
*/
|
|
629
|
+
const ShopsApiStockAvailabilitySchema = zod_mini.object({
|
|
630
|
+
type: ShopsStockAvailabilityTypeSchema,
|
|
631
|
+
svg: zod_mini.nullish(zod_mini.string()),
|
|
632
|
+
text: zod_mini.string(),
|
|
633
|
+
maxQty: zod_mini.number(),
|
|
634
|
+
maxQtyReason: zod_mini.string()
|
|
635
|
+
});
|
|
636
|
+
/**
|
|
637
|
+
* Schema for a product item in a shop.
|
|
638
|
+
*/
|
|
639
|
+
const ShopsApiProductItemSchema = zod_mini.object({
|
|
640
|
+
productId: zod_mini.number(),
|
|
641
|
+
skuId: zod_mini.number(),
|
|
642
|
+
imageUrl: zod_mini.string(),
|
|
643
|
+
name: zod_mini.string(),
|
|
644
|
+
shortDescription: zod_mini.string(),
|
|
645
|
+
thumbnailUrl: zod_mini.string(),
|
|
646
|
+
originalPrice: zod_mini.number(),
|
|
647
|
+
price: zod_mini.number(),
|
|
648
|
+
inStock: zod_mini.boolean(),
|
|
649
|
+
qty: zod_mini.number(),
|
|
650
|
+
stockAvailability: zod_mini.nullish(ShopsApiStockAvailabilitySchema),
|
|
651
|
+
isPromo: zod_mini.boolean(),
|
|
652
|
+
promoName: zod_mini.string(),
|
|
653
|
+
qtyPurchasedInfo: zod_mini.nullish(zod_mini.string()),
|
|
654
|
+
rating: zod_mini.nullish(zod_mini.number()),
|
|
655
|
+
scoreQuantity: zod_mini.nullish(zod_mini.number()),
|
|
656
|
+
moderationStatus: zod_mini.number()
|
|
657
|
+
});
|
|
658
|
+
/**
|
|
659
|
+
* Response schema for products from a specific shop.
|
|
660
|
+
*/
|
|
661
|
+
const ShopsApiGetProductsResponseSchema = zod_mini.object({
|
|
662
|
+
filters: zod_mini.array(FilterSchema),
|
|
663
|
+
items: zod_mini.array(ShopsApiProductItemSchema),
|
|
664
|
+
pageNumber: zod_mini.number(),
|
|
665
|
+
totalPages: zod_mini.number(),
|
|
666
|
+
totalCount: zod_mini.number(),
|
|
667
|
+
hasPreviousPage: zod_mini.boolean(),
|
|
668
|
+
hasNextPage: zod_mini.boolean()
|
|
669
|
+
});
|
|
670
|
+
|
|
671
|
+
//#endregion
|
|
672
|
+
//#region src/api/shops/api.ts
|
|
673
|
+
/**
|
|
674
|
+
* API for interacting with shop-related endpoints.
|
|
675
|
+
*/
|
|
676
|
+
var ShopsApi = class {
|
|
677
|
+
constructor(http) {
|
|
678
|
+
this.http = http;
|
|
679
|
+
}
|
|
680
|
+
/**
|
|
681
|
+
* Retrieves details of a specific shop.
|
|
682
|
+
*/
|
|
683
|
+
async get(params) {
|
|
684
|
+
return await this.http.get({
|
|
685
|
+
path: `/api/v1/shops/${params.shopId}`,
|
|
686
|
+
params,
|
|
687
|
+
schema: ShopsApiGetResponseSchema
|
|
688
|
+
});
|
|
689
|
+
}
|
|
690
|
+
/**
|
|
691
|
+
* Retrieves monobrand shop details.
|
|
692
|
+
*/
|
|
693
|
+
async getMonobrand(params = {}) {
|
|
694
|
+
return await this.http.get({
|
|
695
|
+
path: "/api/v1/shops/monobrand",
|
|
696
|
+
params,
|
|
697
|
+
schema: ShopsApiGetMonobrandResponseSchema
|
|
698
|
+
});
|
|
699
|
+
}
|
|
700
|
+
/**
|
|
701
|
+
* Retrieves products for a specific shop.
|
|
702
|
+
*/
|
|
703
|
+
async getProducts(params) {
|
|
704
|
+
return await this.http.get({
|
|
705
|
+
path: `/api/v2/shops/${params.shopId}/products`,
|
|
706
|
+
params,
|
|
707
|
+
schema: ShopsApiGetProductsResponseSchema
|
|
708
|
+
});
|
|
709
|
+
}
|
|
710
|
+
};
|
|
711
|
+
|
|
712
|
+
//#endregion
|
|
713
|
+
//#region src/api/sku/schemas.ts
|
|
714
|
+
/**
|
|
715
|
+
* Schema for installment payment information.
|
|
716
|
+
*/
|
|
717
|
+
const SkuApiInstallmentSchema = zod_mini.object({
|
|
718
|
+
installmentSvg: zod_mini.string(),
|
|
719
|
+
installmentTerm: zod_mini.string()
|
|
720
|
+
});
|
|
721
|
+
/**
|
|
722
|
+
* Schema for shop details associated with a SKU.
|
|
723
|
+
*/
|
|
724
|
+
const SkuApiShopSchema = zod_mini.object({
|
|
725
|
+
id: zod_mini.number(),
|
|
726
|
+
logo: zod_mini.nullish(zod_mini.string()),
|
|
727
|
+
name: zod_mini.string(),
|
|
728
|
+
photo: zod_mini.string(),
|
|
729
|
+
url: zod_mini.string(),
|
|
730
|
+
isInstallment: zod_mini.boolean(),
|
|
731
|
+
qtyPurchasedInfo: zod_mini.nullish(zod_mini.string()),
|
|
732
|
+
rating: zod_mini.nullish(zod_mini.number()),
|
|
733
|
+
daysSinceRegistration: zod_mini.number(),
|
|
734
|
+
isMonobrand: zod_mini.boolean()
|
|
735
|
+
});
|
|
736
|
+
/**
|
|
737
|
+
* Schema for brand information.
|
|
738
|
+
*/
|
|
739
|
+
const SkuApiBrandSchema = zod_mini.object({
|
|
740
|
+
id: zod_mini.number(),
|
|
741
|
+
name: zod_mini.string()
|
|
742
|
+
});
|
|
743
|
+
/**
|
|
744
|
+
* Schema for a category item.
|
|
745
|
+
*/
|
|
746
|
+
const SkuApiCategorySchema = zod_mini.object({
|
|
747
|
+
id: zod_mini.number(),
|
|
748
|
+
name: zod_mini.string(),
|
|
749
|
+
isPrimary: zod_mini.boolean()
|
|
750
|
+
});
|
|
751
|
+
/**
|
|
752
|
+
* Schema for an attribute property value.
|
|
753
|
+
*/
|
|
754
|
+
const SkuApiAttributePropertyValueSchema = zod_mini.object({
|
|
755
|
+
name: zod_mini.string(),
|
|
756
|
+
photo: zod_mini.string()
|
|
757
|
+
});
|
|
758
|
+
/**
|
|
759
|
+
* Schema for a product attribute.
|
|
760
|
+
*/
|
|
761
|
+
const SkuApiAttributePropertySchema = zod_mini.object({
|
|
762
|
+
name: zod_mini.string(),
|
|
763
|
+
value: SkuApiAttributePropertyValueSchema
|
|
764
|
+
});
|
|
765
|
+
/**
|
|
766
|
+
* Schema for SKU attributes configuration.
|
|
767
|
+
*/
|
|
768
|
+
const SkuApiAttributeSchema = zod_mini.object({
|
|
769
|
+
skuId: zod_mini.number(),
|
|
770
|
+
quantity: zod_mini.number(),
|
|
771
|
+
attributeProperties: zod_mini.array(SkuApiAttributePropertySchema)
|
|
772
|
+
});
|
|
773
|
+
/**
|
|
774
|
+
* Schema for a product tag.
|
|
775
|
+
*/
|
|
776
|
+
const SkuApiTagSchema = zod_mini.object({
|
|
777
|
+
type: zod_mini.string(),
|
|
778
|
+
name: zod_mini.string(),
|
|
779
|
+
svg: zod_mini.string(),
|
|
780
|
+
value: zod_mini.nullish(zod_mini.string())
|
|
781
|
+
});
|
|
782
|
+
/**
|
|
783
|
+
* Type literal for SKU stock availability type
|
|
784
|
+
*/
|
|
785
|
+
const SkuStockAvailabilityTypeSchema = zod_mini.literal("stock");
|
|
786
|
+
/**
|
|
787
|
+
* Schema for stock availability information.
|
|
788
|
+
*/
|
|
789
|
+
const SkuApiStockAvailabilitySchema = zod_mini.object({
|
|
790
|
+
type: SkuStockAvailabilityTypeSchema,
|
|
791
|
+
svg: zod_mini.nullish(zod_mini.string()),
|
|
792
|
+
text: zod_mini.string(),
|
|
793
|
+
maxQty: zod_mini.number(),
|
|
794
|
+
maxQtyReason: zod_mini.string()
|
|
795
|
+
});
|
|
796
|
+
/**
|
|
797
|
+
* Response schema for getting a specific SKU by ID.
|
|
798
|
+
*/
|
|
799
|
+
const SkuApiGetResponseSchema = zod_mini.object({
|
|
800
|
+
productId: zod_mini.number(),
|
|
801
|
+
skuId: zod_mini.number(),
|
|
802
|
+
description: zod_mini.string(),
|
|
803
|
+
name: zod_mini.string(),
|
|
804
|
+
photos: zod_mini.array(zod_mini.string()),
|
|
805
|
+
shortDescription: zod_mini.string(),
|
|
806
|
+
discount: zod_mini.number(),
|
|
807
|
+
originalPrice: zod_mini.number(),
|
|
808
|
+
percentDiscount: zod_mini.number(),
|
|
809
|
+
price: zod_mini.number(),
|
|
810
|
+
qty: zod_mini.number(),
|
|
811
|
+
stockAvailability: zod_mini.nullish(SkuApiStockAvailabilitySchema),
|
|
812
|
+
installment: zod_mini.nullish(SkuApiInstallmentSchema),
|
|
813
|
+
isPromo: zod_mini.boolean(),
|
|
814
|
+
promoName: zod_mini.string(),
|
|
815
|
+
promocodes: zod_mini.array(zod_mini.string()),
|
|
816
|
+
qtyPurchasedInfo: zod_mini.nullish(zod_mini.string()),
|
|
817
|
+
rating: zod_mini.nullish(zod_mini.number()),
|
|
818
|
+
scoreQuantity: zod_mini.nullish(zod_mini.number()),
|
|
819
|
+
textReviewQuantity: zod_mini.nullish(zod_mini.number()),
|
|
820
|
+
brand: zod_mini.nullish(SkuApiBrandSchema),
|
|
821
|
+
categories: zod_mini.array(SkuApiCategorySchema),
|
|
822
|
+
shop: SkuApiShopSchema,
|
|
823
|
+
additionalInfo: zod_mini.record(zod_mini.string(), zod_mini.string()),
|
|
824
|
+
attributes: zod_mini.array(SkuApiAttributeSchema),
|
|
825
|
+
tags: zod_mini.array(SkuApiTagSchema)
|
|
826
|
+
});
|
|
827
|
+
/**
|
|
828
|
+
* Schema for a similar product item.
|
|
829
|
+
*/
|
|
830
|
+
const SkuApiSimilarItemSchema = zod_mini.object({
|
|
831
|
+
productId: zod_mini.number(),
|
|
832
|
+
skuId: zod_mini.number(),
|
|
833
|
+
imageUrl: zod_mini.string(),
|
|
834
|
+
name: zod_mini.string(),
|
|
835
|
+
shortDescription: zod_mini.string(),
|
|
836
|
+
thumbnailUrl: zod_mini.string(),
|
|
837
|
+
originalPrice: zod_mini.number(),
|
|
838
|
+
price: zod_mini.number(),
|
|
839
|
+
qty: zod_mini.number(),
|
|
840
|
+
isPromo: zod_mini.boolean(),
|
|
841
|
+
promoName: zod_mini.string(),
|
|
842
|
+
qtyPurchasedInfo: zod_mini.nullish(zod_mini.string()),
|
|
843
|
+
rating: zod_mini.nullish(zod_mini.number()),
|
|
844
|
+
scoreQuantity: zod_mini.nullish(zod_mini.number()),
|
|
845
|
+
moderationStatus: zod_mini.number()
|
|
846
|
+
});
|
|
847
|
+
/**
|
|
848
|
+
* Response schema for similar SKUs.
|
|
849
|
+
*/
|
|
850
|
+
const SkuApiGetSimilarResponseSchema = zod_mini.object({
|
|
851
|
+
items: zod_mini.array(SkuApiSimilarItemSchema),
|
|
852
|
+
pageNumber: zod_mini.number(),
|
|
853
|
+
totalPages: zod_mini.number(),
|
|
854
|
+
totalCount: zod_mini.number(),
|
|
855
|
+
hasPreviousPage: zod_mini.boolean(),
|
|
856
|
+
hasNextPage: zod_mini.boolean()
|
|
857
|
+
});
|
|
858
|
+
/**
|
|
859
|
+
* Schema for a collection item.
|
|
860
|
+
*/
|
|
861
|
+
const SkuApiCollectionItemSchema = zod_mini.object({
|
|
862
|
+
id: zod_mini.number(),
|
|
863
|
+
cover: zod_mini.string(),
|
|
864
|
+
icon: zod_mini.string(),
|
|
865
|
+
name: zod_mini.string(),
|
|
866
|
+
quantity: zod_mini.number(),
|
|
867
|
+
priority: zod_mini.number()
|
|
868
|
+
});
|
|
869
|
+
/**
|
|
870
|
+
* Response schema for SKU collections.
|
|
871
|
+
*/
|
|
872
|
+
const SkuApiGetCollectionsResponseSchema = zod_mini.array(SkuApiCollectionItemSchema);
|
|
873
|
+
/**
|
|
874
|
+
* Response schema for review availability check.
|
|
875
|
+
*/
|
|
876
|
+
const SkuApiGetReviewAvailableResponseSchema = zod_mini.object({
|
|
877
|
+
description: zod_mini.string(),
|
|
878
|
+
message: zod_mini.string()
|
|
879
|
+
});
|
|
880
|
+
|
|
881
|
+
//#endregion
|
|
882
|
+
//#region src/api/sku/api.ts
|
|
883
|
+
/**
|
|
884
|
+
* API for interacting with SKU-related endpoints.
|
|
885
|
+
*/
|
|
886
|
+
var SkuApi = class {
|
|
887
|
+
constructor(http) {
|
|
888
|
+
this.http = http;
|
|
889
|
+
}
|
|
890
|
+
/**
|
|
891
|
+
* Retrieves details of a specific SKU.
|
|
892
|
+
*/
|
|
893
|
+
async get(params) {
|
|
894
|
+
return await this.http.get({
|
|
895
|
+
path: `/api/v2/sku/${params.skuId}`,
|
|
896
|
+
params,
|
|
897
|
+
schema: SkuApiGetResponseSchema
|
|
898
|
+
});
|
|
899
|
+
}
|
|
900
|
+
/**
|
|
901
|
+
* Retrieves similar SKUs.
|
|
902
|
+
*/
|
|
903
|
+
async getSimilar(params) {
|
|
904
|
+
return await this.http.get({
|
|
905
|
+
path: "/api/v2/sku/similar-skus",
|
|
906
|
+
params,
|
|
907
|
+
schema: SkuApiGetSimilarResponseSchema
|
|
908
|
+
});
|
|
909
|
+
}
|
|
910
|
+
/**
|
|
911
|
+
* Retrieves collections associated with a SKU.
|
|
912
|
+
*/
|
|
913
|
+
async getCollections(params) {
|
|
914
|
+
return await this.http.get({
|
|
915
|
+
path: `/sku/${params.skuId}/collections`,
|
|
916
|
+
params,
|
|
917
|
+
schema: SkuApiGetCollectionsResponseSchema
|
|
918
|
+
});
|
|
919
|
+
}
|
|
920
|
+
/**
|
|
921
|
+
* Checks if a review is available for a SKU.
|
|
922
|
+
*/
|
|
923
|
+
async getReviewAvailable(params) {
|
|
924
|
+
return await this.http.get({
|
|
925
|
+
path: `/sku/${params.skuId}/review-available`,
|
|
926
|
+
params,
|
|
927
|
+
schema: SkuApiGetReviewAvailableResponseSchema
|
|
928
|
+
});
|
|
929
|
+
}
|
|
930
|
+
};
|
|
931
|
+
|
|
932
|
+
//#endregion
|
|
933
|
+
//#region src/common/constants.ts
|
|
934
|
+
/**
|
|
935
|
+
* The default base URL for the Teez B2C API.
|
|
936
|
+
*/
|
|
937
|
+
const BASE_URL = "https://b2c-api.teez.kz";
|
|
938
|
+
/**
|
|
939
|
+
* Supported languages for the API.
|
|
940
|
+
*/
|
|
941
|
+
const LANGUAGES = {
|
|
942
|
+
RU: "ru",
|
|
943
|
+
KZ: "kz"
|
|
944
|
+
};
|
|
945
|
+
/**
|
|
946
|
+
* Standard sort options for product and collection searches
|
|
947
|
+
*/
|
|
948
|
+
const SORT_OPTIONS = {
|
|
949
|
+
BY_RELEVANCE: "byRelevance",
|
|
950
|
+
POPULARITY: "popularity",
|
|
951
|
+
HIGHEST_RATED: "highestRated",
|
|
952
|
+
NEW: "new",
|
|
953
|
+
PRICE: "price",
|
|
954
|
+
PRICE_DESC: "priceDesc"
|
|
955
|
+
};
|
|
956
|
+
/**
|
|
957
|
+
* Default application version code.
|
|
958
|
+
*/
|
|
959
|
+
const DEFAULT_APP_VERSION = "193";
|
|
960
|
+
|
|
961
|
+
//#endregion
|
|
962
|
+
//#region src/config.ts
|
|
963
|
+
/**
|
|
964
|
+
* Default configuration values.
|
|
965
|
+
*/
|
|
966
|
+
const DEFAULT_CONFIG = {
|
|
967
|
+
baseUrl: BASE_URL,
|
|
968
|
+
appVersion: DEFAULT_APP_VERSION,
|
|
969
|
+
language: "ru",
|
|
970
|
+
timeout: 3e4,
|
|
971
|
+
headers: {}
|
|
972
|
+
};
|
|
973
|
+
/**
|
|
974
|
+
* Merges user configuration with defaults.
|
|
975
|
+
*/
|
|
976
|
+
function resolveConfig(config) {
|
|
977
|
+
return {
|
|
978
|
+
baseUrl: config?.baseUrl ?? DEFAULT_CONFIG.baseUrl,
|
|
979
|
+
appVersion: config?.appVersion ?? DEFAULT_CONFIG.appVersion,
|
|
980
|
+
language: config?.language ?? DEFAULT_CONFIG.language,
|
|
981
|
+
timeout: config?.timeout ?? DEFAULT_CONFIG.timeout,
|
|
982
|
+
headers: {
|
|
983
|
+
...DEFAULT_CONFIG.headers,
|
|
984
|
+
...config?.headers
|
|
985
|
+
}
|
|
986
|
+
};
|
|
987
|
+
}
|
|
988
|
+
/**
|
|
989
|
+
* Builds a standard user-agent string for the Teez client.
|
|
990
|
+
*/
|
|
991
|
+
function buildUserAgent(appVersion) {
|
|
992
|
+
return `android;kz.teez.customer;${appVersion}`;
|
|
993
|
+
}
|
|
994
|
+
/**
|
|
995
|
+
* Builds the headers object for API requests based on configuration.
|
|
996
|
+
*/
|
|
997
|
+
function buildHeaders(config) {
|
|
998
|
+
return {
|
|
999
|
+
"accept-language": config.language,
|
|
1000
|
+
"user-agent": buildUserAgent(config.appVersion),
|
|
1001
|
+
"x-app-version": config.appVersion,
|
|
1002
|
+
...config.headers
|
|
1003
|
+
};
|
|
1004
|
+
}
|
|
1005
|
+
|
|
1006
|
+
//#endregion
|
|
1007
|
+
//#region src/errors/teez-error.ts
|
|
1008
|
+
/**
|
|
1009
|
+
* Base error class for all SDK-related errors.
|
|
1010
|
+
*/
|
|
1011
|
+
var TeezError = class extends Error {
|
|
1012
|
+
name = "TeezError";
|
|
1013
|
+
};
|
|
1014
|
+
|
|
1015
|
+
//#endregion
|
|
1016
|
+
//#region src/errors/teez-api-error.ts
|
|
1017
|
+
/**
|
|
1018
|
+
* Error thrown when the API response indicates a failure (4xx or 5xx status).
|
|
1019
|
+
*/
|
|
1020
|
+
var TeezApiError = class extends TeezError {
|
|
1021
|
+
name = "TeezApiError";
|
|
1022
|
+
/**
|
|
1023
|
+
* HTTP status code.
|
|
1024
|
+
*/
|
|
1025
|
+
status;
|
|
1026
|
+
/**
|
|
1027
|
+
* HTTP status text.
|
|
1028
|
+
*/
|
|
1029
|
+
statusText;
|
|
1030
|
+
/**
|
|
1031
|
+
* URL of the request that failed.
|
|
1032
|
+
*/
|
|
1033
|
+
url;
|
|
1034
|
+
/**
|
|
1035
|
+
* Response body, if available.
|
|
1036
|
+
*/
|
|
1037
|
+
body;
|
|
1038
|
+
constructor(message, { url, status, statusText, body, ...errorOptions }) {
|
|
1039
|
+
super(message, errorOptions);
|
|
1040
|
+
this.status = status;
|
|
1041
|
+
this.statusText = statusText;
|
|
1042
|
+
this.url = url;
|
|
1043
|
+
this.body = body;
|
|
1044
|
+
}
|
|
1045
|
+
/**
|
|
1046
|
+
* Checks if the status code is a client error (4xx).
|
|
1047
|
+
*/
|
|
1048
|
+
get isClientError() {
|
|
1049
|
+
return this.status >= 400 && this.status < 500;
|
|
1050
|
+
}
|
|
1051
|
+
/**
|
|
1052
|
+
* Checks if the status code is a server error (5xx).
|
|
1053
|
+
*/
|
|
1054
|
+
get isServerError() {
|
|
1055
|
+
return this.status >= 500;
|
|
1056
|
+
}
|
|
1057
|
+
/**
|
|
1058
|
+
* Checks if the status code indicates a Not Found error (404).
|
|
1059
|
+
*/
|
|
1060
|
+
get isNotFound() {
|
|
1061
|
+
return this.status === 404;
|
|
1062
|
+
}
|
|
1063
|
+
};
|
|
1064
|
+
|
|
1065
|
+
//#endregion
|
|
1066
|
+
//#region src/errors/teez-network-error.ts
|
|
1067
|
+
/**
|
|
1068
|
+
* Error thrown when a network request fails (e.g., DNS resolution, connection refused).
|
|
1069
|
+
*/
|
|
1070
|
+
var TeezNetworkError = class extends TeezError {
|
|
1071
|
+
name = "TeezNetworkError";
|
|
1072
|
+
/**
|
|
1073
|
+
* URL of the request that failed.
|
|
1074
|
+
*/
|
|
1075
|
+
url;
|
|
1076
|
+
constructor(message, { url, ...errorOptions }) {
|
|
1077
|
+
super(message, errorOptions);
|
|
1078
|
+
this.url = url;
|
|
1079
|
+
}
|
|
1080
|
+
};
|
|
1081
|
+
|
|
1082
|
+
//#endregion
|
|
1083
|
+
//#region src/errors/teez-timeout-error.ts
|
|
1084
|
+
/**
|
|
1085
|
+
* Error thrown when an API request times out.
|
|
1086
|
+
*/
|
|
1087
|
+
var TeezTimeoutError = class extends TeezError {
|
|
1088
|
+
name = "TeezTimeoutError";
|
|
1089
|
+
/**
|
|
1090
|
+
* URL of the request that timed out.
|
|
1091
|
+
*/
|
|
1092
|
+
url;
|
|
1093
|
+
/**
|
|
1094
|
+
* Timeout duration in milliseconds.
|
|
1095
|
+
*/
|
|
1096
|
+
timeout;
|
|
1097
|
+
constructor(message, { url, timeout, ...errorOptions }) {
|
|
1098
|
+
super(message, errorOptions);
|
|
1099
|
+
this.url = url;
|
|
1100
|
+
this.timeout = timeout;
|
|
1101
|
+
}
|
|
1102
|
+
};
|
|
1103
|
+
|
|
1104
|
+
//#endregion
|
|
1105
|
+
//#region src/errors/teez-validation-error.ts
|
|
1106
|
+
/**
|
|
1107
|
+
* Error thrown when validation fails.
|
|
1108
|
+
*/
|
|
1109
|
+
var TeezValidationError = class extends TeezError {
|
|
1110
|
+
name = "TeezValidationError";
|
|
1111
|
+
/**
|
|
1112
|
+
* List of standardized validation issues.
|
|
1113
|
+
*/
|
|
1114
|
+
issues;
|
|
1115
|
+
/**
|
|
1116
|
+
* The raw data that failed validation.
|
|
1117
|
+
*/
|
|
1118
|
+
data;
|
|
1119
|
+
constructor(message, { issues, data, ...errorOptions }) {
|
|
1120
|
+
super(message, errorOptions);
|
|
1121
|
+
this.issues = issues;
|
|
1122
|
+
this.data = data;
|
|
1123
|
+
}
|
|
1124
|
+
};
|
|
1125
|
+
|
|
1126
|
+
//#endregion
|
|
1127
|
+
//#region src/http/helpers.ts
|
|
1128
|
+
/**
|
|
1129
|
+
* Constructs a full URL with query parameters.
|
|
1130
|
+
*/
|
|
1131
|
+
function buildUrl(path, baseUrl, queryParams) {
|
|
1132
|
+
const url = new URL(path, baseUrl);
|
|
1133
|
+
if (queryParams != void 0) for (const [key, value] of Object.entries(queryParams)) {
|
|
1134
|
+
if (value == void 0) continue;
|
|
1135
|
+
if (Array.isArray(value)) for (const item of value) url.searchParams.append(key, String(item));
|
|
1136
|
+
else url.searchParams.set(key, String(value));
|
|
1137
|
+
}
|
|
1138
|
+
return String(url);
|
|
1139
|
+
}
|
|
1140
|
+
/**
|
|
1141
|
+
* Converts Zod ZodError to abstract ValidationIssue[].
|
|
1142
|
+
*/
|
|
1143
|
+
function toValidationIssues(error) {
|
|
1144
|
+
return error.issues.map((issue) => ({
|
|
1145
|
+
code: issue.code,
|
|
1146
|
+
path: issue.path,
|
|
1147
|
+
message: issue.message
|
|
1148
|
+
}));
|
|
1149
|
+
}
|
|
1150
|
+
/**
|
|
1151
|
+
* Validates and parses the API response data against a schema.
|
|
1152
|
+
*/
|
|
1153
|
+
function parseResponse(schema, data) {
|
|
1154
|
+
const result = zod_mini.safeParse(schema, data);
|
|
1155
|
+
if (!result.success) throw new TeezValidationError("Response validation failed", {
|
|
1156
|
+
issues: toValidationIssues(result.error),
|
|
1157
|
+
data
|
|
1158
|
+
});
|
|
1159
|
+
return result.data;
|
|
1160
|
+
}
|
|
1161
|
+
|
|
1162
|
+
//#endregion
|
|
1163
|
+
//#region src/http/client.ts
|
|
1164
|
+
/**
|
|
1165
|
+
* Internal HTTP client for making API requests.
|
|
1166
|
+
*/
|
|
1167
|
+
var HttpClient = class {
|
|
1168
|
+
/**
|
|
1169
|
+
* Base URL for all requests.
|
|
1170
|
+
*/
|
|
1171
|
+
baseUrl;
|
|
1172
|
+
/**
|
|
1173
|
+
* Headers to include in all requests.
|
|
1174
|
+
*/
|
|
1175
|
+
headers;
|
|
1176
|
+
/**
|
|
1177
|
+
* Request timeout in milliseconds.
|
|
1178
|
+
*/
|
|
1179
|
+
timeout;
|
|
1180
|
+
constructor(config) {
|
|
1181
|
+
this.baseUrl = config.baseUrl;
|
|
1182
|
+
this.headers = buildHeaders(config);
|
|
1183
|
+
this.timeout = config.timeout;
|
|
1184
|
+
}
|
|
1185
|
+
/**
|
|
1186
|
+
* Performs a low-level HTTP request.
|
|
1187
|
+
*/
|
|
1188
|
+
async request(options) {
|
|
1189
|
+
const { url, headers, ...fetchOptions } = options;
|
|
1190
|
+
const controller = new AbortController();
|
|
1191
|
+
const timeoutId = setTimeout(() => {
|
|
1192
|
+
controller.abort();
|
|
1193
|
+
}, this.timeout);
|
|
1194
|
+
try {
|
|
1195
|
+
const response = await fetch(url, {
|
|
1196
|
+
...fetchOptions,
|
|
1197
|
+
headers: {
|
|
1198
|
+
...this.headers,
|
|
1199
|
+
...headers
|
|
1200
|
+
},
|
|
1201
|
+
signal: controller.signal
|
|
1202
|
+
});
|
|
1203
|
+
if (!response.ok) {
|
|
1204
|
+
let body;
|
|
1205
|
+
try {
|
|
1206
|
+
body = await response.json();
|
|
1207
|
+
} catch {
|
|
1208
|
+
body = await response.text().catch(() => void 0);
|
|
1209
|
+
}
|
|
1210
|
+
throw new TeezApiError(`API request failed: ${response.status} ${response.statusText}`, {
|
|
1211
|
+
url,
|
|
1212
|
+
status: response.status,
|
|
1213
|
+
statusText: response.statusText,
|
|
1214
|
+
body
|
|
1215
|
+
});
|
|
1216
|
+
}
|
|
1217
|
+
return await response.json();
|
|
1218
|
+
} catch (error) {
|
|
1219
|
+
if (error instanceof TeezApiError) throw error;
|
|
1220
|
+
if (error instanceof DOMException && error.name === "AbortError") throw new TeezTimeoutError(`Request timed out after ${this.timeout}ms`, {
|
|
1221
|
+
url,
|
|
1222
|
+
timeout: this.timeout,
|
|
1223
|
+
cause: error
|
|
1224
|
+
});
|
|
1225
|
+
throw new TeezNetworkError(`Network request failed`, {
|
|
1226
|
+
url,
|
|
1227
|
+
cause: error
|
|
1228
|
+
});
|
|
1229
|
+
} finally {
|
|
1230
|
+
clearTimeout(timeoutId);
|
|
1231
|
+
}
|
|
1232
|
+
}
|
|
1233
|
+
/**
|
|
1234
|
+
* Performs a GET request and validates the response.
|
|
1235
|
+
*/
|
|
1236
|
+
async get(options) {
|
|
1237
|
+
const { path, params, schema, ...rest } = options;
|
|
1238
|
+
const url = buildUrl(path, this.baseUrl, params);
|
|
1239
|
+
return parseResponse(schema, await this.request({
|
|
1240
|
+
url,
|
|
1241
|
+
method: "GET",
|
|
1242
|
+
...rest
|
|
1243
|
+
}));
|
|
1244
|
+
}
|
|
1245
|
+
};
|
|
1246
|
+
|
|
1247
|
+
//#endregion
|
|
1248
|
+
//#region src/client.ts
|
|
1249
|
+
/**
|
|
1250
|
+
* Main client for interacting with the Teez B2C API.
|
|
1251
|
+
*/
|
|
1252
|
+
var TeezClient = class {
|
|
1253
|
+
/**
|
|
1254
|
+
* Configuration used by the client.
|
|
1255
|
+
*/
|
|
1256
|
+
config;
|
|
1257
|
+
/**
|
|
1258
|
+
* HTTP client for making requests.
|
|
1259
|
+
*/
|
|
1260
|
+
http;
|
|
1261
|
+
/**
|
|
1262
|
+
* API for retrieving banners.
|
|
1263
|
+
*/
|
|
1264
|
+
banners;
|
|
1265
|
+
/**
|
|
1266
|
+
* API for retrieving categories.
|
|
1267
|
+
*/
|
|
1268
|
+
categories;
|
|
1269
|
+
/**
|
|
1270
|
+
* API for retrieving collections.
|
|
1271
|
+
*/
|
|
1272
|
+
collections;
|
|
1273
|
+
/**
|
|
1274
|
+
* API for retrieving feature flags.
|
|
1275
|
+
*/
|
|
1276
|
+
featureFlags;
|
|
1277
|
+
/**
|
|
1278
|
+
* API for retrieving products.
|
|
1279
|
+
*/
|
|
1280
|
+
products;
|
|
1281
|
+
/**
|
|
1282
|
+
* API for retrieving promotions.
|
|
1283
|
+
*/
|
|
1284
|
+
promo;
|
|
1285
|
+
/**
|
|
1286
|
+
* API for retrieving shops.
|
|
1287
|
+
*/
|
|
1288
|
+
shops;
|
|
1289
|
+
/**
|
|
1290
|
+
* API for retrieving SKU details.
|
|
1291
|
+
*/
|
|
1292
|
+
sku;
|
|
1293
|
+
constructor(config) {
|
|
1294
|
+
this.config = resolveConfig(config);
|
|
1295
|
+
this.http = new HttpClient(this.config);
|
|
1296
|
+
this.banners = new BannersApi(this.http);
|
|
1297
|
+
this.categories = new CategoriesApi(this.http);
|
|
1298
|
+
this.collections = new CollectionsApi(this.http);
|
|
1299
|
+
this.featureFlags = new FeatureFlagsApi(this.http);
|
|
1300
|
+
this.products = new ProductsApi(this.http);
|
|
1301
|
+
this.promo = new PromoApi(this.http);
|
|
1302
|
+
this.shops = new ShopsApi(this.http);
|
|
1303
|
+
this.sku = new SkuApi(this.http);
|
|
1304
|
+
}
|
|
1305
|
+
/**
|
|
1306
|
+
* Returns the current client configuration.
|
|
1307
|
+
*/
|
|
1308
|
+
getConfig() {
|
|
1309
|
+
return this.config;
|
|
1310
|
+
}
|
|
1311
|
+
};
|
|
1312
|
+
|
|
1313
|
+
//#endregion
|
|
1314
|
+
exports.BASE_URL = BASE_URL;
|
|
1315
|
+
exports.BannerActionTypesSchema = BannerActionTypesSchema;
|
|
1316
|
+
exports.BannerImageTypeSchema = BannerImageTypeSchema;
|
|
1317
|
+
exports.BannersApi = BannersApi;
|
|
1318
|
+
exports.BannersApiActionSchema = BannersApiActionSchema;
|
|
1319
|
+
exports.BannersApiBannerItemSchema = BannersApiBannerItemSchema;
|
|
1320
|
+
exports.BannersApiImageSchema = BannersApiImageSchema;
|
|
1321
|
+
exports.BannersApiListResponseSchema = BannersApiListResponseSchema;
|
|
1322
|
+
exports.CategoriesApi = CategoriesApi;
|
|
1323
|
+
exports.CategoriesApiGetParentsResponseItemSchema = CategoriesApiGetParentsResponseItemSchema;
|
|
1324
|
+
exports.CategoriesApiGetParentsResponseSchema = CategoriesApiGetParentsResponseSchema;
|
|
1325
|
+
exports.CategoriesApiGetResponseSchema = CategoriesApiGetResponseSchema;
|
|
1326
|
+
exports.CategoriesApiListResponseItemSchema = CategoriesApiListResponseItemSchema;
|
|
1327
|
+
exports.CategoriesApiListResponseSchema = CategoriesApiListResponseSchema;
|
|
1328
|
+
exports.CollectionTypeSchema = CollectionTypeSchema;
|
|
1329
|
+
exports.CollectionsApi = CollectionsApi;
|
|
1330
|
+
exports.CollectionsApiGetResponseSchema = CollectionsApiGetResponseSchema;
|
|
1331
|
+
exports.CollectionsApiGetSkusResponseSchema = CollectionsApiGetSkusResponseSchema;
|
|
1332
|
+
exports.CollectionsApiListItemSchema = CollectionsApiListItemSchema;
|
|
1333
|
+
exports.CollectionsApiListResponseSchema = CollectionsApiListResponseSchema;
|
|
1334
|
+
exports.CollectionsApiSkuItemSchema = CollectionsApiSkuItemSchema;
|
|
1335
|
+
exports.CollectionsApiStockAvailabilitySchema = CollectionsApiStockAvailabilitySchema;
|
|
1336
|
+
exports.CollectionsStockAvailabilityTypeSchema = CollectionsStockAvailabilityTypeSchema;
|
|
1337
|
+
exports.DEFAULT_APP_VERSION = DEFAULT_APP_VERSION;
|
|
1338
|
+
exports.DEFAULT_CONFIG = DEFAULT_CONFIG;
|
|
1339
|
+
exports.FeatureFlagsApi = FeatureFlagsApi;
|
|
1340
|
+
exports.FeatureFlagsApiItemSchema = FeatureFlagsApiItemSchema;
|
|
1341
|
+
exports.FeatureFlagsApiListResponseSchema = FeatureFlagsApiListResponseSchema;
|
|
1342
|
+
exports.LANGUAGES = LANGUAGES;
|
|
1343
|
+
exports.ProductSortKeySchema = ProductSortKeySchema;
|
|
1344
|
+
exports.ProductsApi = ProductsApi;
|
|
1345
|
+
exports.ProductsApiBadgeSchema = ProductsApiBadgeSchema;
|
|
1346
|
+
exports.ProductsApiGetReviewsResponseSchema = ProductsApiGetReviewsResponseSchema;
|
|
1347
|
+
exports.ProductsApiGetSortOptionsResponseSchema = ProductsApiGetSortOptionsResponseSchema;
|
|
1348
|
+
exports.ProductsApiListResponseSchema = ProductsApiListResponseSchema;
|
|
1349
|
+
exports.ProductsApiProductItemSchema = ProductsApiProductItemSchema;
|
|
1350
|
+
exports.ProductsApiReviewItemSchema = ProductsApiReviewItemSchema;
|
|
1351
|
+
exports.ProductsApiSortOptionSchema = ProductsApiSortOptionSchema;
|
|
1352
|
+
exports.ProductsApiStockAvailabilitySchema = ProductsApiStockAvailabilitySchema;
|
|
1353
|
+
exports.ProductsStockAvailabilityTypeSchema = ProductsStockAvailabilityTypeSchema;
|
|
1354
|
+
exports.PromoApi = PromoApi;
|
|
1355
|
+
exports.PromoApiItemSchema = PromoApiItemSchema;
|
|
1356
|
+
exports.PromoApiListResponseSchema = PromoApiListResponseSchema;
|
|
1357
|
+
exports.SORT_OPTIONS = SORT_OPTIONS;
|
|
1358
|
+
exports.ShopsApi = ShopsApi;
|
|
1359
|
+
exports.ShopsApiContactInfoSchema = ShopsApiContactInfoSchema;
|
|
1360
|
+
exports.ShopsApiGetMonobrandResponseSchema = ShopsApiGetMonobrandResponseSchema;
|
|
1361
|
+
exports.ShopsApiGetProductsResponseSchema = ShopsApiGetProductsResponseSchema;
|
|
1362
|
+
exports.ShopsApiGetResponseSchema = ShopsApiGetResponseSchema;
|
|
1363
|
+
exports.ShopsApiProductItemSchema = ShopsApiProductItemSchema;
|
|
1364
|
+
exports.ShopsApiShopItemSchema = ShopsApiShopItemSchema;
|
|
1365
|
+
exports.ShopsApiStockAvailabilitySchema = ShopsApiStockAvailabilitySchema;
|
|
1366
|
+
exports.ShopsApiTagSchema = ShopsApiTagSchema;
|
|
1367
|
+
exports.ShopsStockAvailabilityTypeSchema = ShopsStockAvailabilityTypeSchema;
|
|
1368
|
+
exports.SkuApi = SkuApi;
|
|
1369
|
+
exports.SkuApiAttributePropertySchema = SkuApiAttributePropertySchema;
|
|
1370
|
+
exports.SkuApiAttributePropertyValueSchema = SkuApiAttributePropertyValueSchema;
|
|
1371
|
+
exports.SkuApiAttributeSchema = SkuApiAttributeSchema;
|
|
1372
|
+
exports.SkuApiBrandSchema = SkuApiBrandSchema;
|
|
1373
|
+
exports.SkuApiCategorySchema = SkuApiCategorySchema;
|
|
1374
|
+
exports.SkuApiCollectionItemSchema = SkuApiCollectionItemSchema;
|
|
1375
|
+
exports.SkuApiGetCollectionsResponseSchema = SkuApiGetCollectionsResponseSchema;
|
|
1376
|
+
exports.SkuApiGetResponseSchema = SkuApiGetResponseSchema;
|
|
1377
|
+
exports.SkuApiGetReviewAvailableResponseSchema = SkuApiGetReviewAvailableResponseSchema;
|
|
1378
|
+
exports.SkuApiGetSimilarResponseSchema = SkuApiGetSimilarResponseSchema;
|
|
1379
|
+
exports.SkuApiInstallmentSchema = SkuApiInstallmentSchema;
|
|
1380
|
+
exports.SkuApiShopSchema = SkuApiShopSchema;
|
|
1381
|
+
exports.SkuApiSimilarItemSchema = SkuApiSimilarItemSchema;
|
|
1382
|
+
exports.SkuApiStockAvailabilitySchema = SkuApiStockAvailabilitySchema;
|
|
1383
|
+
exports.SkuApiTagSchema = SkuApiTagSchema;
|
|
1384
|
+
exports.SkuStockAvailabilityTypeSchema = SkuStockAvailabilityTypeSchema;
|
|
1385
|
+
exports.TeezApiError = TeezApiError;
|
|
1386
|
+
exports.TeezClient = TeezClient;
|
|
1387
|
+
exports.TeezError = TeezError;
|
|
1388
|
+
exports.TeezNetworkError = TeezNetworkError;
|
|
1389
|
+
exports.TeezTimeoutError = TeezTimeoutError;
|
|
1390
|
+
exports.TeezValidationError = TeezValidationError;
|
|
1391
|
+
exports.buildHeaders = buildHeaders;
|
|
1392
|
+
exports.buildUserAgent = buildUserAgent;
|
|
1393
|
+
exports.resolveConfig = resolveConfig;
|
|
1394
|
+
//# sourceMappingURL=index.cjs.map
|