@sfxcode/nuxt-mongocamp-server 1.9.0 → 1.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/module.mjs +1 -1
  3. package/dist/runtime/api/.openapi-generator/FILES +20 -0
  4. package/dist/runtime/api/apis/AdminApi.d.ts +1 -1
  5. package/dist/runtime/api/apis/ApplicationApi.d.ts +1 -1
  6. package/dist/runtime/api/apis/AuthApi.d.ts +1 -1
  7. package/dist/runtime/api/apis/BucketApi.d.ts +1 -1
  8. package/dist/runtime/api/apis/CollectionApi.d.ts +78 -4
  9. package/dist/runtime/api/apis/CollectionApi.js +175 -2
  10. package/dist/runtime/api/apis/DatabaseApi.d.ts +1 -1
  11. package/dist/runtime/api/apis/DocumentApi.d.ts +1 -1
  12. package/dist/runtime/api/apis/FileApi.d.ts +1 -1
  13. package/dist/runtime/api/apis/IndexApi.d.ts +1 -1
  14. package/dist/runtime/api/apis/JobsApi.d.ts +1 -1
  15. package/dist/runtime/api/apis/SystemApi.d.ts +46 -1
  16. package/dist/runtime/api/apis/SystemApi.js +141 -0
  17. package/dist/runtime/api/docs/Capabilities.md +42 -0
  18. package/dist/runtime/api/docs/CapabilityLimits.md +36 -0
  19. package/dist/runtime/api/docs/CollectionApi.md +249 -4
  20. package/dist/runtime/api/docs/CollectionCollation.md +40 -0
  21. package/dist/runtime/api/docs/CollectionOptions.md +46 -0
  22. package/dist/runtime/api/docs/ConnectionStats.md +38 -0
  23. package/dist/runtime/api/docs/CreateCollectionResponse.md +34 -0
  24. package/dist/runtime/api/docs/DocumentApi.md +1 -1
  25. package/dist/runtime/api/docs/OpCounters.md +44 -0
  26. package/dist/runtime/api/docs/ReplicaSetState.md +40 -0
  27. package/dist/runtime/api/docs/SystemApi.md +210 -0
  28. package/dist/runtime/api/docs/SystemInfo.md +36 -0
  29. package/dist/runtime/api/docs/SystemStats.md +42 -0
  30. package/dist/runtime/api/models/BucketInformation.d.ts +1 -1
  31. package/dist/runtime/api/models/Capabilities.d.ts +47 -0
  32. package/dist/runtime/api/models/Capabilities.js +39 -0
  33. package/dist/runtime/api/models/CapabilityLimits.d.ts +34 -0
  34. package/dist/runtime/api/models/CapabilityLimits.js +29 -0
  35. package/dist/runtime/api/models/ClusterInformation.d.ts +1 -1
  36. package/dist/runtime/api/models/ClusterMemberInformation.d.ts +1 -1
  37. package/dist/runtime/api/models/CollectionCollation.d.ts +42 -0
  38. package/dist/runtime/api/models/CollectionCollation.js +32 -0
  39. package/dist/runtime/api/models/CollectionOptions.d.ts +57 -0
  40. package/dist/runtime/api/models/CollectionOptions.js +41 -0
  41. package/dist/runtime/api/models/CollectionPermission.d.ts +1 -1
  42. package/dist/runtime/api/models/CollectionStatus.d.ts +1 -1
  43. package/dist/runtime/api/models/CollectionSummary.d.ts +1 -1
  44. package/dist/runtime/api/models/ConnectionStats.d.ts +38 -0
  45. package/dist/runtime/api/models/ConnectionStats.js +32 -0
  46. package/dist/runtime/api/models/CopyRequest.d.ts +1 -1
  47. package/dist/runtime/api/models/CopyResponse.d.ts +1 -1
  48. package/dist/runtime/api/models/CountResponse.d.ts +1 -1
  49. package/dist/runtime/api/models/CreateCollectionResponse.d.ts +30 -0
  50. package/dist/runtime/api/models/CreateCollectionResponse.js +26 -0
  51. package/dist/runtime/api/models/DatabaseInfo.d.ts +1 -1
  52. package/dist/runtime/api/models/DeleteResponse.d.ts +1 -1
  53. package/dist/runtime/api/models/ErrorDescription.d.ts +1 -1
  54. package/dist/runtime/api/models/FieldInfo.d.ts +1 -1
  55. package/dist/runtime/api/models/FieldTypeCount.d.ts +1 -1
  56. package/dist/runtime/api/models/FileInformation.d.ts +1 -1
  57. package/dist/runtime/api/models/Grant.d.ts +1 -1
  58. package/dist/runtime/api/models/ImportResponse.d.ts +1 -1
  59. package/dist/runtime/api/models/IndexCreateRequest.d.ts +1 -1
  60. package/dist/runtime/api/models/IndexCreateResponse.d.ts +1 -1
  61. package/dist/runtime/api/models/IndexDropResponse.d.ts +1 -1
  62. package/dist/runtime/api/models/IndexInfo.d.ts +1 -1
  63. package/dist/runtime/api/models/IndexKey.d.ts +1 -1
  64. package/dist/runtime/api/models/IndexOptionsRequest.d.ts +1 -1
  65. package/dist/runtime/api/models/IndexUsage.d.ts +1 -1
  66. package/dist/runtime/api/models/InsertError.d.ts +1 -1
  67. package/dist/runtime/api/models/InsertResponse.d.ts +1 -1
  68. package/dist/runtime/api/models/JobConfig.d.ts +1 -1
  69. package/dist/runtime/api/models/JobInformation.d.ts +1 -1
  70. package/dist/runtime/api/models/JsonSchema.d.ts +1 -1
  71. package/dist/runtime/api/models/JsonSchemaDefinition.d.ts +1 -1
  72. package/dist/runtime/api/models/JsonValueAny.d.ts +1 -1
  73. package/dist/runtime/api/models/JsonValueBoolean.d.ts +1 -1
  74. package/dist/runtime/api/models/JsonValueString.d.ts +1 -1
  75. package/dist/runtime/api/models/Login.d.ts +1 -1
  76. package/dist/runtime/api/models/LoginResult.d.ts +1 -1
  77. package/dist/runtime/api/models/MongoAggregateRequest.d.ts +1 -1
  78. package/dist/runtime/api/models/MongoCampConfiguration.d.ts +1 -1
  79. package/dist/runtime/api/models/MongoFindRequest.d.ts +1 -1
  80. package/dist/runtime/api/models/MongoIndex.d.ts +1 -1
  81. package/dist/runtime/api/models/OpCounters.d.ts +50 -0
  82. package/dist/runtime/api/models/OpCounters.js +41 -0
  83. package/dist/runtime/api/models/PasswordUpdateRequest.d.ts +1 -1
  84. package/dist/runtime/api/models/PipelineStage.d.ts +1 -1
  85. package/dist/runtime/api/models/RenameRequest.d.ts +1 -1
  86. package/dist/runtime/api/models/RenameResponse.d.ts +1 -1
  87. package/dist/runtime/api/models/ReplicaSetState.d.ts +42 -0
  88. package/dist/runtime/api/models/ReplicaSetState.js +35 -0
  89. package/dist/runtime/api/models/Role.d.ts +1 -1
  90. package/dist/runtime/api/models/SchemaAnalysis.d.ts +1 -1
  91. package/dist/runtime/api/models/SchemaAnalysisField.d.ts +1 -1
  92. package/dist/runtime/api/models/SchemaAnalysisFieldType.d.ts +1 -1
  93. package/dist/runtime/api/models/SearchRequest.d.ts +1 -1
  94. package/dist/runtime/api/models/SettingsResponse.d.ts +1 -1
  95. package/dist/runtime/api/models/SystemInfo.d.ts +34 -0
  96. package/dist/runtime/api/models/SystemInfo.js +28 -0
  97. package/dist/runtime/api/models/SystemStats.d.ts +49 -0
  98. package/dist/runtime/api/models/SystemStats.js +46 -0
  99. package/dist/runtime/api/models/UpdateFileInformationRequest.d.ts +1 -1
  100. package/dist/runtime/api/models/UpdateRequest.d.ts +1 -1
  101. package/dist/runtime/api/models/UpdateResponse.d.ts +1 -1
  102. package/dist/runtime/api/models/UpdateRoleRequest.d.ts +1 -1
  103. package/dist/runtime/api/models/UserInformation.d.ts +1 -1
  104. package/dist/runtime/api/models/UserProfile.d.ts +1 -1
  105. package/dist/runtime/api/models/Version.d.ts +1 -1
  106. package/dist/runtime/api/models/index.d.ts +10 -0
  107. package/dist/runtime/api/models/index.js +10 -0
  108. package/dist/runtime/api/runtime.d.ts +1 -1
  109. package/dist/runtime/composables/mongocampStorage.d.ts +7 -1
  110. package/dist/runtime/composables/mongocampStorage.js +12 -8
  111. package/package.json +2 -2
