@sfxcode/nuxt-mongocamp-server 1.5.2 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/module.json +1 -1
- package/dist/module.mjs +1 -1
- package/dist/runtime/api/.openapi-generator/FILES +18 -2
- package/dist/runtime/api/apis/AdminApi.d.ts +1 -1
- package/dist/runtime/api/apis/ApplicationApi.d.ts +1 -1
- package/dist/runtime/api/apis/AuthApi.d.ts +21 -4
- package/dist/runtime/api/apis/AuthApi.js +50 -2
- package/dist/runtime/api/apis/BucketApi.d.ts +1 -1
- package/dist/runtime/api/apis/CollectionApi.d.ts +26 -8
- package/dist/runtime/api/apis/CollectionApi.js +53 -2
- package/dist/runtime/api/apis/DatabaseApi.d.ts +1 -1
- package/dist/runtime/api/apis/DocumentApi.d.ts +60 -13
- package/dist/runtime/api/apis/DocumentApi.js +136 -0
- package/dist/runtime/api/apis/FileApi.d.ts +1 -1
- package/dist/runtime/api/apis/IndexApi.d.ts +19 -2
- package/dist/runtime/api/apis/IndexApi.js +52 -0
- package/dist/runtime/api/apis/JobsApi.d.ts +1 -1
- package/dist/runtime/api/apis/{InformationApi.d.ts → SystemApi.d.ts} +17 -3
- package/dist/runtime/api/apis/SystemApi.js +82 -0
- package/dist/runtime/api/apis/index.d.ts +1 -1
- package/dist/runtime/api/apis/index.js +1 -1
- package/dist/runtime/api/docs/AdminApi.md +2 -2
- package/dist/runtime/api/docs/AuthApi.md +79 -1
- package/dist/runtime/api/docs/ClusterInformation.md +36 -0
- package/dist/runtime/api/docs/ClusterMemberInformation.md +42 -0
- package/dist/runtime/api/docs/CollectionApi.md +86 -5
- package/dist/runtime/api/docs/CollectionPermission.md +40 -0
- package/dist/runtime/api/docs/CollectionStatus.md +1 -1
- package/dist/runtime/api/docs/CollectionSummary.md +50 -0
- package/dist/runtime/api/docs/CountResponse.md +34 -0
- package/dist/runtime/api/docs/DatabaseInfo.md +1 -1
- package/dist/runtime/api/docs/DocumentApi.md +208 -24
- package/dist/runtime/api/docs/FileApi.md +2 -2
- package/dist/runtime/api/docs/FileInformation.md +1 -1
- package/dist/runtime/api/docs/IndexApi.md +80 -2
- package/dist/runtime/api/docs/IndexUsage.md +40 -0
- package/dist/runtime/api/docs/InsertError.md +38 -0
- package/dist/runtime/api/docs/InsertResponse.md +4 -0
- package/dist/runtime/api/docs/JsonSchemaDefinition.md +1 -1
- package/dist/runtime/api/docs/JsonValueAny.md +1 -1
- package/dist/runtime/api/docs/MongoCampConfiguration.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/PipelineStage.md +1 -1
- package/dist/runtime/api/docs/SearchRequest.md +38 -0
- package/dist/runtime/api/docs/SettingsResponse.md +1 -1
- package/dist/runtime/api/docs/SystemApi.md +139 -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 -1
- package/dist/runtime/api/models/ClusterInformation.d.ts +39 -0
- package/dist/runtime/api/models/ClusterInformation.js +32 -0
- package/dist/runtime/api/models/ClusterMemberInformation.d.ts +56 -0
- package/dist/runtime/api/models/ClusterMemberInformation.js +38 -0
- package/dist/runtime/api/models/CollectionPermission.d.ts +50 -0
- package/dist/runtime/api/models/CollectionPermission.js +35 -0
- package/dist/runtime/api/models/CollectionStatus.d.ts +3 -3
- package/dist/runtime/api/models/CollectionSummary.d.ts +80 -0
- package/dist/runtime/api/models/CollectionSummary.js +50 -0
- package/dist/runtime/api/models/CountResponse.d.ts +32 -0
- package/dist/runtime/api/models/CountResponse.js +26 -0
- package/dist/runtime/api/models/DatabaseInfo.d.ts +3 -3
- package/dist/runtime/api/models/DeleteResponse.d.ts +1 -1
- package/dist/runtime/api/models/ErrorDescription.d.ts +1 -1
- package/dist/runtime/api/models/FileInformation.d.ts +3 -3
- package/dist/runtime/api/models/Grant.d.ts +1 -1
- package/dist/runtime/api/models/IndexCreateRequest.d.ts +1 -1
- package/dist/runtime/api/models/IndexCreateResponse.d.ts +1 -1
- package/dist/runtime/api/models/IndexDropResponse.d.ts +1 -1
- package/dist/runtime/api/models/IndexOptionsRequest.d.ts +1 -1
- package/dist/runtime/api/models/IndexUsage.d.ts +52 -0
- package/dist/runtime/api/models/IndexUsage.js +35 -0
- package/dist/runtime/api/models/InsertError.d.ts +44 -0
- package/dist/runtime/api/models/InsertError.js +32 -0
- package/dist/runtime/api/models/InsertResponse.d.ts +14 -1
- package/dist/runtime/api/models/InsertResponse.js +10 -2
- package/dist/runtime/api/models/JobConfig.d.ts +1 -1
- package/dist/runtime/api/models/JobInformation.d.ts +2 -2
- package/dist/runtime/api/models/JobInformation.js +1 -2
- package/dist/runtime/api/models/JsonSchema.d.ts +1 -1
- package/dist/runtime/api/models/JsonSchemaDefinition.d.ts +3 -3
- package/dist/runtime/api/models/JsonValueAny.d.ts +3 -3
- package/dist/runtime/api/models/JsonValueBoolean.d.ts +1 -1
- package/dist/runtime/api/models/JsonValueString.d.ts +1 -1
- package/dist/runtime/api/models/Login.d.ts +1 -1
- package/dist/runtime/api/models/LoginResult.d.ts +1 -1
- package/dist/runtime/api/models/MongoAggregateRequest.d.ts +1 -1
- package/dist/runtime/api/models/MongoCampConfiguration.d.ts +3 -3
- package/dist/runtime/api/models/MongoFindRequest.d.ts +7 -7
- package/dist/runtime/api/models/MongoIndex.d.ts +7 -7
- package/dist/runtime/api/models/PasswordUpdateRequest.d.ts +1 -1
- package/dist/runtime/api/models/PipelineStage.d.ts +3 -3
- package/dist/runtime/api/models/Role.d.ts +1 -1
- package/dist/runtime/api/models/SchemaAnalysis.d.ts +1 -1
- package/dist/runtime/api/models/SchemaAnalysisField.d.ts +1 -1
- package/dist/runtime/api/models/SchemaAnalysisFieldType.d.ts +1 -1
- package/dist/runtime/api/models/SearchRequest.d.ts +44 -0
- package/dist/runtime/api/models/SearchRequest.js +29 -0
- package/dist/runtime/api/models/SettingsResponse.d.ts +3 -3
- package/dist/runtime/api/models/UpdateFileInformationRequest.d.ts +3 -3
- package/dist/runtime/api/models/UpdateRequest.d.ts +5 -5
- package/dist/runtime/api/models/UpdateResponse.d.ts +1 -1
- package/dist/runtime/api/models/UpdateRoleRequest.d.ts +1 -1
- package/dist/runtime/api/models/UserInformation.d.ts +1 -1
- package/dist/runtime/api/models/UserProfile.d.ts +1 -1
- package/dist/runtime/api/models/Version.d.ts +1 -1
- package/dist/runtime/api/models/index.d.ts +8 -0
- package/dist/runtime/api/models/index.js +8 -0
- package/dist/runtime/api/runtime.d.ts +1 -1
- package/dist/runtime/composables/mongocampApi.d.ts +1 -1
- package/dist/runtime/composables/mongocampApiCollection.d.ts +2 -2
- package/dist/runtime/composables/mongocampSearch.d.ts +3 -3
- package/dist/runtime/composables/mongocampStorage.d.ts +1 -1
- package/dist/runtime/server/composables/mongocampApi.d.ts +1 -1
- package/dist/runtime/server/composables/mongocampServerApi.d.ts +1 -1
- package/dist/runtime/utils/createMongocampApis.d.ts +2 -2
- package/dist/runtime/utils/createMongocampApis.js +2 -2
- package/package.json +14 -14
- package/dist/runtime/api/apis/InformationApi.js +0 -37
|
@@ -12,6 +12,7 @@ All URIs are relative to *http://localhost*
|
|
|
12
12
|
| [**getCollectionInformation**](CollectionApi.md#getcollectioninformation) | **GET** /mongodb/collections/{collectionName} | Collection Information |
|
|
13
13
|
| [**getJsonSchema**](CollectionApi.md#getjsonschema) | **GET** /mongodb/collections/{collectionName}/schema | Collection Fields |
|
|
14
14
|
| [**getSchemaAnalysis**](CollectionApi.md#getschemaanalysis) | **GET** /mongodb/collections/{collectionName}/schema/analysis | Collection Fields |
|
|
15
|
+
| [**listCollectionInformation**](CollectionApi.md#listcollectioninformation) | **GET** /mongodb/collections/info | Information of all Collections |
|
|
15
16
|
| [**listCollections**](CollectionApi.md#listcollections) | **GET** /mongodb/collections | List of Collections |
|
|
16
17
|
| [**listCollectionsByDatabase**](CollectionApi.md#listcollectionsbydatabase) | **GET** /mongodb/databases/{databaseName}/collections | List of Collections |
|
|
17
18
|
|
|
@@ -19,11 +20,11 @@ All URIs are relative to *http://localhost*
|
|
|
19
20
|
|
|
20
21
|
## aggregate
|
|
21
22
|
|
|
22
|
-
> Array<{ [key: string]:
|
|
23
|
+
> Array<{ [key: string]: any; }> aggregate(collectionName, mongoAggregateRequest, rowsPerPage, page, filter)
|
|
23
24
|
|
|
24
25
|
Aggregate in Collection
|
|
25
26
|
|
|
26
|
-
Aggregate in a given Collection
|
|
27
|
+
Aggregate in a given Collection. The value of a stage is any JSON value. Operators that run JavaScript on the database server or write to collections (`$function`, `$accumulator`, `$where`, `$out`, `$merge`, `$currentOp`, `$listSessions`, `$collStats`, `$indexStats` by default, configured with AGGREGATION_STAGES_DENIED) are refused with 403.
|
|
27
28
|
|
|
28
29
|
### Example
|
|
29
30
|
|
|
@@ -56,6 +57,8 @@ async function example() {
|
|
|
56
57
|
rowsPerPage: 100,
|
|
57
58
|
// number | Requested page of the ResultSets (optional)
|
|
58
59
|
page: 1,
|
|
60
|
+
// string | Filter Query like on the list of documents, applied as the first stage of the pipeline. Not possible for a pipeline that starts with $geoNear, $search or $vectorSearch. (optional)
|
|
61
|
+
filter: filter_example,
|
|
59
62
|
} satisfies AggregateRequest;
|
|
60
63
|
|
|
61
64
|
try {
|
|
@@ -79,10 +82,11 @@ example().catch(console.error);
|
|
|
79
82
|
| **mongoAggregateRequest** | [MongoAggregateRequest](MongoAggregateRequest.md) | | |
|
|
80
83
|
| **rowsPerPage** | `number` | Count elements per page | [Optional] [Defaults to `undefined`] |
|
|
81
84
|
| **page** | `number` | Requested page of the ResultSets | [Optional] [Defaults to `undefined`] |
|
|
85
|
+
| **filter** | `string` | Filter Query like on the list of documents, applied as the first stage of the pipeline. Not possible for a pipeline that starts with $geoNear, $search or $vectorSearch. | [Optional] [Defaults to `undefined`] |
|
|
82
86
|
|
|
83
87
|
### Return type
|
|
84
88
|
|
|
85
|
-
**Array<{ [key: string]:
|
|
89
|
+
**Array<{ [key: string]: any; }>**
|
|
86
90
|
|
|
87
91
|
### Authorization
|
|
88
92
|
|
|
@@ -260,7 +264,7 @@ example().catch(console.error);
|
|
|
260
264
|
|
|
261
265
|
## distinct
|
|
262
266
|
|
|
263
|
-
> Array<
|
|
267
|
+
> Array<any> distinct(collectionName, field, rowsPerPage, page)
|
|
264
268
|
|
|
265
269
|
Distinct in Collection
|
|
266
270
|
|
|
@@ -323,7 +327,7 @@ example().catch(console.error);
|
|
|
323
327
|
|
|
324
328
|
### Return type
|
|
325
329
|
|
|
326
|
-
**Array<
|
|
330
|
+
**Array<any>**
|
|
327
331
|
|
|
328
332
|
### Authorization
|
|
329
333
|
|
|
@@ -675,6 +679,83 @@ example().catch(console.error);
|
|
|
675
679
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
676
680
|
|
|
677
681
|
|
|
682
|
+
## listCollectionInformation
|
|
683
|
+
|
|
684
|
+
> Array<CollectionSummary> listCollectionInformation(name)
|
|
685
|
+
|
|
686
|
+
Information of all Collections
|
|
687
|
+
|
|
688
|
+
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.
|
|
689
|
+
|
|
690
|
+
### Example
|
|
691
|
+
|
|
692
|
+
```ts
|
|
693
|
+
import {
|
|
694
|
+
Configuration,
|
|
695
|
+
CollectionApi,
|
|
696
|
+
} from '';
|
|
697
|
+
import type { ListCollectionInformationRequest } from '';
|
|
698
|
+
|
|
699
|
+
async function example() {
|
|
700
|
+
console.log("🚀 Testing SDK...");
|
|
701
|
+
const config = new Configuration({
|
|
702
|
+
// To configure HTTP basic authorization: httpAuth1
|
|
703
|
+
username: "YOUR USERNAME",
|
|
704
|
+
password: "YOUR PASSWORD",
|
|
705
|
+
// Configure HTTP bearer authorization: httpAuth
|
|
706
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
707
|
+
// To configure API key authorization: apiKeyAuth
|
|
708
|
+
apiKey: "YOUR API KEY",
|
|
709
|
+
});
|
|
710
|
+
const api = new CollectionApi(config);
|
|
711
|
+
|
|
712
|
+
const body = {
|
|
713
|
+
// Array<string> | Only the Collections with these names, by default all Collections that the user may read (optional)
|
|
714
|
+
name: ...,
|
|
715
|
+
} satisfies ListCollectionInformationRequest;
|
|
716
|
+
|
|
717
|
+
try {
|
|
718
|
+
const data = await api.listCollectionInformation(body);
|
|
719
|
+
console.log(data);
|
|
720
|
+
} catch (error) {
|
|
721
|
+
console.error(error);
|
|
722
|
+
}
|
|
723
|
+
}
|
|
724
|
+
|
|
725
|
+
// Run the test
|
|
726
|
+
example().catch(console.error);
|
|
727
|
+
```
|
|
728
|
+
|
|
729
|
+
### Parameters
|
|
730
|
+
|
|
731
|
+
|
|
732
|
+
| Name | Type | Description | Notes |
|
|
733
|
+
|------------- | ------------- | ------------- | -------------|
|
|
734
|
+
| **name** | `Array<string>` | Only the Collections with these names, by default all Collections that the user may read | [Optional] |
|
|
735
|
+
|
|
736
|
+
### Return type
|
|
737
|
+
|
|
738
|
+
[**Array<CollectionSummary>**](CollectionSummary.md)
|
|
739
|
+
|
|
740
|
+
### Authorization
|
|
741
|
+
|
|
742
|
+
[httpAuth1](../README.md#httpAuth1), [httpAuth](../README.md#httpAuth), [apiKeyAuth](../README.md#apiKeyAuth)
|
|
743
|
+
|
|
744
|
+
### HTTP request headers
|
|
745
|
+
|
|
746
|
+
- **Content-Type**: Not defined
|
|
747
|
+
- **Accept**: `application/json`
|
|
748
|
+
|
|
749
|
+
|
|
750
|
+
### HTTP response details
|
|
751
|
+
| Status code | Description | Response headers |
|
|
752
|
+
|-------------|-------------|------------------|
|
|
753
|
+
| **200** | | - |
|
|
754
|
+
| **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> |
|
|
755
|
+
|
|
756
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
757
|
+
|
|
758
|
+
|
|
678
759
|
## listCollections
|
|
679
760
|
|
|
680
761
|
> Array<string> listCollections()
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
|
|
2
|
+
# CollectionPermission
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`name` | string
|
|
10
|
+
`read` | boolean
|
|
11
|
+
`write` | boolean
|
|
12
|
+
`administrate` | boolean
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
import type { CollectionPermission } from ''
|
|
18
|
+
|
|
19
|
+
// TODO: Update the object below with actual values
|
|
20
|
+
const example = {
|
|
21
|
+
"name": null,
|
|
22
|
+
"read": null,
|
|
23
|
+
"write": null,
|
|
24
|
+
"administrate": null,
|
|
25
|
+
} satisfies CollectionPermission
|
|
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 CollectionPermission
|
|
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,50 @@
|
|
|
1
|
+
|
|
2
|
+
# CollectionSummary
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`name` | string
|
|
10
|
+
`collectionType` | string
|
|
11
|
+
`count` | number
|
|
12
|
+
`size` | number
|
|
13
|
+
`storageSize` | number
|
|
14
|
+
`avgObjSize` | number
|
|
15
|
+
`nindexes` | number
|
|
16
|
+
`totalIndexSize` | number
|
|
17
|
+
`available` | boolean
|
|
18
|
+
|
|
19
|
+
## Example
|
|
20
|
+
|
|
21
|
+
```typescript
|
|
22
|
+
import type { CollectionSummary } from ''
|
|
23
|
+
|
|
24
|
+
// TODO: Update the object below with actual values
|
|
25
|
+
const example = {
|
|
26
|
+
"name": null,
|
|
27
|
+
"collectionType": null,
|
|
28
|
+
"count": null,
|
|
29
|
+
"size": null,
|
|
30
|
+
"storageSize": null,
|
|
31
|
+
"avgObjSize": null,
|
|
32
|
+
"nindexes": null,
|
|
33
|
+
"totalIndexSize": null,
|
|
34
|
+
"available": null,
|
|
35
|
+
} satisfies CollectionSummary
|
|
36
|
+
|
|
37
|
+
console.log(example)
|
|
38
|
+
|
|
39
|
+
// Convert the instance to a JSON string
|
|
40
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
41
|
+
console.log(exampleJSON)
|
|
42
|
+
|
|
43
|
+
// Parse the JSON string back to an object
|
|
44
|
+
const exampleParsed = JSON.parse(exampleJSON) as CollectionSummary
|
|
45
|
+
console.log(exampleParsed)
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
49
|
+
|
|
50
|
+
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
|
|
2
|
+
# CountResponse
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`count` | number
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import type { CountResponse } from ''
|
|
15
|
+
|
|
16
|
+
// TODO: Update the object below with actual values
|
|
17
|
+
const example = {
|
|
18
|
+
"count": null,
|
|
19
|
+
} satisfies CountResponse
|
|
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 CountResponse
|
|
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
|
+
|