@sfxcode/nuxt-mongocamp-server 1.6.3 → 1.8.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 (119) hide show
  1. package/README.md +8 -0
  2. package/dist/module.json +1 -1
  3. package/dist/module.mjs +1 -1
  4. package/dist/runtime/api/.openapi-generator/FILES +30 -0
  5. package/dist/runtime/api/apis/AdminApi.d.ts +1 -1
  6. package/dist/runtime/api/apis/ApplicationApi.d.ts +1 -1
  7. package/dist/runtime/api/apis/AuthApi.d.ts +19 -2
  8. package/dist/runtime/api/apis/AuthApi.js +48 -0
  9. package/dist/runtime/api/apis/BucketApi.d.ts +1 -1
  10. package/dist/runtime/api/apis/CollectionApi.d.ts +78 -4
  11. package/dist/runtime/api/apis/CollectionApi.js +236 -2
  12. package/dist/runtime/api/apis/DatabaseApi.d.ts +1 -1
  13. package/dist/runtime/api/apis/DocumentApi.d.ts +92 -2
  14. package/dist/runtime/api/apis/DocumentApi.js +275 -0
  15. package/dist/runtime/api/apis/FileApi.d.ts +1 -1
  16. package/dist/runtime/api/apis/IndexApi.d.ts +36 -2
  17. package/dist/runtime/api/apis/IndexApi.js +104 -0
  18. package/dist/runtime/api/apis/JobsApi.d.ts +1 -1
  19. package/dist/runtime/api/apis/SystemApi.d.ts +1 -1
  20. package/dist/runtime/api/docs/AuthApi.md +78 -0
  21. package/dist/runtime/api/docs/CollectionApi.md +335 -2
  22. package/dist/runtime/api/docs/CollectionPermission.md +40 -0
  23. package/dist/runtime/api/docs/CollectionSummary.md +50 -0
  24. package/dist/runtime/api/docs/CopyRequest.md +40 -0
  25. package/dist/runtime/api/docs/CopyResponse.md +38 -0
  26. package/dist/runtime/api/docs/CountResponse.md +34 -0
  27. package/dist/runtime/api/docs/DocumentApi.md +377 -8
  28. package/dist/runtime/api/docs/FieldInfo.md +36 -0
  29. package/dist/runtime/api/docs/FieldTypeCount.md +36 -0
  30. package/dist/runtime/api/docs/ImportResponse.md +42 -0
  31. package/dist/runtime/api/docs/IndexApi.md +156 -0
  32. package/dist/runtime/api/docs/IndexCreateRequest.md +2 -0
  33. package/dist/runtime/api/docs/IndexInfo.md +54 -0
  34. package/dist/runtime/api/docs/IndexKey.md +36 -0
  35. package/dist/runtime/api/docs/IndexOptionsRequest.md +10 -0
  36. package/dist/runtime/api/docs/IndexUsage.md +40 -0
  37. package/dist/runtime/api/docs/InsertError.md +38 -0
  38. package/dist/runtime/api/docs/InsertResponse.md +4 -0
  39. package/dist/runtime/api/docs/RenameRequest.md +36 -0
  40. package/dist/runtime/api/docs/RenameResponse.md +34 -0
  41. package/dist/runtime/api/docs/SearchRequest.md +38 -0
  42. package/dist/runtime/api/models/BucketInformation.d.ts +1 -1
  43. package/dist/runtime/api/models/ClusterInformation.d.ts +1 -1
  44. package/dist/runtime/api/models/ClusterMemberInformation.d.ts +1 -1
  45. package/dist/runtime/api/models/CollectionPermission.d.ts +50 -0
  46. package/dist/runtime/api/models/CollectionPermission.js +35 -0
  47. package/dist/runtime/api/models/CollectionStatus.d.ts +1 -1
  48. package/dist/runtime/api/models/CollectionSummary.d.ts +80 -0
  49. package/dist/runtime/api/models/CollectionSummary.js +50 -0
  50. package/dist/runtime/api/models/CopyRequest.d.ts +50 -0
  51. package/dist/runtime/api/models/CopyRequest.js +32 -0
  52. package/dist/runtime/api/models/CopyResponse.d.ts +44 -0
  53. package/dist/runtime/api/models/CopyResponse.js +32 -0
  54. package/dist/runtime/api/models/CountResponse.d.ts +32 -0
  55. package/dist/runtime/api/models/CountResponse.js +26 -0
  56. package/dist/runtime/api/models/DatabaseInfo.d.ts +1 -1
  57. package/dist/runtime/api/models/DeleteResponse.d.ts +1 -1
  58. package/dist/runtime/api/models/ErrorDescription.d.ts +1 -1
  59. package/dist/runtime/api/models/FieldInfo.d.ts +39 -0
  60. package/dist/runtime/api/models/FieldInfo.js +32 -0
  61. package/dist/runtime/api/models/FieldTypeCount.d.ts +38 -0
  62. package/dist/runtime/api/models/FieldTypeCount.js +29 -0
  63. package/dist/runtime/api/models/FileInformation.d.ts +1 -1
  64. package/dist/runtime/api/models/Grant.d.ts +1 -1
  65. package/dist/runtime/api/models/ImportResponse.d.ts +57 -0
  66. package/dist/runtime/api/models/ImportResponse.js +41 -0
  67. package/dist/runtime/api/models/IndexCreateRequest.d.ts +9 -2
  68. package/dist/runtime/api/models/IndexCreateRequest.js +9 -4
  69. package/dist/runtime/api/models/IndexCreateResponse.d.ts +1 -1
  70. package/dist/runtime/api/models/IndexDropResponse.d.ts +1 -1
  71. package/dist/runtime/api/models/IndexInfo.d.ts +99 -0
  72. package/dist/runtime/api/models/IndexInfo.js +54 -0
  73. package/dist/runtime/api/models/IndexKey.d.ts +38 -0
  74. package/dist/runtime/api/models/IndexKey.js +29 -0
  75. package/dist/runtime/api/models/IndexOptionsRequest.d.ts +37 -1
  76. package/dist/runtime/api/models/IndexOptionsRequest.js +12 -2
  77. package/dist/runtime/api/models/IndexUsage.d.ts +52 -0
  78. package/dist/runtime/api/models/IndexUsage.js +35 -0
  79. package/dist/runtime/api/models/InsertError.d.ts +44 -0
  80. package/dist/runtime/api/models/InsertError.js +32 -0
  81. package/dist/runtime/api/models/InsertResponse.d.ts +14 -1
  82. package/dist/runtime/api/models/InsertResponse.js +10 -2
  83. package/dist/runtime/api/models/JobConfig.d.ts +1 -1
  84. package/dist/runtime/api/models/JobInformation.d.ts +1 -1
  85. package/dist/runtime/api/models/JsonSchema.d.ts +1 -1
  86. package/dist/runtime/api/models/JsonSchemaDefinition.d.ts +1 -1
  87. package/dist/runtime/api/models/JsonValueAny.d.ts +1 -1
  88. package/dist/runtime/api/models/JsonValueBoolean.d.ts +1 -1
  89. package/dist/runtime/api/models/JsonValueString.d.ts +1 -1
  90. package/dist/runtime/api/models/Login.d.ts +1 -1
  91. package/dist/runtime/api/models/LoginResult.d.ts +1 -1
  92. package/dist/runtime/api/models/MongoAggregateRequest.d.ts +1 -1
  93. package/dist/runtime/api/models/MongoCampConfiguration.d.ts +1 -1
  94. package/dist/runtime/api/models/MongoFindRequest.d.ts +1 -1
  95. package/dist/runtime/api/models/MongoIndex.d.ts +1 -1
  96. package/dist/runtime/api/models/PasswordUpdateRequest.d.ts +1 -1
  97. package/dist/runtime/api/models/PipelineStage.d.ts +1 -1
  98. package/dist/runtime/api/models/RenameRequest.d.ts +38 -0
  99. package/dist/runtime/api/models/RenameRequest.js +28 -0
  100. package/dist/runtime/api/models/RenameResponse.d.ts +32 -0
  101. package/dist/runtime/api/models/RenameResponse.js +26 -0
  102. package/dist/runtime/api/models/Role.d.ts +1 -1
  103. package/dist/runtime/api/models/SchemaAnalysis.d.ts +1 -1
  104. package/dist/runtime/api/models/SchemaAnalysisField.d.ts +1 -1
  105. package/dist/runtime/api/models/SchemaAnalysisFieldType.d.ts +1 -1
  106. package/dist/runtime/api/models/SearchRequest.d.ts +44 -0
  107. package/dist/runtime/api/models/SearchRequest.js +29 -0
  108. package/dist/runtime/api/models/SettingsResponse.d.ts +1 -1
  109. package/dist/runtime/api/models/UpdateFileInformationRequest.d.ts +1 -1
  110. package/dist/runtime/api/models/UpdateRequest.d.ts +1 -1
  111. package/dist/runtime/api/models/UpdateResponse.d.ts +1 -1
  112. package/dist/runtime/api/models/UpdateRoleRequest.d.ts +1 -1
  113. package/dist/runtime/api/models/UserInformation.d.ts +1 -1
  114. package/dist/runtime/api/models/UserProfile.d.ts +1 -1
  115. package/dist/runtime/api/models/Version.d.ts +1 -1
  116. package/dist/runtime/api/models/index.d.ts +15 -0
  117. package/dist/runtime/api/models/index.js +15 -0
  118. package/dist/runtime/api/runtime.d.ts +1 -1
  119. package/package.json +8 -8
