feat(package): initialize standalone @serve.zone/interfaces package with shared TypeScript contracts
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import * as plugins from '../plugins.js';
|
||||
import * as userInterfaces from '../data/user.js';
|
||||
|
||||
export interface IReq_Admin_LoginWithUsernameAndPassword extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IReq_Admin_LoginWithUsernameAndPassword
|
||||
> {
|
||||
method: 'adminLoginWithUsernameAndPassword';
|
||||
request: {
|
||||
username: string;
|
||||
password: string;
|
||||
};
|
||||
response: {
|
||||
identity: userInterfaces.IIdentity;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
import * as plugins from '../plugins.js';
|
||||
import type { IBareMetal } from '../data/baremetal.js';
|
||||
|
||||
export interface IRequest_Any_Cloudly_GetBaremetalServers {
|
||||
method: 'getBaremetalServers';
|
||||
request: {};
|
||||
response: {
|
||||
baremetals: IBareMetal[];
|
||||
};
|
||||
}
|
||||
|
||||
export interface IRequest_Any_Cloudly_ControlBaremetal {
|
||||
method: 'controlBaremetal';
|
||||
request: {
|
||||
baremetalId: string;
|
||||
action: 'powerOn' | 'powerOff' | 'reset';
|
||||
};
|
||||
response: {
|
||||
success: boolean;
|
||||
message: string;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
import * as plugins from '../plugins.js';
|
||||
import * as userInterfaces from '../data/user.js';
|
||||
|
||||
export interface IRequest_Any_Cloudly_GetCertificateForDomain
|
||||
extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IRequest_Any_Cloudly_GetCertificateForDomain
|
||||
> {
|
||||
method: 'getCertificateForDomain';
|
||||
request: {
|
||||
identity: userInterfaces.IIdentity;
|
||||
domainName: string;
|
||||
type: 'ssl';
|
||||
};
|
||||
response: {
|
||||
certificate: plugins.tsclass.network.ICert;
|
||||
};
|
||||
}
|
||||
@@ -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;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
import * as plugins from '../plugins.js';
|
||||
import * as clusterInterfaces from '../data/cluster.js';
|
||||
import * as serverInterfaces from '../data/server.js';
|
||||
import * as userInterfaces from '../data/user.js';
|
||||
import type { IService } from '../data/service.js';
|
||||
|
||||
export interface IRequest_Any_Cloudly_GetServerConfig
|
||||
extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IRequest_Any_Cloudly_GetServerConfig
|
||||
> {
|
||||
method: 'getServerConfig';
|
||||
request: {
|
||||
identity: userInterfaces.IIdentity;
|
||||
serverId: string;
|
||||
};
|
||||
response: {
|
||||
configData: serverInterfaces.IServer;
|
||||
};
|
||||
}
|
||||
|
||||
export interface IRequest_Any_Cloudly_GetClusterConfig
|
||||
extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IRequest_Any_Cloudly_GetClusterConfig
|
||||
> {
|
||||
method: 'getClusterConfig';
|
||||
request: {
|
||||
identity: userInterfaces.IIdentity;
|
||||
};
|
||||
response: {
|
||||
configData: clusterInterfaces.ICluster;
|
||||
services: IService[];
|
||||
};
|
||||
}
|
||||
|
||||
export interface IRequest_Cloudly_Coreflow_PushClusterConfig
|
||||
extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IRequest_Cloudly_Coreflow_PushClusterConfig
|
||||
> {
|
||||
method: 'pushClusterConfig';
|
||||
request: {
|
||||
configData: clusterInterfaces.ICluster;
|
||||
services: IService[];
|
||||
};
|
||||
response: {};
|
||||
}
|
||||
@@ -0,0 +1,141 @@
|
||||
import * as plugins from '../plugins.js';
|
||||
import type { IDeployment } from '../data/deployment.js';
|
||||
import type { IIdentity } from '../data/user.js';
|
||||
|
||||
export interface IReq_Any_Cloudly_GetDeploymentById
|
||||
extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IReq_Any_Cloudly_GetDeploymentById
|
||||
> {
|
||||
method: 'getDeploymentById';
|
||||
request: {
|
||||
identity: IIdentity;
|
||||
deploymentId: string;
|
||||
};
|
||||
response: {
|
||||
deployment: IDeployment;
|
||||
};
|
||||
}
|
||||
|
||||
export interface IReq_Any_Cloudly_GetDeployments
|
||||
extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IReq_Any_Cloudly_GetDeployments
|
||||
> {
|
||||
method: 'getDeployments';
|
||||
request: {
|
||||
identity: IIdentity;
|
||||
};
|
||||
response: {
|
||||
deployments: IDeployment[];
|
||||
};
|
||||
}
|
||||
|
||||
export interface IReq_Any_Cloudly_GetDeploymentsByService
|
||||
extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IReq_Any_Cloudly_GetDeploymentsByService
|
||||
> {
|
||||
method: 'getDeploymentsByService';
|
||||
request: {
|
||||
identity: IIdentity;
|
||||
serviceId: string;
|
||||
};
|
||||
response: {
|
||||
deployments: IDeployment[];
|
||||
};
|
||||
}
|
||||
|
||||
export interface IReq_Any_Cloudly_GetDeploymentsByNode
|
||||
extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IReq_Any_Cloudly_GetDeploymentsByNode
|
||||
> {
|
||||
method: 'getDeploymentsByNode';
|
||||
request: {
|
||||
identity: IIdentity;
|
||||
nodeId: string;
|
||||
};
|
||||
response: {
|
||||
deployments: IDeployment[];
|
||||
};
|
||||
}
|
||||
|
||||
export interface IReq_Any_Cloudly_CreateDeployment
|
||||
extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IReq_Any_Cloudly_CreateDeployment
|
||||
> {
|
||||
method: 'createDeployment';
|
||||
request: {
|
||||
identity: IIdentity;
|
||||
deploymentData: Partial<IDeployment>;
|
||||
};
|
||||
response: {
|
||||
deployment: IDeployment;
|
||||
};
|
||||
}
|
||||
|
||||
export interface IReq_Any_Cloudly_UpdateDeployment
|
||||
extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IReq_Any_Cloudly_UpdateDeployment
|
||||
> {
|
||||
method: 'updateDeployment';
|
||||
request: {
|
||||
identity: IIdentity;
|
||||
deploymentId: string;
|
||||
deploymentData: Partial<IDeployment>;
|
||||
};
|
||||
response: {
|
||||
deployment: IDeployment;
|
||||
};
|
||||
}
|
||||
|
||||
export interface IReq_Any_Cloudly_DeleteDeploymentById
|
||||
extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IReq_Any_Cloudly_DeleteDeploymentById
|
||||
> {
|
||||
method: 'deleteDeploymentById';
|
||||
request: {
|
||||
identity: IIdentity;
|
||||
deploymentId: string;
|
||||
};
|
||||
response: {
|
||||
success: boolean;
|
||||
};
|
||||
}
|
||||
|
||||
export interface IReq_Any_Cloudly_RestartDeployment
|
||||
extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IReq_Any_Cloudly_RestartDeployment
|
||||
> {
|
||||
method: 'restartDeployment';
|
||||
request: {
|
||||
identity: IIdentity;
|
||||
deploymentId: string;
|
||||
};
|
||||
response: {
|
||||
success: boolean;
|
||||
deployment: IDeployment;
|
||||
};
|
||||
}
|
||||
|
||||
export interface IReq_Any_Cloudly_ScaleDeployment
|
||||
extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IReq_Any_Cloudly_ScaleDeployment
|
||||
> {
|
||||
method: 'scaleDeployment';
|
||||
request: {
|
||||
identity: IIdentity;
|
||||
deploymentId: string;
|
||||
replicas: number;
|
||||
};
|
||||
response: {
|
||||
success: boolean;
|
||||
deployment: IDeployment;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
import * as plugins from '../plugins.js';
|
||||
import type { IDnsEntry } from '../data/dns.js';
|
||||
import type { IIdentity } from '../data/user.js';
|
||||
|
||||
export interface IRequest_Any_Cloudly_GetDnsEntries
|
||||
extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IRequest_Any_Cloudly_GetDnsEntries
|
||||
> {
|
||||
method: 'getDnsEntries';
|
||||
request: {
|
||||
identity: IIdentity;
|
||||
zone?: string; // Optional filter by zone
|
||||
};
|
||||
response: {
|
||||
dnsEntries: IDnsEntry[];
|
||||
};
|
||||
}
|
||||
|
||||
export interface IRequest_Any_Cloudly_GetDnsEntryById
|
||||
extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IRequest_Any_Cloudly_GetDnsEntryById
|
||||
> {
|
||||
method: 'getDnsEntryById';
|
||||
request: {
|
||||
identity: IIdentity;
|
||||
dnsEntryId: string;
|
||||
};
|
||||
response: {
|
||||
dnsEntry: IDnsEntry;
|
||||
};
|
||||
}
|
||||
|
||||
export interface IRequest_Any_Cloudly_CreateDnsEntry
|
||||
extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IRequest_Any_Cloudly_CreateDnsEntry
|
||||
> {
|
||||
method: 'createDnsEntry';
|
||||
request: {
|
||||
identity: IIdentity;
|
||||
dnsEntryData: IDnsEntry['data'];
|
||||
};
|
||||
response: {
|
||||
dnsEntry: IDnsEntry;
|
||||
};
|
||||
}
|
||||
|
||||
export interface IRequest_Any_Cloudly_UpdateDnsEntry
|
||||
extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IRequest_Any_Cloudly_UpdateDnsEntry
|
||||
> {
|
||||
method: 'updateDnsEntry';
|
||||
request: {
|
||||
identity: IIdentity;
|
||||
dnsEntryId: string;
|
||||
dnsEntryData: IDnsEntry['data'];
|
||||
};
|
||||
response: {
|
||||
dnsEntry: IDnsEntry;
|
||||
};
|
||||
}
|
||||
|
||||
export interface IRequest_Any_Cloudly_DeleteDnsEntry
|
||||
extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IRequest_Any_Cloudly_DeleteDnsEntry
|
||||
> {
|
||||
method: 'deleteDnsEntry';
|
||||
request: {
|
||||
identity: IIdentity;
|
||||
dnsEntryId: string;
|
||||
};
|
||||
response: {
|
||||
success: boolean;
|
||||
};
|
||||
}
|
||||
|
||||
export interface IRequest_Any_Cloudly_GetDnsZones
|
||||
extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IRequest_Any_Cloudly_GetDnsZones
|
||||
> {
|
||||
method: 'getDnsZones';
|
||||
request: {
|
||||
identity: IIdentity;
|
||||
};
|
||||
response: {
|
||||
zones: string[];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
import * as plugins from '../plugins.js';
|
||||
import type { IDomain } from '../data/domain.js';
|
||||
import type { IIdentity } from '../data/user.js';
|
||||
|
||||
export interface IRequest_Any_Cloudly_GetDomains
|
||||
extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IRequest_Any_Cloudly_GetDomains
|
||||
> {
|
||||
method: 'getDomains';
|
||||
request: {
|
||||
identity: IIdentity;
|
||||
};
|
||||
response: {
|
||||
domains: IDomain[];
|
||||
};
|
||||
}
|
||||
|
||||
export interface IRequest_Any_Cloudly_GetDomainById
|
||||
extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IRequest_Any_Cloudly_GetDomainById
|
||||
> {
|
||||
method: 'getDomainById';
|
||||
request: {
|
||||
identity: IIdentity;
|
||||
domainId: string;
|
||||
};
|
||||
response: {
|
||||
domain: IDomain;
|
||||
};
|
||||
}
|
||||
|
||||
export interface IRequest_Any_Cloudly_CreateDomain
|
||||
extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IRequest_Any_Cloudly_CreateDomain
|
||||
> {
|
||||
method: 'createDomain';
|
||||
request: {
|
||||
identity: IIdentity;
|
||||
domainData: IDomain['data'];
|
||||
};
|
||||
response: {
|
||||
domain: IDomain;
|
||||
};
|
||||
}
|
||||
|
||||
export interface IRequest_Any_Cloudly_UpdateDomain
|
||||
extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IRequest_Any_Cloudly_UpdateDomain
|
||||
> {
|
||||
method: 'updateDomain';
|
||||
request: {
|
||||
identity: IIdentity;
|
||||
domainId: string;
|
||||
domainData: IDomain['data'];
|
||||
};
|
||||
response: {
|
||||
domain: IDomain;
|
||||
};
|
||||
}
|
||||
|
||||
export interface IRequest_Any_Cloudly_DeleteDomain
|
||||
extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IRequest_Any_Cloudly_DeleteDomain
|
||||
> {
|
||||
method: 'deleteDomain';
|
||||
request: {
|
||||
identity: IIdentity;
|
||||
domainId: string;
|
||||
};
|
||||
response: {
|
||||
success: boolean;
|
||||
};
|
||||
}
|
||||
|
||||
export interface IRequest_Any_Cloudly_VerifyDomain
|
||||
extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IRequest_Any_Cloudly_VerifyDomain
|
||||
> {
|
||||
method: 'verifyDomain';
|
||||
request: {
|
||||
identity: IIdentity;
|
||||
domainId: string;
|
||||
verificationMethod?: 'dns' | 'http' | 'email' | 'manual';
|
||||
};
|
||||
response: {
|
||||
domain: IDomain;
|
||||
verificationResult: {
|
||||
success: boolean;
|
||||
message?: string;
|
||||
details?: any;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
import * as plugins from '../plugins.js';
|
||||
import * as data from '../data/index.js';
|
||||
import * as userInterfaces from '../data/user.js';
|
||||
|
||||
export interface IReq_GetRegistryById extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IReq_GetRegistryById
|
||||
> {
|
||||
method: 'getExternalRegistryById';
|
||||
request: {
|
||||
identity: userInterfaces.IIdentity;
|
||||
id: string;
|
||||
};
|
||||
response: {
|
||||
registry: data.IExternalRegistry;
|
||||
};
|
||||
}
|
||||
|
||||
export interface IReq_GetRegistries extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IReq_GetRegistries
|
||||
> {
|
||||
method: 'getExternalRegistries';
|
||||
request: {
|
||||
identity: userInterfaces.IIdentity;
|
||||
};
|
||||
response: {
|
||||
registries: data.IExternalRegistry[];
|
||||
};
|
||||
}
|
||||
|
||||
export interface IReq_CreateRegistry extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IReq_CreateRegistry
|
||||
> {
|
||||
method: 'createExternalRegistry';
|
||||
request: {
|
||||
identity: userInterfaces.IIdentity;
|
||||
registryData: data.IExternalRegistry['data'];
|
||||
};
|
||||
response: {
|
||||
registry: data.IExternalRegistry;
|
||||
};
|
||||
}
|
||||
|
||||
export interface IReq_UpdateRegistry extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IReq_UpdateRegistry
|
||||
> {
|
||||
method: 'updateExternalRegistry';
|
||||
request: {
|
||||
identity: userInterfaces.IIdentity;
|
||||
registryId: string;
|
||||
registryData: data.IExternalRegistry['data'];
|
||||
};
|
||||
response: {
|
||||
resultRegistry: data.IExternalRegistry;
|
||||
};
|
||||
}
|
||||
|
||||
export interface IReq_DeleteRegistryById extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IReq_DeleteRegistryById
|
||||
> {
|
||||
method: 'deleteExternalRegistryById';
|
||||
request: {
|
||||
identity: userInterfaces.IIdentity;
|
||||
registryId: string;
|
||||
};
|
||||
response: {
|
||||
ok: boolean;
|
||||
};
|
||||
}
|
||||
|
||||
export interface IReq_VerifyRegistry extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IReq_VerifyRegistry
|
||||
> {
|
||||
method: 'verifyExternalRegistry';
|
||||
request: {
|
||||
identity: userInterfaces.IIdentity;
|
||||
registryId: string;
|
||||
};
|
||||
response: {
|
||||
success: boolean;
|
||||
message?: string;
|
||||
registry?: data.IExternalRegistry;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
import * as plugins from '../plugins.js';
|
||||
import * as userInterfaces from '../data/user.js'
|
||||
|
||||
// ========
|
||||
// IDENTITY
|
||||
// ========
|
||||
|
||||
/**
|
||||
* get the identity that then will be used to get the config
|
||||
*/
|
||||
export interface IRequest_Any_Cloudly_CoreflowManager_GetIdentityByToken
|
||||
extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IRequest_Any_Cloudly_CoreflowManager_GetIdentityByToken
|
||||
> {
|
||||
method: 'getIdentityByToken';
|
||||
request: {
|
||||
token: string;
|
||||
};
|
||||
response: {
|
||||
identity: userInterfaces.IIdentity;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
import * as plugins from '../plugins.js';
|
||||
import * as userInterfaces from '../data/user.js';
|
||||
|
||||
import type { IImage } from '../data/index.js';
|
||||
|
||||
export interface IRequest_GetAllImages extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IRequest_GetAllImages
|
||||
> {
|
||||
method: 'getAllImages';
|
||||
request: {
|
||||
identity: userInterfaces.IIdentity;
|
||||
};
|
||||
response: {
|
||||
images: IImage[];
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* gets a single image
|
||||
* authentication can happen via imageClaim or identity
|
||||
*/
|
||||
export interface IRequest_GetImage extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IRequest_GetImage
|
||||
> {
|
||||
method: 'getImage';
|
||||
request: {
|
||||
identity: userInterfaces.IIdentity;
|
||||
imageId: string;
|
||||
};
|
||||
response: {
|
||||
image: IImage;
|
||||
};
|
||||
}
|
||||
|
||||
export interface IRequest_CreateImage extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IRequest_CreateImage
|
||||
> {
|
||||
method: 'createImage';
|
||||
request: {
|
||||
identity: userInterfaces.IIdentity;
|
||||
name: string;
|
||||
description: string;
|
||||
};
|
||||
response: {
|
||||
image: IImage;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
export interface IRequest_PushImageVersion extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IRequest_PushImageVersion
|
||||
> {
|
||||
method: 'pushImageVersion';
|
||||
request: {
|
||||
identity: userInterfaces.IIdentity;
|
||||
imageId: string;
|
||||
versionString: string;
|
||||
imageStream: plugins.typedrequestInterfaces.IVirtualStream;
|
||||
};
|
||||
response: {
|
||||
allowed: boolean;
|
||||
};
|
||||
}
|
||||
|
||||
export interface IRequest_PullImageVersion extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IRequest_PullImageVersion
|
||||
> {
|
||||
method: 'pullImageVersion';
|
||||
request: {
|
||||
identity: userInterfaces.IIdentity;
|
||||
imageId: string;
|
||||
versionString: string;
|
||||
};
|
||||
response: {
|
||||
imageStream: plugins.typedrequestInterfaces.IVirtualStream;
|
||||
};
|
||||
}
|
||||
|
||||
export interface IRequest_DeleteImage extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IRequest_DeleteImage
|
||||
> {
|
||||
method: 'deleteImage';
|
||||
request: {
|
||||
identity: userInterfaces.IIdentity;
|
||||
imageId: string;
|
||||
};
|
||||
response: {
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
import * as plugins from '../plugins.js';
|
||||
|
||||
import * as adminRequests from './admin.js';
|
||||
import * as baremetalRequests from './baremetal.js';
|
||||
import * as certificateRequests from './certificate.js';
|
||||
import * as clusterRequests from './cluster.js';
|
||||
import * as configRequests from './config.js';
|
||||
import * as deploymentRequests from './deployment.js';
|
||||
import * as dnsRequests from './dns.js';
|
||||
import * as domainRequests from './domain.js';
|
||||
import * as externalRegistryRequests from './externalregistry.js';
|
||||
import * as identityRequests from './identity.js';
|
||||
import * as imageRequests from './image.js';
|
||||
import * as informRequests from './inform.js';
|
||||
import * as logRequests from './log.js';
|
||||
import * as networkRequests from './network.js';
|
||||
import * as nodeRequests from './node.js';
|
||||
import * as routingRequests from './routing.js';
|
||||
import * as secretBundleRequests from './secretbundle.js';
|
||||
import * as secretGroupRequests from './secretgroup.js';
|
||||
import * as serverRequests from './server.js';
|
||||
import * as serviceRequests from './service.js';
|
||||
import * as settingsRequests from './settings.js';
|
||||
import * as statusRequests from './status.js';
|
||||
import * as taskRequests from './task.js';
|
||||
import * as versionRequests from './version.js';
|
||||
|
||||
export {
|
||||
adminRequests as admin,
|
||||
baremetalRequests as baremetal,
|
||||
certificateRequests as certificate,
|
||||
clusterRequests as cluster,
|
||||
configRequests as config,
|
||||
deploymentRequests as deployment,
|
||||
dnsRequests as dns,
|
||||
domainRequests as domain,
|
||||
externalRegistryRequests as externalRegistry,
|
||||
identityRequests as identity,
|
||||
imageRequests as image,
|
||||
informRequests as inform,
|
||||
logRequests as log,
|
||||
networkRequests as network,
|
||||
nodeRequests as node,
|
||||
routingRequests as routing,
|
||||
secretBundleRequests as secretbundle,
|
||||
secretGroupRequests as secretgroup,
|
||||
serverRequests as server,
|
||||
serviceRequests as service,
|
||||
settingsRequests as settings,
|
||||
statusRequests as status,
|
||||
taskRequests as task,
|
||||
versionRequests as version,
|
||||
};
|
||||
|
||||
export * from './inform.js';
|
||||
@@ -0,0 +1,12 @@
|
||||
import * as plugins from '../plugins.js';
|
||||
|
||||
export interface IRequest_InformAboutNewContainerImage extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IRequest_InformAboutNewContainerImage
|
||||
> {
|
||||
method: 'servezonestandard_InformAboutNewContainerVersion';
|
||||
request: {
|
||||
containerImageInfo: plugins.tsclass.container.IContainer
|
||||
};
|
||||
response: {};
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
import * as plugins from '../plugins.js';
|
||||
|
||||
export interface IRequest_Log extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IRequest_Log
|
||||
> {
|
||||
method: 'log';
|
||||
request: {
|
||||
authToken: string;
|
||||
logPackages: plugins.smartlogInterfaces.ILogPackage[];
|
||||
},
|
||||
response: {};
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
import * as plugins from '../plugins.js';
|
||||
|
||||
export interface IRequest_Any_Cloudly_GetNetworkNodes {
|
||||
method: 'getNetworkNodes';
|
||||
request: {};
|
||||
response: {
|
||||
networkNodes: plugins.tsclass.network.INetworkNode[];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
import * as plugins from '../plugins.js';
|
||||
import type { IClusterNode } from '../data/clusternode.js';
|
||||
import type { IDeployment } from '../data/deployment.js';
|
||||
|
||||
export interface IRequest_Any_Cloudly_GetNodeConfig {
|
||||
method: 'getNodeConfig';
|
||||
request: {
|
||||
nodeId: string;
|
||||
};
|
||||
response: {
|
||||
configData: IClusterNode;
|
||||
};
|
||||
}
|
||||
|
||||
export interface IRequest_Any_Cloudly_GetNodesByCluster {
|
||||
method: 'getNodesByCluster';
|
||||
request: {
|
||||
clusterId: string;
|
||||
};
|
||||
response: {
|
||||
nodes: IClusterNode[];
|
||||
};
|
||||
}
|
||||
|
||||
export interface IRequest_Any_Cloudly_GetNodeDeployments {
|
||||
method: 'getNodeDeployments';
|
||||
request: {
|
||||
nodeId: string;
|
||||
};
|
||||
response: {
|
||||
deployments: IDeployment[];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
import { type IReverseProxyConfig } from '../data/traffic.js';
|
||||
|
||||
export interface IRequest_Coreflow_Coretraffic_RoutingUpdate {
|
||||
method: 'updateRouting';
|
||||
request: {
|
||||
reverseConfigs: IReverseProxyConfig[];
|
||||
};
|
||||
response: {
|
||||
status: 'ok' | 'error';
|
||||
errorText: string;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
import * as plugins from '../plugins.js';
|
||||
import * as data from '../data/index.js';
|
||||
import * as userInterfaces from '../data/user.js';
|
||||
|
||||
export interface IReq_GetSecretBundles extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IReq_GetSecretBundles
|
||||
> {
|
||||
method: 'getSecretBundles';
|
||||
request: {
|
||||
identity: userInterfaces.IIdentity;
|
||||
};
|
||||
response: {
|
||||
secretBundles: data.ISecretBundle[];
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
export interface IReq_GetSecretBundleById extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IReq_GetSecretBundleById
|
||||
> {
|
||||
method: 'getSecretBundleById';
|
||||
request: {
|
||||
identity: userInterfaces.IIdentity;
|
||||
secretBundleId: string;
|
||||
};
|
||||
response: {
|
||||
secretBundle: data.ISecretBundle;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
export interface IReq_CreateSecretBundle extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IReq_CreateSecretBundle
|
||||
> {
|
||||
method: 'createSecretBundle';
|
||||
request: {
|
||||
identity: userInterfaces.IIdentity;
|
||||
secretBundle: data.ISecretBundle;
|
||||
};
|
||||
response: {
|
||||
resultSecretBundle: data.ISecretBundle;
|
||||
};
|
||||
}
|
||||
|
||||
export interface IReq_UpdateSecretBundle extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IReq_UpdateSecretBundle
|
||||
> {
|
||||
method: 'updateSecretBundle';
|
||||
request: {
|
||||
identity: userInterfaces.IIdentity;
|
||||
secretBundle: data.ISecretBundle;
|
||||
};
|
||||
response: {
|
||||
resultSecretBundle: data.ISecretBundle;
|
||||
};
|
||||
}
|
||||
|
||||
export interface IReq_DeleteSecretBundleById extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IReq_DeleteSecretBundleById
|
||||
> {
|
||||
method: 'deleteSecretBundleById';
|
||||
request: {
|
||||
identity: userInterfaces.IIdentity;
|
||||
secretBundleId: string;
|
||||
};
|
||||
response: {
|
||||
ok: boolean;
|
||||
};
|
||||
}
|
||||
|
||||
export interface IReq_GetSecretBundleByAuthorization extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IReq_GetSecretBundleByAuthorization
|
||||
> {
|
||||
method: 'getSecretBundleByAuthorization';
|
||||
request: {
|
||||
identity: userInterfaces.IIdentity;
|
||||
secretBundleAuthorization: data.ISecretBundleAuthorization;
|
||||
};
|
||||
response: {
|
||||
secretBundle: data.ISecretBundle;
|
||||
};
|
||||
}
|
||||
|
||||
export interface IReq_GetFlatKeyValueObject extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IReq_GetFlatKeyValueObject
|
||||
> {
|
||||
method: 'getFlatKeyValueObject';
|
||||
request: {
|
||||
identity: userInterfaces.IIdentity;
|
||||
seccretBundleId: string;
|
||||
secretBundleAuthorization: data.ISecretBundleAuthorization;
|
||||
};
|
||||
response: {
|
||||
flatKeyValueObject: {[key: string]: string};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
import * as plugins from '../plugins.js';
|
||||
import * as data from '../data/index.js';
|
||||
import * as userInterfaces from '../data/user.js';
|
||||
|
||||
export interface IReq_GetSecretGroups extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IReq_GetSecretGroups
|
||||
> {
|
||||
method: 'getSecretGroups';
|
||||
request: {
|
||||
identity: userInterfaces.IIdentity;
|
||||
};
|
||||
response: {
|
||||
secretGroups: data.ISecretGroup[];
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
export interface IReq_GetSecretGroupById extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IReq_GetSecretGroupById
|
||||
> {
|
||||
method: 'getSecretGroupById';
|
||||
request: {
|
||||
identity: userInterfaces.IIdentity;
|
||||
secretGroupId: string;
|
||||
};
|
||||
response: {
|
||||
secretGroup: data.ISecretGroup;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
export interface IReq_CreateSecretGroup extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IReq_CreateSecretGroup
|
||||
> {
|
||||
method: 'createSecretGroup';
|
||||
request: {
|
||||
identity: userInterfaces.IIdentity;
|
||||
secretGroup: data.ISecretGroup;
|
||||
};
|
||||
response: {
|
||||
resultSecretGroup: data.ISecretGroup;
|
||||
};
|
||||
}
|
||||
|
||||
export interface IReq_UpdateSecretGroup extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IReq_UpdateSecretGroup
|
||||
> {
|
||||
method: 'updateSecretGroup';
|
||||
request: {
|
||||
identity: userInterfaces.IIdentity;
|
||||
secretGroup: data.ISecretGroup;
|
||||
};
|
||||
response: {
|
||||
resultSecretGroup: data.ISecretGroup;
|
||||
};
|
||||
}
|
||||
|
||||
export interface IReq_DeleteSecretGroupById extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IReq_DeleteSecretGroupById
|
||||
> {
|
||||
method: 'deleteSecretGroupById';
|
||||
request: {
|
||||
identity: userInterfaces.IIdentity;
|
||||
secretGroupId: string;
|
||||
};
|
||||
response: {
|
||||
ok: boolean;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
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;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
import * as plugins from '../plugins.js';
|
||||
import type { IService } from '../data/service.js';
|
||||
import type { IIdentity } from '../data/user.js';
|
||||
import type { IServiceRessources } from '../data/docker.js';
|
||||
|
||||
export interface IRequest_Any_Cloudly_GetServiceById
|
||||
extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IRequest_Any_Cloudly_GetServiceById
|
||||
> {
|
||||
method: 'getServiceById';
|
||||
request: {
|
||||
identity: IIdentity;
|
||||
serviceId: string;
|
||||
};
|
||||
response: {
|
||||
service: IService;
|
||||
};
|
||||
}
|
||||
|
||||
export interface IRequest_Any_Cloudly_GetServices
|
||||
extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IRequest_Any_Cloudly_GetServices
|
||||
> {
|
||||
method: 'getServices';
|
||||
request: {
|
||||
identity: IIdentity;
|
||||
};
|
||||
response: {
|
||||
services: IService[];
|
||||
};
|
||||
}
|
||||
|
||||
export interface IRequest_Any_Cloudly_CreateService
|
||||
extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IRequest_Any_Cloudly_CreateService
|
||||
> {
|
||||
method: 'createService';
|
||||
request: {
|
||||
identity: IIdentity;
|
||||
serviceData: IService['data'];
|
||||
};
|
||||
response: {
|
||||
service: IService;
|
||||
};
|
||||
}
|
||||
|
||||
export interface IRequest_Any_Cloudly_UpdateService
|
||||
extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IRequest_Any_Cloudly_UpdateService
|
||||
> {
|
||||
method: 'updateService';
|
||||
request: {
|
||||
identity: IIdentity;
|
||||
serviceId: string;
|
||||
serviceData: IService['data'];
|
||||
};
|
||||
response: {
|
||||
service: IService;
|
||||
};
|
||||
}
|
||||
|
||||
export interface IRequest_Any_Cloudly_DeleteServiceById
|
||||
extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IRequest_Any_Cloudly_DeleteServiceById
|
||||
> {
|
||||
method: 'deleteServiceById';
|
||||
request: {
|
||||
identity: IIdentity;
|
||||
serviceId: string;
|
||||
};
|
||||
response: {
|
||||
success: boolean;
|
||||
};
|
||||
}
|
||||
|
||||
export interface IRequest_Any_Cloudly_GetServiceSecretBundlesAsFlatObject
|
||||
extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IRequest_Any_Cloudly_GetServiceSecretBundlesAsFlatObject
|
||||
> {
|
||||
method: 'getServiceSecretBundlesAsFlatObject';
|
||||
request: {
|
||||
identity: IIdentity;
|
||||
serviceId: string;
|
||||
environment: string;
|
||||
};
|
||||
response: {
|
||||
flatKeyValueObject: {[key: string]: string};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
import * as plugins from '../plugins.js';
|
||||
import type { ICloudlySettings, ICloudlySettingsMasked } from '../data/settings.js';
|
||||
|
||||
// Get Settings
|
||||
export interface IRequest_GetSettings extends plugins.typedrequestInterfaces.ITypedRequest {
|
||||
method: 'getSettings';
|
||||
request: {};
|
||||
response: {
|
||||
settings: ICloudlySettingsMasked;
|
||||
};
|
||||
}
|
||||
|
||||
// Update Settings
|
||||
export interface IRequest_UpdateSettings extends plugins.typedrequestInterfaces.ITypedRequest {
|
||||
method: 'updateSettings';
|
||||
request: {
|
||||
updates: Partial<ICloudlySettings>;
|
||||
};
|
||||
response: {
|
||||
success: boolean;
|
||||
message: string;
|
||||
};
|
||||
}
|
||||
|
||||
// Clear Specific Setting
|
||||
export interface IRequest_ClearSetting extends plugins.typedrequestInterfaces.ITypedRequest {
|
||||
method: 'clearSetting';
|
||||
request: {
|
||||
key: keyof ICloudlySettings;
|
||||
};
|
||||
response: {
|
||||
success: boolean;
|
||||
message: string;
|
||||
};
|
||||
}
|
||||
|
||||
// Test Provider Connection
|
||||
export interface IRequest_TestProviderConnection extends plugins.typedrequestInterfaces.ITypedRequest {
|
||||
method: 'testProviderConnection';
|
||||
request: {
|
||||
provider: 'hetzner' | 'cloudflare' | 'aws' | 'digitalocean' | 'azure' | 'google' | 'vultr' | 'linode' | 'ovh' | 'scaleway';
|
||||
};
|
||||
response: {
|
||||
success: boolean;
|
||||
message: string;
|
||||
connectionValid: boolean;
|
||||
};
|
||||
}
|
||||
|
||||
// Get Single Setting (for internal use, not exposed to frontend)
|
||||
export interface IRequest_GetSetting extends plugins.typedrequestInterfaces.ITypedRequest {
|
||||
method: 'getSetting';
|
||||
request: {
|
||||
key: keyof ICloudlySettings;
|
||||
};
|
||||
response: {
|
||||
value: string | undefined;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
import * as userInterfaces from '../data/user.js';
|
||||
|
||||
/**
|
||||
* a status update dashboard
|
||||
*/
|
||||
export interface IRequest_Coreflow_Cloudly_CoreflowManagerStatusupdate {
|
||||
method: 'cloudlyStatus';
|
||||
request: {
|
||||
identity: userInterfaces.IIdentity;
|
||||
};
|
||||
response: {};
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
import * as plugins from '../plugins.js';
|
||||
import * as data from '../data/index.js';
|
||||
import * as userInterfaces from '../data/user.js';
|
||||
|
||||
// Get all tasks
|
||||
export interface IRequest_Any_Cloudly_GetTasks
|
||||
extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IRequest_Any_Cloudly_GetTasks
|
||||
> {
|
||||
method: 'getTasks';
|
||||
request: {
|
||||
identity: userInterfaces.IIdentity;
|
||||
};
|
||||
response: {
|
||||
tasks: Array<{
|
||||
name: string;
|
||||
description: string;
|
||||
category: 'maintenance' | 'deployment' | 'backup' | 'monitoring' | 'cleanup' | 'system' | 'security';
|
||||
schedule?: string;
|
||||
lastRun?: number;
|
||||
enabled: boolean;
|
||||
}>;
|
||||
};
|
||||
}
|
||||
|
||||
// Get task executions
|
||||
export interface IRequest_Any_Cloudly_GetTaskExecutions
|
||||
extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IRequest_Any_Cloudly_GetTaskExecutions
|
||||
> {
|
||||
method: 'getTaskExecutions';
|
||||
request: {
|
||||
identity: userInterfaces.IIdentity;
|
||||
filter?: {
|
||||
taskName?: string;
|
||||
status?: string;
|
||||
startedAfter?: number;
|
||||
startedBefore?: number;
|
||||
};
|
||||
};
|
||||
response: {
|
||||
executions: data.ITaskExecution[];
|
||||
};
|
||||
}
|
||||
|
||||
// Get task execution by ID
|
||||
export interface IRequest_Any_Cloudly_GetTaskExecutionById
|
||||
extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IRequest_Any_Cloudly_GetTaskExecutionById
|
||||
> {
|
||||
method: 'getTaskExecutionById';
|
||||
request: {
|
||||
identity: userInterfaces.IIdentity;
|
||||
executionId: string;
|
||||
};
|
||||
response: {
|
||||
execution: data.ITaskExecution;
|
||||
};
|
||||
}
|
||||
|
||||
// Trigger task manually
|
||||
export interface IRequest_Any_Cloudly_TriggerTask
|
||||
extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IRequest_Any_Cloudly_TriggerTask
|
||||
> {
|
||||
method: 'triggerTask';
|
||||
request: {
|
||||
identity: userInterfaces.IIdentity;
|
||||
taskName: string;
|
||||
userId?: string;
|
||||
};
|
||||
response: {
|
||||
execution: data.ITaskExecution;
|
||||
};
|
||||
}
|
||||
|
||||
// Cancel a running task
|
||||
export interface IRequest_Any_Cloudly_CancelTask
|
||||
extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IRequest_Any_Cloudly_CancelTask
|
||||
> {
|
||||
method: 'cancelTask';
|
||||
request: {
|
||||
identity: userInterfaces.IIdentity;
|
||||
executionId: string;
|
||||
};
|
||||
response: {
|
||||
success: boolean;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
import * as versionInterfaces from '../data/version.js';
|
||||
|
||||
// Containers
|
||||
export interface IRequest_Any_Cloudly_VersionManager_InformCloudlyAboutNewContainerVersion {
|
||||
method: 'informCloudlyAboutNewContainerVersion';
|
||||
request: versionInterfaces.IContainerVersionData;
|
||||
response: {};
|
||||
}
|
||||
Reference in New Issue
Block a user