@jetshop/core 5.13.0 → 5.13.3-beta.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) hide show
  1. package/ChannelHandler/ChannelHandler.d.ts +2 -0
  2. package/ChannelHandler/ChannelHandler.js +9 -3
  3. package/ChannelHandler/ChannelHandler.js.map +1 -1
  4. package/ChannelHandler/PreserveRedirectRouteQuery.gql +1 -1
  5. package/ChannelHandler/channelUtils.d.ts +4 -0
  6. package/ChannelHandler/channelUtils.js +113 -7
  7. package/ChannelHandler/channelUtils.js.map +1 -1
  8. package/ChannelHandler/redirectUtils.test.js +24 -48
  9. package/ChannelHandler/redirectUtilsGroupedChannels.test.js +732 -0
  10. package/analytics/Analytics.js +4 -1
  11. package/analytics/Analytics.js.map +1 -1
  12. package/analytics/AnalyticsProvider.js +1 -1
  13. package/analytics/AnalyticsProvider.js.map +1 -1
  14. package/analytics/integrations/ga4.js +61 -62
  15. package/analytics/integrations/ga4.js.map +1 -1
  16. package/analytics/integrations/unslugify.js +0 -2
  17. package/analytics/integrations/unslugify.js.map +1 -1
  18. package/analytics/trackerRegistry.js +3 -4
  19. package/analytics/trackerRegistry.js.map +1 -1
  20. package/components/AuthContext/AuthProvider.js +2 -2
  21. package/components/AuthContext/AuthProvider.js.map +1 -1
  22. package/components/AuthContext/AuthProvider.test.js +2 -2
  23. package/components/ChannelContext/ChannelContext.d.ts +1 -0
  24. package/components/ChannelContext/ChannelContext.js.map +1 -1
  25. package/components/ChannelContext/ChannelProvider.js +4 -2
  26. package/components/ChannelContext/ChannelProvider.js.map +1 -1
  27. package/components/ChannelContext/useCountrySettings.js +2 -2
  28. package/components/ChannelContext/useCountrySettings.js.map +1 -1
  29. package/components/ConfigProvider.d.ts +0 -1
  30. package/components/ConfigProvider.js.map +1 -1
  31. package/components/Head.js +9 -4
  32. package/components/Head.js.map +1 -1
  33. package/components/Notifications/useNotification.d.ts +1 -1
  34. package/components/Notifications/useNotification.js.map +1 -1
  35. package/components/OpenGraph/OpenGraph.test.js +2 -2
  36. package/components/OpenGraph/OpenGraphGeneralPageData.js +6 -6
  37. package/components/OpenGraph/OpenGraphGeneralPageData.js.map +1 -1
  38. package/components/OpenGraph/OpenGraphProductData.js +1 -1
  39. package/components/OpenGraph/OpenGraphProductData.js.map +1 -1
  40. package/components/Pagination/PaginationProvider.test.js +29 -29
  41. package/components/SortOrder/SortOrderContainer.js +1 -1
  42. package/components/SortOrder/SortOrderContainer.js.map +1 -1
  43. package/data/fragments/ChannelsFragment.gql +1 -0
  44. package/experiments/ExperimentsProvider.test.js +12 -12
  45. package/experiments/integration.test.js +6 -6
  46. package/experiments/useExperiment.test.js +10 -10
  47. package/hooks/Channels/useChannelSettings.js +1 -1
  48. package/hooks/Channels/useChannelSettings.js.map +1 -1
  49. package/hooks/Channels/useChannelSettings.test.js +1 -1
  50. package/hooks/ProductList/list-transforms.d.ts +1 -0
  51. package/hooks/usePrice.test.js +2 -2
  52. package/hooks/useShopConfig.d.ts +1 -1
  53. package/hooks/useShopConfig.js +1 -1
  54. package/hooks/useShopConfig.js.map +1 -1
  55. package/package.json +2 -2
  56. package/resolvers/filters/updateQueryString.d.ts +1 -1
  57. package/resolvers/filters/updateQueryString.js +4 -2
  58. package/resolvers/filters/updateQueryString.js.map +1 -1
  59. package/test-utils/ProviderPyramid.js +4 -4
  60. package/test-utils/variables.js +1234 -0
  61. package/types.d.ts +78 -4
