@translationstudio/translationstudio-strapi-extension 1.0.0 → 1.0.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/README.md +29 -32
- package/dist/Types.d.ts +146 -0
- package/dist/_chunks/App-BHydyNKn.js +258 -0
- package/dist/_chunks/App-_TRa6R3c.mjs +258 -0
- package/dist/_chunks/en-B4KWt_jN.js +4 -0
- package/dist/_chunks/en-Byx4XI2L.mjs +4 -0
- package/dist/admin/index.js +319 -0
- package/dist/admin/index.mjs +320 -0
- package/dist/admin/src/components/Initializer.d.ts +5 -0
- package/dist/admin/src/components/PluginIcon.d.ts +2 -0
- package/dist/admin/src/components/TranslationMenu.d.ts +2 -0
- package/dist/admin/src/index.d.ts +11 -0
- package/dist/admin/src/pages/App.d.ts +2 -0
- package/dist/admin/src/pages/SettingsPage.d.ts +2 -0
- package/dist/admin/src/pluginId.d.ts +1 -0
- package/dist/admin/src/utils/getTranslation.d.ts +2 -0
- package/dist/server/index.js +1038 -0
- package/dist/server/index.mjs +1039 -0
- package/dist/server/src/bootstrap.d.ts +5 -0
- package/dist/server/src/config/index.d.ts +5 -0
- package/dist/server/src/content-types/index.d.ts +2 -0
- package/dist/server/src/controllers/controller.d.ts +19 -0
- package/dist/server/src/controllers/index.d.ts +20 -0
- package/dist/server/src/destroy.d.ts +5 -0
- package/dist/server/src/index.d.ts +85 -0
- package/dist/server/src/middlewares/index.d.ts +2 -0
- package/dist/server/src/policies/index.d.ts +2 -0
- package/dist/server/src/register.d.ts +5 -0
- package/dist/server/src/routes/index.d.ts +18 -0
- package/dist/server/src/services/functions/exportData/extractRichtextContent.d.ts +2 -0
- package/dist/server/src/services/functions/exportData/getContentType.d.ts +2 -0
- package/dist/server/src/services/functions/exportData/getEntry.d.ts +2 -0
- package/dist/server/src/services/functions/exportData/isFieldLocalizable.d.ts +2 -0
- package/dist/server/src/services/functions/exportData/jsonToHtml.d.ts +2 -0
- package/dist/server/src/services/functions/exportData/parsePayload.d.ts +7 -0
- package/dist/server/src/services/functions/exportData/processComponent.d.ts +3 -0
- package/dist/server/src/services/functions/exportData/processEntryFields.d.ts +2 -0
- package/dist/server/src/services/functions/exportData/transformResponse.d.ts +2 -0
- package/dist/server/src/services/functions/importData/extract.d.ts +6 -0
- package/dist/server/src/services/functions/importData/handleError.d.ts +1 -0
- package/dist/server/src/services/functions/importData/htmlToJson.d.ts +2 -0
- package/dist/server/src/services/functions/importData/organizeFields.d.ts +2 -0
- package/dist/server/src/services/functions/importData/parseImportPayload.d.ts +6 -0
- package/dist/server/src/services/functions/importData/parseInlineElements.d.ts +2 -0
- package/dist/server/src/services/functions/importData/parseNewValuesIntoStructure.d.ts +1 -0
- package/dist/server/src/services/functions/importData/prepareImportData.d.ts +2 -0
- package/dist/server/src/services/functions/importData/processComponentFields.d.ts +2 -0
- package/dist/server/src/services/functions/importData/processDynamicZones.d.ts +2 -0
- package/dist/server/src/services/functions/importData/processRegularFields.d.ts +2 -0
- package/dist/server/src/services/functions/importData/transformFieldsToData.d.ts +2 -0
- package/dist/server/src/services/functions/importData/updateEntry.d.ts +2 -0
- package/dist/server/src/services/index.d.ts +31 -0
- package/dist/server/src/services/service.d.ts +31 -0
- package/package.json +1 -1
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Core } from '@strapi/strapi';
|
|
2
|
+
declare const controller: ({ strapi }: {
|
|
3
|
+
strapi: Core.Strapi;
|
|
4
|
+
}) => {
|
|
5
|
+
validateToken(ctx: any): Promise<boolean>;
|
|
6
|
+
getLicense(ctx: any): Promise<void>;
|
|
7
|
+
setLicense(ctx: any): Promise<void>;
|
|
8
|
+
getToken(ctx: any): Promise<void>;
|
|
9
|
+
generateToken(ctx: any): Promise<void>;
|
|
10
|
+
getLanguageOptions(ctx: any): Promise<void>;
|
|
11
|
+
requestTranslation(ctx: any): Promise<void>;
|
|
12
|
+
exportData(ctx: any): Promise<void>;
|
|
13
|
+
importData(ctx: any): Promise<void>;
|
|
14
|
+
ping(ctx: any): Promise<void>;
|
|
15
|
+
getLanguages(ctx: any): Promise<void>;
|
|
16
|
+
getEmail(ctx: any): Promise<void>;
|
|
17
|
+
getEntryData(ctx: any): Promise<any>;
|
|
18
|
+
};
|
|
19
|
+
export default controller;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
controller: ({ strapi }: {
|
|
3
|
+
strapi: import("@strapi/types/dist/core").Strapi;
|
|
4
|
+
}) => {
|
|
5
|
+
validateToken(ctx: any): Promise<boolean>;
|
|
6
|
+
getLicense(ctx: any): Promise<void>;
|
|
7
|
+
setLicense(ctx: any): Promise<void>;
|
|
8
|
+
getToken(ctx: any): Promise<void>;
|
|
9
|
+
generateToken(ctx: any): Promise<void>;
|
|
10
|
+
getLanguageOptions(ctx: any): Promise<void>;
|
|
11
|
+
requestTranslation(ctx: any): Promise<void>;
|
|
12
|
+
exportData(ctx: any): Promise<void>;
|
|
13
|
+
importData(ctx: any): Promise<void>;
|
|
14
|
+
ping(ctx: any): Promise<void>;
|
|
15
|
+
getLanguages(ctx: any): Promise<void>;
|
|
16
|
+
getEmail(ctx: any): Promise<void>;
|
|
17
|
+
getEntryData(ctx: any): Promise<any>;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
export default _default;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
register: ({ strapi }: {
|
|
3
|
+
strapi: import("@strapi/types/dist/core").Strapi;
|
|
4
|
+
}) => void;
|
|
5
|
+
bootstrap: ({ strapi }: {
|
|
6
|
+
strapi: import("@strapi/types/dist/core").Strapi;
|
|
7
|
+
}) => void;
|
|
8
|
+
destroy: ({ strapi }: {
|
|
9
|
+
strapi: import("@strapi/types/dist/core").Strapi;
|
|
10
|
+
}) => void;
|
|
11
|
+
config: {
|
|
12
|
+
default: {};
|
|
13
|
+
validator(): void;
|
|
14
|
+
};
|
|
15
|
+
controllers: {
|
|
16
|
+
controller: ({ strapi }: {
|
|
17
|
+
strapi: import("@strapi/types/dist/core").Strapi;
|
|
18
|
+
}) => {
|
|
19
|
+
validateToken(ctx: any): Promise<boolean>;
|
|
20
|
+
getLicense(ctx: any): Promise<void>;
|
|
21
|
+
setLicense(ctx: any): Promise<void>;
|
|
22
|
+
getToken(ctx: any): Promise<void>;
|
|
23
|
+
generateToken(ctx: any): Promise<void>;
|
|
24
|
+
getLanguageOptions(ctx: any): Promise<void>;
|
|
25
|
+
requestTranslation(ctx: any): Promise<void>;
|
|
26
|
+
exportData(ctx: any): Promise<void>;
|
|
27
|
+
importData(ctx: any): Promise<void>;
|
|
28
|
+
ping(ctx: any): Promise<void>;
|
|
29
|
+
getLanguages(ctx: any): Promise<void>;
|
|
30
|
+
getEmail(ctx: any): Promise<void>;
|
|
31
|
+
getEntryData(ctx: any): Promise<any>;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
routes: ({
|
|
35
|
+
method: string;
|
|
36
|
+
path: string;
|
|
37
|
+
handler: string;
|
|
38
|
+
config: {
|
|
39
|
+
policies: any[];
|
|
40
|
+
auth?: undefined;
|
|
41
|
+
};
|
|
42
|
+
} | {
|
|
43
|
+
method: string;
|
|
44
|
+
path: string;
|
|
45
|
+
handler: string;
|
|
46
|
+
config: {
|
|
47
|
+
auth: boolean;
|
|
48
|
+
policies: any[];
|
|
49
|
+
};
|
|
50
|
+
})[];
|
|
51
|
+
services: {
|
|
52
|
+
service: ({ strapi }: {
|
|
53
|
+
strapi: import("@strapi/types/dist/core").Strapi;
|
|
54
|
+
}) => {
|
|
55
|
+
getLicense(): Promise<{
|
|
56
|
+
license: unknown;
|
|
57
|
+
}>;
|
|
58
|
+
setLicense(license: string): Promise<{
|
|
59
|
+
success: boolean;
|
|
60
|
+
}>;
|
|
61
|
+
getToken(): Promise<{
|
|
62
|
+
token: unknown;
|
|
63
|
+
}>;
|
|
64
|
+
generateToken(): Promise<{
|
|
65
|
+
token: any;
|
|
66
|
+
}>;
|
|
67
|
+
getLanguageOptions(): Promise<unknown>;
|
|
68
|
+
exportData(payload: import("../../Types").ExportPayload): Promise<any[]>;
|
|
69
|
+
importData(payload: import("../../Types").ImportPayload): Promise<{
|
|
70
|
+
success: boolean;
|
|
71
|
+
}>;
|
|
72
|
+
requestTranslation(payload: import("../../Types").TranslationRequest): Promise<boolean>;
|
|
73
|
+
getEmail(ctx: any): Promise<{
|
|
74
|
+
email: any;
|
|
75
|
+
}>;
|
|
76
|
+
getLanguages(): Promise<import("../../Types").LocaleMap>;
|
|
77
|
+
ping(): Promise<void>;
|
|
78
|
+
getEntryData(contentTypeID: any, entryID: any, locale: any): Promise<import("@strapi/types/dist/modules/documents").AnyDocument>;
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
contentTypes: {};
|
|
82
|
+
policies: {};
|
|
83
|
+
middlewares: {};
|
|
84
|
+
};
|
|
85
|
+
export default _default;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
declare const _default: ({
|
|
2
|
+
method: string;
|
|
3
|
+
path: string;
|
|
4
|
+
handler: string;
|
|
5
|
+
config: {
|
|
6
|
+
policies: any[];
|
|
7
|
+
auth?: undefined;
|
|
8
|
+
};
|
|
9
|
+
} | {
|
|
10
|
+
method: string;
|
|
11
|
+
path: string;
|
|
12
|
+
handler: string;
|
|
13
|
+
config: {
|
|
14
|
+
auth: boolean;
|
|
15
|
+
policies: any[];
|
|
16
|
+
};
|
|
17
|
+
})[];
|
|
18
|
+
export default _default;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { TranslationstudioTranslatable } from "../../../../../Types";
|
|
2
|
+
declare const processComponent: (fieldName: string, componentName: string, value: any, schemaName: string, componentId?: number) => Promise<TranslationstudioTranslatable[]>;
|
|
3
|
+
export default processComponent;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function handleError(message: string, error: any): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function parseNewValuesIntoStructure(originalStructure: any, newValues: string[]): any;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
service: ({ strapi }: {
|
|
3
|
+
strapi: import("@strapi/types/dist/core").Strapi;
|
|
4
|
+
}) => {
|
|
5
|
+
getLicense(): Promise<{
|
|
6
|
+
license: unknown;
|
|
7
|
+
}>;
|
|
8
|
+
setLicense(license: string): Promise<{
|
|
9
|
+
success: boolean;
|
|
10
|
+
}>;
|
|
11
|
+
getToken(): Promise<{
|
|
12
|
+
token: unknown;
|
|
13
|
+
}>;
|
|
14
|
+
generateToken(): Promise<{
|
|
15
|
+
token: any;
|
|
16
|
+
}>;
|
|
17
|
+
getLanguageOptions(): Promise<unknown>;
|
|
18
|
+
exportData(payload: import("../../../Types").ExportPayload): Promise<any[]>;
|
|
19
|
+
importData(payload: import("../../../Types").ImportPayload): Promise<{
|
|
20
|
+
success: boolean;
|
|
21
|
+
}>;
|
|
22
|
+
requestTranslation(payload: import("../../../Types").TranslationRequest): Promise<boolean>;
|
|
23
|
+
getEmail(ctx: any): Promise<{
|
|
24
|
+
email: any;
|
|
25
|
+
}>;
|
|
26
|
+
getLanguages(): Promise<import("../../../Types").LocaleMap>;
|
|
27
|
+
ping(): Promise<void>;
|
|
28
|
+
getEntryData(contentTypeID: any, entryID: any, locale: any): Promise<import("@strapi/types/dist/modules/documents").AnyDocument>;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
export default _default;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { Core } from "@strapi/strapi";
|
|
2
|
+
import type { ExportPayload, ImportPayload, LocaleMap, TranslationRequest } from "../../../Types";
|
|
3
|
+
declare const service: ({ strapi }: {
|
|
4
|
+
strapi: Core.Strapi;
|
|
5
|
+
}) => {
|
|
6
|
+
getLicense(): Promise<{
|
|
7
|
+
license: unknown;
|
|
8
|
+
}>;
|
|
9
|
+
setLicense(license: string): Promise<{
|
|
10
|
+
success: boolean;
|
|
11
|
+
}>;
|
|
12
|
+
getToken(): Promise<{
|
|
13
|
+
token: unknown;
|
|
14
|
+
}>;
|
|
15
|
+
generateToken(): Promise<{
|
|
16
|
+
token: any;
|
|
17
|
+
}>;
|
|
18
|
+
getLanguageOptions(): Promise<unknown>;
|
|
19
|
+
exportData(payload: ExportPayload): Promise<any[]>;
|
|
20
|
+
importData(payload: ImportPayload): Promise<{
|
|
21
|
+
success: boolean;
|
|
22
|
+
}>;
|
|
23
|
+
requestTranslation(payload: TranslationRequest): Promise<boolean>;
|
|
24
|
+
getEmail(ctx: any): Promise<{
|
|
25
|
+
email: any;
|
|
26
|
+
}>;
|
|
27
|
+
getLanguages(): Promise<LocaleMap>;
|
|
28
|
+
ping(): Promise<void>;
|
|
29
|
+
getEntryData(contentTypeID: any, entryID: any, locale: any): Promise<import("@strapi/types/dist/modules/documents").AnyDocument>;
|
|
30
|
+
};
|
|
31
|
+
export default service;
|
package/package.json
CHANGED