@panneau/protocol 5.0.0-alpha.12 → 5.0.0-alpha.13

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 (58) hide show
  1. package/dist/conformance/index.d.ts +6 -0
  2. package/dist/conformance/index.d.ts.map +1 -1
  3. package/dist/conformance/index.js +185 -2
  4. package/dist/conformance/index.js.map +1 -1
  5. package/dist/constants.d.ts +12 -2
  6. package/dist/constants.d.ts.map +1 -1
  7. package/dist/constants.js +22 -2
  8. package/dist/constants.js.map +1 -1
  9. package/dist/context.d.ts +15 -0
  10. package/dist/context.d.ts.map +1 -0
  11. package/dist/context.js +34 -0
  12. package/dist/context.js.map +1 -0
  13. package/dist/index.js +6 -5
  14. package/dist/lint.d.ts.map +1 -1
  15. package/dist/lint.js +17 -0
  16. package/dist/lint.js.map +1 -1
  17. package/dist/mock/index.d.ts +25 -4
  18. package/dist/mock/index.d.ts.map +1 -1
  19. package/dist/mock/index.js +129 -29
  20. package/dist/mock/index.js.map +1 -1
  21. package/dist/openapi.d.ts.map +1 -1
  22. package/dist/openapi.js +57 -5
  23. package/dist/openapi.js.map +1 -1
  24. package/dist/rules.d.ts +6 -0
  25. package/dist/rules.d.ts.map +1 -1
  26. package/dist/rules.js +20 -5
  27. package/dist/rules.js.map +1 -1
  28. package/dist/runtime/index.d.ts +1 -0
  29. package/dist/runtime/index.d.ts.map +1 -1
  30. package/dist/runtime/index.js +3 -2
  31. package/dist/schemas/action.d.ts +2 -0
  32. package/dist/schemas/action.d.ts.map +1 -1
  33. package/dist/schemas/api.d.ts +9 -0
  34. package/dist/schemas/api.d.ts.map +1 -1
  35. package/dist/schemas/api.js +5 -3
  36. package/dist/schemas/api.js.map +1 -1
  37. package/dist/schemas/definition.d.ts +67 -0
  38. package/dist/schemas/definition.d.ts.map +1 -1
  39. package/dist/schemas/definition.js +45 -2
  40. package/dist/schemas/definition.js.map +1 -1
  41. package/dist/schemas/field.d.ts +3 -0
  42. package/dist/schemas/field.d.ts.map +1 -1
  43. package/dist/schemas/field.js +6 -4
  44. package/dist/schemas/field.js.map +1 -1
  45. package/dist/schemas/index.d.ts +102 -0
  46. package/dist/schemas/index.d.ts.map +1 -1
  47. package/dist/schemas/index.js +9 -4
  48. package/dist/schemas/index.js.map +1 -1
  49. package/dist/schemas/list.d.ts +15 -0
  50. package/dist/schemas/list.d.ts.map +1 -1
  51. package/dist/schemas/list.js +13 -5
  52. package/dist/schemas/list.js.map +1 -1
  53. package/dist/schemas/resource.d.ts +11 -0
  54. package/dist/schemas/resource.d.ts.map +1 -1
  55. package/package.json +1 -1
  56. package/schema/boot.schema.json +136 -10
  57. package/schema/definition.schema.json +136 -10
  58. package/schema/openapi.json +523 -32
