@connectci/xdmod-charts 0.0.0-stage → 0.2.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.
Files changed (76) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +6 -2
  3. package/dist/caption.d.ts +68 -0
  4. package/dist/caption.js +118 -0
  5. package/dist/csv.d.ts +22 -0
  6. package/dist/csv.js +95 -0
  7. package/dist/fixtures.d.ts +58 -0
  8. package/dist/fixtures.js +1 -0
  9. package/dist/format.d.ts +6 -0
  10. package/dist/format.js +39 -0
  11. package/dist/generated/palette.d.ts +4 -0
  12. package/dist/generated/palette.js +23 -0
  13. package/dist/generated/statistics.d.ts +6 -0
  14. package/dist/generated/statistics.js +217 -0
  15. package/dist/index.d.ts +13 -0
  16. package/dist/index.js +8 -0
  17. package/dist/measure.d.ts +7 -0
  18. package/dist/measure.js +14 -0
  19. package/dist/palette.d.ts +11 -0
  20. package/dist/palette.js +19 -0
  21. package/dist/parse.d.ts +3 -0
  22. package/dist/parse.js +82 -0
  23. package/dist/payload.d.ts +81 -0
  24. package/dist/payload.js +1 -0
  25. package/dist/view.d.ts +58 -0
  26. package/dist/view.js +243 -0
  27. package/fixtures/README.md +13 -0
  28. package/fixtures/aggregate-empty.json +85 -0
  29. package/fixtures/aggregate-fills-empty-buckets.json +118 -0
  30. package/fixtures/aggregate-has-more-others-count.json +103 -0
  31. package/fixtures/aggregate-incomplete-with-probe-day.json +108 -0
  32. package/fixtures/aggregate-jobs-by-resource.json +66 -0
  33. package/fixtures/aggregate-marks-resources-that-stop.json +125 -0
  34. package/fixtures/aggregate-no-fill-for-average.json +115 -0
  35. package/fixtures/aggregate-no-fill-incomplete-buckets.json +110 -0
  36. package/fixtures/aggregate-no-fill-when-bucket-filtered.json +114 -0
  37. package/fixtures/aggregate-no-fill-when-more.json +110 -0
  38. package/fixtures/aggregate-no-fill-with-offset.json +110 -0
  39. package/fixtures/aggregate-nominal-not-reordered.json +107 -0
  40. package/fixtures/aggregate-offset-page.json +103 -0
  41. package/fixtures/aggregate-ordered-bucket-order.json +116 -0
  42. package/fixtures/aggregate-probe-reaches-end.json +108 -0
  43. package/fixtures/aggregate-unknown-bucket-last.json +115 -0
  44. package/fixtures/aggregate-unordered.json +103 -0
  45. package/fixtures/average-leaves-gaps.json +125 -0
  46. package/fixtures/calendar-december-into-january.json +113 -0
  47. package/fixtures/calendar-range-ends-at-month-end.json +108 -0
  48. package/fixtures/cpu-hours-by-resource-incomplete.json +125 -0
  49. package/fixtures/early-end-average-by-resource-not-filled.json +147 -0
  50. package/fixtures/early-end-average-other-dimension.json +144 -0
  51. package/fixtures/early-end-daily-by-queue.json +180 -0
  52. package/fixtures/early-end-daily-series-stops.json +139 -0
  53. package/fixtures/early-end-day-inside-last-period.json +147 -0
  54. package/fixtures/early-end-fill-stops-at-last-day.json +145 -0
  55. package/fixtures/early-end-fills-to-resource-last-day.json +149 -0
  56. package/fixtures/early-end-other-dimension-never-filled.json +145 -0
  57. package/fixtures/early-end-probe-window-too-short.json +144 -0
  58. package/fixtures/early-end-resource-retired.json +144 -0
  59. package/fixtures/early-end-several-resources.json +205 -0
  60. package/fixtures/early-end-without-probe.json +140 -0
  61. package/fixtures/label-stripped-from-description.json +95 -0
  62. package/fixtures/no-series-values.json +86 -0
  63. package/fixtures/partial-last-day.json +119 -0
  64. package/fixtures/partial-last-month.json +122 -0
  65. package/fixtures/probe-day-after-range.json +113 -0
  66. package/fixtures/probe-day-inside-last-month.json +113 -0
  67. package/fixtures/probe-day-last-day-of-period.json +113 -0
  68. package/fixtures/rank-prefixes-on-series.json +130 -0
  69. package/fixtures/series-ended-before-probe-day.json +188 -0
  70. package/fixtures/timeseries-complete-last-period.json +113 -0
  71. package/fixtures/timeseries-month-gaps.json +121 -0
  72. package/package.json +28 -4
  73. package/rules/README.md +29 -0
  74. package/rules/palette.json +4 -0
  75. package/rules/statistics.json +217 -0
  76. package/schema/chart-payload.v1.json +320 -0
