@sfxcode/nuxt-mongocamp-server 1.0.4 → 1.0.6

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 (127) hide show
  1. package/dist/module.d.mts +9 -0
  2. package/dist/module.d.ts +9 -2
  3. package/dist/module.json +1 -1
  4. package/dist/module.mjs +557 -4
  5. package/dist/runtime/api/apis/AdminApi.d.ts +181 -0
  6. package/dist/runtime/api/apis/AdminApi.mjs +509 -0
  7. package/dist/runtime/api/apis/ApplicationApi.d.ts +65 -0
  8. package/dist/runtime/api/apis/ApplicationApi.mjs +164 -0
  9. package/dist/runtime/api/apis/AuthApi.d.ts +104 -0
  10. package/dist/runtime/api/apis/AuthApi.mjs +296 -0
  11. package/dist/runtime/api/apis/BucketApi.d.ts +67 -0
  12. package/dist/runtime/api/apis/BucketApi.mjs +160 -0
  13. package/dist/runtime/api/apis/CollectionApi.d.ts +161 -0
  14. package/dist/runtime/api/apis/CollectionApi.mjs +435 -0
  15. package/dist/runtime/api/apis/DatabaseApi.d.ts +77 -0
  16. package/dist/runtime/api/apis/DatabaseApi.mjs +196 -0
  17. package/dist/runtime/api/apis/DocumentApi.d.ts +188 -0
  18. package/dist/runtime/api/apis/DocumentApi.mjs +465 -0
  19. package/dist/runtime/api/apis/FileApi.d.ts +125 -0
  20. package/dist/runtime/api/apis/FileApi.mjs +355 -0
  21. package/dist/runtime/api/apis/IndexApi.d.ts +137 -0
  22. package/dist/runtime/api/apis/IndexApi.mjs +367 -0
  23. package/dist/runtime/api/apis/InformationApi.d.ts +28 -0
  24. package/dist/runtime/api/apis/InformationApi.mjs +29 -0
  25. package/dist/runtime/api/apis/JobsApi.d.ts +94 -0
  26. package/dist/runtime/api/apis/JobsApi.mjs +252 -0
  27. package/dist/runtime/api/apis/index.d.ts +11 -0
  28. package/dist/runtime/api/apis/index.mjs +11 -0
  29. package/dist/runtime/api/index.d.ts +3 -0
  30. package/dist/runtime/api/index.mjs +3 -0
  31. package/dist/runtime/api/models/BucketInformation.d.ts +49 -0
  32. package/dist/runtime/api/models/BucketInformation.mjs +36 -0
  33. package/dist/runtime/api/models/CollectionStatus.d.ts +107 -0
  34. package/dist/runtime/api/models/CollectionStatus.mjs +63 -0
  35. package/dist/runtime/api/models/DatabaseInfo.d.ts +57 -0
  36. package/dist/runtime/api/models/DatabaseInfo.mjs +39 -0
  37. package/dist/runtime/api/models/DeleteResponse.d.ts +37 -0
  38. package/dist/runtime/api/models/DeleteResponse.mjs +30 -0
  39. package/dist/runtime/api/models/ErrorDescription.d.ts +43 -0
  40. package/dist/runtime/api/models/ErrorDescription.mjs +33 -0
  41. package/dist/runtime/api/models/FileInformation.d.ts +63 -0
  42. package/dist/runtime/api/models/FileInformation.mjs +42 -0
  43. package/dist/runtime/api/models/Grant.d.ts +55 -0
  44. package/dist/runtime/api/models/Grant.mjs +39 -0
  45. package/dist/runtime/api/models/IndexCreateRequest.d.ts +40 -0
  46. package/dist/runtime/api/models/IndexCreateRequest.mjs +34 -0
  47. package/dist/runtime/api/models/IndexCreateResponse.d.ts +31 -0
  48. package/dist/runtime/api/models/IndexCreateResponse.mjs +27 -0
  49. package/dist/runtime/api/models/IndexDropResponse.d.ts +31 -0
  50. package/dist/runtime/api/models/IndexDropResponse.mjs +27 -0
  51. package/dist/runtime/api/models/IndexOptionsRequest.d.ts +73 -0
  52. package/dist/runtime/api/models/IndexOptionsRequest.mjs +41 -0
  53. package/dist/runtime/api/models/InsertResponse.d.ts +37 -0
  54. package/dist/runtime/api/models/InsertResponse.mjs +30 -0
  55. package/dist/runtime/api/models/JobConfig.d.ts +61 -0
  56. package/dist/runtime/api/models/JobConfig.mjs +42 -0
  57. package/dist/runtime/api/models/JobInformation.d.ts +79 -0
  58. package/dist/runtime/api/models/JobInformation.mjs +49 -0
  59. package/dist/runtime/api/models/JsonSchema.d.ts +46 -0
  60. package/dist/runtime/api/models/JsonSchema.mjs +38 -0
  61. package/dist/runtime/api/models/JsonSchemaDefinition.d.ts +59 -0
  62. package/dist/runtime/api/models/JsonSchemaDefinition.mjs +39 -0
  63. package/dist/runtime/api/models/JsonValueAny.d.ts +31 -0
  64. package/dist/runtime/api/models/JsonValueAny.mjs +27 -0
  65. package/dist/runtime/api/models/JsonValueBoolean.d.ts +31 -0
  66. package/dist/runtime/api/models/JsonValueBoolean.mjs +27 -0
  67. package/dist/runtime/api/models/JsonValueString.d.ts +31 -0
  68. package/dist/runtime/api/models/JsonValueString.mjs +27 -0
  69. package/dist/runtime/api/models/Login.d.ts +37 -0
  70. package/dist/runtime/api/models/Login.mjs +30 -0
  71. package/dist/runtime/api/models/LoginResult.d.ts +44 -0
  72. package/dist/runtime/api/models/LoginResult.mjs +37 -0
  73. package/dist/runtime/api/models/MongoAggregateRequest.d.ts +38 -0
  74. package/dist/runtime/api/models/MongoAggregateRequest.mjs +34 -0
  75. package/dist/runtime/api/models/MongoCampConfiguration.d.ts +55 -0
  76. package/dist/runtime/api/models/MongoCampConfiguration.mjs +39 -0
  77. package/dist/runtime/api/models/MongoFindRequest.d.ts +49 -0
  78. package/dist/runtime/api/models/MongoFindRequest.mjs +33 -0
  79. package/dist/runtime/api/models/MongoIndex.d.ts +103 -0
  80. package/dist/runtime/api/models/MongoIndex.mjs +60 -0
  81. package/dist/runtime/api/models/PasswordUpdateRequest.d.ts +31 -0
  82. package/dist/runtime/api/models/PasswordUpdateRequest.mjs +27 -0
  83. package/dist/runtime/api/models/PipelineStage.d.ts +37 -0
  84. package/dist/runtime/api/models/PipelineStage.mjs +30 -0
  85. package/dist/runtime/api/models/Role.d.ts +44 -0
  86. package/dist/runtime/api/models/Role.mjs +37 -0
  87. package/dist/runtime/api/models/SchemaAnalysis.d.ts +50 -0
  88. package/dist/runtime/api/models/SchemaAnalysis.mjs +40 -0
  89. package/dist/runtime/api/models/SchemaAnalysisField.d.ts +62 -0
  90. package/dist/runtime/api/models/SchemaAnalysisField.mjs +45 -0
  91. package/dist/runtime/api/models/SchemaAnalysisFieldType.d.ts +43 -0
  92. package/dist/runtime/api/models/SchemaAnalysisFieldType.mjs +33 -0
  93. package/dist/runtime/api/models/SettingsResponse.d.ts +51 -0
  94. package/dist/runtime/api/models/SettingsResponse.mjs +34 -0
  95. package/dist/runtime/api/models/UpdateFileInformationRequest.d.ts +39 -0
  96. package/dist/runtime/api/models/UpdateFileInformationRequest.mjs +29 -0
  97. package/dist/runtime/api/models/UpdateRequest.d.ts +41 -0
  98. package/dist/runtime/api/models/UpdateRequest.mjs +30 -0
  99. package/dist/runtime/api/models/UpdateResponse.d.ts +49 -0
  100. package/dist/runtime/api/models/UpdateResponse.mjs +36 -0
  101. package/dist/runtime/api/models/UpdateRoleRequest.d.ts +38 -0
  102. package/dist/runtime/api/models/UpdateRoleRequest.mjs +34 -0
  103. package/dist/runtime/api/models/UserInformation.d.ts +49 -0
  104. package/dist/runtime/api/models/UserInformation.mjs +35 -0
  105. package/dist/runtime/api/models/UserProfile.d.ts +56 -0
  106. package/dist/runtime/api/models/UserProfile.mjs +41 -0
  107. package/dist/runtime/api/models/Version.d.ts +43 -0
  108. package/dist/runtime/api/models/Version.mjs +33 -0
  109. package/dist/runtime/api/models/index.d.ts +39 -0
  110. package/dist/runtime/api/models/index.mjs +39 -0
  111. package/dist/runtime/api/runtime.d.ts +182 -0
  112. package/dist/runtime/api/runtime.mjs +289 -0
  113. package/dist/runtime/composables/mongocampApi.d.ts +14 -0
  114. package/dist/runtime/composables/mongocampApi.mjs +45 -0
  115. package/dist/runtime/composables/mongocampAuth.d.ts +8 -0
  116. package/dist/runtime/composables/mongocampAuth.mjs +28 -0
  117. package/dist/runtime/composables/mongocampSearch.d.ts +11 -0
  118. package/dist/runtime/composables/mongocampSearch.mjs +20 -0
  119. package/dist/runtime/composables/mongocampStorage.d.ts +0 -0
  120. package/dist/runtime/composables/mongocampStorage.mjs +5 -0
  121. package/dist/runtime/composables/mongocampUrl.d.ts +1 -0
  122. package/dist/runtime/composables/mongocampUrl.mjs +5 -0
  123. package/dist/runtime/composables/mongocampUser.d.ts +3 -0
  124. package/dist/runtime/composables/mongocampUser.mjs +4 -0
  125. package/dist/types.d.mts +15 -0
  126. package/dist/types.d.ts +2 -8
  127. package/package.json +14 -13
