@misiki/gocommerce-connector 0.11.0 → 0.13.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.
@@ -201,6 +201,10 @@ type Product = {
201
201
  seo_description: string;
202
202
  image_url?: string;
203
203
  media_count?: number;
204
+ /** The gallery, pictures and videos in order: on the public product only (D134). */
205
+ media?: VariantImage[];
206
+ /** The sold count rounded down; absent unless the shop shows counts and it passed the threshold (D134). */
207
+ sold_at_least?: number;
204
208
  options: ProductOption[] | null;
205
209
  variants: Variant[] | null;
206
210
  collections: {
@@ -250,6 +254,51 @@ type CartLine = {
250
254
  available: number;
251
255
  in_stock: boolean;
252
256
  price_changed: boolean;
257
+ /** The add-on this line was bought as (D133), and the product it is offered with. */
258
+ add_on_id?: number;
259
+ add_on_for?: number;
260
+ compare_at_price?: Money;
261
+ };
262
+ /** A variant offered with a product, optionally at an offer price (D133). */
263
+ type AddOn = {
264
+ id: number;
265
+ product_id: number;
266
+ variant_id: number;
267
+ position: number;
268
+ offer_price: Money | null;
269
+ price: Money;
270
+ compare_at_price?: Money;
271
+ item: {
272
+ product_id: number;
273
+ slug: string;
274
+ title: string;
275
+ variant_label?: string;
276
+ sku: string;
277
+ image_url?: string;
278
+ live: boolean;
279
+ in_stock: boolean;
280
+ };
281
+ };
282
+ /** A listed discount code, judged against one basket (D133). */
283
+ type CartOffer = {
284
+ code: string;
285
+ title: string;
286
+ kind: 'percentage' | 'fixed' | 'free_shipping' | string;
287
+ value_bp?: number;
288
+ value_minor?: number;
289
+ min_subtotal_minor?: number;
290
+ applies: boolean;
291
+ amount?: Money;
292
+ free_shipping?: boolean;
293
+ remaining?: Money;
294
+ reason?: string;
295
+ };
296
+ /** How far a basket is from free delivery (D133). */
297
+ type FreeShipping = {
298
+ qualifies: boolean;
299
+ threshold?: Money;
300
+ remaining?: Money;
301
+ subtotal: Money;
253
302
  };
254
303
  type Cart = {
255
304
  id: string;
@@ -544,6 +593,14 @@ type MenuSummary = {
544
593
  handle: string;
545
594
  title: string;
546
595
  };
596
+ /** GET /api/postcodes/{country}/{code} (D134). */
597
+ type Postcode = {
598
+ country: string;
599
+ postcode: string;
600
+ city: string;
601
+ state: string;
602
+ state_code: string;
603
+ };
547
604
 
548
605
  /**
549
606
  * The state this connector keeps in the shopper's browser, and only there.
@@ -605,11 +662,16 @@ type CartExtras = {
605
662
  };
606
663
 
607
664
  /**
608
- * Every picture the public API offers for a product: the lead image, then each
609
- * variant's. The engine keeps the full gallery on admin routes only, so this
610
- * is the honest union rather than the whole media library.
665
+ * Every picture the public API offers for a product: the lead image, the
666
+ * product's gallery (on the single product, D134), then each variant's.
611
667
  */
612
668
  declare function productImages(p: Product): string[];
669
+ /**
670
+ * The product's videos, an upload or a YouTube link, in the gallery's order
671
+ * (D134). They follow the pictures in `images`, where the storefront's gallery
672
+ * plays them; a card's thumbnail is never one.
673
+ */
674
+ declare function productVideos(p: Product): string[];
613
675
  declare function toVariant(v: Variant, p: Product, optionless: boolean): {
614
676
  id: string;
615
677
  productId: string;
@@ -666,6 +728,10 @@ declare function toProduct(p: Product, extra?: {
666
728
  image_url: string;
667
729
  images: string;
668
730
  imageList: string[];
731
+ videos: string[];
732
+ highlights: string[];
733
+ freeGift: string | null;
734
+ soldAtLeast: number | null;
669
735
  manageInventory: boolean;
670
736
  allowBackorder: boolean;
671
737
  stock: number;
@@ -886,6 +952,9 @@ declare function toCartLine(l: CartLine, extra?: {
886
952
  qty: number;
887
953
  price: number;
888
954
  mrp: number;
955
+ /** The add-on this line was bought as (D133), or null on an ordinary line. */
956
+ addOnId: string | null;
957
+ addOnFor: string | null;
889
958
  subtotal: number;
890
959
  total: number;
891
960
  inStock: boolean;
@@ -934,6 +1003,9 @@ declare function toCart(c: Cart, extras?: CartExtras, lineExtra?: (l: CartLine)
934
1003
  qty: number;
935
1004
  price: number;
936
1005
  mrp: number;
1006
+ /** The add-on this line was bought as (D133), or null on an ordinary line. */
1007
+ addOnId: string | null;
1008
+ addOnFor: string | null;
937
1009
  subtotal: number;
938
1010
  total: number;
939
1011
  inStock: boolean;
@@ -1162,6 +1234,45 @@ declare function toUser(c: Customer): {
1162
1234
  updatedAt: string;
1163
1235
  };
1164
1236
  declare const priceOf: (m: Money | undefined) => number;
1237
+ /**
1238
+ * An add-on as the buy box draws it (D133): `price` is what ticking it adds,
1239
+ * the offer where there is one, and `regularPrice` the add-on's own, struck
1240
+ * through beside it. Without an offer the two are the same and nothing is
1241
+ * struck.
1242
+ */
1243
+ declare function toAddOn(a: AddOn): {
1244
+ id: string;
1245
+ productId: string;
1246
+ variantId: string;
1247
+ slug: string;
1248
+ title: string;
1249
+ variantTitle: string;
1250
+ thumbnail: string | null;
1251
+ price: number;
1252
+ regularPrice: number;
1253
+ hasOffer: boolean;
1254
+ inStock: boolean;
1255
+ };
1256
+ /** A listed code for one basket, in major units (D133). */
1257
+ declare function toCartOffer(o: CartOffer, currency: string): {
1258
+ code: string;
1259
+ title: string;
1260
+ isPercent: boolean;
1261
+ freeShipping: boolean;
1262
+ /** The percentage for a percentage code, the amount for a fixed one. */
1263
+ value: number;
1264
+ minAmount: number | null;
1265
+ applies: boolean;
1266
+ amount: number | null;
1267
+ remaining: number | null;
1268
+ reason: string;
1269
+ };
1270
+ declare function toFreeShipping(f: FreeShipping): {
1271
+ qualifies: boolean;
1272
+ threshold: number | null;
1273
+ remaining: number | null;
1274
+ subtotal: number;
1275
+ };
1165
1276
 
1166
1277
  type Query = Record<string, string | number | boolean | null | undefined | (string | number)[]>;
1167
1278
  type EngineRequest = {
@@ -1421,6 +1532,10 @@ declare class ProductService extends CatalogService {
1421
1532
  image_url: string;
1422
1533
  images: string;
1423
1534
  imageList: string[];
1535
+ videos: string[];
1536
+ highlights: string[];
1537
+ freeGift: string | null;
1538
+ soldAtLeast: number | null;
1424
1539
  manageInventory: boolean;
1425
1540
  allowBackorder: boolean;
1426
1541
  stock: number;
@@ -1534,6 +1649,10 @@ declare class ProductService extends CatalogService {
1534
1649
  image_url: string;
1535
1650
  images: string;
1536
1651
  imageList: string[];
1652
+ videos: string[];
1653
+ highlights: string[];
1654
+ freeGift: string | null;
1655
+ soldAtLeast: number | null;
1537
1656
  manageInventory: boolean;
1538
1657
  allowBackorder: boolean;
1539
1658
  stock: number;
@@ -1682,6 +1801,10 @@ declare class ProductService extends CatalogService {
1682
1801
  image_url: string;
1683
1802
  images: string;
1684
1803
  imageList: string[];
1804
+ videos: string[];
1805
+ highlights: string[];
1806
+ freeGift: string | null;
1807
+ soldAtLeast: number | null;
1685
1808
  manageInventory: boolean;
1686
1809
  allowBackorder: boolean;
1687
1810
  stock: number;
@@ -1829,6 +1952,10 @@ declare class ProductService extends CatalogService {
1829
1952
  image_url: string;
1830
1953
  images: string;
1831
1954
  imageList: string[];
1955
+ videos: string[];
1956
+ highlights: string[];
1957
+ freeGift: string | null;
1958
+ soldAtLeast: number | null;
1832
1959
  manageInventory: boolean;
1833
1960
  allowBackorder: boolean;
1834
1961
  stock: number;
@@ -1970,6 +2097,146 @@ declare class ProductService extends CatalogService {
1970
2097
  noOfPage: number;
1971
2098
  page: number;
1972
2099
  }>;
2100
+ /**
2101
+ * What the shop offers with a product, ticked in its buy box (D133): each
2102
+ * add-on at the price ticking it adds. Only add-ons that can be bought
2103
+ * arrive; an engine without the route offers none.
2104
+ */
2105
+ listAddOns({ product }: {
2106
+ product: string;
2107
+ }): Promise<{
2108
+ id: string;
2109
+ productId: string;
2110
+ variantId: string;
2111
+ slug: string;
2112
+ title: string;
2113
+ variantTitle: string;
2114
+ thumbnail: string | null;
2115
+ price: number;
2116
+ regularPrice: number;
2117
+ hasOffer: boolean;
2118
+ inStock: boolean;
2119
+ }[]>;
2120
+ /**
2121
+ * "You may also like": the products the shop chose for this one, at their
2122
+ * own prices (D133). Curated only, and empty when none were chosen: the
2123
+ * related products already fill in from the category, and the page should
2124
+ * not draw the same fill twice.
2125
+ */
2126
+ listCrossSells({ product, limit }: {
2127
+ product: string;
2128
+ limit?: number;
2129
+ }): Promise<{
2130
+ id: string;
2131
+ slug: string;
2132
+ title: string;
2133
+ name: string;
2134
+ subtitle: null;
2135
+ description: string;
2136
+ status: string;
2137
+ active: boolean;
2138
+ type: string;
2139
+ currency: string;
2140
+ currencyCode: string;
2141
+ price: number;
2142
+ mrp: number;
2143
+ minPrice: number;
2144
+ maxPrice: number;
2145
+ sku: string;
2146
+ barcode: string | null;
2147
+ weight: number | null;
2148
+ originCountry: string | null;
2149
+ thumbnail: string;
2150
+ image_url: string;
2151
+ images: string;
2152
+ imageList: string[];
2153
+ videos: string[];
2154
+ highlights: string[];
2155
+ freeGift: string | null;
2156
+ soldAtLeast: number | null;
2157
+ manageInventory: boolean;
2158
+ allowBackorder: boolean;
2159
+ stock: number;
2160
+ hasStock: boolean;
2161
+ categoryId: string | null;
2162
+ category: {
2163
+ id: string;
2164
+ name: string;
2165
+ slug: string;
2166
+ } | null;
2167
+ categories: {
2168
+ category: {
2169
+ id: string;
2170
+ name: string;
2171
+ slug: string;
2172
+ };
2173
+ }[];
2174
+ categoryHierarchy: {
2175
+ name: string;
2176
+ slug: string;
2177
+ }[];
2178
+ collections: {
2179
+ id: string;
2180
+ name: string;
2181
+ slug: string;
2182
+ }[];
2183
+ vendor: {
2184
+ businessName: string;
2185
+ } | null;
2186
+ productTags: string;
2187
+ keywords: string;
2188
+ metaTitle: string;
2189
+ metaDescription: string | null;
2190
+ link: string;
2191
+ options: {
2192
+ id: string;
2193
+ title: string;
2194
+ name: string;
2195
+ type: string;
2196
+ values: {
2197
+ id: string;
2198
+ value: string;
2199
+ }[];
2200
+ }[];
2201
+ variants: {
2202
+ id: string;
2203
+ productId: string;
2204
+ title: string;
2205
+ sku: string;
2206
+ barcode: string | null;
2207
+ price: number;
2208
+ mrp: number;
2209
+ stock: number;
2210
+ manageInventory: boolean;
2211
+ allowBackorder: boolean;
2212
+ active: boolean;
2213
+ weight: number | null;
2214
+ length: number | null;
2215
+ width: number | null;
2216
+ height: number | null;
2217
+ images: string;
2218
+ img: string;
2219
+ image: string;
2220
+ thumbnail: string;
2221
+ options: {
2222
+ optionId: string;
2223
+ value: string;
2224
+ }[];
2225
+ metadata: Record<string, unknown> | null;
2226
+ }[];
2227
+ ratings: ReturnType<typeof toRating>[];
2228
+ rating: number | null;
2229
+ ratingCount: number;
2230
+ reviewCount: number;
2231
+ attributes: {
2232
+ name: string;
2233
+ value: string;
2234
+ handle: string;
2235
+ }[];
2236
+ metadata: Record<string, unknown> | null;
2237
+ createdAt: string;
2238
+ updatedAt: string;
2239
+ }[]>;
1973
2240
  private relatedTo;
1974
2241
  private shelf;
1975
2242
  /**
@@ -2107,6 +2374,10 @@ declare class SearchService extends CatalogService {
2107
2374
  image_url: string;
2108
2375
  images: string;
2109
2376
  imageList: string[];
2377
+ videos: string[];
2378
+ highlights: string[];
2379
+ freeGift: string | null;
2380
+ soldAtLeast: number | null;
2110
2381
  manageInventory: boolean;
2111
2382
  allowBackorder: boolean;
2112
2383
  stock: number;
@@ -2292,6 +2563,10 @@ declare class MeilisearchService extends CatalogService {
2292
2563
  image_url: string;
2293
2564
  images: string;
2294
2565
  imageList: string[];
2566
+ videos: string[];
2567
+ highlights: string[];
2568
+ freeGift: string | null;
2569
+ soldAtLeast: number | null;
2295
2570
  manageInventory: boolean;
2296
2571
  allowBackorder: boolean;
2297
2572
  stock: number;
@@ -2479,6 +2754,10 @@ declare class MeilisearchService extends CatalogService {
2479
2754
  image_url: string;
2480
2755
  images: string;
2481
2756
  imageList: string[];
2757
+ videos: string[];
2758
+ highlights: string[];
2759
+ freeGift: string | null;
2760
+ soldAtLeast: number | null;
2482
2761
  manageInventory: boolean;
2483
2762
  allowBackorder: boolean;
2484
2763
  stock: number;
@@ -2668,6 +2947,10 @@ declare class CollectionService extends BaseService {
2668
2947
  image_url: string;
2669
2948
  images: string;
2670
2949
  imageList: string[];
2950
+ videos: string[];
2951
+ highlights: string[];
2952
+ freeGift: string | null;
2953
+ soldAtLeast: number | null;
2671
2954
  manageInventory: boolean;
2672
2955
  allowBackorder: boolean;
2673
2956
  stock: number;
@@ -2776,6 +3059,10 @@ declare class CollectionService extends BaseService {
2776
3059
  image_url: string;
2777
3060
  images: string;
2778
3061
  imageList: string[];
3062
+ videos: string[];
3063
+ highlights: string[];
3064
+ freeGift: string | null;
3065
+ soldAtLeast: number | null;
2779
3066
  manageInventory: boolean;
2780
3067
  allowBackorder: boolean;
2781
3068
  stock: number;
@@ -2916,6 +3203,8 @@ declare class CartService extends BaseService {
2916
3203
  qty: number;
2917
3204
  price: number;
2918
3205
  mrp: number;
3206
+ addOnId: string | null;
3207
+ addOnFor: string | null;
2919
3208
  subtotal: number;
2920
3209
  total: number;
2921
3210
  inStock: boolean;
@@ -3000,6 +3289,8 @@ declare class CartService extends BaseService {
3000
3289
  qty: number;
3001
3290
  price: number;
3002
3291
  mrp: number;
3292
+ addOnId: string | null;
3293
+ addOnFor: string | null;
3003
3294
  subtotal: number;
3004
3295
  total: number;
3005
3296
  inStock: boolean;
@@ -3089,6 +3380,8 @@ declare class CartService extends BaseService {
3089
3380
  qty: number;
3090
3381
  price: number;
3091
3382
  mrp: number;
3383
+ addOnId: string | null;
3384
+ addOnFor: string | null;
3092
3385
  subtotal: number;
3093
3386
  total: number;
3094
3387
  inStock: boolean;
@@ -3183,6 +3476,8 @@ declare class CartService extends BaseService {
3183
3476
  qty: number;
3184
3477
  price: number;
3185
3478
  mrp: number;
3479
+ addOnId: string | null;
3480
+ addOnFor: string | null;
3186
3481
  subtotal: number;
3187
3482
  total: number;
3188
3483
  inStock: boolean;
@@ -3248,6 +3543,127 @@ declare class CartService extends BaseService {
3248
3543
  billingAddress: null;
3249
3544
  billingAddressId: null;
3250
3545
  }>;
3546
+ /**
3547
+ * Adds an add-on from a product's "Complete the set" (D133) at its offer
3548
+ * price. The product it is offered with has to be in the bag already, so
3549
+ * this is called after adding it; the engine refuses one too many with the
3550
+ * sentence the shopper is shown.
3551
+ */
3552
+ addAddOn({ cartId, addOnId, qty }: {
3553
+ cartId?: string | null;
3554
+ addOnId: string | number;
3555
+ qty?: number;
3556
+ }): Promise<{
3557
+ id: string;
3558
+ status: "open" | "converted" | "abandoned";
3559
+ email: string | null;
3560
+ phone: string | null;
3561
+ name: string | null;
3562
+ lineItems: {
3563
+ id: string;
3564
+ productId: string;
3565
+ variantId: string;
3566
+ sku: string;
3567
+ title: string;
3568
+ name: string;
3569
+ slug: string;
3570
+ thumbnail: string | null;
3571
+ variantTitle: string;
3572
+ qty: number;
3573
+ price: number;
3574
+ mrp: number;
3575
+ addOnId: string | null;
3576
+ addOnFor: string | null;
3577
+ subtotal: number;
3578
+ total: number;
3579
+ inStock: boolean;
3580
+ priceChanged: boolean;
3581
+ currentPrice: number;
3582
+ isSelectedForCheckout: boolean;
3583
+ variant: {
3584
+ id: string;
3585
+ options: {
3586
+ option: {
3587
+ title: string;
3588
+ };
3589
+ value: string;
3590
+ }[];
3591
+ };
3592
+ product: {
3593
+ id: string;
3594
+ categories: unknown[];
3595
+ };
3596
+ }[];
3597
+ qty: number;
3598
+ currencyCode: string;
3599
+ currency: string;
3600
+ subtotal: number;
3601
+ discountAmount: number;
3602
+ savingAmount: number;
3603
+ couponCode: string | null;
3604
+ discount: AppliedDiscount | null;
3605
+ shippingCharges: number;
3606
+ shippingRateId: string | null;
3607
+ shippingMethod: string | null;
3608
+ tax: number;
3609
+ taxIncluded: boolean;
3610
+ codCharges: number;
3611
+ total: number;
3612
+ shippingAddress: StorefrontAddress | null;
3613
+ shippingAddressId: string | null;
3614
+ billingAddress: StorefrontAddress | null;
3615
+ billingAddressId: string | null;
3616
+ paymentMethod: null;
3617
+ needAddress: boolean;
3618
+ completedAt: string | null;
3619
+ createdAt: string;
3620
+ updatedAt: string;
3621
+ expiresAt: string;
3622
+ }>;
3623
+ /**
3624
+ * The codes the shop chose to show (D133), each with what it takes off this
3625
+ * bag or how much more the bag needs. None without a bag.
3626
+ */
3627
+ getOffers({ cartId }?: {
3628
+ cartId?: string | null;
3629
+ }): Promise<{
3630
+ code: string;
3631
+ title: string;
3632
+ isPercent: boolean;
3633
+ freeShipping: boolean;
3634
+ value: number;
3635
+ minAmount: number | null;
3636
+ applies: boolean;
3637
+ amount: number | null;
3638
+ remaining: number | null;
3639
+ reason: string;
3640
+ }[]>;
3641
+ /**
3642
+ * How far the bag is from free delivery (D133), read from the store's own
3643
+ * rates for the country (the store's own when none is given). Null when
3644
+ * the engine cannot say: a bar with a made-up figure is worse than none.
3645
+ */
3646
+ getFreeShipping({ cartId, country, state }?: {
3647
+ cartId?: string | null;
3648
+ country?: string;
3649
+ state?: string;
3650
+ }): Promise<{
3651
+ qualifies: boolean;
3652
+ threshold: number | null;
3653
+ remaining: number | null;
3654
+ subtotal: number;
3655
+ } | null>;
3656
+ /**
3657
+ * "You may be interested in" (D133): what the bag's products suggest, less
3658
+ * what it holds; with nothing curated, the first product's related
3659
+ * products, still less what it holds.
3660
+ */
3661
+ listCrossSells({ cartId, limit }?: {
3662
+ cartId?: string | null;
3663
+ limit?: number;
3664
+ }): Promise<{
3665
+ id: string;
3666
+ }[]>;
3251
3667
  /** `qty` is the new total; 0 takes the line out. */
3252
3668
  updateCart({ cartId, lineId, qty, }: {
3253
3669
  cartId?: string;
@@ -3273,6 +3689,8 @@ declare class CartService extends BaseService {
3273
3689
  qty: number;
3274
3690
  price: number;
3275
3691
  mrp: number;
3692
+ addOnId: string | null;
3693
+ addOnFor: string | null;
3276
3694
  subtotal: number;
3277
3695
  total: number;
3278
3696
  inStock: boolean;
@@ -3360,6 +3778,8 @@ declare class CartService extends BaseService {
3360
3778
  qty: number;
3361
3779
  price: number;
3362
3780
  mrp: number;
3781
+ addOnId: string | null;
3782
+ addOnFor: string | null;
3363
3783
  subtotal: number;
3364
3784
  total: number;
3365
3785
  inStock: boolean;
@@ -3456,6 +3876,8 @@ declare class CartService extends BaseService {
3456
3876
  qty: number;
3457
3877
  price: number;
3458
3878
  mrp: number;
3879
+ addOnId: string | null;
3880
+ addOnFor: string | null;
3459
3881
  subtotal: number;
3460
3882
  total: number;
3461
3883
  inStock: boolean;
@@ -3548,6 +3970,8 @@ declare class CartService extends BaseService {
3548
3970
  qty: number;
3549
3971
  price: number;
3550
3972
  mrp: number;
3973
+ addOnId: string | null;
3974
+ addOnFor: string | null;
3551
3975
  subtotal: number;
3552
3976
  total: number;
3553
3977
  inStock: boolean;
@@ -3613,6 +4037,8 @@ declare class CartService extends BaseService {
3613
4037
  qty: number;
3614
4038
  price: number;
3615
4039
  mrp: number;
4040
+ addOnId: string | null;
4041
+ addOnFor: string | null;
3616
4042
  subtotal: number;
3617
4043
  total: number;
3618
4044
  inStock: boolean;
@@ -3701,6 +4127,8 @@ declare class CartService extends BaseService {
3701
4127
  qty: number;
3702
4128
  price: number;
3703
4129
  mrp: number;
4130
+ addOnId: string | null;
4131
+ addOnFor: string | null;
3704
4132
  subtotal: number;
3705
4133
  total: number;
3706
4134
  inStock: boolean;
@@ -3789,6 +4217,8 @@ declare class CartService extends BaseService {
3789
4217
  qty: number;
3790
4218
  price: number;
3791
4219
  mrp: number;
4220
+ addOnId: string | null;
4221
+ addOnFor: string | null;
3792
4222
  subtotal: number;
3793
4223
  total: number;
3794
4224
  inStock: boolean;
@@ -4144,14 +4574,29 @@ declare class PaymentMethodService extends BaseService {
4144
4574
  declare const paymentMethodService: PaymentMethodService;
4145
4575
 
4146
4576
  /**
4147
- * Discount codes are typed, not browsed: the engine has no public list of
4148
- * them, by design — a list would hand every shopper every code. An empty list
4149
- * hides the storefront's coupon drawer, and the code box still works through
4577
+ * Discount codes are typed, not browsed, except the ones the shop chose to
4578
+ * show (D133): the engine lists a code only when the shop ticked "Show in the
4579
+ * basket's offers", judged against the stored bag. Every other code stays
4580
+ * known only to whoever was given it, and still works through
4150
4581
  * `cartService.applyCoupon`.
4582
+ *
4583
+ * The drawer's shape: `amount` is the percentage or the amount,
4584
+ * `minAmount` the bag it needs, and `description` says what is
4585
+ * still missing.
4151
4586
  */
4152
4587
  declare class CouponService extends BaseService {
4153
4588
  listCoupons(_args?: Record<string, unknown>): Promise<{
4154
- data: never[];
4589
+ data: {
4590
+ id: string;
4591
+ code: string;
4592
+ title: string;
4593
+ isPercent: boolean;
4594
+ amount: number;
4595
+ minAmount: number | null;
4596
+ description: string;
4597
+ applies: boolean;
4598
+ remaining: number | null;
4599
+ }[];
4155
4600
  count: number;
4156
4601
  pageSize: number;
4157
4602
  noOfPage: number;
@@ -5395,6 +5840,22 @@ declare class AddressService extends BaseService {
5395
5840
  createdAt: string;
5396
5841
  updatedAt: string;
5397
5842
  }>;
5843
+ /**
5844
+ * The city and state for a postcode (D134), for the address form to fill
5845
+ * in. India's six-digit PIN codes only, from the directory the engine was
5846
+ * given; null for anything it cannot answer, so the form simply leaves the
5847
+ * fields to the shopper.
5848
+ */
5849
+ lookupPostcode({ country, postcode }: {
5850
+ country?: string;
5851
+ postcode: string;
5852
+ }): Promise<{
5853
+ country: string;
5854
+ postcode: string;
5855
+ city: string;
5856
+ state: string;
5857
+ stateCode: string;
5858
+ } | null>;
5398
5859
  deleteAddress(id: string): Promise<{
5399
5860
  id: string;
5400
5861
  deleted: boolean;
@@ -5440,6 +5901,10 @@ declare class WishlistService extends BaseService {
5440
5901
  image_url: string;
5441
5902
  images: string;
5442
5903
  imageList: string[];
5904
+ videos: string[];
5905
+ highlights: string[];
5906
+ freeGift: string | null;
5907
+ soldAtLeast: number | null;
5443
5908
  manageInventory: boolean;
5444
5909
  allowBackorder: boolean;
5445
5910
  stock: number;
@@ -6198,6 +6663,10 @@ declare class AutocompleteService extends MeilisearchService {
6198
6663
  image_url: string;
6199
6664
  images: string;
6200
6665
  imageList: string[];
6666
+ videos: string[];
6667
+ highlights: string[];
6668
+ freeGift: string | null;
6669
+ soldAtLeast: number | null;
6201
6670
  manageInventory: boolean;
6202
6671
  allowBackorder: boolean;
6203
6672
  stock: number;
@@ -6790,6 +7259,8 @@ declare class B2bService extends BaseService {
6790
7259
  qty: number;
6791
7260
  price: number;
6792
7261
  mrp: number;
7262
+ addOnId: string | null;
7263
+ addOnFor: string | null;
6793
7264
  subtotal: number;
6794
7265
  total: number;
6795
7266
  inStock: boolean;
@@ -6859,6 +7330,8 @@ declare class B2bService extends BaseService {
6859
7330
  qty: number;
6860
7331
  price: number;
6861
7332
  mrp: number;
7333
+ addOnId: string | null;
7334
+ addOnFor: string | null;
6862
7335
  subtotal: number;
6863
7336
  total: number;
6864
7337
  inStock: boolean;
@@ -7094,4 +7567,4 @@ declare class B2bService extends BaseService {
7094
7567
  }
7095
7568
  declare const b2bService: B2bService;
7096
7569
 
7097
- export { type Invitation as $, type Address as A, type B2bPlaced as B, type Cart as C, CountryService as D, CouponService as E, type Credentials as F, type Credit as G, CurrencyService as H, type Customer as I, DealService as J, DemoRequestService as K, type EngineRequest as L, EnquiryService as M, type Envelope as N, type FacetValue as O, type Faq as P, FaqService as Q, FeedbackService as R, type FooterSettings as S, type Fulfillment as T, GalleryService as U, type HeaderSettings as V, type HomeLayout as W, type HomeLayoutSection as X, HomeService as Y, type IdentityAddress as Z, InitService as _, AddressService as a, type Vendor as a$, type LayoutCollection as a0, type LayoutPage as a1, LayoutService as a2, type Lead as a3, type ListMeta as a4, MeilisearchService as a5, type Member as a6, type Menu as a7, type MenuItem as a8, MenuService as a9, type ReviewPage as aA, ReviewService as aB, type SearchDoc as aC, type SearchResult as aD, SearchService as aE, SettingService as aF, type ShippingRate as aG, type SiteChrome as aH, type SiteFooter as aI, type SiteHeader as aJ, type SocialLink as aK, StateService as aL, type StoreProfile as aM, StoreService as aN, type StorefrontCategory as aO, type StorefrontMenu as aP, type StorefrontOrder as aQ, type StorefrontProduct as aR, type ThemeSettings as aS, type ThemeSettingsResult as aT, UploadService as aU, UserService as aV, type Variant as aW, type VariantImage as aX, VariantService as aY, VarniCustomDesignService as aZ, VarniCustomProductService as a_, type MenuSummary as aa, type Money as ab, NewsletterService as ac, type Offer as ad, type Order as ae, type OrderLine as af, OrderService as ag, type PageLayout as ah, PageService as ai, type PaymentIntent as aj, PaymentMethodService as ak, type Plugin as al, PluginService as am, PopularSearchService as an, PopularityService as ao, type Product as ap, type ProductFacets as aq, type ProductOption as ar, ProductService as as, ProfileService as at, type Quote as au, REDIRECT_GATEWAYS as av, ReelsService as aw, RegionService as ax, type RejectedLine as ay, type Review as az, type AppliedDiscount as b, storeService as b$, VendorService as b0, WarrantyService as b1, type Wishlist as b2, type WishlistItem as b3, WishlistService as b4, addressService as b5, authService as b6, autocompleteService as b7, b2bService as b8, bannerService as b9, meilisearchService as bA, menuService as bB, minorToMajor as bC, newsletterService as bD, orderService as bE, ownDomain as bF, pageService as bG, paymentMethodService as bH, pluginService as bI, pluginsService as bJ, popularSearchService as bK, popularityService as bL, priceOf as bM, productImages as bN, productService as bO, profileService as bP, qs as bQ, reelsService as bR, regionService as bS, reviewService as bT, searchService as bU, setRequestHost as bV, settingService as bW, settingsService as bX, stateService as bY, staticStore as bZ, storeForHost as b_, blogService as ba, cartService as bb, categoryService as bc, chatService as bd, checkoutService as be, collectionService as bf, contactService as bg, countryService as bh, couponService as bi, currencyExponent as bj, currencyService as bk, dealService as bl, demoRequestService as bm, emptyCart as bn, emptyPage as bo, enquiryService as bp, faqService as bq, feedbackService as br, fromEngineAddress as bs, fromIdentityAddress as bt, fromSearchDoc as bu, galleryService as bv, homeService as bw, initService as bx, layoutService as by, mediaUrl as bz, type Approval as c, toCart as c0, toCartLine as c1, toCategory as c2, toCmsPage as c3, toCollection as c4, toEngineAddress as c5, toIdentityAddress as c6, toMajor as c7, toMinor as c8, toOrder as c9, toPage as ca, toProduct as cb, toRating as cc, toStorefrontFacets as cd, toUser as ce, toVariant as cf, toVendor as cg, uploadService as ch, userService as ci, variantService as cj, varniCustomDesignService as ck, varniCustomProductService as cl, vendorService as cm, warrantyService as cn, wishlistService as co, type AuthResponse as d, AuthService as e, AutocompleteService as f, type B2bRole as g, B2bService as h, BannerService as i, BaseService as j, BlogService as k, type CartLine as l, CartService as m, CatalogService as n, type Category as o, CategoryService as p, ChatService as q, type CheckoutOptions as r, type CheckoutResult as s, CheckoutService as t, type CmsPage as u, type Collection as v, CollectionService as w, type Company as x, type CompanyOrder as y, ContactService as z };
7570
+ export { HomeService as $, type AddOn as A, type B2bPlaced as B, type Cart as C, type CompanyOrder as D, ContactService as E, CountryService as F, CouponService as G, type Credentials as H, type Credit as I, CurrencyService as J, type Customer as K, DealService as L, DemoRequestService as M, type EngineRequest as N, EnquiryService as O, type Envelope as P, type FacetValue as Q, type Faq as R, FaqService as S, FeedbackService as T, type FooterSettings as U, type FreeShipping as V, type Fulfillment as W, GalleryService as X, type HeaderSettings as Y, type HomeLayout as Z, type HomeLayoutSection as _, type Address as a, type VariantImage as a$, type IdentityAddress as a0, InitService as a1, type Invitation as a2, type LayoutCollection as a3, type LayoutPage as a4, LayoutService as a5, type Lead as a6, type ListMeta as a7, MeilisearchService as a8, type Member as a9, ReelsService as aA, RegionService as aB, type RejectedLine as aC, type Review as aD, type ReviewPage as aE, ReviewService as aF, type SearchDoc as aG, type SearchResult as aH, SearchService as aI, SettingService as aJ, type ShippingRate as aK, type SiteChrome as aL, type SiteFooter as aM, type SiteHeader as aN, type SocialLink as aO, StateService as aP, type StoreProfile as aQ, StoreService as aR, type StorefrontCategory as aS, type StorefrontMenu as aT, type StorefrontOrder as aU, type StorefrontProduct as aV, type ThemeSettings as aW, type ThemeSettingsResult as aX, UploadService as aY, UserService as aZ, type Variant as a_, type Menu as aa, type MenuItem as ab, MenuService as ac, type MenuSummary as ad, type Money as ae, NewsletterService as af, type Offer as ag, type Order as ah, type OrderLine as ai, OrderService as aj, type PageLayout as ak, PageService as al, type PaymentIntent as am, PaymentMethodService as an, type Plugin as ao, PluginService as ap, PopularSearchService as aq, PopularityService as ar, type Postcode as as, type Product as at, type ProductFacets as au, type ProductOption as av, ProductService as aw, ProfileService as ax, type Quote as ay, REDIRECT_GATEWAYS as az, AddressService as b, settingService as b$, VariantService as b0, VarniCustomDesignService as b1, VarniCustomProductService as b2, type Vendor as b3, VendorService as b4, WarrantyService as b5, type Wishlist as b6, type WishlistItem as b7, WishlistService as b8, addressService as b9, homeService as bA, initService as bB, layoutService as bC, mediaUrl as bD, meilisearchService as bE, menuService as bF, minorToMajor as bG, newsletterService as bH, orderService as bI, ownDomain as bJ, pageService as bK, paymentMethodService as bL, pluginService as bM, pluginsService as bN, popularSearchService as bO, popularityService as bP, priceOf as bQ, productImages as bR, productService as bS, productVideos as bT, profileService as bU, qs as bV, reelsService as bW, regionService as bX, reviewService as bY, searchService as bZ, setRequestHost as b_, authService as ba, autocompleteService as bb, b2bService as bc, bannerService as bd, blogService as be, cartService as bf, categoryService as bg, chatService as bh, checkoutService as bi, collectionService as bj, contactService as bk, countryService as bl, couponService as bm, currencyExponent as bn, currencyService as bo, dealService as bp, demoRequestService as bq, emptyCart as br, emptyPage as bs, enquiryService as bt, faqService as bu, feedbackService as bv, fromEngineAddress as bw, fromIdentityAddress as bx, fromSearchDoc as by, galleryService as bz, type AppliedDiscount as c, settingsService as c0, stateService as c1, staticStore as c2, storeForHost as c3, storeService as c4, toAddOn as c5, toCart as c6, toCartLine as c7, toCartOffer as c8, toCategory as c9, toCmsPage as ca, toCollection as cb, toEngineAddress as cc, toFreeShipping as cd, toIdentityAddress as ce, toMajor as cf, toMinor as cg, toOrder as ch, toPage as ci, toProduct as cj, toRating as ck, toStorefrontFacets as cl, toUser as cm, toVariant as cn, toVendor as co, uploadService as cp, userService as cq, variantService as cr, varniCustomDesignService as cs, varniCustomProductService as ct, vendorService as cu, warrantyService as cv, wishlistService as cw, type Approval as d, type AuthResponse as e, AuthService as f, AutocompleteService as g, type B2bRole as h, B2bService as i, BannerService as j, BaseService as k, BlogService as l, type CartLine as m, type CartOffer as n, CartService as o, CatalogService as p, type Category as q, CategoryService as r, ChatService as s, type CheckoutOptions as t, type CheckoutResult as u, CheckoutService as v, type CmsPage as w, type Collection as x, CollectionService as y, type Company as z };