@cartbase/storefront 0.3.0 → 0.4.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cartbase/storefront",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "description": "Storefront SDK + UI component library for Cartbase stores: typed API client, checkout orchestration, cart drawer, product/catalog components, tracking. Source-shipped TypeScript — add it to transpilePackages.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -47,11 +47,10 @@ export interface StoreShippingOption {
47
47
  name: string
48
48
  provider_id: string | null
49
49
  service_zone_id: string | null
50
- shipping_option_type_id: string | null
51
50
  shipping_profile_id: string | null
52
51
  data: Record<string, unknown> | null
53
- /** Embedded `shipping_option_types` row (label/description/code) or null. */
54
- type: Record<string, unknown> | null
52
+ /** The option's display label (e.g. "Express") as `{ label }`, or null. */
53
+ type: { label: string } | null
55
54
  /** Flat price in the cart currency; null without `cart_id` or when no price row matches. */
56
55
  amount: MajorUnitAmount | null
57
56
  /** Always "flat" today — calculated-rate carriers are not wired yet. */
@@ -677,13 +677,11 @@ export function useCheckoutOrchestration({
677
677
  string | null
678
678
  >(cart?.shipping_methods?.at(-1)?.shipping_option_id || null)
679
679
 
680
+ // Every listed option is offerable: the Medusa-era pickup filter read an
681
+ // embedded fulfillment_set the Cartbase API never sends (it never fired),
682
+ // and the concept itself died in the shipping vocabulary trial.
680
683
  const shippingMethods = useMemo(
681
- () =>
682
- (availableShippingMethods ?? []).filter(
683
- (sm) =>
684
- (sm as { service_zone?: { fulfillment_set?: { type?: string } } })
685
- .service_zone?.fulfillment_set?.type !== "pickup"
686
- ),
684
+ () => availableShippingMethods ?? [],
687
685
  [availableShippingMethods]
688
686
  )
689
687