fix(ci): Fix Docker images and npm registry URL in CI workflows
This commit is contained in:
8
ts_interfaces/00_commitinfo_data.ts
Normal file
8
ts_interfaces/00_commitinfo_data.ts
Normal file
@ -0,0 +1,8 @@
|
||||
/**
|
||||
* autocreated commitinfo by @push.rocks/commitinfo
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@serve.zone/interfaces',
|
||||
version: '1.1.2',
|
||||
description: 'interfaces for working with containers'
|
||||
}
|
16
ts_interfaces/data/cloudlyconfig.ts
Normal file
16
ts_interfaces/data/cloudlyconfig.ts
Normal file
@ -0,0 +1,16 @@
|
||||
import * as plugins from '../plugins.js';
|
||||
|
||||
export interface ICloudlyConfig {
|
||||
cfToken?: string;
|
||||
hetznerToken?: string;
|
||||
environment?: 'production' | 'integration';
|
||||
letsEncryptEmail?: string;
|
||||
letsEncryptPrivateKey?: string;
|
||||
jwtKeypair?: plugins.tsclass.network.IJwtKeypair;
|
||||
mongoDescriptor?: plugins.tsclass.database.IMongoDescriptor;
|
||||
s3Descriptor?: plugins.tsclass.storage.IS3Descriptor;
|
||||
publicUrl?: string;
|
||||
publicPort?: string;
|
||||
sslMode?: 'none' | 'letsencrypt' | 'external';
|
||||
servezoneAdminaccount?: string;
|
||||
}
|
36
ts_interfaces/data/cluster.ts
Normal file
36
ts_interfaces/data/cluster.ts
Normal file
@ -0,0 +1,36 @@
|
||||
import * as plugins from '../plugins.js';
|
||||
|
||||
import { type IDockerRegistryInfo } from '../data/docker.js';
|
||||
import type { IServer } from './server.js';
|
||||
|
||||
export interface ICluster {
|
||||
id: string;
|
||||
data: {
|
||||
name: string;
|
||||
|
||||
/**
|
||||
* a cluster has a machine user that governs access rights.
|
||||
*/
|
||||
userId: string;
|
||||
|
||||
/**
|
||||
* how can the cluster reach cloudly
|
||||
*/
|
||||
cloudlyUrl?: string;
|
||||
|
||||
/**
|
||||
* what servers are expected to be part of the cluster
|
||||
*/
|
||||
servers: IServer[];
|
||||
|
||||
/**
|
||||
* ACME info. This is used to get SSL certificates.
|
||||
*/
|
||||
acmeInfo: {
|
||||
serverAddress: string;
|
||||
serverSecret: string;
|
||||
};
|
||||
|
||||
sshKeys: plugins.tsclass.network.ISshKey[];
|
||||
};
|
||||
}
|
1
ts_interfaces/data/config.ts
Normal file
1
ts_interfaces/data/config.ts
Normal file
@ -0,0 +1 @@
|
||||
export type TConfigType = 'server' | 'cluster' | 'coreflow' | 'service';
|
14
ts_interfaces/data/deployment.ts
Normal file
14
ts_interfaces/data/deployment.ts
Normal file
@ -0,0 +1,14 @@
|
||||
import * as plugins from '../plugins.js';
|
||||
|
||||
/**
|
||||
* results from a DeploymentDirective
|
||||
* tracks the status of a deployment
|
||||
*/
|
||||
export interface IDeployment {
|
||||
id: string;
|
||||
deploymentDirectiveId: string;
|
||||
affectedServiceIds: string[];
|
||||
usedImageId: string;
|
||||
deploymentLog: string[];
|
||||
status: 'scheduled' | 'running' | 'deployed' | 'failed';
|
||||
}
|
14
ts_interfaces/data/deploymentdirective.ts
Normal file
14
ts_interfaces/data/deploymentdirective.ts
Normal file
@ -0,0 +1,14 @@
|
||||
import type { IServiceRessources } from "./docker.js";
|
||||
|
||||
/**
|
||||
* used for tellilng a cluster about a disired deployment
|
||||
* and specifies its configuration
|
||||
*/
|
||||
export interface IDeploymentDirective {
|
||||
id: string;
|
||||
name: string;
|
||||
imageClaim: string;
|
||||
ports: { hostPort: number; containerPort: number }[];
|
||||
environment: { [key: string]: string };
|
||||
resources?: IServiceRessources;
|
||||
}
|
15
ts_interfaces/data/docker.ts
Normal file
15
ts_interfaces/data/docker.ts
Normal file
@ -0,0 +1,15 @@
|
||||
import * as plugins from '../plugins.js';
|
||||
|
||||
export interface IDockerRegistryInfo {
|
||||
serveraddress: string;
|
||||
username: string;
|
||||
password: string;
|
||||
}
|
||||
|
||||
export interface IServiceRessources {
|
||||
cpuLimit?: number;
|
||||
cpuReservation?: number;
|
||||
memorySizeLimitMB?: number;
|
||||
memorySizeReservationMB?: number;
|
||||
volumeMounts?: plugins.tsclass.container.IVolumeMount[];
|
||||
}
|
6
ts_interfaces/data/env.ts
Normal file
6
ts_interfaces/data/env.ts
Normal file
@ -0,0 +1,6 @@
|
||||
|
||||
export interface IEnvBundle {
|
||||
environment: string;
|
||||
timeSensitive: boolean;
|
||||
configKeyValueObject: {[key: string]: string};
|
||||
}
|
11
ts_interfaces/data/event.ts
Normal file
11
ts_interfaces/data/event.ts
Normal file
@ -0,0 +1,11 @@
|
||||
import * as plugins from '../plugins.js';
|
||||
|
||||
export interface IEvent_Cloudly_ContainerVersionNotification
|
||||
extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedEvent<plugins.tsclass.container.IContainer>,
|
||||
IEvent_Cloudly_ContainerVersionNotification
|
||||
> {
|
||||
name: 'newContainerVersion';
|
||||
uniqueEventId: string;
|
||||
payload: plugins.tsclass.container.IContainer;
|
||||
}
|
15
ts_interfaces/data/image.ts
Normal file
15
ts_interfaces/data/image.ts
Normal file
@ -0,0 +1,15 @@
|
||||
import * as plugins from '../plugins.js';
|
||||
|
||||
export interface IImage {
|
||||
id: string;
|
||||
data: {
|
||||
name: string;
|
||||
description: string;
|
||||
versions: Array<{
|
||||
versionString: string;
|
||||
storagePath?: string;
|
||||
size: number;
|
||||
createdAt: number;
|
||||
}>;
|
||||
};
|
||||
}
|
17
ts_interfaces/data/index.ts
Normal file
17
ts_interfaces/data/index.ts
Normal file
@ -0,0 +1,17 @@
|
||||
export * from './cloudlyconfig.js';
|
||||
export * from './cluster.js';
|
||||
export * from './config.js';
|
||||
export * from './deployment.js';
|
||||
export * from './deploymentdirective.js';
|
||||
export * from './docker.js';
|
||||
export * from './env.js';
|
||||
export * from './event.js';
|
||||
export * from './image.js';
|
||||
export * from './secretbundle.js';
|
||||
export * from './secretgroup.js'
|
||||
export * from './server.js';
|
||||
export * from './service.js';
|
||||
export * from './status.js';
|
||||
export * from './traffic.js';
|
||||
export * from './user.js';
|
||||
export * from './version.js';
|
42
ts_interfaces/data/secretbundle.ts
Normal file
42
ts_interfaces/data/secretbundle.ts
Normal file
@ -0,0 +1,42 @@
|
||||
export interface ISecretBundle {
|
||||
id: string;
|
||||
data: {
|
||||
name: string;
|
||||
description: string;
|
||||
|
||||
/**
|
||||
* determines if the secret is a service or an external secret
|
||||
* if external secret additional checks are put in place to protect the secret
|
||||
*/
|
||||
type: 'service' | 'npmci' | 'gitzone' | 'external';
|
||||
|
||||
/**
|
||||
* You can add specific secret groups using this
|
||||
*/
|
||||
includedSecretGroupIds: string[];
|
||||
|
||||
/**
|
||||
* You can add specific tags using this
|
||||
*/
|
||||
includedTags: {
|
||||
key: string;
|
||||
value?: string;
|
||||
}[];
|
||||
|
||||
/**
|
||||
* add images
|
||||
*/
|
||||
includedImages: {
|
||||
imageId: string;
|
||||
permissions: ('read' | 'write')[];
|
||||
}[];
|
||||
|
||||
/**
|
||||
* authrozations select a specific environment of a config bundle
|
||||
*/
|
||||
authorizations: Array<{
|
||||
secretAccessKey: string;
|
||||
environment: string;
|
||||
}>;
|
||||
};
|
||||
}
|
54
ts_interfaces/data/secretgroup.ts
Normal file
54
ts_interfaces/data/secretgroup.ts
Normal file
@ -0,0 +1,54 @@
|
||||
export interface ISecretGroup {
|
||||
/**
|
||||
* the insatnce id. This should be a random id, except for default
|
||||
*/
|
||||
id: string;
|
||||
|
||||
data: {
|
||||
name: string;
|
||||
description: string;
|
||||
|
||||
/**
|
||||
* the key of the secretgroup like CI_RUNNER_TOKEN
|
||||
*/
|
||||
key: string;
|
||||
|
||||
/**
|
||||
* the priority of the secretgroup
|
||||
* will be used to determine which secretgroup will be used
|
||||
* when there are multiple secretgroups with the same key
|
||||
*/
|
||||
priority?: number;
|
||||
|
||||
/**
|
||||
* any tags that can be used to filter the secretgroup
|
||||
* can be used for putting secrets into projects
|
||||
*/
|
||||
tags: {
|
||||
key: string;
|
||||
value: string;
|
||||
}[];
|
||||
/**
|
||||
* the values for this secretGroup
|
||||
*/
|
||||
environments: {
|
||||
[key: string]: {
|
||||
value: string;
|
||||
|
||||
/**
|
||||
* can be used to update the value
|
||||
*/
|
||||
updateToken?: string;
|
||||
|
||||
/**
|
||||
* the linux timestamp of the last update
|
||||
*/
|
||||
lastUpdated: number;
|
||||
history: {
|
||||
timestamp: string;
|
||||
value: string;
|
||||
}[];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
36
ts_interfaces/data/server.ts
Normal file
36
ts_interfaces/data/server.ts
Normal file
@ -0,0 +1,36 @@
|
||||
import * as plugins from '../plugins.js';
|
||||
|
||||
import { type IDockerRegistryInfo } from './docker.js';
|
||||
|
||||
export interface IServerMetrics {
|
||||
serverId: string;
|
||||
cpuUsageInPercent: number;
|
||||
memoryUsageinMB: number;
|
||||
memoryAvailableInMB: number;
|
||||
containerCount: number;
|
||||
containerMetrics: Array<{
|
||||
containerId: string;
|
||||
containerName: string;
|
||||
cpuUsageInPercent: number;
|
||||
memoryUsageInMB: number;
|
||||
}>;
|
||||
}
|
||||
|
||||
export interface IServer {
|
||||
id: string;
|
||||
data: {
|
||||
type: 'baremetal' | 'hetzner';
|
||||
|
||||
assignedClusterId: string;
|
||||
|
||||
/**
|
||||
* a list of debian packages to be installed
|
||||
*/
|
||||
requiredDebianPackages: string[];
|
||||
|
||||
/**
|
||||
* a list of SSH keys to deploy
|
||||
*/
|
||||
sshKeys: plugins.tsclass.network.ISshKey[];
|
||||
};
|
||||
}
|
26
ts_interfaces/data/service.ts
Normal file
26
ts_interfaces/data/service.ts
Normal file
@ -0,0 +1,26 @@
|
||||
import type { IServiceRessources } from './docker.js';
|
||||
|
||||
export interface IService {
|
||||
id: string;
|
||||
data: {
|
||||
name: 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';
|
||||
}[];
|
||||
deploymentIds: string[];
|
||||
deploymentDirectiveIds: string[];
|
||||
};
|
||||
}
|
20
ts_interfaces/data/status.ts
Normal file
20
ts_interfaces/data/status.ts
Normal file
@ -0,0 +1,20 @@
|
||||
import * as plugins from '../plugins.js';
|
||||
|
||||
export interface IClusterStatus {
|
||||
name: string;
|
||||
ip: string;
|
||||
nodesCount: number;
|
||||
containersUnderManagementCount: number;
|
||||
nodeStatusId: string;
|
||||
containerStatusArray: IContainerStatus[];
|
||||
}
|
||||
|
||||
export interface INodeStatus {
|
||||
nodeId: string;
|
||||
}
|
||||
|
||||
export interface IContainerStatus {
|
||||
serviceName: string;
|
||||
dockerImageUrl: string;
|
||||
dockerImageVersion: string;
|
||||
}
|
5
ts_interfaces/data/traffic.ts
Normal file
5
ts_interfaces/data/traffic.ts
Normal file
@ -0,0 +1,5 @@
|
||||
import * as plugins from '../plugins.js';
|
||||
|
||||
interface IReverseProxyConfig extends plugins.tsclass.network.IReverseProxyConfig {}
|
||||
|
||||
export { type IReverseProxyConfig };
|
30
ts_interfaces/data/user.ts
Normal file
30
ts_interfaces/data/user.ts
Normal file
@ -0,0 +1,30 @@
|
||||
export interface IToken {
|
||||
token: string;
|
||||
expiresAt: number;
|
||||
assignedRoles: string[];
|
||||
}
|
||||
|
||||
/**
|
||||
* an identity is assumed by authentication as a user
|
||||
* an identity is ephemeral and has to be renewed regularly
|
||||
*/
|
||||
export interface IIdentity {
|
||||
name: string;
|
||||
userId: string;
|
||||
type: 'machine' | 'human';
|
||||
role: 'admin' | 'user' | 'api' | 'cluster';
|
||||
expiresAt: number;
|
||||
/** the jwt token should contain above data for verification */
|
||||
jwt: string;
|
||||
}
|
||||
|
||||
export interface IUser {
|
||||
id: string;
|
||||
data: {
|
||||
type: 'machine' | 'human';
|
||||
role: 'admin' | 'user' | 'api' | 'cluster';
|
||||
username?: string;
|
||||
password?: string;
|
||||
tokens?: IToken[];
|
||||
}
|
||||
}
|
11
ts_interfaces/data/version.ts
Normal file
11
ts_interfaces/data/version.ts
Normal file
@ -0,0 +1,11 @@
|
||||
export interface IContainerVersionData {
|
||||
/**
|
||||
* the docker image url
|
||||
* example: registry.gitlab.com/hosttoday/ht-docker-node:latest
|
||||
*/
|
||||
dockerImageUrl: string;
|
||||
/**
|
||||
* the docker image version. Note: This is different from docker tags that are often used for versions.
|
||||
*/
|
||||
dockerImageVersion: string;
|
||||
}
|
9
ts_interfaces/index.ts
Normal file
9
ts_interfaces/index.ts
Normal file
@ -0,0 +1,9 @@
|
||||
import * as data from './data/index.js';
|
||||
import * as platformservice from './platformservice/index.js';
|
||||
import * as requests from './requests/index.js';
|
||||
|
||||
export {
|
||||
data,
|
||||
platformservice,
|
||||
requests
|
||||
}
|
1
ts_interfaces/platformservice/00readme.md
Normal file
1
ts_interfaces/platformservice/00readme.md
Normal file
@ -0,0 +1 @@
|
||||
The platform folder contains types that can be used for talking with the underlying platform by apps running on serve.zone.
|
23
ts_interfaces/platformservice/aibridge.ts
Normal file
23
ts_interfaces/platformservice/aibridge.ts
Normal file
@ -0,0 +1,23 @@
|
||||
import * as plugins from '../plugins.js';
|
||||
|
||||
export interface IChat {
|
||||
systemMessage: string;
|
||||
messages: {
|
||||
role: 'assistant' | 'user';
|
||||
content: string;
|
||||
}[];
|
||||
}
|
||||
|
||||
export interface IReq_Chat extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IReq_Chat
|
||||
> {
|
||||
method: 'chat',
|
||||
request: {
|
||||
chat: IChat;
|
||||
};
|
||||
response: {
|
||||
chat: IChat;
|
||||
latestMessage: string;
|
||||
}
|
||||
}
|
13
ts_interfaces/platformservice/index.ts
Normal file
13
ts_interfaces/platformservice/index.ts
Normal file
@ -0,0 +1,13 @@
|
||||
import * as aibridge from './aibridge.js';
|
||||
import * as letter from './letter.js';
|
||||
import * as mta from './mta.js';
|
||||
import * as pushnotification from './pushnotification.js';
|
||||
import * as sms from './sms.js';
|
||||
|
||||
export {
|
||||
aibridge,
|
||||
letter,
|
||||
mta,
|
||||
pushnotification,
|
||||
sms,
|
||||
}
|
34
ts_interfaces/platformservice/letter.ts
Normal file
34
ts_interfaces/platformservice/letter.ts
Normal file
@ -0,0 +1,34 @@
|
||||
import * as plugins from '../plugins.js';
|
||||
|
||||
export interface IRequest_SendLetter extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IRequest_SendLetter
|
||||
> {
|
||||
method: 'sendLetter';
|
||||
request: {
|
||||
/**
|
||||
* will be used in logs
|
||||
*/
|
||||
description: string;
|
||||
/**
|
||||
* if you send any PDF / invoice that you have not made sure to be letterxpress compliant
|
||||
* we strongly recommend using a cover page
|
||||
*/
|
||||
needsCover: boolean;
|
||||
title?: string;
|
||||
from?: plugins.tsclass.business.IAddress;
|
||||
to?: plugins.tsclass.business.IAddress;
|
||||
coverBody?: string;
|
||||
service: ('Einschreiben')[];
|
||||
pdfAttachments?: Array<{
|
||||
name: string;
|
||||
binaryAttachmentString: string;
|
||||
}>
|
||||
};
|
||||
response: {
|
||||
/**
|
||||
* this process id allows status retrieval of the letter
|
||||
*/
|
||||
processId: string;
|
||||
};
|
||||
}
|
39
ts_interfaces/platformservice/mta.ts
Normal file
39
ts_interfaces/platformservice/mta.ts
Normal file
@ -0,0 +1,39 @@
|
||||
import * as plugins from '../plugins.js';
|
||||
|
||||
export type TTemplates = 'default' | 'linkaction' | 'notification';
|
||||
|
||||
export interface IRequest_SendEmail extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IRequest_SendEmail
|
||||
> {
|
||||
method: 'sendEmail';
|
||||
request: {
|
||||
title: string;
|
||||
from: string;
|
||||
to: string;
|
||||
body: string;
|
||||
attachments?: Array<{
|
||||
name: string;
|
||||
binaryAttachmentString: string;
|
||||
}>
|
||||
};
|
||||
response: {
|
||||
/**
|
||||
* the response id allows for handling of responses to that email
|
||||
*/
|
||||
responseId: string;
|
||||
};
|
||||
}
|
||||
|
||||
export interface IRequestRegisterRecipient extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IRequestRegisterRecipient
|
||||
> {
|
||||
method: 'registerRecepient';
|
||||
request: {
|
||||
emailAddress: string;
|
||||
};
|
||||
response: {
|
||||
status: 'ok' | 'not ok';
|
||||
};
|
||||
}
|
16
ts_interfaces/platformservice/pushnotification.ts
Normal file
16
ts_interfaces/platformservice/pushnotification.ts
Normal file
@ -0,0 +1,16 @@
|
||||
import * as plugins from '../plugins.js';
|
||||
|
||||
export interface IRequest_SendPushNotification extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IRequest_SendPushNotification
|
||||
> {
|
||||
method: 'sendPushNotification';
|
||||
request: {
|
||||
deviceToken: string;
|
||||
message: string;
|
||||
}
|
||||
response: {
|
||||
ok: boolean;
|
||||
status: string;
|
||||
}
|
||||
}
|
33
ts_interfaces/platformservice/sms.ts
Normal file
33
ts_interfaces/platformservice/sms.ts
Normal file
@ -0,0 +1,33 @@
|
||||
import * as plugins from '../plugins.js';
|
||||
|
||||
export interface IRequest_SendSms
|
||||
extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IRequest_SendSms
|
||||
> {
|
||||
method: 'sendSms';
|
||||
request: {
|
||||
toNumber: number;
|
||||
fromName: string;
|
||||
messageText: string;
|
||||
};
|
||||
response: {
|
||||
status: 'ok' | 'not ok';
|
||||
}
|
||||
}
|
||||
|
||||
export interface IRequest_SendVerificationCode
|
||||
extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IRequest_SendVerificationCode
|
||||
> {
|
||||
method: 'sendVerificationCode';
|
||||
request: {
|
||||
toNumber: number;
|
||||
fromName: string;
|
||||
};
|
||||
response: {
|
||||
status: 'ok' | 'not ok';
|
||||
verificationCode: string;
|
||||
}
|
||||
}
|
20
ts_interfaces/plugins.ts
Normal file
20
ts_interfaces/plugins.ts
Normal file
@ -0,0 +1,20 @@
|
||||
// @apiglobal scope
|
||||
import * as typedrequestInterfaces from '@api.global/typedrequest-interfaces';
|
||||
|
||||
export {
|
||||
typedrequestInterfaces
|
||||
}
|
||||
|
||||
// @push.rocks scope
|
||||
import * as smartlogInterfaces from '@push.rocks/smartlog-interfaces';
|
||||
|
||||
export {
|
||||
smartlogInterfaces,
|
||||
}
|
||||
|
||||
// tsclass scope
|
||||
import * as tsclass from '@tsclass/tsclass';
|
||||
|
||||
export {
|
||||
tsclass
|
||||
}
|
18
ts_interfaces/requests/certificate.ts
Normal file
18
ts_interfaces/requests/certificate.ts
Normal file
@ -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;
|
||||
};
|
||||
}
|
67
ts_interfaces/requests/cluster.ts
Normal file
67
ts_interfaces/requests/cluster.ts
Normal file
@ -0,0 +1,67 @@
|
||||
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;
|
||||
};
|
||||
}
|
49
ts_interfaces/requests/config.ts
Normal file
49
ts_interfaces/requests/config.ts
Normal file
@ -0,0 +1,49 @@
|
||||
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';
|
||||
import type { IDeploymentDirective } from '../data/deploymentdirective.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;
|
||||
deploymentDirectives: IDeploymentDirective[];
|
||||
};
|
||||
}
|
||||
|
||||
export interface IRequest_Cloudly_Coreflow_PushClusterConfig
|
||||
extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IRequest_Cloudly_Coreflow_PushClusterConfig
|
||||
> {
|
||||
method: 'pushClusterConfig';
|
||||
request: {
|
||||
configData: clusterInterfaces.ICluster;
|
||||
deploymentDirectives: IDeploymentDirective[];
|
||||
};
|
||||
response: {};
|
||||
}
|
23
ts_interfaces/requests/identity.ts
Normal file
23
ts_interfaces/requests/identity.ts
Normal file
@ -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;
|
||||
};
|
||||
}
|
94
ts_interfaces/requests/image.ts
Normal file
94
ts_interfaces/requests/image.ts
Normal file
@ -0,0 +1,94 @@
|
||||
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
|
||||
*/
|
||||
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: {
|
||||
};
|
||||
}
|
33
ts_interfaces/requests/index.ts
Normal file
33
ts_interfaces/requests/index.ts
Normal file
@ -0,0 +1,33 @@
|
||||
import * as plugins from '../plugins.js';
|
||||
|
||||
import * as certificateRequests from './certificate.js';
|
||||
import * as clusterRequests from './cluster.js';
|
||||
import * as configRequests from './config.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 routingRequests from './routing.js';
|
||||
import * as secretRequests from './secret.js';
|
||||
import * as serverRequests from './server.js';
|
||||
import * as statusRequests from './status.js';
|
||||
import * as versionRequests from './version.js';
|
||||
|
||||
export {
|
||||
certificateRequests as certificate,
|
||||
clusterRequests as cluster,
|
||||
configRequests as config,
|
||||
identityRequests as identity,
|
||||
imageRequests as image,
|
||||
informRequests as inform,
|
||||
logRequests as log,
|
||||
networkRequests as network,
|
||||
routingRequests as routing,
|
||||
secretRequests as secret,
|
||||
serverRequests as server,
|
||||
statusRequests as status,
|
||||
versionRequests as version,
|
||||
};
|
||||
|
||||
export * from './inform.js';
|
12
ts_interfaces/requests/inform.ts
Normal file
12
ts_interfaces/requests/inform.ts
Normal file
@ -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: {};
|
||||
}
|
13
ts_interfaces/requests/log.ts
Normal file
13
ts_interfaces/requests/log.ts
Normal file
@ -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: {};
|
||||
}
|
9
ts_interfaces/requests/network.ts
Normal file
9
ts_interfaces/requests/network.ts
Normal file
@ -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[];
|
||||
};
|
||||
}
|
12
ts_interfaces/requests/routing.ts
Normal file
12
ts_interfaces/requests/routing.ts
Normal file
@ -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;
|
||||
};
|
||||
}
|
94
ts_interfaces/requests/secret.ts
Normal file
94
ts_interfaces/requests/secret.ts
Normal file
@ -0,0 +1,94 @@
|
||||
import * as plugins from '../plugins.js';
|
||||
import * as data from '../data/index.js';
|
||||
import * as userInterfaces from '../data/user.js';
|
||||
|
||||
export interface IReq_GetEnvBundle extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IReq_GetEnvBundle
|
||||
> {
|
||||
method: 'getEnvBundle';
|
||||
request: {
|
||||
authorization: string;
|
||||
/**
|
||||
* specify this if you want to get a warning, if the envBundle is for an unexpected environment
|
||||
*/
|
||||
environment?: string;
|
||||
};
|
||||
response: {
|
||||
envBundle: data.IEnvBundle;
|
||||
};
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
export interface IReq_Admin_GetConfigBundlesAndSecretGroups extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IReq_Admin_GetConfigBundlesAndSecretGroups
|
||||
> {
|
||||
method: 'adminGetConfigBundlesAndSecretGroups';
|
||||
request: {
|
||||
identity: userInterfaces.IIdentity;
|
||||
};
|
||||
response: {
|
||||
secretBundles: data.ISecretBundle[];
|
||||
secretGroups: data.ISecretGroup[];
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
export interface IReq_Admin_CreateConfigBundlesAndSecretGroups extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IReq_Admin_CreateConfigBundlesAndSecretGroups
|
||||
> {
|
||||
method: 'adminCreateConfigBundlesAndSecretGroups';
|
||||
request: {
|
||||
identity: userInterfaces.IIdentity;
|
||||
secretBundles: data.ISecretBundle[];
|
||||
secretGroups: data.ISecretGroup[];
|
||||
};
|
||||
response: {
|
||||
ok: boolean;
|
||||
};
|
||||
}
|
||||
|
||||
export interface IReq_Admin_UpdateConfigBundlesAndSecretGroups extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IReq_Admin_UpdateConfigBundlesAndSecretGroups
|
||||
> {
|
||||
method: 'adminUpdateConfigBundlesAndSecretGroups';
|
||||
request: {
|
||||
identity: userInterfaces.IIdentity;
|
||||
configBundles: data.ISecretBundle[];
|
||||
secretGroups: data.ISecretGroup[];
|
||||
};
|
||||
response: {
|
||||
ok: boolean;
|
||||
};
|
||||
}
|
||||
|
||||
export interface IReq_Admin_DeleteConfigBundlesAndSecretGroups extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IReq_Admin_DeleteConfigBundlesAndSecretGroups
|
||||
> {
|
||||
method: 'adminDeleteConfigBundlesAndSecretGroups';
|
||||
request: {
|
||||
identity: userInterfaces.IIdentity;
|
||||
secretBundleIds: string[];
|
||||
secretGroupIds: string[];
|
||||
};
|
||||
response: {
|
||||
ok: boolean;
|
||||
};
|
||||
}
|
47
ts_interfaces/requests/server.ts
Normal file
47
ts_interfaces/requests/server.ts
Normal file
@ -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;
|
||||
};
|
||||
}
|
12
ts_interfaces/requests/status.ts
Normal file
12
ts_interfaces/requests/status.ts
Normal file
@ -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: {};
|
||||
}
|
8
ts_interfaces/requests/version.ts
Normal file
8
ts_interfaces/requests/version.ts
Normal file
@ -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: {};
|
||||
}
|
@ -1,6 +1,8 @@
|
||||
{
|
||||
"name": "@serve.zone/interfaces",
|
||||
"dependencies": [
|
||||
"@api.global/typedrequest-interfaces",
|
||||
"@push.rocks/smartlog-interfaces",
|
||||
"@tsclass/tsclass"
|
||||
],
|
||||
"registries": [
|
||||
|
Reference in New Issue
Block a user