@sfxcode/nuxt-mongocamp-server 1.5.2 → 1.7.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 (119) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/module.mjs +1 -1
  3. package/dist/runtime/api/.openapi-generator/FILES +18 -2
  4. package/dist/runtime/api/apis/AdminApi.d.ts +1 -1
  5. package/dist/runtime/api/apis/ApplicationApi.d.ts +1 -1
  6. package/dist/runtime/api/apis/AuthApi.d.ts +21 -4
  7. package/dist/runtime/api/apis/AuthApi.js +50 -2
  8. package/dist/runtime/api/apis/BucketApi.d.ts +1 -1
  9. package/dist/runtime/api/apis/CollectionApi.d.ts +26 -8
  10. package/dist/runtime/api/apis/CollectionApi.js +53 -2
  11. package/dist/runtime/api/apis/DatabaseApi.d.ts +1 -1
  12. package/dist/runtime/api/apis/DocumentApi.d.ts +60 -13
  13. package/dist/runtime/api/apis/DocumentApi.js +136 -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/{InformationApi.d.ts → SystemApi.d.ts} +17 -3
  19. package/dist/runtime/api/apis/SystemApi.js +82 -0
  20. package/dist/runtime/api/apis/index.d.ts +1 -1
  21. package/dist/runtime/api/apis/index.js +1 -1
  22. package/dist/runtime/api/docs/AdminApi.md +2 -2
  23. package/dist/runtime/api/docs/AuthApi.md +79 -1
  24. package/dist/runtime/api/docs/ClusterInformation.md +36 -0
  25. package/dist/runtime/api/docs/ClusterMemberInformation.md +42 -0
  26. package/dist/runtime/api/docs/CollectionApi.md +86 -5
  27. package/dist/runtime/api/docs/CollectionPermission.md +40 -0
  28. package/dist/runtime/api/docs/CollectionStatus.md +1 -1
  29. package/dist/runtime/api/docs/CollectionSummary.md +50 -0
  30. package/dist/runtime/api/docs/CountResponse.md +34 -0
  31. package/dist/runtime/api/docs/DatabaseInfo.md +1 -1
  32. package/dist/runtime/api/docs/DocumentApi.md +208 -24
  33. package/dist/runtime/api/docs/FileApi.md +2 -2
  34. package/dist/runtime/api/docs/FileInformation.md +1 -1
  35. package/dist/runtime/api/docs/IndexApi.md +80 -2
  36. package/dist/runtime/api/docs/IndexUsage.md +40 -0
  37. package/dist/runtime/api/docs/InsertError.md +38 -0
  38. package/dist/runtime/api/docs/InsertResponse.md +4 -0
  39. package/dist/runtime/api/docs/JsonSchemaDefinition.md +1 -1
  40. package/dist/runtime/api/docs/JsonValueAny.md +1 -1
  41. package/dist/runtime/api/docs/MongoCampConfiguration.md +1 -1
  42. package/dist/runtime/api/docs/MongoFindRequest.md +3 -3
  43. package/dist/runtime/api/docs/MongoIndex.md +3 -3
  44. package/dist/runtime/api/docs/PipelineStage.md +1 -1
  45. package/dist/runtime/api/docs/SearchRequest.md +38 -0
  46. package/dist/runtime/api/docs/SettingsResponse.md +1 -1
  47. package/dist/runtime/api/docs/SystemApi.md +139 -0
  48. package/dist/runtime/api/docs/UpdateFileInformationRequest.md +1 -1
  49. package/dist/runtime/api/docs/UpdateRequest.md +2 -2
  50. package/dist/runtime/api/models/BucketInformation.d.ts +1 -1
  51. package/dist/runtime/api/models/ClusterInformation.d.ts +39 -0
  52. package/dist/runtime/api/models/ClusterInformation.js +32 -0
  53. package/dist/runtime/api/models/ClusterMemberInformation.d.ts +56 -0
  54. package/dist/runtime/api/models/ClusterMemberInformation.js +38 -0
  55. package/dist/runtime/api/models/CollectionPermission.d.ts +50 -0
  56. package/dist/runtime/api/models/CollectionPermission.js +35 -0
  57. package/dist/runtime/api/models/CollectionStatus.d.ts +3 -3
  58. package/dist/runtime/api/models/CollectionSummary.d.ts +80 -0
  59. package/dist/runtime/api/models/CollectionSummary.js +50 -0
  60. package/dist/runtime/api/models/CountResponse.d.ts +32 -0
  61. package/dist/runtime/api/models/CountResponse.js +26 -0
  62. package/dist/runtime/api/models/DatabaseInfo.d.ts +3 -3
  63. package/dist/runtime/api/models/DeleteResponse.d.ts +1 -1
  64. package/dist/runtime/api/models/ErrorDescription.d.ts +1 -1
  65. package/dist/runtime/api/models/FileInformation.d.ts +3 -3
  66. package/dist/runtime/api/models/Grant.d.ts +1 -1
  67. package/dist/runtime/api/models/IndexCreateRequest.d.ts +1 -1
  68. package/dist/runtime/api/models/IndexCreateResponse.d.ts +1 -1
  69. package/dist/runtime/api/models/IndexDropResponse.d.ts +1 -1
  70. package/dist/runtime/api/models/IndexOptionsRequest.d.ts +1 -1
  71. package/dist/runtime/api/models/IndexUsage.d.ts +52 -0
  72. package/dist/runtime/api/models/IndexUsage.js +35 -0
  73. package/dist/runtime/api/models/InsertError.d.ts +44 -0
  74. package/dist/runtime/api/models/InsertError.js +32 -0
  75. package/dist/runtime/api/models/InsertResponse.d.ts +14 -1
  76. package/dist/runtime/api/models/InsertResponse.js +10 -2
  77. package/dist/runtime/api/models/JobConfig.d.ts +1 -1
  78. package/dist/runtime/api/models/JobInformation.d.ts +2 -2
  79. package/dist/runtime/api/models/JobInformation.js +1 -2
  80. package/dist/runtime/api/models/JsonSchema.d.ts +1 -1
  81. package/dist/runtime/api/models/JsonSchemaDefinition.d.ts +3 -3
  82. package/dist/runtime/api/models/JsonValueAny.d.ts +3 -3
  83. package/dist/runtime/api/models/JsonValueBoolean.d.ts +1 -1
  84. package/dist/runtime/api/models/JsonValueString.d.ts +1 -1
  85. package/dist/runtime/api/models/Login.d.ts +1 -1
  86. package/dist/runtime/api/models/LoginResult.d.ts +1 -1
  87. package/dist/runtime/api/models/MongoAggregateRequest.d.ts +1 -1
  88. package/dist/runtime/api/models/MongoCampConfiguration.d.ts +3 -3
  89. package/dist/runtime/api/models/MongoFindRequest.d.ts +7 -7
  90. package/dist/runtime/api/models/MongoIndex.d.ts +7 -7
  91. package/dist/runtime/api/models/PasswordUpdateRequest.d.ts +1 -1
  92. package/dist/runtime/api/models/PipelineStage.d.ts +3 -3
  93. package/dist/runtime/api/models/Role.d.ts +1 -1
  94. package/dist/runtime/api/models/SchemaAnalysis.d.ts +1 -1
  95. package/dist/runtime/api/models/SchemaAnalysisField.d.ts +1 -1
  96. package/dist/runtime/api/models/SchemaAnalysisFieldType.d.ts +1 -1
  97. package/dist/runtime/api/models/SearchRequest.d.ts +44 -0
  98. package/dist/runtime/api/models/SearchRequest.js +29 -0
  99. package/dist/runtime/api/models/SettingsResponse.d.ts +3 -3
  100. package/dist/runtime/api/models/UpdateFileInformationRequest.d.ts +3 -3
  101. package/dist/runtime/api/models/UpdateRequest.d.ts +5 -5
  102. package/dist/runtime/api/models/UpdateResponse.d.ts +1 -1
  103. package/dist/runtime/api/models/UpdateRoleRequest.d.ts +1 -1
  104. package/dist/runtime/api/models/UserInformation.d.ts +1 -1
  105. package/dist/runtime/api/models/UserProfile.d.ts +1 -1
  106. package/dist/runtime/api/models/Version.d.ts +1 -1
  107. package/dist/runtime/api/models/index.d.ts +8 -0
  108. package/dist/runtime/api/models/index.js +8 -0
  109. package/dist/runtime/api/runtime.d.ts +1 -1
  110. package/dist/runtime/composables/mongocampApi.d.ts +1 -1
  111. package/dist/runtime/composables/mongocampApiCollection.d.ts +2 -2
  112. package/dist/runtime/composables/mongocampSearch.d.ts +3 -3
  113. package/dist/runtime/composables/mongocampStorage.d.ts +1 -1
  114. package/dist/runtime/server/composables/mongocampApi.d.ts +1 -1
  115. package/dist/runtime/server/composables/mongocampServerApi.d.ts +1 -1
  116. package/dist/runtime/utils/createMongocampApis.d.ts +2 -2
  117. package/dist/runtime/utils/createMongocampApis.js +2 -2
  118. package/package.json +14 -14
  119. package/dist/runtime/api/apis/InformationApi.js +0 -37
