blob: 660be5ed6112f447dada5ed0e5b249fd8bdaa8ee [file] [log] [blame]
Adrià Vilanova Martínez41188592022-01-21 19:47:41 +01001syntax = "proto3";
2
3package workflows;
4
5message Thread {
6 int64 forum_id = 1;
7 int64 thread_id = 2;
8}
9
10message Action {
11 message ReplyAction {
12 string payload = 1;
13 bool subscribe = 2;
14 bool mark_as_answer = 3;
15 }
16
17 message MoveAction {
18 int64 forum_id = 1;
19 string category = 2;
20 string language = 3;
21 map<string, string> property = 4;
22 }
23
24 message MarkDuplicateAction {
25 Thread destination = 1;
26 }
27
28 message UnmarkDuplicateAction {}
29
Adrià Vilanova Martínez752a40d2022-10-10 22:22:58 +020030 message ReplyWithCRAction {
31 int64 canned_response_id = 1;
32 bool subscribe = 2;
33 bool mark_as_answer = 3;
34 }
35
Adrià Vilanova Martínez41188592022-01-21 19:47:41 +010036 message StarAction {
37 bool star = 1; // true stars, and false unstars.
38 }
39
40 message SubscribeAction {
41 bool subscribe = 1; // true subscribes, false unsubscribes.
42 }
43
44 message VoteAction {
45 enum Vote {
46 NONE = 0;
47 UP = 1;
48 DOWN = -1;
49 }
50 Vote vote = 1;
51 }
52
53 message AttributeAction {
54 enum AttributeAction {
55 AA_NONE = 0;
56 AA_LOCK = 1;
57 AA_UNLOCK = 2;
58 AA_PIN = 3;
59 AA_UNPIN = 4;
60 AA_NON_ISSUE = 5;
61 AA_OBSOLETE = 6;
62 AA_REVERT = 7;
63 AA_SET_TRENDING = 8;
64 AA_UNSET_TRENDING = 9;
65 AA_SET_ISSUE_RESOLVED = 10;
66 AA_UNSET_ISSUE_RESOLVED = 11;
67 }
68 AttributeAction attribute_action = 1;
69 }
70
71 message ReportAction {
72 enum ReportType {
73 RT_UNKNOWN = 0;
74 RT_OFF_TOPIC = 1;
75 RT_ABUSE = 2;
76 }
77 ReportType report_type = 1;
78 }
79
Adrià Vilanova Martínez6c4739a2022-11-07 00:11:53 +010080 message MarkAsReadAction {}
81
82 message MarkAsUnreadAction {}
83
Adrià Vilanova Martínez41188592022-01-21 19:47:41 +010084 oneof action {
85 ReplyAction reply_action = 1;
86 MoveAction move_action = 2;
87 MarkDuplicateAction mark_duplicate_action = 3;
88 UnmarkDuplicateAction unmark_duplicate_action = 4;
89 AttributeAction attribute_action = 5;
Adrià Vilanova Martínez752a40d2022-10-10 22:22:58 +020090 ReplyWithCRAction reply_with_cr_action = 6;
Adrià Vilanova Martínez41188592022-01-21 19:47:41 +010091 StarAction star_action = 16;
92 SubscribeAction subscribe_action = 17;
93 VoteAction vote_action = 18;
94 ReportAction report_action = 19;
Adrià Vilanova Martínez6c4739a2022-11-07 00:11:53 +010095 MarkAsReadAction mark_as_read_action = 20;
96 MarkAsUnreadAction mark_as_unread_action = 21;
Adrià Vilanova Martínez41188592022-01-21 19:47:41 +010097 }
98}
99
100message Workflow {
101 string name = 1;
102 string description = 2;
103 int32 index = 3;
104 repeated Action actions = 4;
105}