@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,8 +1,11 @@
1
1
  import * as runtime from "../runtime.js";
2
2
  import {
3
+ CountResponseFromJSON,
3
4
  DeleteResponseFromJSON,
5
+ ImportResponseFromJSON,
4
6
  InsertResponseFromJSON,
5
7
  MongoFindRequestToJSON,
8
+ SearchRequestToJSON,
6
9
  UpdateRequestToJSON,
7
10
  UpdateResponseFromJSON
8
11
  } from "../models/index.js";
@@ -65,6 +68,60 @@ export class DocumentApi extends runtime.BaseAPI {
65
68
  const response = await this._deleteRaw(requestParameters, initOverrides);
66
69
  return await response.value();
67
70
  }
71
+ /**
72
+ * Creates request options for countDocuments without sending the request
73
+ */
74
+ async countDocumentsRequestOpts(requestParameters) {
75
+ if (requestParameters["collectionName"] == null) {
76
+ throw new runtime.RequiredError(
77
+ "collectionName",
78
+ 'Required parameter "collectionName" was null or undefined when calling countDocuments().'
79
+ );
80
+ }
81
+ const queryParameters = {};
82
+ if (requestParameters["filter"] != null) {
83
+ queryParameters["filter"] = requestParameters["filter"];
84
+ }
85
+ const headerParameters = {};
86
+ if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
87
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
88
+ }
89
+ if (this.configuration && this.configuration.accessToken) {
90
+ const token = this.configuration.accessToken;
91
+ const tokenString = await token("httpAuth", []);
92
+ if (tokenString) {
93
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
94
+ }
95
+ }
96
+ if (this.configuration && this.configuration.apiKey) {
97
+ headerParameters["X-AUTH-APIKEY"] = await this.configuration.apiKey("X-AUTH-APIKEY");
98
+ }
99
+ let urlPath = `/mongodb/collections/{collectionName}/documents/count`;
100
+ urlPath = urlPath.replace(`{${"collectionName"}}`, encodeURIComponent(String(requestParameters["collectionName"])));
101
+ return {
102
+ path: urlPath,
103
+ method: "GET",
104
+ headers: headerParameters,
105
+ query: queryParameters
106
+ };
107
+ }
108
+ /**
109
+ * Count the Documents of the given Collection that match the filter without loading them
110
+ * Count Documents in Collection
111
+ */
112
+ async countDocumentsRaw(requestParameters, initOverrides) {
113
+ const requestOptions = await this.countDocumentsRequestOpts(requestParameters);
114
+ const response = await this.request(requestOptions, initOverrides);
115
+ return new runtime.JSONApiResponse(response, (jsonValue) => CountResponseFromJSON(jsonValue));
116
+ }
117
+ /**
118
+ * Count the Documents of the given Collection that match the filter without loading them
119
+ * Count Documents in Collection
120
+ */
121
+ async countDocuments(requestParameters, initOverrides) {
122
+ const response = await this.countDocumentsRaw(requestParameters, initOverrides);
123
+ return await response.value();
124
+ }
68
125
  /**
69
126
  * Creates request options for deleteMany without sending the request
70
127
  */
