blob: 0230ca6f44e545345ad729bdad1624b339fe4d95 [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
30 message StarAction {
31 bool star = 1; // true stars, and false unstars.
32 }
33
34 message SubscribeAction {
35 bool subscribe = 1; // true subscribes, false unsubscribes.
36 }
37
38 message VoteAction {
39 enum Vote {
40 NONE = 0;
41 UP = 1;
42 DOWN = -1;
43 }
44 Vote vote = 1;
45 }
46
47 message AttributeAction {
48 enum AttributeAction {
49 AA_NONE = 0;
50 AA_LOCK = 1;
51 AA_UNLOCK = 2;
52 AA_PIN = 3;
53 AA_UNPIN = 4;
54 AA_NON_ISSUE = 5;
55 AA_OBSOLETE = 6;
56 AA_REVERT = 7;
57 AA_SET_TRENDING = 8;
58 AA_UNSET_TRENDING = 9;
59 AA_SET_ISSUE_RESOLVED = 10;
60 AA_UNSET_ISSUE_RESOLVED = 11;
61 }
62 AttributeAction attribute_action = 1;
63 }
64
65 message ReportAction {
66 enum ReportType {
67 RT_UNKNOWN = 0;
68 RT_OFF_TOPIC = 1;
69 RT_ABUSE = 2;
70 }
71 ReportType report_type = 1;
72 }
73
74 oneof action {
75 ReplyAction reply_action = 1;
76 MoveAction move_action = 2;
77 MarkDuplicateAction mark_duplicate_action = 3;
78 UnmarkDuplicateAction unmark_duplicate_action = 4;
79 AttributeAction attribute_action = 5;
80 StarAction star_action = 16;
81 SubscribeAction subscribe_action = 17;
82 VoteAction vote_action = 18;
83 ReportAction report_action = 19;
84 }
85}
86
87message Workflow {
88 string name = 1;
89 string description = 2;
90 int32 index = 3;
91 repeated Action actions = 4;
92}