Last active
August 1, 2023 21:11
-
-
Save csuwildcat/ab2065f8ab4dc4cfbbca18f33ab3ebc4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
definition: { | |
protocol: "https://identity.foundation/protocols/person", | |
types: { | |
name: { | |
schema: "https://identity.foundation/schemas/person-name", | |
dataFormats: ["application/json"] | |
/* | |
{ | |
first: "", | |
last: "", | |
middle: "", | |
nickname: "", | |
handle: "" | |
} | |
*/ | |
}, | |
social: { | |
schema: "https://identity.foundation/schemas/person-social", | |
dataFormats: ["application/json"] | |
/* | |
{ | |
tagline: "", | |
bio: "", | |
website: "", | |
apps: { | |
twitter: "", | |
facebook: "", | |
instagram: "", | |
linkedin: "", | |
github: "", | |
tidal: "", | |
... | |
} | |
} | |
*/ | |
}, | |
messaging: { | |
schema: "https://identity.foundation/schemas/person-messaging", | |
dataFormats: ["application/json"] | |
/* | |
{ | |
email: "", | |
apps: { | |
twitter: "", | |
facebook: "", | |
instagram: "", | |
whatsapp: "", | |
wechat: "", | |
signal: "", | |
telegram: "", | |
... | |
} | |
} | |
*/ | |
}, | |
phone: { | |
schema: "https://identity.foundation/schemas/person-phone", | |
dataFormats: ["application/json"] | |
/* | |
{ | |
"countryCode": "", | |
"areaCode": "", | |
"localNumber": "", | |
"extension": "" | |
} | |
*/ | |
}, | |
address: { | |
schema: "https://identity.foundation/schemas/person-address", | |
dataFormats: ["application/json"] | |
/* | |
{ | |
street: "", | |
substreet: "", | |
locality: "", | |
region: "", | |
country: "", | |
countryCode: ISO 3166-1 alpha-2 | |
postalCode: "" | |
} | |
*/ | |
}, | |
icon: { | |
dataFormats: ["image/png", "jpeg", "gif"] | |
}, | |
avatar: { | |
dataFormats: ["image/png", "jpeg", "gif"] | |
}, | |
photo: { | |
dataFormats: ["image/png", "jpeg", "gif"] | |
} | |
}, | |
structure: { | |
name: { | |
$actions: [ | |
{ | |
who: "anyone", | |
can: "read" | |
}, | |
] | |
}, | |
social: { | |
$actions: [ | |
{ | |
who: "anyone", | |
can: "read" | |
} | |
] | |
}, | |
icon: { | |
$actions: [ | |
{ | |
who: "anyone", | |
can: "read" | |
} | |
] | |
}, | |
avatar: { | |
$actions: [ | |
{ | |
who: "anyone", | |
can: "read" | |
} | |
] | |
}, | |
photo: { | |
$actions: [ | |
{ | |
who: "anyone", | |
can: "read" | |
} | |
] | |
}, | |
messaging: {}, | |
address: {}, | |
phone: {} | |
} | |
} | |
} |
@csuwildcat my initial concern here is that since the objects are separated out, you will have to do many operations under a profile then some weird linking. I would suggest nesting the fields in a "profile" bucket, then you can query the profile object directly and get it's children for specific fields.
goes like:
- profile
- profile/name
- profile/address
graph TD
subgraph DWN
subgraph ProfileBucket
subgraph Profile1
name
address
end
subgraph Profile2
name2[name]
address2[address]
end
end
end
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
fyi: added JSON schemas for all the objects here: https://github.com/getZION/simple-web5-chat/pull/29/files