@sfxcode/nuxt-mongocamp-server 1.7.0 → 1.9.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 +8 -0
- package/dist/module.json +2 -2
- package/dist/module.mjs +1 -1
- package/dist/runtime/api/.openapi-generator/FILES +18 -0
- package/dist/runtime/api/.openapi-generator/VERSION +1 -1
- package/dist/runtime/api/apis/AdminApi.d.ts +65 -2
- package/dist/runtime/api/apis/AdminApi.js +39 -27
- package/dist/runtime/api/apis/ApplicationApi.d.ts +17 -2
- package/dist/runtime/api/apis/ApplicationApi.js +17 -11
- package/dist/runtime/api/apis/AuthApi.d.ts +17 -2
- package/dist/runtime/api/apis/AuthApi.js +27 -15
- package/dist/runtime/api/apis/BucketApi.d.ts +12 -2
- package/dist/runtime/api/apis/BucketApi.js +11 -9
- package/dist/runtime/api/apis/CollectionApi.d.ts +163 -4
- package/dist/runtime/api/apis/CollectionApi.js +230 -27
- package/dist/runtime/api/apis/DatabaseApi.d.ts +12 -2
- package/dist/runtime/api/apis/DatabaseApi.js +12 -10
- package/dist/runtime/api/apis/DocumentApi.d.ts +223 -15
- package/dist/runtime/api/apis/DocumentApi.js +194 -35
- package/dist/runtime/api/apis/FileApi.d.ts +78 -4
- package/dist/runtime/api/apis/FileApi.js +34 -24
- package/dist/runtime/api/apis/IndexApi.d.ts +100 -2
- package/dist/runtime/api/apis/IndexApi.js +95 -31
- package/dist/runtime/api/apis/JobsApi.d.ts +28 -2
- package/dist/runtime/api/apis/JobsApi.js +19 -15
- package/dist/runtime/api/apis/SystemApi.d.ts +3 -2
- package/dist/runtime/api/apis/SystemApi.js +5 -3
- package/dist/runtime/api/docs/CollectionApi.md +254 -2
- package/dist/runtime/api/docs/CollectionStatus.md +1 -1
- package/dist/runtime/api/docs/CopyRequest.md +40 -0
- package/dist/runtime/api/docs/CopyResponse.md +38 -0
- package/dist/runtime/api/docs/DatabaseInfo.md +1 -1
- package/dist/runtime/api/docs/DocumentApi.md +210 -19
- package/dist/runtime/api/docs/FieldInfo.md +36 -0
- package/dist/runtime/api/docs/FieldTypeCount.md +36 -0
- package/dist/runtime/api/docs/FileInformation.md +1 -1
- package/dist/runtime/api/docs/ImportResponse.md +42 -0
- package/dist/runtime/api/docs/IndexApi.md +78 -0
- package/dist/runtime/api/docs/IndexCreateRequest.md +2 -0
- package/dist/runtime/api/docs/IndexInfo.md +54 -0
- package/dist/runtime/api/docs/IndexKey.md +36 -0
- package/dist/runtime/api/docs/IndexOptionsRequest.md +10 -0
- package/dist/runtime/api/docs/IndexUsage.md +1 -1
- package/dist/runtime/api/docs/JsonSchemaDefinition.md +1 -1
- package/dist/runtime/api/docs/MongoFindRequest.md +3 -3
- package/dist/runtime/api/docs/MongoIndex.md +3 -3
- package/dist/runtime/api/docs/RenameRequest.md +36 -0
- package/dist/runtime/api/docs/RenameResponse.md +34 -0
- package/dist/runtime/api/docs/SettingsResponse.md +1 -1
- package/dist/runtime/api/docs/UpdateFileInformationRequest.md +1 -1
- package/dist/runtime/api/docs/UpdateRequest.md +2 -2
- package/dist/runtime/api/models/BucketInformation.d.ts +1 -9
- package/dist/runtime/api/models/ClusterInformation.d.ts +1 -5
- package/dist/runtime/api/models/ClusterMemberInformation.d.ts +1 -11
- package/dist/runtime/api/models/CollectionPermission.d.ts +1 -9
- package/dist/runtime/api/models/CollectionStatus.d.ts +2 -28
- package/dist/runtime/api/models/CollectionStatus.js +3 -2
- package/dist/runtime/api/models/CollectionSummary.d.ts +1 -19
- package/dist/runtime/api/models/CopyRequest.d.ts +42 -0
- package/dist/runtime/api/models/CopyRequest.js +32 -0
- package/dist/runtime/api/models/CopyResponse.d.ts +38 -0
- package/dist/runtime/api/models/CopyResponse.js +32 -0
- package/dist/runtime/api/models/CountResponse.d.ts +1 -3
- package/dist/runtime/api/models/DatabaseInfo.d.ts +2 -12
- package/dist/runtime/api/models/DatabaseInfo.js +3 -2
- package/dist/runtime/api/models/DeleteResponse.d.ts +1 -5
- package/dist/runtime/api/models/ErrorDescription.d.ts +1 -7
- package/dist/runtime/api/models/FieldInfo.d.ts +35 -0
- package/dist/runtime/api/models/FieldInfo.js +32 -0
- package/dist/runtime/api/models/FieldTypeCount.d.ts +34 -0
- package/dist/runtime/api/models/FieldTypeCount.js +29 -0
- package/dist/runtime/api/models/FileInformation.d.ts +2 -14
- package/dist/runtime/api/models/FileInformation.js +4 -3
- package/dist/runtime/api/models/Grant.d.ts +1 -11
- package/dist/runtime/api/models/ImportResponse.d.ts +47 -0
- package/dist/runtime/api/models/ImportResponse.js +41 -0
- package/dist/runtime/api/models/IndexCreateRequest.d.ts +7 -6
- package/dist/runtime/api/models/IndexCreateRequest.js +9 -4
- package/dist/runtime/api/models/IndexCreateResponse.d.ts +1 -3
- package/dist/runtime/api/models/IndexDropResponse.d.ts +1 -3
- package/dist/runtime/api/models/IndexInfo.d.ts +77 -0
- package/dist/runtime/api/models/IndexInfo.js +54 -0
- package/dist/runtime/api/models/IndexKey.d.ts +34 -0
- package/dist/runtime/api/models/IndexKey.js +29 -0
- package/dist/runtime/api/models/IndexOptionsRequest.d.ts +27 -17
- package/dist/runtime/api/models/IndexOptionsRequest.js +12 -2
- package/dist/runtime/api/models/IndexUsage.d.ts +2 -10
- package/dist/runtime/api/models/IndexUsage.js +3 -2
- package/dist/runtime/api/models/InsertError.d.ts +1 -7
- package/dist/runtime/api/models/InsertResponse.d.ts +1 -9
- package/dist/runtime/api/models/JobConfig.d.ts +1 -13
- package/dist/runtime/api/models/JobInformation.d.ts +1 -19
- package/dist/runtime/api/models/JobInformation.js +5 -4
- package/dist/runtime/api/models/JsonSchema.d.ts +1 -7
- package/dist/runtime/api/models/JsonSchemaDefinition.d.ts +2 -12
- package/dist/runtime/api/models/JsonValueAny.d.ts +1 -3
- package/dist/runtime/api/models/JsonValueBoolean.d.ts +1 -3
- package/dist/runtime/api/models/JsonValueString.d.ts +1 -3
- package/dist/runtime/api/models/Login.d.ts +1 -5
- package/dist/runtime/api/models/LoginResult.d.ts +1 -7
- package/dist/runtime/api/models/LoginResult.js +3 -2
- package/dist/runtime/api/models/MongoAggregateRequest.d.ts +1 -5
- package/dist/runtime/api/models/MongoCampConfiguration.d.ts +1 -11
- package/dist/runtime/api/models/MongoFindRequest.d.ts +4 -10
- package/dist/runtime/api/models/MongoIndex.d.ts +4 -28
- package/dist/runtime/api/models/MongoIndex.js +3 -2
- package/dist/runtime/api/models/PasswordUpdateRequest.d.ts +1 -3
- package/dist/runtime/api/models/PipelineStage.d.ts +1 -5
- package/dist/runtime/api/models/RenameRequest.d.ts +34 -0
- package/dist/runtime/api/models/RenameRequest.js +28 -0
- package/dist/runtime/api/models/RenameResponse.d.ts +30 -0
- package/dist/runtime/api/models/RenameResponse.js +26 -0
- package/dist/runtime/api/models/Role.d.ts +1 -7
- package/dist/runtime/api/models/SchemaAnalysis.d.ts +1 -9
- package/dist/runtime/api/models/SchemaAnalysisField.d.ts +1 -13
- package/dist/runtime/api/models/SchemaAnalysisFieldType.d.ts +1 -7
- package/dist/runtime/api/models/SearchRequest.d.ts +1 -7
- package/dist/runtime/api/models/SettingsResponse.d.ts +2 -10
- package/dist/runtime/api/models/UpdateFileInformationRequest.d.ts +2 -6
- package/dist/runtime/api/models/UpdateRequest.d.ts +3 -7
- package/dist/runtime/api/models/UpdateResponse.d.ts +1 -9
- package/dist/runtime/api/models/UpdateRoleRequest.d.ts +1 -5
- package/dist/runtime/api/models/UserInformation.d.ts +1 -9
- package/dist/runtime/api/models/UserProfile.d.ts +1 -11
- package/dist/runtime/api/models/Version.d.ts +1 -7
- package/dist/runtime/api/models/Version.js +3 -2
- package/dist/runtime/api/models/index.d.ts +9 -0
- package/dist/runtime/api/models/index.js +9 -0
- package/dist/runtime/api/runtime.d.ts +35 -2
- package/dist/runtime/api/runtime.js +84 -4
- package/dist/runtime/composables/mongocampApiFiles.d.ts +1 -1
- package/dist/runtime/composables/mongocampStorage.d.ts +1 -1
- package/package.json +4 -4
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import * as runtime from "../runtime.js";
|
|
2
2
|
import {
|
|
3
|
-
JobConfigToJSON
|
|
4
|
-
|
|
3
|
+
JobConfigToJSON
|
|
4
|
+
} from "../models/JobConfig.js";
|
|
5
|
+
import {
|
|
6
|
+
JobInformationFromJSON
|
|
7
|
+
} from "../models/JobInformation.js";
|
|
8
|
+
import {
|
|
5
9
|
JsonValueBooleanFromJSON
|
|
6
|
-
} from "../models/
|
|
10
|
+
} from "../models/JsonValueBoolean.js";
|
|
7
11
|
export class JobsApi extends runtime.BaseAPI {
|
|
8
12
|
/**
|
|
9
13
|
* Creates request options for deleteJob without sending the request
|
|
@@ -24,7 +28,7 @@ export class JobsApi extends runtime.BaseAPI {
|
|
|
24
28
|
const queryParameters = {};
|
|
25
29
|
const headerParameters = {};
|
|
26
30
|
if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
|
|
27
|
-
headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
|
|
31
|
+
headerParameters["Authorization"] = "Basic " + btoa((this.configuration.username || "") + ":" + (this.configuration.password || ""));
|
|
28
32
|
}
|
|
29
33
|
if (this.configuration && this.configuration.accessToken) {
|
|
30
34
|
const token = this.configuration.accessToken;
|
|
@@ -37,8 +41,8 @@ export class JobsApi extends runtime.BaseAPI {
|
|
|
37
41
|
headerParameters["X-AUTH-APIKEY"] = await this.configuration.apiKey("X-AUTH-APIKEY");
|
|
38
42
|
}
|
|
39
43
|
let urlPath = `/system/jobs/{jobGroup}/{jobName}`;
|
|
40
|
-
urlPath = urlPath.replace(
|
|
41
|
-
urlPath = urlPath.replace(
|
|
44
|
+
urlPath = urlPath.replace("{jobGroup}", encodeURIComponent(String(requestParameters["jobGroup"])));
|
|
45
|
+
urlPath = urlPath.replace("{jobName}", encodeURIComponent(String(requestParameters["jobName"])));
|
|
42
46
|
return {
|
|
43
47
|
path: urlPath,
|
|
44
48
|
method: "DELETE",
|
|
@@ -82,7 +86,7 @@ export class JobsApi extends runtime.BaseAPI {
|
|
|
82
86
|
const queryParameters = {};
|
|
83
87
|
const headerParameters = {};
|
|
84
88
|
if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
|
|
85
|
-
headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
|
|
89
|
+
headerParameters["Authorization"] = "Basic " + btoa((this.configuration.username || "") + ":" + (this.configuration.password || ""));
|
|
86
90
|
}
|
|
87
91
|
if (this.configuration && this.configuration.accessToken) {
|
|
88
92
|
const token = this.configuration.accessToken;
|
|
@@ -95,8 +99,8 @@ export class JobsApi extends runtime.BaseAPI {
|
|
|
95
99
|
headerParameters["X-AUTH-APIKEY"] = await this.configuration.apiKey("X-AUTH-APIKEY");
|
|
96
100
|
}
|
|
97
101
|
let urlPath = `/system/jobs/{jobGroup}/{jobName}`;
|
|
98
|
-
urlPath = urlPath.replace(
|
|
99
|
-
urlPath = urlPath.replace(
|
|
102
|
+
urlPath = urlPath.replace("{jobGroup}", encodeURIComponent(String(requestParameters["jobGroup"])));
|
|
103
|
+
urlPath = urlPath.replace("{jobName}", encodeURIComponent(String(requestParameters["jobName"])));
|
|
100
104
|
return {
|
|
101
105
|
path: urlPath,
|
|
102
106
|
method: "POST",
|
|
@@ -128,7 +132,7 @@ export class JobsApi extends runtime.BaseAPI {
|
|
|
128
132
|
const queryParameters = {};
|
|
129
133
|
const headerParameters = {};
|
|
130
134
|
if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
|
|
131
|
-
headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
|
|
135
|
+
headerParameters["Authorization"] = "Basic " + btoa((this.configuration.username || "") + ":" + (this.configuration.password || ""));
|
|
132
136
|
}
|
|
133
137
|
if (this.configuration && this.configuration.accessToken) {
|
|
134
138
|
const token = this.configuration.accessToken;
|
|
@@ -172,7 +176,7 @@ export class JobsApi extends runtime.BaseAPI {
|
|
|
172
176
|
const queryParameters = {};
|
|
173
177
|
const headerParameters = {};
|
|
174
178
|
if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
|
|
175
|
-
headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
|
|
179
|
+
headerParameters["Authorization"] = "Basic " + btoa((this.configuration.username || "") + ":" + (this.configuration.password || ""));
|
|
176
180
|
}
|
|
177
181
|
if (this.configuration && this.configuration.accessToken) {
|
|
178
182
|
const token = this.configuration.accessToken;
|
|
@@ -223,7 +227,7 @@ export class JobsApi extends runtime.BaseAPI {
|
|
|
223
227
|
const headerParameters = {};
|
|
224
228
|
headerParameters["Content-Type"] = "application/json";
|
|
225
229
|
if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
|
|
226
|
-
headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
|
|
230
|
+
headerParameters["Authorization"] = "Basic " + btoa((this.configuration.username || "") + ":" + (this.configuration.password || ""));
|
|
227
231
|
}
|
|
228
232
|
if (this.configuration && this.configuration.accessToken) {
|
|
229
233
|
const token = this.configuration.accessToken;
|
|
@@ -287,7 +291,7 @@ export class JobsApi extends runtime.BaseAPI {
|
|
|
287
291
|
const headerParameters = {};
|
|
288
292
|
headerParameters["Content-Type"] = "application/json";
|
|
289
293
|
if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
|
|
290
|
-
headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
|
|
294
|
+
headerParameters["Authorization"] = "Basic " + btoa((this.configuration.username || "") + ":" + (this.configuration.password || ""));
|
|
291
295
|
}
|
|
292
296
|
if (this.configuration && this.configuration.accessToken) {
|
|
293
297
|
const token = this.configuration.accessToken;
|
|
@@ -300,8 +304,8 @@ export class JobsApi extends runtime.BaseAPI {
|
|
|
300
304
|
headerParameters["X-AUTH-APIKEY"] = await this.configuration.apiKey("X-AUTH-APIKEY");
|
|
301
305
|
}
|
|
302
306
|
let urlPath = `/system/jobs/{jobGroup}/{jobName}`;
|
|
303
|
-
urlPath = urlPath.replace(
|
|
304
|
-
urlPath = urlPath.replace(
|
|
307
|
+
urlPath = urlPath.replace("{jobGroup}", encodeURIComponent(String(requestParameters["jobGroup"])));
|
|
308
|
+
urlPath = urlPath.replace("{jobName}", encodeURIComponent(String(requestParameters["jobName"])));
|
|
305
309
|
return {
|
|
306
310
|
path: urlPath,
|
|
307
311
|
method: "PATCH",
|
|
@@ -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.8.2
|
|
6
6
|
*
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime.js';
|
|
13
|
-
import type
|
|
13
|
+
import { type ClusterInformation } from '../models/ClusterInformation.js';
|
|
14
|
+
import { type Version } from '../models/Version.js';
|
|
14
15
|
/**
|
|
15
16
|
*
|
|
16
17
|
*/
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import * as runtime from "../runtime.js";
|
|
2
2
|
import {
|
|
3
|
-
ClusterInformationFromJSON
|
|
3
|
+
ClusterInformationFromJSON
|
|
4
|
+
} from "../models/ClusterInformation.js";
|
|
5
|
+
import {
|
|
4
6
|
VersionFromJSON
|
|
5
|
-
} from "../models/
|
|
7
|
+
} from "../models/Version.js";
|
|
6
8
|
export class SystemApi extends runtime.BaseAPI {
|
|
7
9
|
/**
|
|
8
10
|
* Creates request options for version without sending the request
|
|
@@ -42,7 +44,7 @@ export class SystemApi extends runtime.BaseAPI {
|
|
|
42
44
|
const queryParameters = {};
|
|
43
45
|
const headerParameters = {};
|
|
44
46
|
if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
|
|
45
|
-
headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
|
|
47
|
+
headerParameters["Authorization"] = "Basic " + btoa((this.configuration.username || "") + ":" + (this.configuration.password || ""));
|
|
46
48
|
}
|
|
47
49
|
if (this.configuration && this.configuration.accessToken) {
|
|
48
50
|
const token = this.configuration.accessToken;
|
|
@@ -6,21 +6,24 @@ All URIs are relative to *http://localhost*
|
|
|
6
6
|
|------------- | ------------- | -------------|
|
|
7
7
|
| [**aggregate**](CollectionApi.md#aggregate) | **POST** /mongodb/collections/{collectionName}/aggregate | Aggregate in Collection |
|
|
8
8
|
| [**clearCollection**](CollectionApi.md#clearcollection) | **DELETE** /mongodb/collections/{collectionName}/clear | Clear Collection |
|
|
9
|
+
| [**copyCollection**](CollectionApi.md#copycollection) | **POST** /mongodb/collections/{collectionName}/copy | Copy Collection |
|
|
9
10
|
| [**deleteCollection**](CollectionApi.md#deletecollection) | **DELETE** /mongodb/collections/{collectionName} | Delete Collection |
|
|
10
11
|
| [**distinct**](CollectionApi.md#distinct) | **POST** /mongodb/collections/{collectionName}/distinct/{field} | Distinct in Collection |
|
|
11
12
|
| [**getCollectionFields**](CollectionApi.md#getcollectionfields) | **GET** /mongodb/collections/{collectionName}/fields | Collection Fields |
|
|
12
13
|
| [**getCollectionInformation**](CollectionApi.md#getcollectioninformation) | **GET** /mongodb/collections/{collectionName} | Collection Information |
|
|
14
|
+
| [**getFieldDetails**](CollectionApi.md#getfielddetails) | **GET** /mongodb/collections/{collectionName}/fields/detail | Fields of a Collection with types |
|
|
13
15
|
| [**getJsonSchema**](CollectionApi.md#getjsonschema) | **GET** /mongodb/collections/{collectionName}/schema | Collection Fields |
|
|
14
16
|
| [**getSchemaAnalysis**](CollectionApi.md#getschemaanalysis) | **GET** /mongodb/collections/{collectionName}/schema/analysis | Collection Fields |
|
|
15
17
|
| [**listCollectionInformation**](CollectionApi.md#listcollectioninformation) | **GET** /mongodb/collections/info | Information of all Collections |
|
|
16
18
|
| [**listCollections**](CollectionApi.md#listcollections) | **GET** /mongodb/collections | List of Collections |
|
|
17
19
|
| [**listCollectionsByDatabase**](CollectionApi.md#listcollectionsbydatabase) | **GET** /mongodb/databases/{databaseName}/collections | List of Collections |
|
|
20
|
+
| [**renameCollection**](CollectionApi.md#renamecollection) | **POST** /mongodb/collections/{collectionName}/rename | Rename Collection |
|
|
18
21
|
|
|
19
22
|
|
|
20
23
|
|
|
21
24
|
## aggregate
|
|
22
25
|
|
|
23
|
-
> Array<{ [key: string]: any; }> aggregate(collectionName, mongoAggregateRequest, rowsPerPage, page, filter)
|
|
26
|
+
> Array<{ [key: string]: any | null; }> aggregate(collectionName, mongoAggregateRequest, rowsPerPage, page, filter, extendedJson)
|
|
24
27
|
|
|
25
28
|
Aggregate in Collection
|
|
26
29
|
|
|
@@ -59,6 +62,8 @@ async function example() {
|
|
|
59
62
|
page: 1,
|
|
60
63
|
// string | Filter Query like on the list of documents, applied as the first stage of the pipeline. Not possible for a pipeline that starts with $geoNear, $search or $vectorSearch. (optional)
|
|
61
64
|
filter: filter_example,
|
|
65
|
+
// string | relaxed or canonical: the documents with the types of their values as MongoDB Extended JSON ({\"$oid\": ...}, {\"$date\": ...}, {\"$numberDecimal\": ...}, canonical also {\"$numberInt\": ...}, {\"$numberLong\": ...} and {\"$numberDouble\": ...}). Without the parameter the documents are returned as before. (optional)
|
|
66
|
+
extendedJson: extendedJson_example,
|
|
62
67
|
} satisfies AggregateRequest;
|
|
63
68
|
|
|
64
69
|
try {
|
|
@@ -83,10 +88,11 @@ example().catch(console.error);
|
|
|
83
88
|
| **rowsPerPage** | `number` | Count elements per page | [Optional] [Defaults to `undefined`] |
|
|
84
89
|
| **page** | `number` | Requested page of the ResultSets | [Optional] [Defaults to `undefined`] |
|
|
85
90
|
| **filter** | `string` | Filter Query like on the list of documents, applied as the first stage of the pipeline. Not possible for a pipeline that starts with $geoNear, $search or $vectorSearch. | [Optional] [Defaults to `undefined`] |
|
|
91
|
+
| **extendedJson** | `string` | relaxed or canonical: the documents with the types of their values as MongoDB Extended JSON ({\"$oid\": ...}, {\"$date\": ...}, {\"$numberDecimal\": ...}, canonical also {\"$numberInt\": ...}, {\"$numberLong\": ...} and {\"$numberDouble\": ...}). Without the parameter the documents are returned as before. | [Optional] [Defaults to `undefined`] |
|
|
86
92
|
|
|
87
93
|
### Return type
|
|
88
94
|
|
|
89
|
-
**Array<{ [key: string]: any; }>**
|
|
95
|
+
**Array<{ [key: string]: any | null; }>**
|
|
90
96
|
|
|
91
97
|
### Authorization
|
|
92
98
|
|
|
@@ -185,6 +191,87 @@ example().catch(console.error);
|
|
|
185
191
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
186
192
|
|
|
187
193
|
|
|
194
|
+
## copyCollection
|
|
195
|
+
|
|
196
|
+
> CopyResponse copyCollection(collectionName, copyRequest)
|
|
197
|
+
|
|
198
|
+
Copy Collection
|
|
199
|
+
|
|
200
|
+
Copy a Collection in the database, optionally only the documents that match a Lucene filter, with its indices (withIndexes, true by default). The target is a name in the database of the Collection. The read grant for the Collection and the write grant for the target are needed. An existing target is a conflict (409), unless dropTarget is true and the user has the administrate grant for it: it is replaced when the copy is complete. The copy is made in one request, a big collection takes its time.
|
|
201
|
+
|
|
202
|
+
### Example
|
|
203
|
+
|
|
204
|
+
```ts
|
|
205
|
+
import {
|
|
206
|
+
Configuration,
|
|
207
|
+
CollectionApi,
|
|
208
|
+
} from '';
|
|
209
|
+
import type { CopyCollectionRequest } from '';
|
|
210
|
+
|
|
211
|
+
async function example() {
|
|
212
|
+
console.log("🚀 Testing SDK...");
|
|
213
|
+
const config = new Configuration({
|
|
214
|
+
// To configure HTTP basic authorization: httpAuth1
|
|
215
|
+
username: "YOUR USERNAME",
|
|
216
|
+
password: "YOUR PASSWORD",
|
|
217
|
+
// Configure HTTP bearer authorization: httpAuth
|
|
218
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
219
|
+
// To configure API key authorization: apiKeyAuth
|
|
220
|
+
apiKey: "YOUR API KEY",
|
|
221
|
+
});
|
|
222
|
+
const api = new CollectionApi(config);
|
|
223
|
+
|
|
224
|
+
const body = {
|
|
225
|
+
// string | The name of your MongoDb Collection
|
|
226
|
+
collectionName: collectionName_example,
|
|
227
|
+
// CopyRequest
|
|
228
|
+
copyRequest: {"target":"copyOfCollection","filter":"type:company","withIndexes":true,"dropTarget":false},
|
|
229
|
+
} satisfies CopyCollectionRequest;
|
|
230
|
+
|
|
231
|
+
try {
|
|
232
|
+
const data = await api.copyCollection(body);
|
|
233
|
+
console.log(data);
|
|
234
|
+
} catch (error) {
|
|
235
|
+
console.error(error);
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
// Run the test
|
|
240
|
+
example().catch(console.error);
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
### Parameters
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
| Name | Type | Description | Notes |
|
|
247
|
+
|------------- | ------------- | ------------- | -------------|
|
|
248
|
+
| **collectionName** | `string` | The name of your MongoDb Collection | [Defaults to `undefined`] |
|
|
249
|
+
| **copyRequest** | [CopyRequest](CopyRequest.md) | | |
|
|
250
|
+
|
|
251
|
+
### Return type
|
|
252
|
+
|
|
253
|
+
[**CopyResponse**](CopyResponse.md)
|
|
254
|
+
|
|
255
|
+
### Authorization
|
|
256
|
+
|
|
257
|
+
[httpAuth1](../README.md#httpAuth1), [httpAuth](../README.md#httpAuth), [apiKeyAuth](../README.md#apiKeyAuth)
|
|
258
|
+
|
|
259
|
+
### HTTP request headers
|
|
260
|
+
|
|
261
|
+
- **Content-Type**: `application/json`
|
|
262
|
+
- **Accept**: `application/json`, `text/plain`
|
|
263
|
+
|
|
264
|
+
|
|
265
|
+
### HTTP response details
|
|
266
|
+
| Status code | Description | Response headers |
|
|
267
|
+
|-------------|-------------|------------------|
|
|
268
|
+
| **200** | | - |
|
|
269
|
+
| **400** | Invalid value for: body | - |
|
|
270
|
+
| **0** | | * x-error-code - Error Code <br> * x-error-message - Message of the MongoCampException <br> * x-error-additional-info - Additional information for the MongoCampException <br> |
|
|
271
|
+
|
|
272
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
273
|
+
|
|
274
|
+
|
|
188
275
|
## deleteCollection
|
|
189
276
|
|
|
190
277
|
> JsonValueBoolean deleteCollection(collectionName)
|
|
@@ -511,6 +598,90 @@ example().catch(console.error);
|
|
|
511
598
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
512
599
|
|
|
513
600
|
|
|
601
|
+
## getFieldDetails
|
|
602
|
+
|
|
603
|
+
> Array<FieldInfo> getFieldDetails(collectionName, sampleSize, depth)
|
|
604
|
+
|
|
605
|
+
Fields of a Collection with types
|
|
606
|
+
|
|
607
|
+
All fields of a collection as a flat list, one entry per path (`address.city`, `tags[]` for the elements of an array) with the types of the values and how often every type was found in the analysed documents.
|
|
608
|
+
|
|
609
|
+
### Example
|
|
610
|
+
|
|
611
|
+
```ts
|
|
612
|
+
import {
|
|
613
|
+
Configuration,
|
|
614
|
+
CollectionApi,
|
|
615
|
+
} from '';
|
|
616
|
+
import type { GetFieldDetailsRequest } from '';
|
|
617
|
+
|
|
618
|
+
async function example() {
|
|
619
|
+
console.log("🚀 Testing SDK...");
|
|
620
|
+
const config = new Configuration({
|
|
621
|
+
// To configure HTTP basic authorization: httpAuth1
|
|
622
|
+
username: "YOUR USERNAME",
|
|
623
|
+
password: "YOUR PASSWORD",
|
|
624
|
+
// Configure HTTP bearer authorization: httpAuth
|
|
625
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
626
|
+
// To configure API key authorization: apiKeyAuth
|
|
627
|
+
apiKey: "YOUR API KEY",
|
|
628
|
+
});
|
|
629
|
+
const api = new CollectionApi(config);
|
|
630
|
+
|
|
631
|
+
const body = {
|
|
632
|
+
// string | The name of your MongoDb Collection
|
|
633
|
+
collectionName: collectionName_example,
|
|
634
|
+
// number | Number of documents that are analysed, 1000 by default. A greater sample is more exact and slower on big collections. (optional)
|
|
635
|
+
sampleSize: 1000,
|
|
636
|
+
// number | How deep should the objects extracted (optional)
|
|
637
|
+
depth: 56,
|
|
638
|
+
} satisfies GetFieldDetailsRequest;
|
|
639
|
+
|
|
640
|
+
try {
|
|
641
|
+
const data = await api.getFieldDetails(body);
|
|
642
|
+
console.log(data);
|
|
643
|
+
} catch (error) {
|
|
644
|
+
console.error(error);
|
|
645
|
+
}
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
// Run the test
|
|
649
|
+
example().catch(console.error);
|
|
650
|
+
```
|
|
651
|
+
|
|
652
|
+
### Parameters
|
|
653
|
+
|
|
654
|
+
|
|
655
|
+
| Name | Type | Description | Notes |
|
|
656
|
+
|------------- | ------------- | ------------- | -------------|
|
|
657
|
+
| **collectionName** | `string` | The name of your MongoDb Collection | [Defaults to `undefined`] |
|
|
658
|
+
| **sampleSize** | `number` | Number of documents that are analysed, 1000 by default. A greater sample is more exact and slower on big collections. | [Optional] [Defaults to `1000`] |
|
|
659
|
+
| **depth** | `number` | How deep should the objects extracted | [Optional] [Defaults to `3`] |
|
|
660
|
+
|
|
661
|
+
### Return type
|
|
662
|
+
|
|
663
|
+
[**Array<FieldInfo>**](FieldInfo.md)
|
|
664
|
+
|
|
665
|
+
### Authorization
|
|
666
|
+
|
|
667
|
+
[httpAuth1](../README.md#httpAuth1), [httpAuth](../README.md#httpAuth), [apiKeyAuth](../README.md#apiKeyAuth)
|
|
668
|
+
|
|
669
|
+
### HTTP request headers
|
|
670
|
+
|
|
671
|
+
- **Content-Type**: Not defined
|
|
672
|
+
- **Accept**: `application/json`, `text/plain`
|
|
673
|
+
|
|
674
|
+
|
|
675
|
+
### HTTP response details
|
|
676
|
+
| Status code | Description | Response headers |
|
|
677
|
+
|-------------|-------------|------------------|
|
|
678
|
+
| **200** | | - |
|
|
679
|
+
| **400** | Invalid value for: query parameter sampleSize, Invalid value for: query parameter depth | - |
|
|
680
|
+
| **0** | | * x-error-code - Error Code <br> * x-error-message - Message of the MongoCampException <br> * x-error-additional-info - Additional information for the MongoCampException <br> |
|
|
681
|
+
|
|
682
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
683
|
+
|
|
684
|
+
|
|
514
685
|
## getJsonSchema
|
|
515
686
|
|
|
516
687
|
> JsonSchema getJsonSchema(collectionName, sampleSize, deepth)
|
|
@@ -901,3 +1072,84 @@ example().catch(console.error);
|
|
|
901
1072
|
|
|
902
1073
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
903
1074
|
|
|
1075
|
+
|
|
1076
|
+
## renameCollection
|
|
1077
|
+
|
|
1078
|
+
> RenameResponse renameCollection(collectionName, renameRequest)
|
|
1079
|
+
|
|
1080
|
+
Rename Collection
|
|
1081
|
+
|
|
1082
|
+
Rename a Collection in the database, with its Documents and Indices. The target is a name in the database of the Collection. The administrate grant for the Collection and the write grant for the target are needed. An existing target is a conflict (409), unless dropTarget is true and the user has the administrate grant for it: it is replaced then.
|
|
1083
|
+
|
|
1084
|
+
### Example
|
|
1085
|
+
|
|
1086
|
+
```ts
|
|
1087
|
+
import {
|
|
1088
|
+
Configuration,
|
|
1089
|
+
CollectionApi,
|
|
1090
|
+
} from '';
|
|
1091
|
+
import type { RenameCollectionRequest } from '';
|
|
1092
|
+
|
|
1093
|
+
async function example() {
|
|
1094
|
+
console.log("🚀 Testing SDK...");
|
|
1095
|
+
const config = new Configuration({
|
|
1096
|
+
// To configure HTTP basic authorization: httpAuth1
|
|
1097
|
+
username: "YOUR USERNAME",
|
|
1098
|
+
password: "YOUR PASSWORD",
|
|
1099
|
+
// Configure HTTP bearer authorization: httpAuth
|
|
1100
|
+
accessToken: "YOUR BEARER TOKEN",
|
|
1101
|
+
// To configure API key authorization: apiKeyAuth
|
|
1102
|
+
apiKey: "YOUR API KEY",
|
|
1103
|
+
});
|
|
1104
|
+
const api = new CollectionApi(config);
|
|
1105
|
+
|
|
1106
|
+
const body = {
|
|
1107
|
+
// string | The name of your MongoDb Collection
|
|
1108
|
+
collectionName: collectionName_example,
|
|
1109
|
+
// RenameRequest
|
|
1110
|
+
renameRequest: {"target":"newName","dropTarget":false},
|
|
1111
|
+
} satisfies RenameCollectionRequest;
|
|
1112
|
+
|
|
1113
|
+
try {
|
|
1114
|
+
const data = await api.renameCollection(body);
|
|
1115
|
+
console.log(data);
|
|
1116
|
+
} catch (error) {
|
|
1117
|
+
console.error(error);
|
|
1118
|
+
}
|
|
1119
|
+
}
|
|
1120
|
+
|
|
1121
|
+
// Run the test
|
|
1122
|
+
example().catch(console.error);
|
|
1123
|
+
```
|
|
1124
|
+
|
|
1125
|
+
### Parameters
|
|
1126
|
+
|
|
1127
|
+
|
|
1128
|
+
| Name | Type | Description | Notes |
|
|
1129
|
+
|------------- | ------------- | ------------- | -------------|
|
|
1130
|
+
| **collectionName** | `string` | The name of your MongoDb Collection | [Defaults to `undefined`] |
|
|
1131
|
+
| **renameRequest** | [RenameRequest](RenameRequest.md) | | |
|
|
1132
|
+
|
|
1133
|
+
### Return type
|
|
1134
|
+
|
|
1135
|
+
[**RenameResponse**](RenameResponse.md)
|
|
1136
|
+
|
|
1137
|
+
### Authorization
|
|
1138
|
+
|
|
1139
|
+
[httpAuth1](../README.md#httpAuth1), [httpAuth](../README.md#httpAuth), [apiKeyAuth](../README.md#apiKeyAuth)
|
|
1140
|
+
|
|
1141
|
+
### HTTP request headers
|
|
1142
|
+
|
|
1143
|
+
- **Content-Type**: `application/json`
|
|
1144
|
+
- **Accept**: `application/json`, `text/plain`
|
|
1145
|
+
|
|
1146
|
+
|
|
1147
|
+
### HTTP response details
|
|
1148
|
+
| Status code | Description | Response headers |
|
|
1149
|
+
|-------------|-------------|------------------|
|
|
1150
|
+
| **200** | | - |
|
|
1151
|
+
| **400** | Invalid value for: body | - |
|
|
1152
|
+
| **0** | | * x-error-code - Error Code <br> * x-error-message - Message of the MongoCampException <br> * x-error-additional-info - Additional information for the MongoCampException <br> |
|
|
1153
|
+
|
|
1154
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1155
|
+
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
|
|
2
|
+
# CopyRequest
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`target` | string
|
|
10
|
+
`filter` | string
|
|
11
|
+
`withIndexes` | boolean
|
|
12
|
+
`dropTarget` | boolean
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
import type { CopyRequest } from ''
|
|
18
|
+
|
|
19
|
+
// TODO: Update the object below with actual values
|
|
20
|
+
const example = {
|
|
21
|
+
"target": null,
|
|
22
|
+
"filter": null,
|
|
23
|
+
"withIndexes": null,
|
|
24
|
+
"dropTarget": null,
|
|
25
|
+
} satisfies CopyRequest
|
|
26
|
+
|
|
27
|
+
console.log(example)
|
|
28
|
+
|
|
29
|
+
// Convert the instance to a JSON string
|
|
30
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
31
|
+
console.log(exampleJSON)
|
|
32
|
+
|
|
33
|
+
// Parse the JSON string back to an object
|
|
34
|
+
const exampleParsed = JSON.parse(exampleJSON) as CopyRequest
|
|
35
|
+
console.log(exampleParsed)
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
39
|
+
|
|
40
|
+
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
|
|
2
|
+
# CopyResponse
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`name` | string
|
|
10
|
+
`count` | number
|
|
11
|
+
`indexes` | number
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import type { CopyResponse } from ''
|
|
17
|
+
|
|
18
|
+
// TODO: Update the object below with actual values
|
|
19
|
+
const example = {
|
|
20
|
+
"name": null,
|
|
21
|
+
"count": null,
|
|
22
|
+
"indexes": null,
|
|
23
|
+
} satisfies CopyResponse
|
|
24
|
+
|
|
25
|
+
console.log(example)
|
|
26
|
+
|
|
27
|
+
// Convert the instance to a JSON string
|
|
28
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
29
|
+
console.log(exampleJSON)
|
|
30
|
+
|
|
31
|
+
// Parse the JSON string back to an object
|
|
32
|
+
const exampleParsed = JSON.parse(exampleJSON) as CopyResponse
|
|
33
|
+
console.log(exampleParsed)
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
37
|
+
|
|
38
|
+
|