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