@@ -85,6 +142,9 @@ export class DocumentApi extends runtime.BaseAPI {
85
142
  if (requestParameters["matchAll"] != null) {
86
143
  queryParameters["matchAll"] = requestParameters["matchAll"];
87
144
  }
145
+ if (requestParameters["filter"] != null) {
146
+ queryParameters["filter"] = requestParameters["filter"];
147
+ }
88
148
  const headerParameters = {};
89
149
  headerParameters["Content-Type"] = "application/json";
90
150
  if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
@@ -127,6 +187,79 @@ export class DocumentApi extends runtime.BaseAPI {
127
187
  const response = await this.deleteManyRaw(requestParameters, initOverrides);
128
188
  return await response.value();
129
189
  }
190
+ /**
191
+ * Creates request options for exportDocuments without sending the request
192
+ */
193
+ async exportDocumentsRequestOpts(requestParameters) {
194
+ if (requestParameters["collectionName"] == null) {
195
+ throw new runtime.RequiredError(
196
+ "collectionName",
197
+ 'Required parameter "collectionName" was null or undefined when calling exportDocuments().'
198
+ );
199
+ }
200
+ const queryParameters = {};
201
+ if (requestParameters["format"] != null) {
202
+ queryParameters["format"] = requestParameters["format"];
203
+ }
204
+ if (requestParameters["filter"] != null) {
205
+ queryParameters["filter"] = requestParameters["filter"];
206
+ }
207
+ if (requestParameters["sort"] != null) {
208
+ queryParameters["sort"] = requestParameters["sort"];
209
+ }
210
+ if (requestParameters["projection"] != null) {
211
+ queryParameters["projection"] = requestParameters["projection"];
212
+ }
213
+ if (requestParameters["limit"] != null) {
214
+ queryParameters["limit"] = requestParameters["limit"];
215
+ }
216
+ if (requestParameters["extendedJson"] != null) {
217
+ queryParameters["extendedJson"] = requestParameters["extendedJson"];
218
+ }
219
+ const headerParameters = {};
220
+ if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
221
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
222
+ }
223
+ if (this.configuration && this.configuration.accessToken) {
224
+ const token = this.configuration.accessToken;
225
+ const tokenString = await token("httpAuth", []);
226
+ if (tokenString) {
227
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
228
+ }
229
+ }
230
+ if (this.configuration && this.configuration.apiKey) {
231
+ headerParameters["X-AUTH-APIKEY"] = await this.configuration.apiKey("X-AUTH-APIKEY");
232
+ }
233
+ let urlPath = `/mongodb/collections/{collectionName}/documents/export`;
234
+ urlPath = urlPath.replace(`{${"collectionName"}}`, encodeURIComponent(String(requestParameters["collectionName"])));
235
+ return {
236
+ path: urlPath,
237
+ method: "GET",
238
+ headers: headerParameters,
239
+ query: queryParameters
240
+ };
241
+ }
242
+ /**
243
+ * 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.
244
+ * Export Documents of a Collection
245
+ */
246
+ async exportDocumentsRaw(requestParameters, initOverrides) {
247
+ const requestOptions = await this.exportDocumentsRequestOpts(requestParameters);
248
+ const response = await this.request(requestOptions, initOverrides);
249
+ if (this.isJsonMime(response.headers.get("content-type"))) {
250
+ return new runtime.JSONApiResponse(response);
251
+ } else {
252
+ return new runtime.TextApiResponse(response);
253
+ }
254
+ }
255
+ /**
256
+ * 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.
257
+ * Export Documents of a Collection
258
+ */
259
+ async exportDocuments(requestParameters, initOverrides) {
260
+ const response = await this.exportDocumentsRaw(requestParameters, initOverrides);
261
+ return await response.value();
262
+ }
130
263
  /**
131
264
  * Creates request options for find without sending the request
132
265
  */
@@ -150,6 +283,9 @@ export class DocumentApi extends runtime.BaseAPI {
150
283
  if (requestParameters["page"] != null) {
151
284
  queryParameters["page"] = requestParameters["page"];
152
285
  }
286
+ if (requestParameters["extendedJson"] != null) {
287
+ queryParameters["extendedJson"] = requestParameters["extendedJson"];
288
+ }
153
289
  const headerParameters = {};
154
290
  headerParameters["Content-Type"] = "application/json";
155
291
  if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
@@ -209,6 +345,9 @@ export class DocumentApi extends runtime.BaseAPI {
209
345
  );
210
346
  }
211
347
  const queryParameters = {};
348
+ if (requestParameters["extendedJson"] != null) {
349
+ queryParameters["extendedJson"] = requestParameters["extendedJson"];
350
+ }
212
351
  const headerParameters = {};
