chore: auto-generate protobuf files [skip ci]
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user