Response DTOs
All response DTOs returned by the API.
ApiResponse<T>
All API responses are wrapped in a standard envelope:
// Success
{
"success": true,
"data": { ... },
"message": "Optional message"
}
// Error
{
"success": false,
"error": {
"code": "ERROR_CODE",
"message": "Human-readable error message",
"details": { ... }
}
}
| Field | Type | Description |
|---|---|---|
success | boolean | Whether the request succeeded |
data | T | Response payload (null on error) |
message | String | Optional success message |
error | ErrorDetails | Error information (null on success) |
DocumentResponse
Full document with all metadata.
| Field | Type | Description |
|---|---|---|
id | UUID | Document ID |
title | String | Document title |
content | String | BlockNote JSON content |
excerpt | String | Auto-generated excerpt |
parentId | UUID | Parent document ID (null = root) |
workspaceId | UUID | Workspace ID |
ownerId | UUID | Owner user ID |
icon | String | Document icon/emoji |
coverImageUrl | String | Cover image URL |
isTemplate | Boolean | Template flag |
isArchived | Boolean | Archived flag |
wordCount | Integer | Word count |
hasChildren | Boolean | Has child documents |
childCount | Integer | Number of children |
openCommentCount | Long | Number of open comment threads |
createdBy | UUID | Creator user ID |
lastEditedBy | UUID | Last editor user ID |
createdByUser | UserInfoResponse | Creator info |
lastEditedByUser | UserInfoResponse | Last editor info |
isPublished | Boolean | Published status |
createdAt | Instant | Creation timestamp |
updatedAt | Instant | Last update timestamp |
DocumentListResponse
Lightweight document for list views.
| Field | Type | Description |
|---|---|---|
id | UUID | Document ID |
title | String | Title |
parentId | UUID | Parent ID |
workspaceId | UUID | Workspace ID |
icon | String | Icon |
hasChildren | Boolean | Has children |
childCount | Integer | Child count |
updatedAt | Instant | Last updated |
DocumentTreeResponse
Document node with nested children for tree rendering.
| Field | Type | Description |
|---|---|---|
id | UUID | Document ID |
title | String | Title |
parentId | UUID | Parent ID |
workspaceId | UUID | Workspace ID |
icon | String | Icon |
updatedAt | Instant | Last updated |
children | List<DocumentTreeResponse> | Nested children |
DocumentBreadcrumb
Ancestor item for breadcrumb navigation.
| Field | Type | Description |
|---|---|---|
id | UUID | Document ID |
title | String | Title |
SearchResultResponse
Search result with highlighted snippet.
| Field | Type | Description |
|---|---|---|
id | UUID | Document ID |
title | String | Title |
icon | String | Icon |
parentId | UUID | Parent ID |
snippet | String | Highlighted text snippet |
matchField | String | Field that matched (title/content) |
WorkspaceResponse
| Field | Type | Description |
|---|---|---|
id | UUID | Workspace ID |
name | String | Name |
description | String | Description |
icon | String | Icon |
color | String | Theme color |
ownerId | UUID | Owner ID |
isDefault | Boolean | Default workspace flag |
isArchived | Boolean | Archived flag |
documentCount | Long | Number of documents |
createdAt | Instant | Created timestamp |
updatedAt | Instant | Updated timestamp |
UserResponse
| Field | Type | Description |
|---|---|---|
id | UUID | User ID |
email | String | |
name | String | Display name |
avatarUrl | String | Avatar URL |
status | String | Account status |
lastLoginAt | Instant | Last login |
createdAt | Instant | Created timestamp |
preference | UserPreferenceResponse | Preferences (nested) |
UserPreferenceResponse
| Field | Type | Description |
|---|---|---|
lastDocumentId | UUID | Last viewed document |
lastWorkspaceId | UUID | Last viewed workspace |
theme | String | light / dark / system |
sidebarCollapsed | Boolean | Sidebar state |
locale | String | Language locale |
notificationsEnabled | Boolean | Notifications enabled |
UserInfoResponse
Lightweight user info (used in nested responses).
| Field | Type | Description |
|---|---|---|
id | UUID | User ID |
name | String | Display name |
avatarUrl | String | Avatar URL |
WorkspaceMemberResponse
| Field | Type | Description |
|---|---|---|
id | UUID | Member record ID |
userId | UUID | User ID |
userName | String | User name |
userEmail | String | User email |
userAvatar | String | User avatar |
role | WorkspaceRole | Member role |
status | MemberStatus | Member status |
invitedBy | UserSummary | Inviter info |
invitedAt | Instant | Invitation time |
acceptedAt | Instant | Acceptance time |
createdAt | Instant | Created time |
MemberSearchResponse
| Field | Type | Description |
|---|---|---|
userId | UUID | User ID |
name | String | Name |
email | String | |
avatar | String | Avatar URL |
role | WorkspaceRole | Role |
CommentThreadResponse
| Field | Type | Description |
|---|---|---|
id | UUID | Thread ID |
documentId | UUID | Document ID |
workspaceId | UUID | Workspace ID |
anchor | Object | Position anchor (blockId, offsets) |
status | String | open / resolved |
resolvedAt | Instant | Resolution time |
resolvedBy | UUID | Resolver user ID |
comments | List<CommentResponse> | Comments in thread |
createdAt | Instant | Created time |
updatedAt | Instant | Updated time |
CommentResponse
| Field | Type | Description |
|---|---|---|
id | UUID | Comment ID |
threadId | UUID | Thread ID |
userId | UUID | Author user ID |
userName | String | Author name |
userAvatar | String | Author avatar |
content | String | Comment text |
isEdited | Boolean | Was edited |
createdAt | Instant | Created time |
updatedAt | Instant | Updated time |
NotificationResponse
| Field | Type | Description |
|---|---|---|
id | UUID | Notification ID |
type | NotificationType | Type |
status | NotificationStatus | Status |
title | String | Title |
message | String | Message |
actionable | boolean | Requires user action |
actor | ActorInfo | Actor details |
workspace | WorkspaceInfo | Workspace details |
document | DocumentInfo | Document details |
references | ReferenceIds | Related entity IDs |
metadata | Object | Additional data |
createdAt | Instant | Created time |
readAt | Instant | Read time |
expiresAt | Instant | Expiration time |
AttachmentResponse
| Field | Type | Description |
|---|---|---|
id | UUID | Attachment ID |
documentId | UUID | Document ID |
fileName | String | Original file name |
fileSize | Long | File size in bytes |
mimeType | String | MIME type |
url | String | Access URL |
width | Integer | Image width (if applicable) |
height | Integer | Image height (if applicable) |
createdAt | Instant | Upload time |
WorkspaceInvitationResponse
| Field | Type | Description |
|---|---|---|
id | UUID | Invitation ID |
email | String | Invitee email |
role | WorkspaceRole | Assigned role |
status | InvitationStatus | Status |
message | String | Custom message |
token | String | Acceptance token |
invitedBy | UserSummary | Inviter info |
invitedAt | Instant | Invitation time |
expiresAt | Instant | Expiration time |
workspace | WorkspaceSummary | Workspace info |
InvitationResultResponse
Returned after creating/resending an invitation.
| Field | Type | Description |
|---|---|---|
invitationId | UUID | Invitation ID |
email | String | Invitee email |
role | WorkspaceRole | Assigned role |
expiresAt | Instant | Expiration time |
inviteLink | String | Acceptance URL |
TransferOwnershipResponse
| Field | Type | Description |
|---|---|---|
workspaceId | UUID | Workspace ID |
previousOwnerId | UUID | Previous owner |
newOwnerId | UUID | New owner |
transferredAt | Instant | Transfer time |
PublicDocumentResponse
Public-facing document (excludes sensitive fields).
| Field | Type | Description |
|---|---|---|
id | UUID | Document ID |
title | String | Title |
content | String | BlockNote content |
icon | String | Icon |
coverImageUrl | String | Cover image |
parentId | UUID | Parent ID |
hasChildren | Boolean | Has children |
childCount | Integer | Child count |
wordCount | Integer | Word count |
updatedAt | Instant | Last updated |
PublicDocumentListResponse
| Field | Type | Description |
|---|---|---|
id | UUID | Document ID |
title | String | Title |
icon | String | Icon |
parentId | UUID | Parent ID |
hasChildren | Boolean | Has children |
childCount | Integer | Child count |
DocumentPermissionResponse
Internal API response for permission checks.
| Field | Type | Description |
|---|---|---|
canEdit | boolean | Has edit permission |
role | String | User's workspace role |
workspaceId | UUID | Workspace ID |