@sfxcode/nuxt-mongocamp-server 1.2.8 → 1.3.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 (70) hide show
  1. package/dist/module.d.mts +1 -0
  2. package/dist/module.json +3 -3
  3. package/dist/module.mjs +4 -3
  4. package/dist/runtime/api/.openapi-generator/FILES +50 -0
  5. package/dist/runtime/api/.openapi-generator/VERSION +1 -1
  6. package/dist/runtime/api/apis/AdminApi.js +32 -12
  7. package/dist/runtime/api/apis/ApplicationApi.js +12 -5
  8. package/dist/runtime/api/apis/AuthApi.js +16 -8
  9. package/dist/runtime/api/apis/BucketApi.js +11 -4
  10. package/dist/runtime/api/apis/CollectionApi.js +30 -10
  11. package/dist/runtime/api/apis/DatabaseApi.js +13 -5
  12. package/dist/runtime/api/apis/DocumentApi.js +34 -10
  13. package/dist/runtime/api/apis/FileApi.js +25 -7
  14. package/dist/runtime/api/apis/IndexApi.js +31 -8
  15. package/dist/runtime/api/apis/InformationApi.js +2 -1
  16. package/dist/runtime/api/apis/JobsApi.js +18 -6
  17. package/dist/runtime/api/docs/AdminApi.md +972 -0
  18. package/dist/runtime/api/docs/ApplicationApi.md +387 -0
  19. package/dist/runtime/api/docs/AuthApi.md +577 -0
  20. package/dist/runtime/api/docs/BucketApi.md +312 -0
  21. package/dist/runtime/api/docs/BucketInformation.md +40 -0
  22. package/dist/runtime/api/docs/CollectionApi.md +822 -0
  23. package/dist/runtime/api/docs/CollectionStatus.md +58 -0
  24. package/dist/runtime/api/docs/DatabaseApi.md +382 -0
  25. package/dist/runtime/api/docs/DatabaseInfo.md +42 -0
  26. package/dist/runtime/api/docs/DeleteResponse.md +36 -0
  27. package/dist/runtime/api/docs/DocumentApi.md +850 -0
  28. package/dist/runtime/api/docs/ErrorDescription.md +38 -0
  29. package/dist/runtime/api/docs/FileApi.md +606 -0
  30. package/dist/runtime/api/docs/FileInformation.md +44 -0
  31. package/dist/runtime/api/docs/Grant.md +42 -0
  32. package/dist/runtime/api/docs/IndexApi.md +682 -0
  33. package/dist/runtime/api/docs/IndexCreateRequest.md +36 -0
  34. package/dist/runtime/api/docs/IndexCreateResponse.md +34 -0
  35. package/dist/runtime/api/docs/IndexDropResponse.md +34 -0
  36. package/dist/runtime/api/docs/IndexOptionsRequest.md +48 -0
  37. package/dist/runtime/api/docs/InformationApi.md +69 -0
  38. package/dist/runtime/api/docs/InsertResponse.md +36 -0
  39. package/dist/runtime/api/docs/JobConfig.md +44 -0
  40. package/dist/runtime/api/docs/JobInformation.md +50 -0
  41. package/dist/runtime/api/docs/JobsApi.md +474 -0
  42. package/dist/runtime/api/docs/JsonSchema.md +38 -0
  43. package/dist/runtime/api/docs/JsonSchemaDefinition.md +42 -0
  44. package/dist/runtime/api/docs/JsonValueAny.md +34 -0
  45. package/dist/runtime/api/docs/JsonValueBoolean.md +34 -0
  46. package/dist/runtime/api/docs/JsonValueString.md +34 -0
  47. package/dist/runtime/api/docs/Login.md +36 -0
  48. package/dist/runtime/api/docs/LoginResult.md +38 -0
  49. package/dist/runtime/api/docs/MongoAggregateRequest.md +36 -0
  50. package/dist/runtime/api/docs/MongoCampConfiguration.md +42 -0
  51. package/dist/runtime/api/docs/MongoFindRequest.md +38 -0
  52. package/dist/runtime/api/docs/MongoIndex.md +56 -0
  53. package/dist/runtime/api/docs/PasswordUpdateRequest.md +34 -0
  54. package/dist/runtime/api/docs/PipelineStage.md +36 -0
  55. package/dist/runtime/api/docs/Role.md +38 -0
  56. package/dist/runtime/api/docs/SchemaAnalysis.md +40 -0
  57. package/dist/runtime/api/docs/SchemaAnalysisField.md +44 -0
  58. package/dist/runtime/api/docs/SchemaAnalysisFieldType.md +38 -0
  59. package/dist/runtime/api/docs/SettingsResponse.md +40 -0
  60. package/dist/runtime/api/docs/UpdateFileInformationRequest.md +36 -0
  61. package/dist/runtime/api/docs/UpdateRequest.md +36 -0
  62. package/dist/runtime/api/docs/UpdateResponse.md +40 -0
  63. package/dist/runtime/api/docs/UpdateRoleRequest.md +36 -0
  64. package/dist/runtime/api/docs/UserInformation.md +40 -0
  65. package/dist/runtime/api/docs/UserProfile.md +42 -0
  66. package/dist/runtime/api/docs/Version.md +38 -0
  67. package/dist/runtime/api/models/JobInformation.js +2 -2
  68. package/dist/runtime/composables/mongocampAuth.d.ts +3 -3
  69. package/dist/types.d.mts +2 -0
  70. package/package.json +16 -16
