@sfxcode/nuxt-mongocamp-server 0.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 (129) hide show
  1. package/README.md +38 -0
  2. package/dist/module.cjs +5 -0
  3. package/dist/module.d.ts +9 -0
  4. package/dist/module.json +5 -0
  5. package/dist/module.mjs +72 -0
  6. package/dist/runtime/api/apis/AdminApi.d.ts +181 -0
  7. package/dist/runtime/api/apis/AdminApi.mjs +413 -0
  8. package/dist/runtime/api/apis/ApplicationApi.d.ts +68 -0
  9. package/dist/runtime/api/apis/ApplicationApi.mjs +147 -0
  10. package/dist/runtime/api/apis/AuthApi.d.ts +107 -0
  11. package/dist/runtime/api/apis/AuthApi.mjs +235 -0
  12. package/dist/runtime/api/apis/BucketApi.d.ts +67 -0
  13. package/dist/runtime/api/apis/BucketApi.mjs +128 -0
  14. package/dist/runtime/api/apis/CollectionApi.d.ts +161 -0
  15. package/dist/runtime/api/apis/CollectionApi.mjs +355 -0
  16. package/dist/runtime/api/apis/DatabaseApi.d.ts +77 -0
  17. package/dist/runtime/api/apis/DatabaseApi.mjs +156 -0
  18. package/dist/runtime/api/apis/DocumentApi.d.ts +188 -0
  19. package/dist/runtime/api/apis/DocumentApi.mjs +385 -0
  20. package/dist/runtime/api/apis/FileApi.d.ts +125 -0
  21. package/dist/runtime/api/apis/FileApi.mjs +299 -0
  22. package/dist/runtime/api/apis/IndexApi.d.ts +137 -0
  23. package/dist/runtime/api/apis/IndexApi.mjs +303 -0
  24. package/dist/runtime/api/apis/InformationApi.d.ts +28 -0
  25. package/dist/runtime/api/apis/InformationApi.mjs +21 -0
  26. package/dist/runtime/api/apis/JobsApi.d.ts +94 -0
  27. package/dist/runtime/api/apis/JobsApi.mjs +204 -0
  28. package/dist/runtime/api/apis/index.d.ts +11 -0
  29. package/dist/runtime/api/apis/index.mjs +11 -0
  30. package/dist/runtime/api/index.d.ts +3 -0
  31. package/dist/runtime/api/index.mjs +3 -0
  32. package/dist/runtime/api/models/BucketInformation.d.ts +45 -0
  33. package/dist/runtime/api/models/BucketInformation.mjs +28 -0
  34. package/dist/runtime/api/models/CollectionStatus.d.ts +103 -0
  35. package/dist/runtime/api/models/CollectionStatus.mjs +46 -0
  36. package/dist/runtime/api/models/DatabaseInfo.d.ts +53 -0
  37. package/dist/runtime/api/models/DatabaseInfo.mjs +30 -0
  38. package/dist/runtime/api/models/DeleteResponse.d.ts +33 -0
  39. package/dist/runtime/api/models/DeleteResponse.mjs +24 -0
  40. package/dist/runtime/api/models/ErrorDescription.d.ts +39 -0
  41. package/dist/runtime/api/models/ErrorDescription.mjs +26 -0
  42. package/dist/runtime/api/models/FileInformation.d.ts +59 -0
  43. package/dist/runtime/api/models/FileInformation.mjs +32 -0
  44. package/dist/runtime/api/models/Grant.d.ts +51 -0
  45. package/dist/runtime/api/models/Grant.mjs +30 -0
  46. package/dist/runtime/api/models/IndexCreateRequest.d.ts +36 -0
  47. package/dist/runtime/api/models/IndexCreateRequest.mjs +29 -0
  48. package/dist/runtime/api/models/IndexCreateResponse.d.ts +27 -0
  49. package/dist/runtime/api/models/IndexCreateResponse.mjs +22 -0
  50. package/dist/runtime/api/models/IndexDropResponse.d.ts +27 -0
  51. package/dist/runtime/api/models/IndexDropResponse.mjs +22 -0
  52. package/dist/runtime/api/models/IndexOptionsRequest.d.ts +69 -0
  53. package/dist/runtime/api/models/IndexOptionsRequest.mjs +37 -0
  54. package/dist/runtime/api/models/InsertResponse.d.ts +33 -0
  55. package/dist/runtime/api/models/InsertResponse.mjs +25 -0
  56. package/dist/runtime/api/models/JobConfig.d.ts +57 -0
  57. package/dist/runtime/api/models/JobConfig.mjs +32 -0
  58. package/dist/runtime/api/models/JobInformation.d.ts +75 -0
  59. package/dist/runtime/api/models/JobInformation.mjs +39 -0
  60. package/dist/runtime/api/models/JsonResultBoolean.d.ts +27 -0
  61. package/dist/runtime/api/models/JsonResultBoolean.mjs +22 -0
  62. package/dist/runtime/api/models/JsonResultString.d.ts +27 -0
  63. package/dist/runtime/api/models/JsonResultString.mjs +22 -0
  64. package/dist/runtime/api/models/JsonSchema.d.ts +42 -0
  65. package/dist/runtime/api/models/JsonSchema.mjs +31 -0
  66. package/dist/runtime/api/models/JsonSchemaDefinition.d.ts +55 -0
  67. package/dist/runtime/api/models/JsonSchemaDefinition.mjs +31 -0
  68. package/dist/runtime/api/models/Login.d.ts +33 -0
  69. package/dist/runtime/api/models/Login.mjs +24 -0
  70. package/dist/runtime/api/models/LoginResult.d.ts +40 -0
  71. package/dist/runtime/api/models/LoginResult.mjs +30 -0
  72. package/dist/runtime/api/models/Measurement.d.ts +33 -0
  73. package/dist/runtime/api/models/Measurement.mjs +24 -0
  74. package/dist/runtime/api/models/Metric.d.ts +52 -0
  75. package/dist/runtime/api/models/Metric.mjs +35 -0
  76. package/dist/runtime/api/models/MongoAggregateRequest.d.ts +34 -0
  77. package/dist/runtime/api/models/MongoAggregateRequest.mjs +29 -0
  78. package/dist/runtime/api/models/MongoFindRequest.d.ts +45 -0
  79. package/dist/runtime/api/models/MongoFindRequest.mjs +26 -0
  80. package/dist/runtime/api/models/MongoIndex.d.ts +99 -0
  81. package/dist/runtime/api/models/MongoIndex.mjs +45 -0
  82. package/dist/runtime/api/models/PasswordUpdateRequest.d.ts +27 -0
  83. package/dist/runtime/api/models/PasswordUpdateRequest.mjs +22 -0
  84. package/dist/runtime/api/models/PipelineStage.d.ts +33 -0
  85. package/dist/runtime/api/models/PipelineStage.mjs +24 -0
  86. package/dist/runtime/api/models/Role.d.ts +40 -0
  87. package/dist/runtime/api/models/Role.mjs +31 -0
  88. package/dist/runtime/api/models/SchemaAnalysis.d.ts +46 -0
  89. package/dist/runtime/api/models/SchemaAnalysis.mjs +33 -0
  90. package/dist/runtime/api/models/SchemaAnalysisField.d.ts +58 -0
  91. package/dist/runtime/api/models/SchemaAnalysisField.mjs +37 -0
  92. package/dist/runtime/api/models/SchemaAnalysisFieldType.d.ts +39 -0
  93. package/dist/runtime/api/models/SchemaAnalysisFieldType.mjs +26 -0
  94. package/dist/runtime/api/models/SettingsResponse.d.ts +47 -0
  95. package/dist/runtime/api/models/SettingsResponse.mjs +29 -0
  96. package/dist/runtime/api/models/UpdateFileInformationRequest.d.ts +35 -0
  97. package/dist/runtime/api/models/UpdateFileInformationRequest.mjs +25 -0
  98. package/dist/runtime/api/models/UpdateRequest.d.ts +37 -0
  99. package/dist/runtime/api/models/UpdateRequest.mjs +24 -0
  100. package/dist/runtime/api/models/UpdateResponse.d.ts +45 -0
  101. package/dist/runtime/api/models/UpdateResponse.mjs +29 -0
  102. package/dist/runtime/api/models/UpdateRoleRequest.d.ts +34 -0
  103. package/dist/runtime/api/models/UpdateRoleRequest.mjs +29 -0
  104. package/dist/runtime/api/models/UserInformation.d.ts +45 -0
  105. package/dist/runtime/api/models/UserInformation.mjs +29 -0
  106. package/dist/runtime/api/models/UserProfile.d.ts +52 -0
  107. package/dist/runtime/api/models/UserProfile.mjs +35 -0
  108. package/dist/runtime/api/models/Version.d.ts +39 -0
  109. package/dist/runtime/api/models/Version.mjs +26 -0
  110. package/dist/runtime/api/models/index.d.ts +39 -0
  111. package/dist/runtime/api/models/index.mjs +39 -0
  112. package/dist/runtime/api/runtime.d.ts +140 -0
  113. package/dist/runtime/api/runtime.mjs +196 -0
  114. package/dist/runtime/composables/mongocampApi.d.ts +14 -0
  115. package/dist/runtime/composables/mongocampApi.mjs +45 -0
  116. package/dist/runtime/composables/mongocampAuth.d.ts +9 -0
  117. package/dist/runtime/composables/mongocampAuth.mjs +52 -0
  118. package/dist/runtime/composables/mongocampSearch.d.ts +6 -0
  119. package/dist/runtime/composables/mongocampSearch.mjs +12 -0
  120. package/dist/runtime/composables/mongocampToken.d.ts +1 -0
  121. package/dist/runtime/composables/mongocampToken.mjs +10 -0
  122. package/dist/runtime/composables/mongocampUrl.d.ts +1 -0
  123. package/dist/runtime/composables/mongocampUrl.mjs +5 -0
  124. package/dist/runtime/composables/mongocampUser.d.ts +3 -0
  125. package/dist/runtime/composables/mongocampUser.mjs +2 -0
  126. package/dist/runtime/plugin.d.ts +2 -0
  127. package/dist/runtime/plugin.mjs +6 -0
  128. package/dist/types.d.ts +10 -0
  129. package/package.json +37 -0