@@ -0,0 +1,367 @@
1
+ import * as runtime from "../runtime.mjs";
2
+ import {
3
+ IndexCreateRequestToJSON,
4
+ IndexCreateResponseFromJSON,
5
+ IndexDropResponseFromJSON,
6
+ IndexOptionsRequestToJSON,
7
+ MongoIndexFromJSON
8
+ } from "../models/index.mjs";
9
+ export class IndexApi extends runtime.BaseAPI {
10
+ /**
11
+ * Create expiring Index by Field for given Collection
12
+ * Create expiring Index by Field for Collection
13
+ */
14
+ async createExpiringIndexRaw(requestParameters, initOverrides) {
15
+ if (requestParameters.collectionName === null || requestParameters.collectionName === void 0) {
16
+ throw new runtime.RequiredError("collectionName", "Required parameter requestParameters.collectionName was null or undefined when calling createExpiringIndex.");
17
+ }
18
+ if (requestParameters.fieldName === null || requestParameters.fieldName === void 0) {
19
+ throw new runtime.RequiredError("fieldName", "Required parameter requestParameters.fieldName was null or undefined when calling createExpiringIndex.");
20
+ }
21
+ if (requestParameters.duration === null || requestParameters.duration === void 0) {
22
+ throw new runtime.RequiredError("duration", "Required parameter requestParameters.duration was null or undefined when calling createExpiringIndex.");
23
+ }
24
+ const queryParameters = {};
25
+ if (requestParameters.sortAscending !== void 0) {
26
+ queryParameters["sortAscending"] = requestParameters.sortAscending;
27
+ }
28
+ if (requestParameters.name !== void 0) {
29
+ queryParameters["name"] = requestParameters.name;
30
+ }
31
+ const headerParameters = {};
32
+ if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
33
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
34
+ }
35
+ if (this.configuration && this.configuration.accessToken) {
36
+ const token = this.configuration.accessToken;
37
+ const tokenString = await token("httpAuth", []);
38
+ if (tokenString) {
39
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
40
+ }
41
+ }
42
+ if (this.configuration && this.configuration.apiKey) {
43
+ headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
44
+ }
45
+ const response = await this.request({
46
+ path: `/mongodb/collections/{collectionName}/index/field/{fieldName}/{duration}/expiring`.replace(`{${"collectionName"}}`, encodeURIComponent(String(requestParameters.collectionName))).replace(`{${"fieldName"}}`, encodeURIComponent(String(requestParameters.fieldName))).replace(`{${"duration"}}`, encodeURIComponent(String(requestParameters.duration))),
47
+ method: "PUT",
48
+ headers: headerParameters,
49
+ query: queryParameters
50
+ }, initOverrides);
51
+ return new runtime.JSONApiResponse(response, (jsonValue) => IndexCreateResponseFromJSON(jsonValue));
52
+ }
53
+ /**
54
+ * Create expiring Index by Field for given Collection
55
+ * Create expiring Index by Field for Collection
56
+ */
57
+ async createExpiringIndex(requestParameters, initOverrides) {
58
+ const response = await this.createExpiringIndexRaw(requestParameters, initOverrides);
59
+ return await response.value();
60
+ }
61
+ /**
62
+ * Create Index for given Collection
63
+ * Create Index for Collection
64
+ */
65
+ async createIndexRaw(requestParameters, initOverrides) {
66
+ if (requestParameters.collectionName === null || requestParameters.collectionName === void 0) {
67
+ throw new runtime.RequiredError("collectionName", "Required parameter requestParameters.collectionName was null or undefined when calling createIndex.");
68
+ }
69
+ if (requestParameters.indexCreateRequest === null || requestParameters.indexCreateRequest === void 0) {
70
+ throw new runtime.RequiredError("indexCreateRequest", "Required parameter requestParameters.indexCreateRequest was null or undefined when calling createIndex.");
71
+ }
72
+ const queryParameters = {};
73
+ const headerParameters = {};
74
+ headerParameters["Content-Type"] = "application/json";
75
+ if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
76
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
77
+ }
78
+ if (this.configuration && this.configuration.accessToken) {
79
+ const token = this.configuration.accessToken;
80
+ const tokenString = await token("httpAuth", []);
81
+ if (tokenString) {
82
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
83
+ }
84
+ }
85
+ if (this.configuration && this.configuration.apiKey) {
86
+ headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
87
+ }
88
+ const response = await this.request({
89
+ path: `/mongodb/collections/{collectionName}/index`.replace(`{${"collectionName"}}`, encodeURIComponent(String(requestParameters.collectionName))),
90
+ method: "PUT",
91
+ headers: headerParameters,
92
+ query: queryParameters,
93
+ body: IndexCreateRequestToJSON(requestParameters.indexCreateRequest)
94
+ }, initOverrides);
95
+ return new runtime.JSONApiResponse(response, (jsonValue) => IndexCreateResponseFromJSON(jsonValue));
96
+ }
97
+ /**
98
+ * Create Index for given Collection
99
+ * Create Index for Collection
100
+ */
101
+ async createIndex(requestParameters, initOverrides) {
102
+ const response = await this.createIndexRaw(requestParameters, initOverrides);
103
+ return await response.value();
104
+ }
105
+ /**
106
+ * Create Index by Field for given Collection
107
+ * Create Index by Field for Collection
108
+ */
109
+ async createIndexForFieldRaw(requestParameters, initOverrides) {
110
+ if (requestParameters.collectionName === null || requestParameters.collectionName === void 0) {
111
+ throw new runtime.RequiredError("collectionName", "Required parameter requestParameters.collectionName was null or undefined when calling createIndexForField.");
112
+ }
113
+ if (requestParameters.fieldName === null || requestParameters.fieldName === void 0) {
114
+ throw new runtime.RequiredError("fieldName", "Required parameter requestParameters.fieldName was null or undefined when calling createIndexForField.");
115
+ }
116
+ const queryParameters = {};
117
+ if (requestParameters.sortAscending !== void 0) {
118
+ queryParameters["sortAscending"] = requestParameters.sortAscending;
119
+ }
120
+ const headerParameters = {};
121
+ headerParameters["Content-Type"] = "application/json";
122
+ if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
123
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
124
+ }
125
+ if (this.configuration && this.configuration.accessToken) {
126
+ const token = this.configuration.accessToken;
127
+ const tokenString = await token("httpAuth", []);
128
+ if (tokenString) {
129
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
130
+ }
131
+ }
132
+ if (this.configuration && this.configuration.apiKey) {
133
+ headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
134
+ }
135
+ const response = await this.request({
136
+ path: `/mongodb/collections/{collectionName}/index/field/{fieldName}`.replace(`{${"collectionName"}}`, encodeURIComponent(String(requestParameters.collectionName))).replace(`{${"fieldName"}}`, encodeURIComponent(String(requestParameters.fieldName))),
137
+ method: "PUT",
138
+ headers: headerParameters,
139
+ query: queryParameters,
140
+ body: IndexOptionsRequestToJSON(requestParameters.indexOptionsRequest)
141
+ }, initOverrides);
142
+ return new runtime.JSONApiResponse(response, (jsonValue) => IndexCreateResponseFromJSON(jsonValue));
143
+ }
144
+ /**
145
+ * Create Index by Field for given Collection
146
+ * Create Index by Field for Collection
147
+ */
148
+ async createIndexForField(requestParameters, initOverrides) {
149
+ const response = await this.createIndexForFieldRaw(requestParameters, initOverrides);
150
+ return await response.value();
151
+ }
152
+ /**
153
+ * Create text index by field for given collection
154
+ * Create text index by field for collection
155
+ */
156
+ async createTextIndexRaw(requestParameters, initOverrides) {
157
+ if (requestParameters.collectionName === null || requestParameters.collectionName === void 0) {
158
+ throw new runtime.RequiredError("collectionName", "Required parameter requestParameters.collectionName was null or undefined when calling createTextIndex.");
159
+ }
160
+ if (requestParameters.fieldName === null || requestParameters.fieldName === void 0) {
161
+ throw new runtime.RequiredError("fieldName", "Required parameter requestParameters.fieldName was null or undefined when calling createTextIndex.");
162
+ }
163
+ const queryParameters = {};
164
+ const headerParameters = {};
165
+ headerParameters["Content-Type"] = "application/json";
166
+ if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
167
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
168
+ }
169
+ if (this.configuration && this.configuration.accessToken) {
170
+ const token = this.configuration.accessToken;
171
+ const tokenString = await token("httpAuth", []);
172
+ if (tokenString) {
173
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
174
+ }
175
+ }
176
+ if (this.configuration && this.configuration.apiKey) {
177
+ headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
178
+ }
179
+ const response = await this.request({
180
+ path: `/mongodb/collections/{collectionName}/index/field/{fieldName}/text`.replace(`{${"collectionName"}}`, encodeURIComponent(String(requestParameters.collectionName))).replace(`{${"fieldName"}}`, encodeURIComponent(String(requestParameters.fieldName))),
181
+ method: "PUT",
182
+ headers: headerParameters,
183
+ query: queryParameters,
184
+ body: IndexOptionsRequestToJSON(requestParameters.indexOptionsRequest)
185
+ }, initOverrides);
186
+ return new runtime.JSONApiResponse(response, (jsonValue) => IndexCreateResponseFromJSON(jsonValue));
187
+ }
188
+ /**
189
+ * Create text index by field for given collection
190
+ * Create text index by field for collection
191
+ */
192
+ async createTextIndex(requestParameters, initOverrides) {
193
+ const response = await this.createTextIndexRaw(requestParameters, initOverrides);
194
+ return await response.value();
195
+ }
196
+ /**
197
+ * Create Unique Index by Field for given Collection
198
+ * Create Unique Index
199
+ */
200
+ async createUniqueIndexRaw(requestParameters, initOverrides) {
201
+ if (requestParameters.collectionName === null || requestParameters.collectionName === void 0) {
202
+ throw new runtime.RequiredError("collectionName", "Required parameter requestParameters.collectionName was null or undefined when calling createUniqueIndex.");
203
+ }
204
+ if (requestParameters.fieldName === null || requestParameters.fieldName === void 0) {
205
+ throw new runtime.RequiredError("fieldName", "Required parameter requestParameters.fieldName was null or undefined when calling createUniqueIndex.");
206
+ }
207
+ const queryParameters = {};
208
+ if (requestParameters.sortAscending !== void 0) {
209
+ queryParameters["sortAscending"] = requestParameters.sortAscending;
210
+ }
211
+ if (requestParameters.name !== void 0) {
212
+ queryParameters["name"] = requestParameters.name;
213
+ }
214
+ const headerParameters = {};
215
+ if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
216
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
217
+ }
218
+ if (this.configuration && this.configuration.accessToken) {
219
+ const token = this.configuration.accessToken;
220
+ const tokenString = await token("httpAuth", []);
221
+ if (tokenString) {
222
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
223
+ }
224
+ }
225
+ if (this.configuration && this.configuration.apiKey) {
226
+ headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
227
+ }
228
+ const response = await this.request({
229
+ path: `/mongodb/collections/{collectionName}/index/field/{fieldName}/unique`.replace(`{${"collectionName"}}`, encodeURIComponent(String(requestParameters.collectionName))).replace(`{${"fieldName"}}`, encodeURIComponent(String(requestParameters.fieldName))),
230
+ method: "PUT",
231
+ headers: headerParameters,
232
+ query: queryParameters
233
+ }, initOverrides);
234
+ return new runtime.JSONApiResponse(response, (jsonValue) => IndexCreateResponseFromJSON(jsonValue));
235
+ }
236
+ /**
237
+ * Create Unique Index by Field for given Collection
238
+ * Create Unique Index
239
+ */
240
+ async createUniqueIndex(requestParameters, initOverrides) {
241
+ const response = await this.createUniqueIndexRaw(requestParameters, initOverrides);
242
+ return await response.value();
243
+ }
244
+ /**
245
+ * Delete Index by Name for given Collection
246
+ * Delete Index
247
+ */
248
+ async deleteIndexRaw(requestParameters, initOverrides) {
249
+ if (requestParameters.collectionName === null || requestParameters.collectionName === void 0) {
250
+ throw new runtime.RequiredError("collectionName", "Required parameter requestParameters.collectionName was null or undefined when calling deleteIndex.");
251
+ }
252
+ if (requestParameters.indexName === null || requestParameters.indexName === void 0) {
253
+ throw new runtime.RequiredError("indexName", "Required parameter requestParameters.indexName was null or undefined when calling deleteIndex.");
254
+ }
255
+ const queryParameters = {};
256
+ const headerParameters = {};
257
+ if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
258
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
259
+ }
260
+ if (this.configuration && this.configuration.accessToken) {
261
+ const token = this.configuration.accessToken;
262
+ const tokenString = await token("httpAuth", []);
263
+ if (tokenString) {
264
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
265
+ }
266
+ }
267
+ if (this.configuration && this.configuration.apiKey) {
268
+ headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
269
+ }
270
+ const response = await this.request({
271
+ path: `/mongodb/collections/{collectionName}/index/{indexName}`.replace(`{${"collectionName"}}`, encodeURIComponent(String(requestParameters.collectionName))).replace(`{${"indexName"}}`, encodeURIComponent(String(requestParameters.indexName))),
272
+ method: "DELETE",
273
+ headers: headerParameters,
274
+ query: queryParameters
275
+ }, initOverrides);
276
+ return new runtime.JSONApiResponse(response, (jsonValue) => IndexDropResponseFromJSON(jsonValue));
277
+ }
278
+ /**
279
+ * Delete Index by Name for given Collection
280
+ * Delete Index
281
+ */
282
+ async deleteIndex(requestParameters, initOverrides) {
283
+ const response = await this.deleteIndexRaw(requestParameters, initOverrides);
284
+ return await response.value();
285
+ }
286
+ /**
287
+ * Index by Name for given Collection
288
+ * Index for Collection
289
+ */
290
+ async indexRaw(requestParameters, initOverrides) {
291
+ if (requestParameters.collectionName === null || requestParameters.collectionName === void 0) {
292
+ throw new runtime.RequiredError("collectionName", "Required parameter requestParameters.collectionName was null or undefined when calling index.");
293
+ }
294
+ if (requestParameters.indexName === null || requestParameters.indexName === void 0) {
295
+ throw new runtime.RequiredError("indexName", "Required parameter requestParameters.indexName was null or undefined when calling index.");
296
+ }
297
+ const queryParameters = {};
298
+ const headerParameters = {};
299
+ if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
300
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
301
+ }
302
+ if (this.configuration && this.configuration.accessToken) {
303
+ const token = this.configuration.accessToken;
304
+ const tokenString = await token("httpAuth", []);
305
+ if (tokenString) {
306
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
307
+ }
308
+ }
309
+ if (this.configuration && this.configuration.apiKey) {
310
+ headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
311
+ }
312
+ const response = await this.request({
313
+ path: `/mongodb/collections/{collectionName}/index/{indexName}`.replace(`{${"collectionName"}}`, encodeURIComponent(String(requestParameters.collectionName))).replace(`{${"indexName"}}`, encodeURIComponent(String(requestParameters.indexName))),
314
+ method: "GET",
315
+ headers: headerParameters,
316
+ query: queryParameters
317
+ }, initOverrides);
318
+ return new runtime.JSONApiResponse(response, (jsonValue) => MongoIndexFromJSON(jsonValue));
319
+ }
320
+ /**
321
+ * Index by Name for given Collection
322
+ * Index for Collection
323
+ */
324
+ async index(requestParameters, initOverrides) {
325
+ const response = await this.indexRaw(requestParameters, initOverrides);
326
+ return await response.value();
327
+ }
328
+ /**
329
+ * List all Indices for given Collection
330
+ * List Indices for Collection
331
+ */
332
+ async listIndicesRaw(requestParameters, initOverrides) {
333
+ if (requestParameters.collectionName === null || requestParameters.collectionName === void 0) {
334
+ throw new runtime.RequiredError("collectionName", "Required parameter requestParameters.collectionName was null or undefined when calling listIndices.");
335
+ }
336
+ const queryParameters = {};
337
+ const headerParameters = {};
338
+ if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
339
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
340
+ }
341
+ if (this.configuration && this.configuration.accessToken) {
342
+ const token = this.configuration.accessToken;
343
+ const tokenString = await token("httpAuth", []);
344
+ if (tokenString) {
345
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
346
+ }
347
+ }
348
+ if (this.configuration && this.configuration.apiKey) {
349
+ headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
350
+ }
351
+ const response = await this.request({
352
+ path: `/mongodb/collections/{collectionName}/index`.replace(`{${"collectionName"}}`, encodeURIComponent(String(requestParameters.collectionName))),
353
+ method: "GET",
354
+ headers: headerParameters,
355
+ query: queryParameters
356
+ }, initOverrides);
357
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(MongoIndexFromJSON));
358
+ }
359
+ /**
360
+ * List all Indices for given Collection
361
+ * List Indices for Collection
362
+ */
363
+ async listIndices(requestParameters, initOverrides) {
364
+ const response = await this.listIndicesRaw(requestParameters, initOverrides);
365
+ return await response.value();
366
+ }
367
+ }
@@ -0,0 +1,28 @@
1
+ /**
2
+ * mongocamp-library
3
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ *
5
+ * The version of the OpenAPI document: 1.5.7
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 { Version } from '../models/index';
14
+ /**
15
+ *
16
+ */
17
+ export declare class InformationApi extends runtime.BaseAPI {
18
+ /**
19
+ * Version Info of the MongoCamp API
20
+ * Version Information
21
+ */
22
+ versionRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Version>>;
23
+ /**
24
+ * Version Info of the MongoCamp API
25
+ * Version Information
26
+ */
27
+ version(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Version>;
28
+ }
@@ -0,0 +1,29 @@
1
+ import * as runtime from "../runtime.mjs";
2
+ import {
3
+ VersionFromJSON
4
+ } from "../models/index.mjs";
5
+ export class InformationApi extends runtime.BaseAPI {
6
+ /**
7
+ * Version Info of the MongoCamp API
8
+ * Version Information
9
+ */
10
+ async versionRaw(initOverrides) {
11
+ const queryParameters = {};
12
+ const headerParameters = {};
13
+ const response = await this.request({
14
+ path: `/version`,
15
+ method: "GET",
16
+ headers: headerParameters,
17
+ query: queryParameters
18
+ }, initOverrides);
19
+ return new runtime.JSONApiResponse(response, (jsonValue) => VersionFromJSON(jsonValue));
20
+ }
21
+ /**
22
+ * Version Info of the MongoCamp API
23
+ * Version Information
24
+ */
25
+ async version(initOverrides) {
26
+ const response = await this.versionRaw(initOverrides);
27
+ return await response.value();
28
+ }
29
+ }
@@ -0,0 +1,94 @@
1
+ /**
2
+ * mongocamp-library
3
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ *
5
+ * The version of the OpenAPI document: 1.5.7
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 { JobConfig, JobInformation, JsonValueBoolean } from '../models/index';
14
+ export interface DeleteJobRequest {
15
+ jobGroup: string;
16
+ jobName: string;
17
+ }
18
+ export interface ExecuteJobRequest {
19
+ jobGroup: string;
20
+ jobName: string;
21
+ }
22
+ export interface RegisterJobRequest {
23
+ jobConfig: JobConfig;
24
+ }
25
+ export interface UpdateJobRequest {
26
+ jobGroup: string;
27
+ jobName: string;
28
+ jobConfig: JobConfig;
29
+ }
30
+ /**
31
+ *
32
+ */
33
+ export declare class JobsApi extends runtime.BaseAPI {
34
+ /**
35
+ * Delete Job and reload all Job Information
36
+ * Delete Job
37
+ */
38
+ deleteJobRaw(requestParameters: DeleteJobRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<JsonValueBoolean>>;
39
+ /**
40
+ * Delete Job and reload all Job Information
41
+ * Delete Job
42
+ */
43
+ deleteJob(requestParameters: DeleteJobRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<JsonValueBoolean>;
44
+ /**
45
+ * Execute scheduled Job manually
46
+ * Execute Job
47
+ */
48
+ executeJobRaw(requestParameters: ExecuteJobRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<JsonValueBoolean>>;
49
+ /**
50
+ * Execute scheduled Job manually
51
+ * Execute Job
52
+ */
53
+ executeJob(requestParameters: ExecuteJobRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<JsonValueBoolean>;
54
+ /**
55
+ * Returns the List of all registered Jobs with full information
56
+ * Registered Jobs
57
+ */
58
+ jobsListRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<JobInformation>>>;
59
+ /**
60
+ * Returns the List of all registered Jobs with full information
61
+ * Registered Jobs
62
+ */
63
+ jobsList(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<JobInformation>>;
64
+ /**
65
+ * Returns the List of possible job classes
66
+ * Possible Jobs
67
+ */
68
+ possibleJobsListRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<string>>>;
69
+ /**
70
+ * Returns the List of possible job classes
71
+ * Possible Jobs
72
+ */
73
+ possibleJobsList(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<string>>;
74
+ /**
75
+ * Register an Job and return the JobInformation with next schedule information
76
+ * Register Job
77
+ */
78
+ registerJobRaw(requestParameters: RegisterJobRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<JobInformation>>;
79
+ /**
80
+ * Register an Job and return the JobInformation with next schedule information
81
+ * Register Job
82
+ */
83
+ registerJob(requestParameters: RegisterJobRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<JobInformation>;
84
+ /**
85
+ * Add Job and get JobInformation back
86
+ * Update Job
87
+ */
88
+ updateJobRaw(requestParameters: UpdateJobRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<JobInformation>>;
89
+ /**
90
+ * Add Job and get JobInformation back
91
+ * Update Job
92
+ */
93
+ updateJob(requestParameters: UpdateJobRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<JobInformation>;
94
+ }