Documentation
¶
Index ¶
- type AnalysisHealthInput
- type AppendBlocksInput
- type BackLink
- type BlockEntity
- type BlockInput
- type BlockRef
- type BlockSummary
- type BulkUpdatePropertiesInput
- type CreatePageInput
- type DecisionCheckInput
- type DecisionCreateInput
- type DecisionDeferInput
- type DecisionResolveInput
- type DeleteBlockInput
- type DeletePageInput
- type EnrichedBlock
- type EnrichedPage
- type FileInfo
- type FindByTagInput
- type FindConnectionsInput
- type FlashcardCreateInput
- type FlashcardDueInput
- type FlashcardOverviewInput
- type GetBlockInput
- type GetLinksInput
- type GetPageInput
- type GetReferencesInput
- type GetWhiteboardInput
- type GraphOverviewInput
- type JournalRangeInput
- type JournalSearchInput
- type KnowledgeGapsInput
- type LinkPagesInput
- type ListOrphansInput
- type ListPagesInput
- type ListWhiteboardsInput
- type LogseqAPIRequest
- type MoveBlockInput
- type NamespaceInfo
- type PageEntity
- type PageRef
- type ParsedContent
- type QueryDatalogInput
- type QueryPropertiesInput
- type RenamePageInput
- type SearchInput
- type TopicClustersInput
- type TraverseInput
- type UpdateBlockInput
- type UpsertBlocksInput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnalysisHealthInput ¶ added in v0.3.0
type AnalysisHealthInput struct{}
AnalysisHealthInput has no required params — audits all analysis/strategy pages.
type AppendBlocksInput ¶ added in v0.4.0
type BackLink ¶
type BackLink struct {
PageName string `json:"pageName"`
Blocks []BlockSummary `json:"blocks"` // the specific blocks containing the link
}
BackLink represents an incoming link from another page.
type BlockEntity ¶
type BlockEntity struct {
ID int `json:"id"`
UUID string `json:"uuid"`
Content string `json:"content"`
Format string `json:"format,omitempty"`
Marker string `json:"marker,omitempty"` // TODO, DOING, DONE, etc.
Priority string `json:"priority,omitempty"` // A, B, C
Page *PageRef `json:"page,omitempty"`
Left *BlockRef `json:"left,omitempty"`
Parent *BlockRef `json:"parent,omitempty"`
Children []BlockEntity `json:"children,omitempty"`
Properties map[string]any `json:"properties,omitempty"`
PropertiesOrder []string `json:"propertiesOrder,omitempty"`
PathRefs []PageRef `json:"pathRefs,omitempty"`
Refs []PageRef `json:"refs,omitempty"`
PreBlock bool `json:"preBlock,omitempty"`
}
BlockEntity represents a Logseq block (the atomic unit of knowledge).
func (*BlockEntity) UnmarshalJSON ¶ added in v0.3.0
func (b *BlockEntity) UnmarshalJSON(data []byte) error
UnmarshalJSON handles two Logseq formats for children:
- Full objects from getPageBlocksTree: [{"uuid":"...", "content":"...", ...}]
- Compact refs from getBlock: [["uuid", "value"]]
The compact format is silently skipped (children left empty).
type BlockInput ¶
type BlockInput struct {
Content string `json:"content" jsonschema:"Block text content"`
Properties map[string]string `json:"properties,omitempty" jsonschema:"Block properties"`
Children []BlockInput `json:"children,omitempty" jsonschema:"Nested child blocks"`
}
type BlockRef ¶
type BlockRef struct {
ID int `json:"id"`
}
BlockRef is a lightweight block reference.
func (*BlockRef) UnmarshalJSON ¶
UnmarshalJSON handles Logseq returning BlockRef as either {"id": N} or plain N.
type BlockSummary ¶
BlockSummary is a lightweight block representation for context.
type BulkUpdatePropertiesInput ¶ added in v0.4.0
type CreatePageInput ¶
type DecisionCheckInput ¶ added in v0.3.0
type DecisionCheckInput struct {
IncludeResolved bool `json:"includeResolved,omitempty" jsonschema:"Include resolved (DONE) decisions. Default: false"`
}
type DecisionCreateInput ¶ added in v0.3.0
type DecisionCreateInput struct {
Page string `json:"page" jsonschema:"Page to create the decision on (where context is richest)"`
Question string `json:"question" jsonschema:"The decision question"`
Deadline string `json:"deadline" jsonschema:"Decision deadline (YYYY-MM-DD)"`
Options []string `json:"options,omitempty" jsonschema:"Available choices"`
Context string `json:"context,omitempty" jsonschema:"Brief context for the decision"`
}
type DecisionDeferInput ¶ added in v0.3.0
type DecisionResolveInput ¶ added in v0.3.0
type DeleteBlockInput ¶
type DeleteBlockInput struct {
UUID string `json:"uuid" jsonschema:"UUID of block to delete"`
}
type DeletePageInput ¶ added in v0.4.0
type DeletePageInput struct {
Name string `json:"name" jsonschema:"Page name to delete"`
}
type EnrichedBlock ¶
type EnrichedBlock struct {
BlockEntity
Parsed ParsedContent `json:"parsed"`
Ancestors []BlockSummary `json:"ancestors,omitempty"` // path from root to this block
Siblings []BlockSummary `json:"siblings,omitempty"`
}
EnrichedBlock extends BlockEntity with parsed content and ancestor chain.
type EnrichedPage ¶
type EnrichedPage struct {
PageEntity
Blocks []EnrichedBlock `json:"blocks"`
OutgoingLinks []string `json:"outgoingLinks"` // pages this page links to
BackLinks []BackLink `json:"backlinks"` // pages that link to this page
BlockCount int `json:"blockCount"`
LinkCount int `json:"linkCount"`
}
EnrichedPage extends PageEntity with its full block tree and link data.
type FindByTagInput ¶
type FindConnectionsInput ¶
type FlashcardCreateInput ¶
type FlashcardDueInput ¶
type FlashcardDueInput struct {
Limit int `json:"limit,omitempty" jsonschema:"Max cards to return. Default: 20"`
}
type FlashcardOverviewInput ¶
type FlashcardOverviewInput struct{}
FlashcardOverviewInput has no required params — returns SRS statistics.
type GetBlockInput ¶
type GetBlockInput struct {
UUID string `json:"uuid" jsonschema:"Block UUID to retrieve"`
IncludeAncestors bool `json:"includeAncestors,omitempty" jsonschema:"Include ancestor chain from root. Default: true"`
IncludeSiblings bool `json:"includeSiblings,omitempty" jsonschema:"Include sibling blocks. Default: false"`
}
type GetLinksInput ¶
type GetPageInput ¶
type GetPageInput struct {
Name string `json:"name" jsonschema:"Page name to retrieve"`
Depth int `json:"depth,omitempty" jsonschema:"Max block tree depth (-1 for unlimited). Default: -1"`
MaxBlocks int `json:"maxBlocks,omitempty" jsonschema:"Max total blocks to return. Truncates with a flag when exceeded. Default: unlimited"`
Compact bool `` /* 132-byte string literal not displayed */
}
type GetReferencesInput ¶
type GetReferencesInput struct {
UUID string `json:"uuid" jsonschema:"Block UUID to find references for"`
}
type GetWhiteboardInput ¶
type GetWhiteboardInput struct {
Name string `json:"name" jsonschema:"Whiteboard name"`
}
type GraphOverviewInput ¶
type GraphOverviewInput struct{}
GraphOverviewInput has no required params — returns global stats.
type JournalRangeInput ¶
type JournalSearchInput ¶
type KnowledgeGapsInput ¶
type KnowledgeGapsInput struct {
MinBlockCount int `json:"minBlockCount,omitempty" jsonschema:"Minimum block count for orphan pages. Filters out stray/empty pages. Default: 0"`
ExcludeNumeric bool `json:"excludeNumeric,omitempty" jsonschema:"Exclude pages with purely numeric names (stray block refs). Default: false"`
}
KnowledgeGapsInput controls knowledge gap analysis filtering.
type LinkPagesInput ¶
type ListOrphansInput ¶ added in v0.4.0
type ListOrphansInput struct {
MinBlockCount int `json:"minBlockCount,omitempty" jsonschema:"Minimum block count to include. Filters stray/empty pages. Default: 0"`
ExcludeNumeric bool `json:"excludeNumeric,omitempty" jsonschema:"Exclude pages with purely numeric names (stray block refs). Default: false"`
Limit int `json:"limit,omitempty" jsonschema:"Max orphans to return. Default: 50"`
}
ListOrphansInput controls orphan page listing.
type ListPagesInput ¶
type ListPagesInput struct {
Namespace string `json:"namespace,omitempty" jsonschema:"Filter by namespace prefix (e.g. graphthulhu)"`
HasProperty string `json:"hasProperty,omitempty" jsonschema:"Filter to pages with this property key"`
HasTag string `json:"hasTag,omitempty" jsonschema:"Filter to pages with this tag"`
SortBy string `json:"sortBy,omitempty" jsonschema:"Sort by: name or modified or created. Default: name"`
Limit int `json:"limit,omitempty" jsonschema:"Max results. Default: 50"`
}
type ListWhiteboardsInput ¶
type ListWhiteboardsInput struct{}
ListWhiteboardsInput has no required params.
type LogseqAPIRequest ¶
LogseqAPIRequest is the JSON body sent to the Logseq HTTP API.
type MoveBlockInput ¶
type NamespaceInfo ¶
type NamespaceInfo struct {
ID int `json:"id"`
}
NamespaceInfo contains namespace hierarchy data.
type PageEntity ¶
type PageEntity struct {
ID int `json:"id"`
UUID string `json:"uuid"`
Name string `json:"name"`
OriginalName string `json:"originalName"`
Journal bool `json:"journal?"`
JournalDay int `json:"journalDay,omitempty"`
Namespace *NamespaceInfo `json:"namespace,omitempty"`
Properties map[string]any `json:"properties,omitempty"`
PropertiesOrder []string `json:"propertiesOrder,omitempty"`
CreatedAt int64 `json:"createdAt,omitempty"`
UpdatedAt int64 `json:"updatedAt,omitempty"`
File *FileInfo `json:"file,omitempty"`
}
PageEntity represents a Logseq page.
type PageRef ¶
PageRef is a lightweight page reference (used in block refs and path refs).
func (*PageRef) UnmarshalJSON ¶
UnmarshalJSON handles Logseq returning PageRef as either {"id": N} or plain N.
type ParsedContent ¶
type ParsedContent struct {
Raw string `json:"raw"`
Links []string `json:"links"` // [[page name]]
BlockReferences []string `json:"blockReferences"` // ((uuid))
Tags []string `json:"tags"` // #tag
Properties map[string]string `json:"properties,omitempty"` // key:: value
Marker string `json:"marker,omitempty"` // TODO, DOING, DONE
Priority string `json:"priority,omitempty"` // [#A], [#B], [#C]
}
ParsedContent holds structured data extracted from block content.
type QueryDatalogInput ¶
type QueryPropertiesInput ¶
type QueryPropertiesInput struct {
Property string `json:"property" jsonschema:"Property key to search for"`
Value string `json:"value,omitempty" jsonschema:"Property value to match (omit to find all with this property)"`
Operator string `json:"operator,omitempty" jsonschema:"Comparison: eq or contains or gt or lt. Default: eq"`
}
type RenamePageInput ¶ added in v0.4.0
type SearchInput ¶
type SearchInput struct {
Query string `json:"query" jsonschema:"Search text to find across all blocks"`
ContextLines int `json:"contextLines,omitempty" jsonschema:"Number of parent/sibling blocks for context. Default: 2"`
Limit int `json:"limit,omitempty" jsonschema:"Max results. Default: 20"`
Compact bool `` /* 142-byte string literal not displayed */
}
type TopicClustersInput ¶
type TopicClustersInput struct{}
TopicClustersInput has no required params — returns community clusters.
type TraverseInput ¶
type UpdateBlockInput ¶
type UpsertBlocksInput ¶
type UpsertBlocksInput struct {
Page string `json:"page" jsonschema:"Page name to add blocks to"`
Blocks []BlockInput `json:"blocks" jsonschema:"Blocks to create or update"`
Position string `json:"position,omitempty" jsonschema:"Where to add: append or prepend. Default: append"`
}