@sfxcode/nuxt-mongocamp-server 1.8.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 (143) hide show
  1. package/dist/module.json +2 -2
  2. package/dist/module.mjs +1 -1
  3. package/dist/runtime/api/.openapi-generator/FILES +20 -0
  4. package/dist/runtime/api/.openapi-generator/VERSION +1 -1
  5. package/dist/runtime/api/apis/AdminApi.d.ts +65 -2
  6. package/dist/runtime/api/apis/AdminApi.js +39 -27
  7. package/dist/runtime/api/apis/ApplicationApi.d.ts +17 -2
  8. package/dist/runtime/api/apis/ApplicationApi.js +17 -11
  9. package/dist/runtime/api/apis/AuthApi.d.ts +17 -2
  10. package/dist/runtime/api/apis/AuthApi.js +27 -15
  11. package/dist/runtime/api/apis/BucketApi.d.ts +12 -2
  12. package/dist/runtime/api/apis/BucketApi.js +11 -9
  13. package/dist/runtime/api/apis/CollectionApi.d.ts +183 -6
  14. package/dist/runtime/api/apis/CollectionApi.js +233 -40
  15. package/dist/runtime/api/apis/DatabaseApi.d.ts +12 -2
  16. package/dist/runtime/api/apis/DatabaseApi.js +12 -10
  17. package/dist/runtime/api/apis/DocumentApi.d.ts +178 -15
  18. package/dist/runtime/api/apis/DocumentApi.js +54 -40
  19. package/dist/runtime/api/apis/FileApi.d.ts +78 -4
  20. package/dist/runtime/api/apis/FileApi.js +34 -24
  21. package/dist/runtime/api/apis/IndexApi.d.ts +83 -2
  22. package/dist/runtime/api/apis/IndexApi.js +46 -34
  23. package/dist/runtime/api/apis/JobsApi.d.ts +28 -2
  24. package/dist/runtime/api/apis/JobsApi.js +19 -15
  25. package/dist/runtime/api/apis/SystemApi.d.ts +48 -2
  26. package/dist/runtime/api/apis/SystemApi.js +146 -3
  27. package/dist/runtime/api/docs/Capabilities.md +42 -0
  28. package/dist/runtime/api/docs/CapabilityLimits.md +36 -0
  29. package/dist/runtime/api/docs/CollectionApi.md +251 -6
  30. package/dist/runtime/api/docs/CollectionCollation.md +40 -0
  31. package/dist/runtime/api/docs/CollectionOptions.md +46 -0
  32. package/dist/runtime/api/docs/CollectionStatus.md +1 -1
  33. package/dist/runtime/api/docs/ConnectionStats.md +38 -0
  34. package/dist/runtime/api/docs/CreateCollectionResponse.md +34 -0
  35. package/dist/runtime/api/docs/DatabaseInfo.md +1 -1
  36. package/dist/runtime/api/docs/DocumentApi.md +19 -19
  37. package/dist/runtime/api/docs/FileInformation.md +1 -1
  38. package/dist/runtime/api/docs/IndexInfo.md +3 -3
  39. package/dist/runtime/api/docs/IndexOptionsRequest.md +2 -2
  40. package/dist/runtime/api/docs/IndexUsage.md +1 -1
  41. package/dist/runtime/api/docs/JsonSchemaDefinition.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/OpCounters.md +44 -0
  45. package/dist/runtime/api/docs/ReplicaSetState.md +40 -0
  46. package/dist/runtime/api/docs/SettingsResponse.md +1 -1
  47. package/dist/runtime/api/docs/SystemApi.md +210 -0
  48. package/dist/runtime/api/docs/SystemInfo.md +36 -0
  49. package/dist/runtime/api/docs/SystemStats.md +42 -0
  50. package/dist/runtime/api/docs/UpdateFileInformationRequest.md +1 -1
  51. package/dist/runtime/api/docs/UpdateRequest.md +2 -2
  52. package/dist/runtime/api/models/BucketInformation.d.ts +1 -9
  53. package/dist/runtime/api/models/Capabilities.d.ts +47 -0
  54. package/dist/runtime/api/models/Capabilities.js +39 -0
  55. package/dist/runtime/api/models/CapabilityLimits.d.ts +34 -0
  56. package/dist/runtime/api/models/CapabilityLimits.js +29 -0
  57. package/dist/runtime/api/models/ClusterInformation.d.ts +1 -5
  58. package/dist/runtime/api/models/ClusterMemberInformation.d.ts +1 -11
  59. package/dist/runtime/api/models/CollectionCollation.d.ts +42 -0
  60. package/dist/runtime/api/models/CollectionCollation.js +32 -0
  61. package/dist/runtime/api/models/CollectionOptions.d.ts +57 -0
  62. package/dist/runtime/api/models/CollectionOptions.js +41 -0
  63. package/dist/runtime/api/models/CollectionPermission.d.ts +1 -9
  64. package/dist/runtime/api/models/CollectionStatus.d.ts +2 -28
  65. package/dist/runtime/api/models/CollectionStatus.js +3 -2
  66. package/dist/runtime/api/models/CollectionSummary.d.ts +1 -19
  67. package/dist/runtime/api/models/ConnectionStats.d.ts +38 -0
  68. package/dist/runtime/api/models/ConnectionStats.js +32 -0
  69. package/dist/runtime/api/models/CopyRequest.d.ts +1 -9
  70. package/dist/runtime/api/models/CopyResponse.d.ts +1 -7
  71. package/dist/runtime/api/models/CountResponse.d.ts +1 -3
  72. package/dist/runtime/api/models/CreateCollectionResponse.d.ts +30 -0
  73. package/dist/runtime/api/models/CreateCollectionResponse.js +26 -0
  74. package/dist/runtime/api/models/DatabaseInfo.d.ts +2 -12
  75. package/dist/runtime/api/models/DatabaseInfo.js +3 -2
  76. package/dist/runtime/api/models/DeleteResponse.d.ts +1 -5
  77. package/dist/runtime/api/models/ErrorDescription.d.ts +1 -7
  78. package/dist/runtime/api/models/FieldInfo.d.ts +1 -5
  79. package/dist/runtime/api/models/FieldTypeCount.d.ts +1 -5
  80. package/dist/runtime/api/models/FileInformation.d.ts +2 -14
  81. package/dist/runtime/api/models/FileInformation.js +4 -3
  82. package/dist/runtime/api/models/Grant.d.ts +1 -11
  83. package/dist/runtime/api/models/ImportResponse.d.ts +1 -11
  84. package/dist/runtime/api/models/IndexCreateRequest.d.ts +1 -7
  85. package/dist/runtime/api/models/IndexCreateResponse.d.ts +1 -3
  86. package/dist/runtime/api/models/IndexDropResponse.d.ts +1 -3
  87. package/dist/runtime/api/models/IndexInfo.d.ts +4 -26
  88. package/dist/runtime/api/models/IndexKey.d.ts +1 -5
  89. package/dist/runtime/api/models/IndexOptionsRequest.d.ts +3 -29
  90. package/dist/runtime/api/models/IndexUsage.d.ts +2 -10
  91. package/dist/runtime/api/models/IndexUsage.js +3 -2
  92. package/dist/runtime/api/models/InsertError.d.ts +1 -7
  93. package/dist/runtime/api/models/InsertResponse.d.ts +1 -9
  94. package/dist/runtime/api/models/JobConfig.d.ts +1 -13
  95. package/dist/runtime/api/models/JobInformation.d.ts +1 -19
  96. package/dist/runtime/api/models/JobInformation.js +5 -4
  97. package/dist/runtime/api/models/JsonSchema.d.ts +1 -7
  98. package/dist/runtime/api/models/JsonSchemaDefinition.d.ts +2 -12
  99. package/dist/runtime/api/models/JsonValueAny.d.ts +1 -3
  100. package/dist/runtime/api/models/JsonValueBoolean.d.ts +1 -3
  101. package/dist/runtime/api/models/JsonValueString.d.ts +1 -3
  102. package/dist/runtime/api/models/Login.d.ts +1 -5
  103. package/dist/runtime/api/models/LoginResult.d.ts +1 -7
  104. package/dist/runtime/api/models/LoginResult.js +3 -2
  105. package/dist/runtime/api/models/MongoAggregateRequest.d.ts +1 -5
  106. package/dist/runtime/api/models/MongoCampConfiguration.d.ts +1 -11
  107. package/dist/runtime/api/models/MongoFindRequest.d.ts +4 -10
  108. package/dist/runtime/api/models/MongoIndex.d.ts +4 -28
  109. package/dist/runtime/api/models/MongoIndex.js +3 -2
  110. package/dist/runtime/api/models/OpCounters.d.ts +50 -0
  111. package/dist/runtime/api/models/OpCounters.js +41 -0
  112. package/dist/runtime/api/models/PasswordUpdateRequest.d.ts +1 -3
  113. package/dist/runtime/api/models/PipelineStage.d.ts +1 -5
  114. package/dist/runtime/api/models/RenameRequest.d.ts +1 -5
  115. package/dist/runtime/api/models/RenameResponse.d.ts +1 -3
  116. package/dist/runtime/api/models/ReplicaSetState.d.ts +42 -0
  117. package/dist/runtime/api/models/ReplicaSetState.js +35 -0
  118. package/dist/runtime/api/models/Role.d.ts +1 -7
  119. package/dist/runtime/api/models/SchemaAnalysis.d.ts +1 -9
  120. package/dist/runtime/api/models/SchemaAnalysisField.d.ts +1 -13
  121. package/dist/runtime/api/models/SchemaAnalysisFieldType.d.ts +1 -7
  122. package/dist/runtime/api/models/SearchRequest.d.ts +1 -7
  123. package/dist/runtime/api/models/SettingsResponse.d.ts +2 -10
  124. package/dist/runtime/api/models/SystemInfo.d.ts +34 -0
  125. package/dist/runtime/api/models/SystemInfo.js +28 -0
  126. package/dist/runtime/api/models/SystemStats.d.ts +49 -0
  127. package/dist/runtime/api/models/SystemStats.js +46 -0
  128. package/dist/runtime/api/models/UpdateFileInformationRequest.d.ts +2 -6
  129. package/dist/runtime/api/models/UpdateRequest.d.ts +3 -7
  130. package/dist/runtime/api/models/UpdateResponse.d.ts +1 -9
  131. package/dist/runtime/api/models/UpdateRoleRequest.d.ts +1 -5
  132. package/dist/runtime/api/models/UserInformation.d.ts +1 -9
  133. package/dist/runtime/api/models/UserProfile.d.ts +1 -11
  134. package/dist/runtime/api/models/Version.d.ts +1 -7
  135. package/dist/runtime/api/models/Version.js +3 -2
  136. package/dist/runtime/api/models/index.d.ts +10 -0
  137. package/dist/runtime/api/models/index.js +10 -0
  138. package/dist/runtime/api/runtime.d.ts +35 -2
  139. package/dist/runtime/api/runtime.js +84 -4
  140. package/dist/runtime/composables/mongocampApiFiles.d.ts +1 -1
  141. package/dist/runtime/composables/mongocampStorage.d.ts +7 -1
  142. package/dist/runtime/composables/mongocampStorage.js +12 -8
  143. package/package.json +4 -4
