@connectedxm/client 4.0.3 → 4.0.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.ts CHANGED
@@ -2911,13 +2911,14 @@ interface GetEventActivationCompletionsProps extends InfiniteQueryParams {
2911
2911
  declare const GetEventActivationCompletions: ({ eventId, activationId, pageParam, pageSize, orderBy, search, clientApiParams, }: GetEventActivationCompletionsProps) => Promise<ConnectedXMResponse<EventActivationCompletion[]>>;
2912
2912
  declare const useGetEventActivationCompletions: (eventId?: string, activationId?: string, params?: Omit<InfiniteQueryParams, "pageParam" | "queryClient" | "clientApiParams">, options?: InfiniteQueryOptions<Awaited<ReturnType<typeof GetEventActivationCompletions>>>) => _tanstack_react_query.UseInfiniteQueryResult<_tanstack_react_query.InfiniteData<ConnectedXMResponse<EventActivationCompletion[]>, number>, axios.AxiosError<ConnectedXMResponse<null>, any>>;
2913
2913
 
2914
- declare const EVENT_ACTIVATIONS_QUERY_KEY: (eventId: string) => QueryKey;
2914
+ declare const EVENT_ACTIVATIONS_QUERY_KEY: (eventId: string, accessLevel?: keyof typeof TicketEventAccessLevel) => QueryKey;
2915
2915
  declare const SET_EVENT_ACTIVATIONS_QUERY_DATA: (client: QueryClient, keyParams: Parameters<typeof EVENT_ACTIVATIONS_QUERY_KEY>, response: Awaited<ReturnType<typeof GetEventActivations>>, baseKeys?: Parameters<typeof GetBaseInfiniteQueryKeys>) => void;
2916
2916
  interface GetEventActivationsProps extends InfiniteQueryParams {
2917
2917
  eventId: string;
2918
+ accessLevel?: keyof typeof TicketEventAccessLevel;
2918
2919
  }
2919
- declare const GetEventActivations: ({ eventId, pageParam, pageSize, orderBy, search, clientApiParams, }: GetEventActivationsProps) => Promise<ConnectedXMResponse<EventActivation[]>>;
2920
- declare const useGetEventActivations: (eventId?: string, params?: Omit<InfiniteQueryParams, "pageParam" | "queryClient" | "clientApiParams">, options?: InfiniteQueryOptions<Awaited<ReturnType<typeof GetEventActivations>>>) => _tanstack_react_query.UseInfiniteQueryResult<_tanstack_react_query.InfiniteData<ConnectedXMResponse<EventActivation[]>, number>, axios.AxiosError<ConnectedXMResponse<null>, any>>;
2920
+ declare const GetEventActivations: ({ eventId, accessLevel, pageParam, pageSize, orderBy, search, clientApiParams, }: GetEventActivationsProps) => Promise<ConnectedXMResponse<EventActivation[]>>;
2921
+ declare const useGetEventActivations: (eventId?: string, accessLevel?: keyof typeof TicketEventAccessLevel, params?: Omit<InfiniteQueryParams, "pageParam" | "queryClient" | "clientApiParams">, options?: InfiniteQueryOptions<Awaited<ReturnType<typeof GetEventActivations>>>) => _tanstack_react_query.UseInfiniteQueryResult<_tanstack_react_query.InfiniteData<ConnectedXMResponse<EventActivation[]>, number>, axios.AxiosError<ConnectedXMResponse<null>, any>>;
2921
2922
 
2922
2923
  declare const EVENT_ACTIVATIONS_LEADERBOARD_QUERY_KEY: (eventId: string) => QueryKey;
2923
2924
  interface GetEventActivationLeaderboardsProps extends InfiniteQueryParams {
package/dist/index.js CHANGED
@@ -2893,10 +2893,13 @@ var useGetFeaturedEvents = (params = {}, options = {}) => {
2893
2893
  };
2894
2894
 
2895
2895
  // src/queries/events/useGetEventActivations.ts
2896
- var EVENT_ACTIVATIONS_QUERY_KEY = (eventId) => [
2897
- ...EVENT_QUERY_KEY(eventId),
2898
- "ACTIVATIONS"
2899
- ];
2896
+ var EVENT_ACTIVATIONS_QUERY_KEY = (eventId, accessLevel) => {
2897
+ const key = [...EVENT_QUERY_KEY(eventId), "ACTIVATIONS"];
2898
+ if (accessLevel) {
2899
+ key.push(accessLevel);
2900
+ }
2901
+ return key;
2902
+ };
2900
2903
  var SET_EVENT_ACTIVATIONS_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
2901
2904
  client.setQueryData(
2902
2905
  [
@@ -2908,6 +2911,7 @@ var SET_EVENT_ACTIVATIONS_QUERY_DATA = (client, keyParams, response, baseKeys =
2908
2911
  };
2909
2912
  var GetEventActivations = async ({
2910
2913
  eventId,
2914
+ accessLevel,
2911
2915
  pageParam,
2912
2916
  pageSize,
2913
2917
  orderBy,
@@ -2920,15 +2924,16 @@ var GetEventActivations = async ({
2920
2924
  page: pageParam || void 0,
2921
2925
  pageSize: pageSize || void 0,
2922
2926
  orderBy: orderBy || void 0,
2923
- search: search || void 0
2927
+ search: search || void 0,
2928
+ accessLevel: accessLevel || void 0
2924
2929
  }
2925
2930
  });
2926
2931
  return data;
2927
2932
  };
2928
- var useGetEventActivations = (eventId = "", params = {}, options = {}) => {
2933
+ var useGetEventActivations = (eventId = "", accessLevel, params = {}, options = {}) => {
2929
2934
  return useConnectedInfiniteQuery(
2930
- EVENT_ACTIVATIONS_QUERY_KEY(eventId),
2931
- (params2) => GetEventActivations({ eventId, ...params2 }),
2935
+ EVENT_ACTIVATIONS_QUERY_KEY(eventId, accessLevel),
2936
+ (params2) => GetEventActivations({ eventId, accessLevel, ...params2 }),
2932
2937
  params,
2933
2938
  {
2934
2939
  ...options,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@connectedxm/client",
3
- "version": "4.0.3",
3
+ "version": "4.0.4",
4
4
  "description": "Client API javascript SDK",
5
5
  "author": "ConnectedXM Inc.",
6
6
  "type": "module",