@@ -9,7 +9,7 @@
9
9
  "/definition": {
10
10
  "get": {
11
11
  "operationId": "getDefinition",
12
- "summary": "The definition for the current user, in the current locale.",
12
+ "summary": "The definition for the current user, in the current locale, and for the values of `Panneau-Context`.",
13
13
  "responses": {
14
14
  "200": {
15
15
  "description": "The definition.",
@@ -32,7 +32,85 @@
32
32
  }
33
33
  },
34
34
  "403": {
35
- "description": "Not allowed.",
35
+ "description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`.",
36
+ "content": {
37
+ "application/problem+json": {
38
+ "schema": {
39
+ "$ref": "#/components/schemas/Problem"
40
+ }
41
+ }
42
+ }
43
+ }
44
+ }
45
+ },
46
+ "parameters": [
47
+ {
48
+ "$ref": "#/components/parameters/Context"
49
+ }
50
+ ]
51
+ },
52
+ "/context/{param}/options": {
53
+ "parameters": [
54
+ {
55
+ "name": "param",
56
+ "in": "path",
57
+ "required": true,
58
+ "description": "The name of a param of the context.",
59
+ "schema": {
60
+ "type": "string"
61
+ }
62
+ },
63
+ {
64
+ "$ref": "#/components/parameters/Context"
65
+ }
66
+ ],
67
+ "get": {
68
+ "operationId": "getContextOptions",
69
+ "summary": "The choices of a param of the context without inline `options`, for the values of the params before it in `Panneau-Context`.",
70
+ "parameters": [
71
+ {
72
+ "name": "q",
73
+ "in": "query",
74
+ "required": false,
75
+ "description": "Search terms.",
76
+ "schema": {
77
+ "type": "string"
78
+ }
79
+ }
80
+ ],
81
+ "responses": {
82
+ "200": {
83
+ "description": "The first choices that match `q`, in the order to show them.",
84
+ "content": {
85
+ "application/json": {
86
+ "schema": {
87
+ "$ref": "#/components/schemas/ContextOptionsResponse"
88
+ }
89
+ }
90
+ }
91
+ },
92
+ "401": {
93
+ "description": "Not authenticated.",
94
+ "content": {
95
+ "application/problem+json": {
96
+ "schema": {
97
+ "$ref": "#/components/schemas/Problem"
98
+ }
99
+ }
100
+ }
101
+ },
102
+ "403": {
103
+ "description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`.",
104
+ "content": {
105
+ "application/problem+json": {
106
+ "schema": {
107
+ "$ref": "#/components/schemas/Problem"
108
+ }
109
+ }
110
+ }
111
+ },
112
+ "404": {
113
+ "description": "Not found.",
36
114
  "content": {
37
115
  "application/problem+json": {
38
116
  "schema": {
@@ -54,6 +132,9 @@
54
132
  "schema": {
55
133
  "type": "string"
56
134
  }
135
+ },
136
+ {
137
+ "$ref": "#/components/parameters/Context"
57
138
  }
58
139
  ],
59
140
  "get": {
@@ -150,7 +231,7 @@
150
231
  }
151
232
  },
152
233
  "403": {
153
- "description": "Not allowed.",
234
+ "description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`.",
154
235
  "content": {
155
236
  "application/problem+json": {
156
237
  "schema": {
@@ -224,7 +305,7 @@
224
305
  }
225
306
  },
226
307
  "403": {
227
- "description": "Not allowed.",
308
+ "description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`.",
228
309
  "content": {
229
310
  "application/problem+json": {
230
311
  "schema": {
@@ -285,6 +366,9 @@
285
366
  "schema": {
286
367
  "type": "string"
287
368
  }
369
+ },
370
+ {
371
+ "$ref": "#/components/parameters/Context"
288
372
  }
289
373
  ],
290
374
  "get": {
@@ -319,7 +403,7 @@
319
403
  }
320
404
  },
321
405
  "403": {
322
- "description": "Not allowed.",
406
+ "description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`.",
323
407
  "content": {
324
408
  "application/problem+json": {
325
409
  "schema": {
@@ -395,7 +479,7 @@
395
479
  }
396
480
  },
397
481
  "403": {
398
- "description": "Not allowed.",
482
+ "description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`.",
399
483
  "content": {
400
484
  "application/problem+json": {
401
485
  "schema": {
@@ -463,7 +547,7 @@
463
547
  }
464
548
  },
465
549
  "403": {
466
- "description": "Not allowed.",
550
+ "description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`.",
467
551
  "content": {
468
552
  "application/problem+json": {
469
553
  "schema": {
@@ -514,6 +598,9 @@
514
598
  "schema": {
515
599
  "type": "string"
516
600
  }
601
+ },
602
+ {
603
+ "$ref": "#/components/parameters/Context"
517
604
  }
518
605
  ],
519
606
  "post": {
@@ -549,7 +636,7 @@
549
636
  }
550
637
  },
551
638
  "403": {
552
- "description": "Not allowed.",
639
+ "description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`.",
553
640
  "content": {
554
641
  "application/problem+json": {
555
642
  "schema": {
@@ -600,6 +687,9 @@
600
687
  "schema": {
601
688
  "type": "string"
602
689
  }
690
+ },
691
+ {
692
+ "$ref": "#/components/parameters/Context"
603
693
  }
604
694
  ],
605
695
  "post": {
@@ -637,7 +727,7 @@
637
727
  }
638
728
  },
639
729
  "403": {
640
- "description": "Not allowed.",
730
+ "description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`.",
641
731
  "content": {
642
732
  "application/problem+json": {
643
733
  "schema": {
@@ -688,6 +778,9 @@
688
778
  "schema": {
689
779
  "type": "string"
690
780
  }
781
+ },
782
+ {
783
+ "$ref": "#/components/parameters/Context"
691
784
  }
692
785
  ],
693
786
  "post": {
@@ -749,7 +842,7 @@
749
842
  }
750
843
  },
751
844
  "403": {
752
- "description": "Not allowed.",
845
+ "description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`.",
753
846
  "content": {
754
847
  "application/problem+json": {
755
848
  "schema": {
@@ -810,6 +903,9 @@
810
903
  "schema": {
811
904
  "type": "string"
812
905
  }
906
+ },
907
+ {
908
+ "$ref": "#/components/parameters/Context"
813
909
  }
814
910
  ],
815
911
  "post": {
@@ -847,7 +943,7 @@
847
943
  }
848
944
  },
849
945
  "403": {
850
- "description": "Not allowed.",
946
+ "description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`.",
851
947
  "content": {
852
948
  "application/problem+json": {
853
949
  "schema": {
@@ -914,9 +1010,24 @@
914
1010
  }
915
1011
  }
916
1012
  }
1013
+ },
1014
+ "403": {
1015
+ "description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`.",
1016
+ "content": {
1017
+ "application/problem+json": {
1018
+ "schema": {
1019
+ "$ref": "#/components/schemas/Problem"
1020
+ }
1021
+ }
1022
+ }
917
1023
  }
918
1024
  }
919
- }
1025
+ },
1026
+ "parameters": [
1027
+ {
1028
+ "$ref": "#/components/parameters/Context"
1029
+ }
1030
+ ]
920
1031
  },
921
1032
  "/actions/runs/{run}": {
922
1033
  "parameters": [
@@ -928,6 +1039,9 @@
928
1039
  "schema": {
929
1040
  "type": "string"
930
1041
  }
1042
+ },
1043
+ {
1044
+ "$ref": "#/components/parameters/Context"
931
1045
  }
932
1046
  ],
933
1047
  "get": {
@@ -954,7 +1068,7 @@
954
1068
  }
955
1069
  },
956
1070
  "403": {
957
- "description": "Not allowed.",
1071
+ "description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`.",
958
1072
  "content": {
959
1073
  "application/problem+json": {
960
1074
  "schema": {
@@ -992,7 +1106,7 @@
992
1106
  }
993
1107
  },
994
1108
  "403": {
995
- "description": "Not allowed.",
1109
+ "description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`.",
996
1110
  "content": {
997
1111
  "application/problem+json": {
998
1112
  "schema": {
@@ -1060,7 +1174,7 @@
1060
1174
  }
1061
1175
  },
1062
1176
  "403": {
1063
- "description": "Not allowed.",
1177
+ "description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`.",
1064
1178
  "content": {
1065
1179
  "application/problem+json": {
1066
1180
  "schema": {
@@ -1090,7 +1204,12 @@
1090
1204
  }
1091
1205
  }
1092
1206
  }
1093
- }
1207
+ },
1208
+ "parameters": [
1209
+ {
1210
+ "$ref": "#/components/parameters/Context"
1211
+ }
1212
+ ]
1094
1213
  },
1095
1214
  "/uploads/{upload}/complete": {
1096
1215
  "parameters": [
@@ -1102,6 +1221,9 @@
1102
1221
  "schema": {
1103
1222
  "type": "string"
1104
1223
  }
1224
+ },
1225
+ {
1226
+ "$ref": "#/components/parameters/Context"
1105
1227
  }
1106
1228
  ],
1107
1229
  "post": {
@@ -1145,7 +1267,7 @@
1145
1267
  }
1146
1268
  },
1147
1269
  "403": {
1148
- "description": "Not allowed.",
1270
+ "description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`.",
1149
1271
  "content": {
1150
1272
  "application/problem+json": {
1151
1273
  "schema": {
@@ -1200,9 +1322,24 @@
1200
1322
  }
1201
1323
  }
1202
1324
  }
1325
+ },
1326
+ "403": {
1327
+ "description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`.",
1328
+ "content": {
1329
+ "application/problem+json": {
1330
+ "schema": {
1331
+ "$ref": "#/components/schemas/Problem"
1332
+ }
1333
+ }
1334
+ }
1203
1335
  }
1204
1336
  }
1205
- }
1337
+ },
1338
+ "parameters": [
1339
+ {
1340
+ "$ref": "#/components/parameters/Context"
1341
+ }
1342
+ ]
1206
1343
  },
1207
1344
  "/auth/login": {
1208
1345
  "post": {
@@ -1278,6 +1415,16 @@
1278
1415
  }
1279
1416
  }
1280
1417
  },
1418
+ "403": {
1419
+ "description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`.",
1420
+ "content": {
1421
+ "application/problem+json": {
1422
+ "schema": {
1423
+ "$ref": "#/components/schemas/Problem"
1424
+ }
1425
+ }
1426
+ }
1427
+ },
1281
1428
  "422": {
1282
1429
  "description": "Invalid values: messages are in `errors`, keyed by dot path.",
1283
1430
  "content": {
@@ -1289,7 +1436,12 @@
1289
1436
  }
1290
1437
  }
1291
1438
  }
1292
- }
1439
+ },
1440
+ "parameters": [
1441
+ {
1442
+ "$ref": "#/components/parameters/Context"
1443
+ }
1444
+ ]
1293
1445
  },
1294
1446
  "/auth/logout": {
1295
1447
  "post": {
@@ -1298,9 +1450,24 @@
1298
1450
  "responses": {
1299
1451
  "204": {
1300
1452
  "description": "Logged out."
1453
+ },
1454
+ "403": {
1455
+ "description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`.",
1456
+ "content": {
1457
+ "application/problem+json": {
1458
+ "schema": {
1459
+ "$ref": "#/components/schemas/Problem"
1460
+ }
1461
+ }
1462
+ }
1301
1463
  }
1302
1464
  }
1303
- }
1465
+ },
1466
+ "parameters": [
1467
+ {
1468
+ "$ref": "#/components/parameters/Context"
1469
+ }
1470
+ ]
1304
1471
  },
1305
1472
  "/auth/providers/{provider}/redirect": {
1306
1473
  "parameters": [
@@ -1312,6 +1479,9 @@
1312
1479
  "schema": {
1313
1480
  "type": "string"
1314
1481
  }
1482
+ },
1483
+ {
1484
+ "$ref": "#/components/parameters/Context"
1315
1485
  }
1316
1486
  ],
1317
1487
  "get": {
@@ -1331,6 +1501,16 @@
1331
1501
  "302": {
1332
1502
  "description": "Redirect to the provider."
1333
1503
  },
1504
+ "403": {
1505
+ "description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`.",
1506
+ "content": {
1507
+ "application/problem+json": {
1508
+ "schema": {
1509
+ "$ref": "#/components/schemas/Problem"
1510
+ }
1511
+ }
1512
+ }
1513
+ },
1334
1514
  "404": {
1335
1515
  "description": "Not found.",
1336
1516
  "content": {
@@ -1369,6 +1549,16 @@
1369
1549
  "204": {
1370
1550
  "description": "A reset link was sent, if the account exists."
1371
1551
  },
1552
+ "403": {
1553
+ "description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`.",
1554
+ "content": {
1555
+ "application/problem+json": {
1556
+ "schema": {
1557
+ "$ref": "#/components/schemas/Problem"
1558
+ }
1559
+ }
1560
+ }
1561
+ },
1372
1562
  "422": {
1373
1563
  "description": "Invalid values: messages are in `errors`, keyed by dot path.",
1374
1564
  "content": {
@@ -1380,7 +1570,12 @@
1380
1570
  }
1381
1571
  }
1382
1572
  }
1383
- }
1573
+ },
1574
+ "parameters": [
1575
+ {
1576
+ "$ref": "#/components/parameters/Context"
1577
+ }
1578
+ ]
1384
1579
  },
