@ecomiq/core 0.1.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.
Files changed (68) hide show
  1. package/README.md +42 -0
  2. package/dist/api.cjs +99 -0
  3. package/dist/api.cjs.map +1 -0
  4. package/dist/api.d.cts +52 -0
  5. package/dist/api.d.ts +52 -0
  6. package/dist/api.js +93 -0
  7. package/dist/api.js.map +1 -0
  8. package/dist/client.cjs +1344 -0
  9. package/dist/client.cjs.map +1 -0
  10. package/dist/client.d.cts +82 -0
  11. package/dist/client.d.ts +82 -0
  12. package/dist/client.js +1341 -0
  13. package/dist/client.js.map +1 -0
  14. package/dist/index.cjs +1611 -0
  15. package/dist/index.cjs.map +1 -0
  16. package/dist/index.d.cts +1109 -0
  17. package/dist/index.d.ts +1109 -0
  18. package/dist/index.js +1450 -0
  19. package/dist/index.js.map +1 -0
  20. package/dist/models/collections.cjs +20 -0
  21. package/dist/models/collections.cjs.map +1 -0
  22. package/dist/models/collections.d.cts +56 -0
  23. package/dist/models/collections.d.ts +56 -0
  24. package/dist/models/collections.js +17 -0
  25. package/dist/models/collections.js.map +1 -0
  26. package/dist/models/geo.cjs +62 -0
  27. package/dist/models/geo.cjs.map +1 -0
  28. package/dist/models/geo.d.cts +279 -0
  29. package/dist/models/geo.d.ts +279 -0
  30. package/dist/models/geo.js +48 -0
  31. package/dist/models/geo.js.map +1 -0
  32. package/dist/models/products.cjs +212 -0
  33. package/dist/models/products.cjs.map +1 -0
  34. package/dist/models/products.d.cts +1421 -0
  35. package/dist/models/products.d.ts +1421 -0
  36. package/dist/models/products.js +187 -0
  37. package/dist/models/products.js.map +1 -0
  38. package/dist/models/search.cjs +200 -0
  39. package/dist/models/search.cjs.map +1 -0
  40. package/dist/models/search.d.cts +51 -0
  41. package/dist/models/search.d.ts +51 -0
  42. package/dist/models/search.js +196 -0
  43. package/dist/models/search.js.map +1 -0
  44. package/dist/models/settings.cjs +285 -0
  45. package/dist/models/settings.cjs.map +1 -0
  46. package/dist/models/settings.d.cts +7039 -0
  47. package/dist/models/settings.d.ts +7039 -0
  48. package/dist/models/settings.js +239 -0
  49. package/dist/models/settings.js.map +1 -0
  50. package/dist/models/storefront-cart.cjs +148 -0
  51. package/dist/models/storefront-cart.cjs.map +1 -0
  52. package/dist/models/storefront-cart.d.cts +747 -0
  53. package/dist/models/storefront-cart.d.ts +747 -0
  54. package/dist/models/storefront-cart.js +133 -0
  55. package/dist/models/storefront-cart.js.map +1 -0
  56. package/dist/models/storefront-checkout.cjs +307 -0
  57. package/dist/models/storefront-checkout.cjs.map +1 -0
  58. package/dist/models/storefront-checkout.d.cts +4122 -0
  59. package/dist/models/storefront-checkout.d.ts +4122 -0
  60. package/dist/models/storefront-checkout.js +288 -0
  61. package/dist/models/storefront-checkout.js.map +1 -0
  62. package/dist/models/storefront-reviews.cjs +223 -0
  63. package/dist/models/storefront-reviews.cjs.map +1 -0
  64. package/dist/models/storefront-reviews.d.cts +147 -0
  65. package/dist/models/storefront-reviews.d.ts +147 -0
  66. package/dist/models/storefront-reviews.js +218 -0
  67. package/dist/models/storefront-reviews.js.map +1 -0
  68. package/package.json +109 -0
