@panneau/protocol 5.0.0-alpha.39 → 5.0.0-alpha.41

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 (40) hide show
  1. package/dist/conformance/index.d.ts.map +1 -1
  2. package/dist/conformance/index.js +29 -7
  3. package/dist/conformance/index.js.map +1 -1
  4. package/dist/index.js +4 -4
  5. package/dist/lint.d.ts.map +1 -1
  6. package/dist/lint.js +176 -20
  7. package/dist/lint.js.map +1 -1
  8. package/dist/mock/index.js +2 -2
  9. package/dist/mock/index.js.map +1 -1
  10. package/dist/openapi.d.ts.map +1 -1
  11. package/dist/openapi.js +3 -1
  12. package/dist/openapi.js.map +1 -1
  13. package/dist/periods.d.ts +12 -0
  14. package/dist/periods.d.ts.map +1 -1
  15. package/dist/periods.js +38 -1
  16. package/dist/periods.js.map +1 -1
  17. package/dist/runtime/index.d.ts +2 -2
  18. package/dist/runtime/index.d.ts.map +1 -1
  19. package/dist/runtime/index.js +3 -3
  20. package/dist/schemas/definition.d.ts +930 -2
  21. package/dist/schemas/definition.d.ts.map +1 -1
  22. package/dist/schemas/index.d.ts +4158 -4
  23. package/dist/schemas/index.d.ts.map +1 -1
  24. package/dist/schemas/index.js +14 -3
  25. package/dist/schemas/index.js.map +1 -1
  26. package/dist/schemas/resource.d.ts +464 -0
  27. package/dist/schemas/resource.d.ts.map +1 -1
  28. package/dist/schemas/theme.d.ts +2 -2
  29. package/dist/schemas/widget.d.ts +4210 -0
  30. package/dist/schemas/widget.d.ts.map +1 -1
  31. package/dist/schemas/widget.js +184 -17
  32. package/dist/schemas/widget.js.map +1 -1
  33. package/dist/widgets.d.ts +158 -7
  34. package/dist/widgets.d.ts.map +1 -1
  35. package/dist/widgets.js +469 -40
  36. package/dist/widgets.js.map +1 -1
  37. package/package.json +1 -1
  38. package/schema/boot.schema.json +459 -0
  39. package/schema/definition.schema.json +459 -0
  40. package/schema/openapi.json +976 -5
@@ -3337,7 +3337,7 @@
3337
3337
  ],
