blob: dd10682654e2945c66f23f2793d0d5f65766b8a5 [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;
Adrià Vilanova Martínez78dcfdf2024-02-26 02:02:22 +010067 AA_SOFT_LOCK = 12;
68 AA_UNSOFT_LOCK = 13;
69 AA_EXCLUDE_FROM_GOLDEN = 14;
70 AA_UNEXCLUDE_FROM_GOLDEN = 15;
71 AA_INCLUDE_IN_GOLDEN = 16;
Adrià Vilanova Martínez41188592022-01-21 19:47:41 +010072 }
73 AttributeAction attribute_action = 1;
74 }
75
76 message ReportAction {
77 enum ReportType {
78 RT_UNKNOWN = 0;
79 RT_OFF_TOPIC = 1;
80 RT_ABUSE = 2;
81 }
82 ReportType report_type = 1;
83 }
84
Adrià Vilanova Martínez6c4739a2022-11-07 00:11:53 +010085 message MarkAsReadAction {}
86
87 message MarkAsUnreadAction {}
88
Adrià Vilanova Martínez41188592022-01-21 19:47:41 +010089 oneof action {
90 ReplyAction reply_action = 1;
91 MoveAction move_action = 2;
92 MarkDuplicateAction mark_duplicate_action = 3;
93 UnmarkDuplicateAction unmark_duplicate_action = 4;
94 AttributeAction attribute_action = 5;
Adrià Vilanova Martínez752a40d2022-10-10 22:22:58 +020095 ReplyWithCRAction reply_with_cr_action = 6;
Adrià Vilanova Martínez41188592022-01-21 19:47:41 +010096 StarAction star_action = 16;
97 SubscribeAction subscribe_action = 17;
98 VoteAction vote_action = 18;
99 ReportAction report_action = 19;
Adrià Vilanova Martínez6c4739a2022-11-07 00:11:53 +0100100 MarkAsReadAction mark_as_read_action = 20;
101 MarkAsUnreadAction mark_as_unread_action = 21;
Adrià Vilanova Martínez41188592022-01-21 19:47:41 +0100102 }
103}
104
105message Workflow {
106 string name = 1;
107 string description = 2;
108 int32 index = 3;
109 repeated Action actions = 4;
110}