@@ -1,9 +1,15 @@
1
1
  import * as runtime from "../runtime.js";
2
2
  import {
3
3
  CollectionStatusFromJSON,
4
+ CollectionSummaryFromJSON,
5
+ CopyRequestToJSON,
6
+ CopyResponseFromJSON,
7
+ FieldInfoFromJSON,
4
8
  JsonSchemaFromJSON,
5
9
  JsonValueBooleanFromJSON,
6
10
  MongoAggregateRequestToJSON,
11
+ RenameRequestToJSON,
12
+ RenameResponseFromJSON,
7
13
  SchemaAnalysisFromJSON
8
14
  } from "../models/index.js";
9
15
  export class CollectionApi extends runtime.BaseAPI {
@@ -30,6 +36,12 @@ export class CollectionApi extends runtime.BaseAPI {
30
36
  if (requestParameters["page"] != null) {
31
37
  queryParameters["page"] = requestParameters["page"];
32
38
  }
39
+ if (requestParameters["filter"] != null) {
40
+ queryParameters["filter"] = requestParameters["filter"];
41
+ }
42
+ if (requestParameters["extendedJson"] != null) {
43
+ queryParameters["extendedJson"] = requestParameters["extendedJson"];
44
+ }
33
45
  const headerParameters = {};
34
46
  headerParameters["Content-Type"] = "application/json";
35
47
  if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
@@ -56,7 +68,7 @@ export class CollectionApi extends runtime.BaseAPI {
56
68
  };
57
69
  }
58
70
  /**
59
- * Aggregate in a given Collection. The value of a stage is any JSON value. Operators that run JavaScript on the database server or write to collections (`$function`, `$accumulator`, `$where`, `$out`, `$merge`, `$currentOp`, `$listSessions` by default, configured with AGGREGATION_STAGES_DENIED) are refused with 403.
71
+ * Aggregate in a given Collection. The value of a stage is any JSON value. Operators that run JavaScript on the database server or write to collections (`$function`, `$accumulator`, `$where`, `$out`, `$merge`, `$currentOp`, `$listSessions`, `$collStats`, `$indexStats` by default, configured with AGGREGATION_STAGES_DENIED) are refused with 403.
60
72
  * Aggregate in Collection
61
73
  */
62
74
  async aggregateRaw(requestParameters, initOverrides) {
@@ -65,7 +77,7 @@ export class CollectionApi extends runtime.BaseAPI {
65
77
  return new runtime.JSONApiResponse(response);
66
78
  }
67
79
  /**
68
- * Aggregate in a given Collection. The value of a stage is any JSON value. Operators that run JavaScript on the database server or write to collections (`$function`, `$accumulator`, `$where`, `$out`, `$merge`, `$currentOp`, `$listSessions` by default, configured with AGGREGATION_STAGES_DENIED) are refused with 403.
80
+ * Aggregate in a given Collection. The value of a stage is any JSON value. Operators that run JavaScript on the database server or write to collections (`$function`, `$accumulator`, `$where`, `$out`, `$merge`, `$currentOp`, `$listSessions`, `$collStats`, `$indexStats` by default, configured with AGGREGATION_STAGES_DENIED) are refused with 403.
69
81
  * Aggregate in Collection
70
82
  */
71
83
  async aggregate(requestParameters, initOverrides) {
@@ -123,6 +135,65 @@ export class CollectionApi extends runtime.BaseAPI {
123
135
  const response = await this.clearCollectionRaw(requestParameters, initOverrides);
124
136
  return await response.value();
125
137
  }
138
+ /**
139
+ * Creates request options for copyCollection without sending the request
140
+ */
141
+ async copyCollectionRequestOpts(requestParameters) {
142
+ if (requestParameters["collectionName"] == null) {
143
+ throw new runtime.RequiredError(
144
+ "collectionName",
145
+ 'Required parameter "collectionName" was null or undefined when calling copyCollection().'
146
+ );
147
+ }
148
+ if (requestParameters["copyRequest"] == null) {
149
+ throw new runtime.RequiredError(
150
+ "copyRequest",
151
+ 'Required parameter "copyRequest" was null or undefined when calling copyCollection().'
152
+ );
153
+ }
154
+ const queryParameters = {};
155
+ const headerParameters = {};
156
+ headerParameters["Content-Type"] = "application/json";
157
+ if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
158
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
159
+ }
160
+ if (this.configuration && this.configuration.accessToken) {
161
+ const token = this.configuration.accessToken;
162
+ const tokenString = await token("httpAuth", []);
163
+ if (tokenString) {
164
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
165
+ }
166
+ }
167
+ if (this.configuration && this.configuration.apiKey) {
168
+ headerParameters["X-AUTH-APIKEY"] = await this.configuration.apiKey("X-AUTH-APIKEY");
169
+ }
170
+ let urlPath = `/mongodb/collections/{collectionName}/copy`;
171
+ urlPath = urlPath.replace(`{${"collectionName"}}`, encodeURIComponent(String(requestParameters["collectionName"])));
172
+ return {
173
+ path: urlPath,
174
+ method: "POST",
175
+ headers: headerParameters,
176
+ query: queryParameters,
177
+ body: CopyRequestToJSON(requestParameters["copyRequest"])
178
+ };
179
+ }
180
+ /**
181
+ * Copy a Collection in the database, optionally only the documents that match a Lucene filter, with its indices (withIndexes, true by default). The target is a name in the database of the Collection. The read grant for the Collection and the write grant for the target are needed. An existing target is a conflict (409), unless dropTarget is true and the user has the administrate grant for it: it is replaced when the copy is complete. The copy is made in one request, a big collection takes its time.
182
+ * Copy Collection
183
+ */
184
+ async copyCollectionRaw(requestParameters, initOverrides) {
185
+ const requestOptions = await this.copyCollectionRequestOpts(requestParameters);
186
+ const response = await this.request(requestOptions, initOverrides);
187
+ return new runtime.JSONApiResponse(response, (jsonValue) => CopyResponseFromJSON(jsonValue));
188
+ }
189
+ /**
190
+ * Copy a Collection in the database, optionally only the documents that match a Lucene filter, with its indices (withIndexes, true by default). The target is a name in the database of the Collection. The read grant for the Collection and the write grant for the target are needed. An existing target is a conflict (409), unless dropTarget is true and the user has the administrate grant for it: it is replaced when the copy is complete. The copy is made in one request, a big collection takes its time.
191
+ * Copy Collection
192
+ */
193
+ async copyCollection(requestParameters, initOverrides) {
194
+ const response = await this.copyCollectionRaw(requestParameters, initOverrides);
195
+ return await response.value();
196
+ }
126
197
  /**
127
198
  * Creates request options for deleteCollection without sending the request
128
199
  */
@@ -346,6 +417,63 @@ export class CollectionApi extends runtime.BaseAPI {
346
417
  const response = await this.getCollectionInformationRaw(requestParameters, initOverrides);
347
418
  return await response.value();
348
419
  }
420
+ /**
421
+ * Creates request options for getFieldDetails without sending the request
422
+ */
423
+ async getFieldDetailsRequestOpts(requestParameters) {
424
+ if (requestParameters["collectionName"] == null) {
425
+ throw new runtime.RequiredError(
426
+ "collectionName",
427
+ 'Required parameter "collectionName" was null or undefined when calling getFieldDetails().'
428
+ );
429
+ }
430
+ const queryParameters = {};
431
+ if (requestParameters["sampleSize"] != null) {
432
+ queryParameters["sampleSize"] = requestParameters["sampleSize"];
433
+ }
434
+ if (requestParameters["depth"] != null) {
435
+ queryParameters["depth"] = requestParameters["depth"];
436
+ }
437
+ const headerParameters = {};
438
+ if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
439
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
440
+ }
441
+ if (this.configuration && this.configuration.accessToken) {
442
+ const token = this.configuration.accessToken;
443
+ const tokenString = await token("httpAuth", []);
444
+ if (tokenString) {
445
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
446
+ }
447
+ }
448
+ if (this.configuration && this.configuration.apiKey) {
449
+ headerParameters["X-AUTH-APIKEY"] = await this.configuration.apiKey("X-AUTH-APIKEY");
450
+ }
451
+ let urlPath = `/mongodb/collections/{collectionName}/fields/detail`;
452
+ urlPath = urlPath.replace(`{${"collectionName"}}`, encodeURIComponent(String(requestParameters["collectionName"])));
453
+ return {
454
+ path: urlPath,
455
+ method: "GET",
456
+ headers: headerParameters,
457
+ query: queryParameters
458
+ };
459
+ }
460
+ /**
461
+ * All fields of a collection as a flat list, one entry per path (`address.city`, `tags[]` for the elements of an array) with the types of the values and how often every type was found in the analysed documents.
462
+ * Fields of a Collection with types
463
+ */
464
+ async getFieldDetailsRaw(requestParameters, initOverrides) {
465
+ const requestOptions = await this.getFieldDetailsRequestOpts(requestParameters);
466
+ const response = await this.request(requestOptions, initOverrides);
467
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(FieldInfoFromJSON));
468
+ }
469
+ /**
470
+ * All fields of a collection as a flat list, one entry per path (`address.city`, `tags[]` for the elements of an array) with the types of the values and how often every type was found in the analysed documents.
471
+ * Fields of a Collection with types
472
+ */
473
+ async getFieldDetails(requestParameters, initOverrides) {
474
+ const response = await this.getFieldDetailsRaw(requestParameters, initOverrides);
475
+ return await response.value();
476
+ }
349
477
  /**
350
478
  * Creates request options for getJsonSchema without sending the request
351
479
  */
