@localazy/strapi-plugin 1.1.0 → 1.1.1

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.
Files changed (65) hide show
  1. package/dist/_chunks/{FetchIdentity-DfV1OWMB.js → FetchIdentity-CevvxeEj.js} +73 -46
  2. package/dist/_chunks/{FetchIdentity-lkoWjYjn.mjs → FetchIdentity-DeThazz9.mjs} +43 -16
  3. package/dist/_chunks/{LanguagesSelector-BmWfSZq6.js → LanguagesSelector-BExpl4Vx.js} +15 -3
  4. package/dist/_chunks/{LanguagesSelector-vSZvVGUT.mjs → LanguagesSelector-D62gLZsM.mjs} +15 -3
  5. package/dist/_chunks/{LocalazyApp-st8mwIbM.mjs → LocalazyApp-Czkb4s5J.mjs} +791 -61
  6. package/dist/_chunks/{LocalazyApp-BUfYt7UL.js → LocalazyApp-DIcO748C.js} +791 -59
  7. package/dist/_chunks/{LocalazyContentTransferSetup-BjLBgqFO.js → LocalazyContentTransferSetup-DAyZdwi9.js} +13 -10
  8. package/dist/_chunks/{LocalazyContentTransferSetup-D2YvBYs_.mjs → LocalazyContentTransferSetup-Dx0Z6DXc.mjs} +13 -10
  9. package/dist/_chunks/{LocalazyGlobalSettings-DHCU2_RH.mjs → LocalazyGlobalSettings-DWMBqlN4.mjs} +149 -12
  10. package/dist/_chunks/{LocalazyGlobalSettings-Do5tOyhB.js → LocalazyGlobalSettings-DjrXGVxl.js} +148 -11
  11. package/dist/_chunks/{LocalazyPanel-CulgT97p.mjs → LocalazyPanel-B-0HBTL_.mjs} +4 -4
  12. package/dist/_chunks/{LocalazyPanel-BDxUI_RH.js → LocalazyPanel-nBOpQo5B.js} +4 -4
  13. package/dist/_chunks/{LocalazyStatusColumn-DoTWD2eL.mjs → LocalazyStatusColumn-CpO3yccG.mjs} +9 -7
  14. package/dist/_chunks/{LocalazyStatusColumn-Dpwoc5Ig.js → LocalazyStatusColumn-cGsUDMlX.js} +9 -7
  15. package/dist/_chunks/{RequireLocalazyAuth-BzM7C6Yw.js → RequireLocalazyAuth-56K8HUNR.js} +4 -4
  16. package/dist/_chunks/{RequireLocalazyAuth-CqHrZ1Ah.mjs → RequireLocalazyAuth-Dh-mAMcg.mjs} +4 -4
  17. package/dist/_chunks/{entry-exclusion-service-DWFMKgkA.mjs → entry-exclusion-service-Dm5_iP7I.mjs} +1 -1
  18. package/dist/_chunks/{entry-exclusion-service-Cvu8PQUI.js → entry-exclusion-service-Rf4Tr0zW.js} +1 -1
  19. package/dist/_chunks/{has-model-changed-CWdMNRB1.mjs → has-model-changed-6p1lR-Ho.mjs} +2 -2
  20. package/dist/_chunks/{has-model-changed-D1f6is8z.js → has-model-changed-CGyDQARr.js} +2 -2
  21. package/dist/_chunks/{i18n-DaBjUC3Y.js → i18n-CAsbU4pi.js} +62 -4
  22. package/dist/_chunks/{i18n-Bga-GG_Z.mjs → i18n-QelOdIB2.mjs} +62 -4
  23. package/dist/_chunks/{index-BSNW1ypR.js → index-BK7lmZSN.js} +57 -19
  24. package/dist/_chunks/{index-CtvR-R3c.mjs → index-Bpf1Mw2A.mjs} +8 -8
  25. package/dist/_chunks/{index-BgPI2yQD.js → index-BsQ_ie4C.js} +8 -8
  26. package/dist/_chunks/{index-BIHAiJnE.mjs → index-CHjIMO9T.mjs} +78 -40
  27. package/dist/_chunks/{strapi-api-base-CturxOqD.mjs → strapi-api-base-Bem_CGuz.mjs} +2 -2
  28. package/dist/_chunks/{strapi-api-base-CN6q5tPh.js → strapi-api-base-W_bUTSlY.js} +2 -2
  29. package/dist/admin/index.js +1 -1
  30. package/dist/admin/index.mjs +1 -1
  31. package/dist/admin/src/components/PluginErrorBoundary.d.ts +5 -0
  32. package/dist/admin/src/modules/@common/locale/en.d.ts +4 -0
  33. package/dist/admin/src/modules/@common/services/project-service.d.ts +9 -0
  34. package/dist/admin/src/modules/@common/styles/heading-fix.d.ts +7 -0
  35. package/dist/admin/src/modules/@common/utils/export-json.d.ts +1 -0
  36. package/dist/admin/src/modules/@common/utils/redirect-to-plugin-route.d.ts +1 -0
  37. package/dist/admin/src/modules/activity-logs/components/HighlightMatch.d.ts +6 -0
  38. package/dist/admin/src/modules/activity-logs/components/SessionMetadata.d.ts +7 -0
  39. package/dist/admin/src/modules/activity-logs/components/SessionsTable.d.ts +17 -0
  40. package/dist/admin/src/modules/activity-logs/components/SortableHeader.d.ts +10 -0
  41. package/dist/admin/src/modules/activity-logs/components/StatusLabel.d.ts +6 -0
  42. package/dist/admin/src/modules/activity-logs/hooks/use-debounced-search.d.ts +6 -0
  43. package/dist/admin/src/modules/activity-logs/locale/en.d.ts +33 -0
  44. package/dist/admin/src/modules/activity-logs/models/activity-logs.d.ts +19 -0
  45. package/dist/admin/src/modules/activity-logs/services/activity-logs-service.d.ts +6 -0
  46. package/dist/admin/src/modules/activity-logs/utils/export-logs.d.ts +1 -0
  47. package/dist/admin/src/modules/activity-logs/utils/format-utils.d.ts +4 -0
  48. package/dist/admin/src/modules/plugin-settings/components/WebhookSetup.d.ts +2 -0
  49. package/dist/admin/src/modules/plugin-settings/locale/en.d.ts +21 -0
  50. package/dist/admin/src/pages/ActivityLogDetail.d.ts +7 -0
  51. package/dist/admin/src/pages/ActivityLogs.d.ts +7 -0
  52. package/dist/server/index.js +392 -47
  53. package/dist/server/index.mjs +392 -47
  54. package/dist/server/src/controllers/activity-logs-controller.d.ts +10 -0
  55. package/dist/server/src/controllers/index.d.ts +12 -1
  56. package/dist/server/src/controllers/localazy-project-controller.d.ts +4 -1
  57. package/dist/server/src/core/index.d.ts +13 -0
  58. package/dist/server/src/db/model/activity-logs.d.ts +20 -0
  59. package/dist/server/src/db/model/plugin-settings.d.ts +14 -0
  60. package/dist/server/src/index.d.ts +27 -1
  61. package/dist/server/src/routes/activity-logs-routes.d.ts +9 -0
  62. package/dist/server/src/services/activity-logs-service.d.ts +17 -0
  63. package/dist/server/src/services/index.d.ts +15 -0
  64. package/dist/server/src/services/localazy-pubapi-service.d.ts +2 -0
  65. package/package.json +1 -1
