ephemeris-cli 0.0.0-stage → 0.4.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,493 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "additionalProperties": false,
5
+ "title": "Ephemeris prepared request v1",
6
+ "required": [
7
+ "kind",
8
+ "schema_version",
9
+ "request",
10
+ "context",
11
+ "disclosure"
12
+ ],
13
+ "properties": {
14
+ "kind": {
15
+ "const": "ephemeris.request"
16
+ },
17
+ "schema_version": {
18
+ "const": "1"
19
+ },
20
+ "request": {
21
+ "$ref": "#/$defs/ForecastRequest"
22
+ },
23
+ "context": {
24
+ "type": "object",
25
+ "required": [
26
+ "series"
27
+ ],
28
+ "additionalProperties": false,
29
+ "properties": {
30
+ "series": {
31
+ "type": "array",
32
+ "items": {
33
+ "type": "object",
34
+ "additionalProperties": false,
35
+ "properties": {
36
+ "series_id": {
37
+ "type": [
38
+ "string",
39
+ "null"
40
+ ]
41
+ },
42
+ "unit": {
43
+ "type": [
44
+ "string",
45
+ "null"
46
+ ]
47
+ },
48
+ "timezone": {
49
+ "type": [
50
+ "string",
51
+ "null"
52
+ ]
53
+ },
54
+ "target_description": {
55
+ "type": [
56
+ "string",
57
+ "null"
58
+ ]
59
+ },
60
+ "measurement": {
61
+ "enum": [
62
+ "period_total",
63
+ "period_average",
64
+ "point_in_time",
65
+ null
66
+ ]
67
+ },
68
+ "timestamps": {
69
+ "type": [
70
+ "array",
71
+ "null"
72
+ ],
73
+ "items": {
74
+ "type": "string"
75
+ }
76
+ },
77
+ "future_timestamps": {
78
+ "type": [
79
+ "array",
80
+ "null"
81
+ ],
82
+ "items": {
83
+ "type": "string"
84
+ }
85
+ },
86
+ "source_available_at": {
87
+ "type": [
88
+ "string",
89
+ "null"
90
+ ]
91
+ },
92
+ "recorded_as_of": {
93
+ "type": [
94
+ "string",
95
+ "null"
96
+ ]
97
+ },
98
+ "future_covariate_roles": {
99
+ "type": "object",
100
+ "additionalProperties": {
101
+ "enum": [
102
+ "known_future",
103
+ "scenario_assumption",
104
+ "unspecified"
105
+ ]
106
+ }
107
+ }
108
+ }
109
+ }
110
+ },
111
+ "scenario_assumptions": {
112
+ "type": "array",
113
+ "items": {
114
+ "type": "string"
115
+ }
116
+ },
117
+ "snapshot_id": {
118
+ "type": [
119
+ "string",
120
+ "null"
121
+ ]
122
+ },
123
+ "source": {
124
+ "type": [
125
+ "object",
126
+ "null"
127
+ ]
128
+ }
129
+ }
130
+ },
131
+ "disclosure": {
132
+ "type": "string"
133
+ }
134
+ },
135
+ "$defs": {
136
+ "Error": {
137
+ "type": "object",
138
+ "required": [
139
+ "error"
140
+ ],
141
+ "properties": {
142
+ "error": {
143
+ "type": "string"
144
+ }
145
+ }
146
+ },
147
+ "Balance": {
148
+ "type": "object",
149
+ "required": [
150
+ "balance_mc",
151
+ "active_holds_mc"
152
+ ],
153
+ "properties": {
154
+ "balance_mc": {
155
+ "type": "string",
156
+ "pattern": "^-?[0-9]+$"
157
+ },
158
+ "active_holds_mc": {
159
+ "type": "string",
160
+ "pattern": "^[0-9]+$"
161
+ }
162
+ }
163
+ },
164
+ "Model": {
165
+ "type": "object",
166
+ "required": [
167
+ "name",
168
+ "price_per_kslot_mc",
169
+ "billing_context_cap"
170
+ ],
171
+ "properties": {
172
+ "name": {
173
+ "type": "string"
174
+ },
175
+ "price_per_kslot_mc": {
176
+ "type": [
177
+ "string",
178
+ "null"
179
+ ]
180
+ },
181
+ "billing_context_cap": {
182
+ "type": [
183
+ "integer",
184
+ "null"
185
+ ]
186
+ }
187
+ },
188
+ "additionalProperties": true
189
+ },
190
+ "ForecastSeries": {
191
+ "type": "object",
192
+ "required": [
193
+ "values"
194
+ ],
195
+ "properties": {
196
+ "values": {
197
+ "oneOf": [
198
+ {
199
+ "type": "array",
200
+ "minItems": 1,
201
+ "items": {
202
+ "type": "number"
203
+ }
204
+ },
205
+ {
206
+ "type": "array",
207
+ "minItems": 1,
208
+ "items": {
209
+ "type": "array",
210
+ "minItems": 1,
211
+ "items": {
212
+ "type": "number"
213
+ }
214
+ }
215
+ }
216
+ ]
217
+ },
218
+ "freq": {
219
+ "type": "string",
220
+ "minLength": 1,
221
+ "description": "Optional per-series frequency. Mixed-frequency batches are split into compatible upstream calls and reassembled in request order."
222
+ },
223
+ "covariates": {
224
+ "$ref": "#/$defs/SeriesCovariates"
225
+ }
226
+ },
227
+ "additionalProperties": true
228
+ },
229
+ "SeriesCovariates": {
230
+ "type": "object",
231
+ "required": [
232
+ "past"
233
+ ],
234
+ "properties": {
235
+ "past": {
236
+ "type": "object",
237
+ "additionalProperties": {
238
+ "type": "array",
239
+ "items": {
240
+ "type": "number"
241
+ }
242
+ },
243
+ "description": "Named historical channels aligned to the series context length."
244
+ },
245
+ "future": {
246
+ "type": "object",
247
+ "additionalProperties": {
248
+ "type": "array",
249
+ "items": {
250
+ "type": "number"
251
+ }
252
+ },
253
+ "description": "Optional known-future channels aligned to the requested horizon. Every future channel must also have past history."
254
+ }
255
+ },
256
+ "additionalProperties": false
257
+ },
258
+ "ForecastRequest": {
259
+ "type": "object",
260
+ "required": [
261
+ "mode",
262
+ "series"
263
+ ],
264
+ "properties": {
265
+ "mode": {
266
+ "type": "string",
267
+ "enum": [
268
+ "explicit",
269
+ "ensemble",
270
+ "route"
271
+ ]
272
+ },
273
+ "model": {
274
+ "type": "string"
275
+ },
276
+ "series": {
277
+ "type": "array",
278
+ "minItems": 1,
279
+ "maxItems": 64,
280
+ "items": {
281
+ "$ref": "#/$defs/ForecastSeries"
282
+ }
283
+ },
284
+ "context_len": {
285
+ "type": "integer",
286
+ "minimum": 1,
287
+ "maximum": 16384
288
+ },
289
+ "horizon": {
290
+ "type": "integer",
291
+ "minimum": 1,
292
+ "maximum": 4096,
293
+ "description": "Maximum 4096 steps. Slots x horizon x quantiles must not exceed 120000 output values; omitted or empty quantiles are budgeted as 21."
294
+ },
295
+ "quantiles": {
296
+ "type": "array",
297
+ "maxItems": 21,
298
+ "items": {
299
+ "type": "number",
300
+ "exclusiveMinimum": 0,
301
+ "exclusiveMaximum": 1
302
+ }
303
+ },
304
+ "top_k": {
305
+ "type": [
306
+ "integer",
307
+ "null"
308
+ ],
309
+ "minimum": 1,
310
+ "maximum": 16,
311
+ "description": "Optional ensemble-only limit on the number of models."
312
+ },
313
+ "combine": {
314
+ "type": "string",
315
+ "enum": [
316
+ "mixture",
317
+ "vincentize"
318
+ ],
319
+ "description": "Optional ensemble combination method."
320
+ }
321
+ },
322
+ "additionalProperties": true
323
+ },
324
+ "ForecastResponse": {
325
+ "type": "object",
326
+ "required": [
327
+ "meta"
328
+ ],
329
+ "properties": {
330
+ "meta": {
331
+ "type": "object",
332
+ "required": [
333
+ "gateway_request_id",
334
+ "billing"
335
+ ],
336
+ "properties": {
337
+ "gateway_request_id": {
338
+ "type": "string"
339
+ },
340
+ "request_id": {
341
+ "type": "string"
342
+ },
343
+ "models_used": {
344
+ "type": "array",
345
+ "items": {
346
+ "type": "string"
347
+ }
348
+ },
349
+ "upstream_request_ids": {
350
+ "type": "array",
351
+ "items": {
352
+ "type": "string"
353
+ },
354
+ "description": "Model request IDs when a mixed-frequency request is split into compatible groups."
355
+ },
356
+ "upstream_calls": {
357
+ "type": "integer",
358
+ "minimum": 1
359
+ },
360
+ "billing": {
361
+ "type": "object",
362
+ "required": [
363
+ "settled_mc",
364
+ "balance_mc"
365
+ ],
366
+ "properties": {
367
+ "settled_mc": {
368
+ "type": "string"
369
+ },
370
+ "balance_mc": {
371
+ "type": "string"
372
+ }
373
+ }
374
+ }
375
+ },
376
+ "additionalProperties": true
377
+ }
378
+ },
379
+ "additionalProperties": true
380
+ },
381
+ "InsufficientCredits": {
382
+ "type": "object",
383
+ "required": [
384
+ "error",
385
+ "balance_mc",
386
+ "required_mc",
387
+ "topup_url"
388
+ ],
389
+ "properties": {
390
+ "error": {
391
+ "type": "string"
392
+ },
393
+ "balance_mc": {
394
+ "type": "string"
395
+ },
396
+ "required_mc": {
397
+ "type": "string"
398
+ },
399
+ "topup_url": {
400
+ "type": "string",
401
+ "format": "uri"
402
+ }
403
+ }
404
+ },
405
+ "UsageRow": {
406
+ "type": "object",
407
+ "required": [
408
+ "requestId"
409
+ ],
410
+ "properties": {
411
+ "requestId": {
412
+ "type": "string"
413
+ },
414
+ "paracastRequestId": {
415
+ "type": [
416
+ "string",
417
+ "null"
418
+ ]
419
+ },
420
+ "estimatedMc": {
421
+ "type": [
422
+ "string",
423
+ "null"
424
+ ]
425
+ },
426
+ "settledMc": {
427
+ "type": [
428
+ "string",
429
+ "null"
430
+ ]
431
+ },
432
+ "status": {
433
+ "type": [
434
+ "integer",
435
+ "null"
436
+ ]
437
+ }
438
+ },
439
+ "additionalProperties": true
440
+ },
441
+ "UsagePage": {
442
+ "type": "object",
443
+ "required": [
444
+ "data",
445
+ "pagination"
446
+ ],
447
+ "properties": {
448
+ "data": {
449
+ "type": "array",
450
+ "items": {
451
+ "$ref": "#/$defs/UsageRow"
452
+ }
453
+ },
454
+ "limit": {
455
+ "type": "integer"
456
+ },
457
+ "offset": {
458
+ "type": "integer"
459
+ },
460
+ "pagination": {
461
+ "type": "object",
462
+ "required": [
463
+ "limit",
464
+ "offset",
465
+ "returned",
466
+ "has_more",
467
+ "next_offset"
468
+ ],
469
+ "properties": {
470
+ "limit": {
471
+ "type": "integer"
472
+ },
473
+ "offset": {
474
+ "type": "integer"
475
+ },
476
+ "returned": {
477
+ "type": "integer"
478
+ },
479
+ "has_more": {
480
+ "type": "boolean"
481
+ },
482
+ "next_offset": {
483
+ "type": [
484
+ "integer",
485
+ "null"
486
+ ]
487
+ }
488
+ }
489
+ }
490
+ }
491
+ }
492
+ }
493
+ }