package/types.d.ts CHANGED
@@ -231,6 +231,11 @@ export type Category = Document & {
231
231
  * product.primaryRoute will have to be used.
232
232
  */
233
233
  isDynamic: Scalars['Boolean'];
234
+ /**
235
+ * The category's dynamic filtersNB: Carries a performance cost, as asking for
236
+ * this will result in a separate API call in the backend.
237
+ */
238
+ dynamicFiltering?: Maybe<Array<Maybe<CategoryDynamicFilter>>>;
234
239
  /**
235
240
  * Get content data set via the Content Editor.NB: Carries a performance cost, as
236
241
  * asking for this will result in a separate API call in the backend.
@@ -258,6 +263,14 @@ export type CategoryAutoCompleteResult = {
258
263
  result?: Maybe<Array<Maybe<Category>>>;
259
264
  };
260
265
 
266
+ export type CategoryDynamicFilter = {
267
+ __typename?: 'CategoryDynamicFilter';
268
+ type?: Maybe<Scalars['String']>;
269
+ value?: Maybe<CategoryDynamicFilterValue>;
270
+ };
271
+
272
+ export type CategoryDynamicFilterValue = StringValue | ListStringValue | BoolValue;
273
+
261
274
  export type CategoryImage = {
262
275
  __typename?: 'CategoryImage';
263
276
  width?: Maybe<Scalars['Int']>;
@@ -646,8 +659,8 @@ export type CustomerUpdateDeliveryAddressInput = {
646
659
  };
647
660
 
648
661
  export type CustomerUpdateExternalAttribute = {
649
- name?: Maybe<Scalars['String']>;
650
- value?: Maybe<Scalars['String']>;
662
+ name: Scalars['String'];
663
+ value: Scalars['String'];
651
664
  };
652
665
 
653
666
  export type CustomerUpdateInput = {
@@ -894,6 +907,11 @@ export type ListFilterItem = {
894
907
  isActive?: Maybe<Scalars['Boolean']>;
895
908
  };
896
909
 
910
+ export type ListStringValue = {
911
+ __typename?: 'ListStringValue';
912
+ value?: Maybe<Array<Maybe<Scalars['String']>>>;
913
+ };
914
+
897
915
  export type LoginExternalCustomerInput = {
898
916
  externalCustomerToken: Scalars['String'];
899
917
  };
@@ -1070,6 +1088,22 @@ export type Mutation = {
1070
1088
  * If the sign up is successful the customer may be considered to be logged on and an authentication token will be returned
1071
1089
  */
1072
1090
  signUp?: Maybe<SignUpResponse>;
1091
+ /**
1092
+ * ## Description
1093
+ * This mutation's purpose is to update a existing customer's group using an
1094
+ * access code. An authorization token is needed in the request, in order to be
1095
+ * able to update the customer.
1096
+ * ## Error Codes
1097
+ * ### Unauthorized
1098
+ * Unauthorized
1099
+ * ### UnableToUpdateCustomer
1100
+ * Error in underlying API call, more info may be contained in the error message.
1101
+ * ### CustomerAlreadyUpdated
1102
+ * Customer already in the customer group
1103
+ * ### CustomerNotFound
1104
+ * No match on customer with access code
1105
+ */
1106
+ updateCustomerGroup?: Maybe<UpdateCustomerGroupResult>;
1073
1107
  /**
1074
1108
  * This mutation's purpose is to update a existing customer's information. An
1075
1109
  * authorization token is needed in the request, in order to be able to update the customer.
@@ -1209,6 +1243,11 @@ export type MutationSignUpArgs = {
1209
1243
  };
1210
1244
 
1211
1245
 
1246
+ export type MutationUpdateCustomerGroupArgs = {
1247
+ customerGroupAccessCode: Scalars['String'];
1248
+ };
1249
+
1250
+
1212
1251
  export type MutationUpdateCustomerArgs = {
1213
1252
  input: CustomerUpdateInput;
1214
1253
  };
@@ -1602,6 +1641,12 @@ export type Price = {
1602
1641
  vat: Scalars['Decimal'];
1603
1642
  };
1604
1643
 
1644
+ export type PriceHistory = {
1645
+ __typename?: 'PriceHistory';
1646
+ timestamp?: Maybe<Scalars['DateTime']>;
1647
+ price?: Maybe<Price>;
1648
+ };
1649
+
1605
1650
  export type PrivateCustomer = Customer & {
1606
1651
  __typename?: 'PrivateCustomer';
1607
1652
  pid?: Maybe<Scalars['String']>;
@@ -1748,6 +1793,8 @@ export type Product = Document & {
1748
1793
  * performance cost, as asking for this will result in a separate API call in the backend.
1749
1794
  */
1750
1795
  familyMembers?: Maybe<Array<Product>>;
1796
+ /** Get Product History within the set number of days */
1797
+ history?: Maybe<ProductHistory>;
1751
1798
  };