@@ -0,0 +1,1109 @@
1
+ import { Api } from './api.js';
2
+ export { ApiError, CreateApiOptions, DEFAULT_API_BASE_URL, DEFAULT_API_VERSION, createApi, resolveApiBaseUrl } from './api.js';
3
+ export { CreateClientOptions, StorefrontClient, createClient, createStorefrontClient } from './client.js';
4
+ export { CmsBlockDto, CmsBlockDtoSchema, CmsBrandingSettingsDtoSchema, CmsContactSettingsDtoSchema, CmsContentChannelSchema, CmsCustomScriptsDtoSchema, CmsMenuDto, CmsMenuDtoSchema, CmsMenuItem, CmsMenuItemSchema, CmsPageDetailsDto, CmsPageDetailsDtoSchema, CmsPageStatusSchema, CmsSectionDto, CmsSectionDtoSchema, CmsSeoSettingsDtoSchema, CmsSiteSettingsDtoSchema, CmsSnapshotDto, CmsSnapshotDtoSchema, CmsSocialLinksDtoSchema, CmsTrackingSettingsDtoSchema, JsonElement, JsonElementSchema, StoreCheckoutCartPageSettingsSchema, StoreCheckoutGeneralSettingsSchema, StoreCheckoutOrderBumpSettingsSchema, StoreCheckoutOrdersAndPaymentsSettingsSchema, StoreCheckoutSettingsSchema, StoreCheckoutShippingSettingsSchema, StoreFeatureFlagsSchema, StoreModel, StoreModelSchema, StoreSettingsSnapshotDto, StoreSettingsSnapshotDtoSchema, StoreThemeSettingsSchema, StoreTypeSchema, StoreVisibilitySchema, StorefrontCheckoutSettingsSchema, StorefrontCmsBrandingSchema, StorefrontCmsContactSchema, StorefrontCmsCustomScriptsSchema, StorefrontCmsPageSchema, StorefrontCmsSeoSchema, StorefrontCmsSettingsSchema, StorefrontCmsSocialLinksSchema, StorefrontCmsTrackingSchema, StorefrontFeaturesEnabledSchema, StorefrontMenu, StorefrontMenuItem, StorefrontMenuItemSchema, StorefrontMenuSchema, StorefrontSettings, StorefrontSettingsSchema, StorefrontStoreSchema, StorefrontStoreTypeSchema, StorefrontThemeConfigSchema, getMenuItems } from './models/settings.js';
5
+ export { Collection, CollectionSchema, Collections, CollectionsSchema } from './models/collections.js';
6
+ import { ProductDetailParams, ProductsParamsInput, RelatedProductsParams } from './models/products.js';
7
+ export { BundleItem, BundleItemSchema, Facet, FacetItem, FacetItemSchema, FacetSchema, PriceTier, PriceTierSchema, Product, ProductDetail, ProductDetailParamsSchema, ProductDetailSchema, ProductImage, ProductImageSchema, ProductPriceTier, ProductPriceTierSchema, ProductPublicIdSchema, ProductSchema, ProductSort, ProductSortSchema, ProductSummariesSchema, ProductSummary, ProductSummarySchema, ProductsParams, ProductsParamsSchema, ProductsResponse, ProductsResponseSchema, RelatedProductsParamsSchema, SearchFilter, SearchFilterSchema, SizeGuide, SizeGuideMeasurement, SizeGuideMeasurementSchema, SizeGuideRow, SizeGuideRowSchema, SizeGuideSchema, SpecItem, SpecItemSchema, Variant, VariantItem, VariantItemSchema, VariantOption, VariantOptionSchema, VariantSchema } from './models/products.js';
8
+ import { ProductAutocompleteParams } from './models/search.js';
9
+ export { ProductAutocompleteParamsSchema, ProductSuggestion, ProductSuggestionSchema, ProductSuggestionsSchema } from './models/search.js';
10
+ import { AddCartItemParams, CreateCartParams, GetCartParams, RemoveCartItemParams, UpdateCartItemQuantityParams } from './models/storefront-cart.js';
11
+ export { AddCartItemParamsSchema, CartItemModifierSchema, CreateCartParamsSchema, GetCartParamsSchema, RemoveCartItemParamsSchema, StorefrontAddress, StorefrontAddressSchema, StorefrontCart, StorefrontCartBundleItem, StorefrontCartBundleItemSchema, StorefrontCartItem, StorefrontCartItemSchema, StorefrontCartSchema, StorefrontCartShippingMethod, StorefrontCartShippingMethodSchema, StorefrontCartStatusSchema, StorefrontCartTotals, StorefrontCartTotalsSchema, UpdateCartItemQuantityParamsSchema, cartVariantIdFromProduct } from './models/storefront-cart.js';
12
+ import { CartPromotionCodeParams, CartCheckoutParams, CartCheckoutResponse, CartCheckoutReadParams, CartCheckoutReadResponse, GetShippingOptionsParams, ShippingOptionsResponse, CartAddressesParams, CartBuyerParams, PutShippingMethodParams, UploadPaymentReceiptParams, CartPaymentReceiptResponse } from './models/storefront-checkout.js';
13
+ export { CartAddressWrite, CartAddressWriteSchema, CartAddressesParamsSchema, CartBuyerParamsSchema, CartCheckoutParamsSchema, CartCheckoutPayment, CartCheckoutPaymentActionSchema, CartCheckoutPaymentSchema, CartCheckoutReadParamsSchema, CartCheckoutReadResponseSchema, CartCheckoutResponseSchema, CartPaymentMethod, CartPaymentMethodSchema, CartPaymentReceiptResponseSchema, CartPromotionCodeParamsSchema, GetShippingOptionsParamsSchema, PutShippingMethodParamsSchema, ShippingOptionGroup, ShippingOptionGroupSchema, ShippingOptionsResponseSchema, ShippingRate, ShippingRateSchema, StorefrontOrderBump, StorefrontOrderBumpSchema } from './models/storefront-checkout.js';
14
+ import { CreateProductReviewParams, ListProductReviewsParams } from './models/storefront-reviews.js';
15
+ export { CreateProductReviewParamsSchema, ListProductReviewsParamsSchema, StorefrontReview, StorefrontReviewSchema, StorefrontReviews, StorefrontReviewsSchema } from './models/storefront-reviews.js';
16
+ import { Countries, GetDepartmentsParams, Departments, GetDistrictsParams, Districts, GetProvincesParams, Provinces } from './models/geo.js';
17
+ export { CountriesSchema, Country, CountrySchema, Department, DepartmentSchema, DepartmentsSchema, District, DistrictSchema, DistrictsSchema, GeoDivision, GeoDivisionSchema, GeoDivisionType, GeoDivisionTypeSchema, GetDepartmentsParamsParsed, GetDepartmentsParamsSchema, GetDistrictsParamsParsed, GetDistrictsParamsSchema, GetProvincesParamsParsed, GetProvincesParamsSchema, Province, ProvinceSchema, ProvincesSchema } from './models/geo.js';
18
+ import 'zod';
19
+
20
+ declare function getProducts(api: Api, params?: ProductsParamsInput): Promise<{
21
+ pageIndex: number;
22
+ pageSize: number;
23
+ totalCount: number;
24
+ totalPages: number;
25
+ products: {
26
+ status: string;
27
+ id: string;
28
+ slug: string;
29
+ name: string;
30
+ imageUrl: string;
31
+ productType: string;
32
+ price: number;
33
+ compareAtPrice: number | null;
34
+ variantCount: number;
35
+ isAvailable: boolean;
36
+ totalInventory: number;
37
+ bundleItemsCount: number;
38
+ brand: string;
39
+ category: string;
40
+ collections: string[];
41
+ tags: string[];
42
+ }[];
43
+ filters: {
44
+ type: "list" | "price_range";
45
+ values: {
46
+ value: string;
47
+ count: number;
48
+ label: string | null;
49
+ selected: boolean;
50
+ }[];
51
+ id: string;
52
+ label: string;
53
+ min: number | null;
54
+ max: number | null;
55
+ selectedMin: number | null;
56
+ selectedMax: number | null;
57
+ }[];
58
+ }>;
59
+ declare function getProductBySlug(api: Api, slug: string, params?: ProductDetailParams): Promise<{
60
+ status: string;
61
+ id: string;
62
+ slug: string;
63
+ name: string;
64
+ description: string;
65
+ imageUrl: string;
66
+ productType: string;
67
+ price: number;
68
+ compareAtPrice: number | null;
69
+ isAvailable: boolean;
70
+ totalInventory: number;
71
+ brand: string;
72
+ category: string;
73
+ tags: string[];
74
+ images: {
75
+ name: string;
76
+ url: string;
77
+ order: number;
78
+ }[];
79
+ categoryId: string | null;
80
+ specifications: {
81
+ key: string;
82
+ value: string;
83
+ name: string;
84
+ }[];
85
+ variants: {
86
+ options: {
87
+ key: string;
88
+ value: string;
89
+ name: string;
90
+ }[];
91
+ status: string;
92
+ id: string | null;
93
+ price: number;
94
+ compareAtPrice: number | null;
95
+ sku: string;
96
+ quantity: number;
97
+ images: {
98
+ name: string;
99
+ url: string;
100
+ order: number;
101
+ }[];
102
+ }[];
103
+ bundleItems: {
104
+ imageUrl: string | null;
105
+ brand: string | null;
106
+ productId: string;
107
+ sku: string | null;
108
+ quantity: number;
109
+ variantId: string;
110
+ productName: string;
111
+ variantName: string | null;
112
+ available: number;
113
+ allowBackorders: boolean;
114
+ requiresShipping: boolean;
115
+ }[];
116
+ sizeGuide: {
117
+ id: string;
118
+ slug: string;
119
+ name: string;
120
+ description: string | null;
121
+ imageUrl: string | null;
122
+ gender: string;
123
+ measurementType: string;
124
+ unit: string;
125
+ notes: string | null;
126
+ rows: {
127
+ label: string;
128
+ order: number;
129
+ sizeKey: string;
130
+ measurements: {
131
+ key: string;
132
+ value: number | null;
133
+ name: string;
134
+ description: string | null;
135
+ min: number | null;
136
+ max: number | null;
137
+ }[];
138
+ }[];
139
+ } | null;
140
+ priceTiers: {
141
+ variantId: string;
142
+ minQuantity: number;
143
+ maxQuantity: number | null;
144
+ unitPrice: number;
145
+ }[];
146
+ createdAt: string | null;
147
+ updatedAt: string | null;
148
+ }>;
149
+ declare function getRelatedProducts(api: Api, params: RelatedProductsParams): Promise<{
150
+ status: string;
151
+ id: string;
152
+ slug: string;
153
+ name: string;
154
+ imageUrl: string;
155
+ productType: string;
156
+ price: number;
157
+ compareAtPrice: number | null;
158
+ variantCount: number;
159
+ isAvailable: boolean;
160
+ totalInventory: number;
161
+ bundleItemsCount: number;
162
+ brand: string;
163
+ category: string;
164
+ collections: string[];
165
+ tags: string[];
166
+ }[]>;
167
+
168
+ declare function autocompleteProducts(api: Api, params: ProductAutocompleteParams): Promise<{
169
+ id: string;
170
+ slug: string;
171
+ name: string;
172
+ imageUrl: string;
173
+ }[]>;
174
+
175
+ declare function listProductReviews(api: Api, params: ListProductReviewsParams): Promise<{
176
+ totalCount: number | null;
177
+ data: {
178
+ id: string;
179
+ productId: string;
180
+ isVerifiedPurchase: boolean;
181
+ rating: number;
182
+ title: string | null;
183
+ content: string;
184
+ reviewerName: string | null;
185
+ createdOn: string;
186
+ }[];
187
+ hasNextPage: boolean;
188
+ nextCursor: string | null;
189
+ }>;
190
+ declare function createProductReview(api: Api, params: CreateProductReviewParams): Promise<{
191
+ id: string;
192
+ productId: string;
193
+ isVerifiedPurchase: boolean;
194
+ rating: number;
195
+ title: string | null;
196
+ content: string;
197
+ reviewerName: string | null;
198
+ createdOn: string;
199
+ }>;
200
+
201
+ declare function createCart(api: Api, params: CreateCartParams): Promise<{
202
+ status: "inProgress" | "pending" | "completed" | "abandoned" | "cancelled" | "expired" | "failed";
203
+ id: string;
204
+ phone: string | null;
205
+ cartNumber: string;
206
+ email: string | null;
207
+ firstName: string | null;
208
+ lastName: string | null;
209
+ currencyCode: string;
210
+ completedAt: string | null;
211
+ shippingAddress: {
212
+ name: string | null;
213
+ address1: string;
214
+ city: string;
215
+ countryCode: string;
216
+ company: string | null;
217
+ address2: string | null;
218
+ province: string | null;
219
+ postalCode: string | null;
220
+ district: string | null;
221
+ phone: string | null;
222
+ latitude: number | null;
223
+ longitude: number | null;
224
+ } | null;
225
+ billingAddress: {
226
+ name: string | null;
227
+ address1: string;
228
+ city: string;
229
+ countryCode: string;
230
+ company: string | null;
231
+ address2: string | null;
232
+ province: string | null;
233
+ postalCode: string | null;
234
+ district: string | null;
235
+ phone: string | null;
236
+ latitude: number | null;
237
+ longitude: number | null;
238
+ } | null;
239
+ promotionCodes: string[];
240
+ items: {
241
+ id: string;
242
+ productId: number;
243
+ quantity: number;
244
+ variantId: number;
245
+ unitPrice: number;
246
+ bundleItems: {
247
+ imageUrl: string | null;
248
+ brand: string | null;
249
+ productId: number;
250
+ sku: string | null;
251
+ quantity: number;
252
+ variantId: number;
253
+ productName: string;
254
+ variantName: string | null;
255
+ }[];
256
+ title: string;
257
+ variantLabel: string | null;
258
+ productHandle: string | null;
259
+ thumbnail: string | null;
260
+ variantSku: string | null;
261
+ compareAtUnitPrice: number | null;
262
+ }[];
263
+ shippingMethods: {
264
+ id: string;
265
+ name: string;
266
+ description: string | null;
267
+ sellerId: string | null;
268
+ locationId: string | null;
269
+ shippingMethodId: string | null;
270
+ rateId: string | null;
271
+ total: number;
272
+ estimatedDays: number | null;
273
+ pickupPointId: string | null;
274
+ scheduledDate: string | null;
275
+ scheduledTime: string | null;
276
+ serviceCode: string | null;
277
+ shippingProfileId: string | null;
278
+ }[];
279
+ totals: {
280
+ total: number;
281
+ subtotal: number;
282
+ discountTotal: number;
283
+ shippingOriginalTotal: number;
284
+ shippingTotal: number;
285
+ taxTotal: number;
286
+ warrantyTotal: number;
287
+ };
288
+ }>;
289
+ declare function getCart(api: Api, params: GetCartParams): Promise<{
290
+ status: "inProgress" | "pending" | "completed" | "abandoned" | "cancelled" | "expired" | "failed";
291
+ id: string;
292
+ phone: string | null;
293
+ cartNumber: string;
294
+ email: string | null;
295
+ firstName: string | null;
296
+ lastName: string | null;
297
+ currencyCode: string;
298
+ completedAt: string | null;
299
+ shippingAddress: {
300
+ name: string | null;
301
+ address1: string;
302
+ city: string;
303
+ countryCode: string;
304
+ company: string | null;
305
+ address2: string | null;
306
+ province: string | null;
307
+ postalCode: string | null;
308
+ district: string | null;
309
+ phone: string | null;
310
+ latitude: number | null;
311
+ longitude: number | null;
312
+ } | null;
313
+ billingAddress: {
314
+ name: string | null;
315
+ address1: string;
316
+ city: string;
317
+ countryCode: string;
318
+ company: string | null;
319
+ address2: string | null;
320
+ province: string | null;
321
+ postalCode: string | null;
322
+ district: string | null;
323
+ phone: string | null;
324
+ latitude: number | null;
325
+ longitude: number | null;
326
+ } | null;
327
+ promotionCodes: string[];
328
+ items: {
329
+ id: string;
330
+ productId: number;
331
+ quantity: number;
332
+ variantId: number;
333
+ unitPrice: number;
334
+ bundleItems: {
335
+ imageUrl: string | null;
336
+ brand: string | null;
337
+ productId: number;
338
+ sku: string | null;
339
+ quantity: number;
340
+ variantId: number;
341
+ productName: string;
342
+ variantName: string | null;
343
+ }[];
344
+ title: string;
345
+ variantLabel: string | null;
346
+ productHandle: string | null;
347
+ thumbnail: string | null;
348
+ variantSku: string | null;
349
+ compareAtUnitPrice: number | null;
350
+ }[];
351
+ shippingMethods: {
352
+ id: string;
353
+ name: string;
354
+ description: string | null;
355
+ sellerId: string | null;
356
+ locationId: string | null;
357
+ shippingMethodId: string | null;
358
+ rateId: string | null;
359
+ total: number;
360
+ estimatedDays: number | null;
361
+ pickupPointId: string | null;
362
+ scheduledDate: string | null;
363
+ scheduledTime: string | null;
364
+ serviceCode: string | null;
365
+ shippingProfileId: string | null;
366
+ }[];
367
+ totals: {
368
+ total: number;
369
+ subtotal: number;
370
+ discountTotal: number;
371
+ shippingOriginalTotal: number;
372
+ shippingTotal: number;
373
+ taxTotal: number;
374
+ warrantyTotal: number;
375
+ };
376
+ }>;
377
+ declare function addCartItem(api: Api, params: AddCartItemParams): Promise<{
378
+ status: "inProgress" | "pending" | "completed" | "abandoned" | "cancelled" | "expired" | "failed";
379
+ id: string;
380
+ phone: string | null;
381
+ cartNumber: string;
382
+ email: string | null;
383
+ firstName: string | null;
384
+ lastName: string | null;
385
+ currencyCode: string;
386
+ completedAt: string | null;
387
+ shippingAddress: {
388
+ name: string | null;
389
+ address1: string;
390
+ city: string;
391
+ countryCode: string;
392
+ company: string | null;
393
+ address2: string | null;
394
+ province: string | null;
395
+ postalCode: string | null;
396
+ district: string | null;
397
+ phone: string | null;
398
+ latitude: number | null;
399
+ longitude: number | null;
400
+ } | null;
401
+ billingAddress: {
402
+ name: string | null;
403
+ address1: string;
404
+ city: string;
405
+ countryCode: string;
406
+ company: string | null;
407
+ address2: string | null;
408
+ province: string | null;
409
+ postalCode: string | null;
410
+ district: string | null;
411
+ phone: string | null;
412
+ latitude: number | null;
413
+ longitude: number | null;
414
+ } | null;
415
+ promotionCodes: string[];
416
+ items: {
417
+ id: string;
418
+ productId: number;
419
+ quantity: number;
420
+ variantId: number;
421
+ unitPrice: number;
422
+ bundleItems: {
423
+ imageUrl: string | null;
424
+ brand: string | null;
425
+ productId: number;
426
+ sku: string | null;
427
+ quantity: number;
428
+ variantId: number;
429
+ productName: string;
430
+ variantName: string | null;
431
+ }[];
432
+ title: string;
433
+ variantLabel: string | null;
434
+ productHandle: string | null;
435
+ thumbnail: string | null;
436
+ variantSku: string | null;
437
+ compareAtUnitPrice: number | null;
438
+ }[];
439
+ shippingMethods: {
440
+ id: string;
441
+ name: string;
442
+ description: string | null;
443
+ sellerId: string | null;
444
+ locationId: string | null;
445
+ shippingMethodId: string | null;
446
+ rateId: string | null;
447
+ total: number;
448
+ estimatedDays: number | null;
449
+ pickupPointId: string | null;
450
+ scheduledDate: string | null;
451
+ scheduledTime: string | null;
452
+ serviceCode: string | null;
453
+ shippingProfileId: string | null;
454
+ }[];
455
+ totals: {
456
+ total: number;
457
+ subtotal: number;
458
+ discountTotal: number;
459
+ shippingOriginalTotal: number;
460
+ shippingTotal: number;
461
+ taxTotal: number;
462
+ warrantyTotal: number;
463
+ };
464
+ }>;
465
+ declare function updateCartItemQuantity(api: Api, params: UpdateCartItemQuantityParams): Promise<{
466
+ status: "inProgress" | "pending" | "completed" | "abandoned" | "cancelled" | "expired" | "failed";
467
+ id: string;
468
+ phone: string | null;
469
+ cartNumber: string;
470
+ email: string | null;
471
+ firstName: string | null;
472
+ lastName: string | null;
473
+ currencyCode: string;
474
+ completedAt: string | null;
475
+ shippingAddress: {
476
+ name: string | null;
477
+ address1: string;
478
+ city: string;
479
+ countryCode: string;
480
+ company: string | null;
481
+ address2: string | null;
482
+ province: string | null;
483
+ postalCode: string | null;
484
+ district: string | null;
485
+ phone: string | null;
486
+ latitude: number | null;
487
+ longitude: number | null;
488
+ } | null;
489
+ billingAddress: {
490
+ name: string | null;
491
+ address1: string;
492
+ city: string;
493
+ countryCode: string;
494
+ company: string | null;
495
+ address2: string | null;
496
+ province: string | null;
497
+ postalCode: string | null;
498
+ district: string | null;
499
+ phone: string | null;
500
+ latitude: number | null;
501
+ longitude: number | null;
502
+ } | null;
503
+ promotionCodes: string[];
504
+ items: {
505
+ id: string;
506
+ productId: number;
507
+ quantity: number;
508
+ variantId: number;
509
+ unitPrice: number;
510
+ bundleItems: {
511
+ imageUrl: string | null;
512
+ brand: string | null;
513
+ productId: number;
514
+ sku: string | null;
515
+ quantity: number;
516
+ variantId: number;
517
+ productName: string;
518
+ variantName: string | null;
519
+ }[];
520
+ title: string;
521
+ variantLabel: string | null;
522
+ productHandle: string | null;
523
+ thumbnail: string | null;
524
+ variantSku: string | null;
525
+ compareAtUnitPrice: number | null;
526
+ }[];
527
+ shippingMethods: {
528
+ id: string;
529
+ name: string;
530
+ description: string | null;
531
+ sellerId: string | null;
532
+ locationId: string | null;
533
+ shippingMethodId: string | null;
534
+ rateId: string | null;
535
+ total: number;
536
+ estimatedDays: number | null;
537
+ pickupPointId: string | null;
538
+ scheduledDate: string | null;
539
+ scheduledTime: string | null;
540
+ serviceCode: string | null;
541
+ shippingProfileId: string | null;
542
+ }[];
543
+ totals: {
544
+ total: number;
545
+ subtotal: number;
546
+ discountTotal: number;
547
+ shippingOriginalTotal: number;
548
+ shippingTotal: number;
549
+ taxTotal: number;
550
+ warrantyTotal: number;
551
+ };
552
+ }>;
553
+ declare function removeCartItem(api: Api, params: RemoveCartItemParams): Promise<{
554
+ status: "inProgress" | "pending" | "completed" | "abandoned" | "cancelled" | "expired" | "failed";
555
+ id: string;
556
+ phone: string | null;
557
+ cartNumber: string;
558
+ email: string | null;
559
+ firstName: string | null;
560
+ lastName: string | null;
561
+ currencyCode: string;
562
+ completedAt: string | null;
563
+ shippingAddress: {
564
+ name: string | null;
565
+ address1: string;
566
+ city: string;
567
+ countryCode: string;
568
+ company: string | null;
569
+ address2: string | null;
570
+ province: string | null;
571
+ postalCode: string | null;
572
+ district: string | null;
573
+ phone: string | null;
574
+ latitude: number | null;
575
+ longitude: number | null;
576
+ } | null;
577
+ billingAddress: {
578
+ name: string | null;
579
+ address1: string;
580
+ city: string;
581
+ countryCode: string;
582
+ company: string | null;
583
+ address2: string | null;
584
+ province: string | null;
585
+ postalCode: string | null;
586
+ district: string | null;
587
+ phone: string | null;
588
+ latitude: number | null;
589
+ longitude: number | null;
590
+ } | null;
591
+ promotionCodes: string[];
592
+ items: {
593
+ id: string;
594
+ productId: number;
595
+ quantity: number;
596
+ variantId: number;
597
+ unitPrice: number;
598
+ bundleItems: {
599
+ imageUrl: string | null;
600
+ brand: string | null;
601
+ productId: number;
602
+ sku: string | null;
603
+ quantity: number;
604
+ variantId: number;
605
+ productName: string;
606
+ variantName: string | null;
607
+ }[];
608
+ title: string;
609
+ variantLabel: string | null;
610
+ productHandle: string | null;
611
+ thumbnail: string | null;
612
+ variantSku: string | null;
613
+ compareAtUnitPrice: number | null;
614
+ }[];
615
+ shippingMethods: {
616
+ id: string;
617
+ name: string;
618
+ description: string | null;
619
+ sellerId: string | null;
620
+ locationId: string | null;
621
+ shippingMethodId: string | null;
622
+ rateId: string | null;
623
+ total: number;
624
+ estimatedDays: number | null;
625
+ pickupPointId: string | null;
626
+ scheduledDate: string | null;
627
+ scheduledTime: string | null;
628
+ serviceCode: string | null;
629
+ shippingProfileId: string | null;
630
+ }[];
631
+ totals: {
632
+ total: number;
633
+ subtotal: number;
634
+ discountTotal: number;
635
+ shippingOriginalTotal: number;
636
+ shippingTotal: number;
637
+ taxTotal: number;
638
+ warrantyTotal: number;
639
+ };
640
+ }>;
641
+
642
+ /** GET /v1/carts/{id}/checkout */
643
+ declare function getCartCheckout(api: Api, params: CartCheckoutReadParams): Promise<CartCheckoutReadResponse>;
644
+ /** GET /v1/carts/{id}/shipping-options?postalCode= */
645
+ declare function getShippingOptions(api: Api, params: GetShippingOptionsParams): Promise<ShippingOptionsResponse>;
646
+ /** PUT /v1/carts/{id}/shipping-method */
647
+ declare function putCartShippingMethod(api: Api, params: PutShippingMethodParams): Promise<{
648
+ status: "inProgress" | "pending" | "completed" | "abandoned" | "cancelled" | "expired" | "failed";
649
+ id: string;
650
+ phone: string | null;
651
+ cartNumber: string;
652
+ email: string | null;
653
+ firstName: string | null;
654
+ lastName: string | null;
655
+ currencyCode: string;
656
+ completedAt: string | null;
657
+ shippingAddress: {
658
+ name: string | null;
659
+ address1: string;
660
+ city: string;
661
+ countryCode: string;
662
+ company: string | null;
663
+ address2: string | null;
664
+ province: string | null;
665
+ postalCode: string | null;
666
+ district: string | null;
667
+ phone: string | null;
668
+ latitude: number | null;
669
+ longitude: number | null;
670
+ } | null;
671
+ billingAddress: {
672
+ name: string | null;
673
+ address1: string;
674
+ city: string;
675
+ countryCode: string;
676
+ company: string | null;
677
+ address2: string | null;
678
+ province: string | null;
679
+ postalCode: string | null;
680
+ district: string | null;
681
+ phone: string | null;
682
+ latitude: number | null;
683
+ longitude: number | null;
684
+ } | null;
685
+ promotionCodes: string[];
686
+ items: {
687
+ id: string;
688
+ productId: number;
689
+ quantity: number;
690
+ variantId: number;
691
+ unitPrice: number;
692
+ bundleItems: {
693
+ imageUrl: string | null;
694
+ brand: string | null;
695
+ productId: number;
696
+ sku: string | null;
697
+ quantity: number;
698
+ variantId: number;
699
+ productName: string;
700
+ variantName: string | null;
701
+ }[];
702
+ title: string;
703
+ variantLabel: string | null;
704
+ productHandle: string | null;
705
+ thumbnail: string | null;
706
+ variantSku: string | null;
707
+ compareAtUnitPrice: number | null;
708
+ }[];
709
+ shippingMethods: {
710
+ id: string;
711
+ name: string;
712
+ description: string | null;
713
+ sellerId: string | null;
714
+ locationId: string | null;
715
+ shippingMethodId: string | null;
716
+ rateId: string | null;
717
+ total: number;
718
+ estimatedDays: number | null;
719
+ pickupPointId: string | null;
720
+ scheduledDate: string | null;
721
+ scheduledTime: string | null;
722
+ serviceCode: string | null;
723
+ shippingProfileId: string | null;
724
+ }[];
725
+ totals: {
726
+ total: number;
727
+ subtotal: number;
728
+ discountTotal: number;
729
+ shippingOriginalTotal: number;
730
+ shippingTotal: number;
731
+ taxTotal: number;
732
+ warrantyTotal: number;
733
+ };
734
+ }>;
735
+ /** PATCH /v1/carts/{id}/buyer */
736
+ declare function patchCartBuyer(api: Api, params: CartBuyerParams): Promise<{
737
+ status: "inProgress" | "pending" | "completed" | "abandoned" | "cancelled" | "expired" | "failed";
738
+ id: string;
739
+ phone: string | null;
740
+ cartNumber: string;
741
+ email: string | null;
742
+ firstName: string | null;
743
+ lastName: string | null;
744
+ currencyCode: string;
745
+ completedAt: string | null;
746
+ shippingAddress: {
747
+ name: string | null;
748
+ address1: string;
749
+ city: string;
750
+ countryCode: string;
751
+ company: string | null;
752
+ address2: string | null;
753
+ province: string | null;
754
+ postalCode: string | null;
755
+ district: string | null;
756
+ phone: string | null;
757
+ latitude: number | null;
758
+ longitude: number | null;
759
+ } | null;
760
+ billingAddress: {
761
+ name: string | null;
762
+ address1: string;
763
+ city: string;
764
+ countryCode: string;
765
+ company: string | null;
766
+ address2: string | null;
767
+ province: string | null;
768
+ postalCode: string | null;
769
+ district: string | null;
770
+ phone: string | null;
771
+ latitude: number | null;
772
+ longitude: number | null;
773
+ } | null;
774
+ promotionCodes: string[];
775
+ items: {
776
+ id: string;
777
+ productId: number;
778
+ quantity: number;
779
+ variantId: number;
780
+ unitPrice: number;
781
+ bundleItems: {
782
+ imageUrl: string | null;
783
+ brand: string | null;
784
+ productId: number;
785
+ sku: string | null;
786
+ quantity: number;
787
+ variantId: number;
788
+ productName: string;
789
+ variantName: string | null;
790
+ }[];
791
+ title: string;
792
+ variantLabel: string | null;
793
+ productHandle: string | null;
794
+ thumbnail: string | null;
795
+ variantSku: string | null;
796
+ compareAtUnitPrice: number | null;
797
+ }[];
798
+ shippingMethods: {
799
+ id: string;
800
+ name: string;
801
+ description: string | null;
802
+ sellerId: string | null;
803
+ locationId: string | null;
804
+ shippingMethodId: string | null;
805
+ rateId: string | null;
806
+ total: number;
807
+ estimatedDays: number | null;
808
+ pickupPointId: string | null;
809
+ scheduledDate: string | null;
810
+ scheduledTime: string | null;
811
+ serviceCode: string | null;
812
+ shippingProfileId: string | null;
813
+ }[];
814
+ totals: {
815
+ total: number;
816
+ subtotal: number;
817
+ discountTotal: number;
818
+ shippingOriginalTotal: number;
819
+ shippingTotal: number;
820
+ taxTotal: number;
821
+ warrantyTotal: number;
822
+ };
823
+ }>;
824
+ /** PATCH /v1/carts/{id}/addresses */
825
+ declare function patchCartAddresses(api: Api, params: CartAddressesParams): Promise<{
826
+ status: "inProgress" | "pending" | "completed" | "abandoned" | "cancelled" | "expired" | "failed";
827
+ id: string;
828
+ phone: string | null;
829
+ cartNumber: string;
830
+ email: string | null;
831
+ firstName: string | null;
832
+ lastName: string | null;
833
+ currencyCode: string;
834
+ completedAt: string | null;
835
+ shippingAddress: {
836
+ name: string | null;
837
+ address1: string;
838
+ city: string;
839
+ countryCode: string;
840
+ company: string | null;
841
+ address2: string | null;
842
+ province: string | null;
843
+ postalCode: string | null;
844
+ district: string | null;
845
+ phone: string | null;
846
+ latitude: number | null;
847
+ longitude: number | null;
848
+ } | null;
849
+ billingAddress: {
850
+ name: string | null;
851
+ address1: string;
852
+ city: string;
853
+ countryCode: string;
854
+ company: string | null;
855
+ address2: string | null;
856
+ province: string | null;
857
+ postalCode: string | null;
858
+ district: string | null;
859
+ phone: string | null;
860
+ latitude: number | null;
861
+ longitude: number | null;
862
+ } | null;
863
+ promotionCodes: string[];
864
+ items: {
865
+ id: string;
866
+ productId: number;
867
+ quantity: number;
868
+ variantId: number;
869
+ unitPrice: number;
870
+ bundleItems: {
871
+ imageUrl: string | null;
872
+ brand: string | null;
873
+ productId: number;
874
+ sku: string | null;
875
+ quantity: number;
876
+ variantId: number;
877
+ productName: string;
878
+ variantName: string | null;
879
+ }[];
880
+ title: string;
881
+ variantLabel: string | null;
882
+ productHandle: string | null;
883
+ thumbnail: string | null;
884
+ variantSku: string | null;
885
+ compareAtUnitPrice: number | null;
886
+ }[];
887
+ shippingMethods: {
888
+ id: string;
889
+ name: string;
890
+ description: string | null;
891
+ sellerId: string | null;
892
+ locationId: string | null;
893
+ shippingMethodId: string | null;
894
+ rateId: string | null;
895
+ total: number;
896
+ estimatedDays: number | null;
897
+ pickupPointId: string | null;
898
+ scheduledDate: string | null;
899
+ scheduledTime: string | null;
900
+ serviceCode: string | null;
901
+ shippingProfileId: string | null;
902
+ }[];
903
+ totals: {
904
+ total: number;
905
+ subtotal: number;
906
+ discountTotal: number;
907
+ shippingOriginalTotal: number;
908
+ shippingTotal: number;
909
+ taxTotal: number;
910
+ warrantyTotal: number;
911
+ };
912
+ }>;
913
+ /** POST /v1/carts/{id}/checkout */
914
+ declare function checkoutCart(api: Api, params: CartCheckoutParams): Promise<CartCheckoutResponse>;
915
+ /** POST /v1/carts/{id}/payment-receipt (multipart) */
916
+ declare function uploadPaymentReceipt(api: Api, params: UploadPaymentReceiptParams): Promise<CartPaymentReceiptResponse>;
917
+ /** POST /v1/carts/{id}/promotion-codes */
918
+ declare function addCartPromotionCode(api: Api, params: CartPromotionCodeParams): Promise<{
919
+ status: "inProgress" | "pending" | "completed" | "abandoned" | "cancelled" | "expired" | "failed";
920
+ id: string;
921
+ phone: string | null;
922
+ cartNumber: string;
923
+ email: string | null;
924
+ firstName: string | null;
925
+ lastName: string | null;
926
+ currencyCode: string;
927
+ completedAt: string | null;
928
+ shippingAddress: {
929
+ name: string | null;
930
+ address1: string;
931
+ city: string;
932
+ countryCode: string;
933
+ company: string | null;
934
+ address2: string | null;
935
+ province: string | null;
936
+ postalCode: string | null;
937
+ district: string | null;
938
+ phone: string | null;
939
+ latitude: number | null;
940
+ longitude: number | null;
941
+ } | null;
942
+ billingAddress: {
943
+ name: string | null;
944
+ address1: string;
945
+ city: string;
946
+ countryCode: string;
947
+ company: string | null;
948
+ address2: string | null;
949
+ province: string | null;
950
+ postalCode: string | null;
951
+ district: string | null;
952
+ phone: string | null;
953
+ latitude: number | null;
954
+ longitude: number | null;
955
+ } | null;
956
+ promotionCodes: string[];
957
+ items: {
958
+ id: string;
959
+ productId: number;
960
+ quantity: number;
961
+ variantId: number;
962
+ unitPrice: number;
963
+ bundleItems: {
964
+ imageUrl: string | null;
965
+ brand: string | null;
966
+ productId: number;
967
+ sku: string | null;
968
+ quantity: number;
969
+ variantId: number;
970
+ productName: string;
971
+ variantName: string | null;
972
+ }[];
973
+ title: string;
974
+ variantLabel: string | null;
975
+ productHandle: string | null;
976
+ thumbnail: string | null;
977
+ variantSku: string | null;
978
+ compareAtUnitPrice: number | null;
979
+ }[];
980
+ shippingMethods: {
981
+ id: string;
982
+ name: string;
983
+ description: string | null;
984
+ sellerId: string | null;
985
+ locationId: string | null;
986
+ shippingMethodId: string | null;
987
+ rateId: string | null;
988
+ total: number;
989
+ estimatedDays: number | null;
990
+ pickupPointId: string | null;
991
+ scheduledDate: string | null;
992
+ scheduledTime: string | null;
993
+ serviceCode: string | null;
994
+ shippingProfileId: string | null;
995
+ }[];
996
+ totals: {
997
+ total: number;
998
+ subtotal: number;
999
+ discountTotal: number;
1000
+ shippingOriginalTotal: number;
1001
+ shippingTotal: number;
1002
+ taxTotal: number;
1003
+ warrantyTotal: number;
1004
+ };
1005
+ }>;
1006
+ /** DELETE /v1/carts/{id}/promotion-codes/{code} */
1007
+ declare function removeCartPromotionCode(api: Api, params: CartPromotionCodeParams): Promise<{
1008
+ status: "inProgress" | "pending" | "completed" | "abandoned" | "cancelled" | "expired" | "failed";
1009
+ id: string;
1010
+ phone: string | null;
1011
+ cartNumber: string;
1012
+ email: string | null;
1013
+ firstName: string | null;
1014
+ lastName: string | null;
1015
+ currencyCode: string;
1016
+ completedAt: string | null;
1017
+ shippingAddress: {
1018
+ name: string | null;
1019
+ address1: string;
1020
+ city: string;
1021
+ countryCode: string;
1022
+ company: string | null;
1023
+ address2: string | null;
1024
+ province: string | null;
1025
+ postalCode: string | null;
1026
+ district: string | null;
1027
+ phone: string | null;
1028
+ latitude: number | null;
1029
+ longitude: number | null;
1030
+ } | null;
1031
+ billingAddress: {
1032
+ name: string | null;
1033
+ address1: string;
1034
+ city: string;
1035
+ countryCode: string;
1036
+ company: string | null;
1037
+ address2: string | null;
1038
+ province: string | null;
1039
+ postalCode: string | null;
1040
+ district: string | null;
1041
+ phone: string | null;
1042
+ latitude: number | null;
1043
+ longitude: number | null;
1044
+ } | null;
1045
+ promotionCodes: string[];
1046
+ items: {
1047
+ id: string;
1048
+ productId: number;
1049
+ quantity: number;
1050
+ variantId: number;
1051
+ unitPrice: number;
1052
+ bundleItems: {
1053
+ imageUrl: string | null;
1054
+ brand: string | null;
1055
+ productId: number;
1056
+ sku: string | null;
1057
+ quantity: number;
1058
+ variantId: number;
1059
+ productName: string;
1060
+ variantName: string | null;
1061
+ }[];
1062
+ title: string;
1063
+ variantLabel: string | null;
1064
+ productHandle: string | null;
1065
+ thumbnail: string | null;
1066
+ variantSku: string | null;
1067
+ compareAtUnitPrice: number | null;
1068
+ }[];
1069
+ shippingMethods: {
1070
+ id: string;
1071
+ name: string;
1072
+ description: string | null;
1073
+ sellerId: string | null;
1074
+ locationId: string | null;
1075
+ shippingMethodId: string | null;
1076
+ rateId: string | null;
1077
+ total: number;
1078
+ estimatedDays: number | null;
1079
+ pickupPointId: string | null;
1080
+ scheduledDate: string | null;
1081
+ scheduledTime: string | null;
1082
+ serviceCode: string | null;
1083
+ shippingProfileId: string | null;
1084
+ }[];
1085
+ totals: {
1086
+ total: number;
1087
+ subtotal: number;
1088
+ discountTotal: number;
1089
+ shippingOriginalTotal: number;
1090
+ shippingTotal: number;
1091
+ taxTotal: number;
1092
+ warrantyTotal: number;
1093
+ };
1094
+ }>;
1095
+
1096
+ /** GET /v1/geo/countries */
1097
+ declare function getCountries(api: Api): Promise<Countries>;
1098
+ /** GET /v1/geo/departments?countryCode=&source=&search=&limit= */
1099
+ declare function getDepartments(api: Api, params: GetDepartmentsParams): Promise<Departments>;
1100
+ /** GET /v1/geo/provinces?countryCode=&departmentCode=&source=&search=&limit= */
1101
+ declare function getProvinces(api: Api, params: GetProvincesParams): Promise<Provinces>;
1102
+ /** GET /v1/geo/districts?countryCode=&provinceCode=&source=&search=&limit= */
1103
+ declare function getDistricts(api: Api, params: GetDistrictsParams): Promise<Districts>;
1104
+
1105
+ declare function sanitizeHtml(html: string): string;
1106
+ /** Convierte HTML en texto plano (metadata, JSON-LD). */
1107
+ declare function stripHtml(html: string): string;
1108
+
1109
+ export { AddCartItemParams, Api, CartAddressesParams, CartBuyerParams, CartCheckoutParams, CartCheckoutReadParams, CartCheckoutReadResponse, CartCheckoutResponse, CartPaymentReceiptResponse, CartPromotionCodeParams, Countries, CreateCartParams, CreateProductReviewParams, Departments, Districts, GetCartParams, GetDepartmentsParams, GetDistrictsParams, GetProvincesParams, GetShippingOptionsParams, ListProductReviewsParams, ProductAutocompleteParams, ProductDetailParams, ProductsParamsInput, Provinces, PutShippingMethodParams, RelatedProductsParams, RemoveCartItemParams, ShippingOptionsResponse, UpdateCartItemQuantityParams, UploadPaymentReceiptParams, addCartItem, addCartPromotionCode, autocompleteProducts, checkoutCart, createCart, createProductReview, getCart, getCartCheckout, getCountries, getDepartments, getDistricts, getProductBySlug, getProducts, getProvinces, getRelatedProducts, getShippingOptions, listProductReviews, patchCartAddresses, patchCartBuyer, putCartShippingMethod, removeCartItem, removeCartPromotionCode, sanitizeHtml, stripHtml, updateCartItemQuantity, uploadPaymentReceipt };