@@ -0,0 +1,413 @@
1
+ import * as runtime from "../runtime.mjs";
2
+ import {
3
+ JsonResultBooleanFromJSON,
4
+ JsonResultStringFromJSON,
5
+ PasswordUpdateRequestToJSON,
6
+ RoleFromJSON,
7
+ RoleToJSON,
8
+ UpdateRoleRequestToJSON,
9
+ UserInformationToJSON,
10
+ UserProfileFromJSON
11
+ } from "../models";
12
+ export class AdminApi extends runtime.BaseAPI {
13
+ async addRoleRaw(requestParameters, initOverrides) {
14
+ if (requestParameters.role === null || requestParameters.role === void 0) {
15
+ throw new runtime.RequiredError("role", "Required parameter requestParameters.role was null or undefined when calling addRole.");
16
+ }
17
+ const queryParameters = {};
18
+ const headerParameters = {};
19
+ headerParameters["Content-Type"] = "application/json";
20
+ if (this.configuration && this.configuration.apiKey) {
21
+ headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
22
+ }
23
+ if (this.configuration && this.configuration.accessToken) {
24
+ const token = this.configuration.accessToken;
25
+ const tokenString = await token("httpAuth", []);
26
+ if (tokenString) {
27
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
28
+ }
29
+ }
30
+ if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
31
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
32
+ }
33
+ const response = await this.request({
34
+ path: `/admin/roles`,
35
+ method: "PUT",
36
+ headers: headerParameters,
37
+ query: queryParameters,
38
+ body: RoleToJSON(requestParameters.role)
39
+ }, initOverrides);
40
+ return new runtime.JSONApiResponse(response, (jsonValue) => RoleFromJSON(jsonValue));
41
+ }
42
+ async addRole(requestParameters, initOverrides) {
43
+ const response = await this.addRoleRaw(requestParameters, initOverrides);
44
+ return await response.value();
45
+ }
46
+ async addUserRaw(requestParameters, initOverrides) {
47
+ if (requestParameters.userInformation === null || requestParameters.userInformation === void 0) {
48
+ throw new runtime.RequiredError("userInformation", "Required parameter requestParameters.userInformation was null or undefined when calling addUser.");
49
+ }
50
+ const queryParameters = {};
51
+ const headerParameters = {};
52
+ headerParameters["Content-Type"] = "application/json";
53
+ if (this.configuration && this.configuration.apiKey) {
54
+ headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
55
+ }
56
+ if (this.configuration && this.configuration.accessToken) {
57
+ const token = this.configuration.accessToken;
58
+ const tokenString = await token("httpAuth", []);
59
+ if (tokenString) {
60
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
61
+ }
62
+ }
63
+ if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
64
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
65
+ }
66
+ const response = await this.request({
67
+ path: `/admin/users`,
68
+ method: "PUT",
69
+ headers: headerParameters,
70
+ query: queryParameters,
71
+ body: UserInformationToJSON(requestParameters.userInformation)
72
+ }, initOverrides);
73
+ return new runtime.JSONApiResponse(response, (jsonValue) => UserProfileFromJSON(jsonValue));
74
+ }
75
+ async addUser(requestParameters, initOverrides) {
76
+ const response = await this.addUserRaw(requestParameters, initOverrides);
77
+ return await response.value();
78
+ }
79
+ async deleteRoleRaw(requestParameters, initOverrides) {
80
+ if (requestParameters.roleName === null || requestParameters.roleName === void 0) {
81
+ throw new runtime.RequiredError("roleName", "Required parameter requestParameters.roleName was null or undefined when calling deleteRole.");
82
+ }
83
+ const queryParameters = {};
84
+ const headerParameters = {};
85
+ if (this.configuration && this.configuration.apiKey) {
86
+ headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
87
+ }
88
+ if (this.configuration && this.configuration.accessToken) {
89
+ const token = this.configuration.accessToken;
90
+ const tokenString = await token("httpAuth", []);
91
+ if (tokenString) {
92
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
93
+ }
94
+ }
95
+ if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
96
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
97
+ }
98
+ const response = await this.request({
99
+ path: `/admin/roles/{roleName}`.replace(`{${"roleName"}}`, encodeURIComponent(String(requestParameters.roleName))),
100
+ method: "DELETE",
101
+ headers: headerParameters,
102
+ query: queryParameters
103
+ }, initOverrides);
104
+ return new runtime.JSONApiResponse(response, (jsonValue) => JsonResultBooleanFromJSON(jsonValue));
105
+ }
106
+ async deleteRole(requestParameters, initOverrides) {
107
+ const response = await this.deleteRoleRaw(requestParameters, initOverrides);
108
+ return await response.value();
109
+ }
110
+ async deleteUserRaw(requestParameters, initOverrides) {
111
+ if (requestParameters.userId === null || requestParameters.userId === void 0) {
112
+ throw new runtime.RequiredError("userId", "Required parameter requestParameters.userId was null or undefined when calling deleteUser.");
113
+ }
114
+ const queryParameters = {};
115
+ const headerParameters = {};
116
+ if (this.configuration && this.configuration.apiKey) {
117
+ headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
118
+ }
119
+ if (this.configuration && this.configuration.accessToken) {
120
+ const token = this.configuration.accessToken;
121
+ const tokenString = await token("httpAuth", []);
122
+ if (tokenString) {
123
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
124
+ }
125
+ }
126
+ if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
127
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
128
+ }
129
+ const response = await this.request({
130
+ path: `/admin/users/{userId}`.replace(`{${"userId"}}`, encodeURIComponent(String(requestParameters.userId))),
131
+ method: "DELETE",
132
+ headers: headerParameters,
133
+ query: queryParameters
134
+ }, initOverrides);
135
+ return new runtime.JSONApiResponse(response, (jsonValue) => JsonResultBooleanFromJSON(jsonValue));
136
+ }
137
+ async deleteUser(requestParameters, initOverrides) {
138
+ const response = await this.deleteUserRaw(requestParameters, initOverrides);
139
+ return await response.value();
140
+ }
141
+ async getRoleRaw(requestParameters, initOverrides) {
142
+ if (requestParameters.roleName === null || requestParameters.roleName === void 0) {
143
+ throw new runtime.RequiredError("roleName", "Required parameter requestParameters.roleName was null or undefined when calling getRole.");
144
+ }
145
+ const queryParameters = {};
146
+ const headerParameters = {};
147
+ if (this.configuration && this.configuration.apiKey) {
148
+ headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
149
+ }
150
+ if (this.configuration && this.configuration.accessToken) {
151
+ const token = this.configuration.accessToken;
152
+ const tokenString = await token("httpAuth", []);
153
+ if (tokenString) {
154
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
155
+ }
156
+ }
157
+ if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
158
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
159
+ }
160
+ const response = await this.request({
161
+ path: `/admin/roles/{roleName}`.replace(`{${"roleName"}}`, encodeURIComponent(String(requestParameters.roleName))),
162
+ method: "GET",
163
+ headers: headerParameters,
164
+ query: queryParameters
165
+ }, initOverrides);
166
+ return new runtime.JSONApiResponse(response, (jsonValue) => RoleFromJSON(jsonValue));
167
+ }
168
+ async getRole(requestParameters, initOverrides) {
169
+ const response = await this.getRoleRaw(requestParameters, initOverrides);
170
+ return await response.value();
171
+ }
172
+ async getUserRaw(requestParameters, initOverrides) {
173
+ if (requestParameters.userId === null || requestParameters.userId === void 0) {
174
+ throw new runtime.RequiredError("userId", "Required parameter requestParameters.userId was null or undefined when calling getUser.");
175
+ }
176
+ const queryParameters = {};
177
+ const headerParameters = {};
178
+ if (this.configuration && this.configuration.apiKey) {
179
+ headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
180
+ }
181
+ if (this.configuration && this.configuration.accessToken) {
182
+ const token = this.configuration.accessToken;
183
+ const tokenString = await token("httpAuth", []);
184
+ if (tokenString) {
185
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
186
+ }
187
+ }
188
+ if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
189
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
190
+ }
191
+ const response = await this.request({
192
+ path: `/admin/users/{userId}`.replace(`{${"userId"}}`, encodeURIComponent(String(requestParameters.userId))),
193
+ method: "GET",
194
+ headers: headerParameters,
195
+ query: queryParameters
196
+ }, initOverrides);
197
+ return new runtime.JSONApiResponse(response, (jsonValue) => UserProfileFromJSON(jsonValue));
198
+ }
199
+ async getUser(requestParameters, initOverrides) {
200
+ const response = await this.getUserRaw(requestParameters, initOverrides);
201
+ return await response.value();
202
+ }
203
+ async gnerateNewApiKeyForUserRaw(requestParameters, initOverrides) {
204
+ if (requestParameters.userId === null || requestParameters.userId === void 0) {
205
+ throw new runtime.RequiredError("userId", "Required parameter requestParameters.userId was null or undefined when calling gnerateNewApiKeyForUser.");
206
+ }
207
+ const queryParameters = {};
208
+ const headerParameters = {};
209
+ if (this.configuration && this.configuration.apiKey) {
210
+ headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
211
+ }
212
+ if (this.configuration && this.configuration.accessToken) {
213
+ const token = this.configuration.accessToken;
214
+ const tokenString = await token("httpAuth", []);
215
+ if (tokenString) {
216
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
217
+ }
218
+ }
219
+ if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
220
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
221
+ }
222
+ const response = await this.request({
223
+ path: `/admin/users/{userId}/apikey`.replace(`{${"userId"}}`, encodeURIComponent(String(requestParameters.userId))),
224
+ method: "PATCH",
225
+ headers: headerParameters,
226
+ query: queryParameters
227
+ }, initOverrides);
228
+ return new runtime.JSONApiResponse(response, (jsonValue) => JsonResultStringFromJSON(jsonValue));
229
+ }
230
+ async gnerateNewApiKeyForUser(requestParameters, initOverrides) {
231
+ const response = await this.gnerateNewApiKeyForUserRaw(requestParameters, initOverrides);
232
+ return await response.value();
233
+ }
234
+ async listRolesRaw(requestParameters, initOverrides) {
235
+ const queryParameters = {};
236
+ if (requestParameters.filter !== void 0) {
237
+ queryParameters["filter"] = requestParameters.filter;
238
+ }
239
+ if (requestParameters.rowsPerPage !== void 0) {
240
+ queryParameters["rowsPerPage"] = requestParameters.rowsPerPage;
241
+ }
242
+ if (requestParameters.page !== void 0) {
243
+ queryParameters["page"] = requestParameters.page;
244
+ }
245
+ const headerParameters = {};
246
+ if (this.configuration && this.configuration.apiKey) {
247
+ headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
248
+ }
249
+ if (this.configuration && this.configuration.accessToken) {
250
+ const token = this.configuration.accessToken;
251
+ const tokenString = await token("httpAuth", []);
252
+ if (tokenString) {
253
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
254
+ }
255
+ }
256
+ if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
257
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
258
+ }
259
+ const response = await this.request({
260
+ path: `/admin/roles`,
261
+ method: "GET",
262
+ headers: headerParameters,
263
+ query: queryParameters
264
+ }, initOverrides);
265
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(RoleFromJSON));
266
+ }
267
+ async listRoles(requestParameters = {}, initOverrides) {
268
+ const response = await this.listRolesRaw(requestParameters, initOverrides);
269
+ return await response.value();
270
+ }
271
+ async listUsersRaw(requestParameters, initOverrides) {
272
+ const queryParameters = {};
273
+ if (requestParameters.filter !== void 0) {
274
+ queryParameters["filter"] = requestParameters.filter;
275
+ }
276
+ if (requestParameters.rowsPerPage !== void 0) {
277
+ queryParameters["rowsPerPage"] = requestParameters.rowsPerPage;
278
+ }
279
+ if (requestParameters.page !== void 0) {
280
+ queryParameters["page"] = requestParameters.page;
281
+ }
282
+ const headerParameters = {};
283
+ if (this.configuration && this.configuration.apiKey) {
284
+ headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
285
+ }
286
+ if (this.configuration && this.configuration.accessToken) {
287
+ const token = this.configuration.accessToken;
288
+ const tokenString = await token("httpAuth", []);
289
+ if (tokenString) {
290
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
291
+ }
292
+ }
293
+ if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
294
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
295
+ }
296
+ const response = await this.request({
297
+ path: `/admin/users`,
298
+ method: "GET",
299
+ headers: headerParameters,
300
+ query: queryParameters
301
+ }, initOverrides);
302
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(UserProfileFromJSON));
303
+ }
304
+ async listUsers(requestParameters = {}, initOverrides) {
305
+ const response = await this.listUsersRaw(requestParameters, initOverrides);
306
+ return await response.value();
307
+ }
308
+ async updatePasswordForUserRaw(requestParameters, initOverrides) {
309
+ if (requestParameters.userId === null || requestParameters.userId === void 0) {
310
+ throw new runtime.RequiredError("userId", "Required parameter requestParameters.userId was null or undefined when calling updatePasswordForUser.");
311
+ }
312
+ if (requestParameters.passwordUpdateRequest === null || requestParameters.passwordUpdateRequest === void 0) {
313
+ throw new runtime.RequiredError("passwordUpdateRequest", "Required parameter requestParameters.passwordUpdateRequest was null or undefined when calling updatePasswordForUser.");
314
+ }
315
+ const queryParameters = {};
316
+ const headerParameters = {};
317
+ headerParameters["Content-Type"] = "application/json";
318
+ if (this.configuration && this.configuration.apiKey) {
319
+ headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
320
+ }
321
+ if (this.configuration && this.configuration.accessToken) {
322
+ const token = this.configuration.accessToken;
323
+ const tokenString = await token("httpAuth", []);
324
+ if (tokenString) {
325
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
326
+ }
327
+ }
328
+ if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
329
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
330
+ }
331
+ const response = await this.request({
332
+ path: `/admin/users/{userId}/password`.replace(`{${"userId"}}`, encodeURIComponent(String(requestParameters.userId))),
333
+ method: "PATCH",
334
+ headers: headerParameters,
335
+ query: queryParameters,
336
+ body: PasswordUpdateRequestToJSON(requestParameters.passwordUpdateRequest)
337
+ }, initOverrides);
338
+ return new runtime.JSONApiResponse(response, (jsonValue) => JsonResultBooleanFromJSON(jsonValue));
339
+ }
340
+ async updatePasswordForUser(requestParameters, initOverrides) {
341
+ const response = await this.updatePasswordForUserRaw(requestParameters, initOverrides);
342
+ return await response.value();
343
+ }
344
+ async updateRoleRaw(requestParameters, initOverrides) {
345
+ if (requestParameters.roleName === null || requestParameters.roleName === void 0) {
346
+ throw new runtime.RequiredError("roleName", "Required parameter requestParameters.roleName was null or undefined when calling updateRole.");
347
+ }
348
+ if (requestParameters.updateRoleRequest === null || requestParameters.updateRoleRequest === void 0) {
349
+ throw new runtime.RequiredError("updateRoleRequest", "Required parameter requestParameters.updateRoleRequest was null or undefined when calling updateRole.");
350
+ }
351
+ const queryParameters = {};
352
+ const headerParameters = {};
353
+ headerParameters["Content-Type"] = "application/json";
354
+ if (this.configuration && this.configuration.apiKey) {
355
+ headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
356
+ }
357
+ if (this.configuration && this.configuration.accessToken) {
358
+ const token = this.configuration.accessToken;
359
+ const tokenString = await token("httpAuth", []);
360
+ if (tokenString) {
361
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
362
+ }
363
+ }
364
+ if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
365
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
366
+ }
367
+ const response = await this.request({
368
+ path: `/admin/roles/{roleName}`.replace(`{${"roleName"}}`, encodeURIComponent(String(requestParameters.roleName))),
369
+ method: "PATCH",
370
+ headers: headerParameters,
371
+ query: queryParameters,
372
+ body: UpdateRoleRequestToJSON(requestParameters.updateRoleRequest)
373
+ }, initOverrides);
374
+ return new runtime.JSONApiResponse(response, (jsonValue) => RoleFromJSON(jsonValue));
375
+ }
376
+ async updateRole(requestParameters, initOverrides) {
377
+ const response = await this.updateRoleRaw(requestParameters, initOverrides);
378
+ return await response.value();
379
+ }
380
+ async updateRolesForUserRaw(requestParameters, initOverrides) {
381
+ if (requestParameters.userId === null || requestParameters.userId === void 0) {
382
+ throw new runtime.RequiredError("userId", "Required parameter requestParameters.userId was null or undefined when calling updateRolesForUser.");
383
+ }
384
+ const queryParameters = {};
385
+ const headerParameters = {};
386
+ headerParameters["Content-Type"] = "application/json";
387
+ if (this.configuration && this.configuration.apiKey) {
388
+ headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
389
+ }
390
+ if (this.configuration && this.configuration.accessToken) {
391
+ const token = this.configuration.accessToken;
392
+ const tokenString = await token("httpAuth", []);
393
+ if (tokenString) {
394
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
395
+ }
396
+ }
397
+ if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
398
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
399
+ }
400
+ const response = await this.request({
401
+ path: `/admin/users/{userId}/roles`.replace(`{${"userId"}}`, encodeURIComponent(String(requestParameters.userId))),
402
+ method: "PATCH",
403
+ headers: headerParameters,
404
+ query: queryParameters,
405
+ body: requestParameters.requestBody
406
+ }, initOverrides);
407
+ return new runtime.JSONApiResponse(response, (jsonValue) => UserProfileFromJSON(jsonValue));
408
+ }
409
+ async updateRolesForUser(requestParameters, initOverrides) {
410
+ const response = await this.updateRolesForUserRaw(requestParameters, initOverrides);
411
+ return await response.value();
412
+ }
413
+ }
@@ -0,0 +1,68 @@
1
+ /**
2
+ * mongocamp-server
3
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ *
5
+ * The version of the OpenAPI document: 1.2.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import * as runtime from '../runtime';
13
+ import { Metric, SettingsResponse } from '../models';
14
+ /**
15
+ *
16
+ */
17
+ export declare class ApplicationApi extends runtime.BaseAPI {
18
+ /**
19
+ * Returns the Metrics of events of the running MongoCamp Application.
20
+ * Event Metrics
21
+ */
22
+ eventMetricsRaw(initOverrides?: RequestInit): Promise<runtime.ApiResponse<Array<Metric>>>;
23
+ /**
24
+ * Returns the Metrics of events of the running MongoCamp Application.
25
+ * Event Metrics
26
+ */
27
+ eventMetrics(initOverrides?: RequestInit): Promise<Array<Metric>>;
28
+ /**
29
+ * Returns the JVM Metrics of the running MongoCamp Application
30
+ * JVM Metrics
31
+ */
32
+ jvmMetricsRaw(initOverrides?: RequestInit): Promise<runtime.ApiResponse<Array<Metric>>>;
33
+ /**
34
+ * Returns the JVM Metrics of the running MongoCamp Application
35
+ * JVM Metrics
36
+ */
37
+ jvmMetrics(initOverrides?: RequestInit): Promise<Array<Metric>>;
38
+ /**
39
+ * Returns the MongoDB Metrics of the running MongoCamp Application
40
+ * MongoDb Metrics
41
+ */
42
+ mongoDbMetricsRaw(initOverrides?: RequestInit): Promise<runtime.ApiResponse<Array<Metric>>>;
43
+ /**
44
+ * Returns the MongoDB Metrics of the running MongoCamp Application
45
+ * MongoDb Metrics
46
+ */
47
+ mongoDbMetrics(initOverrides?: RequestInit): Promise<Array<Metric>>;
48
+ /**
49
+ * Returns the Settings of the running MongoCamp Application.
50
+ * System Settings
51
+ */
52
+ settingsRaw(initOverrides?: RequestInit): Promise<runtime.ApiResponse<SettingsResponse>>;
53
+ /**
54
+ * Returns the Settings of the running MongoCamp Application.
55
+ * System Settings
56
+ */
57
+ settings(initOverrides?: RequestInit): Promise<SettingsResponse>;
58
+ /**
59
+ * Returns the Metrics of the MongoCamp System
60
+ * System Metrics
61
+ */
62
+ systemMetricsRaw(initOverrides?: RequestInit): Promise<runtime.ApiResponse<Array<Metric>>>;
63
+ /**
64
+ * Returns the Metrics of the MongoCamp System
65
+ * System Metrics
66
+ */
67
+ systemMetrics(initOverrides?: RequestInit): Promise<Array<Metric>>;
68
+ }
@@ -0,0 +1,147 @@
1
+ import * as runtime from "../runtime.mjs";
2
+ import {
3
+ MetricFromJSON,
4
+ SettingsResponseFromJSON
5
+ } from "../models";
6
+ export class ApplicationApi extends runtime.BaseAPI {
7
+ async eventMetricsRaw(initOverrides) {
8
+ const queryParameters = {};
9
+ const headerParameters = {};
10
+ if (this.configuration && this.configuration.apiKey) {
11
+ headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
12
+ }
13
+ if (this.configuration && this.configuration.accessToken) {
14
+ const token = this.configuration.accessToken;
15
+ const tokenString = await token("httpAuth", []);
16
+ if (tokenString) {
17
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
18
+ }
19
+ }
20
+ if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
21
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
22
+ }
23
+ const response = await this.request({
24
+ path: `/system/monitoring/events`,
25
+ method: "GET",
26
+ headers: headerParameters,
27
+ query: queryParameters
28
+ }, initOverrides);
29
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(MetricFromJSON));
30
+ }
31
+ async eventMetrics(initOverrides) {
32
+ const response = await this.eventMetricsRaw(initOverrides);
33
+ return await response.value();
34
+ }
35
+ async jvmMetricsRaw(initOverrides) {
36
+ const queryParameters = {};
37
+ const headerParameters = {};
38
+ if (this.configuration && this.configuration.apiKey) {
39
+ headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
40
+ }
41
+ if (this.configuration && this.configuration.accessToken) {
42
+ const token = this.configuration.accessToken;
43
+ const tokenString = await token("httpAuth", []);
44
+ if (tokenString) {
45
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
46
+ }
47
+ }
48
+ if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
49
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
50
+ }
51
+ const response = await this.request({
52
+ path: `/system/monitoring/jvm`,
53
+ method: "GET",
54
+ headers: headerParameters,
55
+ query: queryParameters
56
+ }, initOverrides);
57
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(MetricFromJSON));
58
+ }
59
+ async jvmMetrics(initOverrides) {
60
+ const response = await this.jvmMetricsRaw(initOverrides);
61
+ return await response.value();
62
+ }
63
+ async mongoDbMetricsRaw(initOverrides) {
64
+ const queryParameters = {};
65
+ const headerParameters = {};
66
+ if (this.configuration && this.configuration.apiKey) {
67
+ headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
68
+ }
69
+ if (this.configuration && this.configuration.accessToken) {
70
+ const token = this.configuration.accessToken;
71
+ const tokenString = await token("httpAuth", []);
72
+ if (tokenString) {
73
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
74
+ }
75
+ }
76
+ if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
77
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
78
+ }
79
+ const response = await this.request({
80
+ path: `/system/monitoring/mongodb`,
81
+ method: "GET",
82
+ headers: headerParameters,
83
+ query: queryParameters
84
+ }, initOverrides);
85
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(MetricFromJSON));
86
+ }
87
+ async mongoDbMetrics(initOverrides) {
88
+ const response = await this.mongoDbMetricsRaw(initOverrides);
89
+ return await response.value();
90
+ }
91
+ async settingsRaw(initOverrides) {
92
+ const queryParameters = {};
93
+ const headerParameters = {};
94
+ if (this.configuration && this.configuration.apiKey) {
95
+ headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
96
+ }
97
+ if (this.configuration && this.configuration.accessToken) {
98
+ const token = this.configuration.accessToken;
99
+ const tokenString = await token("httpAuth", []);
100
+ if (tokenString) {
101
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
102
+ }
103
+ }
104
+ if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
105
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
106
+ }
107
+ const response = await this.request({
108
+ path: `/system/settings`,
109
+ method: "GET",
110
+ headers: headerParameters,
111
+ query: queryParameters
112
+ }, initOverrides);
113
+ return new runtime.JSONApiResponse(response, (jsonValue) => SettingsResponseFromJSON(jsonValue));
114
+ }
115
+ async settings(initOverrides) {
116
+ const response = await this.settingsRaw(initOverrides);
117
+ return await response.value();
118
+ }
119
+ async systemMetricsRaw(initOverrides) {
120
+ const queryParameters = {};
121
+ const headerParameters = {};
122
+ if (this.configuration && this.configuration.apiKey) {
123
+ headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
124
+ }
125
+ if (this.configuration && this.configuration.accessToken) {
126
+ const token = this.configuration.accessToken;
127
+ const tokenString = await token("httpAuth", []);
128
+ if (tokenString) {
129
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
130
+ }
131
+ }
132
+ if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
133
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
134
+ }
135
+ const response = await this.request({
136
+ path: `/system/monitoring/system`,
137
+ method: "GET",
138
+ headers: headerParameters,
139
+ query: queryParameters
140
+ }, initOverrides);
141
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(MetricFromJSON));
142
+ }
143
+ async systemMetrics(initOverrides) {
144
+ const response = await this.systemMetricsRaw(initOverrides);
145
+ return await response.value();
146
+ }
147
+ }