@@ -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.1
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,21 +10,47 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime.js';
13
- import type { JobConfig, JobInformation, JsonValueBoolean } from '../models/index.js';
13
+ import { type JobConfig } from '../models/JobConfig.js';
14
+ import { type JobInformation } from '../models/JobInformation.js';
15
+ import { type JsonValueBoolean } from '../models/JsonValueBoolean.js';
14
16
  export interface DeleteJobRequest {
17
+ /**
18
+ * Group Name of the Job
19
+ */
15
20
  jobGroup: string;
21
+ /**
22
+ * Name of the Job
23
+ */
16
24
  jobName: string;
17
25
  }
18
26
  export interface ExecuteJobRequest {
27
+ /**
28
+ * Group Name of the Job
29
+ */
19
30
  jobGroup: string;
31
+ /**
32
+ * Name of the Job
33
+ */
20
34
  jobName: string;
21
35
  }
22
36
  export interface RegisterJobRequest {
37
+ /**
38
+ *
39
+ */
23
40
  jobConfig: JobConfig;
24
41
  }
25
42
  export interface UpdateJobRequest {
43
+ /**
44
+ * Group Name of the Job
45
+ */
26
46
  jobGroup: string;
47
+ /**
48
+ * Name of the Job
49
+ */
27
50
  jobName: string;
51
+ /**
52
+ *
53
+ */
28
54
  jobConfig: JobConfig;
29
55
  }
