@sfxcode/nuxt-mongocamp-server 1.4.0 → 1.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/module.d.mts +1 -0
- package/dist/module.json +1 -1
- package/dist/module.mjs +3 -3
- package/dist/runtime/api/.openapi-generator/VERSION +1 -1
- package/dist/runtime/api/apis/AdminApi.d.ts +48 -0
- package/dist/runtime/api/apis/AdminApi.js +144 -60
- package/dist/runtime/api/apis/ApplicationApi.d.ts +20 -0
- package/dist/runtime/api/apis/ApplicationApi.js +60 -25
- package/dist/runtime/api/apis/AuthApi.d.ts +32 -0
- package/dist/runtime/api/apis/AuthApi.js +96 -40
- package/dist/runtime/api/apis/BucketApi.d.ts +16 -0
- package/dist/runtime/api/apis/BucketApi.js +48 -20
- package/dist/runtime/api/apis/CollectionApi.d.ts +40 -0
- package/dist/runtime/api/apis/CollectionApi.js +120 -50
- package/dist/runtime/api/apis/DatabaseApi.d.ts +20 -0
- package/dist/runtime/api/apis/DatabaseApi.js +60 -25
- package/dist/runtime/api/apis/DocumentApi.d.ts +40 -0
- package/dist/runtime/api/apis/DocumentApi.js +120 -50
- package/dist/runtime/api/apis/FileApi.d.ts +28 -0
- package/dist/runtime/api/apis/FileApi.js +84 -35
- package/dist/runtime/api/apis/IndexApi.d.ts +32 -0
- package/dist/runtime/api/apis/IndexApi.js +96 -40
- package/dist/runtime/api/apis/InformationApi.d.ts +4 -0
- package/dist/runtime/api/apis/InformationApi.js +12 -5
- package/dist/runtime/api/apis/JobsApi.d.ts +24 -0
- package/dist/runtime/api/apis/JobsApi.js +72 -30
- package/dist/runtime/api/runtime.js +12 -0
- package/dist/runtime/server/composables/mongocampServerApi.js +0 -1
- package/package.json +13 -13
|
@@ -5,10 +5,9 @@ import {
|
|
|
5
5
|
} from "../models/index.js";
|
|
6
6
|
export class DatabaseApi extends runtime.BaseAPI {
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
9
|
-
* List of Database Infos
|
|
8
|
+
* Creates request options for databaseInfos without sending the request
|
|
10
9
|
*/
|
|
11
|
-
async
|
|
10
|
+
async databaseInfosRequestOpts() {
|
|
12
11
|
const queryParameters = {};
|
|
13
12
|
const headerParameters = {};
|
|
14
13
|
if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
|
|
@@ -25,12 +24,20 @@ export class DatabaseApi extends runtime.BaseAPI {
|
|
|
25
24
|
headerParameters["X-AUTH-APIKEY"] = await this.configuration.apiKey("X-AUTH-APIKEY");
|
|
26
25
|
}
|
|
27
26
|
let urlPath = `/mongodb/databases/infos`;
|
|
28
|
-
|
|
27
|
+
return {
|
|
29
28
|
path: urlPath,
|
|
30
29
|
method: "GET",
|
|
31
30
|
headers: headerParameters,
|
|
32
31
|
query: queryParameters
|
|
33
|
-
}
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* List of all Databases Infos
|
|
36
|
+
* List of Database Infos
|
|
37
|
+
*/
|
|
38
|
+
async databaseInfosRaw(initOverrides) {
|
|
39
|
+
const requestOptions = await this.databaseInfosRequestOpts();
|
|
40
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
34
41
|
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(DatabaseInfoFromJSON));
|
|
35
42
|
}
|
|
36
43
|
/**
|
|
@@ -42,10 +49,9 @@ export class DatabaseApi extends runtime.BaseAPI {
|
|
|
42
49
|
return await response.value();
|
|
43
50
|
}
|
|
44
51
|
/**
|
|
45
|
-
*
|
|
46
|
-
* Delete Database
|
|
52
|
+
* Creates request options for deleteDatabase without sending the request
|
|
47
53
|
*/
|
|
48
|
-
async
|
|
54
|
+
async deleteDatabaseRequestOpts(requestParameters) {
|
|
49
55
|
if (requestParameters["databaseName"] == null) {
|
|
50
56
|
throw new runtime.RequiredError(
|
|
51
57
|
"databaseName",
|
|
@@ -69,12 +75,20 @@ export class DatabaseApi extends runtime.BaseAPI {
|
|
|
69
75
|
}
|
|
70
76
|
let urlPath = `/mongodb/databases/{databaseName}`;
|
|
71
77
|
urlPath = urlPath.replace(`{${"databaseName"}}`, encodeURIComponent(String(requestParameters["databaseName"])));
|
|
72
|
-
|
|
78
|
+
return {
|
|
73
79
|
path: urlPath,
|
|
74
80
|
method: "DELETE",
|
|
75
81
|
headers: headerParameters,
|
|
76
82
|
query: queryParameters
|
|
77
|
-
}
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Delete given Database
|
|
87
|
+
* Delete Database
|
|
88
|
+
*/
|
|
89
|
+
async deleteDatabaseRaw(requestParameters, initOverrides) {
|
|
90
|
+
const requestOptions = await this.deleteDatabaseRequestOpts(requestParameters);
|
|
91
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
78
92
|
return new runtime.JSONApiResponse(response, (jsonValue) => JsonValueBooleanFromJSON(jsonValue));
|
|
79
93
|
}
|
|
80
94
|
/**
|
|
@@ -86,10 +100,9 @@ export class DatabaseApi extends runtime.BaseAPI {
|
|
|
86
100
|
return await response.value();
|
|
87
101
|
}
|
|
88
102
|
/**
|
|
89
|
-
*
|
|
90
|
-
* Database Infos of selected Database
|
|
103
|
+
* Creates request options for getDatabaseInfo without sending the request
|
|
91
104
|
*/
|
|
92
|
-
async
|
|
105
|
+
async getDatabaseInfoRequestOpts(requestParameters) {
|
|
93
106
|
if (requestParameters["databaseName"] == null) {
|
|
94
107
|
throw new runtime.RequiredError(
|
|
95
108
|
"databaseName",
|
|
@@ -113,12 +126,20 @@ export class DatabaseApi extends runtime.BaseAPI {
|
|
|
113
126
|
}
|
|
114
127
|
let urlPath = `/mongodb/databases/{databaseName}`;
|
|
115
128
|
urlPath = urlPath.replace(`{${"databaseName"}}`, encodeURIComponent(String(requestParameters["databaseName"])));
|
|
116
|
-
|
|
129
|
+
return {
|
|
117
130
|
path: urlPath,
|
|
118
131
|
method: "GET",
|
|
119
132
|
headers: headerParameters,
|
|
120
133
|
query: queryParameters
|
|
121
|
-
}
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* All Information about given Database
|
|
138
|
+
* Database Infos of selected Database
|
|
139
|
+
*/
|
|
140
|
+
async getDatabaseInfoRaw(requestParameters, initOverrides) {
|
|
141
|
+
const requestOptions = await this.getDatabaseInfoRequestOpts(requestParameters);
|
|
142
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
122
143
|
return new runtime.JSONApiResponse(response, (jsonValue) => DatabaseInfoFromJSON(jsonValue));
|
|
123
144
|
}
|
|
124
145
|
/**
|
|
@@ -130,10 +151,9 @@ export class DatabaseApi extends runtime.BaseAPI {
|
|
|
130
151
|
return await response.value();
|
|
131
152
|
}
|
|
132
153
|
/**
|
|
133
|
-
*
|
|
134
|
-
* List of Collections
|
|
154
|
+
* Creates request options for listCollectionsByDatabase without sending the request
|
|
135
155
|
*/
|
|
136
|
-
async
|
|
156
|
+
async listCollectionsByDatabaseRequestOpts(requestParameters) {
|
|
137
157
|
if (requestParameters["databaseName"] == null) {
|
|
138
158
|
throw new runtime.RequiredError(
|
|
139
159
|
"databaseName",
|
|
@@ -157,12 +177,20 @@ export class DatabaseApi extends runtime.BaseAPI {
|
|
|
157
177
|
}
|
|
158
178
|
let urlPath = `/mongodb/databases/{databaseName}/collections`;
|
|
159
179
|
urlPath = urlPath.replace(`{${"databaseName"}}`, encodeURIComponent(String(requestParameters["databaseName"])));
|
|
160
|
-
|
|
180
|
+
return {
|
|
161
181
|
path: urlPath,
|
|
162
182
|
method: "GET",
|
|
163
183
|
headers: headerParameters,
|
|
164
184
|
query: queryParameters
|
|
165
|
-
}
|
|
185
|
+
};
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* List of all Collections of the given database
|
|
189
|
+
* List of Collections
|
|
190
|
+
*/
|
|
191
|
+
async listCollectionsByDatabaseRaw(requestParameters, initOverrides) {
|
|
192
|
+
const requestOptions = await this.listCollectionsByDatabaseRequestOpts(requestParameters);
|
|
193
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
166
194
|
return new runtime.JSONApiResponse(response);
|
|
167
195
|
}
|
|
168
196
|
/**
|
|
@@ -174,10 +202,9 @@ export class DatabaseApi extends runtime.BaseAPI {
|
|
|
174
202
|
return await response.value();
|
|
175
203
|
}
|
|
176
204
|
/**
|
|
177
|
-
*
|
|
178
|
-
* List of Databases
|
|
205
|
+
* Creates request options for listDatabases without sending the request
|
|
179
206
|
*/
|
|
180
|
-
async
|
|
207
|
+
async listDatabasesRequestOpts() {
|
|
181
208
|
const queryParameters = {};
|
|
182
209
|
const headerParameters = {};
|
|
183
210
|
if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
|
|
@@ -194,12 +221,20 @@ export class DatabaseApi extends runtime.BaseAPI {
|
|
|
194
221
|
headerParameters["X-AUTH-APIKEY"] = await this.configuration.apiKey("X-AUTH-APIKEY");
|
|
195
222
|
}
|
|
196
223
|
let urlPath = `/mongodb/databases`;
|
|
197
|
-
|
|
224
|
+
return {
|
|
198
225
|
path: urlPath,
|
|
199
226
|
method: "GET",
|
|
200
227
|
headers: headerParameters,
|
|
201
228
|
query: queryParameters
|
|
202
|
-
}
|
|
229
|
+
};
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* List of all Databases
|
|
233
|
+
* List of Databases
|
|
234
|
+
*/
|
|
235
|
+
async listDatabasesRaw(initOverrides) {
|
|
236
|
+
const requestOptions = await this.listDatabasesRequestOpts();
|
|
237
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
203
238
|
return new runtime.JSONApiResponse(response);
|
|
204
239
|
}
|
|
205
240
|
/**
|
|
@@ -73,6 +73,10 @@ export interface UpdateManyRequest {
|
|
|
73
73
|
*
|
|
74
74
|
*/
|
|
75
75
|
export declare class DocumentApi extends runtime.BaseAPI {
|
|
76
|
+
/**
|
|
77
|
+
* Creates request options for _delete without sending the request
|
|
78
|
+
*/
|
|
79
|
+
_deleteRequestOpts(requestParameters: DeleteRequest): Promise<runtime.RequestOpts>;
|
|
76
80
|
/**
|
|
77
81
|
* Delete one Document from given Collection
|
|
78
82
|
* Delete Document from Collection
|
|
@@ -83,6 +87,10 @@ export declare class DocumentApi extends runtime.BaseAPI {
|
|
|
83
87
|
* Delete Document from Collection
|
|
84
88
|
*/
|
|
85
89
|
_delete(requestParameters: DeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DeleteResponse>;
|
|
90
|
+
/**
|
|
91
|
+
* Creates request options for deleteMany without sending the request
|
|
92
|
+
*/
|
|
93
|
+
deleteManyRequestOpts(requestParameters: DeleteManyRequest): Promise<runtime.RequestOpts>;
|
|
86
94
|
/**
|
|
87
95
|
* Delete many Document in given Collection
|
|
88
96
|
* Delete Many in Collection
|
|
@@ -93,6 +101,10 @@ export declare class DocumentApi extends runtime.BaseAPI {
|
|
|
93
101
|
* Delete Many in Collection
|
|
94
102
|
*/
|
|
95
103
|
deleteMany(requestParameters: DeleteManyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DeleteResponse>;
|
|
104
|
+
/**
|
|
105
|
+
* Creates request options for find without sending the request
|
|
106
|
+
*/
|
|
107
|
+
findRequestOpts(requestParameters: FindRequest): Promise<runtime.RequestOpts>;
|
|
96
108
|
/**
|
|
97
109
|
* Alternative to GET Route for more complex queries and URL max. Length
|
|
98
110
|
* Documents in Collection
|
|
@@ -107,6 +119,10 @@ export declare class DocumentApi extends runtime.BaseAPI {
|
|
|
107
119
|
find(requestParameters: FindRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<{
|
|
108
120
|
[key: string]: string;
|
|
109
121
|
}>>;
|
|
122
|
+
/**
|
|
123
|
+
* Creates request options for getDocument without sending the request
|
|
124
|
+
*/
|
|
125
|
+
getDocumentRequestOpts(requestParameters: GetDocumentRequest): Promise<runtime.RequestOpts>;
|
|
110
126
|
/**
|
|
111
127
|
* Get one Document from given Collection
|
|
112
128
|
* Document from Collection
|
|
@@ -121,6 +137,10 @@ export declare class DocumentApi extends runtime.BaseAPI {
|
|
|
121
137
|
getDocument(requestParameters: GetDocumentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{
|
|
122
138
|
[key: string]: string;
|
|
123
139
|
}>;
|
|
140
|
+
/**
|
|
141
|
+
* Creates request options for insert without sending the request
|
|
142
|
+
*/
|
|
143
|
+
insertRequestOpts(requestParameters: InsertRequest): Promise<runtime.RequestOpts>;
|
|
124
144
|
/**
|
|
125
145
|
* Insert one Document in given Collection
|
|
126
146
|
* Insert Document
|
|
@@ -131,6 +151,10 @@ export declare class DocumentApi extends runtime.BaseAPI {
|
|
|
131
151
|
* Insert Document
|
|
132
152
|
*/
|
|
133
153
|
insert(requestParameters: InsertRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<InsertResponse>;
|
|
154
|
+
/**
|
|
155
|
+
* Creates request options for insertMany without sending the request
|
|
156
|
+
*/
|
|
157
|
+
insertManyRequestOpts(requestParameters: InsertManyRequest): Promise<runtime.RequestOpts>;
|
|
134
158
|
/**
|
|
135
159
|
* Insert many documents in given Collection
|
|
136
160
|
* Insert many Documents
|
|
@@ -141,6 +165,10 @@ export declare class DocumentApi extends runtime.BaseAPI {
|
|
|
141
165
|
* Insert many Documents
|
|
142
166
|
*/
|
|
143
167
|
insertMany(requestParameters: InsertManyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<InsertResponse>;
|
|
168
|
+
/**
|
|
169
|
+
* Creates request options for listDocuments without sending the request
|
|
170
|
+
*/
|
|
171
|
+
listDocumentsRequestOpts(requestParameters: ListDocumentsRequest): Promise<runtime.RequestOpts>;
|
|
144
172
|
/**
|
|
145
173
|
* Get Documents paginated from given Collection
|
|
146
174
|
* Documents in Collection
|
|
@@ -155,6 +183,10 @@ export declare class DocumentApi extends runtime.BaseAPI {
|
|
|
155
183
|
listDocuments(requestParameters: ListDocumentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<{
|
|
156
184
|
[key: string]: string;
|
|
157
185
|
}>>;
|
|
186
|
+
/**
|
|
187
|
+
* Creates request options for update without sending the request
|
|
188
|
+
*/
|
|
189
|
+
updateRequestOpts(requestParameters: UpdateRequest): Promise<runtime.RequestOpts>;
|
|
158
190
|
/**
|
|
159
191
|
* \'Replace\' one Document with the new document from Request in Collection
|
|
160
192
|
* Update Document in Collection
|
|
@@ -165,6 +197,10 @@ export declare class DocumentApi extends runtime.BaseAPI {
|
|
|
165
197
|
* Update Document in Collection
|
|
166
198
|
*/
|
|
167
199
|
update(requestParameters: UpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UpdateResponse>;
|
|
200
|
+
/**
|
|
201
|
+
* Creates request options for updateDocumentPartial without sending the request
|
|
202
|
+
*/
|
|
203
|
+
updateDocumentPartialRequestOpts(requestParameters: UpdateDocumentPartialRequest): Promise<runtime.RequestOpts>;
|
|
168
204
|
/**
|
|
169
205
|
* Update the document Parts with the values from the Request
|
|
170
206
|
* Update Document Parts in Collection
|
|
@@ -175,6 +211,10 @@ export declare class DocumentApi extends runtime.BaseAPI {
|
|
|
175
211
|
* Update Document Parts in Collection
|
|
176
212
|
*/
|
|
177
213
|
updateDocumentPartial(requestParameters: UpdateDocumentPartialRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UpdateResponse>;
|
|
214
|
+
/**
|
|
215
|
+
* Creates request options for updateMany without sending the request
|
|
216
|
+
*/
|
|
217
|
+
updateManyRequestOpts(requestParameters: UpdateManyRequest): Promise<runtime.RequestOpts>;
|
|
178
218
|
/**
|
|
179
219
|
* Update many Document in given Collection
|
|
180
220
|
* Update many in Collection
|
|
@@ -8,10 +8,9 @@ import {
|
|
|
8
8
|
} from "../models/index.js";
|
|
9
9
|
export class DocumentApi extends runtime.BaseAPI {
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
12
|
-
* Delete Document from Collection
|
|
11
|
+
* Creates request options for _delete without sending the request
|
|
13
12
|
*/
|
|
14
|
-
async
|
|
13
|
+
async _deleteRequestOpts(requestParameters) {
|
|
15
14
|
if (requestParameters["collectionName"] == null) {
|
|
16
15
|
throw new runtime.RequiredError(
|
|
17
16
|
"collectionName",
|
|
@@ -42,12 +41,20 @@ export class DocumentApi extends runtime.BaseAPI {
|
|
|
42
41
|
let urlPath = `/mongodb/collections/{collectionName}/documents/{documentId}`;
|
|
43
42
|
urlPath = urlPath.replace(`{${"collectionName"}}`, encodeURIComponent(String(requestParameters["collectionName"])));
|
|
44
43
|
urlPath = urlPath.replace(`{${"documentId"}}`, encodeURIComponent(String(requestParameters["documentId"])));
|
|
45
|
-
|
|
44
|
+
return {
|
|
46
45
|
path: urlPath,
|
|
47
46
|
method: "DELETE",
|
|
48
47
|
headers: headerParameters,
|
|
49
48
|
query: queryParameters
|
|
50
|
-
}
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Delete one Document from given Collection
|
|
53
|
+
* Delete Document from Collection
|
|
54
|
+
*/
|
|
55
|
+
async _deleteRaw(requestParameters, initOverrides) {
|
|
56
|
+
const requestOptions = await this._deleteRequestOpts(requestParameters);
|
|
57
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
51
58
|
return new runtime.JSONApiResponse(response, (jsonValue) => DeleteResponseFromJSON(jsonValue));
|
|
52
59
|
}
|
|
53
60
|
/**
|
|
@@ -59,10 +66,9 @@ export class DocumentApi extends runtime.BaseAPI {
|
|
|
59
66
|
return await response.value();
|
|
60
67
|
}
|
|
61
68
|
/**
|
|
62
|
-
*
|
|
63
|
-
* Delete Many in Collection
|
|
69
|
+
* Creates request options for deleteMany without sending the request
|
|
64
70
|
*/
|
|
65
|
-
async
|
|
71
|
+
async deleteManyRequestOpts(requestParameters) {
|
|
66
72
|
if (requestParameters["collectionName"] == null) {
|
|
67
73
|
throw new runtime.RequiredError(
|
|
68
74
|
"collectionName",
|
|
@@ -93,13 +99,21 @@ export class DocumentApi extends runtime.BaseAPI {
|
|
|
93
99
|
}
|
|
94
100
|
let urlPath = `/mongodb/collections/{collectionName}/documents/many/delete`;
|
|
95
101
|
urlPath = urlPath.replace(`{${"collectionName"}}`, encodeURIComponent(String(requestParameters["collectionName"])));
|
|
96
|
-
|
|
102
|
+
return {
|
|
97
103
|
path: urlPath,
|
|
98
104
|
method: "DELETE",
|
|
99
105
|
headers: headerParameters,
|
|
100
106
|
query: queryParameters,
|
|
101
107
|
body: requestParameters["requestBody"]
|
|
102
|
-
}
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Delete many Document in given Collection
|
|
112
|
+
* Delete Many in Collection
|
|
113
|
+
*/
|
|
114
|
+
async deleteManyRaw(requestParameters, initOverrides) {
|
|
115
|
+
const requestOptions = await this.deleteManyRequestOpts(requestParameters);
|
|
116
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
103
117
|
return new runtime.JSONApiResponse(response, (jsonValue) => DeleteResponseFromJSON(jsonValue));
|
|
104
118
|
}
|
|
105
119
|
/**
|
|
@@ -111,10 +125,9 @@ export class DocumentApi extends runtime.BaseAPI {
|
|
|
111
125
|
return await response.value();
|
|
112
126
|
}
|
|
113
127
|
/**
|
|
114
|
-
*
|
|
115
|
-
* Documents in Collection
|
|
128
|
+
* Creates request options for find without sending the request
|
|
116
129
|
*/
|
|
117
|
-
async
|
|
130
|
+
async findRequestOpts(requestParameters) {
|
|
118
131
|
if (requestParameters["collectionName"] == null) {
|
|
119
132
|
throw new runtime.RequiredError(
|
|
120
133
|
"collectionName",
|
|
@@ -151,13 +164,21 @@ export class DocumentApi extends runtime.BaseAPI {
|
|
|
151
164
|
}
|
|
152
165
|
let urlPath = `/mongodb/collections/{collectionName}/documents`;
|
|
153
166
|
urlPath = urlPath.replace(`{${"collectionName"}}`, encodeURIComponent(String(requestParameters["collectionName"])));
|
|
154
|
-
|
|
167
|
+
return {
|
|
155
168
|
path: urlPath,
|
|
156
169
|
method: "POST",
|
|
157
170
|
headers: headerParameters,
|
|
158
171
|
query: queryParameters,
|
|
159
172
|
body: MongoFindRequestToJSON(requestParameters["mongoFindRequest"])
|
|
160
|
-
}
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Alternative to GET Route for more complex queries and URL max. Length
|
|
177
|
+
* Documents in Collection
|
|
178
|
+
*/
|
|
179
|
+
async findRaw(requestParameters, initOverrides) {
|
|
180
|
+
const requestOptions = await this.findRequestOpts(requestParameters);
|
|
181
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
161
182
|
return new runtime.JSONApiResponse(response);
|
|
162
183
|
}
|
|
163
184
|
/**
|
|
@@ -169,10 +190,9 @@ export class DocumentApi extends runtime.BaseAPI {
|
|
|
169
190
|
return await response.value();
|
|
170
191
|
}
|
|
171
192
|
/**
|
|
172
|
-
*
|
|
173
|
-
* Document from Collection
|
|
193
|
+
* Creates request options for getDocument without sending the request
|
|
174
194
|
*/
|
|
175
|
-
async
|
|
195
|
+
async getDocumentRequestOpts(requestParameters) {
|
|
176
196
|
if (requestParameters["collectionName"] == null) {
|
|
177
197
|
throw new runtime.RequiredError(
|
|
178
198
|
"collectionName",
|
|
@@ -203,12 +223,20 @@ export class DocumentApi extends runtime.BaseAPI {
|
|
|
203
223
|
let urlPath = `/mongodb/collections/{collectionName}/documents/{documentId}`;
|
|
204
224
|
urlPath = urlPath.replace(`{${"collectionName"}}`, encodeURIComponent(String(requestParameters["collectionName"])));
|
|
205
225
|
urlPath = urlPath.replace(`{${"documentId"}}`, encodeURIComponent(String(requestParameters["documentId"])));
|
|
206
|
-
|
|
226
|
+
return {
|
|
207
227
|
path: urlPath,
|
|
208
228
|
method: "GET",
|
|
209
229
|
headers: headerParameters,
|
|
210
230
|
query: queryParameters
|
|
211
|
-
}
|
|
231
|
+
};
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* Get one Document from given Collection
|
|
235
|
+
* Document from Collection
|
|
236
|
+
*/
|
|
237
|
+
async getDocumentRaw(requestParameters, initOverrides) {
|
|
238
|
+
const requestOptions = await this.getDocumentRequestOpts(requestParameters);
|
|
239
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
212
240
|
return new runtime.JSONApiResponse(response);
|
|
213
241
|
}
|
|
214
242
|
/**
|
|
@@ -220,10 +248,9 @@ export class DocumentApi extends runtime.BaseAPI {
|
|
|
220
248
|
return await response.value();
|
|
221
249
|
}
|
|
222
250
|
/**
|
|
223
|
-
*
|
|
224
|
-
* Insert Document
|
|
251
|
+
* Creates request options for insert without sending the request
|
|
225
252
|
*/
|
|
226
|
-
async
|
|
253
|
+
async insertRequestOpts(requestParameters) {
|
|
227
254
|
if (requestParameters["collectionName"] == null) {
|
|
228
255
|
throw new runtime.RequiredError(
|
|
229
256
|
"collectionName",
|
|
@@ -254,13 +281,21 @@ export class DocumentApi extends runtime.BaseAPI {
|
|
|
254
281
|
}
|
|
255
282
|
let urlPath = `/mongodb/collections/{collectionName}/documents`;
|
|
256
283
|
urlPath = urlPath.replace(`{${"collectionName"}}`, encodeURIComponent(String(requestParameters["collectionName"])));
|
|
257
|
-
|
|
284
|
+
return {
|
|
258
285
|
path: urlPath,
|
|
259
286
|
method: "PUT",
|
|
260
287
|
headers: headerParameters,
|
|
261
288
|
query: queryParameters,
|
|
262
289
|
body: requestParameters["requestBody"]
|
|
263
|
-
}
|
|
290
|
+
};
|
|
291
|
+
}
|
|
292
|
+
/**
|
|
293
|
+
* Insert one Document in given Collection
|
|
294
|
+
* Insert Document
|
|
295
|
+
*/
|
|
296
|
+
async insertRaw(requestParameters, initOverrides) {
|
|
297
|
+
const requestOptions = await this.insertRequestOpts(requestParameters);
|
|
298
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
264
299
|
return new runtime.JSONApiResponse(response, (jsonValue) => InsertResponseFromJSON(jsonValue));
|
|
265
300
|
}
|
|
266
301
|
/**
|
|
@@ -272,10 +307,9 @@ export class DocumentApi extends runtime.BaseAPI {
|
|
|
272
307
|
return await response.value();
|
|
273
308
|
}
|
|
274
309
|
/**
|
|
275
|
-
*
|
|
276
|
-
* Insert many Documents
|
|
310
|
+
* Creates request options for insertMany without sending the request
|
|
277
311
|
*/
|
|
278
|
-
async
|
|
312
|
+
async insertManyRequestOpts(requestParameters) {
|
|
279
313
|
if (requestParameters["collectionName"] == null) {
|
|
280
314
|
throw new runtime.RequiredError(
|
|
281
315
|
"collectionName",
|
|
@@ -300,13 +334,21 @@ export class DocumentApi extends runtime.BaseAPI {
|
|
|
300
334
|
}
|
|
301
335
|
let urlPath = `/mongodb/collections/{collectionName}/documents/many/insert`;
|
|
302
336
|
urlPath = urlPath.replace(`{${"collectionName"}}`, encodeURIComponent(String(requestParameters["collectionName"])));
|
|
303
|
-
|
|
337
|
+
return {
|
|
304
338
|
path: urlPath,
|
|
305
339
|
method: "PUT",
|
|
306
340
|
headers: headerParameters,
|
|
307
341
|
query: queryParameters,
|
|
308
342
|
body: requestParameters["requestBody"]
|
|
309
|
-
}
|
|
343
|
+
};
|
|
344
|
+
}
|
|
345
|
+
/**
|
|
346
|
+
* Insert many documents in given Collection
|
|
347
|
+
* Insert many Documents
|
|
348
|
+
*/
|
|
349
|
+
async insertManyRaw(requestParameters, initOverrides) {
|
|
350
|
+
const requestOptions = await this.insertManyRequestOpts(requestParameters);
|
|
351
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
310
352
|
return new runtime.JSONApiResponse(response, (jsonValue) => InsertResponseFromJSON(jsonValue));
|
|
311
353
|
}
|
|
312
354
|
/**
|
|
@@ -318,10 +360,9 @@ export class DocumentApi extends runtime.BaseAPI {
|
|
|
318
360
|
return await response.value();
|
|
319
361
|
}
|
|
320
362
|
/**
|
|
321
|
-
*
|
|
322
|
-
* Documents in Collection
|
|
363
|
+
* Creates request options for listDocuments without sending the request
|
|
323
364
|
*/
|
|
324
|
-
async
|
|
365
|
+
async listDocumentsRequestOpts(requestParameters) {
|
|
325
366
|
if (requestParameters["collectionName"] == null) {
|
|
326
367
|
throw new runtime.RequiredError(
|
|
327
368
|
"collectionName",
|
|
@@ -360,12 +401,20 @@ export class DocumentApi extends runtime.BaseAPI {
|
|
|
360
401
|
}
|
|
361
402
|
let urlPath = `/mongodb/collections/{collectionName}/documents`;
|
|
362
403
|
urlPath = urlPath.replace(`{${"collectionName"}}`, encodeURIComponent(String(requestParameters["collectionName"])));
|
|
363
|
-
|
|
404
|
+
return {
|
|
364
405
|
path: urlPath,
|
|
365
406
|
method: "GET",
|
|
366
407
|
headers: headerParameters,
|
|
367
408
|
query: queryParameters
|
|
368
|
-
}
|
|
409
|
+
};
|
|
410
|
+
}
|
|
411
|
+
/**
|
|
412
|
+
* Get Documents paginated from given Collection
|
|
413
|
+
* Documents in Collection
|
|
414
|
+
*/
|
|
415
|
+
async listDocumentsRaw(requestParameters, initOverrides) {
|
|
416
|
+
const requestOptions = await this.listDocumentsRequestOpts(requestParameters);
|
|
417
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
369
418
|
return new runtime.JSONApiResponse(response);
|
|
370
419
|
}
|
|
371
420
|
/**
|
|
@@ -377,10 +426,9 @@ export class DocumentApi extends runtime.BaseAPI {
|
|
|
377
426
|
return await response.value();
|
|
378
427
|
}
|
|
379
428
|
/**
|
|
380
|
-
*
|
|
381
|
-
* Update Document in Collection
|
|
429
|
+
* Creates request options for update without sending the request
|
|
382
430
|
*/
|
|
383
|
-
async
|
|
431
|
+
async updateRequestOpts(requestParameters) {
|
|
384
432
|
if (requestParameters["collectionName"] == null) {
|
|
385
433
|
throw new runtime.RequiredError(
|
|
386
434
|
"collectionName",
|
|
@@ -418,13 +466,21 @@ export class DocumentApi extends runtime.BaseAPI {
|
|
|
418
466
|
let urlPath = `/mongodb/collections/{collectionName}/documents/{documentId}`;
|
|
419
467
|
urlPath = urlPath.replace(`{${"collectionName"}}`, encodeURIComponent(String(requestParameters["collectionName"])));
|
|
420
468
|
urlPath = urlPath.replace(`{${"documentId"}}`, encodeURIComponent(String(requestParameters["documentId"])));
|
|
421
|
-
|
|
469
|
+
return {
|
|
422
470
|
path: urlPath,
|
|
423
471
|
method: "PATCH",
|
|
424
472
|
headers: headerParameters,
|
|
425
473
|
query: queryParameters,
|
|
426
474
|
body: requestParameters["requestBody"]
|
|
427
|
-
}
|
|
475
|
+
};
|
|
476
|
+
}
|
|
477
|
+
/**
|
|
478
|
+
* \'Replace\' one Document with the new document from Request in Collection
|
|
479
|
+
* Update Document in Collection
|
|
480
|
+
*/
|
|
481
|
+
async updateRaw(requestParameters, initOverrides) {
|
|
482
|
+
const requestOptions = await this.updateRequestOpts(requestParameters);
|
|
483
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
428
484
|
return new runtime.JSONApiResponse(response, (jsonValue) => UpdateResponseFromJSON(jsonValue));
|
|
429
485
|
}
|
|
430
486
|
/**
|
|
@@ -436,10 +492,9 @@ export class DocumentApi extends runtime.BaseAPI {
|
|
|
436
492
|
return await response.value();
|
|
437
493
|
}
|
|
438
494
|
/**
|
|
439
|
-
*
|
|
440
|
-
* Update Document Parts in Collection
|
|
495
|
+
* Creates request options for updateDocumentPartial without sending the request
|
|
441
496
|
*/
|
|
442
|
-
async
|
|
497
|
+
async updateDocumentPartialRequestOpts(requestParameters) {
|
|
443
498
|
if (requestParameters["collectionName"] == null) {
|
|
444
499
|
throw new runtime.RequiredError(
|
|
445
500
|
"collectionName",
|
|
@@ -477,13 +532,21 @@ export class DocumentApi extends runtime.BaseAPI {
|
|
|
477
532
|
let urlPath = `/mongodb/collections/{collectionName}/documents/{documentId}/partial`;
|
|
478
533
|
urlPath = urlPath.replace(`{${"collectionName"}}`, encodeURIComponent(String(requestParameters["collectionName"])));
|
|
479
534
|
urlPath = urlPath.replace(`{${"documentId"}}`, encodeURIComponent(String(requestParameters["documentId"])));
|
|
480
|
-
|
|
535
|
+
return {
|
|
481
536
|
path: urlPath,
|
|
482
537
|
method: "PATCH",
|
|
483
538
|
headers: headerParameters,
|
|
484
539
|
query: queryParameters,
|
|
485
540
|
body: requestParameters["requestBody"]
|
|
486
|
-
}
|
|
541
|
+
};
|
|
542
|
+
}
|
|
543
|
+
/**
|
|
544
|
+
* Update the document Parts with the values from the Request
|
|
545
|
+
* Update Document Parts in Collection
|
|
546
|
+
*/
|
|
547
|
+
async updateDocumentPartialRaw(requestParameters, initOverrides) {
|
|
548
|
+
const requestOptions = await this.updateDocumentPartialRequestOpts(requestParameters);
|
|
549
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
487
550
|
return new runtime.JSONApiResponse(response, (jsonValue) => UpdateResponseFromJSON(jsonValue));
|
|
488
551
|
}
|
|
489
552
|
/**
|
|
@@ -495,10 +558,9 @@ export class DocumentApi extends runtime.BaseAPI {
|
|
|
495
558
|
return await response.value();
|
|
496
559
|
}
|
|
497
560
|
/**
|
|
498
|
-
*
|
|
499
|
-
* Update many in Collection
|
|
561
|
+
* Creates request options for updateMany without sending the request
|
|
500
562
|
*/
|
|
501
|
-
async
|
|
563
|
+
async updateManyRequestOpts(requestParameters) {
|
|
502
564
|
if (requestParameters["collectionName"] == null) {
|
|
503
565
|
throw new runtime.RequiredError(
|
|
504
566
|
"collectionName",
|
|
@@ -529,13 +591,21 @@ export class DocumentApi extends runtime.BaseAPI {
|
|
|
529
591
|
}
|
|
530
592
|
let urlPath = `/mongodb/collections/{collectionName}/documents/many/update`;
|
|
531
593
|
urlPath = urlPath.replace(`{${"collectionName"}}`, encodeURIComponent(String(requestParameters["collectionName"])));
|
|
532
|
-
|
|
594
|
+
return {
|
|
533
595
|
path: urlPath,
|
|
534
596
|
method: "PATCH",
|
|
535
597
|
headers: headerParameters,
|
|
536
598
|
query: queryParameters,
|
|
537
599
|
body: UpdateRequestToJSON(requestParameters["updateRequest"])
|
|
538
|
-
}
|
|
600
|
+
};
|
|
601
|
+
}
|
|
602
|
+
/**
|
|
603
|
+
* Update many Document in given Collection
|
|
604
|
+
* Update many in Collection
|
|
605
|
+
*/
|
|
606
|
+
async updateManyRaw(requestParameters, initOverrides) {
|
|
607
|
+
const requestOptions = await this.updateManyRequestOpts(requestParameters);
|
|
608
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
539
609
|
return new runtime.JSONApiResponse(response, (jsonValue) => UpdateResponseFromJSON(jsonValue));
|
|
540
610
|
}
|
|
541
611
|
/**
|