@sfxcode/nuxt-mongocamp-server 1.7.0 → 1.8.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.
Files changed (103) hide show
  1. package/README.md +8 -0
  2. package/dist/module.json +1 -1
  3. package/dist/module.mjs +1 -1
  4. package/dist/runtime/api/.openapi-generator/FILES +18 -0
  5. package/dist/runtime/api/apis/AdminApi.d.ts +1 -1
  6. package/dist/runtime/api/apis/ApplicationApi.d.ts +1 -1
  7. package/dist/runtime/api/apis/AuthApi.d.ts +1 -1
  8. package/dist/runtime/api/apis/BucketApi.d.ts +1 -1
  9. package/dist/runtime/api/apis/CollectionApi.d.ts +58 -2
  10. package/dist/runtime/api/apis/CollectionApi.js +183 -0
  11. package/dist/runtime/api/apis/DatabaseApi.d.ts +1 -1
  12. package/dist/runtime/api/apis/DocumentApi.d.ts +47 -2
  13. package/dist/runtime/api/apis/DocumentApi.js +145 -0
  14. package/dist/runtime/api/apis/FileApi.d.ts +1 -1
  15. package/dist/runtime/api/apis/IndexApi.d.ts +19 -2
  16. package/dist/runtime/api/apis/IndexApi.js +52 -0
  17. package/dist/runtime/api/apis/JobsApi.d.ts +1 -1
  18. package/dist/runtime/api/apis/SystemApi.d.ts +1 -1
  19. package/dist/runtime/api/docs/CollectionApi.md +253 -1
  20. package/dist/runtime/api/docs/CopyRequest.md +40 -0
  21. package/dist/runtime/api/docs/CopyResponse.md +38 -0
  22. package/dist/runtime/api/docs/DocumentApi.md +196 -5
  23. package/dist/runtime/api/docs/FieldInfo.md +36 -0
  24. package/dist/runtime/api/docs/FieldTypeCount.md +36 -0
  25. package/dist/runtime/api/docs/ImportResponse.md +42 -0
  26. package/dist/runtime/api/docs/IndexApi.md +78 -0
  27. package/dist/runtime/api/docs/IndexCreateRequest.md +2 -0
  28. package/dist/runtime/api/docs/IndexInfo.md +54 -0
  29. package/dist/runtime/api/docs/IndexKey.md +36 -0
  30. package/dist/runtime/api/docs/IndexOptionsRequest.md +10 -0
  31. package/dist/runtime/api/docs/RenameRequest.md +36 -0
  32. package/dist/runtime/api/docs/RenameResponse.md +34 -0
  33. package/dist/runtime/api/models/BucketInformation.d.ts +1 -1
  34. package/dist/runtime/api/models/ClusterInformation.d.ts +1 -1
  35. package/dist/runtime/api/models/ClusterMemberInformation.d.ts +1 -1
  36. package/dist/runtime/api/models/CollectionPermission.d.ts +1 -1
  37. package/dist/runtime/api/models/CollectionStatus.d.ts +1 -1
  38. package/dist/runtime/api/models/CollectionSummary.d.ts +1 -1
  39. package/dist/runtime/api/models/CopyRequest.d.ts +50 -0
  40. package/dist/runtime/api/models/CopyRequest.js +32 -0
  41. package/dist/runtime/api/models/CopyResponse.d.ts +44 -0
  42. package/dist/runtime/api/models/CopyResponse.js +32 -0
  43. package/dist/runtime/api/models/CountResponse.d.ts +1 -1
  44. package/dist/runtime/api/models/DatabaseInfo.d.ts +1 -1
  45. package/dist/runtime/api/models/DeleteResponse.d.ts +1 -1
  46. package/dist/runtime/api/models/ErrorDescription.d.ts +1 -1
  47. package/dist/runtime/api/models/FieldInfo.d.ts +39 -0
  48. package/dist/runtime/api/models/FieldInfo.js +32 -0
  49. package/dist/runtime/api/models/FieldTypeCount.d.ts +38 -0
  50. package/dist/runtime/api/models/FieldTypeCount.js +29 -0
  51. package/dist/runtime/api/models/FileInformation.d.ts +1 -1
  52. package/dist/runtime/api/models/Grant.d.ts +1 -1
  53. package/dist/runtime/api/models/ImportResponse.d.ts +57 -0
  54. package/dist/runtime/api/models/ImportResponse.js +41 -0
  55. package/dist/runtime/api/models/IndexCreateRequest.d.ts +9 -2
  56. package/dist/runtime/api/models/IndexCreateRequest.js +9 -4
  57. package/dist/runtime/api/models/IndexCreateResponse.d.ts +1 -1
  58. package/dist/runtime/api/models/IndexDropResponse.d.ts +1 -1
  59. package/dist/runtime/api/models/IndexInfo.d.ts +99 -0
  60. package/dist/runtime/api/models/IndexInfo.js +54 -0
  61. package/dist/runtime/api/models/IndexKey.d.ts +38 -0
  62. package/dist/runtime/api/models/IndexKey.js +29 -0
  63. package/dist/runtime/api/models/IndexOptionsRequest.d.ts +37 -1
  64. package/dist/runtime/api/models/IndexOptionsRequest.js +12 -2
  65. package/dist/runtime/api/models/IndexUsage.d.ts +1 -1
  66. package/dist/runtime/api/models/InsertError.d.ts +1 -1
  67. package/dist/runtime/api/models/InsertResponse.d.ts +1 -1
  68. package/dist/runtime/api/models/JobConfig.d.ts +1 -1
  69. package/dist/runtime/api/models/JobInformation.d.ts +1 -1
  70. package/dist/runtime/api/models/JsonSchema.d.ts +1 -1
  71. package/dist/runtime/api/models/JsonSchemaDefinition.d.ts +1 -1
  72. package/dist/runtime/api/models/JsonValueAny.d.ts +1 -1
  73. package/dist/runtime/api/models/JsonValueBoolean.d.ts +1 -1
  74. package/dist/runtime/api/models/JsonValueString.d.ts +1 -1
  75. package/dist/runtime/api/models/Login.d.ts +1 -1
  76. package/dist/runtime/api/models/LoginResult.d.ts +1 -1
  77. package/dist/runtime/api/models/MongoAggregateRequest.d.ts +1 -1
  78. package/dist/runtime/api/models/MongoCampConfiguration.d.ts +1 -1
  79. package/dist/runtime/api/models/MongoFindRequest.d.ts +1 -1
  80. package/dist/runtime/api/models/MongoIndex.d.ts +1 -1
  81. package/dist/runtime/api/models/PasswordUpdateRequest.d.ts +1 -1
  82. package/dist/runtime/api/models/PipelineStage.d.ts +1 -1
  83. package/dist/runtime/api/models/RenameRequest.d.ts +38 -0
  84. package/dist/runtime/api/models/RenameRequest.js +28 -0
  85. package/dist/runtime/api/models/RenameResponse.d.ts +32 -0
  86. package/dist/runtime/api/models/RenameResponse.js +26 -0
  87. package/dist/runtime/api/models/Role.d.ts +1 -1
  88. package/dist/runtime/api/models/SchemaAnalysis.d.ts +1 -1
  89. package/dist/runtime/api/models/SchemaAnalysisField.d.ts +1 -1
  90. package/dist/runtime/api/models/SchemaAnalysisFieldType.d.ts +1 -1
  91. package/dist/runtime/api/models/SearchRequest.d.ts +1 -1
  92. package/dist/runtime/api/models/SettingsResponse.d.ts +1 -1
  93. package/dist/runtime/api/models/UpdateFileInformationRequest.d.ts +1 -1
  94. package/dist/runtime/api/models/UpdateRequest.d.ts +1 -1
  95. package/dist/runtime/api/models/UpdateResponse.d.ts +1 -1
  96. package/dist/runtime/api/models/UpdateRoleRequest.d.ts +1 -1
  97. package/dist/runtime/api/models/UserInformation.d.ts +1 -1
  98. package/dist/runtime/api/models/UserProfile.d.ts +1 -1
  99. package/dist/runtime/api/models/Version.d.ts +1 -1
  100. package/dist/runtime/api/models/index.d.ts +9 -0
  101. package/dist/runtime/api/models/index.js +9 -0
  102. package/dist/runtime/api/runtime.d.ts +1 -1
  103. package/package.json +2 -2