30
56
  /**
@@ -1,9 +1,13 @@
1
1
  import * as runtime from "../runtime.js";
2
2
  import {
3
- JobConfigToJSON,
4
- JobInformationFromJSON,
3
+ JobConfigToJSON
4
+ } from "../models/JobConfig.js";
5
+ import {
6
+ JobInformationFromJSON
7
+ } from "../models/JobInformation.js";
8
+ import {
5
9
  JsonValueBooleanFromJSON
6
- } from "../models/index.js";
10
+ } from "../models/JsonValueBoolean.js";
7
11
  export class JobsApi extends runtime.BaseAPI {
8
12
  /**
9
13
  * Creates request options for deleteJob without sending the request
@@ -24,7 +28,7 @@ export class JobsApi extends runtime.BaseAPI {
24
28
  const queryParameters = {};
25
29
  const headerParameters = {};
26
30
  if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
27
- headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
31
+ headerParameters["Authorization"] = "Basic " + btoa((this.configuration.username || "") + ":" + (this.configuration.password || ""));
28
32
  }
29
33
  if (this.configuration && this.configuration.accessToken) {
30
34
  const token = this.configuration.accessToken;
@@ -37,8 +41,8 @@ export class JobsApi extends runtime.BaseAPI {
37
41
  headerParameters["X-AUTH-APIKEY"] = await this.configuration.apiKey("X-AUTH-APIKEY");
38
42
  }
39
43
  let urlPath = `/system/jobs/{jobGroup}/{jobName}`;
40
- urlPath = urlPath.replace(`{${"jobGroup"}}`, encodeURIComponent(String(requestParameters["jobGroup"])));
41
- urlPath = urlPath.replace(`{${"jobName"}}`, encodeURIComponent(String(requestParameters["jobName"])));
44
+ urlPath = urlPath.replace("{jobGroup}", encodeURIComponent(String(requestParameters["jobGroup"])));
45
+ urlPath = urlPath.replace("{jobName}", encodeURIComponent(String(requestParameters["jobName"])));
42
46
  return {
43
47
  path: urlPath,
44
48
  method: "DELETE",
@@ -82,7 +86,7 @@ export class JobsApi extends runtime.BaseAPI {
82
86
  const queryParameters = {};
83
87
  const headerParameters = {};
84
88
  if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
85
- headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
89
+ headerParameters["Authorization"] = "Basic " + btoa((this.configuration.username || "") + ":" + (this.configuration.password || ""));
86
90
  }
87
91
  if (this.configuration && this.configuration.accessToken) {
88
92
  const token = this.configuration.accessToken;
@@ -95,8 +99,8 @@ export class JobsApi extends runtime.BaseAPI {
95
99
  headerParameters["X-AUTH-APIKEY"] = await this.configuration.apiKey("X-AUTH-APIKEY");
96
100
  }
97
101
  let urlPath = `/system/jobs/{jobGroup}/{jobName}`;
98
- urlPath = urlPath.replace(`{${"jobGroup"}}`, encodeURIComponent(String(requestParameters["jobGroup"])));
99
- urlPath = urlPath.replace(`{${"jobName"}}`, encodeURIComponent(String(requestParameters["jobName"])));
102
+ urlPath = urlPath.replace("{jobGroup}", encodeURIComponent(String(requestParameters["jobGroup"])));
103
+ urlPath = urlPath.replace("{jobName}", encodeURIComponent(String(requestParameters["jobName"])));
100
104
  return {
101
105
  path: urlPath,
102
106
  method: "POST",
@@ -128,7 +132,7 @@ export class JobsApi extends runtime.BaseAPI {
128
132
  const queryParameters = {};
129
133
  const headerParameters = {};
130
134
  if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
131
- headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
135
+ headerParameters["Authorization"] = "Basic " + btoa((this.configuration.username || "") + ":" + (this.configuration.password || ""));
132
136
  }
133
137
  if (this.configuration && this.configuration.accessToken) {
134
138
  const token = this.configuration.accessToken;
@@ -172,7 +176,7 @@ export class JobsApi extends runtime.BaseAPI {
172
176
  const queryParameters = {};
173
177
  const headerParameters = {};
174
178
  if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
175
- headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
179
+ headerParameters["Authorization"] = "Basic " + btoa((this.configuration.username || "") + ":" + (this.configuration.password || ""));
176
180
  }
177
181
  if (this.configuration && this.configuration.accessToken) {
178
182
  const token = this.configuration.accessToken;
@@ -223,7 +227,7 @@ export class JobsApi extends runtime.BaseAPI {
223
227
  const headerParameters = {};
224
228
  headerParameters["Content-Type"] = "application/json";
225
229
  if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
226
- headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
230
+ headerParameters["Authorization"] = "Basic " + btoa((this.configuration.username || "") + ":" + (this.configuration.password || ""));
227
231
  }
228
232
  if (this.configuration && this.configuration.accessToken) {
229
233
  const token = this.configuration.accessToken;
@@ -287,7 +291,7 @@ export class JobsApi extends runtime.BaseAPI {
287
291
  const headerParameters = {};
288
292
  headerParameters["Content-Type"] = "application/json";
289
293
  if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
290
- headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
294
+ headerParameters["Authorization"] = "Basic " + btoa((this.configuration.username || "") + ":" + (this.configuration.password || ""));
291
295
  }
292
296
  if (this.configuration && this.configuration.accessToken) {
293
297
  const token = this.configuration.accessToken;
@@ -300,8 +304,8 @@ export class JobsApi extends runtime.BaseAPI {
300
304
  headerParameters["X-AUTH-APIKEY"] = await this.configuration.apiKey("X-AUTH-APIKEY");
301
305
  }
302
306
  let urlPath = `/system/jobs/{jobGroup}/{jobName}`;
303
- urlPath = urlPath.replace(`{${"jobGroup"}}`, encodeURIComponent(String(requestParameters["jobGroup"])));
304
- urlPath = urlPath.replace(`{${"jobName"}}`, encodeURIComponent(String(requestParameters["jobName"])));
307
+ urlPath = urlPath.replace("{jobGroup}", encodeURIComponent(String(requestParameters["jobGroup"])));
308
+ urlPath = urlPath.replace("{jobName}", encodeURIComponent(String(requestParameters["jobName"])));
305
309
  return {
306
310
  path: urlPath,
307
311
  method: "PATCH",
@@ -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.1
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,11 +10,57 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime.js';
13
- import type { ClusterInformation, Version } from '../models/index.js';
13
+ import { type Capabilities } from '../models/Capabilities.js';
14
+ import { type ClusterInformation } from '../models/ClusterInformation.js';
15
+ import { type SystemInfo } from '../models/SystemInfo.js';
16
+ import { type SystemStats } from '../models/SystemStats.js';
17
+ import { type Version } from '../models/Version.js';
14
18
  /**
15
19
  *
16
20
  */
