@lokalise/polyglot-sdk 10.0.0 → 10.2.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 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,2FAIyD;AAHvD,uIAAA,6BAA6B,OAAA;AAC7B,0IAAA,gCAAgC,OAAA;AAChC,2IAAA,iCAAiC,OAAA;AAQnC,6FAK0D;AAJxD,yIAAA,8BAA8B,OAAA;AAC9B,4IAAA,iCAAiC,OAAA;AACjC,6IAAA,kCAAkC,OAAA;AAClC,6IAAA,kCAAkC,OAAA"}
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/node-core';
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);
@@ -230,6 +230,7 @@ export declare const TRANSLATION_CONTEXT_SCHEMA: z.ZodObject<{
230
230
  description?: string | undefined;
231
231
  }[] | undefined;
232
232
  }>, "many">>;
233
+ targetPluralForms: z.ZodEffects<z.ZodEffects<z.ZodOptional<z.ZodArray<z.ZodEnum<["zero", "one", "two", "few", "many", "other"]>, "atleastone">>, ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined, ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined>, ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined, ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined>;
233
234
  }, "strip", z.ZodTypeAny, {
234
235
  description?: string | undefined;
235
236
  styleGuide?: {
@@ -252,6 +253,7 @@ export declare const TRANSLATION_CONTEXT_SCHEMA: z.ZodObject<{
252
253
  description?: string | undefined;
253
254
  }[] | undefined;
254
255
  }[] | undefined;
256
+ targetPluralForms?: ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined;
255
257
  }, {
256
258
  description?: string | undefined;
257
259
  styleGuide?: {
@@ -274,6 +276,7 @@ export declare const TRANSLATION_CONTEXT_SCHEMA: z.ZodObject<{
274
276
  description?: string | undefined;
275
277
  }[] | undefined;
276
278
  }[] | undefined;
279
+ targetPluralForms?: ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined;
277
280
  }>;
278
281
  export type TranslationContext = z.infer<typeof TRANSLATION_CONTEXT_SCHEMA>;
279
282
  export {};
@@ -76,10 +76,17 @@ exports.TRANSLATION_CONTEXT_SCHEMA = zod_1.default
76
76
  description: zod_1.default
77
77
  .string()
78
78
  .min(1)
79
- .describe('any helpful description that applies to the whole request. E.g. project description')
79
+ .describe('Any helpful description that applies to the whole request. E.g. project description')
80
80
  .optional(),
81
81
  styleGuide: STYLE_GUIDE_SCHEMA.optional(),
82
82
  glossary: zod_1.default.array(exports.GLOSSARY_TERM_SCHEMA).describe('List of glossary terms').optional(),
83
+ targetPluralForms: zod_1.default
84
+ .array(zod_1.default.enum(['zero', 'one', 'two', 'few', 'many', 'other']))
85
+ .nonempty()
86
+ .optional()
87
+ .refine((forms) => !forms || forms.length === new Set(forms).size, 'Plural forms must be unique')
88
+ .refine((forms) => !forms || forms.includes('other'), 'The `other` form must be included')
89
+ .describe('A set of plural forms to be used in the target language. Make sure to always include `other` form'),
83
90
  })
84
91
  .describe('Helpful translation context');
