@connectedxm/admin 6.8.4 → 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
@@ -21956,10 +21956,11 @@ var useGetSupportTickets = (type, state, assignment, params = {}, options = {})
21956
21956
  };
21957
21957
 
21958
21958
  // src/queries/surveys/useGetSurveys.ts
21959
- var SURVEYS_QUERY_KEY = (eventId, sessionId) => {
21959
+ var SURVEYS_QUERY_KEY = (eventId, sessionId, activationId) => {
21960
21960
  const keys = ["SURVEYS"];
21961
21961
  if (eventId) keys.push(eventId);
21962
21962
  if (sessionId) keys.push(sessionId);
21963
+ if (activationId) keys.push(activationId);
21963
21964
  return keys;
21964
21965
  };
21965
21966
  var SET_SURVEYS_QUERY_DATA = (client, keyParams, response) => {
@@ -39214,6 +39215,19 @@ var UpdateSurvey = async ({
39214
39215
  if (queryClient && data.status === "ok") {
39215
39216
  queryClient.invalidateQueries({ queryKey: SURVEYS_QUERY_KEY() });
39216
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
+ }
39217
39231
  }
39218
39232
  return data;
39219
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;
@@ -3836,6 +3837,9 @@ interface Survey extends BaseSurvey {
3836
3837
  activationId: string | null;
3837
3838
  activation: BaseEventActivation | null;
3838
3839
  passTypes: BaseEventPassType[] | null;
3840
+ _count: {
3841
+ submissions: number;
3842
+ };
3839
3843
  }
3840
3844
  interface SurveyTranslation {
3841
3845
  id: string;
@@ -18589,7 +18593,7 @@ declare const useGetSurvey: (surveyId?: string, options?: SingleQueryOptions<Ret
18589
18593
  * @category Keys
18590
18594
  * @group Surveys
18591
18595
  */
18592
- declare const SURVEYS_QUERY_KEY: (eventId?: string, sessionId?: string) => string[];
18596
+ declare const SURVEYS_QUERY_KEY: (eventId?: string, sessionId?: string, activationId?: string) => string[];
18593
18597
  /**
18594
18598
  * @category Setters
18595
18599
  * @group Surveys
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;
@@ -3836,6 +3837,9 @@ interface Survey extends BaseSurvey {
3836
3837
  activationId: string | null;
3837
3838
  activation: BaseEventActivation | null;
3838
3839
  passTypes: BaseEventPassType[] | null;
3840
+ _count: {
3841
+ submissions: number;
3842
+ };
3839
3843
  }
3840
3844
  interface SurveyTranslation {
3841
3845
  id: string;
@@ -18589,7 +18593,7 @@ declare const useGetSurvey: (surveyId?: string, options?: SingleQueryOptions<Ret
18589
18593
  * @category Keys
18590
18594
  * @group Surveys
18591
18595
  */
18592
- declare const SURVEYS_QUERY_KEY: (eventId?: string, sessionId?: string) => string[];
18596
+ declare const SURVEYS_QUERY_KEY: (eventId?: string, sessionId?: string, activationId?: string) => string[];
18593
18597
  /**
18594
18598
  * @category Setters
18595
18599
  * @group Surveys
package/dist/index.js CHANGED
@@ -18644,10 +18644,11 @@ var useGetSupportTickets = (type, state, assignment, params = {}, options = {})
18644
18644
  };
18645
18645
 
18646
18646
  // src/queries/surveys/useGetSurveys.ts
18647
- var SURVEYS_QUERY_KEY = (eventId, sessionId) => {
18647
+ var SURVEYS_QUERY_KEY = (eventId, sessionId, activationId) => {
18648
18648
  const keys = ["SURVEYS"];
18649
18649
  if (eventId) keys.push(eventId);
18650
18650
  if (sessionId) keys.push(sessionId);
18651
+ if (activationId) keys.push(activationId);
18651
18652
  return keys;
18652
18653
  };
18653
18654
  var SET_SURVEYS_QUERY_DATA = (client, keyParams, response) => {
@@ -35905,6 +35906,19 @@ var UpdateSurvey = async ({
35905
35906
  if (queryClient && data.status === "ok") {
35906
35907
  queryClient.invalidateQueries({ queryKey: SURVEYS_QUERY_KEY() });
35907
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
+ }
35908
35922
  }
35909
35923
  return data;
35910
35924
  };
package/openapi.json CHANGED
@@ -72646,6 +72646,14 @@
72646
72646
  },
72647
72647
  "accessLevel": {
72648
72648
  "$ref": "#/components/schemas/PassTypeAccessLevel"
72649
+ },
72650
+ "survey": {
72651
+ "allOf": [
72652
+ {
72653
+ "$ref": "#/components/schemas/BaseSurvey"
72654
+ }
72655
+ ],
72656
+ "nullable": true
72649
72657
  }
72650
72658
  },
72651
72659
  "required": [
@@ -72657,7 +72665,8 @@
72657
72665
  "maxPoints",
72658
72666
  "startAfter",
72659
72667
  "type",
72660
- "accessLevel"
72668
+ "accessLevel",
72669
+ "survey"
72661
72670
  ]
72662
72671
  },
72663
72672
  "EventActivation": {
@@ -87255,6 +87264,17 @@
87255
87264
  "$ref": "#/components/schemas/BaseEventPassType"
87256
87265
  },
87257
87266
  "nullable": true
87267
+ },
87268
+ "_count": {
87269
+ "type": "object",
87270
+ "properties": {
87271
+ "submissions": {
87272
+ "type": "number"
87273
+ }
87274
+ },
87275
+ "required": [
87276
+ "submissions"
87277
+ ]
87258
87278
  }
87259
87279
  },
87260
87280
  "required": [
@@ -87268,7 +87288,8 @@
87268
87288
  "session",
87269
87289
  "activationId",
87270
87290
  "activation",
87271
- "passTypes"
87291
+ "passTypes",
87292
+ "_count"
87272
87293
  ]
87273
87294
  }
87274
87295
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@connectedxm/admin",
3
- "version": "6.8.4",
3
+ "version": "6.8.6",
4
4
  "description": "Admin API javascript SDK",
5
5
  "author": "ConnectedXM Inc.",
6
6
  "type": "module",