@lokalise/polyglot-sdk 4.3.0 → 4.4.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.
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import type { CommonErrorType, ContentUnitTranslationResponse } from './responses';
|
|
2
2
|
export type TranslateAsyncCallbackRequestBody = {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
data: {
|
|
4
|
+
originCorrelationId: string;
|
|
5
|
+
sourceLocale: string;
|
|
6
|
+
targetLocale: string;
|
|
7
|
+
contentUnits: ContentUnitTranslationResponse[];
|
|
8
|
+
errors: CommonErrorType[];
|
|
9
|
+
};
|
|
8
10
|
};
|
|
@@ -25,7 +25,7 @@ export type TranslateSyncContentUnits = {
|
|
|
25
25
|
};
|
|
26
26
|
export type LqaSyncRequest = {
|
|
27
27
|
sourceLocale: string;
|
|
28
|
-
assets?:
|
|
28
|
+
assets?: PolyglotAssetsRequest;
|
|
29
29
|
contentUnits: LqaContentUnit[];
|
|
30
30
|
integration?: AiIntegrationKind;
|
|
31
31
|
};
|
|
@@ -63,15 +63,18 @@ export type GenerateVariantsRequest = {
|
|
|
63
63
|
};
|
|
64
64
|
export type IntegrationKind = 'Fake' | 'Claude' | 'ChatGPT-4' | 'DeepL' | 'GoogleTranslate';
|
|
65
65
|
export type AiIntegrationKind = 'Claude' | 'ChatGPT-4';
|
|
66
|
-
export type
|
|
66
|
+
export type StructuredStyleGuide = {
|
|
67
67
|
targetAudience: string;
|
|
68
68
|
toneOfVoice: string;
|
|
69
69
|
levelOfFormality: string;
|
|
70
70
|
generalRule: string;
|
|
71
71
|
};
|
|
72
|
+
export type FreeformStyleGuide = {
|
|
73
|
+
text: string;
|
|
74
|
+
};
|
|
72
75
|
export type PolyglotAssetsRequest = {
|
|
73
76
|
description?: string;
|
|
74
|
-
styleGuide?:
|
|
77
|
+
styleGuide?: StructuredStyleGuide | FreeformStyleGuide;
|
|
75
78
|
glossary?: PolyglotGlossaryTermRequest[];
|
|
76
79
|
};
|
|
77
80
|
export type PolyglotGlossaryTermRequest = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lokalise/polyglot-sdk",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.4.0",
|
|
4
4
|
"author": {
|
|
5
5
|
"name": "Lokalise",
|
|
6
6
|
"url": "https://lokalise.com/"
|
|
@@ -34,15 +34,15 @@
|
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@amplitude/analytics-types": "^2.5.0",
|
|
36
36
|
"@lokalise/fastify-extras": "^18.0.0",
|
|
37
|
-
"@lokalise/id-utils": "^
|
|
37
|
+
"@lokalise/id-utils": "^2.0.0",
|
|
38
38
|
"@lokalise/node-core": "^9.16.0",
|
|
39
39
|
"@lokalise/zod-extras": "^2.0.1",
|
|
40
|
-
"undici": "^6.
|
|
40
|
+
"undici": "^6.16.1",
|
|
41
41
|
"undici-retry": "^5.0.2",
|
|
42
42
|
"zod": "^3.23.4"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@types/node": "^20.12.
|
|
45
|
+
"@types/node": "^20.12.11",
|
|
46
46
|
"@typescript-eslint/eslint-plugin": "^7.4.0",
|
|
47
47
|
"@typescript-eslint/parser": "^7.4.0",
|
|
48
48
|
"@vitest/coverage-v8": "^0.34.6",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"eslint": "^8.57.0",
|
|
51
51
|
"eslint-plugin-import": "^2.29.1",
|
|
52
52
|
"eslint-plugin-vitest": "^0.4.1",
|
|
53
|
-
"mockttp": "^3.
|
|
53
|
+
"mockttp": "^3.11.0",
|
|
54
54
|
"prettier": "^3.2.5",
|
|
55
55
|
"shx": "^0.3.4",
|
|
56
56
|
"ts-deepmerge": "^7.0.0",
|