@sfxcode/nuxt-mongocamp-server 0.8.8 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +7 -7
|
@@ -6,8 +6,12 @@ import {
|
|
|
6
6
|
MongoFindRequestToJSON,
|
|
7
7
|
UpdateFileInformationRequestToJSON,
|
|
8
8
|
UpdateResponseFromJSON
|
|
9
|
-
} from "../models";
|
|
9
|
+
} from "../models/index.mjs";
|
|
10
10
|
export class FileApi extends runtime.BaseAPI {
|
|
11
|
+
/**
|
|
12
|
+
* Delete one File from given Bucket
|
|
13
|
+
* Delete File from Bucket
|
|
14
|
+
*/
|
|
11
15
|
async deleteFileRaw(requestParameters, initOverrides) {
|
|
12
16
|
if (requestParameters.bucketName === null || requestParameters.bucketName === void 0) {
|
|
13
17
|
throw new runtime.RequiredError("bucketName", "Required parameter requestParameters.bucketName was null or undefined when calling deleteFile.");
|
|
@@ -17,8 +21,8 @@ export class FileApi extends runtime.BaseAPI {
|
|
|
17
21
|
}
|
|
18
22
|
const queryParameters = {};
|
|
19
23
|
const headerParameters = {};
|
|
20
|
-
if (this.configuration && this.configuration.
|
|
21
|
-
headerParameters["
|
|
24
|
+
if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
|
|
25
|
+
headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
|
|
22
26
|
}
|
|
23
27
|
if (this.configuration && this.configuration.accessToken) {
|
|
24
28
|
const token = this.configuration.accessToken;
|
|
@@ -27,8 +31,8 @@ export class FileApi extends runtime.BaseAPI {
|
|
|
27
31
|
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
28
32
|
}
|
|
29
33
|
}
|
|
30
|
-
if (this.configuration &&
|
|
31
|
-
headerParameters["
|
|
34
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
35
|
+
headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
|
|
32
36
|
}
|
|
33
37
|
const response = await this.request({
|
|
34
38
|
path: `/mongodb/buckets/{bucketName}/files/{fileId}`.replace(`{${"bucketName"}}`, encodeURIComponent(String(requestParameters.bucketName))).replace(`{${"fileId"}}`, encodeURIComponent(String(requestParameters.fileId))),
|
|
@@ -38,10 +42,18 @@ export class FileApi extends runtime.BaseAPI {
|
|
|
38
42
|
}, initOverrides);
|
|
39
43
|
return new runtime.JSONApiResponse(response, (jsonValue) => DeleteResponseFromJSON(jsonValue));
|
|
40
44
|
}
|
|
45
|
+
/**
|
|
46
|
+
* Delete one File from given Bucket
|
|
47
|
+
* Delete File from Bucket
|
|
48
|
+
*/
|
|
41
49
|
async deleteFile(requestParameters, initOverrides) {
|
|
42
50
|
const response = await this.deleteFileRaw(requestParameters, initOverrides);
|
|
43
51
|
return await response.value();
|
|
44
52
|
}
|
|
53
|
+
/**
|
|
54
|
+
* Alternative to GET Route for more complex queries and URL max. Length
|
|
55
|
+
* Files in Bucket
|
|
56
|
+
*/
|
|
45
57
|
async findFilesRaw(requestParameters, initOverrides) {
|
|
46
58
|
if (requestParameters.bucketName === null || requestParameters.bucketName === void 0) {
|
|
47
59
|
throw new runtime.RequiredError("bucketName", "Required parameter requestParameters.bucketName was null or undefined when calling findFiles.");
|
|
@@ -58,8 +70,8 @@ export class FileApi extends runtime.BaseAPI {
|
|
|
58
70
|
}
|
|
59
71
|
const headerParameters = {};
|
|
60
72
|
headerParameters["Content-Type"] = "application/json";
|
|
61
|
-
if (this.configuration && this.configuration.
|
|
62
|
-
headerParameters["
|
|
73
|
+
if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
|
|
74
|
+
headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
|
|
63
75
|
}
|
|
64
76
|
if (this.configuration && this.configuration.accessToken) {
|
|
65
77
|
const token = this.configuration.accessToken;
|
|
@@ -68,8 +80,8 @@ export class FileApi extends runtime.BaseAPI {
|
|
|
68
80
|
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
69
81
|
}
|
|
70
82
|
}
|
|
71
|
-
if (this.configuration &&
|
|
72
|
-
headerParameters["
|
|
83
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
84
|
+
headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
|
|
73
85
|
}
|
|
74
86
|
const response = await this.request({
|
|
75
87
|
path: `/mongodb/buckets/{bucketName}/files`.replace(`{${"bucketName"}}`, encodeURIComponent(String(requestParameters.bucketName))),
|
|
@@ -80,10 +92,18 @@ export class FileApi extends runtime.BaseAPI {
|
|
|
80
92
|
}, initOverrides);
|
|
81
93
|
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(FileInformationFromJSON));
|
|
82
94
|
}
|
|
95
|
+
/**
|
|
96
|
+
* Alternative to GET Route for more complex queries and URL max. Length
|
|
97
|
+
* Files in Bucket
|
|
98
|
+
*/
|
|
83
99
|
async findFiles(requestParameters, initOverrides) {
|
|
84
100
|
const response = await this.findFilesRaw(requestParameters, initOverrides);
|
|
85
101
|
return await response.value();
|
|
86
102
|
}
|
|
103
|
+
/**
|
|
104
|
+
* Get File from given Bucket
|
|
105
|
+
* File from Bucket
|
|
106
|
+
*/
|
|
87
107
|
async getFileRaw(requestParameters, initOverrides) {
|
|
88
108
|
if (requestParameters.bucketName === null || requestParameters.bucketName === void 0) {
|
|
89
109
|
throw new runtime.RequiredError("bucketName", "Required parameter requestParameters.bucketName was null or undefined when calling getFile.");
|
|
@@ -93,8 +113,8 @@ export class FileApi extends runtime.BaseAPI {
|
|
|
93
113
|
}
|
|
94
114
|
const queryParameters = {};
|
|
95
115
|
const headerParameters = {};
|
|
96
|
-
if (this.configuration && this.configuration.
|
|
97
|
-
headerParameters["
|
|
116
|
+
if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
|
|
117
|
+
headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
|
|
98
118
|
}
|
|
99
119
|
if (this.configuration && this.configuration.accessToken) {
|
|
100
120
|
const token = this.configuration.accessToken;
|
|
@@ -103,8 +123,8 @@ export class FileApi extends runtime.BaseAPI {
|
|
|
103
123
|
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
104
124
|
}
|
|
105
125
|
}
|
|
106
|
-
if (this.configuration &&
|
|
107
|
-
headerParameters["
|
|
126
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
127
|
+
headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
|
|
108
128
|
}
|
|
109
129
|
const response = await this.request({
|
|
110
130
|
path: `/mongodb/buckets/{bucketName}/files/{fileId}/file`.replace(`{${"bucketName"}}`, encodeURIComponent(String(requestParameters.bucketName))).replace(`{${"fileId"}}`, encodeURIComponent(String(requestParameters.fileId))),
|
|
@@ -114,10 +134,18 @@ export class FileApi extends runtime.BaseAPI {
|
|
|
114
134
|
}, initOverrides);
|
|
115
135
|
return new runtime.BlobApiResponse(response);
|
|
116
136
|
}
|
|
137
|
+
/**
|
|
138
|
+
* Get File from given Bucket
|
|
139
|
+
* File from Bucket
|
|
140
|
+
*/
|
|
117
141
|
async getFile(requestParameters, initOverrides) {
|
|
118
142
|
const response = await this.getFileRaw(requestParameters, initOverrides);
|
|
119
143
|
return await response.value();
|
|
120
144
|
}
|
|
145
|
+
/**
|
|
146
|
+
* Get one FileInformation from given Bucket
|
|
147
|
+
* FileInformation from Bucket
|
|
148
|
+
*/
|
|
121
149
|
async getFileInformationRaw(requestParameters, initOverrides) {
|
|
122
150
|
if (requestParameters.bucketName === null || requestParameters.bucketName === void 0) {
|
|
123
151
|
throw new runtime.RequiredError("bucketName", "Required parameter requestParameters.bucketName was null or undefined when calling getFileInformation.");
|
|
@@ -127,8 +155,8 @@ export class FileApi extends runtime.BaseAPI {
|
|
|
127
155
|
}
|
|
128
156
|
const queryParameters = {};
|
|
129
157
|
const headerParameters = {};
|
|
130
|
-
if (this.configuration && this.configuration.
|
|
131
|
-
headerParameters["
|
|
158
|
+
if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
|
|
159
|
+
headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
|
|
132
160
|
}
|
|
133
161
|
if (this.configuration && this.configuration.accessToken) {
|
|
134
162
|
const token = this.configuration.accessToken;
|
|
@@ -137,8 +165,8 @@ export class FileApi extends runtime.BaseAPI {
|
|
|
137
165
|
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
138
166
|
}
|
|
139
167
|
}
|
|
140
|
-
if (this.configuration &&
|
|
141
|
-
headerParameters["
|
|
168
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
169
|
+
headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
|
|
142
170
|
}
|
|
143
171
|
const response = await this.request({
|
|
144
172
|
path: `/mongodb/buckets/{bucketName}/files/{fileId}`.replace(`{${"bucketName"}}`, encodeURIComponent(String(requestParameters.bucketName))).replace(`{${"fileId"}}`, encodeURIComponent(String(requestParameters.fileId))),
|
|
@@ -148,10 +176,18 @@ export class FileApi extends runtime.BaseAPI {
|
|
|
148
176
|
}, initOverrides);
|
|
149
177
|
return new runtime.JSONApiResponse(response, (jsonValue) => FileInformationFromJSON(jsonValue));
|
|
150
178
|
}
|
|
179
|
+
/**
|
|
180
|
+
* Get one FileInformation from given Bucket
|
|
181
|
+
* FileInformation from Bucket
|
|
182
|
+
*/
|
|
151
183
|
async getFileInformation(requestParameters, initOverrides) {
|
|
152
184
|
const response = await this.getFileInformationRaw(requestParameters, initOverrides);
|
|
153
185
|
return await response.value();
|
|
154
186
|
}
|
|
187
|
+
/**
|
|
188
|
+
* Insert one File in given Bucket
|
|
189
|
+
* Insert File
|
|
190
|
+
*/
|
|
155
191
|
async insertFileRaw(requestParameters, initOverrides) {
|
|
156
192
|
if (requestParameters.bucketName === null || requestParameters.bucketName === void 0) {
|
|
157
193
|
throw new runtime.RequiredError("bucketName", "Required parameter requestParameters.bucketName was null or undefined when calling insertFile.");
|
|
@@ -167,8 +203,8 @@ export class FileApi extends runtime.BaseAPI {
|
|
|
167
203
|
queryParameters["fileName"] = requestParameters.fileName;
|
|
168
204
|
}
|
|
169
205
|
const headerParameters = {};
|
|
170
|
-
if (this.configuration && this.configuration.
|
|
171
|
-
headerParameters["
|
|
206
|
+
if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
|
|
207
|
+
headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
|
|
172
208
|
}
|
|
173
209
|
if (this.configuration && this.configuration.accessToken) {
|
|
174
210
|
const token = this.configuration.accessToken;
|
|
@@ -177,8 +213,8 @@ export class FileApi extends runtime.BaseAPI {
|
|
|
177
213
|
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
178
214
|
}
|
|
179
215
|
}
|
|
180
|
-
if (this.configuration &&
|
|
181
|
-
headerParameters["
|
|
216
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
217
|
+
headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
|
|
182
218
|
}
|
|
183
219
|
const consumes = [
|
|
184
220
|
{ contentType: "multipart/form-data" }
|
|
@@ -207,10 +243,18 @@ export class FileApi extends runtime.BaseAPI {
|
|
|
207
243
|
}, initOverrides);
|
|
208
244
|
return new runtime.JSONApiResponse(response, (jsonValue) => InsertResponseFromJSON(jsonValue));
|
|
209
245
|
}
|
|
246
|
+
/**
|
|
247
|
+
* Insert one File in given Bucket
|
|
248
|
+
* Insert File
|
|
249
|
+
*/
|
|
210
250
|
async insertFile(requestParameters, initOverrides) {
|
|
211
251
|
const response = await this.insertFileRaw(requestParameters, initOverrides);
|
|
212
252
|
return await response.value();
|
|
213
253
|
}
|
|
254
|
+
/**
|
|
255
|
+
* Get Files paginated from given Bucket
|
|
256
|
+
* Files in Bucket
|
|
257
|
+
*/
|
|
214
258
|
async listFilesRaw(requestParameters, initOverrides) {
|
|
215
259
|
if (requestParameters.bucketName === null || requestParameters.bucketName === void 0) {
|
|
216
260
|
throw new runtime.RequiredError("bucketName", "Required parameter requestParameters.bucketName was null or undefined when calling listFiles.");
|
|
@@ -232,8 +276,8 @@ export class FileApi extends runtime.BaseAPI {
|
|
|
232
276
|
queryParameters["page"] = requestParameters.page;
|
|
233
277
|
}
|
|
234
278
|
const headerParameters = {};
|
|
235
|
-
if (this.configuration && this.configuration.
|
|
236
|
-
headerParameters["
|
|
279
|
+
if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
|
|
280
|
+
headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
|
|
237
281
|
}
|
|
238
282
|
if (this.configuration && this.configuration.accessToken) {
|
|
239
283
|
const token = this.configuration.accessToken;
|
|
@@ -242,8 +286,8 @@ export class FileApi extends runtime.BaseAPI {
|
|
|
242
286
|
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
243
287
|
}
|
|
244
288
|
}
|
|
245
|
-
if (this.configuration &&
|
|
246
|
-
headerParameters["
|
|
289
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
290
|
+
headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
|
|
247
291
|
}
|
|
248
292
|
const response = await this.request({
|
|
249
293
|
path: `/mongodb/buckets/{bucketName}/files`.replace(`{${"bucketName"}}`, encodeURIComponent(String(requestParameters.bucketName))),
|
|
@@ -253,10 +297,18 @@ export class FileApi extends runtime.BaseAPI {
|
|
|
253
297
|
}, initOverrides);
|
|
254
298
|
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(FileInformationFromJSON));
|
|
255
299
|
}
|
|
300
|
+
/**
|
|
301
|
+
* Get Files paginated from given Bucket
|
|
302
|
+
* Files in Bucket
|
|
303
|
+
*/
|
|
256
304
|
async listFiles(requestParameters, initOverrides) {
|
|
257
305
|
const response = await this.listFilesRaw(requestParameters, initOverrides);
|
|
258
306
|
return await response.value();
|
|
259
307
|
}
|
|
308
|
+
/**
|
|
309
|
+
* Replace MetaData and potential update FileName
|
|
310
|
+
* Update FileInformation in Bucket
|
|
311
|
+
*/
|
|
260
312
|
async updateFileInformationRaw(requestParameters, initOverrides) {
|
|
261
313
|
if (requestParameters.bucketName === null || requestParameters.bucketName === void 0) {
|
|
262
314
|
throw new runtime.RequiredError("bucketName", "Required parameter requestParameters.bucketName was null or undefined when calling updateFileInformation.");
|
|
@@ -270,8 +322,8 @@ export class FileApi extends runtime.BaseAPI {
|
|
|
270
322
|
const queryParameters = {};
|
|
271
323
|
const headerParameters = {};
|
|
272
324
|
headerParameters["Content-Type"] = "application/json";
|
|
273
|
-
if (this.configuration && this.configuration.
|
|
274
|
-
headerParameters["
|
|
325
|
+
if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
|
|
326
|
+
headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
|
|
275
327
|
}
|
|
276
328
|
if (this.configuration && this.configuration.accessToken) {
|
|
277
329
|
const token = this.configuration.accessToken;
|
|
@@ -280,8 +332,8 @@ export class FileApi extends runtime.BaseAPI {
|
|
|
280
332
|
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
281
333
|
}
|
|
282
334
|
}
|
|
283
|
-
if (this.configuration &&
|
|
284
|
-
headerParameters["
|
|
335
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
336
|
+
headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
|
|
285
337
|
}
|
|
286
338
|
const response = await this.request({
|
|
287
339
|
path: `/mongodb/buckets/{bucketName}/files/{fileId}`.replace(`{${"bucketName"}}`, encodeURIComponent(String(requestParameters.bucketName))).replace(`{${"fileId"}}`, encodeURIComponent(String(requestParameters.fileId))),
|
|
@@ -292,6 +344,10 @@ export class FileApi extends runtime.BaseAPI {
|
|
|
292
344
|
}, initOverrides);
|
|
293
345
|
return new runtime.JSONApiResponse(response, (jsonValue) => UpdateResponseFromJSON(jsonValue));
|
|
294
346
|
}
|
|
347
|
+
/**
|
|
348
|
+
* Replace MetaData and potential update FileName
|
|
349
|
+
* Update FileInformation in Bucket
|
|
350
|
+
*/
|
|
295
351
|
async updateFileInformation(requestParameters, initOverrides) {
|
|
296
352
|
const response = await this.updateFileInformationRaw(requestParameters, initOverrides);
|
|
297
353
|
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 { IndexCreateRequest, IndexCreateResponse, IndexDropResponse, IndexOptionsRequest, MongoIndex } from '../models';
|
|
13
|
+
import type { IndexCreateRequest, IndexCreateResponse, IndexDropResponse, IndexOptionsRequest, MongoIndex } from '../models';
|
|
14
14
|
export interface CreateExpiringIndexRequest {
|
|
15
15
|
collectionName: string;
|
|
16
16
|
fieldName: string;
|
|
@@ -58,80 +58,80 @@ export declare class IndexApi extends runtime.BaseAPI {
|
|
|
58
58
|
* Create expiring Index by Field for given Collection
|
|
59
59
|
* Create expiring Index by Field for Collection
|
|
60
60
|
*/
|
|
61
|
-
createExpiringIndexRaw(requestParameters: CreateExpiringIndexRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<IndexCreateResponse>>;
|
|
61
|
+
createExpiringIndexRaw(requestParameters: CreateExpiringIndexRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<IndexCreateResponse>>;
|
|
62
62
|
/**
|
|
63
63
|
* Create expiring Index by Field for given Collection
|
|
64
64
|
* Create expiring Index by Field for Collection
|
|
65
65
|
*/
|
|
66
|
-
createExpiringIndex(requestParameters: CreateExpiringIndexRequest, initOverrides?: RequestInit): Promise<IndexCreateResponse>;
|
|
66
|
+
createExpiringIndex(requestParameters: CreateExpiringIndexRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IndexCreateResponse>;
|
|
67
67
|
/**
|
|
68
68
|
* Create Index for given Collection
|
|
69
69
|
* Create Index for Collection
|
|
70
70
|
*/
|
|
71
|
-
createIndexRaw(requestParameters: CreateIndexRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<IndexCreateResponse>>;
|
|
71
|
+
createIndexRaw(requestParameters: CreateIndexRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<IndexCreateResponse>>;
|
|
72
72
|
/**
|
|
73
73
|
* Create Index for given Collection
|
|
74
74
|
* Create Index for Collection
|
|
75
75
|
*/
|
|
76
|
-
createIndex(requestParameters: CreateIndexRequest, initOverrides?: RequestInit): Promise<IndexCreateResponse>;
|
|
76
|
+
createIndex(requestParameters: CreateIndexRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IndexCreateResponse>;
|
|
77
77
|
/**
|
|
78
78
|
* Create Index by Field for given Collection
|
|
79
79
|
* Create Index by Field for Collection
|
|
80
80
|
*/
|
|
81
|
-
createIndexForFieldRaw(requestParameters: CreateIndexForFieldRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<IndexCreateResponse>>;
|
|
81
|
+
createIndexForFieldRaw(requestParameters: CreateIndexForFieldRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<IndexCreateResponse>>;
|
|
82
82
|
/**
|
|
83
83
|
* Create Index by Field for given Collection
|
|
84
84
|
* Create Index by Field for Collection
|
|
85
85
|
*/
|
|
86
|
-
createIndexForField(requestParameters: CreateIndexForFieldRequest, initOverrides?: RequestInit): Promise<IndexCreateResponse>;
|
|
86
|
+
createIndexForField(requestParameters: CreateIndexForFieldRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IndexCreateResponse>;
|
|
87
87
|
/**
|
|
88
88
|
* Create text index by field for given collection
|
|
89
89
|
* Create text index by field for collection
|
|
90
90
|
*/
|
|
91
|
-
createTextIndexRaw(requestParameters: CreateTextIndexRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<IndexCreateResponse>>;
|
|
91
|
+
createTextIndexRaw(requestParameters: CreateTextIndexRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<IndexCreateResponse>>;
|
|
92
92
|
/**
|
|
93
93
|
* Create text index by field for given collection
|
|
94
94
|
* Create text index by field for collection
|
|
95
95
|
*/
|
|
96
|
-
createTextIndex(requestParameters: CreateTextIndexRequest, initOverrides?: RequestInit): Promise<IndexCreateResponse>;
|
|
96
|
+
createTextIndex(requestParameters: CreateTextIndexRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IndexCreateResponse>;
|
|
97
97
|
/**
|
|
98
98
|
* Create Unique Index by Field for given Collection
|
|
99
99
|
* Create Unique Index
|
|
100
100
|
*/
|
|
101
|
-
createUniqueIndexRaw(requestParameters: CreateUniqueIndexRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<IndexCreateResponse>>;
|
|
101
|
+
createUniqueIndexRaw(requestParameters: CreateUniqueIndexRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<IndexCreateResponse>>;
|
|
102
102
|
/**
|
|
103
103
|
* Create Unique Index by Field for given Collection
|
|
104
104
|
* Create Unique Index
|
|
105
105
|
*/
|
|
106
|
-
createUniqueIndex(requestParameters: CreateUniqueIndexRequest, initOverrides?: RequestInit): Promise<IndexCreateResponse>;
|
|
106
|
+
createUniqueIndex(requestParameters: CreateUniqueIndexRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IndexCreateResponse>;
|
|
107
107
|
/**
|
|
108
108
|
* Delete Index by Name for given Collection
|
|
109
109
|
* Delete Index
|
|
110
110
|
*/
|
|
111
|
-
deleteIndexRaw(requestParameters: DeleteIndexRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<IndexDropResponse>>;
|
|
111
|
+
deleteIndexRaw(requestParameters: DeleteIndexRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<IndexDropResponse>>;
|
|
112
112
|
/**
|
|
113
113
|
* Delete Index by Name for given Collection
|
|
114
114
|
* Delete Index
|
|
115
115
|
*/
|
|
116
|
-
deleteIndex(requestParameters: DeleteIndexRequest, initOverrides?: RequestInit): Promise<IndexDropResponse>;
|
|
116
|
+
deleteIndex(requestParameters: DeleteIndexRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IndexDropResponse>;
|
|
117
117
|
/**
|
|
118
118
|
* Index by Name for given Collection
|
|
119
119
|
* Index for Collection
|
|
120
120
|
*/
|
|
121
|
-
indexRaw(requestParameters: IndexRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<MongoIndex>>;
|
|
121
|
+
indexRaw(requestParameters: IndexRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<MongoIndex>>;
|
|
122
122
|
/**
|
|
123
123
|
* Index by Name for given Collection
|
|
124
124
|
* Index for Collection
|
|
125
125
|
*/
|
|
126
|
-
index(requestParameters: IndexRequest, initOverrides?: RequestInit): Promise<MongoIndex>;
|
|
126
|
+
index(requestParameters: IndexRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<MongoIndex>;
|
|
127
127
|
/**
|
|
128
128
|
* List all Indices for given Collection
|
|
129
129
|
* List Indices for Collection
|
|
130
130
|
*/
|
|
131
|
-
listIndicesRaw(requestParameters: ListIndicesRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<Array<MongoIndex>>>;
|
|
131
|
+
listIndicesRaw(requestParameters: ListIndicesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<MongoIndex>>>;
|
|
132
132
|
/**
|
|
133
133
|
* List all Indices for given Collection
|
|
134
134
|
* List Indices for Collection
|
|
135
135
|
*/
|
|
136
|
-
listIndices(requestParameters: ListIndicesRequest, initOverrides?: RequestInit): Promise<Array<MongoIndex>>;
|
|
136
|
+
listIndices(requestParameters: ListIndicesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<MongoIndex>>;
|
|
137
137
|
}
|