@misiki/gocommerce-connector 0.10.0 → 0.12.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 CHANGED
@@ -128,6 +128,9 @@ down stays best-effort: the storefront renders from its static record.
128
128
  | collections | `/api/collections`, `/api/collections/{slug}` |
129
129
  | featured / trending shelves | the collection with slug `featured` / `trending`; newest products when there is none |
130
130
  | bag | `/api/carts…`, `/api/carts/{token}/discount` |
131
+ | Complete the set (add-ons) | `/api/add-ons?product_id=` — `productService.listAddOns({ product })`, each at the price ticking it adds (`price`) beside its own (`regularPrice`); `cartService.addAddOn({ addOnId })` after the product is in the bag. The engine keeps the offer price only while the product is in the bag, one for each |
132
+ | You may also like | `/api/cross-sells?product_id=` — `productService.listCrossSells({ product })`, curated only; the bag's `/api/carts/{token}/cross-sells` — `cartService.listCrossSells()`, falling back to the first item's related products |
133
+ | the bag's offers and free delivery | `/api/carts/{token}/offers` — `cartService.getOffers()` and the coupon drawer's `couponService.listCoupons()`: only the codes the shop chose to show; `/api/carts/{token}/free-shipping` — `cartService.getFreeShipping()`, from the store's own rates, null when it cannot say |
131
134
  | delivery options | `/api/checkout/rates` |
132
135
  | payment methods | `/api/checkout` — cash on delivery, Razorpay, and the first hosted-page gateway (see below) |
133
136
  | place order | `POST /api/checkout/{code}` with an `Idempotency-Key` |
@@ -140,6 +143,7 @@ down stays best-effort: the storefront renders from its static record.
140
143
  | FAQ | `/x/faq` |
141
144
  | composed home page | `/x/layouts/home` (`?preview=` for a draft) — `layoutService.getHomeLayout()`, null when the store has none; carries `themeSettings` and each collection list's `collections` |
142
145
  | product and collection templates | `/x/layouts/product`, `/x/layouts/collection` (`?preview=` for a draft) — `layoutService.getProductLayout()` and `getCollectionLayout()`, the sections the shop arranged around the page's core (`main-product`, `main-collection`); null when none is published, and the page draws as before |
