@sfxcode/nuxt-mongocamp-server 2.4.0 → 2.6.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.
Files changed (61) hide show
  1. package/dist/module.d.mts +10 -4
  2. package/dist/module.json +1 -1
  3. package/dist/module.mjs +36 -20
  4. package/dist/runtime/api/.openapi-generator/FILES +2 -0
  5. package/dist/runtime/api/apis/AdminApi.d.ts +28 -20
  6. package/dist/runtime/api/apis/AdminApi.js +49 -47
  7. package/dist/runtime/api/apis/ApplicationApi.d.ts +20 -0
  8. package/dist/runtime/api/apis/ApplicationApi.js +51 -0
  9. package/dist/runtime/api/apis/FileApi.d.ts +53 -0
  10. package/dist/runtime/api/apis/FileApi.js +81 -0
  11. package/dist/runtime/api/docs/AdminApi.md +33 -33
  12. package/dist/runtime/api/docs/ApplicationApi.md +79 -0
  13. package/dist/runtime/api/docs/CapabilityLimits.md +8 -0
  14. package/dist/runtime/api/docs/CollectionDeclaration.md +2 -0
  15. package/dist/runtime/api/docs/CollectionDeclarationIndexesInner.md +10 -0
  16. package/dist/runtime/api/docs/CollectionDeclarationReferencedByInner.md +40 -0
  17. package/dist/runtime/api/docs/FileApi.md +97 -0
  18. package/dist/runtime/api/models/CapabilityLimits.d.ts +16 -0
  19. package/dist/runtime/api/models/CapabilityLimits.js +12 -0
  20. package/dist/runtime/api/models/CollectionDeclaration.d.ts +5 -0
  21. package/dist/runtime/api/models/CollectionDeclaration.js +7 -0
  22. package/dist/runtime/api/models/CollectionDeclarationIndexesInner.d.ts +37 -0
  23. package/dist/runtime/api/models/CollectionDeclarationIndexesInner.js +21 -2
  24. package/dist/runtime/api/models/CollectionDeclarationReferencedByInner.d.ts +42 -0
  25. package/dist/runtime/api/models/CollectionDeclarationReferencedByInner.js +35 -0
  26. package/dist/runtime/api/models/CollectionDeclarationRefsInner.d.ts +2 -2
  27. package/dist/runtime/api/models/CollectionDeclarationRefsInner.js +2 -1
  28. package/dist/runtime/api/models/index.d.ts +1 -0
  29. package/dist/runtime/api/models/index.js +1 -0
  30. package/dist/runtime/client.d.ts +8 -0
  31. package/dist/runtime/client.js +3 -0
  32. package/dist/runtime/composables/mongocampApi.d.ts +4 -0
  33. package/dist/runtime/composables/mongocampApi.js +10 -2
  34. package/dist/runtime/composables/mongocampApiAdmin.js +1 -1
  35. package/dist/runtime/composables/mongocampAuth.js +29 -25
  36. package/dist/runtime/composables/mongocampCollection.d.ts +2 -1
  37. package/dist/runtime/composables/mongocampCollection.js +36 -13
  38. package/dist/runtime/composables/mongocampLive.js +25 -3
  39. package/dist/runtime/composables/mongocampSearch.js +12 -3
  40. package/dist/runtime/plugins/bson-payload.d.ts +8 -0
  41. package/dist/runtime/plugins/bson-payload.js +6 -0
  42. package/dist/runtime/server/composables/mongocampApi.d.ts +5 -1
  43. package/dist/runtime/server/composables/mongocampApi.js +1 -9
  44. package/dist/runtime/server/composables/mongocampServerApi.d.ts +4 -0
  45. package/dist/runtime/server/composables/mongocampServerApi.js +5 -0
  46. package/dist/runtime/server/mongocamp/core.d.ts +1 -1
  47. package/dist/runtime/server/mongocamp/core.js +1 -1
  48. package/dist/runtime/server/mongocamp/embedded-api.d.ts +18 -0
  49. package/dist/runtime/server/mongocamp/embedded-api.js +10 -0
  50. package/dist/runtime/utils/appState.d.ts +21 -0
  51. package/dist/runtime/utils/appState.js +11 -0
  52. package/dist/runtime/utils/bsonPayload.d.ts +8 -0
  53. package/dist/runtime/utils/bsonPayload.js +10 -0
  54. package/dist/runtime/utils/buildFieldFilterExpression.d.ts +4 -0
  55. package/dist/runtime/utils/buildFieldFilterExpression.js +5 -3
  56. package/dist/runtime/utils/createMongocampApis.d.ts +9 -1
  57. package/dist/runtime/utils/createMongocampApis.js +9 -2
  58. package/dist/runtime/utils/keepLongs.d.ts +14 -0
  59. package/dist/runtime/utils/keepLongs.js +45 -0
  60. package/dist/runtime/utils/sse.js +7 -1
  61. package/package.json +21 -9
