@digipair/skill-mongodb 0.96.0 → 0.97.0

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/index.esm.js CHANGED
@@ -23947,14 +23947,14 @@ function indent(str, spaces) {
23947
23947
  var match = parseIdentifier(input, i1, namePart) || namePart && parseAdditionalSymbol(input, i1) || maybeSpace && parseSpaces(input, i1);
23948
23948
  // match is required
23949
23949
  if (!match) {
23950
- return i = i1, nextMatch = nextMatch1, tokens = tokens1, {
23950
+ return i = i1, tokens = tokens1, nextMatch = nextMatch1, {
23951
23951
  v: nextMatch1
23952
23952
  };
23953
23953
  }
23954
23954
  var token = match.token, offset = match.offset;
23955
23955
  i1 += offset;
23956
23956
  if (token === " ") {
23957
- return i = i1, nextMatch = nextMatch1, tokens = tokens1, "continue";
23957
+ return i = i1, tokens = tokens1, nextMatch = nextMatch1, "continue";
23958
23958
  }
23959
23959
  tokens1 = _to_consumable_array$c(tokens1).concat([
23960
23960
  token
@@ -23973,7 +23973,7 @@ function indent(str, spaces) {
23973
23973
  if (contextKeys.some(function(el) {
23974
23974
  return el.startsWith(name);
23975
23975
  })) {
23976
- return i = i1, nextMatch = nextMatch1, tokens = tokens1, "continue";
23976
+ return i = i1, tokens = tokens1, nextMatch = nextMatch1, "continue";
23977
23977
  }
23978
23978
  if (dateTimeIdentifiers.some(function(el) {
23979
23979
  return el === name;
@@ -23992,9 +23992,9 @@ function indent(str, spaces) {
23992
23992
  if (dateTimeIdentifiers.some(function(el) {
23993
23993
  return el.startsWith(name);
23994
23994
  })) {
23995
- return i = i1, nextMatch = nextMatch1, tokens = tokens1, "continue";
23995
+ return i = i1, tokens = tokens1, nextMatch = nextMatch1, "continue";
23996
23996
  }
23997
- return i = i1, nextMatch = nextMatch1, tokens = tokens1, {
23997
+ return i = i1, tokens = tokens1, nextMatch = nextMatch1, {
23998
23998
  v: nextMatch1
23999
23999
  };
24000
24000
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digipair/skill-mongodb",
3
- "version": "0.96.0",
3
+ "version": "0.97.0",
4
4
  "keywords": [
5
5
  "digipair",
6
6
  "service",
package/schema.fr.json CHANGED
@@ -32,7 +32,29 @@
32
32
  }
33
33
  }
34
34
  ],
35
- "x-events": []
35
+ "x-events": [],
36
+ "responses": {
37
+ "200": {
38
+ "description": "Connexion à la base de données établie",
39
+ "content": {
40
+ "application/json": {
41
+ "schema": {
42
+ "type": "object",
43
+ "properties": {
44
+ "client": {
45
+ "type": "object",
46
+ "description": "Instance du client MongoDB"
47
+ },
48
+ "database": {
49
+ "type": "object",
50
+ "description": "Instance de la base de données MongoDB"
51
+ }
52
+ }
53
+ }
54
+ }
55
+ }
56
+ }
57
+ }
36
58
  }
37
59
  },
38
60
  "/find": {
@@ -80,7 +102,30 @@
80
102
  }
81
103
  }
82
104
  ],
83
- "x-events": []
105
+ "x-events": [],
106
+ "responses": {
107
+ "200": {
108
+ "description": "Tableau de documents correspondant aux critères de recherche",
109
+ "content": {
110
+ "application/json": {
111
+ "schema": {
112
+ "type": "array",
113
+ "items": {
114
+ "type": "object",
115
+ "description": "Document MongoDB",
116
+ "properties": {
117
+ "_id": {
118
+ "type": "string",
119
+ "description": "Identifiant unique du document"
120
+ }
121
+ },
122
+ "additionalProperties": true
123
+ }
124
+ }
125
+ }
126
+ }
127
+ }
128
+ }
84
129
  }
85
130
  },
86
131
  "/findOne": {
@@ -128,7 +173,35 @@
128
173
  }
129
174
  }
130
175
  ],
