create-cartbase 0.1.2 → 0.1.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-cartbase",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "Scaffold a Cartbase storefront: npm create cartbase my-store",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -57,17 +57,23 @@ changes the total; `refreshPaymentIfTerminal()` from Stripe Elements
57
57
  {
58
58
  "shipping_options": [{
59
59
  "id": "so_…", "name": "Standard",
60
- "provider_id": "fp_manual", "service_zone_id": "sz_…",
61
- "shipping_option_type_id": "sotype_…", "shipping_profile_id": "sp_…",
60
+ "provider_id": null, // the carrier, when the merchant bound one
61
+ "service_zone_id": "sz_…", "shipping_profile_id": "sp_…",
62
62
  "data": null,
63
- "type": { "": "shipping_option_types row (label/code/description)" },
64
- "amount": 5, // flat price in the cart currency; null without cart_id
63
+ "type": { "label": "Express" }, // the option's display label, or null
64
+ "amount": 5, // the price the cart pays; null without cart_id
65
65
  "price_type": "flat" // calculated-rate carriers not wired yet
66
66
  }],
67
67
  "count": 1, "offset": 0, "limit": 1
68
68
  }
69
69
  ```
70
70
 
71
+ - **Eligibility** — four gates run server-side before an option lists:
72
+ the option's shipping profile must be among the cart products' profiles;
73
+ its zone must cover the shipping address; its visibility rules must
74
+ pass; and a price must exist for the cart. Conditional rates (tiers by
75
+ order amount, cart weight, or cart volume) resolve here — `amount` is
76
+ always the tier the cart actually satisfies.
71
77
  - **Errors** — 404 `cart_not_found` (bad `cart_id`).
72
78
  - **SDK** — `checkout.listShippingOptions(client, {cart_id})`.
73
79
  - **Components** — shipping picker, carrier/locker pickers (carrier
@@ -8,7 +8,7 @@
8
8
  "typecheck": "tsc --noEmit"
9
9
  },
10
10
  "dependencies": {
11
- "@cartbase/storefront": "^0.3.0",
11
+ "@cartbase/storefront": "^0.4.0",
12
12
  "next": "16.2.4",
13
13
  "react": "19.2.4",
14
14
  "react-dom": "19.2.4"