@enbox/protocols 0.2.5 → 0.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +259 -0
- package/dist/esm/connect.js +1 -0
- package/dist/esm/connect.js.map +1 -1
- package/dist/esm/preferences.js +3 -0
- package/dist/esm/preferences.js.map +1 -1
- package/dist/esm/profile.js +3 -0
- package/dist/esm/profile.js.map +1 -1
- package/dist/types/connect.d.ts +8 -0
- package/dist/types/connect.d.ts.map +1 -1
- package/dist/types/preferences.d.ts +24 -0
- package/dist/types/preferences.d.ts.map +1 -1
- package/dist/types/profile.d.ts +24 -0
- package/dist/types/profile.d.ts.map +1 -1
- package/package.json +4 -3
- package/schemas/connect/wallet.json +18 -0
- package/schemas/lists/collaborator.json +19 -0
- package/schemas/lists/comment.json +15 -0
- package/schemas/lists/folder.json +23 -0
- package/schemas/lists/item.json +31 -0
- package/schemas/lists/list.json +28 -0
- package/schemas/preferences/locale.json +32 -0
- package/schemas/preferences/notification.json +27 -0
- package/schemas/preferences/privacy.json +35 -0
- package/schemas/preferences/theme.json +25 -0
- package/schemas/profile/link.json +27 -0
- package/schemas/profile/private-note.json +15 -0
- package/schemas/profile/profile.json +35 -0
- package/schemas/social-graph/block.json +19 -0
- package/schemas/social-graph/friend.json +23 -0
- package/schemas/social-graph/group.json +23 -0
- package/schemas/social-graph/member.json +19 -0
- package/schemas/status/reaction.json +15 -0
- package/schemas/status/status.json +28 -0
- package/src/connect.ts +2 -1
- package/src/preferences.ts +6 -3
- package/src/profile.ts +9 -6
package/README.md
ADDED
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
# @enbox/protocols
|
|
2
|
+
|
|
3
|
+
> **Research Preview** -- Enbox is under active development. APIs may change without notice.
|
|
4
|
+
|
|
5
|
+
Production-ready DWN protocol definitions for the Enbox ecosystem. Each protocol ships with:
|
|
6
|
+
|
|
7
|
+
- A raw `ProtocolDefinition` constant (e.g. `SocialGraphDefinition`)
|
|
8
|
+
- A typed protocol via `defineProtocol()` (e.g. `SocialGraphProtocol`)
|
|
9
|
+
- TypeScript data shape types (e.g. `FriendData`, `ProfileData`)
|
|
10
|
+
- A `SchemaMap` type mapping type names to data shapes
|
|
11
|
+
- JSON Schema files in `schemas/` for validation and code generation
|
|
12
|
+
- `$recordLimit` annotations on natural singleton types
|
|
13
|
+
|
|
14
|
+
## Installation
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
bun add @enbox/protocols
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Quick Start
|
|
21
|
+
|
|
22
|
+
```ts
|
|
23
|
+
import { repository, Web5 } from '@enbox/api';
|
|
24
|
+
import { ProfileProtocol, SocialGraphProtocol } from '@enbox/protocols';
|
|
25
|
+
|
|
26
|
+
const { web5 } = await Web5.connect({ password: 'secret' });
|
|
27
|
+
|
|
28
|
+
// Use the repository pattern for ergonomic CRUD
|
|
29
|
+
const social = repository(web5.using(SocialGraphProtocol));
|
|
30
|
+
await social.configure();
|
|
31
|
+
|
|
32
|
+
// Collections: create, query, get, delete, subscribe
|
|
33
|
+
const { record } = await social.friend.create({
|
|
34
|
+
data: { did: 'did:dht:alice...', alias: 'Alice' },
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
const { records: friends } = await social.friend.query();
|
|
38
|
+
for (const f of friends) {
|
|
39
|
+
const data = await f.data.json(); // FriendData -- typed
|
|
40
|
+
console.log(data.alias);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// Singletons: set, get, delete
|
|
44
|
+
const profile = repository(web5.using(ProfileProtocol));
|
|
45
|
+
await profile.configure();
|
|
46
|
+
|
|
47
|
+
await profile.profile.set({
|
|
48
|
+
data: { displayName: 'Bob', bio: 'Building the decentralized web' },
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
const { record: p } = await profile.profile.get();
|
|
52
|
+
console.log(await p.data.json()); // ProfileData
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Protocol Catalog
|
|
56
|
+
|
|
57
|
+
### Social Graph
|
|
58
|
+
|
|
59
|
+
**URI**: `https://identity.foundation/protocols/social-graph`
|
|
60
|
+
**Published**: yes
|
|
61
|
+
**Import**: `SocialGraphProtocol`, `SocialGraphDefinition`
|
|
62
|
+
|
|
63
|
+
Foundation protocol for relationship management. Other protocols compose with this via `uses` to leverage the `friend` role for cross-protocol authorization.
|
|
64
|
+
|
|
65
|
+
| Type | Data Shape | Singleton | Notes |
|
|
66
|
+
|------|-----------|-----------|-------|
|
|
67
|
+
| `friend` | `FriendData` | no | `$role: true` -- used for cross-protocol auth |
|
|
68
|
+
| `block` | `BlockData` | no | |
|
|
69
|
+
| `group` | `GroupData` | no | |
|
|
70
|
+
| `group/member` | `MemberData` | no | Nested under group |
|
|
71
|
+
|
|
72
|
+
```ts
|
|
73
|
+
type FriendData = { did: string; alias?: string; note?: string };
|
|
74
|
+
type BlockData = { did: string; reason?: string };
|
|
75
|
+
type GroupData = { name: string; description?: string; icon?: string };
|
|
76
|
+
type MemberData = { did: string; alias?: string };
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
### Profile
|
|
82
|
+
|
|
83
|
+
**URI**: `https://identity.foundation/protocols/profile`
|
|
84
|
+
**Published**: yes
|
|
85
|
+
**Composes with**: Social Graph (`social:friend` role for private notes)
|
|
86
|
+
**Import**: `ProfileProtocol`, `ProfileDefinition`
|
|
87
|
+
|
|
88
|
+
Public and semi-private identity information with avatar/hero images and social links.
|
|
89
|
+
|
|
90
|
+
| Type | Data Shape | Singleton | Notes |
|
|
91
|
+
|------|-----------|-----------|-------|
|
|
92
|
+
| `profile` | `ProfileData` | **yes** | 10 KB max |
|
|
93
|
+
| `profile/avatar` | `AvatarData` (Blob) | **yes** | 12 MB max, image formats |
|
|
94
|
+
| `profile/hero` | `HeroData` (Blob) | **yes** | 24 MB max, image formats |
|
|
95
|
+
| `profile/link` | `LinkData` | no | Social links nested under profile |
|
|
96
|
+
| `privateNote` | `PrivateNoteData` | no | Readable only by friends |
|
|
97
|
+
|
|
98
|
+
```ts
|
|
99
|
+
type ProfileData = { displayName: string; bio?: string; tagline?: string; location?: string; website?: string; pronouns?: string };
|
|
100
|
+
type AvatarData = Blob; // no JSON schema -- binary only
|
|
101
|
+
type HeroData = Blob; // no JSON schema -- binary only
|
|
102
|
+
type LinkData = { url: string; title: string; icon?: string; sortOrder?: number };
|
|
103
|
+
type PrivateNoteData = { content: string };
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
### Preferences
|
|
109
|
+
|
|
110
|
+
**URI**: `https://identity.foundation/protocols/preferences`
|
|
111
|
+
**Published**: no (owner-only)
|
|
112
|
+
**Import**: `PreferencesProtocol`, `PreferencesDefinition`
|
|
113
|
+
|
|
114
|
+
User configuration and settings. The `privacy` type uses `encryptionRequired: true` for at-rest encryption.
|
|
115
|
+
|
|
116
|
+
| Type | Data Shape | Singleton | Notes |
|
|
117
|
+
|------|-----------|-----------|-------|
|
|
118
|
+
| `theme` | `ThemeData` | **yes** | |
|
|
119
|
+
| `locale` | `LocaleData` | **yes** | |
|
|
120
|
+
| `privacy` | `PrivacyData` | **yes** | Encrypted at rest |
|
|
121
|
+
| `notification` | `NotificationData` | no | Multiple channels, tagged by `channel` |
|
|
122
|
+
|
|
123
|
+
```ts
|
|
124
|
+
type ThemeData = { mode: 'light' | 'dark' | 'system'; accentColor?: string; fontSize?: 'small' | 'medium' | 'large' };
|
|
125
|
+
type LocaleData = { language: string; region?: string; timezone?: string; dateFormat?: string; hourCycle?: '12h' | '24h' };
|
|
126
|
+
type PrivacyData = { cookieConsent: { analytics: boolean; marketing: boolean; functional: boolean }; shareUsageData: boolean };
|
|
127
|
+
type NotificationData = { channel: string; enabled: boolean; quietHoursStart?: string; quietHoursEnd?: string };
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
---
|
|
131
|
+
|
|
132
|
+
### Status
|
|
133
|
+
|
|
134
|
+
**URI**: `https://identity.foundation/protocols/status`
|
|
135
|
+
**Published**: yes
|
|
136
|
+
**Composes with**: Social Graph (friend-scoped reactions)
|
|
137
|
+
**Import**: `StatusProtocol`, `StatusDefinition`
|
|
138
|
+
|
|
139
|
+
Ephemeral status updates with reactions. Published statuses are readable by anyone; reactions are friend-scoped.
|
|
140
|
+
|
|
141
|
+
| Type | Data Shape | Singleton | Notes |
|
|
142
|
+
|------|-----------|-----------|-------|
|
|
143
|
+
| `status` | `StatusData` | no | 5 KB max |
|
|
144
|
+
| `status/reaction` | `ReactionData` | no | Friend-only create/read/delete |
|
|
145
|
+
|
|
146
|
+
```ts
|
|
147
|
+
type StatusData = { text: string; emoji?: string; activity?: 'online' | 'away' | 'busy' | 'offline'; expiresAt?: string };
|
|
148
|
+
type ReactionData = { emoji: string };
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
---
|
|
152
|
+
|
|
153
|
+
### Lists
|
|
154
|
+
|
|
155
|
+
**URI**: `https://identity.foundation/protocols/lists`
|
|
156
|
+
**Published**: no
|
|
157
|
+
**Composes with**: Social Graph (friend-scoped reads, collaborator role)
|
|
158
|
+
**Import**: `ListsProtocol`, `ListsDefinition`
|
|
159
|
+
|
|
160
|
+
Flexible list management with collaboration. Supports nested items with tag-based hierarchy and 3-level folder nesting.
|
|
161
|
+
|
|
162
|
+
| Type | Data Shape | Singleton | Notes |
|
|
163
|
+
|------|-----------|-----------|-------|
|
|
164
|
+
| `list` | `ListData` | no | Tagged by `listType` |
|
|
165
|
+
| `list/item` | `ItemData` | no | Collaborators can CRUD |
|
|
166
|
+
| `list/item/comment` | `CommentData` | no | Collaborators can create/read |
|
|
167
|
+
| `list/collaborator` | `CollaboratorData` | no | `$role: true` for write access |
|
|
168
|
+
| `folder` | `FolderData` | no | 3-level nesting: `folder/folder/folder` |
|
|
169
|
+
|
|
170
|
+
```ts
|
|
171
|
+
type ListData = { name: string; description?: string; icon?: string; listType: 'todo' | 'bookmarks' | 'reading' | 'custom' };
|
|
172
|
+
type ItemData = { title: string; url?: string; note?: string; completed?: boolean; sortOrder?: number };
|
|
173
|
+
type CommentData = { text: string };
|
|
174
|
+
type CollaboratorData = { did: string; alias?: string };
|
|
175
|
+
type FolderData = { name: string; icon?: string; sortOrder?: number };
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
---
|
|
179
|
+
|
|
180
|
+
### Connect
|
|
181
|
+
|
|
182
|
+
**URI**: `https://identity.foundation/protocols/connect`
|
|
183
|
+
**Published**: yes
|
|
184
|
+
**Import**: `ConnectProtocol`, `ConnectDefinition`
|
|
185
|
+
|
|
186
|
+
Wallet and app discovery information.
|
|
187
|
+
|
|
188
|
+
| Type | Data Shape | Singleton | Notes |
|
|
189
|
+
|------|-----------|-----------|-------|
|
|
190
|
+
| `wallet` | `WalletData` | **yes** | Publicly readable |
|
|
191
|
+
|
|
192
|
+
```ts
|
|
193
|
+
type WalletData = { webWallets: string[] };
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
## JSON Schemas
|
|
197
|
+
|
|
198
|
+
Each protocol type with `application/json` data format has a corresponding JSON Schema file in `schemas/<protocol>/<type>.json`. These schemas:
|
|
199
|
+
|
|
200
|
+
- Match the TypeScript data shapes exactly
|
|
201
|
+
- Use Draft-07 (`$schema: "http://json-schema.org/draft-07/schema#"`)
|
|
202
|
+
- Have `$id` URIs matching the `schema` field in the protocol definition
|
|
203
|
+
- Are compatible with `@enbox/protocol-codegen` for TypeScript type generation
|
|
204
|
+
|
|
205
|
+
```
|
|
206
|
+
schemas/
|
|
207
|
+
social-graph/ friend.json, block.json, group.json, member.json
|
|
208
|
+
profile/ profile.json, link.json, private-note.json
|
|
209
|
+
preferences/ theme.json, locale.json, privacy.json, notification.json
|
|
210
|
+
status/ status.json, reaction.json
|
|
211
|
+
lists/ list.json, item.json, folder.json, collaborator.json, comment.json
|
|
212
|
+
connect/ wallet.json
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
Binary-only types (`avatar`, `hero`) do not have JSON Schemas since they store raw image data.
|
|
216
|
+
|
|
217
|
+
## Singleton Detection
|
|
218
|
+
|
|
219
|
+
Types annotated with `$recordLimit: { max: 1, strategy: 'reject' }` in the protocol structure are treated as singletons by the `repository()` factory. This means:
|
|
220
|
+
|
|
221
|
+
- **Singletons** get `set()` (upsert) and `get()` instead of `create()` and `query()`
|
|
222
|
+
- The DWN engine enforces the limit -- a second `create` for a singleton is rejected
|
|
223
|
+
- Currently annotated singletons: `profile`, `avatar`, `hero`, `theme`, `locale`, `privacy`, `wallet`
|
|
224
|
+
|
|
225
|
+
## Exports
|
|
226
|
+
|
|
227
|
+
All protocols re-export from the package root:
|
|
228
|
+
|
|
229
|
+
```ts
|
|
230
|
+
import {
|
|
231
|
+
// Social Graph
|
|
232
|
+
SocialGraphProtocol, SocialGraphDefinition,
|
|
233
|
+
type SocialGraphSchemaMap, type FriendData, type BlockData, type GroupData, type MemberData,
|
|
234
|
+
|
|
235
|
+
// Profile
|
|
236
|
+
ProfileProtocol, ProfileDefinition,
|
|
237
|
+
type ProfileSchemaMap, type ProfileData, type AvatarData, type HeroData, type LinkData, type PrivateNoteData,
|
|
238
|
+
|
|
239
|
+
// Preferences
|
|
240
|
+
PreferencesProtocol, PreferencesDefinition,
|
|
241
|
+
type PreferencesSchemaMap, type ThemeData, type LocaleData, type PrivacyData, type NotificationData,
|
|
242
|
+
|
|
243
|
+
// Status
|
|
244
|
+
StatusProtocol, StatusDefinition,
|
|
245
|
+
type StatusSchemaMap, type StatusData, type ReactionData,
|
|
246
|
+
|
|
247
|
+
// Lists
|
|
248
|
+
ListsProtocol, ListsDefinition,
|
|
249
|
+
type ListsSchemaMap, type ListData, type ItemData, type FolderData, type CollaboratorData, type CommentData,
|
|
250
|
+
|
|
251
|
+
// Connect
|
|
252
|
+
ConnectProtocol, ConnectDefinition,
|
|
253
|
+
type ConnectSchemaMap, type WalletData,
|
|
254
|
+
} from '@enbox/protocols';
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
## License
|
|
258
|
+
|
|
259
|
+
Apache-2.0
|
package/dist/esm/connect.js
CHANGED
package/dist/esm/connect.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connect.js","sourceRoot":"","sources":["../../src/connect.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAqB5C,8EAA8E;AAC9E,sBAAsB;AACtB,8EAA8E;AAE9E,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,QAAQ,EAAI,+CAA+C;IAC3D,SAAS,EAAG,IAAI;IAChB,KAAK,EAAO;QACV,MAAM,EAAE;YACN,MAAM,EAAQ,oDAAoD;YAClE,WAAW,EAAG,CAAC,kBAAkB,CAAC;SACnC;KACF;IACD,SAAS,EAAE;QACT,MAAM,EAAE;YACN,QAAQ,EAAE;
|
|
1
|
+
{"version":3,"file":"connect.js","sourceRoot":"","sources":["../../src/connect.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAqB5C,8EAA8E;AAC9E,sBAAsB;AACtB,8EAA8E;AAE9E,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,QAAQ,EAAI,+CAA+C;IAC3D,SAAS,EAAG,IAAI;IAChB,KAAK,EAAO;QACV,MAAM,EAAE;YACN,MAAM,EAAQ,oDAAoD;YAClE,WAAW,EAAG,CAAC,kBAAkB,CAAC;SACnC;KACF;IACD,SAAS,EAAE;QACT,MAAM,EAAE;YACN,YAAY,EAAG,EAAE,GAAG,EAAE,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE;YAC7C,QAAQ,EAAO;gBACb,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,EAAE;aACjC;SACF;KACF;CACoC,CAAC;AAExC,8EAA8E;AAC9E,wBAAwB;AACxB,8EAA8E;AAE9E,yDAAyD;AACzD,MAAM,CAAC,MAAM,eAAe,GAAG,cAAc,CAC3C,iBAAiB,EACjB,EAAsB,CACvB,CAAC"}
|
package/dist/esm/preferences.js
CHANGED
|
@@ -35,12 +35,15 @@ export const PreferencesDefinition = {
|
|
|
35
35
|
},
|
|
36
36
|
structure: {
|
|
37
37
|
theme: {
|
|
38
|
+
$recordLimit: { max: 1, strategy: 'reject' },
|
|
38
39
|
$actions: [],
|
|
39
40
|
},
|
|
40
41
|
locale: {
|
|
42
|
+
$recordLimit: { max: 1, strategy: 'reject' },
|
|
41
43
|
$actions: [],
|
|
42
44
|
},
|
|
43
45
|
privacy: {
|
|
46
|
+
$recordLimit: { max: 1, strategy: 'reject' },
|
|
44
47
|
$actions: [],
|
|
45
48
|
},
|
|
46
49
|
notification: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preferences.js","sourceRoot":"","sources":["../../src/preferences.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAoD5C,8EAA8E;AAC9E,sBAAsB;AACtB,8EAA8E;AAE9E,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,QAAQ,EAAI,mDAAmD;IAC/D,SAAS,EAAG,KAAK;IACjB,KAAK,EAAO;QACV,KAAK,EAAE;YACL,MAAM,EAAQ,uDAAuD;YACrE,WAAW,EAAG,CAAC,kBAAkB,CAAC;SACnC;QACD,MAAM,EAAE;YACN,MAAM,EAAQ,wDAAwD;YACtE,WAAW,EAAG,CAAC,kBAAkB,CAAC;SACnC;QACD,OAAO,EAAE;YACP,MAAM,EAAe,yDAAyD;YAC9E,WAAW,EAAU,CAAC,kBAAkB,CAAC;YACzC,kBAAkB,EAAG,IAAI;SAC1B;QACD,YAAY,EAAE;YACZ,MAAM,EAAQ,8DAA8D;YAC5E,WAAW,EAAG,CAAC,kBAAkB,CAAC;SACnC;KACF;IACD,SAAS,EAAE;QACT,KAA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C3B,OAAO,EAAe,EAAE,IAAI,EAAE,QAAQ,EAAE;aACzC;SACF;KACF;CACoC,CAAC;AAExC,8EAA8E;AAC9E,wBAAwB;AACxB,8EAA8E;AAE9E,6DAA6D;AAC7D,MAAM,CAAC,MAAM,mBAAmB,GAAG,cAAc,CAC/C,qBAAqB,EACrB,EAA0B,CAC3B,CAAC"}
|
package/dist/esm/profile.js
CHANGED
|
@@ -39,17 +39,20 @@ export const ProfileDefinition = {
|
|
|
39
39
|
},
|
|
40
40
|
structure: {
|
|
41
41
|
profile: {
|
|
42
|
+
$recordLimit: { max: 1, strategy: 'reject' },
|
|
42
43
|
$size: { max: 10000 },
|
|
43
44
|
$actions: [
|
|
44
45
|
{ who: 'anyone', can: ['read'] },
|
|
45
46
|
],
|
|
46
47
|
avatar: {
|
|
48
|
+
$recordLimit: { max: 1, strategy: 'reject' },
|
|
47
49
|
$size: { max: 12582912 },
|
|
48
50
|
$actions: [
|
|
49
51
|
{ who: 'anyone', can: ['read'] },
|
|
50
52
|
],
|
|
51
53
|
},
|
|
52
54
|
hero: {
|
|
55
|
+
$recordLimit: { max: 1, strategy: 'reject' },
|
|
53
56
|
$size: { max: 25165824 },
|
|
54
57
|
$actions: [
|
|
55
58
|
{ who: 'anyone', can: ['read'] },
|
package/dist/esm/profile.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profile.js","sourceRoot":"","sources":["../../src/profile.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAgD5C,8EAA8E;AAC9E,sBAAsB;AACtB,8EAA8E;AAE9E,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,QAAQ,EAAI,+CAA+C;IAC3D,SAAS,EAAG,IAAI;IAChB,IAAI,EAAQ;QACV,MAAM,EAAE,oDAAoD;KAC7D;IACD,KAAK,EAAE;QACL,OAAO,EAAE;YACP,MAAM,EAAQ,qDAAqD;YAC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-27,6 +27,10 @@ export declare const ConnectDefinition: {
|
|
|
27
27
|
};
|
|
28
28
|
readonly structure: {
|
|
29
29
|
readonly wallet: {
|
|
30
|
+
readonly $recordLimit: {
|
|
31
|
+
readonly max: 1;
|
|
32
|
+
readonly strategy: "reject";
|
|
33
|
+
};
|
|
30
34
|
readonly $actions: [{
|
|
31
35
|
readonly who: "anyone";
|
|
32
36
|
readonly can: ["read"];
|
|
@@ -46,6 +50,10 @@ export declare const ConnectProtocol: import("@enbox/api").TypedProtocol<{
|
|
|
46
50
|
};
|
|
47
51
|
readonly structure: {
|
|
48
52
|
readonly wallet: {
|
|
53
|
+
readonly $recordLimit: {
|
|
54
|
+
readonly max: 1;
|
|
55
|
+
readonly strategy: "reject";
|
|
56
|
+
};
|
|
49
57
|
readonly $actions: [{
|
|
50
58
|
readonly who: "anyone";
|
|
51
59
|
readonly can: ["read"];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connect.d.ts","sourceRoot":"","sources":["../../src/connect.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAUH,6CAA6C;AAC7C,MAAM,MAAM,UAAU,GAAG;IACvB,gEAAgE;IAChE,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB,CAAC;AAMF,gEAAgE;AAChE,MAAM,MAAM,gBAAgB,GAAG;IAC7B,MAAM,EAAE,UAAU,CAAC;CACpB,CAAC;AAMF,eAAO,MAAM,iBAAiB
|
|
1
|
+
{"version":3,"file":"connect.d.ts","sourceRoot":"","sources":["../../src/connect.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAUH,6CAA6C;AAC7C,MAAM,MAAM,UAAU,GAAG;IACvB,gEAAgE;IAChE,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB,CAAC;AAMF,gEAAgE;AAChE,MAAM,MAAM,gBAAgB,GAAG;IAC7B,MAAM,EAAE,UAAU,CAAC;CACpB,CAAC;AAMF,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;CAiBS,CAAC;AAMxC,yDAAyD;AACzD,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;oBAG3B,CAAC"}
|
|
@@ -68,12 +68,24 @@ export declare const PreferencesDefinition: {
|
|
|
68
68
|
};
|
|
69
69
|
readonly structure: {
|
|
70
70
|
readonly theme: {
|
|
71
|
+
readonly $recordLimit: {
|
|
72
|
+
readonly max: 1;
|
|
73
|
+
readonly strategy: "reject";
|
|
74
|
+
};
|
|
71
75
|
readonly $actions: [];
|
|
72
76
|
};
|
|
73
77
|
readonly locale: {
|
|
78
|
+
readonly $recordLimit: {
|
|
79
|
+
readonly max: 1;
|
|
80
|
+
readonly strategy: "reject";
|
|
81
|
+
};
|
|
74
82
|
readonly $actions: [];
|
|
75
83
|
};
|
|
76
84
|
readonly privacy: {
|
|
85
|
+
readonly $recordLimit: {
|
|
86
|
+
readonly max: 1;
|
|
87
|
+
readonly strategy: "reject";
|
|
88
|
+
};
|
|
77
89
|
readonly $actions: [];
|
|
78
90
|
};
|
|
79
91
|
readonly notification: {
|
|
@@ -113,12 +125,24 @@ export declare const PreferencesProtocol: import("@enbox/api").TypedProtocol<{
|
|
|
113
125
|
};
|
|
114
126
|
readonly structure: {
|
|
115
127
|
readonly theme: {
|
|
128
|
+
readonly $recordLimit: {
|
|
129
|
+
readonly max: 1;
|
|
130
|
+
readonly strategy: "reject";
|
|
131
|
+
};
|
|
116
132
|
readonly $actions: [];
|
|
117
133
|
};
|
|
118
134
|
readonly locale: {
|
|
135
|
+
readonly $recordLimit: {
|
|
136
|
+
readonly max: 1;
|
|
137
|
+
readonly strategy: "reject";
|
|
138
|
+
};
|
|
119
139
|
readonly $actions: [];
|
|
120
140
|
};
|
|
121
141
|
readonly privacy: {
|
|
142
|
+
readonly $recordLimit: {
|
|
143
|
+
readonly max: 1;
|
|
144
|
+
readonly strategy: "reject";
|
|
145
|
+
};
|
|
122
146
|
readonly $actions: [];
|
|
123
147
|
};
|
|
124
148
|
readonly notification: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preferences.d.ts","sourceRoot":"","sources":["../../src/preferences.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAUH,wCAAwC;AACxC,MAAM,MAAM,SAAS,GAAG;IACtB,IAAI,EAAE,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAC;IAClC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;CACzC,CAAC;AAEF,yCAAyC;AACzC,MAAM,MAAM,UAAU,GAAG;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,KAAK,GAAG,KAAK,CAAC;CAC3B,CAAC;AAEF,0CAA0C;AAC1C,MAAM,MAAM,WAAW,GAAG;IACxB,aAAa,EAAE;QACb,SAAS,EAAE,OAAO,CAAC;QACnB,SAAS,EAAE,OAAO,CAAC;QACnB,UAAU,EAAE,OAAO,CAAC;KACrB,CAAC;IACF,cAAc,EAAE,OAAO,CAAC;CACzB,CAAC;AAEF,+CAA+C;AAC/C,MAAM,MAAM,gBAAgB,GAAG;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,OAAO,CAAC;IACjB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAMF,gEAAgE;AAChE,MAAM,MAAM,oBAAoB,GAAG;IACjC,KAAK,EAAE,SAAS,CAAC;IACjB,MAAM,EAAE,UAAU,CAAC;IACnB,OAAO,EAAE,WAAW,CAAC;IACrB,YAAY,EAAE,gBAAgB,CAAC;CAChC,CAAC;AAMF,eAAO,MAAM,qBAAqB
|
|
1
|
+
{"version":3,"file":"preferences.d.ts","sourceRoot":"","sources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AmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAG/B,CAAC"}
|
package/dist/types/profile.d.ts
CHANGED
|
@@ -67,6 +67,10 @@ export declare const ProfileDefinition: {
|
|
|
67
67
|
};
|
|
68
68
|
readonly structure: {
|
|
69
69
|
readonly profile: {
|
|
70
|
+
readonly $recordLimit: {
|
|
71
|
+
readonly max: 1;
|
|
72
|
+
readonly strategy: "reject";
|
|
73
|
+
};
|
|
70
74
|
readonly $size: {
|
|
71
75
|
readonly max: 10000;
|
|
72
76
|
};
|
|
@@ -75,6 +79,10 @@ export declare const ProfileDefinition: {
|
|
|
75
79
|
readonly can: ["read"];
|
|
76
80
|
}];
|
|
77
81
|
readonly avatar: {
|
|
82
|
+
readonly $recordLimit: {
|
|
83
|
+
readonly max: 1;
|
|
84
|
+
readonly strategy: "reject";
|
|
85
|
+
};
|
|
78
86
|
readonly $size: {
|
|
79
87
|
readonly max: 12582912;
|
|
80
88
|
};
|
|
@@ -84,6 +92,10 @@ export declare const ProfileDefinition: {
|
|
|
84
92
|
}];
|
|
85
93
|
};
|
|
86
94
|
readonly hero: {
|
|
95
|
+
readonly $recordLimit: {
|
|
96
|
+
readonly max: 1;
|
|
97
|
+
readonly strategy: "reject";
|
|
98
|
+
};
|
|
87
99
|
readonly $size: {
|
|
88
100
|
readonly max: 25165824;
|
|
89
101
|
};
|
|
@@ -136,6 +148,10 @@ export declare const ProfileProtocol: import("@enbox/api").TypedProtocol<{
|
|
|
136
148
|
};
|
|
137
149
|
readonly structure: {
|
|
138
150
|
readonly profile: {
|
|
151
|
+
readonly $recordLimit: {
|
|
152
|
+
readonly max: 1;
|
|
153
|
+
readonly strategy: "reject";
|
|
154
|
+
};
|
|
139
155
|
readonly $size: {
|
|
140
156
|
readonly max: 10000;
|
|
141
157
|
};
|
|
@@ -144,6 +160,10 @@ export declare const ProfileProtocol: import("@enbox/api").TypedProtocol<{
|
|
|
144
160
|
readonly can: ["read"];
|
|
145
161
|
}];
|
|
146
162
|
readonly avatar: {
|
|
163
|
+
readonly $recordLimit: {
|
|
164
|
+
readonly max: 1;
|
|
165
|
+
readonly strategy: "reject";
|
|
166
|
+
};
|
|
147
167
|
readonly $size: {
|
|
148
168
|
readonly max: 12582912;
|
|
149
169
|
};
|
|
@@ -153,6 +173,10 @@ export declare const ProfileProtocol: import("@enbox/api").TypedProtocol<{
|
|
|
153
173
|
}];
|
|
154
174
|
};
|
|
155
175
|
readonly hero: {
|
|
176
|
+
readonly $recordLimit: {
|
|
177
|
+
readonly max: 1;
|
|
178
|
+
readonly strategy: "reject";
|
|
179
|
+
};
|
|
156
180
|
readonly $size: {
|
|
157
181
|
readonly max: 25165824;
|
|
158
182
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profile.d.ts","sourceRoot":"","sources":["../../src/profile.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAUH,uCAAuC;AACvC,MAAM,MAAM,WAAW,GAAG;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,8CAA8C;AAC9C,MAAM,MAAM,UAAU,GAAG,IAAI,CAAC;AAE9B,mDAAmD;AACnD,MAAM,MAAM,QAAQ,GAAG,IAAI,CAAC;AAE5B,wDAAwD;AACxD,MAAM,MAAM,QAAQ,GAAG;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,+DAA+D;AAC/D,MAAM,MAAM,eAAe,GAAG;IAC5B,OAAO,EAAE,MAAM,CAAC;C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MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2DS,CAAC;AAMxC,yDAAyD;AACzD,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAG3B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@enbox/protocols",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.6",
|
|
4
4
|
"description": "Standard reusable DWN protocol definitions for the Enbox ecosystem",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/esm/index.js",
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
"license": "Apache-2.0",
|
|
26
26
|
"files": [
|
|
27
27
|
"dist",
|
|
28
|
+
"schemas",
|
|
28
29
|
"src"
|
|
29
30
|
],
|
|
30
31
|
"exports": {
|
|
@@ -46,8 +47,8 @@
|
|
|
46
47
|
"bun": ">=1.0.0"
|
|
47
48
|
},
|
|
48
49
|
"dependencies": {
|
|
49
|
-
"@enbox/api": "0.2.
|
|
50
|
-
"@enbox/dwn-sdk-js": "0.0.
|
|
50
|
+
"@enbox/api": "0.2.4",
|
|
51
|
+
"@enbox/dwn-sdk-js": "0.0.8"
|
|
51
52
|
},
|
|
52
53
|
"devDependencies": {
|
|
53
54
|
"@typescript-eslint/eslint-plugin": "8.32.1",
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://identity.foundation/schemas/connect/wallet",
|
|
4
|
+
"title": "WalletData",
|
|
5
|
+
"description": "Data shape for wallet connection info.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"webWallets": {
|
|
9
|
+
"type": "array",
|
|
10
|
+
"items": {
|
|
11
|
+
"type": "string"
|
|
12
|
+
},
|
|
13
|
+
"description": "URLs of web wallet applications associated with this DID."
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"required": ["webWallets"],
|
|
17
|
+
"additionalProperties": false
|
|
18
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://identity.foundation/schemas/lists/collaborator",
|
|
4
|
+
"title": "CollaboratorData",
|
|
5
|
+
"description": "Data shape for a collaborator record.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"did": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"description": "The DID of the collaborator."
|
|
11
|
+
},
|
|
12
|
+
"alias": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"description": "An optional alias for the collaborator."
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"required": ["did"],
|
|
18
|
+
"additionalProperties": false
|
|
19
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://identity.foundation/schemas/lists/comment",
|
|
4
|
+
"title": "CommentData",
|
|
5
|
+
"description": "Data shape for a comment on a list item.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"text": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"description": "The comment text."
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"required": ["text"],
|
|
14
|
+
"additionalProperties": false
|
|
15
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://identity.foundation/schemas/lists/folder",
|
|
4
|
+
"title": "FolderData",
|
|
5
|
+
"description": "Data shape for a folder record.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"name": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"description": "The name of the folder."
|
|
11
|
+
},
|
|
12
|
+
"icon": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"description": "An optional icon for the folder."
|
|
15
|
+
},
|
|
16
|
+
"sortOrder": {
|
|
17
|
+
"type": "number",
|
|
18
|
+
"description": "An optional sort order for display."
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"required": ["name"],
|
|
22
|
+
"additionalProperties": false
|
|
23
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://identity.foundation/schemas/lists/item",
|
|
4
|
+
"title": "ItemData",
|
|
5
|
+
"description": "Data shape for a list item.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"title": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"description": "The title of the item."
|
|
11
|
+
},
|
|
12
|
+
"url": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"description": "An optional URL associated with the item."
|
|
15
|
+
},
|
|
16
|
+
"note": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"description": "An optional note about the item."
|
|
19
|
+
},
|
|
20
|
+
"completed": {
|
|
21
|
+
"type": "boolean",
|
|
22
|
+
"description": "Whether the item is completed."
|
|
23
|
+
},
|
|
24
|
+
"sortOrder": {
|
|
25
|
+
"type": "number",
|
|
26
|
+
"description": "An optional sort order for display."
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"required": ["title"],
|
|
30
|
+
"additionalProperties": false
|
|
31
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://identity.foundation/schemas/lists/list",
|
|
4
|
+
"title": "ListData",
|
|
5
|
+
"description": "Data shape for a list record.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"name": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"description": "The name of the list."
|
|
11
|
+
},
|
|
12
|
+
"description": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"description": "An optional description of the list."
|
|
15
|
+
},
|
|
16
|
+
"icon": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"description": "An optional icon for the list."
|
|
19
|
+
},
|
|
20
|
+
"listType": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"enum": ["todo", "bookmarks", "reading", "custom"],
|
|
23
|
+
"description": "The type of list."
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"required": ["name", "listType"],
|
|
27
|
+
"additionalProperties": false
|
|
28
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://identity.foundation/schemas/preferences/locale",
|
|
4
|
+
"title": "LocaleData",
|
|
5
|
+
"description": "Data shape for locale preferences.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"language": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"description": "The preferred language (e.g. BCP 47 tag)."
|
|
11
|
+
},
|
|
12
|
+
"region": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"description": "An optional region code."
|
|
15
|
+
},
|
|
16
|
+
"timezone": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"description": "An optional IANA timezone identifier."
|
|
19
|
+
},
|
|
20
|
+
"dateFormat": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"description": "An optional date format string."
|
|
23
|
+
},
|
|
24
|
+
"hourCycle": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"enum": ["12h", "24h"],
|
|
27
|
+
"description": "An optional hour cycle preference."
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"required": ["language"],
|
|
31
|
+
"additionalProperties": false
|
|
32
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://identity.foundation/schemas/preferences/notification",
|
|
4
|
+
"title": "NotificationData",
|
|
5
|
+
"description": "Data shape for notification preferences.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"channel": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"description": "The notification channel identifier."
|
|
11
|
+
},
|
|
12
|
+
"enabled": {
|
|
13
|
+
"type": "boolean",
|
|
14
|
+
"description": "Whether the channel is enabled."
|
|
15
|
+
},
|
|
16
|
+
"quietHoursStart": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"description": "Optional quiet hours start time (HH:MM format)."
|
|
19
|
+
},
|
|
20
|
+
"quietHoursEnd": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"description": "Optional quiet hours end time (HH:MM format)."
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"required": ["channel", "enabled"],
|
|
26
|
+
"additionalProperties": false
|
|
27
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://identity.foundation/schemas/preferences/privacy",
|
|
4
|
+
"title": "PrivacyData",
|
|
5
|
+
"description": "Data shape for privacy preferences.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"cookieConsent": {
|
|
9
|
+
"type": "object",
|
|
10
|
+
"description": "Cookie consent preferences.",
|
|
11
|
+
"properties": {
|
|
12
|
+
"analytics": {
|
|
13
|
+
"type": "boolean",
|
|
14
|
+
"description": "Whether analytics cookies are consented to."
|
|
15
|
+
},
|
|
16
|
+
"marketing": {
|
|
17
|
+
"type": "boolean",
|
|
18
|
+
"description": "Whether marketing cookies are consented to."
|
|
19
|
+
},
|
|
20
|
+
"functional": {
|
|
21
|
+
"type": "boolean",
|
|
22
|
+
"description": "Whether functional cookies are consented to."
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"required": ["analytics", "marketing", "functional"],
|
|
26
|
+
"additionalProperties": false
|
|
27
|
+
},
|
|
28
|
+
"shareUsageData": {
|
|
29
|
+
"type": "boolean",
|
|
30
|
+
"description": "Whether usage data sharing is enabled."
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"required": ["cookieConsent", "shareUsageData"],
|
|
34
|
+
"additionalProperties": false
|
|
35
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://identity.foundation/schemas/preferences/theme",
|
|
4
|
+
"title": "ThemeData",
|
|
5
|
+
"description": "Data shape for theme preferences.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"mode": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"enum": ["light", "dark", "system"],
|
|
11
|
+
"description": "The theme mode."
|
|
12
|
+
},
|
|
13
|
+
"accentColor": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"description": "An optional accent color."
|
|
16
|
+
},
|
|
17
|
+
"fontSize": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"enum": ["small", "medium", "large"],
|
|
20
|
+
"description": "An optional font size preference."
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"required": ["mode"],
|
|
24
|
+
"additionalProperties": false
|
|
25
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://identity.foundation/schemas/profile/link",
|
|
4
|
+
"title": "LinkData",
|
|
5
|
+
"description": "Data shape for a link record (e.g. social links).",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"url": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"description": "The URL of the link."
|
|
11
|
+
},
|
|
12
|
+
"title": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"description": "The display title of the link."
|
|
15
|
+
},
|
|
16
|
+
"icon": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"description": "An optional icon for the link."
|
|
19
|
+
},
|
|
20
|
+
"sortOrder": {
|
|
21
|
+
"type": "number",
|
|
22
|
+
"description": "An optional sort order for display."
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"required": ["url", "title"],
|
|
26
|
+
"additionalProperties": false
|
|
27
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://identity.foundation/schemas/profile/private-note",
|
|
4
|
+
"title": "PrivateNoteData",
|
|
5
|
+
"description": "Data shape for a private note (visible only to friends).",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"content": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"description": "The content of the private note."
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"required": ["content"],
|
|
14
|
+
"additionalProperties": false
|
|
15
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://identity.foundation/schemas/profile/profile",
|
|
4
|
+
"title": "ProfileData",
|
|
5
|
+
"description": "Data shape for a profile record.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"displayName": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"description": "The display name of the identity."
|
|
11
|
+
},
|
|
12
|
+
"bio": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"description": "An optional biography."
|
|
15
|
+
},
|
|
16
|
+
"tagline": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"description": "An optional tagline."
|
|
19
|
+
},
|
|
20
|
+
"location": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"description": "An optional location."
|
|
23
|
+
},
|
|
24
|
+
"website": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"description": "An optional website URL."
|
|
27
|
+
},
|
|
28
|
+
"pronouns": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"description": "Optional pronouns."
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"required": ["displayName"],
|
|
34
|
+
"additionalProperties": false
|
|
35
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://identity.foundation/schemas/social-graph/block",
|
|
4
|
+
"title": "BlockData",
|
|
5
|
+
"description": "Data shape for a block record.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"did": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"description": "The DID of the blocked identity."
|
|
11
|
+
},
|
|
12
|
+
"reason": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"description": "An optional reason for blocking."
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"required": ["did"],
|
|
18
|
+
"additionalProperties": false
|
|
19
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://identity.foundation/schemas/social-graph/friend",
|
|
4
|
+
"title": "FriendData",
|
|
5
|
+
"description": "Data shape for a friend record.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"did": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"description": "The DID of the friend."
|
|
11
|
+
},
|
|
12
|
+
"alias": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"description": "An optional alias for the friend."
|
|
15
|
+
},
|
|
16
|
+
"note": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"description": "An optional note about the friend."
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"required": ["did"],
|
|
22
|
+
"additionalProperties": false
|
|
23
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://identity.foundation/schemas/social-graph/group",
|
|
4
|
+
"title": "GroupData",
|
|
5
|
+
"description": "Data shape for a group record.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"name": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"description": "The name of the group."
|
|
11
|
+
},
|
|
12
|
+
"description": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"description": "An optional description of the group."
|
|
15
|
+
},
|
|
16
|
+
"icon": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"description": "An optional icon for the group."
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"required": ["name"],
|
|
22
|
+
"additionalProperties": false
|
|
23
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://identity.foundation/schemas/social-graph/member",
|
|
4
|
+
"title": "MemberData",
|
|
5
|
+
"description": "Data shape for a group member record.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"did": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"description": "The DID of the group member."
|
|
11
|
+
},
|
|
12
|
+
"alias": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"description": "An optional alias for the member."
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"required": ["did"],
|
|
18
|
+
"additionalProperties": false
|
|
19
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://identity.foundation/schemas/status/reaction",
|
|
4
|
+
"title": "ReactionData",
|
|
5
|
+
"description": "Data shape for a reaction to a status.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"emoji": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"description": "The reaction emoji."
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"required": ["emoji"],
|
|
14
|
+
"additionalProperties": false
|
|
15
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://identity.foundation/schemas/status/status",
|
|
4
|
+
"title": "StatusData",
|
|
5
|
+
"description": "Data shape for a status update.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"text": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"description": "The status text."
|
|
11
|
+
},
|
|
12
|
+
"emoji": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"description": "An optional emoji for the status."
|
|
15
|
+
},
|
|
16
|
+
"activity": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"enum": ["online", "away", "busy", "offline"],
|
|
19
|
+
"description": "An optional activity state."
|
|
20
|
+
},
|
|
21
|
+
"expiresAt": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"description": "An optional ISO 8601 expiration timestamp."
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"required": ["text"],
|
|
27
|
+
"additionalProperties": false
|
|
28
|
+
}
|
package/src/connect.ts
CHANGED
package/src/preferences.ts
CHANGED
|
@@ -90,13 +90,16 @@ export const PreferencesDefinition = {
|
|
|
90
90
|
},
|
|
91
91
|
structure: {
|
|
92
92
|
theme: {
|
|
93
|
-
$
|
|
93
|
+
$recordLimit : { max: 1, strategy: 'reject' },
|
|
94
|
+
$actions : [],
|
|
94
95
|
},
|
|
95
96
|
locale: {
|
|
96
|
-
$
|
|
97
|
+
$recordLimit : { max: 1, strategy: 'reject' },
|
|
98
|
+
$actions : [],
|
|
97
99
|
},
|
|
98
100
|
privacy: {
|
|
99
|
-
$
|
|
101
|
+
$recordLimit : { max: 1, strategy: 'reject' },
|
|
102
|
+
$actions : [],
|
|
100
103
|
},
|
|
101
104
|
notification: {
|
|
102
105
|
$actions : [],
|
package/src/profile.ts
CHANGED
|
@@ -90,19 +90,22 @@ export const ProfileDefinition = {
|
|
|
90
90
|
},
|
|
91
91
|
structure: {
|
|
92
92
|
profile: {
|
|
93
|
-
$
|
|
94
|
-
$
|
|
93
|
+
$recordLimit : { max: 1, strategy: 'reject' },
|
|
94
|
+
$size : { max: 10000 },
|
|
95
|
+
$actions : [
|
|
95
96
|
{ who: 'anyone', can: ['read'] },
|
|
96
97
|
],
|
|
97
98
|
avatar: {
|
|
98
|
-
$
|
|
99
|
-
$
|
|
99
|
+
$recordLimit : { max: 1, strategy: 'reject' },
|
|
100
|
+
$size : { max: 12582912 },
|
|
101
|
+
$actions : [
|
|
100
102
|
{ who: 'anyone', can: ['read'] },
|
|
101
103
|
],
|
|
102
104
|
},
|
|
103
105
|
hero: {
|
|
104
|
-
$
|
|
105
|
-
$
|
|
106
|
+
$recordLimit : { max: 1, strategy: 'reject' },
|
|
107
|
+
$size : { max: 25165824 },
|
|
108
|
+
$actions : [
|
|
106
109
|
{ who: 'anyone', can: ['read'] },
|
|
107
110
|
],
|
|
108
111
|
},
|