@@ -460,6 +588,53 @@ export class CollectionApi extends runtime.BaseAPI {
460
588
  const response = await this.getSchemaAnalysisRaw(requestParameters, initOverrides);
461
589
  return await response.value();
462
590
  }
591
+ /**
592
+ * Creates request options for listCollectionInformation without sending the request
593
+ */
594
+ async listCollectionInformationRequestOpts(requestParameters) {
595
+ const queryParameters = {};
596
+ if (requestParameters["name"] != null) {
597
+ queryParameters["name"] = requestParameters["name"];
598
+ }
599
+ const headerParameters = {};
600
+ if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
601
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
602
+ }
603
+ if (this.configuration && this.configuration.accessToken) {
604
+ const token = this.configuration.accessToken;
605
+ const tokenString = await token("httpAuth", []);
606
+ if (tokenString) {
607
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
608
+ }
609
+ }
610
+ if (this.configuration && this.configuration.apiKey) {
611
+ headerParameters["X-AUTH-APIKEY"] = await this.configuration.apiKey("X-AUTH-APIKEY");
612
+ }
613
+ let urlPath = `/mongodb/collections/info`;
614
+ return {
615
+ path: urlPath,
616
+ method: "GET",
617
+ headers: headerParameters,
618
+ query: queryParameters
619
+ };
620
+ }
621
+ /**
622
+ * The numbers of all Collections of the default database that the user may read in one request (count, size, storage size, average size of a document, number and size of the indices). A Collection without statistics, for example a view, is listed with available false.
623
+ * Information of all Collections
624
+ */
625
+ async listCollectionInformationRaw(requestParameters, initOverrides) {
626
+ const requestOptions = await this.listCollectionInformationRequestOpts(requestParameters);
627
+ const response = await this.request(requestOptions, initOverrides);
628
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(CollectionSummaryFromJSON));
629
+ }
630
+ /**
631
+ * The numbers of all Collections of the default database that the user may read in one request (count, size, storage size, average size of a document, number and size of the indices). A Collection without statistics, for example a view, is listed with available false.
632
+ * Information of all Collections
633
+ */
634
+ async listCollectionInformation(requestParameters = {}, initOverrides) {
635
+ const response = await this.listCollectionInformationRaw(requestParameters, initOverrides);
636
+ return await response.value();
637
+ }
463
638
  /**
464
639
  * Creates request options for listCollections without sending the request
465
640
  */