1752
1799
 
1753
1800
 
@@ -1776,6 +1823,11 @@ export type ProductPackageArgs = {
1776
1823
  articleNumbers?: Maybe<Array<Maybe<PackagePriceInput>>>;
1777
1824
  };
1778
1825
 
1826
+
1827
+ export type ProductHistoryArgs = {
1828
+ days?: Maybe<Scalars['Int']>;
1829
+ };
1830
+
1779
1831
  export type ProductAutoCompleteResult = {
1780
1832
  __typename?: 'ProductAutoCompleteResult';
1781
1833
  result: Array<Maybe<Product>>;
@@ -1867,6 +1919,11 @@ export enum ProductCustomFieldType {
1867
1919
  MultiLevelList = 'MULTI_LEVEL_LIST'
1868
1920
  }
1869
1921
 
1922
+ export type ProductHistory = {
1923
+ __typename?: 'ProductHistory';
1924
+ previousPrice?: Maybe<Array<Maybe<PriceHistory>>>;
1925
+ };
1926
+
1870
1927
  export type ProductImage = {
1871
1928
  __typename?: 'ProductImage';
1872
1929
  /** Alternate text for the image, commonly used for the alt attribute of img-tags. */
@@ -1951,6 +2008,8 @@ export type ProductVariant = {
1951
2008
  warehouseStock?: Maybe<Array<Maybe<Warehouse>>>;
1952
2009
  images?: Maybe<Array<Maybe<ProductImage>>>;
1953
2010
  barcode?: Maybe<Scalars['String']>;
2011
+ /** Get Product History within the set number of days */
2012
+ history?: Maybe<ProductVariantHistory>;
1954
2013
  };
1955
2014
 
1956
2015
 
@@ -1958,6 +2017,16 @@ export type ProductVariantWarehouseStockArgs = {
1958
2017
  includeInactive?: Maybe<Scalars['Boolean']>;
1959
2018
  };
1960
2019
 
2020
+
2021
+ export type ProductVariantHistoryArgs = {
2022
+ days?: Maybe<Scalars['Int']>;
2023
+ };
2024
+
2025
+ export type ProductVariantHistory = {
2026
+ __typename?: 'ProductVariantHistory';
2027
+ previousPrice?: Maybe<Array<Maybe<PriceHistory>>>;
2028
+ };
2029
+
1961
2030
  export type ProductVariantOption = {
1962
2031
  __typename?: 'ProductVariantOption';
1963
2032
  name?: Maybe<Scalars['String']>;
@@ -2299,8 +2368,8 @@ export type SignUpDeliveryAddressInput = {
2299
2368
  };
2300
2369
 
2301
2370
  export type SignUpExternalAttribute = {
2302
- name?: Maybe<Scalars['String']>;
2303
- value?: Maybe<Scalars['String']>;
2371
+ name: Scalars['String'];
2372
+ value: Scalars['String'];
2304
2373
  };
2305
2374
 
2306
2375
  export type SignUpInput = {
@@ -2450,6 +2519,11 @@ export type UpdateCartMutation = {
2450
2519
  cart?: Maybe<Cart>;
2451
2520
  };
2452
2521
 
2522
+ export type UpdateCustomerGroupResult = {
2523
+ __typename?: 'UpdateCustomerGroupResult';
2524
+ success: Scalars['Boolean'];
2525
+ };
2526
+
2453
2527
  export type UpdateCustomerPriceListResult = {
2454
2528
  __typename?: 'UpdateCustomerPriceListResult';
2455
2529
  success: Scalars['Boolean'];