@meaple-com/react-query 1.0.3 → 1.0.4

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/index.cjs CHANGED
@@ -208,12 +208,12 @@ var useUserOrders = (data, options) => {
208
208
 
209
209
  // src/hooks/payment/usePlatformFee.ts
210
210
  var import_react_query11 = require("@tanstack/react-query");
211
- var usePlatformFee = (params, options) => {
211
+ var usePlatformFee = (eventId, options) => {
212
212
  const { sdk } = useMeapleSDK();
213
213
  return (0, import_react_query11.useQuery)({
214
214
  ...options,
215
- queryKey: ["payments", "fee", params],
216
- queryFn: () => sdk.payments.getFee(params)
215
+ queryKey: ["payments", "fee", eventId],
216
+ queryFn: () => sdk.payments.getFee(eventId)
217
217
  });
218
218
  };
219
219
 
package/dist/index.d.cts CHANGED
@@ -3,7 +3,7 @@ import { ReactNode } from 'react';
3
3
  import { MeapleSDK } from '@meaple-com/core';
4
4
  import * as _tanstack_react_query from '@tanstack/react-query';
5
5
  import { UseQueryOptions, UseMutationOptions } from '@tanstack/react-query';
6
- import { CategoryProps, CouponProps, CheckCouponProps, EventProps, FindEventProductsProps, FindEventsParams, FindEventsProps, FindEventTicketsProps, FindUserEventTicketsProps, CreatedOrderProps, CreateOrderProps, GetOrderProps, UserOrderProps, GetPlatformFeeProps, PlatformFeeProps, UpdateUserTicketProps, TransferTicketProps as TransferTicketProps$1, CreateTicketFileProps as CreateTicketFileProps$1 } from '@meaple-com/types';
6
+ import { CategoryProps, CouponProps, CheckCouponProps, EventProps, FindEventProductsProps, FindEventsParams, FindEventsProps, FindEventTicketsProps, FindUserEventTicketsProps, CreatedOrderProps, CreateOrderProps, GetOrderProps, UserOrderProps, PlatformFeeProps, UpdateUserTicketProps, TransferTicketProps as TransferTicketProps$1, CreateTicketFileProps as CreateTicketFileProps$1 } from '@meaple-com/types';
7
7
  import { AxiosError } from 'axios';
8
8
 
9
9
  interface MeapleSDKContextValue {
@@ -44,7 +44,7 @@ type FindUserOrdersProps = {
44
44
  };
45
45
  declare const useUserOrders: (data: FindUserOrdersProps, options?: Omit<UseQueryOptions<UserOrderProps[], Error>, "queryKey" | "queryFn">) => _tanstack_react_query.UseQueryResult<UserOrderProps[], Error>;
46
46
 
47
- declare const usePlatformFee: (params?: GetPlatformFeeProps, options?: Omit<UseQueryOptions<PlatformFeeProps, Error>, "queryKey" | "queryFn">) => _tanstack_react_query.UseQueryResult<PlatformFeeProps, Error>;
47
+ declare const usePlatformFee: (eventId?: string, options?: Omit<UseQueryOptions<PlatformFeeProps, Error>, "queryKey" | "queryFn">) => _tanstack_react_query.UseQueryResult<PlatformFeeProps, Error>;
48
48
 
49
49
  type EditUserTicketProps = UpdateUserTicketProps & {
50
50
  userTicketId: string;
package/dist/index.d.ts CHANGED
@@ -3,7 +3,7 @@ import { ReactNode } from 'react';
3
3
  import { MeapleSDK } from '@meaple-com/core';
4
4
  import * as _tanstack_react_query from '@tanstack/react-query';
5
5
  import { UseQueryOptions, UseMutationOptions } from '@tanstack/react-query';
6
- import { CategoryProps, CouponProps, CheckCouponProps, EventProps, FindEventProductsProps, FindEventsParams, FindEventsProps, FindEventTicketsProps, FindUserEventTicketsProps, CreatedOrderProps, CreateOrderProps, GetOrderProps, UserOrderProps, GetPlatformFeeProps, PlatformFeeProps, UpdateUserTicketProps, TransferTicketProps as TransferTicketProps$1, CreateTicketFileProps as CreateTicketFileProps$1 } from '@meaple-com/types';
6
+ import { CategoryProps, CouponProps, CheckCouponProps, EventProps, FindEventProductsProps, FindEventsParams, FindEventsProps, FindEventTicketsProps, FindUserEventTicketsProps, CreatedOrderProps, CreateOrderProps, GetOrderProps, UserOrderProps, PlatformFeeProps, UpdateUserTicketProps, TransferTicketProps as TransferTicketProps$1, CreateTicketFileProps as CreateTicketFileProps$1 } from '@meaple-com/types';
7
7
  import { AxiosError } from 'axios';
8
8
 
9
9
  interface MeapleSDKContextValue {
@@ -44,7 +44,7 @@ type FindUserOrdersProps = {
44
44
  };
45
45
  declare const useUserOrders: (data: FindUserOrdersProps, options?: Omit<UseQueryOptions<UserOrderProps[], Error>, "queryKey" | "queryFn">) => _tanstack_react_query.UseQueryResult<UserOrderProps[], Error>;
46
46
 
47
- declare const usePlatformFee: (params?: GetPlatformFeeProps, options?: Omit<UseQueryOptions<PlatformFeeProps, Error>, "queryKey" | "queryFn">) => _tanstack_react_query.UseQueryResult<PlatformFeeProps, Error>;
47
+ declare const usePlatformFee: (eventId?: string, options?: Omit<UseQueryOptions<PlatformFeeProps, Error>, "queryKey" | "queryFn">) => _tanstack_react_query.UseQueryResult<PlatformFeeProps, Error>;
48
48
 
49
49
  type EditUserTicketProps = UpdateUserTicketProps & {
50
50
  userTicketId: string;
package/dist/index.js CHANGED
@@ -165,12 +165,12 @@ var useUserOrders = (data, options) => {
165
165
 
166
166
  // src/hooks/payment/usePlatformFee.ts
167
167
  import { useQuery as useQuery9 } from "@tanstack/react-query";
168
- var usePlatformFee = (params, options) => {
168
+ var usePlatformFee = (eventId, options) => {
169
169
  const { sdk } = useMeapleSDK();
170
170
  return useQuery9({
171
171
  ...options,
172
- queryKey: ["payments", "fee", params],
173
- queryFn: () => sdk.payments.getFee(params)
172
+ queryKey: ["payments", "fee", eventId],
173
+ queryFn: () => sdk.payments.getFee(eventId)
174
174
  });
175
175
  };
176
176
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meaple-com/react-query",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "React Query hooks for Meaple SDK",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",