@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.
Files changed (34) hide show
  1. package/dist/index.d.ts +0 -1
  2. package/dist/index.js +0 -1
  3. package/dist/index.js.map +1 -1
  4. package/dist/sdk/PolyglotClient.d.ts +0 -5
  5. package/dist/sdk/PolyglotClient.js +0 -23
  6. package/dist/sdk/PolyglotClient.js.map +1 -1
  7. package/dist/sdk/schemas/common/commonSchemas.d.ts +6 -0
  8. package/dist/sdk/schemas/common/commonSchemas.js +10 -1
  9. package/dist/sdk/schemas/common/commonSchemas.js.map +1 -1
  10. package/dist/sdk/schemas/lqa/lqaAsyncSchemas.d.ts +5 -115
  11. package/dist/sdk/schemas/lqa/lqaAsyncSchemas.js +2 -4
  12. package/dist/sdk/schemas/lqa/lqaAsyncSchemas.js.map +1 -1
  13. package/dist/sdk/schemas/translation/generateVariants.d.ts +88 -1
  14. package/dist/sdk/schemas/translation/generateVariants.js +4 -2
  15. package/dist/sdk/schemas/translation/generateVariants.js.map +1 -1
  16. package/dist/sdk/schemas/translation/rewriteTextSchemas.d.ts +134 -1
  17. package/dist/sdk/schemas/translation/rewriteTextSchemas.js +4 -2
  18. package/dist/sdk/schemas/translation/rewriteTextSchemas.js.map +1 -1
  19. package/dist/sdk/schemas/translation/translateAsyncSchemas.d.ts +224 -1
  20. package/dist/sdk/schemas/translation/translateAsyncSchemas.js +3 -1
  21. package/dist/sdk/schemas/translation/translateAsyncSchemas.js.map +1 -1
  22. package/dist/sdk/schemas/translation/translateSyncSchemas.d.ts +214 -1
  23. package/dist/sdk/schemas/translation/translateSyncSchemas.js +4 -2
  24. package/dist/sdk/schemas/translation/translateSyncSchemas.js.map +1 -1
  25. package/dist/sdk/schemas/translation/translateTextSegmentSchemas.d.ts +148 -1
  26. package/dist/sdk/schemas/translation/translateTextSegmentSchemas.js +4 -2
  27. package/dist/sdk/schemas/translation/translateTextSegmentSchemas.js.map +1 -1
  28. package/dist/sdk/validation/requestSizeLimit.d.ts +2 -2
  29. package/dist/sdk/validation/requestSizeLimit.js +4 -4
  30. package/dist/sdk/validation/requestSizeLimit.js.map +1 -1
  31. package/package.json +1 -1
  32. package/dist/sdk/schemas/scoring/scoreSchemas.d.ts +0 -178
  33. package/dist/sdk/schemas/scoring/scoreSchemas.js +0 -43
  34. package/dist/sdk/schemas/scoring/scoreSchemas.js.map +0 -1
