@localazy/strapi-plugin 1.0.11 → 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.
- package/dist/_chunks/{FetchIdentity-BB5V79aG.js → FetchIdentity-CevvxeEj.js} +73 -46
- package/dist/_chunks/{FetchIdentity-CkL7UYRt.mjs → FetchIdentity-DeThazz9.mjs} +43 -16
- package/dist/_chunks/{LanguagesSelector-DDjJ90sz.js → LanguagesSelector-BExpl4Vx.js} +15 -3
- package/dist/_chunks/{LanguagesSelector-BUSLrXE9.mjs → LanguagesSelector-D62gLZsM.mjs} +15 -3
- package/dist/_chunks/{LocalazyApp-H3kYTy7p.mjs → LocalazyApp-Czkb4s5J.mjs} +796 -69
- package/dist/_chunks/{LocalazyApp-BzcT9jmq.js → LocalazyApp-DIcO748C.js} +796 -67
- package/dist/_chunks/{LocalazyContentTransferSetup-rrXuAqRA.js → LocalazyContentTransferSetup-DAyZdwi9.js} +13 -10
- package/dist/_chunks/{LocalazyContentTransferSetup-BrLho135.mjs → LocalazyContentTransferSetup-Dx0Z6DXc.mjs} +13 -10
- package/dist/_chunks/{LocalazyGlobalSettings-NhjPAqfZ.mjs → LocalazyGlobalSettings-DWMBqlN4.mjs} +149 -12
- package/dist/_chunks/{LocalazyGlobalSettings-Dj93M25t.js → LocalazyGlobalSettings-DjrXGVxl.js} +148 -11
- package/dist/_chunks/{LocalazyPanel-DokDDR0T.mjs → LocalazyPanel-B-0HBTL_.mjs} +4 -4
- package/dist/_chunks/{LocalazyPanel-C1r8FU9w.js → LocalazyPanel-nBOpQo5B.js} +4 -4
- package/dist/_chunks/{LocalazyStatusColumn-CaAL-caH.mjs → LocalazyStatusColumn-CpO3yccG.mjs} +9 -7
- package/dist/_chunks/{LocalazyStatusColumn-D50ZkXY-.js → LocalazyStatusColumn-cGsUDMlX.js} +9 -7
- package/dist/_chunks/{RequireLocalazyAuth-C9qzj01C.js → RequireLocalazyAuth-56K8HUNR.js} +4 -4
- package/dist/_chunks/{RequireLocalazyAuth-c-nP7C0A.mjs → RequireLocalazyAuth-Dh-mAMcg.mjs} +4 -4
- package/dist/_chunks/{entry-exclusion-service-Db6jzNVM.mjs → entry-exclusion-service-Dm5_iP7I.mjs} +1 -1
- package/dist/_chunks/{entry-exclusion-service-0Ul5AWi-.js → entry-exclusion-service-Rf4Tr0zW.js} +1 -1
- package/dist/_chunks/{has-model-changed-VkgGfN-6.mjs → has-model-changed-6p1lR-Ho.mjs} +2 -2
- package/dist/_chunks/{has-model-changed-CmZh9bwD.js → has-model-changed-CGyDQARr.js} +2 -2
- package/dist/_chunks/{i18n-DaBjUC3Y.js → i18n-CAsbU4pi.js} +62 -4
- package/dist/_chunks/{i18n-Bga-GG_Z.mjs → i18n-QelOdIB2.mjs} +62 -4
- package/dist/_chunks/{index-BSNW1ypR.js → index-BK7lmZSN.js} +57 -19
- package/dist/_chunks/{index-C_svJuLd.mjs → index-Bpf1Mw2A.mjs} +8 -8
- package/dist/_chunks/{index-CaHacyle.js → index-BsQ_ie4C.js} +8 -8
- package/dist/_chunks/{index-BIHAiJnE.mjs → index-CHjIMO9T.mjs} +78 -40
- package/dist/_chunks/{strapi-api-base-BTpukPev.mjs → strapi-api-base-Bem_CGuz.mjs} +2 -2
- package/dist/_chunks/{strapi-api-base-DJi1gdZT.js → strapi-api-base-W_bUTSlY.js} +2 -2
- package/dist/admin/index.js +1 -1
- package/dist/admin/index.mjs +1 -1
- package/dist/admin/src/components/PluginErrorBoundary.d.ts +5 -0
- package/dist/admin/src/modules/@common/locale/en.d.ts +4 -0
- package/dist/admin/src/modules/@common/services/product-analytics-service.d.ts +1 -0
- package/dist/admin/src/modules/@common/services/project-service.d.ts +9 -0
- package/dist/admin/src/modules/@common/styles/heading-fix.d.ts +7 -0
- package/dist/admin/src/modules/@common/utils/export-json.d.ts +1 -0
- package/dist/admin/src/modules/@common/utils/redirect-to-plugin-route.d.ts +1 -0
- package/dist/admin/src/modules/activity-logs/components/HighlightMatch.d.ts +6 -0
- package/dist/admin/src/modules/activity-logs/components/SessionMetadata.d.ts +7 -0
- package/dist/admin/src/modules/activity-logs/components/SessionsTable.d.ts +17 -0
- package/dist/admin/src/modules/activity-logs/components/SortableHeader.d.ts +10 -0
- package/dist/admin/src/modules/activity-logs/components/StatusLabel.d.ts +6 -0
- package/dist/admin/src/modules/activity-logs/hooks/use-debounced-search.d.ts +6 -0
- package/dist/admin/src/modules/activity-logs/locale/en.d.ts +33 -0
- package/dist/admin/src/modules/activity-logs/models/activity-logs.d.ts +19 -0
- package/dist/admin/src/modules/activity-logs/services/activity-logs-service.d.ts +6 -0
- package/dist/admin/src/modules/activity-logs/utils/export-logs.d.ts +1 -0
- package/dist/admin/src/modules/activity-logs/utils/format-utils.d.ts +4 -0
- package/dist/admin/src/modules/plugin-settings/components/WebhookSetup.d.ts +2 -0
- package/dist/admin/src/modules/plugin-settings/locale/en.d.ts +21 -0
- package/dist/admin/src/pages/ActivityLogDetail.d.ts +7 -0
- package/dist/admin/src/pages/ActivityLogs.d.ts +7 -0
- package/dist/server/index.js +516 -61
- package/dist/server/index.mjs +516 -61
- package/dist/server/src/controllers/activity-logs-controller.d.ts +10 -0
- package/dist/server/src/controllers/index.d.ts +14 -3
- package/dist/server/src/controllers/localazy-auth-controller.d.ts +1 -1
- package/dist/server/src/controllers/localazy-project-controller.d.ts +3 -0
- package/dist/server/src/controllers/localazy-user-controller.d.ts +1 -1
- package/dist/server/src/controllers/plugin-settings-controller.d.ts +1 -1
- package/dist/server/src/core/index.d.ts +14 -0
- package/dist/server/src/db/model/activity-logs.d.ts +20 -0
- package/dist/server/src/db/model/plugin-settings.d.ts +14 -0
- package/dist/server/src/destroy.d.ts +1 -1
- package/dist/server/src/index.d.ts +31 -4
- package/dist/server/src/routes/activity-logs-routes.d.ts +9 -0
- package/dist/server/src/services/activity-logs-service.d.ts +17 -0
- package/dist/server/src/services/index.d.ts +16 -0
- package/dist/server/src/services/localazy-pubapi-service.d.ts +2 -0
- package/dist/server/src/services/strapi-service.d.ts +1 -0
- package/dist/server/src/utils/get-character-limits-metadata.d.ts +13 -0
- package/dist/server/src/utils/get-picked-flatten-keys-for-hook-entry.d.ts +3 -1
- package/package.json +5 -4
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Core } from '@strapi/strapi';
|
|
2
|
+
declare const ActivityLogsController: ({ strapi: _strapi }: {
|
|
3
|
+
strapi: Core.Strapi;
|
|
4
|
+
}) => {
|
|
5
|
+
getSessions(ctx: any): Promise<void>;
|
|
6
|
+
getSession(ctx: any): Promise<any>;
|
|
7
|
+
exportSessions(ctx: any): Promise<void>;
|
|
8
|
+
clearSessions(ctx: any): Promise<void>;
|
|
9
|
+
};
|
|
10
|
+
export default ActivityLogsController;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
|
-
LocalazyUserController: ({ strapi }: {
|
|
2
|
+
LocalazyUserController: ({ strapi: _strapi }: {
|
|
3
3
|
strapi: import("@strapi/types/dist/core").Strapi;
|
|
4
4
|
}) => {
|
|
5
5
|
getUser(ctx: any): Promise<void>;
|
|
6
6
|
updateUser(ctx: any): Promise<void>;
|
|
7
7
|
deleteUser(ctx: any): Promise<void>;
|
|
8
8
|
};
|
|
9
|
-
LocalazyAuthController: ({ strapi }: {
|
|
9
|
+
LocalazyAuthController: ({ strapi: _strapi }: {
|
|
10
10
|
strapi: import("@strapi/types/dist/core").Strapi;
|
|
11
11
|
}) => {
|
|
12
12
|
generateKeys(ctx: any): Promise<void>;
|
|
@@ -24,8 +24,11 @@ declare const _default: {
|
|
|
24
24
|
strapi: import("@strapi/types/dist/core").Strapi;
|
|
25
25
|
}) => {
|
|
26
26
|
getConnectedProject(ctx: any): Promise<void>;
|
|
27
|
+
getWebhookStatus(ctx: any): Promise<void>;
|
|
28
|
+
setupWebhook(ctx: any): Promise<any>;
|
|
29
|
+
getStrapiUrl(ctx: any): Promise<void>;
|
|
27
30
|
};
|
|
28
|
-
PluginSettingsController: ({ strapi }: {
|
|
31
|
+
PluginSettingsController: ({ strapi: _strapi }: {
|
|
29
32
|
strapi: import("@strapi/types/dist/core").Strapi;
|
|
30
33
|
}) => {
|
|
31
34
|
getContentTransferSetup(ctx: any): Promise<void>;
|
|
@@ -47,5 +50,13 @@ declare const _default: {
|
|
|
47
50
|
setEntryExclusion(ctx: any): Promise<any>;
|
|
48
51
|
getContentTypeExclusions(ctx: any): Promise<any>;
|
|
49
52
|
};
|
|
53
|
+
ActivityLogsController: ({ strapi: _strapi }: {
|
|
54
|
+
strapi: import("@strapi/types/dist/core").Strapi;
|
|
55
|
+
}) => {
|
|
56
|
+
getSessions(ctx: any): Promise<void>;
|
|
57
|
+
getSession(ctx: any): Promise<any>;
|
|
58
|
+
exportSessions(ctx: any): Promise<void>;
|
|
59
|
+
clearSessions(ctx: any): Promise<void>;
|
|
60
|
+
};
|
|
50
61
|
};
|
|
51
62
|
export default _default;
|
|
@@ -3,5 +3,8 @@ declare const LocalazyProjectController: ({ strapi }: {
|
|
|
3
3
|
strapi: Core.Strapi;
|
|
4
4
|
}) => {
|
|
5
5
|
getConnectedProject(ctx: any): Promise<void>;
|
|
6
|
+
getWebhookStatus(ctx: any): Promise<void>;
|
|
7
|
+
setupWebhook(ctx: any): Promise<any>;
|
|
8
|
+
getStrapiUrl(ctx: any): Promise<void>;
|
|
6
9
|
};
|
|
7
10
|
export default LocalazyProjectController;
|
|
@@ -8,6 +8,8 @@ export declare const getLocalazyPubAPIService: () => {
|
|
|
8
8
|
getStrapiFile(projectId: string): Promise<import("@localazy/api-client").File>;
|
|
9
9
|
listProjects(addOrganization?: boolean, addLanguages?: boolean): Promise<import("@localazy/api-client").Project[]>;
|
|
10
10
|
getProject(projectId: string, addOrganization?: boolean, addLanguages?: boolean): Promise<import("@localazy/api-client").Project>;
|
|
11
|
+
listWebhooks(projectId: string): Promise<import("@localazy/api-client").Webhook[]>;
|
|
12
|
+
updateWebhooks(projectId: string, items: any[]): Promise<void>;
|
|
11
13
|
getWebhooksSecret(projectId: string): Promise<string>;
|
|
12
14
|
};
|
|
13
15
|
export declare const getLocalazyTransferUploadService: () => {
|
|
@@ -36,6 +38,7 @@ export declare const getStrapiService: () => {
|
|
|
36
38
|
getModels(): Promise<any[]>;
|
|
37
39
|
getLocalizableModels(): Promise<any[]>;
|
|
38
40
|
getPluginVersion(): Promise<string>;
|
|
41
|
+
getStrapiVersion(): string;
|
|
39
42
|
};
|
|
40
43
|
export declare const getStrapiI18nService: () => {
|
|
41
44
|
getLocales(): Promise<import("../models/strapi/locale").Locale[]>;
|
|
@@ -78,3 +81,14 @@ export declare const getEntryExclusionService: () => {
|
|
|
78
81
|
setEntryExclusion(contentType: string, documentId: string, excludeFromTranslation: boolean): Promise<void>;
|
|
79
82
|
getContentTypeExclusions(contentType: string): Promise<string[]>;
|
|
80
83
|
};
|
|
84
|
+
export declare const getActivityLogsService: () => {
|
|
85
|
+
getActivityLogs(): Promise<import("../db/model/activity-logs").ActivityLogs>;
|
|
86
|
+
saveActivityLogs(logs: import("../db/model/activity-logs").ActivityLogs): Promise<void>;
|
|
87
|
+
startSession(eventType: "upload" | "download" | "webhook", initiatedBy: string): Promise<string>;
|
|
88
|
+
addEntry(sessionId: string, message: string, data?: any): Promise<void>;
|
|
89
|
+
finishSession(sessionId: string, status: "completed" | "failed", summary: string): Promise<void>;
|
|
90
|
+
getSessions(eventType?: "upload" | "download" | "webhook"): Promise<import("../db/model/activity-logs").ActivityLogSession[]>;
|
|
91
|
+
getAllSessionsWithEntries(): Promise<import("../db/model/activity-logs").ActivityLogSession[]>;
|
|
92
|
+
getSession(sessionId: string): Promise<import("../db/model/activity-logs").ActivityLogSession>;
|
|
93
|
+
clearSessions(): Promise<void>;
|
|
94
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare const KEY = "activity-logs";
|
|
2
|
+
export type ActivityLogEntry = {
|
|
3
|
+
message: string;
|
|
4
|
+
timestamp: number;
|
|
5
|
+
data?: any;
|
|
6
|
+
};
|
|
7
|
+
export type ActivityLogSession = {
|
|
8
|
+
id: string;
|
|
9
|
+
eventType: 'upload' | 'download' | 'webhook';
|
|
10
|
+
status: 'in-progress' | 'completed' | 'failed';
|
|
11
|
+
startedAt: number;
|
|
12
|
+
finishedAt?: number;
|
|
13
|
+
initiatedBy: string;
|
|
14
|
+
summary: string;
|
|
15
|
+
entries: ActivityLogEntry[];
|
|
16
|
+
};
|
|
17
|
+
export type ActivityLogs = {
|
|
18
|
+
sessions: ActivityLogSession[];
|
|
19
|
+
};
|
|
20
|
+
export declare const emptyActivityLogs: ActivityLogs;
|
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
export declare const KEY = "plugin-settings";
|
|
2
|
+
export type SortPreference = {
|
|
3
|
+
key: string;
|
|
4
|
+
direction: 'asc' | 'desc';
|
|
5
|
+
};
|
|
6
|
+
export type WebhookConfig = {
|
|
7
|
+
url: string;
|
|
8
|
+
webhookId?: string;
|
|
9
|
+
};
|
|
2
10
|
export type PluginSettings = {
|
|
3
11
|
defaultRoute: string | null;
|
|
12
|
+
activityLogsSort?: {
|
|
13
|
+
upload?: SortPreference;
|
|
14
|
+
download?: SortPreference;
|
|
15
|
+
webhook?: SortPreference;
|
|
16
|
+
};
|
|
17
|
+
webhookConfig?: WebhookConfig;
|
|
4
18
|
};
|
|
5
19
|
export declare const emptyPluginSettings: PluginSettings;
|
|
@@ -5,7 +5,7 @@ declare const _default: {
|
|
|
5
5
|
bootstrap: ({ strapi }: {
|
|
6
6
|
strapi: import("@strapi/types/dist/core").Strapi;
|
|
7
7
|
}) => void;
|
|
8
|
-
destroy: ({ strapi }: {
|
|
8
|
+
destroy: ({ strapi: _strapi }: {
|
|
9
9
|
strapi: import("@strapi/types/dist/core").Strapi;
|
|
10
10
|
}) => void;
|
|
11
11
|
config: {
|
|
@@ -26,14 +26,14 @@ declare const _default: {
|
|
|
26
26
|
validator(): void;
|
|
27
27
|
};
|
|
28
28
|
controllers: {
|
|
29
|
-
LocalazyUserController: ({ strapi }: {
|
|
29
|
+
LocalazyUserController: ({ strapi: _strapi }: {
|
|
30
30
|
strapi: import("@strapi/types/dist/core").Strapi;
|
|
31
31
|
}) => {
|
|
32
32
|
getUser(ctx: any): Promise<void>;
|
|
33
33
|
updateUser(ctx: any): Promise<void>;
|
|
34
34
|
deleteUser(ctx: any): Promise<void>;
|
|
35
35
|
};
|
|
36
|
-
LocalazyAuthController: ({ strapi }: {
|
|
36
|
+
LocalazyAuthController: ({ strapi: _strapi }: {
|
|
37
37
|
strapi: import("@strapi/types/dist/core").Strapi;
|
|
38
38
|
}) => {
|
|
39
39
|
generateKeys(ctx: any): Promise<void>;
|
|
@@ -51,8 +51,11 @@ declare const _default: {
|
|
|
51
51
|
strapi: import("@strapi/types/dist/core").Strapi;
|
|
52
52
|
}) => {
|
|
53
53
|
getConnectedProject(ctx: any): Promise<void>;
|
|
54
|
+
getWebhookStatus(ctx: any): Promise<void>;
|
|
55
|
+
setupWebhook(ctx: any): Promise<any>;
|
|
56
|
+
getStrapiUrl(ctx: any): Promise<void>;
|
|
54
57
|
};
|
|
55
|
-
PluginSettingsController: ({ strapi }: {
|
|
58
|
+
PluginSettingsController: ({ strapi: _strapi }: {
|
|
56
59
|
strapi: import("@strapi/types/dist/core").Strapi;
|
|
57
60
|
}) => {
|
|
58
61
|
getContentTransferSetup(ctx: any): Promise<void>;
|
|
@@ -74,6 +77,14 @@ declare const _default: {
|
|
|
74
77
|
setEntryExclusion(ctx: any): Promise<any>;
|
|
75
78
|
getContentTypeExclusions(ctx: any): Promise<any>;
|
|
76
79
|
};
|
|
80
|
+
ActivityLogsController: ({ strapi: _strapi }: {
|
|
81
|
+
strapi: import("@strapi/types/dist/core").Strapi;
|
|
82
|
+
}) => {
|
|
83
|
+
getSessions(ctx: any): Promise<void>;
|
|
84
|
+
getSession(ctx: any): Promise<any>;
|
|
85
|
+
exportSessions(ctx: any): Promise<void>;
|
|
86
|
+
clearSessions(ctx: any): Promise<void>;
|
|
87
|
+
};
|
|
77
88
|
};
|
|
78
89
|
routes: {
|
|
79
90
|
'content-api': {
|
|
@@ -124,6 +135,7 @@ declare const _default: {
|
|
|
124
135
|
getModels(): Promise<any[]>;
|
|
125
136
|
getLocalizableModels(): Promise<any[]>;
|
|
126
137
|
getPluginVersion(): Promise<string>;
|
|
138
|
+
getStrapiVersion(): string;
|
|
127
139
|
};
|
|
128
140
|
LocalazyPubAPIService: ({ strapi }: {
|
|
129
141
|
strapi: import("@strapi/types/dist/core").Strapi;
|
|
@@ -132,6 +144,8 @@ declare const _default: {
|
|
|
132
144
|
getStrapiFile(projectId: string): Promise<import("@localazy/api-client").File>;
|
|
133
145
|
listProjects(addOrganization?: boolean, addLanguages?: boolean): Promise<import("@localazy/api-client").Project[]>;
|
|
134
146
|
getProject(projectId: string, addOrganization?: boolean, addLanguages?: boolean): Promise<import("@localazy/api-client").Project>;
|
|
147
|
+
listWebhooks(projectId: string): Promise<import("@localazy/api-client").Webhook[]>;
|
|
148
|
+
updateWebhooks(projectId: string, items: any[]): Promise<void>;
|
|
135
149
|
getWebhooksSecret(projectId: string): Promise<string>;
|
|
136
150
|
};
|
|
137
151
|
PluginSettingsService: ({ strapi }: {
|
|
@@ -211,6 +225,19 @@ declare const _default: {
|
|
|
211
225
|
setEntryExclusion(contentType: string, documentId: string, excludeFromTranslation: boolean): Promise<void>;
|
|
212
226
|
getContentTypeExclusions(contentType: string): Promise<string[]>;
|
|
213
227
|
};
|
|
228
|
+
ActivityLogsService: ({ strapi }: {
|
|
229
|
+
strapi: import("@strapi/types/dist/core").Strapi;
|
|
230
|
+
}) => {
|
|
231
|
+
getActivityLogs(): Promise<import("./db/model/activity-logs").ActivityLogs>;
|
|
232
|
+
saveActivityLogs(logs: import("./db/model/activity-logs").ActivityLogs): Promise<void>;
|
|
233
|
+
startSession(eventType: "upload" | "download" | "webhook", initiatedBy: string): Promise<string>;
|
|
234
|
+
addEntry(sessionId: string, message: string, data?: any): Promise<void>;
|
|
235
|
+
finishSession(sessionId: string, status: "completed" | "failed", summary: string): Promise<void>;
|
|
236
|
+
getSessions(eventType?: "upload" | "download" | "webhook"): Promise<import("./db/model/activity-logs").ActivityLogSession[]>;
|
|
237
|
+
getAllSessionsWithEntries(): Promise<import("./db/model/activity-logs").ActivityLogSession[]>;
|
|
238
|
+
getSession(sessionId: string): Promise<import("./db/model/activity-logs").ActivityLogSession>;
|
|
239
|
+
clearSessions(): Promise<void>;
|
|
240
|
+
};
|
|
214
241
|
};
|
|
215
242
|
contentTypes: {};
|
|
216
243
|
policies: {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Core } from '@strapi/strapi';
|
|
2
|
+
import { ActivityLogs, ActivityLogSession } from '../db/model/activity-logs';
|
|
3
|
+
declare const ActivityLogsService: ({ strapi }: {
|
|
4
|
+
strapi: Core.Strapi;
|
|
5
|
+
}) => {
|
|
6
|
+
getActivityLogs(): Promise<ActivityLogs>;
|
|
7
|
+
saveActivityLogs(logs: ActivityLogs): Promise<void>;
|
|
8
|
+
startSession(eventType: ActivityLogSession['eventType'], initiatedBy: string): Promise<string>;
|
|
9
|
+
addEntry(sessionId: string, message: string, data?: any): Promise<void>;
|
|
10
|
+
finishSession(sessionId: string, status: 'completed' | 'failed', summary: string): Promise<void>;
|
|
11
|
+
getSessions(eventType?: ActivityLogSession['eventType']): Promise<ActivityLogSession[]>;
|
|
12
|
+
getAllSessionsWithEntries(): Promise<ActivityLogSession[]>;
|
|
13
|
+
getSession(sessionId: string): Promise<ActivityLogSession | null>;
|
|
14
|
+
clearSessions(): Promise<void>;
|
|
15
|
+
};
|
|
16
|
+
export type ActivityLogsServiceReturnType = ReturnType<typeof ActivityLogsService>;
|
|
17
|
+
export default ActivityLogsService;
|
|
@@ -12,6 +12,7 @@ declare const _default: {
|
|
|
12
12
|
getModels(): Promise<any[]>;
|
|
13
13
|
getLocalizableModels(): Promise<any[]>;
|
|
14
14
|
getPluginVersion(): Promise<string>;
|
|
15
|
+
getStrapiVersion(): string;
|
|
15
16
|
};
|
|
16
17
|
LocalazyPubAPIService: ({ strapi }: {
|
|
17
18
|
strapi: import("@strapi/types/dist/core").Strapi;
|
|
@@ -20,6 +21,8 @@ declare const _default: {
|
|
|
20
21
|
getStrapiFile(projectId: string): Promise<import("@localazy/api-client").File>;
|
|
21
22
|
listProjects(addOrganization?: boolean, addLanguages?: boolean): Promise<import("@localazy/api-client").Project[]>;
|
|
22
23
|
getProject(projectId: string, addOrganization?: boolean, addLanguages?: boolean): Promise<import("@localazy/api-client").Project>;
|
|
24
|
+
listWebhooks(projectId: string): Promise<import("@localazy/api-client").Webhook[]>;
|
|
25
|
+
updateWebhooks(projectId: string, items: any[]): Promise<void>;
|
|
23
26
|
getWebhooksSecret(projectId: string): Promise<string>;
|
|
24
27
|
};
|
|
25
28
|
PluginSettingsService: ({ strapi }: {
|
|
@@ -99,5 +102,18 @@ declare const _default: {
|
|
|
99
102
|
setEntryExclusion(contentType: string, documentId: string, excludeFromTranslation: boolean): Promise<void>;
|
|
100
103
|
getContentTypeExclusions(contentType: string): Promise<string[]>;
|
|
101
104
|
};
|
|
105
|
+
ActivityLogsService: ({ strapi }: {
|
|
106
|
+
strapi: import("@strapi/types/dist/core").Strapi;
|
|
107
|
+
}) => {
|
|
108
|
+
getActivityLogs(): Promise<import("../db/model/activity-logs").ActivityLogs>;
|
|
109
|
+
saveActivityLogs(logs: import("../db/model/activity-logs").ActivityLogs): Promise<void>;
|
|
110
|
+
startSession(eventType: "upload" | "download" | "webhook", initiatedBy: string): Promise<string>;
|
|
111
|
+
addEntry(sessionId: string, message: string, data?: any): Promise<void>;
|
|
112
|
+
finishSession(sessionId: string, status: "completed" | "failed", summary: string): Promise<void>;
|
|
113
|
+
getSessions(eventType?: "upload" | "download" | "webhook"): Promise<import("../db/model/activity-logs").ActivityLogSession[]>;
|
|
114
|
+
getAllSessionsWithEntries(): Promise<import("../db/model/activity-logs").ActivityLogSession[]>;
|
|
115
|
+
getSession(sessionId: string): Promise<import("../db/model/activity-logs").ActivityLogSession>;
|
|
116
|
+
clearSessions(): Promise<void>;
|
|
117
|
+
};
|
|
102
118
|
};
|
|
103
119
|
export default _default;
|
|
@@ -7,6 +7,8 @@ declare const LocalazyPubAPIService: ({ strapi }: {
|
|
|
7
7
|
getStrapiFile(projectId: string): Promise<import("@localazy/api-client").File>;
|
|
8
8
|
listProjects(addOrganization?: boolean, addLanguages?: boolean): Promise<Project[]>;
|
|
9
9
|
getProject(projectId: string, addOrganization?: boolean, addLanguages?: boolean): Promise<Project | null>;
|
|
10
|
+
listWebhooks(projectId: string): Promise<import("@localazy/api-client").Webhook[]>;
|
|
11
|
+
updateWebhooks(projectId: string, items: any[]): Promise<void>;
|
|
10
12
|
getWebhooksSecret(projectId: string): Promise<string>;
|
|
11
13
|
};
|
|
12
14
|
export type LocalazyPubAPIServiceReturnType = ReturnType<typeof LocalazyPubAPIService>;
|
|
@@ -5,6 +5,7 @@ declare const StrapiService: ({ strapi }: {
|
|
|
5
5
|
getModels(): Promise<any[]>;
|
|
6
6
|
getLocalizableModels(): Promise<any[]>;
|
|
7
7
|
getPluginVersion(): Promise<string>;
|
|
8
|
+
getStrapiVersion(): string;
|
|
8
9
|
};
|
|
9
10
|
export type StrapiServiceReturnType = ReturnType<typeof StrapiService>;
|
|
10
11
|
export default StrapiService;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Extracts character limit metadata from Strapi content type schemas
|
|
3
|
+
* and returns @meta: entries for keys that have maxLength defined.
|
|
4
|
+
*
|
|
5
|
+
* The @meta: prefix is used by the Localazy API to associate metadata
|
|
6
|
+
* (such as character limits) with specific keys during import.
|
|
7
|
+
*
|
|
8
|
+
* @see https://localazy.com/docs/api/import
|
|
9
|
+
*/
|
|
10
|
+
declare const getCharacterLimitsMetadata: (flattenedContent: Record<string, any>, modelUid: string) => Record<string, {
|
|
11
|
+
limit: number;
|
|
12
|
+
}>;
|
|
13
|
+
export { getCharacterLimitsMetadata };
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { HookParams } from '../models/plugin/hook-params';
|
|
2
2
|
declare const _default: (params: HookParams) => Promise<{
|
|
3
|
-
pickedFlatten:
|
|
3
|
+
pickedFlatten: {
|
|
4
|
+
[x: string]: any;
|
|
5
|
+
};
|
|
4
6
|
eventEntryLocale: string;
|
|
5
7
|
projectSourceLanguageCode: string;
|
|
6
8
|
}>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@localazy/strapi-plugin",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "The official Strapi Plugin by Localazy.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"strapi",
|
|
@@ -61,11 +61,12 @@
|
|
|
61
61
|
"test:server": "jest --config server/jest.config.ts",
|
|
62
62
|
"test:server:coverage": "jest --config server/jest.config.ts --coverage",
|
|
63
63
|
"test:server:watch": "jest --config server/jest.config.ts --watch",
|
|
64
|
-
"test:ts:back": "
|
|
65
|
-
"test:ts:front": "
|
|
64
|
+
"test:ts:back": "tsc -p server/tsconfig.json --noEmit",
|
|
65
|
+
"test:ts:front": "tsc -p admin/tsconfig.json --noEmit",
|
|
66
66
|
"verify": "strapi-plugin verify",
|
|
67
67
|
"watch": "strapi-plugin watch",
|
|
68
|
-
"watch:link": "strapi-plugin watch:link"
|
|
68
|
+
"watch:link": "strapi-plugin watch:link",
|
|
69
|
+
"prepare": "husky"
|
|
69
70
|
},
|
|
70
71
|
"lint-staged": {
|
|
71
72
|
"*.{ts,tsx}": [
|