47 lines
1.2 KiB
TypeScript
47 lines
1.2 KiB
TypeScript
import type { IServerMetrics } from '../data/server.js';
|
|
import * as plugins from '../plugins.js';
|
|
|
|
/**
|
|
* This request can be used between any two players
|
|
* Examples:
|
|
* WebApp -> Cloudly (get metrics)
|
|
* Cloudly -> Webapp (send metrics)
|
|
* Cloudly -> Coreflow (get metrics)
|
|
* Coreflow -> Cloudly (send metrics)
|
|
*/
|
|
export interface IRequest_Any_Cloudly_ServerStatus
|
|
extends plugins.typedrequestInterfaces.implementsTR<
|
|
plugins.typedrequestInterfaces.ITypedRequest,
|
|
IRequest_Any_Cloudly_ServerStatus
|
|
> {
|
|
method: 'getOrSendServerMetrics',
|
|
request: {
|
|
getOrSend: 'get' | 'send';
|
|
serverMetrics?: IServerMetrics;
|
|
},
|
|
response: {
|
|
serverMetrics?: IServerMetrics;
|
|
},
|
|
}
|
|
|
|
/**
|
|
* this request can be used between any two players
|
|
* Examples:
|
|
* WebApp -> Cloudly
|
|
* Cloudly -> Coreflow
|
|
* Cloudly -> HostingProvider
|
|
*/
|
|
export interface IRequest_TriggerServerAction
|
|
extends plugins.typedrequestInterfaces.implementsTR<
|
|
plugins.typedrequestInterfaces.ITypedRequest,
|
|
IRequest_TriggerServerAction
|
|
> {
|
|
method: 'triggerServerAction';
|
|
request: {
|
|
actionName: 'reboot' | 'rebuild';
|
|
payload: any;
|
|
};
|
|
response: {
|
|
actionConfirmed: boolean;
|
|
};
|
|
} |