// Code generated by protoc-gen-ts_proto. DO NOT EDIT. // versions: // protoc-gen-ts_proto v2.11.6 // protoc v4.25.9 // source: admin/admin-account.proto /* eslint-disable */ import type { Metadata } from "@grpc/grpc-js"; import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices"; import { Observable } from "rxjs"; export const protobufPackage = "admin.account.v1"; export interface AdminResetPasswordRequest { userId: string; newPassword: string; } export interface AdminResetPasswordResponse { success: boolean; message: string; } export interface CreateUserRequest { username: string; password: string; roles: string[]; } export interface CreateUserResponse { success: boolean; message: string; } export interface DeleteUserRequest { userId: string; } export interface DeleteUserResponse { success: boolean; message: string; } export interface ChangeDataRequest { userId: string; sessionId: string; email?: string | undefined; phone?: string | undefined; fullName?: string | undefined; avatarUrl?: string | undefined; customStatusText?: string | undefined; customStatusEmoji?: string | undefined; timezone?: string | undefined; language?: string | undefined; isPublic?: boolean | undefined; } export interface ChangeDataResponse { success: boolean; message: string; } export interface AssignRoleRequest { userId: string; /** В gRPC передаем как string, внутри преобразуем в Int */ roleId: string; } export interface AssignRoleResponse { success: boolean; message: string; } export interface RevokeRoleRequest { userId: string; roleId: string; } export interface RevokeRoleResponse { success: boolean; message: string; } export interface BlockUserRequest { /** Кого блокируем */ userId: string; /** Кто блокирует */ adminId: string; reason?: string | undefined; } export interface BlockUserResponse { success: boolean; message: string; } export interface UnblockUserRequest { userId: string; adminId: string; } export interface UnblockUserResponse { success: boolean; message: string; } export interface BlockIpRequest { ipAddress: string; adminId: string; reason?: string | undefined; } export interface BlockIpResponse { success: boolean; message: string; } export interface UnblockIpRequest { ipAddress: string; adminId: string; } export interface UnblockIpResponse { success: boolean; message: string; } /** Можно оставить пустым, так как нам не нужны входные данные */ export interface SyncUsersToSearchRequest { } export interface SyncUsersToSearchResponse { success: boolean; message: string; } export const ADMIN_ACCOUNT_V1_PACKAGE_NAME = "admin.account.v1"; export interface AdminAccountServiceClient { adminResetPassword(request: AdminResetPasswordRequest, metadata?: Metadata): Observable; createUser(request: CreateUserRequest, metadata?: Metadata): Observable; deleteUser(request: DeleteUserRequest, metadata?: Metadata): Observable; changeData(request: ChangeDataRequest, metadata?: Metadata): Observable; assignRole(request: AssignRoleRequest, metadata?: Metadata): Observable; revokeRole(request: RevokeRoleRequest, metadata?: Metadata): Observable; blockUser(request: BlockUserRequest, metadata?: Metadata): Observable; unblockUser(request: UnblockUserRequest, metadata?: Metadata): Observable; blockIp(request: BlockIpRequest, metadata?: Metadata): Observable; unblockIp(request: UnblockIpRequest, metadata?: Metadata): Observable; syncUsersToSearch(request: SyncUsersToSearchRequest, metadata?: Metadata): Observable; } export interface AdminAccountServiceController { adminResetPassword( request: AdminResetPasswordRequest, metadata?: Metadata, ): Promise | Observable | AdminResetPasswordResponse; createUser( request: CreateUserRequest, metadata?: Metadata, ): Promise | Observable | CreateUserResponse; deleteUser( request: DeleteUserRequest, metadata?: Metadata, ): Promise | Observable | DeleteUserResponse; changeData( request: ChangeDataRequest, metadata?: Metadata, ): Promise | Observable | ChangeDataResponse; assignRole( request: AssignRoleRequest, metadata?: Metadata, ): Promise | Observable | AssignRoleResponse; revokeRole( request: RevokeRoleRequest, metadata?: Metadata, ): Promise | Observable | RevokeRoleResponse; blockUser( request: BlockUserRequest, metadata?: Metadata, ): Promise | Observable | BlockUserResponse; unblockUser( request: UnblockUserRequest, metadata?: Metadata, ): Promise | Observable | UnblockUserResponse; blockIp( request: BlockIpRequest, metadata?: Metadata, ): Promise | Observable | BlockIpResponse; unblockIp( request: UnblockIpRequest, metadata?: Metadata, ): Promise | Observable | UnblockIpResponse; syncUsersToSearch( request: SyncUsersToSearchRequest, metadata?: Metadata, ): Promise | Observable | SyncUsersToSearchResponse; } export function AdminAccountServiceControllerMethods() { return function (constructor: Function) { const grpcMethods: string[] = [ "adminResetPassword", "createUser", "deleteUser", "changeData", "assignRole", "revokeRole", "blockUser", "unblockUser", "blockIp", "unblockIp", "syncUsersToSearch", ]; for (const method of grpcMethods) { const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method); GrpcMethod("AdminAccountService", method)(constructor.prototype[method], method, descriptor); } const grpcStreamMethods: string[] = []; for (const method of grpcStreamMethods) { const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method); GrpcStreamMethod("AdminAccountService", method)(constructor.prototype[method], method, descriptor); } }; } export const ADMIN_ACCOUNT_SERVICE_NAME = "AdminAccountService";