3338
3338
  "responses": {
3339
3339
  "200": {
3340
- "description": "The widget's data, in the shape of its type: `StatWidgetData`, `SeriesWidgetData`, `ListWidgetData` and `BreakdownWidgetData` for the built-in types, the plugin's own object for others.",
3340
+ "description": "The widget's data, in the shape of its type: `StatWidgetData`, `SeriesWidgetData`, `ListWidgetData`, `BreakdownWidgetData`, `MetricWidgetData` and `TableWidgetData` for the built-in types, the plugin's own object for others. A `metric` that follows the period has `previous`, its value over the days of `getPreviousRange()`: the same number of days just before (`7d`, `30d`, `90d`), the same days of the month before (`month`), or of the year before (`year`).",
3341
3341
  "content": {
3342
3342
  "application/json": {
3343
3343
  "schema": {
@@ -3354,6 +3354,12 @@
3354
3354
  {
3355
3355
  "$ref": "#/components/schemas/BreakdownWidgetData"
3356
3356
  },
3357
+ {
3358
+ "$ref": "#/components/schemas/MetricWidgetData"
3359
+ },
3360
+ {
3361
+ "$ref": "#/components/schemas/TableWidgetData"
3362
+ },
3357
3363
  {
3358
3364
  "type": "object",
3359
3365
  "additionalProperties": true
@@ -5614,6 +5620,444 @@
5614
5620
  ],
5615
5621
  "additionalProperties": {}
5616
5622
  },
5623
+ "WidgetNumberFormat": {
5624
+ "type": "object",
5625
+ "properties": {
5626
+ "style": {
5627
+ "description": "`decimal` (the default), `percent` (`0.12` is `12%`), `currency` (with `currency`) or `unit` (with `unit`).",
5628
+ "type": "string",
5629
+ "enum": [
5630
+ "decimal",
5631
+ "percent",
5632
+ "currency",
5633
+ "unit"
5634
+ ]
5635
+ },
5636
+ "currency": {
5637
+ "description": "With `style: \"currency\"`: an ISO 4217 code, `USD`.",
5638
+ "type": "string",
5639
+ "enum": [
5640
+ "AED",
5641
+ "AFN",
5642
+ "ALL",
5643
+ "AMD",
5644
+ "ANG",
5645
+ "AOA",
5646
+ "ARS",
5647
+ "AUD",
5648
+ "AWG",
5649
+ "AZN",
5650
+ "BAM",
5651
+ "BBD",
5652
+ "BDT",
5653
+ "BGN",
5654
+ "BHD",
5655
+ "BIF",
5656
+ "BMD",
5657
+ "BND",
5658
+ "BOB",
5659
+ "BRL",
5660
+ "BSD",
5661
+ "BTN",
5662
+ "BWP",
5663
+ "BYN",
5664
+ "BZD",
5665
+ "CAD",
5666
+ "CDF",
5667
+ "CHF",
5668
+ "CLP",
5669
+ "CNY",
5670
+ "COP",
5671
+ "CRC",
5672
+ "CUC",
5673
+ "CUP",
5674
+ "CVE",
5675
+ "CZK",
5676
+ "DJF",
5677
+ "DKK",
5678
+ "DOP",
5679
+ "DZD",
5680
+ "EGP",
5681
+ "ERN",
5682
+ "ETB",
5683
+ "EUR",
5684
+ "FJD",
5685
+ "FKP",
5686
+ "GBP",
5687
+ "GEL",
5688
+ "GHS",
5689
+ "GIP",
5690
+ "GMD",
5691
+ "GNF",
5692
+ "GTQ",
5693
+ "GYD",
5694
+ "HKD",
5695
+ "HNL",
5696
+ "HRK",
5697
+ "HTG",
5698
+ "HUF",
5699
+ "IDR",
5700
+ "ILS",
5701
+ "INR",
5702
+ "IQD",
5703
+ "IRR",
5704
+ "ISK",
5705
+ "JMD",
5706
+ "JOD",
5707
+ "JPY",
5708
+ "KES",
5709
+ "KGS",
5710
+ "KHR",
5711
+ "KMF",
5712
+ "KPW",
5713
+ "KRW",
5714
+ "KWD",
5715
+ "KYD",
5716
+ "KZT",
5717
+ "LAK",
5718
+ "LBP",
5719
+ "LKR",
5720
+ "LRD",
5721
+ "LSL",
5722
+ "LYD",
5723
+ "MAD",
5724
+ "MDL",
5725
+ "MGA",
5726
+ "MKD",
5727
+ "MMK",
5728
+ "MNT",
5729
+ "MOP",
5730
+ "MRU",
5731
+ "MUR",
5732
+ "MVR",
5733
+ "MWK",
5734
+ "MXN",
5735
+ "MYR",
5736
+ "MZN",
5737
+ "NAD",
5738
+ "NGN",
5739
+ "NIO",
5740
+ "NOK",
5741
+ "NPR",
5742
+ "NZD",
5743
+ "OMR",
5744
+ "PAB",
5745
+ "PEN",
5746
+ "PGK",
5747
+ "PHP",
5748
+ "PKR",
5749
+ "PLN",
5750
+ "PYG",
5751
+ "QAR",
5752
+ "RON",
5753
+ "RSD",
5754
+ "RUB",
5755
+ "RWF",
5756
+ "SAR",
5757
+ "SBD",
5758
+ "SCR",
5759
+ "SDG",
5760
+ "SEK",
5761
+ "SGD",
5762
+ "SHP",
5763
+ "SLE",
5764
+ "SLL",
5765
+ "SOS",
5766
+ "SRD",
5767
+ "SSP",
5768
+ "STN",
5769
+ "SVC",
5770
+ "SYP",
5771
+ "SZL",
5772
+ "THB",
5773
+ "TJS",
5774
+ "TMT",
5775
+ "TND",
5776
+ "TOP",
5777
+ "TRY",
5778
+ "TTD",
5779
+ "TWD",
5780
+ "TZS",
5781
+ "UAH",
5782
+ "UGX",
5783
+ "USD",
5784
+ "UYU",
5785
+ "UZS",
5786
+ "VED",
5787
+ "VES",
5788
+ "VND",
5789
+ "VUV",
5790
+ "WST",
5791
+ "XAF",
5792
+ "XCD",
5793
+ "XCG",
5794
+ "XOF",
5795
+ "XPF",
5796
+ "YER",
5797
+ "ZAR",
5798
+ "ZMW",
5799
+ "ZWG",
5800
+ "ZWL"
5801
+ ]
5802
+ },
5803
+ "currencyDisplay": {
5804
+ "type": "string",
5805
+ "enum": [
5806
+ "symbol",
5807
+ "narrowSymbol",
5808
+ "code",
5809
+ "name"
5810
+ ]
5811
+ },
5812
+ "unit": {
5813
+ "description": "With `style: \"unit\"`: a unit of `Intl.NumberFormat` (`byte`, `kilobyte`, `megabyte`, `gigabyte`, `second`, `minute`, `hour`…), or two of them joined by `-per-`.",
5814
+ "type": "string"
5815
+ },
5816
+ "unitDisplay": {
5817
+ "type": "string",
5818
+ "enum": [
5819
+ "short",
5820
+ "narrow",
5821
+ "long"
5822
+ ]
5823
+ },
5824
+ "minimumFractionDigits": {
5825
+ "type": "integer",
5826
+ "minimum": 0,
5827
+ "maximum": 20
5828
+ },
5829
+ "maximumFractionDigits": {
5830
+ "type": "integer",
5831
+ "minimum": 0,
5832
+ "maximum": 20
5833
+ },
5834
+ "notation": {
5835
+ "description": "`compact` writes `1.2K` and `3.4M`.",
5836
+ "type": "string",
5837
+ "enum": [
5838
+ "standard",
5839
+ "compact"
5840
+ ]
5841
+ },
5842
+ "signDisplay": {
5843
+ "type": "string",
5844
+ "enum": [
5845
+ "auto",
5846
+ "always",
5847
+ "exceptZero",
5848
+ "never"
5849
+ ]
5850
+ }
5851
+ },
5852
+ "additionalProperties": {},
5853
+ "description": "How the numbers of a widget are written: options of `Intl.NumberFormat`, for the locale of the user (decision 0089). `{ \"style\": \"currency\", \"currency\": \"USD\" }` writes `9.08` as `$9.08`, `{ \"style\": \"unit\", \"unit\": \"megabyte\" }` as `9.08 MB`."
5854
+ },
5855
+ "WidgetAlertSettings": {
5856
+ "type": "object",
5857
+ "properties": {
5858
+ "query": {
5859
+ "type": "object",
5860
+ "propertyNames": {
5861
+ "type": "string"
5862
+ },
5863
+ "additionalProperties": {
5864
+ "anyOf": [
5865
+ {
5866
+ "type": [
5867
+ "string",
5868
+ "number",
5869
+ "boolean"
5870
+ ]
5871
+ },
5872
+ {
5873
+ "type": "array",
5874
+ "items": {
5875
+ "type": [
5876
+ "string",
5877
+ "number",
5878
+ "boolean"
5879
+ ]
5880
+ }
5881
+ }
5882
+ ]
5883
+ },
5884
+ "description": "The filters of the items to count, as query parameters, on top of those of their source: `{ \"filter[status]\": \"failed\" }`."
5885
+ },
5886
+ "label": {
5887
+ "type": "string",
5888
+ "minLength": 1,
5889
+ "description": "What they are, written after their count, translated: `failed`."
5890
+ },
5891
+ "tone": {
5892
+ "description": "The tone of the count, when it is above 0. `danger` by default.",
5893
+ "type": "string",
5894
+ "pattern": "^[a-z0-9-]+$"
5895
+ }
5896
+ },
5897
+ "required": [
5898
+ "query",
5899
+ "label"
5900
+ ],
5901
+ "additionalProperties": {},
5902
+ "description": "Items of a source that call for attention (decision 0089): counted with the same query and period, and shown as `4 failed` when there are some."
5903
+ },
5904
+ "WidgetSeriesSource": {
5905
+ "type": "object",
5906
+ "properties": {
5907
+ "resource": {
5908
+ "type": "string",
5909
+ "minLength": 1,
5910
+ "description": "The resource it counts or sums."
5911
+ },
5912
+ "label": {
5913
+ "type": "string",
5914
+ "minLength": 1,
5915
+ "description": "The name of its line, in the legend."
5916
+ },
5917
+ "query": {
5918
+ "type": "object",
5919
+ "propertyNames": {
5920
+ "type": "string"
5921
+ },
5922
+ "additionalProperties": {
5923
+ "anyOf": [
5924
+ {
5925
+ "type": [
5926
+ "string",
5927
+ "number",
5928
+ "boolean"
5929
+ ]
5930
+ },
5931
+ {
5932
+ "type": "array",
5933
+ "items": {
5934
+ "type": [
5935
+ "string",
5936
+ "number",
5937
+ "boolean"
5938
+ ]
5939
+ }
5940
+ }
5941
+ ]
5942
+ }
5943
+ },
5944
+ "measure": {
5945
+ "description": "`count` (the default), or `sum:{field}`.",
5946
+ "type": "string",
5947
+ "minLength": 1
5948
+ },
5949
+ "group": {
5950
+ "description": "`{period}:{date field}`: `settings.group` of the widget by default.",
5951
+ "type": "string",
5952
+ "minLength": 1
5953
+ },
5954
+ "period": {
5955
+ "description": "The `date-range` filter of its list that gets the period of the overview: `settings.period` of the widget by default. `false`: it doesn't follow the period.",
5956
+ "anyOf": [
5957
+ {
5958
+ "type": "string",
5959
+ "minLength": 1
5960
+ },
5961
+ {
5962
+ "type": "boolean",
5963
+ "const": false
5964
+ }
5965
+ ]
5966
+ },
5967
+ "help": {
5968
+ "description": "A line under its label in the legend.",
5969
+ "type": "string"
5970
+ },
5971
+ "tone": {
5972
+ "description": "The tone of its line, instead of a categorical color.",
5973
+ "type": "string",
5974
+ "pattern": "^[a-z0-9-]+$"
5975
+ },
5976
+ "alert": {
5977
+ "$ref": "#/components/schemas/WidgetAlertSettings"
5978
+ }
5979
+ },
5980
+ "required": [
5981
+ "resource",
5982
+ "label"
5983
+ ],
5984
+ "additionalProperties": {},
5985
+ "description": "A line of a `series` on resources (decision 0089): the count or the sum of a resource per period."
5986
+ },
5987
+ "WidgetRowSource": {
5988
+ "type": "object",
5989
+ "properties": {
5990
+ "resource": {
5991
+ "type": "string",
5992
+ "minLength": 1,
5993
+ "description": "The resource it counts or sums."
5994
+ },
5995
+ "label": {
5996
+ "type": "string",
5997
+ "minLength": 1,
5998
+ "description": "The name of the row."
5999
+ },
6000
+ "query": {
6001
+ "type": "object",
6002
+ "propertyNames": {
6003
+ "type": "string"
6004
+ },
6005
+ "additionalProperties": {
6006
+ "anyOf": [
6007
+ {
6008
+ "type": [
6009
+ "string",
6010
+ "number",
6011
+ "boolean"
6012
+ ]
6013
+ },
6014
+ {
6015
+ "type": "array",
6016
+ "items": {
6017
+ "type": [
6018
+ "string",
6019
+ "number",
6020
+ "boolean"
6021
+ ]
6022
+ }
6023
+ }
6024
+ ]
6025
+ }
6026
+ },
6027
+ "measure": {
6028
+ "description": "`count` (the default), or `sum:{field}`.",
6029
+ "type": "string",
6030
+ "minLength": 1
6031
+ },
6032
+ "points": {
6033
+ "description": "`{period}:{date field}`: the points of its trend. `settings.points` of the widget by default.",
6034
+ "type": "string",
6035
+ "minLength": 1
6036
+ },
6037
+ "period": {
6038
+ "description": "The `date-range` filter of its list that gets the period of the overview, and the previous one for its change: `settings.period` of the widget by default.",
6039
+ "anyOf": [
6040
+ {
6041
+ "type": "string",
6042
+ "minLength": 1
6043
+ },
6044
+ {
6045
+ "type": "boolean",
6046
+ "const": false
6047
+ }
6048
+ ]
6049
+ },
6050
+ "alert": {
6051
+ "$ref": "#/components/schemas/WidgetAlertSettings"
6052
+ }
6053
+ },
6054
+ "required": [
6055
+ "resource",
6056
+ "label"
6057
+ ],
6058
+ "additionalProperties": {},
6059
+ "description": "A row of a `table` on resources (decision 0089): one subject, counted or summed over the period."
6060
+ },
5617
6061
  "WidgetSettings": {
5618
6062
  "type": "object",
5619
6063
  "properties": {
@@ -5681,10 +6125,63 @@
5681
6125
  "followsList": {
5682
6126
  "description": "In the summary of a resource (decision 0084): `false` keeps the widget on the whole resource, without the list's current filters and search. Widgets on that resource, and widgets with data of their own, follow the list by default.",
5683
6127
  "type": "boolean"
6128
+ },
6129
+ "format": {
6130
+ "description": "Built-in types: how their numbers are written (decision 0089). It wins over the `format` of their data, key by key. A sum of `money` is written in its currency without it.",
6131
+ "$ref": "#/components/schemas/WidgetNumberFormat"
6132
+ },
6133
+ "hideEmpty": {
6134
+ "description": "Built-in types: `true` hides the widget when its data has nothing to show (a value of 0, no items, no rows), and the grid closes the gap (decision 0089).",
6135
+ "type": "boolean"
6136
+ },
6137
+ "goodWhen": {
6138
+ "description": "A `metric` or a `table`: whether a rise (`up`) or a fall (`down`) is good news, so that its change from the previous period is colored `success` or `danger`. Neutral without it.",
6139
+ "type": "string",
6140
+ "enum": [
6141
+ "up",
6142
+ "down"
6143
+ ]
6144
+ },
6145
+ "points": {
6146
+ "description": "With `resource`, for a `metric`: `{period}:{date field}`, the points of its trend line. For a `table`, the default of its rows.",
6147
+ "type": "string",
6148
+ "minLength": 1
6149
+ },
6150
+ "by": {
6151
+ "description": "With `resource`, for a `metric`: a field of the `groupBy` of the aggregates of the list, whose largest parts are drawn under the number.",
6152
+ "type": "string",
6153
+ "minLength": 1
6154
+ },
6155
+ "split": {
6156
+ "description": "With `resource` and a `group` on a period, for a `series`: a field of the `groupBy` of the aggregates of the list with a filter of its own. A line per value, for the 5 largest, and the rest as \"Other\".",
6157
+ "type": "string",
6158
+ "minLength": 1
6159
+ },
6160
+ "sources": {
6161
+ "description": "A `series` without `resource`: a line per source, at most 5, each from a resource.",
6162
+ "minItems": 1,
6163
+ "maxItems": 5,
6164
+ "type": "array",
6165
+ "items": {
6166
+ "$ref": "#/components/schemas/WidgetSeriesSource"
6167
+ }
6168
+ },
6169
+ "stacked": {
6170
+ "description": "A `series` with several lines: stacks them, as areas.",
6171
+ "type": "boolean"
6172
+ },
6173
+ "rows": {
6174
+ "description": "A `table` on resources: its rows, at most 8, each a count or a sum of a resource.",
6175
+ "minItems": 1,
6176
+ "maxItems": 8,
6177
+ "type": "array",
6178
+ "items": {
6179
+ "$ref": "#/components/schemas/WidgetRowSource"
6180
+ }
5684
6181
  }
5685
6182
  },
5686
6183
  "additionalProperties": {},
5687
- "description": "The settings of a widget: `resource`, `query`, `measure`, `group` and `target` for the built-in types on a resource, `period` in an overview with a period, `followsList` in a summary, anything else for widgets of plugins."
6184
+ "description": "The settings of a widget: `resource`, `query`, `measure`, `group`, `target`, `points`, `by` and `split` for the built-in types on a resource, `sources` and `rows` for those on several, `period` in an overview with a period, `followsList` in a summary, `format`, `hideEmpty` and `goodWhen` for how they are drawn, anything else for widgets of plugins."
5688
6185
  },
5689
6186
  "OverviewPeriod": {
5690
6187
  "type": "object",
@@ -5733,7 +6230,7 @@
5733
6230
  "type": {
5734
6231
  "type": "string",
5735
6232
  "minLength": 1,
5736
- "description": "Built-in: `stat` (a number), `series` (a line over days, weeks or months), `list` (a few items) and `breakdown` (the parts of a total). Other types are widgets of plugins."
6233
+ "description": "Built-in: `stat` (a number), `series` (lines over days, weeks or months), `list` (a few items), `breakdown` (the parts of a total), `metric` (a number with its change, its trend and its parts) and `table` (rows of numbers). Other types are widgets of plugins."
5737
6234
  },
5738
6235
  "label": {
5739
6236
  "type": "string"
@@ -8078,6 +8575,16 @@
8078
8575
  "type": "null"
8079
8576
  }
8080
8577
  ]
8578
+ },
8579
+ "format": {
8580
+ "anyOf": [
8581
+ {
8582
+ "$ref": "#/components/schemas/WidgetNumberFormat"
8583
+ },
8584
+ {
8585
+ "type": "null"
8586
+ }
8587
+ ]
8081
8588
  }
8082
8589
  },
8083
8590
  "required": [
@@ -8121,7 +8628,15 @@
8121
8628
  "items": {
8122
8629
  "$ref": "#/components/schemas/SeriesPoint"
8123
8630
  },
8124
- "description": "One point per period, the dates going up. Periods without a value are points at 0."
8631
+ "description": "One point per period, the dates going up. Periods without a value are points at 0. With `series`, the total of the lines per period, or none (`[]`): clients that only draw one line draw it."
8632
+ },
8633
+ "series": {
8634
+ "description": "Several lines, at most 6, instead of `points` (decision 0089): one chart, with a legend of their labels, totals and help.",
8635
+ "maxItems": 6,
8636
+ "type": "array",
8637
+ "items": {
8638
+ "$ref": "#/components/schemas/SeriesWidgetSeries"
8639
+ }
8125
8640
  },
8126
8641
  "total": {
8127
8642
  "description": "The total over the points, shown with the line.",
@@ -8129,6 +8644,16 @@
8129
8644
  "number",
8130
8645
  "null"
8131
8646
  ]
8647
+ },
8648
+ "format": {
8649
+ "anyOf": [
8650
+ {
8651
+ "$ref": "#/components/schemas/WidgetNumberFormat"
8652
+ },
8653
+ {
8654
+ "type": "null"
8655
+ }
8656
+ ]
8132
8657
  }
8133
8658
  },
