@lokalise/polyglot-sdk 12.7.0 → 13.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/dist/index.d.ts +6 -6
  2. package/dist/index.js +10 -23
  3. package/dist/index.js.map +1 -1
  4. package/dist/sdk/PolyglotClient.d.ts +6 -6
  5. package/dist/sdk/PolyglotClient.js +8 -7
  6. package/dist/sdk/PolyglotClient.js.map +1 -1
  7. package/dist/sdk/schemas/common/asyncRequestSchemas.d.ts +6 -3
  8. package/dist/sdk/schemas/common/asyncRequestSchemas.js +5 -2
  9. package/dist/sdk/schemas/common/asyncRequestSchemas.js.map +1 -1
  10. package/dist/sdk/schemas/common/commonSchemas.d.ts +24 -0
  11. package/dist/sdk/schemas/common/commonSchemas.js +31 -1
  12. package/dist/sdk/schemas/common/commonSchemas.js.map +1 -1
  13. package/dist/sdk/schemas/common/errorSchemas.d.ts +85 -0
  14. package/dist/sdk/schemas/common/errorSchemas.js +29 -0
  15. package/dist/sdk/schemas/common/errorSchemas.js.map +1 -0
  16. package/dist/sdk/schemas/lqa/{lqaAsyncV1Schemas.d.ts → lqaAsyncSchemas.d.ts} +265 -11
  17. package/dist/sdk/schemas/lqa/{lqaAsyncV1Schemas.js → lqaAsyncSchemas.js} +14 -10
  18. package/dist/sdk/schemas/lqa/lqaAsyncSchemas.js.map +1 -0
  19. package/dist/sdk/schemas/lqa/lqaSyncV2Schemas.js +2 -2
  20. package/dist/sdk/schemas/lqa/lqaSyncV2Schemas.js.map +1 -1
  21. package/dist/sdk/schemas/translation/sharedSchemas.d.ts +154 -0
  22. package/dist/sdk/schemas/translation/sharedSchemas.js +32 -1
  23. package/dist/sdk/schemas/translation/sharedSchemas.js.map +1 -1
  24. package/dist/sdk/schemas/translation/{translateAsyncV2Schemas.d.ts → translateAsyncSchemas.d.ts} +404 -153
  25. package/dist/sdk/schemas/translation/translateAsyncSchemas.js +66 -0
  26. package/dist/sdk/schemas/translation/translateAsyncSchemas.js.map +1 -0
  27. package/dist/sdk/schemas/translation/{translateSyncV2Schemas.d.ts → translateSyncSchemas.d.ts} +157 -147
  28. package/dist/sdk/schemas/translation/translateSyncSchemas.js +46 -0
  29. package/dist/sdk/schemas/translation/translateSyncSchemas.js.map +1 -0
  30. package/dist/sdk/validation/isSegmentExceedingLengthLimit.d.ts +0 -1
  31. package/dist/sdk/validation/isSegmentExceedingLengthLimit.js +3 -3
  32. package/dist/sdk/validation/isSegmentExceedingLengthLimit.js.map +1 -1
  33. package/dist/sdk/validation/requestSizeLimit.d.ts +14 -0
  34. package/dist/sdk/validation/requestSizeLimit.js +36 -0
  35. package/dist/sdk/validation/requestSizeLimit.js.map +1 -0
  36. package/package.json +5 -5
  37. package/dist/sdk/schemas/lqa/lqaAsyncV1Schemas.js.map +0 -1
  38. package/dist/sdk/schemas/translation/translateAsyncV2Schemas.js +0 -85
  39. package/dist/sdk/schemas/translation/translateAsyncV2Schemas.js.map +0 -1
  40. package/dist/sdk/schemas/translation/translateSyncV2Schemas.js +0 -74
  41. package/dist/sdk/schemas/translation/translateSyncV2Schemas.js.map +0 -1
@@ -1,142 +1,5 @@
1
1
  import z from 'zod';