1385
1580
  "/auth/password/reset": {
1386
1581
  "post": {
@@ -1415,6 +1610,16 @@
1415
1610
  "204": {
1416
1611
  "description": "The password was reset."
1417
1612
  },
1613
+ "403": {
1614
+ "description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`.",
1615
+ "content": {
1616
+ "application/problem+json": {
1617
+ "schema": {
1618
+ "$ref": "#/components/schemas/Problem"
1619
+ }
1620
+ }
1621
+ }
1622
+ },
1418
1623
  "422": {
1419
1624
  "description": "Invalid values: messages are in `errors`, keyed by dot path.",
1420
1625
  "content": {
@@ -1426,7 +1631,12 @@
1426
1631
  }
1427
1632
  }
1428
1633
  }
1429
- }
1634
+ },
1635
+ "parameters": [
1636
+ {
1637
+ "$ref": "#/components/parameters/Context"
1638
+ }
1639
+ ]
1430
1640
  },
1431
1641
  "/auth/two-factor/challenge": {
1432
1642
  "post": {
@@ -1460,6 +1670,16 @@
1460
1670
  }
1461
1671
  }
1462
1672
  },
1673
+ "403": {
1674
+ "description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`.",
1675
+ "content": {
1676
+ "application/problem+json": {
1677
+ "schema": {
1678
+ "$ref": "#/components/schemas/Problem"
1679
+ }
1680
+ }
1681
+ }
1682
+ },
1463
1683
  "422": {
1464
1684
  "description": "Invalid values: messages are in `errors`, keyed by dot path.",
1465
1685
  "content": {
@@ -1471,7 +1691,12 @@
1471
1691
  }
1472
1692
  }
