diff --git a/gen/account.ts b/gen/account.ts index b7e60ba..47930af 100644 --- a/gen/account.ts +++ b/gen/account.ts @@ -38,6 +38,7 @@ export interface GetAccountResponse { export interface ChangePasswordRequest { userId: string; + accessToken: string; oldPassword: string; newPassword: string; code?: string | undefined; @@ -50,6 +51,7 @@ export interface ChangePasswordResponse { export interface SetPinRequest { userId: string; + accessToken: string; pin: string; } @@ -81,6 +83,7 @@ export interface GetPinStatusResponse { export interface RemovePinRequest { pin: string; userId: string; + accessToken: string; } export interface RemovePinResponse { diff --git a/gen/go/account.pb.go b/gen/go/account.pb.go index 55a798c..b6945d1 100644 --- a/gen/go/account.pb.go +++ b/gen/go/account.pb.go @@ -248,9 +248,10 @@ func (x *GetAccountResponse) GetHasPin() bool { type ChangePasswordRequest struct { state protoimpl.MessageState `protogen:"open.v1"` UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` - OldPassword string `protobuf:"bytes,2,opt,name=old_password,json=oldPassword,proto3" json:"old_password,omitempty"` - NewPassword string `protobuf:"bytes,3,opt,name=new_password,json=newPassword,proto3" json:"new_password,omitempty"` - Code *string `protobuf:"bytes,4,opt,name=code,proto3,oneof" json:"code,omitempty"` + AccessToken string `protobuf:"bytes,2,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"` + OldPassword string `protobuf:"bytes,3,opt,name=old_password,json=oldPassword,proto3" json:"old_password,omitempty"` + NewPassword string `protobuf:"bytes,4,opt,name=new_password,json=newPassword,proto3" json:"new_password,omitempty"` + Code *string `protobuf:"bytes,5,opt,name=code,proto3,oneof" json:"code,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -292,6 +293,13 @@ func (x *ChangePasswordRequest) GetUserId() string { return "" } +func (x *ChangePasswordRequest) GetAccessToken() string { + if x != nil { + return x.AccessToken + } + return "" +} + func (x *ChangePasswordRequest) GetOldPassword() string { if x != nil { return x.OldPassword @@ -368,7 +376,8 @@ func (x *ChangePasswordResponse) GetMessage() string { type SetPinRequest struct { state protoimpl.MessageState `protogen:"open.v1"` UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` - Pin string `protobuf:"bytes,2,opt,name=pin,proto3" json:"pin,omitempty"` + AccessToken string `protobuf:"bytes,2,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"` + Pin string `protobuf:"bytes,3,opt,name=pin,proto3" json:"pin,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -410,6 +419,13 @@ func (x *SetPinRequest) GetUserId() string { return "" } +func (x *SetPinRequest) GetAccessToken() string { + if x != nil { + return x.AccessToken + } + return "" +} + func (x *SetPinRequest) GetPin() string { if x != nil { return x.Pin @@ -681,6 +697,7 @@ type RemovePinRequest struct { state protoimpl.MessageState `protogen:"open.v1"` Pin string `protobuf:"bytes,1,opt,name=pin,proto3" json:"pin,omitempty"` UserId string `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` + AccessToken string `protobuf:"bytes,3,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } @@ -729,6 +746,13 @@ func (x *RemovePinRequest) GetUserId() string { return "" } +func (x *RemovePinRequest) GetAccessToken() string { + if x != nil { + return x.AccessToken + } + return "" +} + type RemovePinResponse struct { state protoimpl.MessageState `protogen:"open.v1"` Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` @@ -812,19 +836,21 @@ const file_account_proto_rawDesc = "" + "\blanguage\x18\x10 \x01(\tR\blanguage\x12$\n" + "\x0etwo_fa_enabled\x18\x11 \x01(\bR\ftwoFaEnabled\x12\x17\n" + "\ahas_pin\x18\x12 \x01(\bR\x06hasPinB\x0e\n" + - "\f_employee_id\"\x98\x01\n" + + "\f_employee_id\"\xbb\x01\n" + "\x15ChangePasswordRequest\x12\x17\n" + "\auser_id\x18\x01 \x01(\tR\x06userId\x12!\n" + - "\fold_password\x18\x02 \x01(\tR\voldPassword\x12!\n" + - "\fnew_password\x18\x03 \x01(\tR\vnewPassword\x12\x17\n" + - "\x04code\x18\x04 \x01(\tH\x00R\x04code\x88\x01\x01B\a\n" + + "\faccess_token\x18\x02 \x01(\tR\vaccessToken\x12!\n" + + "\fold_password\x18\x03 \x01(\tR\voldPassword\x12!\n" + + "\fnew_password\x18\x04 \x01(\tR\vnewPassword\x12\x17\n" + + "\x04code\x18\x05 \x01(\tH\x00R\x04code\x88\x01\x01B\a\n" + "\x05_code\"L\n" + "\x16ChangePasswordResponse\x12\x18\n" + "\asuccess\x18\x01 \x01(\bR\asuccess\x12\x18\n" + - "\amessage\x18\x02 \x01(\tR\amessage\":\n" + + "\amessage\x18\x02 \x01(\tR\amessage\"]\n" + "\rSetPinRequest\x12\x17\n" + - "\auser_id\x18\x01 \x01(\tR\x06userId\x12\x10\n" + - "\x03pin\x18\x02 \x01(\tR\x03pin\"D\n" + + "\auser_id\x18\x01 \x01(\tR\x06userId\x12!\n" + + "\faccess_token\x18\x02 \x01(\tR\vaccessToken\x12\x10\n" + + "\x03pin\x18\x03 \x01(\tR\x03pin\"D\n" + "\x0eSetPinResponse\x12\x18\n" + "\asuccess\x18\x01 \x01(\bR\asuccess\x12\x18\n" + "\amessage\x18\x02 \x01(\tR\amessage\"G\n" + @@ -840,10 +866,11 @@ const file_account_proto_rawDesc = "" + "\ahas_pin\x18\x01 \x01(\bR\x06hasPin\x12\x1b\n" + "\tis_locked\x18\x02 \x01(\bR\bisLocked\x12\x1d\n" + "\n" + - "lock_until\x18\x03 \x01(\tR\tlockUntil\"=\n" + + "lock_until\x18\x03 \x01(\tR\tlockUntil\"`\n" + "\x10RemovePinRequest\x12\x10\n" + "\x03pin\x18\x01 \x01(\tR\x03pin\x12\x17\n" + - "\auser_id\x18\x02 \x01(\tR\x06userId\"G\n" + + "\auser_id\x18\x02 \x01(\tR\x06userId\x12!\n" + + "\faccess_token\x18\x03 \x01(\tR\vaccessToken\"G\n" + "\x11RemovePinResponse\x12\x18\n" + "\asuccess\x18\x01 \x01(\bR\asuccess\x12\x18\n" + "\amessage\x18\x02 \x01(\tR\amessage2\xde\x03\n" + diff --git a/gen/go/twofa.pb.go b/gen/go/twofa.pb.go index 0ff1a6b..3fc3806 100644 --- a/gen/go/twofa.pb.go +++ b/gen/go/twofa.pb.go @@ -84,7 +84,6 @@ func (x *Verify2FaRequest) GetTelegramCode() string { type Verify2FaResponse struct { state protoimpl.MessageState `protogen:"open.v1"` AccessToken string `protobuf:"bytes,1,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"` - RefreshToken string `protobuf:"bytes,2,opt,name=refresh_token,json=refreshToken,proto3" json:"refresh_token,omitempty"` Status string `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` Message string `protobuf:"bytes,4,opt,name=message,proto3" json:"message,omitempty"` ReserveCodes []string `protobuf:"bytes,5,rep,name=reserve_codes,json=reserveCodes,proto3" json:"reserve_codes,omitempty"` @@ -129,13 +128,6 @@ func (x *Verify2FaResponse) GetAccessToken() string { return "" } -func (x *Verify2FaResponse) GetRefreshToken() string { - if x != nil { - return x.RefreshToken - } - return "" -} - func (x *Verify2FaResponse) GetStatus() string { if x != nil { return x.Status @@ -969,10 +961,9 @@ const file_twofa_proto_rawDesc = "" + "\rtelegram_code\x18\x03 \x01(\tH\x01R\ftelegramCode\x88\x01\x01B\f\n" + "\n" + "_totp_codeB\x10\n" + - "\x0e_telegram_code\"\xb2\x01\n" + + "\x0e_telegram_code\"\x8d\x01\n" + "\x11Verify2FaResponse\x12!\n" + - "\faccess_token\x18\x01 \x01(\tR\vaccessToken\x12#\n" + - "\rrefresh_token\x18\x02 \x01(\tR\frefreshToken\x12\x16\n" + + "\faccess_token\x18\x01 \x01(\tR\vaccessToken\x12\x16\n" + "\x06status\x18\x03 \x01(\tR\x06status\x12\x18\n" + "\amessage\x18\x04 \x01(\tR\amessage\x12#\n" + "\rreserve_codes\x18\x05 \x03(\tR\freserveCodes\"?\n" + diff --git a/gen/twofa.ts b/gen/twofa.ts index eb0e728..2db5613 100644 --- a/gen/twofa.ts +++ b/gen/twofa.ts @@ -19,7 +19,6 @@ export interface Verify2FaRequest { export interface Verify2FaResponse { accessToken: string; - refreshToken: string; status: string; message: string; reserveCodes: string[];