@sfxcode/nuxt-mongocamp-server 1.6.3 → 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 (119) 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 +30 -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 +19 -2
  8. package/dist/runtime/api/apis/AuthApi.js +48 -0
  9. package/dist/runtime/api/apis/BucketApi.d.ts +1 -1
  10. package/dist/runtime/api/apis/CollectionApi.d.ts +78 -4
  11. package/dist/runtime/api/apis/CollectionApi.js +236 -2
  12. package/dist/runtime/api/apis/DatabaseApi.d.ts +1 -1
  13. package/dist/runtime/api/apis/DocumentApi.d.ts +92 -2
  14. package/dist/runtime/api/apis/DocumentApi.js +275 -0
  15. package/dist/runtime/api/apis/FileApi.d.ts +1 -1
  16. package/dist/runtime/api/apis/IndexApi.d.ts +36 -2
  17. package/dist/runtime/api/apis/IndexApi.js +104 -0
  18. package/dist/runtime/api/apis/JobsApi.d.ts +1 -1
  19. package/dist/runtime/api/apis/SystemApi.d.ts +1 -1
  20. package/dist/runtime/api/docs/AuthApi.md +78 -0
  21. package/dist/runtime/api/docs/CollectionApi.md +335 -2
  22. package/dist/runtime/api/docs/CollectionPermission.md +40 -0
  23. package/dist/runtime/api/docs/CollectionSummary.md +50 -0
  24. package/dist/runtime/api/docs/CopyRequest.md +40 -0
  25. package/dist/runtime/api/docs/CopyResponse.md +38 -0
  26. package/dist/runtime/api/docs/CountResponse.md +34 -0
  27. package/dist/runtime/api/docs/DocumentApi.md +377 -8
  28. package/dist/runtime/api/docs/FieldInfo.md +36 -0
  29. package/dist/runtime/api/docs/FieldTypeCount.md +36 -0
  30. package/dist/runtime/api/docs/ImportResponse.md +42 -0
  31. package/dist/runtime/api/docs/IndexApi.md +156 -0
  32. package/dist/runtime/api/docs/IndexCreateRequest.md +2 -0
  33. package/dist/runtime/api/docs/IndexInfo.md +54 -0
  34. package/dist/runtime/api/docs/IndexKey.md +36 -0
  35. package/dist/runtime/api/docs/IndexOptionsRequest.md +10 -0
  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/RenameRequest.md +36 -0
  40. package/dist/runtime/api/docs/RenameResponse.md +34 -0
  41. package/dist/runtime/api/docs/SearchRequest.md +38 -0
  42. package/dist/runtime/api/models/BucketInformation.d.ts +1 -1
  43. package/dist/runtime/api/models/ClusterInformation.d.ts +1 -1
  44. package/dist/runtime/api/models/ClusterMemberInformation.d.ts +1 -1
  45. package/dist/runtime/api/models/CollectionPermission.d.ts +50 -0
  46. package/dist/runtime/api/models/CollectionPermission.js +35 -0
  47. package/dist/runtime/api/models/CollectionStatus.d.ts +1 -1
  48. package/dist/runtime/api/models/CollectionSummary.d.ts +80 -0
  49. package/dist/runtime/api/models/CollectionSummary.js +50 -0
  50. package/dist/runtime/api/models/CopyRequest.d.ts +50 -0
  51. package/dist/runtime/api/models/CopyRequest.js +32 -0
  52. package/dist/runtime/api/models/CopyResponse.d.ts +44 -0
  53. package/dist/runtime/api/models/CopyResponse.js +32 -0
  54. package/dist/runtime/api/models/CountResponse.d.ts +32 -0
  55. package/dist/runtime/api/models/CountResponse.js +26 -0
  56. package/dist/runtime/api/models/DatabaseInfo.d.ts +1 -1
  57. package/dist/runtime/api/models/DeleteResponse.d.ts +1 -1
  58. package/dist/runtime/api/models/ErrorDescription.d.ts +1 -1
  59. package/dist/runtime/api/models/FieldInfo.d.ts +39 -0
  60. package/dist/runtime/api/models/FieldInfo.js +32 -0
  61. package/dist/runtime/api/models/FieldTypeCount.d.ts +38 -0
  62. package/dist/runtime/api/models/FieldTypeCount.js +29 -0
  63. package/dist/runtime/api/models/FileInformation.d.ts +1 -1
  64. package/dist/runtime/api/models/Grant.d.ts +1 -1
  65. package/dist/runtime/api/models/ImportResponse.d.ts +57 -0
  66. package/dist/runtime/api/models/ImportResponse.js +41 -0
  67. package/dist/runtime/api/models/IndexCreateRequest.d.ts +9 -2
  68. package/dist/runtime/api/models/IndexCreateRequest.js +9 -4
  69. package/dist/runtime/api/models/IndexCreateResponse.d.ts +1 -1
  70. package/dist/runtime/api/models/IndexDropResponse.d.ts +1 -1
  71. package/dist/runtime/api/models/IndexInfo.d.ts +99 -0
  72. package/dist/runtime/api/models/IndexInfo.js +54 -0
  73. package/dist/runtime/api/models/IndexKey.d.ts +38 -0
  74. package/dist/runtime/api/models/IndexKey.js +29 -0
  75. package/dist/runtime/api/models/IndexOptionsRequest.d.ts +37 -1
  76. package/dist/runtime/api/models/IndexOptionsRequest.js +12 -2
  77. package/dist/runtime/api/models/IndexUsage.d.ts +52 -0
  78. package/dist/runtime/api/models/IndexUsage.js +35 -0
  79. package/dist/runtime/api/models/InsertError.d.ts +44 -0
  80. package/dist/runtime/api/models/InsertError.js +32 -0
  81. package/dist/runtime/api/models/InsertResponse.d.ts +14 -1
  82. package/dist/runtime/api/models/InsertResponse.js +10 -2
  83. package/dist/runtime/api/models/JobConfig.d.ts +1 -1
  84. package/dist/runtime/api/models/JobInformation.d.ts +1 -1
  85. package/dist/runtime/api/models/JsonSchema.d.ts +1 -1
  86. package/dist/runtime/api/models/JsonSchemaDefinition.d.ts +1 -1
  87. package/dist/runtime/api/models/JsonValueAny.d.ts +1 -1
  88. package/dist/runtime/api/models/JsonValueBoolean.d.ts +1 -1
  89. package/dist/runtime/api/models/JsonValueString.d.ts +1 -1
  90. package/dist/runtime/api/models/Login.d.ts +1 -1
  91. package/dist/runtime/api/models/LoginResult.d.ts +1 -1
  92. package/dist/runtime/api/models/MongoAggregateRequest.d.ts +1 -1
  93. package/dist/runtime/api/models/MongoCampConfiguration.d.ts +1 -1
  94. package/dist/runtime/api/models/MongoFindRequest.d.ts +1 -1
  95. package/dist/runtime/api/models/MongoIndex.d.ts +1 -1
  96. package/dist/runtime/api/models/PasswordUpdateRequest.d.ts +1 -1
  97. package/dist/runtime/api/models/PipelineStage.d.ts +1 -1
  98. package/dist/runtime/api/models/RenameRequest.d.ts +38 -0
  99. package/dist/runtime/api/models/RenameRequest.js +28 -0
  100. package/dist/runtime/api/models/RenameResponse.d.ts +32 -0
  101. package/dist/runtime/api/models/RenameResponse.js +26 -0
  102. package/dist/runtime/api/models/Role.d.ts +1 -1
  103. package/dist/runtime/api/models/SchemaAnalysis.d.ts +1 -1
  104. package/dist/runtime/api/models/SchemaAnalysisField.d.ts +1 -1
  105. package/dist/runtime/api/models/SchemaAnalysisFieldType.d.ts +1 -1
  106. package/dist/runtime/api/models/SearchRequest.d.ts +44 -0
  107. package/dist/runtime/api/models/SearchRequest.js +29 -0
  108. package/dist/runtime/api/models/SettingsResponse.d.ts +1 -1
  109. package/dist/runtime/api/models/UpdateFileInformationRequest.d.ts +1 -1
  110. package/dist/runtime/api/models/UpdateRequest.d.ts +1 -1
  111. package/dist/runtime/api/models/UpdateResponse.d.ts +1 -1
  112. package/dist/runtime/api/models/UpdateRoleRequest.d.ts +1 -1
  113. package/dist/runtime/api/models/UserInformation.d.ts +1 -1
  114. package/dist/runtime/api/models/UserProfile.d.ts +1 -1
  115. package/dist/runtime/api/models/Version.d.ts +1 -1
  116. package/dist/runtime/api/models/index.d.ts +15 -0
  117. package/dist/runtime/api/models/index.js +15 -0
  118. package/dist/runtime/api/runtime.d.ts +1 -1
  119. package/package.json +8 -8
