@connectedxm/admin 6.8.5 → 6.8.6

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 CHANGED
@@ -21969,7 +21969,6 @@ var SET_SURVEYS_QUERY_DATA = (client, keyParams, response) => {
21969
21969
  var GetSurveys = async ({
21970
21970
  eventId,
21971
21971
  sessionId,
21972
- activationId,
21973
21972
  pageParam,
21974
21973
  pageSize,
21975
21974
  orderBy,
@@ -21984,20 +21983,18 @@ var GetSurveys = async ({
21984
21983
  orderBy: orderBy || void 0,
21985
21984
  search: search || void 0,
21986
21985
  eventId: eventId || void 0,
21987
- sessionId: sessionId || void 0,
21988
- activationId: activationId || void 0
21986
+ sessionId: sessionId || void 0
21989
21987
  }
21990
21988
  });
21991
21989
  return data;
21992
21990
  };
21993
- var useGetSurveys = (eventId, sessionId, activationId, params = {}, options = {}) => {
21991
+ var useGetSurveys = (eventId, sessionId, params = {}, options = {}) => {
21994
21992
  return useConnectedInfiniteQuery(
21995
- SURVEYS_QUERY_KEY(eventId, sessionId, activationId),
21993
+ SURVEYS_QUERY_KEY(eventId, sessionId),
21996
21994
  (params2) => GetSurveys({
21997
21995
  ...params2,
21998
21996
  eventId,
21999
- sessionId,
22000
- activationId
21997
+ sessionId
22001
21998
  }),
22002
21999
  params,
22003
22000
  options
@@ -39218,6 +39215,19 @@ var UpdateSurvey = async ({
39218
39215
  if (queryClient && data.status === "ok") {
39219
39216
  queryClient.invalidateQueries({ queryKey: SURVEYS_QUERY_KEY() });
39220
39217
  SET_SURVEY_QUERY_DATA(queryClient, [data.data?.id], data);
39218
+ if (survey.eventId && survey.activationId !== void 0) {
39219
+ queryClient.invalidateQueries({
39220
+ queryKey: EVENT_ACTIVATIONS_QUERY_KEY(survey.eventId)
39221
+ });
39222
+ if (data.data.activationId) {
39223
+ queryClient.invalidateQueries({
39224
+ queryKey: EVENT_ACTIVATION_QUERY_KEY(
39225
+ survey.eventId,
39226
+ data.data.activationId
39227
+ )
39228
+ });
39229
+ }
39230
+ }
39221
39231
  }
39222
39232
  return data;
39223
39233
  };
package/dist/index.d.cts CHANGED
@@ -420,6 +420,7 @@ interface BaseEventActivation {
420
420
  startAfter: string | null;
421
421
  type: keyof typeof EventActivationType;
422
422
  accessLevel: keyof typeof PassTypeAccessLevel;
423
+ survey: BaseSurvey | null;
423
424
  }
424
425
  interface EventActivation extends BaseEventActivation {
425
426
  eventId: string;
@@ -18601,18 +18602,17 @@ declare const SET_SURVEYS_QUERY_DATA: (client: QueryClient, keyParams: Parameter
18601
18602
  interface GetSurveysProps extends InfiniteQueryParams {
18602
18603
  eventId?: string;
18603
18604
  sessionId?: string;
18604
- activationId?: string;
18605
18605
  }
18606
18606
  /**
18607
18607
  * @category Queries
18608
18608
  * @group Surveys
18609
18609
  */
18610
- declare const GetSurveys: ({ eventId, sessionId, activationId, pageParam, pageSize, orderBy, search, adminApiParams, }: GetSurveysProps) => Promise<ConnectedXMResponse<Survey[]>>;
18610
+ declare const GetSurveys: ({ eventId, sessionId, pageParam, pageSize, orderBy, search, adminApiParams, }: GetSurveysProps) => Promise<ConnectedXMResponse<Survey[]>>;
18611
18611
  /**
18612
18612
  * @category Hooks
18613
18613
  * @group Surveys
18614
18614
  */
18615
- declare const useGetSurveys: (eventId?: string, sessionId?: string, activationId?: string, params?: Omit<InfiniteQueryParams, "pageParam" | "queryClient" | "adminApiParams">, options?: InfiniteQueryOptions<Awaited<ReturnType<typeof GetSurveys>>>) => _tanstack_react_query.UseInfiniteQueryResult<_tanstack_react_query.InfiniteData<ConnectedXMResponse<Survey[]>, number>, axios.AxiosError<ConnectedXMResponse<null>, any>>;
18615
+ declare const useGetSurveys: (eventId?: string, sessionId?: string, params?: Omit<InfiniteQueryParams, "pageParam" | "queryClient" | "adminApiParams">, options?: InfiniteQueryOptions<Awaited<ReturnType<typeof GetSurveys>>>) => _tanstack_react_query.UseInfiniteQueryResult<_tanstack_react_query.InfiniteData<ConnectedXMResponse<Survey[]>, number>, axios.AxiosError<ConnectedXMResponse<null>, any>>;
18616
18616
 
18617
18617
  /**
18618
18618
  * @category Keys
package/dist/index.d.ts CHANGED
@@ -420,6 +420,7 @@ interface BaseEventActivation {
420
420
  startAfter: string | null;
421
421
  type: keyof typeof EventActivationType;
422
422
  accessLevel: keyof typeof PassTypeAccessLevel;
423
+ survey: BaseSurvey | null;
423
424
  }
424
425
  interface EventActivation extends BaseEventActivation {
425
426
  eventId: string;
@@ -18601,18 +18602,17 @@ declare const SET_SURVEYS_QUERY_DATA: (client: QueryClient, keyParams: Parameter
18601
18602
  interface GetSurveysProps extends InfiniteQueryParams {
18602
18603
  eventId?: string;
18603
18604
  sessionId?: string;
18604
- activationId?: string;
18605
18605
  }
18606
18606
  /**
18607
18607
  * @category Queries
18608
18608
  * @group Surveys
18609
18609
  */
18610
- declare const GetSurveys: ({ eventId, sessionId, activationId, pageParam, pageSize, orderBy, search, adminApiParams, }: GetSurveysProps) => Promise<ConnectedXMResponse<Survey[]>>;
18610
+ declare const GetSurveys: ({ eventId, sessionId, pageParam, pageSize, orderBy, search, adminApiParams, }: GetSurveysProps) => Promise<ConnectedXMResponse<Survey[]>>;
18611
18611
  /**
18612
18612
  * @category Hooks
18613
18613
  * @group Surveys
18614
18614
  */
18615
- declare const useGetSurveys: (eventId?: string, sessionId?: string, activationId?: string, params?: Omit<InfiniteQueryParams, "pageParam" | "queryClient" | "adminApiParams">, options?: InfiniteQueryOptions<Awaited<ReturnType<typeof GetSurveys>>>) => _tanstack_react_query.UseInfiniteQueryResult<_tanstack_react_query.InfiniteData<ConnectedXMResponse<Survey[]>, number>, axios.AxiosError<ConnectedXMResponse<null>, any>>;
18615
+ declare const useGetSurveys: (eventId?: string, sessionId?: string, params?: Omit<InfiniteQueryParams, "pageParam" | "queryClient" | "adminApiParams">, options?: InfiniteQueryOptions<Awaited<ReturnType<typeof GetSurveys>>>) => _tanstack_react_query.UseInfiniteQueryResult<_tanstack_react_query.InfiniteData<ConnectedXMResponse<Survey[]>, number>, axios.AxiosError<ConnectedXMResponse<null>, any>>;
18616
18616
 
18617
18617
  /**
18618
18618
  * @category Keys
package/dist/index.js CHANGED
@@ -18657,7 +18657,6 @@ var SET_SURVEYS_QUERY_DATA = (client, keyParams, response) => {
18657
18657
  var GetSurveys = async ({
18658
18658
  eventId,
18659
18659
  sessionId,
18660
- activationId,
18661
18660
  pageParam,
18662
18661
  pageSize,
18663
18662
  orderBy,
@@ -18672,20 +18671,18 @@ var GetSurveys = async ({
18672
18671
  orderBy: orderBy || void 0,
18673
18672
  search: search || void 0,
18674
18673
  eventId: eventId || void 0,
18675
- sessionId: sessionId || void 0,
18676
- activationId: activationId || void 0
18674
+ sessionId: sessionId || void 0
18677
18675
  }
18678
18676
  });
18679
18677
  return data;
18680
18678
  };
18681
- var useGetSurveys = (eventId, sessionId, activationId, params = {}, options = {}) => {
18679
+ var useGetSurveys = (eventId, sessionId, params = {}, options = {}) => {
18682
18680
  return useConnectedInfiniteQuery(
18683
- SURVEYS_QUERY_KEY(eventId, sessionId, activationId),
18681
+ SURVEYS_QUERY_KEY(eventId, sessionId),
18684
18682
  (params2) => GetSurveys({
18685
18683
  ...params2,
18686
18684
  eventId,
18687
- sessionId,
18688
- activationId
18685
+ sessionId
18689
18686
  }),
18690
18687
  params,
18691
18688
  options
@@ -35909,6 +35906,19 @@ var UpdateSurvey = async ({
35909
35906
  if (queryClient && data.status === "ok") {
35910
35907
  queryClient.invalidateQueries({ queryKey: SURVEYS_QUERY_KEY() });
35911
35908
  SET_SURVEY_QUERY_DATA(queryClient, [data.data?.id], data);
35909
+ if (survey.eventId && survey.activationId !== void 0) {
35910
+ queryClient.invalidateQueries({
35911
+ queryKey: EVENT_ACTIVATIONS_QUERY_KEY(survey.eventId)
35912
+ });
35913
+ if (data.data.activationId) {
35914
+ queryClient.invalidateQueries({
35915
+ queryKey: EVENT_ACTIVATION_QUERY_KEY(
35916
+ survey.eventId,
35917
+ data.data.activationId
35918
+ )
35919
+ });
35920
+ }
35921
+ }
35912
35922
  }
35913
35923
  return data;
35914
35924
  };
package/openapi.json CHANGED
@@ -64172,15 +64172,6 @@
64172
64172
  "description": "Filter by sessionId",
64173
64173
  "required": false
64174
64174
  },
64175
- {
64176
- "in": "query",
64177
- "name": "activationId",
64178
- "schema": {
64179
- "type": "string"
64180
- },
64181
- "description": "Filter by activationId",
64182
- "required": false
64183
- },
64184
64175
  {
64185
64176
  "in": "query",
64186
64177
  "name": "page",
@@ -72655,6 +72646,14 @@
72655
72646
  },
72656
72647
  "accessLevel": {
72657
72648
  "$ref": "#/components/schemas/PassTypeAccessLevel"
72649
+ },
72650
+ "survey": {
72651
+ "allOf": [
72652
+ {
72653
+ "$ref": "#/components/schemas/BaseSurvey"
72654
+ }
72655
+ ],
72656
+ "nullable": true
72658
72657
  }
72659
72658
  },
72660
72659
  "required": [
@@ -72666,7 +72665,8 @@
72666
72665
  "maxPoints",
72667
72666
  "startAfter",
72668
72667
  "type",
72669
- "accessLevel"
72668
+ "accessLevel",
72669
+ "survey"
72670
72670
  ]
72671
72671
  },
72672
72672
  "EventActivation": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@connectedxm/admin",
3
- "version": "6.8.5",
3
+ "version": "6.8.6",
4
4
  "description": "Admin API javascript SDK",
5
5
  "author": "ConnectedXM Inc.",
6
6
  "type": "module",