@sfxcode/nuxt-mongocamp-server 1.5.2 → 1.7.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/dist/module.json +1 -1
  2. package/dist/module.mjs +1 -1
  3. package/dist/runtime/api/.openapi-generator/FILES +18 -2
  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 +21 -4
  7. package/dist/runtime/api/apis/AuthApi.js +50 -2
  8. package/dist/runtime/api/apis/BucketApi.d.ts +1 -1
  9. package/dist/runtime/api/apis/CollectionApi.d.ts +26 -8
  10. package/dist/runtime/api/apis/CollectionApi.js +53 -2
  11. package/dist/runtime/api/apis/DatabaseApi.d.ts +1 -1
  12. package/dist/runtime/api/apis/DocumentApi.d.ts +60 -13
  13. package/dist/runtime/api/apis/DocumentApi.js +136 -0
  14. package/dist/runtime/api/apis/FileApi.d.ts +1 -1
  15. package/dist/runtime/api/apis/IndexApi.d.ts +19 -2
  16. package/dist/runtime/api/apis/IndexApi.js +52 -0
  17. package/dist/runtime/api/apis/JobsApi.d.ts +1 -1
  18. package/dist/runtime/api/apis/{InformationApi.d.ts → SystemApi.d.ts} +17 -3
  19. package/dist/runtime/api/apis/SystemApi.js +82 -0
  20. package/dist/runtime/api/apis/index.d.ts +1 -1
  21. package/dist/runtime/api/apis/index.js +1 -1
  22. package/dist/runtime/api/docs/AdminApi.md +2 -2
  23. package/dist/runtime/api/docs/AuthApi.md +79 -1
  24. package/dist/runtime/api/docs/ClusterInformation.md +36 -0
  25. package/dist/runtime/api/docs/ClusterMemberInformation.md +42 -0
  26. package/dist/runtime/api/docs/CollectionApi.md +86 -5
  27. package/dist/runtime/api/docs/CollectionPermission.md +40 -0
  28. package/dist/runtime/api/docs/CollectionStatus.md +1 -1
  29. package/dist/runtime/api/docs/CollectionSummary.md +50 -0
  30. package/dist/runtime/api/docs/CountResponse.md +34 -0
  31. package/dist/runtime/api/docs/DatabaseInfo.md +1 -1
  32. package/dist/runtime/api/docs/DocumentApi.md +208 -24
  33. package/dist/runtime/api/docs/FileApi.md +2 -2
  34. package/dist/runtime/api/docs/FileInformation.md +1 -1
  35. package/dist/runtime/api/docs/IndexApi.md +80 -2
  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/JsonSchemaDefinition.md +1 -1
  40. package/dist/runtime/api/docs/JsonValueAny.md +1 -1
  41. package/dist/runtime/api/docs/MongoCampConfiguration.md +1 -1
  42. package/dist/runtime/api/docs/MongoFindRequest.md +3 -3
  43. package/dist/runtime/api/docs/MongoIndex.md +3 -3
  44. package/dist/runtime/api/docs/PipelineStage.md +1 -1
  45. package/dist/runtime/api/docs/SearchRequest.md +38 -0
  46. package/dist/runtime/api/docs/SettingsResponse.md +1 -1
  47. package/dist/runtime/api/docs/SystemApi.md +139 -0
  48. package/dist/runtime/api/docs/UpdateFileInformationRequest.md +1 -1
  49. package/dist/runtime/api/docs/UpdateRequest.md +2 -2
  50. package/dist/runtime/api/models/BucketInformation.d.ts +1 -1
  51. package/dist/runtime/api/models/ClusterInformation.d.ts +39 -0
  52. package/dist/runtime/api/models/ClusterInformation.js +32 -0
  53. package/dist/runtime/api/models/ClusterMemberInformation.d.ts +56 -0
  54. package/dist/runtime/api/models/ClusterMemberInformation.js +38 -0
  55. package/dist/runtime/api/models/CollectionPermission.d.ts +50 -0
  56. package/dist/runtime/api/models/CollectionPermission.js +35 -0
  57. package/dist/runtime/api/models/CollectionStatus.d.ts +3 -3
  58. package/dist/runtime/api/models/CollectionSummary.d.ts +80 -0
  59. package/dist/runtime/api/models/CollectionSummary.js +50 -0
  60. package/dist/runtime/api/models/CountResponse.d.ts +32 -0
  61. package/dist/runtime/api/models/CountResponse.js +26 -0
  62. package/dist/runtime/api/models/DatabaseInfo.d.ts +3 -3
  63. package/dist/runtime/api/models/DeleteResponse.d.ts +1 -1
  64. package/dist/runtime/api/models/ErrorDescription.d.ts +1 -1
  65. package/dist/runtime/api/models/FileInformation.d.ts +3 -3
  66. package/dist/runtime/api/models/Grant.d.ts +1 -1
  67. package/dist/runtime/api/models/IndexCreateRequest.d.ts +1 -1
  68. package/dist/runtime/api/models/IndexCreateResponse.d.ts +1 -1
  69. package/dist/runtime/api/models/IndexDropResponse.d.ts +1 -1
  70. package/dist/runtime/api/models/IndexOptionsRequest.d.ts +1 -1
  71. package/dist/runtime/api/models/IndexUsage.d.ts +52 -0
  72. package/dist/runtime/api/models/IndexUsage.js +35 -0
  73. package/dist/runtime/api/models/InsertError.d.ts +44 -0
  74. package/dist/runtime/api/models/InsertError.js +32 -0
  75. package/dist/runtime/api/models/InsertResponse.d.ts +14 -1
  76. package/dist/runtime/api/models/InsertResponse.js +10 -2
  77. package/dist/runtime/api/models/JobConfig.d.ts +1 -1
  78. package/dist/runtime/api/models/JobInformation.d.ts +2 -2
  79. package/dist/runtime/api/models/JobInformation.js +1 -2
  80. package/dist/runtime/api/models/JsonSchema.d.ts +1 -1
  81. package/dist/runtime/api/models/JsonSchemaDefinition.d.ts +3 -3
  82. package/dist/runtime/api/models/JsonValueAny.d.ts +3 -3
  83. package/dist/runtime/api/models/JsonValueBoolean.d.ts +1 -1
  84. package/dist/runtime/api/models/JsonValueString.d.ts +1 -1
  85. package/dist/runtime/api/models/Login.d.ts +1 -1
  86. package/dist/runtime/api/models/LoginResult.d.ts +1 -1
  87. package/dist/runtime/api/models/MongoAggregateRequest.d.ts +1 -1
  88. package/dist/runtime/api/models/MongoCampConfiguration.d.ts +3 -3
  89. package/dist/runtime/api/models/MongoFindRequest.d.ts +7 -7
  90. package/dist/runtime/api/models/MongoIndex.d.ts +7 -7
  91. package/dist/runtime/api/models/PasswordUpdateRequest.d.ts +1 -1
  92. package/dist/runtime/api/models/PipelineStage.d.ts +3 -3
  93. package/dist/runtime/api/models/Role.d.ts +1 -1
  94. package/dist/runtime/api/models/SchemaAnalysis.d.ts +1 -1
  95. package/dist/runtime/api/models/SchemaAnalysisField.d.ts +1 -1
  96. package/dist/runtime/api/models/SchemaAnalysisFieldType.d.ts +1 -1
  97. package/dist/runtime/api/models/SearchRequest.d.ts +44 -0
  98. package/dist/runtime/api/models/SearchRequest.js +29 -0
  99. package/dist/runtime/api/models/SettingsResponse.d.ts +3 -3
  100. package/dist/runtime/api/models/UpdateFileInformationRequest.d.ts +3 -3
  101. package/dist/runtime/api/models/UpdateRequest.d.ts +5 -5
  102. package/dist/runtime/api/models/UpdateResponse.d.ts +1 -1
  103. package/dist/runtime/api/models/UpdateRoleRequest.d.ts +1 -1
  104. package/dist/runtime/api/models/UserInformation.d.ts +1 -1
  105. package/dist/runtime/api/models/UserProfile.d.ts +1 -1
  106. package/dist/runtime/api/models/Version.d.ts +1 -1
  107. package/dist/runtime/api/models/index.d.ts +8 -0
  108. package/dist/runtime/api/models/index.js +8 -0
  109. package/dist/runtime/api/runtime.d.ts +1 -1
  110. package/dist/runtime/composables/mongocampApi.d.ts +1 -1
  111. package/dist/runtime/composables/mongocampApiCollection.d.ts +2 -2
  112. package/dist/runtime/composables/mongocampSearch.d.ts +3 -3
  113. package/dist/runtime/composables/mongocampStorage.d.ts +1 -1
  114. package/dist/runtime/server/composables/mongocampApi.d.ts +1 -1
  115. package/dist/runtime/server/composables/mongocampServerApi.d.ts +1 -1
  116. package/dist/runtime/utils/createMongocampApis.d.ts +2 -2
  117. package/dist/runtime/utils/createMongocampApis.js +2 -2
  118. package/package.json +14 -14
  119. package/dist/runtime/api/apis/InformationApi.js +0 -37
