diff --git a/gen/account.ts b/gen/account.ts index 9e73e64..af72b02 100644 --- a/gen/account.ts +++ b/gen/account.ts @@ -11,14 +11,6 @@ import { Observable } from "rxjs"; export const protobufPackage = "account.v1"; -export enum Presence { - PRESENCE_UNSPECIFIED = 0, - OFFLINE = 1, - ONLINE = 2, - AWAY = 3, - UNRECOGNIZED = -1, -} - export interface GetAccountRequest { id: string; } @@ -34,7 +26,7 @@ export interface GetAccountResponse { roles: string[]; avatarUrl: string; employeeId?: string | undefined; - presence: Presence; + presence: string; lastActive: string; customStatusText: string; customStatusEmoji: string; diff --git a/gen/go/account.pb.go b/gen/go/account.pb.go index c501107..9569501 100644 --- a/gen/go/account.pb.go +++ b/gen/go/account.pb.go @@ -21,58 +21,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -type Presence int32 - -const ( - Presence_PRESENCE_UNSPECIFIED Presence = 0 - Presence_OFFLINE Presence = 1 - Presence_ONLINE Presence = 2 - Presence_AWAY Presence = 3 -) - -// Enum value maps for Presence. -var ( - Presence_name = map[int32]string{ - 0: "PRESENCE_UNSPECIFIED", - 1: "OFFLINE", - 2: "ONLINE", - 3: "AWAY", - } - Presence_value = map[string]int32{ - "PRESENCE_UNSPECIFIED": 0, - "OFFLINE": 1, - "ONLINE": 2, - "AWAY": 3, - } -) - -func (x Presence) Enum() *Presence { - p := new(Presence) - *p = x - return p -} - -func (x Presence) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (Presence) Descriptor() protoreflect.EnumDescriptor { - return file_account_proto_enumTypes[0].Descriptor() -} - -func (Presence) Type() protoreflect.EnumType { - return &file_account_proto_enumTypes[0] -} - -func (x Presence) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use Presence.Descriptor instead. -func (Presence) EnumDescriptor() ([]byte, []int) { - return file_account_proto_rawDescGZIP(), []int{0} -} - type GetAccountRequest struct { state protoimpl.MessageState `protogen:"open.v1"` Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` @@ -129,7 +77,7 @@ type GetAccountResponse struct { Roles []string `protobuf:"bytes,8,rep,name=roles,proto3" json:"roles,omitempty"` AvatarUrl string `protobuf:"bytes,9,opt,name=avatar_url,json=avatarUrl,proto3" json:"avatar_url,omitempty"` EmployeeId *string `protobuf:"bytes,10,opt,name=employee_id,json=employeeId,proto3,oneof" json:"employee_id,omitempty"` - Presence Presence `protobuf:"varint,11,opt,name=presence,proto3,enum=account.v1.Presence" json:"presence,omitempty"` + Presence string `protobuf:"bytes,11,opt,name=presence,proto3" json:"presence,omitempty"` LastActive string `protobuf:"bytes,12,opt,name=last_active,json=lastActive,proto3" json:"last_active,omitempty"` CustomStatusText string `protobuf:"bytes,13,opt,name=custom_status_text,json=customStatusText,proto3" json:"custom_status_text,omitempty"` CustomStatusEmoji string `protobuf:"bytes,14,opt,name=custom_status_emoji,json=customStatusEmoji,proto3" json:"custom_status_emoji,omitempty"` @@ -241,11 +189,11 @@ func (x *GetAccountResponse) GetEmployeeId() string { return "" } -func (x *GetAccountResponse) GetPresence() Presence { +func (x *GetAccountResponse) GetPresence() string { if x != nil { return x.Presence } - return Presence_PRESENCE_UNSPECIFIED + return "" } func (x *GetAccountResponse) GetLastActive() string { @@ -304,7 +252,7 @@ const file_account_proto_rawDesc = "" + "\raccount.proto\x12\n" + "account.v1\"#\n" + "\x11GetAccountRequest\x12\x0e\n" + - "\x02id\x18\x01 \x01(\tR\x02id\"\xcd\x04\n" + + "\x02id\x18\x01 \x01(\tR\x02id\"\xb7\x04\n" + "\x12GetAccountResponse\x12\x0e\n" + "\x02id\x18\x01 \x01(\tR\x02id\x12\x1a\n" + "\busername\x18\x02 \x01(\tR\busername\x12\x14\n" + @@ -318,8 +266,8 @@ const file_account_proto_rawDesc = "" + "avatar_url\x18\t \x01(\tR\tavatarUrl\x12$\n" + "\vemployee_id\x18\n" + " \x01(\tH\x00R\n" + - "employeeId\x88\x01\x01\x120\n" + - "\bpresence\x18\v \x01(\x0e2\x14.account.v1.PresenceR\bpresence\x12\x1f\n" + + "employeeId\x88\x01\x01\x12\x1a\n" + + "\bpresence\x18\v \x01(\tR\bpresence\x12\x1f\n" + "\vlast_active\x18\f \x01(\tR\n" + "lastActive\x12,\n" + "\x12custom_status_text\x18\r \x01(\tR\x10customStatusText\x12.\n" + @@ -328,13 +276,7 @@ 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*G\n" + - "\bPresence\x12\x18\n" + - "\x14PRESENCE_UNSPECIFIED\x10\x00\x12\v\n" + - "\aOFFLINE\x10\x01\x12\n" + - "\n" + - "\x06ONLINE\x10\x02\x12\b\n" + - "\x04AWAY\x10\x032]\n" + + "\f_employee_id2]\n" + "\x0eAccountService\x12K\n" + "\n" + "GetAccount\x12\x1d.account.v1.GetAccountRequest\x1a\x1e.account.v1.GetAccountResponseB*Z(git.lendry.ru/lendry-erp/proto.git/go;pbb\x06proto3" @@ -351,22 +293,19 @@ func file_account_proto_rawDescGZIP() []byte { return file_account_proto_rawDescData } -var file_account_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_account_proto_msgTypes = make([]protoimpl.MessageInfo, 2) var file_account_proto_goTypes = []any{ - (Presence)(0), // 0: account.v1.Presence - (*GetAccountRequest)(nil), // 1: account.v1.GetAccountRequest - (*GetAccountResponse)(nil), // 2: account.v1.GetAccountResponse + (*GetAccountRequest)(nil), // 0: account.v1.GetAccountRequest + (*GetAccountResponse)(nil), // 1: account.v1.GetAccountResponse } var file_account_proto_depIdxs = []int32{ - 0, // 0: account.v1.GetAccountResponse.presence:type_name -> account.v1.Presence - 1, // 1: account.v1.AccountService.GetAccount:input_type -> account.v1.GetAccountRequest - 2, // 2: account.v1.AccountService.GetAccount:output_type -> account.v1.GetAccountResponse - 2, // [2:3] is the sub-list for method output_type - 1, // [1:2] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name + 0, // 0: account.v1.AccountService.GetAccount:input_type -> account.v1.GetAccountRequest + 1, // 1: account.v1.AccountService.GetAccount:output_type -> account.v1.GetAccountResponse + 1, // [1:2] is the sub-list for method output_type + 0, // [0:1] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name } func init() { file_account_proto_init() } @@ -380,14 +319,13 @@ func file_account_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_account_proto_rawDesc), len(file_account_proto_rawDesc)), - NumEnums: 1, + NumEnums: 0, NumMessages: 2, NumExtensions: 0, NumServices: 1, }, GoTypes: file_account_proto_goTypes, DependencyIndexes: file_account_proto_depIdxs, - EnumInfos: file_account_proto_enumTypes, MessageInfos: file_account_proto_msgTypes, }.Build() File_account_proto = out.File