@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.
- package/dist/module.d.mts +1 -0
- package/dist/module.json +3 -3
- package/dist/module.mjs +4 -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/mongocampAuth.d.ts +3 -3
- package/dist/types.d.mts +2 -0
- package/package.json +16 -16
|
@@ -0,0 +1,822 @@
|
|
|
1
|
+
# CollectionApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *http://localhost*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
|------------- | ------------- | -------------|
|
|
7
|
+
| [**aggregate**](CollectionApi.md#aggregate) | **POST** /mongodb/collections/{collectionName}/aggregate | Aggregate in Collection |
|
|
8
|
+
| [**clearCollection**](CollectionApi.md#clearcollection) | **DELETE** /mongodb/collections/{collectionName}/clear | Clear Collection |
|
|
9
|
+
| [**deleteCollection**](CollectionApi.md#deletecollection) | **DELETE** /mongodb/collections/{collectionName} | Delete Collection |
|
|
10
|
+
| [**distinct**](CollectionApi.md#distinct) | **POST** /mongodb/collections/{collectionName}/distinct/{field} | Distinct in Collection |
|
|
11
|
+
| [**getCollectionFields**](CollectionApi.md#getcollectionfields) | **GET** /mongodb/collections/{collectionName}/fields | Collection Fields |
|
|
12
|
+
| [**getCollectionInformation**](CollectionApi.md#getcollectioninformation) | **GET** /mongodb/collections/{collectionName} | Collection Information |
|
|
13
|
+
| [**getJsonSchema**](CollectionApi.md#getjsonschema) | **GET** /mongodb/collections/{collectionName}/schema | Collection Fields |
|
|
14
|
+
| [**getSchemaAnalysis**](CollectionApi.md#getschemaanalysis) | **GET** /mongodb/collections/{collectionName}/schema/analysis | Collection Fields |
|
|
15
|
+
| [**listCollections**](CollectionApi.md#listcollections) | **GET** /mongodb/collections | List of Collections |
|
|
16
|
+
| [**listCollectionsByDatabase**](CollectionApi.md#listcollectionsbydatabase) | **GET** /mongodb/databases/{databaseName}/collections | List of Collections |
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
## aggregate
|
|
21
|
+
|
|
22
|
+
> Array<{ [key: string]: string; }> aggregate(collectionName, mongoAggregateRequest, rowsPerPage, page)
|
|
23
|
+
|
|
24
|
+
Aggregate in Collection
|
|
25
|
+
|
|
26
|
+
Aggregate in a given Collection
|
|
27
|
+
|
|
28
|
+
### Example
|
|
29
|
+
|
|
30
|
+
```ts
|
|
31
|
+
import {
|
|
32
|
+
Configuration,
|
|
33
|
+
CollectionApi,
|
|
34
|
+
} from '';
|
|
35
|
+
import type { AggregateRequest } 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 CollectionApi(config);
|
|
49
|
+
|
|
50
|
+
const body = {
|
|
51
|
+
// string | The name of your MongoDb Collection
|
|
52
|
+
collectionName: collectionName_example,
|
|
53
|
+
// MongoAggregateRequest
|
|
54
|
+
mongoAggregateRequest: ...,
|
|
55
|
+
// number | Count elements per page (optional)
|
|
56
|
+
rowsPerPage: 100,
|
|
57
|
+
// number | Requested page of the ResultSets (optional)
|
|
58
|
+
page: 1,
|
|
59
|
+
} satisfies AggregateRequest;
|
|
60
|
+
|
|
61
|
+
try {
|
|
62
|
+
const data = await api.aggregate(body);
|
|
63
|
+
console.log(data);
|
|
64
|
+
} catch (error) {
|
|
65
|
+
console.error(error);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// Run the test
|
|
70
|
+
example().catch(console.error);
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Parameters
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
| Name | Type | Description | Notes |
|
|
77
|
+
|------------- | ------------- | ------------- | -------------|
|
|
78
|
+
| **collectionName** | `string` | The name of your MongoDb Collection | [Defaults to `undefined`] |
|
|
79
|
+
| **mongoAggregateRequest** | [MongoAggregateRequest](MongoAggregateRequest.md) | | |
|
|
80
|
+
| **rowsPerPage** | `number` | Count elements per page | [Optional] [Defaults to `undefined`] |
|
|
81
|
+
| **page** | `number` | Requested page of the ResultSets | [Optional] [Defaults to `undefined`] |
|
|
82
|
+
|
|
83
|
+
### Return type
|
|
84
|
+
|
|
85
|
+
**Array<{ [key: string]: string; }>**
|
|
86
|
+
|
|
87
|
+
### Authorization
|
|
88
|
+
|
|
89
|
+
[httpAuth1](../README.md#httpAuth1), [httpAuth](../README.md#httpAuth), [apiKeyAuth](../README.md#apiKeyAuth)
|
|
90
|
+
|
|
91
|
+
### HTTP request headers
|
|
92
|
+
|
|
93
|
+
- **Content-Type**: `application/json`
|
|
94
|
+
- **Accept**: `application/json`, `text/plain`
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
### HTTP response details
|
|
98
|
+
| Status code | Description | Response headers |
|
|
99
|
+
|-------------|-------------|------------------|
|
|
100
|
+
| **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> |
|
|
101
|
+
| **400** | Invalid value for: body, Invalid value for: query parameter rowsPerPage, Invalid value for: query parameter page | - |
|
|
102
|
+
| **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> |
|
|
103
|
+
|
|
104
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
## clearCollection
|
|
108
|
+
|
|
109
|
+
> JsonValueBoolean clearCollection(collectionName)
|
|
110
|
+
|
|
111
|
+
Clear Collection
|
|
112
|
+
|
|
113
|
+
Delete all Document in Collection
|
|
114
|
+
|
|
115
|
+
### Example
|
|
116
|
+
|
|
117
|
+
```ts
|
|
118
|
+
import {
|
|
119
|
+
Configuration,
|
|
120
|
+
CollectionApi,
|
|
121
|
+
} from '';
|
|
122
|
+
import type { ClearCollectionRequest } from '';
|
|
123
|
+
|
|
124
|
+
async function example() {
|
|
125
|
+
console.log("🚀 Testing SDK...");
|
|
126
|
+
const config = new Configuration({
|
|
127
|
+
// To configure HTTP basic authorization: httpAuth1
|
|
128
|
+
username: "YOUR USERNAME",
|
|
129
|
+
password: "YOUR PASSWORD",
|
|
130
|
+
// Configure HTTP bearer authorization: httpAuth
|
|
131
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
132
|
+
// To configure API key authorization: apiKeyAuth
|
|
133
|
+
apiKey: "YOUR API KEY",
|
|
134
|
+
});
|
|
135
|
+
const api = new CollectionApi(config);
|
|
136
|
+
|
|
137
|
+
const body = {
|
|
138
|
+
// string | The name of your MongoDb Collection
|
|
139
|
+
collectionName: collectionName_example,
|
|
140
|
+
} satisfies ClearCollectionRequest;
|
|
141
|
+
|
|
142
|
+
try {
|
|
143
|
+
const data = await api.clearCollection(body);
|
|
144
|
+
console.log(data);
|
|
145
|
+
} catch (error) {
|
|
146
|
+
console.error(error);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
// Run the test
|
|
151
|
+
example().catch(console.error);
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
### Parameters
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
| Name | Type | Description | Notes |
|
|
158
|
+
|------------- | ------------- | ------------- | -------------|
|
|
159
|
+
| **collectionName** | `string` | The name of your MongoDb Collection | [Defaults to `undefined`] |
|
|
160
|
+
|
|
161
|
+
### Return type
|
|
162
|
+
|
|
163
|
+
[**JsonValueBoolean**](JsonValueBoolean.md)
|
|
164
|
+
|
|
165
|
+
### Authorization
|
|
166
|
+
|
|
167
|
+
[httpAuth1](../README.md#httpAuth1), [httpAuth](../README.md#httpAuth), [apiKeyAuth](../README.md#apiKeyAuth)
|
|
168
|
+
|
|
169
|
+
### HTTP request headers
|
|
170
|
+
|
|
171
|
+
- **Content-Type**: Not defined
|
|
172
|
+
- **Accept**: `application/json`
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
### HTTP response details
|
|
176
|
+
| Status code | Description | Response headers |
|
|
177
|
+
|-------------|-------------|------------------|
|
|
178
|
+
| **200** | | - |
|
|
179
|
+
| **0** | | * x-error-code - Error Code <br> * x-error-message - Message of the MongoCampException <br> * x-error-additional-info - Additional information for the MongoCampException <br> |
|
|
180
|
+
|
|
181
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
## deleteCollection
|
|
185
|
+
|
|
186
|
+
> JsonValueBoolean deleteCollection(collectionName)
|
|
187
|
+
|
|
188
|
+
Delete Collection
|
|
189
|
+
|
|
190
|
+
Delete a given Collection
|
|
191
|
+
|
|
192
|
+
### Example
|
|
193
|
+
|
|
194
|
+
```ts
|
|
195
|
+
import {
|
|
196
|
+
Configuration,
|
|
197
|
+
CollectionApi,
|
|
198
|
+
} from '';
|
|
199
|
+
import type { DeleteCollectionRequest } from '';
|
|
200
|
+
|
|
201
|
+
async function example() {
|
|
202
|
+
console.log("🚀 Testing SDK...");
|
|
203
|
+
const config = new Configuration({
|
|
204
|
+
// To configure HTTP basic authorization: httpAuth1
|
|
205
|
+
username: "YOUR USERNAME",
|
|
206
|
+
password: "YOUR PASSWORD",
|
|
207
|
+
// Configure HTTP bearer authorization: httpAuth
|
|
208
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
209
|
+
// To configure API key authorization: apiKeyAuth
|
|
210
|
+
apiKey: "YOUR API KEY",
|
|
211
|
+
});
|
|
212
|
+
const api = new CollectionApi(config);
|
|
213
|
+
|
|
214
|
+
const body = {
|
|
215
|
+
// string | The name of your MongoDb Collection
|
|
216
|
+
collectionName: collectionName_example,
|
|
217
|
+
} satisfies DeleteCollectionRequest;
|
|
218
|
+
|
|
219
|
+
try {
|
|
220
|
+
const data = await api.deleteCollection(body);
|
|
221
|
+
console.log(data);
|
|
222
|
+
} catch (error) {
|
|
223
|
+
console.error(error);
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
// Run the test
|
|
228
|
+
example().catch(console.error);
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
### Parameters
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
| Name | Type | Description | Notes |
|
|
235
|
+
|------------- | ------------- | ------------- | -------------|
|
|
236
|
+
| **collectionName** | `string` | The name of your MongoDb Collection | [Defaults to `undefined`] |
|
|
237
|
+
|
|
238
|
+
### Return type
|
|
239
|
+
|
|
240
|
+
[**JsonValueBoolean**](JsonValueBoolean.md)
|
|
241
|
+
|
|
242
|
+
### Authorization
|
|
243
|
+
|
|
244
|
+
[httpAuth1](../README.md#httpAuth1), [httpAuth](../README.md#httpAuth), [apiKeyAuth](../README.md#apiKeyAuth)
|
|
245
|
+
|
|
246
|
+
### HTTP request headers
|
|
247
|
+
|
|
248
|
+
- **Content-Type**: Not defined
|
|
249
|
+
- **Accept**: `application/json`
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
### HTTP response details
|
|
253
|
+
| Status code | Description | Response headers |
|
|
254
|
+
|-------------|-------------|------------------|
|
|
255
|
+
| **200** | | - |
|
|
256
|
+
| **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> |
|
|
257
|
+
|
|
258
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
## distinct
|
|
262
|
+
|
|
263
|
+
> Array<string> distinct(collectionName, field, rowsPerPage, page)
|
|
264
|
+
|
|
265
|
+
Distinct in Collection
|
|
266
|
+
|
|
267
|
+
Distinct for Field in a given Collection
|
|
268
|
+
|
|
269
|
+
### Example
|
|
270
|
+
|
|
271
|
+
```ts
|
|
272
|
+
import {
|
|
273
|
+
Configuration,
|
|
274
|
+
CollectionApi,
|
|
275
|
+
} from '';
|
|
276
|
+
import type { DistinctRequest } from '';
|
|
277
|
+
|
|
278
|
+
async function example() {
|
|
279
|
+
console.log("🚀 Testing SDK...");
|
|
280
|
+
const config = new Configuration({
|
|
281
|
+
// To configure HTTP basic authorization: httpAuth1
|
|
282
|
+
username: "YOUR USERNAME",
|
|
283
|
+
password: "YOUR PASSWORD",
|
|
284
|
+
// Configure HTTP bearer authorization: httpAuth
|
|
285
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
286
|
+
// To configure API key authorization: apiKeyAuth
|
|
287
|
+
apiKey: "YOUR API KEY",
|
|
288
|
+
});
|
|
289
|
+
const api = new CollectionApi(config);
|
|
290
|
+
|
|
291
|
+
const body = {
|
|
292
|
+
// string | The name of your MongoDb Collection
|
|
293
|
+
collectionName: collectionName_example,
|
|
294
|
+
// string | The field for your distinct Request.
|
|
295
|
+
field: field_example,
|
|
296
|
+
// number | Count elements per page (optional)
|
|
297
|
+
rowsPerPage: 100,
|
|
298
|
+
// number | Requested page of the ResultSets (optional)
|
|
299
|
+
page: 1,
|
|
300
|
+
} satisfies DistinctRequest;
|
|
301
|
+
|
|
302
|
+
try {
|
|
303
|
+
const data = await api.distinct(body);
|
|
304
|
+
console.log(data);
|
|
305
|
+
} catch (error) {
|
|
306
|
+
console.error(error);
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
// Run the test
|
|
311
|
+
example().catch(console.error);
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
### Parameters
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
| Name | Type | Description | Notes |
|
|
318
|
+
|------------- | ------------- | ------------- | -------------|
|
|
319
|
+
| **collectionName** | `string` | The name of your MongoDb Collection | [Defaults to `undefined`] |
|
|
320
|
+
| **field** | `string` | The field for your distinct Request. | [Defaults to `undefined`] |
|
|
321
|
+
| **rowsPerPage** | `number` | Count elements per page | [Optional] [Defaults to `undefined`] |
|
|
322
|
+
| **page** | `number` | Requested page of the ResultSets | [Optional] [Defaults to `undefined`] |
|
|
323
|
+
|
|
324
|
+
### Return type
|
|
325
|
+
|
|
326
|
+
**Array<string>**
|
|
327
|
+
|
|
328
|
+
### Authorization
|
|
329
|
+
|
|
330
|
+
[httpAuth1](../README.md#httpAuth1), [httpAuth](../README.md#httpAuth), [apiKeyAuth](../README.md#apiKeyAuth)
|
|
331
|
+
|
|
332
|
+
### HTTP request headers
|
|
333
|
+
|
|
334
|
+
- **Content-Type**: Not defined
|
|
335
|
+
- **Accept**: `application/json`, `text/plain`
|
|
336
|
+
|
|
337
|
+
|
|
338
|
+
### HTTP response details
|
|
339
|
+
| Status code | Description | Response headers |
|
|
340
|
+
|-------------|-------------|------------------|
|
|
341
|
+
| **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> |
|
|
342
|
+
| **400** | Invalid value for: query parameter rowsPerPage, Invalid value for: query parameter page | - |
|
|
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
|
+
## getCollectionFields
|
|
349
|
+
|
|
350
|
+
> Array<string> getCollectionFields(collectionName, sampleSize)
|
|
351
|
+
|
|
352
|
+
Collection Fields
|
|
353
|
+
|
|
354
|
+
List the Fields in a given collection
|
|
355
|
+
|
|
356
|
+
### Example
|
|
357
|
+
|
|
358
|
+
```ts
|
|
359
|
+
import {
|
|
360
|
+
Configuration,
|
|
361
|
+
CollectionApi,
|
|
362
|
+
} from '';
|
|
363
|
+
import type { GetCollectionFieldsRequest } 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 CollectionApi(config);
|
|
377
|
+
|
|
378
|
+
const body = {
|
|
379
|
+
// string | The name of your MongoDb Collection
|
|
380
|
+
collectionName: collectionName_example,
|
|
381
|
+
// number | Use sample size greater 0 (e.g. 1000) for better performance on big collections (optional)
|
|
382
|
+
sampleSize: 1000,
|
|
383
|
+
} satisfies GetCollectionFieldsRequest;
|
|
384
|
+
|
|
385
|
+
try {
|
|
386
|
+
const data = await api.getCollectionFields(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
|
+
| **sampleSize** | `number` | Use sample size greater 0 (e.g. 1000) for better performance on big collections | [Optional] [Defaults to `undefined`] |
|
|
404
|
+
|
|
405
|
+
### Return type
|
|
406
|
+
|
|
407
|
+
**Array<string>**
|
|
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**: Not defined
|
|
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: query parameter sample size | - |
|
|
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
|
+
## getCollectionInformation
|
|
430
|
+
|
|
431
|
+
> CollectionStatus getCollectionInformation(collectionName, includeDetails)
|
|
432
|
+
|
|
433
|
+
Collection Information
|
|
434
|
+
|
|
435
|
+
All Information about a single Collection
|
|
436
|
+
|
|
437
|
+
### Example
|
|
438
|
+
|
|
439
|
+
```ts
|
|
440
|
+
import {
|
|
441
|
+
Configuration,
|
|
442
|
+
CollectionApi,
|
|
443
|
+
} from '';
|
|
444
|
+
import type { GetCollectionInformationRequest } 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 CollectionApi(config);
|
|
458
|
+
|
|
459
|
+
const body = {
|
|
460
|
+
// string | The name of your MongoDb Collection
|
|
461
|
+
collectionName: collectionName_example,
|
|
462
|
+
// boolean | Include all details for the Collection (optional)
|
|
463
|
+
includeDetails: true,
|
|
464
|
+
} satisfies GetCollectionInformationRequest;
|
|
465
|
+
|
|
466
|
+
try {
|
|
467
|
+
const data = await api.getCollectionInformation(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
|
+
| **includeDetails** | `boolean` | Include all details for the Collection | [Optional] [Defaults to `false`] |
|
|
485
|
+
|
|
486
|
+
### Return type
|
|
487
|
+
|
|
488
|
+
[**CollectionStatus**](CollectionStatus.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**: Not defined
|
|
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: query parameter includeDetails | - |
|
|
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
|
+
## getJsonSchema
|
|
511
|
+
|
|
512
|
+
> JsonSchema getJsonSchema(collectionName, sampleSize, deepth)
|
|
513
|
+
|
|
514
|
+
Collection Fields
|
|
515
|
+
|
|
516
|
+
List the Fields in a given collection
|
|
517
|
+
|
|
518
|
+
### Example
|
|
519
|
+
|
|
520
|
+
```ts
|
|
521
|
+
import {
|
|
522
|
+
Configuration,
|
|
523
|
+
CollectionApi,
|
|
524
|
+
} from '';
|
|
525
|
+
import type { GetJsonSchemaRequest } 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 CollectionApi(config);
|
|
539
|
+
|
|
540
|
+
const body = {
|
|
541
|
+
// string | The name of your MongoDb Collection
|
|
542
|
+
collectionName: collectionName_example,
|
|
543
|
+
// number | Use sample size greater 0 (e.g. 5000) for better performance on big collections (optional)
|
|
544
|
+
sampleSize: 5000,
|
|
545
|
+
// number | How deep should the objects extracted (optional)
|
|
546
|
+
deepth: 56,
|
|
547
|
+
} satisfies GetJsonSchemaRequest;
|
|
548
|
+
|
|
549
|
+
try {
|
|
550
|
+
const data = await api.getJsonSchema(body);
|
|
551
|
+
console.log(data);
|
|
552
|
+
} catch (error) {
|
|
553
|
+
console.error(error);
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
// Run the test
|
|
558
|
+
example().catch(console.error);
|
|
559
|
+
```
|
|
560
|
+
|
|
561
|
+
### Parameters
|
|
562
|
+
|
|
563
|
+
|
|
564
|
+
| Name | Type | Description | Notes |
|
|
565
|
+
|------------- | ------------- | ------------- | -------------|
|
|
566
|
+
| **collectionName** | `string` | The name of your MongoDb Collection | [Defaults to `undefined`] |
|
|
567
|
+
| **sampleSize** | `number` | Use sample size greater 0 (e.g. 5000) for better performance on big collections | [Optional] [Defaults to `undefined`] |
|
|
568
|
+
| **deepth** | `number` | How deep should the objects extracted | [Optional] [Defaults to `3`] |
|
|
569
|
+
|
|
570
|
+
### Return type
|
|
571
|
+
|
|
572
|
+
[**JsonSchema**](JsonSchema.md)
|
|
573
|
+
|
|
574
|
+
### Authorization
|
|
575
|
+
|
|
576
|
+
[httpAuth1](../README.md#httpAuth1), [httpAuth](../README.md#httpAuth), [apiKeyAuth](../README.md#apiKeyAuth)
|
|
577
|
+
|
|
578
|
+
### HTTP request headers
|
|
579
|
+
|
|
580
|
+
- **Content-Type**: Not defined
|
|
581
|
+
- **Accept**: `application/json`, `text/plain`
|
|
582
|
+
|
|
583
|
+
|
|
584
|
+
### HTTP response details
|
|
585
|
+
| Status code | Description | Response headers |
|
|
586
|
+
|-------------|-------------|------------------|
|
|
587
|
+
| **200** | | - |
|
|
588
|
+
| **400** | Invalid value for: query parameter sampleSize, Invalid value for: query parameter deepth | - |
|
|
589
|
+
| **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> |
|
|
590
|
+
|
|
591
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
592
|
+
|
|
593
|
+
|
|
594
|
+
## getSchemaAnalysis
|
|
595
|
+
|
|
596
|
+
> SchemaAnalysis getSchemaAnalysis(collectionName, sampleSize, deepth)
|
|
597
|
+
|
|
598
|
+
Collection Fields
|
|
599
|
+
|
|
600
|
+
List the Fields in a given collection
|
|
601
|
+
|
|
602
|
+
### Example
|
|
603
|
+
|
|
604
|
+
```ts
|
|
605
|
+
import {
|
|
606
|
+
Configuration,
|
|
607
|
+
CollectionApi,
|
|
608
|
+
} from '';
|
|
609
|
+
import type { GetSchemaAnalysisRequest } from '';
|
|
610
|
+
|
|
611
|
+
async function example() {
|
|
612
|
+
console.log("🚀 Testing SDK...");
|
|
613
|
+
const config = new Configuration({
|
|
614
|
+
// To configure HTTP basic authorization: httpAuth1
|
|
615
|
+
username: "YOUR USERNAME",
|
|
616
|
+
password: "YOUR PASSWORD",
|
|
617
|
+
// Configure HTTP bearer authorization: httpAuth
|
|
618
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
619
|
+
// To configure API key authorization: apiKeyAuth
|
|
620
|
+
apiKey: "YOUR API KEY",
|
|
621
|
+
});
|
|
622
|
+
const api = new CollectionApi(config);
|
|
623
|
+
|
|
624
|
+
const body = {
|
|
625
|
+
// string | The name of your MongoDb Collection
|
|
626
|
+
collectionName: collectionName_example,
|
|
627
|
+
// number | Use sample size greater 0 (e.g. 5000) for better performance on big collections (optional)
|
|
628
|
+
sampleSize: 5000,
|
|
629
|
+
// number | How deep should the objects extracted (optional)
|
|
630
|
+
deepth: 56,
|
|
631
|
+
} satisfies GetSchemaAnalysisRequest;
|
|
632
|
+
|
|
633
|
+
try {
|
|
634
|
+
const data = await api.getSchemaAnalysis(body);
|
|
635
|
+
console.log(data);
|
|
636
|
+
} catch (error) {
|
|
637
|
+
console.error(error);
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
// Run the test
|
|
642
|
+
example().catch(console.error);
|
|
643
|
+
```
|
|
644
|
+
|
|
645
|
+
### Parameters
|
|
646
|
+
|
|
647
|
+
|
|
648
|
+
| Name | Type | Description | Notes |
|
|
649
|
+
|------------- | ------------- | ------------- | -------------|
|
|
650
|
+
| **collectionName** | `string` | The name of your MongoDb Collection | [Defaults to `undefined`] |
|
|
651
|
+
| **sampleSize** | `number` | Use sample size greater 0 (e.g. 5000) for better performance on big collections | [Optional] [Defaults to `undefined`] |
|
|
652
|
+
| **deepth** | `number` | How deep should the objects extracted | [Optional] [Defaults to `3`] |
|
|
653
|
+
|
|
654
|
+
### Return type
|
|
655
|
+
|
|
656
|
+
[**SchemaAnalysis**](SchemaAnalysis.md)
|
|
657
|
+
|
|
658
|
+
### Authorization
|
|
659
|
+
|
|
660
|
+
[httpAuth1](../README.md#httpAuth1), [httpAuth](../README.md#httpAuth), [apiKeyAuth](../README.md#apiKeyAuth)
|
|
661
|
+
|
|
662
|
+
### HTTP request headers
|
|
663
|
+
|
|
664
|
+
- **Content-Type**: Not defined
|
|
665
|
+
- **Accept**: `application/json`, `text/plain`
|
|
666
|
+
|
|
667
|
+
|
|
668
|
+
### HTTP response details
|
|
669
|
+
| Status code | Description | Response headers |
|
|
670
|
+
|-------------|-------------|------------------|
|
|
671
|
+
| **200** | | - |
|
|
672
|
+
| **400** | Invalid value for: query parameter sampleSize, Invalid value for: query parameter deepth | - |
|
|
673
|
+
| **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> |
|
|
674
|
+
|
|
675
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
676
|
+
|
|
677
|
+
|
|
678
|
+
## listCollections
|
|
679
|
+
|
|
680
|
+
> Array<string> listCollections()
|
|
681
|
+
|
|
682
|
+
List of Collections
|
|
683
|
+
|
|
684
|
+
List of all Collections of the default database
|
|
685
|
+
|
|
686
|
+
### Example
|
|
687
|
+
|
|
688
|
+
```ts
|
|
689
|
+
import {
|
|
690
|
+
Configuration,
|
|
691
|
+
CollectionApi,
|
|
692
|
+
} from '';
|
|
693
|
+
import type { ListCollectionsRequest } from '';
|
|
694
|
+
|
|
695
|
+
async function example() {
|
|
696
|
+
console.log("🚀 Testing SDK...");
|
|
697
|
+
const config = new Configuration({
|
|
698
|
+
// To configure HTTP basic authorization: httpAuth1
|
|
699
|
+
username: "YOUR USERNAME",
|
|
700
|
+
password: "YOUR PASSWORD",
|
|
701
|
+
// Configure HTTP bearer authorization: httpAuth
|
|
702
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
703
|
+
// To configure API key authorization: apiKeyAuth
|
|
704
|
+
apiKey: "YOUR API KEY",
|
|
705
|
+
});
|
|
706
|
+
const api = new CollectionApi(config);
|
|
707
|
+
|
|
708
|
+
try {
|
|
709
|
+
const data = await api.listCollections();
|
|
710
|
+
console.log(data);
|
|
711
|
+
} catch (error) {
|
|
712
|
+
console.error(error);
|
|
713
|
+
}
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
// Run the test
|
|
717
|
+
example().catch(console.error);
|
|
718
|
+
```
|
|
719
|
+
|
|
720
|
+
### Parameters
|
|
721
|
+
|
|
722
|
+
This endpoint does not need any parameter.
|
|
723
|
+
|
|
724
|
+
### Return type
|
|
725
|
+
|
|
726
|
+
**Array<string>**
|
|
727
|
+
|
|
728
|
+
### Authorization
|
|
729
|
+
|
|
730
|
+
[httpAuth1](../README.md#httpAuth1), [httpAuth](../README.md#httpAuth), [apiKeyAuth](../README.md#apiKeyAuth)
|
|
731
|
+
|
|
732
|
+
### HTTP request headers
|
|
733
|
+
|
|
734
|
+
- **Content-Type**: Not defined
|
|
735
|
+
- **Accept**: `application/json`
|
|
736
|
+
|
|
737
|
+
|
|
738
|
+
### HTTP response details
|
|
739
|
+
| Status code | Description | Response headers |
|
|
740
|
+
|-------------|-------------|------------------|
|
|
741
|
+
| **200** | | - |
|
|
742
|
+
| **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> |
|
|
743
|
+
|
|
744
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
745
|
+
|
|
746
|
+
|
|
747
|
+
## listCollectionsByDatabase
|
|
748
|
+
|
|
749
|
+
> Array<string> listCollectionsByDatabase(databaseName)
|
|
750
|
+
|
|
751
|
+
List of Collections
|
|
752
|
+
|
|
753
|
+
List of all Collections of the given database
|
|
754
|
+
|
|
755
|
+
### Example
|
|
756
|
+
|
|
757
|
+
```ts
|
|
758
|
+
import {
|
|
759
|
+
Configuration,
|
|
760
|
+
CollectionApi,
|
|
761
|
+
} from '';
|
|
762
|
+
import type { ListCollectionsByDatabaseRequest } from '';
|
|
763
|
+
|
|
764
|
+
async function example() {
|
|
765
|
+
console.log("🚀 Testing SDK...");
|
|
766
|
+
const config = new Configuration({
|
|
767
|
+
// To configure HTTP basic authorization: httpAuth1
|
|
768
|
+
username: "YOUR USERNAME",
|
|
769
|
+
password: "YOUR PASSWORD",
|
|
770
|
+
// Configure HTTP bearer authorization: httpAuth
|
|
771
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
772
|
+
// To configure API key authorization: apiKeyAuth
|
|
773
|
+
apiKey: "YOUR API KEY",
|
|
774
|
+
});
|
|
775
|
+
const api = new CollectionApi(config);
|
|
776
|
+
|
|
777
|
+
const body = {
|
|
778
|
+
// string | Name of your Database
|
|
779
|
+
databaseName: databaseName_example,
|
|
780
|
+
} satisfies ListCollectionsByDatabaseRequest;
|
|
781
|
+
|
|
782
|
+
try {
|
|
783
|
+
const data = await api.listCollectionsByDatabase(body);
|
|
784
|
+
console.log(data);
|
|
785
|
+
} catch (error) {
|
|
786
|
+
console.error(error);
|
|
787
|
+
}
|
|
788
|
+
}
|
|
789
|
+
|
|
790
|
+
// Run the test
|
|
791
|
+
example().catch(console.error);
|
|
792
|
+
```
|
|
793
|
+
|
|
794
|
+
### Parameters
|
|
795
|
+
|
|
796
|
+
|
|
797
|
+
| Name | Type | Description | Notes |
|
|
798
|
+
|------------- | ------------- | ------------- | -------------|
|
|
799
|
+
| **databaseName** | `string` | Name of your Database | [Defaults to `undefined`] |
|
|
800
|
+
|
|
801
|
+
### Return type
|
|
802
|
+
|
|
803
|
+
**Array<string>**
|
|
804
|
+
|
|
805
|
+
### Authorization
|
|
806
|
+
|
|
807
|
+
[httpAuth1](../README.md#httpAuth1), [httpAuth](../README.md#httpAuth), [apiKeyAuth](../README.md#apiKeyAuth)
|
|
808
|
+
|
|
809
|
+
### HTTP request headers
|
|
810
|
+
|
|
811
|
+
- **Content-Type**: Not defined
|
|
812
|
+
- **Accept**: `application/json`
|
|
813
|
+
|
|
814
|
+
|
|
815
|
+
### HTTP response details
|
|
816
|
+
| Status code | Description | Response headers |
|
|
817
|
+
|-------------|-------------|------------------|
|
|
818
|
+
| **200** | | - |
|
|
819
|
+
| **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> |
|
|
820
|
+
|
|
821
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
822
|
+
|