mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat!: Validate monotonic numbers for rich parameters (#6046)
* Database changes * protobuf * Fix: docs * workspaces_test * Validation in coderd * Fix: resources * omitempty * UI changes * UI tests * fix
This commit is contained in:
@@ -758,10 +758,11 @@ export interface TemplateVersionParameter {
|
||||
readonly default_value: string
|
||||
readonly icon: string
|
||||
readonly options: TemplateVersionParameterOption[]
|
||||
readonly validation_error: string
|
||||
readonly validation_regex: string
|
||||
readonly validation_min: number
|
||||
readonly validation_max: number
|
||||
readonly validation_error?: string
|
||||
readonly validation_regex?: string
|
||||
readonly validation_min?: number
|
||||
readonly validation_max?: number
|
||||
readonly validation_monotonic?: ValidationMonotonicOrder
|
||||
}
|
||||
|
||||
// From codersdk/templateversions.go
|
||||
@@ -1209,6 +1210,13 @@ export const TemplateRoles: TemplateRole[] = ["", "admin", "use"]
|
||||
export type UserStatus = "active" | "suspended"
|
||||
export const UserStatuses: UserStatus[] = ["active", "suspended"]
|
||||
|
||||
// From codersdk/templateversions.go
|
||||
export type ValidationMonotonicOrder = "decreasing" | "increasing"
|
||||
export const ValidationMonotonicOrders: ValidationMonotonicOrder[] = [
|
||||
"decreasing",
|
||||
"increasing",
|
||||
]
|
||||
|
||||
// From codersdk/workspaceagents.go
|
||||
export type WorkspaceAgentLifecycle =
|
||||
| "created"
|
||||
|
||||
Reference in New Issue
Block a user