@connectedxm/admin 7.0.7 → 7.0.9

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
@@ -145,6 +145,7 @@ __export(index_exports, {
145
145
  AddSurveyQuestionChoiceSubQuestion: () => AddSurveyQuestionChoiceSubQuestion,
146
146
  AddSurveySectionQuestion: () => AddSurveySectionQuestion,
147
147
  AddSurveySession: () => AddSurveySession,
148
+ AddThreadAccounts: () => AddThreadAccounts,
148
149
  AdminNotificationSource: () => AdminNotificationSource,
149
150
  AdminNotificationType: () => AdminNotificationType,
150
151
  AdvertisementType: () => AdvertisementType,
@@ -2432,6 +2433,7 @@ __export(index_exports, {
2432
2433
  useAddSurveyQuestionChoiceSubQuestion: () => useAddSurveyQuestionChoiceSubQuestion,
2433
2434
  useAddSurveySectionQuestion: () => useAddSurveySectionQuestion,
2434
2435
  useAddSurveySession: () => useAddSurveySession,
2436
+ useAddThreadAccounts: () => useAddThreadAccounts,
2435
2437
  useApproveEventPass: () => useApproveEventPass,
2436
2438
  useArchiveActivity: () => useArchiveActivity,
2437
2439
  useAttachBookingSpaceQuestionSearchList: () => useAttachBookingSpaceQuestionSearchList,
@@ -42817,16 +42819,42 @@ var useUpdateSurvey = (options = {}) => {
42817
42819
  return useConnectedMutation(UpdateSurvey, options);
42818
42820
  };
42819
42821
 
42822
+ // src/mutations/threads/accounts/useAddThreadAccounts.ts
42823
+ var AddThreadAccounts = async ({
42824
+ threadId,
42825
+ accounts,
42826
+ adminApiParams,
42827
+ queryClient
42828
+ }) => {
42829
+ const connectedXM = await GetAdminAPI(adminApiParams);
42830
+ const { data } = await connectedXM.post(
42831
+ `/threads/${threadId}/accounts`,
42832
+ accounts
42833
+ );
42834
+ if (queryClient && data.status === "ok") {
42835
+ queryClient.invalidateQueries({
42836
+ queryKey: THREAD_ACCOUNTS_QUERY_KEY(threadId)
42837
+ });
42838
+ queryClient.invalidateQueries({
42839
+ queryKey: THREAD_QUERY_KEY(threadId)
42840
+ });
42841
+ }
42842
+ return data;
42843
+ };
42844
+ var useAddThreadAccounts = (options = {}) => {
42845
+ return useConnectedMutation(AddThreadAccounts, options);
42846
+ };
42847
+
42820
42848
  // src/mutations/threads/accounts/useDeleteThreadAccount.ts
42821
42849
  var DeleteThreadAccount = async ({
42822
42850
  threadId,
42823
- accountId,
42851
+ threadAccountId,
42824
42852
  adminApiParams,
42825
42853
  queryClient
42826
42854
  }) => {
42827
42855
  const connectedXM = await GetAdminAPI(adminApiParams);
42828
42856
  const { data } = await connectedXM.delete(
42829
- `/threads/${threadId}/accounts/${accountId}`
42857
+ `/threads/${threadId}/accounts/${threadAccountId}`
42830
42858
  );
42831
42859
  if (queryClient && data.status === "ok") {
42832
42860
  queryClient.invalidateQueries({
@@ -42845,14 +42873,14 @@ var useDeleteThreadAccount = (options = {}) => {
42845
42873
  // src/mutations/threads/accounts/useUpdateThreadAccount.ts
42846
42874
  var UpdateThreadAccount = async ({
42847
42875
  threadId,
42848
- accountId,
42876
+ threadAccountId,
42849
42877
  threadAccount,
42850
42878
  adminApiParams,
42851
42879
  queryClient
42852
42880
  }) => {
42853
42881
  const connectedXM = await GetAdminAPI(adminApiParams);
42854
42882
  const { data } = await connectedXM.put(
42855
- `/threads/${threadId}/accounts/${accountId}`,
42883
+ `/threads/${threadId}/accounts/${threadAccountId}`,
42856
42884
  threadAccount
42857
42885
  );
42858
42886
  if (queryClient && data.status === "ok") {
@@ -43390,6 +43418,7 @@ var useUpdateTier = (options = {}) => {
43390
43418
  AddSurveyQuestionChoiceSubQuestion,
43391
43419
  AddSurveySectionQuestion,
43392
43420
  AddSurveySession,
43421
+ AddThreadAccounts,
43393
43422
  AdminNotificationSource,
43394
43423
  AdminNotificationType,
43395
43424
  AdvertisementType,
@@ -45677,6 +45706,7 @@ var useUpdateTier = (options = {}) => {
45677
45706
  useAddSurveyQuestionChoiceSubQuestion,
45678
45707
  useAddSurveySectionQuestion,
45679
45708
  useAddSurveySession,
45709
+ useAddThreadAccounts,
45680
45710
  useApproveEventPass,
45681
45711
  useArchiveActivity,
45682
45712
  useAttachBookingSpaceQuestionSearchList,