@communecter/cocolight-api-client 1.0.2 → 1.0.4
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/cocolight-api-client.browser.js +6 -6
- package/dist/cocolight-api-client.cjs +1 -1
- package/dist/cocolight-api-client.mjs.js +1 -1
- package/package.json +1 -1
- package/src/ApiClient.js +109 -20
- package/src/endpoints.module.js +1312 -187
package/src/endpoints.module.js
CHANGED
|
@@ -231,31 +231,43 @@ export default {
|
|
|
231
231
|
"contentType": "application/json",
|
|
232
232
|
"responses": {
|
|
233
233
|
"200": {
|
|
234
|
-
"
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
234
|
+
"$defs": {
|
|
235
|
+
"dateObject": {
|
|
236
|
+
"description": "Peut être un objet { sec, usec } ou un timestamp entier (sec)",
|
|
237
|
+
"oneOf": [
|
|
238
|
+
{
|
|
239
|
+
"type": "object",
|
|
240
|
+
"required": ["sec", "usec"],
|
|
241
|
+
"properties": {
|
|
242
|
+
"sec": { "type": "number" },
|
|
243
|
+
"usec": { "type": "number" }
|
|
244
|
+
},
|
|
245
|
+
"additionalProperties": false
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
"type": "integer"
|
|
249
|
+
}
|
|
250
|
+
]
|
|
251
|
+
},
|
|
252
|
+
"_idObject": {
|
|
238
253
|
"type": "object",
|
|
239
254
|
"properties": {
|
|
240
|
-
"$id": { "type": "string" }
|
|
255
|
+
"$id": { "type": "string", "pattern": "^[a-f0-9]{24}$" }
|
|
241
256
|
},
|
|
242
257
|
"required": ["$id"],
|
|
243
258
|
"additionalProperties": false
|
|
244
|
-
}
|
|
259
|
+
}
|
|
260
|
+
},
|
|
261
|
+
"type": "object",
|
|
262
|
+
"description": "Schéma JSON pour les informations détaillées d'un utilisateur.",
|
|
263
|
+
"properties": {
|
|
264
|
+
"_id": { "$ref": "#/$defs/_idObject" },
|
|
245
265
|
"username": { "type": "string" },
|
|
246
266
|
"email": { "type": "string", "format": "email" },
|
|
247
267
|
"name": { "type": "string" },
|
|
248
268
|
"slug": { "type": "string" },
|
|
249
269
|
"collection": { "type": "string" },
|
|
250
|
-
"modified": {
|
|
251
|
-
"type": "object",
|
|
252
|
-
"properties": {
|
|
253
|
-
"sec": { "type": "integer" },
|
|
254
|
-
"usec": { "type": "integer" }
|
|
255
|
-
},
|
|
256
|
-
"required": ["sec", "usec"],
|
|
257
|
-
"additionalProperties": false
|
|
258
|
-
},
|
|
270
|
+
"modified": { "$ref": "#/$defs/dateObject" },
|
|
259
271
|
"roles": {
|
|
260
272
|
"type": "object",
|
|
261
273
|
"properties": {
|
|
@@ -1876,33 +1888,46 @@ export default {
|
|
|
1876
1888
|
},
|
|
1877
1889
|
"responses": {
|
|
1878
1890
|
"200": {
|
|
1879
|
-
"
|
|
1880
|
-
{
|
|
1881
|
-
"
|
|
1882
|
-
"
|
|
1883
|
-
|
|
1884
|
-
"_id": {
|
|
1891
|
+
"$defs": {
|
|
1892
|
+
"dateObject": {
|
|
1893
|
+
"description": "Peut être un objet { sec, usec } ou un timestamp entier (sec)",
|
|
1894
|
+
"oneOf": [
|
|
1895
|
+
{
|
|
1885
1896
|
"type": "object",
|
|
1897
|
+
"required": ["sec", "usec"],
|
|
1886
1898
|
"properties": {
|
|
1887
|
-
"
|
|
1899
|
+
"sec": { "type": "number" },
|
|
1900
|
+
"usec": { "type": "number" }
|
|
1888
1901
|
},
|
|
1889
|
-
"required": ["$id"],
|
|
1890
1902
|
"additionalProperties": false
|
|
1891
1903
|
},
|
|
1904
|
+
{
|
|
1905
|
+
"type": "integer"
|
|
1906
|
+
}
|
|
1907
|
+
]
|
|
1908
|
+
},
|
|
1909
|
+
"_idObject": {
|
|
1910
|
+
"type": "object",
|
|
1911
|
+
"properties": {
|
|
1912
|
+
"$id": { "type": "string", "pattern": "^[a-f0-9]{24}$" }
|
|
1913
|
+
},
|
|
1914
|
+
"required": ["$id"],
|
|
1915
|
+
"additionalProperties": false
|
|
1916
|
+
}
|
|
1917
|
+
},
|
|
1918
|
+
"oneOf": [
|
|
1919
|
+
{
|
|
1920
|
+
"type": "object",
|
|
1921
|
+
"description": "Schéma JSON pour les informations détaillées d'un utilisateur.",
|
|
1922
|
+
"properties": {
|
|
1923
|
+
"_id": { "$ref": "#/$defs/_idObject" },
|
|
1892
1924
|
"username": { "type": "string" },
|
|
1893
1925
|
"email": { "type": "string", "format": "email" },
|
|
1894
1926
|
"name": { "type": "string" },
|
|
1895
1927
|
"slug": { "type": "string" },
|
|
1896
1928
|
"collection": { "type": "string", "enum": ["citoyens"] },
|
|
1897
|
-
"modified": {
|
|
1898
|
-
|
|
1899
|
-
"properties": {
|
|
1900
|
-
"sec": { "type": "integer" },
|
|
1901
|
-
"usec": { "type": "integer" }
|
|
1902
|
-
},
|
|
1903
|
-
"required": ["sec", "usec"],
|
|
1904
|
-
"additionalProperties": false
|
|
1905
|
-
},
|
|
1929
|
+
"modified": { "$ref": "#/$defs/dateObject" },
|
|
1930
|
+
"created": { "$ref": "#/$defs/dateObject" },
|
|
1906
1931
|
"roles": {
|
|
1907
1932
|
"type": "object",
|
|
1908
1933
|
"properties": {
|
|
@@ -2008,29 +2033,14 @@ export default {
|
|
|
2008
2033
|
"description": "Schéma JSON pour les informations détaillées d'un projet",
|
|
2009
2034
|
"type": "object",
|
|
2010
2035
|
"properties": {
|
|
2011
|
-
"_id": {
|
|
2012
|
-
"type": "object",
|
|
2013
|
-
"properties": {
|
|
2014
|
-
"$id": { "type": "string" }
|
|
2015
|
-
},
|
|
2016
|
-
"required": ["$id"],
|
|
2017
|
-
"additionalProperties": false
|
|
2018
|
-
},
|
|
2036
|
+
"_id": { "$ref": "#/$defs/_idObject" },
|
|
2019
2037
|
"collection": {
|
|
2020
2038
|
"type": "string",
|
|
2021
2039
|
"enum": ["projects"]
|
|
2022
2040
|
},
|
|
2023
|
-
"created": { "
|
|
2041
|
+
"created": { "$ref": "#/$defs/dateObject" },
|
|
2024
2042
|
"creator": { "type": "string" },
|
|
2025
|
-
"modified": {
|
|
2026
|
-
"type": "object",
|
|
2027
|
-
"properties": {
|
|
2028
|
-
"sec": { "type": "integer" },
|
|
2029
|
-
"usec": { "type": "integer" }
|
|
2030
|
-
},
|
|
2031
|
-
"required": ["sec", "usec"],
|
|
2032
|
-
"additionalProperties": false
|
|
2033
|
-
},
|
|
2043
|
+
"modified": { "$ref": "#/$defs/dateObject" },
|
|
2034
2044
|
"name": { "type": "string" },
|
|
2035
2045
|
"parent": {
|
|
2036
2046
|
"type": "object",
|
|
@@ -2040,14 +2050,7 @@ export default {
|
|
|
2040
2050
|
"properties": {
|
|
2041
2051
|
"type": { "type": "string" },
|
|
2042
2052
|
"name": { "type": "string" },
|
|
2043
|
-
"_id": {
|
|
2044
|
-
"type": "object",
|
|
2045
|
-
"properties": {
|
|
2046
|
-
"$id": { "type": "string" }
|
|
2047
|
-
},
|
|
2048
|
-
"required": ["$id"],
|
|
2049
|
-
"additionalProperties": false
|
|
2050
|
-
},
|
|
2053
|
+
"_id": { "$ref": "#/$defs/_idObject" },
|
|
2051
2054
|
"slug": { "type": "string" },
|
|
2052
2055
|
"profilThumbImageUrl": { "type": "string" }
|
|
2053
2056
|
},
|
|
@@ -2088,7 +2091,7 @@ export default {
|
|
|
2088
2091
|
"required": ["isOpenData", "isOpenEdition"]
|
|
2089
2092
|
},
|
|
2090
2093
|
"slug": { "type": "string" },
|
|
2091
|
-
"updated": { "
|
|
2094
|
+
"updated": { "$ref": "#/$defs/dateObject" },
|
|
2092
2095
|
"links": {
|
|
2093
2096
|
"type": "object",
|
|
2094
2097
|
"$comment": "Ce schéma n'est pas encore complet"
|
|
@@ -2139,29 +2142,14 @@ export default {
|
|
|
2139
2142
|
"description": "Schéma JSON pour les informations détaillées d'une organisation",
|
|
2140
2143
|
"type": "object",
|
|
2141
2144
|
"properties": {
|
|
2142
|
-
"_id": {
|
|
2143
|
-
"type": "object",
|
|
2144
|
-
"properties": {
|
|
2145
|
-
"$id": { "type": "string" }
|
|
2146
|
-
},
|
|
2147
|
-
"required": ["$id"],
|
|
2148
|
-
"additionalProperties": false
|
|
2149
|
-
},
|
|
2145
|
+
"_id": { "$ref": "#/$defs/_idObject" },
|
|
2150
2146
|
"collection": {
|
|
2151
2147
|
"type": "string",
|
|
2152
2148
|
"enum": ["organizations"]
|
|
2153
2149
|
},
|
|
2154
|
-
"created": { "
|
|
2150
|
+
"created": { "$ref": "#/$defs/dateObject" },
|
|
2155
2151
|
"creator": { "type": "string" },
|
|
2156
|
-
"modified": {
|
|
2157
|
-
"type": "object",
|
|
2158
|
-
"properties": {
|
|
2159
|
-
"sec": { "type": "integer" },
|
|
2160
|
-
"usec": { "type": "integer" }
|
|
2161
|
-
},
|
|
2162
|
-
"required": ["sec", "usec"],
|
|
2163
|
-
"additionalProperties": false
|
|
2164
|
-
},
|
|
2152
|
+
"modified": { "$ref": "#/$defs/dateObject" },
|
|
2165
2153
|
"name": { "type": "string" },
|
|
2166
2154
|
"preferences": {
|
|
2167
2155
|
"type": "object",
|
|
@@ -2183,7 +2171,7 @@ export default {
|
|
|
2183
2171
|
},
|
|
2184
2172
|
"slug": { "type": "string" },
|
|
2185
2173
|
"type": { "type": "string" },
|
|
2186
|
-
"updated": { "
|
|
2174
|
+
"updated": { "$ref": "#/$defs/dateObject" },
|
|
2187
2175
|
"links": {
|
|
2188
2176
|
"type": "object",
|
|
2189
2177
|
"$comment": "Ce schéma n'est pas encore complet"
|
|
@@ -2309,6 +2297,16 @@ export default {
|
|
|
2309
2297
|
},
|
|
2310
2298
|
"responses": {
|
|
2311
2299
|
"200": {
|
|
2300
|
+
"$defs": {
|
|
2301
|
+
"_idObject": {
|
|
2302
|
+
"type": "object",
|
|
2303
|
+
"properties": {
|
|
2304
|
+
"$id": { "type": "string", "pattern": "^[a-f0-9]{24}$" }
|
|
2305
|
+
},
|
|
2306
|
+
"required": ["$id"],
|
|
2307
|
+
"additionalProperties": false
|
|
2308
|
+
}
|
|
2309
|
+
},
|
|
2312
2310
|
"oneOf": [
|
|
2313
2311
|
{
|
|
2314
2312
|
"type": "object",
|
|
@@ -2325,14 +2323,7 @@ export default {
|
|
|
2325
2323
|
"newElement": {
|
|
2326
2324
|
"type": "object",
|
|
2327
2325
|
"properties": {
|
|
2328
|
-
"_id": {
|
|
2329
|
-
"type": "object",
|
|
2330
|
-
"properties": {
|
|
2331
|
-
"$id": { "type": "string" }
|
|
2332
|
-
},
|
|
2333
|
-
"required": ["$id"],
|
|
2334
|
-
"additionalProperties": false
|
|
2335
|
-
},
|
|
2326
|
+
"_id": { "$ref": "#/$defs/_idObject" },
|
|
2336
2327
|
"name": { "type": "string" },
|
|
2337
2328
|
"profilThumbImageUrl": { "type": "string" },
|
|
2338
2329
|
"id": { "type": "string" },
|
|
@@ -2462,14 +2453,7 @@ export default {
|
|
|
2462
2453
|
"NewsSchema": {
|
|
2463
2454
|
"type": "object",
|
|
2464
2455
|
"properties": {
|
|
2465
|
-
"_id": {
|
|
2466
|
-
"type": "object",
|
|
2467
|
-
"properties": {
|
|
2468
|
-
"$id": { "type": "string" }
|
|
2469
|
-
},
|
|
2470
|
-
"required": ["$id"],
|
|
2471
|
-
"additionalProperties": false
|
|
2472
|
-
},
|
|
2456
|
+
"_id": { "$ref": "#/$defs/_idObject" },
|
|
2473
2457
|
"type": {
|
|
2474
2458
|
"type": "string",
|
|
2475
2459
|
"const": "news"
|
|
@@ -2593,12 +2577,28 @@ export default {
|
|
|
2593
2577
|
"additionalProperties": true
|
|
2594
2578
|
},
|
|
2595
2579
|
"dateObject": {
|
|
2580
|
+
"description": "Peut être un objet { sec, usec } ou un timestamp entier (sec)",
|
|
2581
|
+
"oneOf": [
|
|
2582
|
+
{
|
|
2583
|
+
"type": "object",
|
|
2584
|
+
"required": ["sec", "usec"],
|
|
2585
|
+
"properties": {
|
|
2586
|
+
"sec": { "type": "number" },
|
|
2587
|
+
"usec": { "type": "number" }
|
|
2588
|
+
},
|
|
2589
|
+
"additionalProperties": false
|
|
2590
|
+
},
|
|
2591
|
+
{
|
|
2592
|
+
"type": "integer"
|
|
2593
|
+
}
|
|
2594
|
+
]
|
|
2595
|
+
},
|
|
2596
|
+
"_idObject": {
|
|
2596
2597
|
"type": "object",
|
|
2597
2598
|
"properties": {
|
|
2598
|
-
"
|
|
2599
|
-
"usec": { "type": "number" }
|
|
2599
|
+
"$id": { "type": "string", "pattern": "^[a-f0-9]{24}$" }
|
|
2600
2600
|
},
|
|
2601
|
-
"required": ["
|
|
2601
|
+
"required": ["$id"],
|
|
2602
2602
|
"additionalProperties": false
|
|
2603
2603
|
},
|
|
2604
2604
|
"user": {
|
|
@@ -2728,14 +2728,7 @@ export default {
|
|
|
2728
2728
|
"NewsSchema": {
|
|
2729
2729
|
"type": "object",
|
|
2730
2730
|
"properties": {
|
|
2731
|
-
"_id": {
|
|
2732
|
-
"type": "object",
|
|
2733
|
-
"properties": {
|
|
2734
|
-
"$id": { "type": "string" }
|
|
2735
|
-
},
|
|
2736
|
-
"required": ["$id"],
|
|
2737
|
-
"additionalProperties": false
|
|
2738
|
-
},
|
|
2731
|
+
"_id": { "$ref": "#/$defs/_idObject" },
|
|
2739
2732
|
"type": {
|
|
2740
2733
|
"type": "string",
|
|
2741
2734
|
"const": "news"
|
|
@@ -2859,12 +2852,28 @@ export default {
|
|
|
2859
2852
|
"additionalProperties": true
|
|
2860
2853
|
},
|
|
2861
2854
|
"dateObject": {
|
|
2855
|
+
"description": "Peut être un objet { sec, usec } ou un timestamp entier (sec)",
|
|
2856
|
+
"oneOf": [
|
|
2857
|
+
{
|
|
2858
|
+
"type": "object",
|
|
2859
|
+
"required": ["sec", "usec"],
|
|
2860
|
+
"properties": {
|
|
2861
|
+
"sec": { "type": "number" },
|
|
2862
|
+
"usec": { "type": "number" }
|
|
2863
|
+
},
|
|
2864
|
+
"additionalProperties": false
|
|
2865
|
+
},
|
|
2866
|
+
{
|
|
2867
|
+
"type": "integer"
|
|
2868
|
+
}
|
|
2869
|
+
]
|
|
2870
|
+
},
|
|
2871
|
+
"_idObject": {
|
|
2862
2872
|
"type": "object",
|
|
2863
2873
|
"properties": {
|
|
2864
|
-
"
|
|
2865
|
-
"usec": { "type": "number" }
|
|
2874
|
+
"$id": { "type": "string", "pattern": "^[a-f0-9]{24}$" }
|
|
2866
2875
|
},
|
|
2867
|
-
"required": ["
|
|
2876
|
+
"required": ["$id"],
|
|
2868
2877
|
"additionalProperties": false
|
|
2869
2878
|
},
|
|
2870
2879
|
"user": {
|
|
@@ -3055,14 +3064,7 @@ export default {
|
|
|
3055
3064
|
"NewsSchema": {
|
|
3056
3065
|
"type": "object",
|
|
3057
3066
|
"properties": {
|
|
3058
|
-
"_id": {
|
|
3059
|
-
"type": "object",
|
|
3060
|
-
"properties": {
|
|
3061
|
-
"$id": { "type": "string" }
|
|
3062
|
-
},
|
|
3063
|
-
"required": ["$id"],
|
|
3064
|
-
"additionalProperties": false
|
|
3065
|
-
},
|
|
3067
|
+
"_id": { "$ref": "#/$defs/_idObject" },
|
|
3066
3068
|
"type": {
|
|
3067
3069
|
"type": "string",
|
|
3068
3070
|
"const": "news"
|
|
@@ -3186,12 +3188,28 @@ export default {
|
|
|
3186
3188
|
"additionalProperties": true
|
|
3187
3189
|
},
|
|
3188
3190
|
"dateObject": {
|
|
3191
|
+
"description": "Peut être un objet { sec, usec } ou un timestamp entier (sec)",
|
|
3192
|
+
"oneOf": [
|
|
3193
|
+
{
|
|
3194
|
+
"type": "object",
|
|
3195
|
+
"required": ["sec", "usec"],
|
|
3196
|
+
"properties": {
|
|
3197
|
+
"sec": { "type": "number" },
|
|
3198
|
+
"usec": { "type": "number" }
|
|
3199
|
+
},
|
|
3200
|
+
"additionalProperties": false
|
|
3201
|
+
},
|
|
3202
|
+
{
|
|
3203
|
+
"type": "integer"
|
|
3204
|
+
}
|
|
3205
|
+
]
|
|
3206
|
+
},
|
|
3207
|
+
"_idObject": {
|
|
3189
3208
|
"type": "object",
|
|
3190
3209
|
"properties": {
|
|
3191
|
-
"
|
|
3192
|
-
"usec": { "type": "number" }
|
|
3210
|
+
"$id": { "type": "string", "pattern": "^[a-f0-9]{24}$" }
|
|
3193
3211
|
},
|
|
3194
|
-
"required": ["
|
|
3212
|
+
"required": ["$id"],
|
|
3195
3213
|
"additionalProperties": false
|
|
3196
3214
|
},
|
|
3197
3215
|
"user": {
|
|
@@ -3761,14 +3779,7 @@ export default {
|
|
|
3761
3779
|
"NewsSchema": {
|
|
3762
3780
|
"type": "object",
|
|
3763
3781
|
"properties": {
|
|
3764
|
-
"_id": {
|
|
3765
|
-
"type": "object",
|
|
3766
|
-
"properties": {
|
|
3767
|
-
"$id": { "type": "string" }
|
|
3768
|
-
},
|
|
3769
|
-
"required": ["$id"],
|
|
3770
|
-
"additionalProperties": false
|
|
3771
|
-
},
|
|
3782
|
+
"_id": { "$ref": "#/$defs/_idObject" },
|
|
3772
3783
|
"type": {
|
|
3773
3784
|
"type": "string",
|
|
3774
3785
|
"const": "news"
|
|
@@ -3892,12 +3903,28 @@ export default {
|
|
|
3892
3903
|
"additionalProperties": true
|
|
3893
3904
|
},
|
|
3894
3905
|
"dateObject": {
|
|
3906
|
+
"description": "Peut être un objet { sec, usec } ou un timestamp entier (sec)",
|
|
3907
|
+
"oneOf": [
|
|
3908
|
+
{
|
|
3909
|
+
"type": "object",
|
|
3910
|
+
"required": ["sec", "usec"],
|
|
3911
|
+
"properties": {
|
|
3912
|
+
"sec": { "type": "number" },
|
|
3913
|
+
"usec": { "type": "number" }
|
|
3914
|
+
},
|
|
3915
|
+
"additionalProperties": false
|
|
3916
|
+
},
|
|
3917
|
+
{
|
|
3918
|
+
"type": "integer"
|
|
3919
|
+
}
|
|
3920
|
+
]
|
|
3921
|
+
},
|
|
3922
|
+
"_idObject": {
|
|
3895
3923
|
"type": "object",
|
|
3896
3924
|
"properties": {
|
|
3897
|
-
"
|
|
3898
|
-
"usec": { "type": "number" }
|
|
3925
|
+
"$id": { "type": "string", "pattern": "^[a-f0-9]{24}$" }
|
|
3899
3926
|
},
|
|
3900
|
-
"required": ["
|
|
3927
|
+
"required": ["$id"],
|
|
3901
3928
|
"additionalProperties": false
|
|
3902
3929
|
},
|
|
3903
3930
|
"user": {
|
|
@@ -4075,12 +4102,28 @@ export default {
|
|
|
4075
4102
|
]
|
|
4076
4103
|
},
|
|
4077
4104
|
"dateObject": {
|
|
4105
|
+
"description": "Peut être un objet { sec, usec } ou un timestamp entier (sec)",
|
|
4106
|
+
"oneOf": [
|
|
4107
|
+
{
|
|
4108
|
+
"type": "object",
|
|
4109
|
+
"required": ["sec", "usec"],
|
|
4110
|
+
"properties": {
|
|
4111
|
+
"sec": { "type": "number" },
|
|
4112
|
+
"usec": { "type": "number" }
|
|
4113
|
+
},
|
|
4114
|
+
"additionalProperties": false
|
|
4115
|
+
},
|
|
4116
|
+
{
|
|
4117
|
+
"type": "integer"
|
|
4118
|
+
}
|
|
4119
|
+
]
|
|
4120
|
+
},
|
|
4121
|
+
"_idObject": {
|
|
4078
4122
|
"type": "object",
|
|
4079
4123
|
"properties": {
|
|
4080
|
-
"
|
|
4081
|
-
"usec": { "type": "number" }
|
|
4124
|
+
"$id": { "type": "string", "pattern": "^[a-f0-9]{24}$" }
|
|
4082
4125
|
},
|
|
4083
|
-
"required": ["
|
|
4126
|
+
"required": ["$id"],
|
|
4084
4127
|
"additionalProperties": false
|
|
4085
4128
|
}
|
|
4086
4129
|
},
|
|
@@ -4100,13 +4143,7 @@ export default {
|
|
|
4100
4143
|
"type": "object",
|
|
4101
4144
|
"required": ["_id", "type", "verb", "target", "author", "object", "scope", "created", "sharedBy", "collection", "icon", "updated", "typeSig", "lastAuthorShare"],
|
|
4102
4145
|
"properties": {
|
|
4103
|
-
"_id": {
|
|
4104
|
-
"type": "object",
|
|
4105
|
-
"required": ["$id"],
|
|
4106
|
-
"properties": {
|
|
4107
|
-
"$id": { "type": "string" }
|
|
4108
|
-
}
|
|
4109
|
-
},
|
|
4146
|
+
"_id": { "$ref": "#/$defs/_idObject" },
|
|
4110
4147
|
"type": { "type": "string", "const": "activityStream" },
|
|
4111
4148
|
"verb": { "type": "string", "const": "share" },
|
|
4112
4149
|
"target": { "$ref": "#/$defs/user" },
|
|
@@ -4119,13 +4156,7 @@ export default {
|
|
|
4119
4156
|
"type": { "type": "string", "const": "news" },
|
|
4120
4157
|
"authorName": { "type": "string" },
|
|
4121
4158
|
"authorId": { "type": "string" },
|
|
4122
|
-
"_id": {
|
|
4123
|
-
"type": "object",
|
|
4124
|
-
"required": ["$id"],
|
|
4125
|
-
"properties": {
|
|
4126
|
-
"$id": { "type": "string" }
|
|
4127
|
-
}
|
|
4128
|
-
},
|
|
4159
|
+
"_id": { "$ref": "#/$defs/_idObject" },
|
|
4129
4160
|
"text": { "type": "string" },
|
|
4130
4161
|
"author": { "$ref": "#/$defs/user" },
|
|
4131
4162
|
"date": { "$ref": "#/$defs/dateObject" },
|
|
@@ -4231,12 +4262,28 @@ export default {
|
|
|
4231
4262
|
"200": {
|
|
4232
4263
|
"$defs": {
|
|
4233
4264
|
"dateObject": {
|
|
4265
|
+
"description": "Peut être un objet { sec, usec } ou un timestamp entier (sec)",
|
|
4266
|
+
"oneOf": [
|
|
4267
|
+
{
|
|
4268
|
+
"type": "object",
|
|
4269
|
+
"required": ["sec", "usec"],
|
|
4270
|
+
"properties": {
|
|
4271
|
+
"sec": { "type": "number" },
|
|
4272
|
+
"usec": { "type": "number" }
|
|
4273
|
+
},
|
|
4274
|
+
"additionalProperties": false
|
|
4275
|
+
},
|
|
4276
|
+
{
|
|
4277
|
+
"type": "integer"
|
|
4278
|
+
}
|
|
4279
|
+
]
|
|
4280
|
+
},
|
|
4281
|
+
"_idObject": {
|
|
4234
4282
|
"type": "object",
|
|
4235
4283
|
"properties": {
|
|
4236
|
-
"
|
|
4237
|
-
"usec": { "type": "number" }
|
|
4284
|
+
"$id": { "type": "string", "pattern": "^[a-f0-9]{24}$" }
|
|
4238
4285
|
},
|
|
4239
|
-
"required": ["
|
|
4286
|
+
"required": ["$id"],
|
|
4240
4287
|
"additionalProperties": false
|
|
4241
4288
|
},
|
|
4242
4289
|
"author": {
|
|
@@ -4298,24 +4345,18 @@ export default {
|
|
|
4298
4345
|
"postedDate", "argval", "replies"
|
|
4299
4346
|
],
|
|
4300
4347
|
"properties": {
|
|
4301
|
-
"_id": {
|
|
4302
|
-
"type": "object",
|
|
4303
|
-
"required": ["$id"],
|
|
4304
|
-
"properties": {
|
|
4305
|
-
"$id": { "type": "string" }
|
|
4306
|
-
}
|
|
4307
|
-
},
|
|
4348
|
+
"_id": { "$ref": "#/$defs/_idObject" },
|
|
4308
4349
|
"contextId": { "type": "string" },
|
|
4309
4350
|
"contextType": { "type": "string" },
|
|
4310
4351
|
"parentId": { "type": "string" },
|
|
4311
4352
|
"text": { "type": "string" },
|
|
4312
|
-
"created": { "
|
|
4353
|
+
"created": { "$ref": "#/$defs/dateObject" },
|
|
4313
4354
|
"author": { "$ref": "#/$defs/author" },
|
|
4314
4355
|
"collection": { "type": "string", "enum": ["comments"] },
|
|
4315
4356
|
"tags": { "type": ["array", "null"] },
|
|
4316
4357
|
"status": { "type": "string" },
|
|
4317
4358
|
"views": { "$ref": "#/$defs/views" },
|
|
4318
|
-
"postedDate": { "
|
|
4359
|
+
"postedDate": { "$ref": "#/$defs/dateObject" },
|
|
4319
4360
|
"argval": { "type": "string" },
|
|
4320
4361
|
"replies": {
|
|
4321
4362
|
"anyOf": [
|
|
@@ -4418,12 +4459,28 @@ export default {
|
|
|
4418
4459
|
"200": {
|
|
4419
4460
|
"$defs": {
|
|
4420
4461
|
"dateObject": {
|
|
4462
|
+
"description": "Peut être un objet { sec, usec } ou un timestamp entier (sec)",
|
|
4463
|
+
"oneOf": [
|
|
4464
|
+
{
|
|
4465
|
+
"type": "object",
|
|
4466
|
+
"required": ["sec", "usec"],
|
|
4467
|
+
"properties": {
|
|
4468
|
+
"sec": { "type": "number" },
|
|
4469
|
+
"usec": { "type": "number" }
|
|
4470
|
+
},
|
|
4471
|
+
"additionalProperties": false
|
|
4472
|
+
},
|
|
4473
|
+
{
|
|
4474
|
+
"type": "integer"
|
|
4475
|
+
}
|
|
4476
|
+
]
|
|
4477
|
+
},
|
|
4478
|
+
"_idObject": {
|
|
4421
4479
|
"type": "object",
|
|
4422
4480
|
"properties": {
|
|
4423
|
-
"
|
|
4424
|
-
"usec": { "type": "number" }
|
|
4481
|
+
"$id": { "type": "string", "pattern": "^[a-f0-9]{24}$" }
|
|
4425
4482
|
},
|
|
4426
|
-
"required": ["
|
|
4483
|
+
"required": ["$id"],
|
|
4427
4484
|
"additionalProperties": false
|
|
4428
4485
|
},
|
|
4429
4486
|
"author": {
|
|
@@ -4485,24 +4542,18 @@ export default {
|
|
|
4485
4542
|
"postedDate", "argval"
|
|
4486
4543
|
],
|
|
4487
4544
|
"properties": {
|
|
4488
|
-
"_id": {
|
|
4489
|
-
"type": "object",
|
|
4490
|
-
"required": ["$id"],
|
|
4491
|
-
"properties": {
|
|
4492
|
-
"$id": { "type": "string" }
|
|
4493
|
-
}
|
|
4494
|
-
},
|
|
4545
|
+
"_id": { "$ref": "#/$defs/_idObject" },
|
|
4495
4546
|
"contextId": { "type": "string" },
|
|
4496
4547
|
"contextType": { "type": "string" },
|
|
4497
4548
|
"parentId": { "type": ["string", "null"] },
|
|
4498
4549
|
"text": { "type": "string" },
|
|
4499
|
-
"created": { "
|
|
4550
|
+
"created": { "$ref": "#/$defs/dateObject" },
|
|
4500
4551
|
"author": { "$ref": "#/$defs/author" },
|
|
4501
4552
|
"collection": { "type": "string", "enum": ["comments"] },
|
|
4502
4553
|
"tags": { "type": ["array", "null"] },
|
|
4503
4554
|
"status": { "type": "string" },
|
|
4504
4555
|
"views": { "$ref": "#/$defs/views" },
|
|
4505
|
-
"postedDate": { "
|
|
4556
|
+
"postedDate": { "$ref": "#/$defs/dateObject" },
|
|
4506
4557
|
"argval": { "type": "string" }
|
|
4507
4558
|
}
|
|
4508
4559
|
}
|
|
@@ -4514,14 +4565,7 @@ export default {
|
|
|
4514
4565
|
"properties": {
|
|
4515
4566
|
"result": { "type": "boolean", "const": true },
|
|
4516
4567
|
"msg": { "type": "string" },
|
|
4517
|
-
"id": {
|
|
4518
|
-
"type": "object",
|
|
4519
|
-
"properties": {
|
|
4520
|
-
"$id": { "type": "string" }
|
|
4521
|
-
},
|
|
4522
|
-
"required": ["$id"],
|
|
4523
|
-
"additionalProperties": false
|
|
4524
|
-
},
|
|
4568
|
+
"id": { "$ref": "#/$defs/_idObject" },
|
|
4525
4569
|
"newComment": { "$ref": "#/$defs/comment" },
|
|
4526
4570
|
"time": {
|
|
4527
4571
|
"type": "integer"
|
|
@@ -4576,6 +4620,16 @@ export default {
|
|
|
4576
4620
|
},
|
|
4577
4621
|
"responses": {
|
|
4578
4622
|
"200": {
|
|
4623
|
+
"$defs": {
|
|
4624
|
+
"_idObject": {
|
|
4625
|
+
"type": "object",
|
|
4626
|
+
"properties": {
|
|
4627
|
+
"$id": { "type": "string", "pattern": "^[a-f0-9]{24}$" }
|
|
4628
|
+
},
|
|
4629
|
+
"required": ["$id"],
|
|
4630
|
+
"additionalProperties": false
|
|
4631
|
+
}
|
|
4632
|
+
},
|
|
4579
4633
|
"oneOf": [
|
|
4580
4634
|
{
|
|
4581
4635
|
"type": "object",
|
|
@@ -4586,14 +4640,7 @@ export default {
|
|
|
4586
4640
|
"elt": {
|
|
4587
4641
|
"type": "object",
|
|
4588
4642
|
"properties": {
|
|
4589
|
-
"_id": {
|
|
4590
|
-
"type": "object",
|
|
4591
|
-
"properties": {
|
|
4592
|
-
"$id": { "type": "string" }
|
|
4593
|
-
},
|
|
4594
|
-
"required": ["$id"],
|
|
4595
|
-
"additionalProperties": false
|
|
4596
|
-
},
|
|
4643
|
+
"_id": { "$ref": "#/$defs/_idObject" },
|
|
4597
4644
|
"contextId": { "type": "string" },
|
|
4598
4645
|
"contextType": { "type": "string" },
|
|
4599
4646
|
"parentId": { "type": ["string", "null"] }
|
|
@@ -4627,6 +4674,1084 @@ export default {
|
|
|
4627
4674
|
"additionalProperties": false
|
|
4628
4675
|
}
|
|
4629
4676
|
}
|
|
4677
|
+
},
|
|
4678
|
+
{
|
|
4679
|
+
"name": "Mettre à jour un commentaire",
|
|
4680
|
+
"path": "/co2/comment/update",
|
|
4681
|
+
"constant": "UPDATE_COMMENTS",
|
|
4682
|
+
"method": "POST",
|
|
4683
|
+
"auth": "bearer",
|
|
4684
|
+
"description": "Met à jour le contenu d’un commentaire.",
|
|
4685
|
+
"contentType": "application/x-www-form-urlencoded",
|
|
4686
|
+
"request": {
|
|
4687
|
+
"type": "object",
|
|
4688
|
+
"properties": {
|
|
4689
|
+
"id": {
|
|
4690
|
+
"type": "string",
|
|
4691
|
+
"description": "ID du commentaire à mettre à jour"
|
|
4692
|
+
},
|
|
4693
|
+
"params": {
|
|
4694
|
+
"type": "object",
|
|
4695
|
+
"properties": {
|
|
4696
|
+
"text": {
|
|
4697
|
+
"type": "string",
|
|
4698
|
+
"description": "Nouveau texte du commentaire"
|
|
4699
|
+
},
|
|
4700
|
+
"mentions": {
|
|
4701
|
+
"type": "array",
|
|
4702
|
+
"items": {
|
|
4703
|
+
"type": "object",
|
|
4704
|
+
"properties": {
|
|
4705
|
+
"id": { "type": "string", "description": "ID de l'utilisateur mentionné" },
|
|
4706
|
+
"name": { "type": "string", "description": "Nom de l'utilisateur mentionné" },
|
|
4707
|
+
"slug": { "type": "string", "description": "Slug de l'utilisateur mentionné" },
|
|
4708
|
+
"type": { "type": "string", "description": "Type de l'utilisateur mentionné" },
|
|
4709
|
+
"value": { "type": "string", "description": "Valeur de la mention" },
|
|
4710
|
+
"count": { "type": "number", "description": "Nombre de fois que l'utilisateur est mentionné" }
|
|
4711
|
+
},
|
|
4712
|
+
"required": ["id", "name", "slug", "type", "value", "count"],
|
|
4713
|
+
"additionalProperties": false
|
|
4714
|
+
}
|
|
4715
|
+
}
|
|
4716
|
+
},
|
|
4717
|
+
"required": ["text"]
|
|
4718
|
+
}
|
|
4719
|
+
},
|
|
4720
|
+
"required": ["id", "params"],
|
|
4721
|
+
"additionalProperties": false
|
|
4722
|
+
},
|
|
4723
|
+
"responses": {
|
|
4724
|
+
"200": {
|
|
4725
|
+
"oneOf": [
|
|
4726
|
+
{
|
|
4727
|
+
"type": "object",
|
|
4728
|
+
"description": "Réponse en cas de succès de la mise à jour du commentaire",
|
|
4729
|
+
"properties": {
|
|
4730
|
+
"result": { "type": "boolean", "const": true },
|
|
4731
|
+
"msg": { "type": "string" },
|
|
4732
|
+
"comment": {
|
|
4733
|
+
"type": "object",
|
|
4734
|
+
"properties": {
|
|
4735
|
+
"ok": { "type": "number" },
|
|
4736
|
+
"nModified": { "type": "number" },
|
|
4737
|
+
"n": { "type": "number" },
|
|
4738
|
+
"err": { "type": ["string", "null"] },
|
|
4739
|
+
"errmsg": { "type": ["string", "null"] },
|
|
4740
|
+
"updatedExisting": { "type": "boolean" }
|
|
4741
|
+
},
|
|
4742
|
+
"required": ["ok", "nModified", "n", "err", "errmsg", "updatedExisting"],
|
|
4743
|
+
"additionalProperties": false
|
|
4744
|
+
}
|
|
4745
|
+
},
|
|
4746
|
+
"required": ["result", "msg", "comment"],
|
|
4747
|
+
"additionalProperties": false
|
|
4748
|
+
},
|
|
4749
|
+
{
|
|
4750
|
+
"type": "object",
|
|
4751
|
+
"description": "Réponse en cas d'échec de la mise à jour du commentaire",
|
|
4752
|
+
"properties": {
|
|
4753
|
+
"result": { "type": "boolean", "const": false },
|
|
4754
|
+
"msg": { "type": "string" }
|
|
4755
|
+
},
|
|
4756
|
+
"required": ["result", "msg"]
|
|
4757
|
+
}
|
|
4758
|
+
]
|
|
4759
|
+
},
|
|
4760
|
+
"401": {
|
|
4761
|
+
"description": "Erreur d'authentification (token invalide ou expiré)",
|
|
4762
|
+
"type": "object",
|
|
4763
|
+
"properties": {
|
|
4764
|
+
"error": {
|
|
4765
|
+
"type": "string",
|
|
4766
|
+
"description": "Description de l'erreur"
|
|
4767
|
+
}
|
|
4768
|
+
},
|
|
4769
|
+
"required": ["error"],
|
|
4770
|
+
"additionalProperties": false
|
|
4771
|
+
}
|
|
4772
|
+
}
|
|
4773
|
+
},
|
|
4774
|
+
{
|
|
4775
|
+
"name": "Rechercher des tags",
|
|
4776
|
+
"path": "/api/tags/search?q={q}",
|
|
4777
|
+
"constant": "SEARCH_TAGS",
|
|
4778
|
+
"method": "POST",
|
|
4779
|
+
"auth": "none",
|
|
4780
|
+
"description": "Recherche des tags correspondant à un mot-clé.",
|
|
4781
|
+
"contentType": "application/x-www-form-urlencoded",
|
|
4782
|
+
"pathParams": {
|
|
4783
|
+
"type": "object",
|
|
4784
|
+
"properties": {
|
|
4785
|
+
"q": {
|
|
4786
|
+
"type": "string",
|
|
4787
|
+
"description": "Mot-clé de recherche"
|
|
4788
|
+
}
|
|
4789
|
+
},
|
|
4790
|
+
"required": ["q"],
|
|
4791
|
+
"additionalProperties": false
|
|
4792
|
+
},
|
|
4793
|
+
"responses": {
|
|
4794
|
+
"200": {
|
|
4795
|
+
"$defs": {
|
|
4796
|
+
"_idObject": {
|
|
4797
|
+
"type": "object",
|
|
4798
|
+
"properties": {
|
|
4799
|
+
"$id": { "type": "string", "pattern": "^[a-f0-9]{24}$" }
|
|
4800
|
+
},
|
|
4801
|
+
"required": ["$id"],
|
|
4802
|
+
"additionalProperties": false
|
|
4803
|
+
}
|
|
4804
|
+
},
|
|
4805
|
+
"oneOf": [
|
|
4806
|
+
{
|
|
4807
|
+
"type": "array",
|
|
4808
|
+
"description": "Réponse sans résultat : contient un seul objet avec uniquement le champ 'tag' correspondant au terme recherché.",
|
|
4809
|
+
"minItems": 1,
|
|
4810
|
+
"maxItems": 1,
|
|
4811
|
+
"items": {
|
|
4812
|
+
"type": "object",
|
|
4813
|
+
"required": ["tag"],
|
|
4814
|
+
"properties": {
|
|
4815
|
+
"tag": {
|
|
4816
|
+
"type": "string",
|
|
4817
|
+
"description": "Terme recherché"
|
|
4818
|
+
}
|
|
4819
|
+
},
|
|
4820
|
+
"additionalProperties": false
|
|
4821
|
+
}
|
|
4822
|
+
},
|
|
4823
|
+
{
|
|
4824
|
+
"type": "array",
|
|
4825
|
+
"description": "Réponse avec résultats : contient plusieurs objets avec les champs '_id', 'tag' et 'field_length'.",
|
|
4826
|
+
"minItems": 1,
|
|
4827
|
+
"items": {
|
|
4828
|
+
"type": "object",
|
|
4829
|
+
"required": ["_id", "tag", "field_length"],
|
|
4830
|
+
"properties": {
|
|
4831
|
+
"_id": { "$ref": "#/$defs/_idObject" },
|
|
4832
|
+
"tag": { "type": "string" },
|
|
4833
|
+
"field_length": { "type": "integer", "minimum": 0 }
|
|
4834
|
+
},
|
|
4835
|
+
"additionalProperties": false
|
|
4836
|
+
}
|
|
4837
|
+
}
|
|
4838
|
+
]
|
|
4839
|
+
},
|
|
4840
|
+
"401": {
|
|
4841
|
+
"description": "Erreur d'authentification (token invalide ou expiré)",
|
|
4842
|
+
"type": "object",
|
|
4843
|
+
"properties": {
|
|
4844
|
+
"error": {
|
|
4845
|
+
"type": "string",
|
|
4846
|
+
"description": "Description de l'erreur"
|
|
4847
|
+
}
|
|
4848
|
+
},
|
|
4849
|
+
"required": ["error"],
|
|
4850
|
+
"additionalProperties": false
|
|
4851
|
+
}
|
|
4852
|
+
}
|
|
4853
|
+
},
|
|
4854
|
+
{
|
|
4855
|
+
"name": "Afficher les votes d'une actualité",
|
|
4856
|
+
"path": "/co2/action/list/type/{type}/id/{id}/actionType/vote/json/true",
|
|
4857
|
+
"constant": "SHOW_VOTE",
|
|
4858
|
+
"method": "POST",
|
|
4859
|
+
"auth": "none",
|
|
4860
|
+
"description": "Récupère la liste des votes (like, love, etc.) sur une actualité.",
|
|
4861
|
+
"contentType": "application/x-www-form-urlencoded",
|
|
4862
|
+
"pathParams": {
|
|
4863
|
+
"type": "object",
|
|
4864
|
+
"properties": {
|
|
4865
|
+
"type": {
|
|
4866
|
+
"type": "string",
|
|
4867
|
+
"enum": ["news"],
|
|
4868
|
+
"default": "news",
|
|
4869
|
+
"description": "Type de l'élément"
|
|
4870
|
+
},
|
|
4871
|
+
"id": {
|
|
4872
|
+
"type": "string",
|
|
4873
|
+
"description": "ID de l'élément dont on veut récupérer les votes"
|
|
4874
|
+
}
|
|
4875
|
+
},
|
|
4876
|
+
"required": ["type", "id"],
|
|
4877
|
+
"additionalProperties": false
|
|
4878
|
+
},
|
|
4879
|
+
"responses": {
|
|
4880
|
+
"200": {
|
|
4881
|
+
"$defs": {
|
|
4882
|
+
"_idObject": {
|
|
4883
|
+
"type": "object",
|
|
4884
|
+
"properties": {
|
|
4885
|
+
"$id": { "type": "string", "pattern": "^[a-f0-9]{24}$" }
|
|
4886
|
+
},
|
|
4887
|
+
"required": ["$id"],
|
|
4888
|
+
"additionalProperties": false
|
|
4889
|
+
},
|
|
4890
|
+
"dateObject": {
|
|
4891
|
+
"description": "Peut être un objet { sec, usec } ou un timestamp entier (sec)",
|
|
4892
|
+
"oneOf": [
|
|
4893
|
+
{
|
|
4894
|
+
"type": "object",
|
|
4895
|
+
"required": ["sec", "usec"],
|
|
4896
|
+
"properties": {
|
|
4897
|
+
"sec": { "type": "number" },
|
|
4898
|
+
"usec": { "type": "number" }
|
|
4899
|
+
},
|
|
4900
|
+
"additionalProperties": false
|
|
4901
|
+
},
|
|
4902
|
+
{
|
|
4903
|
+
"type": "integer"
|
|
4904
|
+
}
|
|
4905
|
+
]
|
|
4906
|
+
}
|
|
4907
|
+
},
|
|
4908
|
+
"oneOf": [
|
|
4909
|
+
{
|
|
4910
|
+
"type": "object",
|
|
4911
|
+
"required": ["_id", "vote", "voteCount"],
|
|
4912
|
+
"properties": {
|
|
4913
|
+
"_id": { "$ref": "#/$defs/_idObject" },
|
|
4914
|
+
"vote": {
|
|
4915
|
+
"type": "object",
|
|
4916
|
+
"description": "Votes individuels, indexés par identifiant utilisateur",
|
|
4917
|
+
"patternProperties": {
|
|
4918
|
+
"^[a-f0-9]{24}$": {
|
|
4919
|
+
"type": "object",
|
|
4920
|
+
"required": ["status", "date", "_id", "name", "slug"],
|
|
4921
|
+
"properties": {
|
|
4922
|
+
"status": {
|
|
4923
|
+
"type": "string",
|
|
4924
|
+
"enum": ["love", "bothered", "scared", "like", "enjoy", "sad", "support", "glad"]
|
|
4925
|
+
},
|
|
4926
|
+
"date": { "$ref": "#/$defs/dateObject" },
|
|
4927
|
+
"_id": { "$ref": "#/$defs/_idObject" },
|
|
4928
|
+
"name": { "type": "string" },
|
|
4929
|
+
"profilThumbImageUrl": { "type": "string" },
|
|
4930
|
+
"slug": { "type": "string" }
|
|
4931
|
+
}
|
|
4932
|
+
}
|
|
4933
|
+
},
|
|
4934
|
+
"additionalProperties": false
|
|
4935
|
+
},
|
|
4936
|
+
"voteCount": {
|
|
4937
|
+
"type": "object",
|
|
4938
|
+
"description": "Nombre total de votes par type de réaction",
|
|
4939
|
+
"properties": {
|
|
4940
|
+
"love": { "type": "integer", "minimum": 0 },
|
|
4941
|
+
"bothered": { "type": "integer", "minimum": 0 },
|
|
4942
|
+
"scared": { "type": "integer", "minimum": 0 },
|
|
4943
|
+
"like": { "type": "integer", "minimum": 0 },
|
|
4944
|
+
"enjoy": { "type": "integer", "minimum": 0 },
|
|
4945
|
+
"sad": { "type": "integer", "minimum": 0 },
|
|
4946
|
+
"support": { "type": "integer", "minimum": 0 },
|
|
4947
|
+
"glad": { "type": "integer", "minimum": 0 }
|
|
4948
|
+
},
|
|
4949
|
+
"additionalProperties": false
|
|
4950
|
+
}
|
|
4951
|
+
}
|
|
4952
|
+
},
|
|
4953
|
+
{
|
|
4954
|
+
"type": "object",
|
|
4955
|
+
"required": ["_id"],
|
|
4956
|
+
"properties": {
|
|
4957
|
+
"_id": { "$ref": "#/$defs/_idObject" }
|
|
4958
|
+
},
|
|
4959
|
+
"additionalProperties": false,
|
|
4960
|
+
"description": "Cas sans votes : uniquement l'identifiant de l'objet concerné"
|
|
4961
|
+
}
|
|
4962
|
+
]
|
|
4963
|
+
},
|
|
4964
|
+
"401": {
|
|
4965
|
+
"description": "Erreur d'authentification (token invalide ou expiré)",
|
|
4966
|
+
"type": "object",
|
|
4967
|
+
"properties": {
|
|
4968
|
+
"error": {
|
|
4969
|
+
"type": "string",
|
|
4970
|
+
"description": "Description de l'erreur"
|
|
4971
|
+
}
|
|
4972
|
+
},
|
|
4973
|
+
"required": ["error"],
|
|
4974
|
+
"additionalProperties": false
|
|
4975
|
+
}
|
|
4976
|
+
}
|
|
4977
|
+
},
|
|
4978
|
+
{
|
|
4979
|
+
"name": "Recherche globale avec autocomplétion",
|
|
4980
|
+
"path": "/co2/search/globalautocomplete",
|
|
4981
|
+
"constant": "GLOBAL_AUTOCOMPLETE",
|
|
4982
|
+
"constantCocolight": "GLOBALAUTOCOMPLETE",
|
|
4983
|
+
"functionCocolight": "globalautocomplete",
|
|
4984
|
+
"method": "POST",
|
|
4985
|
+
"auth": "none",
|
|
4986
|
+
"description": "Effectue une recherche globale avec possibilité d’autocomplétion.",
|
|
4987
|
+
"contentType": "application/x-www-form-urlencoded",
|
|
4988
|
+
"request": {
|
|
4989
|
+
"type": "object",
|
|
4990
|
+
"properties": {
|
|
4991
|
+
"name": {
|
|
4992
|
+
"type": "string",
|
|
4993
|
+
"description": "Nom ou mot-clé de la recherche"
|
|
4994
|
+
},
|
|
4995
|
+
|
|
4996
|
+
"locality": {
|
|
4997
|
+
"type": "object",
|
|
4998
|
+
"description": "Liste des localités ciblées avec leur identifiant et leur type (city ou level1)",
|
|
4999
|
+
"patternProperties": {
|
|
5000
|
+
"^[^\\s]+$": {
|
|
5001
|
+
"type": "object",
|
|
5002
|
+
"properties": {
|
|
5003
|
+
"id": {
|
|
5004
|
+
"type": "string",
|
|
5005
|
+
"description": "Identifiant de la localité"
|
|
5006
|
+
},
|
|
5007
|
+
"type": {
|
|
5008
|
+
"type": "string",
|
|
5009
|
+
"enum": ["cities", "level1"],
|
|
5010
|
+
"description": "Type de la localité : 'cities' pour une ville ou 'level1' pour une région"
|
|
5011
|
+
}
|
|
5012
|
+
},
|
|
5013
|
+
"required": ["id", "type"],
|
|
5014
|
+
"additionalProperties": false
|
|
5015
|
+
}
|
|
5016
|
+
},
|
|
5017
|
+
"additionalProperties": false
|
|
5018
|
+
},
|
|
5019
|
+
|
|
5020
|
+
"searchType": {
|
|
5021
|
+
"type": "array",
|
|
5022
|
+
"description": "Types d'entités à inclure dans la recherche",
|
|
5023
|
+
"items": {
|
|
5024
|
+
"type": "string",
|
|
5025
|
+
"enum": [
|
|
5026
|
+
"NGO",
|
|
5027
|
+
"LocalBusiness",
|
|
5028
|
+
"Group",
|
|
5029
|
+
"GovernmentOrganization",
|
|
5030
|
+
"Cooperative",
|
|
5031
|
+
"projects",
|
|
5032
|
+
"citoyens",
|
|
5033
|
+
"poi"
|
|
5034
|
+
]
|
|
5035
|
+
}
|
|
5036
|
+
},
|
|
5037
|
+
|
|
5038
|
+
"searchTags": {
|
|
5039
|
+
"type": "array",
|
|
5040
|
+
"description": "Balises (tags) à utiliser pour filtrer la recherche",
|
|
5041
|
+
"items": {
|
|
5042
|
+
"type": "string"
|
|
5043
|
+
}
|
|
5044
|
+
},
|
|
5045
|
+
|
|
5046
|
+
"ranges": {
|
|
5047
|
+
"type": "object",
|
|
5048
|
+
"description": "Configuration des plages de résultats pour chaque type de recherche",
|
|
5049
|
+
"patternProperties": {
|
|
5050
|
+
"^[^\\s]+$": {
|
|
5051
|
+
"type": "object",
|
|
5052
|
+
"properties": {
|
|
5053
|
+
"indexMin": {
|
|
5054
|
+
"type": "number",
|
|
5055
|
+
"description": "Index de départ pour la pagination"
|
|
5056
|
+
},
|
|
5057
|
+
"indexMax": {
|
|
5058
|
+
"type": "number",
|
|
5059
|
+
"description": "Index de fin pour la pagination"
|
|
5060
|
+
}
|
|
5061
|
+
},
|
|
5062
|
+
"required": ["indexMin", "indexMax"],
|
|
5063
|
+
"additionalProperties": false
|
|
5064
|
+
}
|
|
5065
|
+
},
|
|
5066
|
+
"additionalProperties": false
|
|
5067
|
+
},
|
|
5068
|
+
|
|
5069
|
+
"countType": {
|
|
5070
|
+
"type": "array",
|
|
5071
|
+
"description": "Liste fixe des types à compter dans les résultats",
|
|
5072
|
+
"items": {
|
|
5073
|
+
"type": "string",
|
|
5074
|
+
"enum": [
|
|
5075
|
+
"NGO",
|
|
5076
|
+
"LocalBusiness",
|
|
5077
|
+
"Group",
|
|
5078
|
+
"GovernmentOrganization",
|
|
5079
|
+
"Cooperative",
|
|
5080
|
+
"projects",
|
|
5081
|
+
"citoyens",
|
|
5082
|
+
"poi"
|
|
5083
|
+
]
|
|
5084
|
+
},
|
|
5085
|
+
"const": [
|
|
5086
|
+
"NGO",
|
|
5087
|
+
"LocalBusiness",
|
|
5088
|
+
"Group",
|
|
5089
|
+
"GovernmentOrganization",
|
|
5090
|
+
"Cooperative",
|
|
5091
|
+
"projects",
|
|
5092
|
+
"citoyens",
|
|
5093
|
+
"poi"
|
|
5094
|
+
],
|
|
5095
|
+
"default": [
|
|
5096
|
+
"NGO",
|
|
5097
|
+
"LocalBusiness",
|
|
5098
|
+
"Group",
|
|
5099
|
+
"GovernmentOrganization",
|
|
5100
|
+
"Cooperative",
|
|
5101
|
+
"projects",
|
|
5102
|
+
"citoyens",
|
|
5103
|
+
"poi"
|
|
5104
|
+
]
|
|
5105
|
+
},
|
|
5106
|
+
|
|
5107
|
+
"indexMin": {
|
|
5108
|
+
"type": "number",
|
|
5109
|
+
"const": 0,
|
|
5110
|
+
"default": 0,
|
|
5111
|
+
"description": "Index de départ global pour la pagination (toujours 0)"
|
|
5112
|
+
},
|
|
5113
|
+
|
|
5114
|
+
"indexStep": {
|
|
5115
|
+
"type": "number",
|
|
5116
|
+
"description": "Nombre d’éléments à récupérer (limite de pagination)"
|
|
5117
|
+
},
|
|
5118
|
+
|
|
5119
|
+
"initType": {
|
|
5120
|
+
"type": "string",
|
|
5121
|
+
"const": "",
|
|
5122
|
+
"default": "",
|
|
5123
|
+
"description": "Type initial de la recherche, vide par défaut"
|
|
5124
|
+
},
|
|
5125
|
+
|
|
5126
|
+
"count": {
|
|
5127
|
+
"type": "boolean",
|
|
5128
|
+
"const": true,
|
|
5129
|
+
"default": true,
|
|
5130
|
+
"description": "Indique si les types doivent être comptés dans les résultats"
|
|
5131
|
+
},
|
|
5132
|
+
|
|
5133
|
+
"notSourceKey": {
|
|
5134
|
+
"type": "boolean",
|
|
5135
|
+
"const": true,
|
|
5136
|
+
"default": true,
|
|
5137
|
+
"description": "Flag pour ne pas filtrer sur une clé de source spécifique"
|
|
5138
|
+
},
|
|
5139
|
+
|
|
5140
|
+
"filters": {
|
|
5141
|
+
"type": "string",
|
|
5142
|
+
"const": "",
|
|
5143
|
+
"default": "",
|
|
5144
|
+
"description": "Filtres additionnels appliqués à la recherche (actuellement vide)"
|
|
5145
|
+
},
|
|
5146
|
+
|
|
5147
|
+
"fediverse": {
|
|
5148
|
+
"type": "boolean",
|
|
5149
|
+
"const": false,
|
|
5150
|
+
"default": false,
|
|
5151
|
+
"description": "Indique si la recherche doit s'étendre au Fediverse (toujours désactivé)"
|
|
5152
|
+
}
|
|
5153
|
+
},
|
|
5154
|
+
|
|
5155
|
+
"required": [
|
|
5156
|
+
"name",
|
|
5157
|
+
"searchType",
|
|
5158
|
+
"countType",
|
|
5159
|
+
"indexMin",
|
|
5160
|
+
"indexStep",
|
|
5161
|
+
"initType",
|
|
5162
|
+
"count",
|
|
5163
|
+
"notSourceKey",
|
|
5164
|
+
"filters",
|
|
5165
|
+
"fediverse"
|
|
5166
|
+
],
|
|
5167
|
+
|
|
5168
|
+
"additionalProperties": false
|
|
5169
|
+
},
|
|
5170
|
+
"responses": {
|
|
5171
|
+
"200": {
|
|
5172
|
+
"$defs": {
|
|
5173
|
+
"dateObject": {
|
|
5174
|
+
"description": "Peut être un objet { sec, usec } ou un timestamp entier (sec)",
|
|
5175
|
+
"oneOf": [
|
|
5176
|
+
{
|
|
5177
|
+
"type": "object",
|
|
5178
|
+
"required": ["sec", "usec"],
|
|
5179
|
+
"properties": {
|
|
5180
|
+
"sec": { "type": "number" },
|
|
5181
|
+
"usec": { "type": "number" }
|
|
5182
|
+
},
|
|
5183
|
+
"additionalProperties": false
|
|
5184
|
+
},
|
|
5185
|
+
{
|
|
5186
|
+
"type": "integer"
|
|
5187
|
+
}
|
|
5188
|
+
]
|
|
5189
|
+
},
|
|
5190
|
+
"_idObject": {
|
|
5191
|
+
"type": "object",
|
|
5192
|
+
"properties": {
|
|
5193
|
+
"$id": { "type": "string", "pattern": "^[a-f0-9]{24}$" }
|
|
5194
|
+
},
|
|
5195
|
+
"required": ["$id"],
|
|
5196
|
+
"additionalProperties": false
|
|
5197
|
+
},
|
|
5198
|
+
"emptyArray": {
|
|
5199
|
+
"type": "array",
|
|
5200
|
+
"minItems": 0,
|
|
5201
|
+
"maxItems": 0
|
|
5202
|
+
}
|
|
5203
|
+
},
|
|
5204
|
+
"oneOf": [
|
|
5205
|
+
{
|
|
5206
|
+
"type": "object",
|
|
5207
|
+
"description": "Réponse avec résultats de recherche",
|
|
5208
|
+
"properties": {
|
|
5209
|
+
"results": {
|
|
5210
|
+
"type":"object",
|
|
5211
|
+
"patternProperties": {
|
|
5212
|
+
"^[a-fA-F0-9]{24}$": {
|
|
5213
|
+
"type": "object",
|
|
5214
|
+
"properties": {
|
|
5215
|
+
"_id": { "$ref": "#/$defs/_idObject" },
|
|
5216
|
+
"collection": { "type": "string" },
|
|
5217
|
+
"created": { "$ref": "#/$defs/dateObject" },
|
|
5218
|
+
"name": { "type": "string" },
|
|
5219
|
+
"parent": {
|
|
5220
|
+
"type": "object",
|
|
5221
|
+
"patternProperties": {
|
|
5222
|
+
"^[a-fA-F0-9]{24}$": {
|
|
5223
|
+
"type": "object",
|
|
5224
|
+
"properties": {
|
|
5225
|
+
"name": { "type": "string" },
|
|
5226
|
+
"type": { "type": "string" }
|
|
5227
|
+
},
|
|
5228
|
+
"required": ["type"]
|
|
5229
|
+
}
|
|
5230
|
+
}
|
|
5231
|
+
},
|
|
5232
|
+
"updated": { "$ref": "#/$defs/dateObject" },
|
|
5233
|
+
"slug": { "type": "string" },
|
|
5234
|
+
"links": {
|
|
5235
|
+
"type": "object"
|
|
5236
|
+
}
|
|
5237
|
+
},
|
|
5238
|
+
"required": ["_id", "collection", "name"]
|
|
5239
|
+
}
|
|
5240
|
+
}
|
|
5241
|
+
},
|
|
5242
|
+
"count": {
|
|
5243
|
+
"type": "object",
|
|
5244
|
+
"patternProperties": {
|
|
5245
|
+
"^[a-zA-Z][a-zA-Z0-9]*$": {
|
|
5246
|
+
"type": "integer",
|
|
5247
|
+
"minimum": 0
|
|
5248
|
+
}
|
|
5249
|
+
},
|
|
5250
|
+
"minProperties": 1,
|
|
5251
|
+
"additionalProperties": false
|
|
5252
|
+
}
|
|
5253
|
+
},
|
|
5254
|
+
"required": ["results", "count"],
|
|
5255
|
+
"additionalProperties": false
|
|
5256
|
+
},
|
|
5257
|
+
{
|
|
5258
|
+
"type": "object",
|
|
5259
|
+
"description": "Réponse sans résultats de recherche",
|
|
5260
|
+
"properties": {
|
|
5261
|
+
"results": { "$ref": "#/$defs/emptyArray" },
|
|
5262
|
+
"count": {
|
|
5263
|
+
"type": "object",
|
|
5264
|
+
"minProperties": 1,
|
|
5265
|
+
"patternProperties": {
|
|
5266
|
+
"^[a-zA-Z][a-zA-Z0-9]*$": {
|
|
5267
|
+
"type": "integer",
|
|
5268
|
+
"const": 0
|
|
5269
|
+
}
|
|
5270
|
+
},
|
|
5271
|
+
"additionalProperties": false
|
|
5272
|
+
}
|
|
5273
|
+
},
|
|
5274
|
+
"required": ["results", "count"],
|
|
5275
|
+
"additionalProperties": false
|
|
5276
|
+
}
|
|
5277
|
+
]
|
|
5278
|
+
},
|
|
5279
|
+
"401": {
|
|
5280
|
+
"description": "Erreur d'authentification (token invalide ou expiré)",
|
|
5281
|
+
"type": "object",
|
|
5282
|
+
"properties": {
|
|
5283
|
+
"error": {
|
|
5284
|
+
"type": "string",
|
|
5285
|
+
"description": "Description de l'erreur"
|
|
5286
|
+
}
|
|
5287
|
+
},
|
|
5288
|
+
"required": ["error"],
|
|
5289
|
+
"additionalProperties": false
|
|
5290
|
+
}
|
|
5291
|
+
}
|
|
5292
|
+
},
|
|
5293
|
+
{
|
|
5294
|
+
"name": "Recherche de villes avec autocomplétion",
|
|
5295
|
+
"path": "/co2/search/globalautocomplete",
|
|
5296
|
+
"constant": "CITY_AUTOCOMPLETE",
|
|
5297
|
+
"constantCocolight": "GLOBALAUTOCOMPLETE",
|
|
5298
|
+
"functionCocolight": "globalAutocompleteCities",
|
|
5299
|
+
"method": "POST",
|
|
5300
|
+
"auth": "none",
|
|
5301
|
+
"description": "Recherche des villes en fonction d’un nom, autocomplétion rapide.",
|
|
5302
|
+
"contentType": "application/x-www-form-urlencoded",
|
|
5303
|
+
"request": {
|
|
5304
|
+
"type": "object",
|
|
5305
|
+
"properties": {
|
|
5306
|
+
"name": {
|
|
5307
|
+
"type": "string",
|
|
5308
|
+
"description": "Nom de la ville"
|
|
5309
|
+
},
|
|
5310
|
+
"locality": {
|
|
5311
|
+
"type": "string",
|
|
5312
|
+
"const": "",
|
|
5313
|
+
"default": "",
|
|
5314
|
+
"description": "Localité vide ou spécifique"
|
|
5315
|
+
},
|
|
5316
|
+
"searchType": {
|
|
5317
|
+
"type": "array",
|
|
5318
|
+
"items": {
|
|
5319
|
+
"type": "string",
|
|
5320
|
+
"enum": ["cities"]
|
|
5321
|
+
},
|
|
5322
|
+
"const": ["cities"],
|
|
5323
|
+
"default": ["cities"]
|
|
5324
|
+
},
|
|
5325
|
+
"searchBy": {
|
|
5326
|
+
"type": "string",
|
|
5327
|
+
"description": "Mode de recherche (ex: ALL)",
|
|
5328
|
+
"const": "ALL",
|
|
5329
|
+
"default": "ALL"
|
|
5330
|
+
},
|
|
5331
|
+
"indexMin": {
|
|
5332
|
+
"type": "integer",
|
|
5333
|
+
"description": "Index minimum",
|
|
5334
|
+
"minimum": 0
|
|
5335
|
+
},
|
|
5336
|
+
"indexMax": {
|
|
5337
|
+
"type": "integer",
|
|
5338
|
+
"description": "Index maximum",
|
|
5339
|
+
"minimum": 5
|
|
5340
|
+
}
|
|
5341
|
+
},
|
|
5342
|
+
"required": ["name", "locality", "searchType"],
|
|
5343
|
+
"additionalProperties": false
|
|
5344
|
+
},
|
|
5345
|
+
"responses": {
|
|
5346
|
+
"200": {
|
|
5347
|
+
"$defs": {
|
|
5348
|
+
"_idObject": {
|
|
5349
|
+
"type": "object",
|
|
5350
|
+
"properties": {
|
|
5351
|
+
"$id": { "type": "string", "pattern": "^[a-f0-9]{24}$" }
|
|
5352
|
+
},
|
|
5353
|
+
"required": ["$id"],
|
|
5354
|
+
"additionalProperties": false
|
|
5355
|
+
},
|
|
5356
|
+
"geoObject": {
|
|
5357
|
+
"type": "object",
|
|
5358
|
+
"required": ["latitude", "longitude"],
|
|
5359
|
+
"properties": {
|
|
5360
|
+
"@type": { "type": "string" },
|
|
5361
|
+
"latitude": { "type": "string" },
|
|
5362
|
+
"longitude": { "type": "string" }
|
|
5363
|
+
}
|
|
5364
|
+
},
|
|
5365
|
+
"geoPositionObject": {
|
|
5366
|
+
"type": "object",
|
|
5367
|
+
"required": ["type", "coordinates"],
|
|
5368
|
+
"properties": {
|
|
5369
|
+
"type": { "type": "string" },
|
|
5370
|
+
"float": { "type": ["string", "boolean"] },
|
|
5371
|
+
"coordinates": {
|
|
5372
|
+
"type": "array",
|
|
5373
|
+
"items": { "type": "number" },
|
|
5374
|
+
"minItems": 2,
|
|
5375
|
+
"maxItems": 2
|
|
5376
|
+
}
|
|
5377
|
+
}
|
|
5378
|
+
},
|
|
5379
|
+
"emptyArray": {
|
|
5380
|
+
"type": "array",
|
|
5381
|
+
"minItems": 0,
|
|
5382
|
+
"maxItems": 0
|
|
5383
|
+
}
|
|
5384
|
+
},
|
|
5385
|
+
"oneOf": [
|
|
5386
|
+
{
|
|
5387
|
+
"type": "object",
|
|
5388
|
+
"description": "Réponse avec résultats de recherche",
|
|
5389
|
+
"properties": {
|
|
5390
|
+
"results": {
|
|
5391
|
+
"type": "array",
|
|
5392
|
+
"items": {
|
|
5393
|
+
"type": "object",
|
|
5394
|
+
"required": ["_id", "type"],
|
|
5395
|
+
"properties": {
|
|
5396
|
+
"_id": { "$ref": "#/$defs/_idObject" },
|
|
5397
|
+
"type": { "type": "string" },
|
|
5398
|
+
"name": { "type": "string" },
|
|
5399
|
+
"alternateName": { "type": "string" },
|
|
5400
|
+
"postalCode": { "type": "string" },
|
|
5401
|
+
"postalCodes": {
|
|
5402
|
+
"type": "array",
|
|
5403
|
+
"items": {
|
|
5404
|
+
"type": "object",
|
|
5405
|
+
"required": ["postalCode", "geoPosition"],
|
|
5406
|
+
"properties": {
|
|
5407
|
+
"postalCode": { "type": "string" },
|
|
5408
|
+
"geoPosition": { "$ref": "#/$defs/geoPositionObject" }
|
|
5409
|
+
}
|
|
5410
|
+
}
|
|
5411
|
+
},
|
|
5412
|
+
"geo": { "$ref": "#/$defs/geoObject" },
|
|
5413
|
+
"insee": { "type": "string" },
|
|
5414
|
+
"country": { "type": "string" },
|
|
5415
|
+
"countryCode": { "type": "string" },
|
|
5416
|
+
"level1": { "type": "string" },
|
|
5417
|
+
"level1Name": { "type": "string" },
|
|
5418
|
+
"level3": { "type": "string" },
|
|
5419
|
+
"level3Name": { "type": "string" },
|
|
5420
|
+
"level4": { "type": "string" },
|
|
5421
|
+
"level4Name": { "type": "string" },
|
|
5422
|
+
"allCP": { "type": "boolean" },
|
|
5423
|
+
"uniqueCp": { "type": "boolean" },
|
|
5424
|
+
"level": {
|
|
5425
|
+
"type": "array",
|
|
5426
|
+
"items": { "type": "string" }
|
|
5427
|
+
}
|
|
5428
|
+
},
|
|
5429
|
+
"additionalProperties": true
|
|
5430
|
+
}
|
|
5431
|
+
}
|
|
5432
|
+
},
|
|
5433
|
+
"required": ["results"],
|
|
5434
|
+
"additionalProperties": false
|
|
5435
|
+
},
|
|
5436
|
+
{
|
|
5437
|
+
"type": "object",
|
|
5438
|
+
"description": "Réponse sans résultats de recherche",
|
|
5439
|
+
"properties": {
|
|
5440
|
+
"results": { "$ref": "#/$defs/emptyArray" }
|
|
5441
|
+
},
|
|
5442
|
+
"required": ["results"],
|
|
5443
|
+
"additionalProperties": false
|
|
5444
|
+
}
|
|
5445
|
+
]
|
|
5446
|
+
},
|
|
5447
|
+
"401": {
|
|
5448
|
+
"description": "Erreur d'authentification (token invalide ou expiré)",
|
|
5449
|
+
"type": "object",
|
|
5450
|
+
"properties": {
|
|
5451
|
+
"error": {
|
|
5452
|
+
"type": "string",
|
|
5453
|
+
"description": "Description de l'erreur"
|
|
5454
|
+
}
|
|
5455
|
+
},
|
|
5456
|
+
"required": ["error"],
|
|
5457
|
+
"additionalProperties": false
|
|
5458
|
+
}
|
|
5459
|
+
}
|
|
5460
|
+
},
|
|
5461
|
+
{
|
|
5462
|
+
"name": "Suggestions d'entrée",
|
|
5463
|
+
"path": "/co2/search/globalautocomplete",
|
|
5464
|
+
"method": "POST",
|
|
5465
|
+
"constant": "SUGGESTION_INPUT",
|
|
5466
|
+
"constantCocolight": "GLOBALAUTOCOMPLETE",
|
|
5467
|
+
"functionCocolight": "suggestionInput",
|
|
5468
|
+
"auth": "none",
|
|
5469
|
+
"description": "Fournit des suggestions basées sur le nom recherché, etc.",
|
|
5470
|
+
"contentType": "application/x-www-form-urlencoded",
|
|
5471
|
+
"request": {
|
|
5472
|
+
"type": "object",
|
|
5473
|
+
"properties": {
|
|
5474
|
+
"name": {
|
|
5475
|
+
"type": "string",
|
|
5476
|
+
"description": "Nom ou terme recherché"
|
|
5477
|
+
},
|
|
5478
|
+
"searchType": {
|
|
5479
|
+
"description": "Types d'entités à inclure dans la recherche",
|
|
5480
|
+
"type": "array",
|
|
5481
|
+
"items": {
|
|
5482
|
+
"type": "string",
|
|
5483
|
+
"enum": ["organizations", "projects", "poi"]
|
|
5484
|
+
}
|
|
5485
|
+
},
|
|
5486
|
+
"indexMin": {
|
|
5487
|
+
"description": "Index minimum pour la pagination",
|
|
5488
|
+
"type": "integer",
|
|
5489
|
+
"minimum": 0,
|
|
5490
|
+
"default": 0
|
|
5491
|
+
},
|
|
5492
|
+
"indexMax": {
|
|
5493
|
+
"description": "Index maximum pour la pagination",
|
|
5494
|
+
"type": "integer",
|
|
5495
|
+
"minimum": 20,
|
|
5496
|
+
"default": 20
|
|
5497
|
+
}
|
|
5498
|
+
},
|
|
5499
|
+
"required": ["name", "searchType", "indexMin", "indexMax"],
|
|
5500
|
+
"additionalProperties": false
|
|
5501
|
+
},
|
|
5502
|
+
"responses": {
|
|
5503
|
+
"200": {
|
|
5504
|
+
"$defs": {
|
|
5505
|
+
"dateObject": {
|
|
5506
|
+
"description": "Peut être un objet { sec, usec } ou un timestamp entier (sec)",
|
|
5507
|
+
"oneOf": [
|
|
5508
|
+
{
|
|
5509
|
+
"type": "object",
|
|
5510
|
+
"required": ["sec", "usec"],
|
|
5511
|
+
"properties": {
|
|
5512
|
+
"sec": { "type": "number" },
|
|
5513
|
+
"usec": { "type": "number" }
|
|
5514
|
+
},
|
|
5515
|
+
"additionalProperties": false
|
|
5516
|
+
},
|
|
5517
|
+
{
|
|
5518
|
+
"type": "integer"
|
|
5519
|
+
}
|
|
5520
|
+
]
|
|
5521
|
+
},
|
|
5522
|
+
"_idObject": {
|
|
5523
|
+
"type": "object",
|
|
5524
|
+
"properties": {
|
|
5525
|
+
"$id": { "type": "string", "pattern": "^[a-f0-9]{24}$" }
|
|
5526
|
+
},
|
|
5527
|
+
"required": ["$id"],
|
|
5528
|
+
"additionalProperties": false
|
|
5529
|
+
},
|
|
5530
|
+
"emptyArray": {
|
|
5531
|
+
"type": "array",
|
|
5532
|
+
"minItems": 0,
|
|
5533
|
+
"maxItems": 0
|
|
5534
|
+
}
|
|
5535
|
+
},
|
|
5536
|
+
"oneOf": [
|
|
5537
|
+
{
|
|
5538
|
+
"type": "object",
|
|
5539
|
+
"description": "Réponse avec résultats de recherche",
|
|
5540
|
+
"properties": {
|
|
5541
|
+
"results": {
|
|
5542
|
+
"type":"object",
|
|
5543
|
+
"patternProperties": {
|
|
5544
|
+
"^[a-fA-F0-9]{24}$": {
|
|
5545
|
+
"type": "object",
|
|
5546
|
+
"properties": {
|
|
5547
|
+
"_id": { "$ref": "#/$defs/_idObject" },
|
|
5548
|
+
"collection": { "type": "string" },
|
|
5549
|
+
"created": { "$ref": "#/$defs/dateObject" },
|
|
5550
|
+
"name": { "type": "string" },
|
|
5551
|
+
"parent": {
|
|
5552
|
+
"type": "object",
|
|
5553
|
+
"patternProperties": {
|
|
5554
|
+
"^[a-fA-F0-9]{24}$": {
|
|
5555
|
+
"type": "object",
|
|
5556
|
+
"properties": {
|
|
5557
|
+
"name": { "type": "string" },
|
|
5558
|
+
"type": { "type": "string" }
|
|
5559
|
+
},
|
|
5560
|
+
"required": ["type"]
|
|
5561
|
+
}
|
|
5562
|
+
}
|
|
5563
|
+
},
|
|
5564
|
+
"updated": { "$ref": "#/$defs/dateObject" },
|
|
5565
|
+
"slug": { "type": "string" },
|
|
5566
|
+
"links": {
|
|
5567
|
+
"type": "object"
|
|
5568
|
+
}
|
|
5569
|
+
},
|
|
5570
|
+
"required": ["_id", "collection", "name"]
|
|
5571
|
+
}
|
|
5572
|
+
}
|
|
5573
|
+
}
|
|
5574
|
+
},
|
|
5575
|
+
"required": ["results"],
|
|
5576
|
+
"additionalProperties": false
|
|
5577
|
+
},
|
|
5578
|
+
{
|
|
5579
|
+
"type": "object",
|
|
5580
|
+
"description": "Réponse sans résultats de recherche",
|
|
5581
|
+
"properties": {
|
|
5582
|
+
"results": { "$ref": "#/$defs/emptyArray" },
|
|
5583
|
+
"count": {
|
|
5584
|
+
"type": "object",
|
|
5585
|
+
"minProperties": 1,
|
|
5586
|
+
"patternProperties": {
|
|
5587
|
+
"^[a-zA-Z][a-zA-Z0-9]*$": {
|
|
5588
|
+
"type": "integer",
|
|
5589
|
+
"const": 0
|
|
5590
|
+
}
|
|
5591
|
+
},
|
|
5592
|
+
"additionalProperties": false
|
|
5593
|
+
}
|
|
5594
|
+
},
|
|
5595
|
+
"required": ["results", "count"],
|
|
5596
|
+
"additionalProperties": false
|
|
5597
|
+
}
|
|
5598
|
+
]
|
|
5599
|
+
},
|
|
5600
|
+
"401": {
|
|
5601
|
+
"description": "Erreur d'authentification (token invalide ou expiré)",
|
|
5602
|
+
"type": "object",
|
|
5603
|
+
"properties": {
|
|
5604
|
+
"error": {
|
|
5605
|
+
"type": "string",
|
|
5606
|
+
"description": "Description de l'erreur"
|
|
5607
|
+
}
|
|
5608
|
+
},
|
|
5609
|
+
"required": ["error"],
|
|
5610
|
+
"additionalProperties": false
|
|
5611
|
+
}
|
|
5612
|
+
}
|
|
5613
|
+
},
|
|
5614
|
+
{
|
|
5615
|
+
"name": "Récupérer les projets non administrables",
|
|
5616
|
+
"path": "/co2/search/globalautocomplete",
|
|
5617
|
+
"constant": "GET_PROJECTS_NO_ADMIN",
|
|
5618
|
+
"constantCocolight": "GLOBALAUTOCOMPLETE",
|
|
5619
|
+
"functionCocolight": "getProjectsNoAdmin",
|
|
5620
|
+
"method": "POST",
|
|
5621
|
+
"auth": "none",
|
|
5622
|
+
"description": "Récupère les projets accessibles sans droits d'administration.",
|
|
5623
|
+
"contentType": "application/x-www-form-urlencoded",
|
|
5624
|
+
"request": {
|
|
5625
|
+
"type": "object",
|
|
5626
|
+
"properties": {
|
|
5627
|
+
"name": {
|
|
5628
|
+
"type": "string",
|
|
5629
|
+
"description": "Nom ou terme recherché"
|
|
5630
|
+
},
|
|
5631
|
+
"searchType": {
|
|
5632
|
+
"description": "Types d'entités à inclure dans la recherche",
|
|
5633
|
+
"type": "array",
|
|
5634
|
+
"items": {
|
|
5635
|
+
"type": "string",
|
|
5636
|
+
"enum": ["projects"]
|
|
5637
|
+
},
|
|
5638
|
+
"const": ["projects"],
|
|
5639
|
+
"default": ["projects"]
|
|
5640
|
+
},
|
|
5641
|
+
"indexMin": {
|
|
5642
|
+
"description": "Index minimum pour la pagination",
|
|
5643
|
+
"type": "integer",
|
|
5644
|
+
"minimum": 0,
|
|
5645
|
+
"default": 0
|
|
5646
|
+
},
|
|
5647
|
+
"initType": {
|
|
5648
|
+
"type": "string",
|
|
5649
|
+
"const": "",
|
|
5650
|
+
"default": "",
|
|
5651
|
+
"description": "Type initial de la recherche, vide par défaut"
|
|
5652
|
+
},
|
|
5653
|
+
"count": {
|
|
5654
|
+
"type": "boolean",
|
|
5655
|
+
"const": true,
|
|
5656
|
+
"default": true,
|
|
5657
|
+
"description": "Indique si les types doivent être comptés dans les résultats"
|
|
5658
|
+
},
|
|
5659
|
+
"countType": {
|
|
5660
|
+
"type": "array",
|
|
5661
|
+
"description": "Liste fixe des types à compter dans les résultats",
|
|
5662
|
+
"items": {
|
|
5663
|
+
"type": "string",
|
|
5664
|
+
"enum": ["projects"]
|
|
5665
|
+
},
|
|
5666
|
+
"const": ["projects"],
|
|
5667
|
+
"default": ["projects"]
|
|
5668
|
+
},
|
|
5669
|
+
"indexStep": {
|
|
5670
|
+
"type": "integer",
|
|
5671
|
+
"description": "Nombre d’éléments à récupérer (limite de pagination)",
|
|
5672
|
+
"default": 30
|
|
5673
|
+
},
|
|
5674
|
+
"notSourceKey": {
|
|
5675
|
+
"type": "boolean",
|
|
5676
|
+
"const": true,
|
|
5677
|
+
"default": true,
|
|
5678
|
+
"description": "Flag pour ne pas filtrer sur une clé de source spécifique"
|
|
5679
|
+
},
|
|
5680
|
+
"filters": {
|
|
5681
|
+
"type": "object",
|
|
5682
|
+
"properties": {
|
|
5683
|
+
"$or": {
|
|
5684
|
+
"type": "object",
|
|
5685
|
+
"patternProperties": {
|
|
5686
|
+
"^links\\.contributors\\.(?:[a-f0-9]{24}|@\\w+)$": {
|
|
5687
|
+
"type": "object",
|
|
5688
|
+
"properties": {
|
|
5689
|
+
"$exists": { "const": true }
|
|
5690
|
+
},
|
|
5691
|
+
"required": ["$exists"],
|
|
5692
|
+
"additionalProperties": false
|
|
5693
|
+
},
|
|
5694
|
+
"^parent\\.(?:[a-f0-9]{24}|@\\w+)$": {
|
|
5695
|
+
"type": "object",
|
|
5696
|
+
"properties": {
|
|
5697
|
+
"$exists": { "const": true }
|
|
5698
|
+
},
|
|
5699
|
+
"required": ["$exists"],
|
|
5700
|
+
"additionalProperties": false
|
|
5701
|
+
}
|
|
5702
|
+
},
|
|
5703
|
+
"additionalProperties": false,
|
|
5704
|
+
"minProperties": 2,
|
|
5705
|
+
"maxProperties": 2
|
|
5706
|
+
}
|
|
5707
|
+
},
|
|
5708
|
+
"patternProperties": {
|
|
5709
|
+
"^links\\.contributors\\.(?:[a-f0-9]{24}|@\\w+)$": {
|
|
5710
|
+
"type": "object",
|
|
5711
|
+
"properties": {
|
|
5712
|
+
"$exists": { "const": true }
|
|
5713
|
+
},
|
|
5714
|
+
"required": ["$exists"],
|
|
5715
|
+
"additionalProperties": false
|
|
5716
|
+
}
|
|
5717
|
+
},
|
|
5718
|
+
"required": ["$or"],
|
|
5719
|
+
"additionalProperties": false,
|
|
5720
|
+
"default": {
|
|
5721
|
+
"$or": {
|
|
5722
|
+
"links.contributors.@userId": { "$exists": true },
|
|
5723
|
+
"parent.@userId": { "$exists": true }
|
|
5724
|
+
},
|
|
5725
|
+
"links.contributors.@userId": { "$exists": true }
|
|
5726
|
+
}
|
|
5727
|
+
},
|
|
5728
|
+
"locality": {
|
|
5729
|
+
"type": "string",
|
|
5730
|
+
"const": "",
|
|
5731
|
+
"default": "",
|
|
5732
|
+
"description": "Localité vide ou spécifique"
|
|
5733
|
+
},
|
|
5734
|
+
"fediverse": {
|
|
5735
|
+
"type": "boolean",
|
|
5736
|
+
"const": false,
|
|
5737
|
+
"default": false,
|
|
5738
|
+
"description": "Indique si la recherche doit s'étendre au Fediverse (toujours désactivé)"
|
|
5739
|
+
}
|
|
5740
|
+
},
|
|
5741
|
+
"required": [
|
|
5742
|
+
"searchType",
|
|
5743
|
+
"indexMin",
|
|
5744
|
+
"initType",
|
|
5745
|
+
"count",
|
|
5746
|
+
"countType",
|
|
5747
|
+
"indexStep",
|
|
5748
|
+
"notSourceKey",
|
|
5749
|
+
"filters",
|
|
5750
|
+
"locality",
|
|
5751
|
+
"fediverse"
|
|
5752
|
+
],
|
|
5753
|
+
"additionalProperties": false
|
|
5754
|
+
}
|
|
4630
5755
|
}
|
|
4631
5756
|
]
|
|
4632
5757
|
}
|