@connectedxm/admin 6.7.7 → 6.7.8
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 +12 -6
- package/dist/index.d.cts +4 -3
- package/dist/index.d.ts +4 -3
- package/dist/index.js +12 -6
- package/openapi.json +9 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -9581,11 +9581,14 @@ var useGetEventCoHosts = (eventId, params = {}, options = {}) => {
|
|
|
9581
9581
|
};
|
|
9582
9582
|
|
|
9583
9583
|
// src/queries/events/coupons/useGetEventCoupons.ts
|
|
9584
|
-
var EVENT_COUPONS_QUERY_KEY = (eventId, prePaid) => {
|
|
9584
|
+
var EVENT_COUPONS_QUERY_KEY = (eventId, prePaid, includeVariants) => {
|
|
9585
9585
|
const key = [...EVENT_QUERY_KEY(eventId), "COUPONS"];
|
|
9586
9586
|
if (typeof prePaid === "boolean") {
|
|
9587
9587
|
key.push(prePaid ? "GROUP" : "STANDARD");
|
|
9588
9588
|
}
|
|
9589
|
+
if (includeVariants === true) {
|
|
9590
|
+
key.push("VARIANTS");
|
|
9591
|
+
}
|
|
9589
9592
|
return key;
|
|
9590
9593
|
};
|
|
9591
9594
|
var SET_EVENT_COUPONS_QUERY_DATA = (client, keyParams, response) => {
|
|
@@ -9598,7 +9601,8 @@ var GetEventCoupons = async ({
|
|
|
9598
9601
|
orderBy,
|
|
9599
9602
|
search,
|
|
9600
9603
|
adminApiParams,
|
|
9601
|
-
prePaid
|
|
9604
|
+
prePaid,
|
|
9605
|
+
includeVariants
|
|
9602
9606
|
}) => {
|
|
9603
9607
|
const adminApi = await GetAdminAPI(adminApiParams);
|
|
9604
9608
|
const { data } = await adminApi.get(`/events/${eventId}/coupons`, {
|
|
@@ -9607,18 +9611,20 @@ var GetEventCoupons = async ({
|
|
|
9607
9611
|
pageSize: pageSize || void 0,
|
|
9608
9612
|
orderBy: orderBy || void 0,
|
|
9609
9613
|
search: search || void 0,
|
|
9610
|
-
prePaid: typeof prePaid === "boolean" ? prePaid ? "true" : "false" : void 0
|
|
9614
|
+
prePaid: typeof prePaid === "boolean" ? prePaid ? "true" : "false" : void 0,
|
|
9615
|
+
includeVariants: includeVariants === true ? "true" : void 0
|
|
9611
9616
|
}
|
|
9612
9617
|
});
|
|
9613
9618
|
return data;
|
|
9614
9619
|
};
|
|
9615
|
-
var useGetEventCoupons = (eventId = "", prePaid, params = {}, options = {}) => {
|
|
9620
|
+
var useGetEventCoupons = (eventId = "", prePaid, includeVariants, params = {}, options = {}) => {
|
|
9616
9621
|
return useConnectedInfiniteQuery(
|
|
9617
|
-
EVENT_COUPONS_QUERY_KEY(eventId, prePaid),
|
|
9622
|
+
EVENT_COUPONS_QUERY_KEY(eventId, prePaid, includeVariants),
|
|
9618
9623
|
(params2) => GetEventCoupons({
|
|
9619
9624
|
...params2,
|
|
9620
9625
|
eventId,
|
|
9621
|
-
prePaid
|
|
9626
|
+
prePaid,
|
|
9627
|
+
includeVariants
|
|
9622
9628
|
}),
|
|
9623
9629
|
params,
|
|
9624
9630
|
{
|
package/dist/index.d.cts
CHANGED
|
@@ -9924,7 +9924,7 @@ declare const useGetEventCouponVariants: (eventId?: string, parentCouponId?: str
|
|
|
9924
9924
|
* @category Keys
|
|
9925
9925
|
* @group Events
|
|
9926
9926
|
*/
|
|
9927
|
-
declare const EVENT_COUPONS_QUERY_KEY: (eventId: string, prePaid?: boolean) => string[];
|
|
9927
|
+
declare const EVENT_COUPONS_QUERY_KEY: (eventId: string, prePaid?: boolean, includeVariants?: true) => string[];
|
|
9928
9928
|
/**
|
|
9929
9929
|
* @category Setters
|
|
9930
9930
|
* @group Events
|
|
@@ -9933,17 +9933,18 @@ declare const SET_EVENT_COUPONS_QUERY_DATA: (client: QueryClient, keyParams: Par
|
|
|
9933
9933
|
interface GetEventCouponsProps extends InfiniteQueryParams {
|
|
9934
9934
|
eventId: string;
|
|
9935
9935
|
prePaid?: boolean;
|
|
9936
|
+
includeVariants?: true;
|
|
9936
9937
|
}
|
|
9937
9938
|
/**
|
|
9938
9939
|
* @category Queries
|
|
9939
9940
|
* @group Events
|
|
9940
9941
|
*/
|
|
9941
|
-
declare const GetEventCoupons: ({ eventId, pageParam, pageSize, orderBy, search, adminApiParams, prePaid, }: GetEventCouponsProps) => Promise<ConnectedXMResponse<Coupon[]>>;
|
|
9942
|
+
declare const GetEventCoupons: ({ eventId, pageParam, pageSize, orderBy, search, adminApiParams, prePaid, includeVariants, }: GetEventCouponsProps) => Promise<ConnectedXMResponse<Coupon[]>>;
|
|
9942
9943
|
/**
|
|
9943
9944
|
* @category Hooks
|
|
9944
9945
|
* @group Events
|
|
9945
9946
|
*/
|
|
9946
|
-
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>>;
|
|
9947
|
+
declare const useGetEventCoupons: (eventId?: string, prePaid?: boolean, includeVariants?: true, 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>>;
|
|
9947
9948
|
|
|
9948
9949
|
/**
|
|
9949
9950
|
* @category Keys
|
package/dist/index.d.ts
CHANGED
|
@@ -9924,7 +9924,7 @@ declare const useGetEventCouponVariants: (eventId?: string, parentCouponId?: str
|
|
|
9924
9924
|
* @category Keys
|
|
9925
9925
|
* @group Events
|
|
9926
9926
|
*/
|
|
9927
|
-
declare const EVENT_COUPONS_QUERY_KEY: (eventId: string, prePaid?: boolean) => string[];
|
|
9927
|
+
declare const EVENT_COUPONS_QUERY_KEY: (eventId: string, prePaid?: boolean, includeVariants?: true) => string[];
|
|
9928
9928
|
/**
|
|
9929
9929
|
* @category Setters
|
|
9930
9930
|
* @group Events
|
|
@@ -9933,17 +9933,18 @@ declare const SET_EVENT_COUPONS_QUERY_DATA: (client: QueryClient, keyParams: Par
|
|
|
9933
9933
|
interface GetEventCouponsProps extends InfiniteQueryParams {
|
|
9934
9934
|
eventId: string;
|
|
9935
9935
|
prePaid?: boolean;
|
|
9936
|
+
includeVariants?: true;
|
|
9936
9937
|
}
|
|
9937
9938
|
/**
|
|
9938
9939
|
* @category Queries
|
|
9939
9940
|
* @group Events
|
|
9940
9941
|
*/
|
|
9941
|
-
declare const GetEventCoupons: ({ eventId, pageParam, pageSize, orderBy, search, adminApiParams, prePaid, }: GetEventCouponsProps) => Promise<ConnectedXMResponse<Coupon[]>>;
|
|
9942
|
+
declare const GetEventCoupons: ({ eventId, pageParam, pageSize, orderBy, search, adminApiParams, prePaid, includeVariants, }: GetEventCouponsProps) => Promise<ConnectedXMResponse<Coupon[]>>;
|
|
9942
9943
|
/**
|
|
9943
9944
|
* @category Hooks
|
|
9944
9945
|
* @group Events
|
|
9945
9946
|
*/
|
|
9946
|
-
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>>;
|
|
9947
|
+
declare const useGetEventCoupons: (eventId?: string, prePaid?: boolean, includeVariants?: true, 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>>;
|
|
9947
9948
|
|
|
9948
9949
|
/**
|
|
9949
9950
|
* @category Keys
|
package/dist/index.js
CHANGED
|
@@ -6297,11 +6297,14 @@ var useGetEventCoHosts = (eventId, params = {}, options = {}) => {
|
|
|
6297
6297
|
};
|
|
6298
6298
|
|
|
6299
6299
|
// src/queries/events/coupons/useGetEventCoupons.ts
|
|
6300
|
-
var EVENT_COUPONS_QUERY_KEY = (eventId, prePaid) => {
|
|
6300
|
+
var EVENT_COUPONS_QUERY_KEY = (eventId, prePaid, includeVariants) => {
|
|
6301
6301
|
const key = [...EVENT_QUERY_KEY(eventId), "COUPONS"];
|
|
6302
6302
|
if (typeof prePaid === "boolean") {
|
|
6303
6303
|
key.push(prePaid ? "GROUP" : "STANDARD");
|
|
6304
6304
|
}
|
|
6305
|
+
if (includeVariants === true) {
|
|
6306
|
+
key.push("VARIANTS");
|
|
6307
|
+
}
|
|
6305
6308
|
return key;
|
|
6306
6309
|
};
|
|
6307
6310
|
var SET_EVENT_COUPONS_QUERY_DATA = (client, keyParams, response) => {
|
|
@@ -6314,7 +6317,8 @@ var GetEventCoupons = async ({
|
|
|
6314
6317
|
orderBy,
|
|
6315
6318
|
search,
|
|
6316
6319
|
adminApiParams,
|
|
6317
|
-
prePaid
|
|
6320
|
+
prePaid,
|
|
6321
|
+
includeVariants
|
|
6318
6322
|
}) => {
|
|
6319
6323
|
const adminApi = await GetAdminAPI(adminApiParams);
|
|
6320
6324
|
const { data } = await adminApi.get(`/events/${eventId}/coupons`, {
|
|
@@ -6323,18 +6327,20 @@ var GetEventCoupons = async ({
|
|
|
6323
6327
|
pageSize: pageSize || void 0,
|
|
6324
6328
|
orderBy: orderBy || void 0,
|
|
6325
6329
|
search: search || void 0,
|
|
6326
|
-
prePaid: typeof prePaid === "boolean" ? prePaid ? "true" : "false" : void 0
|
|
6330
|
+
prePaid: typeof prePaid === "boolean" ? prePaid ? "true" : "false" : void 0,
|
|
6331
|
+
includeVariants: includeVariants === true ? "true" : void 0
|
|
6327
6332
|
}
|
|
6328
6333
|
});
|
|
6329
6334
|
return data;
|
|
6330
6335
|
};
|
|
6331
|
-
var useGetEventCoupons = (eventId = "", prePaid, params = {}, options = {}) => {
|
|
6336
|
+
var useGetEventCoupons = (eventId = "", prePaid, includeVariants, params = {}, options = {}) => {
|
|
6332
6337
|
return useConnectedInfiniteQuery(
|
|
6333
|
-
EVENT_COUPONS_QUERY_KEY(eventId, prePaid),
|
|
6338
|
+
EVENT_COUPONS_QUERY_KEY(eventId, prePaid, includeVariants),
|
|
6334
6339
|
(params2) => GetEventCoupons({
|
|
6335
6340
|
...params2,
|
|
6336
6341
|
eventId,
|
|
6337
|
-
prePaid
|
|
6342
|
+
prePaid,
|
|
6343
|
+
includeVariants
|
|
6338
6344
|
}),
|
|
6339
6345
|
params,
|
|
6340
6346
|
{
|
package/openapi.json
CHANGED
|
@@ -16778,6 +16778,15 @@
|
|
|
16778
16778
|
"description": "Filter by prePaid",
|
|
16779
16779
|
"required": false
|
|
16780
16780
|
},
|
|
16781
|
+
{
|
|
16782
|
+
"in": "query",
|
|
16783
|
+
"name": "includeVariants",
|
|
16784
|
+
"schema": {
|
|
16785
|
+
"type": "object"
|
|
16786
|
+
},
|
|
16787
|
+
"description": "Filter by includeVariants",
|
|
16788
|
+
"required": false
|
|
16789
|
+
},
|
|
16781
16790
|
{
|
|
16782
16791
|
"in": "query",
|
|
16783
16792
|
"name": "page",
|