@@ -555,4 +730,63 @@ export class CollectionApi extends runtime.BaseAPI {
555
730
  const response = await this.listCollectionsByDatabaseRaw(requestParameters, initOverrides);
556
731
  return await response.value();
557
732
  }
733
+ /**
734
+ * Creates request options for renameCollection without sending the request
735
+ */
736
+ async renameCollectionRequestOpts(requestParameters) {
737
+ if (requestParameters["collectionName"] == null) {
738
+ throw new runtime.RequiredError(
739
+ "collectionName",
740
+ 'Required parameter "collectionName" was null or undefined when calling renameCollection().'
741
+ );
742
+ }
743
+ if (requestParameters["renameRequest"] == null) {
744
+ throw new runtime.RequiredError(
745
+ "renameRequest",
746
+ 'Required parameter "renameRequest" was null or undefined when calling renameCollection().'
747
+ );
748
+ }
749
+ const queryParameters = {};
750
+ const headerParameters = {};
751
+ headerParameters["Content-Type"] = "application/json";
752
+ if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
753
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
754
+ }
755
+ if (this.configuration && this.configuration.accessToken) {
756
+ const token = this.configuration.accessToken;
757
+ const tokenString = await token("httpAuth", []);
758
+ if (tokenString) {
759
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
760
+ }
761
+ }
762
+ if (this.configuration && this.configuration.apiKey) {
763
+ headerParameters["X-AUTH-APIKEY"] = await this.configuration.apiKey("X-AUTH-APIKEY");
764
+ }
765
+ let urlPath = `/mongodb/collections/{collectionName}/rename`;
766
+ urlPath = urlPath.replace(`{${"collectionName"}}`, encodeURIComponent(String(requestParameters["collectionName"])));
767
+ return {
768
+ path: urlPath,
769
+ method: "POST",
770
+ headers: headerParameters,
771
+ query: queryParameters,
772
+ body: RenameRequestToJSON(requestParameters["renameRequest"])
773
+ };
774
+ }
775
+ /**
776
+ * Rename a Collection in the database, with its Documents and Indices. The target is a name in the database of the Collection. The administrate grant for the Collection and the write grant for the target are needed. An existing target is a conflict (409), unless dropTarget is true and the user has the administrate grant for it: it is replaced then.
777
+ * Rename Collection
778
+ */
779
+ async renameCollectionRaw(requestParameters, initOverrides) {
780
+ const requestOptions = await this.renameCollectionRequestOpts(requestParameters);
781
+ const response = await this.request(requestOptions, initOverrides);
782
+ return new runtime.JSONApiResponse(response, (jsonValue) => RenameResponseFromJSON(jsonValue));
783
+ }
784
+ /**
785
+ * Rename a Collection in the database, with its Documents and Indices. The target is a name in the database of the Collection. The administrate grant for the Collection and the write grant for the target are needed. An existing target is a conflict (409), unless dropTarget is true and the user has the administrate grant for it: it is replaced then.
786
+ * Rename Collection
787
+ */
788
+ async renameCollection(requestParameters, initOverrides) {
789
+ const response = await this.renameCollectionRaw(requestParameters, initOverrides);
790
+ return await response.value();
791
+ }
558
792
  }
