@localazy/strapi-plugin 1.4.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 (61) hide show
  1. package/README.md +30 -0
  2. package/dist/_chunks/{FetchIdentity-Cor4ooZv.mjs → FetchIdentity-Bm7bc5bS.mjs} +36 -44
  3. package/dist/_chunks/{FetchIdentity-BpFOT163.js → FetchIdentity-CcEjakiz.js} +24 -32
  4. package/dist/_chunks/{LanguagesSelector-BbrMKwQY.mjs → LanguagesSelector-B1rwN7-Y.mjs} +4 -3
  5. package/dist/_chunks/{LanguagesSelector-CC1ecWnc.js → LanguagesSelector-DejYCwBl.js} +3 -2
  6. package/dist/_chunks/{LocalazyApp-DpFR8p10.mjs → LocalazyApp-C4kbsnQh.mjs} +70 -34
  7. package/dist/_chunks/{LocalazyApp-D0JGRQeF.js → LocalazyApp-jPO7Yr1S.js} +75 -39
  8. package/dist/_chunks/{LocalazyContentTransferSetup-Dael1Q4w.mjs → LocalazyContentTransferSetup-C1wDD9hA.mjs} +58 -22
  9. package/dist/_chunks/{LocalazyContentTransferSetup-Cr7D-BUi.js → LocalazyContentTransferSetup-DZh4ZdSi.js} +62 -26
  10. package/dist/_chunks/{LocalazyGlobalSettings-D3nG4zl7.js → LocalazyGlobalSettings-D76it6rn.js} +56 -25
  11. package/dist/_chunks/{LocalazyGlobalSettings-DzBI5M-K.mjs → LocalazyGlobalSettings-DOW5rjLn.mjs} +56 -25
  12. package/dist/_chunks/{LocalazyPanel-W6j8N1WC.mjs → LocalazyPanel-C_Z4W49T.mjs} +12 -6
  13. package/dist/_chunks/{LocalazyPanel-KQPLxTDz.js → LocalazyPanel-D2LQpqii.js} +14 -8
  14. package/dist/_chunks/{LocalazyStatusColumn-CrhsCjgp.mjs → LocalazyStatusColumn-C_ZCd_s7.mjs} +10 -4
  15. package/dist/_chunks/{LocalazyStatusColumn-B7Q_U2Lu.js → LocalazyStatusColumn-Dy6N4_X6.js} +10 -4
  16. package/dist/_chunks/{RequireLocalazyAuth-D3GeZPDh.js → RequireLocalazyAuth-BVwF0bRC.js} +30 -3
  17. package/dist/_chunks/{RequireLocalazyAuth-BwoGRfJq.mjs → RequireLocalazyAuth-DNhTZZ_6.mjs} +32 -5
  18. package/dist/_chunks/{entry-exclusion-service-D7gaRHPE.mjs → entry-exclusion-service-CF_yNCly.mjs} +1 -1
  19. package/dist/_chunks/{entry-exclusion-service-Bwruvyce.js → entry-exclusion-service-CH3ZoJQN.js} +1 -1
  20. package/dist/_chunks/{has-model-changed-Dp2Vkwjw.mjs → has-model-changed-CVJEuGxM.mjs} +2 -2
  21. package/dist/_chunks/{has-model-changed-5IV9WI_-.js → has-model-changed-DdYbyv0v.js} +2 -2
  22. package/dist/_chunks/{i18n-o24yXf-j.mjs → i18n-76ox2llT.mjs} +4 -1
  23. package/dist/_chunks/{i18n-C_5tJvr0.js → i18n-C5ucROBh.js} +4 -1
  24. package/dist/_chunks/{index-jAg6jjCu.js → index-CEGaWWh3.js} +33 -11
  25. package/dist/_chunks/{index-C9hN3KbD.mjs → index-DP2ugzc_.mjs} +34 -12
  26. package/dist/_chunks/{index-BjL9XpRh.mjs → index-shryj0jT.mjs} +16 -16
  27. package/dist/_chunks/{strapi-api-base-IG3Pe5Sg.js → strapi-api-base-CCUuu7EY.js} +1 -1
  28. package/dist/_chunks/{strapi-api-base-CAzGcwF6.mjs → strapi-api-base-IiMEtDoH.mjs} +1 -1
  29. package/dist/admin/index.js +1 -1
  30. package/dist/admin/index.mjs +1 -1
  31. package/dist/admin/src/components/LocalazyStatusColumn.d.ts +1 -1
  32. package/dist/admin/src/constants/permissions.d.ts +29 -0
  33. package/dist/admin/src/modules/@common/components/LanguagesSelector.d.ts +1 -0
  34. package/dist/admin/src/modules/login/locale/en.d.ts +1 -0
  35. package/dist/admin/src/modules/plugin-settings/components/Tree.d.ts +1 -0
  36. package/dist/admin/src/modules/plugin-settings/components/TreeItem.d.ts +1 -0
  37. package/dist/admin/src/modules/plugin-settings/components/WebhookSetup.d.ts +4 -1
  38. package/dist/admin/src/modules/plugin-settings/locale/en.d.ts +2 -0
  39. package/dist/admin/src/modules/plugin-settings/services/plugin-settings-service.d.ts +4 -0
  40. package/dist/server/index.js +157 -36
  41. package/dist/server/index.mjs +157 -36
  42. package/dist/server/src/bootstrap.d.ts +1 -1
  43. package/dist/server/src/constants/permissions.d.ts +38 -0
  44. package/dist/server/src/controllers/index.d.ts +1 -0
  45. package/dist/server/src/controllers/plugin-settings-controller.d.ts +1 -0
  46. package/dist/server/src/core/index.d.ts +3 -1
  47. package/dist/server/src/index.d.ts +57 -8
  48. package/dist/server/src/routes/activity-logs-routes.d.ts +20 -3
  49. package/dist/server/src/routes/debug-bundle-routes.d.ts +6 -1
  50. package/dist/server/src/routes/entry-exclusion-routes.d.ts +20 -3
  51. package/dist/server/src/routes/index.d.ts +52 -6
  52. package/dist/server/src/routes/localazy-auth-routes.d.ts +6 -1
  53. package/dist/server/src/routes/localazy-project-routes.d.ts +20 -3
  54. package/dist/server/src/routes/localazy-transfer-routes.d.ts +6 -1
  55. package/dist/server/src/routes/localazy-user-routes.d.ts +20 -3
  56. package/dist/server/src/routes/plugin-settings-routes.d.ts +20 -3
  57. package/dist/server/src/routes/strapi-routes.d.ts +20 -3
  58. package/dist/server/src/services/index.d.ts +3 -1
  59. package/dist/server/src/services/localazy-transfer-download-service.d.ts +2 -1
  60. package/dist/server/src/services/plugin-settings-service.d.ts +4 -0
  61. package/package.json +1 -1
