mezon-js-protobuf 1.8.45 → 1.8.46

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/api/api.ts CHANGED
@@ -173,8 +173,8 @@ export interface Account {
173
173
  | undefined;
174
174
  /** The email address of the user. */
175
175
  email: string;
176
- /** The mezon id in the user's account. */
177
- mezon_id: string;
176
+ /** The qr code in the user's account. */
177
+ qr_code: string;
178
178
  /** The UNIX time (for gRPC clients) or ISO string (for REST clients) when the user's email was verified. */
179
179
  verify_time:
180
180
  | Date
@@ -214,6 +214,14 @@ export interface AddFriendsRequest {
214
214
  usernames: string[];
215
215
  }
216
216
 
217
+ /** Add one or more friends to the current user. */
218
+ export interface AddFriendsResponse {
219
+ /** The account id of a user. */
220
+ ids: string[];
221
+ /** The account username of a user. */
222
+ usernames: string[];
223
+ }
224
+
217
225
  /** Add users to a group. */
218
226
  export interface AddGroupUsersRequest {
219
227
  /** The group to add users to. */
@@ -3709,7 +3717,7 @@ function createBaseAccount(): Account {
3709
3717
  return {
3710
3718
  user: undefined,
3711
3719
  email: "",
3712
- mezon_id: "",
3720
+ qr_code: "",
3713
3721
  verify_time: undefined,
3714
3722
  disable_time: undefined,
3715
3723
  logo: "",
@@ -3727,8 +3735,8 @@ export const Account = {
3727
3735
  if (message.email !== "") {
3728
3736
  writer.uint32(18).string(message.email);
3729
3737
  }
3730
- if (message.mezon_id !== "") {
3731
- writer.uint32(26).string(message.mezon_id);
3738
+ if (message.qr_code !== "") {
3739
+ writer.uint32(26).string(message.qr_code);
3732
3740
  }
3733
3741
  if (message.verify_time !== undefined) {
3734
3742
  Timestamp.encode(toTimestamp(message.verify_time), writer.uint32(34).fork()).ldelim();
@@ -3777,7 +3785,7 @@ export const Account = {
3777
3785
  break;
3778
3786
  }
3779
3787
 
3780
- message.mezon_id = reader.string();
3788
+ message.qr_code = reader.string();
3781
3789
  continue;
3782
3790
  case 4:
3783
3791
  if (tag !== 34) {
@@ -3834,7 +3842,7 @@ export const Account = {
3834
3842
  return {
3835
3843
  user: isSet(object.user) ? User.fromJSON(object.user) : undefined,
3836
3844
  email: isSet(object.email) ? globalThis.String(object.email) : "",
3837
- mezon_id: isSet(object.mezon_id) ? globalThis.String(object.mezon_id) : "",
3845
+ qr_code: isSet(object.qr_code) ? globalThis.String(object.qr_code) : "",
3838
3846
  verify_time: isSet(object.verify_time) ? fromJsonTimestamp(object.verify_time) : undefined,
3839
3847
  disable_time: isSet(object.disable_time) ? fromJsonTimestamp(object.disable_time) : undefined,
3840
3848
  logo: isSet(object.logo) ? globalThis.String(object.logo) : "",
@@ -3852,8 +3860,8 @@ export const Account = {
3852
3860
  if (message.email !== "") {
3853
3861
  obj.email = message.email;
3854
3862
  }
3855
- if (message.mezon_id !== "") {
3856
- obj.mezon_id = message.mezon_id;
3863
+ if (message.qr_code !== "") {
3864
+ obj.qr_code = message.qr_code;
3857
3865
  }
3858
3866
  if (message.verify_time !== undefined) {
3859
3867
  obj.verify_time = message.verify_time.toISOString();
@@ -3883,7 +3891,7 @@ export const Account = {
3883
3891
  const message = createBaseAccount();
3884
3892
  message.user = (object.user !== undefined && object.user !== null) ? User.fromPartial(object.user) : undefined;
3885
3893
  message.email = object.email ?? "";
3886
- message.mezon_id = object.mezon_id ?? "";
3894
+ message.qr_code = object.qr_code ?? "";
3887
3895
  message.verify_time = object.verify_time ?? undefined;
3888
3896
  message.disable_time = object.disable_time ?? undefined;
3889
3897
  message.logo = object.logo ?? "";
@@ -4137,6 +4145,82 @@ export const AddFriendsRequest = {
4137
4145
  },
4138
4146
  };
4139
4147
 
4148
+ function createBaseAddFriendsResponse(): AddFriendsResponse {
4149
+ return { ids: [], usernames: [] };
4150
+ }
4151
+
4152
+ export const AddFriendsResponse = {
4153
+ encode(message: AddFriendsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
4154
+ for (const v of message.ids) {
4155
+ writer.uint32(10).string(v!);
4156
+ }
4157
+ for (const v of message.usernames) {
4158
+ writer.uint32(18).string(v!);
4159
+ }
4160
+ return writer;
4161
+ },
4162
+
4163
+ decode(input: _m0.Reader | Uint8Array, length?: number): AddFriendsResponse {
4164
+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
4165
+ let end = length === undefined ? reader.len : reader.pos + length;
4166
+ const message = createBaseAddFriendsResponse();
4167
+ while (reader.pos < end) {
4168
+ const tag = reader.uint32();
4169
+ switch (tag >>> 3) {
4170
+ case 1:
4171
+ if (tag !== 10) {
4172
+ break;
4173
+ }
4174
+
4175
+ message.ids.push(reader.string());
4176
+ continue;
4177
+ case 2:
4178
+ if (tag !== 18) {
4179
+ break;
4180
+ }
4181
+
4182
+ message.usernames.push(reader.string());
4183
+ continue;
4184
+ }
4185
+ if ((tag & 7) === 4 || tag === 0) {
4186
+ break;
4187
+ }
4188
+ reader.skipType(tag & 7);
4189
+ }
4190
+ return message;
4191
+ },
4192
+
4193
+ fromJSON(object: any): AddFriendsResponse {
4194
+ return {
4195
+ ids: globalThis.Array.isArray(object?.ids) ? object.ids.map((e: any) => globalThis.String(e)) : [],
4196
+ usernames: globalThis.Array.isArray(object?.usernames)
4197
+ ? object.usernames.map((e: any) => globalThis.String(e))
4198
+ : [],
4199
+ };
4200
+ },
4201
+
4202
+ toJSON(message: AddFriendsResponse): unknown {
4203
+ const obj: any = {};
4204
+ if (message.ids?.length) {
4205
+ obj.ids = message.ids;
4206
+ }
4207
+ if (message.usernames?.length) {
4208
+ obj.usernames = message.usernames;
4209
+ }
4210
+ return obj;
4211
+ },
4212
+
4213
+ create<I extends Exact<DeepPartial<AddFriendsResponse>, I>>(base?: I): AddFriendsResponse {
4214
+ return AddFriendsResponse.fromPartial(base ?? ({} as any));
4215
+ },
4216
+ fromPartial<I extends Exact<DeepPartial<AddFriendsResponse>, I>>(object: I): AddFriendsResponse {
4217
+ const message = createBaseAddFriendsResponse();
4218
+ message.ids = object.ids?.map((e) => e) || [];
4219
+ message.usernames = object.usernames?.map((e) => e) || [];
4220
+ return message;
4221
+ },
4222
+ };
4223
+
4140
4224
  function createBaseAddGroupUsersRequest(): AddGroupUsersRequest {
4141
4225
  return { group_id: "", user_ids: [] };
4142
4226
  }
@@ -49,8 +49,8 @@ export interface Account {
49
49
  user: User | undefined;
50
50
  /** The email address of the user. */
51
51
  email: string;
52
- /** The mezon id in the user's account. */
53
- mezon_id: string;
52
+ /** The qr code in the user's account. */
53
+ qr_code: string;
54
54
  /** The UNIX time (for gRPC clients) or ISO string (for REST clients) when the user's email was verified. */
55
55
  verify_time: Date | undefined;
56
56
  /** The UNIX time (for gRPC clients) or ISO string (for REST clients) when the user's account was disabled/banned. */
@@ -84,6 +84,13 @@ export interface AddFriendsRequest {
84
84
  /** The account username of a user. */
85
85
  usernames: string[];
86
86
  }
87
+ /** Add one or more friends to the current user. */
88
+ export interface AddFriendsResponse {
89
+ /** The account id of a user. */
90
+ ids: string[];
91
+ /** The account username of a user. */
92
+ usernames: string[];
93
+ }
87
94
  /** Add users to a group. */
88
95
  export interface AddGroupUsersRequest {
89
96
  /** The group to add users to. */
@@ -3082,7 +3089,7 @@ export declare const Account: {
3082
3089
  status?: string | undefined;
3083
3090
  } | undefined;
3084
3091
  email?: string | undefined;
3085
- mezon_id?: string | undefined;
3092
+ qr_code?: string | undefined;
3086
3093
  verify_time?: Date | undefined;
3087
3094
  disable_time?: Date | undefined;
3088
3095
  logo?: string | undefined;
@@ -3134,7 +3141,7 @@ export declare const Account: {
3134
3141
  status?: string | undefined;
3135
3142
  } & { [K_1 in Exclude<keyof I["user"], keyof User>]: never; }) | undefined;
3136
3143
  email?: string | undefined;
3137
- mezon_id?: string | undefined;
3144
+ qr_code?: string | undefined;
3138
3145
  verify_time?: Date | undefined;
3139
3146
  disable_time?: Date | undefined;
3140
3147
  logo?: string | undefined;
@@ -3166,7 +3173,7 @@ export declare const Account: {
3166
3173
  status?: string | undefined;
3167
3174
  } | undefined;
3168
3175
  email?: string | undefined;
3169
- mezon_id?: string | undefined;
3176
+ qr_code?: string | undefined;
3170
3177
  verify_time?: Date | undefined;
3171
3178
  disable_time?: Date | undefined;
3172
3179
  logo?: string | undefined;
@@ -3218,7 +3225,7 @@ export declare const Account: {
3218
3225
  status?: string | undefined;
3219
3226
  } & { [K_4 in Exclude<keyof I_1["user"], keyof User>]: never; }) | undefined;
3220
3227
  email?: string | undefined;
3221
- mezon_id?: string | undefined;
3228
+ qr_code?: string | undefined;
3222
3229
  verify_time?: Date | undefined;
3223
3230
  disable_time?: Date | undefined;
3224
3231
  logo?: string | undefined;
@@ -3299,6 +3306,26 @@ export declare const AddFriendsRequest: {
3299
3306
  usernames?: (string[] & string[] & { [K_4 in Exclude<keyof I_1["usernames"], keyof string[]>]: never; }) | undefined;
3300
3307
  } & { [K_5 in Exclude<keyof I_1, keyof AddFriendsRequest>]: never; }>(object: I_1): AddFriendsRequest;
3301
3308
  };
3309
+ export declare const AddFriendsResponse: {
3310
+ encode(message: AddFriendsResponse, writer?: _m0.Writer): _m0.Writer;
3311
+ decode(input: _m0.Reader | Uint8Array, length?: number): AddFriendsResponse;
3312
+ fromJSON(object: any): AddFriendsResponse;
3313
+ toJSON(message: AddFriendsResponse): unknown;
3314
+ create<I extends {
3315
+ ids?: string[] | undefined;
3316
+ usernames?: string[] | undefined;
3317
+ } & {
3318
+ ids?: (string[] & string[] & { [K in Exclude<keyof I["ids"], keyof string[]>]: never; }) | undefined;
3319
+ usernames?: (string[] & string[] & { [K_1 in Exclude<keyof I["usernames"], keyof string[]>]: never; }) | undefined;
3320
+ } & { [K_2 in Exclude<keyof I, keyof AddFriendsResponse>]: never; }>(base?: I | undefined): AddFriendsResponse;
3321
+ fromPartial<I_1 extends {
3322
+ ids?: string[] | undefined;
3323
+ usernames?: string[] | undefined;
3324
+ } & {
3325
+ ids?: (string[] & string[] & { [K_3 in Exclude<keyof I_1["ids"], keyof string[]>]: never; }) | undefined;
3326
+ usernames?: (string[] & string[] & { [K_4 in Exclude<keyof I_1["usernames"], keyof string[]>]: never; }) | undefined;
3327
+ } & { [K_5 in Exclude<keyof I_1, keyof AddFriendsResponse>]: never; }>(object: I_1): AddFriendsResponse;
3328
+ };
3302
3329
  export declare const AddGroupUsersRequest: {
3303
3330
  encode(message: AddGroupUsersRequest, writer?: _m0.Writer): _m0.Writer;
3304
3331
  decode(input: _m0.Reader | Uint8Array, length?: number): AddGroupUsersRequest;
@@ -546,6 +546,16 @@ export interface BlockFriend {
546
546
  export interface UnblockFriend {
547
547
  /** */
548
548
  user_id: string;
549
+ /** */
550
+ username: string;
551
+ /** */
552
+ avatar: string;
553
+ /** */
554
+ display_name: string;
555
+ /** */
556
+ status: string;
557
+ /** */
558
+ user_status: string;
549
559
  }
550
560
  /** Application-level heartbeat and connection check. */
551
561
  export interface Ping {
@@ -3284,6 +3294,11 @@ export declare const Envelope: {
3284
3294
  } | undefined;
3285
3295
  un_block_friend?: {
3286
3296
  user_id?: string | undefined;
3297
+ username?: string | undefined;
3298
+ avatar?: string | undefined;
3299
+ display_name?: string | undefined;
3300
+ status?: string | undefined;
3301
+ user_status?: string | undefined;
3287
3302
  } | undefined;
3288
3303
  meet_participant_event?: {
3289
3304
  username?: string | undefined;
@@ -11204,9 +11219,19 @@ export declare const Envelope: {
11204
11219
  } & { [K_387 in Exclude<keyof I["quick_menu_event"], keyof QuickMenuDataEvent>]: never; }) | undefined;
11205
11220
  un_block_friend?: ({
11206
11221
  user_id?: string | undefined;
11222
+ username?: string | undefined;
11223
+ avatar?: string | undefined;
11224
+ display_name?: string | undefined;
11225
+ status?: string | undefined;
11226
+ user_status?: string | undefined;
11207
11227
  } & {
11208
11228
  user_id?: string | undefined;
11209
- } & { [K_388 in Exclude<keyof I["un_block_friend"], "user_id">]: never; }) | undefined;
11229
+ username?: string | undefined;
11230
+ avatar?: string | undefined;
11231
+ display_name?: string | undefined;
11232
+ status?: string | undefined;
11233
+ user_status?: string | undefined;
11234
+ } & { [K_388 in Exclude<keyof I["un_block_friend"], keyof UnblockFriend>]: never; }) | undefined;
11210
11235
  meet_participant_event?: ({
11211
11236
  username?: string | undefined;
11212
11237
  room_name?: string | undefined;
@@ -13240,6 +13265,11 @@ export declare const Envelope: {
13240
13265
  } | undefined;
13241
13266
  un_block_friend?: {
13242
13267
  user_id?: string | undefined;
13268
+ username?: string | undefined;
13269
+ avatar?: string | undefined;
13270
+ display_name?: string | undefined;
13271
+ status?: string | undefined;
13272
+ user_status?: string | undefined;
13243
13273
  } | undefined;
13244
13274
  meet_participant_event?: {
13245
13275
  username?: string | undefined;
@@ -21160,9 +21190,19 @@ export declare const Envelope: {
21160
21190
  } & { [K_780 in Exclude<keyof I_1["quick_menu_event"], keyof QuickMenuDataEvent>]: never; }) | undefined;
21161
21191
  un_block_friend?: ({
21162
21192
  user_id?: string | undefined;
21193
+ username?: string | undefined;
21194
+ avatar?: string | undefined;
21195
+ display_name?: string | undefined;
21196
+ status?: string | undefined;
21197
+ user_status?: string | undefined;
21163
21198
  } & {
21164
21199
  user_id?: string | undefined;
21165
- } & { [K_781 in Exclude<keyof I_1["un_block_friend"], "user_id">]: never; }) | undefined;
21200
+ username?: string | undefined;
21201
+ avatar?: string | undefined;
21202
+ display_name?: string | undefined;
21203
+ status?: string | undefined;
21204
+ user_status?: string | undefined;
21205
+ } & { [K_781 in Exclude<keyof I_1["un_block_friend"], keyof UnblockFriend>]: never; }) | undefined;
21166
21206
  meet_participant_event?: ({
21167
21207
  username?: string | undefined;
21168
21208
  room_name?: string | undefined;
@@ -24759,14 +24799,34 @@ export declare const UnblockFriend: {
24759
24799
  toJSON(message: UnblockFriend): unknown;
24760
24800
  create<I extends {
24761
24801
  user_id?: string | undefined;
24802
+ username?: string | undefined;
24803
+ avatar?: string | undefined;
24804
+ display_name?: string | undefined;
24805
+ status?: string | undefined;
24806
+ user_status?: string | undefined;
24762
24807
  } & {
24763
24808
  user_id?: string | undefined;
24764
- } & { [K in Exclude<keyof I, "user_id">]: never; }>(base?: I | undefined): UnblockFriend;
24809
+ username?: string | undefined;
24810
+ avatar?: string | undefined;
24811
+ display_name?: string | undefined;
24812
+ status?: string | undefined;
24813
+ user_status?: string | undefined;
24814
+ } & { [K in Exclude<keyof I, keyof UnblockFriend>]: never; }>(base?: I | undefined): UnblockFriend;
24765
24815
  fromPartial<I_1 extends {
24766
24816
  user_id?: string | undefined;
24817
+ username?: string | undefined;
24818
+ avatar?: string | undefined;
24819
+ display_name?: string | undefined;
24820
+ status?: string | undefined;
24821
+ user_status?: string | undefined;
24767
24822
  } & {
24768
24823
  user_id?: string | undefined;
24769
- } & { [K_1 in Exclude<keyof I_1, "user_id">]: never; }>(object: I_1): UnblockFriend;
24824
+ username?: string | undefined;
24825
+ avatar?: string | undefined;
24826
+ display_name?: string | undefined;
24827
+ status?: string | undefined;
24828
+ user_status?: string | undefined;
24829
+ } & { [K_1 in Exclude<keyof I_1, keyof UnblockFriend>]: never; }>(object: I_1): UnblockFriend;
24770
24830
  };
24771
24831
  export declare const Ping: {
24772
24832
  encode(_: Ping, writer?: _m0.Writer): _m0.Writer;
@@ -18367,13 +18367,28 @@ var BlockFriend = {
18367
18367
  }
18368
18368
  };
18369
18369
  function createBaseUnblockFriend() {
18370
- return { user_id: "" };
18370
+ return { user_id: "", username: "", avatar: "", display_name: "", status: "", user_status: "" };
18371
18371
  }
18372
18372
  var UnblockFriend = {
18373
18373
  encode(message, writer = import_minimal5.default.Writer.create()) {
18374
18374
  if (message.user_id !== "") {
18375
18375
  writer.uint32(10).string(message.user_id);
18376
18376
  }
18377
+ if (message.username !== "") {
18378
+ writer.uint32(18).string(message.username);
18379
+ }
18380
+ if (message.avatar !== "") {
18381
+ writer.uint32(26).string(message.avatar);
18382
+ }
18383
+ if (message.display_name !== "") {
18384
+ writer.uint32(34).string(message.display_name);
18385
+ }
18386
+ if (message.status !== "") {
18387
+ writer.uint32(42).string(message.status);
18388
+ }
18389
+ if (message.user_status !== "") {
18390
+ writer.uint32(50).string(message.user_status);
18391
+ }
18377
18392
  return writer;
18378
18393
  },
18379
18394
  decode(input, length) {
@@ -18389,6 +18404,36 @@ var UnblockFriend = {
18389
18404
  }
18390
18405
  message.user_id = reader.string();
18391
18406
  continue;
18407
+ case 2:
18408
+ if (tag !== 18) {
18409
+ break;
18410
+ }
18411
+ message.username = reader.string();
18412
+ continue;
18413
+ case 3:
18414
+ if (tag !== 26) {
18415
+ break;
18416
+ }
18417
+ message.avatar = reader.string();
18418
+ continue;
18419
+ case 4:
18420
+ if (tag !== 34) {
18421
+ break;
18422
+ }
18423
+ message.display_name = reader.string();
18424
+ continue;
18425
+ case 5:
18426
+ if (tag !== 42) {
18427
+ break;
18428
+ }
18429
+ message.status = reader.string();
18430
+ continue;
18431
+ case 6:
18432
+ if (tag !== 50) {
18433
+ break;
18434
+ }
18435
+ message.user_status = reader.string();
18436
+ continue;
18392
18437
  }
18393
18438
  if ((tag & 7) === 4 || tag === 0) {
18394
18439
  break;
@@ -18398,22 +18443,49 @@ var UnblockFriend = {
18398
18443
  return message;
18399
18444
  },
18400
18445
  fromJSON(object) {
18401
- return { user_id: isSet4(object.user_id) ? globalThis.String(object.user_id) : "" };
18446
+ return {
18447
+ user_id: isSet4(object.user_id) ? globalThis.String(object.user_id) : "",
18448
+ username: isSet4(object.username) ? globalThis.String(object.username) : "",
18449
+ avatar: isSet4(object.avatar) ? globalThis.String(object.avatar) : "",
18450
+ display_name: isSet4(object.display_name) ? globalThis.String(object.display_name) : "",
18451
+ status: isSet4(object.status) ? globalThis.String(object.status) : "",
18452
+ user_status: isSet4(object.user_status) ? globalThis.String(object.user_status) : ""
18453
+ };
18402
18454
  },
18403
18455
  toJSON(message) {
18404
18456
  const obj = {};
18405
18457
  if (message.user_id !== "") {
18406
18458
  obj.user_id = message.user_id;
18407
18459
  }
18460
+ if (message.username !== "") {
18461
+ obj.username = message.username;
18462
+ }
18463
+ if (message.avatar !== "") {
18464
+ obj.avatar = message.avatar;
18465
+ }
18466
+ if (message.display_name !== "") {
18467
+ obj.display_name = message.display_name;
18468
+ }
18469
+ if (message.status !== "") {
18470
+ obj.status = message.status;
18471
+ }
18472
+ if (message.user_status !== "") {
18473
+ obj.user_status = message.user_status;
18474
+ }
18408
18475
  return obj;
18409
18476
  },
18410
18477
  create(base) {
18411
18478
  return UnblockFriend.fromPartial(base != null ? base : {});
18412
18479
  },
18413
18480
  fromPartial(object) {
18414
- var _a;
18481
+ var _a, _b, _c, _d, _e, _f;
18415
18482
  const message = createBaseUnblockFriend();
18416
18483
  message.user_id = (_a = object.user_id) != null ? _a : "";
18484
+ message.username = (_b = object.username) != null ? _b : "";
18485
+ message.avatar = (_c = object.avatar) != null ? _c : "";
18486
+ message.display_name = (_d = object.display_name) != null ? _d : "";
18487
+ message.status = (_e = object.status) != null ? _e : "";
18488
+ message.user_status = (_f = object.user_status) != null ? _f : "";
18417
18489
  return message;
18418
18490
  }
18419
18491
  };
@@ -18354,13 +18354,28 @@ var BlockFriend = {
18354
18354
  }
18355
18355
  };
18356
18356
  function createBaseUnblockFriend() {
18357
- return { user_id: "" };
18357
+ return { user_id: "", username: "", avatar: "", display_name: "", status: "", user_status: "" };
18358
18358
  }
18359
18359
  var UnblockFriend = {
18360
18360
  encode(message, writer = import_minimal5.default.Writer.create()) {
18361
18361
  if (message.user_id !== "") {
18362
18362
  writer.uint32(10).string(message.user_id);
18363
18363
  }
18364
+ if (message.username !== "") {
18365
+ writer.uint32(18).string(message.username);
18366
+ }
18367
+ if (message.avatar !== "") {
18368
+ writer.uint32(26).string(message.avatar);
18369
+ }
18370
+ if (message.display_name !== "") {
18371
+ writer.uint32(34).string(message.display_name);
18372
+ }
18373
+ if (message.status !== "") {
18374
+ writer.uint32(42).string(message.status);
18375
+ }
18376
+ if (message.user_status !== "") {
18377
+ writer.uint32(50).string(message.user_status);
18378
+ }
18364
18379
  return writer;
18365
18380
  },
18366
18381
  decode(input, length) {
@@ -18376,6 +18391,36 @@ var UnblockFriend = {
18376
18391
  }
18377
18392
  message.user_id = reader.string();
18378
18393
  continue;
18394
+ case 2:
18395
+ if (tag !== 18) {
18396
+ break;
18397
+ }
18398
+ message.username = reader.string();
18399
+ continue;
18400
+ case 3:
18401
+ if (tag !== 26) {
18402
+ break;
18403
+ }
18404
+ message.avatar = reader.string();
18405
+ continue;
18406
+ case 4:
18407
+ if (tag !== 34) {
18408
+ break;
18409
+ }
18410
+ message.display_name = reader.string();
18411
+ continue;
18412
+ case 5:
18413
+ if (tag !== 42) {
18414
+ break;
18415
+ }
18416
+ message.status = reader.string();
18417
+ continue;
18418
+ case 6:
18419
+ if (tag !== 50) {
18420
+ break;
18421
+ }
18422
+ message.user_status = reader.string();
18423
+ continue;
18379
18424
  }
18380
18425
  if ((tag & 7) === 4 || tag === 0) {
18381
18426
  break;
@@ -18385,22 +18430,49 @@ var UnblockFriend = {
18385
18430
  return message;
18386
18431
  },
18387
18432
  fromJSON(object) {
18388
- return { user_id: isSet4(object.user_id) ? globalThis.String(object.user_id) : "" };
18433
+ return {
18434
+ user_id: isSet4(object.user_id) ? globalThis.String(object.user_id) : "",
18435
+ username: isSet4(object.username) ? globalThis.String(object.username) : "",
18436
+ avatar: isSet4(object.avatar) ? globalThis.String(object.avatar) : "",
18437
+ display_name: isSet4(object.display_name) ? globalThis.String(object.display_name) : "",
18438
+ status: isSet4(object.status) ? globalThis.String(object.status) : "",
18439
+ user_status: isSet4(object.user_status) ? globalThis.String(object.user_status) : ""
18440
+ };
18389
18441
  },
18390
18442
  toJSON(message) {
18391
18443
  const obj = {};
18392
18444
  if (message.user_id !== "") {
18393
18445
  obj.user_id = message.user_id;
18394
18446
  }
18447
+ if (message.username !== "") {
18448
+ obj.username = message.username;
18449
+ }
18450
+ if (message.avatar !== "") {
18451
+ obj.avatar = message.avatar;
18452
+ }
18453
+ if (message.display_name !== "") {
18454
+ obj.display_name = message.display_name;
18455
+ }
18456
+ if (message.status !== "") {
18457
+ obj.status = message.status;
18458
+ }
18459
+ if (message.user_status !== "") {
18460
+ obj.user_status = message.user_status;
18461
+ }
18395
18462
  return obj;
18396
18463
  },
18397
18464
  create(base) {
18398
18465
  return UnblockFriend.fromPartial(base != null ? base : {});
18399
18466
  },
18400
18467
  fromPartial(object) {
18401
- var _a;
18468
+ var _a, _b, _c, _d, _e, _f;
18402
18469
  const message = createBaseUnblockFriend();
18403
18470
  message.user_id = (_a = object.user_id) != null ? _a : "";
18471
+ message.username = (_b = object.username) != null ? _b : "";
18472
+ message.avatar = (_c = object.avatar) != null ? _c : "";
18473
+ message.display_name = (_d = object.display_name) != null ? _d : "";
18474
+ message.status = (_e = object.status) != null ? _e : "";
18475
+ message.user_status = (_f = object.user_status) != null ? _f : "";
18404
18476
  return message;
18405
18477
  }
18406
18478
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mezon-js-protobuf",
3
- "version": "1.8.45",
3
+ "version": "1.8.46",
4
4
  "description": "Websocket adapter adding protocol buffer support to the Mezon Javascript client.",
5
5
  "main": "dist/mezon-js-protobuf.cjs.js",
6
6
  "module": "dist/mezon-js-protobuf.esm.mjs",
package/rtapi/realtime.ts CHANGED
@@ -908,6 +908,16 @@ export interface BlockFriend {
908
908
  export interface UnblockFriend {
909
909
  /** */
910
910
  user_id: string;
911
+ /** */
912
+ username: string;
913
+ /** */
914
+ avatar: string;
915
+ /** */
916
+ display_name: string;
917
+ /** */
918
+ status: string;
919
+ /** */
920
+ user_status: string;
911
921
  }
912
922
 
913
923
  /** Application-level heartbeat and connection check. */
@@ -7064,7 +7074,7 @@ export const BlockFriend = {
7064
7074
  };
7065
7075
 
7066
7076
  function createBaseUnblockFriend(): UnblockFriend {
7067
- return { user_id: "" };
7077
+ return { user_id: "", username: "", avatar: "", display_name: "", status: "", user_status: "" };
7068
7078
  }
7069
7079
 
7070
7080
  export const UnblockFriend = {
@@ -7072,6 +7082,21 @@ export const UnblockFriend = {
7072
7082
  if (message.user_id !== "") {
7073
7083
  writer.uint32(10).string(message.user_id);
7074
7084
  }
7085
+ if (message.username !== "") {
7086
+ writer.uint32(18).string(message.username);
7087
+ }
7088
+ if (message.avatar !== "") {
7089
+ writer.uint32(26).string(message.avatar);
7090
+ }
7091
+ if (message.display_name !== "") {
7092
+ writer.uint32(34).string(message.display_name);
7093
+ }
7094
+ if (message.status !== "") {
7095
+ writer.uint32(42).string(message.status);
7096
+ }
7097
+ if (message.user_status !== "") {
7098
+ writer.uint32(50).string(message.user_status);
7099
+ }
7075
7100
  return writer;
7076
7101
  },
7077
7102
 
@@ -7089,6 +7114,41 @@ export const UnblockFriend = {
7089
7114
 
7090
7115
  message.user_id = reader.string();
7091
7116
  continue;
7117
+ case 2:
7118
+ if (tag !== 18) {
7119
+ break;
7120
+ }
7121
+
7122
+ message.username = reader.string();
7123
+ continue;
7124
+ case 3:
7125
+ if (tag !== 26) {
7126
+ break;
7127
+ }
7128
+
7129
+ message.avatar = reader.string();
7130
+ continue;
7131
+ case 4:
7132
+ if (tag !== 34) {
7133
+ break;
7134
+ }
7135
+
7136
+ message.display_name = reader.string();
7137
+ continue;
7138
+ case 5:
7139
+ if (tag !== 42) {
7140
+ break;
7141
+ }
7142
+
7143
+ message.status = reader.string();
7144
+ continue;
7145
+ case 6:
7146
+ if (tag !== 50) {
7147
+ break;
7148
+ }
7149
+
7150
+ message.user_status = reader.string();
7151
+ continue;
7092
7152
  }
7093
7153
  if ((tag & 7) === 4 || tag === 0) {
7094
7154
  break;
@@ -7099,7 +7159,14 @@ export const UnblockFriend = {
7099
7159
  },
7100
7160
 
7101
7161
  fromJSON(object: any): UnblockFriend {
7102
- return { user_id: isSet(object.user_id) ? globalThis.String(object.user_id) : "" };
7162
+ return {
7163
+ user_id: isSet(object.user_id) ? globalThis.String(object.user_id) : "",
7164
+ username: isSet(object.username) ? globalThis.String(object.username) : "",
7165
+ avatar: isSet(object.avatar) ? globalThis.String(object.avatar) : "",
7166
+ display_name: isSet(object.display_name) ? globalThis.String(object.display_name) : "",
7167
+ status: isSet(object.status) ? globalThis.String(object.status) : "",
7168
+ user_status: isSet(object.user_status) ? globalThis.String(object.user_status) : "",
7169
+ };
7103
7170
  },
7104
7171
 
7105
7172
  toJSON(message: UnblockFriend): unknown {
@@ -7107,6 +7174,21 @@ export const UnblockFriend = {
7107
7174
  if (message.user_id !== "") {
7108
7175
  obj.user_id = message.user_id;
7109
7176
  }
7177
+ if (message.username !== "") {
7178
+ obj.username = message.username;
7179
+ }
7180
+ if (message.avatar !== "") {
7181
+ obj.avatar = message.avatar;
7182
+ }
7183
+ if (message.display_name !== "") {
7184
+ obj.display_name = message.display_name;
7185
+ }
7186
+ if (message.status !== "") {
7187
+ obj.status = message.status;
7188
+ }
7189
+ if (message.user_status !== "") {
7190
+ obj.user_status = message.user_status;
7191
+ }
7110
7192
  return obj;
7111
7193
  },
7112
7194
 
@@ -7116,6 +7198,11 @@ export const UnblockFriend = {
7116
7198
  fromPartial<I extends Exact<DeepPartial<UnblockFriend>, I>>(object: I): UnblockFriend {
7117
7199
  const message = createBaseUnblockFriend();
7118
7200
  message.user_id = object.user_id ?? "";
7201
+ message.username = object.username ?? "";
7202
+ message.avatar = object.avatar ?? "";
7203
+ message.display_name = object.display_name ?? "";
7204
+ message.status = object.status ?? "";
7205
+ message.user_status = object.user_status ?? "";
7119
7206
  return message;
7120
7207
  },
7121
7208
  };