@@ -2,7 +2,7 @@
2
2
  * mongocamp-library
3
3
  * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
4
  *
5
- * The version of the OpenAPI document: 1.6.3
5
+ * The version of the OpenAPI document: 1.8.1
6
6
  *
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -2,7 +2,7 @@
2
2
  * mongocamp-library
3
3
  * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
4
  *
5
- * The version of the OpenAPI document: 1.6.3
5
+ * The version of the OpenAPI document: 1.8.1
6
6
  *
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -10,27 +10,47 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime.js';
13
- import type { DeleteResponse, InsertResponse, MongoFindRequest, UpdateRequest, UpdateResponse } from '../models/index.js';
13
+ import type { CountResponse, DeleteResponse, ImportResponse, InsertResponse, MongoFindRequest, SearchRequest, UpdateRequest, UpdateResponse } from '../models/index.js';
14
14
  export interface DeleteRequest {
15
15
  collectionName: string;
16
16
  documentId: string;
17
17
  }
18
+ export interface CountDocumentsRequest {
19
+ collectionName: string;
20
+ filter?: string;
21
+ }
18
22
  export interface DeleteManyRequest {
19
23
  collectionName: string;
20
24
  requestBody: {
21
25
  [key: string]: any;
22
26
  };
23
27
  matchAll?: boolean;
28
+ filter?: string;
29
+ }
30
+ export interface ExportDocumentsRequest {
31
+ collectionName: string;
32
+ format?: string;
33
+ filter?: string;
34
+ sort?: Array<string>;
35
+ projection?: Array<string>;
36
+ limit?: number;
37
+ extendedJson?: string;
24
38
  }
