// SPDX-License-Identifier: AGPL-3.0-or-later package directory import ( "context" "crypto/rand" "encoding/json" "fmt" "math" "net/url" "slices" "sort" "strings" "time" "docwell/server/internal/access" "docwell/server/internal/apperr" "docwell/server/internal/store/pocketbase" ) // ---- Page properties ------------------------------------------------------- // // A workspace defines the custom properties its pages can fill in // (workspace_properties); each page keeps its values in pages.properties as // { "": value }. Built-in properties (tags, created, updated, // created by, last edited by, template, journal, width) come from the page's // own fields and are not defined here. A value whose property was deleted // stays in the page until it is next saved, and is ignored meanwhile. // Property types and what their values look like in JSON. const ( PropText = "text" // "free text" PropNumber = "number" // 42.5 PropCheckbox = "checkbox" // true PropDate = "date" // "2026-11-14" PropSelect = "select" // "