Files
social-app/docs/protocols/schedule-items.md
T

107 lines
1.8 KiB
Markdown
Raw Normal View History

# Schedule Items Protocol
> **NOTE**: This document is the single source of truth. All implementations must follow this specification.
## Overview
Schedule items represent calendar events with metadata, attachments, and sharing capabilities.
## Version
- **Current**: `1.0`
- **Status**: Active
---
## Status
```typescript
type ScheduleItemStatus = 'active' | 'completed' | 'canceled' | 'archived';
```
## Source Type
```typescript
type ScheduleItemSourceType = 'manual' | 'imported' | 'agent_generated';
```
---
## Metadata Schema
### Attachment Type
```typescript
type AttachmentType = 'document' | 'reminder';
```
### Attachment
```typescript
interface ScheduleItemMetadataAttachment {
name: string;
type: AttachmentType;
visible_to: string[]; // UUIDs
url?: string;
note?: string;
content?: string;
}
```
### Metadata
```typescript
interface ScheduleItemMetadata {
color?: string; // "#RRGGBB" format
location?: string;
notes?: string;
attachments?: ScheduleItemMetadataAttachment[];
reminder_minutes?: number; // 0-10080 (0 to 7 days)
version: 1;
}
```
---
## Database Field
| Field | Type | Description |
|-------|------|-------------|
| metadata | jsonb | Structured metadata including color, location, notes, attachments, reminders |
---
## JSON Examples
### Basic Metadata
```json
{
"color": "#3B82F6",
"location": "Conference Room A",
"notes": "Bring presentation slides",
"reminder_minutes": 15,
"version": 1
}
```
### With Attachment
```json
{
"color": "#10B981",
"location": "https://meet.example.com/abc123",
"notes": "Weekly sync meeting",
"attachments": [
{
"name": "agenda.pdf",
"type": "document",
"url": "https://storage.example.com/agenda.pdf",
"visible_to": ["uuid1", "uuid2"]
}
],
"reminder_minutes": 30,
"version": 1
}
```