@@ -11,6 +11,9 @@ import {
11
11
  import {
12
12
  MongoFindRequestToJSON
13
13
  } from "../models/MongoFindRequest.js";
14
+ import {
15
+ SearchRequestToJSON
16
+ } from "../models/SearchRequest.js";
14
17
  import {
15
18
  UpdateFileInformationRequestToJSON
16
19
  } from "../models/UpdateFileInformationRequest.js";
@@ -420,6 +423,80 @@ export class FileApi extends runtime.BaseAPI {
420
423
  const response = await this.listFilesRaw(requestParameters, initOverrides);
421
424
  return await response.value();
422
425
  }
426
+ /**
427
+ * Creates request options for searchFiles without sending the request
428
+ */
429
+ async searchFilesRequestOpts(requestParameters) {
430
+ if (requestParameters["bucketName"] == null) {
431
+ throw new runtime.RequiredError(
432
+ "bucketName",
433
+ 'Required parameter "bucketName" was null or undefined when calling searchFiles().'
434
+ );
435
+ }
436
+ if (requestParameters["searchRequest"] == null) {
437
+ throw new runtime.RequiredError(
438
+ "searchRequest",
439
+ 'Required parameter "searchRequest" was null or undefined when calling searchFiles().'
440
+ );
441
+ }
442
+ const queryParameters = {};
443
+ if (requestParameters["rowsPerPage"] != null) {
444
+ queryParameters["rowsPerPage"] = requestParameters["rowsPerPage"];
445
+ }
446
+ if (requestParameters["page"] != null) {
447
+ queryParameters["page"] = requestParameters["page"];
448
+ }
449
+ if (requestParameters["count"] != null) {
450
+ queryParameters["count"] = requestParameters["count"];
451
+ }
452
+ if (requestParameters["after"] != null) {
453
+ queryParameters["after"] = requestParameters["after"];
454
+ }
455
+ if (requestParameters["filterCaseInsensitive"] != null) {
456
+ queryParameters["filterCaseInsensitive"] = requestParameters["filterCaseInsensitive"];
457
+ }
458
+ const headerParameters = {};
459
+ headerParameters["Content-Type"] = "application/json";
460
+ if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
461
+ headerParameters["Authorization"] = "Basic " + btoa((this.configuration.username || "") + ":" + (this.configuration.password || ""));
462
+ }
463
+ if (this.configuration && this.configuration.accessToken) {
464
+ const token = this.configuration.accessToken;
465
+ const tokenString = await token("httpAuth", []);
466
+ if (tokenString) {
467
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
468
+ }
469
+ }
470
+ if (this.configuration && this.configuration.apiKey) {
471
+ headerParameters["X-AUTH-APIKEY"] = await this.configuration.apiKey("X-AUTH-APIKEY");
472
+ }
473
+ let urlPath = `/mongodb/buckets/{bucketName}/files/search`;
474
+ urlPath = urlPath.replace("{bucketName}", encodeURIComponent(String(requestParameters["bucketName"])));
475
+ return {
476
+ path: urlPath,
477
+ method: "POST",
478
+ headers: headerParameters,
479
+ query: queryParameters,
480
+ body: SearchRequestToJSON(requestParameters["searchRequest"])
481
+ };
482
+ }
483
+ /**
484
+ * 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.
485
+ * Search Files in Bucket
486
+ */
487
+ async searchFilesRaw(requestParameters, initOverrides) {
488
+ const requestOptions = await this.searchFilesRequestOpts(requestParameters);
489
+ const response = await this.request(requestOptions, initOverrides);
490
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(FileInformationFromJSON));
491
+ }
492
+ /**
493
+ * 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.
494
+ * Search Files in Bucket
495
+ */
496
+ async searchFiles(requestParameters, initOverrides) {
497
+ const response = await this.searchFilesRaw(requestParameters, initOverrides);
498
+ return await response.value();
499
+ }
423
500
  /**
424
501
  * Creates request options for updateFileInformation without sending the request
425
502
  */
