@aepstore-dev/contracts 1.14.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/users.ts +27 -0
- package/package.json +1 -1
- package/proto/users.proto +18 -0
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/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 {
|