@@ -5,12 +5,14 @@ All URIs are relative to *http://localhost*
5
5
  | Method | HTTP request | Description |
6
6
  |------------- | ------------- | -------------|
7
7
  | [**_delete**](DocumentApi.md#_delete) | **DELETE** /mongodb/collections/{collectionName}/documents/{documentId} | Delete Document from Collection |
8
+ | [**countDocuments**](DocumentApi.md#countdocuments) | **GET** /mongodb/collections/{collectionName}/documents/count | Count Documents in Collection |
8
9
  | [**deleteMany**](DocumentApi.md#deletemany) | **DELETE** /mongodb/collections/{collectionName}/documents/many/delete | Delete Many in Collection |
9
10
  | [**find**](DocumentApi.md#find) | **POST** /mongodb/collections/{collectionName}/documents | Documents in Collection |
10
11
  | [**getDocument**](DocumentApi.md#getdocument) | **GET** /mongodb/collections/{collectionName}/documents/{documentId} | Document from Collection |
11
12
  | [**insert**](DocumentApi.md#insert) | **PUT** /mongodb/collections/{collectionName}/documents | Insert Document |
12
13
  | [**insertMany**](DocumentApi.md#insertmany) | **PUT** /mongodb/collections/{collectionName}/documents/many/insert | Insert many Documents |
13
14
  | [**listDocuments**](DocumentApi.md#listdocuments) | **GET** /mongodb/collections/{collectionName}/documents | Documents in Collection |
15
+ | [**searchDocuments**](DocumentApi.md#searchdocuments) | **POST** /mongodb/collections/{collectionName}/documents/search | Search Documents in Collection |
14
16
  | [**update**](DocumentApi.md#update) | **PATCH** /mongodb/collections/{collectionName}/documents/{documentId} | Update Document in Collection |
15
17
  | [**updateDocumentPartial**](DocumentApi.md#updatedocumentpartial) | **PATCH** /mongodb/collections/{collectionName}/documents/{documentId}/partial | Update Document Parts in Collection |
16
18
  | [**updateMany**](DocumentApi.md#updatemany) | **PATCH** /mongodb/collections/{collectionName}/documents/many/update | Update many in Collection |
@@ -97,9 +99,89 @@ example().catch(console.error);
97
99
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
98
100
 
99
101
 
102
+ ## countDocuments
103
+
104
+ > CountResponse countDocuments(collectionName, filter)
105
+
106
+ Count Documents in Collection
107
+
108
+ Count the Documents of the given Collection that match the filter without loading them
109
+
110
+ ### Example
111
+
112
+ ```ts
113
+ import {
114
+ Configuration,
115
+ DocumentApi,
116
+ } from '';
117
+ import type { CountDocumentsRequest } from '';
118
+
119
+ async function example() {
120
+ console.log("🚀 Testing SDK...");
121
+ const config = new Configuration({
122
+ // To configure HTTP basic authorization: httpAuth1
123
+ username: "YOUR USERNAME",
124
+ password: "YOUR PASSWORD",
125
+ // Configure HTTP bearer authorization: httpAuth
126
+ accessToken: "YOUR BEARER TOKEN",
127
+ // To configure API key authorization: apiKeyAuth
128
+ apiKey: "YOUR API KEY",
129
+ });
130
+ const api = new DocumentApi(config);
131
+
132
+ const body = {
133
+ // string | The name of your MongoDb Collection
134
+ collectionName: collectionName_example,
135
+ // string | Filter Query like on the list of documents, by default all documents are counted (optional)
136
+ filter: filter_example,
137
+ } satisfies CountDocumentsRequest;
138
+
139
+ try {
140
+ const data = await api.countDocuments(body);
141
+ console.log(data);
142
+ } catch (error) {
143
+ console.error(error);
144
+ }
145
+ }
146
+
147
+ // Run the test
148
+ example().catch(console.error);
149
+ ```
150
+
151
+ ### Parameters
152
+
153
+
154
+ | Name | Type | Description | Notes |
155
+ |------------- | ------------- | ------------- | -------------|
156
+ | **collectionName** | `string` | The name of your MongoDb Collection | [Defaults to `undefined`] |
157
+ | **filter** | `string` | Filter Query like on the list of documents, by default all documents are counted | [Optional] [Defaults to `undefined`] |
158
+
159
+ ### Return type
160
+
161
+ [**CountResponse**](CountResponse.md)
162
+
163
+ ### Authorization
164
+
165
+ [httpAuth1](../README.md#httpAuth1), [httpAuth](../README.md#httpAuth), [apiKeyAuth](../README.md#apiKeyAuth)
166
+
167
+ ### HTTP request headers
168
+
169
+ - **Content-Type**: Not defined
170
+ - **Accept**: `application/json`
171
+
172
+
173
+ ### HTTP response details
174
+ | Status code | Description | Response headers |
175
+ |-------------|-------------|------------------|
176
+ | **200** | | - |
177
+ | **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> |
178
+
179
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
180
+
181
+
100
182
  ## deleteMany
101
183
 
102
- > DeleteResponse deleteMany(collectionName, requestBody)
184
+ > DeleteResponse deleteMany(collectionName, requestBody, matchAll, filter)
103
185
 
104
186
  Delete Many in Collection
105
187
 
@@ -130,8 +212,12 @@ async function example() {
130
212
  const body = {
131
213
  // string | The name of your MongoDb Collection
132
214
  collectionName: collectionName_example,
133
- // { [key: string]: string; }
215
+ // { [key: string]: any; }
134
216
  requestBody: Object,
217
+ // boolean | Allow an empty filter, that matches all documents of the collection (optional)
218
+ matchAll: true,
219
+ // string | Filter Query like on the list of documents, as an alternative to the filter of the request body. Use only one of both. (optional)
220
+ filter: filter_example,
135
221
  } satisfies DeleteManyRequest;
136
222
 
137
223
  try {
@@ -152,7 +238,9 @@ example().catch(console.error);
152
238
  | Name | Type | Description | Notes |
153
239
  |------------- | ------------- | ------------- | -------------|
154
240
  | **collectionName** | `string` | The name of your MongoDb Collection | [Defaults to `undefined`] |
155
- | **requestBody** | `{ [key: string]: string; }` | | |
241
+ | **requestBody** | `{ [key: string]: any; }` | | |
242
+ | **matchAll** | `boolean` | Allow an empty filter, that matches all documents of the collection | [Optional] [Defaults to `false`] |
243
+ | **filter** | `string` | Filter Query like on the list of documents, as an alternative to the filter of the request body. Use only one of both. | [Optional] [Defaults to `undefined`] |
156
244
 
157
245
  ### Return type
158
246
 
@@ -172,7 +260,7 @@ example().catch(console.error);
172
260
  | Status code | Description | Response headers |
173
261
  |-------------|-------------|------------------|
174
262
  | **200** | | - |
175
- | **400** | Invalid value for: body | - |
263
+ | **400** | Invalid value for: body, Invalid value for: query parameter matchAll | - |
176
264
  | **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> |
177
265
 
178
266
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
@@ -180,7 +268,7 @@ example().catch(console.error);
180
268
 
181
269
  ## find
182
270
 
183
- > Array&lt;{ [key: string]: string; }&gt; find(collectionName, mongoFindRequest, rowsPerPage, page)
271
+ > Array&lt;{ [key: string]: any; }&gt; find(collectionName, mongoFindRequest, rowsPerPage, page)
184
272
 
185
273
  Documents in Collection
186
274
 
@@ -243,7 +331,7 @@ example().catch(console.error);
243
331
 
244
332
  ### Return type
245
333
 
246
- **Array<{ [key: string]: string; }>**
334
+ **Array<{ [key: string]: any; }>**
247
335
 
248
336
  ### Authorization
249
337
 
@@ -267,7 +355,7 @@ example().catch(console.error);
267
355
 
268
356
  ## getDocument
269
357
 
270
- > { [key: string]: string; } getDocument(collectionName, documentId)
358
+ > { [key: string]: any; } getDocument(collectionName, documentId)
271
359
 
272
360
  Document from Collection
273
361
 
@@ -324,7 +412,7 @@ example().catch(console.error);
324
412
 
325
413
  ### Return type
326
414
 
327
- **{ [key: string]: string; }**
415
+ **{ [key: string]: any; }**
328
416
 
329
417
  ### Authorization
330
418
 
@@ -378,8 +466,8 @@ async function example() {
378
466
  const body = {
379
467
  // string | The name of your MongoDb Collection
380
468
  collectionName: collectionName_example,
381
- // { [key: string]: string; } | JSON Representation for your Document.
382
- requestBody: {"key1":"value","key2":true,"key3":{"creationDate":"2024-10-11T16:43:24.553Z"}},
469
+ // { [key: string]: any; } | JSON Representation for your Document.
470
+ requestBody: {"key1":"value","key2":true,"key3":{"creationDate":"2026-11-06T06:04:09.291Z"}},
383
471
  } satisfies InsertRequest;
384
472
 
385
473
  try {
@@ -400,7 +488,7 @@ example().catch(console.error);
400
488
  | Name | Type | Description | Notes |
401
489
  |------------- | ------------- | ------------- | -------------|
402
490
  | **collectionName** | `string` | The name of your MongoDb Collection | [Defaults to `undefined`] |
403
- | **requestBody** | `{ [key: string]: string; }` | JSON Representation for your Document. | |
491
+ | **requestBody** | `{ [key: string]: any; }` | JSON Representation for your Document. | |
404
492
 
405
493
  ### Return type
406
494
 
@@ -428,7 +516,7 @@ example().catch(console.error);
428
516
 
429
517
  ## insertMany
430
518
 
431
- > InsertResponse insertMany(collectionName, requestBody)
519
+ > InsertResponse insertMany(collectionName, ordered, requestBody)
432
520
 
433
521
  Insert many Documents
434
522
 
@@ -459,7 +547,9 @@ async function example() {
459
547
  const body = {
460
548
  // string | The name of your MongoDb Collection
461
549
  collectionName: collectionName_example,
462
- // Array<{ [key: string]: string; }> (optional)
550
+ // boolean | true (default): the insert stops at the first document that fails (answer 409 for a duplicate key). false: all documents that can be stored are stored, the others are listed in `errors` of the answer. (optional)
551
+ ordered: true,
552
+ // Array<{ [key: string]: any; }> (optional)
463
553
  requestBody: ...,
464
554
  } satisfies InsertManyRequest;
465
555
 
@@ -481,7 +571,8 @@ example().catch(console.error);
481
571
  | Name | Type | Description | Notes |
482
572
  |------------- | ------------- | ------------- | -------------|
483
573
  | **collectionName** | `string` | The name of your MongoDb Collection | [Defaults to `undefined`] |
484
- | **requestBody** | `Array<{ [key: string]: string; }>` | | [Optional] |
574
+ | **ordered** | `boolean` | true (default): the insert stops at the first document that fails (answer 409 for a duplicate key). false: all documents that can be stored are stored, the others are listed in &#x60;errors&#x60; of the answer. | [Optional] [Defaults to `true`] |
575
+ | **requestBody** | `Array<{ [key: string]: any; }>` | | [Optional] |
485
576
 
486
577
  ### Return type
487
578
 
@@ -501,7 +592,7 @@ example().catch(console.error);
501
592
  | Status code | Description | Response headers |
502
593
  |-------------|-------------|------------------|
503
594
  | **200** | | - |
504
- | **400** | Invalid value for: body | - |
595
+ | **400** | Invalid value for: body, Invalid value for: query parameter ordered | - |
505
596
  | **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> |
506
597
 
507
598
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
@@ -509,7 +600,7 @@ example().catch(console.error);
509
600
 
510
601
  ## listDocuments
511
602
 
512
- > Array&lt;{ [key: string]: string; }&gt; listDocuments(collectionName, filter, sort, projection, rowsPerPage, page)
603
+ > Array&lt;{ [key: string]: any; }&gt; listDocuments(collectionName, filter, sort, projection, rowsPerPage, page)
513
604
 
514
605
  Documents in Collection
515
606
 
@@ -578,7 +669,7 @@ example().catch(console.error);
578
669
 
579
670
  ### Return type
580
671
 
581
- **Array<{ [key: string]: string; }>**
672
+ **Array<{ [key: string]: any; }>**
582
673
 
583
674
  ### Authorization
584
675
 
@@ -594,7 +685,94 @@ example().catch(console.error);
594
685
  | Status code | Description | Response headers |
595
686
  |-------------|-------------|------------------|
596
687
  | **200** | | * x-pagination-count-rows - count all elements <br> * x-pagination-rows-per-page - Count elements per page <br> * x-pagination-current-page - Current page <br> * x-pagination-count-pages - Count pages <br> |
597
- | **400** | Invalid value for: query parameter filter, Invalid value for: query parameter sort, Invalid value for: query parameter projection, Invalid value for: query parameter rowsPerPage, Invalid value for: query parameter page | - |
688
+ | **400** | Invalid value for: query parameter rowsPerPage, Invalid value for: query parameter page | - |
689
+ | **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> |
690
+
691
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
692
+
693
+
694
+ ## searchDocuments
695
+
696
+ > Array&lt;{ [key: string]: any; }&gt; searchDocuments(collectionName, searchRequest, rowsPerPage, page)
697
+
698
+ Search Documents in Collection
699
+
700
+ The list of documents with the parameters in the request body: for filters that are too long for the URL (a URL of more than 2048 characters is refused by the server before the request is handled, without CORS headers). The filter is a Lucene query like in the list, the answer and the pagination headers are the same.
701
+
702
+ ### Example
703
+
704
+ ```ts
705
+ import {
706
+ Configuration,
707
+ DocumentApi,
708
+ } from '';
709
+ import type { SearchDocumentsRequest } from '';
710
+
711
+ async function example() {
712
+ console.log("🚀 Testing SDK...");
713
+ const config = new Configuration({
714
+ // To configure HTTP basic authorization: httpAuth1
715
+ username: "YOUR USERNAME",
716
+ password: "YOUR PASSWORD",
717
+ // Configure HTTP bearer authorization: httpAuth
718
+ accessToken: "YOUR BEARER TOKEN",
719
+ // To configure API key authorization: apiKeyAuth
720
+ apiKey: "YOUR API KEY",
721
+ });
722
+ const api = new DocumentApi(config);
723
+
724
+ const body = {
725
+ // string | The name of your MongoDb Collection
726
+ collectionName: collectionName_example,
727
+ // SearchRequest
728
+ searchRequest: {"filter":"name:John AND age:[18 TO 65]","sort":["-age"],"projection":["name","age"]},
729
+ // number | Count elements per page (optional)
730
+ rowsPerPage: 100,
731
+ // number | Requested page of the ResultSets (optional)
732
+ page: 1,
733
+ } satisfies SearchDocumentsRequest;
734
+
735
+ try {
736
+ const data = await api.searchDocuments(body);
737
+ console.log(data);
738
+ } catch (error) {
739
+ console.error(error);
740
+ }
741
+ }
742
+
743
+ // Run the test
744
+ example().catch(console.error);
745
+ ```
746
+
747
+ ### Parameters
748
+
749
+
750
+ | Name | Type | Description | Notes |
751
+ |------------- | ------------- | ------------- | -------------|
752
+ | **collectionName** | `string` | The name of your MongoDb Collection | [Defaults to `undefined`] |
753
+ | **searchRequest** | [SearchRequest](SearchRequest.md) | | |
754
+ | **rowsPerPage** | `number` | Count elements per page | [Optional] [Defaults to `undefined`] |
755
+ | **page** | `number` | Requested page of the ResultSets | [Optional] [Defaults to `undefined`] |
756
+
757
+ ### Return type
758
+
759
+ **Array<{ [key: string]: any; }>**
760
+
761
+ ### Authorization
762
+
763
+ [httpAuth1](../README.md#httpAuth1), [httpAuth](../README.md#httpAuth), [apiKeyAuth](../README.md#apiKeyAuth)
764
+
765
+ ### HTTP request headers
766
+
767
+ - **Content-Type**: `application/json`
768
+ - **Accept**: `application/json`, `text/plain`
769
+
770
+
771
+ ### HTTP response details
772
+ | Status code | Description | Response headers |
773
+ |-------------|-------------|------------------|
774
+ | **200** | | * x-pagination-count-rows - count all elements <br> * x-pagination-rows-per-page - Count elements per page <br> * x-pagination-current-page - Current page <br> * x-pagination-count-pages - Count pages <br> |
775
+ | **400** | Invalid value for: body, Invalid value for: query parameter rowsPerPage, Invalid value for: query parameter page | - |
598
776
  | **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> |
599
777
 
600
778
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
@@ -635,7 +813,7 @@ async function example() {
635
813
  collectionName: collectionName_example,
636
814
  // string | DocumentId to update
637
815
  documentId: documentId_example,
638
- // { [key: string]: string; }
816
+ // { [key: string]: any; }
639
817
  requestBody: Object,
640
818
  } satisfies UpdateRequest;
641
819
 
@@ -658,7 +836,7 @@ example().catch(console.error);
658
836
  |------------- | ------------- | ------------- | -------------|
659
837
  | **collectionName** | `string` | The name of your MongoDb Collection | [Defaults to `undefined`] |
660
838
  | **documentId** | `string` | DocumentId to update | [Defaults to `undefined`] |
661
- | **requestBody** | `{ [key: string]: string; }` | | |
839
+ | **requestBody** | `{ [key: string]: any; }` | | |
662
840
 
663
841
  ### Return type
664
842
 
@@ -719,7 +897,7 @@ async function example() {
719
897
  collectionName: collectionName_example,
720
898
  // string | DocumentId to update
721
899
  documentId: documentId_example,
722
- // { [key: string]: string; }
900
+ // { [key: string]: any; }
723
901
  requestBody: Object,
724
902
  } satisfies UpdateDocumentPartialRequest;
725
903
 
@@ -742,7 +920,7 @@ example().catch(console.error);
742
920
  |------------- | ------------- | ------------- | -------------|
743
921
  | **collectionName** | `string` | The name of your MongoDb Collection | [Defaults to `undefined`] |
744
922
  | **documentId** | `string` | DocumentId to update | [Defaults to `undefined`] |
745
- | **requestBody** | `{ [key: string]: string; }` | | |
923
+ | **requestBody** | `{ [key: string]: any; }` | | |
746
924
 
747
925
  ### Return type
748
926
 
@@ -770,7 +948,7 @@ example().catch(console.error);
770
948
 
771
949
  ## updateMany
772
950
 
773
- > UpdateResponse updateMany(collectionName, updateRequest)
951
+ > UpdateResponse updateMany(collectionName, updateRequest, matchAll, filter)
774
952
 
775
953
  Update many in Collection
776
954
 
@@ -803,6 +981,10 @@ async function example() {
803
981
  collectionName: collectionName_example,
804
982
  // UpdateRequest
805
983
  updateRequest: ...,
984
+ // boolean | Allow an empty filter, that matches all documents of the collection (optional)
985
+ matchAll: true,
986
+ // string | Filter Query like on the list of documents, as an alternative to the filter of the request body. Use only one of both. (optional)
987
+ filter: filter_example,
806
988
  } satisfies UpdateManyRequest;
807
989
 
808
990
  try {
@@ -824,6 +1006,8 @@ example().catch(console.error);
824
1006
  |------------- | ------------- | ------------- | -------------|
825
1007
  | **collectionName** | `string` | The name of your MongoDb Collection | [Defaults to `undefined`] |
826
1008
  | **updateRequest** | [UpdateRequest](UpdateRequest.md) | | |
1009
+ | **matchAll** | `boolean` | Allow an empty filter, that matches all documents of the collection | [Optional] [Defaults to `false`] |
1010
+ | **filter** | `string` | Filter Query like on the list of documents, as an alternative to the filter of the request body. Use only one of both. | [Optional] [Defaults to `undefined`] |
827
1011
 
828
1012
  ### Return type
829
1013
 
@@ -843,7 +1027,7 @@ example().catch(console.error);
843
1027
  | Status code | Description | Response headers |
844
1028
  |-------------|-------------|------------------|
845
1029
  | **200** | | - |
846
- | **400** | Invalid value for: body | - |
1030
+ | **400** | Invalid value for: body, Invalid value for: query parameter matchAll | - |
847
1031
  | **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> |
848
1032
 
849
1033
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
@@ -422,7 +422,7 @@ example().catch(console.error);
422
422
  | Status code | Description | Response headers |
423
423
  |-------------|-------------|------------------|
424
424
  | **200** | | - |
425
- | **400** | Invalid value for: body, Invalid value for: query parameter fileName | - |
425
+ | **400** | Invalid value for: body | - |
426
426
  | **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> |
427
427
 
428
428
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
@@ -515,7 +515,7 @@ example().catch(console.error);
515
515
  | Status code | Description | Response headers |
516
516
  |-------------|-------------|------------------|
517
517
  | **200** | | * x-pagination-count-rows - count all elements <br> * x-pagination-rows-per-page - Count elements per page <br> * x-pagination-current-page - Current page <br> * x-pagination-count-pages - Count pages <br> |
518
- | **400** | Invalid value for: query parameter filter, Invalid value for: query parameter sort, Invalid value for: query parameter projection, Invalid value for: query parameter rowsPerPage, Invalid value for: query parameter page | - |
518
+ | **400** | Invalid value for: query parameter rowsPerPage, Invalid value for: query parameter page | - |
519
519
  | **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> |
520
520
 
521
521
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
@@ -11,7 +11,7 @@ Name | Type
11
11
  `length` | number
12
12
  `chunkSize` | number
13
13
  `uploadDate` | Date
14
- `metadata` | { [key: string]: string; }
14
+ `metadata` | { [key: string]: any; }
15
15
 
16
16
  ## Example
17
17
 
@@ -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
+ | [**indexStats**](IndexApi.md#indexstats) | **GET** /mongodb/collections/{collectionName}/index/stats | Index usage for Collection |
14
15
  | [**listIndices**](IndexApi.md#listindices) | **GET** /mongodb/collections/{collectionName}/index | List Indices for Collection |
15
16
 
16
17
 
@@ -99,7 +100,7 @@ example().catch(console.error);
99
100
  | Status code | Description | Response headers |
100
101
  |-------------|-------------|------------------|
101
102
  | **200** | | - |
102
- | **400** | Invalid value for: query parameter sortAscending, Invalid value for: query parameter name | - |
103
+ | **400** | Invalid value for: query parameter sortAscending | - |
103
104
  | **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> |
104
105
 
105
106
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
@@ -438,7 +439,7 @@ example().catch(console.error);
438
439
  | Status code | Description | Response headers |
439
440
  |-------------|-------------|------------------|
440
441
  | **200** | | - |
441
- | **400** | Invalid value for: query parameter sortAscending, Invalid value for: query parameter name | - |
442
+ | **400** | Invalid value for: query parameter sortAscending | - |
442
443
  | **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> |
443
444
 
444
445
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
@@ -604,6 +605,83 @@ example().catch(console.error);
604
605
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
605
606
 
606
607
 
608
+ ## indexStats
609
+
610
+ > Array&lt;IndexUsage&gt; indexStats(collectionName)
611
+
612
+ Index usage for Collection
613
+
614
+ How often every Index of the given Collection was used since the counting started. Replaces the aggregation stage $indexStats, which is denied by default because its result contains the address of the database server.
615
+
616
+ ### Example
617
+
618
+ ```ts
619
+ import {
620
+ Configuration,
621
+ IndexApi,
622
+ } from '';
623
+ import type { IndexStatsRequest } from '';
624
+
625
+ async function example() {
626
+ console.log("🚀 Testing SDK...");
627
+ const config = new Configuration({
628
+ // To configure HTTP basic authorization: httpAuth1
629
+ username: "YOUR USERNAME",
630
+ password: "YOUR PASSWORD",
631
+ // Configure HTTP bearer authorization: httpAuth
632
+ accessToken: "YOUR BEARER TOKEN",
633
+ // To configure API key authorization: apiKeyAuth
634
+ apiKey: "YOUR API KEY",
635
+ });
636
+ const api = new IndexApi(config);
637
+
638
+ const body = {
639
+ // string | The name of your MongoDb Collection
640
+ collectionName: collectionName_example,
641
+ } satisfies IndexStatsRequest;
642
+
643
+ try {
644
+ const data = await api.indexStats(body);
645
+ console.log(data);
646
+ } catch (error) {
647
+ console.error(error);
648
+ }
649
+ }
650
+
651
+ // Run the test
652
+ example().catch(console.error);
653
+ ```
654
+
655
+ ### Parameters
656
+
657
+
658
+ | Name | Type | Description | Notes |
659
+ |------------- | ------------- | ------------- | -------------|
660
+ | **collectionName** | `string` | The name of your MongoDb Collection | [Defaults to `undefined`] |
661
+
662
+ ### Return type
663
+
664
+ [**Array&lt;IndexUsage&gt;**](IndexUsage.md)
665
+
666
+ ### Authorization
667
+
668
+ [httpAuth1](../README.md#httpAuth1), [httpAuth](../README.md#httpAuth), [apiKeyAuth](../README.md#apiKeyAuth)
669
+
670
+ ### HTTP request headers
671
+
672
+ - **Content-Type**: Not defined
673
+ - **Accept**: `application/json`
674
+
675
+
676
+ ### HTTP response details
677
+ | Status code | Description | Response headers |
678
+ |-------------|-------------|------------------|
679
+ | **200** | | - |
680
+ | **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> |
681
+
682
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
683
+
684
+
607
685
  ## listIndices
608
686
 
609
687
  > Array&lt;MongoIndex&gt; listIndices(collectionName)
@@ -0,0 +1,40 @@
1
+
2
+ # IndexUsage
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `name` | string
10
+ `key` | { [key: string]: any; }
11
+ `ops` | number
12
+ `since` | Date
13
+
14
+ ## Example
15
+
16
+ ```typescript
17
+ import type { IndexUsage } from ''
18
+
19
+ // TODO: Update the object below with actual values
20
+ const example = {
21
+ "name": null,
22
+ "key": null,
23
+ "ops": null,
24
+ "since": null,
25
+ } satisfies IndexUsage
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 IndexUsage
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
+ # InsertError
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `index` | number
10
+ `code` | number
11
+ `message` | string
12
+
13
+ ## Example
14
+
15
+ ```typescript
16
+ import type { InsertError } from ''
17
+
18
+ // TODO: Update the object below with actual values
19
+ const example = {
20
+ "index": null,
21
+ "code": null,
22
+ "message": null,
23
+ } satisfies InsertError
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 InsertError
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
+
@@ -8,6 +8,8 @@ Name | Type
8
8
  ------------ | -------------
9
9
  `wasAcknowledged` | boolean
10
10
  `insertedIds` | Array&lt;string&gt;
11
+ `insertedCount` | number
12
+ `errors` | [Array&lt;InsertError&gt;](InsertError.md)
11
13
 
12
14
  ## Example
13
15
 
@@ -18,6 +20,8 @@ import type { InsertResponse } from ''
18
20
  const example = {
19
21
  "wasAcknowledged": null,
20
22
  "insertedIds": null,
23
+ "insertedCount": null,
24
+ "errors": null,
21
25
  } satisfies InsertResponse
22
26
 
23
27
  console.log(example)
@@ -10,7 +10,7 @@ Name | Type
10
10
  `title` | string
11
11
  `additionalProperties` | boolean
12
12
  `required` | Array&lt;string&gt;
13
- `properties` | { [key: string]: { [key: string]: string; }; }
13
+ `properties` | { [key: string]: { [key: string]: any; }; }
14
14
 
15
15
  ## Example
16
16
 
@@ -6,7 +6,7 @@
6
6
 
7
7
  Name | Type
8
8
  ------------ | -------------
9
- `value` | string
9
+ `value` | any
10
10
 
11
11
  ## Example
12
12
 
@@ -7,7 +7,7 @@
7
7
  Name | Type
8
8
  ------------ | -------------
9
9
  `key` | string
10
- `value` | string
10
+ `value` | any
11
11
  `configType` | string
12
12
  `comment` | string
13
13
  `needsRestartForActivation` | boolean