85
92
  //# sourceMappingURL=translationContextSchemas.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"translationContextSchemas.js","sourceRoot":"","sources":["../../../../src/sdk/schemas/common/translationContextSchemas.ts"],"names":[],"mappings":";;;AAwCA,wDASC;;AAjDD,sDAAmB;AAEnB,mDAA+C;AAE/C,6CAA6C;AAC7C,cAAc;AACd,6CAA6C;AAE7C,MAAM,6BAA6B,GAAG,aAAC;KACpC,MAAM,CAAC;IACN,cAAc,EAAE,aAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,WAAW,EAAE,eAAe,CAAC,CAAC,CAAC,QAAQ,EAAE;IAC5E,WAAW,EAAE,aAAC;SACX,IAAI,CAAC,CAAC,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,SAAS,CAAC,CAAC;SACxE,QAAQ,EAAE;IACb,gBAAgB,EAAE,aAAC,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC,QAAQ,EAAE;IACtE,WAAW,EAAE,aAAC,CAAC,IAAI,CAAC,CAAC,cAAc,EAAE,eA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AC,OAAO,CAAC,KAAK,CAAC;IAC5F,aAAa,EAAE,aAAC;SACb,OAAO,EAAE;SACT,QAAQ,CACP,2GAA2G,CAC5G;SACA,OAAO,CAAC,KAAK,CAAC;IACjB,YAAY,EAAE,aAAC;SACZ,KAAK,CACJ,aAAC,CAAC,MAAM,CAAC;QACP,MAAM,EAAE,6BAAa;QACrB,WAAW,EAAE,aAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,qCAAqC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;QAC9E,WAAW,EAAE,aAAC;aACX,MAAM,EAAE;aACR,QAAQ,CAAC,iDAAiD,CAAC;aAC3D,QAAQ,EAAE;KACd,CAAC,CACH;SACA,QAAQ,CAAC,iFAAiF,CAAC;SAC3F,QAAQ,EAAE;CACd,CAAC;KACD,QAAQ,CAAC,eAAe,CAAC;KACzB,MAAM,CACL,CAAC,EAAE,YAAY,EAAE,YAAY,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,YAAY,IAAI,CAAC,YAAY,IAAI,SAAS,EAC3F;IACE,OAAO,EACL,kHAAkH;CACrH,CACF,CAAA;AAEU,QAAA,0BAA0B,GAAG,aAAC;KACxC,MAAM,CAAC;IACN,WAAW,EAAE,aAAC;SACX,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,CAAC;SACN,QAAQ,CACP,qFAAqF,CACtF;SACA,QAAQ,EAAE;IACb,UAAU,EAAE,kBAAkB,CAAC,QAAQ,EAAE;IACzC,QAAQ,EAAE,aAAC,CAAC,KAAK,CAAC,4BAAoB,CAAC,CAAC,QAAQ,CAAC,wBAAwB,CAAC,CAAC,QAAQ,EAAE;CACtF,CAAC;KACD,QAAQ,CAAC,6BAA6B,CAAC,CAAA"}
1
+ {"version":3,"file":"translationContextSchemas.js","sourceRoot":"","sources":["../../../../src/sdk/schemas/common/translationContextSchemas.ts"],"names":[],"mappings":";;;AAwCA,wDASC;;AAjDD,sDAAmB;AAEnB,mDAA+C;AA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BAA0B,GAAG,aAAC;KACxC,MAAM,CAAC;IACN,WAAW,EAAE,aAAC;SACX,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,CAAC;SACN,QAAQ,CACP,qFAAqF,CACtF;SACA,QAAQ,EAAE;IACb,UAAU,EAAE,kBAAkB,CAAC,QAAQ,EAAE;IACzC,QAAQ,EAAE,aAAC,CAAC,KAAK,CAAC,4BAAoB,CAAC,CAAC,QAAQ,CAAC,wBAAwB,CAAC,CAAC,QAAQ,EAAE;IACrF,iBAAiB,EAAE,aAAC;SACjB,KAAK,CAAC,aAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;SAC7D,QAAQ,EAAE;SACV,QAAQ,EAAE;SACV,MAAM,CACL,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,IAAI,KAAK,CAAC,MAAM,KAAK,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC,IAAI,EACzD,6BAA6B,CAC9B;SACA,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,IAAI,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,mCAAmC,CAAC;SACzF,QAAQ,CACP,mGAAmG,CACpG;CACJ,CAAC;KACD,QAAQ,CAAC,6BAA6B,CAAC,CAAA"}
@@ -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;
@@ -110,6 +307,7 @@ export declare const LQA_ASYNC_V1_BODY_SCHEMA: z.ZodObject<z.objectUtil.extendSh
110
307
  description?: string | undefined;
111
308
  }[] | undefined;
112
309
  }>, "many">>;
310
+ targetPluralForms: z.ZodEffects<z.ZodEffects<z.ZodOptional<z.ZodArray<z.ZodEnum<["zero", "one", "two", "few", "many", "other"]>, "atleastone">>, ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined, ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined>, ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined, ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined>;
113
311
  }, "strip", z.ZodTypeAny, {
114
312
  description?: string | undefined;
115
313
  styleGuide?: {
@@ -132,6 +330,7 @@ export declare const LQA_ASYNC_V1_BODY_SCHEMA: z.ZodObject<z.objectUtil.extendSh
132
330
  description?: string | undefined;
133
331
  }[] | undefined;
134
332
  }[] | undefined;
