@aepstore-dev/contracts 1.65.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.
- package/gen/activity.ts +270 -270
- package/gen/auth.ts +323 -323
- package/gen/mail.ts +121 -121
- package/gen/payments.ts +1048 -1048
- package/gen/products.ts +607 -607
- package/gen/support.d.ts +54 -0
- package/gen/support.js +4 -1
- package/gen/support.ts +76 -1
- package/gen/taxonomy.ts +185 -185
- package/gen/upload.ts +287 -287
- package/gen/users.ts +1026 -1026
- package/package.json +35 -35
- package/proto/activity.proto +200 -200
- package/proto/auth.proto +198 -198
- package/proto/mail.proto +54 -54
- package/proto/payments.proto +516 -516
- package/proto/products.proto +405 -405
- package/proto/support.proto +197 -143
- package/proto/taxonomy.proto +105 -105
- package/proto/upload.proto +171 -171
- package/proto/users.proto +690 -690
package/gen/support.d.ts
CHANGED
|
@@ -35,6 +35,10 @@ export interface Ticket {
|
|
|
35
35
|
rulesAccepted: boolean;
|
|
36
36
|
rulesAcceptedAt: string;
|
|
37
37
|
deletedAt: string;
|
|
38
|
+
/** 0 if the current user has not rated it */
|
|
39
|
+
rating: number;
|
|
40
|
+
/** true if the current user has already reported it */
|
|
41
|
+
hasComplaint: boolean;
|
|
38
42
|
}
|
|
39
43
|
export interface TicketMessage {
|
|
40
44
|
id: string;
|
|
@@ -62,6 +66,7 @@ export interface TicketAttachment {
|
|
|
62
66
|
url: string;
|
|
63
67
|
/** только внутрь (reply), наружу не отдаётся */
|
|
64
68
|
storageKey: string;
|
|
69
|
+
mimeType: string;
|
|
65
70
|
}
|
|
66
71
|
export interface UpdateTicketMessageRequest {
|
|
67
72
|
messageId: string;
|
|
@@ -99,6 +104,8 @@ export interface CreateTicketRequest {
|
|
|
99
104
|
/** PURCHASED|SELLING */
|
|
100
105
|
relatedProductType: string;
|
|
101
106
|
rulesAccepted: boolean;
|
|
107
|
+
/** storage_key+file_name+file_size+mime_type */
|
|
108
|
+
attachments: TicketAttachment[];
|
|
102
109
|
}
|
|
103
110
|
export interface GetTicketRequest {
|
|
104
111
|
id: string;
|
|
@@ -138,6 +145,47 @@ export interface CloseTicketRequest {
|
|
|
138
145
|
requesterId: string;
|
|
139
146
|
isStaff: boolean;
|
|
140
147
|
}
|
|
148
|
+
export interface ReopenTicketRequest {
|
|
149
|
+
ticketId: string;
|
|
150
|
+
requesterId: string;
|
|
151
|
+
body: string;
|
|
152
|
+
attachments: TicketAttachment[];
|
|
153
|
+
}
|
|
154
|
+
export interface ReopenTicketResponse {
|
|
155
|
+
ticket: Ticket | undefined;
|
|
156
|
+
message: TicketMessage | undefined;
|
|
157
|
+
}
|
|
158
|
+
export interface ReportTicketRequest {
|
|
159
|
+
ticketId: string;
|
|
160
|
+
requesterId: string;
|
|
161
|
+
reason: string;
|
|
162
|
+
message: string;
|
|
163
|
+
}
|
|
164
|
+
export interface SupportTicketComplaint {
|
|
165
|
+
id: string;
|
|
166
|
+
ticketId: string;
|
|
167
|
+
userId: string;
|
|
168
|
+
operatorId: string;
|
|
169
|
+
reason: string;
|
|
170
|
+
message: string;
|
|
171
|
+
createdAt: string;
|
|
172
|
+
updatedAt: string;
|
|
173
|
+
}
|
|
174
|
+
export interface RateTicketRequest {
|
|
175
|
+
ticketId: string;
|
|
176
|
+
requesterId: string;
|
|
177
|
+
rating: number;
|
|
178
|
+
message: string;
|
|
179
|
+
}
|
|
180
|
+
export interface SupportTicketRating {
|
|
181
|
+
id: string;
|
|
182
|
+
ticketId: string;
|
|
183
|
+
userId: string;
|
|
184
|
+
rating: number;
|
|
185
|
+
message: string;
|
|
186
|
+
createdAt: string;
|
|
187
|
+
updatedAt: string;
|
|
188
|
+
}
|
|
141
189
|
export interface ListTicketsRequest {
|
|
142
190
|
/** single value OR comma-separated */
|
|
143
191
|
status: string;
|
|
@@ -187,6 +235,9 @@ export interface SupportServiceClient {
|
|
|
187
235
|
listMyTickets(request: ListMyTicketsRequest): Observable<TicketsListResponse>;
|
|
188
236
|
replyTicket(request: ReplyTicketRequest): Observable<TicketMessage>;
|
|
189
237
|
closeTicket(request: CloseTicketRequest): Observable<Ticket>;
|
|
238
|
+
reopenTicket(request: ReopenTicketRequest): Observable<ReopenTicketResponse>;
|
|
239
|
+
reportTicket(request: ReportTicketRequest): Observable<SupportTicketComplaint>;
|
|
240
|
+
rateTicket(request: RateTicketRequest): Observable<SupportTicketRating>;
|
|
190
241
|
/** staff/admin */
|
|
191
242
|
listTickets(request: ListTicketsRequest): Observable<TicketsListResponse>;
|
|
192
243
|
assignTicket(request: AssignTicketRequest): Observable<Ticket>;
|
|
@@ -208,6 +259,9 @@ export interface SupportServiceController {
|
|
|
208
259
|
listMyTickets(request: ListMyTicketsRequest): Promise<TicketsListResponse> | Observable<TicketsListResponse> | TicketsListResponse;
|
|
209
260
|
replyTicket(request: ReplyTicketRequest): Promise<TicketMessage> | Observable<TicketMessage> | TicketMessage;
|
|
210
261
|
closeTicket(request: CloseTicketRequest): Promise<Ticket> | Observable<Ticket> | Ticket;
|
|
262
|
+
reopenTicket(request: ReopenTicketRequest): Promise<ReopenTicketResponse> | Observable<ReopenTicketResponse> | ReopenTicketResponse;
|
|
263
|
+
reportTicket(request: ReportTicketRequest): Promise<SupportTicketComplaint> | Observable<SupportTicketComplaint> | SupportTicketComplaint;
|
|
264
|
+
rateTicket(request: RateTicketRequest): Promise<SupportTicketRating> | Observable<SupportTicketRating> | SupportTicketRating;
|
|
211
265
|
/** staff/admin */
|
|
212
266
|
listTickets(request: ListTicketsRequest): Promise<TicketsListResponse> | Observable<TicketsListResponse> | TicketsListResponse;
|
|
213
267
|
assignTicket(request: AssignTicketRequest): Promise<Ticket> | Observable<Ticket> | Ticket;
|
package/gen/support.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
3
|
// versions:
|
|
4
4
|
// protoc-gen-ts_proto v2.10.1
|
|
5
|
-
// protoc v7.35.
|
|
5
|
+
// protoc v7.35.1
|
|
6
6
|
// source: support.proto
|
|
7
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
8
|
exports.SUPPORT_SERVICE_NAME = exports.SUPPORT_V1_PACKAGE_NAME = exports.protobufPackage = void 0;
|
|
@@ -20,6 +20,9 @@ function SupportServiceControllerMethods() {
|
|
|
20
20
|
"listMyTickets",
|
|
21
21
|
"replyTicket",
|
|
22
22
|
"closeTicket",
|
|
23
|
+
"reopenTicket",
|
|
24
|
+
"reportTicket",
|
|
25
|
+
"rateTicket",
|
|
23
26
|
"listTickets",
|
|
24
27
|
"assignTicket",
|
|
25
28
|
"setTicketStatus",
|
package/gen/support.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
2
|
// versions:
|
|
3
3
|
// protoc-gen-ts_proto v2.10.1
|
|
4
|
-
// protoc v7.35.
|
|
4
|
+
// protoc v7.35.1
|
|
5
5
|
// source: support.proto
|
|
6
6
|
|
|
7
7
|
/* eslint-disable */
|
|
@@ -47,6 +47,10 @@ export interface Ticket {
|
|
|
47
47
|
rulesAccepted: boolean;
|
|
48
48
|
rulesAcceptedAt: string;
|
|
49
49
|
deletedAt: string;
|
|
50
|
+
/** 0 if the current user has not rated it */
|
|
51
|
+
rating: number;
|
|
52
|
+
/** true if the current user has already reported it */
|
|
53
|
+
hasComplaint: boolean;
|
|
50
54
|
}
|
|
51
55
|
|
|
52
56
|
export interface TicketMessage {
|
|
@@ -76,6 +80,7 @@ export interface TicketAttachment {
|
|
|
76
80
|
url: string;
|
|
77
81
|
/** только внутрь (reply), наружу не отдаётся */
|
|
78
82
|
storageKey: string;
|
|
83
|
+
mimeType: string;
|
|
79
84
|
}
|
|
80
85
|
|
|
81
86
|
export interface UpdateTicketMessageRequest {
|
|
@@ -117,6 +122,8 @@ export interface CreateTicketRequest {
|
|
|
117
122
|
/** PURCHASED|SELLING */
|
|
118
123
|
relatedProductType: string;
|
|
119
124
|
rulesAccepted: boolean;
|
|
125
|
+
/** storage_key+file_name+file_size+mime_type */
|
|
126
|
+
attachments: TicketAttachment[];
|
|
120
127
|
}
|
|
121
128
|
|
|
122
129
|
export interface GetTicketRequest {
|
|
@@ -161,6 +168,53 @@ export interface CloseTicketRequest {
|
|
|
161
168
|
isStaff: boolean;
|
|
162
169
|
}
|
|
163
170
|
|
|
171
|
+
export interface ReopenTicketRequest {
|
|
172
|
+
ticketId: string;
|
|
173
|
+
requesterId: string;
|
|
174
|
+
body: string;
|
|
175
|
+
attachments: TicketAttachment[];
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
export interface ReopenTicketResponse {
|
|
179
|
+
ticket: Ticket | undefined;
|
|
180
|
+
message: TicketMessage | undefined;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
export interface ReportTicketRequest {
|
|
184
|
+
ticketId: string;
|
|
185
|
+
requesterId: string;
|
|
186
|
+
reason: string;
|
|
187
|
+
message: string;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
export interface SupportTicketComplaint {
|
|
191
|
+
id: string;
|
|
192
|
+
ticketId: string;
|
|
193
|
+
userId: string;
|
|
194
|
+
operatorId: string;
|
|
195
|
+
reason: string;
|
|
196
|
+
message: string;
|
|
197
|
+
createdAt: string;
|
|
198
|
+
updatedAt: string;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
export interface RateTicketRequest {
|
|
202
|
+
ticketId: string;
|
|
203
|
+
requesterId: string;
|
|
204
|
+
rating: number;
|
|
205
|
+
message: string;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
export interface SupportTicketRating {
|
|
209
|
+
id: string;
|
|
210
|
+
ticketId: string;
|
|
211
|
+
userId: string;
|
|
212
|
+
rating: number;
|
|
213
|
+
message: string;
|
|
214
|
+
createdAt: string;
|
|
215
|
+
updatedAt: string;
|
|
216
|
+
}
|
|
217
|
+
|
|
164
218
|
export interface ListTicketsRequest {
|
|
165
219
|
/** single value OR comma-separated */
|
|
166
220
|
status: string;
|
|
@@ -225,6 +279,12 @@ export interface SupportServiceClient {
|
|
|
225
279
|
|
|
226
280
|
closeTicket(request: CloseTicketRequest): Observable<Ticket>;
|
|
227
281
|
|
|
282
|
+
reopenTicket(request: ReopenTicketRequest): Observable<ReopenTicketResponse>;
|
|
283
|
+
|
|
284
|
+
reportTicket(request: ReportTicketRequest): Observable<SupportTicketComplaint>;
|
|
285
|
+
|
|
286
|
+
rateTicket(request: RateTicketRequest): Observable<SupportTicketRating>;
|
|
287
|
+
|
|
228
288
|
/** staff/admin */
|
|
229
289
|
|
|
230
290
|
listTickets(request: ListTicketsRequest): Observable<TicketsListResponse>;
|
|
@@ -266,6 +326,18 @@ export interface SupportServiceController {
|
|
|
266
326
|
|
|
267
327
|
closeTicket(request: CloseTicketRequest): Promise<Ticket> | Observable<Ticket> | Ticket;
|
|
268
328
|
|
|
329
|
+
reopenTicket(
|
|
330
|
+
request: ReopenTicketRequest,
|
|
331
|
+
): Promise<ReopenTicketResponse> | Observable<ReopenTicketResponse> | ReopenTicketResponse;
|
|
332
|
+
|
|
333
|
+
reportTicket(
|
|
334
|
+
request: ReportTicketRequest,
|
|
335
|
+
): Promise<SupportTicketComplaint> | Observable<SupportTicketComplaint> | SupportTicketComplaint;
|
|
336
|
+
|
|
337
|
+
rateTicket(
|
|
338
|
+
request: RateTicketRequest,
|
|
339
|
+
): Promise<SupportTicketRating> | Observable<SupportTicketRating> | SupportTicketRating;
|
|
340
|
+
|
|
269
341
|
/** staff/admin */
|
|
270
342
|
|
|
271
343
|
listTickets(
|
|
@@ -296,6 +368,9 @@ export function SupportServiceControllerMethods() {
|
|
|
296
368
|
"listMyTickets",
|
|
297
369
|
"replyTicket",
|
|
298
370
|
"closeTicket",
|
|
371
|
+
"reopenTicket",
|
|
372
|
+
"reportTicket",
|
|
373
|
+
"rateTicket",
|
|
299
374
|
"listTickets",
|
|
300
375
|
"assignTicket",
|
|
301
376
|
"setTicketStatus",
|
package/gen/taxonomy.ts
CHANGED
|
@@ -1,185 +1,185 @@
|
|
|
1
|
-
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
-
// versions:
|
|
3
|
-
// protoc-gen-ts_proto v2.10.1
|
|
4
|
-
// protoc v7.35.0
|
|
5
|
-
// source: taxonomy.proto
|
|
6
|
-
|
|
7
|
-
/* eslint-disable */
|
|
8
|
-
import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
|
|
9
|
-
import { Observable } from "rxjs";
|
|
10
|
-
|
|
11
|
-
export const protobufPackage = "taxonomy.v1";
|
|
12
|
-
|
|
13
|
-
export interface Category {
|
|
14
|
-
id: string;
|
|
15
|
-
name: string;
|
|
16
|
-
description: string;
|
|
17
|
-
createdAt: string;
|
|
18
|
-
updatedAt: string;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export interface Application {
|
|
22
|
-
id: string;
|
|
23
|
-
name: string;
|
|
24
|
-
description: string;
|
|
25
|
-
createdAt: string;
|
|
26
|
-
updatedAt: string;
|
|
27
|
-
/** public S3 URL to brand SVG (admin-set), empty if none */
|
|
28
|
-
iconUrl: string;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export interface Tag {
|
|
32
|
-
id: string;
|
|
33
|
-
name: string;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export interface Empty {
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export interface CategoriesListResponse {
|
|
40
|
-
items: Category[];
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export interface ApplicationsListResponse {
|
|
44
|
-
items: Application[];
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
export interface QueryTagsRequest {
|
|
48
|
-
search: string;
|
|
49
|
-
page: number;
|
|
50
|
-
limit: number;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export interface TagsListResponse {
|
|
54
|
-
items: Tag[];
|
|
55
|
-
total: number;
|
|
56
|
-
page: number;
|
|
57
|
-
limit: number;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
export interface CreateCategoryRequest {
|
|
61
|
-
name: string;
|
|
62
|
-
description: string;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
export interface CategoryResponse {
|
|
66
|
-
category: Category | undefined;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
export interface CreateApplicationRequest {
|
|
70
|
-
name: string;
|
|
71
|
-
description: string;
|
|
72
|
-
iconUrl: string;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
export interface UpdateApplicationRequest {
|
|
76
|
-
id: string;
|
|
77
|
-
/** optional — empty keeps current */
|
|
78
|
-
name: string;
|
|
79
|
-
/** optional */
|
|
80
|
-
description: string;
|
|
81
|
-
/** optional — empty keeps current */
|
|
82
|
-
iconUrl: string;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
export interface ApplicationResponse {
|
|
86
|
-
application: Application | undefined;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
export interface CreateIconUploadUrlRequest {
|
|
90
|
-
fileName: string;
|
|
91
|
-
/** e.g. image/svg+xml */
|
|
92
|
-
mimeType: string;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
export interface IconUploadUrlResponse {
|
|
96
|
-
/** presigned PUT URL — client uploads the SVG bytes here */
|
|
97
|
-
uploadUrl: string;
|
|
98
|
-
/** final public URL to store as Application.iconUrl */
|
|
99
|
-
iconUrl: string;
|
|
100
|
-
fileKey: string;
|
|
101
|
-
expiresIn: number;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
export const TAXONOMY_V1_PACKAGE_NAME = "taxonomy.v1";
|
|
105
|
-
|
|
106
|
-
export interface TaxonomyServiceClient {
|
|
107
|
-
findAllCategories(request: Empty): Observable<CategoriesListResponse>;
|
|
108
|
-
|
|
109
|
-
findAllApplications(request: Empty): Observable<ApplicationsListResponse>;
|
|
110
|
-
|
|
111
|
-
findAllTags(request: QueryTagsRequest): Observable<TagsListResponse>;
|
|
112
|
-
|
|
113
|
-
createCategory(request: CreateCategoryRequest): Observable<CategoryResponse>;
|
|
114
|
-
|
|
115
|
-
createApplication(request: CreateApplicationRequest): Observable<ApplicationResponse>;
|
|
116
|
-
|
|
117
|
-
updateApplication(request: UpdateApplicationRequest): Observable<ApplicationResponse>;
|
|
118
|
-
|
|
119
|
-
/**
|
|
120
|
-
* Mint a presigned PUT URL for an application icon SVG (proxies upload-service,
|
|
121
|
-
* kind=ICON → public/icons/). Client PUTs the bytes to upload_url, then passes
|
|
122
|
-
* icon_url to Create/UpdateApplication.
|
|
123
|
-
*/
|
|
124
|
-
|
|
125
|
-
createIconUploadUrl(request: CreateIconUploadUrlRequest): Observable<IconUploadUrlResponse>;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
export interface TaxonomyServiceController {
|
|
129
|
-
findAllCategories(
|
|
130
|
-
request: Empty,
|
|
131
|
-
): Promise<CategoriesListResponse> | Observable<CategoriesListResponse> | CategoriesListResponse;
|
|
132
|
-
|
|
133
|
-
findAllApplications(
|
|
134
|
-
request: Empty,
|
|
135
|
-
): Promise<ApplicationsListResponse> | Observable<ApplicationsListResponse> | ApplicationsListResponse;
|
|
136
|
-
|
|
137
|
-
findAllTags(request: QueryTagsRequest): Promise<TagsListResponse> | Observable<TagsListResponse> | TagsListResponse;
|
|
138
|
-
|
|
139
|
-
createCategory(
|
|
140
|
-
request: CreateCategoryRequest,
|
|
141
|
-
): Promise<CategoryResponse> | Observable<CategoryResponse> | CategoryResponse;
|
|
142
|
-
|
|
143
|
-
createApplication(
|
|
144
|
-
request: CreateApplicationRequest,
|
|
145
|
-
): Promise<ApplicationResponse> | Observable<ApplicationResponse> | ApplicationResponse;
|
|
146
|
-
|
|
147
|
-
updateApplication(
|
|
148
|
-
request: UpdateApplicationRequest,
|
|
149
|
-
): Promise<ApplicationResponse> | Observable<ApplicationResponse> | ApplicationResponse;
|
|
150
|
-
|
|
151
|
-
/**
|
|
152
|
-
* Mint a presigned PUT URL for an application icon SVG (proxies upload-service,
|
|
153
|
-
* kind=ICON → public/icons/). Client PUTs the bytes to upload_url, then passes
|
|
154
|
-
* icon_url to Create/UpdateApplication.
|
|
155
|
-
*/
|
|
156
|
-
|
|
157
|
-
createIconUploadUrl(
|
|
158
|
-
request: CreateIconUploadUrlRequest,
|
|
159
|
-
): Promise<IconUploadUrlResponse> | Observable<IconUploadUrlResponse> | IconUploadUrlResponse;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
export function TaxonomyServiceControllerMethods() {
|
|
163
|
-
return function (constructor: Function) {
|
|
164
|
-
const grpcMethods: string[] = [
|
|
165
|
-
"findAllCategories",
|
|
166
|
-
"findAllApplications",
|
|
167
|
-
"findAllTags",
|
|
168
|
-
"createCategory",
|
|
169
|
-
"createApplication",
|
|
170
|
-
"updateApplication",
|
|
171
|
-
"createIconUploadUrl",
|
|
172
|
-
];
|
|
173
|
-
for (const method of grpcMethods) {
|
|
174
|
-
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
175
|
-
GrpcMethod("TaxonomyService", method)(constructor.prototype[method], method, descriptor);
|
|
176
|
-
}
|
|
177
|
-
const grpcStreamMethods: string[] = [];
|
|
178
|
-
for (const method of grpcStreamMethods) {
|
|
179
|
-
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
180
|
-
GrpcStreamMethod("TaxonomyService", method)(constructor.prototype[method], method, descriptor);
|
|
181
|
-
}
|
|
182
|
-
};
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
export const TAXONOMY_SERVICE_NAME = "TaxonomyService";
|
|
1
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
+
// versions:
|
|
3
|
+
// protoc-gen-ts_proto v2.10.1
|
|
4
|
+
// protoc v7.35.0
|
|
5
|
+
// source: taxonomy.proto
|
|
6
|
+
|
|
7
|
+
/* eslint-disable */
|
|
8
|
+
import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
|
|
9
|
+
import { Observable } from "rxjs";
|
|
10
|
+
|
|
11
|
+
export const protobufPackage = "taxonomy.v1";
|
|
12
|
+
|
|
13
|
+
export interface Category {
|
|
14
|
+
id: string;
|
|
15
|
+
name: string;
|
|
16
|
+
description: string;
|
|
17
|
+
createdAt: string;
|
|
18
|
+
updatedAt: string;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface Application {
|
|
22
|
+
id: string;
|
|
23
|
+
name: string;
|
|
24
|
+
description: string;
|
|
25
|
+
createdAt: string;
|
|
26
|
+
updatedAt: string;
|
|
27
|
+
/** public S3 URL to brand SVG (admin-set), empty if none */
|
|
28
|
+
iconUrl: string;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface Tag {
|
|
32
|
+
id: string;
|
|
33
|
+
name: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export interface Empty {
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface CategoriesListResponse {
|
|
40
|
+
items: Category[];
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export interface ApplicationsListResponse {
|
|
44
|
+
items: Application[];
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export interface QueryTagsRequest {
|
|
48
|
+
search: string;
|
|
49
|
+
page: number;
|
|
50
|
+
limit: number;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export interface TagsListResponse {
|
|
54
|
+
items: Tag[];
|
|
55
|
+
total: number;
|
|
56
|
+
page: number;
|
|
57
|
+
limit: number;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export interface CreateCategoryRequest {
|
|
61
|
+
name: string;
|
|
62
|
+
description: string;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export interface CategoryResponse {
|
|
66
|
+
category: Category | undefined;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export interface CreateApplicationRequest {
|
|
70
|
+
name: string;
|
|
71
|
+
description: string;
|
|
72
|
+
iconUrl: string;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export interface UpdateApplicationRequest {
|
|
76
|
+
id: string;
|
|
77
|
+
/** optional — empty keeps current */
|
|
78
|
+
name: string;
|
|
79
|
+
/** optional */
|
|
80
|
+
description: string;
|
|
81
|
+
/** optional — empty keeps current */
|
|
82
|
+
iconUrl: string;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export interface ApplicationResponse {
|
|
86
|
+
application: Application | undefined;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export interface CreateIconUploadUrlRequest {
|
|
90
|
+
fileName: string;
|
|
91
|
+
/** e.g. image/svg+xml */
|
|
92
|
+
mimeType: string;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export interface IconUploadUrlResponse {
|
|
96
|
+
/** presigned PUT URL — client uploads the SVG bytes here */
|
|
97
|
+
uploadUrl: string;
|
|
98
|
+
/** final public URL to store as Application.iconUrl */
|
|
99
|
+
iconUrl: string;
|
|
100
|
+
fileKey: string;
|
|
101
|
+
expiresIn: number;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export const TAXONOMY_V1_PACKAGE_NAME = "taxonomy.v1";
|
|
105
|
+
|
|
106
|
+
export interface TaxonomyServiceClient {
|
|
107
|
+
findAllCategories(request: Empty): Observable<CategoriesListResponse>;
|
|
108
|
+
|
|
109
|
+
findAllApplications(request: Empty): Observable<ApplicationsListResponse>;
|
|
110
|
+
|
|
111
|
+
findAllTags(request: QueryTagsRequest): Observable<TagsListResponse>;
|
|
112
|
+
|
|
113
|
+
createCategory(request: CreateCategoryRequest): Observable<CategoryResponse>;
|
|
114
|
+
|
|
115
|
+
createApplication(request: CreateApplicationRequest): Observable<ApplicationResponse>;
|
|
116
|
+
|
|
117
|
+
updateApplication(request: UpdateApplicationRequest): Observable<ApplicationResponse>;
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Mint a presigned PUT URL for an application icon SVG (proxies upload-service,
|
|
121
|
+
* kind=ICON → public/icons/). Client PUTs the bytes to upload_url, then passes
|
|
122
|
+
* icon_url to Create/UpdateApplication.
|
|
123
|
+
*/
|
|
124
|
+
|
|
125
|
+
createIconUploadUrl(request: CreateIconUploadUrlRequest): Observable<IconUploadUrlResponse>;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
export interface TaxonomyServiceController {
|
|
129
|
+
findAllCategories(
|
|
130
|
+
request: Empty,
|
|
131
|
+
): Promise<CategoriesListResponse> | Observable<CategoriesListResponse> | CategoriesListResponse;
|
|
132
|
+
|
|
133
|
+
findAllApplications(
|
|
134
|
+
request: Empty,
|
|
135
|
+
): Promise<ApplicationsListResponse> | Observable<ApplicationsListResponse> | ApplicationsListResponse;
|
|
136
|
+
|
|
137
|
+
findAllTags(request: QueryTagsRequest): Promise<TagsListResponse> | Observable<TagsListResponse> | TagsListResponse;
|
|
138
|
+
|
|
139
|
+
createCategory(
|
|
140
|
+
request: CreateCategoryRequest,
|
|
141
|
+
): Promise<CategoryResponse> | Observable<CategoryResponse> | CategoryResponse;
|
|
142
|
+
|
|
143
|
+
createApplication(
|
|
144
|
+
request: CreateApplicationRequest,
|
|
145
|
+
): Promise<ApplicationResponse> | Observable<ApplicationResponse> | ApplicationResponse;
|
|
146
|
+
|
|
147
|
+
updateApplication(
|
|
148
|
+
request: UpdateApplicationRequest,
|
|
149
|
+
): Promise<ApplicationResponse> | Observable<ApplicationResponse> | ApplicationResponse;
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* Mint a presigned PUT URL for an application icon SVG (proxies upload-service,
|
|
153
|
+
* kind=ICON → public/icons/). Client PUTs the bytes to upload_url, then passes
|
|
154
|
+
* icon_url to Create/UpdateApplication.
|
|
155
|
+
*/
|
|
156
|
+
|
|
157
|
+
createIconUploadUrl(
|
|
158
|
+
request: CreateIconUploadUrlRequest,
|
|
159
|
+
): Promise<IconUploadUrlResponse> | Observable<IconUploadUrlResponse> | IconUploadUrlResponse;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
export function TaxonomyServiceControllerMethods() {
|
|
163
|
+
return function (constructor: Function) {
|
|
164
|
+
const grpcMethods: string[] = [
|
|
165
|
+
"findAllCategories",
|
|
166
|
+
"findAllApplications",
|
|
167
|
+
"findAllTags",
|
|
168
|
+
"createCategory",
|
|
169
|
+
"createApplication",
|
|
170
|
+
"updateApplication",
|
|
171
|
+
"createIconUploadUrl",
|
|
172
|
+
];
|
|
173
|
+
for (const method of grpcMethods) {
|
|
174
|
+
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
175
|
+
GrpcMethod("TaxonomyService", method)(constructor.prototype[method], method, descriptor);
|
|
176
|
+
}
|
|
177
|
+
const grpcStreamMethods: string[] = [];
|
|
178
|
+
for (const method of grpcStreamMethods) {
|
|
179
|
+
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
|
180
|
+
GrpcStreamMethod("TaxonomyService", method)(constructor.prototype[method], method, descriptor);
|
|
181
|
+
}
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
export const TAXONOMY_SERVICE_NAME = "TaxonomyService";
|