Advertisement
Guest User

Untitled

a guest
Dec 12th, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.66 KB | None | 0 0
  1. syntax = "proto3";
  2.  
  3. option java_package = "com.skipz.grpc";
  4.  
  5. import "google/protobuf/empty.proto";
  6.  
  7. service OrdersServiceAuth {
  8. rpc getOrderStatus (GetOrderStatusRequest) returns (stream GetOrderStatusResponse);
  9.  
  10. rpc getNewOrderUuid (google.protobuf.Empty) returns (GetOrderUuidResponse);
  11.  
  12. rpc makePayment (MakePaymentRequest) returns (google.protobuf.Empty);
  13.  
  14. rpc makeOrder (MakeOrderRequest) returns (MakeOrderResponse);
  15.  
  16. rpc checkPayment (CheckPaymentRequest) returns (google.protobuf.Empty);
  17.  
  18. rpc getOrderInfo (GetOrderInfoRequest) returns (GetOrderInfoResponse);
  19.  
  20. rpc cancelOrder (CancelOrderRequest) returns (google.protobuf.Empty);
  21.  
  22. rpc arrivedNotification (ArrivedNotificationRequest) returns (google.protobuf.Empty);
  23.  
  24. rpc completeOrder (CompleteOrderRequest) returns (google.protobuf.Empty);
  25. }
  26.  
  27. service OrdersBusinessServiceAuth {
  28. rpc getCurrentOrders (google.protobuf.Empty) returns (stream GetCurrentOrdersResponse);
  29.  
  30. rpc getOrderBusinessInfo (GetOrderBusinessInfoRequest) returns (GetOrderBusinessInfoResponse);
  31.  
  32. rpc acceptOrder (AcceptOrderRequest) returns (google.protobuf.Empty);
  33.  
  34. rpc rejectOrder (RejectOrderRequest) returns (google.protobuf.Empty);
  35.  
  36. rpc completeOrder (CompleteOrderRequest) returns (google.protobuf.Empty);
  37.  
  38. rpc cancelOrder (CancelOrderRequest) returns (google.protobuf.Empty);
  39. }
  40.  
  41. message ArrivedNotificationRequest {
  42. string coordinates = 1;
  43. string orderUuid = 2;
  44. }
  45.  
  46. message MakeOrderRequest {
  47. string uuid = 1;
  48. string fromPointCoordinates = 2;
  49. string fromPointEnglishName = 3;
  50. string fromPointRussianName = 4;
  51. string toPointCoordinates = 5;
  52. string toPointEnglishName = 6;
  53. string toPointRussianName = 7;
  54.  
  55. repeated Product product = 8;
  56. string encodedRoute = 9;
  57. int32 issueTime = 10;
  58.  
  59. string pointUuid = 11;
  60. string routeType = 12;
  61. string promoCode = 13;
  62. string networkUuid = 14;
  63.  
  64. string pointCoordinates = 15;
  65.  
  66. message Product {
  67. string uuid = 1;
  68. string version = 2;
  69. int32 count = 3;
  70. repeated Option option = 4;
  71. repeated Ingredient ingredients = 5;
  72.  
  73. message Option {
  74. string type = 1;
  75. Ingredient ingredient = 2;
  76. }
  77.  
  78. message Ingredient {
  79. string uuid = 1;
  80. string version = 2;
  81. int32 count = 3;
  82. }
  83. }
  84. }
  85.  
  86. message MakeOrderResponse {
  87. int64 humanNumber = 1;
  88. }
  89.  
  90. message GetOrderStatusRequest {
  91. string orderUuid = 1;
  92. }
  93.  
  94. message GetOrderStatusResponse {
  95. string type = 1;
  96. string status = 2;
  97. string redirectUrl = 3;
  98. int64 issueDate = 4;
  99. }
  100.  
  101. message GetOrderUuidResponse {
  102. string uuid = 1;
  103. }
  104.  
  105. message MakePaymentRequest {
  106. string orderUuid = 1;
  107. string paymentToken = 2;
  108. double sum = 3;
  109. }
  110.  
  111. message CheckPaymentRequest {
  112. string orderUuid = 1;
  113. }
  114.  
  115. message GetOrderInfoRequest {
  116. string uuid = 1;
  117. string locale = 2;
  118. }
  119.  
  120. message GetOrderInfoResponse {
  121. string status = 1;
  122. string statusType = 2;
  123. string redirectUrl = 3;
  124.  
  125. double sum = 4;
  126.  
  127. Point point = 5;
  128.  
  129. repeated Product product = 6;
  130.  
  131. string fromPointName = 7;
  132. string fromPointCoordinates = 8;
  133.  
  134. string toPointName = 9;
  135. string toPointCoordinates = 10;
  136.  
  137. int64 humanNumber = 11;
  138. int64 issueDate = 12;
  139. int32 issueTime = 13;
  140.  
  141. message Point {
  142. string name = 1;
  143. string address = 2;
  144. string image = 3;
  145. repeated string categories = 4;
  146. string phone = 5;
  147. int32 priceCategory = 6;
  148.  
  149. string pointCoordinates = 7;
  150. }
  151.  
  152. message Product {
  153. string image = 1;
  154. string name = 2;
  155. int32 count = 3;
  156. double price = 4;
  157. repeated Option option = 5;
  158. repeated Ingredient ingredients = 6;
  159.  
  160. message Option {
  161. string type = 1;
  162. Ingredient ingredient = 2;
  163. }
  164.  
  165. message Ingredient {
  166. string name = 1;
  167. double price = 2;
  168. int32 count = 3;
  169. string image = 4;
  170. }
  171. }
  172. }
  173.  
  174. message CancelOrderRequest {
  175. string uuid = 1;
  176. string type = 2;
  177. string text = 3;
  178. }
  179.  
  180. message GetCurrentOrdersResponse {
  181. repeated Order order = 1;
  182.  
  183. message Order {
  184. string uuid = 1;
  185. string status = 2;
  186. int64 humanNumber = 3;
  187. int64 date = 4;
  188. int64 issueDate = 5;
  189. double sum = 6;
  190. string productsList = 7;
  191. }
  192. }
  193.  
  194. message GetOrderBusinessInfoRequest {
  195. string uuid = 1;
  196. }
  197.  
  198. message GetOrderBusinessInfoResponse {
  199. string status = 1;
  200. double sum = 2;
  201. int64 issueDate = 3;
  202. int32 issueTime = 4;
  203.  
  204. Point point = 5;
  205.  
  206. User user = 6;
  207.  
  208. repeated Product product = 7;
  209.  
  210. int64 humanNumber = 8;
  211.  
  212. message Point {
  213. string name = 1;
  214. string address = 2;
  215. string image = 3;
  216. }
  217.  
  218. message User {
  219. string phone = 1;
  220. }
  221.  
  222. message Product {
  223. string image = 1;
  224. string name = 2;
  225. int32 count = 3;
  226. double price = 4;
  227. repeated Option option = 5;
  228. repeated Ingredient ingredients = 6;
  229.  
  230. message Option {
  231. string type = 1;
  232. Ingredient ingredient = 2;
  233. }
  234.  
  235. message Ingredient {
  236. string name = 1;
  237. double price = 2;
  238. int32 count = 3;
  239. string image = 4;
  240. }
  241. }
  242. }
  243.  
  244. message AcceptOrderRequest {
  245. string uuid = 1;
  246. }
  247.  
  248. message RejectOrderRequest {
  249. string uuid = 1;
  250. }
  251.  
  252. message CompleteOrderRequest {
  253. string uuid = 1;
  254. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement