@poweredbysous/storefront-sdk 2.2.0 → 2.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/dist/index.d.cts CHANGED
@@ -2541,6 +2541,7 @@ interface components {
2541
2541
  /** Format: double */
2542
2542
  longitude?: number | null;
2543
2543
  open_status?: components["schemas"]["OpenStatus"] | null;
2544
+ phone?: string;
2544
2545
  };
2545
2546
  /** @description Pickup address of a brand location (from its primary pickup location). */
2546
2547
  BrandLocationAddress: {
@@ -2764,24 +2765,10 @@ interface components {
2764
2765
  /**
2765
2766
  * @description How many products this category shows, descendants included.
2766
2767
  *
2767
- * Counted through the compliance gate (D15), because the count and the
2768
- * listing are one read model: ``/categories/`` reported 5 while
2769
- * ``/categories/<id>/products/`` returned 0, which discloses how many
2770
- * hidden products sit in each category and, by diffing, which categories
2771
- * are affected. Search's ``total`` had already closed the same gap.
2772
- *
2773
- * No ``annotated_product_count`` shortcut any more: a ``Count()`` in the
2774
- * view cannot know the verdict, so such an annotation would be an ungated
2775
- * number that silently won over this one.
2776
- *
2777
2768
  * The listing precomputes every category's count in one pass
2778
- * (``views._build_gated_counts``) and passes it in context, because doing
2779
- * it per category asked the gate — a fixed handful of queries however
2780
- * many ids it is given — once per category in the tree. ``MAX_DEPTH = 4``
2781
- * bounds the depth but not the breadth, and breadth is what drives it.
2782
- *
2783
- * The fallback below is the single-object path (retrieve), where there is
2784
- * no tree to amortise over and one gate call is the whole cost.
2769
+ * (``views._build_product_counts``) and passes it in context; the
2770
+ * fallback below is the single-object path (retrieve), which counts its
2771
+ * own subtree directly.
2785
2772
  */
2786
2773
  readonly product_count: number;
2787
2774
  };
@@ -2963,6 +2950,14 @@ interface components {
2963
2950
  language_preference?: (components["schemas"]["LanguagePreferenceEnum"] | components["schemas"]["NullEnum"]) | null;
2964
2951
  marketing_opt_in?: boolean | null;
2965
2952
  };
2953
+ /**
2954
+ * @description What merchant-portal-backend's publish needs to know about a store
2955
+ * whose delivery methods the portal's toggles own.
2956
+ */
2957
+ DeliveryMethodToggles: {
2958
+ wizard_choice_applies: components["schemas"]["WizardChoiceApplies"];
2959
+ publish_readiness: string[];
2960
+ };
2966
2961
  /**
2967
2962
  * @description * `merchant` - Merchant
2968
2963
  * * `customer` - Customer
@@ -2984,6 +2979,7 @@ interface components {
2984
2979
  unit_price: string;
2985
2980
  line_total: string;
2986
2981
  tax_amount: string;
2982
+ deposit_amount?: string;
2987
2983
  };
2988
2984
  /**
2989
2985
  * @description The snapshot computed by ``eligibility_for_order``.
@@ -3303,6 +3299,11 @@ interface components {
3303
3299
  * @description Aggregated non-discountable surcharges (VAT-inclusive)
3304
3300
  */
3305
3301
  surcharge_total?: string;
3302
+ /**
3303
+ * Format: decimal
3304
+ * @description Deposits (subset of surcharge_total), shown separately.
3305
+ */
3306
+ deposit_total?: string;
3306
3307
  cancellation_reason?: string;
3307
3308
  /** Format: decimal */
3308
3309
  total: string;
@@ -3446,6 +3447,11 @@ interface components {
3446
3447
  tax_amount: string;
3447
3448
  /** Format: decimal */
3448
3449
  line_total: string;
3450
+ /**
3451
+ * Format: decimal
3452
+ * @description Deposit charged on this line, snapshotted at order time so removing the line refunds it.
3453
+ */
3454
+ deposit_amount?: string;
3449
3455
  fulfillment_type: string;
3450
3456
  /** Format: date */
3451
3457
  fulfillment_date?: string | null;
@@ -3793,6 +3799,7 @@ interface components {
3793
3799
  value_file?: string;
3794
3800
  /** Format: int64 */
3795
3801
  value_reference?: number | null;
3802
+ value_json?: unknown;
3796
3803
  readonly selected_choices: components["schemas"]["AttributeChoice"][];
3797
3804
  };
3798
3805
  /**
@@ -3909,6 +3916,8 @@ interface components {
3909
3916
  /** Format: decimal */
3910
3917
  price: string;
3911
3918
  /** Format: decimal */
3919
+ readonly deposit_amount: string | null;
3920
+ /** Format: decimal */
3912
3921
  compare_at_price?: string | null;
3913
3922
  currency?: string;
3914
3923
  /** Format: decimal */
@@ -4489,6 +4498,7 @@ interface components {
4489
4498
  readonly updated_at: string;
4490
4499
  readonly brand_assets: components["schemas"]["StoreBrandAsset"][];
4491
4500
  readonly uber_direct_supported_countries: string[];
4501
+ readonly delivery_method_toggles: components["schemas"]["DeliveryMethodToggles"] | null;
4492
4502
  };
4493
4503
  /**
4494
4504
  * @description * `draft` - Draft
@@ -4571,6 +4581,8 @@ interface components {
4571
4581
  price: string;
4572
4582
  currency: string;
4573
4583
  image_url: string;
4584
+ /** Format: decimal */
4585
+ deposit_amount?: string | null;
4574
4586
  reason: string;
4575
4587
  };
4576
4588
  Surcharge: {
@@ -4586,7 +4598,7 @@ interface components {
4586
4598
  amount: string;
4587
4599
  /**
4588
4600
  * Format: decimal
4589
- * @description VAT rate for this surcharge, independent of the product's rate. German Pfand is charged at the standard rate (19%) while the food line is often reduced (7%), so the surcharge cannot inherit the product's rate. Stored as a fraction — the convention every VAT rate in this codebase carries: 19% is stored as 0.19, never 19.00. Required, like Product.vat_rate and ProductModifier.vat_rate: a missing rate must fail loudly rather than silently invoice at 0%.
4601
+ * @description VAT rate for this surcharge. Not used for a deposit attached to a product or modifier: German Pfand is an ancillary charge on the container and is taxed at the rate of the item it is attached to (UStAE A 10.1 Abs. 8). A deposit's rate here only applies when it is charged per order as the reusable-packaging deposit. Stored as a fraction — the convention every VAT rate in this codebase carries: 19% is stored as 0.19, never 19.00. Required, like Product.vat_rate and ProductModifier.vat_rate: a missing rate must fail loudly rather than silently invoice at 0%.
4590
4602
  */
4591
4603
  vat_rate: string;
4592
4604
  /** @description Category: sup, deposit, bag_fee, packaging, etc. */
@@ -4733,6 +4745,7 @@ interface components {
4733
4745
  value_file?: string;
4734
4746
  /** Format: int64 */
4735
4747
  value_reference?: number | null;
4748
+ value_json?: unknown;
4736
4749
  readonly selected_choices: components["schemas"]["AttributeChoice"][];
4737
4750
  };
4738
4751
  /** @description POST /api/v1/withdrawals/confirm input. */
@@ -4752,6 +4765,11 @@ interface components {
4752
4765
  completed_at: string | null;
4753
4766
  eligibility_snapshot: components["schemas"]["EligibilitySnapshot"];
4754
4767
  };
4768
+ /** @description Per delivery method: whether the wizard's toggle still decides it. */
4769
+ WizardChoiceApplies: {
4770
+ uber_direct: boolean;
4771
+ lieferando: boolean;
4772
+ };
4755
4773
  /** @description Customer-facing Zeemijlen balance + redemption economics. */
4756
4774
  ZeemijlenSummary: {
4757
4775
  points_balance: number;
@@ -8144,7 +8162,7 @@ interface operations {
8144
8162
  };
8145
8163
  };
8146
8164
  };
8147
- /** @description Possible error codes: `MISSING_GATEWAY_ID`, `GATEWAY_NOT_ENABLED`, `INVALID_GATEWAY`, `MISSING_GIFT_CARD_CODE`, `INVALID_TAX_PROVIDER`, `PRODUCT_UNAVAILABLE`. Retryable: no. Possible error codes include `VALIDATION_ERROR`. Use `x-error-codes` for machine-readable retryability metadata. Possible error codes include `CHECKOUT_NOT_PAID`. Use `x-error-codes` for machine-readable retryability metadata. Possible error codes include `CHECKOUT_VALIDATION_ERROR`. Use `x-error-codes` for machine-readable retryability metadata. Possible error codes include `MISSING_CART_ID`. Use `x-error-codes` for machine-readable retryability metadata. Possible error codes include `MISSING_GATEWAY_ID`. Use `x-error-codes` for machine-readable retryability metadata. Possible error codes include `INVALID_GATEWAY`. Use `x-error-codes` for machine-readable retryability metadata. Possible error codes include `INVALID_SHIPPING_METHOD`. Use `x-error-codes` for machine-readable retryability metadata. Possible error codes include `SHIPPING_FULFILLMENT_MISMATCH`. Use `x-error-codes` for machine-readable retryability metadata. Possible error codes include `MISSING_GIFT_CARD_CODE`. Use `x-error-codes` for machine-readable retryability metadata. Possible error codes include `GATEWAY_NOT_ENABLED`. Use `x-error-codes` for machine-readable retryability metadata. Possible error codes include `INVALID_TAX_PROVIDER`. Use `x-error-codes` for machine-readable retryability metadata. */
8165
+ /** @description Possible error codes: `MISSING_GATEWAY_ID`, `GATEWAY_NOT_ENABLED`, `INVALID_GATEWAY`, `MISSING_GIFT_CARD_CODE`, `INVALID_TAX_PROVIDER`, `PRODUCT_UNAVAILABLE`, `SERVICE_POINT_REQUIRED`. Retryable: no. Possible error codes include `VALIDATION_ERROR`. Use `x-error-codes` for machine-readable retryability metadata. Possible error codes include `CHECKOUT_NOT_PAID`. Use `x-error-codes` for machine-readable retryability metadata. Possible error codes include `CHECKOUT_VALIDATION_ERROR`. Use `x-error-codes` for machine-readable retryability metadata. Possible error codes include `MISSING_CART_ID`. Use `x-error-codes` for machine-readable retryability metadata. Possible error codes include `MISSING_GATEWAY_ID`. Use `x-error-codes` for machine-readable retryability metadata. Possible error codes include `INVALID_GATEWAY`. Use `x-error-codes` for machine-readable retryability metadata. Possible error codes include `INVALID_SHIPPING_METHOD`. Use `x-error-codes` for machine-readable retryability metadata. Possible error codes include `SHIPPING_FULFILLMENT_MISMATCH`. Use `x-error-codes` for machine-readable retryability metadata. Possible error codes include `MISSING_GIFT_CARD_CODE`. Use `x-error-codes` for machine-readable retryability metadata. Possible error codes include `GATEWAY_NOT_ENABLED`. Use `x-error-codes` for machine-readable retryability metadata. Possible error codes include `INVALID_TAX_PROVIDER`. Use `x-error-codes` for machine-readable retryability metadata. */
8148
8166
  400: {
8149
8167
  headers: {
8150
8168
  [name: string]: unknown;
package/dist/index.d.ts CHANGED
@@ -2541,6 +2541,7 @@ interface components {
2541
2541
  /** Format: double */
2542
2542
  longitude?: number | null;
2543
2543
  open_status?: components["schemas"]["OpenStatus"] | null;
2544
+ phone?: string;
2544
2545
  };
2545
2546
  /** @description Pickup address of a brand location (from its primary pickup location). */
2546
2547
  BrandLocationAddress: {
@@ -2764,24 +2765,10 @@ interface components {
2764
2765
  /**
2765
2766
  * @description How many products this category shows, descendants included.
2766
2767
  *
2767
- * Counted through the compliance gate (D15), because the count and the
2768
- * listing are one read model: ``/categories/`` reported 5 while
2769
- * ``/categories/<id>/products/`` returned 0, which discloses how many
2770
- * hidden products sit in each category and, by diffing, which categories
2771
- * are affected. Search's ``total`` had already closed the same gap.
2772
- *
2773
- * No ``annotated_product_count`` shortcut any more: a ``Count()`` in the
2774
- * view cannot know the verdict, so such an annotation would be an ungated
2775
- * number that silently won over this one.
2776
- *
2777
2768
  * The listing precomputes every category's count in one pass
2778
- * (``views._build_gated_counts``) and passes it in context, because doing
2779
- * it per category asked the gate — a fixed handful of queries however
2780
- * many ids it is given — once per category in the tree. ``MAX_DEPTH = 4``
2781
- * bounds the depth but not the breadth, and breadth is what drives it.
2782
- *
2783
- * The fallback below is the single-object path (retrieve), where there is
2784
- * no tree to amortise over and one gate call is the whole cost.
2769
+ * (``views._build_product_counts``) and passes it in context; the
2770
+ * fallback below is the single-object path (retrieve), which counts its
2771
+ * own subtree directly.
2785
2772
  */
2786
2773
  readonly product_count: number;
2787
2774
  };
@@ -2963,6 +2950,14 @@ interface components {
2963
2950
  language_preference?: (components["schemas"]["LanguagePreferenceEnum"] | components["schemas"]["NullEnum"]) | null;
2964
2951
  marketing_opt_in?: boolean | null;
2965
2952
  };
2953
+ /**
2954
+ * @description What merchant-portal-backend's publish needs to know about a store
2955
+ * whose delivery methods the portal's toggles own.
2956
+ */
2957
+ DeliveryMethodToggles: {
2958
+ wizard_choice_applies: components["schemas"]["WizardChoiceApplies"];
2959
+ publish_readiness: string[];
2960
+ };
2966
2961
  /**
2967
2962
  * @description * `merchant` - Merchant
2968
2963
  * * `customer` - Customer
@@ -2984,6 +2979,7 @@ interface components {
2984
2979
  unit_price: string;
2985
2980
  line_total: string;
2986
2981
  tax_amount: string;
2982
+ deposit_amount?: string;
2987
2983
  };
2988
2984
  /**
2989
2985
  * @description The snapshot computed by ``eligibility_for_order``.
@@ -3303,6 +3299,11 @@ interface components {
3303
3299
  * @description Aggregated non-discountable surcharges (VAT-inclusive)
3304
3300
  */
3305
3301
  surcharge_total?: string;
3302
+ /**
3303
+ * Format: decimal
3304
+ * @description Deposits (subset of surcharge_total), shown separately.
3305
+ */
3306
+ deposit_total?: string;
3306
3307
  cancellation_reason?: string;
3307
3308
  /** Format: decimal */
3308
3309
  total: string;
@@ -3446,6 +3447,11 @@ interface components {
3446
3447
  tax_amount: string;
3447
3448
  /** Format: decimal */
3448
3449
  line_total: string;
3450
+ /**
3451
+ * Format: decimal
3452
+ * @description Deposit charged on this line, snapshotted at order time so removing the line refunds it.
3453
+ */
3454
+ deposit_amount?: string;
3449
3455
  fulfillment_type: string;
3450
3456
  /** Format: date */
3451
3457
  fulfillment_date?: string | null;
@@ -3793,6 +3799,7 @@ interface components {
3793
3799
  value_file?: string;
3794
3800
  /** Format: int64 */
3795
3801
  value_reference?: number | null;
3802
+ value_json?: unknown;
3796
3803
  readonly selected_choices: components["schemas"]["AttributeChoice"][];
3797
3804
  };
3798
3805
  /**
@@ -3909,6 +3916,8 @@ interface components {
3909
3916
  /** Format: decimal */
3910
3917
  price: string;
3911
3918
  /** Format: decimal */
3919
+ readonly deposit_amount: string | null;
3920
+ /** Format: decimal */
3912
3921
  compare_at_price?: string | null;
3913
3922
  currency?: string;
3914
3923
  /** Format: decimal */
@@ -4489,6 +4498,7 @@ interface components {
4489
4498
  readonly updated_at: string;
4490
4499
  readonly brand_assets: components["schemas"]["StoreBrandAsset"][];
4491
4500
  readonly uber_direct_supported_countries: string[];
4501
+ readonly delivery_method_toggles: components["schemas"]["DeliveryMethodToggles"] | null;
4492
4502
  };
4493
4503
  /**
4494
4504
  * @description * `draft` - Draft
@@ -4571,6 +4581,8 @@ interface components {
4571
4581
  price: string;
4572
4582
  currency: string;
4573
4583
  image_url: string;
4584
+ /** Format: decimal */
4585
+ deposit_amount?: string | null;
4574
4586
  reason: string;
4575
4587
  };
4576
4588
  Surcharge: {
@@ -4586,7 +4598,7 @@ interface components {
4586
4598
  amount: string;
4587
4599
  /**
4588
4600
  * Format: decimal
4589
- * @description VAT rate for this surcharge, independent of the product's rate. German Pfand is charged at the standard rate (19%) while the food line is often reduced (7%), so the surcharge cannot inherit the product's rate. Stored as a fraction — the convention every VAT rate in this codebase carries: 19% is stored as 0.19, never 19.00. Required, like Product.vat_rate and ProductModifier.vat_rate: a missing rate must fail loudly rather than silently invoice at 0%.
4601
+ * @description VAT rate for this surcharge. Not used for a deposit attached to a product or modifier: German Pfand is an ancillary charge on the container and is taxed at the rate of the item it is attached to (UStAE A 10.1 Abs. 8). A deposit's rate here only applies when it is charged per order as the reusable-packaging deposit. Stored as a fraction — the convention every VAT rate in this codebase carries: 19% is stored as 0.19, never 19.00. Required, like Product.vat_rate and ProductModifier.vat_rate: a missing rate must fail loudly rather than silently invoice at 0%.
4590
4602
  */
4591
4603
  vat_rate: string;
4592
4604
  /** @description Category: sup, deposit, bag_fee, packaging, etc. */
@@ -4733,6 +4745,7 @@ interface components {
4733
4745
  value_file?: string;
4734
4746
  /** Format: int64 */
4735
4747
  value_reference?: number | null;
4748
+ value_json?: unknown;
4736
4749
  readonly selected_choices: components["schemas"]["AttributeChoice"][];
4737
4750
  };
4738
4751
  /** @description POST /api/v1/withdrawals/confirm input. */
@@ -4752,6 +4765,11 @@ interface components {
4752
4765
  completed_at: string | null;
4753
4766
  eligibility_snapshot: components["schemas"]["EligibilitySnapshot"];
4754
4767
  };
4768
+ /** @description Per delivery method: whether the wizard's toggle still decides it. */
4769
+ WizardChoiceApplies: {
4770
+ uber_direct: boolean;
4771
+ lieferando: boolean;
4772
+ };
4755
4773
  /** @description Customer-facing Zeemijlen balance + redemption economics. */
4756
4774
  ZeemijlenSummary: {
4757
4775
  points_balance: number;
@@ -8144,7 +8162,7 @@ interface operations {
8144
8162
  };
8145
8163
  };
8146
8164
  };
8147
- /** @description Possible error codes: `MISSING_GATEWAY_ID`, `GATEWAY_NOT_ENABLED`, `INVALID_GATEWAY`, `MISSING_GIFT_CARD_CODE`, `INVALID_TAX_PROVIDER`, `PRODUCT_UNAVAILABLE`. Retryable: no. Possible error codes include `VALIDATION_ERROR`. Use `x-error-codes` for machine-readable retryability metadata. Possible error codes include `CHECKOUT_NOT_PAID`. Use `x-error-codes` for machine-readable retryability metadata. Possible error codes include `CHECKOUT_VALIDATION_ERROR`. Use `x-error-codes` for machine-readable retryability metadata. Possible error codes include `MISSING_CART_ID`. Use `x-error-codes` for machine-readable retryability metadata. Possible error codes include `MISSING_GATEWAY_ID`. Use `x-error-codes` for machine-readable retryability metadata. Possible error codes include `INVALID_GATEWAY`. Use `x-error-codes` for machine-readable retryability metadata. Possible error codes include `INVALID_SHIPPING_METHOD`. Use `x-error-codes` for machine-readable retryability metadata. Possible error codes include `SHIPPING_FULFILLMENT_MISMATCH`. Use `x-error-codes` for machine-readable retryability metadata. Possible error codes include `MISSING_GIFT_CARD_CODE`. Use `x-error-codes` for machine-readable retryability metadata. Possible error codes include `GATEWAY_NOT_ENABLED`. Use `x-error-codes` for machine-readable retryability metadata. Possible error codes include `INVALID_TAX_PROVIDER`. Use `x-error-codes` for machine-readable retryability metadata. */
8165
+ /** @description Possible error codes: `MISSING_GATEWAY_ID`, `GATEWAY_NOT_ENABLED`, `INVALID_GATEWAY`, `MISSING_GIFT_CARD_CODE`, `INVALID_TAX_PROVIDER`, `PRODUCT_UNAVAILABLE`, `SERVICE_POINT_REQUIRED`. Retryable: no. Possible error codes include `VALIDATION_ERROR`. Use `x-error-codes` for machine-readable retryability metadata. Possible error codes include `CHECKOUT_NOT_PAID`. Use `x-error-codes` for machine-readable retryability metadata. Possible error codes include `CHECKOUT_VALIDATION_ERROR`. Use `x-error-codes` for machine-readable retryability metadata. Possible error codes include `MISSING_CART_ID`. Use `x-error-codes` for machine-readable retryability metadata. Possible error codes include `MISSING_GATEWAY_ID`. Use `x-error-codes` for machine-readable retryability metadata. Possible error codes include `INVALID_GATEWAY`. Use `x-error-codes` for machine-readable retryability metadata. Possible error codes include `INVALID_SHIPPING_METHOD`. Use `x-error-codes` for machine-readable retryability metadata. Possible error codes include `SHIPPING_FULFILLMENT_MISMATCH`. Use `x-error-codes` for machine-readable retryability metadata. Possible error codes include `MISSING_GIFT_CARD_CODE`. Use `x-error-codes` for machine-readable retryability metadata. Possible error codes include `GATEWAY_NOT_ENABLED`. Use `x-error-codes` for machine-readable retryability metadata. Possible error codes include `INVALID_TAX_PROVIDER`. Use `x-error-codes` for machine-readable retryability metadata. */
8148
8166
  400: {
8149
8167
  headers: {
8150
8168
  [name: string]: unknown;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@poweredbysous/storefront-sdk",
3
- "version": "2.2.0",
3
+ "version": "2.4.0",
4
4
  "description": "Type-safe TypeScript SDK for SOUS Storefront Backend",
5
5
  "license": "UNLICENSED",
6
6
  "private": false,