@verbatra/sdk 0.11.0 → 0.12.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.
@@ -0,0 +1,253 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://verbatra.kreitz-webdev.de/schema/v1/check-file-summary.json",
4
+ "title": "verbatra check --file summary",
5
+ "type": "object",
6
+ "properties": {
7
+ "file": {
8
+ "type": "string"
9
+ },
10
+ "role": {
11
+ "type": "string",
12
+ "enum": [
13
+ "source",
14
+ "target",
15
+ "catalogue"
16
+ ]
17
+ },
18
+ "locales": {
19
+ "type": "array",
20
+ "items": {
21
+ "type": "object",
22
+ "properties": {
23
+ "locale": {
24
+ "type": "string"
25
+ },
26
+ "incompletePlurals": {
27
+ "type": "array",
28
+ "items": {
29
+ "type": "object",
30
+ "properties": {
31
+ "code": {
32
+ "type": "string",
33
+ "const": "PLURAL_CATEGORIES_INCOMPLETE"
34
+ },
35
+ "key": {
36
+ "type": "string"
37
+ },
38
+ "argument": {
39
+ "type": "string"
40
+ },
41
+ "ruleType": {
42
+ "type": "string",
43
+ "enum": [
44
+ "cardinal",
45
+ "ordinal"
46
+ ]
47
+ },
48
+ "missing": {
49
+ "type": "array",
50
+ "items": {
51
+ "type": "string",
52
+ "enum": [
53
+ "zero",
54
+ "one",
55
+ "two",
56
+ "few",
57
+ "many",
58
+ "other"
59
+ ]
60
+ }
61
+ }
62
+ },
63
+ "required": [
64
+ "code",
65
+ "key",
66
+ "ruleType",
67
+ "missing"
68
+ ]
69
+ }
70
+ },
71
+ "qa": {
72
+ "type": "object",
73
+ "properties": {
74
+ "checked": {
75
+ "type": "number"
76
+ },
77
+ "errors": {
78
+ "type": "number"
79
+ },
80
+ "warnings": {
81
+ "type": "number"
82
+ },
83
+ "findings": {
84
+ "type": "array",
85
+ "items": {
86
+ "anyOf": [
87
+ {
88
+ "anyOf": [
89
+ {
90
+ "type": "object",
91
+ "properties": {
92
+ "key": {
93
+ "type": "string"
94
+ },
95
+ "severity": {
96
+ "type": "string",
97
+ "const": "error"
98
+ },
99
+ "reason": {
100
+ "type": "string",
101
+ "enum": [
102
+ "placeholder",
103
+ "markup",
104
+ "icu",
105
+ "degenerate",
106
+ "empty"
107
+ ]
108
+ },
109
+ "details": {
110
+ "type": "array",
111
+ "items": {
112
+ "type": "string"
113
+ }
114
+ }
115
+ },
116
+ "required": [
117
+ "key",
118
+ "severity",
119
+ "reason"
120
+ ]
121
+ },
122
+ {
123
+ "type": "object",
124
+ "properties": {
125
+ "key": {
126
+ "type": "string"
127
+ },
128
+ "severity": {
129
+ "type": "string",
130
+ "const": "warning"
131
+ },
132
+ "reason": {
133
+ "type": "string",
134
+ "enum": [
135
+ "LENGTH_RATIO_OUTLIER",
136
+ "MAX_LENGTH_EXCEEDED",
137
+ "EQUALS_SOURCE",
138
+ "GLOSSARY_TERM_MISSED",
139
+ "GLOSSARY_FORBIDDEN_TERM",
140
+ "INTEGRITY_REORDERED",
141
+ "PROVIDER_DEGRADED",
142
+ "FUZZY_CACHE_REUSE",
143
+ "FOREIGN_PLACEHOLDER_CHANGED",
144
+ "BIDI_CONTROLS_CHANGED"
145
+ ]
146
+ },
147
+ "details": {
148
+ "type": "array",
149
+ "items": {
150
+ "type": "string"
151
+ }
152
+ }
153
+ },
154
+ "required": [
155
+ "key",
156
+ "severity",
157
+ "reason"
158
+ ]
159
+ }
160
+ ]
161
+ },
162
+ {
163
+ "type": "object",
164
+ "properties": {
165
+ "severity": {
166
+ "type": "string",
167
+ "const": "error"
168
+ },
169
+ "reason": {
170
+ "type": "string",
171
+ "const": "syntax"
172
+ },
173
+ "code": {
174
+ "type": "string",
175
+ "enum": [
176
+ "INVALID_JSON",
177
+ "INVALID_YAML",
178
+ "INVALID_XML",
179
+ "INVALID_STRUCTURE",
180
+ "MAX_DEPTH_EXCEEDED",
181
+ "INPUT_TOO_LARGE",
182
+ "MIXED_STRUCTURE",
183
+ "ADAPTER_FAILED",
184
+ "DUPLICATE_FORMAT",
185
+ "INVALID_FORMAT_ID"
186
+ ]
187
+ },
188
+ "message": {
189
+ "type": "string"
190
+ },
191
+ "line": {
192
+ "type": "number"
193
+ },
194
+ "column": {
195
+ "type": "number"
196
+ }
197
+ },
198
+ "required": [
199
+ "severity",
200
+ "reason",
201
+ "code",
202
+ "message"
203
+ ]
204
+ }
205
+ ]
206
+ }
207
+ }
208
+ },
209
+ "required": [
210
+ "checked",
211
+ "errors",
212
+ "warnings",
213
+ "findings"
214
+ ]
215
+ }
216
+ },
217
+ "required": [
218
+ "locale",
219
+ "incompletePlurals",
220
+ "qa"
221
+ ]
222
+ }
223
+ },
224
+ "qa": {
225
+ "type": "object",
226
+ "properties": {
227
+ "errors": {
228
+ "type": "number"
229
+ },
230
+ "warnings": {
231
+ "type": "number"
232
+ },
233
+ "invalidSourceKeys": {
234
+ "type": "array",
235
+ "items": {
236
+ "type": "string"
237
+ }
238
+ }
239
+ },
240
+ "required": [
241
+ "errors",
242
+ "warnings",
243
+ "invalidSourceKeys"
244
+ ]
245
+ }
246
+ },
247
+ "required": [
248
+ "file",
249
+ "role",
250
+ "locales",
251
+ "qa"
252
+ ]
253
+ }
@@ -0,0 +1,430 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://verbatra.kreitz-webdev.de/schema/v1/check-summary.json",
4
+ "title": "verbatra check summary",
5
+ "type": "object",
6
+ "properties": {
7
+ "inSync": {
8
+ "type": "boolean"
9
+ },
10
+ "locales": {
11
+ "type": "array",
12
+ "items": {
13
+ "type": "object",
14
+ "properties": {
15
+ "locale": {
16
+ "type": "string"
17
+ },
18
+ "missing": {
19
+ "type": "number"
20
+ },
21
+ "stale": {
22
+ "type": "number"
23
+ },
24
+ "upToDate": {
25
+ "type": "number"
26
+ },
27
+ "inSync": {
28
+ "type": "boolean"
29
+ },
30
+ "emptySource": {
31
+ "type": "number"
32
+ },
33
+ "provenance": {
34
+ "type": "object",
35
+ "properties": {
36
+ "byOrigin": {
37
+ "type": "object",
38
+ "propertyNames": {
39
+ "type": "string",
40
+ "enum": [
41
+ "machine",
42
+ "memory",
43
+ "fuzzy",
44
+ "agent",
45
+ "human",
46
+ "import",
47
+ "unknown",
48
+ "unrecorded",
49
+ "external"
50
+ ]
51
+ },
52
+ "additionalProperties": {
53
+ "type": "number"
54
+ },
55
+ "required": [
56
+ "machine",
57
+ "memory",
58
+ "fuzzy",
59
+ "agent",
60
+ "human",
61
+ "import",
62
+ "unknown",
63
+ "unrecorded",
64
+ "external"
65
+ ]
66
+ },
67
+ "byReviewState": {
68
+ "type": "object",
69
+ "propertyNames": {
70
+ "type": "string",
71
+ "enum": [
72
+ "unreviewed",
73
+ "approved",
74
+ "rejected"
75
+ ]
76
+ },
77
+ "additionalProperties": {
78
+ "type": "number"
79
+ },
80
+ "required": [
81
+ "unreviewed",
82
+ "approved",
83
+ "rejected"
84
+ ]
85
+ }
86
+ },
87
+ "required": [
88
+ "byOrigin",
89
+ "byReviewState"
90
+ ]
91
+ },
92
+ "protected": {
93
+ "type": "number"
94
+ },
95
+ "incompletePlurals": {
96
+ "type": "array",
97
+ "items": {
98
+ "type": "object",
99
+ "properties": {
100
+ "code": {
101
+ "type": "string",
102
+ "const": "PLURAL_CATEGORIES_INCOMPLETE"
103
+ },
104
+ "key": {
105
+ "type": "string"
106
+ },
107
+ "argument": {
108
+ "type": "string"
109
+ },
110
+ "ruleType": {
111
+ "type": "string",
112
+ "enum": [
113
+ "cardinal",
114
+ "ordinal"
115
+ ]
116
+ },
117
+ "missing": {
118
+ "type": "array",
119
+ "items": {
120
+ "type": "string",
121
+ "enum": [
122
+ "zero",
123
+ "one",
124
+ "two",
125
+ "few",
126
+ "many",
127
+ "other"
128
+ ]
129
+ }
130
+ }
131
+ },
132
+ "required": [
133
+ "code",
134
+ "key",
135
+ "ruleType",
136
+ "missing"
137
+ ]
138
+ }
139
+ },
140
+ "inconsistencies": {
141
+ "type": "array",
142
+ "items": {
143
+ "type": "object",
144
+ "properties": {
145
+ "source": {
146
+ "type": "string"
147
+ },
148
+ "context": {
149
+ "type": "string"
150
+ },
151
+ "description": {
152
+ "type": "string"
153
+ },
154
+ "meaning": {
155
+ "type": "string"
156
+ },
157
+ "isPlural": {
158
+ "type": "boolean"
159
+ },
160
+ "pluralForm": {
161
+ "type": "string"
162
+ },
163
+ "translations": {
164
+ "type": "array",
165
+ "items": {
166
+ "type": "object",
167
+ "properties": {
168
+ "value": {
169
+ "type": "string"
170
+ },
171
+ "keys": {
172
+ "type": "array",
173
+ "items": {
174
+ "type": "string"
175
+ }
176
+ }
177
+ },
178
+ "required": [
179
+ "value",
180
+ "keys"
181
+ ]
182
+ }
183
+ }
184
+ },
185
+ "required": [
186
+ "source",
187
+ "isPlural",
188
+ "translations"
189
+ ]
190
+ }
191
+ },
192
+ "qa": {
193
+ "type": "object",
194
+ "properties": {
195
+ "checked": {
196
+ "type": "number"
197
+ },
198
+ "errors": {
199
+ "type": "number"
200
+ },
201
+ "warnings": {
202
+ "type": "number"
203
+ },
204
+ "findings": {
205
+ "type": "array",
206
+ "items": {
207
+ "anyOf": [
208
+ {
209
+ "type": "object",
210
+ "properties": {
211
+ "key": {
212
+ "type": "string"
213
+ },
214
+ "severity": {
215
+ "type": "string",
216
+ "const": "error"
217
+ },
218
+ "reason": {
219
+ "type": "string",
220
+ "enum": [
221
+ "placeholder",
222
+ "markup",
223
+ "icu",
224
+ "degenerate",
225
+ "empty"
226
+ ]
227
+ },
228
+ "details": {
229
+ "type": "array",
230
+ "items": {
231
+ "type": "string"
232
+ }
233
+ }
234
+ },
235
+ "required": [
236
+ "key",
237
+ "severity",
238
+ "reason"
239
+ ]
240
+ },
241
+ {
242
+ "type": "object",
243
+ "properties": {
244
+ "key": {
245
+ "type": "string"
246
+ },
247
+ "severity": {
248
+ "type": "string",
249
+ "const": "warning"
250
+ },
251
+ "reason": {
252
+ "type": "string",
253
+ "enum": [
254
+ "LENGTH_RATIO_OUTLIER",
255
+ "MAX_LENGTH_EXCEEDED",
256
+ "EQUALS_SOURCE",
257
+ "GLOSSARY_TERM_MISSED",
258
+ "GLOSSARY_FORBIDDEN_TERM",
259
+ "INTEGRITY_REORDERED",
260
+ "PROVIDER_DEGRADED",
261
+ "FUZZY_CACHE_REUSE",
262
+ "FOREIGN_PLACEHOLDER_CHANGED",
263
+ "BIDI_CONTROLS_CHANGED"
264
+ ]
265
+ },
266
+ "details": {
267
+ "type": "array",
268
+ "items": {
269
+ "type": "string"
270
+ }
271
+ }
272
+ },
273
+ "required": [
274
+ "key",
275
+ "severity",
276
+ "reason"
277
+ ]
278
+ }
279
+ ]
280
+ }
281
+ }
282
+ },
283
+ "required": [
284
+ "checked",
285
+ "errors",
286
+ "warnings",
287
+ "findings"
288
+ ]
289
+ },
290
+ "review": {
291
+ "type": "object",
292
+ "properties": {
293
+ "unreviewed": {
294
+ "type": "array",
295
+ "items": {
296
+ "type": "string"
297
+ }
298
+ }
299
+ },
300
+ "required": [
301
+ "unreviewed"
302
+ ]
303
+ }
304
+ },
305
+ "required": [
306
+ "locale",
307
+ "missing",
308
+ "stale",
309
+ "upToDate",
310
+ "inSync"
311
+ ]
312
+ }
313
+ },
314
+ "qa": {
315
+ "type": "object",
316
+ "properties": {
317
+ "errors": {
318
+ "type": "number"
319
+ },
320
+ "warnings": {
321
+ "type": "number"
322
+ },
323
+ "invalidSourceKeys": {
324
+ "type": "array",
325
+ "items": {
326
+ "type": "string"
327
+ }
328
+ }
329
+ },
330
+ "required": [
331
+ "errors",
332
+ "warnings",
333
+ "invalidSourceKeys"
334
+ ]
335
+ },
336
+ "review": {
337
+ "type": "object",
338
+ "properties": {
339
+ "reviewed": {
340
+ "type": "boolean"
341
+ },
342
+ "unreviewed": {
343
+ "type": "number"
344
+ },
345
+ "code": {
346
+ "type": "string",
347
+ "enum": [
348
+ "REVIEW_REQUIRED",
349
+ "REVIEW_STATE_UNREADABLE"
350
+ ]
351
+ }
352
+ },
353
+ "required": [
354
+ "reviewed",
355
+ "unreviewed"
356
+ ]
357
+ },
358
+ "sensitive": {
359
+ "type": "object",
360
+ "properties": {
361
+ "findings": {
362
+ "type": "array",
363
+ "items": {
364
+ "type": "object",
365
+ "properties": {
366
+ "key": {
367
+ "type": "string"
368
+ },
369
+ "fields": {
370
+ "type": "array",
371
+ "items": {
372
+ "type": "string",
373
+ "enum": [
374
+ "key",
375
+ "value",
376
+ "description",
377
+ "meaning"
378
+ ]
379
+ }
380
+ },
381
+ "detectors": {
382
+ "type": "array",
383
+ "items": {
384
+ "anyOf": [
385
+ {
386
+ "type": "string",
387
+ "enum": [
388
+ "secret",
389
+ "email",
390
+ "iban",
391
+ "credit-card",
392
+ "phone",
393
+ "ip",
394
+ "private-host"
395
+ ]
396
+ },
397
+ {
398
+ "type": "string",
399
+ "const": "pattern"
400
+ },
401
+ {
402
+ "type": "string",
403
+ "pattern": "^pattern-timeout--?\\d+(?:\\.\\d+)?$"
404
+ }
405
+ ]
406
+ }
407
+ }
408
+ },
409
+ "required": [
410
+ "key",
411
+ "fields",
412
+ "detectors"
413
+ ]
414
+ }
415
+ },
416
+ "glossaryTerms": {
417
+ "type": "number"
418
+ }
419
+ },
420
+ "required": [
421
+ "findings",
422
+ "glossaryTerms"
423
+ ]
424
+ }
425
+ },
426
+ "required": [
427
+ "inSync",
428
+ "locales"
429
+ ]
430
+ }