mezon-js-protobuf 1.5.23 → 1.5.24

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.
@@ -634,6 +634,8 @@ export interface UserChannelRemoved {
634
634
  channel_id: string;
635
635
  /** the user */
636
636
  user_ids: string[];
637
+ /** the channel type */
638
+ channel_type: number;
637
639
  }
638
640
  /** */
639
641
  export interface UserClanRemoved {
@@ -1147,6 +1149,7 @@ export declare const Envelope: {
1147
1149
  user_channel_removed_event?: {
1148
1150
  channel_id?: string | undefined;
1149
1151
  user_ids?: string[] | undefined;
1152
+ channel_type?: number | undefined;
1150
1153
  } | undefined;
1151
1154
  user_clan_removed_event?: {
1152
1155
  clan_id?: string | undefined;
@@ -2336,9 +2339,11 @@ export declare const Envelope: {
2336
2339
  user_channel_removed_event?: ({
2337
2340
  channel_id?: string | undefined;
2338
2341
  user_ids?: string[] | undefined;
2342
+ channel_type?: number | undefined;
2339
2343
  } & {
2340
2344
  channel_id?: string | undefined;
2341
2345
  user_ids?: (string[] & string[] & { [K_73 in Exclude<keyof I["user_channel_removed_event"]["user_ids"], keyof string[]>]: never; }) | undefined;
2346
+ channel_type?: number | undefined;
2342
2347
  } & { [K_74 in Exclude<keyof I["user_channel_removed_event"], keyof UserChannelRemoved>]: never; }) | undefined;
2343
2348
  user_clan_removed_event?: ({
2344
2349
  clan_id?: string | undefined;
@@ -3097,6 +3102,7 @@ export declare const Envelope: {
3097
3102
  user_channel_removed_event?: {
3098
3103
  channel_id?: string | undefined;
3099
3104
  user_ids?: string[] | undefined;
3105
+ channel_type?: number | undefined;
3100
3106
  } | undefined;
3101
3107
  user_clan_removed_event?: {
3102
3108
  clan_id?: string | undefined;
@@ -4286,9 +4292,11 @@ export declare const Envelope: {
4286
4292
  user_channel_removed_event?: ({
4287
4293
  channel_id?: string | undefined;
4288
4294
  user_ids?: string[] | undefined;
4295
+ channel_type?: number | undefined;
4289
4296
  } & {
4290
4297
  channel_id?: string | undefined;
4291
4298
  user_ids?: (string[] & string[] & { [K_183 in Exclude<keyof I_1["user_channel_removed_event"]["user_ids"], keyof string[]>]: never; }) | undefined;
4299
+ channel_type?: number | undefined;
4292
4300
  } & { [K_184 in Exclude<keyof I_1["user_channel_removed_event"], keyof UserChannelRemoved>]: never; }) | undefined;
4293
4301
  user_clan_removed_event?: ({
4294
4302
  clan_id?: string | undefined;
@@ -7555,16 +7563,20 @@ export declare const UserChannelRemoved: {
7555
7563
  create<I extends {
7556
7564
  channel_id?: string | undefined;
7557
7565
  user_ids?: string[] | undefined;
7566
+ channel_type?: number | undefined;
7558
7567
  } & {
7559
7568
  channel_id?: string | undefined;
7560
7569
  user_ids?: (string[] & string[] & { [K in Exclude<keyof I["user_ids"], keyof string[]>]: never; }) | undefined;
7570
+ channel_type?: number | undefined;
7561
7571
  } & { [K_1 in Exclude<keyof I, keyof UserChannelRemoved>]: never; }>(base?: I | undefined): UserChannelRemoved;
7562
7572
  fromPartial<I_1 extends {
7563
7573
  channel_id?: string | undefined;
7564
7574
  user_ids?: string[] | undefined;
7575
+ channel_type?: number | undefined;
7565
7576
  } & {
7566
7577
  channel_id?: string | undefined;
7567
7578
  user_ids?: (string[] & string[] & { [K_2 in Exclude<keyof I_1["user_ids"], keyof string[]>]: never; }) | undefined;
7579
+ channel_type?: number | undefined;
7568
7580
  } & { [K_3 in Exclude<keyof I_1, keyof UserChannelRemoved>]: never; }>(object: I_1): UserChannelRemoved;
7569
7581
  };
7570
7582
  export declare const UserClanRemoved: {
@@ -9397,7 +9397,7 @@ var UserChannelAdded = {
9397
9397
  }
9398
9398
  };
9399
9399
  function createBaseUserChannelRemoved() {
9400
- return { channel_id: "", user_ids: [] };
9400
+ return { channel_id: "", user_ids: [], channel_type: 0 };
9401
9401
  }
9402
9402
  var UserChannelRemoved = {
9403
9403
  encode(message, writer = import_minimal4.default.Writer.create()) {
@@ -9407,6 +9407,9 @@ var UserChannelRemoved = {
9407
9407
  for (const v of message.user_ids) {
9408
9408
  writer.uint32(18).string(v);
9409
9409
  }
9410
+ if (message.channel_type !== 0) {
9411
+ writer.uint32(24).int32(message.channel_type);
9412
+ }
9410
9413
  return writer;
9411
9414
  },
9412
9415
  decode(input, length) {
@@ -9428,6 +9431,12 @@ var UserChannelRemoved = {
9428
9431
  }
9429
9432
  message.user_ids.push(reader.string());
9430
9433
  continue;
9434
+ case 3:
9435
+ if (tag !== 24) {
9436
+ break;
9437
+ }
9438
+ message.channel_type = reader.int32();
9439
+ continue;
9431
9440
  }
9432
9441
  if ((tag & 7) === 4 || tag === 0) {
9433
9442
  break;
@@ -9439,7 +9448,8 @@ var UserChannelRemoved = {
9439
9448
  fromJSON(object) {
9440
9449
  return {
9441
9450
  channel_id: isSet4(object.channel_id) ? globalThis.String(object.channel_id) : "",
9442
- user_ids: globalThis.Array.isArray(object == null ? void 0 : object.user_ids) ? object.user_ids.map((e) => globalThis.String(e)) : []
9451
+ user_ids: globalThis.Array.isArray(object == null ? void 0 : object.user_ids) ? object.user_ids.map((e) => globalThis.String(e)) : [],
9452
+ channel_type: isSet4(object.channel_type) ? globalThis.Number(object.channel_type) : 0
9443
9453
  };
9444
9454
  },
9445
9455
  toJSON(message) {
@@ -9451,16 +9461,20 @@ var UserChannelRemoved = {
9451
9461
  if ((_a = message.user_ids) == null ? void 0 : _a.length) {
9452
9462
  obj.user_ids = message.user_ids;
9453
9463
  }
9464
+ if (message.channel_type !== 0) {
9465
+ obj.channel_type = Math.round(message.channel_type);
9466
+ }
9454
9467
  return obj;
9455
9468
  },
9456
9469
  create(base) {
9457
9470
  return UserChannelRemoved.fromPartial(base != null ? base : {});
9458
9471
  },
9459
9472
  fromPartial(object) {
9460
- var _a, _b;
9473
+ var _a, _b, _c;
9461
9474
  const message = createBaseUserChannelRemoved();
9462
9475
  message.channel_id = (_a = object.channel_id) != null ? _a : "";
9463
9476
  message.user_ids = ((_b = object.user_ids) == null ? void 0 : _b.map((e) => e)) || [];
9477
+ message.channel_type = (_c = object.channel_type) != null ? _c : 0;
9464
9478
  return message;
9465
9479
  }
9466
9480
  };
@@ -9384,7 +9384,7 @@ var UserChannelAdded = {
9384
9384
  }
9385
9385
  };
9386
9386
  function createBaseUserChannelRemoved() {
9387
- return { channel_id: "", user_ids: [] };
9387
+ return { channel_id: "", user_ids: [], channel_type: 0 };
9388
9388
  }
9389
9389
  var UserChannelRemoved = {
9390
9390
  encode(message, writer = import_minimal4.default.Writer.create()) {
@@ -9394,6 +9394,9 @@ var UserChannelRemoved = {
9394
9394
  for (const v of message.user_ids) {
9395
9395
  writer.uint32(18).string(v);
9396
9396
  }
9397
+ if (message.channel_type !== 0) {
9398
+ writer.uint32(24).int32(message.channel_type);
9399
+ }
9397
9400
  return writer;
9398
9401
  },
9399
9402
  decode(input, length) {
@@ -9415,6 +9418,12 @@ var UserChannelRemoved = {
9415
9418
  }
9416
9419
  message.user_ids.push(reader.string());
9417
9420
  continue;
9421
+ case 3:
9422
+ if (tag !== 24) {
9423
+ break;
9424
+ }
9425
+ message.channel_type = reader.int32();
9426
+ continue;
9418
9427
  }
9419
9428
  if ((tag & 7) === 4 || tag === 0) {
9420
9429
  break;
@@ -9426,7 +9435,8 @@ var UserChannelRemoved = {
9426
9435
  fromJSON(object) {
9427
9436
  return {
9428
9437
  channel_id: isSet4(object.channel_id) ? globalThis.String(object.channel_id) : "",
9429
- user_ids: globalThis.Array.isArray(object == null ? void 0 : object.user_ids) ? object.user_ids.map((e) => globalThis.String(e)) : []
9438
+ user_ids: globalThis.Array.isArray(object == null ? void 0 : object.user_ids) ? object.user_ids.map((e) => globalThis.String(e)) : [],
9439
+ channel_type: isSet4(object.channel_type) ? globalThis.Number(object.channel_type) : 0
9430
9440
  };
9431
9441
  },
9432
9442
  toJSON(message) {
@@ -9438,16 +9448,20 @@ var UserChannelRemoved = {
9438
9448
  if ((_a = message.user_ids) == null ? void 0 : _a.length) {
9439
9449
  obj.user_ids = message.user_ids;
9440
9450
  }
9451
+ if (message.channel_type !== 0) {
9452
+ obj.channel_type = Math.round(message.channel_type);
9453
+ }
9441
9454
  return obj;
9442
9455
  },
9443
9456
  create(base) {
9444
9457
  return UserChannelRemoved.fromPartial(base != null ? base : {});
9445
9458
  },
9446
9459
  fromPartial(object) {
9447
- var _a, _b;
9460
+ var _a, _b, _c;
9448
9461
  const message = createBaseUserChannelRemoved();
9449
9462
  message.channel_id = (_a = object.channel_id) != null ? _a : "";
9450
9463
  message.user_ids = ((_b = object.user_ids) == null ? void 0 : _b.map((e) => e)) || [];
9464
+ message.channel_type = (_c = object.channel_type) != null ? _c : 0;
9451
9465
  return message;
9452
9466
  }
9453
9467
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mezon-js-protobuf",
3
- "version": "1.5.23",
3
+ "version": "1.5.24",
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
@@ -882,6 +882,8 @@ export interface UserChannelRemoved {
882
882
  channel_id: string;
883
883
  /** the user */
884
884
  user_ids: string[];
885
+ /** the channel type */
886
+ channel_type: number;
885
887
  }
886
888
 
887
889
  /** */
@@ -7175,7 +7177,7 @@ export const UserChannelAdded = {
7175
7177
  };
7176
7178
 
7177
7179
  function createBaseUserChannelRemoved(): UserChannelRemoved {
7178
- return { channel_id: "", user_ids: [] };
7180
+ return { channel_id: "", user_ids: [], channel_type: 0 };
7179
7181
  }
7180
7182
 
7181
7183
  export const UserChannelRemoved = {
@@ -7186,6 +7188,9 @@ export const UserChannelRemoved = {
7186
7188
  for (const v of message.user_ids) {
7187
7189
  writer.uint32(18).string(v!);
7188
7190
  }
7191
+ if (message.channel_type !== 0) {
7192
+ writer.uint32(24).int32(message.channel_type);
7193
+ }
7189
7194
  return writer;
7190
7195
  },
7191
7196
 
@@ -7210,6 +7215,13 @@ export const UserChannelRemoved = {
7210
7215
 
7211
7216
  message.user_ids.push(reader.string());
7212
7217
  continue;
7218
+ case 3:
7219
+ if (tag !== 24) {
7220
+ break;
7221
+ }
7222
+
7223
+ message.channel_type = reader.int32();
7224
+ continue;
7213
7225
  }
7214
7226
  if ((tag & 7) === 4 || tag === 0) {
7215
7227
  break;
@@ -7223,6 +7235,7 @@ export const UserChannelRemoved = {
7223
7235
  return {
7224
7236
  channel_id: isSet(object.channel_id) ? globalThis.String(object.channel_id) : "",
7225
7237
  user_ids: globalThis.Array.isArray(object?.user_ids) ? object.user_ids.map((e: any) => globalThis.String(e)) : [],
7238
+ channel_type: isSet(object.channel_type) ? globalThis.Number(object.channel_type) : 0,
7226
7239
  };
7227
7240
  },
7228
7241
 
@@ -7234,6 +7247,9 @@ export const UserChannelRemoved = {
7234
7247
  if (message.user_ids?.length) {
7235
7248
  obj.user_ids = message.user_ids;
7236
7249
  }
7250
+ if (message.channel_type !== 0) {
7251
+ obj.channel_type = Math.round(message.channel_type);
7252
+ }
7237
7253
  return obj;
7238
7254
  },
7239
7255
 
@@ -7244,6 +7260,7 @@ export const UserChannelRemoved = {
7244
7260
  const message = createBaseUserChannelRemoved();
7245
7261
  message.channel_id = object.channel_id ?? "";
7246
7262
  message.user_ids = object.user_ids?.map((e) => e) || [];
7263
+ message.channel_type = object.channel_type ?? 0;
7247
7264
  return message;
7248
7265
  },
7249
7266
  };