@lokalise/ragnarok-api-contracts 2.6.0 → 3.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.
|
@@ -3,121 +3,76 @@ declare const GET_EVALUATION_PARAMS_SCHEMA: z.ZodObject<{
|
|
|
3
3
|
evaluationId: z.ZodUUID;
|
|
4
4
|
}, z.core.$strip>;
|
|
5
5
|
export type GetEvaluationParams = z.infer<typeof GET_EVALUATION_PARAMS_SCHEMA>;
|
|
6
|
-
export declare const getEvaluation:
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
metricsMetadata: z.ZodObject<{
|
|
15
|
-
exactMatch: z.ZodObject<{
|
|
16
|
-
betterWhen: z.ZodEnum<{
|
|
17
|
-
higher: "higher";
|
|
18
|
-
lower: "lower";
|
|
19
|
-
}>;
|
|
20
|
-
}, z.core.$strip>;
|
|
21
|
-
ter: z.ZodObject<{
|
|
22
|
-
betterWhen: z.ZodEnum<{
|
|
23
|
-
higher: "higher";
|
|
24
|
-
lower: "lower";
|
|
25
|
-
}>;
|
|
26
|
-
}, z.core.$strip>;
|
|
27
|
-
bleu: z.ZodObject<{
|
|
28
|
-
betterWhen: z.ZodEnum<{
|
|
29
|
-
higher: "higher";
|
|
30
|
-
lower: "lower";
|
|
31
|
-
}>;
|
|
32
|
-
}, z.core.$strip>;
|
|
33
|
-
meteor: z.ZodObject<{
|
|
34
|
-
betterWhen: z.ZodEnum<{
|
|
35
|
-
higher: "higher";
|
|
36
|
-
lower: "lower";
|
|
37
|
-
}>;
|
|
38
|
-
}, z.core.$strip>;
|
|
6
|
+
export declare const getEvaluation: {
|
|
7
|
+
readonly method: "get";
|
|
8
|
+
readonly pathResolver: ({ evaluationId }: {
|
|
9
|
+
evaluationId: string;
|
|
10
|
+
}) => string;
|
|
11
|
+
readonly description: "Retrieve evaluation by id";
|
|
12
|
+
readonly requestPathParamsSchema: z.ZodObject<{
|
|
13
|
+
evaluationId: z.ZodUUID;
|
|
39
14
|
}, z.core.$strip>;
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}, z.core.$strip
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
lower: "lower";
|
|
78
|
-
}>;
|
|
79
|
-
}, z.core.$strip>;
|
|
80
|
-
ter: z.ZodObject<{
|
|
81
|
-
betterWhen: z.ZodEnum<{
|
|
82
|
-
higher: "higher";
|
|
83
|
-
lower: "lower";
|
|
84
|
-
}>;
|
|
85
|
-
}, z.core.$strip>;
|
|
86
|
-
bleu: z.ZodObject<{
|
|
87
|
-
betterWhen: z.ZodEnum<{
|
|
88
|
-
higher: "higher";
|
|
89
|
-
lower: "lower";
|
|
90
|
-
}>;
|
|
91
|
-
}, z.core.$strip>;
|
|
92
|
-
meteor: z.ZodObject<{
|
|
93
|
-
betterWhen: z.ZodEnum<{
|
|
94
|
-
higher: "higher";
|
|
95
|
-
lower: "lower";
|
|
96
|
-
}>;
|
|
97
|
-
}, z.core.$strip>;
|
|
98
|
-
}, z.core.$strip>;
|
|
99
|
-
results: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
100
|
-
configurationName: z.ZodString;
|
|
101
|
-
global: z.ZodObject<{
|
|
102
|
-
exactMatch: z.ZodOptional<z.ZodNumber>;
|
|
103
|
-
ter: z.ZodOptional<z.ZodNumber>;
|
|
104
|
-
bleu: z.ZodOptional<z.ZodNumber>;
|
|
105
|
-
meteor: z.ZodOptional<z.ZodNumber>;
|
|
15
|
+
readonly requestHeaderSchema: z.ZodObject<{
|
|
16
|
+
authorization: z.ZodString;
|
|
17
|
+
}, z.core.$strip>;
|
|
18
|
+
readonly responsesByStatusCode: {
|
|
19
|
+
readonly 200: z.ZodObject<{
|
|
20
|
+
id: z.ZodUUID;
|
|
21
|
+
ownerId: z.ZodString;
|
|
22
|
+
status: z.ZodEnum<{
|
|
23
|
+
completed: "completed";
|
|
24
|
+
failed: "failed";
|
|
25
|
+
pending: "pending";
|
|
26
|
+
}>;
|
|
27
|
+
metricsMetadata: z.ZodObject<{
|
|
28
|
+
exactMatch: z.ZodObject<{
|
|
29
|
+
betterWhen: z.ZodEnum<{
|
|
30
|
+
higher: "higher";
|
|
31
|
+
lower: "lower";
|
|
32
|
+
}>;
|
|
33
|
+
}, z.core.$strip>;
|
|
34
|
+
ter: z.ZodObject<{
|
|
35
|
+
betterWhen: z.ZodEnum<{
|
|
36
|
+
higher: "higher";
|
|
37
|
+
lower: "lower";
|
|
38
|
+
}>;
|
|
39
|
+
}, z.core.$strip>;
|
|
40
|
+
bleu: z.ZodObject<{
|
|
41
|
+
betterWhen: z.ZodEnum<{
|
|
42
|
+
higher: "higher";
|
|
43
|
+
lower: "lower";
|
|
44
|
+
}>;
|
|
45
|
+
}, z.core.$strip>;
|
|
46
|
+
meteor: z.ZodObject<{
|
|
47
|
+
betterWhen: z.ZodEnum<{
|
|
48
|
+
higher: "higher";
|
|
49
|
+
lower: "lower";
|
|
50
|
+
}>;
|
|
51
|
+
}, z.core.$strip>;
|
|
106
52
|
}, z.core.$strip>;
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
metrics: z.ZodObject<{
|
|
53
|
+
results: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
54
|
+
configurationName: z.ZodString;
|
|
55
|
+
global: z.ZodObject<{
|
|
111
56
|
exactMatch: z.ZodOptional<z.ZodNumber>;
|
|
112
57
|
ter: z.ZodOptional<z.ZodNumber>;
|
|
113
58
|
bleu: z.ZodOptional<z.ZodNumber>;
|
|
114
59
|
meteor: z.ZodOptional<z.ZodNumber>;
|
|
115
60
|
}, z.core.$strip>;
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
61
|
+
resultsByLocalePair: z.ZodArray<z.ZodObject<{
|
|
62
|
+
sourceLocale: z.ZodString;
|
|
63
|
+
targetLocale: z.ZodString;
|
|
64
|
+
metrics: z.ZodObject<{
|
|
65
|
+
exactMatch: z.ZodOptional<z.ZodNumber>;
|
|
66
|
+
ter: z.ZodOptional<z.ZodNumber>;
|
|
67
|
+
bleu: z.ZodOptional<z.ZodNumber>;
|
|
68
|
+
meteor: z.ZodOptional<z.ZodNumber>;
|
|
69
|
+
}, z.core.$strip>;
|
|
70
|
+
}, z.core.$strip>>;
|
|
71
|
+
}, z.core.$strip>>>;
|
|
72
|
+
metadata: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
73
|
+
}, z.core.$strip>;
|
|
74
|
+
};
|
|
75
|
+
};
|
|
121
76
|
export declare const DATASET_INPUT_SCHEMA: z.ZodObject<{
|
|
122
77
|
fileUrl: z.ZodURL;
|
|
123
78
|
}, z.core.$strip>;
|
|
@@ -170,44 +125,49 @@ declare const SCHEDULE_EVALUATION_BODY_SCHEMA: z.ZodObject<{
|
|
|
170
125
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
171
126
|
}, z.core.$strip>;
|
|
172
127
|
export type ScheduleEvaluationInput = z.infer<typeof SCHEDULE_EVALUATION_BODY_SCHEMA>;
|
|
173
|
-
export declare const postScheduleEvaluation:
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
128
|
+
export declare const postScheduleEvaluation: {
|
|
129
|
+
readonly method: "post";
|
|
130
|
+
readonly pathResolver: () => string;
|
|
131
|
+
readonly description: "Schedule evaluation";
|
|
132
|
+
readonly requestHeaderSchema: z.ZodObject<{
|
|
133
|
+
authorization: z.ZodString;
|
|
134
|
+
'idempotency-key': z.ZodOptional<z.ZodString>;
|
|
181
135
|
}, z.core.$strip>;
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
readonly CLAUDE: "Claude";
|
|
187
|
-
readonly CLAUDE_BEDROCK: "Claude-Bedrock";
|
|
188
|
-
readonly GPT: "GPT";
|
|
189
|
-
readonly GEMINI: "Gemini";
|
|
190
|
-
readonly DEEPL: "DeepL";
|
|
191
|
-
readonly GOOGLE_TRANSLATE: "GoogleTranslate";
|
|
192
|
-
}>>;
|
|
193
|
-
isForced: z.ZodDefault<z.ZodBoolean>;
|
|
136
|
+
readonly requestBodySchema: z.ZodObject<{
|
|
137
|
+
ownerId: z.ZodString;
|
|
138
|
+
datasets: z.ZodArray<z.ZodObject<{
|
|
139
|
+
fileUrl: z.ZodURL;
|
|
194
140
|
}, z.core.$strip>>;
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
141
|
+
webhook: z.ZodObject<{
|
|
142
|
+
url: z.ZodURL;
|
|
143
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
144
|
+
}, z.core.$strip>;
|
|
145
|
+
runConfigurations: z.ZodArray<z.ZodObject<{
|
|
146
|
+
name: z.ZodString;
|
|
147
|
+
integration: z.ZodOptional<z.ZodObject<{
|
|
148
|
+
engine: z.ZodOptional<z.ZodEnum<{
|
|
149
|
+
readonly CLAUDE: "Claude";
|
|
150
|
+
readonly CLAUDE_BEDROCK: "Claude-Bedrock";
|
|
151
|
+
readonly GPT: "GPT";
|
|
152
|
+
readonly GEMINI: "Gemini";
|
|
153
|
+
readonly DEEPL: "DeepL";
|
|
154
|
+
readonly GOOGLE_TRANSLATE: "GoogleTranslate";
|
|
155
|
+
}>>;
|
|
156
|
+
isForced: z.ZodDefault<z.ZodBoolean>;
|
|
157
|
+
}, z.core.$strip>>;
|
|
158
|
+
useExamples: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
159
|
+
useStyleguide: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
160
|
+
useGlossary: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
161
|
+
useDescriptions: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
162
|
+
}, z.core.$strip>>;
|
|
163
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
209
164
|
}, z.core.$strip>;
|
|
210
|
-
|
|
165
|
+
readonly responsesByStatusCode: {
|
|
166
|
+
readonly 202: z.ZodObject<{
|
|
167
|
+
evaluationId: z.ZodUUID;
|
|
168
|
+
}, z.core.$strip>;
|
|
169
|
+
};
|
|
170
|
+
};
|
|
211
171
|
declare const PaginationCursorSchema: z.ZodObject<{
|
|
212
172
|
id: z.ZodString;
|
|
213
173
|
exactMatch: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
@@ -257,114 +217,82 @@ export type EvaluationItemsSort = {
|
|
|
257
217
|
order: 'asc' | 'desc';
|
|
258
218
|
configName?: string;
|
|
259
219
|
};
|
|
260
|
-
export declare const getEvaluationItems:
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
description: z.ZodNullable<z.ZodString>;
|
|
269
|
-
translationExamples: z.ZodArray<z.ZodObject<{
|
|
270
|
-
sourceValue: z.ZodString;
|
|
271
|
-
translatedValue: z.ZodString;
|
|
272
|
-
}, z.core.$strip>>;
|
|
273
|
-
translations: z.ZodArray<z.ZodObject<{
|
|
274
|
-
configurationName: z.ZodString;
|
|
275
|
-
status: z.ZodEnum<{
|
|
276
|
-
translating: "translating";
|
|
277
|
-
translated: "translated";
|
|
278
|
-
scoring: "scoring";
|
|
279
|
-
scored: "scored";
|
|
280
|
-
completed: "completed";
|
|
281
|
-
failed: "failed";
|
|
282
|
-
}>;
|
|
283
|
-
actualTranslation: z.ZodNullable<z.ZodString>;
|
|
284
|
-
actualScore: z.ZodNullable<z.ZodNumber>;
|
|
285
|
-
metrics: z.ZodNullable<z.ZodObject<{
|
|
286
|
-
exactMatch: z.ZodOptional<z.ZodNumber>;
|
|
287
|
-
ter: z.ZodOptional<z.ZodNumber>;
|
|
288
|
-
meteor: z.ZodOptional<z.ZodNumber>;
|
|
289
|
-
}, z.core.$strip>>;
|
|
290
|
-
error: z.ZodNullable<z.ZodObject<{
|
|
291
|
-
message: z.ZodString;
|
|
292
|
-
errorCode: z.ZodString;
|
|
293
|
-
details: z.ZodOptional<z.ZodAny>;
|
|
294
|
-
}, z.core.$strip>>;
|
|
295
|
-
}, z.core.$strip>>;
|
|
296
|
-
}, z.core.$strip>>;
|
|
297
|
-
meta: z.ZodObject<{
|
|
298
|
-
resultCount: z.ZodNumber;
|
|
299
|
-
cursor: z.ZodOptional<z.ZodString>;
|
|
300
|
-
hasMore: z.ZodBoolean;
|
|
220
|
+
export declare const getEvaluationItems: {
|
|
221
|
+
readonly method: "get";
|
|
222
|
+
readonly pathResolver: ({ evaluationId }: {
|
|
223
|
+
evaluationId: string;
|
|
224
|
+
}) => string;
|
|
225
|
+
readonly description: "Retrieve evaluation items with translations and per-item metrics";
|
|
226
|
+
readonly requestPathParamsSchema: z.ZodObject<{
|
|
227
|
+
evaluationId: z.ZodUUID;
|
|
301
228
|
}, z.core.$strip>;
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
sourceValue: z.ZodString;
|
|
333
|
-
referenceTranslation: z.ZodString;
|
|
334
|
-
description: z.ZodNullable<z.ZodString>;
|
|
335
|
-
translationExamples: z.ZodArray<z.ZodObject<{
|
|
229
|
+
readonly requestQuerySchema: z.ZodObject<{
|
|
230
|
+
limit: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<unknown>>>;
|
|
231
|
+
before: z.ZodOptional<z.ZodCodec<z.ZodString, z.ZodObject<{
|
|
232
|
+
id: z.ZodString;
|
|
233
|
+
exactMatch: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
234
|
+
ter: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
235
|
+
meteor: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
236
|
+
}, z.core.$strip>>>;
|
|
237
|
+
after: z.ZodOptional<z.ZodCodec<z.ZodString, z.ZodObject<{
|
|
238
|
+
id: z.ZodString;
|
|
239
|
+
exactMatch: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
240
|
+
ter: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
241
|
+
meteor: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
242
|
+
}, z.core.$strip>>>;
|
|
243
|
+
sort: z.ZodPipe<z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
244
|
+
[x: string]: string;
|
|
245
|
+
}>>>, z.ZodTransform<ItemSort, string>>;
|
|
246
|
+
'sort-config-name': z.ZodOptional<z.ZodString>;
|
|
247
|
+
'filter-target-locale': z.ZodOptional<z.ZodString>;
|
|
248
|
+
}, z.core.$strip>;
|
|
249
|
+
readonly requestHeaderSchema: z.ZodObject<{
|
|
250
|
+
authorization: z.ZodString;
|
|
251
|
+
}, z.core.$strip>;
|
|
252
|
+
readonly responsesByStatusCode: {
|
|
253
|
+
readonly 200: z.ZodObject<{
|
|
254
|
+
data: z.ZodArray<z.ZodObject<{
|
|
255
|
+
itemId: z.ZodUUID;
|
|
256
|
+
externalId: z.ZodString;
|
|
257
|
+
sourceLocale: z.ZodString;
|
|
258
|
+
targetLocale: z.ZodString;
|
|
336
259
|
sourceValue: z.ZodString;
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
translating: "translating";
|
|
343
|
-
translated: "translated";
|
|
344
|
-
scoring: "scoring";
|
|
345
|
-
scored: "scored";
|
|
346
|
-
completed: "completed";
|
|
347
|
-
failed: "failed";
|
|
348
|
-
}>;
|
|
349
|
-
actualTranslation: z.ZodNullable<z.ZodString>;
|
|
350
|
-
actualScore: z.ZodNullable<z.ZodNumber>;
|
|
351
|
-
metrics: z.ZodNullable<z.ZodObject<{
|
|
352
|
-
exactMatch: z.ZodOptional<z.ZodNumber>;
|
|
353
|
-
ter: z.ZodOptional<z.ZodNumber>;
|
|
354
|
-
meteor: z.ZodOptional<z.ZodNumber>;
|
|
260
|
+
referenceTranslation: z.ZodString;
|
|
261
|
+
description: z.ZodNullable<z.ZodString>;
|
|
262
|
+
translationExamples: z.ZodArray<z.ZodObject<{
|
|
263
|
+
sourceValue: z.ZodString;
|
|
264
|
+
translatedValue: z.ZodString;
|
|
355
265
|
}, z.core.$strip>>;
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
266
|
+
translations: z.ZodArray<z.ZodObject<{
|
|
267
|
+
configurationName: z.ZodString;
|
|
268
|
+
status: z.ZodEnum<{
|
|
269
|
+
translating: "translating";
|
|
270
|
+
translated: "translated";
|
|
271
|
+
scoring: "scoring";
|
|
272
|
+
scored: "scored";
|
|
273
|
+
completed: "completed";
|
|
274
|
+
failed: "failed";
|
|
275
|
+
}>;
|
|
276
|
+
actualTranslation: z.ZodNullable<z.ZodString>;
|
|
277
|
+
actualScore: z.ZodNullable<z.ZodNumber>;
|
|
278
|
+
metrics: z.ZodNullable<z.ZodObject<{
|
|
279
|
+
exactMatch: z.ZodOptional<z.ZodNumber>;
|
|
280
|
+
ter: z.ZodOptional<z.ZodNumber>;
|
|
281
|
+
meteor: z.ZodOptional<z.ZodNumber>;
|
|
282
|
+
}, z.core.$strip>>;
|
|
283
|
+
error: z.ZodNullable<z.ZodObject<{
|
|
284
|
+
message: z.ZodString;
|
|
285
|
+
errorCode: z.ZodString;
|
|
286
|
+
details: z.ZodOptional<z.ZodAny>;
|
|
287
|
+
}, z.core.$strip>>;
|
|
360
288
|
}, z.core.$strip>>;
|
|
361
289
|
}, z.core.$strip>>;
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
290
|
+
meta: z.ZodObject<{
|
|
291
|
+
resultCount: z.ZodNumber;
|
|
292
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
293
|
+
hasMore: z.ZodBoolean;
|
|
294
|
+
}, z.core.$strip>;
|
|
367
295
|
}, z.core.$strip>;
|
|
368
|
-
}
|
|
369
|
-
}
|
|
296
|
+
};
|
|
297
|
+
};
|
|
370
298
|
export {};
|
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineApiContract } from '@lokalise/api-contracts';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import { AUTH_HEADERS, INTEGRATION_INPUT_SCHEMA, LOCALE_SCHEMA, METADATA_SCHEMA, WEBHOOK_SCHEMA, } from "./common.js";
|
|
4
4
|
import { EVALUATION_ITEM_DETAIL_SCHEMA, EVALUATION_SCHEMA } from "./objects.js";
|
|
5
5
|
const GET_EVALUATION_PARAMS_SCHEMA = z.object({
|
|
6
6
|
evaluationId: z.uuid().describe('The unique identifier of the evaluation to retrieve.'),
|
|
7
7
|
});
|
|
8
|
-
export const getEvaluation =
|
|
8
|
+
export const getEvaluation = defineApiContract({
|
|
9
9
|
method: 'get',
|
|
10
10
|
pathResolver: ({ evaluationId }) => `/v1/evaluations/${evaluationId}`,
|
|
11
11
|
description: 'Retrieve evaluation by id',
|
|
12
12
|
requestPathParamsSchema: GET_EVALUATION_PARAMS_SCHEMA,
|
|
13
13
|
requestHeaderSchema: AUTH_HEADERS,
|
|
14
|
-
|
|
15
|
-
responseSchemasByStatusCode: {
|
|
14
|
+
responsesByStatusCode: {
|
|
16
15
|
200: EVALUATION_SCHEMA,
|
|
17
16
|
},
|
|
18
17
|
});
|
|
@@ -80,14 +79,13 @@ const SCHEDULE_EVALUATION_RESPONSE_SCHEMA = z.object({
|
|
|
80
79
|
.uuid()
|
|
81
80
|
.describe('The unique identifier of the scheduled evaluation. Use it to retrieve the evaluation results later.'),
|
|
82
81
|
});
|
|
83
|
-
export const postScheduleEvaluation =
|
|
82
|
+
export const postScheduleEvaluation = defineApiContract({
|
|
84
83
|
method: 'post',
|
|
85
84
|
pathResolver: () => '/v1/evaluations',
|
|
86
85
|
description: 'Schedule evaluation',
|
|
87
86
|
requestHeaderSchema: SCHEDULE_EVALUATION_HEADERS,
|
|
88
87
|
requestBodySchema: SCHEDULE_EVALUATION_BODY_SCHEMA,
|
|
89
|
-
|
|
90
|
-
responseSchemasByStatusCode: {
|
|
88
|
+
responsesByStatusCode: {
|
|
91
89
|
202: SCHEDULE_EVALUATION_RESPONSE_SCHEMA,
|
|
92
90
|
},
|
|
93
91
|
});
|
|
@@ -150,15 +148,14 @@ const EVALUATION_ITEMS_RESPONSE_SCHEMA = z.object({
|
|
|
150
148
|
hasMore: z.boolean().describe('Whether there are more items to fetch'),
|
|
151
149
|
}),
|
|
152
150
|
});
|
|
153
|
-
export const getEvaluationItems =
|
|
151
|
+
export const getEvaluationItems = defineApiContract({
|
|
154
152
|
method: 'get',
|
|
155
153
|
pathResolver: ({ evaluationId }) => `/v1/evaluations/${evaluationId}/items`,
|
|
156
154
|
description: 'Retrieve evaluation items with translations and per-item metrics',
|
|
157
155
|
requestPathParamsSchema: GET_EVALUATION_ITEMS_PARAMS_SCHEMA,
|
|
158
156
|
requestQuerySchema: GET_EVALUATION_ITEMS_QUERY_SCHEMA,
|
|
159
157
|
requestHeaderSchema: AUTH_HEADERS,
|
|
160
|
-
|
|
161
|
-
responseSchemasByStatusCode: {
|
|
158
|
+
responsesByStatusCode: {
|
|
162
159
|
200: EVALUATION_ITEMS_RESPONSE_SCHEMA,
|
|
163
160
|
},
|
|
164
161
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evaluation-contracts.js","sourceRoot":"","sources":["../src/evaluation-contracts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAC3D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EACL,YAAY,EACZ,wBAAwB,EACxB,aAAa,EACb,eAAe,EACf,cAAc,GACf,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,6BAA6B,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AAE/E,MAAM,4BAA4B,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5C,YAAY,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,QAAQ,CAAC,sDAAsD,CAAC;CACxF,CAAC,CAAA;AAIF,MAAM,CAAC,MAAM,aAAa,GAAG,iBAAiB,CAAC;IAC7C,MAAM,EAAE,KAAK;IACb,YAAY,EAAE,CAAC,EAAE,YAAY,EAAE,EAAE,EAAE,CAAC,mBAAmB,YAAY,EAAE;IACrE,WAAW,EAAE,2BAA2B;IACxC,uBAAuB,EAAE,4BAA4B;IACrD,mBAAmB,EAAE,YA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C,6BAA6B,CAAC;IAC5C,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC;QACb,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,uCAAuC,CAAC;QACzE,MAAM,EAAE,CAAC;aACN,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CACP,oIAAoI,CACrI;QACH,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,CAAC,uCAAuC,CAAC;KACvE,CAAC;CACH,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAG,iBAAiB,CAAC;IAClD,MAAM,EAAE,KAAK;IACb,YAAY,EAAE,CAAC,EAAE,YAAY,EAAE,EAAE,EAAE,CAAC,mBAAmB,YAAY,QAAQ;IAC3E,WAAW,EAAE,kEAAkE;IAC/E,uBAAuB,EAAE,kCAAkC;IAC3D,kBAAkB,EAAE,iCAAiC;IACrD,mBAAmB,EAAE,YAAY;IACjC,qBAAqB,EAAE;QACrB,GAAG,EAAE,gCAAgC;KACtC;CACF,CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lokalise/ragnarok-api-contracts",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"author": {
|
|
5
5
|
"name": "Lokalise",
|
|
6
6
|
"url": "https://lokalise.com"
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"postversion": "biome check --write package.json"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@biomejs/biome": "^2.4.
|
|
38
|
+
"@biomejs/biome": "^2.4.13",
|
|
39
39
|
"@lokalise/api-common": "^6.1.2",
|
|
40
40
|
"@lokalise/biome-config": "^3.1.0",
|
|
41
41
|
"@lokalise/tsconfig": "^3.0.0",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"zod": "^4.0.0"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@lokalise/api-contracts": "^6.
|
|
49
|
+
"@lokalise/api-contracts": "^6.9.0",
|
|
50
50
|
"@lokalise/supported-languages": "^3.2.0"
|
|
51
51
|
}
|
|
52
52
|
}
|