@localazy/strapi-plugin 1.3.0 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/README.md +30 -0
  2. package/dist/_chunks/{FetchIdentity-BJGoZPpM.mjs → FetchIdentity-Bm7bc5bS.mjs} +36 -44
  3. package/dist/_chunks/{FetchIdentity-CtBRO-Cn.js → FetchIdentity-CcEjakiz.js} +25 -33
  4. package/dist/_chunks/{LanguagesSelector-DJxgCwgM.mjs → LanguagesSelector-B1rwN7-Y.mjs} +4 -3
  5. package/dist/_chunks/{LanguagesSelector-CNaKrS-m.js → LanguagesSelector-DejYCwBl.js} +4 -3
  6. package/dist/_chunks/{LocalazyApp-CJRpsTKr.mjs → LocalazyApp-C4kbsnQh.mjs} +148 -35
  7. package/dist/_chunks/{LocalazyApp-B1qCCEPe.js → LocalazyApp-jPO7Yr1S.js} +154 -41
  8. package/dist/_chunks/{LocalazyContentTransferSetup-CLAWn95U.mjs → LocalazyContentTransferSetup-C1wDD9hA.mjs} +58 -22
  9. package/dist/_chunks/{LocalazyContentTransferSetup-CCxiLHdG.js → LocalazyContentTransferSetup-DZh4ZdSi.js} +63 -27
  10. package/dist/_chunks/{LocalazyGlobalSettings-BJ5qfFfK.js → LocalazyGlobalSettings-D76it6rn.js} +57 -26
  11. package/dist/_chunks/{LocalazyGlobalSettings-Z-4Ykc_J.mjs → LocalazyGlobalSettings-DOW5rjLn.mjs} +56 -25
  12. package/dist/_chunks/{LocalazyPanel-CL_mzzfD.mjs → LocalazyPanel-C_Z4W49T.mjs} +12 -6
  13. package/dist/_chunks/{LocalazyPanel-DE3TtHOQ.js → LocalazyPanel-D2LQpqii.js} +14 -8
  14. package/dist/_chunks/{LocalazyStatusColumn-R5n6q_cx.mjs → LocalazyStatusColumn-C_ZCd_s7.mjs} +10 -4
  15. package/dist/_chunks/{LocalazyStatusColumn-BMLcklG-.js → LocalazyStatusColumn-Dy6N4_X6.js} +10 -4
  16. package/dist/_chunks/{RequireLocalazyAuth-WKKFdQlR.js → RequireLocalazyAuth-BVwF0bRC.js} +31 -4
  17. package/dist/_chunks/{RequireLocalazyAuth-Dzsu6UNS.mjs → RequireLocalazyAuth-DNhTZZ_6.mjs} +32 -5
  18. package/dist/_chunks/{entry-exclusion-service-DxqTlZFR.mjs → entry-exclusion-service-CF_yNCly.mjs} +1 -1
  19. package/dist/_chunks/{entry-exclusion-service-CggmAKxq.js → entry-exclusion-service-CH3ZoJQN.js} +1 -1
  20. package/dist/_chunks/{has-model-changed-FMGVcFHU.mjs → has-model-changed-CVJEuGxM.mjs} +2 -2
  21. package/dist/_chunks/{has-model-changed-BR53L6pA.js → has-model-changed-DdYbyv0v.js} +2 -2
  22. package/dist/_chunks/{i18n-QelOdIB2.mjs → i18n-76ox2llT.mjs} +9 -2
  23. package/dist/_chunks/{i18n-CAsbU4pi.js → i18n-C5ucROBh.js} +9 -2
  24. package/dist/_chunks/{index-BmxGKspv.js → index-CEGaWWh3.js} +33 -11
  25. package/dist/_chunks/{index-BK7lmZSN.js → index-CTkxoioB.js} +1 -0
  26. package/dist/_chunks/{index-toauQlIK.mjs → index-DP2ugzc_.mjs} +34 -12
  27. package/dist/_chunks/{index-CHjIMO9T.mjs → index-shryj0jT.mjs} +19 -18
  28. package/dist/_chunks/{strapi-api-base-CT9lknwW.js → strapi-api-base-CCUuu7EY.js} +1 -1
  29. package/dist/_chunks/{strapi-api-base-BflplVsH.mjs → strapi-api-base-IiMEtDoH.mjs} +1 -1
  30. package/dist/admin/index.js +1 -1
  31. package/dist/admin/index.mjs +1 -1
  32. package/dist/admin/src/components/LocalazyStatusColumn.d.ts +1 -1
  33. package/dist/admin/src/constants/permissions.d.ts +29 -0
  34. package/dist/admin/src/modules/@common/components/LanguagesSelector.d.ts +1 -0
  35. package/dist/admin/src/modules/activity-logs/locale/en.d.ts +4 -0
  36. package/dist/admin/src/modules/activity-logs/services/debug-bundle-service.d.ts +10 -0
  37. package/dist/admin/src/modules/login/locale/en.d.ts +1 -0
  38. package/dist/admin/src/modules/plugin-settings/components/Tree.d.ts +1 -0
  39. package/dist/admin/src/modules/plugin-settings/components/TreeItem.d.ts +1 -0
  40. package/dist/admin/src/modules/plugin-settings/components/WebhookSetup.d.ts +4 -1
  41. package/dist/admin/src/modules/plugin-settings/locale/en.d.ts +2 -0
  42. package/dist/admin/src/modules/plugin-settings/services/plugin-settings-service.d.ts +4 -0
  43. package/dist/server/index.js +665 -38
  44. package/dist/server/index.mjs +665 -39
  45. package/dist/server/src/bootstrap.d.ts +1 -1
  46. package/dist/server/src/constants/permissions.d.ts +38 -0
  47. package/dist/server/src/controllers/debug-bundle-controller.d.ts +7 -0
  48. package/dist/server/src/controllers/index.d.ts +6 -0
  49. package/dist/server/src/controllers/plugin-settings-controller.d.ts +1 -0
  50. package/dist/server/src/core/index.d.ts +5 -1
  51. package/dist/server/src/db/model/activity-logs.d.ts +10 -0
  52. package/dist/server/src/index.d.ts +64 -8
  53. package/dist/server/src/routes/activity-logs-routes.d.ts +20 -3
  54. package/dist/server/src/routes/debug-bundle-routes.d.ts +14 -0
  55. package/dist/server/src/routes/entry-exclusion-routes.d.ts +20 -3
  56. package/dist/server/src/routes/index.d.ts +52 -6
  57. package/dist/server/src/routes/localazy-auth-routes.d.ts +6 -1
  58. package/dist/server/src/routes/localazy-project-routes.d.ts +20 -3
  59. package/dist/server/src/routes/localazy-transfer-routes.d.ts +6 -1
  60. package/dist/server/src/routes/localazy-user-routes.d.ts +20 -3
  61. package/dist/server/src/routes/plugin-settings-routes.d.ts +20 -3
  62. package/dist/server/src/routes/strapi-routes.d.ts +20 -3
  63. package/dist/server/src/services/activity-logs-service.d.ts +3 -1
  64. package/dist/server/src/services/index.d.ts +5 -1
  65. package/dist/server/src/services/localazy-transfer-download-service.d.ts +2 -1
  66. package/dist/server/src/services/plugin-settings-service.d.ts +4 -0
  67. package/dist/server/src/utils/build-debug-bundle.d.ts +68 -0
  68. package/dist/server/src/utils/sanitize-debug-bundle.d.ts +25 -0
  69. package/package.json +2 -1