2
- export declare const TRANSLATE_SYNC_V2_SEGMENT_SCHEMA: z.ZodObject<{
3
- id: z.ZodString;
4
- tmMatch: z.ZodOptional<z.ZodObject<{
5
- sourceValue: z.ZodString;
6
- translatedValue: z.ZodString;
7
- }, "strip", z.ZodTypeAny, {
8
- sourceValue: string;
9
- translatedValue: string;
10
- }, {
11
- sourceValue: string;
12
- translatedValue: string;
13
- }>>;
14
- value: z.ZodEffects<z.ZodString, string, string>;
15
- }, "strip", z.ZodTypeAny, {
16
- value: string;
17
- id: string;
18
- tmMatch?: {
19
- sourceValue: string;
20
- translatedValue: string;
21
- } | undefined;
22
- }, {
23
- value: string;
24
- id: string;
25
- tmMatch?: {
26
- sourceValue: string;
27
- translatedValue: string;
28
- } | undefined;
29
- }>;
30
- export declare const TRANSLATE_SYNC_V2_CONTENT_UNIT_SCHEMA: z.ZodObject<{
31
- id: z.ZodString;
32
- context: z.ZodOptional<z.ZodObject<{
33
- description: z.ZodString;
34
- }, "strip", z.ZodTypeAny, {
35
- description: string;
36
- }, {
37
- description: string;
38
- }>>;
39
- characterLimit: z.ZodOptional<z.ZodNumber>;
40
- segments: z.ZodEffects<z.ZodArray<z.ZodObject<{
41
- id: z.ZodString;
42
- tmMatch: z.ZodOptional<z.ZodObject<{
43
- sourceValue: z.ZodString;
44
- translatedValue: z.ZodString;
45
- }, "strip", z.ZodTypeAny, {
46
- sourceValue: string;
47
- translatedValue: string;
48
- }, {
49
- sourceValue: string;
50
- translatedValue: string;
51
- }>>;
52
- value: z.ZodEffects<z.ZodString, string, string>;
53
- }, "strip", z.ZodTypeAny, {
54
- value: string;
55
- id: string;
56
- tmMatch?: {
57
- sourceValue: string;
58
- translatedValue: string;
59
- } | undefined;
60
- }, {
61
- value: string;
62
- id: string;
63
- tmMatch?: {
64
- sourceValue: string;
65
- translatedValue: string;
66
- } | undefined;
67
- }>, "atleastone">, [{
68
- value: string;
69
- id: string;
70
- tmMatch?: {
71
- sourceValue: string;
72
- translatedValue: string;
73
- } | undefined;
74
- }, ...{
75
- value: string;
76
- id: string;
77
- tmMatch?: {
78
- sourceValue: string;
79
- translatedValue: string;
80
- } | undefined;
81
- }[]], [{
82
- value: string;
83
- id: string;
84
- tmMatch?: {
85
- sourceValue: string;
86
- translatedValue: string;
87
- } | undefined;
88
- }, ...{
89
- value: string;
90
- id: string;
91
- tmMatch?: {
92
- sourceValue: string;
93
- translatedValue: string;
94
- } | undefined;
95
- }[]]>;
96
- }, "strip", z.ZodTypeAny, {
97
- id: string;
98
- segments: [{
99
- value: string;
100
- id: string;
101
- tmMatch?: {
102
- sourceValue: string;
103
- translatedValue: string;
104
- } | undefined;
105
- }, ...{
106
- value: string;
107
- id: string;
108
- tmMatch?: {
109
- sourceValue: string;
110
- translatedValue: string;
111
- } | undefined;
112
- }[]];
113
- context?: {
114
- description: string;
115
- } | undefined;
116
- characterLimit?: number | undefined;
117
- }, {
118
- id: string;
119
- segments: [{
120
- value: string;
121
- id: string;
122
- tmMatch?: {
123
- sourceValue: string;
124
- translatedValue: string;
125
- } | undefined;
126
- }, ...{
127
- value: string;
128
- id: string;
129
- tmMatch?: {
130
- sourceValue: string;
131
- translatedValue: string;
132
- } | undefined;
133
- }[]];
134
- context?: {
135
- description: string;
136
- } | undefined;
137
- characterLimit?: number | undefined;
138
- }>;
139
- export declare const TRANSLATE_SYNC_V2_BODY_SCHEMA: z.ZodEffects<z.ZodObject<{
2
+ export declare const TRANSLATE_SYNC_V2_BODY_SCHEMA: z.ZodEffects<z.ZodEffects<z.ZodObject<{
140
3
  tenantId: z.ZodOptional<z.ZodString>;
141
4
  ownerId: z.ZodOptional<z.ZodString>;
142
5
  sourceLocale: z.ZodEffects<z.ZodString, string, string>;
@@ -317,7 +180,7 @@ export declare const TRANSLATE_SYNC_V2_BODY_SCHEMA: z.ZodEffects<z.ZodObject<{
317
180
  sourceValue: string;
318
181
  translatedValue: string;
319
182
  }>>;
320
- value: z.ZodEffects<z.ZodString, string, string>;
183
+ value: z.ZodString;
321
184
  }, "strip", z.ZodTypeAny, {
322
185
  value: string;
323
186
  id: string;
@@ -535,7 +398,6 @@ export declare const TRANSLATE_SYNC_V2_BODY_SCHEMA: z.ZodEffects<z.ZodObject<{
535
398
  }[]];
536
399
  targetLocale: string;
537
400
  ownerId?: string | undefined;
538
- tenantId?: string | undefined;
539
401
  context?: {
540
402
  description?: string | undefined;
541
403
  styleGuide?: {
@@ -561,6 +423,7 @@ export declare const TRANSLATE_SYNC_V2_BODY_SCHEMA: z.ZodEffects<z.ZodObject<{
561
423
  targetPluralForms?: ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined;
562
424
  } | undefined;
563
425
  integration?: "Claude" | "ChatGPT-4" | "Gemini" | "DeepL" | "GoogleTranslate" | "MicrosoftTranslator" | undefined;
426
+ tenantId?: string | undefined;
564
427
  }, {
565
428
  sourceLocale: string;
566
429
  contentUnits: [{
@@ -608,7 +471,6 @@ export declare const TRANSLATE_SYNC_V2_BODY_SCHEMA: z.ZodEffects<z.ZodObject<{
608
471
  }[]];
609
472
  targetLocale: string;
610
473
  ownerId?: string | undefined;
611
- tenantId?: string | undefined;
612
474
  context?: {
613
475
  description?: string | undefined;
614
476
  styleGuide?: {
@@ -634,6 +496,7 @@ export declare const TRANSLATE_SYNC_V2_BODY_SCHEMA: z.ZodEffects<z.ZodObject<{
634
496
  targetPluralForms?: ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined;
635
497
  } | undefined;
636
498
  integration?: "Claude" | "ChatGPT-4" | "Gemini" | "DeepL" | "GoogleTranslate" | "MicrosoftTranslator" | undefined;
499
+ tenantId?: string | undefined;
637
500
  }>, {
638
501
  sourceLocale: string;
639
502
  contentUnits: [{
@@ -681,7 +544,6 @@ export declare const TRANSLATE_SYNC_V2_BODY_SCHEMA: z.ZodEffects<z.ZodObject<{
681
544
  }[]];
682
545
  targetLocale: string;
683
546
  ownerId?: string | undefined;
684
- tenantId?: string | undefined;
685
547
  context?: {
686
548
  description?: string | undefined;
687
549
  styleGuide?: {
@@ -707,6 +569,7 @@ export declare const TRANSLATE_SYNC_V2_BODY_SCHEMA: z.ZodEffects<z.ZodObject<{
707
569
  targetPluralForms?: ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined;
708
570
  } | undefined;
709
571
  integration?: "Claude" | "ChatGPT-4" | "Gemini" | "DeepL" | "GoogleTranslate" | "MicrosoftTranslator" | undefined;
572
+ tenantId?: string | undefined;
710
573
  }, {
711
574
  sourceLocale: string;
712
575
  contentUnits: [{
@@ -754,7 +617,152 @@ export declare const TRANSLATE_SYNC_V2_BODY_SCHEMA: z.ZodEffects<z.ZodObject<{
754
617
  }[]];
755
618
  targetLocale: string;
756
619
  ownerId?: string | undefined;
620
+ context?: {
621
+ description?: string | undefined;
622
+ styleGuide?: {
623
+ targetAudience?: "general" | "technical" | "non-technical" | undefined;
624
+ toneOfVoice?: "friendly" | "empowering" | "informative" | "supportive" | "elegant" | undefined;
625
+ levelOfFormality?: "informal" | "formal" | "neutral" | undefined;
626
+ generalRule?: "active-voice" | "passive-voice" | undefined;
627
+ } | {
628
+ text: string;
629
+ } | undefined;
630
+ glossary?: {
631
+ term: string;
632
+ description?: string | undefined;
633
+ translatable?: boolean | undefined;
634
+ forbidden?: boolean | undefined;
635
+ caseSensitive?: boolean | undefined;
636
+ translations?: {
637
+ locale: string;
638
+ translation: string;
639
+ description?: string | undefined;
640
+ }[] | undefined;
641
+ }[] | undefined;
642
+ targetPluralForms?: ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined;
643
+ } | undefined;
644
+ integration?: "Claude" | "ChatGPT-4" | "Gemini" | "DeepL" | "GoogleTranslate" | "MicrosoftTranslator" | undefined;
645
+ tenantId?: string | undefined;
646
+ }>, {
647
+ sourceLocale: string;
648
+ contentUnits: [{
649
+ id: string;
650
+ segments: [{
651
+ value: string;
652
+ id: string;
653
+ tmMatch?: {
654
+ sourceValue: string;
655
+ translatedValue: string;
656
+ } | undefined;
657
+ }, ...{
658
+ value: string;
659
+ id: string;
660
+ tmMatch?: {
661
+ sourceValue: string;
662
+ translatedValue: string;
663
+ } | undefined;
664
+ }[]];
665
+ context?: {
666
+ description: string;
667
+ } | undefined;
668
+ characterLimit?: number | undefined;
669
+ }, ...{
670
+ id: string;
671
+ segments: [{
672
+ value: string;
673
+ id: string;
674
+ tmMatch?: {
675
+ sourceValue: string;
676
+ translatedValue: string;
677
+ } | undefined;
678
+ }, ...{
679
+ value: string;
680
+ id: string;
681
+ tmMatch?: {
682
+ sourceValue: string;
683
+ translatedValue: string;
684
+ } | undefined;
685
+ }[]];
686
+ context?: {
687
+ description: string;
688
+ } | undefined;
689
+ characterLimit?: number | undefined;
690
+ }[]];
691
+ targetLocale: string;
692
+ ownerId?: string | undefined;
693
+ context?: {
694
+ description?: string | undefined;
695
+ styleGuide?: {
696
+ targetAudience?: "general" | "technical" | "non-technical" | undefined;
697
+ toneOfVoice?: "friendly" | "empowering" | "informative" | "supportive" | "elegant" | undefined;
698
+ levelOfFormality?: "informal" | "formal" | "neutral" | undefined;
699
+ generalRule?: "active-voice" | "passive-voice" | undefined;
700
+ } | {
701
+ text: string;
702
+ } | undefined;
703
+ glossary?: {
704
+ term: string;
705
+ translatable: boolean;
706
+ forbidden: boolean;
707
+ caseSensitive: boolean;
708
+ description?: string | undefined;
709
+ translations?: {
710
+ locale: string;
711
+ translation: string;
712
+ description?: string | undefined;
713
+ }[] | undefined;
714
+ }[] | undefined;
715
+ targetPluralForms?: ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined;
716
+ } | undefined;
717
+ integration?: "Claude" | "ChatGPT-4" | "Gemini" | "DeepL" | "GoogleTranslate" | "MicrosoftTranslator" | undefined;
757
718
  tenantId?: string | undefined;
719
+ }, {
720
+ sourceLocale: string;
721
+ contentUnits: [{
722
+ id: string;
723
+ segments: [{
724
+ value: string;
725
+ id: string;
726
+ tmMatch?: {
727
+ sourceValue: string;
728
+ translatedValue: string;
729
+ } | undefined;
730
+ }, ...{
731
+ value: string;
732
+ id: string;
733
+ tmMatch?: {
734
+ sourceValue: string;
735
+ translatedValue: string;
736
+ } | undefined;
737
+ }[]];
738
+ context?: {
739
+ description: string;
740
+ } | undefined;
741
+ characterLimit?: number | undefined;
742
+ }, ...{
743
+ id: string;
744
+ segments: [{
745
+ value: string;
746
+ id: string;
747
+ tmMatch?: {
748
+ sourceValue: string;
749
+ translatedValue: string;
750
+ } | undefined;
751
+ }, ...{
752
+ value: string;
753
+ id: string;
754
+ tmMatch?: {
755
+ sourceValue: string;
756
+ translatedValue: string;
757
+ } | undefined;
758
+ }[]];
759
+ context?: {
760
+ description: string;
761
+ } | undefined;
762
+ characterLimit?: number | undefined;
763
+ }[]];
764
+ targetLocale: string;
765
+ ownerId?: string | undefined;
758
766
  context?: {
759
767
  description?: string | undefined;
760
768
  styleGuide?: {
@@ -780,6 +788,7 @@ export declare const TRANSLATE_SYNC_V2_BODY_SCHEMA: z.ZodEffects<z.ZodObject<{
780
788
  targetPluralForms?: ["many" | "zero" | "one" | "two" | "few" | "other", ...("many" | "zero" | "one" | "two" | "few" | "other")[]] | undefined;
781
789
  } | undefined;
782
790
  integration?: "Claude" | "ChatGPT-4" | "Gemini" | "DeepL" | "GoogleTranslate" | "MicrosoftTranslator" | undefined;
791
+ tenantId?: string | undefined;
783
792
  }>;
784
793
  export declare const TRANSLATE_SYNC_V2_HEADERS_SCHEMA: z.ZodObject<{
785
794
  'x-fake-processing': z.ZodOptional<z.ZodEffects<z.ZodBoolean, boolean, unknown>>;
@@ -878,8 +887,9 @@ export declare const TRANSLATE_SYNC_V2_RESPONSE_SCHEMA: z.ZodObject<{
878
887
  details?: Record<string, unknown> | undefined;
879
888
  }[] | undefined;
880
889
  }>;
881
- export type TranslateSyncV2Body = z.infer<typeof TRANSLATE_SYNC_V2_BODY_SCHEMA>;
882
- export type TranslateSyncV2Headers = z.infer<typeof TRANSLATE_SYNC_V2_HEADERS_SCHEMA>;
883
- export type TranslateSyncV2Response = z.infer<typeof TRANSLATE_SYNC_V2_RESPONSE_SCHEMA>;
884
- export type TranslateSyncV2ContentUnit = z.infer<typeof TRANSLATE_SYNC_V2_CONTENT_UNIT_SCHEMA>;
885
- export type TranslateSyncV2Segment = z.infer<typeof TRANSLATE_SYNC_V2_SEGMENT_SCHEMA>;
890
+ export type TranslateSyncBody = z.infer<typeof TRANSLATE_SYNC_V2_BODY_SCHEMA>;
891
+ export type TranslateSyncHeaders = z.infer<typeof TRANSLATE_SYNC_V2_HEADERS_SCHEMA>;
892
+ export type TranslateSyncResponse = z.infer<typeof TRANSLATE_SYNC_V2_RESPONSE_SCHEMA>;
893
+ export type TranslateSyncV2Body = TranslateSyncBody;
894
+ export type TranslateSyncV2Headers = TranslateSyncHeaders;
895
+ export type TranslateSyncV2Response = TranslateSyncResponse;
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TRANSLATE_SYNC_V2_RESPONSE_SCHEMA = exports.TRANSLATE_SYNC_V2_HEADERS_SCHEMA = exports.TRANSLATE_SYNC_V2_BODY_SCHEMA = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const zod_1 = tslib_1.__importDefault(require("zod"));
6
+ const asyncRequestSchemas_1 = require("../common/asyncRequestSchemas");
7
+ const commonSchemas_1 = require("../common/commonSchemas");
8
+ const translationContextSchemas_1 = require("../common/translationContextSchemas");
9
+ const sharedSchemas_1 = require("./sharedSchemas");
10
+ const CONTENT_UNITS_MAX_LENGTH = 1;
11
+ exports.TRANSLATE_SYNC_V2_BODY_SCHEMA = zod_1.default
12
+ .object({
13
+ tenantId: asyncRequestSchemas_1.TENANT_ID_SCHEMA.optional(),
14
+ ownerId: asyncRequestSchemas_1.OWNER_ID_SCHEMA.optional(),
15
+ sourceLocale: commonSchemas_1.LOCALE_SCHEMA,
16
+ targetLocale: commonSchemas_1.LOCALE_SCHEMA,
17
+ integration: commonSchemas_1.REAL_INTEGRATION_ENGINE_SCHEMA.optional(),
18
+ context: translationContextSchemas_1.TRANSLATION_CONTEXT_SCHEMA.optional(),
19
+ contentUnits: zod_1.default
20
+ .array(sharedSchemas_1.TRANSLATE_CONTENT_UNIT_SCHEMA)
21
+ .nonempty()
22
+ .max(CONTENT_UNITS_MAX_LENGTH)
23
+ .refine(...sharedSchemas_1.refineUniqueIds),
24
+ })
25
+ .refine(...sharedSchemas_1.refineDifferentSourceAndTargetLang)
26
+ .refine(...sharedSchemas_1.refineRequestSizeLimit);
27
+ exports.TRANSLATE_SYNC_V2_HEADERS_SCHEMA = commonSchemas_1.COMMON_REQUEST_HEADERS_SCHEMA;
28
+ exports.TRANSLATE_SYNC_V2_RESPONSE_SCHEMA = zod_1.default
29
+ .object({
30
+ data: zod_1.default.array(zod_1.default.object({
31
+ contentUnitId: sharedSchemas_1.CONTENT_ID_PROP_SCHEMA,
32
+ segmentId: sharedSchemas_1.CONTENT_ID_PROP_SCHEMA,
33
+ integration: zod_1.default.string(),
34
+ translation: zod_1.default.string(),
35
+ warnings: sharedSchemas_1.SEGMENT_WARNINGS_SCHEMA.optional(),
36
+ })),
37
+ errors: zod_1.default
38
+ .array(commonSchemas_1.COMMON_ERROR_RESPONSE_SCHEMA.extend({
39
+ contentUnitId: sharedSchemas_1.CONTENT_ID_PROP_SCHEMA,
40
+ segmentId: sharedSchemas_1.CONTENT_ID_PROP_SCHEMA,
41
+ integration: zod_1.default.string(),
42
+ }))
43
+ .optional(),
44
+ })
45
+ .describe('Results of the sync translation');
46
+ //# sourceMappingURL=translateSyncSchemas.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"translateSyncSchemas.js","sourceRoot":"","sources":["../../../../src/sdk/schemas/translation/translateSyncSchemas.ts"],"names":[],"mappings":";;;;AAAA,sDAAmB;AAEnB,uEAAiF;AACjF,2DAKgC;AAChC,mFAAgF;AAChF,mDAOwB;AAExB,MAAM,wBAAwB,GAAG,CAAC,CAAA;AAErB,QAAA,6BAA6B,GAAG,aAAC;KAC3C,MAAM,CAAC;IACN,QAAQ,EAAE,sCAAgB,CAAC,QAAQ,EAAE;IACrC,OAAO,EAAE,qCAAe,CAAC,QAAQ,EAAE;IACnC,YAAY,EAAE,6BAAa;IAC3B,YAAY,EAAE,6BAAa;IAC3B,WAAW,EAAE,8CAA8B,CAAC,QAAQ,EAAE;IACtD,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;KACD,MAAM,CAAC,GAAG,kDAAkC,CAAC;KAC7C,MAAM,CAAC,GAAG,sCAAsB,CAAC,CAAA;AAEvB,QAAA,gCAAgC,GAAG,6CAA6B,CAAA;AAEhE,QAAA,iCAAiC,GAAG,aAAC;KAC/C,MAAM,CAAC;IACN,IAAI,EAAE,aAAC,CAAC,KAAK,CACX,aAAC,CAAC,MAAM,CAAC;QACP,aAAa,EAAE,sCAAsB;QACrC,SAAS,EAAE,sCAAsB;QACjC,WAAW,EAAE,aAAC,CAAC,MAAM,EAAE;QACvB,WAAW,EAAE,aAAC,CAAC,MAAM,EAAE;QACvB,QAAQ,EAAE,uCAAuB,CAAC,QAAQ,EAAE;KAC7C,CAAC,CACH;IACD,MAAM,EAAE,aAAC;SACN,KAAK,CACJ,4CAA4B,CAAC,MAAM,CAAC;QAClC,aAAa,EAAE,sCAAsB;QACrC,SAAS,EAAE,sCAAsB;QACjC,WAAW,EAAE,aAAC,CAAC,MAAM,EAAE;KACxB,CAAC,CACH;SACA,QAAQ,EAAE;CACd,CAAC;KACD,QAAQ,CAAC,iCAAiC,CAAC,CAAA"}
@@ -1,2 +1 @@
1
- export declare const SEGMENT_VALUE_MAX_LENGTH = 5000;
2
1
  export declare const isSegmentExceedingLengthLimit: (value: string) => boolean;
@@ -1,12 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isSegmentExceedingLengthLimit = exports.SEGMENT_VALUE_MAX_LENGTH = void 0;
3
+ exports.isSegmentExceedingLengthLimit = void 0;
4
4
  const non_translatable_markup_1 = require("@lokalise/non-translatable-markup");
5
- exports.SEGMENT_VALUE_MAX_LENGTH = 5000;
5
+ const commonSchemas_1 = require("../schemas/common/commonSchemas");
6
6
  const isSegmentExceedingLengthLimit = (value) => {
7
7
  const pieces = (0, non_translatable_markup_1.extractTextBetweenTags)(value, { keepHtml: true });
8
8
  const length = pieces.reduce((acc, piece) => acc + piece.length, 0);
9
- return length <= exports.SEGMENT_VALUE_MAX_LENGTH;
9
+ return length <= commonSchemas_1.SEGMENT_VALUE_MAX_LENGTH_DEFAULT;
10
10
  };
11
11
  exports.isSegmentExceedingLengthLimit = isSegmentExceedingLengthLimit;
12
12
  //# sourceMappingURL=isSegmentExceedingLengthLimit.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"isSegmentExceedingLengthLimit.js","sourceRoot":"","sources":["../../../src/sdk/validation/isSegmentExceedingLengthLimit.ts"],"names":[],"mappings":";;;AAAA,+EAA0E;AAE7D,QAAA,wBAAwB,GAAG,IAAI,CAAA;AAErC,MAAM,6BAA6B,GAAG,CAAC,KAAa,EAAW,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,gDAAsB,EAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAA;IAChE,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE,CAAC,GAAG,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC,CAAA;IACnE,OAAO,MAAM,IAAI,gCAAwB,CAAA;AAC3C,CAAC,CAAA;AAJY,QAAA,6BAA6B,iCAIzC"}
1
+ {"version":3,"file":"isSegmentExceedingLengthLimit.js","sourceRoot":"","sources":["../../../src/sdk/validation/isSegmentExceedingLengthLimit.ts"],"names":[],"mappings":";;;AAAA,+EAA0E;AAC1E,mEAAkF;AAE3E,MAAM,6BAA6B,GAAG,CAAC,KAAa,EAAW,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,gDAAsB,EAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAA;IAChE,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE,CAAC,GAAG,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC,CAAA;IACnE,OAAO,MAAM,IAAI,gDAAgC,CAAA;AACnD,CAAC,CAAA;AAJY,QAAA,6BAA6B,iCAIzC"}
@@ -0,0 +1,14 @@
1
+ import { type IntegrationEngineEnum } from '../schemas/common/commonSchemas';
2
+ import type { ContentUnitLike } from '../schemas/translation/sharedSchemas';
3
+ /**
4
+ * Sums the lengths of the segments and checks if the total length exceeds the limit.
5
+ */
6
+ export declare const isContentUnitSizeUnderLimit: (segments: ContentUnitLike["segments"], limit: number) => boolean;
7
+ /**
8
+ * Checks if every content unit in the request is under the size limit.
9
+ */
10
+ export declare const isRequestSizeUnderLimit: (contentUnits: ContentUnitLike[], forcedIntegration?: IntegrationEngineEnum) => boolean;
11
+ /**
12
+ * Returns the request size limit based on the integration.
13
+ */
14
+ export declare const getRequestSizeLimit: (integration?: IntegrationEngineEnum) => number;
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getRequestSizeLimit = exports.isRequestSizeUnderLimit = exports.isContentUnitSizeUnderLimit = void 0;
4
+ const non_translatable_markup_1 = require("@lokalise/non-translatable-markup");
5
+ const commonSchemas_1 = require("../schemas/common/commonSchemas");
6
+ /**
7
+ * Sums the lengths of the segments and checks if the total length exceeds the limit.
8
+ */
9
+ const isContentUnitSizeUnderLimit = (segments, limit) => {
10
+ const totalLength = segments.reduce((acc, segment) => {
11
+ const pieces = (0, non_translatable_markup_1.extractTextBetweenTags)(segment.value, { keepHtml: true });
12
+ const length = pieces.reduce((acc, piece) => acc + piece.length, 0);
13
+ return acc + length;
14
+ }, 0);
15
+ return totalLength <= limit;
16
+ };
17
+ exports.isContentUnitSizeUnderLimit = isContentUnitSizeUnderLimit;
18
+ /**
19
+ * Checks if every content unit in the request is under the size limit.
20
+ */
21
+ const isRequestSizeUnderLimit = (contentUnits, forcedIntegration) => {
22
+ const limit = (0, exports.getRequestSizeLimit)(forcedIntegration);
23
+ return contentUnits.every((contentUnit) => (0, exports.isContentUnitSizeUnderLimit)(contentUnit.segments, limit));
24
+ };
25
+ exports.isRequestSizeUnderLimit = isRequestSizeUnderLimit;
26
+ /**
27
+ * Returns the request size limit based on the integration.
28
+ */
29
+ const getRequestSizeLimit = (integration) => {
30
+ if (integration && Object.hasOwn(commonSchemas_1.REQUEST_SIZE_LIMIT_MAP, integration)) {
31
+ return commonSchemas_1.REQUEST_SIZE_LIMIT_MAP[integration];
32
+ }
33
+ return commonSchemas_1.SEGMENT_VALUE_MAX_LENGTH_DEFAULT;
34
+ };
35
+ exports.getRequestSizeLimit = getRequestSizeLimit;
36
+ //# sourceMappingURL=requestSizeLimit.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"requestSizeLimit.js","sourceRoot":"","sources":["../../../src/sdk/validation/requestSizeLimit.ts"],"names":[],"mappings":";;;AAAA,+EAA0E;AAC1E,mEAIwC;AAGxC;;GAEG;AACI,MAAM,2BAA2B,GAAG,CACzC,QAAqC,EACrC,KAAa,EACJ,EAAE;IACX,MAAM,WAAW,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,OAAO,EAAE,EAAE;QACnD,MAAM,MAAM,GAAG,IAAA,gDAAsB,EAAC,OAAO,CAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAA;QACxE,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE,CAAC,GAAG,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC,CAAA;QACnE,OAAO,GAAG,GAAG,MAAM,CAAA;IACrB,CAAC,EAAE,CAAC,CAAC,CAAA;IACL,OAAO,WAAW,IAAI,KAAK,CAAA;AAC7B,CAAC,CAAA;AAVY,QAAA,2BAA2B,+BAUvC;AAED;;GAEG;AACI,MAAM,uBAAuB,GAAG,CACrC,YAA+B,EAC/B,iBAAyC,EAChC,EAAE;IACX,MAAM,KAAK,GAAG,IAAA,2BAAmB,EAAC,iBAAiB,CAAC,CAAA;IACpD,OAAO,YAAY,CAAC,KAAK,CAAC,CAAC,WAAW,EAAE,EAAE,CACxC,IAAA,mCAA2B,EAAC,WAAW,CAAC,QAAQ,EAAE,KAAK,CAAC,CACzD,CAAA;AACH,CAAC,CAAA;AARY,QAAA,uBAAuB,2BAQnC;AAED;;GAEG;AACI,MAAM,mBAAmB,GAAG,CAAC,WAAmC,EAAU,EAAE;IACjF,IAAI,WAAW,IAAI,MAAM,CAAC,MAAM,CAAC,sCAAsB,EAAE,WAAW,CAAC,EAAE,CAAC;QACtE,OAAO,sCAAsB,CAAC,WAAW,CAAC,CAAA;IAC5C,CAAC;IAED,OAAO,gDAAgC,CAAA;AACzC,CAAC,CAAA;AANY,QAAA,mBAAmB,uBAM/B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lokalise/polyglot-sdk",
3
- "version": "12.7.0",
3
+ "version": "13.1.0",
4
4
  "author": {
5
5
  "name": "Lokalise",
6
6
  "url": "https://lokalise.com/"
@@ -45,13 +45,13 @@
45
45
  "@lokalise/fastify-extras": ">=25.0.0"
46
46
  },
47
47
  "devDependencies": {
48
- "@amplitude/analytics-types": "^2.8.2",
49
- "@biomejs/biome": "^1.9.3",
48
+ "@amplitude/analytics-types": "^2.8.3",
49
+ "@biomejs/biome": "^1.9.4",
50
50
  "@lokalise/biome-config": "^1.5.0",
51
51
  "@lokalise/fastify-extras": "^25.0.0",
52
52
  "@lokalise/prettier-config": "^1.0.1",
53
- "@types/node": "^22.7.7",
54
- "@vitest/coverage-v8": "^2.1.3",
53
+ "@types/node": "^22.8.1",
54
+ "@vitest/coverage-v8": "^2.1.4",
55
55
  "auto-changelog": "^2.5.0",
56
56
  "mockttp": "^3.15.3",
57
57
  "prettier": "^3.3.3",
@@ -1 +0,0 @@
1
- {"version":3,"file":"lqaAsyncV1Schemas.js","sourceRoot":"","sources":["../../../../src/sdk/schemas/lqa/lqaAsyncV1Schemas.ts"],"names":[],"mappings":";;;;AAAA,sDAAmB;A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B,IAAI,EAAE,aAAC,CAAC,KAAK,CACX,aAAC,CAAC,MAAM,CAAC;QACP,aAAa,EAAE,0BAA0B;QACzC,aAAa,EAAE,yBAAyB;QACxC,UAAU,EAAE,aAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;QAC5C,MAAM,EAAE,aAAC,CAAC,KAAK,CACb,aAAC,CAAC,MAAM,CAAC;YACP,QAAQ,EAAE,aAAC,CAAC,UAAU,CAAC,oCAAoB,CAAC;YAC5C,QAAQ,EAAE,aAAC,CAAC,UAAU,CAAC,oCAAoB,CAAC;YAC5C,OAAO,EAAE,aAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;SAC1C,CAAC,CACH;KACF,CAAC,CACH;IACD,MAAM,EAAE,aAAC;SACN,KAAK,CACJ,4CAA4B,CAAC,MAAM,CAAC;QAClC,aAAa,EAAE,0BAA0B;QACzC,aAAa,EAAE,yBAAyB;KACzC,CAAC,CACH;SACA,QAAQ,EAAE;CACd,CAAC;KACD,QAAQ,CAAC,wBAAwB,CAAC,CAAA"}
@@ -1,85 +0,0 @@
1
- "use strict";
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_ASYNC_V2_CONTENT_UNIT_SCHEMA = exports.TRANSLATE_ASYNC_V2_SEGMENT_SCHEMA = void 0;
4
- const tslib_1 = require("tslib");
5
- const zod_1 = tslib_1.__importDefault(require("zod"));
6
- const asyncRequestSchemas_1 = require("../common/asyncRequestSchemas");
7
- const commonSchemas_1 = require("../common/commonSchemas");
8
- const translationContextSchemas_1 = require("../common/translationContextSchemas");
9
- const isSegmentExceedingLengthLimit_1 = require("../../validation/isSegmentExceedingLengthLimit");
10
- const sharedSchemas_1 = require("./sharedSchemas");
11
- const SEGMENT_ID_MAX_LENGTH = 100;
12
- const CONTENT_UNIT_ID_MAX_LENGTH = 100;
13
- const CONTENT_UNIT_DESCRIPTION_MAX_LENGTH = 500;
14
- const CONTENT_UNIT_SEGMENTS_MAX_LENGTH = 1000; // context -> https://lokalise.slack.com/archives/C07BVQEMCRJ/p1725002827265889
15
- const CONTENT_UNITS_MAX_LENGTH = 50;
16
- const TRANSLATE_ASYNC_V2_SEGMENT_ID_SCHEMA = zod_1.default.string().min(1).max(SEGMENT_ID_MAX_LENGTH);
17
- exports.TRANSLATE_ASYNC_V2_SEGMENT_SCHEMA = zod_1.default.object({
18
- id: TRANSLATE_ASYNC_V2_SEGMENT_ID_SCHEMA,
19
- tmMatch: commonSchemas_1.TM_MATCH_SCHEMA,
20
- value: zod_1.default
21
- .string()
22
- .min(1)
23
- .refine((value) => (0, isSegmentExceedingLengthLimit_1.isSegmentExceedingLengthLimit)(value), `Too long segment value, max length is ${isSegmentExceedingLengthLimit_1.SEGMENT_VALUE_MAX_LENGTH} characters`),
24
- });
25
- const TRANSLATE_ASYNC_V2_CONTENT_UNIT_ID_SCHEMA = zod_1.default.string().min(1).max(CONTENT_UNIT_ID_MAX_LENGTH);
26
- exports.TRANSLATE_ASYNC_V2_CONTENT_UNIT_SCHEMA = zod_1.default.object({
27
- id: TRANSLATE_ASYNC_V2_CONTENT_UNIT_ID_SCHEMA,
28
- context: zod_1.default
29
- .object({
30
- description: zod_1.default.string().min(1).max(CONTENT_UNIT_DESCRIPTION_MAX_LENGTH),
31
- })
32
- .optional(),
33
- characterLimit: zod_1.default.number().optional(),
34
- segments: zod_1.default
35
- .array(exports.TRANSLATE_ASYNC_V2_SEGMENT_SCHEMA)
36
- .nonempty()
37
- .max(CONTENT_UNIT_SEGMENTS_MAX_LENGTH)
38
- .refine(...sharedSchemas_1.refineUniqueIds),
39
- });
40
- exports.TRANSLATE_ASYNC_V2_BODY_SCHEMA = asyncRequestSchemas_1.ASYNC_REQUEST_SCHEMA.extend({
41
- sourceLocale: commonSchemas_1.LOCALE_SCHEMA,
42
- targetLocale: commonSchemas_1.LOCALE_SCHEMA,
43
- integration: commonSchemas_1.REAL_INTEGRATION_ENGINE_SCHEMA.optional(),
44
- pickIntegrationByScore: zod_1.default.boolean().default(false),
45
- context: translationContextSchemas_1.TRANSLATION_CONTEXT_SCHEMA.optional(),
46
- contentUnits: zod_1.default
47
- .array(exports.TRANSLATE_ASYNC_V2_CONTENT_UNIT_SCHEMA)
48
- .nonempty()
49
- .max(CONTENT_UNITS_MAX_LENGTH)
50
- .refine(...sharedSchemas_1.refineUniqueIds),
51
- })
52
- .refine(...sharedSchemas_1.refineDifferentSourceAndTargetLang)
53
- .refine((data) => {
54
- return !(data.integration && data.pickIntegrationByScore);
55
- }, 'Forced integration cannot be specified when "pickIntegrationByScore" is enabled.');
56
- exports.TRANSLATE_ASYNC_V2_HEADERS_SCHEMA = commonSchemas_1.COMMON_REQUEST_HEADERS_SCHEMA;
57
- exports.TRANSLATE_ASYNC_V2_RESPONSE_SCHEMA = zod_1.default
58
- .object({
59
- requestId: zod_1.default.string().uuid(),
60
- expectedAt: zod_1.default.string().datetime(),
61
- })
62
- .describe('Accepted for processing. Await the callback for the results.');
63
- exports.TRANSLATE_ASYNC_V2_CALLBACK_SCHEMA = zod_1.default
64
- .object({
65
- originCorrelationId: zod_1.default.string(),
66
- data: zod_1.default.array(zod_1.default.object({
67
- contentUnitId: TRANSLATE_ASYNC_V2_SEGMENT_ID_SCHEMA,
68
- segmentId: TRANSLATE_ASYNC_V2_SEGMENT_ID_SCHEMA,
69
- polyglotRefId: zod_1.default.string(),
70
- integration: zod_1.default.string(),
71
- translation: zod_1.default.string(),
72
- score: zod_1.default.number().nullable(),
73
- warnings: sharedSchemas_1.SEGMENT_WARNINGS_SCHEMA.optional(),
74
- })),
75
- errors: zod_1.default
76
- .array(commonSchemas_1.COMMON_ERROR_RESPONSE_SCHEMA.extend({
77
- contentUnitId: TRANSLATE_ASYNC_V2_SEGMENT_ID_SCHEMA,
78
- segmentId: TRANSLATE_ASYNC_V2_SEGMENT_ID_SCHEMA,
79
- polyglotRefId: zod_1.default.string(),
80
- integration: zod_1.default.string(),
81
- }))
82
- .optional(),
83
- })
84
- .describe('Callback with results.');
85
- //# sourceMappingURL=translateAsyncV2Schemas.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"translateAsyncV2Schemas.js","sourceRoot":"","sources":["../../../../src/sdk/schemas/translation/translateAsyncV2Schemas.ts"],"names":[],"mappings":";;;;AAAA,sDAAmB;AAEnB,uEAAoE;AACpE,2DAMgC;AAChC,mFAAgF;AAEhF,kGAGuD;AACvD,mDAIwB;AAExB,MAAM,qBAAqB,GAAG,GAAG,CAAA;AACjC,MAAM,0BAA0B,GAAG,GAAG,CAAA;AACtC,MAAM,mCAAmC,GAAG,GAAG,CAAA;AAC/C,MAAM,gCAAgC,GAAG,IAAI,CAAA,CAAC,+EAA+E;AAC7H,MAAM,wBAAwB,GAAG,EAAE,CAAA;AAEnC,MAAM,oCAAoC,GAAG,aAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAA;AAE5E,QAAA,iCAAiC,GAAG,aAAC,CAAC,MAAM,CAAC;IACxD,EAAE,EAAE,oCAAoC;IACxC,OAAO,EAAE,+BAAe;IACxB,KAAK,EAAE,aAAC;SACL,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,CAAC;SACN,MAAM,CACL,CAAC,KAAK,EAAE,EAAE,CAAC,IAAA,6DAA6B,EAAC,KAAK,CAAC,EAC/C,yCAAyC,wDAAwB,aAAa,CAC/E;CACJ,CAAC,CAAA;AAEF,MAAM,yCAAyC,GAAG,aAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAA;AAEtF,QAAA,sCAAsC,GAAG,aA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