@epcc-sdk/sdks-shopper 0.0.30 → 0.0.31

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/README.md CHANGED
@@ -227,6 +227,8 @@ const product = await getByContextProduct({
227
227
 
228
228
  - **`getByContextProduct`** (`GET /catalog/products/{product_id}`)
229
229
 
230
+ - **`getByContextAllRelatedProducts`** (`GET /catalog/products/{product_id}/relationships/{custom_relationship_slug}/products`)
231
+
230
232
  - **`getByContextComponentProductIds`** (`GET /catalog/products/{product_id}/relationships/component_products`)
231
233
 
232
234
  - **`getByContextChildProducts`** (`GET /catalog/products/{product_id}/relationships/children`)
@@ -285,6 +287,8 @@ const product = await getByContextProduct({
285
287
 
286
288
  - **`getProduct`** (`GET /catalogs/{catalog_id}/releases/{release_id}/products/{product_id}`)
287
289
 
290
+ - **`getAllRelatedProducts`** (`GET /catalogs/{catalog_id}/releases/{release_id}/products/{product_id}/relationships/{custom_relationship_slug}/products`)
291
+
288
292
  - **`getComponentProductIds`** (`GET /catalogs/{catalog_id}/releases/{release_id}/products/{product_id}/relationships/component_products`)
289
293
 
290
294
  - **`getChildProducts`** (`GET /catalogs/{catalog_id}/releases/{release_id}/products/{product_id}/relationships/children`)
@@ -105,6 +105,8 @@ __export(react_query_gen_exports, {
105
105
  getAllNodesQueryKey: () => getAllNodesQueryKey,
106
106
  getAllProductsOptions: () => getAllProductsOptions,
107
107
  getAllProductsQueryKey: () => getAllProductsQueryKey,
108
+ getAllRelatedProductsOptions: () => getAllRelatedProductsOptions,
109
+ getAllRelatedProductsQueryKey: () => getAllRelatedProductsQueryKey,
108
110
  getAnOrderOptions: () => getAnOrderOptions,
109
111
  getAnOrderQueryKey: () => getAnOrderQueryKey,
110
112
  getByContextAllHierarchiesOptions: () => getByContextAllHierarchiesOptions,
@@ -113,6 +115,8 @@ __export(react_query_gen_exports, {
113
115
  getByContextAllNodesQueryKey: () => getByContextAllNodesQueryKey,
114
116
  getByContextAllProductsOptions: () => getByContextAllProductsOptions,
115
117
  getByContextAllProductsQueryKey: () => getByContextAllProductsQueryKey,
118
+ getByContextAllRelatedProductsOptions: () => getByContextAllRelatedProductsOptions,
119
+ getByContextAllRelatedProductsQueryKey: () => getByContextAllRelatedProductsQueryKey,
116
120
  getByContextChildNodesOptions: () => getByContextChildNodesOptions,
117
121
  getByContextChildNodesQueryKey: () => getByContextChildNodesQueryKey,
118
122
  getByContextChildProductsOptions: () => getByContextChildProductsOptions,
@@ -445,6 +449,21 @@ const getByContextProductOptions = (options) => {
445
449
  queryKey: getByContextProductQueryKey(options)
446
450
  });
447
451
  };
452
+ const getByContextAllRelatedProductsQueryKey = (options) => [createQueryKey("getByContextAllRelatedProducts", options)];
453
+ const getByContextAllRelatedProductsOptions = (options) => {
454
+ return (0, import_react_query.queryOptions)({
455
+ queryFn: async ({ queryKey, signal }) => {
456
+ const { data } = await (0, import_sdk.getByContextAllRelatedProducts)({
457
+ ...options,
458
+ ...queryKey[0],
459
+ signal,
460
+ throwOnError: true
461
+ });
462
+ return data;
463
+ },
464
+ queryKey: getByContextAllRelatedProductsQueryKey(options)
465
+ });
466
+ };
448
467
  const getByContextComponentProductIdsQueryKey = (options) => [createQueryKey("getByContextComponentProductIds", options)];
449
468
  const getByContextComponentProductIdsOptions = (options) => {
450
469
  return (0, import_react_query.queryOptions)({
@@ -942,6 +961,21 @@ const getProductOptions = (options) => {
942
961
  queryKey: getProductQueryKey(options)
943
962
  });
944
963
  };
964
+ const getAllRelatedProductsQueryKey = (options) => [createQueryKey("getAllRelatedProducts", options)];
965
+ const getAllRelatedProductsOptions = (options) => {
966
+ return (0, import_react_query.queryOptions)({
967
+ queryFn: async ({ queryKey, signal }) => {
968
+ const { data } = await (0, import_sdk.getAllRelatedProducts)({
969
+ ...options,
970
+ ...queryKey[0],
971
+ signal,
972
+ throwOnError: true
973
+ });
974
+ return data;
975
+ },
976
+ queryKey: getAllRelatedProductsQueryKey(options)
977
+ });
978
+ };
945
979
  const getComponentProductIdsQueryKey = (options) => [createQueryKey("getComponentProductIds", options)];
946
980
  const getComponentProductIdsOptions = (options) => {
947
981
  return (0, import_react_query.queryOptions)({
@@ -2622,6 +2656,8 @@ const getAFileOptions = (options) => {
2622
2656
  getAllNodesQueryKey,
2623
2657
  getAllProductsOptions,
2624
2658
  getAllProductsQueryKey,
2659
+ getAllRelatedProductsOptions,
2660
+ getAllRelatedProductsQueryKey,
2625
2661
  getAnOrderOptions,
2626
2662
  getAnOrderQueryKey,
2627
2663
  getByContextAllHierarchiesOptions,
@@ -2630,6 +2666,8 @@ const getAFileOptions = (options) => {
2630
2666
  getByContextAllNodesQueryKey,
2631
2667
  getByContextAllProductsOptions,
2632
2668
  getByContextAllProductsQueryKey,
2669
+ getByContextAllRelatedProductsOptions,
2670
+ getByContextAllRelatedProductsQueryKey,
2633
2671
  getByContextChildNodesOptions,
2634
2672
  getByContextChildNodesQueryKey,
2635
2673
  getByContextChildProductsOptions,