@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,107 @@
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 { JsonResultBoolean, JsonResultString, Login, LoginResult, PasswordUpdateRequest, UserProfile } from '../models';
14
+ export interface GenerateNewApiKeyRequest {
15
+ userid?: string;
16
+ }
17
+ export interface LoginRequest {
18
+ login: Login;
19
+ }
20
+ export interface UpdatePasswordRequest {
21
+ passwordUpdateRequest: PasswordUpdateRequest;
22
+ }
23
+ /**
24
+ *
25
+ */
26
+ export declare class AuthApi extends runtime.BaseAPI {
27
+ /**
28
+ * Generate new ApiKey of logged in User
29
+ * Update ApiKey
30
+ */
31
+ generateNewApiKeyRaw(requestParameters: GenerateNewApiKeyRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<JsonResultString>>;
32
+ /**
33
+ * Generate new ApiKey of logged in User
34
+ * Update ApiKey
35
+ */
36
+ generateNewApiKey(requestParameters?: GenerateNewApiKeyRequest, initOverrides?: RequestInit): Promise<JsonResultString>;
37
+ /**
38
+ * Check a given Login for is authenticated
39
+ * Check Authentication
40
+ */
41
+ isAuthenticatedRaw(initOverrides?: RequestInit): Promise<runtime.ApiResponse<JsonResultBoolean>>;
42
+ /**
43
+ * Check a given Login for is authenticated
44
+ * Check Authentication
45
+ */
46
+ isAuthenticated(initOverrides?: RequestInit): Promise<JsonResultBoolean>;
47
+ /**
48
+ * Login for one user and return Login Information
49
+ * Login User
50
+ */
51
+ loginRaw(requestParameters: LoginRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<LoginResult>>;
52
+ /**
53
+ * Login for one user and return Login Information
54
+ * Login User
55
+ */
56
+ login(requestParameters: LoginRequest, initOverrides?: RequestInit): Promise<LoginResult>;
57
+ /**
58
+ * Logout by bearer Token
59
+ * Logout User
60
+ */
61
+ logoutRaw(initOverrides?: RequestInit): Promise<runtime.ApiResponse<JsonResultBoolean>>;
62
+ /**
63
+ * Logout by bearer Token
64
+ * Logout User
65
+ */
66
+ logout(initOverrides?: RequestInit): Promise<JsonResultBoolean>;
67
+ /**
68
+ * Logout by bearer Token
69
+ * Logout User
70
+ */
71
+ logoutByDeleteRaw(initOverrides?: RequestInit): Promise<runtime.ApiResponse<JsonResultBoolean>>;
72
+ /**
73
+ * Logout by bearer Token
74
+ * Logout User
75
+ */
76
+ logoutByDelete(initOverrides?: RequestInit): Promise<JsonResultBoolean>;
77
+ /**
78
+ * Refresh Token and return Login Information
79
+ * Refresh User
80
+ */
81
+ refreshTokenRaw(initOverrides?: RequestInit): Promise<runtime.ApiResponse<LoginResult>>;
82
+ /**
83
+ * Refresh Token and return Login Information
84
+ * Refresh User
85
+ */
86
+ refreshToken(initOverrides?: RequestInit): Promise<LoginResult>;
87
+ /**
88
+ * Change Password of logged in User
89
+ * Update Password
90
+ */
91
+ updatePasswordRaw(requestParameters: UpdatePasswordRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<JsonResultBoolean>>;
92
+ /**
93
+ * Change Password of logged in User
94
+ * Update Password
95
+ */
96
+ updatePassword(requestParameters: UpdatePasswordRequest, initOverrides?: RequestInit): Promise<JsonResultBoolean>;
97
+ /**
98
+ * Return the User Profile of loggedin user
99
+ * User Profile
100
+ */
101
+ userProfileRaw(initOverrides?: RequestInit): Promise<runtime.ApiResponse<UserProfile>>;
102
+ /**
103
+ * Return the User Profile of loggedin user
104
+ * User Profile
105
+ */
106
+ userProfile(initOverrides?: RequestInit): Promise<UserProfile>;
107
+ }
@@ -0,0 +1,235 @@
1
+ import * as runtime from "../runtime.mjs";
2
+ import {
3
+ JsonResultBooleanFromJSON,
4
+ JsonResultStringFromJSON,
5
+ LoginToJSON,
6
+ LoginResultFromJSON,
7
+ PasswordUpdateRequestToJSON,
8
+ UserProfileFromJSON
9
+ } from "../models";
10
+ export class AuthApi extends runtime.BaseAPI {
11
+ async generateNewApiKeyRaw(requestParameters, initOverrides) {
12
+ const queryParameters = {};
13
+ if (requestParameters.userid !== void 0) {
14
+ queryParameters["userid"] = requestParameters.userid;
15
+ }
16
+ const headerParameters = {};
17
+ if (this.configuration && this.configuration.apiKey) {
18
+ headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
19
+ }
20
+ if (this.configuration && this.configuration.accessToken) {
21
+ const token = this.configuration.accessToken;
22
+ const tokenString = await token("httpAuth", []);
23
+ if (tokenString) {
24
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
25
+ }
26
+ }
27
+ if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
28
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
29
+ }
30
+ const response = await this.request({
31
+ path: `/auth/profile/apikey`,
32
+ method: "PATCH",
33
+ headers: headerParameters,
34
+ query: queryParameters
35
+ }, initOverrides);
36
+ return new runtime.JSONApiResponse(response, (jsonValue) => JsonResultStringFromJSON(jsonValue));
37
+ }
38
+ async generateNewApiKey(requestParameters = {}, initOverrides) {
39
+ const response = await this.generateNewApiKeyRaw(requestParameters, initOverrides);
40
+ return await response.value();
41
+ }
42
+ async isAuthenticatedRaw(initOverrides) {
43
+ const queryParameters = {};
44
+ const headerParameters = {};
45
+ if (this.configuration && this.configuration.apiKey) {
46
+ headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
47
+ }
48
+ if (this.configuration && this.configuration.accessToken) {
49
+ const token = this.configuration.accessToken;
50
+ const tokenString = await token("httpAuth", []);
51
+ if (tokenString) {
52
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
53
+ }
54
+ }
55
+ if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
56
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
57
+ }
58
+ const response = await this.request({
59
+ path: `/auth/authenticated`,
60
+ method: "GET",
61
+ headers: headerParameters,
62
+ query: queryParameters
63
+ }, initOverrides);
64
+ return new runtime.JSONApiResponse(response, (jsonValue) => JsonResultBooleanFromJSON(jsonValue));
65
+ }
66
+ async isAuthenticated(initOverrides) {
67
+ const response = await this.isAuthenticatedRaw(initOverrides);
68
+ return await response.value();
69
+ }
70
+ async loginRaw(requestParameters, initOverrides) {
71
+ if (requestParameters.login === null || requestParameters.login === void 0) {
72
+ throw new runtime.RequiredError("login", "Required parameter requestParameters.login was null or undefined when calling login.");
73
+ }
74
+ const queryParameters = {};
75
+ const headerParameters = {};
76
+ headerParameters["Content-Type"] = "application/json";
77
+ const response = await this.request({
78
+ path: `/auth/login`,
79
+ method: "POST",
80
+ headers: headerParameters,
81
+ query: queryParameters,
82
+ body: LoginToJSON(requestParameters.login)
83
+ }, initOverrides);
84
+ return new runtime.JSONApiResponse(response, (jsonValue) => LoginResultFromJSON(jsonValue));
85
+ }
86
+ async login(requestParameters, initOverrides) {
87
+ const response = await this.loginRaw(requestParameters, initOverrides);
88
+ return await response.value();
89
+ }
90
+ async logoutRaw(initOverrides) {
91
+ const queryParameters = {};
92
+ const headerParameters = {};
93
+ if (this.configuration && this.configuration.apiKey) {
94
+ headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
95
+ }
96
+ if (this.configuration && this.configuration.accessToken) {
97
+ const token = this.configuration.accessToken;
98
+ const tokenString = await token("httpAuth", []);
99
+ if (tokenString) {
100
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
101
+ }
102
+ }
103
+ if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
104
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
105
+ }
106
+ const response = await this.request({
107
+ path: `/auth/logout`,
108
+ method: "POST",
109
+ headers: headerParameters,
110
+ query: queryParameters
111
+ }, initOverrides);
112
+ return new runtime.JSONApiResponse(response, (jsonValue) => JsonResultBooleanFromJSON(jsonValue));
113
+ }
114
+ async logout(initOverrides) {
115
+ const response = await this.logoutRaw(initOverrides);
116
+ return await response.value();
117
+ }
118
+ async logoutByDeleteRaw(initOverrides) {
119
+ const queryParameters = {};
120
+ const headerParameters = {};
121
+ if (this.configuration && this.configuration.apiKey) {
122
+ headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
123
+ }
124
+ if (this.configuration && this.configuration.accessToken) {
125
+ const token = this.configuration.accessToken;
126
+ const tokenString = await token("httpAuth", []);
127
+ if (tokenString) {
128
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
129
+ }
130
+ }
131
+ if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
132
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
133
+ }
134
+ const response = await this.request({
135
+ path: `/auth/logout`,
136
+ method: "DELETE",
137
+ headers: headerParameters,
138
+ query: queryParameters
139
+ }, initOverrides);
140
+ return new runtime.JSONApiResponse(response, (jsonValue) => JsonResultBooleanFromJSON(jsonValue));
141
+ }
142
+ async logoutByDelete(initOverrides) {
143
+ const response = await this.logoutByDeleteRaw(initOverrides);
144
+ return await response.value();
145
+ }
146
+ async refreshTokenRaw(initOverrides) {
147
+ const queryParameters = {};
148
+ const headerParameters = {};
149
+ if (this.configuration && this.configuration.apiKey) {
150
+ headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
151
+ }
152
+ if (this.configuration && this.configuration.accessToken) {
153
+ const token = this.configuration.accessToken;
154
+ const tokenString = await token("httpAuth", []);
155
+ if (tokenString) {
156
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
157
+ }
158
+ }
159
+ if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
160
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
161
+ }
162
+ const response = await this.request({
163
+ path: `/auth/token/refresh`,
164
+ method: "GET",
165
+ headers: headerParameters,
166
+ query: queryParameters
167
+ }, initOverrides);
168
+ return new runtime.JSONApiResponse(response, (jsonValue) => LoginResultFromJSON(jsonValue));
169
+ }
170
+ async refreshToken(initOverrides) {
171
+ const response = await this.refreshTokenRaw(initOverrides);
172
+ return await response.value();
173
+ }
174
+ async updatePasswordRaw(requestParameters, initOverrides) {
175
+ if (requestParameters.passwordUpdateRequest === null || requestParameters.passwordUpdateRequest === void 0) {
176
+ throw new runtime.RequiredError("passwordUpdateRequest", "Required parameter requestParameters.passwordUpdateRequest was null or undefined when calling updatePassword.");
177
+ }
178
+ const queryParameters = {};
179
+ const headerParameters = {};
180
+ headerParameters["Content-Type"] = "application/json";
181
+ if (this.configuration && this.configuration.apiKey) {
182
+ headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
183
+ }
184
+ if (this.configuration && this.configuration.accessToken) {
185
+ const token = this.configuration.accessToken;
186
+ const tokenString = await token("httpAuth", []);
187
+ if (tokenString) {
188
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
189
+ }
190
+ }
191
+ if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
192
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
193
+ }
194
+ const response = await this.request({
195
+ path: `/auth/profile/password`,
196
+ method: "PATCH",
197
+ headers: headerParameters,
198
+ query: queryParameters,
199
+ body: PasswordUpdateRequestToJSON(requestParameters.passwordUpdateRequest)
200
+ }, initOverrides);
201
+ return new runtime.JSONApiResponse(response, (jsonValue) => JsonResultBooleanFromJSON(jsonValue));
202
+ }
203
+ async updatePassword(requestParameters, initOverrides) {
204
+ const response = await this.updatePasswordRaw(requestParameters, initOverrides);
205
+ return await response.value();
206
+ }
207
+ async userProfileRaw(initOverrides) {
208
+ const queryParameters = {};
209
+ const headerParameters = {};
210
+ if (this.configuration && this.configuration.apiKey) {
211
+ headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
212
+ }
213
+ if (this.configuration && this.configuration.accessToken) {
214
+ const token = this.configuration.accessToken;
215
+ const tokenString = await token("httpAuth", []);
216
+ if (tokenString) {
217
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
218
+ }
219
+ }
220
+ if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
221
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
222
+ }
223
+ const response = await this.request({
224
+ path: `/auth/profile`,
225
+ method: "GET",
226
+ headers: headerParameters,
227
+ query: queryParameters
228
+ }, initOverrides);
229
+ return new runtime.JSONApiResponse(response, (jsonValue) => UserProfileFromJSON(jsonValue));
230
+ }
231
+ async userProfile(initOverrides) {
232
+ const response = await this.userProfileRaw(initOverrides);
233
+ return await response.value();
234
+ }
235
+ }
@@ -0,0 +1,67 @@
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 { BucketInformation, JsonResultBoolean } from '../models';
14
+ export interface ClearBucketRequest {
15
+ bucketName: string;
16
+ }
17
+ export interface DeleteBucketRequest {
18
+ bucketName: string;
19
+ }
20
+ export interface GetBucketRequest {
21
+ bucketName: string;
22
+ }
23
+ /**
24
+ *
25
+ */
26
+ export declare class BucketApi extends runtime.BaseAPI {
27
+ /**
28
+ * Delete all Files in Bucket
29
+ * Clear Bucket
30
+ */
31
+ clearBucketRaw(requestParameters: ClearBucketRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<JsonResultBoolean>>;
32
+ /**
33
+ * Delete all Files in Bucket
34
+ * Clear Bucket
35
+ */
36
+ clearBucket(requestParameters: ClearBucketRequest, initOverrides?: RequestInit): Promise<JsonResultBoolean>;
37
+ /**
38
+ * Delete a given Bucket
39
+ * Delete Bucket
40
+ */
41
+ deleteBucketRaw(requestParameters: DeleteBucketRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<JsonResultBoolean>>;
42
+ /**
43
+ * Delete a given Bucket
44
+ * Delete Bucket
45
+ */
46
+ deleteBucket(requestParameters: DeleteBucketRequest, initOverrides?: RequestInit): Promise<JsonResultBoolean>;
47
+ /**
48
+ * All Information about a single Bucket
49
+ * Bucket Information
50
+ */
51
+ getBucketRaw(requestParameters: GetBucketRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<BucketInformation>>;
52
+ /**
53
+ * All Information about a single Bucket
54
+ * Bucket Information
55
+ */
56
+ getBucket(requestParameters: GetBucketRequest, initOverrides?: RequestInit): Promise<BucketInformation>;
57
+ /**
58
+ * List of all Buckets of the default database
59
+ * List of Buckets
60
+ */
61
+ listBucketsRaw(initOverrides?: RequestInit): Promise<runtime.ApiResponse<Array<string>>>;
62
+ /**
63
+ * List of all Buckets of the default database
64
+ * List of Buckets
65
+ */
66
+ listBuckets(initOverrides?: RequestInit): Promise<Array<string>>;
67
+ }
@@ -0,0 +1,128 @@
1
+ import * as runtime from "../runtime.mjs";
2
+ import {
3
+ BucketInformationFromJSON,
4
+ JsonResultBooleanFromJSON
5
+ } from "../models";
6
+ export class BucketApi extends runtime.BaseAPI {
7
+ async clearBucketRaw(requestParameters, initOverrides) {
8
+ if (requestParameters.bucketName === null || requestParameters.bucketName === void 0) {
9
+ throw new runtime.RequiredError("bucketName", "Required parameter requestParameters.bucketName was null or undefined when calling clearBucket.");
10
+ }
11
+ const queryParameters = {};
12
+ const headerParameters = {};
13
+ if (this.configuration && this.configuration.apiKey) {
14
+ headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
15
+ }
16
+ if (this.configuration && this.configuration.accessToken) {
17
+ const token = this.configuration.accessToken;
18
+ const tokenString = await token("httpAuth", []);
19
+ if (tokenString) {
20
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
21
+ }
22
+ }
23
+ if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
24
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
25
+ }
26
+ const response = await this.request({
27
+ path: `/mongodb/buckets/{bucketName}/clear`.replace(`{${"bucketName"}}`, encodeURIComponent(String(requestParameters.bucketName))),
28
+ method: "DELETE",
29
+ headers: headerParameters,
30
+ query: queryParameters
31
+ }, initOverrides);
32
+ return new runtime.JSONApiResponse(response, (jsonValue) => JsonResultBooleanFromJSON(jsonValue));
33
+ }
34
+ async clearBucket(requestParameters, initOverrides) {
35
+ const response = await this.clearBucketRaw(requestParameters, initOverrides);
36
+ return await response.value();
37
+ }
38
+ async deleteBucketRaw(requestParameters, initOverrides) {
39
+ if (requestParameters.bucketName === null || requestParameters.bucketName === void 0) {
40
+ throw new runtime.RequiredError("bucketName", "Required parameter requestParameters.bucketName was null or undefined when calling deleteBucket.");
41
+ }
42
+ const queryParameters = {};
43
+ const headerParameters = {};
44
+ if (this.configuration && this.configuration.apiKey) {
45
+ headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
46
+ }
47
+ if (this.configuration && this.configuration.accessToken) {
48
+ const token = this.configuration.accessToken;
49
+ const tokenString = await token("httpAuth", []);
50
+ if (tokenString) {
51
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
52
+ }
53
+ }
54
+ if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
55
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
56
+ }
57
+ const response = await this.request({
58
+ path: `/mongodb/buckets/{bucketName}`.replace(`{${"bucketName"}}`, encodeURIComponent(String(requestParameters.bucketName))),
59
+ method: "DELETE",
60
+ headers: headerParameters,
61
+ query: queryParameters
62
+ }, initOverrides);
63
+ return new runtime.JSONApiResponse(response, (jsonValue) => JsonResultBooleanFromJSON(jsonValue));
64
+ }
65
+ async deleteBucket(requestParameters, initOverrides) {
66
+ const response = await this.deleteBucketRaw(requestParameters, initOverrides);
67
+ return await response.value();
68
+ }
69
+ async getBucketRaw(requestParameters, initOverrides) {
70
+ if (requestParameters.bucketName === null || requestParameters.bucketName === void 0) {
71
+ throw new runtime.RequiredError("bucketName", "Required parameter requestParameters.bucketName was null or undefined when calling getBucket.");
72
+ }
73
+ const queryParameters = {};
74
+ const headerParameters = {};
75
+ if (this.configuration && this.configuration.apiKey) {
76
+ headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
77
+ }
78
+ if (this.configuration && this.configuration.accessToken) {
79
+ const token = this.configuration.accessToken;
80
+ const tokenString = await token("httpAuth", []);
81
+ if (tokenString) {
82
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
83
+ }
84
+ }
85
+ if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
86
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
87
+ }
88
+ const response = await this.request({
89
+ path: `/mongodb/buckets/{bucketName}`.replace(`{${"bucketName"}}`, encodeURIComponent(String(requestParameters.bucketName))),
90
+ method: "GET",
91
+ headers: headerParameters,
92
+ query: queryParameters
93
+ }, initOverrides);
94
+ return new runtime.JSONApiResponse(response, (jsonValue) => BucketInformationFromJSON(jsonValue));
95
+ }
96
+ async getBucket(requestParameters, initOverrides) {
97
+ const response = await this.getBucketRaw(requestParameters, initOverrides);
98
+ return await response.value();
99
+ }
100
+ async listBucketsRaw(initOverrides) {
101
+ const queryParameters = {};
102
+ const headerParameters = {};
103
+ if (this.configuration && this.configuration.apiKey) {
104
+ headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
105
+ }
106
+ if (this.configuration && this.configuration.accessToken) {
107
+ const token = this.configuration.accessToken;
108
+ const tokenString = await token("httpAuth", []);
109
+ if (tokenString) {
110
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
111
+ }
112
+ }
113
+ if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
114
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
115
+ }
116
+ const response = await this.request({
117
+ path: `/mongodb/buckets`,
118
+ method: "GET",
119
+ headers: headerParameters,
120
+ query: queryParameters
121
+ }, initOverrides);
122
+ return new runtime.JSONApiResponse(response);
123
+ }
124
+ async listBuckets(initOverrides) {
125
+ const response = await this.listBucketsRaw(initOverrides);
126
+ return await response.value();
127
+ }
128
+ }