@lokalise/polyglot-sdk 18.0.0 → 19.0.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 +0 -1
- package/dist/index.js +0 -1
- package/dist/index.js.map +1 -1
- package/dist/sdk/PolyglotClient.d.ts +0 -5
- package/dist/sdk/PolyglotClient.js +0 -23
- package/dist/sdk/PolyglotClient.js.map +1 -1
- package/dist/sdk/schemas/common/commonSchemas.d.ts +6 -0
- package/dist/sdk/schemas/common/commonSchemas.js +10 -1
- package/dist/sdk/schemas/common/commonSchemas.js.map +1 -1
- package/dist/sdk/schemas/lqa/lqaAsyncSchemas.d.ts +5 -115
- package/dist/sdk/schemas/lqa/lqaAsyncSchemas.js +2 -4
- package/dist/sdk/schemas/lqa/lqaAsyncSchemas.js.map +1 -1
- package/dist/sdk/schemas/translation/generateVariants.d.ts +88 -1
- package/dist/sdk/schemas/translation/generateVariants.js +4 -2
- package/dist/sdk/schemas/translation/generateVariants.js.map +1 -1
- package/dist/sdk/schemas/translation/rewriteTextSchemas.d.ts +134 -1
- package/dist/sdk/schemas/translation/rewriteTextSchemas.js +4 -2
- package/dist/sdk/schemas/translation/rewriteTextSchemas.js.map +1 -1
- package/dist/sdk/schemas/translation/translateAsyncSchemas.d.ts +224 -1
- package/dist/sdk/schemas/translation/translateAsyncSchemas.js +3 -1
- package/dist/sdk/schemas/translation/translateAsyncSchemas.js.map +1 -1
- package/dist/sdk/schemas/translation/translateSyncSchemas.d.ts +214 -1
- package/dist/sdk/schemas/translation/translateSyncSchemas.js +4 -2
- package/dist/sdk/schemas/translation/translateSyncSchemas.js.map +1 -1
- package/dist/sdk/schemas/translation/translateTextSegmentSchemas.d.ts +148 -1
- package/dist/sdk/schemas/translation/translateTextSegmentSchemas.js +4 -2
- package/dist/sdk/schemas/translation/translateTextSegmentSchemas.js.map +1 -1
- package/dist/sdk/validation/requestSizeLimit.d.ts +2 -2
- package/dist/sdk/validation/requestSizeLimit.js +4 -4
- package/dist/sdk/validation/requestSizeLimit.js.map +1 -1
- package/package.json +1 -1
- package/dist/sdk/schemas/scoring/scoreSchemas.d.ts +0 -178
- package/dist/sdk/schemas/scoring/scoreSchemas.js +0 -43
- package/dist/sdk/schemas/scoring/scoreSchemas.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import z from 'zod';
|
|
2
2
|
import { COMMON_REQUEST_HEADERS_SCHEMA } from '../common/commonSchemas.js';
|
|
3
|
-
export declare const REWRITE_TEXT_SEGMENT_BODY_SCHEMA: z.ZodEffects<z.ZodObject<{
|
|
3
|
+
export declare const REWRITE_TEXT_SEGMENT_BODY_SCHEMA: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
4
4
|
context: z.ZodOptional<z.ZodObject<Omit<{
|
|
5
5
|
description: z.ZodOptional<z.ZodString>;
|
|
6
6
|
styleGuide: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
@@ -333,6 +333,7 @@ export declare const REWRITE_TEXT_SEGMENT_BODY_SCHEMA: z.ZodEffects<z.ZodObject<
|
|
|
333
333
|
readonly CHAT_GPT4: "ChatGPT-4";
|
|
334
334
|
readonly GEMINI: "Gemini";
|
|
335
335
|
}>>;
|
|
336
|
+
forceIntegration: z.ZodOptional<z.ZodBoolean>;
|
|
336
337
|
history: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
337
338
|
values: z.ZodArray<z.ZodString, "atleastone">;
|
|
338
339
|
mode: z.ZodPipeline<z.ZodString, z.ZodNativeEnum<{
|
|
@@ -409,6 +410,7 @@ export declare const REWRITE_TEXT_SEGMENT_BODY_SCHEMA: z.ZodEffects<z.ZodObject<
|
|
|
409
410
|
translatedValue: string;
|
|
410
411
|
}[] | undefined;
|
|
411
412
|
} | undefined;
|
|
413
|
+
forceIntegration?: boolean | undefined;
|
|
412
414
|
history?: {
|
|
413
415
|
values: [string, ...string[]];
|
|
414
416
|
mode: "rephrase" | "shorten";
|
|
@@ -472,6 +474,7 @@ export declare const REWRITE_TEXT_SEGMENT_BODY_SCHEMA: z.ZodEffects<z.ZodObject<
|
|
|
472
474
|
translatedValue: string;
|
|
473
475
|
}[] | undefined;
|
|
474
476
|
} | undefined;
|
|
477
|
+
forceIntegration?: boolean | undefined;
|
|
475
478
|
history?: {
|
|
476
479
|
values: [string, ...string[]];
|
|
477
480
|
mode: string;
|
|
@@ -535,6 +538,7 @@ export declare const REWRITE_TEXT_SEGMENT_BODY_SCHEMA: z.ZodEffects<z.ZodObject<
|
|
|
535
538
|
translatedValue: string;
|
|
536
539
|
}[] | undefined;
|
|
537
540
|
} | undefined;
|
|
541
|
+
forceIntegration?: boolean | undefined;
|
|
538
542
|
history?: {
|
|
539
543
|
values: [string, ...string[]];
|
|
540
544
|
mode: "rephrase" | "shorten";
|
|
@@ -598,6 +602,135 @@ export declare const REWRITE_TEXT_SEGMENT_BODY_SCHEMA: z.ZodEffects<z.ZodObject<
|
|
|
598
602
|
translatedValue: string;
|
|
599
603
|
}[] | undefined;
|
|
600
604
|
} | undefined;
|
|
605
|
+
forceIntegration?: boolean | undefined;
|
|
606
|
+
history?: {
|
|
607
|
+
values: [string, ...string[]];
|
|
608
|
+
mode: string;
|
|
609
|
+
}[] | undefined;
|
|
610
|
+
}>, {
|
|
611
|
+
value: string;
|
|
612
|
+
locale: string;
|
|
613
|
+
mode: "rephrase" | "shorten";
|
|
614
|
+
context?: {
|
|
615
|
+
description?: string | undefined;
|
|
616
|
+
styleGuide?: {
|
|
617
|
+
targetAudience?: "general" | "technical" | "non-technical" | undefined;
|
|
618
|
+
toneOfVoice?: "friendly" | "empowering" | "informative" | "supportive" | "elegant" | undefined;
|
|
619
|
+
levelOfFormality?: "informal" | "formal" | "neutral" | undefined;
|
|
620
|
+
generalRule?: "active-voice" | "passive-voice" | undefined;
|
|
621
|
+
} | {
|
|
622
|
+
text: string;
|
|
623
|
+
} | undefined;
|
|
624
|
+
glossary?: {
|
|
625
|
+
term: string;
|
|
626
|
+
translatable: boolean;
|
|
627
|
+
forbidden: boolean;
|
|
628
|
+
caseSensitive: boolean;
|
|
629
|
+
description?: string | undefined;
|
|
630
|
+
translations?: {
|
|
631
|
+
locale: string;
|
|
632
|
+
translation: string;
|
|
633
|
+
description?: string | undefined;
|
|
634
|
+
}[] | undefined;
|
|
635
|
+
}[] | undefined;
|
|
636
|
+
translationExamples?: {
|
|
637
|
+
sourceValue: string;
|
|
638
|
+
translatedValue: string;
|
|
639
|
+
}[] | undefined;
|
|
640
|
+
} | undefined;
|
|
641
|
+
integration?: "FT-OpenAI" | "Claude" | "ChatGPT-4" | "Gemini" | undefined;
|
|
642
|
+
assets?: {
|
|
643
|
+
description?: string | undefined;
|
|
644
|
+
styleGuide?: {
|
|
645
|
+
targetAudience?: "general" | "technical" | "non-technical" | undefined;
|
|
646
|
+
toneOfVoice?: "friendly" | "empowering" | "informative" | "supportive" | "elegant" | undefined;
|
|
647
|
+
levelOfFormality?: "informal" | "formal" | "neutral" | undefined;
|
|
648
|
+
generalRule?: "active-voice" | "passive-voice" | undefined;
|
|
649
|
+
} | {
|
|
650
|
+
text: string;
|
|
651
|
+
} | undefined;
|
|
652
|
+
glossary?: {
|
|
653
|
+
term: string;
|
|
654
|
+
translatable: boolean;
|
|
655
|
+
forbidden: boolean;
|
|
656
|
+
caseSensitive: boolean;
|
|
657
|
+
description?: string | undefined;
|
|
658
|
+
translations?: {
|
|
659
|
+
locale: string;
|
|
660
|
+
translation: string;
|
|
661
|
+
description?: string | undefined;
|
|
662
|
+
}[] | undefined;
|
|
663
|
+
}[] | undefined;
|
|
664
|
+
translationExamples?: {
|
|
665
|
+
sourceValue: string;
|
|
666
|
+
translatedValue: string;
|
|
667
|
+
}[] | undefined;
|
|
668
|
+
} | undefined;
|
|
669
|
+
forceIntegration?: boolean | undefined;
|
|
670
|
+
history?: {
|
|
671
|
+
values: [string, ...string[]];
|
|
672
|
+
mode: "rephrase" | "shorten";
|
|
673
|
+
}[] | undefined;
|
|
674
|
+
}, {
|
|
675
|
+
value: string;
|
|
676
|
+
locale: string;
|
|
677
|
+
mode: string;
|
|
678
|
+
context?: {
|
|
679
|
+
description?: string | undefined;
|
|
680
|
+
styleGuide?: {
|
|
681
|
+
targetAudience?: "general" | "technical" | "non-technical" | undefined;
|
|
682
|
+
toneOfVoice?: "friendly" | "empowering" | "informative" | "supportive" | "elegant" | undefined;
|
|
683
|
+
levelOfFormality?: "informal" | "formal" | "neutral" | undefined;
|
|
684
|
+
generalRule?: "active-voice" | "passive-voice" | undefined;
|
|
685
|
+
} | {
|
|
686
|
+
text: string;
|
|
687
|
+
} | undefined;
|
|
688
|
+
glossary?: {
|
|
689
|
+
term: string;
|
|
690
|
+
description?: string | undefined;
|
|
691
|
+
translatable?: boolean | undefined;
|
|
692
|
+
forbidden?: boolean | undefined;
|
|
693
|
+
caseSensitive?: boolean | undefined;
|
|
694
|
+
translations?: {
|
|
695
|
+
locale: string;
|
|
696
|
+
translation: string;
|
|
697
|
+
description?: string | undefined;
|
|
698
|
+
}[] | undefined;
|
|
699
|
+
}[] | undefined;
|
|
700
|
+
translationExamples?: {
|
|
701
|
+
sourceValue: string;
|
|
702
|
+
translatedValue: string;
|
|
703
|
+
}[] | undefined;
|
|
704
|
+
} | undefined;
|
|
705
|
+
integration?: "FT-OpenAI" | "Claude" | "ChatGPT-4" | "Gemini" | undefined;
|
|
706
|
+
assets?: {
|
|
707
|
+
description?: string | undefined;
|
|
708
|
+
styleGuide?: {
|
|
709
|
+
targetAudience?: "general" | "technical" | "non-technical" | undefined;
|
|
710
|
+
toneOfVoice?: "friendly" | "empowering" | "informative" | "supportive" | "elegant" | undefined;
|
|
711
|
+
levelOfFormality?: "informal" | "formal" | "neutral" | undefined;
|
|
712
|
+
generalRule?: "active-voice" | "passive-voice" | undefined;
|
|
713
|
+
} | {
|
|
714
|
+
text: string;
|
|
715
|
+
} | undefined;
|
|
716
|
+
glossary?: {
|
|
717
|
+
term: string;
|
|
718
|
+
description?: string | undefined;
|
|
719
|
+
translatable?: boolean | undefined;
|
|
720
|
+
forbidden?: boolean | undefined;
|
|
721
|
+
caseSensitive?: boolean | undefined;
|
|
722
|
+
translations?: {
|
|
723
|
+
locale: string;
|
|
724
|
+
translation: string;
|
|
725
|
+
description?: string | undefined;
|
|
726
|
+
}[] | undefined;
|
|
727
|
+
}[] | undefined;
|
|
728
|
+
translationExamples?: {
|
|
729
|
+
sourceValue: string;
|
|
730
|
+
translatedValue: string;
|
|
731
|
+
}[] | undefined;
|
|
732
|
+
} | undefined;
|
|
733
|
+
forceIntegration?: boolean | undefined;
|
|
601
734
|
history?: {
|
|
602
735
|
values: [string, ...string[]];
|
|
603
736
|
mode: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import z from 'zod';
|
|
2
2
|
import { ASYNC_REQUEST_SCHEMA, AsyncRequestCallbackStatusEnum, } from '../common/asyncRequestSchemas.js';
|
|
3
|
-
import { AI_INTEGRATION_ENGINE_SCHEMA, COMMON_ERROR_RESPONSE_SCHEMA, COMMON_FAILED_OPERATION_CALLBACK_SCHEMA, COMMON_REQUEST_HEADERS_SCHEMA, LOCALE_SCHEMA, } from '../common/commonSchemas.js';
|
|
3
|
+
import { AI_INTEGRATION_ENGINE_SCHEMA, COMMON_ERROR_RESPONSE_SCHEMA, COMMON_FAILED_OPERATION_CALLBACK_SCHEMA, COMMON_REQUEST_HEADERS_SCHEMA, FORCE_INTEGRATION_SCHEMA, LOCALE_SCHEMA, refineIntegrationIsPresent, } from '../common/commonSchemas.js';
|
|
4
4
|
import { TEXT_REWRITING_CONTEXT } from '../common/translationContextSchemas.js';
|
|
5
5
|
import { CONTENT_ID_PROP_SCHEMA, HISTORY_REQUEST_SCHEMA, REWRITE_CONTENT_UNIT_SCHEMA, SEGMENT_WARNINGS_SCHEMA, VariantsModeEnum, refineRequestSizeLimit, refineSingleSegmentSizeLimit, refineUniqueIds, } from './sharedSchemas.js';
|
|
6
6
|
export const REWRITE_TEXT_SEGMENT_BODY_SCHEMA = z
|
|
@@ -10,6 +10,7 @@ export const REWRITE_TEXT_SEGMENT_BODY_SCHEMA = z
|
|
|
10
10
|
locale: LOCALE_SCHEMA,
|
|
11
11
|
value: z.string().min(1).describe('Text to generate variants for'),
|
|
12
12
|
integration: AI_INTEGRATION_ENGINE_SCHEMA.optional(),
|
|
13
|
+
forceIntegration: FORCE_INTEGRATION_SCHEMA.optional(),
|
|
13
14
|
history: z
|
|
14
15
|
.array(HISTORY_REQUEST_SCHEMA)
|
|
15
16
|
.describe('A list of other previously created variations for this text')
|
|
@@ -20,7 +21,8 @@ export const REWRITE_TEXT_SEGMENT_BODY_SCHEMA = z
|
|
|
20
21
|
.pipe(z.nativeEnum(VariantsModeEnum))
|
|
21
22
|
.describe('A specific way of how a new variant is generated. If `rephrase`, it simply gets reworded, if `shorten` - AI tries to also make the translation shorter.'),
|
|
22
23
|
})
|
|
23
|
-
.refine(...refineSingleSegmentSizeLimit)
|
|
24
|
+
.refine(...refineSingleSegmentSizeLimit)
|
|
25
|
+
.refine(...refineIntegrationIsPresent);
|
|
24
26
|
export const REWRITE_TEXT_SEGMENT_RESPONSE_SCHEMA = z
|
|
25
27
|
.object({
|
|
26
28
|
generatedAt: z.string().datetime(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rewriteTextSchemas.js","sourceRoot":"","sources":["../../../../src/sdk/schemas/translation/rewriteTextSchemas.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAA;AACnB,OAAO,EACL,oBAAoB,EACpB,8BAA8B,GAC/B,MAAM,kCAAkC,CAAA;AACzC,OAAO,EACL,4BAA4B,EAC5B,4BAA4B,EAC5B,uCAAuC,EACvC,6BAA6B,EAC7B,aAAa,
|
|
1
|
+
{"version":3,"file":"rewriteTextSchemas.js","sourceRoot":"","sources":["../../../../src/sdk/schemas/translation/rewriteTextSchemas.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAA;AACnB,OAAO,EACL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;QACP,aAAa,EAAE,sBAAsB;QACrC,SAAS,EAAE,sBAAsB;QACjC,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;QACvB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;QACrB,QAAQ,EAAE,uBAAuB,CAAC,QAAQ,EAAE;KAC7C,CAAC,CACH;IACD,MAAM,EAAE,CAAC;SACN,KAAK,CACJ,4BAA4B,CAAC,MAAM,CAAC;QAClC,aAAa,EAAE,sBAAsB;QACrC,SAAS,EAAE,sBAAsB;QACjC,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE;QACzB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;KACxB,CAAC,CACH;SACA,QAAQ,EAAE;CACd,CAAC;KACD,QAAQ,CAAC,wBAAwB,CAAC,CAAA;AAErC,MAAM,CAAC,MAAM,kCAAkC,GAAG,CAAC;KAChD,kBAAkB,CAAC,QAAQ,EAAE;IAC5B,iCAAiC;IACjC,uCAAuC;CACxC,CAAC;KACD,QAAQ,CAAC,wBAAwB,CAAC,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import z from 'zod';
|
|
2
|
-
export declare const TRANSLATE_ASYNC_BODY_SCHEMA: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodObject<z.objectUtil.extendShape<{
|
|
2
|
+
export declare const TRANSLATE_ASYNC_BODY_SCHEMA: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodObject<z.objectUtil.extendShape<{
|
|
3
3
|
originCorrelationId: z.ZodString;
|
|
4
4
|
ownerId: z.ZodString;
|
|
5
5
|
callbackUrl: z.ZodString;
|
|
@@ -16,6 +16,7 @@ export declare const TRANSLATE_ASYNC_BODY_SCHEMA: z.ZodEffects<z.ZodEffects<z.Zo
|
|
|
16
16
|
readonly GOOGLE_TRANSLATE: "GoogleTranslate";
|
|
17
17
|
readonly MICROSOFT_TRANSLATOR: "MicrosoftTranslator";
|
|
18
18
|
}>>;
|
|
19
|
+
forceIntegration: z.ZodOptional<z.ZodBoolean>;
|
|
19
20
|
pickIntegrationByScore: z.ZodDefault<z.ZodBoolean>;
|
|
20
21
|
includeScore: z.ZodDefault<z.ZodBoolean>;
|
|
21
22
|
context: z.ZodOptional<z.ZodObject<{
|
|
@@ -505,6 +506,7 @@ export declare const TRANSLATE_ASYNC_BODY_SCHEMA: z.ZodEffects<z.ZodEffects<z.Zo
|
|
|
505
506
|
}[] | undefined;
|
|
506
507
|
} | undefined;
|
|
507
508
|
integration?: "FT-OpenAI" | "Claude" | "ChatGPT-4" | "Gemini" | "DeepL" | "GoogleTranslate" | "MicrosoftTranslator" | undefined;
|
|
509
|
+
forceIntegration?: boolean | undefined;
|
|
508
510
|
metadata?: Record<string, string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | {
|
|
509
511
|
[key: string]: string | number | boolean | /*elided*/ any | /*elided*/ any | null;
|
|
510
512
|
} | null)[] | {
|
|
@@ -609,6 +611,7 @@ export declare const TRANSLATE_ASYNC_BODY_SCHEMA: z.ZodEffects<z.ZodEffects<z.Zo
|
|
|
609
611
|
}[] | undefined;
|
|
610
612
|
} | undefined;
|
|
611
613
|
integration?: "FT-OpenAI" | "Claude" | "ChatGPT-4" | "Gemini" | "DeepL" | "GoogleTranslate" | "MicrosoftTranslator" | undefined;
|
|
614
|
+
forceIntegration?: boolean | undefined;
|
|
612
615
|
pickIntegrationByScore?: boolean | undefined;
|
|
613
616
|
includeScore?: boolean | undefined;
|
|
614
617
|
metadata?: Record<string, string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | {
|
|
@@ -717,6 +720,7 @@ export declare const TRANSLATE_ASYNC_BODY_SCHEMA: z.ZodEffects<z.ZodEffects<z.Zo
|
|
|
717
720
|
}[] | undefined;
|
|
718
721
|
} | undefined;
|
|
719
722
|
integration?: "FT-OpenAI" | "Claude" | "ChatGPT-4" | "Gemini" | "DeepL" | "GoogleTranslate" | "MicrosoftTranslator" | undefined;
|
|
723
|
+
forceIntegration?: boolean | undefined;
|
|
720
724
|
metadata?: Record<string, string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | {
|
|
721
725
|
[key: string]: string | number | boolean | /*elided*/ any | /*elided*/ any | null;
|
|
722
726
|
} | null)[] | {
|
|
@@ -821,6 +825,7 @@ export declare const TRANSLATE_ASYNC_BODY_SCHEMA: z.ZodEffects<z.ZodEffects<z.Zo
|
|
|
821
825
|
}[] | undefined;
|
|
822
826
|
} | undefined;
|
|
823
827
|
integration?: "FT-OpenAI" | "Claude" | "ChatGPT-4" | "Gemini" | "DeepL" | "GoogleTranslate" | "MicrosoftTranslator" | undefined;
|
|
828
|
+
forceIntegration?: boolean | undefined;
|
|
824
829
|
pickIntegrationByScore?: boolean | undefined;
|
|
825
830
|
includeScore?: boolean | undefined;
|
|
826
831
|
metadata?: Record<string, string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | {
|
|
@@ -929,6 +934,7 @@ export declare const TRANSLATE_ASYNC_BODY_SCHEMA: z.ZodEffects<z.ZodEffects<z.Zo
|
|
|
929
934
|
}[] | undefined;
|
|
930
935
|
} | undefined;
|
|
931
936
|
integration?: "FT-OpenAI" | "Claude" | "ChatGPT-4" | "Gemini" | "DeepL" | "GoogleTranslate" | "MicrosoftTranslator" | undefined;
|
|
937
|
+
forceIntegration?: boolean | undefined;
|
|
932
938
|
metadata?: Record<string, string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | {
|
|
933
939
|
[key: string]: string | number | boolean | /*elided*/ any | /*elided*/ any | null;
|
|
934
940
|
} | null)[] | {
|
|
@@ -1033,6 +1039,7 @@ export declare const TRANSLATE_ASYNC_BODY_SCHEMA: z.ZodEffects<z.ZodEffects<z.Zo
|
|
|
1033
1039
|
}[] | undefined;
|
|
1034
1040
|
} | undefined;
|
|
1035
1041
|
integration?: "FT-OpenAI" | "Claude" | "ChatGPT-4" | "Gemini" | "DeepL" | "GoogleTranslate" | "MicrosoftTranslator" | undefined;
|
|
1042
|
+
forceIntegration?: boolean | undefined;
|
|
1036
1043
|
pickIntegrationByScore?: boolean | undefined;
|
|
1037
1044
|
includeScore?: boolean | undefined;
|
|
1038
1045
|
metadata?: Record<string, string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | {
|
|
@@ -1141,6 +1148,7 @@ export declare const TRANSLATE_ASYNC_BODY_SCHEMA: z.ZodEffects<z.ZodEffects<z.Zo
|
|
|
1141
1148
|
}[] | undefined;
|
|
1142
1149
|
} | undefined;
|
|
1143
1150
|
integration?: "FT-OpenAI" | "Claude" | "ChatGPT-4" | "Gemini" | "DeepL" | "GoogleTranslate" | "MicrosoftTranslator" | undefined;
|
|
1151
|
+
forceIntegration?: boolean | undefined;
|
|
1144
1152
|
metadata?: Record<string, string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | {
|
|
1145
1153
|
[key: string]: string | number | boolean | /*elided*/ any | /*elided*/ any | null;
|
|
1146
1154
|
} | null)[] | {
|
|
@@ -1245,6 +1253,221 @@ export declare const TRANSLATE_ASYNC_BODY_SCHEMA: z.ZodEffects<z.ZodEffects<z.Zo
|
|
|
1245
1253
|
}[] | undefined;
|
|
1246
1254
|
} | undefined;
|
|
1247
1255
|
integration?: "FT-OpenAI" | "Claude" | "ChatGPT-4" | "Gemini" | "DeepL" | "GoogleTranslate" | "MicrosoftTranslator" | undefined;
|
|
1256
|
+
forceIntegration?: boolean | undefined;
|
|
1257
|
+
pickIntegrationByScore?: boolean | undefined;
|
|
1258
|
+
includeScore?: boolean | undefined;
|
|
1259
|
+
metadata?: Record<string, string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | {
|
|
1260
|
+
[key: string]: string | number | boolean | /*elided*/ any | /*elided*/ any | null;
|
|
1261
|
+
} | null)[] | {
|
|
1262
|
+
[key: string]: string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
1263
|
+
} | null)[] | {
|
|
1264
|
+
[key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
1265
|
+
} | null)[] | {
|
|
1266
|
+
[key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
1267
|
+
} | null)[] | {
|
|
1268
|
+
[key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
1269
|
+
} | null)[] | {
|
|
1270
|
+
[key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
1271
|
+
} | null)[] | {
|
|
1272
|
+
[key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
1273
|
+
} | null)[] | {
|
|
1274
|
+
[key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
1275
|
+
} | null)[] | {
|
|
1276
|
+
[key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
1277
|
+
} | null)[] | {
|
|
1278
|
+
[key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
1279
|
+
} | null)[] | {
|
|
1280
|
+
[key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
1281
|
+
} | null)[] | {
|
|
1282
|
+
[key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
1283
|
+
} | null> | undefined;
|
|
1284
|
+
}>, {
|
|
1285
|
+
originCorrelationId: string;
|
|
1286
|
+
ownerId: string;
|
|
1287
|
+
callbackUrl: string;
|
|
1288
|
+
callbackToken: string;
|
|
1289
|
+
sourceLocale: string;
|
|
1290
|
+
contentUnits: [{
|
|
1291
|
+
id: string;
|
|
1292
|
+
segments: [{
|
|
1293
|
+
value: string;
|
|
1294
|
+
id: string;
|
|
1295
|
+
tmMatch?: {
|
|
1296
|
+
sourceValue: string;
|
|
1297
|
+
translatedValue: string;
|
|
1298
|
+
} | undefined;
|
|
1299
|
+
}, ...{
|
|
1300
|
+
value: string;
|
|
1301
|
+
id: string;
|
|
1302
|
+
tmMatch?: {
|
|
1303
|
+
sourceValue: string;
|
|
1304
|
+
translatedValue: string;
|
|
1305
|
+
} | undefined;
|
|
1306
|
+
}[]];
|
|
1307
|
+
context?: {
|
|
1308
|
+
description: string;
|
|
1309
|
+
} | undefined;
|
|
1310
|
+
characterLimit?: number | undefined;
|
|
1311
|
+
}, ...{
|
|
1312
|
+
id: string;
|
|
1313
|
+
segments: [{
|
|
1314
|
+
value: string;
|
|
1315
|
+
id: string;
|
|
1316
|
+
tmMatch?: {
|
|
1317
|
+
sourceValue: string;
|
|
1318
|
+
translatedValue: string;
|
|
1319
|
+
} | undefined;
|
|
1320
|
+
}, ...{
|
|
1321
|
+
value: string;
|
|
1322
|
+
id: string;
|
|
1323
|
+
tmMatch?: {
|
|
1324
|
+
sourceValue: string;
|
|
1325
|
+
translatedValue: string;
|
|
1326
|
+
} | undefined;
|
|
1327
|
+
}[]];
|
|
1328
|
+
context?: {
|
|
1329
|
+
description: string;
|
|
1330
|
+
} | undefined;
|
|
1331
|
+
characterLimit?: number | undefined;
|
|
1332
|
+
}[]];
|
|
1333
|
+
targetLocale: string;
|
|
1334
|
+
pickIntegrationByScore: boolean;
|
|
1335
|
+
includeScore: boolean;
|
|
1336
|
+
context?: {
|
|
1337
|
+
description?: string | undefined;
|
|
1338
|
+
styleGuide?: {
|
|
1339
|
+
targetAudience?: "general" | "technical" | "non-technical" | undefined;
|
|
1340
|
+
toneOfVoice?: "friendly" | "empowering" | "informative" | "supportive" | "elegant" | undefined;
|
|
1341
|
+
levelOfFormality?: "informal" | "formal" | "neutral" | undefined;
|
|
1342
|
+
generalRule?: "active-voice" | "passive-voice" | undefined;
|
|
1343
|
+
} | {
|
|
1344
|
+
text: string;
|
|
1345
|
+
} | undefined;
|
|
1346
|
+
glossary?: {
|
|
1347
|
+
term: string;
|
|
1348
|
+
translatable: boolean;
|
|
1349
|
+
forbidden: boolean;
|
|
1350
|
+
caseSensitive: boolean;
|
|
1351
|
+
description?: string | undefined;
|
|
1352
|
+
translations?: {
|
|
1353
|
+
locale: string;
|
|
1354
|
+
translation: string;
|
|
1355
|
+
description?: string | undefined;
|
|
1356
|
+
}[] | undefined;
|
|
1357
|
+
}[] | undefined;
|
|
1358
|
+
targetPluralForms?: ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined;
|
|
1359
|
+
translationExamples?: {
|
|
1360
|
+
sourceValue: string;
|
|
1361
|
+
translatedValue: string;
|
|
1362
|
+
}[] | undefined;
|
|
1363
|
+
} | undefined;
|
|
1364
|
+
integration?: "FT-OpenAI" | "Claude" | "ChatGPT-4" | "Gemini" | "DeepL" | "GoogleTranslate" | "MicrosoftTranslator" | undefined;
|
|
1365
|
+
forceIntegration?: boolean | undefined;
|
|
1366
|
+
metadata?: Record<string, string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | {
|
|
1367
|
+
[key: string]: string | number | boolean | /*elided*/ any | /*elided*/ any | null;
|
|
1368
|
+
} | null)[] | {
|
|
1369
|
+
[key: string]: string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
1370
|
+
} | null)[] | {
|
|
1371
|
+
[key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
1372
|
+
} | null)[] | {
|
|
1373
|
+
[key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
1374
|
+
} | null)[] | {
|
|
1375
|
+
[key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
1376
|
+
} | null)[] | {
|
|
1377
|
+
[key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
1378
|
+
} | null)[] | {
|
|
1379
|
+
[key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
1380
|
+
} | null)[] | {
|
|
1381
|
+
[key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
1382
|
+
} | null)[] | {
|
|
1383
|
+
[key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
1384
|
+
} | null)[] | {
|
|
1385
|
+
[key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
1386
|
+
} | null)[] | {
|
|
1387
|
+
[key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
1388
|
+
} | null)[] | {
|
|
1389
|
+
[key: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null)[] | /*elided*/ any | null;
|
|
1390
|
+
} | null> | undefined;
|
|
1391
|
+
}, {
|
|
1392
|
+
originCorrelationId: string;
|
|
1393
|
+
ownerId: string;
|
|
1394
|
+
callbackUrl: string;
|
|
1395
|
+
callbackToken: string;
|
|
1396
|
+
sourceLocale: string;
|
|
1397
|
+
contentUnits: [{
|
|
1398
|
+
id: string;
|
|
1399
|
+
segments: [{
|
|
1400
|
+
value: string;
|
|
1401
|
+
id: string;
|
|
1402
|
+
tmMatch?: {
|
|
1403
|
+
sourceValue: string;
|
|
1404
|
+
translatedValue: string;
|
|
1405
|
+
} | undefined;
|
|
1406
|
+
}, ...{
|
|
1407
|
+
value: string;
|
|
1408
|
+
id: string;
|
|
1409
|
+
tmMatch?: {
|
|
1410
|
+
sourceValue: string;
|
|
1411
|
+
translatedValue: string;
|
|
1412
|
+
} | undefined;
|
|
1413
|
+
}[]];
|
|
1414
|
+
context?: {
|
|
1415
|
+
description: string;
|
|
1416
|
+
} | undefined;
|
|
1417
|
+
characterLimit?: number | undefined;
|
|
1418
|
+
}, ...{
|
|
1419
|
+
id: string;
|
|
1420
|
+
segments: [{
|
|
1421
|
+
value: string;
|
|
1422
|
+
id: string;
|
|
1423
|
+
tmMatch?: {
|
|
1424
|
+
sourceValue: string;
|
|
1425
|
+
translatedValue: string;
|
|
1426
|
+
} | undefined;
|
|
1427
|
+
}, ...{
|
|
1428
|
+
value: string;
|
|
1429
|
+
id: string;
|
|
1430
|
+
tmMatch?: {
|
|
1431
|
+
sourceValue: string;
|
|
1432
|
+
translatedValue: string;
|
|
1433
|
+
} | undefined;
|
|
1434
|
+
}[]];
|
|
1435
|
+
context?: {
|
|
1436
|
+
description: string;
|
|
1437
|
+
} | undefined;
|
|
1438
|
+
characterLimit?: number | undefined;
|
|
1439
|
+
}[]];
|
|
1440
|
+
targetLocale: string;
|
|
1441
|
+
context?: {
|
|
1442
|
+
description?: string | undefined;
|
|
1443
|
+
styleGuide?: {
|
|
1444
|
+
targetAudience?: "general" | "technical" | "non-technical" | undefined;
|
|
1445
|
+
toneOfVoice?: "friendly" | "empowering" | "informative" | "supportive" | "elegant" | undefined;
|
|
1446
|
+
levelOfFormality?: "informal" | "formal" | "neutral" | undefined;
|
|
1447
|
+
generalRule?: "active-voice" | "passive-voice" | undefined;
|
|
1448
|
+
} | {
|
|
1449
|
+
text: string;
|
|
1450
|
+
} | undefined;
|
|
1451
|
+
glossary?: {
|
|
1452
|
+
term: string;
|
|
1453
|
+
description?: string | undefined;
|
|
1454
|
+
translatable?: boolean | undefined;
|
|
1455
|
+
forbidden?: boolean | undefined;
|
|
1456
|
+
caseSensitive?: boolean | undefined;
|
|
1457
|
+
translations?: {
|
|
1458
|
+
locale: string;
|
|
1459
|
+
translation: string;
|
|
1460
|
+
description?: string | undefined;
|
|
1461
|
+
}[] | undefined;
|
|
1462
|
+
}[] | undefined;
|
|
1463
|
+
targetPluralForms?: ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined;
|
|
1464
|
+
translationExamples?: {
|
|
1465
|
+
sourceValue: string;
|
|
1466
|
+
translatedValue: string;
|
|
1467
|
+
}[] | undefined;
|
|
1468
|
+
} | undefined;
|
|
1469
|
+
integration?: "FT-OpenAI" | "Claude" | "ChatGPT-4" | "Gemini" | "DeepL" | "GoogleTranslate" | "MicrosoftTranslator" | undefined;
|
|
1470
|
+
forceIntegration?: boolean | undefined;
|
|
1248
1471
|
pickIntegrationByScore?: boolean | undefined;
|
|
1249
1472
|
includeScore?: boolean | undefined;
|
|
1250
1473
|
metadata?: Record<string, string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import z from 'zod';
|
|
2
2
|
import { ASYNC_REQUEST_SCHEMA, AsyncRequestCallbackStatusEnum, } from '../common/asyncRequestSchemas.js';
|
|
3
|
-
import { COMMON_ERROR_RESPONSE_SCHEMA, COMMON_FAILED_OPERATION_CALLBACK_SCHEMA, COMMON_REQUEST_HEADERS_SCHEMA, LOCALE_SCHEMA, METADATA_SCHEMA, REAL_INTEGRATION_ENGINE_SCHEMA, } from '../common/commonSchemas.js';
|
|
3
|
+
import { COMMON_ERROR_RESPONSE_SCHEMA, COMMON_FAILED_OPERATION_CALLBACK_SCHEMA, COMMON_REQUEST_HEADERS_SCHEMA, FORCE_INTEGRATION_SCHEMA, LOCALE_SCHEMA, METADATA_SCHEMA, REAL_INTEGRATION_ENGINE_SCHEMA, refineIntegrationIsPresent, } from '../common/commonSchemas.js';
|
|
4
4
|
import { TRANSLATION_CONTEXT_SCHEMA } from '../common/translationContextSchemas.js';
|
|
5
5
|
import { LqaIssueSeverityEnum } from '../lqa/commonSchemas.js';
|
|
6
6
|
import { CONTENT_ID_PROP_SCHEMA, SEGMENT_WARNINGS_SCHEMA, TRANSLATE_CONTENT_UNIT_SCHEMA, refineDifferentSourceAndTargetLang, refineRequestSizeLimit, refineUniqueIds, } from './sharedSchemas.js';
|
|
@@ -9,6 +9,7 @@ export const TRANSLATE_ASYNC_BODY_SCHEMA = ASYNC_REQUEST_SCHEMA.extend({
|
|
|
9
9
|
sourceLocale: LOCALE_SCHEMA,
|
|
10
10
|
targetLocale: LOCALE_SCHEMA,
|
|
11
11
|
integration: REAL_INTEGRATION_ENGINE_SCHEMA.optional(),
|
|
12
|
+
forceIntegration: FORCE_INTEGRATION_SCHEMA.optional(),
|
|
12
13
|
pickIntegrationByScore: z
|
|
13
14
|
.boolean()
|
|
14
15
|
.default(false)
|
|
@@ -27,6 +28,7 @@ export const TRANSLATE_ASYNC_BODY_SCHEMA = ASYNC_REQUEST_SCHEMA.extend({
|
|
|
27
28
|
})
|
|
28
29
|
.refine(...refineDifferentSourceAndTargetLang)
|
|
29
30
|
.refine(...refineRequestSizeLimit)
|
|
31
|
+
.refine(...refineIntegrationIsPresent)
|
|
30
32
|
.refine((data) => {
|
|
31
33
|
return !(data.integration && data.pickIntegrationByScore);
|
|
32
34
|
}, 'Forced integration cannot be specified when "pickIntegrationByScore" is enabled.');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translateAsyncSchemas.js","sourceRoot":"","sources":["../../../../src/sdk/schemas/translation/translateAsyncSchemas.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAA;AACnB,OAAO,EACL,oBAAoB,EACpB,8BAA8B,GAC/B,MAAM,kCAAkC,CAAA;AACzC,OAAO,EACL,4BAA4B,EAC5B,uCAAuC,EACvC,6BAA6B,EAC7B,aAAa,EACb,eAAe,EACf,8BAA8B,
|
|
1
|
+
{"version":3,"file":"translateAsyncSchemas.js","sourceRoot":"","sources":["../../../../src/sdk/schemas/translation/translateAsyncSchemas.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAA;AACnB,OAAO,EACL,oBAAoB,EACpB,8BAA8B,GAC/B,MAAM,kCAAkC,CAAA;AACzC,OAAO,EACL,4BAA4B,EAC5B,uCAAuC,EACvC,6BAA6B,EAC7B,wBAAwB,EACxB,aAAa,EACb,eAAe,EACf,8BAA8B,EAC9B,0BAA0B,GAC3B,MAAM,4BAA4B,CAAA;AACnC,OAAO,EAAE,0BAA0B,EAAE,MAAM,wCAAwC,CAAA;AACnF,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAA;AAC9D,OAAO,EACL,sBAAsB,EACtB,uBAAuB,EACvB,6BAA6B,EAC7B,kCAAkC,EAClC,sBAAsB,EACtB,eAAe,GAChB,MAAM,oBAAoB,CAAA;AAE3B,MAAM,wBAAwB,GAAG,EAAE,CAAA;AAEnC,MAAM,CAAC,MAAM,2BAA2B,GAAG,oBAAoB,CAAC,MAAM,CAAC;IACrE,YAAY,EAAE,aAAa;IAC3B,YAAY,EAAE,aAAa;IAC3B,WAAW,EAAE,8BAA8B,CAAC,QAAQ,EAAE;IACtD,gBAAgB,EAAE,wBAAwB,CAAC,QAAQ,EAAE;IACrD,sBAAsB,EAAE,CAAC;SACtB,OAAO,EAAE;SACT,OAAO,CAAC,KAAK,CAAC;SACd,QAAQ,CACP,8RAA8R,CAC/R;IACH,YAAY,EAAE,CAAC;SACZ,OAAO,EAAE;SACT,OAAO,CAAC,KAAK,CAA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