213
352
  if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
214
353
  headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
@@ -250,6 +389,65 @@ export class DocumentApi extends runtime.BaseAPI {
250
389
  const response = await this.getDocumentRaw(requestParameters, initOverrides);
251
390
  return await response.value();
252
391
  }
392
+ /**
393
+ * Creates request options for importDocuments without sending the request
394
+ */
395
+ async importDocumentsRequestOpts(requestParameters) {
396
+ if (requestParameters["collectionName"] == null) {
397
+ throw new runtime.RequiredError(
398
+ "collectionName",
399
+ 'Required parameter "collectionName" was null or undefined when calling importDocuments().'
400
+ );
401
+ }
402
+ if (requestParameters["body"] == null) {
403
+ throw new runtime.RequiredError(
404
+ "body",
405
+ 'Required parameter "body" was null or undefined when calling importDocuments().'
406
+ );
407
+ }
408
+ const queryParameters = {};
409
+ const headerParameters = {};
410
+ headerParameters["Content-Type"] = "text/plain";
411
+ if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
412
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
413
+ }
414
+ if (this.configuration && this.configuration.accessToken) {
415
+ const token = this.configuration.accessToken;
416
+ const tokenString = await token("httpAuth", []);
417
+ if (tokenString) {
418
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
419
+ }
420
+ }
421
+ if (this.configuration && this.configuration.apiKey) {
422
+ headerParameters["X-AUTH-APIKEY"] = await this.configuration.apiKey("X-AUTH-APIKEY");
423
+ }
424
+ let urlPath = `/mongodb/collections/{collectionName}/documents/import`;
425
+ urlPath = urlPath.replace(`{${"collectionName"}}`, encodeURIComponent(String(requestParameters["collectionName"])));
426
+ return {
427
+ path: urlPath,
428
+ method: "POST",
429
+ headers: headerParameters,
430
+ query: queryParameters,
431
+ body: requestParameters["body"]
432
+ };
433
+ }
434
+ /**
435
+ * 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.
436
+ * Import Documents into a Collection
437
+ */
438
+ async importDocumentsRaw(requestParameters, initOverrides) {
439
+ const requestOptions = await this.importDocumentsRequestOpts(requestParameters);
440
+ const response = await this.request(requestOptions, initOverrides);
441
+ return new runtime.JSONApiResponse(response, (jsonValue) => ImportResponseFromJSON(jsonValue));
442
+ }
443
+ /**
444
+ * 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.
445
+ * Import Documents into a Collection
446
+ */
447
+ async importDocuments(requestParameters, initOverrides) {
448
+ const response = await this.importDocumentsRaw(requestParameters, initOverrides);
449
+ return await response.value();
450
+ }
253
451
  /**
254
452
  * Creates request options for insert without sending the request
255
453
  */
@@ -320,6 +518,9 @@ export class DocumentApi extends runtime.BaseAPI {
320
518
  );
321
519
  }
322
520
  const queryParameters = {};
521
+ if (requestParameters["ordered"] != null) {
522
+ queryParameters["ordered"] = requestParameters["ordered"];
523
+ }
323
524
  const headerParameters = {};
324
525
  headerParameters["Content-Type"] = "application/json";
325
526
  if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
