@sfxcode/nuxt-mongocamp-server 1.5.1 → 1.6.3
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 +3 -3
- package/dist/module.d.mts +1 -1
- package/dist/module.json +1 -1
- package/dist/module.mjs +5 -1
- package/dist/runtime/api/.openapi-generator/FILES +6 -2
- 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 +3 -3
- package/dist/runtime/api/apis/AuthApi.js +2 -2
- package/dist/runtime/api/apis/BucketApi.d.ts +1 -1
- package/dist/runtime/api/apis/CollectionApi.d.ts +7 -7
- package/dist/runtime/api/apis/CollectionApi.js +2 -2
- package/dist/runtime/api/apis/DatabaseApi.d.ts +1 -1
- package/dist/runtime/api/apis/DocumentApi.d.ts +14 -12
- package/dist/runtime/api/apis/DocumentApi.js +6 -0
- package/dist/runtime/api/apis/FileApi.d.ts +1 -1
- package/dist/runtime/api/apis/IndexApi.d.ts +1 -1
- package/dist/runtime/api/apis/JobsApi.d.ts +1 -1
- package/dist/runtime/api/apis/{InformationApi.d.ts → SystemApi.d.ts} +17 -3
- package/dist/runtime/api/apis/SystemApi.js +82 -0
- package/dist/runtime/api/apis/index.d.ts +1 -1
- package/dist/runtime/api/apis/index.js +1 -1
- package/dist/runtime/api/docs/AdminApi.md +2 -2
- package/dist/runtime/api/docs/AuthApi.md +1 -1
- package/dist/runtime/api/docs/ClusterInformation.md +36 -0
- package/dist/runtime/api/docs/ClusterMemberInformation.md +42 -0
- package/dist/runtime/api/docs/CollectionApi.md +5 -5
- package/dist/runtime/api/docs/CollectionStatus.md +1 -1
- package/dist/runtime/api/docs/DatabaseInfo.md +1 -1
- package/dist/runtime/api/docs/DocumentApi.md +28 -22
- package/dist/runtime/api/docs/FileApi.md +2 -2
- package/dist/runtime/api/docs/FileInformation.md +1 -1
- package/dist/runtime/api/docs/IndexApi.md +2 -2
- package/dist/runtime/api/docs/JsonSchemaDefinition.md +1 -1
- package/dist/runtime/api/docs/JsonValueAny.md +1 -1
- package/dist/runtime/api/docs/MongoCampConfiguration.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/PipelineStage.md +1 -1
- package/dist/runtime/api/docs/SettingsResponse.md +1 -1
- package/dist/runtime/api/docs/SystemApi.md +139 -0
- 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 -1
- package/dist/runtime/api/models/ClusterInformation.d.ts +39 -0
- package/dist/runtime/api/models/ClusterInformation.js +32 -0
- package/dist/runtime/api/models/ClusterMemberInformation.d.ts +56 -0
- package/dist/runtime/api/models/ClusterMemberInformation.js +38 -0
- package/dist/runtime/api/models/CollectionStatus.d.ts +3 -3
- package/dist/runtime/api/models/DatabaseInfo.d.ts +3 -3
- 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 +3 -3
- 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/InsertResponse.d.ts +1 -1
- package/dist/runtime/api/models/JobConfig.d.ts +1 -1
- package/dist/runtime/api/models/JobInformation.d.ts +2 -2
- package/dist/runtime/api/models/JobInformation.js +1 -2
- package/dist/runtime/api/models/JsonSchema.d.ts +1 -1
- package/dist/runtime/api/models/JsonSchemaDefinition.d.ts +3 -3
- package/dist/runtime/api/models/JsonValueAny.d.ts +3 -3
- 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 +3 -3
- package/dist/runtime/api/models/MongoFindRequest.d.ts +7 -7
- package/dist/runtime/api/models/MongoIndex.d.ts +7 -7
- package/dist/runtime/api/models/PasswordUpdateRequest.d.ts +1 -1
- package/dist/runtime/api/models/PipelineStage.d.ts +3 -3
- 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/SettingsResponse.d.ts +3 -3
- package/dist/runtime/api/models/UpdateFileInformationRequest.d.ts +3 -3
- package/dist/runtime/api/models/UpdateRequest.d.ts +5 -5
- 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 +2 -0
- package/dist/runtime/api/models/index.js +2 -0
- package/dist/runtime/api/runtime.d.ts +1 -1
- package/dist/runtime/composables/mongocampApi.d.ts +1 -1
- package/dist/runtime/composables/mongocampApi.js +16 -1
- package/dist/runtime/composables/mongocampApiCollection.d.ts +2 -2
- package/dist/runtime/composables/mongocampAuth.js +1 -6
- package/dist/runtime/composables/mongocampSearch.d.ts +3 -3
- package/dist/runtime/composables/mongocampStorage.d.ts +1 -1
- package/dist/runtime/composables/mongocampStorage.js +3 -1
- package/dist/runtime/composables/mongocampUser.d.ts +2 -2
- package/dist/runtime/composables/mongocampUser.js +4 -2
- package/dist/runtime/server/composables/mongocampApi.d.ts +1 -1
- package/dist/runtime/server/composables/mongocampServerApi.d.ts +1 -1
- package/dist/runtime/utils/createMongocampApis.d.ts +2 -2
- package/dist/runtime/utils/createMongocampApis.js +2 -2
- package/package.json +13 -13
- package/dist/runtime/api/apis/InformationApi.js +0 -37
package/README.md
CHANGED
|
@@ -28,7 +28,7 @@ export default defineNuxtConfig({
|
|
|
28
28
|
| `url` | `string` | — | Required. Base URL of the MongoCamp server. |
|
|
29
29
|
| `apiKey` | `string` | — | Optional. Stored server-side only; picked up automatically by `useMongocampApi(event)`. |
|
|
30
30
|
| `paginationSize` | `number` | `500` | Default rows per page for search/list composables. Values below 10 fall back to the default. |
|
|
31
|
-
| `refreshToken` | `boolean` |
|
|
31
|
+
| `refreshToken` | `boolean` | `false` | Whether the client auto-refreshes the session token on an interval after login. |
|
|
32
32
|
| `tokenRefreshInterval` | `number` | `5000` | Refresh interval in ms. Values below 5000 fall back to the default. |
|
|
33
33
|
| `sessionMaxAge` | `number` | `2592000` (30 days) | Max age in seconds of the `mongocamp-session` cookie. Values <= 0 fall back to the default. |
|
|
34
34
|
|
|
@@ -38,10 +38,10 @@ A missing `url` throws during `nuxi dev`/`nuxi build`/`nuxi generate` (not durin
|
|
|
38
38
|
|
|
39
39
|
| Composable | Purpose |
|
|
40
40
|
| ------------------------------------| ------------------------------------------------------------------------|
|
|
41
|
-
| `useMongocampApi()` | Builds all 11 generated API clients, authenticated with the browser session token. |
|
|
41
|
+
| `useMongocampApi()` | Builds all 11 generated API clients, authenticated with the browser session token. A `401` response from any of them clears the local session automatically. |
|
|
42
42
|
| `useMongocampAuth()` | Login/logout, `isLoggedIn`, `userRoles`/`userGrants`, and token-refresh lifecycle. |
|
|
43
43
|
| `useMongocampStorage()` | The session cookie (`{ token, profile }`) backing auth state; SSR-safe. |
|
|
44
|
-
| `useMongocampUser()` | Reactive current user profile.
|
|
44
|
+
| `useMongocampUser()` | Reactive current user profile, derived from `useMongocampStorage()` (read-only). |
|
|
45
45
|
| `useMongocampUrl()` | The configured base URL. |
|
|
46
46
|
| `useMongocampSearch()` | `find`/`findAll`/`findByField` document search helpers. |
|
|
47
47
|
| `usePaginatedFind(collection, opts)`| Reactive pagination wrapper (`page`, `documents`, `pending`, `error`, `nextPage`/`previousPage`/`goToPage`). |
|
package/dist/module.d.mts
CHANGED
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -4,7 +4,7 @@ import { consola } from 'consola';
|
|
|
4
4
|
export * from '../dist/runtime/api/index.js';
|
|
5
5
|
|
|
6
6
|
const name = "@sfxcode/nuxt-mongocamp-server";
|
|
7
|
-
const version = "1.
|
|
7
|
+
const version = "1.6.3";
|
|
8
8
|
|
|
9
9
|
const module$1 = defineNuxtModule({
|
|
10
10
|
meta: {
|
|
@@ -30,6 +30,10 @@ const module$1 = defineNuxtModule({
|
|
|
30
30
|
consola.warn(`[mongocamp] tokenRefreshInterval of ${options.tokenRefreshInterval} is below the minimum of 5000, falling back to 5000`);
|
|
31
31
|
if (!options.tokenRefreshInterval || options.tokenRefreshInterval < 5e3)
|
|
32
32
|
options.tokenRefreshInterval = 5e3;
|
|
33
|
+
if (options.refreshToken === void 0) {
|
|
34
|
+
consola.warn('[mongocamp] "refreshToken" module option is not set, falling back to false (no auto token refresh)');
|
|
35
|
+
options.refreshToken = false;
|
|
36
|
+
}
|
|
33
37
|
if (!options.sessionMaxAge || options.sessionMaxAge <= 0)
|
|
34
38
|
options.sessionMaxAge = 60 * 60 * 24 * 30;
|
|
35
39
|
nuxt.options.runtimeConfig.public.mongocamp = defu(
|
|
@@ -7,14 +7,16 @@ apis/DatabaseApi.ts
|
|
|
7
7
|
apis/DocumentApi.ts
|
|
8
8
|
apis/FileApi.ts
|
|
9
9
|
apis/IndexApi.ts
|
|
10
|
-
apis/InformationApi.ts
|
|
11
10
|
apis/JobsApi.ts
|
|
11
|
+
apis/SystemApi.ts
|
|
12
12
|
apis/index.ts
|
|
13
13
|
docs/AdminApi.md
|
|
14
14
|
docs/ApplicationApi.md
|
|
15
15
|
docs/AuthApi.md
|
|
16
16
|
docs/BucketApi.md
|
|
17
17
|
docs/BucketInformation.md
|
|
18
|
+
docs/ClusterInformation.md
|
|
19
|
+
docs/ClusterMemberInformation.md
|
|
18
20
|
docs/CollectionApi.md
|
|
19
21
|
docs/CollectionStatus.md
|
|
20
22
|
docs/DatabaseApi.md
|
|
@@ -30,7 +32,6 @@ docs/IndexCreateRequest.md
|
|
|
30
32
|
docs/IndexCreateResponse.md
|
|
31
33
|
docs/IndexDropResponse.md
|
|
32
34
|
docs/IndexOptionsRequest.md
|
|
33
|
-
docs/InformationApi.md
|
|
34
35
|
docs/InsertResponse.md
|
|
35
36
|
docs/JobConfig.md
|
|
36
37
|
docs/JobInformation.md
|
|
@@ -53,6 +54,7 @@ docs/SchemaAnalysis.md
|
|
|
53
54
|
docs/SchemaAnalysisField.md
|
|
54
55
|
docs/SchemaAnalysisFieldType.md
|
|
55
56
|
docs/SettingsResponse.md
|
|
57
|
+
docs/SystemApi.md
|
|
56
58
|
docs/UpdateFileInformationRequest.md
|
|
57
59
|
docs/UpdateRequest.md
|
|
58
60
|
docs/UpdateResponse.md
|
|
@@ -62,6 +64,8 @@ docs/UserProfile.md
|
|
|
62
64
|
docs/Version.md
|
|
63
65
|
index.ts
|
|
64
66
|
models/BucketInformation.ts
|
|
67
|
+
models/ClusterInformation.ts
|
|
68
|
+
models/ClusterMemberInformation.ts
|
|
65
69
|
models/CollectionStatus.ts
|
|
66
70
|
models/DatabaseInfo.ts
|
|
67
71
|
models/DeleteResponse.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.6.3
|
|
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.6.3
|
|
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.6.3
|
|
6
6
|
*
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -96,12 +96,12 @@ export declare class AuthApi extends runtime.BaseAPI {
|
|
|
96
96
|
*/
|
|
97
97
|
refreshTokenRequestOpts(): Promise<runtime.RequestOpts>;
|
|
98
98
|
/**
|
|
99
|
-
* Refresh Token and return Login Information
|
|
99
|
+
* Refresh Token and return Login Information. A new token is issued on every call, the bearer token that was used for the call stays valid for a grace period (AUTH_REFRESH_GRACE_DURATION, default 60 seconds) and is invalid afterwards.
|
|
100
100
|
* Refresh User
|
|
101
101
|
*/
|
|
102
102
|
refreshTokenRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LoginResult>>;
|
|
103
103
|
/**
|
|
104
|
-
* Refresh Token and return Login Information
|
|
104
|
+
* Refresh Token and return Login Information. A new token is issued on every call, the bearer token that was used for the call stays valid for a grace period (AUTH_REFRESH_GRACE_DURATION, default 60 seconds) and is invalid afterwards.
|
|
105
105
|
* Refresh User
|
|
106
106
|
*/
|
|
107
107
|
refreshToken(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LoginResult>;
|
|
@@ -251,7 +251,7 @@ export class AuthApi extends runtime.BaseAPI {
|
|
|
251
251
|
};
|
|
252
252
|
}
|
|
253
253
|
/**
|
|
254
|
-
* Refresh Token and return Login Information
|
|
254
|
+
* Refresh Token and return Login Information. A new token is issued on every call, the bearer token that was used for the call stays valid for a grace period (AUTH_REFRESH_GRACE_DURATION, default 60 seconds) and is invalid afterwards.
|
|
255
255
|
* Refresh User
|
|
256
256
|
*/
|
|
257
257
|
async refreshTokenRaw(initOverrides) {
|
|
@@ -260,7 +260,7 @@ export class AuthApi extends runtime.BaseAPI {
|
|
|
260
260
|
return new runtime.JSONApiResponse(response, (jsonValue) => LoginResultFromJSON(jsonValue));
|
|
261
261
|
}
|
|
262
262
|
/**
|
|
263
|
-
* Refresh Token and return Login Information
|
|
263
|
+
* Refresh Token and return Login Information. A new token is issued on every call, the bearer token that was used for the call stays valid for a grace period (AUTH_REFRESH_GRACE_DURATION, default 60 seconds) and is invalid afterwards.
|
|
264
264
|
* Refresh User
|
|
265
265
|
*/
|
|
266
266
|
async refreshToken(initOverrides) {
|
|
@@ -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.6.3
|
|
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.6.3
|
|
6
6
|
*
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -59,18 +59,18 @@ export declare class CollectionApi extends runtime.BaseAPI {
|
|
|
59
59
|
*/
|
|
60
60
|
aggregateRequestOpts(requestParameters: AggregateRequest): Promise<runtime.RequestOpts>;
|
|
61
61
|
/**
|
|
62
|
-
* Aggregate in a given Collection
|
|
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.
|
|
63
63
|
* Aggregate in Collection
|
|
64
64
|
*/
|
|
65
65
|
aggregateRaw(requestParameters: AggregateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<{
|
|
66
|
-
[key: string]:
|
|
66
|
+
[key: string]: any;
|
|
67
67
|
}>>>;
|
|
68
68
|
/**
|
|
69
|
-
* Aggregate in a given Collection
|
|
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.
|
|
70
70
|
* Aggregate in Collection
|
|
71
71
|
*/
|
|
72
72
|
aggregate(requestParameters: AggregateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<{
|
|
73
|
-
[key: string]:
|
|
73
|
+
[key: string]: any;
|
|
74
74
|
}>>;
|
|
75
75
|
/**
|
|
76
76
|
* Creates request options for clearCollection without sending the request
|
|
@@ -108,12 +108,12 @@ export declare class CollectionApi extends runtime.BaseAPI {
|
|
|
108
108
|
* Distinct for Field in a given Collection
|
|
109
109
|
* Distinct in Collection
|
|
110
110
|
*/
|
|
111
|
-
distinctRaw(requestParameters: DistinctRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<
|
|
111
|
+
distinctRaw(requestParameters: DistinctRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<any>>>;
|
|
112
112
|
/**
|
|
113
113
|
* Distinct for Field in a given Collection
|
|
114
114
|
* Distinct in Collection
|
|
115
115
|
*/
|
|
116
|
-
distinct(requestParameters: DistinctRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<
|
|
116
|
+
distinct(requestParameters: DistinctRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<any>>;
|
|
117
117
|
/**
|
|
118
118
|
* Creates request options for getCollectionFields without sending the request
|
|
119
119
|
*/
|
|
@@ -56,7 +56,7 @@ export class CollectionApi extends runtime.BaseAPI {
|
|
|
56
56
|
};
|
|
57
57
|
}
|
|
58
58
|
/**
|
|
59
|
-
* Aggregate in a given Collection
|
|
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.
|
|
60
60
|
* Aggregate in Collection
|
|
61
61
|
*/
|
|
62
62
|
async aggregateRaw(requestParameters, initOverrides) {
|
|
@@ -65,7 +65,7 @@ export class CollectionApi extends runtime.BaseAPI {
|
|
|
65
65
|
return new runtime.JSONApiResponse(response);
|
|
66
66
|
}
|
|
67
67
|
/**
|
|
68
|
-
* Aggregate in a given Collection
|
|
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.
|
|
69
69
|
* Aggregate in Collection
|
|
70
70
|
*/
|
|
71
71
|
async aggregate(requestParameters, initOverrides) {
|
|
@@ -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.6.3
|
|
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.6.3
|
|
6
6
|
*
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -18,8 +18,9 @@ export interface DeleteRequest {
|
|
|
18
18
|
export interface DeleteManyRequest {
|
|
19
19
|
collectionName: string;
|
|
20
20
|
requestBody: {
|
|
21
|
-
[key: string]:
|
|
21
|
+
[key: string]: any;
|
|
22
22
|
};
|
|
23
|
+
matchAll?: boolean;
|
|
23
24
|
}
|
|
24
25
|
export interface FindRequest {
|
|
25
26
|
collectionName: string;
|
|
@@ -34,13 +35,13 @@ export interface GetDocumentRequest {
|
|
|
34
35
|
export interface InsertRequest {
|
|
35
36
|
collectionName: string;
|
|
36
37
|
requestBody: {
|
|
37
|
-
[key: string]:
|
|
38
|
+
[key: string]: any;
|
|
38
39
|
};
|
|
39
40
|
}
|
|
40
41
|
export interface InsertManyRequest {
|
|
41
42
|
collectionName: string;
|
|
42
43
|
requestBody?: Array<{
|
|
43
|
-
[key: string]:
|
|
44
|
+
[key: string]: any;
|
|
44
45
|
}>;
|
|
45
46
|
}
|
|
46
47
|
export interface ListDocumentsRequest {
|
|
@@ -55,19 +56,20 @@ export interface UpdateRequest {
|
|
|
55
56
|
collectionName: string;
|
|
56
57
|
documentId: string;
|
|
57
58
|
requestBody: {
|
|
58
|
-
[key: string]:
|
|
59
|
+
[key: string]: any;
|
|
59
60
|
};
|
|
60
61
|
}
|
|
61
62
|
export interface UpdateDocumentPartialRequest {
|
|
62
63
|
collectionName: string;
|
|
63
64
|
documentId: string;
|
|
64
65
|
requestBody: {
|
|
65
|
-
[key: string]:
|
|
66
|
+
[key: string]: any;
|
|
66
67
|
};
|
|
67
68
|
}
|
|
68
69
|
export interface UpdateManyRequest {
|
|
69
70
|
collectionName: string;
|
|
70
71
|
updateRequest: UpdateRequest;
|
|
72
|
+
matchAll?: boolean;
|
|
71
73
|
}
|
|
72
74
|
/**
|
|
73
75
|
*
|
|
@@ -110,14 +112,14 @@ export declare class DocumentApi extends runtime.BaseAPI {
|
|
|
110
112
|
* Documents in Collection
|
|
111
113
|
*/
|
|
112
114
|
findRaw(requestParameters: FindRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<{
|
|
113
|
-
[key: string]:
|
|
115
|
+
[key: string]: any;
|
|
114
116
|
}>>>;
|
|
115
117
|
/**
|
|
116
118
|
* Alternative to GET Route for more complex queries and URL max. Length
|
|
117
119
|
* Documents in Collection
|
|
118
120
|
*/
|
|
119
121
|
find(requestParameters: FindRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<{
|
|
120
|
-
[key: string]:
|
|
122
|
+
[key: string]: any;
|
|
121
123
|
}>>;
|
|
122
124
|
/**
|
|
123
125
|
* Creates request options for getDocument without sending the request
|
|
@@ -128,14 +130,14 @@ export declare class DocumentApi extends runtime.BaseAPI {
|
|
|
128
130
|
* Document from Collection
|
|
129
131
|
*/
|
|
130
132
|
getDocumentRaw(requestParameters: GetDocumentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<{
|
|
131
|
-
[key: string]:
|
|
133
|
+
[key: string]: any;
|
|
132
134
|
}>>;
|
|
133
135
|
/**
|
|
134
136
|
* Get one Document from given Collection
|
|
135
137
|
* Document from Collection
|
|
136
138
|
*/
|
|
137
139
|
getDocument(requestParameters: GetDocumentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{
|
|
138
|
-
[key: string]:
|
|
140
|
+
[key: string]: any;
|
|
139
141
|
}>;
|
|
140
142
|
/**
|
|
141
143
|
* Creates request options for insert without sending the request
|
|
@@ -174,14 +176,14 @@ export declare class DocumentApi extends runtime.BaseAPI {
|
|
|
174
176
|
* Documents in Collection
|
|
175
177
|
*/
|
|
176
178
|
listDocumentsRaw(requestParameters: ListDocumentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<{
|
|
177
|
-
[key: string]:
|
|
179
|
+
[key: string]: any;
|
|
178
180
|
}>>>;
|
|
179
181
|
/**
|
|
180
182
|
* Get Documents paginated from given Collection
|
|
181
183
|
* Documents in Collection
|
|
182
184
|
*/
|
|
183
185
|
listDocuments(requestParameters: ListDocumentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<{
|
|
184
|
-
[key: string]:
|
|
186
|
+
[key: string]: any;
|
|
185
187
|
}>>;
|
|
186
188
|
/**
|
|
187
189
|
* Creates request options for update without sending the request
|
|
@@ -82,6 +82,9 @@ export class DocumentApi extends runtime.BaseAPI {
|
|
|
82
82
|
);
|
|
83
83
|
}
|
|
84
84
|
const queryParameters = {};
|
|
85
|
+
if (requestParameters["matchAll"] != null) {
|
|
86
|
+
queryParameters["matchAll"] = requestParameters["matchAll"];
|
|
87
|
+
}
|
|
85
88
|
const headerParameters = {};
|
|
86
89
|
headerParameters["Content-Type"] = "application/json";
|
|
87
90
|
if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
|
|
@@ -574,6 +577,9 @@ export class DocumentApi extends runtime.BaseAPI {
|
|
|
574
577
|
);
|
|
575
578
|
}
|
|
576
579
|
const queryParameters = {};
|
|
580
|
+
if (requestParameters["matchAll"] != null) {
|
|
581
|
+
queryParameters["matchAll"] = requestParameters["matchAll"];
|
|
582
|
+
}
|
|
577
583
|
const headerParameters = {};
|
|
578
584
|
headerParameters["Content-Type"] = "application/json";
|
|
579
585
|
if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
|
|
@@ -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.6.3
|
|
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.6.3
|
|
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.6.3
|
|
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.6.3
|
|
6
6
|
*
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime.js';
|
|
13
|
-
import type { Version } from '../models/index.js';
|
|
13
|
+
import type { ClusterInformation, Version } from '../models/index.js';
|
|
14
14
|
/**
|
|
15
15
|
*
|
|
16
16
|
*/
|
|
17
|
-
export declare class
|
|
17
|
+
export declare class SystemApi extends runtime.BaseAPI {
|
|
18
18
|
/**
|
|
19
19
|
* Creates request options for version without sending the request
|
|
20
20
|
*/
|
|
@@ -29,4 +29,18 @@ export declare class InformationApi extends runtime.BaseAPI {
|
|
|
29
29
|
* Version Information
|
|
30
30
|
*/
|
|
31
31
|
version(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Version>;
|
|
32
|
+
/**
|
|
33
|
+
* Creates request options for viewCluster without sending the request
|
|
34
|
+
*/
|
|
35
|
+
viewClusterRequestOpts(): Promise<runtime.RequestOpts>;
|
|
36
|
+
/**
|
|
37
|
+
* Returns the List of all registered Jobs with full information
|
|
38
|
+
* Registered Jobs
|
|
39
|
+
*/
|
|
40
|
+
viewClusterRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ClusterInformation>>;
|
|
41
|
+
/**
|
|
42
|
+
* Returns the List of all registered Jobs with full information
|
|
43
|
+
* Registered Jobs
|
|
44
|
+
*/
|
|
45
|
+
viewCluster(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ClusterInformation>;
|
|
32
46
|
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import * as runtime from "../runtime.js";
|
|
2
|
+
import {
|
|
3
|
+
ClusterInformationFromJSON,
|
|
4
|
+
VersionFromJSON
|
|
5
|
+
} from "../models/index.js";
|
|
6
|
+
export class SystemApi extends runtime.BaseAPI {
|
|
7
|
+
/**
|
|
8
|
+
* Creates request options for version without sending the request
|
|
9
|
+
*/
|
|
10
|
+
async versionRequestOpts() {
|
|
11
|
+
const queryParameters = {};
|
|
12
|
+
const headerParameters = {};
|
|
13
|
+
let urlPath = `/version`;
|
|
14
|
+
return {
|
|
15
|
+
path: urlPath,
|
|
16
|
+
method: "GET",
|
|
17
|
+
headers: headerParameters,
|
|
18
|
+
query: queryParameters
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Version Info of the MongoCamp API
|
|
23
|
+
* Version Information
|
|
24
|
+
*/
|
|
25
|
+
async versionRaw(initOverrides) {
|
|
26
|
+
const requestOptions = await this.versionRequestOpts();
|
|
27
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
28
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => VersionFromJSON(jsonValue));
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Version Info of the MongoCamp API
|
|
32
|
+
* Version Information
|
|
33
|
+
*/
|
|
34
|
+
async version(initOverrides) {
|
|
35
|
+
const response = await this.versionRaw(initOverrides);
|
|
36
|
+
return await response.value();
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Creates request options for viewCluster without sending the request
|
|
40
|
+
*/
|
|
41
|
+
async viewClusterRequestOpts() {
|
|
42
|
+
const queryParameters = {};
|
|
43
|
+
const headerParameters = {};
|
|
44
|
+
if (this.configuration && (this.configuration.username !== void 0 || this.configuration.password !== void 0)) {
|
|
45
|
+
headerParameters["Authorization"] = "Basic " + btoa(this.configuration.username + ":" + this.configuration.password);
|
|
46
|
+
}
|
|
47
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
48
|
+
const token = this.configuration.accessToken;
|
|
49
|
+
const tokenString = await token("httpAuth", []);
|
|
50
|
+
if (tokenString) {
|
|
51
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
55
|
+
headerParameters["X-AUTH-APIKEY"] = await this.configuration.apiKey("X-AUTH-APIKEY");
|
|
56
|
+
}
|
|
57
|
+
let urlPath = `/system/cluster`;
|
|
58
|
+
return {
|
|
59
|
+
path: urlPath,
|
|
60
|
+
method: "GET",
|
|
61
|
+
headers: headerParameters,
|
|
62
|
+
query: queryParameters
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Returns the List of all registered Jobs with full information
|
|
67
|
+
* Registered Jobs
|
|
68
|
+
*/
|
|
69
|
+
async viewClusterRaw(initOverrides) {
|
|
70
|
+
const requestOptions = await this.viewClusterRequestOpts();
|
|
71
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
72
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ClusterInformationFromJSON(jsonValue));
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Returns the List of all registered Jobs with full information
|
|
76
|
+
* Registered Jobs
|
|
77
|
+
*/
|
|
78
|
+
async viewCluster(initOverrides) {
|
|
79
|
+
const response = await this.viewClusterRaw(initOverrides);
|
|
80
|
+
return await response.value();
|
|
81
|
+
}
|
|
82
|
+
}
|
|
@@ -638,7 +638,7 @@ example().catch(console.error);
|
|
|
638
638
|
| Status code | Description | Response headers |
|
|
639
639
|
|-------------|-------------|------------------|
|
|
640
640
|
| **200** | | * x-pagination-count-rows - count all elements <br> * x-pagination-rows-per-page - Count elements per page <br> * x-pagination-current-page - Current page <br> * x-pagination-count-pages - Count pages <br> |
|
|
641
|
-
| **400** | Invalid value for: query parameter
|
|
641
|
+
| **400** | Invalid value for: query parameter rowsPerPage, Invalid value for: query parameter page | - |
|
|
642
642
|
| **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> |
|
|
643
643
|
|
|
644
644
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
@@ -722,7 +722,7 @@ example().catch(console.error);
|
|
|
722
722
|
| Status code | Description | Response headers |
|
|
723
723
|
|-------------|-------------|------------------|
|
|
724
724
|
| **200** | | * x-pagination-count-rows - count all elements <br> * x-pagination-rows-per-page - Count elements per page <br> * x-pagination-current-page - Current page <br> * x-pagination-count-pages - Count pages <br> |
|
|
725
|
-
| **400** | Invalid value for: query parameter
|
|
725
|
+
| **400** | Invalid value for: query parameter rowsPerPage, Invalid value for: query parameter page | - |
|
|
726
726
|
| **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> |
|
|
727
727
|
|
|
728
728
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
@@ -366,7 +366,7 @@ This endpoint does not need any parameter.
|
|
|
366
366
|
|
|
367
367
|
Refresh User
|
|
368
368
|
|
|
369
|
-
Refresh Token and return Login Information
|
|
369
|
+
Refresh Token and return Login Information. A new token is issued on every call, the bearer token that was used for the call stays valid for a grace period (AUTH_REFRESH_GRACE_DURATION, default 60 seconds) and is invalid afterwards.
|
|
370
370
|
|
|
371
371
|
### Example
|
|
372
372
|
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
|
|
2
|
+
# ClusterInformation
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`members` | [Array<ClusterMemberInformation>](ClusterMemberInformation.md)
|
|
10
|
+
`coordinator` | [ClusterMemberInformation](ClusterMemberInformation.md)
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import type { ClusterInformation } from ''
|
|
16
|
+
|
|
17
|
+
// TODO: Update the object below with actual values
|
|
18
|
+
const example = {
|
|
19
|
+
"members": null,
|
|
20
|
+
"coordinator": null,
|
|
21
|
+
} satisfies ClusterInformation
|
|
22
|
+
|
|
23
|
+
console.log(example)
|
|
24
|
+
|
|
25
|
+
// Convert the instance to a JSON string
|
|
26
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
27
|
+
console.log(exampleJSON)
|
|
28
|
+
|
|
29
|
+
// Parse the JSON string back to an object
|
|
30
|
+
const exampleParsed = JSON.parse(exampleJSON) as ClusterInformation
|
|
31
|
+
console.log(exampleParsed)
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
35
|
+
|
|
36
|
+
|