@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.
Files changed (109) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/module.mjs +466 -11
  3. package/dist/runtime/api/apis/AdminApi.d.ts +26 -26
  4. package/dist/runtime/api/apis/AdminApi.mjs +145 -49
  5. package/dist/runtime/api/apis/ApplicationApi.d.ts +10 -50
  6. package/dist/runtime/api/apis/ApplicationApi.mjs +47 -128
  7. package/dist/runtime/api/apis/AuthApi.d.ts +18 -18
  8. package/dist/runtime/api/apis/AuthApi.mjs +93 -29
  9. package/dist/runtime/api/apis/BucketApi.d.ts +10 -10
  10. package/dist/runtime/api/apis/BucketApi.mjs +49 -17
  11. package/dist/runtime/api/apis/CollectionApi.d.ts +22 -22
  12. package/dist/runtime/api/apis/CollectionApi.mjs +121 -41
  13. package/dist/runtime/api/apis/DatabaseApi.d.ts +12 -12
  14. package/dist/runtime/api/apis/DatabaseApi.mjs +61 -21
  15. package/dist/runtime/api/apis/DocumentApi.d.ts +22 -22
  16. package/dist/runtime/api/apis/DocumentApi.mjs +121 -41
  17. package/dist/runtime/api/apis/FileApi.d.ts +16 -16
  18. package/dist/runtime/api/apis/FileApi.mjs +85 -29
  19. package/dist/runtime/api/apis/IndexApi.d.ts +18 -18
  20. package/dist/runtime/api/apis/IndexApi.mjs +97 -33
  21. package/dist/runtime/api/apis/InformationApi.d.ts +4 -4
  22. package/dist/runtime/api/apis/InformationApi.mjs +9 -1
  23. package/dist/runtime/api/apis/JobsApi.d.ts +14 -14
  24. package/dist/runtime/api/apis/JobsApi.mjs +73 -25
  25. package/dist/runtime/api/models/BucketInformation.d.ts +5 -1
  26. package/dist/runtime/api/models/BucketInformation.mjs +8 -0
  27. package/dist/runtime/api/models/CollectionStatus.d.ts +5 -1
  28. package/dist/runtime/api/models/CollectionStatus.mjs +17 -0
  29. package/dist/runtime/api/models/DatabaseInfo.d.ts +5 -1
  30. package/dist/runtime/api/models/DatabaseInfo.mjs +9 -0
  31. package/dist/runtime/api/models/DeleteResponse.d.ts +5 -1
  32. package/dist/runtime/api/models/DeleteResponse.mjs +6 -0
  33. package/dist/runtime/api/models/ErrorDescription.d.ts +5 -1
  34. package/dist/runtime/api/models/ErrorDescription.mjs +7 -0
  35. package/dist/runtime/api/models/FileInformation.d.ts +5 -1
  36. package/dist/runtime/api/models/FileInformation.mjs +10 -0
  37. package/dist/runtime/api/models/Grant.d.ts +5 -1
  38. package/dist/runtime/api/models/Grant.mjs +9 -0
  39. package/dist/runtime/api/models/IndexCreateRequest.d.ts +6 -2
  40. package/dist/runtime/api/models/IndexCreateRequest.mjs +6 -1
  41. package/dist/runtime/api/models/IndexCreateResponse.d.ts +5 -1
  42. package/dist/runtime/api/models/IndexCreateResponse.mjs +5 -0
  43. package/dist/runtime/api/models/IndexDropResponse.d.ts +5 -1
  44. package/dist/runtime/api/models/IndexDropResponse.mjs +5 -0
  45. package/dist/runtime/api/models/IndexOptionsRequest.d.ts +5 -1
  46. package/dist/runtime/api/models/IndexOptionsRequest.mjs +4 -0
  47. package/dist/runtime/api/models/InsertResponse.d.ts +5 -1
  48. package/dist/runtime/api/models/InsertResponse.mjs +5 -0
  49. package/dist/runtime/api/models/JobConfig.d.ts +5 -1
  50. package/dist/runtime/api/models/JobConfig.mjs +10 -0
  51. package/dist/runtime/api/models/JobInformation.d.ts +5 -1
  52. package/dist/runtime/api/models/JobInformation.mjs +10 -0
  53. package/dist/runtime/api/models/JsonSchema.d.ts +6 -2
  54. package/dist/runtime/api/models/JsonSchema.mjs +8 -1
  55. package/dist/runtime/api/models/JsonSchemaDefinition.d.ts +5 -1
  56. package/dist/runtime/api/models/JsonSchemaDefinition.mjs +8 -0
  57. package/dist/runtime/api/models/JsonValueAny.d.ts +5 -1
  58. package/dist/runtime/api/models/JsonValueAny.mjs +5 -0
  59. package/dist/runtime/api/models/JsonValueBoolean.d.ts +5 -1
  60. package/dist/runtime/api/models/JsonValueBoolean.mjs +5 -0
  61. package/dist/runtime/api/models/JsonValueString.d.ts +5 -1
  62. package/dist/runtime/api/models/JsonValueString.mjs +5 -0
  63. package/dist/runtime/api/models/Login.d.ts +5 -1
  64. package/dist/runtime/api/models/Login.mjs +6 -0
  65. package/dist/runtime/api/models/LoginResult.d.ts +6 -2
  66. package/dist/runtime/api/models/LoginResult.mjs +8 -1
  67. package/dist/runtime/api/models/Metric.mjs +1 -1
  68. package/dist/runtime/api/models/MongoAggregateRequest.d.ts +6 -2
  69. package/dist/runtime/api/models/MongoAggregateRequest.mjs +6 -1
  70. package/dist/runtime/api/models/MongoCampConfiguration.d.ts +5 -1
  71. package/dist/runtime/api/models/MongoCampConfiguration.mjs +9 -0
  72. package/dist/runtime/api/models/MongoFindRequest.d.ts +5 -1
  73. package/dist/runtime/api/models/MongoFindRequest.mjs +7 -0
  74. package/dist/runtime/api/models/MongoIndex.d.ts +5 -1
  75. package/dist/runtime/api/models/MongoIndex.mjs +15 -0
  76. package/dist/runtime/api/models/PasswordUpdateRequest.d.ts +5 -1
  77. package/dist/runtime/api/models/PasswordUpdateRequest.mjs +5 -0
  78. package/dist/runtime/api/models/PipelineStage.d.ts +5 -1
  79. package/dist/runtime/api/models/PipelineStage.mjs +6 -0
  80. package/dist/runtime/api/models/Role.d.ts +6 -2
  81. package/dist/runtime/api/models/Role.mjs +7 -1
  82. package/dist/runtime/api/models/SchemaAnalysis.d.ts +6 -2
  83. package/dist/runtime/api/models/SchemaAnalysis.mjs +8 -1
  84. package/dist/runtime/api/models/SchemaAnalysisField.d.ts +6 -2
  85. package/dist/runtime/api/models/SchemaAnalysisField.mjs +9 -1
  86. package/dist/runtime/api/models/SchemaAnalysisFieldType.d.ts +5 -1
  87. package/dist/runtime/api/models/SchemaAnalysisFieldType.mjs +7 -0
  88. package/dist/runtime/api/models/SettingsResponse.d.ts +5 -1
  89. package/dist/runtime/api/models/SettingsResponse.mjs +5 -0
  90. package/dist/runtime/api/models/UpdateFileInformationRequest.d.ts +5 -1
  91. package/dist/runtime/api/models/UpdateFileInformationRequest.mjs +4 -0
  92. package/dist/runtime/api/models/UpdateRequest.d.ts +5 -1
  93. package/dist/runtime/api/models/UpdateRequest.mjs +6 -0
  94. package/dist/runtime/api/models/UpdateResponse.d.ts +5 -1
  95. package/dist/runtime/api/models/UpdateResponse.mjs +7 -0
  96. package/dist/runtime/api/models/UpdateRoleRequest.d.ts +6 -2
  97. package/dist/runtime/api/models/UpdateRoleRequest.mjs +6 -1
  98. package/dist/runtime/api/models/UserInformation.d.ts +5 -1
  99. package/dist/runtime/api/models/UserInformation.mjs +6 -0
  100. package/dist/runtime/api/models/UserProfile.d.ts +6 -2
  101. package/dist/runtime/api/models/UserProfile.mjs +7 -1
  102. package/dist/runtime/api/models/Version.d.ts +5 -1
  103. package/dist/runtime/api/models/Version.mjs +7 -0
  104. package/dist/runtime/api/models/index.d.ts +0 -2
  105. package/dist/runtime/api/models/index.mjs +0 -2
  106. package/dist/runtime/api/runtime.d.ts +71 -29
  107. package/dist/runtime/api/runtime.mjs +154 -72
  108. package/dist/runtime/composables/mongocampApi.mjs +1 -1
  109. package/package.json +7 -7
