nut.proto 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703
  1. syntax = "proto3";
  2. option java_multiple_files = true;
  3. option java_package = "com.github.saturn_xiv.palm.plugins.nut.v1";
  4. package palm.nut.v1;
  5. import "google/protobuf/empty.proto";
  6. import "google/protobuf/timestamp.proto";
  7. import "google/protobuf/duration.proto";
  8. // ----------------------------------------------------------------------------
  9. message IdRequest { int32 id = 1; }
  10. message Resource {
  11. string type = 1;
  12. optional int32 id = 2;
  13. }
  14. message Permission {
  15. oneof subject {
  16. string user = 1;
  17. string role = 2;
  18. }
  19. string operation = 11;
  20. Resource resource = 12;
  21. }
  22. // ----------------------------------------------------------------------------
  23. message Pager {
  24. int32 page = 1;
  25. int32 size = 2;
  26. }
  27. message Pagination {
  28. int32 page = 1;
  29. int32 size = 2;
  30. int32 total = 3;
  31. bool has_next = 11;
  32. bool has_previous = 12;
  33. }
  34. // ----------------------------------------------------------------------------
  35. message MediaContent {
  36. enum Editor {
  37. TEXTAREA = 0;
  38. QUILL = 1;
  39. }
  40. enum Status {
  41. Publish = 0;
  42. Draft = 1;
  43. Pending = 2;
  44. Private = 3;
  45. Future = 4;
  46. Trash = 99;
  47. }
  48. Editor editor = 1;
  49. string body = 2;
  50. Status status = 3;
  51. }
  52. // ----------------------------------------------------------------------------
  53. message SmsTask {
  54. string from = 1;
  55. repeated string to = 2;
  56. string body = 3;
  57. }
  58. message EmailTask {
  59. enum ContentType {
  60. TEXT_PLAIN = 0;
  61. TEXT_HTML = 1;
  62. }
  63. message Attachment {
  64. string name = 1;
  65. ContentType content_type = 2;
  66. bytes payload = 11;
  67. }
  68. string subject = 1;
  69. string body = 2;
  70. ContentType content_type = 3;
  71. string to = 11;
  72. repeated string cc = 12;
  73. repeated string bcc = 13;
  74. repeated Attachment attachments = 21;
  75. }
  76. // ----------------------------------------------------------------------------
  77. message UserDetail {
  78. string nick_name = 1;
  79. string real_name = 2;
  80. string home = 11;
  81. }
  82. service User {
  83. rpc SignIn(UserSignInRequest) returns (UserSignInResponse) {}
  84. rpc SignUp(UserSignUpRequest) returns (google.protobuf.Empty) {}
  85. rpc ConfirmByEmail(UserEmailRequest) returns (google.protobuf.Empty) {}
  86. rpc ConfirmByToken(UserTokenRequest) returns (google.protobuf.Empty) {}
  87. rpc UnlockByEmail(UserEmailRequest) returns (google.protobuf.Empty) {}
  88. rpc UnlockByToken(UserTokenRequest) returns (google.protobuf.Empty) {}
  89. rpc ForgotPassword(UserEmailRequest) returns (google.protobuf.Empty) {}
  90. rpc ResetPassword(UserResetPasswordRequest) returns (google.protobuf.Empty) {}
  91. rpc Refresh(google.protobuf.Duration) returns (UserSignInResponse) {}
  92. rpc Logs(UserLogsRequest) returns (UserLogsResponse) {}
  93. rpc SetProfile(UserSetProfileRequest) returns (google.protobuf.Empty) {}
  94. rpc ChangePassword(UserChangePasswordRequest)
  95. returns (google.protobuf.Empty) {}
  96. rpc SignOut(google.protobuf.Empty) returns (google.protobuf.Empty) {}
  97. rpc Index(Pager) returns (UserIndexResponse) {}
  98. rpc Show(UserQueryRequest) returns (UserIndexResponse.Item) {}
  99. rpc Disable(UserQueryRequest) returns (google.protobuf.Empty) {}
  100. rpc Enable(UserQueryRequest) returns (google.protobuf.Empty) {}
  101. rpc Lock(UserQueryRequest) returns (google.protobuf.Empty) {}
  102. rpc Unlock(UserQueryRequest) returns (google.protobuf.Empty) {}
  103. rpc Confirm(UserQueryRequest) returns (google.protobuf.Empty) {}
  104. rpc SetPassword(UserSetPasswordRequest) returns (google.protobuf.Empty) {}
  105. }
  106. message UserQueryRequest {
  107. message Provider {
  108. enum Type {
  109. EMAIL = 0;
  110. GMAIL = 1;
  111. WECHAT = 2;
  112. FACEBOOK = 3;
  113. GITHUB = 4;
  114. }
  115. Type type = 1;
  116. string id = 2;
  117. }
  118. oneof who {
  119. string uid = 1;
  120. string nick_name = 2;
  121. Provider provider = 3;
  122. }
  123. }
  124. message UserSignInRequest {
  125. UserQueryRequest query = 1;
  126. string password = 2;
  127. google.protobuf.Duration ttl = 11;
  128. }
  129. message UserSignInResponse {
  130. string token = 1;
  131. string real_name = 2;
  132. repeated string roles = 11;
  133. Permission permissions = 12;
  134. }
  135. message UserSignUpRequest {
  136. string real_name = 1;
  137. string nick_name = 2;
  138. string email = 3;
  139. string password = 4;
  140. string lang = 11;
  141. string time_zone = 12;
  142. string home = 21;
  143. }
  144. message UserEmailRequest {
  145. UserQueryRequest query = 1;
  146. string home = 9;
  147. }
  148. message UserTokenRequest { string token = 1; }
  149. message UserResetPasswordRequest {
  150. string token = 1;
  151. string password = 2;
  152. }
  153. message UserSetPasswordRequest {
  154. int32 user = 1;
  155. string password = 2;
  156. }
  157. message UserSetProfileRequest {
  158. string real_name = 1;
  159. string avatar = 2;
  160. string time_zone = 8;
  161. string lang = 9;
  162. string wechat = 11;
  163. string phone = 12;
  164. }
  165. message UserGetProfileResponse {
  166. string real_name = 1;
  167. string avatar = 2;
  168. string nick_name = 3;
  169. string email = 4;
  170. string time_zone = 8;
  171. string lang = 9;
  172. string wechat = 11;
  173. string phone = 12;
  174. }
  175. message UserLogsRequest {
  176. Pager pager = 1;
  177. optional UserLogsResponse.Item.Level level = 11;
  178. optional string ip = 12;
  179. }
  180. message UserLogsResponse {
  181. message Item {
  182. enum Level {
  183. DEBUG = 0;
  184. INFO = 1;
  185. WARNING = 2;
  186. ERROR = 3;
  187. PANIC = 4;
  188. }
  189. int32 id = 1;
  190. int32 user_id = 2;
  191. string ip = 3;
  192. Level level = 4;
  193. string message = 5;
  194. Resource resource = 6;
  195. google.protobuf.Timestamp created_at = 11;
  196. }
  197. Pagination pagination = 1;
  198. repeated Item items = 11;
  199. }
  200. message UserChangePasswordRequest {
  201. string current_password = 1;
  202. string new_password = 2;
  203. }
  204. message UserIndexResponse {
  205. message Item {
  206. int32 id = 1;
  207. string uid = 2;
  208. string email = 3;
  209. string nick_name = 4;
  210. string real_name = 5;
  211. string provider_type = 6;
  212. google.protobuf.Timestamp updated_at = 9;
  213. optional google.protobuf.Timestamp last_sign_in_at = 11;
  214. optional string last_sign_in_ip = 12;
  215. optional google.protobuf.Timestamp current_sign_in_at = 13;
  216. optional string current_sign_in_ip = 14;
  217. int32 sign_in_count = 19;
  218. string lang = 21;
  219. string time_zone = 22;
  220. string avatar = 23;
  221. optional google.protobuf.Timestamp confirmed_at = 27;
  222. optional google.protobuf.Timestamp locked_at = 28;
  223. optional google.protobuf.Timestamp deleted_at = 29;
  224. }
  225. Pagination pagination = 1;
  226. repeated Item items = 11;
  227. }
  228. // ----------------------------------------------------------------------------
  229. service Attachment {
  230. rpc Index(Pager) returns (AttachmetIndexResponse) {}
  231. rpc Destroy(IdRequest) returns (google.protobuf.Empty) {}
  232. rpc Show(AttachemtShowRequest) returns (AttachemtShowResponse) {}
  233. }
  234. message AttachemtShowRequest {
  235. int32 id = 1;
  236. google.protobuf.Duration ttl = 2;
  237. }
  238. message AttachemtShowResponse {
  239. AttachmetIndexResponse.Item item = 1;
  240. string url = 2;
  241. }
  242. message AttachmetIndexResponse {
  243. message Item {
  244. int32 id = 1;
  245. string bucket = 2;
  246. string name = 3;
  247. string title = 4;
  248. int64 size = 5;
  249. string content_type = 6;
  250. string region = 7;
  251. MediaContent.Status status = 8;
  252. google.protobuf.Timestamp updated_at = 11;
  253. }
  254. Pagination pagination = 1;
  255. repeated Item items = 11;
  256. }
  257. // ----------------------------------------------------------------------------
  258. service Policy {
  259. rpc GetAllRoles(google.protobuf.Empty) returns (PolicyRoleListResponse) {}
  260. rpc GetAllUsers(google.protobuf.Empty) returns (PolicyUserListResponse) {}
  261. rpc DeleteUser(PolicyUserRequest) returns (google.protobuf.Empty) {}
  262. rpc DeleteRole(PolicyRoleRequest) returns (google.protobuf.Empty) {}
  263. rpc GetRolesForUser(PolicyUserRequest) returns (PolicyRoleListResponse) {}
  264. rpc GetUsersForRole(PolicyRoleRequest) returns (PolicyUserListResponse) {}
  265. rpc AddRolesForUser(PolicyAddRolesForUserRequest)
  266. returns (google.protobuf.Empty) {}
  267. rpc DeleteRolesForUser(PolicyDeleteRolesForUserRequest)
  268. returns (google.protobuf.Empty) {}
  269. rpc GetImplicitRolesForUser(PolicyUserRequest)
  270. returns (PolicyRoleListResponse) {}
  271. rpc GetImplicitUsersForRole(PolicyRoleRequest)
  272. returns (PolicyRoleListResponse) {}
  273. rpc GetPermissionsForUser(PolicyUserRequest)
  274. returns (PolicyPermissionsResponse) {}
  275. rpc GetPermissionsForRole(PolicyRoleRequest)
  276. returns (PolicyPermissionsResponse) {}
  277. rpc GetImplicitPermissionsForUser(PolicyUserRequest)
  278. returns (PolicyPermissionsResponse) {}
  279. rpc GetImplicitPermissionsForRole(PolicyRoleRequest)
  280. returns (PolicyPermissionsResponse) {}
  281. rpc GetImplicitResourcesForUser(PolicyUserRequest)
  282. returns (PolicyResourceResponse) {}
  283. rpc GetImplicitResourcesForRole(PolicyRoleRequest)
  284. returns (PolicyResourceResponse) {}
  285. rpc AddPermissions(PolicyPermissionsRequest) returns (google.protobuf.Empty) {
  286. }
  287. rpc DeletePermissions(PolicyPermissionsRequest)
  288. returns (google.protobuf.Empty) {}
  289. }
  290. message PolicyUserRequest { string code = 1; }
  291. message PolicyUserListResponse { repeated string items = 1; }
  292. message PolicyRoleRequest { string code = 1; }
  293. message PolicyRoleListResponse { repeated string items = 1; }
  294. message PolicyAddRolesForUserRequest {
  295. string user = 1;
  296. repeated string roles = 2;
  297. google.protobuf.Timestamp not_before = 11;
  298. google.protobuf.Timestamp expired_at = 12;
  299. }
  300. message PolicyDeleteRolesForUserRequest {
  301. string user = 1;
  302. repeated string roles = 2;
  303. }
  304. message PolicyPermissionsRequest { repeated Permission items = 1; }
  305. message PolicyPermissionsResponse { repeated Permission items = 1; }
  306. message PolicyResourceResponse { repeated Resource items = 1; }
  307. // ----------------------------------------------------------------------------
  308. // ----------------------------------------------------------------------------
  309. service Locale {
  310. rpc Set(LocaleSetRequest) returns (google.protobuf.Empty) {}
  311. rpc Get(LocaleGetRequest) returns (LocaleIndexResponse.Item) {}
  312. rpc Index(Pager) returns (LocaleIndexResponse) {}
  313. rpc Destroy(IdRequest) returns (google.protobuf.Empty) {}
  314. }
  315. message LocaleIndexResponse {
  316. message Item {
  317. int32 id = 1;
  318. string lang = 2;
  319. string code = 3;
  320. string message = 4;
  321. google.protobuf.Timestamp updated_at = 9;
  322. }
  323. repeated Item items = 1;
  324. Pagination pagination = 9;
  325. }
  326. message LocaleGetRequest {
  327. string lang = 1;
  328. string code = 2;
  329. }
  330. message LocaleSetRequest {
  331. string lang = 1;
  332. string code = 2;
  333. string message = 3;
  334. }
  335. // ----------------------------------------------------------------------------
  336. service Setting {
  337. rpc Set(SettingSetRequest) returns (google.protobuf.Empty) {}
  338. rpc Get(SettingGetRequest) returns (SettingGetResponse) {}
  339. }
  340. message SettingGetResponse { bytes value = 1; }
  341. message SettingGetRequest {
  342. optional int32 user = 1;
  343. string key = 2;
  344. }
  345. message SettingSetRequest {
  346. optional int32 user = 1;
  347. string key = 2;
  348. bytes value = 3;
  349. bool encrypt = 9;
  350. }
  351. // ----------------------------------------------------------------------------
  352. // ----------------------------------------------------------------------------
  353. service Site {
  354. rpc SetMaintenanceMode(SiteMaintenanceModeRequest)
  355. returns (google.protobuf.Empty) {}
  356. rpc Install(SiteInstallRequest) returns (google.protobuf.Empty) {}
  357. rpc ClearCache(google.protobuf.Empty) returns (google.protobuf.Empty) {}
  358. rpc Layout(google.protobuf.Empty) returns (SiteLayoutResponse) {}
  359. rpc SetAuthor(SiteLayoutResponse.Author) returns (google.protobuf.Empty) {}
  360. rpc SetCopyright(SiteSetCopyrightRequest) returns (google.protobuf.Empty) {}
  361. rpc SetKeywords(SiteSetKeywordsRequest) returns (google.protobuf.Empty) {}
  362. rpc SetInfo(SiteSetInfoRequest) returns (google.protobuf.Empty) {}
  363. rpc SetLogo(SiteSetLogoRequest) returns (google.protobuf.Empty) {}
  364. rpc SetAws(AwsProfile) returns (google.protobuf.Empty) {}
  365. rpc GetAws(google.protobuf.Empty) returns (AwsProfile) {}
  366. rpc TestAwsS3(google.protobuf.Empty) returns (SiteAwsS3TestResponse) {}
  367. rpc SetSmtp(SmtpProfile) returns (google.protobuf.Empty) {}
  368. rpc GetSmtp(google.protobuf.Empty) returns (SmtpProfile) {}
  369. rpc TestSmtp(SiteSmtpTestRequst) returns (google.protobuf.Empty) {}
  370. rpc SetBing(BingProfile) returns (google.protobuf.Empty) {}
  371. rpc GetBing(google.protobuf.Empty) returns (BingProfile) {}
  372. rpc SetGoogle(GoogleProfile) returns (google.protobuf.Empty) {}
  373. rpc GetGoogle(google.protobuf.Empty) returns (GoogleProfile) {}
  374. rpc SetBaidu(BaiduProfile) returns (google.protobuf.Empty) {}
  375. rpc GetBaidu(google.protobuf.Empty) returns (BaiduProfile) {}
  376. rpc Status(google.protobuf.Empty) returns (SiteStatusResponse) {}
  377. rpc NewLeaveWord(SiteNewLeaveWordRequest) returns (google.protobuf.Empty) {}
  378. rpc IndexLeaveWord(Pager) returns (SiteIndexLeaveWordResponse) {}
  379. rpc DestroyLeaveWord(IdRequest) returns (google.protobuf.Empty) {}
  380. rpc IndexNotification(Pager) returns (SiteIndexNotificationResponse) {}
  381. }
  382. message SiteMaintenanceModeRequest {
  383. message Item {
  384. google.protobuf.Duration duration = 1;
  385. string reason = 2;
  386. }
  387. optional Item item = 1;
  388. }
  389. message SiteInstallRequest { UserSignUpRequest user = 1; }
  390. message AwsProfile {
  391. string region = 1;
  392. optional string endpoint = 2;
  393. string access_key_id = 3;
  394. string secret_access_key = 4;
  395. }
  396. message SiteAwsS3TestResponse { repeated string buckets = 1; }
  397. message SiteSmtpTestRequst {
  398. string to = 1;
  399. string subject = 2;
  400. string body = 3;
  401. }
  402. message SiteSetLogoRequest { string url = 1; }
  403. message SiteSetCopyrightRequest { string payload = 1; }
  404. message SiteSetKeywordsRequest { repeated string items = 1; }
  405. message SiteSetInfoRequest {
  406. string title = 1;
  407. string subhead = 2;
  408. string description = 3;
  409. }
  410. message SiteLayoutResponse {
  411. message Author {
  412. string name = 1;
  413. string email = 2;
  414. }
  415. string title = 1;
  416. string subhead = 2;
  417. repeated string keywords = 3;
  418. string description = 4;
  419. Author author = 5;
  420. string copyright = 6;
  421. string logo = 7;
  422. repeated string languages = 9;
  423. }
  424. message SiteNewLeaveWordRequest { string body = 1; }
  425. message SiteIndexLeaveWordResponse {
  426. message Item {
  427. int32 id = 1;
  428. string lang = 2;
  429. string ip = 3;
  430. string body = 4;
  431. google.protobuf.Timestamp created_at = 9;
  432. }
  433. repeated Item items = 1;
  434. Pagination pagination = 9;
  435. }
  436. message GoogleProfile {
  437. // https://developers.google.com/recaptcha/intro
  438. message ReCaptcha {
  439. string site_key = 1;
  440. string secret = 2;
  441. }
  442. optional string site_verify_id = 1;
  443. optional ReCaptcha re_captcha = 2;
  444. }
  445. message BaiduProfile {
  446. message SiteVerify {
  447. string id = 1;
  448. string content = 2;
  449. }
  450. optional SiteVerify site_verify = 1;
  451. }
  452. message BingProfile { optional string site_verify_id = 1; }
  453. message SmtpProfile {
  454. string host = 1;
  455. uint32 port = 2;
  456. string user = 3;
  457. string password = 4;
  458. string cc = 5;
  459. string bcc = 6;
  460. }
  461. message SiteIndexNotificationResponse {
  462. message Item {
  463. oneof message {
  464. EmailTask email = 1;
  465. SmsTask sms = 2;
  466. }
  467. google.protobuf.Timestamp created_at = 19;
  468. }
  469. repeated Item items = 1;
  470. Pagination pagination = 9;
  471. }
  472. message SiteStatusResponse {
  473. message Database {
  474. string name = 1;
  475. string size = 2;
  476. }
  477. message PostgreSql {
  478. string version = 1;
  479. google.protobuf.Timestamp now = 2;
  480. repeated Database databases = 9;
  481. }
  482. message MySql {
  483. uint64 size = 1;
  484. string version = 2;
  485. }
  486. message Redis {
  487. message Item {
  488. string key = 1;
  489. int64 ttl = 2;
  490. };
  491. string info = 1;
  492. repeated Item items = 2;
  493. }
  494. message RabbitMq { string protocol = 1; }
  495. message OpenSearch {
  496. string url = 1;
  497. string info = 2;
  498. }
  499. message Health {
  500. string name = 1;
  501. string status = 2;
  502. }
  503. message System {
  504. string version = 1;
  505. string cpu = 2;
  506. string memory = 3;
  507. string boot = 4;
  508. string disk = 5;
  509. string load = 6;
  510. string fs = 7;
  511. string swap = 8;
  512. string uptime = 9;
  513. string network = 10;
  514. }
  515. PostgreSql postgresql = 1;
  516. MySql mysql = 2;
  517. Redis redis = 3;
  518. RabbitMq rabbitmq = 4;
  519. OpenSearch opensearch = 5;
  520. System system = 11;
  521. repeated Health healthes = 21;
  522. }
  523. // ----------------------------------------------------------------------------
  524. service ShorterLink {
  525. rpc Create(ShorterLinkCreateRequest) returns (google.protobuf.Empty) {}
  526. rpc Update(ShorterLinkUpdateRequest) returns (google.protobuf.Empty) {}
  527. rpc Destroy(IdRequest) returns (google.protobuf.Empty) {}
  528. rpc Index(Pager) returns (ShorterLinkIndexResponse) {}
  529. }
  530. message ShorterLinkIndexResponse {
  531. message Item {
  532. int32 id = 1;
  533. string url = 2;
  534. string details = 3;
  535. google.protobuf.Timestamp updated_at = 11;
  536. }
  537. Pagination pagination = 1;
  538. repeated Item items = 11;
  539. }
  540. message ShorterLinkCreateRequest {
  541. string url = 1;
  542. string details = 2;
  543. }
  544. message ShorterLinkUpdateRequest {
  545. int32 id = 1;
  546. string url = 2;
  547. string details = 3;
  548. }
  549. // ----------------------------------------------------------------------------
  550. service Tag {
  551. rpc Create(TagCreateRequest) returns (google.protobuf.Empty) {}
  552. rpc Update(TagUpdateRequest) returns (google.protobuf.Empty) {}
  553. rpc Destroy(IdRequest) returns (google.protobuf.Empty) {}
  554. rpc Index(google.protobuf.Empty) returns (TagIndexResponse) {}
  555. }
  556. message TagIndexResponse {
  557. message Item {
  558. int32 id = 1;
  559. string code = 2;
  560. int32 priority = 3;
  561. google.protobuf.Timestamp updated_at = 11;
  562. }
  563. repeated Item items = 1;
  564. }
  565. message TagCreateRequest {
  566. string code = 1;
  567. int32 priority = 11;
  568. }
  569. message TagUpdateRequest {
  570. int32 id = 1;
  571. string code = 2;
  572. int32 priority = 11;
  573. }
  574. // ----------------------------------------------------------------------------
  575. service Category {
  576. rpc Create(CategoryCreateRequest) returns (google.protobuf.Empty) {}
  577. rpc Update(CategoryUpdateRequest) returns (google.protobuf.Empty) {}
  578. rpc Destroy(IdRequest) returns (google.protobuf.Empty) {}
  579. rpc Index(Pager) returns (CategoryIndexResponse) {}
  580. }
  581. message CategoryIndexResponse {
  582. message Item {
  583. int32 id = 1;
  584. string code = 2;
  585. optional int32 parent_id = 3;
  586. int32 priority = 4;
  587. google.protobuf.Timestamp updated_at = 11;
  588. }
  589. Pagination pagination = 1;
  590. repeated Item items = 11;
  591. }
  592. message CategoryCreateRequest {
  593. string lang = 1;
  594. string code = 2;
  595. optional int32 parent_id = 3;
  596. int32 priority = 11;
  597. }
  598. message CategoryUpdateRequest {
  599. int32 id = 1;
  600. string code = 2;
  601. optional int32 parent_id = 3;
  602. int32 priority = 11;
  603. }
  604. // ----------------------------------------------------------------------------