131
- "x-events": []
176
+ "x-events": [],
177
+ "responses": {
178
+ "200": {
179
+ "description": "Document unique correspondant aux critères de recherche, ou null si non trouvé",
180
+ "content": {
181
+ "application/json": {
182
+ "schema": {
183
+ "oneOf": [
184
+ {
185
+ "type": "object",
186
+ "description": "Document MongoDB",
187
+ "properties": {
188
+ "_id": {
189
+ "type": "string",
190
+ "description": "Identifiant unique du document"
191
+ }
192
+ },
193
+ "additionalProperties": true
194
+ },
195
+ {
196
+ "type": "null",
197
+ "description": "Aucun document trouvé"
198
+ }
199
+ ]
200
+ }
201
+ }
202
+ }
203
+ }
204
+ }
132
205
  }
133
206
  },
134
207
  "/findById": {
@@ -172,11 +245,39 @@
172
245
  "required": true,
173
246
  "description": "Identifiant de l'élément",
174
247
  "schema": {
175
- "type": "object"
248
+ "type": "string"
176
249
  }
177
250
  }
178
251
  ],
179
- "x-events": []
252
+ "x-events": [],
253
+ "responses": {
254
+ "200": {
255
+ "description": "Document trouvé par ID, ou null si non trouvé",
256
+ "content": {
257
+ "application/json": {
258
+ "schema": {
259
+ "oneOf": [
260
+ {
261
+ "type": "object",
262
+ "description": "Document MongoDB",
263
+ "properties": {
264
+ "_id": {
265
+ "type": "string",
266
+ "description": "Identifiant unique du document"
267
+ }
268
+ },
269
+ "additionalProperties": true
270
+ },
271
+ {
272
+ "type": "null",
273
+ "description": "Aucun document trouvé avec l'ID spécifié"
274
+ }
275
+ ]
276
+ }
277
+ }
278
+ }
279
+ }
280
+ }
180
281
  }
181
282
  },
182
283
  "/insertOne": {
@@ -200,7 +301,7 @@
200
301
  "name": "options",
201
302
  "summary": "Options",
202
303
  "required": false,
203
- "description": "Options de recherche",
304
+ "description": "Options d'insertion",
204
305
  "schema": {
205
306
  "type": "object"
206
307
  }
@@ -224,7 +325,30 @@
224
325
  }
225
326
  }
226
327
  ],
227
- "x-events": []
328
+ "x-events": [],
329
+ "responses": {
330
+ "200": {
331
+ "description": "Résultat de l'opération d'insertion",
332
+ "content": {
333
+ "application/json": {
334
+ "schema": {
335
+ "type": "object",
336
+ "properties": {
337
+ "acknowledged": {
338
+ "type": "boolean",
339
+ "description": "Indique si l'opération a été reconnue par MongoDB"
340
+ },
341
+ "insertedId": {
342
+ "type": "string",
343
+ "description": "L'ObjectId du document inséré"
344
+ }
345
+ },
346
+ "required": ["acknowledged", "insertedId"]
347
+ }
348
+ }
349
+ }
350
+ }
351
+ }
228
352
  }
229
353
  },
230
354
  "/updateOne": {
@@ -248,7 +372,7 @@
248
372
  "name": "options",
249
373
  "summary": "Options",
250
374
  "required": false,
251
- "description": "Options de recherche",
375
+ "description": "Options de mise à jour",
252
376
  "schema": {
253
377
  "type": "object"
254
378
  }
@@ -281,7 +405,42 @@
281
405
  }
282
406
  }
283
407
  ],
284
- "x-events": []
408
+ "x-events": [],
409
+ "responses": {
410
+ "200": {
411
+ "description": "Résultat de l'opération de mise à jour",
412
+ "content": {
413
+ "application/json": {
414
+ "schema": {
415
+ "type": "object",
416
+ "properties": {
417
+ "acknowledged": {
418
+ "type": "boolean",
419
+ "description": "Indique si l'opération a été reconnue par MongoDB"
420
+ },
421
+ "matchedCount": {
422
+ "type": "number",
423
+ "description": "Nombre de documents correspondant au filtre"
424
+ },
425
+ "modifiedCount": {
426
+ "type": "number",
427
+ "description": "Nombre de documents effectivement modifiés"
428
+ },
429
+ "upsertedCount": {
430
+ "type": "number",
431
+ "description": "Nombre de documents insérés (upsert)"
432
+ },
433
+ "upsertedId": {
434
+ "type": ["string", "null"],
435
+ "description": "L'ObjectId du document inséré (upsert), le cas échéant"
436
+ }
437
+ },
438
+ "required": ["acknowledged", "matchedCount", "modifiedCount", "upsertedCount"]
439
+ }
440
+ }
441
+ }
442
+ }
443
+ }
285
444
  }
