@sfxcode/nuxt-mongocamp-server 1.0.2 → 1.0.4

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 (133) hide show
  1. package/dist/module.d.ts +2 -9
  2. package/dist/module.json +1 -1
  3. package/dist/module.mjs +4 -553
  4. package/dist/types.d.ts +8 -2
  5. package/package.json +8 -8
  6. package/dist/runtime/api/apis/AdminApi.d.ts +0 -181
  7. package/dist/runtime/api/apis/AdminApi.mjs +0 -509
  8. package/dist/runtime/api/apis/ApplicationApi.d.ts +0 -65
  9. package/dist/runtime/api/apis/ApplicationApi.mjs +0 -164
  10. package/dist/runtime/api/apis/AuthApi.d.ts +0 -104
  11. package/dist/runtime/api/apis/AuthApi.mjs +0 -296
  12. package/dist/runtime/api/apis/BucketApi.d.ts +0 -67
  13. package/dist/runtime/api/apis/BucketApi.mjs +0 -160
  14. package/dist/runtime/api/apis/CollectionApi.d.ts +0 -161
  15. package/dist/runtime/api/apis/CollectionApi.mjs +0 -435
  16. package/dist/runtime/api/apis/DatabaseApi.d.ts +0 -77
  17. package/dist/runtime/api/apis/DatabaseApi.mjs +0 -196
  18. package/dist/runtime/api/apis/DocumentApi.d.ts +0 -188
  19. package/dist/runtime/api/apis/DocumentApi.mjs +0 -465
  20. package/dist/runtime/api/apis/FileApi.d.ts +0 -125
  21. package/dist/runtime/api/apis/FileApi.mjs +0 -355
  22. package/dist/runtime/api/apis/IndexApi.d.ts +0 -137
  23. package/dist/runtime/api/apis/IndexApi.mjs +0 -367
  24. package/dist/runtime/api/apis/InformationApi.d.ts +0 -28
  25. package/dist/runtime/api/apis/InformationApi.mjs +0 -29
  26. package/dist/runtime/api/apis/JobsApi.d.ts +0 -94
  27. package/dist/runtime/api/apis/JobsApi.mjs +0 -252
  28. package/dist/runtime/api/apis/index.d.ts +0 -11
  29. package/dist/runtime/api/apis/index.mjs +0 -11
  30. package/dist/runtime/api/index.d.ts +0 -3
  31. package/dist/runtime/api/index.mjs +0 -3
  32. package/dist/runtime/api/models/BucketInformation.d.ts +0 -49
  33. package/dist/runtime/api/models/BucketInformation.mjs +0 -36
  34. package/dist/runtime/api/models/CollectionStatus.d.ts +0 -107
  35. package/dist/runtime/api/models/CollectionStatus.mjs +0 -63
  36. package/dist/runtime/api/models/DatabaseInfo.d.ts +0 -57
  37. package/dist/runtime/api/models/DatabaseInfo.mjs +0 -39
  38. package/dist/runtime/api/models/DeleteResponse.d.ts +0 -37
  39. package/dist/runtime/api/models/DeleteResponse.mjs +0 -30
  40. package/dist/runtime/api/models/ErrorDescription.d.ts +0 -43
  41. package/dist/runtime/api/models/ErrorDescription.mjs +0 -33
  42. package/dist/runtime/api/models/FileInformation.d.ts +0 -63
  43. package/dist/runtime/api/models/FileInformation.mjs +0 -42
  44. package/dist/runtime/api/models/Grant.d.ts +0 -55
  45. package/dist/runtime/api/models/Grant.mjs +0 -39
  46. package/dist/runtime/api/models/IndexCreateRequest.d.ts +0 -40
  47. package/dist/runtime/api/models/IndexCreateRequest.mjs +0 -34
  48. package/dist/runtime/api/models/IndexCreateResponse.d.ts +0 -31
  49. package/dist/runtime/api/models/IndexCreateResponse.mjs +0 -27
  50. package/dist/runtime/api/models/IndexDropResponse.d.ts +0 -31
  51. package/dist/runtime/api/models/IndexDropResponse.mjs +0 -27
  52. package/dist/runtime/api/models/IndexOptionsRequest.d.ts +0 -73
  53. package/dist/runtime/api/models/IndexOptionsRequest.mjs +0 -41
  54. package/dist/runtime/api/models/InsertResponse.d.ts +0 -37
  55. package/dist/runtime/api/models/InsertResponse.mjs +0 -30
  56. package/dist/runtime/api/models/JobConfig.d.ts +0 -61
  57. package/dist/runtime/api/models/JobConfig.mjs +0 -42
  58. package/dist/runtime/api/models/JobInformation.d.ts +0 -79
  59. package/dist/runtime/api/models/JobInformation.mjs +0 -49
  60. package/dist/runtime/api/models/JsonResultBoolean.d.ts +0 -27
  61. package/dist/runtime/api/models/JsonResultBoolean.mjs +0 -22
  62. package/dist/runtime/api/models/JsonResultString.d.ts +0 -27
  63. package/dist/runtime/api/models/JsonResultString.mjs +0 -22
  64. package/dist/runtime/api/models/JsonSchema.d.ts +0 -46
  65. package/dist/runtime/api/models/JsonSchema.mjs +0 -38
  66. package/dist/runtime/api/models/JsonSchemaDefinition.d.ts +0 -59
  67. package/dist/runtime/api/models/JsonSchemaDefinition.mjs +0 -39
  68. package/dist/runtime/api/models/JsonValueAny.d.ts +0 -31
  69. package/dist/runtime/api/models/JsonValueAny.mjs +0 -27
  70. package/dist/runtime/api/models/JsonValueBoolean.d.ts +0 -31
  71. package/dist/runtime/api/models/JsonValueBoolean.mjs +0 -27
  72. package/dist/runtime/api/models/JsonValueString.d.ts +0 -31
  73. package/dist/runtime/api/models/JsonValueString.mjs +0 -27
  74. package/dist/runtime/api/models/Login.d.ts +0 -37
  75. package/dist/runtime/api/models/Login.mjs +0 -30
  76. package/dist/runtime/api/models/LoginResult.d.ts +0 -44
  77. package/dist/runtime/api/models/LoginResult.mjs +0 -37
  78. package/dist/runtime/api/models/Measurement.d.ts +0 -33
  79. package/dist/runtime/api/models/Measurement.mjs +0 -24
  80. package/dist/runtime/api/models/Metric.d.ts +0 -52
  81. package/dist/runtime/api/models/Metric.mjs +0 -35
  82. package/dist/runtime/api/models/MongoAggregateRequest.d.ts +0 -38
  83. package/dist/runtime/api/models/MongoAggregateRequest.mjs +0 -34
  84. package/dist/runtime/api/models/MongoCampConfiguration.d.ts +0 -55
  85. package/dist/runtime/api/models/MongoCampConfiguration.mjs +0 -39
  86. package/dist/runtime/api/models/MongoFindRequest.d.ts +0 -49
  87. package/dist/runtime/api/models/MongoFindRequest.mjs +0 -33
  88. package/dist/runtime/api/models/MongoIndex.d.ts +0 -103
  89. package/dist/runtime/api/models/MongoIndex.mjs +0 -60
  90. package/dist/runtime/api/models/PasswordUpdateRequest.d.ts +0 -31
  91. package/dist/runtime/api/models/PasswordUpdateRequest.mjs +0 -27
  92. package/dist/runtime/api/models/PipelineStage.d.ts +0 -37
  93. package/dist/runtime/api/models/PipelineStage.mjs +0 -30
  94. package/dist/runtime/api/models/Role.d.ts +0 -44
  95. package/dist/runtime/api/models/Role.mjs +0 -37
  96. package/dist/runtime/api/models/SchemaAnalysis.d.ts +0 -50
  97. package/dist/runtime/api/models/SchemaAnalysis.mjs +0 -40
  98. package/dist/runtime/api/models/SchemaAnalysisField.d.ts +0 -62
  99. package/dist/runtime/api/models/SchemaAnalysisField.mjs +0 -45
  100. package/dist/runtime/api/models/SchemaAnalysisFieldType.d.ts +0 -43
  101. package/dist/runtime/api/models/SchemaAnalysisFieldType.mjs +0 -33
  102. package/dist/runtime/api/models/SettingsResponse.d.ts +0 -51
  103. package/dist/runtime/api/models/SettingsResponse.mjs +0 -34
  104. package/dist/runtime/api/models/UpdateFileInformationRequest.d.ts +0 -39
  105. package/dist/runtime/api/models/UpdateFileInformationRequest.mjs +0 -29
  106. package/dist/runtime/api/models/UpdateRequest.d.ts +0 -41
  107. package/dist/runtime/api/models/UpdateRequest.mjs +0 -30
  108. package/dist/runtime/api/models/UpdateResponse.d.ts +0 -49
  109. package/dist/runtime/api/models/UpdateResponse.mjs +0 -36
  110. package/dist/runtime/api/models/UpdateRoleRequest.d.ts +0 -38
  111. package/dist/runtime/api/models/UpdateRoleRequest.mjs +0 -34
  112. package/dist/runtime/api/models/UserInformation.d.ts +0 -49
  113. package/dist/runtime/api/models/UserInformation.mjs +0 -35
  114. package/dist/runtime/api/models/UserProfile.d.ts +0 -56
  115. package/dist/runtime/api/models/UserProfile.mjs +0 -41
  116. package/dist/runtime/api/models/Version.d.ts +0 -43
  117. package/dist/runtime/api/models/Version.mjs +0 -33
  118. package/dist/runtime/api/models/index.d.ts +0 -39
  119. package/dist/runtime/api/models/index.mjs +0 -39
  120. package/dist/runtime/api/runtime.d.ts +0 -182
  121. package/dist/runtime/api/runtime.mjs +0 -281
  122. package/dist/runtime/composables/mongocampApi.d.ts +0 -14
  123. package/dist/runtime/composables/mongocampApi.mjs +0 -45
  124. package/dist/runtime/composables/mongocampAuth.d.ts +0 -8
  125. package/dist/runtime/composables/mongocampAuth.mjs +0 -28
  126. package/dist/runtime/composables/mongocampSearch.d.ts +0 -11
  127. package/dist/runtime/composables/mongocampSearch.mjs +0 -20
  128. package/dist/runtime/composables/mongocampStorage.d.ts +0 -0
  129. package/dist/runtime/composables/mongocampStorage.mjs +0 -5
  130. package/dist/runtime/composables/mongocampUrl.d.ts +0 -1
  131. package/dist/runtime/composables/mongocampUrl.mjs +0 -5
  132. package/dist/runtime/composables/mongocampUser.d.ts +0 -3
  133. package/dist/runtime/composables/mongocampUser.mjs +0 -4
