@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,682 @@
|
|
|
1
|
+
# IndexApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *http://localhost*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
|------------- | ------------- | -------------|
|
|
7
|
+
| [**createExpiringIndex**](IndexApi.md#createexpiringindex) | **PUT** /mongodb/collections/{collectionName}/index/field/{fieldName}/{duration}/expiring | Create expiring Index by Field for Collection |
|
|
8
|
+
| [**createIndex**](IndexApi.md#createindex) | **PUT** /mongodb/collections/{collectionName}/index | Create Index for Collection |
|
|
9
|
+
| [**createIndexForField**](IndexApi.md#createindexforfield) | **PUT** /mongodb/collections/{collectionName}/index/field/{fieldName} | Create Index by Field for Collection |
|
|
10
|
+
| [**createTextIndex**](IndexApi.md#createtextindex) | **PUT** /mongodb/collections/{collectionName}/index/field/{fieldName}/text | Create text index by field for collection |
|
|
11
|
+
| [**createUniqueIndex**](IndexApi.md#createuniqueindex) | **PUT** /mongodb/collections/{collectionName}/index/field/{fieldName}/unique | Create Unique Index |
|
|
12
|
+
| [**deleteIndex**](IndexApi.md#deleteindex) | **DELETE** /mongodb/collections/{collectionName}/index/{indexName} | Delete Index |
|
|
13
|
+
| [**index**](IndexApi.md#index) | **GET** /mongodb/collections/{collectionName}/index/{indexName} | Index for Collection |
|
|
14
|
+
| [**listIndices**](IndexApi.md#listindices) | **GET** /mongodb/collections/{collectionName}/index | List Indices for Collection |
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
## createExpiringIndex
|
|
19
|
+
|
|
20
|
+
> IndexCreateResponse createExpiringIndex(collectionName, fieldName, duration, sortAscending, name)
|
|
21
|
+
|
|
22
|
+
Create expiring Index by Field for Collection
|
|
23
|
+
|
|
24
|
+
Create expiring Index by Field for given Collection
|
|
25
|
+
|
|
26
|
+
### Example
|
|
27
|
+
|
|
28
|
+
```ts
|
|
29
|
+
import {
|
|
30
|
+
Configuration,
|
|
31
|
+
IndexApi,
|
|
32
|
+
} from '';
|
|
33
|
+
import type { CreateExpiringIndexRequest } from '';
|
|
34
|
+
|
|
35
|
+
async function example() {
|
|
36
|
+
console.log("🚀 Testing SDK...");
|
|
37
|
+
const config = new Configuration({
|
|
38
|
+
// To configure HTTP basic authorization: httpAuth1
|
|
39
|
+
username: "YOUR USERNAME",
|
|
40
|
+
password: "YOUR PASSWORD",
|
|
41
|
+
// Configure HTTP bearer authorization: httpAuth
|
|
42
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
43
|
+
// To configure API key authorization: apiKeyAuth
|
|
44
|
+
apiKey: "YOUR API KEY",
|
|
45
|
+
});
|
|
46
|
+
const api = new IndexApi(config);
|
|
47
|
+
|
|
48
|
+
const body = {
|
|
49
|
+
// string | The name of your MongoDb Collection
|
|
50
|
+
collectionName: collectionName_example,
|
|
51
|
+
// string | The field Name for your index
|
|
52
|
+
fieldName: fieldName_example,
|
|
53
|
+
// string | Expiring Duration in format 15d (https://www.scala-lang.org/api/2.13.7/scala/concurrent/duration/Duration.html)
|
|
54
|
+
duration: duration_example,
|
|
55
|
+
// boolean | Sort your index ascending (optional)
|
|
56
|
+
sortAscending: true,
|
|
57
|
+
// string | Name for your index (optional)
|
|
58
|
+
name: name_example,
|
|
59
|
+
} satisfies CreateExpiringIndexRequest;
|
|
60
|
+
|
|
61
|
+
try {
|
|
62
|
+
const data = await api.createExpiringIndex(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
|
+
| **fieldName** | `string` | The field Name for your index | [Defaults to `undefined`] |
|
|
80
|
+
| **duration** | `string` | Expiring Duration in format 15d (https://www.scala-lang.org/api/2.13.7/scala/concurrent/duration/Duration.html) | [Defaults to `'15d'`] |
|
|
81
|
+
| **sortAscending** | `boolean` | Sort your index ascending | [Optional] [Defaults to `true`] |
|
|
82
|
+
| **name** | `string` | Name for your index | [Optional] [Defaults to `undefined`] |
|
|
83
|
+
|
|
84
|
+
### Return type
|
|
85
|
+
|
|
86
|
+
[**IndexCreateResponse**](IndexCreateResponse.md)
|
|
87
|
+
|
|
88
|
+
### Authorization
|
|
89
|
+
|
|
90
|
+
[httpAuth1](../README.md#httpAuth1), [httpAuth](../README.md#httpAuth), [apiKeyAuth](../README.md#apiKeyAuth)
|
|
91
|
+
|
|
92
|
+
### HTTP request headers
|
|
93
|
+
|
|
94
|
+
- **Content-Type**: Not defined
|
|
95
|
+
- **Accept**: `application/json`, `text/plain`
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
### HTTP response details
|
|
99
|
+
| Status code | Description | Response headers |
|
|
100
|
+
|-------------|-------------|------------------|
|
|
101
|
+
| **200** | | - |
|
|
102
|
+
| **400** | Invalid value for: query parameter sortAscending, Invalid value for: query parameter name | - |
|
|
103
|
+
| **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> |
|
|
104
|
+
|
|
105
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
## createIndex
|
|
109
|
+
|
|
110
|
+
> IndexCreateResponse createIndex(collectionName, indexCreateRequest)
|
|
111
|
+
|
|
112
|
+
Create Index for Collection
|
|
113
|
+
|
|
114
|
+
Create Index for given Collection
|
|
115
|
+
|
|
116
|
+
### Example
|
|
117
|
+
|
|
118
|
+
```ts
|
|
119
|
+
import {
|
|
120
|
+
Configuration,
|
|
121
|
+
IndexApi,
|
|
122
|
+
} from '';
|
|
123
|
+
import type { CreateIndexRequest } from '';
|
|
124
|
+
|
|
125
|
+
async function example() {
|
|
126
|
+
console.log("🚀 Testing SDK...");
|
|
127
|
+
const config = new Configuration({
|
|
128
|
+
// To configure HTTP basic authorization: httpAuth1
|
|
129
|
+
username: "YOUR USERNAME",
|
|
130
|
+
password: "YOUR PASSWORD",
|
|
131
|
+
// Configure HTTP bearer authorization: httpAuth
|
|
132
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
133
|
+
// To configure API key authorization: apiKeyAuth
|
|
134
|
+
apiKey: "YOUR API KEY",
|
|
135
|
+
});
|
|
136
|
+
const api = new IndexApi(config);
|
|
137
|
+
|
|
138
|
+
const body = {
|
|
139
|
+
// string | The name of your MongoDb Collection
|
|
140
|
+
collectionName: collectionName_example,
|
|
141
|
+
// IndexCreateRequest
|
|
142
|
+
indexCreateRequest: ...,
|
|
143
|
+
} satisfies CreateIndexRequest;
|
|
144
|
+
|
|
145
|
+
try {
|
|
146
|
+
const data = await api.createIndex(body);
|
|
147
|
+
console.log(data);
|
|
148
|
+
} catch (error) {
|
|
149
|
+
console.error(error);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
// Run the test
|
|
154
|
+
example().catch(console.error);
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
### Parameters
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
| Name | Type | Description | Notes |
|
|
161
|
+
|------------- | ------------- | ------------- | -------------|
|
|
162
|
+
| **collectionName** | `string` | The name of your MongoDb Collection | [Defaults to `undefined`] |
|
|
163
|
+
| **indexCreateRequest** | [IndexCreateRequest](IndexCreateRequest.md) | | |
|
|
164
|
+
|
|
165
|
+
### Return type
|
|
166
|
+
|
|
167
|
+
[**IndexCreateResponse**](IndexCreateResponse.md)
|
|
168
|
+
|
|
169
|
+
### Authorization
|
|
170
|
+
|
|
171
|
+
[httpAuth1](../README.md#httpAuth1), [httpAuth](../README.md#httpAuth), [apiKeyAuth](../README.md#apiKeyAuth)
|
|
172
|
+
|
|
173
|
+
### HTTP request headers
|
|
174
|
+
|
|
175
|
+
- **Content-Type**: `application/json`
|
|
176
|
+
- **Accept**: `application/json`, `text/plain`
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
### HTTP response details
|
|
180
|
+
| Status code | Description | Response headers |
|
|
181
|
+
|-------------|-------------|------------------|
|
|
182
|
+
| **200** | | - |
|
|
183
|
+
| **400** | Invalid value for: body | - |
|
|
184
|
+
| **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> |
|
|
185
|
+
|
|
186
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
## createIndexForField
|
|
190
|
+
|
|
191
|
+
> IndexCreateResponse createIndexForField(collectionName, fieldName, sortAscending, indexOptionsRequest)
|
|
192
|
+
|
|
193
|
+
Create Index by Field for Collection
|
|
194
|
+
|
|
195
|
+
Create Index by Field for given Collection
|
|
196
|
+
|
|
197
|
+
### Example
|
|
198
|
+
|
|
199
|
+
```ts
|
|
200
|
+
import {
|
|
201
|
+
Configuration,
|
|
202
|
+
IndexApi,
|
|
203
|
+
} from '';
|
|
204
|
+
import type { CreateIndexForFieldRequest } from '';
|
|
205
|
+
|
|
206
|
+
async function example() {
|
|
207
|
+
console.log("🚀 Testing SDK...");
|
|
208
|
+
const config = new Configuration({
|
|
209
|
+
// To configure HTTP basic authorization: httpAuth1
|
|
210
|
+
username: "YOUR USERNAME",
|
|
211
|
+
password: "YOUR PASSWORD",
|
|
212
|
+
// Configure HTTP bearer authorization: httpAuth
|
|
213
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
214
|
+
// To configure API key authorization: apiKeyAuth
|
|
215
|
+
apiKey: "YOUR API KEY",
|
|
216
|
+
});
|
|
217
|
+
const api = new IndexApi(config);
|
|
218
|
+
|
|
219
|
+
const body = {
|
|
220
|
+
// string | The name of your MongoDb Collection
|
|
221
|
+
collectionName: collectionName_example,
|
|
222
|
+
// string | The field Name for your index
|
|
223
|
+
fieldName: fieldName_example,
|
|
224
|
+
// boolean | Sort your index ascending (optional)
|
|
225
|
+
sortAscending: true,
|
|
226
|
+
// IndexOptionsRequest (optional)
|
|
227
|
+
indexOptionsRequest: ...,
|
|
228
|
+
} satisfies CreateIndexForFieldRequest;
|
|
229
|
+
|
|
230
|
+
try {
|
|
231
|
+
const data = await api.createIndexForField(body);
|
|
232
|
+
console.log(data);
|
|
233
|
+
} catch (error) {
|
|
234
|
+
console.error(error);
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
// Run the test
|
|
239
|
+
example().catch(console.error);
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
### Parameters
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
| Name | Type | Description | Notes |
|
|
246
|
+
|------------- | ------------- | ------------- | -------------|
|
|
247
|
+
| **collectionName** | `string` | The name of your MongoDb Collection | [Defaults to `undefined`] |
|
|
248
|
+
| **fieldName** | `string` | The field Name for your index | [Defaults to `undefined`] |
|
|
249
|
+
| **sortAscending** | `boolean` | Sort your index ascending | [Optional] [Defaults to `true`] |
|
|
250
|
+
| **indexOptionsRequest** | [IndexOptionsRequest](IndexOptionsRequest.md) | | [Optional] |
|
|
251
|
+
|
|
252
|
+
### Return type
|
|
253
|
+
|
|
254
|
+
[**IndexCreateResponse**](IndexCreateResponse.md)
|
|
255
|
+
|
|
256
|
+
### Authorization
|
|
257
|
+
|
|
258
|
+
[httpAuth1](../README.md#httpAuth1), [httpAuth](../README.md#httpAuth), [apiKeyAuth](../README.md#apiKeyAuth)
|
|
259
|
+
|
|
260
|
+
### HTTP request headers
|
|
261
|
+
|
|
262
|
+
- **Content-Type**: `application/json`
|
|
263
|
+
- **Accept**: `application/json`, `text/plain`
|
|
264
|
+
|
|
265
|
+
|
|
266
|
+
### HTTP response details
|
|
267
|
+
| Status code | Description | Response headers |
|
|
268
|
+
|-------------|-------------|------------------|
|
|
269
|
+
| **200** | | - |
|
|
270
|
+
| **400** | Invalid value for: query parameter sortAscending, Invalid value for: body | - |
|
|
271
|
+
| **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> |
|
|
272
|
+
|
|
273
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
274
|
+
|
|
275
|
+
|
|
276
|
+
## createTextIndex
|
|
277
|
+
|
|
278
|
+
> IndexCreateResponse createTextIndex(collectionName, fieldName, indexOptionsRequest)
|
|
279
|
+
|
|
280
|
+
Create text index by field for collection
|
|
281
|
+
|
|
282
|
+
Create text index by field for given collection
|
|
283
|
+
|
|
284
|
+
### Example
|
|
285
|
+
|
|
286
|
+
```ts
|
|
287
|
+
import {
|
|
288
|
+
Configuration,
|
|
289
|
+
IndexApi,
|
|
290
|
+
} from '';
|
|
291
|
+
import type { CreateTextIndexRequest } from '';
|
|
292
|
+
|
|
293
|
+
async function example() {
|
|
294
|
+
console.log("🚀 Testing SDK...");
|
|
295
|
+
const config = new Configuration({
|
|
296
|
+
// To configure HTTP basic authorization: httpAuth1
|
|
297
|
+
username: "YOUR USERNAME",
|
|
298
|
+
password: "YOUR PASSWORD",
|
|
299
|
+
// Configure HTTP bearer authorization: httpAuth
|
|
300
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
301
|
+
// To configure API key authorization: apiKeyAuth
|
|
302
|
+
apiKey: "YOUR API KEY",
|
|
303
|
+
});
|
|
304
|
+
const api = new IndexApi(config);
|
|
305
|
+
|
|
306
|
+
const body = {
|
|
307
|
+
// string | The name of your MongoDb Collection
|
|
308
|
+
collectionName: collectionName_example,
|
|
309
|
+
// string | The field Name for your index
|
|
310
|
+
fieldName: fieldName_example,
|
|
311
|
+
// IndexOptionsRequest (optional)
|
|
312
|
+
indexOptionsRequest: ...,
|
|
313
|
+
} satisfies CreateTextIndexRequest;
|
|
314
|
+
|
|
315
|
+
try {
|
|
316
|
+
const data = await api.createTextIndex(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
|
+
| **fieldName** | `string` | The field Name for your index | [Defaults to `undefined`] |
|
|
334
|
+
| **indexOptionsRequest** | [IndexOptionsRequest](IndexOptionsRequest.md) | | [Optional] |
|
|
335
|
+
|
|
336
|
+
### Return type
|
|
337
|
+
|
|
338
|
+
[**IndexCreateResponse**](IndexCreateResponse.md)
|
|
339
|
+
|
|
340
|
+
### Authorization
|
|
341
|
+
|
|
342
|
+
[httpAuth1](../README.md#httpAuth1), [httpAuth](../README.md#httpAuth), [apiKeyAuth](../README.md#apiKeyAuth)
|
|
343
|
+
|
|
344
|
+
### HTTP request headers
|
|
345
|
+
|
|
346
|
+
- **Content-Type**: `application/json`
|
|
347
|
+
- **Accept**: `application/json`, `text/plain`
|
|
348
|
+
|
|
349
|
+
|
|
350
|
+
### HTTP response details
|
|
351
|
+
| Status code | Description | Response headers |
|
|
352
|
+
|-------------|-------------|------------------|
|
|
353
|
+
| **200** | | - |
|
|
354
|
+
| **400** | Invalid value for: body | - |
|
|
355
|
+
| **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> |
|
|
356
|
+
|
|
357
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
358
|
+
|
|
359
|
+
|
|
360
|
+
## createUniqueIndex
|
|
361
|
+
|
|
362
|
+
> IndexCreateResponse createUniqueIndex(collectionName, fieldName, sortAscending, name)
|
|
363
|
+
|
|
364
|
+
Create Unique Index
|
|
365
|
+
|
|
366
|
+
Create Unique Index by Field for given Collection
|
|
367
|
+
|
|
368
|
+
### Example
|
|
369
|
+
|
|
370
|
+
```ts
|
|
371
|
+
import {
|
|
372
|
+
Configuration,
|
|
373
|
+
IndexApi,
|
|
374
|
+
} from '';
|
|
375
|
+
import type { CreateUniqueIndexRequest } from '';
|
|
376
|
+
|
|
377
|
+
async function example() {
|
|
378
|
+
console.log("🚀 Testing SDK...");
|
|
379
|
+
const config = new Configuration({
|
|
380
|
+
// To configure HTTP basic authorization: httpAuth1
|
|
381
|
+
username: "YOUR USERNAME",
|
|
382
|
+
password: "YOUR PASSWORD",
|
|
383
|
+
// Configure HTTP bearer authorization: httpAuth
|
|
384
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
385
|
+
// To configure API key authorization: apiKeyAuth
|
|
386
|
+
apiKey: "YOUR API KEY",
|
|
387
|
+
});
|
|
388
|
+
const api = new IndexApi(config);
|
|
389
|
+
|
|
390
|
+
const body = {
|
|
391
|
+
// string | The name of your MongoDb Collection
|
|
392
|
+
collectionName: collectionName_example,
|
|
393
|
+
// string | The field Name for your index
|
|
394
|
+
fieldName: fieldName_example,
|
|
395
|
+
// boolean | Sort your index ascending (optional)
|
|
396
|
+
sortAscending: true,
|
|
397
|
+
// string | Name for your index (optional)
|
|
398
|
+
name: name_example,
|
|
399
|
+
} satisfies CreateUniqueIndexRequest;
|
|
400
|
+
|
|
401
|
+
try {
|
|
402
|
+
const data = await api.createUniqueIndex(body);
|
|
403
|
+
console.log(data);
|
|
404
|
+
} catch (error) {
|
|
405
|
+
console.error(error);
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
// Run the test
|
|
410
|
+
example().catch(console.error);
|
|
411
|
+
```
|
|
412
|
+
|
|
413
|
+
### Parameters
|
|
414
|
+
|
|
415
|
+
|
|
416
|
+
| Name | Type | Description | Notes |
|
|
417
|
+
|------------- | ------------- | ------------- | -------------|
|
|
418
|
+
| **collectionName** | `string` | The name of your MongoDb Collection | [Defaults to `undefined`] |
|
|
419
|
+
| **fieldName** | `string` | The field Name for your index | [Defaults to `undefined`] |
|
|
420
|
+
| **sortAscending** | `boolean` | Sort your index ascending | [Optional] [Defaults to `true`] |
|
|
421
|
+
| **name** | `string` | Name for your index | [Optional] [Defaults to `undefined`] |
|
|
422
|
+
|
|
423
|
+
### Return type
|
|
424
|
+
|
|
425
|
+
[**IndexCreateResponse**](IndexCreateResponse.md)
|
|
426
|
+
|
|
427
|
+
### Authorization
|
|
428
|
+
|
|
429
|
+
[httpAuth1](../README.md#httpAuth1), [httpAuth](../README.md#httpAuth), [apiKeyAuth](../README.md#apiKeyAuth)
|
|
430
|
+
|
|
431
|
+
### HTTP request headers
|
|
432
|
+
|
|
433
|
+
- **Content-Type**: Not defined
|
|
434
|
+
- **Accept**: `application/json`, `text/plain`
|
|
435
|
+
|
|
436
|
+
|
|
437
|
+
### HTTP response details
|
|
438
|
+
| Status code | Description | Response headers |
|
|
439
|
+
|-------------|-------------|------------------|
|
|
440
|
+
| **200** | | - |
|
|
441
|
+
| **400** | Invalid value for: query parameter sortAscending, Invalid value for: query parameter name | - |
|
|
442
|
+
| **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> |
|
|
443
|
+
|
|
444
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
445
|
+
|
|
446
|
+
|
|
447
|
+
## deleteIndex
|
|
448
|
+
|
|
449
|
+
> IndexDropResponse deleteIndex(collectionName, indexName)
|
|
450
|
+
|
|
451
|
+
Delete Index
|
|
452
|
+
|
|
453
|
+
Delete Index by Name for given Collection
|
|
454
|
+
|
|
455
|
+
### Example
|
|
456
|
+
|
|
457
|
+
```ts
|
|
458
|
+
import {
|
|
459
|
+
Configuration,
|
|
460
|
+
IndexApi,
|
|
461
|
+
} from '';
|
|
462
|
+
import type { DeleteIndexRequest } from '';
|
|
463
|
+
|
|
464
|
+
async function example() {
|
|
465
|
+
console.log("🚀 Testing SDK...");
|
|
466
|
+
const config = new Configuration({
|
|
467
|
+
// To configure HTTP basic authorization: httpAuth1
|
|
468
|
+
username: "YOUR USERNAME",
|
|
469
|
+
password: "YOUR PASSWORD",
|
|
470
|
+
// Configure HTTP bearer authorization: httpAuth
|
|
471
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
472
|
+
// To configure API key authorization: apiKeyAuth
|
|
473
|
+
apiKey: "YOUR API KEY",
|
|
474
|
+
});
|
|
475
|
+
const api = new IndexApi(config);
|
|
476
|
+
|
|
477
|
+
const body = {
|
|
478
|
+
// string | The name of your MongoDb Collection
|
|
479
|
+
collectionName: collectionName_example,
|
|
480
|
+
// string | The name of your Index
|
|
481
|
+
indexName: indexName_example,
|
|
482
|
+
} satisfies DeleteIndexRequest;
|
|
483
|
+
|
|
484
|
+
try {
|
|
485
|
+
const data = await api.deleteIndex(body);
|
|
486
|
+
console.log(data);
|
|
487
|
+
} catch (error) {
|
|
488
|
+
console.error(error);
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
// Run the test
|
|
493
|
+
example().catch(console.error);
|
|
494
|
+
```
|
|
495
|
+
|
|
496
|
+
### Parameters
|
|
497
|
+
|
|
498
|
+
|
|
499
|
+
| Name | Type | Description | Notes |
|
|
500
|
+
|------------- | ------------- | ------------- | -------------|
|
|
501
|
+
| **collectionName** | `string` | The name of your MongoDb Collection | [Defaults to `undefined`] |
|
|
502
|
+
| **indexName** | `string` | The name of your Index | [Defaults to `undefined`] |
|
|
503
|
+
|
|
504
|
+
### Return type
|
|
505
|
+
|
|
506
|
+
[**IndexDropResponse**](IndexDropResponse.md)
|
|
507
|
+
|
|
508
|
+
### Authorization
|
|
509
|
+
|
|
510
|
+
[httpAuth1](../README.md#httpAuth1), [httpAuth](../README.md#httpAuth), [apiKeyAuth](../README.md#apiKeyAuth)
|
|
511
|
+
|
|
512
|
+
### HTTP request headers
|
|
513
|
+
|
|
514
|
+
- **Content-Type**: Not defined
|
|
515
|
+
- **Accept**: `application/json`
|
|
516
|
+
|
|
517
|
+
|
|
518
|
+
### HTTP response details
|
|
519
|
+
| Status code | Description | Response headers |
|
|
520
|
+
|-------------|-------------|------------------|
|
|
521
|
+
| **200** | | - |
|
|
522
|
+
| **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> |
|
|
523
|
+
|
|
524
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
525
|
+
|
|
526
|
+
|
|
527
|
+
## index
|
|
528
|
+
|
|
529
|
+
> MongoIndex index(collectionName, indexName)
|
|
530
|
+
|
|
531
|
+
Index for Collection
|
|
532
|
+
|
|
533
|
+
Index by Name for given Collection
|
|
534
|
+
|
|
535
|
+
### Example
|
|
536
|
+
|
|
537
|
+
```ts
|
|
538
|
+
import {
|
|
539
|
+
Configuration,
|
|
540
|
+
IndexApi,
|
|
541
|
+
} from '';
|
|
542
|
+
import type { IndexRequest } from '';
|
|
543
|
+
|
|
544
|
+
async function example() {
|
|
545
|
+
console.log("🚀 Testing SDK...");
|
|
546
|
+
const config = new Configuration({
|
|
547
|
+
// To configure HTTP basic authorization: httpAuth1
|
|
548
|
+
username: "YOUR USERNAME",
|
|
549
|
+
password: "YOUR PASSWORD",
|
|
550
|
+
// Configure HTTP bearer authorization: httpAuth
|
|
551
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
552
|
+
// To configure API key authorization: apiKeyAuth
|
|
553
|
+
apiKey: "YOUR API KEY",
|
|
554
|
+
});
|
|
555
|
+
const api = new IndexApi(config);
|
|
556
|
+
|
|
557
|
+
const body = {
|
|
558
|
+
// string | The name of your MongoDb Collection
|
|
559
|
+
collectionName: collectionName_example,
|
|
560
|
+
// string | The name of your Index
|
|
561
|
+
indexName: indexName_example,
|
|
562
|
+
} satisfies IndexRequest;
|
|
563
|
+
|
|
564
|
+
try {
|
|
565
|
+
const data = await api.index(body);
|
|
566
|
+
console.log(data);
|
|
567
|
+
} catch (error) {
|
|
568
|
+
console.error(error);
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
// Run the test
|
|
573
|
+
example().catch(console.error);
|
|
574
|
+
```
|
|
575
|
+
|
|
576
|
+
### Parameters
|
|
577
|
+
|
|
578
|
+
|
|
579
|
+
| Name | Type | Description | Notes |
|
|
580
|
+
|------------- | ------------- | ------------- | -------------|
|
|
581
|
+
| **collectionName** | `string` | The name of your MongoDb Collection | [Defaults to `undefined`] |
|
|
582
|
+
| **indexName** | `string` | The name of your Index | [Defaults to `undefined`] |
|
|
583
|
+
|
|
584
|
+
### Return type
|
|
585
|
+
|
|
586
|
+
[**MongoIndex**](MongoIndex.md)
|
|
587
|
+
|
|
588
|
+
### Authorization
|
|
589
|
+
|
|
590
|
+
[httpAuth1](../README.md#httpAuth1), [httpAuth](../README.md#httpAuth), [apiKeyAuth](../README.md#apiKeyAuth)
|
|
591
|
+
|
|
592
|
+
### HTTP request headers
|
|
593
|
+
|
|
594
|
+
- **Content-Type**: Not defined
|
|
595
|
+
- **Accept**: `application/json`
|
|
596
|
+
|
|
597
|
+
|
|
598
|
+
### HTTP response details
|
|
599
|
+
| Status code | Description | Response headers |
|
|
600
|
+
|-------------|-------------|------------------|
|
|
601
|
+
| **200** | | - |
|
|
602
|
+
| **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> |
|
|
603
|
+
|
|
604
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
605
|
+
|
|
606
|
+
|
|
607
|
+
## listIndices
|
|
608
|
+
|
|
609
|
+
> Array<MongoIndex> listIndices(collectionName)
|
|
610
|
+
|
|
611
|
+
List Indices for Collection
|
|
612
|
+
|
|
613
|
+
List all Indices for given Collection
|
|
614
|
+
|
|
615
|
+
### Example
|
|
616
|
+
|
|
617
|
+
```ts
|
|
618
|
+
import {
|
|
619
|
+
Configuration,
|
|
620
|
+
IndexApi,
|
|
621
|
+
} from '';
|
|
622
|
+
import type { ListIndicesRequest } from '';
|
|
623
|
+
|
|
624
|
+
async function example() {
|
|
625
|
+
console.log("🚀 Testing SDK...");
|
|
626
|
+
const config = new Configuration({
|
|
627
|
+
// To configure HTTP basic authorization: httpAuth1
|
|
628
|
+
username: "YOUR USERNAME",
|
|
629
|
+
password: "YOUR PASSWORD",
|
|
630
|
+
// Configure HTTP bearer authorization: httpAuth
|
|
631
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
632
|
+
// To configure API key authorization: apiKeyAuth
|
|
633
|
+
apiKey: "YOUR API KEY",
|
|
634
|
+
});
|
|
635
|
+
const api = new IndexApi(config);
|
|
636
|
+
|
|
637
|
+
const body = {
|
|
638
|
+
// string | The name of your MongoDb Collection
|
|
639
|
+
collectionName: collectionName_example,
|
|
640
|
+
} satisfies ListIndicesRequest;
|
|
641
|
+
|
|
642
|
+
try {
|
|
643
|
+
const data = await api.listIndices(body);
|
|
644
|
+
console.log(data);
|
|
645
|
+
} catch (error) {
|
|
646
|
+
console.error(error);
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
|
|
650
|
+
// Run the test
|
|
651
|
+
example().catch(console.error);
|
|
652
|
+
```
|
|
653
|
+
|
|
654
|
+
### Parameters
|
|
655
|
+
|
|
656
|
+
|
|
657
|
+
| Name | Type | Description | Notes |
|
|
658
|
+
|------------- | ------------- | ------------- | -------------|
|
|
659
|
+
| **collectionName** | `string` | The name of your MongoDb Collection | [Defaults to `undefined`] |
|
|
660
|
+
|
|
661
|
+
### Return type
|
|
662
|
+
|
|
663
|
+
[**Array<MongoIndex>**](MongoIndex.md)
|
|
664
|
+
|
|
665
|
+
### Authorization
|
|
666
|
+
|
|
667
|
+
[httpAuth1](../README.md#httpAuth1), [httpAuth](../README.md#httpAuth), [apiKeyAuth](../README.md#apiKeyAuth)
|
|
668
|
+
|
|
669
|
+
### HTTP request headers
|
|
670
|
+
|
|
671
|
+
- **Content-Type**: Not defined
|
|
672
|
+
- **Accept**: `application/json`
|
|
673
|
+
|
|
674
|
+
|
|
675
|
+
### HTTP response details
|
|
676
|
+
| Status code | Description | Response headers |
|
|
677
|
+
|-------------|-------------|------------------|
|
|
678
|
+
| **200** | | - |
|
|
679
|
+
| **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> |
|
|
680
|
+
|
|
681
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
682
|
+
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
|
|
2
|
+
# IndexCreateRequest
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`keys` | { [key: string]: number; }
|
|
10
|
+
`indexOptionsRequest` | [IndexOptionsRequest](IndexOptionsRequest.md)
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import type { IndexCreateRequest } from ''
|
|
16
|
+
|
|
17
|
+
// TODO: Update the object below with actual values
|
|
18
|
+
const example = {
|
|
19
|
+
"keys": null,
|
|
20
|
+
"indexOptionsRequest": null,
|
|
21
|
+
} satisfies IndexCreateRequest
|
|
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 IndexCreateRequest
|
|
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
|
+
|