@@ -1,5 +1,5 @@
1
1
  import type { Core } from '@strapi/strapi';
2
2
  declare const bootstrap: ({ strapi }: {
3
3
  strapi: Core.Strapi;
4
- }) => void;
4
+ }) => Promise<void>;
5
5
  export default bootstrap;
@@ -0,0 +1,38 @@
1
+ /**
2
+ * UIDs as Strapi sees them after `pluginName` is prepended by the action provider.
3
+ * Use these to reference permissions from route policies, admin menu/settings links
4
+ * and `useRBAC` calls. Renaming any UID is a breaking change for existing role grants
5
+ * — bumping a minor version is not enough.
6
+ */
7
+ export declare const PERMISSION_UIDS: {
8
+ readonly READ: `plugin::${string}.read`;
9
+ readonly TRANSFER: `plugin::${string}.transfer`;
10
+ readonly SETTINGS_READ: `plugin::${string}.settings.read`;
11
+ readonly SETTINGS_UPDATE: `plugin::${string}.settings.update`;
12
+ };
13
+ export type PermissionUid = (typeof PERMISSION_UIDS)[keyof typeof PERMISSION_UIDS];
14
+ type ActionRecord = {
15
+ section: 'plugins';
16
+ subCategory: string;
17
+ pluginName: string;
18
+ displayName: string;
19
+ uid: string;
20
+ };
21
+ /**
22
+ * Actions registered with `strapi.service('admin::permission').actionProvider.registerMany`
23
+ * during bootstrap. `pluginName` is prepended as `plugin::<pluginName>.` so the resulting
24
+ * UIDs become the ones in `PERMISSION_UIDS` above.
25
+ *
26
+ * All four actions live under `section: 'plugins'` so they appear together in the
27
+ * role editor's Plugins tab under "Localazy", grouped by `subCategory`. A previous
28
+ * split (settings-section for the two settings.* actions) caused them to land in a
29
+ * different tab — admins inspecting Plugins → Localazy only saw Read + Transfer and
30
+ * thought the other two were missing.
31
+ *
32
+ * Strapi's @strapi/admin yup validator (a) rejects `category` on `plugins`-section
33
+ * entries — `category` is only valid in `settings` section — and (b) allows
34
+ * `subCategory` on both `plugins` and `settings`. So we use `subCategory` alone for
35
+ * grouping here.
36
+ */
37
+ export declare const LOCALAZY_RBAC_ACTIONS: ActionRecord[];
38
+ export {};
@@ -0,0 +1,7 @@
1
+ import type { Core } from '@strapi/strapi';
2
+ declare const DebugBundleController: ({ strapi }: {
3
+ strapi: Core.Strapi;
4
+ }) => {
5
+ getBundle(ctx: any): Promise<any>;
6
+ };
7
+ export default DebugBundleController;
@@ -35,6 +35,7 @@ declare const _default: {
35
35
  updateContentTransferSetup(ctx: any): Promise<void>;
36
36
  getPluginSettings(ctx: any): Promise<void>;
37
37
  updatePluginSettings(ctx: any): Promise<void>;
38
+ updatePluginSettingsUiPrefs(ctx: any): Promise<void>;
38
39
  getSyncCursor(ctx: any): Promise<void>;
39
40
  };