@@ -0,0 +1,40 @@
1
+
2
+ # CopyRequest
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `target` | string
10
+ `filter` | string
11
+ `withIndexes` | boolean
12
+ `dropTarget` | boolean
13
+
14
+ ## Example
15
+
16
+ ```typescript
17
+ import type { CopyRequest } from ''
18
+
19
+ // TODO: Update the object below with actual values
20
+ const example = {
21
+ "target": null,
22
+ "filter": null,
23
+ "withIndexes": null,
24
+ "dropTarget": null,
25
+ } satisfies CopyRequest
26
+
27
+ console.log(example)
28
+
29
+ // Convert the instance to a JSON string
30
+ const exampleJSON: string = JSON.stringify(example)
31
+ console.log(exampleJSON)
32
+
33
+ // Parse the JSON string back to an object
34
+ const exampleParsed = JSON.parse(exampleJSON) as CopyRequest
35
+ console.log(exampleParsed)
36
+ ```
37
+
38
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
39
+
40
+
@@ -0,0 +1,38 @@
1
+
2
+ # CopyResponse
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `name` | string
10
+ `count` | number
11
+ `indexes` | number
12
+
13
+ ## Example
14
+
15
+ ```typescript
16
+ import type { CopyResponse } from ''
17
+
18
+ // TODO: Update the object below with actual values
19
+ const example = {
20
+ "name": null,
21
+ "count": null,
22
+ "indexes": null,
23
+ } satisfies CopyResponse
24
+
25
+ console.log(example)
26
+
27
+ // Convert the instance to a JSON string
28
+ const exampleJSON: string = JSON.stringify(example)
29
+ console.log(exampleJSON)
30
+
31
+ // Parse the JSON string back to an object
32
+ const exampleParsed = JSON.parse(exampleJSON) as CopyResponse
33
+ console.log(exampleParsed)
34
+ ```
35
+
36
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
37
+
38
+
@@ -7,8 +7,10 @@ All URIs are relative to *http://localhost*
7
7
  | [**_delete**](DocumentApi.md#_delete) | **DELETE** /mongodb/collections/{collectionName}/documents/{documentId} | Delete Document from Collection |
8
8
  | [**countDocuments**](DocumentApi.md#countdocuments) | **GET** /mongodb/collections/{collectionName}/documents/count | Count Documents in Collection |
9
9
  | [**deleteMany**](DocumentApi.md#deletemany) | **DELETE** /mongodb/collections/{collectionName}/documents/many/delete | Delete Many in Collection |
10
+ | [**exportDocuments**](DocumentApi.md#exportdocuments) | **GET** /mongodb/collections/{collectionName}/documents/export | Export Documents of a Collection |
10
11
  | [**find**](DocumentApi.md#find) | **POST** /mongodb/collections/{collectionName}/documents | Documents in Collection |
11
12
  | [**getDocument**](DocumentApi.md#getdocument) | **GET** /mongodb/collections/{collectionName}/documents/{documentId} | Document from Collection |
13
+ | [**importDocuments**](DocumentApi.md#importdocuments) | **POST** /mongodb/collections/{collectionName}/documents/import | Import Documents into a Collection |
12
14
  | [**insert**](DocumentApi.md#insert) | **PUT** /mongodb/collections/{collectionName}/documents | Insert Document |
13
15
  | [**insertMany**](DocumentApi.md#insertmany) | **PUT** /mongodb/collections/{collectionName}/documents/many/insert | Insert many Documents |
14
16
  | [**listDocuments**](DocumentApi.md#listdocuments) | **GET** /mongodb/collections/{collectionName}/documents | Documents in Collection |
@@ -266,9 +268,105 @@ example().catch(console.error);
266
268
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
267
269
 
268
270
 
271
+ ## exportDocuments
272
+
273
+ > string exportDocuments(collectionName, format, filter, sort, projection, limit, extendedJson)
274
+
275
+ Export Documents of a Collection
276
+
277
+ Download the documents of a Collection as a stream: ndjson (one JSON document per line), json (one array) or csv (a header line, nested values as JSON, a text with a comma, a quote or a line break in quotes). The documents are written while the database delivers them, the memory of the server does not depend on the size of the Collection. The columns of a csv export are the fields of `projection`, by default the fields of the first 1000 documents. With extendedJson the types of the values are explicit. A failure while the stream is running ends the stream, the status is 200 by then.
278
+
279
+ ### Example
280
+
281
+ ```ts
282
+ import {
283
+ Configuration,
284
+ DocumentApi,
285
+ } from '';
286
+ import type { ExportDocumentsRequest } from '';
287
+
288
+ async function example() {
289
+ console.log("🚀 Testing SDK...");
290
+ const config = new Configuration({
291
+ // To configure HTTP basic authorization: httpAuth1
292
+ username: "YOUR USERNAME",
293
+ password: "YOUR PASSWORD",
294
+ // Configure HTTP bearer authorization: httpAuth
295
+ accessToken: "YOUR BEARER TOKEN",
296
+ // To configure API key authorization: apiKeyAuth
297
+ apiKey: "YOUR API KEY",
298
+ });
299
+ const api = new DocumentApi(config);
300
+
301
+ const body = {
302
+ // string | The name of your MongoDb Collection
303
+ collectionName: collectionName_example,
304
+ // string | ndjson (one JSON document per line), json (one array) or csv (optional)
305
+ format: format_example,
306
+ // string | Filter Query like on the list of documents, by default all documents are exported (optional)
307
+ filter: filter_example,
308
+ // Array<string> | Sorting like on the list of documents, a leading - sorts descending (optional)
309
+ sort: ...,
310
+ // Array<string> | The fields to export, for csv they are the columns in this order (optional)
311
+ projection: ...,
312
+ // number | The greatest number of documents, by default all (optional)
313
+ limit: 56,
314
+ // string | relaxed or canonical: the documents with the types of their values as MongoDB Extended JSON ({\"$oid\": ...}, {\"$date\": ...}, {\"$numberDecimal\": ...}, canonical also {\"$numberInt\": ...}, {\"$numberLong\": ...} and {\"$numberDouble\": ...}). Without the parameter the documents are returned as before. (optional)
315
+ extendedJson: extendedJson_example,
316
+ } satisfies ExportDocumentsRequest;
317
+
318
+ try {
319
+ const data = await api.exportDocuments(body);
320
+ console.log(data);
321
+ } catch (error) {
322
+ console.error(error);
323
+ }
324
+ }
325
+
326
+ // Run the test
327
+ example().catch(console.error);
328
+ ```
329
+
330
+ ### Parameters
331
+
332
+
333
+ | Name | Type | Description | Notes |
334
+ |------------- | ------------- | ------------- | -------------|
335
+ | **collectionName** | `string` | The name of your MongoDb Collection | [Defaults to `undefined`] |
336
+ | **format** | `string` | ndjson (one JSON document per line), json (one array) or csv | [Optional] [Defaults to `&#39;ndjson&#39;`] |
337
+ | **filter** | `string` | Filter Query like on the list of documents, by default all documents are exported | [Optional] [Defaults to `undefined`] |
338
+ | **sort** | `Array<string>` | Sorting like on the list of documents, a leading - sorts descending | [Optional] |
339
+ | **projection** | `Array<string>` | The fields to export, for csv they are the columns in this order | [Optional] |
340
+ | **limit** | `number` | The greatest number of documents, by default all | [Optional] [Defaults to `undefined`] |
341
+ | **extendedJson** | `string` | relaxed or canonical: the documents with the types of their values as MongoDB Extended JSON ({\&quot;$oid\&quot;: ...}, {\&quot;$date\&quot;: ...}, {\&quot;$numberDecimal\&quot;: ...}, canonical also {\&quot;$numberInt\&quot;: ...}, {\&quot;$numberLong\&quot;: ...} and {\&quot;$numberDouble\&quot;: ...}). Without the parameter the documents are returned as before. | [Optional] [Defaults to `undefined`] |
342
+
343
+ ### Return type
344
+
345
+ **string**
346
+
347
+ ### Authorization
348
+
349
+ [httpAuth1](../README.md#httpAuth1), [httpAuth](../README.md#httpAuth), [apiKeyAuth](../README.md#apiKeyAuth)
350
+
351
+ ### HTTP request headers
352
+
353
+ - **Content-Type**: Not defined
354
+ - **Accept**: `text/plain`, `application/json`
355
+
356
+
357
+ ### HTTP response details
358
+ | Status code | Description | Response headers |
359
+ |-------------|-------------|------------------|
360
+ | **200** | | * Content-Disposition - <br> |
361
+ | **400** | Invalid value for: query parameter limit | - |
362
+ | **0** | | * x-error-code - Error Code <br> * x-error-message - Message of the MongoCampException <br> * x-error-additional-info - Additional information for the MongoCampException <br> |
363
+
364
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
365
+
366
+
269
367
  ## find
270
368
 
271
- > Array&lt;{ [key: string]: any; }&gt; find(collectionName, mongoFindRequest, rowsPerPage, page)
369
+ > Array&lt;{ [key: string]: any; }&gt; find(collectionName, mongoFindRequest, rowsPerPage, page, extendedJson)
272
370
 
273
371
  Documents in Collection
274
372
 
@@ -305,6 +403,8 @@ async function example() {
305
403
  rowsPerPage: 100,
306
404
  // number | Requested page of the ResultSets (optional)
307
405
  page: 1,
406
+ // string | relaxed or canonical: the documents with the types of their values as MongoDB Extended JSON ({\"$oid\": ...}, {\"$date\": ...}, {\"$numberDecimal\": ...}, canonical also {\"$numberInt\": ...}, {\"$numberLong\": ...} and {\"$numberDouble\": ...}). Without the parameter the documents are returned as before. (optional)
407
+ extendedJson: extendedJson_example,
308
408
  } satisfies FindRequest;
309
409
 
310
410
  try {
@@ -328,6 +428,7 @@ example().catch(console.error);
328
428
  | **mongoFindRequest** | [MongoFindRequest](MongoFindRequest.md) | | |
329
429
  | **rowsPerPage** | `number` | Count elements per page | [Optional] [Defaults to `undefined`] |
330
430
  | **page** | `number` | Requested page of the ResultSets | [Optional] [Defaults to `undefined`] |
431
+ | **extendedJson** | `string` | relaxed or canonical: the documents with the types of their values as MongoDB Extended JSON ({\&quot;$oid\&quot;: ...}, {\&quot;$date\&quot;: ...}, {\&quot;$numberDecimal\&quot;: ...}, canonical also {\&quot;$numberInt\&quot;: ...}, {\&quot;$numberLong\&quot;: ...} and {\&quot;$numberDouble\&quot;: ...}). Without the parameter the documents are returned as before. | [Optional] [Defaults to `undefined`] |
331
432
 
332
433
  ### Return type
333
434
 
@@ -355,7 +456,7 @@ example().catch(console.error);
355
456
 
356
457
  ## getDocument
357
458
 
358
- > { [key: string]: any; } getDocument(collectionName, documentId)
459
+ > { [key: string]: any; } getDocument(collectionName, documentId, extendedJson)
359
460
 
360
461
  Document from Collection
361
462
 
@@ -388,6 +489,8 @@ async function example() {
388
489
  collectionName: collectionName_example,
389
490
  // string | DocumentId to read
390
491
  documentId: documentId_example,
492
+ // string | relaxed or canonical: the documents with the types of their values as MongoDB Extended JSON ({\"$oid\": ...}, {\"$date\": ...}, {\"$numberDecimal\": ...}, canonical also {\"$numberInt\": ...}, {\"$numberLong\": ...} and {\"$numberDouble\": ...}). Without the parameter the documents are returned as before. (optional)
493
+ extendedJson: extendedJson_example,
391
494
  } satisfies GetDocumentRequest;
392
495
 
393
496
  try {
@@ -409,6 +512,7 @@ example().catch(console.error);
409
512
  |------------- | ------------- | ------------- | -------------|
410
513
  | **collectionName** | `string` | The name of your MongoDb Collection | [Defaults to `undefined`] |
411
514
  | **documentId** | `string` | DocumentId to read | [Defaults to `undefined`] |
515
+ | **extendedJson** | `string` | relaxed or canonical: the documents with the types of their values as MongoDB Extended JSON ({\&quot;$oid\&quot;: ...}, {\&quot;$date\&quot;: ...}, {\&quot;$numberDecimal\&quot;: ...}, canonical also {\&quot;$numberInt\&quot;: ...}, {\&quot;$numberLong\&quot;: ...} and {\&quot;$numberDouble\&quot;: ...}). Without the parameter the documents are returned as before. | [Optional] [Defaults to `undefined`] |
412
516
 
413
517
  ### Return type
414
518
 
@@ -433,6 +537,87 @@ example().catch(console.error);
433
537
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
434
538
 
435
539
 
540
+ ## importDocuments
541
+
542
+ > ImportResponse importDocuments(collectionName, body)
543
+
544
+ Import Documents into a Collection
545
+
546
+ Store the documents of the request body: one JSON document per line (NDJSON, as written by the export). A line is read like a document in the body of an insert (Extended JSON wrappers, dates). The body is read as a stream and the documents are stored in batches without ordering, a line that cannot be stored does not stop the others: the answer counts what was read, stored and failed and names the first failed lines (&#x60;errors&#x60;, &#x60;index&#x60; is the number of the line). The size of the body is limited by IMPORT_MAX_BYTES (413 above), there is no time limit.
547
+
548
+ ### Example
549
+
550
+ ```ts
551
+ import {
552
+ Configuration,
553
+ DocumentApi,
554
+ } from '';
555
+ import type { ImportDocumentsRequest } from '';
556
+
557
+ async function example() {
558
+ console.log("🚀 Testing SDK...");
559
+ const config = new Configuration({
560
+ // To configure HTTP basic authorization: httpAuth1
561
+ username: "YOUR USERNAME",
562
+ password: "YOUR PASSWORD",
563
+ // Configure HTTP bearer authorization: httpAuth
564
+ accessToken: "YOUR BEARER TOKEN",
565
+ // To configure API key authorization: apiKeyAuth
566
+ apiKey: "YOUR API KEY",
567
+ });
568
+ const api = new DocumentApi(config);
569
+
570
+ const body = {
571
+ // string | The name of your MongoDb Collection
572
+ collectionName: collectionName_example,
573
+ // string
574
+ body: body_example,
575
+ } satisfies ImportDocumentsRequest;
576
+
577
+ try {
578
+ const data = await api.importDocuments(body);
579
+ console.log(data);
580
+ } catch (error) {
581
+ console.error(error);
582
+ }
583
+ }
584
+
585
+ // Run the test
586
+ example().catch(console.error);
587
+ ```
588
+
589
+ ### Parameters
590
+
591
+
592
+ | Name | Type | Description | Notes |
593
+ |------------- | ------------- | ------------- | -------------|
594
+ | **collectionName** | `string` | The name of your MongoDb Collection | [Defaults to `undefined`] |
595
+ | **body** | `string` | | |
596
+
597
+ ### Return type
598
+
599
+ [**ImportResponse**](ImportResponse.md)
600
+
601
+ ### Authorization
602
+
603
+ [httpAuth1](../README.md#httpAuth1), [httpAuth](../README.md#httpAuth), [apiKeyAuth](../README.md#apiKeyAuth)
604
+
605
+ ### HTTP request headers
606
+
607
+ - **Content-Type**: `text/plain`
608
+ - **Accept**: `application/json`, `text/plain`
609
+
610
+
611
+ ### HTTP response details
612
+ | Status code | Description | Response headers |
613
+ |-------------|-------------|------------------|
614
+ | **200** | | - |
615
+ | **400** | Invalid value for: body | - |
616
+ | **0** | | * x-error-code - Error Code <br> * x-error-message - Message of the MongoCampException <br> * x-error-additional-info - Additional information for the MongoCampException <br> |
617
+
618
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
619
+
620
+
436
621
  ## insert
437
622
 
438
623
  > InsertResponse insert(collectionName, requestBody)
@@ -467,7 +652,7 @@ async function example() {
467
652
  // string | The name of your MongoDb Collection
468
653
  collectionName: collectionName_example,
469
654
  // { [key: string]: any; } | JSON Representation for your Document.
470
- requestBody: {"key1":"value","key2":true,"key3":{"creationDate":"2026-11-06T06:04:09.291Z"}},
655
+ requestBody: {"key1":"value","key2":true,"key3":{"creationDate":"2026-11-08T16:48:08.839Z"}},
471
656
  } satisfies InsertRequest;
472
657
 
473
658
  try {
@@ -600,7 +785,7 @@ example().catch(console.error);
600
785
 
601
786
  ## listDocuments
602
787
 
603
- > Array&lt;{ [key: string]: any; }&gt; listDocuments(collectionName, filter, sort, projection, rowsPerPage, page)
788
+ > Array&lt;{ [key: string]: any; }&gt; listDocuments(collectionName, filter, sort, projection, rowsPerPage, page, extendedJson)
604
789
 
605
790
  Documents in Collection
606
791
 
@@ -641,6 +826,8 @@ async function example() {
641
826
  rowsPerPage: 100,
642
827
  // number | Requested page of the ResultSets (optional)
643
828
  page: 1,
829
+ // string | relaxed or canonical: the documents with the types of their values as MongoDB Extended JSON ({\"$oid\": ...}, {\"$date\": ...}, {\"$numberDecimal\": ...}, canonical also {\"$numberInt\": ...}, {\"$numberLong\": ...} and {\"$numberDouble\": ...}). Without the parameter the documents are returned as before. (optional)
830
+ extendedJson: extendedJson_example,
644
831
  } satisfies ListDocumentsRequest;
645
832
 
646
833
  try {
@@ -666,6 +853,7 @@ example().catch(console.error);
666
853
  | **projection** | `Array<string>` | MongoDB projection | [Optional] |
667
854
  | **rowsPerPage** | `number` | Count elements per page | [Optional] [Defaults to `undefined`] |
668
855
  | **page** | `number` | Requested page of the ResultSets | [Optional] [Defaults to `undefined`] |
856
+ | **extendedJson** | `string` | relaxed or canonical: the documents with the types of their values as MongoDB Extended JSON ({\&quot;$oid\&quot;: ...}, {\&quot;$date\&quot;: ...}, {\&quot;$numberDecimal\&quot;: ...}, canonical also {\&quot;$numberInt\&quot;: ...}, {\&quot;$numberLong\&quot;: ...} and {\&quot;$numberDouble\&quot;: ...}). Without the parameter the documents are returned as before. | [Optional] [Defaults to `undefined`] |
669
857
 
670
858
  ### Return type
671
859
 
@@ -693,7 +881,7 @@ example().catch(console.error);
693
881
 
694
882
  ## searchDocuments
695
883
 
696
- > Array&lt;{ [key: string]: any; }&gt; searchDocuments(collectionName, searchRequest, rowsPerPage, page)
884
+ > Array&lt;{ [key: string]: any; }&gt; searchDocuments(collectionName, searchRequest, rowsPerPage, page, extendedJson)
697
885
 
698
886
  Search Documents in Collection
699
887
 
@@ -730,6 +918,8 @@ async function example() {
730
918
  rowsPerPage: 100,
731
919
  // number | Requested page of the ResultSets (optional)
732
920
  page: 1,
921
+ // string | relaxed or canonical: the documents with the types of their values as MongoDB Extended JSON ({\"$oid\": ...}, {\"$date\": ...}, {\"$numberDecimal\": ...}, canonical also {\"$numberInt\": ...}, {\"$numberLong\": ...} and {\"$numberDouble\": ...}). Without the parameter the documents are returned as before. (optional)
922
+ extendedJson: extendedJson_example,
733
923
  } satisfies SearchDocumentsRequest;
734
924
 
735
925
  try {
@@ -753,6 +943,7 @@ example().catch(console.error);
753
943
  | **searchRequest** | [SearchRequest](SearchRequest.md) | | |
754
944
  | **rowsPerPage** | `number` | Count elements per page | [Optional] [Defaults to `undefined`] |
755
945
  | **page** | `number` | Requested page of the ResultSets | [Optional] [Defaults to `undefined`] |
946
+ | **extendedJson** | `string` | relaxed or canonical: the documents with the types of their values as MongoDB Extended JSON ({\&quot;$oid\&quot;: ...}, {\&quot;$date\&quot;: ...}, {\&quot;$numberDecimal\&quot;: ...}, canonical also {\&quot;$numberInt\&quot;: ...}, {\&quot;$numberLong\&quot;: ...} and {\&quot;$numberDouble\&quot;: ...}). Without the parameter the documents are returned as before. | [Optional] [Defaults to `undefined`] |
756
947
 
757
948
  ### Return type
758
949
 
@@ -0,0 +1,36 @@
1
+
2
+ # FieldInfo
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `path` | string
10
+ `types` | [Array&lt;FieldTypeCount&gt;](FieldTypeCount.md)
11
+
12
+ ## Example
13
+
14
+ ```typescript
15
+ import type { FieldInfo } from ''
16
+
17
+ // TODO: Update the object below with actual values
18
+ const example = {
19
+ "path": null,
20
+ "types": null,
21
+ } satisfies FieldInfo
22
+
23
+ console.log(example)
24
+
25
+ // Convert the instance to a JSON string
26
+ const exampleJSON: string = JSON.stringify(example)
27
+ console.log(exampleJSON)
28
+
29
+ // Parse the JSON string back to an object
30
+ const exampleParsed = JSON.parse(exampleJSON) as FieldInfo
31
+ console.log(exampleParsed)
32
+ ```
33
+
34
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
35
+
36
+
@@ -0,0 +1,36 @@
1
+
2
+ # FieldTypeCount
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `type` | string
10
+ `count` | number
11
+
12
+ ## Example
13
+
14
+ ```typescript
15
+ import type { FieldTypeCount } from ''
16
+
17
+ // TODO: Update the object below with actual values
18
+ const example = {
19
+ "type": null,
20
+ "count": null,
21
+ } satisfies FieldTypeCount
22
+
23
+ console.log(example)
24
+
25
+ // Convert the instance to a JSON string
26
+ const exampleJSON: string = JSON.stringify(example)
27
+ console.log(exampleJSON)
28
+
29
+ // Parse the JSON string back to an object
30
+ const exampleParsed = JSON.parse(exampleJSON) as FieldTypeCount
31
+ console.log(exampleParsed)
32
+ ```
33
+
34
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
35
+
36
+
@@ -0,0 +1,42 @@
1
+
2
+ # ImportResponse
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `read` | number
10
+ `inserted` | number
11
+ `failed` | number
12
+ `errors` | [Array&lt;InsertError&gt;](InsertError.md)
13
+ `errorsTruncated` | boolean
14
+
15
+ ## Example
16
+
17
+ ```typescript
18
+ import type { ImportResponse } from ''
19
+
20
+ // TODO: Update the object below with actual values
21
+ const example = {
22
+ "read": null,
23
+ "inserted": null,
24
+ "failed": null,
25
+ "errors": null,
26
+ "errorsTruncated": null,
27
+ } satisfies ImportResponse
28
+
29
+ console.log(example)
30
+
31
+ // Convert the instance to a JSON string
32
+ const exampleJSON: string = JSON.stringify(example)
33
+ console.log(exampleJSON)
34
+
35
+ // Parse the JSON string back to an object
36
+ const exampleParsed = JSON.parse(exampleJSON) as ImportResponse
37
+ console.log(exampleParsed)
38
+ ```
39
+
40
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
41
+
42
+
@@ -11,6 +11,7 @@ All URIs are relative to *http://localhost*
11
11
  | [**createUniqueIndex**](IndexApi.md#createuniqueindex) | **PUT** /mongodb/collections/{collectionName}/index/field/{fieldName}/unique | Create Unique Index |
12
12
  | [**deleteIndex**](IndexApi.md#deleteindex) | **DELETE** /mongodb/collections/{collectionName}/index/{indexName} | Delete Index |
13
13
  | [**index**](IndexApi.md#index) | **GET** /mongodb/collections/{collectionName}/index/{indexName} | Index for Collection |
14
+ | [**indexDetails**](IndexApi.md#indexdetails) | **GET** /mongodb/collections/{collectionName}/index/details | Indices with details for Collection |
14
15
  | [**indexStats**](IndexApi.md#indexstats) | **GET** /mongodb/collections/{collectionName}/index/stats | Index usage for Collection |
15
16
  | [**listIndices**](IndexApi.md#listindices) | **GET** /mongodb/collections/{collectionName}/index | List Indices for Collection |
16
17
 
@@ -605,6 +606,83 @@ example().catch(console.error);
605
606
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
606
607
 
607
608
 
609
+ ## indexDetails
610
+
611
+ > Array&lt;IndexInfo&gt; indexDetails(collectionName)
612
+
613
+ Indices with details for Collection
614
+
615
+ All Indices of the given Collection as the database reports them: the keys in the order of the index (&#x60;direction&#x60; is 1, -1 or the type of the key, a text index lists its fields), unique, sparse, hidden, partial filter, collation, weights, default language and expiration.
616
+
617
+ ### Example
618
+
619
+ ```ts
620
+ import {
621
+ Configuration,
622
+ IndexApi,
623
+ } from '';
624
+ import type { IndexDetailsRequest } from '';
625
+
626
+ async function example() {
627
+ console.log("🚀 Testing SDK...");
628
+ const config = new Configuration({
629
+ // To configure HTTP basic authorization: httpAuth1
630
+ username: "YOUR USERNAME",
631
+ password: "YOUR PASSWORD",
632
+ // Configure HTTP bearer authorization: httpAuth
633
+ accessToken: "YOUR BEARER TOKEN",
634
+ // To configure API key authorization: apiKeyAuth
635
+ apiKey: "YOUR API KEY",
636
+ });
637
+ const api = new IndexApi(config);
638
+
639
+ const body = {
640
+ // string | The name of your MongoDb Collection
641
+ collectionName: collectionName_example,
642
+ } satisfies IndexDetailsRequest;
643
+
644
+ try {
645
+ const data = await api.indexDetails(body);
646
+ console.log(data);
647
+ } catch (error) {
648
+ console.error(error);
649
+ }
650
+ }
651
+
652
+ // Run the test
653
+ example().catch(console.error);
654
+ ```
655
+
656
+ ### Parameters
657
+
658
+
659
+ | Name | Type | Description | Notes |
660
+ |------------- | ------------- | ------------- | -------------|
661
+ | **collectionName** | `string` | The name of your MongoDb Collection | [Defaults to `undefined`] |
662
+
663
+ ### Return type
664
+
665
+ [**Array&lt;IndexInfo&gt;**](IndexInfo.md)
666
+
667
+ ### Authorization
668
+
669
+ [httpAuth1](../README.md#httpAuth1), [httpAuth](../README.md#httpAuth), [apiKeyAuth](../README.md#apiKeyAuth)
670
+
671
+ ### HTTP request headers
672
+
673
+ - **Content-Type**: Not defined
674
+ - **Accept**: `application/json`
675
+
676
+
677
+ ### HTTP response details
678
+ | Status code | Description | Response headers |
679
+ |-------------|-------------|------------------|
680
+ | **200** | | - |
681
+ | **0** | | * x-error-code - Error Code <br> * x-error-message - Message of the MongoCampException <br> * x-error-additional-info - Additional information for the MongoCampException <br> |
682
+
683
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
684
+
685
+
608
686
  ## indexStats
609
687
 
610
688
  > Array&lt;IndexUsage&gt; indexStats(collectionName)
@@ -8,6 +8,7 @@ Name | Type
8
8
  ------------ | -------------
9
9
  `keys` | { [key: string]: number; }
10
10
  `indexOptionsRequest` | [IndexOptionsRequest](IndexOptionsRequest.md)
11
+ `orderedKeys` | [Array&lt;IndexKey&gt;](IndexKey.md)
11
12
 
12
13
  ## Example
13
14
 
@@ -18,6 +19,7 @@ import type { IndexCreateRequest } from ''
18
19
  const example = {
19
20
  "keys": null,
20
21
  "indexOptionsRequest": null,
22
+ "orderedKeys": null,
21
23
  } satisfies IndexCreateRequest
22
24
 
23
25
  console.log(example)
@@ -0,0 +1,54 @@
1
+
2
+ # IndexInfo
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `name` | string
10
+ `keys` | [Array&lt;IndexKey&gt;](IndexKey.md)
11
+ `unique` | boolean
12
+ `sparse` | boolean
13
+ `hidden` | boolean
14
+ `partialFilterExpression` | { [key: string]: any; }
15
+ `collation` | { [key: string]: any; }
16
+ `weights` | { [key: string]: any; }
17
+ `defaultLanguage` | string
18
+ `expireAfterSeconds` | number
19
+ `version` | number
20
+
21
+ ## Example
22
+
23
+ ```typescript
24
+ import type { IndexInfo } from ''
25
+
26
+ // TODO: Update the object below with actual values
27
+ const example = {
28
+ "name": null,
29
+ "keys": null,
30
+ "unique": null,
31
+ "sparse": null,
32
+ "hidden": null,
33
+ "partialFilterExpression": null,
34
+ "collation": null,
35
+ "weights": null,
36
+ "defaultLanguage": null,
37
+ "expireAfterSeconds": null,
38
+ "version": null,
39
+ } satisfies IndexInfo
40
+
41
+ console.log(example)
42
+
43
+ // Convert the instance to a JSON string
44
+ const exampleJSON: string = JSON.stringify(example)
45
+ console.log(exampleJSON)
46
+
47
+ // Parse the JSON string back to an object
48
+ const exampleParsed = JSON.parse(exampleJSON) as IndexInfo
49
+ console.log(exampleParsed)
50
+ ```
51
+
52
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
53
+
54
+