mezon-js-protobuf 1.4.76 → 1.4.77

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
@@ -2673,6 +2673,11 @@ export interface ClanStickerDeleteRequest {
2673
2673
  id: number;
2674
2674
  }
2675
2675
 
2676
+ export interface ChangeChannelCategoryRequest {
2677
+ channel_id: string;
2678
+ new_category_id: string;
2679
+ }
2680
+
2676
2681
  function createBaseAccount(): Account {
2677
2682
  return {
2678
2683
  user: undefined,
@@ -20003,6 +20008,68 @@ export const ClanStickerDeleteRequest = {
20003
20008
  },
20004
20009
  };
20005
20010
 
20011
+ function createBaseChangeChannelCategoryRequest(): ChangeChannelCategoryRequest {
20012
+ return { channel_id: "", new_category_id: "" };
20013
+ }
20014
+
20015
+ export const ChangeChannelCategoryRequest = {
20016
+ encode(message: ChangeChannelCategoryRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
20017
+ if (message.channel_id !== "") {
20018
+ writer.uint32(10).string(message.channel_id);
20019
+ }
20020
+ if (message.new_category_id !== "") {
20021
+ writer.uint32(18).string(message.new_category_id);
20022
+ }
20023
+ return writer;
20024
+ },
20025
+
20026
+ decode(input: _m0.Reader | Uint8Array, length?: number): ChangeChannelCategoryRequest {
20027
+ const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
20028
+ let end = length === undefined ? reader.len : reader.pos + length;
20029
+ const message = createBaseChangeChannelCategoryRequest();
20030
+ while (reader.pos < end) {
20031
+ const tag = reader.uint32();
20032
+ switch (tag >>> 3) {
20033
+ case 1:
20034
+ message.channel_id = reader.string();
20035
+ break;
20036
+ case 2:
20037
+ message.new_category_id = reader.string();
20038
+ break;
20039
+ default:
20040
+ reader.skipType(tag & 7);
20041
+ break;
20042
+ }
20043
+ }
20044
+ return message;
20045
+ },
20046
+
20047
+ fromJSON(object: any): ChangeChannelCategoryRequest {
20048
+ return {
20049
+ channel_id: isSet(object.channel_id) ? String(object.channel_id) : "",
20050
+ new_category_id: isSet(object.new_category_id) ? String(object.new_category_id) : "",
20051
+ };
20052
+ },
20053
+
20054
+ toJSON(message: ChangeChannelCategoryRequest): unknown {
20055
+ const obj: any = {};
20056
+ message.channel_id !== undefined && (obj.channel_id = message.channel_id);
20057
+ message.new_category_id !== undefined && (obj.new_category_id = message.new_category_id);
20058
+ return obj;
20059
+ },
20060
+
20061
+ create<I extends Exact<DeepPartial<ChangeChannelCategoryRequest>, I>>(base?: I): ChangeChannelCategoryRequest {
20062
+ return ChangeChannelCategoryRequest.fromPartial(base ?? {});
20063
+ },
20064
+
20065
+ fromPartial<I extends Exact<DeepPartial<ChangeChannelCategoryRequest>, I>>(object: I): ChangeChannelCategoryRequest {
20066
+ const message = createBaseChangeChannelCategoryRequest();
20067
+ message.channel_id = object.channel_id ?? "";
20068
+ message.new_category_id = object.new_category_id ?? "";
20069
+ return message;
20070
+ },
20071
+ };
20072
+
20006
20073
  declare var self: any | undefined;
20007
20074
  declare var window: any | undefined;
20008
20075
  declare var global: any | undefined;
@@ -2083,6 +2083,10 @@ export interface ClanStickerUpdateByIdRequest {
2083
2083
  export interface ClanStickerDeleteRequest {
2084
2084
  id: number;
2085
2085
  }
2086
+ export interface ChangeChannelCategoryRequest {
2087
+ channel_id: string;
2088
+ new_category_id: string;
2089
+ }
2086
2090
  export declare const Account: {
2087
2091
  encode(message: Account, writer?: _m0.Writer): _m0.Writer;
2088
2092
  decode(input: _m0.Reader | Uint8Array, length?: number): Account;
@@ -14149,6 +14153,26 @@ export declare const ClanStickerDeleteRequest: {
14149
14153
  id?: number | undefined;
14150
14154
  } & { [K_1 in Exclude<keyof I_1, "id">]: never; }>(object: I_1): ClanStickerDeleteRequest;
14151
14155
  };
14156
+ export declare const ChangeChannelCategoryRequest: {
14157
+ encode(message: ChangeChannelCategoryRequest, writer?: _m0.Writer): _m0.Writer;
14158
+ decode(input: _m0.Reader | Uint8Array, length?: number): ChangeChannelCategoryRequest;
14159
+ fromJSON(object: any): ChangeChannelCategoryRequest;
14160
+ toJSON(message: ChangeChannelCategoryRequest): unknown;
14161
+ create<I extends {
14162
+ channel_id?: string | undefined;
14163
+ new_category_id?: string | undefined;
14164
+ } & {
14165
+ channel_id?: string | undefined;
14166
+ new_category_id?: string | undefined;
14167
+ } & { [K in Exclude<keyof I, keyof ChangeChannelCategoryRequest>]: never; }>(base?: I | undefined): ChangeChannelCategoryRequest;
14168
+ fromPartial<I_1 extends {
14169
+ channel_id?: string | undefined;
14170
+ new_category_id?: string | undefined;
14171
+ } & {
14172
+ channel_id?: string | undefined;
14173
+ new_category_id?: string | undefined;
14174
+ } & { [K_1 in Exclude<keyof I_1, keyof ChangeChannelCategoryRequest>]: never; }>(object: I_1): ChangeChannelCategoryRequest;
14175
+ };
14152
14176
  type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
14153
14177
  export type DeepPartial<T> = T extends Builtin ? T : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
14154
14178
  [K in keyof T]?: DeepPartial<T[K]>;
@@ -596,6 +596,8 @@ export interface UserChannelAdded {
596
596
  status: string;
597
597
  /** the clan id */
598
598
  clan_id: string;
599
+ /** the channel type */
600
+ channel_type: number;
599
601
  }
600
602
  /** */
601
603
  export interface UserChannelRemoved {
@@ -976,6 +978,7 @@ export declare const Envelope: {
976
978
  }[] | undefined;
977
979
  status?: string | undefined;
978
980
  clan_id?: string | undefined;
981
+ channel_type?: number | undefined;
979
982
  } | undefined;
980
983
  user_channel_removed_event?: {
981
984
  channel_id?: string | undefined;
@@ -1889,6 +1892,7 @@ export declare const Envelope: {
1889
1892
  }[] | undefined;
1890
1893
  status?: string | undefined;
1891
1894
  clan_id?: string | undefined;
1895
+ channel_type?: number | undefined;
1892
1896
  } & {
1893
1897
  channel_id?: string | undefined;
1894
1898
  users?: ({
@@ -1910,6 +1914,7 @@ export declare const Envelope: {
1910
1914
  }[]>]: never; }) | undefined;
1911
1915
  status?: string | undefined;
1912
1916
  clan_id?: string | undefined;
1917
+ channel_type?: number | undefined;
1913
1918
  } & { [K_68 in Exclude<keyof I["user_channel_added_event"], keyof UserChannelAdded>]: never; }) | undefined;