25
39
  export interface FindRequest {
26
40
  collectionName: string;
27
41
  mongoFindRequest: MongoFindRequest;
28
42
  rowsPerPage?: number;
29
43
  page?: number;
44
+ extendedJson?: string;
30
45
  }
31
46
  export interface GetDocumentRequest {
32
47
  collectionName: string;
33
48
  documentId: string;
49
+ extendedJson?: string;
50
+ }
51
+ export interface ImportDocumentsRequest {
52
+ collectionName: string;
53
+ body: string;
34
54
  }
35
55
  export interface InsertRequest {
36
56
  collectionName: string;
@@ -40,6 +60,7 @@ export interface InsertRequest {
40
60
  }
41
61
  export interface InsertManyRequest {
42
62
  collectionName: string;
63
+ ordered?: boolean;
43
64
  requestBody?: Array<{
44
65
  [key: string]: any;
45
66
  }>;
@@ -51,6 +72,14 @@ export interface ListDocumentsRequest {
51
72
  projection?: Array<string>;
52
73
  rowsPerPage?: number;
53
74
  page?: number;
75
+ extendedJson?: string;
76
+ }
77
+ export interface SearchDocumentsRequest {
78
+ collectionName: string;
79
+ searchRequest: SearchRequest;
80
+ rowsPerPage?: number;
81
+ page?: number;
82
+ extendedJson?: string;
54
83
  }
55
84
  export interface UpdateRequest {
56
85
  collectionName: string;
@@ -70,6 +99,7 @@ export interface UpdateManyRequest {
70
99
  collectionName: string;
71
100
  updateRequest: UpdateRequest;
72
101
  matchAll?: boolean;
102
+ filter?: string;
73
103
  }
74
104
  /**
75
105
  *
@@ -89,6 +119,20 @@ export declare class DocumentApi extends runtime.BaseAPI {
89
119
  * Delete Document from Collection
90
120
  */
91
121
  _delete(requestParameters: DeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DeleteResponse>;
122
+ /**
123
+ * Creates request options for countDocuments without sending the request
124
+ */
125
+ countDocumentsRequestOpts(requestParameters: CountDocumentsRequest): Promise<runtime.RequestOpts>;
126
+ /**
127
+ * Count the Documents of the given Collection that match the filter without loading them
128
+ * Count Documents in Collection
129
+ */
130
+ countDocumentsRaw(requestParameters: CountDocumentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CountResponse>>;
131
+ /**
132
+ * Count the Documents of the given Collection that match the filter without loading them
133
+ * Count Documents in Collection
134
+ */
135
+ countDocuments(requestParameters: CountDocumentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CountResponse>;
92
136
  /**
93
137
  * Creates request options for deleteMany without sending the request
94
138
  */
@@ -103,6 +147,20 @@ export declare class DocumentApi extends runtime.BaseAPI {
103
147
  * Delete Many in Collection
104
148
  */
105
149
  deleteMany(requestParameters: DeleteManyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DeleteResponse>;
150
+ /**
151
+ * Creates request options for exportDocuments without sending the request
152
+ */
153
+ exportDocumentsRequestOpts(requestParameters: ExportDocumentsRequest): Promise<runtime.RequestOpts>;
154
+ /**
155
+ * Download the documents of a Collection as a stream: ndjson (one JSON document per line), json (one array) or csv (a header line, nested values as JSON, a text with a comma, a quote or a line break in quotes). The documents are written while the database delivers them, the memory of the server does not depend on the size of the Collection. The columns of a csv export are the fields of `projection`, by default the fields of the first 1000 documents. With extendedJson the types of the values are explicit. A failure while the stream is running ends the stream, the status is 200 by then.
156
+ * Export Documents of a Collection
157
+ */
158
+ exportDocumentsRaw(requestParameters: ExportDocumentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<string>>;
159
+ /**
160
+ * Download the documents of a Collection as a stream: ndjson (one JSON document per line), json (one array) or csv (a header line, nested values as JSON, a text with a comma, a quote or a line break in quotes). The documents are written while the database delivers them, the memory of the server does not depend on the size of the Collection. The columns of a csv export are the fields of `projection`, by default the fields of the first 1000 documents. With extendedJson the types of the values are explicit. A failure while the stream is running ends the stream, the status is 200 by then.
161
+ * Export Documents of a Collection
162
+ */
163
+ exportDocuments(requestParameters: ExportDocumentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<string>;
106
164
  /**
107
165
  * Creates request options for find without sending the request
108
166
  */
@@ -139,6 +197,20 @@ export declare class DocumentApi extends runtime.BaseAPI {
139
197
  getDocument(requestParameters: GetDocumentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{
140
198
  [key: string]: any;
141
199
  }>;
200
+ /**
201
+ * Creates request options for importDocuments without sending the request
202
+ */
203
+ importDocumentsRequestOpts(requestParameters: ImportDocumentsRequest): Promise<runtime.RequestOpts>;
204
+ /**
205
+ * Store the documents of the request body: one JSON document per line (NDJSON, as written by the export). A line is read like a document in the body of an insert (Extended JSON wrappers, dates). The body is read as a stream and the documents are stored in batches without ordering, a line that cannot be stored does not stop the others: the answer counts what was read, stored and failed and names the first failed lines (`errors`, `index` is the number of the line). The size of the body is limited by IMPORT_MAX_BYTES (413 above), there is no time limit.
206
+ * Import Documents into a Collection
207
+ */
208
+ importDocumentsRaw(requestParameters: ImportDocumentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ImportResponse>>;
209
+ /**
210
+ * Store the documents of the request body: one JSON document per line (NDJSON, as written by the export). A line is read like a document in the body of an insert (Extended JSON wrappers, dates). The body is read as a stream and the documents are stored in batches without ordering, a line that cannot be stored does not stop the others: the answer counts what was read, stored and failed and names the first failed lines (`errors`, `index` is the number of the line). The size of the body is limited by IMPORT_MAX_BYTES (413 above), there is no time limit.
211
+ * Import Documents into a Collection
212
+ */
213
+ importDocuments(requestParameters: ImportDocumentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ImportResponse>;
142
214
  /**
143
215
  * Creates request options for insert without sending the request
144
216
  */
@@ -185,6 +257,24 @@ export declare class DocumentApi extends runtime.BaseAPI {
185
257
  listDocuments(requestParameters: ListDocumentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<{
186
258
  [key: string]: any;
187
259
  }>>;
260
+ /**
261
+ * Creates request options for searchDocuments without sending the request
262
+ */
263
+ searchDocumentsRequestOpts(requestParameters: SearchDocumentsRequest): Promise<runtime.RequestOpts>;
264
+ /**
265
+ * The list of documents with the parameters in the request body: for filters that are too long for the URL (a URL of more than 2048 characters is refused by the server before the request is handled, without CORS headers). The filter is a Lucene query like in the list, the answer and the pagination headers are the same.
266
+ * Search Documents in Collection
267
+ */
268
+ searchDocumentsRaw(requestParameters: SearchDocumentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<{
269
+ [key: string]: any;
270
+ }>>>;
271
+ /**
272
+ * The list of documents with the parameters in the request body: for filters that are too long for the URL (a URL of more than 2048 characters is refused by the server before the request is handled, without CORS headers). The filter is a Lucene query like in the list, the answer and the pagination headers are the same.
273
+ * Search Documents in Collection
274
+ */
275
+ searchDocuments(requestParameters: SearchDocumentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<{
276
+ [key: string]: any;
277
+ }>>;
188
278
  /**
189
279
  * Creates request options for update without sending the request
190
280
  */