generaltranslation 5.0.0 → 5.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/dist/index.cjs.min.cjs +1 -1
- package/dist/index.cjs.min.cjs.map +1 -1
- package/dist/index.d.ts +12 -4
- package/dist/index.esm.min.mjs +1 -1
- package/dist/index.esm.min.mjs.map +1 -1
- package/dist/settings/defaultURLs.d.ts +6 -0
- package/dist/types.d.ts +8 -4
- package/package.json +1 -1
- /package/dist/settings/{defaultUrls.d.ts → _defaultUrls.d.ts} +0 -0
@@ -0,0 +1,6 @@
|
|
1
|
+
export declare const translateBatchUrl: "/v1/translate/batch";
|
2
|
+
export declare const translateJsxUrl: "/v1/translate/react";
|
3
|
+
export declare const translateContentUrl: "/v1/translate/content";
|
4
|
+
export declare const updateProjectTranslationsUrl: "/v1/project/translations/update";
|
5
|
+
export declare const getProjectLocalesUrl: "/v1/project/locales";
|
6
|
+
export declare const _translateJsxBatchFromClientUrl: "/v1/translate/client/batch";
|
package/dist/types.d.ts
CHANGED
@@ -17,17 +17,20 @@ export type JsxElement = {
|
|
17
17
|
};
|
18
18
|
export type JsxChild = string | JsxElement | Variable;
|
19
19
|
export type JsxChildren = JsxChild | JsxChild[];
|
20
|
+
type Metadata = {
|
21
|
+
[key: string]: any;
|
22
|
+
};
|
20
23
|
export type Update = {
|
21
24
|
type: 'content';
|
22
25
|
data: {
|
23
26
|
source: Content;
|
24
|
-
metadata:
|
27
|
+
metadata: Metadata;
|
25
28
|
};
|
26
29
|
} | {
|
27
30
|
type: 'jsx';
|
28
31
|
data: {
|
29
32
|
source: JsxChildren;
|
30
|
-
metadata:
|
33
|
+
metadata: Metadata;
|
31
34
|
};
|
32
35
|
};
|
33
36
|
export type Request = {
|
@@ -35,14 +38,14 @@ export type Request = {
|
|
35
38
|
data: {
|
36
39
|
source: Content;
|
37
40
|
targetLocale: string;
|
38
|
-
metadata:
|
41
|
+
metadata: Metadata;
|
39
42
|
};
|
40
43
|
} | {
|
41
44
|
type: 'jsx';
|
42
45
|
data: {
|
43
46
|
source: JsxChildren;
|
44
47
|
targetLocale: string;
|
45
|
-
metadata:
|
48
|
+
metadata: Metadata;
|
46
49
|
};
|
47
50
|
};
|
48
51
|
export type ContentTranslationResult = {
|
@@ -65,3 +68,4 @@ export type TranslationError = {
|
|
65
68
|
error: string;
|
66
69
|
code: number;
|
67
70
|
};
|
71
|
+
export {};
|
package/package.json
CHANGED
File without changes
|