package/dist/module.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sfxcode/nuxt-mongocamp-server",
3
- "version": "1.9.0",
3
+ "version": "1.9.1",
4
4
  "configKey": "mongocamp",
5
5
  "compatibility": {
6
6
  "nuxt": ">=3.16.0"
package/dist/module.mjs CHANGED
@@ -4,7 +4,7 @@ import { consola } from 'consola';
4
4
  export * from '../dist/runtime/api/index.js';
5
5
 
6
6
  const name = "@sfxcode/nuxt-mongocamp-server";
7
- const version = "1.9.0";
7
+ const version = "1.9.1";
8
8
 
9
9
  const module$1 = defineNuxtModule({
10
10
  meta: {
@@ -15,15 +15,21 @@ docs/ApplicationApi.md
15
15
  docs/AuthApi.md
16
16
  docs/BucketApi.md
17
17
  docs/BucketInformation.md
18
+ docs/Capabilities.md
19
+ docs/CapabilityLimits.md
18
20
  docs/ClusterInformation.md
19
21
  docs/ClusterMemberInformation.md
20
22
  docs/CollectionApi.md
23
+ docs/CollectionCollation.md
24
+ docs/CollectionOptions.md
21
25
  docs/CollectionPermission.md
22
26
  docs/CollectionStatus.md
23
27
  docs/CollectionSummary.md
28
+ docs/ConnectionStats.md
24
29
  docs/CopyRequest.md
25
30
  docs/CopyResponse.md
26
31
  docs/CountResponse.md
32
+ docs/CreateCollectionResponse.md
27
33
  docs/DatabaseApi.md
28
34
  docs/DatabaseInfo.md
29
35
  docs/DeleteResponse.md
@@ -59,10 +65,12 @@ docs/MongoAggregateRequest.md
59
65
  docs/MongoCampConfiguration.md
60
66
  docs/MongoFindRequest.md
61
67
  docs/MongoIndex.md
68
+ docs/OpCounters.md
62
69
  docs/PasswordUpdateRequest.md
63
70
  docs/PipelineStage.md
64
71
  docs/RenameRequest.md
65
72
  docs/RenameResponse.md
73
+ docs/ReplicaSetState.md
66
74
  docs/Role.md
67
75
  docs/SchemaAnalysis.md
68
76
  docs/SchemaAnalysisField.md
@@ -70,6 +78,8 @@ docs/SchemaAnalysisFieldType.md
70
78
  docs/SearchRequest.md
71
79
  docs/SettingsResponse.md
72
80
  docs/SystemApi.md
81
+ docs/SystemInfo.md
82
+ docs/SystemStats.md
73
83
  docs/UpdateFileInformationRequest.md
74
84
  docs/UpdateRequest.md
75
85
  docs/UpdateResponse.md
@@ -79,14 +89,20 @@ docs/UserProfile.md
79
89
  docs/Version.md
80
90
  index.ts
81
91
  models/BucketInformation.ts
92
+ models/Capabilities.ts
93
+ models/CapabilityLimits.ts
82
94
  models/ClusterInformation.ts
83
95
  models/ClusterMemberInformation.ts
96
+ models/CollectionCollation.ts
97
+ models/CollectionOptions.ts
84
98
  models/CollectionPermission.ts
85
99
  models/CollectionStatus.ts
86
100
  models/CollectionSummary.ts
101
+ models/ConnectionStats.ts
87
102
  models/CopyRequest.ts
88
103
  models/CopyResponse.ts
89
104
  models/CountResponse.ts
105
+ models/CreateCollectionResponse.ts
90
106
  models/DatabaseInfo.ts
91
107
  models/DeleteResponse.ts
92
108
  models/ErrorDescription.ts
@@ -117,16 +133,20 @@ models/MongoAggregateRequest.ts
117
133
  models/MongoCampConfiguration.ts
118
134
  models/MongoFindRequest.ts
119
135
  models/MongoIndex.ts
136
+ models/OpCounters.ts
120
137
  models/PasswordUpdateRequest.ts
121
138
  models/PipelineStage.ts
122
139
  models/RenameRequest.ts
123
140
  models/RenameResponse.ts
141
+ models/ReplicaSetState.ts
124
142
  models/Role.ts
125
143
  models/SchemaAnalysis.ts
126
144
  models/SchemaAnalysisField.ts
127
145
  models/SchemaAnalysisFieldType.ts
128
146
  models/SearchRequest.ts
129
147
  models/SettingsResponse.ts
148
+ models/SystemInfo.ts
149
+ models/SystemStats.ts
130
150
  models/UpdateFileInformationRequest.ts
131
151
  models/UpdateRequest.ts
132
152
  models/UpdateResponse.ts
@@ -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.8.2
5
+ * The version of the OpenAPI document: 1.9.0
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.8.2
5
+ * The version of the OpenAPI document: 1.9.0
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.8.2
5
+ * The version of the OpenAPI document: 1.9.0
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.8.2
5
+ * The version of the OpenAPI document: 1.9.0
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.8.2
5
+ * The version of the OpenAPI document: 1.9.0
6
6
  *
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -10,10 +10,12 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime.js';
13
+ import { type CollectionOptions } from '../models/CollectionOptions.js';
13
14
  import { type CollectionStatus } from '../models/CollectionStatus.js';
14
15
  import { type CollectionSummary } from '../models/CollectionSummary.js';
15
16
  import { type CopyRequest } from '../models/CopyRequest.js';
16
17
  import { type CopyResponse } from '../models/CopyResponse.js';
18
+ import { type CreateCollectionResponse } from '../models/CreateCollectionResponse.js';
17
19
  import { type FieldInfo } from '../models/FieldInfo.js';
18
20
  import { type JsonSchema } from '../models/JsonSchema.js';
19
21
  import { type JsonValueBoolean } from '../models/JsonValueBoolean.js';
@@ -63,6 +65,16 @@ export interface CopyCollectionRequest {
63
65
  */
64
66
  copyRequest: CopyRequest;
65
67
  }
68
+ export interface CreateCollectionRequest {
69
+ /**
70
+ * The name of your MongoDb Collection
71
+ */
72
+ collectionName: string;
73
+ /**
74
+ * The options of the new Collection, all of them are optional
75
+ */
76
+ collectionOptions?: CollectionOptions;
77
+ }
66
78
  export interface DeleteCollectionRequest {
67
79
  /**
68
80
  * The name of your MongoDb Collection
@@ -107,6 +119,12 @@ export interface GetCollectionInformationRequest {
107
119
  */
108
120
  includeDetails?: boolean;
109
121
  }
122
+ export interface GetCollectionOptionsRequest {
123
+ /**
124
+ * The name of your MongoDb Collection
125
+ */
126
+ collectionName: string;
127
+ }
110
128
  export interface GetFieldDetailsRequest {
111
129
  /**
112
130
  * The name of your MongoDb Collection
@@ -151,9 +169,13 @@ export interface GetSchemaAnalysisRequest {
151
169
  }
152
170
  export interface ListCollectionInformationRequest {
153
171
  /**
154
- * Only the Collections with these names, by default all Collections that the user may read
172
+ * Only the Collections with these names, by default all Collections that the user may read. With `database` the names are the names inside that database (`locations`), the full name (`geodata:locations`) of that database is accepted too.
155
173
  */
156
174
  name?: Array<string>;
175
+ /**
176
+ * The Collections of this database, by default the default database. The names in the answer are the full names (`geodata:locations`), as they are used in the paths of the other routes.
177
+ */
178
+ database?: string;
157
179
  }
158
180
  export interface ListCollectionsByDatabaseRequest {
159
181
  /**
@@ -161,6 +183,16 @@ export interface ListCollectionsByDatabaseRequest {
161
183
  */
162
184
  databaseName: string;
163
185
  }
186
+ export interface ModifyCollectionOptionsRequest {
187
+ /**
188
+ * The name of your MongoDb Collection
189
+ */
190
+ collectionName: string;
191
+ /**
192
+ *
193
+ */
194
+ collectionOptions: CollectionOptions;
195
+ }
164
196
  export interface RenameCollectionRequest {
165
197
  /**
166
198
  * The name of your MongoDb Collection
@@ -221,6 +253,20 @@ export declare class CollectionApi extends runtime.BaseAPI {
221
253
  * Copy Collection
222
254
  */
223
255
  copyCollection(requestParameters: CopyCollectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CopyResponse>;
256
+ /**
257
+ * Creates request options for createCollection without sending the request
258
+ */
259
+ createCollectionRequestOpts(requestParameters: CreateCollectionRequest): Promise<runtime.RequestOpts>;
260
+ /**
261
+ * Create a Collection with options: capped (`capped`, `sizeInBytes`, `maxDocuments`), a validator (`validator`, `validationLevel` off, moderate or strict, `validationAction` error or warn) and a collation. Without a body an empty Collection is created. The administrate grant for the name is needed; a name of another database is `database:name`. An existing Collection is a conflict (409), reserved names (system collections, the prefix of the server, the collections of a bucket) and options that do not fit are 400.
262
+ * Create Collection
263
+ */
264
+ createCollectionRaw(requestParameters: CreateCollectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CreateCollectionResponse>>;
265
+ /**
266
+ * Create a Collection with options: capped (`capped`, `sizeInBytes`, `maxDocuments`), a validator (`validator`, `validationLevel` off, moderate or strict, `validationAction` error or warn) and a collation. Without a body an empty Collection is created. The administrate grant for the name is needed; a name of another database is `database:name`. An existing Collection is a conflict (409), reserved names (system collections, the prefix of the server, the collections of a bucket) and options that do not fit are 400.
267
+ * Create Collection
268
+ */
269
+ createCollection(requestParameters: CreateCollectionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CreateCollectionResponse>;
224
270
  /**
225
271
  * Creates request options for deleteCollection without sending the request
226
272
  */
@@ -277,6 +323,20 @@ export declare class CollectionApi extends runtime.BaseAPI {
277
323
  * Collection Information
278
324
  */
279
325
  getCollectionInformation(requestParameters: GetCollectionInformationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CollectionStatus>;
326
+ /**
327
+ * Creates request options for getCollectionOptions without sending the request
328
+ */
329
+ getCollectionOptionsRequestOpts(requestParameters: GetCollectionOptionsRequest): Promise<runtime.RequestOpts>;
330
+ /**
331
+ * The options of a Collection: capped, the validator with its level and action, the collation. 404 for a Collection that does not exist.
332
+ * Collection Options
333
+ */
334
+ getCollectionOptionsRaw(requestParameters: GetCollectionOptionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CollectionOptions>>;
335
+ /**
336
+ * The options of a Collection: capped, the validator with its level and action, the collation. 404 for a Collection that does not exist.
337
+ * Collection Options
338
+ */
339
+ getCollectionOptions(requestParameters: GetCollectionOptionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CollectionOptions>;
280
340
  /**
281
341
  * Creates request options for getFieldDetails without sending the request
282
342
  */
@@ -324,12 +384,12 @@ export declare class CollectionApi extends runtime.BaseAPI {
324
384
  */
325
385
  listCollectionInformationRequestOpts(requestParameters: ListCollectionInformationRequest): Promise<runtime.RequestOpts>;
326
386
  /**
327
- * 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.
387
+ * The numbers of all Collections of the default database (or of the database in `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. A database that does not exist is a 404 for an administrator and an empty list for every other user: they cannot find out which databases exist.
328
388
  * Information of all Collections
329
389
  */
330
390
  listCollectionInformationRaw(requestParameters: ListCollectionInformationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<CollectionSummary>>>;
331
391
  /**
332
- * 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.
392
+ * The numbers of all Collections of the default database (or of the database in `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. A database that does not exist is a 404 for an administrator and an empty list for every other user: they cannot find out which databases exist.
333
393
  * Information of all Collections
334
394
  */
335
395
  listCollectionInformation(requestParameters?: ListCollectionInformationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<CollectionSummary>>;
@@ -361,6 +421,20 @@ export declare class CollectionApi extends runtime.BaseAPI {
361
421
  * List of Collections
362
422
  */
363
423
  listCollectionsByDatabase(requestParameters: ListCollectionsByDatabaseRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<string>>;
424
+ /**
425
+ * Creates request options for modifyCollectionOptions without sending the request
426
+ */
427
+ modifyCollectionOptionsRequestOpts(requestParameters: ModifyCollectionOptionsRequest): Promise<runtime.RequestOpts>;
428
+ /**
429
+ * Change the validator, the validationLevel and the validationAction of a Collection (collMod), the answer is the options after the change. A capped Collection and the collation cannot be changed after the creation (400). The administrate grant is needed.
430
+ * Change the Validation of a Collection
431
+ */
432
+ modifyCollectionOptionsRaw(requestParameters: ModifyCollectionOptionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CollectionOptions>>;
433
+ /**
434
+ * Change the validator, the validationLevel and the validationAction of a Collection (collMod), the answer is the options after the change. A capped Collection and the collation cannot be changed after the creation (400). The administrate grant is needed.
435
+ * Change the Validation of a Collection
436
+ */
437
+ modifyCollectionOptions(requestParameters: ModifyCollectionOptionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CollectionOptions>;
364
438
  /**
365
439
  * Creates request options for renameCollection without sending the request
366
440
  */
@@ -1,4 +1,8 @@
1
1
  import * as runtime from "../runtime.js";
2
+ import {
3
+ CollectionOptionsFromJSON,
4
+ CollectionOptionsToJSON
5
+ } from "../models/CollectionOptions.js";
2
6
  import {
3
7
  CollectionStatusFromJSON
4
8
  } from "../models/CollectionStatus.js";
@@ -11,6 +15,9 @@ import {
11
15
  import {
12
16
  CopyResponseFromJSON
13
17
  } from "../models/CopyResponse.js";
18
+ import {
19
+ CreateCollectionResponseFromJSON
20
+ } from "../models/CreateCollectionResponse.js";
14
21
  import {
15
22
  FieldInfoFromJSON
16
23
  } from "../models/FieldInfo.js";
@@ -214,6 +221,59 @@ export class CollectionApi extends runtime.BaseAPI {
214
221
  const response = await this.copyCollectionRaw(requestParameters, initOverrides);
215
222
  return await response.value();
216
223
  }
224
+ /**
225
+ * Creates request options for createCollection without sending the request
226
+ */
227
+ async createCollectionRequestOpts(requestParameters) {
228
+ if (requestParameters["collectionName"] == null) {
229
+ throw new runtime.RequiredError(
230
+ "collectionName",
231
+ 'Required parameter "collectionName" was null or undefined when calling createCollection().'
232
+ );
233
+ }
234
+ const queryParameters = {};
235
+ const headerParameters = {};
236
+ headerParameters["Content-Type"] = "application/json";
237
+ if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
238
+ headerParameters["Authorization"] = "Basic " + btoa((this.configuration.username || "") + ":" + (this.configuration.password || ""));
239
+ }
240
+ if (this.configuration && this.configuration.accessToken) {
241
+ const token = this.configuration.accessToken;
242
+ const tokenString = await token("httpAuth", []);
243
+ if (tokenString) {
244
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
245
+ }
246
+ }
247
+ if (this.configuration && this.configuration.apiKey) {
248
+ headerParameters["X-AUTH-APIKEY"] = await this.configuration.apiKey("X-AUTH-APIKEY");
249
+ }
250
+ let urlPath = `/mongodb/collections/{collectionName}`;
251
+ urlPath = urlPath.replace("{collectionName}", encodeURIComponent(String(requestParameters["collectionName"])));
252
+ return {
253
+ path: urlPath,
254
+ method: "PUT",
255
+ headers: headerParameters,
256
+ query: queryParameters,
257
+ body: CollectionOptionsToJSON(requestParameters["collectionOptions"])
258
+ };
259
+ }
260
+ /**
261
+ * Create a Collection with options: capped (`capped`, `sizeInBytes`, `maxDocuments`), a validator (`validator`, `validationLevel` off, moderate or strict, `validationAction` error or warn) and a collation. Without a body an empty Collection is created. The administrate grant for the name is needed; a name of another database is `database:name`. An existing Collection is a conflict (409), reserved names (system collections, the prefix of the server, the collections of a bucket) and options that do not fit are 400.
262
+ * Create Collection
263
+ */
264
+ async createCollectionRaw(requestParameters, initOverrides) {
265
+ const requestOptions = await this.createCollectionRequestOpts(requestParameters);
266
+ const response = await this.request(requestOptions, initOverrides);
267
+ return new runtime.JSONApiResponse(response, (jsonValue) => CreateCollectionResponseFromJSON(jsonValue));
268
+ }
269
+ /**
270
+ * Create a Collection with options: capped (`capped`, `sizeInBytes`, `maxDocuments`), a validator (`validator`, `validationLevel` off, moderate or strict, `validationAction` error or warn) and a collation. Without a body an empty Collection is created. The administrate grant for the name is needed; a name of another database is `database:name`. An existing Collection is a conflict (409), reserved names (system collections, the prefix of the server, the collections of a bucket) and options that do not fit are 400.
271
+ * Create Collection
272
+ */
273
+ async createCollection(requestParameters, initOverrides) {
274
+ const response = await this.createCollectionRaw(requestParameters, initOverrides);
275
+ return await response.value();
276
+ }
217
277
  /**
218
278
  * Creates request options for deleteCollection without sending the request
219
279
  */
@@ -437,6 +497,57 @@ export class CollectionApi extends runtime.BaseAPI {
437
497
  const response = await this.getCollectionInformationRaw(requestParameters, initOverrides);
438
498
  return await response.value();
439
499
  }
500
+ /**
501
+ * Creates request options for getCollectionOptions without sending the request
502
+ */
503
+ async getCollectionOptionsRequestOpts(requestParameters) {
504
+ if (requestParameters["collectionName"] == null) {
505
+ throw new runtime.RequiredError(
506
+ "collectionName",
507
+ 'Required parameter "collectionName" was null or undefined when calling getCollectionOptions().'
508
+ );
509
+ }
510
+ const queryParameters = {};
511
+ const headerParameters = {};
512
+ if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
513
+ headerParameters["Authorization"] = "Basic " + btoa((this.configuration.username || "") + ":" + (this.configuration.password || ""));
514
+ }
515
+ if (this.configuration && this.configuration.accessToken) {
516
+ const token = this.configuration.accessToken;
517
+ const tokenString = await token("httpAuth", []);
518
+ if (tokenString) {
519
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
520
+ }
521
+ }
522
+ if (this.configuration && this.configuration.apiKey) {
523
+ headerParameters["X-AUTH-APIKEY"] = await this.configuration.apiKey("X-AUTH-APIKEY");
524
+ }
525
+ let urlPath = `/mongodb/collections/{collectionName}/options`;
526
+ urlPath = urlPath.replace("{collectionName}", encodeURIComponent(String(requestParameters["collectionName"])));
527
+ return {
528
+ path: urlPath,
529
+ method: "GET",
530
+ headers: headerParameters,
531
+ query: queryParameters
532
+ };
533
+ }
534
+ /**
535
+ * The options of a Collection: capped, the validator with its level and action, the collation. 404 for a Collection that does not exist.
536
+ * Collection Options
537
+ */
538
+ async getCollectionOptionsRaw(requestParameters, initOverrides) {
539
+ const requestOptions = await this.getCollectionOptionsRequestOpts(requestParameters);
540
+ const response = await this.request(requestOptions, initOverrides);
541
+ return new runtime.JSONApiResponse(response, (jsonValue) => CollectionOptionsFromJSON(jsonValue));
542
+ }
543
+ /**
544
+ * The options of a Collection: capped, the validator with its level and action, the collation. 404 for a Collection that does not exist.
545
+ * Collection Options
546
+ */
547
+ async getCollectionOptions(requestParameters, initOverrides) {
548
+ const response = await this.getCollectionOptionsRaw(requestParameters, initOverrides);
549
+ return await response.value();
550
+ }
440
551
  /**
441
552
  * Creates request options for getFieldDetails without sending the request
442
553
  */
@@ -616,6 +727,9 @@ export class CollectionApi extends runtime.BaseAPI {
616
727
  if (requestParameters["name"] != null) {
617
728
  queryParameters["name"] = requestParameters["name"];
618
729
  }
730
+ if (requestParameters["database"] != null) {
731
+ queryParameters["database"] = requestParameters["database"];
732
+ }
619
733
  const headerParameters = {};
620
734
  if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
621
735
  headerParameters["Authorization"] = "Basic " + btoa((this.configuration.username || "") + ":" + (this.configuration.password || ""));
@@ -639,7 +753,7 @@ export class CollectionApi extends runtime.BaseAPI {
639
753
  };
640
754
  }
641
755
  /**
642
- * 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.
756
+ * The numbers of all Collections of the default database (or of the database in `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. A database that does not exist is a 404 for an administrator and an empty list for every other user: they cannot find out which databases exist.
643
757
  * Information of all Collections
644
758
  */
645
759
  async listCollectionInformationRaw(requestParameters, initOverrides) {
@@ -648,7 +762,7 @@ export class CollectionApi extends runtime.BaseAPI {
648
762
  return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(CollectionSummaryFromJSON));
649
763
  }
650
764
  /**
651
- * 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.
765
+ * The numbers of all Collections of the default database (or of the database in `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. A database that does not exist is a 404 for an administrator and an empty list for every other user: they cannot find out which databases exist.
652
766
  * Information of all Collections
653
767
  */
654
768
  async listCollectionInformation(requestParameters = {}, initOverrides) {
@@ -750,6 +864,65 @@ export class CollectionApi extends runtime.BaseAPI {
750
864
  const response = await this.listCollectionsByDatabaseRaw(requestParameters, initOverrides);
751
865
  return await response.value();
752
866
  }
867
+ /**
868
+ * Creates request options for modifyCollectionOptions without sending the request
869
+ */
870
+ async modifyCollectionOptionsRequestOpts(requestParameters) {
871
+ if (requestParameters["collectionName"] == null) {
872
+ throw new runtime.RequiredError(
873
+ "collectionName",
874
+ 'Required parameter "collectionName" was null or undefined when calling modifyCollectionOptions().'
875
+ );
876
+ }
877
+ if (requestParameters["collectionOptions"] == null) {
878
+ throw new runtime.RequiredError(
879
+ "collectionOptions",
880
+ 'Required parameter "collectionOptions" was null or undefined when calling modifyCollectionOptions().'
881
+ );
882
+ }
883
+ const queryParameters = {};
884
+ const headerParameters = {};
885
+ headerParameters["Content-Type"] = "application/json";
886
+ if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
887
+ headerParameters["Authorization"] = "Basic " + btoa((this.configuration.username || "") + ":" + (this.configuration.password || ""));
888
+ }
889
+ if (this.configuration && this.configuration.accessToken) {
890
+ const token = this.configuration.accessToken;
891
+ const tokenString = await token("httpAuth", []);
892
+ if (tokenString) {
893
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
894
+ }
895
+ }
896
+ if (this.configuration && this.configuration.apiKey) {
897
+ headerParameters["X-AUTH-APIKEY"] = await this.configuration.apiKey("X-AUTH-APIKEY");
898
+ }
899
+ let urlPath = `/mongodb/collections/{collectionName}/options`;
900
+ urlPath = urlPath.replace("{collectionName}", encodeURIComponent(String(requestParameters["collectionName"])));
901
+ return {
902
+ path: urlPath,
903
+ method: "PATCH",
904
+ headers: headerParameters,
905
+ query: queryParameters,
906
+ body: CollectionOptionsToJSON(requestParameters["collectionOptions"])
907
+ };
908
+ }
909
+ /**
910
+ * Change the validator, the validationLevel and the validationAction of a Collection (collMod), the answer is the options after the change. A capped Collection and the collation cannot be changed after the creation (400). The administrate grant is needed.
911
+ * Change the Validation of a Collection
912
+ */
913
+ async modifyCollectionOptionsRaw(requestParameters, initOverrides) {
914
+ const requestOptions = await this.modifyCollectionOptionsRequestOpts(requestParameters);
915
+ const response = await this.request(requestOptions, initOverrides);
916
+ return new runtime.JSONApiResponse(response, (jsonValue) => CollectionOptionsFromJSON(jsonValue));
917
+ }
918
+ /**
919
+ * Change the validator, the validationLevel and the validationAction of a Collection (collMod), the answer is the options after the change. A capped Collection and the collation cannot be changed after the creation (400). The administrate grant is needed.
920
+ * Change the Validation of a Collection
921
+ */
922
+ async modifyCollectionOptions(requestParameters, initOverrides) {
923
+ const response = await this.modifyCollectionOptionsRaw(requestParameters, initOverrides);
924
+ return await response.value();
925
+ }
753
926
  /**
754
927
  * Creates request options for renameCollection without sending the request
755
928
  */
@@ -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.8.2
5
+ * The version of the OpenAPI document: 1.9.0
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.8.2
5
+ * The version of the OpenAPI document: 1.9.0
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.8.2
5
+ * The version of the OpenAPI document: 1.9.0
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.8.2
5
+ * The version of the OpenAPI document: 1.9.0
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.8.2
5
+ * The version of the OpenAPI document: 1.9.0
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.8.2
5
+ * The version of the OpenAPI document: 1.9.0
6
6
  *
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -10,12 +10,57 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime.js';
13
+ import { type Capabilities } from '../models/Capabilities.js';
13
14
  import { type ClusterInformation } from '../models/ClusterInformation.js';
15
+ import { type SystemInfo } from '../models/SystemInfo.js';
16
+ import { type SystemStats } from '../models/SystemStats.js';
14
17
  import { type Version } from '../models/Version.js';
15
18
  /**
16
19
  *
17
20
  */
18
21
  export declare class SystemApi extends runtime.BaseAPI {
22
+ /**
23
+ * Creates request options for systemCapabilities without sending the request
24
+ */
25
+ systemCapabilitiesRequestOpts(): Promise<runtime.RequestOpts>;
26
+ /**
27
+ * What this server can do, for every logged in user: the names of the features, the major version of MongoDB, the limits (size of an import, status of a request without the grant) and the operators that an aggregation refuses. A server that has no such route is an older version.
28
+ * System Capabilities
29
+ */
30
+ systemCapabilitiesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Capabilities>>;
31
+ /**
32
+ * What this server can do, for every logged in user: the names of the features, the major version of MongoDB, the limits (size of an import, status of a request without the grant) and the operators that an aggregation refuses. A server that has no such route is an older version.
33
+ * System Capabilities
34
+ */
35
+ systemCapabilities(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Capabilities>;
36
+ /**
37
+ * Creates request options for systemInfo without sending the request
38
+ */
39
+ systemInfoRequestOpts(): Promise<runtime.RequestOpts>;
40
+ /**
41
+ * Information about the system the server is connected to: the version of the MongoDB server
42
+ * System Information
43
+ */
44
+ systemInfoRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SystemInfo>>;
45
+ /**
46
+ * Information about the system the server is connected to: the version of the MongoDB server
47
+ * System Information
48
+ */
49
+ systemInfo(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SystemInfo>;
50
+ /**
51
+ * Creates request options for systemStats without sending the request
52
+ */
53
+ systemStatsRequestOpts(): Promise<runtime.RequestOpts>;
54
+ /**
55
+ * The numbers of the database server for a server overview: uptime, connections, operation counters (totals since the start of the database server) and the state of the replica set. A database user without the role clusterMonitor gives partial true and no uptime, connections and counters; a server that is not part of a replica set has no replicaSet. No host names or addresses.
56
+ * System Statistics
57
+ */
58
+ systemStatsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SystemStats>>;
59
+ /**
60
+ * The numbers of the database server for a server overview: uptime, connections, operation counters (totals since the start of the database server) and the state of the replica set. A database user without the role clusterMonitor gives partial true and no uptime, connections and counters; a server that is not part of a replica set has no replicaSet. No host names or addresses.
61
+ * System Statistics
62
+ */
63
+ systemStats(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SystemStats>;
19
64
  /**
20
65
  * Creates request options for version without sending the request
21
66
  */