@namespace("keybase.1") protocol userSearch { import idl "common.avdl"; import idl "contacts.avdl"; @typedef("string") record APIUserServiceID {} record APIUserKeybaseResult { string username; UID uid; @jsonkey("picture_url") union { null, string } pictureUrl; @jsonkey("full_name") union { null, string } fullName; @jsonkey("raw_score") double rawScore; union { null, string } stellar; @jsonkey("is_followee") boolean isFollowee; } record APIUserServiceResult { @jsonkey("service_name") APIUserServiceID serviceName; string username; @jsonkey("picture_url") string pictureUrl; string bio; string location; @jsonkey("full_name") string fullName; union { null, boolean } confirmed; } record APIUserServiceSummary { @jsonkey("service_name") APIUserServiceID serviceName; string username; } record ImpTofuSearchResult { string assertion; string assertionValue; // name string assertionKey; // service (phone/email) string label; string prettyName; string keybaseUsername; // keybase username if assertion resolves, empty if not } record APIUserSearchResult { double score; union { null, APIUserKeybaseResult } keybase; union { null, APIUserServiceResult } service; union { null, ProcessedContact } contact; union { null, ImpTofuSearchResult } imptofu; @jsonkey("services_summary") map servicesSummary; double rawScore; } record NonUserDetails { boolean isNonUser; string assertionValue; // name string assertionKey; // service string description; // "Twitter user", "Phone contact" union { null, ProcessedContact } contact; union { null, APIUserServiceResult } service; array siteIcon; array siteIconDarkmode; array siteIconFull; array siteIconFullDarkmode; } NonUserDetails getNonUserDetails(int sessionID, string assertion); array userSearch(string query, string service, int maxResults, boolean includeServicesSummary, boolean includeContacts); }