@connectedxm/client 1.5.1 → 1.5.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.js CHANGED
@@ -28,8 +28,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
29
 
30
30
  // src/index.ts
31
- var src_exports = {};
32
- __export(src_exports, {
31
+ var index_exports = {};
32
+ __export(index_exports, {
33
33
  ACCOUNTS_POPULAR_QUERY_KEY: () => ACCOUNTS_POPULAR_QUERY_KEY,
34
34
  ACCOUNTS_QUERY_KEY: () => ACCOUNTS_QUERY_KEY,
35
35
  ACCOUNT_ACTIVITIES_QUERY_KEY: () => ACCOUNT_ACTIVITIES_QUERY_KEY,
@@ -172,6 +172,9 @@ __export(src_exports, {
172
172
  EVENT_FAQ_SECTION_QUERY_KEY: () => EVENT_FAQ_SECTION_QUERY_KEY,
173
173
  EVENT_FAQ_SECTION_QUESTIONS_QUERY_KEY: () => EVENT_FAQ_SECTION_QUESTIONS_QUERY_KEY,
174
174
  EVENT_FAQ_SECTION_QUESTION_QUERY_KEY: () => EVENT_FAQ_SECTION_QUESTION_QUERY_KEY,
175
+ EVENT_IMAGES_QUERY_KEY: () => EVENT_IMAGES_QUERY_KEY,
176
+ EVENT_IMAGE_QUERY_KEY: () => EVENT_IMAGE_QUERY_KEY,
177
+ EVENT_MEDIA_QUERY_KEY: () => EVENT_MEDIA_QUERY_KEY,
175
178
  EVENT_PAGES_QUERY_KEY: () => EVENT_PAGES_QUERY_KEY,
176
179
  EVENT_PAGE_QUERY_KEY: () => EVENT_PAGE_QUERY_KEY,
177
180
  EVENT_QUERY_KEY: () => EVENT_QUERY_KEY,
@@ -257,6 +260,9 @@ __export(src_exports, {
257
260
  GetEventFAQSectionQuestion: () => GetEventFAQSectionQuestion,
258
261
  GetEventFaqSections: () => GetEventFaqSections,
259
262
  GetEventFaqs: () => GetEventFaqs,
263
+ GetEventImage: () => GetEventImage,
264
+ GetEventImages: () => GetEventImages,
265
+ GetEventMedia: () => GetEventMedia,
260
266
  GetEventPage: () => GetEventPage,
261
267
  GetEventPages: () => GetEventPages,
262
268
  GetEventQuestionSearchValues: () => GetEventQuestionSearchValues,
@@ -376,6 +382,11 @@ __export(src_exports, {
376
382
  GetSeriesList: () => GetSeriesList,
377
383
  GetSubscribedChannels: () => GetSubscribedChannels,
378
384
  GetSubscribedContents: () => GetSubscribedContents,
385
+ GetSurvey: () => GetSurvey,
386
+ GetSurveyQuestionSearchValues: () => GetSurveyQuestionSearchValues,
387
+ GetSurveySubmission: () => GetSurveySubmission,
388
+ GetSurveySubmissionSections: () => GetSurveySubmissionSections,
389
+ GetSurveySubmissions: () => GetSurveySubmissions,
379
390
  GetThread: () => GetThread,
380
391
  GetThreadEvent: () => GetThreadEvent,
381
392
  GetThreadEvents: () => GetThreadEvents,
@@ -557,6 +568,9 @@ __export(src_exports, {
557
568
  SET_EVENT_FAQ_SECTION_QUERY_DATA: () => SET_EVENT_FAQ_SECTION_QUERY_DATA,
558
569
  SET_EVENT_FAQ_SECTION_QUESTIONS_QUERY_DATA: () => SET_EVENT_FAQ_SECTION_QUESTIONS_QUERY_DATA,
559
570
  SET_EVENT_FAQ_SECTION_QUESTION_QUERY_DATA: () => SET_EVENT_FAQ_SECTION_QUESTION_QUERY_DATA,
571
+ SET_EVENT_IMAGES_QUERY_DATA: () => SET_EVENT_IMAGES_QUERY_DATA,
572
+ SET_EVENT_IMAGE_QUERY_DATA: () => SET_EVENT_IMAGE_QUERY_DATA,
573
+ SET_EVENT_MEDIA_QUERY_DATA: () => SET_EVENT_MEDIA_QUERY_DATA,
560
574
  SET_EVENT_PAGES_QUERY_DATA: () => SET_EVENT_PAGES_QUERY_DATA,
561
575
  SET_EVENT_PAGE_QUERY_DATA: () => SET_EVENT_PAGE_QUERY_DATA,
562
576
  SET_EVENT_QUERY_DATA: () => SET_EVENT_QUERY_DATA,
@@ -620,9 +634,12 @@ __export(src_exports, {
620
634
  SET_SELF_EVENT_REGISTRATION_ROOM_TYPES_QUERY_DATA: () => SET_SELF_EVENT_REGISTRATION_ROOM_TYPES_QUERY_DATA,
621
635
  SET_SELF_GROUP_MEMBERSHIP_QUERY_DATA: () => SET_SELF_GROUP_MEMBERSHIP_QUERY_DATA,
622
636
  SET_SELF_QUERY_DATA: () => SET_SELF_QUERY_DATA,
637
+ SET_SELF_SURVEY_SUBMISSION_QUERY_DATA: () => SET_SELF_SURVEY_SUBMISSION_QUERY_DATA,
623
638
  SET_SERIES_EVENTS_QUERY_DATA: () => SET_SERIES_EVENTS_QUERY_DATA,
624
639
  SET_SERIES_LIST_QUERY_DATA: () => SET_SERIES_LIST_QUERY_DATA,
625
640
  SET_SERIES_QUERY_DATA: () => SET_SERIES_QUERY_DATA,
641
+ SET_SURVEY_QUERY_DATA: () => SET_SURVEY_QUERY_DATA,
642
+ SET_SURVEY_SUBMISSION_SECTIONS_QUERY_DATA: () => SET_SURVEY_SUBMISSION_SECTIONS_QUERY_DATA,
626
643
  SET_THREADS_QUERY_DATA: () => SET_THREADS_QUERY_DATA,
627
644
  SET_THREAD_EVENTS_QUERY_DATA: () => SET_THREAD_EVENTS_QUERY_DATA,
628
645
  SET_THREAD_EVENT_QUERY_DATA: () => SET_THREAD_EVENT_QUERY_DATA,
@@ -636,15 +653,23 @@ __export(src_exports, {
636
653
  SET_THREAD_QUERY_DATA: () => SET_THREAD_QUERY_DATA,
637
654
  SUBSCRIBED_CHANNELS_QUERY_KEY: () => SUBSCRIBED_CHANNELS_QUERY_KEY,
638
655
  SUBSCRIBED_CONTENTS_QUERY_KEY: () => SUBSCRIBED_CONTENTS_QUERY_KEY,
656
+ SURVEY_QUERY_KEY: () => SURVEY_QUERY_KEY,
657
+ SURVEY_QUESTION_SEARCH_VALUES_QUERY_KEY: () => SURVEY_QUESTION_SEARCH_VALUES_QUERY_KEY,
658
+ SURVEY_SUBMISSIONS_QUERY_KEY: () => SURVEY_SUBMISSIONS_QUERY_KEY,
659
+ SURVEY_SUBMISSION_QUERY_KEY: () => SURVEY_SUBMISSION_QUERY_KEY,
660
+ SURVEY_SUBMISSION_SECTIONS_QUERY_KEY: () => SURVEY_SUBMISSION_SECTIONS_QUERY_KEY,
639
661
  SelectSelfEventRegistrationCoupon: () => SelectSelfEventRegistrationCoupon,
640
662
  SelfCreateActivity: () => SelfCreateActivity,
641
663
  SelfUpdateGroupMembership: () => SelfUpdateGroupMembership,
642
664
  SessionPassStatus: () => SessionPassStatus,
643
665
  SetContentPublishSchedule: () => SetContentPublishSchedule,
666
+ StartSurvey: () => StartSurvey,
644
667
  SubmitSelfEventRegistration: () => SubmitSelfEventRegistration,
645
668
  SubmitSelfEventRegistrationSessionPasses: () => SubmitSelfEventRegistrationSessionPasses,
669
+ SubmitSurvey: () => SubmitSurvey,
646
670
  SubscriptionStatus: () => SubscriptionStatus,
647
671
  SupportTicketType: () => SupportTicketType,
672
+ SurveyQuestionType: () => SurveyQuestionType,
648
673
  THREADS_QUERY_KEY: () => THREADS_QUERY_KEY,
649
674
  THREAD_EVENTS_QUERY_KEY: () => THREAD_EVENTS_QUERY_KEY,
650
675
  THREAD_EVENT_QUERY_KEY: () => THREAD_EVENT_QUERY_KEY,
@@ -693,11 +718,13 @@ __export(src_exports, {
693
718
  UpdateSelfNotificationPreferences: () => UpdateSelfNotificationPreferences,
694
719
  UpdateSelfPushDevice: () => UpdateSelfPushDevice,
695
720
  UpdateSubscriptionPaymentMethod: () => UpdateSubscriptionPaymentMethod,
721
+ UpdateSurveyResponse: () => UpdateSurveyResponse,
696
722
  UpdateThread: () => UpdateThread,
697
723
  UpdateThreadMember: () => UpdateThreadMember,
698
724
  UpdateThreadMessage: () => UpdateThreadMessage,
699
725
  UploadChannelContentImage: () => UploadChannelContentImage,
700
726
  UploadFile: () => UploadFile,
727
+ UploadSurveyResponseFile: () => UploadSurveyResponseFile,
701
728
  isListing: () => isListing,
702
729
  isManagedCoupon: () => isManagedCoupon,
703
730
  isRegistrationQuestion: () => isRegistrationQuestion,
@@ -865,6 +892,9 @@ __export(src_exports, {
865
892
  useGetEventFAQSectionQuestion: () => useGetEventFAQSectionQuestion,
866
893
  useGetEventFaqSections: () => useGetEventFaqSections,
867
894
  useGetEventFaqs: () => useGetEventFaqs,
895
+ useGetEventImage: () => useGetEventImage,
896
+ useGetEventImages: () => useGetEventImages,
897
+ useGetEventMedia: () => useGetEventMedia,
868
898
  useGetEventPage: () => useGetEventPage,
869
899
  useGetEventPages: () => useGetEventPages,
870
900
  useGetEventQuestionSearchValues: () => useGetEventQuestionSearchValues,
@@ -984,6 +1014,11 @@ __export(src_exports, {
984
1014
  useGetSeriesList: () => useGetSeriesList,
985
1015
  useGetSubscribedChannels: () => useGetSubscribedChannels,
986
1016
  useGetSubscribedContents: () => useGetSubscribedContents,
1017
+ useGetSurvey: () => useGetSurvey,
1018
+ useGetSurveyQuestionSearchValues: () => useGetSurveyQuestionSearchValues,
1019
+ useGetSurveySubmission: () => useGetSurveySubmission,
1020
+ useGetSurveySubmissionSections: () => useGetSurveySubmissionSections,
1021
+ useGetSurveySubmissions: () => useGetSurveySubmissions,
987
1022
  useGetThread: () => useGetThread,
988
1023
  useGetThreadEvent: () => useGetThreadEvent,
989
1024
  useGetThreadEvents: () => useGetThreadEvents,
@@ -1024,8 +1059,10 @@ __export(src_exports, {
1024
1059
  useSelfCreateActivity: () => useSelfCreateActivity,
1025
1060
  useSelfUpdateGroupMembership: () => useSelfUpdateGroupMembership,
1026
1061
  useSetContentPublishSchedule: () => useSetContentPublishSchedule,
1062
+ useStartSurvey: () => useStartSurvey,
1027
1063
  useSubmitSelfEventRegistration: () => useSubmitSelfEventRegistration,
1028
1064
  useSubmitSelfEventRegistrationSessionPasses: () => useSubmitSelfEventRegistrationSessionPasses,
1065
+ useSubmitSurvey: () => useSubmitSurvey,
1029
1066
  useTransferPass: () => useTransferPass,
1030
1067
  useUndoCheckinListingAttendeePass: () => useUndoCheckinListingAttendeePass,
1031
1068
  useUnfollowAccount: () => useUnfollowAccount,
@@ -1057,13 +1094,15 @@ __export(src_exports, {
1057
1094
  useUpdateSelfNotificationPreferences: () => useUpdateSelfNotificationPreferences,
1058
1095
  useUpdateSelfPushDevice: () => useUpdateSelfPushDevice,
1059
1096
  useUpdateSubscriptionPaymentMethod: () => useUpdateSubscriptionPaymentMethod,
1097
+ useUpdateSurveyResponse: () => useUpdateSurveyResponse,
1060
1098
  useUpdateThread: () => useUpdateThread,
1061
1099
  useUpdateThreadMember: () => useUpdateThreadMember,
1062
1100
  useUpdateThreadMessage: () => useUpdateThreadMessage,
1063
1101
  useUploadChannelContentImage: () => useUploadChannelContentImage,
1064
- useUploadFile: () => useUploadFile
1102
+ useUploadFile: () => useUploadFile,
1103
+ useUploadSurveyResponseFile: () => useUploadSurveyResponseFile
1065
1104
  });
1066
- module.exports = __toCommonJS(src_exports);
1105
+ module.exports = __toCommonJS(index_exports);
1067
1106
 
1068
1107
  // src/ConnectedXMProvider.tsx
1069
1108
  var import_react = __toESM(require("react"));
@@ -1509,6 +1548,7 @@ var OrganizationModuleType = /* @__PURE__ */ ((OrganizationModuleType2) => {
1509
1548
  OrganizationModuleType2["invoices"] = "invoices";
1510
1549
  OrganizationModuleType2["announcements"] = "announcements";
1511
1550
  OrganizationModuleType2["bookings"] = "bookings";
1551
+ OrganizationModuleType2["surveys"] = "surveys";
1512
1552
  return OrganizationModuleType2;
1513
1553
  })(OrganizationModuleType || {});
1514
1554
  var PaymentIntegrationType = /* @__PURE__ */ ((PaymentIntegrationType2) => {
@@ -1527,6 +1567,20 @@ var DayOfWeek = /* @__PURE__ */ ((DayOfWeek2) => {
1527
1567
  DayOfWeek2["saturday"] = "saturday";
1528
1568
  return DayOfWeek2;
1529
1569
  })(DayOfWeek || {});
1570
+ var SurveyQuestionType = /* @__PURE__ */ ((SurveyQuestionType2) => {
1571
+ SurveyQuestionType2["text"] = "text";
1572
+ SurveyQuestionType2["textarea"] = "textarea";
1573
+ SurveyQuestionType2["number"] = "number";
1574
+ SurveyQuestionType2["time"] = "time";
1575
+ SurveyQuestionType2["date"] = "date";
1576
+ SurveyQuestionType2["toggle"] = "toggle";
1577
+ SurveyQuestionType2["select"] = "select";
1578
+ SurveyQuestionType2["radio"] = "radio";
1579
+ SurveyQuestionType2["checkbox"] = "checkbox";
1580
+ SurveyQuestionType2["search"] = "search";
1581
+ SurveyQuestionType2["file"] = "file";
1582
+ return SurveyQuestionType2;
1583
+ })(SurveyQuestionType || {});
1530
1584
 
1531
1585
  // src/utilities/AppendInfiniteQuery.ts
1532
1586
  var import_immer = require("immer");
@@ -4518,6 +4572,116 @@ var useGetEventSponsorship = (eventId = "", sponsorshipId = "", options = {}) =>
4518
4572
  );
4519
4573
  };
4520
4574
 
4575
+ // src/queries/events/useGetEventMedia.ts
4576
+ var EVENT_MEDIA_QUERY_KEY = (eventId, type) => [...EVENT_QUERY_KEY(eventId), "MEDIA", type || "all"];
4577
+ var SET_EVENT_MEDIA_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
4578
+ client.setQueryData(
4579
+ [
4580
+ ...EVENT_MEDIA_QUERY_KEY(...keyParams),
4581
+ ...GetBaseInfiniteQueryKeys(...baseKeys)
4582
+ ],
4583
+ setFirstPageData(response)
4584
+ );
4585
+ };
4586
+ var GetEventMedia = async ({
4587
+ eventId,
4588
+ type,
4589
+ pageParam,
4590
+ pageSize,
4591
+ orderBy,
4592
+ search,
4593
+ clientApiParams
4594
+ }) => {
4595
+ const clientApi = await GetClientAPI(clientApiParams);
4596
+ const { data } = await clientApi.get(`/events/${eventId}/media`, {
4597
+ params: {
4598
+ type: type || void 0,
4599
+ page: pageParam || void 0,
4600
+ pageSize: pageSize || void 0,
4601
+ orderBy: orderBy || void 0,
4602
+ search: search || void 0
4603
+ }
4604
+ });
4605
+ return data;
4606
+ };
4607
+ var useGetEventMedia = (eventId = "", type, params = {}, options = {}) => {
4608
+ return useConnectedInfiniteQuery(
4609
+ EVENT_MEDIA_QUERY_KEY(eventId, type),
4610
+ (params2) => GetEventMedia({ eventId, type, ...params2 }),
4611
+ params,
4612
+ {
4613
+ ...options,
4614
+ enabled: !!eventId && (options?.enabled ?? true)
4615
+ }
4616
+ );
4617
+ };
4618
+
4619
+ // src/queries/events/useGetEventImages.ts
4620
+ var EVENT_IMAGES_QUERY_KEY = (eventId) => [
4621
+ ...EVENT_QUERY_KEY(eventId),
4622
+ "IMAGES"
4623
+ ];
4624
+ var SET_EVENT_IMAGES_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
4625
+ client.setQueryData(
4626
+ [
4627
+ ...EVENT_IMAGES_QUERY_KEY(...keyParams),
4628
+ ...GetBaseSingleQueryKeys(...baseKeys)
4629
+ ],
4630
+ response
4631
+ );
4632
+ };
4633
+ var GetEventImages = async ({
4634
+ eventId,
4635
+ clientApiParams
4636
+ }) => {
4637
+ const clientApi = await GetClientAPI(clientApiParams);
4638
+ const { data } = await clientApi.get(`/events/${eventId}/images`);
4639
+ return data;
4640
+ };
4641
+ var useGetEventImages = (eventId = "", options = {}) => {
4642
+ return useConnectedSingleQuery(
4643
+ EVENT_IMAGES_QUERY_KEY(eventId),
4644
+ (params) => GetEventImages({ eventId, ...params }),
4645
+ {
4646
+ ...options,
4647
+ enabled: !!eventId && (options?.enabled ?? true)
4648
+ }
4649
+ );
4650
+ };
4651
+
4652
+ // src/queries/events/useGetEventImage.ts
4653
+ var EVENT_IMAGE_QUERY_KEY = (eventId, galleryImageId) => [...EVENT_IMAGES_QUERY_KEY(eventId), galleryImageId];
4654
+ var SET_EVENT_IMAGE_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
4655
+ client.setQueryData(
4656
+ [
4657
+ ...EVENT_IMAGE_QUERY_KEY(...keyParams),
4658
+ ...GetBaseSingleQueryKeys(...baseKeys)
4659
+ ],
4660
+ response
4661
+ );
4662
+ };
4663
+ var GetEventImage = async ({
4664
+ eventId,
4665
+ galleryImageId,
4666
+ clientApiParams
4667
+ }) => {
4668
+ const clientApi = await GetClientAPI(clientApiParams);
4669
+ const { data } = await clientApi.get(
4670
+ `/events/${eventId}/images/${galleryImageId}`
4671
+ );
4672
+ return data;
4673
+ };
4674
+ var useGetEventImage = (eventId = "", galleryImageId, options = {}) => {
4675
+ return useConnectedSingleQuery(
4676
+ EVENT_IMAGE_QUERY_KEY(eventId, galleryImageId),
4677
+ (params) => GetEventImage({ eventId, galleryImageId, ...params }),
4678
+ {
4679
+ ...options,
4680
+ enabled: !!eventId && !!galleryImageId && (options?.enabled ?? true)
4681
+ }
4682
+ );
4683
+ };
4684
+
4521
4685
  // src/queries/groups/useGetAllGroupEvents.ts
4522
4686
  var ALL_GROUP_EVENTS = (past) => [
4523
4687
  ...EVENTS_QUERY_KEY(past),
@@ -9267,6 +9431,218 @@ var useGetIntegrationAuth = (integrationType, expiration, options = {}) => {
9267
9431
  );
9268
9432
  };
9269
9433
 
9434
+ // src/queries/surveys/useGetSurvey.ts
9435
+ var SURVEY_QUERY_KEY = (surveyId) => [
9436
+ "SURVEYS",
9437
+ surveyId
9438
+ ];
9439
+ var SET_SURVEY_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
9440
+ client.setQueryData(
9441
+ [...SURVEY_QUERY_KEY(...keyParams), ...GetBaseSingleQueryKeys(...baseKeys)],
9442
+ response
9443
+ );
9444
+ };
9445
+ var GetSurvey = async ({
9446
+ surveyId,
9447
+ clientApiParams
9448
+ }) => {
9449
+ const clientApi = await GetClientAPI(clientApiParams);
9450
+ const { data } = await clientApi.get(`/surveys/${surveyId}`);
9451
+ return data;
9452
+ };
9453
+ var useGetSurvey = (surveyId, options = {}) => {
9454
+ return useConnectedSingleQuery_default(
9455
+ SURVEY_QUERY_KEY(surveyId),
9456
+ (params) => GetSurvey({
9457
+ surveyId,
9458
+ ...params
9459
+ }),
9460
+ {
9461
+ ...options,
9462
+ staleTime: Infinity,
9463
+ refetchOnWindowFocus: false,
9464
+ refetchOnReconnect: false,
9465
+ enabled: !!surveyId && (options?.enabled ?? true)
9466
+ }
9467
+ );
9468
+ };
9469
+
9470
+ // src/queries/surveys/useGetSurveySubmissions.ts
9471
+ var SURVEY_SUBMISSIONS_QUERY_KEY = (surveyId, status) => {
9472
+ const key = [
9473
+ ...SELF_QUERY_KEY(),
9474
+ ...SURVEY_QUERY_KEY(surveyId),
9475
+ "SUBMISSIONS"
9476
+ ];
9477
+ if (status) key.push(status);
9478
+ return key;
9479
+ };
9480
+ var GetSurveySubmissions = async ({
9481
+ surveyId,
9482
+ status,
9483
+ pageParam,
9484
+ pageSize,
9485
+ orderBy,
9486
+ search,
9487
+ clientApiParams
9488
+ }) => {
9489
+ const clientApi = await GetClientAPI(clientApiParams);
9490
+ const { data } = await clientApi.get(`/surveys/${surveyId}/submissions`, {
9491
+ params: {
9492
+ page: pageParam || void 0,
9493
+ pageSize: pageSize || void 0,
9494
+ orderBy: orderBy || void 0,
9495
+ search: search || void 0,
9496
+ status: status || void 0
9497
+ }
9498
+ });
9499
+ return data;
9500
+ };
9501
+ var useGetSurveySubmissions = (surveyId = "", status, params = {}, options = {}) => {
9502
+ const { authenticated } = useConnectedXM();
9503
+ return useConnectedInfiniteQuery(
9504
+ SURVEY_SUBMISSIONS_QUERY_KEY(surveyId, status),
9505
+ (params2) => GetSurveySubmissions({
9506
+ surveyId,
9507
+ status,
9508
+ ...params2
9509
+ }),
9510
+ params,
9511
+ {
9512
+ ...options,
9513
+ enabled: !!authenticated && !!surveyId && (options?.enabled ?? true)
9514
+ }
9515
+ );
9516
+ };
9517
+
9518
+ // src/queries/surveys/useGetSurveySubmission.ts
9519
+ var SURVEY_SUBMISSION_QUERY_KEY = (surveyId, submissionId) => [
9520
+ ...SURVEY_SUBMISSIONS_QUERY_KEY(surveyId),
9521
+ "SUBMISSIONS",
9522
+ submissionId
9523
+ ];
9524
+ var SET_SELF_SURVEY_SUBMISSION_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
9525
+ client.setQueryData(
9526
+ [
9527
+ ...SURVEY_SUBMISSION_QUERY_KEY(...keyParams),
9528
+ ...GetBaseSingleQueryKeys(...baseKeys)
9529
+ ],
9530
+ response
9531
+ );
9532
+ };
9533
+ var GetSurveySubmission = async ({
9534
+ surveyId,
9535
+ submissionId,
9536
+ clientApiParams
9537
+ }) => {
9538
+ const clientApi = await GetClientAPI(clientApiParams);
9539
+ const { data } = await clientApi.get(
9540
+ `/surveys/${surveyId}/submissions/${submissionId}`
9541
+ );
9542
+ return data;
9543
+ };
9544
+ var useGetSurveySubmission = (surveyId, submissionId, options = {}) => {
9545
+ return useConnectedSingleQuery_default(
9546
+ SURVEY_SUBMISSION_QUERY_KEY(surveyId, submissionId),
9547
+ (params) => GetSurveySubmission({
9548
+ surveyId,
9549
+ submissionId,
9550
+ ...params
9551
+ }),
9552
+ {
9553
+ ...options,
9554
+ staleTime: Infinity,
9555
+ refetchOnWindowFocus: false,
9556
+ refetchOnReconnect: false,
9557
+ enabled: !!surveyId && !!submissionId && (options?.enabled ?? true)
9558
+ }
9559
+ );
9560
+ };
9561
+
9562
+ // src/queries/surveys/useGetSurveySubmissionSections.ts
9563
+ var SURVEY_SUBMISSION_SECTIONS_QUERY_KEY = (surveyId, submissionId) => [
9564
+ ...SURVEY_SUBMISSION_QUERY_KEY(surveyId, submissionId),
9565
+ "SECTIONS"
9566
+ ];
9567
+ var SET_SURVEY_SUBMISSION_SECTIONS_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
9568
+ client.setQueryData(
9569
+ [
9570
+ ...SURVEY_SUBMISSION_SECTIONS_QUERY_KEY(...keyParams),
9571
+ ...GetBaseSingleQueryKeys(...baseKeys)
9572
+ ],
9573
+ response
9574
+ );
9575
+ };
9576
+ var GetSurveySubmissionSections = async ({
9577
+ surveyId,
9578
+ submissionId,
9579
+ clientApiParams
9580
+ }) => {
9581
+ const clientApi = await GetClientAPI(clientApiParams);
9582
+ const { data } = await clientApi.get(
9583
+ `/surveys/${surveyId}/submissions/${submissionId}/sections`
9584
+ );
9585
+ return data;
9586
+ };
9587
+ var useGetSurveySubmissionSections = (surveyId, submissionId, options = {}) => {
9588
+ return useConnectedSingleQuery_default(
9589
+ SURVEY_SUBMISSION_SECTIONS_QUERY_KEY(surveyId, submissionId),
9590
+ (params) => GetSurveySubmissionSections({
9591
+ surveyId,
9592
+ submissionId,
9593
+ ...params
9594
+ }),
9595
+ {
9596
+ ...options,
9597
+ staleTime: Infinity,
9598
+ refetchOnWindowFocus: false,
9599
+ refetchOnReconnect: false,
9600
+ enabled: !!surveyId && !!submissionId && (options?.enabled ?? true)
9601
+ }
9602
+ );
9603
+ };
9604
+
9605
+ // src/queries/surveys/useGetSurveyQuestionSearchValues.ts
9606
+ var SURVEY_QUESTION_SEARCH_VALUES_QUERY_KEY = (surveyId, questionId) => [...SURVEY_QUERY_KEY(surveyId), "QUESTIONS", questionId, "VALUES"];
9607
+ var GetSurveyQuestionSearchValues = async ({
9608
+ surveyId,
9609
+ questionId,
9610
+ pageParam,
9611
+ pageSize,
9612
+ orderBy,
9613
+ search,
9614
+ clientApiParams
9615
+ }) => {
9616
+ const clientApi = await GetClientAPI(clientApiParams);
9617
+ const { data } = await clientApi.get(
9618
+ `/surveys/${surveyId}/questions/${questionId}/values`,
9619
+ {
9620
+ params: {
9621
+ page: pageParam || void 0,
9622
+ pageSize: pageSize || void 0,
9623
+ orderBy: orderBy || void 0,
9624
+ search: search || void 0
9625
+ }
9626
+ }
9627
+ );
9628
+ return data;
9629
+ };
9630
+ var useGetSurveyQuestionSearchValues = (surveyId = "", questionId = "", params = {}, options = {}) => {
9631
+ return useConnectedInfiniteQuery(
9632
+ SURVEY_QUESTION_SEARCH_VALUES_QUERY_KEY(surveyId, questionId),
9633
+ (params2) => GetSurveyQuestionSearchValues({
9634
+ surveyId,
9635
+ questionId,
9636
+ ...params2
9637
+ }),
9638
+ params,
9639
+ {
9640
+ ...options,
9641
+ enabled: !!surveyId && !!questionId && (options?.enabled ?? true)
9642
+ }
9643
+ );
9644
+ };
9645
+
9270
9646
  // src/mutations/useConnectedMutation.ts
9271
9647
  var import_react_query4 = require("@tanstack/react-query");
9272
9648
  var useConnectedMutation = (mutation, options) => {
@@ -13115,6 +13491,86 @@ var EnableIntegration = async ({
13115
13491
  var useEnableIntegration = (options = {}) => {
13116
13492
  return useConnectedMutation_default(EnableIntegration, options);
13117
13493
  };
13494
+
13495
+ // src/mutations/surveys/useStartSurvey.ts
13496
+ var StartSurvey = async ({
13497
+ surveyId,
13498
+ clientApiParams
13499
+ }) => {
13500
+ const clientApi = await GetClientAPI(clientApiParams);
13501
+ const { data } = await clientApi.post(
13502
+ `/surveys/${surveyId}/submissions`
13503
+ );
13504
+ return data;
13505
+ };
13506
+ var useStartSurvey = (options = {}) => {
13507
+ return useConnectedMutation_default(StartSurvey, options);
13508
+ };
13509
+
13510
+ // src/mutations/surveys/useSubmitSurvey.ts
13511
+ var SubmitSurvey = async ({
13512
+ surveyId,
13513
+ submissionId,
13514
+ responses,
13515
+ clientApiParams,
13516
+ queryClient
13517
+ }) => {
13518
+ const clientApi = await GetClientAPI(clientApiParams);
13519
+ const { data } = await clientApi.post(
13520
+ `/surveys/${surveyId}/submissions/${submissionId}/submit`,
13521
+ responses
13522
+ );
13523
+ if (queryClient && data.status === "ok") {
13524
+ queryClient.invalidateQueries({
13525
+ queryKey: SURVEY_SUBMISSION_QUERY_KEY(surveyId, submissionId)
13526
+ });
13527
+ }
13528
+ return data;
13529
+ };
13530
+ var useSubmitSurvey = (options = {}) => {
13531
+ return useConnectedMutation_default(SubmitSurvey, options);
13532
+ };
13533
+
13534
+ // src/mutations/surveys/useUpdateSurveyResponse.ts
13535
+ var UpdateSurveyResponse = async ({
13536
+ surveyId,
13537
+ submissionId,
13538
+ questionId,
13539
+ response,
13540
+ clientApiParams
13541
+ }) => {
13542
+ const clientApi = await GetClientAPI(clientApiParams);
13543
+ const { data } = await clientApi.put(
13544
+ `/surveys/${surveyId}/submissions/${submissionId}/questions/${questionId}`,
13545
+ { response }
13546
+ );
13547
+ return data;
13548
+ };
13549
+ var useUpdateSurveyResponse = (options = {}) => {
13550
+ return useConnectedMutation_default(UpdateSurveyResponse, options);
13551
+ };
13552
+
13553
+ // src/mutations/surveys/useUploadSurveyResponseFile.ts
13554
+ var UploadSurveyResponseFile = async ({
13555
+ clientApiParams,
13556
+ surveyId,
13557
+ submissionId,
13558
+ dataUri,
13559
+ name
13560
+ }) => {
13561
+ const clientApi = await GetClientAPI(clientApiParams);
13562
+ const { data } = await clientApi.post(
13563
+ `/surveys/${surveyId}/submissions/${submissionId}/files`,
13564
+ {
13565
+ dataUri,
13566
+ name
13567
+ }
13568
+ );
13569
+ return data;
13570
+ };
13571
+ var useUploadSurveyResponseFile = (options = {}) => {
13572
+ return useConnectedMutation_default(UploadSurveyResponseFile, options);
13573
+ };
13118
13574
  // Annotate the CommonJS export names for ESM import in node:
13119
13575
  0 && (module.exports = {
13120
13576
  ACCOUNTS_POPULAR_QUERY_KEY,
@@ -13259,6 +13715,9 @@ var useEnableIntegration = (options = {}) => {
13259
13715
  EVENT_FAQ_SECTION_QUERY_KEY,
13260
13716
  EVENT_FAQ_SECTION_QUESTIONS_QUERY_KEY,
13261
13717
  EVENT_FAQ_SECTION_QUESTION_QUERY_KEY,
13718
+ EVENT_IMAGES_QUERY_KEY,
13719
+ EVENT_IMAGE_QUERY_KEY,
13720
+ EVENT_MEDIA_QUERY_KEY,
13262
13721
  EVENT_PAGES_QUERY_KEY,
13263
13722
  EVENT_PAGE_QUERY_KEY,
13264
13723
  EVENT_QUERY_KEY,
@@ -13344,6 +13803,9 @@ var useEnableIntegration = (options = {}) => {
13344
13803
  GetEventFAQSectionQuestion,
13345
13804
  GetEventFaqSections,
13346
13805
  GetEventFaqs,
13806
+ GetEventImage,
13807
+ GetEventImages,
13808
+ GetEventMedia,
13347
13809
  GetEventPage,
13348
13810
  GetEventPages,
13349
13811
  GetEventQuestionSearchValues,
@@ -13463,6 +13925,11 @@ var useEnableIntegration = (options = {}) => {
13463
13925
  GetSeriesList,
13464
13926
  GetSubscribedChannels,
13465
13927
  GetSubscribedContents,
13928
+ GetSurvey,
13929
+ GetSurveyQuestionSearchValues,
13930
+ GetSurveySubmission,
13931
+ GetSurveySubmissionSections,
13932
+ GetSurveySubmissions,
13466
13933
  GetThread,
13467
13934
  GetThreadEvent,
13468
13935
  GetThreadEvents,
@@ -13644,6 +14111,9 @@ var useEnableIntegration = (options = {}) => {
13644
14111
  SET_EVENT_FAQ_SECTION_QUERY_DATA,
13645
14112
  SET_EVENT_FAQ_SECTION_QUESTIONS_QUERY_DATA,
13646
14113
  SET_EVENT_FAQ_SECTION_QUESTION_QUERY_DATA,
14114
+ SET_EVENT_IMAGES_QUERY_DATA,
14115
+ SET_EVENT_IMAGE_QUERY_DATA,
14116
+ SET_EVENT_MEDIA_QUERY_DATA,
13647
14117
  SET_EVENT_PAGES_QUERY_DATA,
13648
14118
  SET_EVENT_PAGE_QUERY_DATA,
13649
14119
  SET_EVENT_QUERY_DATA,
@@ -13707,9 +14177,12 @@ var useEnableIntegration = (options = {}) => {
13707
14177
  SET_SELF_EVENT_REGISTRATION_ROOM_TYPES_QUERY_DATA,
13708
14178
  SET_SELF_GROUP_MEMBERSHIP_QUERY_DATA,
13709
14179
  SET_SELF_QUERY_DATA,
14180
+ SET_SELF_SURVEY_SUBMISSION_QUERY_DATA,
13710
14181
  SET_SERIES_EVENTS_QUERY_DATA,
13711
14182
  SET_SERIES_LIST_QUERY_DATA,
13712
14183
  SET_SERIES_QUERY_DATA,
14184
+ SET_SURVEY_QUERY_DATA,
14185
+ SET_SURVEY_SUBMISSION_SECTIONS_QUERY_DATA,
13713
14186
  SET_THREADS_QUERY_DATA,
13714
14187
  SET_THREAD_EVENTS_QUERY_DATA,
13715
14188
  SET_THREAD_EVENT_QUERY_DATA,
@@ -13723,15 +14196,23 @@ var useEnableIntegration = (options = {}) => {
13723
14196
  SET_THREAD_QUERY_DATA,
13724
14197
  SUBSCRIBED_CHANNELS_QUERY_KEY,
13725
14198
  SUBSCRIBED_CONTENTS_QUERY_KEY,
14199
+ SURVEY_QUERY_KEY,
14200
+ SURVEY_QUESTION_SEARCH_VALUES_QUERY_KEY,
14201
+ SURVEY_SUBMISSIONS_QUERY_KEY,
14202
+ SURVEY_SUBMISSION_QUERY_KEY,
14203
+ SURVEY_SUBMISSION_SECTIONS_QUERY_KEY,
13726
14204
  SelectSelfEventRegistrationCoupon,
13727
14205
  SelfCreateActivity,
13728
14206
  SelfUpdateGroupMembership,
13729
14207
  SessionPassStatus,
13730
14208
  SetContentPublishSchedule,
14209
+ StartSurvey,
13731
14210
  SubmitSelfEventRegistration,
13732
14211
  SubmitSelfEventRegistrationSessionPasses,
14212
+ SubmitSurvey,
13733
14213
  SubscriptionStatus,
13734
14214
  SupportTicketType,
14215
+ SurveyQuestionType,
13735
14216
  THREADS_QUERY_KEY,
13736
14217
  THREAD_EVENTS_QUERY_KEY,
13737
14218
  THREAD_EVENT_QUERY_KEY,
@@ -13780,11 +14261,13 @@ var useEnableIntegration = (options = {}) => {
13780
14261
  UpdateSelfNotificationPreferences,
13781
14262
  UpdateSelfPushDevice,
13782
14263
  UpdateSubscriptionPaymentMethod,
14264
+ UpdateSurveyResponse,
13783
14265
  UpdateThread,
13784
14266
  UpdateThreadMember,
13785
14267
  UpdateThreadMessage,
13786
14268
  UploadChannelContentImage,
13787
14269
  UploadFile,
14270
+ UploadSurveyResponseFile,
13788
14271
  isListing,
13789
14272
  isManagedCoupon,
13790
14273
  isRegistrationQuestion,
@@ -13952,6 +14435,9 @@ var useEnableIntegration = (options = {}) => {
13952
14435
  useGetEventFAQSectionQuestion,
13953
14436
  useGetEventFaqSections,
13954
14437
  useGetEventFaqs,
14438
+ useGetEventImage,
14439
+ useGetEventImages,
14440
+ useGetEventMedia,
13955
14441
  useGetEventPage,
13956
14442
  useGetEventPages,
13957
14443
  useGetEventQuestionSearchValues,
@@ -14071,6 +14557,11 @@ var useEnableIntegration = (options = {}) => {
14071
14557
  useGetSeriesList,
14072
14558
  useGetSubscribedChannels,
14073
14559
  useGetSubscribedContents,
14560
+ useGetSurvey,
14561
+ useGetSurveyQuestionSearchValues,
14562
+ useGetSurveySubmission,
14563
+ useGetSurveySubmissionSections,
14564
+ useGetSurveySubmissions,
14074
14565
  useGetThread,
14075
14566
  useGetThreadEvent,
14076
14567
  useGetThreadEvents,
@@ -14111,8 +14602,10 @@ var useEnableIntegration = (options = {}) => {
14111
14602
  useSelfCreateActivity,
14112
14603
  useSelfUpdateGroupMembership,
14113
14604
  useSetContentPublishSchedule,
14605
+ useStartSurvey,
14114
14606
  useSubmitSelfEventRegistration,
14115
14607
  useSubmitSelfEventRegistrationSessionPasses,
14608
+ useSubmitSurvey,
14116
14609
  useTransferPass,
14117
14610
  useUndoCheckinListingAttendeePass,
14118
14611
  useUnfollowAccount,
@@ -14144,9 +14637,11 @@ var useEnableIntegration = (options = {}) => {
14144
14637
  useUpdateSelfNotificationPreferences,
14145
14638
  useUpdateSelfPushDevice,
14146
14639
  useUpdateSubscriptionPaymentMethod,
14640
+ useUpdateSurveyResponse,
14147
14641
  useUpdateThread,
14148
14642
  useUpdateThreadMember,
14149
14643
  useUpdateThreadMessage,
14150
14644
  useUploadChannelContentImage,
14151
- useUploadFile
14645
+ useUploadFile,
14646
+ useUploadSurveyResponseFile
14152
14647
  });