File tree Expand file tree Collapse file tree 2 files changed +15
-3
lines changed Expand file tree Collapse file tree 2 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -35,8 +35,7 @@ export interface ParameterData {
3535 readonly type : ParameterType ;
3636 // this is likely an enum in an external package "github.com/coder/terraform-provider-coder/v2/provider.ParameterFormType"
3737 readonly form_type : string ;
38- // empty interface{} type, falling back to unknown
39- readonly styling : unknown ;
38+ readonly styling : ParameterStyling ;
4039 readonly mutable : boolean ;
4140 readonly default_value : NullHCLString ;
4241 readonly icon : string ;
@@ -55,6 +54,13 @@ export interface ParameterOption {
5554 readonly icon : string ;
5655}
5756
57+ // From types/parameter.go
58+ export interface ParameterStyling {
59+ readonly placeholder ?: string ;
60+ readonly disabled ?: boolean ;
61+ readonly label ?: string ;
62+ }
63+
5864// From types/enum.go
5965export type ParameterType = "bool" | "list(string)" | "number" | "string" ;
6066
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ type ParameterData struct {
5050 Description string `json:"description"`
5151 Type ParameterType `json:"type"`
5252 FormType provider.ParameterFormType `json:"form_type"`
53- Styling any `json:"styling"`
53+ Styling ParameterStyling `json:"styling"`
5454 Mutable bool `json:"mutable"`
5555 DefaultValue HCLString `json:"default_value"`
5656 Icon string `json:"icon"`
@@ -76,6 +76,12 @@ type ParameterValidation struct {
7676 Invalid * bool `json:"validation_invalid"`
7777}
7878
79+ type ParameterStyling struct {
80+ Placeholder * string `json:"placeholder,omitempty"`
81+ Disabled * bool `json:"disabled,omitempty"`
82+ Label * string `json:"label,omitempty"`
83+ }
84+
7985// Valid takes the type of the value and the value itself and returns an error
8086// if the value is invalid.
8187func (v ParameterValidation ) Valid (typ string , value string ) error {
You can’t perform that action at this time.
0 commit comments