Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

1.5 KB
Raw Blame
// SiYuan - https://github.com/siyuan-note/siyuan
// Copyright (c) 2020-present, b3log.org
// SPDX-License-Identifier: AGPL-3.0-or-later

package apicontract

type HistoryPathRequest struct {
	HistoryPath string `json:"historyPath" api:"trim"`
}

type CreateDocHistoryRequest struct {
	ID string `json:"id" api:"trim"`
}

type CreateAssetHistoryRequest struct {
	Path string `json:"path" api:"trim"`
}

type DocHistoryContentRequest struct {
	HistoryPath string `json:"historyPath" api:"trim"`
	K           string `json:"k" api:"optional,nullable"`
	Highlight   *bool  `json:"highlight" api:"optional"`
}

type DocHistoryContentData struct {
	ID         string `json:"id"`
	RootID     string `json:"rootID"`
	Content    string `json:"content"`
	IsLargeDoc bool   `json:"isLargeDoc"`
}

type HistoryItemsRequest struct {
	Created  string   `json:"created" api:"trim"`
	Notebook string   `json:"notebook" api:"optional,nullable"`
	Query    string   `json:"query" api:"optional,nullable"`
	Op       string   `json:"op" api:"optional,nullable"`
	Type     *float64 `json:"type" api:"optional"`
}

type HistoryItem struct {
	ID       string `json:"id"`
	Title    string `json:"title"`
	Path     string `json:"path"`
	Op       string `json:"op"`
	Notebook string `json:"notebook"`
}

type History struct {
	HCreated string         `json:"hCreated"`
	Items    []*HistoryItem `json:"items"`
}

type HistoryItemsData struct {
	Items []*HistoryItem `json:"items"`
}

type NotebookHistoryData struct {
	Histories []*History `json:"histories"`
}