Files
crowd-funder-from-jason/src/db/tables/contacts.ts
2025-06-19 19:06:37 -06:00

29 lines
812 B
TypeScript

export interface ContactMethod {
label: string;
type: string; // eg. "EMAIL", "SMS", "WHATSAPP", maybe someday "GOOGLE-CONTACT-API"
value: string;
}
export interface Contact {
//
// When adding a property, consider whether it should be added when exporting & sharing contacts.
did: string;
contactMethods?: Array<ContactMethod>;
name?: string;
nextPubKeyHashB64?: string; // base64-encoded SHA256 hash of next public key
notes?: string;
profileImageUrl?: string;
publicKeyBase64?: string;
seesMe?: boolean; // cached value of the server setting
registered?: boolean; // cached value of the server setting
}
export type ContactWithJsonStrings = Contact & {
contactMethods?: string;
};
export const ContactSchema = {
contacts: "&did, name", // no need to key by other things
};