blob: 3431a63ba39b7e4d9b7ade72b12fe3af9a928770 [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
80 oneof action {
81 ReplyAction reply_action = 1;
82 MoveAction move_action = 2;
83 MarkDuplicateAction mark_duplicate_action = 3;
84 UnmarkDuplicateAction unmark_duplicate_action = 4;
85 AttributeAction attribute_action = 5;
Adrià Vilanova Martínez752a40d2022-10-10 22:22:58 +020086 ReplyWithCRAction reply_with_cr_action = 6;
Adrià Vilanova Martínez41188592022-01-21 19:47:41 +010087 StarAction star_action = 16;
88 SubscribeAction subscribe_action = 17;
89 VoteAction vote_action = 18;
90 ReportAction report_action = 19;
91 }
92}
93
94message Workflow {
95 string name = 1;
96 string description = 2;
97 int32 index = 3;
98 repeated Action actions = 4;
99}