@poweredbysous/storefront-sdk 3.3.4 → 3.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
@@ -2125,6 +2125,28 @@ interface paths {
2125
2125
  patch?: never;
2126
2126
  trace?: never;
2127
2127
  };
2128
+ "/api/v1/products/{id}/orderable-dates/": {
2129
+ parameters: {
2130
+ query?: never;
2131
+ header?: never;
2132
+ path?: never;
2133
+ cookie?: never;
2134
+ };
2135
+ /**
2136
+ * @description The dates this product can be ordered for, within the location's
2137
+ * pre-order horizon, as the cart's ``fulfilment-dates`` lists them for
2138
+ * a basket holding only this product's line, so the storefront can tell
2139
+ * a customer when a product it hides for their date is available.
2140
+ */
2141
+ get: operations["products_orderable_dates_retrieve"];
2142
+ put?: never;
2143
+ post?: never;
2144
+ delete?: never;
2145
+ options?: never;
2146
+ head?: never;
2147
+ patch?: never;
2148
+ trace?: never;
2149
+ };
2128
2150
  "/api/v1/products/{id}/suggestions/": {
2129
2151
  parameters: {
2130
2152
  query?: never;
@@ -2498,6 +2520,11 @@ interface components {
2498
2520
  fulfillment_type?: string;
2499
2521
  /** Format: date */
2500
2522
  fulfillment_date?: string;
2523
+ /**
2524
+ * Format: date
2525
+ * @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.
2526
+ */
2527
+ handover_date?: string;
2501
2528
  /** @default */
2502
2529
  fulfillment_time_slot: string;
2503
2530
  options?: components["schemas"]["OptionInput"][];
@@ -2807,6 +2834,7 @@ interface components {
2807
2834
  [key: string]: unknown;
2808
2835
  } | null;
2809
2836
  readonly note: string;
2837
+ readonly order_dates: components["schemas"]["CartLineOrderDates"] | null;
2810
2838
  };
2811
2839
  CartLineItemOption: {
2812
2840
  option_id: number;
@@ -2862,6 +2890,20 @@ interface components {
2862
2890
  /** @description 'product' or 'modifier' */
2863
2891
  source: string;
2864
2892
  };
2893
+ /**
2894
+ * @description The product's own dates. An excluded date closes it, an included date
2895
+ * opens it on a day ``weekly_days`` does not cover, and ``order_until`` closes
2896
+ * it once passed. Checkout refuses a handover date outside them with
2897
+ * ``PRODUCT_NOT_ORDERABLE_FOR_DATE``.
2898
+ */
2899
+ CartLineOrderDates: {
2900
+ /** @description Lower-case weekday names, or null to follow the store's schedule. */
2901
+ weekly_days: string[] | null;
2902
+ included_dates: string[];
2903
+ excluded_dates: string[];
2904
+ /** Format: date */
2905
+ order_until: string | null;
2906
+ };
2865
2907
  /**
2866
2908
  * @description A codeless discount the cart holds products for but does not get yet.
2867
2909
  *
@@ -4237,6 +4279,19 @@ interface components {
4237
4279
  /** Format: date-time */
4238
4280
  readonly updated_at: string;
4239
4281
  };
4282
+ /**
4283
+ * @description The dates one product can be ordered for, within the location's
4284
+ * pre-order horizon (``ProductViewSet.orderable_dates``).
4285
+ */
4286
+ ProductFulfilmentDates: {
4287
+ dates: string[];
4288
+ reason: (components["schemas"]["ProductFulfilmentDatesReasonEnum"] | components["schemas"]["NullEnum"]) | null;
4289
+ };
4290
+ /**
4291
+ * @description * `no_dates` - no_dates
4292
+ * @enum {string}
4293
+ */
4294
+ ProductFulfilmentDatesReasonEnum: "no_dates";
4240
4295
  ProductImage: {
4241
4296
  readonly id: number;
4242
4297
  /** Format: uri */
@@ -16037,6 +16092,8 @@ interface operations {
16037
16092
  query?: {
16038
16093
  /** @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. */
16039
16094
  country?: string;
16095
+ /** @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. */
16096
+ handover_date?: string;
16040
16097
  /** @description Sort order for products. Use '-popularity' for most popular first. */
16041
16098
  ordering?: "-popularity" | "-position" | "position";
16042
16099
  /** @description A page number within the paginated result set. */
@@ -16273,6 +16330,91 @@ interface operations {
16273
16330
  };
16274
16331
  };
16275
16332
  };
16333
+ products_orderable_dates_retrieve: {
16334
+ parameters: {
16335
+ query: {
16336
+ /** @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. */
16337
+ fulfillment_types?: string;
16338
+ /** @description Pickup location id, as the pickup time-slots endpoint takes it. Defaults to the store's active pickup location. */
16339
+ location?: number;
16340
+ /** @description Fulfilment type the dates are for. */
16341
+ type: "delivery" | "pickup";
16342
+ /** @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`. */
16343
+ lang?: string;
16344
+ };
16345
+ header?: never;
16346
+ path: {
16347
+ /** @description A unique integer value identifying this product. */
16348
+ id: number;
16349
+ };
16350
+ cookie?: never;
16351
+ };
16352
+ requestBody?: never;
16353
+ responses: {
16354
+ 200: {
16355
+ headers: {
16356
+ [name: string]: unknown;
16357
+ };
16358
+ content: {
16359
+ "application/json": components["schemas"]["ProductFulfilmentDates"];
16360
+ };
16361
+ };
16362
+ /** @description Possible error codes: `VALIDATION_ERROR`. Retryable: no. Possible error codes include `VALIDATION_ERROR`. Use `x-error-codes` for machine-readable retryability metadata. */
16363
+ 400: {
16364
+ headers: {
16365
+ [name: string]: unknown;
16366
+ };
16367
+ content: {
16368
+ "application/json": components["schemas"]["APIErrorEnvelope"];
16369
+ };
16370
+ };
16371
+ /** @description Possible error codes include `UNAUTHORIZED`. Use `x-error-codes` for machine-readable retryability metadata. */
16372
+ 401: {
16373
+ headers: {
16374
+ [name: string]: unknown;
16375
+ };
16376
+ content: {
16377
+ "application/json": components["schemas"]["APIErrorEnvelope"];
16378
+ };
16379
+ };
16380
+ /** @description Possible error codes include `FORBIDDEN`. Use `x-error-codes` for machine-readable retryability metadata. */
16381
+ 403: {
16382
+ headers: {
16383
+ [name: string]: unknown;
16384
+ };
16385
+ content: {
16386
+ "application/json": components["schemas"]["APIErrorEnvelope"];
16387
+ };
16388
+ };
16389
+ /** @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. */
16390
+ 404: {
16391
+ headers: {
16392
+ [name: string]: unknown;
16393
+ };
16394
+ content: {
16395
+ "application/json": components["schemas"]["APIErrorEnvelope"];
16396
+ };
16397
+ };
16398
+ /** @description Possible error codes include `RATE_LIMITED`. Use `x-error-codes` for machine-readable retryability metadata. */
16399
+ 429: {
16400
+ headers: {
16401
+ [name: string]: unknown;
16402
+ };
16403
+ content: {
16404
+ "application/json": components["schemas"]["APIErrorEnvelope"];
16405
+ };
16406
+ };
16407
+ /** @description Possible error codes include `INTERNAL_ERROR`. Use `x-error-codes` for machine-readable retryability metadata. */
16408
+ 500: {
16409
+ headers: {
16410
+ [name: string]: unknown;
16411
+ };
16412
+ content: {
16413
+ "application/json": components["schemas"]["APIErrorEnvelope"];
16414
+ };
16415
+ };
16416
+ };
16417
+ };
16276
16418
  products_suggestions_list: {
16277
16419
  parameters: {
16278
16420
  query?: {
package/dist/index.d.ts CHANGED
@@ -2125,6 +2125,28 @@ interface paths {
2125
2125
  patch?: never;
2126
2126
  trace?: never;
2127
2127
  };
2128
+ "/api/v1/products/{id}/orderable-dates/": {
2129
+ parameters: {
2130
+ query?: never;
2131
+ header?: never;
2132
+ path?: never;
2133
+ cookie?: never;
2134
+ };
2135
+ /**
2136
+ * @description The dates this product can be ordered for, within the location's
2137
+ * pre-order horizon, as the cart's ``fulfilment-dates`` lists them for
2138
+ * a basket holding only this product's line, so the storefront can tell
2139
+ * a customer when a product it hides for their date is available.
2140
+ */
2141
+ get: operations["products_orderable_dates_retrieve"];
2142
+ put?: never;
2143
+ post?: never;
2144
+ delete?: never;
2145
+ options?: never;
2146
+ head?: never;
2147
+ patch?: never;
2148
+ trace?: never;
2149
+ };
2128
2150
  "/api/v1/products/{id}/suggestions/": {
2129
2151
  parameters: {
2130
2152
  query?: never;
@@ -2498,6 +2520,11 @@ interface components {
2498
2520
  fulfillment_type?: string;
2499
2521
  /** Format: date */
2500
2522
  fulfillment_date?: string;
2523
+ /**
2524
+ * Format: date
2525
+ * @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.
2526
+ */
2527
+ handover_date?: string;
2501
2528
  /** @default */
2502
2529
  fulfillment_time_slot: string;
2503
2530
  options?: components["schemas"]["OptionInput"][];
@@ -2807,6 +2834,7 @@ interface components {
2807
2834
  [key: string]: unknown;
2808
2835
  } | null;
2809
2836
  readonly note: string;
2837
+ readonly order_dates: components["schemas"]["CartLineOrderDates"] | null;
2810
2838
  };
2811
2839
  CartLineItemOption: {
2812
2840
  option_id: number;
@@ -2862,6 +2890,20 @@ interface components {
2862
2890
  /** @description 'product' or 'modifier' */
2863
2891
  source: string;
2864
2892
  };
2893
+ /**
2894
+ * @description The product's own dates. An excluded date closes it, an included date
2895
+ * opens it on a day ``weekly_days`` does not cover, and ``order_until`` closes
2896
+ * it once passed. Checkout refuses a handover date outside them with
2897
+ * ``PRODUCT_NOT_ORDERABLE_FOR_DATE``.
2898
+ */
2899
+ CartLineOrderDates: {
2900
+ /** @description Lower-case weekday names, or null to follow the store's schedule. */
2901
+ weekly_days: string[] | null;
2902
+ included_dates: string[];
2903
+ excluded_dates: string[];
2904
+ /** Format: date */
2905
+ order_until: string | null;
2906
+ };
2865
2907
  /**
2866
2908
  * @description A codeless discount the cart holds products for but does not get yet.
2867
2909
  *
@@ -4237,6 +4279,19 @@ interface components {
4237
4279
  /** Format: date-time */
4238
4280
  readonly updated_at: string;
4239
4281
  };
4282
+ /**
4283
+ * @description The dates one product can be ordered for, within the location's
4284
+ * pre-order horizon (``ProductViewSet.orderable_dates``).
4285
+ */
4286
+ ProductFulfilmentDates: {
4287
+ dates: string[];
4288
+ reason: (components["schemas"]["ProductFulfilmentDatesReasonEnum"] | components["schemas"]["NullEnum"]) | null;
4289
+ };
4290
+ /**
4291
+ * @description * `no_dates` - no_dates
4292
+ * @enum {string}
4293
+ */
4294
+ ProductFulfilmentDatesReasonEnum: "no_dates";
4240
4295
  ProductImage: {
4241
4296
  readonly id: number;
4242
4297
  /** Format: uri */
@@ -16037,6 +16092,8 @@ interface operations {
16037
16092
  query?: {
16038
16093
  /** @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. */
16039
16094
  country?: string;
16095
+ /** @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. */
16096
+ handover_date?: string;
16040
16097
  /** @description Sort order for products. Use '-popularity' for most popular first. */
16041
16098
  ordering?: "-popularity" | "-position" | "position";
16042
16099
  /** @description A page number within the paginated result set. */
@@ -16273,6 +16330,91 @@ interface operations {
16273
16330
  };
16274
16331
  };
16275
16332
  };
16333
+ products_orderable_dates_retrieve: {
16334
+ parameters: {
16335
+ query: {
16336
+ /** @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. */
16337
+ fulfillment_types?: string;
16338
+ /** @description Pickup location id, as the pickup time-slots endpoint takes it. Defaults to the store's active pickup location. */
16339
+ location?: number;
16340
+ /** @description Fulfilment type the dates are for. */
16341
+ type: "delivery" | "pickup";
16342
+ /** @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`. */
16343
+ lang?: string;
16344
+ };
16345
+ header?: never;
16346
+ path: {
16347
+ /** @description A unique integer value identifying this product. */
16348
+ id: number;
16349
+ };
16350
+ cookie?: never;
16351
+ };
16352
+ requestBody?: never;
16353
+ responses: {
16354
+ 200: {
16355
+ headers: {
16356
+ [name: string]: unknown;
16357
+ };
16358
+ content: {
16359
+ "application/json": components["schemas"]["ProductFulfilmentDates"];
16360
+ };
16361
+ };
16362
+ /** @description Possible error codes: `VALIDATION_ERROR`. Retryable: no. Possible error codes include `VALIDATION_ERROR`. Use `x-error-codes` for machine-readable retryability metadata. */
16363
+ 400: {
16364
+ headers: {
16365
+ [name: string]: unknown;
16366
+ };
16367
+ content: {
16368
+ "application/json": components["schemas"]["APIErrorEnvelope"];
16369
+ };
16370
+ };
16371
+ /** @description Possible error codes include `UNAUTHORIZED`. Use `x-error-codes` for machine-readable retryability metadata. */
16372
+ 401: {
16373
+ headers: {
16374
+ [name: string]: unknown;
16375
+ };
16376
+ content: {
16377
+ "application/json": components["schemas"]["APIErrorEnvelope"];
16378
+ };
16379
+ };
16380
+ /** @description Possible error codes include `FORBIDDEN`. Use `x-error-codes` for machine-readable retryability metadata. */
16381
+ 403: {
16382
+ headers: {
16383
+ [name: string]: unknown;
16384
+ };
16385
+ content: {
16386
+ "application/json": components["schemas"]["APIErrorEnvelope"];
16387
+ };
16388
+ };
16389
+ /** @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. */
16390
+ 404: {
16391
+ headers: {
16392
+ [name: string]: unknown;
16393
+ };
16394
+ content: {
16395
+ "application/json": components["schemas"]["APIErrorEnvelope"];
16396
+ };
16397
+ };
16398
+ /** @description Possible error codes include `RATE_LIMITED`. Use `x-error-codes` for machine-readable retryability metadata. */
16399
+ 429: {
16400
+ headers: {
16401
+ [name: string]: unknown;
16402
+ };
16403
+ content: {
16404
+ "application/json": components["schemas"]["APIErrorEnvelope"];
16405
+ };
16406
+ };
16407
+ /** @description Possible error codes include `INTERNAL_ERROR`. Use `x-error-codes` for machine-readable retryability metadata. */
16408
+ 500: {
16409
+ headers: {
16410
+ [name: string]: unknown;
16411
+ };
16412
+ content: {
16413
+ "application/json": components["schemas"]["APIErrorEnvelope"];
16414
+ };
16415
+ };
16416
+ };
16417
+ };
16276
16418
  products_suggestions_list: {
16277
16419
  parameters: {
16278
16420
  query?: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@poweredbysous/storefront-sdk",
3
- "version": "3.3.4",
3
+ "version": "3.4.0",
4
4
  "description": "Type-safe TypeScript SDK for SOUS Storefront Backend",
5
5
  "license": "UNLICENSED",
6
6
  "private": false,