refactor(web): convert 7 enums to as-const objects (batch 5) (#33960)

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
Mahmoud Hamdy
2026-03-26 09:50:54 +02:00
committed by GitHub
parent 3e073404cc
commit 8ca54ddf94
9 changed files with 48 additions and 68 deletions

View File

@@ -2,12 +2,13 @@
* Model provider quota types - shared type definitions for API responses
* These represent the provider identifiers that support paid/trial quotas
*/
export enum ModelProviderQuotaGetPaid {
ANTHROPIC = 'langgenius/anthropic/anthropic',
OPENAI = 'langgenius/openai/openai',
// AZURE_OPENAI = 'langgenius/azure_openai/azure_openai',
GEMINI = 'langgenius/gemini/google',
X = 'langgenius/x/x',
DEEPSEEK = 'langgenius/deepseek/deepseek',
TONGYI = 'langgenius/tongyi/tongyi',
}
export const ModelProviderQuotaGetPaid = {
ANTHROPIC: 'langgenius/anthropic/anthropic',
OPENAI: 'langgenius/openai/openai',
// AZURE_OPENAI: 'langgenius/azure_openai/azure_openai',
GEMINI: 'langgenius/gemini/google',
X: 'langgenius/x/x',
DEEPSEEK: 'langgenius/deepseek/deepseek',
TONGYI: 'langgenius/tongyi/tongyi',
} as const
export type ModelProviderQuotaGetPaid = typeof ModelProviderQuotaGetPaid[keyof typeof ModelProviderQuotaGetPaid]

View File

@@ -455,12 +455,13 @@ export type PanelProps = {
export type NodeRunResult = NodeTracing
// Var Inspect
export enum VarInInspectType {
conversation = 'conversation',
environment = 'env',
node = 'node',
system = 'sys',
}
export const VarInInspectType = {
conversation: 'conversation',
environment: 'env',
node: 'node',
system: 'sys',
} as const
export type VarInInspectType = typeof VarInInspectType[keyof typeof VarInInspectType]
export type FullContent = {
size_bytes: number