@poweredbysous/storefront-sdk 2.0.0 → 2.1.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
@@ -2549,7 +2549,7 @@ interface components {
2549
2549
  id: string;
2550
2550
  /**
2551
2551
  * Format: int64
2552
- * @description company_id from the authenticated merchant
2552
+ * @description Store.id from the authenticated merchant
2553
2553
  */
2554
2554
  store_id: number;
2555
2555
  /**
@@ -2577,6 +2577,7 @@ interface components {
2577
2577
  version?: number;
2578
2578
  readonly item_count: number;
2579
2579
  readonly line_items: components["schemas"]["CartLineItem"][];
2580
+ /** @description The discount coming off this cart, code-entered or auto-applied. */
2580
2581
  readonly discount: {
2581
2582
  [key: string]: unknown;
2582
2583
  } | null;
@@ -2763,7 +2764,7 @@ interface components {
2763
2764
  id: string;
2764
2765
  /**
2765
2766
  * Format: int64
2766
- * @description company_id from the authenticated merchant
2767
+ * @description Store.id from the authenticated merchant
2767
2768
  */
2768
2769
  store_id: number;
2769
2770
  /**
@@ -3037,7 +3038,7 @@ interface components {
3037
3038
  id: string;
3038
3039
  /**
3039
3040
  * Format: int64
3040
- * @description company_id from the authenticated merchant
3041
+ * @description Store.id from the authenticated merchant
3041
3042
  */
3042
3043
  store_id: number;
3043
3044
  /** @description 6-character alphanumeric code for sharing */
@@ -3230,7 +3231,7 @@ interface components {
3230
3231
  order_number: string;
3231
3232
  /**
3232
3233
  * Format: int64
3233
- * @description company_id from the authenticated merchant
3234
+ * @description Store.id from the authenticated merchant
3234
3235
  */
3235
3236
  store_id: number;
3236
3237
  /**
@@ -3751,6 +3752,29 @@ interface components {
3751
3752
  value_reference?: number | null;
3752
3753
  readonly selected_choices: components["schemas"]["AttributeChoice"][];
3753
3754
  };
3755
+ /**
3756
+ * @description Display-only auto-applied-discount badge attached to a product.
3757
+ *
3758
+ * Named ``auto_discount`` rather than ``discount`` deliberately. The
3759
+ * storefront already has a per-product ``discount`` concept -- a unit-price
3760
+ * reduction that drives the effective price and the strikethrough -- and
3761
+ * reusing the name would have fed this badge straight into that
3762
+ * calculation.
3763
+ *
3764
+ * Shape-only serializer used for OpenAPI generation; the value is a plain
3765
+ * dict injected via serializer context (``product_discounts``) by the
3766
+ * ``core.product_context`` seam, not a model instance.
3767
+ */
3768
+ ProductAutoDiscount: {
3769
+ id: string;
3770
+ name: string;
3771
+ discount_type: string;
3772
+ /** Format: decimal */
3773
+ value: string;
3774
+ currency: string;
3775
+ product_ids: number[];
3776
+ restrictions: components["schemas"]["_DiscountRestrictions"];
3777
+ };
3754
3778
  /** @description Resolve tags from ProductTranslation, falling back to Product.tags. */
3755
3779
  ProductDetail: {
3756
3780
  readonly id: number;
@@ -3818,6 +3842,7 @@ interface components {
3818
3842
  readonly is_trending: boolean | null;
3819
3843
  readonly trend_score: string | null;
3820
3844
  readonly promotion: components["schemas"]["ProductPromotion"] | null;
3845
+ readonly auto_discount: components["schemas"]["ProductAutoDiscount"] | null;
3821
3846
  /** Format: date-time */
3822
3847
  readonly created_at: string;
3823
3848
  /** Format: date-time */
@@ -3870,6 +3895,7 @@ interface components {
3870
3895
  readonly is_trending: boolean | null;
3871
3896
  readonly trend_score: string | null;
3872
3897
  readonly promotion: components["schemas"]["ProductPromotion"] | null;
3898
+ readonly auto_discount: components["schemas"]["ProductAutoDiscount"] | null;
3873
3899
  readonly images: components["schemas"]["ProductImage"][];
3874
3900
  /** Format: date-time */
3875
3901
  readonly created_at: string;
@@ -4602,10 +4628,11 @@ interface components {
4602
4628
  * * `chargeback` - Chargeback
4603
4629
  * * `refund_reverse` - Refund Reverse
4604
4630
  * * `authorization_adjustment` - Authorization Adjustment
4631
+ * * `processing` - Processing
4605
4632
  * * `info` - Info
4606
4633
  * @enum {string}
4607
4634
  */
4608
- TypeEnum: "authorization_request" | "authorization_success" | "authorization_failure" | "charge_request" | "charge_success" | "charge_failure" | "refund_request" | "refund_success" | "refund_failure" | "cancel_request" | "cancel_success" | "cancel_failure" | "chargeback" | "refund_reverse" | "authorization_adjustment" | "info";
4635
+ TypeEnum: "authorization_request" | "authorization_success" | "authorization_failure" | "charge_request" | "charge_success" | "charge_failure" | "refund_request" | "refund_success" | "refund_failure" | "cancel_request" | "cancel_success" | "cancel_failure" | "chargeback" | "refund_reverse" | "authorization_adjustment" | "processing" | "info";
4609
4636
  /**
4610
4637
  * @description * `kg` - kg
4611
4638
  * * `l` - l
@@ -4690,6 +4717,23 @@ interface components {
4690
4717
  euro_per_step: string;
4691
4718
  balance_value: string;
4692
4719
  };
4720
+ /** @description Schedule/scope block the storefront re-judges at render time. */
4721
+ _DiscountRestrictions: {
4722
+ /** @description IANA name the backend judges the schedule in. Re-judge the window against this, not against the browser clock or a locally configured merchant timezone. Null when this store has no usable configured timezone - keep your own fallback in that case, rather than treating the absence as a value. */
4723
+ timezone: string | null;
4724
+ /** Format: date-time */
4725
+ start_date: string | null;
4726
+ /** Format: date-time */
4727
+ end_date: string | null;
4728
+ allowed_fulfillment_types: string[];
4729
+ schedule_weekdays: number[];
4730
+ /** Format: time */
4731
+ schedule_start_time: string | null;
4732
+ /** Format: time */
4733
+ schedule_end_time: string | null;
4734
+ /** Format: decimal */
4735
+ min_order_amount: string | null;
4736
+ };
4693
4737
  /** @description Nested serializer for line item entries in ProcessRefundSerializer. */
4694
4738
  _LineItemInput: {
4695
4739
  /** Format: uuid */
@@ -4708,6 +4752,8 @@ interface components {
4708
4752
  * scope, channel) are added here without reshaping the top-level payload.
4709
4753
  */
4710
4754
  _PromotionRestrictions: {
4755
+ /** @description IANA name the backend judges the schedule in. Re-judge the window against this, not against the browser clock or a locally configured merchant timezone. Null when this store has no usable configured timezone - keep your own fallback in that case, rather than treating the absence as a value. */
4756
+ timezone: string | null;
4711
4757
  /** Format: date-time */
4712
4758
  start_date: string | null;
4713
4759
  /** Format: date-time */
package/dist/index.d.ts CHANGED
@@ -2549,7 +2549,7 @@ interface components {
2549
2549
  id: string;
2550
2550
  /**
2551
2551
  * Format: int64
2552
- * @description company_id from the authenticated merchant
2552
+ * @description Store.id from the authenticated merchant
2553
2553
  */
2554
2554
  store_id: number;
2555
2555
  /**
@@ -2577,6 +2577,7 @@ interface components {
2577
2577
  version?: number;
2578
2578
  readonly item_count: number;
2579
2579
  readonly line_items: components["schemas"]["CartLineItem"][];
2580
+ /** @description The discount coming off this cart, code-entered or auto-applied. */
2580
2581
  readonly discount: {
2581
2582
  [key: string]: unknown;
2582
2583
  } | null;
@@ -2763,7 +2764,7 @@ interface components {
2763
2764
  id: string;
2764
2765
  /**
2765
2766
  * Format: int64
2766
- * @description company_id from the authenticated merchant
2767
+ * @description Store.id from the authenticated merchant
2767
2768
  */
2768
2769
  store_id: number;
2769
2770
  /**
@@ -3037,7 +3038,7 @@ interface components {
3037
3038
  id: string;
3038
3039
  /**
3039
3040
  * Format: int64
3040
- * @description company_id from the authenticated merchant
3041
+ * @description Store.id from the authenticated merchant
3041
3042
  */
3042
3043
  store_id: number;
3043
3044
  /** @description 6-character alphanumeric code for sharing */
@@ -3230,7 +3231,7 @@ interface components {
3230
3231
  order_number: string;
3231
3232
  /**
3232
3233
  * Format: int64
3233
- * @description company_id from the authenticated merchant
3234
+ * @description Store.id from the authenticated merchant
3234
3235
  */
3235
3236
  store_id: number;
3236
3237
  /**
@@ -3751,6 +3752,29 @@ interface components {
3751
3752
  value_reference?: number | null;
3752
3753
  readonly selected_choices: components["schemas"]["AttributeChoice"][];
3753
3754
  };
3755
+ /**
3756
+ * @description Display-only auto-applied-discount badge attached to a product.
3757
+ *
3758
+ * Named ``auto_discount`` rather than ``discount`` deliberately. The
3759
+ * storefront already has a per-product ``discount`` concept -- a unit-price
3760
+ * reduction that drives the effective price and the strikethrough -- and
3761
+ * reusing the name would have fed this badge straight into that
3762
+ * calculation.
3763
+ *
3764
+ * Shape-only serializer used for OpenAPI generation; the value is a plain
3765
+ * dict injected via serializer context (``product_discounts``) by the
3766
+ * ``core.product_context`` seam, not a model instance.
3767
+ */
3768
+ ProductAutoDiscount: {
3769
+ id: string;
3770
+ name: string;
3771
+ discount_type: string;
3772
+ /** Format: decimal */
3773
+ value: string;
3774
+ currency: string;
3775
+ product_ids: number[];
3776
+ restrictions: components["schemas"]["_DiscountRestrictions"];
3777
+ };
3754
3778
  /** @description Resolve tags from ProductTranslation, falling back to Product.tags. */
3755
3779
  ProductDetail: {
3756
3780
  readonly id: number;
@@ -3818,6 +3842,7 @@ interface components {
3818
3842
  readonly is_trending: boolean | null;
3819
3843
  readonly trend_score: string | null;
3820
3844
  readonly promotion: components["schemas"]["ProductPromotion"] | null;
3845
+ readonly auto_discount: components["schemas"]["ProductAutoDiscount"] | null;
3821
3846
  /** Format: date-time */
3822
3847
  readonly created_at: string;
3823
3848
  /** Format: date-time */
@@ -3870,6 +3895,7 @@ interface components {
3870
3895
  readonly is_trending: boolean | null;
3871
3896
  readonly trend_score: string | null;
3872
3897
  readonly promotion: components["schemas"]["ProductPromotion"] | null;
3898
+ readonly auto_discount: components["schemas"]["ProductAutoDiscount"] | null;
3873
3899
  readonly images: components["schemas"]["ProductImage"][];
3874
3900
  /** Format: date-time */
3875
3901
  readonly created_at: string;
@@ -4602,10 +4628,11 @@ interface components {
4602
4628
  * * `chargeback` - Chargeback
4603
4629
  * * `refund_reverse` - Refund Reverse
4604
4630
  * * `authorization_adjustment` - Authorization Adjustment
4631
+ * * `processing` - Processing
4605
4632
  * * `info` - Info
4606
4633
  * @enum {string}
4607
4634
  */
4608
- TypeEnum: "authorization_request" | "authorization_success" | "authorization_failure" | "charge_request" | "charge_success" | "charge_failure" | "refund_request" | "refund_success" | "refund_failure" | "cancel_request" | "cancel_success" | "cancel_failure" | "chargeback" | "refund_reverse" | "authorization_adjustment" | "info";
4635
+ TypeEnum: "authorization_request" | "authorization_success" | "authorization_failure" | "charge_request" | "charge_success" | "charge_failure" | "refund_request" | "refund_success" | "refund_failure" | "cancel_request" | "cancel_success" | "cancel_failure" | "chargeback" | "refund_reverse" | "authorization_adjustment" | "processing" | "info";
4609
4636
  /**
4610
4637
  * @description * `kg` - kg
4611
4638
  * * `l` - l
@@ -4690,6 +4717,23 @@ interface components {
4690
4717
  euro_per_step: string;
4691
4718
  balance_value: string;
4692
4719
  };
4720
+ /** @description Schedule/scope block the storefront re-judges at render time. */
4721
+ _DiscountRestrictions: {
4722
+ /** @description IANA name the backend judges the schedule in. Re-judge the window against this, not against the browser clock or a locally configured merchant timezone. Null when this store has no usable configured timezone - keep your own fallback in that case, rather than treating the absence as a value. */
4723
+ timezone: string | null;
4724
+ /** Format: date-time */
4725
+ start_date: string | null;
4726
+ /** Format: date-time */
4727
+ end_date: string | null;
4728
+ allowed_fulfillment_types: string[];
4729
+ schedule_weekdays: number[];
4730
+ /** Format: time */
4731
+ schedule_start_time: string | null;
4732
+ /** Format: time */
4733
+ schedule_end_time: string | null;
4734
+ /** Format: decimal */
4735
+ min_order_amount: string | null;
4736
+ };
4693
4737
  /** @description Nested serializer for line item entries in ProcessRefundSerializer. */
4694
4738
  _LineItemInput: {
4695
4739
  /** Format: uuid */
@@ -4708,6 +4752,8 @@ interface components {
4708
4752
  * scope, channel) are added here without reshaping the top-level payload.
4709
4753
  */
4710
4754
  _PromotionRestrictions: {
4755
+ /** @description IANA name the backend judges the schedule in. Re-judge the window against this, not against the browser clock or a locally configured merchant timezone. Null when this store has no usable configured timezone - keep your own fallback in that case, rather than treating the absence as a value. */
4756
+ timezone: string | null;
4711
4757
  /** Format: date-time */
4712
4758
  start_date: string | null;
4713
4759
  /** Format: date-time */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@poweredbysous/storefront-sdk",
3
- "version": "2.0.0",
3
+ "version": "2.1.0",
4
4
  "description": "Type-safe TypeScript SDK for SOUS Storefront Backend",
5
5
  "license": "UNLICENSED",
6
6
  "private": false,