286
445
  },
287
446
  "/updateById": {
@@ -305,7 +464,7 @@
305
464
  "name": "options",
306
465
  "summary": "Options",
307
466
  "required": false,
308
- "description": "Options de recherche",
467
+ "description": "Options de mise à jour",
309
468
  "schema": {
310
469
  "type": "object"
311
470
  }
@@ -338,7 +497,42 @@
338
497
  }
339
498
  }
340
499
  ],
341
- "x-events": []
500
+ "x-events": [],
501
+ "responses": {
502
+ "200": {
503
+ "description": "Résultat de l'opération de mise à jour",
504
+ "content": {
505
+ "application/json": {
506
+ "schema": {
507
+ "type": "object",
508
+ "properties": {
509
+ "acknowledged": {
510
+ "type": "boolean",
511
+ "description": "Indique si l'opération a été reconnue par MongoDB"
512
+ },
513
+ "matchedCount": {
514
+ "type": "number",
515
+ "description": "Nombre de documents correspondant au filtre"
516
+ },
517
+ "modifiedCount": {
518
+ "type": "number",
519
+ "description": "Nombre de documents effectivement modifiés"
520
+ },
521
+ "upsertedCount": {
522
+ "type": "number",
523
+ "description": "Nombre de documents insérés (upsert)"
524
+ },
525
+ "upsertedId": {
526
+ "type": ["string", "null"],
527
+ "description": "L'ObjectId du document inséré (upsert), le cas échéant"
528
+ }
529
+ },
530
+ "required": ["acknowledged", "matchedCount", "modifiedCount", "upsertedCount"]
531
+ }
532
+ }
533
+ }
534
+ }
535
+ }
342
536
  }
343
537
  }
344
538
  },
package/schema.json CHANGED
@@ -32,7 +32,29 @@
32
32
  }
33
33
  }
34
34
  ],
35
- "x-events": []
35
+ "x-events": [],
36
+ "responses": {
37
+ "200": {
38
+ "description": "Database connection established",
39
+ "content": {
40
+ "application/json": {
41
+ "schema": {
42
+ "type": "object",
43
+ "properties": {
44
+ "client": {
45
+ "type": "object",
46
+ "description": "MongoDB client instance"
47
+ },
48
+ "database": {
49
+ "type": "object",
50
+ "description": "MongoDB database instance"
51
+ }
52
+ }
53
+ }
54
+ }
55
+ }
56
+ }
57
+ }
36
58
  }
37
59
  },
38
60
  "/find": {
@@ -80,7 +102,30 @@
80
102
  }
81
103
  }
82
104
  ],
83
- "x-events": []
105
+ "x-events": [],
106
+ "responses": {
107
+ "200": {
108
+ "description": "Array of documents matching the search criteria",
109
+ "content": {
110
+ "application/json": {
111
+ "schema": {
112
+ "type": "array",
113
+ "items": {
114
+ "type": "object",
115
+ "description": "MongoDB document",
116
+ "properties": {
117
+ "_id": {
118
+ "type": "string",
119
+ "description": "Document unique identifier"
120
+ }
121
+ },
122
+ "additionalProperties": true
123
+ }
124
+ }
125
+ }
126
+ }
127
+ }
128
+ }
84
129
  }
85
130
  },
86
131
  "/findOne": {
@@ -128,7 +173,35 @@
128
173
  }
129
174
  }
130
175
  ],
131
- "x-events": []
176
+ "x-events": [],
177
+ "responses": {
178
+ "200": {
179
+ "description": "Single document matching the search criteria, or null if not found",
180
+ "content": {
181
+ "application/json": {
182
+ "schema": {
183
+ "oneOf": [
184
+ {
185
+ "type": "object",
186
+ "description": "MongoDB document",
187
+ "properties": {
188
+ "_id": {
189
+ "type": "string",
190
+ "description": "Document unique identifier"
191
+ }
192
+ },
193
+ "additionalProperties": true
194
+ },
195
+ {
196
+ "type": "null",
197
+ "description": "No document found"
198
+ }
199
+ ]
200
+ }
201
+ }
202
+ }
203
+ }
204
+ }
132
205
  }
133
206
  },
134
207
  "/findById": {
@@ -172,11 +245,39 @@
172
245
  "required": true,
173
246
  "description": "Identifier of the item",
174
247
  "schema": {
175
- "type": "object"
248
+ "type": "string"
176
249
  }
177
250
  }