@@ -388,6 +589,9 @@ export class DocumentApi extends runtime.BaseAPI {
388
589
  if (requestParameters["page"] != null) {
389
590
  queryParameters["page"] = requestParameters["page"];
390
591
  }
592
+ if (requestParameters["extendedJson"] != null) {
593
+ queryParameters["extendedJson"] = requestParameters["extendedJson"];
594
+ }
391
595
  const headerParameters = {};
392
596
  if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
393
597
  headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
@@ -428,6 +632,74 @@ export class DocumentApi extends runtime.BaseAPI {
428
632
  const response = await this.listDocumentsRaw(requestParameters, initOverrides);
429
633
  return await response.value();
430
634
  }
635
+ /**
636
+ * Creates request options for searchDocuments without sending the request
637
+ */
638
+ async searchDocumentsRequestOpts(requestParameters) {
639
+ if (requestParameters["collectionName"] == null) {
640
+ throw new runtime.RequiredError(
641
+ "collectionName",
642
+ 'Required parameter "collectionName" was null or undefined when calling searchDocuments().'
643
+ );
644
+ }
645
+ if (requestParameters["searchRequest"] == null) {
646
+ throw new runtime.RequiredError(
647
+ "searchRequest",
648
+ 'Required parameter "searchRequest" was null or undefined when calling searchDocuments().'
649
+ );
650
+ }
651
+ const queryParameters = {};
652
+ if (requestParameters["rowsPerPage"] != null) {
653
+ queryParameters["rowsPerPage"] = requestParameters["rowsPerPage"];
654
+ }
655
+ if (requestParameters["page"] != null) {
656
+ queryParameters["page"] = requestParameters["page"];
657
+ }
658
+ if (requestParameters["extendedJson"] != null) {
659
+ queryParameters["extendedJson"] = requestParameters["extendedJson"];
660
+ }
661
+ const headerParameters = {};
662
+ headerParameters["Content-Type"] = "application/json";
663
+ if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
664
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
665
+ }
666
+ if (this.configuration && this.configuration.accessToken) {
667
+ const token = this.configuration.accessToken;
668
+ const tokenString = await token("httpAuth", []);
669
+ if (tokenString) {
670
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
671
+ }
672
+ }
673
+ if (this.configuration && this.configuration.apiKey) {
674
+ headerParameters["X-AUTH-APIKEY"] = await this.configuration.apiKey("X-AUTH-APIKEY");
675
+ }
676
+ let urlPath = `/mongodb/collections/{collectionName}/documents/search`;
677
+ urlPath = urlPath.replace(`{${"collectionName"}}`, encodeURIComponent(String(requestParameters["collectionName"])));
678
+ return {
679
+ path: urlPath,
680
+ method: "POST",
681
+ headers: headerParameters,
682
+ query: queryParameters,
683
+ body: SearchRequestToJSON(requestParameters["searchRequest"])
684
+ };
685
+ }
686
+ /**
687
+ * 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.
688
+ * Search Documents in Collection
689
+ */
690
+ async searchDocumentsRaw(requestParameters, initOverrides) {
691
+ const requestOptions = await this.searchDocumentsRequestOpts(requestParameters);
692
+ const response = await this.request(requestOptions, initOverrides);
693
+ return new runtime.JSONApiResponse(response);
694
+ }
695
+ /**
696
+ * 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.
697
+ * Search Documents in Collection
698
+ */
699
+ async searchDocuments(requestParameters, initOverrides) {
700
+ const response = await this.searchDocumentsRaw(requestParameters, initOverrides);
701
+ return await response.value();
702
+ }
431
703
  /**
432
704
  * Creates request options for update without sending the request
433
705
  */
