@sfxcode/nuxt-mongocamp-server 1.8.0 → 1.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/module.json +2 -2
- package/dist/module.mjs +1 -1
- package/dist/runtime/api/.openapi-generator/FILES +20 -0
- package/dist/runtime/api/.openapi-generator/VERSION +1 -1
- package/dist/runtime/api/apis/AdminApi.d.ts +65 -2
- package/dist/runtime/api/apis/AdminApi.js +39 -27
- package/dist/runtime/api/apis/ApplicationApi.d.ts +17 -2
- package/dist/runtime/api/apis/ApplicationApi.js +17 -11
- package/dist/runtime/api/apis/AuthApi.d.ts +17 -2
- package/dist/runtime/api/apis/AuthApi.js +27 -15
- package/dist/runtime/api/apis/BucketApi.d.ts +12 -2
- package/dist/runtime/api/apis/BucketApi.js +11 -9
- package/dist/runtime/api/apis/CollectionApi.d.ts +183 -6
- package/dist/runtime/api/apis/CollectionApi.js +233 -40
- package/dist/runtime/api/apis/DatabaseApi.d.ts +12 -2
- package/dist/runtime/api/apis/DatabaseApi.js +12 -10
- package/dist/runtime/api/apis/DocumentApi.d.ts +178 -15
- package/dist/runtime/api/apis/DocumentApi.js +54 -40
- package/dist/runtime/api/apis/FileApi.d.ts +78 -4
- package/dist/runtime/api/apis/FileApi.js +34 -24
- package/dist/runtime/api/apis/IndexApi.d.ts +83 -2
- package/dist/runtime/api/apis/IndexApi.js +46 -34
- package/dist/runtime/api/apis/JobsApi.d.ts +28 -2
- package/dist/runtime/api/apis/JobsApi.js +19 -15
- package/dist/runtime/api/apis/SystemApi.d.ts +48 -2
- package/dist/runtime/api/apis/SystemApi.js +146 -3
- package/dist/runtime/api/docs/Capabilities.md +42 -0
- package/dist/runtime/api/docs/CapabilityLimits.md +36 -0
- package/dist/runtime/api/docs/CollectionApi.md +251 -6
- package/dist/runtime/api/docs/CollectionCollation.md +40 -0
- package/dist/runtime/api/docs/CollectionOptions.md +46 -0
- package/dist/runtime/api/docs/CollectionStatus.md +1 -1
- package/dist/runtime/api/docs/ConnectionStats.md +38 -0
- package/dist/runtime/api/docs/CreateCollectionResponse.md +34 -0
- package/dist/runtime/api/docs/DatabaseInfo.md +1 -1
- package/dist/runtime/api/docs/DocumentApi.md +19 -19
- package/dist/runtime/api/docs/FileInformation.md +1 -1
- package/dist/runtime/api/docs/IndexInfo.md +3 -3
- package/dist/runtime/api/docs/IndexOptionsRequest.md +2 -2
- package/dist/runtime/api/docs/IndexUsage.md +1 -1
- package/dist/runtime/api/docs/JsonSchemaDefinition.md +1 -1
- package/dist/runtime/api/docs/MongoFindRequest.md +3 -3
- package/dist/runtime/api/docs/MongoIndex.md +3 -3
- package/dist/runtime/api/docs/OpCounters.md +44 -0
- package/dist/runtime/api/docs/ReplicaSetState.md +40 -0
- package/dist/runtime/api/docs/SettingsResponse.md +1 -1
- package/dist/runtime/api/docs/SystemApi.md +210 -0
- package/dist/runtime/api/docs/SystemInfo.md +36 -0
- package/dist/runtime/api/docs/SystemStats.md +42 -0
- package/dist/runtime/api/docs/UpdateFileInformationRequest.md +1 -1
- package/dist/runtime/api/docs/UpdateRequest.md +2 -2
- package/dist/runtime/api/models/BucketInformation.d.ts +1 -9
- package/dist/runtime/api/models/Capabilities.d.ts +47 -0
- package/dist/runtime/api/models/Capabilities.js +39 -0
- package/dist/runtime/api/models/CapabilityLimits.d.ts +34 -0
- package/dist/runtime/api/models/CapabilityLimits.js +29 -0
- package/dist/runtime/api/models/ClusterInformation.d.ts +1 -5
- package/dist/runtime/api/models/ClusterMemberInformation.d.ts +1 -11
- package/dist/runtime/api/models/CollectionCollation.d.ts +42 -0
- package/dist/runtime/api/models/CollectionCollation.js +32 -0
- package/dist/runtime/api/models/CollectionOptions.d.ts +57 -0
- package/dist/runtime/api/models/CollectionOptions.js +41 -0
- package/dist/runtime/api/models/CollectionPermission.d.ts +1 -9
- package/dist/runtime/api/models/CollectionStatus.d.ts +2 -28
- package/dist/runtime/api/models/CollectionStatus.js +3 -2
- package/dist/runtime/api/models/CollectionSummary.d.ts +1 -19
- package/dist/runtime/api/models/ConnectionStats.d.ts +38 -0
- package/dist/runtime/api/models/ConnectionStats.js +32 -0
- package/dist/runtime/api/models/CopyRequest.d.ts +1 -9
- package/dist/runtime/api/models/CopyResponse.d.ts +1 -7
- package/dist/runtime/api/models/CountResponse.d.ts +1 -3
- package/dist/runtime/api/models/CreateCollectionResponse.d.ts +30 -0
- package/dist/runtime/api/models/CreateCollectionResponse.js +26 -0
- package/dist/runtime/api/models/DatabaseInfo.d.ts +2 -12
- package/dist/runtime/api/models/DatabaseInfo.js +3 -2
- package/dist/runtime/api/models/DeleteResponse.d.ts +1 -5
- package/dist/runtime/api/models/ErrorDescription.d.ts +1 -7
- package/dist/runtime/api/models/FieldInfo.d.ts +1 -5
- package/dist/runtime/api/models/FieldTypeCount.d.ts +1 -5
- package/dist/runtime/api/models/FileInformation.d.ts +2 -14
- package/dist/runtime/api/models/FileInformation.js +4 -3
- package/dist/runtime/api/models/Grant.d.ts +1 -11
- package/dist/runtime/api/models/ImportResponse.d.ts +1 -11
- package/dist/runtime/api/models/IndexCreateRequest.d.ts +1 -7
- package/dist/runtime/api/models/IndexCreateResponse.d.ts +1 -3
- package/dist/runtime/api/models/IndexDropResponse.d.ts +1 -3
- package/dist/runtime/api/models/IndexInfo.d.ts +4 -26
- package/dist/runtime/api/models/IndexKey.d.ts +1 -5
- package/dist/runtime/api/models/IndexOptionsRequest.d.ts +3 -29
- package/dist/runtime/api/models/IndexUsage.d.ts +2 -10
- package/dist/runtime/api/models/IndexUsage.js +3 -2
- package/dist/runtime/api/models/InsertError.d.ts +1 -7
- package/dist/runtime/api/models/InsertResponse.d.ts +1 -9
- package/dist/runtime/api/models/JobConfig.d.ts +1 -13
- package/dist/runtime/api/models/JobInformation.d.ts +1 -19
- package/dist/runtime/api/models/JobInformation.js +5 -4
- package/dist/runtime/api/models/JsonSchema.d.ts +1 -7
- package/dist/runtime/api/models/JsonSchemaDefinition.d.ts +2 -12
- package/dist/runtime/api/models/JsonValueAny.d.ts +1 -3
- package/dist/runtime/api/models/JsonValueBoolean.d.ts +1 -3
- package/dist/runtime/api/models/JsonValueString.d.ts +1 -3
- package/dist/runtime/api/models/Login.d.ts +1 -5
- package/dist/runtime/api/models/LoginResult.d.ts +1 -7
- package/dist/runtime/api/models/LoginResult.js +3 -2
- package/dist/runtime/api/models/MongoAggregateRequest.d.ts +1 -5
- package/dist/runtime/api/models/MongoCampConfiguration.d.ts +1 -11
- package/dist/runtime/api/models/MongoFindRequest.d.ts +4 -10
- package/dist/runtime/api/models/MongoIndex.d.ts +4 -28
- package/dist/runtime/api/models/MongoIndex.js +3 -2
- package/dist/runtime/api/models/OpCounters.d.ts +50 -0
- package/dist/runtime/api/models/OpCounters.js +41 -0
- package/dist/runtime/api/models/PasswordUpdateRequest.d.ts +1 -3
- package/dist/runtime/api/models/PipelineStage.d.ts +1 -5
- package/dist/runtime/api/models/RenameRequest.d.ts +1 -5
- package/dist/runtime/api/models/RenameResponse.d.ts +1 -3
- package/dist/runtime/api/models/ReplicaSetState.d.ts +42 -0
- package/dist/runtime/api/models/ReplicaSetState.js +35 -0
- package/dist/runtime/api/models/Role.d.ts +1 -7
- package/dist/runtime/api/models/SchemaAnalysis.d.ts +1 -9
- package/dist/runtime/api/models/SchemaAnalysisField.d.ts +1 -13
- package/dist/runtime/api/models/SchemaAnalysisFieldType.d.ts +1 -7
- package/dist/runtime/api/models/SearchRequest.d.ts +1 -7
- package/dist/runtime/api/models/SettingsResponse.d.ts +2 -10
- package/dist/runtime/api/models/SystemInfo.d.ts +34 -0
- package/dist/runtime/api/models/SystemInfo.js +28 -0
- package/dist/runtime/api/models/SystemStats.d.ts +49 -0
- package/dist/runtime/api/models/SystemStats.js +46 -0
- package/dist/runtime/api/models/UpdateFileInformationRequest.d.ts +2 -6
- package/dist/runtime/api/models/UpdateRequest.d.ts +3 -7
- package/dist/runtime/api/models/UpdateResponse.d.ts +1 -9
- package/dist/runtime/api/models/UpdateRoleRequest.d.ts +1 -5
- package/dist/runtime/api/models/UserInformation.d.ts +1 -9
- package/dist/runtime/api/models/UserProfile.d.ts +1 -11
- package/dist/runtime/api/models/Version.d.ts +1 -7
- package/dist/runtime/api/models/Version.js +3 -2
- package/dist/runtime/api/models/index.d.ts +10 -0
- package/dist/runtime/api/models/index.js +10 -0
- package/dist/runtime/api/runtime.d.ts +35 -2
- package/dist/runtime/api/runtime.js +84 -4
- package/dist/runtime/composables/mongocampApiFiles.d.ts +1 -1
- package/dist/runtime/composables/mongocampStorage.d.ts +7 -1
- package/dist/runtime/composables/mongocampStorage.js +12 -8
- package/package.json +4 -4
|
@@ -7,23 +7,26 @@ All URIs are relative to *http://localhost*
|
|
|
7
7
|
| [**aggregate**](CollectionApi.md#aggregate) | **POST** /mongodb/collections/{collectionName}/aggregate | Aggregate in Collection |
|
|
8
8
|
| [**clearCollection**](CollectionApi.md#clearcollection) | **DELETE** /mongodb/collections/{collectionName}/clear | Clear Collection |
|
|
9
9
|
| [**copyCollection**](CollectionApi.md#copycollection) | **POST** /mongodb/collections/{collectionName}/copy | Copy Collection |
|
|
10
|
+
| [**createCollection**](CollectionApi.md#createcollection) | **PUT** /mongodb/collections/{collectionName} | Create Collection |
|
|
10
11
|
| [**deleteCollection**](CollectionApi.md#deletecollection) | **DELETE** /mongodb/collections/{collectionName} | Delete Collection |
|
|
11
12
|
| [**distinct**](CollectionApi.md#distinct) | **POST** /mongodb/collections/{collectionName}/distinct/{field} | Distinct in Collection |
|
|
12
13
|
| [**getCollectionFields**](CollectionApi.md#getcollectionfields) | **GET** /mongodb/collections/{collectionName}/fields | Collection Fields |
|
|
13
14
|
| [**getCollectionInformation**](CollectionApi.md#getcollectioninformation) | **GET** /mongodb/collections/{collectionName} | Collection Information |
|
|
15
|
+
| [**getCollectionOptions**](CollectionApi.md#getcollectionoptions) | **GET** /mongodb/collections/{collectionName}/options | Collection Options |
|
|
14
16
|
| [**getFieldDetails**](CollectionApi.md#getfielddetails) | **GET** /mongodb/collections/{collectionName}/fields/detail | Fields of a Collection with types |
|
|
15
17
|
| [**getJsonSchema**](CollectionApi.md#getjsonschema) | **GET** /mongodb/collections/{collectionName}/schema | Collection Fields |
|
|
16
18
|
| [**getSchemaAnalysis**](CollectionApi.md#getschemaanalysis) | **GET** /mongodb/collections/{collectionName}/schema/analysis | Collection Fields |
|
|
17
19
|
| [**listCollectionInformation**](CollectionApi.md#listcollectioninformation) | **GET** /mongodb/collections/info | Information of all Collections |
|
|
18
20
|
| [**listCollections**](CollectionApi.md#listcollections) | **GET** /mongodb/collections | List of Collections |
|
|
19
21
|
| [**listCollectionsByDatabase**](CollectionApi.md#listcollectionsbydatabase) | **GET** /mongodb/databases/{databaseName}/collections | List of Collections |
|
|
22
|
+
| [**modifyCollectionOptions**](CollectionApi.md#modifycollectionoptions) | **PATCH** /mongodb/collections/{collectionName}/options | Change the Validation of a Collection |
|
|
20
23
|
| [**renameCollection**](CollectionApi.md#renamecollection) | **POST** /mongodb/collections/{collectionName}/rename | Rename Collection |
|
|
21
24
|
|
|
22
25
|
|
|
23
26
|
|
|
24
27
|
## aggregate
|
|
25
28
|
|
|
26
|
-
> Array<{ [key: string]: any; }> aggregate(collectionName, mongoAggregateRequest, rowsPerPage, page, filter, extendedJson)
|
|
29
|
+
> Array<{ [key: string]: any | null; }> aggregate(collectionName, mongoAggregateRequest, rowsPerPage, page, filter, extendedJson)
|
|
27
30
|
|
|
28
31
|
Aggregate in Collection
|
|
29
32
|
|
|
@@ -92,7 +95,7 @@ example().catch(console.error);
|
|
|
92
95
|
|
|
93
96
|
### Return type
|
|
94
97
|
|
|
95
|
-
**Array<{ [key: string]: any; }>**
|
|
98
|
+
**Array<{ [key: string]: any | null; }>**
|
|
96
99
|
|
|
97
100
|
### Authorization
|
|
98
101
|
|
|
@@ -272,6 +275,87 @@ example().catch(console.error);
|
|
|
272
275
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
273
276
|
|
|
274
277
|
|
|
278
|
+
## createCollection
|
|
279
|
+
|
|
280
|
+
> CreateCollectionResponse createCollection(collectionName, collectionOptions)
|
|
281
|
+
|
|
282
|
+
Create Collection
|
|
283
|
+
|
|
284
|
+
Create a Collection with options: capped (`capped`, `sizeInBytes`, `maxDocuments`), a validator (`validator`, `validationLevel` off, moderate or strict, `validationAction` error or warn) and a collation. Without a body an empty Collection is created. The administrate grant for the name is needed; a name of another database is `database:name`. An existing Collection is a conflict (409), reserved names (system collections, the prefix of the server, the collections of a bucket) and options that do not fit are 400.
|
|
285
|
+
|
|
286
|
+
### Example
|
|
287
|
+
|
|
288
|
+
```ts
|
|
289
|
+
import {
|
|
290
|
+
Configuration,
|
|
291
|
+
CollectionApi,
|
|
292
|
+
} from '';
|
|
293
|
+
import type { CreateCollectionRequest } from '';
|
|
294
|
+
|
|
295
|
+
async function example() {
|
|
296
|
+
console.log("🚀 Testing SDK...");
|
|
297
|
+
const config = new Configuration({
|
|
298
|
+
// To configure HTTP basic authorization: httpAuth1
|
|
299
|
+
username: "YOUR USERNAME",
|
|
300
|
+
password: "YOUR PASSWORD",
|
|
301
|
+
// Configure HTTP bearer authorization: httpAuth
|
|
302
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
303
|
+
// To configure API key authorization: apiKeyAuth
|
|
304
|
+
apiKey: "YOUR API KEY",
|
|
305
|
+
});
|
|
306
|
+
const api = new CollectionApi(config);
|
|
307
|
+
|
|
308
|
+
const body = {
|
|
309
|
+
// string | The name of your MongoDb Collection
|
|
310
|
+
collectionName: collectionName_example,
|
|
311
|
+
// CollectionOptions | The options of the new Collection, all of them are optional (optional)
|
|
312
|
+
collectionOptions: ...,
|
|
313
|
+
} satisfies CreateCollectionRequest;
|
|
314
|
+
|
|
315
|
+
try {
|
|
316
|
+
const data = await api.createCollection(body);
|
|
317
|
+
console.log(data);
|
|
318
|
+
} catch (error) {
|
|
319
|
+
console.error(error);
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
// Run the test
|
|
324
|
+
example().catch(console.error);
|
|
325
|
+
```
|
|
326
|
+
|
|
327
|
+
### Parameters
|
|
328
|
+
|
|
329
|
+
|
|
330
|
+
| Name | Type | Description | Notes |
|
|
331
|
+
|------------- | ------------- | ------------- | -------------|
|
|
332
|
+
| **collectionName** | `string` | The name of your MongoDb Collection | [Defaults to `undefined`] |
|
|
333
|
+
| **collectionOptions** | [CollectionOptions](CollectionOptions.md) | The options of the new Collection, all of them are optional | [Optional] |
|
|
334
|
+
|
|
335
|
+
### Return type
|
|
336
|
+
|
|
337
|
+
[**CreateCollectionResponse**](CreateCollectionResponse.md)
|
|
338
|
+
|
|
339
|
+
### Authorization
|
|
340
|
+
|
|
341
|
+
[httpAuth1](../README.md#httpAuth1), [httpAuth](../README.md#httpAuth), [apiKeyAuth](../README.md#apiKeyAuth)
|
|
342
|
+
|
|
343
|
+
### HTTP request headers
|
|
344
|
+
|
|
345
|
+
- **Content-Type**: `application/json`
|
|
346
|
+
- **Accept**: `application/json`, `text/plain`
|
|
347
|
+
|
|
348
|
+
|
|
349
|
+
### HTTP response details
|
|
350
|
+
| Status code | Description | Response headers |
|
|
351
|
+
|-------------|-------------|------------------|
|
|
352
|
+
| **200** | | - |
|
|
353
|
+
| **400** | Invalid value for: body | - |
|
|
354
|
+
| **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> |
|
|
355
|
+
|
|
356
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
357
|
+
|
|
358
|
+
|
|
275
359
|
## deleteCollection
|
|
276
360
|
|
|
277
361
|
> JsonValueBoolean deleteCollection(collectionName)
|
|
@@ -598,6 +682,83 @@ example().catch(console.error);
|
|
|
598
682
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
599
683
|
|
|
600
684
|
|
|
685
|
+
## getCollectionOptions
|
|
686
|
+
|
|
687
|
+
> CollectionOptions getCollectionOptions(collectionName)
|
|
688
|
+
|
|
689
|
+
Collection Options
|
|
690
|
+
|
|
691
|
+
The options of a Collection: capped, the validator with its level and action, the collation. 404 for a Collection that does not exist.
|
|
692
|
+
|
|
693
|
+
### Example
|
|
694
|
+
|
|
695
|
+
```ts
|
|
696
|
+
import {
|
|
697
|
+
Configuration,
|
|
698
|
+
CollectionApi,
|
|
699
|
+
} from '';
|
|
700
|
+
import type { GetCollectionOptionsRequest } from '';
|
|
701
|
+
|
|
702
|
+
async function example() {
|
|
703
|
+
console.log("🚀 Testing SDK...");
|
|
704
|
+
const config = new Configuration({
|
|
705
|
+
// To configure HTTP basic authorization: httpAuth1
|
|
706
|
+
username: "YOUR USERNAME",
|
|
707
|
+
password: "YOUR PASSWORD",
|
|
708
|
+
// Configure HTTP bearer authorization: httpAuth
|
|
709
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
710
|
+
// To configure API key authorization: apiKeyAuth
|
|
711
|
+
apiKey: "YOUR API KEY",
|
|
712
|
+
});
|
|
713
|
+
const api = new CollectionApi(config);
|
|
714
|
+
|
|
715
|
+
const body = {
|
|
716
|
+
// string | The name of your MongoDb Collection
|
|
717
|
+
collectionName: collectionName_example,
|
|
718
|
+
} satisfies GetCollectionOptionsRequest;
|
|
719
|
+
|
|
720
|
+
try {
|
|
721
|
+
const data = await api.getCollectionOptions(body);
|
|
722
|
+
console.log(data);
|
|
723
|
+
} catch (error) {
|
|
724
|
+
console.error(error);
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
// Run the test
|
|
729
|
+
example().catch(console.error);
|
|
730
|
+
```
|
|
731
|
+
|
|
732
|
+
### Parameters
|
|
733
|
+
|
|
734
|
+
|
|
735
|
+
| Name | Type | Description | Notes |
|
|
736
|
+
|------------- | ------------- | ------------- | -------------|
|
|
737
|
+
| **collectionName** | `string` | The name of your MongoDb Collection | [Defaults to `undefined`] |
|
|
738
|
+
|
|
739
|
+
### Return type
|
|
740
|
+
|
|
741
|
+
[**CollectionOptions**](CollectionOptions.md)
|
|
742
|
+
|
|
743
|
+
### Authorization
|
|
744
|
+
|
|
745
|
+
[httpAuth1](../README.md#httpAuth1), [httpAuth](../README.md#httpAuth), [apiKeyAuth](../README.md#apiKeyAuth)
|
|
746
|
+
|
|
747
|
+
### HTTP request headers
|
|
748
|
+
|
|
749
|
+
- **Content-Type**: Not defined
|
|
750
|
+
- **Accept**: `application/json`
|
|
751
|
+
|
|
752
|
+
|
|
753
|
+
### HTTP response details
|
|
754
|
+
| Status code | Description | Response headers |
|
|
755
|
+
|-------------|-------------|------------------|
|
|
756
|
+
| **200** | | - |
|
|
757
|
+
| **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> |
|
|
758
|
+
|
|
759
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
760
|
+
|
|
761
|
+
|
|
601
762
|
## getFieldDetails
|
|
602
763
|
|
|
603
764
|
> Array<FieldInfo> getFieldDetails(collectionName, sampleSize, depth)
|
|
@@ -852,11 +1013,11 @@ example().catch(console.error);
|
|
|
852
1013
|
|
|
853
1014
|
## listCollectionInformation
|
|
854
1015
|
|
|
855
|
-
> Array<CollectionSummary> listCollectionInformation(name)
|
|
1016
|
+
> Array<CollectionSummary> listCollectionInformation(name, database)
|
|
856
1017
|
|
|
857
1018
|
Information of all Collections
|
|
858
1019
|
|
|
859
|
-
The numbers of all Collections of the default database that the user may read in one request (count, size, storage size, average size of a document, number and size of the indices). A Collection without statistics, for example a view, is listed with available false.
|
|
1020
|
+
The numbers of all Collections of the default database (or of the database in `database`) that the user may read in one request (count, size, storage size, average size of a document, number and size of the indices). A Collection without statistics, for example a view, is listed with available false. A database that does not exist is a 404 for an administrator and an empty list for every other user: they cannot find out which databases exist.
|
|
860
1021
|
|
|
861
1022
|
### Example
|
|
862
1023
|
|
|
@@ -881,8 +1042,10 @@ async function example() {
|
|
|
881
1042
|
const api = new CollectionApi(config);
|
|
882
1043
|
|
|
883
1044
|
const body = {
|
|
884
|
-
// Array<string> | Only the Collections with these names, by default all Collections that the user may read (optional)
|
|
1045
|
+
// Array<string> | Only the Collections with these names, by default all Collections that the user may read. With `database` the names are the names inside that database (`locations`), the full name (`geodata:locations`) of that database is accepted too. (optional)
|
|
885
1046
|
name: ...,
|
|
1047
|
+
// string | The Collections of this database, by default the default database. The names in the answer are the full names (`geodata:locations`), as they are used in the paths of the other routes. (optional)
|
|
1048
|
+
database: database_example,
|
|
886
1049
|
} satisfies ListCollectionInformationRequest;
|
|
887
1050
|
|
|
888
1051
|
try {
|
|
@@ -902,7 +1065,8 @@ example().catch(console.error);
|
|
|
902
1065
|
|
|
903
1066
|
| Name | Type | Description | Notes |
|
|
904
1067
|
|------------- | ------------- | ------------- | -------------|
|
|
905
|
-
| **name** | `Array<string>` | Only the Collections with these names, by default all Collections that the user may read | [Optional] |
|
|
1068
|
+
| **name** | `Array<string>` | Only the Collections with these names, by default all Collections that the user may read. With `database` the names are the names inside that database (`locations`), the full name (`geodata:locations`) of that database is accepted too. | [Optional] |
|
|
1069
|
+
| **database** | `string` | The Collections of this database, by default the default database. The names in the answer are the full names (`geodata:locations`), as they are used in the paths of the other routes. | [Optional] [Defaults to `undefined`] |
|
|
906
1070
|
|
|
907
1071
|
### Return type
|
|
908
1072
|
|
|
@@ -1073,6 +1237,87 @@ example().catch(console.error);
|
|
|
1073
1237
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1074
1238
|
|
|
1075
1239
|
|
|
1240
|
+
## modifyCollectionOptions
|
|
1241
|
+
|
|
1242
|
+
> CollectionOptions modifyCollectionOptions(collectionName, collectionOptions)
|
|
1243
|
+
|
|
1244
|
+
Change the Validation of a Collection
|
|
1245
|
+
|
|
1246
|
+
Change the validator, the validationLevel and the validationAction of a Collection (collMod), the answer is the options after the change. A capped Collection and the collation cannot be changed after the creation (400). The administrate grant is needed.
|
|
1247
|
+
|
|
1248
|
+
### Example
|
|
1249
|
+
|
|
1250
|
+
```ts
|
|
1251
|
+
import {
|
|
1252
|
+
Configuration,
|
|
1253
|
+
CollectionApi,
|
|
1254
|
+
} from '';
|
|
1255
|
+
import type { ModifyCollectionOptionsRequest } from '';
|
|
1256
|
+
|
|
1257
|
+
async function example() {
|
|
1258
|
+
console.log("🚀 Testing SDK...");
|
|
1259
|
+
const config = new Configuration({
|
|
1260
|
+
// To configure HTTP basic authorization: httpAuth1
|
|
1261
|
+
username: "YOUR USERNAME",
|
|
1262
|
+
password: "YOUR PASSWORD",
|
|
1263
|
+
// Configure HTTP bearer authorization: httpAuth
|
|
1264
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
1265
|
+
// To configure API key authorization: apiKeyAuth
|
|
1266
|
+
apiKey: "YOUR API KEY",
|
|
1267
|
+
});
|
|
1268
|
+
const api = new CollectionApi(config);
|
|
1269
|
+
|
|
1270
|
+
const body = {
|
|
1271
|
+
// string | The name of your MongoDb Collection
|
|
1272
|
+
collectionName: collectionName_example,
|
|
1273
|
+
// CollectionOptions
|
|
1274
|
+
collectionOptions: ...,
|
|
1275
|
+
} satisfies ModifyCollectionOptionsRequest;
|
|
1276
|
+
|
|
1277
|
+
try {
|
|
1278
|
+
const data = await api.modifyCollectionOptions(body);
|
|
1279
|
+
console.log(data);
|
|
1280
|
+
} catch (error) {
|
|
1281
|
+
console.error(error);
|
|
1282
|
+
}
|
|
1283
|
+
}
|
|
1284
|
+
|
|
1285
|
+
// Run the test
|
|
1286
|
+
example().catch(console.error);
|
|
1287
|
+
```
|
|
1288
|
+
|
|
1289
|
+
### Parameters
|
|
1290
|
+
|
|
1291
|
+
|
|
1292
|
+
| Name | Type | Description | Notes |
|
|
1293
|
+
|------------- | ------------- | ------------- | -------------|
|
|
1294
|
+
| **collectionName** | `string` | The name of your MongoDb Collection | [Defaults to `undefined`] |
|
|
1295
|
+
| **collectionOptions** | [CollectionOptions](CollectionOptions.md) | | |
|
|
1296
|
+
|
|
1297
|
+
### Return type
|
|
1298
|
+
|
|
1299
|
+
[**CollectionOptions**](CollectionOptions.md)
|
|
1300
|
+
|
|
1301
|
+
### Authorization
|
|
1302
|
+
|
|
1303
|
+
[httpAuth1](../README.md#httpAuth1), [httpAuth](../README.md#httpAuth), [apiKeyAuth](../README.md#apiKeyAuth)
|
|
1304
|
+
|
|
1305
|
+
### HTTP request headers
|
|
1306
|
+
|
|
1307
|
+
- **Content-Type**: `application/json`
|
|
1308
|
+
- **Accept**: `application/json`, `text/plain`
|
|
1309
|
+
|
|
1310
|
+
|
|
1311
|
+
### HTTP response details
|
|
1312
|
+
| Status code | Description | Response headers |
|
|
1313
|
+
|-------------|-------------|------------------|
|
|
1314
|
+
| **200** | | - |
|
|
1315
|
+
| **400** | Invalid value for: body | - |
|
|
1316
|
+
| **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> |
|
|
1317
|
+
|
|
1318
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1319
|
+
|
|
1320
|
+
|
|
1076
1321
|
## renameCollection
|
|
1077
1322
|
|
|
1078
1323
|
> RenameResponse renameCollection(collectionName, renameRequest)
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
|
|
2
|
+
# CollectionCollation
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`locale` | string
|
|
10
|
+
`strength` | number
|
|
11
|
+
`caseLevel` | boolean
|
|
12
|
+
`numericOrdering` | boolean
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
import type { CollectionCollation } from ''
|
|
18
|
+
|
|
19
|
+
// TODO: Update the object below with actual values
|
|
20
|
+
const example = {
|
|
21
|
+
"locale": null,
|
|
22
|
+
"strength": null,
|
|
23
|
+
"caseLevel": null,
|
|
24
|
+
"numericOrdering": null,
|
|
25
|
+
} satisfies CollectionCollation
|
|
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 CollectionCollation
|
|
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,46 @@
|
|
|
1
|
+
|
|
2
|
+
# CollectionOptions
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`capped` | boolean
|
|
10
|
+
`sizeInBytes` | number
|
|
11
|
+
`maxDocuments` | number
|
|
12
|
+
`validator` | { [key: string]: any | null; }
|
|
13
|
+
`validationLevel` | string
|
|
14
|
+
`validationAction` | string
|
|
15
|
+
`collation` | [CollectionCollation](CollectionCollation.md)
|
|
16
|
+
|
|
17
|
+
## Example
|
|
18
|
+
|
|
19
|
+
```typescript
|
|
20
|
+
import type { CollectionOptions } from ''
|
|
21
|
+
|
|
22
|
+
// TODO: Update the object below with actual values
|
|
23
|
+
const example = {
|
|
24
|
+
"capped": null,
|
|
25
|
+
"sizeInBytes": null,
|
|
26
|
+
"maxDocuments": null,
|
|
27
|
+
"validator": null,
|
|
28
|
+
"validationLevel": null,
|
|
29
|
+
"validationAction": null,
|
|
30
|
+
"collation": null,
|
|
31
|
+
} satisfies CollectionOptions
|
|
32
|
+
|
|
33
|
+
console.log(example)
|
|
34
|
+
|
|
35
|
+
// Convert the instance to a JSON string
|
|
36
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
37
|
+
console.log(exampleJSON)
|
|
38
|
+
|
|
39
|
+
// Parse the JSON string back to an object
|
|
40
|
+
const exampleParsed = JSON.parse(exampleJSON) as CollectionOptions
|
|
41
|
+
console.log(exampleParsed)
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
45
|
+
|
|
46
|
+
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
|
|
2
|
+
# ConnectionStats
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`current` | number
|
|
10
|
+
`available` | number
|
|
11
|
+
`totalCreated` | number
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import type { ConnectionStats } from ''
|
|
17
|
+
|
|
18
|
+
// TODO: Update the object below with actual values
|
|
19
|
+
const example = {
|
|
20
|
+
"current": null,
|
|
21
|
+
"available": null,
|
|
22
|
+
"totalCreated": null,
|
|
23
|
+
} satisfies ConnectionStats
|
|
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 ConnectionStats
|
|
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
|
+
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
|
|
2
|
+
# CreateCollectionResponse
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`name` | string
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import type { CreateCollectionResponse } from ''
|
|
15
|
+
|
|
16
|
+
// TODO: Update the object below with actual values
|
|
17
|
+
const example = {
|
|
18
|
+
"name": null,
|
|
19
|
+
} satisfies CreateCollectionResponse
|
|
20
|
+
|
|
21
|
+
console.log(example)
|
|
22
|
+
|
|
23
|
+
// Convert the instance to a JSON string
|
|
24
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
25
|
+
console.log(exampleJSON)
|
|
26
|
+
|
|
27
|
+
// Parse the JSON string back to an object
|
|
28
|
+
const exampleParsed = JSON.parse(exampleJSON) as CreateCollectionResponse
|
|
29
|
+
console.log(exampleParsed)
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
33
|
+
|
|
34
|
+
|
|
@@ -214,7 +214,7 @@ async function example() {
|
|
|
214
214
|
const body = {
|
|
215
215
|
// string | The name of your MongoDb Collection
|
|
216
216
|
collectionName: collectionName_example,
|
|
217
|
-
// { [key: string]: any; }
|
|
217
|
+
// { [key: string]: any | null; }
|
|
218
218
|
requestBody: Object,
|
|
219
219
|
// boolean | Allow an empty filter, that matches all documents of the collection (optional)
|
|
220
220
|
matchAll: true,
|
|
@@ -240,7 +240,7 @@ example().catch(console.error);
|
|
|
240
240
|
| Name | Type | Description | Notes |
|
|
241
241
|
|------------- | ------------- | ------------- | -------------|
|
|
242
242
|
| **collectionName** | `string` | The name of your MongoDb Collection | [Defaults to `undefined`] |
|
|
243
|
-
| **requestBody** | `{ [key: string]: any; }` | | |
|
|
243
|
+
| **requestBody** | `{ [key: string]: any | null; }` | | |
|
|
244
244
|
| **matchAll** | `boolean` | Allow an empty filter, that matches all documents of the collection | [Optional] [Defaults to `false`] |
|
|
245
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`] |
|
|
246
246
|
|
|
@@ -366,7 +366,7 @@ example().catch(console.error);
|
|
|
366
366
|
|
|
367
367
|
## find
|
|
368
368
|
|
|
369
|
-
> Array<{ [key: string]: any; }> find(collectionName, mongoFindRequest, rowsPerPage, page, extendedJson)
|
|
369
|
+
> Array<{ [key: string]: any | null; }> find(collectionName, mongoFindRequest, rowsPerPage, page, extendedJson)
|
|
370
370
|
|
|
371
371
|
Documents in Collection
|
|
372
372
|
|
|
@@ -432,7 +432,7 @@ example().catch(console.error);
|
|
|
432
432
|
|
|
433
433
|
### Return type
|
|
434
434
|
|
|
435
|
-
**Array<{ [key: string]: any; }>**
|
|
435
|
+
**Array<{ [key: string]: any | null; }>**
|
|
436
436
|
|
|
437
437
|
### Authorization
|
|
438
438
|
|
|
@@ -456,7 +456,7 @@ example().catch(console.error);
|
|
|
456
456
|
|
|
457
457
|
## getDocument
|
|
458
458
|
|
|
459
|
-
> { [key: string]: any; } getDocument(collectionName, documentId, extendedJson)
|
|
459
|
+
> { [key: string]: any | null; } getDocument(collectionName, documentId, extendedJson)
|
|
460
460
|
|
|
461
461
|
Document from Collection
|
|
462
462
|
|
|
@@ -516,7 +516,7 @@ example().catch(console.error);
|
|
|
516
516
|
|
|
517
517
|
### Return type
|
|
518
518
|
|
|
519
|
-
**{ [key: string]: any; }**
|
|
519
|
+
**{ [key: string]: any | null; }**
|
|
520
520
|
|
|
521
521
|
### Authorization
|
|
522
522
|
|
|
@@ -651,8 +651,8 @@ async function example() {
|
|
|
651
651
|
const body = {
|
|
652
652
|
// string | The name of your MongoDb Collection
|
|
653
653
|
collectionName: collectionName_example,
|
|
654
|
-
// { [key: string]: any; } | JSON Representation for your Document.
|
|
655
|
-
requestBody: {"key1":"value","key2":true,"key3":{"creationDate":"2026-11-
|
|
654
|
+
// { [key: string]: any | null; } | JSON Representation for your Document.
|
|
655
|
+
requestBody: {"key1":"value","key2":true,"key3":{"creationDate":"2026-11-13T05:11:19.838Z"}},
|
|
656
656
|
} satisfies InsertRequest;
|
|
657
657
|
|
|
658
658
|
try {
|
|
@@ -673,7 +673,7 @@ example().catch(console.error);
|
|
|
673
673
|
| Name | Type | Description | Notes |
|
|
674
674
|
|------------- | ------------- | ------------- | -------------|
|
|
675
675
|
| **collectionName** | `string` | The name of your MongoDb Collection | [Defaults to `undefined`] |
|
|
676
|
-
| **requestBody** | `{ [key: string]: any; }` | JSON Representation for your Document. | |
|
|
676
|
+
| **requestBody** | `{ [key: string]: any | null; }` | JSON Representation for your Document. | |
|
|
677
677
|
|
|
678
678
|
### Return type
|
|
679
679
|
|
|
@@ -734,7 +734,7 @@ async function example() {
|
|
|
734
734
|
collectionName: collectionName_example,
|
|
735
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
736
|
ordered: true,
|
|
737
|
-
// Array<{ [key: string]: any; }> (optional)
|
|
737
|
+
// Array<{ [key: string]: any | null; }> (optional)
|
|
738
738
|
requestBody: ...,
|
|
739
739
|
} satisfies InsertManyRequest;
|
|
740
740
|
|
|
@@ -757,7 +757,7 @@ example().catch(console.error);
|
|
|
757
757
|
|------------- | ------------- | ------------- | -------------|
|
|
758
758
|
| **collectionName** | `string` | The name of your MongoDb Collection | [Defaults to `undefined`] |
|
|
759
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 `errors` of the answer. | [Optional] [Defaults to `true`] |
|
|
760
|
-
| **requestBody** | `Array<{ [key: string]: any; }>` | | [Optional] |
|
|
760
|
+
| **requestBody** | `Array<{ [key: string]: any | null; }>` | | [Optional] |
|
|
761
761
|
|
|
762
762
|
### Return type
|
|
763
763
|
|
|
@@ -785,7 +785,7 @@ example().catch(console.error);
|
|
|
785
785
|
|
|
786
786
|
## listDocuments
|
|
787
787
|
|
|
788
|
-
> Array<{ [key: string]: any; }> listDocuments(collectionName, filter, sort, projection, rowsPerPage, page, extendedJson)
|
|
788
|
+
> Array<{ [key: string]: any | null; }> listDocuments(collectionName, filter, sort, projection, rowsPerPage, page, extendedJson)
|
|
789
789
|
|
|
790
790
|
Documents in Collection
|
|
791
791
|
|
|
@@ -857,7 +857,7 @@ example().catch(console.error);
|
|
|
857
857
|
|
|
858
858
|
### Return type
|
|
859
859
|
|
|
860
|
-
**Array<{ [key: string]: any; }>**
|
|
860
|
+
**Array<{ [key: string]: any | null; }>**
|
|
861
861
|
|
|
862
862
|
### Authorization
|
|
863
863
|
|
|
@@ -881,7 +881,7 @@ example().catch(console.error);
|
|
|
881
881
|
|
|
882
882
|
## searchDocuments
|
|
883
883
|
|
|
884
|
-
> Array<{ [key: string]: any; }> searchDocuments(collectionName, searchRequest, rowsPerPage, page, extendedJson)
|
|
884
|
+
> Array<{ [key: string]: any | null; }> searchDocuments(collectionName, searchRequest, rowsPerPage, page, extendedJson)
|
|
885
885
|
|
|
886
886
|
Search Documents in Collection
|
|
887
887
|
|
|
@@ -947,7 +947,7 @@ example().catch(console.error);
|
|
|
947
947
|
|
|
948
948
|
### Return type
|
|
949
949
|
|
|
950
|
-
**Array<{ [key: string]: any; }>**
|
|
950
|
+
**Array<{ [key: string]: any | null; }>**
|
|
951
951
|
|
|
952
952
|
### Authorization
|
|
953
953
|
|
|
@@ -1004,7 +1004,7 @@ async function example() {
|
|
|
1004
1004
|
collectionName: collectionName_example,
|
|
1005
1005
|
// string | DocumentId to update
|
|
1006
1006
|
documentId: documentId_example,
|
|
1007
|
-
// { [key: string]: any; }
|
|
1007
|
+
// { [key: string]: any | null; }
|
|
1008
1008
|
requestBody: Object,
|
|
1009
1009
|
} satisfies UpdateRequest;
|
|
1010
1010
|
|
|
@@ -1027,7 +1027,7 @@ example().catch(console.error);
|
|
|
1027
1027
|
|------------- | ------------- | ------------- | -------------|
|
|
1028
1028
|
| **collectionName** | `string` | The name of your MongoDb Collection | [Defaults to `undefined`] |
|
|
1029
1029
|
| **documentId** | `string` | DocumentId to update | [Defaults to `undefined`] |
|
|
1030
|
-
| **requestBody** | `{ [key: string]: any; }` | | |
|
|
1030
|
+
| **requestBody** | `{ [key: string]: any | null; }` | | |
|
|
1031
1031
|
|
|
1032
1032
|
### Return type
|
|
1033
1033
|
|
|
@@ -1088,7 +1088,7 @@ async function example() {
|
|
|
1088
1088
|
collectionName: collectionName_example,
|
|
1089
1089
|
// string | DocumentId to update
|
|
1090
1090
|
documentId: documentId_example,
|
|
1091
|
-
// { [key: string]: any; }
|
|
1091
|
+
// { [key: string]: any | null; }
|
|
1092
1092
|
requestBody: Object,
|
|
1093
1093
|
} satisfies UpdateDocumentPartialRequest;
|
|
1094
1094
|
|
|
@@ -1111,7 +1111,7 @@ example().catch(console.error);
|
|
|
1111
1111
|
|------------- | ------------- | ------------- | -------------|
|
|
1112
1112
|
| **collectionName** | `string` | The name of your MongoDb Collection | [Defaults to `undefined`] |
|
|
1113
1113
|
| **documentId** | `string` | DocumentId to update | [Defaults to `undefined`] |
|
|
1114
|
-
| **requestBody** | `{ [key: string]: any; }` | | |
|
|
1114
|
+
| **requestBody** | `{ [key: string]: any | null; }` | | |
|
|
1115
1115
|
|
|
1116
1116
|
### Return type
|
|
1117
1117
|
|