@connectedxm/admin 6.25.2 → 6.26.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.cjs CHANGED
@@ -212,6 +212,7 @@ __export(index_exports, {
212
212
  CUSTOM_MODULE_TRANSLATION_QUERY_KEY: () => CUSTOM_MODULE_TRANSLATION_QUERY_KEY,
213
213
  CUSTOM_REPORTS_QUERY_KEY: () => CUSTOM_REPORTS_QUERY_KEY,
214
214
  CUSTOM_REPORT_QUERY_KEY: () => CUSTOM_REPORT_QUERY_KEY,
215
+ CUSTOM_REPORT_SCHEDULE_QUERY_KEY: () => CUSTOM_REPORT_SCHEDULE_QUERY_KEY,
215
216
  CUSTOM_REPORT_USERS_QUERY_KEY: () => CUSTOM_REPORT_USERS_QUERY_KEY,
216
217
  CacheIndividualQueries: () => CacheIndividualQueries,
217
218
  CalculateDuration: () => CalculateDuration,
@@ -378,6 +379,7 @@ __export(index_exports, {
378
379
  DeleteCustomModule: () => DeleteCustomModule,
379
380
  DeleteCustomModuleTranslation: () => DeleteCustomModuleTranslation,
380
381
  DeleteCustomReport: () => DeleteCustomReport,
382
+ DeleteCustomReportSchedule: () => DeleteCustomReportSchedule,
381
383
  DeleteDashboard: () => DeleteDashboard,
382
384
  DeleteDashboardWidget: () => DeleteDashboardWidget,
383
385
  DeleteEvent: () => DeleteEvent,
@@ -876,6 +878,7 @@ __export(index_exports, {
876
878
  GetCustomModuleTranslations: () => GetCustomModuleTranslations,
877
879
  GetCustomModules: () => GetCustomModules,
878
880
  GetCustomReport: () => GetCustomReport,
881
+ GetCustomReportSchedule: () => GetCustomReportSchedule,
879
882
  GetCustomReportUsers: () => GetCustomReportUsers,
880
883
  GetCustomReports: () => GetCustomReports,
881
884
  GetDashboard: () => GetDashboard,
@@ -1647,6 +1650,7 @@ __export(index_exports, {
1647
1650
  SET_CUSTOM_MODULE_TRANSLATION_QUERY_DATA: () => SET_CUSTOM_MODULE_TRANSLATION_QUERY_DATA,
1648
1651
  SET_CUSTOM_REPORTS_QUERY_DATA: () => SET_CUSTOM_REPORTS_QUERY_DATA,
1649
1652
  SET_CUSTOM_REPORT_QUERY_DATA: () => SET_CUSTOM_REPORT_QUERY_DATA,
1653
+ SET_CUSTOM_REPORT_SCHEDULE_QUERY_DATA: () => SET_CUSTOM_REPORT_SCHEDULE_QUERY_DATA,
1650
1654
  SET_CUSTOM_REPORT_USERS_QUERY_DATA: () => SET_CUSTOM_REPORT_USERS_QUERY_DATA,
1651
1655
  SET_DASHBOARDS_QUERY_DATA: () => SET_DASHBOARDS_QUERY_DATA,
1652
1656
  SET_DASHBOARD_ATTRIBUTES_QUERY_DATA: () => SET_DASHBOARD_ATTRIBUTES_QUERY_DATA,
@@ -2343,6 +2347,7 @@ __export(index_exports, {
2343
2347
  UpdateVideo: () => UpdateVideo,
2344
2348
  UploadFile: () => UploadFile,
2345
2349
  UploadVideoCaptions: () => UploadVideoCaptions,
2350
+ UpsertCustomReportSchedule: () => UpsertCustomReportSchedule,
2346
2351
  UpsertLinkPreview: () => UpsertLinkPreview,
2347
2352
  UserRole: () => UserRole,
2348
2353
  VIDEOS_QUERY_KEY: () => VIDEOS_QUERY_KEY,
@@ -2587,6 +2592,7 @@ __export(index_exports, {
2587
2592
  useDeleteCustomModule: () => useDeleteCustomModule,
2588
2593
  useDeleteCustomModuleTranslation: () => useDeleteCustomModuleTranslation,
2589
2594
  useDeleteCustomReport: () => useDeleteCustomReport,
2595
+ useDeleteCustomReportSchedule: () => useDeleteCustomReportSchedule,
2590
2596
  useDeleteDashboard: () => useDeleteDashboard,
2591
2597
  useDeleteDashboardWidget: () => useDeleteDashboardWidget,
2592
2598
  useDeleteEvent: () => useDeleteEvent,
@@ -2829,6 +2835,7 @@ __export(index_exports, {
2829
2835
  useGetCustomModuleTranslations: () => useGetCustomModuleTranslations,
2830
2836
  useGetCustomModules: () => useGetCustomModules,
2831
2837
  useGetCustomReport: () => useGetCustomReport,
2838
+ useGetCustomReportSchedule: () => useGetCustomReportSchedule,
2832
2839
  useGetCustomReportUsers: () => useGetCustomReportUsers,
2833
2840
  useGetCustomReports: () => useGetCustomReports,
2834
2841
  useGetDashboard: () => useGetDashboard,
@@ -3553,6 +3560,7 @@ __export(index_exports, {
3553
3560
  useUpdateVideo: () => useUpdateVideo,
3554
3561
  useUploadFile: () => useUploadFile,
3555
3562
  useUploadVideoCaptions: () => useUploadVideoCaptions,
3563
+ useUpsertCustomReportSchedule: () => useUpsertCustomReportSchedule,
3556
3564
  useUpsertLinkPreview: () => useUpsertLinkPreview,
3557
3565
  useVerifyOrganizationWebhook: () => useVerifyOrganizationWebhook,
3558
3566
  useVoidInvoice: () => useVoidInvoice
@@ -21484,6 +21492,33 @@ var useGetCustomReport = (reportId, options = {}) => {
21484
21492
  );
21485
21493
  };
21486
21494
 
21495
+ // src/queries/reports/useGetCustomReportSchedule.ts
21496
+ var CUSTOM_REPORT_SCHEDULE_QUERY_KEY = (reportId) => [
21497
+ ...CUSTOM_REPORT_QUERY_KEY(reportId),
21498
+ "schedule"
21499
+ ];
21500
+ var SET_CUSTOM_REPORT_SCHEDULE_QUERY_DATA = (client, keyParams, response) => {
21501
+ client.setQueryData(CUSTOM_REPORT_SCHEDULE_QUERY_KEY(...keyParams), response);
21502
+ };
21503
+ var GetCustomReportSchedule = async ({
21504
+ reportId,
21505
+ adminApiParams
21506
+ }) => {
21507
+ const adminApi = await GetAdminAPI(adminApiParams);
21508
+ const { data } = await adminApi.get(`/reports/custom/${reportId}/schedule`);
21509
+ return data;
21510
+ };
21511
+ var useGetCustomReportSchedule = (reportId, options = {}) => {
21512
+ return useConnectedSingleQuery(
21513
+ CUSTOM_REPORT_SCHEDULE_QUERY_KEY(reportId),
21514
+ (params) => GetCustomReportSchedule({ reportId, ...params }),
21515
+ {
21516
+ ...options,
21517
+ enabled: !!reportId && (options?.enabled ?? true)
21518
+ }
21519
+ );
21520
+ };
21521
+
21487
21522
  // src/queries/reports/useGetReport.ts
21488
21523
  var REPORT_QUERY_KEY = (standard, filters = {}) => ["REPORT", standard, ...Object.values(filters)];
21489
21524
  var SET_REPORT_QUERY_DATA = (client, keyParams, response) => {
@@ -39677,6 +39712,25 @@ var useDeleteCustomReport = (options = {}) => {
39677
39712
  return useConnectedMutation(DeleteCustomReport, options);
39678
39713
  };
39679
39714
 
39715
+ // src/mutations/reports/useDeleteCustomReportSchedule.ts
39716
+ var DeleteCustomReportSchedule = async ({
39717
+ reportId,
39718
+ adminApiParams,
39719
+ queryClient
39720
+ }) => {
39721
+ const connectedXM = await GetAdminAPI(adminApiParams);
39722
+ const { data } = await connectedXM.delete(`/reports/custom/${reportId}/schedule`);
39723
+ if (queryClient && data.status === "ok") {
39724
+ queryClient.invalidateQueries({
39725
+ queryKey: CUSTOM_REPORT_SCHEDULE_QUERY_KEY(reportId)
39726
+ });
39727
+ }
39728
+ return data;
39729
+ };
39730
+ var useDeleteCustomReportSchedule = (options = {}) => {
39731
+ return useConnectedMutation(DeleteCustomReportSchedule, options);
39732
+ };
39733
+
39680
39734
  // src/mutations/reports/useExportCustomReport.ts
39681
39735
  var ExportCustomReport = async ({
39682
39736
  reportId,
@@ -39725,6 +39779,24 @@ var useUpdateCustomReport = (options = {}) => {
39725
39779
  return useConnectedMutation(UpdateCustomReport, options);
39726
39780
  };
39727
39781
 
39782
+ // src/mutations/reports/useUpsertCustomReportSchedule.ts
39783
+ var UpsertCustomReportSchedule = async ({
39784
+ reportId,
39785
+ schedule,
39786
+ adminApiParams,
39787
+ queryClient
39788
+ }) => {
39789
+ const connectedXM = await GetAdminAPI(adminApiParams);
39790
+ const { data } = await connectedXM.post(`/reports/custom/${reportId}/schedule`, schedule);
39791
+ if (queryClient && data.status === "ok") {
39792
+ SET_CUSTOM_REPORT_SCHEDULE_QUERY_DATA(queryClient, [reportId], data);
39793
+ }
39794
+ return data;
39795
+ };
39796
+ var useUpsertCustomReportSchedule = (options = {}) => {
39797
+ return useConnectedMutation(UpsertCustomReportSchedule, options);
39798
+ };
39799
+
39728
39800
  // src/mutations/reports/users/useAddCustomReportUser.ts
39729
39801
  var AddCustomReportUser = async ({
39730
39802
  reportId,
@@ -43284,6 +43356,7 @@ var useUpdateTier = (options = {}) => {
43284
43356
  CUSTOM_MODULE_TRANSLATION_QUERY_KEY,
43285
43357
  CUSTOM_REPORTS_QUERY_KEY,
43286
43358
  CUSTOM_REPORT_QUERY_KEY,
43359
+ CUSTOM_REPORT_SCHEDULE_QUERY_KEY,
43287
43360
  CUSTOM_REPORT_USERS_QUERY_KEY,
43288
43361
  CacheIndividualQueries,
43289
43362
  CalculateDuration,
@@ -43450,6 +43523,7 @@ var useUpdateTier = (options = {}) => {
43450
43523
  DeleteCustomModule,
43451
43524
  DeleteCustomModuleTranslation,
43452
43525
  DeleteCustomReport,
43526
+ DeleteCustomReportSchedule,
43453
43527
  DeleteDashboard,
43454
43528
  DeleteDashboardWidget,
43455
43529
  DeleteEvent,
@@ -43948,6 +44022,7 @@ var useUpdateTier = (options = {}) => {
43948
44022
  GetCustomModuleTranslations,
43949
44023
  GetCustomModules,
43950
44024
  GetCustomReport,
44025
+ GetCustomReportSchedule,
43951
44026
  GetCustomReportUsers,
43952
44027
  GetCustomReports,
43953
44028
  GetDashboard,
@@ -44719,6 +44794,7 @@ var useUpdateTier = (options = {}) => {
44719
44794
  SET_CUSTOM_MODULE_TRANSLATION_QUERY_DATA,
44720
44795
  SET_CUSTOM_REPORTS_QUERY_DATA,
44721
44796
  SET_CUSTOM_REPORT_QUERY_DATA,
44797
+ SET_CUSTOM_REPORT_SCHEDULE_QUERY_DATA,
44722
44798
  SET_CUSTOM_REPORT_USERS_QUERY_DATA,
44723
44799
  SET_DASHBOARDS_QUERY_DATA,
44724
44800
  SET_DASHBOARD_ATTRIBUTES_QUERY_DATA,
@@ -45415,6 +45491,7 @@ var useUpdateTier = (options = {}) => {
45415
45491
  UpdateVideo,
45416
45492
  UploadFile,
45417
45493
  UploadVideoCaptions,
45494
+ UpsertCustomReportSchedule,
45418
45495
  UpsertLinkPreview,
45419
45496
  UserRole,
45420
45497
  VIDEOS_QUERY_KEY,
@@ -45659,6 +45736,7 @@ var useUpdateTier = (options = {}) => {
45659
45736
  useDeleteCustomModule,
45660
45737
  useDeleteCustomModuleTranslation,
45661
45738
  useDeleteCustomReport,
45739
+ useDeleteCustomReportSchedule,
45662
45740
  useDeleteDashboard,
45663
45741
  useDeleteDashboardWidget,
45664
45742
  useDeleteEvent,
@@ -45901,6 +45979,7 @@ var useUpdateTier = (options = {}) => {
45901
45979
  useGetCustomModuleTranslations,
45902
45980
  useGetCustomModules,
45903
45981
  useGetCustomReport,
45982
+ useGetCustomReportSchedule,
45904
45983
  useGetCustomReportUsers,
45905
45984
  useGetCustomReports,
45906
45985
  useGetDashboard,
@@ -46625,6 +46704,7 @@ var useUpdateTier = (options = {}) => {
46625
46704
  useUpdateVideo,
46626
46705
  useUploadFile,
46627
46706
  useUploadVideoCaptions,
46707
+ useUpsertCustomReportSchedule,
46628
46708
  useUpsertLinkPreview,
46629
46709
  useVerifyOrganizationWebhook,
46630
46710
  useVoidInvoice