@sfxcode/nuxt-mongocamp-server 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (129) hide show
  1. package/README.md +38 -0
  2. package/dist/module.cjs +5 -0
  3. package/dist/module.d.ts +9 -0
  4. package/dist/module.json +5 -0
  5. package/dist/module.mjs +72 -0
  6. package/dist/runtime/api/apis/AdminApi.d.ts +181 -0
  7. package/dist/runtime/api/apis/AdminApi.mjs +413 -0
  8. package/dist/runtime/api/apis/ApplicationApi.d.ts +68 -0
  9. package/dist/runtime/api/apis/ApplicationApi.mjs +147 -0
  10. package/dist/runtime/api/apis/AuthApi.d.ts +107 -0
  11. package/dist/runtime/api/apis/AuthApi.mjs +235 -0
  12. package/dist/runtime/api/apis/BucketApi.d.ts +67 -0
  13. package/dist/runtime/api/apis/BucketApi.mjs +128 -0
  14. package/dist/runtime/api/apis/CollectionApi.d.ts +161 -0
  15. package/dist/runtime/api/apis/CollectionApi.mjs +355 -0
  16. package/dist/runtime/api/apis/DatabaseApi.d.ts +77 -0
  17. package/dist/runtime/api/apis/DatabaseApi.mjs +156 -0
  18. package/dist/runtime/api/apis/DocumentApi.d.ts +188 -0
  19. package/dist/runtime/api/apis/DocumentApi.mjs +385 -0
  20. package/dist/runtime/api/apis/FileApi.d.ts +125 -0
  21. package/dist/runtime/api/apis/FileApi.mjs +299 -0
  22. package/dist/runtime/api/apis/IndexApi.d.ts +137 -0
  23. package/dist/runtime/api/apis/IndexApi.mjs +303 -0
  24. package/dist/runtime/api/apis/InformationApi.d.ts +28 -0
  25. package/dist/runtime/api/apis/InformationApi.mjs +21 -0
  26. package/dist/runtime/api/apis/JobsApi.d.ts +94 -0
  27. package/dist/runtime/api/apis/JobsApi.mjs +204 -0
  28. package/dist/runtime/api/apis/index.d.ts +11 -0
  29. package/dist/runtime/api/apis/index.mjs +11 -0
  30. package/dist/runtime/api/index.d.ts +3 -0
  31. package/dist/runtime/api/index.mjs +3 -0
  32. package/dist/runtime/api/models/BucketInformation.d.ts +45 -0
  33. package/dist/runtime/api/models/BucketInformation.mjs +28 -0
  34. package/dist/runtime/api/models/CollectionStatus.d.ts +103 -0
  35. package/dist/runtime/api/models/CollectionStatus.mjs +46 -0
  36. package/dist/runtime/api/models/DatabaseInfo.d.ts +53 -0
  37. package/dist/runtime/api/models/DatabaseInfo.mjs +30 -0
  38. package/dist/runtime/api/models/DeleteResponse.d.ts +33 -0
  39. package/dist/runtime/api/models/DeleteResponse.mjs +24 -0
  40. package/dist/runtime/api/models/ErrorDescription.d.ts +39 -0
  41. package/dist/runtime/api/models/ErrorDescription.mjs +26 -0
  42. package/dist/runtime/api/models/FileInformation.d.ts +59 -0
  43. package/dist/runtime/api/models/FileInformation.mjs +32 -0
  44. package/dist/runtime/api/models/Grant.d.ts +51 -0
  45. package/dist/runtime/api/models/Grant.mjs +30 -0
  46. package/dist/runtime/api/models/IndexCreateRequest.d.ts +36 -0
  47. package/dist/runtime/api/models/IndexCreateRequest.mjs +29 -0
  48. package/dist/runtime/api/models/IndexCreateResponse.d.ts +27 -0
  49. package/dist/runtime/api/models/IndexCreateResponse.mjs +22 -0
  50. package/dist/runtime/api/models/IndexDropResponse.d.ts +27 -0
  51. package/dist/runtime/api/models/IndexDropResponse.mjs +22 -0
  52. package/dist/runtime/api/models/IndexOptionsRequest.d.ts +69 -0
  53. package/dist/runtime/api/models/IndexOptionsRequest.mjs +37 -0
  54. package/dist/runtime/api/models/InsertResponse.d.ts +33 -0
  55. package/dist/runtime/api/models/InsertResponse.mjs +25 -0
  56. package/dist/runtime/api/models/JobConfig.d.ts +57 -0
  57. package/dist/runtime/api/models/JobConfig.mjs +32 -0
  58. package/dist/runtime/api/models/JobInformation.d.ts +75 -0
  59. package/dist/runtime/api/models/JobInformation.mjs +39 -0
  60. package/dist/runtime/api/models/JsonResultBoolean.d.ts +27 -0
  61. package/dist/runtime/api/models/JsonResultBoolean.mjs +22 -0
  62. package/dist/runtime/api/models/JsonResultString.d.ts +27 -0
  63. package/dist/runtime/api/models/JsonResultString.mjs +22 -0
  64. package/dist/runtime/api/models/JsonSchema.d.ts +42 -0
  65. package/dist/runtime/api/models/JsonSchema.mjs +31 -0
  66. package/dist/runtime/api/models/JsonSchemaDefinition.d.ts +55 -0
  67. package/dist/runtime/api/models/JsonSchemaDefinition.mjs +31 -0
  68. package/dist/runtime/api/models/Login.d.ts +33 -0
  69. package/dist/runtime/api/models/Login.mjs +24 -0
  70. package/dist/runtime/api/models/LoginResult.d.ts +40 -0
  71. package/dist/runtime/api/models/LoginResult.mjs +30 -0
  72. package/dist/runtime/api/models/Measurement.d.ts +33 -0
  73. package/dist/runtime/api/models/Measurement.mjs +24 -0
  74. package/dist/runtime/api/models/Metric.d.ts +52 -0
  75. package/dist/runtime/api/models/Metric.mjs +35 -0
  76. package/dist/runtime/api/models/MongoAggregateRequest.d.ts +34 -0
  77. package/dist/runtime/api/models/MongoAggregateRequest.mjs +29 -0
  78. package/dist/runtime/api/models/MongoFindRequest.d.ts +45 -0
  79. package/dist/runtime/api/models/MongoFindRequest.mjs +26 -0
  80. package/dist/runtime/api/models/MongoIndex.d.ts +99 -0
  81. package/dist/runtime/api/models/MongoIndex.mjs +45 -0
  82. package/dist/runtime/api/models/PasswordUpdateRequest.d.ts +27 -0
  83. package/dist/runtime/api/models/PasswordUpdateRequest.mjs +22 -0
  84. package/dist/runtime/api/models/PipelineStage.d.ts +33 -0
  85. package/dist/runtime/api/models/PipelineStage.mjs +24 -0
  86. package/dist/runtime/api/models/Role.d.ts +40 -0
  87. package/dist/runtime/api/models/Role.mjs +31 -0
  88. package/dist/runtime/api/models/SchemaAnalysis.d.ts +46 -0
  89. package/dist/runtime/api/models/SchemaAnalysis.mjs +33 -0
  90. package/dist/runtime/api/models/SchemaAnalysisField.d.ts +58 -0
  91. package/dist/runtime/api/models/SchemaAnalysisField.mjs +37 -0
  92. package/dist/runtime/api/models/SchemaAnalysisFieldType.d.ts +39 -0
  93. package/dist/runtime/api/models/SchemaAnalysisFieldType.mjs +26 -0
  94. package/dist/runtime/api/models/SettingsResponse.d.ts +47 -0
  95. package/dist/runtime/api/models/SettingsResponse.mjs +29 -0
  96. package/dist/runtime/api/models/UpdateFileInformationRequest.d.ts +35 -0
  97. package/dist/runtime/api/models/UpdateFileInformationRequest.mjs +25 -0
  98. package/dist/runtime/api/models/UpdateRequest.d.ts +37 -0
  99. package/dist/runtime/api/models/UpdateRequest.mjs +24 -0
  100. package/dist/runtime/api/models/UpdateResponse.d.ts +45 -0
  101. package/dist/runtime/api/models/UpdateResponse.mjs +29 -0
  102. package/dist/runtime/api/models/UpdateRoleRequest.d.ts +34 -0
  103. package/dist/runtime/api/models/UpdateRoleRequest.mjs +29 -0
  104. package/dist/runtime/api/models/UserInformation.d.ts +45 -0
  105. package/dist/runtime/api/models/UserInformation.mjs +29 -0
  106. package/dist/runtime/api/models/UserProfile.d.ts +52 -0
  107. package/dist/runtime/api/models/UserProfile.mjs +35 -0
  108. package/dist/runtime/api/models/Version.d.ts +39 -0
  109. package/dist/runtime/api/models/Version.mjs +26 -0
  110. package/dist/runtime/api/models/index.d.ts +39 -0
  111. package/dist/runtime/api/models/index.mjs +39 -0
  112. package/dist/runtime/api/runtime.d.ts +140 -0
  113. package/dist/runtime/api/runtime.mjs +196 -0
  114. package/dist/runtime/composables/mongocampApi.d.ts +14 -0
  115. package/dist/runtime/composables/mongocampApi.mjs +45 -0
  116. package/dist/runtime/composables/mongocampAuth.d.ts +9 -0
  117. package/dist/runtime/composables/mongocampAuth.mjs +52 -0
  118. package/dist/runtime/composables/mongocampSearch.d.ts +6 -0
  119. package/dist/runtime/composables/mongocampSearch.mjs +12 -0
  120. package/dist/runtime/composables/mongocampToken.d.ts +1 -0
  121. package/dist/runtime/composables/mongocampToken.mjs +10 -0
  122. package/dist/runtime/composables/mongocampUrl.d.ts +1 -0
  123. package/dist/runtime/composables/mongocampUrl.mjs +5 -0
  124. package/dist/runtime/composables/mongocampUser.d.ts +3 -0
  125. package/dist/runtime/composables/mongocampUser.mjs +2 -0
  126. package/dist/runtime/plugin.d.ts +2 -0
  127. package/dist/runtime/plugin.mjs +6 -0
  128. package/dist/types.d.ts +10 -0
  129. package/package.json +37 -0
