ticket.proto 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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 MessageFlag {
  33. unknown_message_flag = 0 [deprecated = true];
  34. SENT = 1;
  35. MODIFIED = 2;
  36. }
  37. enum TicketFlag {
  38. unknown_ticket_flag = 0 [deprecated = true];
  39. }
  40. message Message {
  41. enum Type {
  42. unknown = 0 [deprecated = true];
  43. TEXT = 1;
  44. EMAIL = 2;
  45. ASSISTANT_CALLBACK = 3;
  46. }
  47. string message_id = 1 [json_name = "message_id"];
  48. string ticket_id = 2 [json_name = "ticket_id"];
  49. string role = 3 [json_name = "role"];
  50. Type type = 4 [json_name = "type"];
  51. string content = 5 [json_name = "content"];
  52. google.protobuf.Timestamp date = 6 [json_name = "date"];
  53. bytes raw = 7 [json_name = "raw"];
  54. bytes flags = 8 [json_name = "flags"];
  55. map<string, string> headers = 10 [json_name = "headers"];
  56. map<string, string> meta = 11 [json_name = "meta"];
  57. }
  58. message Ticket {
  59. string ticket_id = 1 [json_name = "ticket_id"];
  60. string thread_id = 2 [json_name = "thread_id"];
  61. string to = 3 [json_name = "to"];
  62. EmailAddress from = 4 [json_name = "from"];
  63. bytes flags = 5 [json_name = "flags"];
  64. google.protobuf.Timestamp created_at = 6 [json_name = "created_at"];
  65. google.protobuf.Timestamp updated_at = 7 [json_name = "updated_at"];
  66. repeated Message messages = 10 [json_name = "messages"];
  67. map<string, string> meta = 11 [json_name = "meta"];
  68. repeated string tags = 12 [json_name = "tags"];
  69. }