ticket.proto 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. syntax = "proto3";
  2. package ticket;
  3. // golang
  4. option go_package = "./ticket";
  5. // java
  6. option java_package = "com.gshopper.crm.ticket.v2";
  7. option java_outer_classname = "proto";
  8. import "google/protobuf/timestamp.proto";
  9. message EmailAddress {
  10. string address = 1 [json_name = "address"];
  11. string name = 2 [json_name = "name"];
  12. }
  13. message Attachment {
  14. string id = 1 [json_name = "id"];
  15. string filename = 2 [json_name = "filename"];
  16. string content_type = 3 [json_name = "content_type"];
  17. string content_encoding = 4 [json_name = "content_encoding"];
  18. }
  19. message AssistantRequest {
  20. string to = 1 [json_name = "to"];
  21. EmailAddress from = 2 [json_name = "from"];
  22. string subject = 3 [json_name = "subject"];
  23. google.protobuf.Timestamp date = 4 [json_name = "date"];
  24. string body = 5 [json_name = "body"];
  25. repeated Attachment attachments = 10 [json_name = "attachments"];
  26. }
  27. message AssistantCallback {
  28. EmailAddress to = 1 [json_name = "to"];
  29. string subject = 2 [json_name = "subject"];
  30. string body = 3 [json_name = "body"];
  31. }
  32. enum Flag {
  33. unknown = 0 [deprecated = true];
  34. SENT = 1;
  35. MODIFIED = 2;
  36. }
  37. message Message {
  38. enum Type {
  39. unknown = 0 [deprecated = true];
  40. TEXT = 1;
  41. EMAIL = 2;
  42. ASSISTANT_CALLBACK = 3;
  43. }
  44. string message_id = 1 [json_name = "message_id"];
  45. string ticket_id = 2 [json_name = "ticket_id"];
  46. string role = 3 [json_name = "role"];
  47. Type type = 4 [json_name = "type"];
  48. string content = 5 [json_name = "content"];
  49. google.protobuf.Timestamp date = 6 [json_name = "date"];
  50. bytes raw = 7 [json_name = "raw"];
  51. bytes flags = 8 [json_name = "flags"];
  52. map<string, string> headers = 10 [json_name = "headers"];
  53. map<string, string> meta = 11 [json_name = "meta"];
  54. }
  55. message Ticket {
  56. string ticket_id = 1 [json_name = "ticket_id"];
  57. string thread_id = 2 [json_name = "thread_id"];
  58. string to = 3 [json_name = "to"];
  59. EmailAddress from = 4 [json_name = "from"];
  60. bytes flags = 5 [json_name = "flags"];
  61. repeated Message messages = 10 [json_name = "messages"];
  62. map<string, string> meta = 11 [json_name = "meta"];
  63. repeated string tags = 12 [json_name = "tags"];
  64. }