chore: auto-generate protobuf files [skip ci]
This commit is contained in:
@@ -61,6 +61,14 @@ export interface CreateProfileResponse {
|
||||
success: boolean;
|
||||
}
|
||||
|
||||
export interface SoftDeleteProfileRequest {
|
||||
userId: string;
|
||||
}
|
||||
|
||||
export interface SoftDeleteProfileResponse {
|
||||
success: boolean;
|
||||
}
|
||||
|
||||
export const USERS_V1_PACKAGE_NAME = "users.v1";
|
||||
|
||||
export interface UsersServiceClient {
|
||||
@@ -71,6 +79,8 @@ export interface UsersServiceClient {
|
||||
/** Для системного использования (вызывается из Auth/Admin) */
|
||||
|
||||
createProfile(request: CreateProfileRequest, metadata?: Metadata): Observable<CreateProfileResponse>;
|
||||
|
||||
softDeleteProfile(request: SoftDeleteProfileRequest, metadata?: Metadata): Observable<SoftDeleteProfileResponse>;
|
||||
}
|
||||
|
||||
export interface UsersServiceController {
|
||||
@@ -90,11 +100,16 @@ export interface UsersServiceController {
|
||||
request: CreateProfileRequest,
|
||||
metadata?: Metadata,
|
||||
): Promise<CreateProfileResponse> | Observable<CreateProfileResponse> | CreateProfileResponse;
|
||||
|
||||
softDeleteProfile(
|
||||
request: SoftDeleteProfileRequest,
|
||||
metadata?: Metadata,
|
||||
): Promise<SoftDeleteProfileResponse> | Observable<SoftDeleteProfileResponse> | SoftDeleteProfileResponse;
|
||||
}
|
||||
|
||||
export function UsersServiceControllerMethods() {
|
||||
return function (constructor: Function) {
|
||||
const grpcMethods: string[] = ["getProfile", "updateProfile", "createProfile"];
|
||||
const grpcMethods: string[] = ["getProfile", "updateProfile", "createProfile", "softDeleteProfile"];
|
||||
for (const method of grpcMethods) {
|
||||
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
||||
GrpcMethod("UsersService", method)(constructor.prototype[method], method, descriptor);
|
||||
|
||||
Reference in New Issue
Block a user