178
251
  ],
179
- "x-events": []
252
+ "x-events": [],
253
+ "responses": {
254
+ "200": {
255
+ "description": "Document found by ID, or null if not found",
256
+ "content": {
257
+ "application/json": {
258
+ "schema": {
259
+ "oneOf": [
260
+ {
261
+ "type": "object",
262
+ "description": "MongoDB document",
263
+ "properties": {
264
+ "_id": {
265
+ "type": "string",
266
+ "description": "Document unique identifier"
267
+ }
268
+ },
269
+ "additionalProperties": true
270
+ },
271
+ {
272
+ "type": "null",
273
+ "description": "No document found with the specified ID"
274
+ }
275
+ ]
276
+ }
277
+ }
278
+ }
279
+ }
280
+ }
180
281
  }
181
282
  },
182
283
  "/insertOne": {
@@ -224,7 +325,30 @@
224
325
  }
225
326
  }
226
327
  ],
227
- "x-events": []
328
+ "x-events": [],
329
+ "responses": {
330
+ "200": {
331
+ "description": "Result of the insert operation",
332
+ "content": {
333
+ "application/json": {
334
+ "schema": {
335
+ "type": "object",
336
+ "properties": {
337
+ "acknowledged": {
338
+ "type": "boolean",
339
+ "description": "Whether the operation was acknowledged by MongoDB"
340
+ },
341
+ "insertedId": {
342
+ "type": "string",
343
+ "description": "The ObjectId of the inserted document"
344
+ }
345
+ },
346
+ "required": ["acknowledged", "insertedId"]
347
+ }
348
+ }
349
+ }
350
+ }
351
+ }
228
352
  }
229
353
  },
230
354
  "/updateOne": {
@@ -281,7 +405,42 @@
281
405
  }
282
406
  }
283
407
  ],
284
- "x-events": []
408
+ "x-events": [],
409
+ "responses": {
410
+ "200": {
411
+ "description": "Result of the update operation",
412
+ "content": {
413
+ "application/json": {
414
+ "schema": {
415
+ "type": "object",
416
+ "properties": {
417
+ "acknowledged": {
418
+ "type": "boolean",
419
+ "description": "Whether the operation was acknowledged by MongoDB"
420
+ },
421
+ "matchedCount": {
422
+ "type": "number",
423
+ "description": "Number of documents that matched the filter"
424
+ },
425
+ "modifiedCount": {
426
+ "type": "number",
427
+ "description": "Number of documents that were actually modified"
428
+ },
429
+ "upsertedCount": {
430
+ "type": "number",
431
+ "description": "Number of documents that were upserted"
432
+ },
433
+ "upsertedId": {
434
+ "type": ["string", "null"],
435
+ "description": "The ObjectId of the upserted document, if any"
436
+ }
437
+ },
438
+ "required": ["acknowledged", "matchedCount", "modifiedCount", "upsertedCount"]
439
+ }
440
+ }
441
+ }
442
+ }
443
+ }
285
444
  }
286
445
  },
287
446
  "/updateById": {
@@ -338,7 +497,42 @@
338
497
  }
339
498
  }
340
499
  ],
341
- "x-events": []
500
+ "x-events": [],
501
+ "responses": {
502
+ "200": {
503
+ "description": "Result of the update operation",
504
+ "content": {
505
+ "application/json": {
506
+ "schema": {
507
+ "type": "object",
508
+ "properties": {
509
+ "acknowledged": {
510
+ "type": "boolean",
511
+ "description": "Whether the operation was acknowledged by MongoDB"
512
+ },
513
+ "matchedCount": {
514
+ "type": "number",
515
+ "description": "Number of documents that matched the filter"
516
+ },
517
+ "modifiedCount": {
518
+ "type": "number",
519
+ "description": "Number of documents that were actually modified"
520
+ },
521
+ "upsertedCount": {
522
+ "type": "number",
523
+ "description": "Number of documents that were upserted"
524
+ },
525
+ "upsertedId": {
526
+ "type": ["string", "null"],
527
+ "description": "The ObjectId of the upserted document, if any"
528
+ }
529
+ },
530
+ "required": ["acknowledged", "matchedCount", "modifiedCount", "upsertedCount"]
531
+ }
532
+ }
533
+ }
534
+ }
535
+ }
342
536
  }
343
537
  }
344
538
  },