@sfxcode/nuxt-mongocamp-server 1.6.3 → 1.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.
- package/dist/module.json +1 -1
- package/dist/module.mjs +1 -1
- package/dist/runtime/api/.openapi-generator/FILES +12 -0
- package/dist/runtime/api/apis/AdminApi.d.ts +1 -1
- package/dist/runtime/api/apis/ApplicationApi.d.ts +1 -1
- package/dist/runtime/api/apis/AuthApi.d.ts +19 -2
- package/dist/runtime/api/apis/AuthApi.js +48 -0
- package/dist/runtime/api/apis/BucketApi.d.ts +1 -1
- package/dist/runtime/api/apis/CollectionApi.d.ts +22 -4
- package/dist/runtime/api/apis/CollectionApi.js +53 -2
- package/dist/runtime/api/apis/DatabaseApi.d.ts +1 -1
- package/dist/runtime/api/apis/DocumentApi.d.ts +47 -2
- package/dist/runtime/api/apis/DocumentApi.js +130 -0
- package/dist/runtime/api/apis/FileApi.d.ts +1 -1
- package/dist/runtime/api/apis/IndexApi.d.ts +19 -2
- package/dist/runtime/api/apis/IndexApi.js +52 -0
- package/dist/runtime/api/apis/JobsApi.d.ts +1 -1
- package/dist/runtime/api/apis/SystemApi.d.ts +1 -1
- package/dist/runtime/api/docs/AuthApi.md +78 -0
- package/dist/runtime/api/docs/CollectionApi.md +83 -2
- package/dist/runtime/api/docs/CollectionPermission.md +40 -0
- package/dist/runtime/api/docs/CollectionSummary.md +50 -0
- package/dist/runtime/api/docs/CountResponse.md +34 -0
- package/dist/runtime/api/docs/DocumentApi.md +183 -5
- package/dist/runtime/api/docs/IndexApi.md +78 -0
- package/dist/runtime/api/docs/IndexUsage.md +40 -0
- package/dist/runtime/api/docs/InsertError.md +38 -0
- package/dist/runtime/api/docs/InsertResponse.md +4 -0
- package/dist/runtime/api/docs/SearchRequest.md +38 -0
- package/dist/runtime/api/models/BucketInformation.d.ts +1 -1
- package/dist/runtime/api/models/ClusterInformation.d.ts +1 -1
- package/dist/runtime/api/models/ClusterMemberInformation.d.ts +1 -1
- package/dist/runtime/api/models/CollectionPermission.d.ts +50 -0
- package/dist/runtime/api/models/CollectionPermission.js +35 -0
- package/dist/runtime/api/models/CollectionStatus.d.ts +1 -1
- package/dist/runtime/api/models/CollectionSummary.d.ts +80 -0
- package/dist/runtime/api/models/CollectionSummary.js +50 -0
- package/dist/runtime/api/models/CountResponse.d.ts +32 -0
- package/dist/runtime/api/models/CountResponse.js +26 -0
- package/dist/runtime/api/models/DatabaseInfo.d.ts +1 -1
- package/dist/runtime/api/models/DeleteResponse.d.ts +1 -1
- package/dist/runtime/api/models/ErrorDescription.d.ts +1 -1
- package/dist/runtime/api/models/FileInformation.d.ts +1 -1
- package/dist/runtime/api/models/Grant.d.ts +1 -1
- package/dist/runtime/api/models/IndexCreateRequest.d.ts +1 -1
- package/dist/runtime/api/models/IndexCreateResponse.d.ts +1 -1
- package/dist/runtime/api/models/IndexDropResponse.d.ts +1 -1
- package/dist/runtime/api/models/IndexOptionsRequest.d.ts +1 -1
- package/dist/runtime/api/models/IndexUsage.d.ts +52 -0
- package/dist/runtime/api/models/IndexUsage.js +35 -0
- package/dist/runtime/api/models/InsertError.d.ts +44 -0
- package/dist/runtime/api/models/InsertError.js +32 -0
- package/dist/runtime/api/models/InsertResponse.d.ts +14 -1
- package/dist/runtime/api/models/InsertResponse.js +10 -2
- package/dist/runtime/api/models/JobConfig.d.ts +1 -1
- package/dist/runtime/api/models/JobInformation.d.ts +1 -1
- package/dist/runtime/api/models/JsonSchema.d.ts +1 -1
- package/dist/runtime/api/models/JsonSchemaDefinition.d.ts +1 -1
- package/dist/runtime/api/models/JsonValueAny.d.ts +1 -1
- package/dist/runtime/api/models/JsonValueBoolean.d.ts +1 -1
- package/dist/runtime/api/models/JsonValueString.d.ts +1 -1
- package/dist/runtime/api/models/Login.d.ts +1 -1
- package/dist/runtime/api/models/LoginResult.d.ts +1 -1
- package/dist/runtime/api/models/MongoAggregateRequest.d.ts +1 -1
- package/dist/runtime/api/models/MongoCampConfiguration.d.ts +1 -1
- package/dist/runtime/api/models/MongoFindRequest.d.ts +1 -1
- package/dist/runtime/api/models/MongoIndex.d.ts +1 -1
- package/dist/runtime/api/models/PasswordUpdateRequest.d.ts +1 -1
- package/dist/runtime/api/models/PipelineStage.d.ts +1 -1
- package/dist/runtime/api/models/Role.d.ts +1 -1
- package/dist/runtime/api/models/SchemaAnalysis.d.ts +1 -1
- package/dist/runtime/api/models/SchemaAnalysisField.d.ts +1 -1
- package/dist/runtime/api/models/SchemaAnalysisFieldType.d.ts +1 -1
- package/dist/runtime/api/models/SearchRequest.d.ts +44 -0
- package/dist/runtime/api/models/SearchRequest.js +29 -0
- package/dist/runtime/api/models/SettingsResponse.d.ts +1 -1
- package/dist/runtime/api/models/UpdateFileInformationRequest.d.ts +1 -1
- package/dist/runtime/api/models/UpdateRequest.d.ts +1 -1
- package/dist/runtime/api/models/UpdateResponse.d.ts +1 -1
- package/dist/runtime/api/models/UpdateRoleRequest.d.ts +1 -1
- package/dist/runtime/api/models/UserInformation.d.ts +1 -1
- package/dist/runtime/api/models/UserProfile.d.ts +1 -1
- package/dist/runtime/api/models/Version.d.ts +1 -1
- package/dist/runtime/api/models/index.d.ts +6 -0
- package/dist/runtime/api/models/index.js +6 -0
- package/dist/runtime/api/runtime.d.ts +1 -1
- package/package.json +7 -7
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -18,7 +18,10 @@ docs/BucketInformation.md
|
|
|
18
18
|
docs/ClusterInformation.md
|
|
19
19
|
docs/ClusterMemberInformation.md
|
|
20
20
|
docs/CollectionApi.md
|
|
21
|
+
docs/CollectionPermission.md
|
|
21
22
|
docs/CollectionStatus.md
|
|
23
|
+
docs/CollectionSummary.md
|
|
24
|
+
docs/CountResponse.md
|
|
22
25
|
docs/DatabaseApi.md
|
|
23
26
|
docs/DatabaseInfo.md
|
|
24
27
|
docs/DeleteResponse.md
|
|
@@ -32,6 +35,8 @@ docs/IndexCreateRequest.md
|
|
|
32
35
|
docs/IndexCreateResponse.md
|
|
33
36
|
docs/IndexDropResponse.md
|
|
34
37
|
docs/IndexOptionsRequest.md
|
|
38
|
+
docs/IndexUsage.md
|
|
39
|
+
docs/InsertError.md
|
|
35
40
|
docs/InsertResponse.md
|
|
36
41
|
docs/JobConfig.md
|
|
37
42
|
docs/JobInformation.md
|
|
@@ -53,6 +58,7 @@ docs/Role.md
|
|
|
53
58
|
docs/SchemaAnalysis.md
|
|
54
59
|
docs/SchemaAnalysisField.md
|
|
55
60
|
docs/SchemaAnalysisFieldType.md
|
|
61
|
+
docs/SearchRequest.md
|
|
56
62
|
docs/SettingsResponse.md
|
|
57
63
|
docs/SystemApi.md
|
|
58
64
|
docs/UpdateFileInformationRequest.md
|
|
@@ -66,7 +72,10 @@ index.ts
|
|
|
66
72
|
models/BucketInformation.ts
|
|
67
73
|
models/ClusterInformation.ts
|
|
68
74
|
models/ClusterMemberInformation.ts
|
|
75
|
+
models/CollectionPermission.ts
|
|
69
76
|
models/CollectionStatus.ts
|
|
77
|
+
models/CollectionSummary.ts
|
|
78
|
+
models/CountResponse.ts
|
|
70
79
|
models/DatabaseInfo.ts
|
|
71
80
|
models/DeleteResponse.ts
|
|
72
81
|
models/ErrorDescription.ts
|
|
@@ -76,6 +85,8 @@ models/IndexCreateRequest.ts
|
|
|
76
85
|
models/IndexCreateResponse.ts
|
|
77
86
|
models/IndexDropResponse.ts
|
|
78
87
|
models/IndexOptionsRequest.ts
|
|
88
|
+
models/IndexUsage.ts
|
|
89
|
+
models/InsertError.ts
|
|
79
90
|
models/InsertResponse.ts
|
|
80
91
|
models/JobConfig.ts
|
|
81
92
|
models/JobInformation.ts
|
|
@@ -96,6 +107,7 @@ models/Role.ts
|
|
|
96
107
|
models/SchemaAnalysis.ts
|
|
97
108
|
models/SchemaAnalysisField.ts
|
|
98
109
|
models/SchemaAnalysisFieldType.ts
|
|
110
|
+
models/SearchRequest.ts
|
|
99
111
|
models/SettingsResponse.ts
|
|
100
112
|
models/UpdateFileInformationRequest.ts
|
|
101
113
|
models/UpdateRequest.ts
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* mongocamp-library
|
|
3
3
|
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 1.
|
|
5
|
+
* The version of the OpenAPI document: 1.7.1
|
|
6
6
|
*
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* mongocamp-library
|
|
3
3
|
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 1.
|
|
5
|
+
* The version of the OpenAPI document: 1.7.1
|
|
6
6
|
*
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* mongocamp-library
|
|
3
3
|
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 1.
|
|
5
|
+
* The version of the OpenAPI document: 1.7.1
|
|
6
6
|
*
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -10,13 +10,16 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime.js';
|
|
13
|
-
import type { JsonValueBoolean, JsonValueString, Login, LoginResult, PasswordUpdateRequest, UserProfile } from '../models/index.js';
|
|
13
|
+
import type { CollectionPermission, JsonValueBoolean, JsonValueString, Login, LoginResult, PasswordUpdateRequest, UserProfile } from '../models/index.js';
|
|
14
14
|
export interface LoginRequest {
|
|
15
15
|
login: Login;
|
|
16
16
|
}
|
|
17
17
|
export interface UpdatePasswordRequest {
|
|
18
18
|
passwordUpdateRequest: PasswordUpdateRequest;
|
|
19
19
|
}
|
|
20
|
+
export interface UserPermissionsRequest {
|
|
21
|
+
collection?: string;
|
|
22
|
+
}
|
|
20
23
|
/**
|
|
21
24
|
*
|
|
22
25
|
*/
|
|
@@ -119,6 +122,20 @@ export declare class AuthApi extends runtime.BaseAPI {
|
|
|
119
122
|
* Update Password
|
|
120
123
|
*/
|
|
121
124
|
updatePassword(requestParameters: UpdatePasswordRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<JsonValueBoolean>;
|
|
125
|
+
/**
|
|
126
|
+
* Creates request options for userPermissions without sending the request
|
|
127
|
+
*/
|
|
128
|
+
userPermissionsRequestOpts(requestParameters: UserPermissionsRequest): Promise<runtime.RequestOpts>;
|
|
129
|
+
/**
|
|
130
|
+
* Return the resolved rights (read, write, administrate) of the loggedin user for the collections of the default database
|
|
131
|
+
* Collection permissions
|
|
132
|
+
*/
|
|
133
|
+
userPermissionsRaw(requestParameters: UserPermissionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<CollectionPermission>>>;
|
|
134
|
+
/**
|
|
135
|
+
* Return the resolved rights (read, write, administrate) of the loggedin user for the collections of the default database
|
|
136
|
+
* Collection permissions
|
|
137
|
+
*/
|
|
138
|
+
userPermissions(requestParameters?: UserPermissionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<CollectionPermission>>;
|
|
122
139
|
/**
|
|
123
140
|
* Creates request options for userProfile without sending the request
|
|
124
141
|
*/
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as runtime from "../runtime.js";
|
|
2
2
|
import {
|
|
3
|
+
CollectionPermissionFromJSON,
|
|
3
4
|
JsonValueBooleanFromJSON,
|
|
4
5
|
JsonValueStringFromJSON,
|
|
5
6
|
LoginToJSON,
|
|
@@ -319,6 +320,53 @@ export class AuthApi extends runtime.BaseAPI {
|
|
|
319
320
|
const response = await this.updatePasswordRaw(requestParameters, initOverrides);
|
|
320
321
|
return await response.value();
|
|
321
322
|
}
|
|
323
|
+
/**
|
|
324
|
+
* Creates request options for userPermissions without sending the request
|
|
325
|
+
*/
|
|
326
|
+
async userPermissionsRequestOpts(requestParameters) {
|
|
327
|
+
const queryParameters = {};
|
|
328
|
+
if (requestParameters["collection"] != null) {
|
|
329
|
+
queryParameters["collection"] = requestParameters["collection"];
|
|
330
|
+
}
|
|
331
|
+
const headerParameters = {};
|
|
332
|
+
if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
|
|
333
|
+
headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
|
|
334
|
+
}
|
|
335
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
336
|
+
const token = this.configuration.accessToken;
|
|
337
|
+
const tokenString = await token("httpAuth", []);
|
|
338
|
+
if (tokenString) {
|
|
339
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
343
|
+
headerParameters["X-AUTH-APIKEY"] = await this.configuration.apiKey("X-AUTH-APIKEY");
|
|
344
|
+
}
|
|
345
|
+
let urlPath = `/auth/permissions`;
|
|
346
|
+
return {
|
|
347
|
+
path: urlPath,
|
|
348
|
+
method: "GET",
|
|
349
|
+
headers: headerParameters,
|
|
350
|
+
query: queryParameters
|
|
351
|
+
};
|
|
352
|
+
}
|
|
353
|
+
/**
|
|
354
|
+
* Return the resolved rights (read, write, administrate) of the loggedin user for the collections of the default database
|
|
355
|
+
* Collection permissions
|
|
356
|
+
*/
|
|
357
|
+
async userPermissionsRaw(requestParameters, initOverrides) {
|
|
358
|
+
const requestOptions = await this.userPermissionsRequestOpts(requestParameters);
|
|
359
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
360
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(CollectionPermissionFromJSON));
|
|
361
|
+
}
|
|
362
|
+
/**
|
|
363
|
+
* Return the resolved rights (read, write, administrate) of the loggedin user for the collections of the default database
|
|
364
|
+
* Collection permissions
|
|
365
|
+
*/
|
|
366
|
+
async userPermissions(requestParameters = {}, initOverrides) {
|
|
367
|
+
const response = await this.userPermissionsRaw(requestParameters, initOverrides);
|
|
368
|
+
return await response.value();
|
|
369
|
+
}
|
|
322
370
|
/**
|
|
323
371
|
* Creates request options for userProfile without sending the request
|
|
324
372
|
*/
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* mongocamp-library
|
|
3
3
|
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 1.
|
|
5
|
+
* The version of the OpenAPI document: 1.7.1
|
|
6
6
|
*
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* mongocamp-library
|
|
3
3
|
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 1.
|
|
5
|
+
* The version of the OpenAPI document: 1.7.1
|
|
6
6
|
*
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -10,12 +10,13 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime.js';
|
|
13
|
-
import type { CollectionStatus, JsonSchema, JsonValueBoolean, MongoAggregateRequest, SchemaAnalysis } from '../models/index.js';
|
|
13
|
+
import type { CollectionStatus, CollectionSummary, JsonSchema, JsonValueBoolean, MongoAggregateRequest, SchemaAnalysis } from '../models/index.js';
|
|
14
14
|
export interface AggregateRequest {
|
|
15
15
|
collectionName: string;
|
|
16
16
|
mongoAggregateRequest: MongoAggregateRequest;
|
|
17
17
|
rowsPerPage?: number;
|
|
18
18
|
page?: number;
|
|
19
|
+
filter?: string;
|
|
19
20
|
}
|
|
20
21
|
export interface ClearCollectionRequest {
|
|
21
22
|
collectionName: string;
|
|
@@ -47,6 +48,9 @@ export interface GetSchemaAnalysisRequest {
|
|
|
47
48
|
sampleSize?: number;
|
|
48
49
|
deepth?: number;
|
|
49
50
|
}
|
|
51
|
+
export interface ListCollectionInformationRequest {
|
|
52
|
+
name?: Array<string>;
|
|
53
|
+
}
|
|
50
54
|
export interface ListCollectionsByDatabaseRequest {
|
|
51
55
|
databaseName: string;
|
|
52
56
|
}
|
|
@@ -59,14 +63,14 @@ export declare class CollectionApi extends runtime.BaseAPI {
|
|
|
59
63
|
*/
|
|
60
64
|
aggregateRequestOpts(requestParameters: AggregateRequest): Promise<runtime.RequestOpts>;
|
|
61
65
|
/**
|
|
62
|
-
* Aggregate in a given Collection. The value of a stage is any JSON value. Operators that run JavaScript on the database server or write to collections (`$function`, `$accumulator`, `$where`, `$out`, `$merge`, `$currentOp`, `$listSessions` by default, configured with AGGREGATION_STAGES_DENIED) are refused with 403.
|
|
66
|
+
* Aggregate in a given Collection. The value of a stage is any JSON value. Operators that run JavaScript on the database server or write to collections (`$function`, `$accumulator`, `$where`, `$out`, `$merge`, `$currentOp`, `$listSessions`, `$collStats`, `$indexStats` by default, configured with AGGREGATION_STAGES_DENIED) are refused with 403.
|
|
63
67
|
* Aggregate in Collection
|
|
64
68
|
*/
|
|
65
69
|
aggregateRaw(requestParameters: AggregateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<{
|
|
66
70
|
[key: string]: any;
|
|
67
71
|
}>>>;
|
|
68
72
|
/**
|
|
69
|
-
* Aggregate in a given Collection. The value of a stage is any JSON value. Operators that run JavaScript on the database server or write to collections (`$function`, `$accumulator`, `$where`, `$out`, `$merge`, `$currentOp`, `$listSessions` by default, configured with AGGREGATION_STAGES_DENIED) are refused with 403.
|
|
73
|
+
* Aggregate in a given Collection. The value of a stage is any JSON value. Operators that run JavaScript on the database server or write to collections (`$function`, `$accumulator`, `$where`, `$out`, `$merge`, `$currentOp`, `$listSessions`, `$collStats`, `$indexStats` by default, configured with AGGREGATION_STAGES_DENIED) are refused with 403.
|
|
70
74
|
* Aggregate in Collection
|
|
71
75
|
*/
|
|
72
76
|
aggregate(requestParameters: AggregateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<{
|
|
@@ -170,6 +174,20 @@ export declare class CollectionApi extends runtime.BaseAPI {
|
|
|
170
174
|
* Collection Fields
|
|
171
175
|
*/
|
|
172
176
|
getSchemaAnalysis(requestParameters: GetSchemaAnalysisRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SchemaAnalysis>;
|
|
177
|
+
/**
|
|
178
|
+
* Creates request options for listCollectionInformation without sending the request
|
|
179
|
+
*/
|
|
180
|
+
listCollectionInformationRequestOpts(requestParameters: ListCollectionInformationRequest): Promise<runtime.RequestOpts>;
|
|
181
|
+
/**
|
|
182
|
+
* The numbers of all Collections of the default database that the user may read in one request (count, size, storage size, average size of a document, number and size of the indices). A Collection without statistics, for example a view, is listed with available false.
|
|
183
|
+
* Information of all Collections
|
|
184
|
+
*/
|
|
185
|
+
listCollectionInformationRaw(requestParameters: ListCollectionInformationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<CollectionSummary>>>;
|
|
186
|
+
/**
|
|
187
|
+
* The numbers of all Collections of the default database that the user may read in one request (count, size, storage size, average size of a document, number and size of the indices). A Collection without statistics, for example a view, is listed with available false.
|
|
188
|
+
* Information of all Collections
|
|
189
|
+
*/
|
|
190
|
+
listCollectionInformation(requestParameters?: ListCollectionInformationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<CollectionSummary>>;
|
|
173
191
|
/**
|
|
174
192
|
* Creates request options for listCollections without sending the request
|
|
175
193
|
*/
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as runtime from "../runtime.js";
|
|
2
2
|
import {
|
|
3
3
|
CollectionStatusFromJSON,
|
|
4
|
+
CollectionSummaryFromJSON,
|
|
4
5
|
JsonSchemaFromJSON,
|
|
5
6
|
JsonValueBooleanFromJSON,
|
|
6
7
|
MongoAggregateRequestToJSON,
|
|
@@ -30,6 +31,9 @@ export class CollectionApi extends runtime.BaseAPI {
|
|
|
30
31
|
if (requestParameters["page"] != null) {
|
|
31
32
|
queryParameters["page"] = requestParameters["page"];
|
|
32
33
|
}
|
|
34
|
+
if (requestParameters["filter"] != null) {
|
|
35
|
+
queryParameters["filter"] = requestParameters["filter"];
|
|
36
|
+
}
|
|
33
37
|
const headerParameters = {};
|
|
34
38
|
headerParameters["Content-Type"] = "application/json";
|
|
35
39
|
if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
|
|
@@ -56,7 +60,7 @@ export class CollectionApi extends runtime.BaseAPI {
|
|
|
56
60
|
};
|
|
57
61
|
}
|
|
58
62
|
/**
|
|
59
|
-
* Aggregate in a given Collection. The value of a stage is any JSON value. Operators that run JavaScript on the database server or write to collections (`$function`, `$accumulator`, `$where`, `$out`, `$merge`, `$currentOp`, `$listSessions` by default, configured with AGGREGATION_STAGES_DENIED) are refused with 403.
|
|
63
|
+
* Aggregate in a given Collection. The value of a stage is any JSON value. Operators that run JavaScript on the database server or write to collections (`$function`, `$accumulator`, `$where`, `$out`, `$merge`, `$currentOp`, `$listSessions`, `$collStats`, `$indexStats` by default, configured with AGGREGATION_STAGES_DENIED) are refused with 403.
|
|
60
64
|
* Aggregate in Collection
|
|
61
65
|
*/
|
|
62
66
|
async aggregateRaw(requestParameters, initOverrides) {
|
|
@@ -65,7 +69,7 @@ export class CollectionApi extends runtime.BaseAPI {
|
|
|
65
69
|
return new runtime.JSONApiResponse(response);
|
|
66
70
|
}
|
|
67
71
|
/**
|
|
68
|
-
* Aggregate in a given Collection. The value of a stage is any JSON value. Operators that run JavaScript on the database server or write to collections (`$function`, `$accumulator`, `$where`, `$out`, `$merge`, `$currentOp`, `$listSessions` by default, configured with AGGREGATION_STAGES_DENIED) are refused with 403.
|
|
72
|
+
* Aggregate in a given Collection. The value of a stage is any JSON value. Operators that run JavaScript on the database server or write to collections (`$function`, `$accumulator`, `$where`, `$out`, `$merge`, `$currentOp`, `$listSessions`, `$collStats`, `$indexStats` by default, configured with AGGREGATION_STAGES_DENIED) are refused with 403.
|
|
69
73
|
* Aggregate in Collection
|
|
70
74
|
*/
|
|
71
75
|
async aggregate(requestParameters, initOverrides) {
|
|
@@ -460,6 +464,53 @@ export class CollectionApi extends runtime.BaseAPI {
|
|
|
460
464
|
const response = await this.getSchemaAnalysisRaw(requestParameters, initOverrides);
|
|
461
465
|
return await response.value();
|
|
462
466
|
}
|
|
467
|
+
/**
|
|
468
|
+
* Creates request options for listCollectionInformation without sending the request
|
|
469
|
+
*/
|
|
470
|
+
async listCollectionInformationRequestOpts(requestParameters) {
|
|
471
|
+
const queryParameters = {};
|
|
472
|
+
if (requestParameters["name"] != null) {
|
|
473
|
+
queryParameters["name"] = requestParameters["name"];
|
|
474
|
+
}
|
|
475
|
+
const headerParameters = {};
|
|
476
|
+
if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
|
|
477
|
+
headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
|
|
478
|
+
}
|
|
479
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
480
|
+
const token = this.configuration.accessToken;
|
|
481
|
+
const tokenString = await token("httpAuth", []);
|
|
482
|
+
if (tokenString) {
|
|
483
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
487
|
+
headerParameters["X-AUTH-APIKEY"] = await this.configuration.apiKey("X-AUTH-APIKEY");
|
|
488
|
+
}
|
|
489
|
+
let urlPath = `/mongodb/collections/info`;
|
|
490
|
+
return {
|
|
491
|
+
path: urlPath,
|
|
492
|
+
method: "GET",
|
|
493
|
+
headers: headerParameters,
|
|
494
|
+
query: queryParameters
|
|
495
|
+
};
|
|
496
|
+
}
|
|
497
|
+
/**
|
|
498
|
+
* The numbers of all Collections of the default database that the user may read in one request (count, size, storage size, average size of a document, number and size of the indices). A Collection without statistics, for example a view, is listed with available false.
|
|
499
|
+
* Information of all Collections
|
|
500
|
+
*/
|
|
501
|
+
async listCollectionInformationRaw(requestParameters, initOverrides) {
|
|
502
|
+
const requestOptions = await this.listCollectionInformationRequestOpts(requestParameters);
|
|
503
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
504
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(CollectionSummaryFromJSON));
|
|
505
|
+
}
|
|
506
|
+
/**
|
|
507
|
+
* The numbers of all Collections of the default database that the user may read in one request (count, size, storage size, average size of a document, number and size of the indices). A Collection without statistics, for example a view, is listed with available false.
|
|
508
|
+
* Information of all Collections
|
|
509
|
+
*/
|
|
510
|
+
async listCollectionInformation(requestParameters = {}, initOverrides) {
|
|
511
|
+
const response = await this.listCollectionInformationRaw(requestParameters, initOverrides);
|
|
512
|
+
return await response.value();
|
|
513
|
+
}
|
|
463
514
|
/**
|
|
464
515
|
* Creates request options for listCollections without sending the request
|
|
465
516
|
*/
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* mongocamp-library
|
|
3
3
|
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 1.
|
|
5
|
+
* The version of the OpenAPI document: 1.7.1
|
|
6
6
|
*
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* mongocamp-library
|
|
3
3
|
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 1.
|
|
5
|
+
* The version of the OpenAPI document: 1.7.1
|
|
6
6
|
*
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -10,17 +10,22 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime.js';
|
|
13
|
-
import type { DeleteResponse, InsertResponse, MongoFindRequest, UpdateRequest, UpdateResponse } from '../models/index.js';
|
|
13
|
+
import type { CountResponse, DeleteResponse, InsertResponse, MongoFindRequest, SearchRequest, UpdateRequest, UpdateResponse } from '../models/index.js';
|
|
14
14
|
export interface DeleteRequest {
|
|
15
15
|
collectionName: string;
|
|
16
16
|
documentId: string;
|
|
17
17
|
}
|
|
18
|
+
export interface CountDocumentsRequest {
|
|
19
|
+
collectionName: string;
|
|
20
|
+
filter?: string;
|
|
21
|
+
}
|
|
18
22
|
export interface DeleteManyRequest {
|
|
19
23
|
collectionName: string;
|
|
20
24
|
requestBody: {
|
|
21
25
|
[key: string]: any;
|
|
22
26
|
};
|
|
23
27
|
matchAll?: boolean;
|
|
28
|
+
filter?: string;
|
|
24
29
|
}
|
|
25
30
|
export interface FindRequest {
|
|
26
31
|
collectionName: string;
|
|
@@ -40,6 +45,7 @@ export interface InsertRequest {
|
|
|
40
45
|
}
|
|
41
46
|
export interface InsertManyRequest {
|
|
42
47
|
collectionName: string;
|
|
48
|
+
ordered?: boolean;
|
|
43
49
|
requestBody?: Array<{
|
|
44
50
|
[key: string]: any;
|
|
45
51
|
}>;
|
|
@@ -52,6 +58,12 @@ export interface ListDocumentsRequest {
|
|
|
52
58
|
rowsPerPage?: number;
|
|
53
59
|
page?: number;
|
|
54
60
|
}
|
|
61
|
+
export interface SearchDocumentsRequest {
|
|
62
|
+
collectionName: string;
|
|
63
|
+
searchRequest: SearchRequest;
|
|
64
|
+
rowsPerPage?: number;
|
|
65
|
+
page?: number;
|
|
66
|
+
}
|
|
55
67
|
export interface UpdateRequest {
|
|
56
68
|
collectionName: string;
|
|
57
69
|
documentId: string;
|
|
@@ -70,6 +82,7 @@ export interface UpdateManyRequest {
|
|
|
70
82
|
collectionName: string;
|
|
71
83
|
updateRequest: UpdateRequest;
|
|
72
84
|
matchAll?: boolean;
|
|
85
|
+
filter?: string;
|
|
73
86
|
}
|
|
74
87
|
/**
|
|
75
88
|
*
|
|
@@ -89,6 +102,20 @@ export declare class DocumentApi extends runtime.BaseAPI {
|
|
|
89
102
|
* Delete Document from Collection
|
|
90
103
|
*/
|
|
91
104
|
_delete(requestParameters: DeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DeleteResponse>;
|
|
105
|
+
/**
|
|
106
|
+
* Creates request options for countDocuments without sending the request
|
|
107
|
+
*/
|
|
108
|
+
countDocumentsRequestOpts(requestParameters: CountDocumentsRequest): Promise<runtime.RequestOpts>;
|
|
109
|
+
/**
|
|
110
|
+
* Count the Documents of the given Collection that match the filter without loading them
|
|
111
|
+
* Count Documents in Collection
|
|
112
|
+
*/
|
|
113
|
+
countDocumentsRaw(requestParameters: CountDocumentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CountResponse>>;
|
|
114
|
+
/**
|
|
115
|
+
* Count the Documents of the given Collection that match the filter without loading them
|
|
116
|
+
* Count Documents in Collection
|
|
117
|
+
*/
|
|
118
|
+
countDocuments(requestParameters: CountDocumentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CountResponse>;
|
|
92
119
|
/**
|
|
93
120
|
* Creates request options for deleteMany without sending the request
|
|
94
121
|
*/
|
|
@@ -185,6 +212,24 @@ export declare class DocumentApi extends runtime.BaseAPI {
|
|
|
185
212
|
listDocuments(requestParameters: ListDocumentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<{
|
|
186
213
|
[key: string]: any;
|
|
187
214
|
}>>;
|
|
215
|
+
/**
|
|
216
|
+
* Creates request options for searchDocuments without sending the request
|
|
217
|
+
*/
|
|
218
|
+
searchDocumentsRequestOpts(requestParameters: SearchDocumentsRequest): Promise<runtime.RequestOpts>;
|
|
219
|
+
/**
|
|
220
|
+
* The list of documents with the parameters in the request body: for filters that are too long for the URL (a URL of more than 2048 characters is refused by the server before the request is handled, without CORS headers). The filter is a Lucene query like in the list, the answer and the pagination headers are the same.
|
|
221
|
+
* Search Documents in Collection
|
|
222
|
+
*/
|
|
223
|
+
searchDocumentsRaw(requestParameters: SearchDocumentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<{
|
|
224
|
+
[key: string]: any;
|
|
225
|
+
}>>>;
|
|
226
|
+
/**
|
|
227
|
+
* The list of documents with the parameters in the request body: for filters that are too long for the URL (a URL of more than 2048 characters is refused by the server before the request is handled, without CORS headers). The filter is a Lucene query like in the list, the answer and the pagination headers are the same.
|
|
228
|
+
* Search Documents in Collection
|
|
229
|
+
*/
|
|
230
|
+
searchDocuments(requestParameters: SearchDocumentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<{
|
|
231
|
+
[key: string]: any;
|
|
232
|
+
}>>;
|
|
188
233
|
/**
|
|
189
234
|
* Creates request options for update without sending the request
|
|
190
235
|
*/
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import * as runtime from "../runtime.js";
|
|
2
2
|
import {
|
|
3
|
+
CountResponseFromJSON,
|
|
3
4
|
DeleteResponseFromJSON,
|
|
4
5
|
InsertResponseFromJSON,
|
|
5
6
|
MongoFindRequestToJSON,
|
|
7
|
+
SearchRequestToJSON,
|
|
6
8
|
UpdateRequestToJSON,
|
|
7
9
|
UpdateResponseFromJSON
|
|
8
10
|
} from "../models/index.js";
|
|
@@ -65,6 +67,60 @@ export class DocumentApi extends runtime.BaseAPI {
|
|
|
65
67
|
const response = await this._deleteRaw(requestParameters, initOverrides);
|
|
66
68
|
return await response.value();
|
|
67
69
|
}
|
|
70
|
+
/**
|
|
71
|
+
* Creates request options for countDocuments without sending the request
|
|
72
|
+
*/
|
|
73
|
+
async countDocumentsRequestOpts(requestParameters) {
|
|
74
|
+
if (requestParameters["collectionName"] == null) {
|
|
75
|
+
throw new runtime.RequiredError(
|
|
76
|
+
"collectionName",
|
|
77
|
+
'Required parameter "collectionName" was null or undefined when calling countDocuments().'
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
const queryParameters = {};
|
|
81
|
+
if (requestParameters["filter"] != null) {
|
|
82
|
+
queryParameters["filter"] = requestParameters["filter"];
|
|
83
|
+
}
|
|
84
|
+
const headerParameters = {};
|
|
85
|
+
if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
|
|
86
|
+
headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
|
|
87
|
+
}
|
|
88
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
89
|
+
const token = this.configuration.accessToken;
|
|
90
|
+
const tokenString = await token("httpAuth", []);
|
|
91
|
+
if (tokenString) {
|
|
92
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
96
|
+
headerParameters["X-AUTH-APIKEY"] = await this.configuration.apiKey("X-AUTH-APIKEY");
|
|
97
|
+
}
|
|
98
|
+
let urlPath = `/mongodb/collections/{collectionName}/documents/count`;
|
|
99
|
+
urlPath = urlPath.replace(`{${"collectionName"}}`, encodeURIComponent(String(requestParameters["collectionName"])));
|
|
100
|
+
return {
|
|
101
|
+
path: urlPath,
|
|
102
|
+
method: "GET",
|
|
103
|
+
headers: headerParameters,
|
|
104
|
+
query: queryParameters
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Count the Documents of the given Collection that match the filter without loading them
|
|
109
|
+
* Count Documents in Collection
|
|
110
|
+
*/
|
|
111
|
+
async countDocumentsRaw(requestParameters, initOverrides) {
|
|
112
|
+
const requestOptions = await this.countDocumentsRequestOpts(requestParameters);
|
|
113
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
114
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => CountResponseFromJSON(jsonValue));
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Count the Documents of the given Collection that match the filter without loading them
|
|
118
|
+
* Count Documents in Collection
|
|
119
|
+
*/
|
|
120
|
+
async countDocuments(requestParameters, initOverrides) {
|
|
121
|
+
const response = await this.countDocumentsRaw(requestParameters, initOverrides);
|
|
122
|
+
return await response.value();
|
|
123
|
+
}
|
|
68
124
|
/**
|
|
69
125
|
* Creates request options for deleteMany without sending the request
|
|
70
126
|
*/
|
|
@@ -85,6 +141,9 @@ export class DocumentApi extends runtime.BaseAPI {
|
|
|
85
141
|
if (requestParameters["matchAll"] != null) {
|
|
86
142
|
queryParameters["matchAll"] = requestParameters["matchAll"];
|
|
87
143
|
}
|
|
144
|
+
if (requestParameters["filter"] != null) {
|
|
145
|
+
queryParameters["filter"] = requestParameters["filter"];
|
|
146
|
+
}
|
|
88
147
|
const headerParameters = {};
|
|
89
148
|
headerParameters["Content-Type"] = "application/json";
|
|
90
149
|
if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
|
|
@@ -320,6 +379,9 @@ export class DocumentApi extends runtime.BaseAPI {
|
|
|
320
379
|
);
|
|
321
380
|
}
|
|
322
381
|
const queryParameters = {};
|
|
382
|
+
if (requestParameters["ordered"] != null) {
|
|
383
|
+
queryParameters["ordered"] = requestParameters["ordered"];
|
|
384
|
+
}
|
|
323
385
|
const headerParameters = {};
|
|
324
386
|
headerParameters["Content-Type"] = "application/json";
|
|
325
387
|
if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
|
|
@@ -428,6 +490,71 @@ export class DocumentApi extends runtime.BaseAPI {
|
|
|
428
490
|
const response = await this.listDocumentsRaw(requestParameters, initOverrides);
|
|
429
491
|
return await response.value();
|
|
430
492
|
}
|
|
493
|
+
/**
|
|
494
|
+
* Creates request options for searchDocuments without sending the request
|
|
495
|
+
*/
|
|
496
|
+
async searchDocumentsRequestOpts(requestParameters) {
|
|
497
|
+
if (requestParameters["collectionName"] == null) {
|
|
498
|
+
throw new runtime.RequiredError(
|
|
499
|
+
"collectionName",
|
|
500
|
+
'Required parameter "collectionName" was null or undefined when calling searchDocuments().'
|
|
501
|
+
);
|
|
502
|
+
}
|
|
503
|
+
if (requestParameters["searchRequest"] == null) {
|
|
504
|
+
throw new runtime.RequiredError(
|
|
505
|
+
"searchRequest",
|
|
506
|
+
'Required parameter "searchRequest" was null or undefined when calling searchDocuments().'
|
|
507
|
+
);
|
|
508
|
+
}
|
|
509
|
+
const queryParameters = {};
|
|
510
|
+
if (requestParameters["rowsPerPage"] != null) {
|
|
511
|
+
queryParameters["rowsPerPage"] = requestParameters["rowsPerPage"];
|
|
512
|
+
}
|
|
513
|
+
if (requestParameters["page"] != null) {
|
|
514
|
+
queryParameters["page"] = requestParameters["page"];
|
|
515
|
+
}
|
|
516
|
+
const headerParameters = {};
|
|
517
|
+
headerParameters["Content-Type"] = "application/json";
|
|
518
|
+
if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
|
|
519
|
+
headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
|
|
520
|
+
}
|
|
521
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
522
|
+
const token = this.configuration.accessToken;
|
|
523
|
+
const tokenString = await token("httpAuth", []);
|
|
524
|
+
if (tokenString) {
|
|
525
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
529
|
+
headerParameters["X-AUTH-APIKEY"] = await this.configuration.apiKey("X-AUTH-APIKEY");
|
|
530
|
+
}
|
|
531
|
+
let urlPath = `/mongodb/collections/{collectionName}/documents/search`;
|
|
532
|
+
urlPath = urlPath.replace(`{${"collectionName"}}`, encodeURIComponent(String(requestParameters["collectionName"])));
|
|
533
|
+
return {
|
|
534
|
+
path: urlPath,
|
|
535
|
+
method: "POST",
|
|
536
|
+
headers: headerParameters,
|
|
537
|
+
query: queryParameters,
|
|
538
|
+
body: SearchRequestToJSON(requestParameters["searchRequest"])
|
|
539
|
+
};
|
|
540
|
+
}
|
|
541
|
+
/**
|
|
542
|
+
* The list of documents with the parameters in the request body: for filters that are too long for the URL (a URL of more than 2048 characters is refused by the server before the request is handled, without CORS headers). The filter is a Lucene query like in the list, the answer and the pagination headers are the same.
|
|
543
|
+
* Search Documents in Collection
|
|
544
|
+
*/
|
|
545
|
+
async searchDocumentsRaw(requestParameters, initOverrides) {
|
|
546
|
+
const requestOptions = await this.searchDocumentsRequestOpts(requestParameters);
|
|
547
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
548
|
+
return new runtime.JSONApiResponse(response);
|
|
549
|
+
}
|
|
550
|
+
/**
|
|
551
|
+
* The list of documents with the parameters in the request body: for filters that are too long for the URL (a URL of more than 2048 characters is refused by the server before the request is handled, without CORS headers). The filter is a Lucene query like in the list, the answer and the pagination headers are the same.
|
|
552
|
+
* Search Documents in Collection
|
|
553
|
+
*/
|
|
554
|
+
async searchDocuments(requestParameters, initOverrides) {
|
|
555
|
+
const response = await this.searchDocumentsRaw(requestParameters, initOverrides);
|
|
556
|
+
return await response.value();
|
|
557
|
+
}
|
|
431
558
|
/**
|
|
432
559
|
* Creates request options for update without sending the request
|
|
433
560
|
*/
|
|
@@ -580,6 +707,9 @@ export class DocumentApi extends runtime.BaseAPI {
|
|
|
580
707
|
if (requestParameters["matchAll"] != null) {
|
|
581
708
|
queryParameters["matchAll"] = requestParameters["matchAll"];
|
|
582
709
|
}
|
|
710
|
+
if (requestParameters["filter"] != null) {
|
|
711
|
+
queryParameters["filter"] = requestParameters["filter"];
|
|
712
|
+
}
|
|
583
713
|
const headerParameters = {};
|
|
584
714
|
headerParameters["Content-Type"] = "application/json";
|
|
585
715
|
if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
|