@@ -580,6 +852,9 @@ export class DocumentApi extends runtime.BaseAPI {
580
852
  if (requestParameters["matchAll"] != null) {
581
853
  queryParameters["matchAll"] = requestParameters["matchAll"];
582
854
  }
855
+ if (requestParameters["filter"] != null) {
856
+ queryParameters["filter"] = requestParameters["filter"];
857
+ }
583
858
  const headerParameters = {};
584
859
  headerParameters["Content-Type"] = "application/json";
585
860
  if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
@@ -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,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime.js';
13
- import type { IndexCreateRequest, IndexCreateResponse, IndexDropResponse, IndexOptionsRequest, MongoIndex } from '../models/index.js';
13
+ import type { IndexCreateRequest, IndexCreateResponse, IndexDropResponse, IndexInfo, IndexOptionsRequest, IndexUsage, MongoIndex } from '../models/index.js';
14
14
  export interface CreateExpiringIndexRequest {
15
15
  collectionName: string;
16
16
  fieldName: string;
@@ -47,6 +47,12 @@ export interface IndexRequest {
47
47
  collectionName: string;
48
48
  indexName: string;
49
49
  }
50
+ export interface IndexDetailsRequest {
51
+ collectionName: string;
52
+ }
53
+ export interface IndexStatsRequest {
54
+ collectionName: string;
55
+ }
50
56
  export interface ListIndicesRequest {
51
57
  collectionName: string;
52
58
  }
@@ -152,6 +158,34 @@ export declare class IndexApi extends runtime.BaseAPI {
152
158
  * Index for Collection
153
159
  */
154
160
  index(requestParameters: IndexRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<MongoIndex>;
161
+ /**
162
+ * Creates request options for indexDetails without sending the request
163
+ */
164
+ indexDetailsRequestOpts(requestParameters: IndexDetailsRequest): Promise<runtime.RequestOpts>;
165
+ /**
166
+ * All Indices of the given Collection as the database reports them: the keys in the order of the index (`direction` is 1, -1 or the type of the key, a text index lists its fields), unique, sparse, hidden, partial filter, collation, weights, default language and expiration.
167
+ * Indices with details for Collection
168
+ */
169
+ indexDetailsRaw(requestParameters: IndexDetailsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<IndexInfo>>>;
170
+ /**
171
+ * All Indices of the given Collection as the database reports them: the keys in the order of the index (`direction` is 1, -1 or the type of the key, a text index lists its fields), unique, sparse, hidden, partial filter, collation, weights, default language and expiration.
172
+ * Indices with details for Collection
173
+ */
174
+ indexDetails(requestParameters: IndexDetailsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<IndexInfo>>;
175
+ /**
176
+ * Creates request options for indexStats without sending the request
177
+ */
178
+ indexStatsRequestOpts(requestParameters: IndexStatsRequest): Promise<runtime.RequestOpts>;
179
+ /**
180
+ * How often every Index of the given Collection was used since the counting started. Replaces the aggregation stage $indexStats, which is denied by default because its result contains the address of the database server.
181
+ * Index usage for Collection
182
+ */
183
+ indexStatsRaw(requestParameters: IndexStatsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<IndexUsage>>>;
184
+ /**
185
+ * How often every Index of the given Collection was used since the counting started. Replaces the aggregation stage $indexStats, which is denied by default because its result contains the address of the database server.
186
+ * Index usage for Collection
187
+ */
188
+ indexStats(requestParameters: IndexStatsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<IndexUsage>>;
155
189
  /**
156
190
  * Creates request options for listIndices without sending the request
157
191
  */
@@ -3,7 +3,9 @@ import {
3
3
  IndexCreateRequestToJSON,
4
4
  IndexCreateResponseFromJSON,
5
5
  IndexDropResponseFromJSON,
6
+ IndexInfoFromJSON,
6
7
  IndexOptionsRequestToJSON,
8
+ IndexUsageFromJSON,
7
9
  MongoIndexFromJSON
8
10
  } from "../models/index.js";
9
11
  export class IndexApi extends runtime.BaseAPI {
@@ -440,6 +442,108 @@ export class IndexApi extends runtime.BaseAPI {
440
442
  const response = await this.indexRaw(requestParameters, initOverrides);
441
443
  return await response.value();
442
444
  }
445
+ /**
446
+ * Creates request options for indexDetails without sending the request
447
+ */
448
+ async indexDetailsRequestOpts(requestParameters) {
449
+ if (requestParameters["collectionName"] == null) {
450
+ throw new runtime.RequiredError(
451
+ "collectionName",
452
+ 'Required parameter "collectionName" was null or undefined when calling indexDetails().'
453
+ );
454
+ }
455
+ const queryParameters = {};
456
+ const headerParameters = {};
457
+ if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
458
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
459
+ }
460
+ if (this.configuration && this.configuration.accessToken) {
461
+ const token = this.configuration.accessToken;
462
+ const tokenString = await token("httpAuth", []);
463
+ if (tokenString) {
464
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
465
+ }
466
+ }
467
+ if (this.configuration && this.configuration.apiKey) {
468
+ headerParameters["X-AUTH-APIKEY"] = await this.configuration.apiKey("X-AUTH-APIKEY");
469
+ }
470
+ let urlPath = `/mongodb/collections/{collectionName}/index/details`;
471
+ urlPath = urlPath.replace(`{${"collectionName"}}`, encodeURIComponent(String(requestParameters["collectionName"])));
472
+ return {
473
+ path: urlPath,
474
+ method: "GET",
475
+ headers: headerParameters,
476
+ query: queryParameters
477
+ };
478
+ }
479
+ /**
480
+ * All Indices of the given Collection as the database reports them: the keys in the order of the index (`direction` is 1, -1 or the type of the key, a text index lists its fields), unique, sparse, hidden, partial filter, collation, weights, default language and expiration.
481
+ * Indices with details for Collection
482
+ */
483
+ async indexDetailsRaw(requestParameters, initOverrides) {
484
+ const requestOptions = await this.indexDetailsRequestOpts(requestParameters);
485
+ const response = await this.request(requestOptions, initOverrides);
486
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(IndexInfoFromJSON));
487
+ }
488
+ /**
489
+ * All Indices of the given Collection as the database reports them: the keys in the order of the index (`direction` is 1, -1 or the type of the key, a text index lists its fields), unique, sparse, hidden, partial filter, collation, weights, default language and expiration.
490
+ * Indices with details for Collection
491
+ */
492
+ async indexDetails(requestParameters, initOverrides) {
493
+ const response = await this.indexDetailsRaw(requestParameters, initOverrides);
494
+ return await response.value();
495
+ }
496
+ /**
497
+ * Creates request options for indexStats without sending the request
498
+ */
499
+ async indexStatsRequestOpts(requestParameters) {
500
+ if (requestParameters["collectionName"] == null) {
501
+ throw new runtime.RequiredError(
502
+ "collectionName",
503
+ 'Required parameter "collectionName" was null or undefined when calling indexStats().'
504
+ );
505
+ }
506
+ const queryParameters = {};
507
+ const headerParameters = {};
508
+ if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
509
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
510
+ }
511
+ if (this.configuration && this.configuration.accessToken) {
512
+ const token = this.configuration.accessToken;
513
+ const tokenString = await token("httpAuth", []);
514
+ if (tokenString) {
515
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
516
+ }
517
+ }
518
+ if (this.configuration && this.configuration.apiKey) {
519
+ headerParameters["X-AUTH-APIKEY"] = await this.configuration.apiKey("X-AUTH-APIKEY");
520
+ }
521
+ let urlPath = `/mongodb/collections/{collectionName}/index/stats`;
522
+ urlPath = urlPath.replace(`{${"collectionName"}}`, encodeURIComponent(String(requestParameters["collectionName"])));
523
+ return {
524
+ path: urlPath,
525
+ method: "GET",
526
+ headers: headerParameters,
527
+ query: queryParameters
528
+ };
529
+ }
530
+ /**
531
+ * How often every Index of the given Collection was used since the counting started. Replaces the aggregation stage $indexStats, which is denied by default because its result contains the address of the database server.
532
+ * Index usage for Collection
533
+ */
534
+ async indexStatsRaw(requestParameters, initOverrides) {
535
+ const requestOptions = await this.indexStatsRequestOpts(requestParameters);
536
+ const response = await this.request(requestOptions, initOverrides);
537
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(IndexUsageFromJSON));
538
+ }
539
+ /**
540
+ * How often every Index of the given Collection was used since the counting started. Replaces the aggregation stage $indexStats, which is denied by default because its result contains the address of the database server.
541
+ * Index usage for Collection
542
+ */
543
+ async indexStats(requestParameters, initOverrides) {
544
+ const response = await this.indexStatsRaw(requestParameters, initOverrides);
545
+ return await response.value();
546
+ }
443
547
  /**
444
548
  * Creates request options for listIndices without sending the request
445
549
  */
@@ -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).
@@ -11,6 +11,7 @@ All URIs are relative to *http://localhost*
11
11
  | [**logoutByDelete**](AuthApi.md#logoutbydelete) | **DELETE** /auth/logout | Logout User |
12
12
  | [**refreshToken**](AuthApi.md#refreshtoken) | **GET** /auth/token/refresh | Refresh User |
13
13
  | [**updatePassword**](AuthApi.md#updatepassword) | **PATCH** /auth/profile/password | Update Password |
14
+ | [**userPermissions**](AuthApi.md#userpermissions) | **GET** /auth/permissions | Collection permissions |
14
15
  | [**userProfile**](AuthApi.md#userprofile) | **GET** /auth/profile | User Profile |
15
16
 
16
17
 
@@ -507,6 +508,83 @@ example().catch(console.error);
507
508
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
508
509
 
509
510
 
511
+ ## userPermissions
512
+
513
+ > Array&lt;CollectionPermission&gt; userPermissions(collection)
514
+
515
+ Collection permissions
516
+
517
+ Return the resolved rights (read, write, administrate) of the loggedin user for the collections of the default database
518
+
519
+ ### Example
520
+
521
+ ```ts
522
+ import {
523
+ Configuration,
524
+ AuthApi,
525
+ } from '';
526
+ import type { UserPermissionsRequest } from '';
527
+
528
+ async function example() {
529
+ console.log("🚀 Testing SDK...");
530
+ const config = new Configuration({
531
+ // To configure HTTP basic authorization: httpAuth1
532
+ username: "YOUR USERNAME",
533
+ password: "YOUR PASSWORD",
534
+ // Configure HTTP bearer authorization: httpAuth
535
+ accessToken: "YOUR BEARER TOKEN",
536
+ // To configure API key authorization: apiKeyAuth
537
+ apiKey: "YOUR API KEY",
538
+ });
539
+ const api = new AuthApi(config);
540
+
541
+ const body = {
542
+ // string | Resolve the rights for this collection only (also if the user has none) (optional)
543
+ collection: collection_example,
544
+ } satisfies UserPermissionsRequest;
545
+
546
+ try {
547
+ const data = await api.userPermissions(body);
548
+ console.log(data);
549
+ } catch (error) {
550
+ console.error(error);
551
+ }
552
+ }
553
+
554
+ // Run the test
555
+ example().catch(console.error);
556
+ ```
557
+
558
+ ### Parameters
559
+
560
+
561
+ | Name | Type | Description | Notes |
562
+ |------------- | ------------- | ------------- | -------------|
563
+ | **collection** | `string` | Resolve the rights for this collection only (also if the user has none) | [Optional] [Defaults to `undefined`] |
564
+
565
+ ### Return type
566
+
567
+ [**Array&lt;CollectionPermission&gt;**](CollectionPermission.md)
568
+
569
+ ### Authorization
570
+
571
+ [httpAuth1](../README.md#httpAuth1), [httpAuth](../README.md#httpAuth), [apiKeyAuth](../README.md#apiKeyAuth)
572
+
573
+ ### HTTP request headers
574
+
575
+ - **Content-Type**: Not defined
576
+ - **Accept**: `application/json`
577
+
578
+
579
+ ### HTTP response details
580
+ | Status code | Description | Response headers |
581
+ |-------------|-------------|------------------|
582
+ | **200** | | - |
583
+ | **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> |
584
+
585
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
586
+
587
+
510
588
  ## userProfile
511
589
 
512
590
  > UserProfile userProfile()