@verbatra/sdk 0.11.1 → 0.13.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,45 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://verbatra.kreitz-webdev.de/schema/v1/pseudolocalize-result.json",
4
+ "title": "verbatra pseudo result",
5
+ "type": "object",
6
+ "properties": {
7
+ "locale": {
8
+ "type": "string"
9
+ },
10
+ "mode": {
11
+ "type": "string",
12
+ "enum": [
13
+ "accented",
14
+ "bidi"
15
+ ]
16
+ },
17
+ "path": {
18
+ "type": "string"
19
+ },
20
+ "entries": {
21
+ "type": "number"
22
+ },
23
+ "transformed": {
24
+ "type": "number"
25
+ },
26
+ "copied": {
27
+ "type": "array",
28
+ "items": {
29
+ "type": "string"
30
+ }
31
+ },
32
+ "written": {
33
+ "type": "boolean"
34
+ }
35
+ },
36
+ "required": [
37
+ "locale",
38
+ "mode",
39
+ "path",
40
+ "entries",
41
+ "transformed",
42
+ "copied",
43
+ "written"
44
+ ]
45
+ }
@@ -0,0 +1,346 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://verbatra.kreitz-webdev.de/schema/v1/run-history-result.json",
4
+ "title": "verbatra run history result",
5
+ "type": "object",
6
+ "properties": {
7
+ "records": {
8
+ "type": "array",
9
+ "items": {
10
+ "type": "object",
11
+ "properties": {
12
+ "version": {
13
+ "type": "number",
14
+ "const": 1
15
+ },
16
+ "at": {
17
+ "type": "string",
18
+ "format": "date-time",
19
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
20
+ },
21
+ "trigger": {
22
+ "type": "string",
23
+ "enum": [
24
+ "translate",
25
+ "retranslate"
26
+ ]
27
+ },
28
+ "provider": {
29
+ "type": "string",
30
+ "minLength": 1,
31
+ "maxLength": 64
32
+ },
33
+ "model": {
34
+ "type": "string",
35
+ "minLength": 1,
36
+ "maxLength": 200
37
+ },
38
+ "entries": {
39
+ "type": "integer",
40
+ "minimum": 0,
41
+ "maximum": 9007199254740991
42
+ },
43
+ "usage": {
44
+ "type": "object",
45
+ "properties": {
46
+ "inputTokens": {
47
+ "type": "integer",
48
+ "minimum": 0,
49
+ "maximum": 9007199254740991
50
+ },
51
+ "outputTokens": {
52
+ "type": "integer",
53
+ "minimum": 0,
54
+ "maximum": 9007199254740991
55
+ }
56
+ },
57
+ "required": [
58
+ "inputTokens",
59
+ "outputTokens"
60
+ ]
61
+ },
62
+ "cost": {
63
+ "oneOf": [
64
+ {
65
+ "type": "object",
66
+ "properties": {
67
+ "pricing": {
68
+ "type": "string",
69
+ "const": "priced"
70
+ },
71
+ "basis": {
72
+ "type": "string",
73
+ "enum": [
74
+ "usage",
75
+ "source-characters"
76
+ ]
77
+ },
78
+ "rateKey": {
79
+ "type": "string",
80
+ "minLength": 1,
81
+ "maxLength": 265
82
+ },
83
+ "currency": {
84
+ "type": "string",
85
+ "pattern": "^[A-Z]{3}$"
86
+ },
87
+ "asOf": {
88
+ "type": "string",
89
+ "format": "date",
90
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"
91
+ },
92
+ "amount": {
93
+ "type": "number",
94
+ "minimum": 0
95
+ },
96
+ "caveats": {
97
+ "maxItems": 3,
98
+ "type": "array",
99
+ "items": {
100
+ "type": "string",
101
+ "enum": [
102
+ "SOURCE_DUPLICATES_NOT_DEDUPLICATED",
103
+ "TRANSPORT_RETRIES_NOT_COUNTED",
104
+ "USAGE_PARTIAL"
105
+ ]
106
+ }
107
+ }
108
+ },
109
+ "required": [
110
+ "pricing",
111
+ "basis",
112
+ "rateKey",
113
+ "currency",
114
+ "asOf",
115
+ "amount"
116
+ ]
117
+ },
118
+ {
119
+ "type": "object",
120
+ "properties": {
121
+ "pricing": {
122
+ "type": "string",
123
+ "enum": [
124
+ "no-rate-on-file",
125
+ "rate-unit-mismatch",
126
+ "no-usage"
127
+ ]
128
+ },
129
+ "basis": {
130
+ "type": "string",
131
+ "enum": [
132
+ "usage",
133
+ "source-characters"
134
+ ]
135
+ },
136
+ "rateKey": {
137
+ "type": "string",
138
+ "minLength": 1,
139
+ "maxLength": 265
140
+ },
141
+ "caveats": {
142
+ "maxItems": 3,
143
+ "type": "array",
144
+ "items": {
145
+ "type": "string",
146
+ "enum": [
147
+ "SOURCE_DUPLICATES_NOT_DEDUPLICATED",
148
+ "TRANSPORT_RETRIES_NOT_COUNTED",
149
+ "USAGE_PARTIAL"
150
+ ]
151
+ }
152
+ }
153
+ },
154
+ "required": [
155
+ "pricing",
156
+ "basis",
157
+ "rateKey"
158
+ ]
159
+ },
160
+ {
161
+ "type": "object",
162
+ "properties": {
163
+ "pricing": {
164
+ "type": "string",
165
+ "const": "not-billed"
166
+ },
167
+ "rateKey": {
168
+ "type": "string",
169
+ "minLength": 1,
170
+ "maxLength": 265
171
+ },
172
+ "caveats": {
173
+ "maxItems": 3,
174
+ "type": "array",
175
+ "items": {
176
+ "type": "string",
177
+ "enum": [
178
+ "SOURCE_DUPLICATES_NOT_DEDUPLICATED",
179
+ "TRANSPORT_RETRIES_NOT_COUNTED",
180
+ "USAGE_PARTIAL"
181
+ ]
182
+ }
183
+ }
184
+ },
185
+ "required": [
186
+ "pricing",
187
+ "rateKey"
188
+ ]
189
+ }
190
+ ]
191
+ },
192
+ "locales": {
193
+ "type": "array",
194
+ "items": {
195
+ "type": "object",
196
+ "properties": {
197
+ "locale": {
198
+ "type": "string",
199
+ "minLength": 1,
200
+ "maxLength": 64
201
+ },
202
+ "status": {
203
+ "type": "string",
204
+ "enum": [
205
+ "succeeded",
206
+ "partial",
207
+ "failed"
208
+ ]
209
+ },
210
+ "translated": {
211
+ "default": 0,
212
+ "type": "integer",
213
+ "minimum": 0,
214
+ "maximum": 9007199254740991
215
+ },
216
+ "cacheHits": {
217
+ "default": 0,
218
+ "type": "integer",
219
+ "minimum": 0,
220
+ "maximum": 9007199254740991
221
+ },
222
+ "fuzzyHits": {
223
+ "default": 0,
224
+ "type": "integer",
225
+ "minimum": 0,
226
+ "maximum": 9007199254740991
227
+ },
228
+ "generated": {
229
+ "default": 0,
230
+ "type": "integer",
231
+ "minimum": 0,
232
+ "maximum": 9007199254740991
233
+ },
234
+ "pruned": {
235
+ "default": 0,
236
+ "type": "integer",
237
+ "minimum": 0,
238
+ "maximum": 9007199254740991
239
+ },
240
+ "integrityMismatches": {
241
+ "default": 0,
242
+ "type": "integer",
243
+ "minimum": 0,
244
+ "maximum": 9007199254740991
245
+ },
246
+ "providerFailures": {
247
+ "default": 0,
248
+ "type": "integer",
249
+ "minimum": 0,
250
+ "maximum": 9007199254740991
251
+ },
252
+ "usage": {
253
+ "type": "object",
254
+ "properties": {
255
+ "inputTokens": {
256
+ "type": "integer",
257
+ "minimum": 0,
258
+ "maximum": 9007199254740991
259
+ },
260
+ "outputTokens": {
261
+ "type": "integer",
262
+ "minimum": 0,
263
+ "maximum": 9007199254740991
264
+ }
265
+ },
266
+ "required": [
267
+ "inputTokens",
268
+ "outputTokens"
269
+ ]
270
+ },
271
+ "coverage": {
272
+ "type": "object",
273
+ "properties": {
274
+ "missing": {
275
+ "type": "integer",
276
+ "minimum": 0,
277
+ "maximum": 9007199254740991
278
+ },
279
+ "stale": {
280
+ "type": "integer",
281
+ "minimum": 0,
282
+ "maximum": 9007199254740991
283
+ },
284
+ "upToDate": {
285
+ "type": "integer",
286
+ "minimum": 0,
287
+ "maximum": 9007199254740991
288
+ }
289
+ },
290
+ "required": [
291
+ "missing",
292
+ "stale",
293
+ "upToDate"
294
+ ]
295
+ }
296
+ },
297
+ "required": [
298
+ "locale",
299
+ "status"
300
+ ]
301
+ }
302
+ },
303
+ "localesOmitted": {
304
+ "type": "integer",
305
+ "minimum": 0,
306
+ "maximum": 9007199254740991
307
+ },
308
+ "coverageUnavailable": {
309
+ "type": "boolean",
310
+ "const": true
311
+ }
312
+ },
313
+ "required": [
314
+ "version",
315
+ "at",
316
+ "trigger",
317
+ "provider",
318
+ "cost",
319
+ "locales"
320
+ ]
321
+ }
322
+ },
323
+ "total": {
324
+ "type": "integer",
325
+ "minimum": 0,
326
+ "maximum": 9007199254740991
327
+ },
328
+ "unreadableRecords": {
329
+ "type": "integer",
330
+ "minimum": 0,
331
+ "maximum": 9007199254740991
332
+ },
333
+ "unavailable": {
334
+ "type": "string",
335
+ "enum": [
336
+ "unreadable",
337
+ "too-large"
338
+ ]
339
+ }
340
+ },
341
+ "required": [
342
+ "records",
343
+ "total",
344
+ "unreadableRecords"
345
+ ]
346
+ }