package structs

import (
	gitea_api "code.gitea.io/gitea/modules/structs"
)

type BatchChangeFileOptions struct {
	Header gitea_api.FileOptions `json:"header"`
	Files  []struct {
		Encoding   string `json:"encoding"`
		FilePath   string `json:"file_path"`
		Content    string `json:"content"`
		ActionType string `json:"action_type"`
	} `json:"files"`
}

type BatchFileResponse struct {
	Contents     []*ContentsResponse                  `json:"contents"`
	Commit       *gitea_api.FileCommitResponse        `json:"commit"`
	Verification *gitea_api.PayloadCommitVerification `json:"verification"`
}

type ContentsResponse struct {
	*gitea_api.ContentsResponse
	IsTextFile   bool                   `json:"is_text_file"`
	LatestCommit ContentsResponseCommit `json:"latest_commit"`
}

type ContentsResponseCommit struct {
	Message   string `json:"message"`
	Sha       string `json:"sha"`
	CreatedAt int64  `json:"created_at"`
}