17
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>;
18
64
  /**
19
65
  * Creates request options for version without sending the request
20
66
  */
@@ -1,9 +1,152 @@
1
1
  import * as runtime from "../runtime.js";
2
2
  import {
3
- ClusterInformationFromJSON,
3
+ CapabilitiesFromJSON
4
+ } from "../models/Capabilities.js";
5
+ import {
6
+ ClusterInformationFromJSON
7
+ } from "../models/ClusterInformation.js";
8
+ import {
9
+ SystemInfoFromJSON
10
+ } from "../models/SystemInfo.js";
11
+ import {
12
+ SystemStatsFromJSON
13
+ } from "../models/SystemStats.js";
14
+ import {
4
15
  VersionFromJSON
5
- } from "../models/index.js";
16
+ } from "../models/Version.js";
6
17
  export class SystemApi extends runtime.BaseAPI {
18
+ /**
19
+ * Creates request options for systemCapabilities without sending the request
20
+ */
21
+ async systemCapabilitiesRequestOpts() {
22
+ const queryParameters = {};
23
+ const headerParameters = {};
24
+ if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
25
+ headerParameters["Authorization"] = "Basic " + btoa((this.configuration.username || "") + ":" + (this.configuration.password || ""));
26
+ }
27
+ if (this.configuration && this.configuration.accessToken) {
28
+ const token = this.configuration.accessToken;
29
+ const tokenString = await token("httpAuth", []);
30
+ if (tokenString) {
31
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
32
+ }
33
+ }
34
+ if (this.configuration && this.configuration.apiKey) {
35
+ headerParameters["X-AUTH-APIKEY"] = await this.configuration.apiKey("X-AUTH-APIKEY");
36
+ }
37
+ let urlPath = `/system/capabilities`;
38
+ return {
39
+ path: urlPath,
40
+ method: "GET",
41
+ headers: headerParameters,
42
+ query: queryParameters
43
+ };
44
+ }
45
+ /**
46
+ * 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.
47
+ * System Capabilities
48
+ */
49
+ async systemCapabilitiesRaw(initOverrides) {
50
+ const requestOptions = await this.systemCapabilitiesRequestOpts();
51
+ const response = await this.request(requestOptions, initOverrides);
52
+ return new runtime.JSONApiResponse(response, (jsonValue) => CapabilitiesFromJSON(jsonValue));
53
+ }
54
+ /**
55
+ * 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.
56
+ * System Capabilities
57
+ */
58
+ async systemCapabilities(initOverrides) {
59
+ const response = await this.systemCapabilitiesRaw(initOverrides);
60
+ return await response.value();
61
+ }
62
+ /**
63
+ * Creates request options for systemInfo without sending the request
64
+ */
65
+ async systemInfoRequestOpts() {
66
+ const queryParameters = {};
67
+ const headerParameters = {};
68
+ if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
69
+ headerParameters["Authorization"] = "Basic " + btoa((this.configuration.username || "") + ":" + (this.configuration.password || ""));
70
+ }
71
+ if (this.configuration && this.configuration.accessToken) {
72
+ const token = this.configuration.accessToken;
73
+ const tokenString = await token("httpAuth", []);
74
+ if (tokenString) {
75
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
76
+ }
77
+ }
78
+ if (this.configuration && this.configuration.apiKey) {
79
+ headerParameters["X-AUTH-APIKEY"] = await this.configuration.apiKey("X-AUTH-APIKEY");
80
+ }
81
+ let urlPath = `/system/info`;
82
+ return {
83
+ path: urlPath,
84
+ method: "GET",
85
+ headers: headerParameters,
86
+ query: queryParameters
87
+ };
88
+ }
89
+ /**
90
+ * Information about the system the server is connected to: the version of the MongoDB server
91
+ * System Information
92
+ */
93
+ async systemInfoRaw(initOverrides) {
94
+ const requestOptions = await this.systemInfoRequestOpts();
95
+ const response = await this.request(requestOptions, initOverrides);
96
+ return new runtime.JSONApiResponse(response, (jsonValue) => SystemInfoFromJSON(jsonValue));
97
+ }
98
+ /**
99
+ * Information about the system the server is connected to: the version of the MongoDB server
100
+ * System Information
101
+ */
102
+ async systemInfo(initOverrides) {
103
+ const response = await this.systemInfoRaw(initOverrides);
104
+ return await response.value();
105
+ }
106
+ /**
107
+ * Creates request options for systemStats without sending the request
108
+ */
109
+ async systemStatsRequestOpts() {
110
+ const queryParameters = {};
111
+ const headerParameters = {};
112
+ if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
113
+ headerParameters["Authorization"] = "Basic " + btoa((this.configuration.username || "") + ":" + (this.configuration.password || ""));
114
+ }
115
+ if (this.configuration && this.configuration.accessToken) {
116
+ const token = this.configuration.accessToken;
117
+ const tokenString = await token("httpAuth", []);
118
+ if (tokenString) {
119
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
120
+ }
121
+ }
122
+ if (this.configuration && this.configuration.apiKey) {
123
+ headerParameters["X-AUTH-APIKEY"] = await this.configuration.apiKey("X-AUTH-APIKEY");
124
+ }
125
+ let urlPath = `/system/stats`;
126
+ return {
127
+ path: urlPath,
128
+ method: "GET",
129
+ headers: headerParameters,
130
+ query: queryParameters
131
+ };
132
+ }
133
+ /**
134
+ * 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.
135
+ * System Statistics
136
+ */
137
+ async systemStatsRaw(initOverrides) {
138
+ const requestOptions = await this.systemStatsRequestOpts();
139
+ const response = await this.request(requestOptions, initOverrides);
140
+ return new runtime.JSONApiResponse(response, (jsonValue) => SystemStatsFromJSON(jsonValue));
141
+ }
142
+ /**
143
+ * 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.
144
+ * System Statistics
145
+ */
146
+ async systemStats(initOverrides) {
147
+ const response = await this.systemStatsRaw(initOverrides);
148
+ return await response.value();
149
+ }
7
150
  /**
8
151
  * Creates request options for version without sending the request
9
152
  */