333
+ targetPluralForms?: ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined;
135
334
  }, {
136
335
  description?: string | undefined;
137
336
  styleGuide?: {
@@ -154,6 +353,7 @@ export declare const LQA_ASYNC_V1_BODY_SCHEMA: z.ZodObject<z.objectUtil.extendSh
154
353
  description?: string | undefined;
155
354
  }[] | undefined;
156
355
  }[] | undefined;
356
+ targetPluralForms?: ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined;
157
357
  }>>;
158
358
  contentUnits: z.ZodArray<z.ZodObject<{
159
359
  id: z.ZodString;
@@ -400,6 +600,7 @@ export declare const LQA_ASYNC_V1_BODY_SCHEMA: z.ZodObject<z.objectUtil.extendSh
400
600
  description?: string | undefined;
401
601
  }[] | undefined;
402
602
  }[] | undefined;
603
+ targetPluralForms?: ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined;
403
604
  } | undefined;
404
605
  integration?: "Claude" | "ChatGPT-4" | "Gemini" | undefined;
405
606
  }, {
@@ -506,6 +707,7 @@ export declare const LQA_ASYNC_V1_BODY_SCHEMA: z.ZodObject<z.objectUtil.extendSh
506
707
  description?: string | undefined;
507
708
  }[] | undefined;
508
709
  }[] | undefined;
710
+ targetPluralForms?: ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined;
509
711
  } | undefined;
510
712
  integration?: "Claude" | "ChatGPT-4" | "Gemini" | undefined;
511
713
  }>;
@@ -644,3 +846,6 @@ export type LqaAsyncV1Body = z.infer<typeof LQA_ASYNC_V1_BODY_SCHEMA>;
644
846
  export type LqaAsyncV1Headers = z.infer<typeof LQA_ASYNC_V1_HEADERS_SCHEMA>;
645
847
  export type LqaAsyncV1Response = z.infer<typeof LQA_ASYNC_V1_RESPONSE_SCHEMA>;
646
848
  export type LqaAsyncV1CallbackBody = z.infer<typeof LQA_ASYNC_V1_CALLBACK_SCHEMA>;
849
+ export type LqaAsyncV1ContentUnit = z.infer<typeof LQA_CONTENT_UNIT_SCHEMA>;
850
+ export type LqaAsyncV1Segment = z.infer<typeof LQA_SEGMENT_SCHEMA>;
851
+ 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<{
@@ -99,6 +296,7 @@ export declare const LQA_SYNC_V2_BODY_SCHEMA: z.ZodObject<{
99
296
  description?: string | undefined;
100
297
  }[] | undefined;
101
298
  }>, "many">>;
299
+ targetPluralForms: z.ZodEffects<z.ZodEffects<z.ZodOptional<z.ZodArray<z.ZodEnum<["zero", "one", "two", "few", "many", "other"]>, "atleastone">>, ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined, ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined>, ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined, ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined>;
102
300
  }, "strip", z.ZodTypeAny, {
103
301
  description?: string | undefined;
104
302
  styleGuide?: {
@@ -121,6 +319,7 @@ export declare const LQA_SYNC_V2_BODY_SCHEMA: z.ZodObject<{
121
319
  description?: string | undefined;
122
320
  }[] | undefined;
123
321
  }[] | undefined;
322
+ targetPluralForms?: ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined;
124
323
  }, {
125
324
  description?: string | undefined;
126
325
  styleGuide?: {
@@ -143,6 +342,7 @@ export declare const LQA_SYNC_V2_BODY_SCHEMA: z.ZodObject<{
143
342
  description?: string | undefined;
144
343
  }[] | undefined;
145
344
  }[] | undefined;
345
+ targetPluralForms?: ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined;
146
346
  }>>;
147
347
  integration: z.ZodOptional<z.ZodNativeEnum<{
148
348
  readonly CLAUDE: "Claude";
@@ -389,6 +589,7 @@ export declare const LQA_SYNC_V2_BODY_SCHEMA: z.ZodObject<{
389
589
  description?: string | undefined;
390
590
  }[] | undefined;
391
591
  }[] | undefined;