@@ -0,0 +1,303 @@
1
+ import * as runtime from "../runtime.mjs";
2
+ import {
3
+ IndexCreateRequestToJSON,
4
+ IndexCreateResponseFromJSON,
5
+ IndexDropResponseFromJSON,
6
+ IndexOptionsRequestToJSON,
7
+ MongoIndexFromJSON
8
+ } from "../models";
9
+ export class IndexApi extends runtime.BaseAPI {
10
+ async createExpiringIndexRaw(requestParameters, initOverrides) {
11
+ if (requestParameters.collectionName === null || requestParameters.collectionName === void 0) {
12
+ throw new runtime.RequiredError("collectionName", "Required parameter requestParameters.collectionName was null or undefined when calling createExpiringIndex.");
13
+ }
14
+ if (requestParameters.fieldName === null || requestParameters.fieldName === void 0) {
15
+ throw new runtime.RequiredError("fieldName", "Required parameter requestParameters.fieldName was null or undefined when calling createExpiringIndex.");
16
+ }
17
+ if (requestParameters.duration === null || requestParameters.duration === void 0) {
18
+ throw new runtime.RequiredError("duration", "Required parameter requestParameters.duration was null or undefined when calling createExpiringIndex.");
19
+ }
20
+ const queryParameters = {};
21
+ if (requestParameters.sortAscending !== void 0) {
22
+ queryParameters["sortAscending"] = requestParameters.sortAscending;
23
+ }
24
+ if (requestParameters.name !== void 0) {
25
+ queryParameters["name"] = requestParameters.name;
26
+ }
27
+ const headerParameters = {};
28
+ if (this.configuration && this.configuration.apiKey) {
29
+ headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
30
+ }
31
+ if (this.configuration && this.configuration.accessToken) {
32
+ const token = this.configuration.accessToken;
33
+ const tokenString = await token("httpAuth", []);
34
+ if (tokenString) {
35
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
36
+ }
37
+ }
38
+ if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
39
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
40
+ }
41
+ const response = await this.request({
42
+ 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))),
43
+ method: "PUT",
44
+ headers: headerParameters,
45
+ query: queryParameters
46
+ }, initOverrides);
47
+ return new runtime.JSONApiResponse(response, (jsonValue) => IndexCreateResponseFromJSON(jsonValue));
48
+ }
49
+ async createExpiringIndex(requestParameters, initOverrides) {
50
+ const response = await this.createExpiringIndexRaw(requestParameters, initOverrides);
51
+ return await response.value();
52
+ }
53
+ async createIndexRaw(requestParameters, initOverrides) {
54
+ if (requestParameters.collectionName === null || requestParameters.collectionName === void 0) {
55
+ throw new runtime.RequiredError("collectionName", "Required parameter requestParameters.collectionName was null or undefined when calling createIndex.");
56
+ }
57
+ if (requestParameters.indexCreateRequest === null || requestParameters.indexCreateRequest === void 0) {
58
+ throw new runtime.RequiredError("indexCreateRequest", "Required parameter requestParameters.indexCreateRequest was null or undefined when calling createIndex.");
59
+ }
60
+ const queryParameters = {};
61
+ const headerParameters = {};
62
+ headerParameters["Content-Type"] = "application/json";
63
+ if (this.configuration && this.configuration.apiKey) {
64
+ headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
65
+ }
66
+ if (this.configuration && this.configuration.accessToken) {
67
+ const token = this.configuration.accessToken;
68
+ const tokenString = await token("httpAuth", []);
69
+ if (tokenString) {
70
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
71
+ }
72
+ }
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
+ const response = await this.request({
77
+ path: `/mongodb/collections/{collectionName}/index`.replace(`{${"collectionName"}}`, encodeURIComponent(String(requestParameters.collectionName))),
78
+ method: "PUT",
79
+ headers: headerParameters,
80
+ query: queryParameters,
81
+ body: IndexCreateRequestToJSON(requestParameters.indexCreateRequest)
82
+ }, initOverrides);
83
+ return new runtime.JSONApiResponse(response, (jsonValue) => IndexCreateResponseFromJSON(jsonValue));
84
+ }
85
+ async createIndex(requestParameters, initOverrides) {
86
+ const response = await this.createIndexRaw(requestParameters, initOverrides);
87
+ return await response.value();
88
+ }
89
+ async createIndexForFieldRaw(requestParameters, initOverrides) {
90
+ if (requestParameters.collectionName === null || requestParameters.collectionName === void 0) {
91
+ throw new runtime.RequiredError("collectionName", "Required parameter requestParameters.collectionName was null or undefined when calling createIndexForField.");
92
+ }
93
+ if (requestParameters.fieldName === null || requestParameters.fieldName === void 0) {
94
+ throw new runtime.RequiredError("fieldName", "Required parameter requestParameters.fieldName was null or undefined when calling createIndexForField.");
95
+ }
96
+ const queryParameters = {};
97
+ if (requestParameters.sortAscending !== void 0) {
98
+ queryParameters["sortAscending"] = requestParameters.sortAscending;
99
+ }
100
+ const headerParameters = {};
101
+ headerParameters["Content-Type"] = "application/json";
102
+ if (this.configuration && this.configuration.apiKey) {
103
+ headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
104
+ }
105
+ if (this.configuration && this.configuration.accessToken) {
106
+ const token = this.configuration.accessToken;
107
+ const tokenString = await token("httpAuth", []);
108
+ if (tokenString) {
109
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
110
+ }
111
+ }
112
+ if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
113
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
114
+ }
115
+ const response = await this.request({
116
+ path: `/mongodb/collections/{collectionName}/index/field/{fieldName}`.replace(`{${"collectionName"}}`, encodeURIComponent(String(requestParameters.collectionName))).replace(`{${"fieldName"}}`, encodeURIComponent(String(requestParameters.fieldName))),
117
+ method: "PUT",
118
+ headers: headerParameters,
119
+ query: queryParameters,
120
+ body: IndexOptionsRequestToJSON(requestParameters.indexOptionsRequest)
121
+ }, initOverrides);
122
+ return new runtime.JSONApiResponse(response, (jsonValue) => IndexCreateResponseFromJSON(jsonValue));
123
+ }
124
+ async createIndexForField(requestParameters, initOverrides) {
125
+ const response = await this.createIndexForFieldRaw(requestParameters, initOverrides);
126
+ return await response.value();
127
+ }
128
+ async createTextIndexRaw(requestParameters, initOverrides) {
129
+ if (requestParameters.collectionName === null || requestParameters.collectionName === void 0) {
130
+ throw new runtime.RequiredError("collectionName", "Required parameter requestParameters.collectionName was null or undefined when calling createTextIndex.");
131
+ }
132
+ if (requestParameters.fieldName === null || requestParameters.fieldName === void 0) {
133
+ throw new runtime.RequiredError("fieldName", "Required parameter requestParameters.fieldName was null or undefined when calling createTextIndex.");
134
+ }
135
+ const queryParameters = {};
136
+ const headerParameters = {};
137
+ headerParameters["Content-Type"] = "application/json";
138
+ if (this.configuration && this.configuration.apiKey) {
139
+ headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
140
+ }
141
+ if (this.configuration && this.configuration.accessToken) {
142
+ const token = this.configuration.accessToken;
143
+ const tokenString = await token("httpAuth", []);
144
+ if (tokenString) {
145
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
146
+ }
147
+ }
148
+ if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
149
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
150
+ }
151
+ const response = await this.request({
152
+ path: `/mongodb/collections/{collectionName}/index/field/{fieldName}/text`.replace(`{${"collectionName"}}`, encodeURIComponent(String(requestParameters.collectionName))).replace(`{${"fieldName"}}`, encodeURIComponent(String(requestParameters.fieldName))),
153
+ method: "PUT",
154
+ headers: headerParameters,
155
+ query: queryParameters,
156
+ body: IndexOptionsRequestToJSON(requestParameters.indexOptionsRequest)
157
+ }, initOverrides);
158
+ return new runtime.JSONApiResponse(response, (jsonValue) => IndexCreateResponseFromJSON(jsonValue));
159
+ }
160
+ async createTextIndex(requestParameters, initOverrides) {
161
+ const response = await this.createTextIndexRaw(requestParameters, initOverrides);
162
+ return await response.value();
163
+ }
164
+ async createUniqueIndexRaw(requestParameters, initOverrides) {
165
+ if (requestParameters.collectionName === null || requestParameters.collectionName === void 0) {
166
+ throw new runtime.RequiredError("collectionName", "Required parameter requestParameters.collectionName was null or undefined when calling createUniqueIndex.");
167
+ }
168
+ if (requestParameters.fieldName === null || requestParameters.fieldName === void 0) {
169
+ throw new runtime.RequiredError("fieldName", "Required parameter requestParameters.fieldName was null or undefined when calling createUniqueIndex.");
170
+ }
171
+ const queryParameters = {};
172
+ if (requestParameters.sortAscending !== void 0) {
173
+ queryParameters["sortAscending"] = requestParameters.sortAscending;
174
+ }
175
+ if (requestParameters.name !== void 0) {
176
+ queryParameters["name"] = requestParameters.name;
177
+ }
178
+ const headerParameters = {};
179
+ if (this.configuration && this.configuration.apiKey) {
180
+ headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
181
+ }
182
+ if (this.configuration && this.configuration.accessToken) {
183
+ const token = this.configuration.accessToken;
184
+ const tokenString = await token("httpAuth", []);
185
+ if (tokenString) {
186
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
187
+ }
188
+ }
189
+ if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
190
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
191
+ }
192
+ const response = await this.request({
193
+ path: `/mongodb/collections/{collectionName}/index/field/{fieldName}/unique`.replace(`{${"collectionName"}}`, encodeURIComponent(String(requestParameters.collectionName))).replace(`{${"fieldName"}}`, encodeURIComponent(String(requestParameters.fieldName))),
194
+ method: "PUT",
195
+ headers: headerParameters,
196
+ query: queryParameters
197
+ }, initOverrides);
198
+ return new runtime.JSONApiResponse(response, (jsonValue) => IndexCreateResponseFromJSON(jsonValue));
199
+ }
200
+ async createUniqueIndex(requestParameters, initOverrides) {
201
+ const response = await this.createUniqueIndexRaw(requestParameters, initOverrides);
202
+ return await response.value();
203
+ }
204
+ async deleteIndexRaw(requestParameters, initOverrides) {
205
+ if (requestParameters.collectionName === null || requestParameters.collectionName === void 0) {
206
+ throw new runtime.RequiredError("collectionName", "Required parameter requestParameters.collectionName was null or undefined when calling deleteIndex.");
207
+ }
208
+ if (requestParameters.indexName === null || requestParameters.indexName === void 0) {
209
+ throw new runtime.RequiredError("indexName", "Required parameter requestParameters.indexName was null or undefined when calling deleteIndex.");
210
+ }
211
+ const queryParameters = {};
212
+ const headerParameters = {};
213
+ if (this.configuration && this.configuration.apiKey) {
214
+ headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
215
+ }
216
+ if (this.configuration && this.configuration.accessToken) {
217
+ const token = this.configuration.accessToken;
218
+ const tokenString = await token("httpAuth", []);
219
+ if (tokenString) {
220
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
221
+ }
222
+ }
223
+ if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
224
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
225
+ }
226
+ const response = await this.request({
227
+ path: `/mongodb/collections/{collectionName}/index/{indexName}`.replace(`{${"collectionName"}}`, encodeURIComponent(String(requestParameters.collectionName))).replace(`{${"indexName"}}`, encodeURIComponent(String(requestParameters.indexName))),
228
+ method: "DELETE",
229
+ headers: headerParameters,
230
+ query: queryParameters
231
+ }, initOverrides);
232
+ return new runtime.JSONApiResponse(response, (jsonValue) => IndexDropResponseFromJSON(jsonValue));
233
+ }
234
+ async deleteIndex(requestParameters, initOverrides) {
235
+ const response = await this.deleteIndexRaw(requestParameters, initOverrides);
236
+ return await response.value();
237
+ }
238
+ async indexRaw(requestParameters, initOverrides) {
239
+ if (requestParameters.collectionName === null || requestParameters.collectionName === void 0) {
240
+ throw new runtime.RequiredError("collectionName", "Required parameter requestParameters.collectionName was null or undefined when calling index.");
241
+ }
242
+ if (requestParameters.indexName === null || requestParameters.indexName === void 0) {
243
+ throw new runtime.RequiredError("indexName", "Required parameter requestParameters.indexName was null or undefined when calling index.");
244
+ }
245
+ const queryParameters = {};
246
+ const headerParameters = {};
247
+ if (this.configuration && this.configuration.apiKey) {
248
+ headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
249
+ }
250
+ if (this.configuration && this.configuration.accessToken) {
251
+ const token = this.configuration.accessToken;
252
+ const tokenString = await token("httpAuth", []);
253
+ if (tokenString) {
254
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
255
+ }
256
+ }
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
+ const response = await this.request({
261
+ path: `/mongodb/collections/{collectionName}/index/{indexName}`.replace(`{${"collectionName"}}`, encodeURIComponent(String(requestParameters.collectionName))).replace(`{${"indexName"}}`, encodeURIComponent(String(requestParameters.indexName))),
262
+ method: "GET",
263
+ headers: headerParameters,
264
+ query: queryParameters
265
+ }, initOverrides);
266
+ return new runtime.JSONApiResponse(response, (jsonValue) => MongoIndexFromJSON(jsonValue));
267
+ }
268
+ async index(requestParameters, initOverrides) {
269
+ const response = await this.indexRaw(requestParameters, initOverrides);
270
+ return await response.value();
271
+ }
272
+ async listIndicesRaw(requestParameters, initOverrides) {
273
+ if (requestParameters.collectionName === null || requestParameters.collectionName === void 0) {
274
+ throw new runtime.RequiredError("collectionName", "Required parameter requestParameters.collectionName was null or undefined when calling listIndices.");
275
+ }
276
+ const queryParameters = {};
277
+ const headerParameters = {};
278
+ if (this.configuration && this.configuration.apiKey) {
279
+ headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
280
+ }
281
+ if (this.configuration && this.configuration.accessToken) {
282
+ const token = this.configuration.accessToken;
283
+ const tokenString = await token("httpAuth", []);
284
+ if (tokenString) {
285
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
286
+ }
287
+ }
288
+ if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
289
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
290
+ }
291
+ const response = await this.request({
292
+ path: `/mongodb/collections/{collectionName}/index`.replace(`{${"collectionName"}}`, encodeURIComponent(String(requestParameters.collectionName))),
293
+ method: "GET",
294
+ headers: headerParameters,
295
+ query: queryParameters
296
+ }, initOverrides);
297
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(MongoIndexFromJSON));
298
+ }
299
+ async listIndices(requestParameters, initOverrides) {
300
+ const response = await this.listIndicesRaw(requestParameters, initOverrides);
301
+ return await response.value();
302
+ }
303
+ }
@@ -0,0 +1,28 @@
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.2.0
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 { Version } from '../models';
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): Promise<runtime.ApiResponse<Version>>;
23
+ /**
24
+ * Version Info of the MongoCamp API
25
+ * Version Information
26
+ */
27
+ version(initOverrides?: RequestInit): Promise<Version>;
28
+ }
@@ -0,0 +1,21 @@
1
+ import * as runtime from "../runtime.mjs";
2
+ import {
3
+ VersionFromJSON
4
+ } from "../models";
5
+ export class InformationApi extends runtime.BaseAPI {
6
+ async versionRaw(initOverrides) {
7
+ const queryParameters = {};
8
+ const headerParameters = {};
9
+ const response = await this.request({
10
+ path: `/version`,
11
+ method: "GET",
12
+ headers: headerParameters,
13
+ query: queryParameters
14
+ }, initOverrides);
15
+ return new runtime.JSONApiResponse(response, (jsonValue) => VersionFromJSON(jsonValue));
16
+ }
17
+ async version(initOverrides) {
18
+ const response = await this.versionRaw(initOverrides);
19
+ return await response.value();
20
+ }
21
+ }
@@ -0,0 +1,94 @@
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.2.0
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 { JobConfig, JobInformation, JsonResultBoolean } from '../models';
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): Promise<runtime.ApiResponse<JsonResultBoolean>>;
39
+ /**
40
+ * Delete Job and reload all Job Information
41
+ * Delete Job
42
+ */
43
+ deleteJob(requestParameters: DeleteJobRequest, initOverrides?: RequestInit): Promise<JsonResultBoolean>;
44
+ /**
45
+ * Execute scheduled Job manually
46
+ * Execute Job
47
+ */
48
+ executeJobRaw(requestParameters: ExecuteJobRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<JsonResultBoolean>>;
49
+ /**
50
+ * Execute scheduled Job manually
51
+ * Execute Job
52
+ */
53
+ executeJob(requestParameters: ExecuteJobRequest, initOverrides?: RequestInit): Promise<JsonResultBoolean>;
54
+ /**
55
+ * Returns the List of all registered Jobs with full information
56
+ * Registered Jobs
57
+ */
58
+ jobsListRaw(initOverrides?: RequestInit): 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): Promise<Array<JobInformation>>;
64
+ /**
65
+ * Returns the List of possible job classes
66
+ * Possible Jobs
67
+ */
68
+ possibleJobsListRaw(initOverrides?: RequestInit): Promise<runtime.ApiResponse<Array<string>>>;
69
+ /**
70
+ * Returns the List of possible job classes
71
+ * Possible Jobs
72
+ */
73
+ possibleJobsList(initOverrides?: RequestInit): 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): 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): Promise<JobInformation>;
84
+ /**
85
+ * Add Job and get JobInformation back
86
+ * Update Job
87
+ */
88
+ updateJobRaw(requestParameters: UpdateJobRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<JobInformation>>;
89
+ /**
90
+ * Add Job and get JobInformation back
91
+ * Update Job
92
+ */
93
+ updateJob(requestParameters: UpdateJobRequest, initOverrides?: RequestInit): Promise<JobInformation>;
94
+ }
@@ -0,0 +1,204 @@
1
+ import * as runtime from "../runtime.mjs";
2
+ import {
3
+ JobConfigToJSON,
4
+ JobInformationFromJSON,
5
+ JsonResultBooleanFromJSON
6
+ } from "../models";
7
+ export class JobsApi extends runtime.BaseAPI {
8
+ async deleteJobRaw(requestParameters, initOverrides) {
9
+ if (requestParameters.jobGroup === null || requestParameters.jobGroup === void 0) {
10
+ throw new runtime.RequiredError("jobGroup", "Required parameter requestParameters.jobGroup was null or undefined when calling deleteJob.");
11
+ }
12
+ if (requestParameters.jobName === null || requestParameters.jobName === void 0) {
13
+ throw new runtime.RequiredError("jobName", "Required parameter requestParameters.jobName was null or undefined when calling deleteJob.");
14
+ }
15
+ const queryParameters = {};
16
+ const headerParameters = {};
17
+ if (this.configuration && this.configuration.apiKey) {
18
+ headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
19
+ }
20
+ if (this.configuration && this.configuration.accessToken) {
21
+ const token = this.configuration.accessToken;
22
+ const tokenString = await token("httpAuth", []);
23
+ if (tokenString) {
24
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
25
+ }
26
+ }
27
+ if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
28
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
29
+ }
30
+ const response = await this.request({
31
+ path: `/system/jobs/{jobGroup}/{jobName}`.replace(`{${"jobGroup"}}`, encodeURIComponent(String(requestParameters.jobGroup))).replace(`{${"jobName"}}`, encodeURIComponent(String(requestParameters.jobName))),
32
+ method: "DELETE",
33
+ headers: headerParameters,
34
+ query: queryParameters
35
+ }, initOverrides);
36
+ return new runtime.JSONApiResponse(response, (jsonValue) => JsonResultBooleanFromJSON(jsonValue));
37
+ }
38
+ async deleteJob(requestParameters, initOverrides) {
39
+ const response = await this.deleteJobRaw(requestParameters, initOverrides);
40
+ return await response.value();
41
+ }
42
+ async executeJobRaw(requestParameters, initOverrides) {
43
+ if (requestParameters.jobGroup === null || requestParameters.jobGroup === void 0) {
44
+ throw new runtime.RequiredError("jobGroup", "Required parameter requestParameters.jobGroup was null or undefined when calling executeJob.");
45
+ }
46
+ if (requestParameters.jobName === null || requestParameters.jobName === void 0) {
47
+ throw new runtime.RequiredError("jobName", "Required parameter requestParameters.jobName was null or undefined when calling executeJob.");
48
+ }
49
+ const queryParameters = {};
50
+ const headerParameters = {};
51
+ if (this.configuration && this.configuration.apiKey) {
52
+ headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
53
+ }
54
+ if (this.configuration && this.configuration.accessToken) {
55
+ const token = this.configuration.accessToken;
56
+ const tokenString = await token("httpAuth", []);
57
+ if (tokenString) {
58
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
59
+ }
60
+ }
61
+ if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
62
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
63
+ }
64
+ const response = await this.request({
65
+ path: `/system/jobs/{jobGroup}/{jobName}`.replace(`{${"jobGroup"}}`, encodeURIComponent(String(requestParameters.jobGroup))).replace(`{${"jobName"}}`, encodeURIComponent(String(requestParameters.jobName))),
66
+ method: "POST",
67
+ headers: headerParameters,
68
+ query: queryParameters
69
+ }, initOverrides);
70
+ return new runtime.JSONApiResponse(response, (jsonValue) => JsonResultBooleanFromJSON(jsonValue));
71
+ }
72
+ async executeJob(requestParameters, initOverrides) {
73
+ const response = await this.executeJobRaw(requestParameters, initOverrides);
74
+ return await response.value();
75
+ }
76
+ async jobsListRaw(initOverrides) {
77
+ const queryParameters = {};
78
+ const headerParameters = {};
79
+ if (this.configuration && this.configuration.apiKey) {
80
+ headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
81
+ }
82
+ if (this.configuration && this.configuration.accessToken) {
83
+ const token = this.configuration.accessToken;
84
+ const tokenString = await token("httpAuth", []);
85
+ if (tokenString) {
86
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
87
+ }
88
+ }
89
+ if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
90
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
91
+ }
92
+ const response = await this.request({
93
+ path: `/system/jobs`,
94
+ method: "GET",
95
+ headers: headerParameters,
96
+ query: queryParameters
97
+ }, initOverrides);
98
+ return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(JobInformationFromJSON));
99
+ }
100
+ async jobsList(initOverrides) {
101
+ const response = await this.jobsListRaw(initOverrides);
102
+ return await response.value();
103
+ }
104
+ async possibleJobsListRaw(initOverrides) {
105
+ const queryParameters = {};
106
+ const headerParameters = {};
107
+ if (this.configuration && this.configuration.apiKey) {
108
+ headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
109
+ }
110
+ if (this.configuration && this.configuration.accessToken) {
111
+ const token = this.configuration.accessToken;
112
+ const tokenString = await token("httpAuth", []);
113
+ if (tokenString) {
114
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
115
+ }
116
+ }
117
+ if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
118
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
119
+ }
120
+ const response = await this.request({
121
+ path: `/system/jobs/classes`,
122
+ method: "GET",
123
+ headers: headerParameters,
124
+ query: queryParameters
125
+ }, initOverrides);
126
+ return new runtime.JSONApiResponse(response);
127
+ }
128
+ async possibleJobsList(initOverrides) {
129
+ const response = await this.possibleJobsListRaw(initOverrides);
130
+ return await response.value();
131
+ }
132
+ async registerJobRaw(requestParameters, initOverrides) {
133
+ if (requestParameters.jobConfig === null || requestParameters.jobConfig === void 0) {
134
+ throw new runtime.RequiredError("jobConfig", "Required parameter requestParameters.jobConfig was null or undefined when calling registerJob.");
135
+ }
136
+ const queryParameters = {};
137
+ const headerParameters = {};
138
+ headerParameters["Content-Type"] = "application/json";
139
+ if (this.configuration && this.configuration.apiKey) {
140
+ headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
141
+ }
142
+ if (this.configuration && this.configuration.accessToken) {
143
+ const token = this.configuration.accessToken;
144
+ const tokenString = await token("httpAuth", []);
145
+ if (tokenString) {
146
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
147
+ }
148
+ }
149
+ if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
150
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
151
+ }
152
+ const response = await this.request({
153
+ path: `/system/jobs`,
154
+ method: "PUT",
155
+ headers: headerParameters,
156
+ query: queryParameters,
157
+ body: JobConfigToJSON(requestParameters.jobConfig)
158
+ }, initOverrides);
159
+ return new runtime.JSONApiResponse(response, (jsonValue) => JobInformationFromJSON(jsonValue));
160
+ }
161
+ async registerJob(requestParameters, initOverrides) {
162
+ const response = await this.registerJobRaw(requestParameters, initOverrides);
163
+ return await response.value();
164
+ }
165
+ async updateJobRaw(requestParameters, initOverrides) {
166
+ if (requestParameters.jobGroup === null || requestParameters.jobGroup === void 0) {
167
+ throw new runtime.RequiredError("jobGroup", "Required parameter requestParameters.jobGroup was null or undefined when calling updateJob.");
168
+ }
169
+ if (requestParameters.jobName === null || requestParameters.jobName === void 0) {
170
+ throw new runtime.RequiredError("jobName", "Required parameter requestParameters.jobName was null or undefined when calling updateJob.");
171
+ }
172
+ if (requestParameters.jobConfig === null || requestParameters.jobConfig === void 0) {
173
+ throw new runtime.RequiredError("jobConfig", "Required parameter requestParameters.jobConfig was null or undefined when calling updateJob.");
174
+ }
175
+ const queryParameters = {};
176
+ const headerParameters = {};
177
+ headerParameters["Content-Type"] = "application/json";
178
+ if (this.configuration && this.configuration.apiKey) {
179
+ headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
180
+ }
181
+ if (this.configuration && this.configuration.accessToken) {
182
+ const token = this.configuration.accessToken;
183
+ const tokenString = await token("httpAuth", []);
184
+ if (tokenString) {
185
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
186
+ }
187
+ }
188
+ if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
189
+ headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
190
+ }
191
+ const response = await this.request({
192
+ path: `/system/jobs/{jobGroup}/{jobName}`.replace(`{${"jobGroup"}}`, encodeURIComponent(String(requestParameters.jobGroup))).replace(`{${"jobName"}}`, encodeURIComponent(String(requestParameters.jobName))),
193
+ method: "PATCH",
194
+ headers: headerParameters,
195
+ query: queryParameters,
196
+ body: JobConfigToJSON(requestParameters.jobConfig)
197
+ }, initOverrides);
198
+ return new runtime.JSONApiResponse(response, (jsonValue) => JobInformationFromJSON(jsonValue));
199
+ }
200
+ async updateJob(requestParameters, initOverrides) {
201
+ const response = await this.updateJobRaw(requestParameters, initOverrides);
202
+ return await response.value();
203
+ }
204
+ }
@@ -0,0 +1,11 @@
1
+ export * from './AdminApi';
2
+ export * from './ApplicationApi';
3
+ export * from './AuthApi';
4
+ export * from './BucketApi';
5
+ export * from './CollectionApi';
6
+ export * from './DatabaseApi';
7
+ export * from './DocumentApi';
8
+ export * from './FileApi';
9
+ export * from './IndexApi';
10
+ export * from './InformationApi';
11
+ export * from './JobsApi';