syntax = "proto3"; package ticket; // golang option go_package = "./ticket"; // java option java_package = "com.gshopper.crm.ticket.v2"; option java_outer_classname = "proto"; import "google/protobuf/timestamp.proto"; message EmailAddress { string address = 1 [json_name = "address"]; string name = 2 [json_name = "name"]; } message Attachment { string id = 1 [json_name = "id"]; string filename = 2 [json_name = "filename"]; string content_type = 3 [json_name = "content_type"]; string content_encoding = 4 [json_name = "content_encoding"]; } message AssistantRequest { string to = 1 [json_name = "to"]; EmailAddress from = 2 [json_name = "from"]; string subject = 3 [json_name = "subject"]; google.protobuf.Timestamp date = 4 [json_name = "date"]; string body = 5 [json_name = "body"]; repeated Attachment attachments = 10 [json_name = "attachments"]; } message AssistantCallback { EmailAddress to = 1 [json_name = "to"]; string subject = 2 [json_name = "subject"]; string body = 3 [json_name = "body"]; } enum Flag { unknown = 0 [deprecated = true]; SENT = 1; MODIFIED = 2; } message Message { enum Type { unknown = 0 [deprecated = true]; TEXT = 1; EMAIL = 2; ASSISTANT_CALLBACK = 3; } string message_id = 1 [json_name = "message_id"]; string ticket_id = 2 [json_name = "ticket_id"]; string role = 3 [json_name = "role"]; Type type = 4 [json_name = "type"]; string content = 5 [json_name = "content"]; google.protobuf.Timestamp date = 6 [json_name = "date"]; bytes raw = 7 [json_name = "raw"]; bytes flags = 8 [json_name = "flags"]; map headers = 10 [json_name = "headers"]; map meta = 11 [json_name = "meta"]; } message Ticket { string ticket_id = 1 [json_name = "ticket_id"]; string thread_id = 2 [json_name = "thread_id"]; string to = 3 [json_name = "to"]; EmailAddress from = 4 [json_name = "from"]; bytes flags = 5 [json_name = "flags"]; repeated Message messages = 10 [json_name = "messages"]; map meta = 11 [json_name = "meta"]; repeated string tags = 12 [json_name = "tags"]; }