@lokalise/polyglot-sdk 10.0.0 → 10.1.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.
- package/dist/index.d.ts +4 -4
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/sdk/errors/PolyglotError.d.ts +1 -1
- package/dist/sdk/schemas/lqa/lqaAsyncV1Schemas.d.ts +200 -0
- package/dist/sdk/schemas/lqa/lqaSyncV2Schemas.d.ts +200 -0
- package/dist/sdk/schemas/translation/translateAsyncV2Schemas.d.ts +2 -0
- package/dist/sdk/schemas/translation/translateSyncV2Schemas.d.ts +2 -0
- package/package.json +7 -7
package/dist/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export * from './sdk/schemas/lqa/lqaAsyncV1Schemas';
|
|
|
9
9
|
export * from './sdk/schemas/lqa/lqaSyncV2Schemas';
|
|
10
10
|
export * from './sdk/schemas/scoring/scoreV1Schemas';
|
|
11
11
|
export * from './sdk/schemas/translation/generateVariantsV1';
|
|
12
|
-
export { TRANSLATE_SYNC_V2_BODY_SCHEMA, TRANSLATE_SYNC_V2_HEADERS_SCHEMA, TRANSLATE_SYNC_V2_RESPONSE_SCHEMA, } from './sdk/schemas/translation/translateSyncV2Schemas';
|
|
13
|
-
export type { TranslateSyncV2Body, TranslateSyncV2Headers, TranslateSyncV2Response, } from './sdk/schemas/translation/translateSyncV2Schemas';
|
|
14
|
-
export { TRANSLATE_ASYNC_V2_BODY_SCHEMA, TRANSLATE_ASYNC_V2_HEADERS_SCHEMA, TRANSLATE_ASYNC_V2_RESPONSE_SCHEMA, TRANSLATE_ASYNC_V2_CALLBACK_SCHEMA, } from './sdk/schemas/translation/translateAsyncV2Schemas';
|
|
15
|
-
export type { TranslateAsyncV2Body, TranslateAsyncV2Headers, TranslateAsyncV2Response, TranslateAsyncV2Callback, } from './sdk/schemas/translation/translateAsyncV2Schemas';
|
|
12
|
+
export { TRANSLATE_SYNC_V2_BODY_SCHEMA, TRANSLATE_SYNC_V2_HEADERS_SCHEMA, TRANSLATE_SYNC_V2_RESPONSE_SCHEMA, TRANSLATE_SYNC_V2_CONTENT_UNIT_SCHEMA, TRANSLATE_SYNC_V2_SEGMENT_SCHEMA, } from './sdk/schemas/translation/translateSyncV2Schemas';
|
|
13
|
+
export type { TranslateSyncV2Body, TranslateSyncV2Headers, TranslateSyncV2Response, TranslateSyncV2ContentUnit, TranslateSyncV2Segment, } from './sdk/schemas/translation/translateSyncV2Schemas';
|
|
14
|
+
export { TRANSLATE_ASYNC_V2_BODY_SCHEMA, TRANSLATE_ASYNC_V2_HEADERS_SCHEMA, TRANSLATE_ASYNC_V2_RESPONSE_SCHEMA, TRANSLATE_ASYNC_V2_CALLBACK_SCHEMA, TRANSLATE_ASYNC_V2_CONTENT_UNIT_SCHEMA, TRANSLATE_ASYNC_V2_SEGMENT_SCHEMA, } from './sdk/schemas/translation/translateAsyncV2Schemas';
|
|
15
|
+
export type { TranslateAsyncV2Body, TranslateAsyncV2Headers, TranslateAsyncV2Response, TranslateAsyncV2Callback, TranslateAsyncV2ContentUnit, TranslateAsyncV2Segment, } from './sdk/schemas/translation/translateAsyncV2Schemas';
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TRANSLATE_ASYNC_V2_CALLBACK_SCHEMA = exports.TRANSLATE_ASYNC_V2_RESPONSE_SCHEMA = exports.TRANSLATE_ASYNC_V2_HEADERS_SCHEMA = exports.TRANSLATE_ASYNC_V2_BODY_SCHEMA = exports.TRANSLATE_SYNC_V2_RESPONSE_SCHEMA = exports.TRANSLATE_SYNC_V2_HEADERS_SCHEMA = exports.TRANSLATE_SYNC_V2_BODY_SCHEMA = exports.LqaIssueSeverityEnum = exports.LqaIssueCategoryEnum = exports.isStructuredStyleGuide = exports.TRANSLATION_CONTEXT_SCHEMA = exports.IntegrationEngineEnum = exports.RealIntegrationEngineEnum = exports.MtIntegrationEngineEnum = exports.AiIntegrationEngineEnum = exports.PolyglotError = exports.PolyglotClient = void 0;
|
|
3
|
+
exports.TRANSLATE_ASYNC_V2_SEGMENT_SCHEMA = exports.TRANSLATE_ASYNC_V2_CONTENT_UNIT_SCHEMA = exports.TRANSLATE_ASYNC_V2_CALLBACK_SCHEMA = exports.TRANSLATE_ASYNC_V2_RESPONSE_SCHEMA = exports.TRANSLATE_ASYNC_V2_HEADERS_SCHEMA = exports.TRANSLATE_ASYNC_V2_BODY_SCHEMA = exports.TRANSLATE_SYNC_V2_SEGMENT_SCHEMA = exports.TRANSLATE_SYNC_V2_CONTENT_UNIT_SCHEMA = exports.TRANSLATE_SYNC_V2_RESPONSE_SCHEMA = exports.TRANSLATE_SYNC_V2_HEADERS_SCHEMA = exports.TRANSLATE_SYNC_V2_BODY_SCHEMA = exports.LqaIssueSeverityEnum = exports.LqaIssueCategoryEnum = exports.isStructuredStyleGuide = exports.TRANSLATION_CONTEXT_SCHEMA = exports.IntegrationEngineEnum = exports.RealIntegrationEngineEnum = exports.MtIntegrationEngineEnum = exports.AiIntegrationEngineEnum = exports.PolyglotError = exports.PolyglotClient = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
var PolyglotClient_1 = require("./sdk/PolyglotClient");
|
|
6
6
|
Object.defineProperty(exports, "PolyglotClient", { enumerable: true, get: function () { return PolyglotClient_1.PolyglotClient; } });
|
|
@@ -25,9 +25,13 @@ var translateSyncV2Schemas_1 = require("./sdk/schemas/translation/translateSyncV
|
|
|
25
25
|
Object.defineProperty(exports, "TRANSLATE_SYNC_V2_BODY_SCHEMA", { enumerable: true, get: function () { return translateSyncV2Schemas_1.TRANSLATE_SYNC_V2_BODY_SCHEMA; } });
|
|
26
26
|
Object.defineProperty(exports, "TRANSLATE_SYNC_V2_HEADERS_SCHEMA", { enumerable: true, get: function () { return translateSyncV2Schemas_1.TRANSLATE_SYNC_V2_HEADERS_SCHEMA; } });
|
|
27
27
|
Object.defineProperty(exports, "TRANSLATE_SYNC_V2_RESPONSE_SCHEMA", { enumerable: true, get: function () { return translateSyncV2Schemas_1.TRANSLATE_SYNC_V2_RESPONSE_SCHEMA; } });
|
|
28
|
+
Object.defineProperty(exports, "TRANSLATE_SYNC_V2_CONTENT_UNIT_SCHEMA", { enumerable: true, get: function () { return translateSyncV2Schemas_1.TRANSLATE_SYNC_V2_CONTENT_UNIT_SCHEMA; } });
|
|
29
|
+
Object.defineProperty(exports, "TRANSLATE_SYNC_V2_SEGMENT_SCHEMA", { enumerable: true, get: function () { return translateSyncV2Schemas_1.TRANSLATE_SYNC_V2_SEGMENT_SCHEMA; } });
|
|
28
30
|
var translateAsyncV2Schemas_1 = require("./sdk/schemas/translation/translateAsyncV2Schemas");
|
|
29
31
|
Object.defineProperty(exports, "TRANSLATE_ASYNC_V2_BODY_SCHEMA", { enumerable: true, get: function () { return translateAsyncV2Schemas_1.TRANSLATE_ASYNC_V2_BODY_SCHEMA; } });
|
|
30
32
|
Object.defineProperty(exports, "TRANSLATE_ASYNC_V2_HEADERS_SCHEMA", { enumerable: true, get: function () { return translateAsyncV2Schemas_1.TRANSLATE_ASYNC_V2_HEADERS_SCHEMA; } });
|
|
31
33
|
Object.defineProperty(exports, "TRANSLATE_ASYNC_V2_RESPONSE_SCHEMA", { enumerable: true, get: function () { return translateAsyncV2Schemas_1.TRANSLATE_ASYNC_V2_RESPONSE_SCHEMA; } });
|
|
32
34
|
Object.defineProperty(exports, "TRANSLATE_ASYNC_V2_CALLBACK_SCHEMA", { enumerable: true, get: function () { return translateAsyncV2Schemas_1.TRANSLATE_ASYNC_V2_CALLBACK_SCHEMA; } });
|
|
35
|
+
Object.defineProperty(exports, "TRANSLATE_ASYNC_V2_CONTENT_UNIT_SCHEMA", { enumerable: true, get: function () { return translateAsyncV2Schemas_1.TRANSLATE_ASYNC_V2_CONTENT_UNIT_SCHEMA; } });
|
|
36
|
+
Object.defineProperty(exports, "TRANSLATE_ASYNC_V2_SEGMENT_SCHEMA", { enumerable: true, get: function () { return translateAsyncV2Schemas_1.TRANSLATE_ASYNC_V2_SEGMENT_SCHEMA; } });
|
|
33
37
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;AAAA,uDAAqD;AAA5C,gHAAA,cAAc,OAAA;AACvB,4DAA0D;AAAjD,8GAAA,aAAa,OAAA;AAGtB,oEAK2C;AAJzC,wHAAA,uBAAuB,OAAA;AACvB,wHAAA,uBAAuB,OAAA;AACvB,0HAAA,yBAAyB,OAAA;AACzB,sHAAA,qBAAqB,OAAA;AAEvB,4FAGuD;AAFrD,uIAAA,0BAA0B,OAAA;AAC1B,mIAAA,sBAAsB,OAAA;AASxB,iEAA4F;AAAnF,qHAAA,oBAAoB,OAAA;AAAE,qHAAA,oBAAoB,OAAA;AACnD,8EAAmD;AACnD,6EAAkD;AAClD,+EAAoD;AACpD,uFAA4D;AAE5D,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;AAAA,uDAAqD;AAA5C,gHAAA,cAAc,OAAA;AACvB,4DAA0D;AAAjD,8GAAA,aAAa,OAAA;AAGtB,oEAK2C;AAJzC,wHAAA,uBAAuB,OAAA;AACvB,wHAAA,uBAAuB,OAAA;AACvB,0HAAA,yBAAyB,OAAA;AACzB,sHAAA,qBAAqB,OAAA;AAEvB,4FAGuD;AAFrD,uIAAA,0BAA0B,OAAA;AAC1B,mIAAA,sBAAsB,OAAA;AASxB,iEAA4F;AAAnF,qHAAA,oBAAoB,OAAA;AAAE,qHAAA,oBAAoB,OAAA;AACnD,8EAAmD;AACnD,6EAAkD;AAClD,+EAAoD;AACpD,uFAA4D;AAE5D,2FAMyD;AALvD,uIAAA,6BAA6B,OAAA;AAC7B,0IAAA,gCAAgC,OAAA;AAChC,2IAAA,iCAAiC,OAAA;AACjC,+IAAA,qCAAqC,OAAA;AACrC,0IAAA,gCAAgC,OAAA;AAUlC,6FAO0D;AANxD,yIAAA,8BAA8B,OAAA;AAC9B,4IAAA,iCAAiC,OAAA;AACjC,6IAAA,kCAAkC,OAAA;AAClC,6IAAA,kCAAkC,OAAA;AAClC,iJAAA,sCAAsC,OAAA;AACtC,4IAAA,iCAAiC,OAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ResponseStatusError } from '@lokalise/
|
|
1
|
+
import type { ResponseStatusError } from '@lokalise/backend-http-client';
|
|
2
2
|
import { InternalError } from '@lokalise/node-core';
|
|
3
3
|
export declare class PolyglotError extends InternalError {
|
|
4
4
|
constructor(error: ResponseStatusError);
|
|
@@ -1,4 +1,201 @@
|
|
|
1
1
|
import z from 'zod';
|
|
2
|
+
declare const LQA_SEGMENT_SCHEMA: z.ZodObject<{
|
|
3
|
+
sourceValue: z.ZodString;
|
|
4
|
+
translations: z.ZodArray<z.ZodObject<{
|
|
5
|
+
id: z.ZodString;
|
|
6
|
+
locale: z.ZodEffects<z.ZodString, string, string>;
|
|
7
|
+
value: z.ZodString;
|
|
8
|
+
}, "strip", z.ZodTypeAny, {
|
|
9
|
+
value: string;
|
|
10
|
+
locale: string;
|
|
11
|
+
id: string;
|
|
12
|
+
}, {
|
|
13
|
+
value: string;
|
|
14
|
+
locale: string;
|
|
15
|
+
id: string;
|
|
16
|
+
}>, "atleastone">;
|
|
17
|
+
tmMatch: z.ZodOptional<z.ZodObject<{
|
|
18
|
+
sourceValue: z.ZodString;
|
|
19
|
+
translatedValue: z.ZodString;
|
|
20
|
+
}, "strip", z.ZodTypeAny, {
|
|
21
|
+
sourceValue: string;
|
|
22
|
+
translatedValue: string;
|
|
23
|
+
}, {
|
|
24
|
+
sourceValue: string;
|
|
25
|
+
translatedValue: string;
|
|
26
|
+
}>>;
|
|
27
|
+
}, "strip", z.ZodTypeAny, {
|
|
28
|
+
sourceValue: string;
|
|
29
|
+
translations: [{
|
|
30
|
+
value: string;
|
|
31
|
+
locale: string;
|
|
32
|
+
id: string;
|
|
33
|
+
}, ...{
|
|
34
|
+
value: string;
|
|
35
|
+
locale: string;
|
|
36
|
+
id: string;
|
|
37
|
+
}[]];
|
|
38
|
+
tmMatch?: {
|
|
39
|
+
sourceValue: string;
|
|
40
|
+
translatedValue: string;
|
|
41
|
+
} | undefined;
|
|
42
|
+
}, {
|
|
43
|
+
sourceValue: string;
|
|
44
|
+
translations: [{
|
|
45
|
+
value: string;
|
|
46
|
+
locale: string;
|
|
47
|
+
id: string;
|
|
48
|
+
}, ...{
|
|
49
|
+
value: string;
|
|
50
|
+
locale: string;
|
|
51
|
+
id: string;
|
|
52
|
+
}[]];
|
|
53
|
+
tmMatch?: {
|
|
54
|
+
sourceValue: string;
|
|
55
|
+
translatedValue: string;
|
|
56
|
+
} | undefined;
|
|
57
|
+
}>;
|
|
58
|
+
declare const LQA_CONTENT_UNIT_SCHEMA: z.ZodObject<{
|
|
59
|
+
id: z.ZodString;
|
|
60
|
+
context: z.ZodOptional<z.ZodObject<{
|
|
61
|
+
description: z.ZodOptional<z.ZodString>;
|
|
62
|
+
}, "strip", z.ZodTypeAny, {
|
|
63
|
+
description?: string | undefined;
|
|
64
|
+
}, {
|
|
65
|
+
description?: string | undefined;
|
|
66
|
+
}>>;
|
|
67
|
+
segments: z.ZodArray<z.ZodObject<{
|
|
68
|
+
sourceValue: z.ZodString;
|
|
69
|
+
translations: z.ZodArray<z.ZodObject<{
|
|
70
|
+
id: z.ZodString;
|
|
71
|
+
locale: z.ZodEffects<z.ZodString, string, string>;
|
|
72
|
+
value: z.ZodString;
|
|
73
|
+
}, "strip", z.ZodTypeAny, {
|
|
74
|
+
value: string;
|
|
75
|
+
locale: string;
|
|
76
|
+
id: string;
|
|
77
|
+
}, {
|
|
78
|
+
value: string;
|
|
79
|
+
locale: string;
|
|
80
|
+
id: string;
|
|
81
|
+
}>, "atleastone">;
|
|
82
|
+
tmMatch: z.ZodOptional<z.ZodObject<{
|
|
83
|
+
sourceValue: z.ZodString;
|
|
84
|
+
translatedValue: z.ZodString;
|
|
85
|
+
}, "strip", z.ZodTypeAny, {
|
|
86
|
+
sourceValue: string;
|
|
87
|
+
translatedValue: string;
|
|
88
|
+
}, {
|
|
89
|
+
sourceValue: string;
|
|
90
|
+
translatedValue: string;
|
|
91
|
+
}>>;
|
|
92
|
+
}, "strip", z.ZodTypeAny, {
|
|
93
|
+
sourceValue: string;
|
|
94
|
+
translations: [{
|
|
95
|
+
value: string;
|
|
96
|
+
locale: string;
|
|
97
|
+
id: string;
|
|
98
|
+
}, ...{
|
|
99
|
+
value: string;
|
|
100
|
+
locale: string;
|
|
101
|
+
id: string;
|
|
102
|
+
}[]];
|
|
103
|
+
tmMatch?: {
|
|
104
|
+
sourceValue: string;
|
|
105
|
+
translatedValue: string;
|
|
106
|
+
} | undefined;
|
|
107
|
+
}, {
|
|
108
|
+
sourceValue: string;
|
|
109
|
+
translations: [{
|
|
110
|
+
value: string;
|
|
111
|
+
locale: string;
|
|
112
|
+
id: string;
|
|
113
|
+
}, ...{
|
|
114
|
+
value: string;
|
|
115
|
+
locale: string;
|
|
116
|
+
id: string;
|
|
117
|
+
}[]];
|
|
118
|
+
tmMatch?: {
|
|
119
|
+
sourceValue: string;
|
|
120
|
+
translatedValue: string;
|
|
121
|
+
} | undefined;
|
|
122
|
+
}>, "atleastone">;
|
|
123
|
+
characterLimit: z.ZodOptional<z.ZodNumber>;
|
|
124
|
+
}, "strip", z.ZodTypeAny, {
|
|
125
|
+
id: string;
|
|
126
|
+
segments: [{
|
|
127
|
+
sourceValue: string;
|
|
128
|
+
translations: [{
|
|
129
|
+
value: string;
|
|
130
|
+
locale: string;
|
|
131
|
+
id: string;
|
|
132
|
+
}, ...{
|
|
133
|
+
value: string;
|
|
134
|
+
locale: string;
|
|
135
|
+
id: string;
|
|
136
|
+
}[]];
|
|
137
|
+
tmMatch?: {
|
|
138
|
+
sourceValue: string;
|
|
139
|
+
translatedValue: string;
|
|
140
|
+
} | undefined;
|
|
141
|
+
}, ...{
|
|
142
|
+
sourceValue: string;
|
|
143
|
+
translations: [{
|
|
144
|
+
value: string;
|
|
145
|
+
locale: string;
|
|
146
|
+
id: string;
|
|
147
|
+
}, ...{
|
|
148
|
+
value: string;
|
|
149
|
+
locale: string;
|
|
150
|
+
id: string;
|
|
151
|
+
}[]];
|
|
152
|
+
tmMatch?: {
|
|
153
|
+
sourceValue: string;
|
|
154
|
+
translatedValue: string;
|
|
155
|
+
} | undefined;
|
|
156
|
+
}[]];
|
|
157
|
+
context?: {
|
|
158
|
+
description?: string | undefined;
|
|
159
|
+
} | undefined;
|
|
160
|
+
characterLimit?: number | undefined;
|
|
161
|
+
}, {
|
|
162
|
+
id: string;
|
|
163
|
+
segments: [{
|
|
164
|
+
sourceValue: string;
|
|
165
|
+
translations: [{
|
|
166
|
+
value: string;
|
|
167
|
+
locale: string;
|
|
168
|
+
id: string;
|
|
169
|
+
}, ...{
|
|
170
|
+
value: string;
|
|
171
|
+
locale: string;
|
|
172
|
+
id: string;
|
|
173
|
+
}[]];
|
|
174
|
+
tmMatch?: {
|
|
175
|
+
sourceValue: string;
|
|
176
|
+
translatedValue: string;
|
|
177
|
+
} | undefined;
|
|
178
|
+
}, ...{
|
|
179
|
+
sourceValue: string;
|
|
180
|
+
translations: [{
|
|
181
|
+
value: string;
|
|
182
|
+
locale: string;
|
|
183
|
+
id: string;
|
|
184
|
+
}, ...{
|
|
185
|
+
value: string;
|
|
186
|
+
locale: string;
|
|
187
|
+
id: string;
|
|
188
|
+
}[]];
|
|
189
|
+
tmMatch?: {
|
|
190
|
+
sourceValue: string;
|
|
191
|
+
translatedValue: string;
|
|
192
|
+
} | undefined;
|
|
193
|
+
}[]];
|
|
194
|
+
context?: {
|
|
195
|
+
description?: string | undefined;
|
|
196
|
+
} | undefined;
|
|
197
|
+
characterLimit?: number | undefined;
|
|
198
|
+
}>;
|
|
2
199
|
export declare const LQA_ASYNC_V1_BODY_SCHEMA: z.ZodObject<z.objectUtil.extendShape<{
|
|
3
200
|
originCorrelationId: z.ZodString;
|
|
4
201
|
ownerId: z.ZodString;
|
|
@@ -644,3 +841,6 @@ export type LqaAsyncV1Body = z.infer<typeof LQA_ASYNC_V1_BODY_SCHEMA>;
|
|
|
644
841
|
export type LqaAsyncV1Headers = z.infer<typeof LQA_ASYNC_V1_HEADERS_SCHEMA>;
|
|
645
842
|
export type LqaAsyncV1Response = z.infer<typeof LQA_ASYNC_V1_RESPONSE_SCHEMA>;
|
|
646
843
|
export type LqaAsyncV1CallbackBody = z.infer<typeof LQA_ASYNC_V1_CALLBACK_SCHEMA>;
|
|
844
|
+
export type LqaAsyncV1ContentUnit = z.infer<typeof LQA_CONTENT_UNIT_SCHEMA>;
|
|
845
|
+
export type LqaAsyncV1Segment = z.infer<typeof LQA_SEGMENT_SCHEMA>;
|
|
846
|
+
export {};
|
|
@@ -1,4 +1,201 @@
|
|
|
1
1
|
import z from 'zod';
|
|
2
|
+
declare const SEGMENT_SCHEMA: z.ZodObject<{
|
|
3
|
+
sourceValue: z.ZodString;
|
|
4
|
+
translations: z.ZodArray<z.ZodObject<{
|
|
5
|
+
id: z.ZodString;
|
|
6
|
+
locale: z.ZodEffects<z.ZodString, string, string>;
|
|
7
|
+
value: z.ZodString;
|
|
8
|
+
}, "strip", z.ZodTypeAny, {
|
|
9
|
+
value: string;
|
|
10
|
+
locale: string;
|
|
11
|
+
id: string;
|
|
12
|
+
}, {
|
|
13
|
+
value: string;
|
|
14
|
+
locale: string;
|
|
15
|
+
id: string;
|
|
16
|
+
}>, "atleastone">;
|
|
17
|
+
tmMatch: z.ZodOptional<z.ZodObject<{
|
|
18
|
+
sourceValue: z.ZodString;
|
|
19
|
+
translatedValue: z.ZodString;
|
|
20
|
+
}, "strip", z.ZodTypeAny, {
|
|
21
|
+
sourceValue: string;
|
|
22
|
+
translatedValue: string;
|
|
23
|
+
}, {
|
|
24
|
+
sourceValue: string;
|
|
25
|
+
translatedValue: string;
|
|
26
|
+
}>>;
|
|
27
|
+
}, "strip", z.ZodTypeAny, {
|
|
28
|
+
sourceValue: string;
|
|
29
|
+
translations: [{
|
|
30
|
+
value: string;
|
|
31
|
+
locale: string;
|
|
32
|
+
id: string;
|
|
33
|
+
}, ...{
|
|
34
|
+
value: string;
|
|
35
|
+
locale: string;
|
|
36
|
+
id: string;
|
|
37
|
+
}[]];
|
|
38
|
+
tmMatch?: {
|
|
39
|
+
sourceValue: string;
|
|
40
|
+
translatedValue: string;
|
|
41
|
+
} | undefined;
|
|
42
|
+
}, {
|
|
43
|
+
sourceValue: string;
|
|
44
|
+
translations: [{
|
|
45
|
+
value: string;
|
|
46
|
+
locale: string;
|
|
47
|
+
id: string;
|
|
48
|
+
}, ...{
|
|
49
|
+
value: string;
|
|
50
|
+
locale: string;
|
|
51
|
+
id: string;
|
|
52
|
+
}[]];
|
|
53
|
+
tmMatch?: {
|
|
54
|
+
sourceValue: string;
|
|
55
|
+
translatedValue: string;
|
|
56
|
+
} | undefined;
|
|
57
|
+
}>;
|
|
58
|
+
declare const CONTENT_UNIT_SCHEMA: z.ZodObject<{
|
|
59
|
+
id: z.ZodString;
|
|
60
|
+
context: z.ZodOptional<z.ZodObject<{
|
|
61
|
+
description: z.ZodOptional<z.ZodString>;
|
|
62
|
+
}, "strip", z.ZodTypeAny, {
|
|
63
|
+
description?: string | undefined;
|
|
64
|
+
}, {
|
|
65
|
+
description?: string | undefined;
|
|
66
|
+
}>>;
|
|
67
|
+
characterLimit: z.ZodOptional<z.ZodNumber>;
|
|
68
|
+
segments: z.ZodArray<z.ZodObject<{
|
|
69
|
+
sourceValue: z.ZodString;
|
|
70
|
+
translations: z.ZodArray<z.ZodObject<{
|
|
71
|
+
id: z.ZodString;
|
|
72
|
+
locale: z.ZodEffects<z.ZodString, string, string>;
|
|
73
|
+
value: z.ZodString;
|
|
74
|
+
}, "strip", z.ZodTypeAny, {
|
|
75
|
+
value: string;
|
|
76
|
+
locale: string;
|
|
77
|
+
id: string;
|
|
78
|
+
}, {
|
|
79
|
+
value: string;
|
|
80
|
+
locale: string;
|
|
81
|
+
id: string;
|
|
82
|
+
}>, "atleastone">;
|
|
83
|
+
tmMatch: z.ZodOptional<z.ZodObject<{
|
|
84
|
+
sourceValue: z.ZodString;
|
|
85
|
+
translatedValue: z.ZodString;
|
|
86
|
+
}, "strip", z.ZodTypeAny, {
|
|
87
|
+
sourceValue: string;
|
|
88
|
+
translatedValue: string;
|
|
89
|
+
}, {
|
|
90
|
+
sourceValue: string;
|
|
91
|
+
translatedValue: string;
|
|
92
|
+
}>>;
|
|
93
|
+
}, "strip", z.ZodTypeAny, {
|
|
94
|
+
sourceValue: string;
|
|
95
|
+
translations: [{
|
|
96
|
+
value: string;
|
|
97
|
+
locale: string;
|
|
98
|
+
id: string;
|
|
99
|
+
}, ...{
|
|
100
|
+
value: string;
|
|
101
|
+
locale: string;
|
|
102
|
+
id: string;
|
|
103
|
+
}[]];
|
|
104
|
+
tmMatch?: {
|
|
105
|
+
sourceValue: string;
|
|
106
|
+
translatedValue: string;
|
|
107
|
+
} | undefined;
|
|
108
|
+
}, {
|
|
109
|
+
sourceValue: string;
|
|
110
|
+
translations: [{
|
|
111
|
+
value: string;
|
|
112
|
+
locale: string;
|
|
113
|
+
id: string;
|
|
114
|
+
}, ...{
|
|
115
|
+
value: string;
|
|
116
|
+
locale: string;
|
|
117
|
+
id: string;
|
|
118
|
+
}[]];
|
|
119
|
+
tmMatch?: {
|
|
120
|
+
sourceValue: string;
|
|
121
|
+
translatedValue: string;
|
|
122
|
+
} | undefined;
|
|
123
|
+
}>, "atleastone">;
|
|
124
|
+
}, "strip", z.ZodTypeAny, {
|
|
125
|
+
id: string;
|
|
126
|
+
segments: [{
|
|
127
|
+
sourceValue: string;
|
|
128
|
+
translations: [{
|
|
129
|
+
value: string;
|
|
130
|
+
locale: string;
|
|
131
|
+
id: string;
|
|
132
|
+
}, ...{
|
|
133
|
+
value: string;
|
|
134
|
+
locale: string;
|
|
135
|
+
id: string;
|
|
136
|
+
}[]];
|
|
137
|
+
tmMatch?: {
|
|
138
|
+
sourceValue: string;
|
|
139
|
+
translatedValue: string;
|
|
140
|
+
} | undefined;
|
|
141
|
+
}, ...{
|
|
142
|
+
sourceValue: string;
|
|
143
|
+
translations: [{
|
|
144
|
+
value: string;
|
|
145
|
+
locale: string;
|
|
146
|
+
id: string;
|
|
147
|
+
}, ...{
|
|
148
|
+
value: string;
|
|
149
|
+
locale: string;
|
|
150
|
+
id: string;
|
|
151
|
+
}[]];
|
|
152
|
+
tmMatch?: {
|
|
153
|
+
sourceValue: string;
|
|
154
|
+
translatedValue: string;
|
|
155
|
+
} | undefined;
|
|
156
|
+
}[]];
|
|
157
|
+
context?: {
|
|
158
|
+
description?: string | undefined;
|
|
159
|
+
} | undefined;
|
|
160
|
+
characterLimit?: number | undefined;
|
|
161
|
+
}, {
|
|
162
|
+
id: string;
|
|
163
|
+
segments: [{
|
|
164
|
+
sourceValue: string;
|
|
165
|
+
translations: [{
|
|
166
|
+
value: string;
|
|
167
|
+
locale: string;
|
|
168
|
+
id: string;
|
|
169
|
+
}, ...{
|
|
170
|
+
value: string;
|
|
171
|
+
locale: string;
|
|
172
|
+
id: string;
|
|
173
|
+
}[]];
|
|
174
|
+
tmMatch?: {
|
|
175
|
+
sourceValue: string;
|
|
176
|
+
translatedValue: string;
|
|
177
|
+
} | undefined;
|
|
178
|
+
}, ...{
|
|
179
|
+
sourceValue: string;
|
|
180
|
+
translations: [{
|
|
181
|
+
value: string;
|
|
182
|
+
locale: string;
|
|
183
|
+
id: string;
|
|
184
|
+
}, ...{
|
|
185
|
+
value: string;
|
|
186
|
+
locale: string;
|
|
187
|
+
id: string;
|
|
188
|
+
}[]];
|
|
189
|
+
tmMatch?: {
|
|
190
|
+
sourceValue: string;
|
|
191
|
+
translatedValue: string;
|
|
192
|
+
} | undefined;
|
|
193
|
+
}[]];
|
|
194
|
+
context?: {
|
|
195
|
+
description?: string | undefined;
|
|
196
|
+
} | undefined;
|
|
197
|
+
characterLimit?: number | undefined;
|
|
198
|
+
}>;
|
|
2
199
|
export declare const LQA_SYNC_V2_BODY_SCHEMA: z.ZodObject<{
|
|
3
200
|
sourceLocale: z.ZodEffects<z.ZodString, string, string>;
|
|
4
201
|
context: z.ZodOptional<z.ZodObject<{
|
|
@@ -617,3 +814,6 @@ export declare const LQA_SYNC_V2_RESPONSE_SCHEMA: z.ZodObject<{
|
|
|
617
814
|
export type LqaSyncV2Body = z.infer<typeof LQA_SYNC_V2_BODY_SCHEMA>;
|
|
618
815
|
export type LqaSyncV2Headers = z.infer<typeof LQA_SYNC_V2_HEADERS_SCHEMA>;
|
|
619
816
|
export type LqaSyncV2Response = z.infer<typeof LQA_SYNC_V2_RESPONSE_SCHEMA>;
|
|
817
|
+
export type LqaSyncV2ContentUnit = z.infer<typeof CONTENT_UNIT_SCHEMA>;
|
|
818
|
+
export type LqaSyncV2Segment = z.infer<typeof SEGMENT_SCHEMA>;
|
|
819
|
+
export {};
|
|
@@ -1057,3 +1057,5 @@ export type TranslateAsyncV2Body = z.infer<typeof TRANSLATE_ASYNC_V2_BODY_SCHEMA
|
|
|
1057
1057
|
export type TranslateAsyncV2Headers = z.infer<typeof TRANSLATE_ASYNC_V2_HEADERS_SCHEMA>;
|
|
1058
1058
|
export type TranslateAsyncV2Response = z.infer<typeof TRANSLATE_ASYNC_V2_RESPONSE_SCHEMA>;
|
|
1059
1059
|
export type TranslateAsyncV2Callback = z.infer<typeof TRANSLATE_ASYNC_V2_CALLBACK_SCHEMA>;
|
|
1060
|
+
export type TranslateAsyncV2ContentUnit = z.infer<typeof TRANSLATE_ASYNC_V2_CONTENT_UNIT_SCHEMA>;
|
|
1061
|
+
export type TranslateAsyncV2Segment = z.infer<typeof TRANSLATE_ASYNC_V2_SEGMENT_SCHEMA>;
|
|
@@ -705,3 +705,5 @@ export declare const TRANSLATE_SYNC_V2_RESPONSE_SCHEMA: z.ZodObject<{
|
|
|
705
705
|
export type TranslateSyncV2Body = z.infer<typeof TRANSLATE_SYNC_V2_BODY_SCHEMA>;
|
|
706
706
|
export type TranslateSyncV2Headers = z.infer<typeof TRANSLATE_SYNC_V2_HEADERS_SCHEMA>;
|
|
707
707
|
export type TranslateSyncV2Response = z.infer<typeof TRANSLATE_SYNC_V2_RESPONSE_SCHEMA>;
|
|
708
|
+
export type TranslateSyncV2ContentUnit = z.infer<typeof TRANSLATE_SYNC_V2_CONTENT_UNIT_SCHEMA>;
|
|
709
|
+
export type TranslateSyncV2Segment = z.infer<typeof TRANSLATE_SYNC_V2_SEGMENT_SCHEMA>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lokalise/polyglot-sdk",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.1.0",
|
|
4
4
|
"author": {
|
|
5
5
|
"name": "Lokalise",
|
|
6
6
|
"url": "https://lokalise.com/"
|
|
@@ -36,17 +36,17 @@
|
|
|
36
36
|
"@lokalise/backend-http-client": "^2.0.1",
|
|
37
37
|
"@lokalise/fastify-extras": "^21.4.1",
|
|
38
38
|
"@lokalise/id-utils": "^2.1.0",
|
|
39
|
-
"@lokalise/node-core": "^
|
|
39
|
+
"@lokalise/node-core": "^11.2.0",
|
|
40
40
|
"@lokalise/supported-languages": "^2.0.0",
|
|
41
41
|
"@lokalise/zod-extras": "^2.1.0",
|
|
42
|
-
"undici": "^6.19.
|
|
43
|
-
"undici-retry": "^5.0.
|
|
44
|
-
"zod": "^3.23.
|
|
42
|
+
"undici": "^6.19.4",
|
|
43
|
+
"undici-retry": "^5.0.3",
|
|
44
|
+
"zod": "^3.23.8"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@types/node": "^20.14.11",
|
|
48
|
-
"@typescript-eslint/eslint-plugin": "^7.
|
|
49
|
-
"@typescript-eslint/parser": "^7.
|
|
48
|
+
"@typescript-eslint/eslint-plugin": "^7.17.0",
|
|
49
|
+
"@typescript-eslint/parser": "^7.17.0",
|
|
50
50
|
"@vitest/coverage-v8": "^2.0.4",
|
|
51
51
|
"auto-changelog": "^2.4.0",
|
|
52
52
|
"eslint": "^8.57.0",
|