@panneau/protocol 5.0.0-alpha.4 → 5.0.0-alpha.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/conformance/index.d.ts.map +1 -1
- package/dist/conformance/index.js +121 -1
- package/dist/conformance/index.js.map +1 -1
- package/dist/constants.d.ts +2 -2
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +12 -2
- package/dist/constants.js.map +1 -1
- package/dist/index.js +5 -2
- package/dist/libraries.d.ts +16 -0
- package/dist/libraries.d.ts.map +1 -0
- package/dist/libraries.js +15 -0
- package/dist/libraries.js.map +1 -0
- package/dist/lint.d.ts +2 -2
- package/dist/lint.d.ts.map +1 -1
- package/dist/lint.js +15 -9
- package/dist/lint.js.map +1 -1
- package/dist/mock/example.d.ts.map +1 -1
- package/dist/mock/example.js +8 -0
- package/dist/mock/example.js.map +1 -1
- package/dist/mock/index.d.ts +15 -2
- package/dist/mock/index.d.ts.map +1 -1
- package/dist/mock/index.js +164 -13
- package/dist/mock/index.js.map +1 -1
- package/dist/openapi.d.ts.map +1 -1
- package/dist/openapi.js +45 -4
- package/dist/openapi.js.map +1 -1
- package/dist/rules.d.ts.map +1 -1
- package/dist/rules.js +26 -1
- package/dist/rules.js.map +1 -1
- package/dist/runtime/index.d.ts +3 -0
- package/dist/runtime/index.d.ts.map +1 -1
- package/dist/runtime/index.js +4 -1
- package/dist/schemas/action.d.ts +18 -1
- package/dist/schemas/action.d.ts.map +1 -1
- package/dist/schemas/api.d.ts +141 -0
- package/dist/schemas/api.d.ts.map +1 -1
- package/dist/schemas/api.js +54 -9
- package/dist/schemas/api.js.map +1 -1
- package/dist/schemas/definition.d.ts +40 -2
- package/dist/schemas/definition.d.ts.map +1 -1
- package/dist/schemas/definition.js +2 -1
- package/dist/schemas/definition.js.map +1 -1
- package/dist/schemas/field.d.ts +26 -1
- package/dist/schemas/field.d.ts.map +1 -1
- package/dist/schemas/field.js +27 -5
- package/dist/schemas/field.js.map +1 -1
- package/dist/schemas/index.d.ts +259 -6
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +8 -3
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/resource.d.ts +38 -2
- package/dist/schemas/resource.d.ts.map +1 -1
- package/dist/schemas/resource.js +3 -1
- package/dist/schemas/resource.js.map +1 -1
- package/dist/search.d.ts +51 -0
- package/dist/search.d.ts.map +1 -0
- package/dist/search.js +53 -0
- package/dist/search.js.map +1 -0
- package/dist/transforms.d.ts +17 -0
- package/dist/transforms.d.ts.map +1 -0
- package/dist/transforms.js +34 -0
- package/dist/transforms.js.map +1 -0
- package/package.json +1 -1
- package/schema/boot.schema.json +82 -2
- package/schema/definition.schema.json +82 -2
- package/schema/openapi.json +507 -14
package/schema/openapi.json
CHANGED
|
@@ -686,6 +686,94 @@
|
|
|
686
686
|
}
|
|
687
687
|
}
|
|
688
688
|
},
|
|
689
|
+
"/resources/{resource}/fields/{field}/check": {
|
|
690
|
+
"parameters": [
|
|
691
|
+
{
|
|
692
|
+
"name": "resource",
|
|
693
|
+
"in": "path",
|
|
694
|
+
"required": true,
|
|
695
|
+
"description": "Resource id.",
|
|
696
|
+
"schema": {
|
|
697
|
+
"type": "string"
|
|
698
|
+
}
|
|
699
|
+
},
|
|
700
|
+
{
|
|
701
|
+
"name": "field",
|
|
702
|
+
"in": "path",
|
|
703
|
+
"required": true,
|
|
704
|
+
"description": "Name of a field with `check`.",
|
|
705
|
+
"schema": {
|
|
706
|
+
"type": "string"
|
|
707
|
+
}
|
|
708
|
+
}
|
|
709
|
+
],
|
|
710
|
+
"post": {
|
|
711
|
+
"operationId": "checkField",
|
|
712
|
+
"summary": "Checks a value as it is typed: whether a slug is available, and its URL. With the permission to create, or to update the item `id`.",
|
|
713
|
+
"requestBody": {
|
|
714
|
+
"required": true,
|
|
715
|
+
"content": {
|
|
716
|
+
"application/json": {
|
|
717
|
+
"schema": {
|
|
718
|
+
"$ref": "#/components/schemas/FieldCheckRequest"
|
|
719
|
+
}
|
|
720
|
+
}
|
|
721
|
+
}
|
|
722
|
+
},
|
|
723
|
+
"responses": {
|
|
724
|
+
"200": {
|
|
725
|
+
"description": "What the backend says about the value.",
|
|
726
|
+
"content": {
|
|
727
|
+
"application/json": {
|
|
728
|
+
"schema": {
|
|
729
|
+
"$ref": "#/components/schemas/FieldCheckResponse"
|
|
730
|
+
}
|
|
731
|
+
}
|
|
732
|
+
}
|
|
733
|
+
},
|
|
734
|
+
"401": {
|
|
735
|
+
"description": "Not authenticated.",
|
|
736
|
+
"content": {
|
|
737
|
+
"application/problem+json": {
|
|
738
|
+
"schema": {
|
|
739
|
+
"$ref": "#/components/schemas/Problem"
|
|
740
|
+
}
|
|
741
|
+
}
|
|
742
|
+
}
|
|
743
|
+
},
|
|
744
|
+
"403": {
|
|
745
|
+
"description": "Not allowed.",
|
|
746
|
+
"content": {
|
|
747
|
+
"application/problem+json": {
|
|
748
|
+
"schema": {
|
|
749
|
+
"$ref": "#/components/schemas/Problem"
|
|
750
|
+
}
|
|
751
|
+
}
|
|
752
|
+
}
|
|
753
|
+
},
|
|
754
|
+
"404": {
|
|
755
|
+
"description": "Not found.",
|
|
756
|
+
"content": {
|
|
757
|
+
"application/problem+json": {
|
|
758
|
+
"schema": {
|
|
759
|
+
"$ref": "#/components/schemas/Problem"
|
|
760
|
+
}
|
|
761
|
+
}
|
|
762
|
+
}
|
|
763
|
+
},
|
|
764
|
+
"422": {
|
|
765
|
+
"description": "Invalid values: messages are in `errors`, keyed by dot path.",
|
|
766
|
+
"content": {
|
|
767
|
+
"application/problem+json": {
|
|
768
|
+
"schema": {
|
|
769
|
+
"$ref": "#/components/schemas/Problem"
|
|
770
|
+
}
|
|
771
|
+
}
|
|
772
|
+
}
|
|
773
|
+
}
|
|
774
|
+
}
|
|
775
|
+
}
|
|
776
|
+
},
|
|
689
777
|
"/actions/runs": {
|
|
690
778
|
"get": {
|
|
691
779
|
"operationId": "listActionRuns",
|
|
@@ -1413,7 +1501,30 @@
|
|
|
1413
1501
|
"name": "q",
|
|
1414
1502
|
"in": "query",
|
|
1415
1503
|
"required": true,
|
|
1416
|
-
"description": "Search terms.",
|
|
1504
|
+
"description": "Search terms, trimmed.",
|
|
1505
|
+
"schema": {
|
|
1506
|
+
"type": "string",
|
|
1507
|
+
"minLength": 2,
|
|
1508
|
+
"maxLength": 255
|
|
1509
|
+
}
|
|
1510
|
+
},
|
|
1511
|
+
{
|
|
1512
|
+
"name": "limit",
|
|
1513
|
+
"in": "query",
|
|
1514
|
+
"required": false,
|
|
1515
|
+
"description": "Items per resource.",
|
|
1516
|
+
"schema": {
|
|
1517
|
+
"type": "integer",
|
|
1518
|
+
"minimum": 1,
|
|
1519
|
+
"maximum": 20,
|
|
1520
|
+
"default": 5
|
|
1521
|
+
}
|
|
1522
|
+
},
|
|
1523
|
+
{
|
|
1524
|
+
"name": "resources",
|
|
1525
|
+
"in": "query",
|
|
1526
|
+
"required": false,
|
|
1527
|
+
"description": "Comma-separated ids of the searchable resources to search. Defaults to every one.",
|
|
1417
1528
|
"schema": {
|
|
1418
1529
|
"type": "string"
|
|
1419
1530
|
}
|
|
@@ -1421,7 +1532,7 @@
|
|
|
1421
1532
|
],
|
|
1422
1533
|
"responses": {
|
|
1423
1534
|
"200": {
|
|
1424
|
-
"description": "Results grouped by resource.",
|
|
1535
|
+
"description": "Results grouped by resource, in the order of the definition: at most `limit` items per resource, and 20 in all.",
|
|
1425
1536
|
"content": {
|
|
1426
1537
|
"application/json": {
|
|
1427
1538
|
"schema": {
|
|
@@ -1439,6 +1550,84 @@
|
|
|
1439
1550
|
}
|
|
1440
1551
|
}
|
|
1441
1552
|
}
|
|
1553
|
+
},
|
|
1554
|
+
"422": {
|
|
1555
|
+
"description": "Invalid values: messages are in `errors`, keyed by dot path.",
|
|
1556
|
+
"content": {
|
|
1557
|
+
"application/problem+json": {
|
|
1558
|
+
"schema": {
|
|
1559
|
+
"$ref": "#/components/schemas/Problem"
|
|
1560
|
+
}
|
|
1561
|
+
}
|
|
1562
|
+
}
|
|
1563
|
+
},
|
|
1564
|
+
"429": {
|
|
1565
|
+
"description": "Too many requests: `Retry-After` gives the seconds to wait.",
|
|
1566
|
+
"content": {
|
|
1567
|
+
"application/problem+json": {
|
|
1568
|
+
"schema": {
|
|
1569
|
+
"$ref": "#/components/schemas/Problem"
|
|
1570
|
+
}
|
|
1571
|
+
}
|
|
1572
|
+
}
|
|
1573
|
+
}
|
|
1574
|
+
}
|
|
1575
|
+
}
|
|
1576
|
+
},
|
|
1577
|
+
"/embeds": {
|
|
1578
|
+
"get": {
|
|
1579
|
+
"operationId": "resolveEmbed",
|
|
1580
|
+
"parameters": [
|
|
1581
|
+
{
|
|
1582
|
+
"name": "url",
|
|
1583
|
+
"in": "query",
|
|
1584
|
+
"required": true,
|
|
1585
|
+
"description": "The URL to embed.",
|
|
1586
|
+
"schema": {
|
|
1587
|
+
"type": "string"
|
|
1588
|
+
}
|
|
1589
|
+
}
|
|
1590
|
+
],
|
|
1591
|
+
"responses": {
|
|
1592
|
+
"200": {
|
|
1593
|
+
"description": "The value of an `embed` field for the URL, from its provider's oEmbed.",
|
|
1594
|
+
"content": {
|
|
1595
|
+
"application/json": {
|
|
1596
|
+
"schema": {
|
|
1597
|
+
"$ref": "#/components/schemas/EmbedResponse"
|
|
1598
|
+
}
|
|
1599
|
+
}
|
|
1600
|
+
}
|
|
1601
|
+
},
|
|
1602
|
+
"401": {
|
|
1603
|
+
"description": "Not authenticated.",
|
|
1604
|
+
"content": {
|
|
1605
|
+
"application/problem+json": {
|
|
1606
|
+
"schema": {
|
|
1607
|
+
"$ref": "#/components/schemas/Problem"
|
|
1608
|
+
}
|
|
1609
|
+
}
|
|
1610
|
+
}
|
|
1611
|
+
},
|
|
1612
|
+
"422": {
|
|
1613
|
+
"description": "Invalid values: messages are in `errors`, keyed by dot path.",
|
|
1614
|
+
"content": {
|
|
1615
|
+
"application/problem+json": {
|
|
1616
|
+
"schema": {
|
|
1617
|
+
"$ref": "#/components/schemas/Problem"
|
|
1618
|
+
}
|
|
1619
|
+
}
|
|
1620
|
+
}
|
|
1621
|
+
},
|
|
1622
|
+
"429": {
|
|
1623
|
+
"description": "Too many requests: `Retry-After` gives the seconds to wait.",
|
|
1624
|
+
"content": {
|
|
1625
|
+
"application/problem+json": {
|
|
1626
|
+
"schema": {
|
|
1627
|
+
"$ref": "#/components/schemas/Problem"
|
|
1628
|
+
}
|
|
1629
|
+
}
|
|
1630
|
+
}
|
|
1442
1631
|
}
|
|
1443
1632
|
}
|
|
1444
1633
|
}
|
|
@@ -1682,7 +1871,8 @@
|
|
|
1682
1871
|
"type": "string",
|
|
1683
1872
|
"enum": [
|
|
1684
1873
|
"email",
|
|
1685
|
-
"url"
|
|
1874
|
+
"url",
|
|
1875
|
+
"json"
|
|
1686
1876
|
]
|
|
1687
1877
|
},
|
|
1688
1878
|
"message": {
|
|
@@ -1814,6 +2004,43 @@
|
|
|
1814
2004
|
],
|
|
1815
2005
|
"additionalProperties": {}
|
|
1816
2006
|
},
|
|
2007
|
+
{
|
|
2008
|
+
"type": "object",
|
|
2009
|
+
"properties": {
|
|
2010
|
+
"rule": {
|
|
2011
|
+
"type": "string",
|
|
2012
|
+
"const": "crop"
|
|
2013
|
+
},
|
|
2014
|
+
"value": {
|
|
2015
|
+
"type": "object",
|
|
2016
|
+
"properties": {
|
|
2017
|
+
"ratios": {
|
|
2018
|
+
"description": "A crop must have one of them: its height is within one pixel of its width divided by the ratio, after its rotation.",
|
|
2019
|
+
"type": "array",
|
|
2020
|
+
"items": {
|
|
2021
|
+
"type": "string",
|
|
2022
|
+
"pattern": "^[1-9][0-9]*:[1-9][0-9]*$",
|
|
2023
|
+
"description": "An aspect ratio, as `width:height`: `16:9`."
|
|
2024
|
+
}
|
|
2025
|
+
},
|
|
2026
|
+
"required": {
|
|
2027
|
+
"description": "Each image needs a crop for this use.",
|
|
2028
|
+
"type": "boolean"
|
|
2029
|
+
}
|
|
2030
|
+
},
|
|
2031
|
+
"additionalProperties": {}
|
|
2032
|
+
},
|
|
2033
|
+
"message": {
|
|
2034
|
+
"description": "Message shown when the rule fails, instead of the default one.",
|
|
2035
|
+
"type": "string"
|
|
2036
|
+
}
|
|
2037
|
+
},
|
|
2038
|
+
"required": [
|
|
2039
|
+
"rule",
|
|
2040
|
+
"value"
|
|
2041
|
+
],
|
|
2042
|
+
"additionalProperties": {}
|
|
2043
|
+
},
|
|
1817
2044
|
{
|
|
1818
2045
|
"type": "object",
|
|
1819
2046
|
"properties": {
|
|
@@ -1832,7 +2059,7 @@
|
|
|
1832
2059
|
"description": "A rule added in a later version of the protocol. Clients that don't know it ignore it; the server still enforces it."
|
|
1833
2060
|
}
|
|
1834
2061
|
],
|
|
1835
|
-
"description": "A portable validation rule. `min` and `max` apply to numbers, and to the length of text and arrays. `accept` lists MIME types (`image/*`). `maxSize` is in bytes."
|
|
2062
|
+
"description": "A portable validation rule. `min` and `max` apply to numbers, and to the length of text and arrays. `accept` lists MIME types (`image/*`). `maxSize` is in bytes. `crop` checks the transform of each image of an `image` or `media` value (decision 0031)."
|
|
1836
2063
|
},
|
|
1837
2064
|
"BlockType": {
|
|
1838
2065
|
"type": "object",
|
|
@@ -1913,24 +2140,67 @@
|
|
|
1913
2140
|
}
|
|
1914
2141
|
},
|
|
1915
2142
|
"multiple": {
|
|
1916
|
-
"description": "`select`, `relation`, `media`, `file`: the value is an array.",
|
|
2143
|
+
"description": "`select`, `relation`, `media`, `image`, `file`: the value is an array.",
|
|
1917
2144
|
"type": "boolean"
|
|
1918
2145
|
},
|
|
1919
2146
|
"resource": {
|
|
1920
|
-
"description": "`relation`: id of the related resource. `media`: id of a resource of kind `media`,
|
|
1921
|
-
"
|
|
2147
|
+
"description": "`relation`: id of the related resource. `media`, `image`: id of a resource of kind `media`, or a list of them; without it, every library of the definition (decision 0027).",
|
|
2148
|
+
"anyOf": [
|
|
2149
|
+
{
|
|
2150
|
+
"type": "string",
|
|
2151
|
+
"minLength": 1
|
|
2152
|
+
},
|
|
2153
|
+
{
|
|
2154
|
+
"minItems": 1,
|
|
2155
|
+
"type": "array",
|
|
2156
|
+
"items": {
|
|
2157
|
+
"type": "string",
|
|
2158
|
+
"minLength": 1
|
|
2159
|
+
}
|
|
2160
|
+
}
|
|
2161
|
+
]
|
|
1922
2162
|
},
|
|
1923
2163
|
"accept": {
|
|
1924
|
-
"description": "`media`, `file`: accepted MIME types.",
|
|
2164
|
+
"description": "`media`, `image`, `file`: accepted MIME types. `image` defaults to `image/*`.",
|
|
1925
2165
|
"type": "array",
|
|
1926
2166
|
"items": {
|
|
1927
2167
|
"type": "string"
|
|
1928
2168
|
}
|
|
1929
2169
|
},
|
|
2170
|
+
"ratios": {
|
|
2171
|
+
"description": "`image`: ratios the editor suggests. The `crop` rule enforces ratios (decision 0031).",
|
|
2172
|
+
"type": "array",
|
|
2173
|
+
"items": {
|
|
2174
|
+
"type": "string",
|
|
2175
|
+
"pattern": "^[1-9][0-9]*:[1-9][0-9]*$",
|
|
2176
|
+
"description": "An aspect ratio, as `width:height`: `16:9`."
|
|
2177
|
+
}
|
|
2178
|
+
},
|
|
2179
|
+
"rotate": {
|
|
2180
|
+
"description": "`image`: whether the editor offers rotation and flips. Defaults to true.",
|
|
2181
|
+
"type": "boolean"
|
|
2182
|
+
},
|
|
2183
|
+
"focalPoint": {
|
|
2184
|
+
"description": "`image`: whether the editor offers the focal point. Defaults to true.",
|
|
2185
|
+
"type": "boolean"
|
|
2186
|
+
},
|
|
2187
|
+
"transformBase": {
|
|
2188
|
+
"description": "`image`: what a transform for one use starts from: the media's own transform (`media`, the default), the original file, or the user's choice in the editor (decision 0031).",
|
|
2189
|
+
"type": "string",
|
|
2190
|
+
"enum": [
|
|
2191
|
+
"media",
|
|
2192
|
+
"original",
|
|
2193
|
+
"choose"
|
|
2194
|
+
]
|
|
2195
|
+
},
|
|
1930
2196
|
"from": {
|
|
1931
2197
|
"description": "`slug`: the field the slug is generated from.",
|
|
1932
2198
|
"type": "string"
|
|
1933
2199
|
},
|
|
2200
|
+
"check": {
|
|
2201
|
+
"description": "The client checks the value with the backend as it is typed, with `POST /resources/{resource}/fields/{field}/check`: whether a `slug` is available, and its URL. A field at the top of the resource only.",
|
|
2202
|
+
"type": "boolean"
|
|
2203
|
+
},
|
|
1934
2204
|
"display": {
|
|
1935
2205
|
"description": "Display used in lists, when it differs from the default one of the type.",
|
|
1936
2206
|
"type": "string"
|
|
@@ -2336,7 +2606,7 @@
|
|
|
2336
2606
|
]
|
|
2337
2607
|
},
|
|
2338
2608
|
"search": {
|
|
2339
|
-
"description": "Whether the resource is in the global search.",
|
|
2609
|
+
"description": "Whether the resource is in the global search. Defaults to whether its list has a search (`list.search`).",
|
|
2340
2610
|
"type": "boolean"
|
|
2341
2611
|
}
|
|
2342
2612
|
},
|
|
@@ -2380,6 +2650,14 @@
|
|
|
2380
2650
|
"description": "The field used as the title of an item, in lists and pickers.",
|
|
2381
2651
|
"type": "string"
|
|
2382
2652
|
},
|
|
2653
|
+
"itemSubtitle": {
|
|
2654
|
+
"description": "The field shown under the title of an item, in search results, cards and pickers.",
|
|
2655
|
+
"type": "string"
|
|
2656
|
+
},
|
|
2657
|
+
"itemImage": {
|
|
2658
|
+
"description": "The field that holds the image of an item (a media or a URL), in search results, cards and pickers.",
|
|
2659
|
+
"type": "string"
|
|
2660
|
+
},
|
|
2383
2661
|
"fields": {
|
|
2384
2662
|
"type": "array",
|
|
2385
2663
|
"items": {
|
|
@@ -2453,6 +2731,10 @@
|
|
|
2453
2731
|
},
|
|
2454
2732
|
"abilities": {
|
|
2455
2733
|
"$ref": "#/components/schemas/Abilities"
|
|
2734
|
+
},
|
|
2735
|
+
"resource": {
|
|
2736
|
+
"description": "The resource of users: its item with this `id` is the profile of the user. Without it, clients look for a resource `users`.",
|
|
2737
|
+
"type": "string"
|
|
2456
2738
|
}
|
|
2457
2739
|
},
|
|
2458
2740
|
"required": [
|
|
@@ -3694,10 +3976,22 @@
|
|
|
3694
3976
|
"y"
|
|
3695
3977
|
],
|
|
3696
3978
|
"additionalProperties": {}
|
|
3979
|
+
},
|
|
3980
|
+
"base": {
|
|
3981
|
+
"description": "What a transform for one use starts from: the original file by default, or the media's own transform (`media`). With `media`, the crop and the focal point are relative to the media's version instead of the original (decision 0031).",
|
|
3982
|
+
"type": "string",
|
|
3983
|
+
"enum": [
|
|
3984
|
+
"media",
|
|
3985
|
+
"original"
|
|
3986
|
+
]
|
|
3987
|
+
},
|
|
3988
|
+
"baseTransform": {
|
|
3989
|
+
"description": "With `base: \"media\"`: the media's own transform this one was made on. When the media's transform is no longer the same, clients ask to check the crop, and renderers clamp it.",
|
|
3990
|
+
"$ref": "#/components/schemas/MediaTransform"
|
|
3697
3991
|
}
|
|
3698
3992
|
},
|
|
3699
3993
|
"additionalProperties": {},
|
|
3700
|
-
"description": "Non-destructive edits of an image, applied in this order: crop, then rotate, then flip."
|
|
3994
|
+
"description": "Non-destructive edits of an image, applied in this order: crop, then rotate, then flip. Renderers ignore the keys they don't know, which editor tools can add."
|
|
3701
3995
|
},
|
|
3702
3996
|
"StoredFile": {
|
|
3703
3997
|
"type": "object",
|
|
@@ -3866,6 +4160,82 @@
|
|
|
3866
4160
|
"additionalProperties": {},
|
|
3867
4161
|
"description": "A presigned request."
|
|
3868
4162
|
},
|
|
4163
|
+
"FieldCheckRequest": {
|
|
4164
|
+
"type": "object",
|
|
4165
|
+
"properties": {
|
|
4166
|
+
"value": {
|
|
4167
|
+
"type": "string",
|
|
4168
|
+
"description": "The value to check, as it is typed."
|
|
4169
|
+
},
|
|
4170
|
+
"locale": {
|
|
4171
|
+
"description": "The locale of the value, for a localized field.",
|
|
4172
|
+
"type": "string"
|
|
4173
|
+
},
|
|
4174
|
+
"id": {
|
|
4175
|
+
"description": "The item being edited, or null when creating one.",
|
|
4176
|
+
"anyOf": [
|
|
4177
|
+
{
|
|
4178
|
+
"$ref": "#/components/schemas/Id"
|
|
4179
|
+
},
|
|
4180
|
+
{
|
|
4181
|
+
"type": "null"
|
|
4182
|
+
}
|
|
4183
|
+
]
|
|
4184
|
+
},
|
|
4185
|
+
"values": {
|
|
4186
|
+
"description": "The form's current values, as they would be sent to save, for what the check depends on (a page's parent).",
|
|
4187
|
+
"type": "object",
|
|
4188
|
+
"propertyNames": {
|
|
4189
|
+
"type": "string"
|
|
4190
|
+
},
|
|
4191
|
+
"additionalProperties": {}
|
|
4192
|
+
}
|
|
4193
|
+
},
|
|
4194
|
+
"required": [
|
|
4195
|
+
"value"
|
|
4196
|
+
],
|
|
4197
|
+
"additionalProperties": {},
|
|
4198
|
+
"description": "A value of a field with `check`, to check with the backend."
|
|
4199
|
+
},
|
|
4200
|
+
"FieldCheckResponse": {
|
|
4201
|
+
"type": "object",
|
|
4202
|
+
"properties": {
|
|
4203
|
+
"available": {
|
|
4204
|
+
"type": "boolean",
|
|
4205
|
+
"description": "Whether no other item of the resource, in its scope and the same locale, has the value."
|
|
4206
|
+
},
|
|
4207
|
+
"suggestion": {
|
|
4208
|
+
"description": "An available value close to the one checked, when it is taken.",
|
|
4209
|
+
"type": [
|
|
4210
|
+
"string",
|
|
4211
|
+
"null"
|
|
4212
|
+
]
|
|
4213
|
+
},
|
|
4214
|
+
"prefix": {
|
|
4215
|
+
"description": "What the field shows in front of the value: the start of its URL.",
|
|
4216
|
+
"type": [
|
|
4217
|
+
"string",
|
|
4218
|
+
"null"
|
|
4219
|
+
]
|
|
4220
|
+
},
|
|
4221
|
+
"url": {
|
|
4222
|
+
"description": "The URL the value gives the item, which the field links to.",
|
|
4223
|
+
"type": [
|
|
4224
|
+
"string",
|
|
4225
|
+
"null"
|
|
4226
|
+
]
|
|
4227
|
+
},
|
|
4228
|
+
"disabled": {
|
|
4229
|
+
"description": "The field doesn't apply to this item (the home page has no slug): the field is read-only.",
|
|
4230
|
+
"type": "boolean"
|
|
4231
|
+
}
|
|
4232
|
+
},
|
|
4233
|
+
"required": [
|
|
4234
|
+
"available"
|
|
4235
|
+
],
|
|
4236
|
+
"additionalProperties": {},
|
|
4237
|
+
"description": "What the backend says about a value: not authoritative, since saving still validates it."
|
|
4238
|
+
},
|
|
3869
4239
|
"MediaInfo": {
|
|
3870
4240
|
"type": "object",
|
|
3871
4241
|
"properties": {
|
|
@@ -3958,12 +4328,48 @@
|
|
|
3958
4328
|
"failed"
|
|
3959
4329
|
]
|
|
3960
4330
|
},
|
|
4331
|
+
"error": {
|
|
4332
|
+
"description": "Why the processing failed, when `status` is `failed`, so that editors see it without the backend's monitoring.",
|
|
4333
|
+
"anyOf": [
|
|
4334
|
+
{
|
|
4335
|
+
"type": "object",
|
|
4336
|
+
"properties": {
|
|
4337
|
+
"code": {
|
|
4338
|
+
"type": "string",
|
|
4339
|
+
"description": "The code of the step that failed, such as a transcoder task code (`timeout`, `input_unreadable`)."
|
|
4340
|
+
},
|
|
4341
|
+
"message": {
|
|
4342
|
+
"description": "Why it failed, for people.",
|
|
4343
|
+
"type": "string"
|
|
4344
|
+
}
|
|
4345
|
+
},
|
|
4346
|
+
"required": [
|
|
4347
|
+
"code"
|
|
4348
|
+
],
|
|
4349
|
+
"additionalProperties": {}
|
|
4350
|
+
},
|
|
4351
|
+
{
|
|
4352
|
+
"type": "null"
|
|
4353
|
+
}
|
|
4354
|
+
]
|
|
4355
|
+
},
|
|
3961
4356
|
"metadata": {
|
|
3962
4357
|
"type": "object",
|
|
3963
4358
|
"propertyNames": {
|
|
3964
4359
|
"type": "string"
|
|
3965
4360
|
},
|
|
3966
4361
|
"additionalProperties": {}
|
|
4362
|
+
},
|
|
4363
|
+
"transform": {
|
|
4364
|
+
"description": "The media's own transform, from its library, which clients need to draw a transform for one use made over it (decision 0031).",
|
|
4365
|
+
"anyOf": [
|
|
4366
|
+
{
|
|
4367
|
+
"$ref": "#/components/schemas/MediaTransform"
|
|
4368
|
+
},
|
|
4369
|
+
{
|
|
4370
|
+
"type": "null"
|
|
4371
|
+
}
|
|
4372
|
+
]
|
|
3967
4373
|
}
|
|
3968
4374
|
},
|
|
3969
4375
|
"required": [
|
|
@@ -4007,6 +4413,10 @@
|
|
|
4007
4413
|
"id": {
|
|
4008
4414
|
"$ref": "#/components/schemas/Id"
|
|
4009
4415
|
},
|
|
4416
|
+
"resource": {
|
|
4417
|
+
"description": "The library of the media. Required for a field that allows several libraries, since ids are unique only within their resource (decision 0027).",
|
|
4418
|
+
"type": "string"
|
|
4419
|
+
},
|
|
4010
4420
|
"label": {
|
|
4011
4421
|
"description": "The `itemTitle` of the media.",
|
|
4012
4422
|
"type": "string"
|
|
@@ -4015,7 +4425,7 @@
|
|
|
4015
4425
|
"$ref": "#/components/schemas/MediaInfo"
|
|
4016
4426
|
},
|
|
4017
4427
|
"transform": {
|
|
4018
|
-
"description": "The edits of the image for this use only, over
|
|
4428
|
+
"description": "The edits of the image for this use only: from the original file, or over the media's own transform with `base: \"media\"`.",
|
|
4019
4429
|
"anyOf": [
|
|
4020
4430
|
{
|
|
4021
4431
|
"$ref": "#/components/schemas/MediaTransform"
|
|
@@ -4030,7 +4440,7 @@
|
|
|
4030
4440
|
"id"
|
|
4031
4441
|
],
|
|
4032
4442
|
"additionalProperties": {},
|
|
4033
|
-
"description": "The value of a `media` field in items: the media, with what lists and fields show, and its edits for this use. Requests send the id, or `{ id, transform }
|
|
4443
|
+
"description": "The value of a `media` or `image` field in items: the media, with what lists and fields show, and its edits for this use. Requests send the id, or `{ id, resource, transform }`: `resource` is required when the field allows several libraries."
|
|
4034
4444
|
},
|
|
4035
4445
|
"Session": {
|
|
4036
4446
|
"type": "object",
|
|
@@ -4053,7 +4463,8 @@
|
|
|
4053
4463
|
"type": "object",
|
|
4054
4464
|
"properties": {
|
|
4055
4465
|
"resource": {
|
|
4056
|
-
"type": "string"
|
|
4466
|
+
"type": "string",
|
|
4467
|
+
"description": "The id of the resource."
|
|
4057
4468
|
},
|
|
4058
4469
|
"items": {
|
|
4059
4470
|
"type": "array",
|
|
@@ -4062,6 +4473,7 @@
|
|
|
4062
4473
|
}
|
|
4063
4474
|
},
|
|
4064
4475
|
"total": {
|
|
4476
|
+
"description": "How many items of the resource match, when the backend counts them: the list of the resource, searched, shows them all.",
|
|
4065
4477
|
"type": "integer",
|
|
4066
4478
|
"minimum": 0,
|
|
4067
4479
|
"maximum": 9007199254740991
|
|
@@ -4078,7 +4490,8 @@
|
|
|
4078
4490
|
"required": [
|
|
4079
4491
|
"data"
|
|
4080
4492
|
],
|
|
4081
|
-
"additionalProperties": {}
|
|
4493
|
+
"additionalProperties": {},
|
|
4494
|
+
"description": "The results of the global search: the resources with results, in the order of the definition."
|
|
4082
4495
|
},
|
|
4083
4496
|
"PreviewResponse": {
|
|
4084
4497
|
"type": "object",
|
|
@@ -4094,6 +4507,86 @@
|
|
|
4094
4507
|
"url"
|
|
4095
4508
|
],
|
|
4096
4509
|
"additionalProperties": {}
|
|
4510
|
+
},
|
|
4511
|
+
"EmbedValue": {
|
|
4512
|
+
"type": "object",
|
|
4513
|
+
"properties": {
|
|
4514
|
+
"url": {
|
|
4515
|
+
"type": "string",
|
|
4516
|
+
"description": "The URL of the video, sound or post."
|
|
4517
|
+
},
|
|
4518
|
+
"type": {
|
|
4519
|
+
"type": "string",
|
|
4520
|
+
"enum": [
|
|
4521
|
+
"video",
|
|
4522
|
+
"audio",
|
|
4523
|
+
"photo",
|
|
4524
|
+
"rich",
|
|
4525
|
+
"link"
|
|
4526
|
+
]
|
|
4527
|
+
},
|
|
4528
|
+
"title": {
|
|
4529
|
+
"type": "string"
|
|
4530
|
+
},
|
|
4531
|
+
"provider": {
|
|
4532
|
+
"description": "The name of the provider.",
|
|
4533
|
+
"type": "string"
|
|
4534
|
+
},
|
|
4535
|
+
"thumbnailUrl": {
|
|
4536
|
+
"type": "string"
|
|
4537
|
+
},
|
|
4538
|
+
"html": {
|
|
4539
|
+
"description": "The HTML that embeds it, from the oEmbed of its provider.",
|
|
4540
|
+
"type": "string"
|
|
4541
|
+
},
|
|
4542
|
+
"width": {
|
|
4543
|
+
"type": "number"
|
|
4544
|
+
},
|
|
4545
|
+
"height": {
|
|
4546
|
+
"type": "number"
|
|
4547
|
+
}
|
|
4548
|
+
},
|
|
4549
|
+
"required": [
|
|
4550
|
+
"url"
|
|
4551
|
+
],
|
|
4552
|
+
"additionalProperties": {},
|
|
4553
|
+
"description": "The value of an `embed` field: its URL, and what the backend got from its oEmbed."
|
|
4554
|
+
},
|
|
4555
|
+
"EmbedResponse": {
|
|
4556
|
+
"type": "object",
|
|
4557
|
+
"properties": {
|
|
4558
|
+
"data": {
|
|
4559
|
+
"$ref": "#/components/schemas/EmbedValue"
|
|
4560
|
+
}
|
|
4561
|
+
},
|
|
4562
|
+
"required": [
|
|
4563
|
+
"data"
|
|
4564
|
+
],
|
|
4565
|
+
"additionalProperties": {}
|
|
4566
|
+
},
|
|
4567
|
+
"LocationValue": {
|
|
4568
|
+
"type": "object",
|
|
4569
|
+
"properties": {
|
|
4570
|
+
"lat": {
|
|
4571
|
+
"type": "number",
|
|
4572
|
+
"minimum": -90,
|
|
4573
|
+
"maximum": 90
|
|
4574
|
+
},
|
|
4575
|
+
"lng": {
|
|
4576
|
+
"type": "number",
|
|
4577
|
+
"minimum": -180,
|
|
4578
|
+
"maximum": 180
|
|
4579
|
+
},
|
|
4580
|
+
"address": {
|
|
4581
|
+
"type": "string"
|
|
4582
|
+
}
|
|
4583
|
+
},
|
|
4584
|
+
"required": [
|
|
4585
|
+
"lat",
|
|
4586
|
+
"lng"
|
|
4587
|
+
],
|
|
4588
|
+
"additionalProperties": {},
|
|
4589
|
+
"description": "The value of a `location` field: a point, and its address."
|
|
4097
4590
|
}
|
|
4098
4591
|
}
|
|
4099
4592
|
}
|