@@ -495,3 +572,7 @@ export const ListFilesCountEnum = {
495
572
  Exact: "exact",
496
573
  None: "none"
497
574
  };
575
+ export const SearchFilesCountEnum = {
576
+ Exact: "exact",
577
+ None: "none"
578
+ };
@@ -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
- ## getRole
332
+ ## generateNewApiKeyForUser
333
333
 
334
- > Role getRole(roleName)
334
+ > JsonValueString generateNewApiKeyForUser(userId)
335
335
 
336
- Get Role
336
+ Update ApiKey
337
337
 
338
- Get Role by RoleKey
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 { GetRoleRequest } from '';
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 | RoleKey to search
364
- roleName: roleName_example,
365
- } satisfies GetRoleRequest;
363
+ // string | UserId to Update
364
+ userId: userId_example,
365
+ } satisfies GenerateNewApiKeyForUserRequest;
366
366
 
367
367
  try {
368
- const data = await api.getRole(body);
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
- | **roleName** | `string` | RoleKey to search | [Defaults to `undefined`] |
384
+ | **userId** | `string` | UserId to Update | [Defaults to `undefined`] |
385
385
 
386
386
  ### Return type
387
387
 
388
- [**Role**](Role.md)
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
- ## getUser
409
+ ## getRole
410
410
 
411
- > UserProfile getUser(userId)
411
+ > Role getRole(roleName)
412
412
 
413
- UserProfile for userId
413
+ Get Role
414
414
 
415
- Get UserProfile for user
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 { GetUserRequest } from '';
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 | UserId to search
441
- userId: userId_example,
442
- } satisfies GetUserRequest;
440
+ // string | RoleKey to search
441
+ roleName: roleName_example,
442
+ } satisfies GetRoleRequest;
443
443
 
444
444
  try {
445
- const data = await api.getUser(body);
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
- | **userId** | `string` | UserId to search | [Defaults to `undefined`] |
461
+ | **roleName** | `string` | RoleKey to search | [Defaults to `undefined`] |
462
462
 
463
463
  ### Return type
464
464
 
465
- [**UserProfile**](UserProfile.md)
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
- ## gnerateNewApiKeyForUser
486
+ ## getUser
487
487
 
488
- > JsonValueString gnerateNewApiKeyForUser(userId)
488
+ > UserProfile getUser(userId)
489
489
 
490
- Update ApiKey
490
+ UserProfile for userId
491
491
 
492
- Generate a new API key for the user
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 { GnerateNewApiKeyForUserRequest } from '';
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 Update
517
+ // string | UserId to search
518
518
  userId: userId_example,
519
- } satisfies GnerateNewApiKeyForUserRequest;
519
+ } satisfies GetUserRequest;
520
520
 
521
521
  try {
522
- const data = await api.gnerateNewApiKeyForUser(body);
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 Update | [Defaults to `undefined`] |
538
+ | **userId** | `string` | UserId to search | [Defaults to `undefined`] |
539
539
 
540
540
  ### Return type
541
541
 
542
- [**JsonValueString**](JsonValueString.md)
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&lt;string&gt;
14
14
  `indexes` | [Array&lt;CollectionDeclarationIndexesInner&gt;](CollectionDeclarationIndexesInner.md)
15
15
  `refs` | [Array&lt;CollectionDeclarationRefsInner&gt;](CollectionDeclarationRefsInner.md)
16
+ `referencedBy` | [Array&lt;CollectionDeclarationReferencedByInner&gt;](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&lt;FileInformation&gt; 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 `&#39;exact&#39;`] [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&lt;FileInformation&gt;**](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
  */