@omniumretail/shared-resources 0.1.30 → 0.1.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.
@@ -6,5 +6,6 @@ export interface useProductsRecommendationsQueryHook extends UseQueryOptions<Res
6
6
  reference?: string;
7
7
  category?: string;
8
8
  type?: string;
9
+ companyId?: string;
9
10
  }
10
- export declare const useProductRecommendationsHook: ({ sortBy, sortDirection, reference, category, type, ...options }: useProductsRecommendationsQueryHook) => import("@tanstack/react-query").UseQueryResult<ResponseList<"Products", Product>, unknown>;
11
+ export declare const useProductRecommendationsHook: ({ sortBy, sortDirection, reference, category, type, companyId, ...options }: useProductsRecommendationsQueryHook) => import("@tanstack/react-query").UseQueryResult<ResponseList<"Products", Product>, unknown>;
@@ -2,5 +2,6 @@ import { Product } from '../../../';
2
2
  import { UseQueryOptions } from '@tanstack/react-query';
3
3
  export interface useProductsByRefQueryHookInterface extends UseQueryOptions<Product> {
4
4
  storeCode?: string;
5
+ companyId?: string;
5
6
  }
6
- export declare const useProductsByRefQueryHook: (productRef: string, { storeCode, ...options }: useProductsByRefQueryHookInterface) => import("@tanstack/react-query").UseQueryResult<Product, unknown>;
7
+ export declare const useProductsByRefQueryHook: (productRef: string, { storeCode, companyId, ...options }: useProductsByRefQueryHookInterface) => import("@tanstack/react-query").UseQueryResult<Product, unknown>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@omniumretail/shared-resources",
3
- "version": "0.1.30",
3
+ "version": "0.1.31",
4
4
  "private": false,
5
5
  "description": "Shared Components and services or utils to the frontend versions",
6
6
  "main": "dist/bundle.js",
@@ -7,18 +7,19 @@ export interface useProductsRecommendationsQueryHook extends UseQueryOptions<Res
7
7
  reference?: string;
8
8
  category?: string;
9
9
  type?: string;
10
+ companyId?: string;
10
11
  }
11
12
 
12
- export const useProductRecommendationsHook = ({ sortBy, sortDirection, reference, category, type, ...options }: useProductsRecommendationsQueryHook) => {
13
+ export const useProductRecommendationsHook = ({ sortBy, sortDirection, reference, category, type, companyId, ...options }: useProductsRecommendationsQueryHook) => {
13
14
  return useQuery(
14
- ['PRODUCT_RECOMMENDATIONS', sortBy, sortDirection, reference, category, type],
15
+ ['PRODUCT_RECOMMENDATIONS', sortBy, sortDirection, reference, category, type, companyId],
15
16
  () => get<ResponseList<"Products", Product>>('/Recommendations/Products/Recommendations', {
16
17
  pSortBy: sortBy,
17
18
  pSortDirection: sortDirection,
18
19
  pReferences: reference,
19
20
  pProductHierarchyId: category,
20
- pType: type
21
-
21
+ pType: type,
22
+ pCompanyId: companyId
22
23
  }),
23
24
  options
24
25
  );
@@ -3,13 +3,15 @@ import { useQuery, UseQueryOptions } from '@tanstack/react-query';
3
3
 
4
4
  export interface useProductsByRefQueryHookInterface extends UseQueryOptions<Product> {
5
5
  storeCode?: string;
6
+ companyId?: string;
6
7
  }
7
8
 
8
- export const useProductsByRefQueryHook = (productRef: string, {storeCode, ...options} : useProductsByRefQueryHookInterface) => {
9
+ export const useProductsByRefQueryHook = (productRef: string, {storeCode, companyId, ...options} : useProductsByRefQueryHookInterface) => {
9
10
  return useQuery(
10
- ['PRODUCT_BY_REF', productRef],
11
+ ['PRODUCT_BY_REF', productRef, storeCode, companyId],
11
12
  () => get<Product>(`/Recommendations/Products/${productRef}`, {
12
- pStoreCode: storeCode
13
+ pStoreCode: storeCode,
14
+ pCompanyId: companyId
13
15
  }),
14
16
  options
15
17
  );