1473
1693
  }
1474
- }
1694
+ },
1695
+ "parameters": [
1696
+ {
1697
+ "$ref": "#/components/parameters/Context"
1698
+ }
1699
+ ]
1475
1700
  },
1476
1701
  "/auth/passkeys/options": {
1477
1702
  "post": {
@@ -1487,9 +1712,24 @@
1487
1712
  }
1488
1713
  }
1489
1714
  }
1715
+ },
1716
+ "403": {
1717
+ "description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`.",
1718
+ "content": {
1719
+ "application/problem+json": {
1720
+ "schema": {
1721
+ "$ref": "#/components/schemas/Problem"
1722
+ }
1723
+ }
1724
+ }
1490
1725
  }
1491
1726
  }
1492
- }
1727
+ },
1728
+ "parameters": [
1729
+ {
1730
+ "$ref": "#/components/parameters/Context"
1731
+ }
1732
+ ]
1493
1733
  },
1494
1734
  "/auth/passkeys/login": {
1495
1735
  "post": {
@@ -1516,6 +1756,16 @@
1516
1756
  }
1517
1757
  }
1518
1758
  },
1759
+ "403": {
1760
+ "description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`.",
1761
+ "content": {
1762
+ "application/problem+json": {
1763
+ "schema": {
1764
+ "$ref": "#/components/schemas/Problem"
1765
+ }
1766
+ }
1767
+ }
1768
+ },
1519
1769
  "422": {
1520
1770
  "description": "Invalid values: messages are in `errors`, keyed by dot path.",
1521
1771
  "content": {
@@ -1527,7 +1777,12 @@
1527
1777
  }
1528
1778
  }