40
41
  LocalazyTransferController: ({ strapi }: {
@@ -58,5 +59,10 @@ declare const _default: {
58
59
  exportSessions(ctx: any): Promise<void>;
59
60
  clearSessions(ctx: any): Promise<void>;
60
61
  };
62
+ DebugBundleController: ({ strapi }: {
63
+ strapi: import("@strapi/types/dist/core").Strapi;
64
+ }) => {
65
+ getBundle(ctx: any): Promise<any>;
66
+ };
61
67
  };
62
68
  export default _default;
@@ -6,6 +6,7 @@ declare const PluginSettingsController: ({ strapi: _strapi }: {
6
6
  updateContentTransferSetup(ctx: any): Promise<void>;
7
7
  getPluginSettings(ctx: any): Promise<void>;
8
8
  updatePluginSettings(ctx: any): Promise<void>;
9
+ updatePluginSettingsUiPrefs(ctx: any): Promise<void>;
9
10
  getSyncCursor(ctx: any): Promise<void>;
10
11
  };
11
12
  export default PluginSettingsController;
@@ -18,9 +18,10 @@ export declare const getLocalazyTransferUploadService: () => {
18
18
  }): Promise<void>;
19
19
  };
20
20
  export declare const getLocalazyTransferDownloadService: () => {
21
- download({ notificationService, fullSync, }: {
21
+ download({ notificationService, fullSync, requestedUiLanguages, }: {
22
22
  notificationService: import("../services/helpers/job-notification-service").default;
23
23
  fullSync?: boolean;
24
+ requestedUiLanguages?: string[];
24
25
  }): Promise<void>;
25
26
  };
26
27
  export declare const getPluginSettingsService: () => {
@@ -31,6 +32,7 @@ export declare const getPluginSettingsService: () => {
31
32
  }>;
32
33
  getPluginSettings(): Promise<import("../db/model/plugin-settings").PluginSettings>;
33
34
  updatePluginSettings(settings: any): Promise<any>;
35
+ updatePluginSettingsUiPrefs(prefs: Partial<Pick<import("../db/model/plugin-settings").PluginSettings, "defaultRoute" | "activityLogsSort">>): Promise<import("../db/model/plugin-settings").PluginSettings>;
34
36
  getSyncCursor(): Promise<import("../db/model/sync-cursor").SyncCursor>;
35
37
  updateSyncCursor(cursor: import("../db/model/sync-cursor").SyncCursor): Promise<import("../db/model/sync-cursor").SyncCursor>;
36
38
  };
@@ -86,6 +88,8 @@ export declare const getActivityLogsService: () => {
86
88
  saveActivityLogs(logs: import("../db/model/activity-logs").ActivityLogs): Promise<void>;
87
89
  startSession(eventType: "upload" | "download" | "webhook", initiatedBy: string): Promise<string>;
88
90
  addEntry(sessionId: string, message: string, data?: any): Promise<void>;
91
+ recordAttemptedEntry(sessionId: string, entry: Omit<import("../db/model/activity-logs").AttemptedEntry, "attemptedAt">): Promise<void>;
92
+ recordAttemptedEntries(sessionId: string, entries: Omit<import("../db/model/activity-logs").AttemptedEntry, "attemptedAt">[]): Promise<void>;
89
93
  finishSession(sessionId: string, status: "completed" | "failed", summary: string): Promise<void>;
90
94
  getSessions(eventType?: "upload" | "download" | "webhook"): Promise<import("../db/model/activity-logs").ActivityLogSession[]>;
91
95
  getAllSessionsWithEntries(): Promise<import("../db/model/activity-logs").ActivityLogSession[]>;
@@ -4,6 +4,15 @@ export type ActivityLogEntry = {
4
4
  timestamp: number;
5
5
  data?: any;
6
6
  };
7
+ export type AttemptedEntryStatus = 'success' | 'failed';
8
+ export type AttemptedEntry = {
9
+ uid: string;
10
+ documentId: string;
11
+ locale: string;
12
+ status: AttemptedEntryStatus;
13
+ errorMessage?: string;
14
+ attemptedAt: number;
15
+ };
7
16
  export type ActivityLogSession = {
8
17
  id: string;
9
18
  eventType: 'upload' | 'download' | 'webhook';
@@ -13,6 +22,7 @@ export type ActivityLogSession = {
13
22
  initiatedBy: string;
14
23
  summary: string;
15
24
  entries: ActivityLogEntry[];
25
+ attemptedEntries?: AttemptedEntry[];
16
26
  };
17
27
  export type ActivityLogs = {
18
28
  sessions: ActivityLogSession[];
@@ -4,7 +4,7 @@ declare const _default: {
4
4
  }) => void;
5
5
  bootstrap: ({ strapi }: {
6
6
  strapi: import("@strapi/types/dist/core").Strapi;
7
- }) => void;
7
+ }) => Promise<void>;
8
8
  destroy: ({ strapi: _strapi }: {
9
9
  strapi: import("@strapi/types/dist/core").Strapi;
10
10
  }) => void;
@@ -62,6 +62,7 @@ declare const _default: {
62
62
  updateContentTransferSetup(ctx: any): Promise<void>;
63
63
  getPluginSettings(ctx: any): Promise<void>;
64
64
  updatePluginSettings(ctx: any): Promise<void>;
65
+ updatePluginSettingsUiPrefs(ctx: any): Promise<void>;
65
66
  getSyncCursor(ctx: any): Promise<void>;
66
67
  };
67
68
  LocalazyTransferController: ({ strapi }: {
@@ -85,28 +86,79 @@ declare const _default: {
85
86
  exportSessions(ctx: any): Promise<void>;
86
87
  clearSessions(ctx: any): Promise<void>;
87
88
  };
89
+ DebugBundleController: ({ strapi }: {
90
+ strapi: import("@strapi/types/dist/core").Strapi;
91
+ }) => {
92
+ getBundle(ctx: any): Promise<any>;
93
+ };
88
94
  };
89
95
  routes: {
90
96
  'content-api': {
91
- routes: {
97
+ routes: ({
92
98
  method: string;
93
99
  path: string;
94
100
  handler: string;
95
101
  config: {
96
- policies: any[];
102
+ policies: {
103
+ name: string;
104
+ config: {
105
+ actions: `plugin::${string}.read`[];
106
+ };
107
+ }[];
97
108
  };
98
- }[];
109
+ } | {
110
+ method: string;
111
+ path: string;
112
+ handler: string;
113
+ config: {
114
+ policies: {
115
+ name: string;
116
+ config: {
117
+ actions: `plugin::${string}.settings.update`[];
118
+ };
119
+ }[];
120
+ };
121
+ })[];
99
122
  };
100
123
  admin: {
101
124
  type: string;
102
- routes: {
125
+ routes: ({
103
126
  method: string;
104
127
  path: string;
105
128
  handler: string;
106
129
  config: {
107
- policies: any[];
130
+ policies: {
131
+ name: string;
132
+ config: {
133
+ actions: `plugin::${string}.read`[];
134
+ };
135
+ }[];
108
136
  };
109
- }[];
137
+ } | {
138
+ method: string;
139
+ path: string;
140
+ handler: string;
141
+ config: {
142
+ policies: {
143
+ name: string;
144
+ config: {
145
+ actions: `plugin::${string}.settings.update`[];
146
+ };
147
+ }[];
148
+ };
149
+ } | {
150
+ method: string;
151
+ path: string;
152
+ handler: string;
153
+ config: {
154
+ policies: {
155
+ name: string;
156
+ config: {
157
+ actions: `plugin::${string}.transfer`[];
158
+ };
159
+ }[];
160
+ };
161
+ })[];
110
162
  };
111
163
  LocalazyPublicTransferRoutes: {
112
164
  routes: {
@@ -158,6 +210,7 @@ declare const _default: {
158
210
  }>;
159
211
  getPluginSettings(): Promise<import("./db/model/plugin-settings").PluginSettings>;
160
212
  updatePluginSettings(settings: any): Promise<any>;
213
+ updatePluginSettingsUiPrefs(prefs: Partial<Pick<import("./db/model/plugin-settings").PluginSettings, "defaultRoute" | "activityLogsSort">>): Promise<import("./db/model/plugin-settings").PluginSettings>;
161
214
  getSyncCursor(): Promise<import("./db/model/sync-cursor").SyncCursor>;
162
215
  updateSyncCursor(cursor: import("./db/model/sync-cursor").SyncCursor): Promise<import("./db/model/sync-cursor").SyncCursor>;
163
216
  };
@@ -171,9 +224,10 @@ declare const _default: {
171
224
  LocalazyTransferDownloadService: ({ strapi }: {
172
225
  strapi: import("@strapi/types/dist/core").Strapi;
173
226
  }) => {
174
- download({ notificationService, fullSync, }: {
227
+ download({ notificationService, fullSync, requestedUiLanguages, }: {
175
228
  notificationService: import("./services/helpers/job-notification-service").default;
176
229
  fullSync?: boolean;
230
+ requestedUiLanguages?: string[];
177
231
  }): Promise<void>;
178
232
  };
179
233
  StrapiI18nService: ({ strapi }: {
@@ -232,6 +286,8 @@ declare const _default: {
232
286
  saveActivityLogs(logs: import("./db/model/activity-logs").ActivityLogs): Promise<void>;
233
287
  startSession(eventType: "upload" | "download" | "webhook", initiatedBy: string): Promise<string>;
234
288
  addEntry(sessionId: string, message: string, data?: any): Promise<void>;
289
+ recordAttemptedEntry(sessionId: string, entry: Omit<import("./db/model/activity-logs").AttemptedEntry, "attemptedAt">): Promise<void>;
290
+ recordAttemptedEntries(sessionId: string, entries: Omit<import("./db/model/activity-logs").AttemptedEntry, "attemptedAt">[]): Promise<void>;
235
291
  finishSession(sessionId: string, status: "completed" | "failed", summary: string): Promise<void>;
236
292
  getSessions(eventType?: "upload" | "download" | "webhook"): Promise<import("./db/model/activity-logs").ActivityLogSession[]>;
237
293
  getAllSessionsWithEntries(): Promise<import("./db/model/activity-logs").ActivityLogSession[]>;
@@ -1,9 +1,26 @@
1
- declare const ActivityLogsRoutes: {
1
+ declare const ActivityLogsRoutes: ({
2
2
  method: string;
3
3
  path: string;
4
4
  handler: string;
5
5
  config: {
6
- policies: any[];
6
+ policies: {
7
+ name: string;
8
+ config: {
9
+ actions: `plugin::${string}.read`[];
10
+ };
11
+ }[];
7
12
  };
8
- }[];
13
+ } | {
14
+ method: string;
15
+ path: string;
16
+ handler: string;
17
+ config: {
18
+ policies: {
19
+ name: string;
20
+ config: {
21
+ actions: `plugin::${string}.transfer`[];
22
+ };
23
+ }[];
24
+ };
25
+ })[];
9
26
  export default ActivityLogsRoutes;
@@ -0,0 +1,14 @@
1
+ declare const DebugBundleRoutes: {
2
+ method: string;
3
+ path: string;
4
+ handler: string;
5
+ config: {
6
+ policies: {
7
+ name: string;
8
+ config: {
9
+ actions: `plugin::${string}.read`[];
10
+ };
11
+ }[];
12
+ };
13
+ }[];
14
+ export default DebugBundleRoutes;
@@ -1,9 +1,26 @@
1
- declare const EntryExclusionRoutes: {
1
+ declare const EntryExclusionRoutes: ({
2
2
  method: string;
3
3
  path: string;
4
4
  handler: string;
5
5
  config: {
6
- policies: any[];
6
+ policies: {
7
+ name: string;
8
+ config: {
9
+ actions: `plugin::${string}.read`[];
10
+ };
11
+ }[];
7
12
  };
8
- }[];
13
+ } | {
14
+ method: string;
15
+ path: string;
16
+ handler: string;
17
+ config: {
18
+ policies: {
19
+ name: string;
20
+ config: {
21
+ actions: `plugin::${string}.transfer`[];
22
+ };
23
+ }[];
24
+ };
25
+ })[];
9
26
  export default EntryExclusionRoutes;
@@ -1,24 +1,70 @@
1
1
  declare const _default: {
2
2
  'content-api': {
3
- routes: {
3
+ routes: ({
4
4
  method: string;
5
5
  path: string;
6
6
  handler: string;
7
7
  config: {
8
- policies: any[];
8
+ policies: {
9
+ name: string;
10
+ config: {
11
+ actions: `plugin::${string}.read`[];
12
+ };
13
+ }[];
9
14
  };
10
- }[];
15
+ } | {
16
+ method: string;
17
+ path: string;
18
+ handler: string;
19
+ config: {
20
+ policies: {
21
+ name: string;
22
+ config: {
23
+ actions: `plugin::${string}.settings.update`[];
24
+ };
25
+ }[];
26
+ };
27
+ })[];
11
28
  };
12
29
  admin: {
13
30
  type: string;
14
- routes: {
31
+ routes: ({
15
32
  method: string;
16
33
  path: string;
17
34
  handler: string;
18
35
  config: {
19
- policies: any[];
36
+ policies: {
37
+ name: string;
38
+ config: {
39
+ actions: `plugin::${string}.read`[];
40
+ };
41
+ }[];
20
42
  };
21
- }[];
43
+ } | {
44
+ method: string;
45
+ path: string;
46
+ handler: string;
47
+ config: {
48
+ policies: {
49
+ name: string;
50
+ config: {
51
+ actions: `plugin::${string}.settings.update`[];
52
+ };
53
+ }[];
54
+ };
55
+ } | {
56
+ method: string;
57
+ path: string;
58
+ handler: string;
59
+ config: {
60
+ policies: {
61
+ name: string;
62
+ config: {
63
+ actions: `plugin::${string}.transfer`[];
64
+ };
65
+ }[];
66
+ };
67
+ })[];
22
68
  };
23
69
  LocalazyPublicTransferRoutes: {
24
70
  routes: {
@@ -3,7 +3,12 @@ declare const LocalazyAuthRoutes: {
3
3
  path: string;
4
4
  handler: string;
5
5
  config: {
6
- policies: any[];
6
+ policies: {
7
+ name: string;
8
+ config: {
9
+ actions: `plugin::${string}.settings.update`[];
10
+ };
11
+ }[];
7
12
  };
8
13
  }[];
9
14
  export default LocalazyAuthRoutes;
@@ -1,9 +1,26 @@
1
- declare const LocalazyProjectRoutes: {
1
+ declare const LocalazyProjectRoutes: ({
2
2
  method: string;
3
3
  path: string;
4
4
  handler: string;
5
5
  config: {
6
- policies: any[];
6
+ policies: {
7
+ name: string;
8
+ config: {
9
+ actions: `plugin::${string}.read`[];
10
+ };
11
+ }[];
7
12
  };
8
- }[];
13
+ } | {
14
+ method: string;
15
+ path: string;
16
+ handler: string;
17
+ config: {
18
+ policies: {
19
+ name: string;
20
+ config: {
21
+ actions: `plugin::${string}.settings.update`[];
22
+ };
23
+ }[];
24
+ };
25
+ })[];
9
26
  export default LocalazyProjectRoutes;
@@ -3,7 +3,12 @@ declare const LocalazyTransferRoutes: {
3
3
  path: string;
4
4
  handler: string;
5
5
  config: {
6
- policies: any[];
6
+ policies: {
7
+ name: string;
8
+ config: {
9
+ actions: `plugin::${string}.transfer`[];
10
+ };
11
+ }[];
7
12
  };
8
13
  }[];
9
14
  export default LocalazyTransferRoutes;
@@ -1,9 +1,26 @@
1
- declare const LocalazyUserRoutes: {
1
+ declare const LocalazyUserRoutes: ({
2
2
  method: string;
3
3
  path: string;
4
4
  handler: string;
5
5
  config: {
6
- policies: any[];
6
+ policies: {
7
+ name: string;
8
+ config: {
9
+ actions: `plugin::${string}.read`[];
10
+ };
11
+ }[];
7
12
  };
8
- }[];
13
+ } | {
14
+ method: string;
15
+ path: string;
16
+ handler: string;
17
+ config: {
18
+ policies: {
19
+ name: string;
20
+ config: {
21
+ actions: `plugin::${string}.settings.update`[];
22
+ };
23
+ }[];
24
+ };
25
+ })[];
9
26
  export default LocalazyUserRoutes;
@@ -1,9 +1,26 @@
1
- declare const PluginSettingsRoutes: {
1
+ declare const PluginSettingsRoutes: ({
2
2
  method: string;
3
3
  path: string;
4
4
  handler: string;
5
5
  config: {
6
- policies: any[];
6
+ policies: {
7
+ name: string;
8
+ config: {
9
+ actions: `plugin::${string}.read`[];
10
+ };
11
+ }[];
7
12
  };
8
- }[];
13
+ } | {
14
+ method: string;
15
+ path: string;
16
+ handler: string;
17
+ config: {
18
+ policies: {
19
+ name: string;
20
+ config: {
21
+ actions: `plugin::${string}.settings.update`[];
22
+ };
23
+ }[];
24
+ };
25
+ })[];
9
26
  export default PluginSettingsRoutes;
@@ -1,9 +1,26 @@
1
- declare const StrapiRoutes: {
1
+ declare const StrapiRoutes: ({
2
2
  method: string;
3
3
  path: string;
4
4
  handler: string;
5
5
  config: {
6
- policies: any[];
6
+ policies: {
7
+ name: string;
8
+ config: {
9
+ actions: `plugin::${string}.read`[];
10
+ };
11
+ }[];
7
12
  };
8
- }[];
13
+ } | {
14
+ method: string;
15
+ path: string;
16
+ handler: string;
17
+ config: {
18
+ policies: {
19
+ name: string;
20
+ config: {
21
+ actions: `plugin::${string}.settings.update`[];
22
+ };
23
+ }[];
24
+ };
25
+ })[];
9
26
  export default StrapiRoutes;
@@ -1,5 +1,5 @@
1
1
  import { Core } from '@strapi/strapi';
2
- import { ActivityLogs, ActivityLogSession } from '../db/model/activity-logs';
2
+ import { ActivityLogs, ActivityLogSession, AttemptedEntry } from '../db/model/activity-logs';
3
3
  declare const ActivityLogsService: ({ strapi }: {
4
4
  strapi: Core.Strapi;
5
5
  }) => {
@@ -7,6 +7,8 @@ declare const ActivityLogsService: ({ strapi }: {
7
7
  saveActivityLogs(logs: ActivityLogs): Promise<void>;
8
8
  startSession(eventType: ActivityLogSession['eventType'], initiatedBy: string): Promise<string>;
9
9
  addEntry(sessionId: string, message: string, data?: any): Promise<void>;
10
+ recordAttemptedEntry(sessionId: string, entry: Omit<AttemptedEntry, 'attemptedAt'>): Promise<void>;
11
+ recordAttemptedEntries(sessionId: string, entries: Array<Omit<AttemptedEntry, 'attemptedAt'>>): Promise<void>;
10
12
  finishSession(sessionId: string, status: 'completed' | 'failed', summary: string): Promise<void>;
11
13
  getSessions(eventType?: ActivityLogSession['eventType']): Promise<ActivityLogSession[]>;
12
14
  getAllSessionsWithEntries(): Promise<ActivityLogSession[]>;
@@ -35,6 +35,7 @@ declare const _default: {
35
35
  }>;
36
36
  getPluginSettings(): Promise<import("../db/model/plugin-settings").PluginSettings>;
37
37
  updatePluginSettings(settings: any): Promise<any>;
38
+ updatePluginSettingsUiPrefs(prefs: Partial<Pick<import("../db/model/plugin-settings").PluginSettings, "defaultRoute" | "activityLogsSort">>): Promise<import("../db/model/plugin-settings").PluginSettings>;
38
39
  getSyncCursor(): Promise<import("../db/model/sync-cursor").SyncCursor>;
39
40
  updateSyncCursor(cursor: import("../db/model/sync-cursor").SyncCursor): Promise<import("../db/model/sync-cursor").SyncCursor>;
40
41
  };
@@ -48,9 +49,10 @@ declare const _default: {
48
49
  LocalazyTransferDownloadService: ({ strapi }: {
49
50
  strapi: import("@strapi/types/dist/core").Strapi;
50
51
  }) => {
51
- download({ notificationService, fullSync, }: {
52
+ download({ notificationService, fullSync, requestedUiLanguages, }: {
52
53
  notificationService: import("./helpers/job-notification-service").default;
53
54
  fullSync?: boolean;
55
+ requestedUiLanguages?: string[];
54
56
  }): Promise<void>;
55
57
  };
56
58
  StrapiI18nService: ({ strapi }: {
@@ -109,6 +111,8 @@ declare const _default: {
109
111
  saveActivityLogs(logs: import("../db/model/activity-logs").ActivityLogs): Promise<void>;
110
112
  startSession(eventType: "upload" | "download" | "webhook", initiatedBy: string): Promise<string>;
111
113
  addEntry(sessionId: string, message: string, data?: any): Promise<void>;
114
+ recordAttemptedEntry(sessionId: string, entry: Omit<import("../db/model/activity-logs").AttemptedEntry, "attemptedAt">): Promise<void>;
115
+ recordAttemptedEntries(sessionId: string, entries: Omit<import("../db/model/activity-logs").AttemptedEntry, "attemptedAt">[]): Promise<void>;
112
116
  finishSession(sessionId: string, status: "completed" | "failed", summary: string): Promise<void>;
113
117
  getSessions(eventType?: "upload" | "download" | "webhook"): Promise<import("../db/model/activity-logs").ActivityLogSession[]>;
114
118
  getAllSessionsWithEntries(): Promise<import("../db/model/activity-logs").ActivityLogSession[]>;
@@ -3,9 +3,10 @@ import { JobNotificationServiceType } from './helpers/job-notification-service';
3
3
  declare const LocalazyTransferDownloadService: ({ strapi }: {
4
4
  strapi: Core.Strapi;
5
5
  }) => {
6
- download({ notificationService, fullSync, }: {
6
+ download({ notificationService, fullSync, requestedUiLanguages, }: {
7
7
  notificationService: JobNotificationServiceType;
8
8
  fullSync?: boolean;
9
+ requestedUiLanguages?: string[];
9
10
  }): Promise<void>;
10
11
  };
11
12
  export type LocalazyTransferDownloadServiceReturnType = ReturnType<typeof LocalazyTransferDownloadService>;
@@ -2,6 +2,9 @@ import { Core } from '@strapi/strapi';
2
2
  import { PluginSettings } from '../db/model/plugin-settings';
3
3
  import { SyncCursor } from '../db/model/sync-cursor';
4
4
  import { ContentTransferSetup } from '../models/plugin/content-transfer-setup';
5
+ declare const UI_PREF_FIELDS: readonly ["defaultRoute", "activityLogsSort"];
6
+ type UiPrefField = (typeof UI_PREF_FIELDS)[number];
7
+ export type PluginSettingsUiPrefs = Partial<Pick<PluginSettings, UiPrefField>>;
5
8
  declare const PluginSettingsService: ({ strapi }: {
6
9
  strapi: Core.Strapi;
7
10
  }) => {
@@ -12,6 +15,7 @@ declare const PluginSettingsService: ({ strapi }: {
12
15
  }>;
13
16
  getPluginSettings(): Promise<PluginSettings>;
14
17
  updatePluginSettings(settings: any): Promise<any>;
18
+ updatePluginSettingsUiPrefs(prefs: PluginSettingsUiPrefs): Promise<PluginSettings>;
15
19
  getSyncCursor(): Promise<SyncCursor>;
16
20
  updateSyncCursor(cursor: SyncCursor): Promise<SyncCursor>;
17
21
  };