@aepstore-dev/contracts 1.63.0 → 1.64.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,144 +1,170 @@
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
- rpc ListMyTickets(ListMyTicketsRequest) returns (TicketsListResponse);
14
- rpc ReplyTicket(ReplyTicketRequest) returns (TicketMessage);
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
- }
23
-
24
- message PingRequest { string message = 1; }
25
- message PingResponse { bool ok = 1; string message = 2; }
26
-
27
- message Ticket {
28
- string id = 1;
29
- string author_id = 2;
30
- string subject = 3;
31
- string category = 4; // GENERAL|PAYMENT|WITHDRAWAL|PRODUCT|ACCOUNT|ABUSE|OTHER
32
- string status = 5; // OPEN|PENDING|IN_PROGRESS|RESOLVED|CLOSED
33
- string priority = 6; // LOW|NORMAL|HIGH|URGENT
34
- string purchase_id = 7;
35
- string withdrawal_id = 8;
36
- string assignee_id = 9;
37
- string last_message_at = 10;
38
- string created_at = 11;
39
- string updated_at = 12;
40
- int32 messages_count = 13;
41
- string department = 14; // GENERAL|TECHNICAL|SALES
42
- string product_category_id = 15; // optional
43
- string related_product_id = 16; // optional
44
- string related_product_type = 17; // PURCHASED|SELLING
45
- bool rules_accepted = 18;
46
- string rules_accepted_at = 19;
47
- string deleted_at = 20;
48
- }
49
-
50
- message TicketMessage {
51
- string id = 1;
52
- string ticket_id = 2;
53
- string author_id = 3;
54
- string body = 4;
55
- bool is_staff = 5;
56
- bool is_internal = 6;
57
- string created_at = 7;
58
- }
59
-
60
- message TicketWithMessages {
61
- Ticket ticket = 1;
62
- repeated TicketMessage messages = 2;
63
- }
64
-
65
- message CreateTicketRequest {
66
- string author_id = 1;
67
- string subject = 2;
68
- string category = 3;
69
- string body = 4; // first message
70
- string purchase_id = 5; // optional
71
- string withdrawal_id = 6; // optional
72
- string priority = 7; // LOW|NORMAL|HIGH|URGENT
73
- string department = 8; // GENERAL|TECHNICAL|SALES
74
- string product_category_id = 9; // optional
75
- string related_product_id = 10; // optional
76
- string related_product_type = 11; // PURCHASED|SELLING
77
- bool rules_accepted = 12;
78
- }
79
-
80
- message GetTicketRequest {
81
- string id = 1;
82
- string requester_id = 2;
83
- bool is_staff = 3; // staff see internal notes + any ticket
84
- }
85
-
86
- message ListMyTicketsRequest {
87
- string author_id = 1;
88
- string status = 2; // single value OR comma-separated (e.g. "OPEN,PENDING,IN_PROGRESS")
89
- int32 page = 3;
90
- int32 limit = 4;
91
- string department = 5; // GENERAL|TECHNICAL|SALES
92
- string category = 6; // GENERAL|PAYMENT|...
93
- string search = 7; // contains in subject OR in any message body
94
- string date_from = 8; // ISO; inclusive lower bound on createdAt
95
- string date_to = 9; // ISO; inclusive upper bound on createdAt
96
- }
97
-
98
- message ReplyTicketRequest {
99
- string ticket_id = 1;
100
- string author_id = 2;
101
- string body = 3;
102
- bool is_staff = 4;
103
- bool is_internal = 5; // staff-only note
104
- }
105
-
106
- message CloseTicketRequest {
107
- string ticket_id = 1;
108
- string requester_id = 2;
109
- bool is_staff = 3;
110
- }
111
-
112
- message ListTicketsRequest {
113
- string status = 1; // single value OR comma-separated
114
- string category = 2;
115
- string assignee_id = 3;
116
- int32 page = 4;
117
- int32 limit = 5;
118
- string department = 6;
119
- string search = 7; // contains in subject OR in any message body
120
- string date_from = 8; // ISO; inclusive lower bound on createdAt
121
- string date_to = 9;
122
- }
123
-
124
- message AssignTicketRequest {
125
- string ticket_id = 1;
126
- string assignee_id = 2; // empty = unassign
127
- string admin_id = 3;
128
- }
129
-
130
- message SetTicketStatusRequest {
131
- string ticket_id = 1;
132
- string status = 2;
133
- string admin_id = 3;
134
- }
135
- message DeleteTicketRequest {
136
- string ticket_id = 1;
137
- string admin_id = 2;
138
- }
139
- message TicketsListResponse {
140
- repeated Ticket items = 1;
141
- int32 total = 2;
142
- int32 page = 3;
143
- int32 limit = 4;
144
- }
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
+ rpc ListMyTickets(ListMyTicketsRequest) returns (TicketsListResponse);
14
+ rpc ReplyTicket(ReplyTicketRequest) returns (TicketMessage);
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
47
+ bool rules_accepted = 18;
48
+ string rules_accepted_at = 19;
49
+ 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), наружу не отдаётся
70
+ }
71
+
72
+ message UpdateTicketMessageRequest {
73
+ string message_id = 1;
74
+ string requester_id = 2;
75
+ bool is_staff = 3;
76
+ string body = 4;
77
+ }
78
+
79
+ message DeleteTicketMessageRequest {
80
+ string message_id = 1;
81
+ string requester_id = 2;
82
+ bool is_staff = 3;
83
+ }
84
+
85
+ message TicketWithMessages {
86
+ Ticket ticket = 1;
87
+ repeated TicketMessage messages = 2;
88
+ }
89
+
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;
107
+ string requester_id = 2;
108
+ bool is_staff = 3; // staff see internal notes + any ticket
109
+ }
110
+
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
130
+ }
131
+
132
+ message CloseTicketRequest {
133
+ string ticket_id = 1;
134
+ string requester_id = 2;
135
+ bool is_staff = 3;
136
+ }
137
+
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;
154
+ }
155
+
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
+ }
@@ -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
+ }