@poweredbysous/storefront-all-sdk 4.13.0 → 4.14.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
@@ -5933,6 +5933,28 @@ interface paths {
5933
5933
  patch?: never;
5934
5934
  trace?: never;
5935
5935
  };
5936
+ "/api/v1/products/{id}/orderable-dates/": {
5937
+ parameters: {
5938
+ query?: never;
5939
+ header?: never;
5940
+ path?: never;
5941
+ cookie?: never;
5942
+ };
5943
+ /**
5944
+ * @description The dates this product can be ordered for, within the location's
5945
+ * pre-order horizon, as the cart's ``fulfilment-dates`` lists them for
5946
+ * a basket holding only this product's line, so the storefront can tell
5947
+ * a customer when a product it hides for their date is available.
5948
+ */
5949
+ get: operations["products_orderable_dates_retrieve"];
5950
+ put?: never;
5951
+ post?: never;
5952
+ delete?: never;
5953
+ options?: never;
5954
+ head?: never;
5955
+ patch?: never;
5956
+ trace?: never;
5957
+ };
5936
5958
  "/api/v1/products/{id}/suggestions/": {
5937
5959
  parameters: {
5938
5960
  query?: never;
@@ -7018,6 +7040,11 @@ interface components {
7018
7040
  fulfillment_type?: string;
7019
7041
  /** Format: date */
7020
7042
  fulfillment_date?: string;
7043
+ /**
7044
+ * Format: date
7045
+ * @description The customer's chosen handover date. The product is refused when its own dates (weekly days, included and excluded dates, order-until) do not accept it; the line is not dated by it.
7046
+ */
7047
+ handover_date?: string;
7021
7048
  /** @default */
7022
7049
  fulfillment_time_slot: string;
7023
7050
  options?: components["schemas"]["OptionInput"][];
@@ -7609,6 +7636,7 @@ interface components {
7609
7636
  readonly promotion: {
7610
7637
  [key: string]: unknown;
7611
7638
  } | null;
7639
+ readonly pending_auto_discount: components["schemas"]["CartPendingAutoDiscount"] | null;
7612
7640
  readonly shipping_estimate: components["schemas"]["ShippingEstimate"] | null;
7613
7641
  /**
7614
7642
  * Format: decimal
@@ -7693,6 +7721,7 @@ interface components {
7693
7721
  [key: string]: unknown;
7694
7722
  } | null;
7695
7723
  readonly note: string;
7724
+ readonly order_dates: components["schemas"]["CartLineOrderDates"] | null;
7696
7725
  };
7697
7726
  CartLineItemOption: {
7698
7727
  option_id: number;
@@ -7748,6 +7777,54 @@ interface components {
7748
7777
  /** @description 'product' or 'modifier' */
7749
7778
  source: string;
7750
7779
  };
7780
+ /**
7781
+ * @description The product's own dates. An excluded date closes it, an included date
7782
+ * opens it on a day ``weekly_days`` does not cover, and ``order_until`` closes
7783
+ * it once passed. Checkout refuses a handover date outside them with
7784
+ * ``PRODUCT_NOT_ORDERABLE_FOR_DATE``.
7785
+ */
7786
+ CartLineOrderDates: {
7787
+ /** @description Lower-case weekday names, or null to follow the store's schedule. */
7788
+ weekly_days: string[] | null;
7789
+ included_dates: string[];
7790
+ excluded_dates: string[];
7791
+ /** Format: date */
7792
+ order_until: string | null;
7793
+ };
7794
+ /**
7795
+ * @description A codeless discount the cart holds products for but does not get yet.
7796
+ *
7797
+ * Documentation only: the payload is built by
7798
+ * ``CartSerializer.get_pending_auto_discount``. Null whenever a discount is
7799
+ * on the cart, a typed code included.
7800
+ */
7801
+ CartPendingAutoDiscount: {
7802
+ /** Format: uuid */
7803
+ discount_id: string;
7804
+ name: string;
7805
+ /**
7806
+ * @description min_order_not_met: the cart subtotal is below min_order_amount; amount_needed says by how much. fulfillment_type_not_allowed: no line the discount covers uses one of allowed_fulfillment_types. Reported before the minimum, since adding to the basket cannot lift it.
7807
+ *
7808
+ * * `min_order_not_met` - min_order_not_met
7809
+ * * `fulfillment_type_not_allowed` - fulfillment_type_not_allowed
7810
+ */
7811
+ reason: components["schemas"]["CartPendingAutoDiscountReasonEnum"];
7812
+ /** Format: decimal */
7813
+ min_order_amount: string | null;
7814
+ /**
7815
+ * Format: decimal
7816
+ * @description What the subtotal still needs. Null unless min_order_not_met.
7817
+ */
7818
+ amount_needed: string | null;
7819
+ allowed_fulfillment_types: string[];
7820
+ currency: string;
7821
+ };
7822
+ /**
7823
+ * @description * `min_order_not_met` - min_order_not_met
7824
+ * * `fulfillment_type_not_allowed` - fulfillment_type_not_allowed
7825
+ * @enum {string}
7826
+ */
7827
+ CartPendingAutoDiscountReasonEnum: "min_order_not_met" | "fulfillment_type_not_allowed";
7751
7828
  Category: {
7752
7829
  readonly id: number;
7753
7830
  slug: string;
@@ -10826,6 +10903,19 @@ interface components {
10826
10903
  /** Format: date-time */
10827
10904
  readonly updated_at: string;
10828
10905
  };
10906
+ /**
10907
+ * @description The dates one product can be ordered for, within the location's
10908
+ * pre-order horizon (``ProductViewSet.orderable_dates``).
10909
+ */
10910
+ ProductFulfilmentDates: {
10911
+ dates: string[];
10912
+ reason: (components["schemas"]["ProductFulfilmentDatesReasonEnum"] | components["schemas"]["NullEnum"]) | null;
10913
+ };
10914
+ /**
10915
+ * @description * `no_dates` - no_dates
10916
+ * @enum {string}
10917
+ */
10918
+ ProductFulfilmentDatesReasonEnum: "no_dates";
10829
10919
  ProductImage: {
10830
10920
  readonly id: number;
10831
10921
  /** Format: uri */
@@ -39018,6 +39108,8 @@ interface operations {
39018
39108
  query?: {
39019
39109
  /** @description Delivery destination country as ISO 3166-1 alpha-2 (e.g. NL, BE), used with latitude and longitude. A nationwide carrier that declares per-country service areas only offers its products once the country is known. Case-insensitive; any other value is treated as no country. */
39020
39110
  country?: string;
39111
+ /** @description The pickup or delivery date the customer has chosen (YYYY-MM-DD). Lists only the products that can be ordered today for that date by their own dates: weekly days, included and excluded dates, and order-until. Whether the store is open that day is the time-slots endpoint's answer, not this filter's. An unreadable value is ignored. */
39112
+ handover_date?: string;
39021
39113
  /** @description Sort order for products. Use '-popularity' for most popular first. */
39022
39114
  ordering?: "-popularity" | "-position" | "position";
39023
39115
  /** @description A page number within the paginated result set. */
@@ -39254,6 +39346,91 @@ interface operations {
39254
39346
  };
39255
39347
  };
39256
39348
  };
39349
+ products_orderable_dates_retrieve: {
39350
+ parameters: {
39351
+ query: {
39352
+ /** @description For type=delivery: the customer's delivery types in order of preference, comma-separated (local_delivery, nationwide_delivery). The product's schedule follows the first of them it offers, the type its cart line would get; without one it follows the delivery types the product offers. */
39353
+ fulfillment_types?: string;
39354
+ /** @description Pickup location id, as the pickup time-slots endpoint takes it. Defaults to the store's active pickup location. */
39355
+ location?: number;
39356
+ /** @description Fulfilment type the dates are for. */
39357
+ type: "delivery" | "pickup";
39358
+ /** @description Language override for translated content. The primary mechanism is the `Accept-Language` header; this query parameter is an override for widget embedding where merchants cannot control browser headers. Defaults to `en`. */
39359
+ lang?: string;
39360
+ };
39361
+ header?: never;
39362
+ path: {
39363
+ /** @description A unique integer value identifying this product. */
39364
+ id: number;
39365
+ };
39366
+ cookie?: never;
39367
+ };
39368
+ requestBody?: never;
39369
+ responses: {
39370
+ 200: {
39371
+ headers: {
39372
+ [name: string]: unknown;
39373
+ };
39374
+ content: {
39375
+ "application/json": components["schemas"]["ProductFulfilmentDates"];
39376
+ };
39377
+ };
39378
+ /** @description Possible error codes: `VALIDATION_ERROR`. Retryable: no. Possible error codes include `VALIDATION_ERROR`. Use `x-error-codes` for machine-readable retryability metadata. */
39379
+ 400: {
39380
+ headers: {
39381
+ [name: string]: unknown;
39382
+ };
39383
+ content: {
39384
+ "application/json": components["schemas"]["APIErrorEnvelope"];
39385
+ };
39386
+ };
39387
+ /** @description Possible error codes include `UNAUTHORIZED`. Use `x-error-codes` for machine-readable retryability metadata. */
39388
+ 401: {
39389
+ headers: {
39390
+ [name: string]: unknown;
39391
+ };
39392
+ content: {
39393
+ "application/json": components["schemas"]["APIErrorEnvelope"];
39394
+ };
39395
+ };
39396
+ /** @description Possible error codes include `FORBIDDEN`. Use `x-error-codes` for machine-readable retryability metadata. */
39397
+ 403: {
39398
+ headers: {
39399
+ [name: string]: unknown;
39400
+ };
39401
+ content: {
39402
+ "application/json": components["schemas"]["APIErrorEnvelope"];
39403
+ };
39404
+ };
39405
+ /** @description Possible error codes: `NOT_FOUND`, `LOCATION_NOT_FOUND`. Retryable: no. Possible error codes include `NOT_FOUND`. Use `x-error-codes` for machine-readable retryability metadata. Possible error codes include `PRODUCT_NOT_FOUND`. Use `x-error-codes` for machine-readable retryability metadata. Possible error codes include `LOCATION_NOT_FOUND`. Use `x-error-codes` for machine-readable retryability metadata. */
39406
+ 404: {
39407
+ headers: {
39408
+ [name: string]: unknown;
39409
+ };
39410
+ content: {
39411
+ "application/json": components["schemas"]["APIErrorEnvelope"];
39412
+ };
39413
+ };
39414
+ /** @description Possible error codes include `RATE_LIMITED`. Use `x-error-codes` for machine-readable retryability metadata. */
39415
+ 429: {
39416
+ headers: {
39417
+ [name: string]: unknown;
39418
+ };
39419
+ content: {
39420
+ "application/json": components["schemas"]["APIErrorEnvelope"];
39421
+ };
39422
+ };
39423
+ /** @description Possible error codes include `INTERNAL_ERROR`. Use `x-error-codes` for machine-readable retryability metadata. */
39424
+ 500: {
39425
+ headers: {
39426
+ [name: string]: unknown;
39427
+ };
39428
+ content: {
39429
+ "application/json": components["schemas"]["APIErrorEnvelope"];
39430
+ };
39431
+ };
39432
+ };
39433
+ };
39257
39434
  products_suggestions_list: {
39258
39435
  parameters: {
39259
39436
  query?: {
package/dist/index.d.ts CHANGED
@@ -5933,6 +5933,28 @@ interface paths {
5933
5933
  patch?: never;
5934
5934
  trace?: never;
5935
5935
  };
5936
+ "/api/v1/products/{id}/orderable-dates/": {
5937
+ parameters: {
5938
+ query?: never;
5939
+ header?: never;
5940
+ path?: never;
5941
+ cookie?: never;
5942
+ };
5943
+ /**
5944
+ * @description The dates this product can be ordered for, within the location's
5945
+ * pre-order horizon, as the cart's ``fulfilment-dates`` lists them for
5946
+ * a basket holding only this product's line, so the storefront can tell
5947
+ * a customer when a product it hides for their date is available.
5948
+ */
5949
+ get: operations["products_orderable_dates_retrieve"];
5950
+ put?: never;
5951
+ post?: never;
5952
+ delete?: never;
5953
+ options?: never;
5954
+ head?: never;
5955
+ patch?: never;
5956
+ trace?: never;
5957
+ };
5936
5958
  "/api/v1/products/{id}/suggestions/": {
5937
5959
  parameters: {
5938
5960
  query?: never;
@@ -7018,6 +7040,11 @@ interface components {
7018
7040
  fulfillment_type?: string;
7019
7041
  /** Format: date */
7020
7042
  fulfillment_date?: string;
7043
+ /**
7044
+ * Format: date
7045
+ * @description The customer's chosen handover date. The product is refused when its own dates (weekly days, included and excluded dates, order-until) do not accept it; the line is not dated by it.
7046
+ */
7047
+ handover_date?: string;
7021
7048
  /** @default */
7022
7049
  fulfillment_time_slot: string;
7023
7050
  options?: components["schemas"]["OptionInput"][];
@@ -7609,6 +7636,7 @@ interface components {
7609
7636
  readonly promotion: {
7610
7637
  [key: string]: unknown;
7611
7638
  } | null;
7639
+ readonly pending_auto_discount: components["schemas"]["CartPendingAutoDiscount"] | null;
7612
7640
  readonly shipping_estimate: components["schemas"]["ShippingEstimate"] | null;
7613
7641
  /**
7614
7642
  * Format: decimal
@@ -7693,6 +7721,7 @@ interface components {
7693
7721
  [key: string]: unknown;
7694
7722
  } | null;
7695
7723
  readonly note: string;
7724
+ readonly order_dates: components["schemas"]["CartLineOrderDates"] | null;
7696
7725
  };
7697
7726
  CartLineItemOption: {
7698
7727
  option_id: number;
@@ -7748,6 +7777,54 @@ interface components {
7748
7777
  /** @description 'product' or 'modifier' */
7749
7778
  source: string;
7750
7779
  };
7780
+ /**
7781
+ * @description The product's own dates. An excluded date closes it, an included date
7782
+ * opens it on a day ``weekly_days`` does not cover, and ``order_until`` closes
7783
+ * it once passed. Checkout refuses a handover date outside them with
7784
+ * ``PRODUCT_NOT_ORDERABLE_FOR_DATE``.
7785
+ */
7786
+ CartLineOrderDates: {
7787
+ /** @description Lower-case weekday names, or null to follow the store's schedule. */
7788
+ weekly_days: string[] | null;
7789
+ included_dates: string[];
7790
+ excluded_dates: string[];
7791
+ /** Format: date */
7792
+ order_until: string | null;
7793
+ };
7794
+ /**
7795
+ * @description A codeless discount the cart holds products for but does not get yet.
7796
+ *
7797
+ * Documentation only: the payload is built by
7798
+ * ``CartSerializer.get_pending_auto_discount``. Null whenever a discount is
7799
+ * on the cart, a typed code included.
7800
+ */
7801
+ CartPendingAutoDiscount: {
7802
+ /** Format: uuid */
7803
+ discount_id: string;
7804
+ name: string;
7805
+ /**
7806
+ * @description min_order_not_met: the cart subtotal is below min_order_amount; amount_needed says by how much. fulfillment_type_not_allowed: no line the discount covers uses one of allowed_fulfillment_types. Reported before the minimum, since adding to the basket cannot lift it.
7807
+ *
7808
+ * * `min_order_not_met` - min_order_not_met
7809
+ * * `fulfillment_type_not_allowed` - fulfillment_type_not_allowed
7810
+ */
7811
+ reason: components["schemas"]["CartPendingAutoDiscountReasonEnum"];
7812
+ /** Format: decimal */
7813
+ min_order_amount: string | null;
7814
+ /**
7815
+ * Format: decimal
7816
+ * @description What the subtotal still needs. Null unless min_order_not_met.
7817
+ */
7818
+ amount_needed: string | null;
7819
+ allowed_fulfillment_types: string[];
7820
+ currency: string;
7821
+ };
7822
+ /**
7823
+ * @description * `min_order_not_met` - min_order_not_met
7824
+ * * `fulfillment_type_not_allowed` - fulfillment_type_not_allowed
7825
+ * @enum {string}
7826
+ */
7827
+ CartPendingAutoDiscountReasonEnum: "min_order_not_met" | "fulfillment_type_not_allowed";
7751
7828
  Category: {
7752
7829
  readonly id: number;
7753
7830
  slug: string;
@@ -10826,6 +10903,19 @@ interface components {
10826
10903
  /** Format: date-time */
10827
10904
  readonly updated_at: string;
10828
10905
  };
10906
+ /**
10907
+ * @description The dates one product can be ordered for, within the location's
10908
+ * pre-order horizon (``ProductViewSet.orderable_dates``).
10909
+ */
10910
+ ProductFulfilmentDates: {
10911
+ dates: string[];
10912
+ reason: (components["schemas"]["ProductFulfilmentDatesReasonEnum"] | components["schemas"]["NullEnum"]) | null;
10913
+ };
10914
+ /**
10915
+ * @description * `no_dates` - no_dates
10916
+ * @enum {string}
10917
+ */
10918
+ ProductFulfilmentDatesReasonEnum: "no_dates";
10829
10919
  ProductImage: {
10830
10920
  readonly id: number;
10831
10921
  /** Format: uri */
@@ -39018,6 +39108,8 @@ interface operations {
39018
39108
  query?: {
39019
39109
  /** @description Delivery destination country as ISO 3166-1 alpha-2 (e.g. NL, BE), used with latitude and longitude. A nationwide carrier that declares per-country service areas only offers its products once the country is known. Case-insensitive; any other value is treated as no country. */
39020
39110
  country?: string;
39111
+ /** @description The pickup or delivery date the customer has chosen (YYYY-MM-DD). Lists only the products that can be ordered today for that date by their own dates: weekly days, included and excluded dates, and order-until. Whether the store is open that day is the time-slots endpoint's answer, not this filter's. An unreadable value is ignored. */
39112
+ handover_date?: string;
39021
39113
  /** @description Sort order for products. Use '-popularity' for most popular first. */
39022
39114
  ordering?: "-popularity" | "-position" | "position";
39023
39115
  /** @description A page number within the paginated result set. */
@@ -39254,6 +39346,91 @@ interface operations {
39254
39346
  };
39255
39347
  };
39256
39348
  };
39349
+ products_orderable_dates_retrieve: {
39350
+ parameters: {
39351
+ query: {
39352
+ /** @description For type=delivery: the customer's delivery types in order of preference, comma-separated (local_delivery, nationwide_delivery). The product's schedule follows the first of them it offers, the type its cart line would get; without one it follows the delivery types the product offers. */
39353
+ fulfillment_types?: string;
39354
+ /** @description Pickup location id, as the pickup time-slots endpoint takes it. Defaults to the store's active pickup location. */
39355
+ location?: number;
39356
+ /** @description Fulfilment type the dates are for. */
39357
+ type: "delivery" | "pickup";
39358
+ /** @description Language override for translated content. The primary mechanism is the `Accept-Language` header; this query parameter is an override for widget embedding where merchants cannot control browser headers. Defaults to `en`. */
39359
+ lang?: string;
39360
+ };
39361
+ header?: never;
39362
+ path: {
39363
+ /** @description A unique integer value identifying this product. */
39364
+ id: number;
39365
+ };
39366
+ cookie?: never;
39367
+ };
39368
+ requestBody?: never;
39369
+ responses: {
39370
+ 200: {
39371
+ headers: {
39372
+ [name: string]: unknown;
39373
+ };
39374
+ content: {
39375
+ "application/json": components["schemas"]["ProductFulfilmentDates"];
39376
+ };
39377
+ };
39378
+ /** @description Possible error codes: `VALIDATION_ERROR`. Retryable: no. Possible error codes include `VALIDATION_ERROR`. Use `x-error-codes` for machine-readable retryability metadata. */
39379
+ 400: {
39380
+ headers: {
39381
+ [name: string]: unknown;
39382
+ };
39383
+ content: {
39384
+ "application/json": components["schemas"]["APIErrorEnvelope"];
39385
+ };
39386
+ };
39387
+ /** @description Possible error codes include `UNAUTHORIZED`. Use `x-error-codes` for machine-readable retryability metadata. */
39388
+ 401: {
39389
+ headers: {
39390
+ [name: string]: unknown;
39391
+ };
39392
+ content: {
39393
+ "application/json": components["schemas"]["APIErrorEnvelope"];
39394
+ };
39395
+ };
39396
+ /** @description Possible error codes include `FORBIDDEN`. Use `x-error-codes` for machine-readable retryability metadata. */
39397
+ 403: {
39398
+ headers: {
39399
+ [name: string]: unknown;
39400
+ };
39401
+ content: {
39402
+ "application/json": components["schemas"]["APIErrorEnvelope"];
39403
+ };
39404
+ };
39405
+ /** @description Possible error codes: `NOT_FOUND`, `LOCATION_NOT_FOUND`. Retryable: no. Possible error codes include `NOT_FOUND`. Use `x-error-codes` for machine-readable retryability metadata. Possible error codes include `PRODUCT_NOT_FOUND`. Use `x-error-codes` for machine-readable retryability metadata. Possible error codes include `LOCATION_NOT_FOUND`. Use `x-error-codes` for machine-readable retryability metadata. */
39406
+ 404: {
39407
+ headers: {
39408
+ [name: string]: unknown;
39409
+ };
39410
+ content: {
39411
+ "application/json": components["schemas"]["APIErrorEnvelope"];
39412
+ };
39413
+ };
39414
+ /** @description Possible error codes include `RATE_LIMITED`. Use `x-error-codes` for machine-readable retryability metadata. */
39415
+ 429: {
39416
+ headers: {
39417
+ [name: string]: unknown;
39418
+ };
39419
+ content: {
39420
+ "application/json": components["schemas"]["APIErrorEnvelope"];
39421
+ };
39422
+ };
39423
+ /** @description Possible error codes include `INTERNAL_ERROR`. Use `x-error-codes` for machine-readable retryability metadata. */
39424
+ 500: {
39425
+ headers: {
39426
+ [name: string]: unknown;
39427
+ };
39428
+ content: {
39429
+ "application/json": components["schemas"]["APIErrorEnvelope"];
39430
+ };
39431
+ };
39432
+ };
39433
+ };
39257
39434
  products_suggestions_list: {
39258
39435
  parameters: {
39259
39436
  query?: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@poweredbysous/storefront-all-sdk",
3
- "version": "4.13.0",
3
+ "version": "4.14.0",
4
4
  "description": "Type-safe TypeScript SDK for all SOUS Storefront Backend endpoints",
5
5
  "license": "UNLICENSED",
6
6
  "private": false,