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