package/dist/module.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sfxcode/nuxt-mongocamp-server",
3
- "version": "1.5.2",
3
+ "version": "1.7.0",
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.5.2";
7
+ const version = "1.7.0";
8
8
 
9
9
  const module$1 = defineNuxtModule({
10
10
  meta: {
@@ -7,16 +7,21 @@ apis/DatabaseApi.ts
7
7
  apis/DocumentApi.ts
8
8
  apis/FileApi.ts
9
9
  apis/IndexApi.ts
10
- apis/InformationApi.ts
11
10
  apis/JobsApi.ts
11
+ apis/SystemApi.ts
12
12
  apis/index.ts
13
13
  docs/AdminApi.md
14
14
  docs/ApplicationApi.md
15
15
  docs/AuthApi.md
16
16
  docs/BucketApi.md
17
17
  docs/BucketInformation.md
18
+ docs/ClusterInformation.md
19
+ docs/ClusterMemberInformation.md
18
20
  docs/CollectionApi.md
21
+ docs/CollectionPermission.md
19
22
  docs/CollectionStatus.md
23
+ docs/CollectionSummary.md
24
+ docs/CountResponse.md
20
25
  docs/DatabaseApi.md
21
26
  docs/DatabaseInfo.md
22
27
  docs/DeleteResponse.md
@@ -30,7 +35,8 @@ docs/IndexCreateRequest.md
30
35
  docs/IndexCreateResponse.md
31
36
  docs/IndexDropResponse.md
32
37
  docs/IndexOptionsRequest.md
33
- docs/InformationApi.md
38
+ docs/IndexUsage.md
39
+ docs/InsertError.md
34
40
  docs/InsertResponse.md
35
41
  docs/JobConfig.md
36
42
  docs/JobInformation.md
@@ -52,7 +58,9 @@ docs/Role.md
52
58
  docs/SchemaAnalysis.md
53
59
  docs/SchemaAnalysisField.md
54
60
  docs/SchemaAnalysisFieldType.md
61
+ docs/SearchRequest.md
55
62
  docs/SettingsResponse.md
63
+ docs/SystemApi.md
56
64
  docs/UpdateFileInformationRequest.md
57
65
  docs/UpdateRequest.md
58
66
  docs/UpdateResponse.md
@@ -62,7 +70,12 @@ docs/UserProfile.md
62
70
  docs/Version.md
63
71
  index.ts
64
72
  models/BucketInformation.ts
73
+ models/ClusterInformation.ts
74
+ models/ClusterMemberInformation.ts
75
+ models/CollectionPermission.ts
65
76
  models/CollectionStatus.ts
77
+ models/CollectionSummary.ts
78
+ models/CountResponse.ts
66
79
  models/DatabaseInfo.ts
67
80
  models/DeleteResponse.ts
68
81
  models/ErrorDescription.ts
@@ -72,6 +85,8 @@ models/IndexCreateRequest.ts
72
85
  models/IndexCreateResponse.ts
73
86
  models/IndexDropResponse.ts
74
87
  models/IndexOptionsRequest.ts
88
+ models/IndexUsage.ts
89
+ models/InsertError.ts
75
90
  models/InsertResponse.ts
76
91
  models/JobConfig.ts
77
92
  models/JobInformation.ts
@@ -92,6 +107,7 @@ models/Role.ts
92
107
  models/SchemaAnalysis.ts
93
108
  models/SchemaAnalysisField.ts
94
109
  models/SchemaAnalysisFieldType.ts
110
+ models/SearchRequest.ts
95
111
  models/SettingsResponse.ts
96
112
  models/UpdateFileInformationRequest.ts
97
113
  models/UpdateRequest.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.5.10
5
+ * The version of the OpenAPI document: 1.7.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.5.10
5
+ * The version of the OpenAPI document: 1.7.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.5.10
5
+ * The version of the OpenAPI document: 1.7.1
6
6
  *
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -10,13 +10,16 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime.js';
13
- import type { JsonValueBoolean, JsonValueString, Login, LoginResult, PasswordUpdateRequest, UserProfile } from '../models/index.js';
13
+ import type { CollectionPermission, JsonValueBoolean, JsonValueString, Login, LoginResult, PasswordUpdateRequest, UserProfile } from '../models/index.js';
14
14
  export interface LoginRequest {
15
15
  login: Login;
16
16
  }
17
17
  export interface UpdatePasswordRequest {
18
18
  passwordUpdateRequest: PasswordUpdateRequest;
19
19
  }
20
+ export interface UserPermissionsRequest {
21
+ collection?: string;
22
+ }
20
23
  /**
21
24
  *
22
25
  */
@@ -96,12 +99,12 @@ export declare class AuthApi extends runtime.BaseAPI {
96
99
  */
97
100
  refreshTokenRequestOpts(): Promise<runtime.RequestOpts>;
98
101
  /**
99
- * Refresh Token and return Login Information
102
+ * Refresh Token and return Login Information. A new token is issued on every call, the bearer token that was used for the call stays valid for a grace period (AUTH_REFRESH_GRACE_DURATION, default 60 seconds) and is invalid afterwards.
100
103
  * Refresh User
101
104
  */
102
105
  refreshTokenRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LoginResult>>;
103
106
  /**
104
- * Refresh Token and return Login Information
107
+ * Refresh Token and return Login Information. A new token is issued on every call, the bearer token that was used for the call stays valid for a grace period (AUTH_REFRESH_GRACE_DURATION, default 60 seconds) and is invalid afterwards.
105
108
  * Refresh User
106
109
  */
107
110
  refreshToken(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LoginResult>;
@@ -119,6 +122,20 @@ export declare class AuthApi extends runtime.BaseAPI {
119
122
  * Update Password
120
123
  */
121
124
  updatePassword(requestParameters: UpdatePasswordRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<JsonValueBoolean>;
125
+ /**
126
+ * Creates request options for userPermissions without sending the request
127
+ */
128
+ userPermissionsRequestOpts(requestParameters: UserPermissionsRequest): Promise<runtime.RequestOpts>;
129
+ /**
130
+ * Return the resolved rights (read, write, administrate) of the loggedin user for the collections of the default database
131
+ * Collection permissions
132
+ */
133
+ userPermissionsRaw(requestParameters: UserPermissionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<CollectionPermission>>>;
134
+ /**
135
+ * Return the resolved rights (read, write, administrate) of the loggedin user for the collections of the default database
136
+ * Collection permissions
137
+ */
138
+ userPermissions(requestParameters?: UserPermissionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<CollectionPermission>>;
122
139
  /**
123
140
  * Creates request options for userProfile without sending the request
124
141
  */
@@ -1,5 +1,6 @@
1
1
  import * as runtime from "../runtime.js";
2
2
  import {
3
+ CollectionPermissionFromJSON,
3
4
  JsonValueBooleanFromJSON,
4
5
  JsonValueStringFromJSON,
5
6
  LoginToJSON,
@@ -251,7 +252,7 @@ export class AuthApi extends runtime.BaseAPI {
251
252
  };
252
253
  }
253
254
  /**
254
- * Refresh Token and return Login Information
255
+ * Refresh Token and return Login Information. A new token is issued on every call, the bearer token that was used for the call stays valid for a grace period (AUTH_REFRESH_GRACE_DURATION, default 60 seconds) and is invalid afterwards.
255
256
  * Refresh User
256
257
  */
257
258
  async refreshTokenRaw(initOverrides) {
@@ -260,7 +261,7 @@ export class AuthApi extends runtime.BaseAPI {
260
261
  return new runtime.JSONApiResponse(response, (jsonValue) => LoginResultFromJSON(jsonValue));
261
262
  }
262
263
  /**
263
- * Refresh Token and return Login Information
264
+ * Refresh Token and return Login Information. A new token is issued on every call, the bearer token that was used for the call stays valid for a grace period (AUTH_REFRESH_GRACE_DURATION, default 60 seconds) and is invalid afterwards.
264
265
  * Refresh User
265
266
  */
266
267
  async refreshToken(initOverrides) {
@@ -319,6 +320,53 @@ export class AuthApi extends runtime.BaseAPI {
319
320
  const response = await this.updatePasswordRaw(requestParameters, initOverrides);
320
321
  return await response.value();
321
322
  }
323
+ /**
324
+ * Creates request options for userPermissions without sending the request
325
+ */
326
+ async userPermissionsRequestOpts(requestParameters) {
327
+ const queryParameters = {};
328
+ if (requestParameters["collection"] != null) {
329
+ queryParameters["collection"] = requestParameters["collection"];
330
+ }
331
+ const headerParameters = {};
332
+ if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
333
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
334
+ }
335
+ if (this.configuration && this.configuration.accessToken) {
336
+ const token = this.configuration.accessToken;
337
+ const tokenString = await token("httpAuth", []);
338
+ if (tokenString) {
339
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
340
+ }
341
+ }
342
+ if (this.configuration && this.configuration.apiKey) {
343
+ headerParameters["X-AUTH-APIKEY"] = await this.configuration.apiKey("X-AUTH-APIKEY");
344
+ }
345
+ let urlPath = `/auth/permissions`;
346
+ return {
347
+ path: urlPath,
348
+ method: "GET",
349
+ headers: headerParameters,
350
+ query: queryParameters
351
+ };
352
+ }
353
+ /**
354
+ * Return the resolved rights (read, write, administrate) of the loggedin user for the collections of the default database
355
+ * Collection permissions
356
+ */
357
+ async userPermissionsRaw(requestParameters, initOverrides) {
358
+ const requestOptions = await this.userPermissionsRequestOpts(requestParameters);
359
+ const response = await this.request(requestOptions, initOverrides);
360
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(CollectionPermissionFromJSON));
361
+ }
362
+ /**
363
+ * Return the resolved rights (read, write, administrate) of the loggedin user for the collections of the default database
364
+ * Collection permissions
365
+ */
366
+ async userPermissions(requestParameters = {}, initOverrides) {
367
+ const response = await this.userPermissionsRaw(requestParameters, initOverrides);
368
+ return await response.value();
369
+ }
322
370
  /**
323
371
  * Creates request options for userProfile without sending the request
324
372
  */
@@ -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.5.10
5
+ * The version of the OpenAPI document: 1.7.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.5.10
5
+ * The version of the OpenAPI document: 1.7.1
6
6
  *
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -10,12 +10,13 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime.js';
13
- import type { CollectionStatus, JsonSchema, JsonValueBoolean, MongoAggregateRequest, SchemaAnalysis } from '../models/index.js';
13
+ import type { CollectionStatus, CollectionSummary, JsonSchema, JsonValueBoolean, MongoAggregateRequest, SchemaAnalysis } from '../models/index.js';
14
14
  export interface AggregateRequest {
15
15
  collectionName: string;
16
16
  mongoAggregateRequest: MongoAggregateRequest;
17
17
  rowsPerPage?: number;
18
18
  page?: number;
19
+ filter?: string;
19
20
  }
20
21
  export interface ClearCollectionRequest {
21
22
  collectionName: string;
@@ -47,6 +48,9 @@ export interface GetSchemaAnalysisRequest {
47
48
  sampleSize?: number;
48
49
  deepth?: number;
49
50
  }
51
+ export interface ListCollectionInformationRequest {
52
+ name?: Array<string>;
53
+ }
50
54
  export interface ListCollectionsByDatabaseRequest {
51
55
  databaseName: string;
52
56
  }
@@ -59,18 +63,18 @@ export declare class CollectionApi extends runtime.BaseAPI {
59
63
  */
60
64
  aggregateRequestOpts(requestParameters: AggregateRequest): Promise<runtime.RequestOpts>;
61
65
  /**
62
- * Aggregate in a given Collection
66
+ * 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.
63
67
  * Aggregate in Collection
64
68
  */
65
69
  aggregateRaw(requestParameters: AggregateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<{
66
- [key: string]: string;
70
+ [key: string]: any;
67
71
  }>>>;
68
72
  /**
69
- * Aggregate in a given Collection
73
+ * 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.
70
74
  * Aggregate in Collection
71
75
  */
72
76
  aggregate(requestParameters: AggregateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<{
73
- [key: string]: string;
77
+ [key: string]: any;
74
78
  }>>;
75
79
  /**
76
80
  * Creates request options for clearCollection without sending the request
@@ -108,12 +112,12 @@ export declare class CollectionApi extends runtime.BaseAPI {
108
112
  * Distinct for Field in a given Collection
109
113
  * Distinct in Collection
110
114
  */
111
- distinctRaw(requestParameters: DistinctRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<string>>>;
115
+ distinctRaw(requestParameters: DistinctRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<any>>>;
112
116
  /**
113
117
  * Distinct for Field in a given Collection
114
118
  * Distinct in Collection
115
119
  */
116
- distinct(requestParameters: DistinctRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<string>>;
120
+ distinct(requestParameters: DistinctRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<any>>;
117
121
  /**
118
122
  * Creates request options for getCollectionFields without sending the request
119
123
  */
@@ -170,6 +174,20 @@ export declare class CollectionApi extends runtime.BaseAPI {
170
174
  * Collection Fields
171
175
  */
172
176
  getSchemaAnalysis(requestParameters: GetSchemaAnalysisRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SchemaAnalysis>;
177
+ /**
178
+ * Creates request options for listCollectionInformation without sending the request
179
+ */
180
+ listCollectionInformationRequestOpts(requestParameters: ListCollectionInformationRequest): Promise<runtime.RequestOpts>;
181
+ /**
182
+ * 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.
183
+ * Information of all Collections
184
+ */
185
+ listCollectionInformationRaw(requestParameters: ListCollectionInformationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<CollectionSummary>>>;
186
+ /**
187
+ * 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.
188
+ * Information of all Collections
189
+ */
190
+ listCollectionInformation(requestParameters?: ListCollectionInformationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<CollectionSummary>>;
173
191
  /**
174
192
  * Creates request options for listCollections without sending the request
175
193
  */
@@ -1,6 +1,7 @@
1
1
  import * as runtime from "../runtime.js";
2
2
  import {
3
3
  CollectionStatusFromJSON,
4
+ CollectionSummaryFromJSON,
4
5
  JsonSchemaFromJSON,
5
6
  JsonValueBooleanFromJSON,
6
7
  MongoAggregateRequestToJSON,
@@ -30,6 +31,9 @@ export class CollectionApi extends runtime.BaseAPI {
30
31
  if (requestParameters["page"] != null) {
31
32
  queryParameters["page"] = requestParameters["page"];
32
33
  }
34
+ if (requestParameters["filter"] != null) {
35
+ queryParameters["filter"] = requestParameters["filter"];
36
+ }
33
37
  const headerParameters = {};
34
38
  headerParameters["Content-Type"] = "application/json";
35
39
  if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
@@ -56,7 +60,7 @@ export class CollectionApi extends runtime.BaseAPI {
56
60
  };
57
61
  }
58
62
  /**
59
- * Aggregate in a given Collection
63
+ * 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
64
  * Aggregate in Collection
61
65
  */
62
66
  async aggregateRaw(requestParameters, initOverrides) {
@@ -65,7 +69,7 @@ export class CollectionApi extends runtime.BaseAPI {
65
69
  return new runtime.JSONApiResponse(response);
66
70
  }
67
71
  /**
68
- * Aggregate in a given Collection
72
+ * 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
73
  * Aggregate in Collection
70
74
  */
71
75
  async aggregate(requestParameters, initOverrides) {
@@ -460,6 +464,53 @@ export class CollectionApi extends runtime.BaseAPI {
460
464
  const response = await this.getSchemaAnalysisRaw(requestParameters, initOverrides);
461
465
  return await response.value();
462
466
  }
467
+ /**
468
+ * Creates request options for listCollectionInformation without sending the request
469
+ */
470
+ async listCollectionInformationRequestOpts(requestParameters) {
471
+ const queryParameters = {};
472
+ if (requestParameters["name"] != null) {
473
+ queryParameters["name"] = requestParameters["name"];
474
+ }
475
+ const headerParameters = {};
476
+ if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
477
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
478
+ }
479
+ if (this.configuration && this.configuration.accessToken) {
480
+ const token = this.configuration.accessToken;
481
+ const tokenString = await token("httpAuth", []);
482
+ if (tokenString) {
483
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
484
+ }
485
+ }
486
+ if (this.configuration && this.configuration.apiKey) {
487
+ headerParameters["X-AUTH-APIKEY"] = await this.configuration.apiKey("X-AUTH-APIKEY");
488
+ }
489
+ let urlPath = `/mongodb/collections/info`;
490
+ return {
491
+ path: urlPath,
492
+ method: "GET",
493
+ headers: headerParameters,
494
+ query: queryParameters
495
+ };
496
+ }
497
+ /**
498
+ * 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.
499
+ * Information of all Collections
500
+ */
501
+ async listCollectionInformationRaw(requestParameters, initOverrides) {
502
+ const requestOptions = await this.listCollectionInformationRequestOpts(requestParameters);
503
+ const response = await this.request(requestOptions, initOverrides);
504
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(CollectionSummaryFromJSON));
505
+ }
506
+ /**
507
+ * 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.
508
+ * Information of all Collections
509
+ */
510
+ async listCollectionInformation(requestParameters = {}, initOverrides) {
511
+ const response = await this.listCollectionInformationRaw(requestParameters, initOverrides);
512
+ return await response.value();
513
+ }
463
514
  /**
464
515
  * Creates request options for listCollections without sending the request
465
516
  */
@@ -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.5.10
5
+ * The version of the OpenAPI document: 1.7.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.5.10
5
+ * The version of the OpenAPI document: 1.7.1
6
6
  *
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -10,16 +10,22 @@
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, 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
- [key: string]: string;
25
+ [key: string]: any;
22
26
  };
27
+ matchAll?: boolean;
28
+ filter?: string;
23
29
  }
24
30
  export interface FindRequest {
25
31
  collectionName: string;
@@ -34,13 +40,14 @@ export interface GetDocumentRequest {
34
40
  export interface InsertRequest {
35
41
  collectionName: string;
36
42
  requestBody: {
37
- [key: string]: string;
43
+ [key: string]: any;
38
44
  };
39
45
  }
40
46
  export interface InsertManyRequest {
41
47
  collectionName: string;
48
+ ordered?: boolean;
42
49
  requestBody?: Array<{
43
- [key: string]: string;
50
+ [key: string]: any;
44
51
  }>;
45
52
  }
46
53
  export interface ListDocumentsRequest {
@@ -51,23 +58,31 @@ export interface ListDocumentsRequest {
51
58
  rowsPerPage?: number;
52
59
  page?: number;
53
60
  }
61
+ export interface SearchDocumentsRequest {
62
+ collectionName: string;
63
+ searchRequest: SearchRequest;
64
+ rowsPerPage?: number;
65
+ page?: number;
66
+ }
54
67
  export interface UpdateRequest {
55
68
  collectionName: string;
56
69
  documentId: string;
57
70
  requestBody: {
58
- [key: string]: string;
71
+ [key: string]: any;
59
72
  };
60
73
  }
61
74
  export interface UpdateDocumentPartialRequest {
62
75
  collectionName: string;
63
76
  documentId: string;
64
77
  requestBody: {
65
- [key: string]: string;
78
+ [key: string]: any;
66
79
  };
67
80
  }
68
81
  export interface UpdateManyRequest {
69
82
  collectionName: string;
70
83
  updateRequest: UpdateRequest;
84
+ matchAll?: boolean;
85
+ filter?: string;
71
86
  }
72
87
  /**
73
88
  *
@@ -87,6 +102,20 @@ export declare class DocumentApi extends runtime.BaseAPI {
87
102
  * Delete Document from Collection
88
103
  */
89
104
  _delete(requestParameters: DeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DeleteResponse>;
105
+ /**
106
+ * Creates request options for countDocuments without sending the request
107
+ */
108
+ countDocumentsRequestOpts(requestParameters: CountDocumentsRequest): Promise<runtime.RequestOpts>;
109
+ /**
110
+ * Count the Documents of the given Collection that match the filter without loading them
111
+ * Count Documents in Collection
112
+ */
113
+ countDocumentsRaw(requestParameters: CountDocumentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CountResponse>>;
114
+ /**
115
+ * Count the Documents of the given Collection that match the filter without loading them
116
+ * Count Documents in Collection
117
+ */
118
+ countDocuments(requestParameters: CountDocumentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CountResponse>;
90
119
  /**
91
120
  * Creates request options for deleteMany without sending the request
92
121
  */
@@ -110,14 +139,14 @@ export declare class DocumentApi extends runtime.BaseAPI {
110
139
  * Documents in Collection
111
140
  */
112
141
  findRaw(requestParameters: FindRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<{
113
- [key: string]: string;
142
+ [key: string]: any;
114
143
  }>>>;
115
144
  /**
116
145
  * Alternative to GET Route for more complex queries and URL max. Length
117
146
  * Documents in Collection
118
147
  */
119
148
  find(requestParameters: FindRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<{
120
- [key: string]: string;
149
+ [key: string]: any;
121
150
  }>>;
122
151
  /**
123
152
  * Creates request options for getDocument without sending the request
@@ -128,14 +157,14 @@ export declare class DocumentApi extends runtime.BaseAPI {
128
157
  * Document from Collection
129
158
  */
130
159
  getDocumentRaw(requestParameters: GetDocumentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<{
131
- [key: string]: string;
160
+ [key: string]: any;
132
161
  }>>;
133
162
  /**
134
163
  * Get one Document from given Collection
135
164
  * Document from Collection
136
165
  */
137
166
  getDocument(requestParameters: GetDocumentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{
138
- [key: string]: string;
167
+ [key: string]: any;
139
168
  }>;
140
169
  /**
141
170
  * Creates request options for insert without sending the request
@@ -174,14 +203,32 @@ export declare class DocumentApi extends runtime.BaseAPI {
174
203
  * Documents in Collection
175
204
  */
176
205
  listDocumentsRaw(requestParameters: ListDocumentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<{
177
- [key: string]: string;
206
+ [key: string]: any;
178
207
  }>>>;
179
208
  /**
180
209
  * Get Documents paginated from given Collection
181
210
  * Documents in Collection
182
211
  */
183
212
  listDocuments(requestParameters: ListDocumentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<{
184
- [key: string]: string;
213
+ [key: string]: any;
214
+ }>>;
215
+ /**
216
+ * Creates request options for searchDocuments without sending the request
217
+ */
218
+ searchDocumentsRequestOpts(requestParameters: SearchDocumentsRequest): Promise<runtime.RequestOpts>;
219
+ /**
220
+ * 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.
221
+ * Search Documents in Collection
222
+ */
223
+ searchDocumentsRaw(requestParameters: SearchDocumentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<{
224
+ [key: string]: any;
225
+ }>>>;
226
+ /**
227
+ * 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.
228
+ * Search Documents in Collection
229
+ */
230
+ searchDocuments(requestParameters: SearchDocumentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<{
231
+ [key: string]: any;
185
232
  }>>;
186
233
  /**
187
234
  * Creates request options for update without sending the request