@@ -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 }: {
@@ -93,25 +94,71 @@ declare const _default: {
93
94
  };
94
95
  routes: {
95
96
  'content-api': {
96
- routes: {
97
+ routes: ({
97
98
  method: string;
98
99
  path: string;
99
100
  handler: string;
100
101
  config: {
101
- policies: any[];
102
+ policies: {
103
+ name: string;
104
+ config: {
105
+ actions: `plugin::${string}.read`[];
106
+ };
107
+ }[];
102
108
  };
103
- }[];
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
+ })[];
104
122
  };
105
123
  admin: {
106
124
  type: string;
107
- routes: {
125
+ routes: ({
108
126
  method: string;
109
127
  path: string;
110
128
  handler: string;
111
129
  config: {
112
- policies: any[];
130
+ policies: {
131
+ name: string;
132
+ config: {
133
+ actions: `plugin::${string}.read`[];
134
+ };
135
+ }[];
113
136
  };
114
- }[];
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
+ })[];
115
162
  };
116
163
  LocalazyPublicTransferRoutes: {
117
164
  routes: {
@@ -163,6 +210,7 @@ declare const _default: {
163
210
  }>;
164
211
  getPluginSettings(): Promise<import("./db/model/plugin-settings").PluginSettings>;
165
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>;
166
214
  getSyncCursor(): Promise<import("./db/model/sync-cursor").SyncCursor>;
167
215
  updateSyncCursor(cursor: import("./db/model/sync-cursor").SyncCursor): Promise<import("./db/model/sync-cursor").SyncCursor>;
168
216
  };
@@ -176,9 +224,10 @@ declare const _default: {
176
224
  LocalazyTransferDownloadService: ({ strapi }: {
177
225
  strapi: import("@strapi/types/dist/core").Strapi;
178
226
  }) => {
179
- download({ notificationService, fullSync, }: {
227
+ download({ notificationService, fullSync, requestedUiLanguages, }: {
180
228
  notificationService: import("./services/helpers/job-notification-service").default;
181
229
  fullSync?: boolean;
230
+ requestedUiLanguages?: string[];
182
231
  }): Promise<void>;
183
232
  };
184
233
  StrapiI18nService: ({ strapi }: {
@@ -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;
@@ -3,7 +3,12 @@ declare const DebugBundleRoutes: {
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
  }[];
9
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;
@@ -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 }: {
@@ -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
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@localazy/strapi-plugin",
3
- "version": "1.4.0",
3
+ "version": "1.6.0",
4
4
  "description": "The official Strapi Plugin by Localazy.",
5
5
  "keywords": [
6
6
  "strapi",