1529
1779
  }
1530
- }
1780
+ },
1781
+ "parameters": [
1782
+ {
1783
+ "$ref": "#/components/parameters/Context"
1784
+ }
1785
+ ]
1531
1786
  },
1532
1787
  "/account": {
1533
1788
  "get": {
@@ -1560,6 +1815,16 @@
1560
1815
  }
1561
1816
  }
1562
1817
  }
1818
+ },
1819
+ "403": {
1820
+ "description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`.",
1821
+ "content": {
1822
+ "application/problem+json": {
1823
+ "schema": {
1824
+ "$ref": "#/components/schemas/Problem"
1825
+ }
1826
+ }
1827
+ }
1563
1828
  }
1564
1829
  }
1565
1830
  },
@@ -1605,6 +1870,16 @@
1605
1870
  }
1606
1871
  }
1607
1872
  },
1873
+ "403": {
1874
+ "description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`.",
1875
+ "content": {
1876
+ "application/problem+json": {
1877
+ "schema": {
1878
+ "$ref": "#/components/schemas/Problem"
1879
+ }
1880
+ }
1881
+ }
1882
+ },
1608
1883
  "422": {
1609
1884
  "description": "Invalid values: messages are in `errors`, keyed by dot path.",
1610
1885
  "content": {
@@ -1616,7 +1891,12 @@
1616
1891
  }
1617
1892
  }
1618
1893
  }
1619
- }
1894
+ },
1895
+ "parameters": [
1896
+ {
1897
+ "$ref": "#/components/parameters/Context"
1898
+ }
1899
+ ]
1620
1900
  },
1621
1901
  "/search": {
1622
1902
  "get": {
@@ -1676,6 +1956,16 @@
1676
1956
  }
1677
1957
  }
1678
1958
  },
1959
+ "403": {
1960
+ "description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`.",
1961
+ "content": {
1962
+ "application/problem+json": {
1963
+ "schema": {
1964
+ "$ref": "#/components/schemas/Problem"
1965
+ }
1966
+ }
1967
+ }
1968
+ },
1679
1969
  "422": {
1680
1970
  "description": "Invalid values: messages are in `errors`, keyed by dot path.",
1681
1971
  "content": {
@@ -1697,7 +1987,12 @@
1697
1987
  }
1698
1988
  }
