My personal website
1/**
2 * Base AT Protocol type definitions
3 * Generic types used across all AT Protocol collections
4 */
5
6/**
7 * AT Protocol Blob reference
8 * Used for binary data like images
9 */
10export interface ATProtocolBlob {
11 $type: 'blob';
12 ref: {
13 $link: string;
14 };
15 mimeType: string;
16 size: number;
17}
18
19/**
20 * Base AT Protocol record structure
21 */
22export interface ATProtocolRecord<T = unknown> {
23 uri: string;
24 cid: string;
25 value: T;
26}
27
28/**
29 * Response from listRecords XRPC endpoint
30 */
31export interface ListRecordsResponse<T = unknown> {
32 records: ATProtocolRecord<T>[];
33 cursor?: string;
34}
35
36/**
37 * Generic fetch result with loading and error states
38 */
39export interface FetchResult<T> {
40 data: T | null;
41 loading: boolean;
42 error: string | null;
43}