@omniumretail/shared-resources 0.2.81 → 0.2.83

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.
@@ -1,6 +1,6 @@
1
1
  import { UseQueryOptions } from "@tanstack/react-query";
2
2
  import { ProductMovement, ResponseList } from "../../../interfaces";
3
- export interface ProductsMovementsASGTProps extends UseQueryOptions<ResponseList<"ProductsMovements", ProductMovement>> {
3
+ export interface ProductsMovementsASGTProps extends UseQueryOptions<ResponseList<"ProductMovements", ProductMovement>> {
4
4
  page: number;
5
5
  records: number;
6
6
  sortBy: string;
@@ -8,4 +8,4 @@ export interface ProductsMovementsASGTProps extends UseQueryOptions<ResponseList
8
8
  terms?: string;
9
9
  query?: string;
10
10
  }
11
- export declare const getProductsMovementsASGTQueryHook: ({ page, records, sortBy, sortDirection, terms, query, ...options }: ProductsMovementsASGTProps) => import("@tanstack/react-query").UseQueryResult<ResponseList<"ProductsMovements", ProductMovement>, unknown>;
11
+ export declare const getProductsMovementsASGTQueryHook: ({ page, records, sortBy, sortDirection, terms, query, ...options }: ProductsMovementsASGTProps) => import("@tanstack/react-query").UseQueryResult<ResponseList<"ProductMovements", ProductMovement>, unknown>;
@@ -1,6 +1,6 @@
1
1
  import { UseQueryOptions } from "@tanstack/react-query";
2
2
  import { User, ResponseList } from "../../../interfaces";
3
- export interface UserListQuery extends UseQueryOptions<ResponseList<"Users", User>> {
3
+ export interface UserListQuery extends Omit<UseQueryOptions<ResponseList<"Users", User>>, "queryKey"> {
4
4
  tags?: string;
5
5
  records: number;
6
6
  page: number;
@@ -8,4 +8,4 @@ export interface UserListQuery extends UseQueryOptions<ResponseList<"Users", Use
8
8
  sortBy?: string;
9
9
  sortDirection?: string;
10
10
  }
11
- export declare const useUserListQueryHook: ({ tags, page, records, queryField, sortBy, sortDirection }: UserListQuery) => import("@tanstack/react-query").UseQueryResult<ResponseList<"Users", User>, unknown>;
11
+ export declare const useUserListQueryHook: ({ tags, page, records, queryField, sortBy, sortDirection, ...options }: UserListQuery) => import("@tanstack/react-query").UseQueryResult<ResponseList<"Users", User>, unknown>;
@@ -33,6 +33,7 @@ export interface TransferDocument {
33
33
  MovementType: string;
34
34
  DocumentNumber: string;
35
35
  DocumentDate: number;
36
+ VendusId: string;
36
37
  }
37
38
  export interface ProductMovement {
38
39
  DocNr: string;
@@ -43,4 +44,5 @@ export interface ProductMovement {
43
44
  ProductTitle: string;
44
45
  Image: string | null;
45
46
  Movement: number;
47
+ VendusId: string;
46
48
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@omniumretail/shared-resources",
3
- "version": "0.2.81",
3
+ "version": "0.2.83",
4
4
  "private": false,
5
5
  "description": "Shared Components and services or utils to the frontend versions",
6
6
  "main": "dist/bundle.js",
@@ -2,7 +2,7 @@ import { useQuery, UseQueryOptions } from "@tanstack/react-query";
2
2
  import { ProductMovement, ResponseList } from "../../../interfaces";
3
3
  import { getAuth0 } from "../../../services/ApiService";
4
4
 
5
- export interface ProductsMovementsASGTProps extends UseQueryOptions<ResponseList<"ProductsMovements", ProductMovement>> {
5
+ export interface ProductsMovementsASGTProps extends UseQueryOptions<ResponseList<"ProductMovements", ProductMovement>> {
6
6
  page: number;
7
7
  records: number;
8
8
  sortBy: string;
@@ -14,7 +14,7 @@ export interface ProductsMovementsASGTProps extends UseQueryOptions<ResponseList
14
14
  export const getProductsMovementsASGTQueryHook = ({ page, records, sortBy, sortDirection, terms, query, ...options }: ProductsMovementsASGTProps) => {
15
15
  return useQuery(
16
16
  ['ASGT_PRODUCT_MOVEMENTS_DOCUMENTS', page, records, sortBy, sortDirection, terms, query, options],
17
- () => getAuth0<ResponseList<"ProductsMovements", ProductMovement>>('/ASGT/ProductsMovements', {
17
+ () => getAuth0<ResponseList<"ProductMovements", ProductMovement>>('/ASGT/ProductsMovements', {
18
18
  pPage: page,
19
19
  pRecords: records,
20
20
  pSortBy: sortBy,
@@ -2,7 +2,7 @@ import { useQuery, UseQueryOptions } from "@tanstack/react-query";
2
2
  import { User, ResponseList } from "../../../interfaces";
3
3
  import { getAuth0 } from "../../../services/ApiService";
4
4
 
5
- export interface UserListQuery extends UseQueryOptions<ResponseList<"Users", User>> {
5
+ export interface UserListQuery extends Omit<UseQueryOptions<ResponseList<"Users", User>>, "queryKey"> {
6
6
  tags?: string;
7
7
  records: number;
8
8
  page: number;
@@ -11,9 +11,9 @@ export interface UserListQuery extends UseQueryOptions<ResponseList<"Users", Use
11
11
  sortDirection?: string;
12
12
  }
13
13
 
14
- export const useUserListQueryHook = ({ tags, page, records, queryField, sortBy, sortDirection }: UserListQuery) => {
14
+ export const useUserListQueryHook = ({ tags, page, records, queryField, sortBy, sortDirection, ...options }: UserListQuery) => {
15
15
  return useQuery(
16
- ['USER_LIST_QUERY', tags, page, records, sortBy, sortDirection, queryField],
16
+ ['USER_LIST_QUERY', tags, page, records, sortBy, sortDirection, queryField, options],
17
17
  () => getAuth0<ResponseList<"Users", User>>('/AACP/Users', {
18
18
  pPage: page || 1,
19
19
  pRecords: records || 50,
@@ -22,8 +22,6 @@ export const useUserListQueryHook = ({ tags, page, records, queryField, sortBy,
22
22
  pTerms: tags,
23
23
  pQuery: queryField
24
24
  }),
25
- {
26
- keepPreviousData: true,
27
- },
25
+ options
28
26
  );
29
27
  }
@@ -36,6 +36,7 @@ export interface TransferDocument {
36
36
  MovementType: string;
37
37
  DocumentNumber: string;
38
38
  DocumentDate: number;
39
+ VendusId: string;
39
40
  }
40
41
 
41
42
  export interface ProductMovement {
@@ -47,6 +48,7 @@ export interface ProductMovement {
47
48
  ProductTitle: string;
48
49
  Image: string | null;
49
50
  Movement: number;
51
+ VendusId: string;
50
52
  }
51
53
 
52
54