@aepstore-dev/contracts 1.65.0 → 1.67.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,173 +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
- // Отображаемое имя автора: агент — «Имя Ф.» из fullName (фолбэк username),
64
- // клиент username, системное ''.
65
- string author_name = 11;
66
- }
67
-
68
- message TicketAttachment {
69
- string file_name = 1;
70
- int64 file_size = 2;
71
- string url = 3; // presigned GET, короткоживущая; в запросах пусто
72
- 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;
73
79
  }
74
80
 
75
81
  message UpdateTicketMessageRequest {
76
- 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;
77
144
  string requester_id = 2;
78
145
  bool is_staff = 3;
79
- string body = 4;
80
146
  }
81
147
 
82
- message DeleteTicketMessageRequest {
83
- string message_id = 1;
148
+ message ReopenTicketRequest {
149
+ string ticket_id = 1;
84
150
  string requester_id = 2;
85
- bool is_staff = 3;
151
+ string body = 3;
152
+ repeated TicketAttachment attachments = 4;
86
153
  }
87
154
 
88
- message TicketWithMessages {
155
+ message ReopenTicketResponse {
89
156
  Ticket ticket = 1;
90
- repeated TicketMessage messages = 2;
157
+ TicketMessage message = 2;
91
158
  }
92
159
 
93
- message CreateTicketRequest {
94
- string author_id = 1;
95
- string subject = 2;
96
- string category = 3;
97
- string body = 4; // first message
98
- string purchase_id = 5; // optional
99
- string withdrawal_id = 6; // optional
100
- string priority = 7; // LOW|NORMAL|HIGH|URGENT
101
- string department = 8; // GENERAL|TECHNICAL|SALES
102
- string product_category_id = 9; // optional
103
- string related_product_id = 10; // optional
104
- string related_product_type = 11; // PURCHASED|SELLING
105
- bool rules_accepted = 12;
106
- }
107
-
108
- message GetTicketRequest {
109
- string id = 1;
160
+ message ReportTicketRequest {
161
+ string ticket_id = 1;
110
162
  string requester_id = 2;
111
- bool is_staff = 3; // staff see internal notes + any ticket
163
+ string reason = 3;
164
+ string message = 4;
112
165
  }
113
166
 
114
- message ListMyTicketsRequest {
115
- string author_id = 1;
116
- string status = 2; // single value OR comma-separated (e.g. "OPEN,PENDING,IN_PROGRESS")
117
- int32 page = 3;
118
- int32 limit = 4;
119
- string department = 5; // GENERAL|TECHNICAL|SALES
120
- string category = 6; // GENERAL|PAYMENT|...
121
- string search = 7; // contains in subject OR in any message body
122
- string date_from = 8; // ISO; inclusive lower bound on createdAt
123
- string date_to = 9; // ISO; inclusive upper bound on createdAt
124
- }
125
-
126
- message ReplyTicketRequest {
127
- string ticket_id = 1;
128
- string author_id = 2;
129
- string body = 3;
130
- bool is_staff = 4;
131
- bool is_internal = 5; // staff-only note
132
- 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;
133
176
  }
134
177
 
135
- message CloseTicketRequest {
178
+ message RateTicketRequest {
136
179
  string ticket_id = 1;
137
180
  string requester_id = 2;
138
- bool is_staff = 3;
181
+ int32 rating = 3;
182
+ string message = 4;
139
183
  }
140
184
 
141
- message ListTicketsRequest {
142
- string status = 1; // single value OR comma-separated
143
- string category = 2;
144
- string assignee_id = 3;
145
- int32 page = 4;
146
- int32 limit = 5;
147
- string department = 6;
148
- string search = 7; // contains in subject OR in any message body
149
- string date_from = 8; // ISO; inclusive lower bound on createdAt
150
- string date_to = 9;
151
- }
152
-
153
- message AssignTicketRequest {
154
- string ticket_id = 1;
155
- string assignee_id = 2; // empty = unassign
156
- 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;
157
193
  }
158
194
 
159
- message SetTicketStatusRequest {
160
- string ticket_id = 1;
161
- string status = 2;
162
- string admin_id = 3;
163
- }
164
- message DeleteTicketRequest {
165
- string ticket_id = 1;
166
- string admin_id = 2;
167
- }
168
- message TicketsListResponse {
169
- repeated Ticket items = 1;
170
- int32 total = 2;
171
- int32 page = 3;
172
- int32 limit = 4;
173
- }
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
+ }