chore: auto-generate protobuf files [skip ci]
This commit is contained in:
@@ -36,10 +36,25 @@ export interface GetAccountResponse {
|
||||
hasPin: boolean;
|
||||
}
|
||||
|
||||
export interface ChangePasswordRequest {
|
||||
userId: string;
|
||||
oldPassword: string;
|
||||
newPassword: string;
|
||||
code?: string | undefined;
|
||||
pin?: string | undefined;
|
||||
}
|
||||
|
||||
export interface ChangePasswordResponse {
|
||||
success: boolean;
|
||||
message: string;
|
||||
}
|
||||
|
||||
export const ACCOUNT_V1_PACKAGE_NAME = "account.v1";
|
||||
|
||||
export interface AccountServiceClient {
|
||||
getAccount(request: GetAccountRequest, metadata?: Metadata): Observable<GetAccountResponse>;
|
||||
|
||||
changePassword(request: ChangePasswordRequest, metadata?: Metadata): Observable<ChangePasswordResponse>;
|
||||
}
|
||||
|
||||
export interface AccountServiceController {
|
||||
@@ -47,11 +62,16 @@ export interface AccountServiceController {
|
||||
request: GetAccountRequest,
|
||||
metadata?: Metadata,
|
||||
): Promise<GetAccountResponse> | Observable<GetAccountResponse> | GetAccountResponse;
|
||||
|
||||
changePassword(
|
||||
request: ChangePasswordRequest,
|
||||
metadata?: Metadata,
|
||||
): Promise<ChangePasswordResponse> | Observable<ChangePasswordResponse> | ChangePasswordResponse;
|
||||
}
|
||||
|
||||
export function AccountServiceControllerMethods() {
|
||||
return function (constructor: Function) {
|
||||
const grpcMethods: string[] = ["getAccount"];
|
||||
const grpcMethods: string[] = ["getAccount", "changePassword"];
|
||||
for (const method of grpcMethods) {
|
||||
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
|
||||
GrpcMethod("AccountService", method)(constructor.prototype[method], method, descriptor);
|
||||
|
||||
Reference in New Issue
Block a user