@@ -42,7 +185,7 @@ export class SystemApi extends runtime.BaseAPI {
42
185
  const queryParameters = {};
43
186
  const headerParameters = {};
44
187
  if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
45
- headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
188
+ headerParameters["Authorization"] = "Basic " + btoa((this.configuration.username || "") + ":" + (this.configuration.password || ""));
46
189
  }
47
190
  if (this.configuration && this.configuration.accessToken) {
48
191
  const token = this.configuration.accessToken;
@@ -0,0 +1,42 @@
1
+
2
+ # Capabilities
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `serverVersion` | string
10
+ `mongoDbMajor` | number
11
+ `features` | Array&lt;string&gt;
12
+ `limits` | [CapabilityLimits](CapabilityLimits.md)
13
+ `aggregationStagesDenied` | Array&lt;string&gt;
14
+
15
+ ## Example
16
+
17
+ ```typescript
18
+ import type { Capabilities } from ''
19
+
20
+ // TODO: Update the object below with actual values
21
+ const example = {
22
+ "serverVersion": null,
23
+ "mongoDbMajor": null,
24
+ "features": null,
25
+ "limits": null,
26
+ "aggregationStagesDenied": null,
27
+ } satisfies Capabilities
28
+
29
+ console.log(example)
30
+
31
+ // Convert the instance to a JSON string
32
+ const exampleJSON: string = JSON.stringify(example)
33
+ console.log(exampleJSON)
34
+
35
+ // Parse the JSON string back to an object
36
+ const exampleParsed = JSON.parse(exampleJSON) as Capabilities
37
+ console.log(exampleParsed)
38
+ ```
39
+
40
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
41
+
42
+
@@ -0,0 +1,36 @@
1
+
2
+ # CapabilityLimits
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `importMaxBytes` | number
10
+ `grantDeniedStatus` | number
11
+
12
+ ## Example
13
+
14
+ ```typescript
15
+ import type { CapabilityLimits } from ''
16
+
17
+ // TODO: Update the object below with actual values
18
+ const example = {
19
+ "importMaxBytes": null,
20
+ "grantDeniedStatus": null,
21
+ } satisfies CapabilityLimits
22
+
23
+ console.log(example)
24
+
25
+ // Convert the instance to a JSON string
26
+ const exampleJSON: string = JSON.stringify(example)
27
+ console.log(exampleJSON)
28
+
29
+ // Parse the JSON string back to an object
30
+ const exampleParsed = JSON.parse(exampleJSON) as CapabilityLimits
31
+ console.log(exampleParsed)
32
+ ```
33
+
34
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
35
+
36
+