@serve.zone/interfaces 1.0.8 → 1.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist_ts/00_commitinfo_data.js +2 -2
- package/dist_ts/data/server.d.ts +13 -0
- package/dist_ts/data/server.js +2 -0
- package/dist_ts/requests/index.d.ts +2 -1
- package/dist_ts/requests/index.js +3 -2
- package/dist_ts/requests/server.d.ts +28 -2
- package/dist_ts/requests/server.js +1 -3
- package/package.json +1 -1
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/data/server.ts +13 -0
- package/ts/requests/index.ts +2 -0
- package/ts/requests/server.ts +34 -6
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export const commitinfo = {
|
|
5
5
|
name: '@serve.zone/interfaces',
|
|
6
|
-
version: '1.0.
|
|
6
|
+
version: '1.0.10',
|
|
7
7
|
description: 'interfaces for working with containers'
|
|
8
8
|
};
|
|
9
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
9
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMDBfY29tbWl0aW5mb19kYXRhLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvMDBfY29tbWl0aW5mb19kYXRhLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBQ0gsTUFBTSxDQUFDLE1BQU0sVUFBVSxHQUFHO0lBQ3hCLElBQUksRUFBRSx3QkFBd0I7SUFDOUIsT0FBTyxFQUFFLFFBQVE7SUFDakIsV0FBVyxFQUFFLHdDQUF3QztDQUN0RCxDQUFBIn0=
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface IServerMetrics {
|
|
2
|
+
serverId: string;
|
|
3
|
+
cpuUsageInPercent: number;
|
|
4
|
+
memoryUsageinMB: number;
|
|
5
|
+
memoryAvailableInMB: number;
|
|
6
|
+
containerCount: number;
|
|
7
|
+
containerMetrics: Array<{
|
|
8
|
+
containerId: string;
|
|
9
|
+
containerName: string;
|
|
10
|
+
cpuUsageInPercent: number;
|
|
11
|
+
memoryUsageInMB: number;
|
|
12
|
+
}>;
|
|
13
|
+
}
|
|
@@ -3,8 +3,9 @@ import * as configRequests from './config.js';
|
|
|
3
3
|
import * as identityRequests from './identity.js';
|
|
4
4
|
import * as networkRequests from './network.js';
|
|
5
5
|
import * as routingRequests from './routing.js';
|
|
6
|
+
import * as secretRequests from './secret.js';
|
|
6
7
|
import * as serverRequests from './server.js';
|
|
7
8
|
import * as statusRequests from './status.js';
|
|
8
9
|
import * as versionRequests from './version.js';
|
|
9
|
-
export { certificateRequests as certificate, configRequests as config, identityRequests as identity, networkRequests as network, routingRequests as routing, serverRequests as server, statusRequests as status, versionRequests as version, };
|
|
10
|
+
export { certificateRequests as certificate, configRequests as config, identityRequests as identity, networkRequests as network, routingRequests as routing, secretRequests as secret, serverRequests as server, statusRequests as status, versionRequests as version, };
|
|
10
11
|
export * from './inform.js';
|
|
@@ -4,9 +4,10 @@ import * as configRequests from './config.js';
|
|
|
4
4
|
import * as identityRequests from './identity.js';
|
|
5
5
|
import * as networkRequests from './network.js';
|
|
6
6
|
import * as routingRequests from './routing.js';
|
|
7
|
+
import * as secretRequests from './secret.js';
|
|
7
8
|
import * as serverRequests from './server.js';
|
|
8
9
|
import * as statusRequests from './status.js';
|
|
9
10
|
import * as versionRequests from './version.js';
|
|
10
|
-
export { certificateRequests as certificate, configRequests as config, identityRequests as identity, networkRequests as network, routingRequests as routing, serverRequests as server, statusRequests as status, versionRequests as version, };
|
|
11
|
+
export { certificateRequests as certificate, configRequests as config, identityRequests as identity, networkRequests as network, routingRequests as routing, secretRequests as secret, serverRequests as server, statusRequests as status, versionRequests as version, };
|
|
11
12
|
export * from './inform.js';
|
|
12
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
13
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uI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**
|
|
4
|
+
* This request can be used between any two players
|
|
5
|
+
* Examples:
|
|
6
|
+
* WebApp -> Cloudly (get metrics)
|
|
7
|
+
* Cloudly -> Webapp (send metrics)
|
|
8
|
+
* Cloudly -> Coreflow (get metrics)
|
|
9
|
+
* Coreflow -> Cloudly (send metrics)
|
|
10
|
+
*/
|
|
11
|
+
export interface IRequest_Any_Cloudly_ServerStatus extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IRequest_Any_Cloudly_ServerStatus> {
|
|
12
|
+
method: 'getOrSendServerMetrics';
|
|
13
|
+
request: {
|
|
14
|
+
getOrSend: 'get' | 'send';
|
|
15
|
+
serverMetrics?: IServerMetrics;
|
|
16
|
+
};
|
|
17
|
+
response: {
|
|
18
|
+
serverMetrics?: IServerMetrics;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* this request can be used between any two players
|
|
23
|
+
* Examples:
|
|
24
|
+
* WebApp -> Cloudly
|
|
25
|
+
* Cloudly -> Coreflow
|
|
26
|
+
* Cloudly -> HostingProvider
|
|
27
|
+
*/
|
|
28
|
+
export interface IRequest_TriggerServerAction extends plugins.typedrequestInterfaces.implementsTR<plugins.typedrequestInterfaces.ITypedRequest, IRequest_TriggerServerAction> {
|
|
29
|
+
method: 'triggerServerAction';
|
|
4
30
|
request: {
|
|
5
31
|
actionName: 'reboot' | 'rebuild';
|
|
6
32
|
payload: any;
|
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
// link external types for reference
|
|
2
|
-
import {} from './config.js';
|
|
3
1
|
import * as plugins from '../plugins.js';
|
|
4
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VydmVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vdHMvcmVxdWVzdHMvc2VydmVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLE9BQU8sS0FBSyxPQUFPLE1BQU0sZUFBZSxDQUFDIn0=
|
package/package.json
CHANGED
package/ts/00_commitinfo_data.ts
CHANGED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface IServerMetrics {
|
|
2
|
+
serverId: string;
|
|
3
|
+
cpuUsageInPercent: number;
|
|
4
|
+
memoryUsageinMB: number;
|
|
5
|
+
memoryAvailableInMB: number;
|
|
6
|
+
containerCount: number;
|
|
7
|
+
containerMetrics: Array<{
|
|
8
|
+
containerId: string;
|
|
9
|
+
containerName: string;
|
|
10
|
+
cpuUsageInPercent: number;
|
|
11
|
+
memoryUsageInMB: number;
|
|
12
|
+
}>;
|
|
13
|
+
}
|
package/ts/requests/index.ts
CHANGED
|
@@ -5,6 +5,7 @@ import * as configRequests from './config.js';
|
|
|
5
5
|
import * as identityRequests from './identity.js';
|
|
6
6
|
import * as networkRequests from './network.js';
|
|
7
7
|
import * as routingRequests from './routing.js';
|
|
8
|
+
import * as secretRequests from './secret.js';
|
|
8
9
|
import * as serverRequests from './server.js';
|
|
9
10
|
import * as statusRequests from './status.js';
|
|
10
11
|
import * as versionRequests from './version.js';
|
|
@@ -15,6 +16,7 @@ export {
|
|
|
15
16
|
identityRequests as identity,
|
|
16
17
|
networkRequests as network,
|
|
17
18
|
routingRequests as routing,
|
|
19
|
+
secretRequests as secret,
|
|
18
20
|
serverRequests as server,
|
|
19
21
|
statusRequests as status,
|
|
20
22
|
versionRequests as version,
|
package/ts/requests/server.ts
CHANGED
|
@@ -1,14 +1,42 @@
|
|
|
1
|
-
|
|
2
|
-
import { type IRequest_Any_Cloudly_GetServerConfig } from './config.js'
|
|
3
|
-
|
|
1
|
+
import type { IServerMetrics } from '../data/server.js';
|
|
4
2
|
import * as plugins from '../plugins.js';
|
|
5
3
|
|
|
6
|
-
|
|
4
|
+
/**
|
|
5
|
+
* This request can be used between any two players
|
|
6
|
+
* Examples:
|
|
7
|
+
* WebApp -> Cloudly (get metrics)
|
|
8
|
+
* Cloudly -> Webapp (send metrics)
|
|
9
|
+
* Cloudly -> Coreflow (get metrics)
|
|
10
|
+
* Coreflow -> Cloudly (send metrics)
|
|
11
|
+
*/
|
|
12
|
+
export interface IRequest_Any_Cloudly_ServerStatus
|
|
13
|
+
extends plugins.typedrequestInterfaces.implementsTR<
|
|
14
|
+
plugins.typedrequestInterfaces.ITypedRequest,
|
|
15
|
+
IRequest_Any_Cloudly_ServerStatus
|
|
16
|
+
> {
|
|
17
|
+
method: 'getOrSendServerMetrics',
|
|
18
|
+
request: {
|
|
19
|
+
getOrSend: 'get' | 'send';
|
|
20
|
+
serverMetrics?: IServerMetrics;
|
|
21
|
+
},
|
|
22
|
+
response: {
|
|
23
|
+
serverMetrics?: IServerMetrics;
|
|
24
|
+
},
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* this request can be used between any two players
|
|
29
|
+
* Examples:
|
|
30
|
+
* WebApp -> Cloudly
|
|
31
|
+
* Cloudly -> Coreflow
|
|
32
|
+
* Cloudly -> HostingProvider
|
|
33
|
+
*/
|
|
34
|
+
export interface IRequest_TriggerServerAction
|
|
7
35
|
extends plugins.typedrequestInterfaces.implementsTR<
|
|
8
36
|
plugins.typedrequestInterfaces.ITypedRequest,
|
|
9
|
-
|
|
37
|
+
IRequest_TriggerServerAction
|
|
10
38
|
> {
|
|
11
|
-
method: '
|
|
39
|
+
method: 'triggerServerAction';
|
|
12
40
|
request: {
|
|
13
41
|
actionName: 'reboot' | 'rebuild';
|
|
14
42
|
payload: any;
|