@poweredbysous/storefront-all-sdk 4.9.0 → 4.11.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
@@ -3154,6 +3154,13 @@ interface paths {
3154
3154
  *
3155
3155
  * Meilisearch unreachable answers 502 rather than an empty page, so
3156
3156
  * "nothing matches" and "search is down" never look the same.
3157
+ *
3158
+ * A 200 is cacheable by shared caches for a minute (``CACHE_CONTROL_OK``).
3159
+ * That is safe because the body is a function of the URL and the language
3160
+ * only: there are no authentication classes, no cookie is read or set, and
3161
+ * the store ids it may carry are public identifiers. Search staleness is
3162
+ * acceptable by contract (add-to-cart re-checks fulfilment). Anything that
3163
+ * is not a 200 is ``no-store`` so an outage is never replayed from a cache.
3157
3164
  */
3158
3165
  get: operations["discovery_marketplace_retrieve"];
3159
3166
  put?: never;
@@ -3225,6 +3232,54 @@ interface paths {
3225
3232
  patch?: never;
3226
3233
  trace?: never;
3227
3234
  };
3235
+ "/api/v1/discovery/shopify-products/{handle}/": {
3236
+ parameters: {
3237
+ query?: never;
3238
+ header?: never;
3239
+ path?: never;
3240
+ cookie?: never;
3241
+ };
3242
+ /**
3243
+ * @description The ExploreSOUS dish an old Shopify product URL now answers with.
3244
+ *
3245
+ * The old storefront served each product at ``/products/<handle>``. The
3246
+ * product import remembers which SOUS product each handle became, so
3247
+ * ExploreSOUS can send that URL, with its search ranking, to the same dish
3248
+ * in one permanent redirect. A 404 is the answer for every handle with no
3249
+ * live dish, and the caller falls back to the partner or a search.
3250
+ */
3251
+ get: operations["discovery_shopify_products_retrieve"];
3252
+ put?: never;
3253
+ post?: never;
3254
+ delete?: never;
3255
+ options?: never;
3256
+ head?: never;
3257
+ patch?: never;
3258
+ trace?: never;
3259
+ };
3260
+ "/api/v1/discovery/store-routes/": {
3261
+ parameters: {
3262
+ query?: never;
3263
+ header?: never;
3264
+ path?: never;
3265
+ cookie?: never;
3266
+ };
3267
+ /**
3268
+ * @description Each ExploreSOUS store's brand and location slug, for its page URL.
3269
+ *
3270
+ * ExploreSOUS serves a store at ``/brands/{brand_slug}/{slug}`` and resolves
3271
+ * both ways with this: a segment pair to the store, and an old
3272
+ * ``/stores/{public_id}`` link to its new address.
3273
+ */
3274
+ get: operations["discovery_store_routes_retrieve"];
3275
+ put?: never;
3276
+ post?: never;
3277
+ delete?: never;
3278
+ options?: never;
3279
+ head?: never;
3280
+ patch?: never;
3281
+ trace?: never;
3282
+ };
3228
3283
  "/api/v1/discovery/stores/": {
3229
3284
  parameters: {
3230
3285
  query?: never;
@@ -6964,6 +7019,8 @@ interface components {
6964
7019
  available_shipping_providers: components["schemas"]["ShippingProviderOption"][];
6965
7020
  pickup_locations: components["schemas"]["AddressCheckPickupLocation"][];
6966
7021
  delivery_unavailable: boolean;
7022
+ /** @description ISO country code of the address when the store's nationwide carriers all leave that country out, so the client can say the store does not deliver there. Null otherwise. */
7023
+ unserved_country: string | null;
6967
7024
  near_delivery_zone: boolean;
6968
7025
  };
6969
7026
  AddressLookupResponse: {
@@ -7659,12 +7716,12 @@ interface components {
7659
7716
  [key: string]: unknown;
7660
7717
  }[];
7661
7718
  /**
7662
- * @description How many products this category shows, descendants included.
7719
+ * @description How many products this category's listing shows, descendants included.
7663
7720
  *
7664
- * The listing precomputes every category's count in one pass
7665
- * (``views._build_product_counts``) and passes it in context; the
7666
- * fallback below is the single-object path (retrieve), which counts its
7667
- * own subtree directly.
7721
+ * Precomputed for every category in one pass
7722
+ * (``views._build_product_counts``) and passed in context, on both list
7723
+ * and retrieve: counting here instead would count products the listing
7724
+ * leaves out.
7668
7725
  */
7669
7726
  readonly product_count: number;
7670
7727
  };
@@ -8345,6 +8402,7 @@ interface components {
8345
8402
  seo_title: string;
8346
8403
  images: string[];
8347
8404
  book_url: string;
8405
+ michelin_stars: number | null;
8348
8406
  };
8349
8407
  DiscoveryCollection: {
8350
8408
  slug: string;
@@ -8385,6 +8443,15 @@ interface components {
8385
8443
  DiscoveryStoreMembership: {
8386
8444
  store_ids: string[];
8387
8445
  };
8446
+ DiscoveryStoreRoute: {
8447
+ public_id: string;
8448
+ brand_slug: string | null;
8449
+ slug: string | null;
8450
+ };
8451
+ /** @description Each ExploreSOUS store's ``/brands/{brand_slug}/{slug}`` address. */
8452
+ DiscoveryStoreRoutes: {
8453
+ stores: components["schemas"]["DiscoveryStoreRoute"][];
8454
+ };
8388
8455
  /** @description One filter option, already named in the reader's language. */
8389
8456
  DiscoveryTag: {
8390
8457
  slug: string;
@@ -11403,6 +11470,8 @@ interface components {
11403
11470
  remaining_for_free_shipping: string | null;
11404
11471
  /** @description Products no carrier delivers to this address. The total does not cover them and checkout cannot route them, so the customer must remove them or change the address. Empty when every item ships. */
11405
11472
  unshippable_product_ids: number[];
11473
+ /** @description ISO country code of the delivery address when every carrier of the unshippable products leaves that country out, so the client can say the store does not deliver there. Null otherwise. */
11474
+ unserved_country: string | null;
11406
11475
  };
11407
11476
  /**
11408
11477
  * @description One carrier's share of the basket. Documentation only — never used to
@@ -11429,6 +11498,18 @@ interface components {
11429
11498
  /** Format: decimal */
11430
11499
  free_delivery_threshold: string | null;
11431
11500
  };
11501
+ /**
11502
+ * @description Where an old Shopify product URL's dish lives on ExploreSOUS.
11503
+ *
11504
+ * ``/partners/{brand_slug}/{slug}/p/{product_id}`` on the ExploreSOUS site.
11505
+ */
11506
+ ShopifyProductRoute: {
11507
+ brand_slug: string;
11508
+ slug: string;
11509
+ product_id: number;
11510
+ /** @description The dish's title in the request's language (``?lang=`` or ``Accept-Language``), with the product endpoint's fallback. */
11511
+ title: string;
11512
+ };
11432
11513
  /**
11433
11514
  * @description * `manual` - Manual
11434
11515
  * * `auto` - Auto-translated
@@ -26995,6 +27076,118 @@ interface operations {
26995
27076
  };
26996
27077
  };
26997
27078
  };
27079
+ discovery_shopify_products_retrieve: {
27080
+ parameters: {
27081
+ query?: never;
27082
+ header?: never;
27083
+ path: {
27084
+ handle: string;
27085
+ };
27086
+ cookie?: never;
27087
+ };
27088
+ requestBody?: never;
27089
+ responses: {
27090
+ 200: {
27091
+ headers: {
27092
+ [name: string]: unknown;
27093
+ };
27094
+ content: {
27095
+ "application/json": components["schemas"]["ShopifyProductRoute"];
27096
+ };
27097
+ };
27098
+ /** @description Possible error codes include `VALIDATION_ERROR`. Use `x-error-codes` for machine-readable retryability metadata. */
27099
+ 400: {
27100
+ headers: {
27101
+ [name: string]: unknown;
27102
+ };
27103
+ content: {
27104
+ "application/json": components["schemas"]["APIErrorEnvelope"];
27105
+ };
27106
+ };
27107
+ /** @description Possible error codes include `NOT_FOUND`. Use `x-error-codes` for machine-readable retryability metadata. */
27108
+ 404: {
27109
+ headers: {
27110
+ [name: string]: unknown;
27111
+ };
27112
+ content: {
27113
+ "application/json": components["schemas"]["APIErrorEnvelope"];
27114
+ };
27115
+ };
27116
+ /** @description Possible error codes include `RATE_LIMITED`. Use `x-error-codes` for machine-readable retryability metadata. */
27117
+ 429: {
27118
+ headers: {
27119
+ [name: string]: unknown;
27120
+ };
27121
+ content: {
27122
+ "application/json": components["schemas"]["APIErrorEnvelope"];
27123
+ };
27124
+ };
27125
+ /** @description Possible error codes include `INTERNAL_ERROR`. Use `x-error-codes` for machine-readable retryability metadata. */
27126
+ 500: {
27127
+ headers: {
27128
+ [name: string]: unknown;
27129
+ };
27130
+ content: {
27131
+ "application/json": components["schemas"]["APIErrorEnvelope"];
27132
+ };
27133
+ };
27134
+ };
27135
+ };
27136
+ discovery_store_routes_retrieve: {
27137
+ parameters: {
27138
+ query?: never;
27139
+ header?: never;
27140
+ path?: never;
27141
+ cookie?: never;
27142
+ };
27143
+ requestBody?: never;
27144
+ responses: {
27145
+ 200: {
27146
+ headers: {
27147
+ [name: string]: unknown;
27148
+ };
27149
+ content: {
27150
+ "application/json": components["schemas"]["DiscoveryStoreRoutes"];
27151
+ };
27152
+ };
27153
+ /** @description Possible error codes include `VALIDATION_ERROR`. Use `x-error-codes` for machine-readable retryability metadata. */
27154
+ 400: {
27155
+ headers: {
27156
+ [name: string]: unknown;
27157
+ };
27158
+ content: {
27159
+ "application/json": components["schemas"]["APIErrorEnvelope"];
27160
+ };
27161
+ };
27162
+ /** @description Possible error codes include `NOT_FOUND`. Use `x-error-codes` for machine-readable retryability metadata. */
27163
+ 404: {
27164
+ headers: {
27165
+ [name: string]: unknown;
27166
+ };
27167
+ content: {
27168
+ "application/json": components["schemas"]["APIErrorEnvelope"];
27169
+ };
27170
+ };
27171
+ /** @description Possible error codes include `RATE_LIMITED`. Use `x-error-codes` for machine-readable retryability metadata. */
27172
+ 429: {
27173
+ headers: {
27174
+ [name: string]: unknown;
27175
+ };
27176
+ content: {
27177
+ "application/json": components["schemas"]["APIErrorEnvelope"];
27178
+ };
27179
+ };
27180
+ /** @description Possible error codes include `INTERNAL_ERROR`. Use `x-error-codes` for machine-readable retryability metadata. */
27181
+ 500: {
27182
+ headers: {
27183
+ [name: string]: unknown;
27184
+ };
27185
+ content: {
27186
+ "application/json": components["schemas"]["APIErrorEnvelope"];
27187
+ };
27188
+ };
27189
+ };
27190
+ };
26998
27191
  discovery_stores_retrieve: {
26999
27192
  parameters: {
27000
27193
  query?: never;
package/dist/index.d.ts CHANGED
@@ -3154,6 +3154,13 @@ interface paths {
3154
3154
  *
3155
3155
  * Meilisearch unreachable answers 502 rather than an empty page, so
3156
3156
  * "nothing matches" and "search is down" never look the same.
3157
+ *
3158
+ * A 200 is cacheable by shared caches for a minute (``CACHE_CONTROL_OK``).
3159
+ * That is safe because the body is a function of the URL and the language
3160
+ * only: there are no authentication classes, no cookie is read or set, and
3161
+ * the store ids it may carry are public identifiers. Search staleness is
3162
+ * acceptable by contract (add-to-cart re-checks fulfilment). Anything that
3163
+ * is not a 200 is ``no-store`` so an outage is never replayed from a cache.
3157
3164
  */
3158
3165
  get: operations["discovery_marketplace_retrieve"];
3159
3166
  put?: never;
@@ -3225,6 +3232,54 @@ interface paths {
3225
3232
  patch?: never;
3226
3233
  trace?: never;
3227
3234
  };
3235
+ "/api/v1/discovery/shopify-products/{handle}/": {
3236
+ parameters: {
3237
+ query?: never;
3238
+ header?: never;
3239
+ path?: never;
3240
+ cookie?: never;
3241
+ };
3242
+ /**
3243
+ * @description The ExploreSOUS dish an old Shopify product URL now answers with.
3244
+ *
3245
+ * The old storefront served each product at ``/products/<handle>``. The
3246
+ * product import remembers which SOUS product each handle became, so
3247
+ * ExploreSOUS can send that URL, with its search ranking, to the same dish
3248
+ * in one permanent redirect. A 404 is the answer for every handle with no
3249
+ * live dish, and the caller falls back to the partner or a search.
3250
+ */
3251
+ get: operations["discovery_shopify_products_retrieve"];
3252
+ put?: never;
3253
+ post?: never;
3254
+ delete?: never;
3255
+ options?: never;
3256
+ head?: never;
3257
+ patch?: never;
3258
+ trace?: never;
3259
+ };
3260
+ "/api/v1/discovery/store-routes/": {
3261
+ parameters: {
3262
+ query?: never;
3263
+ header?: never;
3264
+ path?: never;
3265
+ cookie?: never;
3266
+ };
3267
+ /**
3268
+ * @description Each ExploreSOUS store's brand and location slug, for its page URL.
3269
+ *
3270
+ * ExploreSOUS serves a store at ``/brands/{brand_slug}/{slug}`` and resolves
3271
+ * both ways with this: a segment pair to the store, and an old
3272
+ * ``/stores/{public_id}`` link to its new address.
3273
+ */
3274
+ get: operations["discovery_store_routes_retrieve"];
3275
+ put?: never;
3276
+ post?: never;
3277
+ delete?: never;
3278
+ options?: never;
3279
+ head?: never;
3280
+ patch?: never;
3281
+ trace?: never;
3282
+ };
3228
3283
  "/api/v1/discovery/stores/": {
3229
3284
  parameters: {
3230
3285
  query?: never;
@@ -6964,6 +7019,8 @@ interface components {
6964
7019
  available_shipping_providers: components["schemas"]["ShippingProviderOption"][];
6965
7020
  pickup_locations: components["schemas"]["AddressCheckPickupLocation"][];
6966
7021
  delivery_unavailable: boolean;
7022
+ /** @description ISO country code of the address when the store's nationwide carriers all leave that country out, so the client can say the store does not deliver there. Null otherwise. */
7023
+ unserved_country: string | null;
6967
7024
  near_delivery_zone: boolean;
6968
7025
  };
6969
7026
  AddressLookupResponse: {
@@ -7659,12 +7716,12 @@ interface components {
7659
7716
  [key: string]: unknown;
7660
7717
  }[];
7661
7718
  /**
7662
- * @description How many products this category shows, descendants included.
7719
+ * @description How many products this category's listing shows, descendants included.
7663
7720
  *
7664
- * The listing precomputes every category's count in one pass
7665
- * (``views._build_product_counts``) and passes it in context; the
7666
- * fallback below is the single-object path (retrieve), which counts its
7667
- * own subtree directly.
7721
+ * Precomputed for every category in one pass
7722
+ * (``views._build_product_counts``) and passed in context, on both list
7723
+ * and retrieve: counting here instead would count products the listing
7724
+ * leaves out.
7668
7725
  */
7669
7726
  readonly product_count: number;
7670
7727
  };
@@ -8345,6 +8402,7 @@ interface components {
8345
8402
  seo_title: string;
8346
8403
  images: string[];
8347
8404
  book_url: string;
8405
+ michelin_stars: number | null;
8348
8406
  };
8349
8407
  DiscoveryCollection: {
8350
8408
  slug: string;
@@ -8385,6 +8443,15 @@ interface components {
8385
8443
  DiscoveryStoreMembership: {
8386
8444
  store_ids: string[];
8387
8445
  };
8446
+ DiscoveryStoreRoute: {
8447
+ public_id: string;
8448
+ brand_slug: string | null;
8449
+ slug: string | null;
8450
+ };
8451
+ /** @description Each ExploreSOUS store's ``/brands/{brand_slug}/{slug}`` address. */
8452
+ DiscoveryStoreRoutes: {
8453
+ stores: components["schemas"]["DiscoveryStoreRoute"][];
8454
+ };
8388
8455
  /** @description One filter option, already named in the reader's language. */
8389
8456
  DiscoveryTag: {
8390
8457
  slug: string;
@@ -11403,6 +11470,8 @@ interface components {
11403
11470
  remaining_for_free_shipping: string | null;
11404
11471
  /** @description Products no carrier delivers to this address. The total does not cover them and checkout cannot route them, so the customer must remove them or change the address. Empty when every item ships. */
11405
11472
  unshippable_product_ids: number[];
11473
+ /** @description ISO country code of the delivery address when every carrier of the unshippable products leaves that country out, so the client can say the store does not deliver there. Null otherwise. */
11474
+ unserved_country: string | null;
11406
11475
  };
11407
11476
  /**
11408
11477
  * @description One carrier's share of the basket. Documentation only — never used to
@@ -11429,6 +11498,18 @@ interface components {
11429
11498
  /** Format: decimal */
11430
11499
  free_delivery_threshold: string | null;
11431
11500
  };
11501
+ /**
11502
+ * @description Where an old Shopify product URL's dish lives on ExploreSOUS.
11503
+ *
11504
+ * ``/partners/{brand_slug}/{slug}/p/{product_id}`` on the ExploreSOUS site.
11505
+ */
11506
+ ShopifyProductRoute: {
11507
+ brand_slug: string;
11508
+ slug: string;
11509
+ product_id: number;
11510
+ /** @description The dish's title in the request's language (``?lang=`` or ``Accept-Language``), with the product endpoint's fallback. */
11511
+ title: string;
11512
+ };
11432
11513
  /**
11433
11514
  * @description * `manual` - Manual
11434
11515
  * * `auto` - Auto-translated
@@ -26995,6 +27076,118 @@ interface operations {
26995
27076
  };
26996
27077
  };
26997
27078
  };
27079
+ discovery_shopify_products_retrieve: {
27080
+ parameters: {
27081
+ query?: never;
27082
+ header?: never;
27083
+ path: {
27084
+ handle: string;
27085
+ };
27086
+ cookie?: never;
27087
+ };
27088
+ requestBody?: never;
27089
+ responses: {
27090
+ 200: {
27091
+ headers: {
27092
+ [name: string]: unknown;
27093
+ };
27094
+ content: {
27095
+ "application/json": components["schemas"]["ShopifyProductRoute"];
27096
+ };
27097
+ };
27098
+ /** @description Possible error codes include `VALIDATION_ERROR`. Use `x-error-codes` for machine-readable retryability metadata. */
27099
+ 400: {
27100
+ headers: {
27101
+ [name: string]: unknown;
27102
+ };
27103
+ content: {
27104
+ "application/json": components["schemas"]["APIErrorEnvelope"];
27105
+ };
27106
+ };
27107
+ /** @description Possible error codes include `NOT_FOUND`. Use `x-error-codes` for machine-readable retryability metadata. */
27108
+ 404: {
27109
+ headers: {
27110
+ [name: string]: unknown;
27111
+ };
27112
+ content: {
27113
+ "application/json": components["schemas"]["APIErrorEnvelope"];
27114
+ };
27115
+ };
27116
+ /** @description Possible error codes include `RATE_LIMITED`. Use `x-error-codes` for machine-readable retryability metadata. */
27117
+ 429: {
27118
+ headers: {
27119
+ [name: string]: unknown;
27120
+ };
27121
+ content: {
27122
+ "application/json": components["schemas"]["APIErrorEnvelope"];
27123
+ };
27124
+ };
27125
+ /** @description Possible error codes include `INTERNAL_ERROR`. Use `x-error-codes` for machine-readable retryability metadata. */
27126
+ 500: {
27127
+ headers: {
27128
+ [name: string]: unknown;
27129
+ };
27130
+ content: {
27131
+ "application/json": components["schemas"]["APIErrorEnvelope"];
27132
+ };
27133
+ };
27134
+ };
27135
+ };
27136
+ discovery_store_routes_retrieve: {
27137
+ parameters: {
27138
+ query?: never;
27139
+ header?: never;
27140
+ path?: never;
27141
+ cookie?: never;
27142
+ };
27143
+ requestBody?: never;
27144
+ responses: {
27145
+ 200: {
27146
+ headers: {
27147
+ [name: string]: unknown;
27148
+ };
27149
+ content: {
27150
+ "application/json": components["schemas"]["DiscoveryStoreRoutes"];
27151
+ };
27152
+ };
27153
+ /** @description Possible error codes include `VALIDATION_ERROR`. Use `x-error-codes` for machine-readable retryability metadata. */
27154
+ 400: {
27155
+ headers: {
27156
+ [name: string]: unknown;
27157
+ };
27158
+ content: {
27159
+ "application/json": components["schemas"]["APIErrorEnvelope"];
27160
+ };
27161
+ };
27162
+ /** @description Possible error codes include `NOT_FOUND`. Use `x-error-codes` for machine-readable retryability metadata. */
27163
+ 404: {
27164
+ headers: {
27165
+ [name: string]: unknown;
27166
+ };
27167
+ content: {
27168
+ "application/json": components["schemas"]["APIErrorEnvelope"];
27169
+ };
27170
+ };
27171
+ /** @description Possible error codes include `RATE_LIMITED`. Use `x-error-codes` for machine-readable retryability metadata. */
27172
+ 429: {
27173
+ headers: {
27174
+ [name: string]: unknown;
27175
+ };
27176
+ content: {
27177
+ "application/json": components["schemas"]["APIErrorEnvelope"];
27178
+ };
27179
+ };
27180
+ /** @description Possible error codes include `INTERNAL_ERROR`. Use `x-error-codes` for machine-readable retryability metadata. */
27181
+ 500: {
27182
+ headers: {
27183
+ [name: string]: unknown;
27184
+ };
27185
+ content: {
27186
+ "application/json": components["schemas"]["APIErrorEnvelope"];
27187
+ };
27188
+ };
27189
+ };
27190
+ };
26998
27191
  discovery_stores_retrieve: {
26999
27192
  parameters: {
27000
27193
  query?: never;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@poweredbysous/storefront-all-sdk",
3
- "version": "4.9.0",
3
+ "version": "4.11.0",
4
4
  "description": "Type-safe TypeScript SDK for all SOUS Storefront Backend endpoints",
5
5
  "license": "UNLICENSED",
6
6
  "private": false,