@aepstore-dev/contracts 1.19.0 → 1.21.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/products.ts +9 -2
- package/package.json +35 -35
- package/proto/activity.proto +195 -195
- package/proto/auth.proto +126 -126
- package/proto/mail.proto +42 -42
- package/proto/payments.proto +203 -203
- package/proto/products.proto +359 -353
- package/proto/support.proto +118 -118
- package/proto/taxonomy.proto +78 -78
- package/proto/upload.proto +150 -150
- package/proto/users.proto +278 -278
package/gen/products.ts
CHANGED
|
@@ -109,6 +109,8 @@ export interface Product {
|
|
|
109
109
|
isViewed: boolean;
|
|
110
110
|
/** owner-only, current-month revenue (Decimal as string) */
|
|
111
111
|
revenue: string;
|
|
112
|
+
/** viewer has a COMPLETED purchase of this product */
|
|
113
|
+
isBuyed: boolean;
|
|
112
114
|
/** Popularity (populated by GetTopProduct / GetPopularProducts). */
|
|
113
115
|
popularityScore: string;
|
|
114
116
|
}
|
|
@@ -121,6 +123,11 @@ export interface ProductResponse {
|
|
|
121
123
|
relatedProducts: Product[];
|
|
122
124
|
}
|
|
123
125
|
|
|
126
|
+
export interface TopProductRequest {
|
|
127
|
+
/** Optional. If set, the top product is searched only among this seller's products. */
|
|
128
|
+
userId: string;
|
|
129
|
+
}
|
|
130
|
+
|
|
124
131
|
export interface ProductsListResponse {
|
|
125
132
|
items: Product[];
|
|
126
133
|
total: number;
|
|
@@ -368,7 +375,7 @@ export interface ProductsServiceClient {
|
|
|
368
375
|
|
|
369
376
|
getAttachmentDownloadUrl(request: GetAttachmentDownloadUrlRequest): Observable<AttachmentDownloadUrlResponse>;
|
|
370
377
|
|
|
371
|
-
getTopProduct(request:
|
|
378
|
+
getTopProduct(request: TopProductRequest): Observable<ProductResponse>;
|
|
372
379
|
|
|
373
380
|
getPopularProducts(request: QueryProductsRequest): Observable<ProductsListResponse>;
|
|
374
381
|
}
|
|
@@ -444,7 +451,7 @@ export interface ProductsServiceController {
|
|
|
444
451
|
request: GetAttachmentDownloadUrlRequest,
|
|
445
452
|
): Promise<AttachmentDownloadUrlResponse> | Observable<AttachmentDownloadUrlResponse> | AttachmentDownloadUrlResponse;
|
|
446
453
|
|
|
447
|
-
getTopProduct(request:
|
|
454
|
+
getTopProduct(request: TopProductRequest): Promise<ProductResponse> | Observable<ProductResponse> | ProductResponse;
|
|
448
455
|
|
|
449
456
|
getPopularProducts(
|
|
450
457
|
request: QueryProductsRequest,
|
package/package.json
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@aepstore-dev/contracts",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "Protobuf definitions for aepstore microservices",
|
|
5
|
-
"main": "./dist/index.js",
|
|
6
|
-
"types": "./dist/index.d.ts",
|
|
7
|
-
"scripts": {
|
|
8
|
-
"generate": "node scripts/generate.cjs",
|
|
9
|
-
"build": "tsc -p tsconfig.build.json"
|
|
10
|
-
},
|
|
11
|
-
"files": [
|
|
12
|
-
"dist",
|
|
13
|
-
"proto",
|
|
14
|
-
"gen"
|
|
15
|
-
],
|
|
16
|
-
"publishConfig": {
|
|
17
|
-
"access": "public"
|
|
18
|
-
},
|
|
19
|
-
"author": {
|
|
20
|
-
"name": "torroixq",
|
|
21
|
-
"email": "cato.ixq@gmail.com"
|
|
22
|
-
},
|
|
23
|
-
"peerDependencies": {
|
|
24
|
-
"@nestjs/microservices": "^11.1.11",
|
|
25
|
-
"rxjs": "^7.8.2"
|
|
26
|
-
},
|
|
27
|
-
"devDependencies": {
|
|
28
|
-
"@nestjs/microservices": "^11.1.11",
|
|
29
|
-
"@protobuf-ts/protoc": "^2.9.4",
|
|
30
|
-
"@types/node": "^25.0.3",
|
|
31
|
-
"rxjs": "^7.8.2",
|
|
32
|
-
"ts-proto": "^2.10.1",
|
|
33
|
-
"typescript": "^5.9.3"
|
|
34
|
-
}
|
|
35
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@aepstore-dev/contracts",
|
|
3
|
+
"version": "1.21.0",
|
|
4
|
+
"description": "Protobuf definitions for aepstore microservices",
|
|
5
|
+
"main": "./dist/index.js",
|
|
6
|
+
"types": "./dist/index.d.ts",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"generate": "node scripts/generate.cjs",
|
|
9
|
+
"build": "tsc -p tsconfig.build.json"
|
|
10
|
+
},
|
|
11
|
+
"files": [
|
|
12
|
+
"dist",
|
|
13
|
+
"proto",
|
|
14
|
+
"gen"
|
|
15
|
+
],
|
|
16
|
+
"publishConfig": {
|
|
17
|
+
"access": "public"
|
|
18
|
+
},
|
|
19
|
+
"author": {
|
|
20
|
+
"name": "torroixq",
|
|
21
|
+
"email": "cato.ixq@gmail.com"
|
|
22
|
+
},
|
|
23
|
+
"peerDependencies": {
|
|
24
|
+
"@nestjs/microservices": "^11.1.11",
|
|
25
|
+
"rxjs": "^7.8.2"
|
|
26
|
+
},
|
|
27
|
+
"devDependencies": {
|
|
28
|
+
"@nestjs/microservices": "^11.1.11",
|
|
29
|
+
"@protobuf-ts/protoc": "^2.9.4",
|
|
30
|
+
"@types/node": "^25.0.3",
|
|
31
|
+
"rxjs": "^7.8.2",
|
|
32
|
+
"ts-proto": "^2.10.1",
|
|
33
|
+
"typescript": "^5.9.3"
|
|
34
|
+
}
|
|
35
|
+
}
|
package/proto/activity.proto
CHANGED
|
@@ -1,195 +1,195 @@
|
|
|
1
|
-
syntax = "proto3";
|
|
2
|
-
|
|
3
|
-
package activity.v1;
|
|
4
|
-
|
|
5
|
-
service ActivityService {
|
|
6
|
-
// Reports
|
|
7
|
-
rpc ReportCreate(CreateReportRequest) returns (ReportResponse);
|
|
8
|
-
rpc ReportList(ListReportsRequest) returns (ReportsListResponse);
|
|
9
|
-
rpc ReportGet(ReportIdRequest) returns (ReportResponse);
|
|
10
|
-
rpc ReportModerate(ModerateReportRequest) returns (ReportResponse);
|
|
11
|
-
|
|
12
|
-
// Report categories
|
|
13
|
-
rpc ReportCategoryCreate(CreateReportCategoryRequest) returns (ReportCategoryResponse);
|
|
14
|
-
rpc ReportCategoryList(ListReportCategoriesRequest) returns (ReportCategoriesListResponse);
|
|
15
|
-
rpc ReportCategoryGet(ReportCategoryIdRequest) returns (ReportCategoryResponse);
|
|
16
|
-
rpc ReportCategoryUpdate(UpdateReportCategoryRequest) returns (ReportCategoryResponse);
|
|
17
|
-
rpc ReportCategoryDelete(ReportCategoryIdRequest) returns (Ok);
|
|
18
|
-
|
|
19
|
-
// Reviews
|
|
20
|
-
rpc ReviewCreate(CreateReviewRequest) returns (ReviewResponse);
|
|
21
|
-
rpc GetProductReviews(GetProductReviewsRequest) returns (ReviewsListResponse);
|
|
22
|
-
|
|
23
|
-
// NOTE: subscriptions live in users-service (CreateSubscription/DeleteSubscription).
|
|
24
|
-
// The former activity.ToggleSubscription was a duplicate write path — removed.
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
// =================================================================
|
|
28
|
-
// Enums
|
|
29
|
-
// =================================================================
|
|
30
|
-
|
|
31
|
-
// Member names match the DB enum string values exactly (enums: String on the
|
|
32
|
-
// wire), so DB values pass straight through with no mapping. UNSPECIFIED=0
|
|
33
|
-
// represents "no value / not provided" (e.g. an optional list filter).
|
|
34
|
-
enum ReportType {
|
|
35
|
-
REPORT_TYPE_UNSPECIFIED = 0;
|
|
36
|
-
PRODUCT = 1;
|
|
37
|
-
PROFILE = 2;
|
|
38
|
-
REVIEW = 3;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
enum ReportStatus {
|
|
42
|
-
REPORT_STATUS_UNSPECIFIED = 0;
|
|
43
|
-
PENDING = 1;
|
|
44
|
-
IN_PROGRESS = 2;
|
|
45
|
-
RESOLVED = 3;
|
|
46
|
-
DISMISSED = 4;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
// =================================================================
|
|
50
|
-
// Reports
|
|
51
|
-
// =================================================================
|
|
52
|
-
|
|
53
|
-
message Report {
|
|
54
|
-
string id = 1;
|
|
55
|
-
ReportType type = 2;
|
|
56
|
-
string object_id = 3;
|
|
57
|
-
string user_id = 4;
|
|
58
|
-
string product_id = 5;
|
|
59
|
-
repeated ReportCategory categories = 6;
|
|
60
|
-
string message = 7;
|
|
61
|
-
ReportStatus status = 8;
|
|
62
|
-
string created_at = 9;
|
|
63
|
-
string updated_at = 10;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
message ReportResponse {
|
|
67
|
-
Report report = 1;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
message CreateReportRequest {
|
|
71
|
-
string user_id = 1;
|
|
72
|
-
ReportType type = 2;
|
|
73
|
-
string object_id = 3;
|
|
74
|
-
repeated string categories = 4; // names
|
|
75
|
-
string message = 5;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
message ListReportsRequest {
|
|
79
|
-
ReportType type = 1;
|
|
80
|
-
ReportStatus status = 2;
|
|
81
|
-
string user_id = 3;
|
|
82
|
-
string object_id = 4;
|
|
83
|
-
int32 page = 5;
|
|
84
|
-
int32 limit = 6;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
message ReportsListResponse {
|
|
88
|
-
repeated Report items = 1;
|
|
89
|
-
int32 total = 2;
|
|
90
|
-
int32 page = 3;
|
|
91
|
-
int32 limit = 4;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
message ReportIdRequest {
|
|
95
|
-
string id = 1;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
message ModerateReportRequest {
|
|
99
|
-
string id = 1;
|
|
100
|
-
string action = 2; // 'accept' | 'reject'
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
// =================================================================
|
|
104
|
-
// Report categories
|
|
105
|
-
// =================================================================
|
|
106
|
-
|
|
107
|
-
message ReportCategory {
|
|
108
|
-
string id = 1;
|
|
109
|
-
string name = 2;
|
|
110
|
-
ReportType type = 3;
|
|
111
|
-
string icon = 4;
|
|
112
|
-
string description = 5;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
message ReportCategoryResponse {
|
|
116
|
-
ReportCategory category = 1;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
message CreateReportCategoryRequest {
|
|
120
|
-
string name = 1;
|
|
121
|
-
ReportType type = 2;
|
|
122
|
-
string icon = 3;
|
|
123
|
-
string description = 4;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
message UpdateReportCategoryRequest {
|
|
127
|
-
string id = 1;
|
|
128
|
-
string name = 2;
|
|
129
|
-
string icon = 3;
|
|
130
|
-
string description = 4;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
message ListReportCategoriesRequest {
|
|
134
|
-
ReportType type = 1;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
message ReportCategoriesListResponse {
|
|
138
|
-
repeated ReportCategory items = 1;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
message ReportCategoryIdRequest {
|
|
142
|
-
string id = 1;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
// =================================================================
|
|
146
|
-
// Reviews
|
|
147
|
-
// =================================================================
|
|
148
|
-
|
|
149
|
-
message Review {
|
|
150
|
-
string id = 1;
|
|
151
|
-
int32 rating = 2;
|
|
152
|
-
string text = 3;
|
|
153
|
-
string user_id = 4;
|
|
154
|
-
string product_id = 5;
|
|
155
|
-
string created_at = 6;
|
|
156
|
-
string updated_at = 7;
|
|
157
|
-
string user_username = 8;
|
|
158
|
-
string user_avatar_url = 9;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
message ReviewResponse {
|
|
162
|
-
Review review = 1;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
message CreateReviewRequest {
|
|
166
|
-
string user_id = 1;
|
|
167
|
-
string product_id = 2;
|
|
168
|
-
int32 rating = 3;
|
|
169
|
-
string text = 4;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
message GetProductReviewsRequest {
|
|
173
|
-
string product_id = 1;
|
|
174
|
-
int32 page = 2;
|
|
175
|
-
int32 limit = 3;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
message ReviewsListResponse {
|
|
179
|
-
repeated Review items = 1;
|
|
180
|
-
int32 total = 2;
|
|
181
|
-
int32 page = 3;
|
|
182
|
-
int32 limit = 4;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
// =================================================================
|
|
186
|
-
// Subscriptions
|
|
187
|
-
// =================================================================
|
|
188
|
-
|
|
189
|
-
// =================================================================
|
|
190
|
-
// Misc
|
|
191
|
-
// =================================================================
|
|
192
|
-
|
|
193
|
-
message Ok {
|
|
194
|
-
bool ok = 1;
|
|
195
|
-
}
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package activity.v1;
|
|
4
|
+
|
|
5
|
+
service ActivityService {
|
|
6
|
+
// Reports
|
|
7
|
+
rpc ReportCreate(CreateReportRequest) returns (ReportResponse);
|
|
8
|
+
rpc ReportList(ListReportsRequest) returns (ReportsListResponse);
|
|
9
|
+
rpc ReportGet(ReportIdRequest) returns (ReportResponse);
|
|
10
|
+
rpc ReportModerate(ModerateReportRequest) returns (ReportResponse);
|
|
11
|
+
|
|
12
|
+
// Report categories
|
|
13
|
+
rpc ReportCategoryCreate(CreateReportCategoryRequest) returns (ReportCategoryResponse);
|
|
14
|
+
rpc ReportCategoryList(ListReportCategoriesRequest) returns (ReportCategoriesListResponse);
|
|
15
|
+
rpc ReportCategoryGet(ReportCategoryIdRequest) returns (ReportCategoryResponse);
|
|
16
|
+
rpc ReportCategoryUpdate(UpdateReportCategoryRequest) returns (ReportCategoryResponse);
|
|
17
|
+
rpc ReportCategoryDelete(ReportCategoryIdRequest) returns (Ok);
|
|
18
|
+
|
|
19
|
+
// Reviews
|
|
20
|
+
rpc ReviewCreate(CreateReviewRequest) returns (ReviewResponse);
|
|
21
|
+
rpc GetProductReviews(GetProductReviewsRequest) returns (ReviewsListResponse);
|
|
22
|
+
|
|
23
|
+
// NOTE: subscriptions live in users-service (CreateSubscription/DeleteSubscription).
|
|
24
|
+
// The former activity.ToggleSubscription was a duplicate write path — removed.
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// =================================================================
|
|
28
|
+
// Enums
|
|
29
|
+
// =================================================================
|
|
30
|
+
|
|
31
|
+
// Member names match the DB enum string values exactly (enums: String on the
|
|
32
|
+
// wire), so DB values pass straight through with no mapping. UNSPECIFIED=0
|
|
33
|
+
// represents "no value / not provided" (e.g. an optional list filter).
|
|
34
|
+
enum ReportType {
|
|
35
|
+
REPORT_TYPE_UNSPECIFIED = 0;
|
|
36
|
+
PRODUCT = 1;
|
|
37
|
+
PROFILE = 2;
|
|
38
|
+
REVIEW = 3;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
enum ReportStatus {
|
|
42
|
+
REPORT_STATUS_UNSPECIFIED = 0;
|
|
43
|
+
PENDING = 1;
|
|
44
|
+
IN_PROGRESS = 2;
|
|
45
|
+
RESOLVED = 3;
|
|
46
|
+
DISMISSED = 4;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// =================================================================
|
|
50
|
+
// Reports
|
|
51
|
+
// =================================================================
|
|
52
|
+
|
|
53
|
+
message Report {
|
|
54
|
+
string id = 1;
|
|
55
|
+
ReportType type = 2;
|
|
56
|
+
string object_id = 3;
|
|
57
|
+
string user_id = 4;
|
|
58
|
+
string product_id = 5;
|
|
59
|
+
repeated ReportCategory categories = 6;
|
|
60
|
+
string message = 7;
|
|
61
|
+
ReportStatus status = 8;
|
|
62
|
+
string created_at = 9;
|
|
63
|
+
string updated_at = 10;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
message ReportResponse {
|
|
67
|
+
Report report = 1;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
message CreateReportRequest {
|
|
71
|
+
string user_id = 1;
|
|
72
|
+
ReportType type = 2;
|
|
73
|
+
string object_id = 3;
|
|
74
|
+
repeated string categories = 4; // names
|
|
75
|
+
string message = 5;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
message ListReportsRequest {
|
|
79
|
+
ReportType type = 1;
|
|
80
|
+
ReportStatus status = 2;
|
|
81
|
+
string user_id = 3;
|
|
82
|
+
string object_id = 4;
|
|
83
|
+
int32 page = 5;
|
|
84
|
+
int32 limit = 6;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
message ReportsListResponse {
|
|
88
|
+
repeated Report items = 1;
|
|
89
|
+
int32 total = 2;
|
|
90
|
+
int32 page = 3;
|
|
91
|
+
int32 limit = 4;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
message ReportIdRequest {
|
|
95
|
+
string id = 1;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
message ModerateReportRequest {
|
|
99
|
+
string id = 1;
|
|
100
|
+
string action = 2; // 'accept' | 'reject'
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
// =================================================================
|
|
104
|
+
// Report categories
|
|
105
|
+
// =================================================================
|
|
106
|
+
|
|
107
|
+
message ReportCategory {
|
|
108
|
+
string id = 1;
|
|
109
|
+
string name = 2;
|
|
110
|
+
ReportType type = 3;
|
|
111
|
+
string icon = 4;
|
|
112
|
+
string description = 5;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
message ReportCategoryResponse {
|
|
116
|
+
ReportCategory category = 1;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
message CreateReportCategoryRequest {
|
|
120
|
+
string name = 1;
|
|
121
|
+
ReportType type = 2;
|
|
122
|
+
string icon = 3;
|
|
123
|
+
string description = 4;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
message UpdateReportCategoryRequest {
|
|
127
|
+
string id = 1;
|
|
128
|
+
string name = 2;
|
|
129
|
+
string icon = 3;
|
|
130
|
+
string description = 4;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
message ListReportCategoriesRequest {
|
|
134
|
+
ReportType type = 1;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
message ReportCategoriesListResponse {
|
|
138
|
+
repeated ReportCategory items = 1;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
message ReportCategoryIdRequest {
|
|
142
|
+
string id = 1;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
// =================================================================
|
|
146
|
+
// Reviews
|
|
147
|
+
// =================================================================
|
|
148
|
+
|
|
149
|
+
message Review {
|
|
150
|
+
string id = 1;
|
|
151
|
+
int32 rating = 2;
|
|
152
|
+
string text = 3;
|
|
153
|
+
string user_id = 4;
|
|
154
|
+
string product_id = 5;
|
|
155
|
+
string created_at = 6;
|
|
156
|
+
string updated_at = 7;
|
|
157
|
+
string user_username = 8;
|
|
158
|
+
string user_avatar_url = 9;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
message ReviewResponse {
|
|
162
|
+
Review review = 1;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
message CreateReviewRequest {
|
|
166
|
+
string user_id = 1;
|
|
167
|
+
string product_id = 2;
|
|
168
|
+
int32 rating = 3;
|
|
169
|
+
string text = 4;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
message GetProductReviewsRequest {
|
|
173
|
+
string product_id = 1;
|
|
174
|
+
int32 page = 2;
|
|
175
|
+
int32 limit = 3;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
message ReviewsListResponse {
|
|
179
|
+
repeated Review items = 1;
|
|
180
|
+
int32 total = 2;
|
|
181
|
+
int32 page = 3;
|
|
182
|
+
int32 limit = 4;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
// =================================================================
|
|
186
|
+
// Subscriptions
|
|
187
|
+
// =================================================================
|
|
188
|
+
|
|
189
|
+
// =================================================================
|
|
190
|
+
// Misc
|
|
191
|
+
// =================================================================
|
|
192
|
+
|
|
193
|
+
message Ok {
|
|
194
|
+
bool ok = 1;
|
|
195
|
+
}
|