chore: auto-generate protobuf files [skip ci]

This commit is contained in:
github-actions[bot]
2026-04-11 17:05:04 +00:00
parent 8146b671dd
commit bd2ccecd5d
6 changed files with 313 additions and 53 deletions

View File

@@ -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);