@verbatra/sdk 0.11.1 → 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,210 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://verbatra.kreitz-webdev.de/schema/v1/import-tmx-result.json",
4
+ "title": "verbatra tmx import result",
5
+ "type": "object",
6
+ "properties": {
7
+ "dryRun": {
8
+ "type": "boolean"
9
+ },
10
+ "file": {
11
+ "type": "string"
12
+ },
13
+ "sourceLanguage": {
14
+ "type": "string"
15
+ },
16
+ "units": {
17
+ "type": "number"
18
+ },
19
+ "locales": {
20
+ "type": "array",
21
+ "items": {
22
+ "type": "object",
23
+ "properties": {
24
+ "locale": {
25
+ "type": "string"
26
+ },
27
+ "added": {
28
+ "type": "number"
29
+ },
30
+ "unchanged": {
31
+ "type": "number"
32
+ },
33
+ "overwritten": {
34
+ "type": "number"
35
+ },
36
+ "kept": {
37
+ "type": "number"
38
+ },
39
+ "duplicates": {
40
+ "type": "number"
41
+ },
42
+ "conflicting": {
43
+ "type": "number"
44
+ },
45
+ "rejected": {
46
+ "type": "object",
47
+ "propertyNames": {
48
+ "type": "string",
49
+ "enum": [
50
+ "placeholder",
51
+ "markup",
52
+ "icu",
53
+ "degenerate",
54
+ "empty",
55
+ "sourceBlank"
56
+ ]
57
+ },
58
+ "additionalProperties": {
59
+ "type": "number"
60
+ },
61
+ "required": [
62
+ "placeholder",
63
+ "markup",
64
+ "icu",
65
+ "degenerate",
66
+ "empty",
67
+ "sourceBlank"
68
+ ]
69
+ },
70
+ "refusals": {
71
+ "type": "array",
72
+ "items": {
73
+ "type": "object",
74
+ "properties": {
75
+ "unit": {
76
+ "type": "number"
77
+ },
78
+ "reason": {
79
+ "type": "string",
80
+ "enum": [
81
+ "placeholder",
82
+ "markup",
83
+ "icu",
84
+ "degenerate",
85
+ "empty"
86
+ ]
87
+ },
88
+ "details": {
89
+ "type": "array",
90
+ "items": {
91
+ "type": "string"
92
+ }
93
+ }
94
+ },
95
+ "required": [
96
+ "unit",
97
+ "reason"
98
+ ]
99
+ }
100
+ }
101
+ },
102
+ "required": [
103
+ "locale",
104
+ "added",
105
+ "unchanged",
106
+ "overwritten",
107
+ "kept",
108
+ "duplicates",
109
+ "conflicting",
110
+ "rejected",
111
+ "refusals"
112
+ ]
113
+ }
114
+ },
115
+ "skippedUnits": {
116
+ "type": "number"
117
+ },
118
+ "unreachableUnits": {
119
+ "type": "number"
120
+ },
121
+ "sourceLanguageMismatch": {
122
+ "type": "string"
123
+ },
124
+ "unmatchedSourceUnits": {
125
+ "type": "number"
126
+ },
127
+ "conflictingSourceUnits": {
128
+ "type": "number"
129
+ },
130
+ "markupStrippedUnits": {
131
+ "type": "number"
132
+ },
133
+ "subflowDroppedUnits": {
134
+ "type": "number"
135
+ },
136
+ "unmatchedLanguages": {
137
+ "type": "array",
138
+ "items": {
139
+ "type": "object",
140
+ "properties": {
141
+ "language": {
142
+ "type": "string"
143
+ },
144
+ "units": {
145
+ "type": "number"
146
+ }
147
+ },
148
+ "required": [
149
+ "language",
150
+ "units"
151
+ ]
152
+ }
153
+ },
154
+ "ambiguousLanguages": {
155
+ "type": "array",
156
+ "items": {
157
+ "type": "object",
158
+ "properties": {
159
+ "language": {
160
+ "type": "string"
161
+ },
162
+ "units": {
163
+ "type": "number"
164
+ }
165
+ },
166
+ "required": [
167
+ "language",
168
+ "units"
169
+ ]
170
+ }
171
+ },
172
+ "notImported": {
173
+ "type": "array",
174
+ "items": {
175
+ "type": "object",
176
+ "properties": {
177
+ "language": {
178
+ "type": "string"
179
+ },
180
+ "units": {
181
+ "type": "number"
182
+ }
183
+ },
184
+ "required": [
185
+ "language",
186
+ "units"
187
+ ]
188
+ }
189
+ },
190
+ "memoryWritable": {
191
+ "type": "boolean"
192
+ }
193
+ },
194
+ "required": [
195
+ "dryRun",
196
+ "file",
197
+ "units",
198
+ "locales",
199
+ "skippedUnits",
200
+ "unreachableUnits",
201
+ "unmatchedSourceUnits",
202
+ "conflictingSourceUnits",
203
+ "markupStrippedUnits",
204
+ "subflowDroppedUnits",
205
+ "unmatchedLanguages",
206
+ "ambiguousLanguages",
207
+ "notImported",
208
+ "memoryWritable"
209
+ ]
210
+ }
@@ -0,0 +1,32 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://verbatra.kreitz-webdev.de/schema/v1/lock-wait-event.json",
4
+ "title": "verbatra lock-wait event",
5
+ "type": "object",
6
+ "properties": {
7
+ "lockPath": {
8
+ "type": "string"
9
+ },
10
+ "elapsedMs": {
11
+ "type": "number"
12
+ },
13
+ "holder": {
14
+ "type": "object",
15
+ "properties": {
16
+ "pid": {
17
+ "type": "number"
18
+ },
19
+ "hostname": {
20
+ "type": "string"
21
+ },
22
+ "acquiredAt": {
23
+ "type": "string"
24
+ }
25
+ }
26
+ }
27
+ },
28
+ "required": [
29
+ "lockPath",
30
+ "elapsedMs"
31
+ ]
32
+ }
@@ -0,0 +1,292 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://verbatra.kreitz-webdev.de/schema/v1/progress-event.json",
4
+ "title": "verbatra progress event",
5
+ "anyOf": [
6
+ {
7
+ "type": "object",
8
+ "properties": {
9
+ "type": {
10
+ "type": "string",
11
+ "const": "locale-started"
12
+ },
13
+ "locale": {
14
+ "type": "string"
15
+ },
16
+ "localeIndex": {
17
+ "type": "number"
18
+ },
19
+ "totalLocales": {
20
+ "type": "number"
21
+ }
22
+ },
23
+ "required": [
24
+ "type",
25
+ "locale",
26
+ "localeIndex",
27
+ "totalLocales"
28
+ ]
29
+ },
30
+ {
31
+ "type": "object",
32
+ "properties": {
33
+ "type": {
34
+ "type": "string",
35
+ "const": "locale-planned"
36
+ },
37
+ "locale": {
38
+ "type": "string"
39
+ },
40
+ "keys": {
41
+ "type": "number"
42
+ },
43
+ "batches": {
44
+ "type": "number"
45
+ },
46
+ "cacheHits": {
47
+ "type": "number"
48
+ }
49
+ },
50
+ "required": [
51
+ "type",
52
+ "locale",
53
+ "keys",
54
+ "batches",
55
+ "cacheHits"
56
+ ]
57
+ },
58
+ {
59
+ "type": "object",
60
+ "properties": {
61
+ "type": {
62
+ "type": "string",
63
+ "const": "sub-batch"
64
+ },
65
+ "locale": {
66
+ "type": "string"
67
+ },
68
+ "batchIndex": {
69
+ "type": "number"
70
+ },
71
+ "totalBatches": {
72
+ "type": "number"
73
+ }
74
+ },
75
+ "required": [
76
+ "type",
77
+ "locale",
78
+ "batchIndex",
79
+ "totalBatches"
80
+ ]
81
+ },
82
+ {
83
+ "type": "object",
84
+ "properties": {
85
+ "type": {
86
+ "type": "string",
87
+ "const": "batch-finished"
88
+ },
89
+ "locale": {
90
+ "type": "string"
91
+ },
92
+ "batchIndex": {
93
+ "type": "number"
94
+ },
95
+ "totalBatches": {
96
+ "type": "number"
97
+ },
98
+ "durationMs": {
99
+ "type": "number"
100
+ },
101
+ "usage": {
102
+ "type": "object",
103
+ "properties": {
104
+ "inputTokens": {
105
+ "type": "number"
106
+ },
107
+ "outputTokens": {
108
+ "type": "number"
109
+ }
110
+ },
111
+ "required": [
112
+ "inputTokens",
113
+ "outputTokens"
114
+ ]
115
+ }
116
+ },
117
+ "required": [
118
+ "type",
119
+ "locale",
120
+ "batchIndex",
121
+ "totalBatches",
122
+ "durationMs"
123
+ ]
124
+ },
125
+ {
126
+ "type": "object",
127
+ "properties": {
128
+ "type": {
129
+ "type": "string",
130
+ "const": "provider-retry"
131
+ },
132
+ "attempt": {
133
+ "type": "number"
134
+ },
135
+ "delayMs": {
136
+ "type": "number"
137
+ },
138
+ "status": {
139
+ "type": "number"
140
+ }
141
+ },
142
+ "required": [
143
+ "type",
144
+ "attempt"
145
+ ]
146
+ },
147
+ {
148
+ "type": "object",
149
+ "properties": {
150
+ "type": {
151
+ "type": "string",
152
+ "const": "repair"
153
+ },
154
+ "locale": {
155
+ "type": "string"
156
+ },
157
+ "keys": {
158
+ "type": "number"
159
+ }
160
+ },
161
+ "required": [
162
+ "type",
163
+ "locale",
164
+ "keys"
165
+ ]
166
+ },
167
+ {
168
+ "type": "object",
169
+ "properties": {
170
+ "type": {
171
+ "type": "string",
172
+ "const": "split-retry"
173
+ },
174
+ "locale": {
175
+ "type": "string"
176
+ },
177
+ "keys": {
178
+ "type": "number"
179
+ }
180
+ },
181
+ "required": [
182
+ "type",
183
+ "locale",
184
+ "keys"
185
+ ]
186
+ },
187
+ {
188
+ "type": "object",
189
+ "properties": {
190
+ "type": {
191
+ "type": "string",
192
+ "const": "writing"
193
+ },
194
+ "locale": {
195
+ "type": "string"
196
+ }
197
+ },
198
+ "required": [
199
+ "type",
200
+ "locale"
201
+ ]
202
+ },
203
+ {
204
+ "type": "object",
205
+ "properties": {
206
+ "type": {
207
+ "type": "string",
208
+ "const": "locale-finished"
209
+ },
210
+ "locale": {
211
+ "type": "string"
212
+ },
213
+ "status": {
214
+ "type": "string",
215
+ "enum": [
216
+ "succeeded",
217
+ "partial",
218
+ "failed"
219
+ ]
220
+ },
221
+ "translated": {
222
+ "type": "number"
223
+ },
224
+ "localeIndex": {
225
+ "type": "number"
226
+ },
227
+ "totalLocales": {
228
+ "type": "number"
229
+ }
230
+ },
231
+ "required": [
232
+ "type",
233
+ "locale",
234
+ "status",
235
+ "translated",
236
+ "localeIndex",
237
+ "totalLocales"
238
+ ]
239
+ },
240
+ {
241
+ "type": "object",
242
+ "properties": {
243
+ "type": {
244
+ "type": "string",
245
+ "const": "run-finished"
246
+ },
247
+ "localesCompleted": {
248
+ "type": "number"
249
+ },
250
+ "localesFailed": {
251
+ "type": "number"
252
+ }
253
+ },
254
+ "required": [
255
+ "type",
256
+ "localesCompleted",
257
+ "localesFailed"
258
+ ]
259
+ },
260
+ {
261
+ "type": "object",
262
+ "properties": {
263
+ "type": {
264
+ "type": "string",
265
+ "const": "change-detected"
266
+ },
267
+ "paths": {
268
+ "type": "array",
269
+ "items": {
270
+ "type": "string"
271
+ }
272
+ }
273
+ },
274
+ "required": [
275
+ "type",
276
+ "paths"
277
+ ]
278
+ },
279
+ {
280
+ "type": "object",
281
+ "properties": {
282
+ "type": {
283
+ "type": "string",
284
+ "const": "idle"
285
+ }
286
+ },
287
+ "required": [
288
+ "type"
289
+ ]
290
+ }
291
+ ]
292
+ }
@@ -0,0 +1,156 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://verbatra.kreitz-webdev.de/schema/v1/provenance-report.json",
4
+ "title": "verbatra provenance report",
5
+ "anyOf": [
6
+ {
7
+ "type": "object",
8
+ "properties": {
9
+ "available": {
10
+ "type": "boolean",
11
+ "const": true
12
+ },
13
+ "generatedAt": {
14
+ "type": "string"
15
+ },
16
+ "toolVersion": {
17
+ "type": "string"
18
+ },
19
+ "sourceLocale": {
20
+ "type": "string"
21
+ },
22
+ "locales": {
23
+ "type": "array",
24
+ "items": {
25
+ "type": "object",
26
+ "properties": {
27
+ "locale": {
28
+ "type": "string"
29
+ },
30
+ "total": {
31
+ "type": "number"
32
+ },
33
+ "counts": {
34
+ "type": "object",
35
+ "propertyNames": {
36
+ "type": "string",
37
+ "enum": [
38
+ "machine-unreviewed",
39
+ "machine-reviewed",
40
+ "human",
41
+ "import",
42
+ "external",
43
+ "unrecorded",
44
+ "unknown"
45
+ ]
46
+ },
47
+ "additionalProperties": {
48
+ "type": "number"
49
+ },
50
+ "required": [
51
+ "machine-unreviewed",
52
+ "machine-reviewed",
53
+ "human",
54
+ "import",
55
+ "external",
56
+ "unrecorded",
57
+ "unknown"
58
+ ]
59
+ },
60
+ "entries": {
61
+ "type": "array",
62
+ "items": {
63
+ "type": "object",
64
+ "properties": {
65
+ "origin": {
66
+ "type": "string",
67
+ "enum": [
68
+ "machine",
69
+ "memory",
70
+ "fuzzy",
71
+ "agent",
72
+ "human",
73
+ "import",
74
+ "unknown",
75
+ "unrecorded",
76
+ "external"
77
+ ]
78
+ },
79
+ "provider": {
80
+ "type": "string"
81
+ },
82
+ "model": {
83
+ "type": "string"
84
+ },
85
+ "reviewState": {
86
+ "type": "string",
87
+ "enum": [
88
+ "unreviewed",
89
+ "approved",
90
+ "rejected"
91
+ ]
92
+ },
93
+ "reviewer": {
94
+ "type": "string"
95
+ },
96
+ "key": {
97
+ "type": "string"
98
+ },
99
+ "bucket": {
100
+ "type": "string",
101
+ "enum": [
102
+ "machine-unreviewed",
103
+ "machine-reviewed",
104
+ "human",
105
+ "import",
106
+ "external",
107
+ "unrecorded",
108
+ "unknown"
109
+ ]
110
+ }
111
+ },
112
+ "required": [
113
+ "origin",
114
+ "reviewState",
115
+ "key",
116
+ "bucket"
117
+ ]
118
+ }
119
+ }
120
+ },
121
+ "required": [
122
+ "locale",
123
+ "total",
124
+ "counts",
125
+ "entries"
126
+ ]
127
+ }
128
+ }
129
+ },
130
+ "required": [
131
+ "available",
132
+ "generatedAt",
133
+ "toolVersion",
134
+ "sourceLocale",
135
+ "locales"
136
+ ]
137
+ },
138
+ {
139
+ "type": "object",
140
+ "properties": {
141
+ "available": {
142
+ "type": "boolean",
143
+ "const": false
144
+ },
145
+ "reason": {
146
+ "type": "string",
147
+ "const": "provenance-unreadable"
148
+ }
149
+ },
150
+ "required": [
151
+ "available",
152
+ "reason"
153
+ ]
154
+ }
155
+ ]
156
+ }