@@ -0,0 +1,29 @@
1
+ # Payload content rules
2
+
3
+ Both producers (access-mcp in TypeScript, xdmod-mcp in Python) build a `ChartPayload` from XDMoD's answers by these rules. The schema says what shape is valid; these rules say what the values must be. Each rule names the fixture that pins it. Where it says "fixture: to come", the fixture is not written yet (Task 7 for weeks). Fixtures are compared as described in `fixtures/README.md`.
4
+
5
+ `rules/statistics.json` holds one entry per statistic either producer charts: `kind` (`total` or `average`), `unit` (a free string, so a new unit never hides a chart on an older client) and `additive` (true only when weeks may be summed, see rule 8).
6
+
7
+ 1. Measure kind and what a missing period means. `measure.kind` is the statistic's `kind` in `rules/statistics.json`. For an id not listed, the fallback applies in both languages: an id starting `total_` or ending `_count` is a total, anything else is an average. `measureKind()` in this package is the reference. A total's missing period is `measure.missing: "zero"`: an empty period is 0. An average's is `"gap"`: an empty period is unknown, never 0, and stays `null`. `measure.unit` is the statistic's `unit`, omitted for an unlisted id. Fixture: aggregate-jobs-by-resource (total, zero); gap: average-leaves-gaps; unit: cpu-hours-by-resource-incomplete.
8
+
9
+ 2. The period grid and `counted`. For a timeseries, `unit` is the requested unit when it is Day, Week, Month, Quarter or Year, else chosen from the range: under 6 whole months Day, under 120 months Month, otherwise Quarter. The grid is every period start from the period containing `start_date` through the one containing `end_date`. Every series has one point per grid start, in order, with `null` where XDMoD sent no value. A period XDMoD returns that is off the grid is an error. `counted` runs from the first period's start to the last period's end, so it can be wider than `requested`. For an aggregate there are no periods and `counted` equals `requested`. Fixture: aggregate-jobs-by-resource (aggregate); timeseries: timeseries-month-gaps, calendar-december-into-january, calendar-range-ends-at-month-end, partial-last-day (Day).
10
+
11
+ 3. `data_through` and its precision. For a timeseries it is the start of the last period in which any series has a value, with `data_through_precision: "period"`. When the realm's latest data day is known, falls on or after that start and within the same period, it replaces the start and the precision is `"day"`. With Day units the precision is always `"day"`. With no value anywhere both are `null`. For an aggregate, `data_through` is the realm's latest data day, with precision `"day"`, only when that day is before the requested end; otherwise both are `null`. Fixture: aggregate-jobs-by-resource (null case); no-series-values (null for a timeseries); probe-day-inside-last-month, probe-day-after-range, probe-day-last-day-of-period, series-ended-before-probe-day; aggregate-incomplete-with-probe-day, aggregate-probe-reaches-end.
12
+
13
+ 4. Early-ending series and `data_through_source`. Timeseries only. Run this decision sequence once per series, after rule 3. (a) If the chart's `data_through` is `null`, nothing runs. (b) `chartEnd` is the chart's `data_through` when its precision is `"day"`, else the end of the period that starts at `data_through`. (c) A series with no values is skipped. (d) Let `own` be the start of the series' last period with a value. (e) If the dimension is not `resource`, the series is marked only when `own` is before the start of the chart's last data period: `data_through = own`, precision `"period"` (`"day"` for Day units), source `"series"`; no zero fill. (f) If the dimension is `resource` and `resource_days` is null (the probe failed), the same marking applies with source always `"series"`; no zero fill. (g) If the dimension is `resource` and `resource_days` is non-null, and the resource has a day in `resource_days.days` with day >= `own`: for a total, every point after `own` is set to 0 up to the period containing min(day, `chartEnd`), whether or not a marker is set; then, only when day < `chartEnd`, `data_through = day`, precision `"day"`, source `"resource"`. An average is never filled. (h) Otherwise (resource, probe non-null, and the resource has no day or its day is before `own`): if `own` is not before the start of the chart's last data period, nothing is marked. Else `data_through = own`, precision `"period"` (`"day"` for Day units), and source is `"resource"` when the resource is absent from `days` and `own`'s period end is on or after the day before `resource_days.since` (a probe that covers the period end and found nothing means the resource has had no data since), otherwise `"series"`. An aggregate category gets `data_through = day` and source `"resource"` only when the dimension is `resource`, `resource_days` is non-null, the resource's day is before the chart's end (`data_through`, else the requested end) and not before the requested start. Fixture: early-end-fills-to-resource-last-day, early-end-fill-stops-at-last-day, early-end-day-inside-last-period, early-end-resource-retired, early-end-without-probe, early-end-probe-window-too-short, early-end-other-dimension-never-filled, early-end-daily-by-queue, early-end-average-other-dimension, early-end-average-by-resource-not-filled, early-end-several-resources, early-end-daily-series-stops, rank-prefixes-on-series, aggregate-marks-resources-that-stop.
14
+
15
+ 5. Partial last period. `last_data_period_partial` is true when periods after the last one with data are empty, or when `data_through` has day precision and falls before the end of its period. Otherwise false. It is always false for an aggregate. `last_period_incomplete` is true when `counted.end` is on or after today (for an aggregate, when the requested end is). Fixture: aggregate-jobs-by-resource (false); partial-last-month, partial-last-day (true); timeseries-complete-last-period (incomplete false).
16
+
17
+ 6. Ordered-bucket fill. A dimension is ordered when it is one of `jobsize`, `jobwalltime`, `jobwaittime`, `nodecount`, `gpu_count`. Categories of an ordered dimension are sorted into the dimension's bucket order (unknown names last, original order kept for ties). A bucket XDMoD left out is added with value 0 only when the statistic is a total, every bucket is known to have come back (`dimension_complete`), there is no paging (`has_more` false, `offset` 0), `dimension_filtered` is false (the request does not filter the group_by dimension itself), and at least one category came back. Otherwise nothing is added. Fixture: aggregate-fills-empty-buckets (fill); aggregate-no-fill-for-average, aggregate-no-fill-incomplete-buckets, aggregate-no-fill-when-more, aggregate-no-fill-with-offset, aggregate-no-fill-when-bucket-filtered (no fill); aggregate-ordered-bucket-order, aggregate-unknown-bucket-last, aggregate-nominal-not-reordered (order).
18
+
19
+ 7. Ranking, `offset` and `others_count`. Names XDMoD numbers ("1. cluster-a") lose the rank prefix. `ranked_by` is `"value"`; XDMoD's order is kept, with `offset` the number of top-ranked entries skipped. `others_count` is the producer's count when XDMoD gave one; when it did not, it is `null` if `has_more` and 0 if not. No "Other" bucket is ever made. Fixture: aggregate-jobs-by-resource (no more); aggregate-has-more-others-count, aggregate-no-fill-when-more (null count), aggregate-offset-page (offset, rank prefixes), rank-prefixes-on-series.
20
+
21
+ 8. Weeks. `unit: "Week"` is for additive statistics only (`additive: true`); a producer does not request weeks for any other. A week starts Monday. The fetch starts on the Monday on or before the start date and ends on the Sunday on or after the end date, capped at today. `counted` is those whole weeks. `last_period_incomplete` is set only when the today cap cut the last week. Fixture: to come (Task 7 weeks).
22
+
23
+ 9. Warnings. A producer on this contract always emits `warnings`, an empty array when it has none; an absent `warnings` field means a pre-contract producer, and a client then applies its built-in warnings (`BUILT_IN_WARNINGS`). Each has a stable `code` and producer-worded `text`, and the order below is the order in the list. `waiting-not-counted` when the realm is Jobs and the last period is incomplete. `not-comparable-across-resources` when the dimension is `resource` and the statistic is `total_cpu_hours` or `avg_cpu_hours`. `mean-of-jobs` when the statistic starts with `avg_`. Fixture: aggregate-jobs-by-resource (none); cpu-hours-by-resource-incomplete, average-leaves-gaps, label-stripped-from-description (codes in order).
24
+
25
+ 10. Measure description. `measure.description` is the label-stripped plain text of XDMoD's description. Convert in this order. (a) Replace matches of the regex `(?<![.!?:;,])\s*<br\s*\/?>\s*` (case-insensitive, global) with ". ". The lookbehind is checked at the start of the match, so the punctuation must be the immediately preceding character with no whitespace between: `"a.<br>b"` has no match here, so the next step turns it into "a. b", but `"a. <br>b"` matches (the match starts at the space) and gives "a. . b", a doubled period. A port must copy the regex, not paraphrase it. (b) Replace every remaining `<br\s*\/?>` (case-insensitive) with a single space. (c) Remove every other tag, regex `<[^>]*>`. (d) Decode exactly six entities, in this order: `&nbsp;` to a space, `&lt;`, `&gt;`, `&quot;`, `&#39;`, and last `&amp;`. (e) Collapse runs of whitespace to one space and trim. (f) If the label is non-empty and the result starts with `<label>:` (case-insensitive, `label` being `measure.label`), remove that prefix and trim; an empty label is never stripped. Fixture: aggregate-jobs-by-resource (the "Number of Jobs Ended:" prefix is stripped); label-stripped-from-description (HTML converted).
26
+
27
+ 11. Adapter trimming. `BuilderInput.series` and `categories` are already trimmed: the producer's adapter, not the builder, does this. It drops gap-connector traces (name containing "gap connector", any case), "All N Others" entries (recording N), and, for a timeseries only, series with no values; applies `request.limit` (XDMoD is asked for one more than the limit, so a surplus means more); and derives `has_more` (something was cut or XDMoD reported others) and `others_count` (cut count plus N, `null` when more exist but XDMoD gave no N, 0 when nothing is left out), as access-mcp's `trimToLimit` does. `request.limit` is informational to the builder. No builder fixture: fixtures hold post-trim input, so each producer tests its own adapter (access-mcp: chart-input.test.ts and the trimToLimit cases in its server tests).
28
+
29
+ 12. Optional context fields. `time_basis: { zone }` is set only when the builder is given a time zone. `instance: { name, url }` is set only when the builder is given an instance, and a producer emits it only with an https url. `link` is the given link or `null`. `filters.notes` is the request's notes. `retrieved` is today. Fixture: aggregate-jobs-by-resource (all unset or null); timeseries-month-gaps (time_basis and instance set).
@@ -0,0 +1,4 @@
1
+ {
2
+ "light": ["#2a78d6", "#eb6834", "#1baf7a", "#eda100", "#e87ba4", "#008300", "#6250d6", "#e34948"],
3
+ "dark": ["#3987e5", "#d95926", "#199e70", "#c98500", "#d55181", "#0ca30c", "#9085e9", "#e66767"]
4
+ }
@@ -0,0 +1,217 @@
1
+ {
2
+ "job_count": {
3
+ "kind": "total",
4
+ "unit": "jobs",
5
+ "additive": true
6
+ },
7
+ "started_job_count": {
8
+ "kind": "total",
9
+ "unit": "jobs",
10
+ "additive": true
11
+ },
12
+ "submitted_job_count": {
13
+ "kind": "total",
14
+ "unit": "jobs",
15
+ "additive": true
16
+ },
17
+ "total_cpu_hours": {
18
+ "kind": "total",
19
+ "unit": "core-hours",
20
+ "additive": true
21
+ },
22
+ "total_node_hours": {
23
+ "kind": "total",
24
+ "unit": "node-hours",
25
+ "additive": true
26
+ },
27
+ "total_gpu_hours": {
28
+ "kind": "total",
29
+ "unit": "GPU-hours",
30
+ "additive": true
31
+ },
32
+ "total_wallduration_hours": {
33
+ "kind": "total",
34
+ "unit": "hours",
35
+ "additive": true
36
+ },
37
+ "total_waitduration_hours": {
38
+ "kind": "total",
39
+ "unit": "hours",
40
+ "additive": true
41
+ },
42
+ "used_su": {
43
+ "kind": "total",
44
+ "unit": "SUs",
45
+ "additive": true
46
+ },
47
+ "used_ace": {
48
+ "kind": "total",
49
+ "unit": "ACCESS credits",
50
+ "additive": true
51
+ },
52
+ "cloud_num_sessions_ended": {
53
+ "kind": "total",
54
+ "unit": "sessions",
55
+ "additive": true
56
+ },
57
+ "cloud_num_sessions_started": {
58
+ "kind": "total",
59
+ "unit": "sessions",
60
+ "additive": true
61
+ },
62
+ "cloud_wall_time": {
63
+ "kind": "total",
64
+ "unit": "hours",
65
+ "additive": true
66
+ },
67
+ "cloud_core_time": {
68
+ "kind": "total",
69
+ "unit": "core-hours",
70
+ "additive": true
71
+ },
72
+ "allocated_nu": {
73
+ "kind": "total",
74
+ "unit": "NUs",
75
+ "additive": false
76
+ },
77
+ "allocated_raw_su": {
78
+ "kind": "total",
79
+ "unit": "SUs",
80
+ "additive": false
81
+ },
82
+ "allocated_su": {
83
+ "kind": "total",
84
+ "unit": "SUs",
85
+ "additive": false
86
+ },
87
+ "allocated_ace": {
88
+ "kind": "total",
89
+ "unit": "ACCESS credits",
90
+ "additive": false
91
+ },
92
+ "cloud_num_sessions_running": {
93
+ "kind": "total",
94
+ "unit": "sessions",
95
+ "additive": false
96
+ },
97
+ "wall_time": {
98
+ "kind": "total",
99
+ "unit": "hours",
100
+ "additive": false
101
+ },
102
+ "wait_time": {
103
+ "kind": "total",
104
+ "unit": "hours",
105
+ "additive": false
106
+ },
107
+ "gpu_time": {
108
+ "kind": "total",
109
+ "unit": "hours",
110
+ "additive": false
111
+ },
112
+ "requested_wall_time": {
113
+ "kind": "total",
114
+ "unit": "hours",
115
+ "additive": false
116
+ },
117
+ "cpu_time_user": {
118
+ "kind": "total",
119
+ "unit": "hours",
120
+ "additive": false
121
+ },
122
+ "cpu_time_system": {
123
+ "kind": "total",
124
+ "unit": "hours",
125
+ "additive": false
126
+ },
127
+ "cpu_time_idle": {
128
+ "kind": "total",
129
+ "unit": "hours",
130
+ "additive": false
131
+ },
132
+ "allocated_cpu_core_hours": {
133
+ "kind": "total",
134
+ "unit": "core-hours",
135
+ "additive": false
136
+ },
137
+ "allocated_gpu_hours": {
138
+ "kind": "total",
139
+ "unit": "GPU-hours",
140
+ "additive": false
141
+ },
142
+ "allocated_cpu_node_hours": {
143
+ "kind": "total",
144
+ "unit": "node-hours",
145
+ "additive": false
146
+ },
147
+ "allocated_gpu_node_hours": {
148
+ "kind": "total",
149
+ "unit": "node-hours",
150
+ "additive": false
151
+ },
152
+ "ace_total": {
153
+ "kind": "total",
154
+ "unit": "ACCESS credits",
155
+ "additive": false
156
+ },
157
+ "ace_allocated": {
158
+ "kind": "total",
159
+ "unit": "ACCESS credits",
160
+ "additive": false
161
+ },
162
+ "total_avg_number_of_cpu_cores": {
163
+ "kind": "average",
164
+ "unit": "cores",
165
+ "additive": false
166
+ },
167
+ "total_avg_number_of_gpus": {
168
+ "kind": "average",
169
+ "unit": "GPUs",
170
+ "additive": false
171
+ },
172
+ "total_avg_number_of_cpu_nodes": {
173
+ "kind": "average",
174
+ "unit": "nodes",
175
+ "additive": false
176
+ },
177
+ "total_avg_number_of_gpu_nodes": {
178
+ "kind": "average",
179
+ "unit": "nodes",
180
+ "additive": false
181
+ },
182
+ "allocated_avg_number_of_cpu_cores": {
183
+ "kind": "average",
184
+ "unit": "cores",
185
+ "additive": false
186
+ },
187
+ "allocated_avg_number_of_gpus": {
188
+ "kind": "average",
189
+ "unit": "GPUs",
190
+ "additive": false
191
+ },
192
+ "allocated_avg_number_of_cpu_nodes": {
193
+ "kind": "average",
194
+ "unit": "nodes",
195
+ "additive": false
196
+ },
197
+ "allocated_avg_number_of_gpu_nodes": {
198
+ "kind": "average",
199
+ "unit": "nodes",
200
+ "additive": false
201
+ },
202
+ "avg_waitduration_hours": {
203
+ "kind": "average",
204
+ "unit": "hours",
205
+ "additive": false
206
+ },
207
+ "avg_wallduration_hours": {
208
+ "kind": "average",
209
+ "unit": "hours",
210
+ "additive": false
211
+ },
212
+ "avg_processors": {
213
+ "kind": "average",
214
+ "unit": "cores",
215
+ "additive": false
216
+ }
217
+ }
@@ -0,0 +1,320 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/connectci-platform/xdmod-charts/schema/chart-payload.v1.json",
4
+ "title": "XDMoD chart payload v1",
5
+ "description": "The chart a get_chart_data tool result carries. Version policy: the contract stays version 1 and changes only add optional fields. Enumerated fields are closed: a client that meets a value it does not know shows no chart and the text answer stands. A client ignores fields it does not know, so additionalProperties is not restricted.",
6
+ "type": "object",
7
+ "required": [
8
+ "version",
9
+ "realm",
10
+ "statistic",
11
+ "group_by",
12
+ "dataset_type",
13
+ "requested",
14
+ "counted",
15
+ "last_period_incomplete",
16
+ "measure",
17
+ "dimension",
18
+ "filters",
19
+ "has_more",
20
+ "source",
21
+ "retrieved"
22
+ ],
23
+ "properties": {
24
+ "version": {
25
+ "const": 1
26
+ },
27
+ "realm": {
28
+ "type": "string"
29
+ },
30
+ "statistic": {
31
+ "type": "string"
32
+ },
33
+ "group_by": {
34
+ "type": "string"
35
+ },
36
+ "dataset_type": {
37
+ "enum": [
38
+ "timeseries",
39
+ "aggregate"
40
+ ]
41
+ },
42
+ "unit": {
43
+ "enum": [
44
+ "Day",
45
+ "Week",
46
+ "Month",
47
+ "Quarter",
48
+ "Year"
49
+ ]
50
+ },
51
+ "requested": {
52
+ "type": "object",
53
+ "required": [
54
+ "start",
55
+ "end"
56
+ ],
57
+ "properties": {
58
+ "start": {
59
+ "type": "string"
60
+ },
61
+ "end": {
62
+ "type": "string"
63
+ }
64
+ }
65
+ },
66
+ "counted": {
67
+ "type": "object",
68
+ "required": [
69
+ "start",
70
+ "end"
71
+ ],
72
+ "properties": {
73
+ "start": {
74
+ "type": "string"
75
+ },
76
+ "end": {
77
+ "type": "string"
78
+ }
79
+ }
80
+ },
81
+ "last_period_incomplete": {
82
+ "type": "boolean"
83
+ },
84
+ "measure": {
85
+ "type": "object",
86
+ "required": [
87
+ "label",
88
+ "description",
89
+ "kind",
90
+ "missing"
91
+ ],
92
+ "properties": {
93
+ "label": {
94
+ "type": "string"
95
+ },
96
+ "description": {
97
+ "type": "string"
98
+ },
99
+ "kind": {
100
+ "enum": [
101
+ "total",
102
+ "average"
103
+ ]
104
+ },
105
+ "missing": {
106
+ "enum": [
107
+ "zero",
108
+ "gap"
109
+ ]
110
+ },
111
+ "unit": {
112
+ "type": "string"
113
+ }
114
+ }
115
+ },
116
+ "dimension": {
117
+ "type": "object",
118
+ "required": [
119
+ "name",
120
+ "ordered"
121
+ ],
122
+ "properties": {
123
+ "name": {
124
+ "type": "string"
125
+ },
126
+ "ordered": {
127
+ "type": "boolean"
128
+ }
129
+ }
130
+ },
131
+ "filters": {
132
+ "type": "object",
133
+ "required": [
134
+ "notes"
135
+ ],
136
+ "properties": {
137
+ "notes": {
138
+ "type": "array",
139
+ "items": {
140
+ "type": "string"
141
+ }
142
+ }
143
+ }
144
+ },
145
+ "time_basis": {
146
+ "type": "object",
147
+ "required": [
148
+ "zone"
149
+ ],
150
+ "properties": {
151
+ "zone": {
152
+ "type": "string"
153
+ }
154
+ }
155
+ },
156
+ "warnings": {
157
+ "type": "array",
158
+ "items": {
159
+ "type": "object",
160
+ "required": [
161
+ "code",
162
+ "text"
163
+ ],
164
+ "properties": {
165
+ "code": {
166
+ "type": "string"
167
+ },
168
+ "text": {
169
+ "type": "string"
170
+ }
171
+ }
172
+ }
173
+ },
174
+ "instance": {
175
+ "type": "object",
176
+ "required": [
177
+ "name",
178
+ "url"
179
+ ],
180
+ "properties": {
181
+ "name": {
182
+ "type": "string"
183
+ },
184
+ "url": {
185
+ "type": "string",
186
+ "pattern": "^https:"
187
+ }
188
+ }
189
+ },
190
+ "series": {
191
+ "type": "array",
192
+ "items": {
193
+ "type": "object",
194
+ "required": [
195
+ "name",
196
+ "points"
197
+ ],
198
+ "properties": {
199
+ "name": {
200
+ "type": "string"
201
+ },
202
+ "points": {
203
+ "type": "array",
204
+ "items": {
205
+ "type": "object",
206
+ "required": [
207
+ "start",
208
+ "value"
209
+ ],
210
+ "properties": {
211
+ "start": {
212
+ "type": "string"
213
+ },
214
+ "value": {
215
+ "type": [
216
+ "number",
217
+ "null"
218
+ ]
219
+ }
220
+ }
221
+ }
222
+ },
223
+ "data_through": {
224
+ "type": "string"
225
+ },
226
+ "data_through_precision": {
227
+ "enum": [
228
+ "day",
229
+ "period"
230
+ ]
231
+ },
232
+ "data_through_source": {
233
+ "enum": [
234
+ "resource",
235
+ "series"
236
+ ]
237
+ }
238
+ }
239
+ }
240
+ },
241
+ "categories": {
242
+ "type": "array",
243
+ "items": {
244
+ "type": "object",
245
+ "required": [
246
+ "name",
247
+ "value"
248
+ ],
249
+ "properties": {
250
+ "name": {
251
+ "type": "string"
252
+ },
253
+ "value": {
254
+ "type": [
255
+ "number",
256
+ "null"
257
+ ]
258
+ },
259
+ "data_through": {
260
+ "type": "string"
261
+ },
262
+ "data_through_source": {
263
+ "enum": [
264
+ "resource",
265
+ "series"
266
+ ]
267
+ }
268
+ }
269
+ }
270
+ },
271
+ "offset": {
272
+ "type": [
273
+ "integer",
274
+ "null"
275
+ ],
276
+ "minimum": 0
277
+ },
278
+ "others_count": {
279
+ "type": [
280
+ "integer",
281
+ "null"
282
+ ],
283
+ "minimum": 0
284
+ },
285
+ "data_through": {
286
+ "type": [
287
+ "string",
288
+ "null"
289
+ ]
290
+ },
291
+ "data_through_precision": {
292
+ "enum": [
293
+ "day",
294
+ "period",
295
+ null
296
+ ]
297
+ },
298
+ "last_data_period_partial": {
299
+ "type": "boolean"
300
+ },
301
+ "has_more": {
302
+ "type": "boolean"
303
+ },
304
+ "ranked_by": {
305
+ "const": "value"
306
+ },
307
+ "link": {
308
+ "type": [
309
+ "string",
310
+ "null"
311
+ ]
312
+ },
313
+ "source": {
314
+ "const": "XDMoD"
315
+ },
316
+ "retrieved": {
317
+ "type": "string"
318
+ }
319
+ }
320
+ }