@communecter/cocolight-api-client 1.0.1 → 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.
@@ -231,31 +231,43 @@ export default {
231
231
  "contentType": "application/json",
232
232
  "responses": {
233
233
  "200": {
234
- "type": "object",
235
- "description": "Schéma JSON pour les informations détaillées d'un utilisateur.",
236
- "properties": {
237
- "_id": {
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
- "oneOf": [
1880
- {
1881
- "type": "object",
1882
- "description": "Schéma JSON pour les informations détaillées d'un utilisateur.",
1883
- "properties": {
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
- "$id": { "type": "string" }
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
- "type": "object",
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": { "type": "integer" },
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": { "type": "integer" },
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": { "type": "integer" },
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": { "type": "integer" },
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
- "sec": { "type": "number" },
2599
- "usec": { "type": "number" }
2599
+ "$id": { "type": "string", "pattern": "^[a-f0-9]{24}$" }
2600
2600
  },
2601
- "required": ["sec", "usec"],
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
- "sec": { "type": "number" },
2865
- "usec": { "type": "number" }
2874
+ "$id": { "type": "string", "pattern": "^[a-f0-9]{24}$" }
2866
2875
  },
2867
- "required": ["sec", "usec"],
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
- "sec": { "type": "number" },
3192
- "usec": { "type": "number" }
3210
+ "$id": { "type": "string", "pattern": "^[a-f0-9]{24}$" }
3193
3211
  },
3194
- "required": ["sec", "usec"],
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
- "sec": { "type": "number" },
3898
- "usec": { "type": "number" }
3925
+ "$id": { "type": "string", "pattern": "^[a-f0-9]{24}$" }
3899
3926
  },
3900
- "required": ["sec", "usec"],
3927
+ "required": ["$id"],
3901
3928
  "additionalProperties": false
3902
3929
  },
3903
3930
  "user": {
@@ -4018,6 +4045,1711 @@ export default {
4018
4045
  }
4019
4046
  },
4020
4047
  "required": ["parentId", "parentType", "childId", "childType", "connectType" ],
4048
+ "allOf": [
4049
+ {
4050
+ "if": {
4051
+ "properties": {
4052
+ "childType": { "const": "citoyens" }
4053
+ }
4054
+ },
4055
+ "then": {
4056
+ "properties": {
4057
+ "childId": {
4058
+ "type": "string",
4059
+ "default": "@userId"
4060
+ }
4061
+ }
4062
+ }
4063
+ }
4064
+ ],
4065
+ "additionalProperties": false
4066
+ },
4067
+ "responses": {
4068
+ "200": {
4069
+ "$defs":{
4070
+ "user": {
4071
+ "type": "object",
4072
+ "properties": {
4073
+ "id": { "type": "string" },
4074
+ "name": { "type": "string" },
4075
+ "type": { "type": "string" },
4076
+ "profilThumbImageUrl": { "type": "string", "format": "uri-reference" },
4077
+ "geo": {
4078
+ "type": "object",
4079
+ "properties": {
4080
+ "@type": { "type": "string", "const": "GeoCoordinates" },
4081
+ "latitude": { "type": "string" },
4082
+ "longitude": { "type": "string" }
4083
+ },
4084
+ "required": ["@type", "latitude", "longitude"],
4085
+ "additionalProperties": false
4086
+ }
4087
+ },
4088
+ "required": ["id", "name"],
4089
+ "additionalProperties": true
4090
+ },
4091
+ "sharedUser": {
4092
+ "allOf": [
4093
+ { "$ref": "#/$defs/user" },
4094
+ {
4095
+ "type": "object",
4096
+ "properties": {
4097
+ "updated": { "$ref": "#/$defs/dateObject" },
4098
+ "comment": { "type": ["string", "null"] }
4099
+ },
4100
+ "required": ["updated", "comment"]
4101
+ }
4102
+ ]
4103
+ },
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": {
4122
+ "type": "object",
4123
+ "properties": {
4124
+ "$id": { "type": "string", "pattern": "^[a-f0-9]{24}$" }
4125
+ },
4126
+ "required": ["$id"],
4127
+ "additionalProperties": false
4128
+ }
4129
+ },
4130
+ "oneOf":[
4131
+ {
4132
+ "type": "object",
4133
+ "description": "Réponse en cas de succès du partage",
4134
+ "properties": {
4135
+ "result": {
4136
+ "type": "boolean",
4137
+ "const": true
4138
+ },
4139
+ "msg": {
4140
+ "type": "string"
4141
+ },
4142
+ "data": {
4143
+ "type": "object",
4144
+ "required": ["_id", "type", "verb", "target", "author", "object", "scope", "created", "sharedBy", "collection", "icon", "updated", "typeSig", "lastAuthorShare"],
4145
+ "properties": {
4146
+ "_id": { "$ref": "#/$defs/_idObject" },
4147
+ "type": { "type": "string", "const": "activityStream" },
4148
+ "verb": { "type": "string", "const": "share" },
4149
+ "target": { "$ref": "#/$defs/user" },
4150
+ "author": { "$ref": "#/$defs/user" },
4151
+ "object": {
4152
+ "type": "object",
4153
+ "required": ["id", "type", "authorName", "authorId", "_id", "text", "author", "date", "collection", "sharedBy", "target", "created", "markdownActive", "scope", "updated", "typeSig", "lastAuthorShare"],
4154
+ "properties": {
4155
+ "id": { "type": "string" },
4156
+ "type": { "type": "string", "const": "news" },
4157
+ "authorName": { "type": "string" },
4158
+ "authorId": { "type": "string" },
4159
+ "_id": { "$ref": "#/$defs/_idObject" },
4160
+ "text": { "type": "string" },
4161
+ "author": { "$ref": "#/$defs/user" },
4162
+ "date": { "$ref": "#/$defs/dateObject" },
4163
+ "collection": { "type": "string", "const": "news" },
4164
+ "sharedBy": {
4165
+ "type": "array",
4166
+ "items": { "$ref": "#/$defs/sharedUser" }
4167
+ },
4168
+ "target": { "$ref": "#/$defs/user" },
4169
+ "created": { "$ref": "#/$defs/dateObject" },
4170
+ "markdownActive": { "type": "boolean" },
4171
+ "scope": {
4172
+ "type": "object",
4173
+ "properties": {
4174
+ "type": { "type": "string" }
4175
+ }
4176
+ },
4177
+ "updated": { "$ref": "#/$defs/dateObject" },
4178
+ "comment": { "type": ["string", "null"] },
4179
+ "typeSig": { "type": "string" },
4180
+ "lastAuthorShare": { "$ref": "#/$defs/sharedUser" }
4181
+ }
4182
+ },
4183
+ "scope": {
4184
+ "type": "object",
4185
+ "properties": {
4186
+ "type": { "type": "string" }
4187
+ }
4188
+ },
4189
+ "created": { "$ref": "#/$defs/dateObject" },
4190
+ "sharedBy": {
4191
+ "type": "array",
4192
+ "items": { "$ref": "#/$defs/sharedUser" }
4193
+ },
4194
+ "collection": { "type": "string", "const": "news" },
4195
+ "icon": { "type": "string" },
4196
+ "imageBackground": { "type": ["string", "null"] },
4197
+ "name": { "type": ["string", "null"] },
4198
+ "updated": { "$ref": "#/$defs/dateObject" },
4199
+ "comment": { "type": ["string", "null"] },
4200
+ "typeSig": { "type": "string" },
4201
+ "lastAuthorShare": { "$ref": "#/$defs/sharedUser" }
4202
+ }
4203
+ },
4204
+ "idNews": {
4205
+ "type": "string"
4206
+ }
4207
+ },
4208
+ "required": ["result", "msg", "data", "idNews" ],
4209
+ "additionalProperties": false
4210
+ },
4211
+ {
4212
+ "type": "object",
4213
+ "description": "Réponse en cas d'échec du partage",
4214
+ "properties": {
4215
+ "result": { "type": "boolean", "const": false },
4216
+ "msg": { "type": "string" }
4217
+ },
4218
+ "required": ["result", "msg"]
4219
+ }
4220
+ ]
4221
+ },
4222
+ "401": {
4223
+ "description": "Erreur d'authentification (token invalide ou expiré)",
4224
+ "type": "object",
4225
+ "properties": {
4226
+ "error": {
4227
+ "type": "string",
4228
+ "description": "Description de l'erreur"
4229
+ }
4230
+ },
4231
+ "required": ["error"],
4232
+ "additionalProperties": false
4233
+ }
4234
+ }
4235
+ },
4236
+ {
4237
+ "name": "Récupérer les commentaires",
4238
+ "path": "/co2/comment/index/type/{type}/id/{id}/json/true",
4239
+ "constant": "GET_COMMENTS",
4240
+ "method": "POST",
4241
+ "auth": "none",
4242
+ "description": "Récupère les commentaires d’un élément.",
4243
+ "contentType": "application/x-www-form-urlencoded",
4244
+ "pathParams": {
4245
+ "type": "object",
4246
+ "properties": {
4247
+ "type": {
4248
+ "type": "string",
4249
+ "enum": ["news"],
4250
+ "default": "news",
4251
+ "description": "Type de l'élément"
4252
+ },
4253
+ "id": {
4254
+ "type": "string",
4255
+ "description": "ID de l'élément dont on veut récupérer les commentaires"
4256
+ }
4257
+ },
4258
+ "required": ["type", "id"],
4259
+ "additionalProperties": false
4260
+ },
4261
+ "responses": {
4262
+ "200": {
4263
+ "$defs": {
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": {
4282
+ "type": "object",
4283
+ "properties": {
4284
+ "$id": { "type": "string", "pattern": "^[a-f0-9]{24}$" }
4285
+ },
4286
+ "required": ["$id"],
4287
+ "additionalProperties": false
4288
+ },
4289
+ "author": {
4290
+ "type": "object",
4291
+ "required": [
4292
+ "id", "name", "typeSig"
4293
+ ],
4294
+ "properties": {
4295
+ "id": { "type": "string" },
4296
+ "name": { "type": "string" },
4297
+ "username": { "type": "string" },
4298
+ "email": { "type": "string", "format": "email" },
4299
+ "tags": { "type": ["array", "null"] },
4300
+ "profilImageUrl": { "type": "string", "format": "uri-reference" },
4301
+ "profilThumbImageUrl": { "type": "string", "format": "uri-reference" },
4302
+ "profilMarkerImageUrl": { "type": "string", "format": "uri-reference" },
4303
+ "address": {
4304
+ "type": "object"
4305
+ },
4306
+ "preferences": {
4307
+ "type": "object",
4308
+ "required": ["isOpenData", "sendMail"],
4309
+ "properties": {
4310
+ "privateFields": {
4311
+ "type": "array",
4312
+ "items": { "type": "string" }
4313
+ },
4314
+ "publicFields": {
4315
+ "type": "array",
4316
+ "items": { "type": "string" }
4317
+ },
4318
+ "isOpenData": { "type": "boolean" },
4319
+ "badge": { "type": "boolean" },
4320
+ "sendMail": { "type": "boolean" },
4321
+ "activitypub": { "type": "boolean" }
4322
+ }
4323
+ },
4324
+ "typeSig": { "type": "string" }
4325
+ }
4326
+ },
4327
+ "views": {
4328
+ "type": "object",
4329
+ "patternProperties": {
4330
+ "^[a-f0-9]{24}$": {
4331
+ "type": "object",
4332
+ "required": ["date"],
4333
+ "properties": {
4334
+ "date": { "$ref": "#/$defs/dateObject" }
4335
+ }
4336
+ }
4337
+ },
4338
+ "additionalProperties": false
4339
+ },
4340
+ "comment": {
4341
+ "type": "object",
4342
+ "required": [
4343
+ "_id", "contextId", "contextType", "parentId", "text",
4344
+ "created", "author", "collection", "status", "views",
4345
+ "postedDate", "argval", "replies"
4346
+ ],
4347
+ "properties": {
4348
+ "_id": { "$ref": "#/$defs/_idObject" },
4349
+ "contextId": { "type": "string" },
4350
+ "contextType": { "type": "string" },
4351
+ "parentId": { "type": "string" },
4352
+ "text": { "type": "string" },
4353
+ "created": { "$ref": "#/$defs/dateObject" },
4354
+ "author": { "$ref": "#/$defs/author" },
4355
+ "collection": { "type": "string", "enum": ["comments"] },
4356
+ "tags": { "type": ["array", "null"] },
4357
+ "status": { "type": "string" },
4358
+ "views": { "$ref": "#/$defs/views" },
4359
+ "postedDate": { "$ref": "#/$defs/dateObject" },
4360
+ "argval": { "type": "string" },
4361
+ "replies": {
4362
+ "anyOf": [
4363
+ {
4364
+ "type": "object",
4365
+ "patternProperties": {
4366
+ "^[a-f0-9]{24}$": { "$ref": "#/$defs/comment" }
4367
+ },
4368
+ "additionalProperties": false
4369
+ },
4370
+ {
4371
+ "type": "array",
4372
+ "maxItems": 0
4373
+ }
4374
+ ]
4375
+ }
4376
+ }
4377
+ }
4378
+ },
4379
+ "oneOf": [
4380
+ {
4381
+ "description": "Réponse sans commentaires",
4382
+ "type": "array",
4383
+ "minItems": 0,
4384
+ "maxItems": 0
4385
+ },
4386
+ {
4387
+ "description": "Réponse avec commentaires",
4388
+ "type": "object",
4389
+ "patternProperties": {
4390
+ "^[a-f0-9]{24}$": { "$ref": "#/$defs/comment" }
4391
+ },
4392
+ "additionalProperties": false
4393
+ }
4394
+ ]
4395
+ }
4396
+ }
4397
+ },
4398
+ {
4399
+ "name": "Ajouter un commentaire",
4400
+ "path": "/co2/comment/save",
4401
+ "constant": "ADD_COMMENTS",
4402
+ "method": "POST",
4403
+ "auth": "bearer",
4404
+ "description": "Ajoute un commentaire à une actualité ou autre contexte.",
4405
+ "contentType": "application/x-www-form-urlencoded",
4406
+ "request": {
4407
+ "type": "object",
4408
+ "properties": {
4409
+ "parentCommentId": {
4410
+ "type": "string",
4411
+ "description": "ID du commentaire parent (null si pas de parent)",
4412
+ "default": ""
4413
+ },
4414
+ "text": {
4415
+ "type": "string",
4416
+ "description": "Contenu du commentaire"
4417
+ },
4418
+ "contextId": {
4419
+ "type": "string",
4420
+ "description": "ID de l'élément auquel le commentaire est associé"
4421
+ },
4422
+ "contextType": {
4423
+ "type": "string",
4424
+ "enum": ["news"],
4425
+ "default": "news",
4426
+ "description": "Type de l'élément auquel le commentaire est associé"
4427
+ },
4428
+ "argval": {
4429
+ "type": "string",
4430
+ "description": "Valeur de l'argument (optionnel)",
4431
+ "default": ""
4432
+ },
4433
+ "path": {
4434
+ "type": "string",
4435
+ "description": "Chemin de l'élément (optionnel)",
4436
+ "default": ""
4437
+ },
4438
+ "mentions": {
4439
+ "type": "array",
4440
+ "items": {
4441
+ "type": "object",
4442
+ "properties": {
4443
+ "id": { "type": "string", "description": "ID de l'utilisateur mentionné" },
4444
+ "name": { "type": "string", "description": "Nom de l'utilisateur mentionné" },
4445
+ "slug": { "type": "string", "description": "Slug de l'utilisateur mentionné" },
4446
+ "type": { "type": "string", "description": "Type de l'utilisateur mentionné" },
4447
+ "value": { "type": "string", "description": "Valeur de la mention" },
4448
+ "count": { "type": "number", "description": "Nombre de fois que l'utilisateur est mentionné" }
4449
+ },
4450
+ "required": ["id", "name", "slug", "type", "value", "count"],
4451
+ "additionalProperties": false
4452
+ }
4453
+ }
4454
+ },
4455
+ "required": ["text", "contextId", "contextType"],
4456
+ "additionalProperties": false
4457
+ },
4458
+ "responses": {
4459
+ "200": {
4460
+ "$defs": {
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": {
4479
+ "type": "object",
4480
+ "properties": {
4481
+ "$id": { "type": "string", "pattern": "^[a-f0-9]{24}$" }
4482
+ },
4483
+ "required": ["$id"],
4484
+ "additionalProperties": false
4485
+ },
4486
+ "author": {
4487
+ "type": "object",
4488
+ "required": [
4489
+ "id", "name"
4490
+ ],
4491
+ "properties": {
4492
+ "id": { "type": "string" },
4493
+ "name": { "type": "string" },
4494
+ "username": { "type": "string" },
4495
+ "email": { "type": "string", "format": "email" },
4496
+ "tags": { "type": ["array", "null"] },
4497
+ "profilImageUrl": { "type": "string" },
4498
+ "profilThumbImageUrl": { "type": "string" },
4499
+ "profilMarkerImageUrl": { "type": "string" },
4500
+ "address": {
4501
+ "type": "object"
4502
+ },
4503
+ "preferences": {
4504
+ "type": "object",
4505
+ "required": ["isOpenData", "sendMail"],
4506
+ "properties": {
4507
+ "privateFields": {
4508
+ "type": "array",
4509
+ "items": { "type": "string" }
4510
+ },
4511
+ "publicFields": {
4512
+ "type": "array",
4513
+ "items": { "type": "string" }
4514
+ },
4515
+ "isOpenData": { "type": "boolean" },
4516
+ "badge": { "type": "boolean" },
4517
+ "sendMail": { "type": "boolean" },
4518
+ "activitypub": { "type": "boolean" }
4519
+ }
4520
+ },
4521
+ "typeSig": { "type": "string" }
4522
+ }
4523
+ },
4524
+ "views": {
4525
+ "type": "object",
4526
+ "patternProperties": {
4527
+ "^[a-f0-9]{24}$": {
4528
+ "type": "object",
4529
+ "required": ["date"],
4530
+ "properties": {
4531
+ "date": { "$ref": "#/$defs/dateObject" }
4532
+ }
4533
+ }
4534
+ },
4535
+ "additionalProperties": false
4536
+ },
4537
+ "comment": {
4538
+ "type": "object",
4539
+ "required": [
4540
+ "_id", "contextId", "contextType", "parentId", "text",
4541
+ "created", "author", "collection", "status", "views",
4542
+ "postedDate", "argval"
4543
+ ],
4544
+ "properties": {
4545
+ "_id": { "$ref": "#/$defs/_idObject" },
4546
+ "contextId": { "type": "string" },
4547
+ "contextType": { "type": "string" },
4548
+ "parentId": { "type": ["string", "null"] },
4549
+ "text": { "type": "string" },
4550
+ "created": { "$ref": "#/$defs/dateObject" },
4551
+ "author": { "$ref": "#/$defs/author" },
4552
+ "collection": { "type": "string", "enum": ["comments"] },
4553
+ "tags": { "type": ["array", "null"] },
4554
+ "status": { "type": "string" },
4555
+ "views": { "$ref": "#/$defs/views" },
4556
+ "postedDate": { "$ref": "#/$defs/dateObject" },
4557
+ "argval": { "type": "string" }
4558
+ }
4559
+ }
4560
+ },
4561
+ "oneOf": [
4562
+ {
4563
+ "type": "object",
4564
+ "description": "Réponse en cas de succès de l'ajout du commentaire",
4565
+ "properties": {
4566
+ "result": { "type": "boolean", "const": true },
4567
+ "msg": { "type": "string" },
4568
+ "id": { "$ref": "#/$defs/_idObject" },
4569
+ "newComment": { "$ref": "#/$defs/comment" },
4570
+ "time": {
4571
+ "type": "integer"
4572
+ }
4573
+ },
4574
+ "required": ["result", "msg", "id", "newComment", "time"],
4575
+ "additionalProperties": false
4576
+ },
4577
+ {
4578
+ "type": "object",
4579
+ "description": "Réponse en cas d'échec de l'ajout du commentaire",
4580
+ "properties": {
4581
+ "result": { "type": "boolean", "const": false },
4582
+ "msg": { "type": "string" }
4583
+ },
4584
+ "required": ["result", "msg"]
4585
+ }
4586
+ ]
4587
+ },
4588
+ "401": {
4589
+ "description": "Erreur d'authentification (token invalide ou expiré)",
4590
+ "type": "object",
4591
+ "properties": {
4592
+ "error": {
4593
+ "type": "string",
4594
+ "description": "Description de l'erreur"
4595
+ }
4596
+ },
4597
+ "required": ["error"],
4598
+ "additionalProperties": false
4599
+ }
4600
+ }
4601
+ },
4602
+ {
4603
+ "name": "Supprimer un commentaire",
4604
+ "path": "/co2/comment/delete/id/{id}",
4605
+ "constant": "DELETE_COMMENTS",
4606
+ "method": "POST",
4607
+ "auth": "bearer",
4608
+ "description": "Supprime un commentaire existant.",
4609
+ "contentType": "application/x-www-form-urlencoded",
4610
+ "pathParams": {
4611
+ "type": "object",
4612
+ "properties": {
4613
+ "id": {
4614
+ "type": "string",
4615
+ "description": "ID du commentaire à supprimer"
4616
+ }
4617
+ },
4618
+ "required": ["id"],
4619
+ "additionalProperties": false
4620
+ },
4621
+ "responses": {
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
+ },
4633
+ "oneOf": [
4634
+ {
4635
+ "type": "object",
4636
+ "description": "Réponse en cas de succès de la suppression du commentaire",
4637
+ "properties": {
4638
+ "result": { "type": "boolean", "const": true },
4639
+ "msg": { "type": "string" },
4640
+ "elt": {
4641
+ "type": "object",
4642
+ "properties": {
4643
+ "_id": { "$ref": "#/$defs/_idObject" },
4644
+ "contextId": { "type": "string" },
4645
+ "contextType": { "type": "string" },
4646
+ "parentId": { "type": ["string", "null"] }
4647
+ }
4648
+ }
4649
+ },
4650
+ "required": ["result", "msg", "elt"],
4651
+ "additionalProperties": false
4652
+ },
4653
+ {
4654
+ "type": "object",
4655
+ "description": "Réponse en cas d'échec de la suppression du commentaire",
4656
+ "properties": {
4657
+ "result": { "type": "boolean", "const": false },
4658
+ "msg": { "type": "string" }
4659
+ },
4660
+ "required": ["result", "msg"]
4661
+ }
4662
+ ]
4663
+ },
4664
+ "401": {
4665
+ "description": "Erreur d'authentification (token invalide ou expiré)",
4666
+ "type": "object",
4667
+ "properties": {
4668
+ "error": {
4669
+ "type": "string",
4670
+ "description": "Description de l'erreur"
4671
+ }
4672
+ },
4673
+ "required": ["error"],
4674
+ "additionalProperties": false
4675
+ }
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
+ ],
4021
5753
  "additionalProperties": false
4022
5754
  }
4023
5755
  }