feat(package): initialize standalone @serve.zone/interfaces package with shared TypeScript contracts
This commit is contained in:
@@ -0,0 +1,83 @@
|
||||
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 IReq_Any_Cloudly_GetClusters extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IReq_Any_Cloudly_GetClusters
|
||||
> {
|
||||
method: 'getClusters';
|
||||
request: {
|
||||
identity: userInterfaces.IIdentity;
|
||||
};
|
||||
response: {
|
||||
clusters: clusterInterfaces.ICluster[];
|
||||
};
|
||||
}
|
||||
|
||||
export interface IReq_Any_Cloudly_GetClusterById
|
||||
extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IReq_Any_Cloudly_GetClusterById
|
||||
> {
|
||||
method: 'getClusterById';
|
||||
request: {
|
||||
identity: userInterfaces.IIdentity;
|
||||
clusterId: string;
|
||||
};
|
||||
response: {
|
||||
cluster: clusterInterfaces.ICluster;
|
||||
};
|
||||
}
|
||||
|
||||
export interface IRequest_CreateCluster extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IRequest_CreateCluster
|
||||
> {
|
||||
method: 'createCluster';
|
||||
request: {
|
||||
identity: userInterfaces.IIdentity;
|
||||
clusterName: string;
|
||||
setupMode?: 'manual' | 'hetzner' | 'aws' | 'digitalocean';
|
||||
};
|
||||
response: {
|
||||
cluster: clusterInterfaces.ICluster;
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* updates a cluster
|
||||
*/
|
||||
export interface IReq_Any_Cloudly_UpdateCluster extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IReq_Any_Cloudly_UpdateCluster
|
||||
> {
|
||||
method: 'updateCluster';
|
||||
request: {
|
||||
identity: userInterfaces.IIdentity;
|
||||
clusterData: clusterInterfaces.ICluster['data'];
|
||||
};
|
||||
response: {
|
||||
resultCluster: clusterInterfaces.ICluster;
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* deletes a cluster
|
||||
*/
|
||||
export interface IReq_Any_Cloudly_DeleteClusterById extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IReq_Any_Cloudly_DeleteClusterById
|
||||
> {
|
||||
method: 'deleteClusterById';
|
||||
request: {
|
||||
identity: userInterfaces.IIdentity;
|
||||
clusterId: string;
|
||||
};
|
||||
response: {
|
||||
ok: boolean;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user