@aepstore-dev/contracts 1.64.0 → 1.66.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,170 +1,227 @@
1
- syntax = "proto3";
2
-
3
- package support.v1;
4
-
5
- // Support ticket system (G1). Enums as strings matching the DB
6
- // (status OPEN|PENDING|IN_PROGRESS|RESOLVED|CLOSED; category/priority).
7
- service SupportService {
8
- rpc Ping(PingRequest) returns (PingResponse); // health
9
-
10
- // user
11
- rpc CreateTicket(CreateTicketRequest) returns (Ticket);
12
- rpc GetTicket(GetTicketRequest) returns (TicketWithMessages);
1
+ syntax = "proto3";
2
+
3
+ package support.v1;
4
+
5
+ // Support ticket system (G1). Enums as strings matching the DB
6
+ // (status OPEN|PENDING|IN_PROGRESS|RESOLVED|CLOSED; category/priority).
7
+ service SupportService {
8
+ rpc Ping(PingRequest) returns (PingResponse); // health
9
+
10
+ // user
11
+ rpc CreateTicket(CreateTicketRequest) returns (Ticket);
12
+ rpc GetTicket(GetTicketRequest) returns (TicketWithMessages);
13
13
  rpc ListMyTickets(ListMyTicketsRequest) returns (TicketsListResponse);
14
14
  rpc ReplyTicket(ReplyTicketRequest) returns (TicketMessage);
15
15
  rpc CloseTicket(CloseTicketRequest) returns (Ticket);
16
-
17
- // staff/admin
18
- rpc ListTickets(ListTicketsRequest) returns (TicketsListResponse);
19
- rpc AssignTicket(AssignTicketRequest) returns (Ticket);
20
- rpc SetTicketStatus(SetTicketStatusRequest) returns (Ticket);
21
- rpc DeleteTicket(DeleteTicketRequest) returns (Ticket);
22
- rpc UpdateTicketMessage(UpdateTicketMessageRequest) returns (TicketMessage);
23
- rpc DeleteTicketMessage(DeleteTicketMessageRequest) returns (TicketMessage);
24
- }
25
-
26
- message PingRequest { string message = 1; }
27
- message PingResponse { bool ok = 1; string message = 2; }
28
-
29
- message Ticket {
30
- string id = 1;
31
- string author_id = 2;
32
- string subject = 3;
33
- string category = 4; // GENERAL|PAYMENT|WITHDRAWAL|PRODUCT|ACCOUNT|ABUSE|OTHER
34
- string status = 5; // OPEN|PENDING|IN_PROGRESS|RESOLVED|CLOSED
35
- string priority = 6; // LOW|NORMAL|HIGH|URGENT
36
- string purchase_id = 7;
37
- string withdrawal_id = 8;
38
- string assignee_id = 9;
39
- string last_message_at = 10;
40
- string created_at = 11;
41
- string updated_at = 12;
42
- int32 messages_count = 13;
43
- string department = 14; // GENERAL|TECHNICAL|SALES
44
- string product_category_id = 15; // optional
45
- string related_product_id = 16; // optional
46
- string related_product_type = 17; // PURCHASED|SELLING
16
+ rpc ReopenTicket(ReopenTicketRequest) returns (ReopenTicketResponse);
17
+ rpc ReportTicket(ReportTicketRequest) returns (SupportTicketComplaint);
18
+ rpc RateTicket(RateTicketRequest) returns (SupportTicketRating);
19
+
20
+ // staff/admin
21
+ rpc ListTickets(ListTicketsRequest) returns (TicketsListResponse);
22
+ rpc AssignTicket(AssignTicketRequest) returns (Ticket);
23
+ rpc SetTicketStatus(SetTicketStatusRequest) returns (Ticket);
24
+ rpc DeleteTicket(DeleteTicketRequest) returns (Ticket);
25
+ rpc UpdateTicketMessage(UpdateTicketMessageRequest) returns (TicketMessage);
26
+ rpc DeleteTicketMessage(DeleteTicketMessageRequest) returns (TicketMessage);
27
+ }
28
+
29
+ message PingRequest { string message = 1; }
30
+ message PingResponse { bool ok = 1; string message = 2; }
31
+
32
+ message Ticket {
33
+ string id = 1;
34
+ string author_id = 2;
35
+ string subject = 3;
36
+ string category = 4; // GENERAL|PAYMENT|WITHDRAWAL|PRODUCT|ACCOUNT|ABUSE|OTHER
37
+ string status = 5; // OPEN|PENDING|IN_PROGRESS|RESOLVED|CLOSED
38
+ string priority = 6; // LOW|NORMAL|HIGH|URGENT
39
+ string purchase_id = 7;
40
+ string withdrawal_id = 8;
41
+ string assignee_id = 9;
42
+ string last_message_at = 10;
43
+ string created_at = 11;
44
+ string updated_at = 12;
45
+ int32 messages_count = 13;
46
+ string department = 14; // GENERAL|TECHNICAL|SALES
47
+ string product_category_id = 15; // optional
48
+ string related_product_id = 16; // optional
49
+ string related_product_type = 17; // PURCHASED|SELLING
47
50
  bool rules_accepted = 18;
48
51
  string rules_accepted_at = 19;
49
52
  string deleted_at = 20;
50
- }
51
-
52
- message TicketMessage {
53
- string id = 1;
54
- string ticket_id = 2;
55
- string author_id = 3;
56
- string body = 4;
57
- bool is_staff = 5;
58
- bool is_internal = 6;
59
- string created_at = 7;
60
- bool is_system = 8; // автосообщение платформы
61
- repeated TicketAttachment attachments = 9;
62
- string edited_at = 10; // '' если не редактировалось
63
- }
64
-
65
- message TicketAttachment {
66
- string file_name = 1;
67
- int64 file_size = 2;
68
- string url = 3; // presigned GET, короткоживущая; в запросах пусто
69
- string storage_key = 4; // только внутрь (reply), наружу не отдаётся
53
+ int32 rating = 21; // 0 if the current user has not rated it
54
+ bool has_complaint = 22; // true if the current user has already reported it
55
+ }
56
+
57
+ message TicketMessage {
58
+ string id = 1;
59
+ string ticket_id = 2;
60
+ string author_id = 3;
61
+ string body = 4;
62
+ bool is_staff = 5;
63
+ bool is_internal = 6;
64
+ string created_at = 7;
65
+ bool is_system = 8; // автосообщение платформы
66
+ repeated TicketAttachment attachments = 9;
67
+ string edited_at = 10; // '' если не редактировалось
68
+ // Отображаемое имя автора: агент — «Имя Ф.» из fullName (фолбэк username),
69
+ // клиент username, системное — ''.
70
+ string author_name = 11;
71
+ }
72
+
73
+ message TicketAttachment {
74
+ string file_name = 1;
75
+ int64 file_size = 2;
76
+ string url = 3; // presigned GET, короткоживущая; в запросах пусто
77
+ string storage_key = 4; // только внутрь (reply), наружу не отдаётся
78
+ string mime_type = 5;
70
79
  }
71
80
 
72
81
  message UpdateTicketMessageRequest {
73
- string message_id = 1;
82
+ string message_id = 1;
83
+ string requester_id = 2;
84
+ bool is_staff = 3;
85
+ string body = 4;
86
+ }
87
+
88
+ message DeleteTicketMessageRequest {
89
+ string message_id = 1;
90
+ string requester_id = 2;
91
+ bool is_staff = 3;
92
+ }
93
+
94
+ message TicketWithMessages {
95
+ Ticket ticket = 1;
96
+ repeated TicketMessage messages = 2;
97
+ }
98
+
99
+ message CreateTicketRequest {
100
+ string author_id = 1;
101
+ string subject = 2;
102
+ string category = 3;
103
+ string body = 4; // first message
104
+ string purchase_id = 5; // optional
105
+ string withdrawal_id = 6; // optional
106
+ string priority = 7; // LOW|NORMAL|HIGH|URGENT
107
+ string department = 8; // GENERAL|TECHNICAL|SALES
108
+ string product_category_id = 9; // optional
109
+ string related_product_id = 10; // optional
110
+ string related_product_type = 11; // PURCHASED|SELLING
111
+ bool rules_accepted = 12;
112
+ repeated TicketAttachment attachments = 13; // storage_key+file_name+file_size+mime_type
113
+ }
114
+
115
+ message GetTicketRequest {
116
+ string id = 1;
117
+ string requester_id = 2;
118
+ bool is_staff = 3; // staff see internal notes + any ticket
119
+ }
120
+
121
+ message ListMyTicketsRequest {
122
+ string author_id = 1;
123
+ string status = 2; // single value OR comma-separated (e.g. "OPEN,PENDING,IN_PROGRESS")
124
+ int32 page = 3;
125
+ int32 limit = 4;
126
+ string department = 5; // GENERAL|TECHNICAL|SALES
127
+ string category = 6; // GENERAL|PAYMENT|...
128
+ string search = 7; // contains in subject OR in any message body
129
+ string date_from = 8; // ISO; inclusive lower bound on createdAt
130
+ string date_to = 9; // ISO; inclusive upper bound on createdAt
131
+ }
132
+
133
+ message ReplyTicketRequest {
134
+ string ticket_id = 1;
135
+ string author_id = 2;
136
+ string body = 3;
137
+ bool is_staff = 4;
138
+ bool is_internal = 5; // staff-only note
139
+ repeated TicketAttachment attachments = 6; // storage_key+file_name+file_size
140
+ }
141
+
142
+ message CloseTicketRequest {
143
+ string ticket_id = 1;
74
144
  string requester_id = 2;
75
145
  bool is_staff = 3;
76
- string body = 4;
77
146
  }
78
147
 
79
- message DeleteTicketMessageRequest {
80
- string message_id = 1;
148
+ message ReopenTicketRequest {
149
+ string ticket_id = 1;
81
150
  string requester_id = 2;
82
- bool is_staff = 3;
151
+ string body = 3;
152
+ repeated TicketAttachment attachments = 4;
83
153
  }
84
154
 
85
- message TicketWithMessages {
155
+ message ReopenTicketResponse {
86
156
  Ticket ticket = 1;
87
- repeated TicketMessage messages = 2;
157
+ TicketMessage message = 2;
88
158
  }
89
159
 
90
- message CreateTicketRequest {
91
- string author_id = 1;
92
- string subject = 2;
93
- string category = 3;
94
- string body = 4; // first message
95
- string purchase_id = 5; // optional
96
- string withdrawal_id = 6; // optional
97
- string priority = 7; // LOW|NORMAL|HIGH|URGENT
98
- string department = 8; // GENERAL|TECHNICAL|SALES
99
- string product_category_id = 9; // optional
100
- string related_product_id = 10; // optional
101
- string related_product_type = 11; // PURCHASED|SELLING
102
- bool rules_accepted = 12;
103
- }
104
-
105
- message GetTicketRequest {
106
- string id = 1;
160
+ message ReportTicketRequest {
161
+ string ticket_id = 1;
107
162
  string requester_id = 2;
108
- bool is_staff = 3; // staff see internal notes + any ticket
163
+ string reason = 3;
164
+ string message = 4;
109
165
  }
110
166
 
111
- message ListMyTicketsRequest {
112
- string author_id = 1;
113
- string status = 2; // single value OR comma-separated (e.g. "OPEN,PENDING,IN_PROGRESS")
114
- int32 page = 3;
115
- int32 limit = 4;
116
- string department = 5; // GENERAL|TECHNICAL|SALES
117
- string category = 6; // GENERAL|PAYMENT|...
118
- string search = 7; // contains in subject OR in any message body
119
- string date_from = 8; // ISO; inclusive lower bound on createdAt
120
- string date_to = 9; // ISO; inclusive upper bound on createdAt
121
- }
122
-
123
- message ReplyTicketRequest {
124
- string ticket_id = 1;
125
- string author_id = 2;
126
- string body = 3;
127
- bool is_staff = 4;
128
- bool is_internal = 5; // staff-only note
129
- repeated TicketAttachment attachments = 6; // storage_key+file_name+file_size
167
+ message SupportTicketComplaint {
168
+ string id = 1;
169
+ string ticket_id = 2;
170
+ string user_id = 3;
171
+ string operator_id = 4;
172
+ string reason = 5;
173
+ string message = 6;
174
+ string created_at = 7;
175
+ string updated_at = 8;
130
176
  }
131
177
 
132
- message CloseTicketRequest {
178
+ message RateTicketRequest {
133
179
  string ticket_id = 1;
134
180
  string requester_id = 2;
135
- bool is_staff = 3;
181
+ int32 rating = 3;
182
+ string message = 4;
136
183
  }
137
184
 
138
- message ListTicketsRequest {
139
- string status = 1; // single value OR comma-separated
140
- string category = 2;
141
- string assignee_id = 3;
142
- int32 page = 4;
143
- int32 limit = 5;
144
- string department = 6;
145
- string search = 7; // contains in subject OR in any message body
146
- string date_from = 8; // ISO; inclusive lower bound on createdAt
147
- string date_to = 9;
148
- }
149
-
150
- message AssignTicketRequest {
151
- string ticket_id = 1;
152
- string assignee_id = 2; // empty = unassign
153
- string admin_id = 3;
185
+ message SupportTicketRating {
186
+ string id = 1;
187
+ string ticket_id = 2;
188
+ string user_id = 3;
189
+ int32 rating = 4;
190
+ string message = 5;
191
+ string created_at = 6;
192
+ string updated_at = 7;
154
193
  }
155
194
 
156
- message SetTicketStatusRequest {
157
- string ticket_id = 1;
158
- string status = 2;
159
- string admin_id = 3;
160
- }
161
- message DeleteTicketRequest {
162
- string ticket_id = 1;
163
- string admin_id = 2;
164
- }
165
- message TicketsListResponse {
166
- repeated Ticket items = 1;
167
- int32 total = 2;
168
- int32 page = 3;
169
- int32 limit = 4;
170
- }
195
+ message ListTicketsRequest {
196
+ string status = 1; // single value OR comma-separated
197
+ string category = 2;
198
+ string assignee_id = 3;
199
+ int32 page = 4;
200
+ int32 limit = 5;
201
+ string department = 6;
202
+ string search = 7; // contains in subject OR in any message body
203
+ string date_from = 8; // ISO; inclusive lower bound on createdAt
204
+ string date_to = 9;
205
+ }
206
+
207
+ message AssignTicketRequest {
208
+ string ticket_id = 1;
209
+ string assignee_id = 2; // empty = unassign
210
+ string admin_id = 3;
211
+ }
212
+
213
+ message SetTicketStatusRequest {
214
+ string ticket_id = 1;
215
+ string status = 2;
216
+ string admin_id = 3;
217
+ }
218
+ message DeleteTicketRequest {
219
+ string ticket_id = 1;
220
+ string admin_id = 2;
221
+ }
222
+ message TicketsListResponse {
223
+ repeated Ticket items = 1;
224
+ int32 total = 2;
225
+ int32 page = 3;
226
+ int32 limit = 4;
227
+ }
@@ -1,105 +1,105 @@
1
- syntax = "proto3";
2
-
3
- package taxonomy.v1;
4
-
5
- service TaxonomyService {
6
- rpc FindAllCategories(Empty) returns (CategoriesListResponse);
7
- rpc FindAllApplications(Empty) returns (ApplicationsListResponse);
8
- rpc FindAllTags(QueryTagsRequest) returns (TagsListResponse);
9
-
10
- rpc CreateCategory(CreateCategoryRequest) returns (CategoryResponse);
11
- rpc CreateApplication(CreateApplicationRequest) returns (ApplicationResponse);
12
- rpc UpdateApplication(UpdateApplicationRequest) returns (ApplicationResponse);
13
-
14
- // Mint a presigned PUT URL for an application icon SVG (proxies upload-service,
15
- // kind=ICON → public/icons/). Client PUTs the bytes to upload_url, then passes
16
- // icon_url to Create/UpdateApplication.
17
- rpc CreateIconUploadUrl(CreateIconUploadUrlRequest) returns (IconUploadUrlResponse);
18
- }
19
-
20
- message Category {
21
- string id = 1;
22
- string name = 2;
23
- string description = 3;
24
- string created_at = 4;
25
- string updated_at = 5;
26
- }
27
-
28
- message Application {
29
- string id = 1;
30
- string name = 2;
31
- string description = 3;
32
- string created_at = 4;
33
- string updated_at = 5;
34
- string icon_url = 6; // public S3 URL to brand SVG (admin-set), empty if none
35
- }
36
-
37
- message Tag {
38
- string id = 1;
39
- string name = 2;
40
- }
41
-
42
- // =================================================================
43
- // Requests / responses
44
- // =================================================================
45
-
46
- message Empty {}
47
-
48
- message CategoriesListResponse {
49
- repeated Category items = 1;
50
- }
51
-
52
- message ApplicationsListResponse {
53
- repeated Application items = 1;
54
- }
55
-
56
- message QueryTagsRequest {
57
- string search = 1;
58
- int32 page = 2;
59
- int32 limit = 3;
60
- }
61
-
62
- message TagsListResponse {
63
- repeated Tag items = 1;
64
- int32 total = 2;
65
- int32 page = 3;
66
- int32 limit = 4;
67
- }
68
-
69
- message CreateCategoryRequest {
70
- string name = 1;
71
- string description = 2;
72
- }
73
-
74
- message CategoryResponse {
75
- Category category = 1;
76
- }
77
-
78
- message CreateApplicationRequest {
79
- string name = 1;
80
- string description = 2;
81
- string icon_url = 3;
82
- }
83
-
84
- message UpdateApplicationRequest {
85
- string id = 1;
86
- string name = 2; // optional — empty keeps current
87
- string description = 3; // optional
88
- string icon_url = 4; // optional — empty keeps current
89
- }
90
-
91
- message ApplicationResponse {
92
- Application application = 1;
93
- }
94
-
95
- message CreateIconUploadUrlRequest {
96
- string file_name = 1;
97
- string mime_type = 2; // e.g. image/svg+xml
98
- }
99
-
100
- message IconUploadUrlResponse {
101
- string upload_url = 1; // presigned PUT URL — client uploads the SVG bytes here
102
- string icon_url = 2; // final public URL to store as Application.iconUrl
103
- string file_key = 3;
104
- int32 expires_in = 4;
105
- }
1
+ syntax = "proto3";
2
+
3
+ package taxonomy.v1;
4
+
5
+ service TaxonomyService {
6
+ rpc FindAllCategories(Empty) returns (CategoriesListResponse);
7
+ rpc FindAllApplications(Empty) returns (ApplicationsListResponse);
8
+ rpc FindAllTags(QueryTagsRequest) returns (TagsListResponse);
9
+
10
+ rpc CreateCategory(CreateCategoryRequest) returns (CategoryResponse);
11
+ rpc CreateApplication(CreateApplicationRequest) returns (ApplicationResponse);
12
+ rpc UpdateApplication(UpdateApplicationRequest) returns (ApplicationResponse);
13
+
14
+ // Mint a presigned PUT URL for an application icon SVG (proxies upload-service,
15
+ // kind=ICON → public/icons/). Client PUTs the bytes to upload_url, then passes
16
+ // icon_url to Create/UpdateApplication.
17
+ rpc CreateIconUploadUrl(CreateIconUploadUrlRequest) returns (IconUploadUrlResponse);
18
+ }
19
+
20
+ message Category {
21
+ string id = 1;
22
+ string name = 2;
23
+ string description = 3;
24
+ string created_at = 4;
25
+ string updated_at = 5;
26
+ }
27
+
28
+ message Application {
29
+ string id = 1;
30
+ string name = 2;
31
+ string description = 3;
32
+ string created_at = 4;
33
+ string updated_at = 5;
34
+ string icon_url = 6; // public S3 URL to brand SVG (admin-set), empty if none
35
+ }
36
+
37
+ message Tag {
38
+ string id = 1;
39
+ string name = 2;
40
+ }
41
+
42
+ // =================================================================
43
+ // Requests / responses
44
+ // =================================================================
45
+
46
+ message Empty {}
47
+
48
+ message CategoriesListResponse {
49
+ repeated Category items = 1;
50
+ }
51
+
52
+ message ApplicationsListResponse {
53
+ repeated Application items = 1;
54
+ }
55
+
56
+ message QueryTagsRequest {
57
+ string search = 1;
58
+ int32 page = 2;
59
+ int32 limit = 3;
60
+ }
61
+
62
+ message TagsListResponse {
63
+ repeated Tag items = 1;
64
+ int32 total = 2;
65
+ int32 page = 3;
66
+ int32 limit = 4;
67
+ }
68
+
69
+ message CreateCategoryRequest {
70
+ string name = 1;
71
+ string description = 2;
72
+ }
73
+
74
+ message CategoryResponse {
75
+ Category category = 1;
76
+ }
77
+
78
+ message CreateApplicationRequest {
79
+ string name = 1;
80
+ string description = 2;
81
+ string icon_url = 3;
82
+ }
83
+
84
+ message UpdateApplicationRequest {
85
+ string id = 1;
86
+ string name = 2; // optional — empty keeps current
87
+ string description = 3; // optional
88
+ string icon_url = 4; // optional — empty keeps current
89
+ }
90
+
91
+ message ApplicationResponse {
92
+ Application application = 1;
93
+ }
94
+
95
+ message CreateIconUploadUrlRequest {
96
+ string file_name = 1;
97
+ string mime_type = 2; // e.g. image/svg+xml
98
+ }
99
+
100
+ message IconUploadUrlResponse {
101
+ string upload_url = 1; // presigned PUT URL — client uploads the SVG bytes here
102
+ string icon_url = 2; // final public URL to store as Application.iconUrl
103
+ string file_key = 3;
104
+ int32 expires_in = 4;
105
+ }