@connectedxm/admin 0.0.46 → 0.0.48

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
@@ -7867,7 +7867,7 @@ declare const useGetEventTicketCoupons: (eventId?: string, ticketId?: string, pa
7867
7867
  * @category Keys
7868
7868
  * @group Events
7869
7869
  */
7870
- declare const EVENT_TICKET_PURCHASES_QUERY_KEY: (eventId: string, ticketId: string) => string[];
7870
+ declare const EVENT_TICKET_PURCHASES_QUERY_KEY: (eventId: string, ticketId: string, checkedIn?: boolean) => string[];
7871
7871
  /**
7872
7872
  * @category Setters
7873
7873
  * @group Events
@@ -7876,17 +7876,18 @@ declare const SET_EVENT_TICKET_PURCHASES_QUERY_DATA: (client: any, keyParams: Pa
7876
7876
  interface GetEventTicketPurchasesProps extends InfiniteQueryParams {
7877
7877
  eventId: string;
7878
7878
  ticketId: string;
7879
+ checkedIn?: boolean;
7879
7880
  }
7880
7881
  /**
7881
7882
  * @category Queries
7882
7883
  * @group Events
7883
7884
  */
7884
- declare const GetEventTicketPurchases: ({ eventId, ticketId, pageParam, pageSize, orderBy, search, adminApiParams, }: GetEventTicketPurchasesProps) => Promise<ConnectedXMResponse<Purchase[]>>;
7885
+ declare const GetEventTicketPurchases: ({ eventId, ticketId, checkedIn, pageParam, pageSize, orderBy, search, adminApiParams, }: GetEventTicketPurchasesProps) => Promise<ConnectedXMResponse<Purchase[]>>;
7885
7886
  /**
7886
7887
  * @category Hooks
7887
7888
  * @group Events
7888
7889
  */
7889
- declare const useGetEventTicketPurchases: (eventId?: string, ticketId?: string, params?: Omit<InfiniteQueryParams, "pageParam" | "queryClient" | "adminApiParams">, options?: InfiniteQueryOptions<Awaited<ReturnType<typeof GetEventTicketPurchases>>>) => _tanstack_react_query.UseInfiniteQueryResult<_tanstack_query_core.InfiniteData<ConnectedXMResponse<Purchase[]>, number>, axios.AxiosError<ConnectedXMResponse<null>, any>>;
7890
+ declare const useGetEventTicketPurchases: (eventId?: string, ticketId?: string, checkedIn?: boolean, params?: Omit<InfiniteQueryParams, "pageParam" | "queryClient" | "adminApiParams">, options?: InfiniteQueryOptions<Awaited<ReturnType<typeof GetEventTicketPurchases>>>) => _tanstack_react_query.UseInfiniteQueryResult<_tanstack_query_core.InfiniteData<ConnectedXMResponse<Purchase[]>, number>, axios.AxiosError<ConnectedXMResponse<null>, any>>;
7890
7891
 
7891
7892
  /**
7892
7893
  * @category Keys
package/dist/index.d.ts CHANGED
@@ -7867,7 +7867,7 @@ declare const useGetEventTicketCoupons: (eventId?: string, ticketId?: string, pa
7867
7867
  * @category Keys
7868
7868
  * @group Events
7869
7869
  */
7870
- declare const EVENT_TICKET_PURCHASES_QUERY_KEY: (eventId: string, ticketId: string) => string[];
7870
+ declare const EVENT_TICKET_PURCHASES_QUERY_KEY: (eventId: string, ticketId: string, checkedIn?: boolean) => string[];
7871
7871
  /**
7872
7872
  * @category Setters
7873
7873
  * @group Events
@@ -7876,17 +7876,18 @@ declare const SET_EVENT_TICKET_PURCHASES_QUERY_DATA: (client: any, keyParams: Pa
7876
7876
  interface GetEventTicketPurchasesProps extends InfiniteQueryParams {
7877
7877
  eventId: string;
7878
7878
  ticketId: string;
7879
+ checkedIn?: boolean;
7879
7880
  }
7880
7881
  /**
7881
7882
  * @category Queries
7882
7883
  * @group Events
7883
7884
  */
7884
- declare const GetEventTicketPurchases: ({ eventId, ticketId, pageParam, pageSize, orderBy, search, adminApiParams, }: GetEventTicketPurchasesProps) => Promise<ConnectedXMResponse<Purchase[]>>;
7885
+ declare const GetEventTicketPurchases: ({ eventId, ticketId, checkedIn, pageParam, pageSize, orderBy, search, adminApiParams, }: GetEventTicketPurchasesProps) => Promise<ConnectedXMResponse<Purchase[]>>;
7885
7886
  /**
7886
7887
  * @category Hooks
7887
7888
  * @group Events
7888
7889
  */
7889
- declare const useGetEventTicketPurchases: (eventId?: string, ticketId?: string, params?: Omit<InfiniteQueryParams, "pageParam" | "queryClient" | "adminApiParams">, options?: InfiniteQueryOptions<Awaited<ReturnType<typeof GetEventTicketPurchases>>>) => _tanstack_react_query.UseInfiniteQueryResult<_tanstack_query_core.InfiniteData<ConnectedXMResponse<Purchase[]>, number>, axios.AxiosError<ConnectedXMResponse<null>, any>>;
7890
+ declare const useGetEventTicketPurchases: (eventId?: string, ticketId?: string, checkedIn?: boolean, params?: Omit<InfiniteQueryParams, "pageParam" | "queryClient" | "adminApiParams">, options?: InfiniteQueryOptions<Awaited<ReturnType<typeof GetEventTicketPurchases>>>) => _tanstack_react_query.UseInfiniteQueryResult<_tanstack_query_core.InfiniteData<ConnectedXMResponse<Purchase[]>, number>, axios.AxiosError<ConnectedXMResponse<null>, any>>;
7890
7891
 
7891
7892
  /**
7892
7893
  * @category Keys
package/dist/index.js CHANGED
@@ -9198,13 +9198,20 @@ var useGetEventTicketCoupons = (eventId = "", ticketId = "", params = {}, option
9198
9198
  };
9199
9199
 
9200
9200
  // src/queries/events/tickets/useGetEventTicketPurchases.ts
9201
- var EVENT_TICKET_PURCHASES_QUERY_KEY = (eventId, ticketId) => [...EVENT_TICKET_QUERY_KEY(eventId, ticketId), "PURCHASES"];
9201
+ var EVENT_TICKET_PURCHASES_QUERY_KEY = (eventId, ticketId, checkedIn) => {
9202
+ const keys = [...EVENT_TICKET_QUERY_KEY(eventId, ticketId), "PURCHASES"];
9203
+ if (typeof checkedIn === "boolean") {
9204
+ keys.push(checkedIn ? "CHECKED_IN" : "NOT_CHECKED");
9205
+ }
9206
+ return keys;
9207
+ };
9202
9208
  var SET_EVENT_TICKET_PURCHASES_QUERY_DATA = (client, keyParams, response) => {
9203
9209
  client.setQueryData(EVENT_TICKET_PURCHASES_QUERY_KEY(...keyParams), response);
9204
9210
  };
9205
9211
  var GetEventTicketPurchases = async ({
9206
9212
  eventId,
9207
9213
  ticketId,
9214
+ checkedIn,
9208
9215
  pageParam,
9209
9216
  pageSize,
9210
9217
  orderBy,
@@ -9216,6 +9223,7 @@ var GetEventTicketPurchases = async ({
9216
9223
  `/events/${eventId}/tickets/${ticketId}/purchases`,
9217
9224
  {
9218
9225
  params: {
9226
+ checkedIn: typeof checkedIn !== "undefined" ? checkedIn : void 0,
9219
9227
  page: pageParam || void 0,
9220
9228
  pageSize: pageSize || void 0,
9221
9229
  orderBy: orderBy || void 0,
@@ -9225,13 +9233,14 @@ var GetEventTicketPurchases = async ({
9225
9233
  );
9226
9234
  return data;
9227
9235
  };
9228
- var useGetEventTicketPurchases = (eventId = "", ticketId = "", params = {}, options = {}) => {
9236
+ var useGetEventTicketPurchases = (eventId = "", ticketId = "", checkedIn, params = {}, options = {}) => {
9229
9237
  return useConnectedInfiniteQuery(
9230
- EVENT_TICKET_PURCHASES_QUERY_KEY(eventId, ticketId),
9238
+ EVENT_TICKET_PURCHASES_QUERY_KEY(eventId, ticketId, checkedIn),
9231
9239
  (params2) => GetEventTicketPurchases({
9232
9240
  ...params2,
9233
9241
  eventId,
9234
- ticketId
9242
+ ticketId,
9243
+ checkedIn
9235
9244
  }),
9236
9245
  params,
9237
9246
  {
@@ -18396,6 +18405,11 @@ var UpdateEventRegistrationPurchase = async ({
18396
18405
  queryClient.invalidateQueries({
18397
18406
  queryKey: PURCHASES_QUERY_KEY()
18398
18407
  });
18408
+ if (data.data.ticketId) {
18409
+ queryClient.invalidateQueries({
18410
+ queryKey: EVENT_TICKET_PURCHASES_QUERY_KEY(eventId, data.data.ticketId)
18411
+ });
18412
+ }
18399
18413
  SET_EVENT_REGISTRATION_PURCHASE_QUERY_DATA(
18400
18414
  queryClient,
18401
18415
  [eventId, registrationId, purchaseId],
package/dist/index.mjs CHANGED
@@ -7254,13 +7254,20 @@ var useGetEventTicketCoupons = (eventId = "", ticketId = "", params = {}, option
7254
7254
  };
7255
7255
 
7256
7256
  // src/queries/events/tickets/useGetEventTicketPurchases.ts
7257
- var EVENT_TICKET_PURCHASES_QUERY_KEY = (eventId, ticketId) => [...EVENT_TICKET_QUERY_KEY(eventId, ticketId), "PURCHASES"];
7257
+ var EVENT_TICKET_PURCHASES_QUERY_KEY = (eventId, ticketId, checkedIn) => {
7258
+ const keys = [...EVENT_TICKET_QUERY_KEY(eventId, ticketId), "PURCHASES"];
7259
+ if (typeof checkedIn === "boolean") {
7260
+ keys.push(checkedIn ? "CHECKED_IN" : "NOT_CHECKED");
7261
+ }
7262
+ return keys;
7263
+ };
7258
7264
  var SET_EVENT_TICKET_PURCHASES_QUERY_DATA = (client, keyParams, response) => {
7259
7265
  client.setQueryData(EVENT_TICKET_PURCHASES_QUERY_KEY(...keyParams), response);
7260
7266
  };
7261
7267
  var GetEventTicketPurchases = async ({
7262
7268
  eventId,
7263
7269
  ticketId,
7270
+ checkedIn,
7264
7271
  pageParam,
7265
7272
  pageSize,
7266
7273
  orderBy,
@@ -7272,6 +7279,7 @@ var GetEventTicketPurchases = async ({
7272
7279
  `/events/${eventId}/tickets/${ticketId}/purchases`,
7273
7280
  {
7274
7281
  params: {
7282
+ checkedIn: typeof checkedIn !== "undefined" ? checkedIn : void 0,
7275
7283
  page: pageParam || void 0,
7276
7284
  pageSize: pageSize || void 0,
7277
7285
  orderBy: orderBy || void 0,
@@ -7281,13 +7289,14 @@ var GetEventTicketPurchases = async ({
7281
7289
  );
7282
7290
  return data;
7283
7291
  };
7284
- var useGetEventTicketPurchases = (eventId = "", ticketId = "", params = {}, options = {}) => {
7292
+ var useGetEventTicketPurchases = (eventId = "", ticketId = "", checkedIn, params = {}, options = {}) => {
7285
7293
  return useConnectedInfiniteQuery(
7286
- EVENT_TICKET_PURCHASES_QUERY_KEY(eventId, ticketId),
7294
+ EVENT_TICKET_PURCHASES_QUERY_KEY(eventId, ticketId, checkedIn),
7287
7295
  (params2) => GetEventTicketPurchases({
7288
7296
  ...params2,
7289
7297
  eventId,
7290
- ticketId
7298
+ ticketId,
7299
+ checkedIn
7291
7300
  }),
7292
7301
  params,
7293
7302
  {
@@ -16455,6 +16464,11 @@ var UpdateEventRegistrationPurchase = async ({
16455
16464
  queryClient.invalidateQueries({
16456
16465
  queryKey: PURCHASES_QUERY_KEY()
16457
16466
  });
16467
+ if (data.data.ticketId) {
16468
+ queryClient.invalidateQueries({
16469
+ queryKey: EVENT_TICKET_PURCHASES_QUERY_KEY(eventId, data.data.ticketId)
16470
+ });
16471
+ }
16458
16472
  SET_EVENT_REGISTRATION_PURCHASE_QUERY_DATA(
16459
16473
  queryClient,
16460
16474
  [eventId, registrationId, purchaseId],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@connectedxm/admin",
3
- "version": "0.0.46",
3
+ "version": "0.0.48",
4
4
  "description": "Admin API javascript SDK",
5
5
  "author": "ConnectedXM Inc.",
6
6
  "repository": {