feat(notion): add Notion API client and type definitions
- Define notionPage, notionBlock, notionParent, notionFile and cursor types - Implement rate-limited HTTP client with context-aware retry and backoff - Support search, page/block retrieval, database queries, and file downloads - Add HasChildren field to Resource type, NotionChannel to knowledge types - Add unit tests for types and client
This commit is contained in:
@@ -232,6 +232,9 @@ type Resource struct {
|
||||
// For hierarchical resources (parent ID if applicable)
|
||||
ParentID string `json:"parent_id,omitempty"`
|
||||
|
||||
// Whether this resource has children that can be expanded
|
||||
HasChildren bool `json:"has_children,omitempty"`
|
||||
|
||||
// Additional metadata
|
||||
Metadata map[string]interface{} `json:"metadata,omitempty"`
|
||||
}
|
||||
|
||||
@@ -28,6 +28,7 @@ const (
|
||||
ChannelDingtalk = "dingtalk" // DingTalk
|
||||
ChannelSlack = "slack" // Slack
|
||||
ChannelIM = "im" // Generic IM channel
|
||||
ChannelNotion = "notion" // Notion
|
||||
)
|
||||
|
||||
// Knowledge parse status constants
|
||||
|
||||
Reference in New Issue
Block a user