@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.
- package/README.md +38 -0
- package/dist/module.cjs +5 -0
- package/dist/module.d.ts +9 -0
- package/dist/module.json +5 -0
- package/dist/module.mjs +72 -0
- package/dist/runtime/api/apis/AdminApi.d.ts +181 -0
- package/dist/runtime/api/apis/AdminApi.mjs +413 -0
- package/dist/runtime/api/apis/ApplicationApi.d.ts +68 -0
- package/dist/runtime/api/apis/ApplicationApi.mjs +147 -0
- package/dist/runtime/api/apis/AuthApi.d.ts +107 -0
- package/dist/runtime/api/apis/AuthApi.mjs +235 -0
- package/dist/runtime/api/apis/BucketApi.d.ts +67 -0
- package/dist/runtime/api/apis/BucketApi.mjs +128 -0
- package/dist/runtime/api/apis/CollectionApi.d.ts +161 -0
- package/dist/runtime/api/apis/CollectionApi.mjs +355 -0
- package/dist/runtime/api/apis/DatabaseApi.d.ts +77 -0
- package/dist/runtime/api/apis/DatabaseApi.mjs +156 -0
- package/dist/runtime/api/apis/DocumentApi.d.ts +188 -0
- package/dist/runtime/api/apis/DocumentApi.mjs +385 -0
- package/dist/runtime/api/apis/FileApi.d.ts +125 -0
- package/dist/runtime/api/apis/FileApi.mjs +299 -0
- package/dist/runtime/api/apis/IndexApi.d.ts +137 -0
- package/dist/runtime/api/apis/IndexApi.mjs +303 -0
- package/dist/runtime/api/apis/InformationApi.d.ts +28 -0
- package/dist/runtime/api/apis/InformationApi.mjs +21 -0
- package/dist/runtime/api/apis/JobsApi.d.ts +94 -0
- package/dist/runtime/api/apis/JobsApi.mjs +204 -0
- package/dist/runtime/api/apis/index.d.ts +11 -0
- package/dist/runtime/api/apis/index.mjs +11 -0
- package/dist/runtime/api/index.d.ts +3 -0
- package/dist/runtime/api/index.mjs +3 -0
- package/dist/runtime/api/models/BucketInformation.d.ts +45 -0
- package/dist/runtime/api/models/BucketInformation.mjs +28 -0
- package/dist/runtime/api/models/CollectionStatus.d.ts +103 -0
- package/dist/runtime/api/models/CollectionStatus.mjs +46 -0
- package/dist/runtime/api/models/DatabaseInfo.d.ts +53 -0
- package/dist/runtime/api/models/DatabaseInfo.mjs +30 -0
- package/dist/runtime/api/models/DeleteResponse.d.ts +33 -0
- package/dist/runtime/api/models/DeleteResponse.mjs +24 -0
- package/dist/runtime/api/models/ErrorDescription.d.ts +39 -0
- package/dist/runtime/api/models/ErrorDescription.mjs +26 -0
- package/dist/runtime/api/models/FileInformation.d.ts +59 -0
- package/dist/runtime/api/models/FileInformation.mjs +32 -0
- package/dist/runtime/api/models/Grant.d.ts +51 -0
- package/dist/runtime/api/models/Grant.mjs +30 -0
- package/dist/runtime/api/models/IndexCreateRequest.d.ts +36 -0
- package/dist/runtime/api/models/IndexCreateRequest.mjs +29 -0
- package/dist/runtime/api/models/IndexCreateResponse.d.ts +27 -0
- package/dist/runtime/api/models/IndexCreateResponse.mjs +22 -0
- package/dist/runtime/api/models/IndexDropResponse.d.ts +27 -0
- package/dist/runtime/api/models/IndexDropResponse.mjs +22 -0
- package/dist/runtime/api/models/IndexOptionsRequest.d.ts +69 -0
- package/dist/runtime/api/models/IndexOptionsRequest.mjs +37 -0
- package/dist/runtime/api/models/InsertResponse.d.ts +33 -0
- package/dist/runtime/api/models/InsertResponse.mjs +25 -0
- package/dist/runtime/api/models/JobConfig.d.ts +57 -0
- package/dist/runtime/api/models/JobConfig.mjs +32 -0
- package/dist/runtime/api/models/JobInformation.d.ts +75 -0
- package/dist/runtime/api/models/JobInformation.mjs +39 -0
- package/dist/runtime/api/models/JsonResultBoolean.d.ts +27 -0
- package/dist/runtime/api/models/JsonResultBoolean.mjs +22 -0
- package/dist/runtime/api/models/JsonResultString.d.ts +27 -0
- package/dist/runtime/api/models/JsonResultString.mjs +22 -0
- package/dist/runtime/api/models/JsonSchema.d.ts +42 -0
- package/dist/runtime/api/models/JsonSchema.mjs +31 -0
- package/dist/runtime/api/models/JsonSchemaDefinition.d.ts +55 -0
- package/dist/runtime/api/models/JsonSchemaDefinition.mjs +31 -0
- package/dist/runtime/api/models/Login.d.ts +33 -0
- package/dist/runtime/api/models/Login.mjs +24 -0
- package/dist/runtime/api/models/LoginResult.d.ts +40 -0
- package/dist/runtime/api/models/LoginResult.mjs +30 -0
- package/dist/runtime/api/models/Measurement.d.ts +33 -0
- package/dist/runtime/api/models/Measurement.mjs +24 -0
- package/dist/runtime/api/models/Metric.d.ts +52 -0
- package/dist/runtime/api/models/Metric.mjs +35 -0
- package/dist/runtime/api/models/MongoAggregateRequest.d.ts +34 -0
- package/dist/runtime/api/models/MongoAggregateRequest.mjs +29 -0
- package/dist/runtime/api/models/MongoFindRequest.d.ts +45 -0
- package/dist/runtime/api/models/MongoFindRequest.mjs +26 -0
- package/dist/runtime/api/models/MongoIndex.d.ts +99 -0
- package/dist/runtime/api/models/MongoIndex.mjs +45 -0
- package/dist/runtime/api/models/PasswordUpdateRequest.d.ts +27 -0
- package/dist/runtime/api/models/PasswordUpdateRequest.mjs +22 -0
- package/dist/runtime/api/models/PipelineStage.d.ts +33 -0
- package/dist/runtime/api/models/PipelineStage.mjs +24 -0
- package/dist/runtime/api/models/Role.d.ts +40 -0
- package/dist/runtime/api/models/Role.mjs +31 -0
- package/dist/runtime/api/models/SchemaAnalysis.d.ts +46 -0
- package/dist/runtime/api/models/SchemaAnalysis.mjs +33 -0
- package/dist/runtime/api/models/SchemaAnalysisField.d.ts +58 -0
- package/dist/runtime/api/models/SchemaAnalysisField.mjs +37 -0
- package/dist/runtime/api/models/SchemaAnalysisFieldType.d.ts +39 -0
- package/dist/runtime/api/models/SchemaAnalysisFieldType.mjs +26 -0
- package/dist/runtime/api/models/SettingsResponse.d.ts +47 -0
- package/dist/runtime/api/models/SettingsResponse.mjs +29 -0
- package/dist/runtime/api/models/UpdateFileInformationRequest.d.ts +35 -0
- package/dist/runtime/api/models/UpdateFileInformationRequest.mjs +25 -0
- package/dist/runtime/api/models/UpdateRequest.d.ts +37 -0
- package/dist/runtime/api/models/UpdateRequest.mjs +24 -0
- package/dist/runtime/api/models/UpdateResponse.d.ts +45 -0
- package/dist/runtime/api/models/UpdateResponse.mjs +29 -0
- package/dist/runtime/api/models/UpdateRoleRequest.d.ts +34 -0
- package/dist/runtime/api/models/UpdateRoleRequest.mjs +29 -0
- package/dist/runtime/api/models/UserInformation.d.ts +45 -0
- package/dist/runtime/api/models/UserInformation.mjs +29 -0
- package/dist/runtime/api/models/UserProfile.d.ts +52 -0
- package/dist/runtime/api/models/UserProfile.mjs +35 -0
- package/dist/runtime/api/models/Version.d.ts +39 -0
- package/dist/runtime/api/models/Version.mjs +26 -0
- package/dist/runtime/api/models/index.d.ts +39 -0
- package/dist/runtime/api/models/index.mjs +39 -0
- package/dist/runtime/api/runtime.d.ts +140 -0
- package/dist/runtime/api/runtime.mjs +196 -0
- package/dist/runtime/composables/mongocampApi.d.ts +14 -0
- package/dist/runtime/composables/mongocampApi.mjs +45 -0
- package/dist/runtime/composables/mongocampAuth.d.ts +9 -0
- package/dist/runtime/composables/mongocampAuth.mjs +52 -0
- package/dist/runtime/composables/mongocampSearch.d.ts +6 -0
- package/dist/runtime/composables/mongocampSearch.mjs +12 -0
- package/dist/runtime/composables/mongocampToken.d.ts +1 -0
- package/dist/runtime/composables/mongocampToken.mjs +10 -0
- package/dist/runtime/composables/mongocampUrl.d.ts +1 -0
- package/dist/runtime/composables/mongocampUrl.mjs +5 -0
- package/dist/runtime/composables/mongocampUser.d.ts +3 -0
- package/dist/runtime/composables/mongocampUser.mjs +2 -0
- package/dist/runtime/plugin.d.ts +2 -0
- package/dist/runtime/plugin.mjs +6 -0
- package/dist/types.d.ts +10 -0
- package/package.json +37 -0
|
@@ -0,0 +1,161 @@
|
|
|
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 { CollectionStatus, JsonResultBoolean, JsonSchema, MongoAggregateRequest, SchemaAnalysis } from '../models';
|
|
14
|
+
export interface AggregateRequest {
|
|
15
|
+
collectionName: string;
|
|
16
|
+
mongoAggregateRequest: MongoAggregateRequest;
|
|
17
|
+
rowsPerPage?: number;
|
|
18
|
+
page?: number;
|
|
19
|
+
}
|
|
20
|
+
export interface ClearCollectionRequest {
|
|
21
|
+
collectionName: string;
|
|
22
|
+
}
|
|
23
|
+
export interface DeleteCollectionRequest {
|
|
24
|
+
collectionName: string;
|
|
25
|
+
}
|
|
26
|
+
export interface DistinctRequest {
|
|
27
|
+
collectionName: string;
|
|
28
|
+
field: string;
|
|
29
|
+
rowsPerPage?: number;
|
|
30
|
+
page?: number;
|
|
31
|
+
}
|
|
32
|
+
export interface GetCollectionFieldsRequest {
|
|
33
|
+
collectionName: string;
|
|
34
|
+
sampleSize?: number;
|
|
35
|
+
}
|
|
36
|
+
export interface GetCollectionInformationRequest {
|
|
37
|
+
collectionName: string;
|
|
38
|
+
includeDetails?: boolean;
|
|
39
|
+
}
|
|
40
|
+
export interface GetJsonSchemaRequest {
|
|
41
|
+
collectionName: string;
|
|
42
|
+
sampleSize?: number;
|
|
43
|
+
deepth?: number;
|
|
44
|
+
}
|
|
45
|
+
export interface GetSchemaAnalysisRequest {
|
|
46
|
+
collectionName: string;
|
|
47
|
+
sampleSize?: number;
|
|
48
|
+
deepth?: number;
|
|
49
|
+
}
|
|
50
|
+
export interface ListCollectionsByDatabaseRequest {
|
|
51
|
+
databaseName: string;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
*
|
|
55
|
+
*/
|
|
56
|
+
export declare class CollectionApi extends runtime.BaseAPI {
|
|
57
|
+
/**
|
|
58
|
+
* Aggregate in a given Collection
|
|
59
|
+
* Aggregate in Collection
|
|
60
|
+
*/
|
|
61
|
+
aggregateRaw(requestParameters: AggregateRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<Array<{
|
|
62
|
+
[key: string]: string;
|
|
63
|
+
}>>>;
|
|
64
|
+
/**
|
|
65
|
+
* Aggregate in a given Collection
|
|
66
|
+
* Aggregate in Collection
|
|
67
|
+
*/
|
|
68
|
+
aggregate(requestParameters: AggregateRequest, initOverrides?: RequestInit): Promise<Array<{
|
|
69
|
+
[key: string]: string;
|
|
70
|
+
}>>;
|
|
71
|
+
/**
|
|
72
|
+
* Delete all Document in Collection
|
|
73
|
+
* Clear Collection
|
|
74
|
+
*/
|
|
75
|
+
clearCollectionRaw(requestParameters: ClearCollectionRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<JsonResultBoolean>>;
|
|
76
|
+
/**
|
|
77
|
+
* Delete all Document in Collection
|
|
78
|
+
* Clear Collection
|
|
79
|
+
*/
|
|
80
|
+
clearCollection(requestParameters: ClearCollectionRequest, initOverrides?: RequestInit): Promise<JsonResultBoolean>;
|
|
81
|
+
/**
|
|
82
|
+
* Delete a given Collection
|
|
83
|
+
* Delete Collection
|
|
84
|
+
*/
|
|
85
|
+
deleteCollectionRaw(requestParameters: DeleteCollectionRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<JsonResultBoolean>>;
|
|
86
|
+
/**
|
|
87
|
+
* Delete a given Collection
|
|
88
|
+
* Delete Collection
|
|
89
|
+
*/
|
|
90
|
+
deleteCollection(requestParameters: DeleteCollectionRequest, initOverrides?: RequestInit): Promise<JsonResultBoolean>;
|
|
91
|
+
/**
|
|
92
|
+
* Distinct for Field in a given Collection
|
|
93
|
+
* Distinct in Collection
|
|
94
|
+
*/
|
|
95
|
+
distinctRaw(requestParameters: DistinctRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<Array<string>>>;
|
|
96
|
+
/**
|
|
97
|
+
* Distinct for Field in a given Collection
|
|
98
|
+
* Distinct in Collection
|
|
99
|
+
*/
|
|
100
|
+
distinct(requestParameters: DistinctRequest, initOverrides?: RequestInit): Promise<Array<string>>;
|
|
101
|
+
/**
|
|
102
|
+
* List the Fields in a given collection
|
|
103
|
+
* Collection Fields
|
|
104
|
+
*/
|
|
105
|
+
getCollectionFieldsRaw(requestParameters: GetCollectionFieldsRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<Array<string>>>;
|
|
106
|
+
/**
|
|
107
|
+
* List the Fields in a given collection
|
|
108
|
+
* Collection Fields
|
|
109
|
+
*/
|
|
110
|
+
getCollectionFields(requestParameters: GetCollectionFieldsRequest, initOverrides?: RequestInit): Promise<Array<string>>;
|
|
111
|
+
/**
|
|
112
|
+
* All Information about a single Collection
|
|
113
|
+
* Collection Information
|
|
114
|
+
*/
|
|
115
|
+
getCollectionInformationRaw(requestParameters: GetCollectionInformationRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<CollectionStatus>>;
|
|
116
|
+
/**
|
|
117
|
+
* All Information about a single Collection
|
|
118
|
+
* Collection Information
|
|
119
|
+
*/
|
|
120
|
+
getCollectionInformation(requestParameters: GetCollectionInformationRequest, initOverrides?: RequestInit): Promise<CollectionStatus>;
|
|
121
|
+
/**
|
|
122
|
+
* List the Fields in a given collection
|
|
123
|
+
* Collection Fields
|
|
124
|
+
*/
|
|
125
|
+
getJsonSchemaRaw(requestParameters: GetJsonSchemaRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<JsonSchema>>;
|
|
126
|
+
/**
|
|
127
|
+
* List the Fields in a given collection
|
|
128
|
+
* Collection Fields
|
|
129
|
+
*/
|
|
130
|
+
getJsonSchema(requestParameters: GetJsonSchemaRequest, initOverrides?: RequestInit): Promise<JsonSchema>;
|
|
131
|
+
/**
|
|
132
|
+
* List the Fields in a given collection
|
|
133
|
+
* Collection Fields
|
|
134
|
+
*/
|
|
135
|
+
getSchemaAnalysisRaw(requestParameters: GetSchemaAnalysisRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<SchemaAnalysis>>;
|
|
136
|
+
/**
|
|
137
|
+
* List the Fields in a given collection
|
|
138
|
+
* Collection Fields
|
|
139
|
+
*/
|
|
140
|
+
getSchemaAnalysis(requestParameters: GetSchemaAnalysisRequest, initOverrides?: RequestInit): Promise<SchemaAnalysis>;
|
|
141
|
+
/**
|
|
142
|
+
* List of all Collections of the default database
|
|
143
|
+
* List of Collections
|
|
144
|
+
*/
|
|
145
|
+
listCollectionsRaw(initOverrides?: RequestInit): Promise<runtime.ApiResponse<Array<string>>>;
|
|
146
|
+
/**
|
|
147
|
+
* List of all Collections of the default database
|
|
148
|
+
* List of Collections
|
|
149
|
+
*/
|
|
150
|
+
listCollections(initOverrides?: RequestInit): Promise<Array<string>>;
|
|
151
|
+
/**
|
|
152
|
+
* List of all Collections of the given database
|
|
153
|
+
* List of Collections
|
|
154
|
+
*/
|
|
155
|
+
listCollectionsByDatabaseRaw(requestParameters: ListCollectionsByDatabaseRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<Array<string>>>;
|
|
156
|
+
/**
|
|
157
|
+
* List of all Collections of the given database
|
|
158
|
+
* List of Collections
|
|
159
|
+
*/
|
|
160
|
+
listCollectionsByDatabase(requestParameters: ListCollectionsByDatabaseRequest, initOverrides?: RequestInit): Promise<Array<string>>;
|
|
161
|
+
}
|
|
@@ -0,0 +1,355 @@
|
|
|
1
|
+
import * as runtime from "../runtime.mjs";
|
|
2
|
+
import {
|
|
3
|
+
CollectionStatusFromJSON,
|
|
4
|
+
JsonResultBooleanFromJSON,
|
|
5
|
+
JsonSchemaFromJSON,
|
|
6
|
+
MongoAggregateRequestToJSON,
|
|
7
|
+
SchemaAnalysisFromJSON
|
|
8
|
+
} from "../models";
|
|
9
|
+
export class CollectionApi extends runtime.BaseAPI {
|
|
10
|
+
async aggregateRaw(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 aggregate.");
|
|
13
|
+
}
|
|
14
|
+
if (requestParameters.mongoAggregateRequest === null || requestParameters.mongoAggregateRequest === void 0) {
|
|
15
|
+
throw new runtime.RequiredError("mongoAggregateRequest", "Required parameter requestParameters.mongoAggregateRequest was null or undefined when calling aggregate.");
|
|
16
|
+
}
|
|
17
|
+
const queryParameters = {};
|
|
18
|
+
if (requestParameters.rowsPerPage !== void 0) {
|
|
19
|
+
queryParameters["rowsPerPage"] = requestParameters.rowsPerPage;
|
|
20
|
+
}
|
|
21
|
+
if (requestParameters.page !== void 0) {
|
|
22
|
+
queryParameters["page"] = requestParameters.page;
|
|
23
|
+
}
|
|
24
|
+
const headerParameters = {};
|
|
25
|
+
headerParameters["Content-Type"] = "application/json";
|
|
26
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
27
|
+
headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
|
|
28
|
+
}
|
|
29
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
30
|
+
const token = this.configuration.accessToken;
|
|
31
|
+
const tokenString = await token("httpAuth", []);
|
|
32
|
+
if (tokenString) {
|
|
33
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
|
|
37
|
+
headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
|
|
38
|
+
}
|
|
39
|
+
const response = await this.request({
|
|
40
|
+
path: `/mongodb/collections/{collectionName}/aggregate`.replace(`{${"collectionName"}}`, encodeURIComponent(String(requestParameters.collectionName))),
|
|
41
|
+
method: "POST",
|
|
42
|
+
headers: headerParameters,
|
|
43
|
+
query: queryParameters,
|
|
44
|
+
body: MongoAggregateRequestToJSON(requestParameters.mongoAggregateRequest)
|
|
45
|
+
}, initOverrides);
|
|
46
|
+
return new runtime.JSONApiResponse(response);
|
|
47
|
+
}
|
|
48
|
+
async aggregate(requestParameters, initOverrides) {
|
|
49
|
+
const response = await this.aggregateRaw(requestParameters, initOverrides);
|
|
50
|
+
return await response.value();
|
|
51
|
+
}
|
|
52
|
+
async clearCollectionRaw(requestParameters, initOverrides) {
|
|
53
|
+
if (requestParameters.collectionName === null || requestParameters.collectionName === void 0) {
|
|
54
|
+
throw new runtime.RequiredError("collectionName", "Required parameter requestParameters.collectionName was null or undefined when calling clearCollection.");
|
|
55
|
+
}
|
|
56
|
+
const queryParameters = {};
|
|
57
|
+
const headerParameters = {};
|
|
58
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
59
|
+
headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
|
|
60
|
+
}
|
|
61
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
62
|
+
const token = this.configuration.accessToken;
|
|
63
|
+
const tokenString = await token("httpAuth", []);
|
|
64
|
+
if (tokenString) {
|
|
65
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
|
|
69
|
+
headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
|
|
70
|
+
}
|
|
71
|
+
const response = await this.request({
|
|
72
|
+
path: `/mongodb/collections/{collectionName}/clear`.replace(`{${"collectionName"}}`, encodeURIComponent(String(requestParameters.collectionName))),
|
|
73
|
+
method: "DELETE",
|
|
74
|
+
headers: headerParameters,
|
|
75
|
+
query: queryParameters
|
|
76
|
+
}, initOverrides);
|
|
77
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => JsonResultBooleanFromJSON(jsonValue));
|
|
78
|
+
}
|
|
79
|
+
async clearCollection(requestParameters, initOverrides) {
|
|
80
|
+
const response = await this.clearCollectionRaw(requestParameters, initOverrides);
|
|
81
|
+
return await response.value();
|
|
82
|
+
}
|
|
83
|
+
async deleteCollectionRaw(requestParameters, initOverrides) {
|
|
84
|
+
if (requestParameters.collectionName === null || requestParameters.collectionName === void 0) {
|
|
85
|
+
throw new runtime.RequiredError("collectionName", "Required parameter requestParameters.collectionName was null or undefined when calling deleteCollection.");
|
|
86
|
+
}
|
|
87
|
+
const queryParameters = {};
|
|
88
|
+
const headerParameters = {};
|
|
89
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
90
|
+
headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
|
|
91
|
+
}
|
|
92
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
93
|
+
const token = this.configuration.accessToken;
|
|
94
|
+
const tokenString = await token("httpAuth", []);
|
|
95
|
+
if (tokenString) {
|
|
96
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
|
|
100
|
+
headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
|
|
101
|
+
}
|
|
102
|
+
const response = await this.request({
|
|
103
|
+
path: `/mongodb/collections/{collectionName}`.replace(`{${"collectionName"}}`, encodeURIComponent(String(requestParameters.collectionName))),
|
|
104
|
+
method: "DELETE",
|
|
105
|
+
headers: headerParameters,
|
|
106
|
+
query: queryParameters
|
|
107
|
+
}, initOverrides);
|
|
108
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => JsonResultBooleanFromJSON(jsonValue));
|
|
109
|
+
}
|
|
110
|
+
async deleteCollection(requestParameters, initOverrides) {
|
|
111
|
+
const response = await this.deleteCollectionRaw(requestParameters, initOverrides);
|
|
112
|
+
return await response.value();
|
|
113
|
+
}
|
|
114
|
+
async distinctRaw(requestParameters, initOverrides) {
|
|
115
|
+
if (requestParameters.collectionName === null || requestParameters.collectionName === void 0) {
|
|
116
|
+
throw new runtime.RequiredError("collectionName", "Required parameter requestParameters.collectionName was null or undefined when calling distinct.");
|
|
117
|
+
}
|
|
118
|
+
if (requestParameters.field === null || requestParameters.field === void 0) {
|
|
119
|
+
throw new runtime.RequiredError("field", "Required parameter requestParameters.field was null or undefined when calling distinct.");
|
|
120
|
+
}
|
|
121
|
+
const queryParameters = {};
|
|
122
|
+
if (requestParameters.rowsPerPage !== void 0) {
|
|
123
|
+
queryParameters["rowsPerPage"] = requestParameters.rowsPerPage;
|
|
124
|
+
}
|
|
125
|
+
if (requestParameters.page !== void 0) {
|
|
126
|
+
queryParameters["page"] = requestParameters.page;
|
|
127
|
+
}
|
|
128
|
+
const headerParameters = {};
|
|
129
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
130
|
+
headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
|
|
131
|
+
}
|
|
132
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
133
|
+
const token = this.configuration.accessToken;
|
|
134
|
+
const tokenString = await token("httpAuth", []);
|
|
135
|
+
if (tokenString) {
|
|
136
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
|
|
140
|
+
headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
|
|
141
|
+
}
|
|
142
|
+
const response = await this.request({
|
|
143
|
+
path: `/mongodb/collections/{collectionName}/distinct/{field}`.replace(`{${"collectionName"}}`, encodeURIComponent(String(requestParameters.collectionName))).replace(`{${"field"}}`, encodeURIComponent(String(requestParameters.field))),
|
|
144
|
+
method: "POST",
|
|
145
|
+
headers: headerParameters,
|
|
146
|
+
query: queryParameters
|
|
147
|
+
}, initOverrides);
|
|
148
|
+
return new runtime.JSONApiResponse(response);
|
|
149
|
+
}
|
|
150
|
+
async distinct(requestParameters, initOverrides) {
|
|
151
|
+
const response = await this.distinctRaw(requestParameters, initOverrides);
|
|
152
|
+
return await response.value();
|
|
153
|
+
}
|
|
154
|
+
async getCollectionFieldsRaw(requestParameters, initOverrides) {
|
|
155
|
+
if (requestParameters.collectionName === null || requestParameters.collectionName === void 0) {
|
|
156
|
+
throw new runtime.RequiredError("collectionName", "Required parameter requestParameters.collectionName was null or undefined when calling getCollectionFields.");
|
|
157
|
+
}
|
|
158
|
+
const queryParameters = {};
|
|
159
|
+
if (requestParameters.sampleSize !== void 0) {
|
|
160
|
+
queryParameters["sample size"] = requestParameters.sampleSize;
|
|
161
|
+
}
|
|
162
|
+
const headerParameters = {};
|
|
163
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
164
|
+
headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
|
|
165
|
+
}
|
|
166
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
167
|
+
const token = this.configuration.accessToken;
|
|
168
|
+
const tokenString = await token("httpAuth", []);
|
|
169
|
+
if (tokenString) {
|
|
170
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
|
|
174
|
+
headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
|
|
175
|
+
}
|
|
176
|
+
const response = await this.request({
|
|
177
|
+
path: `/mongodb/collections/{collectionName}/fields`.replace(`{${"collectionName"}}`, encodeURIComponent(String(requestParameters.collectionName))),
|
|
178
|
+
method: "GET",
|
|
179
|
+
headers: headerParameters,
|
|
180
|
+
query: queryParameters
|
|
181
|
+
}, initOverrides);
|
|
182
|
+
return new runtime.JSONApiResponse(response);
|
|
183
|
+
}
|
|
184
|
+
async getCollectionFields(requestParameters, initOverrides) {
|
|
185
|
+
const response = await this.getCollectionFieldsRaw(requestParameters, initOverrides);
|
|
186
|
+
return await response.value();
|
|
187
|
+
}
|
|
188
|
+
async getCollectionInformationRaw(requestParameters, initOverrides) {
|
|
189
|
+
if (requestParameters.collectionName === null || requestParameters.collectionName === void 0) {
|
|
190
|
+
throw new runtime.RequiredError("collectionName", "Required parameter requestParameters.collectionName was null or undefined when calling getCollectionInformation.");
|
|
191
|
+
}
|
|
192
|
+
const queryParameters = {};
|
|
193
|
+
if (requestParameters.includeDetails !== void 0) {
|
|
194
|
+
queryParameters["includeDetails"] = requestParameters.includeDetails;
|
|
195
|
+
}
|
|
196
|
+
const headerParameters = {};
|
|
197
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
198
|
+
headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
|
|
199
|
+
}
|
|
200
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
201
|
+
const token = this.configuration.accessToken;
|
|
202
|
+
const tokenString = await token("httpAuth", []);
|
|
203
|
+
if (tokenString) {
|
|
204
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
|
|
208
|
+
headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
|
|
209
|
+
}
|
|
210
|
+
const response = await this.request({
|
|
211
|
+
path: `/mongodb/collections/{collectionName}`.replace(`{${"collectionName"}}`, encodeURIComponent(String(requestParameters.collectionName))),
|
|
212
|
+
method: "GET",
|
|
213
|
+
headers: headerParameters,
|
|
214
|
+
query: queryParameters
|
|
215
|
+
}, initOverrides);
|
|
216
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => CollectionStatusFromJSON(jsonValue));
|
|
217
|
+
}
|
|
218
|
+
async getCollectionInformation(requestParameters, initOverrides) {
|
|
219
|
+
const response = await this.getCollectionInformationRaw(requestParameters, initOverrides);
|
|
220
|
+
return await response.value();
|
|
221
|
+
}
|
|
222
|
+
async getJsonSchemaRaw(requestParameters, initOverrides) {
|
|
223
|
+
if (requestParameters.collectionName === null || requestParameters.collectionName === void 0) {
|
|
224
|
+
throw new runtime.RequiredError("collectionName", "Required parameter requestParameters.collectionName was null or undefined when calling getJsonSchema.");
|
|
225
|
+
}
|
|
226
|
+
const queryParameters = {};
|
|
227
|
+
if (requestParameters.sampleSize !== void 0) {
|
|
228
|
+
queryParameters["sampleSize"] = requestParameters.sampleSize;
|
|
229
|
+
}
|
|
230
|
+
if (requestParameters.deepth !== void 0) {
|
|
231
|
+
queryParameters["deepth"] = requestParameters.deepth;
|
|
232
|
+
}
|
|
233
|
+
const headerParameters = {};
|
|
234
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
235
|
+
headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
|
|
236
|
+
}
|
|
237
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
238
|
+
const token = this.configuration.accessToken;
|
|
239
|
+
const tokenString = await token("httpAuth", []);
|
|
240
|
+
if (tokenString) {
|
|
241
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
|
|
245
|
+
headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
|
|
246
|
+
}
|
|
247
|
+
const response = await this.request({
|
|
248
|
+
path: `/mongodb/collections/{collectionName}/schema`.replace(`{${"collectionName"}}`, encodeURIComponent(String(requestParameters.collectionName))),
|
|
249
|
+
method: "GET",
|
|
250
|
+
headers: headerParameters,
|
|
251
|
+
query: queryParameters
|
|
252
|
+
}, initOverrides);
|
|
253
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => JsonSchemaFromJSON(jsonValue));
|
|
254
|
+
}
|
|
255
|
+
async getJsonSchema(requestParameters, initOverrides) {
|
|
256
|
+
const response = await this.getJsonSchemaRaw(requestParameters, initOverrides);
|
|
257
|
+
return await response.value();
|
|
258
|
+
}
|
|
259
|
+
async getSchemaAnalysisRaw(requestParameters, initOverrides) {
|
|
260
|
+
if (requestParameters.collectionName === null || requestParameters.collectionName === void 0) {
|
|
261
|
+
throw new runtime.RequiredError("collectionName", "Required parameter requestParameters.collectionName was null or undefined when calling getSchemaAnalysis.");
|
|
262
|
+
}
|
|
263
|
+
const queryParameters = {};
|
|
264
|
+
if (requestParameters.sampleSize !== void 0) {
|
|
265
|
+
queryParameters["sampleSize"] = requestParameters.sampleSize;
|
|
266
|
+
}
|
|
267
|
+
if (requestParameters.deepth !== void 0) {
|
|
268
|
+
queryParameters["deepth"] = requestParameters.deepth;
|
|
269
|
+
}
|
|
270
|
+
const headerParameters = {};
|
|
271
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
272
|
+
headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
|
|
273
|
+
}
|
|
274
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
275
|
+
const token = this.configuration.accessToken;
|
|
276
|
+
const tokenString = await token("httpAuth", []);
|
|
277
|
+
if (tokenString) {
|
|
278
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
|
|
282
|
+
headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
|
|
283
|
+
}
|
|
284
|
+
const response = await this.request({
|
|
285
|
+
path: `/mongodb/collections/{collectionName}/schema/analysis`.replace(`{${"collectionName"}}`, encodeURIComponent(String(requestParameters.collectionName))),
|
|
286
|
+
method: "GET",
|
|
287
|
+
headers: headerParameters,
|
|
288
|
+
query: queryParameters
|
|
289
|
+
}, initOverrides);
|
|
290
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => SchemaAnalysisFromJSON(jsonValue));
|
|
291
|
+
}
|
|
292
|
+
async getSchemaAnalysis(requestParameters, initOverrides) {
|
|
293
|
+
const response = await this.getSchemaAnalysisRaw(requestParameters, initOverrides);
|
|
294
|
+
return await response.value();
|
|
295
|
+
}
|
|
296
|
+
async listCollectionsRaw(initOverrides) {
|
|
297
|
+
const queryParameters = {};
|
|
298
|
+
const headerParameters = {};
|
|
299
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
300
|
+
headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
|
|
301
|
+
}
|
|
302
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
303
|
+
const token = this.configuration.accessToken;
|
|
304
|
+
const tokenString = await token("httpAuth", []);
|
|
305
|
+
if (tokenString) {
|
|
306
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
|
|
310
|
+
headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
|
|
311
|
+
}
|
|
312
|
+
const response = await this.request({
|
|
313
|
+
path: `/mongodb/collections`,
|
|
314
|
+
method: "GET",
|
|
315
|
+
headers: headerParameters,
|
|
316
|
+
query: queryParameters
|
|
317
|
+
}, initOverrides);
|
|
318
|
+
return new runtime.JSONApiResponse(response);
|
|
319
|
+
}
|
|
320
|
+
async listCollections(initOverrides) {
|
|
321
|
+
const response = await this.listCollectionsRaw(initOverrides);
|
|
322
|
+
return await response.value();
|
|
323
|
+
}
|
|
324
|
+
async listCollectionsByDatabaseRaw(requestParameters, initOverrides) {
|
|
325
|
+
if (requestParameters.databaseName === null || requestParameters.databaseName === void 0) {
|
|
326
|
+
throw new runtime.RequiredError("databaseName", "Required parameter requestParameters.databaseName was null or undefined when calling listCollectionsByDatabase.");
|
|
327
|
+
}
|
|
328
|
+
const queryParameters = {};
|
|
329
|
+
const headerParameters = {};
|
|
330
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
331
|
+
headerParameters["X-AUTH-APIKEY"] = this.configuration.apiKey("X-AUTH-APIKEY");
|
|
332
|
+
}
|
|
333
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
334
|
+
const token = this.configuration.accessToken;
|
|
335
|
+
const tokenString = await token("httpAuth", []);
|
|
336
|
+
if (tokenString) {
|
|
337
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
|
|
341
|
+
headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
|
|
342
|
+
}
|
|
343
|
+
const response = await this.request({
|
|
344
|
+
path: `/mongodb/databases/{databaseName}/collections`.replace(`{${"databaseName"}}`, encodeURIComponent(String(requestParameters.databaseName))),
|
|
345
|
+
method: "GET",
|
|
346
|
+
headers: headerParameters,
|
|
347
|
+
query: queryParameters
|
|
348
|
+
}, initOverrides);
|
|
349
|
+
return new runtime.JSONApiResponse(response);
|
|
350
|
+
}
|
|
351
|
+
async listCollectionsByDatabase(requestParameters, initOverrides) {
|
|
352
|
+
const response = await this.listCollectionsByDatabaseRaw(requestParameters, initOverrides);
|
|
353
|
+
return await response.value();
|
|
354
|
+
}
|
|
355
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
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 { DatabaseInfo, JsonResultBoolean } from '../models';
|
|
14
|
+
export interface DeleteDatabaseRequest {
|
|
15
|
+
databaseName: string;
|
|
16
|
+
}
|
|
17
|
+
export interface GetDatabaseInfoRequest {
|
|
18
|
+
databaseName: string;
|
|
19
|
+
}
|
|
20
|
+
export interface ListCollectionsByDatabaseRequest {
|
|
21
|
+
databaseName: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
*/
|
|
26
|
+
export declare class DatabaseApi extends runtime.BaseAPI {
|
|
27
|
+
/**
|
|
28
|
+
* List of all Databases Infos
|
|
29
|
+
* List of Database Infos
|
|
30
|
+
*/
|
|
31
|
+
databaseInfosRaw(initOverrides?: RequestInit): Promise<runtime.ApiResponse<Array<DatabaseInfo>>>;
|
|
32
|
+
/**
|
|
33
|
+
* List of all Databases Infos
|
|
34
|
+
* List of Database Infos
|
|
35
|
+
*/
|
|
36
|
+
databaseInfos(initOverrides?: RequestInit): Promise<Array<DatabaseInfo>>;
|
|
37
|
+
/**
|
|
38
|
+
* Delete given Database
|
|
39
|
+
* Delete Database
|
|
40
|
+
*/
|
|
41
|
+
deleteDatabaseRaw(requestParameters: DeleteDatabaseRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<JsonResultBoolean>>;
|
|
42
|
+
/**
|
|
43
|
+
* Delete given Database
|
|
44
|
+
* Delete Database
|
|
45
|
+
*/
|
|
46
|
+
deleteDatabase(requestParameters: DeleteDatabaseRequest, initOverrides?: RequestInit): Promise<JsonResultBoolean>;
|
|
47
|
+
/**
|
|
48
|
+
* All Information about given Database
|
|
49
|
+
* Database Infos of selected Database
|
|
50
|
+
*/
|
|
51
|
+
getDatabaseInfoRaw(requestParameters: GetDatabaseInfoRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<DatabaseInfo>>;
|
|
52
|
+
/**
|
|
53
|
+
* All Information about given Database
|
|
54
|
+
* Database Infos of selected Database
|
|
55
|
+
*/
|
|
56
|
+
getDatabaseInfo(requestParameters: GetDatabaseInfoRequest, initOverrides?: RequestInit): Promise<DatabaseInfo>;
|
|
57
|
+
/**
|
|
58
|
+
* List of all Collections of the given database
|
|
59
|
+
* List of Collections
|
|
60
|
+
*/
|
|
61
|
+
listCollectionsByDatabaseRaw(requestParameters: ListCollectionsByDatabaseRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<Array<string>>>;
|
|
62
|
+
/**
|
|
63
|
+
* List of all Collections of the given database
|
|
64
|
+
* List of Collections
|
|
65
|
+
*/
|
|
66
|
+
listCollectionsByDatabase(requestParameters: ListCollectionsByDatabaseRequest, initOverrides?: RequestInit): Promise<Array<string>>;
|
|
67
|
+
/**
|
|
68
|
+
* List of all Databases
|
|
69
|
+
* List of Databases
|
|
70
|
+
*/
|
|
71
|
+
listDatabasesRaw(initOverrides?: RequestInit): Promise<runtime.ApiResponse<Array<string>>>;
|
|
72
|
+
/**
|
|
73
|
+
* List of all Databases
|
|
74
|
+
* List of Databases
|
|
75
|
+
*/
|
|
76
|
+
listDatabases(initOverrides?: RequestInit): Promise<Array<string>>;
|
|
77
|
+
}
|