@omniumretail/shared-resources 0.1.46 → 0.1.47

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.
@@ -0,0 +1,9 @@
1
+ import { UseQueryOptions } from "@tanstack/react-query";
2
+ import { TransferDocumentsDetails, ResponseList } from "../../interfaces";
3
+ export interface TransferDocumentsPackagesProps extends UseQueryOptions<ResponseList<"TransferDocumentDetails", TransferDocumentsDetails>> {
4
+ sortBy?: string;
5
+ sortDirection?: string;
6
+ terms?: string;
7
+ transferDocumentId?: string;
8
+ }
9
+ export declare const getTransferDocumentsPackagesQueryHook: ({ sortBy, sortDirection, terms, transferDocumentId }: TransferDocumentsPackagesProps) => import("@tanstack/react-query").UseQueryResult<ResponseList<"TransferDocumentDetails", TransferDocumentsDetails>, unknown>;
@@ -47,6 +47,7 @@ export * from './Astt/getTransferDocumentsQuery.hook';
47
47
  export * from './Astt/getTransferDocumentsByIdQuery.hook';
48
48
  export * from './Astt/getTransferDocumentsByPackageQuery.hook';
49
49
  export * from './Astt/getTransferStatesQuery.hook';
50
+ export * from './Astt/getTransferDocumentsPackagesQuery.hook';
50
51
  export * from './Others/useJobTitlesQuery.hook';
51
52
  export * from './Others/useContractStatesQuery.hook';
52
53
  export * from './Others/useApplicationDataQuery.hook';
@@ -20,4 +20,5 @@ export interface TransferDocumentsDetails {
20
20
  TotalProductsCount: number;
21
21
  PickedProductsCount: number;
22
22
  PackageState: string;
23
+ Notes: string;
23
24
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@omniumretail/shared-resources",
3
- "version": "0.1.46",
3
+ "version": "0.1.47",
4
4
  "private": false,
5
5
  "description": "Shared Components and services or utils to the frontend versions",
6
6
  "main": "dist/bundle.js",
@@ -0,0 +1,24 @@
1
+ import { useQuery, UseQueryOptions } from "@tanstack/react-query";
2
+ import { TransferDocumentsDetails, ResponseList } from "../../interfaces";
3
+ import { get } from "../../services/ApiService";
4
+
5
+ export interface TransferDocumentsPackagesProps extends UseQueryOptions<ResponseList<"TransferDocumentDetails", TransferDocumentsDetails>> {
6
+ sortBy?: string;
7
+ sortDirection?: string;
8
+ terms?: string;
9
+ transferDocumentId?: string;
10
+ }
11
+
12
+ export const getTransferDocumentsPackagesQueryHook = ({ sortBy, sortDirection, terms, transferDocumentId }: TransferDocumentsPackagesProps) => {
13
+ return useQuery(
14
+ ['ASTT_TRANSFER_PACKAGES', sortBy, sortDirection, terms, transferDocumentId],
15
+ () => get<ResponseList<"TransferDocumentDetails", TransferDocumentsDetails>>(`/ASTT/TransferDocuments/${transferDocumentId}/Packages`, {
16
+ pSortBy: sortBy || "PackageId",
17
+ pSortDirection: sortDirection || "asc",
18
+ pTerms: terms
19
+ }),
20
+ {
21
+ keepPreviousData: true,
22
+ }
23
+ );
24
+ }
@@ -66,6 +66,7 @@ export * from './Astt/getTransferDocumentsQuery.hook';
66
66
  export * from './Astt/getTransferDocumentsByIdQuery.hook';
67
67
  export * from './Astt/getTransferDocumentsByPackageQuery.hook';
68
68
  export * from './Astt/getTransferStatesQuery.hook';
69
+ export * from './Astt/getTransferDocumentsPackagesQuery.hook';
69
70
 
70
71
  //Others
71
72
  export * from './Others/useJobTitlesQuery.hook';
@@ -22,4 +22,5 @@ export interface TransferDocumentsDetails {
22
22
  TotalProductsCount: number;
23
23
  PickedProductsCount: number;
24
24
  PackageState: string;
25
+ Notes: string;
25
26
  }