@@ -0,0 +1,850 @@
1
+ # DocumentApi
2
+
3
+ All URIs are relative to *http://localhost*
4
+
5
+ | Method | HTTP request | Description |
6
+ |------------- | ------------- | -------------|
7
+ | [**_delete**](DocumentApi.md#_delete) | **DELETE** /mongodb/collections/{collectionName}/documents/{documentId} | Delete Document from Collection |
8
+ | [**deleteMany**](DocumentApi.md#deletemany) | **DELETE** /mongodb/collections/{collectionName}/documents/many/delete | Delete Many in Collection |
9
+ | [**find**](DocumentApi.md#find) | **POST** /mongodb/collections/{collectionName}/documents | Documents in Collection |
10
+ | [**getDocument**](DocumentApi.md#getdocument) | **GET** /mongodb/collections/{collectionName}/documents/{documentId} | Document from Collection |
11
+ | [**insert**](DocumentApi.md#insert) | **PUT** /mongodb/collections/{collectionName}/documents | Insert Document |
12
+ | [**insertMany**](DocumentApi.md#insertmany) | **PUT** /mongodb/collections/{collectionName}/documents/many/insert | Insert many Documents |
13
+ | [**listDocuments**](DocumentApi.md#listdocuments) | **GET** /mongodb/collections/{collectionName}/documents | Documents in Collection |
14
+ | [**update**](DocumentApi.md#update) | **PATCH** /mongodb/collections/{collectionName}/documents/{documentId} | Update Document in Collection |
15
+ | [**updateDocumentPartial**](DocumentApi.md#updatedocumentpartial) | **PATCH** /mongodb/collections/{collectionName}/documents/{documentId}/partial | Update Document Parts in Collection |
16
+ | [**updateMany**](DocumentApi.md#updatemany) | **PATCH** /mongodb/collections/{collectionName}/documents/many/update | Update many in Collection |
17
+
18
+
19
+
20
+ ## _delete
21
+
22
+ > DeleteResponse _delete(collectionName, documentId)
23
+
24
+ Delete Document from Collection
25
+
26
+ Delete one Document from given Collection
27
+
28
+ ### Example
29
+
30
+ ```ts
31
+ import {
32
+ Configuration,
33
+ DocumentApi,
34
+ } from '';
35
+ import type { DeleteRequest } from '';
36
+
37
+ async function example() {
38
+ console.log("🚀 Testing SDK...");
39
+ const config = new Configuration({
40
+ // To configure HTTP basic authorization: httpAuth1
41
+ username: "YOUR USERNAME",
42
+ password: "YOUR PASSWORD",
43
+ // Configure HTTP bearer authorization: httpAuth
44
+ accessToken: "YOUR BEARER TOKEN",
45
+ // To configure API key authorization: apiKeyAuth
46
+ apiKey: "YOUR API KEY",
47
+ });
48
+ const api = new DocumentApi(config);
49
+
50
+ const body = {
51
+ // string | The name of your MongoDb Collection
52
+ collectionName: collectionName_example,
53
+ // string | DocumentId to delete
54
+ documentId: documentId_example,
55
+ } satisfies DeleteRequest;
56
+
57
+ try {
58
+ const data = await api._delete(body);
59
+ console.log(data);
60
+ } catch (error) {
61
+ console.error(error);
62
+ }
63
+ }
64
+
65
+ // Run the test
66
+ example().catch(console.error);
67
+ ```
68
+
69
+ ### Parameters
70
+
71
+
72
+ | Name | Type | Description | Notes |
73
+ |------------- | ------------- | ------------- | -------------|
74
+ | **collectionName** | `string` | The name of your MongoDb Collection | [Defaults to `undefined`] |
75
+ | **documentId** | `string` | DocumentId to delete | [Defaults to `undefined`] |
76
+
77
+ ### Return type
78
+
79
+ [**DeleteResponse**](DeleteResponse.md)
80
+
81
+ ### Authorization
82
+
83
+ [httpAuth1](../README.md#httpAuth1), [httpAuth](../README.md#httpAuth), [apiKeyAuth](../README.md#apiKeyAuth)
84
+
85
+ ### HTTP request headers
86
+
87
+ - **Content-Type**: Not defined
88
+ - **Accept**: `application/json`
89
+
90
+
91
+ ### HTTP response details
92
+ | Status code | Description | Response headers |
93
+ |-------------|-------------|------------------|
94
+ | **200** | | - |
95
+ | **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> |
96
+
97
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
98
+
99
+
100
+ ## deleteMany
101
+
102
+ > DeleteResponse deleteMany(collectionName, requestBody)
103
+
104
+ Delete Many in Collection
105
+
106
+ Delete many Document in given Collection
107
+
108
+ ### Example
109
+
110
+ ```ts
111
+ import {
112
+ Configuration,
113
+ DocumentApi,
114
+ } from '';
115
+ import type { DeleteManyRequest } from '';
116
+
117
+ async function example() {
118
+ console.log("🚀 Testing SDK...");
119
+ const config = new Configuration({
120
+ // To configure HTTP basic authorization: httpAuth1
121
+ username: "YOUR USERNAME",
122
+ password: "YOUR PASSWORD",
123
+ // Configure HTTP bearer authorization: httpAuth
124
+ accessToken: "YOUR BEARER TOKEN",
125
+ // To configure API key authorization: apiKeyAuth
126
+ apiKey: "YOUR API KEY",
127
+ });
128
+ const api = new DocumentApi(config);
129
+
130
+ const body = {
131
+ // string | The name of your MongoDb Collection
132
+ collectionName: collectionName_example,
133
+ // { [key: string]: string; }
134
+ requestBody: Object,
135
+ } satisfies DeleteManyRequest;
136
+
137
+ try {
138
+ const data = await api.deleteMany(body);
139
+ console.log(data);
140
+ } catch (error) {
141
+ console.error(error);
142
+ }
143
+ }
144
+
145
+ // Run the test
146
+ example().catch(console.error);
147
+ ```
148
+
149
+ ### Parameters
150
+
151
+
152
+ | Name | Type | Description | Notes |
153
+ |------------- | ------------- | ------------- | -------------|
154
+ | **collectionName** | `string` | The name of your MongoDb Collection | [Defaults to `undefined`] |
155
+ | **requestBody** | `{ [key: string]: string; }` | | |
156
+
157
+ ### Return type
158
+
159
+ [**DeleteResponse**](DeleteResponse.md)
160
+
161
+ ### Authorization
162
+
163
+ [httpAuth1](../README.md#httpAuth1), [httpAuth](../README.md#httpAuth), [apiKeyAuth](../README.md#apiKeyAuth)
164
+
165
+ ### HTTP request headers
166
+
167
+ - **Content-Type**: `application/json`
168
+ - **Accept**: `application/json`, `text/plain`
169
+
170
+
171
+ ### HTTP response details
172
+ | Status code | Description | Response headers |
173
+ |-------------|-------------|------------------|
174
+ | **200** | | - |
175
+ | **400** | Invalid value for: body | - |
176
+ | **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
+
178
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
179
+
180
+
181
+ ## find
182
+
183
+ > Array&lt;{ [key: string]: string; }&gt; find(collectionName, mongoFindRequest, rowsPerPage, page)
184
+
185
+ Documents in Collection
186
+
187
+ Alternative to GET Route for more complex queries and URL max. Length
188
+
189
+ ### Example
190
+
191
+ ```ts
192
+ import {
193
+ Configuration,
194
+ DocumentApi,
195
+ } from '';
196
+ import type { FindRequest } from '';
197
+
198
+ async function example() {
199
+ console.log("🚀 Testing SDK...");
200
+ const config = new Configuration({
201
+ // To configure HTTP basic authorization: httpAuth1
202
+ username: "YOUR USERNAME",
203
+ password: "YOUR PASSWORD",
204
+ // Configure HTTP bearer authorization: httpAuth
205
+ accessToken: "YOUR BEARER TOKEN",
206
+ // To configure API key authorization: apiKeyAuth
207
+ apiKey: "YOUR API KEY",
208
+ });
209
+ const api = new DocumentApi(config);
210
+
211
+ const body = {
212
+ // string | The name of your MongoDb Collection
213
+ collectionName: collectionName_example,
214
+ // MongoFindRequest
215
+ mongoFindRequest: {"filter":{"additionalProp1":"string","additionalProp2":123},"sort":{"additionalProp2":-1},"projection":{"additionalProp1":1,"additionalProp2":1}},
216
+ // number | Count elements per page (optional)
217
+ rowsPerPage: 100,
218
+ // number | Requested page of the ResultSets (optional)
219
+ page: 1,
220
+ } satisfies FindRequest;
221
+
222
+ try {
223
+ const data = await api.find(body);
224
+ console.log(data);
225
+ } catch (error) {
226
+ console.error(error);
227
+ }
228
+ }
229
+
230
+ // Run the test
231
+ example().catch(console.error);
232
+ ```
233
+
234
+ ### Parameters
235
+
236
+
237
+ | Name | Type | Description | Notes |
238
+ |------------- | ------------- | ------------- | -------------|
239
+ | **collectionName** | `string` | The name of your MongoDb Collection | [Defaults to `undefined`] |
240
+ | **mongoFindRequest** | [MongoFindRequest](MongoFindRequest.md) | | |
241
+ | **rowsPerPage** | `number` | Count elements per page | [Optional] [Defaults to `undefined`] |
242
+ | **page** | `number` | Requested page of the ResultSets | [Optional] [Defaults to `undefined`] |
243
+
244
+ ### Return type
245
+
246
+ **Array<{ [key: string]: string; }>**
247
+
248
+ ### Authorization
249
+
250
+ [httpAuth1](../README.md#httpAuth1), [httpAuth](../README.md#httpAuth), [apiKeyAuth](../README.md#apiKeyAuth)
251
+
252
+ ### HTTP request headers
253
+
254
+ - **Content-Type**: `application/json`
255
+ - **Accept**: `application/json`, `text/plain`
256
+
257
+
258
+ ### HTTP response details
259
+ | Status code | Description | Response headers |
260
+ |-------------|-------------|------------------|
261
+ | **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> |
262
+ | **400** | Invalid value for: body, Invalid value for: query parameter rowsPerPage, Invalid value for: query parameter page | - |
263
+ | **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> |
264
+
265
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
266
+
267
+
268
+ ## getDocument
269
+
270
+ > { [key: string]: string; } getDocument(collectionName, documentId)
271
+
272
+ Document from Collection
273
+
274
+ Get one Document from given Collection
275
+
276
+ ### Example
277
+
278
+ ```ts
279
+ import {
280
+ Configuration,
281
+ DocumentApi,
282
+ } from '';
283
+ import type { GetDocumentRequest } from '';
284
+
285
+ async function example() {
286
+ console.log("🚀 Testing SDK...");
287
+ const config = new Configuration({
288
+ // To configure HTTP basic authorization: httpAuth1
289
+ username: "YOUR USERNAME",
290
+ password: "YOUR PASSWORD",
291
+ // Configure HTTP bearer authorization: httpAuth
292
+ accessToken: "YOUR BEARER TOKEN",
293
+ // To configure API key authorization: apiKeyAuth
294
+ apiKey: "YOUR API KEY",
295
+ });
296
+ const api = new DocumentApi(config);
297
+
298
+ const body = {
299
+ // string | The name of your MongoDb Collection
300
+ collectionName: collectionName_example,
301
+ // string | DocumentId to read
302
+ documentId: documentId_example,
303
+ } satisfies GetDocumentRequest;
304
+
305
+ try {
306
+ const data = await api.getDocument(body);
307
+ console.log(data);
308
+ } catch (error) {
309
+ console.error(error);
310
+ }
311
+ }
312
+
313
+ // Run the test
314
+ example().catch(console.error);
315
+ ```
316
+
317
+ ### Parameters
318
+
319
+
320
+ | Name | Type | Description | Notes |
321
+ |------------- | ------------- | ------------- | -------------|
322
+ | **collectionName** | `string` | The name of your MongoDb Collection | [Defaults to `undefined`] |
323
+ | **documentId** | `string` | DocumentId to read | [Defaults to `undefined`] |
324
+
325
+ ### Return type
326
+
327
+ **{ [key: string]: string; }**
328
+
329
+ ### Authorization
330
+
331
+ [httpAuth1](../README.md#httpAuth1), [httpAuth](../README.md#httpAuth), [apiKeyAuth](../README.md#apiKeyAuth)
332
+
333
+ ### HTTP request headers
334
+
335
+ - **Content-Type**: Not defined
336
+ - **Accept**: `application/json`
337
+
338
+
339
+ ### HTTP response details
340
+ | Status code | Description | Response headers |
341
+ |-------------|-------------|------------------|
342
+ | **200** | | - |
343
+ | **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> |
344
+
345
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
346
+
347
+
348
+ ## insert
349
+
350
+ > InsertResponse insert(collectionName, requestBody)
351
+
352
+ Insert Document
353
+
354
+ Insert one Document in given Collection
355
+
356
+ ### Example
357
+
358
+ ```ts
359
+ import {
360
+ Configuration,
361
+ DocumentApi,
362
+ } from '';
363
+ import type { InsertRequest } from '';
364
+
365
+ async function example() {
366
+ console.log("🚀 Testing SDK...");
367
+ const config = new Configuration({
368
+ // To configure HTTP basic authorization: httpAuth1
369
+ username: "YOUR USERNAME",
370
+ password: "YOUR PASSWORD",
371
+ // Configure HTTP bearer authorization: httpAuth
372
+ accessToken: "YOUR BEARER TOKEN",
373
+ // To configure API key authorization: apiKeyAuth
374
+ apiKey: "YOUR API KEY",
375
+ });
376
+ const api = new DocumentApi(config);
377
+
378
+ const body = {
379
+ // string | The name of your MongoDb Collection
380
+ 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"}},
383
+ } satisfies InsertRequest;
384
+
385
+ try {
386
+ const data = await api.insert(body);
387
+ console.log(data);
388
+ } catch (error) {
389
+ console.error(error);
390
+ }
391
+ }
392
+
393
+ // Run the test
394
+ example().catch(console.error);
395
+ ```
396
+
397
+ ### Parameters
398
+
399
+
400
+ | Name | Type | Description | Notes |
401
+ |------------- | ------------- | ------------- | -------------|
402
+ | **collectionName** | `string` | The name of your MongoDb Collection | [Defaults to `undefined`] |
403
+ | **requestBody** | `{ [key: string]: string; }` | JSON Representation for your Document. | |
404
+
405
+ ### Return type
406
+
407
+ [**InsertResponse**](InsertResponse.md)
408
+
409
+ ### Authorization
410
+
411
+ [httpAuth1](../README.md#httpAuth1), [httpAuth](../README.md#httpAuth), [apiKeyAuth](../README.md#apiKeyAuth)
412
+
413
+ ### HTTP request headers
414
+
415
+ - **Content-Type**: `application/json`
416
+ - **Accept**: `application/json`, `text/plain`
417
+
418
+
419
+ ### HTTP response details
420
+ | Status code | Description | Response headers |
421
+ |-------------|-------------|------------------|
422
+ | **200** | | - |
423
+ | **400** | Invalid value for: body | - |
424
+ | **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> |
425
+
426
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
427
+
428
+
429
+ ## insertMany
430
+
431
+ > InsertResponse insertMany(collectionName, requestBody)
432
+
433
+ Insert many Documents
434
+
435
+ Insert many documents in given Collection
436
+
437
+ ### Example
438
+
439
+ ```ts
440
+ import {
441
+ Configuration,
442
+ DocumentApi,
443
+ } from '';
444
+ import type { InsertManyRequest } from '';
445
+
446
+ async function example() {
447
+ console.log("🚀 Testing SDK...");
448
+ const config = new Configuration({
449
+ // To configure HTTP basic authorization: httpAuth1
450
+ username: "YOUR USERNAME",
451
+ password: "YOUR PASSWORD",
452
+ // Configure HTTP bearer authorization: httpAuth
453
+ accessToken: "YOUR BEARER TOKEN",
454
+ // To configure API key authorization: apiKeyAuth
455
+ apiKey: "YOUR API KEY",
456
+ });
457
+ const api = new DocumentApi(config);
458
+
459
+ const body = {
460
+ // string | The name of your MongoDb Collection
461
+ collectionName: collectionName_example,
462
+ // Array<{ [key: string]: string; }> (optional)
463
+ requestBody: ...,
464
+ } satisfies InsertManyRequest;
465
+
466
+ try {
467
+ const data = await api.insertMany(body);
468
+ console.log(data);
469
+ } catch (error) {
470
+ console.error(error);
471
+ }
472
+ }
473
+
474
+ // Run the test
475
+ example().catch(console.error);
476
+ ```
477
+
478
+ ### Parameters
479
+
480
+
481
+ | Name | Type | Description | Notes |
482
+ |------------- | ------------- | ------------- | -------------|
483
+ | **collectionName** | `string` | The name of your MongoDb Collection | [Defaults to `undefined`] |
484
+ | **requestBody** | `Array<{ [key: string]: string; }>` | | [Optional] |
485
+
486
+ ### Return type
487
+
488
+ [**InsertResponse**](InsertResponse.md)
489
+
490
+ ### Authorization
491
+
492
+ [httpAuth1](../README.md#httpAuth1), [httpAuth](../README.md#httpAuth), [apiKeyAuth](../README.md#apiKeyAuth)
493
+
494
+ ### HTTP request headers
495
+
496
+ - **Content-Type**: `application/json`
497
+ - **Accept**: `application/json`, `text/plain`
498
+
499
+
500
+ ### HTTP response details
501
+ | Status code | Description | Response headers |
502
+ |-------------|-------------|------------------|
503
+ | **200** | | - |
504
+ | **400** | Invalid value for: body | - |
505
+ | **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
+
507
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
508
+
509
+
510
+ ## listDocuments
511
+
512
+ > Array&lt;{ [key: string]: string; }&gt; listDocuments(collectionName, filter, sort, projection, rowsPerPage, page)
513
+
514
+ Documents in Collection
515
+
516
+ Get Documents paginated from given Collection
517
+
518
+ ### Example
519
+
520
+ ```ts
521
+ import {
522
+ Configuration,
523
+ DocumentApi,
524
+ } from '';
525
+ import type { ListDocumentsRequest } from '';
526
+
527
+ async function example() {
528
+ console.log("🚀 Testing SDK...");
529
+ const config = new Configuration({
530
+ // To configure HTTP basic authorization: httpAuth1
531
+ username: "YOUR USERNAME",
532
+ password: "YOUR PASSWORD",
533
+ // Configure HTTP bearer authorization: httpAuth
534
+ accessToken: "YOUR BEARER TOKEN",
535
+ // To configure API key authorization: apiKeyAuth
536
+ apiKey: "YOUR API KEY",
537
+ });
538
+ const api = new DocumentApi(config);
539
+
540
+ const body = {
541
+ // string | The name of your MongoDb Collection
542
+ collectionName: collectionName_example,
543
+ // string | MongoDB Filter Query by Default all filter (optional)
544
+ filter: filter_example,
545
+ // Array<string> | MongoDB sorting (optional)
546
+ sort: [],
547
+ // Array<string> | MongoDB projection (optional)
548
+ projection: [],
549
+ // number | Count elements per page (optional)
550
+ rowsPerPage: 100,
551
+ // number | Requested page of the ResultSets (optional)
552
+ page: 1,
553
+ } satisfies ListDocumentsRequest;
554
+
555
+ try {
556
+ const data = await api.listDocuments(body);
557
+ console.log(data);
558
+ } catch (error) {
559
+ console.error(error);
560
+ }
561
+ }
562
+
563
+ // Run the test
564
+ example().catch(console.error);
565
+ ```
566
+
567
+ ### Parameters
568
+
569
+
570
+ | Name | Type | Description | Notes |
571
+ |------------- | ------------- | ------------- | -------------|
572
+ | **collectionName** | `string` | The name of your MongoDb Collection | [Defaults to `undefined`] |
573
+ | **filter** | `string` | MongoDB Filter Query by Default all filter | [Optional] [Defaults to `undefined`] |
574
+ | **sort** | `Array<string>` | MongoDB sorting | [Optional] |
575
+ | **projection** | `Array<string>` | MongoDB projection | [Optional] |
576
+ | **rowsPerPage** | `number` | Count elements per page | [Optional] [Defaults to `undefined`] |
577
+ | **page** | `number` | Requested page of the ResultSets | [Optional] [Defaults to `undefined`] |
578
+
579
+ ### Return type
580
+
581
+ **Array<{ [key: string]: string; }>**
582
+
583
+ ### Authorization
584
+
585
+ [httpAuth1](../README.md#httpAuth1), [httpAuth](../README.md#httpAuth), [apiKeyAuth](../README.md#apiKeyAuth)
586
+
587
+ ### HTTP request headers
588
+
589
+ - **Content-Type**: Not defined
590
+ - **Accept**: `application/json`, `text/plain`
591
+
592
+
593
+ ### HTTP response details
594
+ | Status code | Description | Response headers |
595
+ |-------------|-------------|------------------|
596
+ | **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 | - |
598
+ | **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
+
600
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
601
+
602
+
603
+ ## update
604
+
605
+ > UpdateResponse update(collectionName, documentId, requestBody)
606
+
607
+ Update Document in Collection
608
+
609
+ \&#39;Replace\&#39; one Document with the new document from Request in Collection
610
+
611
+ ### Example
612
+
613
+ ```ts
614
+ import {
615
+ Configuration,
616
+ DocumentApi,
617
+ } from '';
618
+ import type { UpdateRequest } from '';
619
+
620
+ async function example() {
621
+ console.log("🚀 Testing SDK...");
622
+ const config = new Configuration({
623
+ // To configure HTTP basic authorization: httpAuth1
624
+ username: "YOUR USERNAME",
625
+ password: "YOUR PASSWORD",
626
+ // Configure HTTP bearer authorization: httpAuth
627
+ accessToken: "YOUR BEARER TOKEN",
628
+ // To configure API key authorization: apiKeyAuth
629
+ apiKey: "YOUR API KEY",
630
+ });
631
+ const api = new DocumentApi(config);
632
+
633
+ const body = {
634
+ // string | The name of your MongoDb Collection
635
+ collectionName: collectionName_example,
636
+ // string | DocumentId to update
637
+ documentId: documentId_example,
638
+ // { [key: string]: string; }
639
+ requestBody: Object,
640
+ } satisfies UpdateRequest;
641
+
642
+ try {
643
+ const data = await api.update(body);
644
+ console.log(data);
645
+ } catch (error) {
646
+ console.error(error);
647
+ }
648
+ }
649
+
650
+ // Run the test
651
+ example().catch(console.error);
652
+ ```
653
+
654
+ ### Parameters
655
+
656
+
657
+ | Name | Type | Description | Notes |
658
+ |------------- | ------------- | ------------- | -------------|
659
+ | **collectionName** | `string` | The name of your MongoDb Collection | [Defaults to `undefined`] |
660
+ | **documentId** | `string` | DocumentId to update | [Defaults to `undefined`] |
661
+ | **requestBody** | `{ [key: string]: string; }` | | |
662
+
663
+ ### Return type
664
+
665
+ [**UpdateResponse**](UpdateResponse.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**: `application/json`
674
+ - **Accept**: `application/json`, `text/plain`
675
+
676
+
677
+ ### HTTP response details
678
+ | Status code | Description | Response headers |
679
+ |-------------|-------------|------------------|
680
+ | **200** | | - |
681
+ | **400** | Invalid value for: body | - |
682
+ | **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> |
683
+
684
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
685
+
686
+
687
+ ## updateDocumentPartial
688
+
689
+ > UpdateResponse updateDocumentPartial(collectionName, documentId, requestBody)
690
+
691
+ Update Document Parts in Collection
692
+
693
+ Update the document Parts with the values from the Request
694
+
695
+ ### Example
696
+
697
+ ```ts
698
+ import {
699
+ Configuration,
700
+ DocumentApi,
701
+ } from '';
702
+ import type { UpdateDocumentPartialRequest } from '';
703
+
704
+ async function example() {
705
+ console.log("🚀 Testing SDK...");
706
+ const config = new Configuration({
707
+ // To configure HTTP basic authorization: httpAuth1
708
+ username: "YOUR USERNAME",
709
+ password: "YOUR PASSWORD",
710
+ // Configure HTTP bearer authorization: httpAuth
711
+ accessToken: "YOUR BEARER TOKEN",
712
+ // To configure API key authorization: apiKeyAuth
713
+ apiKey: "YOUR API KEY",
714
+ });
715
+ const api = new DocumentApi(config);
716
+
717
+ const body = {
718
+ // string | The name of your MongoDb Collection
719
+ collectionName: collectionName_example,
720
+ // string | DocumentId to update
721
+ documentId: documentId_example,
722
+ // { [key: string]: string; }
723
+ requestBody: Object,
724
+ } satisfies UpdateDocumentPartialRequest;
725
+
726
+ try {
727
+ const data = await api.updateDocumentPartial(body);
728
+ console.log(data);
729
+ } catch (error) {
730
+ console.error(error);
731
+ }
732
+ }
733
+
734
+ // Run the test
735
+ example().catch(console.error);
736
+ ```
737
+
738
+ ### Parameters
739
+
740
+
741
+ | Name | Type | Description | Notes |
742
+ |------------- | ------------- | ------------- | -------------|
743
+ | **collectionName** | `string` | The name of your MongoDb Collection | [Defaults to `undefined`] |
744
+ | **documentId** | `string` | DocumentId to update | [Defaults to `undefined`] |
745
+ | **requestBody** | `{ [key: string]: string; }` | | |
746
+
747
+ ### Return type
748
+
749
+ [**UpdateResponse**](UpdateResponse.md)
750
+
751
+ ### Authorization
752
+
753
+ [httpAuth1](../README.md#httpAuth1), [httpAuth](../README.md#httpAuth), [apiKeyAuth](../README.md#apiKeyAuth)
754
+
755
+ ### HTTP request headers
756
+
757
+ - **Content-Type**: `application/json`
758
+ - **Accept**: `application/json`, `text/plain`
759
+
760
+
761
+ ### HTTP response details
762
+ | Status code | Description | Response headers |
763
+ |-------------|-------------|------------------|
764
+ | **200** | | - |
765
+ | **400** | Invalid value for: body | - |
766
+ | **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> |
767
+
768
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
769
+
770
+
771
+ ## updateMany
772
+
773
+ > UpdateResponse updateMany(collectionName, updateRequest)
774
+
775
+ Update many in Collection
776
+
777
+ Update many Document in given Collection
778
+
779
+ ### Example
780
+
781
+ ```ts
782
+ import {
783
+ Configuration,
784
+ DocumentApi,
785
+ } from '';
786
+ import type { UpdateManyRequest } from '';
787
+
788
+ async function example() {
789
+ console.log("🚀 Testing SDK...");
790
+ const config = new Configuration({
791
+ // To configure HTTP basic authorization: httpAuth1
792
+ username: "YOUR USERNAME",
793
+ password: "YOUR PASSWORD",
794
+ // Configure HTTP bearer authorization: httpAuth
795
+ accessToken: "YOUR BEARER TOKEN",
796
+ // To configure API key authorization: apiKeyAuth
797
+ apiKey: "YOUR API KEY",
798
+ });
799
+ const api = new DocumentApi(config);
800
+
801
+ const body = {
802
+ // string | The name of your MongoDb Collection
803
+ collectionName: collectionName_example,
804
+ // UpdateRequest
805
+ updateRequest: ...,
806
+ } satisfies UpdateManyRequest;
807
+
808
+ try {
809
+ const data = await api.updateMany(body);
810
+ console.log(data);
811
+ } catch (error) {
812
+ console.error(error);
813
+ }
814
+ }
815
+
816
+ // Run the test
817
+ example().catch(console.error);
818
+ ```
819
+
820
+ ### Parameters
821
+
822
+
823
+ | Name | Type | Description | Notes |
824
+ |------------- | ------------- | ------------- | -------------|
825
+ | **collectionName** | `string` | The name of your MongoDb Collection | [Defaults to `undefined`] |
826
+ | **updateRequest** | [UpdateRequest](UpdateRequest.md) | | |
827
+
828
+ ### Return type
829
+
830
+ [**UpdateResponse**](UpdateResponse.md)
831
+
832
+ ### Authorization
833
+
834
+ [httpAuth1](../README.md#httpAuth1), [httpAuth](../README.md#httpAuth), [apiKeyAuth](../README.md#apiKeyAuth)
835
+
836
+ ### HTTP request headers
837
+
838
+ - **Content-Type**: `application/json`
839
+ - **Accept**: `application/json`, `text/plain`
840
+
841
+
842
+ ### HTTP response details
843
+ | Status code | Description | Response headers |
844
+ |-------------|-------------|------------------|
845
+ | **200** | | - |
846
+ | **400** | Invalid value for: body | - |
847
+ | **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
+
849
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
850
+