@asstio-dev/storefront 0.14.0 → 0.15.1

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/schema.d.ts CHANGED
@@ -102,6 +102,22 @@ export interface paths {
102
102
  patch?: never;
103
103
  trace?: never;
104
104
  };
105
+ "/v1/cart/shipping-estimate": {
106
+ parameters: {
107
+ query?: never;
108
+ header?: never;
109
+ path?: never;
110
+ cookie?: never;
111
+ };
112
+ get: operations["GetShippingEstimate"];
113
+ put?: never;
114
+ post?: never;
115
+ delete?: never;
116
+ options?: never;
117
+ head?: never;
118
+ patch?: never;
119
+ trace?: never;
120
+ };
105
121
  "/v1/categories": {
106
122
  parameters: {
107
123
  query?: never;
@@ -624,6 +640,14 @@ export interface components {
624
640
  /** Format: int32 */
625
641
  min: number;
626
642
  };
643
+ DeliveryTimeDto: {
644
+ /** Format: int32 */
645
+ maxDays: number | null | string;
646
+ /** Format: int32 */
647
+ minDays: number | null | string;
648
+ mode: string;
649
+ text: null | string;
650
+ };
627
651
  DescriptionDto: {
628
652
  html: string;
629
653
  text: string;
@@ -662,6 +686,11 @@ export interface components {
662
686
  facet: string;
663
687
  values: components["schemas"]["FacetValueDto"][];
664
688
  };
689
+ FreeShippingDto: {
690
+ free: boolean;
691
+ remaining: null | string;
692
+ threshold: null | string;
693
+ };
665
694
  /** @enum {unknown} */
666
695
  LineAvailability: "backorder" | "inStock";
667
696
  ListingResponse: {
@@ -791,6 +820,7 @@ export interface components {
791
820
  placedAt: string;
792
821
  promisedDelivery: null | components["schemas"]["DeliveryRangeDto"];
793
822
  reference: string;
823
+ shipping: null | components["schemas"]["OrderShippingDto"];
794
824
  status: components["schemas"]["OrderStatusDto"];
795
825
  test: boolean;
796
826
  totals: components["schemas"]["OrderTotalsDto"];
@@ -812,6 +842,21 @@ export interface components {
812
842
  variantId: null | string;
813
843
  vatRate: string;
814
844
  };
845
+ OrderShippingDto: {
846
+ carrier: string;
847
+ deliveryTime: null | components["schemas"]["DeliveryTimeDto"];
848
+ deliveryType: string;
849
+ fee: string;
850
+ name: string;
851
+ option: string;
852
+ point: null | components["schemas"]["OrderShippingPointDto"];
853
+ };
854
+ OrderShippingPointDto: {
855
+ city: null | string;
856
+ name: string;
857
+ postalCode: null | string;
858
+ street: null | string;
859
+ };
815
860
  OrderStatusDto: {
816
861
  fulfilment: string;
817
862
  order: string;
@@ -924,6 +969,27 @@ export interface components {
924
969
  SetCartMarketRequest: {
925
970
  market: string;
926
971
  };
972
+ ShippingEstimateDto: {
973
+ available: boolean;
974
+ freeShipping: null | components["schemas"]["FreeShippingDto"];
975
+ options: components["schemas"]["ShippingEstimateOptionDto"][];
976
+ reason: null | string;
977
+ };
978
+ ShippingEstimateOptionDto: {
979
+ deliveryType: string;
980
+ fee: string;
981
+ key: string;
982
+ labels: components["schemas"]["ShippingLabelDto"][];
983
+ name: string;
984
+ pointsAtCheckout: boolean;
985
+ preselected: boolean;
986
+ regularFee: null | string;
987
+ };
988
+ ShippingLabelDto: {
989
+ color: string;
990
+ icon: null | string;
991
+ name: string;
992
+ };
927
993
  SiteDto: {
928
994
  code: string;
929
995
  configVersion: string;
@@ -1859,6 +1925,98 @@ export interface operations {
1859
1925
  };
1860
1926
  };
1861
1927
  };
1928
+ GetShippingEstimate: {
1929
+ parameters: {
1930
+ query?: never;
1931
+ header: {
1932
+ /** @description Publishable, preview or secret site key. Required on every request; secret keys are server-side only. */
1933
+ "X-Site-Key": string;
1934
+ /** @description Market code (e.g. "se"). Omit for the site's default market. */
1935
+ "X-Market"?: string;
1936
+ /** @description BCP-47 language tag. Omit to use the market's language. */
1937
+ "Accept-Language"?: string;
1938
+ /** @description The bearer token returned by POST /v1/cart. Identifies which cart this request reads or mutates. */
1939
+ "X-Cart-Token": string;
1940
+ };
1941
+ path?: never;
1942
+ cookie?: never;
1943
+ };
1944
+ requestBody?: never;
1945
+ responses: {
1946
+ /** @description OK */
1947
+ 200: {
1948
+ headers: {
1949
+ [name: string]: unknown;
1950
+ };
1951
+ content: {
1952
+ "application/json": components["schemas"]["ShippingEstimateDto"];
1953
+ };
1954
+ };
1955
+ /** @description problem+json. NOT_FOUND (X-Cart-Token missing). */
1956
+ 400: {
1957
+ headers: {
1958
+ [name: string]: unknown;
1959
+ };
1960
+ content: {
1961
+ "application/problem+json": components["schemas"]["StorefrontProblem"];
1962
+ };
1963
+ };
1964
+ /** @description problem+json. SITE_KEY_MISSING or SITE_KEY_INVALID. */
1965
+ 401: {
1966
+ headers: {
1967
+ [name: string]: unknown;
1968
+ };
1969
+ content: {
1970
+ "application/problem+json": components["schemas"]["StorefrontProblem"];
1971
+ };
1972
+ };
1973
+ /** @description problem+json. SECRET_KEY_FROM_BROWSER: a secret key was sent from a browser. */
1974
+ 403: {
1975
+ headers: {
1976
+ [name: string]: unknown;
1977
+ };
1978
+ content: {
1979
+ "application/problem+json": components["schemas"]["StorefrontProblem"];
1980
+ };
1981
+ };
1982
+ /** @description problem+json. SITE_INACTIVE, or NOT_FOUND for an unrouted path. */
1983
+ 404: {
1984
+ headers: {
1985
+ [name: string]: unknown;
1986
+ };
1987
+ content: {
1988
+ "application/problem+json": components["schemas"]["StorefrontProblem"];
1989
+ };
1990
+ };
1991
+ /** @description problem+json. CART_EXPIRED: this cart token belongs to an expired cart. */
1992
+ 410: {
1993
+ headers: {
1994
+ [name: string]: unknown;
1995
+ };
1996
+ content: {
1997
+ "application/problem+json": components["schemas"]["StorefrontProblem"];
1998
+ };
1999
+ };
2000
+ /** @description problem+json. RATE_LIMITED; retryAfterSeconds and the Retry-After header say how long to wait. */
2001
+ 429: {
2002
+ headers: {
2003
+ [name: string]: unknown;
2004
+ };
2005
+ content: {
2006
+ "application/problem+json": components["schemas"]["StorefrontProblem"];
2007
+ };
2008
+ };
2009
+ /** @description problem+json. SITE_REGISTRY_WARMING or INDEX_UNAVAILABLE — retry, the request was not wrong. */
2010
+ 503: {
2011
+ headers: {
2012
+ [name: string]: unknown;
2013
+ };
2014
+ content: {
2015
+ "application/problem+json": components["schemas"]["StorefrontProblem"];
2016
+ };
2017
+ };
2018
+ };
2019
+ };
1862
2020
  GetCategories: {
1863
2021
  parameters: {
1864
2022
  query?: never;
@@ -2043,7 +2201,7 @@ export interface operations {
2043
2201
  "application/problem+json": components["schemas"]["StorefrontProblem"];
2044
2202
  };
2045
2203
  };
2046
- /** @description problem+json. CHECKOUT_UNAVAILABLE or CHECKOUT_PROVIDER_UNAVAILABLE (Retry-After); SITE_REGISTRY_WARMING. */
2204
+ /** @description problem+json. CHECKOUT_UNAVAILABLE, SHIPPING_UNAVAILABLE (the market's shipping configuration cannot be served) or CHECKOUT_PROVIDER_UNAVAILABLE (Retry-After); SITE_REGISTRY_WARMING. */
2047
2205
  503: {
2048
2206
  headers: {
2049
2207
  [name: string]: unknown;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@asstio-dev/storefront",
3
- "version": "0.14.0",
3
+ "version": "0.15.1",
4
4
  "description": "Typed client for the Asstio Storefront API (generated from OpenAPI).",
5
5
  "repository": {
6
6
  "type": "git",
package/src/schema.d.ts CHANGED
@@ -102,6 +102,22 @@ export interface paths {
102
102
  patch?: never;
103
103
  trace?: never;
104
104
  };
105
+ "/v1/cart/shipping-estimate": {
106
+ parameters: {
107
+ query?: never;
108
+ header?: never;
109
+ path?: never;
110
+ cookie?: never;
111
+ };
112
+ get: operations["GetShippingEstimate"];
113
+ put?: never;
114
+ post?: never;
115
+ delete?: never;
116
+ options?: never;
117
+ head?: never;
118
+ patch?: never;
119
+ trace?: never;
120
+ };
105
121
  "/v1/categories": {
106
122
  parameters: {
107
123
  query?: never;
@@ -624,6 +640,14 @@ export interface components {
624
640
  /** Format: int32 */
625
641
  min: number;
626
642
  };
643
+ DeliveryTimeDto: {
644
+ /** Format: int32 */
645
+ maxDays: number | null | string;
646
+ /** Format: int32 */
647
+ minDays: number | null | string;
648
+ mode: string;
649
+ text: null | string;
650
+ };
627
651
  DescriptionDto: {
628
652
  html: string;
629
653
  text: string;
@@ -662,6 +686,11 @@ export interface components {
662
686
  facet: string;
663
687
  values: components["schemas"]["FacetValueDto"][];
664
688
  };
689
+ FreeShippingDto: {
690
+ free: boolean;
691
+ remaining: null | string;
692
+ threshold: null | string;
693
+ };
665
694
  /** @enum {unknown} */
666
695
  LineAvailability: "backorder" | "inStock";
667
696
  ListingResponse: {
@@ -791,6 +820,7 @@ export interface components {
791
820
  placedAt: string;
792
821
  promisedDelivery: null | components["schemas"]["DeliveryRangeDto"];
793
822
  reference: string;
823
+ shipping: null | components["schemas"]["OrderShippingDto"];
794
824
  status: components["schemas"]["OrderStatusDto"];
795
825
  test: boolean;
796
826
  totals: components["schemas"]["OrderTotalsDto"];
@@ -812,6 +842,21 @@ export interface components {
812
842
  variantId: null | string;
813
843
  vatRate: string;
814
844
  };
845
+ OrderShippingDto: {
846
+ carrier: string;
847
+ deliveryTime: null | components["schemas"]["DeliveryTimeDto"];
848
+ deliveryType: string;
849
+ fee: string;
850
+ name: string;
851
+ option: string;
852
+ point: null | components["schemas"]["OrderShippingPointDto"];
853
+ };
854
+ OrderShippingPointDto: {
855
+ city: null | string;
856
+ name: string;
857
+ postalCode: null | string;
858
+ street: null | string;
859
+ };
815
860
  OrderStatusDto: {
816
861
  fulfilment: string;
817
862
  order: string;
@@ -924,6 +969,27 @@ export interface components {
924
969
  SetCartMarketRequest: {
925
970
  market: string;
926
971
  };
972
+ ShippingEstimateDto: {
973
+ available: boolean;
974
+ freeShipping: null | components["schemas"]["FreeShippingDto"];
975
+ options: components["schemas"]["ShippingEstimateOptionDto"][];
976
+ reason: null | string;
977
+ };
978
+ ShippingEstimateOptionDto: {
979
+ deliveryType: string;
980
+ fee: string;
981
+ key: string;
982
+ labels: components["schemas"]["ShippingLabelDto"][];
983
+ name: string;
984
+ pointsAtCheckout: boolean;
985
+ preselected: boolean;
986
+ regularFee: null | string;
987
+ };
988
+ ShippingLabelDto: {
989
+ color: string;
990
+ icon: null | string;
991
+ name: string;
992
+ };
927
993
  SiteDto: {
928
994
  code: string;
929
995
  configVersion: string;
@@ -1859,6 +1925,98 @@ export interface operations {
1859
1925
  };
1860
1926
  };
1861
1927
  };
1928
+ GetShippingEstimate: {
1929
+ parameters: {
1930
+ query?: never;
1931
+ header: {
1932
+ /** @description Publishable, preview or secret site key. Required on every request; secret keys are server-side only. */
1933
+ "X-Site-Key": string;
1934
+ /** @description Market code (e.g. "se"). Omit for the site's default market. */
1935
+ "X-Market"?: string;
1936
+ /** @description BCP-47 language tag. Omit to use the market's language. */
1937
+ "Accept-Language"?: string;
1938
+ /** @description The bearer token returned by POST /v1/cart. Identifies which cart this request reads or mutates. */
1939
+ "X-Cart-Token": string;
1940
+ };
1941
+ path?: never;
1942
+ cookie?: never;
1943
+ };
1944
+ requestBody?: never;
1945
+ responses: {
1946
+ /** @description OK */
1947
+ 200: {
1948
+ headers: {
1949
+ [name: string]: unknown;
1950
+ };
1951
+ content: {
1952
+ "application/json": components["schemas"]["ShippingEstimateDto"];
1953
+ };
1954
+ };
1955
+ /** @description problem+json. NOT_FOUND (X-Cart-Token missing). */
1956
+ 400: {
1957
+ headers: {
1958
+ [name: string]: unknown;
1959
+ };
1960
+ content: {
1961
+ "application/problem+json": components["schemas"]["StorefrontProblem"];
1962
+ };
1963
+ };
1964
+ /** @description problem+json. SITE_KEY_MISSING or SITE_KEY_INVALID. */
1965
+ 401: {
1966
+ headers: {
1967
+ [name: string]: unknown;
1968
+ };
1969
+ content: {
1970
+ "application/problem+json": components["schemas"]["StorefrontProblem"];
1971
+ };
1972
+ };
1973
+ /** @description problem+json. SECRET_KEY_FROM_BROWSER: a secret key was sent from a browser. */
1974
+ 403: {
1975
+ headers: {
1976
+ [name: string]: unknown;
1977
+ };
1978
+ content: {
1979
+ "application/problem+json": components["schemas"]["StorefrontProblem"];
1980
+ };
1981
+ };
1982
+ /** @description problem+json. SITE_INACTIVE, or NOT_FOUND for an unrouted path. */
1983
+ 404: {
1984
+ headers: {
1985
+ [name: string]: unknown;
1986
+ };
1987
+ content: {
1988
+ "application/problem+json": components["schemas"]["StorefrontProblem"];
1989
+ };
1990
+ };
1991
+ /** @description problem+json. CART_EXPIRED: this cart token belongs to an expired cart. */
1992
+ 410: {
1993
+ headers: {
1994
+ [name: string]: unknown;
1995
+ };
1996
+ content: {
1997
+ "application/problem+json": components["schemas"]["StorefrontProblem"];
1998
+ };
1999
+ };
2000
+ /** @description problem+json. RATE_LIMITED; retryAfterSeconds and the Retry-After header say how long to wait. */
2001
+ 429: {
2002
+ headers: {
2003
+ [name: string]: unknown;
2004
+ };
2005
+ content: {
2006
+ "application/problem+json": components["schemas"]["StorefrontProblem"];
2007
+ };
2008
+ };
2009
+ /** @description problem+json. SITE_REGISTRY_WARMING or INDEX_UNAVAILABLE — retry, the request was not wrong. */
2010
+ 503: {
2011
+ headers: {
2012
+ [name: string]: unknown;
2013
+ };
2014
+ content: {
2015
+ "application/problem+json": components["schemas"]["StorefrontProblem"];
2016
+ };
2017
+ };
2018
+ };
2019
+ };
1862
2020
  GetCategories: {
1863
2021
  parameters: {
1864
2022
  query?: never;
@@ -2043,7 +2201,7 @@ export interface operations {
2043
2201
  "application/problem+json": components["schemas"]["StorefrontProblem"];
2044
2202
  };
2045
2203
  };
2046
- /** @description problem+json. CHECKOUT_UNAVAILABLE or CHECKOUT_PROVIDER_UNAVAILABLE (Retry-After); SITE_REGISTRY_WARMING. */
2204
+ /** @description problem+json. CHECKOUT_UNAVAILABLE, SHIPPING_UNAVAILABLE (the market's shipping configuration cannot be served) or CHECKOUT_PROVIDER_UNAVAILABLE (Retry-After); SITE_REGISTRY_WARMING. */
2047
2205
  503: {
2048
2206
  headers: {
2049
2207
  [name: string]: unknown;