68 lines
1.6 KiB
TypeScript
68 lines
1.6 KiB
TypeScript
import * as userInterfaces from '../data/user.js';
|
|
import * as clusterInterfaces from '../data/cluster.js';
|
|
import * as plugins from '../plugins.js';
|
|
|
|
/**
|
|
* get all clusters
|
|
*/
|
|
export interface IRequest_GetAllClusters extends plugins.typedrequestInterfaces.implementsTR<
|
|
plugins.typedrequestInterfaces.ITypedRequest,
|
|
IRequest_GetAllClusters
|
|
> {
|
|
method: 'getAllClusters';
|
|
request: {
|
|
identity: userInterfaces.IIdentity;
|
|
};
|
|
response: {
|
|
clusters: clusterInterfaces.ICluster[];
|
|
};
|
|
}
|
|
|
|
export interface IRequest_CreateCluster extends plugins.typedrequestInterfaces.implementsTR<
|
|
plugins.typedrequestInterfaces.ITypedRequest,
|
|
IRequest_CreateCluster
|
|
> {
|
|
method: 'createCluster';
|
|
request: {
|
|
identity: userInterfaces.IIdentity;
|
|
clusterName: string;
|
|
};
|
|
response: {
|
|
clusterConfig: clusterInterfaces.ICluster;
|
|
};
|
|
}
|
|
|
|
/**
|
|
* updates a cluster
|
|
*/
|
|
export interface IRequest_UpdateCluster extends plugins.typedrequestInterfaces.implementsTR<
|
|
plugins.typedrequestInterfaces.ITypedRequest,
|
|
IRequest_UpdateCluster
|
|
> {
|
|
method: 'updateCluster';
|
|
request: {
|
|
identity: userInterfaces.IIdentity;
|
|
clusterConfig: clusterInterfaces.ICluster;
|
|
};
|
|
response: {
|
|
clusterConfig: clusterInterfaces.ICluster;
|
|
};
|
|
}
|
|
|
|
/**
|
|
* deletes a cluster
|
|
*/
|
|
export interface IRequest_DeleteCluster extends plugins.typedrequestInterfaces.implementsTR<
|
|
plugins.typedrequestInterfaces.ITypedRequest,
|
|
IRequest_DeleteCluster
|
|
> {
|
|
method: 'deleteCluster';
|
|
request: {
|
|
identity: userInterfaces.IIdentity;
|
|
clusterId: string;
|
|
};
|
|
response: {
|
|
success: boolean;
|
|
};
|
|
}
|