38 lines
1.2 KiB
Go
38 lines
1.2 KiB
Go
package dto
|
|
|
|
import (
|
|
"encoding/json"
|
|
)
|
|
|
|
type IntegrationConfigRequest struct {
|
|
Enabled bool `json:"enabled"`
|
|
Config json.RawMessage `json:"config"`
|
|
}
|
|
|
|
type IntegrationConfigResponse struct {
|
|
Kind string `json:"kind"`
|
|
Provider string `json:"provider"`
|
|
Name string `json:"name"`
|
|
Description string `json:"description,omitempty"`
|
|
Enabled bool `json:"enabled"`
|
|
Configured bool `json:"configured"`
|
|
Config json.RawMessage `json:"config"`
|
|
Fields []IntegrationConfigField `json:"fields"`
|
|
}
|
|
|
|
type IntegrationConfigField struct {
|
|
Key string `json:"key"`
|
|
Label string `json:"label"`
|
|
Type string `json:"type"`
|
|
Required bool `json:"required"`
|
|
Secret bool `json:"secret"`
|
|
Placeholder string `json:"placeholder,omitempty"`
|
|
Description string `json:"description,omitempty"`
|
|
Options []IntegrationConfigOption `json:"options,omitempty"`
|
|
}
|
|
|
|
type IntegrationConfigOption struct {
|
|
Label string `json:"label"`
|
|
Value any `json:"value"`
|
|
}
|