@poweredbysous/storefront-sdk 3.4.0 → 3.5.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/dist/index.d.cts CHANGED
@@ -2756,6 +2756,7 @@ interface components {
2756
2756
  * @description Last computed full shipping estimate (before delivery fee split). NULL means no estimate has been computed — which is not the same as an estimate of zero, and must never be read as free delivery.
2757
2757
  */
2758
2758
  estimated_shipping_cost?: string | null;
2759
+ readonly delivery_address: components["schemas"]["CartDeliveryAddress"] | null;
2759
2760
  readonly service_fees: {
2760
2761
  /**
2761
2762
  * Format: decimal
@@ -2778,10 +2779,13 @@ interface components {
2778
2779
  }[];
2779
2780
  };
2780
2781
  /**
2781
- * @description Return cart_total + customer shipping portion + service fees.
2782
+ * @description What checkout will charge for this basket, before gift cards and
2783
+ * Zeemijlen: the items, surcharges, delivery fee and service fee, less
2784
+ * discounts. Leaves out only a delivery fee not priced yet, which
2785
+ * ``service_fees.estimated`` says.
2782
2786
  *
2783
- * Uses the service_fees and shipping_estimate already computed
2784
- * by this serializer (which include pass-through splits).
2787
+ * Totalled by ``order_total_before_points``, the formula checkout
2788
+ * totals with, so the cart total is the checkout total.
2785
2789
  */
2786
2790
  readonly estimated_total: string;
2787
2791
  /**
@@ -2801,6 +2805,24 @@ interface components {
2801
2805
  /** Format: date-time */
2802
2806
  expires_at: string;
2803
2807
  };
2808
+ /**
2809
+ * @description Where the shopper wants delivery, as the shipping estimate reads it.
2810
+ *
2811
+ * Given with the fulfilment choice, before the first item, so every cart
2812
+ * response carries the delivery fee checkout will charge (price
2813
+ * transparency). The same fields a cart GET takes as query parameters.
2814
+ */
2815
+ CartDeliveryAddress: {
2816
+ /** Format: decimal */
2817
+ latitude: string;
2818
+ /** Format: decimal */
2819
+ longitude: string;
2820
+ postal_code?: string;
2821
+ address_street?: string;
2822
+ address_city?: string;
2823
+ /** @description ISO 3166-1 alpha-2, case-insensitive. A nationwide carrier prices by country, so it is enough without a street and city; a live courier quote needs all three. */
2824
+ address_country?: string;
2825
+ };
2804
2826
  /** @description Validates a single cart item for eligibility checks. */
2805
2827
  CartItem: {
2806
2828
  product_id: number;
@@ -4069,6 +4091,8 @@ interface components {
4069
4091
  fulfillment_type?: components["schemas"]["FulfillmentTypeEnum"];
4070
4092
  /** Format: date */
4071
4093
  fulfillment_date?: string;
4094
+ /** @description The shopper's delivery address. Stored on the cart so every cart response prices the delivery fee; null forgets it, and leaving it out keeps the one already given. */
4095
+ delivery_address?: components["schemas"]["CartDeliveryAddress"] | null;
4072
4096
  };
4073
4097
  /** @description Validates the request body for updating a line item quantity. */
4074
4098
  PatchedUpdateItemQuantityInput: {
@@ -6088,7 +6112,7 @@ interface operations {
6088
6112
  address_country?: string;
6089
6113
  /** @description Delivery destination street line. Required together with address_city and address_country to trigger a live shipping quote (e.g. from Uber Direct); without all three the shipping_estimate group will report cost_known=false. */
6090
6114
  address_street?: string;
6091
- /** @description Delivery destination latitude. When paired with longitude, enables a per-group shipping estimate in the response. */
6115
+ /** @description Delivery destination latitude. When paired with longitude, enables a per-group shipping estimate in the response. Ignored, like every address parameter here, once the cart holds a `delivery_address` from the fulfilment PATCH. */
6092
6116
  latitude?: number;
6093
6117
  /** @description Delivery destination longitude. */
6094
6118
  longitude?: number;
package/dist/index.d.ts CHANGED
@@ -2756,6 +2756,7 @@ interface components {
2756
2756
  * @description Last computed full shipping estimate (before delivery fee split). NULL means no estimate has been computed — which is not the same as an estimate of zero, and must never be read as free delivery.
2757
2757
  */
2758
2758
  estimated_shipping_cost?: string | null;
2759
+ readonly delivery_address: components["schemas"]["CartDeliveryAddress"] | null;
2759
2760
  readonly service_fees: {
2760
2761
  /**
2761
2762
  * Format: decimal
@@ -2778,10 +2779,13 @@ interface components {
2778
2779
  }[];
2779
2780
  };
2780
2781
  /**
2781
- * @description Return cart_total + customer shipping portion + service fees.
2782
+ * @description What checkout will charge for this basket, before gift cards and
2783
+ * Zeemijlen: the items, surcharges, delivery fee and service fee, less
2784
+ * discounts. Leaves out only a delivery fee not priced yet, which
2785
+ * ``service_fees.estimated`` says.
2782
2786
  *
2783
- * Uses the service_fees and shipping_estimate already computed
2784
- * by this serializer (which include pass-through splits).
2787
+ * Totalled by ``order_total_before_points``, the formula checkout
2788
+ * totals with, so the cart total is the checkout total.
2785
2789
  */
2786
2790
  readonly estimated_total: string;
2787
2791
  /**
@@ -2801,6 +2805,24 @@ interface components {
2801
2805
  /** Format: date-time */
2802
2806
  expires_at: string;
2803
2807
  };
2808
+ /**
2809
+ * @description Where the shopper wants delivery, as the shipping estimate reads it.
2810
+ *
2811
+ * Given with the fulfilment choice, before the first item, so every cart
2812
+ * response carries the delivery fee checkout will charge (price
2813
+ * transparency). The same fields a cart GET takes as query parameters.
2814
+ */
2815
+ CartDeliveryAddress: {
2816
+ /** Format: decimal */
2817
+ latitude: string;
2818
+ /** Format: decimal */
2819
+ longitude: string;
2820
+ postal_code?: string;
2821
+ address_street?: string;
2822
+ address_city?: string;
2823
+ /** @description ISO 3166-1 alpha-2, case-insensitive. A nationwide carrier prices by country, so it is enough without a street and city; a live courier quote needs all three. */
2824
+ address_country?: string;
2825
+ };
2804
2826
  /** @description Validates a single cart item for eligibility checks. */
2805
2827
  CartItem: {
2806
2828
  product_id: number;
@@ -4069,6 +4091,8 @@ interface components {
4069
4091
  fulfillment_type?: components["schemas"]["FulfillmentTypeEnum"];
4070
4092
  /** Format: date */
4071
4093
  fulfillment_date?: string;
4094
+ /** @description The shopper's delivery address. Stored on the cart so every cart response prices the delivery fee; null forgets it, and leaving it out keeps the one already given. */
4095
+ delivery_address?: components["schemas"]["CartDeliveryAddress"] | null;
4072
4096
  };
4073
4097
  /** @description Validates the request body for updating a line item quantity. */
4074
4098
  PatchedUpdateItemQuantityInput: {
@@ -6088,7 +6112,7 @@ interface operations {
6088
6112
  address_country?: string;
6089
6113
  /** @description Delivery destination street line. Required together with address_city and address_country to trigger a live shipping quote (e.g. from Uber Direct); without all three the shipping_estimate group will report cost_known=false. */
6090
6114
  address_street?: string;
6091
- /** @description Delivery destination latitude. When paired with longitude, enables a per-group shipping estimate in the response. */
6115
+ /** @description Delivery destination latitude. When paired with longitude, enables a per-group shipping estimate in the response. Ignored, like every address parameter here, once the cart holds a `delivery_address` from the fulfilment PATCH. */
6092
6116
  latitude?: number;
6093
6117
  /** @description Delivery destination longitude. */
6094
6118
  longitude?: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@poweredbysous/storefront-sdk",
3
- "version": "3.4.0",
3
+ "version": "3.5.0",
4
4
  "description": "Type-safe TypeScript SDK for SOUS Storefront Backend",
5
5
  "license": "UNLICENSED",
6
6
  "private": false,