package jiracli

import "github.com/andygrunwald/go-jira"

type SearchResults struct {
	IsLast        bool         `json:"isLast" structs:"isLast"`
	Issues        []jira.Issue `json:"issues" structs:"issues"`
	NextPageToken string       `json:"nextPageToken" structs:"nextPageToken"`
}

type SearchOptions struct {
	// NextPageToken is the token for a page to fetch that is not the first page.
	NextPageToken string
	// TMaxResults is tje maximum number of items to return per page.
	MaxResults int
	// Fields is a list of fields to return for each issue, use it to retrieve a subset of fields
	//
	// * `*all` Returns all fields.
	// * `*navigable` Returns navigable fields.
	// * `id` Returns only issue IDs.
	// * Any issue field, prefixed with a minus to exclude.
	//
	// The default is `id`.
	Fields []string
	// Use expand to include additional information about issues in the response.
	Expand string
	// FailFast means fail this request early if we can't retrieve all field data.
	FailFast bool
}

type AssetObject struct {
	WorkspaceID string          `json:"workspaceId"`
	GlobalID    string          `json:"globalId"`
	ID          string          `json:"id"`
	ObjectKey   string          `json:"objectKey"`
	Label       string          `json:"label"`
	ObjectType  AssetObjectType `json:"objectType"`
}

type AssetObjectType struct {
	WorkspaceID string `json:"workspaceId"`
	GlobalID    string `json:"globalId"`
	ID          string `json:"id"`
	Name        string `json:"name"`
}
