89 lines
1.3 KiB
Markdown
89 lines
1.3 KiB
Markdown
|
|
# Profiles Protocol
|
||
|
|
|
||
|
|
> **NOTE**: This document is the single source of truth. All implementations must follow this specification.
|
||
|
|
|
||
|
|
## Overview
|
||
|
|
|
||
|
|
User profile settings with privacy and notification preferences.
|
||
|
|
|
||
|
|
## Version
|
||
|
|
|
||
|
|
- **Current**: `1.0`
|
||
|
|
- **Status**: Active
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## Preference Settings
|
||
|
|
|
||
|
|
### Privacy
|
||
|
|
|
||
|
|
```typescript
|
||
|
|
interface PrivacySettings {
|
||
|
|
show_email?: boolean;
|
||
|
|
show_online_status?: boolean;
|
||
|
|
}
|
||
|
|
```
|
||
|
|
|
||
|
|
### Notification
|
||
|
|
|
||
|
|
```typescript
|
||
|
|
interface NotificationSettings {
|
||
|
|
friend_request?: boolean;
|
||
|
|
calendar_invite?: boolean;
|
||
|
|
calendar_update?: boolean;
|
||
|
|
calendar_delete?: boolean;
|
||
|
|
system_message?: boolean;
|
||
|
|
}
|
||
|
|
```
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## Profile Settings V1
|
||
|
|
|
||
|
|
```typescript
|
||
|
|
interface ProfileSettingsV1 {
|
||
|
|
privacy?: PrivacySettings;
|
||
|
|
notification?: NotificationSettings;
|
||
|
|
}
|
||
|
|
```
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## Database Field
|
||
|
|
|
||
|
|
| Field | Type | Description |
|
||
|
|
|-------|------|-------------|
|
||
|
|
| settings | jsonb | User preferences including privacy and notification settings |
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## JSON Examples
|
||
|
|
|
||
|
|
### Default Settings
|
||
|
|
|
||
|
|
```json
|
||
|
|
{
|
||
|
|
"privacy": {
|
||
|
|
"show_email": false,
|
||
|
|
"show_online_status": true
|
||
|
|
},
|
||
|
|
"notification": {
|
||
|
|
"friend_request": true,
|
||
|
|
"calendar_invite": true,
|
||
|
|
"calendar_update": true,
|
||
|
|
"calendar_delete": true,
|
||
|
|
"system_message": true
|
||
|
|
}
|
||
|
|
}
|
||
|
|
```
|
||
|
|
|
||
|
|
### Minimal Settings
|
||
|
|
|
||
|
|
```json
|
||
|
|
{
|
||
|
|
"notification": {
|
||
|
|
"friend_request": false
|
||
|
|
}
|
||
|
|
}
|
||
|
|
```
|