feat(package): initialize standalone @serve.zone/interfaces package with shared TypeScript contracts
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* autocreated commitinfo by @push.rocks/commitinfo
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@serve.zone/interfaces',
|
||||
version: '5.4.0',
|
||||
description: 'Shared TypeScript interfaces and TypedRequest contracts for the serve.zone ecosystem.'
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
import * as plugins from '../plugins.js';
|
||||
|
||||
export interface IBareMetal {
|
||||
id: string;
|
||||
data: {
|
||||
hostname: string;
|
||||
|
||||
/**
|
||||
* IPMI management IP address
|
||||
*/
|
||||
ipmiAddress?: string;
|
||||
|
||||
/**
|
||||
* Encrypted IPMI credentials
|
||||
*/
|
||||
ipmiCredentials?: {
|
||||
username: string;
|
||||
passwordEncrypted: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* Primary network IP address
|
||||
*/
|
||||
primaryIp: string;
|
||||
|
||||
/**
|
||||
* Provider of the physical server
|
||||
*/
|
||||
provider: 'hetzner' | 'aws' | 'digitalocean' | 'onpremise';
|
||||
|
||||
/**
|
||||
* Data center or location
|
||||
*/
|
||||
location: string;
|
||||
|
||||
/**
|
||||
* Hardware specifications
|
||||
*/
|
||||
specs: {
|
||||
cpuModel: string;
|
||||
cpuCores: number;
|
||||
memoryGB: number;
|
||||
storageGB: number;
|
||||
storageType: 'ssd' | 'hdd' | 'nvme';
|
||||
};
|
||||
|
||||
/**
|
||||
* Current power state
|
||||
*/
|
||||
powerState: 'on' | 'off' | 'unknown';
|
||||
|
||||
/**
|
||||
* Operating system information
|
||||
*/
|
||||
osInfo: {
|
||||
name: string;
|
||||
version: string;
|
||||
kernel?: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* Array of ClusterNode IDs running on this hardware
|
||||
*/
|
||||
assignedNodeIds: string[];
|
||||
|
||||
/**
|
||||
* Metadata for provider-specific information
|
||||
*/
|
||||
providerMetadata?: {
|
||||
[key: string]: any;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
import * as plugins from '../plugins.js';
|
||||
|
||||
export interface ICloudlyConfig {
|
||||
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;
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
import * as plugins from '../plugins.js';
|
||||
|
||||
import { type IDockerRegistryInfo } from '../data/docker.js';
|
||||
import type { IClusterNode } from './clusternode.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;
|
||||
|
||||
/**
|
||||
* Cluster setup mode - manual by default, or auto-provision with cloud provider
|
||||
*/
|
||||
setupMode?: 'manual' | 'hetzner' | 'aws' | 'digitalocean';
|
||||
|
||||
/**
|
||||
* Nodes that are part of the cluster
|
||||
*/
|
||||
nodes: IClusterNode[];
|
||||
|
||||
/**
|
||||
* ACME info. This is used to get SSL certificates.
|
||||
*/
|
||||
acmeInfo: {
|
||||
serverAddress: string;
|
||||
serverSecret: string;
|
||||
};
|
||||
|
||||
sshKeys: plugins.tsclass.network.ISshKey[];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
import * as plugins from '../plugins.js';
|
||||
|
||||
export interface IClusterNodeMetrics {
|
||||
cpuUsagePercent: number;
|
||||
memoryUsedMB: number;
|
||||
memoryAvailableMB: number;
|
||||
diskUsedGB: number;
|
||||
diskAvailableGB: number;
|
||||
containerCount: number;
|
||||
timestamp: number;
|
||||
}
|
||||
|
||||
export interface IClusterNode {
|
||||
id: string;
|
||||
data: {
|
||||
/**
|
||||
* Reference to the cluster this node belongs to
|
||||
*/
|
||||
clusterId: string;
|
||||
|
||||
/**
|
||||
* Reference to the physical server (if applicable)
|
||||
*/
|
||||
baremetalId?: string;
|
||||
|
||||
/**
|
||||
* Type of node
|
||||
*/
|
||||
nodeType: 'baremetal' | 'vm' | 'container';
|
||||
|
||||
/**
|
||||
* Current status of the node
|
||||
*/
|
||||
status: 'initializing' | 'online' | 'offline' | 'maintenance';
|
||||
|
||||
/**
|
||||
* Role of the node in the cluster
|
||||
*/
|
||||
role: 'master' | 'worker';
|
||||
|
||||
/**
|
||||
* Timestamp when node joined the cluster
|
||||
*/
|
||||
joinedAt: number;
|
||||
|
||||
/**
|
||||
* Last health check timestamp
|
||||
*/
|
||||
lastHealthCheck: number;
|
||||
|
||||
/**
|
||||
* Current metrics for the node
|
||||
*/
|
||||
metrics?: IClusterNodeMetrics;
|
||||
|
||||
/**
|
||||
* Docker swarm node ID if part of swarm
|
||||
*/
|
||||
swarmNodeId?: string;
|
||||
|
||||
/**
|
||||
* SSH keys deployed to this node
|
||||
*/
|
||||
sshKeys: plugins.tsclass.network.ISshKey[];
|
||||
|
||||
/**
|
||||
* Debian packages installed on this node
|
||||
*/
|
||||
requiredDebianPackages: string[];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
export type TConfigType = 'server' | 'cluster' | 'coreflow' | 'service';
|
||||
@@ -0,0 +1,63 @@
|
||||
import * as plugins from '../plugins.js';
|
||||
|
||||
/**
|
||||
* a deployment happens when a service is deployed
|
||||
* tracks the status of a deployment
|
||||
*/
|
||||
export interface IDeployment {
|
||||
id: string;
|
||||
|
||||
/**
|
||||
* The service being deployed (single service per deployment)
|
||||
*/
|
||||
serviceId: string;
|
||||
|
||||
/**
|
||||
* The node this deployment is running on
|
||||
*/
|
||||
nodeId: string;
|
||||
|
||||
/**
|
||||
* Docker container ID for this deployment
|
||||
*/
|
||||
containerId?: string;
|
||||
|
||||
/**
|
||||
* Image used for this deployment
|
||||
*/
|
||||
usedImageId: string;
|
||||
|
||||
/**
|
||||
* Version of the service deployed
|
||||
*/
|
||||
version: string;
|
||||
|
||||
/**
|
||||
* Timestamp when deployed
|
||||
*/
|
||||
deployedAt: number;
|
||||
|
||||
/**
|
||||
* Deployment log entries
|
||||
*/
|
||||
deploymentLog: string[];
|
||||
|
||||
/**
|
||||
* Current status of the deployment
|
||||
*/
|
||||
status: 'scheduled' | 'starting' | 'running' | 'stopping' | 'stopped' | 'failed';
|
||||
|
||||
/**
|
||||
* Health status of the deployment
|
||||
*/
|
||||
healthStatus?: 'healthy' | 'unhealthy' | 'unknown';
|
||||
|
||||
/**
|
||||
* Resource usage for this deployment
|
||||
*/
|
||||
resourceUsage?: {
|
||||
cpuUsagePercent: number;
|
||||
memoryUsedMB: number;
|
||||
lastUpdated: number;
|
||||
};
|
||||
}
|
||||
+100
@@ -0,0 +1,100 @@
|
||||
export type TDnsRecordType = 'A' | 'AAAA' | 'CNAME' | 'MX' | 'TXT' | 'NS' | 'SOA' | 'SRV' | 'CAA' | 'PTR';
|
||||
|
||||
export interface IDnsEntry {
|
||||
id: string;
|
||||
data: {
|
||||
/**
|
||||
* The DNS record type
|
||||
*/
|
||||
type: TDnsRecordType;
|
||||
|
||||
/**
|
||||
* The DNS record name (e.g., www, @, mail)
|
||||
* @ represents the root domain
|
||||
*/
|
||||
name: string;
|
||||
|
||||
/**
|
||||
* The value of the DNS record
|
||||
* - For A/AAAA: IP address
|
||||
* - For CNAME: Target domain
|
||||
* - For MX: Mail server hostname
|
||||
* - For TXT: Text value
|
||||
* - For NS: Nameserver hostname
|
||||
* - For SRV: Target hostname
|
||||
* - For CAA: CAA record value
|
||||
* - For PTR: Domain name
|
||||
*/
|
||||
value: string;
|
||||
|
||||
/**
|
||||
* Time to live in seconds
|
||||
* Default: 3600 (1 hour)
|
||||
*/
|
||||
ttl: number;
|
||||
|
||||
/**
|
||||
* Priority (used for MX and SRV records)
|
||||
* Lower values have higher priority
|
||||
*/
|
||||
priority?: number;
|
||||
|
||||
/**
|
||||
* The DNS zone this entry belongs to
|
||||
* e.g., example.com
|
||||
* @deprecated Use domainId instead
|
||||
*/
|
||||
zone: string;
|
||||
|
||||
/**
|
||||
* The domain ID this DNS entry belongs to
|
||||
* Links to the Domain entity
|
||||
*/
|
||||
domainId?: string;
|
||||
|
||||
/**
|
||||
* Additional fields for SRV records
|
||||
*/
|
||||
weight?: number;
|
||||
port?: number;
|
||||
|
||||
/**
|
||||
* Whether this DNS entry is active
|
||||
*/
|
||||
active: boolean;
|
||||
|
||||
/**
|
||||
* Optional description for documentation
|
||||
*/
|
||||
description?: string;
|
||||
|
||||
/**
|
||||
* Timestamp when the entry was created
|
||||
*/
|
||||
createdAt?: number;
|
||||
|
||||
/**
|
||||
* Timestamp when the entry was last updated
|
||||
*/
|
||||
updatedAt?: number;
|
||||
|
||||
/**
|
||||
* Whether this DNS entry was auto-generated
|
||||
*/
|
||||
isAutoGenerated?: boolean;
|
||||
|
||||
/**
|
||||
* The service ID that created this DNS entry (for auto-generated entries)
|
||||
*/
|
||||
sourceServiceId?: string;
|
||||
|
||||
/**
|
||||
* The source type of this DNS entry
|
||||
* - manual: Created by user through UI/API
|
||||
* - service: Auto-generated from service configuration
|
||||
* - system: Created by system processes
|
||||
* - external: Synced from external DNS providers
|
||||
*/
|
||||
sourceType?: 'manual' | 'service' | 'system' | 'external';
|
||||
};
|
||||
}
|
||||
@@ -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[];
|
||||
}
|
||||
@@ -0,0 +1,124 @@
|
||||
export type TDomainStatus = 'active' | 'pending' | 'expired' | 'suspended' | 'transferred';
|
||||
export type TDomainVerificationStatus = 'verified' | 'pending' | 'failed' | 'not_required';
|
||||
|
||||
export interface IDomain {
|
||||
id: string;
|
||||
data: {
|
||||
/**
|
||||
* The domain name (e.g., example.com)
|
||||
*/
|
||||
name: string;
|
||||
|
||||
/**
|
||||
* Description or notes about the domain
|
||||
*/
|
||||
description?: string;
|
||||
|
||||
/**
|
||||
* Current status of the domain
|
||||
*/
|
||||
status: TDomainStatus;
|
||||
|
||||
/**
|
||||
* Domain verification status
|
||||
*/
|
||||
verificationStatus: TDomainVerificationStatus;
|
||||
|
||||
/**
|
||||
* Nameservers for the domain
|
||||
*/
|
||||
nameservers: string[];
|
||||
|
||||
/**
|
||||
* Domain registrar information
|
||||
*/
|
||||
registrar?: {
|
||||
name: string;
|
||||
url?: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* Domain registration date (timestamp)
|
||||
*/
|
||||
registeredAt?: number;
|
||||
|
||||
/**
|
||||
* Domain expiration date (timestamp)
|
||||
*/
|
||||
expiresAt?: number;
|
||||
|
||||
/**
|
||||
* Whether auto-renewal is enabled
|
||||
*/
|
||||
autoRenew: boolean;
|
||||
|
||||
/**
|
||||
* DNSSEC enabled
|
||||
*/
|
||||
dnssecEnabled?: boolean;
|
||||
|
||||
/**
|
||||
* Tags for categorization
|
||||
*/
|
||||
tags?: string[];
|
||||
|
||||
/**
|
||||
* Whether this domain is primary for the organization
|
||||
*/
|
||||
isPrimary?: boolean;
|
||||
|
||||
/**
|
||||
* SSL certificate status
|
||||
*/
|
||||
sslStatus?: 'active' | 'pending' | 'expired' | 'none';
|
||||
|
||||
/**
|
||||
* Cloudly activation state controls whether we actively manage DNS/certificates
|
||||
* - available: discovered/imported, not actively managed
|
||||
* - activated: actively managed (DNS edits allowed, certs considered)
|
||||
* - ignored: explicitly ignored from management/automation
|
||||
*/
|
||||
activationState?: 'available' | 'activated' | 'ignored';
|
||||
|
||||
/**
|
||||
* Last verification attempt timestamp
|
||||
*/
|
||||
lastVerificationAt?: number;
|
||||
|
||||
/**
|
||||
* Verification method used
|
||||
*/
|
||||
verificationMethod?: 'dns' | 'http' | 'email' | 'manual';
|
||||
|
||||
/**
|
||||
* Verification token (for DNS/HTTP verification)
|
||||
*/
|
||||
verificationToken?: string;
|
||||
|
||||
/**
|
||||
* Cloudflare zone ID if managed by Cloudflare
|
||||
*/
|
||||
cloudflareZoneId?: string;
|
||||
|
||||
/**
|
||||
* Sync metadata
|
||||
*/
|
||||
syncSource?: 'cloudflare' | 'manual' | null;
|
||||
lastSyncAt?: number;
|
||||
|
||||
/**
|
||||
* Whether domain is managed externally
|
||||
*/
|
||||
isExternal?: boolean;
|
||||
|
||||
/**
|
||||
* Creation timestamp
|
||||
*/
|
||||
createdAt?: number;
|
||||
|
||||
/**
|
||||
* Last update timestamp
|
||||
*/
|
||||
updatedAt?: number;
|
||||
};
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -0,0 +1,110 @@
|
||||
import * as plugins from '../plugins.js';
|
||||
|
||||
export interface IExternalRegistry {
|
||||
id: string;
|
||||
data: {
|
||||
/**
|
||||
* Registry type
|
||||
*/
|
||||
type: 'docker' | 'npm';
|
||||
|
||||
/**
|
||||
* Human-readable name for the registry
|
||||
*/
|
||||
name: string;
|
||||
|
||||
/**
|
||||
* Registry URL (e.g., https://registry.gitlab.com, docker.io)
|
||||
*/
|
||||
url: string;
|
||||
|
||||
/**
|
||||
* Username for authentication (optional for token-based or public registries)
|
||||
*/
|
||||
username?: string;
|
||||
|
||||
/**
|
||||
* Password, access token, or API key for authentication (optional for public registries)
|
||||
*/
|
||||
password?: string;
|
||||
|
||||
/**
|
||||
* Optional description
|
||||
*/
|
||||
description?: string;
|
||||
|
||||
/**
|
||||
* Whether this is the default registry for its type
|
||||
*/
|
||||
isDefault?: boolean;
|
||||
|
||||
/**
|
||||
* Authentication type
|
||||
*/
|
||||
authType?: 'none' | 'basic' | 'token' | 'oauth2';
|
||||
|
||||
/**
|
||||
* Allow insecure registry connections (HTTP or self-signed certs)
|
||||
*/
|
||||
insecure?: boolean;
|
||||
|
||||
/**
|
||||
* Optional namespace/organization for the registry
|
||||
*/
|
||||
namespace?: string;
|
||||
|
||||
/**
|
||||
* Proxy configuration
|
||||
*/
|
||||
proxy?: {
|
||||
http?: string;
|
||||
https?: string;
|
||||
noProxy?: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* Registry-specific configuration
|
||||
*/
|
||||
config?: {
|
||||
/**
|
||||
* For Docker registries
|
||||
*/
|
||||
dockerConfig?: {
|
||||
email?: string;
|
||||
serverAddress?: string;
|
||||
};
|
||||
/**
|
||||
* For npm registries
|
||||
*/
|
||||
npmConfig?: {
|
||||
scope?: string;
|
||||
alwaysAuth?: boolean;
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* Status of the registry connection
|
||||
*/
|
||||
status?: 'active' | 'inactive' | 'error' | 'unverified';
|
||||
|
||||
/**
|
||||
* Last error message if status is 'error'
|
||||
*/
|
||||
lastError?: string;
|
||||
|
||||
/**
|
||||
* Timestamp when the registry was last successfully verified
|
||||
*/
|
||||
lastVerified?: number;
|
||||
|
||||
/**
|
||||
* Timestamp when the registry was created
|
||||
*/
|
||||
createdAt?: number;
|
||||
|
||||
/**
|
||||
* Timestamp when the registry was last updated
|
||||
*/
|
||||
updatedAt?: number;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
import * as plugins from '../plugins.js';
|
||||
|
||||
export interface IImage {
|
||||
id: string;
|
||||
data: {
|
||||
name: string;
|
||||
location: {
|
||||
internal: boolean;
|
||||
externalRegistryId: string;
|
||||
externalImageTag: string;
|
||||
}
|
||||
description: string;
|
||||
versions: Array<{
|
||||
versionString: string;
|
||||
storagePath?: string;
|
||||
size: number;
|
||||
createdAt: number;
|
||||
}>;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
export * from './cloudlyconfig.js';
|
||||
export * from './cluster.js';
|
||||
export * from './config.js';
|
||||
export * from './deployment.js';
|
||||
export * from './dns.js';
|
||||
export * from './docker.js';
|
||||
export * from './domain.js';
|
||||
export * from './event.js';
|
||||
export * from './externalregistry.js';
|
||||
export * from './image.js';
|
||||
export * from './secretbundle.js';
|
||||
export * from './secretgroup.js';
|
||||
export * from './baremetal.js';
|
||||
export * from './clusternode.js';
|
||||
export * from './settings.js';
|
||||
export * from './service.js';
|
||||
export * from './status.js';
|
||||
export * from './taskexecution.js';
|
||||
export * from './traffic.js';
|
||||
export * from './user.js';
|
||||
export * from './version.js';
|
||||
@@ -0,0 +1,61 @@
|
||||
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
|
||||
*
|
||||
* * service:
|
||||
* the bundle belongs to a service and can only be used by that service
|
||||
* * npmci:
|
||||
* the bundle is a secret bundle that is used by an npmci pipeline
|
||||
* production secrets will be omitted in any case
|
||||
* * gitzone:
|
||||
* the bundle is a secret bundle that is used by a gitzone.
|
||||
* Only local environment variables are allowed
|
||||
* * external:
|
||||
* the bundle is a secret bundle that is used by an external service
|
||||
*/
|
||||
type: 'service' | 'npmci' | 'gitzone' | 'external';
|
||||
|
||||
|
||||
/**
|
||||
* set this if the secretBundle belongs to a service
|
||||
*/
|
||||
serviceId?: string;
|
||||
|
||||
/**
|
||||
* You can add specific secret groups using this
|
||||
*/
|
||||
includedSecretGroupIds: string[];
|
||||
|
||||
/**
|
||||
* access to this secretBundle also grants access to resources with matching tags
|
||||
*/
|
||||
includedTags: {
|
||||
key: string;
|
||||
value?: string;
|
||||
}[];
|
||||
|
||||
/**
|
||||
* access to this secretBundle also grants access to the images
|
||||
*/
|
||||
imageClaims: {
|
||||
imageId: string;
|
||||
permissions: ('read' | 'write')[];
|
||||
}[];
|
||||
|
||||
/**
|
||||
* authrozations select a specific environment of a config bundle
|
||||
*/
|
||||
authorizations: Array<ISecretBundleAuthorization>;
|
||||
};
|
||||
}
|
||||
|
||||
export interface ISecretBundleAuthorization {
|
||||
secretAccessKey: string;
|
||||
environment: string;
|
||||
}
|
||||
@@ -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;
|
||||
}[];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -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[];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
import type { IServiceRessources } from './docker.js';
|
||||
|
||||
export interface IService {
|
||||
id: string;
|
||||
data: {
|
||||
name: string;
|
||||
description: string;
|
||||
imageId: string;
|
||||
imageVersion: string;
|
||||
environment: { [key: string]: string };
|
||||
/**
|
||||
* the main secret bundle id, exclusive to the service
|
||||
*/
|
||||
secretBundleId: string;
|
||||
/**
|
||||
* those secret bundle ids do not belong to the service itself
|
||||
* and thus live past the service lifecycle
|
||||
*/
|
||||
additionalSecretBundleIds?: string[];
|
||||
|
||||
/**
|
||||
* Service category determines deployment behavior
|
||||
* - base: Core services that run on every node (coreflow, coretraffic, corelog)
|
||||
* - distributed: Services that run on limited nodes (cores3, coremongo)
|
||||
* - workload: User applications
|
||||
*/
|
||||
serviceCategory: 'base' | 'distributed' | 'workload';
|
||||
|
||||
/**
|
||||
* Deployment strategy for the service
|
||||
* - all-nodes: Deploy to every node in the cluster
|
||||
* - limited-replicas: Deploy to a limited number of nodes
|
||||
* - custom: Custom deployment logic
|
||||
*/
|
||||
deploymentStrategy: 'all-nodes' | 'limited-replicas' | 'custom';
|
||||
|
||||
/**
|
||||
* Maximum number of replicas for distributed services
|
||||
* For example, 3 for cores3 or coremongo
|
||||
*/
|
||||
maxReplicas?: number;
|
||||
|
||||
/**
|
||||
* Whether to enforce anti-affinity rules
|
||||
* When true, tries to spread deployments across different BareMetal servers
|
||||
*/
|
||||
antiAffinity?: boolean;
|
||||
|
||||
scaleFactor: number;
|
||||
balancingStrategy: 'round-robin' | 'least-connections';
|
||||
ports: {
|
||||
web: number;
|
||||
custom?: { [domain: string]: string };
|
||||
};
|
||||
resources?: IServiceRessources;
|
||||
domains: {
|
||||
/**
|
||||
* Optional domain ID to specify which domain to use
|
||||
* If not specified, will use the default domain or require manual configuration
|
||||
*/
|
||||
domainId?: string;
|
||||
/**
|
||||
* The subdomain name (e.g., 'api', 'www', '@' for root)
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* The port to expose (defaults to ports.web if not specified)
|
||||
*/
|
||||
port?: number;
|
||||
/**
|
||||
* The protocol for this domain entry
|
||||
*/
|
||||
protocol?: 'http' | 'https' | 'ssh';
|
||||
}[];
|
||||
deploymentIds: string[];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
import * as plugins from '../plugins.js';
|
||||
|
||||
/**
|
||||
* Interface for Cloudly settings stored in EasyStore
|
||||
* These are runtime-configurable settings that can be modified via the UI
|
||||
*/
|
||||
export interface ICloudlySettings {
|
||||
// Cloud Provider Tokens
|
||||
hetznerToken?: string;
|
||||
cloudflareToken?: string;
|
||||
|
||||
// AWS Credentials
|
||||
awsAccessKey?: string;
|
||||
awsSecretKey?: string;
|
||||
awsRegion?: string;
|
||||
|
||||
// DigitalOcean
|
||||
digitalOceanToken?: string;
|
||||
|
||||
// Azure Credentials
|
||||
azureClientId?: string;
|
||||
azureClientSecret?: string;
|
||||
azureTenantId?: string;
|
||||
azureSubscriptionId?: string;
|
||||
|
||||
// Google Cloud
|
||||
googleCloudKeyJson?: string;
|
||||
googleCloudProjectId?: string;
|
||||
|
||||
// Vultr
|
||||
vultrApiKey?: string;
|
||||
|
||||
// Linode
|
||||
linodeToken?: string;
|
||||
|
||||
// OVH
|
||||
ovhApplicationKey?: string;
|
||||
ovhApplicationSecret?: string;
|
||||
ovhConsumerKey?: string;
|
||||
|
||||
// Scaleway
|
||||
scalewayAccessKey?: string;
|
||||
scalewaySecretKey?: string;
|
||||
scalewayOrganizationId?: string;
|
||||
|
||||
// Other settings that might be added in the future
|
||||
[key: string]: string | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Interface for masked settings (used in API responses)
|
||||
* Shows only last 4 characters of sensitive tokens
|
||||
*/
|
||||
export type ICloudlySettingsMasked = {
|
||||
[K in keyof ICloudlySettings]: string | undefined;
|
||||
};
|
||||
@@ -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;
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
/**
|
||||
* Task execution tracking for the task management system
|
||||
* Tasks themselves are hard-coded using @push.rocks/taskbuffer
|
||||
* This interface tracks execution history and outcomes
|
||||
*/
|
||||
export interface ITaskExecution {
|
||||
id: string;
|
||||
data: {
|
||||
/**
|
||||
* Name of the task being executed
|
||||
*/
|
||||
taskName: string;
|
||||
|
||||
/**
|
||||
* Optional description of what the task does
|
||||
*/
|
||||
taskDescription?: string;
|
||||
|
||||
/**
|
||||
* Category for grouping tasks
|
||||
*/
|
||||
category?: 'maintenance' | 'deployment' | 'backup' | 'monitoring' | 'cleanup' | 'system' | 'security';
|
||||
|
||||
/**
|
||||
* Timestamp when the task started
|
||||
*/
|
||||
startedAt: number;
|
||||
|
||||
/**
|
||||
* Timestamp when the task completed
|
||||
*/
|
||||
completedAt?: number;
|
||||
|
||||
/**
|
||||
* Current status of the task execution
|
||||
*/
|
||||
status: 'running' | 'completed' | 'failed' | 'cancelled';
|
||||
|
||||
/**
|
||||
* Duration in milliseconds
|
||||
*/
|
||||
duration?: number;
|
||||
|
||||
/**
|
||||
* How the task was triggered
|
||||
*/
|
||||
triggeredBy: 'schedule' | 'manual' | 'system';
|
||||
|
||||
/**
|
||||
* User ID if manually triggered
|
||||
*/
|
||||
userId?: string;
|
||||
|
||||
/**
|
||||
* Execution logs
|
||||
*/
|
||||
logs: Array<{
|
||||
timestamp: number;
|
||||
message: string;
|
||||
severity: 'info' | 'warning' | 'error' | 'success';
|
||||
}>;
|
||||
|
||||
/**
|
||||
* Task-specific metrics
|
||||
*/
|
||||
metrics?: {
|
||||
[key: string]: any;
|
||||
};
|
||||
|
||||
/**
|
||||
* Final result/output of the task
|
||||
*/
|
||||
result?: any;
|
||||
|
||||
/**
|
||||
* Error details if the task failed
|
||||
*/
|
||||
error?: {
|
||||
message: string;
|
||||
stack?: string;
|
||||
code?: string;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
import * as plugins from '../plugins.js';
|
||||
|
||||
interface IReverseProxyConfig extends plugins.tsclass.network.IReverseProxyConfig {}
|
||||
|
||||
export { type IReverseProxyConfig };
|
||||
@@ -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[];
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
The platform folder contains types that can be used for talking with the underlying platform by apps running on serve.zone.
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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,
|
||||
}
|
||||
@@ -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;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
import * as plugins from '../plugins.js';
|
||||
|
||||
export type TTemplates = 'default' | 'linkaction' | 'notification';
|
||||
|
||||
export interface IReq_SendEmail extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IReq_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 IReq_RegisterRecipient extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IReq_RegisterRecipient
|
||||
> {
|
||||
method: 'registerRecepient';
|
||||
request: {
|
||||
emailAddress: string;
|
||||
};
|
||||
response: {
|
||||
status: 'ok' | 'not ok';
|
||||
};
|
||||
}
|
||||
|
||||
export interface IReq_CheckEmailStatus extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IReq_CheckEmailStatus
|
||||
> {
|
||||
method: 'checkEmailStatus';
|
||||
request: {
|
||||
emailId: string;
|
||||
};
|
||||
response: {
|
||||
status: string,
|
||||
details?: { message: string; }
|
||||
};
|
||||
}
|
||||
|
||||
export interface IReq_GetEMailStats extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IReq_GetEMailStats
|
||||
> {
|
||||
method: 'getEmailStats';
|
||||
request: {
|
||||
jwt: string;
|
||||
};
|
||||
response: {
|
||||
totalEmailsSent: number;
|
||||
totalEmailsDelivered: number;
|
||||
totalEmailsBounced: number;
|
||||
averageDeliveryTimeMs: number;
|
||||
lastUpdated: string;
|
||||
};
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
}
|
||||
@@ -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