docs/live-folders-specs.md
Live Folders are dynamic, auto-updating folders in Zen.
Unlike static folders, they fetch and refresh their contents automatically from external sources (e.g., RSS feeds, APIs).
By default, Live Folders refresh every 30 minutes, but this interval can be configured in preferences.
LiveFolderProviderfetchItems()).interface FolderItem {
id: string;
title: string;
url: string;
}
interface FolderMetadata {
icon: string;
label: string;
}
interface LiveFolderProvider {
fetchItems(): Promise<FolderItem[]>;
getMetadata(): FolderMetadata;
}
RssLiveFolderProviderurl: URL of the RSS feed.GithubLiveFolderProviderusername: GitHub username.RestAPILiveFolderProviderschema: JSON schema to validate API responses.WebhookLiveFolderProviderREST-based Live Folders allow Zen to fetch JSON data from an HTTP(S) endpoint and map it into folder items.
Each REST Live Folder must provide a schema-compliant response that Zen can parse into items.
GET.liveFolder.maxItems (default 100) will be trimmed.Remote APIs can return any JSON, but the Live Folder must provide a mapping configuration:
{
"type": "rest",
"url": "https://api.example.com/posts",
"mapping": {
"items": "data.posts",
"id": "id",
"title": "headline",
"url": "link"
}
}
These schemas would be stored inside a marketplace on Zen's web platform, allowing users to easily discover and integrate new REST API Live Folders into their workspace.
If the user wants to create a new REST API Live Folder, they can do so by providing the necessary schema and configuration through the marketplace interface. This will enable them to customize the folder's behavior and data mapping according to their specific needs.
If it's a custom API and the schema is not publicly available, users can still create a Live Folder by defining their own mapping configuration. This allows them to integrate with proprietary APIs while adhering to Zen's Live Folder standards. This mapping configuration will be fetched via https://example.com/zen-live-folder.schema.json.