@aepstore-dev/contracts 1.13.0 → 1.15.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 +0 -20
- package/gen/users.ts +27 -0
- package/package.json +1 -1
- package/proto/activity.proto +2 -11
- package/proto/users.proto +18 -0
package/gen/activity.ts
CHANGED
|
@@ -158,15 +158,6 @@ export interface ReviewsListResponse {
|
|
|
158
158
|
limit: number;
|
|
159
159
|
}
|
|
160
160
|
|
|
161
|
-
export interface ToggleSubscriptionRequest {
|
|
162
|
-
userId: string;
|
|
163
|
-
targetUsername: string;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
export interface ToggleSubscriptionResponse {
|
|
167
|
-
subscribed: boolean;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
161
|
export interface Ok {
|
|
171
162
|
ok: boolean;
|
|
172
163
|
}
|
|
@@ -201,10 +192,6 @@ export interface ActivityServiceClient {
|
|
|
201
192
|
reviewCreate(request: CreateReviewRequest): Observable<ReviewResponse>;
|
|
202
193
|
|
|
203
194
|
getProductReviews(request: GetProductReviewsRequest): Observable<ReviewsListResponse>;
|
|
204
|
-
|
|
205
|
-
/** Subscriptions */
|
|
206
|
-
|
|
207
|
-
toggleSubscription(request: ToggleSubscriptionRequest): Observable<ToggleSubscriptionResponse>;
|
|
208
195
|
}
|
|
209
196
|
|
|
210
197
|
export interface ActivityServiceController {
|
|
@@ -247,12 +234,6 @@ export interface ActivityServiceController {
|
|
|
247
234
|
getProductReviews(
|
|
248
235
|
request: GetProductReviewsRequest,
|
|
249
236
|
): Promise<ReviewsListResponse> | Observable<ReviewsListResponse> | ReviewsListResponse;
|
|
250
|
-
|
|
251
|
-
/** Subscriptions */
|
|
252
|
-
|
|
253
|
-
toggleSubscription(
|
|
254
|
-
request: ToggleSubscriptionRequest,
|
|
255
|
-
): Promise<ToggleSubscriptionResponse> | Observable<ToggleSubscriptionResponse> | ToggleSubscriptionResponse;
|
|
256
237
|
}
|
|
257
238
|
|
|
258
239
|
export function ActivityServiceControllerMethods() {
|
|
@@ -269,7 +250,6 @@ export function ActivityServiceControllerMethods() {
|
|
|
269
250
|
"reportCategoryDelete",
|
|
270
251
|
"reviewCreate",
|
|
271
252
|
"getProductReviews",
|
|
272
|
-
"toggleSubscription",
|
|
273
253
|
];
|
|
274
254
|
for (const method of grpcMethods) {
|
|
275
255
|
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
package/gen/users.ts
CHANGED
|
@@ -30,6 +30,23 @@ export interface User {
|
|
|
30
30
|
/** ISO 8601 */
|
|
31
31
|
createdAt: string;
|
|
32
32
|
updatedAt: string;
|
|
33
|
+
isBanned: boolean;
|
|
34
|
+
/** ISO 8601, empty = permanent/none */
|
|
35
|
+
bannedUntil: string;
|
|
36
|
+
banReason: string;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface BanUserRequest {
|
|
40
|
+
adminId: string;
|
|
41
|
+
userId: string;
|
|
42
|
+
reason: string;
|
|
43
|
+
/** ISO 8601; empty = permanent ban */
|
|
44
|
+
until: string;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export interface UnbanUserRequest {
|
|
48
|
+
adminId: string;
|
|
49
|
+
userId: string;
|
|
33
50
|
}
|
|
34
51
|
|
|
35
52
|
export interface Country {
|
|
@@ -239,6 +256,10 @@ export interface UsersServiceClient {
|
|
|
239
256
|
createSubscription(request: SubscriptionRequest): Observable<SubscriptionResponse>;
|
|
240
257
|
|
|
241
258
|
deleteSubscription(request: SubscriptionRequest): Observable<SubscriptionResponse>;
|
|
259
|
+
|
|
260
|
+
banUser(request: BanUserRequest): Observable<UserResponse>;
|
|
261
|
+
|
|
262
|
+
unbanUser(request: UnbanUserRequest): Observable<UserResponse>;
|
|
242
263
|
}
|
|
243
264
|
|
|
244
265
|
export interface UsersServiceController {
|
|
@@ -275,6 +296,10 @@ export interface UsersServiceController {
|
|
|
275
296
|
deleteSubscription(
|
|
276
297
|
request: SubscriptionRequest,
|
|
277
298
|
): Promise<SubscriptionResponse> | Observable<SubscriptionResponse> | SubscriptionResponse;
|
|
299
|
+
|
|
300
|
+
banUser(request: BanUserRequest): Promise<UserResponse> | Observable<UserResponse> | UserResponse;
|
|
301
|
+
|
|
302
|
+
unbanUser(request: UnbanUserRequest): Promise<UserResponse> | Observable<UserResponse> | UserResponse;
|
|
278
303
|
}
|
|
279
304
|
|
|
280
305
|
export function UsersServiceControllerMethods() {
|
|
@@ -290,6 +315,8 @@ export function UsersServiceControllerMethods() {
|
|
|
290
315
|
"getUserFields",
|
|
291
316
|
"createSubscription",
|
|
292
317
|
"deleteSubscription",
|
|
318
|
+
"banUser",
|
|
319
|
+
"unbanUser",
|
|
293
320
|
];
|
|
294
321
|
for (const method of grpcMethods) {
|
|
295
322
|
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
package/package.json
CHANGED
package/proto/activity.proto
CHANGED
|
@@ -20,8 +20,8 @@ service ActivityService {
|
|
|
20
20
|
rpc ReviewCreate(CreateReviewRequest) returns (ReviewResponse);
|
|
21
21
|
rpc GetProductReviews(GetProductReviewsRequest) returns (ReviewsListResponse);
|
|
22
22
|
|
|
23
|
-
//
|
|
24
|
-
|
|
23
|
+
// NOTE: subscriptions live in users-service (CreateSubscription/DeleteSubscription).
|
|
24
|
+
// The former activity.ToggleSubscription was a duplicate write path — removed.
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
// =================================================================
|
|
@@ -186,15 +186,6 @@ message ReviewsListResponse {
|
|
|
186
186
|
// Subscriptions
|
|
187
187
|
// =================================================================
|
|
188
188
|
|
|
189
|
-
message ToggleSubscriptionRequest {
|
|
190
|
-
string user_id = 1;
|
|
191
|
-
string target_username = 2;
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
message ToggleSubscriptionResponse {
|
|
195
|
-
bool subscribed = 1;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
189
|
// =================================================================
|
|
199
190
|
// Misc
|
|
200
191
|
// =================================================================
|
package/proto/users.proto
CHANGED
|
@@ -14,6 +14,9 @@ service UsersService {
|
|
|
14
14
|
|
|
15
15
|
rpc CreateSubscription(SubscriptionRequest) returns (SubscriptionResponse);
|
|
16
16
|
rpc DeleteSubscription(SubscriptionRequest) returns (SubscriptionResponse);
|
|
17
|
+
|
|
18
|
+
rpc BanUser(BanUserRequest) returns (UserResponse);
|
|
19
|
+
rpc UnbanUser(UnbanUserRequest) returns (UserResponse);
|
|
17
20
|
}
|
|
18
21
|
|
|
19
22
|
// =================================================================
|
|
@@ -29,6 +32,21 @@ message User {
|
|
|
29
32
|
string role = 6; // primary role for backwards compat
|
|
30
33
|
string created_at = 7; // ISO 8601
|
|
31
34
|
string updated_at = 8;
|
|
35
|
+
bool is_banned = 9;
|
|
36
|
+
string banned_until = 10; // ISO 8601, empty = permanent/none
|
|
37
|
+
string ban_reason = 11;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
message BanUserRequest {
|
|
41
|
+
string admin_id = 1;
|
|
42
|
+
string user_id = 2;
|
|
43
|
+
string reason = 3;
|
|
44
|
+
string until = 4; // ISO 8601; empty = permanent ban
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
message UnbanUserRequest {
|
|
48
|
+
string admin_id = 1;
|
|
49
|
+
string user_id = 2;
|
|
32
50
|
}
|
|
33
51
|
|
|
34
52
|
message Country {
|