erp-pos-ecommerce-shared 0.2.14 → 0.2.16

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/dist/queries.d.ts CHANGED
@@ -804,6 +804,37 @@ declare const batches: {
804
804
  [dataTagErrorSymbol]: Error;
805
805
  };
806
806
  };
807
+ getBatchesForTable: (params: TableQueryParams & {
808
+ productId?: number;
809
+ }) => _tanstack_query_core.OmitKeyof<_tanstack_react_query.UseQueryOptions<IBatchResponse, Error, IBatchResponse, readonly ["batches", "list", {
810
+ readonly filters: {
811
+ skip?: number;
812
+ limit?: number;
813
+ query?: string | null;
814
+ productId?: number;
815
+ };
816
+ }]>, "queryFn"> & {
817
+ queryFn?: _tanstack_query_core.QueryFunction<IBatchResponse, readonly ["batches", "list", {
818
+ readonly filters: {
819
+ skip?: number;
820
+ limit?: number;
821
+ query?: string | null;
822
+ productId?: number;
823
+ };
824
+ }], never> | undefined;
825
+ } & {
826
+ queryKey: readonly ["batches", "list", {
827
+ readonly filters: {
828
+ skip?: number;
829
+ limit?: number;
830
+ query?: string | null;
831
+ productId?: number;
832
+ };
833
+ }] & {
834
+ [dataTagSymbol]: IBatchResponse;
835
+ [dataTagErrorSymbol]: Error;
836
+ };
837
+ };
807
838
  getBatchesForSelect: () => _tanstack_query_core.OmitKeyof<_tanstack_react_query.UseQueryOptions<IBatch[], Error, IBatch[], readonly ["batches", "select"]>, "queryFn"> & {
808
839
  queryFn?: _tanstack_query_core.QueryFunction<IBatch[], readonly ["batches", "select"], never> | undefined;
809
840
  } & {
package/dist/queries.js CHANGED
@@ -1263,6 +1263,16 @@ var batches = {
1263
1263
  queryKey: batchQueryKeys.list(params),
1264
1264
  staleTime: 3e4
1265
1265
  }),
1266
+ getBatchesForTable: (params) => queryOptions({
1267
+ queryFn: () => getBatches({
1268
+ skip: params.skip ?? 0,
1269
+ limit: params.limit ?? 10,
1270
+ query: (params.query ?? "").trim() || void 0,
1271
+ productId: params.productId
1272
+ }),
1273
+ queryKey: batchQueryKeys.list(params),
1274
+ staleTime: 3e4
1275
+ }),
1266
1276
  getBatchesForSelect: () => queryOptions({
1267
1277
  queryFn: getBatchesForSelect,
1268
1278
  queryKey: batchQueryKeys.forSelect(),