@omniumretail/shared-resources 0.2.13 → 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.
@@ -5,5 +5,5 @@ interface GetGNGDocumentosProps extends UseQueryOptions<ResponseList<"Documents"
5
5
  records?: number;
6
6
  query?: string;
7
7
  }
8
- export declare const getGngDocumentos: ({ page, records, query }: GetGNGDocumentosProps) => import("@tanstack/react-query").UseQueryResult<GNGDocumentosResponse, unknown>;
8
+ export declare const getGngDocumentos: ({ page, records, query, ...options }: GetGNGDocumentosProps) => import("@tanstack/react-query").UseQueryResult<ResponseList<"Documents", GNGDocumentosResponse>, unknown>;
9
9
  export {};
@@ -1,9 +1,9 @@
1
1
  import { UseQueryOptions } from '@tanstack/react-query';
2
2
  import { ResponseList, SitooDocumentoResponse } from '../../../../interfaces';
3
- interface GetSitooDocumentosProps extends UseQueryOptions<ResponseList<"SitooDocumentos", SitooDocumentoResponse>> {
3
+ interface GetSitooDocumentosProps extends UseQueryOptions<ResponseList<"Items", SitooDocumentoResponse>> {
4
4
  fields?: string;
5
5
  externalid?: string;
6
6
  num?: number;
7
7
  }
8
- export declare const getSitooDocumentos: ({ fields, externalid, num }: GetSitooDocumentosProps) => import("@tanstack/react-query").UseQueryResult<ResponseList<"SitooDocumentos", SitooDocumentoResponse>, unknown>;
8
+ export declare const getSitooDocumentos: ({ fields, externalid, num, ...options }: GetSitooDocumentosProps) => import("@tanstack/react-query").UseQueryResult<ResponseList<"Items", SitooDocumentoResponse>, unknown>;
9
9
  export {};
@@ -1,9 +1,9 @@
1
1
  import { UseQueryOptions } from '@tanstack/react-query';
2
2
  import { ResponseList, GiftCards } from '../../../../interfaces';
3
- interface GetGNGVoucherProps extends UseQueryOptions<ResponseList<"GNGVoucher", GiftCards>> {
3
+ interface GetGNGVoucherProps extends UseQueryOptions<ResponseList<"GiftCards", GiftCards>> {
4
4
  page?: number;
5
5
  records?: number;
6
6
  query?: string;
7
7
  }
8
- export declare const getGNGVoucher: ({ page, records, query }: GetGNGVoucherProps) => import("@tanstack/react-query").UseQueryResult<ResponseList<"GNGVoucher", GiftCards>, unknown>;
8
+ export declare const getGNGVoucher: ({ page, records, query, ...options }: GetGNGVoucherProps) => import("@tanstack/react-query").UseQueryResult<ResponseList<"GiftCards", GiftCards>, unknown>;
9
9
  export {};
@@ -3,5 +3,5 @@ import { SitooVoucher } from '../../../../interfaces';
3
3
  interface GetSitooVouchersProps extends UseQueryOptions<SitooVoucher> {
4
4
  id?: string;
5
5
  }
6
- export declare const getSitooVouchers: ({ id }: GetSitooVouchersProps) => import("@tanstack/react-query").UseQueryResult<SitooVoucher, unknown>;
6
+ export declare const getSitooVouchers: ({ id, ...options }: GetSitooVouchersProps) => import("@tanstack/react-query").UseQueryResult<SitooVoucher, unknown>;
7
7
  export {};
@@ -4,5 +4,5 @@ interface GetVoucherIntegrationRequestStatusProps extends UseQueryOptions<Integr
4
4
  pIntegrationType?: string;
5
5
  pSourcePlatformId?: string;
6
6
  }
7
- export declare const getVoucherIntegrationRequestStatus: ({ pIntegrationType, pSourcePlatformId }: GetVoucherIntegrationRequestStatusProps) => import("@tanstack/react-query").UseQueryResult<IntegrationRequestStatus, unknown>;
7
+ export declare const getVoucherIntegrationRequestStatus: ({ pIntegrationType, pSourcePlatformId, ...options }: GetVoucherIntegrationRequestStatusProps) => import("@tanstack/react-query").UseQueryResult<IntegrationRequestStatus, unknown>;
8
8
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@omniumretail/shared-resources",
3
- "version": "0.2.13",
3
+ "version": "0.2.16",
4
4
  "private": false,
5
5
  "description": "Shared Components and services or utils to the frontend versions",
6
6
  "main": "dist/bundle.js",
@@ -8,17 +8,15 @@ interface GetGNGDocumentosProps extends UseQueryOptions<ResponseList<"Documents"
8
8
  query?: string;
9
9
  }
10
10
 