592
+ targetPluralForms?: ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined;
392
593
  } | undefined;
393
594
  integration?: "Claude" | "ChatGPT-4" | "Gemini" | undefined;
394
595
  }, {
@@ -490,6 +691,7 @@ export declare const LQA_SYNC_V2_BODY_SCHEMA: z.ZodObject<{
490
691
  description?: string | undefined;
491
692
  }[] | undefined;
492
693
  }[] | undefined;
694
+ targetPluralForms?: ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined;
493
695
  } | undefined;
494
696
  integration?: "Claude" | "ChatGPT-4" | "Gemini" | undefined;
495
697
  }>;
@@ -617,3 +819,6 @@ export declare const LQA_SYNC_V2_RESPONSE_SCHEMA: z.ZodObject<{
617
819
  export type LqaSyncV2Body = z.infer<typeof LQA_SYNC_V2_BODY_SCHEMA>;
618
820
  export type LqaSyncV2Headers = z.infer<typeof LQA_SYNC_V2_HEADERS_SCHEMA>;
619
821
  export type LqaSyncV2Response = z.infer<typeof LQA_SYNC_V2_RESPONSE_SCHEMA>;
822
+ export type LqaSyncV2ContentUnit = z.infer<typeof CONTENT_UNIT_SCHEMA>;
823
+ export type LqaSyncV2Segment = z.infer<typeof SEGMENT_SCHEMA>;
824
+ export {};
@@ -118,6 +118,7 @@ export declare const GENERATE_VARIANTS_V1_BODY_SCHEMA: z.ZodEffects<z.ZodObject<
118
118
  description?: string | undefined;
119
119
  }[] | undefined;
120
120
  }>, "many">>;
121
+ targetPluralForms: z.ZodEffects<z.ZodEffects<z.ZodOptional<z.ZodArray<z.ZodEnum<["zero", "one", "two", "few", "many", "other"]>, "atleastone">>, ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined, ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined>, ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined, ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined>;
121
122
  }, "strip", z.ZodTypeAny, {
122
123
  description?: string | undefined;
123
124
  styleGuide?: {
@@ -140,6 +141,7 @@ export declare const GENERATE_VARIANTS_V1_BODY_SCHEMA: z.ZodEffects<z.ZodObject<
140
141
  description?: string | undefined;
141
142
  }[] | undefined;
142
143
  }[] | undefined;
144
+ targetPluralForms?: ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined;
143
145
  }, {
144
146
  description?: string | undefined;
145
147
  styleGuide?: {
@@ -162,6 +164,7 @@ export declare const GENERATE_VARIANTS_V1_BODY_SCHEMA: z.ZodEffects<z.ZodObject<
162
164
  description?: string | undefined;
163
165
  }[] | undefined;
164
166
  }[] | undefined;
167
+ targetPluralForms?: ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined;
165
168
  }>>;
166
169
  sourceLocale: z.ZodEffects<z.ZodString, string, string>;
167
170
  sourceValue: z.ZodString;
@@ -218,6 +221,7 @@ export declare const GENERATE_VARIANTS_V1_BODY_SCHEMA: z.ZodEffects<z.ZodObject<
218
221
  description?: string | undefined;
219
222
  }[] | undefined;
220
223
  }[] | undefined;
224
+ targetPluralForms?: ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined;
221
225
  } | undefined;
222
226
  history?: {
223
227
  values: [string, ...string[]];
@@ -252,6 +256,7 @@ export declare const GENERATE_VARIANTS_V1_BODY_SCHEMA: z.ZodEffects<z.ZodObject<
252
256
  description?: string | undefined;
253
257
  }[] | undefined;
254
258
  }[] | undefined;
259
+ targetPluralForms?: ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined;
255
260
  } | undefined;
256
261
  history?: {
257
262
  values: [string, ...string[]];
@@ -286,6 +291,7 @@ export declare const GENERATE_VARIANTS_V1_BODY_SCHEMA: z.ZodEffects<z.ZodObject<
286
291
  description?: string | undefined;
287
292
  }[] | undefined;
288
293
  }[] | undefined;
294
+ targetPluralForms?: ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined;
289
295
  } | undefined;
