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 {
35
35
readonly type : ParameterType ;
36
36
// this is likely an enum in an external package "github.com/coder/terraform-provider-coder/v2/provider.ParameterFormType"
37
37
readonly form_type : string ;
38
- // empty interface{} type, falling back to unknown
39
- readonly styling : unknown ;
38
+ readonly styling : ParameterStyling ;
40
39
readonly mutable : boolean ;
41
40
readonly default_value : NullHCLString ;
42
41
readonly icon : string ;
@@ -55,6 +54,13 @@ export interface ParameterOption {
55
54
readonly icon : string ;
56
55
}
57
56
57
+ // From types/parameter.go
58
+ export interface ParameterStyling {
59
+ readonly placeholder ?: string ;
60
+ readonly disabled ?: boolean ;
61
+ readonly label ?: string ;
62
+ }
63
+
58
64
// From types/enum.go
59
65
export type ParameterType = "bool" | "list(string)" | "number" | "string" ;
60
66
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ type ParameterData struct {
50
50
Description string `json:"description"`
51
51
Type ParameterType `json:"type"`
52
52
FormType provider.ParameterFormType `json:"form_type"`
53
- Styling any `json:"styling"`
53
+ Styling ParameterStyling `json:"styling"`
54
54
Mutable bool `json:"mutable"`
55
55
DefaultValue HCLString `json:"default_value"`
56
56
Icon string `json:"icon"`
@@ -76,6 +76,12 @@ type ParameterValidation struct {
76
76
Invalid * bool `json:"validation_invalid"`
77
77
}
78
78
79
+ type ParameterStyling struct {
80
+ Placeholder * string `json:"placeholder,omitempty"`
81
+ Disabled * bool `json:"disabled,omitempty"`
82
+ Label * string `json:"label,omitempty"`
83
+ }
84
+
79
85
// Valid takes the type of the value and the value itself and returns an error
80
86
// if the value is invalid.
81
87
func (v ParameterValidation ) Valid (typ string , value string ) error {
You can’t perform that action at this time.
0 commit comments