1699
1989
  }
1700
- }
1990
+ },
1991
+ "parameters": [
1992
+ {
1993
+ "$ref": "#/components/parameters/Context"
1994
+ }
1995
+ ]
1701
1996
  },
1702
1997
  "/embeds": {
1703
1998
  "get": {
@@ -1734,6 +2029,16 @@
1734
2029
  }
1735
2030
  }
1736
2031
  },
2032
+ "403": {
2033
+ "description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`.",
2034
+ "content": {
2035
+ "application/problem+json": {
2036
+ "schema": {
2037
+ "$ref": "#/components/schemas/Problem"
2038
+ }
2039
+ }
2040
+ }
2041
+ },
1737
2042
  "422": {
1738
2043
  "description": "Invalid values: messages are in `errors`, keyed by dot path.",
1739
2044
  "content": {
@@ -1755,7 +2060,12 @@
1755
2060
  }
1756
2061
  }
1757
2062
  }
1758
- }
2063
+ },
2064
+ "parameters": [
2065
+ {
2066
+ "$ref": "#/components/parameters/Context"
2067
+ }
2068
+ ]
1759
2069
  },
1760
2070
  "/dashboard/widgets/{widget}": {
1761
2071
  "parameters": [
@@ -1767,6 +2077,9 @@
1767
2077
  "schema": {
1768
2078
  "type": "string"
1769
2079
  }
2080
+ },
2081
+ {
2082
+ "$ref": "#/components/parameters/Context"
1770
2083
  }
1771
2084
  ],
1772
2085
  "get": {
@@ -1794,7 +2107,7 @@
1794
2107
  }
1795
2108
  },
1796
2109
  "403": {
1797
- "description": "Not allowed.",
2110
+ "description": "Not allowed. A value of `Panneau-Context` that the user can't use is a problem of type `urn:panneau:problem:context`, with its `param`.",
1798
2111
  "content": {
1799
2112
  "application/problem+json": {
1800
2113
  "schema": {
@@ -2026,7 +2339,8 @@
2026
2339
  "enum": [
2027
2340
  "email",
2028
2341
  "url",
2029
- "json"
2342
+ "json",
2343
+ "tel"
2030
2344
  ]
2031
2345
  },
2032
2346
  "message": {
@@ -2325,8 +2639,13 @@
2325
2639
  "type": "boolean"
2326
2640
  },
2327
2641
  "readOnly": {
2642
+ "description": "Nobody edits the field (a computed value). For a field the current user can't edit, use `abilities.update: false`.",
2328
2643
  "type": "boolean"
2329
2644
  },
2645
+ "abilities": {
2646
+ "description": "What the current user can do with the field (decision 0046). Only `false` restricts: `view: false` leaves the field out of forms, details and lists, and items don't carry its value; `update: false` makes it read-only, and the backend ignores its value. For the fields at the top of a resource and of its types.",
2647
+ "$ref": "#/components/schemas/Abilities"
2648
+ },
2330
2649
  "createOnly": {
2331
2650
  "type": "boolean"
2332
2651
  },
@@ -2404,7 +2723,7 @@
2404
2723
  ]
2405
2724
  },
2406
2725
  "from": {
2407
- "description": "`slug`: the field the slug is generated from.",
2726
+ "description": "`slug`: the field the slug is generated from. `region`: the field of the same object that holds its country.",
2408
2727
  "type": "string"
2409
2728
  },
2410
2729
  "check": {
@@ -2626,6 +2945,14 @@
2626
2945
  "center",
2627
2946
  "end"
2628
2947
  ]
2948
+ },
2949
+ "hidden": {
2950
+ "description": "Not shown by default: the user can show it from the columns of the list (decision 0042).",
2951
+ "type": "boolean"
2952
+ },
2953
+ "hideable": {
2954
+ "description": "`false`: always shown, the user can move it but not hide it. Columns are hideable by default.",
2955
+ "type": "boolean"
2629
2956
  }
2630
2957
  },
2631
2958
  "additionalProperties": {}
@@ -2666,6 +2993,31 @@
2666
2993
  ],
2667
2994
  "additionalProperties": {}
2668
2995
  },
