@connectedxm/admin 1.8.3 → 1.8.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.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: Parameters<typeof EVENT_COUPONS_QUERY_KEY>, response: Awaited<ReturnType<typeof GetEventCoupons>>) => void;
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: Parameters<typeof EVENT_COUPONS_QUERY_KEY>, response: Awaited<ReturnType<typeof GetEventCoupons>>) => void;
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,9 +8082,10 @@ var useGetEventCoHosts = (eventId, params = {}, options = {}) => {
8082
8082
  };
8083
8083
 
8084
8084
  // src/queries/events/coupons/useGetEventCoupons.ts
8085
- var EVENT_COUPONS_QUERY_KEY = (eventId) => [
8085
+ var EVENT_COUPONS_QUERY_KEY = (eventId, prePaid) => [
8086
8086
  ...EVENT_QUERY_KEY(eventId),
8087
- "COUPONS"
8087
+ "COUPONS",
8088
+ prePaid ? "GROUP_PASSES" : "STANDARD"
8088
8089
  ];
8089
8090
  var SET_EVENT_COUPONS_QUERY_DATA = (client, keyParams, response) => {
8090
8091
  client.setQueryData(EVENT_COUPONS_QUERY_KEY(...keyParams), response);
@@ -8095,7 +8096,8 @@ var GetEventCoupons = async ({
8095
8096
  pageSize,
8096
8097
  orderBy,
8097
8098
  search,
8098
- adminApiParams
8099
+ adminApiParams,
8100
+ prePaid
8099
8101
  }) => {
8100
8102
  const adminApi = await GetAdminAPI(adminApiParams);
8101
8103
  const { data } = await adminApi.get(`/events/${eventId}/coupons`, {
@@ -8103,17 +8105,19 @@ var GetEventCoupons = async ({
8103
8105
  page: pageParam || void 0,
8104
8106
  pageSize: pageSize || void 0,
8105
8107
  orderBy: orderBy || void 0,
8106
- search: search || void 0
8108
+ search: search || void 0,
8109
+ prePaid: typeof prePaid === "boolean" ? prePaid ? "true" : "false" : void 0
8107
8110
  }
8108
8111
  });
8109
8112
  return data;
8110
8113
  };
8111
- var useGetEventCoupons = (eventId = "", params = {}, options = {}) => {
8114
+ var useGetEventCoupons = (eventId = "", prePaid = false, params = {}, options = {}) => {
8112
8115
  return useConnectedInfiniteQuery(
8113
- EVENT_COUPONS_QUERY_KEY(eventId),
8116
+ EVENT_COUPONS_QUERY_KEY(eventId, prePaid),
8114
8117
  (params2) => GetEventCoupons({
8115
8118
  ...params2,
8116
- eventId
8119
+ eventId,
8120
+ prePaid
8117
8121
  }),
8118
8122
  params,
8119
8123
  {
package/dist/index.mjs CHANGED
@@ -5474,9 +5474,10 @@ var useGetEventCoHosts = (eventId, params = {}, options = {}) => {
5474
5474
  };
5475
5475
 
5476
5476
  // src/queries/events/coupons/useGetEventCoupons.ts
5477
- var EVENT_COUPONS_QUERY_KEY = (eventId) => [
5477
+ var EVENT_COUPONS_QUERY_KEY = (eventId, prePaid) => [
5478
5478
  ...EVENT_QUERY_KEY(eventId),
5479
- "COUPONS"
5479
+ "COUPONS",
5480
+ prePaid ? "GROUP_PASSES" : "STANDARD"
5480
5481
  ];
5481
5482
  var SET_EVENT_COUPONS_QUERY_DATA = (client, keyParams, response) => {
5482
5483
  client.setQueryData(EVENT_COUPONS_QUERY_KEY(...keyParams), response);
@@ -5487,7 +5488,8 @@ var GetEventCoupons = async ({
5487
5488
  pageSize,
5488
5489
  orderBy,
5489
5490
  search,
5490
- adminApiParams
5491
+ adminApiParams,
5492
+ prePaid
5491
5493
  }) => {
5492
5494
  const adminApi = await GetAdminAPI(adminApiParams);
5493
5495
  const { data } = await adminApi.get(`/events/${eventId}/coupons`, {
@@ -5495,17 +5497,19 @@ var GetEventCoupons = async ({
5495
5497
  page: pageParam || void 0,
5496
5498
  pageSize: pageSize || void 0,
5497
5499
  orderBy: orderBy || void 0,
5498
- search: search || void 0
5500
+ search: search || void 0,
5501
+ prePaid: typeof prePaid === "boolean" ? prePaid ? "true" : "false" : void 0
5499
5502
  }
5500
5503
  });
5501
5504
  return data;
5502
5505
  };
5503
- var useGetEventCoupons = (eventId = "", params = {}, options = {}) => {
5506
+ var useGetEventCoupons = (eventId = "", prePaid = false, params = {}, options = {}) => {
5504
5507
  return useConnectedInfiniteQuery(
5505
- EVENT_COUPONS_QUERY_KEY(eventId),
5508
+ EVENT_COUPONS_QUERY_KEY(eventId, prePaid),
5506
5509
  (params2) => GetEventCoupons({
5507
5510
  ...params2,
5508
- eventId
5511
+ eventId,
5512
+ prePaid
5509
5513
  }),
5510
5514
  params,
5511
5515
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@connectedxm/admin",
3
- "version": "1.8.3",
3
+ "version": "1.8.4",
4
4
  "description": "Admin API javascript SDK",
5
5
  "author": "ConnectedXM Inc.",
6
6
  "repository": {