11
- export const getGngDocumentos = ({ page, records , query }: GetGNGDocumentosProps) => {
11
+ export const getGngDocumentos = ({ page, records, query, ...options }: GetGNGDocumentosProps) => {
12
12
  return useQuery(
13
13
  ['GNG_DOCUMENTOS', page, records, query],
14
- () => get<GNGDocumentosResponse>('/GNG/Document/Documents', {
14
+ () => get<ResponseList<"Documents", GNGDocumentosResponse>>('/GNG/Document/Documents', {
15
15
  pPage: page || 1,
16
16
  pRecords: records || 50,
17
17
  pQuery: query
18
18
  }),
19
- {
20
- keepPreviousData: true,
21
-
22
- }
19
+ options
23
20
  );
24
21
  }
22
+
@@ -2,23 +2,20 @@ import { useQuery, UseQueryOptions } from '@tanstack/react-query';
2
2
  import { get } from "../../../../services/ApiService";
3
3
  import { ResponseList, SitooDocumentoResponse } from '../../../../interfaces';
4
4
 
5
- interface GetSitooDocumentosProps extends UseQueryOptions<ResponseList<"SitooDocumentos", SitooDocumentoResponse>> {
5
+ interface GetSitooDocumentosProps extends UseQueryOptions<ResponseList<"Items", SitooDocumentoResponse>> {
6
6
  fields?: string;
7
7
  externalid?: string;
8
8
  num?: number;
9
9
  }
10
10
 
11
- export const getSitooDocumentos = ({ fields, externalid, num}: GetSitooDocumentosProps) => {
11
+ export const getSitooDocumentos = ({ fields, externalid, num, ...options}: GetSitooDocumentosProps) => {
12
12
  return useQuery(
13
13
  ['SITOO_DOCUMENTOS', fields, externalid, num],
14
- () => get<ResponseList<"SitooDocumentos", SitooDocumentoResponse>>('/Sitoo/Orders', {
14
+ () => get<ResponseList<"Items", SitooDocumentoResponse>>('/Sitoo/Orders', {
15
15
  pFields: fields || "externalid,orderid",
16
16
  pExternalid: externalid ,
17
17
  pNum: num
18
18
  }),
19
- {
20
- keepPreviousData: true,
21
-
22
- }
19
+ options
23
20
  );
24
21
  }
@@ -2,23 +2,20 @@ import { useQuery, UseQueryOptions } from '@tanstack/react-query';
2
2
  import { get } from "../../../../services/ApiService";
3
3
  import { ResponseList, GiftCards } from '../../../../interfaces';
4
4
 
5
- interface GetGNGVoucherProps extends UseQueryOptions<ResponseList<"GNGVoucher", GiftCards>> {
5
+ interface GetGNGVoucherProps extends UseQueryOptions<ResponseList<"GiftCards", GiftCards>> {
6
6
  page?: number;
7
7
  records?: number;
8
8
  query?: string;
9
9
  }
10
10
 
11
- export const getGNGVoucher = ({ page, records, query }: GetGNGVoucherProps) => {
11
+ export const getGNGVoucher = ({ page, records, query, ...options}: GetGNGVoucherProps) => {
12
12
  return useQuery(
13
13
  ['GNG_VOUCHER', page, records, query],
14
- () => get<ResponseList<"GNGVoucher", GiftCards>>('/GNG/Document/GiftCards', {
14
+ () => get<ResponseList<"GiftCards", GiftCards>>('/GNG/Document/GiftCards', {
15
15
  pPage: page || 1,
16
16
  pRecords: records || 50,
17
17
  pQuery: query
18
18
  }),
19
- {
20
- keepPreviousData: true,
21
-
22
- }
19
+ options
23
20
  );
24
21
  }
@@ -6,13 +6,12 @@ interface GetSitooVouchersProps extends UseQueryOptions<SitooVoucher>{
6
6
  id?: string;
7
7
  }
8
8
 
9
- export const getSitooVouchers = ({ id }: GetSitooVouchersProps) => {
9
+ export const getSitooVouchers = ({ id, ...options }: GetSitooVouchersProps) => {
10
10
  return useQuery(
11
11
  ['SITOO_VOUCHERS', id],
12
- () => get<SitooVoucher>(`/SPIGiftCard/giftcards/${id}.json`),
13
- {
14
- keepPreviousData: true,
15
-
16
- }
12
+
13
+ () => get<SitooVoucher>(`/GNG/GiftCard/SPIGiftCard/giftcards/${id}.json`),
14
+ options
15
+
17
16
  );
18
17
  }
@@ -7,16 +7,13 @@ interface GetVoucherIntegrationRequestStatusProps extends UseQueryOptions< Integ
7
7
  pSourcePlatformId?: string;
8
8
  }
9
9
 
10
- export const getVoucherIntegrationRequestStatus = ({ pIntegrationType, pSourcePlatformId }: GetVoucherIntegrationRequestStatusProps) => {
10
+ export const getVoucherIntegrationRequestStatus = ({ pIntegrationType, pSourcePlatformId, ...options}: GetVoucherIntegrationRequestStatusProps) => {
11
11
  return useQuery(
12
12
  ['INTEGRATION_REQUEST_STATUS', pIntegrationType, pSourcePlatformId],
13
13
  () => get<IntegrationRequestStatus>('/Document/IntegrationRequests/latestIntegration', {
14
14
  pIntegrationType: pIntegrationType ,
15
15
  pSourcePlatformId: pSourcePlatformId
16
16
  }),
17
- {
18
- keepPreviousData: true,
19
-
20
- }
17
+ options
21
18
  );
22
19
  }