@connectedxm/admin 1.5.3 → 1.6.0

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
@@ -44,6 +44,7 @@ __export(src_exports, {
44
44
  ACCOUNT_FOLLOWING_QUERY_KEY: () => ACCOUNT_FOLLOWING_QUERY_KEY,
45
45
  ACCOUNT_GROUPS_QUERY_KEY: () => ACCOUNT_GROUPS_QUERY_KEY,
46
46
  ACCOUNT_INTERESTS_QUERY_KEY: () => ACCOUNT_INTERESTS_QUERY_KEY,
47
+ ACCOUNT_INVITATIONS_QUERY_KEY: () => ACCOUNT_INVITATIONS_QUERY_KEY,
47
48
  ACCOUNT_LEADS_QUERY_KEY: () => ACCOUNT_LEADS_QUERY_KEY,
48
49
  ACCOUNT_LEAD_QUERY_KEY: () => ACCOUNT_LEAD_QUERY_KEY,
49
50
  ACCOUNT_LEVELS_QUERY_KEY: () => ACCOUNT_LEVELS_QUERY_KEY,
@@ -190,6 +191,7 @@ __export(src_exports, {
190
191
  ContentStatus: () => ContentStatus,
191
192
  CreateAccount: () => CreateAccount,
192
193
  CreateAccountAddress: () => CreateAccountAddress,
194
+ CreateAccountInvitations: () => CreateAccountInvitations,
193
195
  CreateActivity: () => CreateActivity,
194
196
  CreateAdvertisement: () => CreateAdvertisement,
195
197
  CreateAnnouncement: () => CreateAnnouncement,
@@ -209,6 +211,8 @@ __export(src_exports, {
209
211
  CreateChannelContentGuestTranslation: () => CreateChannelContentGuestTranslation,
210
212
  CreateChannelContentTranslation: () => CreateChannelContentTranslation,
211
213
  CreateChannelTranslation: () => CreateChannelTranslation,
214
+ CreateDashboard: () => CreateDashboard,
215
+ CreateDashboardWidget: () => CreateDashboardWidget,
212
216
  CreateEvent: () => CreateEvent,
213
217
  CreateEventActivation: () => CreateEventActivation,
214
218
  CreateEventActivationCompletion: () => CreateEventActivationCompletion,
@@ -278,11 +282,15 @@ __export(src_exports, {
278
282
  CreateThread: () => CreateThread,
279
283
  CreateTier: () => CreateTier,
280
284
  Currency: () => Currency,
285
+ DASHBOARDS_QUERY_KEY: () => DASHBOARDS_QUERY_KEY,
286
+ DASHBOARD_QUERY_KEY: () => DASHBOARD_QUERY_KEY,
287
+ DASHBOARD_WIDGETS_QUERY_KEY: () => DASHBOARD_WIDGETS_QUERY_KEY,
281
288
  DayOfWeek: () => DayOfWeek,
282
289
  DefaultAuthAction: () => DefaultAuthAction,
283
290
  DelegateRole: () => DelegateRole,
284
291
  DeleteAccount: () => DeleteAccount,
285
292
  DeleteAccountAddress: () => DeleteAccountAddress,
293
+ DeleteAccountInvitation: () => DeleteAccountInvitation,
286
294
  DeleteAccountLead: () => DeleteAccountLead,
287
295
  DeleteAccountPushDevice: () => DeleteAccountPushDevice,
288
296
  DeleteActivity: () => DeleteActivity,
@@ -304,6 +312,8 @@ __export(src_exports, {
304
312
  DeleteChannelContentGuestTranslation: () => DeleteChannelContentGuestTranslation,
305
313
  DeleteChannelContentTranslation: () => DeleteChannelContentTranslation,
306
314
  DeleteChannelTranslation: () => DeleteChannelTranslation,
315
+ DeleteDashboard: () => DeleteDashboard,
316
+ DeleteDashboardWidget: () => DeleteDashboardWidget,
307
317
  DeleteEvent: () => DeleteEvent,
308
318
  DeleteEventActivation: () => DeleteEventActivation,
309
319
  DeleteEventActivationCompletion: () => DeleteEventActivationCompletion,
@@ -557,6 +567,7 @@ __export(src_exports, {
557
567
  GetAccountFollowing: () => GetAccountFollowing,
558
568
  GetAccountGroups: () => GetAccountGroups,
559
569
  GetAccountInterests: () => GetAccountInterests,
570
+ GetAccountInvitations: () => GetAccountInvitations,
560
571
  GetAccountLead: () => GetAccountLead,
561
572
  GetAccountLeads: () => GetAccountLeads,
562
573
  GetAccountLevels: () => GetAccountLevels,
@@ -632,6 +643,9 @@ __export(src_exports, {
632
643
  GetChannelTranslations: () => GetChannelTranslations,
633
644
  GetChannels: () => GetChannels,
634
645
  GetContents: () => GetContents,
646
+ GetDashboard: () => GetDashboard,
647
+ GetDashboardWidgets: () => GetDashboardWidgets,
648
+ GetDashboards: () => GetDashboards,
635
649
  GetEmailReceipt: () => GetEmailReceipt,
636
650
  GetEmailReceipts: () => GetEmailReceipts,
637
651
  GetErrorMessage: () => GetErrorMessage,
@@ -1034,6 +1048,7 @@ __export(src_exports, {
1034
1048
  SET_ACCOUNT_FOLLOWING_QUERY_DATA: () => SET_ACCOUNT_FOLLOWING_QUERY_DATA,
1035
1049
  SET_ACCOUNT_GROUPS_QUERY_DATA: () => SET_ACCOUNT_GROUPS_QUERY_DATA,
1036
1050
  SET_ACCOUNT_INTERESTS_QUERY_DATA: () => SET_ACCOUNT_INTERESTS_QUERY_DATA,
1051
+ SET_ACCOUNT_INVITATIONS_QUERY_DATA: () => SET_ACCOUNT_INVITATIONS_QUERY_DATA,
1037
1052
  SET_ACCOUNT_LEADS_QUERY_DATA: () => SET_ACCOUNT_LEADS_QUERY_DATA,
1038
1053
  SET_ACCOUNT_LEAD_QUERY_DATA: () => SET_ACCOUNT_LEAD_QUERY_DATA,
1039
1054
  SET_ACCOUNT_LEVELS_QUERY_DATA: () => SET_ACCOUNT_LEVELS_QUERY_DATA,
@@ -1107,6 +1122,9 @@ __export(src_exports, {
1107
1122
  SET_CHANNEL_TRANSLATIONS_QUERY_DATA: () => SET_CHANNEL_TRANSLATIONS_QUERY_DATA,
1108
1123
  SET_CHANNEL_TRANSLATION_QUERY_DATA: () => SET_CHANNEL_TRANSLATION_QUERY_DATA,
1109
1124
  SET_CONTENTS_QUERY_DATA: () => SET_CONTENTS_QUERY_DATA,
1125
+ SET_DASHBOARDS_QUERY_DATA: () => SET_DASHBOARDS_QUERY_DATA,
1126
+ SET_DASHBOARD_QUERY_DATA: () => SET_DASHBOARD_QUERY_DATA,
1127
+ SET_DASHBOARD_WIDGETS_QUERY_DATA: () => SET_DASHBOARD_WIDGETS_QUERY_DATA,
1110
1128
  SET_EMAIL_RECEIPTS_QUERY_DATA: () => SET_EMAIL_RECEIPTS_QUERY_DATA,
1111
1129
  SET_EMAIL_RECEIPT_QUERY_DATA: () => SET_EMAIL_RECEIPT_QUERY_DATA,
1112
1130
  SET_EVENTS_QUERY_DATA: () => SET_EVENTS_QUERY_DATA,
@@ -1421,6 +1439,8 @@ __export(src_exports, {
1421
1439
  UpdateChannelContentTranslation: () => UpdateChannelContentTranslation,
1422
1440
  UpdateChannelSubscriber: () => UpdateChannelSubscriber,
1423
1441
  UpdateChannelTranslation: () => UpdateChannelTranslation,
1442
+ UpdateDashboard: () => UpdateDashboard,
1443
+ UpdateDashboardWidget: () => UpdateDashboardWidget,
1424
1444
  UpdateEvent: () => UpdateEvent,
1425
1445
  UpdateEventActivation: () => UpdateEventActivation,
1426
1446
  UpdateEventActivationCompletion: () => UpdateEventActivationCompletion,
@@ -1514,6 +1534,8 @@ __export(src_exports, {
1514
1534
  VIDEO_QUERY_KEY: () => VIDEO_QUERY_KEY,
1515
1535
  VideoSource: () => VideoSource,
1516
1536
  VideoStatus: () => VideoStatus,
1537
+ WidgetCategory: () => WidgetCategory,
1538
+ WidgetType: () => WidgetType,
1517
1539
  isUUID: () => isUUID,
1518
1540
  setFirstPageData: () => setFirstPageData,
1519
1541
  useAcceptGroupRequest: () => useAcceptGroupRequest,
@@ -1580,6 +1602,7 @@ __export(src_exports, {
1580
1602
  useConnectedXM: () => useConnectedXM,
1581
1603
  useCreateAccount: () => useCreateAccount,
1582
1604
  useCreateAccountAddress: () => useCreateAccountAddress,
1605
+ useCreateAccountInvitations: () => useCreateAccountInvitations,
1583
1606
  useCreateActivity: () => useCreateActivity,
1584
1607
  useCreateAdvertisement: () => useCreateAdvertisement,
1585
1608
  useCreateAnnouncement: () => useCreateAnnouncement,
@@ -1599,6 +1622,8 @@ __export(src_exports, {
1599
1622
  useCreateChannelContentGuestTranslation: () => useCreateChannelContentGuestTranslation,
1600
1623
  useCreateChannelContentTranslation: () => useCreateChannelContentTranslation,
1601
1624
  useCreateChannelTranslation: () => useCreateChannelTranslation,
1625
+ useCreateDashboard: () => useCreateDashboard,
1626
+ useCreateDashboardWidget: () => useCreateDashboardWidget,
1602
1627
  useCreateEvent: () => useCreateEvent,
1603
1628
  useCreateEventActivation: () => useCreateEventActivation,
1604
1629
  useCreateEventActivationCompletion: () => useCreateEventActivationCompletion,
@@ -1669,6 +1694,7 @@ __export(src_exports, {
1669
1694
  useCreateTier: () => useCreateTier,
1670
1695
  useDeleteAccount: () => useDeleteAccount,
1671
1696
  useDeleteAccountAddress: () => useDeleteAccountAddress,
1697
+ useDeleteAccountInvitation: () => useDeleteAccountInvitation,
1672
1698
  useDeleteAccountLead: () => useDeleteAccountLead,
1673
1699
  useDeleteAccountPushDevice: () => useDeleteAccountPushDevice,
1674
1700
  useDeleteActivity: () => useDeleteActivity,
@@ -1690,6 +1716,8 @@ __export(src_exports, {
1690
1716
  useDeleteChannelContentGuestTranslation: () => useDeleteChannelContentGuestTranslation,
1691
1717
  useDeleteChannelContentTranslation: () => useDeleteChannelContentTranslation,
1692
1718
  useDeleteChannelTranslation: () => useDeleteChannelTranslation,
1719
+ useDeleteDashboard: () => useDeleteDashboard,
1720
+ useDeleteDashboardWidget: () => useDeleteDashboardWidget,
1693
1721
  useDeleteEvent: () => useDeleteEvent,
1694
1722
  useDeleteEventActivation: () => useDeleteEventActivation,
1695
1723
  useDeleteEventActivationCompletion: () => useDeleteEventActivationCompletion,
@@ -1784,6 +1812,7 @@ __export(src_exports, {
1784
1812
  useGetAccountFollowing: () => useGetAccountFollowing,
1785
1813
  useGetAccountGroups: () => useGetAccountGroups,
1786
1814
  useGetAccountInterests: () => useGetAccountInterests,
1815
+ useGetAccountInvitations: () => useGetAccountInvitations,
1787
1816
  useGetAccountLead: () => useGetAccountLead,
1788
1817
  useGetAccountLeads: () => useGetAccountLeads,
1789
1818
  useGetAccountLevels: () => useGetAccountLevels,
@@ -1857,6 +1886,9 @@ __export(src_exports, {
1857
1886
  useGetChannelTranslations: () => useGetChannelTranslations,
1858
1887
  useGetChannels: () => useGetChannels,
1859
1888
  useGetContents: () => useGetContents,
1889
+ useGetDashboard: () => useGetDashboard,
1890
+ useGetDashboardWidgets: () => useGetDashboardWidgets,
1891
+ useGetDashboards: () => useGetDashboards,
1860
1892
  useGetEmailReceipt: () => useGetEmailReceipt,
1861
1893
  useGetEmailReceipts: () => useGetEmailReceipts,
1862
1894
  useGetEvent: () => useGetEvent,
@@ -2192,6 +2224,8 @@ __export(src_exports, {
2192
2224
  useUpdateChannelContentTranslation: () => useUpdateChannelContentTranslation,
2193
2225
  useUpdateChannelSubscriber: () => useUpdateChannelSubscriber,
2194
2226
  useUpdateChannelTranslation: () => useUpdateChannelTranslation,
2227
+ useUpdateDashboard: () => useUpdateDashboard,
2228
+ useUpdateDashboardWidget: () => useUpdateDashboardWidget,
2195
2229
  useUpdateEvent: () => useUpdateEvent,
2196
2230
  useUpdateEventActivation: () => useUpdateEventActivation,
2197
2231
  useUpdateEventActivationCompletion: () => useUpdateEventActivationCompletion,
@@ -3058,6 +3092,39 @@ var useGetAccountInterests = (accountId = "", params = {}, options = {}) => {
3058
3092
  );
3059
3093
  };
3060
3094
 
3095
+ // src/queries/accounts/useGetAccountInvitations.ts
3096
+ var ACCOUNT_INVITATIONS_QUERY_KEY = () => ["ACCOUNT_INVITATIONS"];
3097
+ var SET_ACCOUNT_INVITATIONS_QUERY_DATA = (client, keyParams, response) => {
3098
+ client.setQueryData(ACCOUNT_INVITATIONS_QUERY_KEY(...keyParams), response);
3099
+ };
3100
+ var GetAccountInvitations = async ({
3101
+ pageParam,
3102
+ pageSize,
3103
+ orderBy,
3104
+ search,
3105
+ adminApiParams
3106
+ }) => {
3107
+ const adminApi = await GetAdminAPI(adminApiParams);
3108
+ const { data } = await adminApi.get(`/accounts/invitations`, {
3109
+ params: {
3110
+ page: pageParam || void 0,
3111
+ pageSize: pageSize || void 0,
3112
+ orderBy: orderBy || void 0,
3113
+ search: search || void 0
3114
+ }
3115
+ });
3116
+ return data;
3117
+ };
3118
+ var useGetAccountInvitations = (params = {}, options = {}) => {
3119
+ return useConnectedInfiniteQuery(
3120
+ ACCOUNT_INVITATIONS_QUERY_KEY(),
3121
+ (params2) => GetAccountInvitations({ ...params2 }),
3122
+ params,
3123
+ options,
3124
+ "accounts"
3125
+ );
3126
+ };
3127
+
3061
3128
  // src/queries/accounts/useGetAccountLeads.ts
3062
3129
  var ACCOUNT_LEADS_QUERY_KEY = (accountId, status, eventId) => {
3063
3130
  const key = [...ACCOUNT_QUERY_KEY(accountId), "LEADS"];
@@ -12434,6 +12501,17 @@ var DayOfWeek = /* @__PURE__ */ ((DayOfWeek2) => {
12434
12501
  DayOfWeek2["saturday"] = "saturday";
12435
12502
  return DayOfWeek2;
12436
12503
  })(DayOfWeek || {});
12504
+ var WidgetCategory = /* @__PURE__ */ ((WidgetCategory2) => {
12505
+ WidgetCategory2["organization"] = "organization";
12506
+ WidgetCategory2["event"] = "event";
12507
+ return WidgetCategory2;
12508
+ })(WidgetCategory || {});
12509
+ var WidgetType = /* @__PURE__ */ ((WidgetType2) => {
12510
+ WidgetType2["kpi"] = "kpi";
12511
+ WidgetType2["bar"] = "bar";
12512
+ WidgetType2["line"] = "line";
12513
+ return WidgetType2;
12514
+ })(WidgetType || {});
12437
12515
 
12438
12516
  // src/queries/groups/useGetGroupInvitations.ts
12439
12517
  var GROUP_INVITATIONS_QUERY_KEY = (groupId, status) => {
@@ -16135,6 +16213,115 @@ var useGetVideo = (videoId = "", options = {}) => {
16135
16213
  );
16136
16214
  };
16137
16215
 
16216
+ // src/queries/dashboards/useGetDashboards.ts
16217
+ var DASHBOARDS_QUERY_KEY = (eventId) => {
16218
+ const keys = ["DASHBOARDS"];
16219
+ if (eventId) keys.push(eventId);
16220
+ return keys;
16221
+ };
16222
+ var SET_DASHBOARDS_QUERY_DATA = (client, keyParams, response) => {
16223
+ client.setQueryData(DASHBOARDS_QUERY_KEY(...keyParams), response);
16224
+ };
16225
+ var GetDashboards = async ({
16226
+ pageParam,
16227
+ pageSize,
16228
+ orderBy,
16229
+ search,
16230
+ eventId,
16231
+ adminApiParams
16232
+ }) => {
16233
+ const adminApi = await GetAdminAPI(adminApiParams);
16234
+ const { data } = await adminApi.get(`/dashboards`, {
16235
+ params: {
16236
+ page: pageParam || void 0,
16237
+ pageSize: pageSize || void 0,
16238
+ orderBy: orderBy || void 0,
16239
+ search: search || void 0,
16240
+ eventId: eventId || void 0
16241
+ }
16242
+ });
16243
+ return data;
16244
+ };
16245
+ var useGetDashboards = (eventId, params = {}, options = {}) => {
16246
+ return useConnectedInfiniteQuery(
16247
+ DASHBOARDS_QUERY_KEY(eventId),
16248
+ (params2) => GetDashboards({ ...params2, eventId }),
16249
+ params,
16250
+ options,
16251
+ "org"
16252
+ );
16253
+ };
16254
+
16255
+ // src/queries/dashboards/useGetDashboard.ts
16256
+ var DASHBOARD_QUERY_KEY = (dashboardId) => [
16257
+ ...DASHBOARDS_QUERY_KEY(),
16258
+ "DASHBOARD",
16259
+ dashboardId
16260
+ ];
16261
+ var SET_DASHBOARD_QUERY_DATA = (client, keyParams, response) => {
16262
+ client.setQueryData(DASHBOARD_QUERY_KEY(...keyParams), response);
16263
+ };
16264
+ var GetDashboard = async ({
16265
+ adminApiParams,
16266
+ dashboardId
16267
+ }) => {
16268
+ const adminApi = await GetAdminAPI(adminApiParams);
16269
+ const { data } = await adminApi.get(`/dashboards/${dashboardId}`);
16270
+ return data;
16271
+ };
16272
+ var useGetDashboard = (dashboardId, options = {}) => {
16273
+ return useConnectedSingleQuery(
16274
+ DASHBOARD_QUERY_KEY(dashboardId),
16275
+ (params) => GetDashboard({
16276
+ ...params,
16277
+ dashboardId
16278
+ }),
16279
+ {
16280
+ ...options,
16281
+ enabled: !!dashboardId && (options.enabled ?? true)
16282
+ },
16283
+ "org"
16284
+ );
16285
+ };
16286
+
16287
+ // src/queries/dashboards/useGetDashboardWidgets.ts
16288
+ var DASHBOARD_WIDGETS_QUERY_KEY = (dashboardId, type) => {
16289
+ const key = [...DASHBOARD_QUERY_KEY(dashboardId), "WIDGETS"];
16290
+ if (type) key.push(type);
16291
+ return key;
16292
+ };
16293
+ var SET_DASHBOARD_WIDGETS_QUERY_DATA = (client, keyParams, response) => {
16294
+ client.setQueryData(DASHBOARD_WIDGETS_QUERY_KEY(...keyParams), response);
16295
+ };
16296
+ var GetDashboardWidgets = async ({
16297
+ adminApiParams,
16298
+ dashboardId,
16299
+ type
16300
+ }) => {
16301
+ const adminApi = await GetAdminAPI(adminApiParams);
16302
+ const { data } = await adminApi.get(`/dashboard/${dashboardId}/widgets`, {
16303
+ params: {
16304
+ type
16305
+ }
16306
+ });
16307
+ return data;
16308
+ };
16309
+ var useGetDashboardWidgets = (dashboardId, type, options = {}) => {
16310
+ return useConnectedSingleQuery(
16311
+ DASHBOARD_WIDGETS_QUERY_KEY(dashboardId, type),
16312
+ (params) => GetDashboardWidgets({
16313
+ ...params,
16314
+ dashboardId,
16315
+ type
16316
+ }),
16317
+ {
16318
+ ...options,
16319
+ enabled: !!dashboardId && (options.enabled ?? true)
16320
+ },
16321
+ "org"
16322
+ );
16323
+ };
16324
+
16138
16325
  // src/PermissionsWrapper.tsx
16139
16326
  var PermissionsWrapper = ({
16140
16327
  children,
@@ -16516,6 +16703,31 @@ var useCreateAccountAddress = (options = {}) => {
16516
16703
  });
16517
16704
  };
16518
16705
 
16706
+ // src/mutations/account/useCreateAccountInvitations.ts
16707
+ var CreateAccountInvitations = async ({
16708
+ emails,
16709
+ adminApiParams,
16710
+ queryClient
16711
+ }) => {
16712
+ const connectedXM = await GetAdminAPI(adminApiParams);
16713
+ const { data } = await connectedXM.post(
16714
+ `/accounts/invitations`,
16715
+ emails
16716
+ );
16717
+ if (queryClient && data.status === "ok") {
16718
+ queryClient.invalidateQueries({
16719
+ queryKey: ACCOUNT_INVITATIONS_QUERY_KEY()
16720
+ });
16721
+ }
16722
+ return data;
16723
+ };
16724
+ var useCreateAccountInvitations = (options = {}) => {
16725
+ return useConnectedMutation(CreateAccountInvitations, options, {
16726
+ domain: "accounts",
16727
+ type: "create"
16728
+ });
16729
+ };
16730
+
16519
16731
  // src/mutations/account/useDeleteAccount.ts
16520
16732
  var DeleteAccount = async ({
16521
16733
  accountId,
@@ -16564,6 +16776,30 @@ var useDeleteAccountAddress = (options = {}) => {
16564
16776
  });
16565
16777
  };
16566
16778
 
16779
+ // src/mutations/account/useDeleteAccountInvitation.ts
16780
+ var DeleteAccountInvitation = async ({
16781
+ email,
16782
+ adminApiParams,
16783
+ queryClient
16784
+ }) => {
16785
+ const connectedXM = await GetAdminAPI(adminApiParams);
16786
+ const { data } = await connectedXM.delete(
16787
+ `/accounts/invitations/${email}`
16788
+ );
16789
+ if (queryClient && data.status === "ok") {
16790
+ queryClient.invalidateQueries({
16791
+ queryKey: ACCOUNT_INVITATIONS_QUERY_KEY()
16792
+ });
16793
+ }
16794
+ return data;
16795
+ };
16796
+ var useDeleteAccountInvitation = (options = {}) => {
16797
+ return useConnectedMutation(DeleteAccountInvitation, options, {
16798
+ domain: "accounts",
16799
+ type: "del"
16800
+ });
16801
+ };
16802
+
16567
16803
  // src/mutations/account/useDeleteAccountLead.ts
16568
16804
  var DeleteAccountLead = async ({
16569
16805
  accountId,
@@ -28513,6 +28749,160 @@ var useUpdateVideo = (options = {}) => {
28513
28749
  type: "update"
28514
28750
  });
28515
28751
  };
28752
+
28753
+ // src/mutations/dashboards/useCreateDashboard.ts
28754
+ var CreateDashboard = async ({
28755
+ dashboard,
28756
+ adminApiParams,
28757
+ queryClient
28758
+ }) => {
28759
+ const connectedXM = await GetAdminAPI(adminApiParams);
28760
+ const { data } = await connectedXM.post(
28761
+ `/dashboards`,
28762
+ dashboard
28763
+ );
28764
+ if (queryClient && data.status === "ok") {
28765
+ queryClient.invalidateQueries({
28766
+ queryKey: DASHBOARDS_QUERY_KEY()
28767
+ });
28768
+ }
28769
+ return data;
28770
+ };
28771
+ var useCreateDashboard = (options = {}) => {
28772
+ return useConnectedMutation(CreateDashboard, options, {
28773
+ domain: "org",
28774
+ type: "create"
28775
+ });
28776
+ };
28777
+
28778
+ // src/mutations/dashboards/useUpdateDashboard.ts
28779
+ var UpdateDashboard = async ({
28780
+ dashboardId,
28781
+ dashboard,
28782
+ adminApiParams,
28783
+ queryClient
28784
+ }) => {
28785
+ const connectedXM = await GetAdminAPI(adminApiParams);
28786
+ const { data } = await connectedXM.put(
28787
+ `/dashboards/${dashboardId}`,
28788
+ dashboard
28789
+ );
28790
+ if (queryClient && data.status === "ok") {
28791
+ SET_DASHBOARD_QUERY_DATA(queryClient, [dashboardId], data);
28792
+ }
28793
+ return data;
28794
+ };
28795
+ var useUpdateDashboard = (options = {}) => {
28796
+ return useConnectedMutation(UpdateDashboard, options, {
28797
+ domain: "org",
28798
+ type: "update"
28799
+ });
28800
+ };
28801
+
28802
+ // src/mutations/dashboards/useDeleteDashboard.ts
28803
+ var DeleteDashboard = async ({
28804
+ dashboardId,
28805
+ adminApiParams,
28806
+ queryClient
28807
+ }) => {
28808
+ const connectedXM = await GetAdminAPI(adminApiParams);
28809
+ const { data } = await connectedXM.delete(
28810
+ `/dashboards/${dashboardId}`
28811
+ );
28812
+ if (queryClient && data.status === "ok") {
28813
+ queryClient.invalidateQueries({
28814
+ queryKey: DASHBOARDS_QUERY_KEY()
28815
+ });
28816
+ queryClient.removeQueries({
28817
+ queryKey: DASHBOARD_QUERY_KEY(dashboardId)
28818
+ });
28819
+ }
28820
+ return data;
28821
+ };
28822
+ var useDeleteDashboard = (options = {}) => {
28823
+ return useConnectedMutation(DeleteDashboard, options, {
28824
+ domain: "org",
28825
+ type: "del"
28826
+ });
28827
+ };
28828
+
28829
+ // src/mutations/dashboards/useCreateDashboardWidget.ts
28830
+ var CreateDashboardWidget = async ({
28831
+ dashboardId,
28832
+ widgetData,
28833
+ adminApiParams,
28834
+ queryClient
28835
+ }) => {
28836
+ const connectedXM = await GetAdminAPI(adminApiParams);
28837
+ const { data } = await connectedXM.post(
28838
+ `/dashboards/${dashboardId}/widgets`,
28839
+ widgetData
28840
+ );
28841
+ if (queryClient && data.status === "ok") {
28842
+ queryClient.invalidateQueries({
28843
+ queryKey: DASHBOARD_QUERY_KEY(dashboardId)
28844
+ });
28845
+ }
28846
+ return data;
28847
+ };
28848
+ var useCreateDashboardWidget = (options = {}) => {
28849
+ return useConnectedMutation(CreateDashboardWidget, options, {
28850
+ domain: "org",
28851
+ type: "create"
28852
+ });
28853
+ };
28854
+
28855
+ // src/mutations/dashboards/useUpdateDashboardWidget.ts
28856
+ var UpdateDashboardWidget = async ({
28857
+ dashboardId,
28858
+ widgetId,
28859
+ widgetData,
28860
+ adminApiParams,
28861
+ queryClient
28862
+ }) => {
28863
+ const connectedXM = await GetAdminAPI(adminApiParams);
28864
+ const { data } = await connectedXM.put(
28865
+ `/dashboards/${dashboardId}/widgets/${widgetId}`,
28866
+ widgetData
28867
+ );
28868
+ if (queryClient && data.status === "ok") {
28869
+ queryClient.invalidateQueries({
28870
+ queryKey: DASHBOARD_QUERY_KEY(dashboardId)
28871
+ });
28872
+ }
28873
+ return data;
28874
+ };
28875
+ var useUpdateDashboardWidget = (options = {}) => {
28876
+ return useConnectedMutation(UpdateDashboardWidget, options, {
28877
+ domain: "org",
28878
+ type: "update"
28879
+ });
28880
+ };
28881
+
28882
+ // src/mutations/dashboards/useDeleteDashboardWidget.ts
28883
+ var DeleteDashboardWidget = async ({
28884
+ dashboardId,
28885
+ widgetId,
28886
+ adminApiParams,
28887
+ queryClient
28888
+ }) => {
28889
+ const connectedXM = await GetAdminAPI(adminApiParams);
28890
+ const { data } = await connectedXM.delete(
28891
+ `/dashboards/${dashboardId}/widgets/${widgetId}`
28892
+ );
28893
+ if (queryClient && data.status === "ok") {
28894
+ queryClient.invalidateQueries({
28895
+ queryKey: DASHBOARD_QUERY_KEY(dashboardId)
28896
+ });
28897
+ }
28898
+ return data;
28899
+ };
28900
+ var useDeleteDashboardWidget = (options = {}) => {
28901
+ return useConnectedMutation(DeleteDashboardWidget, options, {
28902
+ domain: "org",
28903
+ type: "del"
28904
+ });
28905
+ };
28516
28906
  // Annotate the CommonJS export names for ESM import in node:
28517
28907
  0 && (module.exports = {
28518
28908
  ACCOUNTS_QUERY_KEY,
@@ -28529,6 +28919,7 @@ var useUpdateVideo = (options = {}) => {
28529
28919
  ACCOUNT_FOLLOWING_QUERY_KEY,
28530
28920
  ACCOUNT_GROUPS_QUERY_KEY,
28531
28921
  ACCOUNT_INTERESTS_QUERY_KEY,
28922
+ ACCOUNT_INVITATIONS_QUERY_KEY,
28532
28923
  ACCOUNT_LEADS_QUERY_KEY,
28533
28924
  ACCOUNT_LEAD_QUERY_KEY,
28534
28925
  ACCOUNT_LEVELS_QUERY_KEY,
@@ -28675,6 +29066,7 @@ var useUpdateVideo = (options = {}) => {
28675
29066
  ContentStatus,
28676
29067
  CreateAccount,
28677
29068
  CreateAccountAddress,
29069
+ CreateAccountInvitations,
28678
29070
  CreateActivity,
28679
29071
  CreateAdvertisement,
28680
29072
  CreateAnnouncement,
@@ -28694,6 +29086,8 @@ var useUpdateVideo = (options = {}) => {
28694
29086
  CreateChannelContentGuestTranslation,
28695
29087
  CreateChannelContentTranslation,
28696
29088
  CreateChannelTranslation,
29089
+ CreateDashboard,
29090
+ CreateDashboardWidget,
28697
29091
  CreateEvent,
28698
29092
  CreateEventActivation,
28699
29093
  CreateEventActivationCompletion,
@@ -28763,11 +29157,15 @@ var useUpdateVideo = (options = {}) => {
28763
29157
  CreateThread,
28764
29158
  CreateTier,
28765
29159
  Currency,
29160
+ DASHBOARDS_QUERY_KEY,
29161
+ DASHBOARD_QUERY_KEY,
29162
+ DASHBOARD_WIDGETS_QUERY_KEY,
28766
29163
  DayOfWeek,
28767
29164
  DefaultAuthAction,
28768
29165
  DelegateRole,
28769
29166
  DeleteAccount,
28770
29167
  DeleteAccountAddress,
29168
+ DeleteAccountInvitation,
28771
29169
  DeleteAccountLead,
28772
29170
  DeleteAccountPushDevice,
28773
29171
  DeleteActivity,
@@ -28789,6 +29187,8 @@ var useUpdateVideo = (options = {}) => {
28789
29187
  DeleteChannelContentGuestTranslation,
28790
29188
  DeleteChannelContentTranslation,
28791
29189
  DeleteChannelTranslation,
29190
+ DeleteDashboard,
29191
+ DeleteDashboardWidget,
28792
29192
  DeleteEvent,
28793
29193
  DeleteEventActivation,
28794
29194
  DeleteEventActivationCompletion,
@@ -29042,6 +29442,7 @@ var useUpdateVideo = (options = {}) => {
29042
29442
  GetAccountFollowing,
29043
29443
  GetAccountGroups,
29044
29444
  GetAccountInterests,
29445
+ GetAccountInvitations,
29045
29446
  GetAccountLead,
29046
29447
  GetAccountLeads,
29047
29448
  GetAccountLevels,
@@ -29117,6 +29518,9 @@ var useUpdateVideo = (options = {}) => {
29117
29518
  GetChannelTranslations,
29118
29519
  GetChannels,
29119
29520
  GetContents,
29521
+ GetDashboard,
29522
+ GetDashboardWidgets,
29523
+ GetDashboards,
29120
29524
  GetEmailReceipt,
29121
29525
  GetEmailReceipts,
29122
29526
  GetErrorMessage,
@@ -29519,6 +29923,7 @@ var useUpdateVideo = (options = {}) => {
29519
29923
  SET_ACCOUNT_FOLLOWING_QUERY_DATA,
29520
29924
  SET_ACCOUNT_GROUPS_QUERY_DATA,
29521
29925
  SET_ACCOUNT_INTERESTS_QUERY_DATA,
29926
+ SET_ACCOUNT_INVITATIONS_QUERY_DATA,
29522
29927
  SET_ACCOUNT_LEADS_QUERY_DATA,
29523
29928
  SET_ACCOUNT_LEAD_QUERY_DATA,
29524
29929
  SET_ACCOUNT_LEVELS_QUERY_DATA,
@@ -29592,6 +29997,9 @@ var useUpdateVideo = (options = {}) => {
29592
29997
  SET_CHANNEL_TRANSLATIONS_QUERY_DATA,
29593
29998
  SET_CHANNEL_TRANSLATION_QUERY_DATA,
29594
29999
  SET_CONTENTS_QUERY_DATA,
30000
+ SET_DASHBOARDS_QUERY_DATA,
30001
+ SET_DASHBOARD_QUERY_DATA,
30002
+ SET_DASHBOARD_WIDGETS_QUERY_DATA,
29595
30003
  SET_EMAIL_RECEIPTS_QUERY_DATA,
29596
30004
  SET_EMAIL_RECEIPT_QUERY_DATA,
29597
30005
  SET_EVENTS_QUERY_DATA,
@@ -29906,6 +30314,8 @@ var useUpdateVideo = (options = {}) => {
29906
30314
  UpdateChannelContentTranslation,
29907
30315
  UpdateChannelSubscriber,
29908
30316
  UpdateChannelTranslation,
30317
+ UpdateDashboard,
30318
+ UpdateDashboardWidget,
29909
30319
  UpdateEvent,
29910
30320
  UpdateEventActivation,
29911
30321
  UpdateEventActivationCompletion,
@@ -29999,6 +30409,8 @@ var useUpdateVideo = (options = {}) => {
29999
30409
  VIDEO_QUERY_KEY,
30000
30410
  VideoSource,
30001
30411
  VideoStatus,
30412
+ WidgetCategory,
30413
+ WidgetType,
30002
30414
  isUUID,
30003
30415
  setFirstPageData,
30004
30416
  useAcceptGroupRequest,
@@ -30065,6 +30477,7 @@ var useUpdateVideo = (options = {}) => {
30065
30477
  useConnectedXM,
30066
30478
  useCreateAccount,
30067
30479
  useCreateAccountAddress,
30480
+ useCreateAccountInvitations,
30068
30481
  useCreateActivity,
30069
30482
  useCreateAdvertisement,
30070
30483
  useCreateAnnouncement,
@@ -30084,6 +30497,8 @@ var useUpdateVideo = (options = {}) => {
30084
30497
  useCreateChannelContentGuestTranslation,
30085
30498
  useCreateChannelContentTranslation,
30086
30499
  useCreateChannelTranslation,
30500
+ useCreateDashboard,
30501
+ useCreateDashboardWidget,
30087
30502
  useCreateEvent,
30088
30503
  useCreateEventActivation,
30089
30504
  useCreateEventActivationCompletion,
@@ -30154,6 +30569,7 @@ var useUpdateVideo = (options = {}) => {
30154
30569
  useCreateTier,
30155
30570
  useDeleteAccount,
30156
30571
  useDeleteAccountAddress,
30572
+ useDeleteAccountInvitation,
30157
30573
  useDeleteAccountLead,
30158
30574
  useDeleteAccountPushDevice,
30159
30575
  useDeleteActivity,
@@ -30175,6 +30591,8 @@ var useUpdateVideo = (options = {}) => {
30175
30591
  useDeleteChannelContentGuestTranslation,
30176
30592
  useDeleteChannelContentTranslation,
30177
30593
  useDeleteChannelTranslation,
30594
+ useDeleteDashboard,
30595
+ useDeleteDashboardWidget,
30178
30596
  useDeleteEvent,
30179
30597
  useDeleteEventActivation,
30180
30598
  useDeleteEventActivationCompletion,
@@ -30269,6 +30687,7 @@ var useUpdateVideo = (options = {}) => {
30269
30687
  useGetAccountFollowing,
30270
30688
  useGetAccountGroups,
30271
30689
  useGetAccountInterests,
30690
+ useGetAccountInvitations,
30272
30691
  useGetAccountLead,
30273
30692
  useGetAccountLeads,
30274
30693
  useGetAccountLevels,
@@ -30342,6 +30761,9 @@ var useUpdateVideo = (options = {}) => {
30342
30761
  useGetChannelTranslations,
30343
30762
  useGetChannels,
30344
30763
  useGetContents,
30764
+ useGetDashboard,
30765
+ useGetDashboardWidgets,
30766
+ useGetDashboards,
30345
30767
  useGetEmailReceipt,
30346
30768
  useGetEmailReceipts,
30347
30769
  useGetEvent,
@@ -30677,6 +31099,8 @@ var useUpdateVideo = (options = {}) => {
30677
31099
  useUpdateChannelContentTranslation,
30678
31100
  useUpdateChannelSubscriber,
30679
31101
  useUpdateChannelTranslation,
31102
+ useUpdateDashboard,
31103
+ useUpdateDashboardWidget,
30680
31104
  useUpdateEvent,
30681
31105
  useUpdateEventActivation,
30682
31106
  useUpdateEventActivationCompletion,