@meaple-com/react-query 1.0.3 → 1.0.5
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 +3 -3
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +3 -3
- package/package.json +3 -3
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 = (
|
|
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",
|
|
216
|
-
queryFn: () => sdk.payments.getFee(
|
|
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,
|
|
6
|
+
import { CategoryProps, CouponProps, CheckCouponProps, EventProps, FindEventProductsProps, FindEventsParams, FindEventsProps, FindEventTicketsProps, UserTicketProps, CreatedOrderProps, CreateOrderProps, GetOrderProps, UserOrderProps, PlatformFeeProps, UpdateUserTicketProps, TransferTicketProps as TransferTicketProps$1, CreateTicketFileProps as CreateTicketFileProps$1, GetUserEventsProps } from '@meaple-com/types';
|
|
7
7
|
import { AxiosError } from 'axios';
|
|
8
8
|
|
|
9
9
|
interface MeapleSDKContextValue {
|
|
@@ -31,7 +31,7 @@ declare const useEvents: (params?: FindEventsParams, options?: Omit<UseQueryOpti
|
|
|
31
31
|
|
|
32
32
|
declare const useEventTickets: (eventId: string, privateToken?: string | null, predecessorIds?: string[], options?: Omit<UseQueryOptions<FindEventTicketsProps, Error>, "queryKey" | "queryFn">) => _tanstack_react_query.UseQueryResult<FindEventTicketsProps, Error>;
|
|
33
33
|
|
|
34
|
-
declare const useUserEventTickets: (eventId: string, userId?: string, options?: Omit<UseQueryOptions<
|
|
34
|
+
declare const useUserEventTickets: (eventId: string, userId?: string, options?: Omit<UseQueryOptions<UserTicketProps[], Error>, "queryKey" | "queryFn">) => _tanstack_react_query.UseQueryResult<UserTicketProps[], Error>;
|
|
35
35
|
|
|
36
36
|
declare const useCreateOrder: (options?: Omit<UseMutationOptions<CreatedOrderProps, AxiosError<any, any>, CreateOrderProps, unknown>, "mutationFn">) => _tanstack_react_query.UseMutationResult<CreatedOrderProps, AxiosError<any, any>, CreateOrderProps, unknown>;
|
|
37
37
|
|
|
@@ -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: (
|
|
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;
|
|
@@ -65,7 +65,7 @@ type SectionType = 'coming_soon' | 'past' | 'awards';
|
|
|
65
65
|
type FindUserEventsProps = {
|
|
66
66
|
type: SectionType;
|
|
67
67
|
};
|
|
68
|
-
declare const useUserEvents: (data?: FindUserEventsProps, options?: Omit<UseQueryOptions<
|
|
68
|
+
declare const useUserEvents: (data?: FindUserEventsProps, options?: Omit<UseQueryOptions<GetUserEventsProps[], Error>, "queryKey" | "queryFn">) => _tanstack_react_query.UseQueryResult<GetUserEventsProps[], Error>;
|
|
69
69
|
|
|
70
70
|
declare const useRefundUserOrder: (options?: Omit<UseMutationOptions<void, unknown, string, unknown>, "mutationFn">) => _tanstack_react_query.UseMutationResult<void, unknown, string, unknown>;
|
|
71
71
|
|
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,
|
|
6
|
+
import { CategoryProps, CouponProps, CheckCouponProps, EventProps, FindEventProductsProps, FindEventsParams, FindEventsProps, FindEventTicketsProps, UserTicketProps, CreatedOrderProps, CreateOrderProps, GetOrderProps, UserOrderProps, PlatformFeeProps, UpdateUserTicketProps, TransferTicketProps as TransferTicketProps$1, CreateTicketFileProps as CreateTicketFileProps$1, GetUserEventsProps } from '@meaple-com/types';
|
|
7
7
|
import { AxiosError } from 'axios';
|
|
8
8
|
|
|
9
9
|
interface MeapleSDKContextValue {
|
|
@@ -31,7 +31,7 @@ declare const useEvents: (params?: FindEventsParams, options?: Omit<UseQueryOpti
|
|
|
31
31
|
|
|
32
32
|
declare const useEventTickets: (eventId: string, privateToken?: string | null, predecessorIds?: string[], options?: Omit<UseQueryOptions<FindEventTicketsProps, Error>, "queryKey" | "queryFn">) => _tanstack_react_query.UseQueryResult<FindEventTicketsProps, Error>;
|
|
33
33
|
|
|
34
|
-
declare const useUserEventTickets: (eventId: string, userId?: string, options?: Omit<UseQueryOptions<
|
|
34
|
+
declare const useUserEventTickets: (eventId: string, userId?: string, options?: Omit<UseQueryOptions<UserTicketProps[], Error>, "queryKey" | "queryFn">) => _tanstack_react_query.UseQueryResult<UserTicketProps[], Error>;
|
|
35
35
|
|
|
36
36
|
declare const useCreateOrder: (options?: Omit<UseMutationOptions<CreatedOrderProps, AxiosError<any, any>, CreateOrderProps, unknown>, "mutationFn">) => _tanstack_react_query.UseMutationResult<CreatedOrderProps, AxiosError<any, any>, CreateOrderProps, unknown>;
|
|
37
37
|
|
|
@@ -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: (
|
|
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;
|
|
@@ -65,7 +65,7 @@ type SectionType = 'coming_soon' | 'past' | 'awards';
|
|
|
65
65
|
type FindUserEventsProps = {
|
|
66
66
|
type: SectionType;
|
|
67
67
|
};
|
|
68
|
-
declare const useUserEvents: (data?: FindUserEventsProps, options?: Omit<UseQueryOptions<
|
|
68
|
+
declare const useUserEvents: (data?: FindUserEventsProps, options?: Omit<UseQueryOptions<GetUserEventsProps[], Error>, "queryKey" | "queryFn">) => _tanstack_react_query.UseQueryResult<GetUserEventsProps[], Error>;
|
|
69
69
|
|
|
70
70
|
declare const useRefundUserOrder: (options?: Omit<UseMutationOptions<void, unknown, string, unknown>, "mutationFn">) => _tanstack_react_query.UseMutationResult<void, unknown, string, unknown>;
|
|
71
71
|
|
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 = (
|
|
168
|
+
var usePlatformFee = (eventId, options) => {
|
|
169
169
|
const { sdk } = useMeapleSDK();
|
|
170
170
|
return useQuery9({
|
|
171
171
|
...options,
|
|
172
|
-
queryKey: ["payments", "fee",
|
|
173
|
-
queryFn: () => sdk.payments.getFee(
|
|
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
|
+
"version": "1.0.5",
|
|
4
4
|
"description": "React Query hooks for Meaple SDK",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"clean": "rimraf dist"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@meaple-com/core": "^1.0.
|
|
32
|
-
"@meaple-com/types": "^1.0.
|
|
31
|
+
"@meaple-com/core": "^1.0.5",
|
|
32
|
+
"@meaple-com/types": "^1.0.5"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@eslint/js": "^9.36.0",
|