1914
1919
  user_channel_removed_event?: ({
1915
1920
  channel_id?: string | undefined;
@@ -2267,6 +2272,7 @@ export declare const Envelope: {
2267
2272
  }[] | undefined;
2268
2273
  status?: string | undefined;
2269
2274
  clan_id?: string | undefined;
2275
+ channel_type?: number | undefined;
2270
2276
  } | undefined;
2271
2277
  user_channel_removed_event?: {
2272
2278
  channel_id?: string | undefined;
@@ -3180,6 +3186,7 @@ export declare const Envelope: {
3180
3186
  }[] | undefined;
3181
3187
  status?: string | undefined;
3182
3188
  clan_id?: string | undefined;
3189
+ channel_type?: number | undefined;
3183
3190
  } & {
3184
3191
  channel_id?: string | undefined;
3185
3192
  users?: ({
@@ -3201,6 +3208,7 @@ export declare const Envelope: {
3201
3208
  }[]>]: never; }) | undefined;
3202
3209
  status?: string | undefined;
3203
3210
  clan_id?: string | undefined;
3211
+ channel_type?: number | undefined;
3204
3212
  } & { [K_142 in Exclude<keyof I_1["user_channel_added_event"], keyof UserChannelAdded>]: never; }) | undefined;
3205
3213
  user_channel_removed_event?: ({
3206
3214
  channel_id?: string | undefined;
@@ -5402,6 +5410,7 @@ export declare const UserChannelAdded: {
5402
5410
  }[] | undefined;
5403
5411
  status?: string | undefined;
5404
5412
  clan_id?: string | undefined;
5413
+ channel_type?: number | undefined;
5405
5414
  } & {
5406
5415
  channel_id?: string | undefined;
5407
5416
  users?: ({
@@ -5423,6 +5432,7 @@ export declare const UserChannelAdded: {
5423
5432
  }[]>]: never; }) | undefined;
5424
5433
  status?: string | undefined;
5425
5434
  clan_id?: string | undefined;
5435
+ channel_type?: number | undefined;
5426
5436
  } & { [K_2 in Exclude<keyof I, keyof UserChannelAdded>]: never; }>(base?: I | undefined): UserChannelAdded;