@@ -5,8 +5,12 @@ import {
5
5
  MongoFindRequestToJSON,
6
6
  UpdateRequestToJSON,
7
7
  UpdateResponseFromJSON
8
- } from "../models";
8
+ } from "../models/index.mjs";
9
9
  export class DocumentApi extends runtime.BaseAPI {
10
+ /**
11
+ * Delete one Document from given Collection
12
+ * Delete Document from Collection
13
+ */
10
14
  async _deleteRaw(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 _delete.");
@@ -16,8 +20,8 @@ export class DocumentApi extends runtime.BaseAPI {
16
20
  }
17
21
  const queryParameters = {};
18
22
  const headerParameters = {};
19
- if (this.configuration && this.configuration.apiKey) {
20
- headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
23
+ if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
24
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
21
25
  }
22
26
  if (this.configuration && this.configuration.accessToken) {
23
27
  const token = this.configuration.accessToken;
@@ -26,8 +30,8 @@ export class DocumentApi extends runtime.BaseAPI {
26
30
  headerParameters["Authorization"] = `Bearer ${tokenString}`;
27
31
  }
28
32
  }
29
- if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
30
- headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
33
+ if (this.configuration && this.configuration.apiKey) {
34
+ headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
31
35
  }
32
36
  const response = await this.request({
33
37
  path: `/mongodb/collections/{collectionName}/documents/{documentId}`.replace(`{${"collectionName"}}`, encodeURIComponent(String(requestParameters.collectionName))).replace(`{${"documentId"}}`, encodeURIComponent(String(requestParameters.documentId))),
@@ -37,10 +41,18 @@ export class DocumentApi extends runtime.BaseAPI {
37
41
  }, initOverrides);
38
42
  return new runtime.JSONApiResponse(response, (jsonValue) => DeleteResponseFromJSON(jsonValue));
39
43
  }
44
+ /**
45
+ * Delete one Document from given Collection
46
+ * Delete Document from Collection
47
+ */
40
48
  async _delete(requestParameters, initOverrides) {
41
49
  const response = await this._deleteRaw(requestParameters, initOverrides);
42
50
  return await response.value();
43
51
  }
52
+ /**
53
+ * Delete many Document in given Collection
54
+ * Delete Many in Collection
55
+ */
44
56
  async deleteManyRaw(requestParameters, initOverrides) {
45
57
  if (requestParameters.collectionName === null || requestParameters.collectionName === void 0) {
46
58
  throw new runtime.RequiredError("collectionName", "Required parameter requestParameters.collectionName was null or undefined when calling deleteMany.");
@@ -51,8 +63,8 @@ export class DocumentApi extends runtime.BaseAPI {
51
63
  const queryParameters = {};
52
64
  const headerParameters = {};
53
65
  headerParameters["Content-Type"] = "application/json";
54
- if (this.configuration && this.configuration.apiKey) {
55
- headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
66
+ if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
67
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
56
68
  }
57
69
  if (this.configuration && this.configuration.accessToken) {
58
70
  const token = this.configuration.accessToken;
@@ -61,8 +73,8 @@ export class DocumentApi extends runtime.BaseAPI {
61
73
  headerParameters["Authorization"] = `Bearer ${tokenString}`;
62
74
  }
63
75
  }
64
- if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
65
- headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
76
+ if (this.configuration && this.configuration.apiKey) {
77
+ headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
66
78
  }
67
79
  const response = await this.request({
68
80
  path: `/mongodb/collections/{collectionName}/documents/many/delete`.replace(`{${"collectionName"}}`, encodeURIComponent(String(requestParameters.collectionName))),
@@ -73,10 +85,18 @@ export class DocumentApi extends runtime.BaseAPI {
73
85
  }, initOverrides);
74
86
  return new runtime.JSONApiResponse(response, (jsonValue) => DeleteResponseFromJSON(jsonValue));
75
87
  }
88
+ /**
89
+ * Delete many Document in given Collection
90
+ * Delete Many in Collection
91
+ */
76
92
  async deleteMany(requestParameters, initOverrides) {
77
93
  const response = await this.deleteManyRaw(requestParameters, initOverrides);
78
94
  return await response.value();
79
95
  }
96
+ /**
97
+ * Alternative to GET Route for more complex queries and URL max. Length
98
+ * Documents in Collection
99
+ */
80
100
  async findRaw(requestParameters, initOverrides) {
81
101
  if (requestParameters.collectionName === null || requestParameters.collectionName === void 0) {
82
102
  throw new runtime.RequiredError("collectionName", "Required parameter requestParameters.collectionName was null or undefined when calling find.");
@@ -93,8 +113,8 @@ export class DocumentApi extends runtime.BaseAPI {
93
113
  }
94
114
  const headerParameters = {};
95
115
  headerParameters["Content-Type"] = "application/json";
96
- if (this.configuration && this.configuration.apiKey) {
97
- headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
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 DocumentApi extends runtime.BaseAPI {
103
123
  headerParameters["Authorization"] = `Bearer ${tokenString}`;
104
124
  }
105
125
  }
106
- if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
107
- headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
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/collections/{collectionName}/documents`.replace(`{${"collectionName"}}`, encodeURIComponent(String(requestParameters.collectionName))),
@@ -115,10 +135,18 @@ export class DocumentApi extends runtime.BaseAPI {
115
135
  }, initOverrides);
116
136
  return new runtime.JSONApiResponse(response);
117
137
  }
138
+ /**
139
+ * Alternative to GET Route for more complex queries and URL max. Length
140
+ * Documents in Collection
141
+ */
118
142
  async find(requestParameters, initOverrides) {
119
143
  const response = await this.findRaw(requestParameters, initOverrides);
120
144
  return await response.value();
121
145
  }
146
+ /**
147
+ * Get one Document from given Collection
148
+ * Document from Collection
149
+ */
122
150
  async getDocumentRaw(requestParameters, initOverrides) {
123
151
  if (requestParameters.collectionName === null || requestParameters.collectionName === void 0) {
124
152
  throw new runtime.RequiredError("collectionName", "Required parameter requestParameters.collectionName was null or undefined when calling getDocument.");
@@ -128,8 +156,8 @@ export class DocumentApi extends runtime.BaseAPI {
128
156
  }
129
157
  const queryParameters = {};
130
158
  const headerParameters = {};
131
- if (this.configuration && this.configuration.apiKey) {
132
- headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
159
+ if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
160
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
133
161
  }
134
162
  if (this.configuration && this.configuration.accessToken) {
135
163
  const token = this.configuration.accessToken;
@@ -138,8 +166,8 @@ export class DocumentApi extends runtime.BaseAPI {
138
166
  headerParameters["Authorization"] = `Bearer ${tokenString}`;
139
167
  }
140
168
  }
141
- if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
142
- headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
169
+ if (this.configuration && this.configuration.apiKey) {
170
+ headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
143
171
  }
144
172
  const response = await this.request({
145
173
  path: `/mongodb/collections/{collectionName}/documents/{documentId}`.replace(`{${"collectionName"}}`, encodeURIComponent(String(requestParameters.collectionName))).replace(`{${"documentId"}}`, encodeURIComponent(String(requestParameters.documentId))),
@@ -149,10 +177,18 @@ export class DocumentApi extends runtime.BaseAPI {
149
177
  }, initOverrides);
150
178
  return new runtime.JSONApiResponse(response);
151
179
  }
180
+ /**
181
+ * Get one Document from given Collection
182
+ * Document from Collection
183
+ */
152
184
  async getDocument(requestParameters, initOverrides) {
153
185
  const response = await this.getDocumentRaw(requestParameters, initOverrides);
154
186
  return await response.value();
155
187
  }
188
+ /**
189
+ * Insert one Document in given Collection
190
+ * Insert Document
191
+ */
156
192
  async insertRaw(requestParameters, initOverrides) {
157
193
  if (requestParameters.collectionName === null || requestParameters.collectionName === void 0) {
158
194
  throw new runtime.RequiredError("collectionName", "Required parameter requestParameters.collectionName was null or undefined when calling insert.");
@@ -163,8 +199,8 @@ export class DocumentApi extends runtime.BaseAPI {
163
199
  const queryParameters = {};
164
200
  const headerParameters = {};
165
201
  headerParameters["Content-Type"] = "application/json";
166
- if (this.configuration && this.configuration.apiKey) {
167
- headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
202
+ if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
203
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
168
204
  }
169
205
  if (this.configuration && this.configuration.accessToken) {
170
206
  const token = this.configuration.accessToken;
@@ -173,8 +209,8 @@ export class DocumentApi extends runtime.BaseAPI {
173
209
  headerParameters["Authorization"] = `Bearer ${tokenString}`;
174
210
  }
175
211
  }
176
- if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
177
- headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
212
+ if (this.configuration && this.configuration.apiKey) {
213
+ headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
178
214
  }
179
215
  const response = await this.request({
180
216
  path: `/mongodb/collections/{collectionName}/documents`.replace(`{${"collectionName"}}`, encodeURIComponent(String(requestParameters.collectionName))),
@@ -185,10 +221,18 @@ export class DocumentApi extends runtime.BaseAPI {
185
221
  }, initOverrides);
186
222
  return new runtime.JSONApiResponse(response, (jsonValue) => InsertResponseFromJSON(jsonValue));
187
223
  }
224
+ /**
225
+ * Insert one Document in given Collection
226
+ * Insert Document
227
+ */
188
228
  async insert(requestParameters, initOverrides) {
189
229
  const response = await this.insertRaw(requestParameters, initOverrides);
190
230
  return await response.value();
191
231
  }
232
+ /**
233
+ * Insert many documents in given Collection
234
+ * Insert many Documents
235
+ */
192
236
  async insertManyRaw(requestParameters, initOverrides) {
193
237
  if (requestParameters.collectionName === null || requestParameters.collectionName === void 0) {
194
238
  throw new runtime.RequiredError("collectionName", "Required parameter requestParameters.collectionName was null or undefined when calling insertMany.");
@@ -196,8 +240,8 @@ export class DocumentApi extends runtime.BaseAPI {
196
240
  const queryParameters = {};
197
241
  const headerParameters = {};
198
242
  headerParameters["Content-Type"] = "application/json";
199
- if (this.configuration && this.configuration.apiKey) {
200
- headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
243
+ if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
244
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
201
245
  }
202
246
  if (this.configuration && this.configuration.accessToken) {
203
247
  const token = this.configuration.accessToken;
@@ -206,8 +250,8 @@ export class DocumentApi extends runtime.BaseAPI {
206
250
  headerParameters["Authorization"] = `Bearer ${tokenString}`;
207
251
  }
208
252
  }
209
- if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
210
- headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
253
+ if (this.configuration && this.configuration.apiKey) {
254
+ headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
211
255
  }
212
256
  const response = await this.request({
213
257
  path: `/mongodb/collections/{collectionName}/documents/many/insert`.replace(`{${"collectionName"}}`, encodeURIComponent(String(requestParameters.collectionName))),
@@ -218,10 +262,18 @@ export class DocumentApi extends runtime.BaseAPI {
218
262
  }, initOverrides);
219
263
  return new runtime.JSONApiResponse(response, (jsonValue) => InsertResponseFromJSON(jsonValue));
220
264
  }
265
+ /**
266
+ * Insert many documents in given Collection
267
+ * Insert many Documents
268
+ */
221
269
  async insertMany(requestParameters, initOverrides) {
222
270
  const response = await this.insertManyRaw(requestParameters, initOverrides);
223
271
  return await response.value();
224
272
  }
273
+ /**
274
+ * Get Documents paginated from given Collection
275
+ * Documents in Collection
276
+ */
225
277
  async listDocumentsRaw(requestParameters, initOverrides) {
226
278
  if (requestParameters.collectionName === null || requestParameters.collectionName === void 0) {
227
279
  throw new runtime.RequiredError("collectionName", "Required parameter requestParameters.collectionName was null or undefined when calling listDocuments.");
@@ -243,8 +295,8 @@ export class DocumentApi extends runtime.BaseAPI {
243
295
  queryParameters["page"] = requestParameters.page;
244
296
  }
245
297
  const headerParameters = {};
246
- if (this.configuration && this.configuration.apiKey) {
247
- headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
298
+ if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
299
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
248
300
  }
249
301
  if (this.configuration && this.configuration.accessToken) {
250
302
  const token = this.configuration.accessToken;
@@ -253,8 +305,8 @@ export class DocumentApi extends runtime.BaseAPI {
253
305
  headerParameters["Authorization"] = `Bearer ${tokenString}`;
254
306
  }
255
307
  }
256
- if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
257
- headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
308
+ if (this.configuration && this.configuration.apiKey) {
309
+ headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
258
310
  }
259
311
  const response = await this.request({
260
312
  path: `/mongodb/collections/{collectionName}/documents`.replace(`{${"collectionName"}}`, encodeURIComponent(String(requestParameters.collectionName))),
@@ -264,10 +316,18 @@ export class DocumentApi extends runtime.BaseAPI {
264
316
  }, initOverrides);
265
317
  return new runtime.JSONApiResponse(response);
266
318
  }
319
+ /**
320
+ * Get Documents paginated from given Collection
321
+ * Documents in Collection
322
+ */
267
323
  async listDocuments(requestParameters, initOverrides) {
268
324
  const response = await this.listDocumentsRaw(requestParameters, initOverrides);
269
325
  return await response.value();
270
326
  }
327
+ /**
328
+ * \'Replace\' one Document with the new document from Request in Collection
329
+ * Update Document in Collection
330
+ */
271
331
  async updateRaw(requestParameters, initOverrides) {
272
332
  if (requestParameters.collectionName === null || requestParameters.collectionName === void 0) {
273
333
  throw new runtime.RequiredError("collectionName", "Required parameter requestParameters.collectionName was null or undefined when calling update.");
@@ -281,8 +341,8 @@ export class DocumentApi extends runtime.BaseAPI {
281
341
  const queryParameters = {};
282
342
  const headerParameters = {};
283
343
  headerParameters["Content-Type"] = "application/json";
284
- if (this.configuration && this.configuration.apiKey) {
285
- headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
344
+ if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
345
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
286
346
  }
287
347
  if (this.configuration && this.configuration.accessToken) {
288
348
  const token = this.configuration.accessToken;
@@ -291,8 +351,8 @@ export class DocumentApi extends runtime.BaseAPI {
291
351
  headerParameters["Authorization"] = `Bearer ${tokenString}`;
292
352
  }
293
353
  }
294
- if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
295
- headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
354
+ if (this.configuration && this.configuration.apiKey) {
355
+ headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
296
356
  }
297
357
  const response = await this.request({
298
358
  path: `/mongodb/collections/{collectionName}/documents/{documentId}`.replace(`{${"collectionName"}}`, encodeURIComponent(String(requestParameters.collectionName))).replace(`{${"documentId"}}`, encodeURIComponent(String(requestParameters.documentId))),
@@ -303,10 +363,18 @@ export class DocumentApi extends runtime.BaseAPI {
303
363
  }, initOverrides);
304
364
  return new runtime.JSONApiResponse(response, (jsonValue) => UpdateResponseFromJSON(jsonValue));
305
365
  }
366
+ /**
367
+ * \'Replace\' one Document with the new document from Request in Collection
368
+ * Update Document in Collection
369
+ */
306
370
  async update(requestParameters, initOverrides) {
307
371
  const response = await this.updateRaw(requestParameters, initOverrides);
308
372
  return await response.value();
309
373
  }
374
+ /**
375
+ * Update the document Parts with the values from the Request
376
+ * Update Document Parts in Collection
377
+ */
310
378
  async updateDocumentPartialRaw(requestParameters, initOverrides) {
311
379
  if (requestParameters.collectionName === null || requestParameters.collectionName === void 0) {
312
380
  throw new runtime.RequiredError("collectionName", "Required parameter requestParameters.collectionName was null or undefined when calling updateDocumentPartial.");
@@ -320,8 +388,8 @@ export class DocumentApi extends runtime.BaseAPI {
320
388
  const queryParameters = {};
321
389
  const headerParameters = {};
322
390
  headerParameters["Content-Type"] = "application/json";
323
- if (this.configuration && this.configuration.apiKey) {
324
- headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
391
+ if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
392
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
325
393
  }
326
394
  if (this.configuration && this.configuration.accessToken) {
327
395
  const token = this.configuration.accessToken;
@@ -330,8 +398,8 @@ export class DocumentApi extends runtime.BaseAPI {
330
398
  headerParameters["Authorization"] = `Bearer ${tokenString}`;
331
399
  }
332
400
  }
333
- if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
334
- headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
401
+ if (this.configuration && this.configuration.apiKey) {
402
+ headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
335
403
  }
336
404
  const response = await this.request({
337
405
  path: `/mongodb/collections/{collectionName}/documents/{documentId}/partial`.replace(`{${"collectionName"}}`, encodeURIComponent(String(requestParameters.collectionName))).replace(`{${"documentId"}}`, encodeURIComponent(String(requestParameters.documentId))),
@@ -342,10 +410,18 @@ export class DocumentApi extends runtime.BaseAPI {
342
410
  }, initOverrides);
343
411
  return new runtime.JSONApiResponse(response, (jsonValue) => UpdateResponseFromJSON(jsonValue));
344
412
  }
413
+ /**
414
+ * Update the document Parts with the values from the Request
415
+ * Update Document Parts in Collection
416
+ */
345
417
  async updateDocumentPartial(requestParameters, initOverrides) {
346
418
  const response = await this.updateDocumentPartialRaw(requestParameters, initOverrides);
347
419
  return await response.value();
348
420
  }
421
+ /**
422
+ * Update many Document in given Collection
423
+ * Update many in Collection
424
+ */
349
425
  async updateManyRaw(requestParameters, initOverrides) {
350
426
  if (requestParameters.collectionName === null || requestParameters.collectionName === void 0) {
351
427
  throw new runtime.RequiredError("collectionName", "Required parameter requestParameters.collectionName was null or undefined when calling updateMany.");
@@ -356,8 +432,8 @@ export class DocumentApi extends runtime.BaseAPI {
356
432
  const queryParameters = {};
357
433
  const headerParameters = {};
358
434
  headerParameters["Content-Type"] = "application/json";
359
- if (this.configuration && this.configuration.apiKey) {
360
- headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
435
+ if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
436
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
361
437
  }
362
438
  if (this.configuration && this.configuration.accessToken) {
363
439
  const token = this.configuration.accessToken;
@@ -366,8 +442,8 @@ export class DocumentApi extends runtime.BaseAPI {
366
442
  headerParameters["Authorization"] = `Bearer ${tokenString}`;
367
443
  }
368
444
  }
369
- if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
370
- headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
445
+ if (this.configuration && this.configuration.apiKey) {
446
+ headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
371
447
  }
372
448
  const response = await this.request({
373
449
  path: `/mongodb/collections/{collectionName}/documents/many/update`.replace(`{${"collectionName"}}`, encodeURIComponent(String(requestParameters.collectionName))),
@@ -378,6 +454,10 @@ export class DocumentApi extends runtime.BaseAPI {
378
454
  }, initOverrides);
379
455
  return new runtime.JSONApiResponse(response, (jsonValue) => UpdateResponseFromJSON(jsonValue));
380
456
  }
457
+ /**
458
+ * Update many Document in given Collection
459
+ * Update many in Collection
460
+ */
381
461
  async updateMany(requestParameters, initOverrides) {
382
462
  const response = await this.updateManyRaw(requestParameters, initOverrides);
383
463
  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.0
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 { DeleteResponse, FileInformation, InsertResponse, MongoFindRequest, UpdateFileInformationRequest, UpdateResponse } from '../models';
13
+ import type { DeleteResponse, FileInformation, InsertResponse, MongoFindRequest, UpdateFileInformationRequest, UpdateResponse } from '../models';
14
14
  export interface DeleteFileRequest {
15
15
  bucketName: string;
16
16
  fileId: string;
@@ -56,70 +56,70 @@ export declare class FileApi extends runtime.BaseAPI {
56
56
  * Delete one File from given Bucket
57
57
  * Delete File from Bucket
58
58
  */
59
- deleteFileRaw(requestParameters: DeleteFileRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<DeleteResponse>>;
59
+ deleteFileRaw(requestParameters: DeleteFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<DeleteResponse>>;
60
60
  /**
61
61
  * Delete one File from given Bucket
62
62
  * Delete File from Bucket
63
63
  */
64
- deleteFile(requestParameters: DeleteFileRequest, initOverrides?: RequestInit): Promise<DeleteResponse>;
64
+ deleteFile(requestParameters: DeleteFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DeleteResponse>;
65
65
  /**
66
66
  * Alternative to GET Route for more complex queries and URL max. Length
67
67
  * Files in Bucket
68
68
  */
69
- findFilesRaw(requestParameters: FindFilesRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<Array<FileInformation>>>;
69
+ findFilesRaw(requestParameters: FindFilesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<FileInformation>>>;
70
70
  /**
71
71
  * Alternative to GET Route for more complex queries and URL max. Length
72
72
  * Files in Bucket
73
73
  */
74
- findFiles(requestParameters: FindFilesRequest, initOverrides?: RequestInit): Promise<Array<FileInformation>>;
74
+ findFiles(requestParameters: FindFilesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<FileInformation>>;
75
75
  /**
76
76
  * Get File from given Bucket
77
77
  * File from Bucket
78
78
  */
79
- getFileRaw(requestParameters: GetFileRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<Blob>>;
79
+ getFileRaw(requestParameters: GetFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Blob>>;
80
80
  /**
81
81
  * Get File from given Bucket
82
82
  * File from Bucket
83
83
  */
84
- getFile(requestParameters: GetFileRequest, initOverrides?: RequestInit): Promise<Blob>;
84
+ getFile(requestParameters: GetFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Blob>;
85
85
  /**
86
86
  * Get one FileInformation from given Bucket
87
87
  * FileInformation from Bucket
88
88
  */
89
- getFileInformationRaw(requestParameters: GetFileInformationRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<FileInformation>>;
89
+ getFileInformationRaw(requestParameters: GetFileInformationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FileInformation>>;
90
90
  /**
91
91
  * Get one FileInformation from given Bucket
92
92
  * FileInformation from Bucket
93
93
  */
94
- getFileInformation(requestParameters: GetFileInformationRequest, initOverrides?: RequestInit): Promise<FileInformation>;
94
+ getFileInformation(requestParameters: GetFileInformationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<FileInformation>;
95
95
  /**
96
96
  * Insert one File in given Bucket
97
97
  * Insert File
98
98
  */
99
- insertFileRaw(requestParameters: InsertFileRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<InsertResponse>>;
99
+ insertFileRaw(requestParameters: InsertFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<InsertResponse>>;
100
100
  /**
101
101
  * Insert one File in given Bucket
102
102
  * Insert File
103
103
  */
104
- insertFile(requestParameters: InsertFileRequest, initOverrides?: RequestInit): Promise<InsertResponse>;
104
+ insertFile(requestParameters: InsertFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<InsertResponse>;
105
105
  /**
106
106
  * Get Files paginated from given Bucket
107
107
  * Files in Bucket
108
108
  */
109
- listFilesRaw(requestParameters: ListFilesRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<Array<FileInformation>>>;
109
+ listFilesRaw(requestParameters: ListFilesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<FileInformation>>>;
110
110
  /**
111
111
  * Get Files paginated from given Bucket
112
112
  * Files in Bucket
113
113
  */
114
- listFiles(requestParameters: ListFilesRequest, initOverrides?: RequestInit): Promise<Array<FileInformation>>;
114
+ listFiles(requestParameters: ListFilesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<FileInformation>>;
115
115
  /**
116
116
  * Replace MetaData and potential update FileName
117
117
  * Update FileInformation in Bucket
118
118
  */
119
- updateFileInformationRaw(requestParameters: UpdateFileInformationOperationRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<UpdateResponse>>;
119
+ updateFileInformationRaw(requestParameters: UpdateFileInformationOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UpdateResponse>>;
120
120
  /**
121
121
  * Replace MetaData and potential update FileName
122
122
  * Update FileInformation in Bucket
123
123
  */
124
- updateFileInformation(requestParameters: UpdateFileInformationOperationRequest, initOverrides?: RequestInit): Promise<UpdateResponse>;
124
+ updateFileInformation(requestParameters: UpdateFileInformationOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UpdateResponse>;
125
125
  }