114 lines
2.7 KiB
TypeScript
114 lines
2.7 KiB
TypeScript
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;
|
|
name: string;
|
|
description: string;
|
|
imageId: string;
|
|
imageVersion: string;
|
|
environment: { [key: string]: string };
|
|
secretBundleId: string;
|
|
scaleFactor: number;
|
|
balancingStrategy: 'round-robin' | 'least-connections';
|
|
ports: {
|
|
web: number;
|
|
custom?: { [domain: string]: string };
|
|
};
|
|
resources?: IServiceRessources;
|
|
domains: {
|
|
name: string;
|
|
port?: number;
|
|
protocol?: 'http' | 'https' | 'ssh';
|
|
}[];
|
|
};
|
|
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;
|
|
name: string;
|
|
description: string;
|
|
imageId: string;
|
|
imageVersion: string;
|
|
environment: { [key: string]: string };
|
|
secretBundleId: string;
|
|
scaleFactor: number;
|
|
balancingStrategy: 'round-robin' | 'least-connections';
|
|
ports: {
|
|
web: number;
|
|
custom?: { [domain: string]: string };
|
|
};
|
|
resources?: IServiceRessources;
|
|
domains: {
|
|
name: string;
|
|
port?: number;
|
|
protocol?: 'http' | 'https' | 'ssh';
|
|
}[];
|
|
};
|
|
response: {
|
|
service: IService;
|
|
};
|
|
}
|
|
|
|
export interface IRequest_Any_Cloudly_DeleteService
|
|
extends plugins.typedrequestInterfaces.implementsTR<
|
|
plugins.typedrequestInterfaces.ITypedRequest,
|
|
IRequest_Any_Cloudly_DeleteService
|
|
> {
|
|
method: 'deleteService';
|
|
request: {
|
|
identity: IIdentity;
|
|
serviceId: string;
|
|
};
|
|
response: {
|
|
success: boolean;
|
|
};
|
|
}
|