290
296
  history?: {
291
297
  values: [string, ...string[]];
@@ -320,6 +326,7 @@ export declare const GENERATE_VARIANTS_V1_BODY_SCHEMA: z.ZodEffects<z.ZodObject<
320
326
  description?: string | undefined;
321
327
  }[] | undefined;
322
328
  }[] | undefined;
329
+ targetPluralForms?: ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined;
323
330
  } | undefined;
324
331
  history?: {
325
332
  values: [string, ...string[]];
@@ -252,6 +252,7 @@ export declare const TRANSLATE_ASYNC_V2_BODY_SCHEMA: z.ZodEffects<z.ZodEffects<z
252
252
  description?: string | undefined;
253
253
  }[] | undefined;
254
254
  }>, "many">>;
255
+ targetPluralForms: z.ZodEffects<z.ZodEffects<z.ZodOptional<z.ZodArray<z.ZodEnum<["zero", "one", "two", "few", "many", "other"]>, "atleastone">>, ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined, ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined>, ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined, ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined>;
255
256
  }, "strip", z.ZodTypeAny, {
256
257
  description?: string | undefined;
257
258
  styleGuide?: {
@@ -274,6 +275,7 @@ export declare const TRANSLATE_ASYNC_V2_BODY_SCHEMA: z.ZodEffects<z.ZodEffects<z
274
275
  description?: string | undefined;
275
276
  }[] | undefined;
276
277
  }[] | undefined;
278
+ targetPluralForms?: ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined;
277
279
  }, {
278
280
  description?: string | undefined;
279
281
  styleGuide?: {
@@ -296,6 +298,7 @@ export declare const TRANSLATE_ASYNC_V2_BODY_SCHEMA: z.ZodEffects<z.ZodEffects<z
296
298
  description?: string | undefined;
297
299
  }[] | undefined;
298
300
  }[] | undefined;
301
+ targetPluralForms?: ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined;
299
302
  }>>;
300
303
  contentUnits: z.ZodEffects<z.ZodArray<z.ZodObject<{
301
304
  id: z.ZodString;
@@ -564,6 +567,7 @@ export declare const TRANSLATE_ASYNC_V2_BODY_SCHEMA: z.ZodEffects<z.ZodEffects<z
564
567
  description?: string | undefined;
565
568
  }[] | undefined;
566
569
  }[] | undefined;
570
+ targetPluralForms?: ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined;
567
571
  } | undefined;
568
572
  integration?: "Claude" | "ChatGPT-4" | "Gemini" | "DeepL" | "GoogleTranslate" | "MicrosoftTranslator" | undefined;
569
573
  }, {
@@ -639,6 +643,7 @@ export declare const TRANSLATE_ASYNC_V2_BODY_SCHEMA: z.ZodEffects<z.ZodEffects<z
639
643
  description?: string | undefined;
640
644
  }[] | undefined;
641
645
  }[] | undefined;
646
+ targetPluralForms?: ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined;
642
647
  } | undefined;
643
648
  integration?: "Claude" | "ChatGPT-4" | "Gemini" | "DeepL" | "GoogleTranslate" | "MicrosoftTranslator" | undefined;
644
649
  pickIntegrationByScore?: boolean | undefined;
@@ -716,6 +721,7 @@ export declare const TRANSLATE_ASYNC_V2_BODY_SCHEMA: z.ZodEffects<z.ZodEffects<z
716
721
  description?: string | undefined;
717
722
  }[] | undefined;
718
723
  }[] | undefined;
724
+ targetPluralForms?: ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined;
719
725
  } | undefined;
720
726
  integration?: "Claude" | "ChatGPT-4" | "Gemini" | "DeepL" | "GoogleTranslate" | "MicrosoftTranslator" | undefined;
721
727
  }, {
@@ -791,6 +797,7 @@ export declare const TRANSLATE_ASYNC_V2_BODY_SCHEMA: z.ZodEffects<z.ZodEffects<z
791
797
  description?: string | undefined;
792
798
  }[] | undefined;
793
799
  }[] | undefined;
800
+ targetPluralForms?: ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined;
794
801
  } | undefined;
795
802
  integration?: "Claude" | "ChatGPT-4" | "Gemini" | "DeepL" | "GoogleTranslate" | "MicrosoftTranslator" | undefined;
796
803
  pickIntegrationByScore?: boolean | undefined;
