@sfxcode/nuxt-mongocamp-server 1.0.2 → 1.0.3

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 (134) hide show
  1. package/package.json +9 -9
  2. package/dist/module.cjs +0 -5
  3. package/dist/module.d.ts +0 -9
  4. package/dist/module.json +0 -8
  5. package/dist/module.mjs +0 -555
  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
  134. package/dist/types.d.ts +0 -15
@@ -1,355 +0,0 @@
1
- import * as runtime from "../runtime.mjs";
2
- import {
3
- DeleteResponseFromJSON,
4
- FileInformationFromJSON,
5
- InsertResponseFromJSON,
6
- MongoFindRequestToJSON,
7
- UpdateFileInformationRequestToJSON,
8
- UpdateResponseFromJSON
9
- } from "../models/index.mjs";
10
- export class FileApi extends runtime.BaseAPI {
11
- /**
12
- * Delete one File from given Bucket
13
- * Delete File from Bucket
14
- */
15
- async deleteFileRaw(requestParameters, initOverrides) {
16
- if (requestParameters.bucketName === null || requestParameters.bucketName === void 0) {
17
- throw new runtime.RequiredError("bucketName", "Required parameter requestParameters.bucketName was null or undefined when calling deleteFile.");
18
- }
19
- if (requestParameters.fileId === null || requestParameters.fileId === void 0) {
20
- throw new runtime.RequiredError("fileId", "Required parameter requestParameters.fileId was null or undefined when calling deleteFile.");
21
- }
22
- const queryParameters = {};
23
- const 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);
26
- }
27
- if (this.configuration && this.configuration.accessToken) {
28
- const token = this.configuration.accessToken;
29
- const tokenString = await token("httpAuth", []);
30
- if (tokenString) {
31
- headerParameters["Authorization"] = `Bearer ${tokenString}`;
32
- }
33
- }
34
- if (this.configuration && this.configuration.apiKey) {
35
- headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
36
- }
37
- const response = await this.request({
38
- path: `/mongodb/buckets/{bucketName}/files/{fileId}`.replace(`{${"bucketName"}}`, encodeURIComponent(String(requestParameters.bucketName))).replace(`{${"fileId"}}`, encodeURIComponent(String(requestParameters.fileId))),
39
- method: "DELETE",
40
- headers: headerParameters,
41
- query: queryParameters
42
- }, initOverrides);
43
- return new runtime.JSONApiResponse(response, (jsonValue) => DeleteResponseFromJSON(jsonValue));
44
- }
45
- /**
46
- * Delete one File from given Bucket
47
- * Delete File from Bucket
48
- */
49
- async deleteFile(requestParameters, initOverrides) {
50
- const response = await this.deleteFileRaw(requestParameters, initOverrides);
51
- return await response.value();
52
- }
53
- /**
54
- * Alternative to GET Route for more complex queries and URL max. Length
55
- * Files in Bucket
56
- */
57
- async findFilesRaw(requestParameters, initOverrides) {
58
- if (requestParameters.bucketName === null || requestParameters.bucketName === void 0) {
59
- throw new runtime.RequiredError("bucketName", "Required parameter requestParameters.bucketName was null or undefined when calling findFiles.");
60
- }
61
- if (requestParameters.mongoFindRequest === null || requestParameters.mongoFindRequest === void 0) {
62
- throw new runtime.RequiredError("mongoFindRequest", "Required parameter requestParameters.mongoFindRequest was null or undefined when calling findFiles.");
63
- }
64
- const queryParameters = {};
65
- if (requestParameters.rowsPerPage !== void 0) {
66
- queryParameters["rowsPerPage"] = requestParameters.rowsPerPage;
67
- }
68
- if (requestParameters.page !== void 0) {
69
- queryParameters["page"] = requestParameters.page;
70
- }
71
- const headerParameters = {};
72
- headerParameters["Content-Type"] = "application/json";
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);
75
- }
76
- if (this.configuration && this.configuration.accessToken) {
77
- const token = this.configuration.accessToken;
78
- const tokenString = await token("httpAuth", []);
79
- if (tokenString) {
80
- headerParameters["Authorization"] = `Bearer ${tokenString}`;
81
- }
82
- }
83
- if (this.configuration && this.configuration.apiKey) {
84
- headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
85
- }
86
- const response = await this.request({
87
- path: `/mongodb/buckets/{bucketName}/files`.replace(`{${"bucketName"}}`, encodeURIComponent(String(requestParameters.bucketName))),
88
- method: "POST",
89
- headers: headerParameters,
90
- query: queryParameters,
91
- body: MongoFindRequestToJSON(requestParameters.mongoFindRequest)
92
- }, initOverrides);
93
- return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(FileInformationFromJSON));
94
- }
95
- /**
96
- * Alternative to GET Route for more complex queries and URL max. Length
97
- * Files in Bucket
98
- */
99
- async findFiles(requestParameters, initOverrides) {
100
- const response = await this.findFilesRaw(requestParameters, initOverrides);
101
- return await response.value();
102
- }
103
- /**
104
- * Get File from given Bucket
105
- * File from Bucket
106
- */
107
- async getFileRaw(requestParameters, initOverrides) {
108
- if (requestParameters.bucketName === null || requestParameters.bucketName === void 0) {
109
- throw new runtime.RequiredError("bucketName", "Required parameter requestParameters.bucketName was null or undefined when calling getFile.");
110
- }
111
- if (requestParameters.fileId === null || requestParameters.fileId === void 0) {
112
- throw new runtime.RequiredError("fileId", "Required parameter requestParameters.fileId was null or undefined when calling getFile.");
113
- }
114
- const queryParameters = {};
115
- const 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);
118
- }
119
- if (this.configuration && this.configuration.accessToken) {
120
- const token = this.configuration.accessToken;
121
- const tokenString = await token("httpAuth", []);
122
- if (tokenString) {
123
- headerParameters["Authorization"] = `Bearer ${tokenString}`;
124
- }
125
- }
126
- if (this.configuration && this.configuration.apiKey) {
127
- headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
128
- }
129
- const response = await this.request({
130
- path: `/mongodb/buckets/{bucketName}/files/{fileId}/file`.replace(`{${"bucketName"}}`, encodeURIComponent(String(requestParameters.bucketName))).replace(`{${"fileId"}}`, encodeURIComponent(String(requestParameters.fileId))),
131
- method: "GET",
132
- headers: headerParameters,
133
- query: queryParameters
134
- }, initOverrides);
135
- return new runtime.BlobApiResponse(response);
136
- }
137
- /**
138
- * Get File from given Bucket
139
- * File from Bucket
140
- */
141
- async getFile(requestParameters, initOverrides) {
142
- const response = await this.getFileRaw(requestParameters, initOverrides);
143
- return await response.value();
144
- }
145
- /**
146
- * Get one FileInformation from given Bucket
147
- * FileInformation from Bucket
148
- */
149
- async getFileInformationRaw(requestParameters, initOverrides) {
150
- if (requestParameters.bucketName === null || requestParameters.bucketName === void 0) {
151
- throw new runtime.RequiredError("bucketName", "Required parameter requestParameters.bucketName was null or undefined when calling getFileInformation.");
152
- }
153
- if (requestParameters.fileId === null || requestParameters.fileId === void 0) {
154
- throw new runtime.RequiredError("fileId", "Required parameter requestParameters.fileId was null or undefined when calling getFileInformation.");
155
- }
156
- const queryParameters = {};
157
- const 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);
160
- }
161
- if (this.configuration && this.configuration.accessToken) {
162
- const token = this.configuration.accessToken;
163
- const tokenString = await token("httpAuth", []);
164
- if (tokenString) {
165
- headerParameters["Authorization"] = `Bearer ${tokenString}`;
166
- }
167
- }
168
- if (this.configuration && this.configuration.apiKey) {
169
- headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
170
- }
171
- const response = await this.request({
172
- path: `/mongodb/buckets/{bucketName}/files/{fileId}`.replace(`{${"bucketName"}}`, encodeURIComponent(String(requestParameters.bucketName))).replace(`{${"fileId"}}`, encodeURIComponent(String(requestParameters.fileId))),
173
- method: "GET",
174
- headers: headerParameters,
175
- query: queryParameters
176
- }, initOverrides);
177
- return new runtime.JSONApiResponse(response, (jsonValue) => FileInformationFromJSON(jsonValue));
178
- }
179
- /**
180
- * Get one FileInformation from given Bucket
181
- * FileInformation from Bucket
182
- */
183
- async getFileInformation(requestParameters, initOverrides) {
184
- const response = await this.getFileInformationRaw(requestParameters, initOverrides);
185
- return await response.value();
186
- }
187
- /**
188
- * Insert one File in given Bucket
189
- * Insert File
190
- */
191
- async insertFileRaw(requestParameters, initOverrides) {
192
- if (requestParameters.bucketName === null || requestParameters.bucketName === void 0) {
193
- throw new runtime.RequiredError("bucketName", "Required parameter requestParameters.bucketName was null or undefined when calling insertFile.");
194
- }
195
- if (requestParameters.file === null || requestParameters.file === void 0) {
196
- throw new runtime.RequiredError("file", "Required parameter requestParameters.file was null or undefined when calling insertFile.");
197
- }
198
- if (requestParameters.metaData === null || requestParameters.metaData === void 0) {
199
- throw new runtime.RequiredError("metaData", "Required parameter requestParameters.metaData was null or undefined when calling insertFile.");
200
- }
201
- const queryParameters = {};
202
- if (requestParameters.fileName !== void 0) {
203
- queryParameters["fileName"] = requestParameters.fileName;
204
- }
205
- const 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);
208
- }
209
- if (this.configuration && this.configuration.accessToken) {
210
- const token = this.configuration.accessToken;
211
- const tokenString = await token("httpAuth", []);
212
- if (tokenString) {
213
- headerParameters["Authorization"] = `Bearer ${tokenString}`;
214
- }
215
- }
216
- if (this.configuration && this.configuration.apiKey) {
217
- headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
218
- }
219
- const consumes = [
220
- { contentType: "multipart/form-data" }
221
- ];
222
- const canConsumeForm = runtime.canConsumeForm(consumes);
223
- let formParams;
224
- let useForm = false;
225
- useForm = canConsumeForm;
226
- if (useForm) {
227
- formParams = new FormData();
228
- } else {
229
- formParams = new URLSearchParams();
230
- }
231
- if (requestParameters.file !== void 0) {
232
- formParams.append("file", requestParameters.file);
233
- }
234
- if (requestParameters.metaData !== void 0) {
235
- formParams.append("metaData", requestParameters.metaData);
236
- }
237
- const response = await this.request({
238
- path: `/mongodb/buckets/{bucketName}/files`.replace(`{${"bucketName"}}`, encodeURIComponent(String(requestParameters.bucketName))),
239
- method: "PUT",
240
- headers: headerParameters,
241
- query: queryParameters,
242
- body: formParams
243
- }, initOverrides);
244
- return new runtime.JSONApiResponse(response, (jsonValue) => InsertResponseFromJSON(jsonValue));
245
- }
246
- /**
247
- * Insert one File in given Bucket
248
- * Insert File
249
- */
250
- async insertFile(requestParameters, initOverrides) {
251
- const response = await this.insertFileRaw(requestParameters, initOverrides);
252
- return await response.value();
253
- }
254
- /**
255
- * Get Files paginated from given Bucket
256
- * Files in Bucket
257
- */
258
- async listFilesRaw(requestParameters, initOverrides) {
259
- if (requestParameters.bucketName === null || requestParameters.bucketName === void 0) {
260
- throw new runtime.RequiredError("bucketName", "Required parameter requestParameters.bucketName was null or undefined when calling listFiles.");
261
- }
262
- const queryParameters = {};
263
- if (requestParameters.filter !== void 0) {
264
- queryParameters["filter"] = requestParameters.filter;
265
- }
266
- if (requestParameters.sort !== void 0) {
267
- queryParameters["sort"] = requestParameters.sort;
268
- }
269
- if (requestParameters.projection !== void 0) {
270
- queryParameters["projection"] = requestParameters.projection;
271
- }
272
- if (requestParameters.rowsPerPage !== void 0) {
273
- queryParameters["rowsPerPage"] = requestParameters.rowsPerPage;
274
- }
275
- if (requestParameters.page !== void 0) {
276
- queryParameters["page"] = requestParameters.page;
277
- }
278
- const 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);
281
- }
282
- if (this.configuration && this.configuration.accessToken) {
283
- const token = this.configuration.accessToken;
284
- const tokenString = await token("httpAuth", []);
285
- if (tokenString) {
286
- headerParameters["Authorization"] = `Bearer ${tokenString}`;
287
- }
288
- }
289
- if (this.configuration && this.configuration.apiKey) {
290
- headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
291
- }
292
- const response = await this.request({
293
- path: `/mongodb/buckets/{bucketName}/files`.replace(`{${"bucketName"}}`, encodeURIComponent(String(requestParameters.bucketName))),
294
- method: "GET",
295
- headers: headerParameters,
296
- query: queryParameters
297
- }, initOverrides);
298
- return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(FileInformationFromJSON));
299
- }
300
- /**
301
- * Get Files paginated from given Bucket
302
- * Files in Bucket
303
- */
304
- async listFiles(requestParameters, initOverrides) {
305
- const response = await this.listFilesRaw(requestParameters, initOverrides);
306
- return await response.value();
307
- }
308
- /**
309
- * Replace MetaData and potential update FileName
310
- * Update FileInformation in Bucket
311
- */
312
- async updateFileInformationRaw(requestParameters, initOverrides) {
313
- if (requestParameters.bucketName === null || requestParameters.bucketName === void 0) {
314
- throw new runtime.RequiredError("bucketName", "Required parameter requestParameters.bucketName was null or undefined when calling updateFileInformation.");
315
- }
316
- if (requestParameters.fileId === null || requestParameters.fileId === void 0) {
317
- throw new runtime.RequiredError("fileId", "Required parameter requestParameters.fileId was null or undefined when calling updateFileInformation.");
318
- }
319
- if (requestParameters.updateFileInformationRequest === null || requestParameters.updateFileInformationRequest === void 0) {
320
- throw new runtime.RequiredError("updateFileInformationRequest", "Required parameter requestParameters.updateFileInformationRequest was null or undefined when calling updateFileInformation.");
321
- }
322
- const queryParameters = {};
323
- const headerParameters = {};
324
- headerParameters["Content-Type"] = "application/json";
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);
327
- }
328
- if (this.configuration && this.configuration.accessToken) {
329
- const token = this.configuration.accessToken;
330
- const tokenString = await token("httpAuth", []);
331
- if (tokenString) {
332
- headerParameters["Authorization"] = `Bearer ${tokenString}`;
333
- }
334
- }
335
- if (this.configuration && this.configuration.apiKey) {
336
- headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
337
- }
338
- const response = await this.request({
339
- path: `/mongodb/buckets/{bucketName}/files/{fileId}`.replace(`{${"bucketName"}}`, encodeURIComponent(String(requestParameters.bucketName))).replace(`{${"fileId"}}`, encodeURIComponent(String(requestParameters.fileId))),
340
- method: "PATCH",
341
- headers: headerParameters,
342
- query: queryParameters,
343
- body: UpdateFileInformationRequestToJSON(requestParameters.updateFileInformationRequest)
344
- }, initOverrides);
345
- return new runtime.JSONApiResponse(response, (jsonValue) => UpdateResponseFromJSON(jsonValue));
346
- }
347
- /**
348
- * Replace MetaData and potential update FileName
349
- * Update FileInformation in Bucket
350
- */
351
- async updateFileInformation(requestParameters, initOverrides) {
352
- const response = await this.updateFileInformationRaw(requestParameters, initOverrides);
353
- return await response.value();
354
- }
355
- }
@@ -1,137 +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 { IndexCreateRequest, IndexCreateResponse, IndexDropResponse, IndexOptionsRequest, MongoIndex } from '../models';
14
- export interface CreateExpiringIndexRequest {
15
- collectionName: string;
16
- fieldName: string;
17
- duration: string;
18
- sortAscending?: boolean;
19
- name?: string;
20
- }
21
- export interface CreateIndexRequest {
22
- collectionName: string;
23
- indexCreateRequest: IndexCreateRequest;
24
- }
25
- export interface CreateIndexForFieldRequest {
26
- collectionName: string;
27
- fieldName: string;
28
- sortAscending?: boolean;
29
- indexOptionsRequest?: IndexOptionsRequest;
30
- }
31
- export interface CreateTextIndexRequest {
32
- collectionName: string;
33
- fieldName: string;
34
- indexOptionsRequest?: IndexOptionsRequest;
35
- }
36
- export interface CreateUniqueIndexRequest {
37
- collectionName: string;
38
- fieldName: string;
39
- sortAscending?: boolean;
40
- name?: string;
41
- }
42
- export interface DeleteIndexRequest {
43
- collectionName: string;
44
- indexName: string;
45
- }
46
- export interface IndexRequest {
47
- collectionName: string;
48
- indexName: string;
49
- }
50
- export interface ListIndicesRequest {
51
- collectionName: string;
52
- }
53
- /**
54
- *
55
- */
56
- export declare class IndexApi extends runtime.BaseAPI {
57
- /**
58
- * Create expiring Index by Field for given Collection
59
- * Create expiring Index by Field for Collection
60
- */
61
- createExpiringIndexRaw(requestParameters: CreateExpiringIndexRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<IndexCreateResponse>>;
62
- /**
63
- * Create expiring Index by Field for given Collection
64
- * Create expiring Index by Field for Collection
65
- */
66
- createExpiringIndex(requestParameters: CreateExpiringIndexRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IndexCreateResponse>;
67
- /**
68
- * Create Index for given Collection
69
- * Create Index for Collection
70
- */
71
- createIndexRaw(requestParameters: CreateIndexRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<IndexCreateResponse>>;
72
- /**
73
- * Create Index for given Collection
74
- * Create Index for Collection
75
- */
76
- createIndex(requestParameters: CreateIndexRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IndexCreateResponse>;
77
- /**
78
- * Create Index by Field for given Collection
79
- * Create Index by Field for Collection
80
- */
81
- createIndexForFieldRaw(requestParameters: CreateIndexForFieldRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<IndexCreateResponse>>;
82
- /**
83
- * Create Index by Field for given Collection
84
- * Create Index by Field for Collection
85
- */
86
- createIndexForField(requestParameters: CreateIndexForFieldRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IndexCreateResponse>;
87
- /**
88
- * Create text index by field for given collection
89
- * Create text index by field for collection
90
- */
91
- createTextIndexRaw(requestParameters: CreateTextIndexRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<IndexCreateResponse>>;
92
- /**
93
- * Create text index by field for given collection
94
- * Create text index by field for collection
95
- */
96
- createTextIndex(requestParameters: CreateTextIndexRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IndexCreateResponse>;
97
- /**
98
- * Create Unique Index by Field for given Collection
99
- * Create Unique Index
100
- */
101
- createUniqueIndexRaw(requestParameters: CreateUniqueIndexRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<IndexCreateResponse>>;
102
- /**
103
- * Create Unique Index by Field for given Collection
104
- * Create Unique Index
105
- */
106
- createUniqueIndex(requestParameters: CreateUniqueIndexRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IndexCreateResponse>;
107
- /**
108
- * Delete Index by Name for given Collection
109
- * Delete Index
110
- */
111
- deleteIndexRaw(requestParameters: DeleteIndexRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<IndexDropResponse>>;
112
- /**
113
- * Delete Index by Name for given Collection
114
- * Delete Index
115
- */
116
- deleteIndex(requestParameters: DeleteIndexRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IndexDropResponse>;
117
- /**
118
- * Index by Name for given Collection
119
- * Index for Collection
120
- */
121
- indexRaw(requestParameters: IndexRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<MongoIndex>>;
122
- /**
123
- * Index by Name for given Collection
124
- * Index for Collection
125
- */
126
- index(requestParameters: IndexRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<MongoIndex>;
127
- /**
128
- * List all Indices for given Collection
129
- * List Indices for Collection
130
- */
131
- listIndicesRaw(requestParameters: ListIndicesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<MongoIndex>>>;
132
- /**
133
- * List all Indices for given Collection
134
- * List Indices for Collection
135
- */
136
- listIndices(requestParameters: ListIndicesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<MongoIndex>>;
137
- }