5427
5437
  fromPartial<I_1 extends {
5428
5438
  channel_id?: string | undefined;
@@ -5433,6 +5443,7 @@ export declare const UserChannelAdded: {
5433
5443
  }[] | undefined;
5434
5444
  status?: string | undefined;
5435
5445
  clan_id?: string | undefined;
5446
+ channel_type?: number | undefined;
5436
5447
  } & {
5437
5448
  channel_id?: string | undefined;
5438
5449
  users?: ({
@@ -5454,6 +5465,7 @@ export declare const UserChannelAdded: {
5454
5465
  }[]>]: never; }) | undefined;
5455
5466
  status?: string | undefined;
5456
5467
  clan_id?: string | undefined;
5468
+ channel_type?: number | undefined;
5457
5469
  } & { [K_5 in Exclude<keyof I_1, keyof UserChannelAdded>]: never; }>(object: I_1): UserChannelAdded;
5458
5470
  };
5459
5471
  export declare const UserChannelRemoved: {
@@ -6572,7 +6572,7 @@ var AddUsers = {
6572
6572
  }
6573
6573
  };
6574
6574
  function createBaseUserChannelAdded() {
6575
- return { channel_id: "", users: [], status: "", clan_id: "" };
6575
+ return { channel_id: "", users: [], status: "", clan_id: "", channel_type: 0 };
6576
6576
  }
