chore: auto-generate protobuf files [skip ci]

This commit is contained in:
github-actions[bot]
2026-04-03 15:06:51 +00:00
parent 7137cd3649
commit b748c4e182
6 changed files with 720 additions and 228 deletions

View File

@@ -41,7 +41,6 @@ export interface ChangePasswordRequest {
oldPassword: string;
newPassword: string;
code?: string | undefined;
pin?: string | undefined;
}
export interface ChangePasswordResponse {
@@ -49,12 +48,60 @@ export interface ChangePasswordResponse {
message: string;
}
export interface SetPinRequest {
userId: string;
pin: string;
}
export interface SetPinResponse {
success: boolean;
message: string;
}
export interface UnlockPinRequest {
accessToken: string;
pin: string;
}
export interface UnlockPinResponse {
success: boolean;
message: string;
}
export interface GetPinStatusRequest {
userId: string;
}
export interface GetPinStatusResponse {
hasPin: boolean;
isLocked: boolean;
lockUntil: string;
}
export interface RemovePinRequest {
pin: string;
userId: string;
}
export interface RemovePinResponse {
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>;
setPin(request: SetPinRequest, metadata?: Metadata): Observable<SetPinResponse>;
unlockPin(request: UnlockPinRequest, metadata?: Metadata): Observable<UnlockPinResponse>;
getPinStatus(request: GetPinStatusRequest, metadata?: Metadata): Observable<GetPinStatusResponse>;
removePin(request: RemovePinRequest, metadata?: Metadata): Observable<RemovePinResponse>;
}
export interface AccountServiceController {
@@ -67,11 +114,31 @@ export interface AccountServiceController {
request: ChangePasswordRequest,
metadata?: Metadata,
): Promise<ChangePasswordResponse> | Observable<ChangePasswordResponse> | ChangePasswordResponse;
setPin(
request: SetPinRequest,
metadata?: Metadata,
): Promise<SetPinResponse> | Observable<SetPinResponse> | SetPinResponse;
unlockPin(
request: UnlockPinRequest,
metadata?: Metadata,
): Promise<UnlockPinResponse> | Observable<UnlockPinResponse> | UnlockPinResponse;
getPinStatus(
request: GetPinStatusRequest,
metadata?: Metadata,
): Promise<GetPinStatusResponse> | Observable<GetPinStatusResponse> | GetPinStatusResponse;
removePin(
request: RemovePinRequest,
metadata?: Metadata,
): Promise<RemovePinResponse> | Observable<RemovePinResponse> | RemovePinResponse;
}
export function AccountServiceControllerMethods() {
return function (constructor: Function) {
const grpcMethods: string[] = ["getAccount", "changePassword"];
const grpcMethods: string[] = ["getAccount", "changePassword", "setPin", "unlockPin", "getPinStatus", "removePin"];
for (const method of grpcMethods) {
const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
GrpcMethod("AccountService", method)(constructor.prototype[method], method, descriptor);