@namespace("keybase.1") protocol phoneNumbers { import idl "common.avdl"; /** Phone number support for TOFU chats. */ record UserPhoneNumber { @jsonkey("phone_number") PhoneNumber phoneNumber; @jsonkey("verified") boolean verified; @jsonkey("superseded") boolean superseded; @jsonkey("visibility") IdentityVisibility visibility; @jsonkey("ctime") UnixTime ctime; } record PhoneNumberLookupResult { @jsonkey("phone_number") RawPhoneNumber phoneNumber; @jsonkey("coerced_phone_number") PhoneNumber coercedPhoneNumber; @jsonkey("err") union { null, string } err; @jsonkey("uid") union { null, UID } uid; } void addPhoneNumber(int sessionID, PhoneNumber phoneNumber, IdentityVisibility visibility); void editPhoneNumber(int sessionID, PhoneNumber oldPhoneNumber, PhoneNumber phoneNumber, IdentityVisibility visibility); void verifyPhoneNumber(int sessionID, PhoneNumber phoneNumber, string code); void resendVerificationForPhoneNumber(int sessionID, PhoneNumber phoneNumber); array getPhoneNumbers(int sessionID); void deletePhoneNumber(int sessionID, PhoneNumber phoneNumber); void setVisibilityPhoneNumber(int sessionID, PhoneNumber phoneNumber, IdentityVisibility visibility); void setVisibilityAllPhoneNumber(int sessionID, IdentityVisibility visibility); // Notification from gregor when phone number changes it's state. It is sent // to clients when phone number is either added, deleted, changes its publicity // setting or is superseded. record PhoneNumberChangedMsg { @jsonkey("phone") PhoneNumber phoneNumber; } }