@lokalise/ragnarok-api-contracts 4.0.2 → 5.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/common.js +1 -1
- package/dist/common.js.map +1 -1
- package/dist/evaluation-contracts.d.ts +117 -36
- package/dist/evaluation-contracts.js +7 -8
- package/dist/evaluation-contracts.js.map +1 -1
- package/dist/index.d.ts +0 -2
- package/dist/index.js +3 -5
- package/dist/index.js.map +1 -1
- package/dist/objects.d.ts +454 -69
- package/dist/objects.js +124 -29
- package/dist/objects.js.map +1 -1
- package/package.json +5 -5
- package/dist/evaluation-contracts-v2.d.ts +0 -249
- package/dist/evaluation-contracts-v2.js +0 -33
- package/dist/evaluation-contracts-v2.js.map +0 -1
- package/dist/objects-v2.d.ts +0 -598
- package/dist/objects-v2.js +0 -144
- package/dist/objects-v2.js.map +0 -1
package/dist/common.js
CHANGED
|
@@ -11,7 +11,7 @@ export const AUTH_HEADERS = z.object({
|
|
|
11
11
|
});
|
|
12
12
|
export const METADATA_SCHEMA = z
|
|
13
13
|
.record(z.string(), z.unknown())
|
|
14
|
-
.describe('A free-form object that can be used to provide
|
|
14
|
+
.describe('A free-form object that can be used to provide additional metadata');
|
|
15
15
|
export const INTEGRATION_INPUT_SCHEMA = z
|
|
16
16
|
.object({
|
|
17
17
|
engine: z.enum(RealIntegrationEngineEnum).optional().describe('Preferred translation engine'),
|
package/dist/common.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.js","sourceRoot":"","sources":["../src/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAA;AAClE,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAA;AACjE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC;KAC3B,MAAM,EAAE;KACR,GAAG,CAAC,CAAC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,EAAE,CAAC,CAAC,IAAI,CAAC,yBAAyB,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,8BAA8B,CAAC;IAC7F,QAAQ,EAAE,CAAC;SACR,OAAO,EAAE;SACT,OAAO,CAAC,KAAK,CAAC;SACd,QAAQ,CACP,qFAAqF,CACtF;CACJ,CAAC;KACD,QAAQ,CAAC,oDAAoD,CAAC,CAAA;AAIjE,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC;KAC5B,MAAM,CAAC;IACN,GAAG,EAAE,CAAC;SACH,GAAG,EAAE;SACL,GAAG,CAAC,IAAI,CAAC;SACT,QAAQ,CACP,2FAA2F,CAC5F;IACH,OAAO,EAAE,CAAC;SACP,MAAM,CACL,CAAC;SACE,MAAM,EAAE;SACR,KAAK,CAAC,iBAAiB,EAAE;QACxB,OAAO,EAAE,6DAA6D;KACvE,CAAC;SACD,GAAG,CAAC,GAAG,CAAC;SACR,QAAQ,CAAC,yDAAyD,CAAC,EACtE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,mDAAmD,CAAC,CAC1F;SACA,QAAQ,EAAE;SACV,QAAQ,CAAC,uDAAuD,CAAC;CACrE,CAAC;KACD,QAAQ,CAAC,sEAAsE,CAAC,CAAA"}
|
|
@@ -9,7 +9,7 @@ export declare const getEvaluationContract: {
|
|
|
9
9
|
readonly pathResolver: ({ evaluationId }: {
|
|
10
10
|
evaluationId: string;
|
|
11
11
|
}) => string;
|
|
12
|
-
readonly description: "Retrieve evaluation by id";
|
|
12
|
+
readonly description: "Retrieve evaluation by id (with coverage and reliability metadata)";
|
|
13
13
|
readonly requestPathParamsSchema: z.ZodObject<{
|
|
14
14
|
evaluationId: z.ZodUUID;
|
|
15
15
|
}, z.core.$strip>;
|
|
@@ -17,7 +17,7 @@ export declare const getEvaluationContract: {
|
|
|
17
17
|
authorization: z.ZodString;
|
|
18
18
|
}, z.core.$strip>;
|
|
19
19
|
readonly responsesByStatusCode: {
|
|
20
|
-
|
|
20
|
+
200: z.ZodObject<{
|
|
21
21
|
id: z.ZodUUID;
|
|
22
22
|
ownerId: z.ZodString;
|
|
23
23
|
status: z.ZodEnum<{
|
|
@@ -44,12 +44,6 @@ export declare const getEvaluationContract: {
|
|
|
44
44
|
lower: "lower";
|
|
45
45
|
}>;
|
|
46
46
|
}, z.core.$strip>;
|
|
47
|
-
meteor: z.ZodObject<{
|
|
48
|
-
betterWhen: z.ZodEnum<{
|
|
49
|
-
higher: "higher";
|
|
50
|
-
lower: "lower";
|
|
51
|
-
}>;
|
|
52
|
-
}, z.core.$strip>;
|
|
53
47
|
chrf: z.ZodObject<{
|
|
54
48
|
betterWhen: z.ZodEnum<{
|
|
55
49
|
higher: "higher";
|
|
@@ -60,22 +54,116 @@ export declare const getEvaluationContract: {
|
|
|
60
54
|
results: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
61
55
|
configurationName: z.ZodString;
|
|
62
56
|
global: z.ZodObject<{
|
|
63
|
-
exactMatch: z.ZodOptional<z.
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
57
|
+
exactMatch: z.ZodOptional<z.ZodObject<{
|
|
58
|
+
value: z.ZodNumber;
|
|
59
|
+
computedSegments: z.ZodNumber;
|
|
60
|
+
comparableSegments: z.ZodNumber;
|
|
61
|
+
status: z.ZodEnum<{
|
|
62
|
+
degraded: "degraded";
|
|
63
|
+
failed: "failed";
|
|
64
|
+
perfect: "perfect";
|
|
65
|
+
}>;
|
|
66
|
+
excludedLocalePairs: z.ZodArray<z.ZodObject<{
|
|
67
|
+
sourceLocale: z.ZodString;
|
|
68
|
+
targetLocale: z.ZodString;
|
|
69
|
+
}, z.core.$strip>>;
|
|
70
|
+
}, z.core.$strip>>;
|
|
71
|
+
ter: z.ZodOptional<z.ZodObject<{
|
|
72
|
+
value: z.ZodNumber;
|
|
73
|
+
computedSegments: z.ZodNumber;
|
|
74
|
+
comparableSegments: z.ZodNumber;
|
|
75
|
+
status: z.ZodEnum<{
|
|
76
|
+
degraded: "degraded";
|
|
77
|
+
failed: "failed";
|
|
78
|
+
perfect: "perfect";
|
|
79
|
+
}>;
|
|
80
|
+
excludedLocalePairs: z.ZodArray<z.ZodObject<{
|
|
81
|
+
sourceLocale: z.ZodString;
|
|
82
|
+
targetLocale: z.ZodString;
|
|
83
|
+
}, z.core.$strip>>;
|
|
84
|
+
}, z.core.$strip>>;
|
|
85
|
+
bleu: z.ZodOptional<z.ZodObject<{
|
|
86
|
+
value: z.ZodNumber;
|
|
87
|
+
computedSegments: z.ZodNumber;
|
|
88
|
+
comparableSegments: z.ZodNumber;
|
|
89
|
+
status: z.ZodEnum<{
|
|
90
|
+
degraded: "degraded";
|
|
91
|
+
failed: "failed";
|
|
92
|
+
perfect: "perfect";
|
|
93
|
+
}>;
|
|
94
|
+
excludedLocalePairs: z.ZodArray<z.ZodObject<{
|
|
95
|
+
sourceLocale: z.ZodString;
|
|
96
|
+
targetLocale: z.ZodString;
|
|
97
|
+
}, z.core.$strip>>;
|
|
98
|
+
}, z.core.$strip>>;
|
|
99
|
+
chrf: z.ZodOptional<z.ZodObject<{
|
|
100
|
+
value: z.ZodNumber;
|
|
101
|
+
computedSegments: z.ZodNumber;
|
|
102
|
+
comparableSegments: z.ZodNumber;
|
|
103
|
+
status: z.ZodEnum<{
|
|
104
|
+
degraded: "degraded";
|
|
105
|
+
failed: "failed";
|
|
106
|
+
perfect: "perfect";
|
|
107
|
+
}>;
|
|
108
|
+
excludedLocalePairs: z.ZodArray<z.ZodObject<{
|
|
109
|
+
sourceLocale: z.ZodString;
|
|
110
|
+
targetLocale: z.ZodString;
|
|
111
|
+
}, z.core.$strip>>;
|
|
112
|
+
}, z.core.$strip>>;
|
|
68
113
|
}, z.core.$strip>;
|
|
69
114
|
resultsByLocalePair: z.ZodArray<z.ZodObject<{
|
|
70
115
|
sourceLocale: z.ZodString;
|
|
71
116
|
targetLocale: z.ZodString;
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
117
|
+
totalSegments: z.ZodNumber;
|
|
118
|
+
translatedSegments: z.ZodNumber;
|
|
119
|
+
translationStatus: z.ZodEnum<{
|
|
120
|
+
integration_failure: "integration_failure";
|
|
121
|
+
partial_success: "partial_success";
|
|
122
|
+
success: "success";
|
|
123
|
+
unsupported_locale_pair: "unsupported_locale_pair";
|
|
124
|
+
}>;
|
|
125
|
+
metrics: z.ZodNullable<z.ZodObject<{
|
|
126
|
+
exactMatch: z.ZodOptional<z.ZodObject<{
|
|
127
|
+
value: z.ZodNumber;
|
|
128
|
+
computedSegments: z.ZodNumber;
|
|
129
|
+
comparableSegments: z.ZodNumber;
|
|
130
|
+
status: z.ZodEnum<{
|
|
131
|
+
degraded: "degraded";
|
|
132
|
+
failed: "failed";
|
|
133
|
+
perfect: "perfect";
|
|
134
|
+
}>;
|
|
135
|
+
}, z.core.$strip>>;
|
|
136
|
+
ter: z.ZodOptional<z.ZodObject<{
|
|
137
|
+
value: z.ZodNumber;
|
|
138
|
+
computedSegments: z.ZodNumber;
|
|
139
|
+
comparableSegments: z.ZodNumber;
|
|
140
|
+
status: z.ZodEnum<{
|
|
141
|
+
degraded: "degraded";
|
|
142
|
+
failed: "failed";
|
|
143
|
+
perfect: "perfect";
|
|
144
|
+
}>;
|
|
145
|
+
}, z.core.$strip>>;
|
|
146
|
+
bleu: z.ZodOptional<z.ZodObject<{
|
|
147
|
+
value: z.ZodNumber;
|
|
148
|
+
computedSegments: z.ZodNumber;
|
|
149
|
+
comparableSegments: z.ZodNumber;
|
|
150
|
+
status: z.ZodEnum<{
|
|
151
|
+
degraded: "degraded";
|
|
152
|
+
failed: "failed";
|
|
153
|
+
perfect: "perfect";
|
|
154
|
+
}>;
|
|
155
|
+
}, z.core.$strip>>;
|
|
156
|
+
chrf: z.ZodOptional<z.ZodObject<{
|
|
157
|
+
value: z.ZodNumber;
|
|
158
|
+
computedSegments: z.ZodNumber;
|
|
159
|
+
comparableSegments: z.ZodNumber;
|
|
160
|
+
status: z.ZodEnum<{
|
|
161
|
+
degraded: "degraded";
|
|
162
|
+
failed: "failed";
|
|
163
|
+
perfect: "perfect";
|
|
164
|
+
}>;
|
|
165
|
+
}, z.core.$strip>>;
|
|
166
|
+
}, z.core.$strip>>;
|
|
79
167
|
}, z.core.$strip>>;
|
|
80
168
|
}, z.core.$strip>>>;
|
|
81
169
|
metadata: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
@@ -179,7 +267,7 @@ export declare const postScheduleEvaluationContract: {
|
|
|
179
267
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
180
268
|
}, z.core.$strip>;
|
|
181
269
|
readonly responsesByStatusCode: {
|
|
182
|
-
|
|
270
|
+
202: z.ZodObject<{
|
|
183
271
|
evaluationId: z.ZodUUID;
|
|
184
272
|
}, z.core.$strip>;
|
|
185
273
|
};
|
|
@@ -188,20 +276,18 @@ declare const PaginationCursorSchema: z.ZodObject<{
|
|
|
188
276
|
id: z.ZodString;
|
|
189
277
|
exactMatch: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
190
278
|
ter: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
191
|
-
meteor: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
192
279
|
}, z.core.$strip>;
|
|
193
280
|
export type PaginationCursor = z.infer<typeof PaginationCursorSchema>;
|
|
194
281
|
export declare const PaginationCursorCodec: z.ZodCodec<z.ZodString, z.ZodObject<{
|
|
195
282
|
id: z.ZodString;
|
|
196
283
|
exactMatch: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
197
284
|
ter: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
198
|
-
meteor: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
199
285
|
}, z.core.$strip>>;
|
|
200
286
|
declare const GET_EVALUATION_ITEMS_PARAMS_SCHEMA: z.ZodObject<{
|
|
201
287
|
evaluationId: z.ZodUUID;
|
|
202
288
|
}, z.core.$strip>;
|
|
203
289
|
export type GetEvaluationItemsParams = z.infer<typeof GET_EVALUATION_ITEMS_PARAMS_SCHEMA>;
|
|
204
|
-
declare const SORT_FIELDS: readonly [
|
|
290
|
+
declare const SORT_FIELDS: readonly ['id', 'exactMatch', 'ter'];
|
|
205
291
|
export type ItemSortBy = (typeof SORT_FIELDS)[number];
|
|
206
292
|
export type ItemSort = {
|
|
207
293
|
by: ItemSortBy;
|
|
@@ -213,13 +299,11 @@ declare const GET_EVALUATION_ITEMS_QUERY_SCHEMA: z.ZodObject<{
|
|
|
213
299
|
id: z.ZodString;
|
|
214
300
|
exactMatch: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
215
301
|
ter: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
216
|
-
meteor: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
217
302
|
}, z.core.$strip>>>;
|
|
218
303
|
after: z.ZodOptional<z.ZodCodec<z.ZodString, z.ZodObject<{
|
|
219
304
|
id: z.ZodString;
|
|
220
305
|
exactMatch: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
221
306
|
ter: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
222
|
-
meteor: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
223
307
|
}, z.core.$strip>>>;
|
|
224
308
|
sort: z.ZodPipe<z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
225
309
|
[x: string]: string;
|
|
@@ -248,13 +332,11 @@ export declare const getEvaluationItemsContract: {
|
|
|
248
332
|
id: z.ZodString;
|
|
249
333
|
exactMatch: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
250
334
|
ter: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
251
|
-
meteor: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
252
335
|
}, z.core.$strip>>>;
|
|
253
336
|
after: z.ZodOptional<z.ZodCodec<z.ZodString, z.ZodObject<{
|
|
254
337
|
id: z.ZodString;
|
|
255
338
|
exactMatch: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
256
339
|
ter: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
257
|
-
meteor: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
258
340
|
}, z.core.$strip>>>;
|
|
259
341
|
sort: z.ZodPipe<z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
260
342
|
[x: string]: string;
|
|
@@ -266,7 +348,7 @@ export declare const getEvaluationItemsContract: {
|
|
|
266
348
|
authorization: z.ZodString;
|
|
267
349
|
}, z.core.$strip>;
|
|
268
350
|
readonly responsesByStatusCode: {
|
|
269
|
-
|
|
351
|
+
200: z.ZodObject<{
|
|
270
352
|
data: z.ZodArray<z.ZodObject<{
|
|
271
353
|
itemId: z.ZodUUID;
|
|
272
354
|
externalId: z.ZodString;
|
|
@@ -282,19 +364,18 @@ export declare const getEvaluationItemsContract: {
|
|
|
282
364
|
translations: z.ZodArray<z.ZodObject<{
|
|
283
365
|
configurationName: z.ZodString;
|
|
284
366
|
status: z.ZodEnum<{
|
|
285
|
-
translating: "translating";
|
|
286
|
-
translated: "translated";
|
|
287
|
-
scoring: "scoring";
|
|
288
|
-
scored: "scored";
|
|
289
367
|
completed: "completed";
|
|
290
368
|
failed: "failed";
|
|
369
|
+
scored: "scored";
|
|
370
|
+
scoring: "scoring";
|
|
371
|
+
translated: "translated";
|
|
372
|
+
translating: "translating";
|
|
291
373
|
}>;
|
|
292
374
|
actualTranslation: z.ZodNullable<z.ZodString>;
|
|
293
375
|
actualScore: z.ZodNullable<z.ZodNumber>;
|
|
294
376
|
metrics: z.ZodNullable<z.ZodObject<{
|
|
295
377
|
exactMatch: z.ZodOptional<z.ZodNumber>;
|
|
296
378
|
ter: z.ZodOptional<z.ZodNumber>;
|
|
297
|
-
meteor: z.ZodOptional<z.ZodNumber>;
|
|
298
379
|
chrf: z.ZodOptional<z.ZodNumber>;
|
|
299
380
|
}, z.core.$strip>>;
|
|
300
381
|
error: z.ZodNullable<z.ZodObject<{
|
|
@@ -329,8 +410,8 @@ export declare const deleteOwnerEvaluationsContract: {
|
|
|
329
410
|
authorization: z.ZodString;
|
|
330
411
|
}, z.core.$strip>;
|
|
331
412
|
readonly responsesByStatusCode: {
|
|
332
|
-
|
|
333
|
-
|
|
413
|
+
202: typeof ContractNoBody;
|
|
414
|
+
204: typeof ContractNoBody;
|
|
334
415
|
};
|
|
335
416
|
};
|
|
336
417
|
export {};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { ContractNoBody, defineApiContract } from '@lokalise/api-contracts';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { AUTH_HEADERS, INTEGRATION_INPUT_SCHEMA, LOCALE_SCHEMA, METADATA_SCHEMA, WEBHOOK_SCHEMA, } from
|
|
4
|
-
import { EVALUATION_ITEM_DETAIL_SCHEMA, EVALUATION_SCHEMA } from
|
|
3
|
+
import { AUTH_HEADERS, INTEGRATION_INPUT_SCHEMA, LOCALE_SCHEMA, METADATA_SCHEMA, WEBHOOK_SCHEMA, } from './common.js';
|
|
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
8
|
export const getEvaluationContract = defineApiContract({
|
|
9
9
|
method: 'get',
|
|
10
|
-
pathResolver: ({ evaluationId }) => `/
|
|
11
|
-
description: 'Retrieve evaluation by id',
|
|
10
|
+
pathResolver: ({ evaluationId }) => `/v2/evaluations/${evaluationId}`,
|
|
11
|
+
description: 'Retrieve evaluation by id (with coverage and reliability metadata)',
|
|
12
12
|
requestPathParamsSchema: GET_EVALUATION_PARAMS_SCHEMA,
|
|
13
13
|
requestHeaderSchema: AUTH_HEADERS,
|
|
14
14
|
responsesByStatusCode: {
|
|
@@ -81,7 +81,7 @@ export const SCHEDULE_EVALUATION_RESPONSE_SCHEMA = z.object({
|
|
|
81
81
|
});
|
|
82
82
|
export const postScheduleEvaluationContract = defineApiContract({
|
|
83
83
|
method: 'post',
|
|
84
|
-
pathResolver: () => '/
|
|
84
|
+
pathResolver: () => '/v2/evaluations',
|
|
85
85
|
description: 'Schedule evaluation',
|
|
86
86
|
requestHeaderSchema: SCHEDULE_EVALUATION_HEADERS,
|
|
87
87
|
requestBodySchema: SCHEDULE_EVALUATION_BODY_SCHEMA,
|
|
@@ -93,7 +93,6 @@ const PaginationCursorSchema = z.object({
|
|
|
93
93
|
id: z.string(),
|
|
94
94
|
exactMatch: z.number().nullable().optional(),
|
|
95
95
|
ter: z.number().nullable().optional(),
|
|
96
|
-
meteor: z.number().nullable().optional(),
|
|
97
96
|
});
|
|
98
97
|
export const PaginationCursorCodec = z.codec(z.string(), PaginationCursorSchema, {
|
|
99
98
|
decode: (token) => JSON.parse(Buffer.from(token, 'base64url').toString()),
|
|
@@ -103,7 +102,7 @@ export const PaginationCursorCodec = z.codec(z.string(), PaginationCursorSchema,
|
|
|
103
102
|
const GET_EVALUATION_ITEMS_PARAMS_SCHEMA = z.object({
|
|
104
103
|
evaluationId: z.uuid().describe('The unique identifier of the evaluation'),
|
|
105
104
|
});
|
|
106
|
-
const SORT_FIELDS = ['id', 'exactMatch', 'ter'
|
|
105
|
+
const SORT_FIELDS = ['id', 'exactMatch', 'ter'];
|
|
107
106
|
const SORT_ENUM_VALUES = SORT_FIELDS.flatMap((field) => [field, `-${field}`]);
|
|
108
107
|
const GET_EVALUATION_ITEMS_QUERY_SCHEMA = z
|
|
109
108
|
.object({
|
|
@@ -118,7 +117,7 @@ const GET_EVALUATION_ITEMS_QUERY_SCHEMA = z
|
|
|
118
117
|
by: (value.startsWith('-') ? value.slice(1) : value),
|
|
119
118
|
order: value.startsWith('-') ? 'desc' : 'asc',
|
|
120
119
|
}))
|
|
121
|
-
.describe('Sort field and direction. Prefix with `-` for descending, e.g. `-ter`. Valid fields: id, exactMatch, ter
|
|
120
|
+
.describe('Sort field and direction. Prefix with `-` for descending, e.g. `-ter`. Valid fields: id, exactMatch, ter'),
|
|
122
121
|
'sort-config-name': z
|
|
123
122
|
.string()
|
|
124
123
|
.optional()
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evaluation-contracts.js","sourceRoot":"","sources":["../src/evaluation-contracts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAC3E,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,qBAAqB,GAAG,iBAAiB,CAAC;IACrD,MAAM,EAAE,KAAK;IACb,YAAY,EAAE,CAAC,EAAE,YAAY,EAAE,EAAE,EAAE,CAAC,mBAAmB,YAAY,EAAE;IACrE,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"evaluation-contracts.js","sourceRoot":"","sources":["../src/evaluation-contracts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAC3E,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AACvB,OAAO,EACL,YAAY,E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AAQ,CAAC,uCAAuC,CAAC;KACvE,CAAC;CACH,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,0BAA0B,GAAG,iBAAiB,CAAC;IAC1D,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;AAEF,mCAAmC;AAEnC,MAAM,sCAAsC,GAAG,CAAC,CAAC,MAAM,CAAC;IACtD,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,0DAA0D,CAAC;CAChG,CAAC,CAAA;AAIF,MAAM,CAAC,MAAM,8BAA8B,GAAG,iBAAiB,CAAC;IAC9D,MAAM,EAAE,QAAQ;IAChB,YAAY,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,cAAc,OAAO,cAAc;IAClE,WAAW,EACT,uJAAuJ;IACzJ,uBAAuB,EAAE,sCAAsC;IAC/D,mBAAmB,EAAE,YAAY;IACjC,qBAAqB,EAAE;QACrB,GAAG,EAAE,cAAc;QACnB,GAAG,EAAE,cAAc;KACpB;CACF,CAAC,CAAA"}
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from "./objects.js";
|
|
5
|
-
export * from "./objects-v2.js";
|
|
1
|
+
export * from './common.js';
|
|
2
|
+
export * from './evaluation-contracts.js';
|
|
3
|
+
export * from './objects.js';
|
|
6
4
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,2BAA2B,CAAA;AACzC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,2BAA2B,CAAA;AACzC,cAAc,cAAc,CAAA"}
|