This repository was archived by the owner on May 7, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathrss3.d.ts
More file actions
114 lines (89 loc) · 2.21 KB
/
Copy pathrss3.d.ts
File metadata and controls
114 lines (89 loc) · 2.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
type AccountInstanceURI = string;
type AssetInstanceURI = string;
type NoteInstanceURI = string;
type InstanceURI = string;
type ProfilesURI = string;
type LinksURI = string;
type BacklinksURI = string;
type AssetsURI = string;
type NotesURI = string;
type URI = string;
type Network = string;
type LinkType = string;
type ProfileSource = string;
type LinkSource = string;
type AssetSource = string;
type NoteSource = string;
type ResponseBase<URIType, ElementType> = {
version: 'v0.4.0';
date_updated: string;
identifier: URIType;
identifier_next?: URIType;
total: number;
list?: ElementType[];
};
type InstanceResponse = ResponseBase<
InstanceURI,
{
type: 'profiles' | 'links' | 'backlinks' | 'assets' | 'notes';
identifier: ProfilesURI | LinksURI | BacklinksURI | AssetsURI | NotesURI;
}
>;
type Profile = {
name?: string;
avatars?: URI[];
bio?: string;
attachments?: {
type?: string;
content?: string;
address?: URI;
mime_type: string;
size_in_bytes?: number;
}[];
connected_accounts?: AccountInstanceURI[];
source: ProfileSource;
metadata?: {
network: Network;
proof: string;
[key: string]: any;
};
};
type ProfilesResponse = ResponseBase<ProfilesURI, Profile>;
type Link = {
from: InstanceURI;
to: InstanceURI;
type: LinkType;
source: LinkSource;
metadata?: {
network: Network;
proof: string;
[key: string]: any;
};
};
type LinksResponse = ResponseBase<LinksURI, Link>;
type Item = {
identifier: AssetInstanceURI | NoteInstanceURI;
date_created: string;
date_updated: string;
related_urls?: string[];
links: LinksURI;
backlinks: BacklinksURI;
tags?: string[];
authors: AccountInstanceURI[];
title?: string;
summary?: string;
attachments?: {
type?: string;
content?: string;
address?: URI;
mime_type: string;
size_in_bytes?: number;
}[];
source: AssetSource | NoteSource;
metadata?: {
network: Network;
proof: string;
[key: string]: any;
};
};
type ItemsResponse = ResponseBase<AssetsURI | NotesURI, Item>;