@@ -5,12 +5,16 @@ 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 |
10
+ | [**exportDocuments**](DocumentApi.md#exportdocuments) | **GET** /mongodb/collections/{collectionName}/documents/export | Export Documents of a Collection |
9
11
  | [**find**](DocumentApi.md#find) | **POST** /mongodb/collections/{collectionName}/documents | Documents in Collection |
10
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 |
11
14
  | [**insert**](DocumentApi.md#insert) | **PUT** /mongodb/collections/{collectionName}/documents | Insert Document |
12
15
  | [**insertMany**](DocumentApi.md#insertmany) | **PUT** /mongodb/collections/{collectionName}/documents/many/insert | Insert many Documents |
13
16
  | [**listDocuments**](DocumentApi.md#listdocuments) | **GET** /mongodb/collections/{collectionName}/documents | Documents in Collection |
17
+ | [**searchDocuments**](DocumentApi.md#searchdocuments) | **POST** /mongodb/collections/{collectionName}/documents/search | Search Documents in Collection |
14
18
  | [**update**](DocumentApi.md#update) | **PATCH** /mongodb/collections/{collectionName}/documents/{documentId} | Update Document in Collection |
15
19
  | [**updateDocumentPartial**](DocumentApi.md#updatedocumentpartial) | **PATCH** /mongodb/collections/{collectionName}/documents/{documentId}/partial | Update Document Parts in Collection |
16
20
  | [**updateMany**](DocumentApi.md#updatemany) | **PATCH** /mongodb/collections/{collectionName}/documents/many/update | Update many in Collection |
@@ -97,9 +101,89 @@ example().catch(console.error);
97
101
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
98
102
 
99
103
 
104
+ ## countDocuments
105
+
106
+ > CountResponse countDocuments(collectionName, filter)
107
+
108
+ Count Documents in Collection
109
+
110
+ Count the Documents of the given Collection that match the filter without loading them
111
+
112
+ ### Example
113
+
114
+ ```ts
115
+ import {
116
+ Configuration,
117
+ DocumentApi,
118
+ } from '';
119
+ import type { CountDocumentsRequest } from '';
120
+
121
+ async function example() {
122
+ console.log("🚀 Testing SDK...");
123
+ const config = new Configuration({
124
+ // To configure HTTP basic authorization: httpAuth1
125
+ username: "YOUR USERNAME",
126
+ password: "YOUR PASSWORD",
127
+ // Configure HTTP bearer authorization: httpAuth
128
+ accessToken: "YOUR BEARER TOKEN",
129
+ // To configure API key authorization: apiKeyAuth
130
+ apiKey: "YOUR API KEY",
131
+ });
132
+ const api = new DocumentApi(config);
133
+
134
+ const body = {
135
+ // string | The name of your MongoDb Collection
136
+ collectionName: collectionName_example,
137
+ // string | Filter Query like on the list of documents, by default all documents are counted (optional)
138
+ filter: filter_example,
139
+ } satisfies CountDocumentsRequest;
140
+
141
+ try {
142
+ const data = await api.countDocuments(body);
143
+ console.log(data);
144
+ } catch (error) {
145
+ console.error(error);
146
+ }
147
+ }
148
+
149
+ // Run the test
150
+ example().catch(console.error);
151
+ ```
152
+
153
+ ### Parameters
154
+
155
+
156
+ | Name | Type | Description | Notes |
157
+ |------------- | ------------- | ------------- | -------------|
158
+ | **collectionName** | `string` | The name of your MongoDb Collection | [Defaults to `undefined`] |
159
+ | **filter** | `string` | Filter Query like on the list of documents, by default all documents are counted | [Optional] [Defaults to `undefined`] |
160
+
161
+ ### Return type
162
+
163
+ [**CountResponse**](CountResponse.md)
164
+
165
+ ### Authorization
166
+
167
+ [httpAuth1](../README.md#httpAuth1), [httpAuth](../README.md#httpAuth), [apiKeyAuth](../README.md#apiKeyAuth)
168
+
169
+ ### HTTP request headers
170
+
171
+ - **Content-Type**: Not defined
172
+ - **Accept**: `application/json`
173
+
174
+
175
+ ### HTTP response details
176
+ | Status code | Description | Response headers |
177
+ |-------------|-------------|------------------|
178
+ | **200** | | - |
179
+ | **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> |
180
+
181
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
182
+
183
+
100
184
  ## deleteMany
101
185
 
102
- > DeleteResponse deleteMany(collectionName, requestBody, matchAll)
186
+ > DeleteResponse deleteMany(collectionName, requestBody, matchAll, filter)
103
187
 
104
188
  Delete Many in Collection
105
189
 
@@ -134,6 +218,8 @@ async function example() {
134
218
  requestBody: Object,
135
219
  // boolean | Allow an empty filter, that matches all documents of the collection (optional)
136
220
  matchAll: true,
221
+ // 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)
222
+ filter: filter_example,
137
223
  } satisfies DeleteManyRequest;
138
224
 
139
225
  try {
@@ -156,6 +242,7 @@ example().catch(console.error);
156
242
  | **collectionName** | `string` | The name of your MongoDb Collection | [Defaults to `undefined`] |
157
243
  | **requestBody** | `{ [key: string]: any; }` | | |
158
244
  | **matchAll** | `boolean` | Allow an empty filter, that matches all documents of the collection | [Optional] [Defaults to `false`] |
245
+ | **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`] |
159
246
 
160
247
  ### Return type
161
248
 
@@ -181,9 +268,105 @@ example().catch(console.error);
181
268
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
182
269
 
183
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 &#x60;projection&#x60;, 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
+
184
367
  ## find
185
368
 
186
- > Array&lt;{ [key: string]: any; }&gt; find(collectionName, mongoFindRequest, rowsPerPage, page)
369
+ > Array&lt;{ [key: string]: any; }&gt; find(collectionName, mongoFindRequest, rowsPerPage, page, extendedJson)
187
370
 
188
371
  Documents in Collection
189
372
 
@@ -220,6 +403,8 @@ async function example() {
220
403
  rowsPerPage: 100,
221
404
  // number | Requested page of the ResultSets (optional)
222
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,
223
408
  } satisfies FindRequest;
224
409
 
225
410
  try {
@@ -243,6 +428,7 @@ example().catch(console.error);
243
428
  | **mongoFindRequest** | [MongoFindRequest](MongoFindRequest.md) | | |
244
429
  | **rowsPerPage** | `number` | Count elements per page | [Optional] [Defaults to `undefined`] |
245
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`] |
246
432
 
247
433
  ### Return type
248
434
 
@@ -270,7 +456,7 @@ example().catch(console.error);
270
456
 
271
457
  ## getDocument
272
458
 
273
- > { [key: string]: any; } getDocument(collectionName, documentId)
459
+ > { [key: string]: any; } getDocument(collectionName, documentId, extendedJson)
274
460
 
275
461
  Document from Collection
276
462
 
@@ -303,6 +489,8 @@ async function example() {
303
489
  collectionName: collectionName_example,
304
490
  // string | DocumentId to read
305
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,
306
494
  } satisfies GetDocumentRequest;
307
495
 
308
496
  try {
@@ -324,6 +512,7 @@ example().catch(console.error);
324
512
  |------------- | ------------- | ------------- | -------------|
325
513
  | **collectionName** | `string` | The name of your MongoDb Collection | [Defaults to `undefined`] |
326
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`] |
327
516
 
328
517
  ### Return type
329
518
 
@@ -348,6 +537,87 @@ example().catch(console.error);
348
537
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
349
538
 
350
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
+
351
621
  ## insert
352
622
 
353
623
  > InsertResponse insert(collectionName, requestBody)
@@ -382,7 +652,7 @@ async function example() {
382
652
  // string | The name of your MongoDb Collection
383
653
  collectionName: collectionName_example,
384
654
  // { [key: string]: any; } | JSON Representation for your Document.
385
- requestBody: {"key1":"value","key2":true,"key3":{"creationDate":"2026-11-02T05:03:40.430Z"}},
655
+ requestBody: {"key1":"value","key2":true,"key3":{"creationDate":"2026-11-08T16:48:08.839Z"}},
386
656
  } satisfies InsertRequest;
387
657
 
388
658
  try {
@@ -431,7 +701,7 @@ example().catch(console.error);
431
701
 
432
702
  ## insertMany
433
703
 
434
- > InsertResponse insertMany(collectionName, requestBody)
704
+ > InsertResponse insertMany(collectionName, ordered, requestBody)
435
705
 
436
706
  Insert many Documents
437
707
 
@@ -462,6 +732,8 @@ async function example() {
462
732
  const body = {
463
733
  // string | The name of your MongoDb Collection
464
734
  collectionName: collectionName_example,
735
+ // 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)
736
+ ordered: true,
465
737
  // Array<{ [key: string]: any; }> (optional)
466
738
  requestBody: ...,
467
739
  } satisfies InsertManyRequest;
@@ -484,6 +756,7 @@ example().catch(console.error);
484
756
  | Name | Type | Description | Notes |
485
757
  |------------- | ------------- | ------------- | -------------|
486
758
  | **collectionName** | `string` | The name of your MongoDb Collection | [Defaults to `undefined`] |
759
+ | **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`] |
487
760
  | **requestBody** | `Array<{ [key: string]: any; }>` | | [Optional] |
488
761
 
489
762
  ### Return type
@@ -504,7 +777,7 @@ example().catch(console.error);
504
777
  | Status code | Description | Response headers |
505
778
  |-------------|-------------|------------------|
506
779
  | **200** | | - |
507
- | **400** | Invalid value for: body | - |
780
+ | **400** | Invalid value for: body, Invalid value for: query parameter ordered | - |
508
781
  | **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> |
509
782
 
510
783
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
@@ -512,7 +785,7 @@ example().catch(console.error);
512
785
 
513
786
  ## listDocuments
514
787
 
515
- > 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)
516
789
 
517
790
  Documents in Collection
518
791
 
@@ -553,6 +826,8 @@ async function example() {
553
826
  rowsPerPage: 100,
554
827
  // number | Requested page of the ResultSets (optional)
555
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,
556
831
  } satisfies ListDocumentsRequest;
557
832
 
558
833
  try {
@@ -578,6 +853,7 @@ example().catch(console.error);
578
853
  | **projection** | `Array<string>` | MongoDB projection | [Optional] |
579
854
  | **rowsPerPage** | `number` | Count elements per page | [Optional] [Defaults to `undefined`] |
580
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`] |
581
857
 
582
858
  ### Return type
583
859
 
@@ -603,6 +879,96 @@ example().catch(console.error);
603
879
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
604
880
 
605
881
 
882
+ ## searchDocuments
883
+
884
+ > Array&lt;{ [key: string]: any; }&gt; searchDocuments(collectionName, searchRequest, rowsPerPage, page, extendedJson)
885
+
886
+ Search Documents in Collection
887
+
888
+ 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.
889
+
890
+ ### Example
891
+
892
+ ```ts
893
+ import {
894
+ Configuration,
895
+ DocumentApi,
896
+ } from '';
897
+ import type { SearchDocumentsRequest } from '';
898
+
899
+ async function example() {
900
+ console.log("🚀 Testing SDK...");
901
+ const config = new Configuration({
902
+ // To configure HTTP basic authorization: httpAuth1
903
+ username: "YOUR USERNAME",
904
+ password: "YOUR PASSWORD",
905
+ // Configure HTTP bearer authorization: httpAuth
906
+ accessToken: "YOUR BEARER TOKEN",
907
+ // To configure API key authorization: apiKeyAuth
908
+ apiKey: "YOUR API KEY",
909
+ });
910
+ const api = new DocumentApi(config);
911
+
912
+ const body = {
913
+ // string | The name of your MongoDb Collection
914
+ collectionName: collectionName_example,
915
+ // SearchRequest
916
+ searchRequest: {"filter":"name:John AND age:[18 TO 65]","sort":["-age"],"projection":["name","age"]},
917
+ // number | Count elements per page (optional)
918
+ rowsPerPage: 100,
919
+ // number | Requested page of the ResultSets (optional)
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,
923
+ } satisfies SearchDocumentsRequest;
924
+
925
+ try {
926
+ const data = await api.searchDocuments(body);
927
+ console.log(data);
928
+ } catch (error) {
929
+ console.error(error);
930
+ }
931
+ }
932
+
933
+ // Run the test
934
+ example().catch(console.error);
935
+ ```
936
+
937
+ ### Parameters
938
+
939
+
940
+ | Name | Type | Description | Notes |
941
+ |------------- | ------------- | ------------- | -------------|
942
+ | **collectionName** | `string` | The name of your MongoDb Collection | [Defaults to `undefined`] |
943
+ | **searchRequest** | [SearchRequest](SearchRequest.md) | | |
944
+ | **rowsPerPage** | `number` | Count elements per page | [Optional] [Defaults to `undefined`] |
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`] |
947
+
948
+ ### Return type
949
+
950
+ **Array<{ [key: string]: any; }>**
951
+
952
+ ### Authorization
953
+
954
+ [httpAuth1](../README.md#httpAuth1), [httpAuth](../README.md#httpAuth), [apiKeyAuth](../README.md#apiKeyAuth)
955
+
956
+ ### HTTP request headers
957
+
958
+ - **Content-Type**: `application/json`
959
+ - **Accept**: `application/json`, `text/plain`
960
+
961
+
962
+ ### HTTP response details
963
+ | Status code | Description | Response headers |
964
+ |-------------|-------------|------------------|
965
+ | **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> |
966
+ | **400** | Invalid value for: body, Invalid value for: query parameter rowsPerPage, Invalid value for: query parameter page | - |
967
+ | **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> |
968
+
969
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
970
+
971
+
606
972
  ## update
607
973
 
608
974
  > UpdateResponse update(collectionName, documentId, requestBody)
@@ -773,7 +1139,7 @@ example().catch(console.error);
773
1139
 
774
1140
  ## updateMany
775
1141
 
776
- > UpdateResponse updateMany(collectionName, updateRequest, matchAll)
1142
+ > UpdateResponse updateMany(collectionName, updateRequest, matchAll, filter)
777
1143
 
778
1144
  Update many in Collection
779
1145
 
@@ -808,6 +1174,8 @@ async function example() {
808
1174
  updateRequest: ...,
809
1175
  // boolean | Allow an empty filter, that matches all documents of the collection (optional)
810
1176
  matchAll: true,
1177
+ // 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)
1178
+ filter: filter_example,
811
1179
  } satisfies UpdateManyRequest;
812
1180
 
813
1181
  try {
@@ -830,6 +1198,7 @@ example().catch(console.error);
830
1198
  | **collectionName** | `string` | The name of your MongoDb Collection | [Defaults to `undefined`] |
831
1199
  | **updateRequest** | [UpdateRequest](UpdateRequest.md) | | |
832
1200
  | **matchAll** | `boolean` | Allow an empty filter, that matches all documents of the collection | [Optional] [Defaults to `false`] |
1201
+ | **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`] |
833
1202
 
834
1203
  ### Return type
835
1204
 
@@ -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
+