@@ -868,6 +875,7 @@ export declare const TRANSLATE_ASYNC_V2_BODY_SCHEMA: z.ZodEffects<z.ZodEffects<z
868
875
  description?: string | undefined;
869
876
  }[] | undefined;
870
877
  }[] | undefined;
878
+ targetPluralForms?: ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined;
871
879
  } | undefined;
872
880
  integration?: "Claude" | "ChatGPT-4" | "Gemini" | "DeepL" | "GoogleTranslate" | "MicrosoftTranslator" | undefined;
873
881
  }, {
@@ -943,6 +951,7 @@ export declare const TRANSLATE_ASYNC_V2_BODY_SCHEMA: z.ZodEffects<z.ZodEffects<z
943
951
  description?: string | undefined;
944
952
  }[] | undefined;
945
953
  }[] | undefined;
954
+ targetPluralForms?: ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined;
946
955
  } | undefined;
947
956
  integration?: "Claude" | "ChatGPT-4" | "Gemini" | "DeepL" | "GoogleTranslate" | "MicrosoftTranslator" | undefined;
948
957
  pickIntegrationByScore?: boolean | undefined;
@@ -1057,3 +1066,5 @@ export type TranslateAsyncV2Body = z.infer<typeof TRANSLATE_ASYNC_V2_BODY_SCHEMA
1057
1066
  export type TranslateAsyncV2Headers = z.infer<typeof TRANSLATE_ASYNC_V2_HEADERS_SCHEMA>;
1058
1067
  export type TranslateAsyncV2Response = z.infer<typeof TRANSLATE_ASYNC_V2_RESPONSE_SCHEMA>;
1059
1068
  export type TranslateAsyncV2Callback = z.infer<typeof TRANSLATE_ASYNC_V2_CALLBACK_SCHEMA>;
1069
+ export type TranslateAsyncV2ContentUnit = z.infer<typeof TRANSLATE_ASYNC_V2_CONTENT_UNIT_SCHEMA>;
1070
+ export type TranslateAsyncV2Segment = z.infer<typeof TRANSLATE_ASYNC_V2_SEGMENT_SCHEMA>;
@@ -217,6 +217,7 @@ export declare const TRANSLATE_SYNC_V2_BODY_SCHEMA: z.ZodEffects<z.ZodObject<{
217
217
  description?: string | undefined;
218
218
  }[] | undefined;
219
219
  }>, "many">>;
220
+ targetPluralForms: z.ZodEffects<z.ZodEffects<z.ZodOptional<z.ZodArray<z.ZodEnum<["zero", "one", "two", "few", "many", "other"]>, "atleastone">>, ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined, ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined>, ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined, ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined>;
220
221
  }, "strip", z.ZodTypeAny, {
221
222
  description?: string | undefined;
222
223
  styleGuide?: {
@@ -239,6 +240,7 @@ export declare const TRANSLATE_SYNC_V2_BODY_SCHEMA: z.ZodEffects<z.ZodObject<{
239
240
  description?: string | undefined;
240
241
  }[] | undefined;
241
242
  }[] | undefined;
243
+ targetPluralForms?: ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined;
242
244
  }, {
243
245
  description?: string | undefined;
244
246
  styleGuide?: {
@@ -261,6 +263,7 @@ export declare const TRANSLATE_SYNC_V2_BODY_SCHEMA: z.ZodEffects<z.ZodObject<{
261
263
  description?: string | undefined;
262
264
  }[] | undefined;
263
265
  }[] | undefined;
266
+ targetPluralForms?: ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined;
264
267
  }>>;
265
268
  contentUnits: z.ZodArray<z.ZodObject<{
266
269
  id: z.ZodString;
@@ -411,6 +414,7 @@ export declare const TRANSLATE_SYNC_V2_BODY_SCHEMA: z.ZodEffects<z.ZodObject<{
411
414
  description?: string | undefined;
412
415
  }[] | undefined;
413
416
  }[] | undefined;
417
+ targetPluralForms?: ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined;
414
418
  } | undefined;
415
419
  integration?: "Claude" | "ChatGPT-4" | "Gemini" | "DeepL" | "GoogleTranslate" | "MicrosoftTranslator" | undefined;