@@ -1,435 +0,0 @@
1
- import * as runtime from "../runtime.mjs";
2
- import {
3
- CollectionStatusFromJSON,
4
- JsonSchemaFromJSON,
5
- JsonValueBooleanFromJSON,
6
- MongoAggregateRequestToJSON,
7
- SchemaAnalysisFromJSON
8
- } from "../models/index.mjs";
9
- export class CollectionApi extends runtime.BaseAPI {
10
- /**
11
- * Aggregate in a given Collection
12
- * Aggregate in Collection
13
- */
14
- async aggregateRaw(requestParameters, initOverrides) {
15
- if (requestParameters.collectionName === null || requestParameters.collectionName === void 0) {
16
- throw new runtime.RequiredError("collectionName", "Required parameter requestParameters.collectionName was null or undefined when calling aggregate.");
17
- }
18
- if (requestParameters.mongoAggregateRequest === null || requestParameters.mongoAggregateRequest === void 0) {
19
- throw new runtime.RequiredError("mongoAggregateRequest", "Required parameter requestParameters.mongoAggregateRequest was null or undefined when calling aggregate.");
20
- }
21
- const queryParameters = {};
22
- if (requestParameters.rowsPerPage !== void 0) {
23
- queryParameters["rowsPerPage"] = requestParameters.rowsPerPage;
24
- }
25
- if (requestParameters.page !== void 0) {
26
- queryParameters["page"] = requestParameters.page;
27
- }
28
- const headerParameters = {};
29
- headerParameters["Content-Type"] = "application/json";
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
- if (this.configuration && this.configuration.accessToken) {
34
- const token = this.configuration.accessToken;
35
- const tokenString = await token("httpAuth", []);
36
- if (tokenString) {
37
- headerParameters["Authorization"] = `Bearer ${tokenString}`;
38
- }
39
- }
40
- if (this.configuration && this.configuration.apiKey) {
41
- headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
42
- }
43
- const response = await this.request({
44
- path: `/mongodb/collections/{collectionName}/aggregate`.replace(`{${"collectionName"}}`, encodeURIComponent(String(requestParameters.collectionName))),
45
- method: "POST",
46
- headers: headerParameters,
47
- query: queryParameters,
48
- body: MongoAggregateRequestToJSON(requestParameters.mongoAggregateRequest)
49
- }, initOverrides);
50
- return new runtime.JSONApiResponse(response);
51
- }
52
- /**
53
- * Aggregate in a given Collection
54
- * Aggregate in Collection
55
- */
56
- async aggregate(requestParameters, initOverrides) {
57
- const response = await this.aggregateRaw(requestParameters, initOverrides);
58
- return await response.value();
59
- }
60
- /**
61
- * Delete all Document in Collection
62
- * Clear Collection
63
- */
64
- async clearCollectionRaw(requestParameters, initOverrides) {
65
- if (requestParameters.collectionName === null || requestParameters.collectionName === void 0) {
66
- throw new runtime.RequiredError("collectionName", "Required parameter requestParameters.collectionName was null or undefined when calling clearCollection.");
67
- }
68
- const queryParameters = {};
69
- const headerParameters = {};
70
- if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
71
- headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
72
- }
73
- if (this.configuration && this.configuration.accessToken) {
74
- const token = this.configuration.accessToken;
75
- const tokenString = await token("httpAuth", []);
76
- if (tokenString) {
77
- headerParameters["Authorization"] = `Bearer ${tokenString}`;
78
- }
79
- }
80
- if (this.configuration && this.configuration.apiKey) {
81
- headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
82
- }
83
- const response = await this.request({
84
- path: `/mongodb/collections/{collectionName}/clear`.replace(`{${"collectionName"}}`, encodeURIComponent(String(requestParameters.collectionName))),
85
- method: "DELETE",
86
- headers: headerParameters,
87
- query: queryParameters
88
- }, initOverrides);
89
- return new runtime.JSONApiResponse(response, (jsonValue) => JsonValueBooleanFromJSON(jsonValue));
90
- }
91
- /**
92
- * Delete all Document in Collection
93
- * Clear Collection
94
- */
95
- async clearCollection(requestParameters, initOverrides) {
96
- const response = await this.clearCollectionRaw(requestParameters, initOverrides);
97
- return await response.value();
98
- }
99
- /**
100
- * Delete a given Collection
101
- * Delete Collection
102
- */
103
- async deleteCollectionRaw(requestParameters, initOverrides) {
104
- if (requestParameters.collectionName === null || requestParameters.collectionName === void 0) {
105
- throw new runtime.RequiredError("collectionName", "Required parameter requestParameters.collectionName was null or undefined when calling deleteCollection.");
106
- }
107
- const queryParameters = {};
108
- const headerParameters = {};
109
- if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
110
- headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
111
- }
112
- if (this.configuration && this.configuration.accessToken) {
113
- const token = this.configuration.accessToken;
114
- const tokenString = await token("httpAuth", []);
115
- if (tokenString) {
116
- headerParameters["Authorization"] = `Bearer ${tokenString}`;
117
- }
118
- }
119
- if (this.configuration && this.configuration.apiKey) {
120
- headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
121
- }
122
- const response = await this.request({
123
- path: `/mongodb/collections/{collectionName}`.replace(`{${"collectionName"}}`, encodeURIComponent(String(requestParameters.collectionName))),
124
- method: "DELETE",
125
- headers: headerParameters,
126
- query: queryParameters
127
- }, initOverrides);
128
- return new runtime.JSONApiResponse(response, (jsonValue) => JsonValueBooleanFromJSON(jsonValue));
129
- }
130
- /**
131
- * Delete a given Collection
132
- * Delete Collection
133
- */
134
- async deleteCollection(requestParameters, initOverrides) {
135
- const response = await this.deleteCollectionRaw(requestParameters, initOverrides);
136
- return await response.value();
137
- }
138
- /**
139
- * Distinct for Field in a given Collection
140
- * Distinct in Collection
141
- */
142
- async distinctRaw(requestParameters, initOverrides) {
143
- if (requestParameters.collectionName === null || requestParameters.collectionName === void 0) {
144
- throw new runtime.RequiredError("collectionName", "Required parameter requestParameters.collectionName was null or undefined when calling distinct.");
145
- }
146
- if (requestParameters.field === null || requestParameters.field === void 0) {
147
- throw new runtime.RequiredError("field", "Required parameter requestParameters.field was null or undefined when calling distinct.");
148
- }
149
- const queryParameters = {};
150
- if (requestParameters.rowsPerPage !== void 0) {
151
- queryParameters["rowsPerPage"] = requestParameters.rowsPerPage;
152
- }
153
- if (requestParameters.page !== void 0) {
154
- queryParameters["page"] = requestParameters.page;
155
- }
156
- const headerParameters = {};
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
- if (this.configuration && this.configuration.accessToken) {
161
- const token = this.configuration.accessToken;
162
- const tokenString = await token("httpAuth", []);
163
- if (tokenString) {
164
- headerParameters["Authorization"] = `Bearer ${tokenString}`;
165
- }
166
- }
167
- if (this.configuration && this.configuration.apiKey) {
168
- headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
169
- }
170
- const response = await this.request({
171
- path: `/mongodb/collections/{collectionName}/distinct/{field}`.replace(`{${"collectionName"}}`, encodeURIComponent(String(requestParameters.collectionName))).replace(`{${"field"}}`, encodeURIComponent(String(requestParameters.field))),
172
- method: "POST",
173
- headers: headerParameters,
174
- query: queryParameters
175
- }, initOverrides);
176
- return new runtime.JSONApiResponse(response);
177
- }
178
- /**
179
- * Distinct for Field in a given Collection
180
- * Distinct in Collection
181
- */
182
- async distinct(requestParameters, initOverrides) {
183
- const response = await this.distinctRaw(requestParameters, initOverrides);
184
- return await response.value();
185
- }
186
- /**
187
- * List the Fields in a given collection
188
- * Collection Fields
189
- */
190
- async getCollectionFieldsRaw(requestParameters, initOverrides) {
191
- if (requestParameters.collectionName === null || requestParameters.collectionName === void 0) {
192
- throw new runtime.RequiredError("collectionName", "Required parameter requestParameters.collectionName was null or undefined when calling getCollectionFields.");
193
- }
194
- const queryParameters = {};
195
- if (requestParameters.sampleSize !== void 0) {
196
- queryParameters["sample size"] = requestParameters.sampleSize;
197
- }
198
- const headerParameters = {};
199
- if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
200
- headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
201
- }
202
- if (this.configuration && this.configuration.accessToken) {
203
- const token = this.configuration.accessToken;
204
- const tokenString = await token("httpAuth", []);
205
- if (tokenString) {
206
- headerParameters["Authorization"] = `Bearer ${tokenString}`;
207
- }
208
- }
209
- if (this.configuration && this.configuration.apiKey) {
210
- headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
211
- }
212
- const response = await this.request({
213
- path: `/mongodb/collections/{collectionName}/fields`.replace(`{${"collectionName"}}`, encodeURIComponent(String(requestParameters.collectionName))),
214
- method: "GET",
215
- headers: headerParameters,
216
- query: queryParameters
217
- }, initOverrides);
218
- return new runtime.JSONApiResponse(response);
219
- }
220
- /**
221
- * List the Fields in a given collection
222
- * Collection Fields
223
- */
224
- async getCollectionFields(requestParameters, initOverrides) {
225
- const response = await this.getCollectionFieldsRaw(requestParameters, initOverrides);
226
- return await response.value();
227
- }
228
- /**
229
- * All Information about a single Collection
230
- * Collection Information
231
- */
232
- async getCollectionInformationRaw(requestParameters, initOverrides) {
233
- if (requestParameters.collectionName === null || requestParameters.collectionName === void 0) {
234
- throw new runtime.RequiredError("collectionName", "Required parameter requestParameters.collectionName was null or undefined when calling getCollectionInformation.");
235
- }
236
- const queryParameters = {};
237
- if (requestParameters.includeDetails !== void 0) {
238
- queryParameters["includeDetails"] = requestParameters.includeDetails;
239
- }
240
- const headerParameters = {};
241
- if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
242
- headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
243
- }
244
- if (this.configuration && this.configuration.accessToken) {
245
- const token = this.configuration.accessToken;
246
- const tokenString = await token("httpAuth", []);
247
- if (tokenString) {
248
- headerParameters["Authorization"] = `Bearer ${tokenString}`;
249
- }
250
- }
251
- if (this.configuration && this.configuration.apiKey) {
252
- headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
253
- }
254
- const response = await this.request({
255
- path: `/mongodb/collections/{collectionName}`.replace(`{${"collectionName"}}`, encodeURIComponent(String(requestParameters.collectionName))),
256
- method: "GET",
257
- headers: headerParameters,
258
- query: queryParameters
259
- }, initOverrides);
260
- return new runtime.JSONApiResponse(response, (jsonValue) => CollectionStatusFromJSON(jsonValue));
261
- }
262
- /**
263
- * All Information about a single Collection
264
- * Collection Information
265
- */
266
- async getCollectionInformation(requestParameters, initOverrides) {
267
- const response = await this.getCollectionInformationRaw(requestParameters, initOverrides);
268
- return await response.value();
269
- }
270
- /**
271
- * List the Fields in a given collection
272
- * Collection Fields
273
- */
274
- async getJsonSchemaRaw(requestParameters, initOverrides) {
275
- if (requestParameters.collectionName === null || requestParameters.collectionName === void 0) {
276
- throw new runtime.RequiredError("collectionName", "Required parameter requestParameters.collectionName was null or undefined when calling getJsonSchema.");
277
- }
278
- const queryParameters = {};
279
- if (requestParameters.sampleSize !== void 0) {
280
- queryParameters["sampleSize"] = requestParameters.sampleSize;
281
- }
282
- if (requestParameters.deepth !== void 0) {
283
- queryParameters["deepth"] = requestParameters.deepth;
284
- }
285
- const headerParameters = {};
286
- if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
287
- headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
288
- }
289
- if (this.configuration && this.configuration.accessToken) {
290
- const token = this.configuration.accessToken;
291
- const tokenString = await token("httpAuth", []);
292
- if (tokenString) {
293
- headerParameters["Authorization"] = `Bearer ${tokenString}`;
294
- }
295
- }
296
- if (this.configuration && this.configuration.apiKey) {
297
- headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
298
- }
299
- const response = await this.request({
300
- path: `/mongodb/collections/{collectionName}/schema`.replace(`{${"collectionName"}}`, encodeURIComponent(String(requestParameters.collectionName))),
301
- method: "GET",
302
- headers: headerParameters,
303
- query: queryParameters
304
- }, initOverrides);
305
- return new runtime.JSONApiResponse(response, (jsonValue) => JsonSchemaFromJSON(jsonValue));
306
- }
307
- /**
308
- * List the Fields in a given collection
309
- * Collection Fields
310
- */
311
- async getJsonSchema(requestParameters, initOverrides) {
312
- const response = await this.getJsonSchemaRaw(requestParameters, initOverrides);
313
- return await response.value();
314
- }
315
- /**
316
- * List the Fields in a given collection
317
- * Collection Fields
318
- */
319
- async getSchemaAnalysisRaw(requestParameters, initOverrides) {
320
- if (requestParameters.collectionName === null || requestParameters.collectionName === void 0) {
321
- throw new runtime.RequiredError("collectionName", "Required parameter requestParameters.collectionName was null or undefined when calling getSchemaAnalysis.");
322
- }
323
- const queryParameters = {};
324
- if (requestParameters.sampleSize !== void 0) {
325
- queryParameters["sampleSize"] = requestParameters.sampleSize;
326
- }
327
- if (requestParameters.deepth !== void 0) {
328
- queryParameters["deepth"] = requestParameters.deepth;
329
- }
330
- const headerParameters = {};
331
- if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
332
- headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
333
- }
334
- if (this.configuration && this.configuration.accessToken) {
335
- const token = this.configuration.accessToken;
336
- const tokenString = await token("httpAuth", []);
337
- if (tokenString) {
338
- headerParameters["Authorization"] = `Bearer ${tokenString}`;
339
- }
340
- }
341
- if (this.configuration && this.configuration.apiKey) {
342
- headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
343
- }
344
- const response = await this.request({
345
- path: `/mongodb/collections/{collectionName}/schema/analysis`.replace(`{${"collectionName"}}`, encodeURIComponent(String(requestParameters.collectionName))),
346
- method: "GET",
347
- headers: headerParameters,
348
- query: queryParameters
349
- }, initOverrides);
350
- return new runtime.JSONApiResponse(response, (jsonValue) => SchemaAnalysisFromJSON(jsonValue));
351
- }
352
- /**
353
- * List the Fields in a given collection
354
- * Collection Fields
355
- */
356
- async getSchemaAnalysis(requestParameters, initOverrides) {
357
- const response = await this.getSchemaAnalysisRaw(requestParameters, initOverrides);
358
- return await response.value();
359
- }
360
- /**
361
- * List of all Collections of the default database
362
- * List of Collections
363
- */
364
- async listCollectionsRaw(initOverrides) {
365
- const queryParameters = {};
366
- const headerParameters = {};
367
- if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
368
- headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
369
- }
370
- if (this.configuration && this.configuration.accessToken) {
371
- const token = this.configuration.accessToken;
372
- const tokenString = await token("httpAuth", []);
373
- if (tokenString) {
374
- headerParameters["Authorization"] = `Bearer ${tokenString}`;
375
- }
376
- }
377
- if (this.configuration && this.configuration.apiKey) {
378
- headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
379
- }
380
- const response = await this.request({
381
- path: `/mongodb/collections`,
382
- method: "GET",
383
- headers: headerParameters,
384
- query: queryParameters
385
- }, initOverrides);
386
- return new runtime.JSONApiResponse(response);
387
- }
388
- /**
389
- * List of all Collections of the default database
390
- * List of Collections
391
- */
392
- async listCollections(initOverrides) {
393
- const response = await this.listCollectionsRaw(initOverrides);
394
- return await response.value();
395
- }
396
- /**
397
- * List of all Collections of the given database
398
- * List of Collections
399
- */
400
- async listCollectionsByDatabaseRaw(requestParameters, initOverrides) {
401
- if (requestParameters.databaseName === null || requestParameters.databaseName === void 0) {
402
- throw new runtime.RequiredError("databaseName", "Required parameter requestParameters.databaseName was null or undefined when calling listCollectionsByDatabase.");
403
- }
404
- const queryParameters = {};
405
- const headerParameters = {};
406
- if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
407
- headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
408
- }
409
- if (this.configuration && this.configuration.accessToken) {
410
- const token = this.configuration.accessToken;
411
- const tokenString = await token("httpAuth", []);
412
- if (tokenString) {
413
- headerParameters["Authorization"] = `Bearer ${tokenString}`;
414
- }
415
- }
416
- if (this.configuration && this.configuration.apiKey) {
417
- headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
418
- }
419
- const response = await this.request({
420
- path: `/mongodb/databases/{databaseName}/collections`.replace(`{${"databaseName"}}`, encodeURIComponent(String(requestParameters.databaseName))),
421
- method: "GET",
422
- headers: headerParameters,
423
- query: queryParameters
424
- }, initOverrides);
425
- return new runtime.JSONApiResponse(response);
426
- }
427
- /**
428
- * List of all Collections of the given database
429
- * List of Collections
430
- */
431
- async listCollectionsByDatabase(requestParameters, initOverrides) {
432
- const response = await this.listCollectionsByDatabaseRaw(requestParameters, initOverrides);
433
- return await response.value();
434
- }
435
- }
@@ -1,77 +0,0 @@
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.4.2
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 type { DatabaseInfo, JsonValueBoolean } from '../models';
14
- export interface DeleteDatabaseRequest {
15
- databaseName: string;
16
- }
17
- export interface GetDatabaseInfoRequest {
18
- databaseName: string;
19
- }
20
- export interface ListCollectionsByDatabaseRequest {
21
- databaseName: string;
22
- }
23
- /**
24
- *
25
- */
26
- export declare class DatabaseApi extends runtime.BaseAPI {
27
- /**
28
- * List of all Databases Infos
29
- * List of Database Infos
30
- */
31
- databaseInfosRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<DatabaseInfo>>>;
32
- /**
33
- * List of all Databases Infos
34
- * List of Database Infos
35
- */
36
- databaseInfos(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<DatabaseInfo>>;
37
- /**
38
- * Delete given Database
39
- * Delete Database
40
- */
41
- deleteDatabaseRaw(requestParameters: DeleteDatabaseRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<JsonValueBoolean>>;
42
- /**
43
- * Delete given Database
44
- * Delete Database
45
- */
46
- deleteDatabase(requestParameters: DeleteDatabaseRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<JsonValueBoolean>;
47
- /**
48
- * All Information about given Database
49
- * Database Infos of selected Database
50
- */
51
- getDatabaseInfoRaw(requestParameters: GetDatabaseInfoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DatabaseInfo>>;
52
- /**
53
- * All Information about given Database
54
- * Database Infos of selected Database
55
- */
56
- getDatabaseInfo(requestParameters: GetDatabaseInfoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DatabaseInfo>;
57
- /**
58
- * List of all Collections of the given database
59
- * List of Collections
60
- */
61
- listCollectionsByDatabaseRaw(requestParameters: ListCollectionsByDatabaseRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<string>>>;
62
- /**
63
- * List of all Collections of the given database
64
- * List of Collections
65
- */
66
- listCollectionsByDatabase(requestParameters: ListCollectionsByDatabaseRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<string>>;
67
- /**
68
- * List of all Databases
69
- * List of Databases
70
- */
71
- listDatabasesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<string>>>;
72
- /**
73
- * List of all Databases
74
- * List of Databases
75
- */
76
- listDatabases(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<string>>;
77
- }