2996
+ "ListCalendar": {
2997
+ "type": "object",
2998
+ "properties": {
2999
+ "field": {
3000
+ "type": "string",
3001
+ "minLength": 1,
3002
+ "description": "The `date` or `datetime` field each item is shown on the day of."
3003
+ },
3004
+ "filter": {
3005
+ "description": "The id of the list's `date-range` filter on that field, through which the calendar asks for the days around a month. Defaults to the field's name.",
3006
+ "type": "string",
3007
+ "minLength": 1
3008
+ },
3009
+ "perPage": {
3010
+ "description": "How many items the calendar asks for a month, in one request. Defaults to 100.",
3011
+ "type": "integer",
3012
+ "exclusiveMinimum": 0,
3013
+ "maximum": 9007199254740991
3014
+ }
3015
+ },
3016
+ "required": [
3017
+ "field"
3018
+ ],
3019
+ "additionalProperties": {}
3020
+ },
2669
3021
  "ListDefinition": {
2670
3022
  "type": "object",
2671
3023
  "properties": {
@@ -2698,6 +3050,7 @@
2698
3050
  "type": "boolean"
2699
3051
  },
2700
3052
  "layouts": {
3053
+ "description": "The layouts the list offers, the first being the default. Built in: `table`, `cards`, `gallery` (on the `itemImage` of the resource) and `calendar` (with `calendar`).",
2701
3054
  "type": "array",
2702
3055
  "items": {
2703
3056
  "type": "string",
@@ -2726,7 +3079,7 @@
2726
3079
  ]
2727
3080
  },
2728
3081
  "inlineEdit": {
2729
- "description": "Fields editable in the list.",
3082
+ "description": "Fields that columns edit in place, on items that can be updated: `text`, `number`, `select`, `boolean` and `date`. Each change is a `PATCH` with the one field and `If-Match` (decision 0043).",
2730
3083
  "type": "array",
2731
3084
  "items": {
2732
3085
  "type": "string",
@@ -2735,6 +3088,10 @@
2735
3088
  },
2736
3089
  "selectable": {
2737
3090
  "type": "boolean"
3091
+ },
3092
+ "calendar": {
3093
+ "description": "The calendar of the list: the items of a month on the days of a date field, asked for through a `date-range` filter instead of pages (decision 0044).",
3094
+ "$ref": "#/components/schemas/ListCalendar"
2738
3095
  }
2739
3096
  },
2740
3097
  "additionalProperties": {}
@@ -3332,6 +3689,10 @@
3332
3689
  "type": "string",
3333
3690
  "pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
3334
3691
  }
3692
+ },
3693
+ "abilities": {
3694
+ "description": "What the current user can do with the page (decision 0046). `view: false` leaves it out of menus, and its route shows a forbidden state; `pages.home` falls back to the built-in home. Without it, the page is allowed.",
3695
+ "$ref": "#/components/schemas/Abilities"
3335
3696
  }
3336
3697
  },
3337
3698
  "required": [
@@ -3400,6 +3761,102 @@
3400
3761
  ],
3401
3762
  "additionalProperties": {}
3402
3763
  },
