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