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: {} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@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.
https://github.com/getZION/simple-web5-chat/pull/29/commits/56969a32114c75330213f81261a1a892a6f7c251#diff-27191c763d7ee36d64d314e92b361c9e6d3743adc3f0a15656d95036d0dd2729R60
goes like: