@@ -876,16 +876,55 @@ type updateProjectItem struct {
876876ID int `json:"id"`
877877Value any `json:"value"`
878878}
879+ type OptionDescription struct {
880+ Raw string `json:"raw,omitempty"`
881+ HTML string `json:"html,omitempty"`
882+ }
883+
884+ func (d * OptionDescription )UnmarshalJSON (data []byte )error {
885+ if string (data )== "null" {// nothing to do
886+ return nil
887+ }
888+ // Try string
889+ var asString string
890+ if err := json .Unmarshal (data ,& asString );err == nil {
891+ d .Raw = asString
892+ return nil
893+ }
894+ // Try object form
895+ type alias OptionDescription
896+ var a alias
897+ if err := json .Unmarshal (data ,& a );err != nil {
898+ return err
899+ }
900+ d .Raw = a .Raw
901+ d .HTML = a .HTML
902+ return nil
903+ }
904+
905+ func (d OptionDescription )String ()string {
906+ if d .Raw != "" {
907+ return d .Raw
908+ }
909+ return d .HTML
910+ }
911+
912+ type projectV2FieldOption struct {
913+ ID string `json:"id,omitempty"` // Unique identifier for this option (string like "option_1").
914+ Name string `json:"name,omitempty"` // Display name of the option.
915+ Color string `json:"color,omitempty"` // Uppercase color name or hex code as returned by the API.
916+ Description * OptionDescription `json:"description,omitempty"` // Optional human-friendly description (raw or html form).
917+ }
879918
880919type projectV2Field struct {
881- ID * int64 `json:"id,omitempty"` // The unique identifier for this field.
882- NodeID string `json:"node_id,omitempty"` // The GraphQL node ID for this field.
883- Name string `json:"name,omitempty"` // The display name of the field.
884- DataType string `json:"data_type,omitempty"` // The data type of the field (e.g., "text", "number", "date", "single_select", "multi_select").
885- URL string `json:"url,omitempty"` // The API URL for this field.
886- Options []* any `json:"options,omitempty"` // Available options for single_select and multi_select fields.
887- CreatedAt * github.Timestamp `json:"created_at,omitempty"` // The time when this field was created.
888- UpdatedAt * github.Timestamp `json:"updated_at,omitempty"` // The time when this field was last updated.
920+ ID * int64 `json:"id,omitempty"` // The unique identifier for this field.
921+ NodeID string `json:"node_id,omitempty"` // The GraphQL node ID for this field.
922+ Name string `json:"name,omitempty"` // The display name of the field.
923+ DataType string `json:"data_type,omitempty"` // The data type of the field (e.g., "text", "number", "date", "single_select", "multi_select").
924+ URL string `json:"url,omitempty"` // The API URL for this field.
925+ Options []* projectV2FieldOption `json:"options,omitempty"` // Available options for single_select and multi_select fields.
926+ CreatedAt * github.Timestamp `json:"created_at,omitempty"` // The time when this field was created.
927+ UpdatedAt * github.Timestamp `json:"updated_at,omitempty"` // The time when this field was last updated.
889928}
890929
891930type projectV2Item struct {