@lokalise/polyglot-sdk 13.3.0 → 13.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.
|
@@ -16,6 +16,7 @@ export declare const TRANSLATE_ASYNC_BODY_SCHEMA: z.ZodEffects<z.ZodEffects<z.Zo
|
|
|
16
16
|
readonly MICROSOFT_TRANSLATOR: "MicrosoftTranslator";
|
|
17
17
|
}>>;
|
|
18
18
|
pickIntegrationByScore: z.ZodDefault<z.ZodBoolean>;
|
|
19
|
+
includeScore: z.ZodDefault<z.ZodBoolean>;
|
|
19
20
|
context: z.ZodOptional<z.ZodObject<{
|
|
20
21
|
description: z.ZodOptional<z.ZodString>;
|
|
21
22
|
styleGuide: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
@@ -406,6 +407,7 @@ export declare const TRANSLATE_ASYNC_BODY_SCHEMA: z.ZodEffects<z.ZodEffects<z.Zo
|
|
|
406
407
|
}[]];
|
|
407
408
|
targetLocale: string;
|
|
408
409
|
pickIntegrationByScore: boolean;
|
|
410
|
+
includeScore: boolean;
|
|
409
411
|
context?: {
|
|
410
412
|
description?: string | undefined;
|
|
411
413
|
styleGuide?: {
|
|
@@ -507,6 +509,7 @@ export declare const TRANSLATE_ASYNC_BODY_SCHEMA: z.ZodEffects<z.ZodEffects<z.Zo
|
|
|
507
509
|
} | undefined;
|
|
508
510
|
integration?: "Claude" | "ChatGPT-4" | "Gemini" | "DeepL" | "GoogleTranslate" | "MicrosoftTranslator" | undefined;
|
|
509
511
|
pickIntegrationByScore?: boolean | undefined;
|
|
512
|
+
includeScore?: boolean | undefined;
|
|
510
513
|
}>, {
|
|
511
514
|
originCorrelationId: string;
|
|
512
515
|
ownerId: string;
|
|
@@ -558,6 +561,7 @@ export declare const TRANSLATE_ASYNC_BODY_SCHEMA: z.ZodEffects<z.ZodEffects<z.Zo
|
|
|
558
561
|
}[]];
|
|
559
562
|
targetLocale: string;
|
|
560
563
|
pickIntegrationByScore: boolean;
|
|
564
|
+
includeScore: boolean;
|
|
561
565
|
context?: {
|
|
562
566
|
description?: string | undefined;
|
|
563
567
|
styleGuide?: {
|
|
@@ -659,6 +663,7 @@ export declare const TRANSLATE_ASYNC_BODY_SCHEMA: z.ZodEffects<z.ZodEffects<z.Zo
|
|
|
659
663
|
} | undefined;
|
|
660
664
|
integration?: "Claude" | "ChatGPT-4" | "Gemini" | "DeepL" | "GoogleTranslate" | "MicrosoftTranslator" | undefined;
|
|
661
665
|
pickIntegrationByScore?: boolean | undefined;
|
|
666
|
+
includeScore?: boolean | undefined;
|
|
662
667
|
}>, {
|
|
663
668
|
originCorrelationId: string;
|
|
664
669
|
ownerId: string;
|
|
@@ -710,6 +715,7 @@ export declare const TRANSLATE_ASYNC_BODY_SCHEMA: z.ZodEffects<z.ZodEffects<z.Zo
|
|
|
710
715
|
}[]];
|
|
711
716
|
targetLocale: string;
|
|
712
717
|
pickIntegrationByScore: boolean;
|
|
718
|
+
includeScore: boolean;
|
|
713
719
|
context?: {
|
|
714
720
|
description?: string | undefined;
|
|
715
721
|
styleGuide?: {
|
|
@@ -811,6 +817,7 @@ export declare const TRANSLATE_ASYNC_BODY_SCHEMA: z.ZodEffects<z.ZodEffects<z.Zo
|
|
|
811
817
|
} | undefined;
|
|
812
818
|
integration?: "Claude" | "ChatGPT-4" | "Gemini" | "DeepL" | "GoogleTranslate" | "MicrosoftTranslator" | undefined;
|
|
813
819
|
pickIntegrationByScore?: boolean | undefined;
|
|
820
|
+
includeScore?: boolean | undefined;
|
|
814
821
|
}>, {
|
|
815
822
|
originCorrelationId: string;
|
|
816
823
|
ownerId: string;
|
|
@@ -862,6 +869,7 @@ export declare const TRANSLATE_ASYNC_BODY_SCHEMA: z.ZodEffects<z.ZodEffects<z.Zo
|
|
|
862
869
|
}[]];
|
|
863
870
|
targetLocale: string;
|
|
864
871
|
pickIntegrationByScore: boolean;
|
|
872
|
+
includeScore: boolean;
|
|
865
873
|
context?: {
|
|
866
874
|
description?: string | undefined;
|
|
867
875
|
styleGuide?: {
|
|
@@ -963,6 +971,7 @@ export declare const TRANSLATE_ASYNC_BODY_SCHEMA: z.ZodEffects<z.ZodEffects<z.Zo
|
|
|
963
971
|
} | undefined;
|
|
964
972
|
integration?: "Claude" | "ChatGPT-4" | "Gemini" | "DeepL" | "GoogleTranslate" | "MicrosoftTranslator" | undefined;
|
|
965
973
|
pickIntegrationByScore?: boolean | undefined;
|
|
974
|
+
includeScore?: boolean | undefined;
|
|
966
975
|
}>;
|
|
967
976
|
export declare const TRANSLATE_ASYNC_HEADERS_SCHEMA: z.ZodObject<{
|
|
968
977
|
'x-fake-processing': z.ZodOptional<z.ZodEffects<z.ZodBoolean, boolean, unknown>>;
|
|
@@ -12,7 +12,14 @@ exports.TRANSLATE_ASYNC_BODY_SCHEMA = asyncRequestSchemas_1.ASYNC_REQUEST_SCHEMA
|
|
|
12
12
|
sourceLocale: commonSchemas_1.LOCALE_SCHEMA,
|
|
13
13
|
targetLocale: commonSchemas_1.LOCALE_SCHEMA,
|
|
14
14
|
integration: commonSchemas_1.REAL_INTEGRATION_ENGINE_SCHEMA.optional(),
|
|
15
|
-
pickIntegrationByScore: zod_1.default
|
|
15
|
+
pickIntegrationByScore: zod_1.default
|
|
16
|
+
.boolean()
|
|
17
|
+
.default(false)
|
|
18
|
+
.describe('Determines whether the best integration should be selected automatically based on score. When enabled, the system performs translation with every available integration and returns the one with the highest confidence score. This cannot be used in conjunction with a forced integration.'),
|
|
19
|
+
includeScore: zod_1.default
|
|
20
|
+
.boolean()
|
|
21
|
+
.default(false)
|
|
22
|
+
.describe('Determines if Polyglot should evaluate the translation quality and include scores into the callback.'),
|
|
16
23
|
context: translationContextSchemas_1.TRANSLATION_CONTEXT_SCHEMA.optional(),
|
|
17
24
|
contentUnits: zod_1.default
|
|
18
25
|
.array(sharedSchemas_1.TRANSLATE_CONTENT_UNIT_SCHEMA)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translateAsyncSchemas.js","sourceRoot":"","sources":["../../../../src/sdk/schemas/translation/translateAsyncSchemas.ts"],"names":[],"mappings":";;;;AAAA,sDAAmB;AACnB,uEAAoG;AACpG,2DAMgC;AAChC,mFAAgF;AAChF,mDAOwB;AAExB,MAAM,wBAAwB,GAAG,EAAE,CAAA;AAEtB,QAAA,2BAA2B,GAAG,0CAAoB,CAAC,MAAM,CAAC;IACrE,YAAY,EAAE,6BAAa;IAC3B,YAAY,EAAE,6BAAa;IAC3B,WAAW,EAAE,8CAA8B,CAAC,QAAQ,EAAE;IACtD,sBAAsB,EAAE,aAAC,
|
|
1
|
+
{"version":3,"file":"translateAsyncSchemas.js","sourceRoot":"","sources":["../../../../src/sdk/schemas/translation/translateAsyncSchemas.ts"],"names":[],"mappings":";;;;AAAA,sDAAmB;AACnB,uEAAoG;AACpG,2DAMgC;AAChC,mFAAgF;AAChF,mDAOwB;AAExB,MAAM,wBAAwB,GAAG,EAAE,CAAA;AAEtB,QAAA,2BAA2B,GAAG,0CAAoB,CAAC,MAAM,CAAC;IACrE,YAAY,EAAE,6BAAa;IAC3B,YAAY,EAAE,6BAAa;IAC3B,WAAW,EAAE,8CAA8B,CAAC,QAAQ,EAAE;IACtD,sBAAsB,EAAE,aAAC;SACtB,OAAO,EAAE;SACT,OAAO,CAAC,KAAK,CAAC;SACd,QAAQ,CACP,8RAA8R,CAC/R;IACH,YAAY,EAAE,aAAC;SACZ,OAAO,EAAE;SACT,OAAO,CAAC,KAAK,CAAC;SACd,QAAQ,CACP,sGAAsG,CACvG;IACH,OAAO,EAAE,sDAA0B,CAAC,QAAQ,EAAE;IAC9C,YAAY,EAAE,aAAC;SACZ,KAAK,CAAC,6CAA6B,CAAC;SACpC,QAAQ,EAAE;SACV,GAAG,CAAC,wBAAwB,CAAC;SAC7B,MAAM,CAAC,GAAG,+BAAe,CAAC;CAC9B,CAAC;KACC,MAAM,CAAC,GAAG,kDAAkC,CAAC;KAC7C,MAAM,CAAC,GAAG,sCAAsB,CA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