Skip to content

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

2.4 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 WorkspaceInfoData struct {
	WorkspaceDir string `json:"workspaceDir"`
	SiyuanVer    string `json:"siyuanVer"`
}

type BootProgressData struct {
	Progress int32  `json:"progress"`
	Details  string `json:"details"`
}

type NetworkProxy struct {
	Scheme string `json:"scheme"`
	Host   string `json:"host"`
	Port   string `json:"port"`
}

type NetworkData struct {
	Proxy *NetworkProxy `json:"proxy"`
}

type LockScreenRequest struct {
	LockScreenMode float64 `json:"lockScreenMode"`
}

type NetworkServeRequest struct {
	NetworkServe bool `json:"networkServe"`
}

type NetworkServeTLSRequest struct {
	NetworkServeTLS bool `json:"networkServeTLS"`
}

type AutoLaunchRequest struct {
	AutoLaunch float64 `json:"autoLaunch"`
}

type DownloadInstallPkgRequest struct {
	DownloadInstallPkg bool `json:"downloadInstallPkg"`
}

// SettingsWindowRequest 更新工作空间的独立设置窗口开关,仅桌面 Electron 客户端使用。
type SettingsWindowRequest struct {
	SettingsWindow bool `json:"settingsWindow"`
}

type UpdateChannelRequest struct {
	UpdateChannel string `json:"updateChannel"`
}

type BlockIDsRequest struct {
	IDs []string `json:"ids"`
}

type DOMTextRequest struct {
	DOM string `json:"dom"`
}

type RemoveBookmarkRequest struct {
	Bookmark string `json:"bookmark"`
}

type RenameBookmarkRequest struct {
	OldBookmark string `json:"oldBookmark"`
	NewBookmark string `json:"newBookmark"`
}

type RemoveTagRequest struct {
	Label string `json:"label"`
}

type RenameTagRequest struct {
	OldLabel string `json:"oldLabel"`
	NewLabel string `json:"newLabel" api:"trim"`
}

type BatchSetBlockAttrsRequest struct {
	BlockAttrs []SetBlockAttrsRequest `json:"blockAttrs"`
}

type EditorReadOnlyRequest struct {
	ReadOnly bool `json:"readonly"`
}

type VirtualBlockRefRequest struct {
	Keywords []string `json:"keywords"`
}

type GetTagRequest struct {
	IgnoreMaxListHint bool    `json:"ignoreMaxListHint" api:"optional,nullable"`
	App               string  `json:"app" api:"optional,nullable"`
	Sort              float64 `json:"sort" api:"optional,nullable"`
}

type TagData struct {
	Name     string     `json:"name"`
	Label    string     `json:"label"`
	Children []*TagData `json:"children"`
	Type     string     `json:"type"`
	Depth    int        `json:"depth"`
	Count    int        `json:"count"`
}