@sfxcode/nuxt-mongocamp-server 1.2.7 → 1.2.9
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 +3 -3
- package/dist/module.mjs +3 -3
- package/dist/runtime/api/.openapi-generator/FILES +50 -0
- package/dist/runtime/api/.openapi-generator/VERSION +1 -1
- package/dist/runtime/api/apis/AdminApi.js +32 -12
- package/dist/runtime/api/apis/ApplicationApi.js +12 -5
- package/dist/runtime/api/apis/AuthApi.js +16 -8
- package/dist/runtime/api/apis/BucketApi.js +11 -4
- package/dist/runtime/api/apis/CollectionApi.js +30 -10
- package/dist/runtime/api/apis/DatabaseApi.js +13 -5
- package/dist/runtime/api/apis/DocumentApi.js +34 -10
- package/dist/runtime/api/apis/FileApi.js +25 -7
- package/dist/runtime/api/apis/IndexApi.js +31 -8
- package/dist/runtime/api/apis/InformationApi.js +2 -1
- package/dist/runtime/api/apis/JobsApi.js +18 -6
- package/dist/runtime/api/docs/AdminApi.md +972 -0
- package/dist/runtime/api/docs/ApplicationApi.md +387 -0
- package/dist/runtime/api/docs/AuthApi.md +577 -0
- package/dist/runtime/api/docs/BucketApi.md +312 -0
- package/dist/runtime/api/docs/BucketInformation.md +40 -0
- package/dist/runtime/api/docs/CollectionApi.md +822 -0
- package/dist/runtime/api/docs/CollectionStatus.md +58 -0
- package/dist/runtime/api/docs/DatabaseApi.md +382 -0
- package/dist/runtime/api/docs/DatabaseInfo.md +42 -0
- package/dist/runtime/api/docs/DeleteResponse.md +36 -0
- package/dist/runtime/api/docs/DocumentApi.md +850 -0
- package/dist/runtime/api/docs/ErrorDescription.md +38 -0
- package/dist/runtime/api/docs/FileApi.md +606 -0
- package/dist/runtime/api/docs/FileInformation.md +44 -0
- package/dist/runtime/api/docs/Grant.md +42 -0
- package/dist/runtime/api/docs/IndexApi.md +682 -0
- package/dist/runtime/api/docs/IndexCreateRequest.md +36 -0
- package/dist/runtime/api/docs/IndexCreateResponse.md +34 -0
- package/dist/runtime/api/docs/IndexDropResponse.md +34 -0
- package/dist/runtime/api/docs/IndexOptionsRequest.md +48 -0
- package/dist/runtime/api/docs/InformationApi.md +69 -0
- package/dist/runtime/api/docs/InsertResponse.md +36 -0
- package/dist/runtime/api/docs/JobConfig.md +44 -0
- package/dist/runtime/api/docs/JobInformation.md +50 -0
- package/dist/runtime/api/docs/JobsApi.md +474 -0
- package/dist/runtime/api/docs/JsonSchema.md +38 -0
- package/dist/runtime/api/docs/JsonSchemaDefinition.md +42 -0
- package/dist/runtime/api/docs/JsonValueAny.md +34 -0
- package/dist/runtime/api/docs/JsonValueBoolean.md +34 -0
- package/dist/runtime/api/docs/JsonValueString.md +34 -0
- package/dist/runtime/api/docs/Login.md +36 -0
- package/dist/runtime/api/docs/LoginResult.md +38 -0
- package/dist/runtime/api/docs/MongoAggregateRequest.md +36 -0
- package/dist/runtime/api/docs/MongoCampConfiguration.md +42 -0
- package/dist/runtime/api/docs/MongoFindRequest.md +38 -0
- package/dist/runtime/api/docs/MongoIndex.md +56 -0
- package/dist/runtime/api/docs/PasswordUpdateRequest.md +34 -0
- package/dist/runtime/api/docs/PipelineStage.md +36 -0
- package/dist/runtime/api/docs/Role.md +38 -0
- package/dist/runtime/api/docs/SchemaAnalysis.md +40 -0
- package/dist/runtime/api/docs/SchemaAnalysisField.md +44 -0
- package/dist/runtime/api/docs/SchemaAnalysisFieldType.md +38 -0
- package/dist/runtime/api/docs/SettingsResponse.md +40 -0
- package/dist/runtime/api/docs/UpdateFileInformationRequest.md +36 -0
- package/dist/runtime/api/docs/UpdateRequest.md +36 -0
- package/dist/runtime/api/docs/UpdateResponse.md +40 -0
- package/dist/runtime/api/docs/UpdateRoleRequest.md +36 -0
- package/dist/runtime/api/docs/UserInformation.md +40 -0
- package/dist/runtime/api/docs/UserProfile.md +42 -0
- package/dist/runtime/api/docs/Version.md +38 -0
- package/dist/runtime/api/models/JobInformation.js +2 -2
- package/dist/runtime/composables/mongocampApi.d.ts +11 -1
- package/dist/runtime/composables/mongocampApi.js +12 -14
- package/dist/runtime/composables/mongocampAuth.d.ts +3 -3
- package/package.json +14 -14
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
|
|
2
|
+
# CollectionStatus
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`ns` | string
|
|
10
|
+
`collectionType` | string
|
|
11
|
+
`scaleFactor` | number
|
|
12
|
+
`size` | number
|
|
13
|
+
`count` | number
|
|
14
|
+
`storageSize` | number
|
|
15
|
+
`avgObjSize` | number
|
|
16
|
+
`nindexes` | number
|
|
17
|
+
`indexSizes` | { [key: string]: number; }
|
|
18
|
+
`totalIndexSize` | number
|
|
19
|
+
`ok` | number
|
|
20
|
+
`fetched` | Date
|
|
21
|
+
`map` | { [key: string]: string; }
|
|
22
|
+
|
|
23
|
+
## Example
|
|
24
|
+
|
|
25
|
+
```typescript
|
|
26
|
+
import type { CollectionStatus } from ''
|
|
27
|
+
|
|
28
|
+
// TODO: Update the object below with actual values
|
|
29
|
+
const example = {
|
|
30
|
+
"ns": null,
|
|
31
|
+
"collectionType": null,
|
|
32
|
+
"scaleFactor": null,
|
|
33
|
+
"size": null,
|
|
34
|
+
"count": null,
|
|
35
|
+
"storageSize": null,
|
|
36
|
+
"avgObjSize": null,
|
|
37
|
+
"nindexes": null,
|
|
38
|
+
"indexSizes": null,
|
|
39
|
+
"totalIndexSize": null,
|
|
40
|
+
"ok": null,
|
|
41
|
+
"fetched": null,
|
|
42
|
+
"map": null,
|
|
43
|
+
} satisfies CollectionStatus
|
|
44
|
+
|
|
45
|
+
console.log(example)
|
|
46
|
+
|
|
47
|
+
// Convert the instance to a JSON string
|
|
48
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
49
|
+
console.log(exampleJSON)
|
|
50
|
+
|
|
51
|
+
// Parse the JSON string back to an object
|
|
52
|
+
const exampleParsed = JSON.parse(exampleJSON) as CollectionStatus
|
|
53
|
+
console.log(exampleParsed)
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
57
|
+
|
|
58
|
+
|
|
@@ -0,0 +1,382 @@
|
|
|
1
|
+
# DatabaseApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *http://localhost*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
|------------- | ------------- | -------------|
|
|
7
|
+
| [**databaseInfos**](DatabaseApi.md#databaseinfos) | **GET** /mongodb/databases/infos | List of Database Infos |
|
|
8
|
+
| [**deleteDatabase**](DatabaseApi.md#deletedatabase) | **DELETE** /mongodb/databases/{databaseName} | Delete Database |
|
|
9
|
+
| [**getDatabaseInfo**](DatabaseApi.md#getdatabaseinfo) | **GET** /mongodb/databases/{databaseName} | Database Infos of selected Database |
|
|
10
|
+
| [**listCollectionsByDatabase**](DatabaseApi.md#listcollectionsbydatabase) | **GET** /mongodb/databases/{databaseName}/collections | List of Collections |
|
|
11
|
+
| [**listDatabases**](DatabaseApi.md#listdatabases) | **GET** /mongodb/databases | List of Databases |
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
## databaseInfos
|
|
16
|
+
|
|
17
|
+
> Array<DatabaseInfo> databaseInfos()
|
|
18
|
+
|
|
19
|
+
List of Database Infos
|
|
20
|
+
|
|
21
|
+
List of all Databases Infos
|
|
22
|
+
|
|
23
|
+
### Example
|
|
24
|
+
|
|
25
|
+
```ts
|
|
26
|
+
import {
|
|
27
|
+
Configuration,
|
|
28
|
+
DatabaseApi,
|
|
29
|
+
} from '';
|
|
30
|
+
import type { DatabaseInfosRequest } from '';
|
|
31
|
+
|
|
32
|
+
async function example() {
|
|
33
|
+
console.log("🚀 Testing SDK...");
|
|
34
|
+
const config = new Configuration({
|
|
35
|
+
// To configure HTTP basic authorization: httpAuth1
|
|
36
|
+
username: "YOUR USERNAME",
|
|
37
|
+
password: "YOUR PASSWORD",
|
|
38
|
+
// Configure HTTP bearer authorization: httpAuth
|
|
39
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
40
|
+
// To configure API key authorization: apiKeyAuth
|
|
41
|
+
apiKey: "YOUR API KEY",
|
|
42
|
+
});
|
|
43
|
+
const api = new DatabaseApi(config);
|
|
44
|
+
|
|
45
|
+
try {
|
|
46
|
+
const data = await api.databaseInfos();
|
|
47
|
+
console.log(data);
|
|
48
|
+
} catch (error) {
|
|
49
|
+
console.error(error);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// Run the test
|
|
54
|
+
example().catch(console.error);
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Parameters
|
|
58
|
+
|
|
59
|
+
This endpoint does not need any parameter.
|
|
60
|
+
|
|
61
|
+
### Return type
|
|
62
|
+
|
|
63
|
+
[**Array<DatabaseInfo>**](DatabaseInfo.md)
|
|
64
|
+
|
|
65
|
+
### Authorization
|
|
66
|
+
|
|
67
|
+
[httpAuth1](../README.md#httpAuth1), [httpAuth](../README.md#httpAuth), [apiKeyAuth](../README.md#apiKeyAuth)
|
|
68
|
+
|
|
69
|
+
### HTTP request headers
|
|
70
|
+
|
|
71
|
+
- **Content-Type**: Not defined
|
|
72
|
+
- **Accept**: `application/json`
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
### HTTP response details
|
|
76
|
+
| Status code | Description | Response headers |
|
|
77
|
+
|-------------|-------------|------------------|
|
|
78
|
+
| **200** | | - |
|
|
79
|
+
| **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> |
|
|
80
|
+
|
|
81
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
## deleteDatabase
|
|
85
|
+
|
|
86
|
+
> JsonValueBoolean deleteDatabase(databaseName)
|
|
87
|
+
|
|
88
|
+
Delete Database
|
|
89
|
+
|
|
90
|
+
Delete given Database
|
|
91
|
+
|
|
92
|
+
### Example
|
|
93
|
+
|
|
94
|
+
```ts
|
|
95
|
+
import {
|
|
96
|
+
Configuration,
|
|
97
|
+
DatabaseApi,
|
|
98
|
+
} from '';
|
|
99
|
+
import type { DeleteDatabaseRequest } from '';
|
|
100
|
+
|
|
101
|
+
async function example() {
|
|
102
|
+
console.log("🚀 Testing SDK...");
|
|
103
|
+
const config = new Configuration({
|
|
104
|
+
// To configure HTTP basic authorization: httpAuth1
|
|
105
|
+
username: "YOUR USERNAME",
|
|
106
|
+
password: "YOUR PASSWORD",
|
|
107
|
+
// Configure HTTP bearer authorization: httpAuth
|
|
108
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
109
|
+
// To configure API key authorization: apiKeyAuth
|
|
110
|
+
apiKey: "YOUR API KEY",
|
|
111
|
+
});
|
|
112
|
+
const api = new DatabaseApi(config);
|
|
113
|
+
|
|
114
|
+
const body = {
|
|
115
|
+
// string | Name of your Database
|
|
116
|
+
databaseName: databaseName_example,
|
|
117
|
+
} satisfies DeleteDatabaseRequest;
|
|
118
|
+
|
|
119
|
+
try {
|
|
120
|
+
const data = await api.deleteDatabase(body);
|
|
121
|
+
console.log(data);
|
|
122
|
+
} catch (error) {
|
|
123
|
+
console.error(error);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
// Run the test
|
|
128
|
+
example().catch(console.error);
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
### Parameters
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
| Name | Type | Description | Notes |
|
|
135
|
+
|------------- | ------------- | ------------- | -------------|
|
|
136
|
+
| **databaseName** | `string` | Name of your Database | [Defaults to `undefined`] |
|
|
137
|
+
|
|
138
|
+
### Return type
|
|
139
|
+
|
|
140
|
+
[**JsonValueBoolean**](JsonValueBoolean.md)
|
|
141
|
+
|
|
142
|
+
### Authorization
|
|
143
|
+
|
|
144
|
+
[httpAuth1](../README.md#httpAuth1), [httpAuth](../README.md#httpAuth), [apiKeyAuth](../README.md#apiKeyAuth)
|
|
145
|
+
|
|
146
|
+
### HTTP request headers
|
|
147
|
+
|
|
148
|
+
- **Content-Type**: Not defined
|
|
149
|
+
- **Accept**: `application/json`
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
### HTTP response details
|
|
153
|
+
| Status code | Description | Response headers |
|
|
154
|
+
|-------------|-------------|------------------|
|
|
155
|
+
| **200** | | - |
|
|
156
|
+
| **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> |
|
|
157
|
+
|
|
158
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
## getDatabaseInfo
|
|
162
|
+
|
|
163
|
+
> DatabaseInfo getDatabaseInfo(databaseName)
|
|
164
|
+
|
|
165
|
+
Database Infos of selected Database
|
|
166
|
+
|
|
167
|
+
All Information about given Database
|
|
168
|
+
|
|
169
|
+
### Example
|
|
170
|
+
|
|
171
|
+
```ts
|
|
172
|
+
import {
|
|
173
|
+
Configuration,
|
|
174
|
+
DatabaseApi,
|
|
175
|
+
} from '';
|
|
176
|
+
import type { GetDatabaseInfoRequest } from '';
|
|
177
|
+
|
|
178
|
+
async function example() {
|
|
179
|
+
console.log("🚀 Testing SDK...");
|
|
180
|
+
const config = new Configuration({
|
|
181
|
+
// To configure HTTP basic authorization: httpAuth1
|
|
182
|
+
username: "YOUR USERNAME",
|
|
183
|
+
password: "YOUR PASSWORD",
|
|
184
|
+
// Configure HTTP bearer authorization: httpAuth
|
|
185
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
186
|
+
// To configure API key authorization: apiKeyAuth
|
|
187
|
+
apiKey: "YOUR API KEY",
|
|
188
|
+
});
|
|
189
|
+
const api = new DatabaseApi(config);
|
|
190
|
+
|
|
191
|
+
const body = {
|
|
192
|
+
// string | Name of your Database
|
|
193
|
+
databaseName: databaseName_example,
|
|
194
|
+
} satisfies GetDatabaseInfoRequest;
|
|
195
|
+
|
|
196
|
+
try {
|
|
197
|
+
const data = await api.getDatabaseInfo(body);
|
|
198
|
+
console.log(data);
|
|
199
|
+
} catch (error) {
|
|
200
|
+
console.error(error);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
// Run the test
|
|
205
|
+
example().catch(console.error);
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
### Parameters
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
| Name | Type | Description | Notes |
|
|
212
|
+
|------------- | ------------- | ------------- | -------------|
|
|
213
|
+
| **databaseName** | `string` | Name of your Database | [Defaults to `undefined`] |
|
|
214
|
+
|
|
215
|
+
### Return type
|
|
216
|
+
|
|
217
|
+
[**DatabaseInfo**](DatabaseInfo.md)
|
|
218
|
+
|
|
219
|
+
### Authorization
|
|
220
|
+
|
|
221
|
+
[httpAuth1](../README.md#httpAuth1), [httpAuth](../README.md#httpAuth), [apiKeyAuth](../README.md#apiKeyAuth)
|
|
222
|
+
|
|
223
|
+
### HTTP request headers
|
|
224
|
+
|
|
225
|
+
- **Content-Type**: Not defined
|
|
226
|
+
- **Accept**: `application/json`
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
### HTTP response details
|
|
230
|
+
| Status code | Description | Response headers |
|
|
231
|
+
|-------------|-------------|------------------|
|
|
232
|
+
| **200** | | - |
|
|
233
|
+
| **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> |
|
|
234
|
+
|
|
235
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
## listCollectionsByDatabase
|
|
239
|
+
|
|
240
|
+
> Array<string> listCollectionsByDatabase(databaseName)
|
|
241
|
+
|
|
242
|
+
List of Collections
|
|
243
|
+
|
|
244
|
+
List of all Collections of the given database
|
|
245
|
+
|
|
246
|
+
### Example
|
|
247
|
+
|
|
248
|
+
```ts
|
|
249
|
+
import {
|
|
250
|
+
Configuration,
|
|
251
|
+
DatabaseApi,
|
|
252
|
+
} from '';
|
|
253
|
+
import type { ListCollectionsByDatabaseRequest } from '';
|
|
254
|
+
|
|
255
|
+
async function example() {
|
|
256
|
+
console.log("🚀 Testing SDK...");
|
|
257
|
+
const config = new Configuration({
|
|
258
|
+
// To configure HTTP basic authorization: httpAuth1
|
|
259
|
+
username: "YOUR USERNAME",
|
|
260
|
+
password: "YOUR PASSWORD",
|
|
261
|
+
// Configure HTTP bearer authorization: httpAuth
|
|
262
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
263
|
+
// To configure API key authorization: apiKeyAuth
|
|
264
|
+
apiKey: "YOUR API KEY",
|
|
265
|
+
});
|
|
266
|
+
const api = new DatabaseApi(config);
|
|
267
|
+
|
|
268
|
+
const body = {
|
|
269
|
+
// string | Name of your Database
|
|
270
|
+
databaseName: databaseName_example,
|
|
271
|
+
} satisfies ListCollectionsByDatabaseRequest;
|
|
272
|
+
|
|
273
|
+
try {
|
|
274
|
+
const data = await api.listCollectionsByDatabase(body);
|
|
275
|
+
console.log(data);
|
|
276
|
+
} catch (error) {
|
|
277
|
+
console.error(error);
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
// Run the test
|
|
282
|
+
example().catch(console.error);
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
### Parameters
|
|
286
|
+
|
|
287
|
+
|
|
288
|
+
| Name | Type | Description | Notes |
|
|
289
|
+
|------------- | ------------- | ------------- | -------------|
|
|
290
|
+
| **databaseName** | `string` | Name of your Database | [Defaults to `undefined`] |
|
|
291
|
+
|
|
292
|
+
### Return type
|
|
293
|
+
|
|
294
|
+
**Array<string>**
|
|
295
|
+
|
|
296
|
+
### Authorization
|
|
297
|
+
|
|
298
|
+
[httpAuth1](../README.md#httpAuth1), [httpAuth](../README.md#httpAuth), [apiKeyAuth](../README.md#apiKeyAuth)
|
|
299
|
+
|
|
300
|
+
### HTTP request headers
|
|
301
|
+
|
|
302
|
+
- **Content-Type**: Not defined
|
|
303
|
+
- **Accept**: `application/json`
|
|
304
|
+
|
|
305
|
+
|
|
306
|
+
### HTTP response details
|
|
307
|
+
| Status code | Description | Response headers |
|
|
308
|
+
|-------------|-------------|------------------|
|
|
309
|
+
| **200** | | - |
|
|
310
|
+
| **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> |
|
|
311
|
+
|
|
312
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
313
|
+
|
|
314
|
+
|
|
315
|
+
## listDatabases
|
|
316
|
+
|
|
317
|
+
> Array<string> listDatabases()
|
|
318
|
+
|
|
319
|
+
List of Databases
|
|
320
|
+
|
|
321
|
+
List of all Databases
|
|
322
|
+
|
|
323
|
+
### Example
|
|
324
|
+
|
|
325
|
+
```ts
|
|
326
|
+
import {
|
|
327
|
+
Configuration,
|
|
328
|
+
DatabaseApi,
|
|
329
|
+
} from '';
|
|
330
|
+
import type { ListDatabasesRequest } from '';
|
|
331
|
+
|
|
332
|
+
async function example() {
|
|
333
|
+
console.log("🚀 Testing SDK...");
|
|
334
|
+
const config = new Configuration({
|
|
335
|
+
// To configure HTTP basic authorization: httpAuth1
|
|
336
|
+
username: "YOUR USERNAME",
|
|
337
|
+
password: "YOUR PASSWORD",
|
|
338
|
+
// Configure HTTP bearer authorization: httpAuth
|
|
339
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
340
|
+
// To configure API key authorization: apiKeyAuth
|
|
341
|
+
apiKey: "YOUR API KEY",
|
|
342
|
+
});
|
|
343
|
+
const api = new DatabaseApi(config);
|
|
344
|
+
|
|
345
|
+
try {
|
|
346
|
+
const data = await api.listDatabases();
|
|
347
|
+
console.log(data);
|
|
348
|
+
} catch (error) {
|
|
349
|
+
console.error(error);
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
// Run the test
|
|
354
|
+
example().catch(console.error);
|
|
355
|
+
```
|
|
356
|
+
|
|
357
|
+
### Parameters
|
|
358
|
+
|
|
359
|
+
This endpoint does not need any parameter.
|
|
360
|
+
|
|
361
|
+
### Return type
|
|
362
|
+
|
|
363
|
+
**Array<string>**
|
|
364
|
+
|
|
365
|
+
### Authorization
|
|
366
|
+
|
|
367
|
+
[httpAuth1](../README.md#httpAuth1), [httpAuth](../README.md#httpAuth), [apiKeyAuth](../README.md#apiKeyAuth)
|
|
368
|
+
|
|
369
|
+
### HTTP request headers
|
|
370
|
+
|
|
371
|
+
- **Content-Type**: Not defined
|
|
372
|
+
- **Accept**: `application/json`
|
|
373
|
+
|
|
374
|
+
|
|
375
|
+
### HTTP response details
|
|
376
|
+
| Status code | Description | Response headers |
|
|
377
|
+
|-------------|-------------|------------------|
|
|
378
|
+
| **200** | | - |
|
|
379
|
+
| **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> |
|
|
380
|
+
|
|
381
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
382
|
+
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
|
|
2
|
+
# DatabaseInfo
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`name` | string
|
|
10
|
+
`sizeOnDisk` | number
|
|
11
|
+
`empty` | boolean
|
|
12
|
+
`fetched` | Date
|
|
13
|
+
`map` | { [key: string]: string; }
|
|
14
|
+
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import type { DatabaseInfo } from ''
|
|
19
|
+
|
|
20
|
+
// TODO: Update the object below with actual values
|
|
21
|
+
const example = {
|
|
22
|
+
"name": null,
|
|
23
|
+
"sizeOnDisk": null,
|
|
24
|
+
"empty": null,
|
|
25
|
+
"fetched": null,
|
|
26
|
+
"map": null,
|
|
27
|
+
} satisfies DatabaseInfo
|
|
28
|
+
|
|
29
|
+
console.log(example)
|
|
30
|
+
|
|
31
|
+
// Convert the instance to a JSON string
|
|
32
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
33
|
+
console.log(exampleJSON)
|
|
34
|
+
|
|
35
|
+
// Parse the JSON string back to an object
|
|
36
|
+
const exampleParsed = JSON.parse(exampleJSON) as DatabaseInfo
|
|
37
|
+
console.log(exampleParsed)
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
41
|
+
|
|
42
|
+
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
|
|
2
|
+
# DeleteResponse
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`wasAcknowledged` | boolean
|
|
10
|
+
`deletedCount` | number
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import type { DeleteResponse } from ''
|
|
16
|
+
|
|
17
|
+
// TODO: Update the object below with actual values
|
|
18
|
+
const example = {
|
|
19
|
+
"wasAcknowledged": null,
|
|
20
|
+
"deletedCount": null,
|
|
21
|
+
} satisfies DeleteResponse
|
|
22
|
+
|
|
23
|
+
console.log(example)
|
|
24
|
+
|
|
25
|
+
// Convert the instance to a JSON string
|
|
26
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
27
|
+
console.log(exampleJSON)
|
|
28
|
+
|
|
29
|
+
// Parse the JSON string back to an object
|
|
30
|
+
const exampleParsed = JSON.parse(exampleJSON) as DeleteResponse
|
|
31
|
+
console.log(exampleParsed)
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
35
|
+
|
|
36
|
+
|