@sfxcode/nuxt-mongocamp-server 2.5.0 → 2.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/module.json +1 -1
- package/dist/module.mjs +1 -1
- package/dist/runtime/api/.openapi-generator/FILES +2 -0
- package/dist/runtime/api/apis/AdminApi.d.ts +28 -20
- package/dist/runtime/api/apis/AdminApi.js +49 -47
- package/dist/runtime/api/apis/ApplicationApi.d.ts +20 -0
- package/dist/runtime/api/apis/ApplicationApi.js +51 -0
- package/dist/runtime/api/apis/FileApi.d.ts +53 -0
- package/dist/runtime/api/apis/FileApi.js +81 -0
- package/dist/runtime/api/docs/AdminApi.md +33 -33
- package/dist/runtime/api/docs/ApplicationApi.md +79 -0
- package/dist/runtime/api/docs/CapabilityLimits.md +8 -0
- package/dist/runtime/api/docs/CollectionDeclaration.md +2 -0
- package/dist/runtime/api/docs/CollectionDeclarationIndexesInner.md +10 -0
- package/dist/runtime/api/docs/CollectionDeclarationReferencedByInner.md +40 -0
- package/dist/runtime/api/docs/FileApi.md +97 -0
- package/dist/runtime/api/models/CapabilityLimits.d.ts +16 -0
- package/dist/runtime/api/models/CapabilityLimits.js +12 -0
- package/dist/runtime/api/models/CollectionDeclaration.d.ts +5 -0
- package/dist/runtime/api/models/CollectionDeclaration.js +7 -0
- package/dist/runtime/api/models/CollectionDeclarationIndexesInner.d.ts +37 -0
- package/dist/runtime/api/models/CollectionDeclarationIndexesInner.js +21 -2
- package/dist/runtime/api/models/CollectionDeclarationReferencedByInner.d.ts +42 -0
- package/dist/runtime/api/models/CollectionDeclarationReferencedByInner.js +35 -0
- package/dist/runtime/api/models/CollectionDeclarationRefsInner.d.ts +2 -2
- package/dist/runtime/api/models/CollectionDeclarationRefsInner.js +2 -1
- package/dist/runtime/api/models/index.d.ts +1 -0
- package/dist/runtime/api/models/index.js +1 -0
- package/dist/runtime/client.d.ts +8 -0
- package/dist/runtime/client.js +3 -0
- package/dist/runtime/composables/mongocampApiAdmin.js +1 -1
- package/dist/runtime/utils/createMongocampApis.d.ts +9 -1
- package/dist/runtime/utils/createMongocampApis.js +9 -2
- package/dist/runtime/utils/keepLongs.d.ts +14 -0
- package/dist/runtime/utils/keepLongs.js +45 -0
- package/package.json +8 -4
|
@@ -8,9 +8,9 @@ All URIs are relative to *http://localhost*
|
|
|
8
8
|
| [**addUser**](AdminApi.md#adduser) | **PUT** /admin/users | Add User |
|
|
9
9
|
| [**deleteRole**](AdminApi.md#deleterole) | **DELETE** /admin/roles/{roleName} | Delete Role |
|
|
10
10
|
| [**deleteUser**](AdminApi.md#deleteuser) | **DELETE** /admin/users/{userId} | Delete User |
|
|
11
|
+
| [**generateNewApiKeyForUser**](AdminApi.md#generatenewapikeyforuser) | **PATCH** /admin/users/{userId}/apikey | Update ApiKey |
|
|
11
12
|
| [**getRole**](AdminApi.md#getrole) | **GET** /admin/roles/{roleName} | Get Role |
|
|
12
13
|
| [**getUser**](AdminApi.md#getuser) | **GET** /admin/users/{userId} | UserProfile for userId |
|
|
13
|
-
| [**gnerateNewApiKeyForUser**](AdminApi.md#gneratenewapikeyforuser) | **PATCH** /admin/users/{userId}/apikey | Update ApiKey |
|
|
14
14
|
| [**listRoles**](AdminApi.md#listroles) | **GET** /admin/roles | List Roles |
|
|
15
15
|
| [**listUsers**](AdminApi.md#listusers) | **GET** /admin/users | List Users |
|
|
16
16
|
| [**updatePasswordForUser**](AdminApi.md#updatepasswordforuser) | **PATCH** /admin/users/{userId}/password | Update Password |
|
|
@@ -329,13 +329,13 @@ example().catch(console.error);
|
|
|
329
329
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
330
330
|
|
|
331
331
|
|
|
332
|
-
##
|
|
332
|
+
## generateNewApiKeyForUser
|
|
333
333
|
|
|
334
|
-
>
|
|
334
|
+
> JsonValueString generateNewApiKeyForUser(userId)
|
|
335
335
|
|
|
336
|
-
|
|
336
|
+
Update ApiKey
|
|
337
337
|
|
|
338
|
-
|
|
338
|
+
Generate a new API key for the user
|
|
339
339
|
|
|
340
340
|
### Example
|
|
341
341
|
|
|
@@ -344,7 +344,7 @@ import {
|
|
|
344
344
|
Configuration,
|
|
345
345
|
AdminApi,
|
|
346
346
|
} from '';
|
|
347
|
-
import type {
|
|
347
|
+
import type { GenerateNewApiKeyForUserRequest } from '';
|
|
348
348
|
|
|
349
349
|
async function example() {
|
|
350
350
|
console.log("🚀 Testing SDK...");
|
|
@@ -360,12 +360,12 @@ async function example() {
|
|
|
360
360
|
const api = new AdminApi(config);
|
|
361
361
|
|
|
362
362
|
const body = {
|
|
363
|
-
// string |
|
|
364
|
-
|
|
365
|
-
} satisfies
|
|
363
|
+
// string | UserId to Update
|
|
364
|
+
userId: userId_example,
|
|
365
|
+
} satisfies GenerateNewApiKeyForUserRequest;
|
|
366
366
|
|
|
367
367
|
try {
|
|
368
|
-
const data = await api.
|
|
368
|
+
const data = await api.generateNewApiKeyForUser(body);
|
|
369
369
|
console.log(data);
|
|
370
370
|
} catch (error) {
|
|
371
371
|
console.error(error);
|
|
@@ -381,11 +381,11 @@ example().catch(console.error);
|
|
|
381
381
|
|
|
382
382
|
| Name | Type | Description | Notes |
|
|
383
383
|
|------------- | ------------- | ------------- | -------------|
|
|
384
|
-
| **
|
|
384
|
+
| **userId** | `string` | UserId to Update | [Defaults to `undefined`] |
|
|
385
385
|
|
|
386
386
|
### Return type
|
|
387
387
|
|
|
388
|
-
[**
|
|
388
|
+
[**JsonValueString**](JsonValueString.md)
|
|
389
389
|
|
|
390
390
|
### Authorization
|
|
391
391
|
|
|
@@ -406,13 +406,13 @@ example().catch(console.error);
|
|
|
406
406
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
407
407
|
|
|
408
408
|
|
|
409
|
-
##
|
|
409
|
+
## getRole
|
|
410
410
|
|
|
411
|
-
>
|
|
411
|
+
> Role getRole(roleName)
|
|
412
412
|
|
|
413
|
-
|
|
413
|
+
Get Role
|
|
414
414
|
|
|
415
|
-
Get
|
|
415
|
+
Get Role by RoleKey
|
|
416
416
|
|
|
417
417
|
### Example
|
|
418
418
|
|
|
@@ -421,7 +421,7 @@ import {
|
|
|
421
421
|
Configuration,
|
|
422
422
|
AdminApi,
|
|
423
423
|
} from '';
|
|
424
|
-
import type {
|
|
424
|
+
import type { GetRoleRequest } from '';
|
|
425
425
|
|
|
426
426
|
async function example() {
|
|
427
427
|
console.log("🚀 Testing SDK...");
|
|
@@ -437,12 +437,12 @@ async function example() {
|
|
|
437
437
|
const api = new AdminApi(config);
|
|
438
438
|
|
|
439
439
|
const body = {
|
|
440
|
-
// string |
|
|
441
|
-
|
|
442
|
-
} satisfies
|
|
440
|
+
// string | RoleKey to search
|
|
441
|
+
roleName: roleName_example,
|
|
442
|
+
} satisfies GetRoleRequest;
|
|
443
443
|
|
|
444
444
|
try {
|
|
445
|
-
const data = await api.
|
|
445
|
+
const data = await api.getRole(body);
|
|
446
446
|
console.log(data);
|
|
447
447
|
} catch (error) {
|
|
448
448
|
console.error(error);
|
|
@@ -458,11 +458,11 @@ example().catch(console.error);
|
|
|
458
458
|
|
|
459
459
|
| Name | Type | Description | Notes |
|
|
460
460
|
|------------- | ------------- | ------------- | -------------|
|
|
461
|
-
| **
|
|
461
|
+
| **roleName** | `string` | RoleKey to search | [Defaults to `undefined`] |
|
|
462
462
|
|
|
463
463
|
### Return type
|
|
464
464
|
|
|
465
|
-
[**
|
|
465
|
+
[**Role**](Role.md)
|
|
466
466
|
|
|
467
467
|
### Authorization
|
|
468
468
|
|
|
@@ -483,13 +483,13 @@ example().catch(console.error);
|
|
|
483
483
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
484
484
|
|
|
485
485
|
|
|
486
|
-
##
|
|
486
|
+
## getUser
|
|
487
487
|
|
|
488
|
-
>
|
|
488
|
+
> UserProfile getUser(userId)
|
|
489
489
|
|
|
490
|
-
|
|
490
|
+
UserProfile for userId
|
|
491
491
|
|
|
492
|
-
|
|
492
|
+
Get UserProfile for user
|
|
493
493
|
|
|
494
494
|
### Example
|
|
495
495
|
|
|
@@ -498,7 +498,7 @@ import {
|
|
|
498
498
|
Configuration,
|
|
499
499
|
AdminApi,
|
|
500
500
|
} from '';
|
|
501
|
-
import type {
|
|
501
|
+
import type { GetUserRequest } from '';
|
|
502
502
|
|
|
503
503
|
async function example() {
|
|
504
504
|
console.log("🚀 Testing SDK...");
|
|
@@ -514,12 +514,12 @@ async function example() {
|
|
|
514
514
|
const api = new AdminApi(config);
|
|
515
515
|
|
|
516
516
|
const body = {
|
|
517
|
-
// string | UserId to
|
|
517
|
+
// string | UserId to search
|
|
518
518
|
userId: userId_example,
|
|
519
|
-
} satisfies
|
|
519
|
+
} satisfies GetUserRequest;
|
|
520
520
|
|
|
521
521
|
try {
|
|
522
|
-
const data = await api.
|
|
522
|
+
const data = await api.getUser(body);
|
|
523
523
|
console.log(data);
|
|
524
524
|
} catch (error) {
|
|
525
525
|
console.error(error);
|
|
@@ -535,11 +535,11 @@ example().catch(console.error);
|
|
|
535
535
|
|
|
536
536
|
| Name | Type | Description | Notes |
|
|
537
537
|
|------------- | ------------- | ------------- | -------------|
|
|
538
|
-
| **userId** | `string` | UserId to
|
|
538
|
+
| **userId** | `string` | UserId to search | [Defaults to `undefined`] |
|
|
539
539
|
|
|
540
540
|
### Return type
|
|
541
541
|
|
|
542
|
-
[**
|
|
542
|
+
[**UserProfile**](UserProfile.md)
|
|
543
543
|
|
|
544
544
|
### Authorization
|
|
545
545
|
|
|
@@ -6,6 +6,7 @@ All URIs are relative to *http://localhost*
|
|
|
6
6
|
|------------- | ------------- | -------------|
|
|
7
7
|
| [**getConfig**](ApplicationApi.md#getconfig) | **GET** /system/configurations/{configurationKey} | Configuration for configurationKey |
|
|
8
8
|
| [**listConfigurations**](ApplicationApi.md#listconfigurations) | **GET** /system/configurations | List Configurations |
|
|
9
|
+
| [**resetConfiguration**](ApplicationApi.md#resetconfiguration) | **DELETE** /system/configurations/{configurationKey} | Reset Configuration |
|
|
9
10
|
| [**settings**](ApplicationApi.md#settings) | **GET** /system/settings | System Settings |
|
|
10
11
|
| [**shutdown**](ApplicationApi.md#shutdown) | **DELETE** /system | Shutdown MongoCamp |
|
|
11
12
|
| [**updateConfiguration**](ApplicationApi.md#updateconfiguration) | **PATCH** /system/configurations/{configurationKey} | Update Configuration |
|
|
@@ -158,6 +159,84 @@ This endpoint does not need any parameter.
|
|
|
158
159
|
[[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
|
|
|
160
161
|
|
|
162
|
+
## resetConfiguration
|
|
163
|
+
|
|
164
|
+
> JsonValueBoolean resetConfiguration(configurationKey)
|
|
165
|
+
|
|
166
|
+
Reset Configuration
|
|
167
|
+
|
|
168
|
+
Reset the Configuration to its default value (2.6.0), at once for a key that needs no restart. 404 for an unknown key, 400 for a key that is read at the start only, set by the environment or has a generated default (AUTH_SECRET).
|
|
169
|
+
|
|
170
|
+
### Example
|
|
171
|
+
|
|
172
|
+
```ts
|
|
173
|
+
import {
|
|
174
|
+
Configuration,
|
|
175
|
+
ApplicationApi,
|
|
176
|
+
} from '';
|
|
177
|
+
import type { ResetConfigurationRequest } from '';
|
|
178
|
+
|
|
179
|
+
async function example() {
|
|
180
|
+
console.log("🚀 Testing SDK...");
|
|
181
|
+
const config = new Configuration({
|
|
182
|
+
// To configure HTTP basic authorization: httpAuth1
|
|
183
|
+
username: "YOUR USERNAME",
|
|
184
|
+
password: "YOUR PASSWORD",
|
|
185
|
+
// Configure HTTP bearer authorization: httpAuth
|
|
186
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
187
|
+
// To configure API key authorization: apiKeyAuth
|
|
188
|
+
apiKey: "YOUR API KEY",
|
|
189
|
+
});
|
|
190
|
+
const api = new ApplicationApi(config);
|
|
191
|
+
|
|
192
|
+
const body = {
|
|
193
|
+
// string | configurationKey to reset
|
|
194
|
+
configurationKey: configurationKey_example,
|
|
195
|
+
} satisfies ResetConfigurationRequest;
|
|
196
|
+
|
|
197
|
+
try {
|
|
198
|
+
const data = await api.resetConfiguration(body);
|
|
199
|
+
console.log(data);
|
|
200
|
+
} catch (error) {
|
|
201
|
+
console.error(error);
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
// Run the test
|
|
206
|
+
example().catch(console.error);
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
### Parameters
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
| Name | Type | Description | Notes |
|
|
213
|
+
|------------- | ------------- | ------------- | -------------|
|
|
214
|
+
| **configurationKey** | `string` | configurationKey to reset | [Defaults to `undefined`] |
|
|
215
|
+
|
|
216
|
+
### Return type
|
|
217
|
+
|
|
218
|
+
[**JsonValueBoolean**](JsonValueBoolean.md)
|
|
219
|
+
|
|
220
|
+
### Authorization
|
|
221
|
+
|
|
222
|
+
[httpAuth1](../README.md#httpAuth1), [httpAuth](../README.md#httpAuth), [apiKeyAuth](../README.md#apiKeyAuth)
|
|
223
|
+
|
|
224
|
+
### HTTP request headers
|
|
225
|
+
|
|
226
|
+
- **Content-Type**: Not defined
|
|
227
|
+
- **Accept**: `application/json`, `text/plain`
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
### HTTP response details
|
|
231
|
+
| Status code | Description | Response headers |
|
|
232
|
+
|-------------|-------------|------------------|
|
|
233
|
+
| **200** | | - |
|
|
234
|
+
| **400** | Invalid value for: path parameter configurationKey | - |
|
|
235
|
+
| **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> |
|
|
236
|
+
|
|
237
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
238
|
+
|
|
239
|
+
|
|
161
240
|
## settings
|
|
162
241
|
|
|
163
242
|
> SettingsResponse settings()
|
|
@@ -7,6 +7,10 @@
|
|
|
7
7
|
Name | Type
|
|
8
8
|
------------ | -------------
|
|
9
9
|
`importMaxBytes` | number
|
|
10
|
+
`bodyMaxBytes` | number
|
|
11
|
+
`pagingMaxRows` | number
|
|
12
|
+
`exportMaxDocuments` | number
|
|
13
|
+
`gridfsUploadMaxBytes` | number
|
|
10
14
|
`grantDeniedStatus` | number
|
|
11
15
|
|
|
12
16
|
## Example
|
|
@@ -17,6 +21,10 @@ import type { CapabilityLimits } from ''
|
|
|
17
21
|
// TODO: Update the object below with actual values
|
|
18
22
|
const example = {
|
|
19
23
|
"importMaxBytes": null,
|
|
24
|
+
"bodyMaxBytes": null,
|
|
25
|
+
"pagingMaxRows": null,
|
|
26
|
+
"exportMaxDocuments": null,
|
|
27
|
+
"gridfsUploadMaxBytes": null,
|
|
20
28
|
"grantDeniedStatus": null,
|
|
21
29
|
} satisfies CapabilityLimits
|
|
22
30
|
|
|
@@ -13,6 +13,7 @@ Name | Type
|
|
|
13
13
|
`protectedFields` | Array<string>
|
|
14
14
|
`indexes` | [Array<CollectionDeclarationIndexesInner>](CollectionDeclarationIndexesInner.md)
|
|
15
15
|
`refs` | [Array<CollectionDeclarationRefsInner>](CollectionDeclarationRefsInner.md)
|
|
16
|
+
`referencedBy` | [Array<CollectionDeclarationReferencedByInner>](CollectionDeclarationReferencedByInner.md)
|
|
16
17
|
`timestamps` | [CollectionDeclarationTimestamps](CollectionDeclarationTimestamps.md)
|
|
17
18
|
`owner` | [CollectionDeclarationOwner](CollectionDeclarationOwner.md)
|
|
18
19
|
`softDelete` | [CollectionDeclarationSoftDelete](CollectionDeclarationSoftDelete.md)
|
|
@@ -33,6 +34,7 @@ const example = {
|
|
|
33
34
|
"protectedFields": null,
|
|
34
35
|
"indexes": null,
|
|
35
36
|
"refs": null,
|
|
37
|
+
"referencedBy": null,
|
|
36
38
|
"timestamps": null,
|
|
37
39
|
"owner": null,
|
|
38
40
|
"softDelete": null,
|
|
@@ -9,6 +9,11 @@ Name | Type
|
|
|
9
9
|
`name` | string
|
|
10
10
|
`key` | { [key: string]: any; }
|
|
11
11
|
`unique` | boolean
|
|
12
|
+
`sparse` | boolean
|
|
13
|
+
`origin` | string
|
|
14
|
+
`partialFilterExpression` | { [key: string]: any; }
|
|
15
|
+
`partialFilterFrom` | string
|
|
16
|
+
`expireAfterSeconds` | number
|
|
12
17
|
|
|
13
18
|
## Example
|
|
14
19
|
|
|
@@ -20,6 +25,11 @@ const example = {
|
|
|
20
25
|
"name": null,
|
|
21
26
|
"key": null,
|
|
22
27
|
"unique": null,
|
|
28
|
+
"sparse": null,
|
|
29
|
+
"origin": null,
|
|
30
|
+
"partialFilterExpression": null,
|
|
31
|
+
"partialFilterFrom": null,
|
|
32
|
+
"expireAfterSeconds": null,
|
|
23
33
|
} satisfies CollectionDeclarationIndexesInner
|
|
24
34
|
|
|
25
35
|
console.log(example)
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
|
|
2
|
+
# CollectionDeclarationReferencedByInner
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`collection` | string
|
|
10
|
+
`database` | string
|
|
11
|
+
`field` | string
|
|
12
|
+
`many` | boolean
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
import type { CollectionDeclarationReferencedByInner } from ''
|
|
18
|
+
|
|
19
|
+
// TODO: Update the object below with actual values
|
|
20
|
+
const example = {
|
|
21
|
+
"collection": null,
|
|
22
|
+
"database": null,
|
|
23
|
+
"field": null,
|
|
24
|
+
"many": null,
|
|
25
|
+
} satisfies CollectionDeclarationReferencedByInner
|
|
26
|
+
|
|
27
|
+
console.log(example)
|
|
28
|
+
|
|
29
|
+
// Convert the instance to a JSON string
|
|
30
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
31
|
+
console.log(exampleJSON)
|
|
32
|
+
|
|
33
|
+
// Parse the JSON string back to an object
|
|
34
|
+
const exampleParsed = JSON.parse(exampleJSON) as CollectionDeclarationReferencedByInner
|
|
35
|
+
console.log(exampleParsed)
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
39
|
+
|
|
40
|
+
|
|
@@ -10,6 +10,7 @@ All URIs are relative to *http://localhost*
|
|
|
10
10
|
| [**getFileInformation**](FileApi.md#getfileinformation) | **GET** /mongodb/buckets/{bucketName}/files/{fileId} | FileInformation from Bucket |
|
|
11
11
|
| [**insertFile**](FileApi.md#insertfile) | **PUT** /mongodb/buckets/{bucketName}/files | Insert File |
|
|
12
12
|
| [**listFiles**](FileApi.md#listfiles) | **GET** /mongodb/buckets/{bucketName}/files | Files in Bucket |
|
|
13
|
+
| [**searchFiles**](FileApi.md#searchfiles) | **POST** /mongodb/buckets/{bucketName}/files/search | Search Files in Bucket |
|
|
13
14
|
| [**updateFileInformation**](FileApi.md#updatefileinformationoperation) | **PATCH** /mongodb/buckets/{bucketName}/files/{fileId} | Update FileInformation in Bucket |
|
|
14
15
|
|
|
15
16
|
|
|
@@ -533,6 +534,102 @@ example().catch(console.error);
|
|
|
533
534
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
534
535
|
|
|
535
536
|
|
|
537
|
+
## searchFiles
|
|
538
|
+
|
|
539
|
+
> Array<FileInformation> searchFiles(bucketName, searchRequest, rowsPerPage, page, count, after, filterCaseInsensitive)
|
|
540
|
+
|
|
541
|
+
Search Files in Bucket
|
|
542
|
+
|
|
543
|
+
The files of the bucket with a Lucene filter (2.6.0), like the search of documents: filter, sort and projection in the request body (no URL limit), fields of the files collection (filename, length, uploadDate, metadata.*). The operators of FILTER_OPERATORS_DENIED are refused; PAGING_MAX_ROWS applies.
|
|
544
|
+
|
|
545
|
+
### Example
|
|
546
|
+
|
|
547
|
+
```ts
|
|
548
|
+
import {
|
|
549
|
+
Configuration,
|
|
550
|
+
FileApi,
|
|
551
|
+
} from '';
|
|
552
|
+
import type { SearchFilesRequest } from '';
|
|
553
|
+
|
|
554
|
+
async function example() {
|
|
555
|
+
console.log("🚀 Testing SDK...");
|
|
556
|
+
const config = new Configuration({
|
|
557
|
+
// To configure HTTP basic authorization: httpAuth1
|
|
558
|
+
username: "YOUR USERNAME",
|
|
559
|
+
password: "YOUR PASSWORD",
|
|
560
|
+
// Configure HTTP bearer authorization: httpAuth
|
|
561
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
562
|
+
// To configure API key authorization: apiKeyAuth
|
|
563
|
+
apiKey: "YOUR API KEY",
|
|
564
|
+
});
|
|
565
|
+
const api = new FileApi(config);
|
|
566
|
+
|
|
567
|
+
const body = {
|
|
568
|
+
// string | The name of your MongoDb Collection
|
|
569
|
+
bucketName: bucketName_example,
|
|
570
|
+
// SearchRequest
|
|
571
|
+
searchRequest: {"filter":"filename:report* AND metadata.year:2024","sort":["-uploadDate"]},
|
|
572
|
+
// number | Count elements per page (optional)
|
|
573
|
+
rowsPerPage: 100,
|
|
574
|
+
// number | Requested page of the ResultSets (optional)
|
|
575
|
+
page: 1,
|
|
576
|
+
// 'exact' | 'none' | How the result is counted: exact (default) or none (no count headers, no count query) (optional)
|
|
577
|
+
count: exact,
|
|
578
|
+
// string | Cursor paging: the x-pagination-next value of the previous page, empty for the first page. The sort always ends with _id; cannot be combined with page (optional)
|
|
579
|
+
after: ,
|
|
580
|
+
// boolean | true: wildcards and prefixes of the Lucene filter ignore the case. (optional)
|
|
581
|
+
filterCaseInsensitive: true,
|
|
582
|
+
} satisfies SearchFilesRequest;
|
|
583
|
+
|
|
584
|
+
try {
|
|
585
|
+
const data = await api.searchFiles(body);
|
|
586
|
+
console.log(data);
|
|
587
|
+
} catch (error) {
|
|
588
|
+
console.error(error);
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
// Run the test
|
|
593
|
+
example().catch(console.error);
|
|
594
|
+
```
|
|
595
|
+
|
|
596
|
+
### Parameters
|
|
597
|
+
|
|
598
|
+
|
|
599
|
+
| Name | Type | Description | Notes |
|
|
600
|
+
|------------- | ------------- | ------------- | -------------|
|
|
601
|
+
| **bucketName** | `string` | The name of your MongoDb Collection | [Defaults to `undefined`] |
|
|
602
|
+
| **searchRequest** | [SearchRequest](SearchRequest.md) | | |
|
|
603
|
+
| **rowsPerPage** | `number` | Count elements per page | [Optional] [Defaults to `undefined`] |
|
|
604
|
+
| **page** | `number` | Requested page of the ResultSets | [Optional] [Defaults to `undefined`] |
|
|
605
|
+
| **count** | `exact`, `none` | How the result is counted: exact (default) or none (no count headers, no count query) | [Optional] [Defaults to `'exact'`] [Enum: exact, none] |
|
|
606
|
+
| **after** | `string` | Cursor paging: the x-pagination-next value of the previous page, empty for the first page. The sort always ends with _id; cannot be combined with page | [Optional] [Defaults to `undefined`] |
|
|
607
|
+
| **filterCaseInsensitive** | `boolean` | true: wildcards and prefixes of the Lucene filter ignore the case. | [Optional] [Defaults to `false`] |
|
|
608
|
+
|
|
609
|
+
### Return type
|
|
610
|
+
|
|
611
|
+
[**Array<FileInformation>**](FileInformation.md)
|
|
612
|
+
|
|
613
|
+
### Authorization
|
|
614
|
+
|
|
615
|
+
[httpAuth1](../README.md#httpAuth1), [httpAuth](../README.md#httpAuth), [apiKeyAuth](../README.md#apiKeyAuth)
|
|
616
|
+
|
|
617
|
+
### HTTP request headers
|
|
618
|
+
|
|
619
|
+
- **Content-Type**: `application/json`
|
|
620
|
+
- **Accept**: `application/json`, `text/plain`
|
|
621
|
+
|
|
622
|
+
|
|
623
|
+
### HTTP response details
|
|
624
|
+
| Status code | Description | Response headers |
|
|
625
|
+
|-------------|-------------|------------------|
|
|
626
|
+
| **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> * x-pagination-next - Cursor of the next page (only with the parameter after, missing on the last page) <br> |
|
|
627
|
+
| **400** | Invalid value for: query parameter rowsPerPage, Invalid value for: query parameter page | - |
|
|
628
|
+
| **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> |
|
|
629
|
+
|
|
630
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
631
|
+
|
|
632
|
+
|
|
536
633
|
## updateFileInformation
|
|
537
634
|
|
|
538
635
|
> UpdateResponse updateFileInformation(bucketName, fileId, updateFileInformationRequest)
|
|
@@ -19,6 +19,22 @@ export interface CapabilityLimits {
|
|
|
19
19
|
*
|
|
20
20
|
*/
|
|
21
21
|
importMaxBytes: number;
|
|
22
|
+
/**
|
|
23
|
+
* BODY_MAX_BYTES (2.6.0); 0 is no limit.
|
|
24
|
+
*/
|
|
25
|
+
bodyMaxBytes: number;
|
|
26
|
+
/**
|
|
27
|
+
* PAGING_MAX_ROWS (2.6.0); 0 is no limit.
|
|
28
|
+
*/
|
|
29
|
+
pagingMaxRows: number;
|
|
30
|
+
/**
|
|
31
|
+
* EXPORT_MAX_DOCUMENTS (2.6.0); 0 is no limit.
|
|
32
|
+
*/
|
|
33
|
+
exportMaxDocuments: number;
|
|
34
|
+
/**
|
|
35
|
+
* GRIDFS_UPLOAD_MAX_BYTES (2.6.0); 0 is no limit.
|
|
36
|
+
*/
|
|
37
|
+
gridfsUploadMaxBytes: number;
|
|
22
38
|
/**
|
|
23
39
|
*
|
|
24
40
|
*/
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
export function instanceOfCapabilityLimits(value) {
|
|
2
2
|
if (!("importMaxBytes" in value) || value["importMaxBytes"] === void 0) return false;
|
|
3
|
+
if (!("bodyMaxBytes" in value) || value["bodyMaxBytes"] === void 0) return false;
|
|
4
|
+
if (!("pagingMaxRows" in value) || value["pagingMaxRows"] === void 0) return false;
|
|
5
|
+
if (!("exportMaxDocuments" in value) || value["exportMaxDocuments"] === void 0) return false;
|
|
6
|
+
if (!("gridfsUploadMaxBytes" in value) || value["gridfsUploadMaxBytes"] === void 0) return false;
|
|
3
7
|
if (!("grantDeniedStatus" in value) || value["grantDeniedStatus"] === void 0) return false;
|
|
4
8
|
return true;
|
|
5
9
|
}
|
|
@@ -12,6 +16,10 @@ export function CapabilityLimitsFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
12
16
|
}
|
|
13
17
|
return {
|
|
14
18
|
"importMaxBytes": json["importMaxBytes"],
|
|
19
|
+
"bodyMaxBytes": json["bodyMaxBytes"],
|
|
20
|
+
"pagingMaxRows": json["pagingMaxRows"],
|
|
21
|
+
"exportMaxDocuments": json["exportMaxDocuments"],
|
|
22
|
+
"gridfsUploadMaxBytes": json["gridfsUploadMaxBytes"],
|
|
15
23
|
"grantDeniedStatus": json["grantDeniedStatus"]
|
|
16
24
|
};
|
|
17
25
|
}
|
|
@@ -24,6 +32,10 @@ export function CapabilityLimitsToJSONTyped(value, ignoreDiscriminator = false)
|
|
|
24
32
|
}
|
|
25
33
|
return {
|
|
26
34
|
"importMaxBytes": value["importMaxBytes"],
|
|
35
|
+
"bodyMaxBytes": value["bodyMaxBytes"],
|
|
36
|
+
"pagingMaxRows": value["pagingMaxRows"],
|
|
37
|
+
"exportMaxDocuments": value["exportMaxDocuments"],
|
|
38
|
+
"gridfsUploadMaxBytes": value["gridfsUploadMaxBytes"],
|
|
27
39
|
"grantDeniedStatus": value["grantDeniedStatus"]
|
|
28
40
|
};
|
|
29
41
|
}
|
|
@@ -15,6 +15,7 @@ import type { CollectionDeclarationVersioned } from './CollectionDeclarationVers
|
|
|
15
15
|
import type { CollectionDeclarationOwner } from './CollectionDeclarationOwner.js';
|
|
16
16
|
import type { CollectionDeclarationRefsInner } from './CollectionDeclarationRefsInner.js';
|
|
17
17
|
import type { CollectionDeclarationIndexesInner } from './CollectionDeclarationIndexesInner.js';
|
|
18
|
+
import type { CollectionDeclarationReferencedByInner } from './CollectionDeclarationReferencedByInner.js';
|
|
18
19
|
import type { CollectionDeclarationSoftDelete } from './CollectionDeclarationSoftDelete.js';
|
|
19
20
|
/**
|
|
20
21
|
*
|
|
@@ -50,6 +51,10 @@ export interface CollectionDeclaration {
|
|
|
50
51
|
* The references of the declaration (2.4.0), the fields a read can expand (query parameter expand).
|
|
51
52
|
*/
|
|
52
53
|
refs: Array<CollectionDeclarationRefsInner>;
|
|
54
|
+
/**
|
|
55
|
+
* The references of the declared collections to this collection (2.6.0), from the declarations of the server; empty when none.
|
|
56
|
+
*/
|
|
57
|
+
referencedBy: Array<CollectionDeclarationReferencedByInner>;
|
|
53
58
|
/**
|
|
54
59
|
*
|
|
55
60
|
*/
|
|
@@ -22,6 +22,10 @@ import {
|
|
|
22
22
|
CollectionDeclarationIndexesInnerFromJSON,
|
|
23
23
|
CollectionDeclarationIndexesInnerToJSON
|
|
24
24
|
} from "./CollectionDeclarationIndexesInner.js";
|
|
25
|
+
import {
|
|
26
|
+
CollectionDeclarationReferencedByInnerFromJSON,
|
|
27
|
+
CollectionDeclarationReferencedByInnerToJSON
|
|
28
|
+
} from "./CollectionDeclarationReferencedByInner.js";
|
|
25
29
|
import {
|
|
26
30
|
CollectionDeclarationSoftDeleteFromJSON,
|
|
27
31
|
CollectionDeclarationSoftDeleteToJSON
|
|
@@ -39,6 +43,7 @@ export function instanceOfCollectionDeclaration(value) {
|
|
|
39
43
|
if (!("protectedFields" in value) || value["protectedFields"] === void 0) return false;
|
|
40
44
|
if (!("indexes" in value) || value["indexes"] === void 0) return false;
|
|
41
45
|
if (!("refs" in value) || value["refs"] === void 0) return false;
|
|
46
|
+
if (!("referencedBy" in value) || value["referencedBy"] === void 0) return false;
|
|
42
47
|
return true;
|
|
43
48
|
}
|
|
44
49
|
export function CollectionDeclarationFromJSON(json) {
|
|
@@ -56,6 +61,7 @@ export function CollectionDeclarationFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
56
61
|
"protectedFields": json["protectedFields"],
|
|
57
62
|
"indexes": json["indexes"].map(CollectionDeclarationIndexesInnerFromJSON),
|
|
58
63
|
"refs": json["refs"].map(CollectionDeclarationRefsInnerFromJSON),
|
|
64
|
+
"referencedBy": json["referencedBy"].map(CollectionDeclarationReferencedByInnerFromJSON),
|
|
59
65
|
"timestamps": json["timestamps"] == null ? void 0 : CollectionDeclarationTimestampsFromJSON(json["timestamps"]),
|
|
60
66
|
"owner": json["owner"] == null ? void 0 : CollectionDeclarationOwnerFromJSON(json["owner"]),
|
|
61
67
|
"softDelete": json["softDelete"] == null ? void 0 : CollectionDeclarationSoftDeleteFromJSON(json["softDelete"]),
|
|
@@ -78,6 +84,7 @@ export function CollectionDeclarationToJSONTyped(value, ignoreDiscriminator = fa
|
|
|
78
84
|
"protectedFields": value["protectedFields"],
|
|
79
85
|
"indexes": value["indexes"].map(CollectionDeclarationIndexesInnerToJSON),
|
|
80
86
|
"refs": value["refs"].map(CollectionDeclarationRefsInnerToJSON),
|
|
87
|
+
"referencedBy": value["referencedBy"].map(CollectionDeclarationReferencedByInnerToJSON),
|
|
81
88
|
"timestamps": CollectionDeclarationTimestampsToJSON(value["timestamps"]),
|
|
82
89
|
"owner": CollectionDeclarationOwnerToJSON(value["owner"]),
|
|
83
90
|
"softDelete": CollectionDeclarationSoftDeleteToJSON(value["softDelete"]),
|
|
@@ -29,7 +29,44 @@ export interface CollectionDeclarationIndexesInner {
|
|
|
29
29
|
*
|
|
30
30
|
*/
|
|
31
31
|
unique: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* 2.6.0
|
|
34
|
+
*/
|
|
35
|
+
sparse: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Declared, or added for a behaviour (owner = the index on the owner field), 2.6.0.
|
|
38
|
+
*/
|
|
39
|
+
origin: CollectionDeclarationIndexesInnerOriginEnum;
|
|
40
|
+
/**
|
|
41
|
+
* The partial filter as relaxed Extended JSON (2.6.0), as index details show it.
|
|
42
|
+
*/
|
|
43
|
+
partialFilterExpression?: {
|
|
44
|
+
[key: string]: any;
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* softDelete when the soft delete behaviour added the partial filter to a unique index (2.6.0).
|
|
48
|
+
*/
|
|
49
|
+
partialFilterFrom?: CollectionDeclarationIndexesInnerPartialFilterFromEnum;
|
|
50
|
+
/**
|
|
51
|
+
* 2.6.0
|
|
52
|
+
*/
|
|
53
|
+
expireAfterSeconds?: number;
|
|
32
54
|
}
|
|
55
|
+
/**
|
|
56
|
+
* @export
|
|
57
|
+
*/
|
|
58
|
+
export declare const CollectionDeclarationIndexesInnerOriginEnum: {
|
|
59
|
+
readonly Declaration: "declaration";
|
|
60
|
+
readonly Owner: "owner";
|
|
61
|
+
};
|
|
62
|
+
export type CollectionDeclarationIndexesInnerOriginEnum = typeof CollectionDeclarationIndexesInnerOriginEnum[keyof typeof CollectionDeclarationIndexesInnerOriginEnum];
|
|
63
|
+
/**
|
|
64
|
+
* @export
|
|
65
|
+
*/
|
|
66
|
+
export declare const CollectionDeclarationIndexesInnerPartialFilterFromEnum: {
|
|
67
|
+
readonly SoftDelete: "softDelete";
|
|
68
|
+
};
|
|
69
|
+
export type CollectionDeclarationIndexesInnerPartialFilterFromEnum = typeof CollectionDeclarationIndexesInnerPartialFilterFromEnum[keyof typeof CollectionDeclarationIndexesInnerPartialFilterFromEnum];
|
|
33
70
|
/**
|
|
34
71
|
* Check if a given object implements the CollectionDeclarationIndexesInner interface.
|
|
35
72
|
*/
|