416
420
  }, {
@@ -481,6 +485,7 @@ export declare const TRANSLATE_SYNC_V2_BODY_SCHEMA: z.ZodEffects<z.ZodObject<{
481
485
  description?: string | undefined;
482
486
  }[] | undefined;
483
487
  }[] | undefined;
488
+ targetPluralForms?: ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined;
484
489
  } | undefined;
485
490
  integration?: "Claude" | "ChatGPT-4" | "Gemini" | "DeepL" | "GoogleTranslate" | "MicrosoftTranslator" | undefined;
486
491
  }>, {
@@ -551,6 +556,7 @@ export declare const TRANSLATE_SYNC_V2_BODY_SCHEMA: z.ZodEffects<z.ZodObject<{
551
556
  description?: string | undefined;
552
557
  }[] | undefined;
553
558
  }[] | undefined;
559
+ targetPluralForms?: ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined;
554
560
  } | undefined;
555
561
  integration?: "Claude" | "ChatGPT-4" | "Gemini" | "DeepL" | "GoogleTranslate" | "MicrosoftTranslator" | undefined;
556
562
  }, {
@@ -621,6 +627,7 @@ export declare const TRANSLATE_SYNC_V2_BODY_SCHEMA: z.ZodEffects<z.ZodObject<{
621
627
  description?: string | undefined;
622
628
  }[] | undefined;
623
629
  }[] | undefined;
630
+ targetPluralForms?: ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined;
624
631
  } | undefined;
625
632
  integration?: "Claude" | "ChatGPT-4" | "Gemini" | "DeepL" | "GoogleTranslate" | "MicrosoftTranslator" | undefined;
626
633
  }>;
@@ -705,3 +712,5 @@ export declare const TRANSLATE_SYNC_V2_RESPONSE_SCHEMA: z.ZodObject<{
705
712
  export type TranslateSyncV2Body = z.infer<typeof TRANSLATE_SYNC_V2_BODY_SCHEMA>;
706
713
  export type TranslateSyncV2Headers = z.infer<typeof TRANSLATE_SYNC_V2_HEADERS_SCHEMA>;
707
714
  export type TranslateSyncV2Response = z.infer<typeof TRANSLATE_SYNC_V2_RESPONSE_SCHEMA>;
715
+ export type TranslateSyncV2ContentUnit = z.infer<typeof TRANSLATE_SYNC_V2_CONTENT_UNIT_SCHEMA>;
716
+ 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.0.0",
3
+ "version": "10.2.0",
4
4
  "author": {
5
5
  "name": "Lokalise",
6
6
  "url": "https://lokalise.com/"
@@ -32,22 +32,22 @@
32
32
  "prepublishOnly": "npm run build:publish"
33
33
  },
34
34
  "dependencies": {
35
- "@amplitude/analytics-types": "^2.6.0",
35
+ "@amplitude/analytics-types": "^2.7.0",
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": "^9.20.0",
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.2",
43
- "undici-retry": "^5.0.2",
44
- "zod": "^3.23.4"
42
+ "undici": "^6.19.5",
43
+ "undici-retry": "^5.0.3",
44
+ "zod": "^3.23.8"
45
45
  },
46
46
  "devDependencies": {
47
- "@types/node": "^20.14.11",
48
- "@typescript-eslint/eslint-plugin": "^7.4.0",
49
- "@typescript-eslint/parser": "^7.4.0",
50
- "@vitest/coverage-v8": "^2.0.4",
47
+ "@types/node": "^22.1.0",
48
+ "@typescript-eslint/eslint-plugin": "^7.17.0",
49
+ "@typescript-eslint/parser": "^7.17.0",
50
+ "@vitest/coverage-v8": "^2.0.5",
51
51
  "auto-changelog": "^2.4.0",
52
52
  "eslint": "^8.57.0",
53
53
  "eslint-plugin-import": "^2.29.1",
@@ -55,8 +55,8 @@
55
55
  "mockttp": "^3.13.0",
56
56
  "prettier": "^3.2.5",
57
57
  "shx": "^0.3.4",
58
- "ts-deepmerge": "^7.0.0",
59
- "typescript": "5.5.3",
58
+ "ts-deepmerge": "^7.0.1",
59
+ "typescript": "5.5.4",
60
60
  "vitest": "^2.0.4"
61
61
  }
62
62
  }