@@ -20532,7 +20532,7 @@ var distExports = dist$1.exports;
20532
20532
  const io = /* @__PURE__ */ getDefaultExportFromCjs(distExports);
20533
20533
  const { Server: Server2, Namespace, Socket: Socket3 } = io;
20534
20534
  const name = "@localazy/strapi-plugin";
20535
- const version = "1.1.0";
20535
+ const version = "1.1.1";
20536
20536
  const description = "The official Strapi Plugin by Localazy.";
20537
20537
  const keywords = [
20538
20538
  "strapi",
@@ -22076,6 +22076,9 @@ const getLocalazyUploadService = () => {
22076
22076
  const getEntryExclusionService = () => {
22077
22077
  return strapi.plugin(PLUGIN_NAME).service("EntryExclusionService");
22078
22078
  };
22079
+ const getActivityLogsService = () => {
22080
+ return strapi.plugin(PLUGIN_NAME).service("ActivityLogsService");
22081
+ };
22079
22082
  class PluginSettingsServiceHelper {
22080
22083
  constructor() {
22081
22084
  this.PluginSettingsService = getPluginSettingsService();
@@ -24212,13 +24215,74 @@ const StrapiController = ({ strapi: strapi2 }) => ({
24212
24215
  };
24213
24216
  }
24214
24217
  });
24215
- const LocalazyProjectController = ({ strapi: _strapi }) => ({
24218
+ const STRAPI_WEBHOOK_CUSTOM_ID = "strapi-plugin-localazy";
24219
+ const LocalazyProjectController = ({ strapi: strapi2 }) => ({
24216
24220
  async getConnectedProject(ctx) {
24217
24221
  const LocalazyUserService2 = getLocalazyUserService();
24218
24222
  const LocalazyPubAPIService2 = getLocalazyPubAPIService();
24219
24223
  const user = await LocalazyUserService2.getUser();
24220
24224
  const project = await LocalazyPubAPIService2.getProject(user.project.id, true, true);
24221
24225
  ctx.body = project;
24226
+ },
24227
+ async getWebhookStatus(ctx) {
24228
+ const LocalazyUserService2 = getLocalazyUserService();
24229
+ const user = await LocalazyUserService2.getUser();
24230
+ const LocalazyPubApiService = getLocalazyPubAPIService();
24231
+ const webhooks = await LocalazyPubApiService.listWebhooks(user.project.id);
24232
+ const ours = webhooks.find((w2) => w2.customId === STRAPI_WEBHOOK_CUSTOM_ID);
24233
+ if (ours) {
24234
+ ctx.body = { status: "configured", url: ours.url, enabled: ours.enabled };
24235
+ return;
24236
+ }
24237
+ ctx.body = { status: "not_configured" };
24238
+ },
24239
+ async setupWebhook(ctx) {
24240
+ const { url: url2 } = ctx.request.body;
24241
+ if (!url2 || typeof url2 !== "string") {
24242
+ return ctx.badRequest("Webhook URL is required");
24243
+ }
24244
+ try {
24245
+ const parsed = new URL(url2);
24246
+ if (parsed.protocol !== "http:" && parsed.protocol !== "https:") {
24247
+ return ctx.badRequest("Webhook URL must use http or https protocol");
24248
+ }
24249
+ } catch {
24250
+ return ctx.badRequest("Invalid webhook URL");
24251
+ }
24252
+ const LocalazyUserService2 = getLocalazyUserService();
24253
+ const user = await LocalazyUserService2.getUser();
24254
+ const LocalazyPubApiService = getLocalazyPubAPIService();
24255
+ const PluginSettingsService2 = getPluginSettingsService();
24256
+ const existing = await LocalazyPubApiService.listWebhooks(user.project.id);
24257
+ const filtered = existing.filter((w2) => w2.customId !== STRAPI_WEBHOOK_CUSTOM_ID);
24258
+ const items = [
24259
+ ...filtered,
24260
+ {
24261
+ enabled: true,
24262
+ customId: STRAPI_WEBHOOK_CUSTOM_ID,
24263
+ url: url2,
24264
+ events: ["project_published"],
24265
+ description: "Strapi Plugin - Download translations"
24266
+ }
24267
+ ];
24268
+ await LocalazyPubApiService.updateWebhooks(user.project.id, items);
24269
+ await PluginSettingsService2.updatePluginSettings({
24270
+ webhookConfig: { url: url2 }
24271
+ });
24272
+ ctx.body = { success: true };
24273
+ },
24274
+ async getStrapiUrl(ctx) {
24275
+ let url2 = strapi2.config.get("server.url");
24276
+ if (!url2) {
24277
+ const host = strapi2.config.get("server.host") || "0.0.0.0";
24278
+ const port = strapi2.config.get("server.port") || 1337;
24279
+ const displayHost = host === "0.0.0.0" || host === "::" ? "localhost" : host;
24280
+ url2 = `http://${displayHost}:${port}`;
24281
+ }
24282
+ const isLocal = /^https?:\/\/(localhost|127\.0\.0\.1|0\.0\.0\.0|10\.|172\.(1[6-9]|2\d|3[01])\.|192\.168\.)/.test(
24283
+ url2
24284
+ );
24285
+ ctx.body = { url: url2, isLocal };
24222
24286
  }
24223
24287
  });
24224
24288
  const PluginSettingsController = ({ strapi: _strapi }) => ({
@@ -24416,6 +24480,27 @@ const EntryExclusionController = ({ strapi: strapi2 }) => ({
24416
24480
  }
24417
24481
  }
24418
24482
  });
24483
+ const ActivityLogsController = ({ strapi: _strapi }) => ({
24484
+ async getSessions(ctx) {
24485
+ const { type: type2 } = ctx.query;
24486
+ ctx.body = await getActivityLogsService().getSessions(type2);
24487
+ },
24488
+ async getSession(ctx) {
24489
+ const { sessionId } = ctx.params;
24490
+ const session = await getActivityLogsService().getSession(sessionId);
24491
+ if (!session) {
24492
+ return ctx.notFound("Session not found");
24493
+ }
24494
+ ctx.body = session;
24495
+ },
24496
+ async exportSessions(ctx) {
24497
+ ctx.body = await getActivityLogsService().getAllSessionsWithEntries();
24498
+ },
24499
+ async clearSessions(ctx) {
24500
+ await getActivityLogsService().clearSessions();
24501
+ ctx.body = { success: true };
24502
+ }
24503
+ });
24419
24504
  const controllers = {
24420
24505
  LocalazyUserController,
24421
24506
  LocalazyAuthController,
@@ -24423,7 +24508,8 @@ const controllers = {
24423
24508
  LocalazyProjectController,
24424
24509
  PluginSettingsController,
24425
24510
  LocalazyTransferController,
24426
- EntryExclusionController
24511
+ EntryExclusionController,
24512
+ ActivityLogsController
24427
24513
  };
24428
24514
  const verifyWebhook = (config2, { strapi: strapi2 }) => {
24429
24515
  return async (ctx, next) => {
@@ -24480,11 +24566,11 @@ const middlewares = {
24480
24566
  verifyWebhook
24481
24567
  };
24482
24568
  const policies = {};
24483
- const ROUTE_PREFIX$7 = "/user";
24569
+ const ROUTE_PREFIX$8 = "/user";
24484
24570
  const LocalazyUserRoutes = [
24485
24571
  {
24486
24572
  method: "GET",
24487
- path: `${ROUTE_PREFIX$7}`,
24573
+ path: `${ROUTE_PREFIX$8}`,
24488
24574
  handler: "LocalazyUserController.getUser",
24489
24575
  config: {
24490
24576
  policies: []
@@ -24492,7 +24578,7 @@ const LocalazyUserRoutes = [
24492
24578
  },
24493
24579
  {
24494
24580
  method: "PUT",
24495
- path: `${ROUTE_PREFIX$7}`,
24581
+ path: `${ROUTE_PREFIX$8}`,
24496
24582
  handler: "LocalazyUserController.updateUser",
24497
24583
  config: {
24498
24584
  policies: []
@@ -24500,18 +24586,18 @@ const LocalazyUserRoutes = [
24500
24586
  },
24501
24587
  {
24502
24588
  method: "DELETE",
24503
- path: `${ROUTE_PREFIX$7}`,
24589
+ path: `${ROUTE_PREFIX$8}`,
24504
24590
  handler: "LocalazyUserController.deleteUser",
24505
24591
  config: {
24506
24592
  policies: []
24507
24593
  }
24508
24594
  }
24509
24595
  ];
24510
- const ROUTE_PREFIX$6 = "/auth";
24596
+ const ROUTE_PREFIX$7 = "/auth";
24511
24597
  const LocalazyAuthRoutes = [
24512
24598
  {
24513
24599
  method: "GET",
24514
- path: `${ROUTE_PREFIX$6}/generate-keys`,
24600
+ path: `${ROUTE_PREFIX$7}/generate-keys`,
24515
24601
  handler: "LocalazyAuthController.generateKeys",
24516
24602
  config: {
24517
24603
  policies: []
@@ -24519,18 +24605,18 @@ const LocalazyAuthRoutes = [
24519
24605
  },
24520
24606
  {
24521
24607
  method: "GET",
24522
- path: `${ROUTE_PREFIX$6}/continuous-poll`,
24608
+ path: `${ROUTE_PREFIX$7}/continuous-poll`,
24523
24609
  handler: "LocalazyAuthController.continuousPoll",
24524
24610
  config: {
24525
24611
  policies: []
24526
24612
  }
24527
24613
  }
24528
24614
  ];
24529
- const ROUTE_PREFIX$5 = "/plugin-settings";
24615
+ const ROUTE_PREFIX$6 = "/plugin-settings";
24530
24616
  const PluginSettingsRoutes = [
24531
24617
  {
24532
24618
  method: "GET",
24533
- path: `${ROUTE_PREFIX$5}/content-transfer-setup`,
24619
+ path: `${ROUTE_PREFIX$6}/content-transfer-setup`,
24534
24620
  handler: "PluginSettingsController.getContentTransferSetup",
24535
24621
  config: {
24536
24622
  policies: []
@@ -24538,7 +24624,7 @@ const PluginSettingsRoutes = [
24538
24624
  },
24539
24625
  {
24540
24626
  method: "PUT",
24541
- path: `${ROUTE_PREFIX$5}/content-transfer-setup`,
24627
+ path: `${ROUTE_PREFIX$6}/content-transfer-setup`,
24542
24628
  handler: "PluginSettingsController.updateContentTransferSetup",
24543
24629
  config: {
24544
24630
  policies: []
@@ -24546,7 +24632,7 @@ const PluginSettingsRoutes = [
24546
24632
  },
24547
24633
  {
24548
24634
  method: "GET",
24549
- path: `${ROUTE_PREFIX$5}/plugin-settings`,
24635
+ path: `${ROUTE_PREFIX$6}/plugin-settings`,
24550
24636
  handler: "PluginSettingsController.getPluginSettings",
24551
24637
  config: {
24552
24638
  policies: []
@@ -24554,7 +24640,7 @@ const PluginSettingsRoutes = [
24554
24640
  },
24555
24641
  {
24556
24642
  method: "PUT",
24557
- path: `${ROUTE_PREFIX$5}/plugin-settings`,
24643
+ path: `${ROUTE_PREFIX$6}/plugin-settings`,
24558
24644
  handler: "PluginSettingsController.updatePluginSettings",
24559
24645
  config: {
24560
24646
  policies: []
@@ -24562,18 +24648,18 @@ const PluginSettingsRoutes = [
24562
24648
  },
24563
24649
  {
24564
24650
  method: "GET",
24565
- path: `${ROUTE_PREFIX$5}/sync-cursor`,
24651
+ path: `${ROUTE_PREFIX$6}/sync-cursor`,
24566
24652
  handler: "PluginSettingsController.getSyncCursor",
24567
24653
  config: {
24568
24654
  policies: []
24569
24655
  }
24570
24656
  }
24571
24657
  ];
24572
- const ROUTE_PREFIX$4 = "/strapi";
24658
+ const ROUTE_PREFIX$5 = "/strapi";
24573
24659
  const StrapiRoutes = [
24574
24660
  {
24575
24661
  method: "GET",
24576
- path: `${ROUTE_PREFIX$4}/models`,
24662
+ path: `${ROUTE_PREFIX$5}/models`,
24577
24663
  handler: "StrapiController.getModels",
24578
24664
  config: {
24579
24665
  policies: []
@@ -24581,7 +24667,7 @@ const StrapiRoutes = [
24581
24667
  },
24582
24668
  {
24583
24669
  method: "GET",
24584
- path: `${ROUTE_PREFIX$4}/localizable-models`,
24670
+ path: `${ROUTE_PREFIX$5}/localizable-models`,
24585
24671
  handler: "StrapiController.getLocalizableModels",
24586
24672
  config: {
24587
24673
  policies: []
@@ -24589,7 +24675,7 @@ const StrapiRoutes = [
24589
24675
  },
24590
24676
  {
24591
24677
  method: "POST",
24592
- path: `${ROUTE_PREFIX$4}/lifecycle/localazy-webhooks`,
24678
+ path: `${ROUTE_PREFIX$5}/lifecycle/localazy-webhooks`,
24593
24679
  handler: "StrapiController.postLifecycleLocalazyWebhooks",
24594
24680
  config: {
24595
24681
  policies: []
@@ -24597,18 +24683,18 @@ const StrapiRoutes = [
24597
24683
  },
24598
24684
  {
24599
24685
  method: "GET",
24600
- path: `${ROUTE_PREFIX$4}/version`,
24686
+ path: `${ROUTE_PREFIX$5}/version`,
24601
24687
  handler: "StrapiController.getPluginVersion",
24602
24688
  config: {
24603
24689
  policies: []
24604
24690
  }
24605
24691
  }
24606
24692
  ];
24607
- const ROUTE_PREFIX$3 = "/transfer";
24693
+ const ROUTE_PREFIX$4 = "/transfer";
24608
24694
  const LocalazyTransferRoutes = [
24609
24695
  {
24610
24696
  method: "POST",
24611
- path: `${ROUTE_PREFIX$3}/upload`,
24697
+ path: `${ROUTE_PREFIX$4}/upload`,
24612
24698
  handler: "LocalazyTransferController.upload",
24613
24699
  config: {
24614
24700
  policies: []
@@ -24616,29 +24702,53 @@ const LocalazyTransferRoutes = [
24616
24702
  },
24617
24703
  {
24618
24704
  method: "POST",
24619
- path: `${ROUTE_PREFIX$3}/download`,
24705
+ path: `${ROUTE_PREFIX$4}/download`,
24620
24706
  handler: "LocalazyTransferController.download",
24621
24707
  config: {
24622
24708
  policies: []
24623
24709
  }
24624
24710
  }
24625
24711
  ];
24626
- const ROUTE_PREFIX$2 = "/project";
24712
+ const ROUTE_PREFIX$3 = "/project";
24627
24713
  const LocalazyProjectRoutes = [
24628
24714
  {
24629
24715
  method: "GET",
24630
- path: `${ROUTE_PREFIX$2}`,
24716
+ path: `${ROUTE_PREFIX$3}`,
24631
24717
  handler: "LocalazyProjectController.getConnectedProject",
24632
24718
  config: {
24633
24719
  policies: []
24634
24720
  }
24721
+ },
24722
+ {
24723
+ method: "GET",
24724
+ path: `${ROUTE_PREFIX$3}/webhooks`,
24725
+ handler: "LocalazyProjectController.getWebhookStatus",
24726
+ config: {
24727
+ policies: []
24728
+ }
24729
+ },
24730
+ {
24731
+ method: "POST",
24732
+ path: `${ROUTE_PREFIX$3}/webhooks/setup`,
24733
+ handler: "LocalazyProjectController.setupWebhook",
24734
+ config: {
24735
+ policies: []
24736
+ }
24737
+ },
24738
+ {
24739
+ method: "GET",
24740
+ path: `${ROUTE_PREFIX$3}/strapi-url`,
24741
+ handler: "LocalazyProjectController.getStrapiUrl",
24742
+ config: {
24743
+ policies: []
24744
+ }
24635
24745
  }
24636
24746
  ];
24637
- const ROUTE_PREFIX$1 = "/public/transfer";
24747
+ const ROUTE_PREFIX$2 = "/public/transfer";
24638
24748
  const LocalazyPublicTransferRoutes = [
24639
24749
  {
24640
24750
  method: "POST",
24641
- path: `${ROUTE_PREFIX$1}/download`,
24751
+ path: `${ROUTE_PREFIX$2}/download`,
24642
24752
  handler: "LocalazyTransferController.download",
24643
24753
  config: {
24644
24754
  policies: [],
@@ -24648,11 +24758,11 @@ const LocalazyPublicTransferRoutes = [
24648
24758
  }
24649
24759
  }
24650
24760
  ];
24651
- const ROUTE_PREFIX = "/entry-exclusion";
24761
+ const ROUTE_PREFIX$1 = "/entry-exclusion";
24652
24762
  const EntryExclusionRoutes = [
24653
24763
  {
24654
24764
  method: "GET",
24655
- path: `${ROUTE_PREFIX}/:contentType/:documentId`,
24765
+ path: `${ROUTE_PREFIX$1}/:contentType/:documentId`,
24656
24766
  handler: "EntryExclusionController.getEntryExclusion",
24657
24767
  config: {
24658
24768
  policies: []
@@ -24660,7 +24770,7 @@ const EntryExclusionRoutes = [
24660
24770
  },
24661
24771
  {
24662
24772
  method: "PUT",
24663
- path: `${ROUTE_PREFIX}/:contentType/:documentId`,
24773
+ path: `${ROUTE_PREFIX$1}/:contentType/:documentId`,
24664
24774
  handler: "EntryExclusionController.setEntryExclusion",
24665
24775
  config: {
24666
24776
  policies: []
@@ -24668,13 +24778,48 @@ const EntryExclusionRoutes = [
24668
24778
  },
24669
24779
  {
24670
24780
  method: "GET",
24671
- path: `${ROUTE_PREFIX}/:contentType`,
24781
+ path: `${ROUTE_PREFIX$1}/:contentType`,
24672
24782
  handler: "EntryExclusionController.getContentTypeExclusions",
24673
24783
  config: {
24674
24784
  policies: []
24675
24785
  }
24676
24786
  }
24677
24787
  ];
24788
+ const ROUTE_PREFIX = "/activity-logs";
24789
+ const ActivityLogsRoutes = [
24790
+ {
24791
+ method: "GET",
24792
+ path: `${ROUTE_PREFIX}`,
24793
+ handler: "ActivityLogsController.getSessions",
24794
+ config: {
24795
+ policies: []
24796
+ }
24797
+ },
24798
+ {
24799
+ method: "GET",
24800
+ path: `${ROUTE_PREFIX}/export`,
24801
+ handler: "ActivityLogsController.exportSessions",
24802
+ config: {
24803
+ policies: []
24804
+ }
24805
+ },
24806
+ {
24807
+ method: "GET",
24808
+ path: `${ROUTE_PREFIX}/:sessionId`,
24809
+ handler: "ActivityLogsController.getSession",
24810
+ config: {
24811
+ policies: []
24812
+ }
24813
+ },
24814
+ {
24815
+ method: "DELETE",
24816
+ path: `${ROUTE_PREFIX}`,
24817
+ handler: "ActivityLogsController.clearSessions",
24818
+ config: {
24819
+ policies: []
24820
+ }
24821
+ }
24822
+ ];
24678
24823
  const routes = {
24679
24824
  "content-api": {
24680
24825
  routes: [...StrapiRoutes]
@@ -24688,14 +24833,15 @@ const routes = {
24688
24833
  ...StrapiRoutes,
24689
24834
  ...LocalazyTransferRoutes,
24690
24835
  ...LocalazyProjectRoutes,
24691
- ...EntryExclusionRoutes
24836
+ ...EntryExclusionRoutes,
24837
+ ...ActivityLogsRoutes
24692
24838
  ]
24693
24839
  },
24694
24840
  LocalazyPublicTransferRoutes: {
24695
24841
  routes: [...LocalazyPublicTransferRoutes]
24696
24842
  }
24697
24843
  };
24698
- const KEY$3 = "identity";
24844
+ const KEY$4 = "identity";
24699
24845
  const emptyIdentity = {
24700
24846
  accessToken: "",
24701
24847
  project: {
@@ -24719,13 +24865,13 @@ const getStrapiStore = (strapi2) => strapi2.store({
24719
24865
  const LocalazyUserService = ({ strapi: strapi2 }) => ({
24720
24866
  async getUser() {
24721
24867
  const pluginStore = getStrapiStore(strapi2);
24722
- const user = await pluginStore.get({ key: KEY$3 });
24868
+ const user = await pluginStore.get({ key: KEY$4 });
24723
24869
  return user || emptyIdentity;
24724
24870
  },
24725
24871
  async updateUser(identity2) {
24726
24872
  const pluginStore = getStrapiStore(strapi2);
24727
24873
  await pluginStore.set({
24728
- key: KEY$3,
24874
+ key: KEY$4,
24729
24875
  value: identity2
24730
24876
  });
24731
24877
  return identity2;
@@ -24844,6 +24990,25 @@ const LocalazyPubAPIService = ({ strapi: strapi2 }) => ({
24844
24990
  return null;
24845
24991
  }
24846
24992
  },
24993
+ async listWebhooks(projectId) {
24994
+ try {
24995
+ const LocalazyApi = await LocalazyApiClientFactory();
24996
+ const result = await LocalazyApi.webhooks.list({ project: projectId });
24997
+ return result;
24998
+ } catch (e2) {
24999
+ strapi2.log.error(e2);
25000
+ return [];
25001
+ }
25002
+ },
25003
+ async updateWebhooks(projectId, items) {
25004
+ try {
25005
+ const LocalazyApi = await LocalazyApiClientFactory();
25006
+ await LocalazyApi.webhooks.update({ project: projectId, items });
25007
+ } catch (e2) {
25008
+ strapi2.log.error(e2);
25009
+ throw e2;
25010
+ }
25011
+ },
24847
25012
  async getWebhooksSecret(projectId) {
24848
25013
  try {
24849
25014
  const LocalazyApi = await LocalazyApiClientFactory();
@@ -24855,23 +25020,23 @@ const LocalazyPubAPIService = ({ strapi: strapi2 }) => ({
24855
25020
  }
24856
25021
  }
24857
25022
  });
24858
- const KEY$2 = "content-transfer-setup";
25023
+ const KEY$3 = "content-transfer-setup";
24859
25024
  const emptyContentTransferSetup = {
24860
25025
  has_setup: false,
24861
25026
  setup: []
24862
25027
  };
24863
- const KEY$1 = "plugin-settings";
25028
+ const KEY$2 = "plugin-settings";
24864
25029
  const emptyPluginSettings = {
24865
25030
  defaultRoute: null
24866
25031
  };
24867
- const KEY = "sync-cursor";
25032
+ const KEY$1 = "sync-cursor";
24868
25033
  const emptySyncCursor = {
24869
25034
  processedKeys: {}
24870
25035
  };
24871
25036
  const PluginSettingsService = ({ strapi: strapi2 }) => ({
24872
25037
  async getContentTransferSetup() {
24873
25038
  const pluginStore = getStrapiStore(strapi2);
24874
- const setup2 = await pluginStore.get({ key: KEY$2 });
25039
+ const setup2 = await pluginStore.get({ key: KEY$3 });
24875
25040
  return setup2 || emptyContentTransferSetup;
24876
25041
  },
24877
25042
  async updateContentTransferSetup(setup2) {
@@ -24881,14 +25046,14 @@ const PluginSettingsService = ({ strapi: strapi2 }) => ({
24881
25046
  };
24882
25047
  const pluginStore = getStrapiStore(strapi2);
24883
25048
  await pluginStore.set({
24884
- key: KEY$2,
25049
+ key: KEY$3,
24885
25050
  value: newSetup
24886
25051
  });
24887
25052
  return newSetup;
24888
25053
  },
24889
25054
  async getPluginSettings() {
24890
25055
  const pluginStore = getStrapiStore(strapi2);
24891
- const settings = await pluginStore.get({ key: KEY$1 });
25056
+ const settings = await pluginStore.get({ key: KEY$2 });
24892
25057
  return settings || emptyPluginSettings;
24893
25058
  },
24894
25059
  async updatePluginSettings(settings) {
@@ -24899,20 +25064,20 @@ const PluginSettingsService = ({ strapi: strapi2 }) => ({
24899
25064
  };
24900
25065
  const pluginStore = getStrapiStore(strapi2);
24901
25066
  await pluginStore.set({
24902
- key: KEY$1,
25067
+ key: KEY$2,
24903
25068
  value: newSettings
24904
25069
  });
24905
25070
  return newSettings;
24906
25071
  },
24907
25072
  async getSyncCursor() {
24908
25073
  const pluginStore = getStrapiStore(strapi2);
24909
- const cursor = await pluginStore.get({ key: KEY });
25074
+ const cursor = await pluginStore.get({ key: KEY$1 });
24910
25075
  return cursor || emptySyncCursor;
24911
25076
  },
24912
25077
  async updateSyncCursor(cursor) {
24913
25078
  const pluginStore = getStrapiStore(strapi2);
24914
25079
  await pluginStore.set({
24915
- key: KEY,
25080
+ key: KEY$1,
24916
25081
  value: cursor
24917
25082
  });
24918
25083
  return cursor;
@@ -24924,6 +25089,9 @@ const LocalazyTransferUploadService = ({ strapi: strapi2 }) => ({
24924
25089
  await notificationService.emit(EventType.UPLOAD, {
24925
25090
  message: "Upload started"
24926
25091
  });
25092
+ const activityLogsService = getActivityLogsService();
25093
+ const sessionId = await activityLogsService.startSession("upload", "Strapi User");
25094
+ await activityLogsService.addEntry(sessionId, "Upload started");
24927
25095
  let success = true;
24928
25096
  const StrapiService2 = getStrapiService();
24929
25097
  const StrapiI18nService2 = getStrapiI18nService();
@@ -24937,6 +25105,8 @@ const LocalazyTransferUploadService = ({ strapi: strapi2 }) => ({
24937
25105
  success,
24938
25106
  message
24939
25107
  });
25108
+ await activityLogsService.addEntry(sessionId, message);
25109
+ await activityLogsService.finishSession(sessionId, "failed", message);
24940
25110
  strapi2.log.info(message);
24941
25111
  return;
24942
25112
  }
@@ -24957,6 +25127,7 @@ const LocalazyTransferUploadService = ({ strapi: strapi2 }) => ({
24957
25127
  await notificationService.emit(EventType.UPLOAD, {
24958
25128
  message: message2
24959
25129
  });
25130
+ await activityLogsService.addEntry(sessionId, message2);
24960
25131
  strapi2.log.info(message2);
24961
25132
  continue;
24962
25133
  }
@@ -24967,6 +25138,7 @@ const LocalazyTransferUploadService = ({ strapi: strapi2 }) => ({
24967
25138
  await notificationService.emit(EventType.UPLOAD, {
24968
25139
  message: message2
24969
25140
  });
25141
+ await activityLogsService.addEntry(sessionId, message2);
24970
25142
  strapi2.log.warn(message2);
24971
25143
  continue;
24972
25144
  }
@@ -24993,6 +25165,7 @@ const LocalazyTransferUploadService = ({ strapi: strapi2 }) => ({
24993
25165
  await notificationService.emit(EventType.UPLOAD, {
24994
25166
  message: message2
24995
25167
  });
25168
+ await activityLogsService.addEntry(sessionId, message2);
24996
25169
  strapi2.log.info(message2);
24997
25170
  continue;
24998
25171
  }
@@ -25000,6 +25173,7 @@ const LocalazyTransferUploadService = ({ strapi: strapi2 }) => ({
25000
25173
  await notificationService.emit(EventType.UPLOAD, {
25001
25174
  message
25002
25175
  });
25176
+ await activityLogsService.addEntry(sessionId, message);
25003
25177
  strapi2.log.info(message);
25004
25178
  entries = omitDeep(entries, ["locale", "createdAt", "updatedAt", "publishedAt"]);
25005
25179
  entries.forEach((entry) => {
@@ -25037,12 +25211,33 @@ const LocalazyTransferUploadService = ({ strapi: strapi2 }) => ({
25037
25211
  await notificationService.emit(EventType.UPLOAD, {
25038
25212
  message: "Uploading collections to Localazy..."
25039
25213
  });
25040
- await LocalazyUploadService2.upload(importFile, uploadConfig);
25214
+ await activityLogsService.addEntry(sessionId, "Uploading collections to Localazy...");
25215
+ try {
25216
+ await LocalazyUploadService2.upload(importFile, uploadConfig);
25217
+ } catch (error) {
25218
+ success = false;
25219
+ const errorMessage = `Upload to Localazy failed: ${error instanceof Error ? error.message : String(error)}`;
25220
+ strapi2.log.error(errorMessage);
25221
+ await notificationService.emit(EventType.UPLOAD_FINISHED, {
25222
+ success,
25223
+ message: errorMessage
25224
+ });
25225
+ await activityLogsService.addEntry(sessionId, errorMessage);
25226
+ await activityLogsService.finishSession(sessionId, "failed", errorMessage);
25227
+ console.timeEnd("upload");
25228
+ return;
25229
+ }
25041
25230
  strapi2.log.info("Upload finished in");
25042
25231
  await notificationService.emit(EventType.UPLOAD_FINISHED, {
25043
25232
  success,
25044
25233
  message: "Upload finished"
25045
25234
  });
25235
+ await activityLogsService.addEntry(sessionId, "Upload finished");
25236
+ await activityLogsService.finishSession(
25237
+ sessionId,
25238
+ success ? "completed" : "failed",
25239
+ success ? "Upload completed successfully" : "Upload finished with errors"
25240
+ );
25046
25241
  console.timeEnd("upload");
25047
25242
  }
25048
25243
  });
@@ -25461,6 +25656,12 @@ const LocalazyTransferDownloadService = ({ strapi: strapi2 }) => ({
25461
25656
  await notificationService.emit(EventType.DOWNLOAD, {
25462
25657
  message: `Download started (${syncMode})`
25463
25658
  });
25659
+ const activityLogsService = getActivityLogsService();
25660
+ const requestInitiatorHelper = new RequestInitiatorHelper(strapi2);
25661
+ const isWebhook = requestInitiatorHelper.isInitiatedByLocalazyWebhook();
25662
+ const initiatedBy = isWebhook ? "Webhook" : "Strapi User";
25663
+ const sessionId = await activityLogsService.startSession(isWebhook ? "webhook" : "download", initiatedBy);
25664
+ await activityLogsService.addEntry(sessionId, `Download started (${syncMode})`);
25464
25665
  let success = true;
25465
25666
  const StrapiService2 = getStrapiService();
25466
25667
  const StrapiI18nService2 = getStrapiI18nService();
@@ -25479,6 +25680,8 @@ const LocalazyTransferDownloadService = ({ strapi: strapi2 }) => ({
25479
25680
  success,
25480
25681
  message
25481
25682
  });
25683
+ await activityLogsService.addEntry(sessionId, message);
25684
+ await activityLogsService.finishSession(sessionId, "failed", message);
25482
25685
  return;
25483
25686
  }
25484
25687
  const project = await LocalazyPubAPIService2.getProject(user.project.id, false, true);
@@ -25490,6 +25693,8 @@ const LocalazyTransferDownloadService = ({ strapi: strapi2 }) => ({
25490
25693
  success,
25491
25694
  message
25492
25695
  });
25696
+ await activityLogsService.addEntry(sessionId, message);
25697
+ await activityLogsService.finishSession(sessionId, "failed", message);
25493
25698
  return;
25494
25699
  }
25495
25700
  const projectLanguages = project.languages;
@@ -25503,6 +25708,8 @@ const LocalazyTransferDownloadService = ({ strapi: strapi2 }) => ({
25503
25708
  success,
25504
25709
  message
25505
25710
  });
25711
+ await activityLogsService.addEntry(sessionId, message);
25712
+ await activityLogsService.finishSession(sessionId, "failed", message);
25506
25713
  return;
25507
25714
  }
25508
25715
  const projectSourceLanguageCode = sourceLanguage.code;
@@ -25516,6 +25723,8 @@ const LocalazyTransferDownloadService = ({ strapi: strapi2 }) => ({
25516
25723
  success,
25517
25724
  message
25518
25725
  });
25726
+ await activityLogsService.addEntry(sessionId, message);
25727
+ await activityLogsService.finishSession(sessionId, "completed", message);
25519
25728
  return;
25520
25729
  }
25521
25730
  let languagesCodes = projectLanguagesWithoutSourceLanguage.map((language3) => language3.code);
@@ -25534,6 +25743,7 @@ const LocalazyTransferDownloadService = ({ strapi: strapi2 }) => ({
25534
25743
  await notificationService.emit(EventType.DOWNLOAD, {
25535
25744
  message: `Created locale ${newLocale.code}`
25536
25745
  });
25746
+ await activityLogsService.addEntry(sessionId, `Created locale ${newLocale.code}`);
25537
25747
  } catch (e2) {
25538
25748
  strapi2.log.error(e2.message);
25539
25749
  if (e2.name === "ValidationError") {
@@ -25541,10 +25751,12 @@ const LocalazyTransferDownloadService = ({ strapi: strapi2 }) => ({
25541
25751
  await notificationService.emit(EventType.DOWNLOAD, {
25542
25752
  message: `Language ${isoLocalazy} is not supported by Strapi`
25543
25753
  });
25754
+ await activityLogsService.addEntry(sessionId, `Language ${isoLocalazy} is not supported by Strapi`);
25544
25755
  } else {
25545
25756
  await notificationService.emit(EventType.DOWNLOAD, {
25546
25757
  message: e2.message
25547
25758
  });
25759
+ await activityLogsService.addEntry(sessionId, e2.message);
25548
25760
  }
25549
25761
  }
25550
25762
  }
@@ -25569,6 +25781,7 @@ const LocalazyTransferDownloadService = ({ strapi: strapi2 }) => ({
25569
25781
  await notificationService.emit(EventType.DOWNLOAD, {
25570
25782
  message: `No keys found for language ${isoLocalazy}`
25571
25783
  });
25784
+ await activityLogsService.addEntry(sessionId, `No keys found for language ${isoLocalazy}`);
25572
25785
  } else {
25573
25786
  const newKeys = langKeys.filter((k2) => {
25574
25787
  const storedEvent = langProcessedKeys[k2.id];
@@ -25577,6 +25790,10 @@ const LocalazyTransferDownloadService = ({ strapi: strapi2 }) => ({
25577
25790
  await notificationService.emit(EventType.DOWNLOAD, {
25578
25791
  message: `${syncMode}: ${newKeys.length} changed / ${langKeys.length} total keys for language ${isoLocalazy}`
25579
25792
  });
25793
+ await activityLogsService.addEntry(
25794
+ sessionId,
25795
+ `${syncMode}: ${newKeys.length} changed / ${langKeys.length} total keys for language ${isoLocalazy}`
25796
+ );
25580
25797
  }
25581
25798
  localazyContent[isoLocalazy] = langKeys;
25582
25799
  }
@@ -25729,6 +25946,7 @@ const LocalazyTransferDownloadService = ({ strapi: strapi2 }) => ({
25729
25946
  await notificationService.emit(EventType.DOWNLOAD, {
25730
25947
  message
25731
25948
  });
25949
+ await activityLogsService.addEntry(sessionId, message);
25732
25950
  await markKeysProcessed(sourceKeys);
25733
25951
  } catch (e2) {
25734
25952
  success = false;
@@ -25741,6 +25959,10 @@ const LocalazyTransferDownloadService = ({ strapi: strapi2 }) => ({
25741
25959
  localazy: localazySearchUrl
25742
25960
  }
25743
25961
  });
25962
+ await activityLogsService.addEntry(
25963
+ sessionId,
25964
+ `Failed to create ${uid} [${documentId}] in ${isoStrapi}: ${e2.message}`
25965
+ );
25744
25966
  }
25745
25967
  } else {
25746
25968
  try {
@@ -25758,6 +25980,7 @@ const LocalazyTransferDownloadService = ({ strapi: strapi2 }) => ({
25758
25980
  await notificationService.emit(EventType.DOWNLOAD, {
25759
25981
  message
25760
25982
  });
25983
+ await activityLogsService.addEntry(sessionId, message);
25761
25984
  await markKeysProcessed(sourceKeys);
25762
25985
  } catch (e2) {
25763
25986
  success = false;
@@ -25770,6 +25993,10 @@ const LocalazyTransferDownloadService = ({ strapi: strapi2 }) => ({
25770
25993
  localazy: localazySearchUrl
25771
25994
  }
25772
25995
  });
25996
+ await activityLogsService.addEntry(
25997
+ sessionId,
25998
+ `Failed to update ${uid} [${documentId}] in ${isoStrapi}: ${e2.message}`
25999
+ );
25773
26000
  }
25774
26001
  }
25775
26002
  } catch (e2) {
@@ -25778,6 +26005,10 @@ const LocalazyTransferDownloadService = ({ strapi: strapi2 }) => ({
25778
26005
  await notificationService.emit(EventType.DOWNLOAD, {
25779
26006
  message: `Error processing ${uid} [${documentId}] in ${isoStrapi}: ${e2.message}`
25780
26007
  });
26008
+ await activityLogsService.addEntry(
26009
+ sessionId,
26010
+ `Error processing ${uid} [${documentId}] in ${isoStrapi}: ${e2.message}`
26011
+ );
25781
26012
  }
25782
26013
  }
25783
26014
  }
@@ -25793,6 +26024,13 @@ const LocalazyTransferDownloadService = ({ strapi: strapi2 }) => ({
25793
26024
  success,
25794
26025
  message: "Download finished"
25795
26026
  });
26027
+ const finishMessage = `Download finished. Tracked ${totalProcessedKeys} processed keys across ${Object.keys(processedKeys).length} languages.`;
26028
+ await activityLogsService.addEntry(sessionId, finishMessage);
26029
+ await activityLogsService.finishSession(
26030
+ sessionId,
26031
+ success ? "completed" : "failed",
26032
+ success ? "Download completed successfully" : "Download finished with errors"
26033
+ );
25796
26034
  console.timeEnd("download");
25797
26035
  }
25798
26036
  });
@@ -26516,6 +26754,112 @@ const EntryExclusionService = ({ strapi: strapi2 }) => ({
26516
26754
  return Object.values(exclusions).filter((exclusion) => exclusion.contentType === contentType && exclusion.excludeFromTranslation).map((exclusion) => exclusion.documentId);
26517
26755
  }
26518
26756
  });
26757
+ const KEY = "activity-logs";
26758
+ const emptyActivityLogs = {
26759
+ sessions: []
26760
+ };
26761
+ const ONE_YEAR_MS = 365 * 24 * 60 * 60 * 1e3;
26762
+ let writeLock = Promise.resolve();
26763
+ const withLock = async (fn) => {
26764
+ let release;
26765
+ const next = new Promise((resolve) => {
26766
+ release = resolve;
26767
+ });
26768
+ const prev2 = writeLock;
26769
+ writeLock = next;
26770
+ await prev2;
26771
+ try {
26772
+ return await fn();
26773
+ } finally {
26774
+ release();
26775
+ }
26776
+ };
26777
+ const ActivityLogsService = ({ strapi: strapi2 }) => ({
26778
+ async getActivityLogs() {
26779
+ const pluginStore = getStrapiStore(strapi2);
26780
+ const logs = await pluginStore.get({ key: KEY });
26781
+ return logs || { sessions: [] };
26782
+ },
26783
+ async saveActivityLogs(logs) {
26784
+ const pluginStore = getStrapiStore(strapi2);
26785
+ await pluginStore.set({
26786
+ key: KEY,
26787
+ value: logs
26788
+ });
26789
+ },
26790
+ async startSession(eventType, initiatedBy) {
26791
+ return withLock(async () => {
26792
+ const logs = await this.getActivityLogs();
26793
+ const sessionId = generateRandomId();
26794
+ const session = {
26795
+ id: sessionId,
26796
+ eventType,
26797
+ status: "in-progress",
26798
+ startedAt: Date.now(),
26799
+ initiatedBy,
26800
+ summary: "",
26801
+ entries: []
26802
+ };
26803
+ logs.sessions.unshift(session);
26804
+ const cutoff = Date.now() - ONE_YEAR_MS;
26805
+ logs.sessions = logs.sessions.filter((s2) => s2.startedAt >= cutoff);
26806
+ await this.saveActivityLogs(logs);
26807
+ return sessionId;
26808
+ });
26809
+ },
26810
+ async addEntry(sessionId, message, data) {
26811
+ return withLock(async () => {
26812
+ const logs = await this.getActivityLogs();
26813
+ const session = logs.sessions.find((s2) => s2.id === sessionId);
26814
+ if (!session) {
26815
+ return;
26816
+ }
26817
+ const entry = {
26818
+ message,
26819
+ timestamp: Date.now(),
26820
+ data
26821
+ };
26822
+ session.entries.push(entry);
26823
+ await this.saveActivityLogs(logs);
26824
+ });
26825
+ },
26826
+ async finishSession(sessionId, status, summary) {
26827
+ return withLock(async () => {
26828
+ const logs = await this.getActivityLogs();
26829
+ const session = logs.sessions.find((s2) => s2.id === sessionId);
26830
+ if (!session) {
26831
+ return;
26832
+ }
26833
+ session.status = status;
26834
+ session.finishedAt = Date.now();
26835
+ session.summary = summary;
26836
+ await this.saveActivityLogs(logs);
26837
+ });
26838
+ },
26839
+ async getSessions(eventType) {
26840
+ const logs = await this.getActivityLogs();
26841
+ let { sessions } = logs;
26842
+ if (eventType) {
26843
+ sessions = sessions.filter((s2) => s2.eventType === eventType);
26844
+ }
26845
+ return sessions.map((s2) => ({
26846
+ ...s2,
26847
+ entries: []
26848
+ }));
26849
+ },
26850
+ async getAllSessionsWithEntries() {
26851
+ const logs = await this.getActivityLogs();
26852
+ return logs.sessions;
26853
+ },
26854
+ async getSession(sessionId) {
26855
+ const logs = await this.getActivityLogs();
26856
+ const session = logs.sessions.find((s2) => s2.id === sessionId);
26857
+ return session || null;
26858
+ },
26859
+ async clearSessions() {
26860
+ await this.saveActivityLogs(emptyActivityLogs);
26861
+ }
26862
+ });
26519
26863
  const services = {
26520
26864
  LocalazyUserService,
26521
26865
  StrapiService,
@@ -26526,7 +26870,8 @@ const services = {
26526
26870
  StrapiI18nService,
26527
26871
  LocalazyUploadService,
26528
26872
  StrapiLocalazyI18nService,
26529
- EntryExclusionService
26873
+ EntryExclusionService,
26874
+ ActivityLogsService
26530
26875
  };
26531
26876
  const index = {
26532
26877
  register,