@connectedxm/admin 1.8.3 → 1.8.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.d.mts +5 -4
- package/dist/index.d.ts +5 -4
- package/dist/index.js +15 -9
- package/dist/index.mjs +15 -9
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -8049,25 +8049,26 @@ declare const useGetEventCouponPasses: (eventId?: string, couponId?: string, par
|
|
|
8049
8049
|
* @category Keys
|
|
8050
8050
|
* @group Events
|
|
8051
8051
|
*/
|
|
8052
|
-
declare const EVENT_COUPONS_QUERY_KEY: (eventId: string) => string[];
|
|
8052
|
+
declare const EVENT_COUPONS_QUERY_KEY: (eventId: string, prePaid?: boolean) => string[];
|
|
8053
8053
|
/**
|
|
8054
8054
|
* @category Setters
|
|
8055
8055
|
* @group Events
|
|
8056
8056
|
*/
|
|
8057
|
-
declare const SET_EVENT_COUPONS_QUERY_DATA: (client: QueryClient, keyParams:
|
|
8057
|
+
declare const SET_EVENT_COUPONS_QUERY_DATA: (client: QueryClient, keyParams: [eventId: string, prePaid?: boolean | undefined], response: Awaited<ReturnType<typeof GetEventCoupons>>) => void;
|
|
8058
8058
|
interface GetEventCouponsProps extends InfiniteQueryParams {
|
|
8059
8059
|
eventId: string;
|
|
8060
|
+
prePaid?: boolean;
|
|
8060
8061
|
}
|
|
8061
8062
|
/**
|
|
8062
8063
|
* @category Queries
|
|
8063
8064
|
* @group Events
|
|
8064
8065
|
*/
|
|
8065
|
-
declare const GetEventCoupons: ({ eventId, pageParam, pageSize, orderBy, search, adminApiParams, }: GetEventCouponsProps) => Promise<ConnectedXMResponse<Coupon[]>>;
|
|
8066
|
+
declare const GetEventCoupons: ({ eventId, pageParam, pageSize, orderBy, search, adminApiParams, prePaid, }: GetEventCouponsProps) => Promise<ConnectedXMResponse<Coupon[]>>;
|
|
8066
8067
|
/**
|
|
8067
8068
|
* @category Hooks
|
|
8068
8069
|
* @group Events
|
|
8069
8070
|
*/
|
|
8070
|
-
declare const useGetEventCoupons: (eventId?: string, params?: Omit<InfiniteQueryParams, "pageParam" | "queryClient" | "adminApiParams">, options?: InfiniteQueryOptions<Awaited<ReturnType<typeof GetEventCoupons>>>) => _tanstack_react_query.UseInfiniteQueryResult<_tanstack_react_query.InfiniteData<ConnectedXMResponse<Coupon[]>, number>, axios.AxiosError<ConnectedXMResponse<null>, any>>;
|
|
8071
|
+
declare const useGetEventCoupons: (eventId?: string, prePaid?: boolean, params?: Omit<InfiniteQueryParams, "pageParam" | "queryClient" | "adminApiParams">, options?: InfiniteQueryOptions<Awaited<ReturnType<typeof GetEventCoupons>>>) => _tanstack_react_query.UseInfiniteQueryResult<_tanstack_react_query.InfiniteData<ConnectedXMResponse<Coupon[]>, number>, axios.AxiosError<ConnectedXMResponse<null>, any>>;
|
|
8071
8072
|
|
|
8072
8073
|
/**
|
|
8073
8074
|
* @category Keys
|
package/dist/index.d.ts
CHANGED
|
@@ -8049,25 +8049,26 @@ declare const useGetEventCouponPasses: (eventId?: string, couponId?: string, par
|
|
|
8049
8049
|
* @category Keys
|
|
8050
8050
|
* @group Events
|
|
8051
8051
|
*/
|
|
8052
|
-
declare const EVENT_COUPONS_QUERY_KEY: (eventId: string) => string[];
|
|
8052
|
+
declare const EVENT_COUPONS_QUERY_KEY: (eventId: string, prePaid?: boolean) => string[];
|
|
8053
8053
|
/**
|
|
8054
8054
|
* @category Setters
|
|
8055
8055
|
* @group Events
|
|
8056
8056
|
*/
|
|
8057
|
-
declare const SET_EVENT_COUPONS_QUERY_DATA: (client: QueryClient, keyParams:
|
|
8057
|
+
declare const SET_EVENT_COUPONS_QUERY_DATA: (client: QueryClient, keyParams: [eventId: string, prePaid?: boolean | undefined], response: Awaited<ReturnType<typeof GetEventCoupons>>) => void;
|
|
8058
8058
|
interface GetEventCouponsProps extends InfiniteQueryParams {
|
|
8059
8059
|
eventId: string;
|
|
8060
|
+
prePaid?: boolean;
|
|
8060
8061
|
}
|
|
8061
8062
|
/**
|
|
8062
8063
|
* @category Queries
|
|
8063
8064
|
* @group Events
|
|
8064
8065
|
*/
|
|
8065
|
-
declare const GetEventCoupons: ({ eventId, pageParam, pageSize, orderBy, search, adminApiParams, }: GetEventCouponsProps) => Promise<ConnectedXMResponse<Coupon[]>>;
|
|
8066
|
+
declare const GetEventCoupons: ({ eventId, pageParam, pageSize, orderBy, search, adminApiParams, prePaid, }: GetEventCouponsProps) => Promise<ConnectedXMResponse<Coupon[]>>;
|
|
8066
8067
|
/**
|
|
8067
8068
|
* @category Hooks
|
|
8068
8069
|
* @group Events
|
|
8069
8070
|
*/
|
|
8070
|
-
declare const useGetEventCoupons: (eventId?: string, params?: Omit<InfiniteQueryParams, "pageParam" | "queryClient" | "adminApiParams">, options?: InfiniteQueryOptions<Awaited<ReturnType<typeof GetEventCoupons>>>) => _tanstack_react_query.UseInfiniteQueryResult<_tanstack_react_query.InfiniteData<ConnectedXMResponse<Coupon[]>, number>, axios.AxiosError<ConnectedXMResponse<null>, any>>;
|
|
8071
|
+
declare const useGetEventCoupons: (eventId?: string, prePaid?: boolean, params?: Omit<InfiniteQueryParams, "pageParam" | "queryClient" | "adminApiParams">, options?: InfiniteQueryOptions<Awaited<ReturnType<typeof GetEventCoupons>>>) => _tanstack_react_query.UseInfiniteQueryResult<_tanstack_react_query.InfiniteData<ConnectedXMResponse<Coupon[]>, number>, axios.AxiosError<ConnectedXMResponse<null>, any>>;
|
|
8071
8072
|
|
|
8072
8073
|
/**
|
|
8073
8074
|
* @category Keys
|
package/dist/index.js
CHANGED
|
@@ -8082,10 +8082,13 @@ var useGetEventCoHosts = (eventId, params = {}, options = {}) => {
|
|
|
8082
8082
|
};
|
|
8083
8083
|
|
|
8084
8084
|
// src/queries/events/coupons/useGetEventCoupons.ts
|
|
8085
|
-
var EVENT_COUPONS_QUERY_KEY = (eventId) =>
|
|
8086
|
-
...EVENT_QUERY_KEY(eventId),
|
|
8087
|
-
"
|
|
8088
|
-
|
|
8085
|
+
var EVENT_COUPONS_QUERY_KEY = (eventId, prePaid) => {
|
|
8086
|
+
const key = [...EVENT_QUERY_KEY(eventId), "COUPONS"];
|
|
8087
|
+
if (typeof prePaid === "boolean") {
|
|
8088
|
+
key.push(prePaid ? "GROUP" : "STANDARD");
|
|
8089
|
+
}
|
|
8090
|
+
return key;
|
|
8091
|
+
};
|
|
8089
8092
|
var SET_EVENT_COUPONS_QUERY_DATA = (client, keyParams, response) => {
|
|
8090
8093
|
client.setQueryData(EVENT_COUPONS_QUERY_KEY(...keyParams), response);
|
|
8091
8094
|
};
|
|
@@ -8095,7 +8098,8 @@ var GetEventCoupons = async ({
|
|
|
8095
8098
|
pageSize,
|
|
8096
8099
|
orderBy,
|
|
8097
8100
|
search,
|
|
8098
|
-
adminApiParams
|
|
8101
|
+
adminApiParams,
|
|
8102
|
+
prePaid
|
|
8099
8103
|
}) => {
|
|
8100
8104
|
const adminApi = await GetAdminAPI(adminApiParams);
|
|
8101
8105
|
const { data } = await adminApi.get(`/events/${eventId}/coupons`, {
|
|
@@ -8103,17 +8107,19 @@ var GetEventCoupons = async ({
|
|
|
8103
8107
|
page: pageParam || void 0,
|
|
8104
8108
|
pageSize: pageSize || void 0,
|
|
8105
8109
|
orderBy: orderBy || void 0,
|
|
8106
|
-
search: search || void 0
|
|
8110
|
+
search: search || void 0,
|
|
8111
|
+
prePaid: typeof prePaid === "boolean" ? prePaid ? "true" : "false" : void 0
|
|
8107
8112
|
}
|
|
8108
8113
|
});
|
|
8109
8114
|
return data;
|
|
8110
8115
|
};
|
|
8111
|
-
var useGetEventCoupons = (eventId = "", params = {}, options = {}) => {
|
|
8116
|
+
var useGetEventCoupons = (eventId = "", prePaid, params = {}, options = {}) => {
|
|
8112
8117
|
return useConnectedInfiniteQuery(
|
|
8113
|
-
EVENT_COUPONS_QUERY_KEY(eventId),
|
|
8118
|
+
EVENT_COUPONS_QUERY_KEY(eventId, prePaid),
|
|
8114
8119
|
(params2) => GetEventCoupons({
|
|
8115
8120
|
...params2,
|
|
8116
|
-
eventId
|
|
8121
|
+
eventId,
|
|
8122
|
+
prePaid
|
|
8117
8123
|
}),
|
|
8118
8124
|
params,
|
|
8119
8125
|
{
|
package/dist/index.mjs
CHANGED
|
@@ -5474,10 +5474,13 @@ var useGetEventCoHosts = (eventId, params = {}, options = {}) => {
|
|
|
5474
5474
|
};
|
|
5475
5475
|
|
|
5476
5476
|
// src/queries/events/coupons/useGetEventCoupons.ts
|
|
5477
|
-
var EVENT_COUPONS_QUERY_KEY = (eventId) =>
|
|
5478
|
-
...EVENT_QUERY_KEY(eventId),
|
|
5479
|
-
"
|
|
5480
|
-
|
|
5477
|
+
var EVENT_COUPONS_QUERY_KEY = (eventId, prePaid) => {
|
|
5478
|
+
const key = [...EVENT_QUERY_KEY(eventId), "COUPONS"];
|
|
5479
|
+
if (typeof prePaid === "boolean") {
|
|
5480
|
+
key.push(prePaid ? "GROUP" : "STANDARD");
|
|
5481
|
+
}
|
|
5482
|
+
return key;
|
|
5483
|
+
};
|
|
5481
5484
|
var SET_EVENT_COUPONS_QUERY_DATA = (client, keyParams, response) => {
|
|
5482
5485
|
client.setQueryData(EVENT_COUPONS_QUERY_KEY(...keyParams), response);
|
|
5483
5486
|
};
|
|
@@ -5487,7 +5490,8 @@ var GetEventCoupons = async ({
|
|
|
5487
5490
|
pageSize,
|
|
5488
5491
|
orderBy,
|
|
5489
5492
|
search,
|
|
5490
|
-
adminApiParams
|
|
5493
|
+
adminApiParams,
|
|
5494
|
+
prePaid
|
|
5491
5495
|
}) => {
|
|
5492
5496
|
const adminApi = await GetAdminAPI(adminApiParams);
|
|
5493
5497
|
const { data } = await adminApi.get(`/events/${eventId}/coupons`, {
|
|
@@ -5495,17 +5499,19 @@ var GetEventCoupons = async ({
|
|
|
5495
5499
|
page: pageParam || void 0,
|
|
5496
5500
|
pageSize: pageSize || void 0,
|
|
5497
5501
|
orderBy: orderBy || void 0,
|
|
5498
|
-
search: search || void 0
|
|
5502
|
+
search: search || void 0,
|
|
5503
|
+
prePaid: typeof prePaid === "boolean" ? prePaid ? "true" : "false" : void 0
|
|
5499
5504
|
}
|
|
5500
5505
|
});
|
|
5501
5506
|
return data;
|
|
5502
5507
|
};
|
|
5503
|
-
var useGetEventCoupons = (eventId = "", params = {}, options = {}) => {
|
|
5508
|
+
var useGetEventCoupons = (eventId = "", prePaid, params = {}, options = {}) => {
|
|
5504
5509
|
return useConnectedInfiniteQuery(
|
|
5505
|
-
EVENT_COUPONS_QUERY_KEY(eventId),
|
|
5510
|
+
EVENT_COUPONS_QUERY_KEY(eventId, prePaid),
|
|
5506
5511
|
(params2) => GetEventCoupons({
|
|
5507
5512
|
...params2,
|
|
5508
|
-
eventId
|
|
5513
|
+
eventId,
|
|
5514
|
+
prePaid
|
|
5509
5515
|
}),
|
|
5510
5516
|
params,
|
|
5511
5517
|
{
|