146
+ | header and footer | `/x/layouts/header`, `/x/layouts/footer` (`?preview=` for a draft) — `layoutService.getHeader()` and `getFooter()`: the announcement strip and header menu, the footer's columns menu, words, newsletter switch, social links and copyright line, with the named menu read live from `/x/navigation/menus/{handle}`; null when none is published or on any failure, and the storefront keeps its own. The store's `header` and `footer` menus (`menuService.engineMenus()`, the store record's `menu`) are the ones those name |
143
147
  | theme settings | `/x/layouts/theme` (`?preview=` for a draft) — `layoutService.getThemeSettings()`, the store's colours, fonts and rounding for every page; null when there are none |
144
148
  | menus | `/x/navigation/menus/{header,footer}`, laid over `store.menu`; any menu by handle |
145
149
  | product specs table | the product's category attribute answers |
@@ -250,6 +250,51 @@ type CartLine = {
250
250
  available: number;
251
251
  in_stock: boolean;
252
252
  price_changed: boolean;
253
+ /** The add-on this line was bought as (D133), and the product it is offered with. */
254
+ add_on_id?: number;
255
+ add_on_for?: number;
256
+ compare_at_price?: Money;
257
+ };
258
+ /** A variant offered with a product, optionally at an offer price (D133). */
259
+ type AddOn = {
260
+ id: number;
261
+ product_id: number;
262
+ variant_id: number;
263
+ position: number;
264
+ offer_price: Money | null;
265
+ price: Money;
266
+ compare_at_price?: Money;
267
+ item: {
268
+ product_id: number;
269
+ slug: string;
270
+ title: string;
271
+ variant_label?: string;
272
+ sku: string;
273
+ image_url?: string;
274
+ live: boolean;
275
+ in_stock: boolean;
276
+ };
277
+ };
278
+ /** A listed discount code, judged against one basket (D133). */
279
+ type CartOffer = {
280
+ code: string;
281
+ title: string;
282
+ kind: 'percentage' | 'fixed' | 'free_shipping' | string;
283
+ value_bp?: number;
284
+ value_minor?: number;
285
+ min_subtotal_minor?: number;
286
+ applies: boolean;
287
+ amount?: Money;
288
+ free_shipping?: boolean;
289
+ remaining?: Money;
290
+ reason?: string;
291
+ };
292
+ /** How far a basket is from free delivery (D133). */
293
+ type FreeShipping = {
294
+ qualifies: boolean;
295
+ threshold?: Money;
296
+ remaining?: Money;
297
+ subtotal: Money;
253
298
  };
254
299
  type Cart = {
255
300
  id: string;
@@ -886,6 +931,9 @@ declare function toCartLine(l: CartLine, extra?: {
886
931
  qty: number;
887
932
  price: number;
888
933
  mrp: number;
934
+ /** The add-on this line was bought as (D133), or null on an ordinary line. */
935
+ addOnId: string | null;
936
+ addOnFor: string | null;
889
937
  subtotal: number;
890
938
  total: number;
891
939
  inStock: boolean;
@@ -934,6 +982,9 @@ declare function toCart(c: Cart, extras?: CartExtras, lineExtra?: (l: CartLine)
934
982
  qty: number;
935
983
  price: number;
936
984
  mrp: number;
985
+ /** The add-on this line was bought as (D133), or null on an ordinary line. */
986
+ addOnId: string | null;
987
+ addOnFor: string | null;
937
988
  subtotal: number;
938
989
  total: number;
939
990
  inStock: boolean;
@@ -1162,6 +1213,45 @@ declare function toUser(c: Customer): {
1162
1213
  updatedAt: string;
1163
1214
  };
1164
1215
  declare const priceOf: (m: Money | undefined) => number;
1216
+ /**
1217
+ * An add-on as the buy box draws it (D133): `price` is what ticking it adds,
1218
+ * the offer where there is one, and `regularPrice` the add-on's own, struck
1219
+ * through beside it. Without an offer the two are the same and nothing is
1220
+ * struck.
1221
+ */
1222
+ declare function toAddOn(a: AddOn): {
1223
+ id: string;
1224
+ productId: string;
1225
+ variantId: string;
1226
+ slug: string;
1227
+ title: string;
1228
+ variantTitle: string;
1229
+ thumbnail: string | null;
1230
+ price: number;
1231
+ regularPrice: number;
1232
+ hasOffer: boolean;
1233
+ inStock: boolean;
1234
+ };
1235
+ /** A listed code for one basket, in major units (D133). */
1236
+ declare function toCartOffer(o: CartOffer, currency: string): {
1237
+ code: string;
1238
+ title: string;
1239
+ isPercent: boolean;
1240
+ freeShipping: boolean;
1241
+ /** The percentage for a percentage code, the amount for a fixed one. */
1242
+ value: number;
1243
+ minAmount: number | null;
1244
+ applies: boolean;
1245
+ amount: number | null;
1246
+ remaining: number | null;
1247
+ reason: string;
1248
+ };
1249
+ declare function toFreeShipping(f: FreeShipping): {
1250
+ qualifies: boolean;
1251
+ threshold: number | null;
1252
+ remaining: number | null;
1253
+ subtotal: number;
1254
+ };
1165
1255
 
1166
1256
  type Query = Record<string, string | number | boolean | null | undefined | (string | number)[]>;
1167
1257
  type EngineRequest = {
@@ -1970,6 +2060,142 @@ declare class ProductService extends CatalogService {
1970
2060
  noOfPage: number;
1971
2061
  page: number;
1972
2062
  }>;
2063
+ /**
2064
+ * What the shop offers with a product, ticked in its buy box (D133): each
2065
+ * add-on at the price ticking it adds. Only add-ons that can be bought
2066
+ * arrive; an engine without the route offers none.
2067
+ */
2068
+ listAddOns({ product }: {
2069
+ product: string;
2070
+ }): Promise<{
2071
+ id: string;
2072
+ productId: string;
2073
+ variantId: string;
2074
+ slug: string;
2075
+ title: string;
2076
+ variantTitle: string;
2077
+ thumbnail: string | null;
2078
+ price: number;
2079
+ regularPrice: number;
2080
+ hasOffer: boolean;
2081
+ inStock: boolean;
2082
+ }[]>;
2083
+ /**
2084
+ * "You may also like": the products the shop chose for this one, at their
2085
+ * own prices (D133). Curated only, and empty when none were chosen: the
2086
+ * related products already fill in from the category, and the page should
2087
+ * not draw the same fill twice.
2088
+ */
2089
+ listCrossSells({ product, limit }: {
2090
+ product: string;
2091
+ limit?: number;
2092
+ }): Promise<{
2093
+ id: string;
2094
+ slug: string;
2095
+ title: string;
2096
+ name: string;
2097
+ subtitle: null;
2098
+ description: string;
2099
+ status: string;
2100
+ active: boolean;
2101
+ type: string;
2102
+ currency: string;
2103
+ currencyCode: string;
2104
+ price: number;
2105
+ mrp: number;
2106
+ minPrice: number;
2107
+ maxPrice: number;
2108
+ sku: string;
2109
+ barcode: string | null;
2110
+ weight: number | null;
2111
+ originCountry: string | null;
2112
+ thumbnail: string;
2113
+ image_url: string;
2114
+ images: string;
2115
+ imageList: string[];
2116
+ manageInventory: boolean;
2117
+ allowBackorder: boolean;
2118
+ stock: number;
2119
+ hasStock: boolean;
2120
+ categoryId: string | null;
2121
+ category: {
2122
+ id: string;
2123
+ name: string;
2124
+ slug: string;
2125
+ } | null;
2126
+ categories: {
2127
+ category: {
2128
+ id: string;
2129
+ name: string;
2130
+ slug: string;
2131
+ };
2132
+ }[];
2133
+ categoryHierarchy: {
2134
+ name: string;
2135
+ slug: string;
2136
+ }[];
2137
+ collections: {
2138
+ id: string;
2139
+ name: string;
2140
+ slug: string;
2141
+ }[];
2142
+ vendor: {
2143
+ businessName: string;
2144
+ } | null;
2145
+ productTags: string;
2146
+ keywords: string;
2147
+ metaTitle: string;
2148
+ metaDescription: string | null;
2149
+ link: string;
2150
+ options: {
2151
+ id: string;
2152
+ title: string;
2153
+ name: string;
2154
+ type: string;
2155
+ values: {
2156
+ id: string;
2157
+ value: string;
2158
+ }[];
2159
+ }[];
2160
+ variants: {
2161
+ id: string;
2162
+ productId: string;
2163
+ title: string;
2164
+ sku: string;
2165
+ barcode: string | null;
2166
+ price: number;
2167
+ mrp: number;
2168
+ stock: number;
2169
+ manageInventory: boolean;
2170
+ allowBackorder: boolean;
2171
+ active: boolean;
2172
+ weight: number | null;
2173
+ length: number | null;
2174
+ width: number | null;
2175
+ height: number | null;
2176
+ images: string;
2177
+ img: string;
2178
+ image: string;
2179
+ thumbnail: string;
2180
+ options: {
2181
+ optionId: string;
2182
+ value: string;
2183
+ }[];
2184
+ metadata: Record<string, unknown> | null;
2185
+ }[];
2186
+ ratings: ReturnType<typeof toRating>[];
2187
+ rating: number | null;
2188
+ ratingCount: number;
2189
+ reviewCount: number;
2190
+ attributes: {
2191
+ name: string;
2192
+ value: string;
2193
+ handle: string;
2194
+ }[];
2195
+ metadata: Record<string, unknown> | null;
2196
+ createdAt: string;
2197
+ updatedAt: string;
2198
+ }[]>;
1973
2199
  private relatedTo;
1974
2200
  private shelf;
1975
2201
  /**
@@ -2916,6 +3142,8 @@ declare class CartService extends BaseService {
2916
3142
  qty: number;
2917
3143
  price: number;
2918
3144
  mrp: number;
3145
+ addOnId: string | null;
3146
+ addOnFor: string | null;
2919
3147
  subtotal: number;
2920
3148
  total: number;
2921
3149
  inStock: boolean;
@@ -3000,6 +3228,8 @@ declare class CartService extends BaseService {
3000
3228
  qty: number;
3001
3229
  price: number;
3002
3230
  mrp: number;
3231
+ addOnId: string | null;
3232
+ addOnFor: string | null;
3003
3233
  subtotal: number;
3004
3234
  total: number;
3005
3235
  inStock: boolean;
@@ -3089,6 +3319,8 @@ declare class CartService extends BaseService {
3089
3319
  qty: number;
3090
3320
  price: number;
3091
3321
  mrp: number;
3322
+ addOnId: string | null;
3323
+ addOnFor: string | null;
3092
3324
  subtotal: number;
3093
3325
  total: number;
3094
3326
  inStock: boolean;
@@ -3183,6 +3415,8 @@ declare class CartService extends BaseService {
3183
3415
  qty: number;
3184
3416
  price: number;
3185
3417
  mrp: number;
3418
+ addOnId: string | null;
3419
+ addOnFor: string | null;
3186
3420
  subtotal: number;
3187
3421
  total: number;
3188
3422
  inStock: boolean;
@@ -3248,6 +3482,127 @@ declare class CartService extends BaseService {
3248
3482
  billingAddress: null;
3249
3483
  billingAddressId: null;
3250
3484
  }>;
3485
+ /**
3486
+ * Adds an add-on from a product's "Complete the set" (D133) at its offer
3487
+ * price. The product it is offered with has to be in the bag already, so
3488
+ * this is called after adding it; the engine refuses one too many with the
3489
+ * sentence the shopper is shown.
3490
+ */
3491
+ addAddOn({ cartId, addOnId, qty }: {
3492
+ cartId?: string | null;
3493
+ addOnId: string | number;
3494
+ qty?: number;
3495
+ }): Promise<{
3496
+ id: string;
3497
+ status: "open" | "converted" | "abandoned";
3498
+ email: string | null;
3499
+ phone: string | null;
3500
+ name: string | null;
3501
+ lineItems: {
3502
+ id: string;
3503
+ productId: string;
3504
+ variantId: string;
3505
+ sku: string;
3506
+ title: string;
3507
+ name: string;
3508
+ slug: string;
3509
+ thumbnail: string | null;
3510
+ variantTitle: string;
3511
+ qty: number;
3512
+ price: number;
3513
+ mrp: number;
3514
+ addOnId: string | null;
3515
+ addOnFor: string | null;
3516
+ subtotal: number;
3517
+ total: number;
3518
+ inStock: boolean;
3519
+ priceChanged: boolean;
3520
+ currentPrice: number;
3521
+ isSelectedForCheckout: boolean;
3522
+ variant: {
3523
+ id: string;
3524
+ options: {
3525
+ option: {
3526
+ title: string;
3527
+ };
3528
+ value: string;
3529
+ }[];
3530
+ };
3531
+ product: {
3532
+ id: string;
3533
+ categories: unknown[];
3534
+ };
3535
+ }[];
3536
+ qty: number;
3537
+ currencyCode: string;
3538
+ currency: string;
3539
+ subtotal: number;
3540
+ discountAmount: number;
3541
+ savingAmount: number;
3542
+ couponCode: string | null;
3543
+ discount: AppliedDiscount | null;
3544
+ shippingCharges: number;
3545
+ shippingRateId: string | null;
3546
+ shippingMethod: string | null;
3547
+ tax: number;
3548
+ taxIncluded: boolean;
3549
+ codCharges: number;
3550
+ total: number;
3551
+ shippingAddress: StorefrontAddress | null;
3552
+ shippingAddressId: string | null;
3553
+ billingAddress: StorefrontAddress | null;
3554
+ billingAddressId: string | null;
3555
+ paymentMethod: null;
3556
+ needAddress: boolean;
3557
+ completedAt: string | null;
3558
+ createdAt: string;
3559
+ updatedAt: string;
3560
+ expiresAt: string;
3561
+ }>;
3562
+ /**
3563
+ * The codes the shop chose to show (D133), each with what it takes off this
3564
+ * bag or how much more the bag needs. None without a bag.
3565
+ */
3566
+ getOffers({ cartId }?: {
3567
+ cartId?: string | null;
3568
+ }): Promise<{
3569
+ code: string;
3570
+ title: string;
3571
+ isPercent: boolean;
3572
+ freeShipping: boolean;
3573
+ value: number;
3574
+ minAmount: number | null;
3575
+ applies: boolean;
3576
+ amount: number | null;
3577
+ remaining: number | null;
3578
+ reason: string;
3579
+ }[]>;
3580
+ /**
3581
+ * How far the bag is from free delivery (D133), read from the store's own
3582
+ * rates for the country (the store's own when none is given). Null when
3583
+ * the engine cannot say: a bar with a made-up figure is worse than none.
3584
+ */
3585
+ getFreeShipping({ cartId, country, state }?: {
3586
+ cartId?: string | null;
3587
+ country?: string;
3588
+ state?: string;
3589
+ }): Promise<{
3590
+ qualifies: boolean;
3591
+ threshold: number | null;
3592
+ remaining: number | null;
3593
+ subtotal: number;
3594
+ } | null>;
3595
+ /**
3596
+ * "You may be interested in" (D133): what the bag's products suggest, less
3597
+ * what it holds; with nothing curated, the first product's related
3598
+ * products, still less what it holds.
3599
+ */
3600
+ listCrossSells({ cartId, limit }?: {
3601
+ cartId?: string | null;
3602
+ limit?: number;
3603
+ }): Promise<{
3604
+ id: string;
3605
+ }[]>;
3251
3606
  /** `qty` is the new total; 0 takes the line out. */
3252
3607
  updateCart({ cartId, lineId, qty, }: {
3253
3608
  cartId?: string;
@@ -3273,6 +3628,8 @@ declare class CartService extends BaseService {
3273
3628
  qty: number;
3274
3629
  price: number;
3275
3630
  mrp: number;
3631
+ addOnId: string | null;
3632
+ addOnFor: string | null;
3276
3633
  subtotal: number;
3277
3634
  total: number;
3278
3635
  inStock: boolean;
@@ -3360,6 +3717,8 @@ declare class CartService extends BaseService {
3360
3717
  qty: number;
3361
3718
  price: number;
3362
3719
  mrp: number;
3720
+ addOnId: string | null;
3721
+ addOnFor: string | null;
3363
3722
  subtotal: number;
3364
3723
  total: number;
3365
3724
  inStock: boolean;
@@ -3456,6 +3815,8 @@ declare class CartService extends BaseService {
3456
3815
  qty: number;
3457
3816
  price: number;
3458
3817
  mrp: number;
3818
+ addOnId: string | null;
3819
+ addOnFor: string | null;
3459
3820
  subtotal: number;
3460
3821
  total: number;
3461
3822
  inStock: boolean;
@@ -3548,6 +3909,8 @@ declare class CartService extends BaseService {
3548
3909
  qty: number;
3549
3910
  price: number;
3550
3911
  mrp: number;
3912
+ addOnId: string | null;
3913
+ addOnFor: string | null;
3551
3914
  subtotal: number;
3552
3915
  total: number;
3553
3916
  inStock: boolean;
@@ -3613,6 +3976,8 @@ declare class CartService extends BaseService {
3613
3976
  qty: number;
3614
3977
  price: number;
3615
3978
  mrp: number;
3979
+ addOnId: string | null;
3980
+ addOnFor: string | null;
3616
3981
  subtotal: number;
3617
3982
  total: number;
3618
3983
  inStock: boolean;
@@ -3701,6 +4066,8 @@ declare class CartService extends BaseService {
3701
4066
  qty: number;
3702
4067
  price: number;
3703
4068
  mrp: number;
4069
+ addOnId: string | null;
4070
+ addOnFor: string | null;
3704
4071
  subtotal: number;
3705
4072
  total: number;
3706
4073
  inStock: boolean;
@@ -3789,6 +4156,8 @@ declare class CartService extends BaseService {
3789
4156
  qty: number;
3790
4157
  price: number;
3791
4158
  mrp: number;
4159
+ addOnId: string | null;
4160
+ addOnFor: string | null;
3792
4161
  subtotal: number;
3793
4162
  total: number;
3794
4163
  inStock: boolean;
@@ -4144,14 +4513,29 @@ declare class PaymentMethodService extends BaseService {
4144
4513
  declare const paymentMethodService: PaymentMethodService;
4145
4514
 
4146
4515
  /**
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
4516
+ * Discount codes are typed, not browsed, except the ones the shop chose to
4517
+ * show (D133): the engine lists a code only when the shop ticked "Show in the
4518
+ * basket's offers", judged against the stored bag. Every other code stays
4519
+ * known only to whoever was given it, and still works through
4150
4520
  * `cartService.applyCoupon`.
4521
+ *
4522
+ * The drawer's shape: `amount` is the percentage or the amount,
4523
+ * `minAmount` the bag it needs, and `description` says what is
4524
+ * still missing.
4151
4525
  */
4152
4526
  declare class CouponService extends BaseService {
4153
4527
  listCoupons(_args?: Record<string, unknown>): Promise<{
4154
- data: never[];
4528
+ data: {
4529
+ id: string;
4530
+ code: string;
4531
+ title: string;
4532
+ isPercent: boolean;
4533
+ amount: number;
4534
+ minAmount: number | null;
4535
+ description: string;
4536
+ applies: boolean;
4537
+ remaining: number | null;
4538
+ }[];
4155
4539
  count: number;
4156
4540
  pageSize: number;
4157
4541
  noOfPage: number;
@@ -5665,8 +6049,15 @@ declare class MenuService extends BaseService {
5665
6049
  listMenus(): Promise<MenuSummary[]>;
5666
6050
  /** One menu by handle, in the storefront's shape: `{ menuId, name, items: [{ id, name, link, items }] }`. */
5667
6051
  getMenu(handle: string): Promise<StorefrontMenu>;
5668
- /** The header and footer menus, or `null` when the module is not there. Cached: a menu is store-level. */
6052
+ /**
6053
+ * The header and footer menus, or `null` when the module is not there. Cached: a menu is
6054
+ * store-level. Each is the menu the shop chose for it in the theme editor's header or footer
6055
+ * (GoCommerce D131), still under the `header` / `footer` id every storefront looks for, so the
6056
+ * choice reaches every place that draws one; the menus named so are the default.
6057
+ */
5669
6058
  engineMenus(): Promise<StorefrontMenu[] | null>;
6059
+ /** The handle of the menu the published header or footer names, else the part's own name. */
6060
+ private chosenMenu;
5670
6061
  }
5671
6062
  declare const menuService: MenuService;
5672
6063
 
@@ -5830,7 +6221,7 @@ type HomeLayoutSection = {
5830
6221
  * or `main-collection` (the collection's grid) — at the place the shop put
5831
6222
  * it, and the storefront draws its own core there.
5832
6223
  */
5833
- type LayoutPage = 'home' | 'product' | 'collection';
6224
+ type LayoutPage = 'home' | 'product' | 'collection' | 'header' | 'footer';
5834
6225
  type HomeLayout = {
5835
6226
  page: string;
5836
6227
  theme: string;
@@ -5850,6 +6241,50 @@ type ThemeSettingsResult = {
5850
6241
  preview: boolean;
5851
6242
  settings: ThemeSettings;
5852
6243
  };
6244
+ /**
6245
+ * The header's settings as the shop set them (ext/layouts, D131): the strip
6246
+ * above the header — shown or not, its words, its link, and whether it is on
6247
+ * every page or the home page only — and the handle of the menu across it.
6248
+ * Plain text, and a link that is `/path` or `http(s)://`.
6249
+ */
6250
+ type HeaderSettings = {
6251
+ show_announcement?: boolean;
6252
+ announcement_text?: string;
6253
+ announcement_link?: string;
6254
+ announcement_pages?: 'all' | 'home';
6255
+ menu?: string;
6256
+ };
6257
+ /** A footer's link to the shop's page on a social network; `url` is always `http(s)://`. */
6258
+ type SocialLink = {
6259
+ network: 'instagram' | 'facebook' | 'x' | 'youtube' | 'pinterest' | 'linkedin' | 'whatsapp' | 'telegram';
6260
+ url: string;
6261
+ };
6262
+ /**
6263
+ * The footer's settings (D131): the handle of the menu whose top-level links
6264
+ * become its columns, a few words about the shop, whether the newsletter
6265
+ * sign-up shows (absent while the newsletter is off), social links and the
6266
+ * copyright line. An absent one means the storefront keeps its own.
6267
+ */
6268
+ type FooterSettings = {
6269
+ menu?: string;
6270
+ about?: string;
6271
+ newsletter?: boolean;
6272
+ social?: SocialLink[];
6273
+ copyright?: string;
6274
+ };
6275
+ /**
6276
+ * The published header or footer, or a preview key's draft, with the menu
6277
+ * it names already read — live, so a menu edited in the panel shows without a
6278
+ * publish. `menu` is null when none is named or the named one is gone.
6279
+ */
6280
+ type SiteChrome<S> = {
6281
+ revision?: number;
6282
+ preview: boolean;
6283
+ settings: S;
6284
+ menu: StorefrontMenu | null;
6285
+ };
6286
+ type SiteHeader = SiteChrome<HeaderSettings>;
6287
+ type SiteFooter = SiteChrome<FooterSettings>;
5853
6288
  /**
5854
6289
  * Composed pages from ext/layouts. A store without one — the plugin off,
5855
6290
  * nothing published, an engine built without the module, or a preview key
@@ -5886,6 +6321,20 @@ declare class LayoutService extends BaseService {
5886
6321
  getThemeSettings({ preview }?: {
5887
6322
  preview?: string | null;
5888
6323
  }): Promise<ThemeSettingsResult | null>;
6324
+ /**
6325
+ * The header the shop set in the theme editor (D131), drawn on every
6326
+ * page: the published one, or a preview key's draft. Null — the
6327
+ * storefront's own header — when none is published, the editor is off, the
6328
+ * engine is older, or anything fails: a header is never worth an error page.
6329
+ */
6330
+ getHeader({ preview }?: {
6331
+ preview?: string | null;
6332
+ }): Promise<SiteHeader | null>;
6333
+ /** The footer the shop set in the theme editor (D131); null for the storefront's own, as getHeader. */
6334
+ getFooter({ preview }?: {
6335
+ preview?: string | null;
6336
+ }): Promise<SiteFooter | null>;
6337
+ private chrome;
5889
6338
  }
5890
6339
  declare const layoutService: LayoutService;
5891
6340
 
@@ -6725,6 +7174,8 @@ declare class B2bService extends BaseService {
6725
7174
  qty: number;
6726
7175
  price: number;
6727
7176
  mrp: number;
7177
+ addOnId: string | null;
7178
+ addOnFor: string | null;
6728
7179
  subtotal: number;
6729
7180
  total: number;
6730
7181
  inStock: boolean;
@@ -6794,6 +7245,8 @@ declare class B2bService extends BaseService {
6794
7245
  qty: number;
6795
7246
  price: number;
6796
7247
  mrp: number;
7248
+ addOnId: string | null;
7249
+ addOnFor: string | null;
6797
7250
  subtotal: number;
6798
7251
  total: number;
6799
7252
  inStock: boolean;
@@ -7029,4 +7482,4 @@ declare class B2bService extends BaseService {
7029
7482
  }
7030
7483
  declare const b2bService: B2bService;
7031
7484
 
7032
- export { type LayoutPage 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 Fulfillment as S, GalleryService as T, type HomeLayout as U, type HomeLayoutSection as V, HomeService as W, type IdentityAddress as X, InitService as Y, type Invitation as Z, type LayoutCollection as _, AddressService as a, addressService as a$, LayoutService as a0, type Lead as a1, type ListMeta as a2, MeilisearchService as a3, type Member as a4, type Menu as a5, type MenuItem as a6, MenuService as a7, type MenuSummary as a8, type Money as a9, type SearchDoc as aA, type SearchResult as aB, SearchService as aC, SettingService as aD, type ShippingRate as aE, StateService as aF, type StoreProfile as aG, StoreService as aH, type StorefrontCategory as aI, type StorefrontMenu as aJ, type StorefrontOrder as aK, type StorefrontProduct as aL, type ThemeSettings as aM, type ThemeSettingsResult as aN, UploadService as aO, UserService as aP, type Variant as aQ, type VariantImage as aR, VariantService as aS, VarniCustomDesignService as aT, VarniCustomProductService as aU, type Vendor as aV, VendorService as aW, WarrantyService as aX, type Wishlist as aY, type WishlistItem as aZ, WishlistService as a_, NewsletterService as aa, type Offer as ab, type Order as ac, type OrderLine as ad, OrderService as ae, type PageLayout as af, PageService as ag, type PaymentIntent as ah, PaymentMethodService as ai, type Plugin as aj, PluginService as ak, PopularSearchService as al, PopularityService as am, type Product as an, type ProductFacets as ao, type ProductOption as ap, ProductService as aq, ProfileService as ar, type Quote as as, REDIRECT_GATEWAYS as at, ReelsService as au, RegionService as av, type RejectedLine as aw, type Review as ax, type ReviewPage as ay, ReviewService as az, type AppliedDiscount as b, toEngineAddress as b$, authService as b0, autocompleteService as b1, b2bService as b2, bannerService as b3, blogService as b4, cartService as b5, categoryService as b6, chatService as b7, checkoutService as b8, collectionService as b9, pageService as bA, paymentMethodService as bB, pluginService as bC, pluginsService as bD, popularSearchService as bE, popularityService as bF, priceOf as bG, productImages as bH, productService as bI, profileService as bJ, qs as bK, reelsService as bL, regionService as bM, reviewService as bN, searchService as bO, setRequestHost as bP, settingService as bQ, settingsService as bR, stateService as bS, staticStore as bT, storeForHost as bU, storeService as bV, toCart as bW, toCartLine as bX, toCategory as bY, toCmsPage as bZ, toCollection as b_, contactService as ba, countryService as bb, couponService as bc, currencyExponent as bd, currencyService as be, dealService as bf, demoRequestService as bg, emptyCart as bh, emptyPage as bi, enquiryService as bj, faqService as bk, feedbackService as bl, fromEngineAddress as bm, fromIdentityAddress as bn, fromSearchDoc as bo, galleryService as bp, homeService as bq, initService as br, layoutService as bs, mediaUrl as bt, meilisearchService as bu, menuService as bv, minorToMajor as bw, newsletterService as bx, orderService as by, ownDomain as bz, type Approval as c, toIdentityAddress as c0, toMajor as c1, toMinor as c2, toOrder as c3, toPage as c4, toProduct as c5, toRating as c6, toStorefrontFacets as c7, toUser as c8, toVariant as c9, toVendor as ca, uploadService as cb, userService as cc, variantService as cd, varniCustomDesignService as ce, varniCustomProductService as cf, vendorService as cg, warrantyService as ch, wishlistService as ci, 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 };
7485
+ 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, VariantService 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, RegionService as aA, type RejectedLine as aB, type Review as aC, type ReviewPage as aD, ReviewService as aE, type SearchDoc as aF, type SearchResult as aG, SearchService as aH, SettingService as aI, type ShippingRate as aJ, type SiteChrome as aK, type SiteFooter as aL, type SiteHeader as aM, type SocialLink as aN, StateService as aO, type StoreProfile as aP, StoreService as aQ, type StorefrontCategory as aR, type StorefrontMenu as aS, type StorefrontOrder as aT, type StorefrontProduct as aU, type ThemeSettings as aV, type ThemeSettingsResult as aW, UploadService as aX, UserService as aY, type Variant as aZ, type VariantImage 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 Product as as, type ProductFacets as at, type ProductOption as au, ProductService as av, ProfileService as aw, type Quote as ax, REDIRECT_GATEWAYS as ay, ReelsService as az, AddressService as b, stateService as b$, VarniCustomDesignService as b0, VarniCustomProductService as b1, type Vendor as b2, VendorService as b3, WarrantyService as b4, type Wishlist as b5, type WishlistItem as b6, WishlistService as b7, addressService as b8, authService as b9, initService as bA, layoutService as bB, mediaUrl as bC, meilisearchService as bD, menuService as bE, minorToMajor as bF, newsletterService as bG, orderService as bH, ownDomain as bI, pageService as bJ, paymentMethodService as bK, pluginService as bL, pluginsService as bM, popularSearchService as bN, popularityService as bO, priceOf as bP, productImages as bQ, productService as bR, profileService as bS, qs as bT, reelsService as bU, regionService as bV, reviewService as bW, searchService as bX, setRequestHost as bY, settingService as bZ, settingsService as b_, autocompleteService as ba, b2bService as bb, bannerService as bc, blogService as bd, cartService as be, categoryService as bf, chatService as bg, checkoutService as bh, collectionService as bi, contactService as bj, countryService as bk, couponService as bl, currencyExponent as bm, currencyService as bn, dealService as bo, demoRequestService as bp, emptyCart as bq, emptyPage as br, enquiryService as bs, faqService as bt, feedbackService as bu, fromEngineAddress as bv, fromIdentityAddress as bw, fromSearchDoc as bx, galleryService as by, homeService as bz, type AppliedDiscount as c, staticStore as c0, storeForHost as c1, storeService as c2, toAddOn as c3, toCart as c4, toCartLine as c5, toCartOffer as c6, toCategory as c7, toCmsPage as c8, toCollection as c9, toEngineAddress as ca, toFreeShipping as cb, toIdentityAddress as cc, toMajor as cd, toMinor as ce, toOrder as cf, toPage as cg, toProduct as ch, toRating as ci, toStorefrontFacets as cj, toUser as ck, toVariant as cl, toVendor as cm, uploadService as cn, userService as co, variantService as cp, varniCustomDesignService as cq, varniCustomProductService as cr, vendorService as cs, warrantyService as ct, wishlistService as cu, 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 };