ticket.proto 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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. string bucket = 5 [json_name = "bucket"];
  19. string key = 6 [json_name = "key"];
  20. }
  21. message AssistantRequest {
  22. string to = 1 [json_name = "to"];
  23. EmailAddress from = 2 [json_name = "from"];
  24. string subject = 3 [json_name = "subject"];
  25. google.protobuf.Timestamp date = 4 [json_name = "date"];
  26. string body = 5 [json_name = "body"];
  27. repeated Attachment attachments = 10 [json_name = "attachments"];
  28. }
  29. message AssistantCallback {
  30. EmailAddress to = 1 [json_name = "to"];
  31. string subject = 2 [json_name = "subject"];
  32. string body = 3 [json_name = "body"];
  33. repeated Attachment attachments = 10 [json_name = "attachments"];
  34. }
  35. enum MessageFlag {
  36. unknown_message_flag = 0 [deprecated = true];
  37. SENT = 1;
  38. MODIFIED = 2;
  39. }
  40. enum TicketFlag {
  41. unknown_ticket_flag = 0 [deprecated = true];
  42. READ = 1;
  43. REPLIED = 2;
  44. HAS_MODIFIED_MESSAGE = 3;
  45. PROCESSING = 4;
  46. }
  47. message Message {
  48. enum Type {
  49. unknown = 0 [deprecated = true];
  50. TEXT = 1;
  51. EMAIL = 2;
  52. ASSISTANT_CALLBACK = 3;
  53. TICKET_WITH_REASON = 4;
  54. }
  55. string message_id = 1 [json_name = "message_id"];
  56. string ticket_id = 2 [json_name = "ticket_id"];
  57. string role = 3 [json_name = "role"];
  58. Type type = 4 [json_name = "type"];
  59. string content = 5 [json_name = "content"];
  60. google.protobuf.Timestamp date = 6 [json_name = "date"];
  61. bytes raw = 7 [json_name = "raw"];
  62. bytes flags = 8 [json_name = "flags"];
  63. map<string, string> headers = 10 [json_name = "headers"];
  64. map<string, string> meta = 11 [json_name = "meta"];
  65. repeated Attachment attachments = 12 [json_name = "attachments"];
  66. }
  67. message Ticket {
  68. string ticket_id = 1 [json_name = "ticket_id"];
  69. string thread_id = 2 [json_name = "thread_id"];
  70. string to = 3 [json_name = "to"];
  71. EmailAddress from = 4 [json_name = "from"];
  72. bytes flags = 5 [json_name = "flags"];
  73. google.protobuf.Timestamp created_at = 6 [json_name = "created_at"];
  74. google.protobuf.Timestamp updated_at = 7 [json_name = "updated_at"];
  75. uint32 version = 8 [json_name = "version"];
  76. repeated Message messages = 10 [json_name = "messages"];
  77. map<string, string> meta = 11 [json_name = "meta"];
  78. repeated string tags = 12 [json_name = "tags"];
  79. repeated string message_ids = 100 [json_name = "message_ids"];
  80. repeated string subjects = 101 [json_name = "subjects"];
  81. }