@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
@@ -20519,7 +20519,7 @@ var distExports = dist$1.exports;
20519
20519
  const io = /* @__PURE__ */ getDefaultExportFromCjs(distExports);
20520
20520
  const { Server: Server2, Namespace, Socket: Socket3 } = io;
20521
20521
  const name = "@localazy/strapi-plugin";
20522
- const version = "1.1.0";
20522
+ const version = "1.1.1";
20523
20523
  const description = "The official Strapi Plugin by Localazy.";
20524
20524
  const keywords = [
20525
20525
  "strapi",
@@ -22063,6 +22063,9 @@ const getLocalazyUploadService = () => {
22063
22063
  const getEntryExclusionService = () => {
22064
22064
  return strapi.plugin(PLUGIN_NAME).service("EntryExclusionService");
22065
22065
  };
22066
+ const getActivityLogsService = () => {
22067
+ return strapi.plugin(PLUGIN_NAME).service("ActivityLogsService");
22068
+ };
22066
22069
  class PluginSettingsServiceHelper {
22067
22070
  constructor() {
22068
22071
  this.PluginSettingsService = getPluginSettingsService();
@@ -24199,13 +24202,74 @@ const StrapiController = ({ strapi: strapi2 }) => ({
24199
24202
  };
24200
24203
  }
24201
24204
  });
24202
- const LocalazyProjectController = ({ strapi: _strapi }) => ({
24205
+ const STRAPI_WEBHOOK_CUSTOM_ID = "strapi-plugin-localazy";
24206
+ const LocalazyProjectController = ({ strapi: strapi2 }) => ({
24203
24207
  async getConnectedProject(ctx) {
24204
24208
  const LocalazyUserService2 = getLocalazyUserService();
24205
24209
  const LocalazyPubAPIService2 = getLocalazyPubAPIService();
24206
24210
  const user = await LocalazyUserService2.getUser();
24207
24211
  const project = await LocalazyPubAPIService2.getProject(user.project.id, true, true);
24208
24212
  ctx.body = project;
24213
+ },
24214
+ async getWebhookStatus(ctx) {
24215
+ const LocalazyUserService2 = getLocalazyUserService();
24216
+ const user = await LocalazyUserService2.getUser();
24217
+ const LocalazyPubApiService = getLocalazyPubAPIService();
24218
+ const webhooks = await LocalazyPubApiService.listWebhooks(user.project.id);
24219
+ const ours = webhooks.find((w2) => w2.customId === STRAPI_WEBHOOK_CUSTOM_ID);
24220
+ if (ours) {
24221
+ ctx.body = { status: "configured", url: ours.url, enabled: ours.enabled };
24222
+ return;
24223
+ }
24224
+ ctx.body = { status: "not_configured" };
24225
+ },
24226
+ async setupWebhook(ctx) {
24227
+ const { url: url2 } = ctx.request.body;
24228
+ if (!url2 || typeof url2 !== "string") {
24229
+ return ctx.badRequest("Webhook URL is required");
24230
+ }
24231
+ try {
24232
+ const parsed = new URL(url2);
24233
+ if (parsed.protocol !== "http:" && parsed.protocol !== "https:") {
24234
+ return ctx.badRequest("Webhook URL must use http or https protocol");
24235
+ }
24236
+ } catch {
24237
+ return ctx.badRequest("Invalid webhook URL");
24238
+ }
24239
+ const LocalazyUserService2 = getLocalazyUserService();
24240
+ const user = await LocalazyUserService2.getUser();
24241
+ const LocalazyPubApiService = getLocalazyPubAPIService();
24242
+ const PluginSettingsService2 = getPluginSettingsService();
24243
+ const existing = await LocalazyPubApiService.listWebhooks(user.project.id);
24244
+ const filtered = existing.filter((w2) => w2.customId !== STRAPI_WEBHOOK_CUSTOM_ID);
24245
+ const items = [
24246
+ ...filtered,
24247
+ {
24248
+ enabled: true,
24249
+ customId: STRAPI_WEBHOOK_CUSTOM_ID,
24250
+ url: url2,
24251
+ events: ["project_published"],
24252
+ description: "Strapi Plugin - Download translations"
24253
+ }
24254
+ ];
24255
+ await LocalazyPubApiService.updateWebhooks(user.project.id, items);
24256
+ await PluginSettingsService2.updatePluginSettings({
24257
+ webhookConfig: { url: url2 }
24258
+ });
24259
+ ctx.body = { success: true };
24260
+ },
24261
+ async getStrapiUrl(ctx) {
24262
+ let url2 = strapi2.config.get("server.url");
24263
+ if (!url2) {
24264
+ const host = strapi2.config.get("server.host") || "0.0.0.0";
24265
+ const port = strapi2.config.get("server.port") || 1337;
24266
+ const displayHost = host === "0.0.0.0" || host === "::" ? "localhost" : host;
24267
+ url2 = `http://${displayHost}:${port}`;
24268
+ }
24269
+ const isLocal = /^https?:\/\/(localhost|127\.0\.0\.1|0\.0\.0\.0|10\.|172\.(1[6-9]|2\d|3[01])\.|192\.168\.)/.test(
24270
+ url2
24271
+ );
24272
+ ctx.body = { url: url2, isLocal };
24209
24273
  }
24210
24274
  });
24211
24275
  const PluginSettingsController = ({ strapi: _strapi }) => ({
@@ -24403,6 +24467,27 @@ const EntryExclusionController = ({ strapi: strapi2 }) => ({
24403
24467
  }
24404
24468
  }
24405
24469
  });
24470
+ const ActivityLogsController = ({ strapi: _strapi }) => ({
24471
+ async getSessions(ctx) {
24472
+ const { type: type2 } = ctx.query;
24473
+ ctx.body = await getActivityLogsService().getSessions(type2);
24474
+ },
24475
+ async getSession(ctx) {
24476
+ const { sessionId } = ctx.params;
24477
+ const session = await getActivityLogsService().getSession(sessionId);
24478
+ if (!session) {
24479
+ return ctx.notFound("Session not found");
24480
+ }
24481
+ ctx.body = session;
24482
+ },
24483
+ async exportSessions(ctx) {
24484
+ ctx.body = await getActivityLogsService().getAllSessionsWithEntries();
24485
+ },
24486
+ async clearSessions(ctx) {
24487
+ await getActivityLogsService().clearSessions();
24488
+ ctx.body = { success: true };
24489
+ }
24490
+ });
24406
24491
  const controllers = {
24407
24492
  LocalazyUserController,
24408
24493
  LocalazyAuthController,
@@ -24410,7 +24495,8 @@ const controllers = {
24410
24495
  LocalazyProjectController,
24411
24496
  PluginSettingsController,
24412
24497
  LocalazyTransferController,
24413
- EntryExclusionController
24498
+ EntryExclusionController,
24499
+ ActivityLogsController
24414
24500
  };
24415
24501
  const verifyWebhook = (config2, { strapi: strapi2 }) => {
24416
24502
  return async (ctx, next) => {
@@ -24467,11 +24553,11 @@ const middlewares = {
24467
24553
  verifyWebhook
24468
24554
  };
24469
24555
  const policies = {};
24470
- const ROUTE_PREFIX$7 = "/user";
24556
+ const ROUTE_PREFIX$8 = "/user";
24471
24557
  const LocalazyUserRoutes = [
24472
24558
  {
24473
24559
  method: "GET",
24474
- path: `${ROUTE_PREFIX$7}`,
24560
+ path: `${ROUTE_PREFIX$8}`,
24475
24561
  handler: "LocalazyUserController.getUser",
24476
24562
  config: {
24477
24563
  policies: []
@@ -24479,7 +24565,7 @@ const LocalazyUserRoutes = [
24479
24565
  },
24480
24566
  {
24481
24567
  method: "PUT",
24482
- path: `${ROUTE_PREFIX$7}`,
24568
+ path: `${ROUTE_PREFIX$8}`,
24483
24569
  handler: "LocalazyUserController.updateUser",
24484
24570
  config: {
24485
24571
  policies: []
@@ -24487,18 +24573,18 @@ const LocalazyUserRoutes = [
24487
24573
  },
24488
24574
  {
24489
24575
  method: "DELETE",
24490
- path: `${ROUTE_PREFIX$7}`,
24576
+ path: `${ROUTE_PREFIX$8}`,
24491
24577
  handler: "LocalazyUserController.deleteUser",
24492
24578
  config: {
24493
24579
  policies: []
24494
24580
  }
24495
24581
  }
24496
24582
  ];
24497
- const ROUTE_PREFIX$6 = "/auth";
24583
+ const ROUTE_PREFIX$7 = "/auth";
24498
24584
  const LocalazyAuthRoutes = [
24499
24585
  {
24500
24586
  method: "GET",
24501
- path: `${ROUTE_PREFIX$6}/generate-keys`,
24587
+ path: `${ROUTE_PREFIX$7}/generate-keys`,
24502
24588
  handler: "LocalazyAuthController.generateKeys",
24503
24589
  config: {
24504
24590
  policies: []
@@ -24506,18 +24592,18 @@ const LocalazyAuthRoutes = [
24506
24592
  },
24507
24593
  {
24508
24594
  method: "GET",
24509
- path: `${ROUTE_PREFIX$6}/continuous-poll`,
24595
+ path: `${ROUTE_PREFIX$7}/continuous-poll`,
24510
24596
  handler: "LocalazyAuthController.continuousPoll",
24511
24597
  config: {
24512
24598
  policies: []
24513
24599
  }
24514
24600
  }
24515
24601
  ];
24516
- const ROUTE_PREFIX$5 = "/plugin-settings";
24602
+ const ROUTE_PREFIX$6 = "/plugin-settings";
24517
24603
  const PluginSettingsRoutes = [
24518
24604
  {
24519
24605
  method: "GET",
24520
- path: `${ROUTE_PREFIX$5}/content-transfer-setup`,
24606
+ path: `${ROUTE_PREFIX$6}/content-transfer-setup`,
24521
24607
  handler: "PluginSettingsController.getContentTransferSetup",
24522
24608
  config: {
24523
24609
  policies: []
@@ -24525,7 +24611,7 @@ const PluginSettingsRoutes = [
24525
24611
  },
24526
24612
  {
24527
24613
  method: "PUT",
24528
- path: `${ROUTE_PREFIX$5}/content-transfer-setup`,
24614
+ path: `${ROUTE_PREFIX$6}/content-transfer-setup`,
24529
24615
  handler: "PluginSettingsController.updateContentTransferSetup",
24530
24616
  config: {
24531
24617
  policies: []
@@ -24533,7 +24619,7 @@ const PluginSettingsRoutes = [
24533
24619
  },
24534
24620
  {
24535
24621
  method: "GET",
24536
- path: `${ROUTE_PREFIX$5}/plugin-settings`,
24622
+ path: `${ROUTE_PREFIX$6}/plugin-settings`,
24537
24623
  handler: "PluginSettingsController.getPluginSettings",
24538
24624
  config: {
24539
24625
  policies: []
@@ -24541,7 +24627,7 @@ const PluginSettingsRoutes = [
24541
24627
  },
24542
24628
  {
24543
24629
  method: "PUT",
24544
- path: `${ROUTE_PREFIX$5}/plugin-settings`,
24630
+ path: `${ROUTE_PREFIX$6}/plugin-settings`,
24545
24631
  handler: "PluginSettingsController.updatePluginSettings",
24546
24632
  config: {
24547
24633
  policies: []
@@ -24549,18 +24635,18 @@ const PluginSettingsRoutes = [
24549
24635
  },
24550
24636
  {
24551
24637
  method: "GET",
24552
- path: `${ROUTE_PREFIX$5}/sync-cursor`,
24638
+ path: `${ROUTE_PREFIX$6}/sync-cursor`,
24553
24639
  handler: "PluginSettingsController.getSyncCursor",
24554
24640
  config: {
24555
24641
  policies: []
24556
24642
  }
24557
24643
  }
24558
24644
  ];
24559
- const ROUTE_PREFIX$4 = "/strapi";
24645
+ const ROUTE_PREFIX$5 = "/strapi";
24560
24646
  const StrapiRoutes = [
24561
24647
  {
24562
24648
  method: "GET",
24563
- path: `${ROUTE_PREFIX$4}/models`,
24649
+ path: `${ROUTE_PREFIX$5}/models`,
24564
24650
  handler: "StrapiController.getModels",
24565
24651
  config: {
24566
24652
  policies: []
@@ -24568,7 +24654,7 @@ const StrapiRoutes = [
24568
24654
  },
24569
24655
  {
24570
24656
  method: "GET",
24571
- path: `${ROUTE_PREFIX$4}/localizable-models`,
24657
+ path: `${ROUTE_PREFIX$5}/localizable-models`,
24572
24658
  handler: "StrapiController.getLocalizableModels",
24573
24659
  config: {
24574
24660
  policies: []
@@ -24576,7 +24662,7 @@ const StrapiRoutes = [
24576
24662
  },
24577
24663
  {
24578
24664
  method: "POST",
24579
- path: `${ROUTE_PREFIX$4}/lifecycle/localazy-webhooks`,
24665
+ path: `${ROUTE_PREFIX$5}/lifecycle/localazy-webhooks`,
24580
24666
  handler: "StrapiController.postLifecycleLocalazyWebhooks",
24581
24667
  config: {
24582
24668
  policies: []
@@ -24584,18 +24670,18 @@ const StrapiRoutes = [
24584
24670
  },
24585
24671
  {
24586
24672
  method: "GET",
24587
- path: `${ROUTE_PREFIX$4}/version`,
24673
+ path: `${ROUTE_PREFIX$5}/version`,
24588
24674
  handler: "StrapiController.getPluginVersion",
24589
24675
  config: {
24590
24676
  policies: []
24591
24677
  }
24592
24678
  }
24593
24679
  ];
24594
- const ROUTE_PREFIX$3 = "/transfer";
24680
+ const ROUTE_PREFIX$4 = "/transfer";
24595
24681
  const LocalazyTransferRoutes = [
24596
24682
  {
24597
24683
  method: "POST",
24598
- path: `${ROUTE_PREFIX$3}/upload`,
24684
+ path: `${ROUTE_PREFIX$4}/upload`,
24599
24685
  handler: "LocalazyTransferController.upload",
24600
24686
  config: {
24601
24687
  policies: []
@@ -24603,29 +24689,53 @@ const LocalazyTransferRoutes = [
24603
24689
  },
24604
24690
  {
24605
24691
  method: "POST",
24606
- path: `${ROUTE_PREFIX$3}/download`,
24692
+ path: `${ROUTE_PREFIX$4}/download`,
24607
24693
  handler: "LocalazyTransferController.download",
24608
24694
  config: {
24609
24695
  policies: []
24610
24696
  }
24611
24697
  }
24612
24698
  ];
24613
- const ROUTE_PREFIX$2 = "/project";
24699
+ const ROUTE_PREFIX$3 = "/project";
24614
24700
  const LocalazyProjectRoutes = [
24615
24701
  {
24616
24702
  method: "GET",
24617
- path: `${ROUTE_PREFIX$2}`,
24703
+ path: `${ROUTE_PREFIX$3}`,
24618
24704
  handler: "LocalazyProjectController.getConnectedProject",
24619
24705
  config: {
24620
24706
  policies: []
24621
24707
  }
24708
+ },
24709
+ {
24710
+ method: "GET",
24711
+ path: `${ROUTE_PREFIX$3}/webhooks`,
24712
+ handler: "LocalazyProjectController.getWebhookStatus",
24713
+ config: {
24714
+ policies: []
24715
+ }
24716
+ },
24717
+ {
24718
+ method: "POST",
24719
+ path: `${ROUTE_PREFIX$3}/webhooks/setup`,
24720
+ handler: "LocalazyProjectController.setupWebhook",
24721
+ config: {
24722
+ policies: []
24723
+ }
24724
+ },
24725
+ {
24726
+ method: "GET",
24727
+ path: `${ROUTE_PREFIX$3}/strapi-url`,
24728
+ handler: "LocalazyProjectController.getStrapiUrl",
24729
+ config: {
24730
+ policies: []
24731
+ }
24622
24732
  }
24623
24733
  ];
24624
- const ROUTE_PREFIX$1 = "/public/transfer";
24734
+ const ROUTE_PREFIX$2 = "/public/transfer";
24625
24735
  const LocalazyPublicTransferRoutes = [
24626
24736
  {
24627
24737
  method: "POST",
24628
- path: `${ROUTE_PREFIX$1}/download`,
24738
+ path: `${ROUTE_PREFIX$2}/download`,
24629
24739
  handler: "LocalazyTransferController.download",
24630
24740
  config: {
24631
24741
  policies: [],
@@ -24635,11 +24745,11 @@ const LocalazyPublicTransferRoutes = [
24635
24745
  }
24636
24746
  }
24637
24747
  ];
24638
- const ROUTE_PREFIX = "/entry-exclusion";
24748
+ const ROUTE_PREFIX$1 = "/entry-exclusion";
24639
24749
  const EntryExclusionRoutes = [
24640
24750
  {
24641
24751
  method: "GET",
24642
- path: `${ROUTE_PREFIX}/:contentType/:documentId`,
24752
+ path: `${ROUTE_PREFIX$1}/:contentType/:documentId`,
24643
24753
  handler: "EntryExclusionController.getEntryExclusion",
24644
24754
  config: {
24645
24755
  policies: []
@@ -24647,7 +24757,7 @@ const EntryExclusionRoutes = [
24647
24757
  },
24648
24758
  {
24649
24759
  method: "PUT",
24650
- path: `${ROUTE_PREFIX}/:contentType/:documentId`,
24760
+ path: `${ROUTE_PREFIX$1}/:contentType/:documentId`,
24651
24761
  handler: "EntryExclusionController.setEntryExclusion",
24652
24762
  config: {
24653
24763
  policies: []
@@ -24655,13 +24765,48 @@ const EntryExclusionRoutes = [
24655
24765
  },
24656
24766
  {
24657
24767
  method: "GET",
24658
- path: `${ROUTE_PREFIX}/:contentType`,
24768
+ path: `${ROUTE_PREFIX$1}/:contentType`,
24659
24769
  handler: "EntryExclusionController.getContentTypeExclusions",
24660
24770
  config: {
24661
24771
  policies: []
24662
24772
  }
24663
24773
  }
24664
24774
  ];
24775
+ const ROUTE_PREFIX = "/activity-logs";
24776
+ const ActivityLogsRoutes = [
24777
+ {
24778
+ method: "GET",
24779
+ path: `${ROUTE_PREFIX}`,
24780
+ handler: "ActivityLogsController.getSessions",
24781
+ config: {
24782
+ policies: []
24783
+ }
24784
+ },
24785
+ {
24786
+ method: "GET",
24787
+ path: `${ROUTE_PREFIX}/export`,
24788
+ handler: "ActivityLogsController.exportSessions",
24789
+ config: {
24790
+ policies: []
24791
+ }
24792
+ },
24793
+ {
24794
+ method: "GET",
24795
+ path: `${ROUTE_PREFIX}/:sessionId`,
24796
+ handler: "ActivityLogsController.getSession",
24797
+ config: {
24798
+ policies: []
24799
+ }
24800
+ },
24801
+ {
24802
+ method: "DELETE",
24803
+ path: `${ROUTE_PREFIX}`,
24804
+ handler: "ActivityLogsController.clearSessions",
24805
+ config: {
24806
+ policies: []
24807
+ }
24808
+ }
24809
+ ];
24665
24810
  const routes = {
24666
24811
  "content-api": {
24667
24812
  routes: [...StrapiRoutes]
@@ -24675,14 +24820,15 @@ const routes = {
24675
24820
  ...StrapiRoutes,
24676
24821
  ...LocalazyTransferRoutes,
24677
24822
  ...LocalazyProjectRoutes,
24678
- ...EntryExclusionRoutes
24823
+ ...EntryExclusionRoutes,
24824
+ ...ActivityLogsRoutes
24679
24825
  ]
24680
24826
  },
24681
24827
  LocalazyPublicTransferRoutes: {
24682
24828
  routes: [...LocalazyPublicTransferRoutes]
24683
24829
  }
24684
24830
  };
24685
- const KEY$3 = "identity";
24831
+ const KEY$4 = "identity";
24686
24832
  const emptyIdentity = {
24687
24833
  accessToken: "",
24688
24834
  project: {
@@ -24706,13 +24852,13 @@ const getStrapiStore = (strapi2) => strapi2.store({
24706
24852
  const LocalazyUserService = ({ strapi: strapi2 }) => ({
24707
24853
  async getUser() {
24708
24854
  const pluginStore = getStrapiStore(strapi2);
24709
- const user = await pluginStore.get({ key: KEY$3 });
24855
+ const user = await pluginStore.get({ key: KEY$4 });
24710
24856
  return user || emptyIdentity;
24711
24857
  },
24712
24858
  async updateUser(identity2) {
24713
24859
  const pluginStore = getStrapiStore(strapi2);
24714
24860
  await pluginStore.set({
24715
- key: KEY$3,
24861
+ key: KEY$4,
24716
24862
  value: identity2
24717
24863
  });
24718
24864
  return identity2;
@@ -24831,6 +24977,25 @@ const LocalazyPubAPIService = ({ strapi: strapi2 }) => ({
24831
24977
  return null;
24832
24978
  }
24833
24979
  },
24980
+ async listWebhooks(projectId) {
24981
+ try {
24982
+ const LocalazyApi = await LocalazyApiClientFactory();
24983
+ const result = await LocalazyApi.webhooks.list({ project: projectId });
24984
+ return result;
24985
+ } catch (e2) {
24986
+ strapi2.log.error(e2);
24987
+ return [];
24988
+ }
24989
+ },
24990
+ async updateWebhooks(projectId, items) {
24991
+ try {
24992
+ const LocalazyApi = await LocalazyApiClientFactory();
24993
+ await LocalazyApi.webhooks.update({ project: projectId, items });
24994
+ } catch (e2) {
24995
+ strapi2.log.error(e2);
24996
+ throw e2;
24997
+ }
24998
+ },
24834
24999
  async getWebhooksSecret(projectId) {
24835
25000
  try {
24836
25001
  const LocalazyApi = await LocalazyApiClientFactory();
@@ -24842,23 +25007,23 @@ const LocalazyPubAPIService = ({ strapi: strapi2 }) => ({
24842
25007
  }
24843
25008
  }
24844
25009
  });
24845
- const KEY$2 = "content-transfer-setup";
25010
+ const KEY$3 = "content-transfer-setup";
24846
25011
  const emptyContentTransferSetup = {
24847
25012
  has_setup: false,
24848
25013
  setup: []
24849
25014
  };
24850
- const KEY$1 = "plugin-settings";
25015
+ const KEY$2 = "plugin-settings";
24851
25016
  const emptyPluginSettings = {
24852
25017
  defaultRoute: null
24853
25018
  };
24854
- const KEY = "sync-cursor";
25019
+ const KEY$1 = "sync-cursor";
24855
25020
  const emptySyncCursor = {
24856
25021
  processedKeys: {}
24857
25022
  };
24858
25023
  const PluginSettingsService = ({ strapi: strapi2 }) => ({
24859
25024
  async getContentTransferSetup() {
24860
25025
  const pluginStore = getStrapiStore(strapi2);
24861
- const setup2 = await pluginStore.get({ key: KEY$2 });
25026
+ const setup2 = await pluginStore.get({ key: KEY$3 });
24862
25027
  return setup2 || emptyContentTransferSetup;
24863
25028
  },
24864
25029
  async updateContentTransferSetup(setup2) {
@@ -24868,14 +25033,14 @@ const PluginSettingsService = ({ strapi: strapi2 }) => ({
24868
25033
  };
24869
25034
  const pluginStore = getStrapiStore(strapi2);
24870
25035
  await pluginStore.set({
24871
- key: KEY$2,
25036
+ key: KEY$3,
24872
25037
  value: newSetup
24873
25038
  });
24874
25039
  return newSetup;
24875
25040
  },
24876
25041
  async getPluginSettings() {
24877
25042
  const pluginStore = getStrapiStore(strapi2);
24878
- const settings = await pluginStore.get({ key: KEY$1 });
25043
+ const settings = await pluginStore.get({ key: KEY$2 });
24879
25044
  return settings || emptyPluginSettings;
24880
25045
  },
24881
25046
  async updatePluginSettings(settings) {
@@ -24886,20 +25051,20 @@ const PluginSettingsService = ({ strapi: strapi2 }) => ({
24886
25051
  };
24887
25052
  const pluginStore = getStrapiStore(strapi2);
24888
25053
  await pluginStore.set({
24889
- key: KEY$1,
25054
+ key: KEY$2,
24890
25055
  value: newSettings
24891
25056
  });
24892
25057
  return newSettings;
24893
25058
  },
24894
25059
  async getSyncCursor() {
24895
25060
  const pluginStore = getStrapiStore(strapi2);
24896
- const cursor = await pluginStore.get({ key: KEY });
25061
+ const cursor = await pluginStore.get({ key: KEY$1 });
24897
25062
  return cursor || emptySyncCursor;
24898
25063
  },
24899
25064
  async updateSyncCursor(cursor) {
24900
25065
  const pluginStore = getStrapiStore(strapi2);
24901
25066
  await pluginStore.set({
24902
- key: KEY,
25067
+ key: KEY$1,
24903
25068
  value: cursor
24904
25069
  });
24905
25070
  return cursor;
@@ -24911,6 +25076,9 @@ const LocalazyTransferUploadService = ({ strapi: strapi2 }) => ({
24911
25076
  await notificationService.emit(EventType.UPLOAD, {
24912
25077
  message: "Upload started"
24913
25078
  });
25079
+ const activityLogsService = getActivityLogsService();
25080
+ const sessionId = await activityLogsService.startSession("upload", "Strapi User");
25081
+ await activityLogsService.addEntry(sessionId, "Upload started");
24914
25082
  let success = true;
24915
25083
  const StrapiService2 = getStrapiService();
24916
25084
  const StrapiI18nService2 = getStrapiI18nService();
@@ -24924,6 +25092,8 @@ const LocalazyTransferUploadService = ({ strapi: strapi2 }) => ({
24924
25092
  success,
24925
25093
  message
24926
25094
  });
25095
+ await activityLogsService.addEntry(sessionId, message);
25096
+ await activityLogsService.finishSession(sessionId, "failed", message);
24927
25097
  strapi2.log.info(message);
24928
25098
  return;
24929
25099
  }
@@ -24944,6 +25114,7 @@ const LocalazyTransferUploadService = ({ strapi: strapi2 }) => ({
24944
25114
  await notificationService.emit(EventType.UPLOAD, {
24945
25115
  message: message2
24946
25116
  });
25117
+ await activityLogsService.addEntry(sessionId, message2);
24947
25118
  strapi2.log.info(message2);
24948
25119
  continue;
24949
25120
  }
@@ -24954,6 +25125,7 @@ const LocalazyTransferUploadService = ({ strapi: strapi2 }) => ({
24954
25125
  await notificationService.emit(EventType.UPLOAD, {
24955
25126
  message: message2
24956
25127
  });
25128
+ await activityLogsService.addEntry(sessionId, message2);
24957
25129
  strapi2.log.warn(message2);
24958
25130
  continue;
24959
25131
  }
@@ -24980,6 +25152,7 @@ const LocalazyTransferUploadService = ({ strapi: strapi2 }) => ({
24980
25152
  await notificationService.emit(EventType.UPLOAD, {
24981
25153
  message: message2
24982
25154
  });
25155
+ await activityLogsService.addEntry(sessionId, message2);
24983
25156
  strapi2.log.info(message2);
24984
25157
  continue;
24985
25158
  }
@@ -24987,6 +25160,7 @@ const LocalazyTransferUploadService = ({ strapi: strapi2 }) => ({
24987
25160
  await notificationService.emit(EventType.UPLOAD, {
24988
25161
  message
24989
25162
  });
25163
+ await activityLogsService.addEntry(sessionId, message);
24990
25164
  strapi2.log.info(message);
24991
25165
  entries = omitDeep(entries, ["locale", "createdAt", "updatedAt", "publishedAt"]);
24992
25166
  entries.forEach((entry) => {
@@ -25024,12 +25198,33 @@ const LocalazyTransferUploadService = ({ strapi: strapi2 }) => ({
25024
25198
  await notificationService.emit(EventType.UPLOAD, {
25025
25199
  message: "Uploading collections to Localazy..."
25026
25200
  });
25027
- await LocalazyUploadService2.upload(importFile, uploadConfig);
25201
+ await activityLogsService.addEntry(sessionId, "Uploading collections to Localazy...");
25202
+ try {
25203
+ await LocalazyUploadService2.upload(importFile, uploadConfig);
25204
+ } catch (error) {
25205
+ success = false;
25206
+ const errorMessage = `Upload to Localazy failed: ${error instanceof Error ? error.message : String(error)}`;
25207
+ strapi2.log.error(errorMessage);
25208
+ await notificationService.emit(EventType.UPLOAD_FINISHED, {
25209
+ success,
25210
+ message: errorMessage
25211
+ });
25212
+ await activityLogsService.addEntry(sessionId, errorMessage);
25213
+ await activityLogsService.finishSession(sessionId, "failed", errorMessage);
25214
+ console.timeEnd("upload");
25215
+ return;
25216
+ }
25028
25217
  strapi2.log.info("Upload finished in");
25029
25218
  await notificationService.emit(EventType.UPLOAD_FINISHED, {
25030
25219
  success,
25031
25220
  message: "Upload finished"
25032
25221
  });
25222
+ await activityLogsService.addEntry(sessionId, "Upload finished");
25223
+ await activityLogsService.finishSession(
25224
+ sessionId,
25225
+ success ? "completed" : "failed",
25226
+ success ? "Upload completed successfully" : "Upload finished with errors"
25227
+ );
25033
25228
  console.timeEnd("upload");
25034
25229
  }
25035
25230
  });
@@ -25448,6 +25643,12 @@ const LocalazyTransferDownloadService = ({ strapi: strapi2 }) => ({
25448
25643
  await notificationService.emit(EventType.DOWNLOAD, {
25449
25644
  message: `Download started (${syncMode})`
25450
25645
  });
25646
+ const activityLogsService = getActivityLogsService();
25647
+ const requestInitiatorHelper = new RequestInitiatorHelper(strapi2);
25648
+ const isWebhook = requestInitiatorHelper.isInitiatedByLocalazyWebhook();
25649
+ const initiatedBy = isWebhook ? "Webhook" : "Strapi User";
25650
+ const sessionId = await activityLogsService.startSession(isWebhook ? "webhook" : "download", initiatedBy);
25651
+ await activityLogsService.addEntry(sessionId, `Download started (${syncMode})`);
25451
25652
  let success = true;
25452
25653
  const StrapiService2 = getStrapiService();
25453
25654
  const StrapiI18nService2 = getStrapiI18nService();
@@ -25466,6 +25667,8 @@ const LocalazyTransferDownloadService = ({ strapi: strapi2 }) => ({
25466
25667
  success,
25467
25668
  message
25468
25669
  });
25670
+ await activityLogsService.addEntry(sessionId, message);
25671
+ await activityLogsService.finishSession(sessionId, "failed", message);
25469
25672
  return;
25470
25673
  }
25471
25674
  const project = await LocalazyPubAPIService2.getProject(user.project.id, false, true);
@@ -25477,6 +25680,8 @@ const LocalazyTransferDownloadService = ({ strapi: strapi2 }) => ({
25477
25680
  success,
25478
25681
  message
25479
25682
  });
25683
+ await activityLogsService.addEntry(sessionId, message);
25684
+ await activityLogsService.finishSession(sessionId, "failed", message);
25480
25685
  return;
25481
25686
  }
25482
25687
  const projectLanguages = project.languages;
@@ -25490,6 +25695,8 @@ const LocalazyTransferDownloadService = ({ strapi: strapi2 }) => ({
25490
25695
  success,
25491
25696
  message
25492
25697
  });
25698
+ await activityLogsService.addEntry(sessionId, message);
25699
+ await activityLogsService.finishSession(sessionId, "failed", message);
25493
25700
  return;
25494
25701
  }
25495
25702
  const projectSourceLanguageCode = sourceLanguage.code;
@@ -25503,6 +25710,8 @@ const LocalazyTransferDownloadService = ({ strapi: strapi2 }) => ({
25503
25710
  success,
25504
25711
  message
25505
25712
  });
25713
+ await activityLogsService.addEntry(sessionId, message);
25714
+ await activityLogsService.finishSession(sessionId, "completed", message);
25506
25715
  return;
25507
25716
  }
25508
25717
  let languagesCodes = projectLanguagesWithoutSourceLanguage.map((language3) => language3.code);
@@ -25521,6 +25730,7 @@ const LocalazyTransferDownloadService = ({ strapi: strapi2 }) => ({
25521
25730
  await notificationService.emit(EventType.DOWNLOAD, {
25522
25731
  message: `Created locale ${newLocale.code}`
25523
25732
  });
25733
+ await activityLogsService.addEntry(sessionId, `Created locale ${newLocale.code}`);
25524
25734
  } catch (e2) {
25525
25735
  strapi2.log.error(e2.message);
25526
25736
  if (e2.name === "ValidationError") {
@@ -25528,10 +25738,12 @@ const LocalazyTransferDownloadService = ({ strapi: strapi2 }) => ({
25528
25738
  await notificationService.emit(EventType.DOWNLOAD, {
25529
25739
  message: `Language ${isoLocalazy} is not supported by Strapi`
25530
25740
  });
25741
+ await activityLogsService.addEntry(sessionId, `Language ${isoLocalazy} is not supported by Strapi`);
25531
25742
  } else {
25532
25743
  await notificationService.emit(EventType.DOWNLOAD, {
25533
25744
  message: e2.message
25534
25745
  });
25746
+ await activityLogsService.addEntry(sessionId, e2.message);
25535
25747
  }
25536
25748
  }
25537
25749
  }
@@ -25556,6 +25768,7 @@ const LocalazyTransferDownloadService = ({ strapi: strapi2 }) => ({
25556
25768
  await notificationService.emit(EventType.DOWNLOAD, {
25557
25769
  message: `No keys found for language ${isoLocalazy}`
25558
25770
  });
25771
+ await activityLogsService.addEntry(sessionId, `No keys found for language ${isoLocalazy}`);
25559
25772
  } else {
25560
25773
  const newKeys = langKeys.filter((k2) => {
25561
25774
  const storedEvent = langProcessedKeys[k2.id];
@@ -25564,6 +25777,10 @@ const LocalazyTransferDownloadService = ({ strapi: strapi2 }) => ({
25564
25777
  await notificationService.emit(EventType.DOWNLOAD, {
25565
25778
  message: `${syncMode}: ${newKeys.length} changed / ${langKeys.length} total keys for language ${isoLocalazy}`
25566
25779
  });
25780
+ await activityLogsService.addEntry(
25781
+ sessionId,
25782
+ `${syncMode}: ${newKeys.length} changed / ${langKeys.length} total keys for language ${isoLocalazy}`
25783
+ );
25567
25784
  }
25568
25785
  localazyContent[isoLocalazy] = langKeys;
25569
25786
  }
@@ -25716,6 +25933,7 @@ const LocalazyTransferDownloadService = ({ strapi: strapi2 }) => ({
25716
25933
  await notificationService.emit(EventType.DOWNLOAD, {
25717
25934
  message
25718
25935
  });
25936
+ await activityLogsService.addEntry(sessionId, message);
25719
25937
  await markKeysProcessed(sourceKeys);
25720
25938
  } catch (e2) {
25721
25939
  success = false;
@@ -25728,6 +25946,10 @@ const LocalazyTransferDownloadService = ({ strapi: strapi2 }) => ({
25728
25946
  localazy: localazySearchUrl
25729
25947
  }
25730
25948
  });
25949
+ await activityLogsService.addEntry(
25950
+ sessionId,
25951
+ `Failed to create ${uid} [${documentId}] in ${isoStrapi}: ${e2.message}`
25952
+ );
25731
25953
  }
25732
25954
  } else {
25733
25955
  try {
@@ -25745,6 +25967,7 @@ const LocalazyTransferDownloadService = ({ strapi: strapi2 }) => ({
25745
25967
  await notificationService.emit(EventType.DOWNLOAD, {
25746
25968
  message
25747
25969
  });
25970
+ await activityLogsService.addEntry(sessionId, message);
25748
25971
  await markKeysProcessed(sourceKeys);
25749
25972
  } catch (e2) {
25750
25973
  success = false;
@@ -25757,6 +25980,10 @@ const LocalazyTransferDownloadService = ({ strapi: strapi2 }) => ({
25757
25980
  localazy: localazySearchUrl
25758
25981
  }
25759
25982
  });
25983
+ await activityLogsService.addEntry(
25984
+ sessionId,
25985
+ `Failed to update ${uid} [${documentId}] in ${isoStrapi}: ${e2.message}`
25986
+ );
25760
25987
  }
25761
25988
  }
25762
25989
  } catch (e2) {
@@ -25765,6 +25992,10 @@ const LocalazyTransferDownloadService = ({ strapi: strapi2 }) => ({
25765
25992
  await notificationService.emit(EventType.DOWNLOAD, {
25766
25993
  message: `Error processing ${uid} [${documentId}] in ${isoStrapi}: ${e2.message}`
25767
25994
  });
25995
+ await activityLogsService.addEntry(
25996
+ sessionId,
25997
+ `Error processing ${uid} [${documentId}] in ${isoStrapi}: ${e2.message}`
25998
+ );
25768
25999
  }
25769
26000
  }
25770
26001
  }
@@ -25780,6 +26011,13 @@ const LocalazyTransferDownloadService = ({ strapi: strapi2 }) => ({
25780
26011
  success,
25781
26012
  message: "Download finished"
25782
26013
  });
26014
+ const finishMessage = `Download finished. Tracked ${totalProcessedKeys} processed keys across ${Object.keys(processedKeys).length} languages.`;
26015
+ await activityLogsService.addEntry(sessionId, finishMessage);
26016
+ await activityLogsService.finishSession(
26017
+ sessionId,
26018
+ success ? "completed" : "failed",
26019
+ success ? "Download completed successfully" : "Download finished with errors"
26020
+ );
25783
26021
  console.timeEnd("download");
25784
26022
  }
25785
26023
  });
@@ -26503,6 +26741,112 @@ const EntryExclusionService = ({ strapi: strapi2 }) => ({
26503
26741
  return Object.values(exclusions).filter((exclusion) => exclusion.contentType === contentType && exclusion.excludeFromTranslation).map((exclusion) => exclusion.documentId);
26504
26742
  }
26505
26743
  });
26744
+ const KEY = "activity-logs";
26745
+ const emptyActivityLogs = {
26746
+ sessions: []
26747
+ };
26748
+ const ONE_YEAR_MS = 365 * 24 * 60 * 60 * 1e3;
26749
+ let writeLock = Promise.resolve();
26750
+ const withLock = async (fn) => {
26751
+ let release;
26752
+ const next = new Promise((resolve) => {
26753
+ release = resolve;
26754
+ });
26755
+ const prev2 = writeLock;
26756
+ writeLock = next;
26757
+ await prev2;
26758
+ try {
26759
+ return await fn();
26760
+ } finally {
26761
+ release();
26762
+ }
26763
+ };
26764
+ const ActivityLogsService = ({ strapi: strapi2 }) => ({
26765
+ async getActivityLogs() {
26766
+ const pluginStore = getStrapiStore(strapi2);
26767
+ const logs = await pluginStore.get({ key: KEY });
26768
+ return logs || { sessions: [] };
26769
+ },
26770
+ async saveActivityLogs(logs) {
26771
+ const pluginStore = getStrapiStore(strapi2);
26772
+ await pluginStore.set({
26773
+ key: KEY,
26774
+ value: logs
26775
+ });
26776
+ },
26777
+ async startSession(eventType, initiatedBy) {
26778
+ return withLock(async () => {
26779
+ const logs = await this.getActivityLogs();
26780
+ const sessionId = generateRandomId();
26781
+ const session = {
26782
+ id: sessionId,
26783
+ eventType,
26784
+ status: "in-progress",
26785
+ startedAt: Date.now(),
26786
+ initiatedBy,
26787
+ summary: "",
26788
+ entries: []
26789
+ };
26790
+ logs.sessions.unshift(session);
26791
+ const cutoff = Date.now() - ONE_YEAR_MS;
26792
+ logs.sessions = logs.sessions.filter((s2) => s2.startedAt >= cutoff);
26793
+ await this.saveActivityLogs(logs);
26794
+ return sessionId;
26795
+ });
26796
+ },
26797
+ async addEntry(sessionId, message, data) {
26798
+ return withLock(async () => {
26799
+ const logs = await this.getActivityLogs();
26800
+ const session = logs.sessions.find((s2) => s2.id === sessionId);
26801
+ if (!session) {
26802
+ return;
26803
+ }
26804
+ const entry = {
26805
+ message,
26806
+ timestamp: Date.now(),
26807
+ data
26808
+ };
26809
+ session.entries.push(entry);
26810
+ await this.saveActivityLogs(logs);
26811
+ });
26812
+ },
26813
+ async finishSession(sessionId, status, summary) {
26814
+ return withLock(async () => {
26815
+ const logs = await this.getActivityLogs();
26816
+ const session = logs.sessions.find((s2) => s2.id === sessionId);
26817
+ if (!session) {
26818
+ return;
26819
+ }
26820
+ session.status = status;
26821
+ session.finishedAt = Date.now();
26822
+ session.summary = summary;
26823
+ await this.saveActivityLogs(logs);
26824
+ });
26825
+ },
26826
+ async getSessions(eventType) {
26827
+ const logs = await this.getActivityLogs();
26828
+ let { sessions } = logs;
26829
+ if (eventType) {
26830
+ sessions = sessions.filter((s2) => s2.eventType === eventType);
26831
+ }
26832
+ return sessions.map((s2) => ({
26833
+ ...s2,
26834
+ entries: []
26835
+ }));
26836
+ },
26837
+ async getAllSessionsWithEntries() {
26838
+ const logs = await this.getActivityLogs();
26839
+ return logs.sessions;
26840
+ },
26841
+ async getSession(sessionId) {
26842
+ const logs = await this.getActivityLogs();
26843
+ const session = logs.sessions.find((s2) => s2.id === sessionId);
26844
+ return session || null;
26845
+ },
26846
+ async clearSessions() {
26847
+ await this.saveActivityLogs(emptyActivityLogs);
26848
+ }
26849
+ });
26506
26850
  const services = {
26507
26851
  LocalazyUserService,
26508
26852
  StrapiService,
@@ -26513,7 +26857,8 @@ const services = {
26513
26857
  StrapiI18nService,
26514
26858
  LocalazyUploadService,
26515
26859
  StrapiLocalazyI18nService,
26516
- EntryExclusionService
26860
+ EntryExclusionService,
26861
+ ActivityLogsService
26517
26862
  };
26518
26863
  const index = {
26519
26864
  register,