@@ -1,178 +0,0 @@
1
- import { z } from 'zod';
2
- export declare const SCORE_BODY_SCHEMA: z.ZodObject<{
3
- sentences: z.ZodArray<z.ZodObject<{
4
- id: z.ZodString;
5
- sourceText: z.ZodString;
6
- translations: z.ZodArray<z.ZodObject<{
7
- id: z.ZodString;
8
- text: z.ZodString;
9
- }, "strip", z.ZodTypeAny, {
10
- text: string;
11
- id: string;
12
- }, {
13
- text: string;
14
- id: string;
15
- }>, "atleastone">;
16
- }, "strip", z.ZodTypeAny, {
17
- translations: [{
18
- text: string;
19
- id: string;
20
- }, ...{
21
- text: string;
22
- id: string;
23
- }[]];
24
- id: string;
25
- sourceText: string;
26
- }, {
27
- translations: [{
28
- text: string;
29
- id: string;
30
- }, ...{
31
- text: string;
32
- id: string;
33
- }[]];
34
- id: string;
35
- sourceText: string;
36
- }>, "atleastone">;
37
- }, "strip", z.ZodTypeAny, {
38
- sentences: [{
39
- translations: [{
40
- text: string;
41
- id: string;
42
- }, ...{
43
- text: string;
44
- id: string;
45
- }[]];
46
- id: string;
47
- sourceText: string;
48
- }, ...{
49
- translations: [{
50
- text: string;
51
- id: string;
52
- }, ...{
53
- text: string;
54
- id: string;
55
- }[]];
56
- id: string;
57
- sourceText: string;
58
- }[]];
59
- }, {
60
- sentences: [{
61
- translations: [{
62
- text: string;
63
- id: string;
64
- }, ...{
65
- text: string;
66
- id: string;
67
- }[]];
68
- id: string;
69
- sourceText: string;
70
- }, ...{
71
- translations: [{
72
- text: string;
73
- id: string;
74
- }, ...{
75
- text: string;
76
- id: string;
77
- }[]];
78
- id: string;
79
- sourceText: string;
80
- }[]];
81
- }>;
82
- export declare const SCORE_RESPONSE_SCHEMA: z.ZodObject<{
83
- generatedAt: z.ZodString;
84
- results: z.ZodArray<z.ZodObject<{
85
- id: z.ZodString;
86
- sourceText: z.ZodString;
87
- scores: z.ZodArray<z.ZodObject<{
88
- id: z.ZodString;
89
- text: z.ZodString;
90
- score: z.ZodNumber;
91
- }, "strip", z.ZodTypeAny, {
92
- text: string;
93
- id: string;
94
- score: number;
95
- }, {
96
- text: string;
97
- id: string;
98
- score: number;
99
- }>, "many">;
100
- }, "strip", z.ZodTypeAny, {
101
- id: string;
102
- sourceText: string;
103
- scores: {
104
- text: string;
105
- id: string;
106
- score: number;
107
- }[];
108
- }, {
109
- id: string;
110
- sourceText: string;
111
- scores: {
112
- text: string;
113
- id: string;
114
- score: number;
115
- }[];
116
- }>, "many">;
117
- errors: z.ZodArray<z.ZodObject<{
118
- errorCode: z.ZodString;
119
- message: z.ZodString;
120
- details: z.ZodOptional<z.ZodObject<{
121
- id: z.ZodOptional<z.ZodString>;
122
- }, "strip", z.ZodTypeAny, {
123
- id?: string | undefined;
124
- }, {
125
- id?: string | undefined;
126
- }>>;
127
- }, "strip", z.ZodTypeAny, {
128
- message: string;
129
- errorCode: string;
130
- details?: {
131
- id?: string | undefined;
132
- } | undefined;
133
- }, {
134
- message: string;
135
- errorCode: string;
136
- details?: {
137
- id?: string | undefined;
138
- } | undefined;
139
- }>, "many">;
140
- }, "strip", z.ZodTypeAny, {
141
- errors: {
142
- message: string;
143
- errorCode: string;
144
- details?: {
145
- id?: string | undefined;
146
- } | undefined;
147
- }[];
148
- generatedAt: string;
149
- results: {
150
- id: string;
151
- sourceText: string;
152
- scores: {
153
- text: string;
154
- id: string;
155
- score: number;
156
- }[];
157
- }[];
158
- }, {
159
- errors: {
160
- message: string;
161
- errorCode: string;
162
- details?: {
163
- id?: string | undefined;
164
- } | undefined;
165
- }[];
166
- generatedAt: string;
167
- results: {
168
- id: string;
169
- sourceText: string;
170
- scores: {
171
- text: string;
172
- id: string;
173
- score: number;
174
- }[];
175
- }[];
176
- }>;
177
- export type ScoreBody = z.infer<typeof SCORE_BODY_SCHEMA>;
178
- export type ScoreResponse = z.infer<typeof SCORE_RESPONSE_SCHEMA>;
@@ -1,43 +0,0 @@
1
- import { z } from 'zod';
2
- export const SCORE_BODY_SCHEMA = z.object({
3
- sentences: z
4
- .array(z.object({
5
- id: z.string().describe('Unique ID of the source text'),
6
- sourceText: z.string().describe('Text in source language'),
7
- translations: z
8
- .array(z.object({
9
- id: z.string().describe('Unique ID of a specific translation'),
10
- text: z.string().describe('Translated text'),
11
- }))
12
- .describe('Translations of the `sourceText` in various languages')
13
- .nonempty()
14
- .max(100),
15
- }))
16
- .describe('List of translations to evaluate')
17
- .nonempty()
18
- .max(15),
19
- });
20
- export const SCORE_RESPONSE_SCHEMA = z
21
- .object({
22
- generatedAt: z.string().datetime(),
23
- results: z.array(z.object({
24
- id: z.string(),
25
- sourceText: z.string(),
26
- scores: z.array(z.object({
27
- id: z.string(),
28
- text: z.string(),
29
- score: z.number(),
30
- })),
31
- })),
32
- errors: z.array(z.object({
33
- errorCode: z.string(),
34
- message: z.string(),
35
- details: z
36
- .object({
37
- id: z.string().optional(),
38
- })
39
- .optional(),
40
- })),
41
- })
42
- .describe('Successfully scored sentences');
43
- //# sourceMappingURL=scoreSchemas.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"scoreSchemas.js","sourceRoot":"","sources":["../../../../src/sdk/schemas/scoring/scoreSchemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,SAAS,EAAE,CAAC;SACT,KAAK,CACJ,CAAC,CAAC,MAAM,CAAC;QACP,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,8BAA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