Add optional service pricing matrix and fix admin catalog save.
Users pick per-service CPU/memory/storage at deploy; admins manage unit rates and deploy defaults. PATCH sends only fields accepted by the pricing-catalog DTO. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -217,6 +217,20 @@ export interface CreateApplicationDto {
|
||||
enableElasticsearch?: boolean;
|
||||
elasticsearchVersion?: string;
|
||||
logPaths?: string[];
|
||||
optionalServiceResources?: OptionalServiceResourcesMap;
|
||||
}
|
||||
|
||||
export interface OptionalServiceResourceConfig {
|
||||
cpuRequest?: string;
|
||||
cpuLimit: string;
|
||||
memoryRequest?: string;
|
||||
memoryLimit: string;
|
||||
storageGi: number;
|
||||
}
|
||||
|
||||
export interface OptionalServiceResourcesMap {
|
||||
redis?: OptionalServiceResourceConfig;
|
||||
rabbitmq?: OptionalServiceResourceConfig;
|
||||
}
|
||||
|
||||
export interface ClusterPublic {
|
||||
@@ -383,6 +397,36 @@ export interface PricingRateRow {
|
||||
isActive?: boolean;
|
||||
}
|
||||
|
||||
export interface CyclePrices {
|
||||
hourly: number;
|
||||
monthly: number;
|
||||
yearly: number;
|
||||
}
|
||||
|
||||
export interface OptionalServiceProfileRow {
|
||||
cpuRequest?: string;
|
||||
memoryRequest?: string;
|
||||
cpuLimit: string;
|
||||
memoryLimit: string;
|
||||
storageGi: number;
|
||||
logShipperCpuLimit?: string;
|
||||
logShipperMemoryLimit?: string;
|
||||
}
|
||||
|
||||
export interface OptionalServiceCatalogEntry {
|
||||
service: string;
|
||||
label: string;
|
||||
profile: OptionalServiceProfileRow;
|
||||
rates: PricingRateRow[];
|
||||
}
|
||||
|
||||
export interface CustomDomainCatalogRow {
|
||||
hourlyPrice: number;
|
||||
monthlyPrice: number;
|
||||
yearlyPrice: number;
|
||||
isActive?: boolean;
|
||||
}
|
||||
|
||||
export interface CatalogRuntimeOption {
|
||||
value: string;
|
||||
label: string;
|
||||
@@ -391,12 +435,12 @@ export interface CatalogRuntimeOption {
|
||||
export interface CatalogOptionalServiceOption {
|
||||
value: string;
|
||||
label: string;
|
||||
resourceType: PricingResourceType;
|
||||
}
|
||||
|
||||
export interface PricingCatalog {
|
||||
runtimes: Record<string, PricingRateRow[]>;
|
||||
addons: PricingRateRow[];
|
||||
optionalServices: Record<string, OptionalServiceCatalogEntry>;
|
||||
customDomain: CustomDomainCatalogRow;
|
||||
runtimeOptions: CatalogRuntimeOption[];
|
||||
optionalServiceOptions: CatalogOptionalServiceOption[];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user