6577
6577
  var UserChannelAdded = {
6578
6578
  encode(message, writer = import_minimal4.default.Writer.create()) {
@@ -6588,6 +6588,9 @@ var UserChannelAdded = {
6588
6588
  if (message.clan_id !== "") {
6589
6589
  writer.uint32(34).string(message.clan_id);
6590
6590
  }
6591
+ if (message.channel_type !== 0) {
6592
+ writer.uint32(40).int32(message.channel_type);
6593
+ }
6591
6594
  return writer;
6592
6595
  },
6593
6596
  decode(input, length) {
@@ -6609,6 +6612,9 @@ var UserChannelAdded = {
6609
6612
  case 4:
6610
6613
  message.clan_id = reader.string();
6611
6614
  break;
6615
+ case 5:
6616
+ message.channel_type = reader.int32();
6617
+ break;
6612
6618
  default:
6613
6619
  reader.skipType(tag & 7);
6614
6620
  break;
@@ -6621,7 +6627,8 @@ var UserChannelAdded = {
6621
6627
  channel_id: isSet4(object.channel_id) ? String(object.channel_id) : "",
6622
6628
  users: Array.isArray(object == null ? void 0 : object.users) ? object.users.map((e) => AddUsers.fromJSON(e)) : [],
6623
6629
  status: isSet4(object.status) ? String(object.status) : "",
6624
- clan_id: isSet4(object.clan_id) ? String(object.clan_id) : ""
6630
+ clan_id: isSet4(object.clan_id) ? String(object.clan_id) : "",
6631
+ channel_type: isSet4(object.channel_type) ? Number(object.channel_type) : 0
6625
6632
  };
6626
6633
  },
6627
6634
  toJSON(message) {
@@ -6634,18 +6641,20 @@ var UserChannelAdded = {
6634
6641
  }
6635
6642
  message.status !== void 0 && (obj.status = message.status);
6636
6643
  message.clan_id !== void 0 && (obj.clan_id = message.clan_id);
6644
+ message.channel_type !== void 0 && (obj.channel_type = Math.round(message.channel_type));
6637
6645
  return obj;
6638
6646
  },
6639
6647
  create(base) {
6640
6648
  return UserChannelAdded.fromPartial(base != null ? base : {});
6641
6649
  },
6642
6650
  fromPartial(object) {
6643
- var _a, _b, _c, _d;
6651
+ var _a, _b, _c, _d, _e;
6644
6652
  const message = createBaseUserChannelAdded();
6645
6653
  message.channel_id = (_a = object.channel_id) != null ? _a : "";
6646
6654
  message.users = ((_b = object.users) == null ? void 0 : _b.map((e) => AddUsers.fromPartial(e))) || [];
6647
6655
  message.status = (_c = object.status) != null ? _c : "";
6648
6656
  message.clan_id = (_d = object.clan_id) != null ? _d : "";
6657
+ message.channel_type = (_e = object.channel_type) != null ? _e : 0;
6649
6658
  return message;
6650
6659
  }
6651
6660
  };
@@ -6559,7 +6559,7 @@ var AddUsers = {
6559
6559
  }
6560
6560
  };
6561
6561
  function createBaseUserChannelAdded() {
6562
- return { channel_id: "", users: [], status: "", clan_id: "" };
6562
+ return { channel_id: "", users: [], status: "", clan_id: "", channel_type: 0 };
6563
6563
  }
6564
6564
  var UserChannelAdded = {
6565
6565
  encode(message, writer = import_minimal4.default.Writer.create()) {
@@ -6575,6 +6575,9 @@ var UserChannelAdded = {
6575
6575
  if (message.clan_id !== "") {
6576
6576
  writer.uint32(34).string(message.clan_id);
6577
6577
  }
6578
+ if (message.channel_type !== 0) {
6579
+ writer.uint32(40).int32(message.channel_type);
6580
+ }
6578
6581
  return writer;
6579
6582
  },
6580
6583
  decode(input, length) {
@@ -6596,6 +6599,9 @@ var UserChannelAdded = {
6596
6599
  case 4:
6597
6600
  message.clan_id = reader.string();
6598
6601
  break;
6602
+ case 5:
6603
+ message.channel_type = reader.int32();
6604
+ break;
6599
6605
  default:
6600
6606
  reader.skipType(tag & 7);
6601
6607
  break;
@@ -6608,7 +6614,8 @@ var UserChannelAdded = {
6608
6614
  channel_id: isSet4(object.channel_id) ? String(object.channel_id) : "",
6609
6615
  users: Array.isArray(object == null ? void 0 : object.users) ? object.users.map((e) => AddUsers.fromJSON(e)) : [],
6610
6616
  status: isSet4(object.status) ? String(object.status) : "",
6611
- clan_id: isSet4(object.clan_id) ? String(object.clan_id) : ""
6617
+ clan_id: isSet4(object.clan_id) ? String(object.clan_id) : "",
6618
+ channel_type: isSet4(object.channel_type) ? Number(object.channel_type) : 0
6612
6619
  };
6613
6620
  },
6614
6621
  toJSON(message) {
@@ -6621,18 +6628,20 @@ var UserChannelAdded = {
6621
6628
  }
6622
6629
  message.status !== void 0 && (obj.status = message.status);
6623
6630
  message.clan_id !== void 0 && (obj.clan_id = message.clan_id);
6631
+ message.channel_type !== void 0 && (obj.channel_type = Math.round(message.channel_type));
6624
6632
  return obj;
6625
6633
  },
6626
6634
  create(base) {
6627
6635
  return UserChannelAdded.fromPartial(base != null ? base : {});
6628
6636
  },
6629
6637
  fromPartial(object) {
6630
- var _a, _b, _c, _d;
6638
+ var _a, _b, _c, _d, _e;
6631
6639
  const message = createBaseUserChannelAdded();
6632
6640
  message.channel_id = (_a = object.channel_id) != null ? _a : "";
6633
6641
  message.users = ((_b = object.users) == null ? void 0 : _b.map((e) => AddUsers.fromPartial(e))) || [];
6634
6642
  message.status = (_c = object.status) != null ? _c : "";
6635
6643
  message.clan_id = (_d = object.clan_id) != null ? _d : "";
6644
+ message.channel_type = (_e = object.channel_type) != null ? _e : 0;
6636
6645
  return message;
6637
6646
  }
6638
6647
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mezon-js-protobuf",
3
- "version": "1.4.76",
3
+ "version": "1.4.77",
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
@@ -791,6 +791,8 @@ export interface UserChannelAdded {
791
791
  status: string;
792
792
  /** the clan id */
793
793
  clan_id: string;
794
+ /** the channel type */
795
+ channel_type: number;
794
796
  }
795
797
 
796
798
  /** */
@@ -5051,7 +5053,7 @@ export const AddUsers = {
5051
5053
  };
5052
5054
 
5053
5055
  function createBaseUserChannelAdded(): UserChannelAdded {
5054
- return { channel_id: "", users: [], status: "", clan_id: "" };
5056
+ return { channel_id: "", users: [], status: "", clan_id: "", channel_type: 0 };
5055
5057
  }
5056
5058
 
5057
5059
  export const UserChannelAdded = {
@@ -5068,6 +5070,9 @@ export const UserChannelAdded = {
5068
5070
  if (message.clan_id !== "") {
5069
5071
  writer.uint32(34).string(message.clan_id);
5070
5072
  }
5073
+ if (message.channel_type !== 0) {
5074
+ writer.uint32(40).int32(message.channel_type);
5075
+ }
5071
5076
  return writer;
5072
5077
  },
5073
5078
 
@@ -5090,6 +5095,9 @@ export const UserChannelAdded = {
5090
5095
  case 4:
5091
5096
  message.clan_id = reader.string();
5092
5097
  break;
5098
+ case 5:
5099
+ message.channel_type = reader.int32();
5100
+ break;
5093
5101
  default:
5094
5102
  reader.skipType(tag & 7);
5095
5103
  break;
@@ -5104,6 +5112,7 @@ export const UserChannelAdded = {
5104
5112
  users: Array.isArray(object?.users) ? object.users.map((e: any) => AddUsers.fromJSON(e)) : [],
5105
5113
  status: isSet(object.status) ? String(object.status) : "",
5106
5114
  clan_id: isSet(object.clan_id) ? String(object.clan_id) : "",
5115
+ channel_type: isSet(object.channel_type) ? Number(object.channel_type) : 0,
5107
5116
  };
5108
5117
  },
5109
5118
 
@@ -5117,6 +5126,7 @@ export const UserChannelAdded = {
5117
5126
  }
5118
5127
  message.status !== undefined && (obj.status = message.status);
5119
5128
  message.clan_id !== undefined && (obj.clan_id = message.clan_id);
5129
+ message.channel_type !== undefined && (obj.channel_type = Math.round(message.channel_type));
5120
5130
  return obj;
5121
5131
  },
5122
5132
 
@@ -5130,6 +5140,7 @@ export const UserChannelAdded = {
5130
5140
  message.users = object.users?.map((e) => AddUsers.fromPartial(e)) || [];
5131
5141
  message.status = object.status ?? "";
5132
5142
  message.clan_id = object.clan_id ?? "";
5143
+ message.channel_type = object.channel_type ?? 0;
5133
5144
  return message;
5134
5145
  },
5135
5146
  };