@poweredbysous/storefront-all-sdk 4.2.0 → 4.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
@@ -3086,6 +3086,23 @@ interface paths {
3086
3086
  patch?: never;
3087
3087
  trace?: never;
3088
3088
  };
3089
+ "/api/v1/discovery/product-collections/": {
3090
+ parameters: {
3091
+ query?: never;
3092
+ header?: never;
3093
+ path?: never;
3094
+ cookie?: never;
3095
+ };
3096
+ /** @description List the active product collections in the reader's language. */
3097
+ get: operations["discovery_product_collections_list"];
3098
+ put?: never;
3099
+ post?: never;
3100
+ delete?: never;
3101
+ options?: never;
3102
+ head?: never;
3103
+ patch?: never;
3104
+ trace?: never;
3105
+ };
3089
3106
  "/api/v1/discovery/product-collections/{slug}/": {
3090
3107
  parameters: {
3091
3108
  query?: never;
@@ -3743,7 +3760,13 @@ interface paths {
3743
3760
  * @description Return the authenticated merchant's information.
3744
3761
  *
3745
3762
  * Uses the default StoreAuthentication and IsStore permission.
3746
- * Useful for testing merchant authentication.
3763
+ *
3764
+ * With ``?include=location`` the payload also carries the store's pickup
3765
+ * address and position, so the ExploreSOUS directory can pin it. That costs
3766
+ * a (cached) geocode, so it is opt-in: the store and product pages read this
3767
+ * endpoint without it and never pay for one. ``address`` is null without an
3768
+ * active pickup location; the coordinates are null when the address cannot
3769
+ * be placed.
3747
3770
  */
3748
3771
  get: operations["merchant_me_retrieve"];
3749
3772
  put?: never;
@@ -7863,18 +7886,26 @@ interface components {
7863
7886
  partial: boolean;
7864
7887
  };
7865
7888
  /**
7866
- * @description The address to answer for.
7889
+ * @description The address, or the position, to answer for.
7890
+ *
7891
+ * An address is ``postal_code`` and ``country``, with street and city
7892
+ * optional: most Dutch delivery areas resolve on postcode alone, and
7893
+ * demanding a house number to filter a listing page would ask for more
7894
+ * personal data than the answer needs.
7867
7895
  *
7868
- * ``postal_code`` and ``country`` are required and the rest is optional:
7869
- * most Dutch delivery areas resolve on postcode alone, and demanding a
7870
- * house number to filter a listing page would ask for more personal data
7871
- * than the answer needs.
7896
+ * A position (``latitude`` and ``longitude``, together) stands in for the
7897
+ * postcode when there is none. It is reverse-geocoded to a postcode and
7898
+ * country, which replace any ``country`` sent. A postcode, when sent, wins.
7872
7899
  */
7873
7900
  DeliverabilityRequest: {
7874
- postal_code: string;
7875
- country: string;
7901
+ postal_code?: string;
7902
+ country?: string;
7876
7903
  address_line_1?: string;
7877
7904
  city?: string;
7905
+ /** Format: double */
7906
+ latitude?: number;
7907
+ /** Format: double */
7908
+ longitude?: number;
7878
7909
  };
7879
7910
  /**
7880
7911
  * @description One area a merchant drew on a map.
@@ -8069,6 +8100,7 @@ interface components {
8069
8100
  michelin_stars: number | null;
8070
8101
  tags: string[];
8071
8102
  book_url: string;
8103
+ locations: components["schemas"]["DiscoveryPartnerLocation"][];
8072
8104
  };
8073
8105
  /**
8074
8106
  * @description The whole directory plus its filter vocabulary, in one read.
@@ -8080,6 +8112,14 @@ interface components {
8080
8112
  tags: components["schemas"]["DiscoveryTag"][];
8081
8113
  partners: components["schemas"]["DiscoveryPartner"][];
8082
8114
  };
8115
+ /** @description One of a partner's stores, placed for a map pin. */
8116
+ DiscoveryPartnerLocation: {
8117
+ public_id: string;
8118
+ /** Format: double */
8119
+ latitude: number | null;
8120
+ /** Format: double */
8121
+ longitude: number | null;
8122
+ };
8083
8123
  /** @description The stores ExploreSOUS serves, as ``X-Vendor-ID`` values. */
8084
8124
  DiscoveryStoreMembership: {
8085
8125
  store_ids: string[];
@@ -8604,6 +8644,14 @@ interface components {
8604
8644
  store_public_id: string;
8605
8645
  brand_slug: string;
8606
8646
  brand_name: string;
8647
+ store_name: string;
8648
+ /**
8649
+ * Format: double
8650
+ * @description The store's pickup location, for a map pin; null when it cannot be placed.
8651
+ */
8652
+ store_latitude: number | null;
8653
+ /** Format: double */
8654
+ store_longitude: number | null;
8607
8655
  name: string;
8608
8656
  description: string;
8609
8657
  price_cents: number;
@@ -10149,6 +10197,14 @@ interface components {
10149
10197
  name: string;
10150
10198
  description: string;
10151
10199
  };
10200
+ /** @description The active product collections, by slug, for the sitemap's URLs. */
10201
+ ProductCollectionList: {
10202
+ collections: components["schemas"]["ProductCollectionSummary"][];
10203
+ };
10204
+ /** @description One listed product collection: its slug, the URL the page lives at. */
10205
+ ProductCollectionSummary: {
10206
+ slug: string;
10207
+ };
10152
10208
  /** @description Resolve tags from ProductTranslation, falling back to Product.tags. */
10153
10209
  ProductDetail: {
10154
10210
  readonly id: number;
@@ -10190,6 +10246,7 @@ interface components {
10190
10246
  readonly modifier_groups: components["schemas"]["ProductModifierGroup"][];
10191
10247
  readonly attribute_values: components["schemas"]["ProductAttributeValue"][];
10192
10248
  readonly net_quantity: string | null;
10249
+ readonly unit_price: components["schemas"]["UnitPrice"] | null;
10193
10250
  readonly images: components["schemas"]["ProductImage"][];
10194
10251
  readonly surcharges: components["schemas"]["Surcharge"][];
10195
10252
  readonly metadata: {
@@ -11055,11 +11112,23 @@ interface components {
11055
11112
  store_public_id: string;
11056
11113
  methods: components["schemas"]["DeliveryMethodState"][];
11057
11114
  };
11115
+ StoreMeAddress: {
11116
+ address_1: string;
11117
+ address_2: string;
11118
+ city: string;
11119
+ postal_code: string;
11120
+ country: string;
11121
+ };
11058
11122
  StoreMeResponse: {
11059
11123
  id: number;
11060
11124
  public_id: string;
11061
11125
  name: string;
11062
11126
  currency: string;
11127
+ address?: components["schemas"]["StoreMeAddress"] | null;
11128
+ /** Format: double */
11129
+ latitude?: number | null;
11130
+ /** Format: double */
11131
+ longitude?: number | null;
11063
11132
  };
11064
11133
  /**
11065
11134
  * @description Read/write serializer for the store-onboarding wizard.
@@ -25826,6 +25895,61 @@ interface operations {
25826
25895
  };
25827
25896
  };
25828
25897
  };
25898
+ discovery_product_collections_list: {
25899
+ parameters: {
25900
+ query?: never;
25901
+ header?: never;
25902
+ path?: never;
25903
+ cookie?: never;
25904
+ };
25905
+ requestBody?: never;
25906
+ responses: {
25907
+ 200: {
25908
+ headers: {
25909
+ [name: string]: unknown;
25910
+ };
25911
+ content: {
25912
+ "application/json": components["schemas"]["ProductCollectionList"];
25913
+ };
25914
+ };
25915
+ /** @description Possible error codes include `VALIDATION_ERROR`. Use `x-error-codes` for machine-readable retryability metadata. */
25916
+ 400: {
25917
+ headers: {
25918
+ [name: string]: unknown;
25919
+ };
25920
+ content: {
25921
+ "application/json": components["schemas"]["APIErrorEnvelope"];
25922
+ };
25923
+ };
25924
+ /** @description Possible error codes include `NOT_FOUND`. Use `x-error-codes` for machine-readable retryability metadata. */
25925
+ 404: {
25926
+ headers: {
25927
+ [name: string]: unknown;
25928
+ };
25929
+ content: {
25930
+ "application/json": components["schemas"]["APIErrorEnvelope"];
25931
+ };
25932
+ };
25933
+ /** @description Possible error codes include `RATE_LIMITED`. Use `x-error-codes` for machine-readable retryability metadata. */
25934
+ 429: {
25935
+ headers: {
25936
+ [name: string]: unknown;
25937
+ };
25938
+ content: {
25939
+ "application/json": components["schemas"]["APIErrorEnvelope"];
25940
+ };
25941
+ };
25942
+ /** @description Possible error codes include `INTERNAL_ERROR`. Use `x-error-codes` for machine-readable retryability metadata. */
25943
+ 500: {
25944
+ headers: {
25945
+ [name: string]: unknown;
25946
+ };
25947
+ content: {
25948
+ "application/json": components["schemas"]["APIErrorEnvelope"];
25949
+ };
25950
+ };
25951
+ };
25952
+ };
25829
25953
  discovery_product_collections_retrieve: {
25830
25954
  parameters: {
25831
25955
  query?: {
@@ -28938,7 +29062,10 @@ interface operations {
28938
29062
  };
28939
29063
  merchant_me_retrieve: {
28940
29064
  parameters: {
28941
- query?: never;
29065
+ query?: {
29066
+ /** @description `location` adds `address`, `latitude` and `longitude`. Omit it and those keys are absent and nothing is geocoded. */
29067
+ include?: "location";
29068
+ };
28942
29069
  header?: never;
28943
29070
  path?: never;
28944
29071
  cookie?: never;
package/dist/index.d.ts CHANGED
@@ -3086,6 +3086,23 @@ interface paths {
3086
3086
  patch?: never;
3087
3087
  trace?: never;
3088
3088
  };
3089
+ "/api/v1/discovery/product-collections/": {
3090
+ parameters: {
3091
+ query?: never;
3092
+ header?: never;
3093
+ path?: never;
3094
+ cookie?: never;
3095
+ };
3096
+ /** @description List the active product collections in the reader's language. */
3097
+ get: operations["discovery_product_collections_list"];
3098
+ put?: never;
3099
+ post?: never;
3100
+ delete?: never;
3101
+ options?: never;
3102
+ head?: never;
3103
+ patch?: never;
3104
+ trace?: never;
3105
+ };
3089
3106
  "/api/v1/discovery/product-collections/{slug}/": {
3090
3107
  parameters: {
3091
3108
  query?: never;
@@ -3743,7 +3760,13 @@ interface paths {
3743
3760
  * @description Return the authenticated merchant's information.
3744
3761
  *
3745
3762
  * Uses the default StoreAuthentication and IsStore permission.
3746
- * Useful for testing merchant authentication.
3763
+ *
3764
+ * With ``?include=location`` the payload also carries the store's pickup
3765
+ * address and position, so the ExploreSOUS directory can pin it. That costs
3766
+ * a (cached) geocode, so it is opt-in: the store and product pages read this
3767
+ * endpoint without it and never pay for one. ``address`` is null without an
3768
+ * active pickup location; the coordinates are null when the address cannot
3769
+ * be placed.
3747
3770
  */
3748
3771
  get: operations["merchant_me_retrieve"];
3749
3772
  put?: never;
@@ -7863,18 +7886,26 @@ interface components {
7863
7886
  partial: boolean;
7864
7887
  };
7865
7888
  /**
7866
- * @description The address to answer for.
7889
+ * @description The address, or the position, to answer for.
7890
+ *
7891
+ * An address is ``postal_code`` and ``country``, with street and city
7892
+ * optional: most Dutch delivery areas resolve on postcode alone, and
7893
+ * demanding a house number to filter a listing page would ask for more
7894
+ * personal data than the answer needs.
7867
7895
  *
7868
- * ``postal_code`` and ``country`` are required and the rest is optional:
7869
- * most Dutch delivery areas resolve on postcode alone, and demanding a
7870
- * house number to filter a listing page would ask for more personal data
7871
- * than the answer needs.
7896
+ * A position (``latitude`` and ``longitude``, together) stands in for the
7897
+ * postcode when there is none. It is reverse-geocoded to a postcode and
7898
+ * country, which replace any ``country`` sent. A postcode, when sent, wins.
7872
7899
  */
7873
7900
  DeliverabilityRequest: {
7874
- postal_code: string;
7875
- country: string;
7901
+ postal_code?: string;
7902
+ country?: string;
7876
7903
  address_line_1?: string;
7877
7904
  city?: string;
7905
+ /** Format: double */
7906
+ latitude?: number;
7907
+ /** Format: double */
7908
+ longitude?: number;
7878
7909
  };
7879
7910
  /**
7880
7911
  * @description One area a merchant drew on a map.
@@ -8069,6 +8100,7 @@ interface components {
8069
8100
  michelin_stars: number | null;
8070
8101
  tags: string[];
8071
8102
  book_url: string;
8103
+ locations: components["schemas"]["DiscoveryPartnerLocation"][];
8072
8104
  };
8073
8105
  /**
8074
8106
  * @description The whole directory plus its filter vocabulary, in one read.
@@ -8080,6 +8112,14 @@ interface components {
8080
8112
  tags: components["schemas"]["DiscoveryTag"][];
8081
8113
  partners: components["schemas"]["DiscoveryPartner"][];
8082
8114
  };
8115
+ /** @description One of a partner's stores, placed for a map pin. */
8116
+ DiscoveryPartnerLocation: {
8117
+ public_id: string;
8118
+ /** Format: double */
8119
+ latitude: number | null;
8120
+ /** Format: double */
8121
+ longitude: number | null;
8122
+ };
8083
8123
  /** @description The stores ExploreSOUS serves, as ``X-Vendor-ID`` values. */
8084
8124
  DiscoveryStoreMembership: {
8085
8125
  store_ids: string[];
@@ -8604,6 +8644,14 @@ interface components {
8604
8644
  store_public_id: string;
8605
8645
  brand_slug: string;
8606
8646
  brand_name: string;
8647
+ store_name: string;
8648
+ /**
8649
+ * Format: double
8650
+ * @description The store's pickup location, for a map pin; null when it cannot be placed.
8651
+ */
8652
+ store_latitude: number | null;
8653
+ /** Format: double */
8654
+ store_longitude: number | null;
8607
8655
  name: string;
8608
8656
  description: string;
8609
8657
  price_cents: number;
@@ -10149,6 +10197,14 @@ interface components {
10149
10197
  name: string;
10150
10198
  description: string;
10151
10199
  };
10200
+ /** @description The active product collections, by slug, for the sitemap's URLs. */
10201
+ ProductCollectionList: {
10202
+ collections: components["schemas"]["ProductCollectionSummary"][];
10203
+ };
10204
+ /** @description One listed product collection: its slug, the URL the page lives at. */
10205
+ ProductCollectionSummary: {
10206
+ slug: string;
10207
+ };
10152
10208
  /** @description Resolve tags from ProductTranslation, falling back to Product.tags. */
10153
10209
  ProductDetail: {
10154
10210
  readonly id: number;
@@ -10190,6 +10246,7 @@ interface components {
10190
10246
  readonly modifier_groups: components["schemas"]["ProductModifierGroup"][];
10191
10247
  readonly attribute_values: components["schemas"]["ProductAttributeValue"][];
10192
10248
  readonly net_quantity: string | null;
10249
+ readonly unit_price: components["schemas"]["UnitPrice"] | null;
10193
10250
  readonly images: components["schemas"]["ProductImage"][];
10194
10251
  readonly surcharges: components["schemas"]["Surcharge"][];
10195
10252
  readonly metadata: {
@@ -11055,11 +11112,23 @@ interface components {
11055
11112
  store_public_id: string;
11056
11113
  methods: components["schemas"]["DeliveryMethodState"][];
11057
11114
  };
11115
+ StoreMeAddress: {
11116
+ address_1: string;
11117
+ address_2: string;
11118
+ city: string;
11119
+ postal_code: string;
11120
+ country: string;
11121
+ };
11058
11122
  StoreMeResponse: {
11059
11123
  id: number;
11060
11124
  public_id: string;
11061
11125
  name: string;
11062
11126
  currency: string;
11127
+ address?: components["schemas"]["StoreMeAddress"] | null;
11128
+ /** Format: double */
11129
+ latitude?: number | null;
11130
+ /** Format: double */
11131
+ longitude?: number | null;
11063
11132
  };
11064
11133
  /**
11065
11134
  * @description Read/write serializer for the store-onboarding wizard.
@@ -25826,6 +25895,61 @@ interface operations {
25826
25895
  };
25827
25896
  };
25828
25897
  };
25898
+ discovery_product_collections_list: {
25899
+ parameters: {
25900
+ query?: never;
25901
+ header?: never;
25902
+ path?: never;
25903
+ cookie?: never;
25904
+ };
25905
+ requestBody?: never;
25906
+ responses: {
25907
+ 200: {
25908
+ headers: {
25909
+ [name: string]: unknown;
25910
+ };
25911
+ content: {
25912
+ "application/json": components["schemas"]["ProductCollectionList"];
25913
+ };
25914
+ };
25915
+ /** @description Possible error codes include `VALIDATION_ERROR`. Use `x-error-codes` for machine-readable retryability metadata. */
25916
+ 400: {
25917
+ headers: {
25918
+ [name: string]: unknown;
25919
+ };
25920
+ content: {
25921
+ "application/json": components["schemas"]["APIErrorEnvelope"];
25922
+ };
25923
+ };
25924
+ /** @description Possible error codes include `NOT_FOUND`. Use `x-error-codes` for machine-readable retryability metadata. */
25925
+ 404: {
25926
+ headers: {
25927
+ [name: string]: unknown;
25928
+ };
25929
+ content: {
25930
+ "application/json": components["schemas"]["APIErrorEnvelope"];
25931
+ };
25932
+ };
25933
+ /** @description Possible error codes include `RATE_LIMITED`. Use `x-error-codes` for machine-readable retryability metadata. */
25934
+ 429: {
25935
+ headers: {
25936
+ [name: string]: unknown;
25937
+ };
25938
+ content: {
25939
+ "application/json": components["schemas"]["APIErrorEnvelope"];
25940
+ };
25941
+ };
25942
+ /** @description Possible error codes include `INTERNAL_ERROR`. Use `x-error-codes` for machine-readable retryability metadata. */
25943
+ 500: {
25944
+ headers: {
25945
+ [name: string]: unknown;
25946
+ };
25947
+ content: {
25948
+ "application/json": components["schemas"]["APIErrorEnvelope"];
25949
+ };
25950
+ };
25951
+ };
25952
+ };
25829
25953
  discovery_product_collections_retrieve: {
25830
25954
  parameters: {
25831
25955
  query?: {
@@ -28938,7 +29062,10 @@ interface operations {
28938
29062
  };
28939
29063
  merchant_me_retrieve: {
28940
29064
  parameters: {
28941
- query?: never;
29065
+ query?: {
29066
+ /** @description `location` adds `address`, `latitude` and `longitude`. Omit it and those keys are absent and nothing is geocoded. */
29067
+ include?: "location";
29068
+ };
28942
29069
  header?: never;
28943
29070
  path?: never;
28944
29071
  cookie?: never;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@poweredbysous/storefront-all-sdk",
3
- "version": "4.2.0",
3
+ "version": "4.4.0",
4
4
  "description": "Type-safe TypeScript SDK for all SOUS Storefront Backend endpoints",
5
5
  "license": "UNLICENSED",
6
6
  "private": false,