@verbatra/sdk 0.12.0 → 0.13.1
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/README.md +6 -5
- package/dist/index.cjs +4567 -440
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1554 -34
- package/dist/index.d.ts +1554 -34
- package/dist/index.js +4552 -450
- package/dist/index.js.map +1 -1
- package/dist/schemas/check-file-summary.json +16 -0
- package/dist/schemas/check-summary.json +16 -0
- package/dist/schemas/data-flow-manifest.json +1 -0
- package/dist/schemas/doctor-result.json +1 -0
- package/dist/schemas/export-workbook-result.json +16 -0
- package/dist/schemas/run-history-result.json +346 -0
- package/dist/schemas/run-summary.json +1 -0
- package/package.json +15 -14
|
@@ -235,6 +235,22 @@
|
|
|
235
235
|
"items": {
|
|
236
236
|
"type": "string"
|
|
237
237
|
}
|
|
238
|
+
},
|
|
239
|
+
"limitsNotice": {
|
|
240
|
+
"type": "object",
|
|
241
|
+
"properties": {
|
|
242
|
+
"code": {
|
|
243
|
+
"type": "string",
|
|
244
|
+
"const": "LIMITS_FILE_IGNORED"
|
|
245
|
+
},
|
|
246
|
+
"message": {
|
|
247
|
+
"type": "string"
|
|
248
|
+
}
|
|
249
|
+
},
|
|
250
|
+
"required": [
|
|
251
|
+
"code",
|
|
252
|
+
"message"
|
|
253
|
+
]
|
|
238
254
|
}
|
|
239
255
|
},
|
|
240
256
|
"required": [
|
|
@@ -325,6 +325,22 @@
|
|
|
325
325
|
"items": {
|
|
326
326
|
"type": "string"
|
|
327
327
|
}
|
|
328
|
+
},
|
|
329
|
+
"limitsNotice": {
|
|
330
|
+
"type": "object",
|
|
331
|
+
"properties": {
|
|
332
|
+
"code": {
|
|
333
|
+
"type": "string",
|
|
334
|
+
"const": "LIMITS_FILE_IGNORED"
|
|
335
|
+
},
|
|
336
|
+
"message": {
|
|
337
|
+
"type": "string"
|
|
338
|
+
}
|
|
339
|
+
},
|
|
340
|
+
"required": [
|
|
341
|
+
"code",
|
|
342
|
+
"message"
|
|
343
|
+
]
|
|
328
344
|
}
|
|
329
345
|
},
|
|
330
346
|
"required": [
|
|
@@ -31,6 +31,22 @@
|
|
|
31
31
|
"written",
|
|
32
32
|
"unavailable"
|
|
33
33
|
]
|
|
34
|
+
},
|
|
35
|
+
"limitsNotice": {
|
|
36
|
+
"type": "object",
|
|
37
|
+
"properties": {
|
|
38
|
+
"code": {
|
|
39
|
+
"type": "string",
|
|
40
|
+
"const": "LIMITS_FILE_IGNORED"
|
|
41
|
+
},
|
|
42
|
+
"message": {
|
|
43
|
+
"type": "string"
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"required": [
|
|
47
|
+
"code",
|
|
48
|
+
"message"
|
|
49
|
+
]
|
|
34
50
|
}
|
|
35
51
|
},
|
|
36
52
|
"required": [
|
|
@@ -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
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@verbatra/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Programmatic API to automate i18n translation and keep your locale files in sync across languages, using OpenAI, Anthropic, Gemini, DeepL, or an openai-compatible local or self-hosted model.",
|
|
6
6
|
"keywords": [
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"dist"
|
|
66
66
|
],
|
|
67
67
|
"engines": {
|
|
68
|
-
"node": "^22.
|
|
68
|
+
"node": "^22.22.0 || >=24"
|
|
69
69
|
},
|
|
70
70
|
"publishConfig": {
|
|
71
71
|
"access": "public",
|
|
@@ -73,32 +73,33 @@
|
|
|
73
73
|
},
|
|
74
74
|
"dependencies": {
|
|
75
75
|
"@anthropic-ai/sdk": "0.137.0",
|
|
76
|
-
"@formatjs/icu-messageformat-parser": "3.5.
|
|
77
|
-
"@google/genai": "2.
|
|
76
|
+
"@formatjs/icu-messageformat-parser": "3.5.23",
|
|
77
|
+
"@google/genai": "2.32.0",
|
|
78
78
|
"@xmldom/xmldom": "0.9.12",
|
|
79
|
-
"chokidar": "
|
|
79
|
+
"chokidar": "6.0.0",
|
|
80
80
|
"cosmiconfig": "10.0.1",
|
|
81
81
|
"cosmiconfig-typescript-loader": "6.3.0",
|
|
82
|
-
"deepl-node": "1.
|
|
82
|
+
"deepl-node": "1.29.0",
|
|
83
83
|
"exceljs": "4.4.0",
|
|
84
84
|
"jszip": "3.10.2",
|
|
85
85
|
"loglevel": "1.9.2",
|
|
86
|
-
"openai": "7.
|
|
86
|
+
"openai": "7.55.0",
|
|
87
87
|
"yaml": "2.9.1",
|
|
88
88
|
"zod": "4.6.7"
|
|
89
89
|
},
|
|
90
90
|
"devDependencies": {
|
|
91
|
-
"@types/node": "26.6.
|
|
92
|
-
"@vitest/coverage-v8": "5.0.5",
|
|
93
|
-
"tsup": "9.0.0",
|
|
94
|
-
"typescript": "6.0.3",
|
|
95
|
-
"vitest": "5.0.5",
|
|
91
|
+
"@types/node": "26.6.6",
|
|
96
92
|
"@verbatra/ai-providers": "0.2.2",
|
|
97
93
|
"@verbatra/config": "0.0.0",
|
|
98
94
|
"@verbatra/core": "0.1.1",
|
|
99
|
-
"@verbatra/extract": "0.1.0",
|
|
100
95
|
"@verbatra/exchange": "0.3.0",
|
|
101
|
-
"@verbatra/
|
|
96
|
+
"@verbatra/extract": "0.1.0",
|
|
97
|
+
"@verbatra/format-adapters": "0.4.1",
|
|
98
|
+
"@vitest/coverage-v8": "5.1.0",
|
|
99
|
+
"intl-messageformat": "12.1.5",
|
|
100
|
+
"tsup": "9.0.0",
|
|
101
|
+
"typescript": "6.0.3",
|
|
102
|
+
"vitest": "5.1.0"
|
|
102
103
|
},
|
|
103
104
|
"scripts": {
|
|
104
105
|
"build": "tsup && node scripts/emit-schemas.mjs",
|