From 2e8029f72fd40cc9e9bc63092dda7a6739945ec9 Mon Sep 17 00:00:00 2001 From: Stephen Zhou <38493346+hyoban@users.noreply.github.com> Date: Wed, 27 May 2026 10:50:38 +0800 Subject: [PATCH] Allow deleting app instances without undeploy check --- .../contracts/generated/enterprise/types.gen.ts | 4 ++++ .../contracts/generated/enterprise/zod.gen.ts | 16 ++++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/packages/contracts/generated/enterprise/types.gen.ts b/packages/contracts/generated/enterprise/types.gen.ts index 0ec8e83fed..ec1137cdd4 100644 --- a/packages/contracts/generated/enterprise/types.gen.ts +++ b/packages/contracts/generated/enterprise/types.gen.ts @@ -24,6 +24,7 @@ export type DifyEnterpriseApiEnterpriseEnvironment = { createdAt?: string updatedAt?: string runtimeEndpoint?: string + cpuCount?: number } export type DifyEnterpriseApiEnterpriseEnvironmentError = { @@ -303,6 +304,7 @@ export type Environment = { createdAt?: string updatedAt?: string runtimeEndpoint?: string + cpuCount?: number } export type EnvironmentDeployment = { @@ -684,6 +686,7 @@ export type CreateEnvironmentReq = { backend?: 'RUNTIME_BACKEND_UNSPECIFIED' | 'RUNTIME_BACKEND_K8S' | 'RUNTIME_BACKEND_EXTERNAL' k8s?: K8sEnvironmentConfig external?: ExternalAppRunnerConfig + cpuCount?: number } export type CreateMemberReply = { @@ -1048,6 +1051,7 @@ export type LimitConfig = { export type LimitFields = { workspaceMembers?: number workspaces?: ResourceQuota + appRunnerEnvCpus?: ResourceQuota } export type ListAccessSubjectsReply = { diff --git a/packages/contracts/generated/enterprise/zod.gen.ts b/packages/contracts/generated/enterprise/zod.gen.ts index 2488485785..2bce66fae3 100644 --- a/packages/contracts/generated/enterprise/zod.gen.ts +++ b/packages/contracts/generated/enterprise/zod.gen.ts @@ -34,6 +34,11 @@ export const zDifyEnterpriseApiEnterpriseEnvironment = z.object({ createdAt: z.string().optional(), updatedAt: z.string().optional(), runtimeEndpoint: z.string().optional(), + cpuCount: z + .int() + .min(-2147483648, { error: 'Invalid value: Expected int32 to be >= -2147483648' }) + .max(2147483647, { error: 'Invalid value: Expected int32 to be <= 2147483647' }) + .optional(), }) export const zAccessChannels = z.object({ @@ -316,6 +321,11 @@ export const zEnvironment = z.object({ createdAt: z.string().optional(), updatedAt: z.string().optional(), runtimeEndpoint: z.string().optional(), + cpuCount: z + .int() + .min(-2147483648, { error: 'Invalid value: Expected int32 to be >= -2147483648' }) + .max(2147483647, { error: 'Invalid value: Expected int32 to be <= 2147483647' }) + .optional(), }) /** @@ -1001,6 +1011,11 @@ export const zCreateEnvironmentReq = z.object({ .optional(), k8s: zK8sEnvironmentConfig.optional(), external: zExternalAppRunnerConfig.optional(), + cpuCount: z + .int() + .min(-2147483648, { error: 'Invalid value: Expected int32 to be >= -2147483648' }) + .max(2147483647, { error: 'Invalid value: Expected int32 to be <= 2147483647' }) + .optional(), }) export const zLimitConfig = z.object({ @@ -1343,6 +1358,7 @@ export const zLimitFields = z.object({ .max(2147483647, { error: 'Invalid value: Expected int32 to be <= 2147483647' }) .optional(), workspaces: zResourceQuota.optional(), + appRunnerEnvCpus: zResourceQuota.optional(), }) /**