package dto

type ContentStoreCreateRequest struct {
	Domain     string `json:"domain"`
	BindingKey string `json:"bindingKey"`
}

type ContentStoreFileInput struct {
	Path          string `json:"path"`
	Executable    bool   `json:"executable,omitempty"`
	ContentBase64 string `json:"contentBase64"`
}

type ContentStoreCommitRequest struct {
	ExpectedHeadVersionID string                  `json:"expectedHeadVersionId"`
	ExpectedGeneration    uint64                  `json:"expectedGeneration"`
	Files                 []ContentStoreFileInput `json:"files"`
}

type ContentStorePinCreateRequest struct {
	VersionID string `json:"versionId"`
	Label     string `json:"label"`
}

type ContentStoreContent struct {
	ID                    string `json:"id"`
	WorkspaceID           string `json:"workspaceId"`
	Domain                string `json:"domain"`
	BindingKey            string `json:"bindingKey"`
	HeadVersionID         string `json:"headVersionId,omitempty"`
	Revision              uint64 `json:"revision"`
	Generation            uint64 `json:"generation"`
	RetainedVersionCount  uint64 `json:"retainedVersionCount"`
	StoredPayloadBytes    int64  `json:"storedPayloadBytes"`
	MaxRetainedVersions   uint64 `json:"maxRetainedVersions"`
	MaxStoredPayloadBytes int64  `json:"maxStoredPayloadBytes"`
	MaxPins               uint64 `json:"maxPins"`
	CreatedBy             string `json:"createdBy"`
	UpdatedBy             string `json:"updatedBy"`
	CreatedAt             string `json:"createdAt"`
	UpdatedAt             string `json:"updatedAt"`
}

type ContentStoreVersion struct {
	ID              string `json:"id"`
	ContentID       string `json:"contentId"`
	ParentVersionID string `json:"parentVersionId,omitempty"`
	Generation      uint64 `json:"generation"`
	RootDigest      string `json:"rootDigest"`
	SizeBytes       int64  `json:"sizeBytes"`
	FileCount       int    `json:"fileCount"`
	SummaryBytes    int64  `json:"summaryBytes"`
	CreatedBy       string `json:"createdBy"`
	CreatedAt       string `json:"createdAt"`
}

type ContentStoreCommitResponse struct {
	Content ContentStoreContent `json:"content"`
	Version ContentStoreVersion `json:"version"`
}

type ContentStoreVersionList struct {
	Items []ContentStoreVersion `json:"items"`
}

type ContentStorePin struct {
	ID        string `json:"id"`
	ContentID string `json:"contentId"`
	VersionID string `json:"versionId"`
	Label     string `json:"label"`
	CreatedBy string `json:"createdBy"`
	CreatedAt string `json:"createdAt"`
}

type ContentStorePinList struct {
	Items []ContentStorePin `json:"items"`
}

type ContentStorePathHistoryItem struct {
	VersionID string `json:"versionId"`
	Path      string `json:"path"`
	Digest    string `json:"digest"`
	Kind      string `json:"kind"`
	SizeBytes int64  `json:"sizeBytes"`
	CreatedAt string `json:"createdAt"`
}

type ContentStorePathHistory struct {
	Items []ContentStorePathHistoryItem `json:"items"`
}

type ContentStoreCompareEntry struct {
	Path         string `json:"path"`
	Change       string `json:"change"`
	BeforeDigest string `json:"beforeDigest,omitempty"`
	AfterDigest  string `json:"afterDigest,omitempty"`
	BeforeBytes  int64  `json:"beforeBytes"`
	AfterBytes   int64  `json:"afterBytes"`
}

type ContentStoreCompare struct {
	Items []ContentStoreCompareEntry `json:"items"`
}