3764
+ "ContextOption": {
3765
+ "type": "object",
3766
+ "properties": {
3767
+ "value": {
3768
+ "type": "string",
3769
+ "minLength": 1
3770
+ },
3771
+ "label": {
3772
+ "type": "string"
3773
+ },
3774
+ "description": {
3775
+ "type": "string"
3776
+ }
3777
+ },
3778
+ "required": [
3779
+ "value",
3780
+ "label"
3781
+ ],
3782
+ "additionalProperties": {},
3783
+ "description": "A choice of a param of the context."
3784
+ },
3785
+ "ContextParam": {
3786
+ "type": "object",
3787
+ "properties": {
3788
+ "name": {
3789
+ "type": "string",
3790
+ "pattern": "^(?!(?:resources|pages|media|search|account|auth)$)[A-Za-z_][A-Za-z0-9_]*$",
3791
+ "description": "The name of the param, in the `Panneau-Context` header and in the client routes (`{basePath}/{name}/{value}/…`): an identifier, not a reserved first segment of the routes."
3792
+ },
3793
+ "label": {
3794
+ "type": "string"
3795
+ },
3796
+ "required": {
3797
+ "description": "Whether the app needs a value: without one, it shows a page to pick it in place of the page of the route.",
3798
+ "type": "boolean"
3799
+ },
3800
+ "fixed": {
3801
+ "description": "The backend sets the value from the request, such as its domain: the app shows it without a picker, and leaves it out of the path and of the `Panneau-Context` header. Another value in the header is a `403` context problem. A fixed param has a `value`.",
3802
+ "type": "boolean"
3803
+ },
3804
+ "allLabel": {
3805
+ "description": "An optional param: the label of no value, such as \"All clients\".",
3806
+ "type": "string"
3807
+ },
3808
+ "options": {
3809
+ "description": "The choices, inline. Without them, the client searches them with `GET /context/{name}/options`.",
3810
+ "type": "array",
3811
+ "items": {
3812
+ "$ref": "#/components/schemas/ContextOption"
3813
+ }
3814
+ },
3815
+ "value": {
3816
+ "description": "The value the definition was built for: the one the client sent, checked, or the one the backend chose for a required param.",
3817
+ "anyOf": [
3818
+ {
3819
+ "type": "string",
3820
+ "minLength": 1
3821
+ },
3822
+ {
3823
+ "type": "null"
3824
+ }
3825
+ ]
3826
+ },
3827
+ "valueLabel": {
3828
+ "description": "The label of `value`, for the picker.",
3829
+ "type": [
3830
+ "string",
3831
+ "null"
3832
+ ]
3833
+ }
3834
+ },
3835
+ "required": [
3836
+ "name",
3837
+ "label"
3838
+ ],
3839
+ "additionalProperties": {},
3840
+ "description": "A param of the current context (decision 0045)."
3841
+ },
3842
+ "DefinitionContext": {
3843
+ "type": "object",
3844
+ "properties": {
3845
+ "params": {
3846
+ "minItems": 1,
3847
+ "type": "array",
3848
+ "items": {
3849
+ "$ref": "#/components/schemas/ContextParam"
3850
+ },
3851
+ "description": "In order: each param depends on the params before it. The params are the same whatever the values."
3852
+ }
3853
+ },
3854
+ "required": [
3855
+ "params"
3856
+ ],
3857
+ "additionalProperties": {},
3858
+ "description": "The current context the user picks in the app, sent with every request in the `Panneau-Context` header (decision 0045)."
3859
+ },
3403
3860
  "ThemeTokens": {
3404
3861
  "type": "object",
3405
3862
  "propertyNames": {
@@ -3923,6 +4380,9 @@
3923
4380
  "uploads": {
3924
4381
  "$ref": "#/components/schemas/Uploads"
3925
4382
  },
4383
+ "context": {
4384
+ "$ref": "#/components/schemas/DefinitionContext"
4385
+ },
3926
4386
  "theme": {
3927
4387
  "$ref": "#/components/schemas/DefinitionTheme"
3928
4388
  },
@@ -4133,6 +4593,10 @@
4133
4593
  "current": {
4134
4594
  "description": "`412`: the current version of the item.",
4135
4595
  "$ref": "#/components/schemas/Item"
4596
+ },
4597
+ "param": {
4598
+ "description": "`403` of type `urn:panneau:problem:context`: the param of the context whose value the user can't use.",
4599
+ "type": "string"
4136
4600
  }
4137
4601
  },
4138
4602
  "required": [
@@ -5013,6 +5477,22 @@
5013
5477
  "additionalProperties": {},
5014
5478
  "description": "The results of the global search: the resources with results, in the order of the definition."
5015
5479
  },
5480
+ "ContextOptionsResponse": {
5481
+ "type": "object",
5482
+ "properties": {
5483
+ "data": {
5484
+ "type": "array",
5485
+ "items": {
5486
+ "$ref": "#/components/schemas/ContextOption"
5487
+ }
5488
+ }
5489
+ },
5490
+ "required": [
5491
+ "data"
5492
+ ],
5493
+ "additionalProperties": {},
5494
+ "description": "The first choices of a param of the context that match `q`."
5495
+ },
5016
5496
  "PreviewResponse": {
5017
5497
  "type": "object",
5018
5498
  "properties": {
@@ -5108,6 +5588,17 @@
5108
5588
  "additionalProperties": {},
5109
5589
  "description": "The value of a `location` field: a point, and its address."
5110
5590
  }
5591
+ },
5592
+ "parameters": {
5593
+ "Context": {
5594
+ "name": "Panneau-Context",
5595
+ "in": "header",
5596
+ "required": false,
5597
+ "description": "The values of the current context, when the definition has `context`: the format of a query string, in the order of its params (`client=4&contest=12`). Responses vary with it.",
5598
+ "schema": {
5599
+ "type": "string"
5600
+ }
5601
+ }
5111
5602
  }
5112
5603
  }
5113
5604
  }