8134
8659
  "required": [
@@ -8136,7 +8661,7 @@
8136
8661
  "points"
8137
8662
  ],
8138
8663
  "additionalProperties": {},
8139
- "description": "The data of a `series` widget: a line of values per period (decision 0064)."
8664
+ "description": "The data of a `series` widget: a line of values per period (decision 0064), or several (decision 0089)."
8140
8665
  },
8141
8666
  "ListWidgetItem": {
8142
8667
  "type": "object",
@@ -8281,6 +8806,16 @@
8281
8806
  "number",
8282
8807
  "null"
8283
8808
  ]
8809
+ },
8810
+ "format": {
8811
+ "anyOf": [
8812
+ {
8813
+ "$ref": "#/components/schemas/WidgetNumberFormat"
8814
+ },
8815
+ {
8816
+ "type": "null"
8817
+ }
8818
+ ]
8284
8819
  }
8285
8820
  },
8286
8821
  "required": [
@@ -8288,6 +8823,442 @@
8288
8823
  ],
8289
8824
  "additionalProperties": {},
8290
8825
  "description": "The data of a `breakdown` widget: the parts of a total, as horizontal bars (decision 0084)."
8826
+ },
8827
+ "WidgetAlert": {
8828
+ "type": "object",
8829
+ "properties": {
8830
+ "value": {
8831
+ "type": "number",
8832
+ "description": "How many items call for attention."
8833
+ },
8834
+ "label": {
8835
+ "type": "string",
8836
+ "description": "What they are, written after their count, translated: `failed`."
8837
+ },
8838
+ "tone": {
8839
+ "description": "The tone of the count, above 0. `danger` by default.",
8840
+ "anyOf": [
8841
+ {
8842
+ "type": "string",
8843
+ "pattern": "^[a-z0-9-]+$"
8844
+ },
8845
+ {
8846
+ "type": "null"
8847
+ }
8848
+ ]
8849
+ }
8850
+ },
8851
+ "required": [
8852
+ "value",
8853
+ "label"
8854
+ ],
8855
+ "additionalProperties": {},
8856
+ "description": "A count that calls for attention (decision 0089): `4 failed`, in its tone, shown when it is above 0."
8857
+ },
8858
+ "SeriesWidgetSeries": {
8859
+ "type": "object",
8860
+ "properties": {
8861
+ "key": {
8862
+ "description": "The value it is the line of, for a line per value of a field.",
8863
+ "type": [
8864
+ "string",
8865
+ "number",
8866
+ "boolean",
8867
+ "null"
8868
+ ]
8869
+ },
8870
+ "label": {
8871
+ "type": "string",
8872
+ "description": "Its name, in the legend."
8873
+ },
8874
+ "points": {
8875
+ "type": "array",
8876
+ "items": {
8877
+ "$ref": "#/components/schemas/SeriesPoint"
8878
+ },
8879
+ "description": "One point per period, the dates going up. A date missing is 0."
8880
+ },
8881
+ "total": {
8882
+ "description": "Its total over the points, in the legend.",
8883
+ "type": [
8884
+ "number",
8885
+ "null"
8886
+ ]
8887
+ },
8888
+ "tone": {
8889
+ "description": "The tone of its line, instead of a categorical color.",
8890
+ "anyOf": [
8891
+ {
8892
+ "type": "string",
8893
+ "pattern": "^[a-z0-9-]+$"
8894
+ },
8895
+ {
8896
+ "type": "null"
8897
+ }
8898
+ ]
8899
+ },
8900
+ "url": {
8901
+ "description": "Where its legend links.",
8902
+ "type": [
8903
+ "string",
8904
+ "null"
8905
+ ]
8906
+ },
8907
+ "help": {
8908
+ "description": "A line under its label in the legend.",
8909
+ "type": [
8910
+ "string",
8911
+ "null"
8912
+ ]
8913
+ },
8914
+ "alert": {
8915
+ "anyOf": [
8916
+ {
8917
+ "$ref": "#/components/schemas/WidgetAlert"
8918
+ },
8919
+ {
8920
+ "type": "null"
8921
+ }
8922
+ ]
8923
+ }
8924
+ },
8925
+ "required": [
8926
+ "label",
8927
+ "points"
8928
+ ],
8929
+ "additionalProperties": {},
8930
+ "description": "A line of a `series` with several (decision 0089)."
8931
+ },
8932
+ "MetricWidgetData": {
8933
+ "type": "object",
8934
+ "properties": {
8935
+ "value": {
8936
+ "type": "number",
8937
+ "description": "The number, in large type."
8938
+ },
8939
+ "previous": {
8940
+ "description": "The same number over the previous period, of the same length (`getPreviousRange()`): the change from it is written under the number.",
8941
+ "type": [
8942
+ "number",
8943
+ "null"
8944
+ ]
8945
+ },
8946
+ "help": {
8947
+ "description": "A line under the number, translated.",
8948
+ "type": [
8949
+ "string",
8950
+ "null"
8951
+ ]
8952
+ },
8953
+ "tone": {
8954
+ "description": "A tone of the theme, only when the number calls for attention.",
8955
+ "anyOf": [
8956
+ {
8957
+ "type": "string",
8958
+ "pattern": "^[a-z0-9-]+$"
8959
+ },
8960
+ {
8961
+ "type": "null"
8962
+ }
8963
+ ]
8964
+ },
8965
+ "url": {
8966
+ "description": "Where the number links: the list of what it counts.",
8967
+ "type": [
8968
+ "string",
8969
+ "null"
8970
+ ]
8971
+ },
8972
+ "target": {
8973
+ "description": "A target for the number, drawn as a meter under it, as for a `stat`.",
8974
+ "anyOf": [
8975
+ {
8976
+ "type": "number",
8977
+ "exclusiveMinimum": 0
8978
+ },
8979
+ {
8980
+ "type": "null"
8981
+ }
8982
+ ]
8983
+ },
8984
+ "points": {
8985
+ "description": "Its trend: one point per period, the dates going up, drawn as a small line.",
8986
+ "anyOf": [
8987
+ {
8988
+ "type": "array",
8989
+ "items": {
8990
+ "$ref": "#/components/schemas/SeriesPoint"
8991
+ }
8992
+ },
8993
+ {
8994
+ "type": "null"
8995
+ }
8996
+ ]
8997
+ },
8998
+ "period": {
8999
+ "description": "The period of each point.",
9000
+ "anyOf": [
9001
+ {
9002
+ "type": "string",
9003
+ "enum": [
9004
+ "day",
9005
+ "week",
9006
+ "month"
9007
+ ]
9008
+ },
9009
+ {
9010
+ "type": "null"
9011
+ }
9012
+ ]
9013
+ },
9014
+ "parts": {
9015
+ "description": "Its largest parts, at most 10: clients draw the 5 largest as bars, and the rest with `other`.",
9016
+ "anyOf": [
9017
+ {
9018
+ "maxItems": 10,
9019
+ "type": "array",
9020
+ "items": {
9021
+ "$ref": "#/components/schemas/BreakdownWidgetItem"
9022
+ }
9023
+ },
9024
+ {
9025
+ "type": "null"
9026
+ }
9027
+ ]
9028
+ },
9029
+ "other": {
9030
+ "description": "The rest of the value, past the parts: drawn last, as \"Other\".",
9031
+ "type": [
9032
+ "number",
9033
+ "null"
9034
+ ]
9035
+ },
9036
+ "format": {
9037
+ "anyOf": [
9038
+ {
9039
+ "$ref": "#/components/schemas/WidgetNumberFormat"
9040
+ },
9041
+ {
9042
+ "type": "null"
9043
+ }
9044
+ ]
9045
+ }
9046
+ },
9047
+ "required": [
9048
+ "value"
9049
+ ],
9050
+ "additionalProperties": {},
9051
+ "description": "The data of a `metric` widget: one subject in one card, its number, its change from the previous period, its trend and its parts (decision 0089)."
9052
+ },
9053
+ "TableWidgetColumn": {
9054
+ "type": "object",
9055
+ "properties": {
9056
+ "key": {
9057
+ "type": "string",
9058
+ "minLength": 1,
9059
+ "description": "The key of its cells in each row."
9060
+ },
9061
+ "label": {
9062
+ "type": "string",
9063
+ "description": "Its header, translated."
9064
+ },
9065
+ "align": {
9066
+ "description": "`end` (the default) for numbers, or `start`.",
9067
+ "type": "string",
9068
+ "enum": [
9069
+ "start",
9070
+ "end"
9071
+ ]
9072
+ },
9073
+ "format": {
9074
+ "description": "How its numbers are written: the `format` of the widget by default.",
9075
+ "anyOf": [
9076
+ {
9077
+ "$ref": "#/components/schemas/WidgetNumberFormat"
9078
+ },
9079
+ {
9080
+ "type": "null"
9081
+ }
9082
+ ]
9083
+ }
9084
+ },
9085
+ "required": [
9086
+ "key",
9087
+ "label"
9088
+ ],
9089
+ "additionalProperties": {},
9090
+ "description": "A column of a `table` widget."
9091
+ },
9092
+ "TableWidgetCell": {
9093
+ "anyOf": [
9094
+ {
9095
+ "type": "number"
9096
+ },
9097
+ {
9098
+ "type": "null"
9099
+ },
9100
+ {
9101
+ "type": "object",
9102
+ "properties": {
9103
+ "value": {
9104
+ "description": "The number, `null` for none.",
9105
+ "type": [
9106
+ "number",
9107
+ "null"
9108
+ ]
9109
+ },
9110
+ "tone": {
9111
+ "description": "A tone, only when the number calls for attention.",
9112
+ "anyOf": [
9113
+ {
9114
+ "type": "string",
9115
+ "pattern": "^[a-z0-9-]+$"
9116
+ },
9117
+ {
9118
+ "type": "null"
9119
+ }
9120
+ ]
9121
+ },
9122
+ "help": {
9123
+ "description": "A word after the number, translated: `rejected` in `6 rejected`.",
9124
+ "type": [
9125
+ "string",
9126
+ "null"
9127
+ ]
9128
+ },
9129
+ "format": {
9130
+ "description": "How this number is written, instead of the format of its column.",
9131
+ "anyOf": [
9132
+ {
9133
+ "$ref": "#/components/schemas/WidgetNumberFormat"
9134
+ },
9135
+ {
9136
+ "type": "null"
9137
+ }
9138
+ ]
9139
+ }
9140
+ },
9141
+ "required": [
9142
+ "value"
9143
+ ],
9144
+ "additionalProperties": {}
9145
+ }
9146
+ ],
9147
+ "description": "A cell of a `table` widget: a number, `null` for none, or a number with a tone and a word."
9148
+ },
9149
+ "TableWidgetRow": {
9150
+ "type": "object",
9151
+ "properties": {
9152
+ "label": {
9153
+ "type": "string",
9154
+ "description": "What the row is about, in its first column."
9155
+ },
9156
+ "url": {
9157
+ "description": "Where its label links.",
9158
+ "type": [
9159
+ "string",
9160
+ "null"
9161
+ ]
9162
+ },
9163
+ "cells": {
9164
+ "type": "object",
9165
+ "propertyNames": {
9166
+ "type": "string"
9167
+ },
9168
+ "additionalProperties": {
9169
+ "$ref": "#/components/schemas/TableWidgetCell"
9170
+ },
9171
+ "description": "Its cells, by the `key` of their column. A cell missing is empty."
9172
+ },
9173
+ "points": {
9174
+ "description": "Its trend, drawn as a small line in a last column: the dates going up.",
9175
+ "anyOf": [
9176
+ {
9177
+ "type": "array",
9178
+ "items": {
9179
+ "$ref": "#/components/schemas/SeriesPoint"
9180
+ }
9181
+ },
9182
+ {
9183
+ "type": "null"
9184
+ }
9185
+ ]
9186
+ }
9187
+ },
9188
+ "required": [
9189
+ "label",
9190
+ "cells"
9191
+ ],
9192
+ "additionalProperties": {},
9193
+ "description": "A row of a `table` widget: one subject."
9194
+ },
9195
+ "TableWidgetData": {
9196
+ "type": "object",
9197
+ "properties": {
9198
+ "columns": {
9199
+ "minItems": 1,
9200
+ "maxItems": 6,
9201
+ "type": "array",
9202
+ "items": {
9203
+ "$ref": "#/components/schemas/TableWidgetColumn"
9204
+ },
9205
+ "description": "Its columns of numbers, at most 6, after the column of the labels."
9206
+ },
9207
+ "rows": {
9208
+ "maxItems": 8,
9209
+ "type": "array",
9210
+ "items": {
9211
+ "$ref": "#/components/schemas/TableWidgetRow"
9212
+ },
9213
+ "description": "Its rows, at most 8."
9214
+ },
9215
+ "period": {
9216
+ "description": "The period of the points of the rows.",
9217
+ "anyOf": [
9218
+ {
9219
+ "type": "string",
9220
+ "enum": [
9221
+ "day",
9222
+ "week",
9223
+ "month"
9224
+ ]
9225
+ },
9226
+ {
9227
+ "type": "null"
9228
+ }
9229
+ ]
9230
+ },
9231
+ "empty": {
9232
+ "description": "The message without rows, translated.",
9233
+ "type": [
9234
+ "string",
9235
+ "null"
9236
+ ]
9237
+ },
9238
+ "url": {
9239
+ "description": "Where \"See all\" links.",
9240
+ "type": [
9241
+ "string",
9242
+ "null"
9243
+ ]
9244
+ },
9245
+ "format": {
9246
+ "anyOf": [
9247
+ {
9248
+ "$ref": "#/components/schemas/WidgetNumberFormat"
9249
+ },
9250
+ {
9251
+ "type": "null"
9252
+ }
9253
+ ]
9254
+ }
9255
+ },
9256
+ "required": [
9257
+ "columns",
9258
+ "rows"
9259
+ ],
9260
+ "additionalProperties": {},
9261
+ "description": "The data of a `table` widget: rows of numbers, one per subject, with an optional trend (decision 0089)."
8291
9262
  }
8292
9263
  },
8293
9264
  "parameters": {